Home > Enterprise >  About material automatic coding solution
About material automatic coding solution

Time:09-19

What do you want to be a material coding system, the scheme is shown in figure 1

For example the resistance of the euro 100 coding is 001 001 001
Electronic code is 001, 001, 002 euro 1000
10 * 10 carton coding is 002 001 001
The design of the SQL table as shown in figure 2
Now you have the following questions,
There is no question of material category, the serial number will increase automatically from 001, the name under the same kind of material, also can automatically increase from 001, but if in a material category, how to make goods weighs 001 started yet again, serial number is the same problem,

Figure 1

Figure 2

CodePudding user response:

This is a good solution, such as to the condition of known categories, such as: 001, 001, 001 + serial number (4)
Do you want to build a data table to record the current categories of serial number
Category of the current serial number
001001001
So when I met this category of new materials to retrieve the first category of the current serial number, go up in value + 1 is the material serial number, then press digit combination is a new encoding, and then retrieve the material existence (fear of someone in the background to the serial number checkers or other code accidentally changed), there's a + 1 new material code, the last material with new serial number to write code written to submit,

In addition, you may delete a middle material, such as: 0010010010003, you may want to give this to the new patch, then build a mend button
Click delete patch number button to the category of serial number record this new coding can't retrieve it from 1 to start coding, according to the above steps to deal with again, only the serial number from the UPDATE to insert,

CodePudding user response:

Have characteristics such as the building material, it is recommended to add feature encoding, avoid the material more yards.
Example: categories + + small class + signature + serial number
  • Related