This commit is contained in:
zds
2022-11-10 20:12:16 +08:00
parent 52b7294a9f
commit a892e65fec
6 changed files with 24 additions and 34 deletions

View File

@@ -553,9 +553,13 @@ public class HandNewMaterialServiceImpl implements HandNewMaterialService {
if (receive_dtl_jo.getString("status").equals("99")) {
throw new PdaRequestException("收货单明细已完成!");
}
if (receive_dtl_jo.getDoubleValue("status") == 0) {
throw new PdaRequestException("收货明细入库数为0");
double unin = receive_dtl_jo.getDouble("receive_qty")-receive_dtl_jo.getDouble("instor_qty");
if (unin <= 0) {
throw new PdaRequestException("收货明细未入库数为0");
}
if(bucket_now.getDouble("storage_qty") > unin){
throw new PdaRequestException("当前组盘入库数"+bucket_now.getDouble("storage_qty")+"大于收货明细未入库数"+unin+"");
}
bucket_now.put("source_billdtl_id", bill.get("source_billdtl_id"));
bucket_now.put("source_bill_type", bill.get("source_bill_type"));
bucket_now.put("source_bill_code", bill.get("source_bill_code"));

View File

@@ -69,16 +69,10 @@ public class DailyplanServiceImpl implements DailyplanService {
String planend_date = jo.getString("planend_date");
Date date = DateUtil.parse(planend_date);
String plan_finish_date = jo.getString("plan_finish_date");
Date date2 = DateUtil.parse(plan_finish_date);
long days = (int) DateUtil.between(date2,date, DateUnit.DAY);
int report_time = jo.getInteger("report_time");
int report_day = report_time/24;
if(date2.getTime() >= date.getTime()){
jo.put("day_num",days-report_day);
}else{
jo.put("day_num",-days-report_day);
}
Date date2 = DateUtil.offsetDay(date, report_day);
jo.put("plan_finish_date2",DateUtil.formatDate(date2));
ja.add(jo);
}
Map<String, Object> jret = new HashMap<String, Object>();

View File

@@ -136,9 +136,10 @@ public class StatisticalReportServiceImpl implements StatisticalReportService {
if (dtlJa_map.containsKey(material_id)) {
need_qty = dtlJa_map.get(material_id);
}
double canuse_num = NumberUtil.sub(now_ivt - need_qty).doubleValue();
jo1.put(material_id, String.format("%.3f", canuse_num));
jo1.put(material_id, String.format("%.3f", now_ivt));
double canuse_num = NumberUtil.sub(now_ivt - need_qty).doubleValue();
//已开单重量
jo22.put(material_id, String.format("%.3f", need_qty));
//2、排产需求量(未开单的工令重量+排产未生成工令日计划重量)根据bom计算需要多少原料库存重量
@@ -184,7 +185,7 @@ public class StatisticalReportServiceImpl implements StatisticalReportService {
jo7.put(material_id, String.format("%.3f", safe_qty));
//8、采购缺口库存+待检+在途+最低储备-排产量
double buy_qty = bom_qty + safe_qty - (canuse_num + noin_qty + notqty);
double buy_qty = (canuse_num + noin_qty + notqty) - (bom_qty + safe_qty);
jo8.put(material_id, String.format("%.3f", buy_qty));
//6、覆盖日期物料库存可坚持到哪一天库存现存量减每天需求量哪天<0,取前一天