From 208f07eeb9f441e5d2c85d27047b96676140bd02 Mon Sep 17 00:00:00 2001 From: yinq Date: Sat, 11 May 2024 15:52:39 +0800 Subject: [PATCH] =?UTF-8?q?change=20-=20add=E7=94=9F=E4=BA=A7BOM?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EmsRecordDnbInstantController.java | 100 +++++++ .../record/domain/EmsRecordDnbInstant.java | 251 ++++++++++++++++++ .../mapper/EmsRecordDnbInstantMapper.java | 61 +++++ .../service/IEmsRecordDnbInstantService.java | 61 +++++ .../impl/EmsRecordDnbInstantServiceImpl.java | 87 ++++++ .../ems/base/EmsBaseMonitorWorkUnitMapper.xml | 2 +- .../ems/record/EmsRecordDnbInstantMapper.xml | 140 ++++++++++ .../mapper/generator/GenTableMapper.xml | 1 + .../os/mes/base/domain/BaseMaterialInfo.java | 20 +- .../controller/ProdBomInfoController.java | 109 ++++++++ .../com/os/mes/prod/domain/ProdBomInfo.java | 237 +++++++++++++++++ .../os/mes/prod/mapper/ProdBomInfoMapper.java | 63 +++++ .../mes/prod/service/IProdBomInfoService.java | 61 +++++ .../service/impl/ProdBomInfoServiceImpl.java | 108 ++++++++ .../mes/base/BaseMaterialInfoMapper.xml | 125 +++++---- .../mapper/mes/prod/ProdBomInfoMapper.xml | 159 +++++++++++ 16 files changed, 1536 insertions(+), 49 deletions(-) create mode 100644 os-ems/src/main/java/com/os/ems/record/controller/EmsRecordDnbInstantController.java create mode 100644 os-ems/src/main/java/com/os/ems/record/domain/EmsRecordDnbInstant.java create mode 100644 os-ems/src/main/java/com/os/ems/record/mapper/EmsRecordDnbInstantMapper.java create mode 100644 os-ems/src/main/java/com/os/ems/record/service/IEmsRecordDnbInstantService.java create mode 100644 os-ems/src/main/java/com/os/ems/record/service/impl/EmsRecordDnbInstantServiceImpl.java create mode 100644 os-ems/src/main/resources/mapper/ems/record/EmsRecordDnbInstantMapper.xml create mode 100644 os-mes/src/main/java/com/os/mes/prod/controller/ProdBomInfoController.java create mode 100644 os-mes/src/main/java/com/os/mes/prod/domain/ProdBomInfo.java create mode 100644 os-mes/src/main/java/com/os/mes/prod/mapper/ProdBomInfoMapper.java create mode 100644 os-mes/src/main/java/com/os/mes/prod/service/IProdBomInfoService.java create mode 100644 os-mes/src/main/java/com/os/mes/prod/service/impl/ProdBomInfoServiceImpl.java create mode 100644 os-mes/src/main/resources/mapper/mes/prod/ProdBomInfoMapper.xml diff --git a/os-ems/src/main/java/com/os/ems/record/controller/EmsRecordDnbInstantController.java b/os-ems/src/main/java/com/os/ems/record/controller/EmsRecordDnbInstantController.java new file mode 100644 index 0000000..e3a8123 --- /dev/null +++ b/os-ems/src/main/java/com/os/ems/record/controller/EmsRecordDnbInstantController.java @@ -0,0 +1,100 @@ +package com.os.ems.record.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.os.common.annotation.Log; +import com.os.common.core.controller.BaseController; +import com.os.common.core.domain.AjaxResult; +import com.os.common.enums.BusinessType; +import com.os.ems.record.domain.EmsRecordDnbInstant; +import com.os.ems.record.service.IEmsRecordDnbInstantService; +import com.os.common.utils.poi.ExcelUtil; +import com.os.common.core.page.TableDataInfo; + +/** + * 电实时数据Controller + * + * @author Yinq + * @date 2024-05-11 + */ +@RestController +@RequestMapping("/ems/record/recordDnbInstant") +public class EmsRecordDnbInstantController extends BaseController { + @Autowired + private IEmsRecordDnbInstantService emsRecordDnbInstantService; + + /** + * 查询电实时数据列表 + */ + @PreAuthorize("@ss.hasPermi('ems/record:recordDnbInstant:list')") + @GetMapping("/list") + public TableDataInfo list(EmsRecordDnbInstant emsRecordDnbInstant) { + startPage(); + List list = emsRecordDnbInstantService.selectEmsRecordDnbInstantList(emsRecordDnbInstant); + return getDataTable(list); + } + + /** + * 导出电实时数据列表 + */ + @PreAuthorize("@ss.hasPermi('ems/record:recordDnbInstant:export')") + @Log(title = "电实时数据", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, EmsRecordDnbInstant emsRecordDnbInstant) { + List list = emsRecordDnbInstantService.selectEmsRecordDnbInstantList(emsRecordDnbInstant); + ExcelUtil util = new ExcelUtil(EmsRecordDnbInstant.class); + util.exportExcel(response, list, "电实时数据数据"); + } + + /** + * 获取电实时数据详细信息 + */ + @PreAuthorize("@ss.hasPermi('ems/record:recordDnbInstant:query')") + @GetMapping(value = "/{objId}") + public AjaxResult getInfo(@PathVariable("objId") Long objId) { + return success(emsRecordDnbInstantService.selectEmsRecordDnbInstantByObjId(objId)); + } + + /** + * 新增电实时数据 + */ + @PreAuthorize("@ss.hasPermi('ems/record:recordDnbInstant:add')") + @Log(title = "电实时数据", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody EmsRecordDnbInstant emsRecordDnbInstant) { + emsRecordDnbInstant.setCreateBy(getUsername()); + return toAjax(emsRecordDnbInstantService.insertEmsRecordDnbInstant(emsRecordDnbInstant)); + } + + /** + * 修改电实时数据 + */ + @PreAuthorize("@ss.hasPermi('ems/record:recordDnbInstant:edit')") + @Log(title = "电实时数据", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody EmsRecordDnbInstant emsRecordDnbInstant) { + emsRecordDnbInstant.setUpdateBy(getUsername()); + return toAjax(emsRecordDnbInstantService.updateEmsRecordDnbInstant(emsRecordDnbInstant)); + } + + /** + * 删除电实时数据 + */ + @PreAuthorize("@ss.hasPermi('ems/record:recordDnbInstant:remove')") + @Log(title = "电实时数据", businessType = BusinessType.DELETE) + @DeleteMapping("/{objIds}") + public AjaxResult remove(@PathVariable Long[] objIds) { + return toAjax(emsRecordDnbInstantService.deleteEmsRecordDnbInstantByObjIds(objIds)); + } +} diff --git a/os-ems/src/main/java/com/os/ems/record/domain/EmsRecordDnbInstant.java b/os-ems/src/main/java/com/os/ems/record/domain/EmsRecordDnbInstant.java new file mode 100644 index 0000000..fc61ca7 --- /dev/null +++ b/os-ems/src/main/java/com/os/ems/record/domain/EmsRecordDnbInstant.java @@ -0,0 +1,251 @@ +package com.os.ems.record.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.os.common.annotation.Excel; +import com.os.common.core.domain.BaseEntity; + +/** + * 电实时数据对象 ems_record_dnb_instant + * + * @author Yinq + * @date 2024-05-11 + */ +public class EmsRecordDnbInstant extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** + * 编号 + */ + private Long objId; + + /** + * 计量设备编号 + */ + @Excel(name = "计量设备编号") + private String monitorId; + + /** + * 采集时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "采集时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + private Date collectTime; + + /** + * A项电压 + */ + @Excel(name = "A项电压") + private Long vA; + + /** + * B项电压 + */ + @Excel(name = "B项电压") + private Long vB; + + /** + * C项电压 + */ + @Excel(name = "C项电压") + private Long vC; + + /** + * A项电流 + */ + @Excel(name = "A项电流") + private Long iA; + + /** + * B项电流 + */ + @Excel(name = "B项电流") + private Long iB; + + /** + * C项电流 + */ + @Excel(name = "C项电流") + private Long iC; + + /** + * 记录时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "记录时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + private Date recordTime; + + /** + * 功率因数 + */ + @Excel(name = "功率因数") + private Long glys; + + /** + * 正向有功 + */ + @Excel(name = "正向有功") + private Long zxyg; + + /** + * 有功功率 + */ + @Excel(name = "有功功率") + private Long activePower; + + /** + * 无功功率 + */ + @Excel(name = "无功功率") + private Long reactivePower; + + /** + * 采集方式(0自动 1手动) + */ + @Excel(name = "采集方式", readConverterExp = "0=自动,1=手动") + private Long collectType; + + public void setObjId(Long objId) { + this.objId = objId; + } + + public Long getObjId() { + return objId; + } + + public void setMonitorId(String monitorId) { + this.monitorId = monitorId; + } + + public String getMonitorId() { + return monitorId; + } + + public void setCollectTime(Date collectTime) { + this.collectTime = collectTime; + } + + public Date getCollectTime() { + return collectTime; + } + + public void setVA(Long vA) { + this.vA = vA; + } + + public Long getVA() { + return vA; + } + + public void setVB(Long vB) { + this.vB = vB; + } + + public Long getVB() { + return vB; + } + + public void setVC(Long vC) { + this.vC = vC; + } + + public Long getVC() { + return vC; + } + + public void setIA(Long iA) { + this.iA = iA; + } + + public Long getIA() { + return iA; + } + + public void setIB(Long iB) { + this.iB = iB; + } + + public Long getIB() { + return iB; + } + + public void setIC(Long iC) { + this.iC = iC; + } + + public Long getIC() { + return iC; + } + + public void setRecordTime(Date recordTime) { + this.recordTime = recordTime; + } + + public Date getRecordTime() { + return recordTime; + } + + public void setGlys(Long glys) { + this.glys = glys; + } + + public Long getGlys() { + return glys; + } + + public void setZxyg(Long zxyg) { + this.zxyg = zxyg; + } + + public Long getZxyg() { + return zxyg; + } + + public void setActivePower(Long activePower) { + this.activePower = activePower; + } + + public Long getActivePower() { + return activePower; + } + + public void setReactivePower(Long reactivePower) { + this.reactivePower = reactivePower; + } + + public Long getReactivePower() { + return reactivePower; + } + + public void setCollectType(Long collectType) { + this.collectType = collectType; + } + + public Long getCollectType() { + return collectType; + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("objId", getObjId()) + .append("monitorId", getMonitorId()) + .append("collectTime", getCollectTime()) + .append("vA", getVA()) + .append("vB", getVB()) + .append("vC", getVC()) + .append("iA", getIA()) + .append("iB", getIB()) + .append("iC", getIC()) + .append("recordTime", getRecordTime()) + .append("glys", getGlys()) + .append("zxyg", getZxyg()) + .append("activePower", getActivePower()) + .append("reactivePower", getReactivePower()) + .append("collectType", getCollectType()) + .toString(); + } +} diff --git a/os-ems/src/main/java/com/os/ems/record/mapper/EmsRecordDnbInstantMapper.java b/os-ems/src/main/java/com/os/ems/record/mapper/EmsRecordDnbInstantMapper.java new file mode 100644 index 0000000..55b37d4 --- /dev/null +++ b/os-ems/src/main/java/com/os/ems/record/mapper/EmsRecordDnbInstantMapper.java @@ -0,0 +1,61 @@ +package com.os.ems.record.mapper; + +import java.util.List; +import com.os.ems.record.domain.EmsRecordDnbInstant; + +/** + * 电实时数据Mapper接口 + * + * @author Yinq + * @date 2024-05-11 + */ +public interface EmsRecordDnbInstantMapper +{ + /** + * 查询电实时数据 + * + * @param objId 电实时数据主键 + * @return 电实时数据 + */ + public EmsRecordDnbInstant selectEmsRecordDnbInstantByObjId(Long objId); + + /** + * 查询电实时数据列表 + * + * @param emsRecordDnbInstant 电实时数据 + * @return 电实时数据集合 + */ + public List selectEmsRecordDnbInstantList(EmsRecordDnbInstant emsRecordDnbInstant); + + /** + * 新增电实时数据 + * + * @param emsRecordDnbInstant 电实时数据 + * @return 结果 + */ + public int insertEmsRecordDnbInstant(EmsRecordDnbInstant emsRecordDnbInstant); + + /** + * 修改电实时数据 + * + * @param emsRecordDnbInstant 电实时数据 + * @return 结果 + */ + public int updateEmsRecordDnbInstant(EmsRecordDnbInstant emsRecordDnbInstant); + + /** + * 删除电实时数据 + * + * @param objId 电实时数据主键 + * @return 结果 + */ + public int deleteEmsRecordDnbInstantByObjId(Long objId); + + /** + * 批量删除电实时数据 + * + * @param objIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteEmsRecordDnbInstantByObjIds(Long[] objIds); +} diff --git a/os-ems/src/main/java/com/os/ems/record/service/IEmsRecordDnbInstantService.java b/os-ems/src/main/java/com/os/ems/record/service/IEmsRecordDnbInstantService.java new file mode 100644 index 0000000..769ee3f --- /dev/null +++ b/os-ems/src/main/java/com/os/ems/record/service/IEmsRecordDnbInstantService.java @@ -0,0 +1,61 @@ +package com.os.ems.record.service; + +import java.util.List; + +import com.os.ems.record.domain.EmsRecordDnbInstant; + +/** + * 电实时数据Service接口 + * + * @author Yinq + * @date 2024-05-11 + */ +public interface IEmsRecordDnbInstantService { + /** + * 查询电实时数据 + * + * @param objId 电实时数据主键 + * @return 电实时数据 + */ + public EmsRecordDnbInstant selectEmsRecordDnbInstantByObjId(Long objId); + + /** + * 查询电实时数据列表 + * + * @param emsRecordDnbInstant 电实时数据 + * @return 电实时数据集合 + */ + public List selectEmsRecordDnbInstantList(EmsRecordDnbInstant emsRecordDnbInstant); + + /** + * 新增电实时数据 + * + * @param emsRecordDnbInstant 电实时数据 + * @return 结果 + */ + public int insertEmsRecordDnbInstant(EmsRecordDnbInstant emsRecordDnbInstant); + + /** + * 修改电实时数据 + * + * @param emsRecordDnbInstant 电实时数据 + * @return 结果 + */ + public int updateEmsRecordDnbInstant(EmsRecordDnbInstant emsRecordDnbInstant); + + /** + * 批量删除电实时数据 + * + * @param objIds 需要删除的电实时数据主键集合 + * @return 结果 + */ + public int deleteEmsRecordDnbInstantByObjIds(Long[] objIds); + + /** + * 删除电实时数据信息 + * + * @param objId 电实时数据主键 + * @return 结果 + */ + public int deleteEmsRecordDnbInstantByObjId(Long objId); +} diff --git a/os-ems/src/main/java/com/os/ems/record/service/impl/EmsRecordDnbInstantServiceImpl.java b/os-ems/src/main/java/com/os/ems/record/service/impl/EmsRecordDnbInstantServiceImpl.java new file mode 100644 index 0000000..b16f0d6 --- /dev/null +++ b/os-ems/src/main/java/com/os/ems/record/service/impl/EmsRecordDnbInstantServiceImpl.java @@ -0,0 +1,87 @@ +package com.os.ems.record.service.impl; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.os.ems.record.mapper.EmsRecordDnbInstantMapper; +import com.os.ems.record.domain.EmsRecordDnbInstant; +import com.os.ems.record.service.IEmsRecordDnbInstantService; + +/** + * 电实时数据Service业务层处理 + * + * @author Yinq + * @date 2024-05-11 + */ +@Service +public class EmsRecordDnbInstantServiceImpl implements IEmsRecordDnbInstantService { + @Autowired + private EmsRecordDnbInstantMapper emsRecordDnbInstantMapper; + + /** + * 查询电实时数据 + * + * @param objId 电实时数据主键 + * @return 电实时数据 + */ + @Override + public EmsRecordDnbInstant selectEmsRecordDnbInstantByObjId(Long objId) { + return emsRecordDnbInstantMapper.selectEmsRecordDnbInstantByObjId(objId); + } + + /** + * 查询电实时数据列表 + * + * @param emsRecordDnbInstant 电实时数据 + * @return 电实时数据 + */ + @Override + public List selectEmsRecordDnbInstantList(EmsRecordDnbInstant emsRecordDnbInstant) { + return emsRecordDnbInstantMapper.selectEmsRecordDnbInstantList(emsRecordDnbInstant); + } + + /** + * 新增电实时数据 + * + * @param emsRecordDnbInstant 电实时数据 + * @return 结果 + */ + @Override + public int insertEmsRecordDnbInstant(EmsRecordDnbInstant emsRecordDnbInstant) { + return emsRecordDnbInstantMapper.insertEmsRecordDnbInstant(emsRecordDnbInstant); + } + + /** + * 修改电实时数据 + * + * @param emsRecordDnbInstant 电实时数据 + * @return 结果 + */ + @Override + public int updateEmsRecordDnbInstant(EmsRecordDnbInstant emsRecordDnbInstant) { + return emsRecordDnbInstantMapper.updateEmsRecordDnbInstant(emsRecordDnbInstant); + } + + /** + * 批量删除电实时数据 + * + * @param objIds 需要删除的电实时数据主键 + * @return 结果 + */ + @Override + public int deleteEmsRecordDnbInstantByObjIds(Long[] objIds) { + return emsRecordDnbInstantMapper.deleteEmsRecordDnbInstantByObjIds(objIds); + } + + /** + * 删除电实时数据信息 + * + * @param objId 电实时数据主键 + * @return 结果 + */ + @Override + public int deleteEmsRecordDnbInstantByObjId(Long objId) { + return emsRecordDnbInstantMapper.deleteEmsRecordDnbInstantByObjId(objId); + } +} diff --git a/os-ems/src/main/resources/mapper/ems/base/EmsBaseMonitorWorkUnitMapper.xml b/os-ems/src/main/resources/mapper/ems/base/EmsBaseMonitorWorkUnitMapper.xml index 334e6cc..05f7a5d 100644 --- a/os-ems/src/main/resources/mapper/ems/base/EmsBaseMonitorWorkUnitMapper.xml +++ b/os-ems/src/main/resources/mapper/ems/base/EmsBaseMonitorWorkUnitMapper.xml @@ -7,7 +7,7 @@ - + diff --git a/os-ems/src/main/resources/mapper/ems/record/EmsRecordDnbInstantMapper.xml b/os-ems/src/main/resources/mapper/ems/record/EmsRecordDnbInstantMapper.xml new file mode 100644 index 0000000..b2bc1b9 --- /dev/null +++ b/os-ems/src/main/resources/mapper/ems/record/EmsRecordDnbInstantMapper.xml @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + + + + + + + + + + + select obj_id, + monitor_id, + collect_time, + v_a, + v_b, + v_c, + i_a, + i_b, + i_c, + record_time, + glys, + zxyg, + active_power, + reactive_power, + collect_type + from ems_record_dnb_instant + + + + + + + + insert into ems_record_dnb_instant + + monitor_id, + collect_time, + v_a, + v_b, + v_c, + i_a, + i_b, + i_c, + record_time, + glys, + zxyg, + active_power, + reactive_power, + collect_type, + + + #{monitorId}, + #{collectTime}, + #{vA}, + #{vB}, + #{vC}, + #{iA}, + #{iB}, + #{iC}, + #{recordTime}, + #{glys}, + #{zxyg}, + #{activePower}, + #{reactivePower}, + #{collectType}, + + + + + update ems_record_dnb_instant + + monitor_id = #{monitorId}, + collect_time = #{collectTime}, + v_a = #{vA}, + v_b = #{vB}, + v_c = #{vC}, + i_a = #{iA}, + i_b = #{iB}, + i_c = #{iC}, + record_time = #{recordTime}, + glys = #{glys}, + zxyg = #{zxyg}, + active_power = #{activePower}, + reactive_power = #{reactivePower}, + collect_type = #{collectType}, + + where obj_id = #{objId} + + + + delete + from ems_record_dnb_instant + where obj_id = #{objId} + + + + delete from ems_record_dnb_instant where obj_id in + + #{objId} + + + \ No newline at end of file diff --git a/os-generator/src/main/resources/mapper/generator/GenTableMapper.xml b/os-generator/src/main/resources/mapper/generator/GenTableMapper.xml index 400932e..4b94bd6 100644 --- a/os-generator/src/main/resources/mapper/generator/GenTableMapper.xml +++ b/os-generator/src/main/resources/mapper/generator/GenTableMapper.xml @@ -76,6 +76,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and datediff(d, create_time, #{params.endTime}) =]]> 0 + order by create_time desc - - and material_code = #{materialCode} - and material_name like concat('%', #{materialName}, '%') - and material_categories = #{materialCategories} - and material_subclass = #{materialSubclass} - and material_type = #{materialType} - and material_unit = #{materialUnit} - and unit_price = #{unitPrice} - and material_specifications = #{materialSpecifications} - and factory_code = #{factoryCode} - and product_line_code = #{productLineCode} - and is_flag = #{isFlag} - and increment_date = #{incrementDate} - and product_code = #{productCode} - and product_name like concat('%', #{productName}, '%') + + and bmi.material_code = #{materialCode} + and bmi.material_name like concat('%', #{materialName}, + '%') + + and bmi.material_categories = + #{materialCategories} + + and bmi.material_subclass = + #{materialSubclass} + + and bmi.material_type = #{materialType} + and bmi.material_unit = #{materialUnit} + and bmi.unit_price = #{unitPrice} + and bmi.material_specifications = + #{materialSpecifications} + + and bmi.factory_code = #{factoryCode} + and bmi.product_line_code = #{productLineCode} + + and bmi.is_flag = #{isFlag} + and bmi.increment_date = #{incrementDate} + and bmi.product_code = #{productCode} + and bmi.product_name like concat('%', #{productName}, + '%') + - + - + insert into base_material_info @@ -76,7 +109,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" increment_date, product_code, product_name, - + #{materialCode}, #{materialName}, @@ -96,7 +129,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{incrementDate}, #{productCode}, #{productName}, - + @@ -125,11 +158,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - delete from base_material_info where obj_id = #{objId} + delete + from base_material_info + where obj_id = #{objId} - delete from base_material_info where obj_id in + delete from base_material_info where obj_id in #{objId} diff --git a/os-mes/src/main/resources/mapper/mes/prod/ProdBomInfoMapper.xml b/os-mes/src/main/resources/mapper/mes/prod/ProdBomInfoMapper.xml new file mode 100644 index 0000000..91934f2 --- /dev/null +++ b/os-mes/src/main/resources/mapper/mes/prod/ProdBomInfoMapper.xml @@ -0,0 +1,159 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + select obj_id, + bom_code, + material_code, + material_name, + material_type, + standard_amount, + parent_id, + parent_name, + factory_code, + sort, + vbeln, + vbpos, + ancestors, + is_flag, + create_by, + create_time, + update_by, + update_time + from prod_bom_info + + + + + + + + insert into prod_bom_info + + bom_code, + material_code, + material_name, + material_type, + standard_amount, + parent_id, + parent_name, + factory_code, + sort, + vbeln, + vbpos, + ancestors, + is_flag, + create_by, + create_time, + update_by, + update_time, + + + #{bomCode}, + #{materialCode}, + #{materialName}, + #{materialType}, + #{standardAmount}, + #{parentId}, + #{parentName}, + #{factoryCode}, + #{sort}, + #{vbeln}, + #{vbpos}, + #{ancestors}, + #{isFlag}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update prod_bom_info + + bom_code = #{bomCode}, + material_code = #{materialCode}, + material_name = #{materialName}, + material_type = #{materialType}, + standard_amount = #{standardAmount}, + parent_id = #{parentId}, + parent_name = #{parentName}, + factory_code = #{factoryCode}, + sort = #{sort}, + vbeln = #{vbeln}, + vbpos = #{vbpos}, + ancestors = #{ancestors}, + is_flag = #{isFlag}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where obj_id = #{objId} + + + + delete + from prod_bom_info + where obj_id = #{objId} + + + + delete from prod_bom_info where obj_id in + + #{objId} + + + \ No newline at end of file