Commit 77f70e42 zshaohui

1.已出完的工单,关闭的时候不需要密码

1 个父辈 40e8ad1f
...@@ -886,6 +886,14 @@ public class LiteOrderCache { ...@@ -886,6 +886,14 @@ public class LiteOrderCache {
return task; return task;
} }
public LiteOrder getOrderByOrderNo(String orderNo){
LiteOrder liteOrder = liteOrderMap.get(orderNo);
if (liteOrder == null) {
liteOrder=liteOrderManager.findByOrderNo(orderNo);
}
return liteOrder;
}
/** /**
* 关闭工单 * 关闭工单
* @param orderNo * @param orderNo
......
...@@ -822,15 +822,26 @@ public class OrderController { ...@@ -822,15 +822,26 @@ public class OrderController {
if (orderNo == null) { if (orderNo == null) {
throw new ValidateException("smfcore.valueCanotNull", "{0}不能为空", new String[]{"orderNo"}); throw new ValidateException("smfcore.valueCanotNull", "{0}不能为空", new String[]{"orderNo"});
} }
//判断是否有权限密码
String permissionPasswordCache = dataCache.getCache(Constants.CACHE_permissionPassword); //判断工单是否已完成
if (StringUtils.isNotBlank(permissionPasswordCache)) { LiteOrder order = liteOrderCache.getOrderByOrderNo(orderNo);
String permissionPassword = mapValues.get("permissionPassword"); if (order == null){
if (StringUtils.isBlank(permissionPassword)) { return ResultBean.newErrorResult(-1, "smfcore.order.out.notFound", "未找到工单");
throw new ValidateException("smfcore.valueCanotNull", "{0}不能为空", new String[]{"permissionPassword"}); }
}
if (!permissionPasswordCache.equals(permissionPassword)) { if (order.isTaskFinished()){
throw new ValidateException("smfcore.error.permissionPassword", "权限密码错误");
} else {
//判断是否有权限密码
String permissionPasswordCache = dataCache.getCache(Constants.CACHE_permissionPassword);
if (StringUtils.isNotBlank(permissionPasswordCache)) {
String permissionPassword = mapValues.get("permissionPassword");
if (StringUtils.isBlank(permissionPassword)) {
throw new ValidateException("smfcore.valueCanotNull", "{0}不能为空", new String[]{"密码"});
}
if (!permissionPasswordCache.equals(permissionPassword)) {
throw new ValidateException("smfcore.error.permissionPassword", "权限密码错误");
}
} }
} }
log.info("收到关闭工单:"+orderNo+",当前操作人为:"+SecurityUtils.getLoginUsername()); log.info("收到关闭工单:"+orderNo+",当前操作人为:"+SecurityUtils.getLoginUsername());
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!