| | |
| | | result = 16;//电芯挡位为空 |
| | | }else{ |
| | | String cellGear = cellGearObjcet.toString(); |
| | | /*List<String> cellCodeList = readCellCodeList(thoroughfare, device); |
| | | /* List<String> cellCodeList = readCellCodeList(thoroughfare, device); |
| | | result = checkCellGear(thoroughfare, device,cellCodeList,cellGear);//校验电芯挡位和组别*/ |
| | | } |
| | | miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".RecordDataDone").value(result).build()); |
| | |
| | | cellStatus = 1; |
| | | }else { |
| | | cellStatus = 2; |
| | | result = 17;//挡位校验不合格 |
| | | result = 16;//挡位校验不合格 |
| | | } |
| | | }else { |
| | | }/*else { |
| | | cellStatus = 2; |
| | | result = 17;//查不到要校验的挡位 |
| | | } |
| | | }*/ |
| | | miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".CellStatus_"+(i+1)).value(cellStatus).build()); |
| | | } |
| | | } |
| | |
| | | if (CollUtil.isNotEmpty(list)){ |
| | | for(DaCollectionParamConf conf:list){ |
| | | //1P1S生成 |
| | | if(conf.getCollectParameterId().equals("1P1S")){ |
| | | if("1P1S".equals(conf.getCollectParameterId())){ |
| | | String result = get1P1S(sfcCode); |
| | | conf.setParamCentral(result); |
| | | } |
| | |
| | | String batteryTypeCode = list.get(0).getBatteryTypeCode();//电池类型代码 |
| | | String specificationsCode = list.get(0).getSpecificationsCode();//规格代码 |
| | | String traceInfoCode = list.get(0).getTraceInfoCode();//追溯信息代码 |
| | | |
| | | String oldDateCode = list.get(0).getProDateCode(); |
| | | String proDateCode = Constants.YEARSMAP.get(now.getYear()) |
| | | + Constants.MONTHSMAP.get(now.getMonthValue()) |
| | | + Constants.DAYMAP.get(now.getDayOfMonth());//生产日期 |
| | | |
| | | String code = list.get(0).getSfcCode();//序列号 |
| | | String code = ""; |
| | | if(oldDateCode.equals(proDateCode)){ |
| | | code = list.get(0).getSfcCode();//序列号 |
| | | }else { |
| | | code = "0"; |
| | | } |
| | | code = StringUtils.leftPad(String.valueOf(Integer.valueOf(code)+1),7, "0");;//序列号 |
| | | result = mfCode+proTypeCode+batteryTypeCode+specificationsCode+traceInfoCode+proDateCode+code; |
| | | |