package com.consum.base.controller; import com.consum.base.BaseController; import com.consum.base.pojo.LWhFormInventoryParam; import com.consum.base.pojo.LWhFormScrappedParam; import com.consum.base.service.LWhFormScrappedServiceImpl; import com.consum.model.po.FinSysTenantUser; import com.iplatform.model.po.S_user_core; import com.walker.web.ResponseValue; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** * @Description 报废单 * @Author 卢庆阳 * @Date 2023/11/1 */ @RestController @RequestMapping("/pc/l/wh/form/scrapped") public class LWhFormScrappedController extends BaseController { @Autowired private LWhFormScrappedServiceImpl lWhFormScrappedService; /** * @Description 新增报废单 * @Author 卢庆阳 * @Date 2023/11/1 */ @PostMapping("/add") public ResponseValue add(@RequestBody LWhFormScrappedParam param) { //根据盘点人id查询盘点人 S_user_core operatorUser = this.getUser(param.getOperatorId()); FinSysTenantUser sysInfo = this.getSysInfo(); int result = this.lWhFormScrappedService.add(param, sysInfo,operatorUser); if (result > 0) return ResponseValue.success(1); return ResponseValue.error("新增失败!"); } }