Commit b9067e24 by wangli

重命名

1 parent 83f7e9b2
Showing with 60 additions and 59 deletions
......@@ -5,5 +5,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface EngineerBusinessDao extends BaseMapper<EngineerBusiness> {
public interface EngineerBusinessMPDao extends BaseMapper<EngineerBusiness> {
}
......@@ -5,6 +5,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface EngineerInfoDao extends BaseMapper<EngineerInfo> {
public interface EngineerInfoMPDao extends BaseMapper<EngineerInfo> {
}
......@@ -5,5 +5,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface EngineerSkillDao extends BaseMapper<EngineerSkill> {
public interface EngineerSkillMPDao extends BaseMapper<EngineerSkill> {
}
\ No newline at end of file
......@@ -5,5 +5,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface EngineerTimelineDao extends BaseMapper<EngineerTimeline> {
public interface EngineerTimelineMPDao extends BaseMapper<EngineerTimeline> {
}
......@@ -5,5 +5,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface OrderAppointmentDao extends BaseMapper<OrderAppointment> {
public interface OrderAppointmentMPDao extends BaseMapper<OrderAppointment> {
}
......@@ -5,5 +5,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface OrderEventDao extends BaseMapper<OrderEvent> {
public interface OrderEventMPDao extends BaseMapper<OrderEvent> {
}
......@@ -5,5 +5,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface OrderRequestDao extends BaseMapper<OrderRequest> {
public interface OrderRequestMPDao extends BaseMapper<OrderRequest> {
}
......@@ -5,5 +5,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface OrderTimelineDao extends BaseMapper<OrderTimeline> {
public interface OrderTimelineMPDao extends BaseMapper<OrderTimeline> {
}
\ No newline at end of file
......@@ -5,5 +5,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface OrgBranchDao extends BaseMapper<OrgBranch> {
public interface OrgBranchMPDao extends BaseMapper<OrgBranch> {
}
......@@ -5,5 +5,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface OrgClusterDao extends BaseMapper<OrgCluster> {
public interface OrgClusterMPDao extends BaseMapper<OrgCluster> {
}
......@@ -5,5 +5,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface OrgGroupDao extends BaseMapper<OrgGroup> {
public interface OrgGroupMPDao extends BaseMapper<OrgGroup> {
}
......@@ -5,5 +5,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface ProductCategory2Dao extends BaseMapper<ProductCategory> {
public interface ProductCategoryMPDao extends BaseMapper<ProductCategory> {
}
......@@ -5,5 +5,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface WarehouseInfoDao extends BaseMapper<WarehouseInfo> {
public interface WarehouseInfoMPDao extends BaseMapper<WarehouseInfo> {
}
......@@ -23,16 +23,16 @@ import java.util.stream.Collectors;
public class EngineerServiceImpl implements EngineerService {
@Autowired
private EngineerInfoDao engineerInfoDao;
private EngineerInfoMPDao engineerInfoMPDao;
@Autowired
private EngineerSkillDao engineerSkillDao;
private EngineerSkillMPDao engineerSkillMPDao;
@Autowired
private OrgGroupDao orgGroupDao;
private OrgGroupMPDao orgGroupMPDao;
@Autowired
private EngineerBusinessDao engineerBusinessDao;
private EngineerBusinessMPDao engineerBusinessDao;
@Transactional
@Override
......@@ -111,7 +111,7 @@ public class EngineerServiceImpl implements EngineerService {
// 先将所有技能更新为0-不可用状态
LambdaUpdateWrapper<EngineerSkill> wrapper = new LambdaUpdateWrapper<>();
wrapper.eq(EngineerSkill::getEngineerCode, engineerCode).set(EngineerSkill::getStatus, 0);
engineerSkillDao.update(null, wrapper);
engineerSkillMPDao.update(null, wrapper);
if (categoryIds.isEmpty()){
return null;
}
......@@ -120,7 +120,7 @@ public class EngineerServiceImpl implements EngineerService {
wrapper.eq(EngineerSkill::getEngineerCode, engineerCode);
wrapper.in(EngineerSkill::getCategoryId, categoryIds);
wrapper.set(EngineerSkill::getStatus, 1);
int n = engineerSkillDao.update(null, wrapper);
int n = engineerSkillMPDao.update(null, wrapper);
if (categoryIds.size() == n) {
// 更新记录条数等于提交记录条数
return null;
......@@ -139,7 +139,7 @@ public class EngineerServiceImpl implements EngineerService {
e.setEngineerCode(engineerCode);
e.setCategoryId(categoryId);
e.setStatus(1);
engineerSkillDao.insert(e);
engineerSkillMPDao.insert(e);
}
return null;
}
......@@ -242,7 +242,7 @@ public class EngineerServiceImpl implements EngineerService {
lqw.orderByAsc(EngineerInfo::getEngineerCode);
IPage<EngineerInfo> pg = new Page(page, size);
engineerInfoDao.selectPage(pg, lqw);
engineerInfoMPDao.selectPage(pg, lqw);
return pg;
}
......@@ -256,7 +256,7 @@ public class EngineerServiceImpl implements EngineerService {
LambdaQueryWrapper<OrgGroup> lqw = new LambdaQueryWrapper<>();
lqw.select(OrgGroup::getGroupId, OrgGroup::getGroupName);
lqw.in(OrgGroup::getGroupId, groupIds);
List<OrgGroup> groups= orgGroupDao.selectList(lqw);
List<OrgGroup> groups= orgGroupMPDao.selectList(lqw);
for(OrgGroup g: groups) {
map.put(g.getGroupId(), g.getGroupName());
}
......@@ -273,7 +273,7 @@ public class EngineerServiceImpl implements EngineerService {
LambdaQueryWrapper<EngineerSkill> lqw = new LambdaQueryWrapper<>();
lqw.in(EngineerSkill::getEngineerCode, engineerCodes);
lqw.in(EngineerSkill::getStatus, statuses);
List<EngineerSkill> records = engineerSkillDao.selectList(lqw);
List<EngineerSkill> records = engineerSkillMPDao.selectList(lqw);
Comparator<EngineerSkill> ec = Comparator.comparing(EngineerSkill::getEngineerCode, String.CASE_INSENSITIVE_ORDER);
List<EngineerSkill> results = records.stream().sorted(ec).collect(Collectors.toList());
......
......@@ -21,22 +21,22 @@ import java.util.stream.Stream;
public class EnginnerTimelineServiceImpl implements EnginnerTimelineService {
@Autowired
private EngineerTimelineDao engineerTimelineDao;
private EngineerTimelineMPDao engineerTimelineMPDao;
@Autowired
private OrderAppointmentDao orderAppointmentDao;
private OrderAppointmentMPDao orderAppointmentMPDao;
@Autowired
private EngineerInfoDao engineerInfoDao;
private EngineerInfoMPDao engineerInfoMPDao;
@Autowired
private OrderRequestDao orderRequestDao;
private OrderRequestMPDao orderRequestMPDao;
@Autowired
private WarehouseInfoDao warehouseInfoDao;
private WarehouseInfoMPDao warehouseInfoMPDao;
@Autowired
private OrgGroupDao orgGroupDao;
private OrgGroupMPDao orgGroupMPDao;
@Transactional
@Override
......@@ -72,7 +72,7 @@ public class EnginnerTimelineServiceImpl implements EnginnerTimelineService {
private String GetEnginnerName(String enginerrCode){
LambdaQueryWrapper<EngineerInfo> lqw = new LambdaQueryWrapper<>();
lqw.eq(EngineerInfo::getEngineerCode, enginerrCode);
EngineerInfo e = engineerInfoDao.selectOne(lqw);
EngineerInfo e = engineerInfoMPDao.selectOne(lqw);
return e.getName();
}
......@@ -82,7 +82,7 @@ public class EnginnerTimelineServiceImpl implements EnginnerTimelineService {
lqw.eq(OrderAppointment::getEngineerCode, engineerCode);
lqw.ge(OrderAppointment::getExpectTime, date + " 00:00:00");
lqw.le(OrderAppointment::getExpectTime, date + " 23:59:59");
return orderAppointmentDao.selectList(lqw);
return orderAppointmentMPDao.selectList(lqw);
}
private List<EngineerTimeline> EnginnerTimelines(String engineerCode, String date){
......@@ -93,7 +93,7 @@ public class EnginnerTimelineServiceImpl implements EnginnerTimelineService {
lqw.ge(EngineerTimeline::getHappen, date+" 00:00:00");
lqw.le(EngineerTimeline::getHappen, date + " 23:59:59");
lqw.in(EngineerTimeline::getEvent, events);
return engineerTimelineDao.selectList(lqw);
return engineerTimelineMPDao.selectList(lqw);
}
private HashMap<String, String> OrderRequestsLocation(List<String> orderIds) {
......@@ -102,7 +102,7 @@ public class EnginnerTimelineServiceImpl implements EnginnerTimelineService {
HashMap<String, String> map = new HashMap<>();
LambdaQueryWrapper<OrderRequest> lqw = new LambdaQueryWrapper<>();
lqw.in(OrderRequest::getOrderId, orderIds);
List<OrderRequest> orders = orderRequestDao.selectList(lqw);
List<OrderRequest> orders = orderRequestMPDao.selectList(lqw);
for(OrderRequest o: orders){
map.put(o.getOrderId(), String.format("%s,%s", o.getX(), o.getY()));
}
......@@ -113,7 +113,7 @@ public class EnginnerTimelineServiceImpl implements EnginnerTimelineService {
// 获取配送站location
LambdaQueryWrapper<WarehouseInfo> lqw = new LambdaQueryWrapper<>();
lqw.eq(WarehouseInfo::getBranchId, branchId);
WarehouseInfo w = warehouseInfoDao.selectOne(lqw);
WarehouseInfo w = warehouseInfoMPDao.selectOne(lqw);
return String.format("%s,%s", w.getX(), w.getY());
}
......@@ -121,7 +121,7 @@ public class EnginnerTimelineServiceImpl implements EnginnerTimelineService {
LambdaQueryWrapper<EngineerInfo> lqw = new LambdaQueryWrapper<>();
lqw.select(EngineerInfo::getGroupId);
lqw.eq(EngineerInfo::getEngineerCode, engineerCode);
EngineerInfo e = engineerInfoDao.selectOne(lqw);
EngineerInfo e = engineerInfoMPDao.selectOne(lqw);
if (e == null) {
return "";
}
......@@ -129,7 +129,7 @@ public class EnginnerTimelineServiceImpl implements EnginnerTimelineService {
LambdaQueryWrapper<OrgGroup> lqw2 = new LambdaQueryWrapper<>();
lqw2.select(OrgGroup::getBranchId);
lqw2.eq(OrgGroup::getGroupId, e.getGroupId());
OrgGroup g = orgGroupDao.selectOne(lqw2);
OrgGroup g = orgGroupMPDao.selectOne(lqw2);
return (g==null)? "": g.getBranchId();
}
......
......@@ -19,22 +19,22 @@ import java.util.stream.Collectors;
public class OrderServiceDetailImpl implements OrderServiceDetail {
@Autowired
private OrderRequestDao orderRequestDao;
private OrderRequestMPDao orderRequestMPDao;
@Autowired
private OrderAppointmentDao orderAppointmentDao;
private OrderAppointmentMPDao orderAppointmentMPDao;
@Autowired
private EngineerSkillDao engineerSkillDao;
private EngineerSkillMPDao engineerSkillMPDao;
@Autowired
private EngineerInfoDao engineerInfoDao;
private EngineerInfoMPDao engineerInfoMPDao;
@Autowired
private OrderTimelineDao orderTimelineDao;
private OrderTimelineMPDao orderTimelineMPDao;
@Autowired
private OrderEventDao orderEventDao;
private OrderEventMPDao orderEventMPDao;
@Transactional
@Override
......@@ -140,20 +140,20 @@ public class OrderServiceDetailImpl implements OrderServiceDetail {
// 获取服务单记录
LambdaQueryWrapper<OrderRequest> lqw = new LambdaQueryWrapper<>();
lqw.eq(OrderRequest::getOrderId, orderId);
return orderRequestDao.selectOne(lqw);
return orderRequestMPDao.selectOne(lqw);
}
private List<OrderAppointment> queryOrderAppointments(String orderId) {
// 获取指派单记录列表
LambdaQueryWrapper<OrderAppointment> lqw = new LambdaQueryWrapper<>();
lqw.eq(OrderAppointment::getOrderId, orderId);
return orderAppointmentDao.selectList(lqw);
return orderAppointmentMPDao.selectList(lqw);
}
private List<OrderEvent> queryOrderEvents(String orderId) {
LambdaQueryWrapper<OrderEvent> lqw = new LambdaQueryWrapper<>();
lqw.eq(OrderEvent::getOrderId, orderId);
return orderEventDao.selectList(lqw);
return orderEventMPDao.selectList(lqw);
}
private HashMap<String, EngineerInfo> getEngineerInfos(List<String> egCodes){
......@@ -162,7 +162,7 @@ public class OrderServiceDetailImpl implements OrderServiceDetail {
LambdaQueryWrapper<EngineerInfo> lqw = new LambdaQueryWrapper<>();
lqw.in(EngineerInfo::getEngineerCode, egCodes);
List<EngineerInfo> rows = engineerInfoDao.selectList(lqw);
List<EngineerInfo> rows = engineerInfoMPDao.selectList(lqw);
for (EngineerInfo row: rows){
map.put(row.getEngineerCode(), row);
......@@ -177,7 +177,7 @@ public class OrderServiceDetailImpl implements OrderServiceDetail {
LambdaQueryWrapper<EngineerSkill> lqw = new LambdaQueryWrapper<>();
lqw.in(EngineerSkill::getEngineerCode, egCodes);
List<EngineerSkill> rows = engineerSkillDao.selectList(lqw);
List<EngineerSkill> rows = engineerSkillMPDao.selectList(lqw);
for (EngineerSkill row: rows){
map.put(row.getEngineerCode(), row);
......@@ -190,7 +190,7 @@ public class OrderServiceDetailImpl implements OrderServiceDetail {
LambdaQueryWrapper<OrderTimeline> lqw = new LambdaQueryWrapper<>();
lqw.eq(OrderTimeline::getOrderId, orderId);
List<OrderTimeline> timelines = orderTimelineDao.selectList(lqw);
List<OrderTimeline> timelines = orderTimelineMPDao.selectList(lqw);
// 根据subOrderId + happend字段排序
Comparator<OrderTimeline> sb = Comparator.comparing(OrderTimeline::getSuborderId, String.CASE_INSENSITIVE_ORDER);
......@@ -224,7 +224,7 @@ public class OrderServiceDetailImpl implements OrderServiceDetail {
items.add(this.packEngineer("性别/年龄:", eg.getGender()+"/"+age, ""));
items.add(this.packEngineer("手机号:", eg.getPhone(), ""));
items.add(this.packEngineer("工号:", eg.getEngineerCode(), "" ));
items.add(this.packEngineer("技能:", skill.getSkill(), ""));
items.add(this.packEngineer("技能:", "TODO", "")); // TODO
return items;
}
......
......@@ -3,15 +3,14 @@ package com.alibaba.cloud.integration.order.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import com.alibaba.cloud.integration.common.BusinessException;
import com.alibaba.cloud.integration.common.Result;
import com.alibaba.cloud.integration.order.dao.OrderAppointmentDao;
import com.alibaba.cloud.integration.order.dao.OrderRequestDao;
import com.alibaba.cloud.integration.order.dao.OrderAppointmentMPDao;
import com.alibaba.cloud.integration.order.dao.OrderRequestMPDao;
import com.alibaba.cloud.integration.order.dto.OrderServiceList;
import com.alibaba.cloud.integration.order.dto.OrderServiceListResp;
import com.alibaba.cloud.integration.order.entity.OrderAppointment;
import com.alibaba.cloud.integration.order.entity.OrderRequest;
import com.alibaba.cloud.integration.order.service.OrderServiceListService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.logging.log4j.util.Strings;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -27,10 +26,10 @@ import java.util.stream.Collectors;
public class OrderServiceListServiceImpl implements OrderServiceListService {
@Autowired
private OrderRequestDao orderRequestDao;
private OrderRequestMPDao orderRequestMPDao;
@Autowired
private OrderAppointmentDao orderAppointmentDao;
private OrderAppointmentMPDao orderAppointmentMPDao;
@Transactional
@Override
......@@ -51,7 +50,7 @@ public class OrderServiceListServiceImpl implements OrderServiceListService {
lqw.eq(Strings.isNotEmpty(skill), OrderRequest::getSkill, skill); //技能
// 查询工单表列表
orderRequestDao.selectPage(pg, lqw);
orderRequestMPDao.selectPage(pg, lqw);
List<OrderRequest> records = pg.getRecords();
......@@ -112,7 +111,7 @@ public class OrderServiceListServiceImpl implements OrderServiceListService {
}
LambdaQueryWrapper<OrderAppointment> lqw = new LambdaQueryWrapper<>();
lqw.in(OrderAppointment::getOrderId, orderIds);
return orderAppointmentDao.selectList(lqw);
return orderAppointmentMPDao.selectList(lqw);
}
......
package com.alibaba.cloud.integration.order.service.impl;
import com.alibaba.cloud.integration.common.Result;
import com.alibaba.cloud.integration.order.dao.ProductCategory2Dao;
import com.alibaba.cloud.integration.order.dao.ProductCategoryMPDao;
import com.alibaba.cloud.integration.order.dto.ProductCategoryResp;
import com.alibaba.cloud.integration.order.entity.ProductCategory;
import com.alibaba.cloud.integration.order.service.ProductCategoryService;
......@@ -18,14 +18,14 @@ import java.util.stream.Collectors;
public class ProductCategoryServiceImpl implements ProductCategoryService {
@Autowired
private ProductCategory2Dao productCategory2Dao;
private ProductCategoryMPDao productCategoryMPDao;
@Transactional
@Override
public Result<?> getProductCategory() {
// 查询所有记录
List<ProductCategory> records= productCategory2Dao.selectList(null);
List<ProductCategory> records= productCategoryMPDao.selectList(null);
// 排序brand+type+skill
Comparator<ProductCategory> byBrand = Comparator.comparing(ProductCategory::getBrand);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!