fix:出入库单状态查询

This commit is contained in:
zhangzq
2026-08-05 09:29:21 +08:00
parent 6137910e81
commit f3c671e9f8
4 changed files with 12 additions and 71 deletions

View File

@@ -149,29 +149,29 @@
ios.is_upload = #{params.is_upload}
</if>
<if test="params.storIds != null">
<if test="params.stor_id != null">
AND
ios.stor_id IN #{params.storIds}
ios.stor_id = #{params.stor_id}
</if>
<if test="params.billStatuses != null">
<if test="params.bill_status != null">
AND
ios.bill_status IN #{params.billStatuses}
ios.bill_status = #{params.bill_status}
</if>
<if test="params.billTypes != null">
<if test="params.bill_type != null">
AND
ios.bill_type IN #{params.billTypes}
ios.bill_type = #{params.bill_type}
</if>
<if test="params.pcsn != null">
AND
dis.pcsn LIKE #{params.pcsn}
dis.pcsn = #{params.pcsn}
</if>
<if test="params.pcsn_in != null">
AND
dis.pcsn IN #{params.pcsn_in}
dis.pcsn = #{params.pcsn_in}
</if>
<if test="params.begin_time != null">

View File

@@ -122,56 +122,19 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
// 空格查询
if (StrUtil.isNotEmpty(map.get("pcsn"))) {
// 判断是否有空格
String pcsn = MapUtil.getStr(map, "pcsn");
boolean matches = pcsn.matches(".*\\s.*");
if (matches) {
String[] s = pcsn.split(" ");
String pcsn_in = String.join("','", Arrays.asList(s));
map.put("pcsn_in", "('"+pcsn_in+"')");
map.put("pcsn", "");
} else {
map.put("pcsn", "%" + map.get("pcsn") + "%");
}
map.put("pcsn", map.get("pcsn"));
}
if (ObjectUtil.isNotEmpty(stor_id)) {
String storIds = "(";
for (int i = 0; i < stor_id.length; i++) {
if (i != stor_id.length - 1) {
storIds += "'" + stor_id[i] + "',";
} else {
storIds += "'" + stor_id[i] + "')";
}
}
map.put("storIds", storIds);
map.put("stor_id", map.get("stor_id"));
}
if (ObjectUtil.isNotEmpty(bill_status)) {
String billStatuses = "(";
for (int i = 0; i < bill_status.length; i++) {
if (i != bill_status.length - 1) {
billStatuses += "'" + bill_status[i] + "',";
} else {
billStatuses += "'" + bill_status[i] + "')";
}
}
map.put("billStatuses", billStatuses);
map.put("bill_status", map.get("bill_status"));
}
if (ObjectUtil.isNotEmpty(bill_type)) {
String billTypes = "(";
for (int i = 0; i < bill_type.length; i++) {
if (i != bill_type.length - 1) {
billTypes += "'" + bill_type[i] + "',";
} else {
billTypes += "'" + bill_type[i] + "')";
}
}
map.put("billTypes", billTypes);
map.put("bill_type", map.get("bill_type"));
}
return ioStorInvMapper.queryOutBillPage(new Page<>(page.getPage()+1,page.getSize()),map);