maven
7 天以前 165f8c5113c4f748d608aa1c215054ae54c8ba8b
yys  批量报工
已修改2个文件
13 ■■■■■ 文件已修改
src/main/java/com/ruoyi/production/controller/SalesLedgerWorkController.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application-dev.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/production/controller/SalesLedgerWorkController.java
@@ -14,10 +14,12 @@
import com.ruoyi.production.pojo.SalesLedgerWork;
import com.ruoyi.production.service.SalesLedgerWorkService;
import com.ruoyi.production.service.impl.SalesLedgerWorkServiceImpl;
import io.jsonwebtoken.lang.Collections;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
@@ -74,9 +76,12 @@
    @Log(title = "生产管理-生产报工", businessType = BusinessType.INSERT)
    @ApiOperation("生产管理-生产报工")
    @Transactional(rollbackFor = Exception.class)
    public AjaxResult productionReport(@RequestBody ProductionReportDto productionReportDto) {
        int result = salesLedgerWorkService.productionReport(productionReportDto);
        return AjaxResult.success(result);
    public AjaxResult productionReport(@RequestBody List<ProductionReportDto> productionReportDto) {
        if(CollectionUtils.isEmpty(productionReportDto)) return AjaxResult.error("请选择要报工的记录");
        productionReportDto.forEach(item -> {
            salesLedgerWorkService.productionReport(item);
        });
        return AjaxResult.success("报工成功");
    }
src/main/resources/application-dev.yml
@@ -17,7 +17,7 @@
# 开发环境配置
server:
  # 服务器的HTTP端口,默认为8080
  port: 7003
  port: 7008
  servlet:
    # 应用的访问路径
    context-path: /