Search in sources :

Example 1 with InstallPlanActualDetails

use of com.eservice.api.model.install_plan_actual.InstallPlanActualDetails in project sinsim by WilsonHu.

the class InstallPlanActualController method selectInstallPlanActualDetails.

/**
 * 根据条件查询排产计划及其完成情况细节。
 *
 * @param orderNum 订单编号
 * @param nameplate 机器编号
 * @param installGroupName 安装组名称
 * @param type 排产类型: 部装,总装
 * @param queryStartTime 计划日期起始
 * @param queryFinishTime 计划日期结束
 * @param isNotFinished true时查询未完成的排产,为false时查询 或空时 不管是否完成。
 * @return
 */
@PostMapping("/selectInstallPlanActualDetails")
public Result selectInstallPlanActualDetails(@RequestParam(defaultValue = "0") Integer page, @RequestParam(defaultValue = "0") Integer size, String orderNum, String nameplate, String installGroupName, String type, String queryStartTime, String queryFinishTime, Boolean isNotFinished) {
    PageHelper.startPage(page, size);
    List<InstallPlanActualDetails> list = installPlanActualService.selectInstallPlanActualDetails(orderNum, nameplate, installGroupName, type, queryStartTime, queryFinishTime, isNotFinished);
    PageInfo pageInfo = new PageInfo(list);
    return ResultGenerator.genSuccessResult(pageInfo);
}
Also used : PageInfo(com.github.pagehelper.PageInfo) InstallPlanActualDetails(com.eservice.api.model.install_plan_actual.InstallPlanActualDetails)

Example 2 with InstallPlanActualDetails

use of com.eservice.api.model.install_plan_actual.InstallPlanActualDetails in project sinsim by WilsonHu.

the class InstallPlanController method isOKtoSetPlan.

/**
 * 一次性添加多个排产。
 * @return
 */
// @PostMapping("/addInstallPlanList")
// public Result addInstallPlanList(
// //            @RequestBody List<String> installPlanList
// @RequestParam(value = "installPlanList") List<InstallPlan> installPlanList
// ) {
// 
// 
// Result result = null;
// logger.warn("aaaaaaaaa:" + installPlanList.get(0));
// return ResultGenerator.genSuccessResult();
// }
// 是否可以安排该机器该安装组(用于检查一些不合法的安排)
boolean isOKtoSetPlan(Integer installGroupId, Integer machineId) {
    InstallGroup installGroup = installGroupService.findById(installGroupId);
    if (installGroup == null) {
        logger.warn("Can not find the installGroup by id " + installGroupId);
        return false;
    }
    Machine machine = machineService.findById(machineId);
    if (machine == null) {
        logger.warn("Can not find the machine by id " + machineId);
        return false;
    }
    List<InstallPlanActualDetails> list = installPlanActualService.selectInstallPlanActualDetails(null, machine.getNameplate(), installGroup.getGroupName(), null, null, null, null);
    if (list == null || list.isEmpty()) {
        return true;
    } else {
        return false;
    }
}
Also used : InstallPlanActualDetails(com.eservice.api.model.install_plan_actual.InstallPlanActualDetails) InstallGroup(com.eservice.api.model.install_group.InstallGroup) Machine(com.eservice.api.model.machine.Machine)

Aggregations

InstallPlanActualDetails (com.eservice.api.model.install_plan_actual.InstallPlanActualDetails)2 InstallGroup (com.eservice.api.model.install_group.InstallGroup)1 Machine (com.eservice.api.model.machine.Machine)1 PageInfo (com.github.pagehelper.PageInfo)1