|
@@ -28,7 +28,6 @@ import cn.com.ty.lift.common.utils.DateUtils;
|
|
|
import cn.com.xwy.boot.web.dto.RestResponse;
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
-import cn.hutool.poi.excel.ExcelUtil;
|
|
|
import cn.hutool.poi.excel.ExcelWriter;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
@@ -232,6 +231,11 @@ public class MaintenancePlanService extends ServiceImpl<MaintenancePlanMapper, M
|
|
|
* @date 2019/12/16 2:14 PM
|
|
|
*/
|
|
|
public RestResponse insertBatch(MaintenancePlanRequest request) {
|
|
|
+ String demand = request.getDemand();
|
|
|
+ if ("0".equals(demand)) {
|
|
|
+ Integer interval = request.getInterval();
|
|
|
+ if (interval > 15) return RestResponse.fail("维保间隔最大值为15");
|
|
|
+ }
|
|
|
List<MaintenancePlan> planList = request.getPlanList();
|
|
|
boolean result = preJudgment(planList, request.getFirstTime());
|
|
|
if (!result) {
|