|
|
@ -113,6 +113,31 @@ public class TechnicalSpecificationServiceImpl implements TechnicalSpecification |
|
|
@Autowired |
|
|
@Autowired |
|
|
private DictDataServiceImpl dictDataServiceImpl; |
|
|
private DictDataServiceImpl dictDataServiceImpl; |
|
|
|
|
|
|
|
|
|
|
|
private void fillBmOperatorFields(PlmTechnicalSpecificationSheetData data) { |
|
|
|
|
|
if (data == null) { |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
String operator = data.getUserName(); |
|
|
|
|
|
if (!StringUtils.hasText(operator)) { |
|
|
|
|
|
operator = data.getUsername(); |
|
|
|
|
|
} |
|
|
|
|
|
if (!StringUtils.hasText(operator)) { |
|
|
|
|
|
operator = data.getUpdateBy(); |
|
|
|
|
|
} |
|
|
|
|
|
if (!StringUtils.hasText(operator)) { |
|
|
|
|
|
Object principal = SecurityUtils.getSubject().getPrincipal(); |
|
|
|
|
|
if (principal instanceof SysUserEntity) { |
|
|
|
|
|
operator = ((SysUserEntity) principal).getUsername(); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
if (!StringUtils.hasText(operator)) { |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
data.setUserName(operator); |
|
|
|
|
|
data.setUsername(operator); |
|
|
|
|
|
data.setUpdateBy(operator); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public PageUtils technicalSpecificationListSearch(PlmTechnicalSpecificationSheetData inData){ |
|
|
public PageUtils technicalSpecificationListSearch(PlmTechnicalSpecificationSheetData inData){ |
|
|
// IPage<PlmTechnicalSpecificationSheetData> resultList = this.technicalSpecificationMapper.technicalSpecificationListSearch( |
|
|
// IPage<PlmTechnicalSpecificationSheetData> resultList = this.technicalSpecificationMapper.technicalSpecificationListSearch( |
|
|
@ -447,6 +472,7 @@ public class TechnicalSpecificationServiceImpl implements TechnicalSpecification |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public void updateBMBasicInfoEntry(PlmTechnicalSpecificationSheetData inData){ |
|
|
public void updateBMBasicInfoEntry(PlmTechnicalSpecificationSheetData inData){ |
|
|
|
|
|
fillBmOperatorFields(inData); |
|
|
technicalSpecificationMapper.updateBMBasicInfoEntry(inData); |
|
|
technicalSpecificationMapper.updateBMBasicInfoEntry(inData); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -1552,6 +1578,7 @@ public class TechnicalSpecificationServiceImpl implements TechnicalSpecification |
|
|
public void issueChange(PlmTechnicalSpecificationSheetData data) { |
|
|
public void issueChange(PlmTechnicalSpecificationSheetData data) { |
|
|
SysUserEntity sysUserEntity = (SysUserEntity) SecurityUtils.getSubject().getPrincipal(); |
|
|
SysUserEntity sysUserEntity = (SysUserEntity) SecurityUtils.getSubject().getPrincipal(); |
|
|
data.setUserName(sysUserEntity.getUsername()); |
|
|
data.setUserName(sysUserEntity.getUsername()); |
|
|
|
|
|
fillBmOperatorFields(data); |
|
|
// 修改 |
|
|
// 修改 |
|
|
// updateBMBasicInformation(data); |
|
|
// updateBMBasicInformation(data); |
|
|
// 关闭调用OA接口时 |
|
|
// 关闭调用OA接口时 |
|
|
@ -1733,6 +1760,7 @@ public class TechnicalSpecificationServiceImpl implements TechnicalSpecification |
|
|
public void submitChange(PlmTechnicalSpecificationSheetData data) { |
|
|
public void submitChange(PlmTechnicalSpecificationSheetData data) { |
|
|
SysUserEntity sysUserEntity = (SysUserEntity) SecurityUtils.getSubject().getPrincipal(); |
|
|
SysUserEntity sysUserEntity = (SysUserEntity) SecurityUtils.getSubject().getPrincipal(); |
|
|
data.setUserName(sysUserEntity.getUsername()); |
|
|
data.setUserName(sysUserEntity.getUsername()); |
|
|
|
|
|
fillBmOperatorFields(data); |
|
|
// 修改 |
|
|
// 修改 |
|
|
// updateBMBasicInformation(data); |
|
|
// updateBMBasicInformation(data); |
|
|
// 获取提交基础数据 |
|
|
// 获取提交基础数据 |
|
|
@ -2108,6 +2136,7 @@ public class TechnicalSpecificationServiceImpl implements TechnicalSpecification |
|
|
@Override |
|
|
@Override |
|
|
@Transactional |
|
|
@Transactional |
|
|
public void bmStatusToDead(PlmTechnicalSpecificationSheetData data) { |
|
|
public void bmStatusToDead(PlmTechnicalSpecificationSheetData data) { |
|
|
|
|
|
fillBmOperatorFields(data); |
|
|
// 查询特殊权限 校验是否可以执行操作 |
|
|
// 查询特殊权限 校验是否可以执行操作 |
|
|
List<ProcessFormEntity> processFormList = changeManagementMapper.queryRequestId(data.getSite(), "", data.getCodeNo()); |
|
|
List<ProcessFormEntity> processFormList = changeManagementMapper.queryRequestId(data.getSite(), "", data.getCodeNo()); |
|
|
if (!processFormList.isEmpty()) { |
|
|
if (!processFormList.isEmpty()) { |
|
|
@ -2157,6 +2186,7 @@ public class TechnicalSpecificationServiceImpl implements TechnicalSpecification |
|
|
@Override |
|
|
@Override |
|
|
@Transactional |
|
|
@Transactional |
|
|
public void bmStatusToCg(PlmTechnicalSpecificationSheetData data) { |
|
|
public void bmStatusToCg(PlmTechnicalSpecificationSheetData data) { |
|
|
|
|
|
fillBmOperatorFields(data); |
|
|
// 将技术参数卡的状态改为"草稿"状态 |
|
|
// 将技术参数卡的状态改为"草稿"状态 |
|
|
// 将技术参数卡的Step_id改为初始状态(空) |
|
|
// 将技术参数卡的Step_id改为初始状态(空) |
|
|
// ECN_flag 改为N,生产状态(stage)改为Sample |
|
|
// ECN_flag 改为N,生产状态(stage)改为Sample |
|
|
@ -2176,6 +2206,7 @@ public class TechnicalSpecificationServiceImpl implements TechnicalSpecification |
|
|
@Override |
|
|
@Override |
|
|
@Transactional |
|
|
@Transactional |
|
|
public void bmStatusToFinish(PlmTechnicalSpecificationSheetData data) { |
|
|
public void bmStatusToFinish(PlmTechnicalSpecificationSheetData data) { |
|
|
|
|
|
fillBmOperatorFields(data); |
|
|
|
|
|
|
|
|
// 2025-07-17 修改技术参数卡的状态为已完成后,重新获取bom和工艺路线 |
|
|
// 2025-07-17 修改技术参数卡的状态为已完成后,重新获取bom和工艺路线 |
|
|
List<BomComponentVo> bomList = fetchBomComponentDetails(data.getSite(), data.getCodeNo(), "archiving"); |
|
|
List<BomComponentVo> bomList = fetchBomComponentDetails(data.getSite(), data.getCodeNo(), "archiving"); |
|
|
|