|
@@ -1,6 +1,7 @@
|
|
|
package com.fjhx.stock.service.impl;
|
|
|
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
+import cn.hutool.core.util.ObjectUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
@@ -177,6 +178,28 @@ public class StockWaterServiceImpl extends ServiceImpl<StockWaterMapper, StockWa
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
+ public Page<Map<String, Object>> getPickingPage(Map<String, String> condition) {
|
|
|
+
|
|
|
+ QueryWrapper<?> wrapper = WrapperUtil.init()
|
|
|
+ .periodOfTime("sw.CreatedTime") // 时间段查询
|
|
|
+ .eq("m.TechnologyType", "materialType") // 物料属性
|
|
|
+ .eq("uu.id", "userId") // 用户
|
|
|
+ .getWrapper();
|
|
|
+
|
|
|
+ wrapper.eq("sw.IsDelete", 0); // 未删除
|
|
|
+
|
|
|
+ // 出入库类型
|
|
|
+ String type = condition.get("type");
|
|
|
+ if (ObjectUtil.isEmpty(type) || type.equals("0")) {
|
|
|
+ wrapper.in("sw.StockChangeType", 15, 20, 23);
|
|
|
+ } else {
|
|
|
+ wrapper.eq("sw.StockChangeType", type);
|
|
|
+ }
|
|
|
+
|
|
|
+ return baseMapper.getPickingPage(createPage(condition), wrapper);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
public Map<String, Object> contractPaymentStatistics(Map<String, String> condition) {
|
|
|
QueryWrapper<?> wrapper = WrapperUtil.init(condition).periodOfTime("pc.ApprovalTime").getWrapper();
|
|
|
wrapper.eq("pc.IsDelete", 0);
|
|
@@ -314,6 +337,7 @@ public class StockWaterServiceImpl extends ServiceImpl<StockWaterMapper, StockWa
|
|
|
Page<Map<String, Object>> result = baseMapper.subscriptionAmountPage(createPage(condition), wrapper);
|
|
|
List<Map<String, Object>> records = result.getRecords();
|
|
|
|
|
|
+ // 格式转换
|
|
|
records.forEach(item -> {
|
|
|
item.put("purchaseQty", ((BigDecimal) item.get("purchaseQty")).setScale(2, RoundingMode.HALF_UP));
|
|
|
item.put("totalAmount", ((BigDecimal) item.get("totalAmount")).setScale(2, RoundingMode.HALF_UP));
|