From 9ada554508bbaba431c9cf6745268ac9b87561d5 Mon Sep 17 00:00:00 2001
From: lsh <lsh@163.com>
Date: 星期一, 24 十一月 2025 15:55:10 +0800
Subject: [PATCH] *
---
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | 902 +++++++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 820 insertions(+), 82 deletions(-)
diff --git a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
index 3eafbc5..a1935c4 100644
--- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -6,12 +6,11 @@
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.core.common.*;
import com.core.exception.CoolException;
+import com.zy.asrs.domain.enums.TaskStatusType;
import com.zy.asrs.entity.*;
import com.zy.asrs.mapper.*;
import com.zy.asrs.service.*;
-import com.zy.asrs.utils.RouteUtils;
-import com.zy.asrs.utils.Utils;
-import com.zy.asrs.utils.VersionUtils;
+import com.zy.asrs.utils.*;
import com.zy.common.model.LocTypeDto;
import com.zy.common.model.MatDto;
import com.zy.common.model.SearchLocParam;
@@ -22,17 +21,16 @@
import com.zy.common.utils.News;
import com.zy.core.CrnThread;
import com.zy.core.DevpThread;
-import com.zy.core.cache.MessageQueue;
-import com.zy.core.cache.SlaveConnection;
+import com.zy.core.cache.*;
import com.zy.core.enums.*;
import com.zy.core.model.*;
import com.zy.core.model.command.CrnCommand;
import com.zy.core.model.command.LedCommand;
-import com.zy.core.model.protocol.CrnProtocol;
-import com.zy.core.model.protocol.StaProtocol;
+import com.zy.core.model.protocol.*;
import com.zy.core.properties.SlaveProperties;
import com.zy.core.thread.BarcodeThread;
import com.zy.core.thread.LedThread;
+import com.zy.core.thread.RgvThread;
import com.zy.core.thread.SiemensDevpThread;
import com.zy.system.entity.license.LicenseVerify;
import lombok.extern.slf4j.Slf4j;
@@ -43,6 +41,7 @@
import org.springframework.transaction.interceptor.TransactionAspectSupport;
import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Collectors;
/**
@@ -80,6 +79,10 @@
private BasCrnErrorMapper basCrnErrorMapper;
@Autowired
private WrkMastService wrkMastService;
+ @Autowired
+ private BasDevpPositionService basDevpPositionService;
+ @Autowired
+ private TaskWrkService taskWrkService;
@Value("${wms.url}")
private String wmsUrl;
@@ -87,6 +90,24 @@
private Integer inventoryNumber;
public Integer wrkNo = 10002;
+
+ @Value("${wms.rgvOpen}")
+ private boolean rgvOpen;
+
+ @Value("${constant-parameters.trackEntireLength}")
+ private Long trackEntireLength;
+
+ @Value("${constant-parameters.trackBenchmark}")
+ private Long trackBenchmark;
+
+ @Value("${constant-parameters.trackProportion}")
+ private Long trackProportion;
+
+ @Value("${constant-parameters.avoidDistance}")
+ private Long avoidDistance;
+ @Autowired
+ private TaskWrkLogServiceImpl taskWrkLogService;
+ public Long currentTimeMilliConnectCrnAuto= 0L;
/*
* 楠岃瘉璁稿彲璇佹槸鍚︽湁鏁�
@@ -1137,69 +1158,6 @@
} else {
staProtocol = staProtocol.clone();
}
-// WrkMast wrkMast9996 = wrkMastMapper.selectByWrkNo9996(9996);
-//
-// if (slave.getId() == 3 && wrkMast9996 != null) {
-// SiemensDevpThread devpThread1 = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp,2);
-// StaProtocol staProtocol2 = devpThread1.getStation().get(4001);
-// if (staProtocol2 == null) {
-// News.infoNoLog("" + mark + " - 2" + " - 3" + " - 鍫嗗灈鏈哄嚭搴撶珯淇℃伅(staProtocol!=null缁х画鎵ц,鍚﹀垯寰幆缁堟)锛歴taProtocol=" + staProtocol2);
-// break;
-// } else {
-// staProtocol2 = staProtocol2.clone();
-// }
-// BasDevp staDetl = basDevpService.selectById(crnStn.getStaNo());
-// if (staDetl == null) {
-// News.error(""+mark+" - 2"+" - 5"+" - 鍑哄簱 ===>> 鍫嗗灈鏈虹珯鐐瑰湪鏁版嵁搴撲笉瀛樺湪, 绔欑偣缂栧彿={}", crnStn.getStaNo());
-// break;
-//// continue;
-// }
-// if( staProtocol2.isAutoing() && staProtocol2.isLoading() && staDetl.getCanining() != null && staDetl.getCanining().equals("Y")){
-// // 鍫嗗灈鏈烘帶鍒惰繃婊�
-// if (!crnProtocol.getStatusType().equals(CrnStatusType.IDLE) || crnProtocol.getTaskNo() != 0) {
-//// continue;
-// break;
-// }
-// // 宸茬粡瀛樺湪鍚婅溅鎵ц浠诲姟鏃讹紝鍒欒繃婊�
-// if (wrkMastMapper.selectWorking(slave.getId()) != null) {
-// break;
-//// return;
-// }
-// // 1.鍫嗗灈鏈哄紑濮嬬Щ鍔�
-// CrnCommand crnCommand = new CrnCommand();
-// crnCommand.setCrnNo(slave.getId()); // 鍫嗗灈鏈虹紪鍙�
-// crnCommand.setTaskNo((short) 9996); // 宸ヤ綔鍙�
-//// crnCommand.setAckFinish((short) 0); // 浠诲姟瀹屾垚纭浣�
-// crnCommand.setTaskMode(CrnTaskModeType.LOC_MOVE); // 浠诲姟妯″紡: 搴撲綅绉昏浆
-// crnCommand.setSourcePosX((short) 9); // 婧愬簱浣嶆帓
-// crnCommand.setSourcePosY((short) 52); // 婧愬簱浣嶅垪
-// crnCommand.setSourcePosZ((short) 3); // 婧愬簱浣嶅眰
-// if(wrkMast9996.getStaNo()>2000){
-// crnCommand.setDestinationPosX((short) 9); // 鐩爣搴撲綅鎺�
-// crnCommand.setDestinationPosY((short) 52); // 鐩爣搴撲綅鍒�
-// crnCommand.setDestinationPosZ((short) 2); // 鐩爣搴撲綅灞�
-// }else{
-// crnCommand.setDestinationPosX((short) 11); // 鐩爣搴撲綅鎺�
-// crnCommand.setDestinationPosY((short) 52); // 鐩爣搴撲綅鍒�
-// crnCommand.setDestinationPosZ((short) 1); // 鐩爣搴撲綅灞�
-// }
-//
-//// crnCommand.setTraySize(sourceSta.getLocType1() == 2); //搴撲綅绫诲瀷
-// if (!MessageQueue.offer(SlaveType.Crn, wrkMast9996.getCrnNo(), new Task(2, crnCommand))) {
-// News.error("" + mark + " - 2" + " - 13" + " - 鍫嗗灈鏈哄懡浠や笅鍙戝け璐ワ紝鍫嗗灈鏈哄彿={}锛屼换鍔℃暟鎹�={}", wrkMast9996.getCrnNo(), JSON.toJSON(crnCommand));
-// } else {
-// // 淇敼宸ヤ綔妗g姸鎬� 11.鐢熸垚鍑哄簱ID => 12.鍚婅溅鍑哄簱涓�
-// Date now = new Date();
-// wrkMast9996.setWrkSts(3L);
-// wrkMast9996.setCrnStrTime(now);
-// wrkMast9996.setModiTime(now);
-// if (wrkMastMapper.updateById(wrkMast9996) == 0) {
-// News.error("" + mark + " - 2" + " - 14" + " - 淇敼宸ヤ綔妗g姸鎬� 11.鐢熸垚鍑哄簱ID => 12.鍚婅溅鍑哄簱涓� 澶辫触锛侊紒锛屽伐浣滃彿={}", wrkMast9996.getWrkNo());
-// }
-// break;
-// }
-// }
-// }
// 鏌ヨ绔欑偣璇︾粏淇℃伅
BasDevp staDetl = basDevpService.selectById(crnStn.getStaNo());
if (staDetl == null) {
@@ -1308,18 +1266,6 @@
if (!MessageQueue.offer(SlaveType.Crn, wrkMast.getCrnNo(), new Task(2, crnCommand))) {
News.error(""+mark+" - 1"+" - 16"+" - 鍫嗗灈鏈哄懡浠や笅鍙戝け璐ワ紝鍫嗗灈鏈哄彿={}锛屼换鍔℃暟鎹�={}", wrkMast.getCrnNo(), JSON.toJSON(crnCommand));
} else {
-
-// long startTime = System.currentTimeMillis();
-// while ((System.currentTimeMillis() - startTime) < COMMAND_TIMEOUT) {
-//
-// if (true) {
-// break;
-// }
-//
-// try{
-// Thread.sleep(500);
-// }catch(Exception ignore){}
-// }
// 淇敼宸ヤ綔妗g姸鎬� 2.璁惧涓婅蛋 => 3.鍚婅溅鍏ュ簱涓�
Date now = new Date();
@@ -2593,4 +2539,796 @@
}
}
+
+
+ public synchronized void taskStart() {
+ for (RgvSlave rgvSlave : slaveProperties.getRgv()) {
+ try {
+ if (rgvDetection(rgvSlave)) {
+ String taskNoNow = rgvOtherTaskWrk(rgvSlave);
+ List<BasDevpPosition> basDevpPositions = basDevpPositionService.selectList(new EntityWrapper<BasDevpPosition>().orderBy("plc_position", true));
+ boolean itSmall = new TrackRangeUtils().IsItSmall(rgvSlave);
+ if (basDevpPositions.isEmpty()) {
+ log.error("鑾峰彇鎵�鏈夌珯鐐逛俊鎭紓甯�");
+ try{
+ DeviceErrorService deviceErrorService = SpringUtils.getBean(DeviceErrorService.class);
+ deviceErrorService.addDeviceError("rgvErr", rgvSlave.getId(), "鎸囦护鐢熸垚锛氳幏鍙栨墍鏈夌珯鐐逛俊鎭紓甯�");
+ } catch (Exception e2){
+ }
+ continue;
+ }
+ List<TaskWrk> taskWrkList = new ArrayList<>();
+ List<Integer> staList = new ArrayList<>();
+ for (RgvSlave.RgvStn inSta : rgvSlave.getRgvInSta()) {
+ TaskWrk taskWrk = deviceDetection(inSta);
+ if (taskWrk != null) {
+ if (taskWrk.getWrkNo().toString().equals(taskNoNow)) continue;
+ taskWrkList.add(taskWrk);
+ staList.add(inSta.getStaNo());
+ }
+ }
+
+ if (taskWrkList.isEmpty() || staList.isEmpty()) continue;
+
+ boolean sign = false;
+
+ if (rgvOtherStatusEnable(rgvSlave)) {
+ //鍒嗘垚涓婁笅涓ら儴鍒嗕换鍔�
+ List<Integer>[] avoidRange = RouteRgvUtils.gradeRange(staList, basDevpPositions, itSmall);
+ List<Integer> rangeListSou = avoidRange[itSmall ? 0 : 1];
+ List<Integer> rangeListSouOther = avoidRange[itSmall ? 1 : 0];
+ //灏辫繎鎺掑簭
+ RgvProtocol rgvProtocol = RgvStatusCache.getRgvStatus(rgvSlave.getId());
+ List<Integer> rangeList = RouteRgvUtils.SortNearby(rangeListSou, rgvProtocol.RgvPos, basDevpPositions);
+ List<Integer> rangeListOther = RouteRgvUtils.SortNearby(rangeListSouOther, rgvProtocol.RgvPos, basDevpPositions);
+
+ //鎵�灞為儴鍒嗗氨杩涘彇璐�
+
+ //绛涢�夎寖鍥村唴浠诲姟
+ //灏辫繎鎺掑簭
+ //绛涢�夊湪鑼冨洿浠诲姟
+ Long[][] avoidedRange = new TrackRangeUtils().avoidRangeArr(rgvSlave, trackEntireLength, trackBenchmark, avoidDistance);
+ List<Integer> belongToRange = RouteRgvUtils.SortNearby(RouteRgvUtils.belongToRange(rangeList, avoidedRange[0], basDevpPositions), rgvProtocol.RgvPos, basDevpPositions);
+
+ if (!sign && staList.size()==1){
+ if (rgvOtherIDLEOther(rgvSlave)){
+ if (!rgvOtherIDLE(rgvSlave,staList.get(0))){
+ System.out.println("绌洪棽灏辫繎璺宠繃==="+rgvSlave.getId()+"===");
+ RgvErrCache.updateRgvErr(rgvSlave.getId(),staList.get(0)+"绌洪棽灏辫繎璺宠繃");
+
+ sign=true;
+ }
+ }
+ if (sign){
+ for (RgvSlave.RgvStn rgvStn : rgvSlave.getRgvInSta()) {
+ if (rgvStn.getStaNo().equals(staList.get(0))) {
+ TaskWrk taskWrk = deviceDetection(rgvStn);
+ if (taskWrk != null) {
+ Integer outStaNo = BarcodeUtils.getOutStaNo(taskWrk.getOriginTargetPoint());
+ for (RgvSlave.RgvStn rgvSuper : rgvSlave.getRgvSuperSta()){
+ if (rgvSuper.getStaNo().equals(outStaNo)){
+ System.out.println("绌洪棽灏辫繎璺宠繃鍚庡洜鏈�杩滃啀娆℃墽琛�==="+rgvSlave.getId()+"===");
+
+ sign=false;
+ break;
+ }
+ }
+ } else {
+ return;
+ }
+ break;
+ }
+ }
+ }
+ }
+
+ if(!sign){
+ for (Integer staNoNow : belongToRange) {
+ for (RgvSlave.RgvStn rgvStn : rgvSlave.getRgvInSta()) {
+ if (rgvStn.getStaNo().equals(staNoNow)) {
+ TaskWrk taskWrk = deviceDetection(rgvStn);
+ if (taskWrk != null) {
+ BasDevpPosition basDevpPosition = basDevpPositionService.selectOne(new EntityWrapper<BasDevpPosition>().eq("DEV_NO", BarcodeUtils.getOutStaNo(taskWrk.getOriginTargetPoint())));
+ if (RouteRgvUtils.CheckIfItIsWithinTheRange(rangeList, basDevpPosition.getPlcPosition(), basDevpPositions, itSmall)) {
+ System.out.println("鍏ㄨ寖鍥存墽琛�==="+rgvSlave.getId()+"==="+taskWrk);
+ System.out.println("鍏ㄨ寖鍥存墽琛�==="+rgvSlave.getId()+"==="+JSON.toJSONString(belongToRange));
+
+ sign = taskGenerate(rgvSlave, rgvStn, 0);
+ }
+ }
+ break;
+ }
+ }
+ if (sign) {
+ break;
+ }
+ }
+ }
+ if (!sign) {
+ // 绛涢�夎寖鍥村唴鍙栬揣浠诲姟
+ for (Integer staNoNow : belongToRange) {
+ for (RgvSlave.RgvStn rgvStn : rgvSlave.getRgvInSta()) {
+ if (rgvStn.getStaNo().equals(staNoNow)) {
+ TaskWrk taskWrk = deviceDetection(rgvStn);
+ if (taskWrk != null) {
+ Integer outStaNo = BarcodeUtils.getOutStaNo(taskWrk.getOriginTargetPoint());
+ for (RgvSlave.RgvStn rgvStnOut : rgvSlave.getRgvOutSta()) {
+ if (rgvStnOut.getStaNo().equals(outStaNo)) {
+ System.out.println("绛涢�夎寖鍥村唴鍙栬揣浠诲姟==="+rgvSlave.getId()+"==="+taskWrk);
+ System.out.println("绛涢�夎寖鍥村唴鍙栬揣浠诲姟==="+rgvSlave.getId()+"==="+JSON.toJSONString(belongToRange));
+
+ sign = taskGenerate(rgvSlave, rgvStn, 0);
+ break;
+ }
+ }
+ }
+ break;
+ }
+ }
+ if (sign) {
+ break;
+ }
+ }
+ }
+
+ if (!sign && staList.size()==1){
+ if (rgvOtherIDLEOther2(rgvSlave)){
+ if (!rgvOtherIDLE2(rgvSlave,staList.get(0))){
+ System.out.println("杩愯灏辫繎璺宠繃==="+rgvSlave.getId()+"===");
+ RgvErrCache.updateRgvErr(rgvSlave.getId(),staList.get(0)+"杩愯灏辫繎璺宠繃");
+
+ sign=true;
+ }
+ }
+ if (sign){
+ for (RgvSlave.RgvStn rgvStn : rgvSlave.getRgvInSta()) {
+ if (rgvStn.getStaNo().equals(staList.get(0))) {
+ TaskWrk taskWrk = deviceDetection(rgvStn);
+ if (taskWrk != null) {
+ Integer outStaNo = BarcodeUtils.getOutStaNo(taskWrk.getOriginTargetPoint());
+ for (RgvSlave.RgvStn rgvSuper : rgvSlave.getRgvSuperSta()){
+ if (rgvSuper.getStaNo().equals(outStaNo)){
+ System.out.println("杩愯灏辫繎璺宠繃鍚庡洜鏈�杩滃啀娆℃墽琛�==="+rgvSlave.getId()+"===");
+
+ sign=false;
+ break;
+ }
+ }
+ } else {
+ return;
+ }
+ break;
+ }
+ }
+ }
+ }
+
+
+
+ if (!sign && staList.size()>1) {
+ for (Integer staNoNow : rangeList) {
+ for (RgvSlave.RgvStn rgvStn : rgvSlave.getRgvInSta()) {
+ if (rgvStn.getStaNo().equals(staNoNow)) {
+ TaskWrk taskWrk = deviceDetection(rgvStn);
+ if (taskWrk != null) {
+ BasDevpPosition basDevpPosition = basDevpPositionService.selectOne(new EntityWrapper<BasDevpPosition>().eq("DEV_NO", BarcodeUtils.getOutStaNo(taskWrk.getOriginTargetPoint())));
+ if (RouteRgvUtils.CheckIfItIsWithinTheRange(rangeList, basDevpPosition.getPlcPosition(), basDevpPositions, itSmall)) {
+ System.out.println("绛涢�夊崐杈硅寖鍥村唴浠诲姟==="+rgvSlave.getId()+"==="+taskWrk);
+ System.out.println("绛涢�夊崐杈硅寖鍥村唴浠诲姟==="+rgvSlave.getId()+"==="+JSON.toJSONString(belongToRange));
+
+ sign = taskGenerate(rgvSlave, rgvStn, 0);
+ }
+ }
+ break;
+ }
+ }
+ if (sign) {
+ break;
+ }
+ }
+ }else if (!sign && staList.size()==1){
+ BasDevpPosition basDevpPosition1 = basDevpPositionService.selectOne(new EntityWrapper<BasDevpPosition>().eq("DEV_NO", staList.get(0)));
+ if (Math.abs(basDevpPosition1.getPlcPosition()- rgvProtocol.getRgvPos())<rgvProtocol.getCarBodyJiaoMing()+rgvProtocol.getCarBodyKunPeng() + avoidDistance*2){
+ for (Integer staNoNow : rangeList) {
+ for (RgvSlave.RgvStn rgvStn : rgvSlave.getRgvInSta()) {
+ if (rgvStn.getStaNo().equals(staNoNow)) {
+ TaskWrk taskWrk = deviceDetection(rgvStn);
+ if (taskWrk != null) {
+ BasDevpPosition basDevpPosition = basDevpPositionService.selectOne(new EntityWrapper<BasDevpPosition>().eq("DEV_NO", BarcodeUtils.getOutStaNo(taskWrk.getOriginTargetPoint())));
+ if (RouteRgvUtils.CheckIfItIsWithinTheRange(rangeList, basDevpPosition.getPlcPosition(), basDevpPositions, itSmall)) {
+ System.out.println("绛涢�夊崐杈硅寖鍥村唴浠诲姟==="+rgvSlave.getId()+"==="+taskWrk);
+ System.out.println("绛涢�夊崐杈硅寖鍥村唴浠诲姟==="+rgvSlave.getId()+"==="+JSON.toJSONString(belongToRange));
+
+ sign = taskGenerate(rgvSlave, rgvStn, 0);
+ }
+ }
+ break;
+ }
+ }
+ if (sign) {
+ break;
+ }
+ }
+ }
+ }
+
+
+
+ if (!sign && staList.size()>1) {
+ // 鍗婅竟鍖哄煙鍐呭彇璐т换鍔�
+ for (Integer staNoNow : rangeList) {
+ for (RgvSlave.RgvStn rgvStn : rgvSlave.getRgvInSta()) {
+ if (rgvStn.getStaNo().equals(staNoNow)) {
+ TaskWrk taskWrk = deviceDetection(rgvStn);
+ if (taskWrk != null) {
+ Integer outStaNo = BarcodeUtils.getOutStaNo(taskWrk.getOriginTargetPoint());
+ for (RgvSlave.RgvStn rgvStnOut : rgvSlave.getRgvOutSta()) {
+ if (rgvStnOut.getStaNo().equals(outStaNo)) {
+ System.out.println("绛涢�夊崐杈硅寖鍥村彇璐т换鍔�==="+rgvSlave.getId()+"==="+taskWrk);
+ System.out.println("绛涢�夊崐杈硅寖鍥村彇璐т换鍔�==="+rgvSlave.getId()+"==="+JSON.toJSONString(belongToRange));
+
+ sign = taskGenerate(rgvSlave, rgvStn, 0);
+ break;
+ }
+ }
+ }
+ break;
+ }
+ }
+ if (sign) {
+ break;
+ }
+ }
+ }
+ if (!sign && staList.size()>1) {
+ for (Integer staNoNow : rangeListOther) {
+ for (RgvSlave.RgvStn rgvStn : rgvSlave.getRgvInSta()) {
+ if (rgvStn.getStaNo().equals(staNoNow)) {
+ TaskWrk taskWrk = deviceDetection(rgvStn);
+ if (taskWrk != null) {
+ Integer outStaNo = BarcodeUtils.getOutStaNo(taskWrk.getOriginTargetPoint());
+ for (RgvSlave.RgvStn rgvSuper : rgvSlave.getRgvSuperSta()){
+ if (rgvSuper.getStaNo().equals(outStaNo)){
+ System.out.println("鍥犳渶杩滄墽琛屽崐杈瑰尯鍩熷唴鏀捐揣浠诲姟==="+rgvSlave.getId()+"===");
+ BasDevpPosition basDevpPosition = basDevpPositionService.selectOne(new EntityWrapper<BasDevpPosition>().eq("DEV_NO", BarcodeUtils.getOutStaNo(taskWrk.getOriginTargetPoint())));
+ if (RouteRgvUtils.CheckIfItIsWithinTheRange(rangeList, basDevpPosition.getPlcPosition(), basDevpPositions, itSmall)) {
+ sign = taskGenerate(rgvSlave, rgvStn, 0);
+ }
+ break;
+ }
+ }
+ }
+ break;
+ }
+ if (sign) {
+ break;
+ }
+ }
+ if (sign) {
+ break;
+ }
+ }
+
+ }else if (!sign && staList.size()==1){
+ for (Integer staNoNow : rangeList) {
+ for (RgvSlave.RgvStn rgvStn : rgvSlave.getRgvInSta()) {
+ if (rgvStn.getStaNo().equals(staNoNow)) {
+ TaskWrk taskWrk = deviceDetection(rgvStn);
+ if (taskWrk != null) {
+ Integer outStaNo = BarcodeUtils.getOutStaNo(taskWrk.getOriginTargetPoint());
+ for (RgvSlave.RgvStn rgvSuper : rgvSlave.getRgvSuperSta()){
+ if (rgvSuper.getStaNo().equals(outStaNo)){
+ System.out.println("鍥犳渶杩滄墽琛屽崐杈瑰尯鍩熷唴鏀捐揣浠诲姟==="+rgvSlave.getId()+"===");
+ BasDevpPosition basDevpPosition = basDevpPositionService.selectOne(new EntityWrapper<BasDevpPosition>().eq("DEV_NO", BarcodeUtils.getOutStaNo(taskWrk.getOriginTargetPoint())));
+ if (RouteRgvUtils.CheckIfItIsWithinTheRange(rangeList, basDevpPosition.getPlcPosition(), basDevpPositions, itSmall)) {
+ sign = taskGenerate(rgvSlave, rgvStn, 0);
+ }
+ break;
+ }
+ }
+ }
+ break;
+ }
+ if (sign) {
+ break;
+ }
+ }
+ if (sign) {
+ break;
+ }
+ }
+
+ }
+ RgvErrCache.updateRgvErr(rgvSlave.getId(),"鏈煡璇㈠埌鍙墽琛屼换鍔�");
+
+ } else {
+ //鍙敤鍖哄煙灏辫繎鍙栬揣
+ //灏辫繎鎺掑簭
+ RgvProtocol rgvProtocol = RgvStatusCache.getRgvStatus(rgvSlave.getId());
+ List<Integer> rangeList = RouteRgvUtils.SortNearby(staList, rgvProtocol.RgvPos, basDevpPositions);
+ // 鍗婅竟鍖哄煙鍐呭彇璐т换鍔�
+ for (Integer staNoNow : rangeList) {
+ for (RgvSlave.RgvStn rgvStn : rgvSlave.getRgvInSta()) {
+ if (rgvStn.getStaNo().equals(staNoNow)) {
+ TaskWrk taskWrk = deviceDetection(rgvStn);
+ if (taskWrk != null) {
+ Integer outStaNo = BarcodeUtils.getOutStaNo(taskWrk.getOriginTargetPoint());
+ for (RgvSlave.RgvStn rgvStnOut : rgvSlave.getRgvOutSta()) {
+ if (rgvStnOut.getStaNo().equals(outStaNo)) {
+ sign = taskGenerate(rgvSlave, rgvStn, 0);
+ break;
+ }
+ }
+ }
+ break;
+ }
+ }
+ if (sign) {
+ break;
+ }
+ }
+ }
+ }
+ } catch (Exception e) {
+ log.error("浠诲姟鐢熸垚澶辫触===銆嬪紓甯镐俊鎭細{}", e.getMessage());
+ try{
+ DeviceErrorService deviceErrorService = SpringUtils.getBean(DeviceErrorService.class);
+ deviceErrorService.addDeviceError("rgvErr", rgvSlave.getId(), "鎸囦护鐢熸垚澶辫触");
+ } catch (Exception e2){
+ }
+ }
+ }
+ }
+
+ public String rgvOtherTaskWrk(RgvSlave slave) {
+
+ RgvThread rgvThread = (RgvThread) SlaveConnection.get(SlaveType.Rgv, slave.getOtherId());
+ TaskProtocolCache taskProtocolCache = rgvThread.getTaskProtocolCache();
+ ConcurrentHashMap<String, TaskProtocol> allTaskProtocol = taskProtocolCache.getAllTaskProtocol();
+ if (!allTaskProtocol.isEmpty()) {
+ for (TaskProtocol taskProtocol : allTaskProtocol.values()) {
+ if (taskProtocol.getTaskNo() != 0) {
+ return taskProtocol.getTaskNo().toString();
+ }
+ }
+ }
+ return "鏃�";
+
+ }
+
+ public boolean rgvDetection(RgvSlave slave) {
+ RgvProtocol rgvProtocol = RgvStatusCache.getRgvStatus(slave.getId());
+ RgvTaskProtocol rgvTaskProtocol = RgvTaskCache.getRgvStatus(slave.getId());
+
+ if (rgvProtocol == null || rgvTaskProtocol == null) {
+ return false;
+ }
+ if (!rgvProtocol.getModeType().equals(RgvModeType.AUTO) || rgvProtocol.getRgvPos().equals(0L) || rgvTaskProtocol.getAvoid() == -1
+ || ((!rgvProtocol.getStatusType().equals(RgvStatusType.IDLE) || (Math.abs(rgvProtocol.getRgvPos() - rgvProtocol.getRgvPosDestination())>100)) && !rgvProtocol.getStatusType().equals(RgvStatusType.ROAM))) {
+ return false;
+ }
+ if (rgvProtocol.getLoaded()==1){
+ return false;
+ }
+ RgvProtocol rgvProtocolOther = RgvStatusCache.getRgvStatus(slave.getOtherId());
+ RgvTaskProtocol rgvTaskProtocolOther = RgvTaskCache.getRgvStatus(slave.getOtherId());
+
+ if (rgvProtocolOther == null) {
+ return false;
+ }
+ if (rgvProtocolOther.statusEnable) {
+ if (!rgvProtocolOther.getModeType().equals(RgvModeType.AUTO) || rgvProtocolOther.getRgvPos().equals(0L) || rgvTaskProtocolOther.getAvoid() == -1 || rgvProtocolOther.getRgvPosDestination() == 0L) {
+ return false;
+ }
+ }
+ return true;
+ }
+ public boolean rgvOtherIDLEOther(RgvSlave slave) {
+ RgvProtocol rgvProtocol = RgvStatusCache.getRgvStatus(slave.getOtherId());
+ RgvTaskProtocol rgvTaskProtocol = RgvTaskCache.getRgvStatus(slave.getOtherId());
+
+ if (rgvProtocol == null || rgvTaskProtocol == null) {
+ return false;
+ }
+ if (!rgvProtocol.getModeType().equals(RgvModeType.AUTO) || rgvProtocol.getRgvPos().equals(0L) || rgvTaskProtocol.getAvoid() == -1
+ || ((!rgvProtocol.getStatusType().equals(RgvStatusType.IDLE) || (Math.abs(rgvProtocol.getRgvPos() - rgvProtocol.getRgvPosDestination())>100)) && !rgvProtocol.getStatusType().equals(RgvStatusType.ROAM))) {
+ return false;
+ }
+
+ if (rgvProtocol.getLoaded()!=0) {
+ return false;
+ }
+ return true;
+ }
+ public boolean rgvOtherIDLEOther2(RgvSlave slave) {
+ RgvProtocol rgvProtocol = RgvStatusCache.getRgvStatus(slave.getOtherId());
+ RgvTaskProtocol rgvTaskProtocol = RgvTaskCache.getRgvStatus(slave.getOtherId());
+
+ if (rgvProtocol == null || rgvTaskProtocol == null) {
+ return false;
+ }
+ if (!rgvProtocol.getModeType().equals(RgvModeType.AUTO)
+ || rgvProtocol.getRgvPos().equals(0L)
+ || rgvTaskProtocol.getAvoid() == -1) {
+ return false;
+ }
+
+ if (rgvProtocol.getLoaded()!=0) {
+ return false;
+ }
+ return true;
+ }
+ public boolean rgvOtherIDLE(RgvSlave slave,Integer staNo) {
+ RgvProtocol rgvProtocol = RgvStatusCache.getRgvStatus(slave.getId());
+ RgvTaskProtocol rgvTaskProtocol = RgvTaskCache.getRgvStatus(slave.getId());
+
+ if (rgvProtocol == null || rgvTaskProtocol == null) {
+ return false;
+ }
+ if (!rgvProtocol.getModeType().equals(RgvModeType.AUTO) || rgvProtocol.getRgvPos().equals(0L) || rgvTaskProtocol.getAvoid() == -1
+ || ((!rgvProtocol.getStatusType().equals(RgvStatusType.IDLE) || (Math.abs(rgvProtocol.getRgvPos() - rgvProtocol.getRgvPosDestination())>100)) && !rgvProtocol.getStatusType().equals(RgvStatusType.ROAM))) {
+ return false;
+ }
+ RgvProtocol rgvProtocolOther = RgvStatusCache.getRgvStatus(slave.getOtherId());
+
+ if (rgvProtocolOther == null) {
+ return true;
+ }
+ if (rgvProtocolOther.statusEnable) {
+ BasDevpPosition basDevpPosition = basDevpPositionService.selectOne(new EntityWrapper<BasDevpPosition>().eq("DEV_NO", staNo));
+ long abs = Math.abs(Math.abs(basDevpPosition.getPlcPosition() - rgvProtocol.getRgvPos())
+ -
+ Math.abs(basDevpPosition.getPlcPosition() - rgvProtocolOther.getRgvPos()));
+ if (abs<100){
+ return true;
+ }
+ if (Math.abs(basDevpPosition.getPlcPosition() - rgvProtocol.getRgvPos())
+ >=
+ Math.abs(basDevpPosition.getPlcPosition() - rgvProtocolOther.getRgvPos())){
+ return false;
+ }
+ }
+ return true;
+ }
+ public boolean rgvOtherIDLE2(RgvSlave slave,Integer staNo) {
+ RgvProtocol rgvProtocol = RgvStatusCache.getRgvStatus(slave.getId());
+ RgvTaskProtocol rgvTaskProtocol = RgvTaskCache.getRgvStatus(slave.getId());
+
+ if (rgvProtocol == null || rgvTaskProtocol == null) {
+ return false;
+ }
+ if (!rgvProtocol.getModeType().equals(RgvModeType.AUTO) || rgvProtocol.getRgvPos().equals(0L) || rgvTaskProtocol.getAvoid() == -1
+ || ((!rgvProtocol.getStatusType().equals(RgvStatusType.IDLE) || (Math.abs(rgvProtocol.getRgvPos() - rgvProtocol.getRgvPosDestination())>100)) && !rgvProtocol.getStatusType().equals(RgvStatusType.ROAM))) {
+ return false;
+ }
+ RgvProtocol rgvProtocolOther = RgvStatusCache.getRgvStatus(slave.getOtherId());
+
+ if (rgvProtocolOther == null) {
+ return true;
+ }
+ if (rgvProtocolOther.statusEnable) {
+ BasDevpPosition basDevpPosition = basDevpPositionService.selectOne(new EntityWrapper<BasDevpPosition>().eq("DEV_NO", staNo));
+ long abs = Math.abs(Math.abs(basDevpPosition.getPlcPosition() - rgvProtocol.getRgvPos())
+ -
+ Math.abs(basDevpPosition.getPlcPosition() - rgvProtocolOther.getRgvPos()));
+ if (abs<100){
+ return true;
+ }
+ if (Math.abs(basDevpPosition.getPlcPosition()-rgvProtocol.getRgvPos())
+ >=
+ Math.abs(basDevpPosition.getPlcPosition()-rgvProtocolOther.getRgvPos())){
+ return false;
+ }
+ }
+ return true;
+ }
+
+ public TaskWrk deviceDetection(RgvSlave.RgvStn inSta) {
+
+ DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, inSta.getDevpPlcId());
+ StaProtocol staProtocol = devpThread.getStation().get(inSta.getStaNo());
+ if (staProtocol == null) {
+ return null;
+ }
+ // 鍒ゆ柇鏄惁婊¤冻鍙栬揣鏉′欢
+ if (!staProtocol.isPakMkTask()) {
+ devpThread.setErrorDev(staProtocol.getSiteId(), "浠诲姟宸蹭笅鍙戠瓑寰呭皬杞﹀彇");
+ return null;
+ }
+ // 鍒ゆ柇鏄惁婊¤冻鍙栬揣鏉′欢
+ if (staProtocol.isAutoing()
+// && staProtocol.isLoading()
+// && staProtocol.isStaOk()
+ && staProtocol.getWorkNo() != 0) {
+ TaskWrk taskWrk = taskWrkService.selectByWrkNo(staProtocol.getWorkNo());
+ if (taskWrk != null) {
+ Integer stano = staProtocol.getStaNo().intValue();
+ if (staProtocol.getSiteId() == 1004 || staProtocol.getSiteId()==1020){
+ if (!staProtocol.isPakMkRun()) {
+ devpThread.setErrorDev(staProtocol.getSiteId(), "寮傚父鍥為��鏍囪锛岄渶瑕佸洖閫�");
+ return null;
+ }
+ if (!staProtocol.isLoading()) {
+ devpThread.setErrorDev(staProtocol.getSiteId(), "鏃犵墿");
+ return null;
+ }
+ if (!staProtocol.isInEnable()) {
+ devpThread.setErrorDev(staProtocol.getSiteId(), "绛夊緟鍙叆淇″彿");
+ return null;
+ }
+// if (!staProtocol.isStaOk()) {
+// devpThread.setErrorDev(staProtocol.getSiteId(), "绛夊緟閾炬潯灏辩华");
+// return null;
+// }
+ // 灏哄妫�娴嬪紓甯�
+ boolean back = false;
+ String errMsg = "-";
+ if (staProtocol.getGrossWt()>=600){
+ errMsg = "瓒呴噸锛�"+staProtocol.getGrossWt()+"kg";
+ back = true;
+ }
+ if (staProtocol.isFrontErr()) {
+ if (!back){
+ errMsg = "鍓嶈秴闄�";
+ } else {
+ errMsg = errMsg+"---"+"鍓嶈秴闄�";
+ }
+ back = true;
+ }
+ if (staProtocol.isBackErr()) {
+ if (!back){
+ errMsg = "鍚庤秴闄�";
+ } else {
+ errMsg = errMsg+"---"+"鍚庤秴闄�";
+ }
+ back = true;
+ }
+ if (staProtocol.isHighErr()) {
+ if (!back){
+ errMsg = "楂樿秴闄�";
+ } else {
+ errMsg = errMsg+"---"+"楂樿秴闄�";
+ }
+ back = true;
+ }
+ if (staProtocol.isLeftErr()) {
+ if (!back){
+ errMsg = "宸﹁秴闄�";
+ } else {
+ errMsg = errMsg+"---"+"宸﹁秴闄�";
+ }
+ back = true;
+ }
+ if (staProtocol.isRightErr()) {
+ if (!back){
+ errMsg = "鍙宠秴闄�";
+ } else {
+ errMsg = errMsg+"---"+"鍙宠秴闄�";
+ }
+ back = true;
+ }
+// if (!back && staProtocol.isWeightErr()) {
+// errMsg = "瓒呴噸";
+// back = true;
+// }
+ if (staProtocol.isBarcodeErr()) {
+ if (!back){
+ errMsg = "鎵爜澶辫触";
+ } else {
+ errMsg = errMsg+"---"+"鎵爜澶辫触";
+ }
+ back = true;
+ }
+ // 閫�鍥�
+ if (back) {
+ if (stano.equals(staProtocol.getStaNo() + 1)) {
+ return null;
+ }
+ if (!staProtocol.isPakMk()) {
+ return null;
+ }
+ System.out.println("鎵爜鍏ュ簱澶辫触锛寋"+inSta.getStaNo()+"}鍏ュ簱绔欏洜{"+errMsg+"}寮傚父锛屾墭鐩樺凡琚��鍥�");
+// News.warn("鎵爜鍏ュ簱澶辫触锛寋}鍏ュ簱绔欏洜{}寮傚父锛屾墭鐩樺凡琚��鍥�", inSta.getStaNo(), errMsg);
+ staProtocol.setWorkNo(9999);
+ int staNoInt = staProtocol.getStaNo() + 1;
+ staProtocol.setStaNo((short)staNoInt);
+ devpThread.setPakMk(staProtocol.getSiteId(), false);
+ devpThread.setPakMkRun(staProtocol.getSiteId(), false);
+ devpThread.setPakMkTask(staProtocol.getSiteId(), false);
+ devpThread.setErrorDev(staProtocol.getSiteId(), errMsg);
+ MessageQueue.offer(SlaveType.Devp, 1, new Task(2, staProtocol));
+ try{
+ taskWrk.setMemo(errMsg);//灏嗛敊璇爜瀛樺叆澶囨敞瀛楁杩涜灞曠ず
+ taskWrk.setModiTime(new Date());
+ taskWrkService.updateById(taskWrk);
+ } catch (Exception e){
+ devpThread.setErrorDev(staProtocol.getSiteId(), errMsg+"寮傚父淇℃伅淇濆瓨宸ヤ綔妗f澶辫触锛�");
+ }
+ return null;
+ }
+ }
+ return taskWrk;
+ }
+ } else if (staProtocol.isAutoing() && staProtocol.getWorkNo() == 0 && !staProtocol.isLoading()){
+ if (inSta.isDirectionOther()){
+ StaProtocol staProtocolOther = devpThread.getStation().get(inSta.getStaNoOther());
+ if (staProtocolOther == null) {
+ return null;
+ }
+ // 鍒ゆ柇鏄惁婊¤冻鍙栬揣鏉′欢
+ if (staProtocolOther.isAutoing()
+ && staProtocolOther.getWorkNo() != 0) {
+ TaskWrk taskWrkOther = taskWrkService.selectByWrkNo(staProtocolOther.getWorkNo());
+ if (taskWrkOther != null) {
+ return taskWrkOther;
+ }
+ }
+ }
+ }
+ return null;
+ }
+ public boolean deviceDetection(RgvSlave.RgvStn inSta,Integer rgvNo) {
+ ArrayList<Integer> arrayList = new ArrayList<Integer>() {{
+ add(1009);
+ add(1011);
+ add(1012);
+ add(1014);
+ add(1016);
+ }};
+ try{
+
+ DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, inSta.getDevpPlcId());
+ ArrayList<Integer> listW = new ArrayList<Integer>();
+ ArrayList<Integer> listL = new ArrayList<Integer>();
+ for (Integer staNo : arrayList){
+ StaProtocol staProtocol = devpThread.getStation().get(staNo);
+ if (staProtocol == null) {
+ RgvErrCache.updateRgvErr(rgvNo,staNo+"绔欑偣鏁版嵁涓㈠け");
+ return false;
+ }
+ // 鍒ゆ柇鏄惁婊¤冻鍙栬揣鏉′欢
+ if (staProtocol.getWorkNo() != 0) {
+ if (!listW.contains(staProtocol.getWorkNo())) {
+ listW.add(staProtocol.getWorkNo());
+ }
+ }
+ // 鍒ゆ柇鏄惁婊¤冻鍙栬揣鏉′欢
+ if (staProtocol.isLoading()) {
+ if (!listL.contains(staProtocol.getStaNo().intValue())) {
+ listL.add(staProtocol.getStaNo().intValue());
+ }
+ }
+ }
+ if (listW.size()>=3){
+ RgvErrCache.updateRgvErr(rgvNo,"绛夊緟1012鎷i�夛紝闃叉鍫靛");
+ return false;
+ }
+ if (listL.size()>=3){
+ RgvErrCache.updateRgvErr(rgvNo,"绛夊緟1012鎷i�夛紝闃叉鍫靛");
+ return false;
+ }
+ } catch (Exception e){
+ RgvErrCache.updateRgvErr(rgvNo,"1012妫�娴嬪紓甯革細"+e.getMessage());
+ return false;
+ }
+ return true;
+ }
+
+ public boolean rgvOtherStatusEnable(RgvSlave slave) {
+ RgvProtocol rgvProtocolOther = RgvStatusCache.getRgvStatus(slave.getOtherId());
+ if (rgvProtocolOther == null) {
+ return true;
+ }
+ if (rgvProtocolOther.statusEnable) {
+// if (!rgvProtocolOther.getModeType().equals(RgvModeType.AUTO) || rgvProtocolOther.getRgvPos().equals(0L)) {
+ return true;
+// }
+ }
+ return false;
+ }
+
+
+ public boolean taskGenerate(RgvSlave rgvSlave, RgvSlave.RgvStn rgvStn, Integer sign) {
+ try {
+ RgvThread rgvThread = (RgvThread) SlaveConnection.get(SlaveType.Rgv, rgvSlave.getId());
+ TaskProtocolCache taskProtocolCache = rgvThread.getTaskProtocolCache();
+ DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, rgvStn.getDevpPlcId());
+
+ TaskProtocol issuedTake = new TaskProtocol();
+ TaskProtocol issuedPut = new TaskProtocol();
+ try {
+ ConcurrentHashMap<String, TaskProtocol> allTaskProtocol = taskProtocolCache.getAllTaskProtocol();
+ if (allTaskProtocol.size() > 0) {
+ return false;
+ }
+ TaskWrk taskWrk = deviceDetection(rgvStn);
+ if (taskWrk == null) {
+ return false;
+ }
+// Integer targetPointConvert = taskWrk.getTargetPointConvert();
+ Integer targetPointConvert = BarcodeUtils.getOutStaNo(taskWrk.getOriginTargetPoint());
+ if (targetPointConvert == null) {
+ return false;
+ }
+ if (targetPointConvert == 1009){
+ if (!deviceDetection(rgvStn, rgvSlave.getId())){
+ return false;
+ }
+ }
+ try{
+ devpThread.setPakMkTask(rgvStn.getStaNo(), false);
+ } catch (Exception e2){
+ RgvErrCache.updateRgvErr(rgvSlave.getId(),rgvStn.getStaNo()+"灏忚溅浠诲姟涓嬪彂鏍囪鏇存柊澶辫触");
+ }
+
+
+ BasDevpPosition basDevpPositionSou = basDevpPositionService.selectOne(new EntityWrapper<BasDevpPosition>().eq("DEV_NO", rgvStn.getStaNo()));
+ BasDevpPosition basDevpPositionEnd = basDevpPositionService.selectOne(new EntityWrapper<BasDevpPosition>().eq("DEV_NO", targetPointConvert));
+ //鎵ц
+ issuedTake.setTaskNo(Long.valueOf(taskWrk.getWrkNo()));
+ issuedTake.setTaskStatus(2);
+ issuedTake.setTargetPositionStaNo(basDevpPositionSou.getDevNo());
+ issuedTake.setTargetPositionStaNoPlcId(basDevpPositionSou.getPlcId());
+ issuedTake.setTaskNoDirection(issuedTake.gettaskNoDirection$(issuedTake.getTaskNo(), issuedTake.getTaskStatus()));
+ issuedTake.setTargetPosition(basDevpPositionSou.getPlcPosition());
+ issuedTake.setIsRunning(1);
+ issuedTake.setDirection(basDevpPositionSou.getRgvSign()==1);
+
+
+ issuedPut.setTaskNo(Long.valueOf(taskWrk.getWrkNo()));
+ issuedPut.setTaskStatus(3);
+ issuedPut.setTargetPositionStaNo(basDevpPositionEnd.getDevNo());
+ issuedPut.setTargetPositionStaNoPlcId(basDevpPositionEnd.getPlcId());
+ issuedPut.setTaskNoDirection(issuedPut.gettaskNoDirection$(issuedPut.getTaskNo(), issuedPut.getTaskStatus()));
+ issuedPut.setTargetPosition(basDevpPositionEnd.getPlcPosition());
+ issuedPut.setIsRunning(1);
+ issuedPut.setDirection(basDevpPositionEnd.getRgvSign()==1);
+
+ try{
+ if (taskWrk.getIoType()==2 && basDevpPositionEnd.getRgvSign()==1){
+ Date now = new Date();
+ taskWrk.setStatus(TaskStatusType.OVER.id);
+ taskWrk.setModiTime(now);//鏇存柊鏃堕棿
+ taskWrk.setCompleteTime(now);//瀹岀粨鏃堕棿
+ taskWrkService.updateById(taskWrk);
+ }
+ } catch (Exception e){
+
+ }
+ } catch (Exception e) {
+ log.error("浠诲姟鐢熸垚澶辫触issued1===銆嬪紓甯镐俊鎭細{}", e.getMessage());
+ RgvErrCache.updateRgvErr(rgvSlave.getId(),rgvStn.getStaNo()+"绔欑偣浠诲姟鐢熸垚澶辫触issued1");
+
+ try{
+ DeviceErrorService deviceErrorService = SpringUtils.getBean(DeviceErrorService.class);
+ deviceErrorService.addDeviceError("rgvErr", rgvSlave.getId(), "浠诲姟鐢熸垚澶辫触issued1");
+ } catch (Exception e2){
+ }
+ return false;
+ }
+
+ switch (sign) {
+ case 1:
+ taskProtocolCache.updateTaskProtocol(issuedTake);
+ break;
+ case 2:
+ taskProtocolCache.updateTaskProtocol(issuedPut);
+ break;
+ default:
+ taskProtocolCache.updateTaskProtocol(issuedTake);
+ taskProtocolCache.updateTaskProtocol(issuedPut);
+ break;
+ }
+ } catch (Exception e) {
+ log.error("浠诲姟鐢熸垚澶辫触issued2===銆嬪紓甯镐俊鎭細{}", e.getMessage());
+ RgvErrCache.updateRgvErr(rgvSlave.getId(),rgvStn.getStaNo()+"绔欑偣浠诲姟鐢熸垚澶辫触issued2");
+
+ try{
+ DeviceErrorService deviceErrorService = SpringUtils.getBean(DeviceErrorService.class);
+ deviceErrorService.addDeviceError("rgvErr", rgvSlave.getId(), "绔欑偣浠诲姟鐢熸垚澶辫触issued2");
+ } catch (Exception e2){
+ }
+ }
+ return true;
+ }
}
--
Gitblit v1.9.1