Merge branch 'dev-nx' of http://192.168.0.56:3000/bonus/devicesmgt into dev-nx
This commit is contained in:
commit
7cb36cbbcb
|
|
@ -2,6 +2,13 @@
|
|||
server:
|
||||
port: 29200
|
||||
|
||||
|
||||
# Spring Boot Actuator V2中风险漏洞处理,禁止远程端口访问
|
||||
management:
|
||||
endpoint:
|
||||
env:
|
||||
enabled: false
|
||||
|
||||
# Spring
|
||||
spring:
|
||||
application:
|
||||
|
|
@ -14,11 +21,11 @@ spring:
|
|||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 127.0.0.1:8848
|
||||
server-addr: 192.168.0.14:8848
|
||||
namespace: sgzb_cloud_dev
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 127.0.0.1:8848
|
||||
server-addr: 192.168.0.14:8848
|
||||
namespace: sgzb_cloud_dev
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
|
|
|
|||
|
|
@ -27,11 +27,11 @@ spring:
|
|||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 127.0.0.1:8848
|
||||
server-addr: 192.168.0.14:8848
|
||||
namespace: sgzb_cloud_dev
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 127.0.0.1:8848
|
||||
server-addr: 192.168.0.14:8848
|
||||
namespace: sgzb_cloud_dev
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
|
|
|
|||
|
|
@ -2,6 +2,13 @@
|
|||
server:
|
||||
port: 29301
|
||||
|
||||
|
||||
# Spring Boot Actuator V2中风险漏洞处理,禁止远程端口访问
|
||||
management:
|
||||
endpoint:
|
||||
env:
|
||||
enabled: false
|
||||
|
||||
# Spring
|
||||
spring:
|
||||
application:
|
||||
|
|
@ -21,11 +28,11 @@ spring:
|
|||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 127.0.0.1:8848
|
||||
server-addr: 192.168.0.14:8848
|
||||
namespace: sgzb_cloud_dev
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 127.0.0.1:8848
|
||||
server-addr: 192.168.0.14:8848
|
||||
namespace: sgzb_cloud_dev
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
|
|
|
|||
|
|
@ -480,7 +480,7 @@
|
|||
|
||||
<select id="getAuditListByLeaseTmTask" resultType="com.bonus.sgzb.app.domain.TmTask">
|
||||
SELECT DISTINCT
|
||||
tt.*, su.phonenumber AS phoneNumber, sd.dept_name as deptName,
|
||||
tt.*, su.phonenumber AS phoneNumber, sd.dept_name as deptName,su.nick_name as nickName,
|
||||
bpl.lot_id as proId,bpl.lot_name as proName,
|
||||
bui.unit_id as unitId,bui.unit_name as unitName,
|
||||
lai.lease_person as leasePerson, lai.phone as leasePhone, tt.create_by as applyFor,d.`name` as taskName,lai.lease_type as leaseType,lai.estimate_lease_time as estimateLeaseTime,
|
||||
|
|
|
|||
|
|
@ -226,7 +226,7 @@ public class BackApplyServiceImpl implements BackApplyService {
|
|||
Long companyId = null;
|
||||
try {
|
||||
roles = SecurityUtils.getLoginUser().getRoles();
|
||||
userid = SecurityUtils.getLoginUser().getUserid();
|
||||
userid = SecurityUtils.getLoginUser().getSysUser().getUserId();
|
||||
companyId = SecurityUtils.getLoginUser().getSysUser().getCompanyId();
|
||||
} catch (NullPointerException e) {
|
||||
e.printStackTrace();
|
||||
|
|
@ -249,10 +249,8 @@ public class BackApplyServiceImpl implements BackApplyService {
|
|||
return AjaxResult.error("审核失败");
|
||||
}
|
||||
}
|
||||
if ((roles != null && roles.contains("jjfgs")) || (companyId != null && companyId.equals(101L))) {
|
||||
if (companyId != null) {
|
||||
if (companyId != null && companyId.equals(101L)) {
|
||||
bean.setCompanyId(companyId.toString());
|
||||
}
|
||||
if (userid != null) {
|
||||
bean.setCreateBy(userid.toString());
|
||||
}
|
||||
|
|
@ -262,10 +260,8 @@ public class BackApplyServiceImpl implements BackApplyService {
|
|||
return AjaxResult.error("审核失败");
|
||||
}
|
||||
}
|
||||
if ((roles != null && roles.contains("tsfgs")) || (companyId != null && companyId.equals(102L))) {
|
||||
if (companyId != null) {
|
||||
if (companyId != null && companyId.equals(102L)) {
|
||||
bean.setCompanyId(companyId.toString());
|
||||
}
|
||||
if (userid != null) {
|
||||
bean.setCreateBy(userid.toString());
|
||||
}
|
||||
|
|
@ -320,7 +316,7 @@ public class BackApplyServiceImpl implements BackApplyService {
|
|||
for (int i = 0; i < ids.length; i++) {
|
||||
String id = ids[i];
|
||||
bean.setId(Long.valueOf(id));
|
||||
if (userId == 1) {
|
||||
if (roles.contains("admin")) {
|
||||
bean.setCreateBy(userId.toString());
|
||||
bean.setStatus("2");
|
||||
int re = backApplyMapper.refuse(bean);
|
||||
|
|
@ -328,7 +324,7 @@ public class BackApplyServiceImpl implements BackApplyService {
|
|||
return AjaxResult.error("驳回失败");
|
||||
}
|
||||
}
|
||||
if (roles.contains("jjfgs")) {
|
||||
if (companyId != null && companyId.equals(101L)) {
|
||||
bean.setCompanyId(companyId.toString());
|
||||
bean.setCreateBy(userId.toString());
|
||||
bean.setStatus("2");
|
||||
|
|
@ -337,7 +333,7 @@ public class BackApplyServiceImpl implements BackApplyService {
|
|||
return AjaxResult.error("驳回失败");
|
||||
}
|
||||
}
|
||||
if (roles.contains("tsfgs")) {
|
||||
if (companyId != null && companyId.equals(102L)) {
|
||||
bean.setCompanyId(companyId.toString());
|
||||
bean.setCreateBy(userId.toString());
|
||||
bean.setStatus("4");
|
||||
|
|
@ -426,7 +422,7 @@ public class BackApplyServiceImpl implements BackApplyService {
|
|||
Long companyId = null;
|
||||
try {
|
||||
roles = SecurityUtils.getLoginUser().getRoles();
|
||||
userid = SecurityUtils.getLoginUser().getUserid();
|
||||
userid = SecurityUtils.getLoginUser().getSysUser().getUserId();
|
||||
companyId = SecurityUtils.getLoginUser().getSysUser().getCompanyId();
|
||||
} catch (NullPointerException e) {
|
||||
e.printStackTrace();
|
||||
|
|
@ -447,10 +443,8 @@ public class BackApplyServiceImpl implements BackApplyService {
|
|||
return AjaxResult.error("审核失败");
|
||||
}
|
||||
}
|
||||
if (roles != null && roles.contains("jjfgs")) {
|
||||
if (companyId != null) {
|
||||
if (companyId != null && companyId.equals(101L)) {
|
||||
dto.setCompanyId(companyId.toString());
|
||||
}
|
||||
if (userid != null) {
|
||||
dto.setCreateBy(userid.toString());
|
||||
}
|
||||
|
|
@ -460,10 +454,8 @@ public class BackApplyServiceImpl implements BackApplyService {
|
|||
return AjaxResult.error("审核失败");
|
||||
}
|
||||
}
|
||||
if (roles != null && roles.contains("tsfgs")) {
|
||||
if (companyId != null) {
|
||||
if (companyId != null && companyId.equals(102L)) {
|
||||
dto.setCompanyId(companyId.toString());
|
||||
}
|
||||
if (userid != null) {
|
||||
dto.setCreateBy(userid.toString());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,12 @@
|
|||
server:
|
||||
port: 29302
|
||||
|
||||
# Spring Boot Actuator V2中风险漏洞处理,禁止远程端口访问
|
||||
management:
|
||||
endpoint:
|
||||
env:
|
||||
enabled: false
|
||||
|
||||
# Spring
|
||||
spring:
|
||||
application:
|
||||
|
|
@ -21,11 +27,11 @@ spring:
|
|||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 127.0.0.1:8848
|
||||
server-addr: 192.168.0.14:8848
|
||||
namespace: sgzb_cloud_dev
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 127.0.0.1:8848
|
||||
server-addr: 192.168.0.14:8848
|
||||
namespace: sgzb_cloud_dev
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
|
|
|
|||
|
|
@ -39,8 +39,7 @@ public class SysOperlogController extends BaseController {
|
|||
|
||||
@RequiresPermissions("system:operlog:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SysOperLog operLog)
|
||||
{
|
||||
public TableDataInfo list(SysOperLog operLog) {
|
||||
startPage();
|
||||
List<SysOperLog> list = operLogService.selectOperLogList(operLog);
|
||||
return getDataTable(list);
|
||||
|
|
@ -49,8 +48,7 @@ public class SysOperlogController extends BaseController {
|
|||
@Log(title = "操作日志", businessType = BusinessType.EXPORT)
|
||||
@RequiresPermissions("system:operlog:export")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SysOperLog operLog)
|
||||
{
|
||||
public void export(HttpServletResponse response, SysOperLog operLog) {
|
||||
List<SysOperLog> list;
|
||||
list = operLogService.selectOperLogList(operLog);
|
||||
//根据前端列表选中选择性列表导出
|
||||
|
|
@ -65,24 +63,21 @@ public class SysOperlogController extends BaseController {
|
|||
@Log(title = "操作日志", businessType = BusinessType.DELETE)
|
||||
@RequiresPermissions("system:operlog:remove")
|
||||
@DeleteMapping("/{operIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] operIds)
|
||||
{
|
||||
public AjaxResult remove(@PathVariable Long[] operIds) {
|
||||
return toAjax(operLogService.deleteOperLogByIds(operIds));
|
||||
}
|
||||
|
||||
@RequiresPermissions("system:operlog:remove")
|
||||
@Log(title = "操作日志", businessType = BusinessType.CLEAN)
|
||||
@DeleteMapping("/clean")
|
||||
public AjaxResult clean()
|
||||
{
|
||||
public AjaxResult clean() {
|
||||
operLogService.cleanOperLog();
|
||||
return success();
|
||||
}
|
||||
|
||||
@InnerAuth
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SysOperLog operLog)
|
||||
{
|
||||
public AjaxResult add(@RequestBody SysOperLog operLog) {
|
||||
return toAjax(operLogService.insertOperlog(operLog));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.bonus.sgzb.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.bonus.sgzb.system.api.domain.SysOperLog;
|
||||
|
|
@ -13,8 +14,7 @@ import com.bonus.sgzb.system.service.ISysOperLogService;
|
|||
* @author ruoyi
|
||||
*/
|
||||
@Service
|
||||
public class SysOperLogServiceImpl implements ISysOperLogService
|
||||
{
|
||||
public class SysOperLogServiceImpl implements ISysOperLogService {
|
||||
@Autowired
|
||||
private SysOperLogMapper operLogMapper;
|
||||
|
||||
|
|
@ -25,8 +25,7 @@ public class SysOperLogServiceImpl implements ISysOperLogService
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertOperlog(SysOperLog operLog)
|
||||
{
|
||||
public int insertOperlog(SysOperLog operLog) {
|
||||
return operLogMapper.insertOperlog(operLog);
|
||||
}
|
||||
|
||||
|
|
@ -37,8 +36,7 @@ public class SysOperLogServiceImpl implements ISysOperLogService
|
|||
* @return 操作日志集合
|
||||
*/
|
||||
@Override
|
||||
public List<SysOperLog> selectOperLogList(SysOperLog operLog)
|
||||
{
|
||||
public List<SysOperLog> selectOperLogList(SysOperLog operLog) {
|
||||
return operLogMapper.selectOperLogList(operLog);
|
||||
}
|
||||
|
||||
|
|
@ -49,8 +47,7 @@ public class SysOperLogServiceImpl implements ISysOperLogService
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteOperLogByIds(Long[] operIds)
|
||||
{
|
||||
public int deleteOperLogByIds(Long[] operIds) {
|
||||
return operLogMapper.deleteOperLogByIds(operIds);
|
||||
}
|
||||
|
||||
|
|
@ -61,8 +58,7 @@ public class SysOperLogServiceImpl implements ISysOperLogService
|
|||
* @return 操作日志对象
|
||||
*/
|
||||
@Override
|
||||
public SysOperLog selectOperLogById(Long operId)
|
||||
{
|
||||
public SysOperLog selectOperLogById(Long operId) {
|
||||
return operLogMapper.selectOperLogById(operId);
|
||||
}
|
||||
|
||||
|
|
@ -70,8 +66,7 @@ public class SysOperLogServiceImpl implements ISysOperLogService
|
|||
* 清空操作日志
|
||||
*/
|
||||
@Override
|
||||
public void cleanOperLog()
|
||||
{
|
||||
public void cleanOperLog() {
|
||||
operLogMapper.cleanOperLog();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -309,6 +309,18 @@ public class SysUserServiceImpl implements ISysUserService {
|
|||
userPostMapper.deleteUserPostByUserId(userId);
|
||||
// 新增用户与岗位管理
|
||||
insertUserPost(user);
|
||||
Long deptId = user.getDeptId();
|
||||
SysDept sysDept = deptMapper.selectDeptById(deptId);
|
||||
String ancestors = sysDept.getAncestors();
|
||||
String[] split = ancestors.split(",");
|
||||
if (split.length == 2) {
|
||||
//表示属于分公司
|
||||
user.setCompanyId(sysDept.getDeptId());
|
||||
}
|
||||
if (split.length >= 3) {
|
||||
//表示属于分公司下的某个部门
|
||||
user.setCompanyId(Long.parseLong(split[2]));
|
||||
}
|
||||
return userMapper.updateUser(user);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,12 @@
|
|||
server:
|
||||
port: 29201
|
||||
|
||||
# Spring Boot Actuator V2中风险漏洞处理,禁止远程端口访问
|
||||
management:
|
||||
endpoint:
|
||||
env:
|
||||
enabled: false
|
||||
|
||||
# Spring
|
||||
spring:
|
||||
servlet:
|
||||
|
|
@ -25,11 +31,11 @@ spring:
|
|||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 127.0.0.1:8848
|
||||
server-addr: 192.168.0.14:8848
|
||||
namespace: sgzb_cloud_dev
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 127.0.0.1:8848
|
||||
server-addr: 192.168.0.14:8848
|
||||
namespace: sgzb_cloud_dev
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
|
|
|
|||
|
|
@ -195,6 +195,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="loginDate != null">login_date = #{loginDate},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="companyId != null">company_id = #{companyId},</if>
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where user_id = #{userId}
|
||||
|
|
|
|||
Loading…
Reference in New Issue