Commit c8771f2d by huluobin

自带款式查询接口修改

parent 96fdee48
......@@ -34,5 +34,6 @@ public interface ITechniqueSkuService extends IService<TechniqueSku> {
List<TechniqueCategory> queryTechniqueCategoryAggregate(@Null Integer scheduleServeId,
@Null Integer orderServeId);
@Null Integer orderServeId,
@Null Integer serveId);
}
......@@ -73,16 +73,23 @@ public class TechniqueSkuServiceImpl extends ServiceImpl<TechniqueSkuMapper, Tec
@Override
public List<TechniqueCategory> queryTechniqueCategoryAggregate(@Null Integer scheduleServeId,
@Null Integer orderServeId) {
@Null Integer orderServeId,
@Null Integer serveId
) {
List<TechniqueSku> techniqueSkuList = this.list();
LambdaQueryWrapper<TechniqueCategory> wrapper = new LambdaQueryWrapper<>();
if (serveId != null) {
BaseServe baseServe = baseServeMapper.selectById(serveId);
wrapper.eq(TechniqueCategory::getServiceTypeId, baseServe.getTypeId());
}
if (scheduleServeId != null) {
ScheduleServe scheduleServe = scheduleServeMapper.selectById(scheduleServeId);
BaseServe baseServe = baseServeMapper.selectById(scheduleServe.getServeId());
wrapper.eq(TechniqueCategory::getServiceTypeId, baseServe.getTypeId());
// BaseServe baseServe = baseServeMapper.selectById(scheduleServe.getServeId());
// wrapper.eq(TechniqueCategory::getServiceTypeId, baseServe.getTypeId());
//
ScheduleServe subRemoveArmor = scheduleServeMapper.subRemoveArmor(scheduleServe.getServeId(), scheduleServe.getSchId());
ScheduleServe subExtend = scheduleServeMapper.subExtend(scheduleServe.getServeId(), scheduleServe.getSchId());
......@@ -97,9 +104,9 @@ public class TechniqueSkuServiceImpl extends ServiceImpl<TechniqueSkuMapper, Tec
if (orderServeId != null) {
OrderServe orderServe = orderServeMapper.selectById(orderServeId);
BaseServe baseServe = baseServeMapper.selectById(orderServe.getServeId());
// BaseServe baseServe = baseServeMapper.selectById(orderServe.getServeId());
wrapper.eq(TechniqueCategory::getServiceTypeId, baseServe.getTypeId());
// wrapper.eq(TechniqueCategory::getServiceTypeId, baseServe.getTypeId());
OrderServe subRemoveArmor = orderServeMapper.subRemoveArmor(orderServe.getServeId(), orderServe.getOrderId());
OrderServe subExtend = orderServeMapper.subExtend(orderServe.getServeId(), orderServe.getOrderId());
......
......@@ -57,8 +57,9 @@ public class TechniqueSkuController {
@ApiOperation("查询所有款式技法分组")
@GetMapping("/technician/techniqueSku/queryTechniqueCategoryAggregate")
public JsonResult<List<TechniqueCategory>> queryTechniqueCategoryAggregate(@RequestParam(required = false) Integer scheduleServeId,
@RequestParam(required = false) Integer orderServeId) {
List<TechniqueCategory> techniqueCategoryList = techniqueSkuService.queryTechniqueCategoryAggregate(scheduleServeId, orderServeId);
@RequestParam(required = false) Integer orderServeId,
@RequestParam(required = false) Integer serveId) {
List<TechniqueCategory> techniqueCategoryList = techniqueSkuService.queryTechniqueCategoryAggregate(scheduleServeId, orderServeId, serveId);
return JsonResult.success(techniqueCategoryList);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment