Compare commits
5 Commits
0f6db1bc67
...
b155c21610
| Author | SHA1 | Date |
|---|---|---|
|
|
b155c21610 | |
|
|
175bd4d7bf | |
|
|
c6ea9ed4ee | |
|
|
2ad627983b | |
|
|
13fba7dc8a |
|
|
@ -62,11 +62,13 @@ public class BizCompanyEntity {
|
|||
/**
|
||||
* 营业执照有效期
|
||||
*/
|
||||
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
||||
private LocalDate licenseStartTime;
|
||||
|
||||
/**
|
||||
* 营业执照有效期
|
||||
*/
|
||||
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
||||
private LocalDate licenseEndTime;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -58,8 +58,10 @@ public class BizDriverEntity {
|
|||
*/
|
||||
private String drivingLicence;
|
||||
|
||||
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
||||
private LocalDate licenceStartTime;
|
||||
|
||||
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
||||
private LocalDate licenceEndTime;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -65,6 +65,12 @@ public interface SupervisionStatisticsMapper {
|
|||
@SuppressWarnings("MybatisXMapperMethodInspection")
|
||||
List<Map<String, Object>> dataTable();
|
||||
|
||||
@SuppressWarnings("MybatisXMapperMethodInspection")
|
||||
Map<String, Object> todayAuditPassStatistics();
|
||||
|
||||
@SuppressWarnings("MybatisXMapperMethodInspection")
|
||||
List<Map<String, Object>> stationStatistics();
|
||||
|
||||
Integer getTotalCarCount();
|
||||
|
||||
@SuppressWarnings("MybatisXMapperMethodInspection")
|
||||
|
|
|
|||
|
|
@ -254,6 +254,16 @@ public class SupervisionStatisticsService {
|
|||
log.error("数据获取失败", ex);
|
||||
return Collections.emptyList();
|
||||
});
|
||||
CompletableFuture<Map<String, Object>> todayAuditPassStatisticsFuture = CompletableFuture.supplyAsync(supervisionStatisticsMapper::todayAuditPassStatistics, threadPoolExecutor)
|
||||
.exceptionally(ex -> {
|
||||
log.error("数据获取失败", ex);
|
||||
return Collections.emptyMap();
|
||||
});
|
||||
CompletableFuture<List<Map<String, Object>>> stationStatisticsFuture = CompletableFuture.supplyAsync(supervisionStatisticsMapper::stationStatistics, threadPoolExecutor)
|
||||
.exceptionally(ex -> {
|
||||
log.error("数据获取失败", ex);
|
||||
return Collections.emptyList();
|
||||
});
|
||||
|
||||
try {
|
||||
Map<String, Object> dataStatistics = dataStatisticsFuture.get();
|
||||
|
|
@ -268,6 +278,8 @@ public class SupervisionStatisticsService {
|
|||
Map<String, Object> transStatistics = transStatisticsFuture.get();
|
||||
Map<String, Object> weightStatistics = weightStatisticsFuture.get();
|
||||
List<Map<String, Object>> dataTable = dataTableFuture.get();
|
||||
Map<String, Object> todayAuditPassStatistics = todayAuditPassStatisticsFuture.get();
|
||||
List<Map<String, Object>> stationStatistics = stationStatisticsFuture.get();
|
||||
return MapUtil.<String, Object>builder()
|
||||
.put("dataStatistics", dataStatistics)
|
||||
.put("warnTruck", warnTruck)
|
||||
|
|
@ -281,6 +293,8 @@ public class SupervisionStatisticsService {
|
|||
.put("userStatistics", userStatistics)
|
||||
.put("weightStatistics", weightStatistics)
|
||||
.put("dataTable", dataTable)
|
||||
.put("todayAuditPassStatistics", todayAuditPassStatistics)
|
||||
.put("stationStatistics", stationStatistics)
|
||||
.build();
|
||||
} catch (Exception e) {
|
||||
throw Exceptions.exception(e, "数据获取失败");
|
||||
|
|
|
|||
|
|
@ -40,6 +40,8 @@ public class OrderPagingSearchParam {
|
|||
* 清运公司ID
|
||||
*/
|
||||
private Long transCompanyId;
|
||||
private String transCompanyName;
|
||||
private String driverName;
|
||||
|
||||
/**
|
||||
* 产品ID
|
||||
|
|
|
|||
|
|
@ -228,12 +228,16 @@ public class OrderInfoService extends ServiceImpl<OrderInfoMapper, OrderInfoEnti
|
|||
Long stationId = orderPagingSearchParam.getStationId();
|
||||
String area = orderPagingSearchParam.getArea();
|
||||
OrderCategory orderCategory = orderPagingSearchParam.getOrderCategory();
|
||||
String transCompanyName = orderPagingSearchParam.getTransCompanyName();
|
||||
String driverName = orderPagingSearchParam.getDriverName();
|
||||
QueryWrapper<OrderPagingResult> ew = Wrappers.<OrderPagingResult>query()
|
||||
.eq(stationId != null && stationId > 0, "a.station_id", stationId)
|
||||
.like(StrUtil.isNotBlank(sn), "a.sn", sn)
|
||||
.like(StrUtil.isNotBlank(licensePlate), "e.license_plate", licensePlate)
|
||||
.like(StrUtil.isNotBlank(nickname), "a.contacts", nickname)
|
||||
.like(StrUtil.isNotBlank(phone), "a.phone", phone)
|
||||
.like(StrUtil.isNotBlank(transCompanyName), "g.company_name", transCompanyName)
|
||||
.like(StrUtil.isNotBlank(driverName), "f.driver_name", driverName)
|
||||
.ge(startTime != null, "a.create_time", startTime)
|
||||
.le(endTime != null, "a.create_time", endTime)
|
||||
.eq(orderCategory != null, "a.order_category", orderCategory)
|
||||
|
|
@ -1682,15 +1686,24 @@ public class OrderInfoService extends ServiceImpl<OrderInfoMapper, OrderInfoEnti
|
|||
public void export(HttpServletResponse response, OrderPagingSearchParam searchParam) throws IOException {
|
||||
LocalDateTime startTime = searchParam.getStartTime();
|
||||
LocalDateTime endTime = searchParam.getEndTime();
|
||||
String transCompanyName = searchParam.getTransCompanyName();
|
||||
String driverName = searchParam.getDriverName();
|
||||
OrderCategory orderCategory = searchParam.getOrderCategory();
|
||||
String area = searchParam.getArea();
|
||||
QueryWrapper<OrderPagingResult> ew = Wrappers.query();
|
||||
ew.eq(null != searchParam.getStationId() && searchParam.getStationId() > 0, "a.station_id", searchParam.getStationId());
|
||||
ew.like(StrUtil.isNotBlank(searchParam.getSn()), "a.sn", searchParam.getSn());
|
||||
ew.like(StrUtil.isNotBlank(searchParam.getLicensePlate()), "d.license_plate", searchParam.getLicensePlate());
|
||||
ew.like(StrUtil.isNotBlank(searchParam.getPhone()), "a.phone", searchParam.getPhone());
|
||||
ew.like(StrUtil.isNotBlank(searchParam.getNickname()), "a.contacts", searchParam.getNickname());
|
||||
ew.like(StrUtil.isNotBlank(transCompanyName), "g.company_name",transCompanyName);
|
||||
ew.like(StrUtil.isNotBlank(driverName), "f.driver_name", driverName);
|
||||
ew.ge(startTime != null, "a.create_time", startTime);
|
||||
ew.le(endTime != null, "a.create_time", endTime);
|
||||
ew.eq(orderCategory != null, "a.order_category", orderCategory);
|
||||
ew.eq(null != searchParam.getTransCompanyId(), "a.trans_company_id", searchParam.getTransCompanyId());
|
||||
ew.eq("a.deleted", 0);
|
||||
ew.eq(StrUtil.isNotBlank(area), "h.area", area);
|
||||
historyEW(searchParam, null, ew);
|
||||
List<OrderExportResult> list = baseMapper.exportList(ew);
|
||||
List<OrderExportDetailResult> detailResults = baseMapper.exportDetailList(ew);
|
||||
|
|
|
|||
|
|
@ -105,4 +105,14 @@ public class UserController {
|
|||
userService.modifyPasswd(modifyPasswdParam);
|
||||
return R.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置密码
|
||||
*/
|
||||
@GetMapping("/reset_passwd")
|
||||
public R<?> resetPasswd(@RequestParam("id") Long id) {
|
||||
userService.resetPasswd(id);
|
||||
return R.success(true, "重置成功,新密码:6个6");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njzscloud.common.core.ex.Exceptions;
|
||||
import com.njzscloud.common.mp.support.PageResult;
|
||||
import com.njzscloud.common.security.util.EncryptUtil;
|
||||
import com.njzscloud.common.security.util.SecurityUtil;
|
||||
import com.njzscloud.supervisory.biz.constant.BizObj;
|
||||
import com.njzscloud.supervisory.biz.pojo.param.AddBizCompanyParam;
|
||||
|
|
@ -219,4 +220,9 @@ public class UserService extends ServiceImpl<UserMapper, UserEntity> implements
|
|||
Long userId = SecurityUtil.currentUserId();
|
||||
userAccountService.modifyPasswd(userId, modifyPasswdParam);
|
||||
}
|
||||
|
||||
public void resetPasswd(Long id) {
|
||||
userAccountService.update(Wrappers.<UserAccountEntity>lambdaUpdate().eq(UserAccountEntity::getUserId, id)
|
||||
.set(UserAccountEntity::getSecret, EncryptUtil.encrypt("666666")));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -469,4 +469,85 @@
|
|||
WHERE a.biz_obj IN ('WuYe', 'ShiGongDanWei', 'ChaiQian', 'SheQu')
|
||||
AND a.deleted = 0
|
||||
</select>
|
||||
<select id="todayAuditPassStatistics" resultType="java.util.Map">
|
||||
SELECT MAX(IF(t_ = 1, c_, 0)) todayCfPassCount,
|
||||
MAX(IF(t_ = 2, c_, 0)) todayTransPassCount,
|
||||
MAX(IF(t_ = 3, c_, 0)) todayDriverPassCount,
|
||||
MAX(IF(t_ = 4, c_, 0)) todayTruckPassCount
|
||||
FROM (SELECT COUNT(*) c_, 1 t_
|
||||
FROM biz_company bc
|
||||
LEFT JOIN sys_user su ON su.id = bc.user_id
|
||||
WHERE bc.deleted = 0
|
||||
AND bc.audit_status = 'TongGuo'
|
||||
AND su.biz_obj IN ('GeRen', 'WuYe', 'ShiGongDanWei', 'ChaiQian', 'SheQu')
|
||||
AND bc.create_time >= CURDATE()
|
||||
AND bc.create_time < DATE_ADD(CURDATE(), INTERVAL 1 DAY)
|
||||
UNION ALL
|
||||
SELECT COUNT(*) c_, 2 t_
|
||||
FROM biz_company bc
|
||||
LEFT JOIN sys_user su ON su.id = bc.user_id
|
||||
WHERE bc.deleted = 0
|
||||
AND bc.audit_status = 'TongGuo'
|
||||
AND su.biz_obj IN ('QiYe', 'GeTi')
|
||||
AND bc.create_time >= CURDATE()
|
||||
AND bc.create_time < DATE_ADD(CURDATE(), INTERVAL 1 DAY)
|
||||
UNION ALL
|
||||
SELECT COUNT(*) c_, 3 t_
|
||||
FROM biz_driver bd
|
||||
WHERE bd.deleted = 0
|
||||
AND bd.audit_status = 'TongGuo'
|
||||
AND bd.create_time >= CURDATE()
|
||||
AND bd.create_time < DATE_ADD(CURDATE(), INTERVAL 1 DAY)
|
||||
UNION ALL
|
||||
SELECT COUNT(*) c_, 4 t_
|
||||
FROM biz_truck bt
|
||||
WHERE bt.deleted = 0
|
||||
AND bt.audit_status = 'TongGuo'
|
||||
AND bt.create_time >= CURDATE()
|
||||
AND bt.create_time < DATE_ADD(CURDATE(), INTERVAL 1 DAY)) t
|
||||
</select>
|
||||
<select id="stationStatistics" resultType="java.util.Map">
|
||||
SELECT bc.id stationId,
|
||||
IFNULL(bc.station_name, bc.company_name) stationName,
|
||||
IFNULL(t1.todayCarCount, 0) todayCarCount,
|
||||
IFNULL(t2.monthCarCount, 0) monthCarCount,
|
||||
IFNULL(t1.todayWeight, 0) todayWeight,
|
||||
IFNULL(t2.monthWeight, 0) monthWeight,
|
||||
IFNULL(t1.todayMonthIncome, 0) todayMonthIncome,
|
||||
IFNULL( t1.todayBalanceIncome, 0) todayBalanceIncome,
|
||||
IFNULL(t1.todayCashIncome, 0) todayCashIncome
|
||||
FROM biz_company bc
|
||||
LEFT JOIN (SELECT station_id,
|
||||
COUNT(*) todayCarCount,
|
||||
ROUND(IFNULL(SUM(oci.settle_weight) / 1000, 0), 2) todayWeight,
|
||||
IFNULL(SUM(CASE
|
||||
WHEN settlement_way = 'month' THEN IFNULL(oi.settle_money, 0)
|
||||
ELSE 0 END), 0) todayMonthIncome,
|
||||
IFNULL( SUM( CASE WHEN settlement_way = 'balance' THEN IFNULL( oi.settle_money, 0)
|
||||
ELSE 0 END), 0) todayBalanceIncome,
|
||||
IFNULL(SUM(CASE
|
||||
WHEN settlement_way = 'cash' THEN IFNULL(oi.settle_money, 0)
|
||||
ELSE 0 END), 0) todayCashIncome
|
||||
FROM order_info oi
|
||||
INNER JOIN order_car_in_out oci ON oci.id = oi.car_in_out_id
|
||||
WHERE oi.deleted = 0
|
||||
AND oi.order_status = 'YiWanCheng'
|
||||
AND oi.station_id IS NOT NULL
|
||||
AND oci.out_time >= CURDATE()
|
||||
AND oci.out_time < DATE_ADD(CURDATE(), INTERVAL 1 DAY)
|
||||
GROUP BY station_id) t1 ON t1.station_id = bc.id
|
||||
LEFT JOIN (SELECT station_id,
|
||||
COUNT(*) monthCarCount,
|
||||
ROUND(IFNULL(SUM(oci.settle_weight) / 1000, 0), 2) monthWeight
|
||||
FROM order_info oi
|
||||
INNER JOIN order_car_in_out oci ON oci.id = oi.car_in_out_id
|
||||
WHERE oi.deleted = 0
|
||||
AND oi.order_status = 'YiWanCheng'
|
||||
AND oi.station_id IS NOT NULL
|
||||
AND oci.out_time >= DATE_FORMAT(NOW(), '%Y-%m-01 00:00:00')
|
||||
AND oci.out_time < DATE_ADD(DATE_FORMAT(NOW(), '%Y-%m-01'), INTERVAL 1 MONTH)
|
||||
GROUP BY station_id) t2 ON t2.station_id = bc.id
|
||||
WHERE bc.station = 1
|
||||
AND bc.deleted = 0
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue