Commit dee1f2ae by liuyang

修复排序问题和其他入库提交问题

parent 647dec31
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
$orderBy$ $orderBy$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="orderBy">
ID DESC AFTER_SALE_DATE DESC,ID DESC
</isEmpty> </isEmpty>
</dynamic> </dynamic>
</sql> </sql>
......
...@@ -42,11 +42,7 @@ import com.baosight.iplat4j.ed.util.SequenceGenerator; ...@@ -42,11 +42,7 @@ import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.MapUtils; import org.apache.commons.collections.MapUtils;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.ArrayList; import java.util.*;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/** /**
* @author LiuYang * @author LiuYang
...@@ -374,6 +370,9 @@ public class ServiceHGKC005 extends ServiceEPBase { ...@@ -374,6 +370,9 @@ public class ServiceHGKC005 extends ServiceEPBase {
hgkc006.setSource(InventorySource.INVENTORY.getCode()); hgkc006.setSource(InventorySource.INVENTORY.getCode());
hgkc006.setSubmitStatus(HGConstant.ProductStatus.WTJ); hgkc006.setSubmitStatus(HGConstant.ProductStatus.WTJ);
hgkc006.setSourceCode(hgkc005.getCheckNo()); hgkc006.setSourceCode(hgkc005.getCheckNo());
AssertUtils.isTrue(Objects.isNull(hgkc006.getSource()) || hgkc006.getSource() <= 0, "其它入库单数据来源不能为空!");
AssertUtils.isTrue(StringUtils.isBlank(hgkc006.getWhCode()), "其它入库单仓库不能为空!");
DaoUtils.insert(HGKC006.INSERT, hgkc006);
//明细数据处理 //明细数据处理
HGKC006A hgkc006A = new HGKC006A(); HGKC006A hgkc006A = new HGKC006A();
hgkc006A.setPrimaryId(hgkc006.getId()); hgkc006A.setPrimaryId(hgkc006.getId());
...@@ -396,9 +395,10 @@ public class ServiceHGKC005 extends ServiceEPBase { ...@@ -396,9 +395,10 @@ public class ServiceHGKC005 extends ServiceEPBase {
hgkc006A.setPrdtSpec(hgpz005.getSpec()); hgkc006A.setPrdtSpec(hgpz005.getSpec());
hgkc006A.setSource(InventorySource.INVENTORY.getCode()); hgkc006A.setSource(InventorySource.INVENTORY.getCode());
hgkc006A.setInventTypeDetail(hgpz005.getInventTypeDetail()); hgkc006A.setInventTypeDetail(hgpz005.getInventTypeDetail());
HGKCTools.HgKc006.checkData(hgkc006A);
hgkc006.getDetailList().add(hgkc006A); DaoUtils.insert(HGKC006A.INSERT, hgkc006A);
HGKCTools.HgKc006.generateHgkc006(hgkc006); //hgkc006.getDetailList().add(hgkc006A);
//HGKCTools.HgKc006.generateHgkc006(hgkc006);
} }
} }
......
...@@ -178,6 +178,7 @@ public class ServiceHGKC006 extends ServiceBase { ...@@ -178,6 +178,7 @@ public class ServiceHGKC006 extends ServiceBase {
hgkc006 = HGKCTools.HgKc006.getById(hgkc006.getId()); hgkc006 = HGKCTools.HgKc006.getById(hgkc006.getId());
//查看是否能获取到账期,获取不到就提示 //查看是否能获取到账期,获取不到就提示
HGCWTools.HgCw001.getAccountPeriod(hgkc006.getCompanyCode(),hgkc006.getOtherEnterDate()); HGCWTools.HgCw001.getAccountPeriod(hgkc006.getCompanyCode(),hgkc006.getOtherEnterDate());
hgkc006.setSubmitStatus(HGConstant.ProductStatus.YTJ);
DaoUtils.update(HGKC006.CHECK, hgkc006.toMap()); DaoUtils.update(HGKC006.CHECK, hgkc006.toMap());
} }
List<HGKC006A> hgkc006AList = HGKCTools.HgKc006A.getHgkc006aList(hgkc006.getId()); List<HGKC006A> hgkc006AList = HGKCTools.HgKc006A.getHgkc006aList(hgkc006.getId());
......
...@@ -835,6 +835,15 @@ public class HGKCTools { ...@@ -835,6 +835,15 @@ public class HGKCTools {
AssertUtils.isTrue(o.getInvWeight().compareTo(BigDecimal.ZERO) <= 0, "其它入库单明细总重小于等于0!"); AssertUtils.isTrue(o.getInvWeight().compareTo(BigDecimal.ZERO) <= 0, "其它入库单明细总重小于等于0!");
}); });
} }
public static void checkData(HGKC006A hgkc006a) {
AssertUtils.isTrue(StringUtils.isBlank(hgkc006a.getWhCode()), "其它入库单明细仓库不能为空!");
AssertUtils.isTrue(StringUtils.isBlank(hgkc006a.getInventCode()), "其它入库单明细存货编码不能为空!");
AssertUtils.isTrue(StringUtils.isBlank(hgkc006a.getInventName()), "其它入库单明细存货名称不能为空!");
AssertUtils.isTrue(hgkc006a.getInvQty().compareTo(BigDecimal.ZERO) <= 0, "其它入库单明细数量不能小于等于0!");
AssertUtils.isTrue(hgkc006a.getInvUnitWeight().compareTo(BigDecimal.ZERO) <= 0, "其它入库单明细单重小于等于0!");
AssertUtils.isTrue(hgkc006a.getInvWeight().compareTo(BigDecimal.ZERO) <= 0, "其它入库单明细总重小于等于0!");
}
} }
public static class HgKc006A { public static class HgKc006A {
......
...@@ -192,7 +192,7 @@ ...@@ -192,7 +192,7 @@
$orderBy$ $orderBy$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="orderBy">
id desc check_date DESC,id desc
</isEmpty> </isEmpty>
</dynamic> </dynamic>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment