Browse Source

修改出库查询排序算法

lwx_dev
erdanergou 2 years ago
parent
commit
bf47909a8d
  1. 2
      src/main/java/com/dreamchaser/depository_manage/controller/DepositoryRecordController.java
  2. 15
      src/main/java/com/dreamchaser/depository_manage/mapper/DepositoryRecordMapper.xml
  3. 1
      src/main/resources/templates/pages/depository/table-out.html
  4. 15
      target/classes/com/dreamchaser/depository_manage/mapper/DepositoryRecordMapper.xml
  5. 3
      target/classes/templates/pages/depository/table-in.html
  6. 14
      target/classes/templates/pages/depository/table-out.html
  7. 13
      target/classes/templates/pages/depository/table-stock.html

2
src/main/java/com/dreamchaser/depository_manage/controller/DepositoryRecordController.java

@ -1061,7 +1061,6 @@ public class DepositoryRecordController {
list = depositoryRecordService.findApplicationOutRecordPByUser(userByPort, map, userKey, token);
countBy = depositoryRecordService.findApplicationOutRecordPCountByUser(userByPort, map);
}
for (ApplicationOutRecordP outRecordP : list) {
// 根据主订单获取所有子订单
List<ApplicationOutRecordMinP> applicationOutMinByParentId = depositoryRecordService.findApplicationOutMinByParentId(outRecordP.getId());
@ -1157,6 +1156,7 @@ public class DepositoryRecordController {
outRecordP.setPrice(sumPrice);
outRecordP.setMnameStringList(mnameForMobiles);
}
return new RestResponse(list, countBy, 200);
}

15
src/main/java/com/dreamchaser/depository_manage/mapper/DepositoryRecordMapper.xml

@ -639,7 +639,7 @@
</if>
GROUP BY aorid
<if test="groupByForState != null and groupByForState !=''">
ORDER BY pass DESC, applicantTime desc
ORDER BY pass DESC,depositoryManagerPass asc, applicantTime desc
</if>
<if test="groupByForState == null or groupByForState == ''">
ORDER BY applicantTime desc
@ -662,7 +662,7 @@
select
<include refid="ApplicationOutRecordInfo"/>
from applicationOutRecordInfo
where 1 = 1
where 1 = 1 and mid is not
<if test="depositoryIdList != null">
and ( depositoryId
in
@ -705,7 +705,12 @@
</if>
GROUP BY aorid
order by applicantTime desc
<if test="groupByForState != null and groupByForState !=''">
ORDER BY pass DESC,depositoryManagerPass asc, applicantTime desc
</if>
<if test="groupByForState == null or groupByForState == ''">
ORDER BY applicantTime desc
</if>
<if test="begin != null and size != null">
LIMIT #{begin},#{size}
</if>
@ -715,7 +720,7 @@
select
count(DISTINCT aorid)
from applicationOutRecordInfo
where 1 = 1
where 1 = 1 and mid is not
<if test="depositoryIdList != null">
and ( depositoryId in
<foreach collection="depositoryIdList" index="index" item="id" open="(" separator="," close=")">
@ -924,7 +929,7 @@
select
count(DISTINCT aorid)
from applicationOutRecordInfo
where 1 = 1
where 1 = 1 and mid is not
<if test="id != '' and id != null">
and aorid = #{id}
</if>

1
src/main/resources/templates/pages/depository/table-out.html

@ -364,6 +364,7 @@
if (data.version !== '') {
req.version = data.version.trim();
}
req.groupByForState = true;
//执行搜索重载
table.reloadData('currentTableId', {
url: '/depositoryRecord/applicationOutView',

15
target/classes/com/dreamchaser/depository_manage/mapper/DepositoryRecordMapper.xml

@ -639,7 +639,7 @@
</if>
GROUP BY aorid
<if test="groupByForState != null and groupByForState !=''">
ORDER BY pass DESC, applicantTime desc
ORDER BY pass DESC,depositoryManagerPass asc, applicantTime desc
</if>
<if test="groupByForState == null or groupByForState == ''">
ORDER BY applicantTime desc
@ -662,7 +662,7 @@
select
<include refid="ApplicationOutRecordInfo"/>
from applicationOutRecordInfo
where 1 = 1
where 1 = 1 and mid is not
<if test="depositoryIdList != null">
and ( depositoryId
in
@ -705,7 +705,12 @@
</if>
GROUP BY aorid
order by applicantTime desc
<if test="groupByForState != null and groupByForState !=''">
ORDER BY pass DESC,depositoryManagerPass asc, applicantTime desc
</if>
<if test="groupByForState == null or groupByForState == ''">
ORDER BY applicantTime desc
</if>
<if test="begin != null and size != null">
LIMIT #{begin},#{size}
</if>
@ -715,7 +720,7 @@
select
count(DISTINCT aorid)
from applicationOutRecordInfo
where 1 = 1
where 1 = 1 and mid is not
<if test="depositoryIdList != null">
and ( depositoryId in
<foreach collection="depositoryIdList" index="index" item="id" open="(" separator="," close=")">
@ -924,7 +929,7 @@
select
count(DISTINCT aorid)
from applicationOutRecordInfo
where 1 = 1
where 1 = 1 and mid is not
<if test="id != '' and id != null">
and aorid = #{id}
</if>

3
target/classes/templates/pages/depository/table-in.html

@ -318,7 +318,8 @@
layer.msg("未选中记录,请确认!");
return false;
}
} else if (obj.event === 'showEchart') {
}
else if (obj.event === 'showEchart') {
let listItem = `<ul class="layui-table-tool-panel" style="max-height: 685px;">
<li lay-event="showLineEchart">查看面积图</li>
<li lay-event="showSunburstEchart">查看旭日图</li>

14
target/classes/templates/pages/depository/table-out.html

@ -364,6 +364,7 @@
if (data.version !== '') {
req.version = data.version.trim();
}
req.groupByForState = true;
//执行搜索重载
table.reloadData('currentTableId', {
url: '/depositoryRecord/applicationOutView',
@ -477,8 +478,17 @@
return false;
}
}
else if(obj.event === 'showEchart'){
else if (obj.event === 'showEchart') {
let listItem = `<ul class="layui-table-tool-panel" style="max-height: 685px;">
<li lay-event="showLineEchart">查看面积图</li>
<li lay-event="showSunburstEchart">查看旭日图</li>
</ul>`;
$("#showEchart").append(listItem)
}else if(obj.event === 'showLineEchart'){
console.log("showLineEchart")
}else if(obj.event === "showSunburstEchart"){
console.log("showSunburstEchart")
}
});

13
target/classes/templates/pages/depository/table-stock.html

@ -467,8 +467,17 @@
} else if (obj.event === 'downloadFile') {
window.open("/download/inventoryImportDownload", "_self");
}
else if(obj.event === 'showEchart'){
else if (obj.event === 'showEchart') {
let listItem = `<ul class="layui-table-tool-panel" style="max-height: 685px;">
<li lay-event="showLineEchart">查看面积图</li>
<li lay-event="showSunburstEchart">查看旭日图</li>
</ul>`;
$("#showEchart").append(listItem)
}else if(obj.event === 'showLineEchart'){
console.log("showLineEchart")
}else if(obj.event === "showSunburstEchart"){
console.log("showSunburstEchart")
}
});

Loading…
Cancel
Save