销售出库
This commit is contained in:
parent
b1da8396a0
commit
a46efc6eac
@ -11,6 +11,7 @@ import com.ktg.mes.wm.domain.WmWarehouse;
|
|||||||
import com.ktg.mes.wm.service.*;
|
import com.ktg.mes.wm.service.*;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.PutMapping;
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
@ -40,6 +41,9 @@ public class WmProductSalseController extends BaseController
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IWmProductSalseService wmProductSalseService;
|
private IWmProductSalseService wmProductSalseService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IWmProductSalseLineService wmProductSalseLineService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IWmWarehouseService wmWarehouseService;
|
private IWmWarehouseService wmWarehouseService;
|
||||||
|
|
||||||
@ -150,9 +154,14 @@ public class WmProductSalseController extends BaseController
|
|||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('mes:wm:productsalse:remove')")
|
@PreAuthorize("@ss.hasPermi('mes:wm:productsalse:remove')")
|
||||||
@Log(title = "销售出库单", businessType = BusinessType.DELETE)
|
@Log(title = "销售出库单", businessType = BusinessType.DELETE)
|
||||||
|
@Transactional
|
||||||
@DeleteMapping("/{salseIds}")
|
@DeleteMapping("/{salseIds}")
|
||||||
public AjaxResult remove(@PathVariable Long[] salseIds)
|
public AjaxResult remove(@PathVariable Long[] salseIds)
|
||||||
{
|
{
|
||||||
|
for (Long salseId: salseIds
|
||||||
|
) {
|
||||||
|
wmProductSalseLineService.deleteBySalseId(salseId);
|
||||||
|
}
|
||||||
return toAjax(wmProductSalseService.deleteWmProductSalseBySalseIds(salseIds));
|
return toAjax(wmProductSalseService.deleteWmProductSalseBySalseIds(salseIds));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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.WmProductSalseLine;
|
||||||
|
import com.ktg.mes.wm.service.IWmProductSalseLineService;
|
||||||
|
import com.ktg.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ktg.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品销售出库行Controller
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2022-10-05
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/mes/wm/productsalseline")
|
||||||
|
public class WmProductSalseLineController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IWmProductSalseLineService wmProductSalseLineService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询产品销售出库行列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:wm:productsalseline:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(WmProductSalseLine wmProductSalseLine)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<WmProductSalseLine> list = wmProductSalseLineService.selectWmProductSalseLineList(wmProductSalseLine);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出产品销售出库行列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:wm:productsalseline:export')")
|
||||||
|
@Log(title = "产品销售出库行", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, WmProductSalseLine wmProductSalseLine)
|
||||||
|
{
|
||||||
|
List<WmProductSalseLine> list = wmProductSalseLineService.selectWmProductSalseLineList(wmProductSalseLine);
|
||||||
|
ExcelUtil<WmProductSalseLine> util = new ExcelUtil<WmProductSalseLine>(WmProductSalseLine.class);
|
||||||
|
util.exportExcel(response, list, "产品销售出库行数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取产品销售出库行详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:wm:productsalseline:query')")
|
||||||
|
@GetMapping(value = "/{lineId}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("lineId") Long lineId)
|
||||||
|
{
|
||||||
|
return AjaxResult.success(wmProductSalseLineService.selectWmProductSalseLineByLineId(lineId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增产品销售出库行
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:wm:productsalseline:add')")
|
||||||
|
@Log(title = "产品销售出库行", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody WmProductSalseLine wmProductSalseLine)
|
||||||
|
{
|
||||||
|
return toAjax(wmProductSalseLineService.insertWmProductSalseLine(wmProductSalseLine));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改产品销售出库行
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:wm:productsalseline:edit')")
|
||||||
|
@Log(title = "产品销售出库行", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody WmProductSalseLine wmProductSalseLine)
|
||||||
|
{
|
||||||
|
return toAjax(wmProductSalseLineService.updateWmProductSalseLine(wmProductSalseLine));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除产品销售出库行
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:wm:productsalseline:remove')")
|
||||||
|
@Log(title = "产品销售出库行", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{lineIds}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] lineIds)
|
||||||
|
{
|
||||||
|
return toAjax(wmProductSalseLineService.deleteWmProductSalseLineByLineIds(lineIds));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,347 @@
|
|||||||
|
package com.ktg.mes.wm.domain;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
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_product_salse_line
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2022-10-05
|
||||||
|
*/
|
||||||
|
public class WmProductSalseLine extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 行ID */
|
||||||
|
private Long lineId;
|
||||||
|
|
||||||
|
/** 出库记录ID */
|
||||||
|
@Excel(name = "出库记录ID")
|
||||||
|
private Long salseId;
|
||||||
|
|
||||||
|
/** 库存记录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 BigDecimal quantitySalse;
|
||||||
|
|
||||||
|
/** 批次号 */
|
||||||
|
@Excel(name = "批次号")
|
||||||
|
private String batchCode;
|
||||||
|
|
||||||
|
/** 仓库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;
|
||||||
|
|
||||||
|
/** 预留字段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 setSalseId(Long salseId)
|
||||||
|
{
|
||||||
|
this.salseId = salseId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getSalseId()
|
||||||
|
{
|
||||||
|
return salseId;
|
||||||
|
}
|
||||||
|
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 setQuantitySalse(BigDecimal quantitySalse)
|
||||||
|
{
|
||||||
|
this.quantitySalse = quantitySalse;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQuantitySalse()
|
||||||
|
{
|
||||||
|
return quantitySalse;
|
||||||
|
}
|
||||||
|
public void setBatchCode(String batchCode)
|
||||||
|
{
|
||||||
|
this.batchCode = batchCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBatchCode()
|
||||||
|
{
|
||||||
|
return batchCode;
|
||||||
|
}
|
||||||
|
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 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("salseId", getSalseId())
|
||||||
|
.append("materialStockId", getMaterialStockId())
|
||||||
|
.append("itemId", getItemId())
|
||||||
|
.append("itemCode", getItemCode())
|
||||||
|
.append("itemName", getItemName())
|
||||||
|
.append("specification", getSpecification())
|
||||||
|
.append("unitOfMeasure", getUnitOfMeasure())
|
||||||
|
.append("quantitySalse", getQuantitySalse())
|
||||||
|
.append("batchCode", getBatchCode())
|
||||||
|
.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("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,68 @@
|
|||||||
|
package com.ktg.mes.wm.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ktg.mes.wm.domain.WmProductSalseLine;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品销售出库行Mapper接口
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2022-10-05
|
||||||
|
*/
|
||||||
|
public interface WmProductSalseLineMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询产品销售出库行
|
||||||
|
*
|
||||||
|
* @param lineId 产品销售出库行主键
|
||||||
|
* @return 产品销售出库行
|
||||||
|
*/
|
||||||
|
public WmProductSalseLine selectWmProductSalseLineByLineId(Long lineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询产品销售出库行列表
|
||||||
|
*
|
||||||
|
* @param wmProductSalseLine 产品销售出库行
|
||||||
|
* @return 产品销售出库行集合
|
||||||
|
*/
|
||||||
|
public List<WmProductSalseLine> selectWmProductSalseLineList(WmProductSalseLine wmProductSalseLine);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增产品销售出库行
|
||||||
|
*
|
||||||
|
* @param wmProductSalseLine 产品销售出库行
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertWmProductSalseLine(WmProductSalseLine wmProductSalseLine);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改产品销售出库行
|
||||||
|
*
|
||||||
|
* @param wmProductSalseLine 产品销售出库行
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateWmProductSalseLine(WmProductSalseLine wmProductSalseLine);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除产品销售出库行
|
||||||
|
*
|
||||||
|
* @param lineId 产品销售出库行主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteWmProductSalseLineByLineId(Long lineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除产品销售出库行
|
||||||
|
*
|
||||||
|
* @param lineIds 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteWmProductSalseLineByLineIds(Long[] lineIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据出库单头删除所有行
|
||||||
|
* @param salseId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public int deleteBySalseId(Long salseId);
|
||||||
|
}
|
@ -0,0 +1,68 @@
|
|||||||
|
package com.ktg.mes.wm.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ktg.mes.wm.domain.WmProductSalseLine;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品销售出库行Service接口
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2022-10-05
|
||||||
|
*/
|
||||||
|
public interface IWmProductSalseLineService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询产品销售出库行
|
||||||
|
*
|
||||||
|
* @param lineId 产品销售出库行主键
|
||||||
|
* @return 产品销售出库行
|
||||||
|
*/
|
||||||
|
public WmProductSalseLine selectWmProductSalseLineByLineId(Long lineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询产品销售出库行列表
|
||||||
|
*
|
||||||
|
* @param wmProductSalseLine 产品销售出库行
|
||||||
|
* @return 产品销售出库行集合
|
||||||
|
*/
|
||||||
|
public List<WmProductSalseLine> selectWmProductSalseLineList(WmProductSalseLine wmProductSalseLine);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增产品销售出库行
|
||||||
|
*
|
||||||
|
* @param wmProductSalseLine 产品销售出库行
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertWmProductSalseLine(WmProductSalseLine wmProductSalseLine);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改产品销售出库行
|
||||||
|
*
|
||||||
|
* @param wmProductSalseLine 产品销售出库行
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateWmProductSalseLine(WmProductSalseLine wmProductSalseLine);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除产品销售出库行
|
||||||
|
*
|
||||||
|
* @param lineIds 需要删除的产品销售出库行主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteWmProductSalseLineByLineIds(Long[] lineIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除产品销售出库行信息
|
||||||
|
*
|
||||||
|
* @param lineId 产品销售出库行主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteWmProductSalseLineByLineId(Long lineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据出库单头删除所有行
|
||||||
|
* @param salseId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public int deleteBySalseId(Long salseId);
|
||||||
|
}
|
@ -0,0 +1,101 @@
|
|||||||
|
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.WmProductSalseLineMapper;
|
||||||
|
import com.ktg.mes.wm.domain.WmProductSalseLine;
|
||||||
|
import com.ktg.mes.wm.service.IWmProductSalseLineService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品销售出库行Service业务层处理
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2022-10-05
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class WmProductSalseLineServiceImpl implements IWmProductSalseLineService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private WmProductSalseLineMapper wmProductSalseLineMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询产品销售出库行
|
||||||
|
*
|
||||||
|
* @param lineId 产品销售出库行主键
|
||||||
|
* @return 产品销售出库行
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public WmProductSalseLine selectWmProductSalseLineByLineId(Long lineId)
|
||||||
|
{
|
||||||
|
return wmProductSalseLineMapper.selectWmProductSalseLineByLineId(lineId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询产品销售出库行列表
|
||||||
|
*
|
||||||
|
* @param wmProductSalseLine 产品销售出库行
|
||||||
|
* @return 产品销售出库行
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<WmProductSalseLine> selectWmProductSalseLineList(WmProductSalseLine wmProductSalseLine)
|
||||||
|
{
|
||||||
|
return wmProductSalseLineMapper.selectWmProductSalseLineList(wmProductSalseLine);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增产品销售出库行
|
||||||
|
*
|
||||||
|
* @param wmProductSalseLine 产品销售出库行
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertWmProductSalseLine(WmProductSalseLine wmProductSalseLine)
|
||||||
|
{
|
||||||
|
wmProductSalseLine.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return wmProductSalseLineMapper.insertWmProductSalseLine(wmProductSalseLine);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改产品销售出库行
|
||||||
|
*
|
||||||
|
* @param wmProductSalseLine 产品销售出库行
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateWmProductSalseLine(WmProductSalseLine wmProductSalseLine)
|
||||||
|
{
|
||||||
|
wmProductSalseLine.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return wmProductSalseLineMapper.updateWmProductSalseLine(wmProductSalseLine);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除产品销售出库行
|
||||||
|
*
|
||||||
|
* @param lineIds 需要删除的产品销售出库行主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteWmProductSalseLineByLineIds(Long[] lineIds)
|
||||||
|
{
|
||||||
|
return wmProductSalseLineMapper.deleteWmProductSalseLineByLineIds(lineIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除产品销售出库行信息
|
||||||
|
*
|
||||||
|
* @param lineId 产品销售出库行主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteWmProductSalseLineByLineId(Long lineId)
|
||||||
|
{
|
||||||
|
return wmProductSalseLineMapper.deleteWmProductSalseLineByLineId(lineId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int deleteBySalseId(Long salseId) {
|
||||||
|
return wmProductSalseLineMapper.deleteBySalseId(salseId);
|
||||||
|
}
|
||||||
|
}
|
@ -107,4 +107,6 @@ public class WmProductSalseServiceImpl implements IWmProductSalseService
|
|||||||
{
|
{
|
||||||
return wmProductSalseMapper.deleteWmProductSalseBySalseId(salseId);
|
return wmProductSalseMapper.deleteWmProductSalseBySalseId(salseId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,181 @@
|
|||||||
|
<?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.WmProductSalseLineMapper">
|
||||||
|
|
||||||
|
<resultMap type="WmProductSalseLine" id="WmProductSalseLineResult">
|
||||||
|
<result property="lineId" column="line_id" />
|
||||||
|
<result property="salseId" column="salse_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="quantitySalse" column="quantity_salse" />
|
||||||
|
<result property="batchCode" column="batch_code" />
|
||||||
|
<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="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="selectWmProductSalseLineVo">
|
||||||
|
select line_id, salse_id, material_stock_id, item_id, item_code, item_name, specification, unit_of_measure, quantity_salse, batch_code, warehouse_id, warehouse_code, warehouse_name, location_id, location_code, location_name, area_id, area_code, area_name, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_product_salse_line
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectWmProductSalseLineList" parameterType="WmProductSalseLine" resultMap="WmProductSalseLineResult">
|
||||||
|
<include refid="selectWmProductSalseLineVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="salseId != null "> and salse_id = #{salseId}</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="quantitySalse != null "> and quantity_salse = #{quantitySalse}</if>
|
||||||
|
<if test="batchCode != null and batchCode != ''"> and batch_code = #{batchCode}</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>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectWmProductSalseLineByLineId" parameterType="Long" resultMap="WmProductSalseLineResult">
|
||||||
|
<include refid="selectWmProductSalseLineVo"/>
|
||||||
|
where line_id = #{lineId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertWmProductSalseLine" parameterType="WmProductSalseLine" useGeneratedKeys="true" keyProperty="lineId">
|
||||||
|
insert into wm_product_salse_line
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="salseId != null">salse_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="quantitySalse != null">quantity_salse,</if>
|
||||||
|
<if test="batchCode != null">batch_code,</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="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="salseId != null">#{salseId},</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="quantitySalse != null">#{quantitySalse},</if>
|
||||||
|
<if test="batchCode != null">#{batchCode},</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="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="updateWmProductSalseLine" parameterType="WmProductSalseLine">
|
||||||
|
update wm_product_salse_line
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="salseId != null">salse_id = #{salseId},</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="quantitySalse != null">quantity_salse = #{quantitySalse},</if>
|
||||||
|
<if test="batchCode != null">batch_code = #{batchCode},</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="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="deleteWmProductSalseLineByLineId" parameterType="Long">
|
||||||
|
delete from wm_product_salse_line where line_id = #{lineId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteWmProductSalseLineByLineIds" parameterType="String">
|
||||||
|
delete from wm_product_salse_line where line_id in
|
||||||
|
<foreach item="lineId" collection="array" open="(" separator="," close=")">
|
||||||
|
#{lineId}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteBySalseId" parameterMap="Long">
|
||||||
|
delete from wm_product_salse_line where salse_id = #{salseId}
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue
Block a user