Commit b55e74d3 by wangjian

2026-02-27

parent 222f2496
...@@ -3,8 +3,15 @@ package com.qianhe.web.controller.system; ...@@ -3,8 +3,15 @@ package com.qianhe.web.controller.system;
import cn.hutool.http.HttpRequest; import cn.hutool.http.HttpRequest;
import com.alibaba.fastjson2.JSONArray; import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject; import com.alibaba.fastjson2.JSONObject;
import com.google.gson.Gson;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.qianhe.common.constant.Constants; import com.qianhe.common.constant.Constants;
import com.qianhe.common.core.domain.AjaxResult; import com.qianhe.common.core.domain.AjaxResult;
import com.qianhe.common.core.domain.entity.SysUser;
import com.qianhe.common.utils.DateUtils;
import com.qianhe.common.utils.StringUtils;
import com.qianhe.common.utils.ip.IpUtils;
import com.qianhe.framework.web.service.SysLoginService; import com.qianhe.framework.web.service.SysLoginService;
import com.qianhe.system.mapper.SysUserMapper; import com.qianhe.system.mapper.SysUserMapper;
import com.qianhe.system.service.ISysUserService; import com.qianhe.system.service.ISysUserService;
...@@ -19,8 +26,14 @@ import org.springframework.web.bind.annotation.ResponseBody; ...@@ -19,8 +26,14 @@ import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Base64; import java.util.Base64;
import java.util.HashMap; import java.util.HashMap;
import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
...@@ -79,6 +92,65 @@ public class SiamloginController { ...@@ -79,6 +92,65 @@ public class SiamloginController {
JwtToken = loginService.loginSam(login_name,"gfjsmm3@5"); JwtToken = loginService.loginSam(login_name,"gfjsmm3@5");
tzlx="1"; tzlx="1";
//集成登录日志
SysUser u = userService.selectUserByUserName(login_name);
String name = u.getNickName();//姓名
String deptFullName = "/中国石化/胜利油田/胜利石油管理局有限公司/供水分公司/管理部门/经营管理部(三基工作办公/";
// String orgName = "供水分公司";
// String dptName = "管理部门";
// if("zhangshy819".equals(uid)) {
// deptFullName = "/中国石化/胜利油田/胜利油田分公司/数智化管理服务中心/保障服务系统/软件研发服务部/";
// orgName = "数智化管理服务中心";
// dptName = "保障服务系统";
// }
List values = ssoPrincipal.getValueAsList("spOrgNamePath");
StringBuffer vbuf = new StringBuffer();
for(int j = 0; values != null && j < values.size(); ++j) {
Object value = values.get(j);
vbuf.append(value.toString());
if (j < values.size() - 1) {
vbuf.append(',');
}
}
deptFullName = vbuf.toString(); //获取单位全程
// if(StringUtils.isNotEmpty(deptFullName)){
// String[] split = deptFullName.split("/");
// if(split.length > 3){
// orgName = split[3];
// }
// if(split.length > 4){
// dptName = split[4];
// }
// }
System.out.println(" == 姓名 ==" + name);
System.out.println(" == Uid ==" + uid);
System.out.println(" == 单位 ==" + values);
System.out.println(" == 单位 ==" + deptFullName);
u.setRemark(deptFullName);
userService.updateUserRemark(u);//只更新 备注 存统一单位信息
Map<String, Object> map1 = new HashMap<>();
map1.put("UserName", name);
map1.put("Uid", uid);
// map1.put("age", 30);
map1.put("DateTime", DateUtils.getTime());
// map1.put("OrgName", orgName);
// map1.put("DeptName", dptName);
map1.put("DeptFullName", deptFullName);
map1.put("isStudent", false);
map1.put("Type", "登录");
map1.put("Status", "成功");
try {
JsonObject jsonObject = sendSysLog("LoginLog", map1);
System.out.println(" == 结果 ==" + jsonObject.getAsJsonObject());
//获取日志
JsonObject sysLog = getSysLog();
} catch (Exception e) {
e.printStackTrace();
}
} }
} }
// } // }
...@@ -95,6 +167,95 @@ public class SiamloginController { ...@@ -95,6 +167,95 @@ public class SiamloginController {
} }
/**
* 发送日志请求
* @param tag 日志类型(LoginLog、UserOpeLog、ErrorLog、IServiceLog、ComponentOpeLog、DBOpeLog、BusinessLog)
* @param map 日志内容
*/
public JsonObject sendSysLog(String tag, Map<String,Object> map) throws Exception {
//本地ip
// String ip = IpUtils.getHostIp();
//客户端ip
String ip = IpUtils.getIpAddr();
String url="http://api.ssco.sinopec.com/PUBService.log.transferLogs?appname=APP_SLYT_SJGLXT&tag="+tag+"&hostname=" + ip;
Gson gson = new Gson();
String input = gson.toJson(map);
URL targetUrl = new URL(url);
HttpURLConnection httpConnection = (HttpURLConnection) targetUrl.openConnection();
httpConnection.setDoOutput(true);
httpConnection.setRequestMethod("POST");
httpConnection.setRequestProperty("Content-Type", "application/json; charset=UTF-8;");
httpConnection.setRequestProperty("X-Ca-API-Key", "ee8d6cdbda2548f391a4b9389718abf7");
OutputStream outputStream = httpConnection.getOutputStream();
outputStream.write(input.getBytes("UTF-8"));
outputStream.flush();
if (httpConnection.getResponseCode() != 200) {
throw new RuntimeException("Failed : HTTP error code : "
+ httpConnection.getResponseCode());
}
InputStream inputStream = httpConnection.getInputStream();
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
byte[] data = new byte[1024];
int bytesRead;
while ((bytesRead = inputStream.read(data, 0, data.length)) != -1) {
buffer.write(data, 0, bytesRead);
}
buffer.flush();
byte[] binaryData = buffer.toByteArray();
// 将二进制数据转换为字符串(假设是 UTF-8 编码的 JSON)
String jsonString = new String(binaryData, "UTF-8");
// 使用 Gson 解析 JSON 字符串
JsonObject jsonObject = JsonParser.parseString(jsonString).getAsJsonObject();
System.out.println(jsonObject);
httpConnection.disconnect();
return jsonObject;
}
/**
* 获取日志
*/
public static JsonObject getSysLog() throws Exception {
String apiUrl = "http://api.ssco.sinopec.com/api/v2/search/sheets/";
String query = "appname:APP_SLYT_SJGLXT";
String timeRange = "-1h,now";
boolean timeline = false;
String searchMode = "simple";
String url = apiUrl + "?query=" + query
+ "&time_range=" + timeRange
+ "&timeline=" + timeline
+ "&searchMode=" + searchMode;
URL targetUrl = new URL(url);
HttpURLConnection httpConnection = (HttpURLConnection) targetUrl.openConnection();
httpConnection.setRequestMethod("GET");
httpConnection.setRequestProperty("X-Ca-API-Key", "ee8d6cdbda2548f391a4b9389718abf7");
httpConnection.setRequestProperty("Authorization","apikey lih2365:OYeEzLnOZiSPTNlKouAgeEQuTsokAvLA");
if (httpConnection.getResponseCode() != 200) {
throw new RuntimeException("Failed : HTTP error code : "
+ httpConnection.getResponseCode());
}
InputStream inputStream = httpConnection.getInputStream();
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
byte[] data = new byte[1024];
int bytesRead;
while ((bytesRead = inputStream.read(data, 0, data.length)) != -1) {
buffer.write(data, 0, bytesRead);
}
buffer.flush();
byte[] binaryData = buffer.toByteArray();
// 将二进制数据转换为字符串(假设是 UTF-8 编码的 JSON)
String jsonString = new String(binaryData, "UTF-8");
// 使用 Gson 解析 JSON 字符串
JsonObject jsonObject = JsonParser.parseString(jsonString).getAsJsonObject();
httpConnection.disconnect();
return jsonObject;
}
......
...@@ -6,12 +6,15 @@ spring: ...@@ -6,12 +6,15 @@ spring:
druid: druid:
# 主库数据源 # 主库数据源
master: master:
# url: jdbc:mysql://1.116.38.25:3986/qianhe_ydsj?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&useOldAliasMetadataBehavior=true&allowMultiQueries=true # url: jdbc:mysql://127.0.0.1:3306/qianhe_ydsj?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&useOldAliasMetadataBehavior=true&allowMultiQueries=true
# username: root # username: root
# password: qianhe2022 # password: Qwe123456
url: jdbc:mysql://192.168.31.167:3306/qianhe_ydsj?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&useOldAliasMetadataBehavior=true&allowMultiQueries=true url: jdbc:mysql://192.168.31.167:3306/qianhe_ydsj?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&useOldAliasMetadataBehavior=true&allowMultiQueries=true
username: root username: root
password: qianhe2024 password: qianhe2024
# url: jdbc:mysql://rm-2zert6y5n3f3499g6fo.mysql.rds.aliyuncs.com:3306/qianhe_ydsj?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&useOldAliasMetadataBehavior=true&allowMultiQueries=true
# username: qianheadmin
# password: gD5qY4oQ1hN8tQ6nS0fQ6tN7
# 从库数据源 # 从库数据源
slave: slave:
# 从数据源开关/默认关闭 # 从数据源开关/默认关闭
......
...@@ -18,7 +18,7 @@ ruoyi: ...@@ -18,7 +18,7 @@ ruoyi:
# 开发环境配置 # 开发环境配置
server: server:
# 服务器的HTTP端口,默认为8080 # 服务器的HTTP端口,默认为8080
port: 8899 port: 9033
servlet: servlet:
# 应用的访问路径 # 应用的访问路径
context-path: / context-path: /
...@@ -69,21 +69,21 @@ spring: ...@@ -69,21 +69,21 @@ spring:
enabled: true enabled: true
# redis 配置 # redis 配置
redis: redis:
# # 地址
# host: 127.0.0.1
# # 端口,默认为6379
# port: 6379
# # 数据库索引
# database: 0
# # 密码
# password:
# 地址 # 地址
host: 192.168.31.167 # host: 127.0.0.1
# 端口,默认为6379 # 端口,默认为6379
port: 6379 # port: 34597
# 数据库索引 # 数据库索引
database: 3 # database: 3
# 密码 # 密码
# password: readminre@321
# # 地址
host: 192.168.31.167
# # 端口,默认为6379
port: 6379
# # 数据库索引
database: 3
# # 密码
password: qianhe2024 password: qianhe2024
# 连接超时时间 # 连接超时时间
timeout: 10s timeout: 10s
...@@ -105,7 +105,7 @@ token: ...@@ -105,7 +105,7 @@ token:
# 令牌密钥 # 令牌密钥
secret: abcdefghijklmnopqrstuvwxyz secret: abcdefghijklmnopqrstuvwxyz
# 令牌有效期(默认30分钟) # 令牌有效期(默认30分钟)
expireTime: 30 expireTime: 3000
# MyBatis配置 # MyBatis配置
mybatis: mybatis:
......
...@@ -68,6 +68,7 @@ public interface SysUserMapper ...@@ -68,6 +68,7 @@ public interface SysUserMapper
* @return 结果 * @return 结果
*/ */
public int updateUser(SysUser user); public int updateUser(SysUser user);
public int updateUserRemark(SysUser user);
/** /**
* 修改用户头像 * 修改用户头像
......
...@@ -127,6 +127,7 @@ public interface ISysUserService ...@@ -127,6 +127,7 @@ public interface ISysUserService
* @return 结果 * @return 结果
*/ */
public int updateUser(SysUser user); public int updateUser(SysUser user);
public int updateUserRemark(SysUser user);
/** /**
* 用户授权角色 * 用户授权角色
......
...@@ -325,6 +325,11 @@ public class SysUserServiceImpl implements ISysUserService ...@@ -325,6 +325,11 @@ public class SysUserServiceImpl implements ISysUserService
{ {
return userMapper.updateUser(user); return userMapper.updateUser(user);
} }
@Override
public int updateUserRemark(SysUser user)
{
return userMapper.updateUserRemark(user);
}
/** /**
* 修改用户基本信息 * 修改用户基本信息
......
...@@ -202,6 +202,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -202,6 +202,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="updateUserStatus" parameterType="SysUser"> <update id="updateUserStatus" parameterType="SysUser">
update sys_user set status = #{status} where user_id = #{userId} update sys_user set status = #{status} where user_id = #{userId}
</update> </update>
<update id="updateUserRemark" parameterType="SysUser">
update sys_user set remark = #{remark} where user_id = #{userId}
</update>
<update id="updateUserAvatar" parameterType="SysUser"> <update id="updateUserAvatar" parameterType="SysUser">
update sys_user set avatar = #{avatar} where user_name = #{userName} update sys_user set avatar = #{avatar} where user_name = #{userName}
......
...@@ -3,8 +3,11 @@ package com.qianhe.controller; ...@@ -3,8 +3,11 @@ package com.qianhe.controller;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.qianhe.common.core.domain.entity.SysUser;
import com.qianhe.common.utils.SecurityUtils;
import com.qianhe.domain.JygxCljwh; import com.qianhe.domain.JygxCljwh;
import com.qianhe.service.IJygxCljwhService; import com.qianhe.service.IJygxCljwhService;
import com.qianhe.util.LogUtil;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
...@@ -43,6 +46,11 @@ public class JygxCljwhController extends BaseController ...@@ -43,6 +46,11 @@ public class JygxCljwhController extends BaseController
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(JygxCljwh jygxCljwh) public TableDataInfo list(JygxCljwh jygxCljwh)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "经验交流共享", "经验交流共享-友情链接", "查询友情链接", "查询");
startPage(); startPage();
List<JygxCljwh> list = jygxCljwhService.selectJygxCljwhList(jygxCljwh); List<JygxCljwh> list = jygxCljwhService.selectJygxCljwhList(jygxCljwh);
return getDataTable(list); return getDataTable(list);
...@@ -68,6 +76,11 @@ public class JygxCljwhController extends BaseController ...@@ -68,6 +76,11 @@ public class JygxCljwhController extends BaseController
@GetMapping(value = "/{cljid}") @GetMapping(value = "/{cljid}")
public AjaxResult getInfo(@PathVariable("cljid") Long cljid) public AjaxResult getInfo(@PathVariable("cljid") Long cljid)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "经验交流共享", "经验交流共享-友情链接", "查询友情链接", "查询");
return success(jygxCljwhService.selectJygxCljwhByCljid(cljid)); return success(jygxCljwhService.selectJygxCljwhByCljid(cljid));
} }
...@@ -79,6 +92,11 @@ public class JygxCljwhController extends BaseController ...@@ -79,6 +92,11 @@ public class JygxCljwhController extends BaseController
@PostMapping @PostMapping
public AjaxResult add(@RequestBody JygxCljwh jygxCljwh) public AjaxResult add(@RequestBody JygxCljwh jygxCljwh)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "经验交流共享", "经验交流共享-友情链接", "新增友情链接", "新增");
return toAjax(jygxCljwhService.insertJygxCljwh(jygxCljwh)); return toAjax(jygxCljwhService.insertJygxCljwh(jygxCljwh));
} }
...@@ -90,6 +108,11 @@ public class JygxCljwhController extends BaseController ...@@ -90,6 +108,11 @@ public class JygxCljwhController extends BaseController
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody JygxCljwh jygxCljwh) public AjaxResult edit(@RequestBody JygxCljwh jygxCljwh)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "经验交流共享", "经验交流共享-友情链接", "修改友情链接", "修改");
return toAjax(jygxCljwhService.updateJygxCljwh(jygxCljwh)); return toAjax(jygxCljwhService.updateJygxCljwh(jygxCljwh));
} }
...@@ -101,6 +124,11 @@ public class JygxCljwhController extends BaseController ...@@ -101,6 +124,11 @@ public class JygxCljwhController extends BaseController
@DeleteMapping("/{cljids}") @DeleteMapping("/{cljids}")
public AjaxResult remove(@PathVariable Long[] cljids) public AjaxResult remove(@PathVariable Long[] cljids)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "经验交流共享", "经验交流共享-友情链接", "删除友情链接", "删除");
return toAjax(jygxCljwhService.deleteJygxCljwhByCljids(cljids)); return toAjax(jygxCljwhService.deleteJygxCljwhByCljids(cljids));
} }
} }
...@@ -3,8 +3,11 @@ package com.qianhe.controller; ...@@ -3,8 +3,11 @@ package com.qianhe.controller;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.qianhe.common.core.domain.entity.SysUser;
import com.qianhe.common.utils.SecurityUtils;
import com.qianhe.domain.JygxLxwh; import com.qianhe.domain.JygxLxwh;
import com.qianhe.service.IJygxLxwhService; import com.qianhe.service.IJygxLxwhService;
import com.qianhe.util.LogUtil;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
...@@ -43,6 +46,11 @@ public class JygxLxwhController extends BaseController ...@@ -43,6 +46,11 @@ public class JygxLxwhController extends BaseController
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(JygxLxwh jygxLxwh) public TableDataInfo list(JygxLxwh jygxLxwh)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "经验交流共享", "经验交流共享-类型维护", "查询类型", "查询");
startPage(); startPage();
List<JygxLxwh> list = jygxLxwhService.selectJygxLxwhList(jygxLxwh); List<JygxLxwh> list = jygxLxwhService.selectJygxLxwhList(jygxLxwh);
return getDataTable(list); return getDataTable(list);
...@@ -78,6 +86,11 @@ public class JygxLxwhController extends BaseController ...@@ -78,6 +86,11 @@ public class JygxLxwhController extends BaseController
@GetMapping(value = "/{lxid}") @GetMapping(value = "/{lxid}")
public AjaxResult getInfo(@PathVariable("lxid") Long lxid) public AjaxResult getInfo(@PathVariable("lxid") Long lxid)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "经验交流共享", "经验交流共享-类型维护", "查询类型", "查询");
return success(jygxLxwhService.selectJygxLxwhByLxid(lxid)); return success(jygxLxwhService.selectJygxLxwhByLxid(lxid));
} }
...@@ -89,6 +102,11 @@ public class JygxLxwhController extends BaseController ...@@ -89,6 +102,11 @@ public class JygxLxwhController extends BaseController
@PostMapping @PostMapping
public AjaxResult add(@RequestBody JygxLxwh jygxLxwh) public AjaxResult add(@RequestBody JygxLxwh jygxLxwh)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "经验交流共享", "经验交流共享-类型维护", "新增类型", "新增");
return toAjax(jygxLxwhService.insertJygxLxwh(jygxLxwh)); return toAjax(jygxLxwhService.insertJygxLxwh(jygxLxwh));
} }
...@@ -100,6 +118,11 @@ public class JygxLxwhController extends BaseController ...@@ -100,6 +118,11 @@ public class JygxLxwhController extends BaseController
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody JygxLxwh jygxLxwh) public AjaxResult edit(@RequestBody JygxLxwh jygxLxwh)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "经验交流共享", "经验交流共享-类型维护", "修改类型", "修改");
return toAjax(jygxLxwhService.updateJygxLxwh(jygxLxwh)); return toAjax(jygxLxwhService.updateJygxLxwh(jygxLxwh));
} }
...@@ -111,6 +134,11 @@ public class JygxLxwhController extends BaseController ...@@ -111,6 +134,11 @@ public class JygxLxwhController extends BaseController
@DeleteMapping("/{lxids}") @DeleteMapping("/{lxids}")
public AjaxResult remove(@PathVariable Long[] lxids) public AjaxResult remove(@PathVariable Long[] lxids)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "经验交流共享", "经验交流共享-类型维护", "删除类型", "删除");
return toAjax(jygxLxwhService.deleteJygxLxwhByLxids(lxids)); return toAjax(jygxLxwhService.deleteJygxLxwhByLxids(lxids));
} }
} }
...@@ -3,8 +3,11 @@ package com.qianhe.controller; ...@@ -3,8 +3,11 @@ package com.qianhe.controller;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.qianhe.common.core.domain.entity.SysUser;
import com.qianhe.common.utils.SecurityUtils;
import com.qianhe.domain.JygxWzgl; import com.qianhe.domain.JygxWzgl;
import com.qianhe.service.IJygxWzglService; import com.qianhe.service.IJygxWzglService;
import com.qianhe.util.LogUtil;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
...@@ -43,6 +46,11 @@ public class JygxWzglController extends BaseController ...@@ -43,6 +46,11 @@ public class JygxWzglController extends BaseController
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(JygxWzgl jygxWzgl) public TableDataInfo list(JygxWzgl jygxWzgl)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "经验交流共享", "经验交流共享-文章管理", "查询文章", "查询");
startPage(); startPage();
List<JygxWzgl> list = jygxWzglService.selectJygxWzglList(jygxWzgl); List<JygxWzgl> list = jygxWzglService.selectJygxWzglList(jygxWzgl);
return getDataTable(list); return getDataTable(list);
...@@ -57,6 +65,11 @@ public class JygxWzglController extends BaseController ...@@ -57,6 +65,11 @@ public class JygxWzglController extends BaseController
@GetMapping("/sylbxlist") @GetMapping("/sylbxlist")
public TableDataInfo sylbxlist(JygxWzgl jygxWzgl) public TableDataInfo sylbxlist(JygxWzgl jygxWzgl)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "经验交流共享", "经验交流共享-首页轮播图", "查询首页轮播图", "查询");
startPage(); startPage();
List<JygxWzgl> list = jygxWzglService.selectSylbxwList(jygxWzgl); List<JygxWzgl> list = jygxWzglService.selectSylbxwList(jygxWzgl);
return getDataTable(list); return getDataTable(list);
...@@ -107,6 +120,11 @@ public class JygxWzglController extends BaseController ...@@ -107,6 +120,11 @@ public class JygxWzglController extends BaseController
@GetMapping(value = "/{wzid}") @GetMapping(value = "/{wzid}")
public AjaxResult getInfo(@PathVariable("wzid") Long wzid) public AjaxResult getInfo(@PathVariable("wzid") Long wzid)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "经验交流共享", "经验交流共享-文章管理", "查询文章", "查询");
return success(jygxWzglService.selectJygxWzglByWzid(wzid)); return success(jygxWzglService.selectJygxWzglByWzid(wzid));
} }
...@@ -119,6 +137,11 @@ public class JygxWzglController extends BaseController ...@@ -119,6 +137,11 @@ public class JygxWzglController extends BaseController
@PostMapping @PostMapping
public AjaxResult add(@RequestBody JygxWzgl jygxWzgl) public AjaxResult add(@RequestBody JygxWzgl jygxWzgl)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "经验交流共享", "经验交流共享-文章管理", "新增文章", "新增");
return toAjax(jygxWzglService.insertJygxWzgl(jygxWzgl)); return toAjax(jygxWzglService.insertJygxWzgl(jygxWzgl));
} }
...@@ -129,6 +152,11 @@ public class JygxWzglController extends BaseController ...@@ -129,6 +152,11 @@ public class JygxWzglController extends BaseController
@PostMapping("/addxw") @PostMapping("/addxw")
public AjaxResult addxw(@RequestBody JygxWzgl jygxWzgl) public AjaxResult addxw(@RequestBody JygxWzgl jygxWzgl)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "经验交流共享", "经验交流共享-首页轮播图", "新增首页轮播图", "新增");
return toAjax(jygxWzglService.insertxw(jygxWzgl)); return toAjax(jygxWzglService.insertxw(jygxWzgl));
} }
...@@ -140,6 +168,11 @@ public class JygxWzglController extends BaseController ...@@ -140,6 +168,11 @@ public class JygxWzglController extends BaseController
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody JygxWzgl jygxWzgl) public AjaxResult edit(@RequestBody JygxWzgl jygxWzgl)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "经验交流共享", "经验交流共享-文章管理", "修改文章", "修改");
return toAjax(jygxWzglService.updateJygxWzgl(jygxWzgl)); return toAjax(jygxWzglService.updateJygxWzgl(jygxWzgl));
} }
...@@ -174,6 +207,11 @@ public class JygxWzglController extends BaseController ...@@ -174,6 +207,11 @@ public class JygxWzglController extends BaseController
@DeleteMapping("/{wzids}") @DeleteMapping("/{wzids}")
public AjaxResult remove(@PathVariable Long[] wzids) public AjaxResult remove(@PathVariable Long[] wzids)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "经验交流共享", "经验交流共享-文章管理", "删除文章", "删除");
return toAjax(jygxWzglService.deleteJygxWzglByWzids(wzids)); return toAjax(jygxWzglService.deleteJygxWzglByWzids(wzids));
} }
......
...@@ -3,8 +3,11 @@ package com.qianhe.controller; ...@@ -3,8 +3,11 @@ package com.qianhe.controller;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.qianhe.common.core.domain.entity.SysUser;
import com.qianhe.common.utils.SecurityUtils;
import com.qianhe.domain.JygxYyxtwh; import com.qianhe.domain.JygxYyxtwh;
import com.qianhe.service.IJygxYyxtwhService; import com.qianhe.service.IJygxYyxtwhService;
import com.qianhe.util.LogUtil;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
...@@ -43,6 +46,11 @@ public class JygxYyxtwhController extends BaseController ...@@ -43,6 +46,11 @@ public class JygxYyxtwhController extends BaseController
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(JygxYyxtwh jygxYyxtwh) public TableDataInfo list(JygxYyxtwh jygxYyxtwh)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "经验交流共享", "经验交流共享-专题专栏", "查询专题专栏", "查询");
startPage(); startPage();
List<JygxYyxtwh> list = jygxYyxtwhService.selectJygxYyxtwhList(jygxYyxtwh); List<JygxYyxtwh> list = jygxYyxtwhService.selectJygxYyxtwhList(jygxYyxtwh);
return getDataTable(list); return getDataTable(list);
...@@ -68,6 +76,11 @@ public class JygxYyxtwhController extends BaseController ...@@ -68,6 +76,11 @@ public class JygxYyxtwhController extends BaseController
@GetMapping(value = "/{yyxtid}") @GetMapping(value = "/{yyxtid}")
public AjaxResult getInfo(@PathVariable("yyxtid") Long yyxtid) public AjaxResult getInfo(@PathVariable("yyxtid") Long yyxtid)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "经验交流共享", "经验交流共享-专题专栏", "查询专题专栏", "查询");
return success(jygxYyxtwhService.selectJygxYyxtwhByYyxtid(yyxtid)); return success(jygxYyxtwhService.selectJygxYyxtwhByYyxtid(yyxtid));
} }
...@@ -79,6 +92,11 @@ public class JygxYyxtwhController extends BaseController ...@@ -79,6 +92,11 @@ public class JygxYyxtwhController extends BaseController
@PostMapping @PostMapping
public AjaxResult add(@RequestBody JygxYyxtwh jygxYyxtwh) public AjaxResult add(@RequestBody JygxYyxtwh jygxYyxtwh)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "经验交流共享", "经验交流共享-专题专栏", "新增专题专栏", "新增");
return toAjax(jygxYyxtwhService.insertJygxYyxtwh(jygxYyxtwh)); return toAjax(jygxYyxtwhService.insertJygxYyxtwh(jygxYyxtwh));
} }
...@@ -90,6 +108,11 @@ public class JygxYyxtwhController extends BaseController ...@@ -90,6 +108,11 @@ public class JygxYyxtwhController extends BaseController
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody JygxYyxtwh jygxYyxtwh) public AjaxResult edit(@RequestBody JygxYyxtwh jygxYyxtwh)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "经验交流共享", "经验交流共享-专题专栏", "修改专题专栏", "修改");
return toAjax(jygxYyxtwhService.updateJygxYyxtwh(jygxYyxtwh)); return toAjax(jygxYyxtwhService.updateJygxYyxtwh(jygxYyxtwh));
} }
...@@ -101,6 +124,11 @@ public class JygxYyxtwhController extends BaseController ...@@ -101,6 +124,11 @@ public class JygxYyxtwhController extends BaseController
@DeleteMapping("/{yyxtids}") @DeleteMapping("/{yyxtids}")
public AjaxResult remove(@PathVariable Long[] yyxtids) public AjaxResult remove(@PathVariable Long[] yyxtids)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "经验交流共享", "经验交流共享-专题专栏", "删除专题专栏", "删除");
return toAjax(jygxYyxtwhService.deleteJygxYyxtwhByYyxtids(yyxtids)); return toAjax(jygxYyxtwhService.deleteJygxYyxtwhByYyxtids(yyxtids));
} }
} }
...@@ -3,12 +3,15 @@ package com.qianhe.controller; ...@@ -3,12 +3,15 @@ package com.qianhe.controller;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.qianhe.common.core.domain.entity.SysUser;
import com.qianhe.common.utils.SecurityUtils;
import com.qianhe.domain.Vo.JcdwxxVo; import com.qianhe.domain.Vo.JcdwxxVo;
import com.qianhe.common.core.domain.entity.SysDept; import com.qianhe.common.core.domain.entity.SysDept;
import com.qianhe.system.domain.SysDeptCb; import com.qianhe.system.domain.SysDeptCb;
import com.qianhe.system.service.ISysDeptCbService; import com.qianhe.system.service.ISysDeptCbService;
import com.qianhe.system.service.ISysDeptService; import com.qianhe.system.service.ISysDeptService;
import com.qianhe.util.LogUtil;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
...@@ -53,6 +56,11 @@ public class SjBzxxController extends BaseController ...@@ -53,6 +56,11 @@ public class SjBzxxController extends BaseController
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(SjBzxx sjBzxx) public TableDataInfo list(SjBzxx sjBzxx)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "基层信息", "基层信息-基层信息", "查询基层信息", "查询");
startPage(); startPage();
List<SjBzxx> list = sjBzxxService.selectSjBzxxList(sjBzxx); List<SjBzxx> list = sjBzxxService.selectSjBzxxList(sjBzxx);
return getDataTable(list); return getDataTable(list);
...@@ -65,6 +73,11 @@ public class SjBzxxController extends BaseController ...@@ -65,6 +73,11 @@ public class SjBzxxController extends BaseController
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, SjBzxx sjBzxx) public void export(HttpServletResponse response, SjBzxx sjBzxx)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "基层信息", "基层信息-基层信息", "导出基层信息", "导出");
List<SjBzxx> list = sjBzxxService.selectSjBzxxList(sjBzxx); List<SjBzxx> list = sjBzxxService.selectSjBzxxList(sjBzxx);
ExcelUtil<SjBzxx> util = new ExcelUtil<SjBzxx>(SjBzxx.class); ExcelUtil<SjBzxx> util = new ExcelUtil<SjBzxx>(SjBzxx.class);
util.exportExcel(response, list, "班组信息数据"); util.exportExcel(response, list, "班组信息数据");
...@@ -76,6 +89,11 @@ public class SjBzxxController extends BaseController ...@@ -76,6 +89,11 @@ public class SjBzxxController extends BaseController
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "基层信息", "基层信息-基层信息", "查询基层信息", "查询");
return success(sjBzxxService.selectSjBzxxById(id)); return success(sjBzxxService.selectSjBzxxById(id));
} }
...@@ -86,6 +104,11 @@ public class SjBzxxController extends BaseController ...@@ -86,6 +104,11 @@ public class SjBzxxController extends BaseController
@PostMapping @PostMapping
public AjaxResult add(@RequestBody SjBzxx sjBzxx) public AjaxResult add(@RequestBody SjBzxx sjBzxx)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "基层信息", "基层信息-基层信息", "新增基层信息", "新增");
return toAjax(sjBzxxService.insertSjBzxx(sjBzxx)); return toAjax(sjBzxxService.insertSjBzxx(sjBzxx));
} }
...@@ -96,6 +119,11 @@ public class SjBzxxController extends BaseController ...@@ -96,6 +119,11 @@ public class SjBzxxController extends BaseController
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody SjBzxx sjBzxx) public AjaxResult edit(@RequestBody SjBzxx sjBzxx)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "基层信息", "基层信息-基层信息", "修改基层信息", "修改");
return toAjax(sjBzxxService.updateSjBzxx(sjBzxx)); return toAjax(sjBzxxService.updateSjBzxx(sjBzxx));
} }
...@@ -106,6 +134,11 @@ public class SjBzxxController extends BaseController ...@@ -106,6 +134,11 @@ public class SjBzxxController extends BaseController
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "基层信息", "基层信息-基层信息", "删除基层信息", "删除");
return toAjax(sjBzxxService.deleteSjBzxxByIds(ids)); return toAjax(sjBzxxService.deleteSjBzxxByIds(ids));
} }
...@@ -119,6 +152,11 @@ public class SjBzxxController extends BaseController ...@@ -119,6 +152,11 @@ public class SjBzxxController extends BaseController
@PostMapping(value = "/getBzTj") @PostMapping(value = "/getBzTj")
public AjaxResult getBzTj(@RequestBody SjBzxx sjBzxx) public AjaxResult getBzTj(@RequestBody SjBzxx sjBzxx)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "基层信息", "基层信息-基层统计", "查询基层统计", "查询");
return success(sjBzxxService.selectBzxxTj(sjBzxx)); return success(sjBzxxService.selectBzxxTj(sjBzxx));
} }
/** /**
...@@ -137,6 +175,11 @@ public class SjBzxxController extends BaseController ...@@ -137,6 +175,11 @@ public class SjBzxxController extends BaseController
@GetMapping("/dwbzrstjList") @GetMapping("/dwbzrstjList")
public List<SjBzxx> dwbzrstjList(SjBzxx sjBzxx) public List<SjBzxx> dwbzrstjList(SjBzxx sjBzxx)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "基层信息", "基层信息-基层统计", "查询基层统计", "查询");
List<SjBzxx> list = sjBzxxService.dwbzrstjList(sjBzxx); List<SjBzxx> list = sjBzxxService.dwbzrstjList(sjBzxx);
return list; return list;
} }
...@@ -149,6 +192,11 @@ public class SjBzxxController extends BaseController ...@@ -149,6 +192,11 @@ public class SjBzxxController extends BaseController
@GetMapping("/jcdwtjList") @GetMapping("/jcdwtjList")
public TableDataInfo jcdwtjList(JcdwxxVo jcdwxxVo) public TableDataInfo jcdwtjList(JcdwxxVo jcdwxxVo)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "基层信息", "基层信息-基层统计", "查询基层统计", "查询");
startPage(); startPage();
List<JcdwxxVo> list = sjBzxxService.jcdwtjList(jcdwxxVo); List<JcdwxxVo> list = sjBzxxService.jcdwtjList(jcdwxxVo);
...@@ -174,6 +222,11 @@ public class SjBzxxController extends BaseController ...@@ -174,6 +222,11 @@ public class SjBzxxController extends BaseController
@GetMapping("/deptAndBzList") @GetMapping("/deptAndBzList")
public AjaxResult deptAndBzList(SysDept dept) public AjaxResult deptAndBzList(SysDept dept)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "基层信息", "基层信息-基层统计", "查询基层统计", "查询");
List<SysDept> depts = deptService.selectDeptList(dept); List<SysDept> depts = deptService.selectDeptList(dept);
//查询从表 配置信息 //查询从表 配置信息
SysDeptCb cb_qry = new SysDeptCb(); SysDeptCb cb_qry = new SysDeptCb();
......
...@@ -8,11 +8,14 @@ import java.util.*; ...@@ -8,11 +8,14 @@ import java.util.*;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.qianhe.common.core.domain.BaseEntity; import com.qianhe.common.core.domain.BaseEntity;
import com.qianhe.common.core.domain.entity.SysUser;
import com.qianhe.common.exception.BusinessException; import com.qianhe.common.exception.BusinessException;
import com.qianhe.common.utils.SecurityUtils;
import com.qianhe.common.utils.bean.BeanUtils; import com.qianhe.common.utils.bean.BeanUtils;
import com.qianhe.domain.SjGfjsYdjcjl; import com.qianhe.domain.SjGfjsYdjcjl;
import com.qianhe.domain.SjGfjsZsdwwtcj; import com.qianhe.domain.SjGfjsZsdwwtcj;
import com.qianhe.domain.Vo.SjfybpVo; import com.qianhe.domain.Vo.SjfybpVo;
import com.qianhe.util.LogUtil;
import org.apache.poi.ss.usermodel.*; import org.apache.poi.ss.usermodel.*;
import org.apache.poi.ss.util.CellRangeAddress; import org.apache.poi.ss.util.CellRangeAddress;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
...@@ -132,6 +135,11 @@ public class SjFybpController extends BaseController ...@@ -132,6 +135,11 @@ public class SjFybpController extends BaseController
@PostMapping("/sp") @PostMapping("/sp")
public AjaxResult sp(@RequestBody SjFybp sjFybp) public AjaxResult sp(@RequestBody SjFybp sjFybp)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "费用报批", "费用报批-费用报批", "查询费用报批", "查询");
return toAjax(sjFybpService.tj(sjFybp)); return toAjax(sjFybpService.tj(sjFybp));
} }
...@@ -141,6 +149,11 @@ public class SjFybpController extends BaseController ...@@ -141,6 +149,11 @@ public class SjFybpController extends BaseController
@GetMapping("/splist") @GetMapping("/splist")
public TableDataInfo splist(SjFybp sjFybp) public TableDataInfo splist(SjFybp sjFybp)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "费用报批", "费用报批-费用报批", "查询费用报批", "查询");
startPage(); startPage();
List<SjFybp> list = sjFybpService.selectSjFybpList(sjFybp); List<SjFybp> list = sjFybpService.selectSjFybpList(sjFybp);
return getDataTable(list); return getDataTable(list);
...@@ -152,6 +165,12 @@ public class SjFybpController extends BaseController ...@@ -152,6 +165,12 @@ public class SjFybpController extends BaseController
@GetMapping("/zglist") @GetMapping("/zglist")
public TableDataInfo zglist(SjFybp sjFybp) public TableDataInfo zglist(SjFybp sjFybp)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "费用报批", "费用报批-费用进度", "查询费用进度", "查询");
startPage(); startPage();
List<SjFybp> list = sjFybpService.getFygz(sjFybp); List<SjFybp> list = sjFybpService.getFygz(sjFybp);
return getDataTable(list); return getDataTable(list);
...@@ -165,6 +184,11 @@ public class SjFybpController extends BaseController ...@@ -165,6 +184,11 @@ public class SjFybpController extends BaseController
public AjaxResult getFygz(@PathVariable Long id) public AjaxResult getFygz(@PathVariable Long id)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "费用报批", "费用报批-费用报批", "查询费用报批", "查询");
return AjaxResult.success(sjFybpService.getFygzById(id)); return AjaxResult.success(sjFybpService.getFygzById(id));
} }
...@@ -175,6 +199,11 @@ public class SjFybpController extends BaseController ...@@ -175,6 +199,11 @@ public class SjFybpController extends BaseController
@PostMapping("fywh") @PostMapping("fywh")
public AjaxResult fywh(@RequestBody SjFybp sjFybp) public AjaxResult fywh(@RequestBody SjFybp sjFybp)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "费用报批", "费用报批-费用报批", "维护费用报批", "修改");
return toAjax(sjFybpService.fywh(sjFybp)); return toAjax(sjFybpService.fywh(sjFybp));
} }
...@@ -188,6 +217,11 @@ public class SjFybpController extends BaseController ...@@ -188,6 +217,11 @@ public class SjFybpController extends BaseController
*/ */
@GetMapping("/tjtbByDept") @GetMapping("/tjtbByDept")
public AjaxResult tjtbByDept(SjFybp sjFybp){ public AjaxResult tjtbByDept(SjFybp sjFybp){
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "费用报批", "费用报批-统计", "查询统计", "查询");
return AjaxResult.success(sjFybpService.tjtbByDept(sjFybp)); return AjaxResult.success(sjFybpService.tjtbByDept(sjFybp));
} }
...@@ -198,6 +232,10 @@ public class SjFybpController extends BaseController ...@@ -198,6 +232,10 @@ public class SjFybpController extends BaseController
*/ */
@GetMapping("/tjtbByfylx") @GetMapping("/tjtbByfylx")
public AjaxResult tjtbByfylx(SjFybp sjFybp){ public AjaxResult tjtbByfylx(SjFybp sjFybp){
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "费用报批", "费用报批-统计", "查询统计", "查询");
return AjaxResult.success(sjFybpService.tjtbByfylx(sjFybp)); return AjaxResult.success(sjFybpService.tjtbByfylx(sjFybp));
} }
...@@ -209,6 +247,10 @@ public class SjFybpController extends BaseController ...@@ -209,6 +247,10 @@ public class SjFybpController extends BaseController
@GetMapping("/tjtbct") @GetMapping("/tjtbct")
public TableDataInfo tjtbct(SjFybp sjFybp) public TableDataInfo tjtbct(SjFybp sjFybp)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "费用报批", "费用报批-统计", "查询统计", "查询");
startPage(); startPage();
List<SjFybp> list = sjFybpService.selectSjFybpCtList(sjFybp); List<SjFybp> list = sjFybpService.selectSjFybpCtList(sjFybp);
return getDataTable(list); return getDataTable(list);
...@@ -237,6 +279,10 @@ public class SjFybpController extends BaseController ...@@ -237,6 +279,10 @@ public class SjFybpController extends BaseController
@GetMapping("/zsdwNdfytj") @GetMapping("/zsdwNdfytj")
public List<SjfybpVo> zsdwNdfytj(SjFybp sjFybp) public List<SjfybpVo> zsdwNdfytj(SjFybp sjFybp)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "费用报批", "费用报批-统计", "查询统计", "查询");
List<SjfybpVo> list = sjFybpService.zsdwNdfytj(sjFybp); List<SjfybpVo> list = sjFybpService.zsdwNdfytj(sjFybp);
return list; return list;
} }
...@@ -246,6 +292,10 @@ public class SjFybpController extends BaseController ...@@ -246,6 +292,10 @@ public class SjFybpController extends BaseController
@PostMapping("/exportZsdwNdfytj") @PostMapping("/exportZsdwNdfytj")
public void exportZsdwNdfytj(HttpServletResponse response, SjFybp sjFybp) public void exportZsdwNdfytj(HttpServletResponse response, SjFybp sjFybp)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "费用报批", "费用报批-统计", "导出统计", "导出");
List<SjfybpVo> list = sjFybpService.zsdwNdfytj(sjFybp); List<SjfybpVo> list = sjFybpService.zsdwNdfytj(sjFybp);
Workbook exl = null; Workbook exl = null;
......
...@@ -10,6 +10,7 @@ import java.util.List; ...@@ -10,6 +10,7 @@ import java.util.List;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.qianhe.common.core.domain.entity.SysUser;
import com.qianhe.common.exception.BusinessException; import com.qianhe.common.exception.BusinessException;
import com.qianhe.common.utils.DateUtils; import com.qianhe.common.utils.DateUtils;
import com.qianhe.common.utils.SecurityUtils; import com.qianhe.common.utils.SecurityUtils;
...@@ -19,6 +20,7 @@ import com.qianhe.domain.SjGfjsZsdwkhpj; ...@@ -19,6 +20,7 @@ import com.qianhe.domain.SjGfjsZsdwkhpj;
import com.qianhe.system.domain.SysDeptCb; import com.qianhe.system.domain.SysDeptCb;
import com.qianhe.system.mapper.SysDeptCbMapper; import com.qianhe.system.mapper.SysDeptCbMapper;
import com.qianhe.system.mapper.SysDeptMapper; import com.qianhe.system.mapper.SysDeptMapper;
import com.qianhe.util.LogUtil;
import org.apache.poi.ss.usermodel.*; import org.apache.poi.ss.usermodel.*;
import org.apache.poi.xssf.usermodel.XSSFRow; import org.apache.poi.xssf.usermodel.XSSFRow;
import org.apache.poi.xssf.usermodel.XSSFSheet; import org.apache.poi.xssf.usermodel.XSSFSheet;
...@@ -58,6 +60,11 @@ public class SjFybpZbController extends BaseController ...@@ -58,6 +60,11 @@ public class SjFybpZbController extends BaseController
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(SjFybpZb sjFybpZb) public TableDataInfo list(SjFybpZb sjFybpZb)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "费用报批", "费用报批-年度计划", "查询年度计划上报", "查询");
startPage(); startPage();
List<SjFybpZb> list = sjFybpZbService.selectSjFybpZbList(sjFybpZb); List<SjFybpZb> list = sjFybpZbService.selectSjFybpZbList(sjFybpZb);
return getDataTable(list); return getDataTable(list);
...@@ -81,6 +88,11 @@ public class SjFybpZbController extends BaseController ...@@ -81,6 +88,11 @@ public class SjFybpZbController extends BaseController
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "费用报批", "费用报批-年度计划", "查询年度计划上报", "查询");
return success(sjFybpZbService.selectSjFybpZbById(id)); return success(sjFybpZbService.selectSjFybpZbById(id));
} }
...@@ -91,6 +103,11 @@ public class SjFybpZbController extends BaseController ...@@ -91,6 +103,11 @@ public class SjFybpZbController extends BaseController
@PostMapping @PostMapping
public AjaxResult add(@RequestBody SjFybpZb sjFybpZb) public AjaxResult add(@RequestBody SjFybpZb sjFybpZb)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "费用报批", "费用报批-年度计划", "新增年度计划上报", "新增");
int i = sjFybpZbService.insertSjFybpZb(sjFybpZb); int i = sjFybpZbService.insertSjFybpZb(sjFybpZb);
SysDeptCb sysDeptCb =new SysDeptCb(); SysDeptCb sysDeptCb =new SysDeptCb();
sysDeptCb.setNd(sjFybpZb.getFyrq()); sysDeptCb.setNd(sjFybpZb.getFyrq());
...@@ -182,6 +199,11 @@ public class SjFybpZbController extends BaseController ...@@ -182,6 +199,11 @@ public class SjFybpZbController extends BaseController
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody SjFybpZb sjFybpZb) public AjaxResult edit(@RequestBody SjFybpZb sjFybpZb)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "费用报批", "费用报批-年度计划", "修改年度计划上报", "修改");
int i = sjFybpZbService.updateSjFybpZb(sjFybpZb); int i = sjFybpZbService.updateSjFybpZb(sjFybpZb);
SysDeptCb sysDeptCb =new SysDeptCb(); SysDeptCb sysDeptCb =new SysDeptCb();
sysDeptCb.setNd(sjFybpZb.getFyrq()); sysDeptCb.setNd(sjFybpZb.getFyrq());
...@@ -273,6 +295,11 @@ public class SjFybpZbController extends BaseController ...@@ -273,6 +295,11 @@ public class SjFybpZbController extends BaseController
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "费用报批", "费用报批-年度计划", "删除年度计划上报", "删除");
return toAjax(sjFybpZbService.deleteSjFybpZbByIds(ids)); return toAjax(sjFybpZbService.deleteSjFybpZbByIds(ids));
} }
......
...@@ -5,6 +5,7 @@ import com.qianhe.common.core.controller.BaseController; ...@@ -5,6 +5,7 @@ import com.qianhe.common.core.controller.BaseController;
import com.qianhe.common.core.domain.AjaxResult; import com.qianhe.common.core.domain.AjaxResult;
import com.qianhe.common.core.domain.entity.SysDept; import com.qianhe.common.core.domain.entity.SysDept;
import com.qianhe.common.core.domain.entity.SysRole; import com.qianhe.common.core.domain.entity.SysRole;
import com.qianhe.common.core.domain.entity.SysUser;
import com.qianhe.common.core.page.TableDataInfo; import com.qianhe.common.core.page.TableDataInfo;
import com.qianhe.common.enums.BusinessType; import com.qianhe.common.enums.BusinessType;
import com.qianhe.common.utils.SecurityUtils; import com.qianhe.common.utils.SecurityUtils;
...@@ -14,6 +15,7 @@ import com.qianhe.domain.SjGfjsBfzbfdx; ...@@ -14,6 +15,7 @@ import com.qianhe.domain.SjGfjsBfzbfdx;
import com.qianhe.domain.SjGfjsBfzwh; import com.qianhe.domain.SjGfjsBfzwh;
import com.qianhe.service.ISjGfjsBfzwhService; import com.qianhe.service.ISjGfjsBfzwhService;
import com.qianhe.system.service.ISysDeptService; import com.qianhe.system.service.ISysDeptService;
import com.qianhe.util.LogUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -39,6 +41,11 @@ public class SjGfjsBfzwhController extends BaseController ...@@ -39,6 +41,11 @@ public class SjGfjsBfzwhController extends BaseController
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(SjGfjsBfzwh sjGfjsBfzwh) public TableDataInfo list(SjGfjsBfzwh sjGfjsBfzwh)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-帮扶组-帮扶组维护", "查询帮扶组", "查询");
sjGfjsBfzwh.setLxr(SecurityUtils.getUserId()); sjGfjsBfzwh.setLxr(SecurityUtils.getUserId());
// 拿到角色如果是管理员 不限制。不是管理员只能看到自己的帮扶组 // 拿到角色如果是管理员 不限制。不是管理员只能看到自己的帮扶组
List<SysRole> rolelist = SecurityUtils.getLoginUser().getUser().getRoles(); List<SysRole> rolelist = SecurityUtils.getLoginUser().getUser().getRoles();
...@@ -98,6 +105,11 @@ public class SjGfjsBfzwhController extends BaseController ...@@ -98,6 +105,11 @@ public class SjGfjsBfzwhController extends BaseController
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-帮扶组-帮扶组维护", "查询帮扶组", "查询");
return success(sjGfjsBfzwhService.selectSjGfjsBfzwhById(id)); return success(sjGfjsBfzwhService.selectSjGfjsBfzwhById(id));
} }
...@@ -108,6 +120,11 @@ public class SjGfjsBfzwhController extends BaseController ...@@ -108,6 +120,11 @@ public class SjGfjsBfzwhController extends BaseController
@PostMapping @PostMapping
public AjaxResult add(@RequestBody SjGfjsBfzwh sjGfjsBfzwh) public AjaxResult add(@RequestBody SjGfjsBfzwh sjGfjsBfzwh)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-帮扶组-帮扶组维护", "新增帮扶组", "新增");
return toAjax(sjGfjsBfzwhService.insertSjGfjsBfzwh(sjGfjsBfzwh)); return toAjax(sjGfjsBfzwhService.insertSjGfjsBfzwh(sjGfjsBfzwh));
} }
...@@ -118,6 +135,11 @@ public class SjGfjsBfzwhController extends BaseController ...@@ -118,6 +135,11 @@ public class SjGfjsBfzwhController extends BaseController
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody SjGfjsBfzwh sjGfjsBfzwh) public AjaxResult edit(@RequestBody SjGfjsBfzwh sjGfjsBfzwh)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-帮扶组-帮扶组维护", "修改帮扶组", "修改");
return toAjax(sjGfjsBfzwhService.updateSjGfjsBfzwh(sjGfjsBfzwh)); return toAjax(sjGfjsBfzwhService.updateSjGfjsBfzwh(sjGfjsBfzwh));
} }
...@@ -128,6 +150,11 @@ public class SjGfjsBfzwhController extends BaseController ...@@ -128,6 +150,11 @@ public class SjGfjsBfzwhController extends BaseController
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-帮扶组-帮扶组维护", "删除帮扶组", "删除");
return toAjax(sjGfjsBfzwhService.deleteSjGfjsBfzwhByIds(ids)); return toAjax(sjGfjsBfzwhService.deleteSjGfjsBfzwhByIds(ids));
} }
......
...@@ -5,15 +5,18 @@ import com.qianhe.common.constant.HttpStatus; ...@@ -5,15 +5,18 @@ import com.qianhe.common.constant.HttpStatus;
import com.qianhe.common.core.controller.BaseController; import com.qianhe.common.core.controller.BaseController;
import com.qianhe.common.core.domain.AjaxResult; import com.qianhe.common.core.domain.AjaxResult;
import com.qianhe.common.core.domain.entity.SysDept; import com.qianhe.common.core.domain.entity.SysDept;
import com.qianhe.common.core.domain.entity.SysUser;
import com.qianhe.common.core.page.TableDataInfo; import com.qianhe.common.core.page.TableDataInfo;
import com.qianhe.common.enums.BusinessType; import com.qianhe.common.enums.BusinessType;
import com.qianhe.common.exception.BusinessException; import com.qianhe.common.exception.BusinessException;
import com.qianhe.common.utils.SecurityUtils;
import com.qianhe.common.utils.StringUtils; import com.qianhe.common.utils.StringUtils;
import com.qianhe.domain.*; import com.qianhe.domain.*;
import com.qianhe.mapper.SjGfjsYdjcjlMapper; import com.qianhe.mapper.SjGfjsYdjcjlMapper;
import com.qianhe.mapper.SjGfjsZdgzMapper; import com.qianhe.mapper.SjGfjsZdgzMapper;
import com.qianhe.service.*; import com.qianhe.service.*;
import com.qianhe.system.mapper.SysDeptMapper; import com.qianhe.system.mapper.SysDeptMapper;
import com.qianhe.util.LogUtil;
import org.apache.poi.ss.usermodel.*; import org.apache.poi.ss.usermodel.*;
import org.apache.poi.ss.util.CellRangeAddress; import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.poi.xssf.usermodel.XSSFRow; import org.apache.poi.xssf.usermodel.XSSFRow;
...@@ -78,6 +81,11 @@ public class SjGfjsJcdwkhpjController extends BaseController ...@@ -78,6 +81,11 @@ public class SjGfjsJcdwkhpjController extends BaseController
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(SjGfjsZsdwkhpj sjGfjsZsdwkhpj) public TableDataInfo list(SjGfjsZsdwkhpj sjGfjsZsdwkhpj)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-基层单位-季度自测", "查询季度自测", "查询");
startPage(); startPage();
List<SjGfjsZsdwkhpj> list = sjGfjsZsdwkhpjService.selectSjGfjsZsdwkhpjList(sjGfjsZsdwkhpj); List<SjGfjsZsdwkhpj> list = sjGfjsZsdwkhpjService.selectSjGfjsZsdwkhpjList(sjGfjsZsdwkhpj);
return getDataTable(list); return getDataTable(list);
...@@ -92,6 +100,12 @@ public class SjGfjsJcdwkhpjController extends BaseController ...@@ -92,6 +100,12 @@ public class SjGfjsJcdwkhpjController extends BaseController
public Map<String,Object> listAll(SjGfjsZsdwkhpj sjGfjsZsdwkhpj) public Map<String,Object> listAll(SjGfjsZsdwkhpj sjGfjsZsdwkhpj)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-基层单位-季度自测", "查询季度自测", "查询");
Map<String,Object> map=new HashMap<>(); Map<String,Object> map=new HashMap<>();
Long deptId = sjGfjsZsdwkhpj.getDeptId(); Long deptId = sjGfjsZsdwkhpj.getDeptId();
String nd = sjGfjsZsdwkhpj.getNd(); String nd = sjGfjsZsdwkhpj.getNd();
...@@ -230,6 +244,11 @@ public class SjGfjsJcdwkhpjController extends BaseController ...@@ -230,6 +244,11 @@ public class SjGfjsJcdwkhpjController extends BaseController
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, SjGfjsZsdwkhpj sjGfjsZsdwkhpj) public void export(HttpServletResponse response, SjGfjsZsdwkhpj sjGfjsZsdwkhpj)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-基层单位-季度自测", "查询季度自测", "导出");
sjGfjsZsdwkhpj.setJb("基层单位"); sjGfjsZsdwkhpj.setJb("基层单位");
List<SjGfjsZsdwkhpj> list = sjGfjsZsdwkhpjService.selectSjGfjsZsdwkhpjList(sjGfjsZsdwkhpj); List<SjGfjsZsdwkhpj> list = sjGfjsZsdwkhpjService.selectSjGfjsZsdwkhpjList(sjGfjsZsdwkhpj);
...@@ -350,6 +369,11 @@ public class SjGfjsJcdwkhpjController extends BaseController ...@@ -350,6 +369,11 @@ public class SjGfjsJcdwkhpjController extends BaseController
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-基层单位-季度自测", "查询季度自测", "查询");
return success(sjGfjsZsdwkhpjService.selectSjGfjsZsdwkhpjById(id)); return success(sjGfjsZsdwkhpjService.selectSjGfjsZsdwkhpjById(id));
} }
...@@ -360,6 +384,10 @@ public class SjGfjsJcdwkhpjController extends BaseController ...@@ -360,6 +384,10 @@ public class SjGfjsJcdwkhpjController extends BaseController
@PostMapping @PostMapping
public AjaxResult add(@RequestBody SjGfjsZsdwkhpj sjGfjsZsdwkhpj) public AjaxResult add(@RequestBody SjGfjsZsdwkhpj sjGfjsZsdwkhpj)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-基层单位-季度自测", "新增季度自测", "新增");
return toAjax(sjGfjsZsdwkhpjService.insertSjGfjsZsdwkhpj(sjGfjsZsdwkhpj)); return toAjax(sjGfjsZsdwkhpjService.insertSjGfjsZsdwkhpj(sjGfjsZsdwkhpj));
} }
...@@ -370,6 +398,10 @@ public class SjGfjsJcdwkhpjController extends BaseController ...@@ -370,6 +398,10 @@ public class SjGfjsJcdwkhpjController extends BaseController
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody SjGfjsZsdwkhpj sjGfjsZsdwkhpj) public AjaxResult edit(@RequestBody SjGfjsZsdwkhpj sjGfjsZsdwkhpj)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-基层单位-季度自测", "修改季度自测", "修改");
return toAjax(sjGfjsZsdwkhpjService.updateSjGfjsZsdwkhpj(sjGfjsZsdwkhpj)); return toAjax(sjGfjsZsdwkhpjService.updateSjGfjsZsdwkhpj(sjGfjsZsdwkhpj));
} }
...@@ -380,6 +412,10 @@ public class SjGfjsJcdwkhpjController extends BaseController ...@@ -380,6 +412,10 @@ public class SjGfjsJcdwkhpjController extends BaseController
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-基层单位-季度自测", "删除季度自测", "删除");
return toAjax(sjGfjsZsdwkhpjService.deleteSjGfjsZsdwkhpjByIds(ids)); return toAjax(sjGfjsZsdwkhpjService.deleteSjGfjsZsdwkhpjByIds(ids));
} }
...@@ -390,6 +426,10 @@ public class SjGfjsJcdwkhpjController extends BaseController ...@@ -390,6 +426,10 @@ public class SjGfjsJcdwkhpjController extends BaseController
@PutMapping("/pledit") @PutMapping("/pledit")
public AjaxResult pledit(@RequestBody List<SjGfjsZsdwkhpj> list) public AjaxResult pledit(@RequestBody List<SjGfjsZsdwkhpj> list)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-基层单位-季度自测", "修改季度自测", "修改");
return toAjax(sjGfjsZsdwkhpjService.pledit(list)); return toAjax(sjGfjsZsdwkhpjService.pledit(list));
} }
/** /**
...@@ -399,6 +439,10 @@ public class SjGfjsJcdwkhpjController extends BaseController ...@@ -399,6 +439,10 @@ public class SjGfjsJcdwkhpjController extends BaseController
@PutMapping("/pleditAndTj") @PutMapping("/pleditAndTj")
public AjaxResult pleditAndTj(@RequestBody List<SjGfjsZsdwkhpj> list) public AjaxResult pleditAndTj(@RequestBody List<SjGfjsZsdwkhpj> list)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-基层单位-季度自测", "修改季度自测", "修改");
sjGfjsZsdwkhpjService.pledit(list); sjGfjsZsdwkhpjService.pledit(list);
SjGfjsZsdwkhpj sjGfjsZsdwkhpj = list.get(0); SjGfjsZsdwkhpj sjGfjsZsdwkhpj = list.get(0);
...@@ -411,6 +455,10 @@ public class SjGfjsJcdwkhpjController extends BaseController ...@@ -411,6 +455,10 @@ public class SjGfjsJcdwkhpjController extends BaseController
@PostMapping("/importData") @PostMapping("/importData")
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception{ public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception{
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-基层单位-季度自测", "导入季度自测", "导入");
XSSFWorkbook workbook = null; XSSFWorkbook workbook = null;
// List<SysDept> deptList = sysDeptMapper.selectDeptList(new SysDept()); // List<SysDept> deptList = sysDeptMapper.selectDeptList(new SysDept());
...@@ -467,6 +515,12 @@ public class SjGfjsJcdwkhpjController extends BaseController ...@@ -467,6 +515,12 @@ public class SjGfjsJcdwkhpjController extends BaseController
} catch (IOException e) { } catch (IOException e) {
e.getMessage(); e.getMessage();
e.printStackTrace(); e.printStackTrace();
//日志
//SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzscErr(u, "三基考核", "三基考核-基层单位-季度自测", "导入季度自测", "调用接口异常",
"导入季度自测报错", "1级");
throw new BusinessException("导入Excel失败,请联系网站管理员!"); throw new BusinessException("导入Excel失败,请联系网站管理员!");
} finally { } finally {
......
...@@ -4,8 +4,10 @@ import java.util.List; ...@@ -4,8 +4,10 @@ import java.util.List;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.qianhe.common.core.domain.entity.SysRole; import com.qianhe.common.core.domain.entity.SysRole;
import com.qianhe.common.core.domain.entity.SysUser;
import com.qianhe.common.utils.SecurityUtils; import com.qianhe.common.utils.SecurityUtils;
import com.qianhe.common.utils.StringUtils; import com.qianhe.common.utils.StringUtils;
import com.qianhe.util.LogUtil;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
...@@ -45,6 +47,11 @@ public class SjGfjsLbzdbfController extends BaseController ...@@ -45,6 +47,11 @@ public class SjGfjsLbzdbfController extends BaseController
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(SjGfjsLbzdbf sjGfjsLbzdbf) public TableDataInfo list(SjGfjsLbzdbf sjGfjsLbzdbf)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-帮扶组-练兵指导帮扶", "查询练兵指导帮扶", "查询");
sjGfjsLbzdbf.setLxr(SecurityUtils.getUserId()); sjGfjsLbzdbf.setLxr(SecurityUtils.getUserId());
// 拿到角色如果是管理员 不限制。不是管理员只能看到自己的帮扶组 // 拿到角色如果是管理员 不限制。不是管理员只能看到自己的帮扶组
List<SysRole> rolelist = SecurityUtils.getLoginUser().getUser().getRoles(); List<SysRole> rolelist = SecurityUtils.getLoginUser().getUser().getRoles();
...@@ -81,6 +88,11 @@ public class SjGfjsLbzdbfController extends BaseController ...@@ -81,6 +88,11 @@ public class SjGfjsLbzdbfController extends BaseController
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-帮扶组-练兵指导帮扶", "查询练兵指导帮扶", "查询");
return success(sjGfjsLbzdbfService.selectSjGfjsLbzdbfById(id)); return success(sjGfjsLbzdbfService.selectSjGfjsLbzdbfById(id));
} }
...@@ -92,6 +104,11 @@ public class SjGfjsLbzdbfController extends BaseController ...@@ -92,6 +104,11 @@ public class SjGfjsLbzdbfController extends BaseController
@PostMapping @PostMapping
public AjaxResult add(@RequestBody SjGfjsLbzdbf sjGfjsLbzdbf) public AjaxResult add(@RequestBody SjGfjsLbzdbf sjGfjsLbzdbf)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-帮扶组-练兵指导帮扶", "新增练兵指导帮扶", "新增");
return toAjax(sjGfjsLbzdbfService.insertSjGfjsLbzdbf(sjGfjsLbzdbf)); return toAjax(sjGfjsLbzdbfService.insertSjGfjsLbzdbf(sjGfjsLbzdbf));
} }
...@@ -103,6 +120,11 @@ public class SjGfjsLbzdbfController extends BaseController ...@@ -103,6 +120,11 @@ public class SjGfjsLbzdbfController extends BaseController
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody SjGfjsLbzdbf sjGfjsLbzdbf) public AjaxResult edit(@RequestBody SjGfjsLbzdbf sjGfjsLbzdbf)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-帮扶组-练兵指导帮扶", "修改练兵指导帮扶", "修改");
return toAjax(sjGfjsLbzdbfService.updateSjGfjsLbzdbf(sjGfjsLbzdbf)); return toAjax(sjGfjsLbzdbfService.updateSjGfjsLbzdbf(sjGfjsLbzdbf));
} }
...@@ -114,6 +136,11 @@ public class SjGfjsLbzdbfController extends BaseController ...@@ -114,6 +136,11 @@ public class SjGfjsLbzdbfController extends BaseController
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-帮扶组-练兵指导帮扶", "删除练兵指导帮扶", "删除");
return toAjax(sjGfjsLbzdbfService.deleteSjGfjsLbzdbfByIds(ids)); return toAjax(sjGfjsLbzdbfService.deleteSjGfjsLbzdbfByIds(ids));
} }
} }
...@@ -11,9 +11,12 @@ import java.util.stream.Collectors; ...@@ -11,9 +11,12 @@ import java.util.stream.Collectors;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.qianhe.common.constant.HttpStatus; import com.qianhe.common.constant.HttpStatus;
import com.qianhe.common.core.domain.entity.SysUser;
import com.qianhe.common.utils.SecurityUtils;
import com.qianhe.domain.*; import com.qianhe.domain.*;
import com.qianhe.service.IGgFjbService; import com.qianhe.service.IGgFjbService;
import com.qianhe.service.ISjBzxxService; import com.qianhe.service.ISjBzxxService;
import com.qianhe.util.LogUtil;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
...@@ -55,6 +58,11 @@ public class SjGfjsXjbzController extends BaseController ...@@ -55,6 +58,11 @@ public class SjGfjsXjbzController extends BaseController
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(SjGfjsXjbz sjGfjsXjbz) public TableDataInfo list(SjGfjsXjbz sjGfjsXjbz)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-星级班组", "查询星级班组", "查询");
startPage(); startPage();
List<SjGfjsXjbz> list = sjGfjsXjbzService.selectSjGfjsXjbzList(sjGfjsXjbz); List<SjGfjsXjbz> list = sjGfjsXjbzService.selectSjGfjsXjbzList(sjGfjsXjbz);
return getDataTable(list); return getDataTable(list);
...@@ -65,6 +73,11 @@ public class SjGfjsXjbzController extends BaseController ...@@ -65,6 +73,11 @@ public class SjGfjsXjbzController extends BaseController
@GetMapping("/listAll") @GetMapping("/listAll")
public Map<String,Object> listAll(SjGfjsXjbz sjGfjsXjbz){ public Map<String,Object> listAll(SjGfjsXjbz sjGfjsXjbz){
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-星级班组", "查询星级班组", "查询");
Map<String,Object> map=new HashMap<>(); Map<String,Object> map=new HashMap<>();
Long deptId = sjGfjsXjbz.getDeptId(); Long deptId = sjGfjsXjbz.getDeptId();
String nd = sjGfjsXjbz.getNd(); String nd = sjGfjsXjbz.getNd();
...@@ -146,6 +159,11 @@ public class SjGfjsXjbzController extends BaseController ...@@ -146,6 +159,11 @@ public class SjGfjsXjbzController extends BaseController
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, SjGfjsXjbz sjGfjsXjbz) public void export(HttpServletResponse response, SjGfjsXjbz sjGfjsXjbz)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-星级班组", "导出星级班组", "导出");
List<SjGfjsXjbz> list = sjGfjsXjbzService.selectSjGfjsXjbzList(sjGfjsXjbz); List<SjGfjsXjbz> list = sjGfjsXjbzService.selectSjGfjsXjbzList(sjGfjsXjbz);
ExcelUtil<SjGfjsXjbz> util = new ExcelUtil<SjGfjsXjbz>(SjGfjsXjbz.class); ExcelUtil<SjGfjsXjbz> util = new ExcelUtil<SjGfjsXjbz>(SjGfjsXjbz.class);
util.exportExcel(response, list, "三基 规范建设 星级班组数据"); util.exportExcel(response, list, "三基 规范建设 星级班组数据");
...@@ -157,6 +175,11 @@ public class SjGfjsXjbzController extends BaseController ...@@ -157,6 +175,11 @@ public class SjGfjsXjbzController extends BaseController
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-星级班组", "查询星级班组", "查询");
return success(sjGfjsXjbzService.selectSjGfjsXjbzById(id)); return success(sjGfjsXjbzService.selectSjGfjsXjbzById(id));
} }
...@@ -167,6 +190,11 @@ public class SjGfjsXjbzController extends BaseController ...@@ -167,6 +190,11 @@ public class SjGfjsXjbzController extends BaseController
@PostMapping @PostMapping
public AjaxResult add(@RequestBody SjGfjsXjbz sjGfjsXjbz) public AjaxResult add(@RequestBody SjGfjsXjbz sjGfjsXjbz)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-星级班组", "新增星级班组", "新增");
return toAjax(sjGfjsXjbzService.insertSjGfjsXjbz(sjGfjsXjbz)); return toAjax(sjGfjsXjbzService.insertSjGfjsXjbz(sjGfjsXjbz));
} }
...@@ -177,6 +205,11 @@ public class SjGfjsXjbzController extends BaseController ...@@ -177,6 +205,11 @@ public class SjGfjsXjbzController extends BaseController
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody SjGfjsXjbz sjGfjsXjbz) public AjaxResult edit(@RequestBody SjGfjsXjbz sjGfjsXjbz)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-星级班组", "修改星级班组", "修改");
return toAjax(sjGfjsXjbzService.updateSjGfjsXjbz(sjGfjsXjbz)); return toAjax(sjGfjsXjbzService.updateSjGfjsXjbz(sjGfjsXjbz));
} }
...@@ -187,18 +220,33 @@ public class SjGfjsXjbzController extends BaseController ...@@ -187,18 +220,33 @@ public class SjGfjsXjbzController extends BaseController
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-星级班组", "删除星级班组", "删除");
return toAjax(sjGfjsXjbzService.deleteSjGfjsXjbzByIds(ids)); return toAjax(sjGfjsXjbzService.deleteSjGfjsXjbzByIds(ids));
} }
@PutMapping("/pledit") @PutMapping("/pledit")
public AjaxResult pledit(@RequestBody List<SjGfjsXjbz> list) public AjaxResult pledit(@RequestBody List<SjGfjsXjbz> list)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-星级班组", "修改星级班组", "修改");
return toAjax(sjGfjsXjbzService.pledit(list)); return toAjax(sjGfjsXjbzService.pledit(list));
} }
//批量提交 ids //批量提交 ids
@PostMapping("/pltj") @PostMapping("/pltj")
public AjaxResult pltj(@RequestBody SjGfjsXjbz fjx) public AjaxResult pltj(@RequestBody SjGfjsXjbz fjx)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-星级班组", "修改星级班组", "修改");
fjx.setZt("1"); fjx.setZt("1");
return toAjax(sjGfjsXjbzService.plxg(fjx)); return toAjax(sjGfjsXjbzService.plxg(fjx));
} }
......
...@@ -4,6 +4,7 @@ import com.qianhe.common.annotation.Log; ...@@ -4,6 +4,7 @@ import com.qianhe.common.annotation.Log;
import com.qianhe.common.core.controller.BaseController; import com.qianhe.common.core.controller.BaseController;
import com.qianhe.common.core.domain.AjaxResult; import com.qianhe.common.core.domain.AjaxResult;
import com.qianhe.common.core.domain.entity.SysDept; import com.qianhe.common.core.domain.entity.SysDept;
import com.qianhe.common.core.domain.entity.SysUser;
import com.qianhe.common.core.page.TableDataInfo; import com.qianhe.common.core.page.TableDataInfo;
import com.qianhe.common.enums.BusinessType; import com.qianhe.common.enums.BusinessType;
import com.qianhe.common.exception.BusinessException; import com.qianhe.common.exception.BusinessException;
...@@ -17,6 +18,7 @@ import com.qianhe.domain.SjZdbfZsdwkhpj; ...@@ -17,6 +18,7 @@ import com.qianhe.domain.SjZdbfZsdwkhpj;
import com.qianhe.mapper.SjGfjsZdgzMapper; import com.qianhe.mapper.SjGfjsZdgzMapper;
import com.qianhe.service.ISjGfjsYdjcjlService; import com.qianhe.service.ISjGfjsYdjcjlService;
import com.qianhe.system.mapper.SysDeptMapper; import com.qianhe.system.mapper.SysDeptMapper;
import com.qianhe.util.LogUtil;
import org.apache.poi.ss.usermodel.*; import org.apache.poi.ss.usermodel.*;
import org.apache.poi.xssf.usermodel.XSSFRow; import org.apache.poi.xssf.usermodel.XSSFRow;
import org.apache.poi.xssf.usermodel.XSSFSheet; import org.apache.poi.xssf.usermodel.XSSFSheet;
...@@ -59,6 +61,11 @@ public class SjGfjsYdjcjlController extends BaseController ...@@ -59,6 +61,11 @@ public class SjGfjsYdjcjlController extends BaseController
public TableDataInfo list(SjGfjsYdjcjl sjGfjsYdjcjl) public TableDataInfo list(SjGfjsYdjcjl sjGfjsYdjcjl)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-基层单位-月度问题清单", "查询月度问题", "查询");
sjGfjsYdjcjl.setJcjb("基层单位自查"); sjGfjsYdjcjl.setJcjb("基层单位自查");
startPage(); startPage();
List<SjGfjsYdjcjl> list = sjGfjsYdjcjlService.selectSjGfjsYdjcjlList(sjGfjsYdjcjl); List<SjGfjsYdjcjl> list = sjGfjsYdjcjlService.selectSjGfjsYdjcjlList(sjGfjsYdjcjl);
...@@ -202,6 +209,11 @@ public class SjGfjsYdjcjlController extends BaseController ...@@ -202,6 +209,11 @@ public class SjGfjsYdjcjlController extends BaseController
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-基层单位-月度问题清单", "查询月度问题", "查询");
return success(sjGfjsYdjcjlService.selectSjGfjsYdjcjlById(id)); return success(sjGfjsYdjcjlService.selectSjGfjsYdjcjlById(id));
} }
...@@ -212,6 +224,11 @@ public class SjGfjsYdjcjlController extends BaseController ...@@ -212,6 +224,11 @@ public class SjGfjsYdjcjlController extends BaseController
@PostMapping @PostMapping
public AjaxResult add(@RequestBody SjGfjsYdjcjl sjGfjsYdjcjl) public AjaxResult add(@RequestBody SjGfjsYdjcjl sjGfjsYdjcjl)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-基层单位-月度问题清单", "新增月度问题", "新增");
sjGfjsYdjcjl.setJcjb("基层单位自查"); sjGfjsYdjcjl.setJcjb("基层单位自查");
sjGfjsYdjcjl.setYl3(sjGfjsYdjcjl.getDeptId()); sjGfjsYdjcjl.setYl3(sjGfjsYdjcjl.getDeptId());
return toAjax(sjGfjsYdjcjlService.insertSjGfjsYdjcjl(sjGfjsYdjcjl)); return toAjax(sjGfjsYdjcjlService.insertSjGfjsYdjcjl(sjGfjsYdjcjl));
...@@ -224,6 +241,11 @@ public class SjGfjsYdjcjlController extends BaseController ...@@ -224,6 +241,11 @@ public class SjGfjsYdjcjlController extends BaseController
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody SjGfjsYdjcjl sjGfjsYdjcjl) public AjaxResult edit(@RequestBody SjGfjsYdjcjl sjGfjsYdjcjl)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-基层单位-月度问题清单", "修改月度问题", "新增");
sjGfjsYdjcjl.setJcjb("基层单位自查"); sjGfjsYdjcjl.setJcjb("基层单位自查");
sjGfjsYdjcjl.setYl3(sjGfjsYdjcjl.getDeptId()); sjGfjsYdjcjl.setYl3(sjGfjsYdjcjl.getDeptId());
return toAjax(sjGfjsYdjcjlService.updateSjGfjsYdjcjl(sjGfjsYdjcjl)); return toAjax(sjGfjsYdjcjlService.updateSjGfjsYdjcjl(sjGfjsYdjcjl));
...@@ -237,6 +259,11 @@ public class SjGfjsYdjcjlController extends BaseController ...@@ -237,6 +259,11 @@ public class SjGfjsYdjcjlController extends BaseController
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-基层单位-月度问题清单", "删除月度问题", "删除");
return toAjax(sjGfjsYdjcjlService.deleteSjGfjsYdjcjlByIds(ids)); return toAjax(sjGfjsYdjcjlService.deleteSjGfjsYdjcjlByIds(ids));
} }
......
...@@ -3,13 +3,16 @@ package com.qianhe.controller; ...@@ -3,13 +3,16 @@ package com.qianhe.controller;
import com.qianhe.common.annotation.Log; import com.qianhe.common.annotation.Log;
import com.qianhe.common.core.controller.BaseController; import com.qianhe.common.core.controller.BaseController;
import com.qianhe.common.core.domain.AjaxResult; import com.qianhe.common.core.domain.AjaxResult;
import com.qianhe.common.core.domain.entity.SysUser;
import com.qianhe.common.core.page.TableDataInfo; import com.qianhe.common.core.page.TableDataInfo;
import com.qianhe.common.enums.BusinessType; import com.qianhe.common.enums.BusinessType;
import com.qianhe.common.utils.SecurityUtils;
import com.qianhe.common.utils.StringUtils; import com.qianhe.common.utils.StringUtils;
import com.qianhe.common.utils.poi.ExcelUtil; import com.qianhe.common.utils.poi.ExcelUtil;
import com.qianhe.domain.SjGfjsZdgz; import com.qianhe.domain.SjGfjsZdgz;
import com.qianhe.domain.SjGfjsZdgzCb; import com.qianhe.domain.SjGfjsZdgzCb;
import com.qianhe.service.ISjGfjsZdgzService; import com.qianhe.service.ISjGfjsZdgzService;
import com.qianhe.util.LogUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -36,6 +39,11 @@ public class SjGfjsZdgzController extends BaseController ...@@ -36,6 +39,11 @@ public class SjGfjsZdgzController extends BaseController
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(SjGfjsZdgz sjGfjsZdgz) public TableDataInfo list(SjGfjsZdgz sjGfjsZdgz)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-标准维护-重点工作清单", "查询重点工作清单", "查询");
startPage(); startPage();
List<SjGfjsZdgz> list = sjGfjsZdgzService.selectSjGfjsZdgzList(sjGfjsZdgz); List<SjGfjsZdgz> list = sjGfjsZdgzService.selectSjGfjsZdgzList(sjGfjsZdgz);
return getDataTable(list); return getDataTable(list);
...@@ -74,6 +82,11 @@ public class SjGfjsZdgzController extends BaseController ...@@ -74,6 +82,11 @@ public class SjGfjsZdgzController extends BaseController
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-标准维护-重点工作清单", "查询重点工作清单", "查询");
return success(sjGfjsZdgzService.selectSjGfjsZdgzById(id)); return success(sjGfjsZdgzService.selectSjGfjsZdgzById(id));
} }
...@@ -85,6 +98,11 @@ public class SjGfjsZdgzController extends BaseController ...@@ -85,6 +98,11 @@ public class SjGfjsZdgzController extends BaseController
@PostMapping @PostMapping
public AjaxResult add(@RequestBody SjGfjsZdgz sjGfjsZdgz) public AjaxResult add(@RequestBody SjGfjsZdgz sjGfjsZdgz)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-标准维护-重点工作清单", "新增重点工作清单", "新增");
return toAjax(sjGfjsZdgzService.insertSjGfjsZdgz(sjGfjsZdgz)); return toAjax(sjGfjsZdgzService.insertSjGfjsZdgz(sjGfjsZdgz));
} }
...@@ -96,6 +114,11 @@ public class SjGfjsZdgzController extends BaseController ...@@ -96,6 +114,11 @@ public class SjGfjsZdgzController extends BaseController
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody SjGfjsZdgz sjGfjsZdgz) public AjaxResult edit(@RequestBody SjGfjsZdgz sjGfjsZdgz)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-标准维护-重点工作清单", "修改重点工作清单", "修改");
return toAjax(sjGfjsZdgzService.updateSjGfjsZdgz(sjGfjsZdgz)); return toAjax(sjGfjsZdgzService.updateSjGfjsZdgz(sjGfjsZdgz));
} }
...@@ -107,6 +130,11 @@ public class SjGfjsZdgzController extends BaseController ...@@ -107,6 +130,11 @@ public class SjGfjsZdgzController extends BaseController
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-标准维护-重点工作清单", "删除重点工作清单", "删除");
return toAjax(sjGfjsZdgzService.deleteSjGfjsZdgzByIds(ids)); return toAjax(sjGfjsZdgzService.deleteSjGfjsZdgzByIds(ids));
} }
......
...@@ -5,9 +5,11 @@ import com.qianhe.common.constant.HttpStatus; ...@@ -5,9 +5,11 @@ import com.qianhe.common.constant.HttpStatus;
import com.qianhe.common.core.controller.BaseController; import com.qianhe.common.core.controller.BaseController;
import com.qianhe.common.core.domain.AjaxResult; import com.qianhe.common.core.domain.AjaxResult;
import com.qianhe.common.core.domain.entity.SysDept; import com.qianhe.common.core.domain.entity.SysDept;
import com.qianhe.common.core.domain.entity.SysUser;
import com.qianhe.common.core.page.TableDataInfo; import com.qianhe.common.core.page.TableDataInfo;
import com.qianhe.common.enums.BusinessType; import com.qianhe.common.enums.BusinessType;
import com.qianhe.common.exception.BusinessException; import com.qianhe.common.exception.BusinessException;
import com.qianhe.common.utils.SecurityUtils;
import com.qianhe.common.utils.StringUtils; import com.qianhe.common.utils.StringUtils;
import com.qianhe.domain.*; import com.qianhe.domain.*;
import com.qianhe.mapper.SjGfjsYdjcjlMapper; import com.qianhe.mapper.SjGfjsYdjcjlMapper;
...@@ -15,6 +17,7 @@ import com.qianhe.mapper.SjGfjsZdgzMapper; ...@@ -15,6 +17,7 @@ import com.qianhe.mapper.SjGfjsZdgzMapper;
import com.qianhe.mapper.SjGfjsZsdwwtcjMapper; import com.qianhe.mapper.SjGfjsZsdwwtcjMapper;
import com.qianhe.service.*; import com.qianhe.service.*;
import com.qianhe.system.mapper.SysDeptMapper; import com.qianhe.system.mapper.SysDeptMapper;
import com.qianhe.util.LogUtil;
import org.apache.poi.ss.usermodel.*; import org.apache.poi.ss.usermodel.*;
import org.apache.poi.ss.util.CellRangeAddress; import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.poi.xssf.usermodel.XSSFRow; import org.apache.poi.xssf.usermodel.XSSFRow;
...@@ -78,6 +81,11 @@ public class SjGfjsZsdwkhpjController extends BaseController ...@@ -78,6 +81,11 @@ public class SjGfjsZsdwkhpjController extends BaseController
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(SjGfjsZsdwkhpj sjGfjsZsdwkhpj) public TableDataInfo list(SjGfjsZsdwkhpj sjGfjsZsdwkhpj)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-直属单位-分档评价", "查询直属单位-分档评价", "查询");
startPage(); startPage();
List<SjGfjsZsdwkhpj> list = sjGfjsZsdwkhpjService.selectSjGfjsZsdwkhpjList(sjGfjsZsdwkhpj); List<SjGfjsZsdwkhpj> list = sjGfjsZsdwkhpjService.selectSjGfjsZsdwkhpjList(sjGfjsZsdwkhpj);
return getDataTable(list); return getDataTable(list);
...@@ -91,6 +99,11 @@ public class SjGfjsZsdwkhpjController extends BaseController ...@@ -91,6 +99,11 @@ public class SjGfjsZsdwkhpjController extends BaseController
public Map<String,Object> listAll(SjGfjsZsdwkhpj sjGfjsZsdwkhpj) public Map<String,Object> listAll(SjGfjsZsdwkhpj sjGfjsZsdwkhpj)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-直属单位-分档评价", "查询直属单位-分档评价", "查询");
Map<String,Object> map=new HashMap<>(); Map<String,Object> map=new HashMap<>();
Long deptId = sjGfjsZsdwkhpj.getDeptId(); Long deptId = sjGfjsZsdwkhpj.getDeptId();
String nd = sjGfjsZsdwkhpj.getNd(); String nd = sjGfjsZsdwkhpj.getNd();
...@@ -222,6 +235,11 @@ public class SjGfjsZsdwkhpjController extends BaseController ...@@ -222,6 +235,11 @@ public class SjGfjsZsdwkhpjController extends BaseController
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, SjGfjsZsdwkhpj sjGfjsZsdwkhpj) public void export(HttpServletResponse response, SjGfjsZsdwkhpj sjGfjsZsdwkhpj)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-直属单位-分档评价", "导出直属单位-分档评价", "导出");
sjGfjsZsdwkhpj.setJb("直属单位"); sjGfjsZsdwkhpj.setJb("直属单位");
List<SjGfjsZsdwkhpj> list = sjGfjsZsdwkhpjService.selectSjGfjsZsdwkhpjList(sjGfjsZsdwkhpj); List<SjGfjsZsdwkhpj> list = sjGfjsZsdwkhpjService.selectSjGfjsZsdwkhpjList(sjGfjsZsdwkhpj);
...@@ -342,6 +360,11 @@ public class SjGfjsZsdwkhpjController extends BaseController ...@@ -342,6 +360,11 @@ public class SjGfjsZsdwkhpjController extends BaseController
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-直属单位-分档评价", "查询直属单位-分档评价", "查询");
return success(sjGfjsZsdwkhpjService.selectSjGfjsZsdwkhpjById(id)); return success(sjGfjsZsdwkhpjService.selectSjGfjsZsdwkhpjById(id));
} }
...@@ -352,6 +375,11 @@ public class SjGfjsZsdwkhpjController extends BaseController ...@@ -352,6 +375,11 @@ public class SjGfjsZsdwkhpjController extends BaseController
@PostMapping @PostMapping
public AjaxResult add(@RequestBody SjGfjsZsdwkhpj sjGfjsZsdwkhpj) public AjaxResult add(@RequestBody SjGfjsZsdwkhpj sjGfjsZsdwkhpj)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-直属单位-分档评价", "新增分档评价", "新增");
return toAjax(sjGfjsZsdwkhpjService.insertSjGfjsZsdwkhpj(sjGfjsZsdwkhpj)); return toAjax(sjGfjsZsdwkhpjService.insertSjGfjsZsdwkhpj(sjGfjsZsdwkhpj));
} }
...@@ -362,6 +390,11 @@ public class SjGfjsZsdwkhpjController extends BaseController ...@@ -362,6 +390,11 @@ public class SjGfjsZsdwkhpjController extends BaseController
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody SjGfjsZsdwkhpj sjGfjsZsdwkhpj) public AjaxResult edit(@RequestBody SjGfjsZsdwkhpj sjGfjsZsdwkhpj)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-直属单位-分档评价", "修改分档评价", "修改");
return toAjax(sjGfjsZsdwkhpjService.updateSjGfjsZsdwkhpj(sjGfjsZsdwkhpj)); return toAjax(sjGfjsZsdwkhpjService.updateSjGfjsZsdwkhpj(sjGfjsZsdwkhpj));
} }
...@@ -372,6 +405,11 @@ public class SjGfjsZsdwkhpjController extends BaseController ...@@ -372,6 +405,11 @@ public class SjGfjsZsdwkhpjController extends BaseController
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-直属单位-分档评价", "删除分档评价", "删除");
return toAjax(sjGfjsZsdwkhpjService.deleteSjGfjsZsdwkhpjByIds(ids)); return toAjax(sjGfjsZsdwkhpjService.deleteSjGfjsZsdwkhpjByIds(ids));
} }
...@@ -382,6 +420,11 @@ public class SjGfjsZsdwkhpjController extends BaseController ...@@ -382,6 +420,11 @@ public class SjGfjsZsdwkhpjController extends BaseController
@PutMapping("/pledit") @PutMapping("/pledit")
public AjaxResult pledit(@RequestBody List<SjGfjsZsdwkhpj> list) public AjaxResult pledit(@RequestBody List<SjGfjsZsdwkhpj> list)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-直属单位-分档评价", "删除分档评价", "删除");
return toAjax(sjGfjsZsdwkhpjService.pledit(list)); return toAjax(sjGfjsZsdwkhpjService.pledit(list));
} }
/** /**
...@@ -403,6 +446,11 @@ public class SjGfjsZsdwkhpjController extends BaseController ...@@ -403,6 +446,11 @@ public class SjGfjsZsdwkhpjController extends BaseController
@PostMapping("/importData") @PostMapping("/importData")
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception{ public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception{
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-直属单位-分档评价", "导入分档评价", "导入");
XSSFWorkbook workbook = null; XSSFWorkbook workbook = null;
// List<SysDept> deptList = sysDeptMapper.selectDeptList(new SysDept()); // List<SysDept> deptList = sysDeptMapper.selectDeptList(new SysDept());
...@@ -464,6 +512,12 @@ public class SjGfjsZsdwkhpjController extends BaseController ...@@ -464,6 +512,12 @@ public class SjGfjsZsdwkhpjController extends BaseController
} catch (IOException e) { } catch (IOException e) {
e.getMessage(); e.getMessage();
e.printStackTrace(); e.printStackTrace();
//日志
//SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzscErr(u, "三基考核", "三基考核-直属单位-分档评价", "导入分档评价", "调用接口异常",
"导入分档评价报错", "1级");
throw new BusinessException("导入Excel失败,请联系网站管理员!"); throw new BusinessException("导入Excel失败,请联系网站管理员!");
} finally { } finally {
...@@ -478,6 +532,11 @@ public class SjGfjsZsdwkhpjController extends BaseController ...@@ -478,6 +532,11 @@ public class SjGfjsZsdwkhpjController extends BaseController
@GetMapping("/fdjgList") @GetMapping("/fdjgList")
public TableDataInfo fdjgList(SjGfjsZsdwkhpjZb sjGfjsZsdwkhpjZb) public TableDataInfo fdjgList(SjGfjsZsdwkhpjZb sjGfjsZsdwkhpjZb)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-直属单位-分档结果", "查询分档结果", "查询");
sjGfjsZsdwkhpjZb.setZt("1"); sjGfjsZsdwkhpjZb.setZt("1");
sjGfjsZsdwkhpjZb.setJb("直属单位"); sjGfjsZsdwkhpjZb.setJb("直属单位");
List<SjGfjsZsdwkhpjZb> list = sjGfjsZsdwkhpjZbService.selectSjGfjsZsdwkhpjZbList(sjGfjsZsdwkhpjZb); List<SjGfjsZsdwkhpjZb> list = sjGfjsZsdwkhpjZbService.selectSjGfjsZsdwkhpjZbList(sjGfjsZsdwkhpjZb);
...@@ -488,6 +547,11 @@ public class SjGfjsZsdwkhpjController extends BaseController ...@@ -488,6 +547,11 @@ public class SjGfjsZsdwkhpjController extends BaseController
@PutMapping("/editZsdwPm") @PutMapping("/editZsdwPm")
public AjaxResult edit(@RequestBody SjGfjsZsdwkhpjZb in) public AjaxResult edit(@RequestBody SjGfjsZsdwkhpjZb in)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-直属单位-分档结果", "修改分档结果", "修改");
Long in_id = in.getId(); Long in_id = in.getId();
int in_pm = in.getPm(); int in_pm = in.getPm();
if (in_id == null) { if (in_id == null) {
...@@ -524,6 +588,11 @@ public class SjGfjsZsdwkhpjController extends BaseController ...@@ -524,6 +588,11 @@ public class SjGfjsZsdwkhpjController extends BaseController
@PostMapping("/exportFdjg") @PostMapping("/exportFdjg")
public void exportFdjg(HttpServletResponse response, SjGfjsZsdwkhpjZb sjGfjsZsdwkhpjZb) public void exportFdjg(HttpServletResponse response, SjGfjsZsdwkhpjZb sjGfjsZsdwkhpjZb)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-直属单位-分档结果", "导出分档结果", "导出");
sjGfjsZsdwkhpjZb.setZt("1"); sjGfjsZsdwkhpjZb.setZt("1");
sjGfjsZsdwkhpjZb.setJb("直属单位"); sjGfjsZsdwkhpjZb.setJb("直属单位");
List<SjGfjsZsdwkhpjZb> list = sjGfjsZsdwkhpjZbService.selectSjGfjsZsdwkhpjZbList(sjGfjsZsdwkhpjZb); List<SjGfjsZsdwkhpjZb> list = sjGfjsZsdwkhpjZbService.selectSjGfjsZsdwkhpjZbList(sjGfjsZsdwkhpjZb);
...@@ -609,6 +678,11 @@ public class SjGfjsZsdwkhpjController extends BaseController ...@@ -609,6 +678,11 @@ public class SjGfjsZsdwkhpjController extends BaseController
public AjaxResult ctJclrwt(SjGfjsZsdwkhpj sjGfjsZsdwkhpj) public AjaxResult ctJclrwt(SjGfjsZsdwkhpj sjGfjsZsdwkhpj)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-直属单位-分档结果", "修改分档结果", "修改");
Map<String,Object> map = new HashMap<>(); Map<String,Object> map = new HashMap<>();
Long deptId = sjGfjsZsdwkhpj.getDeptId(); Long deptId = sjGfjsZsdwkhpj.getDeptId();
String nd = sjGfjsZsdwkhpj.getNd(); String nd = sjGfjsZsdwkhpj.getNd();
...@@ -647,6 +721,11 @@ public class SjGfjsZsdwkhpjController extends BaseController ...@@ -647,6 +721,11 @@ public class SjGfjsZsdwkhpjController extends BaseController
@PostMapping("/editFdjgzt") @PostMapping("/editFdjgzt")
public AjaxResult updateFdjg_zt(@RequestBody SjGfjsZsdwkhpjZb in) public AjaxResult updateFdjg_zt(@RequestBody SjGfjsZsdwkhpjZb in)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "三基考核", "三基考核-直属单位-分档结果", "修改分档结果", "修改");
String nd = in.getNd(); String nd = in.getNd();
String zqfw = in.getZqfw(); String zqfw = in.getZqfw();
Long deptId = in.getDeptId(); Long deptId = in.getDeptId();
......
...@@ -12,11 +12,14 @@ import javax.servlet.http.HttpServletResponse; ...@@ -12,11 +12,14 @@ import javax.servlet.http.HttpServletResponse;
import cn.javaex.officejj.word.WordUtils; import cn.javaex.officejj.word.WordUtils;
import com.alibaba.fastjson2.JSONObject; import com.alibaba.fastjson2.JSONObject;
import com.qianhe.common.core.domain.entity.SysUser;
import com.qianhe.common.utils.DateUtils; import com.qianhe.common.utils.DateUtils;
import com.qianhe.common.utils.SecurityUtils;
import com.qianhe.common.utils.StringUtils; import com.qianhe.common.utils.StringUtils;
import com.qianhe.domain.Vo.SjLhscVo; import com.qianhe.domain.Vo.SjLhscVo;
import com.qianhe.service.IGgFjbService; import com.qianhe.service.IGgFjbService;
import com.qianhe.util.LogUtil;
import org.apache.poi.xwpf.usermodel.XWPFDocument; import org.apache.poi.xwpf.usermodel.XWPFDocument;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -91,6 +94,9 @@ public class SjLhscController extends BaseController ...@@ -91,6 +94,9 @@ public class SjLhscController extends BaseController
sjLhsc.setEndJd(endJd); sjLhsc.setEndJd(endJd);
} }
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "例会通报", "例会通报-直属例会上传", "查询例会上传信息", "查询");
List<SjLhsc> list = sjLhscService.selectSjLhscList(sjLhsc); List<SjLhsc> list = sjLhscService.selectSjLhscList(sjLhsc);
return getDataTable(list); return getDataTable(list);
...@@ -167,6 +173,11 @@ public class SjLhscController extends BaseController ...@@ -167,6 +173,11 @@ public class SjLhscController extends BaseController
@Log(title = "三基-例会上传", businessType = BusinessType.INSERT) @Log(title = "三基-例会上传", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody SjLhsc sjLhsc) throws Exception { public AjaxResult add(@RequestBody SjLhsc sjLhsc) throws Exception {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "例会通报", "例会通报-直属例会上传", "新增例会上传信息", "新增");
// sjLhsc.setYxqk(URLDecoder.decode(sjLhsc.getYxqk(), "utf-8")); // sjLhsc.setYxqk(URLDecoder.decode(sjLhsc.getYxqk(), "utf-8"));
// sjLhsc.setJjwt(URLDecoder.decode(sjLhsc.getJjwt(), "utf-8")); // sjLhsc.setJjwt(URLDecoder.decode(sjLhsc.getJjwt(), "utf-8"));
// sjLhsc.setTgjy(URLDecoder.decode(sjLhsc.getTgjy(), "utf-8")); // sjLhsc.setTgjy(URLDecoder.decode(sjLhsc.getTgjy(), "utf-8"));
...@@ -189,6 +200,11 @@ public class SjLhscController extends BaseController ...@@ -189,6 +200,11 @@ public class SjLhscController extends BaseController
@Log(title = "三基-例会上传", businessType = BusinessType.UPDATE) @Log(title = "三基-例会上传", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody SjLhsc sjLhsc) throws UnsupportedEncodingException { public AjaxResult edit(@RequestBody SjLhsc sjLhsc) throws UnsupportedEncodingException {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "例会通报", "例会通报-直属例会上传", "修改例会上传信息", "修改");
// sjLhsc.setYxqk(URLDecoder.decode(sjLhsc.getYxqk(), "utf-8")); // sjLhsc.setYxqk(URLDecoder.decode(sjLhsc.getYxqk(), "utf-8"));
// sjLhsc.setJjwt(URLDecoder.decode(sjLhsc.getJjwt(), "utf-8")); // sjLhsc.setJjwt(URLDecoder.decode(sjLhsc.getJjwt(), "utf-8"));
// sjLhsc.setTgjy(URLDecoder.decode(sjLhsc.getTgjy(), "utf-8")); // sjLhsc.setTgjy(URLDecoder.decode(sjLhsc.getTgjy(), "utf-8"));
...@@ -210,6 +226,11 @@ public class SjLhscController extends BaseController ...@@ -210,6 +226,11 @@ public class SjLhscController extends BaseController
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "例会通报", "例会通报-直属例会上传", "删除例会上传信息", "删除");
return toAjax(sjLhscService.deleteSjLhscByIds(ids)); return toAjax(sjLhscService.deleteSjLhscByIds(ids));
} }
...@@ -294,6 +315,10 @@ public class SjLhscController extends BaseController ...@@ -294,6 +315,10 @@ public class SjLhscController extends BaseController
@GetMapping("/tjByEjSfsc") @GetMapping("/tjByEjSfsc")
public TableDataInfo tjByEjSfsc(SjLhscVo vo) public TableDataInfo tjByEjSfsc(SjLhscVo vo)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "例会通报", "例会通报-直属例会统计", "查询直属例会统计信息", "查询");
vo.setDwjb("3"); vo.setDwjb("3");
String nd=""; String nd="";
if(StringUtils.isNotEmpty(vo.getNd())){ if(StringUtils.isNotEmpty(vo.getNd())){
...@@ -404,6 +429,10 @@ public class SjLhscController extends BaseController ...@@ -404,6 +429,10 @@ public class SjLhscController extends BaseController
@GetMapping("/listYtjLhgx") @GetMapping("/listYtjLhgx")
public TableDataInfo listYtjLhgx(SjLhsc sjLhsc) public TableDataInfo listYtjLhgx(SjLhsc sjLhsc)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "例会通报", "例会通报-例会共享", "查询例会共享信息", "查询");
startPage(); startPage();
sjLhsc.setZt("已提交"); sjLhsc.setZt("已提交");
String nd=""; String nd="";
...@@ -441,6 +470,10 @@ public class SjLhscController extends BaseController ...@@ -441,6 +470,10 @@ public class SjLhscController extends BaseController
@GetMapping("/getInfoLhgx/{id}") @GetMapping("/getInfoLhgx/{id}")
public AjaxResult getInfoLhgx(@PathVariable("id") Long id) public AjaxResult getInfoLhgx(@PathVariable("id") Long id)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "例会通报", "例会通报-例会共享", "查询例会共享信息", "查询");
return success(sjLhscService.selectSjLhscById(id)); return success(sjLhscService.selectSjLhscById(id));
} }
...@@ -451,6 +484,11 @@ public class SjLhscController extends BaseController ...@@ -451,6 +484,11 @@ public class SjLhscController extends BaseController
*/ */
@PostMapping("/export_word") @PostMapping("/export_word")
public void export_word(HttpServletResponse response, SjLhsc sjLhsc) throws Exception { public void export_word(HttpServletResponse response, SjLhsc sjLhsc) throws Exception {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "例会通报", "例会通报-例会共享", "导出例会共享信息", "导出");
SjLhsc sjLhsc1 = sjLhscService.selectSjLhscById(sjLhsc.getId()); SjLhsc sjLhsc1 = sjLhscService.selectSjLhscById(sjLhsc.getId());
//获取模板 //获取模板
XWPFDocument word = WordUtils.getDocxFromResource("/wordTemp/lhmb.docx"); XWPFDocument word = WordUtils.getDocxFromResource("/wordTemp/lhmb.docx");
......
...@@ -9,6 +9,7 @@ import javax.servlet.http.HttpServletResponse; ...@@ -9,6 +9,7 @@ import javax.servlet.http.HttpServletResponse;
import com.qianhe.common.config.RuoYiConfig; import com.qianhe.common.config.RuoYiConfig;
import com.qianhe.common.constant.Constants; import com.qianhe.common.constant.Constants;
import com.qianhe.common.core.domain.entity.SysUser;
import com.qianhe.common.exception.BusinessException; import com.qianhe.common.exception.BusinessException;
import com.qianhe.common.utils.SecurityUtils; import com.qianhe.common.utils.SecurityUtils;
import com.qianhe.common.utils.StringUtils; import com.qianhe.common.utils.StringUtils;
...@@ -16,6 +17,7 @@ import com.qianhe.common.utils.ip.IpUtils; ...@@ -16,6 +17,7 @@ import com.qianhe.common.utils.ip.IpUtils;
import com.qianhe.domain.GgFjb; import com.qianhe.domain.GgFjb;
import com.qianhe.domain.SjZdsc; import com.qianhe.domain.SjZdsc;
import com.qianhe.service.IGgFjbService; import com.qianhe.service.IGgFjbService;
import com.qianhe.util.LogUtil;
import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.usermodel.WorkbookFactory; import org.apache.poi.ss.usermodel.WorkbookFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -49,6 +51,11 @@ public class SjZdscController extends BaseController ...@@ -49,6 +51,11 @@ public class SjZdscController extends BaseController
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(SjZdsc sjZdsc) public TableDataInfo list(SjZdsc sjZdsc)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "文件手册", "文件手册-文件管理", "查询上传三基制度标准、基层单位三册", "查询");
startPage(); startPage();
List<SjZdsc> list = sjZdscService.selectSjZdscList(sjZdsc); List<SjZdsc> list = sjZdscService.selectSjZdscList(sjZdsc);
return getDataTable(list); return getDataTable(list);
...@@ -72,6 +79,11 @@ public class SjZdscController extends BaseController ...@@ -72,6 +79,11 @@ public class SjZdscController extends BaseController
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "文件手册", "文件手册-文件管理", "查询上传三基制度标准、基层单位三册", "查询");
return success(sjZdscService.selectSjZdscById(id)); return success(sjZdscService.selectSjZdscById(id));
} }
...@@ -82,6 +94,11 @@ public class SjZdscController extends BaseController ...@@ -82,6 +94,11 @@ public class SjZdscController extends BaseController
@PostMapping @PostMapping
public AjaxResult add(@RequestBody SjZdsc sjZdsc) public AjaxResult add(@RequestBody SjZdsc sjZdsc)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "文件手册", "文件手册-文件管理", "新增上传三基制度标准、基层单位三册", "新增");
int i = sjZdscService.insertSjZdsc(sjZdsc); int i = sjZdscService.insertSjZdsc(sjZdsc);
String fileListStr1 = sjZdsc.getFileListStr1(); String fileListStr1 = sjZdsc.getFileListStr1();
...@@ -97,6 +114,11 @@ public class SjZdscController extends BaseController ...@@ -97,6 +114,11 @@ public class SjZdscController extends BaseController
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody SjZdsc sjZdsc) public AjaxResult edit(@RequestBody SjZdsc sjZdsc)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "文件手册", "文件手册-文件管理", "修改上传三基制度标准、基层单位三册", "修改");
String fileListStr1 = sjZdsc.getFileListStr1(); String fileListStr1 = sjZdsc.getFileListStr1();
int i1 = fjbService.batchSaveFj(sjZdsc.getId()+"", "基层三册", "基层三册", fileListStr1); int i1 = fjbService.batchSaveFj(sjZdsc.getId()+"", "基层三册", "基层三册", fileListStr1);
...@@ -110,6 +132,11 @@ public class SjZdscController extends BaseController ...@@ -110,6 +132,11 @@ public class SjZdscController extends BaseController
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "文件手册", "文件手册-文件管理", "删除上传三基制度标准、基层单位三册", "删除");
return toAjax(sjZdscService.deleteSjZdscByIds(ids)); return toAjax(sjZdscService.deleteSjZdscByIds(ids));
} }
...@@ -197,6 +224,11 @@ public class SjZdscController extends BaseController ...@@ -197,6 +224,11 @@ public class SjZdscController extends BaseController
// } // }
@RequestMapping(value = "/exportZip", method = {RequestMethod.GET, RequestMethod.POST}) @RequestMapping(value = "/exportZip", method = {RequestMethod.GET, RequestMethod.POST})
public void exportZip(HttpServletResponse response, @RequestBody SjZdsc sjZdsc) throws IOException { public void exportZip(HttpServletResponse response, @RequestBody SjZdsc sjZdsc) throws IOException {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "文件手册", "文件手册-文件管理", "导出上传三基制度标准、基层单位三册", "导出");
Long id = Long.parseLong(sjZdsc.getIds()); Long id = Long.parseLong(sjZdsc.getIds());
SjZdsc en = sjZdscService.selectSjZdscById(id); SjZdsc en = sjZdscService.selectSjZdscById(id);
String zdmc = en.getZdmc(); String zdmc = en.getZdmc();
...@@ -319,6 +351,10 @@ public class SjZdscController extends BaseController ...@@ -319,6 +351,10 @@ public class SjZdscController extends BaseController
@GetMapping("/gxList") @GetMapping("/gxList")
public TableDataInfo gxList(SjZdsc sjZdsc) public TableDataInfo gxList(SjZdsc sjZdsc)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "文件手册", "文件手册-文件共享", "查询共享的文件", "查询");
startPage(); startPage();
sjZdsc.setNowUserName(SecurityUtils.getUsername()); sjZdsc.setNowUserName(SecurityUtils.getUsername());
sjZdsc.setNowUserDeptId(String.valueOf(SecurityUtils.getDeptId())); sjZdsc.setNowUserDeptId(String.valueOf(SecurityUtils.getDeptId()));
...@@ -331,6 +367,10 @@ public class SjZdscController extends BaseController ...@@ -331,6 +367,10 @@ public class SjZdscController extends BaseController
@GetMapping("/gxgkList") @GetMapping("/gxgkList")
public TableDataInfo gxgkList(SjZdsc sjZdsc) public TableDataInfo gxgkList(SjZdsc sjZdsc)
{ {
//日志
SysUser u = SecurityUtils.getLoginUser().getUser();
LogUtil.mkrzsc(u, "文件手册", "文件手册-文件共享", "查询共享的文件", "查询");
startPage(); startPage();
sjZdsc.setNowUserName(SecurityUtils.getUsername()); sjZdsc.setNowUserName(SecurityUtils.getUsername());
sjZdsc.setNowUserDeptId(String.valueOf(SecurityUtils.getDeptId())); sjZdsc.setNowUserDeptId(String.valueOf(SecurityUtils.getDeptId()));
......
...@@ -4,6 +4,9 @@ import com.google.gson.Gson; ...@@ -4,6 +4,9 @@ import com.google.gson.Gson;
import com.google.gson.GsonBuilder; import com.google.gson.GsonBuilder;
import com.google.gson.JsonObject; import com.google.gson.JsonObject;
import com.google.gson.JsonParser; import com.google.gson.JsonParser;
import com.qianhe.common.core.domain.entity.SysUser;
import com.qianhe.common.utils.DateUtils;
import com.qianhe.common.utils.ServletUtils;
import com.qianhe.common.utils.ip.IpUtils; import com.qianhe.common.utils.ip.IpUtils;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
...@@ -13,9 +16,7 @@ import java.net.InetAddress; ...@@ -13,9 +16,7 @@ import java.net.InetAddress;
import java.net.MalformedURLException; import java.net.MalformedURLException;
import java.net.URL; import java.net.URL;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date; import java.util.*;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid; import javax.validation.Valid;
...@@ -26,15 +27,193 @@ public class LogUtil { ...@@ -26,15 +27,193 @@ public class LogUtil {
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
//发送日志请求 //发送日志请求
Map<String, Object> map = new HashMap<>(); Map<String, Object> map1 = new HashMap<>();
map.put("name", "John"); map1.put("UserName", "袁华");
map.put("age", 30); map1.put("Uid", "yuanh88");
map.put("isStudent", false); map1.put("age", 30);
JsonObject jsonObject = sendSysLog("LoginLog", map); map1.put("DateTime", DateUtils.getTime());
map1.put("OrgName", "油气井下作业中心");
map1.put("DeptName", "滨南作业区");
map1.put("DeptFullName", "/中国石化/胜利油田/胜利油田分公司/油气井下作业中心/滨南作业区/滨二作业项目部/");
map1.put("isStudent", false);
map1.put("Type", "登录");
map1.put("Status", "成功");
Map<String, Object> map2 = new HashMap<>();
map2.put("UserName", "范新静");
map2.put("Uid", "fanxj888");
map2.put("age", 30);
map2.put("DateTime", DateUtils.getTime());
map2.put("OrgName", "机关管理服务中心");
map2.put("DeptName", "机关服务部");
map2.put("DeptFullName", "/中国石化/胜利油田/胜利石油管理局有限公司/机关管理服务中心/机关服务部/领导班子/");
map2.put("isStudent", false);
map2.put("Type", "登录");
map2.put("Status", "成功");
Map<String, Object> map3 = new HashMap<>();
map3.put("UserName", "卢新甫");
map3.put("Uid", "luxf37");
map3.put("age", 30);
map3.put("DateTime", DateUtils.getTime());
map3.put("OrgName", "河口采油厂");
map3.put("DeptName", "工艺研究所");
map3.put("DeptFullName", "/中国石化/胜利油田/胜利油田分公司/河口采油厂/工艺研究所/综合管理室/");
map3.put("isStudent", false);
map3.put("Type", "登录");
map3.put("Status", "成功");
Map<String, Object> map4 = new HashMap<>();
map4.put("UserName", "刘圆");
map4.put("Uid", "liuy22795");
map4.put("age", 30);
map4.put("DateTime", DateUtils.getTime());
map4.put("OrgName", "天然气销售公司");
map4.put("DeptName", "输配气项目部");
map4.put("DeptFullName", "/中国石化/胜利油田/胜利油田分公司/天然气销售公司/输配气项目部/经营管理室/");
map4.put("isStudent", false);
map4.put("Type", "登录");
map4.put("Status", "成功");
Map<String, Object> map5 = new HashMap<>();
map5.put("UserName", "王爱丽");
map5.put("Uid", "wangal95");
map5.put("age", 30);
map5.put("DateTime", DateUtils.getTime());
map5.put("OrgName", "老年服务管理中心");
map5.put("DeptName", "科院老年服务部");
map5.put("DeptFullName", "/中国石化/胜利油田/胜利石油管理局有限公司/老年服务管理中心/科院老年服务部/老年服务站/");
map5.put("isStudent", false);
map5.put("Type", "登录");
map5.put("Status", "成功");
Map<String, Object> map6 = new HashMap<>();
map6.put("UserName", "刘海军");
map6.put("Uid", "liuhj288");
map6.put("age", 30);
map6.put("DateTime", DateUtils.getTime());
map6.put("OrgName", "供水分公司");
map6.put("DeptName", "采出液处理中心");
map6.put("DeptFullName", "/中国石化/胜利油田/胜利石油管理局有限公司/供水分公司/采出液处理中心/综合管理室/");
map6.put("isStudent", false);
map6.put("Type", "登录");
map6.put("Status", "成功");
Map<String, Object> map7 = new HashMap<>();
map7.put("UserName", "张晓敏");
map7.put("Uid", "zhangxm673");
map7.put("age", 30);
map7.put("DateTime", DateUtils.getTime());
map7.put("OrgName", "供水分公司");
map7.put("DeptName", "管理部门");
map7.put("DeptFullName", "/中国石化/胜利油田/胜利石油管理局有限公司/供水分公司/管理部门/经营管理部(三基工作办公/");
map7.put("isStudent", false);
map7.put("Type", "登录");
map7.put("Status", "成功");
Map<String, Object> map8 = new HashMap<>();
map8.put("UserName", "王青海");
map8.put("Uid", "wangqh1784");
// map8.put("age", 30);
map8.put("DateTime", DateUtils.getTime());
// map8.put("OrgName", "供水分公司");
// map8.put("DeptName", "管理部门");
map8.put("DeptFullName", "/中国石化/胜利油田/外部人员改制企业/山东谦和云科技有限公司/");
map8.put("isStudent", false);
map8.put("Type", "登录");
map8.put("Status", "成功");
List<Map<String, Object>> lm = new ArrayList<>();
lm.add(map1);
lm.add(map2);
lm.add(map3);
lm.add(map4);
lm.add(map5);
lm.add(map6);
lm.add(map7);
lm.add(map8);
for(int i = 7; i < lm.size(); i++) {
Map map = lm.get(i);
// JsonObject jsonObject = sendSysLog("LoginLog", map);
// //获取日志
// JsonObject sysLog = getSysLog();
//
// map.put("ResourceName", "分档评价");//月度问题记录
// map.put("OperationInfo", "新增");
// map.put("Type", "新增");
// JsonObject jsonObject2 = sendSysLog("UserOpeLog", map);
map.put("ErrorMessage", "调用接口异常");
map.put("Type", "调用接口异常");
map.put("Level", "1级");//故障
JsonObject jsonObject3 = sendSysLog("ErrorLog", map);
// map.put("Type", "Type");
// map.put("Status", "成功");
// map.put("CostTime", "1500");
// map.put("ServerAddress", "http://ydsj.slof.com:9034/prod-api/system/sjGfjsJcdwkhpj/edit");
// map.put("ClientIP", "10.66.1.17");
// map.put("IServiceName", "修改分档评价");
// JsonObject jsonObject4 = sendSysLog("IServiceLog", map);
}
}
//模块日志上传接口
public static String mkrzsc(SysUser u, String mkmc, String qlj, String czmc, String czlx)
{
Map<String, Object> map1 = new HashMap<>();
map1.put("UserName", u.getNickName());
map1.put("Uid", u.getUserName());
// map1.put("age", 30);
map1.put("DateTime", DateUtils.getTime());
// map1.put("OrgName", orgName);
// map1.put("DeptName", dptName);
map1.put("DeptFullName", u.getRemark());
map1.put("isStudent", false);
map1.put("Status", "成功");
map1.put("ResourceName", mkmc);//月度问题记录 "分档评价"
map1.put("ResourceFullPath", qlj);//全路径
map1.put("OperationInfo", czmc);//"新增"
map1.put("Type", czlx);//"新增"
try {
JsonObject jsonObject = sendSysLog("UserOpeLog", map1);
//获取日志 //获取日志
JsonObject sysLog = getSysLog(); JsonObject sysLog = getSysLog();
} catch (Exception e) {
e.printStackTrace();
}
return "";
} }
//模块日志上传接口
public static String mkrzscErr(SysUser u, String mkmc, String qlj, String czmc, String type, String errorMessage, String level)
{
Map<String, Object> map1 = new HashMap<>();
map1.put("UserName", u.getNickName());
map1.put("Uid", u.getUserName());
// map1.put("age", 30);
map1.put("DateTime", DateUtils.getTime());
// map1.put("OrgName", orgName);
// map1.put("DeptName", dptName);
map1.put("DeptFullName", u.getRemark());
map1.put("isStudent", false);
map1.put("Status", "成功");
map1.put("ResourceName", mkmc);//月度问题记录 "分档评价"
map1.put("ResourceFullPath", qlj);//全路径
map1.put("OperationInfo", czmc);//"新增"
map1.put("Type", type);//"新增"
map1.put("ErrorMessage", errorMessage);//"新增"
map1.put("Level", level);//"新增"
try {
JsonObject jsonObject = sendSysLog("ErrorLog", map1);
//获取日志
JsonObject sysLog = getSysLog();
} catch (Exception e) {
e.printStackTrace();
}
return "";
}
/** /**
* 发送日志请求 * 发送日志请求
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment