赋码配置
This commit is contained in:
parent
b4d7bebc3d
commit
2c2015ecf4
Binary file not shown.
@ -666,6 +666,9 @@ create table wm_product_recpt_line (
|
|||||||
specification varchar(500) comment '规格型号',
|
specification varchar(500) comment '规格型号',
|
||||||
unit_of_measure varchar(64) comment '单位',
|
unit_of_measure varchar(64) comment '单位',
|
||||||
quantity_recived double(12,2) not null comment '入库数量',
|
quantity_recived double(12,2) not null comment '入库数量',
|
||||||
|
workorder_id bigint(20) comment '生产工单ID',
|
||||||
|
workorder_code varchar(64) comment '生产工单编码',
|
||||||
|
workorder_name varchar(255) comment '生产工单名称',
|
||||||
batch_code varchar(255) comment '批次号',
|
batch_code varchar(255) comment '批次号',
|
||||||
warehouse_id bigint(20) comment '仓库ID',
|
warehouse_id bigint(20) comment '仓库ID',
|
||||||
warehouse_code varchar(64) comment '仓库编码',
|
warehouse_code varchar(64) comment '仓库编码',
|
||||||
@ -872,6 +875,34 @@ create table wm_barcode (
|
|||||||
) engine=innodb auto_increment=200 comment = '条码清单表';
|
) engine=innodb auto_increment=200 comment = '条码清单表';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 18、条码配置
|
||||||
|
-- ----------------------------
|
||||||
|
drop table if exists wm_barcode_config;
|
||||||
|
create table wm_barcode_config (
|
||||||
|
config_id bigint(20) not null auto_increment comment '配置ID',
|
||||||
|
barcode_formart varchar(64) not null comment '条码格式',
|
||||||
|
barcode_type varchar(64) not null comment '条码类型',
|
||||||
|
content_formart varchar(255) not null comment '内容格式',
|
||||||
|
content_example varchar(255) comment '内容样例',
|
||||||
|
auto_gen_flag char(1) default 'Y' comment '是否自动生成',
|
||||||
|
enable_flag char(1) default 'Y' comment '是否生效',
|
||||||
|
remark varchar(500) default '' comment '备注',
|
||||||
|
attr1 varchar(64) default null comment '预留字段1',
|
||||||
|
attr2 varchar(255) default null comment '预留字段2',
|
||||||
|
attr3 int(11) default 0 comment '预留字段3',
|
||||||
|
attr4 int(11) default 0 comment '预留字段4',
|
||||||
|
create_by varchar(64) default '' comment '创建者',
|
||||||
|
create_time datetime comment '创建时间',
|
||||||
|
update_by varchar(64) default '' comment '更新者',
|
||||||
|
update_time datetime comment '更新时间',
|
||||||
|
primary key (config_id)
|
||||||
|
) engine=innodb auto_increment=200 comment = '条码配置';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- 19、装箱单表
|
-- 19、装箱单表
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
|
@ -0,0 +1,104 @@
|
|||||||
|
package com.ktg.mes.wm.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.ktg.common.annotation.Log;
|
||||||
|
import com.ktg.common.core.controller.BaseController;
|
||||||
|
import com.ktg.common.core.domain.AjaxResult;
|
||||||
|
import com.ktg.common.enums.BusinessType;
|
||||||
|
import com.ktg.mes.wm.domain.WmBarcodeConfig;
|
||||||
|
import com.ktg.mes.wm.service.IWmBarcodeConfigService;
|
||||||
|
import com.ktg.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ktg.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 条码配置Controller
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2022-10-22
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/mes/wm/barcodeconfig")
|
||||||
|
public class WmBarcodeConfigController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IWmBarcodeConfigService wmBarcodeConfigService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询条码配置列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:wm:barcodeconfig:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(WmBarcodeConfig wmBarcodeConfig)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<WmBarcodeConfig> list = wmBarcodeConfigService.selectWmBarcodeConfigList(wmBarcodeConfig);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出条码配置列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:wm:barcodeconfig:export')")
|
||||||
|
@Log(title = "条码配置", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, WmBarcodeConfig wmBarcodeConfig)
|
||||||
|
{
|
||||||
|
List<WmBarcodeConfig> list = wmBarcodeConfigService.selectWmBarcodeConfigList(wmBarcodeConfig);
|
||||||
|
ExcelUtil<WmBarcodeConfig> util = new ExcelUtil<WmBarcodeConfig>(WmBarcodeConfig.class);
|
||||||
|
util.exportExcel(response, list, "条码配置数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取条码配置详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:wm:barcodeconfig:query')")
|
||||||
|
@GetMapping(value = "/{configId}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("configId") Long configId)
|
||||||
|
{
|
||||||
|
return AjaxResult.success(wmBarcodeConfigService.selectWmBarcodeConfigByConfigId(configId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增条码配置
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:wm:barcodeconfig:add')")
|
||||||
|
@Log(title = "条码配置", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody WmBarcodeConfig wmBarcodeConfig)
|
||||||
|
{
|
||||||
|
return toAjax(wmBarcodeConfigService.insertWmBarcodeConfig(wmBarcodeConfig));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改条码配置
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:wm:barcodeconfig:edit')")
|
||||||
|
@Log(title = "条码配置", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody WmBarcodeConfig wmBarcodeConfig)
|
||||||
|
{
|
||||||
|
return toAjax(wmBarcodeConfigService.updateWmBarcodeConfig(wmBarcodeConfig));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除条码配置
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:wm:barcodeconfig:remove')")
|
||||||
|
@Log(title = "条码配置", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{configIds}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] configIds)
|
||||||
|
{
|
||||||
|
return toAjax(wmBarcodeConfigService.deleteWmBarcodeConfigByConfigIds(configIds));
|
||||||
|
}
|
||||||
|
}
|
182
ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmBarcodeConfig.java
Normal file
182
ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmBarcodeConfig.java
Normal file
@ -0,0 +1,182 @@
|
|||||||
|
package com.ktg.mes.wm.domain;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.ktg.common.annotation.Excel;
|
||||||
|
import com.ktg.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 条码配置对象 wm_barcode_config
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2022-10-22
|
||||||
|
*/
|
||||||
|
public class WmBarcodeConfig extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 配置ID */
|
||||||
|
private Long configId;
|
||||||
|
|
||||||
|
/** 条码格式 */
|
||||||
|
@Excel(name = "条码格式")
|
||||||
|
private String barcodeFormart;
|
||||||
|
|
||||||
|
/** 条码类型 */
|
||||||
|
@Excel(name = "条码类型")
|
||||||
|
private String barcodeType;
|
||||||
|
|
||||||
|
/** 内容格式 */
|
||||||
|
@Excel(name = "内容格式")
|
||||||
|
private String contentFormart;
|
||||||
|
|
||||||
|
/** 内容样例 */
|
||||||
|
@Excel(name = "内容样例")
|
||||||
|
private String contentExample;
|
||||||
|
|
||||||
|
/** 是否自动生成 */
|
||||||
|
@Excel(name = "是否自动生成")
|
||||||
|
private String autoGenFlag;
|
||||||
|
|
||||||
|
/** 是否生效 */
|
||||||
|
@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 setBarcodeFormart(String barcodeFormart)
|
||||||
|
{
|
||||||
|
this.barcodeFormart = barcodeFormart;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBarcodeFormart()
|
||||||
|
{
|
||||||
|
return barcodeFormart;
|
||||||
|
}
|
||||||
|
public void setBarcodeType(String barcodeType)
|
||||||
|
{
|
||||||
|
this.barcodeType = barcodeType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBarcodeType()
|
||||||
|
{
|
||||||
|
return barcodeType;
|
||||||
|
}
|
||||||
|
public void setContentFormart(String contentFormart)
|
||||||
|
{
|
||||||
|
this.contentFormart = contentFormart;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContentFormart()
|
||||||
|
{
|
||||||
|
return contentFormart;
|
||||||
|
}
|
||||||
|
public void setContentExample(String contentExample)
|
||||||
|
{
|
||||||
|
this.contentExample = contentExample;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContentExample()
|
||||||
|
{
|
||||||
|
return contentExample;
|
||||||
|
}
|
||||||
|
public void setAutoGenFlag(String autoGenFlag)
|
||||||
|
{
|
||||||
|
this.autoGenFlag = autoGenFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAutoGenFlag()
|
||||||
|
{
|
||||||
|
return autoGenFlag;
|
||||||
|
}
|
||||||
|
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("barcodeFormart", getBarcodeFormart())
|
||||||
|
.append("barcodeType", getBarcodeType())
|
||||||
|
.append("contentFormart", getContentFormart())
|
||||||
|
.append("contentExample", getContentExample())
|
||||||
|
.append("autoGenFlag", getAutoGenFlag())
|
||||||
|
.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.wm.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ktg.mes.wm.domain.WmBarcodeConfig;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 条码配置Mapper接口
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2022-10-22
|
||||||
|
*/
|
||||||
|
public interface WmBarcodeConfigMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询条码配置
|
||||||
|
*
|
||||||
|
* @param configId 条码配置主键
|
||||||
|
* @return 条码配置
|
||||||
|
*/
|
||||||
|
public WmBarcodeConfig selectWmBarcodeConfigByConfigId(Long configId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询条码配置列表
|
||||||
|
*
|
||||||
|
* @param wmBarcodeConfig 条码配置
|
||||||
|
* @return 条码配置集合
|
||||||
|
*/
|
||||||
|
public List<WmBarcodeConfig> selectWmBarcodeConfigList(WmBarcodeConfig wmBarcodeConfig);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增条码配置
|
||||||
|
*
|
||||||
|
* @param wmBarcodeConfig 条码配置
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertWmBarcodeConfig(WmBarcodeConfig wmBarcodeConfig);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改条码配置
|
||||||
|
*
|
||||||
|
* @param wmBarcodeConfig 条码配置
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateWmBarcodeConfig(WmBarcodeConfig wmBarcodeConfig);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除条码配置
|
||||||
|
*
|
||||||
|
* @param configId 条码配置主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteWmBarcodeConfigByConfigId(Long configId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除条码配置
|
||||||
|
*
|
||||||
|
* @param configIds 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteWmBarcodeConfigByConfigIds(Long[] configIds);
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.ktg.mes.wm.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ktg.mes.wm.domain.WmBarcodeConfig;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 条码配置Service接口
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2022-10-22
|
||||||
|
*/
|
||||||
|
public interface IWmBarcodeConfigService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询条码配置
|
||||||
|
*
|
||||||
|
* @param configId 条码配置主键
|
||||||
|
* @return 条码配置
|
||||||
|
*/
|
||||||
|
public WmBarcodeConfig selectWmBarcodeConfigByConfigId(Long configId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询条码配置列表
|
||||||
|
*
|
||||||
|
* @param wmBarcodeConfig 条码配置
|
||||||
|
* @return 条码配置集合
|
||||||
|
*/
|
||||||
|
public List<WmBarcodeConfig> selectWmBarcodeConfigList(WmBarcodeConfig wmBarcodeConfig);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增条码配置
|
||||||
|
*
|
||||||
|
* @param wmBarcodeConfig 条码配置
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertWmBarcodeConfig(WmBarcodeConfig wmBarcodeConfig);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改条码配置
|
||||||
|
*
|
||||||
|
* @param wmBarcodeConfig 条码配置
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateWmBarcodeConfig(WmBarcodeConfig wmBarcodeConfig);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除条码配置
|
||||||
|
*
|
||||||
|
* @param configIds 需要删除的条码配置主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteWmBarcodeConfigByConfigIds(Long[] configIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除条码配置信息
|
||||||
|
*
|
||||||
|
* @param configId 条码配置主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteWmBarcodeConfigByConfigId(Long configId);
|
||||||
|
}
|
@ -0,0 +1,96 @@
|
|||||||
|
package com.ktg.mes.wm.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ktg.common.utils.DateUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ktg.mes.wm.mapper.WmBarcodeConfigMapper;
|
||||||
|
import com.ktg.mes.wm.domain.WmBarcodeConfig;
|
||||||
|
import com.ktg.mes.wm.service.IWmBarcodeConfigService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 条码配置Service业务层处理
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2022-10-22
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class WmBarcodeConfigServiceImpl implements IWmBarcodeConfigService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private WmBarcodeConfigMapper wmBarcodeConfigMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询条码配置
|
||||||
|
*
|
||||||
|
* @param configId 条码配置主键
|
||||||
|
* @return 条码配置
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public WmBarcodeConfig selectWmBarcodeConfigByConfigId(Long configId)
|
||||||
|
{
|
||||||
|
return wmBarcodeConfigMapper.selectWmBarcodeConfigByConfigId(configId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询条码配置列表
|
||||||
|
*
|
||||||
|
* @param wmBarcodeConfig 条码配置
|
||||||
|
* @return 条码配置
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<WmBarcodeConfig> selectWmBarcodeConfigList(WmBarcodeConfig wmBarcodeConfig)
|
||||||
|
{
|
||||||
|
return wmBarcodeConfigMapper.selectWmBarcodeConfigList(wmBarcodeConfig);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增条码配置
|
||||||
|
*
|
||||||
|
* @param wmBarcodeConfig 条码配置
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertWmBarcodeConfig(WmBarcodeConfig wmBarcodeConfig)
|
||||||
|
{
|
||||||
|
wmBarcodeConfig.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return wmBarcodeConfigMapper.insertWmBarcodeConfig(wmBarcodeConfig);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改条码配置
|
||||||
|
*
|
||||||
|
* @param wmBarcodeConfig 条码配置
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateWmBarcodeConfig(WmBarcodeConfig wmBarcodeConfig)
|
||||||
|
{
|
||||||
|
wmBarcodeConfig.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return wmBarcodeConfigMapper.updateWmBarcodeConfig(wmBarcodeConfig);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除条码配置
|
||||||
|
*
|
||||||
|
* @param configIds 需要删除的条码配置主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteWmBarcodeConfigByConfigIds(Long[] configIds)
|
||||||
|
{
|
||||||
|
return wmBarcodeConfigMapper.deleteWmBarcodeConfigByConfigIds(configIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除条码配置信息
|
||||||
|
*
|
||||||
|
* @param configId 条码配置主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteWmBarcodeConfigByConfigId(Long configId)
|
||||||
|
{
|
||||||
|
return wmBarcodeConfigMapper.deleteWmBarcodeConfigByConfigId(configId);
|
||||||
|
}
|
||||||
|
}
|
121
ktg-mes/src/main/resources/mapper/wm/WmBarcodeConfigMapper.xml
Normal file
121
ktg-mes/src/main/resources/mapper/wm/WmBarcodeConfigMapper.xml
Normal file
@ -0,0 +1,121 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.ktg.mes.wm.mapper.WmBarcodeConfigMapper">
|
||||||
|
|
||||||
|
<resultMap type="WmBarcodeConfig" id="WmBarcodeConfigResult">
|
||||||
|
<result property="configId" column="config_id" />
|
||||||
|
<result property="barcodeFormart" column="barcode_formart" />
|
||||||
|
<result property="barcodeType" column="barcode_type" />
|
||||||
|
<result property="contentFormart" column="content_formart" />
|
||||||
|
<result property="contentExample" column="content_example" />
|
||||||
|
<result property="autoGenFlag" column="auto_gen_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="selectWmBarcodeConfigVo">
|
||||||
|
select config_id, barcode_formart, barcode_type, content_formart, content_example, auto_gen_flag, enable_flag, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_barcode_config
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectWmBarcodeConfigList" parameterType="WmBarcodeConfig" resultMap="WmBarcodeConfigResult">
|
||||||
|
<include refid="selectWmBarcodeConfigVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="barcodeFormart != null and barcodeFormart != ''"> and barcode_formart = #{barcodeFormart}</if>
|
||||||
|
<if test="barcodeType != null and barcodeType != ''"> and barcode_type = #{barcodeType}</if>
|
||||||
|
<if test="contentFormart != null and contentFormart != ''"> and content_formart = #{contentFormart}</if>
|
||||||
|
<if test="contentExample != null and contentExample != ''"> and content_example = #{contentExample}</if>
|
||||||
|
<if test="autoGenFlag != null and autoGenFlag != ''"> and auto_gen_flag = #{autoGenFlag}</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="selectWmBarcodeConfigByConfigId" parameterType="Long" resultMap="WmBarcodeConfigResult">
|
||||||
|
<include refid="selectWmBarcodeConfigVo"/>
|
||||||
|
where config_id = #{configId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertWmBarcodeConfig" parameterType="WmBarcodeConfig" useGeneratedKeys="true" keyProperty="configId">
|
||||||
|
insert into wm_barcode_config
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="barcodeFormart != null and barcodeFormart != ''">barcode_formart,</if>
|
||||||
|
<if test="barcodeType != null and barcodeType != ''">barcode_type,</if>
|
||||||
|
<if test="contentFormart != null and contentFormart != ''">content_formart,</if>
|
||||||
|
<if test="contentExample != null">content_example,</if>
|
||||||
|
<if test="autoGenFlag != null">auto_gen_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="barcodeFormart != null and barcodeFormart != ''">#{barcodeFormart},</if>
|
||||||
|
<if test="barcodeType != null and barcodeType != ''">#{barcodeType},</if>
|
||||||
|
<if test="contentFormart != null and contentFormart != ''">#{contentFormart},</if>
|
||||||
|
<if test="contentExample != null">#{contentExample},</if>
|
||||||
|
<if test="autoGenFlag != null">#{autoGenFlag},</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="updateWmBarcodeConfig" parameterType="WmBarcodeConfig">
|
||||||
|
update wm_barcode_config
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="barcodeFormart != null and barcodeFormart != ''">barcode_formart = #{barcodeFormart},</if>
|
||||||
|
<if test="barcodeType != null and barcodeType != ''">barcode_type = #{barcodeType},</if>
|
||||||
|
<if test="contentFormart != null and contentFormart != ''">content_formart = #{contentFormart},</if>
|
||||||
|
<if test="contentExample != null">content_example = #{contentExample},</if>
|
||||||
|
<if test="autoGenFlag != null">auto_gen_flag = #{autoGenFlag},</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="deleteWmBarcodeConfigByConfigId" parameterType="Long">
|
||||||
|
delete from wm_barcode_config where config_id = #{configId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteWmBarcodeConfigByConfigIds" parameterType="String">
|
||||||
|
delete from wm_barcode_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