|
@@ -1,11 +1,15 @@
|
|
|
-package com.ruoyi.web.controller.warehouse.warehouseBusiness;
|
|
|
+package com.ruoyi.web.controller.warehouse.agreement;
|
|
|
|
|
|
import com.ruoyi.common.annotation.Log;
|
|
|
import com.ruoyi.common.core.controller.BaseController;
|
|
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
+import com.ruoyi.common.core.domain.model.LoginUser;
|
|
|
import com.ruoyi.common.core.page.TableDataInfo;
|
|
|
import com.ruoyi.common.enums.BusinessType;
|
|
|
+import com.ruoyi.common.utils.ServletUtils;
|
|
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
|
|
+import com.ruoyi.common.utils.spring.SpringUtils;
|
|
|
+import com.ruoyi.framework.web.service.TokenService;
|
|
|
import com.ruoyi.warehouseBusiness.domain.TWarehouseAgreement;
|
|
|
import com.ruoyi.warehouseBusiness.service.ITWarehouseAgreementService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -13,6 +17,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
* 仓储费Controller
|
|
@@ -21,26 +26,27 @@ import java.util.List;
|
|
|
* @date 2020-12-11
|
|
|
*/
|
|
|
@RestController
|
|
|
-@RequestMapping("/warehouseBusiness/agreement")
|
|
|
-public class TWarehouseAgreementController extends BaseController {
|
|
|
+@RequestMapping("/warehouseBusiness/agreementTask")
|
|
|
+public class TWarehouseAgreementTaskController extends BaseController {
|
|
|
@Autowired
|
|
|
private ITWarehouseAgreementService tWarehouseAgreementService;
|
|
|
|
|
|
/**
|
|
|
* 查询仓储费列表
|
|
|
*/
|
|
|
- @PreAuthorize("@ss.hasPermi('warehouseBusiness:agreement:list')")
|
|
|
+ @PreAuthorize("@ss.hasPermi('warehouseBusiness:agreementTask:list')")
|
|
|
@GetMapping("/list")
|
|
|
public TableDataInfo list(TWarehouseAgreement tWarehouseAgreement) {
|
|
|
startPage();
|
|
|
- List<TWarehouseAgreement> list = tWarehouseAgreementService.selectTWarehouseAgreementList(tWarehouseAgreement);
|
|
|
+ tWarehouseAgreement.setfFeetypeid((long) 0);
|
|
|
+ List<Map<String, Object>> list = tWarehouseAgreementService.selectTWarehouseAgreementList1(tWarehouseAgreement);
|
|
|
return getDataTable(list);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 导出仓储费列表
|
|
|
*/
|
|
|
- @PreAuthorize("@ss.hasPermi('warehouseBusiness:agreement:export')")
|
|
|
+ @PreAuthorize("@ss.hasPermi('warehouseBusiness:agreementTask:export')")
|
|
|
@Log(title = "仓储费", businessType = BusinessType.EXPORT)
|
|
|
@GetMapping("/export")
|
|
|
public AjaxResult export(TWarehouseAgreement tWarehouseAgreement) {
|
|
@@ -52,7 +58,7 @@ public class TWarehouseAgreementController extends BaseController {
|
|
|
/**
|
|
|
* 获取仓储费详细信息
|
|
|
*/
|
|
|
- @PreAuthorize("@ss.hasPermi('warehouseBusiness:agreement:query')")
|
|
|
+ @PreAuthorize("@ss.hasPermi('warehouseBusiness:agreementTask:query')")
|
|
|
@GetMapping(value = "/{fId}")
|
|
|
public AjaxResult getInfo(@PathVariable("fId") Long fId) {
|
|
|
return AjaxResult.success(tWarehouseAgreementService.selectTWarehouseAgreementById(fId));
|
|
@@ -61,17 +67,20 @@ public class TWarehouseAgreementController extends BaseController {
|
|
|
/**
|
|
|
* 新增仓储费
|
|
|
*/
|
|
|
- @PreAuthorize("@ss.hasPermi('warehouseBusiness:agreement:add')")
|
|
|
+ @PreAuthorize("@ss.hasPermi('warehouseBusiness:agreementTask:add')")
|
|
|
@Log(title = "仓储费", businessType = BusinessType.INSERT)
|
|
|
@PostMapping
|
|
|
- public AjaxResult add(@RequestBody TWarehouseAgreement tWarehouseAgreement) {
|
|
|
- return toAjax(tWarehouseAgreementService.insertTWarehouseAgreement(tWarehouseAgreement));
|
|
|
+ public AjaxResult add(@RequestParam("agreement") String agreement,
|
|
|
+ @RequestParam("agreementitems") String agreementitems) {
|
|
|
+ // 获取当前的用户
|
|
|
+ LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
|
|
|
+ return tWarehouseAgreementService.insertTWarehouseAgreement(agreement,agreementitems,loginUser);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 修改仓储费
|
|
|
*/
|
|
|
- @PreAuthorize("@ss.hasPermi('warehouseBusiness:agreement:edit')")
|
|
|
+ @PreAuthorize("@ss.hasPermi('warehouseBusiness:agreementTask:edit')")
|
|
|
@Log(title = "仓储费", businessType = BusinessType.UPDATE)
|
|
|
@PutMapping
|
|
|
public AjaxResult edit(@RequestBody TWarehouseAgreement tWarehouseAgreement) {
|
|
@@ -81,7 +90,7 @@ public class TWarehouseAgreementController extends BaseController {
|
|
|
/**
|
|
|
* 删除仓储费
|
|
|
*/
|
|
|
- @PreAuthorize("@ss.hasPermi('warehouseBusiness:agreement:remove')")
|
|
|
+ @PreAuthorize("@ss.hasPermi('warehouseBusiness:agreementTask:remove')")
|
|
|
@Log(title = "仓储费", businessType = BusinessType.DELETE)
|
|
|
@DeleteMapping("/{fIds}")
|
|
|
public AjaxResult remove(@PathVariable Long[] fIds) {
|