| | |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.springblade</groupId> |
| | | <artifactId>blade-system-api</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.springblade</groupId> |
| | | <artifactId>blade-flow-api</artifactId> |
| | | </dependency> |
| | | <!-- 工使µ --> |
| | |
| | | @TableName("mdm_produce_division") |
| | | public class ProduceDivision extends BizEntity { |
| | | /** |
| | | * é¶ç»ä»¶ç¼å· |
| | | */ |
| | | private String drawingNo; |
| | | /** |
| | | * ä¸ä¸ç»é¿id |
| | | */ |
| | | private Long teamLeaderId; |
| | |
| | | package org.springblade.mdm.basesetting.producedivision.vo; |
| | | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import org.springblade.mdm.commons.vo.BaseVO; |
| | | |
| | | /** |
| | | * 主å¶è®¡å表 |
| | | */ |
| | | |
| | | @Schema(description = "主å¶å工表") |
| | | @Setter |
| | | @Getter |
| | | public class ProduceDivisionVO extends BaseVO { |
| | | /** |
| | | * ä¸ä¸ç»é¿id |
| | | */ |
| | | @Schema(description = "é¶ç»ä»¶å·/å¾å·") |
| | | private String drawingNo; |
| | | |
| | | @Schema(description = "ä¸ä¸ç»é¿id") |
| | | private Long teamLeaderId; |
| | | /** |
| | | * ç¼å¶å·¥èºåid |
| | | */ |
| | | |
| | | @Schema(description = "ç¼å¶å·¥èºåid") |
| | | private Long programmerId; |
| | | /** |
| | | * æ ¡å¯¹å·¥èºåid |
| | | */ |
| | | |
| | | @Schema(description = "æ ¡å¯¹å·¥èºåid") |
| | | private Long checkerId; |
| | | /** |
| | | * é«å¸id |
| | | */ |
| | | |
| | | @Schema(description = "审æ¹é«å¸id") |
| | | private Long seniorId; |
| | | } |
| | |
| | | package org.springblade.mdm.flow.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.flowable.engine.TaskService; |
| | |
| | | import org.springblade.mdm.flow.entity.ApproveRecord; |
| | | import org.springblade.mdm.flow.excution.StartDispatcher; |
| | | import org.springblade.mdm.flow.service.ApproveRecordService; |
| | | import org.springblade.mdm.flow.service.FlowCommonService; |
| | | import org.springblade.mdm.flow.vo.TaskAssignVO; |
| | | import org.springblade.mdm.program.entity.ProcessProgRef; |
| | | import org.springblade.mdm.program.service.ProcessProgRefService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("/flow/dispatch") |
| | | @Tag(name = "派工æµç¨", description = "派工æµç¨") |
| | | public class DispatchController { |
| | | |
| | | @Autowired |
| | | private StartDispatcher dispatcher; |
| | | @Autowired |
| | | private TaskService taskService; |
| | | @Autowired |
| | | private ProcessProgRefService processProgRefService; |
| | | private final StartDispatcher dispatcher; |
| | | |
| | | @Autowired |
| | | private final TaskService taskService; |
| | | |
| | | private final ProcessProgRefService processProgRefService; |
| | | |
| | | private ApproveRecordService approveRecordService; |
| | | private final FlowCommonService flowCommonService; |
| | | /** |
| | | * æ°å¢ |
| | | */ |
| | |
| | | |
| | | if(variables.containsKey("assignee")){ |
| | | |
| | | addApproveRecord(taskId,processInstanceId,comment,programIds,variables); |
| | | addApproveRecord(taskId,processInstanceId,comment,variables); |
| | | //æå®äºä¸ä¸æ¥æ§è¡äºº |
| | | taskService.complete(taskId, variables); |
| | | |
| | |
| | | |
| | | } |
| | | |
| | | void addApproveRecord(String taskId, String processInstanceId, String comment,String programIds,Map<String, Object> variables){ |
| | | List<Long> programIdList = new ArrayList<>(); |
| | | if(programIds != null){ |
| | | programIdList = Func.toLongList(programIds); |
| | | }else{ |
| | | programIdList.add(null); |
| | | } |
| | | void addApproveRecord(String taskId, String processInstanceId, String comment,Map<String, Object> variables){ |
| | | String operateResult = variables.get("approve")+""; |
| | | |
| | | Task task = taskService.createTaskQuery() |
| | | .taskId(taskId) |
| | | .singleResult(); |
| | | for(Long programId : programIdList){ |
| | | ApproveRecord rec = new ApproveRecord(); |
| | | rec.setTaskName(task.getName()); |
| | | rec.setComment(comment); |
| | | rec.setNcProgramId(programId); |
| | | rec.setOperateResult(variables.get("approve")+"");//审æ¹ç»æ |
| | | rec.setOperateTime(DateUtil.now()); |
| | | rec.setProcessInstanceId(processInstanceId); |
| | | rec.setUserId(AuthUtil.getUserId()); |
| | | rec.setUserNickname(AuthUtil.getNickName()); |
| | | |
| | | approveRecordService.save(rec); |
| | | } |
| | | approveRecordService.saveApproveRecords(task,processInstanceId,operateResult,comment); |
| | | |
| | | } |
| | | } |
| | |
| | | private String processInstanceId; |
| | | |
| | | /** |
| | | * æµç¨å®ä¹key |
| | | */ |
| | | private String processDefinitionKey; |
| | | |
| | | /** |
| | | * ä»»å¡åç§° |
| | | */ |
| | | private String taskName; |
| | |
| | | package org.springblade.mdm.flow.excution; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.mdm.basesetting.producedivision.entity.ProduceDivision; |
| | | import org.springblade.mdm.basesetting.producedivision.mapper.ProduceDivisionMapper; |
| | | import org.springblade.mdm.basesetting.producedivision.service.ProduceDivisionService; |
| | | import org.springblade.mdm.flow.vo.TaskAssignVO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | import java.util.Optional; |
| | | |
| | | /** |
| | | * è·åèªå¨å¹é
çä¸ä¸ç»é¿ï¼ç¼å¶äººåï¼æç åï¼åé«å¸ |
| | | */ |
| | | @AllArgsConstructor |
| | | @Service |
| | | public class AutoAssignUsersService { |
| | | @Autowired |
| | | private ProduceDivisionMapper divMapper; |
| | | |
| | | public Map<String,Object> autoAssignUsers(long producePlanId){ |
| | | ProduceDivision pplan = divMapper.selectById(producePlanId); |
| | | //private final ProduceDivisionMapper divMapper; |
| | | private final ProduceDivisionService divService; |
| | | |
| | | public Map<String,Object> autoAssignUsers(TaskAssignVO startVO){ |
| | | LambdaQueryWrapper<ProduceDivision> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(ProduceDivision::getDrawingNo,startVO.getDrawingNo()); |
| | | Optional<ProduceDivision> optDiv = divService.getOneOpt(queryWrapper); |
| | | |
| | | if(!optDiv.isPresent()){ |
| | | throw new RuntimeException("æªæ¾å°ä¸»å¶åå·¥è¡¨æ°æ®"); |
| | | } |
| | | |
| | | ProduceDivision division = optDiv.get(); |
| | | Map<String,Object> result = new HashMap<String,Object>(); |
| | | result.put("teamLeader",pplan.getTeamLeaderId()); |
| | | result.put("programmer",pplan.getProgrammerId()); |
| | | result.put("checker",pplan.getCheckerId()); |
| | | result.put("senior",pplan.getSeniorId()); |
| | | result.put("teamLeader",division.getTeamLeaderId()); |
| | | result.put("programmer",division.getProgrammerId()); |
| | | result.put("checker",division.getCheckerId()); |
| | | result.put("senior",division.getSeniorId()); |
| | | |
| | | return result; |
| | | } |
| | |
| | | package org.springblade.mdm.flow.excution; |
| | | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.AllArgsConstructor; |
| | | import org.flowable.common.engine.impl.identity.Authentication; |
| | | import org.flowable.engine.IdentityService; |
| | | import org.flowable.engine.runtime.ProcessInstance; |
| | |
| | | import org.springblade.flow.core.utils.TaskUtil; |
| | | import org.springblade.mdm.flow.vo.TaskAssignVO; |
| | | import org.springblade.mdm.program.entity.NcProgram; |
| | | import org.springblade.mdm.program.entity.ProcessProgRef; |
| | | import org.springblade.mdm.program.service.NcProgramService; |
| | | import org.springblade.mdm.program.service.ProcessProgRefService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.flowable.engine.RuntimeService; |
| | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @AllArgsConstructor |
| | | @Service("startDispatcher") |
| | | public class StartDispatcher { |
| | | |
| | | @Autowired |
| | | private RuntimeService runtimeService; |
| | | @Autowired |
| | | private AutoAssignUsersService autoAssignUsersService; |
| | | @Autowired |
| | | private IdentityService identityService; |
| | | private final RuntimeService runtimeService; |
| | | private final AutoAssignUsersService autoAssignUsersService; |
| | | |
| | | @Autowired |
| | | private NcProgramService ncProgramService; |
| | | private static final String PROCESS_KEY = "dispatch"; |
| | | private final IdentityService identityService; |
| | | private final ProcessProgRefService processProgRefService; |
| | | private final NcProgramService ncProgramService; |
| | | |
| | | public static final String PROCESS_KEY = "dispatch"; |
| | | |
| | | /** |
| | | * å¯å¨æ´¾å·¥æµç¨ |
| | | * @param startVO |
| | | */ |
| | | public void start(TaskAssignVO startVO){ |
| | | |
| | | Map<String,Object> preAssignee = autoAssignUsersService.autoAssignUsers(startVO.getProducePlanId()); |
| | | Map<String,Object> preAssignee = autoAssignUsersService.autoAssignUsers(startVO); |
| | | Map<String, Object> vars = new HashMap<>(preAssignee); |
| | | |
| | | vars.put("machineCode",startVO.getMachineCode()); |
| | |
| | | |
| | | vars.put("craftEdition",startVO.getCraftEdition()); |
| | | vars.put("planStartTime",startVO.getPlanStartTime()); |
| | | vars.put("partNo",startVO.getPartNo()); |
| | | vars.put("partNoEdition",startVO.getPartNoEdition()); |
| | | vars.put("drawingNo",startVO.getDrawingNo()); |
| | | vars.put("drawingNoEdition",startVO.getDrawingNoEdition()); |
| | | vars.put("planLockDays",startVO.getPlanLockDays()); |
| | | vars.put("productModel",startVO.getProductModel()); |
| | | //é¶ç»ä»¶ä»£ç |
| | | String partNo = generatePartNo(startVO); |
| | | vars.put("partNo",partNo); |
| | | |
| | | List<NcProgram> curedNcProgram = ncProgramService.getCuredNcProgram(partNo,startVO.getMachineCode()); |
| | | //vars.put("curedNcProgram",curedNcProgram); |
| | | |
| | | List<NcProgram> curedNcPrograms = ncProgramService.getCuredNcProgram(startVO.getDrawingNo(),startVO.getMachineCode()); |
| | | //设置æ¯å¦æåºåç¨åºæ è®° |
| | | vars.put("hasCuredProgram",!curedNcProgram.isEmpty() ? "Y":"N"); |
| | | vars.put("hasCuredProgram",!curedNcPrograms.isEmpty() ? "Y":"N"); |
| | | |
| | | |
| | | String businessKey = "0";//ä¸å¡è¡¨key |
| | | |
| | | identityService.setAuthenticatedUserId(String.valueOf(AuthUtil.getUserId()));//设置æµç¨å起人 |
| | | ProcessInstance pinst = runtimeService.startProcessInstanceByKey(PROCESS_KEY,businessKey,vars); |
| | | |
| | | int a=1; |
| | | //妿æå·²åºåç¨åºï¼åå°ç¨åºidæå
¥æµç
å
³è表 |
| | | for(NcProgram ncProgram : curedNcPrograms){ |
| | | ProcessProgRef ref = new ProcessProgRef(); |
| | | ref.setProcessInstanceId(pinst.getId()); |
| | | ref.setNcProgramId(ncProgram.getId()); |
| | | ref.setProcessDefinitionKey(pinst.getProcessDefinitionKey()); |
| | | processProgRefService.save(ref); |
| | | } |
| | | |
| | | //log.info() |
| | | } |
| | | |
| | |
| | | * @param startVO |
| | | * @return |
| | | */ |
| | | /* |
| | | String generatePartNo(TaskAssignVO startVO){ |
| | | //TODO è¿ä¸ªæ ¼å¼æªç¡®å®ï¼éè¦ç¡®è®¤ |
| | | return String.format("%s-%s-%s-%s-%s-%s", |
| | |
| | | startVO.getProcessName(), |
| | | startVO.getCraftEdition(), |
| | | startVO.getProcessEdition()); |
| | | } |
| | | }*/ |
| | | } |
| | |
| | | |
| | | package org.springblade.mdm.flow.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.flowable.task.api.Task; |
| | | import org.springblade.core.mp.base.BizServiceImpl; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.utils.DateUtil; |
| | | import org.springblade.mdm.flow.entity.ApproveRecord; |
| | | import org.springblade.mdm.flow.mapper.ApproveRecordMapper; |
| | | import org.springblade.mdm.flow.vo.ApproveRecordVO; |
| | | import org.springblade.mdm.program.entity.ProcessProgRef; |
| | | import org.springblade.mdm.program.service.ProcessProgRefService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class ApproveRecordService extends BizServiceImpl<ApproveRecordMapper, ApproveRecord> { |
| | | |
| | | private final ProcessProgRefService processProgRefService; |
| | | private final FlowCommonService flowCommonService; |
| | | public List<ApproveRecordVO> listByNcProgramId(Long ncProgramId) { |
| | | return this.getBaseMapper().listByNcProgramId(ncProgramId); |
| | | } |
| | | |
| | | public void saveApproveRecords(Task task, String processInstanceId, String operateResult, String comment) { |
| | | |
| | | String processDefinitionKey = flowCommonService.getDefinitionKey(processInstanceId); |
| | | |
| | | LambdaQueryWrapper<ProcessProgRef> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(ProcessProgRef::getProcessInstanceId, processInstanceId); |
| | | List<ProcessProgRef> refList = processProgRefService.list(queryWrapper); |
| | | if(!refList.isEmpty()) { |
| | | for (ProcessProgRef refObj : refList) { |
| | | ApproveRecord rec = new ApproveRecord(); |
| | | rec.setTaskName(task.getName()); |
| | | rec.setComment(comment==null? StringUtils.EMPTY:comment); |
| | | rec.setNcProgramId(refObj.getNcProgramId()); |
| | | rec.setOperateResult(operateResult);//审æ¹ç»æ |
| | | rec.setOperateTime(DateUtil.now()); |
| | | rec.setProcessInstanceId(processInstanceId); |
| | | rec.setProcessDefinitionKey(processDefinitionKey); |
| | | rec.setUserId(AuthUtil.getUserId()); |
| | | rec.setUserNickname(AuthUtil.getNickName()); |
| | | |
| | | save(rec); |
| | | } |
| | | |
| | | //æ£æ¥ncprogram为nullçæ°æ® |
| | | updateApproveRecords(processInstanceId,refList); |
| | | }else{ |
| | | //å¦æè¿æ²¡æå
³èçç¨åºæ°æ®ï¼åæå
¥ä¸ä¸ªprogramId为nullç |
| | | ApproveRecord rec = new ApproveRecord(); |
| | | rec.setTaskName(task.getName()); |
| | | rec.setComment(comment==null? StringUtils.EMPTY:comment); |
| | | rec.setProcessInstanceId(processInstanceId); |
| | | rec.setProcessDefinitionKey(processDefinitionKey); |
| | | rec.setOperateResult(operateResult); |
| | | rec.setOperateTime(DateUtil.now()); |
| | | rec.setNcProgramId(null);//空çç¨åºid |
| | | rec.setUserId(AuthUtil.getUserId()); |
| | | rec.setUserNickname(AuthUtil.getNickName()); |
| | | |
| | | save(rec); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * æ´æ°ä»¥åæ æä»¶æ¶åçæ°æ®ã |
| | | * @param processInstanceId |
| | | */ |
| | | void updateApproveRecords(String processInstanceId,List<ProcessProgRef> refList) { |
| | | |
| | | if(refList.isEmpty()) { |
| | | return; |
| | | } |
| | | List<ApproveRecord> records = this.lambdaQuery().isNull(ApproveRecord::getNcProgramId).eq(ApproveRecord::getProcessInstanceId, processInstanceId).list(); |
| | | if(records.isEmpty()) { |
| | | return; |
| | | } |
| | | |
| | | for(ApproveRecord record:records) { |
| | | |
| | | for(int j=0;j< refList.size();j++) { |
| | | ProcessProgRef refObj = refList.get(j); |
| | | |
| | | ApproveRecord record2 = new ApproveRecord(); |
| | | BeanUtils.copyProperties(record, record2); |
| | | record2.setNcProgramId(refObj.getNcProgramId()); |
| | | |
| | | if(j>0){//åç»æ°æ®éè¦æ°å¢æ°æ® |
| | | record2.setId(null); |
| | | save(record2); |
| | | }else{//ç¬¬ä¸æ¡æ¯æ´æ°åçºªå½ |
| | | updateById(record2); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.springblade.mdm.flow.service; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import org.flowable.engine.RuntimeService; |
| | | import org.flowable.engine.runtime.ProcessInstance; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @AllArgsConstructor |
| | | @Service |
| | | public class FlowCommonService { |
| | | private final RuntimeService runtimeService; |
| | | |
| | | /** |
| | | * æ ¹æ®æµç¨å®ä¾idè·ådefinitionKey |
| | | * @param processInstanceId |
| | | * @return |
| | | */ |
| | | public String getDefinitionKey(String processInstanceId){ |
| | | |
| | | ProcessInstance processInstance = runtimeService.createProcessInstanceQuery() |
| | | .processInstanceId(processInstanceId) |
| | | .singleResult(); |
| | | return processInstance.getProcessDefinitionKey(); |
| | | } |
| | | |
| | | } |
| | |
| | | @Schema(description = "ä»»å¡è®¡å") |
| | | public class TaskAssignVO { |
| | | @Schema(description = "é¶ç»ä»¶/å¾å·") |
| | | private String partNo; |
| | | private String drawingNo; |
| | | @Schema(description = "å¾å·ç次/è®¾è®¡çæ¬¡") |
| | | private String partNoEdition; |
| | | private String drawingNoEdition; |
| | | @Schema(description = "å·¥åºå·") |
| | | private String processNo; |
| | | @Schema(description = "å·¥åºåç§°") |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | package org.springblade.mdm.program.controller; |
| | | |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springblade.core.tenant.annotation.NonDS; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.mdm.program.service.NcProgramExchangeService; |
| | | import org.springblade.mdm.program.vo.DncSendBackData; |
| | | import org.springblade.system.feign.ISysClient; |
| | | import org.springblade.system.feign.IUserClient; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * æµç¨ç®¡çæ¥å£ |
| | | * |
| | | * @author Chill |
| | | */ |
| | | @NonDS |
| | | @RestController |
| | | @RequestMapping("/system/param/") |
| | | @AllArgsConstructor |
| | | @Tag(name = "MDMç³»ç»åæ°", description = "MDMç³»ç»åæ°") |
| | | @Slf4j |
| | | public class MdmParamController { |
| | | private final ISysClient sysClient; |
| | | |
| | | @GetMapping("/getValue") |
| | | @ApiOperationSupport(order = 2) |
| | | @Operation(summary = "è·ååæ°å¼") |
| | | public R<String> getValue(@Parameter(description = "åæ°Key") @RequestParam String paramKey) { |
| | | try { |
| | | return sysClient.getParamValue(paramKey); |
| | | }catch (Exception e){ |
| | | log.error("å
¥åºé误",e); |
| | | return R.fail(e.getMessage()); |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | @RestController |
| | | @RequestMapping("/program/mdmimport/") |
| | | @AllArgsConstructor |
| | | @Tag(name = "DNC导å
¥", description = "DNC导å
¥æ¥å£") |
| | | @Tag(name = "MDM导å
¥", description = "å·¥æ§ç½MDM导å
¥æ¥å£") |
| | | @Slf4j |
| | | public class MdmProgramImportController { |
| | | |
| | |
| | | return R.fail(e.getMessage()); |
| | | } |
| | | } |
| | | /* |
| | | |
| | | @PostMapping("accept") |
| | | @ApiOperationSupport(order = 2) |
| | | @Operation(summary = "MDMç¨åºå
¥åº", description = "æ¶å¯ç½ç¨åºç¡®è®¤å
¥åº") |
| | | @Operation(summary = "MDMç¨åºå
¥åº", description = "å·¥æ§ç½å¯¼å
¥æ¶å¯ç½ç¨åº-确认å
¥åº") |
| | | public R<Void> accept(@RequestParam String ids) { |
| | | try { |
| | | mdmProgramImportService.mdmFileAccept(ids); |
| | |
| | | return R.fail(e.getMessage()); |
| | | } |
| | | return R.success(); |
| | | }*/ |
| | | } |
| | | } |
| | |
| | | public R<List<NcProgramVO>> send(@Parameter(description="æå±èç¹ID")@RequestParam Long id) { |
| | | return null;//R.data(ncProcessProgRefService.listByProcess(processInstanceId)); |
| | | } |
| | | |
| | | @GetMapping("/send-to-machine-by-nodeid") |
| | | @Operation(summary = "ä¸å", description = "ä¸åç»æºåºè®¾å®çç®å½") |
| | | public R<Void> sendToMachineByNodeId(@Parameter(description = "èç¹id") Long nodeId) { |
| | | try { |
| | | ncProgramService.sendByBindNodeId(nodeId); |
| | | return R.success(); |
| | | }catch(Exception e) { |
| | | log.error("å é¤æä»¶å¤±è´¥",e); |
| | | return R.fail(e.getMessage()); |
| | | } |
| | | } |
| | | } |
| | |
| | | @Operation(summary = "ç¨åºå¯¼åºDNCå页æ¥è¯¢", description = "å页æ¥è¯¢ï¼ä¾ç¨æ·éæ©æ°æ®") |
| | | @GetMapping("/export-dnc-page") |
| | | public R<IPage<NcProgramExportDncPageVO>> page(NcProgramExportDncQueryVO query) { |
| | | //IPage<NcProgramVO> pages = ncProgramService.pageQuery(query); |
| | | return R.data(ncProgramApprovedService.exportDncPageQuery(query)); |
| | | } |
| | | |
| | |
| | | throw new ServiceException("æªéæ©æä»¶å¯¼åº"); |
| | | } |
| | | try { |
| | | response.setHeader("Content-Disposition", "attachment; filename=dnc-t.zip"); |
| | | response.setContentType("application/octet-stream"); |
| | | ncProgramExportDNCService.exportDnc(vo.getIds(),response.getOutputStream()); |
| | | } catch (IOException e) { |
| | | log.error("导åºDNCå¼å¸¸", e); |
| | |
| | | import lombok.Setter; |
| | | import org.springblade.core.mp.base.BizEntity; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Setter |
| | | @Getter |
| | | @TableName("mdm_nc_node") |
| | |
| | | /** |
| | | * é¶ç»ä»¶å·/å¾å· |
| | | */ |
| | | private String partNo; |
| | | private String drawingNo; |
| | | /** |
| | | * å¾å·ç次 |
| | | */ |
| | |
| | | /** |
| | | * é¶ç»ä»¶å·/å¾å· |
| | | */ |
| | | private String partNo; |
| | | private String drawingNo; |
| | | |
| | | /** |
| | | * æè¿° |
| | |
| | | */ |
| | | private Long ncProgramId; |
| | | |
| | | /** |
| | | * æµç¨å®ä¹key |
| | | */ |
| | | private String processDefinitionKey; |
| | | } |
| | |
| | | <!-- <select id="parentTree" resultMap="treeNodeResultMap">--> |
| | | <!-- select id, parent_id, dict_value as title, id as "value", id as "key" from blade_dict where is_deleted = 0 and parent_id = 0--> |
| | | <!-- </select>--> |
| | | <sql id="prog_all_columns">id,tenant_id,nc_node_id,code,name,machine_code,part_no,is_cured, |
| | | <sql id="prog_all_columns">id,tenant_id,nc_node_id,code,name,machine_code,draw_no,is_cured, |
| | | expire_date,process_edition,is_last_edition,is_locked,task_assign_time,status,create_dept,is_deleted,create_time,create_user,update_time,update_user</sql> |
| | | <select id="getCuredNcProgram" resultMap="BaseResultMap"> |
| | | select <include refid="prog_all_columns"/> from mdm_nc_program |
| | | where is_deleted=0 and is_cured=1 and part_no=#{partNo} and is_last_edition=1 |
| | | where is_deleted=0 and is_cured=1 and drawing_no=#{drawingNo} and is_last_edition=1 |
| | | and machine_code in (select code from mdm_machine where machine_group_code=#{machineGroupCode}) |
| | | order by create_time desc |
| | | limit 1 |
| | | </select> |
| | | |
| | | <sql id="all_columns">id,tenant_id,name,parent_id,node_type,status,create_dept,is_deleted,create_time,create_user,update_time,update_user</sql> |
| | | <sql id="all_columns_n">n.id,n.tenant_id,n.name,n.parent_id,n.node_type,n.status,n.create_dept,n.is_deleted,n.create_time,n.create_user,n.update_time,n.update_user</sql> |
| | | <select id="lazyList" resultType="org.springblade.mdm.program.vo.NcNodeVO"> |
| | | select <include refid="all_columns"/>,( |
| | | select <include refid="all_columns_n"/>,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 where is_deleted=0 and parent_id=#{parentId} |
| | | ) AS "has_children" from mdm_nc_node n left join blade_user u on n.create_user=u.id where n.is_deleted=0 and n.parent_id=#{parentId} |
| | | </select> |
| | | |
| | | |
| | |
| | | <result column="is_deleted" property="isDeleted"/> |
| | | </resultMap> |
| | | <select id="exportDncPageQuery" resultType="org.springblade.mdm.program.vo.NcProgramExportDncPageVO"> |
| | | select a.id,a.nc_program_id,p.name,p.nc_node_id,p.part_no,p.part_no_edition,p.process_name,a.create_time from mdm_nc_program_approved a inner join mdm_nc_program p on a.nc_program_id=p.id |
| | | select a.id,a.nc_program_id,p.name,p.nc_node_id,p.drawing_no,p.drawing_no_edition,p.process_name,a.create_time from mdm_nc_program_approved a inner join mdm_nc_program p on a.nc_program_id=p.id |
| | | where a.is_deleted=0 |
| | | <where> |
| | | <if test="query.name!=null and query.name!=''"> |
| | |
| | | |
| | | /** |
| | | * è·åææ°åºåç¨åº |
| | | * @param partNo é¶ç»ä»¶å· |
| | | * @param drawingNo é¶ç»ä»¶å· |
| | | * @param machineGroupCode æºåºç»ä»£ç |
| | | * @return |
| | | */ |
| | | List<NcProgram> getCuredNcProgram( @Param("partNo")String partNo,@Param("machineGroupCode")String machineGroupCode); |
| | | List<NcProgram> getCuredNcProgram( @Param("drawingNo")String drawingNo,@Param("machineGroupCode")String machineGroupCode); |
| | | |
| | | IPage<NcProgramVO> pageQuery(@Param("page")IPage<NcNodeProgramVO> page, @Param("query") NcNodeProgramQueryVO query); |
| | | } |
| | |
| | | <result column="package_name" property="packageName"/> |
| | | <result column="machine_code" property="machineCode"/> |
| | | |
| | | <result column="part_no" property="partNo"/> |
| | | <result column="drawing_no" property="drawingNo"/> |
| | | <result column="is_cured" property="isCured"/> |
| | | <result column="expire_date" property="expireDate"/> |
| | | <result column="process_edition" property="processEdition"/> |
| | |
| | | <!-- <select id="parentTree" resultMap="treeNodeResultMap">--> |
| | | <!-- select id, parent_id, dict_value as title, id as "value", id as "key" from blade_dict where is_deleted = 0 and parent_id = 0--> |
| | | <!-- </select>--> |
| | | <sql id="all_columns">id,tenant_id,nc_node_id,code,name,machine_code,part_no,is_cured, |
| | | <sql id="all_columns">id,tenant_id,nc_node_id,code,name,machine_code,drawing_no,is_cured, |
| | | expire_date,process_edition,is_last_edition,is_locked,task_assign_time,status,create_dept,is_deleted,create_time,create_user,update_time,update_user</sql> |
| | | <select id="getCuredNcProgram" resultMap="BaseResultMap"> |
| | | select <include refid="all_columns"/> from mdm_nc_program |
| | | where is_deleted=0 and is_cured=1 and part_no=#{partNo} and is_last_edition=1 |
| | | where is_deleted=0 and is_cured=1 and drawing_no=#{drawingNo} and is_last_edition=1 |
| | | and machine_code in (select code from mdm_machine where machine_group_code=#{machineGroupCode}) |
| | | order by create_time desc |
| | | </select> |
| | | |
| | | <select id="pageQuery" resultType="org.springblade.mdm.program.vo.NcProgramVO"> |
| | | select id,nc_node_id,name,machine_code,part_no,part_no_edition,process_name,craft_edition from mdm_nc_program p |
| | | select id,nc_node_id,name,machine_code,drawing_no,drawing_no_edition,process_name,craft_edition from mdm_nc_program p |
| | | where is_deleted=0 and is_last_edition=1 and (category='program' or category='subprogram') |
| | | <where> |
| | | |
| | |
| | | </if> |
| | | </where> |
| | | </select> |
| | | <!-- |
| | | <select id="getLastNcProgram" resultType="org.springblade.mdm.program.entity.NcProgram"> |
| | | select <include refid="all_columns"/> from mdm_nc_program |
| | | where is_deleted=0 and is_last_edition=1 order by create_time desc limit 1 |
| | | </select> |
| | | --> |
| | | |
| | | </mapper> |
| | |
| | | import org.apache.commons.compress.archivers.zip.ZipArchiveEntry; |
| | | import org.apache.commons.compress.archivers.zip.ZipFile; |
| | | import org.apache.commons.compress.utils.SeekableInMemoryByteChannel; |
| | | import org.springblade.core.mp.base.BizEntity; |
| | | import org.springblade.core.mp.base.BizServiceImpl; |
| | | import org.springblade.core.oss.OssTemplate; |
| | | import org.springblade.core.oss.model.BladeFile; |
| | | import org.springblade.core.redis.cache.BladeRedis; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.utils.FileUtil; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.core.tool.utils.IoUtil; |
| | | import org.springblade.mdm.flow.entity.ApproveRecord; |
| | | import org.springblade.mdm.flow.service.ApproveRecordService; |
| | | import org.springblade.mdm.flow.service.CureFlowService; |
| | | import org.springblade.mdm.program.entity.NcNode; |
| | | import org.springblade.mdm.program.entity.NcProgram; |
| | | import org.springblade.mdm.program.entity.NcProgramExchange; |
| | | import org.springblade.mdm.program.mapper.NcProgramExchangeMapper; |
| | | import org.springblade.mdm.program.vo.DncSendBackData; |
| | | import org.springblade.mdm.program.vo.MdmProgramImportVO; |
| | | import org.springblade.mdm.utils.CustomBinaryReader; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | import java.nio.file.Files; |
| | | import java.nio.file.Path; |
| | | import java.nio.file.Paths; |
| | | import java.time.LocalDateTime; |
| | | import java.time.Duration; |
| | | import java.util.*; |
| | | |
| | | /** |
| | |
| | | public class MdmProgramImportService extends BizServiceImpl<NcProgramExchangeMapper, NcProgramExchange> { |
| | | private final CureFlowService cureFlowService; |
| | | private final NcProgramService ncProgramService; |
| | | private final NcNodeService ncNodeService; |
| | | private final ApproveRecordService approveRecordService; |
| | | private final BladeRedis bladeRedis; |
| | | private final OssTemplate ossTemplate; |
| | | |
| | | private String getFileKey(){ |
| | | return "mdmimpfile-"+ AuthUtil.getUserId(); |
| | | } |
| | | /** |
| | | * MDM导å
¥æä»¶ä¸ä¼ |
| | | * @param file MDMæ¶å¯ç½å¯¼åºæä»¶ |
| | |
| | | public List<MdmProgramImportVO> mdmImportUpload(MultipartFile file) { |
| | | List<MdmProgramImportVO> list; |
| | | try { |
| | | BladeFile bfile = ossTemplate.putFile(file);//ä¸ä¼ ï¼ä¾åç»å
¥åºä½¿ç¨ |
| | | |
| | | //设置ä¸ä¸ªç¼åï¼2å°æ¶è¿æ |
| | | bladeRedis.setEx(getFileKey(),bfile.getName(), Duration.ofHours(2)); |
| | | String pkgFileName = bladeRedis.get(getFileKey()); |
| | | //String fileName = file.getOriginalFilename(); |
| | | //InputStream zipFileInputStream = FileExchangeUtil.convertFileToZip(file.getInputStream()); |
| | | InputStream zipFileInputStream = file.getInputStream();//test |
| | |
| | | d.setIsTest(jsonObject.getInteger("isTest")); |
| | | d.setMachineCode(jsonObject.getString("machineCode")); |
| | | d.setNcNodeId(jsonObject.getLong("ncNodeId")); |
| | | d.setPartNo(jsonObject.getString("partNo")); |
| | | d.setDrawingNo(jsonObject.getString("drawingNo")); |
| | | d.setProcessEdition(jsonObject.getString("processEdition")); |
| | | |
| | | fileDataMap.put(d.getName(),d); |
| | |
| | | * @param ids idå表éå·åé |
| | | * @return |
| | | */ |
| | | public void mdmFileAccept(String ids) { |
| | | /* |
| | | public void mdmFileAccept(String ids) throws IOException { |
| | | |
| | | String pkgFileName = bladeRedis.get(getFileKey()); |
| | | |
| | | List<Long> idList = Func.toLongList(ids); |
| | | // |
| | | updateProgramFile(pkgFileName,idList); |
| | | |
| | | List<NcProgram> progList = ncProgramService.listByIds(idList); |
| | | NcProgramExchange exchange; |
| | | //NcProgram program; |
| | | //NcNode programNode; |
| | | |
| | | for(NcProgram prog:progList){ |
| | | exchange = new NcProgramExchange(); |
| | |
| | | exchange.setExchangeType(2);//åä¼ |
| | | exchange.setNcProgramId(prog.getId()); |
| | | |
| | | |
| | | this.save(exchange); |
| | | |
| | | } |
| | | //ç´æ¥å
¥åºï¼æ æµç¨ |
| | | */ |
| | | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * æ´æ°ç¨åºæä»¶ |
| | | * @param pkgFileName mdmç¨åºå
|
| | | * @param idList éå®å
¥åºç |
| | | */ |
| | | private void updateProgramFile(String pkgFileName,List<Long> idList) throws IOException { |
| | | InputStream inputStream = this.ossTemplate.statFileStream(pkgFileName); |
| | | byte[] bytes = FileUtil.copyToByteArray(inputStream); |
| | | |
| | | List<NcNode> nodeList = new ArrayList<>(); |
| | | List<NcProgram> progList = new ArrayList<>(); |
| | | List<ApproveRecord> recordList = new ArrayList<>(); |
| | | |
| | | try (SeekableInMemoryByteChannel channel = new SeekableInMemoryByteChannel(bytes); |
| | | ZipFile zipFile = new ZipFile(channel)) { |
| | | |
| | | ZipArchiveEntry entry; |
| | | Enumeration<ZipArchiveEntry> entries = zipFile.getEntries(); |
| | | while (entries.hasMoreElements()) { |
| | | entry = entries.nextElement(); |
| | | |
| | | String entryName = entry.getName(); |
| | | |
| | | if (!entry.isDirectory()) { |
| | | if(entryName.equals(NcProgramExportDNCService.PROGRAM_JSON_FILE)){ |
| | | |
| | | try (InputStream insJson = zipFile.getInputStream(entry)) { |
| | | String jsonStr = IoUtil.readToString(insJson); |
| | | |
| | | JSONArray jsonArray = JSONArray.parseArray(jsonStr); |
| | | for(int i=0;i<jsonArray.size();i++){ |
| | | JSONObject jsonObject = jsonArray.getJSONObject(i); |
| | | NcProgram d = new NcProgram(); |
| | | d.setId(jsonObject.getLong("id")); |
| | | d.setName(jsonObject.getString("name")); |
| | | |
| | | d.setCode(jsonObject.getString("code")); |
| | | d.setDescription(jsonObject.getString("description")); |
| | | d.setCategory(jsonObject.getString("category")); |
| | | d.setBindNcNodeId(jsonObject.getLong("bindNcNodeId")); |
| | | d.setIsLastEdition(jsonObject.getInteger("isLastEdition")); |
| | | d.setIsLocked(jsonObject.getInteger("isLocked")); |
| | | d.setIsTest(jsonObject.getInteger("isTest")); |
| | | d.setMachineCode(jsonObject.getString("machineCode")); |
| | | d.setNcNodeId(jsonObject.getLong("ncNodeId")); |
| | | d.setDrawingNo(jsonObject.getString("drawingNo")); |
| | | d.setProcessEdition(jsonObject.getString("processEdition")); |
| | | |
| | | setBaseProperties(d,jsonObject); |
| | | |
| | | progList.add(d); |
| | | } |
| | | |
| | | } |
| | | }else if(entryName.equals(NcProgramExportDNCService.NODE_JSON_FILE)){ |
| | | try (InputStream insJson = zipFile.getInputStream(entry)) { |
| | | String jsonStr = IoUtil.readToString(insJson); |
| | | JSONArray jsonArray = JSONArray.parseArray(jsonStr); |
| | | for (int i = 0; i < jsonArray.size(); i++) { |
| | | JSONObject jsonObject = jsonArray.getJSONObject(i); |
| | | NcNode node = new NcNode(); |
| | | node.setId(jsonObject.getLong("id")); |
| | | node.setName(jsonObject.getString("name")); |
| | | node.setDescription(jsonObject.getString("description")); |
| | | node.setNodeType(jsonObject.getString("nodeType")); |
| | | node.setProcessName(jsonObject.getString("processName")); |
| | | node.setDrawingNo(jsonObject.getString("drawingNo")); |
| | | node.setMachineCode(jsonObject.getString("machineCode")); |
| | | node.setParentId(jsonObject.getLong("parentId")); |
| | | node.setParentIds(jsonObject.getString("parentIds")); |
| | | node.setIsCured(jsonObject.getInteger("isCured")); |
| | | |
| | | setBaseProperties(node,jsonObject); |
| | | |
| | | nodeList.add(node); |
| | | } |
| | | } |
| | | }else if(entryName.equals(NcProgramExportDNCService.APPROVE_RECORD_JSON_FILE)){ |
| | | try (InputStream insJson = zipFile.getInputStream(entry)) { |
| | | String jsonStr = IoUtil.readToString(insJson); |
| | | JSONArray jsonArray = JSONArray.parseArray(jsonStr); |
| | | for (int i = 0; i < jsonArray.size(); i++) { |
| | | JSONObject jsonObject = jsonArray.getJSONObject(i); |
| | | ApproveRecord record = new ApproveRecord(); |
| | | record.setId(jsonObject.getLong("id")); |
| | | record.setNcProgramId(jsonObject.getLong("ncProgramId")); |
| | | record.setUserId(jsonObject.getLong("userId")); |
| | | record.setUserNickname(jsonObject.getString("userNickname")); |
| | | record.setOperateResult(jsonObject.getString("operateResult")); |
| | | record.setOperateTime(jsonObject.getDate("operateTime")); |
| | | setBaseProperties(record,jsonObject); |
| | | |
| | | recordList.add(record); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | try (SeekableInMemoryByteChannel channel = new SeekableInMemoryByteChannel(bytes); |
| | | ZipFile zipFile = new ZipFile(channel)) { |
| | | |
| | | ZipArchiveEntry entry; |
| | | Enumeration<ZipArchiveEntry> entries = zipFile.getEntries(); |
| | | while (entries.hasMoreElements()) { |
| | | entry = entries.nextElement(); |
| | | |
| | | String entryName = entry.getName(); |
| | | |
| | | if (!entry.isDirectory() && !entryName.equals(NcProgramExportDNCService.PROGRAM_JSON_FILE)) { |
| | | |
| | | for(NcProgram prog:progList){ |
| | | if(prog.getName().equals(entryName)){ |
| | | try (InputStream ncFileStream = zipFile.getInputStream(entry)) { |
| | | BladeFile bfile = this.ossTemplate.putFile(prog.getName(),ncFileStream); |
| | | prog.setOssName(bfile.getName()); |
| | | prog.setUrl(bfile.getLink()); |
| | | } |
| | | break; |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | | for(NcNode node:nodeList){ |
| | | NcNode nodeTemp = this.ncNodeService.getById(node.getId()); |
| | | if(nodeTemp == null){ |
| | | ncNodeService.save(node); |
| | | }else{ |
| | | ncNodeService.updateById(node); |
| | | } |
| | | } |
| | | |
| | | for(NcProgram prog:progList){ |
| | | NcProgram ncTemp = ncProgramService.getById(prog.getId()); |
| | | if(ncTemp == null){ |
| | | ncProgramService.save(prog); |
| | | }else{ |
| | | ncProgramService.updateById(prog); |
| | | } |
| | | } |
| | | |
| | | for(ApproveRecord record:recordList) { |
| | | ApproveRecord recordTemp = this.approveRecordService.getById(record.getId()); |
| | | if (recordTemp == null) { |
| | | approveRecordService.save(record); |
| | | } else { |
| | | approveRecordService.updateById(record); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | void setBaseProperties(BizEntity entity,JSONObject jsonObject){ |
| | | entity.setCreateTime(jsonObject.getDate("createTime")); |
| | | entity.setUpdateTime(jsonObject.getDate("updateTime")); |
| | | entity.setStatus(jsonObject.getInteger("status")); |
| | | entity.setCreateUser(jsonObject.getLong("createUser")); |
| | | entity.setUpdateUser(jsonObject.getLong("updateUser")); |
| | | } |
| | | } |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.codec.digest.DigestUtils; |
| | | import org.apache.commons.compress.archivers.zip.ZipArchiveEntry; |
| | | import org.apache.commons.compress.archivers.zip.ZipArchiveInputStream; |
| | | import org.apache.commons.compress.archivers.zip.ZipFile; |
| | | import org.apache.commons.compress.utils.SeekableInMemoryByteChannel; |
| | | import org.apache.commons.io.IOUtils; |
| | | 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.oss.model.BladeFile; |
| | | import org.springblade.core.redis.cache.BladeRedis; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.utils.FileUtil; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.core.tool.utils.IoUtil; |
| | | import org.springblade.mdm.flow.service.CureFlowService; |
| | | import org.springblade.mdm.program.entity.NcNode; |
| | | import org.springblade.mdm.program.entity.NcProgram; |
| | | import org.springblade.mdm.program.entity.NcProgramExchange; |
| | | import org.springblade.mdm.program.mapper.NcProgramExchangeMapper; |
| | | import org.springblade.mdm.program.vo.DncSendBackData; |
| | | import org.springblade.mdm.utils.CustomBinaryReader; |
| | | import org.springblade.mdm.utils.FileExchangeUtil; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | |
| | | import java.nio.file.Files; |
| | | import java.nio.file.Path; |
| | | import java.nio.file.Paths; |
| | | import java.time.Duration; |
| | | import java.time.LocalDateTime; |
| | | import java.util.*; |
| | | |
| | |
| | | public class NcProgramExchangeService extends BizServiceImpl<NcProgramExchangeMapper, NcProgramExchange> { |
| | | private final CureFlowService cureFlowService; |
| | | private final NcProgramService ncProgramService; |
| | | private final NcNodeService ncNodeService; |
| | | private final OssTemplate ossTemplate; |
| | | private final BladeRedis bladeRedis; |
| | | |
| | | private String getFileKey(){ |
| | | return "dncexpfile-"+ AuthUtil.getUserId(); |
| | | } |
| | | /** |
| | | * dncåä¼ æä»¶ä¸ä¼ ï¼è§£æåä¿åå
¥uploadè¡¨ï¼ |
| | | * @param file DNCåä¼ æä»¶ |
| | |
| | | public List<DncSendBackData> dncSendBackUpload(MultipartFile file) { |
| | | List<DncSendBackData> list; |
| | | try { |
| | | //String fileName = file.getOriginalFilename(); |
| | | BladeFile bfile = ossTemplate.putFile(file);//ä¸ä¼ ï¼ä¾åç»å
¥åºä½¿ç¨ |
| | | //设置ä¸ä¸ªç¼åï¼2å°æ¶è¿æ |
| | | bladeRedis.setEx(getFileKey(),bfile.getName(), Duration.ofHours(2)); |
| | | |
| | | //InputStream zipFileInputStream = FileExchangeUtil.convertFileToZip(file.getInputStream()); |
| | | InputStream zipFileInputStream = file.getInputStream();//test |
| | | |
| | | byte[] bytes = FileUtil.copyToByteArray(zipFileInputStream); |
| | | list = parseDncZipFromByteArray(bytes); |
| | | |
| | | |
| | | } catch (IOException e) { |
| | | log.error("ä¸ä¼ dncåä¼ æä»¶å¤±è´¥",e); |
| | |
| | | } |
| | | |
| | | } |
| | | System.out.println("æä»¶å: " + entry.getName()); |
| | | System.out.println("大å°: " + entry.getSize()); |
| | | |
| | | // 读åæä»¶å
容å°åèæ°ç» |
| | | ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); |
| | | |
| | | } |
| | | |
| | |
| | | * @param ids idå表éå·åé |
| | | * @return |
| | | */ |
| | | public void dncFileAccept(String ids) { |
| | | public void dncFileAccept(String ids) throws IOException { |
| | | List<Long> idList = Func.toLongList(ids); |
| | | List<NcProgram> progList = ncProgramService.listByIds(idList); |
| | | // |
| | | NcProgramExchange exchange; |
| | | //NcProgram program; |
| | | //NcNode programNode; |
| | | |
| | | String pkgFileName = bladeRedis.get(getFileKey()); |
| | | updateProgramData(pkgFileName,idList); |
| | | List<NcProgram> progList = ncProgramService.listByIds(idList); |
| | | for(NcProgram prog:progList){ |
| | | exchange = new NcProgramExchange(); |
| | | exchange.setName(prog.getName()); |
| | |
| | | } |
| | | |
| | | cureFlowService.startCure(progList); |
| | | } |
| | | |
| | | void updateProgramData(String pkgFileName,List<Long> idList) throws IOException { |
| | | InputStream inputStream = this.ossTemplate.statFileStream(pkgFileName); |
| | | byte[] bytes = FileUtil.copyToByteArray(inputStream); |
| | | |
| | | List<NcNode> nodeList = new ArrayList<>(); |
| | | List<NcProgram> progList = new ArrayList<>(); |
| | | |
| | | try (SeekableInMemoryByteChannel channel = new SeekableInMemoryByteChannel(bytes); |
| | | ZipFile zipFile = new ZipFile(channel)) { |
| | | |
| | | ZipArchiveEntry entry; |
| | | Enumeration<ZipArchiveEntry> entries = zipFile.getEntries(); |
| | | while (entries.hasMoreElements()) { |
| | | entry = entries.nextElement(); |
| | | |
| | | String entryName = entry.getName(); |
| | | |
| | | if (entry.isDirectory()) { |
| | | continue; |
| | | } |
| | | if(entryName.equals(NcProgramExportDNCService.PROGRAM_JSON_FILE)){ |
| | | |
| | | try (InputStream insJson = zipFile.getInputStream(entry)) { |
| | | String jsonStr = IoUtil.readToString(insJson); |
| | | |
| | | JSONArray jsonArray = JSONArray.parseArray(jsonStr); |
| | | for(int i=0;i<jsonArray.size();i++){ |
| | | JSONObject jsonObject = jsonArray.getJSONObject(i); |
| | | NcProgram program = new NcProgram(); |
| | | program.setId(jsonObject.getLong("id")); |
| | | if(!idList.contains(program.getId())){//䏿¯éå®å
¥åºç |
| | | continue; |
| | | } |
| | | program.setName(jsonObject.getString("name")); |
| | | |
| | | program.setCode(jsonObject.getString("code")); |
| | | program.setDescription(jsonObject.getString("description")); |
| | | program.setCategory(jsonObject.getString("category")); |
| | | program.setBindNcNodeId(jsonObject.getLong("bindNcNodeId")); |
| | | program.setIsLastEdition(jsonObject.getInteger("isLastEdition")); |
| | | program.setIsLocked(jsonObject.getInteger("isLocked")); |
| | | program.setIsTest(jsonObject.getInteger("isTest")); |
| | | program.setMachineCode(jsonObject.getString("machineCode")); |
| | | program.setNcNodeId(jsonObject.getLong("ncNodeId")); |
| | | program.setDrawingNo(jsonObject.getString("drawingNo")); |
| | | program.setProcessEdition(jsonObject.getString("processEdition")); |
| | | |
| | | setBaseProperties(program,jsonObject); |
| | | |
| | | progList.add(program); |
| | | } |
| | | |
| | | } |
| | | }else if(entryName.equals(NcProgramExportDNCService.NODE_JSON_FILE)){ |
| | | try (InputStream insJson = zipFile.getInputStream(entry)) { |
| | | String jsonStr = IoUtil.readToString(insJson); |
| | | JSONArray jsonArray = JSONArray.parseArray(jsonStr); |
| | | for (int i = 0; i < jsonArray.size(); i++) { |
| | | JSONObject jsonObject = jsonArray.getJSONObject(i); |
| | | NcNode node = new NcNode(); |
| | | node.setId(jsonObject.getLong("id")); |
| | | node.setName(jsonObject.getString("name")); |
| | | node.setDescription(jsonObject.getString("description")); |
| | | node.setNodeType(jsonObject.getString("nodeType")); |
| | | node.setProcessName(jsonObject.getString("processName")); |
| | | node.setDrawingNo(jsonObject.getString("drawingNo")); |
| | | node.setMachineCode(jsonObject.getString("machineCode")); |
| | | node.setParentId(jsonObject.getLong("parentId")); |
| | | node.setParentIds(jsonObject.getString("parentIds")); |
| | | node.setIsCured(jsonObject.getInteger("isCured")); |
| | | |
| | | setBaseProperties(node,jsonObject); |
| | | |
| | | nodeList.add(node); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | //ä¸ä¼ å缩å
å
çç¨åºå¹¶æ´æ°ç¨åºæä»¶å°å |
| | | try (SeekableInMemoryByteChannel channel = new SeekableInMemoryByteChannel(bytes); |
| | | ZipFile zipFile = new ZipFile(channel)) { |
| | | |
| | | ZipArchiveEntry entry; |
| | | Enumeration<ZipArchiveEntry> entries = zipFile.getEntries(); |
| | | while (entries.hasMoreElements()) { |
| | | entry = entries.nextElement(); |
| | | |
| | | String entryName = entry.getName(); |
| | | |
| | | if (!entry.isDirectory() && !NcProgramExportDNCService.isDataFile(entryName)) { |
| | | |
| | | for(NcProgram prog:progList){ |
| | | if(prog.getName().equals(entryName)){ |
| | | try (InputStream ncFileStream = zipFile.getInputStream(entry)) { |
| | | BladeFile bfile = this.ossTemplate.putFile(prog.getName(),ncFileStream); |
| | | prog.setOssName(bfile.getName()); |
| | | prog.setUrl(bfile.getLink()); |
| | | } |
| | | break; |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | | for(NcNode node:nodeList){ |
| | | NcNode nodeTemp = this.ncNodeService.getById(node.getId()); |
| | | if(nodeTemp == null){ |
| | | ncNodeService.save(node); |
| | | }else{ |
| | | ncNodeService.updateById(node); |
| | | } |
| | | } |
| | | |
| | | for(NcProgram prog:progList){ |
| | | NcProgram ncTemp = ncProgramService.getById(prog.getId()); |
| | | if(ncTemp == null){ |
| | | ncProgramService.save(prog); |
| | | }else{ |
| | | ncProgramService.updateById(prog); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | void setBaseProperties(BizEntity entity, JSONObject jsonObject){ |
| | | entity.setCreateTime(jsonObject.getDate("createTime")); |
| | | entity.setUpdateTime(jsonObject.getDate("updateTime")); |
| | | entity.setStatus(jsonObject.getInteger("status")); |
| | | entity.setCreateUser(jsonObject.getLong("createUser")); |
| | | entity.setUpdateUser(jsonObject.getLong("updateUser")); |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.compress.archivers.zip.ZipArchiveEntry; |
| | | import org.apache.commons.compress.archivers.zip.ZipFile; |
| | | import org.apache.commons.compress.utils.SeekableInMemoryByteChannel; |
| | | 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.tool.utils.FileUtil; |
| | | 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.mapper.NcProgramExchangeMapper; |
| | | import org.springblade.mdm.program.vo.DncSendBackData; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.*; |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.util.ArrayList; |
| | | import java.util.Enumeration; |
| | | import java.util.List; |
| | | import java.util.zip.ZipEntry; |
| | | import java.util.zip.ZipOutputStream; |
| | |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class NcProgramExportDNCService extends BizServiceImpl<NcProgramExchangeMapper, NcProgramExchange> { |
| | | |
| | | private final NcProgramService progService; |
| | | private final NcProgramApprovedService approvedService; |
| | | private final ApproveRecordService approveRecordService; |
| | |
| | | private final OssTemplate ossTemplate; |
| | | |
| | | public static final String PROGRAM_JSON_FILE = "exp_mdm_nc_program.json"; |
| | | public static final String NODE_JSON_FILE = "exp_mdm_nc_node.json"; |
| | | public static final String APPROVE_RECORD_JSON_FILE = "exp_mdm_approve_record.json"; |
| | | |
| | | /** |
| | | * æ¯å¦å缩å
å
çæ°æ®æä»¶ |
| | | * @param filename æä»¶åç§° |
| | | * @return |
| | | */ |
| | | public static boolean isDataFile(String filename){ |
| | | return StringUtils.equals(filename, PROGRAM_JSON_FILE) || StringUtils.equals(filename, NODE_JSON_FILE) || StringUtils.equals(filename, APPROVE_RECORD_JSON_FILE); |
| | | } |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * @param query æ¥è¯¢åæ° |
| | |
| | | addDataJson(zipOut, programIdList); |
| | | } |
| | | |
| | | os.close(); |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | recObj.put("category",program.getCategory()); |
| | | recObj.put("description",program.getDescription()); |
| | | recObj.put("name",program.getName()); |
| | | recObj.put("partNo",program.getPartNo()); |
| | | recObj.put("drawingNo",program.getDrawingNo()); |
| | | recObj.put("ncNodeId",program.getNcNodeId()); |
| | | recObj.put("bindNcNodeId",program.getBindNcNodeId()); |
| | | recObj.put("url",program.getUrl()); |
| | |
| | | recObj.put("description",node.getDescription()); |
| | | recObj.put("name",node.getName()); |
| | | recObj.put("remark",node.getRemark()); |
| | | recObj.put("partNo",node.getPartNo()); |
| | | recObj.put("drawingNo",node.getDrawingNo()); |
| | | recObj.put("parentIds",node.getParentIds()); |
| | | recObj.put("processName",node.getProcessName()); |
| | | |
| | |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.io.FileUtils; |
| | | import org.apache.commons.io.IOUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.flowable.engine.*; |
| | | import org.springblade.core.mp.base.BizServiceImpl; |
| | | import org.springblade.core.mp.support.Condition; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.nio.charset.StandardCharsets; |
| | |
| | | public class NcProgramService extends BizServiceImpl<NcProgramMapper, NcProgram> { |
| | | |
| | | private final MachineService machineService; |
| | | |
| | | private final OssTemplate ossTemplate; |
| | | private final NcNodeService nodeService; |
| | | |
| | | private final ProgramSeqMapper seqMapper; |
| | | /** |
| | | * æ¥è¯¢ç°æåºåçç¨åºï¼æå®æ¡ä»¶ï¼é¶ç»ä»¶å·ç¸åï¼ä¸æ¯å䏿ºåºç» |
| | | * @param partNo |
| | | * @param drwaingNo |
| | | * @param machineCode |
| | | * @return |
| | | */ |
| | | public List<NcProgram> getCuredNcProgram(String partNo,String machineCode) { |
| | | public List<NcProgram> getCuredNcProgram(String drwaingNo,String machineCode) { |
| | | Machine machine = machineService.getByCode(machineCode); |
| | | return this.getBaseMapper().getCuredNcProgram(partNo,machine.getMachineGroupCode()); |
| | | return this.getBaseMapper().getCuredNcProgram(drwaingNo,machine.getMachineGroupCode()); |
| | | } |
| | | |
| | | |
| | |
| | | prog.setName(file.getOriginalFilename()); |
| | | prog.setNcNodeId(uploadVO.getNodeId()); |
| | | prog.setOssName(bfile.getName()); |
| | | prog.setPartNo(uploadVO.getPartNo()); |
| | | prog.setDrawingNo(uploadVO.getDrawingNo()); |
| | | prog.setProcessEdition(uploadVO.getProcessEdition()); |
| | | prog.setIsLastEdition(1); |
| | | boolean isTextFile = false; |
| | |
| | | prog.setName(file.getOriginalFilename()); |
| | | prog.setNcNodeId(uploadVO.getNodeId()); |
| | | prog.setOssName(bfile.getName()); |
| | | prog.setPartNo(uploadVO.getPartNo()); |
| | | prog.setDrawingNo(uploadVO.getDrawingNo()); |
| | | prog.setProcessEdition(uploadVO.getProcessEdition()); |
| | | prog.setIsLastEdition(1); |
| | | prog.setMachineCode(uploadVO.getMachineCode()); |
| | |
| | | node.setName(prog.getName()); |
| | | node.setMachineCode(uploadVO.getMachineCode()); |
| | | node.setParentId(uploadVO.getNodeId()); |
| | | node.setPartNo(uploadVO.getPartNo()); |
| | | node.setDrawingNo(uploadVO.getDrawingNo()); |
| | | node.setProcessName(uploadVO.getProcessName()); |
| | | |
| | | nodeService.save(node); |
| | |
| | | public IPage<NcProgramVO> pageQuery(NcNodeProgramQueryVO query) { |
| | | return this.getBaseMapper().pageQuery(Condition.getPage(query),query); |
| | | } |
| | | |
| | | /** |
| | | * ä¸åç»ä½ æºåº |
| | | * @param bindNcNodeId ä¸ç¨åºç»å®çèç¹id |
| | | */ |
| | | public void sendByBindNodeId(Long bindNcNodeId) throws IOException { |
| | | //NcNode node = this.nodeService.getById(bindNodeId); |
| | | LambdaQueryWrapper<NcProgram> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(NcProgram::getBindNcNodeId, bindNcNodeId); |
| | | wrapper.eq(NcProgram::getIsLastEdition,1); |
| | | NcProgram prog = this.getOne(wrapper); |
| | | String filePath = prog.getName(); |
| | | try(InputStream ins = ossTemplate.statFileStream(prog.getOssName());){ |
| | | File targetFile = new File(filePath); |
| | | FileUtils.copyInputStreamToFile(ins, targetFile); |
| | | } |
| | | } |
| | | |
| | | String getFilePath(NcProgram prog){ |
| | | Machine machine = machineService.getByCode(prog.getMachineCode()); |
| | | String dirPath = machine.getProgSendDir(); |
| | | |
| | | dirPath = StringUtils.removeEnd(StringUtils.removeEnd(dirPath,"/"),"\\"); |
| | | File dirs = new File(dirPath); |
| | | if(!dirs.exists()){ |
| | | dirs.mkdirs(); |
| | | } |
| | | |
| | | return dirPath+File.separator+prog.getName(); |
| | | } |
| | | } |
| | |
| | | import org.springblade.core.oss.model.BladeFile; |
| | | import org.springblade.mdm.basesetting.machine.MachineService; |
| | | import org.springblade.mdm.basesetting.machine.entity.Machine; |
| | | import org.springblade.mdm.flow.excution.StartDispatcher; |
| | | import org.springblade.mdm.flow.service.FlowCommonService; |
| | | import org.springblade.mdm.program.entity.NcNode; |
| | | import org.springblade.mdm.program.entity.NcProgram; |
| | | import org.springblade.mdm.program.entity.ProcessProgRef; |
| | |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class ProcessProgRefService extends BizServiceImpl<ProcessProgRefMapper, ProcessProgRef> { |
| | | |
| | | private final FlowCommonService flowCommonService; |
| | | /** |
| | | * æ¥è¯¢ç°æåºåçç¨åºï¼æå®æ¡ä»¶ï¼é¶ç»ä»¶å·ç¸åï¼ä¸æ¯å䏿ºåºç» |
| | | * @param processInstanceId æµç¨å®ä¾id |
| | |
| | | return; |
| | | } |
| | | |
| | | String processDefinationKey = flowCommonService.getDefinitionKey(processInstanceId); |
| | | this.lambdaUpdate().eq(ProcessProgRef::getProcessInstanceId, processInstanceId).remove(); |
| | | List<ProcessProgRef> entities = new ArrayList<>(); |
| | | for (Long programId : programIds) { |
| | | ProcessProgRef entity = new ProcessProgRef(); |
| | | entity.setProcessInstanceId(processInstanceId); |
| | | entity.setNcProgramId(programId); |
| | | |
| | | entity.setProcessDefinitionKey(processDefinationKey); |
| | | entities.add(entity); |
| | | } |
| | | this.saveBatch(entities); |
| | |
| | | */ |
| | | public ProcessProgRef lastDispatchDataByNcProgramId(Long ncProgramId) { |
| | | LambdaQueryWrapper<ProcessProgRef> query = Wrappers.lambdaQuery(); |
| | | query.eq(ProcessProgRef::getNcProgramId, ncProgramId).orderByDesc(ProcessProgRef::getCreateTime).last("LIMIT 10");; |
| | | |
| | | query.eq(ProcessProgRef::getNcProgramId, ncProgramId).eq(ProcessProgRef::getProcessDefinitionKey, StartDispatcher.PROCESS_KEY).orderByDesc(ProcessProgRef::getCreateTime).last("LIMIT 1");; |
| | | |
| | | List<ProcessProgRef> list = this.list(query); |
| | | return list.isEmpty() ? null : list.get(0); |
| | |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * å¨å·¥æ§ç½å¯¼å
¥MDMç¨åº |
| | | */ |
| | |
| | | private String machineCode; |
| | | |
| | | @Schema(description = "å¾å·") |
| | | private String partNo; |
| | | private String drawingNo; |
| | | |
| | | /** |
| | | * æè¿° |
| | |
| | | private String craftEdition; |
| | | |
| | | @Schema(description = "é¶ç»ä»¶å·/å¾å·") |
| | | private String partNo; |
| | | private String drawingNo; |
| | | } |
| | |
| | | private String description; |
| | | @Schema(description = "夿³¨") |
| | | private String remark; |
| | | @Schema(description = "åå»ºç¨æ·åç§°") |
| | | private String createUserName; |
| | | } |
| | |
| | | @Schema(description = "ç¨åºåç§°") |
| | | private String name; |
| | | @Schema(description = "å¾å·") |
| | | private String partNo; |
| | | private String drawingNo; |
| | | @Schema(description = "å¾å·ç次") |
| | | private String partNoEdition; |
| | | private String drawingNoEdition; |
| | | @Schema(description = "å·¥åºåç§°") |
| | | private String processName; |
| | | } |
| | |
| | | private MultipartFile file; |
| | | |
| | | @Schema(description = "é¶ç»ä»¶å·/å¾å·") |
| | | private String partNo; |
| | | private String drawingNo; |
| | | |
| | | @Schema(description = "å·¥åºï¼å¦âç²¾é£â") |
| | | private String processName; |
| | |
| | | private String craftEdition; |
| | | |
| | | @Schema(description = "é¶ç»ä»¶å·/å¾å·") |
| | | private String partNo; |
| | | private String drawingNo; |
| | | @Schema(description = "é¶ç»ä»¶å·/å¾å·ç次") |
| | | private String partNoEdition; |
| | | private String drawingNoEdition; |
| | | |
| | | @Schema(description = "æ¯å¦æµè¯ç¨åº.1æ¯;0å¦") |
| | | private Integer isTest; |
| | |
| | | <conditionExpression>${approve=='Y'}</conditionExpression> |
| | | </sequenceFlow> |
| | | <sequenceFlow id="sid-504610fe-2b87-4df4-8f42-f10c8bf3ce01" sourceRef="seniorApproveTask" targetRef="cureOKOperateTask"> |
| | | <conditionExpression>${approve=='Y'</conditionExpression> |
| | | <conditionExpression>${approve=='Y'}</conditionExpression> |
| | | </sequenceFlow> |
| | | <userTask id="cureCheckTask" name="åºåæ ¡å¯¹" flowable:assignee="${assignee}"/> |
| | | <sequenceFlow id="sid-b4ad2b36-5fcc-4449-924b-55b0425b1278" sourceRef="cureCheckTask" targetRef="cureProgramTask"> |
| | | <conditionExpression>${approve=='N'</conditionExpression> |
| | | <conditionExpression>${approve=='N'}</conditionExpression> |
| | | </sequenceFlow> |
| | | <sequenceFlow id="sid-f626de1f-b668-49b8-bd06-6e8039abf2fc" sourceRef="cureCheckTask" targetRef="seniorApproveTask"> |
| | | <conditionExpression>${approve=='Y'</conditionExpression> |
| | | <conditionExpression>${approve=='Y'}</conditionExpression> |
| | | </sequenceFlow> |
| | | <endEvent id="cureProgramingNoEnd" name="åºåç¼å¶ç»æ"/> |
| | | <sequenceFlow id="sid-a3a0654d-e9fd-4814-a1bd-384dce8a3b7a" sourceRef="cureProgramTask" targetRef="cureProgramingNoEnd"> |
| | | <conditionExpression>${approve=='N'</conditionExpression> |
| | | <conditionExpression>${approve=='N'}</conditionExpression> |
| | | </sequenceFlow> |
| | | <sequenceFlow id="sid-c04cc547-0baf-4514-8056-54b1612cdefd" sourceRef="seniorApproveTask" targetRef="cureCheckTask"> |
| | | <conditionExpression>${approve=='N'}</conditionExpression> |