|
|
@ -185,34 +185,33 @@ public class StudyController extends BaseController |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 解锁 |
|
|
|
|
|
|
|
|
* 检查锁定 |
|
|
* @param form |
|
|
* @param form |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
@RequiresPermissions({"business:study:js"}) |
|
|
|
|
|
@PostMapping("/js") |
|
|
|
|
|
public AjaxResult js(@RequestBody StudySaveForm form) |
|
|
|
|
|
|
|
|
@RequiresPermissions({"business:study:sd"}) |
|
|
|
|
|
@PostMapping("/checkSd") |
|
|
|
|
|
public AjaxResult checkSd(@RequestBody StudySaveForm form) |
|
|
{ |
|
|
{ |
|
|
Study study = form.getStudy(); |
|
|
Study study = form.getStudy(); |
|
|
SignForm sign = form.getSign(); |
|
|
|
|
|
if(study==null || sign==null){ |
|
|
|
|
|
|
|
|
if(study==null){ |
|
|
return AjaxResult.error("参数有误"); |
|
|
return AjaxResult.error("参数有误"); |
|
|
} |
|
|
} |
|
|
if(study.getId()==null || study.getId().longValue()<=0){ |
|
|
if(study.getId()==null || study.getId().longValue()<=0){ |
|
|
return AjaxResult.error("参数有误"); |
|
|
return AjaxResult.error("参数有误"); |
|
|
} |
|
|
} |
|
|
studyService.js(form); |
|
|
|
|
|
|
|
|
studyService.checkSd(studyService.getById(study.getId())); |
|
|
return AjaxResult.success(); |
|
|
return AjaxResult.success(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 解档 |
|
|
|
|
|
|
|
|
* 锁定 |
|
|
* @param form |
|
|
* @param form |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
@RequiresPermissions({"business:study:jd"}) |
|
|
|
|
|
@PostMapping("/jd") |
|
|
|
|
|
public AjaxResult jd(@RequestBody StudySaveForm form) |
|
|
|
|
|
|
|
|
@RequiresPermissions({"business:study:sd"}) |
|
|
|
|
|
@PostMapping("/sd") |
|
|
|
|
|
public AjaxResult sd(@RequestBody StudySaveForm form) |
|
|
{ |
|
|
{ |
|
|
Study study = form.getStudy(); |
|
|
Study study = form.getStudy(); |
|
|
SignForm sign = form.getSign(); |
|
|
SignForm sign = form.getSign(); |
|
|
@ -222,18 +221,18 @@ public class StudyController extends BaseController |
|
|
if(study.getId()==null || study.getId().longValue()<=0){ |
|
|
if(study.getId()==null || study.getId().longValue()<=0){ |
|
|
return AjaxResult.error("参数有误"); |
|
|
return AjaxResult.error("参数有误"); |
|
|
} |
|
|
} |
|
|
studyService.jd(form); |
|
|
|
|
|
|
|
|
studyService.sd(form); |
|
|
return AjaxResult.success(); |
|
|
return AjaxResult.success(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 借阅 |
|
|
|
|
|
|
|
|
* 解锁 |
|
|
* @param form |
|
|
* @param form |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
@RequiresPermissions({"business:study:jy"}) |
|
|
|
|
|
@PostMapping("/jy") |
|
|
|
|
|
public AjaxResult jy(@RequestBody StudySaveForm form) |
|
|
|
|
|
|
|
|
@RequiresPermissions({"business:study:js"}) |
|
|
|
|
|
@PostMapping("/js") |
|
|
|
|
|
public AjaxResult js(@RequestBody StudySaveForm form) |
|
|
{ |
|
|
{ |
|
|
Study study = form.getStudy(); |
|
|
Study study = form.getStudy(); |
|
|
SignForm sign = form.getSign(); |
|
|
SignForm sign = form.getSign(); |
|
|
@ -243,38 +242,39 @@ public class StudyController extends BaseController |
|
|
if(study.getId()==null || study.getId().longValue()<=0){ |
|
|
if(study.getId()==null || study.getId().longValue()<=0){ |
|
|
return AjaxResult.error("参数有误"); |
|
|
return AjaxResult.error("参数有误"); |
|
|
} |
|
|
} |
|
|
studyService.jy(form); |
|
|
|
|
|
|
|
|
studyService.js(form); |
|
|
return AjaxResult.success(); |
|
|
return AjaxResult.success(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 检查锁定 |
|
|
|
|
|
|
|
|
* 解档 |
|
|
* @param form |
|
|
* @param form |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
@RequiresPermissions({"business:study:sd"}) |
|
|
|
|
|
@PostMapping("/checkSd") |
|
|
|
|
|
public AjaxResult checkSd(@RequestBody StudySaveForm form) |
|
|
|
|
|
|
|
|
@RequiresPermissions({"business:study:jd"}) |
|
|
|
|
|
@PostMapping("/jd") |
|
|
|
|
|
public AjaxResult jd(@RequestBody StudySaveForm form) |
|
|
{ |
|
|
{ |
|
|
Study study = form.getStudy(); |
|
|
Study study = form.getStudy(); |
|
|
if(study==null){ |
|
|
|
|
|
|
|
|
SignForm sign = form.getSign(); |
|
|
|
|
|
if(study==null || sign==null){ |
|
|
return AjaxResult.error("参数有误"); |
|
|
return AjaxResult.error("参数有误"); |
|
|
} |
|
|
} |
|
|
if(study.getId()==null || study.getId().longValue()<=0){ |
|
|
if(study.getId()==null || study.getId().longValue()<=0){ |
|
|
return AjaxResult.error("参数有误"); |
|
|
return AjaxResult.error("参数有误"); |
|
|
} |
|
|
} |
|
|
studyService.checkSd(studyService.getById(study.getId())); |
|
|
|
|
|
|
|
|
studyService.jd(form); |
|
|
return AjaxResult.success(); |
|
|
return AjaxResult.success(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 锁定 |
|
|
|
|
|
|
|
|
* 借阅 |
|
|
* @param form |
|
|
* @param form |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
@RequiresPermissions({"business:study:sd"}) |
|
|
|
|
|
@PostMapping("/sd") |
|
|
|
|
|
public AjaxResult sd(@RequestBody StudySaveForm form) |
|
|
|
|
|
|
|
|
@RequiresPermissions({"business:study:jy"}) |
|
|
|
|
|
@PostMapping("/jy") |
|
|
|
|
|
public AjaxResult jy(@RequestBody StudySaveForm form) |
|
|
{ |
|
|
{ |
|
|
Study study = form.getStudy(); |
|
|
Study study = form.getStudy(); |
|
|
SignForm sign = form.getSign(); |
|
|
SignForm sign = form.getSign(); |
|
|
@ -284,8 +284,7 @@ public class StudyController extends BaseController |
|
|
if(study.getId()==null || study.getId().longValue()<=0){ |
|
|
if(study.getId()==null || study.getId().longValue()<=0){ |
|
|
return AjaxResult.error("参数有误"); |
|
|
return AjaxResult.error("参数有误"); |
|
|
} |
|
|
} |
|
|
studyService.sd(form); |
|
|
|
|
|
|
|
|
studyService.jy(form); |
|
|
return AjaxResult.success(); |
|
|
return AjaxResult.success(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |