| | |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @ClassName FloorDto |
| | |
| | | private String endDate; |
| | | private String beforeTime; |
| | | private String canReexamine; |
| | | |
| | | private String inspectionId; |
| | | |
| | | private List<InspectionPlanStaffDto> staffs; |
| | | |
| | | |
| | | public String getInspectionPlanName() { |
| | |
| | | public void setCanReexamine(String canReexamine) { |
| | | this.canReexamine = canReexamine; |
| | | } |
| | | |
| | | public List<InspectionPlanStaffDto> getStaffs() { |
| | | return staffs; |
| | | } |
| | | |
| | | public void setStaffs(List<InspectionPlanStaffDto> staffs) { |
| | | this.staffs = staffs; |
| | | } |
| | | |
| | | public String getInspectionId() { |
| | | return inspectionId; |
| | | } |
| | | |
| | | public void setInspectionId(String inspectionId) { |
| | | this.inspectionId = inspectionId; |
| | | } |
| | | } |
| | |
| | | private String staffName; |
| | | private String startTime; |
| | | private String inspectionPlanId; |
| | | private String[] inspectionPlanIds; |
| | | private String endTime; |
| | | private String communityId; |
| | | private String staffId; |
| | |
| | | public void setStatusCd(String statusCd) { |
| | | this.statusCd = statusCd; |
| | | } |
| | | |
| | | public String[] getInspectionPlanIds() { |
| | | return inspectionPlanIds; |
| | | } |
| | | |
| | | public void setInspectionPlanIds(String[] inspectionPlanIds) { |
| | | this.inspectionPlanIds = inspectionPlanIds; |
| | | } |
| | | } |
| | |
| | | |
| | | private String orderByDesc; |
| | | |
| | | private String inspectionId; |
| | | |
| | | private String inspectionRouteId; |
| | | |
| | | public String getPlanUserId() { |
| | | return planUserId; |
| | | } |
| | |
| | | public void setOrderByDesc(String orderByDesc) { |
| | | this.orderByDesc = orderByDesc; |
| | | } |
| | | |
| | | public String getInspectionId() { |
| | | return inspectionId; |
| | | } |
| | | |
| | | public void setInspectionId(String inspectionId) { |
| | | this.inspectionId = inspectionId; |
| | | } |
| | | |
| | | public String getInspectionRouteId() { |
| | | return inspectionRouteId; |
| | | } |
| | | |
| | | public void setInspectionRouteId(String inspectionRouteId) { |
| | | this.inspectionRouteId = inspectionRouteId; |
| | | } |
| | | } |
| | |
| | | and t.before_time = #{beforeTime} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="queryPointInspectionPlansCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from inspection_plan t |
| | | left join inspection_route ir on t.inspection_route_id = ir.inspection_route_id and ir.status_cd = '0' |
| | | left join inspection_route_point_rel irpr on ir.inspection_route_id = irpr.inspection_route_id and irpr.status_cd = '0' |
| | | left join inspection_point ip on irpr.inspection_id = ip.inspection_id and ip.status_cd = '0' |
| | | where 1=1 |
| | | and ip.inspection_id = #{inspectionId} |
| | | <if test="inspectionPlanName !=null and inspectionPlanName != ''"> |
| | | and t.inspection_plan_name= #{inspectionPlanName} |
| | | </if> |
| | | <if test="createUserId !=null and createUserId != ''"> |
| | | and t.create_user_id= #{createUserId} |
| | | </if> |
| | | <if test="canReexamine !=null and canReexamine != ''"> |
| | | and t.can_reexamine= #{canReexamine} |
| | | </if> |
| | | <if test="inspectionRouteId !=null and inspectionRouteId != ''"> |
| | | and t.inspection_route_id= #{inspectionRouteId} |
| | | </if> |
| | | <if test="inspectionPlanPeriod !=null and inspectionPlanPeriod != ''"> |
| | | and t.inspection_plan_period= #{inspectionPlanPeriod} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | and t.remark= #{remark} |
| | | </if> |
| | | <if test="createUserName !=null and createUserName != ''"> |
| | | and t.create_user_name= #{createUserName} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="signType !=null and signType != ''"> |
| | | and t.sign_type= #{signType} |
| | | </if> |
| | | <if test="startTime !=null and startTime != ''"> |
| | | and t.start_time= #{startTime} |
| | | </if> |
| | | <if test="inspectionPlanId !=null and inspectionPlanId != ''"> |
| | | and t.inspection_plan_id= #{inspectionPlanId} |
| | | </if> |
| | | <if test="endTime !=null and endTime != ''"> |
| | | and t.end_time= #{endTime} |
| | | </if> |
| | | <if test="startDate !=null and startDate != ''"> |
| | | and t.start_date= #{startDate} |
| | | </if> |
| | | <if test="endDate !=null and endDate != ''"> |
| | | and t.end_date= #{endDate} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="beforeTime !=null and beforeTime != ''"> |
| | | and t.before_time = #{beforeTime} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="queryPointInspectionPlans" parameterType="Map" resultType="Map"> |
| | | |
| | | select t.inspection_plan_name,t.inspection_plan_name inspectionPlanName,t.create_user_id,t.create_user_id |
| | | createUserId,t.inspection_route_id,t.inspection_route_id inspectionRouteId |
| | | ,t.can_reexamine,t.can_reexamine canReexamine,t.inspection_plan_period,t.inspection_plan_period |
| | | inspectionPlanPeriod,t.remark,t.create_user_name,t.create_user_name createUserName,t.status_cd,t.status_cd |
| | | statusCd,t.sign_type,t.sign_type signType,t.start_time,t.start_time |
| | | startTime,t.inspection_plan_id,t.inspection_plan_id inspectionPlanId,t.end_time,t.end_time |
| | | endTime,t.state,t.community_id,t.community_id communityId, |
| | | DATE_FORMAT(t.start_date,'%Y-%m-%d') startDate,DATE_FORMAT(t.end_date,'%Y-%m-%d') endDate,t.inspection_month inspectionMonth,t.inspection_day inspectionDay, |
| | | t.inspection_workday inspectionWorkday,t.before_time beforeTime,t.create_time createTime, |
| | | d.name stateName, |
| | | c.name inspectionPlanPeriodName, |
| | | i.name signTypeName, |
| | | ir.route_name inspectionRouteName |
| | | from inspection_plan t |
| | | left join inspection_route ir on t.inspection_route_id = ir.inspection_route_id and ir.status_cd = '0' |
| | | left join inspection_route_point_rel irpr on ir.inspection_route_id = irpr.inspection_route_id and irpr.status_cd = '0' |
| | | left join inspection_point ip on irpr.inspection_id = ip.inspection_id and ip.status_cd = '0' |
| | | inner join t_dict d on t.state = d.status_cd and d.table_name = 'inspection_plan' and d.table_columns = 'state' |
| | | inner join t_dict c on t.inspection_plan_period = c.status_cd and c.table_name = 'inspection_plan' and |
| | | c.table_columns = 'inspection_plan_period' |
| | | inner join t_dict i on t.sign_type = i.status_cd and i.table_name = 'inspection_plan' and i.table_columns = |
| | | 'sign_type' |
| | | where 1=1 |
| | | and ip.inspection_id = #{inspectionId} |
| | | <if test="inspectionPlanName !=null and inspectionPlanName != ''"> |
| | | and t.inspection_plan_name= #{inspectionPlanName} |
| | | </if> |
| | | <if test="createUserId !=null and createUserId != ''"> |
| | | and t.create_user_id= #{createUserId} |
| | | </if> |
| | | <if test="canReexamine !=null and canReexamine != ''"> |
| | | and t.can_reexamine= #{canReexamine} |
| | | </if> |
| | | <if test="inspectionRouteId !=null and inspectionRouteId != ''"> |
| | | and t.inspection_route_id= #{inspectionRouteId} |
| | | </if> |
| | | <if test="inspectionPlanPeriod !=null and inspectionPlanPeriod != ''"> |
| | | and t.inspection_plan_period= #{inspectionPlanPeriod} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | and t.remark= #{remark} |
| | | </if> |
| | | <if test="createUserName !=null and createUserName != ''"> |
| | | and t.create_user_name= #{createUserName} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="signType !=null and signType != ''"> |
| | | and t.sign_type= #{signType} |
| | | </if> |
| | | <if test="startTime !=null and startTime != ''"> |
| | | and t.start_time= #{startTime} |
| | | </if> |
| | | <if test="inspectionPlanId !=null and inspectionPlanId != ''"> |
| | | and t.inspection_plan_id= #{inspectionPlanId} |
| | | </if> |
| | | <if test="endTime !=null and endTime != ''"> |
| | | and t.end_time= #{endTime} |
| | | </if> |
| | | <if test="startDate !=null and startDate != ''"> |
| | | and t.start_date= #{startDate} |
| | | </if> |
| | | <if test="endDate !=null and endDate != ''"> |
| | | and t.end_date= #{endDate} |
| | | </if> |
| | | <if test="beforeTime !=null and beforeTime != ''"> |
| | | and t.before_time = #{beforeTime} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | </select> |
| | | </mapper> |
| | |
| | | <if test="originalPlanUserId !=null and originalPlanUserId != ''"> |
| | | and t.original_plan_user_id= #{originalPlanUserId} |
| | | </if> |
| | | <if test="startTime != null"> |
| | | <if test="startTime != null and startTime != ''"> |
| | | and t.act_ins_time >= #{startTime} |
| | | </if> |
| | | <if test="endTime != null"> |
| | | <if test="endTime != null and endTime != ''"> |
| | | and t.act_ins_time <= #{endTime} |
| | | </if> |
| | | <if test="planInsTime !=null "> |
| | |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="scopeTime !=null "> |
| | | <if test="scopeTime !=null and scopeTime != ''"> |
| | | and t.create_time < #{scopeTime} |
| | | and t.create_time > #{createTime} |
| | | </if> |
| | |
| | | <if test="originalPlanUserId !=null and originalPlanUserId != ''"> |
| | | and t.original_plan_user_id= #{originalPlanUserId} |
| | | </if> |
| | | <if test="startTime != null"> |
| | | <if test="startTime != null and startTime != ''"> |
| | | and t.act_ins_time >= #{startTime} |
| | | </if> |
| | | <if test="endTime != null"> |
| | | <if test="endTime != null and endTime != ''"> |
| | | and t.act_ins_time <= #{endTime} |
| | | </if> |
| | | <if test="planInsTime !=null "> |
| | |
| | | <!-- 保存巡检任务信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveInspectionTaskInfo" parameterType="Map"> |
| | | insert into inspection_task( |
| | | plan_user_id,act_ins_time,plan_ins_time,original_plan_user_name,ip_staff_id,transfer_desc,act_user_name,original_plan_user_id,task_type,sign_type,plan_end_time,inspection_plan_id,plan_user_name,community_id,act_user_id,task_id |
| | | plan_user_id,act_ins_time,plan_ins_time,original_plan_user_name,ip_staff_id,transfer_desc,act_user_name,original_plan_user_id, |
| | | task_type,sign_type,plan_end_time,inspection_plan_id,plan_user_name,community_id,act_user_id,task_id |
| | | ) values ( |
| | | #{planUserId},#{actInsTime},#{planInsTime},#{originalPlanUserName},#{ipStaffId},#{transferDesc},#{actUserName},#{originalPlanUserId},#{taskType},#{signType},#{planEndTime},#{inspectionPlanId},#{planUserName},#{communityId},#{actUserId},#{taskId} |
| | | #{planUserId},#{actInsTime},#{planInsTime},#{originalPlanUserName},#{ipStaffId},#{transferDesc},#{actUserName},#{originalPlanUserId}, |
| | | #{taskType},#{signType},#{planEndTime},#{inspectionPlanId},#{planUserName},#{communityId},#{actUserId},#{taskId} |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | <if test="planUserName !=null and planUserName != ''"> |
| | | , t.plan_user_name= #{planUserName} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | , t.community_id= #{communityId} |
| | | </if> |
| | | |
| | | <if test="actUserId !=null and actUserId != ''"> |
| | | , t.act_user_id= #{actUserId} |
| | | </if> |
| | |
| | | where 1=1 |
| | | <if test="taskId !=null and taskId != ''"> |
| | | and t.task_id= #{taskId} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | |
| | | </update> |
| | |
| | | |
| | | </select> |
| | | |
| | | |
| | | <select id="queryPointInspectionTasksCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from inspection_task t |
| | | left join inspection_plan ip on t.inspection_plan_id = ip.inspection_plan_id and ip.status_cd = '0' |
| | | left join inspection_route ir on ip.inspection_route_id = ir.inspection_route_id and ir.status_cd = '0' |
| | | left join inspection_route_point_rel iipr on ir.inspection_route_id = iipr.inspection_route_id and iipr.status_cd = '0' |
| | | left join inspection_point ipt on iipr.inspection_id = ipt.inspection_id and ipt.status_cd = '0' |
| | | where 1=1 |
| | | and ipt.inspection_id = #{inspectionId} |
| | | <if test="planUserId !=null and planUserId != ''"> |
| | | and t.plan_user_id= #{planUserId} |
| | | </if> |
| | | <if test="actInsTime !=null and actInsTime != ''"> |
| | | and t.act_ins_time= #{actInsTime} |
| | | </if> |
| | | <if test="planInsTime !=null and planInsTime != ''"> |
| | | and t.plan_ins_time= #{planInsTime} |
| | | </if> |
| | | <if test="originalPlanUserName !=null and originalPlanUserName != ''"> |
| | | and t.original_plan_user_name= #{originalPlanUserName} |
| | | </if> |
| | | <if test="ipStaffId !=null and ipStaffId != ''"> |
| | | and t.ip_staff_id= #{ipStaffId} |
| | | </if> |
| | | <if test="transferDesc !=null and transferDesc != ''"> |
| | | and t.transfer_desc= #{transferDesc} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="actUserName !=null and actUserName != ''"> |
| | | and t.act_user_name= #{actUserName} |
| | | </if> |
| | | <if test="originalPlanUserId !=null and originalPlanUserId != ''"> |
| | | and t.original_plan_user_id= #{originalPlanUserId} |
| | | </if> |
| | | <if test="taskType !=null and taskType != ''"> |
| | | and t.task_type= #{taskType} |
| | | </if> |
| | | <if test="signType !=null and signType != ''"> |
| | | and t.sign_type= #{signType} |
| | | </if> |
| | | <if test="planEndTime !=null and planEndTime != ''"> |
| | | and t.plan_end_time= #{planEndTime} |
| | | </if> |
| | | <if test="inspectionPlanId !=null and inspectionPlanId != ''"> |
| | | and t.inspection_plan_id= #{inspectionPlanId} |
| | | </if> |
| | | <if test="planUserName !=null and planUserName != ''"> |
| | | and t.plan_user_name= #{planUserName} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="actUserId !=null and actUserId != ''"> |
| | | and t.act_user_id= #{actUserId} |
| | | </if> |
| | | <if test="taskId !=null and taskId != ''"> |
| | | and t.task_id= #{taskId} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | <!-- 查询巡检任务信息 add by wuxw 2018-07-03 --> |
| | | <select id="queryPointInspectionTasks" parameterType="Map" resultType="Map"> |
| | | select t.plan_user_id,t.plan_user_id planUserId,t.act_ins_time,t.act_ins_time |
| | | actInsTime,t.plan_ins_time,t.plan_ins_time planInsTime,t.original_plan_user_name,t.original_plan_user_name |
| | | originalPlanUserName,t.ip_staff_id,t.ip_staff_id ipStaffId,t.transfer_desc,t.transfer_desc |
| | | transferDesc,t.status_cd,t.status_cd statusCd,t.act_user_name,t.act_user_name |
| | | actUserName,t.original_plan_user_id,t.original_plan_user_id originalPlanUserId,t.task_type,t.task_type |
| | | taskType,t.sign_type,t.sign_type signType,t.plan_end_time,t.plan_end_time |
| | | planEndTime,t.inspection_plan_id,t.inspection_plan_id inspectionPlanId,t.plan_user_name,t.plan_user_name |
| | | planUserName,t.community_id,t.community_id communityId,t.act_user_id,t.act_user_id actUserId,t.task_id,t.task_id |
| | | taskId,ip.inspection_plan_name inspectionPlanName,ir.inspection_route_id inspectionRouteId |
| | | from inspection_task t |
| | | left join inspection_plan ip on t.inspection_plan_id = ip.inspection_plan_id and ip.status_cd = '0' |
| | | left join inspection_route ir on ip.inspection_route_id = ir.inspection_route_id and ir.status_cd = '0' |
| | | left join inspection_route_point_rel iipr on ir.inspection_route_id = iipr.inspection_route_id and iipr.status_cd = '0' |
| | | left join inspection_point ipt on iipr.inspection_id = ipt.inspection_id and ipt.status_cd = '0' |
| | | where 1=1 |
| | | and ipt.inspection_id = #{inspectionId} |
| | | <if test="planUserId !=null and planUserId != ''"> |
| | | and t.plan_user_id= #{planUserId} |
| | | </if> |
| | | <if test="actInsTime !=null and actInsTime != ''"> |
| | | and t.act_ins_time= #{actInsTime} |
| | | </if> |
| | | <if test="planInsTime !=null and planInsTime != ''"> |
| | | and t.plan_ins_time= #{planInsTime} |
| | | </if> |
| | | <if test="originalPlanUserName !=null and originalPlanUserName != ''"> |
| | | and t.original_plan_user_name= #{originalPlanUserName} |
| | | </if> |
| | | <if test="ipStaffId !=null and ipStaffId != ''"> |
| | | and t.ip_staff_id= #{ipStaffId} |
| | | </if> |
| | | <if test="transferDesc !=null and transferDesc != ''"> |
| | | and t.transfer_desc= #{transferDesc} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="actUserName !=null and actUserName != ''"> |
| | | and t.act_user_name= #{actUserName} |
| | | </if> |
| | | <if test="originalPlanUserId !=null and originalPlanUserId != ''"> |
| | | and t.original_plan_user_id= #{originalPlanUserId} |
| | | </if> |
| | | <if test="taskType !=null and taskType != ''"> |
| | | and t.task_type= #{taskType} |
| | | </if> |
| | | <if test="signType !=null and signType != ''"> |
| | | and t.sign_type= #{signType} |
| | | </if> |
| | | <if test="planEndTime !=null and planEndTime != ''"> |
| | | and t.plan_end_time= #{planEndTime} |
| | | </if> |
| | | <if test="inspectionPlanId !=null and inspectionPlanId != ''"> |
| | | and t.inspection_plan_id= #{inspectionPlanId} |
| | | </if> |
| | | <if test="planUserName !=null and planUserName != ''"> |
| | | and t.plan_user_name= #{planUserName} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="actUserId !=null and actUserId != ''"> |
| | | and t.act_user_id= #{actUserId} |
| | | </if> |
| | | <if test="taskId !=null and taskId != ''"> |
| | | and t.task_id= #{taskId} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | */ |
| | | @RequestMapping(value = "/queryInspectionPlansCount", method = RequestMethod.POST) |
| | | int queryInspectionPlansCount(@RequestBody InspectionPlanDto inspectionPlanDto); |
| | | |
| | | @RequestMapping(value = "/queryPointInspectionPlansCount", method = RequestMethod.POST) |
| | | int queryPointInspectionPlansCount(@RequestBody InspectionPlanDto inspectionPlanDto); |
| | | |
| | | @RequestMapping(value = "/queryPointInspectionPlans", method = RequestMethod.POST) |
| | | List<InspectionPlanDto> queryPointInspectionPlans(@RequestBody InspectionPlanDto inspectionPlanDto); |
| | | } |
| | |
| | | */ |
| | | @RequestMapping(value = "/queryInspectionTasksCount", method = RequestMethod.POST) |
| | | int queryInspectionTasksCount(@RequestBody InspectionTaskDto inspectionTaskDto); |
| | | |
| | | @RequestMapping(value = "/queryPointInspectionTasksCount", method = RequestMethod.POST) |
| | | int queryPointInspectionTasksCount(@RequestBody InspectionTaskDto inspectionTaskDto); |
| | | |
| | | |
| | | @RequestMapping(value = "/queryPointInspectionTasks", method = RequestMethod.POST) |
| | | List<InspectionTaskDto> queryPointInspectionTasks(@RequestBody InspectionTaskDto inspectionTaskDto); |
| | | } |
| | |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.core.log.LoggerFactory; |
| | | import com.java110.doc.annotation.*; |
| | | import com.java110.dto.fee.PayFeeDto; |
| | | import com.java110.dto.payment.PaymentOrderDto; |
| | | import com.java110.dto.paymentPool.PaymentPoolDto; |
| | | import com.java110.dto.paymentPoolConfig.PaymentPoolConfigDto; |
| | | import com.java110.intf.acct.IPaymentPoolConfigV1InnerServiceSMO; |
| | | import com.java110.intf.acct.IPaymentPoolV1InnerServiceSMO; |
| | | import com.java110.intf.fee.IPayFeeV1InnerServiceSMO; |
| | | import com.java110.utils.cache.CommonCache; |
| | | import com.java110.utils.cache.MappingCache; |
| | | import com.java110.utils.constant.MappingConstant; |
| | |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.StringUtil; |
| | | import org.slf4j.Logger; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | import java.text.ParseException; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | |
| | |
| | | private static final Logger logger = LoggerFactory.getLogger(UnifiedPaymentCmd.class); |
| | | |
| | | protected static final String DEFAULT_PAYMENT_ADAPT = "wechatPaymentFactory";// 默认微信通用支付 |
| | | |
| | | @Autowired |
| | | private IPaymentPoolConfigV1InnerServiceSMO paymentPoolConfigV1InnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IPaymentPoolV1InnerServiceSMO paymentPoolV1InnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IPayFeeV1InnerServiceSMO payFeeV1InnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * 校验 |
| | |
| | | } |
| | | |
| | | // 3.0 寻找当前支付适配器 |
| | | String payAdapt = MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, WechatConstant.PAYMENT_ADAPT); |
| | | // todo 3.0 寻找当前支付适配器 |
| | | String payAdapt = computeAdapt(reqJson.getString("business"), reqJson); |
| | | //String payAdapt = MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, WechatConstant.PAYMENT_ADAPT); |
| | | payAdapt = StringUtil.isEmpty(payAdapt) ? DEFAULT_PAYMENT_ADAPT : payAdapt; |
| | | |
| | | if(reqJson.containsKey("payAdapt") && !StringUtil.isEmpty(reqJson.getString("payAdapt"))){ |
| | |
| | | // redis 中 保存 请求参数 |
| | | CommonCache.setValue("unifiedPayment_"+paymentOrderDto.getOrderId(),reqJson.toJSONString(),CommonCache.PAY_DEFAULT_EXPIRE_TIME); |
| | | } |
| | | |
| | | private String computeAdapt(String business, JSONObject reqJson) { |
| | | |
| | | String communityId = reqJson.getString("communityId"); |
| | | //todo 如果是单个费用缴费 |
| | | PaymentPoolDto paymentPoolDto = ifPayFeeBusiness(business, reqJson); |
| | | if (paymentPoolDto != null) { |
| | | reqJson.put("paymentPoolId", paymentPoolDto.getPpId()); |
| | | return paymentPoolDto.getBeanJsapi(); |
| | | } |
| | | |
| | | //todo 如果是临时车 |
| | | paymentPoolDto = ifTempCarFeeBusiness(business, communityId); |
| | | if (paymentPoolDto != null) { |
| | | reqJson.put("paymentPoolId", paymentPoolDto.getPpId()); |
| | | return paymentPoolDto.getBeanJsapi(); |
| | | } |
| | | |
| | | //todo 按小区查询 支付信息 |
| | | paymentPoolDto = new PaymentPoolDto(); |
| | | paymentPoolDto.setCommunityId(communityId); |
| | | paymentPoolDto.setPayType(PaymentPoolDto.PAY_TYPE_COMMUNITY); |
| | | paymentPoolDto.setState("Y"); |
| | | List<PaymentPoolDto> paymentPoolDtos = paymentPoolV1InnerServiceSMOImpl.queryPaymentPools(paymentPoolDto); |
| | | if (paymentPoolDtos == null || paymentPoolDtos.isEmpty()) { |
| | | throw new IllegalArgumentException("小区未配置支付信息"); |
| | | } |
| | | |
| | | reqJson.put("paymentPoolId", paymentPoolDtos.get(0).getPpId()); |
| | | return paymentPoolDtos.get(0).getBeanJsapi(); |
| | | } |
| | | |
| | | /** |
| | | * 临时车场景处理 |
| | | * |
| | | * @param business |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | private PaymentPoolDto ifTempCarFeeBusiness(String business, String communityId) { |
| | | if (!"tempCarFee".equals(business)) { |
| | | return null; |
| | | } |
| | | //todo 按小区查询 支付信息 |
| | | PaymentPoolDto paymentPoolDto = new PaymentPoolDto(); |
| | | paymentPoolDto.setCommunityId(communityId); |
| | | paymentPoolDto.setPayType(PaymentPoolDto.PAY_TYPE_TEMP_CAT); |
| | | paymentPoolDto.setState("Y"); |
| | | List<PaymentPoolDto> paymentPoolDtos = paymentPoolV1InnerServiceSMOImpl.queryPaymentPools(paymentPoolDto); |
| | | if (paymentPoolDtos == null || paymentPoolDtos.isEmpty()) { |
| | | return null; |
| | | } |
| | | |
| | | return paymentPoolDtos.get(0); |
| | | } |
| | | |
| | | private PaymentPoolDto ifPayFeeBusiness(String business, JSONObject reqJson) { |
| | | String feeId = ""; |
| | | if (!"payFee".equals(business) || !reqJson.containsKey("feeId")) { |
| | | return null; |
| | | } |
| | | |
| | | feeId = reqJson.getString("feeId"); |
| | | if (StringUtil.isNumber(feeId)) { |
| | | return null; |
| | | } |
| | | |
| | | PayFeeDto feeDto = new PayFeeDto(); |
| | | feeDto.setFeeId(feeId); |
| | | feeDto.setCommunityId(reqJson.getString("communityId")); |
| | | List<PayFeeDto> feeDtos = payFeeV1InnerServiceSMOImpl.queryPayFees(feeDto); |
| | | |
| | | if (feeDtos == null || feeDtos.isEmpty()) { |
| | | return null; |
| | | } |
| | | |
| | | PaymentPoolConfigDto paymentPoolConfigDto = new PaymentPoolConfigDto(); |
| | | paymentPoolConfigDto.setConfigId(feeDtos.get(0).getConfigId()); |
| | | paymentPoolConfigDto.setCommunityId(feeDtos.get(0).getCommunityId()); |
| | | List<PaymentPoolConfigDto> paymentPoolConfigDtos = paymentPoolConfigV1InnerServiceSMOImpl.queryPaymentPoolConfigs(paymentPoolConfigDto); |
| | | if (paymentPoolConfigDtos == null || paymentPoolConfigDtos.isEmpty()) { |
| | | return null; |
| | | } |
| | | |
| | | PaymentPoolDto paymentPoolDto = new PaymentPoolDto(); |
| | | paymentPoolDto.setPpId(paymentPoolConfigDtos.get(0).getPpId()); |
| | | paymentPoolDto.setCommunityId(paymentPoolConfigDtos.get(0).getCommunityId()); |
| | | paymentPoolDto.setPayType(PaymentPoolDto.PAY_TYPE_FEE_CONFIG); |
| | | paymentPoolDto.setState("Y"); |
| | | List<PaymentPoolDto> paymentPoolDtos = paymentPoolV1InnerServiceSMOImpl.queryPaymentPools(paymentPoolDto); |
| | | if (paymentPoolDtos == null || paymentPoolDtos.isEmpty()) { |
| | | return null; |
| | | } |
| | | |
| | | return paymentPoolDtos.get(0); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.community.cmd.inspection; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.community.smo.impl.InspectionPlanV1InnerServiceSMOImpl; |
| | | import com.java110.core.annotation.Java110Cmd; |
| | | import com.java110.core.context.ICmdDataFlowContext; |
| | | import com.java110.core.event.cmd.Cmd; |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.dto.inspection.InspectionPlanDto; |
| | | import com.java110.dto.inspection.InspectionPlanStaffDto; |
| | | import com.java110.intf.community.IInspectionPlanStaffV1InnerServiceSMO; |
| | | import com.java110.intf.community.IInspectionPlanV1InnerServiceSMO; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.ListUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import com.java110.vo.api.inspectionPlan.ApiInspectionPlanDataVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | import java.text.ParseException; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 根据巡检点查询巡检计划 |
| | | */ |
| | | @Java110Cmd(serviceCode = "inspection.queryPointInspectionPlan") |
| | | public class QueryPointInspectionPlanCmd extends Cmd { |
| | | |
| | | @Autowired |
| | | private IInspectionPlanV1InnerServiceSMO inspectionPlanV1InnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IInspectionPlanStaffV1InnerServiceSMO inspectionPlanStaffV1InnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException, ParseException { |
| | | super.validatePageInfo(reqJson); |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "inspectionId", "未包含巡检点"); |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "未包含小区"); |
| | | } |
| | | |
| | | @Override |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException, ParseException { |
| | | |
| | | InspectionPlanDto inspectionPlanDto = BeanConvertUtil.covertBean(reqJson, InspectionPlanDto.class); |
| | | |
| | | int count = inspectionPlanV1InnerServiceSMOImpl.queryPointInspectionPlansCount(inspectionPlanDto); |
| | | |
| | | List<InspectionPlanDto> inspectionPlans = null; |
| | | |
| | | if (count > 0) { |
| | | inspectionPlans = BeanConvertUtil.covertBeanList(inspectionPlanV1InnerServiceSMOImpl.queryPointInspectionPlans(inspectionPlanDto), InspectionPlanDto.class); |
| | | queryStaffs(inspectionPlans); |
| | | } else { |
| | | inspectionPlans = new ArrayList<>(); |
| | | } |
| | | ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, inspectionPlans); |
| | | |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK); |
| | | |
| | | context.setResponseEntity(responseEntity); |
| | | } |
| | | |
| | | /** |
| | | * 查询员工 |
| | | * |
| | | * @param inspectionPlans |
| | | */ |
| | | private void queryStaffs(List<InspectionPlanDto> inspectionPlans) { |
| | | |
| | | if (ListUtil.isNull(inspectionPlans)) { |
| | | return; |
| | | } |
| | | |
| | | List<String> planIds = new ArrayList<>(); |
| | | |
| | | for (InspectionPlanDto inspectionPlanDto : inspectionPlans) { |
| | | planIds.add(inspectionPlanDto.getInspectionPlanId()); |
| | | } |
| | | |
| | | InspectionPlanStaffDto inspectionPlanStaffDto = new InspectionPlanStaffDto(); |
| | | inspectionPlanStaffDto.setInspectionPlanIds(planIds.toArray(new String[planIds.size()])); |
| | | inspectionPlanStaffDto.setCommunityId(inspectionPlans.get(0).getCommunityId()); |
| | | List<InspectionPlanStaffDto> inspectionPlanStaffDtos = inspectionPlanStaffV1InnerServiceSMOImpl.queryInspectionPlanStaffs(inspectionPlanStaffDto); |
| | | |
| | | if (ListUtil.isNull(inspectionPlanStaffDtos)) { |
| | | return; |
| | | } |
| | | |
| | | List<InspectionPlanStaffDto> staffDtos = null; |
| | | for (InspectionPlanDto inspectionPlanDto : inspectionPlans) { |
| | | staffDtos = new ArrayList<>(); |
| | | for (InspectionPlanStaffDto tmpInspectionPlanStaffDto : inspectionPlanStaffDtos) { |
| | | if (inspectionPlanDto.getInspectionPlanId().equals(tmpInspectionPlanStaffDto.getInspectionPlanId())) { |
| | | staffDtos.add(tmpInspectionPlanStaffDto); |
| | | } |
| | | } |
| | | inspectionPlanDto.setStaffs(staffDtos); |
| | | } |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.community.cmd.inspection; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.annotation.Java110Cmd; |
| | | import com.java110.core.context.ICmdDataFlowContext; |
| | | import com.java110.core.event.cmd.Cmd; |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.dto.inspection.InspectionPlanDto; |
| | | import com.java110.dto.inspection.InspectionTaskDto; |
| | | import com.java110.intf.community.IInspectionTaskV1InnerServiceSMO; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | import java.text.ParseException; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 查询巡检点对应的巡检任务 |
| | | */ |
| | | @Java110Cmd(serviceCode = "inspection.queryPointInspectionTask") |
| | | public class QueryPointInspectionTaskCmd extends Cmd { |
| | | |
| | | @Autowired |
| | | private IInspectionTaskV1InnerServiceSMO inspectionTaskV1InnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException, ParseException { |
| | | super.validatePageInfo(reqJson); |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "inspectionId", "未包含巡检点"); |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "未包含小区"); |
| | | } |
| | | |
| | | @Override |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException, ParseException { |
| | | InspectionTaskDto inspectionTaskDto = BeanConvertUtil.covertBean(reqJson, InspectionTaskDto.class); |
| | | |
| | | int count = inspectionTaskV1InnerServiceSMOImpl.queryPointInspectionTasksCount(inspectionTaskDto); |
| | | |
| | | List<InspectionTaskDto> inspectionTaskDtos = null; |
| | | |
| | | if (count > 0) { |
| | | inspectionTaskDtos = BeanConvertUtil.covertBeanList(inspectionTaskV1InnerServiceSMOImpl.queryPointInspectionTasks(inspectionTaskDto), InspectionTaskDto.class); |
| | | } else { |
| | | inspectionTaskDtos = new ArrayList<>(); |
| | | } |
| | | ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, inspectionTaskDtos); |
| | | |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK); |
| | | |
| | | context.setResponseEntity(responseEntity); |
| | | } |
| | | } |
| | |
| | | */ |
| | | int queryInspectionPlansCount(Map info); |
| | | |
| | | int queryPointInspectionPlansCount(Map info); |
| | | |
| | | List<Map> queryPointInspectionPlans(Map info); |
| | | } |
| | |
| | | */ |
| | | int queryInspectionTasksCount(Map info); |
| | | |
| | | int queryPointInspectionTasksCount(Map info); |
| | | |
| | | List<Map> queryPointInspectionTasks(Map info); |
| | | } |
| | |
| | | return Integer.parseInt(businessInspectionPlanInfos.get(0).get("count").toString()); |
| | | } |
| | | |
| | | /** |
| | | * 查询巡检计划数量 |
| | | * @param info 巡检计划信息 |
| | | * @return 巡检计划数量 |
| | | */ |
| | | @Override |
| | | public int queryPointInspectionPlansCount(Map info) { |
| | | logger.debug("查询 queryInspectionPlansCount 入参 info : {}",info); |
| | | |
| | | List<Map> infos = sqlSessionTemplate.selectList("inspectionPlanV1ServiceDaoImpl.queryPointInspectionPlansCount", info); |
| | | if (infos.size() < 1) { |
| | | return 0; |
| | | } |
| | | |
| | | return Integer.parseInt(infos.get(0).get("count").toString()); |
| | | } |
| | | |
| | | /** |
| | | * 查询巡检计划信息(instance) |
| | | * @param info bId 信息 |
| | | * @return List<Map> |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public List<Map> queryPointInspectionPlans(Map info) throws DAOException { |
| | | logger.debug("查询 getInspectionPlanInfo 入参 info : {}",info); |
| | | |
| | | List<Map> infos = sqlSessionTemplate.selectList("inspectionPlanV1ServiceDaoImpl.queryPointInspectionPlans",info); |
| | | |
| | | return infos; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | public int queryInspectionTasksCount(Map info) { |
| | | logger.debug("查询 queryInspectionTasksCount 入参 info : {}",info); |
| | | |
| | | List<Map> businessInspectionTaskInfos = sqlSessionTemplate.selectList("inspectionTaskV1ServiceDaoImpl.queryInspectionTasksCount", info); |
| | | if (businessInspectionTaskInfos.size() < 1) { |
| | | List<Map> infos = sqlSessionTemplate.selectList("inspectionTaskV1ServiceDaoImpl.queryInspectionTasksCount", info); |
| | | if (infos.size() < 1) { |
| | | return 0; |
| | | } |
| | | |
| | | return Integer.parseInt(businessInspectionTaskInfos.get(0).get("count").toString()); |
| | | return Integer.parseInt(infos.get(0).get("count").toString()); |
| | | } |
| | | |
| | | @Override |
| | | public int queryPointInspectionTasksCount(Map info) { |
| | | logger.debug("查询 queryInspectionTasksCount 入参 info : {}",info); |
| | | |
| | | List<Map> infos = sqlSessionTemplate.selectList("inspectionTaskV1ServiceDaoImpl.queryPointInspectionTasksCount", info); |
| | | if (infos.size() < 1) { |
| | | return 0; |
| | | } |
| | | |
| | | return Integer.parseInt(infos.get(0).get("count").toString()); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map> queryPointInspectionTasks(Map info) { |
| | | logger.debug("查询 getInspectionTaskInfo 入参 info : {}",info); |
| | | |
| | | List<Map> infos = sqlSessionTemplate.selectList("inspectionTaskV1ServiceDaoImpl.queryPointInspectionTasks",info); |
| | | |
| | | return infos; |
| | | } |
| | | |
| | | |
| | |
| | | return inspectionPlanV1ServiceDaoImpl.queryInspectionPlansCount(BeanConvertUtil.beanCovertMap(inspectionPlanDto)); |
| | | } |
| | | |
| | | public int queryPointInspectionPlansCount(@RequestBody InspectionPlanDto inspectionPlanDto) { |
| | | return inspectionPlanV1ServiceDaoImpl.queryPointInspectionPlansCount(BeanConvertUtil.beanCovertMap(inspectionPlanDto)); |
| | | |
| | | } |
| | | |
| | | public List<InspectionPlanDto> queryPointInspectionPlans(@RequestBody InspectionPlanDto inspectionPlanDto) { |
| | | //校验是否传了 分页信息 |
| | | |
| | | int page = inspectionPlanDto.getPage(); |
| | | |
| | | if (page != PageDto.DEFAULT_PAGE) { |
| | | inspectionPlanDto.setPage((page - 1) * inspectionPlanDto.getRow()); |
| | | } |
| | | |
| | | List<InspectionPlanDto> inspectionPlans = BeanConvertUtil.covertBeanList(inspectionPlanV1ServiceDaoImpl.queryPointInspectionPlans(BeanConvertUtil.beanCovertMap(inspectionPlanDto)), InspectionPlanDto.class); |
| | | |
| | | return inspectionPlans; |
| | | } |
| | | } |
| | |
| | | public int queryInspectionTasksCount(@RequestBody InspectionTaskDto inspectionTaskDto) { |
| | | return inspectionTaskV1ServiceDaoImpl.queryInspectionTasksCount(BeanConvertUtil.beanCovertMap(inspectionTaskDto)); } |
| | | |
| | | @Override |
| | | public int queryPointInspectionTasksCount(@RequestBody InspectionTaskDto inspectionTaskDto) { |
| | | return inspectionTaskV1ServiceDaoImpl.queryPointInspectionTasksCount(BeanConvertUtil.beanCovertMap(inspectionTaskDto)); |
| | | } |
| | | |
| | | @Override |
| | | public List<InspectionTaskDto> queryPointInspectionTasks(@RequestBody InspectionTaskDto inspectionTaskDto) { |
| | | //校验是否传了 分页信息 |
| | | |
| | | int page = inspectionTaskDto.getPage(); |
| | | |
| | | if (page != PageDto.DEFAULT_PAGE) { |
| | | inspectionTaskDto.setPage((page - 1) * inspectionTaskDto.getRow()); |
| | | } |
| | | |
| | | List<InspectionTaskDto> inspectionTasks = BeanConvertUtil.covertBeanList( |
| | | inspectionTaskV1ServiceDaoImpl.queryPointInspectionTasks(BeanConvertUtil.beanCovertMap(inspectionTaskDto)), |
| | | InspectionTaskDto.class); |
| | | |
| | | return inspectionTasks; |
| | | } |
| | | |
| | | } |