Compare commits
No commits in common. "e5bc14b9d74eac9552898f1c895a7e9868218d54" and "0b47bfe55b288cd65ad4365ac0c7773ae0ed2693" have entirely different histories.
e5bc14b9d7
...
0b47bfe55b
|
|
@ -4,15 +4,12 @@ import com.njzscloud.common.core.utils.R;
|
|||
import com.njzscloud.common.mp.support.PageParam;
|
||||
import com.njzscloud.common.mp.support.PageResult;
|
||||
import com.njzscloud.supervisory.money.pojo.entity.MoneyBillEntity;
|
||||
import com.njzscloud.supervisory.money.pojo.entity.MoneyChangeDetailEntity;
|
||||
import com.njzscloud.supervisory.money.pojo.param.RebuildBillParam;
|
||||
import com.njzscloud.supervisory.money.service.MoneyBillService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
|
@ -78,11 +75,4 @@ public class MoneyBillController {
|
|||
return R.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出
|
||||
*/
|
||||
@GetMapping(value = "/export")
|
||||
public void export(HttpServletResponse response, MoneyBillEntity entity) throws IOException {
|
||||
moneyBillService.export(response, entity);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,6 +26,4 @@ public interface MoneyBillMapper extends BaseMapper<MoneyBillEntity> {
|
|||
*/
|
||||
List<MoneyBillResult> selectMoneyBillList(@Param("entity") MoneyBillResult entity);
|
||||
|
||||
List<MoneyBillEntity> selectMoneyBillWithNames(@Param("entity") MoneyBillEntity entity);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,20 +8,11 @@ import com.njzscloud.common.mp.support.PageResult;
|
|||
import com.njzscloud.supervisory.money.mapper.MoneyBillMapper;
|
||||
import com.njzscloud.supervisory.money.pojo.entity.MoneyBillEntity;
|
||||
import com.njzscloud.supervisory.money.pojo.param.RebuildBillParam;
|
||||
import com.njzscloud.supervisory.order.utils.FileUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 对账单
|
||||
|
|
@ -75,27 +66,4 @@ public class MoneyBillService extends ServiceImpl<MoneyBillMapper, MoneyBillEnti
|
|||
return;
|
||||
}
|
||||
|
||||
public void export(HttpServletResponse response, MoneyBillEntity entity) throws IOException {
|
||||
List<MoneyBillEntity> list = baseMapper.selectMoneyBillWithNames(entity);
|
||||
List<Map<String, Object>> downList = new ArrayList<>();
|
||||
int i = 1;
|
||||
for (MoneyBillEntity result : list) {
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
map.put("序号", i);
|
||||
map.put("公司名称", result.getCompanyName());
|
||||
map.put("产品名称", result.getGoodsName());
|
||||
map.put("订单数", result.getOrderCount());
|
||||
map.put("总重量(t)", String.valueOf(result.getTotalWeight() == null ? null : BigDecimal.valueOf(result.getTotalWeight())
|
||||
.divide(BigDecimal.valueOf(1000), 3, RoundingMode.HALF_UP)));
|
||||
map.put("总车数", result.getCarCount());
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
map.put("开始日期", result.getStartTime() != null ? result.getStartTime().format(formatter) : "");
|
||||
map.put("结束日期", result.getEndTime() != null ? result.getEndTime().format(formatter) : "");
|
||||
map.put("优惠金额", result.getDiscountMoney());
|
||||
map.put("账单金额", result.getTotalMoney());
|
||||
downList.add(map);
|
||||
i++;
|
||||
}
|
||||
FileUtil.downloadExcel(downList, response, "对账单.xlsx");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1270,7 +1270,7 @@ public class OrderInfoService extends ServiceImpl<OrderInfoMapper, OrderInfoEnti
|
|||
ew.like(StrUtil.isNotBlank(searchParam.getNickname()), "a.contacts", searchParam.getNickname());
|
||||
ew.ge(startTime != null, "a.create_time", startTime);
|
||||
ew.le(endTime != null, "a.create_time", endTime);
|
||||
|
||||
;
|
||||
historyEW(searchParam, null, ew);
|
||||
List<OrderExportResult> list = baseMapper.exportList(ew);
|
||||
List<Map<String, Object>> downList = new ArrayList<>();
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ spring:
|
|||
- /fdx
|
||||
- /payment/wechat/notify
|
||||
- /payment/wechat/refundNotify
|
||||
- /district/areaList
|
||||
app:
|
||||
default-place:
|
||||
province: 320000
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
mb.car_count
|
||||
FROM money_bill mb
|
||||
LEFT JOIN sys_user u ON mb.user_id = u.id
|
||||
LEFT JOIN biz_company bc ON mb.station_id = bc.id
|
||||
LEFT JOIN biz_company bc ON mb.station_id = bc.id AND bc.station = 1
|
||||
<where>
|
||||
<if test="entity.userId != null">
|
||||
AND mb.user_id = #{entity.userId}
|
||||
|
|
|
|||
Loading…
Reference in New Issue