联调问题
This commit is contained in:
parent
4d4c9bb800
commit
128df171ee
|
|
@ -40,6 +40,7 @@ public class DayPlanController extends BaseController {
|
|||
List<DayPlanVo> list = dayPlanService.getDayPlanList(dayPlanVo);
|
||||
return getDataTable(list);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
return getDataTable(null);
|
||||
}
|
||||
}
|
||||
|
|
@ -56,6 +57,7 @@ public class DayPlanController extends BaseController {
|
|||
return AjaxResult.error("新增失败");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
return AjaxResult.error("系统异常,请联系管理员");
|
||||
}
|
||||
}
|
||||
|
|
@ -72,6 +74,7 @@ public class DayPlanController extends BaseController {
|
|||
return AjaxResult.error("删除失败");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
return AjaxResult.error("系统异常,请联系管理员");
|
||||
}
|
||||
}
|
||||
|
|
@ -88,6 +91,7 @@ public class DayPlanController extends BaseController {
|
|||
return AjaxResult.error("修改失败");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
return AjaxResult.error("系统异常,请联系管理员");
|
||||
}
|
||||
}
|
||||
|
|
@ -145,6 +149,7 @@ public class DayPlanController extends BaseController {
|
|||
try {
|
||||
return LocalDate.parse(dateStr.trim(), formatter);
|
||||
} catch (DateTimeParseException e) {
|
||||
log.error(e.getMessage());
|
||||
// 解析失败(如格式错误),返回当前日期
|
||||
return LocalDate.now();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ public class MonthlyPlanController extends BaseController {
|
|||
List<MonthlyPlanVo> list = monthlyPlanService.getPlanMajorList(monthlyPlanVo);
|
||||
return getDataTable(list);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
return getDataTable(null);
|
||||
}
|
||||
}
|
||||
|
|
@ -57,6 +58,7 @@ public class MonthlyPlanController extends BaseController {
|
|||
List<MonthlyPlanVo> list = monthlyPlanService.getPlanMajorList(monthlyPlanVo);
|
||||
return AjaxResult.success(list);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
return AjaxResult.error("请求错误");
|
||||
}
|
||||
}
|
||||
|
|
@ -75,6 +77,7 @@ public class MonthlyPlanController extends BaseController {
|
|||
return AjaxResult.error("新增失败");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
return AjaxResult.error("系统异常,请联系管理员");
|
||||
}
|
||||
}
|
||||
|
|
@ -93,6 +96,7 @@ public class MonthlyPlanController extends BaseController {
|
|||
return AjaxResult.error("删除失败");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
return AjaxResult.error("系统异常,请联系管理员");
|
||||
}
|
||||
}
|
||||
|
|
@ -111,6 +115,7 @@ public class MonthlyPlanController extends BaseController {
|
|||
return AjaxResult.error("修改失败");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
return AjaxResult.error("系统异常,请联系管理员");
|
||||
}
|
||||
}
|
||||
|
|
@ -174,4 +179,18 @@ public class MonthlyPlanController extends BaseController {
|
|||
// 2. 调用工具类导出
|
||||
ResourceSummaryExcelExporter.export(response, dataList, monthlyPlanVo.getMonthlyPlan());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取月计划详情
|
||||
*/
|
||||
@GetMapping("/getMonthlyPlanById")
|
||||
public AjaxResult getMonthlyPlanById(MonthlyPlanVo monthlyPlanVo) {
|
||||
try {
|
||||
MonthlyPlanVo res = monthlyPlanService.getMonthlyPlanById(monthlyPlanVo);
|
||||
return AjaxResult.success(res);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
return AjaxResult.error("请求错误");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ public class PersonnelClassificationController extends BaseController {
|
|||
List<PersonnelClassificationVo> list = personnelClassificationService.classificationList(personnelClassificationVo);
|
||||
return getDataTable(list);
|
||||
}catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
return getDataTable(null);
|
||||
}
|
||||
}
|
||||
|
|
@ -56,6 +57,7 @@ public class PersonnelClassificationController extends BaseController {
|
|||
return AjaxResult.error("新增失败");
|
||||
}
|
||||
}catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
return AjaxResult.error("系统异常,请联系管理员");
|
||||
}
|
||||
}
|
||||
|
|
@ -75,6 +77,7 @@ public class PersonnelClassificationController extends BaseController {
|
|||
return AjaxResult.error("删除失败");
|
||||
}
|
||||
}catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
return AjaxResult.error("系统异常,请联系管理员");
|
||||
}
|
||||
}
|
||||
|
|
@ -94,6 +97,7 @@ public class PersonnelClassificationController extends BaseController {
|
|||
return AjaxResult.error("修改失败");
|
||||
}
|
||||
}catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
return AjaxResult.error("系统异常,请联系管理员");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ public class PersonnelController extends BaseController {
|
|||
List<PersonnelVo> list = personnelService.getPersonnelList(personnelVo);
|
||||
return getDataTable(list);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
return getDataTable(null);
|
||||
}
|
||||
}
|
||||
|
|
@ -53,6 +54,7 @@ public class PersonnelController extends BaseController {
|
|||
List<PersonnelVo> list = personnelService.getPersonnelList(personnelVo);
|
||||
return AjaxResult.success(list);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
return error("接口异常");
|
||||
}
|
||||
}
|
||||
|
|
@ -65,6 +67,7 @@ public class PersonnelController extends BaseController {
|
|||
List<SelectDto> list = personnelService.getInspectionStationSelect(vo.getCategory());
|
||||
return AjaxResult.success(list);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
return AjaxResult.error("接口异常");
|
||||
}
|
||||
}
|
||||
|
|
@ -77,6 +80,7 @@ public class PersonnelController extends BaseController {
|
|||
List<SelectDto> list = personnelService.getPersonnelClassificationSelect(vo.getCategory());
|
||||
return AjaxResult.success(list);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
return AjaxResult.error("接口异常");
|
||||
}
|
||||
}
|
||||
|
|
@ -95,6 +99,7 @@ public class PersonnelController extends BaseController {
|
|||
return AjaxResult.error("新增失败");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
return AjaxResult.error("系统异常,请联系管理员");
|
||||
}
|
||||
}
|
||||
|
|
@ -113,6 +118,7 @@ public class PersonnelController extends BaseController {
|
|||
return AjaxResult.error("删除失败");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
return AjaxResult.error("系统异常,请联系管理员");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ public class PlanMajorController extends BaseController {
|
|||
List<PlanMajorVo> list = planMajorService.getPlanMajorList(planMajorVo);
|
||||
return getDataTable(list);
|
||||
}catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
return getDataTable(null);
|
||||
}
|
||||
}
|
||||
|
|
@ -54,6 +55,7 @@ public class PlanMajorController extends BaseController {
|
|||
List<PlanMajorVo> list = planMajorService.getPlanMajorList(planMajorVo);
|
||||
return success(list);
|
||||
}catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
return error("系统异常");
|
||||
}
|
||||
}
|
||||
|
|
@ -73,6 +75,7 @@ public class PlanMajorController extends BaseController {
|
|||
return AjaxResult.error("新增失败");
|
||||
}
|
||||
}catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
return AjaxResult.error("系统异常,请联系管理员");
|
||||
}
|
||||
}
|
||||
|
|
@ -92,6 +95,7 @@ public class PlanMajorController extends BaseController {
|
|||
return AjaxResult.error("删除失败");
|
||||
}
|
||||
}catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
return AjaxResult.error("系统异常,请联系管理员");
|
||||
}
|
||||
}
|
||||
|
|
@ -111,6 +115,7 @@ public class PlanMajorController extends BaseController {
|
|||
return AjaxResult.error("修改失败");
|
||||
}
|
||||
}catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
return AjaxResult.error("系统异常,请联系管理员");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ public class PlanManagementController extends BaseController {
|
|||
List<PlanManagementVo> list = planManagementService.getPlanManagementList(planManagementVo);
|
||||
return getDataTable(list);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
return getDataTable(null);
|
||||
}
|
||||
}
|
||||
|
|
@ -60,6 +61,7 @@ public class PlanManagementController extends BaseController {
|
|||
List<PlanManagementVo> list = planManagementService.getPlanManagementList(planManagementVo);
|
||||
return AjaxResult.success(list);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
return AjaxResult.error("请求错误");
|
||||
}
|
||||
}
|
||||
|
|
@ -78,6 +80,7 @@ public class PlanManagementController extends BaseController {
|
|||
return AjaxResult.error("新增失败");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
return AjaxResult.error("系统异常,请联系管理员");
|
||||
}
|
||||
}
|
||||
|
|
@ -96,6 +99,7 @@ public class PlanManagementController extends BaseController {
|
|||
return AjaxResult.error("删除失败");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
return AjaxResult.error("系统异常,请联系管理员");
|
||||
}
|
||||
}
|
||||
|
|
@ -114,6 +118,7 @@ public class PlanManagementController extends BaseController {
|
|||
return AjaxResult.error("修改失败");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
return AjaxResult.error("系统异常,请联系管理员");
|
||||
}
|
||||
}
|
||||
|
|
@ -130,6 +135,7 @@ public class PlanManagementController extends BaseController {
|
|||
String message = planManagementService.importPlanManagement(planManagementList);
|
||||
return success(message);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
return AjaxResult.error("系统异常,请联系管理员");
|
||||
}
|
||||
}
|
||||
|
|
@ -153,6 +159,7 @@ public class PlanManagementController extends BaseController {
|
|||
response.flushBuffer();
|
||||
//log.info("文件下载成功!!");
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -69,4 +69,9 @@ public interface MonthlyPlanMapper {
|
|||
int updateMonthlyPlan(MonthlyPlanVo monthlyPlanVo);
|
||||
|
||||
List<MonthlyPlanVo> getPlanMajorListByMonth(MonthlyPlanVo monthlyPlanVo);
|
||||
|
||||
/**
|
||||
* 获取月计划详情
|
||||
*/
|
||||
MonthlyPlanVo getMonthlyPlanById(MonthlyPlanVo monthlyPlanVo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,4 +45,9 @@ public interface MonthlyPlanService {
|
|||
*/
|
||||
List<ResourceSummaryVo> exportResourceSummary(MonthlyPlanVo monthlyPlanVo);
|
||||
|
||||
|
||||
/**
|
||||
* 获取月计划详情
|
||||
*/
|
||||
MonthlyPlanVo getMonthlyPlanById(MonthlyPlanVo monthlyPlanVo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -304,6 +304,37 @@ public class MonthlyPlanServiceImpl implements MonthlyPlanService {
|
|||
return finalResourceList;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取月计划详情
|
||||
*/
|
||||
@Override
|
||||
public MonthlyPlanVo getMonthlyPlanById(MonthlyPlanVo monthlyPlanVo) {
|
||||
try {
|
||||
MonthlyPlanVo res = monthlyPlanMapper.getMonthlyPlanById(monthlyPlanVo);
|
||||
if (StringUtils.isNotEmpty(res.getPlanPersonnel())){
|
||||
//获取每个月计划投入的管理人员
|
||||
List<String> plannedIdList = Arrays.asList(res.getPlanPersonnel().split(","));
|
||||
PersonnelVo personnelVo = new PersonnelVo();
|
||||
personnelVo.setIdList(plannedIdList);
|
||||
List<PersonnelVo> plannedList = personnelMapper.getPersonnelList(personnelVo);
|
||||
res.setPersonneltList(plannedList);
|
||||
//获取人员安排信息
|
||||
List<PersonnelArrangementVo> personnelArrangementVoList = monthlyPlanMapper.getPersonnelArrangementList(res);
|
||||
res.setPersonnelArrangementList(personnelArrangementVoList);
|
||||
}
|
||||
WorkloadVo workloadVo = new WorkloadVo();
|
||||
workloadVo.setPlanId(res.getMonthlyPlanId());
|
||||
workloadVo.setDataSource("0");
|
||||
List<WorkloadVo> workloadVoList = workloadCategoryMapper.getWorkloadList(workloadVo);
|
||||
res.setWorkloadList(workloadVoList);
|
||||
return res;
|
||||
}catch (Exception e){
|
||||
log.error(e.getMessage());
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通用计算比值(工日/总工日 ×100%,保留2位小数)
|
||||
* @param workday 某类型工日(ResourceSummaryVo字段)
|
||||
|
|
|
|||
|
|
@ -930,5 +930,31 @@
|
|||
ORDER BY base_data.inspection_station_name ASC;
|
||||
]]>
|
||||
</select>
|
||||
<select id="getMonthlyPlanById" resultType="com.bonus.digital.dao.MonthlyPlanVo">
|
||||
select tmp.monthly_plan_id,
|
||||
tmp.monthly_plan,
|
||||
tmp.inspection_station_id,
|
||||
tmp.inspection_station_name,
|
||||
tmp.plan_major_id,
|
||||
tmp.business_type_id,
|
||||
tmp.project_name,
|
||||
tmp.work_content,
|
||||
tmp.plan_category_id,
|
||||
tmp.tower_base_number,
|
||||
tmp.planned_start_time,
|
||||
tmp.planned_end_time,
|
||||
tmp.plan_personnel,
|
||||
tmp.plan_car_num,
|
||||
tmp.plan_skilled_worker_num,
|
||||
tmp.plan_auxiliary_worker_num,
|
||||
tmp.plan_sub_car_num,
|
||||
tmp.create_user,
|
||||
tmp.create_time,
|
||||
tmp.risk_level,
|
||||
tmp.actual_working_day
|
||||
from tb_monthly_plan tmp
|
||||
left join tb_plan_major tpm on tmp.plan_major_id = tpm.plan_major_id
|
||||
where tmp.monthly_plan_id = #{monthlyPlanId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue