Browse Source

Merge remote-tracking branch 'origin/dev' into dev

dev
zhangsiqi 4 months ago
parent
commit
c65069ab02
  1. 30
      ruoyi-admin/src/main/java/com/ruoyi/sales/controller/SalesEstimateChildController.java
  2. 2
      ruoyi-admin/src/main/java/com/ruoyi/sales/domain/SalesEstimate.java
  3. 4
      ruoyi-admin/src/main/java/com/ruoyi/sales/domain/SalesEstimateChild.java
  4. 18
      ruoyi-admin/src/main/java/com/ruoyi/sales/mapper/SalesEstimateChildMapper.java
  5. 18
      ruoyi-admin/src/main/java/com/ruoyi/sales/service/ISalesEstimateChildService.java
  6. 38
      ruoyi-admin/src/main/java/com/ruoyi/sales/service/impl/SalesEstimateChildServiceImpl.java
  7. 22
      ruoyi-admin/src/main/resources/mapper/sales/SalesEstimateChildMapper.xml
  8. 4
      ruoyi-admin/src/main/resources/templates/sales/EstimateChild/edit.html

30
ruoyi-admin/src/main/java/com/ruoyi/sales/controller/SysSalesEstimateChildController.java → ruoyi-admin/src/main/java/com/ruoyi/sales/controller/SalesEstimateChildController.java

@ -12,8 +12,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.sales.domain.SysSalesEstimateChild;
import com.ruoyi.sales.service.ISysSalesEstimateChildService;
import com.ruoyi.sales.domain.SalesEstimateChild;
import com.ruoyi.sales.service.ISalesEstimateChildService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
@ -27,12 +27,12 @@ import com.ruoyi.common.core.page.TableDataInfo;
*/
@Controller
@RequestMapping("/sales/EstimateChild")
public class SysSalesEstimateChildController extends BaseController
public class SalesEstimateChildController extends BaseController
{
private String prefix = "sales/EstimateChild";
@Autowired
private ISysSalesEstimateChildService sysSalesEstimateChildService;
private ISalesEstimateChildService sysSalesEstimateChildService;
@RequiresPermissions("sales:EstimateChild:view")
@GetMapping()
@ -47,10 +47,10 @@ public class SysSalesEstimateChildController extends BaseController
@RequiresPermissions("sales:EstimateChild:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(SysSalesEstimateChild sysSalesEstimateChild)
public TableDataInfo list(SalesEstimateChild salesEstimateChild)
{
startPage();
List<SysSalesEstimateChild> list = sysSalesEstimateChildService.selectSysSalesEstimateChildList(sysSalesEstimateChild);
List<SalesEstimateChild> list = sysSalesEstimateChildService.selectSysSalesEstimateChildList(salesEstimateChild);
return getDataTable(list);
}
@ -61,10 +61,10 @@ public class SysSalesEstimateChildController extends BaseController
@Log(title = "销售物料估价", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(SysSalesEstimateChild sysSalesEstimateChild)
public AjaxResult export(SalesEstimateChild salesEstimateChild)
{
List<SysSalesEstimateChild> list = sysSalesEstimateChildService.selectSysSalesEstimateChildList(sysSalesEstimateChild);
ExcelUtil<SysSalesEstimateChild> util = new ExcelUtil<SysSalesEstimateChild>(SysSalesEstimateChild.class);
List<SalesEstimateChild> list = sysSalesEstimateChildService.selectSysSalesEstimateChildList(salesEstimateChild);
ExcelUtil<SalesEstimateChild> util = new ExcelUtil<SalesEstimateChild>(SalesEstimateChild.class);
return util.exportExcel(list, "销售物料估价数据");
}
@ -84,9 +84,9 @@ public class SysSalesEstimateChildController extends BaseController
@Log(title = "销售物料估价", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(SysSalesEstimateChild sysSalesEstimateChild)
public AjaxResult addSave(SalesEstimateChild salesEstimateChild)
{
return toAjax(sysSalesEstimateChildService.insertSysSalesEstimateChild(sysSalesEstimateChild));
return toAjax(sysSalesEstimateChildService.insertSysSalesEstimateChild(salesEstimateChild));
}
/**
@ -95,8 +95,8 @@ public class SysSalesEstimateChildController extends BaseController
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") Long id, ModelMap mmap)
{
SysSalesEstimateChild sysSalesEstimateChild = sysSalesEstimateChildService.selectSysSalesEstimateChildById(id);
mmap.put("sysSalesEstimateChild", sysSalesEstimateChild);
SalesEstimateChild salesEstimateChild = sysSalesEstimateChildService.selectSysSalesEstimateChildById(id);
mmap.put("salesEstimateChild", salesEstimateChild);
return prefix + "/edit";
}
@ -107,9 +107,9 @@ public class SysSalesEstimateChildController extends BaseController
@Log(title = "销售物料估价", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(SysSalesEstimateChild sysSalesEstimateChild)
public AjaxResult editSave(SalesEstimateChild salesEstimateChild)
{
return toAjax(sysSalesEstimateChildService.updateSysSalesEstimateChild(sysSalesEstimateChild));
return toAjax(sysSalesEstimateChildService.updateSysSalesEstimateChild(salesEstimateChild));
}
/**

2
ruoyi-admin/src/main/java/com/ruoyi/sales/domain/SalesEstimate.java

@ -99,7 +99,7 @@ public class SalesEstimate extends BaseEntity
/** 流程恢复实例ID */
private String restoreInstanceId;
private List<SysSalesEstimateChild> sysSalesEstimateChildList;
private List<SalesEstimateChild> sysSalesEstimateChildList;
public void setPricingDate(String pricingDate) {
this.pricingDate = pricingDate;

4
ruoyi-admin/src/main/java/com/ruoyi/sales/domain/SysSalesEstimateChild.java → ruoyi-admin/src/main/java/com/ruoyi/sales/domain/SalesEstimateChild.java

@ -9,12 +9,12 @@ import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 销售物料估价对象 sys_sales_estimate_child
* 销售物料估价对象 sales_estimate_child
*
* @author zhang
* @date 2024-05-27
*/
public class SysSalesEstimateChild extends BaseEntity
public class SalesEstimateChild extends BaseEntity
{
private static final long serialVersionUID = 1L;

18
ruoyi-admin/src/main/java/com/ruoyi/sales/mapper/SysSalesEstimateChildMapper.java → ruoyi-admin/src/main/java/com/ruoyi/sales/mapper/SalesEstimateChildMapper.java

@ -1,7 +1,7 @@
package com.ruoyi.sales.mapper;
import java.util.List;
import com.ruoyi.sales.domain.SysSalesEstimateChild;
import com.ruoyi.sales.domain.SalesEstimateChild;
/**
* 销售物料估价Mapper接口
@ -9,7 +9,7 @@ import com.ruoyi.sales.domain.SysSalesEstimateChild;
* @author zhang
* @date 2024-05-27
*/
public interface SysSalesEstimateChildMapper
public interface SalesEstimateChildMapper
{
/**
* 查询销售物料估价
@ -17,31 +17,31 @@ public interface SysSalesEstimateChildMapper
* @param id 销售物料估价ID
* @return 销售物料估价
*/
public SysSalesEstimateChild selectSysSalesEstimateChildById(Long id);
public SalesEstimateChild selectSysSalesEstimateChildById(Long id);
/**
* 查询销售物料估价列表
*
* @param sysSalesEstimateChild 销售物料估价
* @param salesEstimateChild 销售物料估价
* @return 销售物料估价集合
*/
public List<SysSalesEstimateChild> selectSysSalesEstimateChildList(SysSalesEstimateChild sysSalesEstimateChild);
public List<SalesEstimateChild> selectSysSalesEstimateChildList(SalesEstimateChild salesEstimateChild);
/**
* 新增销售物料估价
*
* @param sysSalesEstimateChild 销售物料估价
* @param salesEstimateChild 销售物料估价
* @return 结果
*/
public int insertSysSalesEstimateChild(SysSalesEstimateChild sysSalesEstimateChild);
public int insertSysSalesEstimateChild(SalesEstimateChild salesEstimateChild);
/**
* 修改销售物料估价
*
* @param sysSalesEstimateChild 销售物料估价
* @param salesEstimateChild 销售物料估价
* @return 结果
*/
public int updateSysSalesEstimateChild(SysSalesEstimateChild sysSalesEstimateChild);
public int updateSysSalesEstimateChild(SalesEstimateChild salesEstimateChild);
/**
* 删除销售物料估价

18
ruoyi-admin/src/main/java/com/ruoyi/sales/service/ISysSalesEstimateChildService.java → ruoyi-admin/src/main/java/com/ruoyi/sales/service/ISalesEstimateChildService.java

@ -1,7 +1,7 @@
package com.ruoyi.sales.service;
import java.util.List;
import com.ruoyi.sales.domain.SysSalesEstimateChild;
import com.ruoyi.sales.domain.SalesEstimateChild;
/**
* 销售物料估价Service接口
@ -9,7 +9,7 @@ import com.ruoyi.sales.domain.SysSalesEstimateChild;
* @author zhang
* @date 2024-05-27
*/
public interface ISysSalesEstimateChildService
public interface ISalesEstimateChildService
{
/**
* 查询销售物料估价
@ -17,31 +17,31 @@ public interface ISysSalesEstimateChildService
* @param id 销售物料估价ID
* @return 销售物料估价
*/
public SysSalesEstimateChild selectSysSalesEstimateChildById(Long id);
public SalesEstimateChild selectSysSalesEstimateChildById(Long id);
/**
* 查询销售物料估价列表
*
* @param sysSalesEstimateChild 销售物料估价
* @param salesEstimateChild 销售物料估价
* @return 销售物料估价集合
*/
public List<SysSalesEstimateChild> selectSysSalesEstimateChildList(SysSalesEstimateChild sysSalesEstimateChild);
public List<SalesEstimateChild> selectSysSalesEstimateChildList(SalesEstimateChild salesEstimateChild);
/**
* 新增销售物料估价
*
* @param sysSalesEstimateChild 销售物料估价
* @param salesEstimateChild 销售物料估价
* @return 结果
*/
public int insertSysSalesEstimateChild(SysSalesEstimateChild sysSalesEstimateChild);
public int insertSysSalesEstimateChild(SalesEstimateChild salesEstimateChild);
/**
* 修改销售物料估价
*
* @param sysSalesEstimateChild 销售物料估价
* @param salesEstimateChild 销售物料估价
* @return 结果
*/
public int updateSysSalesEstimateChild(SysSalesEstimateChild sysSalesEstimateChild);
public int updateSysSalesEstimateChild(SalesEstimateChild salesEstimateChild);
/**
* 批量删除销售物料估价

38
ruoyi-admin/src/main/java/com/ruoyi/sales/service/impl/SysSalesEstimateChildServiceImpl.java → ruoyi-admin/src/main/java/com/ruoyi/sales/service/impl/SalesEstimateChildServiceImpl.java

@ -5,9 +5,9 @@ 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.SysSalesEstimateChildMapper;
import com.ruoyi.sales.domain.SysSalesEstimateChild;
import com.ruoyi.sales.service.ISysSalesEstimateChildService;
import com.ruoyi.sales.mapper.SalesEstimateChildMapper;
import com.ruoyi.sales.domain.SalesEstimateChild;
import com.ruoyi.sales.service.ISalesEstimateChildService;
import com.ruoyi.common.core.text.Convert;
/**
@ -17,10 +17,10 @@ import com.ruoyi.common.core.text.Convert;
* @date 2024-05-27
*/
@Service
public class SysSalesEstimateChildServiceImpl implements ISysSalesEstimateChildService
public class SalesEstimateChildServiceImpl implements ISalesEstimateChildService
{
@Autowired
private SysSalesEstimateChildMapper sysSalesEstimateChildMapper;
private SalesEstimateChildMapper sysSalesEstimateChildMapper;
/**
* 查询销售物料估价
@ -29,7 +29,7 @@ public class SysSalesEstimateChildServiceImpl implements ISysSalesEstimateChildS
* @return 销售物料估价
*/
@Override
public SysSalesEstimateChild selectSysSalesEstimateChildById(Long id)
public SalesEstimateChild selectSysSalesEstimateChildById(Long id)
{
return sysSalesEstimateChildMapper.selectSysSalesEstimateChildById(id);
}
@ -37,43 +37,43 @@ public class SysSalesEstimateChildServiceImpl implements ISysSalesEstimateChildS
/**
* 查询销售物料估价列表
*
* @param sysSalesEstimateChild 销售物料估价
* @param salesEstimateChild 销售物料估价
* @return 销售物料估价
*/
@Override
public List<SysSalesEstimateChild> selectSysSalesEstimateChildList(SysSalesEstimateChild sysSalesEstimateChild)
public List<SalesEstimateChild> selectSysSalesEstimateChildList(SalesEstimateChild salesEstimateChild)
{
return sysSalesEstimateChildMapper.selectSysSalesEstimateChildList(sysSalesEstimateChild);
return sysSalesEstimateChildMapper.selectSysSalesEstimateChildList(salesEstimateChild);
}
/**
* 新增销售物料估价
*
* @param sysSalesEstimateChild 销售物料估价
* @param salesEstimateChild 销售物料估价
* @return 结果
*/
@Override
public int insertSysSalesEstimateChild(SysSalesEstimateChild sysSalesEstimateChild)
public int insertSysSalesEstimateChild(SalesEstimateChild salesEstimateChild)
{
String loginName = ShiroUtils.getLoginName();
sysSalesEstimateChild.setCreateBy(loginName);
sysSalesEstimateChild.setCreateTime(DateUtils.getNowDate());
return sysSalesEstimateChildMapper.insertSysSalesEstimateChild(sysSalesEstimateChild);
salesEstimateChild.setCreateBy(loginName);
salesEstimateChild.setCreateTime(DateUtils.getNowDate());
return sysSalesEstimateChildMapper.insertSysSalesEstimateChild(salesEstimateChild);
}
/**
* 修改销售物料估价
*
* @param sysSalesEstimateChild 销售物料估价
* @param salesEstimateChild 销售物料估价
* @return 结果
*/
@Override
public int updateSysSalesEstimateChild(SysSalesEstimateChild sysSalesEstimateChild)
public int updateSysSalesEstimateChild(SalesEstimateChild salesEstimateChild)
{
String loginName = ShiroUtils.getLoginName();
sysSalesEstimateChild.setUpdateBy(loginName);
sysSalesEstimateChild.setUpdateTime(DateUtils.getNowDate());
return sysSalesEstimateChildMapper.updateSysSalesEstimateChild(sysSalesEstimateChild);
salesEstimateChild.setUpdateBy(loginName);
salesEstimateChild.setUpdateTime(DateUtils.getNowDate());
return sysSalesEstimateChildMapper.updateSysSalesEstimateChild(salesEstimateChild);
}
/**

22
ruoyi-admin/src/main/resources/mapper/sales/SysSalesEstimateChildMapper.xml → ruoyi-admin/src/main/resources/mapper/sales/SalesEstimateChildMapper.xml

@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.SysSalesEstimateChildMapper">
<resultMap type="SysSalesEstimateChild" id="SysSalesEstimateChildResult">
<resultMap type="SalesEstimateChild" id="SysSalesEstimateChildResult">
<result property="id" column="id" />
<result property="quoteId" column="quoteId" />
<result property="materialId" column="materialId" />
@ -43,10 +43,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectSysSalesEstimateChildVo">
select id, quoteId, materialId, materialCode, materialName, materialBom, materialType, processMethod, brand, photoUrl, unit, describe, countTax, usdTax, materialNum, materialSole, materialRmb, materialNoRmb, materialRmbSum, materialNoRmbSum, materialNoUsd, materialUsd, materialNoUsdSum, materialUsdSum, delivery_time, expiry_day, create_by, create_time, update_by, update_time, remark, use_status, audit_status, out_bound_quantity, un_bound_quantity from sys_sales_estimate_child
select id, quoteId, materialId, materialCode, materialName, materialBom, materialType, processMethod, brand, photoUrl, unit, describe, countTax, usdTax, materialNum, materialSole, materialRmb, materialNoRmb, materialRmbSum, materialNoRmbSum, materialNoUsd, materialUsd, materialNoUsdSum, materialUsdSum, delivery_time, expiry_day, create_by, create_time, update_by, update_time, remark, use_status, audit_status, out_bound_quantity, un_bound_quantity from sales_estimate_child
</sql>
<select id="selectSysSalesEstimateChildList" parameterType="SysSalesEstimateChild" resultMap="SysSalesEstimateChildResult">
<select id="selectSysSalesEstimateChildList" parameterType="SalesEstimateChild" resultMap="SysSalesEstimateChildResult">
<include refid="selectSysSalesEstimateChildVo"/>
<where>
<if test="quoteId != null and quoteId != ''"> and quoteId = #{quoteId}</if>
@ -74,8 +74,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id}
</select>
<insert id="insertSysSalesEstimateChild" parameterType="SysSalesEstimateChild" useGeneratedKeys="true" keyProperty="id">
insert into sys_sales_estimate_child
<insert id="insertSysSalesEstimateChild" parameterType="SalesEstimateChild" useGeneratedKeys="true" keyProperty="id">
insert into sales_estimate_child
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="quoteId != null">quoteId,</if>
<if test="materialId != null">materialId,</if>
@ -150,8 +150,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
</insert>
<update id="updateSysSalesEstimateChild" parameterType="SysSalesEstimateChild">
update sys_sales_estimate_child
<update id="updateSysSalesEstimateChild" parameterType="SalesEstimateChild">
update sales_estimate_child
<trim prefix="SET" suffixOverrides=",">
<if test="quoteId != null">quoteId = #{quoteId},</if>
<if test="materialId != null">materialId = #{materialId},</if>
@ -192,22 +192,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<delete id="deleteSysSalesEstimateChildById" parameterType="Long">
delete from sys_sales_estimate_child where id = #{id}
delete from sales_estimate_child where id = #{id}
</delete>
<delete id="deleteSysSalesEstimateChildByIds" parameterType="String">
delete from sys_sales_estimate_child where id in
delete from sales_estimate_child where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<update id="cancelSysSalesEstimateChildById" parameterType="Long">
update sys_sales_estimate_child set del_flag = '1' where id = #{id}
update sales_estimate_child set del_flag = '1' where id = #{id}
</update>
<update id="restoreSysSalesEstimateChildById" parameterType="Long">
update sys_sales_estimate_child set del_flag = '0' where id = #{id}
update sales_estimate_child set del_flag = '0' where id = #{id}
</update>
</mapper>

4
ruoyi-admin/src/main/resources/templates/sales/EstimateChild/edit.html

@ -6,7 +6,7 @@
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-EstimateChild-edit" th:object="${sysSalesEstimateChild}">
<form class="form-horizontal m" id="form-EstimateChild-edit" th:object="${salesEstimateChild}">
<input name="id" th:field="*{id}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">关联销售估价编号:</label>
@ -153,7 +153,7 @@
<label class="col-sm-3 control-label">计划交付时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="deliveryTime" th:value="${#dates.format(sysSalesEstimateChild.deliveryTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
<input name="deliveryTime" th:value="${#dates.format(salesEstimateChild.deliveryTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>

Loading…
Cancel
Save