|
|
@@ -8,7 +8,14 @@ import com.google.common.collect.Lists;
|
|
|
import com.google.common.collect.Maps;
|
|
|
import com.poteviohealth.cgp.common.filter.TokenContext;
|
|
|
import com.poteviohealth.cgp.common.integrated.ListParams;
|
|
|
-import com.poteviohealth.cgp.common.integrated.customer.model.*;
|
|
|
+import com.poteviohealth.cgp.common.integrated.customer.model.CustomerServiceParams;
|
|
|
+import com.poteviohealth.cgp.common.integrated.customer.model.CustomerSubsidyDTO;
|
|
|
+import com.poteviohealth.cgp.common.integrated.customer.model.SubsidyCustomerFace;
|
|
|
+import com.poteviohealth.cgp.common.integrated.customer.model.SubsidyCustomerJsonFace;
|
|
|
+import com.poteviohealth.cgp.common.integrated.finance.model.MemberListData;
|
|
|
+import com.poteviohealth.cgp.common.integrated.finance.model.MemberPlanDTO;
|
|
|
+import com.poteviohealth.cgp.common.integrated.finance.model.MemberPlanPageDTO;
|
|
|
+import com.poteviohealth.cgp.common.integrated.finance.model.MonthData;
|
|
|
import com.poteviohealth.cgp.common.integrated.finance.model.*;
|
|
|
import com.poteviohealth.cgp.common.integrated.order.model.OrderStatisticsData;
|
|
|
import com.poteviohealth.cgp.common.integrated.order.model.PayAccount;
|
|
|
@@ -20,6 +27,10 @@ import com.poteviohealth.cgp.statistics.constant.enums.OrderConstantEnum;
|
|
|
import com.poteviohealth.cgp.statistics.mapper.OrderMapper;
|
|
|
import com.poteviohealth.cgp.statistics.model.Order;
|
|
|
import com.poteviohealth.cgp.statistics.model.WatermarkImg;
|
|
|
+import com.poteviohealth.cgp.statistics.model.indto.DishesOrderWebInDTO;
|
|
|
+import com.poteviohealth.cgp.statistics.model.indto.OrderCostWebInDTO;
|
|
|
+import com.poteviohealth.cgp.statistics.model.indto.OrderServiceWebInDTO;
|
|
|
+import com.poteviohealth.cgp.statistics.model.indto.OrderWebInDTO;
|
|
|
import com.poteviohealth.cgp.statistics.model.indto.*;
|
|
|
import com.poteviohealth.cgp.statistics.model.outdto.*;
|
|
|
import com.poteviohealth.cgp.statistics.service.IOrderService;
|
|
|
@@ -74,20 +85,20 @@ public class OrderServiceImpl extends BaseServiceImpl<OrderMapper, Order> implem
|
|
|
order.setTreePath(areaDTO.getTreePath());
|
|
|
order.setSourceLevel(areaDTO.getLevel());
|
|
|
Integer size = 0;
|
|
|
- switch (order.getSourceLevel()){
|
|
|
- case 1:
|
|
|
- size =4;
|
|
|
- break;
|
|
|
- case 2:
|
|
|
- size =6;
|
|
|
- break;
|
|
|
- case 3:
|
|
|
- size =9;
|
|
|
- break;
|
|
|
- }
|
|
|
- if(StringUtils.isNotEmpty(areaDTO.getRegionAreaCode())){
|
|
|
- order.setRegionAreaCode(areaDTO.getRegionAreaCode().substring(0,size));
|
|
|
- }
|
|
|
+ switch (order.getSourceLevel()){
|
|
|
+ case 1:
|
|
|
+ size =4;
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ size =6;
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ size =9;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotEmpty(areaDTO.getRegionAreaCode())){
|
|
|
+ order.setRegionAreaCode(areaDTO.getRegionAreaCode().substring(0,size));
|
|
|
+ }
|
|
|
|
|
|
newOrderList.add(order);
|
|
|
}
|
|
|
@@ -157,58 +168,58 @@ public class OrderServiceImpl extends BaseServiceImpl<OrderMapper, Order> implem
|
|
|
@Override
|
|
|
public List<OrderExcelDTO> orderExcel(OrderServiceWebInDTO dto) {
|
|
|
try {
|
|
|
- Integer operatorId = TokenContext.cureOperatorId();
|
|
|
- QueryWrapper queryWrapper = orderServiceQuery(dto, "o.");
|
|
|
- int count;
|
|
|
- if (null != dto.getProductIds()) {
|
|
|
- queryWrapper.eq("od.product_id", dto.getProductIds());
|
|
|
- count = baseMapper.orderPageListAllSize(queryWrapper,dbName,operatorId);
|
|
|
- }else{
|
|
|
- QueryWrapper<Order> queryWrapper2 = orderServiceQuery(dto, "o.");
|
|
|
- count = baseMapper.orderPageListSize(queryWrapper2,dbName,operatorId);
|
|
|
- }
|
|
|
- //每页10000条,计算总页数
|
|
|
- int maxPage = (int) Math.ceil(count/10000.0);
|
|
|
- int start = 0;
|
|
|
- LinkedList<OrderExcelDTO> list = Lists.newLinkedList();
|
|
|
- for (int i = 0; i < maxPage; i++) {
|
|
|
- LinkedList<OrderExcelDTO> findList = baseMapper.orderExcel(queryWrapper,dbName,operatorId,start);
|
|
|
- start = findList.getLast().getId();
|
|
|
- list.addAll(findList);
|
|
|
- }
|
|
|
+ Integer operatorId = TokenContext.cureOperatorId();
|
|
|
+ QueryWrapper queryWrapper = orderServiceQuery(dto, "o.");
|
|
|
+ int count;
|
|
|
+ if (null != dto.getProductIds()) {
|
|
|
+ queryWrapper.eq("od.product_id", dto.getProductIds());
|
|
|
+ count = baseMapper.orderPageListAllSize(queryWrapper,dbName,operatorId);
|
|
|
+ }else{
|
|
|
+ QueryWrapper<Order> queryWrapper2 = orderServiceQuery(dto, "o.");
|
|
|
+ count = baseMapper.orderPageListSize(queryWrapper2,dbName,operatorId);
|
|
|
+ }
|
|
|
+ //每页10000条,计算总页数
|
|
|
+ int maxPage = (int) Math.ceil(count/10000.0);
|
|
|
+ int start = 0;
|
|
|
+ LinkedList<OrderExcelDTO> list = Lists.newLinkedList();
|
|
|
+ for (int i = 0; i < maxPage; i++) {
|
|
|
+ LinkedList<OrderExcelDTO> findList = baseMapper.orderExcel(queryWrapper,dbName,operatorId,start);
|
|
|
+ start = findList.getLast().getId();
|
|
|
+ list.addAll(findList);
|
|
|
+ }
|
|
|
|
|
|
- for (OrderExcelDTO orderExcelDTO : list) {
|
|
|
- for (OrderConstantEnum.OrderStatus status : EnumUtils.getEnumList(OrderConstantEnum.OrderStatus.class)) {
|
|
|
- if (status.getCode().toString().equals(orderExcelDTO.getOrderStatus())) {
|
|
|
- orderExcelDTO.setOrderStatus(status.getDisplay());
|
|
|
- break;
|
|
|
+ for (OrderExcelDTO orderExcelDTO : list) {
|
|
|
+ for (OrderConstantEnum.OrderStatus status : EnumUtils.getEnumList(OrderConstantEnum.OrderStatus.class)) {
|
|
|
+ if (status.getCode().toString().equals(orderExcelDTO.getOrderStatus())) {
|
|
|
+ orderExcelDTO.setOrderStatus(status.getDisplay());
|
|
|
+ break;
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- for (OrderConstantEnum.PayStyle status : EnumUtils.getEnumList(OrderConstantEnum.PayStyle.class)) {
|
|
|
- if (status.getCode().toString().equals(orderExcelDTO.getPayStyle())) {
|
|
|
- orderExcelDTO.setPayStyle(status.getDisplay());
|
|
|
- break;
|
|
|
+ for (OrderConstantEnum.PayStyle status : EnumUtils.getEnumList(OrderConstantEnum.PayStyle.class)) {
|
|
|
+ if (status.getCode().toString().equals(orderExcelDTO.getPayStyle())) {
|
|
|
+ orderExcelDTO.setPayStyle(status.getDisplay());
|
|
|
+ break;
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- for (OrderConstantEnum.PayStatus status : EnumUtils.getEnumList(OrderConstantEnum.PayStatus.class)) {
|
|
|
- if (status.getCode().toString().equals(orderExcelDTO.getPayStatus())) {
|
|
|
- orderExcelDTO.setPayStatus(status.getDisplay());
|
|
|
- break;
|
|
|
+ for (OrderConstantEnum.PayStatus status : EnumUtils.getEnumList(OrderConstantEnum.PayStatus.class)) {
|
|
|
+ if (status.getCode().toString().equals(orderExcelDTO.getPayStatus())) {
|
|
|
+ orderExcelDTO.setPayStatus(status.getDisplay());
|
|
|
+ break;
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- for (OrderConstantEnum.OrderStyle status : EnumUtils.getEnumList(OrderConstantEnum.OrderStyle.class)) {
|
|
|
- if (status.getCode().toString().equals(orderExcelDTO.getOrderStyle())) {
|
|
|
- orderExcelDTO.setOrderStyle(status.getDisplay());
|
|
|
- break;
|
|
|
+ for (OrderConstantEnum.OrderStyle status : EnumUtils.getEnumList(OrderConstantEnum.OrderStyle.class)) {
|
|
|
+ if (status.getCode().toString().equals(orderExcelDTO.getOrderStyle())) {
|
|
|
+ orderExcelDTO.setOrderStyle(status.getDisplay());
|
|
|
+ break;
|
|
|
+ }
|
|
|
}
|
|
|
+ orderExcelDTO.setPayAccount(getPayAccountString(orderExcelDTO.getPayAccount()));
|
|
|
+ orderExcelDTO.setStationOrGroupName(StringUtils.isNotEmpty(orderExcelDTO.getGroupLeaderName())?orderExcelDTO.getGroupLeaderName():orderExcelDTO.getServiceStationName());
|
|
|
}
|
|
|
- orderExcelDTO.setPayAccount(getPayAccountString(orderExcelDTO.getPayAccount()));
|
|
|
- orderExcelDTO.setStationOrGroupName(StringUtils.isNotEmpty(orderExcelDTO.getGroupLeaderName())?orderExcelDTO.getGroupLeaderName():orderExcelDTO.getServiceStationName());
|
|
|
- }
|
|
|
- //ForkJoinPool pool = new ForkJoinPool();
|
|
|
+ //ForkJoinPool pool = new ForkJoinPool();
|
|
|
|
|
|
/* OrderExcelTask task = new OrderExcelTask(1,maxPage,queryWrapper, operatorId, dbName,baseMapper);
|
|
|
Future<List<OrderExcelDTO>> future = pool.submit(task);
|
|
|
@@ -236,7 +247,7 @@ public class OrderServiceImpl extends BaseServiceImpl<OrderMapper, Order> implem
|
|
|
count = baseMapper.orderPageListAllSize(queryWrapper,dbName,operatorId);
|
|
|
}else{*/
|
|
|
int count = baseMapper.orderPageListSize(queryWrapper,dbName,operatorId);
|
|
|
- // }
|
|
|
+ // }
|
|
|
//每页10000条,计算总页数
|
|
|
int maxPage = (int) Math.ceil(count/10000.0);
|
|
|
int start = 0;
|
|
|
@@ -316,88 +327,6 @@ public class OrderServiceImpl extends BaseServiceImpl<OrderMapper, Order> implem
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @Override
|
|
|
- public List<GoldSendExcelDTO> excelGoldSendList(GoldSendPage vo) {
|
|
|
- try {
|
|
|
- QueryWrapper queryWrapper = getQueryWrapper(vo);
|
|
|
- int count = baseMapper.goldSendListSize(vo.getYearTime(),queryWrapper,dbName);
|
|
|
- //每页10000条,计算总页数
|
|
|
- int maxPage = (int) Math.ceil(count/10000.0);
|
|
|
- int start = 0;
|
|
|
- LinkedList<GoldSendExcelDTO> list = Lists.newLinkedList();
|
|
|
- for (int i = 0; i < maxPage; i++) {
|
|
|
- LinkedList<GoldSendExcelDTO> findList = baseMapper.goldSendList(vo.getYearTime(),queryWrapper,dbName,start);
|
|
|
- start = findList.getLast().getId();
|
|
|
- list.addAll(findList);
|
|
|
- }
|
|
|
- return list;
|
|
|
- }catch (Exception e){
|
|
|
- e.printStackTrace();
|
|
|
- throw new BuilderException("数据导出失败,请重新操作");
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- private QueryWrapper getQueryWrapper(GoldSendPage vo) {
|
|
|
- QueryWrapper queryWrapper = new QueryWrapper<>();
|
|
|
- queryWrapper.eq("d.operator_id", TokenContext.cureOperatorId());
|
|
|
- if(StringUtils.isNotEmpty(vo.getSendTime())){
|
|
|
- queryWrapper.eq("send_time", vo.getSendTime());
|
|
|
- }
|
|
|
- if(StringUtils.isNotEmpty(vo.getExpectTime())){
|
|
|
- queryWrapper.eq("expect_time", vo.getExpectTime());
|
|
|
- }
|
|
|
- if(StringUtils.isNotEmpty(vo.getIdNumber())){
|
|
|
- queryWrapper.eq("d.id_number", vo.getIdNumber());
|
|
|
- }
|
|
|
- if(StringUtils.isNotEmpty(vo.getName())){
|
|
|
- queryWrapper.eq("d.name", vo.getName());
|
|
|
- }
|
|
|
- if(vo.getGoldType() != null){
|
|
|
- queryWrapper.eq("d.gold_type", vo.getGoldType());
|
|
|
- }
|
|
|
- if(vo.getSendType() != null){
|
|
|
- queryWrapper.eq("d.send_type", vo.getSendType());
|
|
|
- }
|
|
|
- if(vo.getIsDelete() != null){
|
|
|
- queryWrapper.eq("d.is_delete", vo.getIsDelete());
|
|
|
- }
|
|
|
-
|
|
|
- if(vo.getCountryId() != null){
|
|
|
- queryWrapper.eq("d.country_id", vo.getCountryId());
|
|
|
- }
|
|
|
-
|
|
|
- if(vo.getStreetId() != null){
|
|
|
- queryWrapper.eq("d.street_id", vo.getStreetId());
|
|
|
- }
|
|
|
-
|
|
|
- if(vo.getCommunityId() != null){
|
|
|
- queryWrapper.eq("d.community_id", vo.getCommunityId());
|
|
|
- }
|
|
|
- return queryWrapper;
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public List<GoldSendBankExcelDTO> excelGoldSendBankList(GoldSendPage page) {
|
|
|
- try {
|
|
|
- QueryWrapper queryWrapper = getQueryWrapper(page);
|
|
|
- int count = baseMapper.goldSendListSize(page.getYearTime(),queryWrapper,dbName);
|
|
|
- //每页10000条,计算总页数
|
|
|
- int maxPage = (int) Math.ceil(count/10000.0);
|
|
|
- int start = 0;
|
|
|
- LinkedList<GoldSendBankExcelDTO> list = Lists.newLinkedList();
|
|
|
- for (int i = 0; i < maxPage; i++) {
|
|
|
- LinkedList<GoldSendBankExcelDTO> findList = baseMapper.goldSendBankList(page.getYearTime(),queryWrapper,dbName,start);
|
|
|
- start = findList.getLast().getId();
|
|
|
- list.addAll(findList);
|
|
|
- }
|
|
|
- return list;
|
|
|
- }catch (Exception e){
|
|
|
- e.printStackTrace();
|
|
|
- throw new BuilderException("数据导出失败,请重新操作");
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
private QueryWrapper cardQueryWrapper(MemberPlanPageDTO dto){
|
|
|
QueryWrapper<WatermarkImg> queryWrapper = new QueryWrapper();
|
|
|
queryWrapper.eq("d.operator_id",TokenContext.cureOperatorId());
|
|
|
@@ -462,12 +391,16 @@ public class OrderServiceImpl extends BaseServiceImpl<OrderMapper, Order> implem
|
|
|
String val = "";
|
|
|
for (String s : dto.getPayAccountStr().split(",")) {
|
|
|
if("1".equals(s)){
|
|
|
+ val+="助餐账户,";
|
|
|
val+="补贴,";
|
|
|
}else if("2".equals(s)){
|
|
|
+ val+="积分账户,";
|
|
|
val+="积分,";
|
|
|
}else if("3".equals(s)){
|
|
|
+ val+="储值账户,";
|
|
|
val+="账户,";
|
|
|
}else if("4".equals(s)){
|
|
|
+ val+="现金支付,";
|
|
|
val+="现金,";
|
|
|
}
|
|
|
}
|
|
|
@@ -583,7 +516,7 @@ public class OrderServiceImpl extends BaseServiceImpl<OrderMapper, Order> implem
|
|
|
if(orderWebInDTO.getCostStatus() != null){
|
|
|
orderQueryWrapper.eq( "o.cost_status",orderWebInDTO.getCostStatus());
|
|
|
}
|
|
|
- // orderQueryWrapper.orderByDesc("o.order_cost_id");
|
|
|
+ // orderQueryWrapper.orderByDesc("o.order_cost_id");
|
|
|
|
|
|
return orderQueryWrapper;
|
|
|
}
|
|
|
@@ -708,9 +641,6 @@ public class OrderServiceImpl extends BaseServiceImpl<OrderMapper, Order> implem
|
|
|
if (StringUtils.isNotEmpty(orderServiceWebInDTO.getSearchValueOrderCode())) {
|
|
|
orderQueryWrapper.eq(prefix + "sn", orderServiceWebInDTO.getSearchValueOrderCode());
|
|
|
}
|
|
|
- if (StringUtils.isNotBlank(orderServiceWebInDTO.getCards())) {
|
|
|
- orderQueryWrapper.like(prefix + "card_names", orderServiceWebInDTO.getCards());
|
|
|
- }
|
|
|
if (null != orderServiceWebInDTO.getOrderStatus()) {
|
|
|
if(orderServiceWebInDTO.getOrderStatus().equals(17)){
|
|
|
//已回访
|
|
|
@@ -738,38 +668,6 @@ public class OrderServiceImpl extends BaseServiceImpl<OrderMapper, Order> implem
|
|
|
if (StringUtils.isNotEmpty(orderServiceWebInDTO.getReviewReason())) {
|
|
|
orderQueryWrapper.likeRight(prefix + "review_reason",orderServiceWebInDTO.getReviewReason());
|
|
|
}
|
|
|
- if(orderServiceWebInDTO.getCountryId() != null){
|
|
|
- orderQueryWrapper.eq(prefix + "country_id", orderServiceWebInDTO.getCountryId());
|
|
|
- }
|
|
|
- if(orderServiceWebInDTO.getStreetId() != null){
|
|
|
- orderQueryWrapper.eq(prefix + "street_id", orderServiceWebInDTO.getStreetId());
|
|
|
- }
|
|
|
- if(orderServiceWebInDTO.getCommunityId() != null){
|
|
|
- orderQueryWrapper.eq(prefix + "community_id", orderServiceWebInDTO.getCommunityId());
|
|
|
- }
|
|
|
-
|
|
|
- if(orderServiceWebInDTO.getReviewStatus() != null){
|
|
|
-
|
|
|
- String roles = "";
|
|
|
- List<String> authList = TokenContext.cureWebUser().getAuthorities();
|
|
|
- if(authList.contains("10")){
|
|
|
- roles = "10";
|
|
|
- }else if(authList.contains("11")){
|
|
|
- roles = "11";
|
|
|
- }else if(authList.contains("12")){
|
|
|
- roles = "12";
|
|
|
- }
|
|
|
- if(!"".equals(roles)){
|
|
|
- if(orderServiceWebInDTO.getReviewStatus().equals(1)){
|
|
|
- orderQueryWrapper.like(prefix + "review_government_role", roles);
|
|
|
- }else{
|
|
|
- String val = roles;
|
|
|
- orderQueryWrapper.and(wr->wr.isNull(prefix + "review_government_role").or().notLike(prefix + "review_government_role",val));
|
|
|
- orderQueryWrapper.eq(prefix + "order_status", 6);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
if(orderServiceWebInDTO.getStationId() != null && orderServiceWebInDTO.getSource() != null){
|
|
|
switch (orderServiceWebInDTO.getSource()){
|
|
|
case 0:
|
|
|
@@ -1216,7 +1114,7 @@ public class OrderServiceImpl extends BaseServiceImpl<OrderMapper, Order> implem
|
|
|
}else if (order.getSourceLevel().equals(3) ){
|
|
|
sum = serviceCustomerList.stream().filter(s->s.getStreetId().equals(order.getAreaId()) && StringUtils.isNotEmpty(s.getCustomerTypeId()) && s.getCustomerTypeId().contains(","+face.getAreaId().toString()+",")).mapToLong(s->s.getCustomerNum()).sum();
|
|
|
}
|
|
|
- }
|
|
|
+ }
|
|
|
id.add(face.getAreaId().toString());
|
|
|
title.add(face.getTitle());
|
|
|
total.add(face.getTotal());
|
|
|
@@ -1354,13 +1252,6 @@ public class OrderServiceImpl extends BaseServiceImpl<OrderMapper, Order> implem
|
|
|
face.setGrantNum(grantSum);
|
|
|
Long exchangeSum = dataList.stream().filter(t -> t.getTransType().equals("1")).mapToLong(t -> t.getAmount()).sum();
|
|
|
face.setExchangeNum(exchangeSum);
|
|
|
-
|
|
|
- Long grantWmSum = dataList.stream().filter(t -> t.getTransType().equals("0") && t.getRemark().contains("文明积分")).mapToLong(t -> t.getAmount()).sum();
|
|
|
- face.setGrantNumWm(grantWmSum);
|
|
|
- Long grantYlSum = dataList.stream().filter(t -> t.getTransType().equals("0") && t.getRemark().contains("银龄积分")).mapToLong(t -> t.getAmount()).sum();
|
|
|
- face.setGrantNumYl(grantYlSum);
|
|
|
- Long exchangeWmSum = dataList.stream().filter(t -> t.getTransType().equals("1") && t.getRemark().contains("文明积分")).mapToLong(t -> t.getAmount()).sum();
|
|
|
- face.setExchangeNumWm(exchangeWmSum);
|
|
|
List<MonthData> goodsList = Lists.newArrayList();
|
|
|
Map<Integer, List<IntegralTrans>> maps = dataList.stream().filter(i -> i.getParentId() != null).collect(Collectors.groupingBy(IntegralTrans::getParentId));
|
|
|
for (Integer categoryId : maps.keySet()) {
|
|
|
@@ -1383,15 +1274,13 @@ public class OrderServiceImpl extends BaseServiceImpl<OrderMapper, Order> implem
|
|
|
if (!goodsList.isEmpty()) {
|
|
|
face.setPointGoodsData2(goodsList);
|
|
|
}
|
|
|
- face.setPointMonthData(addMonth(dataList, 0,""));
|
|
|
- face.setPointMonthDataWm(addMonth(dataList, 0,"文明积分"));
|
|
|
- face.setPointMonthDataYl(addMonth(dataList, 0,"银龄积分"));
|
|
|
- face.setPointCountData(addMonth(dataList, 1,""));
|
|
|
+ face.setPointMonthData(addMonth(dataList, 0));
|
|
|
+ face.setPointCountData(addMonth(dataList, 1));
|
|
|
returnList.add(face);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private List<MonthData> addMonth(List<IntegralTrans> transList,Integer type,String remark){
|
|
|
+ private List<MonthData> addMonth(List<IntegralTrans> transList,Integer type){
|
|
|
Date endDate = new Date();
|
|
|
Calendar calendar = Calendar.getInstance();
|
|
|
calendar.setTime(com.poteviohealth.cgp.common.utils.DateUtils.getLastDayOfMonth(endDate));
|
|
|
@@ -1414,14 +1303,10 @@ public class OrderServiceImpl extends BaseServiceImpl<OrderMapper, Order> implem
|
|
|
data.setAddValue(0L);
|
|
|
data.setUseValue(0L);
|
|
|
}else{
|
|
|
- if(StringUtils.isNotEmpty(remark)){
|
|
|
- data.setAddValue(transList.stream().filter(c->c.getBuildTime().after(calendar2.getTime()) && c.getBuildTime().before(com.poteviohealth.cgp.common.utils.DateUtils.getLastDayOfMonth(calendar2.getTime())) && c.getTransType().equals("0") && c.getRemark().contains(remark)).mapToLong(c->c.getAmount()).sum());
|
|
|
- data.setUseValue(transList.stream().filter(c->c.getBuildTime().after(calendar2.getTime()) && c.getBuildTime().before(com.poteviohealth.cgp.common.utils.DateUtils.getLastDayOfMonth(calendar2.getTime())) && c.getTransType().equals("1") && c.getRemark().contains(remark)).mapToLong(c->c.getAmount()).sum());
|
|
|
- }else{
|
|
|
- data.setAddValue(transList.stream().filter(c->c.getBuildTime().after(calendar2.getTime()) && c.getBuildTime().before(com.poteviohealth.cgp.common.utils.DateUtils.getLastDayOfMonth(calendar2.getTime())) && c.getTransType().equals("0")).mapToLong(c->c.getAmount()).sum());
|
|
|
- data.setUseValue(transList.stream().filter(c->c.getBuildTime().after(calendar2.getTime()) && c.getBuildTime().before(com.poteviohealth.cgp.common.utils.DateUtils.getLastDayOfMonth(calendar2.getTime())) && c.getTransType().equals("1")).mapToLong(c->c.getAmount()).sum());
|
|
|
- }
|
|
|
+ data.setAddValue(transList.stream().filter(c->c.getBuildTime().after(calendar2.getTime()) && c.getBuildTime().before(com.poteviohealth.cgp.common.utils.DateUtils.getLastDayOfMonth(calendar2.getTime())) && c.getTransType().equals("0")).mapToLong(c->c.getAmount()).sum());
|
|
|
+ data.setUseValue(transList.stream().filter(c->c.getBuildTime().after(calendar2.getTime()) && c.getBuildTime().before(com.poteviohealth.cgp.common.utils.DateUtils.getLastDayOfMonth(calendar2.getTime())) && c.getTransType().equals("1")).mapToLong(c->c.getAmount()).sum());
|
|
|
}
|
|
|
+
|
|
|
}else {
|
|
|
if (transList.isEmpty()) {
|
|
|
data.setAddValue(0L);
|
|
|
@@ -1452,40 +1337,18 @@ public class OrderServiceImpl extends BaseServiceImpl<OrderMapper, Order> implem
|
|
|
if(subsidyCustomerFace.getGrantNum() != null){
|
|
|
order.setPointGrant(subsidyCustomerFace.getGrantNum());
|
|
|
}
|
|
|
- if(order.getPointGrantWm() == null){
|
|
|
- order.setPointGrantWm(0L);
|
|
|
- }
|
|
|
- if(subsidyCustomerFace.getGrantNumWm() != null){
|
|
|
- order.setPointGrantWm(subsidyCustomerFace.getGrantNumWm());
|
|
|
- }
|
|
|
- if(order.getPointGrantYl() == null){
|
|
|
- order.setPointGrantYl(0L);
|
|
|
- }
|
|
|
- if(subsidyCustomerFace.getGrantNumYl() != null){
|
|
|
- order.setPointGrantYl(subsidyCustomerFace.getGrantNumYl());
|
|
|
- }
|
|
|
if(order.getPointExchange() == null){
|
|
|
order.setPointExchange(0L);
|
|
|
}
|
|
|
if(subsidyCustomerFace.getExchangeNum() != null){
|
|
|
order.setPointExchange(subsidyCustomerFace.getExchangeNum());
|
|
|
}
|
|
|
- if(order.getPointExchangeWm() == null){
|
|
|
- order.setPointExchangeWm(0L);
|
|
|
- }
|
|
|
- if(subsidyCustomerFace.getExchangeNumWm() != null){
|
|
|
- order.setPointExchangeWm(subsidyCustomerFace.getExchangeNumWm());
|
|
|
- }
|
|
|
|
|
|
order.setPointGoodsData2(JSONObject.toJSONString(subsidyCustomerFace.getPointGoodsData2()));
|
|
|
|
|
|
order.setPointCountData(JSONObject.toJSONString(subsidyCustomerFace.getPointCountData()));
|
|
|
|
|
|
order.setPointMonthData(JSONObject.toJSONString(subsidyCustomerFace.getPointMonthData()));
|
|
|
-
|
|
|
- order.setPointMonthDataWm(JSONObject.toJSONString(subsidyCustomerFace.getPointMonthDataWm()));
|
|
|
-
|
|
|
- order.setPointMonthDataYl(JSONObject.toJSONString(subsidyCustomerFace.getPointMonthDataYl()));
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -1867,3 +1730,4 @@ public class OrderServiceImpl extends BaseServiceImpl<OrderMapper, Order> implem
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|