|
@@ -20,6 +20,7 @@ import com.rongwei.rwadmincommon.system.vo.SysUserVo;
|
|
|
import com.rongwei.rwcommon.base.R;
|
|
|
import com.rongwei.rwcommon.utils.SecurityUtil;
|
|
|
import com.rongwei.rwcommonentity.commonservers.vo.SysSerialVo;
|
|
|
+import com.rongwei.safecommon.utils.CXCommonUtils;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -296,7 +297,7 @@ public class MaintenanceServiceImpl implements MaintenanceService {
|
|
|
Object data = serialNumberCode.getData();
|
|
|
maintenanceStandard.setStandardid(JSONObject.parseObject(JSONObject.toJSONString(data), Map.class).get("code").toString());
|
|
|
}
|
|
|
- maintenanceStandard.setTenantid(currentUser.getOrganizationDoList().get(0).getFullpid().split(",")[1])
|
|
|
+ maintenanceStandard.setTenantid(CXCommonUtils.getCurrentUserFactoryId(currentUser))
|
|
|
.setCreatedate(date)
|
|
|
.setModifydate(date)
|
|
|
.setCreateuserid(currentUser.getId())
|
|
@@ -439,7 +440,7 @@ public class MaintenanceServiceImpl implements MaintenanceService {
|
|
|
// 遍历计划部位
|
|
|
for (EquMaintenancePartDo maintenancePart : maintenancePartList) {
|
|
|
SysSerialVo sysSerialVo = new SysSerialVo();
|
|
|
- // String plantSimp = PlantEnum.addrOf(currentUser.getOrganizationDoList().get(0).getFullpid().split(",")[1]);
|
|
|
+ // String plantSimp = PlantEnum.addrOf(CXCommonUtils.getCurrentUserFactoryId(currentUser));
|
|
|
String plantSimp = PlantEnum.addrOf(maintenancePart.getTenantid());
|
|
|
sysSerialVo.setModulecode("equ_maintenance_task_aq_code_" + plantSimp);
|
|
|
sysSerialVo.setResetrule("date:yyyy");
|
|
@@ -497,7 +498,7 @@ public class MaintenanceServiceImpl implements MaintenanceService {
|
|
|
.setModifyuserid(currentUser.getId())
|
|
|
.setModifyusername(currentUser.getName())
|
|
|
.setModifydate(newDate)
|
|
|
- .setTenantid(currentUser.getOrganizationDoList().get(0).getFullpid().split(",")[1]);
|
|
|
+ .setTenantid(CXCommonUtils.getCurrentUserFactoryId(currentUser));
|
|
|
return equPartsSetoutTaskDo;
|
|
|
}).collect(Collectors.toList())).flatMap(Collection::stream).distinct().collect(Collectors.toList());
|
|
|
}
|