Compare commits

..

No commits in common. "b155c216109d250617629a8b89f8116468ac2448" and "0f6db1bc670a38fc8628dcb0e3c4f96e523944c0" have entirely different histories.

9 changed files with 0 additions and 136 deletions

View File

@ -62,13 +62,11 @@ public class BizCompanyEntity {
/** /**
* *
*/ */
@TableField(updateStrategy = FieldStrategy.ALWAYS)
private LocalDate licenseStartTime; private LocalDate licenseStartTime;
/** /**
* *
*/ */
@TableField(updateStrategy = FieldStrategy.ALWAYS)
private LocalDate licenseEndTime; private LocalDate licenseEndTime;

View File

@ -58,10 +58,8 @@ public class BizDriverEntity {
*/ */
private String drivingLicence; private String drivingLicence;
@TableField(updateStrategy = FieldStrategy.ALWAYS)
private LocalDate licenceStartTime; private LocalDate licenceStartTime;
@TableField(updateStrategy = FieldStrategy.ALWAYS)
private LocalDate licenceEndTime; private LocalDate licenceEndTime;
/** /**

View File

@ -65,12 +65,6 @@ public interface SupervisionStatisticsMapper {
@SuppressWarnings("MybatisXMapperMethodInspection") @SuppressWarnings("MybatisXMapperMethodInspection")
List<Map<String, Object>> dataTable(); List<Map<String, Object>> dataTable();
@SuppressWarnings("MybatisXMapperMethodInspection")
Map<String, Object> todayAuditPassStatistics();
@SuppressWarnings("MybatisXMapperMethodInspection")
List<Map<String, Object>> stationStatistics();
Integer getTotalCarCount(); Integer getTotalCarCount();
@SuppressWarnings("MybatisXMapperMethodInspection") @SuppressWarnings("MybatisXMapperMethodInspection")

View File

@ -254,16 +254,6 @@ public class SupervisionStatisticsService {
log.error("数据获取失败", ex); log.error("数据获取失败", ex);
return Collections.emptyList(); 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 { try {
Map<String, Object> dataStatistics = dataStatisticsFuture.get(); Map<String, Object> dataStatistics = dataStatisticsFuture.get();
@ -278,8 +268,6 @@ public class SupervisionStatisticsService {
Map<String, Object> transStatistics = transStatisticsFuture.get(); Map<String, Object> transStatistics = transStatisticsFuture.get();
Map<String, Object> weightStatistics = weightStatisticsFuture.get(); Map<String, Object> weightStatistics = weightStatisticsFuture.get();
List<Map<String, Object>> dataTable = dataTableFuture.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() return MapUtil.<String, Object>builder()
.put("dataStatistics", dataStatistics) .put("dataStatistics", dataStatistics)
.put("warnTruck", warnTruck) .put("warnTruck", warnTruck)
@ -293,8 +281,6 @@ public class SupervisionStatisticsService {
.put("userStatistics", userStatistics) .put("userStatistics", userStatistics)
.put("weightStatistics", weightStatistics) .put("weightStatistics", weightStatistics)
.put("dataTable", dataTable) .put("dataTable", dataTable)
.put("todayAuditPassStatistics", todayAuditPassStatistics)
.put("stationStatistics", stationStatistics)
.build(); .build();
} catch (Exception e) { } catch (Exception e) {
throw Exceptions.exception(e, "数据获取失败"); throw Exceptions.exception(e, "数据获取失败");

View File

@ -40,8 +40,6 @@ public class OrderPagingSearchParam {
* ID * ID
*/ */
private Long transCompanyId; private Long transCompanyId;
private String transCompanyName;
private String driverName;
/** /**
* ID * ID

View File

@ -228,16 +228,12 @@ public class OrderInfoService extends ServiceImpl<OrderInfoMapper, OrderInfoEnti
Long stationId = orderPagingSearchParam.getStationId(); Long stationId = orderPagingSearchParam.getStationId();
String area = orderPagingSearchParam.getArea(); String area = orderPagingSearchParam.getArea();
OrderCategory orderCategory = orderPagingSearchParam.getOrderCategory(); OrderCategory orderCategory = orderPagingSearchParam.getOrderCategory();
String transCompanyName = orderPagingSearchParam.getTransCompanyName();
String driverName = orderPagingSearchParam.getDriverName();
QueryWrapper<OrderPagingResult> ew = Wrappers.<OrderPagingResult>query() QueryWrapper<OrderPagingResult> ew = Wrappers.<OrderPagingResult>query()
.eq(stationId != null && stationId > 0, "a.station_id", stationId) .eq(stationId != null && stationId > 0, "a.station_id", stationId)
.like(StrUtil.isNotBlank(sn), "a.sn", sn) .like(StrUtil.isNotBlank(sn), "a.sn", sn)
.like(StrUtil.isNotBlank(licensePlate), "e.license_plate", licensePlate) .like(StrUtil.isNotBlank(licensePlate), "e.license_plate", licensePlate)
.like(StrUtil.isNotBlank(nickname), "a.contacts", nickname) .like(StrUtil.isNotBlank(nickname), "a.contacts", nickname)
.like(StrUtil.isNotBlank(phone), "a.phone", phone) .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) .ge(startTime != null, "a.create_time", startTime)
.le(endTime != null, "a.create_time", endTime) .le(endTime != null, "a.create_time", endTime)
.eq(orderCategory != null, "a.order_category", orderCategory) .eq(orderCategory != null, "a.order_category", orderCategory)
@ -1686,24 +1682,15 @@ public class OrderInfoService extends ServiceImpl<OrderInfoMapper, OrderInfoEnti
public void export(HttpServletResponse response, OrderPagingSearchParam searchParam) throws IOException { public void export(HttpServletResponse response, OrderPagingSearchParam searchParam) throws IOException {
LocalDateTime startTime = searchParam.getStartTime(); LocalDateTime startTime = searchParam.getStartTime();
LocalDateTime endTime = searchParam.getEndTime(); 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(); QueryWrapper<OrderPagingResult> ew = Wrappers.query();
ew.eq(null != searchParam.getStationId() && searchParam.getStationId() > 0, "a.station_id", searchParam.getStationId()); 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.getSn()), "a.sn", searchParam.getSn());
ew.like(StrUtil.isNotBlank(searchParam.getLicensePlate()), "d.license_plate", searchParam.getLicensePlate()); 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.getPhone()), "a.phone", searchParam.getPhone());
ew.like(StrUtil.isNotBlank(searchParam.getNickname()), "a.contacts", searchParam.getNickname()); 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.ge(startTime != null, "a.create_time", startTime);
ew.le(endTime != null, "a.create_time", endTime); 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(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); historyEW(searchParam, null, ew);
List<OrderExportResult> list = baseMapper.exportList(ew); List<OrderExportResult> list = baseMapper.exportList(ew);
List<OrderExportDetailResult> detailResults = baseMapper.exportDetailList(ew); List<OrderExportDetailResult> detailResults = baseMapper.exportDetailList(ew);

View File

@ -105,14 +105,4 @@ public class UserController {
userService.modifyPasswd(modifyPasswdParam); userService.modifyPasswd(modifyPasswdParam);
return R.success(); return R.success();
} }
/**
*
*/
@GetMapping("/reset_passwd")
public R<?> resetPasswd(@RequestParam("id") Long id) {
userService.resetPasswd(id);
return R.success(true, "重置成功新密码6个6");
}
} }

View File

@ -11,7 +11,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.njzscloud.common.core.ex.Exceptions; import com.njzscloud.common.core.ex.Exceptions;
import com.njzscloud.common.mp.support.PageResult; import com.njzscloud.common.mp.support.PageResult;
import com.njzscloud.common.security.util.EncryptUtil;
import com.njzscloud.common.security.util.SecurityUtil; import com.njzscloud.common.security.util.SecurityUtil;
import com.njzscloud.supervisory.biz.constant.BizObj; import com.njzscloud.supervisory.biz.constant.BizObj;
import com.njzscloud.supervisory.biz.pojo.param.AddBizCompanyParam; import com.njzscloud.supervisory.biz.pojo.param.AddBizCompanyParam;
@ -220,9 +219,4 @@ public class UserService extends ServiceImpl<UserMapper, UserEntity> implements
Long userId = SecurityUtil.currentUserId(); Long userId = SecurityUtil.currentUserId();
userAccountService.modifyPasswd(userId, modifyPasswdParam); userAccountService.modifyPasswd(userId, modifyPasswdParam);
} }
public void resetPasswd(Long id) {
userAccountService.update(Wrappers.<UserAccountEntity>lambdaUpdate().eq(UserAccountEntity::getUserId, id)
.set(UserAccountEntity::getSecret, EncryptUtil.encrypt("666666")));
}
} }

View File

@ -469,85 +469,4 @@
WHERE a.biz_obj IN ('WuYe', 'ShiGongDanWei', 'ChaiQian', 'SheQu') WHERE a.biz_obj IN ('WuYe', 'ShiGongDanWei', 'ChaiQian', 'SheQu')
AND a.deleted = 0 AND a.deleted = 0
</select> </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 &lt; 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 &lt; 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 &lt; 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 &lt; 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 &lt; 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 &lt; 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> </mapper>