|
@@ -333,17 +333,18 @@ public class ApiConstants {
|
|
|
|
|
|
public interface Faq {
|
|
|
Integer TITLE_TYPE = 2;
|
|
|
+ Integer ANSWER_TYPE = 3;
|
|
|
}
|
|
|
|
|
|
public interface Maintenance {
|
|
|
Integer STATUS_UNFINISHED = 0;
|
|
|
Integer STATUS_COMPLETED = 1;
|
|
|
- Integer STATUS_EXCEED = 2;
|
|
|
+ Integer STATUS_EXCEED = -1;
|
|
|
Integer STATUS_IN_MAINTENANCE = 1;
|
|
|
}
|
|
|
|
|
|
public interface SQL {
|
|
|
- String QUERY_MAINTENANCE_EVERYDAY =
|
|
|
+ String QUERY_MAINTENANCE_PLAN_EVERYDAY =
|
|
|
"select p.project_name projectName," +
|
|
|
" l.registration_code registrationCode," +
|
|
|
" l.device_position devicePosition," +
|
|
@@ -357,41 +358,44 @@ public class ApiConstants {
|
|
|
" left join project p on p.id in (select project_id from project_user where user_id = #{userId})" +
|
|
|
" where DATE_FORMAT(mp.plan_date, '%Y%m%d') = #{planDate}" +
|
|
|
" and mp.status = #{type}";
|
|
|
+
|
|
|
+ String SELECT_COUNT_FROM_TABLE = "select count(*) from #{table} where ${condition}";
|
|
|
+
|
|
|
+ String QUERY_MAINTENANCE_RECORD_EVERYDAY =
|
|
|
+ "select p.project_name," +
|
|
|
+ " l.registration_code," +
|
|
|
+ " l.device_position," +
|
|
|
+ " l.lift_type," +
|
|
|
+ " l.category," +
|
|
|
+ " ui.name," +
|
|
|
+ " mr.plan_date," +
|
|
|
+ " mr.type" +
|
|
|
+ " from maintenance_record mr" +
|
|
|
+ " left join lift l on mr.lift_id = l.id" +
|
|
|
+ " left join user_info ui on mr.worker_id = ui.user_id" +
|
|
|
+ " left join project p on p.id in (select project_id from project_user where user_id = #{userId})" +
|
|
|
+ " where DATE_FORMAT(mr.plan_date, '%Y%m%d') = #{planDate}" +
|
|
|
+ " and mr.status = '1";
|
|
|
+
|
|
|
+ String QUERY_MAINTENANCE_MONTH =
|
|
|
+ "select p.project_name projectName," +
|
|
|
+ " l.registration_code registrationCode," +
|
|
|
+ " l.device_position devicePosition," +
|
|
|
+ " l.lift_type liftType," +
|
|
|
+ " l.category category," +
|
|
|
+ " ui.name workerName," +
|
|
|
+ " mp.plan_date planDate," +
|
|
|
+ " from maintenance_plan mp" +
|
|
|
+ " left join lift l on mp.lift_id = l.id" +
|
|
|
+ " left join project_lift_relevance plr" +
|
|
|
+ " on l.id = plr.lift_id" +
|
|
|
+ " and plr.project_id in (select project_id" +
|
|
|
+ " from project_user" +
|
|
|
+ " where user_id = #{userId})" +
|
|
|
+ " left join project p on mp.project_id = p.id" +
|
|
|
+ " left join user_info ui on ui.user_id = mp.worker_id" +
|
|
|
+ " where DATE_FORMAT(mp.plan_date, '%Y%m') = DATE_FORMAT(CURDATE(), '%Y%m')" +
|
|
|
+ " and mp.status = '1' order by mp.plan_date";
|
|
|
+
|
|
|
}
|
|
|
-
|
|
|
- String QUERY_MAINTENANCE_RECORD =
|
|
|
- "select p.project_name," +
|
|
|
- " l.registration_code," +
|
|
|
- " l.device_position," +
|
|
|
- " l.lift_type," +
|
|
|
- " l.category," +
|
|
|
- " ui.name," +
|
|
|
- " mr.plan_date," +
|
|
|
- " mr.type" +
|
|
|
- " from maintenance_record mr" +
|
|
|
- " left join lift l on mr.lift_id = l.id" +
|
|
|
- " left join user_info ui on mr.worker_id = ui.user_id" +
|
|
|
- " left join project p on p.id in (select project_id from project_user where user_id = '1001101134377')" +
|
|
|
- "where DATE_FORMAT(mr.plan_date, '%Y-%m-%d') ='2020-05-08'" +
|
|
|
- " and mr.status = 1";
|
|
|
-
|
|
|
- String QUERY_MAINTENANCE_MONTH =
|
|
|
- "select p.project_name projectName," +
|
|
|
- " l.registration_code registrationCode," +
|
|
|
- " l.device_position devicePosition," +
|
|
|
- " l.lift_type liftType," +
|
|
|
- " l.category category," +
|
|
|
- " ui.name workerName," +
|
|
|
- " mp.plan_date planDate," +
|
|
|
- " from maintenance_plan mp" +
|
|
|
- " left join lift l on mp.lift_id = l.id" +
|
|
|
- " left join project_lift_relevance plr" +
|
|
|
- " on l.id = plr.lift_id" +
|
|
|
- " and plr.project_id in (select project_id" +
|
|
|
- " from project_user" +
|
|
|
- " where user_id = #{userId})" +
|
|
|
- " left join project p on mp.project_id = p.id" +
|
|
|
- " left join user_info ui on ui.user_id = mp.worker_id" +
|
|
|
- " where DATE_FORMAT(mp.plan_date, '%Y%m') = DATE_FORMAT(CURDATE(), '%Y%m')" +
|
|
|
- " and mp.status = '1' order by mp.plan_date";
|
|
|
}
|