Browse Source

2025-05-31

会签节点时,其中一个人驳回就算驳回 同意的话不变 sql和驳回分开
 个人账号查询IFS数据时,需要使用当前登录人的IFS账号密码
 流程结束时,按照如下SQL插入到process表中,调整后需要调整存储过程
master
fengyuan_yang 8 months ago
parent
commit
cd977f63be
  1. 4
      src/main/java/com/spring/modules/change/mapper/ChangeManagementMapper.java
  2. 12
      src/main/java/com/spring/modules/change/service/impl/ChangeManagementServiceImpl.java
  3. 2
      src/main/java/com/spring/modules/part/entity/InventoryPartUnitCostSumEntity.java
  4. 4
      src/main/java/com/spring/modules/part/service/impl/PartInformationServiceImpl.java
  5. 60
      src/main/resources/mapper/change/ChangeManagementMapper.xml

4
src/main/java/com/spring/modules/change/mapper/ChangeManagementMapper.java

@ -189,4 +189,8 @@ public interface ChangeManagementMapper extends BaseMapper<ChangeRequestEntity>{
void deleteChangeCostImpact(@Param("site") String site, @Param("changeNo") String changeNo);
void deleteChangeExecutionInfo(@Param("site") String site, @Param("changeNo") String changeNo);
void updateProcessNodeForReject(@Param("site") String site, @Param("bu") String bu, @Param("requestId") String requestId, @Param("classificationNo") String classificationNo, @Param("nodeId") String nodeId, @Param("nodeConclusion") String nodeConclusion, @Param("rejectOpinion") String rejectOpinion);
void saveProcessFormBySql(@Param("site") String site, @Param("docNo") String docNo, @Param("classificationNo") String classificationNo);
}

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

@ -1420,7 +1420,7 @@ public class ChangeManagementServiceImpl extends ServiceImpl<ChangeManagementMap
if (requestNode.getCountersignatureItem() != null && "1".equals(requestNode.getCountersignatureItem())) {
changeManagementMapper.updateProcessForm3(paramData);
} else {
// 2025-05-30 会签节点时其中一个人驳回就算驳回 同意的话不变 sql和驳回分开
// 2025-05-30 会签节点时其中一个人驳回就算驳回 同意的话不变 sql和驳回分开
changeManagementMapper.updateProcessForm2(paramData);
}
// =========================
@ -1435,8 +1435,8 @@ public class ChangeManagementServiceImpl extends ServiceImpl<ChangeManagementMap
paramData.setBu(paramData.getBu() == null ? "" : paramData.getBu());
changeManagementMapper.updateProcessFormToAgree(paramData);
// 流程结束时按照如下SQL插入到process表中调整后需要调整存储过程
// 2025-05-31 流程结束时按照如下SQL插入到process表中调整后需要调整存储过程
changeManagementMapper.saveProcessFormBySql(paramData.getSite(), paramData.getDocNo(), paramData.getClassificationNo());
// 如果是ECN则执行升版操作
if (Constant.ECN.equals(type)) {
@ -1698,7 +1698,7 @@ public class ChangeManagementServiceImpl extends ServiceImpl<ChangeManagementMap
List<Map<String, Object>> isRemarks = res.stream().filter(a -> convertToInt(a.get("isremark")) == 0).collect(Collectors.toList());
// 修改单据的节点结论和驳回意见
changeManagementMapper.updateProcessNode(paramData.getSite(), paramData.getBu() == null ? "" : paramData.getBu(), paramData.getRequestId(), paramData.getClassificationNo(), paramData.getNodeId(), paramData.getNodeConclusion(), paramData.getRejectOpinion(), paramData.getDomainControlAccount());
changeManagementMapper.updateProcessNodeForReject(paramData.getSite(), paramData.getBu() == null ? "" : paramData.getBu(), paramData.getRequestId(), paramData.getClassificationNo(), paramData.getNodeId(), paramData.getNodeConclusion(), paramData.getRejectOpinion());
// 2025-05-09 发送统一待办前先调用[删除异构系统指定人员待办流程]接口
DeleteUserRequestInfoParam deleteUserRequestInfoParam = new DeleteUserRequestInfoParam();
@ -1713,8 +1713,8 @@ public class ChangeManagementServiceImpl extends ServiceImpl<ChangeManagementMap
if (requestNode.getCountersignatureItem() != null && "1".equals(requestNode.getCountersignatureItem())) {
changeManagementMapper.updateProcessForm3(paramData);
} else {
// 2025-05-30 会签节点时其中一个人驳回就算驳回
changeManagementMapper.updateProcessForm2(paramData);
// 2025-05-30 会签节点时其中一个人驳回就算驳回 不加username
changeManagementMapper.updateProcessForm3(paramData);
}
if (isRemarks.isEmpty()) { // 已结束

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

@ -24,6 +24,8 @@ public class InventoryPartUnitCostSumEntity {
private String ifsRowVersion;
private String userName;
public String getKey() {
return site + "-" + partNo + "-" + configurationId;
}

4
src/main/java/com/spring/modules/part/service/impl/PartInformationServiceImpl.java

@ -3393,7 +3393,9 @@ public class PartInformationServiceImpl extends ServiceImpl<PartInformationMappe
public List<InventoryPartUnitCostSumEntity> queryPartUnitCostList(InventoryPartUnitCostSumEntity inData) {
PartInformationEntity partData = partInformationMapper.selectOne(new QueryWrapper<PartInformationEntity>().eq("site", inData.getSite()).eq("part_no", inData.getPartNo()));
if ("Y".equals(partData.getStatus())) {
Server srv = ifsServer.getIfsServer(ifsUsername, ifsPassword);
// 个人账号查询IFS数据时需要使用当前登录人的IFS账号密码
Server srv = getIfsServer(inData.getUserName());
// Server srv = ifsServer.getIfsServer(ifsUsername, ifsPassword);
Map<String, String> getInventoryValueResponse = baseSearchBean.getInventoryValueByPartNo(srv, partData);
if ("200".equals(getInventoryValueResponse.get("resultCode"))) {
// 修改物料成本

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

@ -1082,8 +1082,7 @@
A.update_by = #{userName}
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">
@ -1156,8 +1155,20 @@
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 (node_conclusion is null or node_conclusion = '')
<!-- and domain_control_account = #{domainControlAccount}-->
and classification_no = #{classificationNo}
and node_id = #{nodeId}
and domain_control_account = #{domainControlAccount}
and (node_conclusion is null or node_conclusion = '')
</update>
<update id="updateProcessNodeForReject">
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 (node_conclusion is null or node_conclusion = '')
</update>
<select id="getApprovalList" parameterType="com.spring.modules.change.vo.ProcessFormVo" resultType="com.spring.modules.change.vo.ProcessFormVo">
@ -1378,4 +1389,45 @@
FROM plm_request_node
where classification_no = #{classificationNo} and site = #{site} and node_id = #{nodeId}
</select>
<insert id="saveProcessFormBySql">
insert into plm_process_form (site, bu, request_id, workflow_id, node_id, domain_control_account, document_no, document_type, classification_no,
seq_no, node_conclusion, is_remark, step_id, menu_id, create_by, create_date, update_by, update_date)
SELECT
TOP 1
a.site,
a.bu,
a.request_id,
a.workflow_id,
b.node_id,
domain_control_account,
document_no,
a.document_type,
A.classification_no,
a.seq_no + 10 AS seq_no,
'Y' AS node_conclusion,
'1' AS is_remark,
b.step_id,
A.menu_id,
a.create_by,
a.create_date,
a.update_by,
a.update_date
FROM
plm_process_form A
LEFT JOIN (
SELECT
TOP 1
SITE,
classification_no,
node_id,
node_name,
step_id
FROM plm_request_node
WHERE SITE = #{site} AND classification_no = #{classificationNo}
ORDER BY step_id DESC
) B ON A.site = B.site AND A.classification_no = B.classification_no
WHERE A.site = #{site} AND document_no = #{docNo} AND a.classification_no IS NOT NULL
ORDER BY A.ID DESC
</insert>
</mapper>
Loading…
Cancel
Save