|
@@ -7,6 +7,7 @@ import org.apache.shiro.SecurityUtils;
|
|
|
import org.jeecg.common.exception.JeecgBootException;
|
|
|
import org.jeecg.common.system.vo.LoginUser;
|
|
|
import org.jeecg.modules.documents.orderData.entity.SyOrderDataItem;
|
|
|
+import org.jeecg.modules.documents.orderData.mapper.SyOrderDataItemMapper;
|
|
|
import org.jeecg.modules.documents.seclarationElements.entity.SyDeclarationElements;
|
|
|
import org.jeecg.modules.documents.seclarationElements.entity.SyDeclarationElementsItem;
|
|
|
import org.jeecg.modules.documents.seclarationElements.mapper.SyDeclarationElementsItemMapper;
|
|
@@ -67,6 +68,8 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
|
@Autowired
|
|
|
private SyDeclarationElementsMapper syDeclarationElementsMapper;
|
|
|
@Autowired
|
|
|
+ private SyOrderDataItemMapper syOrderDataItemMapper;
|
|
|
+ @Autowired
|
|
|
private ISenYuDataSourceOne senYuDataSourceOne;
|
|
|
@Autowired
|
|
|
private ISenYuDataSourceTwo senYuDataSourceTwo;
|
|
@@ -594,11 +597,53 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
|
BigDecimal total2=new BigDecimal("0");
|
|
|
BigDecimal total3=new BigDecimal("0");
|
|
|
String ids="";
|
|
|
+
|
|
|
for (SyPackingListFabricItem item :main.getSyPackingListFabricItem()){
|
|
|
+ SyShippingDetailsItem syShippingDetailsItem=syShippingDetailsItemMapper.selectById(item.getSyShippingDetailsItemId());
|
|
|
+
|
|
|
+ if(syShippingDetailsItem!=null){
|
|
|
+ SyOrderDataItem syOrderDataItem=syOrderDataItemMapper.selectById(syShippingDetailsItem.getSyOrderDataItemId());
|
|
|
+ item.setInventoryCcode(syShippingDetailsItem.getInventoryCcode());
|
|
|
+ item.setPrice(syShippingDetailsItem.getSalesUnitPrice());
|
|
|
+ if(syOrderDataItem!=null){
|
|
|
+
|
|
|
+ if((item.getInventoryCcode().indexOf("03")!=-1&&!item.getInventoryCcode().equals("0399")) ||
|
|
|
+ (item.getInventoryCcode().indexOf("04")!=-1&&!item.getInventoryCcode().equals("0499"))){
|
|
|
+
|
|
|
+ if(item.getNetWeight()!=null&&item.getGramWeight()!=null&&item.getWidth()!=null){
|
|
|
+ BigDecimal netWeight=item.getNetWeight();
|
|
|
+ BigDecimal gramWeight=new BigDecimal(item.getGramWeight());
|
|
|
+ BigDecimal width=new BigDecimal(item.getWidth());
|
|
|
+ BigDecimal meter=netWeight.multiply(gramWeight).multiply(width).divide(new BigDecimal("100000"));
|
|
|
+ item.setMeter(meter);
|
|
|
+ }
|
|
|
+
|
|
|
+ if(item!=null&&item.getMasterMetering().equals("KG")){
|
|
|
+ item.setTotalPrice(item.getNetWeight().multiply(item.getPrice()));
|
|
|
+ }else if(item!=null&&item.getMasterMetering().equals("M")){
|
|
|
+ item.setTotalPrice(item.getMeter().multiply(item.getPrice()));
|
|
|
+ }else if(item.getActualDeclaredQuantity()!=null){
|
|
|
+ item.setTotalPrice(item.getActualDeclaredQuantity().multiply(item.getPrice()));
|
|
|
+ }else{
|
|
|
+ throw new JeecgBootException("请给单位不为KG或者M的面辅料填上实际报关数量");
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ if(item.getActualDeclaredQuantity()!=null){
|
|
|
+ item.setTotalPrice(item.getActualDeclaredQuantity().multiply(item.getPrice()));
|
|
|
+ }else{
|
|
|
+ throw new JeecgBootException("请给单位不为KG或者M的面辅料填上实际报关数量");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
total3=total3.add(item.getActualDeclaredQuantity());
|
|
|
ids+=item.getSyShippingDetailsItemId()+",";
|
|
|
+
|
|
|
}
|
|
|
if(!ids.equals("")){
|
|
|
+
|
|
|
ids=ids.substring(0,ids.length()-1);
|
|
|
QueryWrapper queryWrapper=new QueryWrapper();
|
|
|
queryWrapper.in("id", Arrays.asList(ids.split(",")));
|
|
@@ -688,7 +733,7 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
|
"and cInvCCode not like '03%'\n" +
|
|
|
"and cInvCCode not like '04%'\n" +
|
|
|
"and cInvCCode not like '19%'\n" +
|
|
|
- "and cCusCode='T020001' and\n" +
|
|
|
+ "and cCusCode='0001' and\n" +
|
|
|
" f.AutoID in (" + maps.get(account).toString().substring(1, maps.get(account).toString().length() - 1) + ") ";
|
|
|
List<Map<String, Object>> list = new ArrayList<>();
|
|
|
if (account.equals("903")) {
|