Forum > General

How to show product routing from database to program?

(1/5) > >>

Jonvy:
Hello all,

In database, I have a table t_simo saved the prodcut routing information, each row in the table means one step.
Column et_modeop means the current product step, column et_modeop_pere means the step before current step.
If  et_modeop_pere is null, this row means the beginning of the product step.

Product should go according to this table.
The target is to show the product routing in program, like the attachment drawing, it is what I what to show.

In some point, the product can go to different way, such as point 8685 to 8499, 8685 to 8555, it means product can go to station 8555 or 8599(these 2 are same function machine).Same situation as point 8865 to 8525 or 8865 to 8579.
Final station are 8531 and 8585.
All these process step also can be find in table t_simo.

I just don't know how to analysis this table t_simo and make it show in program, can anyone give me some ideas?


Thanks,
Jonvy

BrunoK:
If you provided a testable .csv / .txt file for [et_modeop, et_modeop_pere] array, maybe one might help you.
In general, throwing  screen captures to the forum is probably not going to stimulate anybody to try to make suggestions.

Zvoni:
With SQL you could do a "Count" on the second column. That way you would see if for any current steps they may have the same parent

That's just out of my sleeve. Would have to analyze further

Jonvy:

--- Quote from: BrunoK on October 03, 2022, 04:51:40 pm ---If you provided a testable .csv / .txt file for [et_modeop, et_modeop_pere] array, maybe one might help you.
In general, throwing  screen captures to the forum is probably not going to stimulate anybody to try to make suggestions.

--- End quote ---

OK, here I attach the CSV file, also in the file, I add 2 part no.,Part number 100458 and 171995(with different value in et_nomen), id_simo is not null id segment in table.

Zvoni:

--- Code: SQL  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---SELECT DISTINCT et_nomen,et_modeop, COUNT(et_modeop_pere) AS Cnt FROM t_simo_Part100458_Part171995 GROUP BY et_nomen,et_modeop The Problem i see: How to find out, if the two processes meet again into a single one (Say "packaging" at the end of assembly lines)

EDIT: After thinking about it: How about turning it around?
Currently you have a step with its "parent"
Have you thought about:
You have current step, and in the second column you have the "next" step
That way each "current" step would propagate the next step, meaning: If you have two consecutive steps which have the same et_modeop, then it's a split.
If two "threads" have the same "next"-step they meet again

Navigation

[0] Message Index

[#] Next page

Go to full version