新火炬后端单体项目初始化代码
zhangherong
2 天以前 7acd9609e6fd88500f6056165a021b1f6ce0f697
src/main/java/org/jeecg/modules/mes/controller/MesMaterialTransferRequestController.java
@@ -10,8 +10,10 @@
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.eam.constant.BusinessCodeConst;
import org.jeecg.modules.mes.entity.MesMaterialTransferRequest;
import org.jeecg.modules.mes.service.IMesMaterialTransferRequestService;
import org.jeecg.modules.system.service.ISysBusinessCodeRuleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
@@ -33,6 +35,8 @@
public class MesMaterialTransferRequestController extends JeecgController<MesMaterialTransferRequest, IMesMaterialTransferRequestService> {
   @Autowired
   private IMesMaterialTransferRequestService mesMaterialTransferRequestService;
    @Autowired
    private ISysBusinessCodeRuleService businessCodeRuleService;
   /**
    * 分页列表查询
@@ -59,15 +63,19 @@
   /**
    *   添加
    *
    * @param mesMaterialTransferRequest
     * @param request
    * @return
    */
   @AutoLog(value = "物料拉动申请-添加")
   @ApiOperation(value="物料拉动申请-添加", notes="物料拉动申请-添加")
   //@RequiresPermissions("org.jeecg.modules:mes_material_transfer_request:add")
   @PostMapping(value = "/add")
   public Result<String> add(@RequestBody MesMaterialTransferRequest mesMaterialTransferRequest) {
       mesMaterialTransferRequestService.save(mesMaterialTransferRequest);
    public Result<String> add(@RequestBody MesMaterialTransferRequest request) {
        String codeSeq = businessCodeRuleService.generateBusinessCodeSeq(BusinessCodeConst.MATERIAL_TRANSFER_CODE_RULE);
        request.setRequestCode(codeSeq);
        boolean b = mesMaterialTransferRequestService.addMaterialTransferRequest(request);
        if(!b) {
            return Result.error("添加失败!");
        }
       return Result.OK("添加成功!");
   }
@@ -157,6 +165,7 @@
   public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
       return super.importExcel(request, response, MesMaterialTransferRequest.class);
   }
   /*
   * 通过workOrderId 查询mesMaterialTransferRequest数据
   *@param workOrderId