2024-08-13 WMS-设备管理-绑定辅助设备优化(跟上位机报修有关)

master
A0010407 5 months ago
parent 1e9841a700
commit 4b1fd57118

@ -138,4 +138,7 @@ public interface BaseEquipmentMapper {
//查询设备类型(维护在字典中的)
List<BaseEquipment> getEquipmentTypeDeptList(BaseEquipment baseEquipment);
//根据设备名查询设备信息
BaseEquipment selectBaseEquipmentByEquipmentCode(String code);
}

@ -235,6 +235,10 @@ public class BaseEquipmentServiceImpl implements IBaseEquipmentService {
List<String> auxiliaryEquipmentRightList = baseEquipment.getAuxiliaryEquipmentRightData();
for (String code : auxiliaryEquipmentRightList) {
EquBindAuxiliaryEquipment equBindAuxiliaryEquipment = new EquBindAuxiliaryEquipment();
//查询绑定的名字 设备类型
BaseEquipment dto = baseEquipmentMapper.selectBaseEquipmentByEquipmentCode(code);
equBindAuxiliaryEquipment.setAuxiliaryEquipmentName(dto.getEquipmentName());
equBindAuxiliaryEquipment.setAuxiliaryEquipmentType(dto.getEquipmentTypeCode());
equBindAuxiliaryEquipment.setAuxiliaryEquipmentCode(code);
equBindAuxiliaryEquipment.setEquipmentCode(baseEquipment.getEquipmentCode());
equBindAuxiliaryEquipment.setCreateBy(SecurityUtils.getUsername());
@ -348,6 +352,10 @@ public class BaseEquipmentServiceImpl implements IBaseEquipmentService {
for (String code : auxiliaryEquipmentRightList) {
EquBindAuxiliaryEquipment equBindAuxiliaryEquipment = new EquBindAuxiliaryEquipment();
equBindAuxiliaryEquipment.setAuxiliaryEquipmentCode(code);
//查询名字 设备类型
BaseEquipment dto = baseEquipmentMapper.selectBaseEquipmentByEquipmentCode(code);
equBindAuxiliaryEquipment.setAuxiliaryEquipmentName(dto.getEquipmentName());
equBindAuxiliaryEquipment.setAuxiliaryEquipmentType(dto.getEquipmentTypeCode());
equBindAuxiliaryEquipment.setEquipmentCode(baseEquipment.getEquipmentCode());
equBindAuxiliaryEquipment.setEquipmentName(baseEquipment.getEquipmentName());
equBindAuxiliaryEquipment.setCreateBy(SecurityUtils.getUsername());

@ -222,6 +222,12 @@
and del_flag ='0'
</select>
<select id="selectBaseEquipmentByEquipmentCode" parameterType="String" resultMap="BaseEquipmentResult">
<include refid="selectBaseEquipmentVo"/>
where equipment_code = #{equipmentCode}
and del_flag ='0'
</select>
<insert id="insertBaseEquipment" parameterType="BaseEquipment" useGeneratedKeys="true" keyProperty="equipmentId">
insert into base_equipment
<trim prefix="(" suffix=")" suffixOverrides=",">

Loading…
Cancel
Save