mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
1、工作台逾期订单恢复为平铺;2、新功能部件、分堆打包、cad三维看图等接口权限梳理;3、装配设置顶级部件关联item明细表,修复明细项删除后部件可见;
This commit is contained in:
+7
@@ -13,6 +13,7 @@ import io.swagger.v3.oas.annotations.Parameter;
|
|||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import jakarta.validation.Valid;
|
import jakarta.validation.Valid;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
@@ -40,24 +41,28 @@ public class AssemblyListController {
|
|||||||
|
|
||||||
@PostMapping("/list")
|
@PostMapping("/list")
|
||||||
@Operation(summary = "装配清单-获取部件列表")
|
@Operation(summary = "装配清单-获取部件列表")
|
||||||
|
@PreAuthorize("@ss.hasPermission('production:assemblyList:query')")
|
||||||
public CommonResult<List<OrderComponentRespVO>> getComponentList(@RequestBody AssemblyListComponentPageReqVO reqVO) {
|
public CommonResult<List<OrderComponentRespVO>> getComponentList(@RequestBody AssemblyListComponentPageReqVO reqVO) {
|
||||||
return CommonResult.success(assemblyListService.getComponentList(reqVO));
|
return CommonResult.success(assemblyListService.getComponentList(reqVO));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/list/view/plate/page")
|
@PostMapping("/list/view/plate/page")
|
||||||
@Operation(summary = "装配清单-获取订单部件下的板件视图分页列表数据")
|
@Operation(summary = "装配清单-获取订单部件下的板件视图分页列表数据")
|
||||||
|
@PreAuthorize("@ss.hasPermission('production:assemblyList:query')")
|
||||||
public CommonResult<PageResult<OrderViewPlatePageRespVO>> getComponentViewPlatesPage(@Valid @RequestBody AssemblyListComponentPageReqVO pageReqVO) {
|
public CommonResult<PageResult<OrderViewPlatePageRespVO>> getComponentViewPlatesPage(@Valid @RequestBody AssemblyListComponentPageReqVO pageReqVO) {
|
||||||
return success(assemblyListService.getViewComponentPlatePage(pageReqVO));
|
return success(assemblyListService.getViewComponentPlatePage(pageReqVO));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/list/view/part/page")
|
@PostMapping("/list/view/part/page")
|
||||||
@Operation(summary = "装配清单-获取订单部件下的配件视图分页列表数据")
|
@Operation(summary = "装配清单-获取订单部件下的配件视图分页列表数据")
|
||||||
|
@PreAuthorize("@ss.hasPermission('production:assemblyList:query')")
|
||||||
public CommonResult<PageResult<OrderViewPartPageRespVO>> getComponentViewPartsPage(@Valid @RequestBody AssemblyListComponentPageReqVO pageReqVO) {
|
public CommonResult<PageResult<OrderViewPartPageRespVO>> getComponentViewPartsPage(@Valid @RequestBody AssemblyListComponentPageReqVO pageReqVO) {
|
||||||
return success(assemblyListService.getViewComponentPartPage(pageReqVO));
|
return success(assemblyListService.getViewComponentPartPage(pageReqVO));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/list/view/cadinfo")
|
@PostMapping("/list/view/cadinfo")
|
||||||
@Operation(summary = "装配清单-获取订单部件下的所有板件+配件视图列表数据")
|
@Operation(summary = "装配清单-获取订单部件下的所有板件+配件视图列表数据")
|
||||||
|
@PreAuthorize("@ss.hasPermission('production:assemblyList:query')")
|
||||||
public CommonResult<OrdersViewCadViewInfoRespVO> getComponentViewPlates(@Valid @RequestBody AssemblyListComponentPageReqVO pageReqVO) {
|
public CommonResult<OrdersViewCadViewInfoRespVO> getComponentViewPlates(@Valid @RequestBody AssemblyListComponentPageReqVO pageReqVO) {
|
||||||
return success(assemblyListService.getViewComponentPlatesCadInfo(pageReqVO));
|
return success(assemblyListService.getViewComponentPlatesCadInfo(pageReqVO));
|
||||||
}
|
}
|
||||||
@@ -65,6 +70,7 @@ public class AssemblyListController {
|
|||||||
@PostMapping("/process/{id}")
|
@PostMapping("/process/{id}")
|
||||||
@Operation(summary = "装配清单-加工部件")
|
@Operation(summary = "装配清单-加工部件")
|
||||||
@Parameter(name = "id", description = "部件编号", required = true, example = "1024")
|
@Parameter(name = "id", description = "部件编号", required = true, example = "1024")
|
||||||
|
@PreAuthorize("@ss.hasPermission('production:assemblyList:process')")
|
||||||
public CommonResult<Boolean> processComponent(@PathVariable Long id) {
|
public CommonResult<Boolean> processComponent(@PathVariable Long id) {
|
||||||
assemblyListService.processComponent(id);
|
assemblyListService.processComponent(id);
|
||||||
return CommonResult.success(true);
|
return CommonResult.success(true);
|
||||||
@@ -73,6 +79,7 @@ public class AssemblyListController {
|
|||||||
@PostMapping("/restore/{id}")
|
@PostMapping("/restore/{id}")
|
||||||
@Operation(summary = "装配清单-恢复未加工")
|
@Operation(summary = "装配清单-恢复未加工")
|
||||||
@Parameter(name = "id", description = "部件编号", required = true, example = "1024")
|
@Parameter(name = "id", description = "部件编号", required = true, example = "1024")
|
||||||
|
@PreAuthorize("@ss.hasPermission('production:assemblyList:process')")
|
||||||
public CommonResult<Boolean> restoreComponent(@PathVariable Long id) {
|
public CommonResult<Boolean> restoreComponent(@PathVariable Long id) {
|
||||||
assemblyListService.restoreComponent(id);
|
assemblyListService.restoreComponent(id);
|
||||||
return CommonResult.success(true);
|
return CommonResult.success(true);
|
||||||
|
|||||||
+3
@@ -10,6 +10,7 @@ import io.swagger.v3.oas.annotations.tags.Tag;
|
|||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import jakarta.validation.Valid;
|
import jakarta.validation.Valid;
|
||||||
import jakarta.validation.constraints.NotEmpty;
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
@@ -37,6 +38,7 @@ public class HeapSplitController {
|
|||||||
|
|
||||||
@PostMapping("")
|
@PostMapping("")
|
||||||
@Operation(summary = "保存分堆")
|
@Operation(summary = "保存分堆")
|
||||||
|
@PreAuthorize("@ss.hasPermission('manage:heapsplit:query')")
|
||||||
public CommonResult<Boolean> saveHeapsplit(@Valid @RequestBody HeapSplitSaveReqVO reqVO) {
|
public CommonResult<Boolean> saveHeapsplit(@Valid @RequestBody HeapSplitSaveReqVO reqVO) {
|
||||||
heapSplitService.saveHeapsplit(reqVO);
|
heapSplitService.saveHeapsplit(reqVO);
|
||||||
return success(true);
|
return success(true);
|
||||||
@@ -45,6 +47,7 @@ public class HeapSplitController {
|
|||||||
@PostMapping("/details")
|
@PostMapping("/details")
|
||||||
@Operation(summary = "查询分堆详情")
|
@Operation(summary = "查询分堆详情")
|
||||||
@Parameter(name = "orderIds", description = "订单ID列表", required = true)
|
@Parameter(name = "orderIds", description = "订单ID列表", required = true)
|
||||||
|
@PreAuthorize("@ss.hasPermission('manage:heapsplit:save')")
|
||||||
public CommonResult<OrdersHeapSplitDetailRespVO> getOrdersHeapSplitDetail(@RequestBody @NotEmpty(message = "订单ID不能为空") List<Long> orderIds) {
|
public CommonResult<OrdersHeapSplitDetailRespVO> getOrdersHeapSplitDetail(@RequestBody @NotEmpty(message = "订单ID不能为空") List<Long> orderIds) {
|
||||||
return success(heapSplitService.getOrdersHeapSplitedDetail(orderIds));
|
return success(heapSplitService.getOrdersHeapSplitedDetail(orderIds));
|
||||||
}
|
}
|
||||||
|
|||||||
+2
@@ -44,6 +44,7 @@ public class PackController {
|
|||||||
@PostMapping("/unpack/details")
|
@PostMapping("/unpack/details")
|
||||||
@Operation(summary = "获取订单列表下未打包明细")
|
@Operation(summary = "获取订单列表下未打包明细")
|
||||||
@Parameter(name = "orderIds", description = "订单ID列表", required = true)
|
@Parameter(name = "orderIds", description = "订单ID列表", required = true)
|
||||||
|
@PreAuthorize("@ss.hasAnyPermissions('manage:pack:pack')")
|
||||||
public CommonResult<OrdersUnpackDetailRespVO> getOrdersUnpackDetail(@RequestBody @NotEmpty(message = "订单ID不能为空") List<Long> orderIds) {
|
public CommonResult<OrdersUnpackDetailRespVO> getOrdersUnpackDetail(@RequestBody @NotEmpty(message = "订单ID不能为空") List<Long> orderIds) {
|
||||||
return success(packService.getOrdersUnpackDetails(orderIds));
|
return success(packService.getOrdersUnpackDetails(orderIds));
|
||||||
}
|
}
|
||||||
@@ -124,6 +125,7 @@ public class PackController {
|
|||||||
|
|
||||||
@PostMapping("/scan/correlation")
|
@PostMapping("/scan/correlation")
|
||||||
@Operation(summary = "查询扫描类型相关的板件+配件id")
|
@Operation(summary = "查询扫描类型相关的板件+配件id")
|
||||||
|
@PreAuthorize("@ss.hasPermission('manage:pack:query')")
|
||||||
public CommonResult<List<Long>> getComponentCorrelation(@Valid @RequestBody PackScanComponentCorrelationReqVO reqVO) {
|
public CommonResult<List<Long>> getComponentCorrelation(@Valid @RequestBody PackScanComponentCorrelationReqVO reqVO) {
|
||||||
return success(packService.getComponentCorrelation(reqVO));
|
return success(packService.getComponentCorrelation(reqVO));
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-7
@@ -16,6 +16,7 @@ import io.swagger.v3.oas.annotations.Parameter;
|
|||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import jakarta.validation.Valid;
|
import jakarta.validation.Valid;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
@@ -47,20 +48,16 @@ public class OrderComponentController {
|
|||||||
@Resource
|
@Resource
|
||||||
private AssemblyListService assemblyListService;
|
private AssemblyListService assemblyListService;
|
||||||
|
|
||||||
@PostMapping("/detail/list")
|
|
||||||
@Operation(summary = "查询订单详情部件列表")
|
|
||||||
public CommonResult<List<OrderComponentRespVO>> getOrderComponentList(@Valid @RequestBody OrderDetailComponentListReqVO reqVO) {
|
|
||||||
return success(orderComponentService.getOrderComponentList(reqVO));
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/top/list")
|
@PostMapping("/top/list")
|
||||||
@Operation(summary = "查询订单顶级部件列表")
|
@Operation(summary = "查询订单顶级部件列表")
|
||||||
|
@PreAuthorize("@ss.hasPermission('production:assemblyList:query')")
|
||||||
public CommonResult<List<OrderComponentRespVO>> getOrderTopComponentList(@Valid @RequestBody OrdersTopComponentListReqVO reqVO) {
|
public CommonResult<List<OrderComponentRespVO>> getOrderTopComponentList(@Valid @RequestBody OrdersTopComponentListReqVO reqVO) {
|
||||||
return success(assemblyListService.getOrderTopComponentList(reqVO));
|
return success(assemblyListService.getOrderTopComponentList(reqVO));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/view/list")
|
@PostMapping("/view/list")
|
||||||
@Operation(summary = "查询订单详情cad视图部件列表")
|
@Operation(summary = "查询订单详情cad视图部件列表")
|
||||||
|
@PreAuthorize("@ss.hasPermission('production:manager-list:detail')")
|
||||||
public CommonResult<List<OrderComponentRespVO>> getOrderViewComponentList(@Valid @RequestBody OrderDetailComponentListReqVO reqVO) {
|
public CommonResult<List<OrderComponentRespVO>> getOrderViewComponentList(@Valid @RequestBody OrderDetailComponentListReqVO reqVO) {
|
||||||
return success(orderComponentService.getComponentListOnTopId(reqVO));
|
return success(orderComponentService.getComponentListOnTopId(reqVO));
|
||||||
}
|
}
|
||||||
@@ -68,30 +65,35 @@ public class OrderComponentController {
|
|||||||
@GetMapping("/view/{id}/list")
|
@GetMapping("/view/{id}/list")
|
||||||
@Operation(summary = "查询指定顶级部件下部件列表")
|
@Operation(summary = "查询指定顶级部件下部件列表")
|
||||||
@Parameter(name = "id", description = "部件编号", required = true, example = "1024")
|
@Parameter(name = "id", description = "部件编号", required = true, example = "1024")
|
||||||
|
@PreAuthorize("@ss.hasPermission('systemconfig:assemblyconfig:query')")
|
||||||
public CommonResult<List<OrderComponentRespVO>> getChildViewComponentList(@PathVariable Long id) {
|
public CommonResult<List<OrderComponentRespVO>> getChildViewComponentList(@PathVariable Long id) {
|
||||||
return success(orderComponentService.getChildComponentListOnTopId(id));
|
return success(orderComponentService.getChildComponentListOnTopId(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/view/plate/page")
|
@PostMapping("/view/plate/page")
|
||||||
@Operation(summary = "获取部件下的板件视图分页列表数据")
|
@Operation(summary = "获取部件下的板件视图分页列表数据")
|
||||||
|
@PreAuthorize("@ss.hasPermission('production:manager-list:detail')")
|
||||||
public CommonResult<PageResult<OrderViewPlatePageRespVO>> getComponentViewPlatesPage(@Valid @RequestBody OrderDetailComponentPageReqVO pageReqVO) {
|
public CommonResult<PageResult<OrderViewPlatePageRespVO>> getComponentViewPlatesPage(@Valid @RequestBody OrderDetailComponentPageReqVO pageReqVO) {
|
||||||
return success(orderComponentService.getViewComponentPlatesPage(pageReqVO));
|
return success(orderComponentService.getViewComponentPlatesPage(pageReqVO));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/view/part/page")
|
@PostMapping("/view/part/page")
|
||||||
@Operation(summary = "获取部件下的配件视图分页列表数据")
|
@Operation(summary = "获取部件下的配件视图分页列表数据")
|
||||||
|
@PreAuthorize("@ss.hasPermission('production:manager-list:detail')")
|
||||||
public CommonResult<PageResult<OrderViewPartPageRespVO>> getComponentViewPartsPage(@Valid @RequestBody OrderDetailComponentPageReqVO pageReqVO) {
|
public CommonResult<PageResult<OrderViewPartPageRespVO>> getComponentViewPartsPage(@Valid @RequestBody OrderDetailComponentPageReqVO pageReqVO) {
|
||||||
return success(orderComponentService.getViewComponentPartsPage(pageReqVO));
|
return success(orderComponentService.getViewComponentPartsPage(pageReqVO));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/view/cadinfo")
|
@PostMapping("/view/cadinfo")
|
||||||
@Operation(summary = "获取部件下的所有板件+配件视图列表数据")
|
@Operation(summary = "获取部件下的所有板件+配件视图列表数据")
|
||||||
|
@PreAuthorize("@ss.hasPermission('production:manager-list:detail')")
|
||||||
public CommonResult<OrdersViewCadViewInfoRespVO> getComponentViewPlates(@Valid @RequestBody OrderDetailComponentPageReqVO pageReqVO) {
|
public CommonResult<OrdersViewCadViewInfoRespVO> getComponentViewPlates(@Valid @RequestBody OrderDetailComponentPageReqVO pageReqVO) {
|
||||||
return success(orderComponentService.getViewComponentCadInfo(pageReqVO));
|
return success(orderComponentService.getViewComponentCadInfo(pageReqVO));
|
||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping("/{orderId}/{id}")
|
@DeleteMapping("/{orderId}/{id}")
|
||||||
@Operation(summary = "删除订单部件")
|
@Operation(summary = "删除订单部件")
|
||||||
|
@PreAuthorize("@ss.hasPermission('production:manager-list:deleteComponent')")
|
||||||
public CommonResult<Boolean> deleteOrderComponent(@PathVariable("orderId") Long orderId, @PathVariable("id") Long id) {
|
public CommonResult<Boolean> deleteOrderComponent(@PathVariable("orderId") Long orderId, @PathVariable("id") Long id) {
|
||||||
orderComponentService.deleteOrderComponent(orderId, id);
|
orderComponentService.deleteOrderComponent(orderId, id);
|
||||||
return success(true);
|
return success(true);
|
||||||
@@ -99,6 +101,7 @@ public class OrderComponentController {
|
|||||||
|
|
||||||
@PutMapping("/{orderId}/{id}")
|
@PutMapping("/{orderId}/{id}")
|
||||||
@Operation(summary = "恢复订单部件")
|
@Operation(summary = "恢复订单部件")
|
||||||
|
@PreAuthorize("@ss.hasPermission('production:manager-list:restoreComponent')")
|
||||||
public CommonResult<Boolean> restoreOrderComponent(@PathVariable("orderId") Long orderId, @PathVariable("id") Long id) {
|
public CommonResult<Boolean> restoreOrderComponent(@PathVariable("orderId") Long orderId, @PathVariable("id") Long id) {
|
||||||
orderComponentService.restoreOrderComponent(orderId, id);
|
orderComponentService.restoreOrderComponent(orderId, id);
|
||||||
return success(true);
|
return success(true);
|
||||||
|
|||||||
+4
@@ -139,24 +139,28 @@ public class PlateController {
|
|||||||
|
|
||||||
@PostMapping("/body/view/plate/page")
|
@PostMapping("/body/view/plate/page")
|
||||||
@Operation(summary = "获取柜体下的板件视图分页列表数据")
|
@Operation(summary = "获取柜体下的板件视图分页列表数据")
|
||||||
|
@PreAuthorize("@ss.hasPermission('production:manager-list:detail')")
|
||||||
public CommonResult<PageResult<OrderViewPlatePageRespVO>> getBodyViewPlatesPage(@Validated(OrderCadViewPageGroup.class) @RequestBody OrderCadViewPlatePageReqVO orderCadViewPlatePageReqVO) {
|
public CommonResult<PageResult<OrderViewPlatePageRespVO>> getBodyViewPlatesPage(@Validated(OrderCadViewPageGroup.class) @RequestBody OrderCadViewPlatePageReqVO orderCadViewPlatePageReqVO) {
|
||||||
return success(plateService.getBodyViewPlatesPage(orderCadViewPlatePageReqVO));
|
return success(plateService.getBodyViewPlatesPage(orderCadViewPlatePageReqVO));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/body/view/part/page")
|
@PostMapping("/body/view/part/page")
|
||||||
@Operation(summary = "获取柜体下的配件视图分页列表数据")
|
@Operation(summary = "获取柜体下的配件视图分页列表数据")
|
||||||
|
@PreAuthorize("@ss.hasPermission('production:manager-list:detail')")
|
||||||
public CommonResult<PageResult<OrderViewPartPageRespVO>> getBodyViewPartsPage(@Validated(OrderCadViewPageGroup.class) @RequestBody OrderCadViewPlatePageReqVO orderCadViewPlatePageReqVO) {
|
public CommonResult<PageResult<OrderViewPartPageRespVO>> getBodyViewPartsPage(@Validated(OrderCadViewPageGroup.class) @RequestBody OrderCadViewPlatePageReqVO orderCadViewPlatePageReqVO) {
|
||||||
return success(plateService.getBodyViewPartsPage(orderCadViewPlatePageReqVO));
|
return success(plateService.getBodyViewPartsPage(orderCadViewPlatePageReqVO));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/body/view/cadinfo")
|
@PostMapping("/body/view/cadinfo")
|
||||||
@Operation(summary = "获取板件对应柜体下的所有板件+配件视图列表数据")
|
@Operation(summary = "获取板件对应柜体下的所有板件+配件视图列表数据")
|
||||||
|
@PreAuthorize("@ss.hasPermission('production:manager-list:detail')")
|
||||||
public CommonResult<OrdersViewCadViewInfoRespVO> getBodyViewCadInfo(@Validated @RequestBody OrderCadViewPlatePageReqVO orderCadViewPlatePageReqVO) {
|
public CommonResult<OrdersViewCadViewInfoRespVO> getBodyViewCadInfo(@Validated @RequestBody OrderCadViewPlatePageReqVO orderCadViewPlatePageReqVO) {
|
||||||
return success(plateService.getBodyViewCadInfo(orderCadViewPlatePageReqVO));
|
return success(plateService.getBodyViewCadInfo(orderCadViewPlatePageReqVO));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/body/view/part/cadinfo")
|
@PostMapping("/body/view/part/cadinfo")
|
||||||
@Operation(summary = "获取板件对应柜体下的所有配件视图列表数据")
|
@Operation(summary = "获取板件对应柜体下的所有配件视图列表数据")
|
||||||
|
@PreAuthorize("@ss.hasPermission('production:manager-list:detail')")
|
||||||
public CommonResult<OrdersViewCadViewInfoRespVO> getBodyViewPartCadInfo(@Validated @RequestBody OrderCadViewPlatePageReqVO orderCadViewPlatePageReqVO) {
|
public CommonResult<OrdersViewCadViewInfoRespVO> getBodyViewPartCadInfo(@Validated @RequestBody OrderCadViewPlatePageReqVO orderCadViewPlatePageReqVO) {
|
||||||
return success(plateService.getBodyViewPartCadInfo(orderCadViewPlatePageReqVO));
|
return success(plateService.getBodyViewPartCadInfo(orderCadViewPlatePageReqVO));
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-3
@@ -180,13 +180,11 @@ public interface OrderMapper extends BaseMapperX<OrderDO> {
|
|||||||
* @param today
|
* @param today
|
||||||
* @param organId
|
* @param organId
|
||||||
* @param page
|
* @param page
|
||||||
* @param orderIds 父级订单数组
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
IPage<OrderOverdueRespVO> selectOrderOverdue(@Param("today") LocalDate today,
|
IPage<OrderOverdueRespVO> selectOrderOverdue(@Param("today") LocalDate today,
|
||||||
@Param("organId") Long organId,
|
@Param("organId") Long organId,
|
||||||
@Param("page") IPage<OrderOverdueRespVO> page,
|
@Param("page") IPage<OrderOverdueRespVO> page);
|
||||||
@Param("orderIds") Long... orderIds);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单数量统计
|
* 订单数量统计
|
||||||
|
|||||||
+9
@@ -35,6 +35,15 @@ public interface OrderComponentMapper extends BaseMapperX<OrderComponentDO> {
|
|||||||
*/
|
*/
|
||||||
List<OrderComponentDO> getTopComponentListIn(@Param("ids") List<Long> ids, boolean deleted);
|
List<OrderComponentDO> getTopComponentListIn(@Param("ids") List<Long> ids, boolean deleted);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询订单顶级部件,关联order_item,如果被移除了就不展示了
|
||||||
|
*
|
||||||
|
* @param orderIds
|
||||||
|
* @param name
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<OrderComponentDO> getOrderTopComponentList(@Param("orderIds")List<Long> orderIds, @Param("name") String name);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询订单topid下的所有大于level层级的部件列表
|
* 查询订单topid下的所有大于level层级的部件列表
|
||||||
* @param orderId
|
* @param orderId
|
||||||
|
|||||||
+21
-8
@@ -835,15 +835,15 @@ public class AssemblyListServiceImpl implements AssemblyListService {
|
|||||||
return BeanUtil.copyToList(result, OrderComponentRespVO.class);
|
return BeanUtil.copyToList(result, OrderComponentRespVO.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 整理状态对应的树数据
|
||||||
|
*
|
||||||
|
* @param reqVO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
private List<TopComponentState> buildTopComponentStates(OrdersTopComponentListReqVO reqVO) {
|
private List<TopComponentState> buildTopComponentStates(OrdersTopComponentListReqVO reqVO) {
|
||||||
|
// 查询顶级部件
|
||||||
List<OrderComponentDO> topComponents = orderComponentMapper.selectList(
|
List<OrderComponentDO> topComponents = orderComponentMapper.getOrderTopComponentList(reqVO.getOrderIds(), reqVO.getName());
|
||||||
new LambdaQueryWrapperX<OrderComponentDO>()
|
|
||||||
.in(OrderComponentDO::getOrderId, reqVO.getOrderIds())
|
|
||||||
.eq(OrderComponentDO::getPid, OrderComponentDO.PARENT_ID_ROOT)
|
|
||||||
.likeIfPresent(OrderComponentDO::getName, reqVO.getName())
|
|
||||||
);
|
|
||||||
|
|
||||||
if (CollUtil.isEmpty(topComponents)) {
|
if (CollUtil.isEmpty(topComponents)) {
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
@@ -904,6 +904,12 @@ public class AssemblyListServiceImpl implements AssemblyListService {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 解析树数据
|
||||||
|
*
|
||||||
|
* @param node
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
private ProcessStats analyzeTree(OrderComponentTreeCompareVO node) {
|
private ProcessStats analyzeTree(OrderComponentTreeCompareVO node) {
|
||||||
|
|
||||||
ProcessStats stats = new ProcessStats();
|
ProcessStats stats = new ProcessStats();
|
||||||
@@ -941,6 +947,13 @@ public class AssemblyListServiceImpl implements AssemblyListService {
|
|||||||
return stats;
|
return stats;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 过滤规则,是否匹配状态
|
||||||
|
*
|
||||||
|
* @param state
|
||||||
|
* @param statusSet
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
private boolean matchAnyStatus(TopComponentState state,
|
private boolean matchAnyStatus(TopComponentState state,
|
||||||
Set<OrderComponentProcessStatusEnum> statusSet) {
|
Set<OrderComponentProcessStatusEnum> statusSet) {
|
||||||
|
|
||||||
|
|||||||
+2
-29
@@ -775,38 +775,11 @@ public class OrderServiceImpl implements OrderService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageResult<OrderOverdueRespVO> getOrderOverdue(PageParam pageParam) {
|
public PageResult<OrderOverdueRespVO> getOrderOverdue(PageParam pageParam) {
|
||||||
Long organId = OrganContextHolder.getOrganId();
|
|
||||||
|
|
||||||
LocalDate todayDate = LocalDate.now();
|
LocalDate todayDate = LocalDate.now();
|
||||||
PageDTO<OrderOverdueRespVO> page = new PageDTO<>(pageParam.getPageNo(), pageParam.getPageSize());
|
PageDTO<OrderOverdueRespVO> page = new PageDTO<>(pageParam.getPageNo(), pageParam.getPageSize());
|
||||||
// 查询超时单
|
// 查询超时单
|
||||||
IPage<OrderOverdueRespVO> orderOverdueVOS = orderMapper.selectOrderOverdue(todayDate, organId, page);
|
IPage<OrderOverdueRespVO> orderOverdueVOS = orderMapper.selectOrderOverdue(todayDate, OrganContextHolder.getOrganId(), page);
|
||||||
List<OrderOverdueRespVO> records = orderOverdueVOS.getRecords();
|
return new PageResult<>(orderOverdueVOS.getRecords(), orderOverdueVOS.getTotal());
|
||||||
long total = orderOverdueVOS.getTotal();
|
|
||||||
|
|
||||||
// 查询子单
|
|
||||||
if (CollUtil.isNotEmpty(records)) {
|
|
||||||
// 主单id列表
|
|
||||||
Long[] mainOrderIds = records.stream().map(OrderOverdueRespVO::getId).toArray(Long[]::new);
|
|
||||||
PageDTO<OrderOverdueRespVO> childPage = new PageDTO<>(pageParam.getPageNo(), PageParam.PAGE_SIZE_NONE);
|
|
||||||
IPage<OrderOverdueRespVO> childOrderOverdueVOS = orderMapper.selectOrderOverdue(todayDate, organId, childPage, mainOrderIds);
|
|
||||||
|
|
||||||
List<OrderOverdueRespVO> childList = childOrderOverdueVOS.getRecords();
|
|
||||||
|
|
||||||
if (CollUtil.isNotEmpty(childList)) {
|
|
||||||
// 按 parentId 分组
|
|
||||||
Map<Long, List<OrderOverdueRespVO>> childMap = childList.stream()
|
|
||||||
.collect(Collectors.groupingBy(OrderOverdueRespVO::getParentId));
|
|
||||||
|
|
||||||
// 回填 child
|
|
||||||
for (OrderOverdueRespVO order : records) {
|
|
||||||
order.setChild(childMap.getOrDefault(order.getId(), null));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return new PageResult<>(records, total);
|
|
||||||
|
|
||||||
}
|
|
||||||
return new PageResult<>(orderOverdueVOS.getRecords(), total);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
-4
@@ -30,7 +30,6 @@ import com.cf.imes.module.executor.dal.dataobject.orderItem.OrdersViewPlatesPage
|
|||||||
import com.cf.imes.module.executor.dal.dataobject.ordercomponent.OrderComponentDO;
|
import com.cf.imes.module.executor.dal.dataobject.ordercomponent.OrderComponentDO;
|
||||||
import com.cf.imes.module.executor.dal.dataobject.order.OrderDO;
|
import com.cf.imes.module.executor.dal.dataobject.order.OrderDO;
|
||||||
import com.cf.imes.module.executor.dal.dataobject.orderBody.OrderBodyDO;
|
import com.cf.imes.module.executor.dal.dataobject.orderBody.OrderBodyDO;
|
||||||
import com.cf.imes.module.executor.dal.mysql.goods.GoodsMapper;
|
|
||||||
import com.cf.imes.module.executor.dal.mysql.order.OrderMapper;
|
import com.cf.imes.module.executor.dal.mysql.order.OrderMapper;
|
||||||
import com.cf.imes.module.executor.dal.mysql.orderBody.OrderBodyMapper;
|
import com.cf.imes.module.executor.dal.mysql.orderBody.OrderBodyMapper;
|
||||||
import com.cf.imes.module.executor.dal.mysql.orderItem.OrderItemMapper;
|
import com.cf.imes.module.executor.dal.mysql.orderItem.OrderItemMapper;
|
||||||
@@ -87,9 +86,6 @@ public class OrderComponentServiceImpl implements OrderComponentService {
|
|||||||
@Resource
|
@Resource
|
||||||
private PlateMapper plateMapper;
|
private PlateMapper plateMapper;
|
||||||
|
|
||||||
@Resource
|
|
||||||
private GoodsMapper goodsMapper;
|
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private OrderBodyMapper orderBodyMapper;
|
private OrderBodyMapper orderBodyMapper;
|
||||||
|
|
||||||
|
|||||||
-11
@@ -153,17 +153,6 @@
|
|||||||
and o.deleted = 0
|
and o.deleted = 0
|
||||||
and o.status != 4
|
and o.status != 4
|
||||||
and #{today} >= DATE(o.delivery_date)
|
and #{today} >= DATE(o.delivery_date)
|
||||||
<choose>
|
|
||||||
<when test="orderIds != null and orderIds.length > 0">
|
|
||||||
AND parent_id IN
|
|
||||||
<foreach item="orderId" collection="orderIds" open="(" separator="," close=")">
|
|
||||||
#{orderId}
|
|
||||||
</foreach>
|
|
||||||
</when>
|
|
||||||
<otherwise>
|
|
||||||
AND parent_id = 0
|
|
||||||
</otherwise>
|
|
||||||
</choose>
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectOrderCountProducePeriod" resultType="com.cf.imes.module.executor.controller.admin.order.vo.order.OrderCountProducePeriodRespVO">
|
<select id="selectOrderCountProducePeriod" resultType="com.cf.imes.module.executor.controller.admin.order.vo.order.OrderCountProducePeriodRespVO">
|
||||||
|
|||||||
+16
@@ -33,6 +33,22 @@
|
|||||||
and p.deleted = #{deleted}
|
and p.deleted = #{deleted}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getOrderTopComponentList" resultType="com.cf.imes.module.executor.dal.dataobject.ordercomponent.OrderComponentDO">
|
||||||
|
select distinct oc.id, oc.name
|
||||||
|
from order_component oc
|
||||||
|
join order_item oi on oc.id = oi.comp_id
|
||||||
|
and oi.order_id = oc.order_id
|
||||||
|
and oi.organ_id = oc.organ_id
|
||||||
|
where oc.order_id in
|
||||||
|
<foreach item="orderId" collection="orderIds" open="(" separator="," close=")">
|
||||||
|
#{orderId}
|
||||||
|
</foreach>
|
||||||
|
and oc.pid = 0
|
||||||
|
<if test="name != null and name != ''">
|
||||||
|
and oc.name like CONCAT('%', #{name}, '%')
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="getComponentListOnTopLevel"
|
<select id="getComponentListOnTopLevel"
|
||||||
resultType="com.cf.imes.module.executor.dal.dataobject.ordercomponent.OrderComponentDO">
|
resultType="com.cf.imes.module.executor.dal.dataobject.ordercomponent.OrderComponentDO">
|
||||||
select * from order_component oc
|
select * from order_component oc
|
||||||
|
|||||||
+8
@@ -12,6 +12,7 @@ import io.swagger.v3.oas.annotations.tags.Tag;
|
|||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import jakarta.validation.Valid;
|
import jakarta.validation.Valid;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
@@ -40,6 +41,7 @@ public class AssemblyConfigController {
|
|||||||
|
|
||||||
@PostMapping("/order/import")
|
@PostMapping("/order/import")
|
||||||
@Operation(summary = "导入装配顺序")
|
@Operation(summary = "导入装配顺序")
|
||||||
|
@PreAuthorize("@ss.hasPermission('systemconfig:assemblyconfig:import')")
|
||||||
public CommonResult<Boolean> importAssemblyConfigFromOrders(@RequestBody @Valid AssemblyConfigImportReqVO reqVO) {
|
public CommonResult<Boolean> importAssemblyConfigFromOrders(@RequestBody @Valid AssemblyConfigImportReqVO reqVO) {
|
||||||
assemblyConfigService.importAssemblyConfigFromOrders(reqVO);
|
assemblyConfigService.importAssemblyConfigFromOrders(reqVO);
|
||||||
return CommonResult.success(true);
|
return CommonResult.success(true);
|
||||||
@@ -47,6 +49,7 @@ public class AssemblyConfigController {
|
|||||||
|
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@Operation(summary = "查询组织装配设置列表")
|
@Operation(summary = "查询组织装配设置列表")
|
||||||
|
@PreAuthorize("@ss.hasPermission('systemconfig:assemblyconfig:query')")
|
||||||
public CommonResult<List<AssemblyConfigListRespVO>> getAssemblyConfigList() {
|
public CommonResult<List<AssemblyConfigListRespVO>> getAssemblyConfigList() {
|
||||||
return CommonResult.success(assemblyConfigService.getOrgAssemblyConfigList());
|
return CommonResult.success(assemblyConfigService.getOrgAssemblyConfigList());
|
||||||
}
|
}
|
||||||
@@ -54,6 +57,7 @@ public class AssemblyConfigController {
|
|||||||
@GetMapping("/{configId}")
|
@GetMapping("/{configId}")
|
||||||
@Operation(summary = "查询装配设置")
|
@Operation(summary = "查询装配设置")
|
||||||
@Parameter(name = "configId", description = "装配设置编号", required = true)
|
@Parameter(name = "configId", description = "装配设置编号", required = true)
|
||||||
|
@PreAuthorize("@ss.hasPermission('systemconfig:assemblyconfig:query')")
|
||||||
public CommonResult<AssemblyConfigRespVO> getAssemblyConfig(@PathVariable Long configId) {
|
public CommonResult<AssemblyConfigRespVO> getAssemblyConfig(@PathVariable Long configId) {
|
||||||
return CommonResult.success(assemblyConfigService.getAssemblyConfig(configId));
|
return CommonResult.success(assemblyConfigService.getAssemblyConfig(configId));
|
||||||
}
|
}
|
||||||
@@ -61,6 +65,7 @@ public class AssemblyConfigController {
|
|||||||
@PostMapping("/{configId}")
|
@PostMapping("/{configId}")
|
||||||
@Operation(summary = "待选部件转加工部件")
|
@Operation(summary = "待选部件转加工部件")
|
||||||
@Parameter(name = "configId", description = "装配设置编号", required = true)
|
@Parameter(name = "configId", description = "装配设置编号", required = true)
|
||||||
|
@PreAuthorize("@ss.hasPermission('systemconfig:assemblyconfig:save')")
|
||||||
public CommonResult<Boolean> doConfig(@PathVariable Long configId) {
|
public CommonResult<Boolean> doConfig(@PathVariable Long configId) {
|
||||||
assemblyConfigService.doConfig(configId);
|
assemblyConfigService.doConfig(configId);
|
||||||
return CommonResult.success(true);
|
return CommonResult.success(true);
|
||||||
@@ -69,6 +74,7 @@ public class AssemblyConfigController {
|
|||||||
@PostMapping("/new/{configId}")
|
@PostMapping("/new/{configId}")
|
||||||
@Operation(summary = "新增加工部件")
|
@Operation(summary = "新增加工部件")
|
||||||
@Parameter(name = "configId", description = "装配设置编号", required = true)
|
@Parameter(name = "configId", description = "装配设置编号", required = true)
|
||||||
|
@PreAuthorize("@ss.hasPermission('systemconfig:assemblyconfig:save')")
|
||||||
public CommonResult<Boolean> newConfig(@PathVariable Long configId) {
|
public CommonResult<Boolean> newConfig(@PathVariable Long configId) {
|
||||||
assemblyConfigService.newConfig(configId);
|
assemblyConfigService.newConfig(configId);
|
||||||
return CommonResult.success(true);
|
return CommonResult.success(true);
|
||||||
@@ -77,6 +83,7 @@ public class AssemblyConfigController {
|
|||||||
@DeleteMapping("/{configId}")
|
@DeleteMapping("/{configId}")
|
||||||
@Operation(summary = "删除已配置的加工部件,恢复到待选")
|
@Operation(summary = "删除已配置的加工部件,恢复到待选")
|
||||||
@Parameter(name = "configId", description = "装配设置编号", required = true)
|
@Parameter(name = "configId", description = "装配设置编号", required = true)
|
||||||
|
@PreAuthorize("@ss.hasPermission('systemconfig:assemblyconfig:delete')")
|
||||||
public CommonResult<Boolean> removeConfigured(@PathVariable Long configId) {
|
public CommonResult<Boolean> removeConfigured(@PathVariable Long configId) {
|
||||||
assemblyConfigService.delete(configId);
|
assemblyConfigService.delete(configId);
|
||||||
return CommonResult.success(true);
|
return CommonResult.success(true);
|
||||||
@@ -84,6 +91,7 @@ public class AssemblyConfigController {
|
|||||||
|
|
||||||
@PostMapping("/save")
|
@PostMapping("/save")
|
||||||
@Operation(summary = "保存装配设置")
|
@Operation(summary = "保存装配设置")
|
||||||
|
@PreAuthorize("@ss.hasPermission('systemconfig:assemblyconfig:save')")
|
||||||
public CommonResult<Boolean> saveAssemblyConfig(@RequestBody AssemblyConfigSaveReqVO reqVO) {
|
public CommonResult<Boolean> saveAssemblyConfig(@RequestBody AssemblyConfigSaveReqVO reqVO) {
|
||||||
assemblyConfigService.saveConfig(reqVO);
|
assemblyConfigService.saveConfig(reqVO);
|
||||||
return CommonResult.success(true);
|
return CommonResult.success(true);
|
||||||
|
|||||||
Reference in New Issue
Block a user