Commit 77f70e42 zshaohui

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

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