王晓迪
4 months ago
8 changed files with 845 additions and 0 deletions
@ -0,0 +1,197 @@ |
|||
package com.ruoyi.sales.domain; |
|||
|
|||
import java.math.BigDecimal; |
|||
import org.apache.commons.lang3.builder.ToStringBuilder; |
|||
import org.apache.commons.lang3.builder.ToStringStyle; |
|||
import com.ruoyi.common.annotation.Excel; |
|||
import com.ruoyi.common.core.domain.BaseEntity; |
|||
|
|||
/** |
|||
* 销售估价经营成本模板对象 sales_estimate_template |
|||
* |
|||
* @author 刘晓旭 |
|||
* @date 2024-08-06 |
|||
*/ |
|||
public class SalesEstimateTemplate extends BaseEntity |
|||
{ |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** 经营成本模板ID */ |
|||
private Long estimateTemplateId; |
|||
|
|||
/** A挡利润率 */ |
|||
@Excel(name = "A挡利润率") |
|||
private BigDecimal aProfitRate; |
|||
|
|||
/** B挡利润率 */ |
|||
@Excel(name = "B挡利润率") |
|||
private BigDecimal bProfitRate; |
|||
|
|||
/** C挡利润率 */ |
|||
@Excel(name = "C挡利润率") |
|||
private BigDecimal cProfitRate; |
|||
|
|||
/** D挡利润率 */ |
|||
@Excel(name = "D挡利润率") |
|||
private BigDecimal dProfitRate; |
|||
|
|||
/** E挡利润率 */ |
|||
@Excel(name = "E挡利润率") |
|||
private BigDecimal eProfitRate; |
|||
|
|||
/** F挡利润率 */ |
|||
@Excel(name = "F挡利润率") |
|||
private BigDecimal fProfitRate; |
|||
|
|||
/** 不含税人工成本(RMB) */ |
|||
@Excel(name = "不含税人工成本", readConverterExp = "R=MB") |
|||
private BigDecimal noTaxLaborCosts; |
|||
|
|||
/** 不含税推广成本(RMB) */ |
|||
@Excel(name = "不含税推广成本", readConverterExp = "R=MB") |
|||
private BigDecimal noTaxPromotionalCosts; |
|||
|
|||
/** 不含税业务成本(RMB) */ |
|||
@Excel(name = "不含税业务成本", readConverterExp = "R=MB") |
|||
private BigDecimal noTaxBusinessCosts; |
|||
|
|||
/** 不含税管理成本(RMB) */ |
|||
@Excel(name = "不含税管理成本", readConverterExp = "R=MB") |
|||
private BigDecimal noTaxManagesCosts; |
|||
|
|||
/** 不含税总物料成本(RMB) */ |
|||
@Excel(name = "不含税总物料成本", readConverterExp = "R=MB") |
|||
private BigDecimal noTaxMaterialCosts; |
|||
|
|||
public void setEstimateTemplateId(Long estimateTemplateId) |
|||
{ |
|||
this.estimateTemplateId = estimateTemplateId; |
|||
} |
|||
|
|||
public Long getEstimateTemplateId() |
|||
{ |
|||
return estimateTemplateId; |
|||
} |
|||
public void setaProfitRate(BigDecimal aProfitRate) |
|||
{ |
|||
this.aProfitRate = aProfitRate; |
|||
} |
|||
|
|||
public BigDecimal getaProfitRate() |
|||
{ |
|||
return aProfitRate; |
|||
} |
|||
public void setbProfitRate(BigDecimal bProfitRate) |
|||
{ |
|||
this.bProfitRate = bProfitRate; |
|||
} |
|||
|
|||
public BigDecimal getbProfitRate() |
|||
{ |
|||
return bProfitRate; |
|||
} |
|||
public void setcProfitRate(BigDecimal cProfitRate) |
|||
{ |
|||
this.cProfitRate = cProfitRate; |
|||
} |
|||
|
|||
public BigDecimal getcProfitRate() |
|||
{ |
|||
return cProfitRate; |
|||
} |
|||
public void setdProfitRate(BigDecimal dProfitRate) |
|||
{ |
|||
this.dProfitRate = dProfitRate; |
|||
} |
|||
|
|||
public BigDecimal getdProfitRate() |
|||
{ |
|||
return dProfitRate; |
|||
} |
|||
public void seteProfitRate(BigDecimal eProfitRate) |
|||
{ |
|||
this.eProfitRate = eProfitRate; |
|||
} |
|||
|
|||
public BigDecimal geteProfitRate() |
|||
{ |
|||
return eProfitRate; |
|||
} |
|||
public void setfProfitRate(BigDecimal fProfitRate) |
|||
{ |
|||
this.fProfitRate = fProfitRate; |
|||
} |
|||
|
|||
public BigDecimal getfProfitRate() |
|||
{ |
|||
return fProfitRate; |
|||
} |
|||
public void setNoTaxLaborCosts(BigDecimal noTaxLaborCosts) |
|||
{ |
|||
this.noTaxLaborCosts = noTaxLaborCosts; |
|||
} |
|||
|
|||
public BigDecimal getNoTaxLaborCosts() |
|||
{ |
|||
return noTaxLaborCosts; |
|||
} |
|||
public void setNoTaxPromotionalCosts(BigDecimal noTaxPromotionalCosts) |
|||
{ |
|||
this.noTaxPromotionalCosts = noTaxPromotionalCosts; |
|||
} |
|||
|
|||
public BigDecimal getNoTaxPromotionalCosts() |
|||
{ |
|||
return noTaxPromotionalCosts; |
|||
} |
|||
public void setNoTaxBusinessCosts(BigDecimal noTaxBusinessCosts) |
|||
{ |
|||
this.noTaxBusinessCosts = noTaxBusinessCosts; |
|||
} |
|||
|
|||
public BigDecimal getNoTaxBusinessCosts() |
|||
{ |
|||
return noTaxBusinessCosts; |
|||
} |
|||
public void setNoTaxManagesCosts(BigDecimal noTaxManagesCosts) |
|||
{ |
|||
this.noTaxManagesCosts = noTaxManagesCosts; |
|||
} |
|||
|
|||
public BigDecimal getNoTaxManagesCosts() |
|||
{ |
|||
return noTaxManagesCosts; |
|||
} |
|||
public void setNoTaxMaterialCosts(BigDecimal noTaxMaterialCosts) |
|||
{ |
|||
this.noTaxMaterialCosts = noTaxMaterialCosts; |
|||
} |
|||
|
|||
public BigDecimal getNoTaxMaterialCosts() |
|||
{ |
|||
return noTaxMaterialCosts; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
|||
.append("estimateTemplateId", getEstimateTemplateId()) |
|||
.append("aProfitRate", getaProfitRate()) |
|||
.append("bProfitRate", getbProfitRate()) |
|||
.append("cProfitRate", getcProfitRate()) |
|||
.append("dProfitRate", getdProfitRate()) |
|||
.append("eProfitRate", geteProfitRate()) |
|||
.append("fProfitRate", getfProfitRate()) |
|||
.append("noTaxLaborCosts", getNoTaxLaborCosts()) |
|||
.append("noTaxPromotionalCosts", getNoTaxPromotionalCosts()) |
|||
.append("noTaxBusinessCosts", getNoTaxBusinessCosts()) |
|||
.append("noTaxManagesCosts", getNoTaxManagesCosts()) |
|||
.append("noTaxMaterialCosts", getNoTaxMaterialCosts()) |
|||
.append("createBy", getCreateBy()) |
|||
.append("createTime", getCreateTime()) |
|||
.append("updateBy", getUpdateBy()) |
|||
.append("updateTime", getUpdateTime()) |
|||
.append("remark", getRemark()) |
|||
.toString(); |
|||
} |
|||
} |
@ -0,0 +1,85 @@ |
|||
package com.ruoyi.sales.mapper; |
|||
|
|||
import java.util.List; |
|||
import com.ruoyi.sales.domain.SalesEstimateTemplate; |
|||
|
|||
/** |
|||
* 销售估价经营成本模板Mapper接口 |
|||
* |
|||
* @author 刘晓旭 |
|||
* @date 2024-08-06 |
|||
*/ |
|||
public interface SalesEstimateTemplateMapper |
|||
{ |
|||
/** |
|||
* 查询销售估价经营成本模板 |
|||
* |
|||
* @param estimateTemplateId 销售估价经营成本模板ID |
|||
* @return 销售估价经营成本模板 |
|||
*/ |
|||
public SalesEstimateTemplate selectSalesEstimateTemplateById(Long estimateTemplateId); |
|||
|
|||
/** |
|||
* 查询销售估价经营成本模板列表 |
|||
* |
|||
* @param salesEstimateTemplate 销售估价经营成本模板 |
|||
* @return 销售估价经营成本模板集合 |
|||
*/ |
|||
public List<SalesEstimateTemplate> selectSalesEstimateTemplateList(SalesEstimateTemplate salesEstimateTemplate); |
|||
|
|||
/** |
|||
* 新增销售估价经营成本模板 |
|||
* |
|||
* @param salesEstimateTemplate 销售估价经营成本模板 |
|||
* @return 结果 |
|||
*/ |
|||
public int insertSalesEstimateTemplate(SalesEstimateTemplate salesEstimateTemplate); |
|||
|
|||
/** |
|||
* 修改销售估价经营成本模板 |
|||
* |
|||
* @param salesEstimateTemplate 销售估价经营成本模板 |
|||
* @return 结果 |
|||
*/ |
|||
public int updateSalesEstimateTemplate(SalesEstimateTemplate salesEstimateTemplate); |
|||
|
|||
/** |
|||
* 删除销售估价经营成本模板 |
|||
* |
|||
* @param estimateTemplateId 销售估价经营成本模板ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteSalesEstimateTemplateById(Long estimateTemplateId); |
|||
|
|||
/** |
|||
* 批量删除销售估价经营成本模板 |
|||
* |
|||
* @param estimateTemplateIds 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteSalesEstimateTemplateByIds(String[] estimateTemplateIds); |
|||
|
|||
/** |
|||
* 作废销售估价经营成本模板 |
|||
* |
|||
* @param estimateTemplateId 销售估价经营成本模板ID |
|||
* @return 结果 |
|||
*/ |
|||
public int cancelSalesEstimateTemplateById(Long estimateTemplateId); |
|||
|
|||
/** |
|||
* 恢复销售估价经营成本模板 |
|||
* |
|||
* @param estimateTemplateId 销售估价经营成本模板ID |
|||
* @return 结果 |
|||
*/ |
|||
public int restoreSalesEstimateTemplateById(Long estimateTemplateId); |
|||
|
|||
/** |
|||
* 查询销售估价经营成本模板列表 |
|||
* |
|||
* @return 销售估价经营成本模板集合 |
|||
*/ |
|||
List<SalesEstimateTemplate> selectEstimateTemplateList(); |
|||
|
|||
} |
@ -0,0 +1,82 @@ |
|||
package com.ruoyi.sales.service; |
|||
|
|||
import java.util.List; |
|||
import com.ruoyi.sales.domain.SalesEstimateTemplate; |
|||
|
|||
/** |
|||
* 销售估价经营成本模板Service接口 |
|||
* |
|||
* @author 刘晓旭 |
|||
* @date 2024-08-06 |
|||
*/ |
|||
public interface ISalesEstimateTemplateService |
|||
{ |
|||
/** |
|||
* 查询销售估价经营成本模板 |
|||
* |
|||
* @param estimateTemplateId 销售估价经营成本模板ID |
|||
* @return 销售估价经营成本模板 |
|||
*/ |
|||
public SalesEstimateTemplate selectSalesEstimateTemplateById(Long estimateTemplateId); |
|||
|
|||
/** |
|||
* 查询销售估价经营成本模板列表 |
|||
* |
|||
* @param salesEstimateTemplate 销售估价经营成本模板 |
|||
* @return 销售估价经营成本模板集合 |
|||
*/ |
|||
public List<SalesEstimateTemplate> selectSalesEstimateTemplateList(SalesEstimateTemplate salesEstimateTemplate); |
|||
|
|||
/** |
|||
* 新增销售估价经营成本模板 |
|||
* |
|||
* @param salesEstimateTemplate 销售估价经营成本模板 |
|||
* @return 结果 |
|||
*/ |
|||
public int insertSalesEstimateTemplate(SalesEstimateTemplate salesEstimateTemplate); |
|||
|
|||
/** |
|||
* 修改销售估价经营成本模板 |
|||
* |
|||
* @param salesEstimateTemplate 销售估价经营成本模板 |
|||
* @return 结果 |
|||
*/ |
|||
public int updateSalesEstimateTemplate(SalesEstimateTemplate salesEstimateTemplate); |
|||
|
|||
/** |
|||
* 批量删除销售估价经营成本模板 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteSalesEstimateTemplateByIds(String ids); |
|||
|
|||
/** |
|||
* 删除销售估价经营成本模板信息 |
|||
* |
|||
* @param estimateTemplateId 销售估价经营成本模板ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteSalesEstimateTemplateById(Long estimateTemplateId); |
|||
|
|||
/** |
|||
* 作废销售估价经营成本模板 |
|||
* @param estimateTemplateId 销售估价经营成本模板ID |
|||
* @return |
|||
*/ |
|||
int cancelSalesEstimateTemplateById(Long estimateTemplateId); |
|||
|
|||
/** |
|||
* 恢复销售估价经营成本模板 |
|||
* @param estimateTemplateId 销售估价经营成本模板ID |
|||
* @return |
|||
*/ |
|||
int restoreSalesEstimateTemplateById(Long estimateTemplateId); |
|||
|
|||
/** |
|||
* 查询销售估价经营成本模板列表 |
|||
* @return |
|||
*/ |
|||
List<SalesEstimateTemplate> selectEstimateTemplateList(); |
|||
|
|||
} |
@ -0,0 +1,139 @@ |
|||
package com.ruoyi.sales.service.impl; |
|||
|
|||
import java.util.List; |
|||
import com.ruoyi.common.utils.DateUtils; |
|||
import com.ruoyi.common.utils.ShiroUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import com.ruoyi.sales.mapper.SalesEstimateTemplateMapper; |
|||
import com.ruoyi.sales.domain.SalesEstimateTemplate; |
|||
import com.ruoyi.sales.service.ISalesEstimateTemplateService; |
|||
import com.ruoyi.common.core.text.Convert; |
|||
|
|||
/** |
|||
* 销售估价经营成本模板Service业务层处理 |
|||
* |
|||
* @author 刘晓旭 |
|||
* @date 2024-08-06 |
|||
*/ |
|||
@Service |
|||
public class SalesEstimateTemplateServiceImpl implements ISalesEstimateTemplateService |
|||
{ |
|||
@Autowired |
|||
private SalesEstimateTemplateMapper salesEstimateTemplateMapper; |
|||
|
|||
/** |
|||
* 查询销售估价经营成本模板 |
|||
* |
|||
* @param estimateTemplateId 销售估价经营成本模板ID |
|||
* @return 销售估价经营成本模板 |
|||
*/ |
|||
@Override |
|||
public SalesEstimateTemplate selectSalesEstimateTemplateById(Long estimateTemplateId) |
|||
{ |
|||
return salesEstimateTemplateMapper.selectSalesEstimateTemplateById(estimateTemplateId); |
|||
} |
|||
|
|||
/** |
|||
* 查询销售估价经营成本模板列表 |
|||
* |
|||
* @param salesEstimateTemplate 销售估价经营成本模板 |
|||
* @return 销售估价经营成本模板 |
|||
*/ |
|||
@Override |
|||
public List<SalesEstimateTemplate> selectSalesEstimateTemplateList(SalesEstimateTemplate salesEstimateTemplate) |
|||
{ |
|||
return salesEstimateTemplateMapper.selectSalesEstimateTemplateList(salesEstimateTemplate); |
|||
} |
|||
|
|||
/** |
|||
* 新增销售估价经营成本模板 |
|||
* |
|||
* @param salesEstimateTemplate 销售估价经营成本模板 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int insertSalesEstimateTemplate(SalesEstimateTemplate salesEstimateTemplate) |
|||
{ |
|||
String loginName = ShiroUtils.getLoginName(); |
|||
salesEstimateTemplate.setCreateBy(loginName); |
|||
salesEstimateTemplate.setCreateTime(DateUtils.getNowDate()); |
|||
return salesEstimateTemplateMapper.insertSalesEstimateTemplate(salesEstimateTemplate); |
|||
} |
|||
|
|||
/** |
|||
* 修改销售估价经营成本模板 |
|||
* |
|||
* @param salesEstimateTemplate 销售估价经营成本模板 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int updateSalesEstimateTemplate(SalesEstimateTemplate salesEstimateTemplate) |
|||
{ |
|||
String loginName = ShiroUtils.getLoginName(); |
|||
salesEstimateTemplate.setUpdateBy(loginName); |
|||
salesEstimateTemplate.setUpdateTime(DateUtils.getNowDate()); |
|||
return salesEstimateTemplateMapper.updateSalesEstimateTemplate(salesEstimateTemplate); |
|||
} |
|||
|
|||
/** |
|||
* 删除销售估价经营成本模板对象 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deleteSalesEstimateTemplateByIds(String ids) |
|||
{ |
|||
return salesEstimateTemplateMapper.deleteSalesEstimateTemplateByIds(Convert.toStrArray(ids)); |
|||
} |
|||
|
|||
/** |
|||
* 删除销售估价经营成本模板信息 |
|||
* |
|||
* @param estimateTemplateId 销售估价经营成本模板ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deleteSalesEstimateTemplateById(Long estimateTemplateId) |
|||
{ |
|||
return salesEstimateTemplateMapper.deleteSalesEstimateTemplateById(estimateTemplateId); |
|||
} |
|||
|
|||
/** |
|||
* 作废销售估价经营成本模板 |
|||
* |
|||
* @param estimateTemplateId 销售估价经营成本模板ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int cancelSalesEstimateTemplateById(Long estimateTemplateId) |
|||
{ |
|||
return salesEstimateTemplateMapper.cancelSalesEstimateTemplateById(estimateTemplateId); |
|||
} |
|||
|
|||
/** |
|||
* 恢复销售估价经营成本模板信息 |
|||
* |
|||
* @param estimateTemplateId 销售估价经营成本模板ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int restoreSalesEstimateTemplateById(Long estimateTemplateId) |
|||
{ |
|||
return salesEstimateTemplateMapper.restoreSalesEstimateTemplateById(estimateTemplateId); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 查询销售估价经营成本模板列表 |
|||
* |
|||
* @return 销售估价经营成本模板 |
|||
*/ |
|||
@Override |
|||
public List<SalesEstimateTemplate> selectEstimateTemplateList() { |
|||
|
|||
|
|||
return salesEstimateTemplateMapper.selectEstimateTemplateList(); |
|||
} |
|||
} |
@ -0,0 +1,128 @@ |
|||
<?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.ruoyi.sales.mapper.SalesEstimateTemplateMapper"> |
|||
|
|||
<resultMap type="SalesEstimateTemplate" id="SalesEstimateTemplateResult"> |
|||
<result property="estimateTemplateId" column="estimate_template_id" /> |
|||
<result property="aProfitRate" column="A_profit_rate" /> |
|||
<result property="bProfitRate" column="B_profit_rate" /> |
|||
<result property="cProfitRate" column="C_profit_rate" /> |
|||
<result property="dProfitRate" column="D_profit_rate" /> |
|||
<result property="eProfitRate" column="E_profit_rate" /> |
|||
<result property="fProfitRate" column="F_profit_rate" /> |
|||
<result property="noTaxLaborCosts" column="no_tax_labor_costs" /> |
|||
<result property="noTaxPromotionalCosts" column="no_tax_promotional_costs" /> |
|||
<result property="noTaxBusinessCosts" column="no_tax_business_costs" /> |
|||
<result property="noTaxManagesCosts" column="no_tax_manages_costs" /> |
|||
<result property="noTaxMaterialCosts" column="no_tax_material_costs" /> |
|||
<result property="createBy" column="create_by" /> |
|||
<result property="createTime" column="create_time" /> |
|||
<result property="updateBy" column="update_by" /> |
|||
<result property="updateTime" column="update_time" /> |
|||
<result property="remark" column="remark" /> |
|||
</resultMap> |
|||
|
|||
<sql id="selectSalesEstimateTemplateVo"> |
|||
select estimate_template_id, A_profit_rate, B_profit_rate, C_profit_rate, D_profit_rate, E_profit_rate, F_profit_rate, no_tax_labor_costs, no_tax_promotional_costs, no_tax_business_costs, no_tax_manages_costs, no_tax_material_costs, create_by, create_time, update_by, update_time, remark from sales_estimate_template |
|||
</sql> |
|||
|
|||
<select id="selectSalesEstimateTemplateList" parameterType="SalesEstimateTemplate" resultMap="SalesEstimateTemplateResult"> |
|||
<include refid="selectSalesEstimateTemplateVo"/> |
|||
<where> |
|||
</where> |
|||
</select> |
|||
|
|||
<select id="selectSalesEstimateTemplateById" parameterType="Long" resultMap="SalesEstimateTemplateResult"> |
|||
<include refid="selectSalesEstimateTemplateVo"/> |
|||
where estimate_template_id = #{estimateTemplateId} |
|||
</select> |
|||
|
|||
<select id="selectEstimateTemplateList" resultMap="SalesEstimateTemplateResult"> |
|||
<include refid="selectSalesEstimateTemplateVo"/> |
|||
</select> |
|||
|
|||
<insert id="insertSalesEstimateTemplate" parameterType="SalesEstimateTemplate" useGeneratedKeys="true" keyProperty="estimateTemplateId"> |
|||
insert into sales_estimate_template |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="aProfitRate != null">A_profit_rate,</if> |
|||
<if test="bProfitRate != null">B_profit_rate,</if> |
|||
<if test="cProfitRate != null">C_profit_rate,</if> |
|||
<if test="dProfitRate != null">D_profit_rate,</if> |
|||
<if test="eProfitRate != null">E_profit_rate,</if> |
|||
<if test="fProfitRate != null">F_profit_rate,</if> |
|||
<if test="noTaxLaborCosts != null">no_tax_labor_costs,</if> |
|||
<if test="noTaxPromotionalCosts != null">no_tax_promotional_costs,</if> |
|||
<if test="noTaxBusinessCosts != null">no_tax_business_costs,</if> |
|||
<if test="noTaxManagesCosts != null">no_tax_manages_costs,</if> |
|||
<if test="noTaxMaterialCosts != null">no_tax_material_costs,</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> |
|||
<if test="remark != null">remark,</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="aProfitRate != null">#{aProfitRate},</if> |
|||
<if test="bProfitRate != null">#{bProfitRate},</if> |
|||
<if test="cProfitRate != null">#{cProfitRate},</if> |
|||
<if test="dProfitRate != null">#{dProfitRate},</if> |
|||
<if test="eProfitRate != null">#{eProfitRate},</if> |
|||
<if test="fProfitRate != null">#{fProfitRate},</if> |
|||
<if test="noTaxLaborCosts != null">#{noTaxLaborCosts},</if> |
|||
<if test="noTaxPromotionalCosts != null">#{noTaxPromotionalCosts},</if> |
|||
<if test="noTaxBusinessCosts != null">#{noTaxBusinessCosts},</if> |
|||
<if test="noTaxManagesCosts != null">#{noTaxManagesCosts},</if> |
|||
<if test="noTaxMaterialCosts != null">#{noTaxMaterialCosts},</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> |
|||
<if test="remark != null">#{remark},</if> |
|||
</trim> |
|||
</insert> |
|||
|
|||
<update id="updateSalesEstimateTemplate" parameterType="SalesEstimateTemplate"> |
|||
update sales_estimate_template |
|||
<trim prefix="SET" suffixOverrides=","> |
|||
<if test="aProfitRate != null">A_profit_rate = #{aProfitRate},</if> |
|||
<if test="bProfitRate != null">B_profit_rate = #{bProfitRate},</if> |
|||
<if test="cProfitRate != null">C_profit_rate = #{cProfitRate},</if> |
|||
<if test="dProfitRate != null">D_profit_rate = #{dProfitRate},</if> |
|||
<if test="eProfitRate != null">E_profit_rate = #{eProfitRate},</if> |
|||
<if test="fProfitRate != null">F_profit_rate = #{fProfitRate},</if> |
|||
<if test="noTaxLaborCosts != null">no_tax_labor_costs = #{noTaxLaborCosts},</if> |
|||
<if test="noTaxPromotionalCosts != null">no_tax_promotional_costs = #{noTaxPromotionalCosts},</if> |
|||
<if test="noTaxBusinessCosts != null">no_tax_business_costs = #{noTaxBusinessCosts},</if> |
|||
<if test="noTaxManagesCosts != null">no_tax_manages_costs = #{noTaxManagesCosts},</if> |
|||
<if test="noTaxMaterialCosts != null">no_tax_material_costs = #{noTaxMaterialCosts},</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> |
|||
<if test="remark != null">remark = #{remark},</if> |
|||
</trim> |
|||
where estimate_template_id = #{estimateTemplateId} |
|||
</update> |
|||
|
|||
<delete id="deleteSalesEstimateTemplateById" parameterType="Long"> |
|||
delete from sales_estimate_template where estimate_template_id = #{estimateTemplateId} |
|||
</delete> |
|||
|
|||
<delete id="deleteSalesEstimateTemplateByIds" parameterType="String"> |
|||
delete from sales_estimate_template where estimate_template_id in |
|||
<foreach item="estimateTemplateId" collection="array" open="(" separator="," close=")"> |
|||
#{estimateTemplateId} |
|||
</foreach> |
|||
</delete> |
|||
|
|||
<update id="cancelSalesEstimateTemplateById" parameterType="Long"> |
|||
update sales_estimate_template set del_flag = '1' where estimate_template_id = #{estimateTemplateId} |
|||
</update> |
|||
|
|||
<update id="restoreSalesEstimateTemplateById" parameterType="Long"> |
|||
update sales_estimate_template set del_flag = '0' where estimate_template_id = #{estimateTemplateId} |
|||
</update> |
|||
|
|||
</mapper> |
@ -0,0 +1,159 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('销售估价经营成本模板')" /> |
|||
</head> |
|||
<style> |
|||
.underline { |
|||
margin-top: 10px; |
|||
margin-bottom: 10px; |
|||
} |
|||
.underline::after { |
|||
content: ""; |
|||
display: block; |
|||
height: 3px; |
|||
background-color: black; |
|||
margin-top: 3px; /* 调整这个值来改变标题与下划线之间的间距 */ |
|||
} |
|||
|
|||
.underline hr.underline { |
|||
border: none; |
|||
height: 3px; |
|||
background-color: black; |
|||
margin-top: 3px; /* 调整这个值来改变标题与下划线之间的间距 */ |
|||
} |
|||
|
|||
</style> |
|||
<body class="white-bg"> |
|||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-template-edit" th:object="${salesEstimateTemplate}"> |
|||
<input name="estimateTemplateId" th:field="*{estimateTemplateId}" type="hidden"> |
|||
|
|||
<div class="container"> |
|||
<div class="row"> |
|||
<h4 class="font-weight-bold">总经营成本</h4> |
|||
</div> |
|||
<hr class="underline"> |
|||
<br> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-7 control-label is-required">不含税人工成本(RMB):</label> |
|||
<div class="col-sm-5"> |
|||
<input name="noTaxLaborCosts" th:field="*{noTaxLaborCosts}" class="form-control" type="text" required> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-7 control-label is-required">不含税推广成本(RMB):</label> |
|||
<div class="col-sm-5"> |
|||
<input name="noTaxPromotionalCosts" th:field="*{noTaxPromotionalCosts}" class="form-control" type="text" required> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-7 control-label is-required">不含税业务成本(RMB):</label> |
|||
<div class="col-sm-5"> |
|||
<input name="noTaxBusinessCosts" th:field="*{noTaxBusinessCosts}" class="form-control" type="text" required> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-7 control-label is-required">不含税管理成本(RMB):</label> |
|||
<div class="col-sm-5"> |
|||
<input name="noTaxManagesCosts" th:field="*{noTaxManagesCosts}" class="form-control" type="text" required> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
<div class="container"> |
|||
<div class="row"> |
|||
<h4 class="font-weight-bold">总物料成本</h4> |
|||
</div> |
|||
<hr class="underline"> |
|||
<br> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-7 control-label is-required">不含税总物料成本(RMB):</label> |
|||
<div class="col-sm-5"> |
|||
<input name="noTaxMaterialCosts" th:field="*{noTaxMaterialCosts}" class="form-control" type="text" required> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="container"> |
|||
<div class="row"> |
|||
<h4 class="font-weight-bold">料号挡位及利润率</h4> |
|||
</div> |
|||
<hr class="underline"> |
|||
<br> |
|||
</div> |
|||
<div class="container"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-7 control-label is-required">A挡利润率:</label> |
|||
<div class="col-sm-5"> |
|||
<div class="input-group"> |
|||
<input name="aProfitRate" th:field="*{aProfitRate}" class="form-control" type="text" required> |
|||
<span class="input-group-addon">%</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-7 control-label is-required">B挡利润率:</label> |
|||
<div class="col-sm-5"> |
|||
<div class="input-group"> |
|||
<input name="bProfitRate" th:field="*{bProfitRate}" class="form-control" type="text" required> |
|||
<span class="input-group-addon">%</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-7 control-label is-required">C挡利润率:</label> |
|||
<div class="col-sm-5"> |
|||
<div class="input-group"> |
|||
<input name="cProfitRate" th:field="*{cProfitRate}" class="form-control" type="text" required> |
|||
<span class="input-group-addon">%</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-7 control-label is-required">D挡利润率:</label> |
|||
<div class="col-sm-5"> |
|||
<div class="input-group"> |
|||
<input name="dProfitRate" th:field="*{dProfitRate}" class="form-control" type="text" required> |
|||
<span class="input-group-addon">%</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-7 control-label is-required">E挡利润率:</label> |
|||
<div class="col-sm-5"> |
|||
<div class="input-group"> |
|||
<input name="eProfitRate" th:field="*{eProfitRate}" class="form-control" type="text" required> |
|||
<span class="input-group-addon">%</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-7 control-label is-required">F挡利润率:</label> |
|||
<div class="col-sm-5"> |
|||
<div class="input-group"> |
|||
<input name="fProfitRate" th:field="*{fProfitRate}" class="form-control" type="text" required> |
|||
<span class="input-group-addon">%</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "sales/estimate"; |
|||
$("#form-template-edit").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/editOperatingCostTemplate", $('#form-template-edit').serialize()); |
|||
} |
|||
} |
|||
</script> |
|||
</body> |
|||
</html> |
Loading…
Reference in new issue