|
@@ -196,7 +196,7 @@ public interface TDeliveryRepo extends JpaRepository<TDeliveryEntity, String>, J
|
|
|
"and (TWeaning.hogpendID in( ?3)) " +
|
|
|
"and TWeaning.FdateWeaning between ?1 and ?2)TBTQ)ZZ " +
|
|
|
") ncws")
|
|
|
- List<Object[]> getPsy(String startDate,String endDate,String farmID);
|
|
|
+ List<Object[]> getPsy(String startDate, String endDate, String farmID);
|
|
|
|
|
|
/**
|
|
|
* @Method : getReEstrusRate
|
|
@@ -271,7 +271,7 @@ public interface TDeliveryRepo extends JpaRepository<TDeliveryEntity, String>, J
|
|
|
"AND tmp_tblpz.FParityInt= tmp_tblfm.FParityInt " +
|
|
|
"GROUP BY " +
|
|
|
"tmp_tblpz.HogpendID ")
|
|
|
- List<Object[]> getReEstrusRate(String startDate,String endDate,String farmName);
|
|
|
+ List<Object[]> getReEstrusRate(String startDate, String endDate, String farmName);
|
|
|
|
|
|
/**
|
|
|
* @Method : getParturitionRate
|
|
@@ -344,7 +344,7 @@ public interface TDeliveryRepo extends JpaRepository<TDeliveryEntity, String>, J
|
|
|
"AND tmp_tblpz.FParityInt= tmp_tblfm.FParityInt " +
|
|
|
"GROUP BY " +
|
|
|
"tmp_tblpz.HogpendID ")
|
|
|
- List<Object[]> getParturitionRate(String startDate, String endDate,String farmName);
|
|
|
+ List<Object[]> getParturitionRate(String startDate, String endDate, String farmName);
|
|
|
|
|
|
/**
|
|
|
* @Method : getStorage
|
|
@@ -448,7 +448,7 @@ public interface TDeliveryRepo extends JpaRepository<TDeliveryEntity, String>, J
|
|
|
"td.HOGPENDID, " +
|
|
|
"tdie.csamount, " +
|
|
|
"tlose.csamount")
|
|
|
- List<Object[]> getPigletInfo(String startDate, String endDate,String farmName);
|
|
|
+ List<Object[]> getPigletInfo(String startDate, String endDate, String farmName);
|
|
|
|
|
|
/**
|
|
|
* @Method : getMateQuantity
|
|
@@ -498,7 +498,7 @@ public interface TDeliveryRepo extends JpaRepository<TDeliveryEntity, String>, J
|
|
|
" ) tmp_tblpzts " +
|
|
|
" GROUP BY " +
|
|
|
" tmp_tblpzts.HogpendID ")
|
|
|
- List<Object[]> getMateQuantity(String startDate, String endDate,String farmName);
|
|
|
+ List<Object[]> getMateQuantity(String startDate, String endDate, String farmName);
|
|
|
|
|
|
/**
|
|
|
* @Method : getConceptionRate
|
|
@@ -542,7 +542,7 @@ public interface TDeliveryRepo extends JpaRepository<TDeliveryEntity, String>, J
|
|
|
" group by tmp_tblpz.HogpendID) tmp_tblpzlc on tmp_tblpzlc.ZCID=tmp_tblpz.ZCID " +
|
|
|
" left join TOrganizeCell on tmp_tblpz.ZCID=TOrganizeCell.FID " +
|
|
|
" where TOrganizeCell.FNAME in(?3)")
|
|
|
- List<Object[]> getConceptionRate(String startDate, String endDate,String farmName);
|
|
|
+ List<Object[]> getConceptionRate(String startDate, String endDate, String farmName);
|
|
|
|
|
|
@Query(nativeQuery = true,value =" select " +
|
|
|
" TOrganizeCell.FshortName 'ZCNAME', " +
|
|
@@ -595,7 +595,7 @@ public interface TDeliveryRepo extends JpaRepository<TDeliveryEntity, String>, J
|
|
|
" " +
|
|
|
" left join TOrganizeCell on tmp_tblpz.ZCID=TOrganizeCell.FID")
|
|
|
// --0.83
|
|
|
- List<Object[]> getConceptionRate_new(String startDate, String endDate,String farmName);
|
|
|
+ List<Object[]> getConceptionRate_new(String startDate, String endDate, String farmName);
|
|
|
|
|
|
|
|
|
/**
|
|
@@ -938,10 +938,11 @@ public interface TDeliveryRepo extends JpaRepository<TDeliveryEntity, String>, J
|
|
|
@Query(nativeQuery = true,value =
|
|
|
"select TOrganizeCell.FSHORTNAME as 猪场\n" +
|
|
|
",ISNULL(sum(pig.母猪后备),0)+ISNULL(sum(pig.空怀),0)+ISNULL(sum(pig.妊娠),0)+ISNULL(sum(pig.哺乳),0) AS 母猪\n" +
|
|
|
- ",ISNULL(sum(pig.公猪后备),0) +ISNULL(sum(pig.成年),0) AS 公猪,ISNULL(sum(pig.教槽),0) AS 仔猪,\n" +
|
|
|
- "ISNULL(sum(pig.保育),0) AS 保育 ,ISNULL(sum(pig.育成),0) +ISNULL(sum(pig.育肥),0) AS 育肥,ISNULL(sum(pig.后备),0) AS 后备\n" +
|
|
|
+ ",ISNULL(sum(pig.公猪后备),0) +ISNULL(sum(pig.成年),0) AS 公猪,ISNULL(sum(pig.教槽),0) AS 仔猪\n" +
|
|
|
+ ",ISNULL(sum(pig.保育),0) AS 保育 ,ISNULL(sum(pig.育成),0) +ISNULL(sum(pig.育肥),0) AS 育肥,ISNULL(sum(pig.后备),0) AS 后备\n" +
|
|
|
",ISNULL(sum(pig.妊娠),0) AS 妊娠,ISNULL(sum(pig.哺乳),0) AS 哺乳,ISNULL(sum(pig.空怀),0) AS 空怀\n" +
|
|
|
- "from\n" +
|
|
|
+ ",ISNULL(sum(pig.母猪后备),0) AS 母猪后备" +
|
|
|
+ " from \n" +
|
|
|
"(select \n" +
|
|
|
" tbl_tmp.猪场id,\n" +
|
|
|
" SUM(CASE WHEN tbl_tmp.状态 = '公猪后备' THEN tbl_tmp.数量 ELSE 0 END) AS 公猪后备,\n" +
|
|
@@ -1295,7 +1296,7 @@ public interface TDeliveryRepo extends JpaRepository<TDeliveryEntity, String>, J
|
|
|
"left join TPigArchives on tbl.猪只编码 = TPigArchives.FNUMBER\n" +
|
|
|
"where tbl.计划时间 >= getDate() \n" +
|
|
|
"group by tbl.计划类型\n")
|
|
|
- List<Object[]> getWorkPlan(Date startDate,Date endDate);
|
|
|
+ List<Object[]> getWorkPlan(Date startDate, Date endDate);
|
|
|
|
|
|
@Query(nativeQuery = true,value ="select TOrganizeCell.FName ,tbl.计划类型,count(DISTINCT(tbl.计划名称)) as '计划数',SUM(tbl.猪只数量) as '猪只头数'\n" +
|
|
|
"from( \n" +
|
|
@@ -1366,7 +1367,7 @@ public interface TDeliveryRepo extends JpaRepository<TDeliveryEntity, String>, J
|
|
|
"left join TPigArchives on tbl.猪只编码 = TPigArchives.FNUMBER\n" +
|
|
|
"where tbl.计划时间 >= getDate() \n" +
|
|
|
"group by tbl.计划类型,TOrganizeCell.FName ")
|
|
|
- List<Object[]> getWorkPlan1(Date startDate,Date endDate);
|
|
|
+ List<Object[]> getWorkPlan1(Date startDate, Date endDate);
|
|
|
|
|
|
//母猪和仔猪状态
|
|
|
@Query(nativeQuery = true,value ="select TOrganizeCell.FSHORTNAME,SUM(case when FPIGSTATEE=5 and FCHANGEDAYS>=107 then 1 else 0 end) as '待分娩',\n" +
|