zhangherong
2 天以前 ee530992793ed7d0b7f16f1ce07b6c53ae265068
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamWeekInspectionDetailController.java
@@ -6,15 +6,16 @@
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.util.StrUtils;
import org.jeecg.modules.eam.entity.EamWeekInspectionDetail;
import org.jeecg.modules.eam.service.IEamWeekInspectionDetailService;
import org.jeecg.modules.eam.util.DateUtils;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
 * @Description: 周点检工单明细
@@ -45,7 +46,17 @@
        queryWrapper.between(EamWeekInspectionDetail::getPlanInspectionDate, DateUtils.getFirstDayOfWeek(inspectionDate), DateUtils.getLastDayOfWeek(inspectionDate));
        queryWrapper.orderByAsc(EamWeekInspectionDetail::getItemCode);
        List<EamWeekInspectionDetail> list = eamWeekInspectionDetailService.list(queryWrapper);
        return Result.OK(list);
        //添加点检周点检是否已完成标识
        Map<String, Object> result = new HashMap<>();
        result.put("list", list);
        if (list != null && !list.isEmpty()) {
            if (!StrUtils.isEmpty(list.get(0).getInspector())) {
                result.put("weekInsFlag", true);
            } else {
                result.put("weekInsFlag", false);
            }
        }
        return Result.OK(result);
    }
}