|
@@ -322,8 +322,8 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract>
|
|
if (StringUtils.isNotEmpty(dto.getSellCorporationId())) {
|
|
if (StringUtils.isNotEmpty(dto.getSellCorporationId())) {
|
|
wrapper.eq("t1", Contract::getSellCorporationId, dto.getSellCorporationId());
|
|
wrapper.eq("t1", Contract::getSellCorporationId, dto.getSellCorporationId());
|
|
}
|
|
}
|
|
- if(StringUtils.isNotEmpty(dto.getIsClaim())){
|
|
|
|
- wrapper.ne("t1.refundStatusNew",20);
|
|
|
|
|
|
+ if (StringUtils.isNotEmpty(dto.getIsClaim())) {
|
|
|
|
+ wrapper.ne("t1.refundStatusNew", 20);
|
|
}
|
|
}
|
|
if (StringUtils.isNotEmpty(dto.getRefundStatusNew())) {
|
|
if (StringUtils.isNotEmpty(dto.getRefundStatusNew())) {
|
|
wrapper.in("t1.refundStatusNew", Arrays.asList(dto.getRefundStatusNew().split(",")));
|
|
wrapper.in("t1.refundStatusNew", Arrays.asList(dto.getRefundStatusNew().split(",")));
|
|
@@ -707,6 +707,17 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract>
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
|
+ public void cancels(ContractDto contractDto) {
|
|
|
|
+ Assert.notEmpty(contractDto.getId(), "合同id不能为空");
|
|
|
|
+ contractService.update(q -> q
|
|
|
|
+ .eq(Contract::getId, contractDto.getId())
|
|
|
|
+ .set(Contract::getStatus, FlowStatusEnum1.CANCELLATION.getKey())
|
|
|
|
+ .set(BasePo::getUpdateTime, new Date())
|
|
|
|
+ .set(BasePo::getUpdateUser, SecurityUtils.getUserId())
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
public void delete(Long id) {
|
|
public void delete(Long id) {
|
|
this.removeById(id);
|
|
this.removeById(id);
|
|
}
|
|
}
|
|
@@ -853,25 +864,25 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract>
|
|
@Override
|
|
@Override
|
|
public Map<String, Object> salesStatistics(ContractDto dto) {
|
|
public Map<String, Object> salesStatistics(ContractDto dto) {
|
|
List<Long> authIdList = customerService.getAuthIdList();
|
|
List<Long> authIdList = customerService.getAuthIdList();
|
|
- if(CollectionUtils.isEmpty(authIdList)){
|
|
|
|
|
|
+ if (CollectionUtils.isEmpty(authIdList)) {
|
|
return new HashMap<>();
|
|
return new HashMap<>();
|
|
}
|
|
}
|
|
|
|
|
|
//添加查询条件
|
|
//添加查询条件
|
|
QueryWrapper<Contract> query = Wrappers.<Contract>query();
|
|
QueryWrapper<Contract> query = Wrappers.<Contract>query();
|
|
- selectTime(query, dto,authIdList);
|
|
|
|
|
|
+ selectTime(query, dto, authIdList);
|
|
query.select("sum(amount*rate) amount");
|
|
query.select("sum(amount*rate) amount");
|
|
//查询销售额
|
|
//查询销售额
|
|
Contract contract = baseMapper.selectOne(query);
|
|
Contract contract = baseMapper.selectOne(query);
|
|
query.clear();
|
|
query.clear();
|
|
//查询订单数
|
|
//查询订单数
|
|
- selectTime(query, dto,authIdList);
|
|
|
|
|
|
+ selectTime(query, dto, authIdList);
|
|
|
|
|
|
Long count = baseMapper.selectCount(query);
|
|
Long count = baseMapper.selectCount(query);
|
|
|
|
|
|
//查询下单的客户人数
|
|
//查询下单的客户人数
|
|
query.clear();
|
|
query.clear();
|
|
- selectTime(query, dto,authIdList);
|
|
|
|
|
|
+ selectTime(query, dto, authIdList);
|
|
query.select("count(DISTINCT(buy_corporation_id)) count");
|
|
query.select("count(DISTINCT(buy_corporation_id)) count");
|
|
Contract contract1 = baseMapper.selectOne(query);
|
|
Contract contract1 = baseMapper.selectOne(query);
|
|
|
|
|
|
@@ -1468,7 +1479,7 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract>
|
|
}
|
|
}
|
|
|
|
|
|
// 添加时间的查询条件
|
|
// 添加时间的查询条件
|
|
- private void selectTime(QueryWrapper<Contract> query, ContractDto dto,List<Long> authIdList) {
|
|
|
|
|
|
+ private void selectTime(QueryWrapper<Contract> query, ContractDto dto, List<Long> authIdList) {
|
|
query.in("buy_corporation_id", authIdList);
|
|
query.in("buy_corporation_id", authIdList);
|
|
query.eq("is_change", "0");//列表只展示未变更得数据
|
|
query.eq("is_change", "0");//列表只展示未变更得数据
|
|
query.ne("is_show", 1);
|
|
query.ne("is_show", 1);
|