增加工程量清单的规格、以及招采和物资的审核

This commit is contained in:
2025-08-19 22:24:12 +08:00
parent c9b3fae598
commit 85f9d9b88e
2 changed files with 62 additions and 98 deletions

View File

@ -333,8 +333,9 @@ public class BusBillofquantitiesVersionsServiceImpl extends ServiceImpl<BusBillo
material.setPid(pid);
material.setNum(aNum);
material.setName(rowData.size() >= 2 ? rowData.get(1).trim() : null);
material.setUnit(rowData.size() >= 3 ? rowData.get(2).trim() : null);
String quantityStr = rowData.size() >= 4 ? rowData.get(3).trim() : null;
material.setSpecification(rowData.size() >= 3 ? rowData.get(2).trim() : null);
material.setUnit(rowData.size() >= 4 ? rowData.get(3).trim() : null);
String quantityStr = rowData.size() >= 5 ? rowData.get(4).trim() : null;
if (!quantityStr.isEmpty()) {
try {
// 支持整数和小数解析
@ -343,7 +344,7 @@ public class BusBillofquantitiesVersionsServiceImpl extends ServiceImpl<BusBillo
// 解析失败如非数字内容保持null
}
}
material.setRemark(rowData.size() >= 5 ? rowData.get(4).trim() : null);
material.setRemark(rowData.size() >= 6 ? rowData.get(5).trim() : null);
// 存储映射关系供子节点查询父sid
nodeMap.put(currentNode, material);
@ -438,11 +439,11 @@ public class BusBillofquantitiesVersionsServiceImpl extends ServiceImpl<BusBillo
*
* @param processEvent 参数
*/
@org.springframework.context.event.EventListener(condition = "#processEvent.flowCode.endsWith('equipmentList')")
@org.springframework.context.event.EventListener(condition = "#processEvent.flowCode.endsWith('pickEquipmentList ')")
public void processPlansHandler(ProcessEvent processEvent) {
log.info("物资设备清单审核任务执行了{}", processEvent.toString());
log.info("招采清单审核任务执行了{}", processEvent.toString());
String id = processEvent.getBusinessId();
//变更状态
//1、变更状态
LambdaQueryWrapper<BusBillofquantitiesVersions> eq = new LambdaQueryWrapper<BusBillofquantitiesVersions>()
.eq(BusBillofquantitiesVersions::getVersions, id);
BusBillofquantitiesVersions busBillofquantitiesVersions = new BusBillofquantitiesVersions();
@ -450,7 +451,7 @@ public class BusBillofquantitiesVersionsServiceImpl extends ServiceImpl<BusBillo
boolean update = this.update(busBillofquantitiesVersions, eq);
//变更成功,增加数据
if (update && BusinessStatusEnum.FINISH.getStatus().equals(processEvent.getStatus())) {
//2、根据版本号查询数据
//根据版本号查询数据
BusBillofquantitiesVersions versions = this.getOne(eq);
//2、新增批次号
String num = BatchNumberGenerator.generateBatchNumber("ZGY-");
@ -475,6 +476,7 @@ public class BusBillofquantitiesVersionsServiceImpl extends ServiceImpl<BusBillo
if (!b){
log.info("新增失败");
}
}
}
@ -488,8 +490,54 @@ public class BusBillofquantitiesVersionsServiceImpl extends ServiceImpl<BusBillo
*
* @param processTaskEvent 参数
*/
@org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('equipmentList')")
@org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('pickEquipmentList ')")
public void processTaskPlansHandler(ProcessTaskEvent processTaskEvent) {
log.info("招采清单审核任务创建了{}", processTaskEvent.toString());
}
/**
* 监听删除流程事件
* 正常使用只需#processDeleteEvent.flowCode=='leave1'
* 示例为了方便则使用startsWith匹配了全部示例key
*
* @param processDeleteEvent 参数
*/
@EventListener(condition = "#processDeleteEvent.flowCode.endsWith('pickEquipmentList ')")
public void processDeletePlansHandler(ProcessDeleteEvent processDeleteEvent) {
log.info("招采清单计划删除流程事件,技术标准文件审核任务执行了{}", processDeleteEvent.toString());
}
/**
* 总体流程监听(例如: 草稿,撤销,退回,作废,终止,已完成,单任务完成等)
* 正常使用只需#processEvent.flowCode=='leave1'
* 示例为了方便则使用startsWith匹配了全部示例key
*
* @param processEvent 参数
*/
@org.springframework.context.event.EventListener(condition = "#processEvent.flowCode.endsWith('equipmentList ')")
public void processPlansHandlErequipmentList(ProcessEvent processEvent) {
log.info("物资设备清单审核任务执行了{}", processEvent.toString());
String id = processEvent.getBusinessId();
LambdaQueryWrapper<BusBillofquantitiesVersions> eq = new LambdaQueryWrapper<BusBillofquantitiesVersions>()
.eq(BusBillofquantitiesVersions::getVersions, id);
BusBillofquantitiesVersions busBillofquantitiesVersions = new BusBillofquantitiesVersions();
busBillofquantitiesVersions.setStatus(processEvent.getStatus());
this.update(busBillofquantitiesVersions, eq);
}
/**
* 执行任务创建监听
* 示例:也可通过 @EventListener(condition = "#processTaskEvent.flowCode=='leave1'")进行判断
* 在方法中判断流程节点key
* if ("xxx".equals(processTaskEvent.getNodeCode())) {
* //执行业务逻辑
* }
*
* @param processTaskEvent 参数
*/
@org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('equipmentList ')")
public void processTaskPlansHandlerEquipmentList(ProcessTaskEvent processTaskEvent) {
log.info("物资设备清单审核任务创建了{}", processTaskEvent.toString());
}
@ -500,9 +548,8 @@ public class BusBillofquantitiesVersionsServiceImpl extends ServiceImpl<BusBillo
*
* @param processDeleteEvent 参数
*/
@EventListener(condition = "#processDeleteEvent.flowCode.endsWith('equipmentList')")
public void processDeletePlansHandler(ProcessDeleteEvent processDeleteEvent) {
@EventListener(condition = "#processDeleteEvent.flowCode.endsWith('equipmentList ')")
public void processDeletePlansHandlerEquipmentList(ProcessDeleteEvent processDeleteEvent) {
log.info("物资设备清单计划删除流程事件,技术标准文件审核任务执行了{}", processDeleteEvent.toString());
}
}