管理端增加任务列表99%
This commit is contained in:
parent
dc6ec5a8dc
commit
03e696581f
@ -5,7 +5,7 @@ import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.security.core.LoginUser;
|
||||
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import cn.iocoder.yudao.module.inspection.vo.SysDictData;
|
||||
import cn.iocoder.yudao.module.inspection.vo.*;
|
||||
import cn.iocoder.yudao.module.label.vo.LabelRespVO;
|
||||
import cn.iocoder.yudao.module.partner.entity.PartnerBalanceDetail;
|
||||
import cn.iocoder.yudao.module.partner.entity.PartnerWorker;
|
||||
@ -29,15 +29,13 @@ import com.github.pagehelper.PageHelper;
|
||||
import cn.iocoder.yudao.module.core.controller.BaseController;
|
||||
import cn.iocoder.yudao.module.inspection.entity.*;
|
||||
import cn.iocoder.yudao.module.inspection.service.AppInspectionPartnerService;
|
||||
import cn.iocoder.yudao.module.inspection.vo.GoodsVo;
|
||||
import cn.iocoder.yudao.module.inspection.vo.InspectionInfoVo;
|
||||
import cn.iocoder.yudao.module.inspection.vo.OrderAppDetail;
|
||||
import cn.iocoder.yudao.module.shop.entity.ShopCouponTemplate;
|
||||
import cn.iocoder.yudao.module.shop.entity.ShopMallPartners;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@ -766,4 +764,22 @@ public class PartnerOwnController extends BaseController {
|
||||
return success(partnerList.getProjectByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据时间查订单
|
||||
*
|
||||
* @author 小李
|
||||
* @date 14:39 2024/12/12
|
||||
* @param startTime 开始时间 非必传
|
||||
* @param endTime 结束时间 非必传
|
||||
* @param pageNum 页码
|
||||
* @param pageSize 条数
|
||||
**/
|
||||
@GetMapping("/getOrderByDate")
|
||||
public CommonResult<?> getOrderByDate(@RequestParam(value = "startTime", required = false) String startTime,
|
||||
@RequestParam(value = "endTime", required = false) String endTime,
|
||||
@RequestParam(value = "pageNum", defaultValue = "1")Integer pageNum,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10")Integer pageSize){
|
||||
Page<OrderTable> page = new Page<>(pageNum, pageSize);
|
||||
return success(partnerList.getOrderByDate(startTime, endTime, page));
|
||||
}
|
||||
}
|
||||
|
@ -66,10 +66,13 @@ public interface AppInspectionPartnerMapper extends BaseMapper<ShopMallPartners>
|
||||
Long getAppointNum(@Param("partnerId") Long partnerId,@Param("formDate") String formDate);
|
||||
Long getPickNum(@Param("partnerId") Long partnerId,@Param("formDate") String formDate);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 根据时间查订单
|
||||
*
|
||||
* @author 小李
|
||||
* @date 14:39 2024/12/12
|
||||
* @param startTime 开始时间 非必传
|
||||
* @param endTime 结束时间 非必传
|
||||
**/
|
||||
IPage<OrderTable> getOrderByDate(@Param("startTime") String startTime, @Param("endTime") String endTime, Page<OrderTable> page);
|
||||
}
|
||||
|
@ -16,6 +16,8 @@ import cn.iocoder.yudao.module.inspection.query.PartnerListQuery;
|
||||
import cn.iocoder.yudao.module.inspection.vo.*;
|
||||
import cn.iocoder.yudao.module.shop.entity.ShopCouponTemplate;
|
||||
import cn.iocoder.yudao.module.shop.entity.ShopMallPartners;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -117,4 +119,14 @@ public interface AppInspectionPartnerService extends IService<ShopMallPartners>
|
||||
* @param ids inspection_info的id
|
||||
**/
|
||||
Map<Long, String> getProjectByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 根据时间查订单
|
||||
*
|
||||
* @author 小李
|
||||
* @date 14:39 2024/12/12
|
||||
* @param startTime 开始时间 非必传
|
||||
* @param endTime 结束时间 非必传
|
||||
**/
|
||||
IPage<OrderTable> getOrderByDate(String startTime, String endTime, Page<OrderTable> page);
|
||||
}
|
||||
|
@ -1940,4 +1940,22 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据时间查订单
|
||||
*
|
||||
* @author 小李
|
||||
* @date 14:39 2024/12/12
|
||||
* @param startTime 开始时间 非必传
|
||||
* @param endTime 结束时间 非必传
|
||||
**/
|
||||
@Override
|
||||
public IPage<OrderTable> getOrderByDate(String startTime, String endTime, Page<OrderTable> page){
|
||||
if (StringUtils.isEmpty(startTime)){
|
||||
startTime = DateUtil.format(new Date(), "yyyy-MM-dd");
|
||||
endTime = DateUtil.format(new Date(), "yyyy-MM-dd");
|
||||
}
|
||||
startTime = startTime + " 00:00:00";
|
||||
endTime = endTime + " 23:59:59";
|
||||
return baseMapper.getOrderByDate(startTime, endTime, page);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,34 @@
|
||||
package cn.iocoder.yudao.module.inspection.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 用于当日订单详情
|
||||
*
|
||||
* @author 小李
|
||||
* @date 14:41 2024/12/12
|
||||
**/
|
||||
@Data
|
||||
public class OrderTable {
|
||||
|
||||
/** 工单ID */
|
||||
private Long id;
|
||||
|
||||
/** 车牌号 */
|
||||
private String carNum;
|
||||
|
||||
/** 检测类型 */
|
||||
private String type;
|
||||
|
||||
/** 检测状态 */
|
||||
private String status;
|
||||
|
||||
/** 检测结果 */
|
||||
private String result;
|
||||
|
||||
/** 是否支付 */
|
||||
private String pay;
|
||||
|
||||
/** 支付方式 */
|
||||
private String payType;
|
||||
}
|
@ -524,4 +524,52 @@ FROM
|
||||
</if>
|
||||
order by pw.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="getOrderByDate" resultType="cn.iocoder.yudao.module.inspection.vo.OrderTable">
|
||||
SELECT t.id,
|
||||
t.carNum,
|
||||
t.type,
|
||||
t.pay,
|
||||
t.payType,
|
||||
CASE
|
||||
WHEN t.status = '已完成' AND t.is_pass = 0 THEN '不合格'
|
||||
WHEN t.status = '已完成' AND t.is_pass = 1 THEN '合格'
|
||||
ELSE ''
|
||||
END AS result,
|
||||
t.status
|
||||
FROM (SELECT ii.id,
|
||||
ii.car_num AS carNum,
|
||||
oi.sku_name AS type,
|
||||
oi.pay_type as payType,
|
||||
CASE
|
||||
WHEN oi.pay_type IS NULL THEN '未支付'
|
||||
ELSE '已支付'
|
||||
END AS pay,
|
||||
CASE
|
||||
WHEN has_status_0_or_null THEN '检测中'
|
||||
WHEN (ii.status = 0 OR ii.status = 2) AND has_status_1 THEN '检测中'
|
||||
WHEN (COALESCE(max_iwn_status, 0) = 2 OR ii.status = 1) THEN '已完成'
|
||||
WHEN (ii.status = 0 OR ii.status = 2) AND COALESCE(max_iwn_status, 0) = 0 THEN '待检测'
|
||||
ELSE '未知状态' -- 这是为了处理任何未预期的情况
|
||||
END AS status,
|
||||
ii.is_pass,
|
||||
COALESCE(max_iwn_status, 0) AS max_iwn_status,
|
||||
oi.create_time
|
||||
FROM order_info oi
|
||||
INNER JOIN
|
||||
inspection_info ii
|
||||
ON
|
||||
oi.id = ii.inspection_order_id
|
||||
LEFT JOIN (SELECT inspection_info_id,
|
||||
MAX(COALESCE(status, 0)) AS max_iwn_status,
|
||||
MAX(CASE WHEN COALESCE(status, 0) = 1 THEN 1 ELSE 0 END) AS has_status_1,
|
||||
MAX(CASE WHEN COALESCE(status, 0) = 0 THEN 1 ELSE 0 END) AS has_status_0_or_null
|
||||
FROM inspection_work_node
|
||||
GROUP BY inspection_info_id) iwn_agg
|
||||
ON
|
||||
ii.id = iwn_agg.inspection_info_id
|
||||
WHERE oi.create_time BETWEEN #{startTime} AND #{endTime}
|
||||
AND oi.deleted = '0') t
|
||||
ORDER BY t.create_time DESC
|
||||
</select>
|
||||
</mapper>
|
||||
|
@ -46,8 +46,8 @@ spring:
|
||||
primary: master
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:mysql://122.51.230.86:3306/lanan_platform_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
||||
# url: jdbc:mysql://122.51.230.86:3306/lanan_platform?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
||||
# url: jdbc:mysql://122.51.230.86:3306/lanan_platform_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
||||
url: jdbc:mysql://122.51.230.86:3306/lanan_platform?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
||||
# url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=true&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai # MySQL Connector/J 5.X 连接的示例
|
||||
# url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro # PostgreSQL 连接的示例
|
||||
# url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例
|
||||
@ -55,10 +55,10 @@ spring:
|
||||
# url: jdbc:dm://127.0.0.1:5236?schema=RUOYI_VUE_PRO # DM 连接的示例
|
||||
# url: jdbc:kingbase8://127.0.0.1:54321/test # 人大金仓 KingbaseES 连接的示例
|
||||
# url: jdbc:postgresql://127.0.0.1:5432/postgres # OpenGauss 连接的示例
|
||||
username: lanan_dev
|
||||
password: lighting@2024
|
||||
# username: lanan
|
||||
# password: 123456
|
||||
# username: lanan_dev
|
||||
# password: lighting@2024
|
||||
username: lanan
|
||||
password: 123456
|
||||
# username: sa # SQL Server 连接的示例
|
||||
# password: Yudao@2024 # SQL Server 连接的示例
|
||||
# username: SYSDBA # DM 连接的示例
|
||||
|
Loading…
Reference in New Issue
Block a user