Merge pull request 'develop' (#218) from develop into master
Reviewed-on: http://git.xdadan.loc/tanex/emis-service/pulls/218
This commit is contained in:
commit
09a8554e68
@ -109,9 +109,17 @@ public class EmisSalesCommissionRatioServiceImpl implements IEmisSalesCommission
|
||||
*/
|
||||
@Override
|
||||
public boolean checkRatioValid(EmisSalesCommissionRatio entity) {
|
||||
java.math.BigDecimal sum = entity.getSalesExecutiveRatio()
|
||||
.add(entity.getSalesmenRatio())
|
||||
.add(entity.getSalesSupportRatio());
|
||||
return sum.compareTo(new java.math.BigDecimal("100.00")) <= 0;
|
||||
BigDecimal executiveRatio = entity.getSalesExecutiveRatio() != null
|
||||
? entity.getSalesExecutiveRatio()
|
||||
: BigDecimal.ZERO;
|
||||
BigDecimal salesmenRatio = entity.getSalesmenRatio() != null
|
||||
? entity.getSalesmenRatio()
|
||||
: BigDecimal.ZERO;
|
||||
BigDecimal supportRatio = entity.getSalesSupportRatio() != null
|
||||
? entity.getSalesSupportRatio()
|
||||
: BigDecimal.ZERO;
|
||||
|
||||
BigDecimal sum = executiveRatio.add(salesmenRatio).add(supportRatio);
|
||||
return sum.compareTo(new BigDecimal("100.00")) <= 0;
|
||||
}
|
||||
}
|
||||
@ -165,11 +165,13 @@
|
||||
select bill_code from emis_waybill_problem_info ewpi where ewpi.del_flag='0' and ewpi.`problem_type` in(151,173,170)
|
||||
)-->
|
||||
<select id="queryScanStatList" parameterType="EmisTmsScanRecord" resultMap="ScanStatDataInfoResult">
|
||||
select tbA.scan_site_code ,count(tbA.bill_code) as scan_count,sum(if(tbA.bl_sign=1,1,0)) as sign_count,round(round(ifnull(sum(if(tbA.bl_sign=1,1,0)),0)/count(tbA.bill_code),3)*100,1) as sign_rate
|
||||
select tbA.scan_site_code ,count(tbA.bill_code) as scan_count,sum(if(tbA.bl_sign=1 or (tbA.customs_clear=2 and tbA.trans_type=2),1,0)) as sign_count,round(round(ifnull(sum(if(tbA.bl_sign=1 or (tbA.customs_clear=2 and tbA.trans_type=2),1,0)),0)/count(tbA.bill_code),3)*100,1) as sign_rate
|
||||
from (
|
||||
select DISTINCT a.scan_site_code,b.bill_code , b.bl_sign
|
||||
from emis_tms_scan_record a,emis_waybill b
|
||||
where a.del_flag='0' and b.del_flag='0' and a.bill_code=b.bill_code
|
||||
select DISTINCT a.scan_site_code,b.bill_code , b.bl_sign, b.customs_clear, k.trans_type
|
||||
from emis_tms_scan_record a
|
||||
inner join emis_waybill b on a.bill_code=b.bill_code
|
||||
left join emis_trans_line k on b.trans_line_type=k.line_code and k.del_flag='0'
|
||||
where a.del_flag='0' and b.del_flag='0'
|
||||
and not EXISTS (
|
||||
select 1 from emis_waybill_problem_info ewpi where ewpi.bill_code=b.bill_code and ewpi.del_flag='0' and ewpi.`problem_type` in(151,173,170)
|
||||
)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user