change - add工厂信息、物料供应商信息
parent
34b414eeaf
commit
e98701d403
@ -0,0 +1,105 @@
|
|||||||
|
package com.hw.mes.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.io.IOException;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
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.hw.common.log.annotation.Log;
|
||||||
|
import com.hw.common.log.enums.BusinessType;
|
||||||
|
import com.hw.common.security.annotation.RequiresPermissions;
|
||||||
|
import com.hw.mes.domain.MesBaseProdlineInfo;
|
||||||
|
import com.hw.mes.service.IMesBaseProdlineInfoService;
|
||||||
|
import com.hw.common.core.web.controller.BaseController;
|
||||||
|
import com.hw.common.core.web.domain.AjaxResult;
|
||||||
|
import com.hw.common.core.utils.poi.ExcelUtil;
|
||||||
|
import com.hw.common.core.web.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产线信息Controller
|
||||||
|
*
|
||||||
|
* @author Yinq
|
||||||
|
* @date 2024-01-24
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/baseProdlineInfo")
|
||||||
|
public class MesBaseProdlineInfoController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IMesBaseProdlineInfoService mesBaseProdlineInfoService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询产线信息列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("mes:baseProdlineInfo:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(MesBaseProdlineInfo mesBaseProdlineInfo)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<MesBaseProdlineInfo> list = mesBaseProdlineInfoService.selectMesBaseProdlineInfoList(mesBaseProdlineInfo);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出产线信息列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("mes:baseProdlineInfo:export")
|
||||||
|
@Log(title = "产线信息", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, MesBaseProdlineInfo mesBaseProdlineInfo)
|
||||||
|
{
|
||||||
|
List<MesBaseProdlineInfo> list = mesBaseProdlineInfoService.selectMesBaseProdlineInfoList(mesBaseProdlineInfo);
|
||||||
|
ExcelUtil<MesBaseProdlineInfo> util = new ExcelUtil<MesBaseProdlineInfo>(MesBaseProdlineInfo.class);
|
||||||
|
util.exportExcel(response, list, "产线信息数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取产线信息详细信息
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("mes:baseProdlineInfo:query")
|
||||||
|
@GetMapping(value = "/{prodlineId}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("prodlineId") Long prodlineId)
|
||||||
|
{
|
||||||
|
return success(mesBaseProdlineInfoService.selectMesBaseProdlineInfoByProdlineId(prodlineId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增产线信息
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("mes:baseProdlineInfo:add")
|
||||||
|
@Log(title = "产线信息", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody MesBaseProdlineInfo mesBaseProdlineInfo)
|
||||||
|
{
|
||||||
|
return toAjax(mesBaseProdlineInfoService.insertMesBaseProdlineInfo(mesBaseProdlineInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改产线信息
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("mes:baseProdlineInfo:edit")
|
||||||
|
@Log(title = "产线信息", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody MesBaseProdlineInfo mesBaseProdlineInfo)
|
||||||
|
{
|
||||||
|
return toAjax(mesBaseProdlineInfoService.updateMesBaseProdlineInfo(mesBaseProdlineInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除产线信息
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("mes:baseProdlineInfo:remove")
|
||||||
|
@Log(title = "产线信息", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{prodlineIds}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] prodlineIds)
|
||||||
|
{
|
||||||
|
return toAjax(mesBaseProdlineInfoService.deleteMesBaseProdlineInfoByProdlineIds(prodlineIds));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,105 @@
|
|||||||
|
package com.hw.mes.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.io.IOException;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
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.hw.common.log.annotation.Log;
|
||||||
|
import com.hw.common.log.enums.BusinessType;
|
||||||
|
import com.hw.common.security.annotation.RequiresPermissions;
|
||||||
|
import com.hw.mes.domain.MesBaseSupplierInfo;
|
||||||
|
import com.hw.mes.service.IMesBaseSupplierInfoService;
|
||||||
|
import com.hw.common.core.web.controller.BaseController;
|
||||||
|
import com.hw.common.core.web.domain.AjaxResult;
|
||||||
|
import com.hw.common.core.utils.poi.ExcelUtil;
|
||||||
|
import com.hw.common.core.web.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物料供应商信息Controller
|
||||||
|
*
|
||||||
|
* @author Yinq
|
||||||
|
* @date 2024-01-24
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/supplierInfo")
|
||||||
|
public class MesBaseSupplierInfoController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IMesBaseSupplierInfoService mesBaseSupplierInfoService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询物料供应商信息列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("mes:supplierInfo:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(MesBaseSupplierInfo mesBaseSupplierInfo)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<MesBaseSupplierInfo> list = mesBaseSupplierInfoService.selectMesBaseSupplierInfoList(mesBaseSupplierInfo);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出物料供应商信息列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("mes:supplierInfo:export")
|
||||||
|
@Log(title = "物料供应商信息", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, MesBaseSupplierInfo mesBaseSupplierInfo)
|
||||||
|
{
|
||||||
|
List<MesBaseSupplierInfo> list = mesBaseSupplierInfoService.selectMesBaseSupplierInfoList(mesBaseSupplierInfo);
|
||||||
|
ExcelUtil<MesBaseSupplierInfo> util = new ExcelUtil<MesBaseSupplierInfo>(MesBaseSupplierInfo.class);
|
||||||
|
util.exportExcel(response, list, "物料供应商信息数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取物料供应商信息详细信息
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("mes:supplierInfo:query")
|
||||||
|
@GetMapping(value = "/{supplierId}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("supplierId") Long supplierId)
|
||||||
|
{
|
||||||
|
return success(mesBaseSupplierInfoService.selectMesBaseSupplierInfoBySupplierId(supplierId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增物料供应商信息
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("mes:supplierInfo:add")
|
||||||
|
@Log(title = "物料供应商信息", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody MesBaseSupplierInfo mesBaseSupplierInfo)
|
||||||
|
{
|
||||||
|
return toAjax(mesBaseSupplierInfoService.insertMesBaseSupplierInfo(mesBaseSupplierInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改物料供应商信息
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("mes:supplierInfo:edit")
|
||||||
|
@Log(title = "物料供应商信息", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody MesBaseSupplierInfo mesBaseSupplierInfo)
|
||||||
|
{
|
||||||
|
return toAjax(mesBaseSupplierInfoService.updateMesBaseSupplierInfo(mesBaseSupplierInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除物料供应商信息
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("mes:supplierInfo:remove")
|
||||||
|
@Log(title = "物料供应商信息", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{supplierIds}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] supplierIds)
|
||||||
|
{
|
||||||
|
return toAjax(mesBaseSupplierInfoService.deleteMesBaseSupplierInfoBySupplierIds(supplierIds));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,124 @@
|
|||||||
|
package com.hw.mes.domain;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.hw.common.core.annotation.Excel;
|
||||||
|
import com.hw.common.core.web.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产线信息对象 mes_base_prodline_info
|
||||||
|
*
|
||||||
|
* @author Yinq
|
||||||
|
* @date 2024-01-24
|
||||||
|
*/
|
||||||
|
public class MesBaseProdlineInfo extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 主键标识 */
|
||||||
|
private Long prodlineId;
|
||||||
|
|
||||||
|
/** 产线编号 */
|
||||||
|
@Excel(name = "产线编号")
|
||||||
|
private String prodlineCode;
|
||||||
|
|
||||||
|
/** 产线名称 */
|
||||||
|
@Excel(name = "产线名称")
|
||||||
|
private String prodlineName;
|
||||||
|
|
||||||
|
/** 产线类型 */
|
||||||
|
@Excel(name = "产线类型")
|
||||||
|
private String prodlineType;
|
||||||
|
|
||||||
|
/** 所属工厂ID */
|
||||||
|
@Excel(name = "所属工厂ID")
|
||||||
|
private Long factoryId;
|
||||||
|
|
||||||
|
/** 所属工厂名称 */
|
||||||
|
@Excel(name = "所属工厂名称")
|
||||||
|
private String factoryName;
|
||||||
|
|
||||||
|
/** 是否标识 */
|
||||||
|
@Excel(name = "是否标识")
|
||||||
|
private String isFlag;
|
||||||
|
|
||||||
|
public String getFactoryName() {
|
||||||
|
return factoryName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFactoryName(String factoryName) {
|
||||||
|
this.factoryName = factoryName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProdlineId(Long prodlineId)
|
||||||
|
{
|
||||||
|
this.prodlineId = prodlineId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getProdlineId()
|
||||||
|
{
|
||||||
|
return prodlineId;
|
||||||
|
}
|
||||||
|
public void setProdlineCode(String prodlineCode)
|
||||||
|
{
|
||||||
|
this.prodlineCode = prodlineCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProdlineCode()
|
||||||
|
{
|
||||||
|
return prodlineCode;
|
||||||
|
}
|
||||||
|
public void setProdlineName(String prodlineName)
|
||||||
|
{
|
||||||
|
this.prodlineName = prodlineName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProdlineName()
|
||||||
|
{
|
||||||
|
return prodlineName;
|
||||||
|
}
|
||||||
|
public void setProdlineType(String prodlineType)
|
||||||
|
{
|
||||||
|
this.prodlineType = prodlineType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProdlineType()
|
||||||
|
{
|
||||||
|
return prodlineType;
|
||||||
|
}
|
||||||
|
public void setFactoryId(Long factoryId)
|
||||||
|
{
|
||||||
|
this.factoryId = factoryId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getFactoryId()
|
||||||
|
{
|
||||||
|
return factoryId;
|
||||||
|
}
|
||||||
|
public void setIsFlag(String isFlag)
|
||||||
|
{
|
||||||
|
this.isFlag = isFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIsFlag()
|
||||||
|
{
|
||||||
|
return isFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("prodlineId", getProdlineId())
|
||||||
|
.append("prodlineCode", getProdlineCode())
|
||||||
|
.append("prodlineName", getProdlineName())
|
||||||
|
.append("prodlineType", getProdlineType())
|
||||||
|
.append("factoryId", getFactoryId())
|
||||||
|
.append("isFlag", getIsFlag())
|
||||||
|
.append("remark", getRemark())
|
||||||
|
.append("createBy", getCreateBy())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("updateBy", getUpdateBy())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,115 @@
|
|||||||
|
package com.hw.mes.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.hw.common.core.annotation.Excel;
|
||||||
|
import com.hw.common.core.web.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物料供应商信息对象 mes_base_supplier_info
|
||||||
|
*
|
||||||
|
* @author Yinq
|
||||||
|
* @date 2024-01-24
|
||||||
|
*/
|
||||||
|
public class MesBaseSupplierInfo extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 主键标识 */
|
||||||
|
private Long supplierId;
|
||||||
|
|
||||||
|
/** 供应商编号 */
|
||||||
|
@Excel(name = "供应商编号")
|
||||||
|
private String supplierCode;
|
||||||
|
|
||||||
|
/** 供应商名称 */
|
||||||
|
@Excel(name = "供应商名称")
|
||||||
|
private String supplierName;
|
||||||
|
|
||||||
|
/** erp主键 */
|
||||||
|
@Excel(name = "erp主键")
|
||||||
|
private Long erpId;
|
||||||
|
|
||||||
|
/** 供应商状态 */
|
||||||
|
@Excel(name = "供应商状态")
|
||||||
|
private String supplierStatus;
|
||||||
|
|
||||||
|
/** 审核日期 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "审核日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date auditDate;
|
||||||
|
|
||||||
|
public void setSupplierId(Long supplierId)
|
||||||
|
{
|
||||||
|
this.supplierId = supplierId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getSupplierId()
|
||||||
|
{
|
||||||
|
return supplierId;
|
||||||
|
}
|
||||||
|
public void setSupplierCode(String supplierCode)
|
||||||
|
{
|
||||||
|
this.supplierCode = supplierCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSupplierCode()
|
||||||
|
{
|
||||||
|
return supplierCode;
|
||||||
|
}
|
||||||
|
public void setSupplierName(String supplierName)
|
||||||
|
{
|
||||||
|
this.supplierName = supplierName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSupplierName()
|
||||||
|
{
|
||||||
|
return supplierName;
|
||||||
|
}
|
||||||
|
public void setErpId(Long erpId)
|
||||||
|
{
|
||||||
|
this.erpId = erpId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getErpId()
|
||||||
|
{
|
||||||
|
return erpId;
|
||||||
|
}
|
||||||
|
public void setSupplierStatus(String supplierStatus)
|
||||||
|
{
|
||||||
|
this.supplierStatus = supplierStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSupplierStatus()
|
||||||
|
{
|
||||||
|
return supplierStatus;
|
||||||
|
}
|
||||||
|
public void setAuditDate(Date auditDate)
|
||||||
|
{
|
||||||
|
this.auditDate = auditDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getAuditDate()
|
||||||
|
{
|
||||||
|
return auditDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("supplierId", getSupplierId())
|
||||||
|
.append("supplierCode", getSupplierCode())
|
||||||
|
.append("supplierName", getSupplierName())
|
||||||
|
.append("erpId", getErpId())
|
||||||
|
.append("supplierStatus", getSupplierStatus())
|
||||||
|
.append("remark", getRemark())
|
||||||
|
.append("createBy", getCreateBy())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("updateBy", getUpdateBy())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.append("auditDate", getAuditDate())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,61 @@
|
|||||||
|
package com.hw.mes.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.hw.mes.domain.MesBaseProdlineInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产线信息Mapper接口
|
||||||
|
*
|
||||||
|
* @author Yinq
|
||||||
|
* @date 2024-01-24
|
||||||
|
*/
|
||||||
|
public interface MesBaseProdlineInfoMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询产线信息
|
||||||
|
*
|
||||||
|
* @param prodlineId 产线信息主键
|
||||||
|
* @return 产线信息
|
||||||
|
*/
|
||||||
|
public MesBaseProdlineInfo selectMesBaseProdlineInfoByProdlineId(Long prodlineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询产线信息列表
|
||||||
|
*
|
||||||
|
* @param mesBaseProdlineInfo 产线信息
|
||||||
|
* @return 产线信息集合
|
||||||
|
*/
|
||||||
|
public List<MesBaseProdlineInfo> selectMesBaseProdlineInfoList(MesBaseProdlineInfo mesBaseProdlineInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增产线信息
|
||||||
|
*
|
||||||
|
* @param mesBaseProdlineInfo 产线信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertMesBaseProdlineInfo(MesBaseProdlineInfo mesBaseProdlineInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改产线信息
|
||||||
|
*
|
||||||
|
* @param mesBaseProdlineInfo 产线信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateMesBaseProdlineInfo(MesBaseProdlineInfo mesBaseProdlineInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除产线信息
|
||||||
|
*
|
||||||
|
* @param prodlineId 产线信息主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteMesBaseProdlineInfoByProdlineId(Long prodlineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除产线信息
|
||||||
|
*
|
||||||
|
* @param prodlineIds 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteMesBaseProdlineInfoByProdlineIds(Long[] prodlineIds);
|
||||||
|
}
|
||||||
@ -0,0 +1,61 @@
|
|||||||
|
package com.hw.mes.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.hw.mes.domain.MesBaseSupplierInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物料供应商信息Mapper接口
|
||||||
|
*
|
||||||
|
* @author Yinq
|
||||||
|
* @date 2024-01-24
|
||||||
|
*/
|
||||||
|
public interface MesBaseSupplierInfoMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询物料供应商信息
|
||||||
|
*
|
||||||
|
* @param supplierId 物料供应商信息主键
|
||||||
|
* @return 物料供应商信息
|
||||||
|
*/
|
||||||
|
public MesBaseSupplierInfo selectMesBaseSupplierInfoBySupplierId(Long supplierId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询物料供应商信息列表
|
||||||
|
*
|
||||||
|
* @param mesBaseSupplierInfo 物料供应商信息
|
||||||
|
* @return 物料供应商信息集合
|
||||||
|
*/
|
||||||
|
public List<MesBaseSupplierInfo> selectMesBaseSupplierInfoList(MesBaseSupplierInfo mesBaseSupplierInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增物料供应商信息
|
||||||
|
*
|
||||||
|
* @param mesBaseSupplierInfo 物料供应商信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertMesBaseSupplierInfo(MesBaseSupplierInfo mesBaseSupplierInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改物料供应商信息
|
||||||
|
*
|
||||||
|
* @param mesBaseSupplierInfo 物料供应商信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateMesBaseSupplierInfo(MesBaseSupplierInfo mesBaseSupplierInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除物料供应商信息
|
||||||
|
*
|
||||||
|
* @param supplierId 物料供应商信息主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteMesBaseSupplierInfoBySupplierId(Long supplierId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除物料供应商信息
|
||||||
|
*
|
||||||
|
* @param supplierIds 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteMesBaseSupplierInfoBySupplierIds(Long[] supplierIds);
|
||||||
|
}
|
||||||
@ -0,0 +1,61 @@
|
|||||||
|
package com.hw.mes.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.hw.mes.domain.MesBaseProdlineInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产线信息Service接口
|
||||||
|
*
|
||||||
|
* @author Yinq
|
||||||
|
* @date 2024-01-24
|
||||||
|
*/
|
||||||
|
public interface IMesBaseProdlineInfoService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询产线信息
|
||||||
|
*
|
||||||
|
* @param prodlineId 产线信息主键
|
||||||
|
* @return 产线信息
|
||||||
|
*/
|
||||||
|
public MesBaseProdlineInfo selectMesBaseProdlineInfoByProdlineId(Long prodlineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询产线信息列表
|
||||||
|
*
|
||||||
|
* @param mesBaseProdlineInfo 产线信息
|
||||||
|
* @return 产线信息集合
|
||||||
|
*/
|
||||||
|
public List<MesBaseProdlineInfo> selectMesBaseProdlineInfoList(MesBaseProdlineInfo mesBaseProdlineInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增产线信息
|
||||||
|
*
|
||||||
|
* @param mesBaseProdlineInfo 产线信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertMesBaseProdlineInfo(MesBaseProdlineInfo mesBaseProdlineInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改产线信息
|
||||||
|
*
|
||||||
|
* @param mesBaseProdlineInfo 产线信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateMesBaseProdlineInfo(MesBaseProdlineInfo mesBaseProdlineInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除产线信息
|
||||||
|
*
|
||||||
|
* @param prodlineIds 需要删除的产线信息主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteMesBaseProdlineInfoByProdlineIds(Long[] prodlineIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除产线信息信息
|
||||||
|
*
|
||||||
|
* @param prodlineId 产线信息主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteMesBaseProdlineInfoByProdlineId(Long prodlineId);
|
||||||
|
}
|
||||||
@ -0,0 +1,61 @@
|
|||||||
|
package com.hw.mes.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.hw.mes.domain.MesBaseSupplierInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物料供应商信息Service接口
|
||||||
|
*
|
||||||
|
* @author Yinq
|
||||||
|
* @date 2024-01-24
|
||||||
|
*/
|
||||||
|
public interface IMesBaseSupplierInfoService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询物料供应商信息
|
||||||
|
*
|
||||||
|
* @param supplierId 物料供应商信息主键
|
||||||
|
* @return 物料供应商信息
|
||||||
|
*/
|
||||||
|
public MesBaseSupplierInfo selectMesBaseSupplierInfoBySupplierId(Long supplierId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询物料供应商信息列表
|
||||||
|
*
|
||||||
|
* @param mesBaseSupplierInfo 物料供应商信息
|
||||||
|
* @return 物料供应商信息集合
|
||||||
|
*/
|
||||||
|
public List<MesBaseSupplierInfo> selectMesBaseSupplierInfoList(MesBaseSupplierInfo mesBaseSupplierInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增物料供应商信息
|
||||||
|
*
|
||||||
|
* @param mesBaseSupplierInfo 物料供应商信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertMesBaseSupplierInfo(MesBaseSupplierInfo mesBaseSupplierInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改物料供应商信息
|
||||||
|
*
|
||||||
|
* @param mesBaseSupplierInfo 物料供应商信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateMesBaseSupplierInfo(MesBaseSupplierInfo mesBaseSupplierInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除物料供应商信息
|
||||||
|
*
|
||||||
|
* @param supplierIds 需要删除的物料供应商信息主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteMesBaseSupplierInfoBySupplierIds(Long[] supplierIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除物料供应商信息信息
|
||||||
|
*
|
||||||
|
* @param supplierId 物料供应商信息主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteMesBaseSupplierInfoBySupplierId(Long supplierId);
|
||||||
|
}
|
||||||
@ -0,0 +1,96 @@
|
|||||||
|
package com.hw.mes.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.hw.common.core.utils.DateUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.hw.mes.mapper.MesBaseProdlineInfoMapper;
|
||||||
|
import com.hw.mes.domain.MesBaseProdlineInfo;
|
||||||
|
import com.hw.mes.service.IMesBaseProdlineInfoService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产线信息Service业务层处理
|
||||||
|
*
|
||||||
|
* @author Yinq
|
||||||
|
* @date 2024-01-24
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class MesBaseProdlineInfoServiceImpl implements IMesBaseProdlineInfoService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private MesBaseProdlineInfoMapper mesBaseProdlineInfoMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询产线信息
|
||||||
|
*
|
||||||
|
* @param prodlineId 产线信息主键
|
||||||
|
* @return 产线信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public MesBaseProdlineInfo selectMesBaseProdlineInfoByProdlineId(Long prodlineId)
|
||||||
|
{
|
||||||
|
return mesBaseProdlineInfoMapper.selectMesBaseProdlineInfoByProdlineId(prodlineId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询产线信息列表
|
||||||
|
*
|
||||||
|
* @param mesBaseProdlineInfo 产线信息
|
||||||
|
* @return 产线信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<MesBaseProdlineInfo> selectMesBaseProdlineInfoList(MesBaseProdlineInfo mesBaseProdlineInfo)
|
||||||
|
{
|
||||||
|
return mesBaseProdlineInfoMapper.selectMesBaseProdlineInfoList(mesBaseProdlineInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增产线信息
|
||||||
|
*
|
||||||
|
* @param mesBaseProdlineInfo 产线信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertMesBaseProdlineInfo(MesBaseProdlineInfo mesBaseProdlineInfo)
|
||||||
|
{
|
||||||
|
mesBaseProdlineInfo.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return mesBaseProdlineInfoMapper.insertMesBaseProdlineInfo(mesBaseProdlineInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改产线信息
|
||||||
|
*
|
||||||
|
* @param mesBaseProdlineInfo 产线信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateMesBaseProdlineInfo(MesBaseProdlineInfo mesBaseProdlineInfo)
|
||||||
|
{
|
||||||
|
mesBaseProdlineInfo.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return mesBaseProdlineInfoMapper.updateMesBaseProdlineInfo(mesBaseProdlineInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除产线信息
|
||||||
|
*
|
||||||
|
* @param prodlineIds 需要删除的产线信息主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteMesBaseProdlineInfoByProdlineIds(Long[] prodlineIds)
|
||||||
|
{
|
||||||
|
return mesBaseProdlineInfoMapper.deleteMesBaseProdlineInfoByProdlineIds(prodlineIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除产线信息信息
|
||||||
|
*
|
||||||
|
* @param prodlineId 产线信息主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteMesBaseProdlineInfoByProdlineId(Long prodlineId)
|
||||||
|
{
|
||||||
|
return mesBaseProdlineInfoMapper.deleteMesBaseProdlineInfoByProdlineId(prodlineId);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,96 @@
|
|||||||
|
package com.hw.mes.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.hw.common.core.utils.DateUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.hw.mes.mapper.MesBaseSupplierInfoMapper;
|
||||||
|
import com.hw.mes.domain.MesBaseSupplierInfo;
|
||||||
|
import com.hw.mes.service.IMesBaseSupplierInfoService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物料供应商信息Service业务层处理
|
||||||
|
*
|
||||||
|
* @author Yinq
|
||||||
|
* @date 2024-01-24
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class MesBaseSupplierInfoServiceImpl implements IMesBaseSupplierInfoService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private MesBaseSupplierInfoMapper mesBaseSupplierInfoMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询物料供应商信息
|
||||||
|
*
|
||||||
|
* @param supplierId 物料供应商信息主键
|
||||||
|
* @return 物料供应商信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public MesBaseSupplierInfo selectMesBaseSupplierInfoBySupplierId(Long supplierId)
|
||||||
|
{
|
||||||
|
return mesBaseSupplierInfoMapper.selectMesBaseSupplierInfoBySupplierId(supplierId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询物料供应商信息列表
|
||||||
|
*
|
||||||
|
* @param mesBaseSupplierInfo 物料供应商信息
|
||||||
|
* @return 物料供应商信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<MesBaseSupplierInfo> selectMesBaseSupplierInfoList(MesBaseSupplierInfo mesBaseSupplierInfo)
|
||||||
|
{
|
||||||
|
return mesBaseSupplierInfoMapper.selectMesBaseSupplierInfoList(mesBaseSupplierInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增物料供应商信息
|
||||||
|
*
|
||||||
|
* @param mesBaseSupplierInfo 物料供应商信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertMesBaseSupplierInfo(MesBaseSupplierInfo mesBaseSupplierInfo)
|
||||||
|
{
|
||||||
|
mesBaseSupplierInfo.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return mesBaseSupplierInfoMapper.insertMesBaseSupplierInfo(mesBaseSupplierInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改物料供应商信息
|
||||||
|
*
|
||||||
|
* @param mesBaseSupplierInfo 物料供应商信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateMesBaseSupplierInfo(MesBaseSupplierInfo mesBaseSupplierInfo)
|
||||||
|
{
|
||||||
|
mesBaseSupplierInfo.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return mesBaseSupplierInfoMapper.updateMesBaseSupplierInfo(mesBaseSupplierInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除物料供应商信息
|
||||||
|
*
|
||||||
|
* @param supplierIds 需要删除的物料供应商信息主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteMesBaseSupplierInfoBySupplierIds(Long[] supplierIds)
|
||||||
|
{
|
||||||
|
return mesBaseSupplierInfoMapper.deleteMesBaseSupplierInfoBySupplierIds(supplierIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除物料供应商信息信息
|
||||||
|
*
|
||||||
|
* @param supplierId 物料供应商信息主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteMesBaseSupplierInfoBySupplierId(Long supplierId)
|
||||||
|
{
|
||||||
|
return mesBaseSupplierInfoMapper.deleteMesBaseSupplierInfoBySupplierId(supplierId);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,116 @@
|
|||||||
|
<?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.hw.mes.mapper.MesBaseProdlineInfoMapper">
|
||||||
|
|
||||||
|
<resultMap type="MesBaseProdlineInfo" id="MesBaseProdlineInfoResult">
|
||||||
|
<result property="prodlineId" column="prodline_id"/>
|
||||||
|
<result property="prodlineCode" column="prodline_code"/>
|
||||||
|
<result property="prodlineName" column="prodline_name"/>
|
||||||
|
<result property="prodlineType" column="prodline_type"/>
|
||||||
|
<result property="factoryId" column="factory_id"/>
|
||||||
|
<result property="isFlag" column="is_flag"/>
|
||||||
|
<result property="remark" column="remark"/>
|
||||||
|
<result property="createBy" column="create_by"/>
|
||||||
|
<result property="createTime" column="create_time"/>
|
||||||
|
<result property="updateBy" column="update_by"/>
|
||||||
|
<result property="updateTime" column="update_time"/>
|
||||||
|
<result property="factoryName" column="factory_name"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectMesBaseProdlineInfoVo">
|
||||||
|
select mbpi.prodline_id,
|
||||||
|
mbpi.prodline_code,
|
||||||
|
mbpi.prodline_name,
|
||||||
|
mbpi.prodline_type,
|
||||||
|
mbpi.factory_id,
|
||||||
|
mbfi.factory_name,
|
||||||
|
mbpi.is_flag,
|
||||||
|
mbpi.remark,
|
||||||
|
mbpi.create_by,
|
||||||
|
mbpi.create_time,
|
||||||
|
mbpi.update_by,
|
||||||
|
mbpi.update_time
|
||||||
|
from mes_base_prodline_info mbpi
|
||||||
|
left join mes_base_factory_info mbfi on mbfi.factory_id = mbpi.factory_id
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectMesBaseProdlineInfoList" parameterType="MesBaseProdlineInfo"
|
||||||
|
resultMap="MesBaseProdlineInfoResult">
|
||||||
|
<include refid="selectMesBaseProdlineInfoVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="prodlineCode != null and prodlineCode != ''">and mbpi.prodline_code = #{prodlineCode}</if>
|
||||||
|
<if test="prodlineName != null and prodlineName != ''">and mbpi.prodline_name like concat('%', #{prodlineName},
|
||||||
|
'%')
|
||||||
|
</if>
|
||||||
|
<if test="prodlineType != null and prodlineType != ''">and mbpi.prodline_type = #{prodlineType}</if>
|
||||||
|
<if test="factoryId != null and factoryId != ''">and mbpi.factory_id = #{factoryId}</if>
|
||||||
|
<if test="isFlag != null and isFlag != ''">and mbpi.is_flag = #{isFlag}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectMesBaseProdlineInfoByProdlineId" parameterType="Long" resultMap="MesBaseProdlineInfoResult">
|
||||||
|
<include refid="selectMesBaseProdlineInfoVo"/>
|
||||||
|
where mbpi.prodline_id = #{prodlineId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertMesBaseProdlineInfo" parameterType="MesBaseProdlineInfo" useGeneratedKeys="true"
|
||||||
|
keyProperty="prodlineId">
|
||||||
|
insert into mes_base_prodline_info
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="prodlineCode != null and prodlineCode != ''">prodline_code,</if>
|
||||||
|
<if test="prodlineName != null and prodlineName != ''">prodline_name,</if>
|
||||||
|
<if test="prodlineType != null">prodline_type,</if>
|
||||||
|
<if test="factoryId != null">factory_id,</if>
|
||||||
|
<if test="isFlag != null and isFlag != ''">is_flag,</if>
|
||||||
|
<if test="remark != null">remark,</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="prodlineCode != null and prodlineCode != ''">#{prodlineCode},</if>
|
||||||
|
<if test="prodlineName != null and prodlineName != ''">#{prodlineName},</if>
|
||||||
|
<if test="prodlineType != null">#{prodlineType},</if>
|
||||||
|
<if test="factoryId != null">#{factoryId},</if>
|
||||||
|
<if test="isFlag != null and isFlag != ''">#{isFlag},</if>
|
||||||
|
<if test="remark != null">#{remark},</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="updateMesBaseProdlineInfo" parameterType="MesBaseProdlineInfo">
|
||||||
|
update mes_base_prodline_info
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="prodlineCode != null and prodlineCode != ''">prodline_code = #{prodlineCode},</if>
|
||||||
|
<if test="prodlineName != null and prodlineName != ''">prodline_name = #{prodlineName},</if>
|
||||||
|
<if test="prodlineType != null">prodline_type = #{prodlineType},</if>
|
||||||
|
<if test="factoryId != null">factory_id = #{factoryId},</if>
|
||||||
|
<if test="isFlag != null and isFlag != ''">is_flag = #{isFlag},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</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 prodline_id = #{prodlineId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteMesBaseProdlineInfoByProdlineId" parameterType="Long">
|
||||||
|
delete
|
||||||
|
from mes_base_prodline_info
|
||||||
|
where prodline_id = #{prodlineId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteMesBaseProdlineInfoByProdlineIds" parameterType="String">
|
||||||
|
delete from mes_base_prodline_info where prodline_id in
|
||||||
|
<foreach item="prodlineId" collection="array" open="(" separator="," close=")">
|
||||||
|
#{prodlineId}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
||||||
@ -0,0 +1,96 @@
|
|||||||
|
<?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.hw.mes.mapper.MesBaseSupplierInfoMapper">
|
||||||
|
|
||||||
|
<resultMap type="MesBaseSupplierInfo" id="MesBaseSupplierInfoResult">
|
||||||
|
<result property="supplierId" column="supplier_id" />
|
||||||
|
<result property="supplierCode" column="supplier_code" />
|
||||||
|
<result property="supplierName" column="supplier_name" />
|
||||||
|
<result property="erpId" column="erp_id" />
|
||||||
|
<result property="supplierStatus" column="supplier_status" />
|
||||||
|
<result property="remark" column="remark" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="auditDate" column="audit_date" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectMesBaseSupplierInfoVo">
|
||||||
|
select supplier_id, supplier_code, supplier_name, erp_id, supplier_status, remark, create_by, create_time, update_by, update_time, audit_date from mes_base_supplier_info
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectMesBaseSupplierInfoList" parameterType="MesBaseSupplierInfo" resultMap="MesBaseSupplierInfoResult">
|
||||||
|
<include refid="selectMesBaseSupplierInfoVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="supplierCode != null and supplierCode != ''"> and supplier_code = #{supplierCode}</if>
|
||||||
|
<if test="supplierName != null and supplierName != ''"> and supplier_name like concat('%', #{supplierName}, '%')</if>
|
||||||
|
<if test="erpId != null "> and erp_id = #{erpId}</if>
|
||||||
|
<if test="supplierStatus != null and supplierStatus != ''"> and supplier_status = #{supplierStatus}</if>
|
||||||
|
<if test="params.beginAuditDate != null and params.beginAuditDate != '' and params.endAuditDate != null and params.endAuditDate != ''"> and audit_date between #{params.beginAuditDate} and #{params.endAuditDate}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectMesBaseSupplierInfoBySupplierId" parameterType="Long" resultMap="MesBaseSupplierInfoResult">
|
||||||
|
<include refid="selectMesBaseSupplierInfoVo"/>
|
||||||
|
where supplier_id = #{supplierId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertMesBaseSupplierInfo" parameterType="MesBaseSupplierInfo" useGeneratedKeys="true" keyProperty="supplierId">
|
||||||
|
insert into mes_base_supplier_info
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="supplierCode != null">supplier_code,</if>
|
||||||
|
<if test="supplierName != null and supplierName != ''">supplier_name,</if>
|
||||||
|
<if test="erpId != null">erp_id,</if>
|
||||||
|
<if test="supplierStatus != null and supplierStatus != ''">supplier_status,</if>
|
||||||
|
<if test="remark != null">remark,</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>
|
||||||
|
<if test="auditDate != null">audit_date,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="supplierCode != null">#{supplierCode},</if>
|
||||||
|
<if test="supplierName != null and supplierName != ''">#{supplierName},</if>
|
||||||
|
<if test="erpId != null">#{erpId},</if>
|
||||||
|
<if test="supplierStatus != null and supplierStatus != ''">#{supplierStatus},</if>
|
||||||
|
<if test="remark != null">#{remark},</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>
|
||||||
|
<if test="auditDate != null">#{auditDate},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateMesBaseSupplierInfo" parameterType="MesBaseSupplierInfo">
|
||||||
|
update mes_base_supplier_info
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="supplierCode != null">supplier_code = #{supplierCode},</if>
|
||||||
|
<if test="supplierName != null and supplierName != ''">supplier_name = #{supplierName},</if>
|
||||||
|
<if test="erpId != null">erp_id = #{erpId},</if>
|
||||||
|
<if test="supplierStatus != null and supplierStatus != ''">supplier_status = #{supplierStatus},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</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>
|
||||||
|
<if test="auditDate != null">audit_date = #{auditDate},</if>
|
||||||
|
</trim>
|
||||||
|
where supplier_id = #{supplierId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteMesBaseSupplierInfoBySupplierId" parameterType="Long">
|
||||||
|
delete from mes_base_supplier_info where supplier_id = #{supplierId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteMesBaseSupplierInfoBySupplierIds" parameterType="String">
|
||||||
|
delete from mes_base_supplier_info where supplier_id in
|
||||||
|
<foreach item="supplierId" collection="array" open="(" separator="," close=")">
|
||||||
|
#{supplierId}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
||||||
@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询产线信息列表
|
||||||
|
export function listBaseProdlineInfo(query) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/baseProdlineInfo/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询产线信息详细
|
||||||
|
export function getBaseProdlineInfo(prodlineId) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/baseProdlineInfo/' + prodlineId,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增产线信息
|
||||||
|
export function addBaseProdlineInfo(data) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/baseProdlineInfo',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改产线信息
|
||||||
|
export function updateBaseProdlineInfo(data) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/baseProdlineInfo',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除产线信息
|
||||||
|
export function delBaseProdlineInfo(prodlineId) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/baseProdlineInfo/' + prodlineId,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询物料供应商信息列表
|
||||||
|
export function listSupplierInfo(query) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/supplierInfo/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询物料供应商信息详细
|
||||||
|
export function getSupplierInfo(supplierId) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/supplierInfo/' + supplierId,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增物料供应商信息
|
||||||
|
export function addSupplierInfo(data) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/supplierInfo',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改物料供应商信息
|
||||||
|
export function updateSupplierInfo(data) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/supplierInfo',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除物料供应商信息
|
||||||
|
export function delSupplierInfo(supplierId) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/supplierInfo/' + supplierId,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
@ -0,0 +1,377 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
|
<!-- <el-form-item label="产线编号" prop="prodlineCode">-->
|
||||||
|
<!-- <el-input-->
|
||||||
|
<!-- v-model="queryParams.prodlineCode"-->
|
||||||
|
<!-- placeholder="请输入产线编号"-->
|
||||||
|
<!-- clearable-->
|
||||||
|
<!-- @keyup.enter.native="handleQuery"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<el-form-item label="所属工厂" prop="factoryId">
|
||||||
|
<el-select v-model="queryParams.factoryId" placeholder="请选择所属工厂" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in factoryList"
|
||||||
|
:key="item.factoryId"
|
||||||
|
:label="item.factoryName"
|
||||||
|
:value="item.factoryId"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="产线名称" prop="prodlineName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.prodlineName"
|
||||||
|
placeholder="请输入产线名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="产线类型" prop="prodlineType">-->
|
||||||
|
<!-- <el-select v-model="queryParams.prodlineType" placeholder="请选择产线类型" clearable>-->
|
||||||
|
<!-- <el-option-->
|
||||||
|
<!-- v-for="dict in dict.type.prodline_type"-->
|
||||||
|
<!-- :key="dict.value"-->
|
||||||
|
<!-- :label="dict.label"-->
|
||||||
|
<!-- :value="dict.value"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </el-select>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['mes:baseProdlineInfo:add']"
|
||||||
|
>新增
|
||||||
|
</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
plain
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
:disabled="single"
|
||||||
|
@click="handleUpdate"
|
||||||
|
v-hasPermi="['mes:baseProdlineInfo:edit']"
|
||||||
|
>修改
|
||||||
|
</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-hasPermi="['mes:baseProdlineInfo:remove']"
|
||||||
|
>删除
|
||||||
|
</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['mes:baseProdlineInfo:export']"
|
||||||
|
>导出
|
||||||
|
</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="baseProdlineInfoList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center"/>
|
||||||
|
<el-table-column label="主键标识" align="center" prop="prodlineId" v-if="columns[0].visible"/>
|
||||||
|
<el-table-column label="产线编号" align="center" prop="prodlineCode" v-if="columns[1].visible"/>
|
||||||
|
<el-table-column label="产线名称" align="center" prop="prodlineName" v-if="columns[2].visible"/>
|
||||||
|
<el-table-column label="产线类型" align="center" prop="prodlineType" v-if="columns[3].visible">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.prodline_type" :value="scope.row.prodlineType"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="所属工厂" align="center" prop="factoryName" v-if="columns[4].visible"/>
|
||||||
|
<el-table-column label="是否标识" align="center" prop="isFlag" v-if="columns[5].visible">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.active_flag" :value="scope.row.isFlag"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="备注" align="center" prop="remark" v-if="columns[6].visible"/>
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['mes:baseProdlineInfo:edit']"
|
||||||
|
>修改
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['mes:baseProdlineInfo:remove']"
|
||||||
|
>删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 添加或修改产线信息对话框 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="产线编号" prop="prodlineCode">
|
||||||
|
<el-input v-model="form.prodlineCode" placeholder="请输入产线编号"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="产线名称" prop="prodlineName">
|
||||||
|
<el-input v-model="form.prodlineName" placeholder="请输入产线名称"/>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="产线类型" prop="prodlineType">-->
|
||||||
|
<!-- <el-select v-model="form.prodlineType" placeholder="请选择产线类型">-->
|
||||||
|
<!-- <el-option-->
|
||||||
|
<!-- v-for="dict in dict.type.prodline_type"-->
|
||||||
|
<!-- :key="dict.value"-->
|
||||||
|
<!-- :label="dict.label"-->
|
||||||
|
<!-- :value="dict.value"-->
|
||||||
|
<!-- ></el-option>-->
|
||||||
|
<!-- </el-select>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<el-form-item label="所属工厂" prop="factoryId">
|
||||||
|
<el-select v-model="form.factoryId" placeholder="请选择所属工厂">
|
||||||
|
<el-option
|
||||||
|
v-for="item in factoryList"
|
||||||
|
:key="item.factoryId"
|
||||||
|
:label="item.factoryName"
|
||||||
|
:value="item.factoryId"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="是否标识" prop="isFlag">
|
||||||
|
<el-radio-group v-model="form.isFlag">
|
||||||
|
<el-radio
|
||||||
|
v-for="dict in dict.type.active_flag"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.value"
|
||||||
|
>{{ dict.label }}
|
||||||
|
</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
listBaseProdlineInfo,
|
||||||
|
getBaseProdlineInfo,
|
||||||
|
delBaseProdlineInfo,
|
||||||
|
addBaseProdlineInfo,
|
||||||
|
updateBaseProdlineInfo
|
||||||
|
} from "@/api/mes/baseProdlineInfo";
|
||||||
|
import {findFactoryList} from "@//api/mes/baseFactoryInfo";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "BaseProdlineInfo",
|
||||||
|
dicts: ['active_flag', 'prodline_type'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 产线信息表格数据
|
||||||
|
baseProdlineInfoList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
prodlineCode: null,
|
||||||
|
prodlineName: null,
|
||||||
|
prodlineType: null,
|
||||||
|
factoryId: null,
|
||||||
|
isFlag: null,
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
prodlineCode: [
|
||||||
|
{required: true, message: "产线编号不能为空", trigger: "blur"}
|
||||||
|
],
|
||||||
|
prodlineName: [
|
||||||
|
{required: true, message: "产线名称不能为空", trigger: "blur"}
|
||||||
|
],
|
||||||
|
isFlag: [
|
||||||
|
{required: true, message: "是否标识不能为空", trigger: "change"}
|
||||||
|
],
|
||||||
|
},
|
||||||
|
columns: [
|
||||||
|
{key: 0, label: `主键标识`, visible: false},
|
||||||
|
{key: 1, label: `产线编号`, visible: true},
|
||||||
|
{key: 2, label: `产线名称`, visible: true},
|
||||||
|
{key: 3, label: `产线类型`, visible: false},
|
||||||
|
{key: 4, label: `所属工厂`, visible: true},
|
||||||
|
{key: 5, label: `是否标识`, visible: true},
|
||||||
|
{key: 6, label: `备注`, visible: true},
|
||||||
|
{key: 7, label: `创建人`, visible: false},
|
||||||
|
{key: 8, label: `创建时间`, visible: false},
|
||||||
|
{key: 9, label: `更新人`, visible: false},
|
||||||
|
{key: 10, label: `更新时间`, visible: false},
|
||||||
|
],
|
||||||
|
//工厂选项
|
||||||
|
factoryList: []
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询产线信息列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
findFactoryList(null).then(response => {
|
||||||
|
this.factoryList = response.data
|
||||||
|
})
|
||||||
|
listBaseProdlineInfo(this.queryParams).then(response => {
|
||||||
|
this.baseProdlineInfoList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
prodlineId: null,
|
||||||
|
prodlineCode: null,
|
||||||
|
prodlineName: null,
|
||||||
|
prodlineType: null,
|
||||||
|
factoryId: null,
|
||||||
|
isFlag: '1',
|
||||||
|
remark: null,
|
||||||
|
createBy: null,
|
||||||
|
createTime: null,
|
||||||
|
updateBy: null,
|
||||||
|
updateTime: null
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.prodlineId)
|
||||||
|
this.single = selection.length !== 1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset();
|
||||||
|
this.open = true;
|
||||||
|
this.title = "添加产线信息";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
const prodlineId = row.prodlineId || this.ids
|
||||||
|
getBaseProdlineInfo(prodlineId).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改产线信息";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.prodlineId != null) {
|
||||||
|
updateBaseProdlineInfo(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addBaseProdlineInfo(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const prodlineIds = row.prodlineId || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除产线信息编号为"' + prodlineIds + '"的数据项?').then(function () {
|
||||||
|
return delBaseProdlineInfo(prodlineIds);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('mes/baseProdlineInfo/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `baseProdlineInfo_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@ -0,0 +1,374 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
|
||||||
|
<!-- <el-form-item label="供应商编号" prop="supplierCode">-->
|
||||||
|
<!-- <el-input-->
|
||||||
|
<!-- v-model="queryParams.supplierCode"-->
|
||||||
|
<!-- placeholder="请输入供应商编号"-->
|
||||||
|
<!-- clearable-->
|
||||||
|
<!-- @keyup.enter.native="handleQuery"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<el-form-item label="供应商名称" prop="supplierName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.supplierName"
|
||||||
|
placeholder="请输入供应商名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="erp主键" prop="erpId">-->
|
||||||
|
<!-- <el-input-->
|
||||||
|
<!-- v-model="queryParams.erpId"-->
|
||||||
|
<!-- placeholder="请输入erp主键"-->
|
||||||
|
<!-- clearable-->
|
||||||
|
<!-- @keyup.enter.native="handleQuery"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- <el-form-item label="供应商状态" prop="supplierStatus">-->
|
||||||
|
<!-- <el-select v-model="queryParams.supplierStatus" placeholder="请选择供应商状态" clearable>-->
|
||||||
|
<!-- <el-option-->
|
||||||
|
<!-- v-for="dict in dict.type.supplier_status"-->
|
||||||
|
<!-- :key="dict.value"-->
|
||||||
|
<!-- :label="dict.label"-->
|
||||||
|
<!-- :value="dict.value"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </el-select>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<el-form-item label="审核日期">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="daterangeAuditDate"
|
||||||
|
style="width: 240px"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
type="daterange"
|
||||||
|
range-separator="-"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['mes:supplierInfo:add']"
|
||||||
|
>新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
plain
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
:disabled="single"
|
||||||
|
@click="handleUpdate"
|
||||||
|
v-hasPermi="['mes:supplierInfo:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-hasPermi="['mes:supplierInfo:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['mes:supplierInfo:export']"
|
||||||
|
>导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="supplierInfoList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="主键标识" align="center" prop="supplierId" v-if="columns[0].visible"/>
|
||||||
|
<el-table-column label="供应商编号" align="center" prop="supplierCode" v-if="columns[1].visible"/>
|
||||||
|
<el-table-column label="供应商名称" align="center" prop="supplierName" v-if="columns[2].visible"/>
|
||||||
|
<el-table-column label="erp主键" align="center" prop="erpId" v-if="columns[3].visible"/>
|
||||||
|
<el-table-column label="供应商状态" align="center" prop="supplierStatus" v-if="columns[4].visible" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.supplier_status" :value="scope.row.supplierStatus"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="备注" align="center" prop="remark" v-if="columns[5].visible"/>
|
||||||
|
<el-table-column label="创建人" align="center" prop="createBy" v-if="columns[6].visible"/>
|
||||||
|
<el-table-column label="创建时间" align="center" prop="createTime" width="180" v-if="columns[7].visible">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="更新人" align="center" prop="updateBy" v-if="columns[8].visible"/>
|
||||||
|
<el-table-column label="更新时间" align="center" prop="updateTime" width="180" v-if="columns[9].visible">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="审核日期" align="center" prop="auditDate" width="180" v-if="columns[10].visible">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.auditDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['mes:supplierInfo:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['mes:supplierInfo:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 添加或修改物料供应商信息对话框 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||||
|
<el-form-item label="供应商编号" prop="supplierCode">
|
||||||
|
<el-input v-model="form.supplierCode" placeholder="请输入供应商编号" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="供应商名称" prop="supplierName">
|
||||||
|
<el-input v-model="form.supplierName" placeholder="请输入供应商名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="erp主键" prop="erpId">-->
|
||||||
|
<!-- <el-input v-model="form.erpId" placeholder="请输入erp主键" />-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<el-form-item label="供应商状态" prop="supplierStatus">
|
||||||
|
<el-radio-group v-model="form.supplierStatus">
|
||||||
|
<el-radio
|
||||||
|
v-for="dict in dict.type.supplier_status"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.value"
|
||||||
|
>{{dict.label}}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="审核日期" prop="auditDate">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="form.auditDate"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择审核日期">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listSupplierInfo, getSupplierInfo, delSupplierInfo, addSupplierInfo, updateSupplierInfo } from "@/api/mes/supplierInfo";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "SupplierInfo",
|
||||||
|
dicts: ['supplier_status'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 物料供应商信息表格数据
|
||||||
|
supplierInfoList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 审核日期时间范围
|
||||||
|
daterangeAuditDate: [],
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
supplierCode: null,
|
||||||
|
supplierName: null,
|
||||||
|
erpId: null,
|
||||||
|
supplierStatus: null,
|
||||||
|
auditDate: null
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
supplierName: [
|
||||||
|
{ required: true, message: "供应商名称不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
supplierStatus: [
|
||||||
|
{ required: true, message: "供应商状态不能为空", trigger: "change" }
|
||||||
|
],
|
||||||
|
},
|
||||||
|
columns: [
|
||||||
|
{ key: 0, label: `主键标识`, visible: false },
|
||||||
|
{ key: 1, label: `供应商编号`, visible: true },
|
||||||
|
{ key: 2, label: `供应商名称`, visible: true },
|
||||||
|
{ key: 3, label: `erp主键`, visible: false },
|
||||||
|
{ key: 4, label: `供应商状态`, visible: true },
|
||||||
|
{ key: 5, label: `备注`, visible: true },
|
||||||
|
{ key: 6, label: `创建人`, visible: false },
|
||||||
|
{ key: 7, label: `创建时间`, visible: true },
|
||||||
|
{ key: 8, label: `更新人`, visible: false },
|
||||||
|
{ key: 9, label: `更新时间`, visible: true },
|
||||||
|
{ key: 10, label: `审核日期`, visible: true },
|
||||||
|
],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询物料供应商信息列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
this.queryParams.params = {};
|
||||||
|
if (null != this.daterangeAuditDate && '' != this.daterangeAuditDate) {
|
||||||
|
this.queryParams.params["beginAuditDate"] = this.daterangeAuditDate[0];
|
||||||
|
this.queryParams.params["endAuditDate"] = this.daterangeAuditDate[1];
|
||||||
|
}
|
||||||
|
listSupplierInfo(this.queryParams).then(response => {
|
||||||
|
this.supplierInfoList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
supplierId: null,
|
||||||
|
supplierCode: null,
|
||||||
|
supplierName: null,
|
||||||
|
erpId: null,
|
||||||
|
supplierStatus: '1',
|
||||||
|
remark: null,
|
||||||
|
createBy: null,
|
||||||
|
createTime: null,
|
||||||
|
updateBy: null,
|
||||||
|
updateTime: null,
|
||||||
|
auditDate: null
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.daterangeAuditDate = [];
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.supplierId)
|
||||||
|
this.single = selection.length!==1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset();
|
||||||
|
this.open = true;
|
||||||
|
this.title = "添加物料供应商信息";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
const supplierId = row.supplierId || this.ids
|
||||||
|
getSupplierInfo(supplierId).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改物料供应商信息";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.supplierId != null) {
|
||||||
|
updateSupplierInfo(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addSupplierInfo(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const supplierIds = row.supplierId || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除物料供应商信息编号为"' + supplierIds + '"的数据项?').then(function() {
|
||||||
|
return delSupplierInfo(supplierIds);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('mes/supplierInfo/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `supplierInfo_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
Loading…
Reference in New Issue