代码提交
This commit is contained in:
parent
4e7158c2a4
commit
400efc5505
|
|
@ -272,6 +272,9 @@
|
||||||
<if test="maType != null and maType != ''">
|
<if test="maType != null and maType != ''">
|
||||||
and mat2.`NAME` like concat ('%',#{maType},'%')
|
and mat2.`NAME` like concat ('%',#{maType},'%')
|
||||||
</if>
|
</if>
|
||||||
|
<if test="isCount != null and isCount != ''">
|
||||||
|
and rs.isCount = #{isCount}
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
GROUP BY rs.typeId
|
GROUP BY rs.typeId
|
||||||
) a WHERE
|
) a WHERE
|
||||||
|
|
|
||||||
|
|
@ -80,6 +80,39 @@ public class IndexHomeDetailsController extends BaseController<IndexHomeDetailsB
|
||||||
}
|
}
|
||||||
return ar;
|
return ar;
|
||||||
}
|
}
|
||||||
|
@RequestMapping(value = "getMaTypeDetail", method = RequestMethod.POST)
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxRes getMaTypeDetail(IndexHomeDetailsBean o) {
|
||||||
|
AjaxRes ar = getAjaxRes();
|
||||||
|
try {
|
||||||
|
List<IndexHomeDetailsBean> list = service.getMaTypeDetails(o);
|
||||||
|
if (o != null) {
|
||||||
|
// 过滤数量
|
||||||
|
if (o.getQuantityFilter() != null && o.getQuantityFilter() > 0) {
|
||||||
|
switch (o.getQuantityFilter()) {
|
||||||
|
case 1:
|
||||||
|
list.removeIf(item -> item.getMaTotal() == null || item.getMaTotal() < 1);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
list.removeIf(item -> item.getStorageNum() == null || item.getStorageNum() < 1);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
list.removeIf(item -> item.getInuseNum() == null || item.getInuseNum() < 1);
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
list.removeIf(item -> item.getScrapNum() == null || item.getScrapNum() < 1);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ar.setSucceed("code", "0");
|
||||||
|
ar.setSucceed(list);
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error(e.toString(), e);
|
||||||
|
ar.setFailMsg(GlobalConst.DATA_FAIL);
|
||||||
|
}
|
||||||
|
return ar;
|
||||||
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "getMaChangeInfo", method = RequestMethod.POST)
|
@RequestMapping(value = "getMaChangeInfo", method = RequestMethod.POST)
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue