|
@@ -39,6 +39,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
|
|
|
|
|
import java.io.Serializable;
|
|
|
+import java.lang.reflect.Array;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.text.ParseException;
|
|
|
import java.text.SimpleDateFormat;
|
|
@@ -112,6 +113,11 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
|
entity.setDistributionPoint(detailsItem.getDistributionPoint());
|
|
|
entity.setPurOrSubOrder(detailsItem.getPurOrSubOrder());
|
|
|
entity.setFactoryUnitPrice(detailsItem.getFactoryUnitPrice());
|
|
|
+ if(entity.getMasterMetering().equals("KG")){
|
|
|
+ entity.setTotalPrice(entity.getNetWeight().subtract(entity.getPrice()));
|
|
|
+ }else{
|
|
|
+ entity.setTotalPrice(entity.getActualDeclaredQuantity().subtract(entity.getPrice()));
|
|
|
+ }
|
|
|
syShippingDetailsItemMapper.updateById(detailsItem);
|
|
|
syPackingListFabricItemMapper.insert(entity);
|
|
|
}
|
|
@@ -144,6 +150,11 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
|
|
|
|
s1.setExcessQuantity(entity.getInventoryQuantity().subtract(s1.getSurplusQuantity()));
|
|
|
syShippingDetailsItemMapper.updateById(s1);*/
|
|
|
+ if(entity.getMasterMetering().equals("KG")){
|
|
|
+ entity.setTotalPrice(entity.getNetWeight().subtract(entity.getPrice()));
|
|
|
+ }else{
|
|
|
+ entity.setTotalPrice(entity.getActualDeclaredQuantity().subtract(entity.getPrice()));
|
|
|
+ }
|
|
|
entity.setId(null);
|
|
|
syPackingListFabricItemMapper.insert(entity);
|
|
|
}else{
|
|
@@ -199,7 +210,7 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
|
if(syPackingListFabricItem.getExcessQuantity().intValue()<0){
|
|
|
syPackingListFabricItem.setExcessQuantity(new BigDecimal(0));
|
|
|
}
|
|
|
- if(syPackingListFabricItem.getVenId().indexOf("04")>-1&&!syPackingListFabricItem.getVenId().equals("0499")){
|
|
|
+ if(syPackingListFabricItem.getVenId()!=null&&syPackingListFabricItem.getVenId().indexOf("04")>-1&&!syPackingListFabricItem.getVenId().equals("0499")){
|
|
|
|
|
|
SyShippingDetailsItem syShippingDetailsItem=syShippingDetailsItemMapper.selectById(syPackingListFabricItem.getSyShippingDetailsItemId());
|
|
|
syPackingListFabricItem.setSupplierCodeDyeingPlant(syShippingDetailsItem.getRSupplierCode());
|
|
@@ -251,10 +262,10 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
|
|
|
|
* 每3分钟拉取一次数据
|
|
|
*/
|
|
|
- @Override
|
|
|
- @Scheduled(fixedRate=1000*60*300)
|
|
|
+
|
|
|
+
|
|
|
|
|
|
- public void getU8Data() {
|
|
|
+ public void getU8Data2() {
|
|
|
SimpleDateFormat sf= new SimpleDateFormat("yyMMdd");
|
|
|
try{
|
|
|
QueryWrapper<DxpDataPlan> queryWrapper = new QueryWrapper<>();
|
|
@@ -341,7 +352,6 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
|
"c.cInvStd as specificationAndModel\n" +
|
|
|
"from rdrecord32 a \n" +
|
|
|
"left JOIN rdrecords32 b\n" +
|
|
|
-
|
|
|
"on a.id=b.id \n" +
|
|
|
"left join Inventory c\n" +
|
|
|
"on b.cInvCode=c.cInvCode\n" +
|
|
@@ -374,6 +384,11 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
|
sy1.setActualDeclaredQuantity(sy1.getInventoryQuantity());
|
|
|
sy1.setGroupId(sy1.getOrderNumber()+"-"+sy1.getInventoryCode()+"-"+sy1.getSize());
|
|
|
sy1.setSyPackingListFabricId(sy.getId());
|
|
|
+ if(sy1.getMasterMetering().equals("KG")){
|
|
|
+ sy1.setTotalPrice(sy1.getNetWeight().subtract(sy1.getPrice()));
|
|
|
+ }else{
|
|
|
+ sy1.setTotalPrice(sy1.getActualDeclaredQuantity().subtract(sy1.getPrice()));
|
|
|
+ }
|
|
|
sy1.setU8Pid(sy.getU8Id());
|
|
|
QueryWrapper<SyShippingDetailsItem> queryWrapper2 = new QueryWrapper<>();
|
|
|
queryWrapper2.eq("sy_order_data_item_id",sy1.getIsosid());
|
|
@@ -474,4 +489,13 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ public void getU8Data(){
|
|
|
+ String[] arrs=syPackingListFabricItemMapper.getu8Data();
|
|
|
+ for (String arr : arrs){
|
|
|
+ System.out.println("arr\t"+arr);
|
|
|
+ }
|
|
|
+ System.out.println("arrs\n"+arrs);
|
|
|
+ }
|
|
|
}
|