| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import org.dromara.common.core.constant.DictConstants; |
| | | import org.dromara.common.core.utils.DateUtils; |
| | | import org.dromara.common.core.utils.MapstructUtils; |
| | | import org.dromara.common.core.utils.StringUtils; |
| | | import org.dromara.common.mybatis.core.page.TableDataInfo; |
| | |
| | | qw.like(StringUtils.isNotBlank(bo.getTitle()), "st.title", bo.getTitle()); |
| | | qw.like(StringUtils.isNotBlank(bo.getEquName()), "equ.equ_name", bo.getEquName()); |
| | | qw.like(StringUtils.isNotBlank(bo.getAssetNo()), "equ.asset_no", bo.getAssetNo()); |
| | | if(bo.getPlanTime()!=null&&bo.getViewMode() != null && bo.getViewMode().equals("Day")){ |
| | | qw.eq("DATE_FORMAT(st.plan_time, '%Y-%m-%d')", DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD,bo.getPlanTime())); |
| | | }else if(bo.getPlanTime()!=null&&bo.getViewMode() != null && bo.getViewMode().equals("Month")){ |
| | | qw.eq("DATE_FORMAT(st.plan_time, '%Y-%m')", DateUtils.parseDateToStr(DateUtils.YYYY_MM,bo.getPlanTime())); |
| | | } |
| | | qw.eq( "st.type", bo.getType()); |
| | | qw.between(params.get("beginPlanTime") != null && params.get("endPlanTime") != null, |
| | | "st.plan_time", params.get("beginPlanTime"), params.get("endPlanTime")); |