| | |
| | | @AutoLog(value = "ææ¡£è¡¨-æ¥è¯¢è®¾å¤åéç®å½çææ¡£ç¶æ") |
| | | @ApiOperation(value = "ææ¡£è¡¨-æ¥è¯¢è®¾å¤åéç®å½çææ¡£ç¶æ", notes = "ææ¡£è¡¨-æ¥è¯¢è®¾å¤åéç®å½çææ¡£ç¶æ") |
| | | @GetMapping("/find/page/device/{page}/{size}") |
| | | public QueryPageResponseResult<DocInfo> findPageListByDevice(@PathVariable("page") int page, @PathVariable("size") int size, DocInfoQueryRequest docQuery) { |
| | | return docInfoService.findPageListByDevice(page, size, docQuery); |
| | | public Result<?> findPageListByDevice(@PathVariable("page") int page, @PathVariable("size") int size, DocInfoQueryRequest docQuery) { |
| | | return Result.ok(docInfoService.findPageListByDevice(page, size, docQuery)); |
| | | } |
| | | |
| | | @AutoLog(value = "ææ¡£è¡¨-ææ¡£æä»¶é¢è§") |
| | |
| | | package org.jeecg.modules.dnc.entity; |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.annotation.JsonIgnore; |
| | | import io.swagger.annotations.Api; |
| | | import lombok.Data; |
| | |
| | | private Integer processType; |
| | | @TableField(value = "processing_equipment_model") |
| | | private String processingEquipmentModel; |
| | | @TableField(value = "processing_equipment_os") |
| | | private String processingEquipmentOs; |
| | | @TableField(value = "processing_equipment_code") |
| | | private String processingEquipmentCode; |
| | | @TableField(value = "assemble_step") |
| | |
| | | private String assembleName; |
| | | @TableField(value = "description") |
| | | private String description; |
| | | @JsonIgnore |
| | | @TableField(value = "create_time", select = false, fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8") |
| | | @TableField(value = "create_time", fill = FieldFill.INSERT) |
| | | private Date createTime; |
| | | @JsonIgnore |
| | | @TableField(value = "update_time", select = false, fill = FieldFill.UPDATE) |
| | | @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8") |
| | | @TableField(value = "create_time", fill = FieldFill.INSERT) |
| | | private Date updateTime; |
| | | @JsonIgnore |
| | | @TableField(value = "create_by", select = false, fill = FieldFill.INSERT) |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.annotation.JsonIgnore; |
| | | import io.swagger.annotations.Api; |
| | | import lombok.Data; |
| | |
| | | //å·¥è£
åç§° |
| | | @TableField(value = "assemble_name") |
| | | private String assembleName; |
| | | @JsonIgnore |
| | | @TableField(value = "create_time", select = false, fill = FieldFill.INSERT) |
| | | @TableField(value = "processing_equipment_model") |
| | | private String processingEquipmentModel; |
| | | @TableField(value = "processing_equipment_os") |
| | | private String processingEquipmentOs; |
| | | @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8") |
| | | @TableField(value = "create_time", fill = FieldFill.INSERT) |
| | | private Date createTime; |
| | | @JsonIgnore |
| | | @TableField(value = "update_time", select = false, fill = FieldFill.UPDATE) |
| | | @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8") |
| | | @TableField(value = "create_time", fill = FieldFill.INSERT) |
| | | private Date updateTime; |
| | | @JsonIgnore |
| | | @TableField(value = "create_by", select = false, fill = FieldFill.INSERT) |
| | |
| | | package org.jeecg.modules.dnc.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.jeecg.modules.dnc.dto.DepartApproveUser; |
| | | import org.jeecg.modules.dnc.ucenter.DepartApproveUser; |
| | | |
| | | public interface DepartApproveUserMapper extends BaseMapper<DepartApproveUser> { |
| | | } |
| | |
| | | package org.jeecg.modules.dnc.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.jeecg.modules.dnc.dto.DepartmentUser; |
| | | import org.jeecg.modules.dnc.ucenter.DepartmentUser; |
| | | |
| | | public interface DepartmentUserMapper extends BaseMapper<DepartmentUser> { |
| | | } |
| | |
| | | from nc_device_group where rank_level=1 and delete_flag=0 |
| | | </select> |
| | | <select id="findExtByDeparts" resultMap="deviceGroupExtBaseResult" parameterType="List"> |
| | | select dg.group_id |
| | | select DISTINCT dg.group_id |
| | | , dg.group_name |
| | | , dg.parent_id |
| | | , dg.rank_level |
| | |
| | | package org.jeecg.modules.dnc.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.jeecg.modules.dnc.dto.DepartApproveUser; |
| | | import org.jeecg.modules.dnc.ucenter.DepartApproveUser; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | package org.jeecg.modules.dnc.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.jeecg.modules.dnc.dto.DepartmentUser; |
| | | import org.jeecg.modules.dnc.ucenter.DepartmentUser; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | package org.jeecg.modules.dnc.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.modules.dnc.entity.DocFile; |
| | |
| | | * @param docQuery |
| | | * @return |
| | | */ |
| | | QueryPageResponseResult<DocInfo> findPageListByDevice(int page, int size, DocInfoQueryRequest docQuery); |
| | | IPage<DocInfo> findPageListByDevice(int page, int size, DocInfoQueryRequest docQuery); |
| | | |
| | | /** |
| | | * æ¥è¯¢å¯ææ´¾çææ¡£ä¿¡æ¯å表 |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.jeecg.modules.dnc.dto.DepartApproveUser; |
| | | import org.jeecg.modules.dnc.ucenter.DepartApproveUser; |
| | | import org.jeecg.modules.dnc.mapper.DepartApproveUserMapper; |
| | | import org.jeecg.modules.dnc.service.IDepartApproveUserService; |
| | | import org.jeecg.modules.dnc.utils.ValidateUtil; |
| | |
| | | import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import io.netty.util.internal.StringUtil; |
| | | import org.jeecg.common.constant.CommonConstant; |
| | | import org.jeecg.common.util.oConvertUtils; |
| | | import org.jeecg.modules.activiti.entity.ActivitiDefinition; |
| | | import org.jeecg.modules.activiti.service.IActivitiDefinitionService; |
| | | import org.jeecg.modules.dnc.dto.DepartApproveUser; |
| | | import org.jeecg.modules.dnc.ucenter.DepartApproveUser; |
| | | import org.jeecg.modules.dnc.dto.DepartmentExt; |
| | | import org.jeecg.modules.dnc.dto.DepartmentUser; |
| | | import org.jeecg.modules.dnc.ucenter.DepartmentUser; |
| | | import org.jeecg.modules.dnc.entity.DevicePermissionStream; |
| | | import org.jeecg.modules.dnc.entity.PermissionStream; |
| | | import org.jeecg.modules.dnc.exception.ExceptionCast; |
| | |
| | | import org.jeecg.modules.dnc.service.support.FindsDepartmentChildrenUtil; |
| | | import org.jeecg.modules.dnc.ucenter.Department; |
| | | import org.jeecg.modules.dnc.utils.ValidateUtil; |
| | | import org.jeecg.modules.system.entity.SysDepart; |
| | | import org.jeecg.modules.system.entity.SysUser; |
| | | import org.jeecg.modules.system.model.SysDepartTreeModel; |
| | | import org.jeecg.modules.system.service.ISysUserService; |
| | | import org.jeecg.modules.system.util.FindsDepartsChildrenUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.jeecg.modules.dnc.dto.DepartmentUser; |
| | | import org.jeecg.modules.dnc.ucenter.DepartmentUser; |
| | | import org.jeecg.modules.dnc.exception.ExceptionCast; |
| | | import org.jeecg.modules.dnc.mapper.DepartmentUserMapper; |
| | | import org.jeecg.modules.dnc.response.UcenterCode; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public QueryPageResponseResult<DocInfo> findPageListByDevice(int page, int size, DocInfoQueryRequest docQuery) { |
| | | public IPage<DocInfo> findPageListByDevice(int page, int size, DocInfoQueryRequest docQuery) { |
| | | if(page < 1 || size < 1) { |
| | | ExceptionCast.cast(CommonCode.INVALID_PAGE); |
| | | } |
| | |
| | | d.setSyncStatus(2); |
| | | } |
| | | } |
| | | return new QueryPageResponseResult<>(CommonCode.SUCCESS, docInfoIPage); |
| | | return docInfoIPage; |
| | | } |
| | | |
| | | @Override |
| | |
| | | package org.jeecg.modules.dnc.service.impl; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.apache.shiro.SecurityUtils; |
| | |
| | | @Override |
| | | public List<String> getDepartIdsByParams(Integer nodeType, String paramId) { |
| | | List<String> departIds = new ArrayList<>(); |
| | | if(nodeType == 2) { |
| | | ComponentInfo en = componentInfoService.getById(paramId); |
| | | if(en == null) |
| | | //5-å·¥åº |
| | | if(nodeType == 5) { |
| | | ProcessStream processStream= processStreamService.getById(paramId); |
| | | if(processStream == null) |
| | | return null; |
| | | List<PermissionStream> permissionStreamList = permissionStreamService.getByComponentId(en.getProductId(), en.getComponentId()); |
| | | List<PermissionStream> permissionStreamList = permissionStreamService.list(new QueryWrapper<PermissionStream>() |
| | | .eq(StrUtil.isNotEmpty(processStream.getProductId()),"product_id", processStream.getProductId()) |
| | | .eq(StrUtil.isNotEmpty(processStream.getComponentId()),"component_id",processStream.getComponentId()) |
| | | .eq(StrUtil.isNotEmpty(processStream.getPartsId()),"parts_id", processStream.getPartsId()) |
| | | .eq(StrUtil.isNotEmpty(processStream.getProcessId()),"process_id",processStream.getProcessId())); |
| | | if(permissionStreamList == null || permissionStreamList.isEmpty()) |
| | | return null; |
| | | permissionStreamList.forEach(item -> { |
| | | departIds.add(item.getDepartId()); |
| | | }); |
| | | }else if(nodeType == 3) { |
| | | PartsInfo en = partsInfoService.getById(paramId); |
| | | if(en == null) |
| | | //6-å·¥æ¥ |
| | | }else if(nodeType == 6) { |
| | | WorkStep workStep = workStepService.getById(paramId); |
| | | if(workStep == null) |
| | | return null; |
| | | List<PermissionStream> permissionStreamList = permissionStreamService.getByPartsId(en.getProductId(), en.getComponentId(), en.getPartsId()); |
| | | List<PermissionStream> permissionStreamList = permissionStreamService.list(new QueryWrapper<PermissionStream>() |
| | | .eq(StrUtil.isNotEmpty(workStep.getProductId()),"product_id", workStep.getProductId()) |
| | | .eq(StrUtil.isNotEmpty(workStep.getComponentId()),"component_id",workStep.getComponentId()) |
| | | .eq(StrUtil.isNotEmpty(workStep.getPartsId()),"parts_id", workStep.getPartsId()) |
| | | .eq(StrUtil.isNotEmpty(workStep.getProcessId()),"process_id",workStep.getProcessId()) |
| | | .eq(StrUtil.isNotEmpty(workStep.getId()),"step_id", workStep.getId())); |
| | | if(permissionStreamList == null || permissionStreamList.isEmpty()) |
| | | return null; |
| | | permissionStreamList.forEach(item -> { |
| | |
| | | }else { |
| | | return null; |
| | | } |
| | | //å»é |
| | | Set<String> set = new HashSet<>(departIds); |
| | | departIds.clear(); |
| | | departIds.addAll(set); |
| | | return departIds; |
| | | } |
| | | |
ÎļþÃû´Ó lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/dto/DepartApproveUser.java ÐÞ¸Ä |
| | |
| | | package org.jeecg.modules.dnc.dto; |
| | | package org.jeecg.modules.dnc.ucenter; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
ÎļþÃû´Ó lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/dto/DepartmentUser.java ÐÞ¸Ä |
| | |
| | | package org.jeecg.modules.dnc.dto; |
| | | package org.jeecg.modules.dnc.ucenter; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |