更新
This commit is contained in:
parent
d81fa731c5
commit
843a21a44e
@ -899,4 +899,16 @@ public class PartnerOwnController extends BaseController {
|
||||
public CommonResult<?> getStaffCount(@RequestBody DlInspectionProject dlInspectionProject) {
|
||||
return success(partnerList.getStaffCount(dlInspectionProject));
|
||||
}
|
||||
|
||||
/**
|
||||
* 文件统计
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/fileStatistics")
|
||||
public CommonResult<?> fileStatistics(@RequestParam(value = "startTime", required = false) String startTime,
|
||||
@RequestParam(value = "endTime", required = false) String endTime){
|
||||
return success(partnerList.fileStatistics(startTime, endTime));
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,69 @@
|
||||
package cn.iocoder.yudao.module.inspection.controller.admin;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.module.inspection.entity.InspectionBusinessChannel;
|
||||
import cn.iocoder.yudao.module.inspection.service.InspectionBusinessChannelService;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/channel")
|
||||
@RequiredArgsConstructor
|
||||
public class InspectionBusinessChannelController {
|
||||
|
||||
private final InspectionBusinessChannelService inspectionBusinessChannelService;
|
||||
|
||||
/**
|
||||
* 获取业务渠道/客户来源树结构
|
||||
*/
|
||||
@GetMapping("/tree")
|
||||
public CommonResult<List<InspectionBusinessChannel>> getChannelTree(InspectionBusinessChannel channel) {
|
||||
return CommonResult.success(inspectionBusinessChannelService.list(Wrappers.<InspectionBusinessChannel>lambdaQuery()
|
||||
.like(ObjectUtil.isNotEmpty(channel.getName()), InspectionBusinessChannel::getName, channel.getName())));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增业务渠道或客户来源
|
||||
*/
|
||||
@PostMapping("/add")
|
||||
public boolean addChannel(@RequestBody InspectionBusinessChannel channel) {
|
||||
return inspectionBusinessChannelService.save(channel);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取业务渠道或客户来源
|
||||
*/
|
||||
@GetMapping("/{id}")
|
||||
public CommonResult<InspectionBusinessChannel> getChannelById(@PathVariable("id") Long id) {
|
||||
return CommonResult.success(inspectionBusinessChannelService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改业务渠道或客户来源
|
||||
*/
|
||||
@PutMapping("/update")
|
||||
public CommonResult<?> updateChannel(@RequestBody InspectionBusinessChannel channel) {
|
||||
return CommonResult.success(inspectionBusinessChannelService.updateById(channel));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除业务渠道或客户来源
|
||||
*/
|
||||
@DeleteMapping("/delete/{id}")
|
||||
public CommonResult<?> deleteChannel(@PathVariable("id") Long id) {
|
||||
return CommonResult.success(inspectionBusinessChannelService.removeById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取业务渠道或客户来源列表(app)
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public CommonResult<?> list(){
|
||||
return CommonResult.success(inspectionBusinessChannelService.getChannelTree());
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package cn.iocoder.yudao.module.inspection.entity;
|
||||
|
||||
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class InspectionBusinessChannel extends TenantBaseDO {
|
||||
|
||||
private Integer id; // 主键ID
|
||||
|
||||
private Integer pid; // 父ID
|
||||
|
||||
private String name; // 名称
|
||||
|
||||
private Integer type; // 0-业务渠道 1-客户来源
|
||||
|
||||
// 子节点
|
||||
@TableField(exist = false)
|
||||
private List<InspectionBusinessChannel> children;
|
||||
}
|
@ -69,6 +69,7 @@ public class InspectionInfo extends TenantBaseDO
|
||||
private Integer recheckCount;
|
||||
/** 重检次数 */
|
||||
private Integer reinspectCount;
|
||||
private String otherName;
|
||||
|
||||
/** 0进行中1已结束 */
|
||||
@Excel(name = "0进行中1已结束")
|
||||
|
@ -65,6 +65,8 @@ public class InspectionMeetCarOrder extends TenantBaseDO {
|
||||
private String goodsTitle;
|
||||
private Long skuId;
|
||||
private String skuName;
|
||||
private String otherPhone;
|
||||
private String otherName;
|
||||
|
||||
/**
|
||||
* 接车类型 0接待 1上门取车
|
||||
|
@ -0,0 +1,9 @@
|
||||
package cn.iocoder.yudao.module.inspection.mapper;
|
||||
|
||||
import cn.iocoder.yudao.module.inspection.entity.InspectionBusinessChannel;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface InspectionBusinessChannelMapper extends BaseMapper<InspectionBusinessChannel> {
|
||||
}
|
@ -243,4 +243,13 @@ public interface AppInspectionPartnerService extends IService<ShopMallPartners>
|
||||
* @return 结果
|
||||
*/
|
||||
List<Map<String, Object>> getStaffCount(DlInspectionProject dlInspectionProject);
|
||||
|
||||
/**
|
||||
* 文件统计
|
||||
*
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @return 结果
|
||||
*/
|
||||
Map<String, Object> fileStatistics(String startTime, String endTime);
|
||||
}
|
||||
|
@ -0,0 +1,10 @@
|
||||
package cn.iocoder.yudao.module.inspection.service;
|
||||
|
||||
import cn.iocoder.yudao.module.inspection.entity.InspectionBusinessChannel;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface InspectionBusinessChannelService extends IService<InspectionBusinessChannel> {
|
||||
List<InspectionBusinessChannel> getChannelTree();
|
||||
}
|
@ -139,6 +139,10 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
|
||||
private InspectionSocket inspectionSocket;
|
||||
@Autowired
|
||||
private IInspectionWorkNodeService workNodeService;
|
||||
@Autowired
|
||||
private IInspectionFileService inspectionFileService;
|
||||
@Autowired
|
||||
private InspectionFileRecordService inspectionFileRecordService;
|
||||
|
||||
@Override
|
||||
public IPage<PartnerListVo> partnerList(Page<PartnerListVo> page, PartnerListQuery partnerListQuery) {
|
||||
@ -1542,6 +1546,8 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
|
||||
res.setWorkerName(Optional.ofNullable(worker.getNickname()).orElse(null));
|
||||
res.setWorkerPhone(worker.getMobile());
|
||||
}
|
||||
res.setOtherName(Optional.ofNullable(info.getOtherName()).orElse(null));
|
||||
res.setOtherPhone(Optional.ofNullable(info.getOtherPhone()).orElse(null));
|
||||
/*根据工单表中的leadManId查询对应的引车员*/
|
||||
if (ObjectUtil.isNotNull(info.getLeadManId())) {
|
||||
AdminUserDO leadMan = adminUserService.getById(info.getLeadManId());
|
||||
@ -2241,4 +2247,33 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
|
||||
}
|
||||
return staffCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* 文件统计
|
||||
*
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Object> fileStatistics(String startTime, String endTime) {
|
||||
// 判断开始时间与结束时间如果为空 默认查询本月
|
||||
if (StringUtils.isEmpty(startTime)) {
|
||||
startTime = DateUtil.format(DateUtil.beginOfMonth(new Date()), "yyyy-MM-dd");
|
||||
}
|
||||
if (StringUtils.isEmpty(endTime)) {
|
||||
endTime = DateUtil.format(DateUtil.endOfMonth(new Date()), "yyyy-MM-dd");
|
||||
}
|
||||
long addCount = inspectionFileService.count(Wrappers.<InspectionFile>lambdaQuery()
|
||||
.between(InspectionFile::getCreateTime, startTime, endTime));
|
||||
|
||||
// 查询文件记录表
|
||||
long updateCount = inspectionFileRecordService.count(Wrappers.<InspectionFileRecord>lambdaQuery()
|
||||
.between(InspectionFileRecord::getCreateTime, startTime, endTime));
|
||||
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("addCount", addCount);
|
||||
map.put("updateCount", updateCount);
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,22 @@
|
||||
package cn.iocoder.yudao.module.inspection.service.impl;
|
||||
|
||||
import cn.iocoder.yudao.module.inspection.entity.InspectionBusinessChannel;
|
||||
import cn.iocoder.yudao.module.inspection.mapper.InspectionBusinessChannelMapper;
|
||||
import cn.iocoder.yudao.module.inspection.service.InspectionBusinessChannelService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
public class InspectionBusinessChannelServiceImpl extends ServiceImpl<InspectionBusinessChannelMapper, InspectionBusinessChannel> implements InspectionBusinessChannelService {
|
||||
@Override
|
||||
public List<InspectionBusinessChannel> getChannelTree() {
|
||||
// 查询所有业务渠道(父节点)
|
||||
return this.list();
|
||||
}
|
||||
|
||||
}
|
@ -101,4 +101,6 @@ public class InspectionInfoVo {
|
||||
private String meetManName;
|
||||
/** 是否接车*/
|
||||
private String isMeetCar;
|
||||
private String otherName;
|
||||
private String otherPhone;
|
||||
}
|
||||
|
@ -43,4 +43,7 @@ public class OrderTable {
|
||||
|
||||
/** 车辆型号 */
|
||||
private String carModel;
|
||||
|
||||
/** 检测次数 */
|
||||
private Integer inspectionCount;
|
||||
}
|
||||
|
@ -163,10 +163,10 @@ public class OrderController extends BaseController {
|
||||
@RequestParam(value = "pageNum" ,required = false ,defaultValue = "1") Integer pageNum,
|
||||
@RequestParam(value ="pageSize" ,required = false ,defaultValue = "10") Integer pageSize) {
|
||||
//判断商家是否开启评论区
|
||||
ShopMallPartners partners = partnerService.getById(partnerId);
|
||||
if (StringUtils.isEmpty(partners.getOpenComment())||partners.getOpenComment().equals("0")){
|
||||
return success(new ArrayList<>());
|
||||
}
|
||||
// ShopMallPartners partners = partnerService.getById(partnerId);
|
||||
// if (StringUtils.isEmpty(partners.getOpenComment())||partners.getOpenComment().equals("0")){
|
||||
// return success(new ArrayList<>());
|
||||
// }
|
||||
Page<commentVo> page = new Page<>(pageNum, pageSize);
|
||||
IPage<commentVo> commentOrderList = orderInfoService.getCommentOrderList(page,partnerId);
|
||||
return success(commentOrderList);
|
||||
|
@ -15,4 +15,5 @@ public class commentVo extends TenantBaseDO {
|
||||
private String realName;
|
||||
private String goodsTitle;
|
||||
private String userImg="http://www.nuoyunr.com/lananRsc/xlg.png";
|
||||
private Long inspectionInfoId;
|
||||
}
|
||||
|
@ -629,6 +629,7 @@ FROM
|
||||
t.createTime,
|
||||
t.customerSource,
|
||||
t.carModel,
|
||||
t.inspectionCount,
|
||||
CASE
|
||||
WHEN t.status = '已完成' AND t.is_pass = 0 THEN '不合格'
|
||||
WHEN t.status = '已完成' AND t.is_pass = 1 THEN '合格'
|
||||
@ -645,6 +646,7 @@ FROM
|
||||
oi.create_time AS createTime,
|
||||
ii.customer_source AS customerSource,
|
||||
ii.car_model AS carModel,
|
||||
IFNULL(ii.recheck_count, 0) + IFNULL(ii.reinspect_count, 0) + 1 AS inspectionCount,
|
||||
CASE
|
||||
WHEN oi.pay_type IS NULL THEN '未支付'
|
||||
ELSE '已支付'
|
||||
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.yudao.module.inspection.mapper.InspectionBusinessChannelMapper">
|
||||
|
||||
</mapper>
|
@ -231,10 +231,11 @@
|
||||
</select>
|
||||
<select id="getCommentOrderList" resultType = "cn.iocoder.yudao.module.payment.entity.commentVo">
|
||||
SELECT
|
||||
real_name,comment_desc ,comment_star,comment_time,goods_title
|
||||
oi.real_name,oi.comment_desc ,oi.comment_star,oi.comment_time,oi.goods_title,info.id inspectionInfoId
|
||||
FROM
|
||||
order_info
|
||||
where partner_id = #{partnerId} and comment_star is not null
|
||||
order_info oi
|
||||
LEFT JOIN inspection_info info ON oi.id = info.inspection_order_id
|
||||
where comment_star is not null
|
||||
ORDER BY comment_time desc
|
||||
</select>
|
||||
<select id="pageOrderListSystem" resultType="cn.iocoder.yudao.module.payment.entity.OrderInfo">
|
||||
|
Loading…
Reference in New Issue
Block a user