|
|
@@ -19,6 +19,7 @@ import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.v3.oas.annotations.Parameter;
|
|
|
import io.swagger.v3.oas.annotations.Parameters;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
@@ -38,15 +39,12 @@ public class IsMaterialsLoanController extends BaseController
|
|
|
@Autowired
|
|
|
private IIsMaterialsLoanService isMaterialsLoanService;
|
|
|
|
|
|
- /**
|
|
|
- * 查询物资借出分页
|
|
|
- */
|
|
|
@ApiOperation("查询物资借出-分页")
|
|
|
@Parameters({
|
|
|
@Parameter(name = "page", description = "Page"),
|
|
|
@Parameter(name = "dto", description = "实体参数")
|
|
|
})
|
|
|
- // @PreAuthorize("@ss.hasPermi('iscs:loan:list')")
|
|
|
+ @PreAuthorize("@ss.hasPermi('iscs:loan:list')")
|
|
|
@GetMapping("/getIsMaterialsLoanPage")
|
|
|
public CommonResult<Page<MaterialsLoanPageVO>> getIsMaterialsLoanPage(Page<IsMaterialsLoan> page, MaterialsLoanPageDTO dto)
|
|
|
{
|
|
|
@@ -54,12 +52,9 @@ public class IsMaterialsLoanController extends BaseController
|
|
|
return CommonResult.success(result);
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 导出物资借出列表
|
|
|
- */
|
|
|
@ApiOperation("导出物资借出列表")
|
|
|
@Parameter(name = "isMaterialsLoan", description = "实体参数")
|
|
|
- // @PreAuthorize("@ss.hasPermi('iscs:loan:export')")
|
|
|
+ @PreAuthorize("@ss.hasPermi('iscs:loan:export')")
|
|
|
@Log(title = "物资借出", businessType = BusinessType.EXPORT)
|
|
|
@PostMapping("/exportIsMaterialsLoan")
|
|
|
public void exportIsMaterialsLoan(HttpServletResponse response, IsMaterialsLoan isMaterialsLoan)
|
|
|
@@ -69,23 +64,18 @@ public class IsMaterialsLoanController extends BaseController
|
|
|
util.exportExcel(response, list, "物资借出数据");
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 获取物资借出详细信息
|
|
|
- */
|
|
|
@ApiOperation("获取物资借出详细信息")
|
|
|
@Parameter(name = "materialsLoanId", description = "materialsLoanId")
|
|
|
- // @PreAuthorize("@ss.hasPermi('iscs:loan:query')")
|
|
|
+ @PreAuthorize("@ss.hasPermi('iscs:loan:query')")
|
|
|
@GetMapping(value = "/selectIsMaterialsLoanById")
|
|
|
public CommonResult<IsMaterialsLoan> selectIsMaterialsLoanById(Long materialsLoanId)
|
|
|
{
|
|
|
return CommonResult.success(isMaterialsLoanService.selectIsMaterialsLoanByMaterialsLoanId(materialsLoanId));
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 新增物资借出
|
|
|
- */
|
|
|
+
|
|
|
@ApiOperation("新增物资借出")
|
|
|
- // @PreAuthorize("@ss.hasPermi('iscs:loan:add')")
|
|
|
+ @PreAuthorize("@ss.hasPermi('iscs:loan:add')")
|
|
|
@Log(title = "物资借出", businessType = BusinessType.INSERT)
|
|
|
@PostMapping("/insertIsMaterialsLoan")
|
|
|
public CommonResult<Boolean> insertIsMaterialsLoan(@RequestBody @Parameter(name = "dto", description = "新增数据类,放到body") AddLoanDTO dto)
|
|
|
@@ -94,7 +84,7 @@ public class IsMaterialsLoanController extends BaseController
|
|
|
}
|
|
|
|
|
|
@ApiOperation("物资归还")
|
|
|
- // @PreAuthorize("@ss.hasPermi('iscs:loan:add')")
|
|
|
+ @PreAuthorize("@ss.hasPermi('iscs:loan:edit')")
|
|
|
@Log(title = "物资归还", businessType = BusinessType.INSERT)
|
|
|
@PostMapping("/returnIsMaterialsLoan")
|
|
|
public CommonResult<Boolean> returnIsMaterialsLoan(@RequestBody @Parameter(name = "dto", description = "新增数据类,放到body") ReturnLoanDTO dto)
|
|
|
@@ -106,7 +96,7 @@ public class IsMaterialsLoanController extends BaseController
|
|
|
* 修改物资借出
|
|
|
*/
|
|
|
@ApiOperation("修改物资借出")
|
|
|
- // @PreAuthorize("@ss.hasPermi('iscs:loan:edit')")
|
|
|
+ @PreAuthorize("@ss.hasPermi('iscs:loan:edit')")
|
|
|
@Log(title = "物资借出", businessType = BusinessType.UPDATE)
|
|
|
@PostMapping("/updateIsMaterialsLoan")
|
|
|
public CommonResult<Boolean> updateIsMaterialsLoan(@RequestBody @Parameter(name = "isMaterialsLoan", description = "修改数据类,放到body") IsMaterialsLoan isMaterialsLoan)
|
|
|
@@ -118,8 +108,8 @@ public class IsMaterialsLoanController extends BaseController
|
|
|
* 删除物资借出
|
|
|
*/
|
|
|
@ApiOperation("删除物资借出")
|
|
|
- // @PreAuthorize("@ss.hasPermi('iscs:loan:remove')")
|
|
|
- @Log(title = "物资借出", businessType = BusinessType.DELETE)
|
|
|
+ @PreAuthorize("@ss.hasPermi('iscs:loan:remove')")
|
|
|
+ @Log(title = "删除物资借出", businessType = BusinessType.DELETE)
|
|
|
@PostMapping("/deleteIsMaterialsLoanByMaterialsLoanIds")
|
|
|
public CommonResult<Boolean> deleteIsMaterialsLoanByMaterialsLoanIds(String materialsLoanIds)
|
|
|
{
|
|
|
@@ -131,7 +121,7 @@ public class IsMaterialsLoanController extends BaseController
|
|
|
@Parameter(name = "page", description = "Page"),
|
|
|
@Parameter(name = "dto", description = "实体参数")
|
|
|
})
|
|
|
- // @PreAuthorize("@ss.hasPermi('iscs:loan:list')")
|
|
|
+ @PreAuthorize("@ss.hasPermi('iscs:loan:return')")
|
|
|
@GetMapping("/getReturnReminderPage")
|
|
|
public CommonResult<Page<ReminderPageVO>> getReturnReminderPage(Page<IsMaterialsLoan> page, ReminderPageDTO dto)
|
|
|
{
|
|
|
@@ -144,7 +134,7 @@ public class IsMaterialsLoanController extends BaseController
|
|
|
@Parameter(name = "page", description = "Page"),
|
|
|
@Parameter(name = "dto", description = "实体参数")
|
|
|
})
|
|
|
- // @PreAuthorize("@ss.hasPermi('iscs:loan:list')")
|
|
|
+ @PreAuthorize("@ss.hasPermi('iscs:loan:expired')")
|
|
|
@GetMapping("/getExpiredReminderPage")
|
|
|
public CommonResult<Page<ReminderPageVO>> getReminderPage(Page<IsMaterialsLoan> page, ReminderPageDTO dto)
|
|
|
{
|