yangys
2025-06-27 26f07223e1b33a8eb5ee184041575e9b204cfebe
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package org.springblade.mdm.flow.task.dispatch;
 
import lombok.extern.slf4j.Slf4j;
import org.flowable.engine.delegate.DelegateExecution;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.mdm.program.entity.NcProgram;
import org.springblade.mdm.program.service.NcProgramService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
 
@Slf4j
@Component("programEmptyUpgradeProcessEdtionTask")
public class ProgramEmptyUpgradeProcessEdtionTask {
    @Autowired
    private NcProgramService ncProgramService;
    public void execute(DelegateExecution execution) {
        //空升版,新加入一条程序数据,并且将工序版次processEdition设置为用户输入的新版本
        /*
        NcProgram ncProgram =  (NcProgram)execution.getVariable("curedNcProgram");
        //将现有程序设置为非最新的
        ncProgram.setIsLastEdition(0);
        ncProgramService.updateById(ncProgram);
 
        NcProgram newNcProgram = new NcProgram();
        BeanUtil.copyProperties(ncProgram, newNcProgram);
        newNcProgram.setIsLastEdition(1);
        newNcProgram.setId(null);
        ncProgramService.save(newNcProgram);
 
        log.info("空升版完成,新的程序id为{}",newNcProgram.getId());
 
         */
    }
}