feat:首页,销售订单接口
This commit is contained in:
parent
11bd4172d6
commit
2129462398
@ -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;
|
||||
@ -23,7 +24,7 @@ import com.god.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 销售订单信息Controller
|
||||
*
|
||||
*
|
||||
* @author god
|
||||
* @date 2023-12-06
|
||||
*/
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
|
@ -3,18 +3,19 @@ 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接口
|
||||
*
|
||||
*
|
||||
* @author god
|
||||
* @date 2023-12-06
|
||||
*/
|
||||
public interface WmsSaleOrderInfoMapper
|
||||
public interface WmsSaleOrderInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询销售订单信息
|
||||
*
|
||||
*
|
||||
* @param id 销售订单信息主键
|
||||
* @return 销售订单信息
|
||||
*/
|
||||
@ -22,7 +23,7 @@ public interface WmsSaleOrderInfoMapper
|
||||
|
||||
/**
|
||||
* 查询销售订单信息列表
|
||||
*
|
||||
*
|
||||
* @param wmsSaleOrderInfo 销售订单信息
|
||||
* @return 销售订单信息集合
|
||||
*/
|
||||
@ -30,7 +31,7 @@ public interface WmsSaleOrderInfoMapper
|
||||
|
||||
/**
|
||||
* 新增销售订单信息
|
||||
*
|
||||
*
|
||||
* @param wmsSaleOrderInfo 销售订单信息
|
||||
* @return 结果
|
||||
*/
|
||||
@ -38,7 +39,7 @@ public interface WmsSaleOrderInfoMapper
|
||||
|
||||
/**
|
||||
* 修改销售订单信息
|
||||
*
|
||||
*
|
||||
* @param wmsSaleOrderInfo 销售订单信息
|
||||
* @return 结果
|
||||
*/
|
||||
@ -46,7 +47,7 @@ public interface WmsSaleOrderInfoMapper
|
||||
|
||||
/**
|
||||
* 删除销售订单信息
|
||||
*
|
||||
*
|
||||
* @param id 销售订单信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@ -54,7 +55,7 @@ public interface WmsSaleOrderInfoMapper
|
||||
|
||||
/**
|
||||
* 批量删除销售订单信息
|
||||
*
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
@ -62,26 +63,28 @@ public interface WmsSaleOrderInfoMapper
|
||||
|
||||
/**
|
||||
* 批量删除销售订单明细
|
||||
*
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWmsSaleOrderDetailBySaleOrderIds(String[] ids);
|
||||
|
||||
|
||||
/**
|
||||
* 批量新增销售订单明细
|
||||
*
|
||||
*
|
||||
* @param wmsSaleOrderDetailList 销售订单明细列表
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchWmsSaleOrderDetail(List<WmsSaleOrderDetail> wmsSaleOrderDetailList);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 通过销售订单信息主键删除销售订单明细信息
|
||||
*
|
||||
*
|
||||
* @param id 销售订单信息ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWmsSaleOrderDetailBySaleOrderId(String id);
|
||||
|
||||
Map<String, String> selectTotalOrderAmount();
|
||||
}
|
||||
|
@ -2,18 +2,19 @@ package com.god.wmsSaleOrder.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.god.wmsSaleOrder.domain.WmsSaleOrderInfo;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 销售订单信息Service接口
|
||||
*
|
||||
*
|
||||
* @author god
|
||||
* @date 2023-12-06
|
||||
*/
|
||||
public interface IWmsSaleOrderInfoService
|
||||
public interface IWmsSaleOrderInfoService
|
||||
{
|
||||
/**
|
||||
* 查询销售订单信息
|
||||
*
|
||||
*
|
||||
* @param id 销售订单信息主键
|
||||
* @return 销售订单信息
|
||||
*/
|
||||
@ -21,7 +22,7 @@ public interface IWmsSaleOrderInfoService
|
||||
|
||||
/**
|
||||
* 查询销售订单信息列表
|
||||
*
|
||||
*
|
||||
* @param wmsSaleOrderInfo 销售订单信息
|
||||
* @return 销售订单信息集合
|
||||
*/
|
||||
@ -29,7 +30,7 @@ public interface IWmsSaleOrderInfoService
|
||||
|
||||
/**
|
||||
* 新增销售订单信息
|
||||
*
|
||||
*
|
||||
* @param wmsSaleOrderInfo 销售订单信息
|
||||
* @return 结果
|
||||
*/
|
||||
@ -37,7 +38,7 @@ public interface IWmsSaleOrderInfoService
|
||||
|
||||
/**
|
||||
* 修改销售订单信息
|
||||
*
|
||||
*
|
||||
* @param wmsSaleOrderInfo 销售订单信息
|
||||
* @return 结果
|
||||
*/
|
||||
@ -45,7 +46,7 @@ public interface IWmsSaleOrderInfoService
|
||||
|
||||
/**
|
||||
* 批量删除销售订单信息
|
||||
*
|
||||
*
|
||||
* @param ids 需要删除的销售订单信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
@ -53,9 +54,12 @@ public interface IWmsSaleOrderInfoService
|
||||
|
||||
/**
|
||||
* 删除销售订单信息信息
|
||||
*
|
||||
*
|
||||
* @param id 销售订单信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWmsSaleOrderInfoById(String id);
|
||||
|
||||
Map<String, String> selectTotalOrderAmount();
|
||||
|
||||
}
|
||||
|
@ -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;
|
||||
@ -15,19 +16,19 @@ import com.god.wmsSaleOrder.service.IWmsSaleOrderInfoService;
|
||||
|
||||
/**
|
||||
* 销售订单信息Service业务层处理
|
||||
*
|
||||
*
|
||||
* @author god
|
||||
* @date 2023-12-06
|
||||
*/
|
||||
@Service
|
||||
public class WmsSaleOrderInfoServiceImpl implements IWmsSaleOrderInfoService
|
||||
public class WmsSaleOrderInfoServiceImpl implements IWmsSaleOrderInfoService
|
||||
{
|
||||
@Autowired
|
||||
private WmsSaleOrderInfoMapper wmsSaleOrderInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询销售订单信息
|
||||
*
|
||||
*
|
||||
* @param id 销售订单信息主键
|
||||
* @return 销售订单信息
|
||||
*/
|
||||
@ -39,7 +40,7 @@ public class WmsSaleOrderInfoServiceImpl implements IWmsSaleOrderInfoService
|
||||
|
||||
/**
|
||||
* 查询销售订单信息列表
|
||||
*
|
||||
*
|
||||
* @param wmsSaleOrderInfo 销售订单信息
|
||||
* @return 销售订单信息
|
||||
*/
|
||||
@ -51,7 +52,7 @@ public class WmsSaleOrderInfoServiceImpl implements IWmsSaleOrderInfoService
|
||||
|
||||
/**
|
||||
* 新增销售订单信息
|
||||
*
|
||||
*
|
||||
* @param wmsSaleOrderInfo 销售订单信息
|
||||
* @return 结果
|
||||
*/
|
||||
@ -67,7 +68,7 @@ public class WmsSaleOrderInfoServiceImpl implements IWmsSaleOrderInfoService
|
||||
|
||||
/**
|
||||
* 修改销售订单信息
|
||||
*
|
||||
*
|
||||
* @param wmsSaleOrderInfo 销售订单信息
|
||||
* @return 结果
|
||||
*/
|
||||
@ -82,7 +83,7 @@ public class WmsSaleOrderInfoServiceImpl implements IWmsSaleOrderInfoService
|
||||
|
||||
/**
|
||||
* 批量删除销售订单信息
|
||||
*
|
||||
*
|
||||
* @param ids 需要删除的销售订单信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@ -96,7 +97,7 @@ public class WmsSaleOrderInfoServiceImpl implements IWmsSaleOrderInfoService
|
||||
|
||||
/**
|
||||
* 删除销售订单信息信息
|
||||
*
|
||||
*
|
||||
* @param id 销售订单信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@ -108,9 +109,14 @@ public class WmsSaleOrderInfoServiceImpl implements IWmsSaleOrderInfoService
|
||||
return wmsSaleOrderInfoMapper.deleteWmsSaleOrderInfoById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> selectTotalOrderAmount() {
|
||||
return wmsSaleOrderInfoMapper.selectTotalOrderAmount();
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增销售订单明细信息
|
||||
*
|
||||
*
|
||||
* @param wmsSaleOrderInfo 销售订单信息对象
|
||||
*/
|
||||
public void insertWmsSaleOrderDetail(WmsSaleOrderInfo wmsSaleOrderInfo)
|
||||
|
@ -3,7 +3,7 @@
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.god.wmsSaleOrder.mapper.WmsSaleOrderInfoMapper">
|
||||
|
||||
|
||||
<resultMap type="WmsSaleOrderInfo" id="WmsSaleOrderInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="orderCode" column="order_code" />
|
||||
@ -60,7 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<select id="selectWmsSaleOrderInfoList" parameterType="WmsSaleOrderInfo" resultMap="WmsSaleOrderInfoResult">
|
||||
<include refid="selectWmsSaleOrderInfoVo"/>
|
||||
<where>
|
||||
<where>
|
||||
<if test="orderCode != null and orderCode != ''"> and order_code = #{orderCode}</if>
|
||||
<if test="orderDate != null and orderDate != ''"> and order_date = #{orderDate}</if>
|
||||
<if test="productType != null and productType != ''"> and product_type = #{productType}</if>
|
||||
@ -84,7 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</where>
|
||||
order by order_date desc
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectWmsSaleOrderInfoById" parameterType="String" resultMap="WmsSaleOrderInfoWmsSaleOrderDetailResult">
|
||||
select a.id, a.order_code, a.order_date, a.product_type, a.handled_org, a.handled_by, a.order_status, a.customer_num, a.customer_name, a.credit_code, a.regist_addr, a.contact_person, a.contact_phone, a.account_name, a.account_bank, a.account_number, a.tax_price_val, a.total_price_val, a.tax_val, a.remark, a.create_time, a.source_sys, a.interface_type,
|
||||
b.id as sub_id, b.sale_order_id as sub_sale_order_id, b.product_num as sub_product_num, b.product_name as sub_product_name, b.product_format as sub_product_format, b.product_unit as sub_product_unit, b.goods_num as sub_goods_num, b.unit_price as sub_unit_price, b.total_price_val as sub_total_price_val, b.tax_rate as sub_tax_rate, b.tax_unit_price as sub_tax_unit_price, b.tax_price_val as sub_tax_price_val, b.tax_paid as sub_tax_paid, b.remark as sub_remark, b.isdeleted as sub_isdeleted, b.source_sys as sub_source_sys, b.interface_type as sub_interface_type
|
||||
@ -92,7 +92,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
left join wms_sale_order_detail b on b.sale_order_id = a.id
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertWmsSaleOrderInfo" parameterType="WmsSaleOrderInfo">
|
||||
insert into wms_sale_order_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
@ -181,14 +181,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</delete>
|
||||
|
||||
<delete id="deleteWmsSaleOrderInfoByIds" parameterType="String">
|
||||
delete from wms_sale_order_info where id in
|
||||
delete from wms_sale_order_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
<delete id="deleteWmsSaleOrderDetailBySaleOrderIds" parameterType="String">
|
||||
delete from wms_sale_order_detail where sale_order_id in
|
||||
delete from wms_sale_order_detail where sale_order_id in
|
||||
<foreach item="saleOrderId" collection="array" open="(" separator="," close=")">
|
||||
#{saleOrderId}
|
||||
</foreach>
|
||||
@ -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>
|
||||
</mapper>
|
||||
<select id="selectTotalOrderAmount" resultType="map">
|
||||
SELECT
|
||||
sum( total_price_val ) sum
|
||||
FROM
|
||||
wms_sale_order_info
|
||||
WHERE
|
||||
interface_type = 'WmsSaleOrder'
|
||||
</select>
|
||||
</mapper>
|
||||
|
Loading…
Reference in New Issue
Block a user