优化供应商期初期末的方法

This commit is contained in:
季圣华
2020-06-30 23:28:30 +08:00
parent 577abbe953
commit 0f1f5600df
2 changed files with 3 additions and 3 deletions

View File

@@ -350,7 +350,7 @@ public class DepotHeadService {
modeName = "DiscountLastMoney";
allOtherMoney = depotHeadMapperEx.findAllOtherMoney(supplierId, type, subType, endTime);
}
BigDecimal result = null;
BigDecimal result = BigDecimal.ZERO;
try{
result =depotHeadMapperEx.findAllMoney(supplierId, type, subType, modeName, endTime);
}catch(Exception e){

View File

@@ -301,13 +301,13 @@
</select>
<select id="findAllMoney" resultType="java.math.BigDecimal">
select sum(${modeName}) as allMoney from jsh_depothead where Type='${type}' and SubType = '${subType}'
select ifnull(sum(${modeName}),0) as allMoney from jsh_depothead where Type='${type}' and SubType = '${subType}'
and OrganId =${supplierId} and OperTime &lt;='${endTime}'
and ifnull(delete_Flag,'0') !='1'
</select>
<select id="findAllOtherMoney" resultType="java.math.BigDecimal">
select sum(OtherMoney) as allOtherMoney from jsh_depothead where Type='${type}' and SubType = '${subType}'
select ifnull(sum(OtherMoney),0) as allOtherMoney from jsh_depothead where Type='${type}' and SubType = '${subType}'
and OrganId =${supplierId} and OperTime &lt;='${endTime}'
and ifnull(delete_Flag,'0') !='1'
</select>