Browse Source

出库申请推送车辆利润报表数据

zhanglei
dimengzhe 3 weeks ago
parent
commit
1e536c88f4
  1. 10
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdeliveredapply/BusDeliveredApplyRest.java
  2. 8
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdeliveredapply/BusDeliveredApplyService.java
  3. 4
      anrui-reportcenter/anrui-reportcenter-biz/src/main/java/com/yxt/anrui/reportcenter/biz/carsSoldProfit/CarsSoldProfitMapper.xml
  4. 4
      doc/databases/统计报表/车辆利润报表.sql

10
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdeliveredapply/BusDeliveredApplyRest.java

@ -36,10 +36,7 @@ import com.yxt.common.core.vo.PagerVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@ -335,4 +332,9 @@ public class BusDeliveredApplyRest implements BusDeliveredApplyFeign {
public ResultBean<String> saveRetrievalApplyInfo(AppDeliveredApplyDto appDeliveredApplyDto) {
return busDeliveredApplyService.saveRetrievalApplyInfo(appDeliveredApplyDto);
}
@PostMapping("pushReport")
@ApiOperation("测试推送车辆利润报表")
ResultBean pushReport(@RequestParam("sid")String sid){
return busDeliveredApplyService.pushReport(sid);
}
}

8
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdeliveredapply/BusDeliveredApplyService.java

@ -5352,4 +5352,12 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
public String selCustomerByBusVinSid(String busVinSid) {
return baseMapper.selCustomerByBusVinSid(busVinSid);
}
public ResultBean pushReport(String sid) {
ResultBean rb = ResultBean.fireFail();
BusDeliveredApply busDeliveredApply = fetchBySid(sid);
List<BusDeliveredApplyDetails> detailsList = busDeliveredApplyDetailsService.selectByApplySid(busDeliveredApply.getSid());
pushCarSoldProfit(busDeliveredApply,detailsList);
return rb.success();
}
}

4
anrui-reportcenter/anrui-reportcenter-biz/src/main/java/com/yxt/anrui/reportcenter/biz/carsSoldProfit/CarsSoldProfitMapper.xml

@ -3,12 +3,12 @@
<mapper namespace="com.yxt.anrui.reportcenter.biz.carsSoldProfit.CarsSoldProfitMapper">
<select id="selectByVinSid" resultType="com.yxt.anrui.reportcenter.api.carsSoldProfit.CarsSoldProfit">
select *
from cars_sole_profit
from cars_sold_profit
where vinSid = #{vinSid}
</select>
<select id="listPage" resultType="com.yxt.anrui.reportcenter.api.carsSoldProfit.CarsSoldProfitVo">
select * from cars_sole_profit
select * from cars_sold_profit
<where>
${ew.sqlSegment}
</where>

4
doc/databases/统计报表/车辆利润报表.sql

@ -1,5 +1,5 @@
DROP TABLE IF EXISTS `car_sold_profit`;
CREATE TABLE `car_sold_profit`
DROP TABLE IF EXISTS `cars_sold_profit`;
CREATE TABLE `cars_sold_profit`
(
`id` int(32) NOT NULL AUTO_INCREMENT COMMENT 'id',
`sid` varchar(64) NOT NULL COMMENT 'sid',

Loading…
Cancel
Save