| | |
| | | count(nfnpc.service_time) as serviceTimes, |
| | | cpcu.belong_to as belongTo, |
| | | cpcu.org_name as orgName, |
| | | cpcu.community_id, |
| | | nfnpi.community_id, |
| | | sum(nfnpi.award) as partyCount, |
| | | cpcu.name as unitName, |
| | | cpcu.org_name as orgName, |
| | |
| | | FROM new_fight_need_problem_claim as nfnpc |
| | | left join sys_user as su on nfnpc.user_id=su.user_id |
| | | left join com_pb_check_unit as cpcu on nfnpc.unit_id=cpcu.id |
| | | left join com_act as ca on cpcu.community_id=ca.community_id |
| | | left join com_act as ca on nfnpi.community_id=ca.community_id |
| | | LEFT JOIN new_fight_need_problem_inventory as nfnpi on nfnpc.task_id=nfnpi.id |
| | | WHERE nfnpc.service_time iS NOT NULL AND nfnpc.unit_id IS NOT NULL |
| | | WHERE nfnpc.service_time iS NOT NULL |
| | | <if test="beginTime != null"> |
| | | and nfnpc.creation_time between #{beginTime} and #{endTime} |
| | | </if> |
| | |
| | | and cpcu.belong_to=#{belongTo} |
| | | </if> |
| | | <if test="communityId != null"> |
| | | and cpcu.community_id=#{communityId} |
| | | and nfnpi.community_id=#{communityId} |
| | | </if> |
| | | <if test="unitId != null"> |
| | | and cpcu.id=#{unitId} |