Browse Source

[update]:销售订单明细增加查询方法

dev
youjianchi 7 months ago
parent
commit
8fb2bd1cfc
  1. 2
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysSalesOrderChildMapper.java
  2. 2
      ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysSalesOrderChildService.java
  3. 5
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesOrderChildServiceImpl.java
  4. 5
      ruoyi-admin/src/main/resources/mapper/system/SysSalesOrderChildMapper.xml

2
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysSalesOrderChildMapper.java

@ -1,6 +1,7 @@
package com.ruoyi.system.mapper; package com.ruoyi.system.mapper;
import com.ruoyi.system.domain.SysSalesOrderChild; import com.ruoyi.system.domain.SysSalesOrderChild;
import org.apache.ibatis.annotations.Param;
import org.mapstruct.Mapper; import org.mapstruct.Mapper;
import java.util.List; import java.util.List;
@ -20,5 +21,6 @@ public interface SysSalesOrderChildMapper {
/*删除ids中的quoteId的所有子项*/ /*删除ids中的quoteId的所有子项*/
int deleteSysSalesOrderChildByQuoteIds(String[] ids); int deleteSysSalesOrderChildByQuoteIds(String[] ids);
SysSalesOrderChild selectOneByQuoteIdAndMaterialCode(@Param("quoteId") String quoteId, @Param("materialCode") String materialCode);
} }

2
ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysSalesOrderChildService.java

@ -21,4 +21,6 @@ public interface ISysSalesOrderChildService {
/*删除ids中的quoteId的所有子项*/ /*删除ids中的quoteId的所有子项*/
int deleteSysSalesOrderChildByQuoteIds(String[] ids); int deleteSysSalesOrderChildByQuoteIds(String[] ids);
SysSalesOrderChild selectOneByQuoteIdAndMaterialCode(String quoteId,String materialCode);
} }

5
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesOrderChildServiceImpl.java

@ -46,4 +46,9 @@ public class SysSalesOrderChildServiceImpl implements ISysSalesOrderChildService
public int deleteSysSalesOrderChildByQuoteIds(String[] ids) { public int deleteSysSalesOrderChildByQuoteIds(String[] ids) {
return sysCustomerQuoteChildMapper.deleteSysSalesOrderChildByQuoteIds(ids); return sysCustomerQuoteChildMapper.deleteSysSalesOrderChildByQuoteIds(ids);
} }
@Override
public SysSalesOrderChild selectOneByQuoteIdAndMaterialCode(String quoteId, String materialCode) {
return sysCustomerQuoteChildMapper.selectOneByQuoteIdAndMaterialCode(quoteId,materialCode);
}
} }

5
ruoyi-admin/src/main/resources/mapper/system/SysSalesOrderChildMapper.xml

@ -69,6 +69,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectSysSalesOrderChild"/> <include refid="selectSysSalesOrderChild"/>
where a.quoteId = #{quoteId} where a.quoteId = #{quoteId}
</select> </select>
<select id="selectOneByQuoteIdAndMaterialCode" resultMap="SysSalesOrderChildResult">
<include refid="selectSysSalesOrderChild"/>
where a.quoteId = #{quoteId}
and a.materialCode = #{materialCode}
</select>
<insert id="insertSysSalesOrderChild" parameterType="SysSalesOrderChild" useGeneratedKeys="true" keyProperty="id"> <insert id="insertSysSalesOrderChild" parameterType="SysSalesOrderChild" useGeneratedKeys="true" keyProperty="id">
insert into sys_sales_order_child insert into sys_sales_order_child
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">

Loading…
Cancel
Save