Browse Source

[feat] 销售管理

修改销售估计的新增销售估价 物料选择后端接口:新增物料号作为分页查询的筛选条件
物料新增通过materialVo查询物料信息后端方法
dev
liuxiaoxu 3 months ago
parent
commit
36e5ccc3ac
  1. 5
      ruoyi-admin/src/main/java/com/ruoyi/erp/mapper/ErpMaterialMapper.java
  2. 8
      ruoyi-admin/src/main/java/com/ruoyi/erp/service/IErpMaterialService.java
  3. 9
      ruoyi-admin/src/main/java/com/ruoyi/erp/service/impl/ErpMaterialServiceImpl.java
  4. 4
      ruoyi-admin/src/main/java/com/ruoyi/sales/controller/SalesEstimateController.java
  5. 9
      ruoyi-admin/src/main/resources/mapper/erp/ErpMaterialMapper.xml

5
ruoyi-admin/src/main/java/com/ruoyi/erp/mapper/ErpMaterialMapper.java

@ -117,4 +117,9 @@ public interface ErpMaterialMapper
//根据料号前缀查询匹配物料
List<ErpMaterialVo> searchMaterialsByPrefix(String prefix);
/**
* 通过materialVo查询物料信息
* */
List<ErpMaterialVo> selectAllErpMaterialListByMaterialVo(ErpMaterialVo erpMaterialVo);
}

8
ruoyi-admin/src/main/java/com/ruoyi/erp/service/IErpMaterialService.java

@ -127,4 +127,12 @@ public interface IErpMaterialService
public ProcessInstance submitApply(ErpMaterial erpMaterial);
Integer addStockMaterial(ErpMaterialVo erpMaterialVo);
/**
* 通过materialVo查询物料信息
* */
List<ErpMaterialVo> selectAllErpMaterialListByMaterialVo(ErpMaterialVo erpMaterialVo);
}

9
ruoyi-admin/src/main/java/com/ruoyi/erp/service/impl/ErpMaterialServiceImpl.java

@ -465,4 +465,13 @@ public class ErpMaterialServiceImpl implements IErpMaterialService
warehouseInventoryInquiry.setUpdateTime(DateUtils.getNowDate());
return inventoryInquiryMapper.insertWarehouseInventoryInquiry(warehouseInventoryInquiry);
}
/**
* 通过materialVo查询物料信息
* */
@Override
public List<ErpMaterialVo> selectAllErpMaterialListByMaterialVo(ErpMaterialVo erpMaterialVo) {
return erpMaterialMapper.selectAllErpMaterialListByMaterialVo(erpMaterialVo);
}
}

4
ruoyi-admin/src/main/java/com/ruoyi/sales/controller/SalesEstimateController.java

@ -387,10 +387,10 @@ public class SalesEstimateController extends BaseController
*/
@ResponseBody
@PostMapping("/getEstimateMaterialList")
public TableDataInfo getEstimateMaterialList( )
public TableDataInfo getEstimateMaterialList(ErpMaterialVo erpMaterialVo)
{
startPage();
List<ErpMaterialVo> erpMaterialVos = materialService.selectAllErpMaterialList();
List<ErpMaterialVo> erpMaterialVos = materialService.selectAllErpMaterialListByMaterialVo(erpMaterialVo);
return getDataTable(erpMaterialVos);
}

9
ruoyi-admin/src/main/resources/mapper/erp/ErpMaterialMapper.xml

@ -185,6 +185,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and erp.del_flag = '0' and erp.audit_status = '1'
</select>
<select id="selectAllErpMaterialListByMaterialVo" parameterType="ErpMaterial" resultMap="ErpMaterialResult">
<include refid="selectErpMaterialVo"/>
<where>
<if test="materialNo != null and materialNo != ''"> and material_no like concat(#{materialNo}, '%')</if>
</where>
</select>
<insert id="insertErpMaterial" parameterType="ErpMaterial" useGeneratedKeys="true" keyProperty="id">
insert into erp_material
<trim prefix="(" suffix=")" suffixOverrides=",">
@ -342,4 +350,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and erp.del_flag = '0' and erp.audit_status = '1'
and material_no like concat(#{prefix}, '%') escape '\\'
</select>
</mapper>
Loading…
Cancel
Save