库存预警bug修复

pro
郑明梁 2 years ago
parent 2334016fec
commit ba9711c467

@ -118,4 +118,11 @@ public interface UdiRelevanceDao extends BaseMapperPlus<UdiRelevanceDao, UdiRele
* @return
*/
UdiRelevanceResponse selectOneUdiJoinSup(FilterUdiRelRequest filterUdiRelRequest);
/**
*
* @param productName
* @return
*/
List<String> selectRelIdByName(@Param("productName") String productName);
}

@ -3,6 +3,8 @@ package com.glxp.api.req.inv;
import com.glxp.api.util.page.ListPageRequest;
import lombok.Data;
import java.util.List;
/**
*
*/
@ -34,4 +36,8 @@ public class FilterInvRemindSetRequest extends ListPageRequest {
*/
private Integer status;
private String productName;
List<String> relIds;
}

@ -52,6 +52,10 @@ public class InvRemindSetServiceImpl implements InvRemindSetService {
if (null != filterInvRemindSetRequest.getPage() && null != filterInvRemindSetRequest.getLimit()) {
PageHelper.offsetPage((filterInvRemindSetRequest.getPage() - 1) * filterInvRemindSetRequest.getLimit(), filterInvRemindSetRequest.getLimit());
}
if(StrUtil.isNotBlank(filterInvRemindSetRequest.getProductName())){
filterInvRemindSetRequest.setRelIds(udiRelevanceDao.selectRelIdByName(filterInvRemindSetRequest.getProductName()));
}
List<InvRemindSetResponse> list = invRemindSetDao.filterList(filterInvRemindSetRequest);
if (CollUtil.isNotEmpty(list)) {
list.forEach(invRemindSetResponse -> {

@ -1256,4 +1256,17 @@
</where>
limit 1
</select>
<select id="selectRelIdByName" resultType="java.lang.String">
SELECT
b2.id
FROM
basic_products b1
LEFT JOIN basic_udirel b2 ON b1.uuid = b2.uuid
<where>
<if test="productName != '' and productName != null">
AND b1.cpmctymc like concat('%', #{productName}, '%')
</if>
</where>
</select>
</mapper>

@ -38,6 +38,13 @@
<if test="status != null">
AND irs.status = #{status}
</if>
<if test="relIds != null">
AND irs.relId IN
<foreach collection="relIds" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
</where>
order by irs.updateTime desc
</select>

Loading…
Cancel
Save