Merge remote-tracking branch 'origin/master'

master
Yangwl 7 months ago
commit 186d0d0fa8

@ -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<BaseProductAttached> 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<BaseProductAttached> list = baseProductAttachedService.selectBaseProductAttachedList(baseProductAttached);
ExcelUtil<BaseProductAttached> util = new ExcelUtil<BaseProductAttached>(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));
}
}

@ -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();
}
}

@ -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<BaseProductAttached> 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);
}

@ -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<BaseProductAttached> 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);
}

@ -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<BaseProductAttached> 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);
}
}

@ -0,0 +1,142 @@
<?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.op.mes.mapper.BaseProductAttachedMapper">
<resultMap type="BaseProductAttached" id="BaseProductAttachedResult">
<result property="id" column="id" />
<result property="productCode" column="product_code" />
<result property="category" column="category" />
<result property="pc" column="pc" />
<result property="iei" column="iei" />
<result property="manStandar" column="man_standar" />
<result property="sprayWay" column="spray_way" />
<result property="blankDiameter" column="blank_diameter" />
<result property="blankNo" column="blank_no" />
<result property="sprayVolume" column="spray_volume" />
<result property="liquidNo" column="liquid_no" />
<result property="endometrialDosage" column="endometrial_dosage" />
<result property="outerFilmDosage" column="outer_film_dosage" />
<result property="support" column="support" />
<result property="supportNo" column="support_no" />
<result property="pvc" column="pvc" />
<result property="supportPlate" column="support_plate" />
<result property="other" column="other" />
<result property="createBy" column="create_by" />
</resultMap>
<sql id="selectBaseProductAttachedVo">
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
</sql>
<select id="selectBaseProductAttachedList" parameterType="BaseProductAttached" resultMap="BaseProductAttachedResult">
<include refid="selectBaseProductAttachedVo"/>
<where>
<if test="productCode != null and productCode != ''"> and product_code = #{productCode}</if>
<if test="category != null and category != ''"> and category = #{category}</if>
<if test="pc != null and pc != ''"> and pc = #{pc}</if>
<if test="iei != null "> and iei = #{iei}</if>
<if test="manStandar != null "> and man_standar = #{manStandar}</if>
<if test="sprayWay != null and sprayWay != ''"> and spray_way = #{sprayWay}</if>
<if test="blankDiameter != null "> and blank_diameter = #{blankDiameter}</if>
<if test="blankNo != null and blankNo != ''"> and blank_no = #{blankNo}</if>
<if test="sprayVolume != null "> and spray_volume = #{sprayVolume}</if>
<if test="liquidNo != null and liquidNo != ''"> and liquid_no = #{liquidNo}</if>
<if test="endometrialDosage != null "> and endometrial_dosage = #{endometrialDosage}</if>
<if test="outerFilmDosage != null "> and outer_film_dosage = #{outerFilmDosage}</if>
<if test="support != null "> and support = #{support}</if>
<if test="supportNo != null and supportNo != ''"> and support_no = #{supportNo}</if>
<if test="pvc != null "> and pvc = #{pvc}</if>
<if test="supportPlate != null "> and support_plate = #{supportPlate}</if>
<if test="other != null and other != ''"> and other = #{other}</if>
</where>
</select>
<select id="selectBaseProductAttachedById" parameterType="String" resultMap="BaseProductAttachedResult">
<include refid="selectBaseProductAttachedVo"/>
where id = #{id}
</select>
<insert id="insertBaseProductAttached" parameterType="BaseProductAttached">
insert into base_product_attached
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="productCode != null">product_code,</if>
<if test="category != null">category,</if>
<if test="pc != null">pc,</if>
<if test="iei != null">iei,</if>
<if test="manStandar != null">man_standar,</if>
<if test="sprayWay != null">spray_way,</if>
<if test="blankDiameter != null">blank_diameter,</if>
<if test="blankNo != null">blank_no,</if>
<if test="sprayVolume != null">spray_volume,</if>
<if test="liquidNo != null">liquid_no,</if>
<if test="endometrialDosage != null">endometrial_dosage,</if>
<if test="outerFilmDosage != null">outer_film_dosage,</if>
<if test="support != null">support,</if>
<if test="supportNo != null">support_no,</if>
<if test="pvc != null">pvc,</if>
<if test="supportPlate != null">support_plate,</if>
<if test="other != null">other,</if>
<if test="createBy != null">create_by,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="productCode != null">#{productCode},</if>
<if test="category != null">#{category},</if>
<if test="pc != null">#{pc},</if>
<if test="iei != null">#{iei},</if>
<if test="manStandar != null">#{manStandar},</if>
<if test="sprayWay != null">#{sprayWay},</if>
<if test="blankDiameter != null">#{blankDiameter},</if>
<if test="blankNo != null">#{blankNo},</if>
<if test="sprayVolume != null">#{sprayVolume},</if>
<if test="liquidNo != null">#{liquidNo},</if>
<if test="endometrialDosage != null">#{endometrialDosage},</if>
<if test="outerFilmDosage != null">#{outerFilmDosage},</if>
<if test="support != null">#{support},</if>
<if test="supportNo != null">#{supportNo},</if>
<if test="pvc != null">#{pvc},</if>
<if test="supportPlate != null">#{supportPlate},</if>
<if test="other != null">#{other},</if>
<if test="createBy != null">#{createBy},</if>
</trim>
</insert>
<update id="updateBaseProductAttached" parameterType="BaseProductAttached">
update base_product_attached
<trim prefix="SET" suffixOverrides=",">
<if test="productCode != null">product_code = #{productCode},</if>
<if test="category != null">category = #{category},</if>
<if test="pc != null">pc = #{pc},</if>
<if test="iei != null">iei = #{iei},</if>
<if test="manStandar != null">man_standar = #{manStandar},</if>
<if test="sprayWay != null">spray_way = #{sprayWay},</if>
<if test="blankDiameter != null">blank_diameter = #{blankDiameter},</if>
<if test="blankNo != null">blank_no = #{blankNo},</if>
<if test="sprayVolume != null">spray_volume = #{sprayVolume},</if>
<if test="liquidNo != null">liquid_no = #{liquidNo},</if>
<if test="endometrialDosage != null">endometrial_dosage = #{endometrialDosage},</if>
<if test="outerFilmDosage != null">outer_film_dosage = #{outerFilmDosage},</if>
<if test="support != null">support = #{support},</if>
<if test="supportNo != null">support_no = #{supportNo},</if>
<if test="pvc != null">pvc = #{pvc},</if>
<if test="supportPlate != null">support_plate = #{supportPlate},</if>
<if test="other != null">other = #{other},</if>
<if test="createBy != null">create_by = #{createBy},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteBaseProductAttachedById" parameterType="String">
delete from base_product_attached where id = #{id}
</delete>
<delete id="deleteBaseProductAttachedByIds" parameterType="String">
delete from base_product_attached where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
Loading…
Cancel
Save