forked from sfms3.0/sfms3.0
6 changed files with 78 additions and 4 deletions
@ -0,0 +1,41 @@ |
|||
package com.win.module.wms.controller.index; |
|||
|
|||
import com.win.framework.common.pojo.CommonResult; |
|||
import com.win.module.wms.service.purchase.PurchaseMainService; |
|||
import com.win.module.wms.service.purchasePlan.PurchasePlanMainService; |
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import javax.annotation.Resource; |
|||
import java.util.HashMap; |
|||
import java.util.Map; |
|||
|
|||
import static com.win.framework.common.pojo.CommonResult.success; |
|||
|
|||
@Tag(name = "管理后台 - 首页") |
|||
@RestController |
|||
@RequestMapping("/wms/index") |
|||
@Validated |
|||
public class IndexController { |
|||
|
|||
@Resource |
|||
private PurchaseMainService purchaseMainService; |
|||
@Resource |
|||
private PurchasePlanMainService purchasePlanMainService; |
|||
|
|||
@GetMapping("/index") |
|||
@Operation(summary = "开放订单数") |
|||
public CommonResult<Map<String, Object>> index() { |
|||
Map<String, Object> dataMap = new HashMap<>(); |
|||
dataMap.put("openPurchaseNum", purchaseMainService.getPurchaseCount(true)); |
|||
dataMap.put("allPurchaseNum", purchaseMainService.getPurchaseCount(false)); |
|||
dataMap.put("openPurchasePlanNum", purchasePlanMainService.getPurchasePlanCount(true)); |
|||
dataMap.put("allPurchasePlanNum", purchasePlanMainService.getPurchasePlanCount(false)); |
|||
return success(dataMap); |
|||
} |
|||
|
|||
} |
Loading…
Reference in new issue