Merge branch 'master' of http://bore.pub:10439/r/ERP_override
| | |
| | | |
| | | } else { |
| | | |
| | | |
| | | // item.baiscQuantity = item.baiscQuantity * 1 + leftData[leftfilterIndex].quantity * 1 |
| | | // item.computeGrossArea=(item.width*item.height*item.baiscQuantity/1000000).toFixed(2) |
| | | //item.computeGrossArea=(item.width*item.height*item.baiscQuantity/1000000).toFixed(2) |
| | | // for (let i = 0; i <checkedList.length ; i++) { |
| | | // |
| | | // if (checkedList[i].orderNumber === item.orderNumber){ |
| | | // console.log(item.baiscQuantity +"---"+ checkedList[i].quantity ) |
| | | // item.baiscQuantity = item.baiscQuantity * 1 + checkedList[i].quantity * 1 |
| | | // } |
| | | // } |
| | | |
| | | delete item._X_ROW_KEY |
| | | $grid.insert(item) |
| | | |
| | |
| | | } else { |
| | | // 如果该 processId 已经使用过,继续使用已分配的编号 |
| | | newProcessId = `${baseProcessId}${(totalUniqueCount + 1).toString().padStart(3, '0')}`; |
| | | |
| | | |
| | | } |
| | | // 更新 item.processId |
| | | item.processId = newProcessId; |
| | | }); |
| | | // 获取剩余数据,用于对落架顺序重新赋值 |
| | | let remainingData = $gridLeft.getTableData().fullData; |
| | | // 按 processId 分组 |
| | | let groupedData = remainingData.reduce((acc, curr) => { |
| | | if (!acc[curr.processId]) { |
| | | acc[curr.processId] = []; |
| | | } |
| | | acc[curr.processId].push(curr); |
| | | return acc; |
| | | }, {}); |
| | | |
| | | // 按 processId 排序(倒序) |
| | | let sortedProcessIds = Object.keys(groupedData).sort((a, b) => b - a); |
| | | |
| | | // 更新每个分组的 landingSequence |
| | | sortedProcessIds.forEach((processId, index) => { |
| | | let group = groupedData[processId]; |
| | | |
| | | // 对每个 processId 分组内的数据,不改变顺序,直接赋相同的 landingSequence |
| | | group.forEach((item) => { |
| | | item.landingSequence = sortedProcessIds.length - index; // 按倒序设置 landingSequence |
| | | }); |
| | | }); |
| | | //清除两边复选框 |
| | | $gridLeft.clearCheckboxRow() |
| | | $grid.clearCheckboxRow() |
| | |
| | | } catch (e) { |
| | | ElMessage.warning(e.message) |
| | | } |
| | | //每次点击情况输入框 |
| | | if (checkedNum.value){ |
| | | checkedNum.value ='' |
| | | } |
| | | } |
| | | |
| | | |
| | | //向左边表格添加数据 |
| | | const addLeft = () => { |
| | | try { |
| | |
| | | } |
| | | |
| | | @ApiOperation("退回流程") |
| | | @PostMapping("/processBack/{orderId}") |
| | | public Result processBack(@PathVariable String orderId) { |
| | | return Result.seccess(orderService.processBack(orderId)); |
| | | @PostMapping("/processBack/{orderId}/{status}") |
| | | public Result processBack(@PathVariable String orderId,@PathVariable Integer status) { |
| | | return Result.seccess(orderService.processBack(orderId,status)); |
| | | } |
| | | |
| | | |
| | |
| | | List<Map<String, String>> flowCardDetailMp(String processId, FlowCard flowCard); |
| | | |
| | | Boolean deleteReportingWork(String processId); |
| | | Boolean deleteReportingWorkByOrderId(String orderId); |
| | | |
| | | List<Map<String, String>> selectPrintFlowCardMp(Date selectTime1, Date selectTime2, String orderId, String project, FlowCard flowCard); |
| | | |
| | |
| | | Boolean updateFlowCardMerge(String processId,List<Integer> technologyNumbers,Integer index); |
| | | |
| | | Boolean deleteflowCardSort(String orderId, String processId); |
| | | Boolean deleteflowCardSortByOrderId(String orderId); |
| | | |
| | | List<Map<String, Object>> getPrintProjectDetailsMp(String projectNo); |
| | | |
| | |
| | | |
| | | boolean reviewOrderByIds(String id, Integer status, String userId, String userName); |
| | | |
| | | boolean backReviewOrderById(String id); |
| | | |
| | | boolean reviewProcessById(String id, Integer status); |
| | | |
| | | boolean updateMoney(@Param("order") Order order); |
| | |
| | | import com.example.erp.entity.userInfo.Log; |
| | | import com.example.erp.entity.userInfo.SysError; |
| | | import com.example.erp.exception.ServiceException; |
| | | import com.example.erp.mapper.pp.FlowCardMapper; |
| | | import com.example.erp.mapper.pp.WorkOrderMapper; |
| | | import com.example.erp.mapper.sd.*; |
| | | import com.example.erp.service.userInfo.LogService; |
| | |
| | | private final ProductMapper productMapper; |
| | | private final LogService logService; |
| | | private final WorkOrderMapper workOrderMapper; |
| | | private final FlowCardMapper flowCardMapper; |
| | | |
| | | private final OrderProcessDetailMapper orderProcessDetailMapper; |
| | | public OrderService(OrderMapper orderMapper, OrderDetailMapper orderDetailMapper, OrderGlassDetailMapper orderGlassDetailMapper, OrderProcessDetailMapper orderProcessDetailMapper, SysErrorService sysErrorService, OrderOtherMoneyMapper orderOtherMoneyMapper, ProductMapper productMapper, LogService logService, WorkOrderMapper workOrderMapper) { |
| | | public OrderService(OrderMapper orderMapper, OrderDetailMapper orderDetailMapper, OrderGlassDetailMapper orderGlassDetailMapper, OrderProcessDetailMapper orderProcessDetailMapper, SysErrorService sysErrorService, OrderOtherMoneyMapper orderOtherMoneyMapper, ProductMapper productMapper, LogService logService, WorkOrderMapper workOrderMapper, FlowCardMapper flowCardMapper) { |
| | | this.orderMapper = orderMapper; |
| | | this.orderDetailMapper = orderDetailMapper; |
| | | this.orderGlassDetailMapper = orderGlassDetailMapper; |
| | |
| | | this.productMapper = productMapper; |
| | | this.logService = logService; |
| | | this.workOrderMapper = workOrderMapper; |
| | | this.flowCardMapper = flowCardMapper; |
| | | } |
| | | |
| | | public boolean saveOrder(Map<String,Object> orderMap) throws Exception { |
| | |
| | | return !orderMapper.selectDifferentSize(orderId).isEmpty(); |
| | | } |
| | | |
| | | public Object processBack(String orderId) { |
| | | workOrderMapper.deleteOrderWorkMp(orderId, null); |
| | | workOrderMapper.updateWorkType(orderId, 0); |
| | | public Object processBack(String orderId,Integer status) { |
| | | if(status<5){ |
| | | //更新小片明细表分架状态 |
| | | flowCardMapper.updateDeleteState(orderId,"all"); |
| | | //删除此订单小片流程报工明细 |
| | | flowCardMapper.deleteReportingWorkByOrderId(orderId); |
| | | //删除流程卡 |
| | | flowCardMapper.deleteFlowCardMp(orderId,"all"); |
| | | //删除流程卡排序 |
| | | flowCardMapper.deleteflowCardSortByOrderId(orderId); |
| | | flowCardMapper.updateProcessingCard(orderId, 0); |
| | | } |
| | | if(status<4){ |
| | | workOrderMapper.deleteOrderWorkMp(orderId, null); |
| | | workOrderMapper.updateWorkType(orderId, 0); |
| | | } |
| | | if(status<3){ |
| | | orderMapper.backReviewOrderById(orderId); |
| | | } |
| | | |
| | | if(status<2){ |
| | | orderMapper.reviewProcessById(orderId,0); |
| | | } |
| | | |
| | | return null; |
| | | } |
| | | } |
| | |
| | | <!-- 更新分架状态--> |
| | | <update id="updateDeleteState"> |
| | | update |
| | | sd.order_glass_detail as ogd left join flow_card as fc |
| | | sd.order_glass_detail as ogd left join pp.flow_card as fc |
| | | on ogd.order_id = fc.order_id and ogd.order_number = fc.order_number |
| | | set ogd.splitting_status=0 |
| | | where fc.process_id = #{processId} |
| | | where |
| | | <if test="processId=='all'"> |
| | | ogd.order_id = #{orderId} |
| | | </if> |
| | | <if test="processId!='all'"> |
| | | fc.process_id = #{processId} |
| | | </if> |
| | | |
| | | |
| | | </update> |
| | | |
| | | <!-- 删除流程卡--> |
| | | <update id="deleteFlowCardMp"> |
| | | delete |
| | | from flow_card as fc |
| | | where fc.process_id = #{processId} |
| | | from pp.flow_card as fc |
| | | where |
| | | <if test="processId=='all'"> |
| | | fc.order_id = #{orderId} |
| | | </if> |
| | | <if test="processId!='all'"> |
| | | fc.process_id = #{processId} |
| | | </if> |
| | | </update> |
| | | |
| | | <!-- 分架新增明细查询--> |
| | |
| | | from sd.order_process_detail |
| | | where process_id = #{processId} |
| | | </delete> |
| | | |
| | | <delete id="deleteReportingWorkByOrderId"> |
| | | delete |
| | | from sd.order_process_detail |
| | | where order_id = #{orderId} |
| | | </delete> |
| | | |
| | | |
| | | |
| | | <select id="selectPrintFlowCardMp"> |
| | | select order_id, |
| | |
| | | fc.quantity, |
| | | round(ogd.total_area, 2) as total_area, |
| | | od.perimeter, |
| | | if(od.bend_radius!=null,od.bend_radius,JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S04'))) as bend_radius, |
| | | if(od.bend_radius!=null || od.bend_radius!='',od.bend_radius,if(od.shape=2,JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S04')),'')) as bend_radius, |
| | | concat(IFNULL(od.processing_note, ''), IFNULL(od.remarks, '')) as remarks, |
| | | od.other_columns, |
| | | round(ogd.child_width) as width, |
| | |
| | | fc.quantity, |
| | | round(ogd.total_area, 2) as total_area, |
| | | od.perimeter, |
| | | if(od.bend_radius!=null,od.bend_radius,JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S04'))) as bend_radius, |
| | | if(od.bend_radius!=null || od.bend_radius!='',od.bend_radius,if(od.shape=2,JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S04')),'')) as bend_radius, |
| | | concat(IFNULL(od.processing_note, ''), IFNULL(od.remarks, '')) as remarks, |
| | | od.other_columns, |
| | | round(ogd.child_width) as width, |
| | |
| | | sum(pl.patch_num) as quantity, |
| | | round(ogd.total_area, 2) as total_area, |
| | | od.perimeter, |
| | | if(od.bend_radius!=null,od.bend_radius,JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S04'))) as bend_radius, |
| | | if(od.bend_radius!=null || od.bend_radius!='',od.bend_radius,if(od.shape=2,JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S04')),'')) as bend_radius, |
| | | concat(IFNULL(od.processing_note, ''), IFNULL(od.remarks, '')) as remarks, |
| | | od.other_columns, |
| | | round(ogd.child_width) as width, |
| | |
| | | delete from flow_card_sort where process_id = #{processId} |
| | | </delete> |
| | | |
| | | <delete id="deleteflowCardSortByOrderId"> |
| | | delete from pp.flow_card_sort |
| | | where process_id =( |
| | | select process_id from pp.flow_card |
| | | where order_id=#{orderId} |
| | | group by process_id |
| | | ) |
| | | </delete> |
| | | |
| | | <select id="getPrintProjectDetailsMp"> |
| | | SELECT opd.project_no,opd.stock_id,opl.glass_count FROM optimize_detail as opd left join optimize_layout as opl on opl.project_no=opd.project_no and opl.stock_id=opd.stock_id |
| | | where opd.project_no=#{projectNo} |
| | |
| | | where order_id = #{id} |
| | | </update> |
| | | |
| | | <update id="backReviewOrderById"> |
| | | update `order` set order_review = 0, |
| | | verifier_id = null, |
| | | verifier = null |
| | | where order_id = #{id} |
| | | </update> |
| | | |
| | | <update id="reviewProcessById"> |
| | | update `order` set process_review = #{status} where order_id = #{id} |
| | | </update> |