|
@ -3,9 +3,11 @@ package org.nl.wms.st.outbill.service.impl; |
|
|
import cn.hutool.core.collection.CollectionUtil; |
|
|
import cn.hutool.core.collection.CollectionUtil; |
|
|
import com.alibaba.fastjson.JSONArray; |
|
|
import com.alibaba.fastjson.JSONArray; |
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
|
import org.nl.b_lms.storage_manage.ios.service.iostorInv.IStIvtIostorinvService; |
|
|
import org.nl.b_lms.storage_manage.ios.service.iostorInv.IStIvtIostorinvdisService; |
|
|
import org.nl.b_lms.storage_manage.ios.service.iostorInv.IStIvtIostorinvdisService; |
|
|
import org.nl.b_lms.storage_manage.ios.service.iostorInv.IStIvtIostorinvdtlService; |
|
|
import org.nl.b_lms.storage_manage.ios.service.iostorInv.IStIvtIostorinvdtlService; |
|
|
import org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.StIvtIostorinv; |
|
|
import org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.StIvtIostorinv; |
|
@ -16,7 +18,6 @@ import org.nl.common.domain.query.PageQuery; |
|
|
import org.nl.common.utils.SecurityUtils; |
|
|
import org.nl.common.utils.SecurityUtils; |
|
|
import org.nl.common.utils.StringDealUtils; |
|
|
import org.nl.common.utils.StringDealUtils; |
|
|
import org.nl.modules.wql.WQL; |
|
|
import org.nl.modules.wql.WQL; |
|
|
import org.nl.wms.basedata.st.service.StructivtService; |
|
|
|
|
|
import org.nl.wms.st.outbill.service.CheckOutBillService; |
|
|
import org.nl.wms.st.outbill.service.CheckOutBillService; |
|
|
import org.nl.wms.st.outbill.service.dto.OutBillDtlQueryParam; |
|
|
import org.nl.wms.st.outbill.service.dto.OutBillDtlQueryParam; |
|
|
import org.nl.wms.st.outbill.service.dto.OutBillQueryPageParam; |
|
|
import org.nl.wms.st.outbill.service.dto.OutBillQueryPageParam; |
|
@ -25,7 +26,6 @@ import org.nl.wms.st.outbill.service.dto.StockMaterialQueryParam; |
|
|
import org.nl.wms.st.outbill.service.vo.OutBillDtlVo; |
|
|
import org.nl.wms.st.outbill.service.vo.OutBillDtlVo; |
|
|
import org.nl.wms.st.outbill.service.vo.OutBillTaskVo; |
|
|
import org.nl.wms.st.outbill.service.vo.OutBillTaskVo; |
|
|
import org.nl.wms.st.outbill.service.vo.StockMaterialVo; |
|
|
import org.nl.wms.st.outbill.service.vo.StockMaterialVo; |
|
|
import org.nl.wms.stat.service.vo.PastStructPageVo; |
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
@ -48,9 +48,12 @@ public class CheckOutBillServiceImpl implements CheckOutBillService { |
|
|
@Autowired |
|
|
@Autowired |
|
|
private StIvtBsrealstorattrService bsrealstorattrService; |
|
|
private StIvtBsrealstorattrService bsrealstorattrService; |
|
|
@Autowired |
|
|
@Autowired |
|
|
|
|
|
private IStIvtIostorinvService stIvtIostorinvService; |
|
|
|
|
|
@Autowired |
|
|
private StIvtIostorinvMapper stIvtIostorinvMapper; |
|
|
private StIvtIostorinvMapper stIvtIostorinvMapper; |
|
|
@Autowired |
|
|
@Autowired |
|
|
private StIvtStructivtMapper stIvtStructivtMapper; |
|
|
private StIvtStructivtMapper stIvtStructivtMapper; |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public List<OutBillDtlVo> getOutBillDtl(OutBillDtlQueryParam param) { |
|
|
public List<OutBillDtlVo> getOutBillDtl(OutBillDtlQueryParam param) { |
|
|
return iostorinvdtlService.getOutBillDtl(param); |
|
|
return iostorinvdtlService.getOutBillDtl(param); |
|
@ -137,6 +140,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService { |
|
|
.getResultJSONArray(0); |
|
|
.getResultJSONArray(0); |
|
|
return jo; |
|
|
return jo; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public JSONArray getOutBillTask(Map whereJson) { |
|
|
public JSONArray getOutBillTask(Map whereJson) { |
|
|
HashMap<String, String> map = new HashMap<>(whereJson); |
|
|
HashMap<String, String> map = new HashMap<>(whereJson); |
|
@ -153,4 +157,23 @@ public class CheckOutBillServiceImpl implements CheckOutBillService { |
|
|
} |
|
|
} |
|
|
return jo; |
|
|
return jo; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public JSONObject updataIsOverdue(JSONObject whereJson) { |
|
|
|
|
|
// 更新主表
|
|
|
|
|
|
StIvtIostorinv jsonMst = stIvtIostorinvService.getById(whereJson.getString("iostorinv_id")); |
|
|
|
|
|
jsonMst.setIs_overdue("1"); |
|
|
|
|
|
stIvtIostorinvService.updateById(jsonMst); |
|
|
|
|
|
|
|
|
|
|
|
// 计算超期数量
|
|
|
|
|
|
List<JSONObject> disList = iostorinvdisService.getAllOverdueByDtlId(whereJson.getString("iostorinvdtl_id")); |
|
|
|
|
|
double overdue_qyt = disList.stream() |
|
|
|
|
|
.map(row -> row.getDoubleValue("plan_qty")) |
|
|
|
|
|
.reduce(Double::sum).orElse(0.00); |
|
|
|
|
|
|
|
|
|
|
|
JSONObject result = new JSONObject(); |
|
|
|
|
|
result.put("overdue_qyt", overdue_qyt); |
|
|
|
|
|
result.put("mst", jsonMst); |
|
|
|
|
|
return result; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|