|
|
|
|
@ -310,18 +310,18 @@ public class WmsShippingBillServiceImpl implements IWmsShippingBillService {
|
|
|
|
|
} else {
|
|
|
|
|
this.updateByBo(bo);
|
|
|
|
|
}
|
|
|
|
|
// Why:统一使用同一个变量Map,避免 variables 为空时多次 getVariables() 产生临时Map导致变量丢失
|
|
|
|
|
// 统一使用同一个变量Map,避免 variables 为空时多次 getVariables() 产生临时Map导致变量丢失
|
|
|
|
|
Map<String, Object> variables = bo.getVariables();
|
|
|
|
|
// 流程变量:shippingType 用于互斥网关分支条件,applicantId 兼容已有流程变量使用
|
|
|
|
|
variables.put("shippingType", StringUtils.defaultIfBlank(shippingType, "1"));
|
|
|
|
|
variables.put("shippingCode", bo.getShippingCode());
|
|
|
|
|
variables.put("applicantId", String.valueOf(LoginHelper.getUserId()));
|
|
|
|
|
// Why:到货确认节点配置了 ${tManagerId} 抄送表达式,发起流程时必须保证变量有效
|
|
|
|
|
// 到货确认节点配置了 ${tManagerId} 抄送表达式,发起流程时必须保证变量有效
|
|
|
|
|
if (needConfirm) {
|
|
|
|
|
String tManagerId = StringUtils.trim(Convert.toStr(variables.get("tManagerId")));
|
|
|
|
|
if (StringUtils.isBlank(tManagerId) || "null".equalsIgnoreCase(tManagerId)) {
|
|
|
|
|
throw new ServiceException("到货确认节点抄送人员不能为空");
|
|
|
|
|
}
|
|
|
|
|
// if (StringUtils.isBlank(tManagerId) || "null".equalsIgnoreCase(tManagerId)) {
|
|
|
|
|
// throw new ServiceException("到货确认节点抄送人员不能为空");
|
|
|
|
|
// }
|
|
|
|
|
variables.put("tManagerId", tManagerId);
|
|
|
|
|
}
|
|
|
|
|
// 后端发起需要忽略权限
|
|
|
|
|
|