Merge branch 'dev' of http://122.51.230.86:3000/dianliang/lanan-system into dev
This commit is contained in:
commit
9f05b0b6ba
@ -96,6 +96,14 @@ public class PartnerOwnController extends BaseController {
|
||||
{
|
||||
return success(partnerList.chartInfoAmount(partnerId, unit));
|
||||
}
|
||||
/**
|
||||
* 新检测线图
|
||||
*/
|
||||
@GetMapping("/newChartInfoAmount")
|
||||
public CommonResult newChartInfoAmount(String unit)
|
||||
{
|
||||
return success(partnerList.newChartInfoAmount(unit));
|
||||
}
|
||||
/**staticsTable1
|
||||
* 检测数量折线图
|
||||
*/
|
||||
@ -104,6 +112,14 @@ public class PartnerOwnController extends BaseController {
|
||||
{
|
||||
return success(partnerList.chartLineInspectionNum(partnerId, unit));
|
||||
}
|
||||
/**staticsTable1
|
||||
* 新检测数量折线图
|
||||
*/
|
||||
@GetMapping("/newChartLineInspectionNum")
|
||||
public CommonResult newChartLineInspectionNum(String unit)
|
||||
{
|
||||
return success(partnerList.newChartLineInspectionNum(unit));
|
||||
}
|
||||
/**
|
||||
* 检测金额折线图
|
||||
*/
|
||||
@ -113,6 +129,15 @@ public class PartnerOwnController extends BaseController {
|
||||
return success(partnerList.chartLineInspectionAmount(partnerId, unit));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新检测金额折线图
|
||||
*/
|
||||
@GetMapping("/newChartLineInspectionAmount")
|
||||
public CommonResult newChartLineInspectionAmount(String unit)
|
||||
{
|
||||
return success(partnerList.newChartLineInspectionAmount(unit));
|
||||
}
|
||||
|
||||
/**
|
||||
* 检测线图
|
||||
*/
|
||||
@ -121,6 +146,14 @@ public class PartnerOwnController extends BaseController {
|
||||
{
|
||||
return success(partnerList.chartInfoNum(partnerId, unit));
|
||||
}
|
||||
/**
|
||||
* 新检测线图
|
||||
*/
|
||||
@GetMapping("/newChartInfoNum")
|
||||
public CommonResult newChartInfoNum(String unit)
|
||||
{
|
||||
return success(partnerList.newChartInfoNum( unit));
|
||||
}
|
||||
|
||||
/**
|
||||
* 检测线图
|
||||
@ -130,6 +163,14 @@ public class PartnerOwnController extends BaseController {
|
||||
{
|
||||
return success(partnerList.chartInfoRatio(partnerId, unit));
|
||||
}
|
||||
/**
|
||||
* 新检测线图
|
||||
*/
|
||||
@GetMapping("/newChartInfoRatio")
|
||||
public CommonResult newChartInfoRatio(String unit)
|
||||
{
|
||||
return success(partnerList.newChartInfoRatio(unit));
|
||||
}
|
||||
/**
|
||||
* 首页 订单信息
|
||||
*/
|
||||
@ -146,6 +187,14 @@ public class PartnerOwnController extends BaseController {
|
||||
{
|
||||
return success(partnerList.hotGoodsList(partnerId));
|
||||
}
|
||||
/**
|
||||
* 热销商品列表
|
||||
*/
|
||||
@GetMapping("/newHotGoodsList")
|
||||
public CommonResult newHotGoodsList()
|
||||
{
|
||||
return success(partnerList.newHotGoodsList());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@ -637,6 +686,11 @@ public class PartnerOwnController extends BaseController {
|
||||
ShopMallPartners partners = partnerList.shopInfo();
|
||||
return success(partnerList.staticsTable1(partners.getPartnerId(),startTime,endTime));
|
||||
}
|
||||
//统计表格1
|
||||
@GetMapping("/newStaticsTable1")
|
||||
public CommonResult newStaticsTable1(String startTime,String endTime) throws Exception {
|
||||
return success(partnerList.newStaticsTable1(startTime,endTime));
|
||||
}
|
||||
|
||||
//统计表格2
|
||||
@GetMapping("/staticsTable2")
|
||||
@ -644,12 +698,22 @@ public class PartnerOwnController extends BaseController {
|
||||
ShopMallPartners partners = partnerList.shopInfo();
|
||||
return success(partnerList.staticsTable2(partners.getPartnerId(),startTime,endTime));
|
||||
}
|
||||
//新统计表格2
|
||||
@GetMapping("/newStaticsTable2")
|
||||
public CommonResult newStaticsTable2(String startTime,String endTime) throws Exception {
|
||||
return success(partnerList.newStaticsTable2(startTime,endTime));
|
||||
}
|
||||
//统计表格3
|
||||
@GetMapping("/staticsTable3")
|
||||
public CommonResult staticsTable3(String startTime,String endTime) throws Exception {
|
||||
ShopMallPartners partners = partnerList.shopInfo();
|
||||
return success(partnerList.staticsTable3(partners.getPartnerId(),startTime,endTime));
|
||||
}
|
||||
//新统计表格3
|
||||
@GetMapping("/newStaticsTable3")
|
||||
public CommonResult newStaticsTable3(String startTime,String endTime) throws Exception {
|
||||
return success(partnerList.newStaticsTable3(startTime,endTime));
|
||||
}
|
||||
//统计表格3
|
||||
@GetMapping("/staticsTable3Detail")
|
||||
public CommonResult staticsTable3Detail(String startTime,String endTime,String remark) throws Exception {
|
||||
|
@ -5,6 +5,8 @@ import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.util.ExcelUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@ -39,7 +41,12 @@ public class WarnMessageController extends BaseController
|
||||
return success(list);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/pageList")
|
||||
public CommonResult pageList(WarnMessage warnMessage,Integer pageNo,Integer pageSize) throws Exception {
|
||||
Page page =new Page(pageNo,pageSize);
|
||||
IPage<WarnMessage> list = warnMessageService.pageList(page,warnMessage);
|
||||
return success(list);
|
||||
}
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, WarnMessage warnMessage) throws Exception {
|
||||
List<WarnMessage> list = warnMessageService.selectWarnMessageList(warnMessage);
|
||||
|
@ -20,6 +20,7 @@ import java.util.Map;
|
||||
@Mapper
|
||||
public interface AppInspectionPartnerMapper extends BaseMapper<ShopMallPartners> {
|
||||
ShopMallPartners selectById(@Param("id") Long id);
|
||||
ShopMallPartners selectByIdNew();
|
||||
IPage<PartnerListVo> partnerList(Page<PartnerListVo> page, @Param("vo") PartnerListQuery partnerListQuery);
|
||||
PartnerListVo shopDetail(PartnerListQuery partnerListQuery);
|
||||
void addSalesNum(@Param("partnerId") Long partnerId);
|
||||
@ -32,6 +33,7 @@ public interface AppInspectionPartnerMapper extends BaseMapper<ShopMallPartners>
|
||||
Integer allAmount(@Param("partnerId") Long partnerId);
|
||||
Integer todayAmount(@Param("partnerId") Long partnerId,@Param("timeStr") String timeStr);
|
||||
List<HotGoodsVo> hotGoodsList(@Param("partnerId") Long partnerId,@Param("dateStr")String dateStr);
|
||||
List<HotGoodsVo> newHotGoodsList(@Param("dateStr")String dateStr);
|
||||
IPage<GoodsVo> manageGoodsList(Page<GoodsVo> page,@Param("partnerId") Long partnerId, @Param("isListing")String isListing,@Param("goodsTitle") String goodsTitle);
|
||||
IPage<OrderAppDetail> orderList(Page<OrderAppDetail> page,@Param("partnerId") Long partnerId, @Param("phoneNum") String phoneNum,@Param("title") String title);
|
||||
List<PartnerWorker> getWorkList(@Param("partnerId")Long partnerId, @Param("postId") Long postId, @Param("workName") String workName, @Param("phoneNum")String phoneNum);
|
||||
@ -43,13 +45,20 @@ public interface AppInspectionPartnerMapper extends BaseMapper<ShopMallPartners>
|
||||
IPage<InspectionPickCar> getPickCarListOfWorker(Page<InspectionPickCar> page,@Param("workerId") Long workerId, @Param("phoneNum") String phoneNum);
|
||||
|
||||
List<OrderInfo> chartInfoAmount(@Param("startTime") String startTime,@Param("endTime")String endTime,@Param("partnerId")Long partnerId);
|
||||
List<OrderInfo> newChartInfoAmount(@Param("startTime") String startTime,@Param("endTime")String endTime);
|
||||
List<OrderInfo> chartInfoNum(@Param("startTime") String startTime,@Param("endTime")String endTime,@Param("partnerId")Long partnerId);
|
||||
List<OrderInfo> newChartInfoNum(@Param("startTime") String startTime,@Param("endTime")String endTime);
|
||||
List<Map<String,String>> chartInfoRatio(@Param("startTime") String startTime, @Param("endTime")String endTime, @Param("partnerId")Long partnerId);
|
||||
List<Map<String,String>> newChartInfoRatio(@Param("startTime") String startTime, @Param("endTime")String endTime);
|
||||
List<ShopInspectionCategory> partnerCategoryList(@Param("partnerId") Long partnerId);
|
||||
OrderInfo chartLineInspectionAmount(@Param("partnerId") Long partnerId,@Param("dateStr") String dateStr);
|
||||
OrderInfo newChartLineInspectionAmount(@Param("dateStr") String dateStr);
|
||||
Map<String,Double> staticsTable1(@Param("partnerId") Long partnerId,@Param("startTime") String startTime,@Param("endTime") String endTime);
|
||||
Map<String,Double> newStaticsTable1(@Param("startTime") String startTime,@Param("endTime") String endTime);
|
||||
Map<String,Integer> staticsTable2(@Param("partnerId") Long partnerId,@Param("startTime") String startTime,@Param("endTime") String endTime);
|
||||
Map<String,Integer> newStaticsTable2(@Param("startTime") String startTime,@Param("endTime") String endTime);
|
||||
List<Map<String,Object>> staticsTable3(@Param("partnerId") Long partnerId,@Param("startTime") String startTime,@Param("endTime") String endTime);
|
||||
List<Map<String,Object>> newStaticsTable3(@Param("startTime") String startTime,@Param("endTime") String endTime);
|
||||
List<Map<String,Object>> staticsTable3Detail(@Param("partnerId") Long partnerId,@Param("startTime") String startTime,@Param("endTime") String endTime,@Param("remark") String remark);
|
||||
List<Map<String,Object>> staticsTable4(@Param("partnerId") Long partnerId,@Param("startTime") String startTime,@Param("endTime") String endTime);
|
||||
List<Map<String,Object>> staticsTable5(@Param("partnerId") Long partnerId,@Param("startTime") String startTime,@Param("endTime") String endTime);
|
||||
|
@ -4,7 +4,11 @@ import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import cn.iocoder.yudao.module.inspection.entity.WarnMessage;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
|
||||
/**
|
||||
* warnMsgMapper接口
|
||||
@ -31,4 +35,6 @@ public interface WarnMessageMapper extends BaseMapper<WarnMessage>
|
||||
*/
|
||||
public List<WarnMessage> selectWarnMessageList(WarnMessage warnMessage);
|
||||
|
||||
IPage<WarnMessage> pageList(Page page,@Param("warnMessage") WarnMessage warnMessage);
|
||||
|
||||
}
|
||||
|
@ -38,13 +38,18 @@ public interface AppInspectionPartnerService extends IService<ShopMallPartners>
|
||||
void startOrEnd(Long partnerId);
|
||||
StatisticsInfo statisticsInfo(Long partnerId);
|
||||
JSONObject chartInfoAmount(Long partnerId,String unit);
|
||||
JSONObject newChartInfoAmount(String unit);
|
||||
JSONObject chartLineInspectionNum(Long partnerId,String unit);
|
||||
JSONObject newChartLineInspectionNum(String unit);
|
||||
JSONObject chartLineInspectionAmount(Long partnerId,String unit);
|
||||
|
||||
JSONObject chartInfoNum(Long partnerId,String unit);
|
||||
JSONObject newChartInfoNum(String unit);
|
||||
JSONObject chartInfoRatio(Long partnerId, String unit);
|
||||
JSONObject newChartInfoRatio(String unit);
|
||||
List<OrderInfo> orderInfo(Long partnerId);
|
||||
List<HotGoodsVo> hotGoodsList(Long partnerId);
|
||||
List<HotGoodsVo> newHotGoodsList();
|
||||
void addGoods(ShopInspectionGoods goods) throws Exception;
|
||||
IPage<GoodsVo> goodsList(Page<GoodsVo> page,Long partnerId, String isListing, String goodsTitle);
|
||||
List<JSONObject> canUseGoods(Long partnerId);
|
||||
@ -90,14 +95,17 @@ public interface AppInspectionPartnerService extends IService<ShopMallPartners>
|
||||
String workOrderView(Long inspectionId);
|
||||
List<PostDO> inspectionPostInfo();
|
||||
Map<String,Double> staticsTable1(Long partnerId, String startTime, String endTime);
|
||||
Map<String,Double> newStaticsTable1(String startTime, String endTime);
|
||||
Map<String,Integer> staticsTable2(Long partnerId, String startTime, String endTime);
|
||||
Map<String,Integer> newStaticsTable2(String startTime, String endTime);
|
||||
List<Map<String,Object>> staticsTable3(Long partnerId, String startTime, String endTime);
|
||||
List<Map<String,Object>> newStaticsTable3(String startTime, String endTime);
|
||||
List<Map<String,Object>> staticsTable3Detail(Long partnerId, String startTime, String endTime,String remark);
|
||||
|
||||
List<Map<String,Object>> staticsTable4(Long partnerId, String startTime, String endTime);
|
||||
List<Map<String,Object>> staticsTable5(Long partnerId, String startTime, String endTime);
|
||||
|
||||
|
||||
|
||||
|
||||
//新检测金额折线图
|
||||
JSONObject newChartLineInspectionAmount(String unit);
|
||||
}
|
||||
|
@ -2,6 +2,8 @@ package cn.iocoder.yudao.module.inspection.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import cn.iocoder.yudao.module.inspection.entity.WarnMessage;
|
||||
|
||||
@ -28,6 +30,7 @@ public interface IWarnMessageService extends IService<WarnMessage>
|
||||
* @return warnMsg集合
|
||||
*/
|
||||
public List<WarnMessage> selectWarnMessageList(WarnMessage warnMessage) throws Exception;
|
||||
IPage<WarnMessage> pageList(Page page,WarnMessage warnMessage) throws Exception;
|
||||
|
||||
/**
|
||||
* 新增warnMsg
|
||||
|
@ -336,6 +336,94 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
|
||||
res.put("series",series);
|
||||
return res;
|
||||
}
|
||||
@Override
|
||||
public JSONObject newChartInfoAmount(String unit) {
|
||||
JSONObject res =new JSONObject();
|
||||
List<String> categories =new ArrayList<>();
|
||||
List<JSONObject> series =new ArrayList<>();
|
||||
JSONObject seriesObject=new JSONObject();
|
||||
seriesObject.put("name","金额");
|
||||
List<Double> seriesObjectData =new ArrayList<>();
|
||||
//按照单位日期查询数据
|
||||
//横坐标获取当前商品上架的商品
|
||||
String startTime = null;
|
||||
String endTime = null;
|
||||
if (unit.equals("day")){
|
||||
String format = DateUtil.format(new Date(), "yyyy-MM-dd");
|
||||
startTime = format+" 00:00:00";
|
||||
endTime = format+" 23:59:59";
|
||||
} else if (unit.equals("week")){
|
||||
// 获取当前日期
|
||||
LocalDate currentDate = LocalDate.now();
|
||||
|
||||
// 获取当前周的开始日期
|
||||
LocalDate startOfWeek = currentDate.with(TemporalAdjusters.previousOrSame(java.time.DayOfWeek.MONDAY));
|
||||
|
||||
// 创建日期时间格式化器
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
|
||||
// 将日期格式化为字符串
|
||||
startTime = startOfWeek.atStartOfDay().format(formatter);
|
||||
endTime = DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss");
|
||||
} else if (unit.equals("month")){
|
||||
// 获取当前日期
|
||||
LocalDate currentDate = LocalDate.now();
|
||||
|
||||
// 获取当前月的第一天
|
||||
LocalDate firstDayOfMonth = currentDate.with(TemporalAdjusters.firstDayOfMonth());
|
||||
// 创建日期时间格式化器
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
startTime = firstDayOfMonth.atStartOfDay().format(formatter);
|
||||
endTime = DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss");
|
||||
} else if (unit.equals("year")){
|
||||
// 获取当前日期
|
||||
LocalDate currentDate = LocalDate.now();
|
||||
|
||||
// 获取当前年的第一天
|
||||
LocalDate firstDayOfYear = currentDate.withDayOfYear(1).withMonth(1);
|
||||
// 创建日期时间格式化器
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
startTime = firstDayOfYear.atStartOfDay().format(formatter);
|
||||
endTime = DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss");
|
||||
}else {
|
||||
// 获取当前日期
|
||||
LocalDate currentDate = LocalDate.now();
|
||||
|
||||
// 获取当前周的开始日期
|
||||
LocalDate startOfWeek = currentDate.with(TemporalAdjusters.previousOrSame(java.time.DayOfWeek.MONDAY));
|
||||
|
||||
// 创建日期时间格式化器
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
|
||||
// 将日期格式化为字符串
|
||||
startTime = startOfWeek.atStartOfDay().format(formatter);
|
||||
endTime = DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
//获取商家现有商品
|
||||
LambdaQueryWrapper<ShopInspectionGoods> queryWrapper1 =new LambdaQueryWrapper<>();
|
||||
// queryWrapper1.eq(ShopInspectionGoods::getPartnerId,partnerId);
|
||||
List<ShopInspectionGoods> list1 = goodsService.list(queryWrapper1);
|
||||
List<OrderInfo> list = baseMapper.newChartInfoAmount(startTime,endTime);
|
||||
//统计各个车型的价格 从高到低
|
||||
for (OrderInfo orderInfo : list) {
|
||||
categories.add(orderInfo.getGoodsTitle().indexOf("(")>0?orderInfo.getGoodsTitle().substring(0,orderInfo.getGoodsTitle().indexOf("(")):orderInfo.getGoodsTitle());
|
||||
list1.removeIf(it->{
|
||||
return it.getTitle().equals(orderInfo.getGoodsTitle());
|
||||
});
|
||||
seriesObjectData.add(Double.valueOf(orderInfo.getRealPayMoney())/100);
|
||||
}
|
||||
categories.addAll(list1.stream().map(it->{
|
||||
return it.getTitle().indexOf("(")>0?it.getTitle().substring(0,it.getTitle().indexOf("(")):it.getTitle();
|
||||
}).collect(Collectors.toList()));
|
||||
seriesObjectData.addAll(list1.stream().map(it->{
|
||||
return 0d;
|
||||
}).collect(Collectors.toList()));
|
||||
seriesObject.put("data",seriesObjectData);
|
||||
series.add(seriesObject);
|
||||
res.put("categories",categories);
|
||||
res.put("series",series);
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject chartLineInspectionNum(Long partnerId, String unit) {
|
||||
@ -388,6 +476,52 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
|
||||
res.put("series",series);
|
||||
return res;
|
||||
}
|
||||
@Override
|
||||
public JSONObject newChartLineInspectionNum(String unit) {
|
||||
JSONObject res = new JSONObject();
|
||||
List<String> categories =new ArrayList<>();
|
||||
List<JSONObject> series =new ArrayList<>();
|
||||
JSONObject seriesData1 =new JSONObject();
|
||||
seriesData1.put("name","总数量");
|
||||
List<Long> seriesData1List =new ArrayList<>();
|
||||
JSONObject seriesData2 =new JSONObject();
|
||||
List<Long> seriesData2List =new ArrayList<>();
|
||||
seriesData2.put("name","合格数");
|
||||
// JSONObject seriesData3 =new JSONObject();
|
||||
// List<Long> seriesData3List =new ArrayList<>();
|
||||
// seriesData3.put("name","环检次数");
|
||||
List<String> dateList = new ArrayList<>();
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
for (int i = 0; i < 7; i++) {
|
||||
//先获取最近七天的日期
|
||||
Date date = DateUtils.addDays(new Date(), -i);
|
||||
String formatDate = sdf.format(date);
|
||||
dateList.add(formatDate);
|
||||
}
|
||||
for (String date : dateList) {
|
||||
categories.add(date);
|
||||
LambdaQueryWrapper<InspectionInfo> queryWrapper1 =new LambdaQueryWrapper<>();
|
||||
queryWrapper1.like(InspectionInfo::getStartTime,date);
|
||||
Long sum = inspectionInfoService.count(queryWrapper1);
|
||||
LambdaQueryWrapper<InspectionInfo> queryWrapper2 =new LambdaQueryWrapper<>();
|
||||
queryWrapper2.like(InspectionInfo::getStartTime,date).eq(InspectionInfo::getIsPass,"1");
|
||||
Long passNum = inspectionInfoService.count(queryWrapper2);
|
||||
|
||||
// Long noPassNum = baseMapper.dhjNum(partnerId,date);
|
||||
seriesData1List.add(sum);
|
||||
seriesData2List.add(passNum);
|
||||
// seriesData3List.add(noPassNum);
|
||||
}
|
||||
seriesData1.put("data",seriesData1List);
|
||||
seriesData2.put("data",seriesData2List);
|
||||
// seriesData3.put("data",seriesData3List);
|
||||
series.add(seriesData1);
|
||||
series.add(seriesData2);
|
||||
//series.add(seriesData3);
|
||||
res.put("categories",categories);
|
||||
res.put("series",series);
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject chartLineInspectionAmount(Long partnerId, String unit) {
|
||||
@ -423,6 +557,36 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject newChartLineInspectionAmount(String unit) {
|
||||
// LoginUser user = SecurityFrameworkUtils.getLoginUser();
|
||||
JSONObject res = new JSONObject();
|
||||
List<String> categories =new ArrayList<>();
|
||||
List<JSONObject> series =new ArrayList<>();
|
||||
JSONObject seriesData1 =new JSONObject();
|
||||
seriesData1.put("name","成交金额");
|
||||
List<Long> seriesData1List =new ArrayList<>();
|
||||
List<String> dateList = new ArrayList<>();
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
for (int i = 0; i < 7; i++) {
|
||||
//先获取最近七天的日期
|
||||
Date date = DateUtils.addDays(new Date(), -i);
|
||||
String formatDate = sdf.format(date);
|
||||
dateList.add(formatDate);
|
||||
}
|
||||
for (String date : dateList) {
|
||||
categories.add(date);
|
||||
OrderInfo one = baseMapper.newChartLineInspectionAmount(date);
|
||||
Integer amount = Optional.ofNullable(one.getRealPayMoney()).orElse(0);
|
||||
seriesData1List.add(amount/100L);
|
||||
}
|
||||
seriesData1.put("data",seriesData1List);
|
||||
series.add(seriesData1);
|
||||
res.put("categories",categories);
|
||||
res.put("series",series);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public JSONObject chartInfoNum(Long partnerId,String unit) {
|
||||
@ -517,6 +681,93 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
|
||||
res.put("series",series);
|
||||
return res;
|
||||
}
|
||||
@Override
|
||||
public JSONObject newChartInfoNum(String unit) {
|
||||
JSONObject res =new JSONObject();
|
||||
List<String> categories =new ArrayList<>();
|
||||
List<JSONObject> series =new ArrayList<>();
|
||||
JSONObject seriesObject=new JSONObject();
|
||||
seriesObject.put("name","数量");
|
||||
List<Integer> seriesObjectData =new ArrayList<>();
|
||||
//按照单位日期查询数据
|
||||
//横坐标获取当前商品上架的商品
|
||||
String startTime ;
|
||||
String endTime ;
|
||||
if (unit.equals("day")){
|
||||
String format = DateUtil.format(new Date(), "yyyy-MM-dd");
|
||||
startTime = format+" 00:00:00";
|
||||
endTime = format+" 23:59:59";
|
||||
} else if (unit.equals("week")){
|
||||
// 获取当前日期
|
||||
LocalDate currentDate = LocalDate.now();
|
||||
|
||||
// 获取当前周的开始日期
|
||||
LocalDate startOfWeek = currentDate.with(TemporalAdjusters.previousOrSame(java.time.DayOfWeek.MONDAY));
|
||||
|
||||
// 创建日期时间格式化器
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
|
||||
// 将日期格式化为字符串
|
||||
startTime = startOfWeek.atStartOfDay().format(formatter);
|
||||
endTime = DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss");
|
||||
} else if (unit.equals("month")){
|
||||
// 获取当前日期
|
||||
LocalDate currentDate = LocalDate.now();
|
||||
|
||||
// 获取当前月的第一天
|
||||
LocalDate firstDayOfMonth = currentDate.with(TemporalAdjusters.firstDayOfMonth());
|
||||
// 创建日期时间格式化器
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
startTime = firstDayOfMonth.atStartOfDay().format(formatter);
|
||||
endTime = DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss");
|
||||
} else if (unit.equals("year")){
|
||||
// 获取当前日期
|
||||
LocalDate currentDate = LocalDate.now();
|
||||
|
||||
// 获取当前年的第一天
|
||||
LocalDate firstDayOfYear = currentDate.withDayOfYear(1).withMonth(1);
|
||||
// 创建日期时间格式化器
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
startTime = firstDayOfYear.atStartOfDay().format(formatter);
|
||||
endTime = DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss");
|
||||
}else {
|
||||
// 获取当前日期
|
||||
LocalDate currentDate = LocalDate.now();
|
||||
|
||||
// 获取当前周的开始日期
|
||||
LocalDate startOfWeek = currentDate.with(TemporalAdjusters.previousOrSame(java.time.DayOfWeek.MONDAY));
|
||||
|
||||
// 创建日期时间格式化器
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
|
||||
// 将日期格式化为字符串
|
||||
startTime = startOfWeek.atStartOfDay().format(formatter);
|
||||
endTime = DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
//获取商家现有商品
|
||||
LambdaQueryWrapper<ShopInspectionGoods> queryWrapper1 =new LambdaQueryWrapper<>();
|
||||
List<ShopInspectionGoods> list1 = goodsService.list(queryWrapper1);
|
||||
List<OrderInfo> list = baseMapper.newChartInfoNum(startTime,endTime);
|
||||
//统计各个车型的价格 从高到低
|
||||
for (OrderInfo orderInfo : list) {
|
||||
categories.add(orderInfo.getGoodsTitle().indexOf("(")>0?orderInfo.getGoodsTitle().substring(0,orderInfo.getGoodsTitle().indexOf("(")):orderInfo.getGoodsTitle());
|
||||
list1.removeIf(it->{
|
||||
return it.getTitle().equals(orderInfo.getGoodsTitle());
|
||||
});
|
||||
seriesObjectData.add(orderInfo.getRealPayNum());
|
||||
}
|
||||
categories.addAll(list1.stream().map(it->{
|
||||
return it.getTitle().indexOf("(")>0?it.getTitle().substring(0,it.getTitle().indexOf("(")):it.getTitle();
|
||||
}).collect(Collectors.toList()));
|
||||
seriesObjectData.addAll(list1.stream().map(it->{
|
||||
return 0;
|
||||
}).collect(Collectors.toList()));
|
||||
seriesObject.put("data",seriesObjectData);
|
||||
series.add(seriesObject);
|
||||
res.put("categories",categories);
|
||||
res.put("series",series);
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject chartInfoRatio(Long partnerId, String unit) {
|
||||
@ -616,6 +867,98 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
|
||||
res.put("series",series);
|
||||
return res;
|
||||
}
|
||||
@Override
|
||||
public JSONObject newChartInfoRatio(String unit) {
|
||||
JSONObject res =new JSONObject();
|
||||
List<String> categories =new ArrayList<>();
|
||||
List<JSONObject> series =new ArrayList<>();
|
||||
JSONObject seriesObject=new JSONObject();
|
||||
seriesObject.put("name","合格率");
|
||||
List<Double> seriesObjectData =new ArrayList<>();
|
||||
//按照单位日期查询数据
|
||||
//横坐标获取当前商品上架的商品
|
||||
String startTime ;
|
||||
String endTime ;
|
||||
if (unit.equals("day")){
|
||||
String format = DateUtil.format(new Date(), "yyyy-MM-dd");
|
||||
startTime = format+" 00:00:00";
|
||||
endTime = format+" 23:59:59";
|
||||
} else if (unit.equals("week")){
|
||||
// 获取当前日期
|
||||
LocalDate currentDate = LocalDate.now();
|
||||
|
||||
// 获取当前周的开始日期
|
||||
LocalDate startOfWeek = currentDate.with(TemporalAdjusters.previousOrSame(java.time.DayOfWeek.MONDAY));
|
||||
|
||||
// 创建日期时间格式化器
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
|
||||
// 将日期格式化为字符串
|
||||
startTime = startOfWeek.atStartOfDay().format(formatter);
|
||||
endTime = DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss");
|
||||
} else if (unit.equals("month")){
|
||||
// 获取当前日期
|
||||
LocalDate currentDate = LocalDate.now();
|
||||
|
||||
// 获取当前月的第一天
|
||||
LocalDate firstDayOfMonth = currentDate.with(TemporalAdjusters.firstDayOfMonth());
|
||||
// 创建日期时间格式化器
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
startTime = firstDayOfMonth.atStartOfDay().format(formatter);
|
||||
endTime = DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss");
|
||||
} else if (unit.equals("year")){
|
||||
// 获取当前日期
|
||||
LocalDate currentDate = LocalDate.now();
|
||||
|
||||
// 获取当前年的第一天
|
||||
LocalDate firstDayOfYear = currentDate.withDayOfYear(1).withMonth(1);
|
||||
// 创建日期时间格式化器
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
startTime = firstDayOfYear.atStartOfDay().format(formatter);
|
||||
endTime = DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss");
|
||||
}else {
|
||||
// 获取当前日期
|
||||
LocalDate currentDate = LocalDate.now();
|
||||
|
||||
// 获取当前周的开始日期
|
||||
LocalDate startOfWeek = currentDate.with(TemporalAdjusters.previousOrSame(java.time.DayOfWeek.MONDAY));
|
||||
|
||||
// 创建日期时间格式化器
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
|
||||
// 将日期格式化为字符串
|
||||
startTime = startOfWeek.atStartOfDay().format(formatter);
|
||||
endTime = DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
//获取商家现有商品
|
||||
LambdaQueryWrapper<ShopInspectionGoods> queryWrapper1 =new LambdaQueryWrapper<>();
|
||||
List<ShopInspectionGoods> list1 = goodsService.list(queryWrapper1);
|
||||
List<Map<String,String>> list = baseMapper.newChartInfoRatio(startTime,endTime);
|
||||
//统计各个车型的价格 从高到低
|
||||
for (Map<String,String> orderInfo : list) {
|
||||
categories.add(orderInfo.get("goodsTitle").indexOf("(")>0?orderInfo.get("goodsTitle").substring(0,orderInfo.get("goodsTitle").indexOf("(")):orderInfo.get("goodsTitle"));
|
||||
list1.removeIf(it->{
|
||||
return it.getTitle().equals(orderInfo.get("goodsTitle"));
|
||||
});
|
||||
if (ObjectUtil.isEmpty(orderInfo.get("passRatio"))){
|
||||
seriesObjectData.add(0d);
|
||||
}else {
|
||||
seriesObjectData.add(Double.valueOf(String.valueOf(orderInfo.get("passRatio"))));
|
||||
}
|
||||
|
||||
}
|
||||
categories.addAll(list1.stream().map(it->{
|
||||
return it.getTitle().indexOf("(")>0?it.getTitle().substring(0,it.getTitle().indexOf("(")):it.getTitle();
|
||||
}).collect(Collectors.toList()));
|
||||
seriesObjectData.addAll(list1.stream().map(it->{
|
||||
return 0d;
|
||||
}).collect(Collectors.toList()));
|
||||
seriesObject.put("data",seriesObjectData);
|
||||
series.add(seriesObject);
|
||||
res.put("categories",categories);
|
||||
res.put("series",series);
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OrderInfo> orderInfo(Long partnerId) {
|
||||
@ -640,6 +983,11 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
|
||||
String dateStr = DateUtil.format(new Date(), "yyyy-MM-dd");
|
||||
return baseMapper.hotGoodsList(partnerId,dateStr);
|
||||
}
|
||||
@Override
|
||||
public List<HotGoodsVo> newHotGoodsList() {
|
||||
String dateStr = DateUtil.format(new Date(), "yyyy-MM-dd");
|
||||
return baseMapper.newHotGoodsList(dateStr);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@ -1436,6 +1784,17 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
|
||||
Map<String, Double> map = baseMapper.staticsTable1(partnerId, startTime, endTime);
|
||||
return map;
|
||||
}
|
||||
@Override
|
||||
public Map<String,Double> newStaticsTable1(String startTime,String endTime) {
|
||||
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";
|
||||
Map<String, Double> map = baseMapper.newStaticsTable1(startTime, endTime);
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Integer> staticsTable2(Long partnerId, String startTime, String endTime) {
|
||||
@ -1448,6 +1807,17 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
|
||||
Map<String, Integer> map = baseMapper.staticsTable2(partnerId, startTime, endTime);
|
||||
return map;
|
||||
}
|
||||
@Override
|
||||
public Map<String, Integer> newStaticsTable2(String startTime, String endTime) {
|
||||
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";
|
||||
Map<String, Integer> map = baseMapper.newStaticsTable2( startTime, endTime);
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> staticsTable3(Long partnerId, String startTime, String endTime) {
|
||||
@ -1460,6 +1830,17 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
|
||||
List<Map<String, Object>> res = baseMapper.staticsTable3(partnerId, startTime, endTime);
|
||||
return res;
|
||||
}
|
||||
@Override
|
||||
public List<Map<String, Object>> newStaticsTable3(String startTime, String endTime) {
|
||||
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";
|
||||
List<Map<String, Object>> res = baseMapper.newStaticsTable3(startTime, endTime);
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> staticsTable3Detail(Long partnerId, String startTime, String endTime, String remark) {
|
||||
|
@ -3,6 +3,8 @@ package cn.iocoder.yudao.module.inspection.service.impl;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import cn.iocoder.yudao.util.DateUtils;
|
||||
import cn.iocoder.yudao.module.inspection.service.AppInspectionPartnerService;
|
||||
@ -53,6 +55,15 @@ public class WarnMessageServiceImpl extends ServiceImpl<WarnMessageMapper,WarnMe
|
||||
return warnMessages;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<WarnMessage> pageList(Page page, WarnMessage warnMessage) throws Exception {
|
||||
ShopMallPartners partners = partnerService.shopInfo();
|
||||
warnMessage.setPartnerId(partners.getPartnerId());
|
||||
warnMessage.setIsRead("0");
|
||||
IPage<WarnMessage> warnMessages = baseMapper.pageList(page,warnMessage);
|
||||
return warnMessages;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增warnMsg
|
||||
*
|
||||
|
@ -6,6 +6,9 @@
|
||||
<select id="selectById" resultType="cn.iocoder.yudao.module.shop.entity.ShopMallPartners" >
|
||||
select * from shop_mall_partners where partner_id = #{id}
|
||||
</select>
|
||||
<select id="selectByIdNew" resultType="cn.iocoder.yudao.module.shop.entity.ShopMallPartners" >
|
||||
select * from shop_mall_partners
|
||||
</select>
|
||||
<select id="partnerList" parameterType="cn.iocoder.yudao.module.inspection.query.PartnerListQuery" resultType="cn.iocoder.yudao.module.inspection.vo.PartnerListVo">
|
||||
SELECT
|
||||
smp.partner_logo,
|
||||
@ -143,6 +146,20 @@ GROUP BY
|
||||
goods.id
|
||||
order by salesNum desc
|
||||
</select>
|
||||
<select id="newHotGoodsList" resultType="cn.iocoder.yudao.module.inspection.vo.HotGoodsVo">
|
||||
SELECT
|
||||
goods.title AS goodsName,
|
||||
SUM( case when (ii.`status`='1' and ii.is_pass = '1') or (ii.`status`='0') then oi.goods_price else 0 end ) AS salesAmount,
|
||||
SUM( case when (ii.`status`='1' and ii.is_pass = '1') or (ii.`status`='0') then 1 else 0 end ) AS salesNum
|
||||
FROM
|
||||
order_info oi
|
||||
left join shop_inspection_goods goods on goods.id = oi.goods_id
|
||||
left JOIN inspection_info ii on oi.id = ii.inspection_order_id
|
||||
WHERE validation_time is not null and validation_time like concat(#{dateStr},'%')
|
||||
GROUP BY
|
||||
goods.id
|
||||
order by salesNum desc
|
||||
</select>
|
||||
<select id="manageGoodsList" resultType="cn.iocoder.yudao.module.inspection.vo.GoodsVo">
|
||||
SELECT
|
||||
sig.id as goodsId,sig.title as goodsTitle,sig.image as goodsImage,sig.price,count(oi.id) as salesNum,sig.listing_status,sig.reject_reason
|
||||
@ -277,6 +294,13 @@ FROM
|
||||
group by goods_id
|
||||
order by realPayMoney desc
|
||||
</select>
|
||||
<select id="newChartInfoAmount" resultType="cn.iocoder.yudao.module.payment.entity.OrderInfo">
|
||||
select sum(pay_money) as realPayMoney,goods_title as goodsTitle from
|
||||
order_info
|
||||
where validation_time is not null and validation_time between #{startTime} and #{endTime}
|
||||
group by goods_id
|
||||
order by realPayMoney desc
|
||||
</select>
|
||||
<select id="chartInfoNum" resultType="cn.iocoder.yudao.module.payment.entity.OrderInfo">
|
||||
select count(1) as realPayNum,goods_title as goodsTitle from
|
||||
order_info
|
||||
@ -285,6 +309,13 @@ FROM
|
||||
group by goods_id
|
||||
order by realPayNum desc
|
||||
</select>
|
||||
<select id="newChartInfoNum" resultType="cn.iocoder.yudao.module.payment.entity.OrderInfo">
|
||||
select count(1) as realPayNum,goods_title as goodsTitle from
|
||||
order_info
|
||||
where validation_time is not null and validation_time between #{startTime} and #{endTime}
|
||||
group by goods_id
|
||||
order by realPayNum desc
|
||||
</select>
|
||||
|
||||
<select id="chartInfoRatio" resultType="java.util.Map">
|
||||
SELECT
|
||||
@ -297,6 +328,17 @@ FROM
|
||||
GROUP BY oi.goods_title
|
||||
order by passRatio desc
|
||||
</select>
|
||||
|
||||
<select id="newChartInfoRatio" resultType="java.util.Map">
|
||||
SELECT
|
||||
ROUND((SUM(ins.is_pass='1')/SUM(1))*100,2) as passRatio,oi.goods_title as goodsTitle
|
||||
FROM
|
||||
inspection_info ins
|
||||
inner join order_info oi on oi.id = ins.inspection_order_id
|
||||
WHERE ins.create_time between #{startTime} and #{endTime}
|
||||
GROUP BY oi.goods_title
|
||||
order by passRatio desc
|
||||
</select>
|
||||
<select id="partnerCategoryList" resultType="cn.iocoder.yudao.module.inspection.entity.ShopInspectionCategory">
|
||||
SELECT
|
||||
cate.*
|
||||
@ -317,6 +359,14 @@ FROM
|
||||
INNER JOIN inspection_info ii on oi.id = ii.inspection_order_id
|
||||
WHERE oi.partner_id = #{partnerId} and ii.create_time like concat(#{dateStr},'%') and ii.`status`='1' and ii.is_pass = '1' and oi.validation_time is not null
|
||||
</select>
|
||||
<select id="newChartLineInspectionAmount" resultType="cn.iocoder.yudao.module.payment.entity.OrderInfo">
|
||||
SELECT
|
||||
IFNULL(SUM(oi.pay_money),0)as realPayMoney
|
||||
FROM
|
||||
order_info oi
|
||||
INNER JOIN inspection_info ii on oi.id = ii.inspection_order_id
|
||||
WHERE ii.create_time like concat(#{dateStr},'%') and ii.`status`='1' and ii.is_pass = '1' and oi.validation_time is not null
|
||||
</select>
|
||||
<select id="staticsTable1" resultType="java.util.Map">
|
||||
SELECT
|
||||
ROUND(IFNULL(SUM(oi.goods_price),0)/100) gsAmount,
|
||||
@ -329,6 +379,17 @@ FROM
|
||||
and (ii.`status`='1' and ii.is_pass = '1' or ii.`status`='0')
|
||||
and ii.create_time BETWEEN #{startTime} and #{endTime}
|
||||
</select>
|
||||
<select id="newStaticsTable1" resultType="java.util.Map">
|
||||
SELECT
|
||||
ROUND(IFNULL(SUM(oi.goods_price),0)/100) gsAmount,
|
||||
ROUND(IFNULL(SUM(case when ii.`status`='1' and ii.is_pass = '1' then oi.pay_money else 0 end)/100,0)) ysAmount,
|
||||
ROUND(IFNULL(SUM(case when ii.`status`='1' and ii.is_pass = '1' and oi.validation_time is not null then oi.pay_money else 0 end)/100,0)) yjsAmount
|
||||
FROM
|
||||
order_info oi
|
||||
INNER JOIN inspection_info ii on oi.id = ii.inspection_order_id
|
||||
WHERE (ii.`status`='1' and ii.is_pass = '1' or ii.`status`='0')
|
||||
and ii.create_time BETWEEN #{startTime} and #{endTime}
|
||||
</select>
|
||||
<select id="staticsTable2" resultType="java.util.Map">
|
||||
SELECT
|
||||
count(1) allNum,
|
||||
@ -339,6 +400,15 @@ FROM
|
||||
WHERE ii.partner_id =#{partnerId}
|
||||
and ii.create_time BETWEEN #{startTime} and #{endTime}
|
||||
</select>
|
||||
<select id="newStaticsTable2" resultType="java.util.Map">
|
||||
SELECT
|
||||
count(1) allNum,
|
||||
IFNULL(SUM(ii.status='0'),0) jxzNum,
|
||||
IFNULL(SUM(ii.status='1'),0) ywcNum
|
||||
FROM
|
||||
inspection_info ii
|
||||
WHERE ii.create_time BETWEEN #{startTime} and #{endTime}
|
||||
</select>
|
||||
<select id="staticsTable3" resultType="java.util.Map">
|
||||
SELECT
|
||||
ii.customer_source customerSource,IFNULL(sdd.remark,'未知类别') remark,count(1) theNum, ROUND(IFNULL(SUM(oi.goods_price),0)/100) theAmount
|
||||
@ -352,6 +422,18 @@ FROM
|
||||
having count(1)>0
|
||||
order by theNum desc
|
||||
</select>
|
||||
<select id="newStaticsTable3" resultType="java.util.Map">
|
||||
SELECT
|
||||
ii.customer_source customerSource,IFNULL(sdd.remark,'未知类别') remark,count(1) theNum, ROUND(IFNULL(SUM(oi.goods_price),0)/100) theAmount
|
||||
FROM
|
||||
order_info oi
|
||||
INNER JOIN inspection_info ii on oi.id = ii.inspection_order_id
|
||||
left join system_dict_data sdd on sdd.value = ii.customer_source
|
||||
WHERE ii.create_time BETWEEN #{startTime} and #{endTime}
|
||||
GROUP BY sdd.remark
|
||||
having count(1)>0
|
||||
order by theNum desc
|
||||
</select>
|
||||
<select id="staticsTable3Detail" resultType="java.util.Map">
|
||||
SELECT
|
||||
ii.customer_source customerSource,oi.goods_title as goodsTitle,IFNULL(sdd.remark,'未知类别') remark,count(1) theNum, ROUND(IFNULL(SUM(oi.goods_price),0)/100) theAmount
|
||||
|
@ -209,8 +209,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</if>
|
||||
</select>
|
||||
<select id="pageWorkOrder" resultType="cn.iocoder.yudao.module.inspection.entity.InspectionInfo">
|
||||
select ins.*,oi.goods_title,su.nickname as buyName,su.mobile as buyPhone,oi.sku_name,oi.pay_money as realPayMoney
|
||||
,oi.pay_type,oi.order_status as orderStatus,oi.goods_id,oi.sku_id,oi.pay_time,oi.goods_price,ins.create_time
|
||||
select distinct ins.*,oi.goods_title,su.nickname as buyName,su.mobile as buyPhone,oi.sku_name,oi.pay_money as realPayMoney
|
||||
,oi.pay_type,oi.order_status as orderStatus,oi.goods_id,oi.sku_id,oi.pay_time,oi.goods_price
|
||||
from inspection_info ins
|
||||
left join order_info oi on oi.id = ins.inspection_order_id
|
||||
left join system_users su on su.id = ins.user_id
|
||||
|
@ -20,7 +20,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
select * from warn_message
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="pageList" resultType="cn.iocoder.yudao.module.inspection.entity.WarnMessage">
|
||||
select * from warn_message
|
||||
<where>
|
||||
and warn_time <![CDATA[<=]]> NOW()
|
||||
<if test="warnMessage.title != null and warnMessage.title != ''"> and title = #{warnMessage.title}</if>
|
||||
<if test="warnMessage.partnerId != null "> and partner_id = #{warnMessage.partnerId}</if>
|
||||
<if test="warnMessage.isRead != null and warnMessage.isRead != ''"> and is_read = #{warnMessage.isRead}</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
@ -267,44 +267,13 @@ public class DriveSchoolInfoServiceImpl implements IDriveSchoolInfoService
|
||||
*/
|
||||
@Override
|
||||
public DriveSchoolInfoVO getSchoolInfoByDeptId(Long deptId) {
|
||||
// 记录deptId
|
||||
System.out.println("Dept ID: " + deptId);
|
||||
|
||||
// 获取教练id
|
||||
Long jlId = 0L;
|
||||
|
||||
// 根据当前用户的手机号获取教练信息
|
||||
Long userId = SecurityFrameworkUtils.getLoginUserId();
|
||||
AdminUserRespDTO sysUser = userApi.getUser(userId);
|
||||
String phonenumber = sysUser.getMobile();
|
||||
System.out.println("当前用户手机号: " + phonenumber);
|
||||
|
||||
// 获取教练信息
|
||||
DriveSchoolCoach driveSchoolCoach = driveSchoolCoachMapper.selectByPhonenumber(phonenumber);
|
||||
if (driveSchoolCoach != null) {
|
||||
jlId = driveSchoolCoach.getId();
|
||||
System.out.println("教练ID: " + jlId);
|
||||
} else {
|
||||
System.err.println("未找到手机号为 " + phonenumber + " 的教练信息");
|
||||
// 可以选择抛出异常或返回默认值
|
||||
}
|
||||
|
||||
// 获取驾校信息
|
||||
DriveSchoolInfoVO schoolInfoByDeptId = driveSchoolInfoMapper.getSchoolInfoByDeptId(deptId);
|
||||
|
||||
if (schoolInfoByDeptId != null) {
|
||||
schoolInfoByDeptId.setJlId(jlId);
|
||||
} else {
|
||||
System.err.println("未找到部门 ID 为 " + deptId + " 的驾校信息");
|
||||
throw new RuntimeException("未找到指定部门的驾校信息");
|
||||
}
|
||||
|
||||
return schoolInfoByDeptId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public List<PayVo> findSelfSchoolData() {
|
||||
|
||||
@ -319,15 +288,6 @@ public class DriveSchoolInfoServiceImpl implements IDriveSchoolInfoService
|
||||
return payVoList;
|
||||
}
|
||||
|
||||
/*@Override
|
||||
public DriveSchoolInfo selectDriveSchoolInfoAppletById(Long id) {
|
||||
DriveSchoolInfo driveSchoolInfo = driveSchoolInfoMapper.selectDriveSchoolInfoById(id);
|
||||
double lat = driveSchoolInfo1.getLat().doubleValue();
|
||||
double lgt = driveSchoolInfo1.getLgt().doubleValue();
|
||||
double distance = calculateDistance(driveSchoolInfo.getLat().doubleValue(), driveSchoolInfo.getLgt().doubleValue(), lat, lgt);
|
||||
driveSchoolInfo1.setDistance(distance/1000);
|
||||
return null;
|
||||
}*/
|
||||
|
||||
/**
|
||||
* 计算两个经纬度之间的距离
|
||||
|
@ -152,7 +152,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<select id="getSchoolInfoByDeptId" parameterType="Long" resultMap="DriveSchoolInfoVOResult">
|
||||
<include refid="selectDriveSchoolInfoVo"/>
|
||||
where deleted = 0 and dept_id = #{deptId}
|
||||
where deleted = 0
|
||||
</select>
|
||||
|
||||
|
||||
|
@ -128,6 +128,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
AND list_order = #{driveSchoolSwiper.listOrder}
|
||||
</if>
|
||||
</if>
|
||||
|
||||
</where>
|
||||
ORDER BY list_order ASC
|
||||
</select>
|
||||
|
@ -0,0 +1,44 @@
|
||||
package cn.iocoder.yudao.common;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 领料单/采购单/退料单状态
|
||||
*
|
||||
* @author 小李
|
||||
* @date 12:13 2024/10/21
|
||||
**/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum SoStatusEnum {
|
||||
/** 待审核 */
|
||||
PENDING_REVIEW("01", "待审核"),
|
||||
|
||||
/** 采购中 */
|
||||
PURCHASING("02", "采购中"),
|
||||
|
||||
/** 已入库 */
|
||||
WAREHOUSING("03", "已入库"),
|
||||
|
||||
/** 待领料 */
|
||||
TO_BE_PICKED("04", "待领料"),
|
||||
|
||||
/** 已领料 */
|
||||
PICKED("05", "已领料"),
|
||||
|
||||
/** 已作废 */
|
||||
DEPRECATED("06", "已作废"),
|
||||
|
||||
/** 待退料 */
|
||||
TO_BE_RETURNED("07", "待退料"),
|
||||
|
||||
/** 已退料 */
|
||||
RETURNED("08", "已退料");
|
||||
|
||||
/** 状态值 */
|
||||
private final String code;
|
||||
|
||||
/** 状态名 */
|
||||
private final String name;
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package cn.iocoder.yudao.common;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 维修工单子表(配件/项目)状态枚举
|
||||
*
|
||||
* @author vinjor-m
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum TicketsItemStatusEnum {
|
||||
/**
|
||||
* 待派工
|
||||
*/
|
||||
WAITING_WORK("01","待派工"),
|
||||
/**
|
||||
* 施工中
|
||||
*/
|
||||
WORKING("02","施工中"),
|
||||
/**
|
||||
* 已完成
|
||||
*/
|
||||
DONE("03","已完成"),
|
||||
/**
|
||||
* 未领料
|
||||
*/
|
||||
WAITING_RECEIVE("04","未领料"),
|
||||
/**
|
||||
* 已领料
|
||||
*/
|
||||
RECEIVED("05","已领料");
|
||||
|
||||
/**
|
||||
* code
|
||||
*/
|
||||
private String code;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 根据code返回对应的枚举
|
||||
* @author vinjor-M
|
||||
* @date 14:23 2024/10/16
|
||||
* @param code 枚举code
|
||||
* @return cn.iocoder.yudao.common.SystemEnum
|
||||
**/
|
||||
public static TicketsItemStatusEnum getEnumByCode(String code) {
|
||||
for (TicketsItemStatusEnum roleEnum : TicketsItemStatusEnum.values()) {
|
||||
if (roleEnum.getCode().equalsIgnoreCase(code)) {
|
||||
// 找到对应的枚举
|
||||
return roleEnum;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("无效的枚举code:" + code);
|
||||
}
|
||||
|
||||
}
|
@ -19,7 +19,7 @@ public interface RepairRecordsService extends IService<RepairRecords> {
|
||||
* 保存维修记录
|
||||
*
|
||||
* @param ticketId 工单id
|
||||
* @param repairItemId 工单子表id
|
||||
// * @param repairItemId 工单子表id
|
||||
* @param type 工作类型(数据字典:repair_records_type;后端对应 RecordTypeEnum 枚举)
|
||||
* @param remark 备注
|
||||
* @param images 图片(相对路径按照“,”分隔)
|
||||
|
@ -6,22 +6,17 @@ import cn.iocoder.yudao.module.project.service.RepairWaresService;
|
||||
import cn.iocoder.yudao.module.project.vo.RepairWaresPageReqVO;
|
||||
import cn.iocoder.yudao.module.project.vo.RepairWaresRespVO;
|
||||
import cn.iocoder.yudao.module.project.vo.RepairWaresSaveReqVO;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 配件库")
|
||||
@ -129,5 +124,15 @@ public class RepairWaresController {
|
||||
return success(waresService.getWaresByName(name));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询所有有配件的分类
|
||||
* @author vinjor-M
|
||||
* @date 10:51 2024/10/22
|
||||
**/
|
||||
@GetMapping("/getAllTypeList")
|
||||
@Operation(summary = "查询所有有配件的分类")
|
||||
public CommonResult<?> getAllTypeList() {
|
||||
return success(waresService.getAllTypeList());
|
||||
}
|
||||
|
||||
}
|
@ -9,6 +9,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 配件库 Mapper
|
||||
*
|
||||
@ -35,4 +38,12 @@ public interface RepairWaresMapper extends BaseMapper<RepairWares> {
|
||||
* @date 18:03 2024/9/25
|
||||
**/
|
||||
RepairWaresRespVO getWaresByName(@Param("name") String name);
|
||||
|
||||
/**
|
||||
* 查询所有有配件的分配
|
||||
* @author vinjor-M
|
||||
* @date 10:54 2024/10/22
|
||||
* @return java.util.List<java.util.Map<java.lang.String,java.lang.String>>
|
||||
**/
|
||||
List<Map<String,String>> selectAllType();
|
||||
}
|
@ -8,6 +8,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 配件库 Service 接口
|
||||
*
|
||||
@ -60,4 +63,12 @@ public interface RepairWaresService extends IService<RepairWares> {
|
||||
* @date 18:03 2024/9/25
|
||||
**/
|
||||
RepairWaresRespVO getWaresByName(String name);
|
||||
|
||||
/**
|
||||
* 查询所有有配件的分配
|
||||
* @author vinjor-M
|
||||
* @date 10:53 2024/10/22
|
||||
* @return java.util.List<java.util.Map<java.lang.String,java.lang.String>>
|
||||
**/
|
||||
List<Map<String,String>> getAllTypeList();
|
||||
}
|
@ -16,6 +16,8 @@ import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 配件库 Service 实现类
|
||||
@ -100,4 +102,16 @@ public class RepairWaresServiceImpl extends ServiceImpl<RepairWaresMapper, Repai
|
||||
return waresMapper.getWaresByName(name);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询所有有配件的分配
|
||||
*
|
||||
* @return java.util.List<java.util.Map < java.lang.String, java.lang.String>>
|
||||
* @author vinjor-M
|
||||
* @date 10:53 2024/10/22
|
||||
**/
|
||||
@Override
|
||||
public List<Map<String, String>> getAllTypeList() {
|
||||
return waresMapper.selectAllType();
|
||||
}
|
||||
|
||||
}
|
@ -87,5 +87,33 @@ public class DlRepairSoController {
|
||||
public CommonResult<?> getRepairSoById(@RequestParam("id") String id){
|
||||
return success(dlRepairSoService.getRepairSoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 员工确认领料
|
||||
*
|
||||
* @author 小李
|
||||
* @date 11:58 2024/10/21
|
||||
* @param id 单据ID 领料单主表
|
||||
**/
|
||||
@GetMapping("/confirmGet")
|
||||
@Operation(summary = "员工确认领料")
|
||||
public CommonResult<?> confirmGet(@RequestParam("id") String id){
|
||||
dlRepairSoService.confirmGet(id);
|
||||
return CommonResult.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 员工确认退料
|
||||
*
|
||||
* @author 小李
|
||||
* @date 19:41 2024/10/21
|
||||
* @param id 退料单主表ID
|
||||
**/
|
||||
@GetMapping("/confirmBack")
|
||||
@Operation(summary = "员工确认退料")
|
||||
public CommonResult<?> confirmBack(@RequestParam("id") String id){
|
||||
dlRepairSoService.confirmBack(id);
|
||||
return CommonResult.ok();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -62,5 +62,18 @@ public class DlRepairSoiController{
|
||||
public CommonResult<?> getRepairSoiByIds(@RequestParam(value = "ids") List<String> ids){
|
||||
return success(dlRepairSoiService.getRepairSoiByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 按主表ID查
|
||||
*
|
||||
* @author 小李
|
||||
* @date 11:22 2024/10/21
|
||||
* @param soId 主表ID
|
||||
**/
|
||||
@GetMapping("/getBySoId")
|
||||
@Operation(summary = "按主表ID查")
|
||||
public CommonResult<?> getRepairSoiBySoId(@RequestParam(value = "soId") String soId){
|
||||
return success(dlRepairSoiService.getRepairSoiBySoId(soId));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,6 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@ -109,4 +108,13 @@ public class DlRepairSo extends TenantBaseDO {
|
||||
* 部门ID(system_dept表的ID)
|
||||
*/
|
||||
private Long deptId;
|
||||
|
||||
/** 关联的配件申请单的id(dl_ticket_wares表的ID) */
|
||||
private String twId;
|
||||
|
||||
/**
|
||||
* 车牌号
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String licenseNumber;
|
||||
}
|
@ -1,7 +1,9 @@
|
||||
package cn.iocoder.yudao.module.stockOperate.entity;
|
||||
|
||||
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
|
||||
import cn.iocoder.yudao.module.project.entity.RepairWares;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
@ -67,4 +69,15 @@ public class DlRepairSoi extends TenantBaseDO {
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 配件信息
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private RepairWares wares;
|
||||
/**
|
||||
* 配件类型名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String typeName;
|
||||
}
|
@ -17,6 +17,17 @@ import org.apache.ibatis.annotations.Param;
|
||||
public interface DlRepairSoMapper extends BaseMapper<DlRepairSo> {
|
||||
|
||||
IPage<DlRepairSo> getRepairSoPage(@Param("map") DlRepairSoReqVO repairSoReqVO, Page<DlRepairSo> page);
|
||||
|
||||
/**
|
||||
* 根据条件查询指定数量:待确认的领料单 待确认的退料单
|
||||
* @author vinjor-M
|
||||
* @date 16:09 2024/10/22
|
||||
* @param type 02 领料单 |04 退料单
|
||||
* @param userId 用户ID
|
||||
* @param status 04 待领料状态 |07 待退料状态
|
||||
* @return java.lang.Integer
|
||||
**/
|
||||
Integer selectCountNum(@Param("type") String type,@Param("userId") Long userId,@Param("status") String status);
|
||||
}
|
||||
|
||||
|
||||
|
@ -49,4 +49,22 @@ public interface DlRepairSoService extends IService<DlRepairSo> {
|
||||
* @param id 主键
|
||||
**/
|
||||
DlRepairSoRespVO getRepairSoById(String id);
|
||||
|
||||
/**
|
||||
* 员工确认领料
|
||||
*
|
||||
* @author 小李
|
||||
* @date 11:58 2024/10/21
|
||||
* @param id 单据ID 领料单主表
|
||||
**/
|
||||
void confirmGet(String id);
|
||||
|
||||
/**
|
||||
* 员工确认退料
|
||||
*
|
||||
* @author 小李
|
||||
* @date 19:41 2024/10/21
|
||||
* @param id 退料单主表ID
|
||||
**/
|
||||
void confirmBack(String id);
|
||||
}
|
||||
|
@ -33,4 +33,13 @@ public interface DlRepairSoiService extends IService<DlRepairSoi> {
|
||||
* @param ids ids
|
||||
**/
|
||||
List<DlRepairSoiQueryRespVO> getRepairSoiByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 按主表ID查
|
||||
*
|
||||
* @author 小李
|
||||
* @date 11:22 2024/10/21
|
||||
* @param soId 主表ID
|
||||
**/
|
||||
List<DlRepairSoiQueryRespVO> getRepairSoiBySoId(String soId);
|
||||
}
|
||||
|
@ -4,7 +4,9 @@ import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.iocoder.yudao.common.RepairErrorCodeConstants;
|
||||
import cn.iocoder.yudao.common.SoStatusEnum;
|
||||
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import cn.iocoder.yudao.module.base.service.RepairWorkerService;
|
||||
import cn.iocoder.yudao.module.company.entity.Company;
|
||||
import cn.iocoder.yudao.module.company.service.CompanyService;
|
||||
import cn.iocoder.yudao.module.project.entity.RepairWares;
|
||||
@ -18,6 +20,14 @@ import cn.iocoder.yudao.module.stockOperate.vo.DlRepairSoReqVO;
|
||||
import cn.iocoder.yudao.module.stockOperate.vo.DlRepairSoRespVO;
|
||||
import cn.iocoder.yudao.module.system.api.dept.DeptApi;
|
||||
import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
|
||||
import cn.iocoder.yudao.module.tickets.entity.DlRepairTickets;
|
||||
import cn.iocoder.yudao.module.tickets.entity.DlRepairTitem;
|
||||
import cn.iocoder.yudao.module.tickets.entity.DlTicketWares;
|
||||
import cn.iocoder.yudao.module.tickets.entity.DlTwItem;
|
||||
import cn.iocoder.yudao.module.tickets.service.DlRepairTicketsService;
|
||||
import cn.iocoder.yudao.module.tickets.service.DlRepairTitemService;
|
||||
import cn.iocoder.yudao.module.tickets.service.DlTicketWaresService;
|
||||
import cn.iocoder.yudao.module.tickets.service.DlTwItemService;
|
||||
import com.baomidou.dynamic.datasource.annotation.DSTransactional;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
@ -28,9 +38,12 @@ import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
@ -58,24 +71,46 @@ public class DlRepairSoServiceImpl extends ServiceImpl<DlRepairSoMapper, DlRepai
|
||||
@Lazy
|
||||
private RepairWaresService waresService;
|
||||
|
||||
@Resource
|
||||
@Lazy
|
||||
private DlTicketWaresService ticketWaresService;
|
||||
|
||||
@Resource
|
||||
@Lazy
|
||||
private DlTwItemService twItemService;
|
||||
|
||||
@Resource
|
||||
@Lazy
|
||||
private DlRepairTicketsService ticketsService;
|
||||
|
||||
@Resource
|
||||
@Lazy
|
||||
private DlRepairTitemService titemService;
|
||||
|
||||
@Resource
|
||||
@Lazy
|
||||
private RepairWorkerService repairWorkerService;
|
||||
|
||||
/**
|
||||
* 采购单/领料单 新增
|
||||
*
|
||||
* @param repairSoRespVO 采购单对象
|
||||
* @author 小李
|
||||
* @date 10:49 2024/9/14
|
||||
* @param repairSoRespVO 采购单对象
|
||||
**/
|
||||
@DSTransactional
|
||||
@Override
|
||||
public void createRepairSo(DlRepairSoRespVO repairSoRespVO){
|
||||
public void createRepairSo(DlRepairSoRespVO repairSoRespVO) {
|
||||
repairSoRespVO.setSoTime(new Date());
|
||||
// 取当前登录用户的门店信息
|
||||
Long deptId = SecurityFrameworkUtils.getLoginUserDeptId();
|
||||
repairSoRespVO.setDeptId(deptId);
|
||||
|
||||
DeptRespDTO dept = deptApi.getDept(deptId);
|
||||
if (ObjectUtil.isNotEmpty(dept)){
|
||||
if (ObjectUtil.isNotEmpty(dept)) {
|
||||
repairSoRespVO.setCorpId(dept.getCorpId());
|
||||
Company company = companyService.getById(dept.getCorpId());
|
||||
if (ObjectUtil.isNotEmpty(company)){
|
||||
if (ObjectUtil.isNotEmpty(company)) {
|
||||
repairSoRespVO.setCorpName(company.getCorpName());
|
||||
}
|
||||
}
|
||||
@ -83,7 +118,7 @@ public class DlRepairSoServiceImpl extends ServiceImpl<DlRepairSoMapper, DlRepai
|
||||
// 新增主表
|
||||
baseMapper.insertOrUpdate(repairSoRespVO);
|
||||
// 新增子表
|
||||
if (CollectionUtil.isEmpty(repairSoRespVO.getGoodsList())){
|
||||
if (CollectionUtil.isEmpty(repairSoRespVO.getGoodsList())) {
|
||||
throw exception(RepairErrorCodeConstants.GOODS_IS_EMPTY);
|
||||
}
|
||||
repairSoRespVO.getGoodsList().forEach(item -> {
|
||||
@ -123,40 +158,244 @@ public class DlRepairSoServiceImpl extends ServiceImpl<DlRepairSoMapper, DlRepai
|
||||
* @date 18:14 2024/9/14
|
||||
**/
|
||||
@Override
|
||||
public IPage<DlRepairSo> getRepairSoPage(DlRepairSoReqVO repairSoReqVO, Page<DlRepairSo> page){
|
||||
public IPage<DlRepairSo> getRepairSoPage(DlRepairSoReqVO repairSoReqVO, Page<DlRepairSo> page) {
|
||||
return baseMapper.getRepairSoPage(repairSoReqVO, page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 采购单/领料单 作废
|
||||
*
|
||||
* @param repairSoReqVO 作废对象
|
||||
* @author 小李
|
||||
* @date 11:12 2024/9/18
|
||||
* @param repairSoReqVO 作废对象
|
||||
**/
|
||||
@Override
|
||||
public void voidRepairSo(DlRepairSoReqVO repairSoReqVO){
|
||||
public void voidRepairSo(DlRepairSoReqVO repairSoReqVO) {
|
||||
baseMapper.updateById(repairSoReqVO);
|
||||
|
||||
// 下面的代码是因为这个接口还有地方在用
|
||||
// 查主表
|
||||
DlRepairSo so = baseMapper.selectById(repairSoReqVO.getId());
|
||||
// 查当前登录操作人的userId
|
||||
Long loginUserId = SecurityFrameworkUtils.getLoginUserId();
|
||||
// 如果主表记录的领退料人与操作人一致,即是员工点击的作废,即需要通知仓库
|
||||
boolean flag = so.getUserId().equals(loginUserId);
|
||||
if (flag){
|
||||
repairWorkerService.sentMessage(Long.valueOf(so.getCreator()), (so.getSoType().equals("02") ? "领料单:" : "退料单:") + so.getSoNo() + "已被" + so.getUserName() + "作废");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 采购单/领料单 查看
|
||||
*
|
||||
* @param id 主键
|
||||
* @author 小李
|
||||
* @date 9:34 2024/9/22
|
||||
* @param id 主键
|
||||
**/
|
||||
@Override
|
||||
public DlRepairSoRespVO getRepairSoById(String id){
|
||||
public DlRepairSoRespVO getRepairSoById(String id) {
|
||||
// 查主表
|
||||
DlRepairSo dlRepairSo = baseMapper.selectById(id);
|
||||
DlRepairSoRespVO result = BeanUtil.toBean(dlRepairSo, DlRepairSoRespVO.class);
|
||||
|
||||
// 查子表
|
||||
List<DlRepairSoi> list = repairSoiService.list(new LambdaQueryWrapper<DlRepairSoi>().eq(DlRepairSoi::getSoId, result.getId()));
|
||||
if(!list.isEmpty()){
|
||||
//所有有配件的分类
|
||||
List<Map<String,String>> typeMapList = waresService.getAllTypeList();
|
||||
Map<String,String> typeMap = new HashMap<>();
|
||||
for(Map<String,String> map:typeMapList){
|
||||
typeMap.put(map.get("id"),map.get("name"));
|
||||
}
|
||||
//关联查配件信息
|
||||
List<RepairWares> repairWaresList = waresService.listByIds(list.stream().map(DlRepairSoi::getGoodsId).collect(Collectors.toList()));
|
||||
Map<String,RepairWares> waresMap = repairWaresList.stream().collect(Collectors.toMap(RepairWares::getId, Function.identity()));
|
||||
list.forEach(item->{
|
||||
item.setWares(waresMap.get(item.getGoodsId()));
|
||||
item.setTypeName(typeMap.get(item.getWares().getType()));
|
||||
});
|
||||
}
|
||||
result.setGoodsList(list);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 员工确认领料
|
||||
*
|
||||
* @param id 单据ID 领料单主表
|
||||
* @author 小李
|
||||
* @date 11:58 2024/10/21
|
||||
**/
|
||||
@Override
|
||||
@DSTransactional
|
||||
public void confirmGet(String id) {
|
||||
// 查子表
|
||||
List<DlRepairSoi> sois = repairSoiService
|
||||
.list(new LambdaQueryWrapper<DlRepairSoi>()
|
||||
.eq(DlRepairSoi::getSoId, id)
|
||||
);
|
||||
// 查库存
|
||||
List<RepairWares> wares = waresService
|
||||
.list(new LambdaQueryWrapper<RepairWares>()
|
||||
.in(RepairWares::getId, sois.stream()
|
||||
.map(DlRepairSoi::getGoodsId)
|
||||
.collect(Collectors.toList())
|
||||
));
|
||||
// 更新库存
|
||||
List<RepairWares> newWares = wares.stream().map(item -> {
|
||||
RepairWares ware = new RepairWares();
|
||||
ware.setId(item.getId());
|
||||
sois.stream().filter(i -> i.getGoodsId().equals(item.getId())).findFirst().ifPresent(i -> {
|
||||
ware.setStock(item.getStock().subtract(BigDecimal.valueOf(i.getGoodsCount())));
|
||||
});
|
||||
return ware;
|
||||
}).collect(Collectors.toList());
|
||||
waresService.updateBatchById(newWares);
|
||||
// 更新主表状态 为已领料
|
||||
DlRepairSo dlRepairSo = new DlRepairSo();
|
||||
dlRepairSo.setId(id);
|
||||
dlRepairSo.setSoStatus(SoStatusEnum.PICKED.getCode());
|
||||
baseMapper.updateById(dlRepairSo);
|
||||
|
||||
// 更新申请表的数据
|
||||
DlRepairSo so = baseMapper.selectOne(new LambdaQueryWrapper<DlRepairSo>().eq(DlRepairSo::getId, id));
|
||||
// 查申请表的子表对应的配件信息
|
||||
List<DlTwItem> twItems = twItemService.list(new LambdaQueryWrapper<DlTwItem>().and(item -> {
|
||||
item.eq(DlTwItem::getTwId, so.getTwId())
|
||||
.in(DlTwItem::getWaresId, sois.stream().map(DlRepairSoi::getGoodsId).collect(Collectors.toList()));
|
||||
}));
|
||||
// 更新子表
|
||||
List<DlTwItem> newTwItems = twItems.stream().map(item -> {
|
||||
DlTwItem dlTwItem = new DlTwItem();
|
||||
dlTwItem.setId(item.getId());
|
||||
dlTwItem.setWaresAlreadyCount(ObjectUtil.isNotEmpty(item.getWaresAlreadyCount()) ? item.getWaresAlreadyCount() + item.getWaresCouldCount() : item.getWaresCouldCount());
|
||||
dlTwItem.setWaresStatus(dlTwItem.getWaresAlreadyCount().equals(item.getWaresCount()) ? "01" : item.getWaresStatus());
|
||||
return dlTwItem;
|
||||
}).collect(Collectors.toList());
|
||||
twItemService.updateBatchById(newTwItems);
|
||||
|
||||
// 查最新的子表信息
|
||||
List<DlTwItem> list = twItemService.list(new LambdaQueryWrapper<DlTwItem>().eq(DlTwItem::getTwId, so.getTwId()));
|
||||
// 判断是部分完成还是全部完成
|
||||
DlTicketWares dlTicketWares = new DlTicketWares();
|
||||
dlTicketWares.setId(so.getTwId());
|
||||
List<DlTwItem> flag = list.stream().filter(item -> !item.getWaresStatus().equals("01")).collect(Collectors.toList());
|
||||
dlTicketWares.setStatus(CollectionUtil.isEmpty(flag) ? "03" : "04");
|
||||
ticketWaresService.updateById(dlTicketWares);
|
||||
|
||||
// 查主表记录
|
||||
DlRepairSo newSo = baseMapper.selectById(id);
|
||||
// 通知仓库
|
||||
repairWorkerService.sentMessage(Long.valueOf(newSo.getCreator()), newSo.getUserName() + "已确认领料单:" + newSo.getSoNo());
|
||||
}
|
||||
|
||||
/**
|
||||
* 员工确认退料
|
||||
*
|
||||
* @param id 退料单主表ID
|
||||
* @author 小李
|
||||
* @date 19:41 2024/10/21
|
||||
**/
|
||||
@Override
|
||||
@DSTransactional
|
||||
public void confirmBack(String id) {
|
||||
// 更新主表
|
||||
baseMapper.update(new LambdaUpdateWrapper<DlRepairSo>()
|
||||
.set(DlRepairSo::getSoStatus, SoStatusEnum.RETURNED.getCode())
|
||||
.eq(DlRepairSo::getId, id)
|
||||
);
|
||||
// 更新配件申请表
|
||||
DlRepairSo so = baseMapper.selectOne(new LambdaQueryWrapper<DlRepairSo>().eq(DlRepairSo::getId, id));
|
||||
// 查配件退料表子表
|
||||
List<DlRepairSoi> sois = repairSoiService.list(new LambdaQueryWrapper<DlRepairSoi>().eq(DlRepairSoi::getSoId, so.getId()));
|
||||
// 查申请表子表
|
||||
List<DlTwItem> twItems = twItemService.list(new LambdaQueryWrapper<DlTwItem>().eq(DlTwItem::getTwId, so.getTwId()));
|
||||
// 得到需要更新的数据
|
||||
List<DlTwItem> newTwItems = twItems.stream().map(item -> {
|
||||
DlTwItem dlTwItem = new DlTwItem();
|
||||
dlTwItem.setId(item.getId());
|
||||
sois.stream().filter(i -> i.getGoodsId().equals(item.getWaresId())).findFirst().ifPresent(i -> {
|
||||
dlTwItem.setWaresBackCount(
|
||||
ObjectUtil.isNotEmpty(item.getWaresBackCount())
|
||||
? item.getWaresCount() + item.getWaresBackCount()
|
||||
: i.getGoodsCount());
|
||||
// 如果退料数就是领料申请数,那就是全退了
|
||||
if (i.getGoodsCount().equals(dlTwItem.getWaresCount())) {
|
||||
dlTwItem.setWaresStatus("03");
|
||||
}
|
||||
});
|
||||
return dlTwItem;
|
||||
}).collect(Collectors.toList());
|
||||
twItemService.updateBatchById(newTwItems);
|
||||
// 更新库存
|
||||
// 查库存
|
||||
List<RepairWares> wares = waresService.list(new LambdaQueryWrapper<RepairWares>().in(RepairWares::getId, sois.stream().map(DlRepairSoi::getGoodsId).collect(Collectors.toList())));
|
||||
// 构建新数据
|
||||
List<RepairWares> newWares = wares.stream().map(item -> {
|
||||
RepairWares ware = new RepairWares();
|
||||
ware.setId(item.getId());
|
||||
sois.stream().filter(i -> i.getGoodsId().equals(item.getId())).findFirst().ifPresent(i -> {
|
||||
ware.setStock(item.getStock().add(BigDecimal.valueOf(i.getGoodsCount())));
|
||||
});
|
||||
return ware;
|
||||
}).collect(Collectors.toList());
|
||||
waresService.updateBatchById(newWares);
|
||||
|
||||
// 更新维修工单
|
||||
// 查申请表主表
|
||||
DlTicketWares ticketWares = ticketWaresService.getOne(new LambdaQueryWrapper<DlTicketWares>().eq(DlTicketWares::getId, so.getTwId()));
|
||||
// 查维修工单子表为配件的数据
|
||||
List<DlRepairTitem> titems = titemService.list(new LambdaQueryWrapper<DlRepairTitem>().and(item -> {
|
||||
item.eq(DlRepairTitem::getTicketId, ticketWares.getTicketId())
|
||||
.eq(DlRepairTitem::getItemType, "02")
|
||||
.in(DlRepairTitem::getPartId, sois.stream().map(DlRepairSoi::getGoodsId).collect(Collectors.toList()));
|
||||
}));
|
||||
// 构建新数据,更新维修工单子表
|
||||
List<DlRepairTitem> newTitems = titems.stream().map(item -> {
|
||||
DlRepairTitem titem = new DlRepairTitem();
|
||||
titem.setId(item.getId());
|
||||
sois.stream().filter(i -> i.getGoodsId().equals(item.getPartId())).findFirst().ifPresent(i -> {
|
||||
titem.setItemCount(item.getItemCount() - i.getGoodsCount());
|
||||
BigDecimal itemDiscount = ObjectUtil.isNotEmpty(item.getItemDiscount()) ? item.getItemDiscount() : BigDecimal.ONE;
|
||||
titem.setItemMoney(new BigDecimal(titem.getItemCount()).multiply(item.getItemPrice()).multiply(itemDiscount));
|
||||
});
|
||||
return titem;
|
||||
}).collect(Collectors.toList());
|
||||
// 分开全部退料了的和没有全部退料的数据
|
||||
List<DlRepairTitem> delTitems = newTitems.stream().filter(item -> item.getItemCount() == 0).collect(Collectors.toList());
|
||||
if (CollectionUtil.isEmpty(delTitems)) {
|
||||
titemService.updateBatchById(newTitems);
|
||||
} else {
|
||||
titemService.removeBatchByIds(delTitems);
|
||||
List<DlRepairTitem> updateTitems = newTitems.stream().filter(item -> !delTitems.contains(item)).collect(Collectors.toList());
|
||||
if (CollectionUtil.isEmpty(updateTitems)) {
|
||||
titemService.updateBatchById(updateTitems);
|
||||
}
|
||||
|
||||
}
|
||||
// 更新维修工单
|
||||
DlRepairTickets tickets = ticketsService.getOne(new LambdaQueryWrapper<DlRepairTickets>().eq(DlRepairTickets::getId, ticketWares.getTicketId()));
|
||||
// 查最新的子表信息
|
||||
List<DlRepairTitem> list = titemService.list(new LambdaQueryWrapper<DlRepairTitem>().in(DlRepairTitem::getTicketId, tickets.getId()));
|
||||
// 计算工单总子项、工单配件总价、工单总价
|
||||
DlRepairTickets newTickets = new DlRepairTickets();
|
||||
newTickets.setId(tickets.getId());
|
||||
newTickets.setCount(list.stream().mapToInt(DlRepairTitem::getItemCount).sum());
|
||||
newTickets.setPartPrice(list.stream()
|
||||
.filter(item -> item.getItemType().equals("02"))
|
||||
.map(DlRepairTitem::getItemMoney)
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add));
|
||||
BigDecimal projectPrice = tickets.getProjectPrice() == null ? BigDecimal.ZERO : tickets.getProjectPrice();
|
||||
BigDecimal otherPrice = tickets.getOtherPrice() != null ? tickets.getOtherPrice() : BigDecimal.ZERO;
|
||||
BigDecimal partPrice = newTickets.getPartPrice() == null ? BigDecimal.ZERO : newTickets.getPartPrice();
|
||||
newTickets.setTotalPrice(projectPrice.add(partPrice).add(otherPrice));
|
||||
ticketsService.updateById(newTickets);
|
||||
|
||||
// 查主表
|
||||
DlRepairSo newSo = baseMapper.selectById(id);
|
||||
// 通知仓库
|
||||
repairWorkerService.sentMessage(Long.valueOf(newSo.getCreator()), newSo.getUserName() + "已确认退料单:" + newSo.getSoNo());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -11,6 +11,7 @@ import cn.iocoder.yudao.module.stockOperate.service.DlRepairSoService;
|
||||
import cn.iocoder.yudao.module.stockOperate.service.DlRepairSoiService;
|
||||
import cn.iocoder.yudao.module.stockOperate.vo.DlRepairSoiQueryRespVO;
|
||||
import cn.iocoder.yudao.module.stockOperate.vo.DlRepairSoiReqVO;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@ -81,6 +82,31 @@ public class DlRepairSoiServiceImpl extends ServiceImpl<DlRepairSoiMapper, DlRep
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 按主表ID查
|
||||
*
|
||||
* @author 小李
|
||||
* @date 11:22 2024/10/21
|
||||
* @param soId 主表ID
|
||||
**/
|
||||
@Override
|
||||
public List<DlRepairSoiQueryRespVO> getRepairSoiBySoId(String soId){
|
||||
List<DlRepairSoi> repairSois = baseMapper.selectList(new LambdaQueryWrapper<DlRepairSoi>().eq(DlRepairSoi::getSoId, soId));
|
||||
List<DlRepairSoiQueryRespVO> result = repairSois.stream()
|
||||
.map(item -> BeanUtil.toBean(item, DlRepairSoiQueryRespVO.class))
|
||||
.collect(Collectors.toList());
|
||||
List<String> goodsIds = result.stream().map(DlRepairSoiQueryRespVO::getGoodsId).collect(Collectors.toList());
|
||||
List<RepairWares> repairWares = waresService.listByIds(goodsIds);
|
||||
result.forEach(item -> {
|
||||
List<RepairWares> wares = repairWares.stream().filter(i -> i.getId().equals(item.getGoodsId())).collect(Collectors.toList());
|
||||
if (CollectionUtil.isNotEmpty(wares)){
|
||||
item.setRepairWares(wares.get(0));
|
||||
}
|
||||
});
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -8,6 +8,7 @@ import cn.iocoder.yudao.module.tickets.service.DlRepairTicketsService;
|
||||
import cn.iocoder.yudao.module.tickets.vo.CustomerAndCarVO;
|
||||
import cn.iocoder.yudao.module.tickets.vo.DlRepairTicketsReqVO;
|
||||
import cn.iocoder.yudao.module.tickets.vo.DlRepairTicketsRespVO;
|
||||
import cn.iocoder.yudao.module.tickets.vo.NoticeCusVO;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@ -34,7 +35,6 @@ public class DlRepairTicketsController {
|
||||
private DlRepairTicketsService dlRepairTicketsService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 维修工单表 新增
|
||||
*
|
||||
@ -140,7 +140,7 @@ public class DlRepairTicketsController {
|
||||
@GetMapping("/print/{id}")
|
||||
@Operation(summary = "维修工单打印")
|
||||
public void printDocument(HttpServletResponse response, @PathVariable String id) {
|
||||
dlRepairTicketsService.print(response,id);
|
||||
dlRepairTicketsService.print(response, id);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -160,19 +160,19 @@ public class DlRepairTicketsController {
|
||||
/**
|
||||
* 分类查询工单分页
|
||||
*
|
||||
* @author 小李
|
||||
* @date 16:26 2024/10/12
|
||||
* @param repairTicketsReqVO 查询对象
|
||||
* @param pageNo 页码
|
||||
* @param pageSize 条数
|
||||
* @author 小李
|
||||
* @date 16:26 2024/10/12
|
||||
**/
|
||||
@GetMapping("/pageType")
|
||||
@Operation(summary = "分类查询工单分页")
|
||||
public CommonResult<?> getPageType(DlRepairTicketsReqVO repairTicketsReqVO,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1")Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10")Integer pageSize){
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
Page<DlRepairTickets> page = new Page<>(pageNo, pageSize);
|
||||
if(StringUtils.isEmpty(repairTicketsReqVO.getSelectType())){
|
||||
if (StringUtils.isEmpty(repairTicketsReqVO.getSelectType())) {
|
||||
//查询类型为空,默认查待处理的
|
||||
repairTicketsReqVO.setSelectType(RepairCons.TICKETS_WAITING);
|
||||
}
|
||||
@ -187,20 +187,20 @@ public class DlRepairTicketsController {
|
||||
**/
|
||||
@GetMapping("/userRole")
|
||||
@Operation(summary = "判断登录用户的角色,针对维修工单中的四个角色")
|
||||
public CommonResult<?> getUserRole(){
|
||||
public CommonResult<?> getUserRole() {
|
||||
return success(dlRepairTicketsService.getUserRole());
|
||||
}
|
||||
|
||||
/**
|
||||
* 接单
|
||||
*
|
||||
* @param id 工单ID
|
||||
* @author 小李
|
||||
* @date 11:48 2024/10/14
|
||||
* @param id 工单ID
|
||||
**/
|
||||
@GetMapping("/take")
|
||||
@Operation(summary = "接单")
|
||||
public CommonResult<?> updateTake(@RequestParam("id") String id){
|
||||
public CommonResult<?> updateTake(@RequestParam("id") String id) {
|
||||
dlRepairTicketsService.updateTake(id);
|
||||
return CommonResult.ok();
|
||||
}
|
||||
@ -208,13 +208,13 @@ public class DlRepairTicketsController {
|
||||
/**
|
||||
* 指派员工,通知施工
|
||||
*
|
||||
* @param reqVO 请求对象
|
||||
* @author 小李
|
||||
* @date 15:34 2024/10/14
|
||||
* @param reqVO 请求对象
|
||||
**/
|
||||
@PostMapping("/notify")
|
||||
@Operation(summary = "指派员工,通知施工")
|
||||
public CommonResult<?> updateRepair(@RequestBody DlRepairTicketsReqVO reqVO){
|
||||
public CommonResult<?> updateRepair(@RequestBody DlRepairTicketsReqVO reqVO) {
|
||||
dlRepairTicketsService.updateRepair(reqVO);
|
||||
return CommonResult.ok();
|
||||
}
|
||||
@ -222,13 +222,13 @@ public class DlRepairTicketsController {
|
||||
/**
|
||||
* 更新工单状态
|
||||
*
|
||||
* @param respVO 请求对象
|
||||
* @author 小李
|
||||
* @date 15:46 2024/10/18
|
||||
* @param respVO 请求对象
|
||||
**/
|
||||
@PostMapping("/updateStatus")
|
||||
@Operation(summary = "更新工单状态")
|
||||
public CommonResult<?> updateStatus(@RequestBody DlRepairTicketsRespVO respVO){
|
||||
public CommonResult<?> updateStatus(@RequestBody DlRepairTicketsRespVO respVO) {
|
||||
dlRepairTicketsService.updateStatus(respVO);
|
||||
return CommonResult.ok();
|
||||
}
|
||||
@ -236,16 +236,77 @@ public class DlRepairTicketsController {
|
||||
/**
|
||||
* 配件客户是否可见
|
||||
*
|
||||
* @author 小李
|
||||
* @date 21:52 2024/10/18
|
||||
* @param id 工单ID
|
||||
* @param show 是否可见
|
||||
* @author 小李
|
||||
* @date 21:52 2024/10/18
|
||||
**/
|
||||
@GetMapping("/show")
|
||||
@Operation(summary = "配件客户是否可见")
|
||||
public CommonResult<?> updateShow(@RequestParam("id") String id, @RequestParam("show") String show){
|
||||
public CommonResult<?> updateShow(@RequestParam("id") String id, @RequestParam("show") String show) {
|
||||
dlRepairTicketsService.updateShow(id, show);
|
||||
return CommonResult.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查待总检或待出厂检验的工单
|
||||
* 维修服务顾问和总检用的
|
||||
*
|
||||
* @param repairTicketsReqVO 请求对象
|
||||
* @param pageNo 页码
|
||||
* @param pageSize 条数
|
||||
* @author 小李
|
||||
* @date 11:40 2024/10/23
|
||||
**/
|
||||
@GetMapping("/pageByRole")
|
||||
@Operation(summary = "查待总检或待出厂检验的工单")
|
||||
public CommonResult<?> getPageByRole(DlRepairTicketsReqVO repairTicketsReqVO,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
Page<DlRepairTickets> page = new Page<>(pageNo, pageSize);
|
||||
return success(dlRepairTicketsService.getPageByRole(repairTicketsReqVO, page));
|
||||
}
|
||||
|
||||
/**
|
||||
* 维修总检完成总检
|
||||
*
|
||||
* @author 小李
|
||||
* @date 16:48 2024/10/23
|
||||
* @param respVO 请求对象
|
||||
**/
|
||||
@PostMapping("/inspection")
|
||||
@Operation(summary = "维修总检完成总检")
|
||||
public CommonResult<?> inspection(@RequestBody DlRepairTicketsRespVO respVO) {
|
||||
dlRepairTicketsService.inspection(respVO);
|
||||
return CommonResult.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 服务顾问上传出厂检验日志
|
||||
*
|
||||
* @author 小李
|
||||
* @date 17:47 2024/10/23
|
||||
* @param respVO 请求对象
|
||||
**/
|
||||
@PostMapping("/confirm")
|
||||
@Operation(summary = "服务顾问上传出厂检验日志")
|
||||
public CommonResult<?> confirm(@RequestBody DlRepairTicketsRespVO respVO) {
|
||||
dlRepairTicketsService.confirm(respVO);
|
||||
return CommonResult.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 服务顾问通知客户取车
|
||||
*
|
||||
* @author 小李
|
||||
* @date 22:40 2024/10/23
|
||||
* @param noticeCusVO 请求对象
|
||||
**/
|
||||
@PostMapping("/noticeCus")
|
||||
@Operation(summary = "服务顾问通知客户取车")
|
||||
public CommonResult<?> noticeCus(@RequestBody NoticeCusVO noticeCusVO) {
|
||||
dlRepairTicketsService.noticeCus(noticeCusVO);
|
||||
return CommonResult.ok();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -73,6 +73,20 @@ public class DlTicketWaresController {
|
||||
return CommonResult.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 新建配件申请单、
|
||||
* @author vinjor-M
|
||||
* @date 14:35 2024/10/22
|
||||
* @param respVO 请求体
|
||||
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<?>
|
||||
**/
|
||||
@PostMapping("/newApplyOrder")
|
||||
@Operation(summary = "新增、修改")
|
||||
public CommonResult<?> newApplyOrder(@RequestBody DlTicketWaresRespVO respVO){
|
||||
dlTicketWaresService.createApplyOrder(respVO);
|
||||
return CommonResult.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
@ -102,14 +116,14 @@ public class DlTicketWaresController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 仓库通知领料
|
||||
* 仓库通知领料、退料
|
||||
*
|
||||
* @author 小李
|
||||
* @date 20:45 2024/10/16
|
||||
* @param respVO 请求对象
|
||||
**/
|
||||
@PostMapping("/pass")
|
||||
@Operation(summary = "仓库通知领料")
|
||||
@Operation(summary = "仓库通知领料、退料")
|
||||
public CommonResult<?> passTicketWares(@RequestBody DlTicketWaresRespVO respVO){
|
||||
dlTicketWaresService.passTicketWares(respVO);
|
||||
return CommonResult.ok();
|
||||
@ -142,5 +156,17 @@ public class DlTicketWaresController {
|
||||
dlTicketWaresService.passBackTicketWares(respVO);
|
||||
return CommonResult.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 维修工的角度查提交的配件申请单\待确认领料单\待确认退料单 待处理数量
|
||||
* @author vinjor-M
|
||||
* @date 15:32 2024/10/22
|
||||
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<?>
|
||||
**/
|
||||
@GetMapping("/getWorkerTodo")
|
||||
@Operation(summary = "维修工的角度查提交的配件申请单")
|
||||
public CommonResult<?> getWorkerTodo(){
|
||||
return success(dlTicketWaresService.getWorkerTodo());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -57,4 +57,7 @@ public class DlTicketWares extends TenantBaseDO {
|
||||
|
||||
/** 维修顾问name(system_user的nickname) */
|
||||
private String adviserName;
|
||||
|
||||
/** 客户车辆的车牌号(dl_repair_tickets中的carNo) */
|
||||
private String licenseNumber;
|
||||
}
|
@ -63,4 +63,7 @@ public class DlTwItem extends TenantBaseDO {
|
||||
|
||||
/** 已领料数量 */
|
||||
private Integer waresAlreadyCount;
|
||||
|
||||
/** 已退数量 */
|
||||
private Integer waresBackCount;
|
||||
}
|
@ -4,6 +4,7 @@ import cn.iocoder.yudao.module.tickets.entity.DlRepairTickets;
|
||||
import cn.iocoder.yudao.module.tickets.vo.CustomerAndCarVO;
|
||||
import cn.iocoder.yudao.module.tickets.vo.DlRepairTicketsReqVO;
|
||||
import cn.iocoder.yudao.module.tickets.vo.DlRepairTicketsRespVO;
|
||||
import cn.iocoder.yudao.module.tickets.vo.NoticeCusVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
@ -135,4 +136,41 @@ public interface DlRepairTicketsService extends IService<DlRepairTickets> {
|
||||
* @param show 是否可见
|
||||
**/
|
||||
void updateShow(String id, String show);
|
||||
|
||||
/**
|
||||
* 查待总检或待出厂检验的工单
|
||||
* 维修服务顾问和总检用的
|
||||
*
|
||||
* @author 小李
|
||||
* @date 11:40 2024/10/23
|
||||
* @param repairTicketsReqVO 请求对象
|
||||
**/
|
||||
IPage<DlRepairTickets> getPageByRole(DlRepairTicketsReqVO repairTicketsReqVO, Page<DlRepairTickets> page);
|
||||
|
||||
/**
|
||||
* 维修总检完成总检
|
||||
*
|
||||
* @author 小李
|
||||
* @date 16:48 2024/10/23
|
||||
* @param respVO 请求对象
|
||||
**/
|
||||
void inspection(DlRepairTicketsRespVO respVO);
|
||||
|
||||
/**
|
||||
* 服务顾问上传出厂检验日志
|
||||
*
|
||||
* @author 小李
|
||||
* @date 17:47 2024/10/23
|
||||
* @param respVO 请求对象
|
||||
**/
|
||||
void confirm(DlRepairTicketsRespVO respVO);
|
||||
|
||||
/**
|
||||
* 服务顾问通知客户取车
|
||||
*
|
||||
* @author 小李
|
||||
* @date 22:40 2024/10/23
|
||||
* @param noticeCusVO 请求对象
|
||||
**/
|
||||
void noticeCus(NoticeCusVO noticeCusVO);
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 针对表【dl_ticket_wares(工单配件申请/退回表)】的数据库操作Service
|
||||
@ -63,7 +64,7 @@ public interface DlTicketWaresService extends IService<DlTicketWares> {
|
||||
void auditTicketWares(DlTicketWaresRespVO respVO);
|
||||
|
||||
/**
|
||||
* 仓库通知领料
|
||||
* 仓库通知领料、退料
|
||||
*
|
||||
* @author 小李
|
||||
* @date 20:45 2024/10/16
|
||||
@ -88,4 +89,19 @@ public interface DlTicketWaresService extends IService<DlTicketWares> {
|
||||
* @param respVO 请求对象
|
||||
**/
|
||||
void passBackTicketWares(DlTicketWaresRespVO respVO);
|
||||
|
||||
/**
|
||||
* 创建配件申请单
|
||||
* @author vinjor-M
|
||||
* @date 14:48 2024/10/22
|
||||
* @param respVO 请求体
|
||||
**/
|
||||
void createApplyOrder(DlTicketWaresRespVO respVO);
|
||||
|
||||
/**
|
||||
* 维修工的角度查提交的配件申请单 待处理数量
|
||||
* @author vinjor-M
|
||||
* @date 15:38 2024/10/22
|
||||
**/
|
||||
Map<String,Integer> getWorkerTodo();
|
||||
}
|
||||
|
@ -43,10 +43,7 @@ import cn.iocoder.yudao.module.tickets.mapper.DlRepairTicketsMapper;
|
||||
import cn.iocoder.yudao.module.tickets.service.DlRepairTicketsService;
|
||||
import cn.iocoder.yudao.module.tickets.service.DlRepairTitemService;
|
||||
import cn.iocoder.yudao.module.tickets.tools.WordUtil;
|
||||
import cn.iocoder.yudao.module.tickets.vo.CustomerAndCarVO;
|
||||
import cn.iocoder.yudao.module.tickets.vo.DlRepairTicketsReqVO;
|
||||
import cn.iocoder.yudao.module.tickets.vo.DlRepairTicketsRespVO;
|
||||
import cn.iocoder.yudao.module.tickets.vo.DlRepairTitemReqVO;
|
||||
import cn.iocoder.yudao.module.tickets.vo.*;
|
||||
import com.baomidou.dynamic.datasource.annotation.DSTransactional;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
@ -55,6 +52,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.deepoove.poi.XWPFTemplate;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.ss.formula.functions.Na;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -64,6 +62,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.InputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@ -137,12 +136,12 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
||||
@Resource
|
||||
@Lazy
|
||||
private RepairWorkerService repairWorkerService;
|
||||
@Resource
|
||||
private RepairWorkerService workerService;
|
||||
|
||||
@Resource
|
||||
@Lazy
|
||||
private RepairRecordsService recordsService;
|
||||
@Autowired
|
||||
|
||||
@Resource
|
||||
private RepairRecordsService repairRecordsService;
|
||||
|
||||
|
||||
@ -188,6 +187,13 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
||||
// 新增子表
|
||||
itemList.forEach(item -> {
|
||||
item.setTicketId(ticketsRespVO.getId());
|
||||
if("01".equals(item.getItemType())){
|
||||
//维修项目,初始状态,待派工
|
||||
item.setItemStatus(TicketsItemStatusEnum.WAITING_WORK.getCode());
|
||||
}else if("02".equals(item.getItemType())){
|
||||
//维修配件,初始状态,待领料
|
||||
item.setItemStatus(TicketsItemStatusEnum.WAITING_RECEIVE.getCode());
|
||||
}
|
||||
});
|
||||
titemService.saveBatch(itemList);
|
||||
|
||||
@ -217,12 +223,12 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
||||
repairOrderInfo.setOrderTime(ticketsRespVO.getCreateTime());
|
||||
repairOrderInfo.setOrderStatus("0");
|
||||
repairOrderInfo.setPayMoney(ticketsRespVO.getTotalPrice());
|
||||
if (ObjectUtil.isNotEmpty(deptId)){
|
||||
if (ObjectUtil.isNotEmpty(deptId)) {
|
||||
repairOrderInfo.setDeptId(Integer.parseInt(deptId + ""));
|
||||
}
|
||||
|
||||
// 如果选择了预约还要更新预约记录
|
||||
if (ObjectUtil.isNotEmpty(ticketsRespVO.getBookingId())){
|
||||
if (ObjectUtil.isNotEmpty(ticketsRespVO.getBookingId())) {
|
||||
DlRepairBooking dlRepairBooking = new DlRepairBooking();
|
||||
dlRepairBooking.setId(ticketsRespVO.getBookingId());
|
||||
dlRepairBooking.setTicketsId(ticketsRespVO.getId());
|
||||
@ -231,7 +237,7 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
||||
}
|
||||
repairOrderInfoService.saveOrderInfo(repairOrderInfo);
|
||||
//最后记录操作日志--创建工单
|
||||
repairRecordsService.saveRepairRecord(ticketsRespVO.getId(),null, RecordTypeEnum.CJGD.getCode(),"创建工单",null);
|
||||
repairRecordsService.saveRepairRecord(ticketsRespVO.getId(), null, RecordTypeEnum.CJGD.getCode(), "创建工单", null);
|
||||
return ticketsRespVO;
|
||||
}
|
||||
|
||||
@ -260,7 +266,7 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
||||
DlRepairTickets dlRepairTickets = baseMapper.selectById(id);
|
||||
DlRepairTicketsRespVO result = BeanUtil.toBean(dlRepairTickets, DlRepairTicketsRespVO.class);
|
||||
//查车辆
|
||||
if (ObjectUtil.isNotEmpty(dlRepairTickets.getCarId())){
|
||||
if (ObjectUtil.isNotEmpty(dlRepairTickets.getCarId())) {
|
||||
CarMainRespVO carInfo = carMainService.queryCarById(dlRepairTickets.getCarId());
|
||||
result.setCarInfo(carInfo);
|
||||
}
|
||||
@ -331,17 +337,17 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
||||
/**
|
||||
* 客户信息和车辆信息 新增、修改
|
||||
*
|
||||
* @param customerAndCarVO 用户信息和车辆信息
|
||||
* @author 小李
|
||||
* @date 9:25 2024/10/8
|
||||
* @param customerAndCarVO 用户信息和车辆信息
|
||||
**/
|
||||
@Override
|
||||
@DSTransactional
|
||||
public void updateCustomerAndCar(CustomerAndCarVO customerAndCarVO){
|
||||
public void updateCustomerAndCar(CustomerAndCarVO customerAndCarVO) {
|
||||
// 新增用户信息,如果不存在
|
||||
if (ObjectUtil.isNotEmpty(customerAndCarVO.getUserInfo().getPhoneNumber()) && ObjectUtil.isNotEmpty(customerAndCarVO.getUserInfo().getCusName())){
|
||||
if (ObjectUtil.isNotEmpty(customerAndCarVO.getUserInfo().getPhoneNumber()) && ObjectUtil.isNotEmpty(customerAndCarVO.getUserInfo().getCusName())) {
|
||||
AdminUserRespDTO userByMobile = adminUserApi.getUserByMobile(customerAndCarVO.getUserInfo().getPhoneNumber());
|
||||
if (ObjectUtil.isEmpty(userByMobile)){
|
||||
if (ObjectUtil.isEmpty(userByMobile)) {
|
||||
UserDTO userDTO = new UserDTO();
|
||||
userDTO.setMobile(customerAndCarVO.getUserInfo().getPhoneNumber());
|
||||
userDTO.setNickname(customerAndCarVO.getUserInfo().getCusName());
|
||||
@ -352,32 +358,32 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
||||
}
|
||||
}
|
||||
// 客户信息
|
||||
if (ObjectUtil.isNotEmpty(customerAndCarVO.getUserInfo())){
|
||||
if (ObjectUtil.isEmpty(customerAndCarVO.getUserInfo().getId())){
|
||||
if (ObjectUtil.isNotEmpty(customerAndCarVO.getUserInfo())) {
|
||||
if (ObjectUtil.isEmpty(customerAndCarVO.getUserInfo().getId())) {
|
||||
customerService.save(customerAndCarVO.getUserInfo());
|
||||
}else {
|
||||
} else {
|
||||
customerService.updateById(customerAndCarVO.getUserInfo());
|
||||
}
|
||||
}
|
||||
// 新增车辆信息
|
||||
if (ObjectUtil.isNotEmpty(customerAndCarVO.getCarInfo())){
|
||||
if (ObjectUtil.isEmpty(customerAndCarVO.getCarInfo().getId())){
|
||||
if (ObjectUtil.isNotEmpty(customerAndCarVO.getCarInfo())) {
|
||||
if (ObjectUtil.isEmpty(customerAndCarVO.getCarInfo().getId())) {
|
||||
carMainService.createCarMain(customerAndCarVO.getCarInfo());
|
||||
}else {
|
||||
} else {
|
||||
carMainService.updateCarMain(customerAndCarVO.getCarInfo());
|
||||
}
|
||||
}
|
||||
// 新增客户车辆信息关联
|
||||
String userId = customerAndCarVO.getUserInfo().getId();
|
||||
String carId = customerAndCarVO.getCarInfo().getId();
|
||||
if (ObjectUtil.isNotEmpty(userId) && ObjectUtil.isNotEmpty(carId)){
|
||||
if (ObjectUtil.isNotEmpty(userId) && ObjectUtil.isNotEmpty(carId)) {
|
||||
// 先查询有没有记录
|
||||
CustomerCar one = customerCarService.getOne(new LambdaQueryWrapper<CustomerCar>().and(item -> {
|
||||
item.eq(CustomerCar::getCusId, userId)
|
||||
.eq(CustomerCar::getCarId, carId);
|
||||
}));
|
||||
// 没有就新增
|
||||
if (ObjectUtil.isEmpty(one)){
|
||||
if (ObjectUtil.isEmpty(one)) {
|
||||
CustomerCar customerCar = new CustomerCar();
|
||||
customerCar.setCusId(userId);
|
||||
customerCar.setCarId(carId);
|
||||
@ -396,11 +402,11 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
||||
**/
|
||||
@Override
|
||||
public void print(HttpServletResponse response, String id) {
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
params.put("jobNumber","123456789");
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("jobNumber", "123456789");
|
||||
String fileName = "结算单.docx";
|
||||
String tmpPath = "D:\\"+fileName;
|
||||
try{
|
||||
String tmpPath = "D:\\" + fileName;
|
||||
try {
|
||||
InputStream inputStream = XWPFTemplate.class.getResourceAsStream("/templates/gdmb.docx");
|
||||
XWPFTemplate template = XWPFTemplate.compile(inputStream);
|
||||
template.render(params);
|
||||
@ -408,8 +414,8 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
||||
template.write(fos);
|
||||
fos.flush();
|
||||
template.close();
|
||||
WordUtil.down(response,tmpPath,fileName);
|
||||
}catch (Exception e){
|
||||
WordUtil.down(response, tmpPath, fileName);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@ -417,22 +423,28 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
||||
/**
|
||||
* 分类查询工单分页
|
||||
*
|
||||
* @param repairTicketsReqVO 查询对象
|
||||
* @author 小李
|
||||
* @date 16:26 2024/10/12
|
||||
* @param repairTicketsReqVO 查询对象
|
||||
**/
|
||||
@Override
|
||||
public IPage<DlRepairTickets> getPageType(DlRepairTicketsReqVO repairTicketsReqVO, Page<DlRepairTickets> page){
|
||||
public IPage<DlRepairTickets> getPageType(DlRepairTicketsReqVO repairTicketsReqVO, Page<DlRepairTickets> page) {
|
||||
String userRoleCode = getUserRole();
|
||||
if(userRoleCode.equals(RepairRoleEnum.ADMIN.getCode())|| userRoleCode.equals(RepairRoleEnum.INSPECTION.getCode())){
|
||||
if (userRoleCode.equals(RepairRoleEnum.ADMIN.getCode())) {
|
||||
//维修管理员和总检,看所有数据
|
||||
}else if(userRoleCode.equals(RepairRoleEnum.ADVISOR.getCode())){
|
||||
} else if(userRoleCode.equals(RepairRoleEnum.INSPECTION.getCode())){
|
||||
//总检
|
||||
if (RepairCons.TICKETS_WAITING.equals(repairTicketsReqVO.getSelectType())) {
|
||||
//查待处理的,查需要自己处理的,否则就是查所有
|
||||
repairTicketsReqVO.setUserId(String.valueOf(SecurityFrameworkUtils.getLoginUserId()));
|
||||
}
|
||||
}else if (userRoleCode.equals(RepairRoleEnum.ADVISOR.getCode())) {
|
||||
//服务顾问看自己的
|
||||
repairTicketsReqVO.setAdviserId(String.valueOf(SecurityFrameworkUtils.getLoginUserId()));
|
||||
}else if(userRoleCode.equals(RepairRoleEnum.REPAIR_STAFF.getCode())){
|
||||
} else if (userRoleCode.equals(RepairRoleEnum.REPAIR_STAFF.getCode())) {
|
||||
//维修工,进一步判断是否是班组长
|
||||
boolean ifLeader = workerService.getIfLeader();
|
||||
if(ifLeader){
|
||||
boolean ifLeader = repairWorkerService.getIfLeader();
|
||||
if (ifLeader) {
|
||||
//班组长,看本班组所有数据
|
||||
RepairWorker one = repairWorkerService.getOne(new LambdaQueryWrapper<RepairWorker>().eq(RepairWorker::getUserId, SecurityFrameworkUtils.getLoginUserId()));
|
||||
// 查自己班组的员工信息
|
||||
@ -440,16 +452,16 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
||||
// 所有的员工信息
|
||||
List<Long> userIds = list.stream().map(RepairWorker::getUserId).collect(Collectors.toList());
|
||||
repairTicketsReqVO.setUserIds(userIds);
|
||||
}else{
|
||||
} else {
|
||||
//普通维修工
|
||||
repairTicketsReqVO.setUserIds(Collections.singletonList(SecurityFrameworkUtils.getLoginUserId()));
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
if(RepairCons.TICKETS_WAITING.equals(repairTicketsReqVO.getSelectType())){
|
||||
if (RepairCons.TICKETS_WAITING.equals(repairTicketsReqVO.getSelectType())) {
|
||||
return baseMapper.getPageType(repairTicketsReqVO, page);
|
||||
}else{
|
||||
} else {
|
||||
return baseMapper.getPageTypeAll(repairTicketsReqVO, page);
|
||||
}
|
||||
}
|
||||
@ -461,7 +473,7 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
||||
* @date 9:28 2024/10/14
|
||||
**/
|
||||
@Override
|
||||
public String getUserRole(){
|
||||
public String getUserRole() {
|
||||
// 查看当前登录用户是什么角色
|
||||
// 当前登录用户的角色信息
|
||||
List<Long> byUserId = permissionApi.getRoleIdsByUserId(SecurityFrameworkUtils.getLoginUserId());
|
||||
@ -472,27 +484,27 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
||||
// 取出角色名称
|
||||
List<String> codes = collect.stream().map(RoleReqDTO::getCode).collect(Collectors.toList());
|
||||
// 维修业务管理员--可以看所有数据,但不能做操作
|
||||
if (codes.contains(RepairRoleEnum.ADMIN.getCode())){
|
||||
if (codes.contains(RepairRoleEnum.ADMIN.getCode())) {
|
||||
return RepairRoleEnum.ADMIN.getCode();
|
||||
}
|
||||
// 总检
|
||||
if (codes.contains(RepairRoleEnum.INSPECTION.getCode())){
|
||||
if (codes.contains(RepairRoleEnum.INSPECTION.getCode())) {
|
||||
return RepairRoleEnum.INSPECTION.getCode();
|
||||
}
|
||||
// 服务顾问
|
||||
if (codes.contains(RepairRoleEnum.ADVISOR.getCode())){
|
||||
if (codes.contains(RepairRoleEnum.ADVISOR.getCode())) {
|
||||
return RepairRoleEnum.ADVISOR.getCode();
|
||||
}
|
||||
// 维修工(或班组长)
|
||||
if (codes.contains(RepairRoleEnum.REPAIR_STAFF.getCode())){
|
||||
if (codes.contains(RepairRoleEnum.REPAIR_STAFF.getCode())) {
|
||||
return RepairRoleEnum.REPAIR_STAFF.getCode();
|
||||
}
|
||||
// 维修仓库管理员
|
||||
if(codes.contains(RepairRoleEnum.WAREHOUSE.getCode())){
|
||||
if (codes.contains(RepairRoleEnum.WAREHOUSE.getCode())) {
|
||||
return RepairRoleEnum.WAREHOUSE.getCode();
|
||||
}
|
||||
// 维修财务
|
||||
if(codes.contains(RepairRoleEnum.WXCW.getCode())){
|
||||
if (codes.contains(RepairRoleEnum.WXCW.getCode())) {
|
||||
return RepairRoleEnum.WXCW.getCode();
|
||||
}
|
||||
// 啥也不是
|
||||
@ -502,12 +514,12 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
||||
/**
|
||||
* 接单
|
||||
*
|
||||
* @param id 工单ID
|
||||
* @author 小李
|
||||
* @date 11:48 2024/10/14
|
||||
* @param id 工单ID
|
||||
**/
|
||||
@Override
|
||||
public void updateTake(String id){
|
||||
public void updateTake(String id) {
|
||||
// 改变时看看是否已经被接了
|
||||
int update = baseMapper.update(new LambdaUpdateWrapper<DlRepairTickets>()
|
||||
.set(DlRepairTickets::getTicketsWorkStatus, TicketsWorkStatusEnum.RECEIVED.getCode())
|
||||
@ -515,19 +527,19 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
||||
item.eq(DlRepairTickets::getId, id)
|
||||
.eq(DlRepairTickets::getTicketsWorkStatus, TicketsWorkStatusEnum.WAITING_RECEIVING.getCode());
|
||||
}));
|
||||
if (update != 1){
|
||||
if (update != 1) {
|
||||
throw exception0(500, "工单已被其他人接单了");
|
||||
}
|
||||
//最后记录操作日志--接单
|
||||
repairRecordsService.saveRepairRecord(id,null, RecordTypeEnum.jd.getCode(), "接单",null);
|
||||
repairRecordsService.saveRepairRecord(id, null, RecordTypeEnum.jd.getCode(), "接单", null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 指派员工,通知施工
|
||||
*
|
||||
* @param reqVO 请求对象
|
||||
* @author 小李
|
||||
* @date 15:34 2024/10/14
|
||||
* @param reqVO 请求对象
|
||||
**/
|
||||
@Override
|
||||
public void updateRepair(DlRepairTicketsReqVO reqVO) {
|
||||
@ -544,13 +556,13 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
||||
if (update != 1) {
|
||||
throw exception0(500, "工单已开始");
|
||||
}
|
||||
workerService.sentMessage(reqVO.getNowRepairId(),"您有新的工单要处理");
|
||||
repairWorkerService.sentMessage(reqVO.getNowRepairId(), "您有新的工单要处理");
|
||||
//最后记录操作日志--指派施工
|
||||
repairRecordsService.saveRepairRecord(reqVO.getId(),null, RecordTypeEnum.ZPSG.getCode(),"指派施工",null);
|
||||
repairRecordsService.saveRepairRecord(reqVO.getId(), null, RecordTypeEnum.ZPSG.getCode(), "指派施工", null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新工单状态
|
||||
* 更新工单状态(针对开始施工、施工中记录、施工完成)
|
||||
*
|
||||
* @param respVO 请求对象
|
||||
* @author 小李
|
||||
@ -558,18 +570,27 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
||||
**/
|
||||
@Override
|
||||
@DSTransactional
|
||||
public void updateStatus(DlRepairTicketsRespVO respVO){
|
||||
if(StringUtils.isNotEmpty(respVO.getTicketsWorkStatus())){
|
||||
public void updateStatus(DlRepairTicketsRespVO respVO) {
|
||||
// 如果是开始施工,但项目还在施工中,就不能施工
|
||||
if (RecordTypeEnum.KSSG.getCode().equals(respVO.getRecordType())){
|
||||
DlRepairTitem titem = titemService.getById(respVO.getItem().getId());
|
||||
if (TicketsItemStatusEnum.WORKING.getCode().equals(titem.getItemStatus())){
|
||||
throw exception0(500, "选择的项目在施工中,不能重新开始施工");
|
||||
}
|
||||
}
|
||||
|
||||
if (StringUtils.isNotEmpty(respVO.getTicketsWorkStatus())) {
|
||||
// 更新工单主表
|
||||
LambdaUpdateWrapper<DlRepairTickets> wrapper = new LambdaUpdateWrapper<>();
|
||||
wrapper.eq(DlRepairTickets::getId, respVO.getId());
|
||||
wrapper.set(DlRepairTickets::getTicketsWorkStatus, respVO.getTicketsWorkStatus());
|
||||
if (ObjectUtil.isNotEmpty(respVO.getIsFinish())){
|
||||
wrapper.set(DlRepairTickets::getIsFinish, respVO.getIsFinish());
|
||||
}
|
||||
// 这里注掉,不能让员工更新工单的状态为完成,后面还有总检、服务顾问
|
||||
// if (ObjectUtil.isNotEmpty(respVO.getIsFinish())) {
|
||||
// wrapper.set(DlRepairTickets::getIsFinish, respVO.getIsFinish());
|
||||
// }
|
||||
baseMapper.update(wrapper);
|
||||
}
|
||||
if(null!=respVO.getItem() && StringUtils.isNotEmpty(respVO.getItem().getItemStatus())){
|
||||
if (null != respVO.getItem() && StringUtils.isNotEmpty(respVO.getItem().getItemStatus())) {
|
||||
// 更新工单子表
|
||||
titemService.update(new LambdaUpdateWrapper<DlRepairTitem>()
|
||||
.set(DlRepairTitem::getItemStatus, respVO.getItem().getItemStatus())
|
||||
@ -578,23 +599,223 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
||||
}
|
||||
// 记录日志
|
||||
recordsService.saveRepairRecord(respVO.getId(), respVO.getItem().getId(), respVO.getRecordType(), respVO.getRemark(), respVO.getImage());
|
||||
|
||||
// 通知服务顾问和维修总检
|
||||
DlRepairTickets tickets = baseMapper.selectById(respVO.getId());
|
||||
DlRepairTitem titem = titemService.getById(respVO.getItem().getId());
|
||||
/*
|
||||
消息组成:谁,对那个工单,那个项目,干了什么
|
||||
谁:工单的当前施工人
|
||||
对那个工单:工单号
|
||||
那个项目:操作的项目
|
||||
干了什么:提交的请求
|
||||
干了什么有三种情况:开始施工、施工中的记录上传、施工完成
|
||||
施工完成又分四种情况:阶段完成、完成并移交下一班组、完成并移交总检、完成工单,其中部分完成同开始施工、施工中的记录上传一致,只上传,不改变
|
||||
*/
|
||||
// 消息生成
|
||||
String message = createMessage(tickets.getNowRepairName(), tickets.getTicketNo(), titem.getItemName(), respVO.getRecordType(), respVO.getFinishType(), respVO.getNextName());
|
||||
// 通知服务顾问
|
||||
// 如果员工完成了订单
|
||||
if (RecordTypeEnum.SGWCZJ.getCode().equals(respVO.getRecordType())&& "03".equals(respVO.getFinishType())) {
|
||||
repairWorkerService.sentMessage(Long.valueOf(tickets.getAdviserId()), "您有新的工单可以出厂检验");
|
||||
// 需要把工单的当前操作人移交服务顾问
|
||||
baseMapper.update(new LambdaUpdateWrapper<DlRepairTickets>()
|
||||
.setSql("now_repair_id = adviser_id")
|
||||
.setSql("now_repair_name = adviser_name")
|
||||
.eq(DlRepairTickets::getId, respVO.getId()));
|
||||
} else {
|
||||
repairWorkerService.sentMessage(Long.valueOf(tickets.getAdviserId()), message);
|
||||
}
|
||||
// 通知总检
|
||||
// 总检查角色包含总检的员工
|
||||
// 取这个角色的角色信息
|
||||
RoleReqDTO roleInfo = roleApi.getRoleInfo(RepairRoleEnum.INSPECTION.getCode());
|
||||
// 通过角色信息查有这个角色的人
|
||||
List<Long> ids = permissionApi.getUserIdByRoleId(roleInfo.getId());
|
||||
if (CollectionUtil.isEmpty(ids)) return;
|
||||
// 如果是移交给总检就需要通知总检并让其总检
|
||||
if (RecordTypeEnum.SGWCZJ.getCode().equals(respVO.getRecordType()) && "02".equals(respVO.getFinishType())) {
|
||||
// 工单移交给总检(理论上讲只有一个总检,就算有多个这里面也只给一个)
|
||||
AdminUserRespDTO user = adminUserApi.getUser(ids.get(0));
|
||||
baseMapper.update(new LambdaUpdateWrapper<DlRepairTickets>()
|
||||
.set(DlRepairTickets::getNowRepairId, user.getId())
|
||||
.set(DlRepairTickets::getNowRepairName, user.getNickname())
|
||||
.set(DlRepairTickets::getTicketsWorkStatus, "05")
|
||||
.eq(DlRepairTickets::getId, respVO.getId()));
|
||||
repairWorkerService.sentMessage(user.getId(), "您有新的工单需要总检");
|
||||
} else {
|
||||
ids.forEach(id -> {
|
||||
repairWorkerService.sentMessage(id, message);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private String createMessage(String who, String no, String projectName, String type, String finishType, String nextName) {
|
||||
String result = who;
|
||||
switch (type) {
|
||||
// 开始施工
|
||||
case "kssg":
|
||||
return result + "开始施工工单:" + no + "中" + projectName + "项目";
|
||||
// 施工记录
|
||||
case "sgz":
|
||||
return result + "上传了工单:" + no + "中" + projectName + "项目的维修记录";
|
||||
// 施工完成
|
||||
case "sgwczj":
|
||||
if (ObjectUtil.isNotEmpty(finishType)) {
|
||||
result = result + "完成了工单:" + no + "中" + projectName + "项目";
|
||||
switch (finishType) {
|
||||
// 完成并移交下一班组
|
||||
case "01":
|
||||
return result + "并移交工单给了" + nextName;
|
||||
// 完成并移交总检
|
||||
case "02":
|
||||
return result + "并移交给了总检";
|
||||
// 完成工单
|
||||
case "03":
|
||||
return who + "完成了工单";
|
||||
default:
|
||||
return "异常消息";
|
||||
}
|
||||
} else {
|
||||
return result + "部分完成了工单:" + no + "中" + projectName + "项目";
|
||||
}
|
||||
default:
|
||||
return "异常消息";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 配件客户是否可见
|
||||
*
|
||||
* @author 小李
|
||||
* @date 21:52 2024/10/18
|
||||
* @param id 工单ID
|
||||
* @param show 是否可见 1可见, 0不可见
|
||||
* @author 小李
|
||||
* @date 21:52 2024/10/18
|
||||
**/
|
||||
@Override
|
||||
public void updateShow(String id, String show){
|
||||
public void updateShow(String id, String show) {
|
||||
DlRepairTickets dlRepairTickets = new DlRepairTickets();
|
||||
dlRepairTickets.setId(id);
|
||||
dlRepairTickets.setPartShow(show);
|
||||
baseMapper.updateById(dlRepairTickets);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查待总检或待出厂检验的工单
|
||||
* 维修服务顾问和总检用的
|
||||
*
|
||||
* @param repairTicketsReqVO 请求对象
|
||||
* @author 小李
|
||||
* @date 11:40 2024/10/23
|
||||
**/
|
||||
@Override
|
||||
public IPage<DlRepairTickets> getPageByRole(DlRepairTicketsReqVO repairTicketsReqVO, Page<DlRepairTickets> page) {
|
||||
String userRoleCode = getUserRole();
|
||||
// 当前操作人的id
|
||||
Long loginUserId = SecurityFrameworkUtils.getLoginUserId();
|
||||
// 维修服务顾问
|
||||
if (userRoleCode.equals(RepairRoleEnum.ADVISOR.getCode())) {
|
||||
repairTicketsReqVO.setNowRepairId(loginUserId);
|
||||
repairTicketsReqVO.setIsFinish("1");
|
||||
} else if (userRoleCode.equals(RepairRoleEnum.INSPECTION.getCode())) {
|
||||
// 总检
|
||||
repairTicketsReqVO.setNowRepairId(loginUserId);
|
||||
repairTicketsReqVO.setIsFinish("0");
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
// 还是用分类查询,不过需要重新构造查询条件
|
||||
return baseMapper.getPageType(repairTicketsReqVO, page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 维修总检完成总检
|
||||
*
|
||||
* @param respVO 请求对象
|
||||
* @author 小李
|
||||
* @date 16:48 2024/10/23
|
||||
**/
|
||||
@Override
|
||||
@DSTransactional
|
||||
public void inspection(DlRepairTicketsRespVO respVO) {
|
||||
// 新增日志
|
||||
repairRecordsService.saveRepairRecord(respVO.getId(), null, RecordTypeEnum.ZJ.getCode(), respVO.getRemark(), respVO.getImage());
|
||||
// 更新工单
|
||||
baseMapper.update(new LambdaUpdateWrapper<DlRepairTickets>()
|
||||
.set(DlRepairTickets::getIsFinish, "1")
|
||||
.setSql("now_repair_id = adviser_id")
|
||||
.setSql("now_repair_name = adviser_name")
|
||||
.eq(DlRepairTickets::getId, respVO.getId())
|
||||
);
|
||||
// 通知服务顾问
|
||||
DlRepairTickets tickets = baseMapper.selectById(respVO.getId());
|
||||
repairWorkerService.sentMessage(Long.valueOf(tickets.getAdviserId()), "您有新的工单可以出厂检验");
|
||||
}
|
||||
|
||||
/**
|
||||
* 服务顾问上传出厂检验日志
|
||||
*
|
||||
* @param respVO 请求对象
|
||||
* @author 小李
|
||||
* @date 17:47 2024/10/23
|
||||
**/
|
||||
@Override
|
||||
public void confirm(DlRepairTicketsRespVO respVO) {
|
||||
// 更新工单状态
|
||||
baseMapper.update(new LambdaUpdateWrapper<DlRepairTickets>()
|
||||
.set(DlRepairTickets::getTicketsWorkStatus, "03")
|
||||
.eq(DlRepairTickets::getId, respVO.getId())
|
||||
);
|
||||
|
||||
// 记录日志
|
||||
repairRecordsService.saveRepairRecord(respVO.getId(), null, RecordTypeEnum.JSGD.getCode(), respVO.getRemark(), respVO.getImage());
|
||||
}
|
||||
|
||||
/**
|
||||
* 服务顾问通知客户取车
|
||||
*
|
||||
* @param noticeCusVO 请求对象
|
||||
* @author 小李
|
||||
* @date 22:40 2024/10/23
|
||||
**/
|
||||
@Override
|
||||
@DSTransactional
|
||||
public void noticeCus(NoticeCusVO noticeCusVO) {
|
||||
// 获取客户信息
|
||||
DlRepairTickets tickets = baseMapper.selectById(noticeCusVO.getId());
|
||||
CustomerMain cus = customerService.getById(tickets.getUserId());
|
||||
// 维修项目
|
||||
List<DictDataRespDTO> repairType = dictDataApi.getDictDataList("repair_type");
|
||||
// 默认是维修
|
||||
String type = "维修";
|
||||
DictDataRespDTO dictDataRespDTO = repairType.stream()
|
||||
.filter(item -> item.getValue().equals(tickets.getRepairType()))
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
if (dictDataRespDTO != null){
|
||||
type = dictDataRespDTO.getLabel();
|
||||
}
|
||||
// 构建消息
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
||||
String start = format.format(noticeCusVO.getTime()[0]);
|
||||
String end = format.format(noticeCusVO.getTime()[1]);
|
||||
String message = String.format(
|
||||
"尊敬的客户您好:您的爱车%s已%s完毕,请您于%s至%s之内前来取车。若有问题可以联系%s,联系电话:%s"
|
||||
, tickets.getCarNo(), type, start, end, noticeCusVO.getName(), noticeCusVO.getMobile()
|
||||
);
|
||||
// todo 小程序通知客户
|
||||
// todo 短信通知客户
|
||||
// 记录日志
|
||||
String recordStr = noticeCusVO.getName()
|
||||
+ "通知客户:"
|
||||
+ cus.getCusName()
|
||||
+ "于"
|
||||
+ start
|
||||
+ "至"
|
||||
+ end
|
||||
+ "前来取车";
|
||||
repairRecordsService.saveRepairRecord(noticeCusVO.getId(), null, RecordTypeEnum.JSGD.getCode(), recordStr, null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -3,14 +3,21 @@ package cn.iocoder.yudao.module.tickets.service.impl;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.iocoder.yudao.common.RepairRoleEnum;
|
||||
import cn.iocoder.yudao.common.SoStatusEnum;
|
||||
import cn.iocoder.yudao.common.TicketsItemStatusEnum;
|
||||
import cn.iocoder.yudao.framework.security.core.LoginUser;
|
||||
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import cn.iocoder.yudao.module.base.entity.RepairWorker;
|
||||
import cn.iocoder.yudao.module.base.service.RepairWorkerService;
|
||||
import cn.iocoder.yudao.module.project.entity.RepairWares;
|
||||
import cn.iocoder.yudao.module.project.service.RepairWaresService;
|
||||
import cn.iocoder.yudao.module.stockOperate.entity.DlRepairSoi;
|
||||
import cn.iocoder.yudao.module.stockOperate.mapper.DlRepairSoMapper;
|
||||
import cn.iocoder.yudao.module.stockOperate.service.DlRepairSoService;
|
||||
import cn.iocoder.yudao.module.stockOperate.service.DlRepairSoiService;
|
||||
import cn.iocoder.yudao.module.system.api.permission.PermissionApi;
|
||||
import cn.iocoder.yudao.module.system.api.permission.RoleApi;
|
||||
import cn.iocoder.yudao.module.system.api.permission.dto.RoleReqDTO;
|
||||
import cn.iocoder.yudao.module.tickets.entity.DlRepairTickets;
|
||||
import cn.iocoder.yudao.module.tickets.entity.DlRepairTitem;
|
||||
import cn.iocoder.yudao.module.tickets.entity.DlTicketWares;
|
||||
@ -33,10 +40,8 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception0;
|
||||
@ -48,8 +53,7 @@ import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionU
|
||||
* @date 11:56 2024/10/15
|
||||
**/
|
||||
@Service
|
||||
public class DlTicketWaresServiceImpl extends ServiceImpl<DlTicketWaresMapper, DlTicketWares>
|
||||
implements DlTicketWaresService {
|
||||
public class DlTicketWaresServiceImpl extends ServiceImpl<DlTicketWaresMapper, DlTicketWares> implements DlTicketWaresService {
|
||||
|
||||
|
||||
@Resource
|
||||
@ -80,7 +84,16 @@ public class DlTicketWaresServiceImpl extends ServiceImpl<DlTicketWaresMapper, D
|
||||
private RepairWaresService repairWaresService;
|
||||
|
||||
@Resource
|
||||
private RepairWorkerService workerService;
|
||||
@Lazy
|
||||
private DlRepairSoMapper dlRepairSoMapper;
|
||||
|
||||
@Resource
|
||||
@Lazy
|
||||
private RoleApi roleApi;
|
||||
|
||||
@Resource
|
||||
@Lazy
|
||||
private PermissionApi permissionApi;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
@ -100,7 +113,7 @@ public class DlTicketWaresServiceImpl extends ServiceImpl<DlTicketWaresMapper, D
|
||||
reqVO.setAdviserId(SecurityFrameworkUtils.getLoginUserId());
|
||||
} else if (userRoleCode.equals(RepairRoleEnum.REPAIR_STAFF.getCode())) {
|
||||
//维修工,进一步判断是否是班组长
|
||||
boolean ifLeader = workerService.getIfLeader();
|
||||
boolean ifLeader = repairWorkerService.getIfLeader();
|
||||
if (ifLeader) {
|
||||
//班组长,看本班组所有数据
|
||||
RepairWorker one = repairWorkerService.getOne(new LambdaQueryWrapper<RepairWorker>().eq(RepairWorker::getUserId, SecurityFrameworkUtils.getLoginUserId()));
|
||||
@ -170,6 +183,20 @@ public class DlTicketWaresServiceImpl extends ServiceImpl<DlTicketWaresMapper, D
|
||||
throw exception0(500, "配件列表为空");
|
||||
}
|
||||
twItemService.saveOrUpdateBatch(list);
|
||||
|
||||
// 通知对应的维修服务顾问和总检
|
||||
// 维修服务顾问即创建工单时选的是谁
|
||||
DlRepairTickets tickets = repairTicketsService.getById(respVO.getTicketId());
|
||||
repairWorkerService.sentMessage(Long.valueOf(tickets.getAdviserId()), "您有新的配件申请单需要审核");
|
||||
// 总检查角色包含总检的员工
|
||||
// 取这个角色的角色信息
|
||||
RoleReqDTO roleInfo = roleApi.getRoleInfo(RepairRoleEnum.INSPECTION.getCode());
|
||||
// 通过角色信息查有这个角色的人
|
||||
List<Long> ids = permissionApi.getUserIdByRoleId(roleInfo.getId());
|
||||
// 发通知
|
||||
if (CollectionUtil.isNotEmpty(ids)){
|
||||
ids.forEach(id -> repairWorkerService.sentMessage(id, "您有新的配件申请单需要审核"));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -199,18 +226,55 @@ public class DlTicketWaresServiceImpl extends ServiceImpl<DlTicketWaresMapper, D
|
||||
@DSTransactional
|
||||
public void auditTicketWares(DlTicketWaresRespVO respVO) {
|
||||
// 设置单据状态
|
||||
baseMapper.update(new LambdaUpdateWrapper<DlTicketWares>()
|
||||
.set(DlTicketWares::getStatus, respVO.getStatus())
|
||||
.eq(DlTicketWares::getId, respVO.getId())
|
||||
);
|
||||
//配件申请单id
|
||||
String mainId = respVO.getId();
|
||||
//单据类型,现在只有配件申请单 01
|
||||
String type = respVO.getType();
|
||||
//单据状态 02 通过 05驳回
|
||||
String status = respVO.getStatus();
|
||||
//配件信息
|
||||
List<DlRepairTitem> repairItemList = respVO.getWares();
|
||||
DlTicketWares updateObj = this.getById(mainId);
|
||||
String ticketMainId = updateObj.getTicketId();
|
||||
updateObj.setStatus(status);
|
||||
this.updateById(updateObj);
|
||||
// 如果是通过并且是领料就还需要把配件信息加入到工单中
|
||||
if (ObjectUtil.isNotEmpty(respVO.getStatus()) && respVO.getStatus().equals("02") && respVO.getType().equals("01")) {
|
||||
if (ObjectUtil.isNotEmpty(status) && status.equals("02") && type.equals("01")) {
|
||||
// 更新维修工单
|
||||
if(null== repairItemList || repairItemList.isEmpty()){
|
||||
repairItemList = new ArrayList<>();
|
||||
//配件没传,去库里面查需要的配件
|
||||
LambdaQueryWrapper<DlTwItem> queryWrapper= new LambdaQueryWrapper<DlTwItem>()
|
||||
.eq(DlTwItem::getTwId,mainId);
|
||||
List<DlTwItem> applyList = twItemService.list(queryWrapper);
|
||||
if(!applyList.isEmpty()){
|
||||
//查配件库
|
||||
List<RepairWares> waresList = repairWaresService.listByIds(applyList.stream().map(DlTwItem::getWaresId).collect(Collectors.toList()));
|
||||
Map<String,RepairWares> waresMap =waresList.stream().collect(Collectors.toMap(RepairWares::getId, Function.identity()));
|
||||
//组装工单子表数据
|
||||
for (DlTwItem item:applyList){
|
||||
DlRepairTitem repairTitem = new DlRepairTitem();
|
||||
repairTitem.setTicketId(ticketMainId);
|
||||
repairTitem.setItemCount(item.getWaresCount());
|
||||
repairTitem.setItemName(item.getWaresName());
|
||||
repairTitem.setItemUnit(waresMap.get(item.getWaresId()).getUnit());
|
||||
repairTitem.setItemPrice(new BigDecimal(waresMap.get(item.getWaresId()).getPrice()));
|
||||
//默认不打折为1
|
||||
repairTitem.setItemDiscount(new BigDecimal(1));
|
||||
repairTitem.setItemMoney(new BigDecimal(repairTitem.getItemCount()).multiply(repairTitem.getItemPrice()));
|
||||
//类型是配件
|
||||
repairTitem.setItemType("02");
|
||||
repairTitem.setPartId(item.getWaresId());
|
||||
repairTitem.setItemStatus(TicketsItemStatusEnum.WAITING_RECEIVE.getCode());
|
||||
repairItemList.add(repairTitem);
|
||||
}
|
||||
}
|
||||
}
|
||||
// 计算配件的总价
|
||||
BigDecimal reduce = respVO.getWares().stream().map(DlRepairTitem::getItemMoney).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
BigDecimal reduce = repairItemList.stream().map(DlRepairTitem::getItemMoney).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
repairTicketsService.update(new LambdaUpdateWrapper<DlRepairTickets>()
|
||||
// 工单子项总数量增加上配件的数量
|
||||
.setSql("count = count + " + respVO.getWares().size())
|
||||
.setSql("count = count + " + repairItemList.size())
|
||||
// 工单配件总价
|
||||
.setSql("part_price = part_price + " + reduce)
|
||||
// 工单总价
|
||||
@ -221,18 +285,25 @@ public class DlTicketWaresServiceImpl extends ServiceImpl<DlTicketWaresMapper, D
|
||||
.setSql("profit = profit + " + reduce)
|
||||
// 领料状态
|
||||
.set(DlRepairTickets::getPartStatus, "02")
|
||||
.eq(DlRepairTickets::getId, respVO.getTicketId())
|
||||
.eq(DlRepairTickets::getId, ticketMainId)
|
||||
);
|
||||
// 更新维修工单子表
|
||||
respVO.getWares().forEach(item -> {
|
||||
repairItemList.forEach(item -> {
|
||||
// 主表id
|
||||
item.setTicketId(respVO.getTicketId());
|
||||
item.setTicketId(ticketMainId);
|
||||
// 类型为配件
|
||||
item.setItemType("02");
|
||||
// 状态为未领料
|
||||
item.setItemStatus("08");
|
||||
item.setItemStatus(TicketsItemStatusEnum.WAITING_RECEIVE.getCode());
|
||||
});
|
||||
repairTitemService.saveBatch(respVO.getWares());
|
||||
repairTitemService.saveBatch(repairItemList);
|
||||
|
||||
// 发送通过的消息给仓库
|
||||
RoleReqDTO roleInfo = roleApi.getRoleInfo(RepairRoleEnum.WAREHOUSE.getCode());
|
||||
List<Long> ids = permissionApi.getUserIdByRoleId(roleInfo.getId());
|
||||
if (CollectionUtil.isNotEmpty(ids)){
|
||||
ids.forEach(id -> repairWorkerService.sentMessage(id, "您有新的配件申请单需要处理"));
|
||||
}
|
||||
} else if (ObjectUtil.isNotEmpty(respVO.getStatus()) && respVO.getStatus().equals("02") && respVO.getType().equals("02")) {
|
||||
// 如果通过退料,也需要更新
|
||||
// 更新维修工单
|
||||
@ -276,11 +347,15 @@ public class DlTicketWaresServiceImpl extends ServiceImpl<DlTicketWaresMapper, D
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// 发送没有通过的消息给员工
|
||||
DlTicketWares ticketWares = baseMapper.selectById(respVO.getId());
|
||||
repairWorkerService.sentMessage(ticketWares.getRepairId(), "您的配件申请单被驳回了");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 仓库通知领料
|
||||
* 仓库通知领料、退料
|
||||
*
|
||||
* @param respVO 请求对象
|
||||
* @author 小李
|
||||
@ -289,6 +364,9 @@ public class DlTicketWaresServiceImpl extends ServiceImpl<DlTicketWaresMapper, D
|
||||
@Override
|
||||
@DSTransactional
|
||||
public void passTicketWares(DlTicketWaresRespVO respVO) {
|
||||
respVO.getRepairSo().setSoTime(new Date());
|
||||
// 把单据类型先取出来(02是领料,04是退料)
|
||||
String type = respVO.getRepairSo().getSoType();
|
||||
// 查工单子表中的配件信息
|
||||
List<DlRepairTitem> list = repairTitemService.list(new LambdaQueryWrapper<DlRepairTitem>().and(i -> {
|
||||
i.eq(DlRepairTitem::getTicketId, respVO.getTicketId())
|
||||
@ -319,11 +397,12 @@ public class DlTicketWaresServiceImpl extends ServiceImpl<DlTicketWaresMapper, D
|
||||
.map(i -> new BigDecimal(i.getGoodsCount()).multiply(i.getGoodsPrice()))
|
||||
// 计算总价
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
// 生成领料单
|
||||
// 生成领料单、退料单
|
||||
respVO.getRepairSo().setTotalPrice(reduce);
|
||||
respVO.getRepairSo().setItemCount(list.size());
|
||||
respVO.getRepairSo().setItemCount(respVO.getRepairSois().stream().mapToInt(DlRepairSoi::getGoodsCount).sum());
|
||||
respVO.getRepairSo().setTwId(respVO.getId());
|
||||
repairSoService.save(respVO.getRepairSo());
|
||||
// 生成领料单子表
|
||||
// 生成领料单、退料单子表
|
||||
respVO.getRepairSois().forEach(item -> {
|
||||
item.setSoId(respVO.getRepairSo().getId());
|
||||
});
|
||||
@ -332,7 +411,8 @@ public class DlTicketWaresServiceImpl extends ServiceImpl<DlTicketWaresMapper, D
|
||||
/*
|
||||
同理,通知领料的数量可能与实际需要的数量不一致,需要重新计算状态
|
||||
*/
|
||||
// 先查老数据
|
||||
// 先查老数据,领料才需要更新
|
||||
if (type.equals("02")){
|
||||
List<DlTwItem> oldData = twItemService.list(new LambdaQueryWrapper<DlTwItem>().in(DlTwItem::getId, respVO.getItems().stream().map(DlTwItem::getId).collect(Collectors.toList())));
|
||||
// 构造新数据
|
||||
List<DlTwItem> newData = oldData.stream().map(item -> {
|
||||
@ -348,10 +428,11 @@ public class DlTicketWaresServiceImpl extends ServiceImpl<DlTicketWaresMapper, D
|
||||
return dlTwItem;
|
||||
}).collect(Collectors.toList());
|
||||
twItemService.updateBatchById(newData);
|
||||
}
|
||||
|
||||
// 通知维修工
|
||||
// 查维修工的userId
|
||||
repairWorkerService.sentMessage(respVO.getRepairId(), "您有新的领料单需要确认");
|
||||
repairWorkerService.sentMessage(respVO.getRepairId(), type.equals("02") ? "您有新的领料单需要确认" : "您有新的退料单需要确认");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -393,6 +474,72 @@ public class DlTicketWaresServiceImpl extends ServiceImpl<DlTicketWaresMapper, D
|
||||
// 更新申请单子表状态
|
||||
twItemService.updateBatchById(respVO.getItems());
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建配件申请单
|
||||
*
|
||||
* @param respVO 请求体
|
||||
* @author vinjor-M
|
||||
* @date 14:48 2024/10/22
|
||||
**/
|
||||
@Override
|
||||
public void createApplyOrder(DlTicketWaresRespVO respVO) {
|
||||
//默认待审核
|
||||
respVO.setStatus("01");
|
||||
//查维修单信息
|
||||
DlRepairTickets tickets = repairTicketsService.getById(respVO.getTicketId());
|
||||
respVO.setLicenseNumber(tickets.getCarNo());
|
||||
respVO.setAdviserId(Long.valueOf(tickets.getAdviserId()));
|
||||
respVO.setAdviserName(tickets.getAdviserName());
|
||||
this.save(respVO);
|
||||
if(!respVO.getItems().isEmpty()){
|
||||
List<DlTwItem> list = respVO.getItems().stream().map(dlTwItem -> dlTwItem.setTwId(respVO.getId())).collect(Collectors.toList());
|
||||
twItemService.saveBatch(list);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 维修工的角度查提交的配件申请单\待确认领料单\待确认退料单 待处理数量
|
||||
*
|
||||
* @author vinjor-M
|
||||
* @date 15:38 2024/10/22
|
||||
**/
|
||||
@Override
|
||||
public Map<String, Integer> getWorkerTodo() {
|
||||
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
||||
LambdaQueryWrapper<DlTicketWares> queryWrapper = new LambdaQueryWrapper<DlTicketWares>()
|
||||
.eq(DlTicketWares::getRepairId,loginUser.getId())
|
||||
.eq(DlTicketWares::getType,"01");
|
||||
List<DlTicketWares> list = this.list(queryWrapper);
|
||||
Map<String, Integer> rtnMap = new HashMap<>();
|
||||
//所有提交的
|
||||
Integer submitNum = list.size();
|
||||
//已通过的
|
||||
Integer allowNum = 0;
|
||||
//未通过的
|
||||
Integer noAllowNum = 0;
|
||||
//待确认领料单
|
||||
Integer waitingReceiveNum = dlRepairSoMapper.selectCountNum("02",loginUser.getId(), SoStatusEnum.TO_BE_PICKED.getCode());
|
||||
//待确认退料单
|
||||
Integer waitingBackNum = dlRepairSoMapper.selectCountNum("04",loginUser.getId(), SoStatusEnum.TO_BE_RETURNED.getCode());
|
||||
for (DlTicketWares wares:list){
|
||||
if("02".equals(wares.getStatus())){
|
||||
//已通过
|
||||
allowNum++;
|
||||
}else if("05".equals(wares.getStatus())){
|
||||
//被驳回
|
||||
noAllowNum++;
|
||||
}
|
||||
}
|
||||
rtnMap.put("submitNum",submitNum);
|
||||
rtnMap.put("allowNum",allowNum);
|
||||
rtnMap.put("noAllowNum",noAllowNum);
|
||||
rtnMap.put("waitingReceiveNum",waitingReceiveNum);
|
||||
rtnMap.put("waitingBackNum",waitingBackNum);
|
||||
return rtnMap;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -10,13 +10,14 @@ import cn.iocoder.yudao.module.tickets.service.DlTicketWaresService;
|
||||
import cn.iocoder.yudao.module.tickets.service.DlTwItemService;
|
||||
import cn.iocoder.yudao.module.tickets.vo.DlTwItemReqVO;
|
||||
import cn.iocoder.yudao.module.tickets.vo.DlTwItemRespVO;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@ -35,6 +36,9 @@ public class DlTwItemServiceImpl extends ServiceImpl<DlTwItemMapper, DlTwItem>
|
||||
@Resource
|
||||
@Lazy
|
||||
private DlTicketWaresService ticketWaresService;
|
||||
@Resource
|
||||
@Lazy
|
||||
private RepairWaresService waresService;
|
||||
|
||||
/**
|
||||
* 根据主表查看全部
|
||||
@ -47,6 +51,12 @@ public class DlTwItemServiceImpl extends ServiceImpl<DlTwItemMapper, DlTwItem>
|
||||
public List<DlTwItemRespVO> listTwItem(DlTwItemReqVO reqVO){
|
||||
// 查记录
|
||||
List<DlTwItem> dlTwItems = baseMapper.listTwItem(reqVO);
|
||||
//所有有配件的分类
|
||||
List<Map<String,String>> typeMapList = waresService.getAllTypeList();
|
||||
Map<String,String> typeMap = new HashMap<>();
|
||||
for(Map<String,String> map:typeMapList){
|
||||
typeMap.put(map.get("id"),map.get("name"));
|
||||
}
|
||||
// 查配件详情
|
||||
List<String> ids = dlTwItems.stream().map(DlTwItem::getWaresId).collect(Collectors.toList());
|
||||
if (CollectionUtil.isNotEmpty(ids)){
|
||||
@ -57,6 +67,7 @@ public class DlTwItemServiceImpl extends ServiceImpl<DlTwItemMapper, DlTwItem>
|
||||
.filter(i -> i.getId().equals(bean.getWaresId()))
|
||||
.findFirst()
|
||||
.ifPresent(bean::setWares);
|
||||
bean.setTypeName(typeMap.get(bean.getWares().getType()));
|
||||
return bean;
|
||||
}).collect(Collectors.toList());
|
||||
}
|
||||
|
@ -48,4 +48,15 @@ public class DlRepairTicketsRespVO extends DlRepairTickets {
|
||||
List<DlRepairTitemReqVO> wares;
|
||||
List<DlRepairTitemReqVO> projects;
|
||||
|
||||
/**
|
||||
* 维修工完成的类别
|
||||
* 01:完成并移交下一班组
|
||||
* 02:完成并移交总检
|
||||
* 03:完成工单
|
||||
*/
|
||||
private String finishType;
|
||||
|
||||
/** 如果是完成并移交下一班组,就有移交给了那一个班组 */
|
||||
private String nextName;
|
||||
|
||||
}
|
||||
|
@ -22,4 +22,7 @@ public class DlTicketWaresReqVO extends DlTicketWares {
|
||||
|
||||
/** 角色 */
|
||||
private Integer userRole;
|
||||
|
||||
/** 查看可以退料的数据时为tru */
|
||||
private Boolean isBack;
|
||||
}
|
||||
|
@ -15,4 +15,6 @@ public class DlTwItemRespVO extends DlTwItem {
|
||||
|
||||
/** 配件详情 */
|
||||
private RepairWares wares;
|
||||
/** 配件分类名称 */
|
||||
private String typeName;
|
||||
}
|
||||
|
@ -0,0 +1,30 @@
|
||||
package cn.iocoder.yudao.module.tickets.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Data
|
||||
public class NoticeCusVO {
|
||||
|
||||
/** 维修工单ID */
|
||||
private String id;
|
||||
|
||||
/** 取车时间 */
|
||||
@Schema(pattern = "时间区间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private Date[] time;
|
||||
|
||||
/** 联系人 */
|
||||
private String name;
|
||||
|
||||
/** 联系电话 */
|
||||
private String mobile;
|
||||
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
}
|
@ -11,7 +11,7 @@
|
||||
<select id="customerSource" resultType="cn.iocoder.yudao.module.base.vo.RepairStatisticsVO">
|
||||
SELECT
|
||||
COALESCE(sdd.label, '未知') AS name,
|
||||
COUNT(bcm.id) AS vale
|
||||
COUNT(bcm.id) AS value
|
||||
FROM
|
||||
base_customer_main bcm
|
||||
LEFT JOIN system_dict_data sdd ON bcm.data_from = sdd.value AND sdd.dict_type = 'cus_data_from' AND sdd.deleted = 0
|
||||
@ -51,7 +51,7 @@
|
||||
<select id="paymentWay" resultType="cn.iocoder.yudao.module.base.vo.RepairStatisticsVO">
|
||||
SELECT
|
||||
COALESCE(sdd.label, '未知') AS name,
|
||||
COUNT(roi.id)
|
||||
COUNT(roi.id) AS value
|
||||
FROM
|
||||
repair_order_info roi
|
||||
LEFT JOIN system_dict_data sdd ON roi.pay_type = sdd.value AND sdd.dict_type = 'repair_pay_type' AND sdd.deleted = 0
|
||||
|
@ -24,6 +24,9 @@
|
||||
<if test="entity.name != null and entity.name != ''">
|
||||
and drw.name like concat('%', #{entity.name}, '%')
|
||||
</if>
|
||||
<if test="entity.type != null and entity.type != ''">
|
||||
and drw.type =#{entity.type}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY
|
||||
drw.id
|
||||
@ -44,4 +47,12 @@
|
||||
LEFT JOIN dl_base_warehouse dbw ON drw.warehouse = dbw.id AND dbw.deleted = 0
|
||||
where drw.name = #{name} order by drw.create_time desc limit 1
|
||||
</select>
|
||||
<select id="selectAllType" resultType="java.util.Map">
|
||||
SELECT
|
||||
tmp.type as id,
|
||||
dbt.`name`
|
||||
FROM
|
||||
( SELECT DISTINCT type FROM dl_repair_wares ) tmp
|
||||
LEFT JOIN dl_base_type dbt ON tmp.type = dbt.id
|
||||
</select>
|
||||
</mapper>
|
@ -24,39 +24,44 @@
|
||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="updater" column="updater" jdbcType="VARCHAR"/>
|
||||
<result property="twId" column="tw_id" />
|
||||
<result property="licenseNumber" column="license_number" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_SQL">
|
||||
select id,
|
||||
so_type,
|
||||
purchase_type,
|
||||
so_no,
|
||||
supplier_id,
|
||||
supplier_name,
|
||||
user_id,
|
||||
user_name,
|
||||
so_time,
|
||||
item_count,
|
||||
total_price,
|
||||
so_status,
|
||||
remark,
|
||||
corp_id,
|
||||
corp_name,
|
||||
dept_id,
|
||||
create_time,
|
||||
update_time,
|
||||
updater
|
||||
select so.id,
|
||||
so.so_type,
|
||||
so.purchase_type,
|
||||
so.so_no,
|
||||
so.supplier_id,
|
||||
so.supplier_name,
|
||||
so.user_id,
|
||||
so.user_name,
|
||||
so.so_time,
|
||||
so.item_count,
|
||||
so.total_price,
|
||||
so.so_status,
|
||||
so.remark,
|
||||
so.corp_id,
|
||||
so.corp_name,
|
||||
so.dept_id,
|
||||
so.create_time,
|
||||
so.update_time,
|
||||
so.updater,
|
||||
so.tw_id,
|
||||
dtw.license_number
|
||||
from dl_repair_so so
|
||||
LEFT JOIN dl_ticket_wares dtw ON so.tw_id = dtw.id
|
||||
where so.deleted = '0'
|
||||
</sql>
|
||||
|
||||
<select id="getRepairSoPage" resultMap="BaseResultMap">
|
||||
<include refid="Base_SQL"/>
|
||||
<if test="map.soType != null and map.soType">
|
||||
and so_type = #{map.soType}
|
||||
and so.so_type = #{map.soType}
|
||||
</if>
|
||||
<if test="map.purchaseType != null and map.purchaseType != ''">
|
||||
and purchase_type = #{map.purchaseType}
|
||||
and so.purchase_type = #{map.purchaseType}
|
||||
</if>
|
||||
<if test="map.soStatus != null and map.soStatus != ''">
|
||||
and so.so_status = #{map.soStatus}
|
||||
@ -70,9 +75,6 @@
|
||||
<if test="map.supplierId != null and map.supplierId != ''">
|
||||
and so.supplier_id = #{map.supplierId}
|
||||
</if>
|
||||
<if test="map.soStatus != null and map.soStatus != ''">
|
||||
and so.so_status = #{map.soStatus}
|
||||
</if>
|
||||
<if test="map.corpId != null and map.corpId != ''">
|
||||
and so.corp_id = #{map.corpId}
|
||||
</if>
|
||||
@ -84,4 +86,15 @@
|
||||
</if>
|
||||
order by so.create_time desc
|
||||
</select>
|
||||
<select id="selectCountNum" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
COUNT(id)
|
||||
FROM
|
||||
dl_repair_so
|
||||
WHERE
|
||||
user_id = #{userId}
|
||||
AND so_type = #{type}
|
||||
AND so_status = #{status}
|
||||
AND deleted = 0
|
||||
</select>
|
||||
</mapper>
|
||||
|
@ -226,6 +226,9 @@
|
||||
</when>
|
||||
</choose>
|
||||
</if>
|
||||
<if test="map.nowRepairId != null and map.nowRepairId != ''">
|
||||
and drt.now_repair_id = #{map.nowRepairId}
|
||||
</if>
|
||||
order by drt.create_time desc
|
||||
</select>
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
sale_name = #{saleName},
|
||||
</if>
|
||||
</set>
|
||||
WHERE ticket_id = #{ticketId}
|
||||
WHERE ticket_id = #{ticketId} and project_id = #{projectId}
|
||||
</update>
|
||||
|
||||
|
||||
|
@ -15,6 +15,8 @@
|
||||
<result property="repairName" column="repair_name" />
|
||||
<result property="adviserId" column="adviser_id" />
|
||||
<result property="adviserName" column="adviser_name" />
|
||||
<result property="licenseNumber" column="license_number" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_SQL">
|
||||
@ -24,7 +26,9 @@
|
||||
dtw.repair_id as repair_id,
|
||||
dtw.repair_name as repair_name,
|
||||
dtw.adviser_id as adviser_id,
|
||||
dtw.adviser_name as adviser_name
|
||||
dtw.adviser_name as adviser_name,
|
||||
dtw.license_number as license_number,
|
||||
dtw.create_time as create_time
|
||||
from dl_ticket_wares dtw
|
||||
left join dl_repair_tickets drt
|
||||
on dtw.ticket_id = drt.id
|
||||
@ -39,7 +43,7 @@
|
||||
or
|
||||
drt.ticket_no like concat('%', #{map.query}, '%')
|
||||
or
|
||||
drt.car_no like concat('%', #{map.query}, '%')
|
||||
dtw.license_number like concat('%', #{map.query}, '%')
|
||||
)
|
||||
</if>
|
||||
<if test="map.type != null and map.type != ''">
|
||||
@ -59,9 +63,12 @@
|
||||
<if test="map.userRole != null">
|
||||
and (
|
||||
<choose>
|
||||
<when test="map.userRole == 5">
|
||||
<when test="map.userRole == 5 and map.isBack == null">
|
||||
dtw.status not in ('01', '05', '03')
|
||||
</when>
|
||||
<when test="map.userRole == 5 and map.isBack">
|
||||
dtw.status in ('03', '04')
|
||||
</when>
|
||||
</choose>
|
||||
)
|
||||
</if>
|
||||
|
@ -15,13 +15,14 @@
|
||||
<result property="isShow" column="is_show" />
|
||||
<result property="waresCouldCount" column="wares_could_count" />
|
||||
<result property="waresAlreadyCount" column="wares_already_count" />
|
||||
<result property="waresBackCount" column="wares_back_count" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_SQL">
|
||||
select
|
||||
id,tw_id,wares_id,
|
||||
wares_name,wares_count,wares_status,remark,
|
||||
is_show,wares_could_count, wares_already_count
|
||||
is_show,wares_could_count, wares_already_count, wares_back_count
|
||||
from dl_tw_item dti
|
||||
where dti.deleted = '0'
|
||||
</sql>
|
||||
|
@ -0,0 +1,26 @@
|
||||
package cn.iocoder.yudao.module.rescue.controller.admin;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.module.rescue.service.IRescueOrderInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/rescue/bigScree")
|
||||
public class RescueBigScreeController {
|
||||
@Autowired
|
||||
private IRescueOrderInfoService rescueOrderInfoService;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param type count 数量 money 金额
|
||||
* @param timeType day 日 month 月 year 年
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getRescueOrderCount")
|
||||
public CommonResult getRescueOrderCount(String type, String timeType){
|
||||
return CommonResult.success(rescueOrderInfoService.getRescueOrderCount(type,timeType));
|
||||
}
|
||||
}
|
@ -7,6 +7,7 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 救援订单Mapper接口
|
||||
@ -33,5 +34,4 @@ public interface RescueOrderInfoMapper extends BaseMapper<RescueOrderInfo>
|
||||
*/
|
||||
public List<RescueOrderInfo> selectRescueOrderInfoList(RescueOrderInfo rescueOrderInfo);
|
||||
Double avgPartnerScore(@Param("driverId") Long driverId);
|
||||
|
||||
}
|
||||
|
@ -69,4 +69,12 @@ public interface IRescueOrderInfoService extends IService<RescueOrderInfo>
|
||||
RescueOrderInfo getOrderByOrderNo(String orderNo);
|
||||
Map<String, String> payNotify( JSONObject jsonObject);
|
||||
public void reviewOrder(String rescueId, Integer starLevel, String reviewStr) throws Exception;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param type count 数量 money 金额
|
||||
* @param timeType day 日 month 月 year 年
|
||||
* @return
|
||||
*/
|
||||
List<Map<String, Object>> getRescueOrderCount(String type, String timeType);
|
||||
}
|
||||
|
@ -1,6 +1,9 @@
|
||||
package cn.iocoder.yudao.module.rescue.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.date.DateField;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import cn.iocoder.yudao.module.rescue.domain.*;
|
||||
@ -22,6 +25,7 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
import java.util.stream.Collectors;
|
||||
@ -313,4 +317,91 @@ public class RescueOrderInfoServiceImpl extends ServiceImpl<RescueOrderInfoMappe
|
||||
driverInfoService.updateById(driverInfo);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param type count 数量 money 金额
|
||||
* @param timeType day 日 month 月 year 年
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> getRescueOrderCount(String type, String timeType) {
|
||||
List<Map<String, Object>> res = new ArrayList<>();
|
||||
DateTime startTime = DateUtil.date();
|
||||
DateTime endTime = new DateTime();
|
||||
List<DateTime> dateList = new ArrayList<>();
|
||||
switch (timeType) {
|
||||
case "day":
|
||||
startTime = DateUtil.beginOfDay(startTime);
|
||||
endTime = DateUtil.endOfDay(endTime);
|
||||
dateList = DateUtil.rangeToList(startTime, endTime, DateField.HOUR_OF_DAY);
|
||||
break;
|
||||
case "month":
|
||||
startTime = DateUtil.beginOfMonth(startTime);
|
||||
endTime = DateUtil.endOfMonth(endTime);
|
||||
dateList = DateUtil.rangeToList(startTime, endTime, DateField.DAY_OF_MONTH);
|
||||
break;
|
||||
case "year":
|
||||
startTime = DateUtil.beginOfYear(startTime);
|
||||
endTime = DateUtil.endOfYear(endTime);
|
||||
dateList = DateUtil.rangeToList(startTime, endTime, DateField.MONTH);
|
||||
break;
|
||||
}
|
||||
LambdaQueryWrapper<RescueOrderInfo> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.between(RescueOrderInfo::getCreateTime, startTime, endTime);
|
||||
queryWrapper.eq(RescueOrderInfo::getOrderStatus, "3");
|
||||
List<RescueOrderInfo> list = this.list(queryWrapper);
|
||||
for (DateTime dateTime : dateList) {
|
||||
String name = "";
|
||||
switch (timeType) {
|
||||
case "day":
|
||||
name = dateTime.toString("HH:mm");
|
||||
break;
|
||||
case "month":
|
||||
name = dateTime.toString("MM-dd");
|
||||
break;
|
||||
case "year":
|
||||
name = dateTime.toString("YYYY-MM");
|
||||
break;
|
||||
}
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
DateTime endTime1 = getEndTime(timeType, dateTime);
|
||||
List<RescueOrderInfo> rescueOrderInfos = filterOrdersByDate(list, dateTime, endTime1);
|
||||
map.put("name", name);
|
||||
if ("count".equals(type)) {
|
||||
long count = rescueOrderInfos.stream().count();
|
||||
map.put("value", count);
|
||||
}else if ("money".equals(type)) {
|
||||
// 使用 stream() 计算总金额,并防止空指针异常
|
||||
long money = rescueOrderInfos.stream()
|
||||
.filter(Objects::nonNull) // 过滤掉 null 对象
|
||||
.filter(order -> Objects.nonNull(order.getPayMoney())) // 过滤掉 payMoney 为 null 的对象
|
||||
.mapToLong(RescueOrderInfo::getPayMoney) // 获取支付金额
|
||||
.sum(); // 计算总和
|
||||
//将分转为元
|
||||
map.put("value", (double)money / 100);
|
||||
}
|
||||
res.add(map);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
public DateTime getEndTime(String timeType, DateTime startTime){
|
||||
switch (timeType) {
|
||||
case "day":
|
||||
return DateUtil.endOfHour(startTime);
|
||||
case "month":
|
||||
return DateUtil.endOfDay(startTime);
|
||||
case "year":
|
||||
return DateUtil.endOfMonth(startTime);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public List<RescueOrderInfo> filterOrdersByDate(List<RescueOrderInfo> orders, Date startDate, Date endDate) {
|
||||
return orders.stream()
|
||||
.filter(order -> order.getOrderTime() != null &&
|
||||
!order.getOrderTime().before(startDate) &&
|
||||
!order.getOrderTime().after(endDate))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
|
4
sql/增量DB.sql
Normal file
4
sql/增量DB.sql
Normal file
File diff suppressed because one or more lines are too long
@ -19,12 +19,14 @@ import cn.iocoder.yudao.module.system.controller.admin.user.LoginBody;
|
||||
import cn.iocoder.yudao.module.system.convert.auth.AuthConvert;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.permission.MenuDO;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.permission.RoleDO;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.service.ServicePackageDO;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
|
||||
import cn.iocoder.yudao.module.system.enums.logger.LoginLogTypeEnum;
|
||||
import cn.iocoder.yudao.module.system.service.auth.AdminAuthService;
|
||||
import cn.iocoder.yudao.module.system.service.permission.MenuService;
|
||||
import cn.iocoder.yudao.module.system.service.permission.PermissionService;
|
||||
import cn.iocoder.yudao.module.system.service.permission.RoleService;
|
||||
import cn.iocoder.yudao.module.system.service.service.ServicePackageService;
|
||||
import cn.iocoder.yudao.module.system.service.social.SocialClientService;
|
||||
import cn.iocoder.yudao.module.system.service.user.AdminUserService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
@ -32,6 +34,7 @@ import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Parameters;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@ -39,6 +42,7 @@ import javax.annotation.Resource;
|
||||
import javax.annotation.security.PermitAll;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.validation.Valid;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
@ -75,6 +79,8 @@ public class AuthController {
|
||||
private PermissionApi permissionApi;
|
||||
@Resource
|
||||
private RoleApi roleApi;
|
||||
@Resource
|
||||
private ServicePackageService servicePackageService;
|
||||
|
||||
|
||||
@PostMapping("/login")
|
||||
@ -185,7 +191,7 @@ public class AuthController {
|
||||
|
||||
@GetMapping("/get-permission-info")
|
||||
@Operation(summary = "获取登录用户的权限信息")
|
||||
public CommonResult<AuthPermissionInfoRespVO> getPermissionInfo() {
|
||||
public CommonResult<AuthPermissionInfoRespVO> getPermissionInfo(String routeCode) {
|
||||
// 1.1 获得用户信息
|
||||
AdminUserDO user = userService.getUser(getLoginUserId());
|
||||
if (user == null) {
|
||||
@ -202,6 +208,12 @@ public class AuthController {
|
||||
|
||||
// 1.3 获得菜单列表
|
||||
Set<Long> menuIds = permissionService.getRoleMenuListByRoleId(convertSet(roles, RoleDO::getId));
|
||||
//过滤出来当前服务的菜单
|
||||
if (StringUtils.isNotEmpty(routeCode)){
|
||||
ServicePackageDO servicePackage = servicePackageService.getServicePackage(routeCode);
|
||||
Set<Long> servicePackageMenuIds = servicePackage.getMenuIds();
|
||||
menuIds= menuIds.stream().filter(servicePackageMenuIds::contains).collect(Collectors.toSet());
|
||||
}
|
||||
List<MenuDO> menuList = menuService.getMenuList(menuIds);
|
||||
menuList = menuService.filterDisableMenus(menuList);
|
||||
|
||||
|
@ -88,5 +88,9 @@ public class ServicePackageController {
|
||||
List<ServicePackageDO> list = servicePackageService.getServicePackageListByStatus(CommonStatusEnum.ENABLE.getStatus());
|
||||
return success(BeanUtils.toBean(list, ServicePackageSimpleRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping({"/getPackageListByTenantId"})
|
||||
public CommonResult<List<ServicePackageDO>> getPackageListByTenantId() {
|
||||
List<ServicePackageDO> list = servicePackageService.getPackageListByTenantId();
|
||||
return success(list);
|
||||
}
|
||||
}
|
@ -19,6 +19,7 @@ public class ServicePackageRespVO {
|
||||
@Schema(description = "套餐名", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
|
||||
@ExcelProperty("套餐名")
|
||||
private String name;
|
||||
private String coverImg;
|
||||
|
||||
@Schema(description = "套餐状态(0正常 1停用)", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@ExcelProperty("租户状态(0正常 1停用)")
|
||||
|
@ -15,6 +15,7 @@ public class ServicePackageSaveReqVO {
|
||||
@Schema(description = "套餐名", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
|
||||
@NotEmpty(message = "套餐名不能为空")
|
||||
private String name;
|
||||
private String coverImg;
|
||||
|
||||
@Schema(description = "套餐状态(0正常 1停用)", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@NotNull(message = "套餐状态(0正常 1停用)不能为空")
|
||||
|
@ -17,4 +17,5 @@ public class ServicePackageSimpleRespVO {
|
||||
@NotNull(message = "套餐名不能为空")
|
||||
private String name;
|
||||
|
||||
|
||||
}
|
||||
|
@ -40,6 +40,7 @@ public class ServicePackageDO extends BaseDO {
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
private String coverImg;
|
||||
/**
|
||||
* 关联的菜单编号
|
||||
*/
|
||||
|
@ -29,4 +29,7 @@ public interface ServicePackageMapper extends BaseMapperX<ServicePackageDO> {
|
||||
default List<ServicePackageDO> selectListByStatus(Integer status) {
|
||||
return selectList(ServicePackageDO::getStatus, status);
|
||||
}
|
||||
|
||||
|
||||
List<ServicePackageDO> getPackageListByTenantId();
|
||||
}
|
@ -78,4 +78,14 @@ public interface ServicePackageService {
|
||||
* @param ids ids
|
||||
**/
|
||||
List<ServicePackageDO> getServicePackageByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 查租户服务
|
||||
*
|
||||
* @author zcy
|
||||
* @date 10:37 2024/9/24
|
||||
**/
|
||||
List<ServicePackageDO> getPackageListByTenantId();
|
||||
|
||||
|
||||
}
|
@ -4,6 +4,8 @@ import cn.iocoder.yudao.framework.common.config.CommonStr;
|
||||
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
|
||||
import cn.iocoder.yudao.framework.datapermission.core.rule.DataPermissionRule;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.security.core.LoginUser;
|
||||
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import cn.iocoder.yudao.framework.tenant.core.util.TenantUtils;
|
||||
import cn.iocoder.yudao.module.system.api.service.dto.ServicePackageDto;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.permission.vo.role.RoleSaveReqVO;
|
||||
@ -14,6 +16,7 @@ import cn.iocoder.yudao.module.system.enums.permission.RoleTypeEnum;
|
||||
import cn.iocoder.yudao.module.system.service.permission.PermissionService;
|
||||
import cn.iocoder.yudao.module.system.service.permission.RoleService;
|
||||
import cn.iocoder.yudao.module.system.service.tenant.TenantService;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@ -155,4 +158,19 @@ public class ServicePackageServiceImpl implements ServicePackageService {
|
||||
public List<ServicePackageDO> getServicePackageByIds(List<String> ids){
|
||||
return servicePackageMapper.selectList(new LambdaQueryWrapperX<ServicePackageDO>().in(ServicePackageDO::getId, ids));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ServicePackageDO> getPackageListByTenantId() {
|
||||
//获取当前登录用户
|
||||
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
||||
Long tenantId = loginUser.getTenantId();
|
||||
TenantDO tenant = tenantService.getTenant(tenantId);
|
||||
Set<String> packageId = tenant.getPackageId();
|
||||
List<String> ids =new ArrayList<>();
|
||||
for (String s : packageId) {
|
||||
ids.add(s);
|
||||
}
|
||||
return this.getServicePackageByIds(ids);
|
||||
|
||||
}
|
||||
}
|
@ -180,6 +180,7 @@ logging:
|
||||
cn.iocoder.yudao.module.staff.mapper: debug #
|
||||
cn.iocoder.yudao.module.property.mapper: debug #
|
||||
cn.iocoder.yudao.module.tickets.mapper: debug #
|
||||
cn.iocoder.yudao.module.project.mapper: debug #
|
||||
|
||||
debug: false
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user