优化
This commit is contained in:
@ -208,4 +208,18 @@ public class BusContactnoticeServiceImpl implements IBusContactnoticeService {
|
||||
}
|
||||
this.deleteWithValidByIds(Collections.singleton(contactnotice.getId()), true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@EventListener(condition = "#processEvent.flowCode.endsWith('contactForm')")
|
||||
public void contactFormProcessHandler(ProcessEvent processEvent) {
|
||||
log.info("联系单审核任务执行了{}", processEvent.toString());
|
||||
BusContactnotice contactnotice = baseMapper.selectById(Convert.toLong(processEvent.getBusinessId()));
|
||||
contactnotice.setStatus(processEvent.getStatus());
|
||||
if (processEvent.getSubmit()) {
|
||||
contactnotice.setStatus(BusinessStatusEnum.WAITING.getStatus());
|
||||
}
|
||||
baseMapper.updateById(contactnotice);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -77,4 +77,7 @@ public class DesVolumeFileBo extends BaseEntity {
|
||||
*/
|
||||
private String documentName;
|
||||
|
||||
|
||||
private String auditStatus;
|
||||
|
||||
}
|
||||
|
@ -125,14 +125,31 @@ public class DesVolumeFileServiceImpl extends ServiceImpl<DesVolumeFileMapper, D
|
||||
desVolumeFileCodeVo.setProjectName(byId.getProjectName());
|
||||
desVolumeFileCodeVo.setType(desVolumeFile.getType());
|
||||
|
||||
if("3".equals(desVolumeFile.getType())){
|
||||
//查询图纸最新版
|
||||
List<DesVolumeFile> existingFiles = baseMapper.selectList(new LambdaQueryWrapper<DesVolumeFile>()
|
||||
.eq(DesVolumeFile::getVolumeCatalogId, desVolumeFile.getVolumeCatalogId())
|
||||
.eq(DesVolumeFile::getType, "3")
|
||||
.orderByDesc(DesVolumeFile::getVersion));
|
||||
|
||||
if(CollectionUtil.isNotEmpty(existingFiles)){
|
||||
DesVolumeFile desVolumeFile1 = existingFiles.getFirst();
|
||||
if(!desVolumeFile1.getId().equals(id)){
|
||||
SysOssVo ossVo = ossService.getById(desVolumeFile1.getFileId());
|
||||
desVolumeFileCodeVo.setFileUrl(ossVo.getUrl());
|
||||
}else {
|
||||
desVolumeFileCodeVo.setIsLatest(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
//查询过程图纸最新版
|
||||
List<DesVolumeFile> existingFiles = baseMapper.selectList(new LambdaQueryWrapper<DesVolumeFile>()
|
||||
.eq(DesVolumeFile::getVolumeCatalogId, desVolumeFile.getVolumeCatalogId())
|
||||
.eq(DesVolumeFile::getType, "1")
|
||||
.orderByDesc(DesVolumeFile::getVersion));
|
||||
|
||||
if(!existingFiles.isEmpty()){
|
||||
DesVolumeFile first = existingFiles.getFirst();
|
||||
|
||||
if ("4".equals(desVolumeFile.getType())) {
|
||||
SysOssVo ossVo = ossService.getById(first.getFileId());
|
||||
desVolumeFileCodeVo.setFileUrl(ossVo.getUrl());
|
||||
@ -148,6 +165,7 @@ public class DesVolumeFileServiceImpl extends ServiceImpl<DesVolumeFileMapper, D
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return desVolumeFileCodeVo;
|
||||
}
|
||||
@ -393,6 +411,7 @@ public class DesVolumeFileServiceImpl extends ServiceImpl<DesVolumeFileMapper, D
|
||||
return null;
|
||||
});
|
||||
}
|
||||
desVolumeFile.setFileId(null);
|
||||
this.updateById(desVolumeFile);
|
||||
}
|
||||
|
||||
@ -455,6 +474,7 @@ public class DesVolumeFileServiceImpl extends ServiceImpl<DesVolumeFileMapper, D
|
||||
return null;
|
||||
});
|
||||
}
|
||||
desVolumeFile.setFileId(null);
|
||||
this.updateById(desVolumeFile);
|
||||
}
|
||||
|
||||
|
@ -357,9 +357,19 @@ public class OutMonthPlanServiceImpl extends ServiceImpl<OutMonthPlanMapper, Out
|
||||
|
||||
|
||||
if("2".equals(outMonthPlan.getValueType())){ //采购产值
|
||||
//todo: 罗成没写完
|
||||
BigDecimal bigDecimal = busMaterialsorderService.grossOutput(outMonthPlan.getProjectId(), outMonthPlan.getPlanMonth(), 0);
|
||||
outMonthPlan.setCompleteValue(bigDecimal);
|
||||
PurchaseValueAReq purchaseValueAReq = new PurchaseValueAReq();
|
||||
purchaseValueAReq.setProjectId(outMonthPlan.getProjectId());
|
||||
purchaseValueAReq.setType(outMonthPlan.getType());
|
||||
purchaseValueAReq.setPlanMonth(outMonthPlan.getPlanMonth());
|
||||
List<BusProcurement> busProcurements =purchaseValueA(purchaseValueAReq);
|
||||
BigDecimal purchaseValue = BigDecimal.ZERO;
|
||||
for (BusProcurement busProcurement : busProcurements) {
|
||||
if(busProcurement != null && busProcurement.getAcceptedQuantity() != null && busProcurement.getUnitPrice() != null){
|
||||
purchaseValue = purchaseValue.add(busProcurement.getAcceptedQuantity().multiply(busProcurement.getUnitPrice()));
|
||||
}
|
||||
|
||||
}
|
||||
outMonthPlan.setCompleteValue(purchaseValue);
|
||||
}else if("3".equals(outMonthPlan.getValueType())){ //施工产值
|
||||
//查询项目的审核通过的施工详细表 1.累计完成产值 2.完成产值月合计 3.各周完成产值
|
||||
List<OutConstructionValue> outConstructionValues = constructionValueService.lambdaQuery()
|
||||
|
@ -8,7 +8,7 @@
|
||||
select f.*, c.design_subitem, c.specialty, c.volume_number, c.document_name, c.principal
|
||||
from des_volume_file f
|
||||
left join des_volume_catalog c on f.volume_catalog_id = c.design
|
||||
WHERE c.project_id = #{bo.projectId} and f.type = #{bo.type}
|
||||
WHERE c.project_id = #{bo.projectId} and f.type = #{bo.type} and f.audit_status = #{bo.auditStatus}
|
||||
<if test="bo.volumeNumber != null and bo.volumeNumber != '' ">
|
||||
AND c.volume_number like concat('%',#{bo.volumeNumber},'%')
|
||||
</if>
|
||||
|
Reference in New Issue
Block a user