丽水后端
This commit is contained in:
@@ -810,6 +810,10 @@ public class IndustryMaterialServiceImpl implements IIndustryMaterialService {
|
||||
*/
|
||||
@Override
|
||||
public void getMaterialData() {
|
||||
//打印leftId和rightId
|
||||
System.out.println("监测到id-leftId或者rightId");
|
||||
System.out.println("leftId:" + redisCache.getCacheObject("leftId"));
|
||||
System.out.println("rightId:" + redisCache.getCacheObject("rightId"));
|
||||
IndustryMaterial material = new IndustryMaterial();
|
||||
material.setState(1L);
|
||||
if (!industryMaterialMapper.selectIndustryMaterialList2(material).isEmpty()) {
|
||||
@@ -844,8 +848,11 @@ public class IndustryMaterialServiceImpl implements IIndustryMaterialService {
|
||||
|
||||
// 小于9则一直接受来料
|
||||
String industryMaterialId = s7PLC.readString("DB4.30", 64);
|
||||
System.out.println("industryMaterialId----------:" + industryMaterialId);
|
||||
|
||||
industryMaterialId = industryMaterialId.replace("\u0000", "");
|
||||
System.out.println("industryMaterialId----------:" + industryMaterialId);
|
||||
|
||||
// 读取是否有此id
|
||||
String leftId = redisCache.getCacheObject("leftId");
|
||||
// 不为空表示读到了
|
||||
@@ -878,6 +885,10 @@ public class IndustryMaterialServiceImpl implements IIndustryMaterialService {
|
||||
|
||||
String specification = s7PLC.readString("DB4.162", 128);
|
||||
specification = specification.replace("\u0000", "");
|
||||
System.out.println(" diameter:" + diameterLeft);
|
||||
System.out.println(" width:" + widthLeft);
|
||||
System.out.println(" technology:" + technology);
|
||||
System.out.println(" specification:" + specification);
|
||||
|
||||
industryMaterial.setDiameter(diameterLeft);
|
||||
industryMaterial.setTechnology(technology);
|
||||
@@ -902,12 +913,14 @@ public class IndustryMaterialServiceImpl implements IIndustryMaterialService {
|
||||
redisCache.setCacheObject("size", size);
|
||||
}
|
||||
|
||||
|
||||
System.out.println("sort:---" + sort);
|
||||
// 小于9则一直接受来料
|
||||
if (sort < 9L) {
|
||||
// industryMaterialId = (String) PLCUtils.getPLCData(connector,ipAddress, 44, 30, "string", 64, 10,MbFlag);
|
||||
industryMaterialId = s7PLC.readString("DB44.30", 64);
|
||||
System.out.println("industryMaterialId----------:" + industryMaterialId);
|
||||
industryMaterialId = industryMaterialId.replace("\u0000", "");
|
||||
System.out.println("industryMaterialId----------:" + industryMaterialId);
|
||||
// 读取是否有此id
|
||||
String rightId = (String) redisCache.getCacheObject("rightId");
|
||||
// 不为空表示读到了
|
||||
|
||||
Reference in New Issue
Block a user