chenhj
2026-04-22 fa3428b4bb32179a42d5618357c22fe2695716ae
src/main/java/com/ruoyi/measuringinstrumentledger/controller/MeasuringInstrumentLedgerController.java
@@ -7,7 +7,7 @@
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.measuringinstrumentledger.dto.MeasuringInstrumentLedgerRecordDTO;
import com.ruoyi.measuringinstrumentledger.dto.MeasuringInstrumentLedgerDto;
import com.ruoyi.measuringinstrumentledger.mapper.MeasuringInstrumentLedgerRecordMapper;
import com.ruoyi.measuringinstrumentledger.pojo.MeasuringInstrumentLedger;
import com.ruoyi.measuringinstrumentledger.pojo.MeasuringInstrumentLedgerRecord;
@@ -16,12 +16,12 @@
import com.ruoyi.project.system.mapper.SysUserMapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import jakarta.servlet.http.HttpServletResponse;
import lombok.AllArgsConstructor;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
@@ -32,16 +32,12 @@
@RestController
@Api(tags = "计量器具台账")
@RequestMapping("/measuringInstrumentLedger")
@AllArgsConstructor
public class MeasuringInstrumentLedgerController extends BaseController {
    @Autowired
    private MeasuringInstrumentLedgerService measuringInstrumentLedgerService;
    @Autowired
    private SysUserMapper sysUserMapper;
    @Autowired
    private MeasuringInstrumentLedgerRecordMapper measuringInstrumentLedgerRecordMapper;
    private final MeasuringInstrumentLedgerService measuringInstrumentLedgerService;
    private final SysUserMapper sysUserMapper;
    private final MeasuringInstrumentLedgerRecordMapper measuringInstrumentLedgerRecordMapper;
    @GetMapping("/listPage")
@@ -107,8 +103,8 @@
    @ApiOperation("计量器具台账-检定")
    @Log(title = "计量器具台账-检定", businessType = BusinessType.UPDATE)
    @Transactional(rollbackFor = Exception.class)
    public AjaxResult verifying(@RequestBody MeasuringInstrumentLedgerRecordDTO measuringInstrumentLedgerRecordDTO) throws IOException {
        boolean update = measuringInstrumentLedgerService.verifying(measuringInstrumentLedgerRecordDTO);
    public AjaxResult verifying(@RequestBody MeasuringInstrumentLedgerDto measuringInstrumentLedger) throws IOException {
        boolean update = measuringInstrumentLedgerService.verifying(measuringInstrumentLedger);
        return update ? AjaxResult.success("检定成功") : AjaxResult.error("检定失败");
    }