| | |
| | | import com.java110.core.context.ICmdDataFlowContext; |
| | | import com.java110.core.event.cmd.Cmd; |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.core.factory.CommunitySettingFactory; |
| | | import com.java110.dto.basePrivilege.BasePrivilegeDto; |
| | | import com.java110.dto.repair.RepairDto; |
| | | import com.java110.intf.community.IMenuInnerServiceSMO; |
| | |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | |
| | | @Autowired |
| | | private IMenuInnerServiceSMO menuInnerServiceSMOImpl; |
| | | |
| | | //域 |
| | | public static final String DOMAIN_COMMON = "DOMAIN.COMMON"; |
| | | |
| | | public static final String VIEW_LIST_STAFF_REPAIRS = "VIEW_LIST_STAFF_REPAIRS"; |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException { |
| | | super.validatePageInfo(reqJson); |
| | |
| | | Assert.hasKeyAndValue(reqJson, "userId", "请求中未包含员工信息"); |
| | | } |
| | | |
| | | /** |
| | | * 报修待办 |
| | | * @param event 事件对象 |
| | | * @param context 数据上文对象 |
| | | * @param reqJson 请求报文 |
| | | * @throws CmdException |
| | | * @throws ParseException |
| | | */ |
| | | @Override |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException, ParseException { |
| | | RepairDto ownerRepairDto = BeanConvertUtil.covertBean(reqJson, RepairDto.class); |
| | | //获取用户id |
| | | String userId = reqJson.getString("userId"); |
| | | String viewListStaffRepairs = MappingCache.getValue("viewListStaffRepairs"); |
| | | String viewListStaffRepairs = CommunitySettingFactory.getValue(reqJson.getString("communityId"), VIEW_LIST_STAFF_REPAIRS); |
| | | if (StringUtil.isEmpty(viewListStaffRepairs)) { |
| | | viewListStaffRepairs = MappingCache.getValue(DOMAIN_COMMON,VIEW_LIST_STAFF_REPAIRS); |
| | | } |
| | | List<Map> privileges = null; |
| | | if("ON".equals(viewListStaffRepairs)) {//是否让管理员看到所有工单 |
| | | //报修待办查看所有记录权限 |