| | |
| | | import org.jeecg.modules.mes.service.IMesProductionOrderService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Arrays; |
| | | |
| | | /** |
| | | * @Description: SAP生产订单 |
| | |
| | | */ |
| | | @Api(tags="SAP生产订单") |
| | | @RestController |
| | | @RequestMapping("/mesproductionwork/mesProductionOrder") |
| | | @RequestMapping("/mes/productionOrder") |
| | | @Slf4j |
| | | public class MesProductionOrderController extends JeecgController<MesProductionOrder, IMesProductionOrderService> { |
| | | @Autowired |
| | |
| | | * @param req |
| | | * @return |
| | | */ |
| | | //@AutoLog(value = "SAP生产订单-分页列表查询") |
| | | @ApiOperation(value="SAP生产订单-分页列表查询", notes="SAP生产订单-分页列表查询") |
| | | @GetMapping(value = "/list") |
| | | public Result<IPage<MesProductionOrder>> queryPageList(MesProductionOrder mesProductionOrder, |
| | |
| | | } |
| | | |
| | | /** |
| | | * 添加 |
| | | * |
| | | * @param mesProductionOrder |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "SAP生产订单-添加") |
| | | @ApiOperation(value="SAP生产订单-添加", notes="SAP生产订单-添加") |
| | | //@RequiresPermissions("org.jeecg.modules:mes_production_order:add") |
| | | @PostMapping(value = "/add") |
| | | public Result<String> add(@RequestBody MesProductionOrder mesProductionOrder) { |
| | | mesProductionOrderService.save(mesProductionOrder); |
| | | return Result.OK("添加成功!"); |
| | | } |
| | | |
| | | /** |
| | | * 编辑 |
| | | * |
| | | * @param mesProductionOrder |
| | |
| | | */ |
| | | @AutoLog(value = "SAP生产订单-编辑") |
| | | @ApiOperation(value="SAP生产订单-编辑", notes="SAP生产订单-编辑") |
| | | //@RequiresPermissions("org.jeecg.modules:mes_production_order:edit") |
| | | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
| | | public Result<String> edit(@RequestBody MesProductionOrder mesProductionOrder) { |
| | | mesProductionOrderService.updateById(mesProductionOrder); |
| | | return Result.OK("编辑成功!"); |
| | | } |
| | | |
| | | /** |
| | | * 通过id删除 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "SAP生产订单-通过id删除") |
| | | @ApiOperation(value="SAP生产订单-通过id删除", notes="SAP生产订单-通过id删除") |
| | | //@RequiresPermissions("org.jeecg.modules:mes_production_order:delete") |
| | | @DeleteMapping(value = "/delete") |
| | | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
| | | mesProductionOrderService.removeById(id); |
| | | return Result.OK("删除成功!"); |
| | | } |
| | | |
| | | /** |
| | | * 批量删除 |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "SAP生产订单-批量删除") |
| | | @ApiOperation(value="SAP生产订单-批量删除", notes="SAP生产订单-批量删除") |
| | | //@RequiresPermissions("org.jeecg.modules:mes_production_order:deleteBatch") |
| | | @DeleteMapping(value = "/deleteBatch") |
| | | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
| | | this.mesProductionOrderService.removeByIds(Arrays.asList(ids.split(","))); |
| | | return Result.OK("批量删除成功!"); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param id |
| | | * @return |
| | | */ |
| | | //@AutoLog(value = "SAP生产订单-通过id查询") |
| | | @ApiOperation(value="SAP生产订单-通过id查询", notes="SAP生产订单-通过id查询") |
| | | @GetMapping(value = "/queryById") |
| | | public Result<MesProductionOrder> queryById(@RequestParam(name="id",required=true) String id) { |
| | |
| | | } |
| | | return Result.OK(mesProductionOrder); |
| | | } |
| | | |
| | | /** |
| | | * 导出excel |
| | | * |
| | | * @param request |
| | | * @param mesProductionOrder |
| | | */ |
| | | //@RequiresPermissions("org.jeecg.modules:mes_production_order:exportXls") |
| | | @RequestMapping(value = "/exportXls") |
| | | public ModelAndView exportXls(HttpServletRequest request, MesProductionOrder mesProductionOrder) { |
| | | return super.exportXls(request, mesProductionOrder, MesProductionOrder.class, "SAP生产订单"); |
| | | } |
| | | |
| | | /** |
| | | * 通过excel导入数据 |
| | | * |
| | | * @param request |
| | | * @param response |
| | | * @return |
| | | */ |
| | | //@RequiresPermissions("mes_production_order:importExcel") |
| | | @RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
| | | public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
| | | return super.importExcel(request, response, MesProductionOrder.class); |
| | | } |
| | | |
| | | } |