1.0.38 提交项目采购并提交流程

dev
yinq 4 weeks ago
parent 89aafec33b
commit eaacd488a8

@ -94,6 +94,12 @@ public class ErpProjectPurchaseVo implements Serializable {
@ExcelProperty(value = "分管副总名称")
private String deputyName;
/**
* ID
*/
@ExcelProperty(value = "部门ID")
private Long deptId;
/**
*
*/

@ -90,7 +90,7 @@ public class ErpProjectInfoServiceImpl implements IErpProjectInfoService {
MPJLambdaWrapper<ErpProjectInfo> lqw = JoinWrappers.lambda(ErpProjectInfo.class)
.selectAll(ErpProjectInfo.class)
.eq(StringUtils.isNotBlank(bo.getContractFlag()), ErpProjectInfo::getContractFlag, bo.getContractFlag())
.eq(StringUtils.isNotBlank(bo.getProjectCode()), ErpProjectInfo::getProjectCode, bo.getProjectCode())
.like(StringUtils.isNotBlank(bo.getProjectCode()), ErpProjectInfo::getProjectCode, bo.getProjectCode())
.like(StringUtils.isNotBlank(bo.getProjectName()), ErpProjectInfo::getProjectName, bo.getProjectName())
.eq(StringUtils.isNotBlank(bo.getBusinessDirection()), ErpProjectInfo::getBusinessDirection, bo.getBusinessDirection())
.eq(StringUtils.isNotBlank(bo.getProjectCategory()), ErpProjectInfo::getProjectCategory, bo.getProjectCategory())

@ -155,25 +155,15 @@ public class ErpProjectPurchaseServiceImpl implements IErpProjectPurchaseService
@Override
@GlobalTransactional(rollbackFor = Exception.class)
public ErpProjectPurchaseVo projectPurchaseSubmitAndFlowStart(ErpProjectPurchaseBo bo) {
ErpProjectPurchase entity = MapstructUtils.convert(bo, ErpProjectPurchase.class);
validEntityBeforeSave(entity);
ErpProjectPurchase add = MapstructUtils.convert(bo, ErpProjectPurchase.class);
validEntityBeforeSave(add);
if (bo.getProjectPurchaseId() == null) {
this.insertByBo(bo);
} else {
this.updateByBo(bo);
}
if (bo.getVariables() == null) {
bo.setVariables(new HashMap<>());
}
bo.getVariables().put("ignore", true);
if (StringUtils.isBlank(bo.getFlowCode())) {
throw new ServiceException("流程编码不能为空");
}
RemoteFlowInstanceBizExt bizExt = bo.getBizExt();
if (bizExt == null) {
bizExt = new RemoteFlowInstanceBizExt();
bo.setBizExt(bizExt);
}
RemoteStartProcess startProcess = new RemoteStartProcess();
startProcess.setBusinessId(String.valueOf(bo.getProjectPurchaseId()));
startProcess.setFlowCode(bo.getFlowCode());
@ -184,13 +174,7 @@ public class ErpProjectPurchaseServiceImpl implements IErpProjectPurchaseService
if (!started) {
throw new ServiceException("流程发起异常");
}
// 更新状态为审批中
ErpProjectPurchase updateStatus = new ErpProjectPurchase();
updateStatus.setProjectPurchaseId(bo.getProjectPurchaseId());
updateStatus.setFlowStatus(BusinessStatusEnum.WAITING.getStatus());
updateStatus.setProjectPurchaseStatus("2");
baseMapper.updateById(updateStatus);
return queryById(bo.getProjectPurchaseId());
return MapstructUtils.convert(add, ErpProjectPurchaseVo.class);
}
/**

@ -34,6 +34,7 @@
t.update_by,
t.update_time,
p.project_name,
p.dept_id,
u1.nick_name as managerName,
u2.nick_name as chargeName,
u3.nick_name as deputyName,

@ -72,28 +72,23 @@
<select id="selectBudgetMaterialsByProjectId"
resultType="org.dromara.oa.erp.domain.vo.ErpProjectPurchaseMaterialVo">
select null as purchase_material_id,
null as project_purchase_id,
t.material_cost_id as relation_details_id,
#{spareFlag} as spare_flag,
null as purchase_plan_flag,
null as material_flag,
t.materiel_id as material_id,
t.relation_materiel_id as relation_material_id,
t.materiel_code as material_code,
t.materiel_name as material_name,
t.materiel_code as specification_description,
select t.material_cost_id as relation_details_id,
0 as spare_flag,
null as purchase_plan_flag,
case when t.material_id is not null then 1 else 0 end as material_flag,
t.material_id,
t.relation_material_id,
t.material_code as material_code,
t.material_name as material_name,
t.remark as specification_description,
t.unit_id,
t.amount as need_purchase_amount,
t.amount as purchase_amount,
null as arrival_time,
null as serial_number,
t.remark,
null as active_flag,
t.materiel_code as relation_material_code,
t.materiel_name as relation_material_name,
t.materiel_name as purchase_material_name
u.unit_name,
t.amount as need_purchase_amount,
t.amount as purchase_amount,
t.material_code as relation_material_code,
t.material_name as relation_material_name
from erp_budget_material_cost t
left join base_unit_info u on u.unit_id = t.unit_id
where t.del_flag = '0'
and t.project_id = #{projectId}
order by t.material_cost_id asc

Loading…
Cancel
Save