diff --git a/op-modules/op-mes/src/main/java/com/op/mes/controller/BaseProductAttachedController.java b/op-modules/op-mes/src/main/java/com/op/mes/controller/BaseProductAttachedController.java new file mode 100644 index 00000000..b0acefb9 --- /dev/null +++ b/op-modules/op-mes/src/main/java/com/op/mes/controller/BaseProductAttachedController.java @@ -0,0 +1,113 @@ +package com.op.mes.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +import com.op.common.core.utils.poi.ExcelUtil; +import com.op.common.core.web.controller.BaseController; +import com.op.common.core.web.domain.AjaxResult; +import com.op.common.core.web.page.TableDataInfo; +import com.op.common.log.enums.BusinessType; +import com.op.common.security.annotation.RequiresPermissions; +import com.op.mes.domain.BaseProductAttached; +import com.op.mes.service.IBaseProductAttachedService; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +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.op.common.log.annotation.Log; + +/** + * 物料附属信息Controller + * + * @author ruoyi + * @date 2024-07-04 + */ +@RestController +@RequestMapping("/attached") +public class BaseProductAttachedController extends BaseController +{ + @Autowired + private IBaseProductAttachedService baseProductAttachedService; + + /** + * 查询物料附属信息列表 + */ +// @PreAuthorize("@ss.hasPermi('mes:attached:list')") + @RequiresPermissions("mes:attached:list") + @GetMapping("/list") + public TableDataInfo list(BaseProductAttached baseProductAttached) + { + startPage(); + List list = baseProductAttachedService.selectBaseProductAttachedList(baseProductAttached); + return getDataTable(list); + } + + /** + * 导出物料附属信息列表 + */ +// @PreAuthorize("@ss.hasPermi('mes:attached:export')") + @RequiresPermissions("mes:attached:export") + @Log(title = "物料附属信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, BaseProductAttached baseProductAttached) + { + List list = baseProductAttachedService.selectBaseProductAttachedList(baseProductAttached); + ExcelUtil util = new ExcelUtil(BaseProductAttached.class); + util.exportExcel(response, list, "物料附属信息数据"); + } + + /** + * 获取物料附属信息详细信息 + */ +// @PreAuthorize("@ss.hasPermi('mes:attached:query')") + @RequiresPermissions("mes:attached:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") String id) + { + return success(baseProductAttachedService.selectBaseProductAttachedById(id)); + } + + /** + * 新增物料附属信息 + */ +// @PreAuthorize("@ss.hasPermi('mes:attached:add')") + @RequiresPermissions("mes:attached:add") + @Log(title = "物料附属信息", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody BaseProductAttached baseProductAttached) + { + return toAjax(baseProductAttachedService.insertBaseProductAttached(baseProductAttached)); + } + + /** + * 修改物料附属信息 + */ +// @PreAuthorize("@ss.hasPermi('mes:attached:edit')") + @RequiresPermissions("mes:attached:edit") + @Log(title = "物料附属信息", businessType = BusinessType.UPDATE) + @PutMapping() + public AjaxResult edit(@RequestBody BaseProductAttached baseProductAttached) + { + return toAjax(baseProductAttachedService.updateBaseProductAttached(baseProductAttached)); + } + + /** + * 删除物料附属信息 + */ +// @PreAuthorize("@ss.hasPermi('mes:attached:remove')") + @RequiresPermissions("mes:attached:remove") + @Log(title = "物料附属信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable String[] ids) + { + return toAjax(baseProductAttachedService.deleteBaseProductAttachedByIds(ids)); + } +} diff --git a/op-modules/op-mes/src/main/java/com/op/mes/domain/BaseProductAttached.java b/op-modules/op-mes/src/main/java/com/op/mes/domain/BaseProductAttached.java new file mode 100644 index 00000000..730984fa --- /dev/null +++ b/op-modules/op-mes/src/main/java/com/op/mes/domain/BaseProductAttached.java @@ -0,0 +1,279 @@ +package com.op.mes.domain; + +import java.math.BigDecimal; + +import com.op.common.core.utils.uuid.IdUtils; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.op.common.core.annotation.Excel; +import com.op.common.core.web.domain.BaseEntity; + +/** + * 物料附属信息对象 base_product_attached + * + * @author ruoyi + * @date 2024-07-04 + */ +public class BaseProductAttached extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键ID */ + private String id; + + /** 产品编号 */ + @Excel(name = "产品编号") + private String productCode; + + /** 品类 */ + @Excel(name = "品类") + private String category; + + /** 每PC单圈 */ + @Excel(name = "每PC单圈") + private String pc; + + /** 标准效率 */ + @Excel(name = "标准效率") + private BigDecimal iei; + + /** 标准用人 */ + @Excel(name = "标准用人") + private BigDecimal manStandar; + + /** 喷药方式 */ + @Excel(name = "喷药方式") + private String sprayWay; + + /** 白坯直径 */ + @Excel(name = "白坯直径") + private BigDecimal blankDiameter; + + /** 白坯物料号 */ + @Excel(name = "白坯物料号") + private String blankNo; + + /** 标准喷药量(KG/PC) */ + @Excel(name = "标准喷药量", readConverterExp = "K=G/PC") + private BigDecimal sprayVolume; + + /** 药液料号 */ + @Excel(name = "药液料号") + private String liquidNo; + + /** 标准内膜用量(KG/PC) */ + @Excel(name = "标准内膜用量", readConverterExp = "K=G/PC") + private BigDecimal endometrialDosage; + + /** 标准外模用量(KG/PC) */ + @Excel(name = "标准外模用量(KG/PC)") + private BigDecimal outerFilmDosage; + + /** 支架 */ + @Excel(name = "支架") + private Long support; + + /** 支架物料号 */ + @Excel(name = "支架物料号") + private String supportNo; + + /** 吸塑 */ + @Excel(name = "吸塑") + private Long pvc; + + /** 支架盘 */ + @Excel(name = "支架盘") + private Long supportPlate; + + /** 其它 */ + @Excel(name = "其它") + private String other; + + public void setId(String id) + { + this.id = id; + } + + public String getId() + { + return id; + } + public void setProductCode(String productCode) + { + this.productCode = productCode; + } + + public String getProductCode() + { + return productCode; + } + public void setCategory(String category) + { + this.category = category; + } + + public String getCategory() + { + return category; + } + public void setPc(String pc) + { + this.pc = pc; + } + + public String getPc() + { + return pc; + } + public void setIei(BigDecimal iei) + { + this.iei = iei; + } + + public BigDecimal getIei() + { + return iei; + } + public void setManStandar(BigDecimal manStandar) + { + this.manStandar = manStandar; + } + + public BigDecimal getManStandar() + { + return manStandar; + } + public void setSprayWay(String sprayWay) + { + this.sprayWay = sprayWay; + } + + public String getSprayWay() + { + return sprayWay; + } + public void setBlankDiameter(BigDecimal blankDiameter) + { + this.blankDiameter = blankDiameter; + } + + public BigDecimal getBlankDiameter() + { + return blankDiameter; + } + public void setBlankNo(String blankNo) + { + this.blankNo = blankNo; + } + + public String getBlankNo() + { + return blankNo; + } + public void setSprayVolume(BigDecimal sprayVolume) + { + this.sprayVolume = sprayVolume; + } + + public BigDecimal getSprayVolume() + { + return sprayVolume; + } + public void setLiquidNo(String liquidNo) + { + this.liquidNo = liquidNo; + } + + public String getLiquidNo() + { + return liquidNo; + } + public void setEndometrialDosage(BigDecimal endometrialDosage) + { + this.endometrialDosage = endometrialDosage; + } + + public BigDecimal getEndometrialDosage() + { + return endometrialDosage; + } + public void setOuterFilmDosage(BigDecimal outerFilmDosage) + { + this.outerFilmDosage = outerFilmDosage; + } + + public BigDecimal getOuterFilmDosage() + { + return outerFilmDosage; + } + public void setSupport(Long support) + { + this.support = support; + } + + public Long getSupport() + { + return support; + } + public void setSupportNo(String supportNo) + { + this.supportNo = supportNo; + } + + public String getSupportNo() + { + return supportNo; + } + public void setPvc(Long pvc) + { + this.pvc = pvc; + } + + public Long getPvc() + { + return pvc; + } + public void setSupportPlate(Long supportPlate) + { + this.supportPlate = supportPlate; + } + + public Long getSupportPlate() + { + return supportPlate; + } + public void setOther(String other) + { + this.other = other; + } + + public String getOther() + { + return other; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("productCode", getProductCode()) + .append("category", getCategory()) + .append("pc", getPc()) + .append("iei", getIei()) + .append("manStandar", getManStandar()) + .append("sprayWay", getSprayWay()) + .append("blankDiameter", getBlankDiameter()) + .append("blankNo", getBlankNo()) + .append("sprayVolume", getSprayVolume()) + .append("liquidNo", getLiquidNo()) + .append("endometrialDosage", getEndometrialDosage()) + .append("outerFilmDosage", getOuterFilmDosage()) + .append("support", getSupport()) + .append("supportNo", getSupportNo()) + .append("pvc", getPvc()) + .append("supportPlate", getSupportPlate()) + .append("other", getOther()) + .append("createBy", getCreateBy()) + .toString(); + } +} diff --git a/op-modules/op-mes/src/main/java/com/op/mes/mapper/BaseProductAttachedMapper.java b/op-modules/op-mes/src/main/java/com/op/mes/mapper/BaseProductAttachedMapper.java new file mode 100644 index 00000000..1bea4807 --- /dev/null +++ b/op-modules/op-mes/src/main/java/com/op/mes/mapper/BaseProductAttachedMapper.java @@ -0,0 +1,62 @@ +package com.op.mes.mapper; + +import java.util.List; + +import com.op.mes.domain.BaseProductAttached; + +/** + * 物料附属信息Mapper接口 + * + * @author ruoyi + * @date 2024-07-04 + */ +public interface BaseProductAttachedMapper +{ + /** + * 查询物料附属信息 + * + * @param id 物料附属信息主键 + * @return 物料附属信息 + */ + public BaseProductAttached selectBaseProductAttachedById(String id); + + /** + * 查询物料附属信息列表 + * + * @param baseProductAttached 物料附属信息 + * @return 物料附属信息集合 + */ + public List selectBaseProductAttachedList(BaseProductAttached baseProductAttached); + + /** + * 新增物料附属信息 + * + * @param baseProductAttached 物料附属信息 + * @return 结果 + */ + public int insertBaseProductAttached(BaseProductAttached baseProductAttached); + + /** + * 修改物料附属信息 + * + * @param baseProductAttached 物料附属信息 + * @return 结果 + */ + public int updateBaseProductAttached(BaseProductAttached baseProductAttached); + + /** + * 删除物料附属信息 + * + * @param id 物料附属信息主键 + * @return 结果 + */ + public int deleteBaseProductAttachedById(String id); + + /** + * 批量删除物料附属信息 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteBaseProductAttachedByIds(String[] ids); +} diff --git a/op-modules/op-mes/src/main/java/com/op/mes/service/IBaseProductAttachedService.java b/op-modules/op-mes/src/main/java/com/op/mes/service/IBaseProductAttachedService.java new file mode 100644 index 00000000..fd8afd07 --- /dev/null +++ b/op-modules/op-mes/src/main/java/com/op/mes/service/IBaseProductAttachedService.java @@ -0,0 +1,64 @@ +package com.op.mes.service; + +import java.util.List; + + +import com.op.mes.domain.BaseProductAttached; + + +/** + * 物料附属信息Service接口 + * + * @author ruoyi + * @date 2024-07-04 + */ +public interface IBaseProductAttachedService +{ + /** + * 查询物料附属信息 + * + * @param id 物料附属信息主键 + * @return 物料附属信息 + */ + public BaseProductAttached selectBaseProductAttachedById(String id); + + /** + * 查询物料附属信息列表 + * + * @param baseProductAttached 物料附属信息 + * @return 物料附属信息集合 + */ + public List selectBaseProductAttachedList(BaseProductAttached baseProductAttached); + + /** + * 新增物料附属信息 + * + * @param baseProductAttached 物料附属信息 + * @return 结果 + */ + public int insertBaseProductAttached(BaseProductAttached baseProductAttached); + + /** + * 修改物料附属信息 + * + * @param baseProductAttached 物料附属信息 + * @return 结果 + */ + public int updateBaseProductAttached(BaseProductAttached baseProductAttached); + + /** + * 批量删除物料附属信息 + * + * @param ids 需要删除的物料附属信息主键集合 + * @return 结果 + */ + public int deleteBaseProductAttachedByIds(String[] ids); + + /** + * 删除物料附属信息信息 + * + * @param id 物料附属信息主键 + * @return 结果 + */ + public int deleteBaseProductAttachedById(String id); +} diff --git a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/BaseProductAttachedServiceImpl.java b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/BaseProductAttachedServiceImpl.java new file mode 100644 index 00000000..46a917a7 --- /dev/null +++ b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/BaseProductAttachedServiceImpl.java @@ -0,0 +1,107 @@ +package com.op.mes.service.impl; + +import java.util.List; + +import com.baomidou.dynamic.datasource.annotation.DS; +import com.op.common.core.utils.DateUtils; +import com.op.common.core.utils.uuid.IdUtils; +import com.op.mes.domain.BaseProductAttached; +import com.op.mes.mapper.BaseProductAttachedMapper; +import com.op.mes.service.IBaseProductAttachedService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + + +/** + * 物料附属信息Service业务层处理 + * + * @author ruoyi + * @date 2024-07-04 + */ +@Service +public class BaseProductAttachedServiceImpl implements IBaseProductAttachedService +{ + @Autowired + private BaseProductAttachedMapper baseProductAttachedMapper; + + /** + * 查询物料附属信息 + * + * @param id 物料附属信息主键 + * @return 物料附属信息 + */ + @Override + @DS("#header.poolName") + public BaseProductAttached selectBaseProductAttachedById(String id) + { + return baseProductAttachedMapper.selectBaseProductAttachedById(id); + } + + /** + * 查询物料附属信息列表 + * + * @param baseProductAttached 物料附属信息 + * @return 物料附属信息 + */ + @Override + @DS("#header.poolName") + public List selectBaseProductAttachedList(BaseProductAttached baseProductAttached) + { + return baseProductAttachedMapper.selectBaseProductAttachedList(baseProductAttached); + } + + /** + * 新增物料附属信息 + * + * @param baseProductAttached 物料附属信息 + * @return 结果 + */ + @Override + @DS("#header.poolName") + public int insertBaseProductAttached(BaseProductAttached baseProductAttached) + { + baseProductAttached.setId(IdUtils.fastSimpleUUID()); + baseProductAttached.setCreateTime(DateUtils.getNowDate()); + return baseProductAttachedMapper.insertBaseProductAttached(baseProductAttached); + } + + /** + * 修改物料附属信息 + * + * @param baseProductAttached 物料附属信息 + * @return 结果 + */ + @Override + @DS("#header.poolName") + public int updateBaseProductAttached(BaseProductAttached baseProductAttached) + { + baseProductAttached.setUpdateTime(DateUtils.getNowDate()); + return baseProductAttachedMapper.updateBaseProductAttached(baseProductAttached); + } + + /** + * 批量删除物料附属信息 + * + * @param ids 需要删除的物料附属信息主键 + * @return 结果 + */ + @Override + @DS("#header.poolName") + public int deleteBaseProductAttachedByIds(String[] ids) + { + return baseProductAttachedMapper.deleteBaseProductAttachedByIds(ids); + } + + /** + * 删除物料附属信息信息 + * + * @param id 物料附属信息主键 + * @return 结果 + */ + @Override + @DS("#header.poolName") + public int deleteBaseProductAttachedById(String id) + { + return baseProductAttachedMapper.deleteBaseProductAttachedById(id); + } +} diff --git a/op-modules/op-mes/src/main/resources/mapper/mes/BaseProductAttachedMapper.xml b/op-modules/op-mes/src/main/resources/mapper/mes/BaseProductAttachedMapper.xml new file mode 100644 index 00000000..887c5cea --- /dev/null +++ b/op-modules/op-mes/src/main/resources/mapper/mes/BaseProductAttachedMapper.xml @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, product_code, category, pc, iei, man_standar, spray_way, blank_diameter, blank_no, spray_volume, liquid_no, endometrial_dosage, outer_film_dosage, support, support_no, pvc, support_plate, other, create_by from base_product_attached + + + + + + + + insert into base_product_attached + + id, + product_code, + category, + pc, + iei, + man_standar, + spray_way, + blank_diameter, + blank_no, + spray_volume, + liquid_no, + endometrial_dosage, + outer_film_dosage, + support, + support_no, + pvc, + support_plate, + other, + create_by, + + + #{id}, + #{productCode}, + #{category}, + #{pc}, + #{iei}, + #{manStandar}, + #{sprayWay}, + #{blankDiameter}, + #{blankNo}, + #{sprayVolume}, + #{liquidNo}, + #{endometrialDosage}, + #{outerFilmDosage}, + #{support}, + #{supportNo}, + #{pvc}, + #{supportPlate}, + #{other}, + #{createBy}, + + + + + update base_product_attached + + product_code = #{productCode}, + category = #{category}, + pc = #{pc}, + iei = #{iei}, + man_standar = #{manStandar}, + spray_way = #{sprayWay}, + blank_diameter = #{blankDiameter}, + blank_no = #{blankNo}, + spray_volume = #{sprayVolume}, + liquid_no = #{liquidNo}, + endometrial_dosage = #{endometrialDosage}, + outer_film_dosage = #{outerFilmDosage}, + support = #{support}, + support_no = #{supportNo}, + pvc = #{pvc}, + support_plate = #{supportPlate}, + other = #{other}, + create_by = #{createBy}, + + where id = #{id} + + + + delete from base_product_attached where id = #{id} + + + + delete from base_product_attached where id in + + #{id} + + + \ No newline at end of file