|
|
@ -4,6 +4,7 @@ import com.alibaba.fastjson2.JSONObject; |
|
|
import com.hxhq.business.domain.Study; |
|
|
import com.hxhq.business.domain.Study; |
|
|
import com.hxhq.business.domain.StudyJcgj; |
|
|
import com.hxhq.business.domain.StudyJcgj; |
|
|
import com.hxhq.business.dto.study.StudyListDto; |
|
|
import com.hxhq.business.dto.study.StudyListDto; |
|
|
|
|
|
import com.hxhq.business.enums.study.StudyBorrowStatusEnum; |
|
|
import com.hxhq.business.enums.study.StudyStatusEnum; |
|
|
import com.hxhq.business.enums.study.StudyStatusEnum; |
|
|
import com.hxhq.business.enums.study.StudyTypeEnum; |
|
|
import com.hxhq.business.enums.study.StudyTypeEnum; |
|
|
import com.hxhq.business.form.common.SignForm; |
|
|
import com.hxhq.business.form.common.SignForm; |
|
|
@ -288,5 +289,107 @@ public class StudyDrugController extends BaseController |
|
|
return table; |
|
|
return table; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 同意/拒绝归档 |
|
|
|
|
|
* @param form |
|
|
|
|
|
* @return |
|
|
|
|
|
*/ |
|
|
|
|
|
@RequiresPermissions(value = {"business:archive:drugConfig:tygd","business:archive:drugConfig:jjgd"},logical = Logical.OR) |
|
|
|
|
|
@PostMapping("/doGd") |
|
|
|
|
|
public AjaxResult doGd(@RequestBody StudySaveForm form) |
|
|
|
|
|
{ |
|
|
|
|
|
Study study = form.getStudy(); |
|
|
|
|
|
SignForm sign = form.getSign(); |
|
|
|
|
|
if(study==null || sign==null){ |
|
|
|
|
|
return AjaxResult.error("参数有误"); |
|
|
|
|
|
} |
|
|
|
|
|
if(study.getId()==null || study.getId().longValue()<=0 || study.getStatus()==null){ |
|
|
|
|
|
return AjaxResult.error("参数有误"); |
|
|
|
|
|
} |
|
|
|
|
|
if(!study.getStatus().equals(StudyStatusEnum.ysd.getValue()) && !study.getStatus().equals(StudyStatusEnum.gd.getValue())){ |
|
|
|
|
|
return AjaxResult.error("状态有误"); |
|
|
|
|
|
} |
|
|
|
|
|
if(study.getStatus().equals(StudyStatusEnum.ysd.getValue()) && StringUtils.isBlank(sign.getRemark())){ |
|
|
|
|
|
return AjaxResult.error("原因不能为空"); |
|
|
|
|
|
} |
|
|
|
|
|
studyService.doGd(form); |
|
|
|
|
|
return AjaxResult.success(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 同意/拒绝解档 |
|
|
|
|
|
* @param form |
|
|
|
|
|
* @return |
|
|
|
|
|
*/ |
|
|
|
|
|
@RequiresPermissions(value = {"business:archive:drugConfig:tyjd","business:archive:drugConfig:jjjd"},logical = Logical.OR) |
|
|
|
|
|
@PostMapping("/doJd") |
|
|
|
|
|
public AjaxResult doJd(@RequestBody StudySaveForm form) |
|
|
|
|
|
{ |
|
|
|
|
|
Study study = form.getStudy(); |
|
|
|
|
|
SignForm sign = form.getSign(); |
|
|
|
|
|
if(study==null || sign==null){ |
|
|
|
|
|
return AjaxResult.error("参数有误"); |
|
|
|
|
|
} |
|
|
|
|
|
if(study.getId()==null || study.getId().longValue()<=0 || study.getStatus()==null){ |
|
|
|
|
|
return AjaxResult.error("参数有误"); |
|
|
|
|
|
} |
|
|
|
|
|
if(!study.getStatus().equals(StudyStatusEnum.ysd.getValue()) && !study.getStatus().equals(StudyStatusEnum.gd.getValue())){ |
|
|
|
|
|
return AjaxResult.error("状态有误"); |
|
|
|
|
|
} |
|
|
|
|
|
if(study.getStatus().equals(StudyStatusEnum.gd.getValue()) && StringUtils.isBlank(sign.getRemark())){ |
|
|
|
|
|
return AjaxResult.error("原因不能为空"); |
|
|
|
|
|
} |
|
|
|
|
|
studyService.doJd(form); |
|
|
|
|
|
return AjaxResult.success(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 同意/拒绝借阅 |
|
|
|
|
|
* @param form |
|
|
|
|
|
* @return |
|
|
|
|
|
*/ |
|
|
|
|
|
@RequiresPermissions(value = {"business:archive:drugConfig:tyjy","business:archive:drugConfig:jjjy"},logical = Logical.OR) |
|
|
|
|
|
@PostMapping("/doJy") |
|
|
|
|
|
public AjaxResult doJy(@RequestBody StudySaveForm form) |
|
|
|
|
|
{ |
|
|
|
|
|
Study study = form.getStudy(); |
|
|
|
|
|
SignForm sign = form.getSign(); |
|
|
|
|
|
if(study==null || sign==null){ |
|
|
|
|
|
return AjaxResult.error("参数有误"); |
|
|
|
|
|
} |
|
|
|
|
|
if(study.getId()==null || study.getId().longValue()<=0 || study.getBorrowStatus()==null){ |
|
|
|
|
|
return AjaxResult.error("参数有误"); |
|
|
|
|
|
} |
|
|
|
|
|
if(!study.getBorrowStatus().equals(StudyBorrowStatusEnum.jyz.getValue()) && !study.getBorrowStatus().equals(StudyBorrowStatusEnum.wjy.getValue())){ |
|
|
|
|
|
return AjaxResult.error("状态有误"); |
|
|
|
|
|
} |
|
|
|
|
|
if(study.getBorrowStatus().equals(StudyBorrowStatusEnum.wjy.getValue()) && StringUtils.isBlank(sign.getRemark())){ |
|
|
|
|
|
return AjaxResult.error("原因不能为空"); |
|
|
|
|
|
} |
|
|
|
|
|
studyService.doJy(form); |
|
|
|
|
|
return AjaxResult.success(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 同意/拒绝借阅 |
|
|
|
|
|
* @param form |
|
|
|
|
|
* @return |
|
|
|
|
|
*/ |
|
|
|
|
|
@RequiresPermissions("business:archive:drugConfig:qrgh") |
|
|
|
|
|
@PostMapping("/gh") |
|
|
|
|
|
public AjaxResult gh(@RequestBody StudySaveForm form) |
|
|
|
|
|
{ |
|
|
|
|
|
Study study = form.getStudy(); |
|
|
|
|
|
SignForm sign = form.getSign(); |
|
|
|
|
|
if(study==null || sign==null){ |
|
|
|
|
|
return AjaxResult.error("参数有误"); |
|
|
|
|
|
} |
|
|
|
|
|
if(study.getId()==null || study.getId().longValue()<=0){ |
|
|
|
|
|
return AjaxResult.error("参数有误"); |
|
|
|
|
|
} |
|
|
|
|
|
studyService.gh(form); |
|
|
|
|
|
return AjaxResult.success(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
//endregion |
|
|
//endregion |
|
|
} |
|
|
} |