Browse Source

2026-06-18

技术参数卡有更新时间没有更新人
master
fengyuan_yang 4 days ago
parent
commit
019824fc48
  1. 16
      src/main/java/com/spring/modules/sampleManagement/data/PlmTechnicalSpecificationSheetData.java
  2. 31
      src/main/java/com/spring/modules/sampleManagement/service/Impl/TechnicalSpecificationServiceImpl.java
  3. 8
      src/main/resources/mapper/sampleManagement/TechnicalSpecificationMapper.xml

16
src/main/java/com/spring/modules/sampleManagement/data/PlmTechnicalSpecificationSheetData.java

@ -424,11 +424,17 @@ public class PlmTechnicalSpecificationSheetData extends PlmTechnicalSpecificatio
} }
public String getUserName() { public String getUserName() {
if (hasText(userName)) {
return userName; return userName;
} }
return username;
}
public void setUserName(String userName) { public void setUserName(String userName) {
this.userName = userName; this.userName = userName;
if (hasText(userName) || !hasText(this.username)) {
this.username = userName;
}
} }
public String getMenuId() { public String getMenuId() {
@ -568,11 +574,21 @@ public class PlmTechnicalSpecificationSheetData extends PlmTechnicalSpecificatio
} }
public String getUsername() { public String getUsername() {
if (hasText(username)) {
return username; return username;
} }
return userName;
}
public void setUsername(String username) { public void setUsername(String username) {
this.username = username; this.username = username;
if (hasText(username) || !hasText(this.userName)) {
this.userName = username;
}
}
private boolean hasText(String value) {
return value != null && !value.trim().isEmpty();
} }
public String getFinalCustomerNo() { public String getFinalCustomerNo() {

31
src/main/java/com/spring/modules/sampleManagement/service/Impl/TechnicalSpecificationServiceImpl.java

@ -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");

8
src/main/resources/mapper/sampleManagement/TechnicalSpecificationMapper.xml

@ -2321,7 +2321,7 @@
update plm_technical_specification_sheet update plm_technical_specification_sheet
set status = #{status}, set status = #{status},
update_date = getDate(), update_date = getDate(),
update_by = #{userName}
update_by = #{updateBy}
where site = #{site} and code_no = #{codeNo} where site = #{site} and code_no = #{codeNo}
</update> </update>
@ -2824,7 +2824,7 @@
set step_id = #{stepId}, set step_id = #{stepId},
status = #{status}, status = #{status},
update_date = getDate(), update_date = getDate(),
update_by = #{userName},
update_by = #{updateBy},
ECN_flag = 'N', ECN_flag = 'N',
stage = 'Sample' stage = 'Sample'
where site = #{site} and code_no = #{codeNo} where site = #{site} and code_no = #{codeNo}
@ -3069,7 +3069,7 @@
step_id = #{stepId}, step_id = #{stepId},
stage = #{stage}, stage = #{stage},
update_date = getDate(), update_date = getDate(),
update_by = #{userName}
update_by = #{updateBy}
where site = #{site} and code_no = #{codeNo} where site = #{site} and code_no = #{codeNo}
</update> </update>
@ -3374,7 +3374,7 @@
<update id="updateProcessForm" <update id="updateProcessForm"
parameterType="com.spring.modules.sampleManagement.data.PlmTechnicalSpecificationSheetData"> parameterType="com.spring.modules.sampleManagement.data.PlmTechnicalSpecificationSheetData">
UPDATE a UPDATE a
SET a.update_by = #{username},
SET a.update_by = #{updateBy},
a.update_date = GETDATE(), a.update_date = GETDATE(),
node_conclusion = #{nodeConclusion}, node_conclusion = #{nodeConclusion},
is_remark = 2 is_remark = 2

Loading…
Cancel
Save