修改材料和机械出入库逻辑

This commit is contained in:
lcj
2025-04-30 17:30:06 +08:00
parent a1db4ecaf2
commit 49fde18df2
20 changed files with 198 additions and 128 deletions

View File

@ -39,7 +39,7 @@ import java.util.List;
@RequestMapping("/machinery/machinery") @RequestMapping("/machinery/machinery")
public class EqpMachineryController extends BaseController { public class EqpMachineryController extends BaseController {
private final IEqpMachineryService busMachineryService; private final IEqpMachineryService machineryService;
/** /**
* 查询机械列表 * 查询机械列表
@ -47,7 +47,7 @@ public class EqpMachineryController extends BaseController {
@SaCheckPermission("machinery:machinery:list") @SaCheckPermission("machinery:machinery:list")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo<EqpMachineryVo> list(EqpMachineryQueryReq req, PageQuery pageQuery) { public TableDataInfo<EqpMachineryVo> list(EqpMachineryQueryReq req, PageQuery pageQuery) {
return busMachineryService.queryPageList(req, pageQuery); return machineryService.queryPageList(req, pageQuery);
} }
/** /**
@ -57,7 +57,7 @@ public class EqpMachineryController extends BaseController {
@Log(title = "机械", businessType = BusinessType.EXPORT) @Log(title = "机械", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(EqpMachineryQueryReq req, HttpServletResponse response) { public void export(EqpMachineryQueryReq req, HttpServletResponse response) {
List<EqpMachineryVo> list = busMachineryService.queryList(req); List<EqpMachineryVo> list = machineryService.queryList(req);
ExcelUtil.exportExcel(list, "机械", EqpMachineryVo.class, response); ExcelUtil.exportExcel(list, "机械", EqpMachineryVo.class, response);
} }
@ -67,7 +67,7 @@ public class EqpMachineryController extends BaseController {
@SaCheckPermission("machinery:machinery:list") @SaCheckPermission("machinery:machinery:list")
@GetMapping("/list/gis") @GetMapping("/list/gis")
public R<List<EqpMachineryGisVo>> queryGisList(EqpMachineryGisReq req) { public R<List<EqpMachineryGisVo>> queryGisList(EqpMachineryGisReq req) {
return R.ok(busMachineryService.queryGisList(req)); return R.ok(machineryService.queryGisList(req));
} }
/** /**
@ -79,7 +79,7 @@ public class EqpMachineryController extends BaseController {
@GetMapping("/{id}") @GetMapping("/{id}")
public R<EqpMachineryVo> getInfo(@NotNull(message = "主键不能为空") public R<EqpMachineryVo> getInfo(@NotNull(message = "主键不能为空")
@PathVariable Long id) { @PathVariable Long id) {
return R.ok(busMachineryService.queryById(id)); return R.ok(machineryService.queryById(id));
} }
/** /**
@ -90,7 +90,7 @@ public class EqpMachineryController extends BaseController {
@RepeatSubmit() @RepeatSubmit()
@PostMapping() @PostMapping()
public R<Long> add(@Validated(AddGroup.class) @RequestBody EqpMachineryCreateReq req) { public R<Long> add(@Validated(AddGroup.class) @RequestBody EqpMachineryCreateReq req) {
return R.ok(busMachineryService.insertByBo(req)); return R.ok(machineryService.insertByBo(req));
} }
/** /**
@ -101,7 +101,7 @@ public class EqpMachineryController extends BaseController {
@RepeatSubmit() @RepeatSubmit()
@PutMapping() @PutMapping()
public R<Void> edit(@Validated(EditGroup.class) @RequestBody EqpMachineryUpdateReq req) { public R<Void> edit(@Validated(EditGroup.class) @RequestBody EqpMachineryUpdateReq req) {
return toAjax(busMachineryService.updateByBo(req)); return toAjax(machineryService.updateByBo(req));
} }
/** /**
@ -114,6 +114,6 @@ public class EqpMachineryController extends BaseController {
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public R<Void> remove(@NotEmpty(message = "主键不能为空") public R<Void> remove(@NotEmpty(message = "主键不能为空")
@PathVariable Long[] ids) { @PathVariable Long[] ids) {
return toAjax(busMachineryService.deleteWithValidByIds(List.of(ids), true)); return toAjax(machineryService.deleteWithValidByIds(List.of(ids), true));
} }
} }

View File

@ -37,7 +37,7 @@ import java.util.List;
@RequestMapping("/machinery/machineryDetail") @RequestMapping("/machinery/machineryDetail")
public class EqpMachineryDetailController extends BaseController { public class EqpMachineryDetailController extends BaseController {
private final IEqpMachineryDetailService busMachineryDetailService; private final IEqpMachineryDetailService machineryDetailService;
/** /**
* 查询机械详情列表 * 查询机械详情列表
@ -45,7 +45,7 @@ public class EqpMachineryDetailController extends BaseController {
@SaCheckPermission("machinery:machineryDetail:list") @SaCheckPermission("machinery:machineryDetail:list")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo<EqpMachineryDetailVo> list(EqpMachineryDetailQueryReq req, PageQuery pageQuery) { public TableDataInfo<EqpMachineryDetailVo> list(EqpMachineryDetailQueryReq req, PageQuery pageQuery) {
return busMachineryDetailService.queryPageList(req, pageQuery); return machineryDetailService.queryPageList(req, pageQuery);
} }
/** /**
@ -55,7 +55,7 @@ public class EqpMachineryDetailController extends BaseController {
@Log(title = "机械详情", businessType = BusinessType.EXPORT) @Log(title = "机械详情", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(EqpMachineryDetailQueryReq req, HttpServletResponse response) { public void export(EqpMachineryDetailQueryReq req, HttpServletResponse response) {
List<EqpMachineryDetailVo> list = busMachineryDetailService.queryList(req); List<EqpMachineryDetailVo> list = machineryDetailService.queryList(req);
ExcelUtil.exportExcel(list, "机械详情", EqpMachineryDetailVo.class, response); ExcelUtil.exportExcel(list, "机械详情", EqpMachineryDetailVo.class, response);
} }
@ -68,7 +68,7 @@ public class EqpMachineryDetailController extends BaseController {
@GetMapping("/{id}") @GetMapping("/{id}")
public R<EqpMachineryDetailVo> getInfo(@NotNull(message = "主键不能为空") public R<EqpMachineryDetailVo> getInfo(@NotNull(message = "主键不能为空")
@PathVariable Long id) { @PathVariable Long id) {
return R.ok(busMachineryDetailService.queryById(id)); return R.ok(machineryDetailService.queryById(id));
} }
/** /**
@ -79,7 +79,7 @@ public class EqpMachineryDetailController extends BaseController {
@RepeatSubmit() @RepeatSubmit()
@PostMapping() @PostMapping()
public R<Long> add(@Validated(AddGroup.class) @RequestBody EqpMachineryDetailCreateReq req) { public R<Long> add(@Validated(AddGroup.class) @RequestBody EqpMachineryDetailCreateReq req) {
return R.ok(busMachineryDetailService.insertByBo(req)); return R.ok(machineryDetailService.insertByBo(req));
} }
/** /**
@ -90,7 +90,7 @@ public class EqpMachineryDetailController extends BaseController {
@RepeatSubmit() @RepeatSubmit()
@PutMapping() @PutMapping()
public R<Void> edit(@Validated(EditGroup.class) @RequestBody EqpMachineryDetailUpdateReq req) { public R<Void> edit(@Validated(EditGroup.class) @RequestBody EqpMachineryDetailUpdateReq req) {
return toAjax(busMachineryDetailService.updateByBo(req)); return toAjax(machineryDetailService.updateByBo(req));
} }
/** /**
@ -103,6 +103,6 @@ public class EqpMachineryDetailController extends BaseController {
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public R<Void> remove(@NotEmpty(message = "主键不能为空") public R<Void> remove(@NotEmpty(message = "主键不能为空")
@PathVariable Long[] ids) { @PathVariable Long[] ids) {
return toAjax(busMachineryDetailService.deleteWithValidByIds(List.of(ids), true)); return toAjax(machineryDetailService.deleteWithValidByIds(List.of(ids), true));
} }
} }

View File

@ -0,0 +1,24 @@
package org.dromara.machinery.domain.enums;
import lombok.Getter;
/**
* @author lcj
* @date 2025/4/30 15:29
*/
@Getter
public enum EqpMachineryDetailTypeEnum {
PUT("入场", "0"),
OUT("出场", "1");
private final String text;
private final String value;
EqpMachineryDetailTypeEnum(String text, String value) {
this.text = text;
this.value = value;
}
}

View File

@ -2,6 +2,7 @@ package org.dromara.machinery.service.impl;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jakarta.annotation.Resource; import jakarta.annotation.Resource;
@ -14,6 +15,7 @@ import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.dromara.common.satoken.utils.LoginHelper; import org.dromara.common.satoken.utils.LoginHelper;
import org.dromara.machinery.domain.EqpMachinery; import org.dromara.machinery.domain.EqpMachinery;
import org.dromara.machinery.domain.EqpMachineryDetail; import org.dromara.machinery.domain.EqpMachineryDetail;
import org.dromara.machinery.domain.enums.EqpMachineryDetailTypeEnum;
import org.dromara.machinery.domain.req.machinerydetail.EqpMachineryDetailCreateReq; import org.dromara.machinery.domain.req.machinerydetail.EqpMachineryDetailCreateReq;
import org.dromara.machinery.domain.req.machinerydetail.EqpMachineryDetailQueryReq; import org.dromara.machinery.domain.req.machinerydetail.EqpMachineryDetailQueryReq;
import org.dromara.machinery.domain.req.machinerydetail.EqpMachineryDetailUpdateReq; import org.dromara.machinery.domain.req.machinerydetail.EqpMachineryDetailUpdateReq;
@ -101,12 +103,29 @@ public class EqpMachineryDetailServiceImpl extends ServiceImpl<EqpMachineryDetai
* @return 是否新增成功 * @return 是否新增成功
*/ */
@Override @Override
@Transactional(rollbackFor = Exception.class)
public Long insertByBo(EqpMachineryDetailCreateReq req) { public Long insertByBo(EqpMachineryDetailCreateReq req) {
// 将实体类和 DTO 进行转换 // 将实体类和 DTO 进行转换
EqpMachineryDetail machineryDetail = new EqpMachineryDetail(); EqpMachineryDetail machineryDetail = new EqpMachineryDetail();
BeanUtils.copyProperties(req, machineryDetail); BeanUtils.copyProperties(req, machineryDetail);
// 数据校验 // 数据校验
req.setType(EqpMachineryDetailTypeEnum.PUT.getValue());
validEntityBeforeSave(machineryDetail); validEntityBeforeSave(machineryDetail);
// 判断是否存在
Long count = this.lambdaQuery()
.eq(EqpMachineryDetail::getCheckoutNumber, req.getCheckoutNumber())
.count();
if (count > 0) {
throw new ServiceException("该编号机械已存在", HttpStatus.BAD_REQUEST);
}
// 修改机械数量
LambdaUpdateWrapper<EqpMachinery> lqw = new LambdaUpdateWrapper<>();
lqw.eq(EqpMachinery::getId, machineryDetail.getMachineryId());
lqw.setSql("number = number + 1");
boolean update = machineryService.update(lqw);
if (!update) {
throw new ServiceException("修改机械数量失败,数据库异常", HttpStatus.ERROR);
}
// 操作数据库 // 操作数据库
boolean save = this.save(machineryDetail); boolean save = this.save(machineryDetail);
if (!save) { if (!save) {
@ -122,6 +141,7 @@ public class EqpMachineryDetailServiceImpl extends ServiceImpl<EqpMachineryDetai
* @return 是否修改成功 * @return 是否修改成功
*/ */
@Override @Override
@Transactional(rollbackFor = Exception.class)
public Boolean updateByBo(EqpMachineryDetailUpdateReq req) { public Boolean updateByBo(EqpMachineryDetailUpdateReq req) {
// 将实体类和 DTO 进行转换 // 将实体类和 DTO 进行转换
EqpMachineryDetail machineryDetail = new EqpMachineryDetail(); EqpMachineryDetail machineryDetail = new EqpMachineryDetail();
@ -133,6 +153,27 @@ public class EqpMachineryDetailServiceImpl extends ServiceImpl<EqpMachineryDetai
if (oldMachineryDetail == null) { if (oldMachineryDetail == null) {
throw new ServiceException("修改机械详情失败,数据不存在", HttpStatus.NOT_FOUND); throw new ServiceException("修改机械详情失败,数据不存在", HttpStatus.NOT_FOUND);
} }
String type = req.getType();
Long machineryId = machineryDetail.getMachineryId();
if (!type.equals(oldMachineryDetail.getType())) {
if (EqpMachineryDetailTypeEnum.PUT.getValue().equals(type)) {
LambdaUpdateWrapper<EqpMachinery> lqw = new LambdaUpdateWrapper<>();
lqw.eq(EqpMachinery::getId, machineryId);
lqw.setSql("number = number + 1");
boolean update = machineryService.update(lqw);
if (!update) {
throw new ServiceException("修改机械数量失败,数据库异常", HttpStatus.ERROR);
}
} else if (EqpMachineryDetailTypeEnum.OUT.getValue().equals(type)) {
LambdaUpdateWrapper<EqpMachinery> lqw = new LambdaUpdateWrapper<>();
lqw.eq(EqpMachinery::getId, machineryId);
lqw.setSql("number = number - 1");
boolean update = machineryService.update(lqw);
if (!update) {
throw new ServiceException("修改机械数量失败,数据库异常", HttpStatus.ERROR);
}
}
}
// 操作数据库 // 操作数据库
return this.updateById(machineryDetail); return this.updateById(machineryDetail);
} }
@ -149,10 +190,6 @@ public class EqpMachineryDetailServiceImpl extends ServiceImpl<EqpMachineryDetai
if (machineryService.getById(machineryId) == null) { if (machineryService.getById(machineryId) == null) {
throw new ServiceException("对应机械不存在", HttpStatus.BAD_REQUEST); throw new ServiceException("对应机械不存在", HttpStatus.BAD_REQUEST);
} }
String type = entity.getType();
if (StringUtils.isEmpty(type)) {
throw new ServiceException("请选择入场/出场", HttpStatus.BAD_REQUEST);
}
} }
/** /**

View File

@ -39,7 +39,7 @@ import java.util.List;
@RequestMapping("/materials/company") @RequestMapping("/materials/company")
public class MatCompanyController extends BaseController { public class MatCompanyController extends BaseController {
private final IMatCompanyService busCompanyService; private final IMatCompanyService companyService;
/** /**
* 查询公司列表 * 查询公司列表
@ -47,7 +47,7 @@ public class MatCompanyController extends BaseController {
@SaCheckPermission("materials:company:list") @SaCheckPermission("materials:company:list")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo<MatCompanyVo> list(MatCompanyQueryReq req, PageQuery pageQuery) { public TableDataInfo<MatCompanyVo> list(MatCompanyQueryReq req, PageQuery pageQuery) {
return busCompanyService.queryPageList(req, pageQuery); return companyService.queryPageList(req, pageQuery);
} }
/** /**
@ -57,7 +57,7 @@ public class MatCompanyController extends BaseController {
@Log(title = "公司", businessType = BusinessType.EXPORT) @Log(title = "公司", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(MatCompanyQueryReq req, HttpServletResponse response) { public void export(MatCompanyQueryReq req, HttpServletResponse response) {
List<MatCompanyVo> list = busCompanyService.queryList(req); List<MatCompanyVo> list = companyService.queryList(req);
ExcelUtil.exportExcel(list, "公司", MatCompanyVo.class, response); ExcelUtil.exportExcel(list, "公司", MatCompanyVo.class, response);
} }
@ -70,7 +70,7 @@ public class MatCompanyController extends BaseController {
@GetMapping("/{id}") @GetMapping("/{id}")
public R<MatCompanyVo> getInfo(@NotNull(message = "主键不能为空") public R<MatCompanyVo> getInfo(@NotNull(message = "主键不能为空")
@PathVariable Long id) { @PathVariable Long id) {
return R.ok(busCompanyService.queryById(id)); return R.ok(companyService.queryById(id));
} }
/** /**
@ -84,7 +84,7 @@ public class MatCompanyController extends BaseController {
if (req == null) { if (req == null) {
throw new ServiceException("参数不能为空", HttpStatus.BAD_REQUEST); throw new ServiceException("参数不能为空", HttpStatus.BAD_REQUEST);
} }
return R.ok(busCompanyService.insertByBo(req)); return R.ok(companyService.insertByBo(req));
} }
/** /**
@ -95,7 +95,7 @@ public class MatCompanyController extends BaseController {
@RepeatSubmit() @RepeatSubmit()
@PutMapping() @PutMapping()
public R<Void> edit(@Validated(EditGroup.class) @RequestBody MatCompanyUpdateReq req) { public R<Void> edit(@Validated(EditGroup.class) @RequestBody MatCompanyUpdateReq req) {
return toAjax(busCompanyService.updateByBo(req)); return toAjax(companyService.updateByBo(req));
} }
/** /**
@ -108,6 +108,6 @@ public class MatCompanyController extends BaseController {
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public R<Void> remove(@NotEmpty(message = "主键不能为空") public R<Void> remove(@NotEmpty(message = "主键不能为空")
@PathVariable Long[] ids) { @PathVariable Long[] ids) {
return toAjax(busCompanyService.deleteWithValidByIds(List.of(ids), true)); return toAjax(companyService.deleteWithValidByIds(List.of(ids), true));
} }
} }

View File

@ -39,7 +39,7 @@ import java.util.List;
@RequestMapping("/materials/materials") @RequestMapping("/materials/materials")
public class MatMaterialsController extends BaseController { public class MatMaterialsController extends BaseController {
private final IMatMaterialsService busMaterialsService; private final IMatMaterialsService materialsService;
/** /**
* 查询材料列表 * 查询材料列表
@ -47,7 +47,7 @@ public class MatMaterialsController extends BaseController {
@SaCheckPermission("materials:materials:list") @SaCheckPermission("materials:materials:list")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo<MatMaterialsVo> list(MatMaterialsQueryReq req, PageQuery pageQuery) { public TableDataInfo<MatMaterialsVo> list(MatMaterialsQueryReq req, PageQuery pageQuery) {
return busMaterialsService.queryPageList(req, pageQuery); return materialsService.queryPageList(req, pageQuery);
} }
/** /**
@ -57,7 +57,7 @@ public class MatMaterialsController extends BaseController {
@Log(title = "材料", businessType = BusinessType.EXPORT) @Log(title = "材料", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(MatMaterialsQueryReq req, HttpServletResponse response) { public void export(MatMaterialsQueryReq req, HttpServletResponse response) {
List<MatMaterialsVo> list = busMaterialsService.queryList(req); List<MatMaterialsVo> list = materialsService.queryList(req);
ExcelUtil.exportExcel(list, "材料名称", MatMaterialsVo.class, response); ExcelUtil.exportExcel(list, "材料名称", MatMaterialsVo.class, response);
} }
@ -67,7 +67,7 @@ public class MatMaterialsController extends BaseController {
@SaCheckPermission("materials:materials:list") @SaCheckPermission("materials:materials:list")
@GetMapping("/list/gis") @GetMapping("/list/gis")
public R<List<MatMaterialsGisVo>> queryGisList(MatMaterialsGisReq req) { public R<List<MatMaterialsGisVo>> queryGisList(MatMaterialsGisReq req) {
return R.ok(busMaterialsService.queryGisList(req)); return R.ok(materialsService.queryGisList(req));
} }
/** /**
@ -79,7 +79,7 @@ public class MatMaterialsController extends BaseController {
@GetMapping("/{id}") @GetMapping("/{id}")
public R<MatMaterialsVo> getInfo(@NotNull(message = "主键不能为空") public R<MatMaterialsVo> getInfo(@NotNull(message = "主键不能为空")
@PathVariable Long id) { @PathVariable Long id) {
return R.ok(busMaterialsService.queryById(id)); return R.ok(materialsService.queryById(id));
} }
/** /**
@ -90,7 +90,7 @@ public class MatMaterialsController extends BaseController {
@RepeatSubmit() @RepeatSubmit()
@PostMapping() @PostMapping()
public R<Long> add(@Validated(AddGroup.class) @RequestBody MatMaterialsCreateReq req) { public R<Long> add(@Validated(AddGroup.class) @RequestBody MatMaterialsCreateReq req) {
return R.ok(busMaterialsService.insertByBo(req)); return R.ok(materialsService.insertByBo(req));
} }
/** /**
@ -101,7 +101,7 @@ public class MatMaterialsController extends BaseController {
@RepeatSubmit() @RepeatSubmit()
@PutMapping() @PutMapping()
public R<Void> edit(@Validated(EditGroup.class) @RequestBody MatMaterialsUpdateReq req) { public R<Void> edit(@Validated(EditGroup.class) @RequestBody MatMaterialsUpdateReq req) {
return toAjax(busMaterialsService.updateByBo(req)); return toAjax(materialsService.updateByBo(req));
} }
/** /**
@ -114,6 +114,6 @@ public class MatMaterialsController extends BaseController {
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public R<Void> remove(@NotEmpty(message = "主键不能为空") public R<Void> remove(@NotEmpty(message = "主键不能为空")
@PathVariable Long[] ids) { @PathVariable Long[] ids) {
return toAjax(busMaterialsService.deleteWithValidByIds(List.of(ids), true)); return toAjax(materialsService.deleteWithValidByIds(List.of(ids), true));
} }
} }

View File

@ -37,7 +37,7 @@ import java.util.List;
@RequestMapping("/materials/materialsInventory") @RequestMapping("/materials/materialsInventory")
public class MatMaterialsInventoryController extends BaseController { public class MatMaterialsInventoryController extends BaseController {
private final IMatMaterialsInventoryService busMaterialsInventoryService; private final IMatMaterialsInventoryService materialsInventoryService;
/** /**
* 查询材料出/入库列表 * 查询材料出/入库列表
@ -45,7 +45,7 @@ public class MatMaterialsInventoryController extends BaseController {
@SaCheckPermission("materials:materialsInventory:list") @SaCheckPermission("materials:materialsInventory:list")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo<MatMaterialsInventoryVo> list(MatMaterialsInventoryQueryReq req, PageQuery pageQuery) { public TableDataInfo<MatMaterialsInventoryVo> list(MatMaterialsInventoryQueryReq req, PageQuery pageQuery) {
return busMaterialsInventoryService.queryPageList(req, pageQuery); return materialsInventoryService.queryPageList(req, pageQuery);
} }
/** /**
@ -55,7 +55,7 @@ public class MatMaterialsInventoryController extends BaseController {
@Log(title = "材料出/入库", businessType = BusinessType.EXPORT) @Log(title = "材料出/入库", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(MatMaterialsInventoryQueryReq req, HttpServletResponse response) { public void export(MatMaterialsInventoryQueryReq req, HttpServletResponse response) {
List<MatMaterialsInventoryVo> list = busMaterialsInventoryService.queryList(req); List<MatMaterialsInventoryVo> list = materialsInventoryService.queryList(req);
ExcelUtil.exportExcel(list, "材料出入库", MatMaterialsInventoryVo.class, response); ExcelUtil.exportExcel(list, "材料出入库", MatMaterialsInventoryVo.class, response);
} }
@ -68,7 +68,7 @@ public class MatMaterialsInventoryController extends BaseController {
@GetMapping("/{id}") @GetMapping("/{id}")
public R<MatMaterialsInventoryVo> getInfo(@NotNull(message = "主键不能为空") public R<MatMaterialsInventoryVo> getInfo(@NotNull(message = "主键不能为空")
@PathVariable Long id) { @PathVariable Long id) {
return R.ok(busMaterialsInventoryService.queryById(id)); return R.ok(materialsInventoryService.queryById(id));
} }
/** /**
@ -79,7 +79,7 @@ public class MatMaterialsInventoryController extends BaseController {
@RepeatSubmit() @RepeatSubmit()
@PostMapping() @PostMapping()
public R<Long> add(@Validated(AddGroup.class) @RequestBody MatMaterialsInventoryCreateReq req) { public R<Long> add(@Validated(AddGroup.class) @RequestBody MatMaterialsInventoryCreateReq req) {
return R.ok(busMaterialsInventoryService.insertByBo(req)); return R.ok(materialsInventoryService.insertByBo(req));
} }
/** /**
@ -90,7 +90,7 @@ public class MatMaterialsInventoryController extends BaseController {
@RepeatSubmit() @RepeatSubmit()
@PutMapping() @PutMapping()
public R<Void> edit(@Validated(EditGroup.class) @RequestBody MatMaterialsInventoryUpdateReq req) { public R<Void> edit(@Validated(EditGroup.class) @RequestBody MatMaterialsInventoryUpdateReq req) {
return toAjax(busMaterialsInventoryService.updateByBo(req)); return toAjax(materialsInventoryService.updateByBo(req));
} }
/** /**
@ -103,6 +103,6 @@ public class MatMaterialsInventoryController extends BaseController {
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public R<Void> remove(@NotEmpty(message = "主键不能为空") public R<Void> remove(@NotEmpty(message = "主键不能为空")
@PathVariable Long[] ids) { @PathVariable Long[] ids) {
return toAjax(busMaterialsInventoryService.deleteWithValidByIds(List.of(ids), true)); return toAjax(materialsInventoryService.deleteWithValidByIds(List.of(ids), true));
} }
} }

View File

@ -118,7 +118,11 @@ public class MatMaterialsInventoryServiceImpl extends ServiceImpl<MatMaterialsIn
materialsInventory.setResidue(lastMaterialsInventory.getResidue() + req.getNumber()); materialsInventory.setResidue(lastMaterialsInventory.getResidue() + req.getNumber());
} }
} else { } else {
materialsInventory.setResidue(req.getNumber()); if (MatMaterialsInventoryOutPutEnum.OUT.getValue().equals(req.getOutPut())) {
throw new ServiceException("库存不足", HttpStatus.BAD_REQUEST);
} else {
materialsInventory.setResidue(req.getNumber());
}
} }
// 操作数据库 // 操作数据库
boolean save = this.save(materialsInventory); boolean save = this.save(materialsInventory);

View File

@ -37,7 +37,7 @@ import java.util.List;
public class QltQualityConstructionLogController extends BaseController { public class QltQualityConstructionLogController extends BaseController {
@Resource @Resource
private IQltQualityConstructionLogService busQualityConstructionLogService; private IQltQualityConstructionLogService qualityConstructionLogService;
/** /**
* 查询质量-施工日志列表 * 查询质量-施工日志列表
@ -45,7 +45,7 @@ public class QltQualityConstructionLogController extends BaseController {
@SaCheckPermission("quality:qualityConstructionLog:list") @SaCheckPermission("quality:qualityConstructionLog:list")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo<QltQualityConstructionLogVo> list(QltQualityConstructionLogQueryReq req, PageQuery pageQuery) { public TableDataInfo<QltQualityConstructionLogVo> list(QltQualityConstructionLogQueryReq req, PageQuery pageQuery) {
return busQualityConstructionLogService.queryPageList(req, pageQuery); return qualityConstructionLogService.queryPageList(req, pageQuery);
} }
/** /**
@ -55,7 +55,7 @@ public class QltQualityConstructionLogController extends BaseController {
@Log(title = "质量-施工日志", businessType = BusinessType.EXPORT) @Log(title = "质量-施工日志", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(QltQualityConstructionLogQueryReq req, HttpServletResponse response) { public void export(QltQualityConstructionLogQueryReq req, HttpServletResponse response) {
List<QltQualityConstructionLogVo> list = busQualityConstructionLogService.queryList(req); List<QltQualityConstructionLogVo> list = qualityConstructionLogService.queryList(req);
ExcelUtil.exportExcel(list, "质量-施工日志", QltQualityConstructionLogVo.class, response); ExcelUtil.exportExcel(list, "质量-施工日志", QltQualityConstructionLogVo.class, response);
} }
@ -67,7 +67,7 @@ public class QltQualityConstructionLogController extends BaseController {
@PostMapping("/export/word") @PostMapping("/export/word")
public void exportWordById(@NotNull(message = "主键不能为空") Long id, public void exportWordById(@NotNull(message = "主键不能为空") Long id,
HttpServletResponse response) { HttpServletResponse response) {
busQualityConstructionLogService.exportWordById(id, response); qualityConstructionLogService.exportWordById(id, response);
} }
/** /**
@ -79,7 +79,7 @@ public class QltQualityConstructionLogController extends BaseController {
@GetMapping("/{id}") @GetMapping("/{id}")
public R<QltQualityConstructionLogVo> getInfo(@NotNull(message = "主键不能为空") public R<QltQualityConstructionLogVo> getInfo(@NotNull(message = "主键不能为空")
@PathVariable Long id) { @PathVariable Long id) {
return R.ok(busQualityConstructionLogService.queryById(id)); return R.ok(qualityConstructionLogService.queryById(id));
} }
/** /**
@ -90,7 +90,7 @@ public class QltQualityConstructionLogController extends BaseController {
@RepeatSubmit() @RepeatSubmit()
@PostMapping() @PostMapping()
public R<Long> add(@Validated(AddGroup.class) @RequestBody QltQualityConstructionLogCreateReq req) { public R<Long> add(@Validated(AddGroup.class) @RequestBody QltQualityConstructionLogCreateReq req) {
return R.ok(busQualityConstructionLogService.insertByBo(req)); return R.ok(qualityConstructionLogService.insertByBo(req));
} }
/** /**
@ -101,7 +101,7 @@ public class QltQualityConstructionLogController extends BaseController {
@RepeatSubmit() @RepeatSubmit()
@PutMapping() @PutMapping()
public R<Void> edit(@Validated(EditGroup.class) @RequestBody QltQualityConstructionLogUpdateReq req) { public R<Void> edit(@Validated(EditGroup.class) @RequestBody QltQualityConstructionLogUpdateReq req) {
return toAjax(busQualityConstructionLogService.updateByBo(req)); return toAjax(qualityConstructionLogService.updateByBo(req));
} }
/** /**
@ -114,6 +114,6 @@ public class QltQualityConstructionLogController extends BaseController {
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public R<Void> remove(@NotEmpty(message = "主键不能为空") public R<Void> remove(@NotEmpty(message = "主键不能为空")
@PathVariable Long[] ids) { @PathVariable Long[] ids) {
return toAjax(busQualityConstructionLogService.deleteWithValidByIds(List.of(ids), true)); return toAjax(qualityConstructionLogService.deleteWithValidByIds(List.of(ids), true));
} }
} }

View File

@ -39,7 +39,7 @@ import java.util.List;
@RequestMapping("/quality/qualityInspection") @RequestMapping("/quality/qualityInspection")
public class QltQualityInspectionController extends BaseController { public class QltQualityInspectionController extends BaseController {
private final IQltQualityInspectionService busQualityInspectionService; private final IQltQualityInspectionService qualityInspectionService;
/** /**
* 查询质量-检查工单列表 * 查询质量-检查工单列表
@ -47,7 +47,7 @@ public class QltQualityInspectionController extends BaseController {
@SaCheckPermission("quality:qualityInspection:list") @SaCheckPermission("quality:qualityInspection:list")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo<QltQualityInspectionVo> list(QltQualityInspectionQueryReq req, PageQuery pageQuery) { public TableDataInfo<QltQualityInspectionVo> list(QltQualityInspectionQueryReq req, PageQuery pageQuery) {
return busQualityInspectionService.queryPageList(req, pageQuery); return qualityInspectionService.queryPageList(req, pageQuery);
} }
/** /**
@ -57,7 +57,7 @@ public class QltQualityInspectionController extends BaseController {
@Log(title = "质量-检查工单", businessType = BusinessType.EXPORT) @Log(title = "质量-检查工单", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(QltQualityInspectionQueryReq req, HttpServletResponse response) { public void export(QltQualityInspectionQueryReq req, HttpServletResponse response) {
List<QltQualityInspectionVo> list = busQualityInspectionService.queryList(req); List<QltQualityInspectionVo> list = qualityInspectionService.queryList(req);
ExcelUtil.exportExcel(list, "质量-检查工单", QltQualityInspectionVo.class, response); ExcelUtil.exportExcel(list, "质量-检查工单", QltQualityInspectionVo.class, response);
} }
@ -66,7 +66,7 @@ public class QltQualityInspectionController extends BaseController {
*/ */
@GetMapping("/gis") @GetMapping("/gis")
public R<QltQualityInspectionListGisVo> queryGisList(QltQualityInspectionGisReq req) { public R<QltQualityInspectionListGisVo> queryGisList(QltQualityInspectionGisReq req) {
return R.ok(busQualityInspectionService.queryGisList(req)); return R.ok(qualityInspectionService.queryGisList(req));
} }
/** /**
@ -77,7 +77,7 @@ public class QltQualityInspectionController extends BaseController {
@PostMapping("/export/word") @PostMapping("/export/word")
public void exportWordById(@NotNull(message = "主键不能为空") Long id, public void exportWordById(@NotNull(message = "主键不能为空") Long id,
HttpServletResponse response) { HttpServletResponse response) {
busQualityInspectionService.exportWordById(id, response); qualityInspectionService.exportWordById(id, response);
} }
/** /**
@ -89,7 +89,7 @@ public class QltQualityInspectionController extends BaseController {
@GetMapping("/{id}") @GetMapping("/{id}")
public R<QltQualityInspectionVo> getInfo(@NotNull(message = "主键不能为空") public R<QltQualityInspectionVo> getInfo(@NotNull(message = "主键不能为空")
@PathVariable Long id) { @PathVariable Long id) {
return R.ok(busQualityInspectionService.queryById(id)); return R.ok(qualityInspectionService.queryById(id));
} }
/** /**
@ -100,7 +100,7 @@ public class QltQualityInspectionController extends BaseController {
@RepeatSubmit() @RepeatSubmit()
@PostMapping() @PostMapping()
public R<Long> add(@Validated(AddGroup.class) @RequestBody QltQualityInspectionCreateReq req) { public R<Long> add(@Validated(AddGroup.class) @RequestBody QltQualityInspectionCreateReq req) {
return R.ok(busQualityInspectionService.insertByBo(req)); return R.ok(qualityInspectionService.insertByBo(req));
} }
/** /**
@ -111,7 +111,7 @@ public class QltQualityInspectionController extends BaseController {
@RepeatSubmit() @RepeatSubmit()
@PutMapping() @PutMapping()
public R<Void> edit(@Validated(EditGroup.class) @RequestBody QltQualityInspectionUpdateReq req) { public R<Void> edit(@Validated(EditGroup.class) @RequestBody QltQualityInspectionUpdateReq req) {
return toAjax(busQualityInspectionService.updateByBo(req)); return toAjax(qualityInspectionService.updateByBo(req));
} }
/** /**
@ -124,6 +124,6 @@ public class QltQualityInspectionController extends BaseController {
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public R<Void> remove(@NotEmpty(message = "主键不能为空") public R<Void> remove(@NotEmpty(message = "主键不能为空")
@PathVariable Long[] ids) { @PathVariable Long[] ids) {
return toAjax(busQualityInspectionService.deleteWithValidByIds(List.of(ids), true)); return toAjax(qualityInspectionService.deleteWithValidByIds(List.of(ids), true));
} }
} }

View File

@ -35,7 +35,7 @@ import java.util.List;
public class HseDocumentSafetyMeetingController extends BaseController { public class HseDocumentSafetyMeetingController extends BaseController {
@Resource @Resource
private IHseDocumentSafetyMeetingService busDocumentSafetyMeetingService; private IHseDocumentSafetyMeetingService documentSafetyMeetingService;
/** /**
* 查询安全会议纪要列表 * 查询安全会议纪要列表
@ -43,7 +43,7 @@ public class HseDocumentSafetyMeetingController extends BaseController {
@SaCheckPermission("safety:documentSafetyMeeting:list") @SaCheckPermission("safety:documentSafetyMeeting:list")
@GetMapping("/list") @GetMapping("/list")
public R<List<HseDocumentSafetyMeetingVo>> list(HseDocumentSafetyMeetingQueryReq req) { public R<List<HseDocumentSafetyMeetingVo>> list(HseDocumentSafetyMeetingQueryReq req) {
return R.ok(busDocumentSafetyMeetingService.queryList(req)); return R.ok(documentSafetyMeetingService.queryList(req));
} }
/** /**
@ -52,7 +52,7 @@ public class HseDocumentSafetyMeetingController extends BaseController {
@SaCheckPermission("safety:documentSafetyMeeting:list") @SaCheckPermission("safety:documentSafetyMeeting:list")
@GetMapping("/recycleBin/list") @GetMapping("/recycleBin/list")
public TableDataInfo<HseDocumentSafetyMeetingRecycleBinVo> list(HseDocumentSafetyMeetingQueryReq req, PageQuery pageQuery) { public TableDataInfo<HseDocumentSafetyMeetingRecycleBinVo> list(HseDocumentSafetyMeetingQueryReq req, PageQuery pageQuery) {
return busDocumentSafetyMeetingService.queryRecycleBinPageList(req, pageQuery); return documentSafetyMeetingService.queryRecycleBinPageList(req, pageQuery);
} }
/** /**
@ -64,7 +64,7 @@ public class HseDocumentSafetyMeetingController extends BaseController {
@GetMapping("/{id}") @GetMapping("/{id}")
public R<HseDocumentSafetyMeetingVo> getInfo(@NotNull(message = "主键不能为空") public R<HseDocumentSafetyMeetingVo> getInfo(@NotNull(message = "主键不能为空")
@PathVariable Long id) { @PathVariable Long id) {
return R.ok(busDocumentSafetyMeetingService.queryById(id)); return R.ok(documentSafetyMeetingService.queryById(id));
} }
/** /**
@ -75,7 +75,7 @@ public class HseDocumentSafetyMeetingController extends BaseController {
@RepeatSubmit() @RepeatSubmit()
@PostMapping("/folder") @PostMapping("/folder")
public R<Long> addFolder(@RequestBody HseDocumentSafetyMeetingCreateFolderReq req) { public R<Long> addFolder(@RequestBody HseDocumentSafetyMeetingCreateFolderReq req) {
return R.ok(busDocumentSafetyMeetingService.insertByFolder(req)); return R.ok(documentSafetyMeetingService.insertByFolder(req));
} }
/** /**
@ -86,7 +86,7 @@ public class HseDocumentSafetyMeetingController extends BaseController {
@RepeatSubmit() @RepeatSubmit()
@PostMapping("/file") @PostMapping("/file")
public R<Long> addFile(@RequestPart("file") MultipartFile file, HseDocumentSafetyMeetingCreateFileReq req) { public R<Long> addFile(@RequestPart("file") MultipartFile file, HseDocumentSafetyMeetingCreateFileReq req) {
return R.ok(busDocumentSafetyMeetingService.insertByFile(file, req)); return R.ok(documentSafetyMeetingService.insertByFile(file, req));
} }
/** /**
@ -100,7 +100,7 @@ public class HseDocumentSafetyMeetingController extends BaseController {
@PutMapping("/recovery/{ids}") @PutMapping("/recovery/{ids}")
public R<Void> recovery(@NotEmpty(message = "主键不能为空") public R<Void> recovery(@NotEmpty(message = "主键不能为空")
@PathVariable Long[] ids) { @PathVariable Long[] ids) {
return toAjax(busDocumentSafetyMeetingService.recoveryBatchById(List.of(ids))); return toAjax(documentSafetyMeetingService.recoveryBatchById(List.of(ids)));
} }
/** /**
@ -113,7 +113,7 @@ public class HseDocumentSafetyMeetingController extends BaseController {
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public R<Void> remove(@NotEmpty(message = "主键不能为空") public R<Void> remove(@NotEmpty(message = "主键不能为空")
@PathVariable Long[] ids) { @PathVariable Long[] ids) {
return toAjax(busDocumentSafetyMeetingService.deleteWithRecycleBin(List.of(ids))); return toAjax(documentSafetyMeetingService.deleteWithRecycleBin(List.of(ids)));
} }
/** /**
@ -126,7 +126,7 @@ public class HseDocumentSafetyMeetingController extends BaseController {
@DeleteMapping("/completelyDelete/{ids}") @DeleteMapping("/completelyDelete/{ids}")
public R<Void> completelyDelete(@NotEmpty(message = "主键不能为空") public R<Void> completelyDelete(@NotEmpty(message = "主键不能为空")
@PathVariable Long[] ids) { @PathVariable Long[] ids) {
return toAjax(busDocumentSafetyMeetingService.completelyDelete(List.of(ids))); return toAjax(documentSafetyMeetingService.completelyDelete(List.of(ids)));
} }
} }

View File

@ -38,7 +38,7 @@ import java.util.List;
@RequestMapping("/safety/questionBank") @RequestMapping("/safety/questionBank")
public class HseQuestionBankController extends BaseController { public class HseQuestionBankController extends BaseController {
private final IHseQuestionBankService busQuestionBankService; private final IHseQuestionBankService questionBankService;
/** /**
* 查询题库列表 * 查询题库列表
@ -46,7 +46,7 @@ public class HseQuestionBankController extends BaseController {
@SaCheckPermission("safety:questionBank:list") @SaCheckPermission("safety:questionBank:list")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo<HseQuestionBankVo> list(HseQuestionBankQueryReq req, PageQuery pageQuery) { public TableDataInfo<HseQuestionBankVo> list(HseQuestionBankQueryReq req, PageQuery pageQuery) {
return busQuestionBankService.queryPageList(req, pageQuery); return questionBankService.queryPageList(req, pageQuery);
} }
/** /**
@ -56,7 +56,7 @@ public class HseQuestionBankController extends BaseController {
@Log(title = "题库", businessType = BusinessType.EXPORT) @Log(title = "题库", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HseQuestionBankQueryReq req, HttpServletResponse response) { public void export(HseQuestionBankQueryReq req, HttpServletResponse response) {
List<HseQuestionBankVo> list = busQuestionBankService.queryList(req); List<HseQuestionBankVo> list = questionBankService.queryList(req);
ExcelUtil.exportExcel(list, "题库", HseQuestionBankVo.class, response); ExcelUtil.exportExcel(list, "题库", HseQuestionBankVo.class, response);
} }
@ -69,7 +69,7 @@ public class HseQuestionBankController extends BaseController {
@GetMapping("/{id}") @GetMapping("/{id}")
public R<HseQuestionBankVo> getInfo(@NotNull(message = "主键不能为空") public R<HseQuestionBankVo> getInfo(@NotNull(message = "主键不能为空")
@PathVariable Long id) { @PathVariable Long id) {
return R.ok(busQuestionBankService.queryById(id)); return R.ok(questionBankService.queryById(id));
} }
/** /**
@ -81,7 +81,7 @@ public class HseQuestionBankController extends BaseController {
@PostMapping() @PostMapping()
public R<Long> add(@Validated(AddGroup.class) @RequestBody HseQuestionBankCreateReq req, public R<Long> add(@Validated(AddGroup.class) @RequestBody HseQuestionBankCreateReq req,
HttpServletRequest request) { HttpServletRequest request) {
return R.ok(busQuestionBankService.insertByBo(req, request)); return R.ok(questionBankService.insertByBo(req, request));
} }
/** /**
@ -92,7 +92,7 @@ public class HseQuestionBankController extends BaseController {
@RepeatSubmit() @RepeatSubmit()
@PutMapping() @PutMapping()
public R<Void> edit(@Validated(EditGroup.class) @RequestBody HseQuestionBankUpdateReq req) { public R<Void> edit(@Validated(EditGroup.class) @RequestBody HseQuestionBankUpdateReq req) {
return toAjax(busQuestionBankService.updateByBo(req)); return toAjax(questionBankService.updateByBo(req));
} }
/** /**
@ -105,6 +105,6 @@ public class HseQuestionBankController extends BaseController {
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public R<Void> remove(@NotEmpty(message = "主键不能为空") public R<Void> remove(@NotEmpty(message = "主键不能为空")
@PathVariable Long[] ids) { @PathVariable Long[] ids) {
return toAjax(busQuestionBankService.deleteWithValidByIds(List.of(ids), true)); return toAjax(questionBankService.deleteWithValidByIds(List.of(ids), true));
} }
} }

View File

@ -39,7 +39,7 @@ import java.util.List;
@RequestMapping("/safety/questionUserAnswer") @RequestMapping("/safety/questionUserAnswer")
public class HseQuestionUserAnswerController extends BaseController { public class HseQuestionUserAnswerController extends BaseController {
private final IHseQuestionUserAnswerService busQuestionUserAnswerService; private final IHseQuestionUserAnswerService questionUserAnswerService;
/** /**
* 查询用户试卷存储列表 * 查询用户试卷存储列表
@ -47,7 +47,7 @@ public class HseQuestionUserAnswerController extends BaseController {
@SaCheckPermission("safety:questionUserAnswer:list") @SaCheckPermission("safety:questionUserAnswer:list")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo<HseQuestionUserAnswerVo> list(HseQuestionUserAnswerQueryReq req, PageQuery pageQuery) { public TableDataInfo<HseQuestionUserAnswerVo> list(HseQuestionUserAnswerQueryReq req, PageQuery pageQuery) {
return busQuestionUserAnswerService.queryPageList(req, pageQuery); return questionUserAnswerService.queryPageList(req, pageQuery);
} }
/** /**
@ -57,7 +57,7 @@ public class HseQuestionUserAnswerController extends BaseController {
@Log(title = "用户试卷存储", businessType = BusinessType.EXPORT) @Log(title = "用户试卷存储", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HseQuestionUserAnswerQueryReq req, HttpServletResponse response) { public void export(HseQuestionUserAnswerQueryReq req, HttpServletResponse response) {
List<HseQuestionUserAnswerVo> list = busQuestionUserAnswerService.queryList(req); List<HseQuestionUserAnswerVo> list = questionUserAnswerService.queryList(req);
ExcelUtil.exportExcel(list, "用户试卷存储", HseQuestionUserAnswerVo.class, response); ExcelUtil.exportExcel(list, "用户试卷存储", HseQuestionUserAnswerVo.class, response);
} }
@ -70,7 +70,7 @@ public class HseQuestionUserAnswerController extends BaseController {
@PostMapping("/exportFile") @PostMapping("/exportFile")
public void exportFile(HseQuestionUserAnswerBatchDownloadFileReq req, public void exportFile(HseQuestionUserAnswerBatchDownloadFileReq req,
HttpServletResponse response) { HttpServletResponse response) {
busQuestionUserAnswerService.batchDownloadFile(req, response); questionUserAnswerService.batchDownloadFile(req, response);
} }
/** /**
@ -82,7 +82,7 @@ public class HseQuestionUserAnswerController extends BaseController {
@GetMapping("/{id}") @GetMapping("/{id}")
public R<HseQuestionUserAnswerVo> getInfo(@NotNull(message = "主键不能为空") public R<HseQuestionUserAnswerVo> getInfo(@NotNull(message = "主键不能为空")
@PathVariable Long id) { @PathVariable Long id) {
return R.ok(busQuestionUserAnswerService.queryById(id)); return R.ok(questionUserAnswerService.queryById(id));
} }
/** /**
@ -93,7 +93,7 @@ public class HseQuestionUserAnswerController extends BaseController {
@RepeatSubmit() @RepeatSubmit()
@PostMapping() @PostMapping()
public R<Long> add(@Validated(AddGroup.class) @RequestBody HseQuestionUserAnswerCreateReq req) { public R<Long> add(@Validated(AddGroup.class) @RequestBody HseQuestionUserAnswerCreateReq req) {
return R.ok(busQuestionUserAnswerService.insertByBo(req)); return R.ok(questionUserAnswerService.insertByBo(req));
} }
/** /**
@ -105,7 +105,7 @@ public class HseQuestionUserAnswerController extends BaseController {
@PostMapping("/upload/zip") @PostMapping("/upload/zip")
public R<Boolean> batchUploadFileByZip(@RequestParam("file") MultipartFile multipartFile, public R<Boolean> batchUploadFileByZip(@RequestParam("file") MultipartFile multipartFile,
Long projectId) { Long projectId) {
return R.ok(busQuestionUserAnswerService.batchUploadFileByZip(multipartFile, projectId)); return R.ok(questionUserAnswerService.batchUploadFileByZip(multipartFile, projectId));
} }
/** /**
@ -116,7 +116,7 @@ public class HseQuestionUserAnswerController extends BaseController {
@RepeatSubmit() @RepeatSubmit()
@PutMapping() @PutMapping()
public R<Void> edit(@Validated(EditGroup.class) @RequestBody HseQuestionUserAnswerUpdateReq req) { public R<Void> edit(@Validated(EditGroup.class) @RequestBody HseQuestionUserAnswerUpdateReq req) {
return toAjax(busQuestionUserAnswerService.updateByBo(req)); return toAjax(questionUserAnswerService.updateByBo(req));
} }
/** /**
@ -129,6 +129,6 @@ public class HseQuestionUserAnswerController extends BaseController {
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public R<Void> remove(@NotEmpty(message = "主键不能为空") public R<Void> remove(@NotEmpty(message = "主键不能为空")
@PathVariable Long[] ids) { @PathVariable Long[] ids) {
return toAjax(busQuestionUserAnswerService.deleteWithValidByIds(List.of(ids), true)); return toAjax(questionUserAnswerService.deleteWithValidByIds(List.of(ids), true));
} }
} }

View File

@ -37,7 +37,7 @@ import java.util.List;
@RequestMapping("/safety/questionsCategory") @RequestMapping("/safety/questionsCategory")
public class HseQuestionsCategoryController extends BaseController { public class HseQuestionsCategoryController extends BaseController {
private final IHseQuestionsCategoryService busQuestionsCategoryService; private final IHseQuestionsCategoryService questionsCategoryService;
/** /**
* 查询题库类别列表 * 查询题库类别列表
@ -45,7 +45,7 @@ public class HseQuestionsCategoryController extends BaseController {
@SaCheckPermission("safety:questionsCategory:list") @SaCheckPermission("safety:questionsCategory:list")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo<HseQuestionsCategoryVo> list(HseQuestionsCategoryQueryReq req, PageQuery pageQuery) { public TableDataInfo<HseQuestionsCategoryVo> list(HseQuestionsCategoryQueryReq req, PageQuery pageQuery) {
return busQuestionsCategoryService.queryPageList(req, pageQuery); return questionsCategoryService.queryPageList(req, pageQuery);
} }
/** /**
@ -55,7 +55,7 @@ public class HseQuestionsCategoryController extends BaseController {
@Log(title = "题库类别", businessType = BusinessType.EXPORT) @Log(title = "题库类别", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HseQuestionsCategoryQueryReq req, HttpServletResponse response) { public void export(HseQuestionsCategoryQueryReq req, HttpServletResponse response) {
List<HseQuestionsCategoryVo> list = busQuestionsCategoryService.queryList(req); List<HseQuestionsCategoryVo> list = questionsCategoryService.queryList(req);
ExcelUtil.exportExcel(list, "题库类别", HseQuestionsCategoryVo.class, response); ExcelUtil.exportExcel(list, "题库类别", HseQuestionsCategoryVo.class, response);
} }
@ -68,7 +68,7 @@ public class HseQuestionsCategoryController extends BaseController {
@GetMapping("/{id}") @GetMapping("/{id}")
public R<HseQuestionsCategoryVo> getInfo(@NotNull(message = "主键不能为空") public R<HseQuestionsCategoryVo> getInfo(@NotNull(message = "主键不能为空")
@PathVariable Long id) { @PathVariable Long id) {
return R.ok(busQuestionsCategoryService.queryById(id)); return R.ok(questionsCategoryService.queryById(id));
} }
/** /**
@ -79,7 +79,7 @@ public class HseQuestionsCategoryController extends BaseController {
@RepeatSubmit() @RepeatSubmit()
@PostMapping() @PostMapping()
public R<Long> add(@Validated(AddGroup.class) @RequestBody HseQuestionsCategoryCreateReq req) { public R<Long> add(@Validated(AddGroup.class) @RequestBody HseQuestionsCategoryCreateReq req) {
return R.ok(busQuestionsCategoryService.insertByBo(req)); return R.ok(questionsCategoryService.insertByBo(req));
} }
/** /**
@ -90,7 +90,7 @@ public class HseQuestionsCategoryController extends BaseController {
@RepeatSubmit() @RepeatSubmit()
@PutMapping() @PutMapping()
public R<Void> edit(@Validated(EditGroup.class) @RequestBody HseQuestionsCategoryUpdateReq req) { public R<Void> edit(@Validated(EditGroup.class) @RequestBody HseQuestionsCategoryUpdateReq req) {
return toAjax(busQuestionsCategoryService.updateByBo(req)); return toAjax(questionsCategoryService.updateByBo(req));
} }
/** /**
@ -103,6 +103,6 @@ public class HseQuestionsCategoryController extends BaseController {
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public R<Void> remove(@NotEmpty(message = "主键不能为空") public R<Void> remove(@NotEmpty(message = "主键不能为空")
@PathVariable Long[] ids) { @PathVariable Long[] ids) {
return toAjax(busQuestionsCategoryService.deleteWithValidByIds(List.of(ids), true)); return toAjax(questionsCategoryService.deleteWithValidByIds(List.of(ids), true));
} }
} }

View File

@ -37,7 +37,7 @@ import java.util.List;
@RequestMapping("/safety/questionsConfig") @RequestMapping("/safety/questionsConfig")
public class HseQuestionsConfigController extends BaseController { public class HseQuestionsConfigController extends BaseController {
private final IHseQuestionsConfigService busQuestionsConfigService; private final IHseQuestionsConfigService questionsConfigService;
/** /**
* 查询题库配置列表 * 查询题库配置列表
@ -45,7 +45,7 @@ public class HseQuestionsConfigController extends BaseController {
@SaCheckPermission("safety:questionsConfig:list") @SaCheckPermission("safety:questionsConfig:list")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo<HseQuestionsConfigVo> list(HseQuestionsConfigQueryReq req, PageQuery pageQuery) { public TableDataInfo<HseQuestionsConfigVo> list(HseQuestionsConfigQueryReq req, PageQuery pageQuery) {
return busQuestionsConfigService.queryPageList(req, pageQuery); return questionsConfigService.queryPageList(req, pageQuery);
} }
/** /**
@ -55,7 +55,7 @@ public class HseQuestionsConfigController extends BaseController {
@Log(title = "题库配置", businessType = BusinessType.EXPORT) @Log(title = "题库配置", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HseQuestionsConfigQueryReq req, HttpServletResponse response) { public void export(HseQuestionsConfigQueryReq req, HttpServletResponse response) {
List<HseQuestionsConfigVo> list = busQuestionsConfigService.queryList(req); List<HseQuestionsConfigVo> list = questionsConfigService.queryList(req);
ExcelUtil.exportExcel(list, "题库配置", HseQuestionsConfigVo.class, response); ExcelUtil.exportExcel(list, "题库配置", HseQuestionsConfigVo.class, response);
} }
@ -68,7 +68,7 @@ public class HseQuestionsConfigController extends BaseController {
@GetMapping("/{id}") @GetMapping("/{id}")
public R<HseQuestionsConfigVo> getInfo(@NotNull(message = "主键不能为空") public R<HseQuestionsConfigVo> getInfo(@NotNull(message = "主键不能为空")
@PathVariable Long id) { @PathVariable Long id) {
return R.ok(busQuestionsConfigService.queryById(id)); return R.ok(questionsConfigService.queryById(id));
} }
/** /**
@ -79,7 +79,7 @@ public class HseQuestionsConfigController extends BaseController {
@RepeatSubmit() @RepeatSubmit()
@PostMapping() @PostMapping()
public R<Long> add(@Validated(AddGroup.class) @RequestBody HseQuestionsConfigCreateReq req) { public R<Long> add(@Validated(AddGroup.class) @RequestBody HseQuestionsConfigCreateReq req) {
return R.ok(busQuestionsConfigService.insertByBo(req)); return R.ok(questionsConfigService.insertByBo(req));
} }
/** /**
@ -90,7 +90,7 @@ public class HseQuestionsConfigController extends BaseController {
@RepeatSubmit() @RepeatSubmit()
@PutMapping() @PutMapping()
public R<Void> edit(@Validated(EditGroup.class) @RequestBody HseQuestionsConfigUpdateReq req) { public R<Void> edit(@Validated(EditGroup.class) @RequestBody HseQuestionsConfigUpdateReq req) {
return toAjax(busQuestionsConfigService.updateByBo(req)); return toAjax(questionsConfigService.updateByBo(req));
} }
/** /**
@ -103,6 +103,6 @@ public class HseQuestionsConfigController extends BaseController {
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public R<Void> remove(@NotEmpty(message = "主键不能为空") public R<Void> remove(@NotEmpty(message = "主键不能为空")
@PathVariable Long[] ids) { @PathVariable Long[] ids) {
return toAjax(busQuestionsConfigService.deleteWithValidByIds(List.of(ids), true)); return toAjax(questionsConfigService.deleteWithValidByIds(List.of(ids), true));
} }
} }

View File

@ -39,7 +39,7 @@ import java.util.List;
@RequestMapping("/safety/safetyInspection") @RequestMapping("/safety/safetyInspection")
public class HseSafetyInspectionController extends BaseController { public class HseSafetyInspectionController extends BaseController {
private final IHseSafetyInspectionService busSafetyInspectionService; private final IHseSafetyInspectionService safetyInspectionService;
/** /**
* 查询安全巡检工单列表 * 查询安全巡检工单列表
@ -47,7 +47,7 @@ public class HseSafetyInspectionController extends BaseController {
@SaCheckPermission("safety:safetyInspection:list") @SaCheckPermission("safety:safetyInspection:list")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo<HseSafetyInspectionVo> list(HseSafetyInspectionQueryReq req, PageQuery pageQuery) { public TableDataInfo<HseSafetyInspectionVo> list(HseSafetyInspectionQueryReq req, PageQuery pageQuery) {
return busSafetyInspectionService.queryPageList(req, pageQuery); return safetyInspectionService.queryPageList(req, pageQuery);
} }
/** /**
@ -57,7 +57,7 @@ public class HseSafetyInspectionController extends BaseController {
@Log(title = "安全巡检工单", businessType = BusinessType.EXPORT) @Log(title = "安全巡检工单", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HseSafetyInspectionQueryReq req, HttpServletResponse response) { public void export(HseSafetyInspectionQueryReq req, HttpServletResponse response) {
List<HseSafetyInspectionVo> list = busSafetyInspectionService.queryList(req); List<HseSafetyInspectionVo> list = safetyInspectionService.queryList(req);
ExcelUtil.exportExcel(list, "安全巡检工单", HseSafetyInspectionVo.class, response); ExcelUtil.exportExcel(list, "安全巡检工单", HseSafetyInspectionVo.class, response);
} }
@ -69,7 +69,7 @@ public class HseSafetyInspectionController extends BaseController {
@PostMapping("/export/word") @PostMapping("/export/word")
public void exportWordById(@NotNull(message = "主键不能为空") Long id, public void exportWordById(@NotNull(message = "主键不能为空") Long id,
HttpServletResponse response) { HttpServletResponse response) {
busSafetyInspectionService.exportWordById(id, response); safetyInspectionService.exportWordById(id, response);
} }
/** /**
@ -77,7 +77,7 @@ public class HseSafetyInspectionController extends BaseController {
*/ */
@GetMapping("/gis") @GetMapping("/gis")
public R<HseSafetyInspectionListGisVo> queryGisList(HseSafetyInspectionGisReq req) { public R<HseSafetyInspectionListGisVo> queryGisList(HseSafetyInspectionGisReq req) {
return R.ok(busSafetyInspectionService.queryGisList(req)); return R.ok(safetyInspectionService.queryGisList(req));
} }
/** /**
@ -89,7 +89,7 @@ public class HseSafetyInspectionController extends BaseController {
@GetMapping("/{id}") @GetMapping("/{id}")
public R<HseSafetyInspectionVo> getInfo(@NotNull(message = "主键不能为空") public R<HseSafetyInspectionVo> getInfo(@NotNull(message = "主键不能为空")
@PathVariable Long id) { @PathVariable Long id) {
return R.ok(busSafetyInspectionService.queryById(id)); return R.ok(safetyInspectionService.queryById(id));
} }
/** /**
@ -100,7 +100,7 @@ public class HseSafetyInspectionController extends BaseController {
@RepeatSubmit() @RepeatSubmit()
@PostMapping() @PostMapping()
public R<Long> add(@Validated(AddGroup.class) @RequestBody HseSafetyInspectionCreateReq req) { public R<Long> add(@Validated(AddGroup.class) @RequestBody HseSafetyInspectionCreateReq req) {
return R.ok(busSafetyInspectionService.insertByBo(req)); return R.ok(safetyInspectionService.insertByBo(req));
} }
/** /**
@ -111,7 +111,7 @@ public class HseSafetyInspectionController extends BaseController {
@RepeatSubmit() @RepeatSubmit()
@PutMapping() @PutMapping()
public R<Void> edit(@Validated(EditGroup.class) @RequestBody HseSafetyInspectionUpdateReq req) { public R<Void> edit(@Validated(EditGroup.class) @RequestBody HseSafetyInspectionUpdateReq req) {
return toAjax(busSafetyInspectionService.updateByBo(req)); return toAjax(safetyInspectionService.updateByBo(req));
} }
/** /**
@ -124,6 +124,6 @@ public class HseSafetyInspectionController extends BaseController {
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public R<Void> remove(@NotEmpty(message = "主键不能为空") public R<Void> remove(@NotEmpty(message = "主键不能为空")
@PathVariable Long[] ids) { @PathVariable Long[] ids) {
return toAjax(busSafetyInspectionService.deleteWithValidByIds(List.of(ids), true)); return toAjax(safetyInspectionService.deleteWithValidByIds(List.of(ids), true));
} }
} }

View File

@ -37,7 +37,7 @@ import java.util.List;
@RequestMapping("/safety/safetyLog") @RequestMapping("/safety/safetyLog")
public class HseSafetyLogController extends BaseController { public class HseSafetyLogController extends BaseController {
private final IHseSafetyLogService busSafetyLogService; private final IHseSafetyLogService safetyLogService;
/** /**
* 查询安全日志列表 * 查询安全日志列表
@ -45,7 +45,7 @@ public class HseSafetyLogController extends BaseController {
@SaCheckPermission("safety:safetyLog:list") @SaCheckPermission("safety:safetyLog:list")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo<HseSafetyLogVo> list(HseSafetyLogQueryReq req, PageQuery pageQuery) { public TableDataInfo<HseSafetyLogVo> list(HseSafetyLogQueryReq req, PageQuery pageQuery) {
return busSafetyLogService.queryPageList(req, pageQuery); return safetyLogService.queryPageList(req, pageQuery);
} }
/** /**
@ -55,7 +55,7 @@ public class HseSafetyLogController extends BaseController {
@Log(title = "安全日志", businessType = BusinessType.EXPORT) @Log(title = "安全日志", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HseSafetyLogQueryReq req, HttpServletResponse response) { public void export(HseSafetyLogQueryReq req, HttpServletResponse response) {
List<HseSafetyLogVo> list = busSafetyLogService.queryList(req); List<HseSafetyLogVo> list = safetyLogService.queryList(req);
ExcelUtil.exportExcel(list, "安全日志", HseSafetyLogVo.class, response); ExcelUtil.exportExcel(list, "安全日志", HseSafetyLogVo.class, response);
} }
@ -68,7 +68,7 @@ public class HseSafetyLogController extends BaseController {
@GetMapping("/{id}") @GetMapping("/{id}")
public R<HseSafetyLogVo> getInfo(@NotNull(message = "主键不能为空") public R<HseSafetyLogVo> getInfo(@NotNull(message = "主键不能为空")
@PathVariable Long id) { @PathVariable Long id) {
return R.ok(busSafetyLogService.queryById(id)); return R.ok(safetyLogService.queryById(id));
} }
/** /**
@ -79,7 +79,7 @@ public class HseSafetyLogController extends BaseController {
@RepeatSubmit() @RepeatSubmit()
@PostMapping() @PostMapping()
public R<Long> add(@Validated(AddGroup.class) @RequestBody HseSafetyLogCreateReq req) { public R<Long> add(@Validated(AddGroup.class) @RequestBody HseSafetyLogCreateReq req) {
return R.ok(busSafetyLogService.insertByBo(req)); return R.ok(safetyLogService.insertByBo(req));
} }
/** /**
@ -90,7 +90,7 @@ public class HseSafetyLogController extends BaseController {
@RepeatSubmit() @RepeatSubmit()
@PutMapping() @PutMapping()
public R<Void> edit(@Validated(EditGroup.class) @RequestBody HseSafetyLogUpdateReq req) { public R<Void> edit(@Validated(EditGroup.class) @RequestBody HseSafetyLogUpdateReq req) {
return toAjax(busSafetyLogService.updateByBo(req)); return toAjax(safetyLogService.updateByBo(req));
} }
/** /**
@ -103,6 +103,6 @@ public class HseSafetyLogController extends BaseController {
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public R<Void> remove(@NotEmpty(message = "主键不能为空") public R<Void> remove(@NotEmpty(message = "主键不能为空")
@PathVariable Long[] ids) { @PathVariable Long[] ids) {
return toAjax(busSafetyLogService.deleteWithValidByIds(List.of(ids), true)); return toAjax(safetyLogService.deleteWithValidByIds(List.of(ids), true));
} }
} }

View File

@ -37,7 +37,7 @@ import java.util.List;
@RequestMapping("/safety/safetyWeeklyReport") @RequestMapping("/safety/safetyWeeklyReport")
public class HseSafetyWeeklyReportController extends BaseController { public class HseSafetyWeeklyReportController extends BaseController {
private final IHseSafetyWeeklyReportService busSafetyWeeklyReportService; private final IHseSafetyWeeklyReportService safetyWeeklyReportService;
/** /**
* 查询安全周报列表 * 查询安全周报列表
@ -45,7 +45,7 @@ public class HseSafetyWeeklyReportController extends BaseController {
@SaCheckPermission("safety:safetyWeeklyReport:list") @SaCheckPermission("safety:safetyWeeklyReport:list")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo<HseSafetyWeeklyReportVo> list(HseSafetyWeeklyReportQueryReq req, PageQuery pageQuery) { public TableDataInfo<HseSafetyWeeklyReportVo> list(HseSafetyWeeklyReportQueryReq req, PageQuery pageQuery) {
return busSafetyWeeklyReportService.queryPageList(req, pageQuery); return safetyWeeklyReportService.queryPageList(req, pageQuery);
} }
/** /**
@ -55,7 +55,7 @@ public class HseSafetyWeeklyReportController extends BaseController {
@Log(title = "安全周报", businessType = BusinessType.EXPORT) @Log(title = "安全周报", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HseSafetyWeeklyReportQueryReq req, HttpServletResponse response) { public void export(HseSafetyWeeklyReportQueryReq req, HttpServletResponse response) {
List<HseSafetyWeeklyReportVo> list = busSafetyWeeklyReportService.queryList(req); List<HseSafetyWeeklyReportVo> list = safetyWeeklyReportService.queryList(req);
ExcelUtil.exportExcel(list, "安全周报", HseSafetyWeeklyReportVo.class, response); ExcelUtil.exportExcel(list, "安全周报", HseSafetyWeeklyReportVo.class, response);
} }
@ -68,7 +68,7 @@ public class HseSafetyWeeklyReportController extends BaseController {
@GetMapping("/{id}") @GetMapping("/{id}")
public R<HseSafetyWeeklyReportVo> getInfo(@NotNull(message = "主键不能为空") public R<HseSafetyWeeklyReportVo> getInfo(@NotNull(message = "主键不能为空")
@PathVariable Long id) { @PathVariable Long id) {
return R.ok(busSafetyWeeklyReportService.queryById(id)); return R.ok(safetyWeeklyReportService.queryById(id));
} }
/** /**
@ -79,7 +79,7 @@ public class HseSafetyWeeklyReportController extends BaseController {
@RepeatSubmit() @RepeatSubmit()
@PostMapping() @PostMapping()
public R<Long> add(@Validated(AddGroup.class) @RequestBody HseSafetyWeeklyReportCreateReq req) { public R<Long> add(@Validated(AddGroup.class) @RequestBody HseSafetyWeeklyReportCreateReq req) {
return R.ok(busSafetyWeeklyReportService.insertByBo(req)); return R.ok(safetyWeeklyReportService.insertByBo(req));
} }
/** /**
@ -90,7 +90,7 @@ public class HseSafetyWeeklyReportController extends BaseController {
@RepeatSubmit() @RepeatSubmit()
@PutMapping() @PutMapping()
public R<Void> edit(@Validated(EditGroup.class) @RequestBody HseSafetyWeeklyReportUpdateReq req) { public R<Void> edit(@Validated(EditGroup.class) @RequestBody HseSafetyWeeklyReportUpdateReq req) {
return toAjax(busSafetyWeeklyReportService.updateByBo(req)); return toAjax(safetyWeeklyReportService.updateByBo(req));
} }
/** /**
@ -103,6 +103,6 @@ public class HseSafetyWeeklyReportController extends BaseController {
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public R<Void> remove(@NotEmpty(message = "主键不能为空") public R<Void> remove(@NotEmpty(message = "主键不能为空")
@PathVariable Long[] ids) { @PathVariable Long[] ids) {
return toAjax(busSafetyWeeklyReportService.deleteWithValidByIds(List.of(ids), true)); return toAjax(safetyWeeklyReportService.deleteWithValidByIds(List.of(ids), true));
} }
} }

View File

@ -37,7 +37,7 @@ import java.util.List;
@RequestMapping("/safety/teamMeeting") @RequestMapping("/safety/teamMeeting")
public class HseTeamMeetingController extends BaseController { public class HseTeamMeetingController extends BaseController {
private final IHseTeamMeetingService busTeamMeetingService; private final IHseTeamMeetingService teamMeetingService;
/** /**
* 查询站班会列表 * 查询站班会列表
@ -45,7 +45,7 @@ public class HseTeamMeetingController extends BaseController {
@SaCheckPermission("safety:teamMeeting:list") @SaCheckPermission("safety:teamMeeting:list")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo<HseTeamMeetingVo> list(HseTeamMeetingQueryReq req, PageQuery pageQuery) { public TableDataInfo<HseTeamMeetingVo> list(HseTeamMeetingQueryReq req, PageQuery pageQuery) {
return busTeamMeetingService.queryPageList(req, pageQuery); return teamMeetingService.queryPageList(req, pageQuery);
} }
/** /**
@ -55,7 +55,7 @@ public class HseTeamMeetingController extends BaseController {
@Log(title = "站班会", businessType = BusinessType.EXPORT) @Log(title = "站班会", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HseTeamMeetingQueryReq req, HttpServletResponse response) { public void export(HseTeamMeetingQueryReq req, HttpServletResponse response) {
List<HseTeamMeetingVo> list = busTeamMeetingService.queryList(req); List<HseTeamMeetingVo> list = teamMeetingService.queryList(req);
ExcelUtil.exportExcel(list, "站班会", HseTeamMeetingVo.class, response); ExcelUtil.exportExcel(list, "站班会", HseTeamMeetingVo.class, response);
} }
@ -68,7 +68,7 @@ public class HseTeamMeetingController extends BaseController {
@GetMapping("/{id}") @GetMapping("/{id}")
public R<HseTeamMeetingVo> getInfo(@NotNull(message = "主键不能为空") public R<HseTeamMeetingVo> getInfo(@NotNull(message = "主键不能为空")
@PathVariable Long id) { @PathVariable Long id) {
return R.ok(busTeamMeetingService.queryById(id)); return R.ok(teamMeetingService.queryById(id));
} }
/** /**
@ -79,7 +79,7 @@ public class HseTeamMeetingController extends BaseController {
@RepeatSubmit() @RepeatSubmit()
@PostMapping() @PostMapping()
public R<Long> add(@Validated(AddGroup.class) @RequestBody HseTeamMeetingCreateReq req) { public R<Long> add(@Validated(AddGroup.class) @RequestBody HseTeamMeetingCreateReq req) {
return R.ok(busTeamMeetingService.insertByBo(req)); return R.ok(teamMeetingService.insertByBo(req));
} }
/** /**
@ -90,7 +90,7 @@ public class HseTeamMeetingController extends BaseController {
@RepeatSubmit() @RepeatSubmit()
@PutMapping() @PutMapping()
public R<Void> edit(@Validated(EditGroup.class) @RequestBody HseTeamMeetingUpdateReq req) { public R<Void> edit(@Validated(EditGroup.class) @RequestBody HseTeamMeetingUpdateReq req) {
return toAjax(busTeamMeetingService.updateByBo(req)); return toAjax(teamMeetingService.updateByBo(req));
} }
/** /**
@ -103,6 +103,6 @@ public class HseTeamMeetingController extends BaseController {
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public R<Void> remove(@NotEmpty(message = "主键不能为空") public R<Void> remove(@NotEmpty(message = "主键不能为空")
@PathVariable Long[] ids) { @PathVariable Long[] ids) {
return toAjax(busTeamMeetingService.deleteWithValidByIds(List.of(ids), true)); return toAjax(teamMeetingService.deleteWithValidByIds(List.of(ids), true));
} }
} }

View File

@ -22,6 +22,7 @@ import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.dromara.common.oss.core.OssClient; import org.dromara.common.oss.core.OssClient;
import org.dromara.common.oss.exception.OssException; import org.dromara.common.oss.exception.OssException;
import org.dromara.common.oss.factory.OssFactory; import org.dromara.common.oss.factory.OssFactory;
import org.dromara.common.satoken.utils.LoginHelper;
import org.dromara.project.domain.BusConstructionUser; import org.dromara.project.domain.BusConstructionUser;
import org.dromara.project.domain.BusProjectTeamMember; import org.dromara.project.domain.BusProjectTeamMember;
import org.dromara.project.service.IBusConstructionUserService; import org.dromara.project.service.IBusConstructionUserService;
@ -349,8 +350,12 @@ public class HseQuestionUserAnswerServiceImpl extends ServiceImpl<HseQuestionUse
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) { public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
Long userId = LoginHelper.getUserId();
List<HseQuestionUserAnswer> questionUserAnswerList = this.listByIds(ids);
if (isValid) { if (isValid) {
// TODO 做一些业务上的校验,判断是否需要校验 // TODO 做一些业务上的校验,判断是否需要校验
List<Long> projectId = questionUserAnswerList.stream().map(HseQuestionUserAnswer::getProjectId).toList();
projectService.validAuth(projectId, userId);
} }
return this.removeBatchByIds(ids); return this.removeBatchByIds(ids);
} }