rev:拼盘精度问题;移库任务点位添加校验
This commit is contained in:
@@ -166,7 +166,7 @@
|
||||
PURCHASE.ITEM_ID in 输入.mater_ids
|
||||
ENDOPTION
|
||||
OPTION 输入.source_name <> ""
|
||||
PURCHASE.NAME like "%" 输入.source_name "%"
|
||||
PURCHASE.NAME = 输入.source_name
|
||||
ENDOPTION
|
||||
OPTION 输入.hide <> ""
|
||||
1=1 HAVING sum( PURCHASE.QTY_ZT ) > 0
|
||||
|
||||
@@ -241,7 +241,19 @@ public class HandMoveStorServiceImpl implements HandMoveStorService {
|
||||
jo.put("turnin_struct_code", row.getString("turnin_struct_code"));
|
||||
jo.put("turnin_struct_name", row.getString("turnin_struct_name"));
|
||||
//查询移入点位
|
||||
JSONObject point = wo_Point.query("source_id='" + turnin_struct_id + "'").uniqueResult(0);
|
||||
JSONArray point_jo = wo_Point.query("source_id='" + turnin_struct_id + "'").getResultJSONArray(0);
|
||||
if (point_jo.size() == 0) {
|
||||
throw new BadRequestException(row.getString("turnin_struct_code") + "仓位数据异常,找不到对应点位!");
|
||||
}
|
||||
JSONObject point=null;
|
||||
for (Object o : point_jo) {
|
||||
point = (JSONObject) o;
|
||||
if (!point.getString("lock_type").equals("00")){
|
||||
continue;
|
||||
}
|
||||
String pointCode = point.getString("point_code");
|
||||
//任务状态需要判断
|
||||
}
|
||||
if (point == null) {
|
||||
throw new BadRequestException(row.getString("turnin_struct_code") + "仓位数据异常,找不到对应点位!");
|
||||
}
|
||||
|
||||
@@ -27,6 +27,8 @@ import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
@@ -966,7 +968,9 @@ public class ShutFrameServiceImpl implements ShutFrameService {
|
||||
jo.put("bill_table", "ST_IVT_MoveInv");
|
||||
storPublicService.IOStor(jo, "33");
|
||||
|
||||
double left = jo.getDoubleValue("qty") - jo.getDoubleValue("fact_qty");
|
||||
BigDecimal qty = new BigDecimal(jo.getDoubleValue("qty")).setScale(3, RoundingMode.HALF_UP);
|
||||
BigDecimal fact_qty = new BigDecimal(jo.getDoubleValue("fact_qty")).setScale(3, RoundingMode.HALF_UP);
|
||||
double left = qty.subtract(fact_qty).doubleValue();
|
||||
if (left > 0) {
|
||||
//更新移出库存
|
||||
jo.put("struct_id", jo.getString("turnout_struct_id"));
|
||||
|
||||
Reference in New Issue
Block a user