新火炬后端单体项目初始化代码
zhangherong
8 天以前 d1d5454cb3512acb16a0f0e6d68e52f3ebc72e66
src/main/java/org/jeecg/modules/mes/controller/MesProductionOrderController.java
@@ -14,11 +14,8 @@
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生产订单
@@ -28,7 +25,7 @@
*/
@Api(tags="SAP生产订单")
@RestController
@RequestMapping("/mesproductionwork/mesProductionOrder")
@RequestMapping("/mes/productionOrder")
@Slf4j
public class MesProductionOrderController extends JeecgController<MesProductionOrder, IMesProductionOrderService> {
   @Autowired
@@ -43,7 +40,6 @@
    * @param req
    * @return
    */
   //@AutoLog(value = "SAP生产订单-分页列表查询")
   @ApiOperation(value="SAP生产订单-分页列表查询", notes="SAP生产订单-分页列表查询")
   @GetMapping(value = "/list")
   public Result<IPage<MesProductionOrder>> queryPageList(MesProductionOrder mesProductionOrder,
@@ -57,21 +53,6 @@
   }
   /**
    *   添加
    *
    * @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
@@ -79,41 +60,10 @@
    */
   @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("批量删除成功!");
   }
   /**
@@ -122,7 +72,6 @@
    * @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) {
@@ -132,30 +81,4 @@
       }
       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);
   }
}