更新配合示方模块,新增密炼PS审批联动功能,支持状态与审批人同步,优化相关服务实现,调整数据库状态字典,增强系统数据一致性和用户体验。
This commit is contained in:
@@ -103,3 +103,11 @@ jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/components/MesXslFormulaSpecMo
|
||||
|
||||
-- author:cursor---date:20260521--for: 【配合示方】编辑打开时基本资料闪清修复 ---
|
||||
jeecgboot-vue3/src/views/xslmes/mesXslFormulaSpec/components/MesXslFormulaSpecModal.vue
|
||||
|
||||
-- author:cursor---date:20260522--for: 【配合示方】状态字典调整为审批流程8项 ---
|
||||
jeecg-module-system/jeecg-system-start/src/main/resources/flyway/sql/mysql/V3.9.2_97__mes_xsl_formula_spec_status_dict.sql
|
||||
|
||||
-- author:cursor---date:20260522--for: 【配合示方】密炼PS校对/审核/批准联动同步状态与审批人 ---
|
||||
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/IMesXslFormulaSpecService.java
|
||||
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslFormulaSpecServiceImpl.java
|
||||
jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslMixerPsCompileServiceImpl.java
|
||||
|
||||
@@ -6,6 +6,7 @@ import java.util.Collection;
|
||||
import java.util.List;
|
||||
import org.jeecg.modules.xslmes.entity.MesXslFormulaSpec;
|
||||
import org.jeecg.modules.xslmes.entity.MesXslFormulaSpecLine;
|
||||
import org.jeecg.modules.xslmes.entity.MesXslMixerPsCompile;
|
||||
|
||||
public interface IMesXslFormulaSpecService extends IService<MesXslFormulaSpec> {
|
||||
|
||||
@@ -25,4 +26,14 @@ public interface IMesXslFormulaSpecService extends IService<MesXslFormulaSpec> {
|
||||
* 生成胶料代号:D + 胶料名称 + 分类键值(S/P/T/C) + 版本号(A01-Z01)
|
||||
*/
|
||||
String generateRubberCode(String rubberMaterialId, String category, String excludeSpecId);
|
||||
|
||||
//update-begin---author:cursor ---date:20260522 for:【配合示方】密炼PS审批联动同步状态与审批人-----------
|
||||
/**
|
||||
* 密炼PS校对/审核/批准后,按发行编号(PS编码)同步关联配合示方状态与审批人
|
||||
*
|
||||
* @param ps 已更新后的密炼PS编制单
|
||||
* @param mixerPsTargetStatus 密炼PS目标状态:proofread / audit / approve
|
||||
*/
|
||||
void syncFromMixerPsWorkflow(MesXslMixerPsCompile ps, String mixerPsTargetStatus);
|
||||
//update-end---author:cursor ---date:20260522 for:【配合示方】密炼PS审批联动同步状态与审批人-----------
|
||||
}
|
||||
|
||||
@@ -21,8 +21,10 @@ import org.jeecg.modules.mes.material.entity.MesMaterial;
|
||||
import org.jeecg.modules.mes.material.entity.MesMixerMaterial;
|
||||
import org.jeecg.modules.mes.material.service.IMesMaterialService;
|
||||
import org.jeecg.modules.mes.material.service.IMesMixerMaterialService;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import org.jeecg.modules.xslmes.entity.MesXslFormulaSpec;
|
||||
import org.jeecg.modules.xslmes.entity.MesXslFormulaSpecLine;
|
||||
import org.jeecg.modules.xslmes.entity.MesXslMixerPsCompile;
|
||||
import org.jeecg.modules.xslmes.mapper.MesXslFormulaSpecLineMapper;
|
||||
import org.jeecg.modules.xslmes.mapper.MesXslFormulaSpecMapper;
|
||||
import org.jeecg.modules.xslmes.service.IMesXslFormulaSpecService;
|
||||
@@ -400,4 +402,36 @@ public class MesXslFormulaSpecServiceImpl extends ServiceImpl<MesXslFormulaSpecM
|
||||
return line.getPhr().divide(material.getSpecificGravity(), 6, RoundingMode.HALF_UP);
|
||||
}
|
||||
//update-end---author:cursor ---date:20260521 for:【配合示方】保存后汇总A/Q胶比重写入数据库-----------
|
||||
|
||||
//update-begin---author:cursor ---date:20260522 for:【配合示方】密炼PS审批联动同步状态与审批人-----------
|
||||
@Override
|
||||
public void syncFromMixerPsWorkflow(MesXslMixerPsCompile ps, String mixerPsTargetStatus) {
|
||||
if (ps == null || oConvertUtils.isEmpty(ps.getPsCode()) || oConvertUtils.isEmpty(mixerPsTargetStatus)) {
|
||||
return;
|
||||
}
|
||||
LambdaUpdateWrapper<MesXslFormulaSpec> wrapper = new LambdaUpdateWrapper<>();
|
||||
wrapper.eq(MesXslFormulaSpec::getIssueNumber, ps.getPsCode());
|
||||
switch (mixerPsTargetStatus) {
|
||||
case "proofread":
|
||||
wrapper.set(MesXslFormulaSpec::getStatus, "submit")
|
||||
.set(MesXslFormulaSpec::getProofreadBy, ps.getProofreadBy())
|
||||
.set(MesXslFormulaSpec::getProofreadTime, ps.getProofreadTime());
|
||||
break;
|
||||
case "audit":
|
||||
wrapper.set(MesXslFormulaSpec::getStatus, "review_pass")
|
||||
.set(MesXslFormulaSpec::getAuditBy, ps.getAuditBy())
|
||||
.set(MesXslFormulaSpec::getAuditTime, ps.getAuditTime());
|
||||
break;
|
||||
case "approve":
|
||||
wrapper.set(MesXslFormulaSpec::getStatus, "recognition_pass")
|
||||
.set(MesXslFormulaSpec::getApproveBy, ps.getApproveBy())
|
||||
.set(MesXslFormulaSpec::getApproveTime, ps.getApproveTime());
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
wrapper.set(MesXslFormulaSpec::getUpdateTime, new Date());
|
||||
this.update(wrapper);
|
||||
}
|
||||
//update-end---author:cursor ---date:20260522 for:【配合示方】密炼PS审批联动同步状态与审批人-----------
|
||||
}
|
||||
|
||||
@@ -7,7 +7,9 @@ import java.util.List;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import org.jeecg.modules.xslmes.entity.MesXslMixerPsCompile;
|
||||
import org.jeecg.modules.xslmes.mapper.MesXslMixerPsCompileMapper;
|
||||
import org.jeecg.modules.xslmes.service.IMesXslFormulaSpecService;
|
||||
import org.jeecg.modules.xslmes.service.IMesXslMixerPsCompileService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@@ -18,6 +20,9 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
public class MesXslMixerPsCompileServiceImpl extends ServiceImpl<MesXslMixerPsCompileMapper, MesXslMixerPsCompile>
|
||||
implements IMesXslMixerPsCompileService {
|
||||
|
||||
@Autowired
|
||||
private IMesXslFormulaSpecService mesXslFormulaSpecService;
|
||||
|
||||
//update-begin---author:jiangxh ---date:20260520 for:【密炼PS编制】批量流转状态-----------
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@@ -44,6 +49,9 @@ public class MesXslMixerPsCompileServiceImpl extends ServiceImpl<MesXslMixerPsCo
|
||||
entity.setStatus(targetStatus);
|
||||
fillWorkflowInfo(entity, targetStatus, operatorName, now);
|
||||
updateById(entity);
|
||||
//update-begin---author:cursor ---date:20260522 for:【配合示方】密炼PS审批联动同步状态与审批人-----------
|
||||
mesXslFormulaSpecService.syncFromMixerPsWorkflow(entity, targetStatus);
|
||||
//update-end---author:cursor ---date:20260522 for:【配合示方】密炼PS审批联动同步状态与审批人-----------
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user