|
|
|
@ -12,6 +12,7 @@ import com.hxhq.business.enums.NormalEnum; |
|
|
|
import com.hxhq.business.enums.SnTypeEnum; |
|
|
|
import com.hxhq.business.enums.study.StudyFormFillBdztEnum; |
|
|
|
import com.hxhq.business.enums.study.StudyTypeEnum; |
|
|
|
import com.hxhq.business.enums.template.ProductEnum; |
|
|
|
import com.hxhq.business.enums.zykgl.JcgjlxEnum; |
|
|
|
import com.hxhq.business.enums.zykgl.JcmcysEnum; |
|
|
|
import com.hxhq.business.form.study.*; |
|
|
|
@ -70,6 +71,88 @@ public class StudyFormFillServiceImpl extends ServiceImpl |
|
|
|
@Autowired |
|
|
|
private IStudySubjectService studySubjectService; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 开始配置 |
|
|
|
* @param form |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public void startConfiguration(StudyFormConfigurationForm form){ |
|
|
|
StudyFormFill studyFormFill=this.getById(form.getStudyFormId()); |
|
|
|
if(studyFormFill==null){ |
|
|
|
throw new ServiceException("填报不存在或已删除"); |
|
|
|
} |
|
|
|
Template template = templateService.getById(studyFormFill.getTemplateId()); |
|
|
|
//todo 试剂 |
|
|
|
if(template.getProduct().equals(ProductEnum.Sj.getValue())){ |
|
|
|
|
|
|
|
} |
|
|
|
//todo 麻精药 |
|
|
|
if(template.getProduct().equals(ProductEnum.Mjy.getValue())){ |
|
|
|
|
|
|
|
} |
|
|
|
//todo 给药制剂 |
|
|
|
if(template.getProduct().equals(ProductEnum.Gyzj.getValue())){ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 配置完成 |
|
|
|
* @param form |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public void configurationCompleted(StudyFormConfigurationForm form){ |
|
|
|
StudyFormFill studyFormFill=this.getById(form.getStudyFormId()); |
|
|
|
if(studyFormFill==null){ |
|
|
|
throw new ServiceException("填报不存在或已删除"); |
|
|
|
} |
|
|
|
Template template = templateService.getById(studyFormFill.getTemplateId()); |
|
|
|
//todo 试剂 |
|
|
|
if(template.getProduct().equals(ProductEnum.Sj.getValue())){ |
|
|
|
|
|
|
|
} |
|
|
|
//todo 麻精药 |
|
|
|
if(template.getProduct().equals(ProductEnum.Mjy.getValue())){ |
|
|
|
|
|
|
|
} |
|
|
|
//todo 给药制剂 |
|
|
|
if(template.getProduct().equals(ProductEnum.Gyzj.getValue())){ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 分装 |
|
|
|
* @param form |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public void subpackage(StudyFormFillSubpackageForm form){ |
|
|
|
StudyFormFill studyFormFill=this.getById(form.getStudyFormId()); |
|
|
|
if(studyFormFill==null){ |
|
|
|
throw new ServiceException("填报不存在或已删除"); |
|
|
|
} |
|
|
|
Template template = templateService.getById(studyFormFill.getTemplateId()); |
|
|
|
//todo 试剂 |
|
|
|
if(template.getProduct().equals(ProductEnum.Sj.getValue())){ |
|
|
|
|
|
|
|
} |
|
|
|
//todo 麻精药 |
|
|
|
if(template.getProduct().equals(ProductEnum.Mjy.getValue())){ |
|
|
|
|
|
|
|
} |
|
|
|
//todo 给药制剂 |
|
|
|
if(template.getProduct().equals(ProductEnum.Gyzj.getValue())){ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 查询试验-填报单列表 |
|
|
|
* |
|
|
|
@ -473,10 +556,16 @@ public class StudyFormFillServiceImpl extends ServiceImpl |
|
|
|
*/ |
|
|
|
public void genResource(StudyFormFill studyFormFill, String remark) { |
|
|
|
Template template = templateService.getById(studyFormFill.getTemplateId()); |
|
|
|
// 处置,存放,用量 |
|
|
|
sjService.genResource(studyFormFill, template); |
|
|
|
gyzjService.genResource(studyFormFill, template, remark); |
|
|
|
mjyService.genResource(studyFormFill, template, remark); |
|
|
|
//第一次填报 |
|
|
|
if(studyFormFill.getSftb().equals(NormalEnum.no.getValue())){ |
|
|
|
// 处置,存放,用量 |
|
|
|
sjService.genResource(studyFormFill, template); |
|
|
|
gyzjService.genResource(studyFormFill, template, remark); |
|
|
|
mjyService.genResource(studyFormFill, template, remark); |
|
|
|
}else{ |
|
|
|
//todo 再次修改 只是使用到的药剂,同步更新物资列表 |
|
|
|
|
|
|
|
} |
|
|
|
//更新 Resource |
|
|
|
this.updateById(studyFormFill); |
|
|
|
} |
|
|
|
|