add - 入库记录、出库记录
parent
16be468d28
commit
eacb9a3522
@ -0,0 +1,103 @@
|
||||
package com.aucma.base.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.aucma.common.utils.DateUtils;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.aucma.common.annotation.Log;
|
||||
import com.aucma.common.core.controller.BaseController;
|
||||
import com.aucma.common.core.domain.AjaxResult;
|
||||
import com.aucma.common.enums.BusinessType;
|
||||
import com.aucma.base.domain.RecordInStore;
|
||||
import com.aucma.base.service.IRecordInStoreService;
|
||||
import com.aucma.common.utils.poi.ExcelUtil;
|
||||
import com.aucma.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 入库记录Controller
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2023-09-21
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/base/inStore" )
|
||||
public class RecordInStoreController extends BaseController {
|
||||
@Autowired
|
||||
private IRecordInStoreService recordInStoreService;
|
||||
|
||||
/**
|
||||
* 查询入库记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:inStore:list')" )
|
||||
@GetMapping("/list" )
|
||||
public TableDataInfo list(RecordInStore recordInStore) {
|
||||
startPage();
|
||||
List<RecordInStore> list = recordInStoreService.selectRecordInStoreList(recordInStore);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出入库记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:inStore:export')" )
|
||||
@Log(title = "入库记录" , businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export" )
|
||||
public void export(HttpServletResponse response, RecordInStore recordInStore) {
|
||||
List<RecordInStore> list = recordInStoreService.selectRecordInStoreList(recordInStore);
|
||||
ExcelUtil<RecordInStore> util = new ExcelUtil<RecordInStore>(RecordInStore. class);
|
||||
util.exportExcel(response, list, "入库记录数据" );
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取入库记录详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:inStore:query')" )
|
||||
@GetMapping(value = "/{objId}" )
|
||||
public AjaxResult getInfo(@PathVariable("objId" ) Long objId) {
|
||||
return success(recordInStoreService.selectRecordInStoreByObjId(objId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增入库记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:inStore:add')" )
|
||||
@Log(title = "入库记录" , businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody RecordInStore recordInStore) {
|
||||
recordInStore.setCreatedBy(getUsername());
|
||||
recordInStore.setCreatedTime(DateUtils.getNowDate());
|
||||
return toAjax(recordInStoreService.insertRecordInStore(recordInStore));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改入库记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:inStore:edit')" )
|
||||
@Log(title = "入库记录" , businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody RecordInStore recordInStore) {
|
||||
recordInStore.setUpdatedBy(getUsername());
|
||||
recordInStore.setUpdatedTime(DateUtils.getNowDate());
|
||||
return toAjax(recordInStoreService.updateRecordInStore(recordInStore));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除入库记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:inStore:remove')" )
|
||||
@Log(title = "入库记录" , businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{objIds}" )
|
||||
public AjaxResult remove(@PathVariable Long[] objIds) {
|
||||
return toAjax(recordInStoreService.deleteRecordInStoreByObjIds(objIds));
|
||||
}
|
||||
}
|
@ -0,0 +1,103 @@
|
||||
package com.aucma.base.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.aucma.common.utils.DateUtils;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.aucma.common.annotation.Log;
|
||||
import com.aucma.common.core.controller.BaseController;
|
||||
import com.aucma.common.core.domain.AjaxResult;
|
||||
import com.aucma.common.enums.BusinessType;
|
||||
import com.aucma.base.domain.RecordOutStore;
|
||||
import com.aucma.base.service.IRecordOutStoreService;
|
||||
import com.aucma.common.utils.poi.ExcelUtil;
|
||||
import com.aucma.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 出库记录Controller
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2023-09-21
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/base/outStore" )
|
||||
public class RecordOutStoreController extends BaseController {
|
||||
@Autowired
|
||||
private IRecordOutStoreService recordOutStoreService;
|
||||
|
||||
/**
|
||||
* 查询出库记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:outStore:list')" )
|
||||
@GetMapping("/list" )
|
||||
public TableDataInfo list(RecordOutStore recordOutStore) {
|
||||
startPage();
|
||||
List<RecordOutStore> list = recordOutStoreService.selectRecordOutStoreList(recordOutStore);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出出库记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:outStore:export')" )
|
||||
@Log(title = "出库记录" , businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export" )
|
||||
public void export(HttpServletResponse response, RecordOutStore recordOutStore) {
|
||||
List<RecordOutStore> list = recordOutStoreService.selectRecordOutStoreList(recordOutStore);
|
||||
ExcelUtil<RecordOutStore> util = new ExcelUtil<RecordOutStore>(RecordOutStore. class);
|
||||
util.exportExcel(response, list, "出库记录数据" );
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取出库记录详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:outStore:query')" )
|
||||
@GetMapping(value = "/{objId}" )
|
||||
public AjaxResult getInfo(@PathVariable("objId" ) Long objId) {
|
||||
return success(recordOutStoreService.selectRecordOutStoreByObjId(objId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增出库记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:outStore:add')" )
|
||||
@Log(title = "出库记录" , businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody RecordOutStore recordOutStore) {
|
||||
recordOutStore.setCreatedBy(getUsername());
|
||||
recordOutStore.setCreatedTime(DateUtils.getNowDate());
|
||||
return toAjax(recordOutStoreService.insertRecordOutStore(recordOutStore));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改出库记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:outStore:edit')" )
|
||||
@Log(title = "出库记录" , businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody RecordOutStore recordOutStore) {
|
||||
recordOutStore.setUpdatedBy(getUsername());
|
||||
recordOutStore.setUpdatedTime(DateUtils.getNowDate());
|
||||
return toAjax(recordOutStoreService.updateRecordOutStore(recordOutStore));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除出库记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:outStore:remove')" )
|
||||
@Log(title = "出库记录" , businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{objIds}" )
|
||||
public AjaxResult remove(@PathVariable Long[] objIds) {
|
||||
return toAjax(recordOutStoreService.deleteRecordOutStoreByObjIds(objIds));
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.aucma.base.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.aucma.base.domain.RecordInStore;
|
||||
|
||||
/**
|
||||
* 入库记录Mapper接口
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2023-09-21
|
||||
*/
|
||||
public interface RecordInStoreMapper
|
||||
{
|
||||
/**
|
||||
* 查询入库记录
|
||||
*
|
||||
* @param objId 入库记录主键
|
||||
* @return 入库记录
|
||||
*/
|
||||
public RecordInStore selectRecordInStoreByObjId(Long objId);
|
||||
|
||||
/**
|
||||
* 查询入库记录列表
|
||||
*
|
||||
* @param recordInStore 入库记录
|
||||
* @return 入库记录集合
|
||||
*/
|
||||
public List<RecordInStore> selectRecordInStoreList(RecordInStore recordInStore);
|
||||
|
||||
/**
|
||||
* 新增入库记录
|
||||
*
|
||||
* @param recordInStore 入库记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRecordInStore(RecordInStore recordInStore);
|
||||
|
||||
/**
|
||||
* 修改入库记录
|
||||
*
|
||||
* @param recordInStore 入库记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRecordInStore(RecordInStore recordInStore);
|
||||
|
||||
/**
|
||||
* 删除入库记录
|
||||
*
|
||||
* @param objId 入库记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRecordInStoreByObjId(Long objId);
|
||||
|
||||
/**
|
||||
* 批量删除入库记录
|
||||
*
|
||||
* @param objIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRecordInStoreByObjIds(Long[] objIds);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.aucma.base.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.aucma.base.domain.RecordOutStore;
|
||||
|
||||
/**
|
||||
* 出库记录Mapper接口
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2023-09-21
|
||||
*/
|
||||
public interface RecordOutStoreMapper
|
||||
{
|
||||
/**
|
||||
* 查询出库记录
|
||||
*
|
||||
* @param objId 出库记录主键
|
||||
* @return 出库记录
|
||||
*/
|
||||
public RecordOutStore selectRecordOutStoreByObjId(Long objId);
|
||||
|
||||
/**
|
||||
* 查询出库记录列表
|
||||
*
|
||||
* @param recordOutStore 出库记录
|
||||
* @return 出库记录集合
|
||||
*/
|
||||
public List<RecordOutStore> selectRecordOutStoreList(RecordOutStore recordOutStore);
|
||||
|
||||
/**
|
||||
* 新增出库记录
|
||||
*
|
||||
* @param recordOutStore 出库记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRecordOutStore(RecordOutStore recordOutStore);
|
||||
|
||||
/**
|
||||
* 修改出库记录
|
||||
*
|
||||
* @param recordOutStore 出库记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRecordOutStore(RecordOutStore recordOutStore);
|
||||
|
||||
/**
|
||||
* 删除出库记录
|
||||
*
|
||||
* @param objId 出库记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRecordOutStoreByObjId(Long objId);
|
||||
|
||||
/**
|
||||
* 批量删除出库记录
|
||||
*
|
||||
* @param objIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRecordOutStoreByObjIds(Long[] objIds);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.aucma.base.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.aucma.base.domain.RecordInStore;
|
||||
|
||||
/**
|
||||
* 入库记录Service接口
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2023-09-21
|
||||
*/
|
||||
public interface IRecordInStoreService
|
||||
{
|
||||
/**
|
||||
* 查询入库记录
|
||||
*
|
||||
* @param objId 入库记录主键
|
||||
* @return 入库记录
|
||||
*/
|
||||
public RecordInStore selectRecordInStoreByObjId(Long objId);
|
||||
|
||||
/**
|
||||
* 查询入库记录列表
|
||||
*
|
||||
* @param recordInStore 入库记录
|
||||
* @return 入库记录集合
|
||||
*/
|
||||
public List<RecordInStore> selectRecordInStoreList(RecordInStore recordInStore);
|
||||
|
||||
/**
|
||||
* 新增入库记录
|
||||
*
|
||||
* @param recordInStore 入库记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRecordInStore(RecordInStore recordInStore);
|
||||
|
||||
/**
|
||||
* 修改入库记录
|
||||
*
|
||||
* @param recordInStore 入库记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRecordInStore(RecordInStore recordInStore);
|
||||
|
||||
/**
|
||||
* 批量删除入库记录
|
||||
*
|
||||
* @param objIds 需要删除的入库记录主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRecordInStoreByObjIds(Long[] objIds);
|
||||
|
||||
/**
|
||||
* 删除入库记录信息
|
||||
*
|
||||
* @param objId 入库记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRecordInStoreByObjId(Long objId);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.aucma.base.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.aucma.base.domain.RecordOutStore;
|
||||
|
||||
/**
|
||||
* 出库记录Service接口
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2023-09-21
|
||||
*/
|
||||
public interface IRecordOutStoreService
|
||||
{
|
||||
/**
|
||||
* 查询出库记录
|
||||
*
|
||||
* @param objId 出库记录主键
|
||||
* @return 出库记录
|
||||
*/
|
||||
public RecordOutStore selectRecordOutStoreByObjId(Long objId);
|
||||
|
||||
/**
|
||||
* 查询出库记录列表
|
||||
*
|
||||
* @param recordOutStore 出库记录
|
||||
* @return 出库记录集合
|
||||
*/
|
||||
public List<RecordOutStore> selectRecordOutStoreList(RecordOutStore recordOutStore);
|
||||
|
||||
/**
|
||||
* 新增出库记录
|
||||
*
|
||||
* @param recordOutStore 出库记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRecordOutStore(RecordOutStore recordOutStore);
|
||||
|
||||
/**
|
||||
* 修改出库记录
|
||||
*
|
||||
* @param recordOutStore 出库记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRecordOutStore(RecordOutStore recordOutStore);
|
||||
|
||||
/**
|
||||
* 批量删除出库记录
|
||||
*
|
||||
* @param objIds 需要删除的出库记录主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRecordOutStoreByObjIds(Long[] objIds);
|
||||
|
||||
/**
|
||||
* 删除出库记录信息
|
||||
*
|
||||
* @param objId 出库记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRecordOutStoreByObjId(Long objId);
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
package com.aucma.base.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.aucma.base.mapper.RecordInStoreMapper;
|
||||
import com.aucma.base.domain.RecordInStore;
|
||||
import com.aucma.base.service.IRecordInStoreService;
|
||||
|
||||
/**
|
||||
* 入库记录Service业务层处理
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2023-09-21
|
||||
*/
|
||||
@Service
|
||||
public class RecordInStoreServiceImpl implements IRecordInStoreService
|
||||
{
|
||||
@Autowired
|
||||
private RecordInStoreMapper recordInStoreMapper;
|
||||
|
||||
/**
|
||||
* 查询入库记录
|
||||
*
|
||||
* @param objId 入库记录主键
|
||||
* @return 入库记录
|
||||
*/
|
||||
@Override
|
||||
public RecordInStore selectRecordInStoreByObjId(Long objId)
|
||||
{
|
||||
return recordInStoreMapper.selectRecordInStoreByObjId(objId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询入库记录列表
|
||||
*
|
||||
* @param recordInStore 入库记录
|
||||
* @return 入库记录
|
||||
*/
|
||||
@Override
|
||||
public List<RecordInStore> selectRecordInStoreList(RecordInStore recordInStore)
|
||||
{
|
||||
return recordInStoreMapper.selectRecordInStoreList(recordInStore);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增入库记录
|
||||
*
|
||||
* @param recordInStore 入库记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertRecordInStore(RecordInStore recordInStore)
|
||||
{
|
||||
return recordInStoreMapper.insertRecordInStore(recordInStore);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改入库记录
|
||||
*
|
||||
* @param recordInStore 入库记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateRecordInStore(RecordInStore recordInStore)
|
||||
{
|
||||
return recordInStoreMapper.updateRecordInStore(recordInStore);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除入库记录
|
||||
*
|
||||
* @param objIds 需要删除的入库记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRecordInStoreByObjIds(Long[] objIds)
|
||||
{
|
||||
return recordInStoreMapper.deleteRecordInStoreByObjIds(objIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除入库记录信息
|
||||
*
|
||||
* @param objId 入库记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRecordInStoreByObjId(Long objId)
|
||||
{
|
||||
return recordInStoreMapper.deleteRecordInStoreByObjId(objId);
|
||||
}
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
package com.aucma.base.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.aucma.base.mapper.RecordOutStoreMapper;
|
||||
import com.aucma.base.domain.RecordOutStore;
|
||||
import com.aucma.base.service.IRecordOutStoreService;
|
||||
|
||||
/**
|
||||
* 出库记录Service业务层处理
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2023-09-21
|
||||
*/
|
||||
@Service
|
||||
public class RecordOutStoreServiceImpl implements IRecordOutStoreService
|
||||
{
|
||||
@Autowired
|
||||
private RecordOutStoreMapper recordOutStoreMapper;
|
||||
|
||||
/**
|
||||
* 查询出库记录
|
||||
*
|
||||
* @param objId 出库记录主键
|
||||
* @return 出库记录
|
||||
*/
|
||||
@Override
|
||||
public RecordOutStore selectRecordOutStoreByObjId(Long objId)
|
||||
{
|
||||
return recordOutStoreMapper.selectRecordOutStoreByObjId(objId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询出库记录列表
|
||||
*
|
||||
* @param recordOutStore 出库记录
|
||||
* @return 出库记录
|
||||
*/
|
||||
@Override
|
||||
public List<RecordOutStore> selectRecordOutStoreList(RecordOutStore recordOutStore)
|
||||
{
|
||||
return recordOutStoreMapper.selectRecordOutStoreList(recordOutStore);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增出库记录
|
||||
*
|
||||
* @param recordOutStore 出库记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertRecordOutStore(RecordOutStore recordOutStore)
|
||||
{
|
||||
return recordOutStoreMapper.insertRecordOutStore(recordOutStore);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改出库记录
|
||||
*
|
||||
* @param recordOutStore 出库记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateRecordOutStore(RecordOutStore recordOutStore)
|
||||
{
|
||||
return recordOutStoreMapper.updateRecordOutStore(recordOutStore);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除出库记录
|
||||
*
|
||||
* @param objIds 需要删除的出库记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRecordOutStoreByObjIds(Long[] objIds)
|
||||
{
|
||||
return recordOutStoreMapper.deleteRecordOutStoreByObjIds(objIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除出库记录信息
|
||||
*
|
||||
* @param objId 出库记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRecordOutStoreByObjId(Long objId)
|
||||
{
|
||||
return recordOutStoreMapper.deleteRecordOutStoreByObjId(objId);
|
||||
}
|
||||
}
|
@ -0,0 +1,132 @@
|
||||
<?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.aucma.base.mapper.RecordInStoreMapper">
|
||||
|
||||
<resultMap type="RecordInStore" id="RecordInStoreResult">
|
||||
<result property="objId" column="obj_id" />
|
||||
<result property="storeCode" column="store_code" />
|
||||
<result property="storeArea" column="store_area" />
|
||||
<result property="spaceCode" column="space_code" />
|
||||
<result property="materialType" column="material_type" />
|
||||
<result property="materialCode" column="material_code" />
|
||||
<result property="inStoreAmount" column="in_store_amount" />
|
||||
<result property="inStoreTime" column="in_store_time" />
|
||||
<result property="isFlag" column="is_flag" />
|
||||
<result property="createdBy" column="created_by" />
|
||||
<result property="createdTime" column="created_time" />
|
||||
<result property="updatedBy" column="updated_by" />
|
||||
<result property="updatedTime" column="updated_time" />
|
||||
<result property="barcodeCode" column="barcode_code" />
|
||||
<result property="materialName" column="material_name" />
|
||||
<result property="entryPattern" column="entry_pattern" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectRecordInStoreVo">
|
||||
select obj_id, store_code, store_area, space_code, material_type, material_code, in_store_amount, in_store_time, is_flag, created_by, created_time, updated_by, updated_time, barcode_code, material_name, entry_pattern from record_instore
|
||||
</sql>
|
||||
|
||||
<select id="selectRecordInStoreList" parameterType="RecordInStore" resultMap="RecordInStoreResult">
|
||||
<include refid="selectRecordInStoreVo"/>
|
||||
<where>
|
||||
<if test="storeCode != null and storeCode != ''"> and store_code = #{storeCode}</if>
|
||||
<if test="storeArea != null and storeArea != ''"> and store_area = #{storeArea}</if>
|
||||
<if test="spaceCode != null and spaceCode != ''"> and space_code = #{spaceCode}</if>
|
||||
<if test="materialType != null and materialType != ''"> and material_type = #{materialType}</if>
|
||||
<if test="materialCode != null and materialCode != ''"> and material_code = #{materialCode}</if>
|
||||
<if test="inStoreAmount != null "> and in_store_amount = #{inStoreAmount}</if>
|
||||
<if test="params.beginInStoreTime != null and params.beginInStoreTime != '' and params.endInStoreTime != null and params.endInStoreTime != ''">
|
||||
and in_store_time between #{params.beginInStoreTime} and #{params.endInStoreTime}</if>
|
||||
<if test="isFlag != null "> and is_flag = #{isFlag}</if>
|
||||
<if test="createdBy != null and createdBy != ''"> and created_by = #{createdBy}</if>
|
||||
<if test="createdTime != null "> and created_time = #{createdTime}</if>
|
||||
<if test="updatedBy != null and updatedBy != ''"> and updated_by = #{updatedBy}</if>
|
||||
<if test="updatedTime != null "> and updated_time = #{updatedTime}</if>
|
||||
<if test="barcodeCode != null and barcodeCode != ''"> and barcode_code = #{barcodeCode}</if>
|
||||
<if test="materialName != null and materialName != ''"> and material_name like concat(concat('%', #{materialName}), '%')</if>
|
||||
<if test="entryPattern != null "> and entry_pattern = #{entryPattern}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectRecordInStoreByObjId" parameterType="Long" resultMap="RecordInStoreResult">
|
||||
<include refid="selectRecordInStoreVo"/>
|
||||
where obj_id = #{objId}
|
||||
</select>
|
||||
|
||||
<insert id="insertRecordInStore" parameterType="RecordInStore">
|
||||
<selectKey keyProperty="objId" resultType="long" order="BEFORE">
|
||||
SELECT seq_record_instore.NEXTVAL as objId FROM DUAL
|
||||
</selectKey>
|
||||
insert into record_instore
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="objId != null">obj_id,</if>
|
||||
<if test="storeCode != null">store_code,</if>
|
||||
<if test="storeArea != null">store_area,</if>
|
||||
<if test="spaceCode != null">space_code,</if>
|
||||
<if test="materialType != null">material_type,</if>
|
||||
<if test="materialCode != null">material_code,</if>
|
||||
<if test="inStoreAmount != null">in_store_amount,</if>
|
||||
<if test="inStoreTime != null">in_store_time,</if>
|
||||
<if test="isFlag != null">is_flag,</if>
|
||||
<if test="createdBy != null">created_by,</if>
|
||||
<if test="createdTime != null">created_time,</if>
|
||||
<if test="updatedBy != null">updated_by,</if>
|
||||
<if test="updatedTime != null">updated_time,</if>
|
||||
<if test="barcodeCode != null">barcode_code,</if>
|
||||
<if test="materialName != null">material_name,</if>
|
||||
<if test="entryPattern != null">entry_pattern,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="objId != null">#{objId},</if>
|
||||
<if test="storeCode != null">#{storeCode},</if>
|
||||
<if test="storeArea != null">#{storeArea},</if>
|
||||
<if test="spaceCode != null">#{spaceCode},</if>
|
||||
<if test="materialType != null">#{materialType},</if>
|
||||
<if test="materialCode != null">#{materialCode},</if>
|
||||
<if test="inStoreAmount != null">#{inStoreAmount},</if>
|
||||
<if test="inStoreTime != null">#{inStoreTime},</if>
|
||||
<if test="isFlag != null">#{isFlag},</if>
|
||||
<if test="createdBy != null">#{createdBy},</if>
|
||||
<if test="createdTime != null">#{createdTime},</if>
|
||||
<if test="updatedBy != null">#{updatedBy},</if>
|
||||
<if test="updatedTime != null">#{updatedTime},</if>
|
||||
<if test="barcodeCode != null">#{barcodeCode},</if>
|
||||
<if test="materialName != null">#{materialName},</if>
|
||||
<if test="entryPattern != null">#{entryPattern},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateRecordInStore" parameterType="RecordInStore">
|
||||
update record_instore
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="storeCode != null">store_code = #{storeCode},</if>
|
||||
<if test="storeArea != null">store_area = #{storeArea},</if>
|
||||
<if test="spaceCode != null">space_code = #{spaceCode},</if>
|
||||
<if test="materialType != null">material_type = #{materialType},</if>
|
||||
<if test="materialCode != null">material_code = #{materialCode},</if>
|
||||
<if test="inStoreAmount != null">in_store_amount = #{inStoreAmount},</if>
|
||||
<if test="inStoreTime != null">in_store_time = #{inStoreTime},</if>
|
||||
<if test="isFlag != null">is_flag = #{isFlag},</if>
|
||||
<if test="createdBy != null">created_by = #{createdBy},</if>
|
||||
<if test="createdTime != null">created_time = #{createdTime},</if>
|
||||
<if test="updatedBy != null">updated_by = #{updatedBy},</if>
|
||||
<if test="updatedTime != null">updated_time = #{updatedTime},</if>
|
||||
<if test="barcodeCode != null">barcode_code = #{barcodeCode},</if>
|
||||
<if test="materialName != null">material_name = #{materialName},</if>
|
||||
<if test="entryPattern != null">entry_pattern = #{entryPattern},</if>
|
||||
</trim>
|
||||
where obj_id = #{objId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteRecordInStoreByObjId" parameterType="Long">
|
||||
delete from record_instore where obj_id = #{objId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteRecordInStoreByObjIds" parameterType="String">
|
||||
delete from record_instore where obj_id in
|
||||
<foreach item="objId" collection="array" open="(" separator="," close=")">
|
||||
#{objId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,153 @@
|
||||
<?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.aucma.base.mapper.RecordOutStoreMapper">
|
||||
|
||||
<resultMap type="RecordOutStore" id="RecordOutStoreResult">
|
||||
<result property="objId" column="obj_id"/>
|
||||
<result property="storeCode" column="store_code"/>
|
||||
<result property="storeArea" column="store_area"/>
|
||||
<result property="spaceCode" column="space_code"/>
|
||||
<result property="materialCode" column="material_code"/>
|
||||
<result property="materialName" column="material_name"/>
|
||||
<result property="outStoreAmount" column="out_store_amount"/>
|
||||
<result property="outStoreTime" column="out_store_time"/>
|
||||
<result property="isFlag" column="is_flag"/>
|
||||
<result property="createdBy" column="created_by"/>
|
||||
<result property="createdTime" column="created_time"/>
|
||||
<result property="updatedBy" column="updated_by"/>
|
||||
<result property="updatedTime" column="updated_time"/>
|
||||
<result property="barcodeCode" column="barcode_code"/>
|
||||
<result property="materialType" column="material_type"/>
|
||||
<result property="exitPattern" column="exit_pattern"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectRecordOutStoreVo">
|
||||
select obj_id,
|
||||
store_code,
|
||||
store_area,
|
||||
space_code,
|
||||
material_code,
|
||||
material_name,
|
||||
out_store_amount,
|
||||
out_store_time,
|
||||
is_flag,
|
||||
created_by,
|
||||
created_time,
|
||||
updated_by,
|
||||
updated_time,
|
||||
barcode_code,
|
||||
material_type,
|
||||
exit_pattern
|
||||
from record_outstore
|
||||
</sql>
|
||||
|
||||
<select id="selectRecordOutStoreList" parameterType="RecordOutStore" resultMap="RecordOutStoreResult">
|
||||
<include refid="selectRecordOutStoreVo"/>
|
||||
<where>
|
||||
<if test="storeCode != null and storeCode != ''">and store_code = #{storeCode}</if>
|
||||
<if test="storeArea != null and storeArea != ''">and store_area = #{storeArea}</if>
|
||||
<if test="spaceCode != null and spaceCode != ''">and space_code = #{spaceCode}</if>
|
||||
<if test="materialCode != null and materialCode != ''">and material_code = #{materialCode}</if>
|
||||
<if test="materialName != null and materialName != ''">and material_name like concat(concat('%',
|
||||
#{materialName}), '%')
|
||||
</if>
|
||||
<if test="outStoreAmount != null ">and out_store_amount = #{outStoreAmount}</if>
|
||||
<if test="params.beginOutStoreTime != null and params.beginOutStoreTime != '' and params.endOutStoreTime != null and params.endOutStoreTime != ''">
|
||||
and out_store_time between #{params.beginOutStoreTime} and #{params.endOutStoreTime}
|
||||
</if>
|
||||
<if test="isFlag != null ">and is_flag = #{isFlag}</if>
|
||||
<if test="createdBy != null and createdBy != ''">and created_by = #{createdBy}</if>
|
||||
<if test="createdTime != null ">and created_time = #{createdTime}</if>
|
||||
<if test="updatedBy != null and updatedBy != ''">and updated_by = #{updatedBy}</if>
|
||||
<if test="updatedTime != null ">and updated_time = #{updatedTime}</if>
|
||||
<if test="barcodeCode != null and barcodeCode != ''">and barcode_code = #{barcodeCode}</if>
|
||||
<if test="materialType != null and materialType != ''">and material_type = #{materialType}</if>
|
||||
<if test="exitPattern != null ">and exit_pattern = #{exitPattern}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectRecordOutStoreByObjId" parameterType="Long" resultMap="RecordOutStoreResult">
|
||||
<include refid="selectRecordOutStoreVo"/>
|
||||
where obj_id = #{objId}
|
||||
</select>
|
||||
|
||||
<insert id="insertRecordOutStore" parameterType="RecordOutStore">
|
||||
<selectKey keyProperty="objId" resultType="long" order="BEFORE">
|
||||
SELECT seq_record_outstore.NEXTVAL as objId FROM DUAL
|
||||
</selectKey>
|
||||
insert into record_outstore
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="objId != null">obj_id,</if>
|
||||
<if test="storeCode != null">store_code,</if>
|
||||
<if test="storeArea != null">store_area,</if>
|
||||
<if test="spaceCode != null">space_code,</if>
|
||||
<if test="materialCode != null">material_code,</if>
|
||||
<if test="materialName != null">material_name,</if>
|
||||
<if test="outStoreAmount != null">out_store_amount,</if>
|
||||
<if test="outStoreTime != null">out_store_time,</if>
|
||||
<if test="isFlag != null">is_flag,</if>
|
||||
<if test="createdBy != null">created_by,</if>
|
||||
<if test="createdTime != null">created_time,</if>
|
||||
<if test="updatedBy != null">updated_by,</if>
|
||||
<if test="updatedTime != null">updated_time,</if>
|
||||
<if test="barcodeCode != null">barcode_code,</if>
|
||||
<if test="materialType != null">material_type,</if>
|
||||
<if test="exitPattern != null">exit_pattern,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="objId != null">#{objId},</if>
|
||||
<if test="storeCode != null">#{storeCode},</if>
|
||||
<if test="storeArea != null">#{storeArea},</if>
|
||||
<if test="spaceCode != null">#{spaceCode},</if>
|
||||
<if test="materialCode != null">#{materialCode},</if>
|
||||
<if test="materialName != null">#{materialName},</if>
|
||||
<if test="outStoreAmount != null">#{outStoreAmount},</if>
|
||||
<if test="outStoreTime != null">#{outStoreTime},</if>
|
||||
<if test="isFlag != null">#{isFlag},</if>
|
||||
<if test="createdBy != null">#{createdBy},</if>
|
||||
<if test="createdTime != null">#{createdTime},</if>
|
||||
<if test="updatedBy != null">#{updatedBy},</if>
|
||||
<if test="updatedTime != null">#{updatedTime},</if>
|
||||
<if test="barcodeCode != null">#{barcodeCode},</if>
|
||||
<if test="materialType != null">#{materialType},</if>
|
||||
<if test="exitPattern != null">#{exitPattern},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateRecordOutStore" parameterType="RecordOutStore">
|
||||
update record_outstore
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="storeCode != null">store_code = #{storeCode},</if>
|
||||
<if test="storeArea != null">store_area = #{storeArea},</if>
|
||||
<if test="spaceCode != null">space_code = #{spaceCode},</if>
|
||||
<if test="materialCode != null">material_code = #{materialCode},</if>
|
||||
<if test="materialName != null">material_name = #{materialName},</if>
|
||||
<if test="outStoreAmount != null">out_store_amount = #{outStoreAmount},</if>
|
||||
<if test="outStoreTime != null">out_store_time = #{outStoreTime},</if>
|
||||
<if test="isFlag != null">is_flag = #{isFlag},</if>
|
||||
<if test="createdBy != null">created_by = #{createdBy},</if>
|
||||
<if test="createdTime != null">created_time = #{createdTime},</if>
|
||||
<if test="updatedBy != null">updated_by = #{updatedBy},</if>
|
||||
<if test="updatedTime != null">updated_time = #{updatedTime},</if>
|
||||
<if test="barcodeCode != null">barcode_code = #{barcodeCode},</if>
|
||||
<if test="materialType != null">material_type = #{materialType},</if>
|
||||
<if test="exitPattern != null">exit_pattern = #{exitPattern},</if>
|
||||
</trim>
|
||||
where obj_id = #{objId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteRecordOutStoreByObjId" parameterType="Long">
|
||||
delete
|
||||
from record_outstore
|
||||
where obj_id = #{objId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteRecordOutStoreByObjIds" parameterType="String">
|
||||
delete from record_outstore where obj_id in
|
||||
<foreach item="objId" collection="array" open="(" separator="," close=")">
|
||||
#{objId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Loading…
Reference in New Issue