feat(order): 更新订单审批与编辑页面功能
- 修改流程图生成格式为PNG- 在审批页面新增收货地址、收货人及联系方式字段 - 编辑页签增加“流程进度”选项卡并展示流程图 -优化流程监控逻辑,支持查询最后一次审批任务 - 调整导出Excel表头名称及数据计算方式 - 新增非部署和维保类服务产品分类处理 - 数据库查询添加排序和限制返回一条记录- 移除冗余注释代码和待办事项标记dev_1.0.0
parent
f5c757655c
commit
2d50416020
|
|
@ -289,6 +289,9 @@ public class FlowMonitorController extends BaseController {
|
|||
Todo todo = new Todo();
|
||||
todo.setBusinessKey(businessKey);
|
||||
Todo todo1 = todoService.selectTodo(todo);
|
||||
if (todo1 == null){
|
||||
todo1= todoService.selectLastApproveTodo(businessKey,null);
|
||||
}
|
||||
activitiTracingChart.generateFlowChart(todo1.getProcessInstanceId(), response.getOutputStream());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ public class ActivitiTracingChart {
|
|||
ProcessEngineConfiguration engConf = processEngineConfiguration.getProcessEngineConfiguration();
|
||||
|
||||
ProcessDiagramGenerator diagramGenerator = engConf.getProcessDiagramGenerator();
|
||||
InputStream in = diagramGenerator.generateDiagram(bpmnModel, "bmp", highLightedActivities, highLightedFlows, "宋体",
|
||||
InputStream in = diagramGenerator.generateDiagram(bpmnModel, "png", highLightedActivities, highLightedFlows, "宋体",
|
||||
"宋体", "宋体", engConf.getClassLoader(), 1.0, true);
|
||||
byte[] buf = new byte[1024];
|
||||
int length;
|
||||
|
|
|
|||
|
|
@ -356,7 +356,22 @@
|
|||
th:field="*{partnerPhone}">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>收货地址</td>
|
||||
<td colspan="5">
|
||||
<input name="notifierAddress" required class="form-control" type="text" th:field="*{notifierAddress}">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>收货人</td>
|
||||
<td><input name="notifier" class="form-control" type="text" th:field="*{notifier}"></td>
|
||||
<td>Email</td>
|
||||
<td><input type="text" name="notifierEmail" th:field="*{notifierEmail}"
|
||||
class="form-control"></td>
|
||||
<td>联系方式</td>
|
||||
<td><input id="notifierPhone" name="notifierPhone" class="form-control" type="text" required th:field="*{notifierPhone}">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- <tr>-->
|
||||
<!-- <td>付款方式</td>-->
|
||||
|
|
|
|||
|
|
@ -412,6 +412,7 @@
|
|||
<li lay-id="22" th:class="${(showFileFlag || orderBakFile.size()>0)?'':'layui-this'}">备货信息</li>
|
||||
<li lay-id="33">物流信息</li>
|
||||
<li lay-id="44">流转过程</li>
|
||||
<li lay-id="55" th:if="${projectOrderInfo.orderStatus!='0'}">流程进度</li>
|
||||
</ul>
|
||||
<div class="layui-tab-content">
|
||||
|
||||
|
|
@ -569,6 +570,9 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-tab-item">
|
||||
<img alt="image" id="flowable-image" class=" m-t-xs img-responsive" src="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
@ -850,7 +854,7 @@
|
|||
|
||||
$(function () {
|
||||
|
||||
|
||||
$('#flowable-image').attr("src",ctx+"flow/monitor/traceProcessKey?businessKey="+[[${projectOrderInfo.orderCode}]])
|
||||
let shipmentAmount = [[${projectOrderInfo.shipmentAmount}]] || 0
|
||||
|
||||
if (shipmentAmount) {
|
||||
|
|
|
|||
|
|
@ -276,7 +276,6 @@ public class TodoServiceImpl implements TodoService {
|
|||
if (StringUtils.isBlank(taskId)) {
|
||||
taskId = taskService.createTaskQuery().processInstanceBusinessKey(businessKey).taskAssignee(String.valueOf(getSysUser().getUserId())).singleResult().getId();
|
||||
}
|
||||
//fixme 后续流程审批人改为配置项
|
||||
log.info("流程审批----businessKey:{} taskId:{} variable:{}", businessKey, taskId, JSON.toJSONString(variable));
|
||||
if (ObjectUtils.isNotEmpty(variable)) {
|
||||
taskService.complete(taskId, variable);
|
||||
|
|
|
|||
|
|
@ -831,7 +831,7 @@ public class ProjectOrderInfoServiceImpl implements IProjectOrderInfoService, To
|
|||
// }
|
||||
|
||||
// 添加终端产品列
|
||||
addHeadList(maxHardware, headerList, "终端");
|
||||
addHeadList(maxHardware, headerList, "硬件");
|
||||
|
||||
|
||||
// 添加服务产品列
|
||||
|
|
@ -844,9 +844,12 @@ public class ProjectOrderInfoServiceImpl implements IProjectOrderInfoService, To
|
|||
addHeadList(maxMaintenanceService, headerList, "维保服务");
|
||||
|
||||
|
||||
headerList.add(Collections.singletonList("订单金额"));
|
||||
headerList.add(Collections.singletonList("产品总价(配置信息总价)"));
|
||||
headerList.add(Collections.singletonList("总价合计"));
|
||||
headerList.add(Collections.singletonList("折后总价合计"));
|
||||
headerList.add(Collections.singletonList("维保金额"));
|
||||
headerList.add(Collections.singletonList("软件折后小计"));
|
||||
headerList.add(Collections.singletonList("硬件折后小计"));
|
||||
headerList.add(Collections.singletonList("服务折后小计"));
|
||||
|
||||
return headerList;
|
||||
}
|
||||
|
|
@ -886,6 +889,7 @@ public class ProjectOrderInfoServiceImpl implements IProjectOrderInfoService, To
|
|||
OrderExcelNumStaticsDto nVIDIADto = new OrderExcelNumStaticsDto(BigDecimal.ZERO, 0L,"");
|
||||
List<ProjectProductInfo> maintenanceList = new ArrayList<>();
|
||||
List<ProjectProductInfo> deployList = new ArrayList<>();
|
||||
List<ProjectProductInfo> notDeployAndMaintenanceList = new ArrayList<>();
|
||||
List<ProjectProductInfo> oneList = new ArrayList<>();
|
||||
List<ProjectProductInfo> nvidiaList = new ArrayList<>();
|
||||
// 添加软件产品列
|
||||
|
|
@ -914,25 +918,26 @@ public class ProjectOrderInfoServiceImpl implements IProjectOrderInfoService, To
|
|||
// 添加终端产品列
|
||||
totalPrice = processProducts(info.getHardwareProjectProductInfoList(), maxHardware, row, totalPrice);
|
||||
|
||||
|
||||
if (CollUtil.isNotEmpty(info.getMaintenanceProjectProductInfoList())){
|
||||
for (ProjectProductInfo projectProductInfo : info.getMaintenanceProjectProductInfoList()) {
|
||||
if (MAINTENANCE_SERVICES.contains(projectProductInfo.getProductBomCode()) ) {
|
||||
maintenanceList.add(projectProductInfo);
|
||||
maintenancePrice = maintenancePrice.add(projectProductInfo.getAllPrice());
|
||||
}else if ( DEPLOY_SERVICES.contains(projectProductInfo.getProductBomCode()) ) {
|
||||
deployList.add(projectProductInfo);
|
||||
}else{
|
||||
notDeployAndMaintenanceList.add(projectProductInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int serviceIndex=maxMaintenance;
|
||||
// 添加服务产品列
|
||||
for (int maxMaintenanceIndex = 0; serviceIndex >0 ; maxMaintenanceIndex++) {
|
||||
if (CollUtil.isNotEmpty(info.getMaintenanceProjectProductInfoList()) && maxMaintenanceIndex < info.getMaintenanceProjectProductInfoList().size()) {
|
||||
ProjectProductInfo productInfo = info.getMaintenanceProjectProductInfoList().get(maxMaintenanceIndex);
|
||||
|
||||
if (productInfo != null && StringUtils.isNotEmpty(productInfo.getProductBomCode())
|
||||
&& MAINTENANCE_SERVICES.contains(productInfo.getProductBomCode())
|
||||
) {
|
||||
maintenanceList.add(productInfo);
|
||||
maintenancePrice = maintenancePrice.add(productInfo.getAllPrice());
|
||||
continue;
|
||||
}
|
||||
if (productInfo != null && StringUtils.isNotEmpty(productInfo.getProductBomCode())
|
||||
&& DEPLOY_SERVICES.contains(productInfo.getProductBomCode())
|
||||
) {
|
||||
deployList.add(productInfo);
|
||||
continue;
|
||||
}
|
||||
if (CollUtil.isNotEmpty(notDeployAndMaintenanceList) && maxMaintenanceIndex < notDeployAndMaintenanceList.size()) {
|
||||
ProjectProductInfo productInfo = notDeployAndMaintenanceList.get(maxMaintenanceIndex);
|
||||
totalPrice = addProductRow(productInfo, row, totalPrice);
|
||||
serviceIndex--;
|
||||
} else {
|
||||
|
|
@ -967,10 +972,21 @@ public class ProjectOrderInfoServiceImpl implements IProjectOrderInfoService, To
|
|||
// row.add(15, oneStorDto.getAllPrice().toString());
|
||||
// row.add(16, nVIDIADto.getQuantity().toString());
|
||||
// row.add(17, nVIDIADto.getAllPrice().toString());
|
||||
// row.add(StrUtil.toStringOrNull(info.getOrderChannel().equals(ProjectOrderInfo.OrderChannelEnum.TOTAL_GENERATION.getCode()) ?
|
||||
// info.getShipmentAmount() : info.getActualPurchaseAmount()));
|
||||
row.add(info.getShipmentAmount() != null ? info.getShipmentAmount().toString() : "");
|
||||
row.add(totalPrice.toString());
|
||||
//维保金额
|
||||
row.add(maintenancePrice.toString());
|
||||
row.add(StrUtil.toStringOrNull(info.getSoftwareProjectProductInfoList() == null ? 0 :
|
||||
// info.getSoftwareProjectProductInfoList().stream()
|
||||
// .map(item -> item.getPrice().multiply(info.getDiscountFold() == null ||info.getOrderStatus().equals(ProjectOrderInfo.OrderStatus.WAIT_APPROVE.getCode()) ? BigDecimal.ONE : info.getDiscountFold()).setScale(2,RoundingMode.HALF_UP).multiply(BigDecimal.valueOf(item.getQuantity())))
|
||||
// .reduce(BigDecimal.ZERO, BigDecimal::add)));
|
||||
info.getSoftwareProjectProductInfoList().stream().map(ProjectProductInfo::getAllPrice).reduce(BigDecimal.ZERO, BigDecimal::add)));
|
||||
row.add(StrUtil.toStringOrNull(info.getHardwareProjectProductInfoList() == null ? 0 :
|
||||
info.getHardwareProjectProductInfoList().stream().map(ProjectProductInfo::getAllPrice).reduce(BigDecimal.ZERO, BigDecimal::add)));
|
||||
row.add(StrUtil.toStringOrNull(info.getMaintenanceProjectProductInfoList() == null ? 0 :
|
||||
info.getMaintenanceProjectProductInfoList().stream().map(ProjectProductInfo::getAllPrice).reduce(BigDecimal.ZERO, BigDecimal::add)));
|
||||
dataList.add(row);
|
||||
}
|
||||
return dataList;
|
||||
|
|
|
|||
|
|
@ -275,5 +275,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="taskName!=null and taskName!=''">
|
||||
and task_name like concat('%',#{taskName},'%')
|
||||
</if>
|
||||
order by approve_time desc
|
||||
limit 1
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue