Merge branch 'master' of http://117.34.109.166:18448/r/mdc_430 into develop
| | |
| | | import org.jeecg.common.aspect.annotation.AutoLog; |
| | | import org.jeecg.common.system.vo.LoginUser; |
| | | import org.jeecg.modules.mdc.dto.MdcAlarmAnalyzeDto; |
| | | import org.jeecg.modules.mdc.dto.MdcAlarmListDto; |
| | | import org.jeecg.modules.mdc.dto.MdcAlarmTrendDto; |
| | | import org.jeecg.modules.mdc.service.MdcEquipmentAlarmAnalyzeService; |
| | | import org.jeecg.modules.mdc.vo.MdcAlarmAnalyzeQueryVo; |
| | |
| | | return Result.OK(result); |
| | | } |
| | | |
| | | @AutoLog(value = "æ¥è¦åæ-äºçº§å表") |
| | | @ApiOperation(value = "æ¥è¦åæ-äºçº§å表", notes = "æ¥è¦åæ-äºçº§å表") |
| | | @GetMapping("/equipmentAlarmList") |
| | | public Result equipmentAlarmList(MdcAlarmAnalyzeQueryVo vo) { |
| | | LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | String userId = user.getId(); |
| | | List<MdcAlarmListDto> result = mdcEquipmentAlarmAnalyzeService.equipmentAlarmList(userId, vo); |
| | | return Result.OK(result); |
| | | } |
| | | |
| | | } |
| | |
| | | package org.jeecg.modules.mdc.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import io.swagger.annotations.Api; |
| | |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.common.aspect.annotation.AutoLog; |
| | | import org.jeecg.common.system.base.controller.JeecgController; |
| | | import org.jeecg.common.system.query.QueryGenerator; |
| | | import org.jeecg.common.system.vo.LoginUser; |
| | | import org.jeecg.modules.mdc.dto.MdcEquipmentDto; |
| | | import org.jeecg.modules.mdc.entity.MdcEquipment; |
| | |
| | | @AutoLog(value = "设å¤è¡¨-å页å表æ¥è¯¢") |
| | | @ApiOperation(value = "设å¤è¡¨-å页å表æ¥è¯¢", notes = "设å¤è¡¨-å页å表æ¥è¯¢") |
| | | @GetMapping(value = "/list") |
| | | public Result<IPage<MdcEquipment>> queryPageList(MdcEquipment mdcEquipment, |
| | | public Result<IPage<MdcEquipment>> queryPageList(MdcEquipmentVo mdcEquipment, |
| | | @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
| | | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | QueryWrapper<MdcEquipment> queryWrapper = QueryGenerator.initQueryWrapper(mdcEquipment, req.getParameterMap()); |
| | | //QueryWrapper<MdcEquipment> queryWrapper = QueryGenerator.initQueryWrapper(mdcEquipment, req.getParameterMap()); |
| | | Page<MdcEquipment> page = new Page<MdcEquipment>(pageNo, pageSize); |
| | | IPage<MdcEquipment> pageList = mdcEquipmentService.page(page, queryWrapper); |
| | | IPage<MdcEquipment> pageList = mdcEquipmentService.pageList(page, mdcEquipment, req); |
| | | |
| | | //æ¹éæ¥è¯¢è®¾å¤çæå±é¨é¨å产线 |
| | | //step.1 å
æ¿å°å
¨é¨ç equipmentIds |
| | |
| | | String chineseName = mdcEquipmentThreshold.getChineseName(); |
| | | mdcEquipmentThreshold.setEnglishName(chineseName.substring(0, chineseName.indexOf("("))); |
| | | mdcEquipmentThreshold.setChineseName(chineseName.substring(mdcEquipmentThreshold.getEnglishName().length() + 1, chineseName.length() - 1)); |
| | | mdcEquipmentThresholdService.save(mdcEquipmentThreshold); |
| | | mdcEquipmentThresholdService.updateById(mdcEquipmentThreshold); |
| | | return Result.OK("ç¼è¾æå!"); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.mdc.dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author Lius |
| | | * @date 2023/12/14 10:27 |
| | | */ |
| | | @Data |
| | | public class MdcAlarmListDto { |
| | | private String equipmentId; |
| | | private String equipmentName; |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss ") |
| | | private Date startTime; |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date endTime; |
| | | private Long duration; |
| | | } |
| | |
| | | List<MdcAlarmDto> dateCountList; |
| | | |
| | | List<MdcAlarmDto> equipmentCountList; |
| | | |
| | | } |
| | |
| | | import org.jeecg.modules.mdc.entity.MdcEquipmentMonitor; |
| | | import org.jeecg.modules.mdc.vo.MdcEquipmentDepVo; |
| | | import org.jeecg.modules.mdc.vo.MdcEquipmentProVo; |
| | | import org.jeecg.modules.mdc.vo.MdcEquipmentVo; |
| | | import org.jeecg.modules.mdc.vo.WorkshopEquipmentVo; |
| | | |
| | | import java.util.List; |
| | |
| | | * æ ¹æ®å¤§å±è½¦é´idæ¥è¯¢è®¾å¤å表 |
| | | */ |
| | | IPage<MdcEquipment> getEquipmentByWorkshopId(Page<MdcEquipment> page, @Param("workshopEquipmentVo") WorkshopEquipmentVo workshopEquipmentVo); |
| | | |
| | | /** |
| | | * å页å表 |
| | | */ |
| | | IPage<MdcEquipment> pageList(Page<MdcEquipment> page, @Param("mdcEquipment") MdcEquipmentVo mdcEquipment); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.jeecg.modules.mdc.dto.MdcAlarmListDto; |
| | | import org.jeecg.modules.mdc.entity.MdcEquipmentRunningSection; |
| | | import org.jeecg.modules.mdc.vo.MdcAlarmAnalyzeQueryVo; |
| | | |
| | |
| | | * æ¥è¯¢æ¶é´æ®µå
è¿è¡æ°æ® |
| | | */ |
| | | List<MdcEquipmentRunningSection> selectRunningData(@Param("equipmentId") String equipmentId, @Param("startDate") Date startDate, @Param("endDate") Date endDate); |
| | | |
| | | List<MdcAlarmListDto> selectAlarmList(@Param("vo") MdcAlarmAnalyzeQueryVo mdcAlarmAnalyzeQueryVo, @Param("startDate") String startDate, @Param("endDate") String endDate); |
| | | } |
| | |
| | | ORDER BY me.equipment_id |
| | | </select> |
| | | |
| | | <!--å页å表--> |
| | | <select id="pageList" resultType="org.jeecg.modules.mdc.entity.MdcEquipment"> |
| | | SELECT |
| | | t1.* |
| | | FROM |
| | | mdc_equipment t1 |
| | | LEFT JOIN mdc_production_equipment t2 ON t1.id = t2.equipment_id |
| | | LEFT JOIN mdc_production t3 ON t2.production_id = t3.id |
| | | <where> |
| | | <if test="mdcEquipment.equipmentId != null and mdcEquipment.equipmentId != '' "> |
| | | AND t1.equipment_id LIKE CONCAT(CONCAT('%',#{mdcEquipment.equipmentId}),'%') |
| | | </if> |
| | | <if test="mdcEquipment.equipmentName != null and mdcEquipment.equipmentName != '' "> |
| | | AND t1.equipment_name LIKE CONCAT(CONCAT('%',#{mdcEquipment.equipmentName}),'%') |
| | | </if> |
| | | <if test="mdcEquipment.equipmentModel != null and mdcEquipment.equipmentModel != '' "> |
| | | AND t1.equipment_name = #{mdcEquipment.equipmentModel} |
| | | </if> |
| | | <if test="mdcEquipment.equipmentType != null and mdcEquipment.equipmentType != '' "> |
| | | AND t1.equipmentType = #{mdcEquipment.equipmentType} |
| | | </if> |
| | | <if test="mdcEquipment.driveType != null and mdcEquipment.driveType != '' "> |
| | | AND t1.drive_type = #{mdcEquipment.driveType} |
| | | </if> |
| | | <if test="mdcEquipment.productionName != null and mdcEquipment.productionName != '' "> |
| | | AND t3.production_name LIKE CONCAT(CONCAT('%',#{mdcEquipment.productionName}),'%') |
| | | </if> |
| | | </where> |
| | | order by t1.sort_no |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | start_time |
| | | </select> |
| | | |
| | | <!--æ¥è¯¢æ¥è¦å·æ¥è¦è¯¦ç»ä¿¡æ¯--> |
| | | <select id="selectAlarmList" resultType="org.jeecg.modules.mdc.dto.MdcAlarmListDto"> |
| | | SELECT |
| | | t1.equipment_id, |
| | | t2.equipment_name, |
| | | t1.start_time, |
| | | t1.end_time, |
| | | t1.duration |
| | | FROM |
| | | mdc_equipment_running_section t1 LEFT JOIN mdc_equipment t2 ON t1.equipment_id = t2.equipment_id |
| | | <where> |
| | | AND t1.status = '22' |
| | | AND t1.alarm = #{ vo.alarmCode } |
| | | <if test="vo.equipmentIdList != null and vo.equipmentIdList.size() > 0 "> |
| | | AND t1.equipment_id IN |
| | | <foreach collection="vo.equipmentIdList" item="id" index="index" open="(" close=")" separator=","> |
| | | #{ id } |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | package org.jeecg.modules.mdc.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.jeecg.modules.mdc.dto.MdcAlarmListDto; |
| | | import org.jeecg.modules.mdc.dto.MdcEquipmentRunningSectionDto; |
| | | import org.jeecg.modules.mdc.entity.MdcEquipmentRunningSection; |
| | | import org.jeecg.modules.mdc.vo.MdcAlarmAnalyzeQueryVo; |
| | |
| | | * æ¥è¯¢æ¶é´æ®µå
è¿è¡æ°æ® |
| | | */ |
| | | List<MdcEquipmentRunningSection> selectRunningData(String equipmentId, Date startDate, Date endDate); |
| | | |
| | | List<MdcAlarmListDto> selectAlarmList(MdcAlarmAnalyzeQueryVo mdcAlarmAnalyzeQueryVo, String startDate, String endDate); |
| | | } |
| | |
| | | import org.jeecg.modules.mdc.vo.MdcEquipmentVo; |
| | | import org.jeecg.modules.mdc.vo.WorkshopEquipmentVo; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | IPage<MdcEquipment> getEquipmentByWorkshopId(Page<MdcEquipment> page, WorkshopEquipmentVo workshopEquipmentVo); |
| | | |
| | | List<String> listEquipmentId(String equipmentType, List<String> equipmentIdList); |
| | | |
| | | /** |
| | | * å表æ¥è¯¢ |
| | | */ |
| | | IPage<MdcEquipment> pageList(Page<MdcEquipment> page, MdcEquipmentVo mdcEquipment, HttpServletRequest req); |
| | | } |
| | |
| | | package org.jeecg.modules.mdc.service; |
| | | |
| | | import org.jeecg.modules.mdc.dto.MdcAlarmAnalyzeDto; |
| | | import org.jeecg.modules.mdc.dto.MdcAlarmListDto; |
| | | import org.jeecg.modules.mdc.dto.MdcAlarmTrendDto; |
| | | import org.jeecg.modules.mdc.vo.MdcAlarmAnalyzeQueryVo; |
| | | |
| | |
| | | * @return |
| | | */ |
| | | MdcAlarmTrendDto alarmTrend(String userId, MdcAlarmAnalyzeQueryVo vo); |
| | | |
| | | /** |
| | | * äºçº§å表 |
| | | * |
| | | * @param userId |
| | | * @param vo |
| | | * @return |
| | | */ |
| | | List<MdcAlarmListDto> equipmentAlarmList(String userId, MdcAlarmAnalyzeQueryVo vo); |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public List<MdcDriveTypeParamConfig> getShowDriveParam(String driveType) { |
| | | return lambdaQuery().eq(MdcDriveTypeParamConfig::getControlSystemType, driveType).eq(MdcDriveTypeParamConfig::getShowFlag, CommonConstant.YN_Y).list(); |
| | | return lambdaQuery().eq(MdcDriveTypeParamConfig::getControlSystemType, driveType).eq(MdcDriveTypeParamConfig::getShowFlag, CommonConstant.YN_Y).orderByAsc(MdcDriveTypeParamConfig::getSortNo).list(); |
| | | } |
| | | |
| | | /** |
| | |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.jeecg.modules.mdc.dto.MdcAlarmAnalyzeDto; |
| | | import org.jeecg.modules.mdc.dto.MdcAlarmDto; |
| | | import org.jeecg.modules.mdc.dto.MdcAlarmListDto; |
| | | import org.jeecg.modules.mdc.dto.MdcAlarmTrendDto; |
| | | import org.jeecg.modules.mdc.entity.MdcEquipmentRunningSection; |
| | | import org.jeecg.modules.mdc.service.IMdcEquipmentRunningSectionService; |
| | |
| | | List<MdcAlarmDto> equipmentCountList = new ArrayList<>(); |
| | | String startDate = DateUtils.format(DateUtils.toDate(vo.getStartDate(), DateUtils.STRDATE), DateUtils.STR_DATE) + " 00:00:00"; |
| | | String endDate = DateUtils.format(DateUtils.addDays(DateUtils.toDate(vo.getEndDate(), DateUtils.STRDATE), 1), DateUtils.STR_DATE) + " 00:00:00"; |
| | | /*List<MdcAlarmListDto> alarmList = mdcEquipmentRunningSectionService.selectAlarmList(vo, startDate, endDate); |
| | | result.setAlarmList(alarmList);*/ |
| | | for (String equipmentId : result.getEquipmentList()) { |
| | | MdcAlarmDto mdcAlarmDto = new MdcAlarmDto(); |
| | | mdcAlarmDto.setKey(equipmentId); |
| | |
| | | result.setDateCountList(dateCountList); |
| | | return result; |
| | | } |
| | | |
| | | @Override |
| | | public List<MdcAlarmListDto> equipmentAlarmList(String userId, MdcAlarmAnalyzeQueryVo vo) { |
| | | List<String> equipmentIds = new ArrayList<>(); |
| | | if (StringUtils.isNotEmpty(vo.getParentId()) && StringUtils.isEmpty(vo.getEquipmentId())) { |
| | | if ("2".equals(vo.getTypeTree())) { |
| | | // é¨é¨å±çº§ |
| | | equipmentIds = mdcEquipmentService.getEquipmentIdsByDepart(userId, vo.getParentId()); |
| | | } else { |
| | | // 产线å±çº§ |
| | | equipmentIds = mdcEquipmentService.getEquipmentIdsProduction(userId, vo.getParentId()); |
| | | } |
| | | } else if (StringUtils.isNotEmpty(vo.getEquipmentId())) { |
| | | // åå°è®¾å¤ä¿¡æ¯ |
| | | vo.setEquipmentIdList(Collections.singletonList(vo.getEquipmentId())); |
| | | } else { |
| | | // æ¥è¯¢ç¨æ·æ¥æçææè®¾å¤ä¿¡æ¯ |
| | | if ("2".equals(vo.getTypeTree())) { |
| | | // é¨é¨å±çº§ |
| | | equipmentIds = mdcEquipmentService.getEquipmentIdsByDepart(userId, null); |
| | | } else { |
| | | // 产线å±çº§ |
| | | equipmentIds = mdcEquipmentService.getEquipmentIdsProduction(userId, null); |
| | | } |
| | | } |
| | | if (vo.getEquipmentIdList() == null || vo.getEquipmentIdList().isEmpty()) { |
| | | vo.setEquipmentIdList(equipmentIds); |
| | | } |
| | | if (vo.getEquipmentIdList() == null || vo.getEquipmentIdList().isEmpty()) { |
| | | return null; |
| | | } |
| | | String startDate = DateUtils.format(DateUtils.toDate(vo.getStartDate(), DateUtils.STRDATE), DateUtils.STR_DATE) + " 00:00:00"; |
| | | String endDate = DateUtils.format(DateUtils.addDays(DateUtils.toDate(vo.getEndDate(), DateUtils.STRDATE), 1), DateUtils.STR_DATE) + " 00:00:00"; |
| | | return mdcEquipmentRunningSectionService.selectAlarmList(vo, startDate, endDate); |
| | | } |
| | | } |
| | |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.jeecg.common.system.vo.DictModel; |
| | | import org.jeecg.modules.mdc.dto.EquipmentMachingDto; |
| | | import org.jeecg.modules.mdc.dto.MdcAlarmListDto; |
| | | import org.jeecg.modules.mdc.dto.MdcEquipmentRunningSectionDto; |
| | | import org.jeecg.modules.mdc.entity.*; |
| | | import org.jeecg.modules.mdc.mapper.MdcEquipmentRunningSectionMapper; |
| | |
| | | for (MdcEquipmentRunningSection entity : running) { |
| | | dto = new MdcEquipmentRunningSectionDto(); |
| | | BeanUtils.copyProperties(entity, dto); |
| | | if (entity.getStatus() == 3 && StringUtils.isBlank(entity.getSequenceNumber()) && isTableExist) { |
| | | if (entity.getStatus() == 3 && StringUtils.isBlank(entity.getSequenceNumber()) && isTableExist && !"ZUOLAN".equals(equip.getDrivetype())) { |
| | | List<EquipmentMachingDto> esList = equipmentWorkLineService.getEquipmentSequencenumber(tableName, entity.getStartTime(), entity.getEndTime()); |
| | | if (esList != null && esList.size() > 1) { |
| | | dto.setSequenceNumber(esList.get(0).getSequencenumber()); |
| | |
| | | return this.baseMapper.selectRunningData(equipmentId, startDate, endDate); |
| | | } |
| | | |
| | | @Override |
| | | public List<MdcAlarmListDto> selectAlarmList(MdcAlarmAnalyzeQueryVo mdcAlarmAnalyzeQueryVo, String startDate, String endDate) { |
| | | return this.baseMapper.selectAlarmList(mdcAlarmAnalyzeQueryVo, startDate, endDate); |
| | | } |
| | | |
| | | private Map<String, List<MdcEquipmentRunningSectionDto>> logCharts(MdcEquipmentRunningSectionVo equipmentRunningSectionVo, String date) { |
| | | Map<String, List<MdcEquipmentRunningSectionDto>> map = new HashMap<>(); |
| | | List<MdcEquipmentRunningSectionDto> normal = new ArrayList<>(); |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.util.*; |
| | |
| | | return list.stream().map(MdcEquipment::getEquipmentId).collect(Collectors.toList()); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<MdcEquipment> pageList(Page<MdcEquipment> page, MdcEquipmentVo mdcEquipment, HttpServletRequest req) { |
| | | return this.baseMapper.pageList(page, mdcEquipment); |
| | | } |
| | | |
| | | } |
| | |
| | | @Transactional(rollbackFor = {Exception.class}) |
| | | public void runningProcessCount() { |
| | | // è·åææè®¾å¤ |
| | | //List<MdcEquipment> mdcEquipmentList = mdcEquipmentService.list(new LambdaQueryWrapper<MdcEquipment>().eq(MdcEquipment::getEquipmentId, "2240074")); |
| | | List<MdcEquipment> mdcEquipmentList = mdcEquipmentService.list(); |
| | | List<MdcProcessCount> result = new ArrayList<>(); |
| | | for (MdcEquipment mdcEquipment : mdcEquipmentList) { |
| | |
| | | } |
| | | // è·å设å¤çæ¬¡ä¿¡æ¯ |
| | | Map<String, List<MdcDeviceCalendarVo>> listMap = this.mdcDeviceCalendarMap(mdcEquipment.getEquipmentId(), stringDates); |
| | | if (listMap.isEmpty()) { |
| | | if (listMap == null || listMap.isEmpty()) { |
| | | listMap = new HashMap<>(); |
| | | } |
| | | List<MdcProcessCount> resultList = new ArrayList<>(); |
| | |
| | | mdcProcessCount.setStartTime(startDate); |
| | | } |
| | | if ("FANUC".equals(mdcEquipment.getDriveType())) { |
| | | // æ³å
°å
è®¾å¤æ ¹æ®ProductCountåæ®µå¤æ |
| | | String productCount = mdcEquipmentDtoList.get(0).get("ProductCount").toString(); |
| | | for (int i = 0; i < mdcEquipmentDtoList.size(); i++) { |
| | | if (!productCount.equals(mdcEquipmentDtoList.get(i).get("ProductCount").toString())) { |
| | | productCount = mdcEquipmentDtoList.get(i).get("ProductCount").toString(); |
| | | if (mdcEquipmentDtoList.get(i - 1).get("CollectTime") != null) { |
| | | mdcProcessCount.setEndTime(DateUtils.toDate(mdcEquipmentDtoList.get(i - 1).get("CollectTime").toString(), DateUtils.STR_DATE_TIME)); |
| | | mdcProcessCount.setDuration(TimeFieldUtils.duration(mdcProcessCount.getStartTime(), mdcProcessCount.getEndTime())); |
| | | mdcProcessCount.setSequenceNumber(mdcEquipmentDtoList.get(i - 1).get("Sequencenumber").toString()); |
| | | resultList.add(mdcProcessCount); |
| | | if (TimeFieldUtils.duration(mdcProcessCount.getEndTime(), mdcEquipmentRunningSection.getEndTime()) > 60) { |
| | | //mdcProcessCount.setStartTime(mdcProcessCount.getEndTime()); |
| | | startDate = mdcProcessCount.getEndTime(); |
| | | } else if (j + 1 < equipmentRunningSectionList.size()) { |
| | | //mdcProcessCount.setStartTime(equipmentRunningSectionList.get(j + 1).getStartTime()); |
| | | startDate = equipmentRunningSectionList.get(j + 1).getStartTime(); |
| | | } else { |
| | | startDate = null; |
| | | try { |
| | | // æ³å
°å
è®¾å¤æ ¹æ®ProductCountåæ®µå¤æ |
| | | String productCount = mdcEquipmentDtoList.get(0).get("ProductCount").toString(); |
| | | for (int i = 0; i < mdcEquipmentDtoList.size(); i++) { |
| | | if (!productCount.equals(mdcEquipmentDtoList.get(i).get("ProductCount").toString())) { |
| | | productCount = mdcEquipmentDtoList.get(i).get("ProductCount").toString(); |
| | | if (mdcEquipmentDtoList.get(i - 1).get("CollectTime") != null) { |
| | | mdcProcessCount.setEndTime(DateUtils.toDate(mdcEquipmentDtoList.get(i - 1).get("CollectTime").toString(), DateUtils.STR_DATE_TIME)); |
| | | mdcProcessCount.setDuration(TimeFieldUtils.duration(mdcProcessCount.getStartTime(), mdcProcessCount.getEndTime())); |
| | | mdcProcessCount.setSequenceNumber(mdcEquipmentDtoList.get(i - 1).get("Sequencenumber").toString()); |
| | | resultList.add(mdcProcessCount); |
| | | if (TimeFieldUtils.duration(mdcProcessCount.getEndTime(), mdcEquipmentRunningSection.getEndTime()) > 60) { |
| | | //mdcProcessCount.setStartTime(mdcProcessCount.getEndTime()); |
| | | startDate = mdcProcessCount.getEndTime(); |
| | | } else if (j + 1 < equipmentRunningSectionList.size()) { |
| | | //mdcProcessCount.setStartTime(equipmentRunningSectionList.get(j + 1).getStartTime()); |
| | | startDate = equipmentRunningSectionList.get(j + 1).getStartTime(); |
| | | } else { |
| | | startDate = null; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("计ç®å å·¥å·¥ä»¶ç®æ³å¤±è´¥ï¼è®¾å¤ç¼å·ï¼" + mdcEquipment.getEquipmentId(), e); |
| | | //System.out.println("计ç®å å·¥å·¥ä»¶ç®æ³å¤±è´¥ï¼è®¾å¤ç¼å·ï¼" + mdcEquipment.getEquipmentId()); |
| | | } |
| | | } |
| | | } |
| | |
| | | private String productionId; |
| | | private String equipmentId; |
| | | private String equipmentName; |
| | | private String equipmentModel; |
| | | private String equipmentType; |
| | | private String driveType; |
| | | private String productionName; |
| | | } |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.apache.shiro.authz.annotation.RequiresRoles; |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.common.aspect.annotation.AutoLog; |
| | | import org.jeecg.common.aspect.annotation.PermissionData; |
| | |
| | | /** |
| | | * ä¿®æ¹å¯ç |
| | | */ |
| | | //@RequiresRoles({"admin"}) |
| | | @RequiresRoles({"admin"}) |
| | | @RequestMapping(value = "/changePassword", method = RequestMethod.PUT) |
| | | public Result<?> changePassword(@RequestBody SysUser sysUser) { |
| | | SysUser u = this.sysUserService.getOne(new LambdaQueryWrapper<SysUser>().eq(SysUser::getUsername, sysUser.getUsername())); |
| | |
| | | sysUser.setSalt(salt); |
| | | //设置å¯ç æ´æ°æ¶é´ |
| | | sysUser.setPasswordTime(new Date()); |
| | | //管çåä¿®æ¹å¯ç ï¼è®¾ç½®ç¨æ·é¦æ¬¡ç»å½ |
| | | //sysUser.setPasswordFlag(); |
| | | String password = sysUser.getPassword(); |
| | | String passwordEncode = PasswordUtil.encrypt(sysUser.getUsername(), password, salt); |
| | | sysUser.setPassword(passwordEncode); |