feat:首页,销售订单接口

This commit is contained in:
LiWeiJie 2024-07-12 11:48:47 +08:00
parent 11bd4172d6
commit 2129462398
5 changed files with 72 additions and 39 deletions

View File

@ -1,6 +1,7 @@
package com.god.web.controller.wmsSaleOrder;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
@ -101,4 +102,15 @@ public class WmsSaleOrderInfoController extends BaseController
{
return toAjax(wmsSaleOrderInfoService.deleteWmsSaleOrderInfoByIds(ids));
}
/**
* 首页销售订单总金额含税
* @return 数据
*/
@GetMapping(value = "/selectTotalOrderAmount")
public AjaxResult selectTotalOrderAmount()
{
Map<String,String> map= wmsSaleOrderInfoService.selectTotalOrderAmount();
return success();
}
}

View File

@ -3,6 +3,7 @@ package com.god.wmsSaleOrder.mapper;
import java.util.List;
import com.god.wmsSaleOrder.domain.WmsSaleOrderInfo;
import com.god.wmsSaleOrder.domain.WmsSaleOrderDetail;
import java.util.Map;
/**
* 销售订单信息Mapper接口
@ -84,4 +85,6 @@ public interface WmsSaleOrderInfoMapper
* @return 结果
*/
public int deleteWmsSaleOrderDetailBySaleOrderId(String id);
Map<String, String> selectTotalOrderAmount();
}

View File

@ -2,6 +2,7 @@ package com.god.wmsSaleOrder.service;
import java.util.List;
import com.god.wmsSaleOrder.domain.WmsSaleOrderInfo;
import java.util.Map;
/**
* 销售订单信息Service接口
@ -58,4 +59,7 @@ public interface IWmsSaleOrderInfoService
* @return 结果
*/
public int deleteWmsSaleOrderInfoById(String id);
Map<String, String> selectTotalOrderAmount();
}

View File

@ -3,6 +3,7 @@ package com.god.wmsSaleOrder.service.impl;
import java.util.List;
import com.god.common.utils.DateUtils;
import com.god.common.utils.uuid.IdUtils;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
@ -108,6 +109,11 @@ public class WmsSaleOrderInfoServiceImpl implements IWmsSaleOrderInfoService
return wmsSaleOrderInfoMapper.deleteWmsSaleOrderInfoById(id);
}
@Override
public Map<String, String> selectTotalOrderAmount() {
return wmsSaleOrderInfoMapper.selectTotalOrderAmount();
}
/**
* 新增销售订单明细信息
*

View File

@ -204,4 +204,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
( #{item.id}, #{item.saleOrderId}, #{item.productNum}, #{item.productName}, #{item.productFormat}, #{item.productUnit}, #{item.goodsNum}, #{item.unitPrice}, #{item.totalPriceVal}, #{item.taxRate}, #{item.taxUnitPrice}, #{item.taxPriceVal}, #{item.taxPaid}, #{item.remark}, #{item.isdeleted}, #{item.sourceSys}, #{item.interfaceType})
</foreach>
</insert>
<select id="selectTotalOrderAmount" resultType="map">
SELECT
sum( total_price_val ) sum
FROM
wms_sale_order_info
WHERE
interface_type = 'WmsSaleOrder'
</select>
</mapper>