Browse Source

[fix] 工程管理

物料模块查询所有物料信息列表和bom的id后端接口:新增审核状态和使用状态,只有审核状态为1和使用状态为1的物料才能被正常使用
物料模块通过materialVo查询物料信息后端接口:新增审核状态和使用状态,只有审核状态为1和使用状态为1的物料才能被正常使用
物料模块查询所有物料信息列表后端接口:新增审核状态和使用状态,只有审核状态为1和使用状态为1的物料才能被正常使用
物料模块查询所有通过审核的半成品和成品物料的信息后端接口:补充上使用状态信息
dev
liuxiaoxu 3 days ago
parent
commit
d2b8d80945
  1. 6
      ruoyi-admin/src/main/java/com/ruoyi/erp/service/impl/ErpMaterialServiceImpl.java
  2. 7
      ruoyi-admin/src/main/resources/mapper/erp/ErpMaterialMapper.xml

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

@ -217,6 +217,8 @@ public class ErpMaterialServiceImpl implements IErpMaterialService
@Override @Override
public List<ErpMaterialVo> selectAllErpMaterialListWithBom(ErpMaterial erpMaterial) { public List<ErpMaterialVo> selectAllErpMaterialListWithBom(ErpMaterial erpMaterial) {
erpMaterial.setUseStatus("1");
erpMaterial.setAuditStatus("1");
List<ErpMaterialVo> erpMaterialVos = erpMaterialMapper.selectAllErpMaterialListWithBom(erpMaterial); List<ErpMaterialVo> erpMaterialVos = erpMaterialMapper.selectAllErpMaterialListWithBom(erpMaterial);
return erpMaterialVos; return erpMaterialVos;
} }
@ -609,6 +611,10 @@ public class ErpMaterialServiceImpl implements IErpMaterialService
* */ * */
@Override @Override
public List<ErpMaterialVo> selectAllErpMaterialListByMaterialVo(ErpMaterialVo erpMaterialVo) { public List<ErpMaterialVo> selectAllErpMaterialListByMaterialVo(ErpMaterialVo erpMaterialVo) {
// 审核状态-审核通过
erpMaterialVo.setAuditStatus("1");
// 使用状态-是
erpMaterialVo.setUseStatus("1");
return erpMaterialMapper.selectAllErpMaterialListByMaterialVo(erpMaterialVo); return erpMaterialMapper.selectAllErpMaterialListByMaterialVo(erpMaterialVo);
} }

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

@ -155,6 +155,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectAllErpMaterialList" resultMap="ErpMaterialResult"> <select id="selectAllErpMaterialList" resultMap="ErpMaterialResult">
<include refid="selectErpMaterialVo"/> <include refid="selectErpMaterialVo"/>
where use_status = 1 and audit_status = 1
</select> </select>
<select id="selectAllErpMaterialListWithBom" resultMap="ErpMaterialResult"> <select id="selectAllErpMaterialListWithBom" resultMap="ErpMaterialResult">
@ -166,6 +167,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join erp_bom eb on em.material_no = eb.material_no left join erp_bom eb on em.material_no = eb.material_no
<where> <where>
<if test="materialNo != null and materialNo != ''"> and em.material_no like concat(#{materialNo}, '%')</if> <if test="materialNo != null and materialNo != ''"> and em.material_no like concat(#{materialNo}, '%')</if>
<if test="auditStatus != null and auditStatus != ''"> and em.audit_status = #{auditStatus}</if>
<if test="useStatus != null and useStatus != ''"> and em.use_status = #{useStatus}</if>
</where> </where>
</select> </select>
@ -182,13 +185,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where parent_id = (select id from sys_category where code = 'materialType') ) where parent_id = (select id from sys_category where code = 'materialType') )
)cate on erp.material_type = cate.code )cate on erp.material_type = cate.code
where cate.parent_id in (select id from sys_category where code in ('cp','bcp')) where cate.parent_id in (select id from sys_category where code in ('cp','bcp'))
and erp.del_flag = '0' and erp.audit_status = '1' and erp.del_flag = '0' and erp.audit_status = '1' and erp.use_status = '1'
</select> </select>
<select id="selectAllErpMaterialListByMaterialVo" parameterType="ErpMaterial" resultMap="ErpMaterialResult"> <select id="selectAllErpMaterialListByMaterialVo" parameterType="ErpMaterial" resultMap="ErpMaterialResult">
<include refid="selectErpMaterialVo"/> <include refid="selectErpMaterialVo"/>
<where> <where>
<if test="materialNo != null and materialNo != ''"> and material_no like concat(#{materialNo}, '%')</if> <if test="materialNo != null and materialNo != ''"> and material_no like concat(#{materialNo}, '%')</if>
<if test="auditStatus != null and auditStatus != ''"> and audit_status = #{auditStatus}</if>
<if test="useStatus != null and useStatus != ''"> and use_status = #{useStatus}</if>
</where> </where>
</select> </select>

Loading…
Cancel
Save