| | |
| | | machine.setProgTempDir(vo.getProgTempDir()); |
| | | machine.setStatus(vo.getStatus()); |
| | | machine.setRemark(vo.getRemark()); |
| | | machine.setSendDirExpiryHours(vo.getSendDirExpiryHours()); |
| | | machine.setReceiveDirExpiryHours(vo.getReceiveDirExpiryHours()); |
| | | |
| | | return this.updateById(machine); |
| | | } |
| | |
| | | */ |
| | | private String progSendDir; |
| | | /** |
| | | * send文件夹保持时间 小时 |
| | | */ |
| | | private Integer sendDirExpiryHours; |
| | | /** |
| | | * 程序回传目录', |
| | | */ |
| | | private String progReceiveDir; |
| | | |
| | | /** |
| | | * receive文件夹保持时间 小时 |
| | | */ |
| | | private Integer receiveDirExpiryHours; |
| | | /** |
| | | * 程序长期存储目录 |
| | | */ |
| | |
| | | private String progTempDir; |
| | | @Schema(description = "备注") |
| | | private String remark; |
| | | |
| | | @Schema(description = "send文件夹保持时间 小时") |
| | | private Integer sendDirExpiryHours; |
| | | |
| | | |
| | | @Schema(description = "receive文件夹保持时间 小时") |
| | | private Integer receiveDirExpiryHours; |
| | | } |
| | |
| | | private String progTempDir; |
| | | @Schema(description = "备注") |
| | | private String remark; |
| | | |
| | | @Schema(description = "send文件夹保持时间 小时") |
| | | private Integer sendDirExpiryHours; |
| | | |
| | | |
| | | @Schema(description = "receive文件夹保持时间 小时") |
| | | private Integer receiveDirExpiryHours; |
| | | } |
| | |
| | | |
| | | //TODO 偏离单,和已经固化的程序,没有处理,:已经处理没有验证 |
| | | NcNode packageNode; |
| | | if(FlowContants.Y.equals(props.getHasCuredProgram()) && FlowContants.Y.equals(props.getCureProgramUseable())){ |
| | | if(FlowContants.Y.equals(props.getHasCuredProgram())){ |
| | | //有固化,且程序可用,从固化树查询节点.使用流程中保存的节点 |
| | | //packageNode = ncNodeService.getLastEditionCuredProgramPackage(programPkgName,props.getProcessEdition()); |
| | | packageNode = ncNodeService.getById(props.getCuredNodeId()); |
| | | if(FlowContants.Y.equals(props.getCureProgramUseable())) { |
| | | packageNode = ncNodeService.getById(props.getCuredNodeId()); |
| | | }else{ |
| | | //不可用,去固化找最新节点 |
| | | packageNode = ncNodeService.getLastEditionCuredProgramPackage(programPkgName,props.getProcessEdition()); |
| | | } |
| | | }else if(Func.isNotBlank(props.getDeviation())){ |
| | | //有偏离单 |
| | | packageNode = ncNodeService.getLastEditionDeviationProgramPackage(programPkgName,props.getProcessEdition()); |
| | |
| | | //有固化,程序不可用 |
| | | if(FlowContants.N.equals(progProperties.getCureProgramUseable())) { |
| | | //固化程序不可用,需要重新建立程序包名和文件节点;可用情况在流程审批中已经升级过节点了 |
| | | NcNode curedProgramPackage = ncNodeService.getById(Func.toLong(progProperties.getCuredNodeId())); |
| | | NcNode curedProgramPackage = ncNodeService.getById(progProperties.getCuredNodeId()); |
| | | |
| | | NcNode newCuredPkgNode = new NcNode(); |
| | | BeanUtils.copyProperties(curedProgramPackage, newCuredPkgNode); |
| | |
| | | |
| | | return R.data(list); |
| | | } |
| | | @GetMapping("/search") |
| | | @Operation(summary = "首页搜索", description = "搜索指定零组件号") |
| | | public R<List<Long>> search(NcNodeQueryVO queryVO) { |
| | | @GetMapping("/search-list2") |
| | | @Operation(summary = "涉密网首页搜索", description = "搜索指定零组件号") |
| | | public R<List<NcNodeVO>> search(NcNodeQueryVO queryVO) { |
| | | if(Func.isEmpty(queryVO.getDrawingNo())){ |
| | | return R.fail("请输入零组件号"); |
| | | } |
| | | List<Long> list = ncNodeService.searchDrawing(queryVO); |
| | | List<NcNodeVO> list = ncNodeService.searchList2(queryVO); |
| | | |
| | | return R.data(list); |
| | | } |
| | |
| | | */ |
| | | NcNode getLastProgramNode(String name); |
| | | |
| | | /** |
| | | * 首页搜索 老的 |
| | | * @param queryVO |
| | | * @return |
| | | */ |
| | | List<NcNodeVO> searchList(NcNodeOldQueryVO queryVO); |
| | | |
| | | /** |
| | | * 首页搜索 |
| | | * @param queryVO |
| | | * @return |
| | | */ |
| | | List<NcNodeVO> searchList2(NcNodeQueryVO queryVO); |
| | | |
| | | List<NcNodeVO> searchListInIds(List<Long> ids); |
| | | |
| | | /** |
| | |
| | | where n.is_deleted=0 and n.parent_id in (select id from mdm_nc_node where parent_id=#{parentNode.parentId}) and n.name=#{name} |
| | | |
| | | </select> |
| | | <select id="searchList2" resultType="org.springblade.mdm.program.vo.NcNodeVO"> |
| | | select <include refid="all_columns_n"/>,dt.dict_value as node_type_name,u.name create_user_name,( |
| | | SELECT |
| | | CASE WHEN count(1) > 0 THEN 1 ELSE 0 END |
| | | FROM |
| | | mdm_nc_node |
| | | WHERE |
| | | parent_id = n.id and is_deleted = 0 |
| | | ) AS "has_children" from mdm_nc_node n left join blade_user u on n.create_user=u.id |
| | | left join blade_dict_biz dt on n.node_type=dt.dict_key and dt.code='nc_node_type' and dt.is_deleted=0 |
| | | <where> |
| | | n.is_deleted=0 and n.node_type='20' and n.name=#{drawingNo} |
| | | <if test="programStatus != null and programStatus != ''"> |
| | | and |
| | | ( |
| | | <if test='programStatus.contains("1")'> |
| | | n.parent_ids LIKE '0,1,%' |
| | | </if> |
| | | <if test='programStatus.contains("2")'> |
| | | or n.parent_ids LIKE '0,2,%' |
| | | </if> |
| | | <if test='programStatus.contains("2")'> |
| | | or n.parent_ids LIKE '0,3,%' |
| | | </if> |
| | | ) |
| | | </if> |
| | | </where> |
| | | |
| | | |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | * @param queryVO |
| | | * @return |
| | | */ |
| | | /* |
| | | public List<Long> searchDrawing(NcNodeQueryVO queryVO) { |
| | | List<NcNode> nodes = lambdaQuery().eq(NcNode::getNodeType,NcNode.TYPE_DRAWING_NO) |
| | | .eq(NcNode::getIsLastEdition,1) |
| | |
| | | }).list(); |
| | | |
| | | return nodes.stream().map(NcNode::getId).toList(); |
| | | } |
| | | }*/ |
| | | /** |
| | | * 首页树查询 |
| | | * @param queryVO |
| | |
| | | return rootVos; |
| | | } |
| | | |
| | | /** |
| | | * 首页搜索 新的 |
| | | * @param queryVO 查询参数 |
| | | * @return |
| | | */ |
| | | public List<NcNodeVO> searchList2(NcNodeQueryVO queryVO) { |
| | | //1.根据零组件号和创建时间查询初始列表,查询的原始列表,需要hasChild字段,所以使用mapper.xml |
| | | List<NcNodeVO> oriList = this.getBaseMapper().searchList2(queryVO); |
| | | |
| | | |
| | | List<NcNodeVO> allVos = new ArrayList<>();//已经加入过的节点,用于去重 |
| | | List<NcNodeVO> rootVos = new ArrayList<>(); |
| | | |
| | | for(NcNodeVO vo : oriList){ |
| | | allVos.add(vo); |
| | | //上级各级的节点 |
| | | List<NcNodeVO> parents = this.getBaseMapper().searchListInIds(Func.toLongList(vo.getParentIds())); |
| | | |
| | | for(NcNodeVO pvo : parents){ |
| | | if(pvo.getParentId() == 0L){ |
| | | rootVos.add(pvo); |
| | | } |
| | | allVos.add(pvo); |
| | | } |
| | | } |
| | | for(NcNodeVO root : rootVos){ |
| | | addNodeChildren(root, allVos); |
| | | } |
| | | return rootVos; |
| | | } |
| | | |
| | | void addNodeChildren(NcNodeVO node, List<NcNodeVO> allNodes) { |
| | | for(NcNodeVO vo : allNodes){ |
| | | if(Objects.equals(vo.getParentId(), node.getId())){ |