| | |
| | | ElMessage.error(t('order.msg.pleaseCancelTheFilteringFirst')) |
| | | return |
| | | } |
| | | if (selectRecords.length == 0) { |
| | | ElMessage.warning(t('reportingWorks.selectProcessCardData')) |
| | | return; |
| | | } |
| | | // if (selectRecords.length == 0) { |
| | | // ElMessage.warning(t('reportingWorks.selectProcessCardData')) |
| | | // return; |
| | | // } |
| | | |
| | | let projectData = ref({ |
| | | projectdetail: selectRecords, |
| | |
| | | void updateProjectTemperingId(String projectNumber); |
| | | |
| | | List<Map<String, Object>> optimizeTemp(String projectNo); |
| | | |
| | | List<Map<String, Object>> selectTempProject(String processId); |
| | | } |
| | |
| | | int state2 = 0; |
| | | StringBuilder processId= new StringBuilder(); |
| | | List<FlowCard> flowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("projectdetail")), FlowCard.class); |
| | | if (!flowCardList.isEmpty()) { |
| | | if(projectType.equals("2")){ |
| | | deleteProject(projectId,2); |
| | | } |
| | |
| | | TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint); |
| | | return "false1"; |
| | | } |
| | | } |
| | | }else { |
| | | return "false2"; |
| | | |
| | | } |
| | | } catch (Exception e) { |
| | | TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint); |
| | |
| | | public Map<String, Object> getProductListSv(String processId) { |
| | | Map<String, Object> productMap = new HashMap<>(); |
| | | List<Map<String, Object>> productInfo = glassOptimizeMapper.selectProjectList(processId); |
| | | List<Map<String, Object>> tempProductInfo = glassOptimizeMapper.selectTempProject(processId); |
| | | productInfo.addAll(tempProductInfo); |
| | | productMap.put("productInfo", productInfo); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | |
| | |
| | | // 按照 processCard 分组 |
| | | Map<String, List<Map<String, Object>>> groupedByProcessCard = new HashMap<>(); |
| | | for (Map<String, Object> item : productInfo) { |
| | | String processCard = (String) item.get("processCard"); |
| | | String processCard = String.valueOf(item.get("processCard")); |
| | | if (processCard != null) { |
| | | groupedByProcessCard.computeIfAbsent(processCard, k -> new ArrayList<>()).add(item); |
| | | } |
| | |
| | | o_width, |
| | | o_height |
| | | </select> |
| | | <select id="selectTempProject" resultType="java.util.Map" parameterType="java.lang.String"> |
| | | SELECT |
| | | project_no, |
| | | o_width as width, |
| | | o_height as height, |
| | | rack_no as order_number, |
| | | layer as processCard, |
| | | COUNT(*) as quantity, |
| | | ROUND(o_width * o_height * COUNT(*) / 1000000, 4) as Area |
| | | FROM |
| | | pp.`optimize_detail` |
| | | WHERE |
| | | project_no = #{processId} |
| | | AND process_id = '' |
| | | GROUP BY |
| | | project_no, |
| | | layer, |
| | | o_width, |
| | | o_height, |
| | | rack_no |
| | | ORDER BY |
| | | o_width, |
| | | o_height |
| | | </select> |
| | | |
| | | |
| | | </mapper> |