diff --git a/os-mes/src/main/java/com/os/mes/base/controller/BaseFactoryController.java b/os-mes/src/main/java/com/os/mes/base/controller/BaseFactoryController.java index b8cf50b..c4b9597 100644 --- a/os-mes/src/main/java/com/os/mes/base/controller/BaseFactoryController.java +++ b/os-mes/src/main/java/com/os/mes/base/controller/BaseFactoryController.java @@ -46,6 +46,16 @@ public class BaseFactoryController extends BaseController return getDataTable(list); } + /** + * 查询工厂下拉框列表 + */ + @GetMapping("/getBaseFactoryList") + public AjaxResult getBaseFactoryList(BaseFactory baseFactory) + { + List list = baseFactoryService.selectBaseFactoryList(baseFactory); + return success(list); + } + /** * 导出工厂管理列表 */ diff --git a/os-mes/src/main/java/com/os/mes/base/controller/BaseProductLineController.java b/os-mes/src/main/java/com/os/mes/base/controller/BaseProductLineController.java new file mode 100644 index 0000000..2023d09 --- /dev/null +++ b/os-mes/src/main/java/com/os/mes/base/controller/BaseProductLineController.java @@ -0,0 +1,116 @@ +package com.os.mes.base.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.mes.base.domain.BaseProductLine; +import com.os.mes.base.service.IBaseProductLineService; +import com.os.common.utils.poi.ExcelUtil; +import com.os.common.core.page.TableDataInfo; + +/** + * 产线/工位信息Controller + * + * @author Yinq + * @date 2024-05-10 + */ +@RestController +@RequestMapping("/mes/base/baseProductLine") +public class BaseProductLineController extends BaseController +{ + @Autowired + private IBaseProductLineService baseProductLineService; + + /** + * 查询产线/工位信息列表 + */ + @PreAuthorize("@ss.hasPermi('mes/base:baseProductLine:list')") + @GetMapping("/list") + public TableDataInfo list(BaseProductLine baseProductLine) + { + startPage(); + List list = baseProductLineService.selectBaseProductLineList(baseProductLine); + return getDataTable(list); + } + + /** + * 查询产线/工位信息下拉框列表 + */ + @GetMapping("/getBaseProductLineList") + public AjaxResult getBaseProductLineList(BaseProductLine baseProductLine) + { + List list = baseProductLineService.selectBaseProductLineList(baseProductLine); + return success(list); + } + + /** + * 导出产线/工位信息列表 + */ + @PreAuthorize("@ss.hasPermi('mes/base:baseProductLine:export')") + @Log(title = "产线/工位信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, BaseProductLine baseProductLine) + { + List list = baseProductLineService.selectBaseProductLineList(baseProductLine); + ExcelUtil util = new ExcelUtil(BaseProductLine.class); + util.exportExcel(response, list, "产线/工位信息数据"); + } + + /** + * 获取产线/工位信息详细信息 + */ + @PreAuthorize("@ss.hasPermi('mes/base:baseProductLine:query')") + @GetMapping(value = "/{objId}") + public AjaxResult getInfo(@PathVariable("objId") Long objId) + { + return success(baseProductLineService.selectBaseProductLineByObjId(objId)); + } + + /** + * 新增产线/工位信息 + */ + @PreAuthorize("@ss.hasPermi('mes/base:baseProductLine:add')") + @Log(title = "产线/工位信息", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody BaseProductLine baseProductLine) + { + baseProductLine.setCreateBy(getUsername()); + return toAjax(baseProductLineService.insertBaseProductLine(baseProductLine)); + } + + /** + * 修改产线/工位信息 + */ + @PreAuthorize("@ss.hasPermi('mes/base:baseProductLine:edit')") + @Log(title = "产线/工位信息", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody BaseProductLine baseProductLine) + { + baseProductLine.setUpdateBy(getUsername()); + return toAjax(baseProductLineService.updateBaseProductLine(baseProductLine)); + } + + /** + * 删除产线/工位信息 + */ + @PreAuthorize("@ss.hasPermi('mes/base:baseProductLine:remove')") + @Log(title = "产线/工位信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{objIds}") + public AjaxResult remove(@PathVariable Long[] objIds) + { + return toAjax(baseProductLineService.deleteBaseProductLineByObjIds(objIds)); + } +} diff --git a/os-mes/src/main/java/com/os/mes/base/domain/BaseFactory.java b/os-mes/src/main/java/com/os/mes/base/domain/BaseFactory.java index a12e9bc..b2b7504 100644 --- a/os-mes/src/main/java/com/os/mes/base/domain/BaseFactory.java +++ b/os-mes/src/main/java/com/os/mes/base/domain/BaseFactory.java @@ -1,7 +1,5 @@ package com.os.mes.base.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; @@ -36,24 +34,6 @@ public class BaseFactory extends BaseEntity @Excel(name = "工厂状态", readConverterExp = "0=启用,1=停用") private String factoryStatus; - /** 创建人 */ - @Excel(name = "创建人") - private String createdBy; - - /** 创建时间 */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") - private Date createdTime; - - /** 更新人 */ - @Excel(name = "更新人") - private String updatedBy; - - /** 更新时间 */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") - private Date updatedTime; - public void setObjId(Long objId) { this.objId = objId; @@ -99,42 +79,7 @@ public class BaseFactory extends BaseEntity { return factoryStatus; } - public void setCreatedBy(String createdBy) - { - this.createdBy = createdBy; - } - public String getCreatedBy() - { - return createdBy; - } - public void setCreatedTime(Date createdTime) - { - this.createdTime = createdTime; - } - - public Date getCreatedTime() - { - return createdTime; - } - public void setUpdatedBy(String updatedBy) - { - this.updatedBy = updatedBy; - } - - public String getUpdatedBy() - { - return updatedBy; - } - public void setUpdatedTime(Date updatedTime) - { - this.updatedTime = updatedTime; - } - - public Date getUpdatedTime() - { - return updatedTime; - } @Override public String toString() { @@ -145,10 +90,6 @@ public class BaseFactory extends BaseEntity .append("factoryName", getFactoryName()) .append("factoryStatus", getFactoryStatus()) .append("remark", getRemark()) - .append("createdBy", getCreatedBy()) - .append("createdTime", getCreatedTime()) - .append("updatedBy", getUpdatedBy()) - .append("updatedTime", getUpdatedTime()) .toString(); } } diff --git a/os-mes/src/main/java/com/os/mes/base/domain/BaseProductLine.java b/os-mes/src/main/java/com/os/mes/base/domain/BaseProductLine.java new file mode 100644 index 0000000..d52d3fe --- /dev/null +++ b/os-mes/src/main/java/com/os/mes/base/domain/BaseProductLine.java @@ -0,0 +1,302 @@ +package com.os.mes.base.domain; + +import java.math.BigDecimal; +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; + +/** + * 产线/工位信息对象 base_product_line + * + * @author Yinq + * @date 2024-05-10 + */ +public class BaseProductLine extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键标识 */ + private Long objId; + + /** 所属工厂编号 */ + @Excel(name = "所属工厂编号") + private String plantCode; + + /** 所属工厂名称 */ + @Excel(name = "所属工厂名称") + private String factoryName; + + /** 产线编号 */ + @Excel(name = "产线编号") + private String productLineCode; + + /** 产线名称 */ + @Excel(name = "产线名称") + private String productLineName; + + /** 工位编号 */ + @Excel(name = "工位编号") + private String stationCode; + + /** 工位名称 */ + @Excel(name = "工位名称") + private String stationName; + + /** 类别(1产线 2工位) */ + @Excel(name = "类别", readConverterExp = "1=产线,2=工位") + private String productLineType; + + /** 启用标识(0启用 1停用) */ + @Excel(name = "启用标识", readConverterExp = "0=启用,1=停用") + private String isFlag; + + /** 创建人 */ + @Excel(name = "创建人") + private String createdBy; + + /** 创建时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + private Date createdTime; + + /** 更新人 */ + @Excel(name = "更新人") + private String updatedBy; + + /** 更新时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + private Date updatedTime; + + /** 父级编号 */ + @Excel(name = "父级编号") + private String parentId; + + /** 工位类型(1生产工位 2质检工位) */ + @Excel(name = "工位类型", readConverterExp = "1=生产工位,2=质检工位") + private String stationType; + + /** SAP工作中心编号 */ + @Excel(name = "SAP工作中心编号") + private String workCenterCode; + + /** SAP工作中心描述 */ + @Excel(name = "SAP工作中心描述") + private String workCenterName; + + /** 执行顺序 */ + @Excel(name = "执行顺序") + private String executionSort; + + /** 日产能(米) */ + @Excel(name = "日产能(米)") + private BigDecimal capacityDay; + + /** 月产能(米) */ + @Excel(name = "月产能(米)") + private BigDecimal capacityMonth; + + public String getFactoryName() { + return factoryName; + } + + public void setFactoryName(String factoryName) { + this.factoryName = factoryName; + } + + public String getStationCode() { + return stationCode; + } + + public void setStationCode(String stationCode) { + this.stationCode = stationCode; + } + + public String getStationName() { + return stationName; + } + + public void setStationName(String stationName) { + this.stationName = stationName; + } + + public void setObjId(Long objId) + { + this.objId = objId; + } + + public Long getObjId() + { + return objId; + } + public void setProductLineCode(String productLineCode) + { + this.productLineCode = productLineCode; + } + + public String getProductLineCode() + { + return productLineCode; + } + public void setProductLineName(String productLineName) + { + this.productLineName = productLineName; + } + + public String getProductLineName() + { + return productLineName; + } + public void setProductLineType(String productLineType) + { + this.productLineType = productLineType; + } + + public String getProductLineType() + { + return productLineType; + } + public void setPlantCode(String plantCode) + { + this.plantCode = plantCode; + } + + public String getPlantCode() + { + return plantCode; + } + public void setIsFlag(String isFlag) + { + this.isFlag = isFlag; + } + + public String getIsFlag() + { + return isFlag; + } + public void setCreatedBy(String createdBy) + { + this.createdBy = createdBy; + } + + public String getCreatedBy() + { + return createdBy; + } + public void setCreatedTime(Date createdTime) + { + this.createdTime = createdTime; + } + + public Date getCreatedTime() + { + return createdTime; + } + public void setUpdatedBy(String updatedBy) + { + this.updatedBy = updatedBy; + } + + public String getUpdatedBy() + { + return updatedBy; + } + public void setUpdatedTime(Date updatedTime) + { + this.updatedTime = updatedTime; + } + + public Date getUpdatedTime() + { + return updatedTime; + } + public void setParentId(String parentId) + { + this.parentId = parentId; + } + + public String getParentId() + { + return parentId; + } + public void setStationType(String stationType) + { + this.stationType = stationType; + } + + public String getStationType() + { + return stationType; + } + public void setWorkCenterCode(String workCenterCode) + { + this.workCenterCode = workCenterCode; + } + + public String getWorkCenterCode() + { + return workCenterCode; + } + public void setWorkCenterName(String workCenterName) + { + this.workCenterName = workCenterName; + } + + public String getWorkCenterName() + { + return workCenterName; + } + public void setExecutionSort(String executionSort) + { + this.executionSort = executionSort; + } + + public String getExecutionSort() + { + return executionSort; + } + public void setCapacityDay(BigDecimal capacityDay) + { + this.capacityDay = capacityDay; + } + + public BigDecimal getCapacityDay() + { + return capacityDay; + } + public void setCapacityMonth(BigDecimal capacityMonth) + { + this.capacityMonth = capacityMonth; + } + + public BigDecimal getCapacityMonth() + { + return capacityMonth; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("objId", getObjId()) + .append("productLineCode", getProductLineCode()) + .append("productLineName", getProductLineName()) + .append("productLineType", getProductLineType()) + .append("plantCode", getPlantCode()) + .append("isFlag", getIsFlag()) + .append("createdBy", getCreatedBy()) + .append("createdTime", getCreatedTime()) + .append("updatedBy", getUpdatedBy()) + .append("updatedTime", getUpdatedTime()) + .append("parentId", getParentId()) + .append("stationType", getStationType()) + .append("workCenterCode", getWorkCenterCode()) + .append("workCenterName", getWorkCenterName()) + .append("executionSort", getExecutionSort()) + .append("capacityDay", getCapacityDay()) + .append("capacityMonth", getCapacityMonth()) + .toString(); + } +} diff --git a/os-mes/src/main/java/com/os/mes/base/mapper/BaseProductLineMapper.java b/os-mes/src/main/java/com/os/mes/base/mapper/BaseProductLineMapper.java new file mode 100644 index 0000000..c532758 --- /dev/null +++ b/os-mes/src/main/java/com/os/mes/base/mapper/BaseProductLineMapper.java @@ -0,0 +1,61 @@ +package com.os.mes.base.mapper; + +import java.util.List; +import com.os.mes.base.domain.BaseProductLine; + +/** + * 产线/工位信息Mapper接口 + * + * @author Yinq + * @date 2024-05-10 + */ +public interface BaseProductLineMapper +{ + /** + * 查询产线/工位信息 + * + * @param objId 产线/工位信息主键 + * @return 产线/工位信息 + */ + public BaseProductLine selectBaseProductLineByObjId(Long objId); + + /** + * 查询产线/工位信息列表 + * + * @param baseProductLine 产线/工位信息 + * @return 产线/工位信息集合 + */ + public List selectBaseProductLineList(BaseProductLine baseProductLine); + + /** + * 新增产线/工位信息 + * + * @param baseProductLine 产线/工位信息 + * @return 结果 + */ + public int insertBaseProductLine(BaseProductLine baseProductLine); + + /** + * 修改产线/工位信息 + * + * @param baseProductLine 产线/工位信息 + * @return 结果 + */ + public int updateBaseProductLine(BaseProductLine baseProductLine); + + /** + * 删除产线/工位信息 + * + * @param objId 产线/工位信息主键 + * @return 结果 + */ + public int deleteBaseProductLineByObjId(Long objId); + + /** + * 批量删除产线/工位信息 + * + * @param objIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteBaseProductLineByObjIds(Long[] objIds); +} diff --git a/os-mes/src/main/java/com/os/mes/base/service/IBaseProductLineService.java b/os-mes/src/main/java/com/os/mes/base/service/IBaseProductLineService.java new file mode 100644 index 0000000..158dbb6 --- /dev/null +++ b/os-mes/src/main/java/com/os/mes/base/service/IBaseProductLineService.java @@ -0,0 +1,61 @@ +package com.os.mes.base.service; + +import java.util.List; +import com.os.mes.base.domain.BaseProductLine; + +/** + * 产线/工位信息Service接口 + * + * @author Yinq + * @date 2024-05-10 + */ +public interface IBaseProductLineService +{ + /** + * 查询产线/工位信息 + * + * @param objId 产线/工位信息主键 + * @return 产线/工位信息 + */ + public BaseProductLine selectBaseProductLineByObjId(Long objId); + + /** + * 查询产线/工位信息列表 + * + * @param baseProductLine 产线/工位信息 + * @return 产线/工位信息集合 + */ + public List selectBaseProductLineList(BaseProductLine baseProductLine); + + /** + * 新增产线/工位信息 + * + * @param baseProductLine 产线/工位信息 + * @return 结果 + */ + public int insertBaseProductLine(BaseProductLine baseProductLine); + + /** + * 修改产线/工位信息 + * + * @param baseProductLine 产线/工位信息 + * @return 结果 + */ + public int updateBaseProductLine(BaseProductLine baseProductLine); + + /** + * 批量删除产线/工位信息 + * + * @param objIds 需要删除的产线/工位信息主键集合 + * @return 结果 + */ + public int deleteBaseProductLineByObjIds(Long[] objIds); + + /** + * 删除产线/工位信息信息 + * + * @param objId 产线/工位信息主键 + * @return 结果 + */ + public int deleteBaseProductLineByObjId(Long objId); +} diff --git a/os-mes/src/main/java/com/os/mes/base/service/impl/BaseFactoryServiceImpl.java b/os-mes/src/main/java/com/os/mes/base/service/impl/BaseFactoryServiceImpl.java index d24216e..a35461d 100644 --- a/os-mes/src/main/java/com/os/mes/base/service/impl/BaseFactoryServiceImpl.java +++ b/os-mes/src/main/java/com/os/mes/base/service/impl/BaseFactoryServiceImpl.java @@ -1,6 +1,8 @@ package com.os.mes.base.service.impl; import java.util.List; + +import com.os.common.utils.DateUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.os.mes.base.mapper.BaseFactoryMapper; @@ -52,6 +54,7 @@ public class BaseFactoryServiceImpl implements IBaseFactoryService @Override public int insertBaseFactory(BaseFactory baseFactory) { + baseFactory.setCreateTime(DateUtils.getNowDate()); return baseFactoryMapper.insertBaseFactory(baseFactory); } @@ -64,6 +67,7 @@ public class BaseFactoryServiceImpl implements IBaseFactoryService @Override public int updateBaseFactory(BaseFactory baseFactory) { + baseFactory.setUpdateTime(DateUtils.getNowDate()); return baseFactoryMapper.updateBaseFactory(baseFactory); } diff --git a/os-mes/src/main/java/com/os/mes/base/service/impl/BaseProductLineServiceImpl.java b/os-mes/src/main/java/com/os/mes/base/service/impl/BaseProductLineServiceImpl.java new file mode 100644 index 0000000..7976866 --- /dev/null +++ b/os-mes/src/main/java/com/os/mes/base/service/impl/BaseProductLineServiceImpl.java @@ -0,0 +1,97 @@ +package com.os.mes.base.service.impl; + +import java.util.List; + +import com.os.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.os.mes.base.mapper.BaseProductLineMapper; +import com.os.mes.base.domain.BaseProductLine; +import com.os.mes.base.service.IBaseProductLineService; + +/** + * 产线/工位信息Service业务层处理 + * + * @author Yinq + * @date 2024-05-10 + */ +@Service +public class BaseProductLineServiceImpl implements IBaseProductLineService +{ + @Autowired + private BaseProductLineMapper baseProductLineMapper; + + /** + * 查询产线/工位信息 + * + * @param objId 产线/工位信息主键 + * @return 产线/工位信息 + */ + @Override + public BaseProductLine selectBaseProductLineByObjId(Long objId) + { + return baseProductLineMapper.selectBaseProductLineByObjId(objId); + } + + /** + * 查询产线/工位信息列表 + * + * @param baseProductLine 产线/工位信息 + * @return 产线/工位信息 + */ + @Override + public List selectBaseProductLineList(BaseProductLine baseProductLine) + { + return baseProductLineMapper.selectBaseProductLineList(baseProductLine); + } + + /** + * 新增产线/工位信息 + * + * @param baseProductLine 产线/工位信息 + * @return 结果 + */ + @Override + public int insertBaseProductLine(BaseProductLine baseProductLine) + { + baseProductLine.setCreateTime(DateUtils.getNowDate()); + return baseProductLineMapper.insertBaseProductLine(baseProductLine); + } + + /** + * 修改产线/工位信息 + * + * @param baseProductLine 产线/工位信息 + * @return 结果 + */ + @Override + public int updateBaseProductLine(BaseProductLine baseProductLine) + { + baseProductLine.setUpdateTime(DateUtils.getNowDate()); + return baseProductLineMapper.updateBaseProductLine(baseProductLine); + } + + /** + * 批量删除产线/工位信息 + * + * @param objIds 需要删除的产线/工位信息主键 + * @return 结果 + */ + @Override + public int deleteBaseProductLineByObjIds(Long[] objIds) + { + return baseProductLineMapper.deleteBaseProductLineByObjIds(objIds); + } + + /** + * 删除产线/工位信息信息 + * + * @param objId 产线/工位信息主键 + * @return 结果 + */ + @Override + public int deleteBaseProductLineByObjId(Long objId) + { + return baseProductLineMapper.deleteBaseProductLineByObjId(objId); + } +} diff --git a/os-mes/src/main/resources/mapper/mes/base/BaseFactoryMapper.xml b/os-mes/src/main/resources/mapper/mes/base/BaseFactoryMapper.xml index 4f4aea6..56f5f68 100644 --- a/os-mes/src/main/resources/mapper/mes/base/BaseFactoryMapper.xml +++ b/os-mes/src/main/resources/mapper/mes/base/BaseFactoryMapper.xml @@ -11,10 +11,10 @@ - - - - + + + + @@ -24,10 +24,10 @@ factory_name, factory_status, remark, - created_by, - created_time, - updated_by, - updated_time + create_by, + create_time, + update_by, + update_time from base_factory @@ -42,10 +42,10 @@ '%') and factory_status = #{factoryStatus} - and created_by = #{createdBy} - and created_time = #{createdTime} - and updated_by = #{updatedBy} - and updated_time = #{updatedTime} + and create_by = #{createBy} + and create_time = #{createTime} + and update_by = #{updateBy} + and update_time = #{updateTime} @@ -62,10 +62,10 @@ factory_name, factory_status, remark, - created_by, - created_time, - updated_by, - updated_time, + create_by, + create_time, + update_by, + update_time, #{companyName}, @@ -73,10 +73,10 @@ #{factoryName}, #{factoryStatus}, #{remark}, - #{createdBy}, - #{createdTime}, - #{updatedBy}, - #{updatedTime}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, @@ -88,10 +88,10 @@ factory_name = #{factoryName}, factory_status = #{factoryStatus}, remark = #{remark}, - created_by = #{createdBy}, - created_time = #{createdTime}, - updated_by = #{updatedBy}, - updated_time = #{updatedTime}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, where obj_id = #{objId} diff --git a/os-mes/src/main/resources/mapper/mes/base/BaseProductLineMapper.xml b/os-mes/src/main/resources/mapper/mes/base/BaseProductLineMapper.xml new file mode 100644 index 0000000..cc21142 --- /dev/null +++ b/os-mes/src/main/resources/mapper/mes/base/BaseProductLineMapper.xml @@ -0,0 +1,164 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select pl1.obj_id, + pl1.product_line_code, + pl1.product_line_name, + pl2.product_line_code station_code, + pl2.product_line_name station_name, + pl1.product_line_type, + pl1.plant_code, + bf.factory_name, + pl1.is_flag, + pl1.create_by, + pl1.create_time, + pl1.update_by, + pl1.update_time, + pl1.parent_id, + pl1.station_type, + pl1.work_center_code, + pl1.work_center_name, + pl1.execution_sort, + pl1.capacity_day, + pl1.capacity_month + from base_product_line pl1 + left join base_product_line pl2 on pl2.product_line_code = pl1.parent_id + left join base_factory bf on bf.factory_code = pl1.plant_code + + + + + + + + insert into base_product_line + + product_line_code, + product_line_name, + product_line_type, + plant_code, + is_flag, + create_by, + create_time, + update_by, + update_time, + parent_id, + station_type, + work_center_code, + work_center_name, + execution_sort, + capacity_day, + capacity_month, + + + #{productLineCode}, + #{productLineName}, + #{productLineType}, + #{plantCode}, + #{isFlag}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{parentId}, + #{stationType}, + #{workCenterCode}, + #{workCenterName}, + #{executionSort}, + #{capacityDay}, + #{capacityMonth}, + + + + + update base_product_line + + product_line_code = #{productLineCode}, + product_line_name = #{productLineName}, + product_line_type = #{productLineType}, + plant_code = #{plantCode}, + is_flag = #{isFlag}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + parent_id = #{parentId}, + station_type = #{stationType}, + work_center_code = #{workCenterCode}, + work_center_name = #{workCenterName}, + execution_sort = #{executionSort}, + capacity_day = #{capacityDay}, + capacity_month = #{capacityMonth}, + + where obj_id = #{objId} + + + + delete + from base_product_line + where obj_id = #{objId} + + + + delete from base_product_line where obj_id in + + #{objId} + + + \ No newline at end of file