已删除17个文件
已重命名1个文件
已修改23个文件
| | |
| | | import org.apache.tika.utils.StringUtils; |
| | | import org.springblade.core.tenant.annotation.NonDS; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.mdm.flow.entity.FlowProgramFile; |
| | | import org.springblade.mdm.flow.service.FlowProgramFileService; |
| | | import org.springblade.mdm.program.entity.NcNode; |
| | | import org.springblade.mdm.program.service.NcNodeService; |
| | | import org.springblade.mdm.program.service.NcProgramService; |
| | | import org.springblade.mdm.program.service.ProgramFlowStatusQueryService; |
| | | import org.springblade.mdm.program.vo.CompareDataVO; |
| | | import org.springblade.mdm.program.vo.NcNodeQueryVO; |
| | | import org.springblade.mdm.program.vo.NcNodeVO; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ç¨åºèç¹ |
| | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.io.IOUtils; |
| | | import org.springblade.core.log.exception.ServiceException; |
| | | import org.springblade.core.tenant.annotation.NonDS; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.mdm.flow.entity.FlowProgramFile; |
| | | import org.springblade.mdm.flow.service.FlowProgramFileService; |
| | | import org.springblade.mdm.flow.vo.ProgramUploadVO; |
| | | import org.springblade.mdm.program.service.NcProgramService; |
| | | import org.springblade.mdm.program.service.ProcessProgRefService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | |
| | | @Tag(name = "æµç¨ç®¡ç", description = "æµç¨ç®¡ç") |
| | | @Slf4j |
| | | public class FlowProgramController { |
| | | |
| | | private final NcProgramService ncProgramService; |
| | | private final ProcessProgRefService ncProcessProgRefService; |
| | | |
| | | private final FlowProgramFileService flowProgramFileService; |
| | | |
| | |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.flowable.engine.RuntimeService; |
| | | import org.flowable.engine.TaskService; |
| | | import org.flowable.engine.runtime.ProcessInstance; |
| | | import org.flowable.task.api.Task; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.mdm.basesetting.producedivision.entity.ProduceDivision; |
| | | import org.springblade.mdm.basesetting.producedivision.service.ProduceDivisionService; |
| | | import org.springblade.mdm.flow.constants.FlowContants; |
| | | import org.springblade.mdm.flow.excution.StartDispatcher; |
| | | import org.springblade.mdm.flow.service.ApproveRecordService; |
| | | import org.springblade.mdm.flow.service.FlowProgramFileService; |
| | | import org.springblade.mdm.flow.service.ReplaceFlowService; |
| | | import org.springblade.mdm.flow.service.TaskDispatchService; |
| | | import org.springblade.mdm.flow.service.execute.AbstractFlowCompleteService; |
| | | import org.springblade.mdm.flow.service.execute.DefaultFlowCompleteService; |
| | | import org.springblade.mdm.flow.service.execute.TryFlowCompleteService; |
| | | import org.springblade.mdm.flow.vo.ProgramUploadVO; |
| | | import org.springblade.mdm.flow.vo.ReplaceFlowStartVO; |
| | | import org.springblade.mdm.flow.vo.ReplaceUploadVO; |
| | | import org.springblade.mdm.flow.vo.TaskAssignVO; |
| | | import org.springblade.mdm.program.service.ProcessProgRefService; |
| | | import org.springblade.mdm.program.service.ProgramFlowStatusQueryService; |
| | | import org.springblade.mdm.program.vo.NcNodeVO; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Map; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | |
| | | ProcessInstance inst; |
| | | if(startVO.isTemporaryFlow()){ |
| | | vars.put(FlowContants.ASSIGNEE,div.getProgrammerId());//第ä¸ä¸ªç¨æ·ç¼å¶ä¸ä¼ æä»¶ |
| | | vars.put(FlowContants.PROGRAMMER_NAME,userCommonService.getUserNameById(div.getProgrammerId()));//ç¼ç¨åå§å |
| | | |
| | | inst = runtimeService.startProcessInstanceByKey(FlowContants.APPEND_PROCESS_KEY,businessKey,vars); |
| | | }else{ |
| | | vars.put(FlowContants.ASSIGNEE,div.getTeamLeaderId());//第ä¸ä¸ªç¨æ·ç»é¿ |
| | |
| | | import org.springblade.mdm.flow.entity.ApproveRecord; |
| | | import org.springblade.mdm.flow.entity.FlowProgramFile; |
| | | import org.springblade.mdm.flow.excution.dispatch.FinishDataHandler; |
| | | import org.springblade.mdm.flow.service.ApproveRecordService; |
| | | import org.springblade.mdm.flow.service.FlowProgramFileService; |
| | | import org.springblade.mdm.flow.service.FlowProgramProperties; |
| | | import org.springblade.mdm.program.entity.NcNode; |
| | |
| | | @Slf4j |
| | | @Component("deviationCureFinishDataHandler") |
| | | public class DeviationCureFinishDataHandler implements FinishDataHandler { |
| | | @Autowired |
| | | private NcProgramApprovedService approvedService; |
| | | @Autowired |
| | | private ApproveRecordService approveRecordService; |
| | | |
| | | @Autowired |
| | | private FlowProgramFileService flowProgramFileService; |
| | | @Autowired |
| | |
| | | |
| | | } |
| | | |
| | | updateApproveRecordNodeId(instId, pkgNode.getId()); |
| | | log.info("å离åä¼ Listener宿"); |
| | | } |
| | | |
| | | void updateApproveRecordNodeId(String processInstanceId,Long nodeId){ |
| | | //æ´æ°å®¡æ¹è®°å½çncNodeId |
| | | approveRecordService.lambdaUpdate() |
| | | .eq(ApproveRecord::getProcessInstanceId, processInstanceId) |
| | | .set(ApproveRecord::getNcNodeId,nodeId).update(); |
| | | } |
| | | } |
| | |
| | | import org.springblade.mdm.basesetting.machine.service.MachineService; |
| | | import org.springblade.mdm.basesetting.machine.entity.Machine; |
| | | import org.springblade.mdm.commons.contants.ParamConstants; |
| | | import org.springblade.mdm.flow.entity.ApproveRecord; |
| | | import org.springblade.mdm.flow.entity.FlowProgramFile; |
| | | import org.springblade.mdm.flow.excution.dispatch.FinishDataHandler; |
| | | import org.springblade.mdm.flow.service.ApproveRecordService; |
| | | import org.springblade.mdm.flow.service.FlowProgramFileService; |
| | | import org.springblade.mdm.flow.service.FlowProgramProperties; |
| | | import org.springblade.mdm.program.entity.NcNode; |
| | | import org.springblade.mdm.program.entity.NcProgramApproved; |
| | | import org.springblade.mdm.program.service.NcNodeAutoCreateService; |
| | | import org.springblade.mdm.program.service.NcNodeService; |
| | | import org.springblade.mdm.program.service.NcProgramApprovedService; |
| | | import org.springblade.mdm.program.service.ProgramAnnotationService; |
| | | import org.springblade.mdm.program.service.programannotation.AnnotationProperties; |
| | | import org.springblade.mdm.program.service.programannotation.AnnotationUtil; |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.flowable.engine.RuntimeService; |
| | | import org.flowable.engine.delegate.DelegateExecution; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.mdm.flow.constants.FlowContants; |
| | | import org.springblade.mdm.flow.entity.ApproveRecord; |
| | | import org.springblade.mdm.flow.entity.FlowProgramFile; |
| | | import org.springblade.mdm.flow.service.ApproveRecordService; |
| | | import org.springblade.mdm.flow.service.FlowCommonService; |
| | | import org.springblade.mdm.flow.service.FlowProgramFileService; |
| | | import org.springblade.mdm.flow.service.FlowProgramProperties; |
| | | import org.springblade.mdm.program.entity.NcNode; |
| | | import org.springblade.mdm.program.entity.NcProgramApproved; |
| | | import org.springblade.mdm.program.service.NcNodeAutoCreateService; |
| | | import org.springblade.mdm.program.service.NcNodeService; |
| | | import org.springblade.mdm.program.service.NcProgramApprovedService; |
| | | import org.springblade.mdm.utils.EntityUtil; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 派工审æ¹éè¿æ§è¡çäºä»¶ï¼åè½ï¼æå
¥å®¡æ¹è¡¨æ°æ® |
| | |
| | | private RuntimeService runtimeService; |
| | | @Autowired |
| | | private NcProgramApprovedService approvedService; |
| | | @Autowired |
| | | private ApproveRecordService approveRecordService; |
| | | @Autowired |
| | | private FlowProgramFileService flowProgramFileService; |
| | | @Autowired |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.io.FilenameUtils; |
| | | import org.springblade.mdm.flow.constants.FlowContants; |
| | | import org.springblade.mdm.flow.entity.FlowProgramFile; |
| | | import org.springblade.mdm.flow.service.ApproveRecordService; |
| | | import org.springblade.mdm.flow.service.FlowProgramFileService; |
| | | import org.springblade.mdm.flow.service.FlowProgramProperties; |
| | | import org.springblade.mdm.gkw.programnode.vo.ProgramNameVO; |
| | |
| | | import org.springblade.mdm.program.service.NcNodeAutoCreateService; |
| | | import org.springblade.mdm.program.service.NcNodeService; |
| | | import org.springblade.mdm.program.service.NcProgramApprovedService; |
| | | import org.springblade.mdm.utils.EntityUtil; |
| | | import org.springblade.mdm.utils.ProgramFileNameParser; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | } |
| | | |
| | | addApproveTable(packageNode,props); |
| | | |
| | | |
| | | log.info("æ®éæµç¨å·²å®æin DispatchFinishListener"); |
| | | } |
| | | |
| | |
| | | @Autowired |
| | | private RuntimeService runtimeService; |
| | | @Autowired |
| | | private ApproveRecordService approveRecordService; |
| | | @Autowired |
| | | private FlowProgramFileService flowProgramFileService; |
| | | @Autowired |
| | | private NcProgramApprovedService ncProgramApprovedService; |
| | |
| | | return newPackageNode; |
| | | } |
| | | |
| | | void updateApproveRecordNodeId(NcNode pkgNode){ |
| | | //æ´æ°å®¡æ¹è®°å½çncNodeId |
| | | approveRecordService.lambdaUpdate() |
| | | .eq(ApproveRecord::getProcessInstanceId, pkgNode.getProcessInstanceId()) |
| | | .set(ApproveRecord::getNcNodeId,pkgNode.getId()).update(); |
| | | } |
| | | } |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.flowable.engine.RuntimeService; |
| | | import org.flowable.engine.delegate.DelegateExecution; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.mdm.flow.constants.FlowContants; |
| | | import org.springblade.mdm.flow.entity.ApproveRecord; |
| | | import org.springblade.mdm.flow.entity.FlowProgramFile; |
| | | import org.springblade.mdm.flow.service.ApproveRecordService; |
| | | import org.springblade.mdm.flow.service.FlowProgramFileService; |
| | | import org.springblade.mdm.flow.service.ReplaceFlowService; |
| | | import org.springblade.mdm.program.entity.NcNode; |
| | | import org.springblade.mdm.program.entity.NcProgramApproved; |
| | | import org.springblade.mdm.program.service.NcNodeService; |
| | | import org.springblade.mdm.program.service.NcProgramApprovedService; |
| | | import org.springblade.mdm.utils.EntityUtil; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * è§£é宿æ§è¡çäºä»¶ï¼åè½ï¼æå
¥å®¡æ¹è¡¨æ°æ® |
| | |
| | | public class UnlockFinishListener { |
| | | @Autowired |
| | | private RuntimeService runtimeService; |
| | | @Autowired |
| | | private ApproveRecordService approveRecordService; |
| | | @Autowired |
| | | private FlowProgramFileService flowProgramFileService; |
| | | @Autowired |
| | |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springblade.core.mp.mapper.BladeMapper; |
| | | import org.springblade.mdm.flow.entity.ApproveRecord; |
| | | import org.springblade.mdm.flow.vo.ApproveRecordVO; |
| | | import org.springblade.mdm.flow.vo.DoneQueryVO; |
| | | import org.springblade.mdm.flow.vo.FlowVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface DoneMapper extends BladeMapper<ApproveRecord> { |
| | | |
| | |
| | | package org.springblade.mdm.flow.mapper; |
| | | |
| | | import org.springblade.core.mp.mapper.BladeMapper; |
| | | import org.springblade.mdm.flow.entity.ApproveRecord; |
| | | import org.springblade.mdm.flow.entity.FlowProgramFile; |
| | | import org.springblade.mdm.flow.vo.ApproveRecordVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface FlowProgramFileMapper extends BladeMapper<FlowProgramFile> { |
| | | |
| ÎļþÃû´Ó blade-service/blade-mdm/src/main/java/org/springblade/mdm/flow/mapper/FlowProgramMapper.xml ÐÞ¸Ä |
| | |
| | | |
| | | |
| | | <sql id="all_columns">id,tenant_id,nc_program_id,process_instances_id,operate_time,operate_result,user_id,user_nickname,status,create_dept,is_deleted,create_time,create_user,update_time,update_user</sql> |
| | | <select id="listByNcProgramId" resultType="org.springblade.mdm.flow.vo.ApproveRecordVO"> |
| | | select <include refid="all_columns"/> FROM mdm_approve_record |
| | | WHERE nc_program_id = ${ncProgramId} and is_deleted = 0 order by create_time desc |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | import org.springblade.mdm.flow.entity.MdmFlowProcess; |
| | | import org.springblade.mdm.flow.util.MdmFlowCache; |
| | | import org.springblade.mdm.flow.vo.FlowVO; |
| | | import org.springblade.mdm.program.service.NcProgramService; |
| | | import org.springblade.mdm.program.service.ProcessProgRefService; |
| | | import org.springblade.system.feign.IUserClient; |
| | | import org.springblade.system.pojo.entity.User; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | |
| | | private final TaskService taskService; |
| | | |
| | | private final ApproveRecordService approveRecordService; |
| | | |
| | | /** |
| | | * 转派ï¼å¹¶è®°å½èªå·±ç夿³¨ä¿¡æ¯ |
| | | * @param taskId ä»»å¡id |
| | |
| | | import org.flowable.engine.RuntimeService; |
| | | import org.flowable.engine.TaskService; |
| | | import org.flowable.task.api.Task; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.mdm.flow.constants.FlowContants; |
| | | import org.springblade.mdm.flow.service.ApproveRecordService; |
| | | import org.springblade.system.feign.IUserClient; |
| | | import org.springblade.system.pojo.entity.User; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | protected TaskService taskService; |
| | | @Autowired |
| | | protected RuntimeService runtimeService; |
| | | @Autowired |
| | | protected ApproveRecordService approveRecordService; |
| | | |
| | | @Transactional |
| | | public abstract void completeTask(String taskId, String processInstanceId, String comment, @Parameter(name = "variables", description = "æµç¨åé") @RequestBody Map<String, Object> variables); |
| | |
| | | .taskId(taskId) |
| | | .singleResult(); |
| | | } |
| | | void addApproveRecord(String taskId,String comment,Map<String, Object> variables){ |
| | | String operateResult = variables.get("approve")+""; |
| | | approveRecordService.saveApproveRecords(currentTask(taskId),operateResult,comment); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import org.springblade.mdm.commons.service.UserCommonService; |
| | | import org.springblade.mdm.flow.constants.FlowContants; |
| | | import org.springblade.mdm.flow.constants.FlowVariableContants; |
| | | import org.springblade.mdm.flow.service.ApproveRecordService; |
| | | import org.springblade.mdm.flow.service.FlowCommonService; |
| | | import org.springblade.mdm.flow.service.FlowProgramFileService; |
| | | import org.springblade.mdm.flow.vo.BatchDispatchVO; |
| | | import org.springblade.mdm.program.service.NcNodeAutoCreateService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | */ |
| | | @Service |
| | | public class BatchDispatchService { |
| | | |
| | | @Autowired |
| | | private ApproveRecordService approveRecordService; |
| | | @Autowired |
| | | private TaskService taskService; |
| | | @Autowired |
| | |
| | | if (StringUtil.isNoneBlank(processInstanceId, comment)) { |
| | | taskService.addComment(taskId, processInstanceId, comment); |
| | | } |
| | | approveRecordService.saveApproveRecords(task,FlowContants.Y,comment); |
| | | |
| | | taskService.complete(taskId, variables); |
| | | } |
| | |
| | | if (StringUtil.isNoneBlank(processInstanceId, batchDispatchVO.getComment())) { |
| | | taskService.addComment(taskId, processInstanceId, batchDispatchVO.getComment()); |
| | | } |
| | | approveRecordService.saveApproveRecords(task,FlowContants.Y,batchDispatchVO.getComment()); |
| | | |
| | | //æå䏿¥å®æ |
| | | taskService.complete(taskId, variables); |
| | |
| | | if(!variables.containsKey("assignee")) { |
| | | throw new ServiceException("请æå®æµç¨ä¸ä¸æ¥å¤ç人"); |
| | | } |
| | | addApproveRecord(taskId,comment,variables); |
| | | |
| | | variables.remove(FlowContants.PROCESS_EDITION);//ä¸è¦åçäº |
| | | |
| | | |
| | | taskService.complete(taskId, variables); |
| | | } |
| | |
| | | import org.springblade.core.tool.support.Kv; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.core.tool.utils.StringUtil; |
| | | import org.springblade.mdm.commons.service.UserCommonService; |
| | | import org.springblade.mdm.flow.constants.FlowContants; |
| | | import org.springblade.mdm.flow.service.FlowCommonService; |
| | | import org.springblade.mdm.flow.service.FlowProgramFileService; |
| | | import org.springblade.mdm.flow.service.FlowProgramProperties; |
| | | import org.springblade.mdm.program.service.NcNodeAutoCreateService; |
| | | import org.springblade.mdm.program.service.NcNodeService; |
| | | import org.springblade.mdm.flow.constants.FlowVariableContants; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | @Service("tempFlowCompleteService") |
| | | public class TempFlowCompleteService extends AbstractFlowCompleteService { |
| | | @Autowired |
| | | private FlowProgramFileService flowProgramFileService; |
| | | @Autowired |
| | | private NcNodeService ncNodeService; |
| | | @Autowired |
| | | private FlowCommonService flowCommonService; |
| | | |
| | | private UserCommonService userCommonService; |
| | | @Transactional |
| | | @Override |
| | | public void completeTask(String taskId, String processInstanceId, String comment, Map<String, Object> variables) { |
| | | Task task = currentTask(taskId); |
| | | String operateResult = this.getApproveResult(variables); |
| | | |
| | | |
| | | if (StringUtil.isNoneBlank(processInstanceId, comment)) { |
| | | taskService.addComment(taskId, processInstanceId, comment); |
| | | } |
| | |
| | | if (Func.isEmpty(variables)) { |
| | | variables = Kv.create(); |
| | | } |
| | | variables.put(FlowContants.LAST_STEP_USER_NICKNAME, AuthUtil.getNickName()); |
| | | |
| | | if(!variables.containsKey("assignee")) { |
| | | throw new ServiceException("请æå®æµç¨ä¸ä¸æ¥å¤ç人"); |
| | | } |
| | | addApproveRecord(taskId,comment,variables); |
| | | String operateResult = this.getApproveResult(variables); |
| | | variables.put(FlowContants.LAST_STEP_USER_NICKNAME, AuthUtil.getNickName()); |
| | | |
| | | if(task.getTaskDefinitionKey().equals("appendProgrammingTask") ) {//ç¼å¶èç¹ |
| | | //è®°å½å®é
ç¼ç¨å |
| | | variables.put(FlowVariableContants.ACT_PROGRAMMER,Func.toStr(AuthUtil.getUserId())); |
| | | |
| | | }else if(task.getTaskDefinitionKey().equals("appendCheckTask")){ |
| | | variables.put(FlowVariableContants.ACT_CHECKER,Func.toStr(AuthUtil.getUserId())); |
| | | }else if(task.getTaskDefinitionKey().equals("appendApproveTask")){ |
| | | variables.put(FlowVariableContants.ACT_SENIOR,Func.toStr(AuthUtil.getUserId())); |
| | | } |
| | | |
| | | |
| | | taskService.complete(taskId, variables); |
| | | } |
| | |
| | | |
| | | variables.put(FlowContants.LAST_STEP_USER_NICKNAME, AuthUtil.getNickName()); |
| | | |
| | | addApproveRecord(taskId,comment,variables); |
| | | |
| | | variables.remove(FlowContants.PROCESS_EDITION);//ä¸è¦åçäº |
| | | |
| | | if("confirmIsUseableTask".equals(task.getTaskDefinitionKey())){ |
| | |
| | | |
| | | package org.springblade.mdm.program.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | |
| | | import org.springblade.core.tenant.annotation.NonDS; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.mdm.basesetting.producedivision.service.QinzheFgbService; |
| | | import org.springblade.mdm.flow.service.FlowProgramFileService; |
| | | import org.springblade.mdm.flow.service.TaskDispatchService; |
| | | import org.springblade.mdm.program.entity.NcNode; |
| | | import org.springblade.mdm.program.service.NcNodeService; |
| | | import org.springblade.mdm.program.service.NcProgramService; |
| | | import org.springblade.mdm.program.service.ProgramFlowStatusQueryService; |
| | | import org.springblade.mdm.program.vo.*; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | @Tag(name = "ç¨åºèç¹", description = "ç¨åºèç¹") |
| | | @Slf4j |
| | | public class NcNodeController { |
| | | private final NcProgramService ncProgramService; |
| | | private final NcNodeService ncNodeService; |
| | | private final ProgramFlowStatusQueryService programFlowStatusQueryService; |
| | | private final FlowProgramFileService flowProgramFileService; |
| | |
| | | @Operation(summary = "æ°å¢èç¹", description = "èç¹ä¿¡æ¯,idä¿æç©º") |
| | | public R<Boolean> save(@RequestBody NcNodeVO vo) { |
| | | ncNodeService.saveNcCode(vo); |
| | | return R.<Boolean>status(true); |
| | | return R.status(true); |
| | | } |
| | | |
| | | |
| | |
| | | @Operation(summary = "ä¿®æ¹èç¹", description = "èç¹ä¿¡æ¯,å¿
é¡»ä¼ å
¥ID") |
| | | public R<Boolean> update(@RequestBody NcNodeVO vo) { |
| | | ncNodeService.updateNcNode(vo); |
| | | return R.<Boolean>status(true); |
| | | return R.status(true); |
| | | } |
| | | |
| | | @PostMapping("/remove") |
| | | @Operation(summary = "å é¤èç¹") |
| | | public R<Boolean> remove(Long id) { |
| | | ncNodeService.removeById(id); |
| | | return R.<Boolean>status(true); |
| | | return R.status(true); |
| | | } |
| | | |
| | | @PostMapping("/lock") |
| | | @Operation(summary = "éå®èç¹(ç¨åºå
å)") |
| | | public R<Boolean> lock(@Parameter(description="ç¨åºå
åèç¹id)")Long id,@Parameter(description="éå®åå )")String remark) { |
| | | ncNodeService.lock(id,remark); |
| | | return R.<Boolean>status(true); |
| | | return R.status(true); |
| | | } |
| | | |
| | | @GetMapping("/query-lock-remark") |
| | |
| | | |
| | | return R.data(vo); |
| | | } |
| | | |
| | | @GetMapping("/content-by-nodeid") |
| | | @Operation(summary = "æ ¹æ®èç¹è·åæä»¶å
容", description = "ä»
éææ¬æ ¼å¼çå
容ï¼äºè¿å¶æä»¶å°è¿å空串") |
| | | public R<String> fileContentByNodeId(@Parameter(description = "èç¹id") Long nodeId) { |
| | | try { |
| | | NcNode ncnode = ncNodeService.getById(nodeId); |
| | | if(ncnode.getFlowProgramFileId() != null) { |
| | | return R.data(flowProgramFileService.getFileContent(ncnode.getFlowProgramFileId())); |
| | | }else{ |
| | | return R.data("æ¾ä¸å°æä»¶"); |
| | | } |
| | | }catch(Exception e) { |
| | | log.error("å é¤æä»¶å¤±è´¥",e); |
| | | return R.fail(e.getMessage()); |
| | | } |
| | | } |
| | | } |
| | |
| | | import org.springblade.mdm.commons.vo.IdsVO; |
| | | import org.springblade.mdm.program.service.NcProgramApprovedService; |
| | | import org.springblade.mdm.program.service.NcProgramExportDNCService; |
| | | import org.springblade.mdm.program.service.NcProgramService; |
| | | import org.springblade.mdm.program.vo.NcProgramExportDncPageVO; |
| | | import org.springblade.mdm.program.vo.NcProgramExportDncQueryVO; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | package org.springblade.mdm.program.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springblade.core.mp.mapper.BladeMapper; |
| | | import org.springblade.mdm.program.entity.NcNode; |
| | | import org.springblade.mdm.program.entity.NcProgram; |
| | | import org.springblade.mdm.program.vo.*; |
| | | |
| | | import java.util.List; |
| | |
| | | |
| | | package org.springblade.mdm.program.service; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.compress.archivers.zip.ZipUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springblade.core.mp.base.BizEntity; |
| | | import org.springblade.core.mp.base.BizServiceImpl; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.oss.OssTemplate; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.mdm.flow.entity.ApproveRecord; |
| | | import org.springblade.mdm.flow.service.ApproveRecordService; |
| | | import org.springblade.mdm.program.entity.NcNode; |
| | | import org.springblade.mdm.program.entity.NcProgram; |
| | | import org.springblade.mdm.program.entity.NcProgramApproved; |
| | | import org.springblade.mdm.program.mapper.NcProgramApprovedMapper; |
| | | import org.springblade.mdm.program.vo.DncSendBackData; |
| | | import org.springblade.mdm.program.vo.NcProgramExportDncPageVO; |
| | | import org.springblade.mdm.program.vo.NcProgramExportDncQueryVO; |
| | | import org.springblade.mdm.utils.CustomBinaryWriter; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.io.ByteArrayInputStream; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.zip.ZipEntry; |
| | | import java.util.zip.ZipOutputStream; |
| | | |
| | | /** |
| | | * ä¸å/åä¼ ç¨åºç»è®¡ |
| | |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class NcProgramApprovedService extends BizServiceImpl<NcProgramApprovedMapper, NcProgramApproved> { |
| | | private final NcProgramService progService; |
| | | private final OssTemplate ossTemplate; |
| | | private final ApproveRecordService approvedService; |
| | | private final NcNodeService ncNodeService; |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * @param query æ¥è¯¢åæ° |
| | |
| | | |
| | | return this.getBaseMapper().exportDncPageQuery(Condition.getPage(query),query); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | |