diff --git a/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/equipment/vo/AccessDeviceVO.java b/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/equipment/vo/AccessDeviceVO.java new file mode 100644 index 0000000..89022e1 --- /dev/null +++ b/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/equipment/vo/AccessDeviceVO.java @@ -0,0 +1,19 @@ +package com.hnac.hzims.equipment.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +@ApiModel("设备树信息") +public class AccessDeviceVO { + + @ApiModelProperty("设备编号") + private String deviceCode; + + @ApiModelProperty("设备名称") + private String deviceName; + + @ApiModelProperty("设备地址") + private String address; +} diff --git a/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/controller/EmInfoController.java b/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/controller/EmInfoController.java index d4da0d4..6c65adb 100644 --- a/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/controller/EmInfoController.java +++ b/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/controller/EmInfoController.java @@ -474,4 +474,11 @@ public class EmInfoController extends BladeController { public R> getEmInfoTree(EmInfoEntity req) { return R.data(em_infoService.getEmInfoTree(req)); } + + @GetMapping("/accessDevices") + @ApiOperationSupport(order = 15) + @ApiOperation(value = "检修工作票设备查询") + public R> accessDevices(@RequestParam(value = "alias",required = false) String alias) { + return R.data(em_infoService.accessDevices(alias)); + } } diff --git a/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/mapper/EmInfoMapper.java b/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/mapper/EmInfoMapper.java index 341f8e6..aaeadd4 100644 --- a/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/mapper/EmInfoMapper.java +++ b/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/mapper/EmInfoMapper.java @@ -2,10 +2,7 @@ package com.hnac.hzims.equipment.mapper; import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.hnac.hzims.equipment.entity.EmInfoEntity; -import com.hnac.hzims.equipment.vo.EmInfoExtendVo; -import com.hnac.hzims.equipment.vo.DeviceVO; -import com.hnac.hzims.equipment.vo.EmInfoTreeVO; -import com.hnac.hzims.equipment.vo.EminfoAndEmParamVo; +import com.hnac.hzims.equipment.vo.*; import com.hnac.hzims.spare.vo.SparePartVO; import org.apache.ibatis.annotations.Param; import org.springblade.core.datascope.annotation.UserDataAuth; @@ -59,4 +56,6 @@ public interface EmInfoMapper extends UserDataScopeBaseMapper { List getEmInfoTree(@Param("ew") Wrapper ew); List getAllEmInfo(); + + List accessDevices(@Param("alias") String alias); } diff --git a/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/mapper/EmInfoMapper.xml b/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/mapper/EmInfoMapper.xml index 04218f6..a074859 100644 --- a/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/mapper/EmInfoMapper.xml +++ b/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/mapper/EmInfoMapper.xml @@ -177,4 +177,16 @@ + + diff --git a/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/service/IEmInfoService.java b/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/service/IEmInfoService.java index c9b2978..4a76e8b 100644 --- a/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/service/IEmInfoService.java +++ b/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/service/IEmInfoService.java @@ -105,4 +105,6 @@ public interface IEmInfoService extends IService { List getStationEmList(); List getDeviceLedgerList(String emCode,String date); + + List accessDevices(String alias); } diff --git a/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/service/impl/EmInfoServiceImpl.java b/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/service/impl/EmInfoServiceImpl.java index 31d2369..7b3a6b9 100644 --- a/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/service/impl/EmInfoServiceImpl.java +++ b/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/service/impl/EmInfoServiceImpl.java @@ -1061,6 +1061,16 @@ public class EmInfoServiceImpl extends ServiceImpl i } /** + * 查询检修工作票-设备 + * @param alias + * @return + */ + @Override + public List accessDevices(String alias) { + return this.baseMapper.accessDevices(alias); + } + + /** * 根据设备编号获取设备台账列表 * @param emInfo 设备实体类 * @param date 查询日期 diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/accessTicket/service/impl/AccessTicketServiceImpl.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/accessTicket/service/impl/AccessTicketServiceImpl.java index 7614eeb..90b43af 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/accessTicket/service/impl/AccessTicketServiceImpl.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/accessTicket/service/impl/AccessTicketServiceImpl.java @@ -42,6 +42,7 @@ import org.springblade.message.fegin.IMessageClient; import org.springblade.system.cache.DictCache; import org.springblade.system.entity.Dict; import org.springblade.system.feign.ISysClient; +import org.springblade.system.user.cache.UserCache; import org.springblade.system.user.entity.User; import org.springblade.system.user.feign.IUserClient; import org.springframework.beans.factory.annotation.Value; @@ -178,7 +179,7 @@ public class AccessTicketServiceImpl extends ServiceImpl variables = JSONObject.parseObject(JSONObject.toJSONStringWithDateFormat(entity,DateUtil.PATTERN_DATETIME), Map.class); R result = flowClient.startProcessInstanceContainNameByKey(AccessTicketConstants.ACCESS_TICKET_PROCESS_KEY, - StringUtil.format("{}:{}",AccessTicketConstants.ACCESS_TICKET_TABLE, entity.getId()), entity.getCreateTime() +"_" + entity.getDeviceName() + "_检修工作票", variables); + StringUtil.format("{}:{}",AccessTicketConstants.ACCESS_TICKET_TABLE, entity.getId()), DateUtil.format(entity.getCreateTime(),DateUtil.PATTERN_DATETIME) +"_" + entity.getDeviceName() + "_检修工作票", variables); log.info("access_ticket : start_process_result _ {}",result); // 更新任务流程Id if (!result.isSuccess() || 200 != result.getCode()) { @@ -376,7 +377,18 @@ public class AccessTicketServiceImpl extends ServiceImpl