add - 入库记录、出库记录

master
yinq 2 years ago
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));
}
}

@ -3,8 +3,6 @@ package com.aucma.base.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.aucma.common.annotation.Excel;
import com.aucma.common.core.domain.BaseEntity;
@ -71,28 +69,11 @@ public class BaseSpaceInfo extends BaseEntity {
private String storeName;
/**
*
*
*/
@Excel(name = "物料编号")
private String materialCode;
@Excel(name = "物料类型")
private String materialType;
/**
*
*/
@Excel(name = "物料名称")
private String materialName;
/**
*
*/
@Excel(name = "工单编号")
private String orderCode;
/**
*
*/
@Excel(name = "条码编号")
private String barcodeCode;
/**
*
@ -134,12 +115,12 @@ public class BaseSpaceInfo extends BaseEntity {
this.storeName = storeName;
}
public String getMaterialCode() {
return materialCode;
public String getMaterialType() {
return materialType;
}
public void setMaterialCode(String materialCode) {
this.materialCode = materialCode;
public void setMaterialType(String materialType) {
this.materialType = materialType;
}
public void setObjId(Long objId) {
@ -246,49 +227,25 @@ public class BaseSpaceInfo extends BaseEntity {
return updatedTime;
}
public void setMaterialName(String materialName) {
this.materialName = materialName;
}
public String getMaterialName() {
return materialName;
}
public void setOrderCode(String orderCode) {
this.orderCode = orderCode;
}
public String getOrderCode() {
return orderCode;
}
public void setBarcodeCode(String barcodeCode) {
this.barcodeCode = barcodeCode;
}
public String getBarcodeCode() {
return barcodeCode;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("objId", getObjId())
.append("spaceCode", getSpaceCode())
.append("spaceName", getSpaceName())
.append("spaceCapacity", getSpaceCapacity())
.append("spaceStock", getSpaceStock())
.append("spaceStatus", getSpaceStatus())
.append("spaceType", getSpaceType())
.append("storeCode", getStoreCode())
.append("isFlag", getIsFlag())
.append("createdBy", getCreatedBy())
.append("createdTime", getCreatedTime())
.append("updatedBy", getUpdatedBy())
.append("updatedTime", getUpdatedTime())
.append("materialName", getMaterialName())
.append("orderCode", getOrderCode())
.append("barcodeCode", getBarcodeCode())
.toString();
return "BaseSpaceInfo{" +
"objId=" + objId +
", spaceCode='" + spaceCode + '\'' +
", spaceName='" + spaceName + '\'' +
", spaceCapacity=" + spaceCapacity +
", spaceStock=" + spaceStock +
", spaceStatus=" + spaceStatus +
", spaceType=" + spaceType +
", storeCode='" + storeCode + '\'' +
", storeName='" + storeName + '\'' +
", materialType='" + materialType + '\'' +
", isFlag=" + isFlag +
", createdBy='" + createdBy + '\'' +
", createdTime=" + createdTime +
", updatedBy='" + updatedBy + '\'' +
", updatedTime=" + updatedTime +
'}';
}
}

@ -0,0 +1,267 @@
package com.aucma.base.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.aucma.common.annotation.Excel;
import com.aucma.common.core.domain.BaseEntity;
/**
* record_instore
*
* @author Yinq
* @date 2023-09-21
*/
public class RecordInStore extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
*
*/
private Long objId;
/**
*
*/
@Excel(name = "仓库编号")
private String storeCode;
/**
*
*/
@Excel(name = "仓库区域")
private String storeArea;
/**
*
*/
@Excel(name = "货道编号")
private String spaceCode;
/**
*
*/
@Excel(name = "物料类型")
private String materialType;
/**
*
*/
@Excel(name = "物料编号")
private String materialCode;
/**
*
*/
@Excel(name = "入库数量")
private Long inStoreAmount;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "入库时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date inStoreTime;
/**
*
*/
@Excel(name = "是否标识")
private Long isFlag;
/**
*
*/
@Excel(name = "创建人")
private String createdBy;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date createdTime;
/**
*
*/
@Excel(name = "更新人")
private String updatedBy;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date updatedTime;
/**
*
*/
@Excel(name = "物料条码编号")
private String barcodeCode;
/**
*
*/
@Excel(name = "物料名称")
private String materialName;
/**
* 0-1-
*/
@Excel(name = "入库方式", readConverterExp = "0=-正常1-异常")
private Long entryPattern;
public void setObjId(Long objId) {
this.objId = objId;
}
public Long getObjId() {
return objId;
}
public void setStoreCode(String storeCode) {
this.storeCode = storeCode;
}
public String getStoreCode() {
return storeCode;
}
public void setStoreArea(String storeArea) {
this.storeArea = storeArea;
}
public String getStoreArea() {
return storeArea;
}
public void setSpaceCode(String spaceCode) {
this.spaceCode = spaceCode;
}
public String getSpaceCode() {
return spaceCode;
}
public void setMaterialType(String materialType) {
this.materialType = materialType;
}
public String getMaterialType() {
return materialType;
}
public void setMaterialCode(String materialCode) {
this.materialCode = materialCode;
}
public String getMaterialCode() {
return materialCode;
}
public void setInStoreAmount(Long inStoreAmount) {
this.inStoreAmount = inStoreAmount;
}
public Long getInStoreAmount() {
return inStoreAmount;
}
public void setInStoreTime(Date inStoreTime) {
this.inStoreTime = inStoreTime;
}
public Date getInStoreTime() {
return inStoreTime;
}
public void setIsFlag(Long isFlag) {
this.isFlag = isFlag;
}
public Long getIsFlag() {
return isFlag;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
public String getCreatedBy() {
return createdBy;
}
public void setCreatedTime(Date createdTime) {
this.createdTime = createdTime;
}
public Date getCreatedTime() {
return createdTime;
}
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
public String getUpdatedBy() {
return updatedBy;
}
public void setUpdatedTime(Date updatedTime) {
this.updatedTime = updatedTime;
}
public Date getUpdatedTime() {
return updatedTime;
}
public void setBarcodeCode(String barcodeCode) {
this.barcodeCode = barcodeCode;
}
public String getBarcodeCode() {
return barcodeCode;
}
public void setMaterialName(String materialName) {
this.materialName = materialName;
}
public String getMaterialName() {
return materialName;
}
public void setEntryPattern(Long entryPattern) {
this.entryPattern = entryPattern;
}
public Long getEntryPattern() {
return entryPattern;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("objId", getObjId())
.append("storeCode", getStoreCode())
.append("storeArea", getStoreArea())
.append("spaceCode", getSpaceCode())
.append("materialType", getMaterialType())
.append("materialCode", getMaterialCode())
.append("inStoreAmount", getInStoreAmount())
.append("inStoreTime", getInStoreTime())
.append("isFlag", getIsFlag())
.append("createdBy", getCreatedBy())
.append("createdTime", getCreatedTime())
.append("updatedBy", getUpdatedBy())
.append("updatedTime", getUpdatedTime())
.append("barcodeCode", getBarcodeCode())
.append("materialName", getMaterialName())
.append("entryPattern", getEntryPattern())
.toString();
}
}

@ -0,0 +1,267 @@
package com.aucma.base.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.aucma.common.annotation.Excel;
import com.aucma.common.core.domain.BaseEntity;
/**
* record_outstore
*
* @author Yinq
* @date 2023-09-21
*/
public class RecordOutStore extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
*
*/
private Long objId;
/**
*
*/
@Excel(name = "仓库编号")
private String storeCode;
/**
*
*/
@Excel(name = "仓库区域")
private String storeArea;
/**
*
*/
@Excel(name = "货道编号")
private String spaceCode;
/**
*
*/
@Excel(name = "物料编号")
private String materialCode;
/**
*
*/
@Excel(name = "物料名称")
private String materialName;
/**
*
*/
@Excel(name = "出库数量")
private Long outStoreAmount;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "出库时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date outStoreTime;
/**
*
*/
@Excel(name = "是否标识")
private Long isFlag;
/**
*
*/
@Excel(name = "创建人")
private String createdBy;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date createdTime;
/**
*
*/
@Excel(name = "更新人")
private String updatedBy;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date updatedTime;
/**
*
*/
@Excel(name = "物料条码编号")
private String barcodeCode;
/**
*
*/
@Excel(name = "物料类型")
private String materialType;
/**
* 0-1-
*/
@Excel(name = "出库方式", readConverterExp = "0=-正常1-异常")
private Long exitPattern;
public void setObjId(Long objId) {
this.objId = objId;
}
public Long getObjId() {
return objId;
}
public void setStoreCode(String storeCode) {
this.storeCode = storeCode;
}
public String getStoreCode() {
return storeCode;
}
public void setStoreArea(String storeArea) {
this.storeArea = storeArea;
}
public String getStoreArea() {
return storeArea;
}
public void setSpaceCode(String spaceCode) {
this.spaceCode = spaceCode;
}
public String getSpaceCode() {
return spaceCode;
}
public void setMaterialCode(String materialCode) {
this.materialCode = materialCode;
}
public String getMaterialCode() {
return materialCode;
}
public void setMaterialName(String materialName) {
this.materialName = materialName;
}
public String getMaterialName() {
return materialName;
}
public void setOutStoreAmount(Long outStoreAmount) {
this.outStoreAmount = outStoreAmount;
}
public Long getOutStoreAmount() {
return outStoreAmount;
}
public void setOutStoreTime(Date outStoreTime) {
this.outStoreTime = outStoreTime;
}
public Date getOutStoreTime() {
return outStoreTime;
}
public void setIsFlag(Long isFlag) {
this.isFlag = isFlag;
}
public Long getIsFlag() {
return isFlag;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
public String getCreatedBy() {
return createdBy;
}
public void setCreatedTime(Date createdTime) {
this.createdTime = createdTime;
}
public Date getCreatedTime() {
return createdTime;
}
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
public String getUpdatedBy() {
return updatedBy;
}
public void setUpdatedTime(Date updatedTime) {
this.updatedTime = updatedTime;
}
public Date getUpdatedTime() {
return updatedTime;
}
public void setBarcodeCode(String barcodeCode) {
this.barcodeCode = barcodeCode;
}
public String getBarcodeCode() {
return barcodeCode;
}
public void setMaterialType(String materialType) {
this.materialType = materialType;
}
public String getMaterialType() {
return materialType;
}
public void setExitPattern(Long exitPattern) {
this.exitPattern = exitPattern;
}
public Long getExitPattern() {
return exitPattern;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("objId", getObjId())
.append("storeCode", getStoreCode())
.append("storeArea", getStoreArea())
.append("spaceCode", getSpaceCode())
.append("materialCode", getMaterialCode())
.append("materialName", getMaterialName())
.append("outStoreAmount", getOutStoreAmount())
.append("outStoreTime", getOutStoreTime())
.append("isFlag", getIsFlag())
.append("createdBy", getCreatedBy())
.append("createdTime", getCreatedTime())
.append("updatedBy", getUpdatedBy())
.append("updatedTime", getUpdatedTime())
.append("barcodeCode", getBarcodeCode())
.append("materialType", getMaterialType())
.append("exitPattern", getExitPattern())
.toString();
}
}

@ -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);
}
}

@ -19,10 +19,7 @@
<result property="createdTime" column="created_time"/>
<result property="updatedBy" column="updated_by"/>
<result property="updatedTime" column="updated_time"/>
<result property="materialName" column="material_name"/>
<result property="materialCode" column="material_code"/>
<result property="orderCode" column="order_code"/>
<result property="barcodeCode" column="barcode_code"/>
<result property="materialType" column="material_type"/>
</resultMap>
<sql id="selectBaseSpaceInfoVo">
@ -39,9 +36,7 @@
sp.created_time,
sp.updated_by,
sp.updated_time,
sp.material_code,
sp.order_code,
sp.barcode_code,
sp.material_type,
si.STORE_NAME
from base_spaceinfo sp
left join base_storeinfo si on si.STORE_CODE = sp.STORE_CODE
@ -66,13 +61,6 @@
<if test="createdTime != null ">and sp.created_time = #{createdTime}</if>
<if test="updatedBy != null and updatedBy != ''">and sp.updated_by = #{updatedBy}</if>
<if test="updatedTime != null ">and sp.updated_time = #{updatedTime}</if>
<if test="materialName != null and materialName != ''">and sp.material_name like concat(concat('%',
#{materialName}), '%')
</if>
<if test="orderCode != null and orderCode != ''">and sp.order_code like concat(concat('%', #{orderCode}),
'%')
</if>
<if test="barcodeCode != null and barcodeCode != ''">and sp.barcode_code = #{barcodeCode}</if>
</where>
</select>
@ -100,9 +88,7 @@
<if test="createdTime != null">created_time,</if>
<if test="updatedBy != null">updated_by,</if>
<if test="updatedTime != null">updated_time,</if>
<if test="materialCode != null">material_code,</if>
<if test="orderCode != null">order_code,</if>
<if test="barcodeCode != null">barcode_code,</if>
<if test="materialType != null">material_type,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="objId != null">#{objId},</if>
@ -118,9 +104,7 @@
<if test="createdTime != null">#{createdTime},</if>
<if test="updatedBy != null">#{updatedBy},</if>
<if test="updatedTime != null">#{updatedTime},</if>
<if test="materialCode != null">#{materialCode},</if>
<if test="orderCode != null">#{orderCode},</if>
<if test="barcodeCode != null">#{barcodeCode},</if>
<if test="materialType != null">#{materialType},</if>
</trim>
</insert>
@ -139,9 +123,7 @@
<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="materialCode != null">material_code = #{materialCode},</if>
<if test="orderCode != null">order_code = #{orderCode},</if>
<if test="barcodeCode != null">barcode_code = #{barcodeCode},</if>
<if test="materialType != null">material_type = #{materialType},</if>
</trim>
where obj_id = #{objId}
</update>

@ -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…
Cancel
Save