12 changed files with 226 additions and 69 deletions
-
5src/main/java/a8k/dbservice/A8kPresetProjInfoDBService.java
-
8src/main/java/a8k/dbservice/A8kProjIdCardDBService.java
-
1src/main/java/a8k/hardware/type/a8kcanprotocol/A8kEcode.java
-
162src/main/java/a8k/service/app/AppConsumablesMgrService.java
-
24src/main/java/a8k/service/app/AppProjInfoMgrService.java
-
9src/main/java/a8k/service/app/app_consumables_mgr_service/ConsumablesScanResult.java
-
12src/main/java/a8k/service/app/app_consumables_mgr_service/ScanResultState.java
-
6src/main/java/a8k/type/projecttype/a8kidcard/A8kIdCardInfo.java
-
10src/main/java/a8k/utils/A8kIdCardDataParser.java
-
11src/main/java/a8k/utils/ReactionPlate2DCode.java
-
33src/main/java/a8k/utils/ReactionPlate2DCodeParser.java
@ -1,7 +1,12 @@ |
|||
package a8k.service.app.app_consumables_mgr_service; |
|||
|
|||
public class ConsumablesScanResult { |
|||
import java.util.Date; |
|||
|
|||
Boolean pass; |
|||
public class ConsumablesScanResult { |
|||
public Integer chNum; |
|||
public ScanResultState state; |
|||
public Integer projIndex; |
|||
public String lotId; |
|||
public Date expireDate; |
|||
|
|||
} |
@ -1,9 +1,17 @@ |
|||
package a8k.service.app.app_consumables_mgr_service; |
|||
|
|||
public enum ScanResultErrorType { |
|||
public enum ScanResultState { |
|||
PASS, //通过 |
|||
Empty,//空 |
|||
|
|||
LostReactionPlate, //丢弃反应板 |
|||
ConsumableExpired, //耗材过期 |
|||
|
|||
LostLittSB, //丢失小缓冲液 |
|||
LittSBLotIdIsMatch,//小缓冲液批号匹配 |
|||
LostLarBS, //丢失大缓冲液 |
|||
LostReactionPlate, //丢弃反应板 |
|||
LarBSLotIdIsMatch,//大缓冲液批号匹配 |
|||
|
|||
NoMatchingProjIDCardFound,//未找到匹配的项目ID卡 |
|||
ProjInfoIsInComplete,//项目信息不全 |
|||
} |
@ -0,0 +1,11 @@ |
|||
package a8k.utils; |
|||
|
|||
import java.util.Date; |
|||
|
|||
public class ReactionPlate2DCode { |
|||
public Integer projIndex; |
|||
public String lotId; |
|||
public Date expDate; |
|||
public Integer ID0 = 0; |
|||
public Integer ID1 = 0; |
|||
} |
@ -0,0 +1,33 @@ |
|||
package a8k.utils; |
|||
|
|||
import a8k.hardware.type.a8kcanprotocol.A8kEcode; |
|||
import a8k.type.exception.AppException; |
|||
|
|||
import java.text.ParseException; |
|||
import java.text.SimpleDateFormat; |
|||
import java.util.Date; |
|||
|
|||
public class ReactionPlate2DCodeParser { |
|||
// 1||CAGGB66U||2024.03.26||1083||06 |
|||
static public ReactionPlate2DCode parse(String code) throws AppException { |
|||
String[] parts = code.split("\\|\\|"); |
|||
ReactionPlate2DCode ret = new ReactionPlate2DCode(); |
|||
if (parts.length != 5) { |
|||
throw new AppException(A8kEcode.A8kPlate2DCodeFormatError.index); |
|||
} |
|||
ret.projIndex = Integer.parseInt(parts[0]); |
|||
ret.lotId = parts[1]; |
|||
// 2024.03.26 |
|||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy.MM.dd"); |
|||
try { |
|||
ret.expDate = sdf.parse(parts[2]); |
|||
} catch (ParseException e) { |
|||
throw new AppException(A8kEcode.A8kPlate2DCodeFormatError.index); |
|||
} |
|||
ret.ID0 = Integer.parseInt(parts[3]); |
|||
ret.ID1 = Integer.parseInt(parts[4]); |
|||
return ret; |
|||
} |
|||
|
|||
|
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue