|
@@ -27,10 +27,7 @@ import com.github.zuihou.business.operationManagementCenter.dao.TTaskMapper;
|
|
|
import com.github.zuihou.business.operationManagementCenter.entity.*;
|
|
|
import com.github.zuihou.business.operationManagementCenter.service.TaskNodeService;
|
|
|
import com.github.zuihou.business.operationManagementCenter.service.WorkpieceService;
|
|
|
-import com.github.zuihou.business.productionReadyCenter.dao.BBomMapper;
|
|
|
-import com.github.zuihou.business.productionReadyCenter.dao.BomProcedureMapper;
|
|
|
-import com.github.zuihou.business.productionReadyCenter.dao.BomProcedureProductionresourceMapper;
|
|
|
-import com.github.zuihou.business.productionReadyCenter.dao.BomProcedureTrayMapper;
|
|
|
+import com.github.zuihou.business.productionReadyCenter.dao.*;
|
|
|
import com.github.zuihou.business.productionReadyCenter.entity.*;
|
|
|
import com.github.zuihou.business.productionReadyCenter.service.BomProcedureService;
|
|
|
import com.github.zuihou.business.productionReadyCenter.service.BomProcedureTrayService;
|
|
@@ -61,6 +58,7 @@ import org.apache.poi.ss.formula.functions.T;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.http.HttpEntity;
|
|
|
import org.springframework.http.HttpHeaders;
|
|
|
import org.springframework.http.HttpMethod;
|
|
@@ -152,6 +150,15 @@ public class RobotNodeServiceImpl implements NodeOperationService {
|
|
|
@Autowired
|
|
|
private BomProcedureProductionresourceMapper bomProcedureProductionresourceMapper;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private BomProcedureProgramMapper bomProcedureProgramMapper;
|
|
|
+
|
|
|
+ @Value("${zuihou.file.storage-path}")
|
|
|
+ private String storagePath;
|
|
|
+
|
|
|
+ @Value("${zuihou.file.uriPrefix}")
|
|
|
+ private String uriPath;
|
|
|
+
|
|
|
private Map<String, Object> map = Maps.newHashMap();
|
|
|
|
|
|
private String ZK_ip_zlzx = "192.168.170.61";
|
|
@@ -790,14 +797,28 @@ public class RobotNodeServiceImpl implements NodeOperationService {
|
|
|
|
|
|
Map locationMap = new HashMap();
|
|
|
|
|
|
+ locationMap.put("location",targetStorge.getPointId());
|
|
|
+
|
|
|
if(taskNode.getTargetResourceId() !=null){
|
|
|
Productionresource productionresource = productionresourceBizMapper.selectOne(Wraps.<Productionresource>lbQ().eq(Productionresource::getId,taskNode.getTargetResourceId()));
|
|
|
if(!Objects.isNull(productionresource) && StringUtil.isNotEmpty(productionresource.getModeSpecification()) && productionresource.getModeSpecification().contains("HELLER")){
|
|
|
- locationMap.put("fileName","3");
|
|
|
+
|
|
|
+ List<BomProcedureProgram>procedureProgramList = bomProcedureProgramMapper.selectList(Wraps.<BomProcedureProgram>lbQ().eq(BomProcedureProgram::getProcedureId,task.getProcedureId()));
|
|
|
+
|
|
|
+ List<Map<String, String>> fileList = new ArrayList<Map<String, String>>();
|
|
|
+ if (procedureProgramList != null && procedureProgramList.size() > 0) {
|
|
|
+ //文件上传只允许单个文件
|
|
|
+ procedureProgramList.forEach(i -> {
|
|
|
+ Map<String, String> m = new HashMap<>();
|
|
|
+ String filePath = i.getFilePath().replace(uriPath, storagePath);
|
|
|
+ m.put("fileName", filePath.replace("/", "\\"));
|
|
|
+ fileList.add(m);
|
|
|
+ });
|
|
|
+ locationMap.put("fileName",fileList.get(0).get("fileName"));
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- locationMap.put("location",targetStorge.getPointId());
|
|
|
dataMap.put("data", locationMap);
|
|
|
|
|
|
dataMap.put("toStorge", targetStorge);
|