优化
This commit is contained in:
@@ -239,12 +239,11 @@ public class HandCleanOutIvtServiceImpl implements HandCleanOutIvtService {
|
||||
}
|
||||
|
||||
|
||||
BigDecimal left_qty = NumberUtil.sub(bucketjo.getString("storage_qty"), out_qty);
|
||||
|
||||
double left_qty = NumberUtil.round(bucketjo.getDouble("storage_qty")-Double.valueOf(out_qty),3).doubleValue();
|
||||
|
||||
// 插入到【配粉间桶记录表】
|
||||
String area_type = pointJO.getString("area_type");
|
||||
if (left_qty.doubleValue() == 0 && bill_type.equals("010501")) {
|
||||
if (left_qty == 0 && bill_type.equals("010501")) {
|
||||
if (StrUtil.equals("22", area_type) || StrUtil.equals("23", area_type) || StrUtil.equals("24", area_type)) {
|
||||
bucketjo.put("area_type", area_type);
|
||||
bucketjo.put("create_time", DateUtil.now());
|
||||
@@ -253,10 +252,10 @@ public class HandCleanOutIvtServiceImpl implements HandCleanOutIvtService {
|
||||
}
|
||||
|
||||
String status = bucketjo.getString("status");
|
||||
if (left_qty.doubleValue() < 0) {
|
||||
if (left_qty < 0) {
|
||||
throw new PdaRequestException("出库重量大于桶记录里面的库存数量!");
|
||||
}
|
||||
if (left_qty.doubleValue() == 0) {
|
||||
if (left_qty == 0) {
|
||||
status = "04";
|
||||
bucketjo.put("storagevehicle_id", "");
|
||||
bucketjo.put("storagevehicle_code", "");
|
||||
|
||||
@@ -213,8 +213,9 @@ public class HandPFOutIvtServiceImpl implements HandPFOutIvtService {
|
||||
throw new PdaRequestException("该物料的桶信息查询不到!");
|
||||
}
|
||||
String storage_qty = bucketjo.getString("storage_qty");
|
||||
BigDecimal bucketflag = NumberUtil.sub(storage_qty, out_qty);
|
||||
if (bucketflag.doubleValue() < 0) {
|
||||
double bucketflag = NumberUtil.round(bucketjo.getDouble("storage_qty")-Double.valueOf(out_qty),3).doubleValue();
|
||||
|
||||
if (bucketflag < 0) {
|
||||
throw new PdaRequestException("桶记录的数量小于出库数量!");
|
||||
}
|
||||
//插入主表,明细表,分配表,分配明细表
|
||||
@@ -339,7 +340,7 @@ public class HandPFOutIvtServiceImpl implements HandPFOutIvtService {
|
||||
JSONObject ProducMaterialExtObj = WQLObject.getWQLObject("MD_ME_ProducMaterialExt").query("material_id='" + material_id + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(ProducMaterialExtObj) && bill_type.equals("010501")) {
|
||||
String is_need_move = ProducMaterialExtObj.getString("is_need_move");
|
||||
if (StrUtil.equals(is_need_move, "1") && bucketflag.doubleValue() == 0) ;
|
||||
if (StrUtil.equals(is_need_move, "1") && bucketflag == 0) ;
|
||||
if (StrUtil.equals(area_type, "22") || StrUtil.equals(area_type, "23") || StrUtil.equals(area_type, "24")) {
|
||||
bucketjo.put("area_type", area_type);
|
||||
bucketjo.put("create_time", DateUtil.now());
|
||||
@@ -354,7 +355,7 @@ public class HandPFOutIvtServiceImpl implements HandPFOutIvtService {
|
||||
bucketjo.put("outstor_optname", "");
|
||||
bucketjo.put("outstor_time", now);
|
||||
//出完状态为出库
|
||||
if (bucketflag.doubleValue() == 0) {
|
||||
if (bucketflag == 0) {
|
||||
status = "04";
|
||||
bucketjo.put("storagevehicle_id", "");
|
||||
bucketjo.put("storagevehicle_code", "");
|
||||
|
||||
Reference in New Issue
Block a user