销售出库
This commit is contained in:
parent
c3d1d30776
commit
1ff7b3fb3e
@ -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.WmProductSalse;
|
||||||
|
import com.ktg.mes.wm.service.IWmProductSalseService;
|
||||||
|
import com.ktg.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ktg.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 销售出库单Controller
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2022-10-04
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/mes/wm/productsalse")
|
||||||
|
public class WmProductSalseController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IWmProductSalseService wmProductSalseService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询销售出库单列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:wm:productsalse:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(WmProductSalse wmProductSalse)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<WmProductSalse> list = wmProductSalseService.selectWmProductSalseList(wmProductSalse);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出销售出库单列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:wm:productsalse:export')")
|
||||||
|
@Log(title = "销售出库单", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, WmProductSalse wmProductSalse)
|
||||||
|
{
|
||||||
|
List<WmProductSalse> list = wmProductSalseService.selectWmProductSalseList(wmProductSalse);
|
||||||
|
ExcelUtil<WmProductSalse> util = new ExcelUtil<WmProductSalse>(WmProductSalse.class);
|
||||||
|
util.exportExcel(response, list, "销售出库单数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取销售出库单详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:wm:productsalse:query')")
|
||||||
|
@GetMapping(value = "/{salseId}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("salseId") Long salseId)
|
||||||
|
{
|
||||||
|
return AjaxResult.success(wmProductSalseService.selectWmProductSalseBySalseId(salseId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增销售出库单
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:wm:productsalse:add')")
|
||||||
|
@Log(title = "销售出库单", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody WmProductSalse wmProductSalse)
|
||||||
|
{
|
||||||
|
return toAjax(wmProductSalseService.insertWmProductSalse(wmProductSalse));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改销售出库单
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:wm:productsalse:edit')")
|
||||||
|
@Log(title = "销售出库单", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody WmProductSalse wmProductSalse)
|
||||||
|
{
|
||||||
|
return toAjax(wmProductSalseService.updateWmProductSalse(wmProductSalse));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除销售出库单
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:wm:productsalse:remove')")
|
||||||
|
@Log(title = "销售出库单", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{salseIds}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] salseIds)
|
||||||
|
{
|
||||||
|
return toAjax(wmProductSalseService.deleteWmProductSalseBySalseIds(salseIds));
|
||||||
|
}
|
||||||
|
}
|
377
ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmProductSalse.java
Normal file
377
ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmProductSalse.java
Normal file
@ -0,0 +1,377 @@
|
|||||||
|
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_product_salse
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2022-10-04
|
||||||
|
*/
|
||||||
|
public class WmProductSalse extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 出库单ID */
|
||||||
|
private Long salseId;
|
||||||
|
|
||||||
|
/** 出库单编号 */
|
||||||
|
@Excel(name = "出库单编号")
|
||||||
|
private String salseCode;
|
||||||
|
|
||||||
|
/** 出库单名称 */
|
||||||
|
@Excel(name = "出库单名称")
|
||||||
|
private String salseName;
|
||||||
|
|
||||||
|
/** 出货检验单ID */
|
||||||
|
@Excel(name = "出货检验单ID")
|
||||||
|
private Long oqcId;
|
||||||
|
|
||||||
|
/** 出货检验单编号 */
|
||||||
|
@Excel(name = "出货检验单编号")
|
||||||
|
private String oqcCode;
|
||||||
|
|
||||||
|
/** 销售订单编号 */
|
||||||
|
@Excel(name = "销售订单编号")
|
||||||
|
private String soCode;
|
||||||
|
|
||||||
|
/** 客户ID */
|
||||||
|
@Excel(name = "客户ID")
|
||||||
|
private Long clientId;
|
||||||
|
|
||||||
|
/** 客户编码 */
|
||||||
|
@Excel(name = "客户编码")
|
||||||
|
private String clientCode;
|
||||||
|
|
||||||
|
/** 客户名称 */
|
||||||
|
@Excel(name = "客户名称")
|
||||||
|
private String clientName;
|
||||||
|
|
||||||
|
/** 客户简称 */
|
||||||
|
@Excel(name = "客户简称")
|
||||||
|
private String clientNick;
|
||||||
|
|
||||||
|
/** 仓库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;
|
||||||
|
|
||||||
|
/** 出库日期 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "出库日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date salseDate;
|
||||||
|
|
||||||
|
/** 单据状态 */
|
||||||
|
@Excel(name = "单据状态")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/** 预留字段1 */
|
||||||
|
private String attr1;
|
||||||
|
|
||||||
|
/** 预留字段2 */
|
||||||
|
private String attr2;
|
||||||
|
|
||||||
|
/** 预留字段3 */
|
||||||
|
private Long attr3;
|
||||||
|
|
||||||
|
/** 预留字段4 */
|
||||||
|
private Long attr4;
|
||||||
|
|
||||||
|
public void setSalseId(Long salseId)
|
||||||
|
{
|
||||||
|
this.salseId = salseId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getSalseId()
|
||||||
|
{
|
||||||
|
return salseId;
|
||||||
|
}
|
||||||
|
public void setSalseCode(String salseCode)
|
||||||
|
{
|
||||||
|
this.salseCode = salseCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSalseCode()
|
||||||
|
{
|
||||||
|
return salseCode;
|
||||||
|
}
|
||||||
|
public void setSalseName(String salseName)
|
||||||
|
{
|
||||||
|
this.salseName = salseName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSalseName()
|
||||||
|
{
|
||||||
|
return salseName;
|
||||||
|
}
|
||||||
|
public void setOqcId(Long oqcId)
|
||||||
|
{
|
||||||
|
this.oqcId = oqcId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getOqcId()
|
||||||
|
{
|
||||||
|
return oqcId;
|
||||||
|
}
|
||||||
|
public void setOqcCode(String oqcCode)
|
||||||
|
{
|
||||||
|
this.oqcCode = oqcCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOqcCode()
|
||||||
|
{
|
||||||
|
return oqcCode;
|
||||||
|
}
|
||||||
|
public void setSoCode(String soCode)
|
||||||
|
{
|
||||||
|
this.soCode = soCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSoCode()
|
||||||
|
{
|
||||||
|
return soCode;
|
||||||
|
}
|
||||||
|
public void setClientId(Long clientId)
|
||||||
|
{
|
||||||
|
this.clientId = clientId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getClientId()
|
||||||
|
{
|
||||||
|
return clientId;
|
||||||
|
}
|
||||||
|
public void setClientCode(String clientCode)
|
||||||
|
{
|
||||||
|
this.clientCode = clientCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClientCode()
|
||||||
|
{
|
||||||
|
return clientCode;
|
||||||
|
}
|
||||||
|
public void setClientName(String clientName)
|
||||||
|
{
|
||||||
|
this.clientName = clientName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClientName()
|
||||||
|
{
|
||||||
|
return clientName;
|
||||||
|
}
|
||||||
|
public void setClientNick(String clientNick)
|
||||||
|
{
|
||||||
|
this.clientNick = clientNick;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClientNick()
|
||||||
|
{
|
||||||
|
return clientNick;
|
||||||
|
}
|
||||||
|
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 setSalseDate(Date salseDate)
|
||||||
|
{
|
||||||
|
this.salseDate = salseDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getSalseDate()
|
||||||
|
{
|
||||||
|
return salseDate;
|
||||||
|
}
|
||||||
|
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("salseId", getSalseId())
|
||||||
|
.append("salseCode", getSalseCode())
|
||||||
|
.append("salseName", getSalseName())
|
||||||
|
.append("oqcId", getOqcId())
|
||||||
|
.append("oqcCode", getOqcCode())
|
||||||
|
.append("soCode", getSoCode())
|
||||||
|
.append("clientId", getClientId())
|
||||||
|
.append("clientCode", getClientCode())
|
||||||
|
.append("clientName", getClientName())
|
||||||
|
.append("clientNick", getClientNick())
|
||||||
|
.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("salseDate", getSalseDate())
|
||||||
|
.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,61 @@
|
|||||||
|
package com.ktg.mes.wm.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ktg.mes.wm.domain.WmProductSalse;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 销售出库单Mapper接口
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2022-10-04
|
||||||
|
*/
|
||||||
|
public interface WmProductSalseMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询销售出库单
|
||||||
|
*
|
||||||
|
* @param salseId 销售出库单主键
|
||||||
|
* @return 销售出库单
|
||||||
|
*/
|
||||||
|
public WmProductSalse selectWmProductSalseBySalseId(Long salseId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询销售出库单列表
|
||||||
|
*
|
||||||
|
* @param wmProductSalse 销售出库单
|
||||||
|
* @return 销售出库单集合
|
||||||
|
*/
|
||||||
|
public List<WmProductSalse> selectWmProductSalseList(WmProductSalse wmProductSalse);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增销售出库单
|
||||||
|
*
|
||||||
|
* @param wmProductSalse 销售出库单
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertWmProductSalse(WmProductSalse wmProductSalse);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改销售出库单
|
||||||
|
*
|
||||||
|
* @param wmProductSalse 销售出库单
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateWmProductSalse(WmProductSalse wmProductSalse);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除销售出库单
|
||||||
|
*
|
||||||
|
* @param salseId 销售出库单主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteWmProductSalseBySalseId(Long salseId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除销售出库单
|
||||||
|
*
|
||||||
|
* @param salseIds 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteWmProductSalseBySalseIds(Long[] salseIds);
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.ktg.mes.wm.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ktg.mes.wm.domain.WmProductSalse;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 销售出库单Service接口
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2022-10-04
|
||||||
|
*/
|
||||||
|
public interface IWmProductSalseService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询销售出库单
|
||||||
|
*
|
||||||
|
* @param salseId 销售出库单主键
|
||||||
|
* @return 销售出库单
|
||||||
|
*/
|
||||||
|
public WmProductSalse selectWmProductSalseBySalseId(Long salseId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询销售出库单列表
|
||||||
|
*
|
||||||
|
* @param wmProductSalse 销售出库单
|
||||||
|
* @return 销售出库单集合
|
||||||
|
*/
|
||||||
|
public List<WmProductSalse> selectWmProductSalseList(WmProductSalse wmProductSalse);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增销售出库单
|
||||||
|
*
|
||||||
|
* @param wmProductSalse 销售出库单
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertWmProductSalse(WmProductSalse wmProductSalse);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改销售出库单
|
||||||
|
*
|
||||||
|
* @param wmProductSalse 销售出库单
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateWmProductSalse(WmProductSalse wmProductSalse);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除销售出库单
|
||||||
|
*
|
||||||
|
* @param salseIds 需要删除的销售出库单主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteWmProductSalseBySalseIds(Long[] salseIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除销售出库单信息
|
||||||
|
*
|
||||||
|
* @param salseId 销售出库单主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteWmProductSalseBySalseId(Long salseId);
|
||||||
|
}
|
@ -0,0 +1,96 @@
|
|||||||
|
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.WmProductSalseMapper;
|
||||||
|
import com.ktg.mes.wm.domain.WmProductSalse;
|
||||||
|
import com.ktg.mes.wm.service.IWmProductSalseService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 销售出库单Service业务层处理
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2022-10-04
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class WmProductSalseServiceImpl implements IWmProductSalseService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private WmProductSalseMapper wmProductSalseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询销售出库单
|
||||||
|
*
|
||||||
|
* @param salseId 销售出库单主键
|
||||||
|
* @return 销售出库单
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public WmProductSalse selectWmProductSalseBySalseId(Long salseId)
|
||||||
|
{
|
||||||
|
return wmProductSalseMapper.selectWmProductSalseBySalseId(salseId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询销售出库单列表
|
||||||
|
*
|
||||||
|
* @param wmProductSalse 销售出库单
|
||||||
|
* @return 销售出库单
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<WmProductSalse> selectWmProductSalseList(WmProductSalse wmProductSalse)
|
||||||
|
{
|
||||||
|
return wmProductSalseMapper.selectWmProductSalseList(wmProductSalse);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增销售出库单
|
||||||
|
*
|
||||||
|
* @param wmProductSalse 销售出库单
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertWmProductSalse(WmProductSalse wmProductSalse)
|
||||||
|
{
|
||||||
|
wmProductSalse.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return wmProductSalseMapper.insertWmProductSalse(wmProductSalse);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改销售出库单
|
||||||
|
*
|
||||||
|
* @param wmProductSalse 销售出库单
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateWmProductSalse(WmProductSalse wmProductSalse)
|
||||||
|
{
|
||||||
|
wmProductSalse.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return wmProductSalseMapper.updateWmProductSalse(wmProductSalse);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除销售出库单
|
||||||
|
*
|
||||||
|
* @param salseIds 需要删除的销售出库单主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteWmProductSalseBySalseIds(Long[] salseIds)
|
||||||
|
{
|
||||||
|
return wmProductSalseMapper.deleteWmProductSalseBySalseIds(salseIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除销售出库单信息
|
||||||
|
*
|
||||||
|
* @param salseId 销售出库单主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteWmProductSalseBySalseId(Long salseId)
|
||||||
|
{
|
||||||
|
return wmProductSalseMapper.deleteWmProductSalseBySalseId(salseId);
|
||||||
|
}
|
||||||
|
}
|
187
ktg-mes/src/main/resources/mapper/wm/WmProductSalseMapper.xml
Normal file
187
ktg-mes/src/main/resources/mapper/wm/WmProductSalseMapper.xml
Normal file
@ -0,0 +1,187 @@
|
|||||||
|
<?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.WmProductSalseMapper">
|
||||||
|
|
||||||
|
<resultMap type="WmProductSalse" id="WmProductSalseResult">
|
||||||
|
<result property="salseId" column="salse_id" />
|
||||||
|
<result property="salseCode" column="salse_code" />
|
||||||
|
<result property="salseName" column="salse_name" />
|
||||||
|
<result property="oqcId" column="oqc_id" />
|
||||||
|
<result property="oqcCode" column="oqc_code" />
|
||||||
|
<result property="soCode" column="so_code" />
|
||||||
|
<result property="clientId" column="client_id" />
|
||||||
|
<result property="clientCode" column="client_code" />
|
||||||
|
<result property="clientName" column="client_name" />
|
||||||
|
<result property="clientNick" column="client_nick" />
|
||||||
|
<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="salseDate" column="salse_date" />
|
||||||
|
<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="selectWmProductSalseVo">
|
||||||
|
select salse_id, salse_code, salse_name, oqc_id, oqc_code, so_code, client_id, client_code, client_name, client_nick, warehouse_id, warehouse_code, warehouse_name, location_id, location_code, location_name, area_id, area_code, area_name, salse_date, status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_product_salse
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectWmProductSalseList" parameterType="WmProductSalse" resultMap="WmProductSalseResult">
|
||||||
|
<include refid="selectWmProductSalseVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="salseCode != null and salseCode != ''"> and salse_code = #{salseCode}</if>
|
||||||
|
<if test="salseName != null and salseName != ''"> and salse_name like concat('%', #{salseName}, '%')</if>
|
||||||
|
<if test="oqcId != null "> and oqc_id = #{oqcId}</if>
|
||||||
|
<if test="oqcCode != null and oqcCode != ''"> and oqc_code = #{oqcCode}</if>
|
||||||
|
<if test="soCode != null and soCode != ''"> and so_code = #{soCode}</if>
|
||||||
|
<if test="clientId != null "> and client_id = #{clientId}</if>
|
||||||
|
<if test="clientCode != null and clientCode != ''"> and client_code = #{clientCode}</if>
|
||||||
|
<if test="clientName != null and clientName != ''"> and client_name like concat('%', #{clientName}, '%')</if>
|
||||||
|
<if test="clientNick != null and clientNick != ''"> and client_nick = #{clientNick}</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="salseDate != null "> and salse_date = #{salseDate}</if>
|
||||||
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectWmProductSalseBySalseId" parameterType="Long" resultMap="WmProductSalseResult">
|
||||||
|
<include refid="selectWmProductSalseVo"/>
|
||||||
|
where salse_id = #{salseId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertWmProductSalse" parameterType="WmProductSalse" useGeneratedKeys="true" keyProperty="salseId">
|
||||||
|
insert into wm_product_salse
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="salseCode != null and salseCode != ''">salse_code,</if>
|
||||||
|
<if test="salseName != null and salseName != ''">salse_name,</if>
|
||||||
|
<if test="oqcId != null">oqc_id,</if>
|
||||||
|
<if test="oqcCode != null">oqc_code,</if>
|
||||||
|
<if test="soCode != null">so_code,</if>
|
||||||
|
<if test="clientId != null">client_id,</if>
|
||||||
|
<if test="clientCode != null">client_code,</if>
|
||||||
|
<if test="clientName != null">client_name,</if>
|
||||||
|
<if test="clientNick != null">client_nick,</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="salseDate != null">salse_date,</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="salseCode != null and salseCode != ''">#{salseCode},</if>
|
||||||
|
<if test="salseName != null and salseName != ''">#{salseName},</if>
|
||||||
|
<if test="oqcId != null">#{oqcId},</if>
|
||||||
|
<if test="oqcCode != null">#{oqcCode},</if>
|
||||||
|
<if test="soCode != null">#{soCode},</if>
|
||||||
|
<if test="clientId != null">#{clientId},</if>
|
||||||
|
<if test="clientCode != null">#{clientCode},</if>
|
||||||
|
<if test="clientName != null">#{clientName},</if>
|
||||||
|
<if test="clientNick != null">#{clientNick},</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="salseDate != null">#{salseDate},</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="updateWmProductSalse" parameterType="WmProductSalse">
|
||||||
|
update wm_product_salse
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="salseCode != null and salseCode != ''">salse_code = #{salseCode},</if>
|
||||||
|
<if test="salseName != null and salseName != ''">salse_name = #{salseName},</if>
|
||||||
|
<if test="oqcId != null">oqc_id = #{oqcId},</if>
|
||||||
|
<if test="oqcCode != null">oqc_code = #{oqcCode},</if>
|
||||||
|
<if test="soCode != null">so_code = #{soCode},</if>
|
||||||
|
<if test="clientId != null">client_id = #{clientId},</if>
|
||||||
|
<if test="clientCode != null">client_code = #{clientCode},</if>
|
||||||
|
<if test="clientName != null">client_name = #{clientName},</if>
|
||||||
|
<if test="clientNick != null">client_nick = #{clientNick},</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="salseDate != null">salse_date = #{salseDate},</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 salse_id = #{salseId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteWmProductSalseBySalseId" parameterType="Long">
|
||||||
|
delete from wm_product_salse where salse_id = #{salseId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteWmProductSalseBySalseIds" parameterType="String">
|
||||||
|
delete from wm_product_salse where salse_id in
|
||||||
|
<foreach item="salseId" collection="array" open="(" separator="," close=")">
|
||||||
|
#{salseId}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue
Block a user