From 73be743ff89b54fa14fb07afa72e6d833406a381 Mon Sep 17 00:00:00 2001
From: cuilei <ray_tsu1@163.com>
Date: 星期一, 16 六月 2025 16:49:09 +0800
Subject: [PATCH] 工具管理-调整参数导入增加集团公司编码、标记、工具简称字段
---
lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/DeviceInfoServiceImpl.java | 37 +++----------------------------------
1 files changed, 3 insertions(+), 34 deletions(-)
diff --git a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/DeviceInfoServiceImpl.java b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/DeviceInfoServiceImpl.java
index 0a2e79f..83c0181 100644
--- a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/DeviceInfoServiceImpl.java
+++ b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/DeviceInfoServiceImpl.java
@@ -1,6 +1,5 @@
package org.jeecg.modules.dnc.service.impl;
-import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.shiro.SecurityUtils;
@@ -12,7 +11,6 @@
import org.jeecg.modules.dnc.service.*;
import org.jeecg.modules.dnc.service.support.DeviceTreeWrapper;
-import org.jeecg.modules.dnc.ucenter.UserDepartExt;
import org.jeecg.modules.dnc.utils.ValidateUtil;
import org.jeecg.modules.dnc.entity.*;
import org.jeecg.modules.mdc.entity.MdcEquipment;
@@ -63,8 +61,6 @@
@Lazy
private IProductInfoService productInfoService;
@Autowired
- private INcLogInfoService iNcLogInfoService;
- @Autowired
private IMdcProductionService mdcProductionService;
@Autowired
private IMdcEquipmentService mdcEquipmentService;
@@ -100,15 +96,6 @@
if(group == null) {
ExceptionCast.cast(DeviceCode.DEVICE_GROUP_NONE);
}
- //娣诲姞鏃ュ織
- NcLogInfo ncLogInfo = new NcLogInfo();
- //妯″潡
- ncLogInfo.setModuleInfo("璁惧缁撴瀯鏍�");
- //绫诲瀷
- ncLogInfo.setOperateType(2);
- //鏃ュ織鍐呭
- ncLogInfo.setLogContent("璁惧鍚嶇О锛�"+deviceInfo.getDeviceName()+"锛岃澶囩紪鍙凤細"+deviceInfo.getDeviceNo());
- iNcLogInfoService.saveLogNcInfos(ncLogInfo);
boolean b = super.save(deviceInfo);
if(!b) {
ExceptionCast.cast(DeviceCode.DEVICE_SAVE_ERROR);
@@ -151,17 +138,6 @@
ExceptionCast.cast(DeviceCode.DEVICE_NOT_EXIST);
deviceInfo.setDeviceId(id);
deviceInfo.setGroupId(null);
- //娣诲姞鏃ュ織
- NcLogInfo ncLogInfo = new NcLogInfo();
- //妯″潡
- ncLogInfo.setModuleInfo("璁惧缁撴瀯鏍�");
- //绫诲瀷
- ncLogInfo.setOperateType(3);
- //鏃ュ織鍐呭
- ncLogInfo.setLogContent("璁惧鍚嶇О锛�"+deviceInfo.getDeviceName());
- //淇敼淇濆瓨澶囨敞
- ncLogInfo.setRemark(JSONObject.toJSONString(en));
- iNcLogInfoService.saveLogNcInfos(ncLogInfo);
return super.updateById(deviceInfo);
}
@@ -185,15 +161,6 @@
b = devicePermissionStreamService.deleteDepartByDeviceId(en.getGroupId(), en.getDeviceId());
if(!b)
ExceptionCast.cast(CommonCode.FAIL);
- //娣诲姞鏃ュ織
- NcLogInfo ncLogInfo = new NcLogInfo();
- //妯″潡
- ncLogInfo.setModuleInfo("璁惧缁撴瀯鏍�");
- //绫诲瀷
- ncLogInfo.setOperateType(4);
- //鏃ュ織鍐呭
- ncLogInfo.setLogContent("璁惧鍚嶇О锛�"+en.getDeviceName());
- iNcLogInfoService.saveLogNcInfos(ncLogInfo);
return super.removeById(en.getDeviceId());
}
@@ -369,6 +336,8 @@
@Override
@Transactional(rollbackFor = {Exception.class})
public boolean assignAddUser(MdcEquipment mdcEquipment, Collection<SysUser> userList) {
+
+
if(mdcEquipment == null || userList == null || userList.isEmpty())
ExceptionCast.cast(CommonCode.INVALID_PARAM);
MdcProductionEquipment mdcProductionEquipment=mdcProductionEquipmentService
@@ -387,7 +356,7 @@
if(stream == null) {
stream = new DevicePermissionStream();
stream.setUserId(item.getId());
- stream.setGroupId(mdcProductionEquipment.getId());
+ stream.setGroupId(mdcProductionEquipment.getProductionId());
stream.setDeviceId(mdcEquipment.getId());
permissionStreamList.add(stream);
}
--
Gitblit v1.9.3