库存盘点相关代码
This commit is contained in:
parent
7d8968c2eb
commit
00f636a165
@ -0,0 +1,165 @@
|
|||||||
|
package com.ktg.mes.wm.controller;
|
||||||
|
|
||||||
|
import com.ktg.common.annotation.Log;
|
||||||
|
import com.ktg.common.constant.UserConstants;
|
||||||
|
import com.ktg.common.core.controller.BaseController;
|
||||||
|
import com.ktg.common.core.domain.AjaxResult;
|
||||||
|
import com.ktg.common.core.page.TableDataInfo;
|
||||||
|
import com.ktg.common.enums.BusinessType;
|
||||||
|
import com.ktg.common.utils.StringUtils;
|
||||||
|
import com.ktg.mes.wm.domain.WmStockTaking;
|
||||||
|
import com.ktg.mes.wm.domain.WmStockTakingLine;
|
||||||
|
import com.ktg.mes.wm.domain.WmWarehouse;
|
||||||
|
import com.ktg.mes.wm.service.IWmStockTakingLineService;
|
||||||
|
import com.ktg.mes.wm.service.IWmStockTakingResultService;
|
||||||
|
import com.ktg.mes.wm.service.IWmStockTakingService;
|
||||||
|
import com.ktg.mes.wm.service.IWmWarehouseService;
|
||||||
|
import com.ktg.system.strategy.AutoCodeUtil;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/mes/wm/stocktaking")
|
||||||
|
public class WmStockTakingController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IWmStockTakingService wmStockTakingService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IWmStockTakingLineService wmStockTakingLineService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IWmStockTakingResultService wmStockTakingResultService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private AutoCodeUtil autoCodeUtil;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IWmWarehouseService wmWarehouseService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询库存盘点记录列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('wm:stocktaking:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(WmStockTaking wmStockTaking)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<WmStockTaking> list = wmStockTakingService.selectWmStockTakingList(wmStockTaking);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取库存盘点记录详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('wm:stocktaking:query')")
|
||||||
|
@GetMapping(value = "/{takingId}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("takingId") Long takingId)
|
||||||
|
{
|
||||||
|
return AjaxResult.success(wmStockTakingService.selectWmStockTakingByTakingId(takingId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增库存盘点记录
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('wm:stocktaking:add')")
|
||||||
|
@Log(title = "库存盘点记录", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody WmStockTaking wmStockTaking)
|
||||||
|
{
|
||||||
|
if(StringUtils.isNotNull(wmStockTaking.getTakingCode())){
|
||||||
|
if(UserConstants.NOT_UNIQUE.equals(wmStockTakingService.checkUnique(wmStockTaking))){
|
||||||
|
return AjaxResult.error("单据编号已存在!");
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
wmStockTaking.setTakingCode(autoCodeUtil.genSerialCode(UserConstants.STOCKTAKING_CODE,""));
|
||||||
|
}
|
||||||
|
|
||||||
|
if(StringUtils.isNotNull(wmStockTaking.getWarehouseId())){
|
||||||
|
WmWarehouse warehouse = wmWarehouseService.selectWmWarehouseByWarehouseId(wmStockTaking.getWarehouseId());
|
||||||
|
wmStockTaking.setWarehouseCode(warehouse.getWarehouseCode());
|
||||||
|
wmStockTaking.setWarehouseName(warehouse.getWarehouseName());
|
||||||
|
}
|
||||||
|
|
||||||
|
wmStockTakingService.insertWmStockTaking(wmStockTaking);
|
||||||
|
wmStockTaking.setCreateBy(getUsername());
|
||||||
|
return AjaxResult.success(wmStockTaking);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改库存盘点记录
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('wm:stocktaking:edit')")
|
||||||
|
@Log(title = "库存盘点记录", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody WmStockTaking wmStockTaking)
|
||||||
|
{
|
||||||
|
if(StringUtils.isNotNull(wmStockTaking.getWarehouseId())){
|
||||||
|
WmWarehouse warehouse = wmWarehouseService.selectWmWarehouseByWarehouseId(wmStockTaking.getWarehouseId());
|
||||||
|
wmStockTaking.setWarehouseCode(warehouse.getWarehouseCode());
|
||||||
|
wmStockTaking.setWarehouseName(warehouse.getWarehouseName());
|
||||||
|
}
|
||||||
|
return toAjax(wmStockTakingService.updateWmStockTaking(wmStockTaking));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除库存盘点记录
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('wm:stocktaking:remove')")
|
||||||
|
@Log(title = "库存盘点记录", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{takingIds}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] takingIds)
|
||||||
|
{
|
||||||
|
for(Long takingId:takingIds){
|
||||||
|
WmStockTaking taking = wmStockTakingService.selectWmStockTakingByTakingId(takingId);
|
||||||
|
if(!UserConstants.ORDER_STATUS_PREPARE.equals(taking.getStatus())){
|
||||||
|
return AjaxResult.error("只能删除草稿状态的单据!");
|
||||||
|
}
|
||||||
|
wmStockTakingLineService.deleteByTakingId(takingId);
|
||||||
|
wmStockTakingResultService.deleteWmStockTakingResultByTakingId(takingId);
|
||||||
|
}
|
||||||
|
|
||||||
|
return toAjax(wmStockTakingService.deleteWmStockTakingByTakingIds(takingIds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成盘点,系统对比计算盘点结果
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:wm:stocktaking:edit')")
|
||||||
|
@Log(title = "盘点单", businessType = BusinessType.UPDATE)
|
||||||
|
@Transactional
|
||||||
|
@PutMapping("/{takingId}")
|
||||||
|
public AjaxResult execute(@PathVariable Long takingId){
|
||||||
|
WmStockTaking taking = wmStockTakingService.selectWmStockTakingByTakingId(takingId);
|
||||||
|
|
||||||
|
WmStockTakingLine param = new WmStockTakingLine();
|
||||||
|
param.setTakingId(takingId);
|
||||||
|
List<WmStockTakingLine> lines = wmStockTakingLineService.selectWmStockTakingLineList(param);
|
||||||
|
if(CollectionUtils.isEmpty(lines)){
|
||||||
|
return AjaxResult.error("未检测到盘点的物资!");
|
||||||
|
}
|
||||||
|
|
||||||
|
//先删除历史记录
|
||||||
|
wmStockTakingResultService.deleteWmStockTakingResultByTakingId(takingId);
|
||||||
|
|
||||||
|
if(UserConstants.WM_STOCK_TAKING_TYPE_OPEN.equals(taking.getTakingType())){
|
||||||
|
//如果是明盘,则直接对比明细中的库存数量和盘点数量
|
||||||
|
wmStockTakingResultService.calculateOpenWmStockTakingResult(takingId);
|
||||||
|
}else {
|
||||||
|
//如果是盲盘,则对比盘点明细中的盘点数量,和当前库存现有量的数量
|
||||||
|
wmStockTakingResultService.calculateWmStockTakingResult(takingId);
|
||||||
|
}
|
||||||
|
|
||||||
|
taking.setStatus(UserConstants.ORDER_STATUS_APPROVED);
|
||||||
|
wmStockTakingService.updateWmStockTaking(taking);
|
||||||
|
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,59 @@
|
|||||||
|
package com.ktg.mes.wm.controller;
|
||||||
|
|
||||||
|
import com.ktg.common.annotation.Log;
|
||||||
|
import com.ktg.common.core.controller.BaseController;
|
||||||
|
import com.ktg.common.core.domain.AjaxResult;
|
||||||
|
import com.ktg.common.core.page.TableDataInfo;
|
||||||
|
import com.ktg.common.enums.BusinessType;
|
||||||
|
import com.ktg.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ktg.mes.wm.domain.WmStockTakingLine;
|
||||||
|
import com.ktg.mes.wm.service.IWmStockTakingLineService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/mes/wm/stocktakingline")
|
||||||
|
public class WmStockTakingLineController extends BaseController {
|
||||||
|
@Autowired
|
||||||
|
private IWmStockTakingLineService wmStockTakingLineService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询库存盘点明细列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('wm:stocktakingline:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(WmStockTakingLine wmStockTakingLine)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<WmStockTakingLine> list = wmStockTakingLineService.selectWmStockTakingLineList(wmStockTakingLine);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出库存盘点明细列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('wm:stocktakingline:export')")
|
||||||
|
@Log(title = "库存盘点明细", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, WmStockTakingLine wmStockTakingLine)
|
||||||
|
{
|
||||||
|
List<WmStockTakingLine> list = wmStockTakingLineService.selectWmStockTakingLineList(wmStockTakingLine);
|
||||||
|
ExcelUtil<WmStockTakingLine> util = new ExcelUtil<WmStockTakingLine>(WmStockTakingLine.class);
|
||||||
|
util.exportExcel(response, list, "库存盘点明细数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取库存盘点明细详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('wm:stocktakingline:query')")
|
||||||
|
@GetMapping(value = "/{lineId}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("lineId") Long lineId)
|
||||||
|
{
|
||||||
|
return AjaxResult.success(wmStockTakingLineService.selectWmStockTakingLineByLineId(lineId));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,104 @@
|
|||||||
|
package com.ktg.mes.wm.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
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.ktg.common.annotation.Log;
|
||||||
|
import com.ktg.common.core.controller.BaseController;
|
||||||
|
import com.ktg.common.core.domain.AjaxResult;
|
||||||
|
import com.ktg.common.enums.BusinessType;
|
||||||
|
import com.ktg.mes.wm.domain.WmStockTakingResult;
|
||||||
|
import com.ktg.mes.wm.service.IWmStockTakingResultService;
|
||||||
|
import com.ktg.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ktg.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存盘点结果Controller
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2023-08-22
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/wm/stocktakingresult")
|
||||||
|
public class WmStockTakingResultController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IWmStockTakingResultService wmStockTakingResultService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询库存盘点结果列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('wm:stocktakingresult:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(WmStockTakingResult wmStockTakingResult)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<WmStockTakingResult> list = wmStockTakingResultService.selectWmStockTakingResultList(wmStockTakingResult);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出库存盘点结果列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('wm:stocktakingresult:export')")
|
||||||
|
@Log(title = "库存盘点结果", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, WmStockTakingResult wmStockTakingResult)
|
||||||
|
{
|
||||||
|
List<WmStockTakingResult> list = wmStockTakingResultService.selectWmStockTakingResultList(wmStockTakingResult);
|
||||||
|
ExcelUtil<WmStockTakingResult> util = new ExcelUtil<WmStockTakingResult>(WmStockTakingResult.class);
|
||||||
|
util.exportExcel(response, list, "库存盘点结果数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取库存盘点结果详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('wm:stocktakingresult:query')")
|
||||||
|
@GetMapping(value = "/{resultId}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("resultId") Long resultId)
|
||||||
|
{
|
||||||
|
return AjaxResult.success(wmStockTakingResultService.selectWmStockTakingResultByResultId(resultId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增库存盘点结果
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('wm:stocktakingresult:add')")
|
||||||
|
@Log(title = "库存盘点结果", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody WmStockTakingResult wmStockTakingResult)
|
||||||
|
{
|
||||||
|
return toAjax(wmStockTakingResultService.insertWmStockTakingResult(wmStockTakingResult));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改库存盘点结果
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('wm:stocktakingresult:edit')")
|
||||||
|
@Log(title = "库存盘点结果", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody WmStockTakingResult wmStockTakingResult)
|
||||||
|
{
|
||||||
|
return toAjax(wmStockTakingResultService.updateWmStockTakingResult(wmStockTakingResult));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除库存盘点结果
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('wm:stocktakingresult:remove')")
|
||||||
|
@Log(title = "库存盘点结果", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{resultIds}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] resultIds)
|
||||||
|
{
|
||||||
|
return toAjax(wmStockTakingResultService.deleteWmStockTakingResultByResultIds(resultIds));
|
||||||
|
}
|
||||||
|
}
|
118
ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmPosition.java
Normal file
118
ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmPosition.java
Normal file
@ -0,0 +1,118 @@
|
|||||||
|
package com.ktg.mes.wm.domain;
|
||||||
|
|
||||||
|
import com.ktg.common.annotation.Excel;
|
||||||
|
import com.ktg.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
public class WmPosition extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 库位ID */
|
||||||
|
private Long areaId;
|
||||||
|
|
||||||
|
/** 库位编码 */
|
||||||
|
private String areaCode;
|
||||||
|
|
||||||
|
/** 库位名称 */
|
||||||
|
private String areaName;
|
||||||
|
|
||||||
|
/** 库区ID */
|
||||||
|
private Long locationId;
|
||||||
|
|
||||||
|
private String locationCode;
|
||||||
|
|
||||||
|
private String locationName;
|
||||||
|
|
||||||
|
private Long warehouseId;
|
||||||
|
|
||||||
|
private String warehouseCode;
|
||||||
|
|
||||||
|
private String warehouseName;
|
||||||
|
|
||||||
|
public Long getAreaId() {
|
||||||
|
return areaId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAreaId(Long areaId) {
|
||||||
|
this.areaId = areaId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAreaCode() {
|
||||||
|
return areaCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAreaCode(String areaCode) {
|
||||||
|
this.areaCode = areaCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAreaName() {
|
||||||
|
return areaName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAreaName(String areaName) {
|
||||||
|
this.areaName = areaName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getLocationId() {
|
||||||
|
return locationId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLocationId(Long locationId) {
|
||||||
|
this.locationId = locationId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLocationCode() {
|
||||||
|
return locationCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLocationCode(String locationCode) {
|
||||||
|
this.locationCode = locationCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLocationName() {
|
||||||
|
return locationName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLocationName(String locationName) {
|
||||||
|
this.locationName = locationName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getWarehouseId() {
|
||||||
|
return warehouseId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWarehouseId(Long warehouseId) {
|
||||||
|
this.warehouseId = warehouseId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWarehouseCode() {
|
||||||
|
return warehouseCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWarehouseCode(String warehouseCode) {
|
||||||
|
this.warehouseCode = warehouseCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWarehouseName() {
|
||||||
|
return warehouseName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWarehouseName(String warehouseName) {
|
||||||
|
this.warehouseName = warehouseName;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "WmPosition{" +
|
||||||
|
"areaId=" + areaId +
|
||||||
|
", areaCode='" + areaCode + '\'' +
|
||||||
|
", areaName='" + areaName + '\'' +
|
||||||
|
", locationId=" + locationId +
|
||||||
|
", locationCode='" + locationCode + '\'' +
|
||||||
|
", locationName='" + locationName + '\'' +
|
||||||
|
", warehouseId=" + warehouseId +
|
||||||
|
", warehouseCode='" + warehouseCode + '\'' +
|
||||||
|
", warehouseName='" + warehouseName + '\'' +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
237
ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmStockTaking.java
Normal file
237
ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmStockTaking.java
Normal file
@ -0,0 +1,237 @@
|
|||||||
|
package com.ktg.mes.wm.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.ktg.common.annotation.Excel;
|
||||||
|
import com.ktg.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存盘点记录对象 wm_stock_taking
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2023-08-17
|
||||||
|
*/
|
||||||
|
public class WmStockTaking extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 盘点单ID */
|
||||||
|
private Long takingId;
|
||||||
|
|
||||||
|
/** 盘点单编号 */
|
||||||
|
@Excel(name = "盘点单编号")
|
||||||
|
private String takingCode;
|
||||||
|
|
||||||
|
/** 盘点单名称 */
|
||||||
|
@Excel(name = "盘点单名称")
|
||||||
|
private String takingName;
|
||||||
|
|
||||||
|
/** 盘点日期 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "盘点日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date takingDate;
|
||||||
|
|
||||||
|
/** 盘点人用户名 */
|
||||||
|
@Excel(name = "盘点人用户名")
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
/** 盘点人 */
|
||||||
|
@Excel(name = "盘点人")
|
||||||
|
private String nickName;
|
||||||
|
|
||||||
|
/** 盘点类型 */
|
||||||
|
@Excel(name = "盘点类型")
|
||||||
|
private String takingType;
|
||||||
|
|
||||||
|
/** 仓库ID */
|
||||||
|
@Excel(name = "仓库ID")
|
||||||
|
private Long warehouseId;
|
||||||
|
|
||||||
|
/** 仓库编码 */
|
||||||
|
@Excel(name = "仓库编码")
|
||||||
|
private String warehouseCode;
|
||||||
|
|
||||||
|
/** 仓库名称 */
|
||||||
|
@Excel(name = "仓库名称")
|
||||||
|
private String warehouseName;
|
||||||
|
|
||||||
|
/** 单据状态 */
|
||||||
|
@Excel(name = "单据状态")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/** 预留字段1 */
|
||||||
|
private String attr1;
|
||||||
|
|
||||||
|
/** 预留字段2 */
|
||||||
|
private String attr2;
|
||||||
|
|
||||||
|
/** 预留字段3 */
|
||||||
|
private Long attr3;
|
||||||
|
|
||||||
|
/** 预留字段4 */
|
||||||
|
private Long attr4;
|
||||||
|
|
||||||
|
public void setTakingId(Long takingId)
|
||||||
|
{
|
||||||
|
this.takingId = takingId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getTakingId()
|
||||||
|
{
|
||||||
|
return takingId;
|
||||||
|
}
|
||||||
|
public void setTakingCode(String takingCode)
|
||||||
|
{
|
||||||
|
this.takingCode = takingCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTakingCode()
|
||||||
|
{
|
||||||
|
return takingCode;
|
||||||
|
}
|
||||||
|
public void setTakingName(String takingName)
|
||||||
|
{
|
||||||
|
this.takingName = takingName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTakingName()
|
||||||
|
{
|
||||||
|
return takingName;
|
||||||
|
}
|
||||||
|
public void setTakingDate(Date takingDate)
|
||||||
|
{
|
||||||
|
this.takingDate = takingDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getTakingDate()
|
||||||
|
{
|
||||||
|
return takingDate;
|
||||||
|
}
|
||||||
|
public void setUserName(String userName)
|
||||||
|
{
|
||||||
|
this.userName = userName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUserName()
|
||||||
|
{
|
||||||
|
return userName;
|
||||||
|
}
|
||||||
|
public void setNickName(String nickName)
|
||||||
|
{
|
||||||
|
this.nickName = nickName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNickName()
|
||||||
|
{
|
||||||
|
return nickName;
|
||||||
|
}
|
||||||
|
public void setTakingType(String takingType)
|
||||||
|
{
|
||||||
|
this.takingType = takingType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTakingType()
|
||||||
|
{
|
||||||
|
return takingType;
|
||||||
|
}
|
||||||
|
public void setWarehouseId(Long warehouseId)
|
||||||
|
{
|
||||||
|
this.warehouseId = warehouseId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getWarehouseId()
|
||||||
|
{
|
||||||
|
return warehouseId;
|
||||||
|
}
|
||||||
|
public void setWarehouseCode(String warehouseCode)
|
||||||
|
{
|
||||||
|
this.warehouseCode = warehouseCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWarehouseCode()
|
||||||
|
{
|
||||||
|
return warehouseCode;
|
||||||
|
}
|
||||||
|
public void setWarehouseName(String warehouseName)
|
||||||
|
{
|
||||||
|
this.warehouseName = warehouseName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWarehouseName()
|
||||||
|
{
|
||||||
|
return warehouseName;
|
||||||
|
}
|
||||||
|
public void setStatus(String status)
|
||||||
|
{
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStatus()
|
||||||
|
{
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
public void setAttr1(String attr1)
|
||||||
|
{
|
||||||
|
this.attr1 = attr1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAttr1()
|
||||||
|
{
|
||||||
|
return attr1;
|
||||||
|
}
|
||||||
|
public void setAttr2(String attr2)
|
||||||
|
{
|
||||||
|
this.attr2 = attr2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAttr2()
|
||||||
|
{
|
||||||
|
return attr2;
|
||||||
|
}
|
||||||
|
public void setAttr3(Long attr3)
|
||||||
|
{
|
||||||
|
this.attr3 = attr3;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getAttr3()
|
||||||
|
{
|
||||||
|
return attr3;
|
||||||
|
}
|
||||||
|
public void setAttr4(Long attr4)
|
||||||
|
{
|
||||||
|
this.attr4 = attr4;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getAttr4()
|
||||||
|
{
|
||||||
|
return attr4;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("takingId", getTakingId())
|
||||||
|
.append("takingCode", getTakingCode())
|
||||||
|
.append("takingName", getTakingName())
|
||||||
|
.append("takingDate", getTakingDate())
|
||||||
|
.append("userName", getUserName())
|
||||||
|
.append("nickName", getNickName())
|
||||||
|
.append("takingType", getTakingType())
|
||||||
|
.append("warehouseId", getWarehouseId())
|
||||||
|
.append("warehouseCode", getWarehouseCode())
|
||||||
|
.append("warehouseName", getWarehouseName())
|
||||||
|
.append("status", getStatus())
|
||||||
|
.append("remark", getRemark())
|
||||||
|
.append("attr1", getAttr1())
|
||||||
|
.append("attr2", getAttr2())
|
||||||
|
.append("attr3", getAttr3())
|
||||||
|
.append("attr4", getAttr4())
|
||||||
|
.append("createBy", getCreateBy())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("updateBy", getUpdateBy())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,374 @@
|
|||||||
|
package com.ktg.mes.wm.domain;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.ktg.common.annotation.Excel;
|
||||||
|
import com.ktg.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存盘点明细对象 wm_stock_taking_line
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2023-08-17
|
||||||
|
*/
|
||||||
|
public class WmStockTakingLine extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 行ID */
|
||||||
|
private Long lineId;
|
||||||
|
|
||||||
|
/** 报废单ID */
|
||||||
|
@Excel(name = "报废单ID")
|
||||||
|
private Long takingId;
|
||||||
|
|
||||||
|
/** 库存ID */
|
||||||
|
@Excel(name = "库存ID")
|
||||||
|
private Long materialStockId;
|
||||||
|
|
||||||
|
/** 产品物料ID */
|
||||||
|
@Excel(name = "产品物料ID")
|
||||||
|
private Long itemId;
|
||||||
|
|
||||||
|
/** 产品物料编码 */
|
||||||
|
@Excel(name = "产品物料编码")
|
||||||
|
private String itemCode;
|
||||||
|
|
||||||
|
/** 产品物料名称 */
|
||||||
|
@Excel(name = "产品物料名称")
|
||||||
|
private String itemName;
|
||||||
|
|
||||||
|
/** 规格型号 */
|
||||||
|
@Excel(name = "规格型号")
|
||||||
|
private String specification;
|
||||||
|
|
||||||
|
/** 单位 */
|
||||||
|
@Excel(name = "单位")
|
||||||
|
private String unitOfMeasure;
|
||||||
|
|
||||||
|
/** 单位名称 */
|
||||||
|
@Excel(name = "单位名称")
|
||||||
|
private String unitName;
|
||||||
|
|
||||||
|
/** 数量 */
|
||||||
|
@Excel(name = "数量")
|
||||||
|
private Long quantity;
|
||||||
|
|
||||||
|
/** 盘点数量 */
|
||||||
|
@Excel(name = "盘点数量")
|
||||||
|
private Long takingQuantity;
|
||||||
|
|
||||||
|
/** 仓库ID */
|
||||||
|
@Excel(name = "仓库ID")
|
||||||
|
private Long warehouseId;
|
||||||
|
|
||||||
|
/** 仓库编码 */
|
||||||
|
@Excel(name = "仓库编码")
|
||||||
|
private String warehouseCode;
|
||||||
|
|
||||||
|
/** 仓库名称 */
|
||||||
|
@Excel(name = "仓库名称")
|
||||||
|
private String warehouseName;
|
||||||
|
|
||||||
|
/** 库区ID */
|
||||||
|
@Excel(name = "库区ID")
|
||||||
|
private Long locationId;
|
||||||
|
|
||||||
|
/** 库区编码 */
|
||||||
|
@Excel(name = "库区编码")
|
||||||
|
private String locationCode;
|
||||||
|
|
||||||
|
/** 库区名称 */
|
||||||
|
@Excel(name = "库区名称")
|
||||||
|
private String locationName;
|
||||||
|
|
||||||
|
/** 库位ID */
|
||||||
|
@Excel(name = "库位ID")
|
||||||
|
private Long areaId;
|
||||||
|
|
||||||
|
/** 库位编码 */
|
||||||
|
@Excel(name = "库位编码")
|
||||||
|
private String areaCode;
|
||||||
|
|
||||||
|
/** 库位名称 */
|
||||||
|
@Excel(name = "库位名称")
|
||||||
|
private String areaName;
|
||||||
|
|
||||||
|
/** 盘点状态 */
|
||||||
|
@Excel(name = "盘点状态")
|
||||||
|
private String takingStatus;
|
||||||
|
|
||||||
|
/** 预留字段1 */
|
||||||
|
private String attr1;
|
||||||
|
|
||||||
|
/** 预留字段2 */
|
||||||
|
private String attr2;
|
||||||
|
|
||||||
|
/** 预留字段3 */
|
||||||
|
private Long attr3;
|
||||||
|
|
||||||
|
/** 预留字段4 */
|
||||||
|
private Long attr4;
|
||||||
|
|
||||||
|
public void setLineId(Long lineId)
|
||||||
|
{
|
||||||
|
this.lineId = lineId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getLineId()
|
||||||
|
{
|
||||||
|
return lineId;
|
||||||
|
}
|
||||||
|
public void setTakingId(Long takingId)
|
||||||
|
{
|
||||||
|
this.takingId = takingId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getTakingId()
|
||||||
|
{
|
||||||
|
return takingId;
|
||||||
|
}
|
||||||
|
public void setMaterialStockId(Long materialStockId)
|
||||||
|
{
|
||||||
|
this.materialStockId = materialStockId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getMaterialStockId()
|
||||||
|
{
|
||||||
|
return materialStockId;
|
||||||
|
}
|
||||||
|
public void setItemId(Long itemId)
|
||||||
|
{
|
||||||
|
this.itemId = itemId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getItemId()
|
||||||
|
{
|
||||||
|
return itemId;
|
||||||
|
}
|
||||||
|
public void setItemCode(String itemCode)
|
||||||
|
{
|
||||||
|
this.itemCode = itemCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getItemCode()
|
||||||
|
{
|
||||||
|
return itemCode;
|
||||||
|
}
|
||||||
|
public void setItemName(String itemName)
|
||||||
|
{
|
||||||
|
this.itemName = itemName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getItemName()
|
||||||
|
{
|
||||||
|
return itemName;
|
||||||
|
}
|
||||||
|
public void setSpecification(String specification)
|
||||||
|
{
|
||||||
|
this.specification = specification;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSpecification()
|
||||||
|
{
|
||||||
|
return specification;
|
||||||
|
}
|
||||||
|
public void setUnitOfMeasure(String unitOfMeasure)
|
||||||
|
{
|
||||||
|
this.unitOfMeasure = unitOfMeasure;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUnitOfMeasure()
|
||||||
|
{
|
||||||
|
return unitOfMeasure;
|
||||||
|
}
|
||||||
|
public void setUnitName(String unitName)
|
||||||
|
{
|
||||||
|
this.unitName = unitName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUnitName()
|
||||||
|
{
|
||||||
|
return unitName;
|
||||||
|
}
|
||||||
|
public void setQuantity(Long quantity)
|
||||||
|
{
|
||||||
|
this.quantity = quantity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getQuantity()
|
||||||
|
{
|
||||||
|
return quantity;
|
||||||
|
}
|
||||||
|
public void setTakingQuantity(Long takingQuantity)
|
||||||
|
{
|
||||||
|
this.takingQuantity = takingQuantity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getTakingQuantity()
|
||||||
|
{
|
||||||
|
return takingQuantity;
|
||||||
|
}
|
||||||
|
public void setWarehouseId(Long warehouseId)
|
||||||
|
{
|
||||||
|
this.warehouseId = warehouseId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getWarehouseId()
|
||||||
|
{
|
||||||
|
return warehouseId;
|
||||||
|
}
|
||||||
|
public void setWarehouseCode(String warehouseCode)
|
||||||
|
{
|
||||||
|
this.warehouseCode = warehouseCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWarehouseCode()
|
||||||
|
{
|
||||||
|
return warehouseCode;
|
||||||
|
}
|
||||||
|
public void setWarehouseName(String warehouseName)
|
||||||
|
{
|
||||||
|
this.warehouseName = warehouseName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWarehouseName()
|
||||||
|
{
|
||||||
|
return warehouseName;
|
||||||
|
}
|
||||||
|
public void setLocationId(Long locationId)
|
||||||
|
{
|
||||||
|
this.locationId = locationId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getLocationId()
|
||||||
|
{
|
||||||
|
return locationId;
|
||||||
|
}
|
||||||
|
public void setLocationCode(String locationCode)
|
||||||
|
{
|
||||||
|
this.locationCode = locationCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLocationCode()
|
||||||
|
{
|
||||||
|
return locationCode;
|
||||||
|
}
|
||||||
|
public void setLocationName(String locationName)
|
||||||
|
{
|
||||||
|
this.locationName = locationName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLocationName()
|
||||||
|
{
|
||||||
|
return locationName;
|
||||||
|
}
|
||||||
|
public void setAreaId(Long areaId)
|
||||||
|
{
|
||||||
|
this.areaId = areaId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getAreaId()
|
||||||
|
{
|
||||||
|
return areaId;
|
||||||
|
}
|
||||||
|
public void setAreaCode(String areaCode)
|
||||||
|
{
|
||||||
|
this.areaCode = areaCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAreaCode()
|
||||||
|
{
|
||||||
|
return areaCode;
|
||||||
|
}
|
||||||
|
public void setAreaName(String areaName)
|
||||||
|
{
|
||||||
|
this.areaName = areaName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAreaName()
|
||||||
|
{
|
||||||
|
return areaName;
|
||||||
|
}
|
||||||
|
public void setTakingStatus(String takingStatus)
|
||||||
|
{
|
||||||
|
this.takingStatus = takingStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTakingStatus()
|
||||||
|
{
|
||||||
|
return takingStatus;
|
||||||
|
}
|
||||||
|
public void setAttr1(String attr1)
|
||||||
|
{
|
||||||
|
this.attr1 = attr1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAttr1()
|
||||||
|
{
|
||||||
|
return attr1;
|
||||||
|
}
|
||||||
|
public void setAttr2(String attr2)
|
||||||
|
{
|
||||||
|
this.attr2 = attr2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAttr2()
|
||||||
|
{
|
||||||
|
return attr2;
|
||||||
|
}
|
||||||
|
public void setAttr3(Long attr3)
|
||||||
|
{
|
||||||
|
this.attr3 = attr3;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getAttr3()
|
||||||
|
{
|
||||||
|
return attr3;
|
||||||
|
}
|
||||||
|
public void setAttr4(Long attr4)
|
||||||
|
{
|
||||||
|
this.attr4 = attr4;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getAttr4()
|
||||||
|
{
|
||||||
|
return attr4;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("lineId", getLineId())
|
||||||
|
.append("takingId", getTakingId())
|
||||||
|
.append("materialStockId", getMaterialStockId())
|
||||||
|
.append("itemId", getItemId())
|
||||||
|
.append("itemCode", getItemCode())
|
||||||
|
.append("itemName", getItemName())
|
||||||
|
.append("specification", getSpecification())
|
||||||
|
.append("unitOfMeasure", getUnitOfMeasure())
|
||||||
|
.append("unitName", getUnitName())
|
||||||
|
.append("quantity", getQuantity())
|
||||||
|
.append("takingQuantity", getTakingQuantity())
|
||||||
|
.append("warehouseId", getWarehouseId())
|
||||||
|
.append("warehouseCode", getWarehouseCode())
|
||||||
|
.append("warehouseName", getWarehouseName())
|
||||||
|
.append("locationId", getLocationId())
|
||||||
|
.append("locationCode", getLocationCode())
|
||||||
|
.append("locationName", getLocationName())
|
||||||
|
.append("areaId", getAreaId())
|
||||||
|
.append("areaCode", getAreaCode())
|
||||||
|
.append("areaName", getAreaName())
|
||||||
|
.append("takingStatus", getTakingStatus())
|
||||||
|
.append("remark", getRemark())
|
||||||
|
.append("attr1", getAttr1())
|
||||||
|
.append("attr2", getAttr2())
|
||||||
|
.append("attr3", getAttr3())
|
||||||
|
.append("attr4", getAttr4())
|
||||||
|
.append("createBy", getCreateBy())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("updateBy", getUpdateBy())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,232 @@
|
|||||||
|
package com.ktg.mes.wm.domain;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.ktg.common.annotation.Excel;
|
||||||
|
import com.ktg.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存盘点结果对象 wm_stock_taking_result
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2023-08-22
|
||||||
|
*/
|
||||||
|
public class WmStockTakingResult extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 结果ID */
|
||||||
|
private Long resultId;
|
||||||
|
|
||||||
|
/** 盘点单ID */
|
||||||
|
@Excel(name = "盘点单ID")
|
||||||
|
private Long takingId;
|
||||||
|
|
||||||
|
/** 产品物料ID */
|
||||||
|
@Excel(name = "产品物料ID")
|
||||||
|
private Long itemId;
|
||||||
|
|
||||||
|
/** 产品物料编码 */
|
||||||
|
@Excel(name = "产品物料编码")
|
||||||
|
private String itemCode;
|
||||||
|
|
||||||
|
/** 产品物料名称 */
|
||||||
|
@Excel(name = "产品物料名称")
|
||||||
|
private String itemName;
|
||||||
|
|
||||||
|
/** 规格型号 */
|
||||||
|
@Excel(name = "规格型号")
|
||||||
|
private String specification;
|
||||||
|
|
||||||
|
/** 单位 */
|
||||||
|
@Excel(name = "单位")
|
||||||
|
private String unitOfMeasure;
|
||||||
|
|
||||||
|
/** 单位名称 */
|
||||||
|
@Excel(name = "单位名称")
|
||||||
|
private String unitName;
|
||||||
|
|
||||||
|
/** 数量 */
|
||||||
|
@Excel(name = "数量")
|
||||||
|
private Long quantity;
|
||||||
|
|
||||||
|
/** 盘点数量 */
|
||||||
|
@Excel(name = "盘点数量")
|
||||||
|
private Long takingQuantity;
|
||||||
|
|
||||||
|
/** 盘点状态 */
|
||||||
|
@Excel(name = "盘点状态")
|
||||||
|
private String takingStatus;
|
||||||
|
|
||||||
|
/** 预留字段1 */
|
||||||
|
private String attr1;
|
||||||
|
|
||||||
|
/** 预留字段2 */
|
||||||
|
private String attr2;
|
||||||
|
|
||||||
|
/** 预留字段3 */
|
||||||
|
private Long attr3;
|
||||||
|
|
||||||
|
/** 预留字段4 */
|
||||||
|
private Long attr4;
|
||||||
|
|
||||||
|
public void setResultId(Long resultId) {
|
||||||
|
this.resultId = resultId;
|
||||||
|
}
|
||||||
|
public Long getResultId()
|
||||||
|
{
|
||||||
|
return resultId;
|
||||||
|
}
|
||||||
|
public void setTakingId(Long takingId)
|
||||||
|
{
|
||||||
|
this.takingId = takingId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getTakingId()
|
||||||
|
{
|
||||||
|
return takingId;
|
||||||
|
}
|
||||||
|
public void setItemId(Long itemId)
|
||||||
|
{
|
||||||
|
this.itemId = itemId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getItemId()
|
||||||
|
{
|
||||||
|
return itemId;
|
||||||
|
}
|
||||||
|
public void setItemCode(String itemCode)
|
||||||
|
{
|
||||||
|
this.itemCode = itemCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getItemCode()
|
||||||
|
{
|
||||||
|
return itemCode;
|
||||||
|
}
|
||||||
|
public void setItemName(String itemName)
|
||||||
|
{
|
||||||
|
this.itemName = itemName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getItemName()
|
||||||
|
{
|
||||||
|
return itemName;
|
||||||
|
}
|
||||||
|
public void setSpecification(String specification)
|
||||||
|
{
|
||||||
|
this.specification = specification;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSpecification()
|
||||||
|
{
|
||||||
|
return specification;
|
||||||
|
}
|
||||||
|
public void setUnitOfMeasure(String unitOfMeasure)
|
||||||
|
{
|
||||||
|
this.unitOfMeasure = unitOfMeasure;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUnitOfMeasure()
|
||||||
|
{
|
||||||
|
return unitOfMeasure;
|
||||||
|
}
|
||||||
|
public void setUnitName(String unitName)
|
||||||
|
{
|
||||||
|
this.unitName = unitName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUnitName()
|
||||||
|
{
|
||||||
|
return unitName;
|
||||||
|
}
|
||||||
|
public void setQuantity(Long quantity)
|
||||||
|
{
|
||||||
|
this.quantity = quantity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getQuantity()
|
||||||
|
{
|
||||||
|
return quantity;
|
||||||
|
}
|
||||||
|
public void setTakingQuantity(Long takingQuantity)
|
||||||
|
{
|
||||||
|
this.takingQuantity = takingQuantity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getTakingQuantity()
|
||||||
|
{
|
||||||
|
return takingQuantity;
|
||||||
|
}
|
||||||
|
public void setTakingStatus(String takingStatus)
|
||||||
|
{
|
||||||
|
this.takingStatus = takingStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTakingStatus()
|
||||||
|
{
|
||||||
|
return takingStatus;
|
||||||
|
}
|
||||||
|
public void setAttr1(String attr1)
|
||||||
|
{
|
||||||
|
this.attr1 = attr1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAttr1()
|
||||||
|
{
|
||||||
|
return attr1;
|
||||||
|
}
|
||||||
|
public void setAttr2(String attr2)
|
||||||
|
{
|
||||||
|
this.attr2 = attr2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAttr2()
|
||||||
|
{
|
||||||
|
return attr2;
|
||||||
|
}
|
||||||
|
public void setAttr3(Long attr3)
|
||||||
|
{
|
||||||
|
this.attr3 = attr3;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getAttr3()
|
||||||
|
{
|
||||||
|
return attr3;
|
||||||
|
}
|
||||||
|
public void setAttr4(Long attr4)
|
||||||
|
{
|
||||||
|
this.attr4 = attr4;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getAttr4()
|
||||||
|
{
|
||||||
|
return attr4;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("resultId", getResultId())
|
||||||
|
.append("takingId", getTakingId())
|
||||||
|
.append("itemId", getItemId())
|
||||||
|
.append("itemCode", getItemCode())
|
||||||
|
.append("itemName", getItemName())
|
||||||
|
.append("specification", getSpecification())
|
||||||
|
.append("unitOfMeasure", getUnitOfMeasure())
|
||||||
|
.append("unitName", getUnitName())
|
||||||
|
.append("quantity", getQuantity())
|
||||||
|
.append("takingQuantity", getTakingQuantity())
|
||||||
|
.append("takingStatus", getTakingStatus())
|
||||||
|
.append("remark", getRemark())
|
||||||
|
.append("attr1", getAttr1())
|
||||||
|
.append("attr2", getAttr2())
|
||||||
|
.append("attr3", getAttr3())
|
||||||
|
.append("attr4", getAttr4())
|
||||||
|
.append("createBy", getCreateBy())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("updateBy", getUpdateBy())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,63 @@
|
|||||||
|
package com.ktg.mes.wm.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ktg.mes.wm.domain.WmStockTakingLine;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存盘点明细Mapper接口
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2023-08-17
|
||||||
|
*/
|
||||||
|
public interface WmStockTakingLineMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询库存盘点明细
|
||||||
|
*
|
||||||
|
* @param lineId 库存盘点明细主键
|
||||||
|
* @return 库存盘点明细
|
||||||
|
*/
|
||||||
|
public WmStockTakingLine selectWmStockTakingLineByLineId(Long lineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询库存盘点明细列表
|
||||||
|
*
|
||||||
|
* @param wmStockTakingLine 库存盘点明细
|
||||||
|
* @return 库存盘点明细集合
|
||||||
|
*/
|
||||||
|
public List<WmStockTakingLine> selectWmStockTakingLineList(WmStockTakingLine wmStockTakingLine);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增库存盘点明细
|
||||||
|
*
|
||||||
|
* @param wmStockTakingLine 库存盘点明细
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertWmStockTakingLine(WmStockTakingLine wmStockTakingLine);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改库存盘点明细
|
||||||
|
*
|
||||||
|
* @param wmStockTakingLine 库存盘点明细
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateWmStockTakingLine(WmStockTakingLine wmStockTakingLine);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除库存盘点明细
|
||||||
|
*
|
||||||
|
* @param lineId 库存盘点明细主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteWmStockTakingLineByLineId(Long lineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除库存盘点明细
|
||||||
|
*
|
||||||
|
* @param lineIds 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteWmStockTakingLineByLineIds(Long[] lineIds);
|
||||||
|
|
||||||
|
public int deleteByTakingId(Long takingId);
|
||||||
|
}
|
@ -0,0 +1,68 @@
|
|||||||
|
package com.ktg.mes.wm.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ktg.mes.wm.domain.WmStockTaking;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存盘点记录Mapper接口
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2023-08-17
|
||||||
|
*/
|
||||||
|
public interface WmStockTakingMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询库存盘点记录
|
||||||
|
*
|
||||||
|
* @param takingId 库存盘点记录主键
|
||||||
|
* @return 库存盘点记录
|
||||||
|
*/
|
||||||
|
public WmStockTaking selectWmStockTakingByTakingId(Long takingId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询库存盘点记录列表
|
||||||
|
*
|
||||||
|
* @param wmStockTaking 库存盘点记录
|
||||||
|
* @return 库存盘点记录集合
|
||||||
|
*/
|
||||||
|
public List<WmStockTaking> selectWmStockTakingList(WmStockTaking wmStockTaking);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查编码是否唯一
|
||||||
|
* @param stockTaking
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public WmStockTaking checkUnique(WmStockTaking stockTaking);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增库存盘点记录
|
||||||
|
*
|
||||||
|
* @param wmStockTaking 库存盘点记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertWmStockTaking(WmStockTaking wmStockTaking);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改库存盘点记录
|
||||||
|
*
|
||||||
|
* @param wmStockTaking 库存盘点记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateWmStockTaking(WmStockTaking wmStockTaking);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除库存盘点记录
|
||||||
|
*
|
||||||
|
* @param takingId 库存盘点记录主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteWmStockTakingByTakingId(Long takingId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除库存盘点记录
|
||||||
|
*
|
||||||
|
* @param takingIds 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteWmStockTakingByTakingIds(Long[] takingIds);
|
||||||
|
}
|
@ -0,0 +1,83 @@
|
|||||||
|
package com.ktg.mes.wm.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ktg.mes.wm.domain.WmStockTakingResult;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存盘点结果Mapper接口
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2023-08-22
|
||||||
|
*/
|
||||||
|
public interface WmStockTakingResultMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询库存盘点结果
|
||||||
|
*
|
||||||
|
* @param resultId 库存盘点结果主键
|
||||||
|
* @return 库存盘点结果
|
||||||
|
*/
|
||||||
|
public WmStockTakingResult selectWmStockTakingResultByResultId(Long resultId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询库存盘点结果列表
|
||||||
|
*
|
||||||
|
* @param wmStockTakingResult 库存盘点结果
|
||||||
|
* @return 库存盘点结果集合
|
||||||
|
*/
|
||||||
|
public List<WmStockTakingResult> selectWmStockTakingResultList(WmStockTakingResult wmStockTakingResult);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 针对明盘的盘点结果计算
|
||||||
|
* @param takingId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public void calculateOpenWmStockTakingResult(Long takingId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据当前盘点记录计算盘点结果
|
||||||
|
* @param takingId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public void calculateWmStockTakingResult(Long takingId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增库存盘点结果
|
||||||
|
*
|
||||||
|
* @param wmStockTakingResult 库存盘点结果
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertWmStockTakingResult(WmStockTakingResult wmStockTakingResult);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改库存盘点结果
|
||||||
|
*
|
||||||
|
* @param wmStockTakingResult 库存盘点结果
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateWmStockTakingResult(WmStockTakingResult wmStockTakingResult);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除库存盘点结果
|
||||||
|
*
|
||||||
|
* @param resultId 库存盘点结果主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteWmStockTakingResultByResultId(Long resultId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除库存盘点结果
|
||||||
|
*
|
||||||
|
* @param resultIds 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteWmStockTakingResultByResultIds(Long[] resultIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据盘点单ID删除所有盘点结果
|
||||||
|
* @param takingId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public int deleteWmStockTakingResultByTakingId(Long takingId);
|
||||||
|
}
|
@ -0,0 +1,63 @@
|
|||||||
|
package com.ktg.mes.wm.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ktg.mes.wm.domain.WmStockTakingLine;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存盘点明细Service接口
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2023-08-17
|
||||||
|
*/
|
||||||
|
public interface IWmStockTakingLineService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询库存盘点明细
|
||||||
|
*
|
||||||
|
* @param lineId 库存盘点明细主键
|
||||||
|
* @return 库存盘点明细
|
||||||
|
*/
|
||||||
|
public WmStockTakingLine selectWmStockTakingLineByLineId(Long lineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询库存盘点明细列表
|
||||||
|
*
|
||||||
|
* @param wmStockTakingLine 库存盘点明细
|
||||||
|
* @return 库存盘点明细集合
|
||||||
|
*/
|
||||||
|
public List<WmStockTakingLine> selectWmStockTakingLineList(WmStockTakingLine wmStockTakingLine);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增库存盘点明细
|
||||||
|
*
|
||||||
|
* @param wmStockTakingLine 库存盘点明细
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertWmStockTakingLine(WmStockTakingLine wmStockTakingLine);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改库存盘点明细
|
||||||
|
*
|
||||||
|
* @param wmStockTakingLine 库存盘点明细
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateWmStockTakingLine(WmStockTakingLine wmStockTakingLine);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除库存盘点明细
|
||||||
|
*
|
||||||
|
* @param lineIds 需要删除的库存盘点明细主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteWmStockTakingLineByLineIds(Long[] lineIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除库存盘点明细信息
|
||||||
|
*
|
||||||
|
* @param lineId 库存盘点明细主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteWmStockTakingLineByLineId(Long lineId);
|
||||||
|
|
||||||
|
public int deleteByTakingId(Long takingId);
|
||||||
|
}
|
@ -0,0 +1,79 @@
|
|||||||
|
package com.ktg.mes.wm.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ktg.mes.wm.domain.WmStockTakingResult;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存盘点结果Service接口
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2023-08-22
|
||||||
|
*/
|
||||||
|
public interface IWmStockTakingResultService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询库存盘点结果
|
||||||
|
*
|
||||||
|
* @param resultId 库存盘点结果主键
|
||||||
|
* @return 库存盘点结果
|
||||||
|
*/
|
||||||
|
public WmStockTakingResult selectWmStockTakingResultByResultId(Long resultId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询库存盘点结果列表
|
||||||
|
*
|
||||||
|
* @param wmStockTakingResult 库存盘点结果
|
||||||
|
* @return 库存盘点结果集合
|
||||||
|
*/
|
||||||
|
public List<WmStockTakingResult> selectWmStockTakingResultList(WmStockTakingResult wmStockTakingResult);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 针对明盘的盘点结果计算
|
||||||
|
* @param takingId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public void calculateOpenWmStockTakingResult(Long takingId);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据当前盘点记录计算盘点结果
|
||||||
|
* @param takingId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public void calculateWmStockTakingResult(Long takingId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增库存盘点结果
|
||||||
|
*
|
||||||
|
* @param wmStockTakingResult 库存盘点结果
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertWmStockTakingResult(WmStockTakingResult wmStockTakingResult);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改库存盘点结果
|
||||||
|
*
|
||||||
|
* @param wmStockTakingResult 库存盘点结果
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateWmStockTakingResult(WmStockTakingResult wmStockTakingResult);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除库存盘点结果
|
||||||
|
*
|
||||||
|
* @param resultIds 需要删除的库存盘点结果主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteWmStockTakingResultByResultIds(Long[] resultIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除库存盘点结果信息
|
||||||
|
*
|
||||||
|
* @param resultId 库存盘点结果主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteWmStockTakingResultByResultId(Long resultId);
|
||||||
|
|
||||||
|
public int deleteWmStockTakingResultByTakingId(Long takingId);
|
||||||
|
}
|
@ -0,0 +1,68 @@
|
|||||||
|
package com.ktg.mes.wm.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ktg.mes.wm.domain.WmStockTaking;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存盘点记录Service接口
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2023-08-17
|
||||||
|
*/
|
||||||
|
public interface IWmStockTakingService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询库存盘点记录
|
||||||
|
*
|
||||||
|
* @param takingId 库存盘点记录主键
|
||||||
|
* @return 库存盘点记录
|
||||||
|
*/
|
||||||
|
public WmStockTaking selectWmStockTakingByTakingId(Long takingId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询库存盘点记录列表
|
||||||
|
*
|
||||||
|
* @param wmStockTaking 库存盘点记录
|
||||||
|
* @return 库存盘点记录集合
|
||||||
|
*/
|
||||||
|
public List<WmStockTaking> selectWmStockTakingList(WmStockTaking wmStockTaking);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查编码是否唯一
|
||||||
|
* @param stockTaking
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String checkUnique(WmStockTaking stockTaking);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增库存盘点记录
|
||||||
|
*
|
||||||
|
* @param wmStockTaking 库存盘点记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertWmStockTaking(WmStockTaking wmStockTaking);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改库存盘点记录
|
||||||
|
*
|
||||||
|
* @param wmStockTaking 库存盘点记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateWmStockTaking(WmStockTaking wmStockTaking);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除库存盘点记录
|
||||||
|
*
|
||||||
|
* @param takingIds 需要删除的库存盘点记录主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteWmStockTakingByTakingIds(Long[] takingIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除库存盘点记录信息
|
||||||
|
*
|
||||||
|
* @param takingId 库存盘点记录主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteWmStockTakingByTakingId(Long takingId);
|
||||||
|
}
|
@ -0,0 +1,103 @@
|
|||||||
|
package com.ktg.mes.wm.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ktg.common.utils.DateUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ktg.mes.wm.mapper.WmStockTakingLineMapper;
|
||||||
|
import com.ktg.mes.wm.domain.WmStockTakingLine;
|
||||||
|
import com.ktg.mes.wm.service.IWmStockTakingLineService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存盘点明细Service业务层处理
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2023-08-17
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class WmStockTakingLineServiceImpl implements IWmStockTakingLineService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private WmStockTakingLineMapper wmStockTakingLineMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询库存盘点明细
|
||||||
|
*
|
||||||
|
* @param lineId 库存盘点明细主键
|
||||||
|
* @return 库存盘点明细
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public WmStockTakingLine selectWmStockTakingLineByLineId(Long lineId)
|
||||||
|
{
|
||||||
|
return wmStockTakingLineMapper.selectWmStockTakingLineByLineId(lineId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询库存盘点明细列表
|
||||||
|
*
|
||||||
|
* @param wmStockTakingLine 库存盘点明细
|
||||||
|
* @return 库存盘点明细
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<WmStockTakingLine> selectWmStockTakingLineList(WmStockTakingLine wmStockTakingLine)
|
||||||
|
{
|
||||||
|
return wmStockTakingLineMapper.selectWmStockTakingLineList(wmStockTakingLine);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增库存盘点明细
|
||||||
|
*
|
||||||
|
* @param wmStockTakingLine 库存盘点明细
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertWmStockTakingLine(WmStockTakingLine wmStockTakingLine)
|
||||||
|
{
|
||||||
|
wmStockTakingLine.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return wmStockTakingLineMapper.insertWmStockTakingLine(wmStockTakingLine);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改库存盘点明细
|
||||||
|
*
|
||||||
|
* @param wmStockTakingLine 库存盘点明细
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateWmStockTakingLine(WmStockTakingLine wmStockTakingLine)
|
||||||
|
{
|
||||||
|
wmStockTakingLine.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return wmStockTakingLineMapper.updateWmStockTakingLine(wmStockTakingLine);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除库存盘点明细
|
||||||
|
*
|
||||||
|
* @param lineIds 需要删除的库存盘点明细主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteWmStockTakingLineByLineIds(Long[] lineIds)
|
||||||
|
{
|
||||||
|
return wmStockTakingLineMapper.deleteWmStockTakingLineByLineIds(lineIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除库存盘点明细信息
|
||||||
|
*
|
||||||
|
* @param lineId 库存盘点明细主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteWmStockTakingLineByLineId(Long lineId)
|
||||||
|
{
|
||||||
|
return wmStockTakingLineMapper.deleteWmStockTakingLineByLineId(lineId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int deleteByTakingId(Long takingId) {
|
||||||
|
return wmStockTakingLineMapper.deleteByTakingId(takingId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,112 @@
|
|||||||
|
package com.ktg.mes.wm.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ktg.common.utils.DateUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ktg.mes.wm.mapper.WmStockTakingResultMapper;
|
||||||
|
import com.ktg.mes.wm.domain.WmStockTakingResult;
|
||||||
|
import com.ktg.mes.wm.service.IWmStockTakingResultService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存盘点结果Service业务层处理
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2023-08-22
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class WmStockTakingResultServiceImpl implements IWmStockTakingResultService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private WmStockTakingResultMapper wmStockTakingResultMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询库存盘点结果
|
||||||
|
*
|
||||||
|
* @param resultId 库存盘点结果主键
|
||||||
|
* @return 库存盘点结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public WmStockTakingResult selectWmStockTakingResultByResultId(Long resultId)
|
||||||
|
{
|
||||||
|
return wmStockTakingResultMapper.selectWmStockTakingResultByResultId(resultId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询库存盘点结果列表
|
||||||
|
*
|
||||||
|
* @param wmStockTakingResult 库存盘点结果
|
||||||
|
* @return 库存盘点结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<WmStockTakingResult> selectWmStockTakingResultList(WmStockTakingResult wmStockTakingResult)
|
||||||
|
{
|
||||||
|
return wmStockTakingResultMapper.selectWmStockTakingResultList(wmStockTakingResult);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void calculateOpenWmStockTakingResult(Long takingId) {
|
||||||
|
wmStockTakingResultMapper.calculateOpenWmStockTakingResult(takingId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void calculateWmStockTakingResult(Long takingId) {
|
||||||
|
wmStockTakingResultMapper.calculateWmStockTakingResult(takingId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增库存盘点结果
|
||||||
|
*
|
||||||
|
* @param wmStockTakingResult 库存盘点结果
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertWmStockTakingResult(WmStockTakingResult wmStockTakingResult)
|
||||||
|
{
|
||||||
|
wmStockTakingResult.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return wmStockTakingResultMapper.insertWmStockTakingResult(wmStockTakingResult);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改库存盘点结果
|
||||||
|
*
|
||||||
|
* @param wmStockTakingResult 库存盘点结果
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateWmStockTakingResult(WmStockTakingResult wmStockTakingResult)
|
||||||
|
{
|
||||||
|
wmStockTakingResult.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return wmStockTakingResultMapper.updateWmStockTakingResult(wmStockTakingResult);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除库存盘点结果
|
||||||
|
*
|
||||||
|
* @param resultIds 需要删除的库存盘点结果主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteWmStockTakingResultByResultIds(Long[] resultIds)
|
||||||
|
{
|
||||||
|
return wmStockTakingResultMapper.deleteWmStockTakingResultByResultIds(resultIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除库存盘点结果信息
|
||||||
|
*
|
||||||
|
* @param resultId 库存盘点结果主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteWmStockTakingResultByResultId(Long resultId)
|
||||||
|
{
|
||||||
|
return wmStockTakingResultMapper.deleteWmStockTakingResultByResultId(resultId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int deleteWmStockTakingResultByTakingId(Long takingId) {
|
||||||
|
return wmStockTakingResultMapper.deleteWmStockTakingResultByTakingId(takingId);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,114 @@
|
|||||||
|
package com.ktg.mes.wm.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.ktg.common.constant.UserConstants;
|
||||||
|
import com.ktg.common.utils.DateUtils;
|
||||||
|
import com.ktg.common.utils.StringUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ktg.mes.wm.mapper.WmStockTakingMapper;
|
||||||
|
import com.ktg.mes.wm.domain.WmStockTaking;
|
||||||
|
import com.ktg.mes.wm.service.IWmStockTakingService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存盘点记录Service业务层处理
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2023-08-17
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class WmStockTakingServiceImpl implements IWmStockTakingService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private WmStockTakingMapper wmStockTakingMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询库存盘点记录
|
||||||
|
*
|
||||||
|
* @param takingId 库存盘点记录主键
|
||||||
|
* @return 库存盘点记录
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public WmStockTaking selectWmStockTakingByTakingId(Long takingId)
|
||||||
|
{
|
||||||
|
return wmStockTakingMapper.selectWmStockTakingByTakingId(takingId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询库存盘点记录列表
|
||||||
|
*
|
||||||
|
* @param wmStockTaking 库存盘点记录
|
||||||
|
* @return 库存盘点记录
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<WmStockTaking> selectWmStockTakingList(WmStockTaking wmStockTaking)
|
||||||
|
{
|
||||||
|
return wmStockTakingMapper.selectWmStockTakingList(wmStockTaking);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查编码是否唯一
|
||||||
|
* @param stockTaking
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String checkUnique(WmStockTaking stockTaking){
|
||||||
|
WmStockTaking taking = wmStockTakingMapper.checkUnique(stockTaking);
|
||||||
|
Long takingId = stockTaking.getTakingId() == null ? -1L: stockTaking.getTakingId();
|
||||||
|
if(StringUtils.isNotNull(taking) && taking.getTakingId().longValue() != takingId.longValue()){
|
||||||
|
return UserConstants.NOT_UNIQUE;
|
||||||
|
}
|
||||||
|
return UserConstants.UNIQUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增库存盘点记录
|
||||||
|
*
|
||||||
|
* @param wmStockTaking 库存盘点记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertWmStockTaking(WmStockTaking wmStockTaking)
|
||||||
|
{
|
||||||
|
wmStockTaking.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return wmStockTakingMapper.insertWmStockTaking(wmStockTaking);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改库存盘点记录
|
||||||
|
*
|
||||||
|
* @param wmStockTaking 库存盘点记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateWmStockTaking(WmStockTaking wmStockTaking)
|
||||||
|
{
|
||||||
|
wmStockTaking.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return wmStockTakingMapper.updateWmStockTaking(wmStockTaking);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除库存盘点记录
|
||||||
|
*
|
||||||
|
* @param takingIds 需要删除的库存盘点记录主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteWmStockTakingByTakingIds(Long[] takingIds)
|
||||||
|
{
|
||||||
|
return wmStockTakingMapper.deleteWmStockTakingByTakingIds(takingIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除库存盘点记录信息
|
||||||
|
*
|
||||||
|
* @param takingId 库存盘点记录主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteWmStockTakingByTakingId(Long takingId)
|
||||||
|
{
|
||||||
|
return wmStockTakingMapper.deleteWmStockTakingByTakingId(takingId);
|
||||||
|
}
|
||||||
|
}
|
192
ktg-mes/src/main/resources/mapper/wm/WmStockTakingLineMapper.xml
Normal file
192
ktg-mes/src/main/resources/mapper/wm/WmStockTakingLineMapper.xml
Normal file
@ -0,0 +1,192 @@
|
|||||||
|
<?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.ktg.mes.wm.mapper.WmStockTakingLineMapper">
|
||||||
|
|
||||||
|
<resultMap type="WmStockTakingLine" id="WmStockTakingLineResult">
|
||||||
|
<result property="lineId" column="line_id" />
|
||||||
|
<result property="takingId" column="taking_id" />
|
||||||
|
<result property="materialStockId" column="material_stock_id" />
|
||||||
|
<result property="itemId" column="item_id" />
|
||||||
|
<result property="itemCode" column="item_code" />
|
||||||
|
<result property="itemName" column="item_name" />
|
||||||
|
<result property="specification" column="specification" />
|
||||||
|
<result property="unitOfMeasure" column="unit_of_measure" />
|
||||||
|
<result property="unitName" column="unit_name" />
|
||||||
|
<result property="quantity" column="quantity" />
|
||||||
|
<result property="takingQuantity" column="taking_quantity" />
|
||||||
|
<result property="warehouseId" column="warehouse_id" />
|
||||||
|
<result property="warehouseCode" column="warehouse_code" />
|
||||||
|
<result property="warehouseName" column="warehouse_name" />
|
||||||
|
<result property="locationId" column="location_id" />
|
||||||
|
<result property="locationCode" column="location_code" />
|
||||||
|
<result property="locationName" column="location_name" />
|
||||||
|
<result property="areaId" column="area_id" />
|
||||||
|
<result property="areaCode" column="area_code" />
|
||||||
|
<result property="areaName" column="area_name" />
|
||||||
|
<result property="takingStatus" column="taking_status" />
|
||||||
|
<result property="remark" column="remark" />
|
||||||
|
<result property="attr1" column="attr1" />
|
||||||
|
<result property="attr2" column="attr2" />
|
||||||
|
<result property="attr3" column="attr3" />
|
||||||
|
<result property="attr4" column="attr4" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectWmStockTakingLineVo">
|
||||||
|
select line_id, taking_id, material_stock_id, item_id, item_code, item_name, specification, unit_of_measure, unit_name, quantity, taking_quantity, warehouse_id, warehouse_code, warehouse_name, location_id, location_code, location_name, area_id, area_code, area_name, taking_status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_stock_taking_line
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectWmStockTakingLineList" parameterType="WmStockTakingLine" resultMap="WmStockTakingLineResult">
|
||||||
|
<include refid="selectWmStockTakingLineVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="takingId != null "> and taking_id = #{takingId}</if>
|
||||||
|
<if test="materialStockId != null "> and material_stock_id = #{materialStockId}</if>
|
||||||
|
<if test="itemId != null "> and item_id = #{itemId}</if>
|
||||||
|
<if test="itemCode != null and itemCode != ''"> and item_code = #{itemCode}</if>
|
||||||
|
<if test="itemName != null and itemName != ''"> and item_name like concat('%', #{itemName}, '%')</if>
|
||||||
|
<if test="specification != null and specification != ''"> and specification = #{specification}</if>
|
||||||
|
<if test="unitOfMeasure != null and unitOfMeasure != ''"> and unit_of_measure = #{unitOfMeasure}</if>
|
||||||
|
<if test="unitName != null and unitName != ''"> and unit_name like concat('%', #{unitName}, '%')</if>
|
||||||
|
<if test="quantity != null "> and quantity = #{quantity}</if>
|
||||||
|
<if test="takingQuantity != null "> and taking_quantity = #{takingQuantity}</if>
|
||||||
|
<if test="warehouseId != null "> and warehouse_id = #{warehouseId}</if>
|
||||||
|
<if test="warehouseCode != null and warehouseCode != ''"> and warehouse_code = #{warehouseCode}</if>
|
||||||
|
<if test="warehouseName != null and warehouseName != ''"> and warehouse_name like concat('%', #{warehouseName}, '%')</if>
|
||||||
|
<if test="locationId != null "> and location_id = #{locationId}</if>
|
||||||
|
<if test="locationCode != null and locationCode != ''"> and location_code = #{locationCode}</if>
|
||||||
|
<if test="locationName != null and locationName != ''"> and location_name like concat('%', #{locationName}, '%')</if>
|
||||||
|
<if test="areaId != null "> and area_id = #{areaId}</if>
|
||||||
|
<if test="areaCode != null and areaCode != ''"> and area_code = #{areaCode}</if>
|
||||||
|
<if test="areaName != null and areaName != ''"> and area_name like concat('%', #{areaName}, '%')</if>
|
||||||
|
<if test="takingStatus != null and takingStatus != ''"> and taking_status = #{takingStatus}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectWmStockTakingLineByLineId" parameterType="Long" resultMap="WmStockTakingLineResult">
|
||||||
|
<include refid="selectWmStockTakingLineVo"/>
|
||||||
|
where line_id = #{lineId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertWmStockTakingLine" parameterType="WmStockTakingLine" useGeneratedKeys="true" keyProperty="lineId">
|
||||||
|
insert into wm_stock_taking_line
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="takingId != null">taking_id,</if>
|
||||||
|
<if test="materialStockId != null">material_stock_id,</if>
|
||||||
|
<if test="itemId != null">item_id,</if>
|
||||||
|
<if test="itemCode != null">item_code,</if>
|
||||||
|
<if test="itemName != null">item_name,</if>
|
||||||
|
<if test="specification != null">specification,</if>
|
||||||
|
<if test="unitOfMeasure != null">unit_of_measure,</if>
|
||||||
|
<if test="unitName != null">unit_name,</if>
|
||||||
|
<if test="quantity != null">quantity,</if>
|
||||||
|
<if test="takingQuantity != null">taking_quantity,</if>
|
||||||
|
<if test="warehouseId != null">warehouse_id,</if>
|
||||||
|
<if test="warehouseCode != null">warehouse_code,</if>
|
||||||
|
<if test="warehouseName != null">warehouse_name,</if>
|
||||||
|
<if test="locationId != null">location_id,</if>
|
||||||
|
<if test="locationCode != null">location_code,</if>
|
||||||
|
<if test="locationName != null">location_name,</if>
|
||||||
|
<if test="areaId != null">area_id,</if>
|
||||||
|
<if test="areaCode != null">area_code,</if>
|
||||||
|
<if test="areaName != null">area_name,</if>
|
||||||
|
<if test="takingStatus != null and takingStatus != ''">taking_status,</if>
|
||||||
|
<if test="remark != null">remark,</if>
|
||||||
|
<if test="attr1 != null">attr1,</if>
|
||||||
|
<if test="attr2 != null">attr2,</if>
|
||||||
|
<if test="attr3 != null">attr3,</if>
|
||||||
|
<if test="attr4 != null">attr4,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="takingId != null">#{takingId},</if>
|
||||||
|
<if test="materialStockId != null">#{materialStockId},</if>
|
||||||
|
<if test="itemId != null">#{itemId},</if>
|
||||||
|
<if test="itemCode != null">#{itemCode},</if>
|
||||||
|
<if test="itemName != null">#{itemName},</if>
|
||||||
|
<if test="specification != null">#{specification},</if>
|
||||||
|
<if test="unitOfMeasure != null">#{unitOfMeasure},</if>
|
||||||
|
<if test="unitName != null">#{unitName},</if>
|
||||||
|
<if test="quantity != null">#{quantity},</if>
|
||||||
|
<if test="takingQuantity != null">#{takingQuantity},</if>
|
||||||
|
<if test="warehouseId != null">#{warehouseId},</if>
|
||||||
|
<if test="warehouseCode != null">#{warehouseCode},</if>
|
||||||
|
<if test="warehouseName != null">#{warehouseName},</if>
|
||||||
|
<if test="locationId != null">#{locationId},</if>
|
||||||
|
<if test="locationCode != null">#{locationCode},</if>
|
||||||
|
<if test="locationName != null">#{locationName},</if>
|
||||||
|
<if test="areaId != null">#{areaId},</if>
|
||||||
|
<if test="areaCode != null">#{areaCode},</if>
|
||||||
|
<if test="areaName != null">#{areaName},</if>
|
||||||
|
<if test="takingStatus != null and takingStatus != ''">#{takingStatus},</if>
|
||||||
|
<if test="remark != null">#{remark},</if>
|
||||||
|
<if test="attr1 != null">#{attr1},</if>
|
||||||
|
<if test="attr2 != null">#{attr2},</if>
|
||||||
|
<if test="attr3 != null">#{attr3},</if>
|
||||||
|
<if test="attr4 != null">#{attr4},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateWmStockTakingLine" parameterType="WmStockTakingLine">
|
||||||
|
update wm_stock_taking_line
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="takingId != null">taking_id = #{takingId},</if>
|
||||||
|
<if test="materialStockId != null">material_stock_id = #{materialStockId},</if>
|
||||||
|
<if test="itemId != null">item_id = #{itemId},</if>
|
||||||
|
<if test="itemCode != null">item_code = #{itemCode},</if>
|
||||||
|
<if test="itemName != null">item_name = #{itemName},</if>
|
||||||
|
<if test="specification != null">specification = #{specification},</if>
|
||||||
|
<if test="unitOfMeasure != null">unit_of_measure = #{unitOfMeasure},</if>
|
||||||
|
<if test="unitName != null">unit_name = #{unitName},</if>
|
||||||
|
<if test="quantity != null">quantity = #{quantity},</if>
|
||||||
|
<if test="takingQuantity != null">taking_quantity = #{takingQuantity},</if>
|
||||||
|
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
|
||||||
|
<if test="warehouseCode != null">warehouse_code = #{warehouseCode},</if>
|
||||||
|
<if test="warehouseName != null">warehouse_name = #{warehouseName},</if>
|
||||||
|
<if test="locationId != null">location_id = #{locationId},</if>
|
||||||
|
<if test="locationCode != null">location_code = #{locationCode},</if>
|
||||||
|
<if test="locationName != null">location_name = #{locationName},</if>
|
||||||
|
<if test="areaId != null">area_id = #{areaId},</if>
|
||||||
|
<if test="areaCode != null">area_code = #{areaCode},</if>
|
||||||
|
<if test="areaName != null">area_name = #{areaName},</if>
|
||||||
|
<if test="takingStatus != null and takingStatus != ''">taking_status = #{takingStatus},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||||
|
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||||||
|
<if test="attr3 != null">attr3 = #{attr3},</if>
|
||||||
|
<if test="attr4 != null">attr4 = #{attr4},</if>
|
||||||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
where line_id = #{lineId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteWmStockTakingLineByLineId" parameterType="Long">
|
||||||
|
delete from wm_stock_taking_line where line_id = #{lineId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteWmStockTakingLineByLineIds" parameterType="String">
|
||||||
|
delete from wm_stock_taking_line where line_id in
|
||||||
|
<foreach item="lineId" collection="array" open="(" separator="," close=")">
|
||||||
|
#{lineId}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteByTakingId" parameterType="Long">
|
||||||
|
delete from wm_stock_taking_line where taking_id = #{takingId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
142
ktg-mes/src/main/resources/mapper/wm/WmStockTakingMapper.xml
Normal file
142
ktg-mes/src/main/resources/mapper/wm/WmStockTakingMapper.xml
Normal file
@ -0,0 +1,142 @@
|
|||||||
|
<?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.ktg.mes.wm.mapper.WmStockTakingMapper">
|
||||||
|
|
||||||
|
<resultMap type="WmStockTaking" id="WmStockTakingResult">
|
||||||
|
<result property="takingId" column="taking_id" />
|
||||||
|
<result property="takingCode" column="taking_code" />
|
||||||
|
<result property="takingName" column="taking_name" />
|
||||||
|
<result property="takingDate" column="taking_date" />
|
||||||
|
<result property="userName" column="user_name" />
|
||||||
|
<result property="nickName" column="nick_name" />
|
||||||
|
<result property="takingType" column="taking_type" />
|
||||||
|
<result property="warehouseId" column="warehouse_id" />
|
||||||
|
<result property="warehouseCode" column="warehouse_code" />
|
||||||
|
<result property="warehouseName" column="warehouse_name" />
|
||||||
|
<result property="status" column="status" />
|
||||||
|
<result property="remark" column="remark" />
|
||||||
|
<result property="attr1" column="attr1" />
|
||||||
|
<result property="attr2" column="attr2" />
|
||||||
|
<result property="attr3" column="attr3" />
|
||||||
|
<result property="attr4" column="attr4" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectWmStockTakingVo">
|
||||||
|
select taking_id, taking_code, taking_name, taking_date, user_name, nick_name, taking_type, warehouse_id, warehouse_code, warehouse_name, status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_stock_taking
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectWmStockTakingList" parameterType="WmStockTaking" resultMap="WmStockTakingResult">
|
||||||
|
<include refid="selectWmStockTakingVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="takingCode != null and takingCode != ''"> and taking_code = #{takingCode}</if>
|
||||||
|
<if test="takingName != null and takingName != ''"> and taking_name like concat('%', #{takingName}, '%')</if>
|
||||||
|
<if test="takingDate != null "> and taking_date = #{takingDate}</if>
|
||||||
|
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
||||||
|
<if test="nickName != null and nickName != ''"> and nick_name like concat('%', #{nickName}, '%')</if>
|
||||||
|
<if test="takingType != null and takingType != ''"> and taking_type = #{takingType}</if>
|
||||||
|
<if test="warehouseId != null "> and warehouse_id = #{warehouseId}</if>
|
||||||
|
<if test="warehouseCode != null and warehouseCode != ''"> and warehouse_code = #{warehouseCode}</if>
|
||||||
|
<if test="warehouseName != null and warehouseName != ''"> and warehouse_name like concat('%', #{warehouseName}, '%')</if>
|
||||||
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectWmStockTakingByTakingId" parameterType="Long" resultMap="WmStockTakingResult">
|
||||||
|
<include refid="selectWmStockTakingVo"/>
|
||||||
|
where taking_id = #{takingId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="checkUnique" parameterType="WmStockTaking" resultMap="WmStockTakingResult">
|
||||||
|
<include refid="selectWmStockTakingVo"/>
|
||||||
|
where taking_code = #{takingCode}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertWmStockTaking" parameterType="WmStockTaking" useGeneratedKeys="true" keyProperty="takingId">
|
||||||
|
insert into wm_stock_taking
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="takingCode != null and takingCode != ''">taking_code,</if>
|
||||||
|
<if test="takingName != null">taking_name,</if>
|
||||||
|
<if test="takingDate != null">taking_date,</if>
|
||||||
|
<if test="userName != null">user_name,</if>
|
||||||
|
<if test="nickName != null">nick_name,</if>
|
||||||
|
<if test="takingType != null and takingType != ''">taking_type,</if>
|
||||||
|
<if test="warehouseId != null">warehouse_id,</if>
|
||||||
|
<if test="warehouseCode != null">warehouse_code,</if>
|
||||||
|
<if test="warehouseName != null">warehouse_name,</if>
|
||||||
|
<if test="status != null">status,</if>
|
||||||
|
<if test="remark != null">remark,</if>
|
||||||
|
<if test="attr1 != null">attr1,</if>
|
||||||
|
<if test="attr2 != null">attr2,</if>
|
||||||
|
<if test="attr3 != null">attr3,</if>
|
||||||
|
<if test="attr4 != null">attr4,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="takingCode != null and takingCode != ''">#{takingCode},</if>
|
||||||
|
<if test="takingName != null">#{takingName},</if>
|
||||||
|
<if test="takingDate != null">#{takingDate},</if>
|
||||||
|
<if test="userName != null">#{userName},</if>
|
||||||
|
<if test="nickName != null">#{nickName},</if>
|
||||||
|
<if test="takingType != null and takingType != ''">#{takingType},</if>
|
||||||
|
<if test="warehouseId != null">#{warehouseId},</if>
|
||||||
|
<if test="warehouseCode != null">#{warehouseCode},</if>
|
||||||
|
<if test="warehouseName != null">#{warehouseName},</if>
|
||||||
|
<if test="status != null">#{status},</if>
|
||||||
|
<if test="remark != null">#{remark},</if>
|
||||||
|
<if test="attr1 != null">#{attr1},</if>
|
||||||
|
<if test="attr2 != null">#{attr2},</if>
|
||||||
|
<if test="attr3 != null">#{attr3},</if>
|
||||||
|
<if test="attr4 != null">#{attr4},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateWmStockTaking" parameterType="WmStockTaking">
|
||||||
|
update wm_stock_taking
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="takingCode != null and takingCode != ''">taking_code = #{takingCode},</if>
|
||||||
|
<if test="takingName != null">taking_name = #{takingName},</if>
|
||||||
|
<if test="takingDate != null">taking_date = #{takingDate},</if>
|
||||||
|
<if test="userName != null">user_name = #{userName},</if>
|
||||||
|
<if test="nickName != null">nick_name = #{nickName},</if>
|
||||||
|
<if test="takingType != null and takingType != ''">taking_type = #{takingType},</if>
|
||||||
|
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
|
||||||
|
<if test="warehouseCode != null">warehouse_code = #{warehouseCode},</if>
|
||||||
|
<if test="warehouseName != null">warehouse_name = #{warehouseName},</if>
|
||||||
|
<if test="status != null">status = #{status},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||||
|
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||||||
|
<if test="attr3 != null">attr3 = #{attr3},</if>
|
||||||
|
<if test="attr4 != null">attr4 = #{attr4},</if>
|
||||||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
where taking_id = #{takingId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteWmStockTakingByTakingId" parameterType="Long">
|
||||||
|
delete from wm_stock_taking where taking_id = #{takingId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteWmStockTakingByTakingIds" parameterType="String">
|
||||||
|
delete from wm_stock_taking where taking_id in
|
||||||
|
<foreach item="takingId" collection="array" open="(" separator="," close=")">
|
||||||
|
#{takingId}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
@ -0,0 +1,206 @@
|
|||||||
|
<?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.ktg.mes.wm.mapper.WmStockTakingResultMapper">
|
||||||
|
|
||||||
|
<resultMap type="WmStockTakingResult" id="WmStockTakingResultResult">
|
||||||
|
<result property="resultId" column="result_id" />
|
||||||
|
<result property="takingId" column="taking_id" />
|
||||||
|
<result property="itemId" column="item_id" />
|
||||||
|
<result property="itemCode" column="item_code" />
|
||||||
|
<result property="itemName" column="item_name" />
|
||||||
|
<result property="specification" column="specification" />
|
||||||
|
<result property="unitOfMeasure" column="unit_of_measure" />
|
||||||
|
<result property="unitName" column="unit_name" />
|
||||||
|
<result property="quantity" column="quantity" />
|
||||||
|
<result property="takingQuantity" column="taking_quantity" />
|
||||||
|
<result property="takingStatus" column="taking_status" />
|
||||||
|
<result property="remark" column="remark" />
|
||||||
|
<result property="attr1" column="attr1" />
|
||||||
|
<result property="attr2" column="attr2" />
|
||||||
|
<result property="attr3" column="attr3" />
|
||||||
|
<result property="attr4" column="attr4" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectWmStockTakingResultVo">
|
||||||
|
select result_id, taking_id, item_id, item_code, item_name, specification, unit_of_measure, unit_name, quantity, taking_quantity, taking_status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_stock_taking_result
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectWmStockTakingResultList" parameterType="WmStockTakingResult" resultMap="WmStockTakingResultResult">
|
||||||
|
<include refid="selectWmStockTakingResultVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="takingId != null "> and taking_id = #{takingId}</if>
|
||||||
|
<if test="itemId != null "> and item_id = #{itemId}</if>
|
||||||
|
<if test="itemCode != null and itemCode != ''"> and item_code = #{itemCode}</if>
|
||||||
|
<if test="itemName != null and itemName != ''"> and item_name like concat('%', #{itemName}, '%')</if>
|
||||||
|
<if test="specification != null and specification != ''"> and specification = #{specification}</if>
|
||||||
|
<if test="unitOfMeasure != null and unitOfMeasure != ''"> and unit_of_measure = #{unitOfMeasure}</if>
|
||||||
|
<if test="unitName != null and unitName != ''"> and unit_name like concat('%', #{unitName}, '%')</if>
|
||||||
|
<if test="quantity != null "> and quantity = #{quantity}</if>
|
||||||
|
<if test="takingQuantity != null "> and taking_quantity = #{takingQuantity}</if>
|
||||||
|
<if test="takingStatus != null and takingStatus != ''"> and taking_status = #{takingStatus}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectWmStockTakingResultByResultId" parameterType="Long" resultMap="WmStockTakingResultResult">
|
||||||
|
<include refid="selectWmStockTakingResultVo"/>
|
||||||
|
where result_id = #{resultId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="calculateOpenWmStockTakingResult" parameterType="Long" useGeneratedKeys="true">
|
||||||
|
insert into wm_stock_taking_result (taking_id,item_id,item_code,item_name,specification,taking_quantity,quantity,taking_status)
|
||||||
|
select sl.taking_id,sl.item_id,sl.item_code,sl.item_name,sl.specification,taking_quantity,quantity,
|
||||||
|
case when IFNULL(taking_quantity,0) > IFNULL(quantity,0) then 'PROFIT'
|
||||||
|
when IFNULL(taking_quantity,0) < IFNULL(quantity,0) then 'LOSS'
|
||||||
|
else 'NORMAL' end as taking_status
|
||||||
|
from wm_stock_taking_line sl
|
||||||
|
where sl.taking_id = #{takingId}
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<insert id="calculateWmStockTakingResult" parameterType="Long" useGeneratedKeys="true">
|
||||||
|
insert into wm_stock_taking_result (item_id,item_code,item_name,specification,taking_quantity,quantity,taking_status)
|
||||||
|
select IFNULL(m.item_id,t.item_id) as item_id, IFNULL(m.item_code,t.item_code) as item_code,IFNULL(m.item_name,t.item_name) as item_name,IFNULL(m.specification,t.specification) as specification,
|
||||||
|
IFNULL(t.taking_quantity,0) as taking_quantity,IFNULL(m.onhand,0) as quantity,
|
||||||
|
case when IFNULL(t.taking_quantity,0) > IFNULL(m.onhand,0) then 'PROFIT'
|
||||||
|
when IFNULL(t.taking_quantity,0) < IFNULL(m.onhand,0) then 'LOSS'
|
||||||
|
else 'NORMAL' end as taking_status
|
||||||
|
from (
|
||||||
|
select sl.item_id,sl.item_code,sl.item_name,sl.specification,sum(sl.taking_quantity) as taking_quantity
|
||||||
|
from wm_stock_taking_line sl
|
||||||
|
where sl.taking_id = #{takingId}
|
||||||
|
group by sl.item_id,sl.item_code,sl.item_name,sl.specification
|
||||||
|
) t
|
||||||
|
left join (
|
||||||
|
select ms.item_id,ms.item_code,ms.item_name,ms.specification,sum(ms.quantity_onhand) as onhand
|
||||||
|
from wm_material_stock ms
|
||||||
|
where (ms.warehouse_id,ms.location_id,ms.area_id) in (
|
||||||
|
select warehouse_id,location_id,area_id
|
||||||
|
from wm_stock_taking
|
||||||
|
where taking_id = #{takingId}
|
||||||
|
)
|
||||||
|
group by ms.item_id,ms.item_code,ms.item_name,ms.specification
|
||||||
|
) m
|
||||||
|
on t.item_id = m.item_id
|
||||||
|
and t.item_code = m.item_code
|
||||||
|
where t.taking_quantity !=0
|
||||||
|
|
||||||
|
union
|
||||||
|
|
||||||
|
select IFNULL(t.item_id,m.item_id) as item_id,IFNULL(t.item_code,m.item_code) as item_code,IFNULL(t.item_name,m.item_name) as item_name,IFNULL(t.specification,m.specification) as specification,
|
||||||
|
IFNULL(t.taking_quantity,0) as taking_quantity,IFNULL(m.onhand,0) as quantity,
|
||||||
|
case when IFNULL(t.taking_quantity,0) > IFNULL(m.onhand,0) then 'PROFIT'
|
||||||
|
when IFNULL(t.taking_quantity,0) < IFNULL(m.onhand,0) then 'LOSS'
|
||||||
|
else 'NORMAL' end as taking_status
|
||||||
|
from (
|
||||||
|
select ms.item_id,ms.item_code,ms.item_name,ms.specification,sum(ms.quantity_onhand) as onhand
|
||||||
|
from wm_material_stock ms
|
||||||
|
where (ms.warehouse_id,ms.location_id,ms.area_id) in (
|
||||||
|
select warehouse_id,location_id,area_id
|
||||||
|
from wm_stock_taking
|
||||||
|
where taking_id = #{takingId}
|
||||||
|
)
|
||||||
|
group by ms.item_id,ms.item_code,ms.item_name,ms.specification
|
||||||
|
) m
|
||||||
|
left join (
|
||||||
|
select sl.item_id,sl.item_code,sl.item_name,sl.specification,sum(sl.taking_quantity) as taking_quantity
|
||||||
|
from wm_stock_taking_line sl
|
||||||
|
where sl.taking_id = #{takingId}
|
||||||
|
group by sl.item_id,sl.item_code,sl.item_name,sl.specification
|
||||||
|
) t
|
||||||
|
on t.item_id = m.item_id
|
||||||
|
and t.item_code = m.item_code
|
||||||
|
where m.onhand !=0
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<insert id="insertWmStockTakingResult" parameterType="WmStockTakingResult" useGeneratedKeys="true" keyProperty="resultId">
|
||||||
|
insert into wm_stock_taking_result
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="takingId != null">taking_id,</if>
|
||||||
|
<if test="itemId != null">item_id,</if>
|
||||||
|
<if test="itemCode != null">item_code,</if>
|
||||||
|
<if test="itemName != null">item_name,</if>
|
||||||
|
<if test="specification != null">specification,</if>
|
||||||
|
<if test="unitOfMeasure != null">unit_of_measure,</if>
|
||||||
|
<if test="unitName != null">unit_name,</if>
|
||||||
|
<if test="quantity != null">quantity,</if>
|
||||||
|
<if test="takingQuantity != null">taking_quantity,</if>
|
||||||
|
<if test="takingStatus != null and takingStatus != ''">taking_status,</if>
|
||||||
|
<if test="remark != null">remark,</if>
|
||||||
|
<if test="attr1 != null">attr1,</if>
|
||||||
|
<if test="attr2 != null">attr2,</if>
|
||||||
|
<if test="attr3 != null">attr3,</if>
|
||||||
|
<if test="attr4 != null">attr4,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="takingId != null">#{takingId},</if>
|
||||||
|
<if test="itemId != null">#{itemId},</if>
|
||||||
|
<if test="itemCode != null">#{itemCode},</if>
|
||||||
|
<if test="itemName != null">#{itemName},</if>
|
||||||
|
<if test="specification != null">#{specification},</if>
|
||||||
|
<if test="unitOfMeasure != null">#{unitOfMeasure},</if>
|
||||||
|
<if test="unitName != null">#{unitName},</if>
|
||||||
|
<if test="quantity != null">#{quantity},</if>
|
||||||
|
<if test="takingQuantity != null">#{takingQuantity},</if>
|
||||||
|
<if test="takingStatus != null and takingStatus != ''">#{takingStatus},</if>
|
||||||
|
<if test="remark != null">#{remark},</if>
|
||||||
|
<if test="attr1 != null">#{attr1},</if>
|
||||||
|
<if test="attr2 != null">#{attr2},</if>
|
||||||
|
<if test="attr3 != null">#{attr3},</if>
|
||||||
|
<if test="attr4 != null">#{attr4},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateWmStockTakingResult" parameterType="WmStockTakingResult">
|
||||||
|
update wm_stock_taking_result
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="takingId != null">taking_id = #{takingId},</if>
|
||||||
|
<if test="itemId != null">item_id = #{itemId},</if>
|
||||||
|
<if test="itemCode != null">item_code = #{itemCode},</if>
|
||||||
|
<if test="itemName != null">item_name = #{itemName},</if>
|
||||||
|
<if test="specification != null">specification = #{specification},</if>
|
||||||
|
<if test="unitOfMeasure != null">unit_of_measure = #{unitOfMeasure},</if>
|
||||||
|
<if test="unitName != null">unit_name = #{unitName},</if>
|
||||||
|
<if test="quantity != null">quantity = #{quantity},</if>
|
||||||
|
<if test="takingQuantity != null">taking_quantity = #{takingQuantity},</if>
|
||||||
|
<if test="takingStatus != null and takingStatus != ''">taking_status = #{takingStatus},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||||
|
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||||||
|
<if test="attr3 != null">attr3 = #{attr3},</if>
|
||||||
|
<if test="attr4 != null">attr4 = #{attr4},</if>
|
||||||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
where result_id = #{resultId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteWmStockTakingResultByResultId" parameterType="Long">
|
||||||
|
delete from wm_stock_taking_result where result_id = #{resultId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteWmStockTakingResultByResultIds" parameterType="String">
|
||||||
|
delete from wm_stock_taking_result where result_id in
|
||||||
|
<foreach item="resultId" collection="array" open="(" separator="," close=")">
|
||||||
|
#{resultId}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteWmStockTakingResultByTakingId" parameterType="Long">
|
||||||
|
delete from wm_stock_taking_result where taking_id = #{takingId}
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue
Block a user