新需求
This commit is contained in:
parent
6ac56a4c8b
commit
e4e3705de6
|
|
@ -4,11 +4,14 @@ import com.bonus.aqgqj.annotation.DecryptAndVerify;
|
||||||
import com.bonus.aqgqj.annotation.LogAnnotation;
|
import com.bonus.aqgqj.annotation.LogAnnotation;
|
||||||
import com.bonus.aqgqj.app.entity.AppVersion;
|
import com.bonus.aqgqj.app.entity.AppVersion;
|
||||||
import com.bonus.aqgqj.app.entity.HomeAppVo;
|
import com.bonus.aqgqj.app.entity.HomeAppVo;
|
||||||
|
import com.bonus.aqgqj.app.entity.SamplesManageAppVo;
|
||||||
import com.bonus.aqgqj.app.entity.dto.ParamsAppDto;
|
import com.bonus.aqgqj.app.entity.dto.ParamsAppDto;
|
||||||
import com.bonus.aqgqj.app.service.HomeAppService;
|
import com.bonus.aqgqj.app.service.HomeAppService;
|
||||||
import com.bonus.aqgqj.basis.entity.dto.ParamsDto;
|
import com.bonus.aqgqj.basis.entity.dto.ParamsDto;
|
||||||
import com.bonus.aqgqj.system.vo.EncryptedReq;
|
import com.bonus.aqgqj.system.vo.EncryptedReq;
|
||||||
import com.bonus.aqgqj.utils.ServerResponse;
|
import com.bonus.aqgqj.utils.ServerResponse;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
@ -85,4 +88,16 @@ public class HomeAppController {
|
||||||
}
|
}
|
||||||
return ServerResponse.createErroe("获取失败");
|
return ServerResponse.createErroe("获取失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping(value = "getExpireDataList")
|
||||||
|
@LogAnnotation(operModul = "app首页", operation = "获取临期数据列表", operDesc = "业务级事件",operType="查询")
|
||||||
|
public ServerResponse getExpireDataList() {
|
||||||
|
try {
|
||||||
|
List<SamplesManageAppVo> list = service.getExpireDataList();
|
||||||
|
return ServerResponse.createSuccess(list);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error(e.toString(),e);
|
||||||
|
}
|
||||||
|
return ServerResponse.createErroe("获取失败");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,13 +9,17 @@ import com.bonus.aqgqj.basis.entity.dto.ParamsDto;
|
||||||
import com.bonus.aqgqj.basis.entity.dto.SamplesManageDto;
|
import com.bonus.aqgqj.basis.entity.dto.SamplesManageDto;
|
||||||
import com.bonus.aqgqj.basis.entity.vo.ContractsVo;
|
import com.bonus.aqgqj.basis.entity.vo.ContractsVo;
|
||||||
import com.bonus.aqgqj.system.vo.EncryptedReq;
|
import com.bonus.aqgqj.system.vo.EncryptedReq;
|
||||||
|
import com.bonus.aqgqj.system.vo.UserDto;
|
||||||
import com.bonus.aqgqj.utils.ServerResponse;
|
import com.bonus.aqgqj.utils.ServerResponse;
|
||||||
|
import com.bonus.aqgqj.utils.SystemUtils;
|
||||||
|
import com.bonus.aqgqj.utils.UserUtil;
|
||||||
import com.bonus.aqgqj.utils.WordUtils;
|
import com.bonus.aqgqj.utils.WordUtils;
|
||||||
import com.fasterxml.jackson.core.type.TypeReference;
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
|
import org.apache.commons.codec.binary.Base64;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
@ -25,6 +29,8 @@ import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
|
|
@ -254,4 +260,52 @@ public class SamplesManageAppController {
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传用户签字图片
|
||||||
|
*/
|
||||||
|
@PostMapping(value = "uploadSign")
|
||||||
|
@DecryptAndVerify(decryptedClass = UserDto.class)
|
||||||
|
@LogAnnotation(operModul = "系统管理-个人信息管理", operation = "上传用户签字图片", operDesc = "系统级事件",operType="修改")
|
||||||
|
public ServerResponse saveSignature(EncryptedReq<UserDto> data) {
|
||||||
|
try {
|
||||||
|
//获取登录人id
|
||||||
|
Integer userId = Integer.parseInt(UserUtil.getLoginUser().getId().toString());
|
||||||
|
byte[] imageBytes = Base64.decodeBase64(data.getData().getSignImg());
|
||||||
|
String fileName = "sign/"+System.currentTimeMillis()+".jpg";
|
||||||
|
// 指定保存路径
|
||||||
|
File outputFile = new File(SystemUtils.getUploadPath()+fileName);
|
||||||
|
if (!outputFile.getParentFile().exists()){
|
||||||
|
outputFile.getParentFile().mkdirs();
|
||||||
|
}
|
||||||
|
try (FileOutputStream fos = new FileOutputStream(outputFile)) {
|
||||||
|
fos.write(imageBytes);
|
||||||
|
}
|
||||||
|
UserDto userDto=new UserDto();
|
||||||
|
userDto.setId(Long.valueOf(userId));
|
||||||
|
userDto.setSignImg(fileName);
|
||||||
|
//将文件路径保存到数据库
|
||||||
|
int res=samplesManageAppService.updateSign(userDto);
|
||||||
|
|
||||||
|
return ServerResponse.createBySuccessMsg("上传成功");
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return ServerResponse.createErroe("上传失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据登录人id获取签字图片
|
||||||
|
*/
|
||||||
|
@PostMapping(value = "getSign")
|
||||||
|
@LogAnnotation(operModul = "系统管理-个人信息管理", operation = "根据登录人id获取签字图片", operDesc = "系统级事件",operType="查询")
|
||||||
|
public ServerResponse getSign() {
|
||||||
|
try {
|
||||||
|
String signImg = samplesManageAppService.getSign();
|
||||||
|
return ServerResponse.createSuccess(signImg);
|
||||||
|
}catch (Exception e){
|
||||||
|
log.error(e.toString(),e);
|
||||||
|
}
|
||||||
|
return ServerResponse.createErroe("查询失败");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package com.bonus.aqgqj.app.dao;
|
||||||
|
|
||||||
import com.bonus.aqgqj.app.entity.AppVersion;
|
import com.bonus.aqgqj.app.entity.AppVersion;
|
||||||
import com.bonus.aqgqj.app.entity.HomeAppVo;
|
import com.bonus.aqgqj.app.entity.HomeAppVo;
|
||||||
|
import com.bonus.aqgqj.app.entity.SamplesManageAppVo;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -53,4 +54,10 @@ public interface HomeAppDao {
|
||||||
* @return List<AppVersion>
|
* @return List<AppVersion>
|
||||||
*/
|
*/
|
||||||
List<AppVersion> getVersion();
|
List<AppVersion> getVersion();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询临期数据
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<SamplesManageAppVo> getExpireDataList();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import com.bonus.aqgqj.basis.entity.dto.ParamsDto;
|
||||||
import com.bonus.aqgqj.basis.entity.dto.SamplesManageDto;
|
import com.bonus.aqgqj.basis.entity.dto.SamplesManageDto;
|
||||||
import com.bonus.aqgqj.basis.entity.vo.ConfigItemsVo;
|
import com.bonus.aqgqj.basis.entity.vo.ConfigItemsVo;
|
||||||
import com.bonus.aqgqj.basis.entity.vo.ContractsVo;
|
import com.bonus.aqgqj.basis.entity.vo.ContractsVo;
|
||||||
|
import com.bonus.aqgqj.system.vo.UserDto;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
|
@ -210,4 +211,18 @@ public interface SamplesManageAppDao {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Integer getSampleNum(@Param("params") ParamsDto dto,@Param("devCode") String devCode);
|
Integer getSampleNum(@Param("params") ParamsDto dto,@Param("devCode") String devCode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存用户签字图片
|
||||||
|
* @param userDto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int updateSign(UserDto userDto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户签字图片
|
||||||
|
* @param userId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
String getSign(Integer userId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -232,5 +232,10 @@ public class SamplesManageAppVo extends PageEntity {
|
||||||
*/
|
*/
|
||||||
private Integer experStatus;
|
private Integer experStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 天数
|
||||||
|
*/
|
||||||
|
private Integer days;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package com.bonus.aqgqj.app.service;
|
||||||
|
|
||||||
import com.bonus.aqgqj.app.entity.AppVersion;
|
import com.bonus.aqgqj.app.entity.AppVersion;
|
||||||
import com.bonus.aqgqj.app.entity.HomeAppVo;
|
import com.bonus.aqgqj.app.entity.HomeAppVo;
|
||||||
|
import com.bonus.aqgqj.app.entity.SamplesManageAppVo;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
@ -45,4 +46,10 @@ public interface HomeAppService {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<AppVersion> getVersion();
|
List<AppVersion> getVersion();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询临期数据
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<SamplesManageAppVo> getExpireDataList();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import com.bonus.aqgqj.app.entity.SamplesManageAppVo;
|
||||||
import com.bonus.aqgqj.basis.entity.dto.ParamsDto;
|
import com.bonus.aqgqj.basis.entity.dto.ParamsDto;
|
||||||
import com.bonus.aqgqj.basis.entity.vo.ContractsVo;
|
import com.bonus.aqgqj.basis.entity.vo.ContractsVo;
|
||||||
import com.bonus.aqgqj.system.vo.EncryptedReq;
|
import com.bonus.aqgqj.system.vo.EncryptedReq;
|
||||||
|
import com.bonus.aqgqj.system.vo.UserDto;
|
||||||
import com.bonus.aqgqj.utils.ServerResponse;
|
import com.bonus.aqgqj.utils.ServerResponse;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -103,4 +104,17 @@ public interface SamplesManageAppService {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<ContractsVo> getSamplesDevList(ParamsDto dto);
|
List<ContractsVo> getSamplesDevList(ParamsDto dto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存用户签名
|
||||||
|
* @param userDto
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
|
int updateSign(UserDto userDto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询用户签名
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
String getSign();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ package com.bonus.aqgqj.app.service.impl;
|
||||||
import com.bonus.aqgqj.app.dao.HomeAppDao;
|
import com.bonus.aqgqj.app.dao.HomeAppDao;
|
||||||
import com.bonus.aqgqj.app.entity.AppVersion;
|
import com.bonus.aqgqj.app.entity.AppVersion;
|
||||||
import com.bonus.aqgqj.app.entity.HomeAppVo;
|
import com.bonus.aqgqj.app.entity.HomeAppVo;
|
||||||
|
import com.bonus.aqgqj.app.entity.SamplesManageAppVo;
|
||||||
import com.bonus.aqgqj.app.service.HomeAppService;
|
import com.bonus.aqgqj.app.service.HomeAppService;
|
||||||
import com.bonus.aqgqj.basis.entity.vo.HomeVo;
|
import com.bonus.aqgqj.basis.entity.vo.HomeVo;
|
||||||
import com.bonus.aqgqj.utils.DateTimeHelper;
|
import com.bonus.aqgqj.utils.DateTimeHelper;
|
||||||
|
|
@ -160,4 +161,9 @@ public class HomeAppServiceImpl implements HomeAppService {
|
||||||
public List<AppVersion> getVersion() {
|
public List<AppVersion> getVersion() {
|
||||||
return dao.getVersion();
|
return dao.getVersion();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SamplesManageAppVo> getExpireDataList() {
|
||||||
|
return dao.getExpireDataList();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ import com.bonus.aqgqj.basis.entity.vo.ConfigItemsVo;
|
||||||
import com.bonus.aqgqj.basis.entity.vo.ContractsVo;
|
import com.bonus.aqgqj.basis.entity.vo.ContractsVo;
|
||||||
import com.bonus.aqgqj.basis.service.SamplesManageService;
|
import com.bonus.aqgqj.basis.service.SamplesManageService;
|
||||||
import com.bonus.aqgqj.system.vo.EncryptedReq;
|
import com.bonus.aqgqj.system.vo.EncryptedReq;
|
||||||
|
import com.bonus.aqgqj.system.vo.UserDto;
|
||||||
import com.bonus.aqgqj.utils.*;
|
import com.bonus.aqgqj.utils.*;
|
||||||
import com.bonus.aqgqj.webResult.StringUtils;
|
import com.bonus.aqgqj.webResult.StringUtils;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
@ -332,6 +333,22 @@ public class SamplesManageAppServiceImpl implements SamplesManageAppService {
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int updateSign(UserDto userDto) {
|
||||||
|
return samplesManageAppDao.updateSign(userDto);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getSign() {
|
||||||
|
//获取登录人id
|
||||||
|
Integer userId = Integer.parseInt(UserUtil.getLoginUser().getId().toString());
|
||||||
|
String signImg=samplesManageAppDao.getSign(userId);
|
||||||
|
if (StringUtils.isNotEmpty(signImg)){
|
||||||
|
signImg="statics/"+signImg;
|
||||||
|
}
|
||||||
|
return signImg;
|
||||||
|
}
|
||||||
|
|
||||||
public String handleData(List<String> list) {
|
public String handleData(List<String> list) {
|
||||||
if (CollectionUtils.isEmpty(list)) {
|
if (CollectionUtils.isEmpty(list)) {
|
||||||
return "";
|
return "";
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,27 @@
|
||||||
package com.bonus.aqgqj.basis.controller;
|
package com.bonus.aqgqj.basis.controller;
|
||||||
|
|
||||||
import com.bonus.aqgqj.annotation.DecryptAndVerify;
|
import com.bonus.aqgqj.annotation.DecryptAndVerify;
|
||||||
|
import com.bonus.aqgqj.annotation.LogAnnotation;
|
||||||
|
import com.bonus.aqgqj.basis.entity.dto.SamplesManageDto;
|
||||||
import com.bonus.aqgqj.basis.entity.dto.ToolsManageDto;
|
import com.bonus.aqgqj.basis.entity.dto.ToolsManageDto;
|
||||||
import com.bonus.aqgqj.basis.entity.vo.HomeVo;
|
import com.bonus.aqgqj.basis.entity.vo.HomeVo;
|
||||||
import com.bonus.aqgqj.basis.service.HomeService;
|
import com.bonus.aqgqj.basis.service.HomeService;
|
||||||
|
import com.bonus.aqgqj.model.SysUser;
|
||||||
|
import com.bonus.aqgqj.system.vo.EncryptedReq;
|
||||||
|
import com.bonus.aqgqj.utils.ServerResponse;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -70,4 +79,34 @@ public class HomeController {
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取临期数据
|
||||||
|
*/
|
||||||
|
@PostMapping(value = "getExpireData")
|
||||||
|
@LogAnnotation(operModul = "系统管理-首页", operation = "获取临期数据", operDesc = "业务级事件",operType="查询")
|
||||||
|
public ServerResponse getExpireData() {
|
||||||
|
try {
|
||||||
|
List<SamplesManageDto> list = service.getExpireData();
|
||||||
|
return ServerResponse.createSuccess(list);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error(e.toString(),e);
|
||||||
|
}
|
||||||
|
return ServerResponse.createErroe("操作失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping(value = "getExpireDataList")
|
||||||
|
@DecryptAndVerify(decryptedClass = SamplesManageDto.class)
|
||||||
|
@LogAnnotation(operModul = "系统管理-首页", operation = "获取临期数据列表", operDesc = "业务级事件",operType="查询")
|
||||||
|
public ServerResponse getExpireDataList(EncryptedReq<SamplesManageDto> data) {
|
||||||
|
PageHelper.startPage(data.getData().getPage(), data.getData().getLimit());
|
||||||
|
try {
|
||||||
|
List<SamplesManageDto> list = service.getExpireDataList(data.getData());
|
||||||
|
PageInfo<SamplesManageDto> pageInfo = new PageInfo<>(list);
|
||||||
|
return ServerResponse.createSuccessPage(pageInfo,data.getData().getPage(),data.getData().getLimit());
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error(e.toString(),e);
|
||||||
|
}
|
||||||
|
return ServerResponse.createErrorPage(data.getData().getPage(),data.getData().getLimit());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.bonus.aqgqj.basis.dao;
|
package com.bonus.aqgqj.basis.dao;
|
||||||
|
|
||||||
|
import com.bonus.aqgqj.basis.entity.dto.SamplesManageDto;
|
||||||
import com.bonus.aqgqj.basis.entity.dto.ToolsManageDto;
|
import com.bonus.aqgqj.basis.entity.dto.ToolsManageDto;
|
||||||
import com.bonus.aqgqj.basis.entity.vo.HomeVo;
|
import com.bonus.aqgqj.basis.entity.vo.HomeVo;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
@ -35,4 +36,17 @@ public interface HomeDao {
|
||||||
List<HomeVo> getCostRank(HomeVo vo);
|
List<HomeVo> getCostRank(HomeVo vo);
|
||||||
|
|
||||||
List<HomeVo> getTeams(HomeVo vo);
|
List<HomeVo> getTeams(HomeVo vo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询临期数据
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<SamplesManageDto> getExpireData();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询临期数据
|
||||||
|
* @param data
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<SamplesManageDto> getExpireDataList(SamplesManageDto data);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -184,4 +184,14 @@ public class SamplesManageDto extends PageEntity {
|
||||||
*/
|
*/
|
||||||
private Integer devNum;
|
private Integer devNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据类型
|
||||||
|
*/
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 天数
|
||||||
|
*/
|
||||||
|
private Integer days;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.bonus.aqgqj.basis.service;
|
package com.bonus.aqgqj.basis.service;
|
||||||
|
|
||||||
|
import com.bonus.aqgqj.basis.entity.dto.SamplesManageDto;
|
||||||
import com.bonus.aqgqj.basis.entity.dto.ToolsManageDto;
|
import com.bonus.aqgqj.basis.entity.dto.ToolsManageDto;
|
||||||
import com.bonus.aqgqj.basis.entity.vo.HomeVo;
|
import com.bonus.aqgqj.basis.entity.vo.HomeVo;
|
||||||
|
|
||||||
|
|
@ -35,4 +36,17 @@ public interface HomeService {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Map<String,Object> getCostRank(HomeVo vo);
|
Map<String,Object> getCostRank(HomeVo vo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询临期数据
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<SamplesManageDto> getExpireData();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询临期数据
|
||||||
|
* @param data
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<SamplesManageDto> getExpireDataList(SamplesManageDto data);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package com.bonus.aqgqj.basis.service.impl;
|
||||||
|
|
||||||
import com.bonus.aqgqj.basis.dao.HomeDao;
|
import com.bonus.aqgqj.basis.dao.HomeDao;
|
||||||
import com.bonus.aqgqj.basis.dao.ToolsManageDao;
|
import com.bonus.aqgqj.basis.dao.ToolsManageDao;
|
||||||
|
import com.bonus.aqgqj.basis.entity.dto.SamplesManageDto;
|
||||||
import com.bonus.aqgqj.basis.entity.dto.ToolsManageDto;
|
import com.bonus.aqgqj.basis.entity.dto.ToolsManageDto;
|
||||||
import com.bonus.aqgqj.basis.entity.vo.HomeVo;
|
import com.bonus.aqgqj.basis.entity.vo.HomeVo;
|
||||||
import com.bonus.aqgqj.basis.service.HomeService;
|
import com.bonus.aqgqj.basis.service.HomeService;
|
||||||
|
|
@ -134,4 +135,14 @@ public class HomeServiceImpl implements HomeService {
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SamplesManageDto> getExpireData() {
|
||||||
|
return dao.getExpireData();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SamplesManageDto> getExpireDataList(SamplesManageDto data) {
|
||||||
|
return dao.getExpireDataList(data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -361,7 +361,8 @@ public class UserController {
|
||||||
try {
|
try {
|
||||||
byte[] imageBytes = Base64.decodeBase64(data.getData().getSignImg());
|
byte[] imageBytes = Base64.decodeBase64(data.getData().getSignImg());
|
||||||
String fileName = "sign/"+System.currentTimeMillis()+".jpg";
|
String fileName = "sign/"+System.currentTimeMillis()+".jpg";
|
||||||
File outputFile = new File(SystemUtils.getUploadPath()+fileName); // 指定保存路径
|
// 指定保存路径
|
||||||
|
File outputFile = new File(SystemUtils.getUploadPath()+fileName);
|
||||||
if (!outputFile.getParentFile().exists()){
|
if (!outputFile.getParentFile().exists()){
|
||||||
outputFile.getParentFile().mkdirs();
|
outputFile.getParentFile().mkdirs();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -179,7 +179,7 @@ public interface UserDao {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存用户签字图片
|
* 保存用户签字图片
|
||||||
* @param
|
* @param userDto
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
int updateSign(UserDto userDto);
|
int updateSign(UserDto userDto);
|
||||||
|
|
|
||||||
|
|
@ -102,4 +102,41 @@
|
||||||
WHERE is_active = '1'
|
WHERE is_active = '1'
|
||||||
ORDER BY version + 0 DESC LIMIT 1
|
ORDER BY version + 0 DESC LIMIT 1
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getExpireDataList" resultType="com.bonus.aqgqj.app.entity.SamplesManageAppVo">
|
||||||
|
select *
|
||||||
|
from (SELECT id,
|
||||||
|
dev_type_name as name,
|
||||||
|
dev_module as devModule,
|
||||||
|
'试验样品' as type,
|
||||||
|
next_exper_time as nextExperTime,
|
||||||
|
DATEDIFF(next_exper_time, CURDATE()) AS days
|
||||||
|
FROM tb_exper
|
||||||
|
WHERE next_exper_time = CURDATE() + INTERVAL 60 DAY
|
||||||
|
OR
|
||||||
|
next_exper_time = CURDATE() + INTERVAL 30 DAY
|
||||||
|
OR
|
||||||
|
next_exper_time = CURDATE() + INTERVAL 15 DAY
|
||||||
|
OR
|
||||||
|
next_exper_time = CURDATE() + INTERVAL 0 DAY
|
||||||
|
OR
|
||||||
|
next_exper_time BETWEEN CURDATE()
|
||||||
|
AND CURDATE() + INTERVAL 7 DAY
|
||||||
|
|
||||||
|
UNION
|
||||||
|
|
||||||
|
SELECT dev_id, dev_name as name, dev_module as devModule, '试验设备' as type, contract_date as nextExperTime, DATEDIFF(contract_date, CURDATE()) AS days
|
||||||
|
FROM tb_exper_device
|
||||||
|
WHERE contract_date = CURDATE() + INTERVAL 60 DAY
|
||||||
|
OR
|
||||||
|
contract_date = CURDATE() + INTERVAL 30 DAY
|
||||||
|
OR
|
||||||
|
contract_date = CURDATE() + INTERVAL 15 DAY
|
||||||
|
OR
|
||||||
|
contract_date = CURDATE() + INTERVAL 0 DAY
|
||||||
|
OR
|
||||||
|
contract_date BETWEEN CURDATE()
|
||||||
|
AND CURDATE() + INTERVAL 7 DAY) aa
|
||||||
|
where 1=1
|
||||||
|
order by days asc
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -74,7 +74,14 @@
|
||||||
update_user = #{updateBy}
|
update_user = #{updateBy}
|
||||||
WHERE id = #{id}
|
WHERE id = #{id}
|
||||||
</update>
|
</update>
|
||||||
<delete id="delSamplesDetailsList">
|
|
||||||
|
<update id="updateSign">
|
||||||
|
update sys_user
|
||||||
|
set sign_img = #{signImg}
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="delSamplesDetailsList">
|
||||||
UPDATE tb_sample_device
|
UPDATE tb_sample_device
|
||||||
SET del_falg = '1',
|
SET del_falg = '1',
|
||||||
update_time = NOW(),
|
update_time = NOW(),
|
||||||
|
|
@ -313,4 +320,10 @@
|
||||||
LEFT JOIN tb_sample ts ON ts.id = tsd.sample_id AND ts.del_flag = 0
|
LEFT JOIN tb_sample ts ON ts.id = tsd.sample_id AND ts.del_flag = 0
|
||||||
WHERE tsd.sample_id = #{params.id} AND tsd.dev_type_code = #{devCode} AND tsd.del_falg = 0
|
WHERE tsd.sample_id = #{params.id} AND tsd.dev_type_code = #{devCode} AND tsd.del_falg = 0
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getSign" resultType="java.lang.String">
|
||||||
|
SELECT sign_img
|
||||||
|
FROM sys_user
|
||||||
|
WHERE id = #{id}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -81,4 +81,88 @@
|
||||||
cc.totalCost DESC
|
cc.totalCost DESC
|
||||||
LIMIT 5
|
LIMIT 5
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getExpireData" resultType="com.bonus.aqgqj.basis.entity.dto.SamplesManageDto">
|
||||||
|
SELECT id,
|
||||||
|
dev_type_name as name,
|
||||||
|
dev_module as devModule,
|
||||||
|
'试验样品' as type,
|
||||||
|
next_exper_time as nextExperTime,
|
||||||
|
DATEDIFF(next_exper_time, CURDATE()) AS days
|
||||||
|
FROM tb_exper
|
||||||
|
WHERE next_exper_time = CURDATE() + INTERVAL 60 DAY
|
||||||
|
OR
|
||||||
|
next_exper_time = CURDATE() + INTERVAL 30 DAY
|
||||||
|
OR
|
||||||
|
next_exper_time = CURDATE() + INTERVAL 15 DAY
|
||||||
|
OR
|
||||||
|
next_exper_time = CURDATE() + INTERVAL 0 DAY
|
||||||
|
OR
|
||||||
|
next_exper_time BETWEEN CURDATE()
|
||||||
|
AND CURDATE() + INTERVAL 7 DAY
|
||||||
|
|
||||||
|
UNION
|
||||||
|
|
||||||
|
SELECT dev_id,
|
||||||
|
dev_name as name,
|
||||||
|
dev_module as devModule,
|
||||||
|
'试验设备' as type,
|
||||||
|
contract_date as nextExperTime,
|
||||||
|
DATEDIFF(contract_date, CURDATE()) AS days
|
||||||
|
FROM tb_exper_device
|
||||||
|
WHERE contract_date = CURDATE() + INTERVAL 60 DAY
|
||||||
|
OR
|
||||||
|
contract_date = CURDATE() + INTERVAL 30 DAY
|
||||||
|
OR
|
||||||
|
contract_date = CURDATE() + INTERVAL 15 DAY
|
||||||
|
OR
|
||||||
|
contract_date = CURDATE() + INTERVAL 0 DAY
|
||||||
|
OR
|
||||||
|
contract_date BETWEEN CURDATE()
|
||||||
|
AND CURDATE() + INTERVAL 7 DAY
|
||||||
|
</select>
|
||||||
|
<select id="getExpireDataList" resultType="com.bonus.aqgqj.basis.entity.dto.SamplesManageDto">
|
||||||
|
select *
|
||||||
|
from (SELECT id,
|
||||||
|
dev_type_name as name,
|
||||||
|
dev_module as devModule,
|
||||||
|
'试验样品' as type,
|
||||||
|
next_exper_time as nextExperTime,
|
||||||
|
DATEDIFF(next_exper_time, CURDATE()) AS days
|
||||||
|
FROM tb_exper
|
||||||
|
WHERE next_exper_time = CURDATE() + INTERVAL 60 DAY
|
||||||
|
OR
|
||||||
|
next_exper_time = CURDATE() + INTERVAL 30 DAY
|
||||||
|
OR
|
||||||
|
next_exper_time = CURDATE() + INTERVAL 15 DAY
|
||||||
|
OR
|
||||||
|
next_exper_time = CURDATE() + INTERVAL 0 DAY
|
||||||
|
OR
|
||||||
|
next_exper_time BETWEEN CURDATE()
|
||||||
|
AND CURDATE() + INTERVAL 7 DAY
|
||||||
|
|
||||||
|
UNION
|
||||||
|
|
||||||
|
SELECT dev_id, dev_name as name, dev_module as devModule, '试验设备' as type, contract_date as nextExperTime, DATEDIFF(contract_date, CURDATE()) AS days
|
||||||
|
FROM tb_exper_device
|
||||||
|
WHERE contract_date = CURDATE() + INTERVAL 60 DAY
|
||||||
|
OR
|
||||||
|
contract_date = CURDATE() + INTERVAL 30 DAY
|
||||||
|
OR
|
||||||
|
contract_date = CURDATE() + INTERVAL 15 DAY
|
||||||
|
OR
|
||||||
|
contract_date = CURDATE() + INTERVAL 0 DAY
|
||||||
|
OR
|
||||||
|
contract_date BETWEEN CURDATE()
|
||||||
|
AND CURDATE() + INTERVAL 7 DAY) aa
|
||||||
|
where 1=1
|
||||||
|
<if test="name != null and name != ''">
|
||||||
|
and (
|
||||||
|
name like concat('%',#{name},'%') or
|
||||||
|
devModule like concat('%',#{name},'%') or
|
||||||
|
type like concat('%',#{name},'%')
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
order by days asc
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -100,8 +100,11 @@
|
||||||
<script type="text/javascript" src="js/libs/jquery-3.7.0.min.js"></script>
|
<script type="text/javascript" src="js/libs/jquery-3.7.0.min.js"></script>
|
||||||
<script type="text/javascript" src="js/jq.js"></script>
|
<script type="text/javascript" src="js/jq.js"></script>
|
||||||
<script type="text/javascript" src="js/publicJs.js"></script>
|
<script type="text/javascript" src="js/publicJs.js"></script>
|
||||||
|
<script type="text/javascript" src="js/my/aes.js"></script>
|
||||||
|
<script type="text/javascript" src="js/ajaxRequest.js"></script>
|
||||||
<script type="text/javascript" src="js/main.js"></script>
|
<script type="text/javascript" src="js/main.js"></script>
|
||||||
<script type="text/javascript" src="js/openIframe.js"></script>
|
<script type="text/javascript" src="js/openIframe.js"></script>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,294 @@
|
||||||
|
let form, layer, dtree, table, tableIns;
|
||||||
|
let pageNum = 1, limitSize = 10; // 默认第一页,分页数量为10
|
||||||
|
let orgData,selectOrgId="";
|
||||||
|
|
||||||
|
layui.config({
|
||||||
|
base: "../js/layui-v2.6.8/dtree/", //此处路径请自行处理, 可以使用绝对路径
|
||||||
|
}).extend({
|
||||||
|
dtree: 'dtree'
|
||||||
|
}).use(['form', 'layer', 'table','dtree', 'laydate'], function () {
|
||||||
|
form = layui.form;
|
||||||
|
layer = layui.layer;
|
||||||
|
table = layui.table;
|
||||||
|
dtree = layui.dtree;
|
||||||
|
layui.form.render();
|
||||||
|
orgData = getOrgTree();
|
||||||
|
pages(1, 10, 1);
|
||||||
|
})
|
||||||
|
|
||||||
|
function pages(pageNum, pageSize, typeNum) {
|
||||||
|
let params = getReqParams(pageNum, pageSize, typeNum);
|
||||||
|
let url = dataUrl + "/home/getExpireDataList"
|
||||||
|
ajaxRequest(url, "POST", params, true, function () {
|
||||||
|
}, function (result) {
|
||||||
|
console.log(result);
|
||||||
|
if (result.code === 200) {
|
||||||
|
if (result.data) {
|
||||||
|
initTable(result.data, result.limit, result.curr)
|
||||||
|
laypages(result.count, result.curr, result.limit)
|
||||||
|
}
|
||||||
|
} else if (result.code === 500) {
|
||||||
|
layer.alert(result.msg, {icon: 2})
|
||||||
|
}
|
||||||
|
}, function (xhr) {
|
||||||
|
error(xhr)
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function laypages(total, page, limit) {
|
||||||
|
layui.use(['laypage'], function () {
|
||||||
|
let laypage = layui.laypage;
|
||||||
|
laypage.render({
|
||||||
|
elem: 'voi-page',
|
||||||
|
count: total,
|
||||||
|
curr: page,
|
||||||
|
limit: limit,
|
||||||
|
limits: [10, 20, 50, 100, 200, 500],
|
||||||
|
layout: ['prev', 'page', 'next', 'skip', 'count', 'limit'],
|
||||||
|
groups: 5,
|
||||||
|
jump: function (obj, first) {
|
||||||
|
if (!first) {
|
||||||
|
pageNum = obj.curr, limitSize = obj.limit;
|
||||||
|
pages(obj.curr, obj.limit, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/*初始化表格*/
|
||||||
|
function initTable(dataList, limit, page) {
|
||||||
|
let loadingMsg = layer.msg("数据加载中,请稍候...", {icon: 16, scrollbar: false, time: 0,});
|
||||||
|
tableIns = table.render({
|
||||||
|
elem: "#table_data",
|
||||||
|
height: "full-130",
|
||||||
|
data: dataList,
|
||||||
|
limit: limit,
|
||||||
|
cols: [
|
||||||
|
[
|
||||||
|
//表头
|
||||||
|
{title: "序号", width: 80, unresize: true, align: "center",
|
||||||
|
templet: function (d) {
|
||||||
|
return (page - 1) * limit + d.LAY_INDEX;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{field: "name", title: "名称", unresize: true, align: "center"},
|
||||||
|
{field: "devModule", title: "规格型号", unresize: true, align: "center"},
|
||||||
|
{field: "type", title: "类型", unresize: true, align: "center"},
|
||||||
|
{field: "nextExperTime", title: "到期时间", unresize: true, align: "center"},
|
||||||
|
{field: "days", title: "到期天数", unresize: true, align: "center",templet: function (d) {
|
||||||
|
var days = d.days;
|
||||||
|
return html='<span style="color: #FF5722;">'+days+'</span>';haode
|
||||||
|
}},
|
||||||
|
],
|
||||||
|
],
|
||||||
|
done: function (res, curr, count) {
|
||||||
|
layer.close(loadingMsg);
|
||||||
|
table.resize("table_data");
|
||||||
|
count || this.elem.next(".layui-table-view").find(".layui-table-header").css("display", "inline-block");
|
||||||
|
count || this.elem.next(".layui-table-view").find(".layui-table-box").css("overflow", "auto");
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取参数
|
||||||
|
function getReqParams(page, limit, type) {
|
||||||
|
let obj = {};
|
||||||
|
if (!type) {
|
||||||
|
obj = {
|
||||||
|
page: page + "",
|
||||||
|
limit: limit + "",
|
||||||
|
name: $('#name').val(),
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
obj = {
|
||||||
|
page: '1',
|
||||||
|
limit: '10',
|
||||||
|
name: '',
|
||||||
|
};
|
||||||
|
}
|
||||||
|
console.log(obj)
|
||||||
|
obj={
|
||||||
|
encryptedData:encryptCBC(JSON.stringify(obj))
|
||||||
|
}
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询/重置
|
||||||
|
function query(type) {
|
||||||
|
let pattern = new RegExp("[%_<>]");
|
||||||
|
if (pattern.test($("#loginName").val())) {
|
||||||
|
$("#loginName").val('');
|
||||||
|
return layer.msg('用户名查询包含特殊字符,请重新输入', {
|
||||||
|
icon: 2,
|
||||||
|
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (pattern.test($("#phone").val())) {
|
||||||
|
$("#phone").val('');
|
||||||
|
return layer.msg('手机号查询包含特殊字符,请重新输入', {
|
||||||
|
icon: 2,
|
||||||
|
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
pageNum = 1;
|
||||||
|
pages(1, limitSize);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//重置
|
||||||
|
function reset() {
|
||||||
|
pages(1, limitSize, 1)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function reloadData() {
|
||||||
|
pages(pageNum, limitSize);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增/修改平台用户
|
||||||
|
function addData(id) {
|
||||||
|
let title = '签字维护'
|
||||||
|
let param = {
|
||||||
|
'id': id
|
||||||
|
}
|
||||||
|
openIframe2("addOrEditUser", title, "signatureBoard.html", '50%', '70%', param);
|
||||||
|
}
|
||||||
|
|
||||||
|
function addDataTemp(id) {
|
||||||
|
let title = '新增用户'
|
||||||
|
let param = {
|
||||||
|
'id': id
|
||||||
|
}
|
||||||
|
openIframe2("addOrEditUserTemp", title, "signatureBoard.html", '1000px', '625px', param);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*删除用户*/
|
||||||
|
function delData(id) {
|
||||||
|
layer.confirm("确定删除签名吗?", {
|
||||||
|
move: false
|
||||||
|
}, function () {
|
||||||
|
let loadingMsg = layer.msg('数据删除中,请稍候...', {icon: 16, scrollbar: false, time: 0});
|
||||||
|
let url = dataUrl + "/users/delSignById";
|
||||||
|
let params = {
|
||||||
|
'id': id
|
||||||
|
}
|
||||||
|
params={
|
||||||
|
encryptedData:encryptCBC(JSON.stringify(params))
|
||||||
|
}
|
||||||
|
ajaxRequest(url, "POST", params, true, function () {
|
||||||
|
}, function (result) {
|
||||||
|
layer.close(loadingMsg); // 关闭提示层
|
||||||
|
if (result.code === 200) {
|
||||||
|
parent.layer.msg(result.msg, {icon: 1})
|
||||||
|
query()
|
||||||
|
} else if (result.code === 500) {
|
||||||
|
layer.alert(result.msg, {icon: 2})
|
||||||
|
}
|
||||||
|
}, function (xhr) {
|
||||||
|
layer.close(loadingMsg); // 关闭提示层
|
||||||
|
error(xhr)
|
||||||
|
});
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 启用/停用/解除锁定
|
||||||
|
function editUserAccountStatus(id, status, type) {
|
||||||
|
let url = dataUrl + "/sys/user/editUserAccountStatus?token=" + token;
|
||||||
|
let params = {
|
||||||
|
'id': id,
|
||||||
|
'accountStatus': status,
|
||||||
|
'type': type
|
||||||
|
}
|
||||||
|
ajaxRequest(url, "POST", params, true, function () {
|
||||||
|
}, function (result) {
|
||||||
|
if (result.code === 200) {
|
||||||
|
if(type){
|
||||||
|
reloadData();
|
||||||
|
}
|
||||||
|
parent.layer.msg(result.msg, {icon: 1})
|
||||||
|
} else if (result.code === 500) {
|
||||||
|
layer.alert(result.msg, {icon: 2})
|
||||||
|
}
|
||||||
|
}, function (xhr) {
|
||||||
|
error(xhr)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 管理员修改密码
|
||||||
|
function resetPwd(id) {
|
||||||
|
let param = {
|
||||||
|
'id': id,
|
||||||
|
'type': '1'
|
||||||
|
}
|
||||||
|
openIframe2("addOrEditUnifyUser", '修改密码', "password.html", '770px', '400px', param);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getOrgTree() {
|
||||||
|
let data = [];
|
||||||
|
let url = dataUrl + '/sys/org/getOrgTree';
|
||||||
|
ajaxRequest(url, "POST", null, false, function () {
|
||||||
|
}, function (result) {
|
||||||
|
if (result.code === 200) {
|
||||||
|
console.log(result,"getOrgTree")
|
||||||
|
data = result.data;
|
||||||
|
setOrgTree(data)
|
||||||
|
} else {
|
||||||
|
layer.alert(result.msg, {icon: 2})
|
||||||
|
}
|
||||||
|
}, function (xhr) {
|
||||||
|
error(xhr)
|
||||||
|
});
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
function setOrgTree(data){
|
||||||
|
console.log("data",data)
|
||||||
|
var af=0,bf=0;
|
||||||
|
$.each(data, function (i, item) {
|
||||||
|
if(item.id==0){
|
||||||
|
item.id="99999";
|
||||||
|
item.parentId="0";
|
||||||
|
item.title="请选择组织机构";
|
||||||
|
af=1;
|
||||||
|
}
|
||||||
|
if(item.id==1){
|
||||||
|
item.parentId="99999";
|
||||||
|
bf=1;
|
||||||
|
}
|
||||||
|
if(af==1&&bf==1){
|
||||||
|
return
|
||||||
|
}
|
||||||
|
})
|
||||||
|
orgTree =dtree.renderSelect({
|
||||||
|
elem: "#orgId",
|
||||||
|
width: "100%", // 指定树的宽度
|
||||||
|
dataFormat: "list",
|
||||||
|
selectInitVal: null,
|
||||||
|
selectTips: "请选择组织机构",
|
||||||
|
data: data,
|
||||||
|
line: true, // 显示树线
|
||||||
|
skin: "laySimple",
|
||||||
|
done: function (result, $ul, first) {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
dtree.on('node(orgId)', function (obj) {
|
||||||
|
console.log("obj.param.nodeId",obj.param.nodeId); // 打印选中节点的值
|
||||||
|
if(obj.param.nodeId=="99999"){
|
||||||
|
selectOrgId="";
|
||||||
|
}else{
|
||||||
|
selectOrgId=obj.param.nodeId;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/*下拉选表单赋值*/
|
||||||
|
function setSelectValue(list, selectName) {
|
||||||
|
let html = '<option value="" selected>单位部门</option>';
|
||||||
|
$.each(list, function (index, item) {
|
||||||
|
html += '<option value="' + item.id + '">' + item.name + '</option>';
|
||||||
|
})
|
||||||
|
$('#' + selectName).empty().append(html);
|
||||||
|
layui.form.render();
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,37 @@
|
||||||
let urlIds=new Array();
|
let urlIds=new Array();
|
||||||
initMenu();
|
initMenu();
|
||||||
initsy();
|
initsy();
|
||||||
|
getExpireData();
|
||||||
|
|
||||||
|
function getExpireData(){
|
||||||
|
let url = dataUrl + "/home/getExpireData";
|
||||||
|
ajaxRequest(url, "POST", null, true, function () {
|
||||||
|
}, function (result) {
|
||||||
|
if (result.status === 200) {
|
||||||
|
setExpireData(result.data);
|
||||||
|
} else if (result.status === 500) {
|
||||||
|
layer.alert(result.msg, {icon: 2,move:false})
|
||||||
|
}
|
||||||
|
}, function (xhr) {
|
||||||
|
error(xhr)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function setExpireData(data){
|
||||||
|
console.log(data)
|
||||||
|
console.log(data.length)
|
||||||
|
if (data.length>0){
|
||||||
|
layer.open({
|
||||||
|
type: 2, // 表示iframe层
|
||||||
|
title: '临期数据',
|
||||||
|
content: 'pages/expireDataList.html?l=' + localStorage.getItem("lang") + '&token=' + localStorage.getItem("token"),
|
||||||
|
area: ['800px', '600px'], // 宽高
|
||||||
|
success: function(layero, index){
|
||||||
|
// 可以在这里做一些操作,比如监听iframe内部的事件
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
function initMenu(){
|
function initMenu(){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: ctxPath + "/permissions/current",
|
url: ctxPath + "/permissions/current",
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<link rel="stylesheet" href="../js/layui-v2.6.8/css/layui.css" media="all">
|
||||||
|
<link rel="stylesheet" href="../js/layui-v2.6.8/dtree/dtree.css">
|
||||||
|
<link rel="stylesheet" href="../js/layui-v2.6.8/dtree/font/dtreefont.css">
|
||||||
|
<link rel="stylesheet" href="../css/table-common2.css">
|
||||||
|
<script src="../js/libs/jquery-3.7.0.min.js" charset="UTF-8" type="text/javascript"></script>
|
||||||
|
<script src="../js/layui-v2.6.8/layui.js" charset="UTF-8" type="text/javascript"></script>
|
||||||
|
<script src="../js/publicJs.js"></script>
|
||||||
|
<script src="../js/commonUtils.js"></script>
|
||||||
|
<script src="../js/openIframe.js"></script>
|
||||||
|
<script src="../js/my/aes.js"></script>
|
||||||
|
<script src="../js/ajaxRequest.js"></script>
|
||||||
|
<title>临期数据</title>
|
||||||
|
<style>
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="content">
|
||||||
|
<div class="basic-search-box layout">
|
||||||
|
<form class="layui-form basic-form" onsubmit="return false;">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<div class="layui-inline" style="padding: 0 0 0 10px;">
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<input type="text" id="name" maxlength="30" class="layui-input" autocomplete="off" placeholder="请输入关键字">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="layui-inline btns">
|
||||||
|
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm btn-1" onclick="query(1)">查询
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="table-box" table-responsive style="z-index: 1;">
|
||||||
|
<table id="table_data" class="table" lay-filter="table_data"></table>
|
||||||
|
<div id="voi-page" class="layout"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
<style>
|
||||||
|
.layui-table-init {
|
||||||
|
background-color: transparent !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<script src="../js/expireDataList.js" charset="UTF-8" type="text/javascript"></script>
|
||||||
|
</html>
|
||||||
Loading…
Reference in New Issue