绑定和解除绑定
This commit is contained in:
parent
11eda2aa44
commit
3da2afd492
|
@ -40,3 +40,39 @@ public static void main(String[] args){
|
|||
// java 7 随机int区间
|
||||
int randomNum = ThreadLocalRandom.current().nextInt(min, max + 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 判断是否完成了所有审核!!
|
||||
* 判断当前用户执行审核通过之后(当前用户能提交,则肯定是具有相应审核权限的),审核工作是否已经完成
|
||||
* 完成的条件应该是: recordDTO中保存的reviewType + 当前用户审核的 reviewType = 当前运营位所需要的所有reviewType
|
||||
* @return
|
||||
* @param attribute 运营位的审核属性
|
||||
* @param reviewResultVo 当前用户的审核信息
|
||||
* @param recordDTO 数据库中已经拥有的审核信息
|
||||
* @return
|
||||
*/
|
||||
private boolean isFinishReview(SceneAttribute attribute,ReviewResultVo reviewResultVo,RecordDTO recordDTO) {
|
||||
List<Integer> allReviewType = new ArrayList<Integer>();
|
||||
if (attribute.isHasVisionReview()) {
|
||||
allReviewType.add(RecordReviewEnum.VISION.getValue());
|
||||
}
|
||||
|
||||
if (attribute.isHasContentReview()) {
|
||||
allReviewType.add(RecordReviewEnum.CONTENT.getValue());
|
||||
}
|
||||
|
||||
List<Integer> hasReviewType = new ArrayList<Integer>();
|
||||
if (StringUtils.isNotBlank(recordDTO.getViewInfo())) {
|
||||
RecordViewInfo recordViewInfo = JSONObject.parseObject(recordDTO.getViewInfo(), RecordViewInfo.class);
|
||||
for (ReviewEvent reviewEvent : recordViewInfo.getEvents()) {
|
||||
hasReviewType.add(reviewEvent.getReviewType());
|
||||
}
|
||||
}
|
||||
|
||||
for (Integer reviewType : reviewResultVo.getReviewList()) {
|
||||
hasReviewType.add(reviewType);
|
||||
}
|
||||
|
||||
return allReviewType.size() == hasReviewType.size();
|
||||
}
|
||||
|
|
|
@ -202,3 +202,7 @@ $.getJSON('@Url.Action("YourUrl")',function(data){
|
|||
}, '</option>'));
|
||||
});
|
||||
});
|
||||
|
||||
// 绑定和解除绑定
|
||||
$('.check-select-type-action').unbind();
|
||||
$('.check-select-type-action').on("click", function () {});
|
||||
|
|
Loading…
Reference in New Issue