| | |
| | | import org.springblade.core.tool.utils.DateUtil; |
| | | import org.springblade.mdm.basesetting.machine.MachineService; |
| | | import org.springblade.mdm.basesetting.machine.entity.Machine; |
| | | import org.springblade.mdm.basesetting.producedivision.entity.QinzheFgb; |
| | | import org.springblade.mdm.basesetting.producedivision.service.QinzheFgbService; |
| | | import org.springblade.mdm.commons.contants.DictBizConstants; |
| | | import org.springblade.mdm.commons.service.ParamService; |
| | | import org.springblade.mdm.flow.constants.FlowContants; |
| | |
| | | @Service |
| | | public class ProgramConfirmTableService { |
| | | @Autowired |
| | | private FlowCommonService flowCommonService; |
| | | private QinzheFgbService qinzheFgbService; |
| | | @Autowired |
| | | private IDictBizClient dictBizClient; |
| | | @Autowired |
| | |
| | | data.put("productModel",props.getProductModel()); |
| | | data.put("craftEdition",props.getCraftEdition()); |
| | | |
| | | //零组件名称 |
| | | data.put("drawingName",getDrawingName(props.getDrawingNo())); |
| | | data.put("deviation",props.getDeviation()); |
| | | data.put("programNo",queryProgramNo(props.getNodeId())); |
| | | |
| | | |
| | | data.put("fuheY","Y"); |
| | | data.put("keyongY","Y"); |
| | | Machine machine = this.machineService.getByCode(props.getMachineCode()); |
| | |
| | | return data; |
| | | } |
| | | |
| | | /** |
| | | * 查询程序编号 |
| | | * @param nodeId |
| | | * @return |
| | | */ |
| | | private String queryProgramNo(Long nodeId) { |
| | | if(nodeId ==null) { |
| | | return StringUtils.EMPTY; |
| | | } |
| | | NcNode programPkdNode = this.ncNodeService.getById(nodeId); |
| | | if (programPkdNode != null) { |
| | | return programPkdNode.getProgramNo(); |
| | | }else{ |
| | | return StringUtils.EMPTY; |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 获取零组件名称 |
| | | * @param drawingNo 零件编号 |
| | | * @return 零组件名称 |
| | | */ |
| | | String getDrawingName(String drawingNo){ |
| | | QinzheFgb fgb = qinzheFgbService.getByLjh(drawingNo); |
| | | if(fgb!= null){ |
| | | return fgb.getLjmc(); |
| | | }else{ |
| | | return StringUtils.EMPTY; |
| | | } |
| | | |
| | | } |
| | | |
| | | String getNameByUserId(Long userId){ |
| | | if(userId == null){ |
| | |
| | | return name; |
| | | } |
| | | |
| | | |
| | | |
| | | } |