|
@@ -106,7 +106,7 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
|
|
|
|
|
|
//获取流水号
|
|
//获取流水号
|
|
String randomStr(){
|
|
String randomStr(){
|
|
- SimpleDateFormat sf = new SimpleDateFormat("yyyyMMddHHmmsss");
|
|
|
|
|
|
+ SimpleDateFormat sf = new SimpleDateFormat("yyMMddHHmmssSSS");
|
|
/*SimpleDateFormat sf= new SimpleDateFormat("yyyyMMdd");
|
|
/*SimpleDateFormat sf= new SimpleDateFormat("yyyyMMdd");
|
|
QueryWrapper<SyPackingListTailoring> queryWrapperCount=new QueryWrapper<>();
|
|
QueryWrapper<SyPackingListTailoring> queryWrapperCount=new QueryWrapper<>();
|
|
queryWrapperCount.like("create_time", new SimpleDateFormat("yyyy-MM-dd").format(System.currentTimeMillis()));
|
|
queryWrapperCount.like("create_time", new SimpleDateFormat("yyyy-MM-dd").format(System.currentTimeMillis()));
|
|
@@ -115,7 +115,7 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- @Transactional
|
|
|
|
|
|
+ //@Transactional
|
|
public synchronized SyPackingListTailoring saveMain2(SyPackingListTailoring syPackingListTailoring){
|
|
public synchronized SyPackingListTailoring saveMain2(SyPackingListTailoring syPackingListTailoring){
|
|
List<SyPackingListTailoringItem> items=syPackingListTailoring.getSyPackingListTailoringItemList();
|
|
List<SyPackingListTailoringItem> items=syPackingListTailoring.getSyPackingListTailoringItemList();
|
|
//SyPackingListTailoring.setDocumentNo(oConvertUtils.id());//随机单据号
|
|
//SyPackingListTailoring.setDocumentNo(oConvertUtils.id());//随机单据号
|
|
@@ -556,6 +556,9 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
|
|
BigDecimal boxNumber1=item.getBoxNumber();//获取箱数
|
|
BigDecimal boxNumber1=item.getBoxNumber();//获取箱数
|
|
item.setGroupId(oConvertUtils.id());//分组随机idv1
|
|
item.setGroupId(oConvertUtils.id());//分组随机idv1
|
|
item.setDelFlag("0");//默认为未删除
|
|
item.setDelFlag("0");//默认为未删除
|
|
|
|
+ if(item.getTotal()==null){
|
|
|
|
+ item.setTotal(new BigDecimal("0"));
|
|
|
|
+ }
|
|
syPackingListTailoring.setTotal(syPackingListTailoring.getTotal().add(item.getTotal()));
|
|
syPackingListTailoring.setTotal(syPackingListTailoring.getTotal().add(item.getTotal()));
|
|
item.setSmallPo(syPackingListTailoring.getSmallPo());
|
|
item.setSmallPo(syPackingListTailoring.getSmallPo());
|
|
item.setPoNo(syPackingListTailoring.getSmallPo());
|
|
item.setPoNo(syPackingListTailoring.getSmallPo());
|
|
@@ -638,7 +641,11 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
|
|
BigDecimal total2=new BigDecimal("0");
|
|
BigDecimal total2=new BigDecimal("0");
|
|
BigDecimal total3=new BigDecimal("0");
|
|
BigDecimal total3=new BigDecimal("0");
|
|
for (SyPackingListTailoringItem item :main.getSyPackingListTailoringItemList()){
|
|
for (SyPackingListTailoringItem item :main.getSyPackingListTailoringItemList()){
|
|
- total3=total3.add(item.getTotal());
|
|
|
|
|
|
+ if(item.getTotal()!=null){
|
|
|
|
+ total3=total3.add(item.getTotal());
|
|
|
|
+ }else{
|
|
|
|
+ total3=total3.add(new BigDecimal("0"));
|
|
|
|
+ }
|
|
String ids="";
|
|
String ids="";
|
|
for (SizeTable size : item.getSizeTables()){
|
|
for (SizeTable size : item.getSizeTables()){
|
|
ids+=size.getItemId()+",";//获取出运明细子表id
|
|
ids+=size.getItemId()+",";//获取出运明细子表id
|
|
@@ -661,7 +668,7 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
|
|
queryWrapper.eq("del_Flag","0");//未删除
|
|
queryWrapper.eq("del_Flag","0");//未删除
|
|
SyPackingListTailoringItem syPackingItem=syPackingListTailoringItemMapper.selectOne(queryWrapper);
|
|
SyPackingListTailoringItem syPackingItem=syPackingListTailoringItemMapper.selectOne(queryWrapper);
|
|
if(syPackingItem!=null){
|
|
if(syPackingItem!=null){
|
|
- //throw new JeecgBootException("该单据已被成衣参照!请勿重复操作");
|
|
|
|
|
|
+ throw new JeecgBootException("该单据已被成衣参照!请勿重复操作");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|