//package cn.estsh.i3plus.ext.mes.pcn.apiservice.controller.base.ep;
//
//import cn.estsh.i3plus.ext.mes.pcn.api.base.ep.IEpEquipmentCheckDetailService;
//import cn.estsh.i3plus.ext.mes.pcn.api.base.ep.IEpMesOrderJobService;
//import cn.estsh.i3plus.ext.mes.pcn.pojo.bean.MesEpEquipmentCheckDetail;
//import cn.estsh.i3plus.ext.mes.pcn.pojo.model.ep.EpOrderJobModel;
//import cn.estsh.i3plus.platform.common.util.CommonConstWords;
//import cn.estsh.i3plus.pojo.base.common.Pager;
//import cn.estsh.i3plus.pojo.base.enumutil.ResourceEnumUtil;
//import cn.estsh.impp.framework.boot.exception.ImppBusiException;
//import cn.estsh.impp.framework.boot.exception.ImppExceptionBuilder;
//import cn.estsh.impp.framework.boot.util.ResultBean;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.*;
//
///**
// * @PROJECT_NAME: i3plus-mes-panasonic-dev
// * @DESCRIPTION:
// * @USER: xinwang.yi
// * @DATE: 2021-12-13 17:08
// */
//@RestController
//@Api(tags = "EP设备点检")
//@RequestMapping(CommonConstWords.BASE_URL_MES_PCN + "/ep-ext/order-job")
//public class EpEquipmentCheckDetailController {
//
//    @Autowired
//    private IEpEquipmentCheckDetailService mesEquipmentCheckService;
//
//    @Autowired
//    private IEpMesOrderJobService orderJobService;
//
//    @GetMapping("/equipment-check-detail/query")
//    @ApiOperation(value = "条件分页查询设备点检详细")
//    public ResultBean queryPager(MesEpEquipmentCheckDetail detail, Pager pager) {
//        try {
//            return ResultBean.success("查询成功").setListPager(this.mesEquipmentCheckService.queryByPager(detail, pager))
//                    .setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
//        } catch (ImppBusiException busExcep) {
//            return ResultBean.fail(busExcep);
//        } catch (Exception e) {
//            return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
//        }
//    }
//
//    /**
//     * 物料点检作业
//     *
//     * @param detail
//     * @return
//     */
//    @PutMapping("/equipment-check-detail/update")
//    @ApiOperation(value = "修改")
//    public ResultBean update(@RequestBody MesEpEquipmentCheckDetail detail) {
//        try {
//            this.mesEquipmentCheckService.update(detail);
//            return ResultBean.success("扫描成功")
//                    .setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
//        } catch (ImppBusiException busExcep) {
//            return ResultBean.fail(busExcep);
//        } catch (Exception e) {
//            return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
//        }
//    }
//
//    @GetMapping("/equipment-check/query")
//    @ApiOperation(value = "条件分页查询单据")
//    public ResultBean queryPager(EpOrderJobModel orderJob) {
//        try {
//            return ResultBean.success("查询成功").setResultList(orderJobService.queryMesOrderJob(orderJob))
//                    .setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
//        } catch (ImppBusiException busExcep) {
//            return ResultBean.fail(busExcep);
//        } catch (Exception e) {
//            return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
//        }
//    }
//
//    @PostMapping("/equipment-check/generate-week")
//    @ApiOperation(value = "生成周点检")
//    public ResultBean generateWeekCheck(String organizeCode, String workCenterCode) {
//
//        try {
//            mesEquipmentCheckService.generateWeekCheck(organizeCode, workCenterCode);
//            return ResultBean.success("生成成功");
//        } catch (ImppBusiException busExcep) {
//            return ResultBean.fail(busExcep);
//        } catch (Exception e) {
//            return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
//        }
//    }
//
//    @PostMapping("/equipment-check/generate-month")
//    @ApiOperation(value = "生成月点检")
//    public ResultBean generateMonthCheck(String organizeCode, String workCenterCode) {
//
//        try {
//            mesEquipmentCheckService.generateMonthCheck(organizeCode, workCenterCode);
//            return ResultBean.success("生成成功");
//        } catch (ImppBusiException busExcep) {
//            return ResultBean.fail(busExcep);
//        } catch (Exception e) {
//            return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
//        }
//    }
//
//    @GetMapping("/query-cell")
//    @ApiOperation(value = "查询工序代码下拉框")
//    public ResultBean queryCell(MesEpEquipmentCheckDetail detail) {
//        try {
//            return ResultBean.success("查询成功").setResultList(this.mesEquipmentCheckService.queryCell(detail))
//                    .setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
//        } catch (ImppBusiException busExcep) {
//            return ResultBean.fail(busExcep);
//        } catch (Exception e) {
//            return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
//        }
//    }
//
//}
