|
@@ -6,7 +6,11 @@ import com.ruoyi.common.core.domain.AjaxResult;
|
|
import com.ruoyi.common.core.page.TableDataInfo;
|
|
import com.ruoyi.common.core.page.TableDataInfo;
|
|
import com.ruoyi.common.enums.BusinessType;
|
|
import com.ruoyi.common.enums.BusinessType;
|
|
import com.ruoyi.web.work.domain.FollowRecord;
|
|
import com.ruoyi.web.work.domain.FollowRecord;
|
|
|
|
+import com.ruoyi.web.work.domain.FollowTemplate;
|
|
|
|
+import com.ruoyi.web.work.domain.Visit;
|
|
import com.ruoyi.web.work.service.IFollowRecordService;
|
|
import com.ruoyi.web.work.service.IFollowRecordService;
|
|
|
|
+import com.ruoyi.web.work.service.IFollowTemplateService;
|
|
|
|
+import com.ruoyi.web.work.service.IVisitService;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
@@ -16,6 +20,7 @@ import java.util.List;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 回访记录
|
|
* 回访记录
|
|
|
|
+ *
|
|
* @author lsw
|
|
* @author lsw
|
|
* @date 2024-07-18
|
|
* @date 2024-07-18
|
|
*/
|
|
*/
|
|
@@ -25,9 +30,15 @@ public class FollowRecordController extends BaseController {
|
|
@Autowired
|
|
@Autowired
|
|
private IFollowRecordService followRecordService;
|
|
private IFollowRecordService followRecordService;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private IVisitService visitService;
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ private IFollowTemplateService followTemplateService;
|
|
|
|
+
|
|
@PreAuthorize("@ss.hasPermi('work:record:list')")
|
|
@PreAuthorize("@ss.hasPermi('work:record:list')")
|
|
@GetMapping("/list")
|
|
@GetMapping("/list")
|
|
- public TableDataInfo list(FollowRecord followRecord){
|
|
|
|
|
|
+ public TableDataInfo list(FollowRecord followRecord) {
|
|
startPage();
|
|
startPage();
|
|
List<FollowRecord> list = followRecordService.selectList(followRecord);
|
|
List<FollowRecord> list = followRecordService.selectList(followRecord);
|
|
return getDataTable(list);
|
|
return getDataTable(list);
|
|
@@ -35,28 +46,43 @@ public class FollowRecordController extends BaseController {
|
|
|
|
|
|
@PreAuthorize("@ss.hasPermi('work:record:query')")
|
|
@PreAuthorize("@ss.hasPermi('work:record:query')")
|
|
@GetMapping(value = "/detail/{id}")
|
|
@GetMapping(value = "/detail/{id}")
|
|
- public AjaxResult detail(@PathVariable("id") Long id){
|
|
|
|
|
|
+ public AjaxResult detail(@PathVariable("id") Long id) {
|
|
return AjaxResult.success(followRecordService.getById(id));
|
|
return AjaxResult.success(followRecordService.getById(id));
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('work:record:list')")
|
|
|
|
+ @GetMapping("/visit/list")
|
|
|
|
+ public TableDataInfo visitList() {
|
|
|
|
+ startPage();
|
|
|
|
+ List<Visit> list = visitService.selectList(new Visit().setDoctorCode(getLoginUser().getUsername()));
|
|
|
|
+ return getDataTable(list);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('work:record:list')")
|
|
|
|
+ @GetMapping("/template/list")
|
|
|
|
+ public AjaxResult templateList(FollowTemplate followTemplate) {
|
|
|
|
+ List<FollowTemplate> list = followTemplateService.selectList(followTemplate);
|
|
|
|
+ return AjaxResult.success(list);
|
|
|
|
+ }
|
|
|
|
+
|
|
@PreAuthorize("@ss.hasPermi('work:record:add')")
|
|
@PreAuthorize("@ss.hasPermi('work:record:add')")
|
|
@Log(title = "回访记录", businessType = BusinessType.INSERT)
|
|
@Log(title = "回访记录", businessType = BusinessType.INSERT)
|
|
@PostMapping("/add")
|
|
@PostMapping("/add")
|
|
- public AjaxResult add(@RequestBody FollowRecord followRecord){
|
|
|
|
|
|
+ public AjaxResult add(@RequestBody FollowRecord followRecord) {
|
|
return toAjax(followRecordService.save(followRecord));
|
|
return toAjax(followRecordService.save(followRecord));
|
|
}
|
|
}
|
|
|
|
|
|
@PreAuthorize("@ss.hasPermi('work:record:edit')")
|
|
@PreAuthorize("@ss.hasPermi('work:record:edit')")
|
|
@Log(title = "回访记录", businessType = BusinessType.UPDATE)
|
|
@Log(title = "回访记录", businessType = BusinessType.UPDATE)
|
|
@PostMapping("/edit")
|
|
@PostMapping("/edit")
|
|
- public AjaxResult edit(@RequestBody FollowRecord followRecord){
|
|
|
|
|
|
+ public AjaxResult edit(@RequestBody FollowRecord followRecord) {
|
|
return toAjax(followRecordService.updateById(followRecord));
|
|
return toAjax(followRecordService.updateById(followRecord));
|
|
}
|
|
}
|
|
|
|
|
|
@PreAuthorize("@ss.hasPermi('work:record:remove')")
|
|
@PreAuthorize("@ss.hasPermi('work:record:remove')")
|
|
@Log(title = "回访记录", businessType = BusinessType.DELETE)
|
|
@Log(title = "回访记录", businessType = BusinessType.DELETE)
|
|
@GetMapping("/remove/{ids}")
|
|
@GetMapping("/remove/{ids}")
|
|
- public AjaxResult remove(@PathVariable Long[] ids){
|
|
|
|
|
|
+ public AjaxResult remove(@PathVariable Long[] ids) {
|
|
return toAjax(followRecordService.removeByIds(Arrays.asList(ids)));
|
|
return toAjax(followRecordService.removeByIds(Arrays.asList(ids)));
|
|
}
|
|
}
|
|
}
|
|
}
|