| | |
| | | import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo; |
| | | import cn.stylefeng.guns.modular.gm.greaseManage.entity.GreaseManage; |
| | | import cn.stylefeng.guns.modular.gm.greaseManage.model.params.GreaseManageParam; |
| | | import cn.stylefeng.guns.modular.gm.greaseManage.model.result.GreaseManageResult; |
| | | import cn.stylefeng.guns.modular.gm.greaseManage.service.GreaseManageService; |
| | | import cn.stylefeng.guns.modular.kb.utils.IPUtil; |
| | | import cn.stylefeng.guns.modular.om.productionOrdeInfo.model.result.ProductionOrdeInfoResult; |
| | | import cn.stylefeng.guns.modular.sc.kanbanConf.model.params.KanbanConfParam; |
| | | import cn.stylefeng.guns.modular.sc.kanbanConf.service.KanbanConfService; |
| | | import cn.stylefeng.guns.plcserver.opc.unit.OPCUnit; |
| | | import cn.stylefeng.roses.core.base.controller.BaseController; |
| | | import cn.stylefeng.roses.kernel.model.response.ResponseData; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | |
| | | return ResponseData.success(list); |
| | | } |
| | | |
| | | @ResponseBody |
| | | @CrossOrigin |
| | | @RequestMapping("/testhandleOilState") |
| | | public long handleOilState(){ |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd"); |
| | | String currentDate = format.format(new Date()); |
| | | GreaseManageParam param = new GreaseManageParam(); |
| | | param.setLocationCode("OP050"); |
| | | List<GreaseManageResult> list = greaseManageService.findListBySpec(param); |
| | | if(list.size()>0) { |
| | | String duaDate = list.get(0).getDuaDate(); |
| | | // |
| | | long daysBetween = Long.parseLong(getRemainder(currentDate,duaDate)); |
| | | |
| | | // long daysBetween = ChronoUnit.DAYS.between(date1, date2); |
| | | // return daysBetween; |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | public static String boldText(String param){ |
| | | return "<span style='font-size: 20px' class='colorRed'>"+param+"</span>"; |
| | | } |
| | |
| | | DateTimeFormatter dateFormatter = DateTimeFormatter.ofPattern("yyyyMMdd"); |
| | | LocalDate localDate1 = LocalDate.parse(currentDate, dateFormatter); |
| | | LocalDate localDate2 = LocalDate.parse(tableDate, dateFormatter); |
| | | long days = ChronoUnit.DAYS.between(localDate2, localDate1); |
| | | long days = ChronoUnit.DAYS.between(localDate1, localDate2); |
| | | return String.valueOf(days); |
| | | } |
| | | |
| | |
| | | locationCode = "OP050"; |
| | | break; |
| | | case "Z": |
| | | locationCode = "BOP30/40"; |
| | | locationCode = "BOP030/040"; |
| | | break; |
| | | default: |
| | | break; |