| | |
| | | <result column="is_deleted" property="isDeleted"/> |
| | | </resultMap>--> |
| | | <select id="pageQuery" resultType="org.springblade.mdm.basesetting.producedivision.vo.ProduceDivisionViewVO"> |
| | | select p.id,p.team_leader_id,p.programmer_id,p.checker_id,p.senior_id,l.name team_leader_name,pro.name programmer_name,c.name checker_name,s.name seniorName |
| | | select p.id,p.drawing_no,p.team_leader_id,p.programmer_id,p.checker_id,p.senior_id,l.name team_leader_name,pro.name programmer_name,c.name checker_name,s.name seniorName |
| | | from mdm_produce_division p join blade_user l on p.team_leader_id=l.id and l.is_deleted=0 |
| | | join blade_user pro on p.programmer_id=pro.id and pro.is_deleted=0 |
| | | join blade_user c on p.checker_id=c.id and c.is_deleted=0 |
| | |
| | | @Getter |
| | | public class ProduceDivisionViewVO extends BaseVO { |
| | | |
| | | @Schema(description = "零组件号/图号") |
| | | private String drawingNo; |
| | | |
| | | @Schema(description = "专业组长id") |
| | | private Long teamLeaderId; |
| | | @Schema(description = "专业组长姓名") |
| | | private String teamLeaderName; |
| | | |
| | | @Schema(description = "编制工艺员id") |
| | |
| | | |
| | | @PostMapping("/upgrade-process-edition") |
| | | @Operation(summary = "升版", description = "升级工序版次") |
| | | public R<Boolean> upgradeProcessEdition(Long id,String newProcessEdition ) { |
| | | ncProgramService.upgradeProcessEdition(id,newProcessEdition); |
| | | public R<Boolean> upgradeProcessEdition(Long bindNcNodeId,String newProcessEdition ) { |
| | | ncProgramService.upgradeProcessEdition(bindNcNodeId,newProcessEdition); |
| | | return R.<Boolean>status(true); |
| | | } |
| | | |
| | |
| | | |
| | | /** |
| | | * 升版(升级工序版次),升级工序版本(包括程序和其他附件) |
| | | * @param id 程序文件id |
| | | * @param bindNodeid 程序文件绑定的节点id |
| | | * @param newProcessEdition 新版次 |
| | | */ |
| | | public void upgradeProcessEdition(long id,String newProcessEdition) { |
| | | NcProgram prog = this.getById(id); |
| | | public void upgradeProcessEdition(long bindNcNodeid,String newProcessEdition) { |
| | | //NcProgram prog = this.getById(id); |
| | | NcProgram prog = getByBindNodeId(bindNcNodeid); |
| | | |
| | | //将现有程序更新为非最新版本 |
| | | this.update(Wrappers.lambdaUpdate(NcProgram.class).eq(NcProgram::getId,id).set(NcProgram::getIsLastEdition,0)); |
| | | this.update(Wrappers.lambdaUpdate(NcProgram.class).eq(NcProgram::getBindNcNodeId,bindNcNodeid).set(NcProgram::getIsLastEdition,0)); |
| | | |
| | | NcProgram newVerProg = new NcProgram(); |
| | | BeanUtils.copyProperties(prog, newVerProg); |