物料产品批次属性配置功能
This commit is contained in:
parent
1bff0c805e
commit
b4d9add499
@ -0,0 +1,112 @@
|
|||||||
|
package com.ktg.mes.md.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
|
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.md.domain.MdItemBatchConfig;
|
||||||
|
import com.ktg.mes.md.service.IMdItemBatchConfigService;
|
||||||
|
import com.ktg.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ktg.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物料批次属性配置Controller
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2025-02-05
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/mes/md/batchconfig")
|
||||||
|
public class MdItemBatchConfigController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IMdItemBatchConfigService mdItemBatchConfigService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询物料批次属性配置列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:md:batchconfig:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(MdItemBatchConfig mdItemBatchConfig)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<MdItemBatchConfig> list = mdItemBatchConfigService.selectMdItemBatchConfigList(mdItemBatchConfig);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出物料批次属性配置列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:md:batchconfig:export')")
|
||||||
|
@Log(title = "物料批次属性配置", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, MdItemBatchConfig mdItemBatchConfig)
|
||||||
|
{
|
||||||
|
List<MdItemBatchConfig> list = mdItemBatchConfigService.selectMdItemBatchConfigList(mdItemBatchConfig);
|
||||||
|
ExcelUtil<MdItemBatchConfig> util = new ExcelUtil<MdItemBatchConfig>(MdItemBatchConfig.class);
|
||||||
|
util.exportExcel(response, list, "物料批次属性配置数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取物料批次属性配置详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:md:batchconfig:query')")
|
||||||
|
@GetMapping(value = "/{itemId}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("itemId") Long itemId)
|
||||||
|
{
|
||||||
|
MdItemBatchConfig mdItemBatchConfig = new MdItemBatchConfig();
|
||||||
|
mdItemBatchConfig.setItemId(itemId);
|
||||||
|
List<MdItemBatchConfig> list = mdItemBatchConfigService.selectMdItemBatchConfigList(mdItemBatchConfig);
|
||||||
|
if(!CollectionUtils.isEmpty(list)){
|
||||||
|
return AjaxResult.success(list.get(0));
|
||||||
|
}
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增物料批次属性配置
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:md:batchconfig:add')")
|
||||||
|
@Log(title = "物料批次属性配置", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody MdItemBatchConfig mdItemBatchConfig)
|
||||||
|
{
|
||||||
|
return toAjax(mdItemBatchConfigService.insertMdItemBatchConfig(mdItemBatchConfig));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改物料批次属性配置
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:md:batchconfig:edit')")
|
||||||
|
@Log(title = "物料批次属性配置", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody MdItemBatchConfig mdItemBatchConfig)
|
||||||
|
{
|
||||||
|
return toAjax(mdItemBatchConfigService.updateMdItemBatchConfig(mdItemBatchConfig));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除物料批次属性配置
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:md:batchconfig:remove')")
|
||||||
|
@Log(title = "物料批次属性配置", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{configIds}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] configIds)
|
||||||
|
{
|
||||||
|
return toAjax(mdItemBatchConfigService.deleteMdItemBatchConfigByConfigIds(configIds));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,322 @@
|
|||||||
|
package com.ktg.mes.md.domain;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.ktg.common.annotation.Excel;
|
||||||
|
import com.ktg.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物料批次属性配置对象 md_item_batch_config
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2025-02-05
|
||||||
|
*/
|
||||||
|
public class MdItemBatchConfig extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 批次ID */
|
||||||
|
private Long configId;
|
||||||
|
|
||||||
|
/** 产品物料ID */
|
||||||
|
@Excel(name = "产品物料ID")
|
||||||
|
private Long itemId;
|
||||||
|
|
||||||
|
/** 生产日期 */
|
||||||
|
@Excel(name = "生产日期")
|
||||||
|
private String produceDateFlag;
|
||||||
|
|
||||||
|
/** 有效期 */
|
||||||
|
@Excel(name = "有效期")
|
||||||
|
private String expireDateFlag;
|
||||||
|
|
||||||
|
/** 入库日期 */
|
||||||
|
@Excel(name = "入库日期")
|
||||||
|
private String recptDateFlag;
|
||||||
|
|
||||||
|
/** 供应商 */
|
||||||
|
@Excel(name = "供应商")
|
||||||
|
private String vendorFlag;
|
||||||
|
|
||||||
|
/** 客户 */
|
||||||
|
@Excel(name = "客户")
|
||||||
|
private String clientFlag;
|
||||||
|
|
||||||
|
/** 销售订单编号 */
|
||||||
|
@Excel(name = "销售订单编号")
|
||||||
|
private String coCodeFlag;
|
||||||
|
|
||||||
|
/** 采购订单编号 */
|
||||||
|
@Excel(name = "采购订单编号")
|
||||||
|
private String poCodeFlag;
|
||||||
|
|
||||||
|
/** 生产工单 */
|
||||||
|
@Excel(name = "生产工单")
|
||||||
|
private String workorderFlag;
|
||||||
|
|
||||||
|
/** 生产任务 */
|
||||||
|
@Excel(name = "生产任务")
|
||||||
|
private String taskFlag;
|
||||||
|
|
||||||
|
/** 工作站 */
|
||||||
|
@Excel(name = "工作站")
|
||||||
|
private String workstationFlag;
|
||||||
|
|
||||||
|
/** 工具 */
|
||||||
|
@Excel(name = "工具")
|
||||||
|
private String toolFlag;
|
||||||
|
|
||||||
|
/** 模具 */
|
||||||
|
@Excel(name = "模具")
|
||||||
|
private String moldFlag;
|
||||||
|
|
||||||
|
/** 生产批号 */
|
||||||
|
@Excel(name = "生产批号")
|
||||||
|
private String lotNumberFlag;
|
||||||
|
|
||||||
|
/** 质量状态 */
|
||||||
|
@Excel(name = "质量状态")
|
||||||
|
private String qualityStatusFlag;
|
||||||
|
|
||||||
|
/** 生效状态 */
|
||||||
|
@Excel(name = "生效状态")
|
||||||
|
private String enableFlag;
|
||||||
|
|
||||||
|
/** 预留字段1 */
|
||||||
|
@Excel(name = "预留字段1")
|
||||||
|
private String attr1;
|
||||||
|
|
||||||
|
/** 预留字段2 */
|
||||||
|
@Excel(name = "预留字段2")
|
||||||
|
private String attr2;
|
||||||
|
|
||||||
|
/** 预留字段3 */
|
||||||
|
@Excel(name = "预留字段3")
|
||||||
|
private Long attr3;
|
||||||
|
|
||||||
|
/** 预留字段4 */
|
||||||
|
@Excel(name = "预留字段4")
|
||||||
|
private Long attr4;
|
||||||
|
|
||||||
|
public void setConfigId(Long configId)
|
||||||
|
{
|
||||||
|
this.configId = configId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getConfigId()
|
||||||
|
{
|
||||||
|
return configId;
|
||||||
|
}
|
||||||
|
public void setItemId(Long itemId)
|
||||||
|
{
|
||||||
|
this.itemId = itemId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getItemId()
|
||||||
|
{
|
||||||
|
return itemId;
|
||||||
|
}
|
||||||
|
public void setProduceDateFlag(String produceDateFlag)
|
||||||
|
{
|
||||||
|
this.produceDateFlag = produceDateFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProduceDateFlag()
|
||||||
|
{
|
||||||
|
return produceDateFlag;
|
||||||
|
}
|
||||||
|
public void setExpireDateFlag(String expireDateFlag)
|
||||||
|
{
|
||||||
|
this.expireDateFlag = expireDateFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getExpireDateFlag()
|
||||||
|
{
|
||||||
|
return expireDateFlag;
|
||||||
|
}
|
||||||
|
public void setRecptDateFlag(String recptDateFlag)
|
||||||
|
{
|
||||||
|
this.recptDateFlag = recptDateFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRecptDateFlag()
|
||||||
|
{
|
||||||
|
return recptDateFlag;
|
||||||
|
}
|
||||||
|
public void setVendorFlag(String vendorFlag)
|
||||||
|
{
|
||||||
|
this.vendorFlag = vendorFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVendorFlag()
|
||||||
|
{
|
||||||
|
return vendorFlag;
|
||||||
|
}
|
||||||
|
public void setClientFlag(String clientFlag)
|
||||||
|
{
|
||||||
|
this.clientFlag = clientFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClientFlag()
|
||||||
|
{
|
||||||
|
return clientFlag;
|
||||||
|
}
|
||||||
|
public void setCoCodeFlag(String coCodeFlag)
|
||||||
|
{
|
||||||
|
this.coCodeFlag = coCodeFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCoCodeFlag()
|
||||||
|
{
|
||||||
|
return coCodeFlag;
|
||||||
|
}
|
||||||
|
public void setPoCodeFlag(String poCodeFlag)
|
||||||
|
{
|
||||||
|
this.poCodeFlag = poCodeFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPoCodeFlag()
|
||||||
|
{
|
||||||
|
return poCodeFlag;
|
||||||
|
}
|
||||||
|
public void setWorkorderFlag(String workorderFlag)
|
||||||
|
{
|
||||||
|
this.workorderFlag = workorderFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWorkorderFlag()
|
||||||
|
{
|
||||||
|
return workorderFlag;
|
||||||
|
}
|
||||||
|
public void setTaskFlag(String taskFlag)
|
||||||
|
{
|
||||||
|
this.taskFlag = taskFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTaskFlag()
|
||||||
|
{
|
||||||
|
return taskFlag;
|
||||||
|
}
|
||||||
|
public void setWorkstationFlag(String workstationFlag)
|
||||||
|
{
|
||||||
|
this.workstationFlag = workstationFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWorkstationFlag()
|
||||||
|
{
|
||||||
|
return workstationFlag;
|
||||||
|
}
|
||||||
|
public void setToolFlag(String toolFlag)
|
||||||
|
{
|
||||||
|
this.toolFlag = toolFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getToolFlag()
|
||||||
|
{
|
||||||
|
return toolFlag;
|
||||||
|
}
|
||||||
|
public void setMoldFlag(String moldFlag)
|
||||||
|
{
|
||||||
|
this.moldFlag = moldFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMoldFlag()
|
||||||
|
{
|
||||||
|
return moldFlag;
|
||||||
|
}
|
||||||
|
public void setLotNumberFlag(String lotNumberFlag)
|
||||||
|
{
|
||||||
|
this.lotNumberFlag = lotNumberFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLotNumberFlag()
|
||||||
|
{
|
||||||
|
return lotNumberFlag;
|
||||||
|
}
|
||||||
|
public void setQualityStatusFlag(String qualityStatusFlag)
|
||||||
|
{
|
||||||
|
this.qualityStatusFlag = qualityStatusFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getQualityStatusFlag()
|
||||||
|
{
|
||||||
|
return qualityStatusFlag;
|
||||||
|
}
|
||||||
|
public void setEnableFlag(String enableFlag)
|
||||||
|
{
|
||||||
|
this.enableFlag = enableFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEnableFlag()
|
||||||
|
{
|
||||||
|
return enableFlag;
|
||||||
|
}
|
||||||
|
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("configId", getConfigId())
|
||||||
|
.append("itemId", getItemId())
|
||||||
|
.append("produceDateFlag", getProduceDateFlag())
|
||||||
|
.append("expireDateFlag", getExpireDateFlag())
|
||||||
|
.append("recptDateFlag", getRecptDateFlag())
|
||||||
|
.append("vendorFlag", getVendorFlag())
|
||||||
|
.append("clientFlag", getClientFlag())
|
||||||
|
.append("coCodeFlag", getCoCodeFlag())
|
||||||
|
.append("poCodeFlag", getPoCodeFlag())
|
||||||
|
.append("workorderFlag", getWorkorderFlag())
|
||||||
|
.append("taskFlag", getTaskFlag())
|
||||||
|
.append("workstationFlag", getWorkstationFlag())
|
||||||
|
.append("toolFlag", getToolFlag())
|
||||||
|
.append("moldFlag", getMoldFlag())
|
||||||
|
.append("lotNumberFlag", getLotNumberFlag())
|
||||||
|
.append("qualityStatusFlag", getQualityStatusFlag())
|
||||||
|
.append("enableFlag", getEnableFlag())
|
||||||
|
.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.md.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ktg.mes.md.domain.MdItemBatchConfig;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物料批次属性配置Mapper接口
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2025-02-05
|
||||||
|
*/
|
||||||
|
public interface MdItemBatchConfigMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询物料批次属性配置
|
||||||
|
*
|
||||||
|
* @param configId 物料批次属性配置主键
|
||||||
|
* @return 物料批次属性配置
|
||||||
|
*/
|
||||||
|
public MdItemBatchConfig selectMdItemBatchConfigByConfigId(Long configId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询物料批次属性配置列表
|
||||||
|
*
|
||||||
|
* @param mdItemBatchConfig 物料批次属性配置
|
||||||
|
* @return 物料批次属性配置集合
|
||||||
|
*/
|
||||||
|
public List<MdItemBatchConfig> selectMdItemBatchConfigList(MdItemBatchConfig mdItemBatchConfig);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增物料批次属性配置
|
||||||
|
*
|
||||||
|
* @param mdItemBatchConfig 物料批次属性配置
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertMdItemBatchConfig(MdItemBatchConfig mdItemBatchConfig);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改物料批次属性配置
|
||||||
|
*
|
||||||
|
* @param mdItemBatchConfig 物料批次属性配置
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateMdItemBatchConfig(MdItemBatchConfig mdItemBatchConfig);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除物料批次属性配置
|
||||||
|
*
|
||||||
|
* @param configId 物料批次属性配置主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteMdItemBatchConfigByConfigId(Long configId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除物料批次属性配置
|
||||||
|
*
|
||||||
|
* @param configIds 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteMdItemBatchConfigByConfigIds(Long[] configIds);
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.ktg.mes.md.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ktg.mes.md.domain.MdItemBatchConfig;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物料批次属性配置Service接口
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2025-02-05
|
||||||
|
*/
|
||||||
|
public interface IMdItemBatchConfigService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询物料批次属性配置
|
||||||
|
*
|
||||||
|
* @param configId 物料批次属性配置主键
|
||||||
|
* @return 物料批次属性配置
|
||||||
|
*/
|
||||||
|
public MdItemBatchConfig selectMdItemBatchConfigByConfigId(Long configId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询物料批次属性配置列表
|
||||||
|
*
|
||||||
|
* @param mdItemBatchConfig 物料批次属性配置
|
||||||
|
* @return 物料批次属性配置集合
|
||||||
|
*/
|
||||||
|
public List<MdItemBatchConfig> selectMdItemBatchConfigList(MdItemBatchConfig mdItemBatchConfig);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增物料批次属性配置
|
||||||
|
*
|
||||||
|
* @param mdItemBatchConfig 物料批次属性配置
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertMdItemBatchConfig(MdItemBatchConfig mdItemBatchConfig);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改物料批次属性配置
|
||||||
|
*
|
||||||
|
* @param mdItemBatchConfig 物料批次属性配置
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateMdItemBatchConfig(MdItemBatchConfig mdItemBatchConfig);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除物料批次属性配置
|
||||||
|
*
|
||||||
|
* @param configIds 需要删除的物料批次属性配置主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteMdItemBatchConfigByConfigIds(Long[] configIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除物料批次属性配置信息
|
||||||
|
*
|
||||||
|
* @param configId 物料批次属性配置主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteMdItemBatchConfigByConfigId(Long configId);
|
||||||
|
}
|
@ -0,0 +1,96 @@
|
|||||||
|
package com.ktg.mes.md.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.md.mapper.MdItemBatchConfigMapper;
|
||||||
|
import com.ktg.mes.md.domain.MdItemBatchConfig;
|
||||||
|
import com.ktg.mes.md.service.IMdItemBatchConfigService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物料批次属性配置Service业务层处理
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2025-02-05
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class MdItemBatchConfigServiceImpl implements IMdItemBatchConfigService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private MdItemBatchConfigMapper mdItemBatchConfigMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询物料批次属性配置
|
||||||
|
*
|
||||||
|
* @param configId 物料批次属性配置主键
|
||||||
|
* @return 物料批次属性配置
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public MdItemBatchConfig selectMdItemBatchConfigByConfigId(Long configId)
|
||||||
|
{
|
||||||
|
return mdItemBatchConfigMapper.selectMdItemBatchConfigByConfigId(configId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询物料批次属性配置列表
|
||||||
|
*
|
||||||
|
* @param mdItemBatchConfig 物料批次属性配置
|
||||||
|
* @return 物料批次属性配置
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<MdItemBatchConfig> selectMdItemBatchConfigList(MdItemBatchConfig mdItemBatchConfig)
|
||||||
|
{
|
||||||
|
return mdItemBatchConfigMapper.selectMdItemBatchConfigList(mdItemBatchConfig);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增物料批次属性配置
|
||||||
|
*
|
||||||
|
* @param mdItemBatchConfig 物料批次属性配置
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertMdItemBatchConfig(MdItemBatchConfig mdItemBatchConfig)
|
||||||
|
{
|
||||||
|
mdItemBatchConfig.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return mdItemBatchConfigMapper.insertMdItemBatchConfig(mdItemBatchConfig);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改物料批次属性配置
|
||||||
|
*
|
||||||
|
* @param mdItemBatchConfig 物料批次属性配置
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateMdItemBatchConfig(MdItemBatchConfig mdItemBatchConfig)
|
||||||
|
{
|
||||||
|
mdItemBatchConfig.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return mdItemBatchConfigMapper.updateMdItemBatchConfig(mdItemBatchConfig);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除物料批次属性配置
|
||||||
|
*
|
||||||
|
* @param configIds 需要删除的物料批次属性配置主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteMdItemBatchConfigByConfigIds(Long[] configIds)
|
||||||
|
{
|
||||||
|
return mdItemBatchConfigMapper.deleteMdItemBatchConfigByConfigIds(configIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除物料批次属性配置信息
|
||||||
|
*
|
||||||
|
* @param configId 物料批次属性配置主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteMdItemBatchConfigByConfigId(Long configId)
|
||||||
|
{
|
||||||
|
return mdItemBatchConfigMapper.deleteMdItemBatchConfigByConfigId(configId);
|
||||||
|
}
|
||||||
|
}
|
171
ktg-mes/src/main/resources/mapper/md/MdItemBatchConfigMapper.xml
Normal file
171
ktg-mes/src/main/resources/mapper/md/MdItemBatchConfigMapper.xml
Normal file
@ -0,0 +1,171 @@
|
|||||||
|
<?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.md.mapper.MdItemBatchConfigMapper">
|
||||||
|
|
||||||
|
<resultMap type="MdItemBatchConfig" id="MdItemBatchConfigResult">
|
||||||
|
<result property="configId" column="config_id" />
|
||||||
|
<result property="itemId" column="item_id" />
|
||||||
|
<result property="produceDateFlag" column="produce_date_flag" />
|
||||||
|
<result property="expireDateFlag" column="expire_date_flag" />
|
||||||
|
<result property="recptDateFlag" column="recpt_date_flag" />
|
||||||
|
<result property="vendorFlag" column="vendor_flag" />
|
||||||
|
<result property="clientFlag" column="client_flag" />
|
||||||
|
<result property="coCodeFlag" column="co_code_flag" />
|
||||||
|
<result property="poCodeFlag" column="po_code_flag" />
|
||||||
|
<result property="workorderFlag" column="workorder_flag" />
|
||||||
|
<result property="taskFlag" column="task_flag" />
|
||||||
|
<result property="workstationFlag" column="workstation_flag" />
|
||||||
|
<result property="toolFlag" column="tool_flag" />
|
||||||
|
<result property="moldFlag" column="mold_flag" />
|
||||||
|
<result property="lotNumberFlag" column="lot_number_flag" />
|
||||||
|
<result property="qualityStatusFlag" column="quality_status_flag" />
|
||||||
|
<result property="enableFlag" column="enable_flag" />
|
||||||
|
<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="selectMdItemBatchConfigVo">
|
||||||
|
select config_id, item_id, produce_date_flag, expire_date_flag, recpt_date_flag, vendor_flag, client_flag, co_code_flag, po_code_flag, workorder_flag, task_flag, workstation_flag, tool_flag, mold_flag, lot_number_flag, quality_status_flag, enable_flag, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from md_item_batch_config
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectMdItemBatchConfigList" parameterType="MdItemBatchConfig" resultMap="MdItemBatchConfigResult">
|
||||||
|
<include refid="selectMdItemBatchConfigVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="itemId != null "> and item_id = #{itemId}</if>
|
||||||
|
<if test="produceDateFlag != null and produceDateFlag != ''"> and produce_date_flag = #{produceDateFlag}</if>
|
||||||
|
<if test="expireDateFlag != null and expireDateFlag != ''"> and expire_date_flag = #{expireDateFlag}</if>
|
||||||
|
<if test="recptDateFlag != null and recptDateFlag != ''"> and recpt_date_flag = #{recptDateFlag}</if>
|
||||||
|
<if test="vendorFlag != null and vendorFlag != ''"> and vendor_flag = #{vendorFlag}</if>
|
||||||
|
<if test="clientFlag != null and clientFlag != ''"> and client_flag = #{clientFlag}</if>
|
||||||
|
<if test="coCodeFlag != null and coCodeFlag != ''"> and co_code_flag = #{coCodeFlag}</if>
|
||||||
|
<if test="poCodeFlag != null and poCodeFlag != ''"> and po_code_flag = #{poCodeFlag}</if>
|
||||||
|
<if test="workorderFlag != null and workorderFlag != ''"> and workorder_flag = #{workorderFlag}</if>
|
||||||
|
<if test="taskFlag != null and taskFlag != ''"> and task_flag = #{taskFlag}</if>
|
||||||
|
<if test="workstationFlag != null and workstationFlag != ''"> and workstation_flag = #{workstationFlag}</if>
|
||||||
|
<if test="toolFlag != null and toolFlag != ''"> and tool_flag = #{toolFlag}</if>
|
||||||
|
<if test="moldFlag != null and moldFlag != ''"> and mold_flag = #{moldFlag}</if>
|
||||||
|
<if test="lotNumberFlag != null and lotNumberFlag != ''"> and lot_number_flag = #{lotNumberFlag}</if>
|
||||||
|
<if test="qualityStatusFlag != null and qualityStatusFlag != ''"> and quality_status_flag = #{qualityStatusFlag}</if>
|
||||||
|
<if test="enableFlag != null and enableFlag != ''"> and enable_flag = #{enableFlag}</if>
|
||||||
|
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
|
||||||
|
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
|
||||||
|
<if test="attr3 != null "> and attr3 = #{attr3}</if>
|
||||||
|
<if test="attr4 != null "> and attr4 = #{attr4}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectMdItemBatchConfigByConfigId" parameterType="Long" resultMap="MdItemBatchConfigResult">
|
||||||
|
<include refid="selectMdItemBatchConfigVo"/>
|
||||||
|
where config_id = #{configId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertMdItemBatchConfig" parameterType="MdItemBatchConfig" useGeneratedKeys="true" keyProperty="configId">
|
||||||
|
insert into md_item_batch_config
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="itemId != null">item_id,</if>
|
||||||
|
<if test="produceDateFlag != null">produce_date_flag,</if>
|
||||||
|
<if test="expireDateFlag != null">expire_date_flag,</if>
|
||||||
|
<if test="recptDateFlag != null">recpt_date_flag,</if>
|
||||||
|
<if test="vendorFlag != null">vendor_flag,</if>
|
||||||
|
<if test="clientFlag != null">client_flag,</if>
|
||||||
|
<if test="coCodeFlag != null">co_code_flag,</if>
|
||||||
|
<if test="poCodeFlag != null">po_code_flag,</if>
|
||||||
|
<if test="workorderFlag != null">workorder_flag,</if>
|
||||||
|
<if test="taskFlag != null">task_flag,</if>
|
||||||
|
<if test="workstationFlag != null">workstation_flag,</if>
|
||||||
|
<if test="toolFlag != null">tool_flag,</if>
|
||||||
|
<if test="moldFlag != null">mold_flag,</if>
|
||||||
|
<if test="lotNumberFlag != null">lot_number_flag,</if>
|
||||||
|
<if test="qualityStatusFlag != null">quality_status_flag,</if>
|
||||||
|
<if test="enableFlag != null">enable_flag,</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="itemId != null">#{itemId},</if>
|
||||||
|
<if test="produceDateFlag != null">#{produceDateFlag},</if>
|
||||||
|
<if test="expireDateFlag != null">#{expireDateFlag},</if>
|
||||||
|
<if test="recptDateFlag != null">#{recptDateFlag},</if>
|
||||||
|
<if test="vendorFlag != null">#{vendorFlag},</if>
|
||||||
|
<if test="clientFlag != null">#{clientFlag},</if>
|
||||||
|
<if test="coCodeFlag != null">#{coCodeFlag},</if>
|
||||||
|
<if test="poCodeFlag != null">#{poCodeFlag},</if>
|
||||||
|
<if test="workorderFlag != null">#{workorderFlag},</if>
|
||||||
|
<if test="taskFlag != null">#{taskFlag},</if>
|
||||||
|
<if test="workstationFlag != null">#{workstationFlag},</if>
|
||||||
|
<if test="toolFlag != null">#{toolFlag},</if>
|
||||||
|
<if test="moldFlag != null">#{moldFlag},</if>
|
||||||
|
<if test="lotNumberFlag != null">#{lotNumberFlag},</if>
|
||||||
|
<if test="qualityStatusFlag != null">#{qualityStatusFlag},</if>
|
||||||
|
<if test="enableFlag != null">#{enableFlag},</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="updateMdItemBatchConfig" parameterType="MdItemBatchConfig">
|
||||||
|
update md_item_batch_config
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="itemId != null">item_id = #{itemId},</if>
|
||||||
|
<if test="produceDateFlag != null">produce_date_flag = #{produceDateFlag},</if>
|
||||||
|
<if test="expireDateFlag != null">expire_date_flag = #{expireDateFlag},</if>
|
||||||
|
<if test="recptDateFlag != null">recpt_date_flag = #{recptDateFlag},</if>
|
||||||
|
<if test="vendorFlag != null">vendor_flag = #{vendorFlag},</if>
|
||||||
|
<if test="clientFlag != null">client_flag = #{clientFlag},</if>
|
||||||
|
<if test="coCodeFlag != null">co_code_flag = #{coCodeFlag},</if>
|
||||||
|
<if test="poCodeFlag != null">po_code_flag = #{poCodeFlag},</if>
|
||||||
|
<if test="workorderFlag != null">workorder_flag = #{workorderFlag},</if>
|
||||||
|
<if test="taskFlag != null">task_flag = #{taskFlag},</if>
|
||||||
|
<if test="workstationFlag != null">workstation_flag = #{workstationFlag},</if>
|
||||||
|
<if test="toolFlag != null">tool_flag = #{toolFlag},</if>
|
||||||
|
<if test="moldFlag != null">mold_flag = #{moldFlag},</if>
|
||||||
|
<if test="lotNumberFlag != null">lot_number_flag = #{lotNumberFlag},</if>
|
||||||
|
<if test="qualityStatusFlag != null">quality_status_flag = #{qualityStatusFlag},</if>
|
||||||
|
<if test="enableFlag != null">enable_flag = #{enableFlag},</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 config_id = #{configId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteMdItemBatchConfigByConfigId" parameterType="Long">
|
||||||
|
delete from md_item_batch_config where config_id = #{configId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteMdItemBatchConfigByConfigIds" parameterType="String">
|
||||||
|
delete from md_item_batch_config where config_id in
|
||||||
|
<foreach item="configId" collection="array" open="(" separator="," close=")">
|
||||||
|
#{configId}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue
Block a user