huminmin
6 天以前 d06ef3f44d6dc19dae223ab420165369ea13cc16
src/main/java/com/ruoyi/measuringinstrumentledger/controller/MeasuringInstrumentLedgerRecordController.java
@@ -5,7 +5,7 @@
import com.ruoyi.framework.aspectj.lang.annotation.Log;
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.framework.web.domain.R;
import com.ruoyi.measuringinstrumentledger.pojo.MeasuringInstrumentLedgerRecord;
import com.ruoyi.measuringinstrumentledger.service.MeasuringInstrumentLedgerRecordService;
import io.jsonwebtoken.lang.Collections;
@@ -36,29 +36,29 @@
    @GetMapping("/listPage")
    @Operation(summary = "计量器具台账记录-分页查询")
    @Log(title = "计量器具台账记录-分页查询", businessType = BusinessType.OTHER)
    public AjaxResult listPage(Page page, MeasuringInstrumentLedgerRecord measuringInstrumentLedgerRecord){
    public R<?> listPage(Page page, MeasuringInstrumentLedgerRecord measuringInstrumentLedgerRecord){
        IPage<MeasuringInstrumentLedgerRecord> listPage = measuringInstrumentLedgerRecordService.listPage(page, measuringInstrumentLedgerRecord);
        return AjaxResult.success(listPage);
        return R.ok(listPage);
    }
    @PostMapping("/update")
    @Operation(summary = "计量器具台账记录-修改")
    @Log(title = "计量器具台账记录-修改", businessType = BusinessType.UPDATE)
    @Transactional(rollbackFor = Exception.class)
    public AjaxResult update(@RequestBody MeasuringInstrumentLedgerRecord measuringInstrumentLedgerRecord) throws IOException {
    public R<?> update(@RequestBody MeasuringInstrumentLedgerRecord measuringInstrumentLedgerRecord) throws IOException {
        boolean update = measuringInstrumentLedgerRecordService.updateMeasuringInstrumentLedgerRecord(measuringInstrumentLedgerRecord);
        if (update) {
            return AjaxResult.success();
            return R.ok();
        }
        return AjaxResult.error();
        return R.fail();
    }
    @DeleteMapping("/delete")
    @Operation(summary = "计量器具台账记录-删除")
    @Log(title = "计量器具台账记录-删除", businessType = BusinessType.DELETE)
    public AjaxResult delete(@RequestBody List<Long> ids) {
        if(Collections.isEmpty(ids)) return AjaxResult.error("请选择要删除的数据");
        return AjaxResult.success(measuringInstrumentLedgerRecordService.removeBatchByIds(ids));
    public R<?> delete(@RequestBody List<Long> ids) {
        if(Collections.isEmpty(ids)) return R.fail("请选择要删除的数据");
        return R.ok(measuringInstrumentLedgerRecordService.removeBatchByIds(ids));
    }
    /**