CN105930418A - Method for obtaining grain testing index deduction amount ratio on the basis of JavaScript - Google Patents

Method for obtaining grain testing index deduction amount ratio on the basis of JavaScript Download PDF

Info

Publication number
CN105930418A
CN105930418A CN201610242625.8A CN201610242625A CN105930418A CN 105930418 A CN105930418 A CN 105930418A CN 201610242625 A CN201610242625 A CN 201610242625A CN 105930418 A CN105930418 A CN 105930418A
Authority
CN
China
Prior art keywords
button amount
javascript
amount ratio
button
computing formula
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201610242625.8A
Other languages
Chinese (zh)
Inventor
邵辉
曹雪韬
汤海波
曹鹏飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur General Software Co Ltd
Original Assignee
Inspur General Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur General Software Co Ltd filed Critical Inspur General Software Co Ltd
Priority to CN201610242625.8A priority Critical patent/CN105930418A/en
Publication of CN105930418A publication Critical patent/CN105930418A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a method for obtaining a grain testing index deduction amount ratio on the basis of JavaScript. The implementation process of the method comprises the following steps: in a grain management system, designing a database into a master and slave table structure, wherein one main table record corresponds to a plurality of slave table records; through a JavaScript function, defining a deduction amount calculation formula; and inputting the testing value of a corresponding testing item to retrieve a master table and a slave table to obtain the corresponding deduction amount calculation formula, and obtaining the deduction amount ratio in an operation interface according to the deduction amount calculation formula. Compared with the prior art, the method for obtaining the grain testing index deduction amount ratio on the basis of JavaScript automatically finishes the calculation of the deduction amount ratio for the quality price policy of grain purchase according to the testing index in a software system so as to lower errors which may be caused by manual calculation and effectively guarantee the benefit of a bank point operator. The method has the advantages of being clear in master-slave table structure and function division, convenient in quoting and integrating a JavaScript function, high in practicality and easy in popularization.

Description

A kind of method obtaining grain test rating button amount ratio based on JavaScript
Technical field
The present invention relates to field of computer technology, specifically a kind of based on JavaScript acquisition grain test rating button amount ratio The method of example.
Background technology
The transmission of measuring equipment signal commonly relies on RS-232/485 serial communication, although RS-232/485 serial communication structure Simply, easy to use, but comparatively speaking, integration ability is relatively poor.Now the management system of enterprise be essentially all based on TCP/IP network runs, and measuring equipment does not the most possess TCP/IP network interface, if enterprise wants to realize remote centralized meter The mode of amount improves business administration and the method prevented cheating, then be necessarily required to a kind of method and be converted to by measuring equipment signal The signal that TCP/IP can identify, to facilitate the process of business management software.
Based on this, the present invention provides a kind of method obtaining grain test rating button amount ratio based on JavaScript, by controlling Serial Server and utilize network technology, realizes long-range, the method for centralized measure of enterprise, Serial Server here For serial server, its function introduction is: Serial Server can allow the equipment of traditional RS232/485/422 join immediately Net, can transmit data in serial ports and network.
Summary of the invention
The technical assignment of the present invention is for above weak point, it is provided that a kind of based on JavaScript acquisition grain test rating button The method of amount ratio.
A kind of method obtaining grain test rating button amount ratio based on JavaScript, it realizes process and is:
In food administration system, data base being designed as master-salve table structure, a master meter record is corresponding a plurality of from table record;
Button amount computing formula is defined by JavaScript function;
By the test value of typing correspondence inspection project, master-salve table is retrieved, obtain corresponding button amount computing formula, and according to This button amount computing formula obtains button amount ratio in operation interface.
In data base, the general character part of master meter storage button amount computing formula, general character part here includes the kind of grain, storehouse Sustainability matter, inspection project;The amount of button computing formula from the different test value scope of table storage;Closed by master meter ISN between master-salve table Connection, and set up the data relationship of one-to-many, i.e. one master meter is corresponding a plurality of from table, and master meter ISN is as major key, stores from table Master meter ISN is as external key.
Carry out resolving button amount computing formula, this button by the parseFloat () function of JavaScript, i.e. digital processing function Amount computing formula supports that multidigit decimal calculates.
The button amount computing formula definition of grain variety inspection project is completed by system operation interface, and is saved in data base, its In,
Computing formula is: parseFloat ((Y-X)/M) * (N)/100;In this formula, Y is test value, and A is under test value Limit, B is the test value upper limit, is worth on the basis of X, and M is the actual numerical value exceeding reference value, and N is button value;I.e. as test value Y More than test value lower limit A, and during less than or equal to test value upper limit B, during the every high M of benchmark value X, button amount N%;
During preservation, verify same breed, the inspection project of stock's character, only allow to safeguard one, and each arranges a plurality of The button amount computing formula that different test values are interval, and there is not common factor in each interval.
In food administration system during typing test value, it is right that system goes to mate in data base according to kind, inspection project, test value The button amount computing formula answered, and extract interface, system foreground, in interface, directly parameters of formula is carried out assignment calculating, To corresponding button amount ratio.
The concrete acquisition process of described button amount ratio is: typing test value, enters at background data base according to inspection project and test value Line retrieval, the bound segment of the corresponding inspection project of coupling, finds the button amount computing formula of correspondence, and extracts interface, foreground; In interface, foreground, calculated by parameter value transmission, i.e. directly parameters of formula is carried out the variate-value that transmission is corresponding, after calculating To corresponding button amount ratio.
During the acquisition of above-mentioned button amount ratio, when retrieve button amount computing formula time, first according to match check project, kind, Stock's character, finds master meter record;Find out the result set from table according to master meter record ISN, go from table not further according to test value With test value interval is found corresponding record, return to foreground;To the button amount computing formula each variable transferring parameter value taken out, meter Calculate button amount ratio.
Compared to the prior art a kind of of the present invention obtain the method for grain test rating button amount ratio based on JavaScript, has Following beneficial effect:
A kind of method obtaining grain test rating button amount ratio based on JavaScript of the present invention, by informationization technology, Software system realizes being automatically performed the quality and price policy of grain purchases according to test rating the calculating of the amount of button ratio, thus reduce because of For manually calculating the mistake being likely to result in, the effective interests ensureing storehouse point operator, master-salve table 26S Proteasome Structure and Function of the present invention divides Clearly, JavaScript function be easy to quote integrated, practical, it is easy to promote.
Accompanying drawing explanation
What accompanying drawing 1 was the present invention realizes schematic diagram.
Detailed description of the invention
The invention will be further described with specific embodiment below in conjunction with the accompanying drawings.
As shown in Figure 1, a kind of method obtaining grain test rating button amount ratio based on JavaScript of the present invention, design Database store structure is master-salve table, can effectively support that same breed, stock's character are for the differentiation of different assays Button amount calculates requirement;The definition of button amount computing formula is realized by JavaScript function;For different cultivars, stock character Button amount computing formula can dynamically configure, and kind and stock's character according to current grain are dynamically obtained by SQL.
It realizes process:
In food administration system, data base being designed as master-salve table structure, a master meter record is corresponding a plurality of from table record;
Button amount computing formula is defined by JavaScript function;
By the test value of typing correspondence inspection project, master-salve table is retrieved, obtain corresponding button amount computing formula, and according to This button amount computing formula obtains button amount ratio in operation interface.
In data base, the general character part of master meter storage button amount computing formula, general character part here includes the kind of grain, storehouse Sustainability matter, inspection project;The amount of button computing formula from the different test value scope of table storage;Closed by master meter ISN between master-salve table Connection, and set up the data relationship of one-to-many, i.e. one master meter is corresponding a plurality of from table, and master meter ISN is as major key, stores from table Master meter ISN is as external key.
Design database list structure, being formed is correlated with builds table statement, and completes the establishment of table.As follows:
Field number Field name Field type Explanation
KLGS_LSH Serial number Vahar(32)
KLGS_JYXM Inspection project Vahar(32)
KLGS_PZ Kind Vahar(32)
KLGS_KCXZ Stock's character Vahar(32)
KLGS_ZT State Vahar(32) 0: disable, 1: enable
System realizes based on JavaScript, needs formula to use digital processing function to resolve, it is contemplated that during calculating Decimal can be related to, therefore use parseFloat () function.
The button amount computing formula definition of grain variety inspection project is completed by system operation interface, and is saved in data base, its In,
Computing formula is: parseFloat ((Y-X)/M) * (N)/100;In this formula, Y is test value, and A is under test value Limit, B is the test value upper limit, is worth on the basis of X, and M is the actual numerical value exceeding reference value, and N is button value;I.e. as test value Y More than test value lower limit A, and during less than or equal to test value upper limit B, during the every high M of benchmark value X, button amount N%;
During preservation, verify same breed, the inspection project of stock's character, only allow to safeguard one, and each arranges a plurality of The button amount computing formula that different test values are interval, and there is not common factor in each interval.
In food administration system during typing test value, it is right that system goes to mate in data base according to kind, inspection project, test value The button amount computing formula answered, and extract interface, system foreground, in interface, directly parameters of formula is carried out assignment calculating, To corresponding button amount ratio.
The concrete acquisition process of described button amount ratio is: typing test value, enters at background data base according to inspection project and test value Line retrieval, the bound segment of the corresponding inspection project of coupling, finds the button amount computing formula of correspondence, and extracts interface, foreground; In interface, foreground, calculated by parameter value transmission, i.e. directly parameters of formula is carried out the variate-value that transmission is corresponding, after calculating To corresponding button amount ratio.
During the acquisition of above-mentioned button amount ratio, when retrieve button amount computing formula time, first according to match check project, kind, Stock's character, finds master meter record;Find out the result set from table according to master meter record ISN, go from table not further according to test value With test value interval is found corresponding record, return to foreground;To the button amount computing formula each variable transferring parameter value taken out, meter Calculate button amount ratio.
The some algorithm of the present invention is as follows:
By detailed description of the invention above, described those skilled in the art can readily realize the present invention.It is understood that The present invention is not limited to above-mentioned detailed description of the invention.On the basis of disclosed embodiment, the technology people of described technical field Member can the different technical characteristic of combination in any, thus realize different technical schemes.
In addition to the technical characteristic described in description, it is the known technology of those skilled in the art.

Claims (7)

1. the method obtaining grain test rating button amount ratio based on JavaScript, it is characterised in that it realizes process and is:
In food administration system, data base being designed as master-salve table structure, a master meter record is corresponding a plurality of from table record;
Button amount computing formula is defined by JavaScript function;
By the test value of typing correspondence inspection project, master-salve table is retrieved, obtain corresponding button amount computing formula, and according to This button amount computing formula obtains button amount ratio in operation interface.
A kind of method obtaining grain test rating button amount ratio based on JavaScript the most according to claim 1, it is special Levy and be, in data base, master meter storage button amount computing formula general character part, general character part here include grain kind, Stock's character, inspection project;The amount of button computing formula from the different test value scope of table storage;By master meter ISN between master-salve table Association, and set up the data relationship of one-to-many, i.e. one master meter is corresponding a plurality of from table.
A kind of method obtaining grain test rating button amount ratio based on JavaScript the most according to claim 2, it is special Levy and be, carry out resolving button amount computing formula by the parseFloat () function of JavaScript, i.e. digital processing function, This button amount computing formula supports that multidigit decimal calculates.
A kind of method obtaining grain test rating button amount ratio based on JavaScript the most according to claim 3, it is special Levying and be, the button amount computing formula definition of grain variety inspection project is completed by system operation interface, and is saved in data base, Wherein,
Computing formula is: parseFloat ((Y-X)/M) * (N)/100;In this formula, Y is test value, and A is under test value Limit, B is the test value upper limit, is worth on the basis of X, and M is the actual numerical value exceeding reference value, and N is button value;I.e. as test value Y More than test value lower limit A, and during less than or equal to test value upper limit B, during the every high M of benchmark value X, button amount N%;
During preservation, verify same breed, the inspection project of stock's character, only allow to safeguard one, and each arranges a plurality of The button amount computing formula that different test values are interval, and there is not common factor in each interval.
A kind of method obtaining grain test rating button amount ratio based on JavaScript the most according to claim 2, it is special Levying and be, in food administration system during typing test value, system goes to mate in data base according to kind, inspection project, test value Corresponding button amount computing formula, and extract interface, system foreground, in interface, directly parameters of formula is carried out assignment calculating, Obtain the button amount ratio of correspondence.
A kind of method obtaining grain test rating button amount ratio based on JavaScript the most according to claim 5, it is special Levying and be, the concrete acquisition process of described button amount ratio is: typing test value, according to inspection project and test value at background data base Retrieve, the bound segment of the corresponding inspection project of coupling, find the button amount computing formula of correspondence, and extract foreground circle Face;In interface, foreground, calculated by parameter value transmission, i.e. directly parameters of formula is carried out the variate-value that transmission is corresponding, calculates After obtain correspondence button amount ratio.
A kind of method obtaining grain test rating button amount ratio based on JavaScript the most according to claim 6, it is special Levy and be, during the acquisition of above-mentioned button amount ratio, when retrieving button amount computing formula, first according to match check project, product Kind, stock's character, find master meter record;Find out the result set from table according to master meter record ISN, go from table further according to test value Different test value intervals in find correspondence record, return foreground;To the button amount computing formula each variable transferring parameter value taken out, Calculate button amount ratio.
CN201610242625.8A 2016-04-19 2016-04-19 Method for obtaining grain testing index deduction amount ratio on the basis of JavaScript Pending CN105930418A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610242625.8A CN105930418A (en) 2016-04-19 2016-04-19 Method for obtaining grain testing index deduction amount ratio on the basis of JavaScript

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610242625.8A CN105930418A (en) 2016-04-19 2016-04-19 Method for obtaining grain testing index deduction amount ratio on the basis of JavaScript

Publications (1)

Publication Number Publication Date
CN105930418A true CN105930418A (en) 2016-09-07

Family

ID=56838438

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610242625.8A Pending CN105930418A (en) 2016-04-19 2016-04-19 Method for obtaining grain testing index deduction amount ratio on the basis of JavaScript

Country Status (1)

Country Link
CN (1) CN105930418A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106649220A (en) * 2016-11-29 2017-05-10 中科曙光信息技术无锡有限公司 Online excel formula analysis method
CN112529425A (en) * 2020-12-15 2021-03-19 中国人寿保险股份有限公司 Visual business index configuration method and system and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104268890A (en) * 2014-10-13 2015-01-07 扬州大学 Method for calculating rice maturing rate
CN104778253A (en) * 2015-04-20 2015-07-15 北京京东尚科信息技术有限公司 Method and device for providing data
CN105260615A (en) * 2015-10-29 2016-01-20 河南工业大学 Grain consumption forecasting method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104268890A (en) * 2014-10-13 2015-01-07 扬州大学 Method for calculating rice maturing rate
CN104778253A (en) * 2015-04-20 2015-07-15 北京京东尚科信息技术有限公司 Method and device for providing data
CN105260615A (en) * 2015-10-29 2016-01-20 河南工业大学 Grain consumption forecasting method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106649220A (en) * 2016-11-29 2017-05-10 中科曙光信息技术无锡有限公司 Online excel formula analysis method
CN112529425A (en) * 2020-12-15 2021-03-19 中国人寿保险股份有限公司 Visual business index configuration method and system and electronic equipment

Similar Documents

Publication Publication Date Title
US9881036B2 (en) Avoid double counting of mapped database data
CN109858740A (en) Appraisal procedure, device, computer equipment and the storage medium of business risk
CN107784070B (en) Method, device and equipment for improving data cleaning efficiency
CN101136015A (en) Method for calculating similarity between images
CA2655735A1 (en) Data profiling
CN104881353B (en) Towards the user behavior auditing system and method for Hive platforms
CN105493085B (en) Create method, system and the computer readable storage medium of the sample of database table
CN111177134B (en) Data quality analysis method, device, terminal and medium suitable for mass data
CN107168977A (en) A kind of optimization method and device of data query
CN104866576A (en) Method and apparatus for automatically constructing Data Vault-modeled data warehouse
WO2020088262A1 (en) Data analysis method and device, and storage medium
CN111414410B (en) Data processing method, device, equipment and storage medium
CN104199945A (en) Data storing method and device
CN102567536A (en) Key performance target analyzing method based on data statistics
CN112419044A (en) Credit auditing method, equipment, electronic device and storage medium
CN105930418A (en) Method for obtaining grain testing index deduction amount ratio on the basis of JavaScript
CN107735781A (en) Store method and apparatus, the computing device of Query Result
CN111966707A (en) Query statement generation method and device, electronic equipment and computer readable medium
CN101676900A (en) Data cleaning method for improving accuracy of target data and cleaning system thereof
CN102364475A (en) System and method for sequencing search results based on identity recognition
CN111275294B (en) Commodity information batch processing analysis method, device and equipment
CN113792084A (en) Data heat analysis method, device, equipment and storage medium
WO2023097521A1 (en) Data model generation method and apparatus
US20150363711A1 (en) Device for rapid operational visibility and analytics automation
CN108021588B (en) Integration method and device for user first purchase data facing electronic commerce

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20160907

RJ01 Rejection of invention patent application after publication