アプリケーションの説明に入る前に、品質管理の基本的な流れを見てみましょう。
テクニカルサービス名 | API_INSPECTIONLOT_SRV |
HTTP Method | GET |
エンドポイントとクエリパラメータ | /A_InspectionLot?$filter=InspectionLotStartDate ge datetime'2023-09-01T00:00:00' and InspectionLotStartDate le datetime'2023-09-30T23:59:59' and to_InspectionLotWithStatus/InspLotStatusInspCompleted eq null and Plant eq '1710' |
{
Blocks: [
{
BlockType: "WORD",
Confidence: 99.12993621826172,
Text: "B",
TextType: "HANDWRITING",
Geometry: {
//...
},
Id: "0cafe990-c84d-4113-a413-6905c0ba0ca2",
},
{
BlockType: "CELL",
Confidence: 87.060546875,
RowIndex: 3,
ColumnIndex: 5,
RowSpan: 1,
ColumnSpan: 1,
Geometry: {
// ...
},
Id: "c310d6ad-9390-4b3f-a38f-7759daa009a8",
Relationships: [
{
Type: "CHILD",
Ids: ["0cafe990-c84d-4113-a413-6905c0ba0ca2"],
},
],
},
// ...
],
};
[
{
index: "1",
inspectionResult: "A",
},
{
index: "2",
inspectionResult: "A",
},
// ...
];
テクニカルサービス名 | API_INSPECTIONLOT_SRV |
HTTP Method | GET |
エンドポイントとクエリパラメータ | /A_InspectionCharacteristic?$filter=InspectionLot eq '17000001000' |
[
{
InspectionLot: "17000001000",
InspPlanOperationInternalID: "1",
InspSpecIsQuantitative: false,
InspectionCharacteristic: "10",
SelectedCodeSet: "QUAL-CRN",
},
{
InspectionLot: "17000001000",
InspPlanOperationInternalID: "1",
InspSpecIsQuantitative: false,
InspectionCharacteristic: "20",
SelectedCodeSet: "QUAL-CRN",
},
// ...
];
const ocr = [
{
jaID: "押釦スイッチ",
enID: "Button",
isShow: true,
characteristicList: [
{
index: "1",
inspectionOperationJA: "押釦スイッチ",
inspectionOperationEN: "Button",
inspectionCharacteristicJA: "ケース、 方向表示の損傷",
inspectionCharacteristicEN:
"Damage to the case and direction indicators",
inspectionResult: "A",
inspectionResultText: "Accepted",
lotID: "17000001000",
operationID: "1",
characteristicID: "10",
catalogName: "QUAL-CRN",
chacteristicAttributeID: "",
resultCategory: "",
validValuesNumber: 1,
},
{
index: "2",
inspectionOperationJA: "押釦スイッチ",
inspectionOperationEN: "Button",
inspectionCharacteristicJA: "スイッチの作動状態、ゴムカバーの亀裂",
inspectionCharacteristicEN:
"Operational status of switches and cracks in rubber covers",
inspectionResult: "A",
inspectionResultText: "Accepted",
lotID: "17000001000",
operationID: "1",
characteristicID: "20",
catalogName: "QUAL-CRN",
chacteristicAttributeID: "",
resultCategory: "",
validValuesNumber: 1,
},
// ...
],
},
{
jaID: "ロードチェーン",
enID: "Load chain",
isShow: true,
characteristicList: [
{
index: "5",
inspectionOperationJA: "ロードチェーン",
inspectionOperationEN: "Load chain",
inspectionCharacteristicJA: "キズ、変形は無いか",
inspectionCharacteristicEN: "Check for scratches and deformations",
inspectionResult: "D",
inspectionResultText: "Defective",
lotID: "17000001000",
operationID: "2",
characteristicID: "10",
catalogName: "QUAL-CRN",
chacteristicAttributeID: "",
resultCategory: "",
validValuesNumber: 1,
},
// ...
],
},
// ...
];
テクニカルサービス名 | API_CHARCATTRIBUTECATALOG_SRV |
HTTP Method | GET |
エンドポイントとクエリパラメータ | /A_CharcAttribSeldSetCode?$filter=CharacteristicAttributeCodeGrp eq 'QUAL-CRN' |
テクニカルサービス名 | API_CHARCATTRIBUTECATALOG_SRV |
HTTP Method | GET |
エンドポイントとクエリパラメータ | /A_CharcAttribSeldSetCodeT?$filter=CharacteristicAttributeCodeGrp eq 'QUAL-CRN' |
[
{
CharacteristicAttributeCodeGrp: "QUAL-CRN",
CharacteristicAttributeCode: "1",
CharcAttributeValuation: "A",
CharacteristicAttributeCodeTxt: "Accepted",
},
{
CharacteristicAttributeCodeGrp: "QUAL-CRN",
CharacteristicAttributeCode: "2",
CharcAttributeValuation: "R",
CharacteristicAttributeCodeTxt: "Repair",
},
{
CharacteristicAttributeCodeGrp: "QUAL-CRN",
CharacteristicAttributeCode: "3",
CharcAttributeValuation: "R",
CharacteristicAttributeCodeTxt: "Observation",
},
{
CharacteristicAttributeCodeGrp: "QUAL-CRN",
CharacteristicAttributeCode: "4",
CharcAttributeValuation: "R",
CharacteristicAttributeCodeTxt: "Defective",
},
];
const findCharacteristicAttribute = (inspectionResultText) => {
const foundCharacteristic = catalog.find(
(characteristic) =>
characteristic.CharacteristicAttributeCodeTxt === inspectionResultText
);
if (foundCharacteristic) {
return {
CharacteristicAttributeCatalog:
foundCharacteristic.CharacteristicAttributeCode,
CharacteristicAttributeCode:
foundCharacteristic.CharacteristicAttributeCode,
InspectionValuationResult: foundCharacteristic.CharcAttributeValuation,
};
} else {
// Error handling
}
};
テクニカルサービス名 | API_INSPECTIONLOT_SRV |
HTTP Method | POST |
エンドポイント | /A_InspectionResult |
// Headers
{
"Content-Type": "application/json",
"x-csrf-token": "ZAaslFH-gRaItcYMUQ_SWw==\r",
Cookie: "sap-usercontext=...",
}
// Body
{
InspectionLot: "17000001000",
InspPlanOperationInternalID: "1",
InspectionCharacteristic: "10",
CharacteristicAttributeCatalog: "1",
CharacteristicAttributeCodeGrp: "QUAL-CRN",
CharacteristicAttributeCode: "1",
InspResultValidValuesNumber: "1",
InspectionResultText: "",
InspectionResultHasLongText: "",
InspectionValuationResult: "A",
InspectionResultStatus: "5",
};
テクニカルサービス名 | API_INSPECTIONLOT_SRV |
HTTP Method | GET |
エンドポイント | /A_InspectionLot('17000001000') |
テクニカルサービス名 | API_INSPECTIONLOT_SRV |
HTTP Method | POST |
エンドポイント | /A_InspLotUsageDecision |
// Headers
{
"Content-Type": "application/json",
"x-csrf-token": "ZAaslFH-gRaItcYMUQ_SWw==\r\n",
Cookie: "sap-usercontext=...",
}
// Body
{
d: {
InspectionLot: "17000001000",
InspLotUsageDecisionLevel: "L",
InspectionLotQualityScore: "100",
InspLotUsageDecisionCatalog: "3",
SelectedCodeSetPlant: "1710",
InspLotUsgeDcsnSelectedSet: "UD01",
InspLotUsageDecisionCodeGroup: "UD01",
InspectionLotUsageDecisionCode: "A1",
ChangedDateTime: "/Date(1563885880000+0000)/",
},
};
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
7 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 |