Merge branch 'master' of http://gitea.zianxin.com/zianxin-tec/biz-api-cloud
This commit is contained in:
commit
641c3edde3
25 files changed
+1293
-6
No files matched your search
+119
@@ -0,0 +1,119 @@
|
||||
package com.bsd.pjcloud.canteen.controller;
|
||||
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.bsd.pjcloud.common.core.util.R;
|
||||
import com.bsd.pjcloud.common.log.annotation.SysLog;
|
||||
import com.bsd.pjcloud.canteen.entity.CanteenErpMaterialEntity;
|
||||
import com.bsd.pjcloud.canteen.service.CanteenErpMaterialService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import com.bsd.pjcloud.common.excel.annotation.ResponseExcel;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 原料表
|
||||
*
|
||||
* @author zjf
|
||||
* @date 2025-05-07 13:16:32
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/canteenErpMaterial" )
|
||||
@Tag(description = "canteenErpMaterial" , name = "原料表管理" )
|
||||
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
|
||||
public class CanteenErpMaterialController {
|
||||
|
||||
private final CanteenErpMaterialService canteenErpMaterialService;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param canteenErpMaterial 原料表
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "分页查询" , description = "分页查询" )
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('canteen_canteenErpMaterial_view')" )
|
||||
public R getCanteenErpMaterialPage(@ParameterObject Page page, @ParameterObject CanteenErpMaterialEntity canteenErpMaterial) {
|
||||
LambdaQueryWrapper<CanteenErpMaterialEntity> wrapper = Wrappers.lambdaQuery();
|
||||
return R.ok(canteenErpMaterialService.page(page, wrapper));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 通过id查询原料表
|
||||
* @param id id
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "通过id查询" , description = "通过id查询" )
|
||||
@GetMapping("/{id}" )
|
||||
@PreAuthorize("@pms.hasPermission('canteen_canteenErpMaterial_view')" )
|
||||
public R getById(@PathVariable("id" ) Long id) {
|
||||
return R.ok(canteenErpMaterialService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增原料表
|
||||
* @param canteenErpMaterial 原料表
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "新增原料表" , description = "新增原料表" )
|
||||
@SysLog("新增原料表" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('canteen_canteenErpMaterial_add')" )
|
||||
public R save(@RequestBody CanteenErpMaterialEntity canteenErpMaterial) {
|
||||
return R.ok(canteenErpMaterialService.save(canteenErpMaterial));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改原料表
|
||||
* @param canteenErpMaterial 原料表
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "修改原料表" , description = "修改原料表" )
|
||||
@SysLog("修改原料表" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('canteen_canteenErpMaterial_edit')" )
|
||||
public R updateById(@RequestBody CanteenErpMaterialEntity canteenErpMaterial) {
|
||||
return R.ok(canteenErpMaterialService.updateById(canteenErpMaterial));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除原料表
|
||||
* @param ids id列表
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "通过id删除原料表" , description = "通过id删除原料表" )
|
||||
@SysLog("通过id删除原料表" )
|
||||
@DeleteMapping
|
||||
@PreAuthorize("@pms.hasPermission('canteen_canteenErpMaterial_del')" )
|
||||
public R removeById(@RequestBody Long[] ids) {
|
||||
return R.ok(canteenErpMaterialService.removeBatchByIds(CollUtil.toList(ids)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出excel 表格
|
||||
* @param canteenErpMaterial 查询条件
|
||||
* @param ids 导出指定ID
|
||||
* @return excel 文件流
|
||||
*/
|
||||
@ResponseExcel
|
||||
@GetMapping("/export")
|
||||
@PreAuthorize("@pms.hasPermission('canteen_canteenErpMaterial_export')" )
|
||||
public List<CanteenErpMaterialEntity> export(CanteenErpMaterialEntity canteenErpMaterial,Long[] ids) {
|
||||
return canteenErpMaterialService.list(Wrappers.lambdaQuery(canteenErpMaterial).in(ArrayUtil.isNotEmpty(ids), CanteenErpMaterialEntity::getId, ids));
|
||||
}
|
||||
}
|
||||
+122
@@ -0,0 +1,122 @@
|
||||
package com.bsd.pjcloud.canteen.controller;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.bsd.pjcloud.common.core.util.R;
|
||||
import com.bsd.pjcloud.common.log.annotation.SysLog;
|
||||
import com.bsd.pjcloud.canteen.entity.CanteenInventoryRecordsEntity;
|
||||
import com.bsd.pjcloud.canteen.service.CanteenInventoryRecordsService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import com.bsd.pjcloud.common.excel.annotation.ResponseExcel;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 采购记录表
|
||||
*
|
||||
* @author zjf
|
||||
* @date 2025-05-07 17:00:50
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/canteenInventoryRecords" )
|
||||
@Tag(description = "canteenInventoryRecords" , name = "采购记录表管理" )
|
||||
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
|
||||
public class CanteenInventoryRecordsController {
|
||||
|
||||
private final CanteenInventoryRecordsService canteenInventoryRecordsService;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param canteenInventoryRecords 采购记录表
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "分页查询" , description = "分页查询" )
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('canteen_canteenInventoryRecords_view')" )
|
||||
public R getCanteenInventoryRecordsPage(@ParameterObject Page page, @ParameterObject CanteenInventoryRecordsEntity canteenInventoryRecords) {
|
||||
LambdaQueryWrapper<CanteenInventoryRecordsEntity> wrapper = Wrappers.lambdaQuery();
|
||||
wrapper.eq(StrUtil.isNotBlank(canteenInventoryRecords.getInventoryCode()),CanteenInventoryRecordsEntity::getInventoryCode,canteenInventoryRecords.getInventoryCode());
|
||||
wrapper.eq(Objects.nonNull(canteenInventoryRecords.getInventoryDate()),CanteenInventoryRecordsEntity::getInventoryDate,canteenInventoryRecords.getInventoryDate());
|
||||
return R.ok(canteenInventoryRecordsService.page(page, wrapper));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 通过id查询采购记录表
|
||||
* @param id id
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "通过id查询" , description = "通过id查询" )
|
||||
@GetMapping("/{id}" )
|
||||
@PreAuthorize("@pms.hasPermission('canteen_canteenInventoryRecords_view')" )
|
||||
public R getById(@PathVariable("id" ) Long id) {
|
||||
return R.ok(canteenInventoryRecordsService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增采购记录表
|
||||
* @param canteenInventoryRecords 采购记录表
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "新增采购记录表" , description = "新增采购记录表" )
|
||||
@SysLog("新增采购记录表" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('canteen_canteenInventoryRecords_add')" )
|
||||
public R save(@RequestBody CanteenInventoryRecordsEntity canteenInventoryRecords) {
|
||||
return R.ok(canteenInventoryRecordsService.save(canteenInventoryRecords));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改采购记录表
|
||||
* @param canteenInventoryRecords 采购记录表
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "修改采购记录表" , description = "修改采购记录表" )
|
||||
@SysLog("修改采购记录表" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('canteen_canteenInventoryRecords_edit')" )
|
||||
public R updateById(@RequestBody CanteenInventoryRecordsEntity canteenInventoryRecords) {
|
||||
return R.ok(canteenInventoryRecordsService.updateById(canteenInventoryRecords));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除采购记录表
|
||||
* @param ids id列表
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "通过id删除采购记录表" , description = "通过id删除采购记录表" )
|
||||
@SysLog("通过id删除采购记录表" )
|
||||
@DeleteMapping
|
||||
@PreAuthorize("@pms.hasPermission('canteen_canteenInventoryRecords_del')" )
|
||||
public R removeById(@RequestBody Long[] ids) {
|
||||
return R.ok(canteenInventoryRecordsService.removeBatchByIds(CollUtil.toList(ids)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出excel 表格
|
||||
* @param canteenInventoryRecords 查询条件
|
||||
* @param ids 导出指定ID
|
||||
* @return excel 文件流
|
||||
*/
|
||||
@ResponseExcel
|
||||
@GetMapping("/export")
|
||||
@PreAuthorize("@pms.hasPermission('canteen_canteenInventoryRecords_export')" )
|
||||
public List<CanteenInventoryRecordsEntity> export(CanteenInventoryRecordsEntity canteenInventoryRecords,Long[] ids) {
|
||||
return canteenInventoryRecordsService.list(Wrappers.lambdaQuery(canteenInventoryRecords).in(ArrayUtil.isNotEmpty(ids), CanteenInventoryRecordsEntity::getId, ids));
|
||||
}
|
||||
}
|
||||
+119
@@ -0,0 +1,119 @@
|
||||
package com.bsd.pjcloud.canteen.controller;
|
||||
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.bsd.pjcloud.common.core.util.R;
|
||||
import com.bsd.pjcloud.common.log.annotation.SysLog;
|
||||
import com.bsd.pjcloud.canteen.entity.CanteenInventoryRecordsItemEntity;
|
||||
import com.bsd.pjcloud.canteen.service.CanteenInventoryRecordsItemService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import com.bsd.pjcloud.common.excel.annotation.ResponseExcel;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 采购记录明细表
|
||||
*
|
||||
* @author zjf
|
||||
* @date 2025-05-07 17:02:53
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/canteenInventoryRecordsItem" )
|
||||
@Tag(description = "canteenInventoryRecordsItem" , name = "采购记录明细表管理" )
|
||||
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
|
||||
public class CanteenInventoryRecordsItemController {
|
||||
|
||||
private final CanteenInventoryRecordsItemService canteenInventoryRecordsItemService;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param canteenInventoryRecordsItem 采购记录明细表
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "分页查询" , description = "分页查询" )
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('canteen_canteenInventoryRecordsItem_view')" )
|
||||
public R getCanteenInventoryRecordsItemPage(@ParameterObject Page page, @ParameterObject CanteenInventoryRecordsItemEntity canteenInventoryRecordsItem) {
|
||||
LambdaQueryWrapper<CanteenInventoryRecordsItemEntity> wrapper = Wrappers.lambdaQuery();
|
||||
return R.ok(canteenInventoryRecordsItemService.page(page, wrapper));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 通过id查询采购记录明细表
|
||||
* @param id id
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "通过id查询" , description = "通过id查询" )
|
||||
@GetMapping("/{id}" )
|
||||
@PreAuthorize("@pms.hasPermission('canteen_canteenInventoryRecordsItem_view')" )
|
||||
public R getById(@PathVariable("id" ) Long id) {
|
||||
return R.ok(canteenInventoryRecordsItemService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增采购记录明细表
|
||||
* @param canteenInventoryRecordsItem 采购记录明细表
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "新增采购记录明细表" , description = "新增采购记录明细表" )
|
||||
@SysLog("新增采购记录明细表" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('canteen_canteenInventoryRecordsItem_add')" )
|
||||
public R save(@RequestBody CanteenInventoryRecordsItemEntity canteenInventoryRecordsItem) {
|
||||
return R.ok(canteenInventoryRecordsItemService.save(canteenInventoryRecordsItem));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改采购记录明细表
|
||||
* @param canteenInventoryRecordsItem 采购记录明细表
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "修改采购记录明细表" , description = "修改采购记录明细表" )
|
||||
@SysLog("修改采购记录明细表" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('canteen_canteenInventoryRecordsItem_edit')" )
|
||||
public R updateById(@RequestBody CanteenInventoryRecordsItemEntity canteenInventoryRecordsItem) {
|
||||
return R.ok(canteenInventoryRecordsItemService.updateById(canteenInventoryRecordsItem));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除采购记录明细表
|
||||
* @param ids id列表
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "通过id删除采购记录明细表" , description = "通过id删除采购记录明细表" )
|
||||
@SysLog("通过id删除采购记录明细表" )
|
||||
@DeleteMapping
|
||||
@PreAuthorize("@pms.hasPermission('canteen_canteenInventoryRecordsItem_del')" )
|
||||
public R removeById(@RequestBody Long[] ids) {
|
||||
return R.ok(canteenInventoryRecordsItemService.removeBatchByIds(CollUtil.toList(ids)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出excel 表格
|
||||
* @param canteenInventoryRecordsItem 查询条件
|
||||
* @param ids 导出指定ID
|
||||
* @return excel 文件流
|
||||
*/
|
||||
@ResponseExcel
|
||||
@GetMapping("/export")
|
||||
@PreAuthorize("@pms.hasPermission('canteen_canteenInventoryRecordsItem_export')" )
|
||||
public List<CanteenInventoryRecordsItemEntity> export(CanteenInventoryRecordsItemEntity canteenInventoryRecordsItem,Long[] ids) {
|
||||
return canteenInventoryRecordsItemService.list(Wrappers.lambdaQuery(canteenInventoryRecordsItem).in(ArrayUtil.isNotEmpty(ids), CanteenInventoryRecordsItemEntity::getId, ids));
|
||||
}
|
||||
}
|
||||
+119
@@ -0,0 +1,119 @@
|
||||
package com.bsd.pjcloud.canteen.controller;
|
||||
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.bsd.pjcloud.common.core.util.R;
|
||||
import com.bsd.pjcloud.common.log.annotation.SysLog;
|
||||
import com.bsd.pjcloud.canteen.entity.CanteenStockEntity;
|
||||
import com.bsd.pjcloud.canteen.service.CanteenStockService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import com.bsd.pjcloud.common.excel.annotation.ResponseExcel;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 库存表
|
||||
*
|
||||
* @author zjf
|
||||
* @date 2025-05-07 16:40:35
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/canteenStock" )
|
||||
@Tag(description = "canteenStock" , name = "库存表管理" )
|
||||
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
|
||||
public class CanteenStockController {
|
||||
|
||||
private final CanteenStockService canteenStockService;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param canteenStock 库存表
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "分页查询" , description = "分页查询" )
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('canteen_canteenStock_view')" )
|
||||
public R getCanteenStockPage(@ParameterObject Page page, @ParameterObject CanteenStockEntity canteenStock) {
|
||||
LambdaQueryWrapper<CanteenStockEntity> wrapper = Wrappers.lambdaQuery();
|
||||
return R.ok(canteenStockService.page(page, wrapper));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 通过id查询库存表
|
||||
* @param id id
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "通过id查询" , description = "通过id查询" )
|
||||
@GetMapping("/{id}" )
|
||||
@PreAuthorize("@pms.hasPermission('canteen_canteenStock_view')" )
|
||||
public R getById(@PathVariable("id" ) Long id) {
|
||||
return R.ok(canteenStockService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增库存表
|
||||
* @param canteenStock 库存表
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "新增库存表" , description = "新增库存表" )
|
||||
@SysLog("新增库存表" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('canteen_canteenStock_add')" )
|
||||
public R save(@RequestBody CanteenStockEntity canteenStock) {
|
||||
return R.ok(canteenStockService.save(canteenStock));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改库存表
|
||||
* @param canteenStock 库存表
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "修改库存表" , description = "修改库存表" )
|
||||
@SysLog("修改库存表" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('canteen_canteenStock_edit')" )
|
||||
public R updateById(@RequestBody CanteenStockEntity canteenStock) {
|
||||
return R.ok(canteenStockService.updateById(canteenStock));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除库存表
|
||||
* @param ids id列表
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "通过id删除库存表" , description = "通过id删除库存表" )
|
||||
@SysLog("通过id删除库存表" )
|
||||
@DeleteMapping
|
||||
@PreAuthorize("@pms.hasPermission('canteen_canteenStock_del')" )
|
||||
public R removeById(@RequestBody Long[] ids) {
|
||||
return R.ok(canteenStockService.removeBatchByIds(CollUtil.toList(ids)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出excel 表格
|
||||
* @param canteenStock 查询条件
|
||||
* @param ids 导出指定ID
|
||||
* @return excel 文件流
|
||||
*/
|
||||
@ResponseExcel
|
||||
@GetMapping("/export")
|
||||
@PreAuthorize("@pms.hasPermission('canteen_canteenStock_export')" )
|
||||
public List<CanteenStockEntity> export(CanteenStockEntity canteenStock,Long[] ids) {
|
||||
return canteenStockService.list(Wrappers.lambdaQuery(canteenStock).in(ArrayUtil.isNotEmpty(ids), CanteenStockEntity::getId, ids));
|
||||
}
|
||||
}
|
||||
+91
@@ -0,0 +1,91 @@
|
||||
package com.bsd.pjcloud.canteen.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.bsd.pjcloud.common.core.util.TenantTable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 原料表
|
||||
*
|
||||
* @author zjf
|
||||
* @date 2025-05-07 13:16:32
|
||||
*/
|
||||
@Data
|
||||
@TenantTable
|
||||
@TableName("canteen_erp_material")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "原料表")
|
||||
public class CanteenErpMaterialEntity extends Model<CanteenErpMaterialEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@Schema(description="id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
@Schema(description="商品名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 商品单位
|
||||
*/
|
||||
@Schema(description="商品单位")
|
||||
private String unit;
|
||||
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
@Schema(description="部门id")
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description="创建人")
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description="创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@Schema(description="更新人")
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@Schema(description="更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
@TableLogic
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description="是否删除")
|
||||
private String delFlag;
|
||||
|
||||
/**
|
||||
* 租户编号
|
||||
*/
|
||||
@Schema(description="租户编号")
|
||||
private Long tenantId;
|
||||
}
|
||||
+176
@@ -0,0 +1,176 @@
|
||||
package com.bsd.pjcloud.canteen.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.bsd.pjcloud.common.core.util.TenantTable;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 采购记录表
|
||||
*
|
||||
* @author zjf
|
||||
* @date 2025-05-07 17:00:50
|
||||
*/
|
||||
@Data
|
||||
@TenantTable
|
||||
@TableName("canteen_inventory_records")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "采购记录表")
|
||||
public class CanteenInventoryRecordsEntity extends Model<CanteenInventoryRecordsEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@Schema(description="主键")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 单据编号(规则生成,出入库编号)
|
||||
*/
|
||||
@Schema(description="单据编号(规则生成,出入库编号)")
|
||||
private String inventoryCode;
|
||||
|
||||
/**
|
||||
* 单据日期
|
||||
*/
|
||||
@Schema(description="单据日期")
|
||||
private LocalDate inventoryDate;
|
||||
|
||||
/**
|
||||
* 单据类型(字典inventory_type)采购入库
|
||||
*/
|
||||
@Schema(description="单据类型(字典inventory_type)采购入库")
|
||||
private String inventoryType;
|
||||
|
||||
/**
|
||||
* 来源ID(根据类型指向对应的表,如采购单ID、退货单ID等)
|
||||
*/
|
||||
@Schema(description="来源ID(根据类型指向对应的表,如采购单ID、退货单ID等)")
|
||||
private String linkCode;
|
||||
|
||||
/**
|
||||
* 经办人id
|
||||
*/
|
||||
@Schema(description="经办人id")
|
||||
private Long handlerUserId;
|
||||
|
||||
/**
|
||||
* 审批状态
|
||||
*/
|
||||
@Schema(description="审批状态")
|
||||
private String checkStatus;
|
||||
|
||||
/**
|
||||
* 审批人id
|
||||
*/
|
||||
@Schema(description="审批人id")
|
||||
private String checkUserId;
|
||||
|
||||
/**
|
||||
* 审核日期
|
||||
*/
|
||||
@Schema(description="审核日期")
|
||||
private LocalDateTime checkTime;
|
||||
|
||||
/**
|
||||
* 商户编号
|
||||
*/
|
||||
@Schema(description="商户编号")
|
||||
private Long merchantId;
|
||||
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
@Schema(description="部门id")
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 货商
|
||||
*/
|
||||
@Schema(description="货商")
|
||||
private Long supplierId;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Schema(description="备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 订单类型(1入库 2出库)
|
||||
*/
|
||||
@Schema(description="订单类型(1入库 2出库)")
|
||||
private String orderType;
|
||||
|
||||
/**
|
||||
* 入库总金额
|
||||
*/
|
||||
@Schema(description="入库总金额")
|
||||
private Integer totalAmount;
|
||||
|
||||
/**
|
||||
* 收款金额
|
||||
*/
|
||||
@Schema(description="收款金额")
|
||||
private Integer receiveAmount;
|
||||
|
||||
/**
|
||||
* 实例id
|
||||
*/
|
||||
@Schema(description="实例id")
|
||||
private String processInstanceId;
|
||||
|
||||
/**
|
||||
* 审核原因
|
||||
*/
|
||||
@Schema(description="审核原因")
|
||||
private String checkReason;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description="创建人")
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description="创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@Schema(description="更新人")
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@Schema(description="更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
@TableLogic
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description="是否删除")
|
||||
private String delFlag;
|
||||
|
||||
/**
|
||||
* 租户编号
|
||||
*/
|
||||
@Schema(description="租户编号")
|
||||
private Long tenantId;
|
||||
}
|
||||
+175
@@ -0,0 +1,175 @@
|
||||
package com.bsd.pjcloud.canteen.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.bsd.pjcloud.common.core.util.TenantTable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 采购记录明细表
|
||||
*
|
||||
* @author zjf
|
||||
* @date 2025-05-07 17:02:53
|
||||
*/
|
||||
@Data
|
||||
@TenantTable
|
||||
@TableName("canteen_inventory_records_item")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "采购记录明细表")
|
||||
public class CanteenInventoryRecordsItemEntity extends Model<CanteenInventoryRecordsItemEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@Schema(description="id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 单据类型(字典inventory_type)
|
||||
*/
|
||||
@Schema(description="单据类型(字典inventory_type)")
|
||||
private String inventoryType;
|
||||
|
||||
/**
|
||||
* 原料id
|
||||
*/
|
||||
@Schema(description="原料id")
|
||||
private Long erpMaterialId;
|
||||
|
||||
/**
|
||||
* 商户编号
|
||||
*/
|
||||
@Schema(description="商户编号")
|
||||
private Long merchantId;
|
||||
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
@Schema(description="部门id")
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 出入库数量
|
||||
*/
|
||||
@Schema(description="出入库数量")
|
||||
private Integer quantity;
|
||||
|
||||
/**
|
||||
* 单价
|
||||
*/
|
||||
@Schema(description="单价")
|
||||
private Integer unitPrice;
|
||||
|
||||
/**
|
||||
* 总金额
|
||||
*/
|
||||
@Schema(description="总金额")
|
||||
private Integer totalAmount;
|
||||
|
||||
/**
|
||||
* 税率%
|
||||
*/
|
||||
@Schema(description="税率%")
|
||||
private Integer taxRate;
|
||||
|
||||
/**
|
||||
* 税前金额
|
||||
*/
|
||||
@Schema(description="税前金额")
|
||||
private Integer taxAmount;
|
||||
|
||||
/**
|
||||
* 货商
|
||||
*/
|
||||
@Schema(description="货商")
|
||||
private Long supplierId;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Schema(description="备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 订单类型(1入库 2出库)
|
||||
*/
|
||||
@Schema(description="订单类型(1入库 2出库)")
|
||||
private String orderType;
|
||||
|
||||
/**
|
||||
* 出入库关联id
|
||||
*/
|
||||
@Schema(description="出入库关联id")
|
||||
private Long inventoryId;
|
||||
|
||||
/**
|
||||
* 总数
|
||||
*/
|
||||
@Schema(description="总数")
|
||||
private Integer totalNumber;
|
||||
|
||||
/**
|
||||
* 账面数量
|
||||
*/
|
||||
@Schema(description="账面数量")
|
||||
private Integer accountNumber;
|
||||
|
||||
/**
|
||||
* 实际数量
|
||||
*/
|
||||
@Schema(description="实际数量")
|
||||
private Integer realNumber;
|
||||
|
||||
/**
|
||||
* 实际单价
|
||||
*/
|
||||
@Schema(description="实际单价")
|
||||
private Integer realPrice;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description="创建人")
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description="创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@Schema(description="更新人")
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@Schema(description="更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
@TableLogic
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description="是否删除")
|
||||
private String delFlag;
|
||||
|
||||
/**
|
||||
* 租户编号
|
||||
*/
|
||||
@Schema(description="租户编号")
|
||||
private Long tenantId;
|
||||
}
|
||||
+121
@@ -0,0 +1,121 @@
|
||||
package com.bsd.pjcloud.canteen.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.bsd.pjcloud.common.core.util.TenantTable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 库存表
|
||||
*
|
||||
* @author zjf
|
||||
* @date 2025-05-07 16:40:35
|
||||
*/
|
||||
@Data
|
||||
@TenantTable
|
||||
@TableName("canteen_stock")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "库存表")
|
||||
public class CanteenStockEntity extends Model<CanteenStockEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@Schema(description="id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 期初数量
|
||||
*/
|
||||
@Schema(description="期初数量")
|
||||
private Double baseStock;
|
||||
|
||||
/**
|
||||
* 类型 原料/成品
|
||||
*/
|
||||
@Schema(description="类型 原料/成品")
|
||||
private String itemType;
|
||||
|
||||
/**
|
||||
* 成品id/原料id
|
||||
*/
|
||||
@Schema(description="成品id/原料id")
|
||||
private Long itemId;
|
||||
|
||||
/**
|
||||
* 乐观锁版本号
|
||||
*/
|
||||
@Schema(description="乐观锁版本号")
|
||||
private Integer version;
|
||||
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
@Schema(description="部门id")
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 库存上限
|
||||
*/
|
||||
@Schema(description="库存上限")
|
||||
private Integer inventoryUpperLimit;
|
||||
|
||||
/**
|
||||
* 库存下限
|
||||
*/
|
||||
@Schema(description="库存下限")
|
||||
private Integer inventoryLowerLimit;
|
||||
|
||||
/**
|
||||
* 当前库存数量
|
||||
*/
|
||||
@Schema(description="当前库存数量")
|
||||
private Double currentStock;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description="创建人")
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description="创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@Schema(description="更新人")
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@Schema(description="更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
@TableLogic
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description="是否删除")
|
||||
private String delFlag;
|
||||
|
||||
/**
|
||||
* 租户编号
|
||||
*/
|
||||
@Schema(description="租户编号")
|
||||
private Long tenantId;
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package com.bsd.pjcloud.canteen.mapper;
|
||||
|
||||
import com.bsd.pjcloud.common.data.datascope.PjcloudBaseMapper;
|
||||
import com.bsd.pjcloud.canteen.entity.CanteenErpMaterialEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface CanteenErpMaterialMapper extends PjcloudBaseMapper<CanteenErpMaterialEntity> {
|
||||
|
||||
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package com.bsd.pjcloud.canteen.mapper;
|
||||
|
||||
import com.bsd.pjcloud.common.data.datascope.PjcloudBaseMapper;
|
||||
import com.bsd.pjcloud.canteen.entity.CanteenInventoryRecordsItemEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface CanteenInventoryRecordsItemMapper extends PjcloudBaseMapper<CanteenInventoryRecordsItemEntity> {
|
||||
|
||||
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package com.bsd.pjcloud.canteen.mapper;
|
||||
|
||||
import com.bsd.pjcloud.common.data.datascope.PjcloudBaseMapper;
|
||||
import com.bsd.pjcloud.canteen.entity.CanteenInventoryRecordsEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface CanteenInventoryRecordsMapper extends PjcloudBaseMapper<CanteenInventoryRecordsEntity> {
|
||||
|
||||
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package com.bsd.pjcloud.canteen.mapper;
|
||||
|
||||
import com.bsd.pjcloud.common.data.datascope.PjcloudBaseMapper;
|
||||
import com.bsd.pjcloud.canteen.entity.CanteenStockEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface CanteenStockMapper extends PjcloudBaseMapper<CanteenStockEntity> {
|
||||
|
||||
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package com.bsd.pjcloud.canteen.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.bsd.pjcloud.canteen.entity.CanteenErpMaterialEntity;
|
||||
|
||||
public interface CanteenErpMaterialService extends IService<CanteenErpMaterialEntity> {
|
||||
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package com.bsd.pjcloud.canteen.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.bsd.pjcloud.canteen.entity.CanteenInventoryRecordsItemEntity;
|
||||
|
||||
public interface CanteenInventoryRecordsItemService extends IService<CanteenInventoryRecordsItemEntity> {
|
||||
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package com.bsd.pjcloud.canteen.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.bsd.pjcloud.canteen.entity.CanteenInventoryRecordsEntity;
|
||||
|
||||
public interface CanteenInventoryRecordsService extends IService<CanteenInventoryRecordsEntity> {
|
||||
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package com.bsd.pjcloud.canteen.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.bsd.pjcloud.canteen.entity.CanteenStockEntity;
|
||||
|
||||
public interface CanteenStockService extends IService<CanteenStockEntity> {
|
||||
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.bsd.pjcloud.canteen.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.bsd.pjcloud.canteen.entity.CanteenErpMaterialEntity;
|
||||
import com.bsd.pjcloud.canteen.mapper.CanteenErpMaterialMapper;
|
||||
import com.bsd.pjcloud.canteen.service.CanteenErpMaterialService;
|
||||
import org.springframework.stereotype.Service;
|
||||
/**
|
||||
* 原料表
|
||||
*
|
||||
* @author zjf
|
||||
* @date 2025-05-07 13:16:32
|
||||
*/
|
||||
@Service
|
||||
public class CanteenErpMaterialServiceImpl extends ServiceImpl<CanteenErpMaterialMapper, CanteenErpMaterialEntity> implements CanteenErpMaterialService {
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.bsd.pjcloud.canteen.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.bsd.pjcloud.canteen.entity.CanteenInventoryRecordsItemEntity;
|
||||
import com.bsd.pjcloud.canteen.mapper.CanteenInventoryRecordsItemMapper;
|
||||
import com.bsd.pjcloud.canteen.service.CanteenInventoryRecordsItemService;
|
||||
import org.springframework.stereotype.Service;
|
||||
/**
|
||||
* 采购记录明细表
|
||||
*
|
||||
* @author zjf
|
||||
* @date 2025-05-07 17:02:53
|
||||
*/
|
||||
@Service
|
||||
public class CanteenInventoryRecordsItemServiceImpl extends ServiceImpl<CanteenInventoryRecordsItemMapper, CanteenInventoryRecordsItemEntity> implements CanteenInventoryRecordsItemService {
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.bsd.pjcloud.canteen.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.bsd.pjcloud.canteen.entity.CanteenInventoryRecordsEntity;
|
||||
import com.bsd.pjcloud.canteen.mapper.CanteenInventoryRecordsMapper;
|
||||
import com.bsd.pjcloud.canteen.service.CanteenInventoryRecordsService;
|
||||
import org.springframework.stereotype.Service;
|
||||
/**
|
||||
* 采购记录表
|
||||
*
|
||||
* @author zjf
|
||||
* @date 2025-05-07 17:00:50
|
||||
*/
|
||||
@Service
|
||||
public class CanteenInventoryRecordsServiceImpl extends ServiceImpl<CanteenInventoryRecordsMapper, CanteenInventoryRecordsEntity> implements CanteenInventoryRecordsService {
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.bsd.pjcloud.canteen.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.bsd.pjcloud.canteen.entity.CanteenStockEntity;
|
||||
import com.bsd.pjcloud.canteen.mapper.CanteenStockMapper;
|
||||
import com.bsd.pjcloud.canteen.service.CanteenStockService;
|
||||
import org.springframework.stereotype.Service;
|
||||
/**
|
||||
* 库存表
|
||||
*
|
||||
* @author zjf
|
||||
* @date 2025-05-07 16:40:35
|
||||
*/
|
||||
@Service
|
||||
public class CanteenStockServiceImpl extends ServiceImpl<CanteenStockMapper, CanteenStockEntity> implements CanteenStockService {
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.bsd.pjcloud.canteen.mapper.CanteenErpMaterialMapper">
|
||||
|
||||
<resultMap id="canteenErpMaterialMap" type="com.bsd.pjcloud.canteen.entity.CanteenErpMaterialEntity">
|
||||
<id property="id" column="id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="unit" column="unit"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="tenantId" column="tenant_id"/>
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.bsd.pjcloud.canteen.mapper.CanteenInventoryRecordsItemMapper">
|
||||
|
||||
<resultMap id="canteenInventoryRecordsItemMap" type="com.bsd.pjcloud.canteen.entity.CanteenInventoryRecordsItemEntity">
|
||||
<id property="id" column="id"/>
|
||||
<result property="inventoryType" column="inventory_type"/>
|
||||
<result property="erpMaterialId" column="erp_material_id"/>
|
||||
<result property="merchantId" column="merchant_id"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
<result property="quantity" column="quantity"/>
|
||||
<result property="unitPrice" column="unit_price"/>
|
||||
<result property="totalAmount" column="total_amount"/>
|
||||
<result property="taxRate" column="tax_rate"/>
|
||||
<result property="taxAmount" column="tax_amount"/>
|
||||
<result property="supplierId" column="supplier_id"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="orderType" column="order_type"/>
|
||||
<result property="inventoryId" column="inventory_id"/>
|
||||
<result property="totalNumber" column="total_number"/>
|
||||
<result property="accountNumber" column="account_number"/>
|
||||
<result property="realNumber" column="real_number"/>
|
||||
<result property="realPrice" column="real_price"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="tenantId" column="tenant_id"/>
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.bsd.pjcloud.canteen.mapper.CanteenInventoryRecordsMapper">
|
||||
|
||||
<resultMap id="canteenInventoryRecordsMap" type="com.bsd.pjcloud.canteen.entity.CanteenInventoryRecordsEntity">
|
||||
<id property="id" column="id"/>
|
||||
<result property="inventoryCode" column="inventory_code"/>
|
||||
<result property="inventoryDate" column="inventory_date"/>
|
||||
<result property="inventoryType" column="inventory_type"/>
|
||||
<result property="linkCode" column="link_code"/>
|
||||
<result property="handlerUserId" column="handler_user_id"/>
|
||||
<result property="checkStatus" column="check_status"/>
|
||||
<result property="checkUserId" column="check_user_id"/>
|
||||
<result property="checkTime" column="check_time"/>
|
||||
<result property="merchantId" column="merchant_id"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
<result property="supplierId" column="supplier_id"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="orderType" column="order_type"/>
|
||||
<result property="totalAmount" column="total_amount"/>
|
||||
<result property="receiveAmount" column="receive_amount"/>
|
||||
<result property="processInstanceId" column="process_instance_id"/>
|
||||
<result property="checkReason" column="check_reason"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="tenantId" column="tenant_id"/>
|
||||
</resultMap>
|
||||
</mapper>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.bsd.pjcloud.canteen.mapper.CanteenStockMapper">
|
||||
|
||||
<resultMap id="canteenStockMap" type="com.bsd.pjcloud.canteen.entity.CanteenStockEntity">
|
||||
<id property="id" column="id"/>
|
||||
<result property="baseStock" column="base_stock"/>
|
||||
<result property="itemType" column="item_type"/>
|
||||
<result property="itemId" column="item_id"/>
|
||||
<result property="version" column="version"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
<result property="inventoryUpperLimit" column="inventory_upper_limit"/>
|
||||
<result property="inventoryLowerLimit" column="inventory_lower_limit"/>
|
||||
<result property="currentStock" column="current_stock"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="tenantId" column="tenant_id"/>
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+6
-6
@@ -218,12 +218,12 @@ public class ThirdPartyOAth2Cotroller {
|
||||
if(!CollectionUtils.isEmpty(sysUserList)){
|
||||
SysUser sysUser = sysUserList.get(0);
|
||||
//判断当前用户设备是否信任
|
||||
String md5 = DeviceFingerprintUtil.generate(httpServletRequest);
|
||||
R<UserTrustedDeviceEntity> userTrustedDeviceR = remoteUserTrustedDeviceService.getUserTrustedDeviceByIdAndMD5(sysUser.getPhone(), md5);
|
||||
UserTrustedDeviceEntity userTrustedDevice = userTrustedDeviceR.getData();
|
||||
if (userTrustedDevice == null || userTrustedDevice.getExpireTime().isBefore(LocalDateTime.now())){
|
||||
return R.failed(-1,"请先信任设备");
|
||||
}
|
||||
// String md5 = DeviceFingerprintUtil.generate(httpServletRequest);
|
||||
// R<UserTrustedDeviceEntity> userTrustedDeviceR = remoteUserTrustedDeviceService.getUserTrustedDeviceByIdAndMD5(sysUser.getPhone(), md5);
|
||||
// UserTrustedDeviceEntity userTrustedDevice = userTrustedDeviceR.getData();
|
||||
// if (userTrustedDevice == null || userTrustedDevice.getExpireTime().isBefore(LocalDateTime.now())){
|
||||
// return R.failed(-1,"请先信任设备");
|
||||
// }
|
||||
//登录成功生成token
|
||||
UserTokenDTO userTokenDTO = new UserTokenDTO();
|
||||
userTokenDTO.setSysUser(sysUser);
|
||||
|
||||
Reference in new issue
Block a user