Browse Source

在库总数

pull/4/head
big-y 7 months ago
parent
commit
422c022e79
  1. 12
      blade-service/logpm-report/src/main/java/com/logpm/report/controller/IndexCountController.java
  2. 12
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/InLibraryDeliverMapper.xml
  3. 4
      blade-service/logpm-report/src/main/java/com/logpm/report/service/InLibraryDeliverService.java
  4. 12
      blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/InLibraryDeliverServiceImpl.java

12
blade-service/logpm-report/src/main/java/com/logpm/report/controller/IndexCountController.java

@ -4,19 +4,23 @@ package com.logpm.report.controller;
import com.logpm.report.service.InLibraryDeliverService;
import io.swagger.annotations.Api;
import lombok.AllArgsConstructor;
import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@AllArgsConstructor
@RestController
@RequestMapping("index-count")
@RequestMapping("/index-count")
@Api(value = "首页统计数据", tags = "首页统计数据")
public class IndexCountController {
private InLibraryDeliverService inLibraryDeliverService;
public void indexCount() {
Integer indexCount = inLibraryDeliverService.indexCount();
@GetMapping("/index_count")
public R<Integer> indexCount(@RequestParam("id") Long id) {
Integer indexCount = inLibraryDeliverService.indexCount(id);
return R.data(indexCount);
}
}

12
blade-service/logpm-report/src/main/java/com/logpm/report/mapper/InLibraryDeliverMapper.xml

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.logpm.report.mapper.InLibraryDeliverMapper">
<select id="obtainTheNumberOfInventoryListings" resultType="java.lang.Integer">
select SUM(
quantity
) as con
from logpm_distribution_parcel_list
where warehouse_id = #{id}
</select>
</mapper>

4
blade-service/logpm-report/src/main/java/com/logpm/report/service/InLibraryDeliverService.java

@ -11,4 +11,8 @@ public interface InLibraryDeliverService {
IPage<InLibraryDeliverService> DistributionParcelListPage( ) ;
Integer indexCount(Long id);
}

12
blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/InLibraryDeliverServiceImpl.java

@ -1,12 +1,24 @@
package com.logpm.report.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.report.mapper.InLibraryDeliverMapper;
import com.logpm.report.service.InLibraryDeliverService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
@Service
@AllArgsConstructor
public class InLibraryDeliverServiceImpl implements InLibraryDeliverService {
private InLibraryDeliverMapper inLibraryDeliverMapper;
@Override
public IPage<InLibraryDeliverService> DistributionParcelListPage() {
return null;
}
@Override
public Integer indexCount(Long id) {
return inLibraryDeliverMapper.obtainTheNumberOfInventoryListings(id);
}
}

Loading…
Cancel
Save