| | |
| | | public static final String PRODUCT_OA_COOPERATE_FLOW_NODE = "product_oa_cooperate_flow_node"; //协同办公表子表 |
| | | public static final String PRODUCT_SYS_BUSINESS_TRIP = "product_oa_business_trip"; //出差申请表 |
| | | public static final String PRODUCT_SYS_ASK_FOR_LEAVE = "product_oa_ask_for_leave"; //请假申请表 |
| | | public static final String PRODUCT_SYS_WORK_OVERTIME = "product_oa_work_overtime"; //加班申请表 |
| | | public static final String PRODUCT_OA_WORK_OVERTIME = "product_oa_work_overtime"; //加班申请表 |
| | | public static final String PRODUCT_SYS_GO_OUT_APPLICATON = "product_oa_go_out_application";//外出申请表 |
| | | public static final String PRODUCT_SYS_REPLENISH_PUNCH = "product_oa_replenish_punch"; //补卡申请表 |
| | | public static final String PRODUCT_OA_ATTENDANCE_INFO = "product_oa_attendance_info"; //人事考勤信息 |
| | |
| | | |
| | | public static final String PRODUCT_SYS_MESSAGE = "product_sys_message";//消息表 |
| | | |
| | | public static final String product_project_CUSTOMER = "product_project_customer"; //项目客户表 |
| | | public static final String product_project_CUSTOMER_SUB = "product_project_customer_sub"; //客户联系人 |
| | | public static final String product_project_CUSTOMER_VISIT_RECORD = "product_project_customer_visit_record"; //客户拜访记录 |
| | | public static final String product_project_CUSTOMER_SATISFACTION = "product_project_customer_satisfaction"; //客户满意度信息 |
| | | public static final String PRODUCT_PROJECT_CUSTOMER = "product_project_customer"; //项目客户表 |
| | | public static final String PRODUCT_PROJECT_CUSTOMER_SUB = "product_project_customer_sub"; //客户联系人 |
| | | public static final String PRODUCT_PROJECT_CUSTOMER_VISIT_RECORD = "product_project_customer_visit_record"; //客户拜访记录 |
| | | public static final String PRODUCT_PROJECT_CUSTOMER_SATISFACTION = "product_project_customer_satisfaction"; //客户满意度信息 |
| | | |
| | | public static final String PRODUCT_SYS_MAIL_SEND = "product_sys_mail_send"; //邮件发送历史记录表 |
| | | public static final String PRODUCT_SYS_MESSAGE_SEND = "product_sys_message_send"; |
| | |
| | | SYSTEM_SAVE_WORK_OVERTIME_FAIL("加班申请保存失败", ModuleEnum.ADMINISTRAT.getValue() + "027"), |
| | | SYSTEM_DELETE_WORK_OVERTIME_FAIL("删除加班申请失败", ModuleEnum.ADMINISTRAT.getValue() + "028"), |
| | | |
| | | |
| | | SYSTEM_GET_LOAN_APPLICATION_LIST_FAIL("借款申请列表获取失败", ModuleEnum.ADMINISTRAT.getValue() + "029"), |
| | | SYSTEM_GET_LOAN_APPLICATION_INFO_FAIL("借款申请详情获取失败", ModuleEnum.ADMINISTRAT.getValue() + "030"), |
| | | SYSTEM_SAVE_LOAN_APPLICATION_FAIL("借款申请保存失败", ModuleEnum.ADMINISTRAT.getValue() + "031"), |
| | |
| | | WARN_TRANSMIT_USER_IS_NULL("预警转发人员为空", ModuleEnum.ADMINISTRAT.getValue() + "200"), |
| | | WARN_TRANSMIT_USER_REPEAT("预警转发人员重复", ModuleEnum.ADMINISTRAT.getValue() + "201"), |
| | | |
| | | SYSTEM_SAVE_FAIL_DATA_READY_EXIST("当前申请人已填写该月加班记录", ModuleEnum.ADMINISTRAT.getValue() + "202"), |
| | | |
| | | EXPORT_FILE_FAIL("导出文件失败", ModuleEnum.ADMINISTRAT.getValue() + "998"), |
| | | IMPORT_FILE_FAIL("导入文件失败", ModuleEnum.ADMINISTRAT.getValue() + "999"), |
| | | |
| | |
| | | return this.error(SystemCode.SYSTEM_FORM_NODATA.getValue(), SystemCode.SYSTEM_FORM_NODATA.getText()); |
| | | } |
| | | // 判断表名是否为空 |
| | | if (!CmnConst.product_project_CUSTOMER.equals(fse.getTableName())) { |
| | | if (!CmnConst.PRODUCT_PROJECT_CUSTOMER.equals(fse.getTableName())) { |
| | | SpringMVCContextHolder.getSystemLogger().error(SystemCode.SYSTEM_TABLE_NODATA.getValue(),SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | return this.error(SystemCode.SYSTEM_TABLE_NODATA.getValue(), SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | } |
| | |
| | | return this.error(SystemCode.SYSTEM_FORM_NODATA.getValue(), SystemCode.SYSTEM_FORM_NODATA.getText()); |
| | | } |
| | | // 判断表名是否为空 |
| | | if (!CmnConst.product_project_CUSTOMER.equals(fse.getTableName())) { |
| | | if (!CmnConst.PRODUCT_PROJECT_CUSTOMER.equals(fse.getTableName())) { |
| | | SpringMVCContextHolder.getSystemLogger().error(SystemCode.SYSTEM_TABLE_NODATA.getValue(),SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | return this.error(SystemCode.SYSTEM_TABLE_NODATA.getValue(), SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | } |
| | |
| | | return this.error(SystemCode.SYSTEM_FORM_NODATA.getValue(), SystemCode.SYSTEM_FORM_NODATA.getText()); |
| | | } |
| | | // 判断表名是否为空 |
| | | if (!CmnConst.product_project_CUSTOMER.equals(fse.getTableName())) { |
| | | if (!CmnConst.PRODUCT_PROJECT_CUSTOMER.equals(fse.getTableName())) { |
| | | SpringMVCContextHolder.getSystemLogger().error(SystemCode.SYSTEM_TABLE_NODATA.getValue(),SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | return this.error(SystemCode.SYSTEM_TABLE_NODATA.getValue(), SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | } |
| | |
| | | return this.error(SystemCode.SYSTEM_FORM_NODATA.getValue(), SystemCode.SYSTEM_FORM_NODATA.getText()); |
| | | } |
| | | // 判断表名是否为空 |
| | | if (!CmnConst.product_project_CUSTOMER.equals(fse.getTableName())) { |
| | | if (!CmnConst.PRODUCT_PROJECT_CUSTOMER.equals(fse.getTableName())) { |
| | | SpringMVCContextHolder.getSystemLogger().error(SystemCode.SYSTEM_TABLE_NODATA.getValue(),SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | return this.error(SystemCode.SYSTEM_TABLE_NODATA.getValue(), SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | } |
| | |
| | | return this.error(SystemCode.SYSTEM_FORM_NODATA.getValue(), SystemCode.SYSTEM_FORM_NODATA.getText()); |
| | | } |
| | | // 判断表名是否为空 |
| | | if (!CmnConst.product_project_CUSTOMER.equals(fse.getTableName())) { |
| | | if (!CmnConst.PRODUCT_PROJECT_CUSTOMER.equals(fse.getTableName())) { |
| | | SpringMVCContextHolder.getSystemLogger().error(SystemCode.SYSTEM_TABLE_NODATA.getValue(),SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | return this.error(SystemCode.SYSTEM_TABLE_NODATA.getValue(), SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | } |
| | |
| | | return this.error(SystemCode.SYSTEM_FORM_NODATA.getValue(), SystemCode.SYSTEM_FORM_NODATA.getText()); |
| | | } |
| | | // 判断表名是否为空 |
| | | if (!CmnConst.product_project_CUSTOMER_SATISFACTION.equals(fse.getTableName())) { |
| | | if (!CmnConst.PRODUCT_PROJECT_CUSTOMER_SATISFACTION.equals(fse.getTableName())) { |
| | | SpringMVCContextHolder.getSystemLogger().error(SystemCode.SYSTEM_TABLE_NODATA.getValue(),SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | return this.error(SystemCode.SYSTEM_TABLE_NODATA.getValue(), SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | } |
| | |
| | | return this.error(SystemCode.SYSTEM_FORM_NODATA.getValue(), SystemCode.SYSTEM_FORM_NODATA.getText()); |
| | | } |
| | | // 判断表名是否为空 |
| | | if (!CmnConst.product_project_CUSTOMER_SATISFACTION.equals(fse.getTableName())) { |
| | | if (!CmnConst.PRODUCT_PROJECT_CUSTOMER_SATISFACTION.equals(fse.getTableName())) { |
| | | SpringMVCContextHolder.getSystemLogger().error(SystemCode.SYSTEM_TABLE_NODATA.getValue(),SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | return this.error(SystemCode.SYSTEM_TABLE_NODATA.getValue(), SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | } |
| | |
| | | return this.error(SystemCode.SYSTEM_FORM_NODATA.getValue(), SystemCode.SYSTEM_FORM_NODATA.getText()); |
| | | } |
| | | // 判断表名是否为空 |
| | | if (!CmnConst.product_project_CUSTOMER_SATISFACTION.equals(fse.getTableName())) { |
| | | if (!CmnConst.PRODUCT_PROJECT_CUSTOMER_SATISFACTION.equals(fse.getTableName())) { |
| | | SpringMVCContextHolder.getSystemLogger().error(SystemCode.SYSTEM_TABLE_NODATA.getValue(),SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | return this.error(SystemCode.SYSTEM_TABLE_NODATA.getValue(), SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | } |
| | |
| | | return this.error(SystemCode.SYSTEM_FORM_NODATA.getValue(), SystemCode.SYSTEM_FORM_NODATA.getText()); |
| | | } |
| | | // 判断表名是否为空 |
| | | if (!CmnConst.product_project_CUSTOMER_SATISFACTION.equals(fse.getTableName())) { |
| | | if (!CmnConst.PRODUCT_PROJECT_CUSTOMER_SATISFACTION.equals(fse.getTableName())) { |
| | | SpringMVCContextHolder.getSystemLogger().error(SystemCode.SYSTEM_TABLE_NODATA.getValue(),SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | return this.error(SystemCode.SYSTEM_TABLE_NODATA.getValue(), SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | } |
| | |
| | | return this.error(SystemCode.SYSTEM_FORM_NODATA.getValue(), SystemCode.SYSTEM_FORM_NODATA.getText()); |
| | | } |
| | | // 判断表名是否为空 |
| | | if (!CmnConst.product_project_CUSTOMER_SATISFACTION.equals(fse.getTableName())) { |
| | | if (!CmnConst.PRODUCT_PROJECT_CUSTOMER_SATISFACTION.equals(fse.getTableName())) { |
| | | SpringMVCContextHolder.getSystemLogger().error(SystemCode.SYSTEM_TABLE_NODATA.getValue(),SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | return this.error(SystemCode.SYSTEM_TABLE_NODATA.getValue(), SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | } |
| | |
| | | return this.error(SystemCode.SYSTEM_FORM_NODATA.getValue(), SystemCode.SYSTEM_FORM_NODATA.getText()); |
| | | } |
| | | // 判断表名是否为空 |
| | | if (!CmnConst.product_project_CUSTOMER_VISIT_RECORD.equals(fse.getTableName())) { |
| | | if (!CmnConst.PRODUCT_PROJECT_CUSTOMER_VISIT_RECORD.equals(fse.getTableName())) { |
| | | SpringMVCContextHolder.getSystemLogger().error(SystemCode.SYSTEM_TABLE_NODATA.getValue(),SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | return this.error(SystemCode.SYSTEM_TABLE_NODATA.getValue(), SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | } |
| | |
| | | return this.error(SystemCode.SYSTEM_FORM_NODATA.getValue(), SystemCode.SYSTEM_FORM_NODATA.getText()); |
| | | } |
| | | // 判断表名是否为空 |
| | | if (!CmnConst.product_project_CUSTOMER_VISIT_RECORD.equals(fse.getTableName())) { |
| | | if (!CmnConst.PRODUCT_PROJECT_CUSTOMER_VISIT_RECORD.equals(fse.getTableName())) { |
| | | SpringMVCContextHolder.getSystemLogger().error(SystemCode.SYSTEM_TABLE_NODATA.getValue(),SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | return this.error(SystemCode.SYSTEM_TABLE_NODATA.getValue(), SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | } |
| | |
| | | return this.error(SystemCode.SYSTEM_FORM_NODATA.getValue(), SystemCode.SYSTEM_FORM_NODATA.getText()); |
| | | } |
| | | // 判断表名是否为空 |
| | | if (!CmnConst.product_project_CUSTOMER_VISIT_RECORD.equals(fse.getTableName())) { |
| | | if (!CmnConst.PRODUCT_PROJECT_CUSTOMER_VISIT_RECORD.equals(fse.getTableName())) { |
| | | SpringMVCContextHolder.getSystemLogger().error(SystemCode.SYSTEM_TABLE_NODATA.getValue(),SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | return this.error(SystemCode.SYSTEM_TABLE_NODATA.getValue(), SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | } |
| | |
| | | return this.error(SystemCode.SYSTEM_FORM_NODATA.getValue(), SystemCode.SYSTEM_FORM_NODATA.getText()); |
| | | } |
| | | // 判断表名是否为空 |
| | | if (!CmnConst.product_project_CUSTOMER_VISIT_RECORD.equals(fse.getTableName())) { |
| | | if (!CmnConst.PRODUCT_PROJECT_CUSTOMER_VISIT_RECORD.equals(fse.getTableName())) { |
| | | SpringMVCContextHolder.getSystemLogger().error(SystemCode.SYSTEM_TABLE_NODATA.getValue(),SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | return this.error(SystemCode.SYSTEM_TABLE_NODATA.getValue(), SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | } |
| | |
| | | return this.error(SystemCode.SYSTEM_FORM_NODATA.getValue(), SystemCode.SYSTEM_FORM_NODATA.getText()); |
| | | } |
| | | // 判断表名是否为空 |
| | | if (!CmnConst.product_project_CUSTOMER_VISIT_RECORD.equals(fse.getTableName())) { |
| | | if (!CmnConst.PRODUCT_PROJECT_CUSTOMER_VISIT_RECORD.equals(fse.getTableName())) { |
| | | SpringMVCContextHolder.getSystemLogger().error(SystemCode.SYSTEM_TABLE_NODATA.getValue(),SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | return this.error(SystemCode.SYSTEM_TABLE_NODATA.getValue(), SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | } |
| | |
| | | import com.product.administration.config.CmnConst; |
| | | import com.product.administration.config.SystemCode; |
| | | import com.product.administration.service.WorkOvertimeService; |
| | | import com.product.common.lang.StringUtils; |
| | | import com.product.core.config.CoreConst; |
| | | import com.product.core.controller.support.AbstractBaseController; |
| | | import com.product.core.entity.DataTableEntity; |
| | | import com.product.core.entity.FieldSetEntity; |
| | | import com.product.core.entity.RequestParameterEntity; |
| | | import com.product.core.exception.BaseException; |
| | | import com.product.core.spring.context.SpringMVCContextHolder; |
| | | import com.product.module.sys.version.ApiVersion; |
| | | import com.product.util.BaseUtil; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | |
| | | public String getWorkOvertimeList(HttpServletRequest request) { |
| | | try { |
| | | //获取参数 |
| | | FieldSetEntity fse=null; |
| | | Object bean=request.getAttribute(CoreConst.API_POST_REQUEST_DATA); |
| | | if(bean != null){ |
| | | RequestParameterEntity reqp=(RequestParameterEntity)bean; |
| | | fse = reqp.getFormData(); |
| | | } |
| | | //判断参数是否为空 |
| | | if(bean == null || fse == null) { |
| | | SpringMVCContextHolder.getSystemLogger().error(SystemCode.SYSTEM_TABLE_NODATA.getValue(), SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | return this.error(SystemCode.SYSTEM_FORM_NODATA.getValue(), SystemCode.SYSTEM_FORM_NODATA.getText()); |
| | | } |
| | | //判断表名是否正常 |
| | | if (!CmnConst.PRODUCT_SYS_WORK_OVERTIME.equals(fse.getTableName())) { |
| | | SpringMVCContextHolder.getSystemLogger().error(SystemCode.SYSTEM_TABLE_NODATA.getValue(), SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | return this.error(SystemCode.SYSTEM_TABLE_NODATA.getValue(), SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | } |
| | | FieldSetEntity fse = BaseUtil.getFieldSetEntity(request, CmnConst.PRODUCT_OA_WORK_OVERTIME); |
| | | //判断分页参数 |
| | | if(fse.getString(CmnConst.PAGESIZE)==null || fse.getString(CmnConst.CPAGE)==null){ |
| | | return this.error(SystemCode.SYSTEM_CPAGES_NOT_NULL.getValue(), SystemCode.SYSTEM_CPAGES_NOT_NULL.getText()); |
| | |
| | | public String getWorkOvertimeInfo(HttpServletRequest request){ |
| | | try { |
| | | //获取参数 |
| | | FieldSetEntity fse=null; |
| | | Object bean=request.getAttribute(CoreConst.API_POST_REQUEST_DATA); |
| | | if(bean != null) { |
| | | RequestParameterEntity reqp=(RequestParameterEntity)bean; |
| | | fse = reqp.getFormData(); |
| | | } |
| | | //判断参数是否为空 |
| | | if(bean == null || fse == null) { |
| | | SpringMVCContextHolder.getSystemLogger().error(SystemCode.SYSTEM_FORM_NODATA.getValue(), SystemCode.SYSTEM_FORM_NODATA.getText()); |
| | | return this.error(SystemCode.SYSTEM_FORM_NODATA.getValue(), SystemCode.SYSTEM_FORM_NODATA.getText()); |
| | | } |
| | | //判断表名是否正常 |
| | | if (!CmnConst.PRODUCT_SYS_WORK_OVERTIME.equals(fse.getTableName())) { |
| | | SpringMVCContextHolder.getSystemLogger().error(SystemCode.SYSTEM_TABLE_NODATA.getValue(), SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | return this.error(SystemCode.SYSTEM_TABLE_NODATA.getValue(), SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | } |
| | | FieldSetEntity fse = BaseUtil.getFieldSetEntity(request, CmnConst.PRODUCT_OA_WORK_OVERTIME); |
| | | //判断uuid是否为空 |
| | | if (com.alibaba.druid.util.StringUtils.isEmpty(fse.getString("uuid"))) { |
| | | if (BaseUtil.strIsNull(fse.getUUID())) { |
| | | SpringMVCContextHolder.getSystemLogger().error(SystemCode.SYSTEM_TABLE_NODATA.getValue(), SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | return this.error(SystemCode.SYSTEM_FORM_COUNT.getValue(), SystemCode.SYSTEM_FORM_COUNT.getText()); |
| | | } |
| | |
| | | * @Description: 保存加班申请 |
| | | */ |
| | | @RequestMapping(value = "/save-overtime/{version}", method = RequestMethod.POST) |
| | | @ApiVersion(1) |
| | | public String saveWorkOvertime(HttpServletRequest request) { |
| | | try { |
| | | //获取参数 |
| | | FieldSetEntity fse=null; |
| | | Object bean=request.getAttribute(CoreConst.API_POST_REQUEST_DATA); |
| | | if(bean != null){ |
| | | RequestParameterEntity reqp=(RequestParameterEntity)bean; |
| | | fse = reqp.getFormData(); |
| | | } |
| | | //判断参数是否为空 |
| | | if(bean == null || fse == null) { |
| | | SpringMVCContextHolder.getSystemLogger().error(SystemCode.SYSTEM_TABLE_NODATA.getValue(), SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | return this.error(SystemCode.SYSTEM_FORM_NODATA.getValue(), SystemCode.SYSTEM_FORM_NODATA.getText()); |
| | | } |
| | | //判断表名是否正常 |
| | | if (!CmnConst.PRODUCT_SYS_WORK_OVERTIME.equals(fse.getTableName())) { |
| | | SpringMVCContextHolder.getSystemLogger().error(SystemCode.SYSTEM_TABLE_NODATA.getValue(), SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | return this.error(SystemCode.SYSTEM_TABLE_NODATA.getValue(), SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | } |
| | | String uuid = workOvertimeService.saveWorkOvertime(fse); |
| | | if (!StringUtils.isEmpty(uuid)) { |
| | | return OK_Add(uuid); |
| | | FieldSetEntity fse = BaseUtil.getFieldSetEntity(request, CmnConst.PRODUCT_OA_WORK_OVERTIME); |
| | | if (workOvertimeService.saveWorkOvertime(fse)) { |
| | | return OK(); |
| | | } |
| | | SpringMVCContextHolder.getSystemLogger().error(SystemCode.SYSTEM_SAVE_WORK_OVERTIME_FAIL.getValue(), SystemCode.SYSTEM_SAVE_WORK_OVERTIME_FAIL.getText()); |
| | | return error(SystemCode.SYSTEM_SAVE_WORK_OVERTIME_FAIL.getValue(), SystemCode.SYSTEM_SAVE_WORK_OVERTIME_FAIL.getText()); |
| | |
| | | public String deleteWorkOvertime(HttpServletRequest request) { |
| | | try { |
| | | //获取参数 |
| | | FieldSetEntity fse=null; |
| | | Object bean=request.getAttribute(CoreConst.API_POST_REQUEST_DATA); |
| | | if(bean != null) { |
| | | RequestParameterEntity reqp=(RequestParameterEntity)bean; |
| | | fse = reqp.getFormData(); |
| | | } |
| | | //判断参数是否为空 |
| | | if(bean == null || fse == null) { |
| | | SpringMVCContextHolder.getSystemLogger().error(SystemCode.SYSTEM_FORM_NODATA.getValue(), SystemCode.SYSTEM_FORM_NODATA.getText()); |
| | | return this.error(SystemCode.SYSTEM_FORM_NODATA.getValue(), SystemCode.SYSTEM_FORM_NODATA.getText()); |
| | | } |
| | | //判断表名是否正常 |
| | | if (!CmnConst.PRODUCT_SYS_WORK_OVERTIME.equals(fse.getTableName())) { |
| | | SpringMVCContextHolder.getSystemLogger().error(SystemCode.SYSTEM_TABLE_NODATA.getValue(), SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | return this.error(SystemCode.SYSTEM_TABLE_NODATA.getValue(), SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | } |
| | | FieldSetEntity fse = BaseUtil.getFieldSetEntity(request, CmnConst.PRODUCT_OA_WORK_OVERTIME); |
| | | //判断uuid是否为空 |
| | | if (com.alibaba.druid.util.StringUtils.isEmpty(fse.getString("uuid"))) { |
| | | if (BaseUtil.strIsNull(fse.getUUID())) { |
| | | SpringMVCContextHolder.getSystemLogger().error(SystemCode.SYSTEM_FORM_COUNT.getValue(), SystemCode.SYSTEM_FORM_COUNT.getText()); |
| | | return this.error(SystemCode.SYSTEM_FORM_COUNT.getValue(), SystemCode.SYSTEM_FORM_COUNT.getText()); |
| | | } |
| | |
| | | */ |
| | | public DataTableEntity listCustomerInfo(Integer cpage,Integer pageSize,FieldSetEntity fse) { |
| | | //数据权限 |
| | | // String dataFilter=permissionService.getDataFilter(CmnConst.CREATED_BY) ; |
| | | String dataFilter=permissionService.getDataFilter(CmnConst.CREATED_BY); |
| | | //高级查询 |
| | | String searchFilter=queryFilterService.getQueryFilter(fse); |
| | | StringBuilder sbSql = new StringBuilder(); |
| | | sbSql.append("SELECT \n"); |
| | | sbSql.append(" A.uuid,A.customer_name, A.customer_manager, A.customer_manager_leader,A.business_agent, \n"); |
| | | sbSql.append(" CONCAT(B.linkman, '-', B.mobile) AS customer_contact \n"); |
| | | sbSql.append("FROM product_project_customer A \n"); |
| | | sbSql.append("LEFT JOIN product_project_customer_sub B ON B.customer_uuid = A.uuid \n"); |
| | | // StringBuilder sbSql = new StringBuilder(); |
| | | // sbSql.append("SELECT \n"); |
| | | // sbSql.append(" A.uuid,A.customer_name, A.customer_manager, A.customer_manager_leader,A.business_agent, \n"); |
| | | // sbSql.append(" CONCAT(B.linkman, '-', B.mobile) AS customer_contact \n"); |
| | | // sbSql.append("FROM product_project_customer A \n"); |
| | | // sbSql.append("LEFT JOIN product_project_customer_sub B ON B.customer_uuid = A.uuid \n"); |
| | | // if (!BaseUtil.strIsNull(searchFilter)) { |
| | | // sbSql.append("WHERE ").append(searchFilter); |
| | | // } |
| | | |
| | | if(!BaseUtil.strIsNull(dataFilter)) { |
| | | if (!BaseUtil.strIsNull(searchFilter)) { |
| | | sbSql.append("WHERE ").append(searchFilter); |
| | | dataFilter+=" AND "+ searchFilter; |
| | | } |
| | | }else { |
| | | if (!BaseUtil.strIsNull(searchFilter)) { |
| | | dataFilter=searchFilter; |
| | | } |
| | | } |
| | | |
| | | // if(!StringUtils.isEmpty(dataFilter)) { |
| | | // if (!StringUtils.isEmpty(searchFilter)) { |
| | | // dataFilter+=" AND "+ searchFilter; |
| | | // } |
| | | // }else { |
| | | // if (!StringUtils.isEmpty(searchFilter)) { |
| | | // dataFilter=searchFilter; |
| | | // } |
| | | // } |
| | | |
| | | // DataTableEntity dt=baseDao.listTable(CmnConst.product_project_CUSTOMER, searchFilter, null, null, null, pageSize, cpage); |
| | | DataTableEntity dt = baseDao.listTable(sbSql.toString(), new Object[] {}, pageSize, cpage); |
| | | DataTableEntity dt=baseDao.listTable(CmnConst.PRODUCT_PROJECT_CUSTOMER, searchFilter, null, null, null, pageSize, cpage); |
| | | // DataTableEntity dt = baseDao.listTable(sbSql.toString(), new Object[] {}, pageSize, cpage); |
| | | baseDao.loadPromptData(dt); |
| | | return dt; |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | public FieldSetEntity findCustomerInfo(String uuid) { |
| | | FieldSetEntity fieldSetEntity = baseDao.getFieldSetEntity(CmnConst.product_project_CUSTOMER, uuid, true); |
| | | FieldSetEntity fieldSetEntity = baseDao.getFieldSetEntity(CmnConst.PRODUCT_PROJECT_CUSTOMER, uuid, true); |
| | | FieldSetEntity fse = this.findCustomerValue(uuid); |
| | | fieldSetEntity.setValue("money", fse.getString("money")); |
| | | fieldSetEntity.setValue("returnedMoney", fse.getString("returnedMoney")); |
| | |
| | | */ |
| | | public FieldSetEntity contractProjectMakeMoney(String uuid) { |
| | | FieldSetEntity fieldSet = new FieldSetEntity(); |
| | | fieldSet.setTableName(CmnConst.product_project_CUSTOMER); |
| | | fieldSet.setTableName(CmnConst.PRODUCT_PROJECT_CUSTOMER); |
| | | //合同表 product_project_contract_info owner |
| | | DataTableEntity contractData = baseDao.listTable("product_project_contract_info"," owner = ? and flow_flag = 2 ",new Object[]{uuid}); |
| | | baseDao.loadPromptData(contractData); |
| | |
| | | */ |
| | | public FieldSetEntity findCustomerValue(String uuid) { |
| | | FieldSetEntity fieldSetEntity = new FieldSetEntity(); |
| | | fieldSetEntity.setTableName(CmnConst.product_project_CUSTOMER); |
| | | fieldSetEntity.setTableName(CmnConst.PRODUCT_PROJECT_CUSTOMER); |
| | | //查询合同金额 |
| | | StringBuffer moneySql = new StringBuffer(); |
| | | moneySql.append(" SELECT IFNULL(SUM(d.money),0) money FROM ( ") |
| | |
| | | @Transactional |
| | | public boolean deleteCustomerInfo(String uuid) throws BaseException{ |
| | | String[] uuids = uuid.split(","); |
| | | return baseDao.delete(CmnConst.product_project_CUSTOMER, BaseUtil.buildQuestionMarkFilter(CmnConst.UUID, uuids.length, true), uuids); |
| | | return baseDao.delete(CmnConst.PRODUCT_PROJECT_CUSTOMER, BaseUtil.buildQuestionMarkFilter(CmnConst.UUID, uuids.length, true), uuids); |
| | | } |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | public DataTableEntity listCustomerSatisfaction(FieldSetEntity fse) { |
| | | return baseDao.listTable(CmnConst.product_project_CUSTOMER_SATISFACTION, null, null, null, null, fse.getInteger(CmnConst.PAGESIZE), fse.getInteger(CmnConst.CPAGE)); |
| | | return baseDao.listTable(CmnConst.PRODUCT_PROJECT_CUSTOMER_SATISFACTION, null, null, null, null, fse.getInteger(CmnConst.PAGESIZE), fse.getInteger(CmnConst.CPAGE)); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | public FieldSetEntity findCustomerSatisfaction(String uuid) { |
| | | return baseDao.getFieldSetEntity(CmnConst.product_project_CUSTOMER_SATISFACTION, uuid, true); |
| | | return baseDao.getFieldSetEntity(CmnConst.PRODUCT_PROJECT_CUSTOMER_SATISFACTION, uuid, true); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Transactional |
| | | public boolean deleteCustomerSatisfaction(String uuid) { |
| | | return baseDao.delete(CmnConst.product_project_CUSTOMER_SATISFACTION, "uuid=?", new Object[] {uuid}); |
| | | return baseDao.delete(CmnConst.PRODUCT_PROJECT_CUSTOMER_SATISFACTION, "uuid=?", new Object[] {uuid}); |
| | | } |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | public DataTableEntity listVisitRecord(FieldSetEntity fse) { |
| | | DataTableEntity dt=baseDao.listTable(CmnConst.product_project_CUSTOMER_VISIT_RECORD, null, null, null, null, fse.getInteger(CmnConst.PAGESIZE), fse.getInteger(CmnConst.CPAGE)); |
| | | DataTableEntity dt=baseDao.listTable(CmnConst.PRODUCT_PROJECT_CUSTOMER_VISIT_RECORD, null, null, null, null, fse.getInteger(CmnConst.PAGESIZE), fse.getInteger(CmnConst.CPAGE)); |
| | | baseDao.loadPromptData(dt); |
| | | return dt; |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | public FieldSetEntity findVisitRecord(String uuid) { |
| | | return baseDao.getFieldSetEntity(CmnConst.product_project_CUSTOMER_VISIT_RECORD, uuid, false); |
| | | return baseDao.getFieldSetEntity(CmnConst.PRODUCT_PROJECT_CUSTOMER_VISIT_RECORD, uuid, false); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | public boolean deleteVisitRecord(String uuid) { |
| | | return baseDao.delete(CmnConst.product_project_CUSTOMER_VISIT_RECORD, "uuid=?", new Object[] {uuid}); |
| | | return baseDao.delete(CmnConst.PRODUCT_PROJECT_CUSTOMER_VISIT_RECORD, "uuid=?", new Object[] {uuid}); |
| | | } |
| | | } |
| | |
| | | package com.product.administration.service; |
| | | |
| | | import com.product.administration.config.CmnConst; |
| | | import com.product.administration.config.SystemCode; |
| | | import com.product.common.lang.StringUtils; |
| | | import com.product.core.dao.BaseDao; |
| | | import com.product.core.entity.DataTableEntity; |
| | |
| | | if(!StringUtils.isEmpty(dataFilter)){ |
| | | filter += " and "+dataFilter; |
| | | } |
| | | DataTableEntity dt = baseDao.listTable(CmnConst.PRODUCT_SYS_WORK_OVERTIME,filter,param,null,null,fs.getInteger(CmnConst.PAGESIZE),fs.getInteger(CmnConst.CPAGE)); |
| | | DataTableEntity dt = baseDao.listTable(CmnConst.PRODUCT_OA_WORK_OVERTIME,filter,param,null,null,fs.getInteger(CmnConst.PAGESIZE),fs.getInteger(CmnConst.CPAGE)); |
| | | baseDao.loadPromptData(dt); |
| | | return dt; |
| | | } |
| | |
| | | * @Description: 加班申请详情 |
| | | */ |
| | | public FieldSetEntity getWorkOvertimeInfo(FieldSetEntity fs) throws BaseException { |
| | | return baseDao.listInternationDataTable(baseDao.getFieldSetEntity(CmnConst.PRODUCT_SYS_WORK_OVERTIME, fs.getString(CmnConst.UUID), true),null); |
| | | return baseDao.listInternationDataTable(baseDao.getFieldSetEntity(CmnConst.PRODUCT_OA_WORK_OVERTIME, fs.getString(CmnConst.UUID), true),null); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @Author: ZhouJie |
| | | * @Description: 保存加班申请(新增、修改) |
| | | */ |
| | | public String saveWorkOvertime(FieldSetEntity fs) throws BaseException { |
| | | if(StringUtils.isEmpty(fs.getString(CmnConst.UUID))){ |
| | | fs.setValue("created_by",SpringMVCContextHolder.getCurrentUser().getUser_id()); |
| | | fs.setValue("created_utc_datetime",new Date()); |
| | | return baseDao.add(fs); |
| | | public boolean saveWorkOvertime(FieldSetEntity fse) throws BaseException { |
| | | BaseUtil.createCreatorAndCreationTime(fse); |
| | | FieldSetEntity fseRepeatData = null; |
| | | if(StringUtils.isEmpty(fse.getUUID())){ |
| | | fseRepeatData = baseDao.getFieldSetEntityByFilter(CmnConst.PRODUCT_OA_WORK_OVERTIME, "user_id = ? AND month = ?", new Object[] {fse.getString("user_id"), fse.getString("month")}, false); |
| | | }else { |
| | | fs.setValue("updated_by",SpringMVCContextHolder.getCurrentUser().getUser_id()); |
| | | fs.setValue("updated_utc_datetime",new Date()); |
| | | baseDao.update(fs); |
| | | return fs.getString(CmnConst.UUID); |
| | | fseRepeatData = baseDao.getFieldSetEntityByFilter(CmnConst.PRODUCT_OA_WORK_OVERTIME, "user_id = ? AND month = ? AND uuid != ?", new Object[] {fse.getString("user_id"), fse.getString("month"), fse.getUUID()}, false); |
| | | } |
| | | if (fseRepeatData != null) { |
| | | throw new BaseException(SystemCode.SYSTEM_SAVE_FAIL_DATA_READY_EXIST.getValue(), SystemCode.SYSTEM_SAVE_FAIL_DATA_READY_EXIST.getText()); |
| | | } |
| | | return baseDao.saveFieldSetEntity(fse); |
| | | } |
| | | |
| | | /** |
| | |
| | | public boolean deleteWorkOvertime(FieldSetEntity fs) throws BaseException { |
| | | String uuid = fs.getUUID(); |
| | | String[] uuids = uuid.split(","); |
| | | return baseDao.delete(CmnConst.PRODUCT_SYS_WORK_OVERTIME, BaseUtil.buildQuestionMarkFilter(CmnConst.UUID, uuids.length, true), uuids); |
| | | return baseDao.delete(CmnConst.PRODUCT_OA_WORK_OVERTIME, BaseUtil.buildQuestionMarkFilter(CmnConst.UUID, uuids.length, true), uuids); |
| | | } |
| | | } |