更新
This commit is contained in:
parent
11973d88e2
commit
bbaeff1b19
@ -22,8 +22,8 @@ public class WorkReportSaveReqVO {
|
||||
private String reportTopic;
|
||||
|
||||
@Schema(description = "汇报时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private LocalDateTime reportTime;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
|
||||
private Date reportTime;
|
||||
|
||||
@Schema(description = "汇报内容")
|
||||
private String reportContent;
|
||||
|
@ -57,6 +57,8 @@ public class InspectionInfo extends TenantBaseDO
|
||||
//车子状态 新车 旧车等
|
||||
private String carStatus;
|
||||
private String carIdNo;
|
||||
// 车辆注册时间
|
||||
private Date carRegisterDate;
|
||||
/** 0不通过1通过 */
|
||||
@Excel(name = "0不通过1通过")
|
||||
private String isPass;
|
||||
|
@ -0,0 +1,32 @@
|
||||
package cn.iocoder.yudao.module.inspection.query;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Description: 查询订单信息
|
||||
* @Author: 86187
|
||||
* @Date: 2025/02/17 11:31
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Data
|
||||
public class OrderBydateQuery {
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private String startTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private String endTime;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private String chooseStatus;
|
||||
|
||||
/**
|
||||
* 车龄
|
||||
*/
|
||||
private String carAge;
|
||||
}
|
@ -114,7 +114,9 @@ public class InspectionStaffServiceImpl extends ServiceImpl<InspectionStaffMappe
|
||||
|
||||
//查询文件夹
|
||||
InspectionStaff staff1 = this.getOne(Wrappers.<InspectionStaff>lambdaQuery().eq(InspectionStaff::getUserId, inspectionStaffVo.getUserId()));
|
||||
if (CollUtil.isNotEmpty(inspectionStaffVo.getFileList())) {
|
||||
addFile(inspectionStaffVo.getFileList(), inspectionStaffVo.getNickname(), staff1.getFolderId(), staff1.getUserId());
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -24,4 +24,9 @@ public class InspectionOrderExportVo {
|
||||
* 工作人员名称
|
||||
*/
|
||||
private String workName;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
private String projectId;
|
||||
}
|
||||
|
@ -170,6 +170,18 @@ public class OrderInfo extends TenantBaseDO {
|
||||
@TableField(exist = false)
|
||||
private Double inspectionTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Long orderId;
|
||||
|
||||
/**
|
||||
* 车龄(查询时使用)
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private Integer carAge;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Integer nextCarAge;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -111,6 +111,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
|
||||
partnerService.updateById(partner);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<OrderInfo> orderListApp(Page<OrderInfo> page, String status, String title, String type) {
|
||||
LoginUser user = SecurityFrameworkUtils.getLoginUser();
|
||||
@ -189,6 +190,9 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
|
||||
**/
|
||||
@Override
|
||||
public IPage<OrderInfo> queryListPage(OrderInfo orderInfo, Page<OrderInfo> page) {
|
||||
if (ObjectUtil.isNotNull(orderInfo.getCarAge())) {
|
||||
orderInfo.setNextCarAge(orderInfo.getCarAge() + 1);
|
||||
}
|
||||
return baseMapper.pageOrderListSystem(orderInfo, page);
|
||||
}
|
||||
|
||||
@ -484,8 +488,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
|
||||
if (StringUtils.isEmpty(shopInspectionGoods.getIsAttend()) || shopInspectionGoods.getIsAttend().equals("0") || shopInspectionGoods.getIsSpecial() == 1 || ObjectUtils.isEmpty(userLevel) || 0 == userLevel) {
|
||||
//直接计算原价
|
||||
realPrice = priceFen;
|
||||
}
|
||||
else if (userLevel == 1) {
|
||||
} else if (userLevel == 1) {
|
||||
//白银会员
|
||||
//获取会员的优惠折扣
|
||||
BigDecimal inspectionPlatinum = shopConfig.getInspectionSilver();
|
||||
@ -637,6 +640,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void dealPickCar(OrderInfo orderInfo) {
|
||||
if (orderInfo.getGoodsType().equals("jc")) {
|
||||
InspectionPickCar pickCarInfo = pickCarService.getById(orderInfo.getPickCarId());
|
||||
@ -647,6 +651,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject pickCarDetail(Long pickCarId) {
|
||||
JSONObject res = new JSONObject();
|
||||
@ -880,7 +885,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
|
||||
}
|
||||
});
|
||||
|
||||
// 查询所有检测项目
|
||||
// 查询所有检测项目 动态添加到excel表头
|
||||
List<DlInspectionProject> projectList = dlInspectionProjectService.list(Wrappers.<DlInspectionProject>lambdaQuery()
|
||||
.orderBy(true, true, DlInspectionProject::getSort));
|
||||
|
||||
@ -900,15 +905,15 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
|
||||
head.add(Collections.singletonList("代办人电话"));
|
||||
head.add(Collections.singletonList("商品名称"));
|
||||
head.add(Collections.singletonList("新旧车"));
|
||||
// 动态列(检测项目)
|
||||
for (DlInspectionProject project : projectList) {
|
||||
head.add(Collections.singletonList(project.getProjectName()));
|
||||
}
|
||||
head.add(Collections.singletonList("开始时间"));
|
||||
head.add(Collections.singletonList("结束时间"));
|
||||
head.add(Collections.singletonList("检测时长"));
|
||||
head.add(Collections.singletonList("支付方式"));
|
||||
head.add(Collections.singletonList("金额"));
|
||||
// 动态列(检测项目)
|
||||
for (DlInspectionProject project : projectList) {
|
||||
head.add(Collections.singletonList(project.getProjectName()));
|
||||
}
|
||||
|
||||
List<Long> orderIds = orderInfoIPage.stream().map(OrderInfo::getId).collect(Collectors.toList());
|
||||
|
||||
@ -932,21 +937,31 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
|
||||
row.add(item.getWorkerPhone());
|
||||
row.add(item.getGoodsTitle());
|
||||
row.add(item.getCarStatus());
|
||||
// 动态列数据
|
||||
//获取所有orderId = item.orderId的数据
|
||||
List<InspectionOrderExportVo> projecttList = projectWorkerNames.stream().filter(i -> i.getOrderId().equals(item.getOrderId())).collect(Collectors.toList());
|
||||
for (DlInspectionProject dlInspectionProject : projectList) {
|
||||
boolean flag = false;
|
||||
for (InspectionOrderExportVo project : projecttList) {
|
||||
if (dlInspectionProject.getId().equals(project.getProjectId())) {
|
||||
flag = true;
|
||||
row.add(project.getWorkName());
|
||||
}
|
||||
}
|
||||
if (!flag) {
|
||||
row.add("");
|
||||
}
|
||||
}
|
||||
row.add(item.getStartTime());
|
||||
row.add(item.getEndTime());
|
||||
row.add(item.getInspectionTime());
|
||||
row.add(item.getPayType());
|
||||
row.add(item.getPayMoneyStr());
|
||||
// 动态列数据
|
||||
for (InspectionOrderExportVo project : projectWorkerNames) {
|
||||
row.add(item.getDynamicColumns().get(project.getWorkName()));
|
||||
}
|
||||
data.add(row);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 导出 Excel
|
||||
EasyExcel.write(response.getOutputStream())
|
||||
.head(head) // 设置动态表头
|
||||
|
@ -35,6 +35,7 @@ public class OrderInfoExportVo {
|
||||
private String inspectionTime;
|
||||
private String payType;
|
||||
private Long payMoneyStr;
|
||||
private Long orderId;
|
||||
|
||||
// 动态列数据
|
||||
private Map<String, Object> dynamicColumns = new HashMap<>();
|
||||
|
@ -31,7 +31,8 @@
|
||||
iw.id AS nodeId,
|
||||
ip.project_name,
|
||||
iw.deal_user_name AS workName,
|
||||
iw.deal_user_id
|
||||
iw.deal_user_id,
|
||||
ip.id as projectId
|
||||
FROM
|
||||
inspection_work_node iw
|
||||
JOIN
|
||||
|
@ -267,6 +267,7 @@
|
||||
oi.pay_money / 100 as payMoneyStr,
|
||||
info.start_time,
|
||||
info.end_time,
|
||||
info.id as orderId,
|
||||
-- end_time 减去 start_time
|
||||
DATE_FORMAT(info.end_time, '%Y-%m-%d %H:%i:%s') - DATE_FORMAT(info.start_time, '%Y-%m-%d %H:%i:%s') as inspectionTime
|
||||
FROM
|
||||
@ -279,7 +280,7 @@
|
||||
and oi.order_status = #{entity.orderStatus}
|
||||
</if>
|
||||
<if test="entity.validationTime!=null">
|
||||
-- and oi.validation_time is not null
|
||||
and oi.validation_time is not null
|
||||
</if>
|
||||
<if test="entity.realName!=null and entity.realName!='' ">
|
||||
and oi.real_name like concat('%',#{entity.realName},'%')
|
||||
@ -305,6 +306,10 @@
|
||||
<if test="entity.endTime!=null ">
|
||||
and oi.pay_time <![CDATA[<=]]> #{entity.endTime}
|
||||
</if>
|
||||
<if test="entity.carAge != null">
|
||||
AND car_register_date BETWEEN DATE_SUB(CURDATE(), INTERVAL #{nextCarAge} YEAR)
|
||||
AND DATE_SUB(CURDATE(), INTERVAL #{entity.carAge} YEAR)
|
||||
</if>
|
||||
<if test="entity.partnerId!=null ">
|
||||
and oi.partner_id = #{entity.partnerId}
|
||||
</if>
|
||||
|
@ -58,5 +58,9 @@ public class UserDTO {
|
||||
* 用户状态
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 角色名称 多个角色以逗号隔开
|
||||
*/
|
||||
private String roleNames;
|
||||
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
<select id="selectListByRoleId" resultType="cn.iocoder.yudao.module.system.api.user.dto.UserDTO"
|
||||
parameterType="cn.iocoder.yudao.module.system.controller.admin.permission.vo.role.RolePageReqVO">
|
||||
select distinct su.*
|
||||
select distinct su.*,GROUP_CONCAT(DISTINCT sr2.name SEPARATOR ',') AS roleNames
|
||||
from system_users su
|
||||
left join system_user_role sr on su.id = sr.user_id
|
||||
left join system_role sr2 on sr.role_id = sr2.id
|
||||
@ -34,6 +34,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
and (su.nickname like CONCAT('%',#{role.nickname},'%') OR su.username like CONCAT('%',#{role.nickname},'%'))
|
||||
</if>
|
||||
</where>
|
||||
group by su.id
|
||||
order by su.nickname
|
||||
</select>
|
||||
<select id="userCodes" resultType="cn.iocoder.yudao.module.system.api.user.dto.UserRoleDTO">
|
||||
SELECT
|
||||
|
Loading…
Reference in New Issue
Block a user