|
|
@@ -18,7 +18,9 @@ import com.ruoyi.common.core.domain.AjaxResult;
|
|
18
|
18
|
import com.ruoyi.common.core.page.TableDataInfo;
|
|
19
|
19
|
import com.ruoyi.common.enums.BusinessType;
|
|
20
|
20
|
import com.ruoyi.web.modules.diagnosis.domain.BizMedicalResource;
|
|
|
21
|
+import com.ruoyi.web.modules.diagnosis.domain.MedicalResourceBatchIdsBody;
|
|
21
|
22
|
import com.ruoyi.web.modules.diagnosis.service.IBizMedicalResourceService;
|
|
|
23
|
+import com.ruoyi.web.modules.diagnosis.support.MedicalResourceBatchIds;
|
|
22
|
24
|
import com.ruoyi.web.modules.diagnosis.support.MedicalResourceTypeValidator;
|
|
23
|
25
|
import com.ruoyi.web.modules.diagnosis.support.MedicalResourceValidation;
|
|
24
|
26
|
|
|
|
@@ -89,9 +91,10 @@ public class BizMedicalResourceController extends BaseController
|
|
89
|
91
|
@PreAuthorize("@ss.hasPermi('diseaseTreatment:medicalResource:publish')")
|
|
90
|
92
|
@Log(title = "畜牧医疗资源批量发布", businessType = BusinessType.UPDATE)
|
|
91
|
93
|
@PostMapping("/publish/batch")
|
|
92
|
|
- public AjaxResult publishBatch(@RequestBody Long[] ids)
|
|
|
94
|
+ public AjaxResult publishBatch(@RequestBody MedicalResourceBatchIdsBody body)
|
|
93
|
95
|
{
|
|
94
|
|
- return toAjax(bizMedicalResourceService.publishByIds(ids));
|
|
|
96
|
+ String ids = body != null ? body.getIds() : null;
|
|
|
97
|
+ return toAjax(bizMedicalResourceService.publishByIds(MedicalResourceBatchIds.parse(ids)));
|
|
95
|
98
|
}
|
|
96
|
99
|
|
|
97
|
100
|
@PreAuthorize("@ss.hasPermi('diseaseTreatment:medicalResource:publish')")
|
|
|
@@ -105,9 +108,10 @@ public class BizMedicalResourceController extends BaseController
|
|
105
|
108
|
@PreAuthorize("@ss.hasPermi('diseaseTreatment:medicalResource:offline')")
|
|
106
|
109
|
@Log(title = "畜牧医疗资源批量下架", businessType = BusinessType.UPDATE)
|
|
107
|
110
|
@PostMapping("/offline/batch")
|
|
108
|
|
- public AjaxResult offlineBatch(@RequestBody Long[] ids)
|
|
|
111
|
+ public AjaxResult offlineBatch(@RequestBody MedicalResourceBatchIdsBody body)
|
|
109
|
112
|
{
|
|
110
|
|
- return toAjax(bizMedicalResourceService.offlineByIds(ids));
|
|
|
113
|
+ String ids = body != null ? body.getIds() : null;
|
|
|
114
|
+ return toAjax(bizMedicalResourceService.offlineByIds(MedicalResourceBatchIds.parse(ids)));
|
|
111
|
115
|
}
|
|
112
|
116
|
|
|
113
|
117
|
@PreAuthorize("@ss.hasPermi('diseaseTreatment:medicalResource:offline')")
|
|
|
@@ -121,9 +125,11 @@ public class BizMedicalResourceController extends BaseController
|
|
121
|
125
|
@PreAuthorize("@ss.hasPermi('diseaseTreatment:medicalResource:assignAccount')")
|
|
122
|
126
|
@Log(title = "畜牧医疗资源批量分配账号", businessType = BusinessType.INSERT)
|
|
123
|
127
|
@PostMapping("/assignAccount/batch")
|
|
124
|
|
- public AjaxResult assignAccountBatch(@RequestBody Long[] ids)
|
|
|
128
|
+ public AjaxResult assignAccountBatch(@RequestBody MedicalResourceBatchIdsBody body)
|
|
125
|
129
|
{
|
|
126
|
|
- return toAjax(bizMedicalResourceService.assignAccountByIds(ids, getUsername()));
|
|
|
130
|
+ String ids = body != null ? body.getIds() : null;
|
|
|
131
|
+ return toAjax(bizMedicalResourceService.assignAccountByIds(
|
|
|
132
|
+ MedicalResourceBatchIds.parse(ids), getUsername()));
|
|
127
|
133
|
}
|
|
128
|
134
|
|
|
129
|
135
|
@PreAuthorize("@ss.hasPermi('diseaseTreatment:medicalResource:assignAccount')")
|