mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
标签查询数据接口参数修改
This commit is contained in:
+2
-2
@@ -200,9 +200,9 @@ public class PlanController {
|
|||||||
@GetMapping("getPlanPlate")
|
@GetMapping("getPlanPlate")
|
||||||
@Operation(summary = "根据排单ID获取打印标签需要的小板信息")
|
@Operation(summary = "根据排单ID获取打印标签需要的小板信息")
|
||||||
@PreAuthorize("@ss.hasAnyPermissions('placeorder:print-label','producePlan:print-label')")
|
@PreAuthorize("@ss.hasAnyPermissions('placeorder:print-label','producePlan:print-label')")
|
||||||
public CommonResult<PageResult<PlateResList>> getPlanPlateList(@Valid PlanPageReqVO pageReqVO) {
|
public CommonResult<List<PlateResList>> getPlanPlateList(@Valid @RequestParam("planId") Long planId) {
|
||||||
|
|
||||||
return success(planService.getPlanPlateList(pageReqVO));
|
return success(planService.getPlanPlateList(planId));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
@@ -46,6 +46,8 @@ public interface PlanItemMapper extends BaseMapperX<PlanItemDO> {
|
|||||||
|
|
||||||
List<PlateResList> selectPlateListByPlateIds(@Param(Constants.WRAPPER) Wrapper<PlanItemDO> wrapper,@Param("pageNo") Integer pageNo,@Param("pageSize") Integer pageSize);
|
List<PlateResList> selectPlateListByPlateIds(@Param(Constants.WRAPPER) Wrapper<PlanItemDO> wrapper,@Param("pageNo") Integer pageNo,@Param("pageSize") Integer pageSize);
|
||||||
|
|
||||||
|
List<PlateResList> selectPlateListByPlateId(@Param("planId") Long planId, @Param("organId") Long organId);
|
||||||
|
|
||||||
Long selectPlateCountByPlateIds(@Param(Constants.WRAPPER) Wrapper<PlanItemDO> wrapper);
|
Long selectPlateCountByPlateIds(@Param(Constants.WRAPPER) Wrapper<PlanItemDO> wrapper);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -73,6 +73,6 @@ public interface PlanService {
|
|||||||
|
|
||||||
List<PlanActualGoodsResp> getPlanGoodsList(SavePlanPlateList savePlanPlateList);
|
List<PlanActualGoodsResp> getPlanGoodsList(SavePlanPlateList savePlanPlateList);
|
||||||
|
|
||||||
PageResult<PlateResList> getPlanPlateList(PlanPageReqVO pageReqVO);
|
List<PlateResList> getPlanPlateList(Long planId);
|
||||||
|
|
||||||
}
|
}
|
||||||
+4
-28
@@ -1022,26 +1022,14 @@ public class PlanServiceImpl implements PlanService {
|
|||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageResult<PlateResList> getPlanPlateList(PlanPageReqVO pageReqVO) {
|
public List<PlateResList> getPlanPlateList(Long planId) {
|
||||||
|
|
||||||
Long planId = Long.valueOf(pageReqVO.getId());
|
|
||||||
|
|
||||||
QueryWrapperX<PlanItemDO> queryWrapperX = new QueryWrapperX<>();
|
|
||||||
|
|
||||||
queryWrapperX.eq("opi.organ_id",getUserOrganId())
|
|
||||||
.eq(FIELD_PLAN_ID,planId);
|
|
||||||
|
|
||||||
Integer pageNo = (pageReqVO.getPageNo() - 1) * pageReqVO.getPageSize();
|
|
||||||
|
|
||||||
List<PlateResList> plateResLists = planItemMapper.selectPlateListByPlateIds(queryWrapperX,pageNo,pageReqVO.getPageSize());
|
|
||||||
|
|
||||||
|
List<PlateResList> plateResLists = planItemMapper.selectPlateListByPlateId(planId,getUserOrganId());
|
||||||
|
|
||||||
if (CollUtil.isEmpty(plateResLists)) {
|
if (CollUtil.isEmpty(plateResLists)) {
|
||||||
return new PageResult<>();
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
Long sum = planItemMapper.selectPlateCountByPlateIds(queryWrapperX);
|
|
||||||
|
|
||||||
List<OptimizeBoardModelDO> boardModelDOS = esUtils.getEsDocument(FIELD_PLANID, planId, ORDER_REMAIN_PLATE_MODEL, OptimizeBoardModelDO.class);
|
List<OptimizeBoardModelDO> boardModelDOS = esUtils.getEsDocument(FIELD_PLANID, planId, ORDER_REMAIN_PLATE_MODEL, OptimizeBoardModelDO.class);
|
||||||
|
|
||||||
if(CollUtil.isNotEmpty(boardModelDOS)) {
|
if(CollUtil.isNotEmpty(boardModelDOS)) {
|
||||||
@@ -1088,9 +1076,8 @@ public class PlanServiceImpl implements PlanService {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return plateResLists;
|
||||||
|
|
||||||
|
|
||||||
return new PageResult<>(plateResLists, sum);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1382,14 +1369,6 @@ public class PlanServiceImpl implements PlanService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 查询删除的小板对应的生产单信息,如果生产单的小板全部改成了未优化,修改状态
|
|
||||||
// List<PlateDO> plateIsOptimizedList = plateMapper.selectPlateIsOptimized(deleteOrderIds, getUserOrganId());
|
|
||||||
// if(CollUtil.isNotEmpty(plateIsOptimizedList)){
|
|
||||||
// List<Long> orderIds = plateIsOptimizedList.stream().map(PlateDO::getOrderId).distinct().toList();
|
|
||||||
|
|
||||||
|
|
||||||
List<Long> orderIds = planItemMapper.selectOrderPlateList(deleteOrderIds, getUserOrganId());
|
List<Long> orderIds = planItemMapper.selectOrderPlateList(deleteOrderIds, getUserOrganId());
|
||||||
|
|
||||||
List<Long> diff = Stream.concat(
|
List<Long> diff = Stream.concat(
|
||||||
@@ -1406,8 +1385,6 @@ public class PlanServiceImpl implements PlanService {
|
|||||||
orderMapper.updateBatch(orderList);
|
orderMapper.updateBatch(orderList);
|
||||||
}
|
}
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1475,7 +1452,6 @@ public class PlanServiceImpl implements PlanService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 修改排单加工方案的优化状态
|
// 修改排单加工方案的优化状态
|
||||||
updateProcessSchemeStatus(insertPlanIds);
|
updateProcessSchemeStatus(insertPlanIds);
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -272,7 +272,8 @@ public class PlateServiceImpl implements PlateService {
|
|||||||
.eq("o.deleted",false)
|
.eq("o.deleted",false)
|
||||||
.in("o.status",statusList)
|
.in("o.status",statusList)
|
||||||
.isNull("opi.plan_id")
|
.isNull("opi.plan_id")
|
||||||
.isNotNull("op.id");
|
.isNotNull("op.id")
|
||||||
|
.eq("op.deleted",false);
|
||||||
|
|
||||||
|
|
||||||
if(pageReqVO.getPlanId() != null){
|
if(pageReqVO.getPlanId() != null){
|
||||||
|
|||||||
+46
@@ -136,6 +136,52 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectPlateListByPlateId"
|
||||||
|
resultType="com.cf.imes.module.executor.controller.admin.plan.vo.PlateResList">
|
||||||
|
|
||||||
|
|
||||||
|
select distinct op.id as plateId,
|
||||||
|
op.order_id,
|
||||||
|
op.plate_no ,
|
||||||
|
op.goods_id as id,
|
||||||
|
op.custom_plate_no,
|
||||||
|
op.name as plateName,
|
||||||
|
op.is_special_shaped,
|
||||||
|
op.is_sculpt,
|
||||||
|
op.area,
|
||||||
|
op.seal_left,
|
||||||
|
op.seal_right,
|
||||||
|
op.seal_up,
|
||||||
|
op.seal_down,
|
||||||
|
og.material,
|
||||||
|
og.color,
|
||||||
|
op.width,
|
||||||
|
op.height,
|
||||||
|
op.thickness,
|
||||||
|
op.texture,
|
||||||
|
op.is_row_hole,
|
||||||
|
op.remark,
|
||||||
|
opi.plan_id,
|
||||||
|
oi.room_id,
|
||||||
|
oi.body_id,
|
||||||
|
ob.name as bodyName,
|
||||||
|
ob.room_name as roomName
|
||||||
|
|
||||||
|
from order_plan_item opi
|
||||||
|
join order_goods og on opi.order_id = og.order_id and opi.goods_id = og.id
|
||||||
|
join order_plate op on opi.order_id = op.order_id and opi.goods_id = op.goods_id and opi.plate_id = op.id
|
||||||
|
join order_item oi on op.order_id = oi.order_id and op.id = oi.plate_id
|
||||||
|
join order_body ob on oi.order_id = ob.order_id and oi.body_id = ob.id
|
||||||
|
where opi.organ_id = #{organId} and opi.plan_id = #{planId}
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<select id="selectPlateCountByPlateIds" resultType="java.lang.Long">
|
<select id="selectPlateCountByPlateIds" resultType="java.lang.Long">
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user