|
@@ -1024,7 +1024,16 @@ public class AutoGetErpDataImpl implements IAutoGetErpData {
|
|
|
prodStockEntity2.setYear(Integer.parseInt(format.substring(0,4)));
|
|
|
prodStockEntity2.setFarmId(prodFarmNameEntity.getFarmId());
|
|
|
prodStockEntity2.setMonth(Integer.parseInt(format.substring(5,7)));
|
|
|
- prodStockEntity2.setStockQuantity(dataList.get(4)+"");
|
|
|
+ Integer jichuBongZhu = (Integer)dataList.get(4);
|
|
|
+ Integer houbeiZhu = (Integer)dataList.get(5);
|
|
|
+ int count2 = 0 ;
|
|
|
+ if (jichuBongZhu != null ){
|
|
|
+ count2 +=jichuBongZhu;
|
|
|
+ }
|
|
|
+ if (houbeiZhu != null ){
|
|
|
+ count2 +=houbeiZhu;
|
|
|
+ }
|
|
|
+ prodStockEntity2.setStockQuantity(count2+"");
|
|
|
prodStockEntity2.setStockName("公猪存栏");
|
|
|
prodStockEntity2.setStockType("boar_stock");
|
|
|
prodStockRepo.save( prodStockEntity2);
|
|
@@ -1081,7 +1090,7 @@ public class AutoGetErpDataImpl implements IAutoGetErpData {
|
|
|
prodStockEntity7.setFarmId(prodFarmNameEntity.getFarmId());
|
|
|
prodStockEntity7.setMonth(Integer.parseInt(format.substring(5,7)));
|
|
|
Integer muZhu = (Integer)dataList.get(3);
|
|
|
- Integer gongZhu = (Integer)dataList.get(5);
|
|
|
+ Integer gongZhu = (Integer)dataList.get(9);
|
|
|
int count1 = 0 ;
|
|
|
if (muZhu != null ){
|
|
|
count1 +=muZhu;
|
|
@@ -1152,7 +1161,16 @@ public class AutoGetErpDataImpl implements IAutoGetErpData {
|
|
|
break;
|
|
|
case "boar_stock":
|
|
|
//公猪存栏
|
|
|
- stockEntity.setStockQuantity( dataList.get(4)+"");
|
|
|
+ Integer gongZhu = (Integer)dataList.get(4);
|
|
|
+ Integer houbei = (Integer)dataList.get(5);
|
|
|
+ int count2= 0 ;
|
|
|
+ if (gongZhu != null ){
|
|
|
+ count2 +=gongZhu;
|
|
|
+ }
|
|
|
+ if (houbei != null ){
|
|
|
+ count2 +=houbei;
|
|
|
+ }
|
|
|
+ stockEntity.setStockQuantity( count2+"");
|
|
|
prodStockRepo.save(stockEntity);
|
|
|
break;
|
|
|
case "grice_stock":
|
|
@@ -1189,13 +1207,13 @@ public class AutoGetErpDataImpl implements IAutoGetErpData {
|
|
|
case "sow_stock_5":
|
|
|
//后备猪存栏
|
|
|
Integer muZhu = (Integer)dataList.get(3);
|
|
|
- Integer gongZhu = (Integer)dataList.get(5);
|
|
|
+ Integer shangBin = (Integer)dataList.get(9);
|
|
|
int count1 = 0 ;
|
|
|
if (muZhu != null ){
|
|
|
count1 +=muZhu;
|
|
|
}
|
|
|
- if (gongZhu != null ){
|
|
|
- count1 +=gongZhu;
|
|
|
+ if (shangBin != null ){
|
|
|
+ count1 +=shangBin;
|
|
|
}
|
|
|
|
|
|
stockEntity.setStockQuantity( count1+"");
|