Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
Z
zhmes-agecal
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
耿迪迪
zhmes-agecal
Commits
2c4e694d
Commit
2c4e694d
authored
Jan 19, 2026
by
wanghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 上料 增加 收入或扫码 标检单号,提交后 更新实时数据标价单号
2 机械臂 指令 的 websocket 的 地址 调整成 可手动配置更改形式。
parent
c49d55f0
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
341 additions
and
104 deletions
+341
-104
ProductStandardInspectionController.java
...roller/equipment/ProductStandardInspectionController.java
+9
-0
ProductStandardInspection.java
...a/com/zehong/system/domain/ProductStandardInspection.java
+48
-50
RobotArmCommand.java
...c/main/java/com/zehong/system/domain/RobotArmCommand.java
+27
-15
PalletDeviceBindingMapper.java
...a/com/zehong/system/mapper/PalletDeviceBindingMapper.java
+2
-1
ProductStandardInspectionMapper.java
...zehong/system/mapper/ProductStandardInspectionMapper.java
+15
-8
IProductStandardInspectionService.java
...ong/system/service/IProductStandardInspectionService.java
+2
-0
ProductStandardInspectionServiceImpl.java
...em/service/impl/ProductStandardInspectionServiceImpl.java
+49
-0
RobotArmCommandServiceImpl.java
...ehong/system/service/impl/RobotArmCommandServiceImpl.java
+20
-5
PalletDeviceBindingMapper.xml
...ain/resources/mapper/system/PalletDeviceBindingMapper.xml
+4
-1
ProductStandardInspectionMapper.xml
...sources/mapper/system/ProductStandardInspectionMapper.xml
+29
-6
standardInspection.js
zhmes-agecal-web/src/api/system/standardInspection.js
+7
-0
ManualAutoSwitchRoboticArm.vue
...rc/views/screen/components/ManualAutoSwitchRoboticArm.vue
+57
-15
index.vue
zhmes-agecal-web/src/views/standardInspection/index.vue
+72
-3
No files found.
zhmes-agecal-admin/src/main/java/com/zehong/web/controller/equipment/ProductStandardInspectionController.java
View file @
2c4e694d
...
...
@@ -35,6 +35,15 @@ public class ProductStandardInspectionController extends BaseController
return
getDataTable
(
list
);
}
/**
* 查询
*/
@GetMapping
(
"/listDuringStandardInspection"
)
public
AjaxResult
listDuringStandardInspection
()
{
List
<
ProductStandardInspection
>
list
=
productStandardInspectionService
.
selectDuringStandardInspection
();
return
AjaxResult
.
success
(
list
);
}
/**
* 导出产品主体标检单列表
*/
...
...
zhmes-agecal-system/src/main/java/com/zehong/system/domain/ProductStandardInspection.java
View file @
2c4e694d
...
...
@@ -7,7 +7,7 @@ import com.zehong.common.core.domain.BaseEntity;
/**
* 产品主体标检单对象 t_product_standard_inspection
*
*
* @author zehong
* @date 2026-01-17
*/
...
...
@@ -26,16 +26,8 @@ public class ProductStandardInspection extends BaseEntity
@Excel
(
name
=
"主体标检单号"
)
private
String
productStandardInspectionNumber
;
/** 确认标检人 */
@Excel
(
name
=
"确认标检人"
)
private
String
confirmQualityInspector
;
/** 备注 */
@Excel
(
name
=
"备注"
)
private
String
remarks
;
/** 状态 (PENDING_STANDARD_INSPECTION-待标检;DURING_STANDARD_INSPECTION-标检中;STANDARD_INSPECTION_COMPLETED-标检完成) */
@Excel
(
name
=
"状态
(PENDING_STANDARD_INSPECTION-待标检;DURING_STANDARD_INSPECTION-标检中;STANDARD_INSPECTION_COMPLETED-标检完成)
"
)
@Excel
(
name
=
"状态
"
,
dictType
=
"standard_inspection_status
"
)
private
String
status
;
/** 报检部门 */
...
...
@@ -43,7 +35,6 @@ public class ProductStandardInspection extends BaseEntity
private
String
inspectionDep
;
/** 删除标志,默认0,删除1 */
@Excel
(
name
=
"删除标志,默认0,删除1"
)
private
Integer
deleteFlag
;
/** 物料名称 */
...
...
@@ -79,7 +70,7 @@ public class ProductStandardInspection extends BaseEntity
private
String
agingDuration
;
/** 标定气体 */
@Excel
(
name
=
"标定气体"
)
@Excel
(
name
=
"标定气体"
,
dictType
=
"calibration_gas"
)
private
String
calibrationGas
;
/** 报警值 */
...
...
@@ -90,174 +81,181 @@ public class ProductStandardInspection extends BaseEntity
@Excel
(
name
=
"量程"
)
private
String
range
;
public
void
setProductStandardInspectionId
(
Long
productStandardInspectionId
)
/** 确认标检人 */
@Excel
(
name
=
"确认标检人"
)
private
String
confirmQualityInspector
;
/** 备注 */
@Excel
(
name
=
"备注"
)
private
String
remarks
;
public
void
setProductStandardInspectionId
(
Long
productStandardInspectionId
)
{
this
.
productStandardInspectionId
=
productStandardInspectionId
;
}
public
Long
getProductStandardInspectionId
()
public
Long
getProductStandardInspectionId
()
{
return
productStandardInspectionId
;
}
public
void
setOutStoreOrderNumber
(
String
outStoreOrderNumber
)
public
void
setOutStoreOrderNumber
(
String
outStoreOrderNumber
)
{
this
.
outStoreOrderNumber
=
outStoreOrderNumber
;
}
public
String
getOutStoreOrderNumber
()
public
String
getOutStoreOrderNumber
()
{
return
outStoreOrderNumber
;
}
public
void
setProductStandardInspectionNumber
(
String
productStandardInspectionNumber
)
public
void
setProductStandardInspectionNumber
(
String
productStandardInspectionNumber
)
{
this
.
productStandardInspectionNumber
=
productStandardInspectionNumber
;
}
public
String
getProductStandardInspectionNumber
()
public
String
getProductStandardInspectionNumber
()
{
return
productStandardInspectionNumber
;
}
public
void
setConfirmQualityInspector
(
String
confirmQualityInspector
)
public
void
setConfirmQualityInspector
(
String
confirmQualityInspector
)
{
this
.
confirmQualityInspector
=
confirmQualityInspector
;
}
public
String
getConfirmQualityInspector
()
public
String
getConfirmQualityInspector
()
{
return
confirmQualityInspector
;
}
public
void
setRemarks
(
String
remarks
)
public
void
setRemarks
(
String
remarks
)
{
this
.
remarks
=
remarks
;
}
public
String
getRemarks
()
public
String
getRemarks
()
{
return
remarks
;
}
public
void
setStatus
(
String
status
)
public
void
setStatus
(
String
status
)
{
this
.
status
=
status
;
}
public
String
getStatus
()
public
String
getStatus
()
{
return
status
;
}
public
void
setInspectionDep
(
String
inspectionDep
)
public
void
setInspectionDep
(
String
inspectionDep
)
{
this
.
inspectionDep
=
inspectionDep
;
}
public
String
getInspectionDep
()
public
String
getInspectionDep
()
{
return
inspectionDep
;
}
public
void
setDeleteFlag
(
Integer
deleteFlag
)
public
void
setDeleteFlag
(
Integer
deleteFlag
)
{
this
.
deleteFlag
=
deleteFlag
;
}
public
Integer
getDeleteFlag
()
public
Integer
getDeleteFlag
()
{
return
deleteFlag
;
}
public
void
setMaterialName
(
String
materialName
)
public
void
setMaterialName
(
String
materialName
)
{
this
.
materialName
=
materialName
;
}
public
String
getMaterialName
()
public
String
getMaterialName
()
{
return
materialName
;
}
public
void
setMaterialCode
(
String
materialCode
)
public
void
setMaterialCode
(
String
materialCode
)
{
this
.
materialCode
=
materialCode
;
}
public
String
getMaterialCode
()
public
String
getMaterialCode
()
{
return
materialCode
;
}
public
void
setSpecification
(
String
specification
)
public
void
setSpecification
(
String
specification
)
{
this
.
specification
=
specification
;
}
public
String
getSpecification
()
public
String
getSpecification
()
{
return
specification
;
}
public
void
setIssuedNum
(
Long
issuedNum
)
public
void
setIssuedNum
(
Long
issuedNum
)
{
this
.
issuedNum
=
issuedNum
;
}
public
Long
getIssuedNum
()
public
Long
getIssuedNum
()
{
return
issuedNum
;
}
public
void
setQuantity
(
Long
quantity
)
public
void
setQuantity
(
Long
quantity
)
{
this
.
quantity
=
quantity
;
}
public
Long
getQuantity
()
public
Long
getQuantity
()
{
return
quantity
;
}
public
void
setQualifiedNum
(
Long
qualifiedNum
)
public
void
setQualifiedNum
(
Long
qualifiedNum
)
{
this
.
qualifiedNum
=
qualifiedNum
;
}
public
Long
getQualifiedNum
()
public
Long
getQualifiedNum
()
{
return
qualifiedNum
;
}
public
void
setUnQualifiedNum
(
Long
unQualifiedNum
)
public
void
setUnQualifiedNum
(
Long
unQualifiedNum
)
{
this
.
unQualifiedNum
=
unQualifiedNum
;
}
public
Long
getUnQualifiedNum
()
public
Long
getUnQualifiedNum
()
{
return
unQualifiedNum
;
}
public
void
setAgingDuration
(
String
agingDuration
)
public
void
setAgingDuration
(
String
agingDuration
)
{
this
.
agingDuration
=
agingDuration
;
}
public
String
getAgingDuration
()
public
String
getAgingDuration
()
{
return
agingDuration
;
}
public
void
setCalibrationGas
(
String
calibrationGas
)
public
void
setCalibrationGas
(
String
calibrationGas
)
{
this
.
calibrationGas
=
calibrationGas
;
}
public
String
getCalibrationGas
()
public
String
getCalibrationGas
()
{
return
calibrationGas
;
}
public
void
setAlarmValue
(
String
alarmValue
)
public
void
setAlarmValue
(
String
alarmValue
)
{
this
.
alarmValue
=
alarmValue
;
}
public
String
getAlarmValue
()
public
String
getAlarmValue
()
{
return
alarmValue
;
}
public
void
setRange
(
String
range
)
public
void
setRange
(
String
range
)
{
this
.
range
=
range
;
}
public
String
getRange
()
public
String
getRange
()
{
return
range
;
}
...
...
zhmes-agecal-system/src/main/java/com/zehong/system/domain/RobotArmCommand.java
View file @
2c4e694d
...
...
@@ -9,7 +9,7 @@ import com.zehong.common.core.domain.BaseEntity;
/**
* 机械臂指令对象 t_robot_arm_command
*
*
* @author zehong
* @date 2025-08-04
*/
...
...
@@ -28,6 +28,9 @@ public class RobotArmCommand extends BaseEntity
@Excel
(
name
=
"绑定层编号"
)
private
String
storeyCode
;
/** 产品标准检验编号 */
private
String
productStandardInspectionNumber
;
/** 类型:0-待上料;1-待下料 */
@Excel
(
name
=
"类型:0-待上料;1-待下料"
)
private
String
type
;
...
...
@@ -50,66 +53,66 @@ public class RobotArmCommand extends BaseEntity
private
String
command
;
public
void
setRobotArmCommandId
(
Long
robotArmCommandId
)
public
void
setRobotArmCommandId
(
Long
robotArmCommandId
)
{
this
.
robotArmCommandId
=
robotArmCommandId
;
}
public
Long
getRobotArmCommandId
()
public
Long
getRobotArmCommandId
()
{
return
robotArmCommandId
;
}
public
void
setTrayCode
(
String
trayCode
)
public
void
setTrayCode
(
String
trayCode
)
{
this
.
trayCode
=
trayCode
;
}
public
String
getTrayCode
()
public
String
getTrayCode
()
{
return
trayCode
;
}
public
void
setStoreyCode
(
String
storeyCode
)
public
void
setStoreyCode
(
String
storeyCode
)
{
this
.
storeyCode
=
storeyCode
;
}
public
String
getStoreyCode
()
public
String
getStoreyCode
()
{
return
storeyCode
;
}
public
void
setType
(
String
type
)
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
public
String
getType
()
public
String
getType
()
{
return
type
;
}
public
void
setStatus
(
String
status
)
public
void
setStatus
(
String
status
)
{
this
.
status
=
status
;
}
public
String
getStatus
()
public
String
getStatus
()
{
return
status
;
}
public
void
setStartExecutionTime
(
Date
startExecutionTime
)
public
void
setStartExecutionTime
(
Date
startExecutionTime
)
{
this
.
startExecutionTime
=
startExecutionTime
;
}
public
Date
getStartExecutionTime
()
public
Date
getStartExecutionTime
()
{
return
startExecutionTime
;
}
public
void
setEndExecutionTime
(
Date
endExecutionTime
)
public
void
setEndExecutionTime
(
Date
endExecutionTime
)
{
this
.
endExecutionTime
=
endExecutionTime
;
}
public
Date
getEndExecutionTime
()
public
Date
getEndExecutionTime
()
{
return
endExecutionTime
;
}
...
...
@@ -122,6 +125,14 @@ public class RobotArmCommand extends BaseEntity
this
.
command
=
command
;
}
public
String
getProductStandardInspectionNumber
()
{
return
productStandardInspectionNumber
;
}
public
void
setProductStandardInspectionNumber
(
String
productStandardInspectionNumber
)
{
this
.
productStandardInspectionNumber
=
productStandardInspectionNumber
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
...
...
@@ -134,6 +145,7 @@ public class RobotArmCommand extends BaseEntity
.
append
(
"endExecutionTime"
,
getEndExecutionTime
())
.
append
(
"createTime"
,
getCreateTime
())
.
append
(
"command"
,
getCommand
())
.
append
(
"productStandardInspectionNumber"
,
getProductStandardInspectionNumber
())
.
toString
();
}
}
zhmes-agecal-system/src/main/java/com/zehong/system/mapper/PalletDeviceBindingMapper.java
View file @
2c4e694d
...
...
@@ -28,7 +28,8 @@ public interface PalletDeviceBindingMapper
*/
public
PalletDeviceBinding
selectByTrayIdAndIndex
(
@Param
(
"ip"
)
String
ip
,
@Param
(
"index"
)
Integer
index
);
public
void
updateStoreCodeByTrayId
(
@Param
(
"fTrayId"
)
Long
fTrayId
,
@Param
(
"storeCode"
)
String
storeCode
);
public
void
updateStoreCodeByTrayId
(
@Param
(
"fTrayId"
)
Long
fTrayId
,
@Param
(
"storeCode"
)
String
storeCode
,
@Param
(
"productStandardInspectionNumber"
)
String
productStandardInspectionNumber
);
/**
* 查询托盘绑定的设备列列表
...
...
zhmes-agecal-system/src/main/java/com/zehong/system/mapper/ProductStandardInspectionMapper.java
View file @
2c4e694d
...
...
@@ -2,42 +2,49 @@ package com.zehong.system.mapper;
import
java.util.List
;
import
com.zehong.system.domain.ProductStandardInspection
;
import
org.apache.ibatis.annotations.Param
;
/**
* 产品主体标检单Mapper接口
*
*
* @author zehong
* @date 2026-01-17
*/
public
interface
ProductStandardInspectionMapper
public
interface
ProductStandardInspectionMapper
{
/**
* 查询产品主体标检单
*
*
* @param productStandardInspectionId 产品主体标检单ID
* @return 产品主体标检单
*/
public
ProductStandardInspection
selectProductStandardInspectionById
(
Long
productStandardInspectionId
);
public
ProductStandardInspection
selectByNumber
(
String
number
);
/**
* 查询产品主体标检单列表
*
*
* @param productStandardInspection 产品主体标检单
* @return 产品主体标检单集合
*/
public
List
<
ProductStandardInspection
>
selectProductStandardInspectionList
(
ProductStandardInspection
productStandardInspection
);
public
List
<
ProductStandardInspection
>
selectDuringStandardInspection
();
/**
* 新增产品主体标检单
*
*
* @param productStandardInspection 产品主体标检单
* @return 结果
*/
public
int
insertProductStandardInspection
(
ProductStandardInspection
productStandardInspection
);
public
int
batchInsert
(
@Param
(
"list"
)
List
<
ProductStandardInspection
>
list
);
/**
* 修改产品主体标检单
*
*
* @param productStandardInspection 产品主体标检单
* @return 结果
*/
...
...
@@ -45,7 +52,7 @@ public interface ProductStandardInspectionMapper
/**
* 删除产品主体标检单
*
*
* @param productStandardInspectionId 产品主体标检单ID
* @return 结果
*/
...
...
@@ -53,7 +60,7 @@ public interface ProductStandardInspectionMapper
/**
* 批量删除产品主体标检单
*
*
* @param productStandardInspectionIds 需要删除的数据ID
* @return 结果
*/
...
...
zhmes-agecal-system/src/main/java/com/zehong/system/service/IProductStandardInspectionService.java
View file @
2c4e694d
...
...
@@ -27,6 +27,8 @@ public interface IProductStandardInspectionService
*/
public
List
<
ProductStandardInspection
>
selectProductStandardInspectionList
(
ProductStandardInspection
productStandardInspection
);
public
List
<
ProductStandardInspection
>
selectDuringStandardInspection
();
/**
* 同步MES数据
*/
...
...
zhmes-agecal-system/src/main/java/com/zehong/system/service/impl/ProductStandardInspectionServiceImpl.java
View file @
2c4e694d
package
com
.
zehong
.
system
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.zehong.common.constant.RoboticArmConstans
;
import
com.zehong.common.core.redis.RedisCache
;
...
...
@@ -17,6 +18,7 @@ import org.slf4j.LoggerFactory;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -67,6 +69,23 @@ public class ProductStandardInspectionServiceImpl implements IProductStandardIns
return
productStandardInspectionMapper
.
selectProductStandardInspectionList
(
productStandardInspection
);
}
/**
* 查询产品主体标检单列表
*
* @return 查询 标检中 产品主体标检单
*/
@Override
public
List
<
ProductStandardInspection
>
selectDuringStandardInspection
()
{
List
<
ProductStandardInspection
>
productStandardInspections
=
productStandardInspectionMapper
.
selectDuringStandardInspection
();
if
(
productStandardInspections
==
null
||
productStandardInspections
.
size
()
==
0
)
{
return
new
ArrayList
<>();
}
return
productStandardInspections
;
}
/**
* 同步MES数据
*/
...
...
@@ -186,6 +205,36 @@ public class ProductStandardInspectionServiceImpl implements IProductStandardIns
// 这里只是示例,具体实现根据您的业务逻辑
try
{
JSONObject
jsonData
=
JSON
.
parseObject
(
data
);
if
(
jsonData
.
containsKey
(
"data"
))
{
JSONArray
dataArray
=
jsonData
.
getJSONArray
(
"data"
);
List
<
ProductStandardInspection
>
productStandardInspections
=
new
ArrayList
<>();
ProductStandardInspection
productStandardInspection
;
for
(
int
i
=
0
;
i
<
dataArray
.
size
();
i
++)
{
JSONObject
item
=
dataArray
.
getJSONObject
(
i
);
productStandardInspection
=
new
ProductStandardInspection
();
productStandardInspection
.
setProductStandardInspectionNumber
(
item
.
getString
(
"productStandardInspectionNumber"
)
==
null
?
""
:
item
.
getString
(
"productStandardInspectionNumber"
));
productStandardInspection
.
setOutStoreOrderNumber
(
item
.
getString
(
"outStoreOrderNumber"
)
==
null
?
""
:
item
.
getString
(
"outStoreOrderNumber"
));
productStandardInspection
.
setInspectionDep
(
"生产车间"
);
productStandardInspection
.
setMaterialName
(
item
.
getString
(
"materialName"
)
==
null
?
""
:
item
.
getString
(
"materialName"
));
productStandardInspection
.
setMaterialCode
(
item
.
getString
(
"materialCode"
)
==
null
?
""
:
item
.
getString
(
"materialCode"
));
productStandardInspection
.
setSpecification
(
item
.
getString
(
"specification"
)
==
null
?
""
:
item
.
getString
(
"specification"
));
productStandardInspection
.
setIssuedNum
(
item
.
getLong
(
"issuedNum"
)
==
null
?
0
:
item
.
getLong
(
"issuedNum"
));
productStandardInspection
.
setQuantity
(
item
.
getLong
(
"quantity"
)
==
null
?
0
:
item
.
getLong
(
"quantity"
));
productStandardInspection
.
setAgingDuration
(
item
.
getString
(
"agingDuration"
)
==
null
?
""
:
item
.
getString
(
"agingDuration"
));
productStandardInspection
.
setCalibrationGas
(
item
.
getString
(
"calibrationGas"
)
==
null
?
""
:
item
.
getString
(
"calibrationGas"
));
productStandardInspection
.
setAlarmValue
(
item
.
getString
(
"alarmValue"
)
==
null
?
""
:
item
.
getString
(
"alarmValue"
));
productStandardInspection
.
setRange
(
item
.
getString
(
"range"
)
==
null
?
""
:
item
.
getString
(
"range"
));
productStandardInspection
.
setCreateBy
(
item
.
getString
(
"createBy"
)
==
null
?
""
:
item
.
getString
(
"createBy"
));
productStandardInspection
.
setStatus
(
"DURING_STANDARD_INSPECTION"
);
productStandardInspection
.
setRemarks
(
item
.
getString
(
"remarks"
)
==
null
?
""
:
item
.
getString
(
"remarks"
));
productStandardInspections
.
add
(
productStandardInspection
);
}
if
(
productStandardInspections
.
size
()
>
0
)
{
productStandardInspectionMapper
.
batchInsert
(
productStandardInspections
);
}
}
// 处理数据逻辑...
logger
.
debug
(
"接收到MES数据:{}"
,
jsonData
);
}
catch
(
Exception
e
)
{
...
...
zhmes-agecal-system/src/main/java/com/zehong/system/service/impl/RobotArmCommandServiceImpl.java
View file @
2c4e694d
...
...
@@ -78,6 +78,9 @@ public class RobotArmCommandServiceImpl implements IRobotArmCommandService
@Resource
private
IConveyorBeltIpMaintainService
iConveyorBeltIpMaintainService
;
@Resource
private
ProductStandardInspectionMapper
productStandardInspectionMapper
;
@Resource
private
RedisCache
redisCache
;
private
SocketAddress
getRobotAddress
()
{
...
...
@@ -452,10 +455,17 @@ public class RobotArmCommandServiceImpl implements IRobotArmCommandService
robotArmCommand
.
setCreateTime
(
DateUtils
.
getNowDate
());
if
(
StringUtils
.
isBlank
(
robotArmCommand
.
getTrayCode
())
||
StringUtils
.
isBlank
(
robotArmCommand
.
getStoreyCode
()))
{
if
(
StringUtils
.
isBlank
(
robotArmCommand
.
getTrayCode
())
||
StringUtils
.
isBlank
(
robotArmCommand
.
getStoreyCode
())
||
StringUtils
.
isBlank
(
robotArmCommand
.
getProductStandardInspectionNumber
()))
{
throw
new
RuntimeException
(
"托盘编号和层编号不能为空"
);
}
ProductStandardInspection
productStandardInspection
=
productStandardInspectionMapper
.
selectByNumber
(
robotArmCommand
.
getProductStandardInspectionNumber
());
if
(
productStandardInspection
==
null
)
{
throw
new
RuntimeException
(
"标检单不存在"
);
}
TTrayInfo
tTrayInfo
=
tTrayInfoMapper
.
selectTTrayInfoByCode
(
robotArmCommand
.
getTrayCode
());
if
(
tTrayInfo
==
null
)
{
...
...
@@ -496,7 +506,7 @@ public class RobotArmCommandServiceImpl implements IRobotArmCommandService
storeyInfoMapper
.
updateStatusByCode
(
tStoreyInfo
);
// 20260108 新加的把绑定层编号设置到实时数据上
palletDeviceBindingMapper
.
updateStoreCodeByTrayId
(
tTrayInfo
.
getfTrayId
(),
tStoreyInfo
.
getfStoreyCode
());
palletDeviceBindingMapper
.
updateStoreCodeByTrayId
(
tTrayInfo
.
getfTrayId
(),
tStoreyInfo
.
getfStoreyCode
()
,
robotArmCommand
.
getProductStandardInspectionNumber
()
);
int
i
=
robotArmCommandMapper
.
insertRobotArmCommand
(
robotArmCommand
);
notifyCommandsUpdate
();
...
...
@@ -515,8 +525,13 @@ public class RobotArmCommandServiceImpl implements IRobotArmCommandService
{
robotArmCommand
.
setCreateTime
(
DateUtils
.
getNowDate
());
if
(
StringUtils
.
isBlank
(
robotArmCommand
.
getTrayCode
()))
{
throw
new
RuntimeException
(
"托盘编号不能为空"
);
if
(
StringUtils
.
isBlank
(
robotArmCommand
.
getTrayCode
())
||
StringUtils
.
isBlank
(
robotArmCommand
.
getProductStandardInspectionNumber
()))
{
throw
new
RuntimeException
(
"托盘编号 或 标检单号 不能为空"
);
}
ProductStandardInspection
productStandardInspection
=
productStandardInspectionMapper
.
selectByNumber
(
robotArmCommand
.
getProductStandardInspectionNumber
());
if
(
productStandardInspection
==
null
)
{
throw
new
RuntimeException
(
"标检单不存在"
);
}
TTrayInfo
tTrayInfo
=
tTrayInfoMapper
.
selectTTrayInfoByCode
(
robotArmCommand
.
getTrayCode
());
...
...
@@ -550,7 +565,7 @@ public class RobotArmCommandServiceImpl implements IRobotArmCommandService
storeyInfoMapper
.
updateStatusByCode
(
tStoreyInfo
);
// 20260108 新加的把绑定层编号设置到实时数据上
palletDeviceBindingMapper
.
updateStoreCodeByTrayId
(
tTrayInfo
.
getfTrayId
(),
tStoreyInfo
.
getfStoreyCode
());
palletDeviceBindingMapper
.
updateStoreCodeByTrayId
(
tTrayInfo
.
getfTrayId
(),
tStoreyInfo
.
getfStoreyCode
()
,
robotArmCommand
.
getProductStandardInspectionNumber
()
);
}
else
{
robotArmCommand
.
setStoreyCode
(
"待分配位置"
);
...
...
zhmes-agecal-system/src/main/resources/mapper/system/PalletDeviceBindingMapper.xml
View file @
2c4e694d
...
...
@@ -216,7 +216,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</insert>
<update
id=
"updateStoreCodeByTrayId"
>
update t_pallet_device_binding set f_storey_code = #{storeCode} where f_tray_id = #{fTrayId}
update t_pallet_device_binding
set f_storey_code = #{storeCode},
f_product_standard_inspection_number = #{productStandardInspectionNumber}
where f_tray_id = #{fTrayId}
</update>
<update
id=
"resetAll"
parameterType=
"long"
>
update t_pallet_device_binding
...
...
zhmes-agecal-system/src/main/resources/mapper/system/ProductStandardInspectionMapper.xml
View file @
2c4e694d
...
...
@@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.zehong.system.mapper.ProductStandardInspectionMapper"
>
<resultMap
type=
"ProductStandardInspection"
id=
"ProductStandardInspectionResult"
>
<result
property=
"productStandardInspectionId"
column=
"f_product_standard_inspection_id"
/>
<result
property=
"outStoreOrderNumber"
column=
"f_out_store_order_number"
/>
...
...
@@ -32,9 +32,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select f_product_standard_inspection_id, f_out_store_order_number, f_product_standard_inspection_number, f_confirm_quality_inspector, f_remarks, f_status, f_create_by, f_inspection_dep, f_create_time, f_delete_flag, f_material_name, f_material_code, f_specification, f_issued_num, f_quantity, f_qualified_num, f_un_qualified_num, f_aging_duration, f_calibration_gas, f_alarm_value, f_range from t_product_standard_inspection
</sql>
<select
id=
"selectDuringStandardInspection"
resultMap=
"ProductStandardInspectionResult"
>
<include
refid=
"selectProductStandardInspectionVo"
/>
where f_status = 'DURING_STANDARD_INSPECTION'
</select>
<select
id=
"selectProductStandardInspectionList"
parameterType=
"ProductStandardInspection"
resultMap=
"ProductStandardInspectionResult"
>
<include
refid=
"selectProductStandardInspectionVo"
/>
<where>
<where>
<if
test=
"outStoreOrderNumber != null and outStoreOrderNumber != ''"
>
and f_out_store_order_number = #{outStoreOrderNumber}
</if>
<if
test=
"productStandardInspectionNumber != null and productStandardInspectionNumber != ''"
>
and f_product_standard_inspection_number = #{productStandardInspectionNumber}
</if>
<if
test=
"confirmQualityInspector != null and confirmQualityInspector != ''"
>
and f_confirm_quality_inspector = #{confirmQualityInspector}
</if>
...
...
@@ -57,12 +61,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"range != null and range != ''"
>
and f_range = #{range}
</if>
</where>
</select>
<select
id=
"selectProductStandardInspectionById"
parameterType=
"Long"
resultMap=
"ProductStandardInspectionResult"
>
<include
refid=
"selectProductStandardInspectionVo"
/>
where f_product_standard_inspection_id = #{productStandardInspectionId}
</select>
<select
id=
"selectByNumber"
parameterType=
"string"
resultMap=
"ProductStandardInspectionResult"
>
<include
refid=
"selectProductStandardInspectionVo"
/>
where f_product_standard_inspection_number = #{productStandardInspectionNumber}
</select>
<insert
id=
"batchInsert"
parameterType=
"list"
>
insert into t_product_standard_inspection (f_product_standard_inspection_number, f_out_store_order_number,
f_confirm_quality_inspector,f_remarks,f_status,f_create_by,f_inspection_dep,
f_material_name,f_material_code,f_specification,f_issued_num,f_quantity,f_aging_duration,
f_calibration_gas,f_alarm_value,f_range)
values
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator=
","
>
(
#{item.productStandardInspectionNumber}, #{item.outStoreOrderNumber}, #{item.confirmQualityInspector},
#{item.remarks}, #{item.status}, #{item.createBy}, #{item.inspectionDep}, #{item.materialName},
#{item.materialCode}, #{item.specification}, #{item.issuedNum}, #{item.quantity}, #{item.agingDuration},
#{item.calibrationGas}, #{item.alarmValue}, #{item.range}
)
</foreach>
</insert>
<insert
id=
"insertProductStandardInspection"
parameterType=
"ProductStandardInspection"
useGeneratedKeys=
"true"
keyProperty=
"productStandardInspectionId"
>
insert into t_product_standard_inspection
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
...
...
@@ -143,9 +166,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete
id=
"deleteProductStandardInspectionByIds"
parameterType=
"String"
>
delete from t_product_standard_inspection where f_product_standard_inspection_id in
delete from t_product_standard_inspection where f_product_standard_inspection_id in
<foreach
item=
"productStandardInspectionId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{productStandardInspectionId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
</mapper>
zhmes-agecal-web/src/api/system/standardInspection.js
View file @
2c4e694d
...
...
@@ -58,3 +58,10 @@ export function syncMESData() {
method
:
'get'
})
}
export
function
listDuringStandardInspection
()
{
return
request
({
url
:
'/system/inspection/listDuringStandardInspection'
,
method
:
'get'
})
}
zhmes-agecal-web/src/views/screen/components/ManualAutoSwitchRoboticArm.vue
View file @
2c4e694d
...
...
@@ -68,13 +68,22 @@
<div
class=
"dialog-content"
>
<div
class=
"scan-prompt"
>
请扫描托盘二维码
</div>
<div
class=
"mode-indicator"
>
自动模式 - 系统自动分配位置
</div>
<div
class=
"scan-input"
>
<div
class=
"input-group"
>
<label
for=
"trayCode"
>
标检单号:
</label>
<input
type=
"text"
v-model=
"productStandardInspectionNumber"
placeholder=
"手动输入或扫码标检单号"
ref=
"productStandardInspectionNumberInput"
>
</div>
<div
class=
"input-group"
>
<label
for=
"trayCode"
>
托盘编号:
</label>
<input
type=
"text"
v-model=
"trayCode"
placeholder=
"手动输入或扫码"
ref=
"trayInput"
@
keyup
.
enter=
"confirmAutoAdd"
>
</div>
</div>
...
...
@@ -96,6 +105,16 @@
<div
class=
"mode-indicator"
>
手动模式 - 需要指定层编号
</div>
<div
class=
"manual-inputs"
>
<div
class=
"input-group"
>
<label
for=
"trayCode"
>
标检单号:
</label>
<input
type=
"text"
v-model=
"productStandardInspectionNumber"
placeholder=
"手动输入或扫码标检单号"
ref=
"manualStandardInput"
>
</div>
<div
class=
"input-group"
>
<label
for=
"trayCode"
>
托盘编号:
</label>
<input
...
...
@@ -103,7 +122,6 @@
type=
"text"
v-model=
"manualTrayCode"
placeholder=
"输入托盘编号"
ref=
"manualTrayInput"
>
</div>
...
...
@@ -113,7 +131,7 @@
id=
"storeyCode"
type=
"text"
v-model=
"storeyCode"
placeholder=
"输入层编号(如:
A01, B02
)"
placeholder=
"输入层编号(如:
1-1, 12-3
)"
>
</div>
</div>
...
...
@@ -268,6 +286,7 @@ export default {
manualTrayCode
:
''
,
storeyCode
:
''
,
trayType
:
'0'
,
// 0: 上料托盘, 1: 下料托盘
productStandardInspectionNumber
:
''
,
loadingCommands
:
[],
unloadingCommands
:
[],
...
...
@@ -276,7 +295,8 @@ export default {
showPowerOnDialog
:
false
,
showSureCompleteDialog
:
false
,
selectedCommand
:
null
,
priority
:
'loading'
// loading: 上料优先, unloading: 下料优先
priority
:
'loading'
,
// loading: 上料优先, unloading: 下料优先
initWebSocketIp
:
''
,
};
},
computed
:
{
...
...
@@ -304,7 +324,14 @@ export default {
}
},
mounted
()
{
this
.
initWebSocket
();
this
.
getConfigKey
(
"initWebSocketIp"
).
then
(
response
=>
{
if
(
response
.
msg
!==
null
&&
response
.
msg
!==
''
)
{
this
.
initWebSocketIp
=
response
.
msg
;
}
else
{
this
.
initWebSocketIp
=
'127.0.0.1:8087'
;
}
this
.
initWebSocket
();
})
},
beforeDestroy
()
{
this
.
disconnectWebSocket
();
...
...
@@ -313,18 +340,20 @@ export default {
showAutoAddDialog
(
val
)
{
if
(
val
)
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
tray
Input
.
focus
();
this
.
$refs
.
productStandardInspectionNumber
Input
.
focus
();
});
}
else
{
this
.
productStandardInspectionNumber
=
''
;
this
.
trayCode
=
''
;
}
},
showManualAddDialog
(
val
)
{
if
(
val
)
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
manual
Tray
Input
.
focus
();
this
.
$refs
.
manual
Standard
Input
.
focus
();
});
}
else
{
this
.
productStandardInspectionNumber
=
''
;
this
.
manualTrayCode
=
''
;
this
.
storeyCode
=
''
;
this
.
trayType
=
'0'
;
...
...
@@ -332,6 +361,7 @@ export default {
}
},
methods
:
{
// 打开上料模式选择对话框
openAddModeDialog
()
{
this
.
showModeDialog
=
true
;
...
...
@@ -355,6 +385,7 @@ export default {
// 关闭自动模式对话框
closeAutoDialog
()
{
this
.
showAutoAddDialog
=
false
;
this
.
productStandardInspectionNumber
=
''
;
this
.
trayCode
=
''
;
},
...
...
@@ -364,6 +395,7 @@ export default {
this
.
manualTrayCode
=
''
;
this
.
storeyCode
=
''
;
this
.
trayType
=
'0'
;
this
.
productStandardInspectionNumber
=
''
;
},
// 确认自动模式上料
...
...
@@ -372,11 +404,16 @@ export default {
this
.
$message
.
warning
(
'请输入托盘编号'
);
return
;
}
if
(
!
this
.
productStandardInspectionNumber
.
trim
())
{
this
.
$message
.
warning
(
'请输入标检单编号'
);
return
;
}
const
robotArmCommand
=
{
trayCode
:
this
.
trayCode
,
storeyCode
:
'待分配位置'
,
type
:
'0'
type
:
'0'
,
productStandardInspectionNumber
:
this
.
productStandardInspectionNumber
};
addCommand
(
robotArmCommand
).
then
(
res
=>
{
...
...
@@ -386,13 +423,17 @@ export default {
}
else
{
this
.
$message
.
error
(
"添加失败"
);
}
}).
catch
(
err
=>
{
this
.
$message
.
error
(
"添加失败"
);
});
})
},
// 确认手动模式上料
confirmManualAdd
()
{
if
(
!
this
.
productStandardInspectionNumber
.
trim
())
{
this
.
$message
.
warning
(
'请输入标检单号'
);
return
;
}
if
(
!
this
.
manualTrayCode
.
trim
())
{
this
.
$message
.
warning
(
'请输入托盘编号'
);
return
;
...
...
@@ -405,7 +446,8 @@ export default {
const
robotArmCommand
=
{
trayCode
:
this
.
manualTrayCode
,
storeyCode
:
this
.
storeyCode
storeyCode
:
this
.
storeyCode
,
productStandardInspectionNumber
:
this
.
productStandardInspectionNumber
,
};
addManualCommand
(
robotArmCommand
).
then
(
res
=>
{
...
...
@@ -418,7 +460,7 @@ export default {
initWebSocket
()
{
// 从环境变量获取基础URL,默认使用Nginx代理地址
const
backendUrl
=
process
.
env
.
VUE_APP_API_BASE_URL
||
'http://192.168.0.100:8087'
;
const
backendUrl
=
process
.
env
.
VUE_APP_API_BASE_URL
||
this
.
initWebSocketIp
;
// 根据需要切换不同的WebSocket端点
const
wsPath
=
'/agecal/ws-robot-arm'
;
// 或 '/agecal/ws-aging-cabinet'
...
...
zhmes-agecal-web/src/views/standardInspection/index.vue
View file @
2c4e694d
...
...
@@ -51,7 +51,25 @@
<el-table
v-loading=
"loading"
:data=
"inspectionList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
label=
"出库单号"
align=
"center"
prop=
"outStoreOrderNumber"
/>
<el-table-column
label=
"标检单号"
align=
"center"
prop=
"productStandardInspectionNumber"
/>
<el-table-column
label=
"状态"
align=
"center"
prop=
"status"
/>
<el-table-column
label=
"状态"
align=
"center"
prop=
"status"
>
<template
slot-scope=
"scope"
>
<!-- 如果 calibrationGas 是单个值 -->
<span
v-if=
"!Array.isArray(scope.row.status)"
>
{{
getStatusLabel
(
scope
.
row
.
status
)
}}
</span>
<!-- 如果 calibrationGas 是数组 -->
<div
v-else
>
<el-tag
v-for=
"(item, index) in scope.row.status"
:key=
"index"
style=
"margin: 2px;"
>
{{
getStatusLabel
(
item
)
}}
</el-tag>
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"报检人"
align=
"center"
prop=
"createBy"
/>
<el-table-column
label=
"报检部门"
align=
"center"
prop=
"inspectionDep"
/>
<el-table-column
label=
"报检时间"
align=
"center"
prop=
"createTime"
width=
"110"
>
...
...
@@ -67,7 +85,25 @@
<
el
-
table
-
column
label
=
"合格数量"
align
=
"center"
prop
=
"qualifiedNum"
/>
<
el
-
table
-
column
label
=
"不合格数量"
width
=
"110px"
align
=
"center"
prop
=
"unQualifiedNum"
/>
<
el
-
table
-
column
label
=
"老化时长"
align
=
"center"
prop
=
"agingDuration"
/>
<
el
-
table
-
column
label
=
"标定气体"
align
=
"center"
prop
=
"calibrationGas"
/>
<
el
-
table
-
column
label
=
"标定气体"
align
=
"center"
prop
=
"calibrationGas"
>
<
template
slot
-
scope
=
"scope"
>
<!--
如果
calibrationGas
是单个值
-->
<
span
v
-
if
=
"!Array.isArray(scope.row.calibrationGas)"
>
{{
getCalibrationGasLabel
(
scope
.
row
.
calibrationGas
)
}}
<
/span
>
<!--
如果
calibrationGas
是数组
-->
<
div
v
-
else
>
<
el
-
tag
v
-
for
=
"(item, index) in scope.row.calibrationGas"
:
key
=
"index"
style
=
"margin: 2px;"
>
{{
getCalibrationGasLabel
(
item
)
}}
<
/el-tag
>
<
/div
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"报警值"
align
=
"center"
prop
=
"alarmValue"
/>
<
el
-
table
-
column
label
=
"量程"
align
=
"center"
prop
=
"range"
/>
<
/el-table
>
...
...
@@ -209,13 +245,46 @@ export default {
productStandardInspectionNumber
:
[
{
required
:
true
,
message
:
"主体标检单号不能为空"
,
trigger
:
"blur"
}
],
}
}
,
statusStyle
:{
"PENDING_STANDARD_INSPECTION"
:
"color:#C40202"
,
"DURING_STANDARD_INSPECTION"
:
"color:#E34B19"
,
"STANDARD_INSPECTION_COMPLETED"
:
"color:#0C6BD1"
,
}
,
// 标定气体
calibrationGasOptions
:[],
// status
statusOptions
:[]
}
;
}
,
created
()
{
this
.
getList
();
this
.
getDicts
(
"calibration_gas"
).
then
((
response
)
=>
{
this
.
calibrationGasOptions
=
response
.
data
;
}
);
this
.
getDicts
(
"standard_inspection_status"
).
then
((
response
)
=>
{
this
.
statusOptions
=
response
.
data
;
}
);
}
,
methods
:
{
// 获取标定气体的显示标签
getCalibrationGasLabel
(
dictValue
)
{
if
(
!
dictValue
)
return
''
;
const
item
=
this
.
calibrationGasOptions
.
find
(
option
=>
option
.
dictValue
===
dictValue
);
return
item
?
item
.
dictLabel
:
dictValue
;
// 如果找不到对应的选项,显示原始值
}
,
getStatusLabel
(
dictValue
)
{
if
(
!
dictValue
)
return
''
;
const
item
=
this
.
statusOptions
.
find
(
option
=>
option
.
dictValue
===
dictValue
);
return
item
?
item
.
dictLabel
:
dictValue
;
// 如果找不到对应的选项,显示原始值
}
,
/** 查询产品主体标检单列表 */
getList
()
{
this
.
loading
=
true
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment