Browse Source

2025-05-31

Dead状态时和已完成的状态保持一致,不允许编辑单据信息 - 修改按钮
将业务表的step_id改为NULL
提交、驳回时需校验单据的状态必须是审批中(Dead之后还能够提交)
菜单:Inventory part 、Bom 、Routing
详情按钮需要按照角色授权,相关信息全部置灰
master
fengyuan_yang 8 months ago
parent
commit
7adf74b9d4
  1. 7
      src/main/java/com/spring/modules/change/service/impl/ChangeManagementServiceImpl.java
  2. 3
      src/main/java/com/spring/modules/part/entity/BomMultiLevelStructureData.java
  3. 2
      src/main/java/com/spring/modules/part/entity/RecipeAllFieldEntity.java
  4. 16
      src/main/java/com/spring/modules/sampleManagement/service/Impl/TechnicalSpecificationServiceImpl.java
  5. 9
      src/main/resources/mapper/change/ChangeManagementMapper.xml

7
src/main/java/com/spring/modules/change/service/impl/ChangeManagementServiceImpl.java

@ -1405,6 +1405,7 @@ public class ChangeManagementServiceImpl extends ServiceImpl<ChangeManagementMap
List<ProcessFormVo> pfs = changeManagementMapper.getProcessFormByIsRemark(paramData.getSite(), paramData.getBu(), paramData.getDocNo(), "0");
// 修改单据的节点结论和驳回意见
// 2025-05-30 会签节点时其中一个人驳回就算驳回 同意的话不变 sql和驳回分开
changeManagementMapper.updateProcessNode(paramData.getSite(), paramData.getBu() == null ? "" : paramData.getBu(), paramData.getRequestId(), paramData.getClassificationNo(), paramData.getNodeId(), paramData.getNodeConclusion(), paramData.getRejectOpinion(), paramData.getDomainControlAccount());
// 2025-05-12 使用 process_form 根据 site documentNo isRemark = 0 来获取人员 可能有多个 循环调用
DeleteUserRequestInfoParam deleteUserRequestInfoParam = new DeleteUserRequestInfoParam();
@ -1419,6 +1420,7 @@ public class ChangeManagementServiceImpl extends ServiceImpl<ChangeManagementMap
if (requestNode.getCountersignatureItem() != null && "1".equals(requestNode.getCountersignatureItem())) {
changeManagementMapper.updateProcessForm3(paramData);
} else {
// 2025-05-30 会签节点时其中一个人驳回就算驳回 同意的话不变 sql和驳回分开
changeManagementMapper.updateProcessForm2(paramData);
}
// =========================
@ -1432,6 +1434,10 @@ public class ChangeManagementServiceImpl extends ServiceImpl<ChangeManagementMap
// 修改最后一个节点为同意
paramData.setBu(paramData.getBu() == null ? "" : paramData.getBu());
changeManagementMapper.updateProcessFormToAgree(paramData);
// 流程结束时按照如下SQL插入到process表中调整后需要调整存储过程
// 如果是ECN则执行升版操作
if (Constant.ECN.equals(type)) {
ChangeRequestEntity changeRequestEntity = new ChangeRequestEntity();
@ -1707,6 +1713,7 @@ public class ChangeManagementServiceImpl extends ServiceImpl<ChangeManagementMap
if (requestNode.getCountersignatureItem() != null && "1".equals(requestNode.getCountersignatureItem())) {
changeManagementMapper.updateProcessForm3(paramData);
} else {
// 2025-05-30 会签节点时其中一个人驳回就算驳回
changeManagementMapper.updateProcessForm2(paramData);
}

3
src/main/java/com/spring/modules/part/entity/BomMultiLevelStructureData.java

@ -1,5 +1,7 @@
package com.spring.modules.part.entity;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.spring.modules.part.util.BigDecimalSerializer;
import lombok.Data;
import java.math.BigDecimal;
@ -53,6 +55,7 @@ public class BomMultiLevelStructureData {
/**
* 单位用量
**/
@JsonSerialize(using = BigDecimalSerializer.class)
private BigDecimal qtyPerAssembly;
/**
* 生产属性倒冲方式

2
src/main/java/com/spring/modules/part/entity/RecipeAllFieldEntity.java

@ -1,7 +1,9 @@
package com.spring.modules.part.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.spring.common.utils.QueryPage;
import com.spring.modules.part.util.BigDecimalSerializer;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

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

@ -1379,6 +1379,12 @@ public class TechnicalSpecificationServiceImpl implements TechnicalSpecification
// 4 接口:流程提交接口(同意) / 流程退回接口(驳回)
// 主信息
PlmTechnicalSpecificationSheet changeRequest = technicalSpecificationMapper.selectTechnicalSpecification(data.getSite(), data.getCodeNo());
// 2025-05-31 提交驳回时需校验单据的状态必须是审批中Dead之后还能够提交
if (!"spz".equals(changeRequest.getStatus())) {
throw new RuntimeException("单据的状态必须是审批中, 请刷新页面!");
}
// 人员信息
List<PlmTechnicalSpecificationTeamData> operatorList = technicalSpecificationMapper.selectTechnicalSpecificationTeam(data.getSite(), data.getCodeNo());
List<PlmTechnicalSpecificationTeamData> engineers = operatorList.stream().filter(a -> "engineer".equals(a.getType())).collect(Collectors.toList());
@ -1459,10 +1465,10 @@ public class TechnicalSpecificationServiceImpl implements TechnicalSpecification
@Override
public String getBMStatusDesc(PlmTechnicalSpecificationSheetData data){
PlmTechnicalSpecificationSheetData result= technicalSpecificationMapper.getBMStatusDesc(data.getSite(),data.getCodeNo());
if(result==null){
PlmTechnicalSpecificationSheetData result = technicalSpecificationMapper.getBMStatusDesc(data.getSite(),data.getCodeNo());
if (result == null) {
return "已完成";
}else {
} else {
return result.getStatusDesc();
}
}
@ -1710,6 +1716,10 @@ public class TechnicalSpecificationServiceImpl implements TechnicalSpecification
// 将技术参数卡的状态改为"Dead"
data.setStatus("dead");
technicalSpecificationMapper.updateStatus(data);
// 2025-05-31 将业务表的step_id改为NULL
data.setStepId(null);
technicalSpecificationMapper.updateBMStepId(data);
}
/**

9
src/main/resources/mapper/change/ChangeManagementMapper.xml

@ -1080,9 +1080,10 @@
set A.is_remark = 1,
A.update_date = getDate(),
A.update_by = #{userName}
from plm_process_form a
from plm_process_form a
left join sys_user b on a.domain_control_account = B.domain_control_account
where A.site = #{site} and document_no = #{docNo} and is_remark = 0 AND B.username = #{userName}
where A.site = #{site} and document_no = #{docNo} and is_remark = 0
<!-- AND B.username = #{userName}-->
</update>
<update id="updateProcessForm3" parameterType="ParamData">
@ -1154,7 +1155,9 @@
update plm_process_form
set node_conclusion = #{nodeConclusion},
reject_opinion = #{rejectOpinion}
where site = #{site} and bu = #{bu} and request_id = #{requestId} and classification_no = #{classificationNo} and node_id = #{nodeId} and domain_control_account = #{domainControlAccount} and (node_conclusion is null or node_conclusion = '')
where site = #{site} and bu = #{bu} and request_id = #{requestId}
and classification_no = #{classificationNo} and node_id = #{nodeId} and (node_conclusion is null or node_conclusion = '')
<!-- and domain_control_account = #{domainControlAccount}-->
</update>
<select id="getApprovalList" parameterType="com.spring.modules.change.vo.ProcessFormVo" resultType="com.spring.modules.change.vo.ProcessFormVo">

Loading…
Cancel
Save