123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406 |
- package com.fjhx.contract.mapper;
- import com.alibaba.fastjson.JSONObject;
- import com.fjhx.contract.entity.Contract;
- import org.apache.ibatis.annotations.Param;
- import org.springblade.core.mp.mapper.BladeMapper;
- import org.springblade.core.tenant.annotation.TenantIgnore;
- import org.springframework.stereotype.Repository;
- import java.util.List;
- import java.util.Map;
- /**
- * 外销合同
- */
- @Repository
- public interface ContractMapper extends BladeMapper<Contract> {
- /**
- * 列表
- *
- * @param condition
- * @return
- */
- @TenantIgnore
- List<Contract> getList(Map<String, Object> condition);
- /**
- * 列表-总条数
- *
- * @param condition
- * @return
- */
- @TenantIgnore
- Integer getListCount(Map<String, Object> condition);
- /**
- * 修改合同状态(合同状态如果走到后面不允许回滚)
- *
- * @param ids
- * @param status
- * @param updateUser
- * @return
- */
- int updateStatusById(@Param("ids") List<String> ids,
- @Param("status") Integer status,
- @Param("updateUser") String updateUser);
- /**
- * 根据合同号获取下一个版本号
- *
- * @param code
- * @return
- */
- Integer getNextVersionByCode(@Param("code") String code);
- /**
- * 客户画像:销售分析列表
- *
- * @param condition 查询条件
- * @return
- */
- List<Contract> getSalesAnalysisList(Map<String, Object> condition);
- /**
- * 客户画像:销售分析列表总数
- *
- * @param condition 查询条件
- * @return
- */
- Integer getSalesAnalysisListCount(Map<String, Object> condition);
- /**
- * 客户画像:销售分析下拉合同列表
- *
- * @param tenantId customerId 查询条件
- * @return
- */
- List<Contract> getContractSelect(@Param("tenantId") String tenantId,
- @Param("customerId") String customerId);
- /**
- * 通过客户id查询列表
- *
- * @param condition
- * @return
- */
- @TenantIgnore
- List<Contract> getByCustomerId(Map<String, Object> condition);
- /**
- * 统计--柱状图
- *
- * @param tenantId 租户ID
- * @param customerId 客户ID
- * @param contractStartStr 开始时间
- * @param contractEndStr 结束时间
- * @return
- */
- @TenantIgnore
- List<Contract> getByCustomerIdAndDWM(@Param("tenantId") String tenantId,
- @Param("customerId") String customerId,
- @Param("contractStartStr") String contractStartStr,
- @Param("contractEndStr") String contractEndStr
- );
- /**
- * 统计--销售额和订单数
- *
- * @param tenantId 租户ID
- * @param customerId 客户ID
- * @param contractStartStr 开始时间
- * @param contractEndStr 结束时间
- * @return
- */
- @TenantIgnore
- List<Contract> getByCustomerIdSumDWM(@Param("tenantId") String tenantId,
- @Param("customerId") String customerId,
- @Param("contractStartStr") String contractStartStr,
- @Param("contractEndStr") String contractEndStr,
- @Param("type") Integer type
- );
- /**
- * 统计-单天订单总数和销售额
- *
- * @param tenantId 租户ID
- * @param customerId 客户ID
- * @param contractStartStr 开始时间
- * @param contractEndStr 结束时间
- * @return
- */
- @TenantIgnore
- List<Contract> getByCustomerIdSumDayDWM(@Param("tenantId") String tenantId,
- @Param("customerId") String customerId,
- @Param("contractStartStr") String contractStartStr,
- @Param("contractEndStr") String contractEndStr,
- @Param("type") Integer type
- );
- /**
- * 客户画像--样品单-外销合同列表查询
- *
- * @param condition
- * @return
- */
- @TenantIgnore
- List<Contract> getHuaXList(Map<String, Object> condition);
- /**
- * 客户画像--样品单-外销合同列表查询-总条数
- *
- * @param condition
- * @return
- */
- @TenantIgnore
- Integer getHuaXListCount(Map<String, Object> condition);
- /**
- * 领导看板--统计全球-获取经纬度坐标
- *
- * @param condition
- * @return
- */
- @TenantIgnore
- List<Contract> getContractGlobal(Map<String, Object> condition);
- /**
- * 领导看板--统计国家
- *
- * @param condition
- * @return
- */
- @TenantIgnore
- List<Contract> getContractCountry(Map<String, Object> condition);
- /**
- * 领导看板--统计客户
- *
- * @param condition
- * @return
- */
- @TenantIgnore
- List<Contract> getContractCustomer(Map<String, Object> condition);
- /**
- * 领导看板--统计业务员
- *
- * @param condition
- * @return
- */
- @TenantIgnore
- List<Contract> getContractUser(Map<String, Object> condition);
- /**
- * 领导看板--统计产品
- *
- * @param condition
- * @return
- */
- @TenantIgnore
- List<Contract> getContractProductPrice(Map<String, Object> condition);
- /**
- * 领导看板--统计产品数量
- *
- * @param condition
- * @return
- */
- @TenantIgnore
- List<Contract> getContractProductOrder(Map<String, Object> condition);
- /**
- * 领导看板--订单分析-订单增长
- *
- * @param tenantId 租户ID
- * @param contractStartStr 开始时间
- * @param contractEndStr 结束时间
- * @return
- */
- @TenantIgnore
- List<Contract> getSumBoardDayYMD(@Param("tenantId") String tenantId,
- @Param("customerId") String customerId,
- @Param("contractStartStr") String contractStartStr,
- @Param("contractEndStr") String contractEndStr,
- @Param("type") Integer type
- );
- /**
- * 领导看板--订单分析-统计总订单量-销售额
- *
- * @param tenantId 租户ID
- * @param contractStartStr 开始时间
- * @param contractEndStr 结束时间
- * @return
- */
- @TenantIgnore
- List<Contract> getSumBoardOrder(@Param("tenantId") String tenantId,
- @Param("contractStartStr") String contractStartStr,
- @Param("contractEndStr") String contractEndStr,
- @Param("type") Integer type
- );
- /**
- * 领导看板--订单分析-订单增长
- *
- * @param tenantId 租户ID
- * @param contractStartStr 开始时间
- * @param contractEndStr 结束时间
- * @return
- */
- @TenantIgnore
- List<Contract> getSumBoardStatusDayYMD(@Param("tenantId") String tenantId,
- @Param("contractStartStr") String contractStartStr,
- @Param("contractEndStr") String contractEndStr,
- @Param("type") Integer type
- );
- /**
- * 移交
- *
- * @param tenantId 租户id
- * @param customerId 客户id,要移交的客户
- * @param userId 业务员id,移交给新的业务员id
- */
- void transfer(@Param("tenantId") String tenantId,
- @Param("customerId") String customerId,
- @Param("userId") String userId);
- /**
- * 查询总条数
- */
- @TenantIgnore
- List<Contract> getSumContractByYMD(Map<String, Object> condition);
- /**
- * 查询金额
- */
- @TenantIgnore
- Double getSumContractPriceByYMD(Map<String, Object> condition);
- /**
- * 统计总销售额
- */
- @TenantIgnore
- String getContractSumPrice(Map<String, Object> condition);
- /**
- * 统计下单客户数
- */
- @TenantIgnore
- Integer getContractSumCustomer(Map<String, Object> condition);
- /**
- * 统计订单数
- */
- @TenantIgnore
- String getContractSumOrder(Map<String, Object> condition);
- /**
- * 查询总条数
- */
- @TenantIgnore
- List<Contract> getDailyContract(@Param("tenantId") String tenantId,
- @Param("dataType") Integer dataType,
- @Param("createUser") String createUser);
- /**
- * 查询总条数
- */
- @TenantIgnore
- Integer getDailyContractCount(@Param("tenantId") String tenantId,
- @Param("dataType") Integer dataType,
- @Param("createUser") String createUser);
- /**
- * 查询总条数
- */
- @TenantIgnore
- Integer getUserDailyContractCount(Map<String, Object> condition);
- /**
- * 总览-订单跟踪-统计总额
- */
- @TenantIgnore
- List<Contract> getOrderTailAfterSum(@Param("tenantId") String tenantId,
- @Param("userId") String userId);
- /**
- * 总览-订单跟踪-统计总额
- */
- @TenantIgnore
- List<Contract> getOrderTailAfterSumStaus(@Param("tenantId") String tenantId,
- @Param("userId") String userId);
- /**
- * 根据用户ID查询
- *
- * @param userIds 业务员ID集合
- * @param year 年度
- * @param dataType 数据类型
- * @return
- */
- @TenantIgnore
- List<Contract> getByUserIds(@Param("userIds") List<String> userIds, @Param("year") String year, @Param("dataType") int dataType);
- /**
- * 根据用户ID查询
- *
- * @param userIds 业务员ID集合
- * @param year 年度
- * @param dataType 数据类型
- * @return
- */
- @TenantIgnore
- List<Contract> getByUserIdsJoin(@Param("userIds") List<String> userIds, @Param("year") String year, @Param("dataType") int dataType);
- /**
- * 根据子编号前缀代码统计
- *
- * @param prefixCode 子编号前缀代码
- * @param countryId 国家ID
- * @param customerId 客户ID
- * @param productId 产品ID
- * @param tenantId 租户ID
- * @param userId 用户ID
- * @param dataType 数据类型:0、外销合同;1、样品单
- * @return
- */
- @TenantIgnore
- Integer getCount(
- @Param("prefixCode") int prefixCode,
- @Param("countryId") String countryId,
- @Param("customerId") String customerId,
- @Param("productId") String productId,
- @Param("tenantId") String tenantId,
- @Param("userId") String userId,
- @Param("dataType") int dataType
- );
- /**
- * 查询销售信息
- *
- * @param condition 查询条件
- * @return
- */
- @TenantIgnore
- List<JSONObject> getOrderSale(Map<String, Object> condition);
- /**
- * 查询销售合同ID
- *
- * @param condition 查询条件
- * @return
- */
- @TenantIgnore
- List<Contract> getContractIds(Map<String, Object> condition);
- }
|