diff --git a/Yangcai365_design/.classpath b/Yangcai365_design/.classpath new file mode 100644 index 0000000..cc9216a --- /dev/null +++ b/Yangcai365_design/.classpath @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Yangcai365_design/.project b/Yangcai365_design/.project new file mode 100644 index 0000000..bbf8476 --- /dev/null +++ b/Yangcai365_design/.project @@ -0,0 +1,17 @@ + + + Yangcai365_design + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/Yangcai365_design/.settings/org.eclipse.core.resources.prefs b/Yangcai365_design/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/Yangcai365_design/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/Yangcai365_design/.settings/org.eclipse.jdt.core.prefs b/Yangcai365_design/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..e280037 --- /dev/null +++ b/Yangcai365_design/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,365 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false +org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns=false +org.eclipse.jdt.core.formatter.align_with_spaces=false +org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression_chain=0 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0 +org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_module_statements=16 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16 +org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_relational_operator=0 +org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_shift_operator=0 +org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0 +org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0 +org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=next_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=next_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=next_line +org.eclipse.jdt.core.formatter.brace_position_for_block=next_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=next_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=next_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=next_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=next_line +org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=next_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=next_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=next_line +org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped=false +org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position=false +org.eclipse.jdt.core.formatter.comment.format_block_comments=true +org.eclipse.jdt.core.formatter.comment.format_header=false +org.eclipse.jdt.core.formatter.comment.format_html=true +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true +org.eclipse.jdt.core.formatter.comment.format_line_comments=true +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true +org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.indent_tag_description=false +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert +org.eclipse.jdt.core.formatter.comment.line_length=100 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert +org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.join_lines_in_comments=false +org.eclipse.jdt.core.formatter.join_wrapped_lines=true +org.eclipse.jdt.core.formatter.keep_annotation_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_anonymous_type_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_code_block_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=true +org.eclipse.jdt.core.formatter.keep_enum_constant_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_enum_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_if_then_body_block_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_lambda_body_block_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_loop_body_block_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_method_body_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_simple_do_while_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_simple_getter_setter_on_one_line=false +org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_type_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.lineSplit=160 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.jdt.core.formatter.tabulation.char=space +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.use_on_off_tags=false +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true +org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false +org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true +org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true +org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true +org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_before_relational_operator=true +org.eclipse.jdt.core.formatter.wrap_before_shift_operator=true +org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true diff --git a/Yangcai365_design/.settings/org.eclipse.jdt.ui.prefs b/Yangcai365_design/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 0000000..088fb1f --- /dev/null +++ b/Yangcai365_design/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,56 @@ +eclipse.preferences.version=1 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true +formatter_profile=_Yangcai +formatter_settings_version=16 +sp_cleanup.add_default_serial_version_id=true +sp_cleanup.add_generated_serial_version_id=false +sp_cleanup.add_missing_annotations=true +sp_cleanup.add_missing_deprecated_annotations=true +sp_cleanup.add_missing_methods=false +sp_cleanup.add_missing_nls_tags=false +sp_cleanup.add_missing_override_annotations=true +sp_cleanup.add_missing_override_annotations_interface_methods=true +sp_cleanup.add_serial_version_id=false +sp_cleanup.always_use_blocks=true +sp_cleanup.always_use_parentheses_in_expressions=false +sp_cleanup.always_use_this_for_non_static_field_access=false +sp_cleanup.always_use_this_for_non_static_method_access=false +sp_cleanup.convert_to_enhanced_for_loop=false +sp_cleanup.correct_indentation=false +sp_cleanup.format_source_code=true +sp_cleanup.format_source_code_changes_only=false +sp_cleanup.make_local_variable_final=false +sp_cleanup.make_parameters_final=false +sp_cleanup.make_private_fields_final=false +sp_cleanup.make_type_abstract_if_missing_method=false +sp_cleanup.make_variable_declarations_final=false +sp_cleanup.never_use_blocks=false +sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.organize_imports=true +sp_cleanup.qualify_static_field_accesses_with_declaring_class=false +sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_with_declaring_class=false +sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.remove_private_constructors=true +sp_cleanup.remove_trailing_whitespaces=false +sp_cleanup.remove_trailing_whitespaces_all=true +sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_casts=true +sp_cleanup.remove_unnecessary_nls_tags=false +sp_cleanup.remove_unused_imports=true +sp_cleanup.remove_unused_local_variables=false +sp_cleanup.remove_unused_private_fields=true +sp_cleanup.remove_unused_private_members=false +sp_cleanup.remove_unused_private_methods=true +sp_cleanup.remove_unused_private_types=true +sp_cleanup.sort_members=false +sp_cleanup.sort_members_all=false +sp_cleanup.use_blocks=true +sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_parentheses_in_expressions=false +sp_cleanup.use_this_for_non_static_field_access=false +sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true +sp_cleanup.use_this_for_non_static_method_access=false +sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true diff --git a/Yangcai365_design/.zmlignore b/Yangcai365_design/.zmlignore new file mode 100644 index 0000000..e69de29 diff --git a/Yangcai365_design/conf/httpd.xml b/Yangcai365_design/conf/httpd.xml new file mode 100644 index 0000000..5365279 --- /dev/null +++ b/Yangcai365_design/conf/httpd.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Yangcai365_design/conf/logging.xml b/Yangcai365_design/conf/logging.xml new file mode 100644 index 0000000..c416096 --- /dev/null +++ b/Yangcai365_design/conf/logging.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Yangcai365_design/conf/zhiqim.xml b/Yangcai365_design/conf/zhiqim.xml new file mode 100644 index 0000000..cffcaef --- /dev/null +++ b/Yangcai365_design/conf/zhiqim.xml @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/DesKeyword.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/DesKeyword.java new file mode 100644 index 0000000..3af8e72 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/DesKeyword.java @@ -0,0 +1,104 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 关键词表 对应表《DES_KEYWORD》 + */ +@AnAlias("DesKeyword") +@AnNew +@AnTable(table="DES_KEYWORD", key="KEYWORD_ID", type="InnoDB") +public class DesKeyword implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column="CAT_ID", type="long", notNull=false) private long catId; //1.关键词分类ID + @AnTableField(column="KEYWORD_ID", type="long", notNull=true) private long keywordId; //2.关键词ID + @AnTableField(column="KEYWORD_NAME", type="string,5000", notNull=true) private String keywordName; //3.关键字名称 + @AnTableField(column="KEYWORD_TYPE", type="int", notNull=true) private int keywordType; //4.关键字类型 0:系统, 1:个人 + @AnTableField(column="OPERATOR_CODE", type="string,64", notNull=false) private String operatorCode; //5.操作人 + @AnTableField(column="CREATE_TIME", type="datetime", notNull=true) private Timestamp createTime; //6.创建时间 + + public String toString() + { + return Jsons.toString(this); + } + + public long getCatId() + { + return catId; + } + + public void setCatId(long catId) + { + this.catId = catId; + } + + public long getKeywordId() + { + return keywordId; + } + + public void setKeywordId(long keywordId) + { + this.keywordId = keywordId; + } + + public String getKeywordName() + { + return keywordName; + } + + public void setKeywordName(String keywordName) + { + this.keywordName = keywordName; + } + + public int getKeywordType() + { + return keywordType; + } + + public void setKeywordType(int keywordType) + { + this.keywordType = keywordType; + } + + public String getOperatorCode() + { + return operatorCode; + } + + public void setOperatorCode(String operatorCode) + { + this.operatorCode = operatorCode; + } + + public Timestamp getCreateTime() + { + return createTime; + } + + public void setCreateTime(Timestamp createTime) + { + this.createTime = createTime; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/DesKeywordCat.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/DesKeywordCat.java new file mode 100644 index 0000000..7ce7f68 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/DesKeywordCat.java @@ -0,0 +1,71 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 关键词分类 对应表《DES_KEYWORD_CAT》 + */ +@AnAlias("DesKeywordCat") +@AnNew +@AnTable(table="DES_KEYWORD_CAT", key="CAT_ID", type="InnoDB") +public class DesKeywordCat implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column="CAT_ID", type="long", notNull=true) private long catId; //1.关键词分类ID + @AnTableField(column="CAT_NAME", type="string,64", notNull=true) private String catName; //2.关键词分类名称 + @AnTableField(column="CREATE_TIME", type="datetime", notNull=true) private Timestamp createTime; //3.创建时间 + + public String toString() + { + return Jsons.toString(this); + } + + public long getCatId() + { + return catId; + } + + public void setCatId(long catId) + { + this.catId = catId; + } + + public String getCatName() + { + return catName; + } + + public void setCatName(String catName) + { + this.catName = catName; + } + + public Timestamp getCreateTime() + { + return createTime; + } + + public void setCreateTime(Timestamp createTime) + { + this.createTime = createTime; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/DesKeywordLog.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/DesKeywordLog.java new file mode 100644 index 0000000..2548b76 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/DesKeywordLog.java @@ -0,0 +1,82 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 关键词搜索日志表 对应表《DES_KEYWORD_LOG》 + */ +@AnAlias("DesKeywordLog") +@AnNew +@AnTable(table="DES_KEYWORD_LOG", key="LOG_ID", type="InnoDB") +public class DesKeywordLog implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column="LOG_ID", type="long", notNull=true) private long logId; //1.日志ID + @AnTableField(column="KEYWORD_NAME", type="string,64", notNull=true) private String keywordName; //2.关键字名称 + @AnTableField(column="SEARCH_COUNT", type="int", notNull=true) private int searchCount; //3.搜索量 + @AnTableField(column="CREATE_TIME", type="datetime", notNull=true) private Timestamp createTime; //4.创建时间 + + public String toString() + { + return Jsons.toString(this); + } + + public long getLogId() + { + return logId; + } + + public void setLogId(long logId) + { + this.logId = logId; + } + + public String getKeywordName() + { + return keywordName; + } + + public void setKeywordName(String keywordName) + { + this.keywordName = keywordName; + } + + public int getSearchCount() + { + return searchCount; + } + + public void setSearchCount(int searchCount) + { + this.searchCount = searchCount; + } + + public Timestamp getCreateTime() + { + return createTime; + } + + public void setCreateTime(Timestamp createTime) + { + this.createTime = createTime; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/DesLabelAttribute.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/DesLabelAttribute.java new file mode 100644 index 0000000..1ef4964 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/DesLabelAttribute.java @@ -0,0 +1,93 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 标签属性表 对应表《DES_LABEL_ATTRIBUTE》 + */ +@AnAlias("DesLabelAttribute") +@AnNew +@AnTable(table="DES_LABEL_ATTRIBUTE", key="ATTRIBUTE_ID", type="InnoDB") +public class DesLabelAttribute implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column="ATTRIBUTE_ID", type="long", notNull=true) private long attributeId; //1.属性ID + @AnTableField(column="ATTRIBUTE_CAT_ID", type="long", notNull=true) private long attributeCatId; //2.属性分类ID + @AnTableField(column="INDUSTRY_ID", type="long", notNull=true) private long industryId; //3.行业ID + @AnTableField(column="ATTRIBUTE_NAME", type="string,5000", notNull=true) private String attributeName; //4.属性名称 + @AnTableField(column="CREATE_TIME", type="datetime", notNull=true) private Timestamp createTime; //5.创建时间 + + public String toString() + { + return Jsons.toString(this); + } + + public long getAttributeId() + { + return attributeId; + } + + public void setAttributeId(long attributeId) + { + this.attributeId = attributeId; + } + + public long getAttributeCatId() + { + return attributeCatId; + } + + public void setAttributeCatId(long attributeCatId) + { + this.attributeCatId = attributeCatId; + } + + public long getIndustryId() + { + return industryId; + } + + public void setIndustryId(long industryId) + { + this.industryId = industryId; + } + + public String getAttributeName() + { + return attributeName; + } + + public void setAttributeName(String attributeName) + { + this.attributeName = attributeName; + } + + public Timestamp getCreateTime() + { + return createTime; + } + + public void setCreateTime(Timestamp createTime) + { + this.createTime = createTime; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/DesLabelAttributeCat.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/DesLabelAttributeCat.java new file mode 100644 index 0000000..0be3e38 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/DesLabelAttributeCat.java @@ -0,0 +1,82 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 标签属性分类表 对应表《DES_LABEL_ATTRIBUTE_CAT》 + */ +@AnAlias("DesLabelAttributeCat") +@AnNew +@AnTable(table="DES_LABEL_ATTRIBUTE_CAT", key="ATTRIBUTE_CAT_ID", type="InnoDB") +public class DesLabelAttributeCat implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column="ATTRIBUTE_CAT_ID", type="long", notNull=true) private long attributeCatId; //1.属性分类ID + @AnTableField(column="INDUSTRY_ID", type="long", notNull=true) private long industryId; //2.行业ID + @AnTableField(column="ATTRIBUTE_CAT_NAME", type="string,64", notNull=true) private String attributeCatName; //3.属性分类名称 + @AnTableField(column="CREATE_TIME", type="datetime", notNull=true) private Timestamp createTime; //4.创建时间 + + public String toString() + { + return Jsons.toString(this); + } + + public long getAttributeCatId() + { + return attributeCatId; + } + + public void setAttributeCatId(long attributeCatId) + { + this.attributeCatId = attributeCatId; + } + + public long getIndustryId() + { + return industryId; + } + + public void setIndustryId(long industryId) + { + this.industryId = industryId; + } + + public String getAttributeCatName() + { + return attributeCatName; + } + + public void setAttributeCatName(String attributeCatName) + { + this.attributeCatName = attributeCatName; + } + + public Timestamp getCreateTime() + { + return createTime; + } + + public void setCreateTime(Timestamp createTime) + { + this.createTime = createTime; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/DesLabelIndustry.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/DesLabelIndustry.java new file mode 100644 index 0000000..8a2e0a7 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/DesLabelIndustry.java @@ -0,0 +1,86 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 标签行业表 对应表《DES_LABEL_INDUSTRY》 + */ +@AnAlias("DesLabelIndustry") +@AnNew +@AnTable(table = "DES_LABEL_INDUSTRY", key = "INDUSTRY_SUB_ID", type = "InnoDB") +public class DesLabelIndustry implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "INDUSTRY_ID", type = "long", notNull = true) + private long industryId; // 1.行业ID + @AnTableField(column = "INDUSTRY_SUB_ID", type = "long", notNull = true) + private long industrySubId; // 2.子行业ID + @AnTableField(column = "INDUSTRY_SUB_NAME", type = "string,64", notNull = true) + private String industrySubName; // 3.子行业名称 + @AnTableField(column = "CREATE_TIME", type = "datetime", notNull = true) + private Timestamp createTime; // 4.创建时间 + + public String toString() + { + return Jsons.toString(this); + } + + public long getIndustryId() + { + return industryId; + } + + public void setIndustryId(long industryId) + { + this.industryId = industryId; + } + + public long getIndustrySubId() + { + return industrySubId; + } + + public void setIndustrySubId(long industrySubId) + { + this.industrySubId = industrySubId; + } + + public String getIndustrySubName() + { + return industrySubName; + } + + public void setIndustrySubName(String industrySubName) + { + this.industrySubName = industrySubName; + } + + public Timestamp getCreateTime() + { + return createTime; + } + + public void setCreateTime(Timestamp createTime) + { + this.createTime = createTime; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/YqArticle.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/YqArticle.java new file mode 100644 index 0000000..f0e9424 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/YqArticle.java @@ -0,0 +1,115 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 文章详情表 对应表《YQ_ARTICLE》 + */ +@AnAlias("YqArticle") +@AnNew +@AnTable(table="YQ_ARTICLE", key="ARTICLE_ID", type="InnoDB") +public class YqArticle implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column="CATEGORY_ID", type="long", notNull=true) private long categoryId; //1.文章所属分类ID + @AnTableField(column="ARTICLE_ID", type="long", notNull=true) private long articleId; //2.文章ID + @AnTableField(column="ARTICLE_NUMBER", type="int", notNull=true) private int articleNumber; //3.文章点击次数 + @AnTableField(column="ARTICLE_TITLE", type="string,64", notNull=true) private String articleTitle; //4.文章标题 + @AnTableField(column="ARTICLE_STATUS", type="byte", notNull=true) private int articleStatus; //5.文章状态,0表示正常,1表示停用 + @AnTableField(column="ARTICLE_TIME", type="datetime", notNull=true) private Timestamp articleTime; //6.文章发布时间 + @AnTableField(column="ARTICLE_CONTENT", type="string,50000", notNull=true) private String articleContent; //7.文章内容 + + public String toString() + { + return Jsons.toString(this); + } + + public long getCategoryId() + { + return categoryId; + } + + public void setCategoryId(long categoryId) + { + this.categoryId = categoryId; + } + + public long getArticleId() + { + return articleId; + } + + public void setArticleId(long articleId) + { + this.articleId = articleId; + } + + public int getArticleNumber() + { + return articleNumber; + } + + public void setArticleNumber(int articleNumber) + { + this.articleNumber = articleNumber; + } + + public String getArticleTitle() + { + return articleTitle; + } + + public void setArticleTitle(String articleTitle) + { + this.articleTitle = articleTitle; + } + + public int getArticleStatus() + { + return articleStatus; + } + + public void setArticleStatus(int articleStatus) + { + this.articleStatus = articleStatus; + } + + public Timestamp getArticleTime() + { + return articleTime; + } + + public void setArticleTime(Timestamp articleTime) + { + this.articleTime = articleTime; + } + + public String getArticleContent() + { + return articleContent; + } + + public void setArticleContent(String articleContent) + { + this.articleContent = articleContent; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/YqArticleEx.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/YqArticleEx.java new file mode 100644 index 0000000..d838657 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/YqArticleEx.java @@ -0,0 +1,55 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnView; +import org.zhiqim.orm.annotation.AnViewField; +import org.zhiqim.orm.annotation.AnViewJoin; +import org.zhiqim.orm.annotation.AnViewJoinValue; + +/** + * 文章详情扩展视图 对应视图《YQ_ARTICLE_EX》 + */ +@AnAlias("YqArticleEx") +@AnNew +@AnView("YQ_ARTICLE,YQ_CATEGORY") +@AnViewJoin( +{ + @AnViewJoinValue(type = "EQUAL", lTable = "YQ_ARTICLE", lColumn = "CATEGORY_ID", rTable = "YQ_CATEGORY", rColumn = "CATEGORY_ID") +}) +public class YqArticleEx extends YqArticle +{ + private static final long serialVersionUID = 1L; + + @AnViewField(table = "YQ_CATEGORY", column = "CATEGORY_NAME") + private String categoryName; // 1.分类名称 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public String getCategoryName() + { + return categoryName; + } + + public void setCategoryName(String categoryName) + { + this.categoryName = categoryName; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/YqCategory.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/YqCategory.java new file mode 100644 index 0000000..49793c0 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/YqCategory.java @@ -0,0 +1,103 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo; + +import java.io.Serializable; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 文章分类表 对应表《YQ_CATEGORY》 + */ +@AnAlias("YqCategory") +@AnNew +@AnTable(table="YQ_CATEGORY", key="CATEGORY_ID", type="InnoDB") +public class YqCategory implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column="PARENT_ID", type="long", notNull=true) private long parentId; //1.分类父级ID + @AnTableField(column="CATEGORY_ID", type="long", notNull=true) private long categoryId; //2.分类ID + @AnTableField(column="CATEGORY_NAME", type="string,64", notNull=true) private String categoryName; //3.分类名称 + @AnTableField(column="CATEGORY_LEVEL", type="int", notNull=true) private int categoryLevel; //4.分类级别 + @AnTableField(column="CATEGORY_STATUS", type="byte", notNull=true) private int categoryStatus; //5.分类状态,0表示正常,1表示停用 + @AnTableField(column="CATEGORY_SEQ", type="int", notNull=true) private int categorySeq; //6.分类排序编号 + + public String toString() + { + return Jsons.toString(this); + } + + public long getParentId() + { + return parentId; + } + + public void setParentId(long parentId) + { + this.parentId = parentId; + } + + public long getCategoryId() + { + return categoryId; + } + + public void setCategoryId(long categoryId) + { + this.categoryId = categoryId; + } + + public String getCategoryName() + { + return categoryName; + } + + public void setCategoryName(String categoryName) + { + this.categoryName = categoryName; + } + + public int getCategoryLevel() + { + return categoryLevel; + } + + public void setCategoryLevel(int categoryLevel) + { + this.categoryLevel = categoryLevel; + } + + public int getCategoryStatus() + { + return categoryStatus; + } + + public void setCategoryStatus(int categoryStatus) + { + this.categoryStatus = categoryStatus; + } + + public int getCategorySeq() + { + return categorySeq; + } + + public void setCategorySeq(int categorySeq) + { + this.categorySeq = categorySeq; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/account/VirtualAccount.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/account/VirtualAccount.java new file mode 100644 index 0000000..03006bb --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/account/VirtualAccount.java @@ -0,0 +1,102 @@ +package com.zhiqim.yangcai.design.dbo.account; + +import java.io.Serializable; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 设计师虚拟账户 对应表《virtual_account》 + * + * @version 1.0 @author hc 2021年6月17日 新建与整理 + */ +@AnAlias("VirtualAccount") +@AnNew +@AnTable(table = "virtual_account", key = "operator_code", type = "InnoDB") +public class VirtualAccount implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "operator_code", type = "string,32", notNull = true) + private String operatorCode; // 1.账户名 + @AnTableField(column = "operator_status", type = "int", notNull = true) + private int operatorStatus; // 2.账户状态 + @AnTableField(column = "usable_money", type = "long", notNull = true) + private long usableMoney; // 3.账户可用余额 + @AnTableField(column = "freeze_money", type = "long", notNull = true) + private long freezeMoney; // 4.账户冻结金额 + @AnTableField(column = "sum_money", type = "long", notNull = true) + private long sumMoney; // 5.总金额 (可用余额+冻结余额) + @AnTableField(column = "remark", type = "string,50", notNull = false) + private String remark; // 6.备注 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public String getOperatorCode() + { + return operatorCode; + } + + public void setOperatorCode(String operatorCode) + { + this.operatorCode = operatorCode; + } + + public int getOperatorStatus() + { + return operatorStatus; + } + + public void setOperatorStatus(int operatorStatus) + { + this.operatorStatus = operatorStatus; + } + + public long getUsableMoney() + { + return usableMoney; + } + + public void setUsableMoney(long usableMoney) + { + this.usableMoney = usableMoney; + } + + public long getFreezeMoney() + { + return freezeMoney; + } + + public void setFreezeMoney(long freezeMoney) + { + this.freezeMoney = freezeMoney; + } + + public long getSumMoney() + { + return sumMoney; + } + + public void setSumMoney(long sumMoney) + { + this.sumMoney = sumMoney; + } + + public String getRemark() + { + return remark; + } + + public void setRemark(String remark) + { + this.remark = remark; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/account/VirtualAccountDetails.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/account/VirtualAccountDetails.java new file mode 100644 index 0000000..f8ba8a0 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/account/VirtualAccountDetails.java @@ -0,0 +1,187 @@ +package com.zhiqim.yangcai.design.dbo.account; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 设计师虚拟账户明细 对应表《virtual_account_details》 + * + * @version 1.0 @author hc 2021年6月17日 新建与整理 + */ +@AnAlias("VirtualAccountDetails") +@AnNew +@AnTable(table = "virtual_account_details", key = "account_blotter", type = "InnoDB") +public class VirtualAccountDetails implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "account_blotter", type = "long", notNull = true) + private long accountBlotter; // 1.账户流水 + @AnTableField(column = "operator_code", type = "string,32", notNull = true) + private String operatorCode; // 2.账户名 + @AnTableField(column = "transaction_blotter", type = "long", notNull = true) + private long transactionBlotter; // 3.交易流水 + @AnTableField(column = "transaction_status", type = "int", notNull = true) + private int transactionStatus; // 4.交易类型 0,订单量奖励 1,加急单奖励 2,时效奖励 3,老客户奖励 4,完成订单奖励 5,售后处理 6,订单退回 + @AnTableField(column = "usable_money_add", type = "long", notNull = true) + private long usableMoneyAdd; // 5.可用余额增加 + @AnTableField(column = "usable_money_down", type = "long", notNull = true) + private long usableMoneyDown; // 6.可用余额减少 + @AnTableField(column = "freeze_money_add", type = "long", notNull = true) + private long freezeMoneyAdd; // 7.冻结余额增加 + @AnTableField(column = "freeze_money_down", type = "long", notNull = true) + private long freezeMoneyDown; // 8.冻结余额减少 + @AnTableField(column = "operator_time", type = "datetime", notNull = false) + private Timestamp operatorTime; // 9.操作时间 + @AnTableField(column = "usable_money", type = "long", notNull = true) + private long usableMoney; // 10.账户可用余额 + @AnTableField(column = "freeze_money", type = "long", notNull = true) + private long freezeMoney; // 11.账户冻结金额 + @AnTableField(column = "sum_money", type = "long", notNull = true) + private long sumMoney; // 12.总金额 (可用余额+冻结余额) + @AnTableField(column = "operator_remark", type = "string,32", notNull = true) + private String operatorRemark; // 13.操作备注 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public long getAccountBlotter() + { + return accountBlotter; + } + + public void setAccountBlotter(long accountBlotter) + { + this.accountBlotter = accountBlotter; + } + + public String getOperatorCode() + { + return operatorCode; + } + + public void setOperatorCode(String operatorCode) + { + this.operatorCode = operatorCode; + } + + public long getTransactionBlotter() + { + return transactionBlotter; + } + + public void setTransactionBlotter(long transactionBlotter) + { + this.transactionBlotter = transactionBlotter; + } + + public int getTransactionStatus() + { + return transactionStatus; + } + + public void setTransactionStatus(int transactionStatus) + { + this.transactionStatus = transactionStatus; + } + + public long getUsableMoneyAdd() + { + return usableMoneyAdd; + } + + public void setUsableMoneyAdd(long usableMoneyAdd) + { + this.usableMoneyAdd = usableMoneyAdd; + } + + public long getUsableMoneyDown() + { + return usableMoneyDown; + } + + public void setUsableMoneyDown(long usableMoneyDown) + { + this.usableMoneyDown = usableMoneyDown; + } + + public long getFreezeMoneyAdd() + { + return freezeMoneyAdd; + } + + public void setFreezeMoneyAdd(long freezeMoneyAdd) + { + this.freezeMoneyAdd = freezeMoneyAdd; + } + + public long getFreezeMoneyDown() + { + return freezeMoneyDown; + } + + public void setFreezeMoneyDown(long freezeMoneyDown) + { + this.freezeMoneyDown = freezeMoneyDown; + } + + public Timestamp getOperatorTime() + { + return operatorTime; + } + + public void setOperatorTime(Timestamp operatorTime) + { + this.operatorTime = operatorTime; + } + + public long getUsableMoney() + { + return usableMoney; + } + + public void setUsableMoney(long usableMoney) + { + this.usableMoney = usableMoney; + } + + public long getFreezeMoney() + { + return freezeMoney; + } + + public void setFreezeMoney(long freezeMoney) + { + this.freezeMoney = freezeMoney; + } + + public long getSumMoney() + { + return sumMoney; + } + + public void setSumMoney(long sumMoney) + { + this.sumMoney = sumMoney; + } + + public String getOperatorRemark() + { + return operatorRemark; + } + + public void setOperatorRemark(String operatorRemark) + { + this.operatorRemark = operatorRemark; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/account/VirtualAccountTransactionView.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/account/VirtualAccountTransactionView.java new file mode 100644 index 0000000..1f2d5e7 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/account/VirtualAccountTransactionView.java @@ -0,0 +1,226 @@ +package com.zhiqim.yangcai.design.dbo.account; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.orm.annotation.AnView; +import org.zhiqim.orm.annotation.AnViewField; +import org.zhiqim.orm.annotation.AnViewJoin; +import org.zhiqim.orm.annotation.AnViewJoinValue; + +/** + * + * [简要描述]:设计师虚拟订单账户和交易流水
+ * [详细描述]:
+ * + * @version 1.0 @author hc 2021年6月17日 新建与整理 + */ +@AnAlias("VirtualAccountTransactionView") +@AnNew +@AnView("virtual_account_details,virtual_transaction_details") +@AnViewJoin( +{ + @AnViewJoinValue(type = "LEFT", lTable = "virtual_account_details", lColumn = "OPERATOR_CODE", rTable = "virtual_transaction_details", rColumn = "OPERATOR_CODE") +}) +public class VirtualAccountTransactionView implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnViewField(table = "virtual_account_details", column = "account_blotter") + private long accountBlotter; // 1.账户流水 + @AnViewField(table = "virtual_account_details", column = "operator_code") + private String operatorCode; // 2.操作员名称 + @AnViewField(table = "virtual_account_details", column = "transaction_blotter") + private long accountTransactionBlotter; // 3.交易流水 + @AnViewField(table = "virtual_account_details", column = "transaction_status") + private int accountTransactionStatus; // 4.交易类型 0,订单量奖励 1,加急单奖励 2,时效奖励 3,老客户奖励 4,完成订单奖励 5,售后处理 + // 6,订单退回 + @AnViewField(table = "virtual_account_details", column = "usable_money_add") + private long usableMoneyAdd; // 5.可用余额增加 + @AnViewField(table = "virtual_account_details", column = "usable_money_down") + private long usableMoneyDown; // 6.可用余额减少 + @AnViewField(table = "virtual_account_details", column = "freeze_money_add") + private long freezeMoneyAdd; // 7.冻结余额增加 + @AnViewField(table = "virtual_account_details", column = "freeze_money_down") + private long freezeMoneyDown; // 8.冻结余额减少 + @AnViewField(table = "virtual_account_details", column = "operator_time") + private Timestamp operatorTime; // 9.操作时间 + + @AnViewField(table = "virtual_transaction_details", column = "transaction_blotter") + private long transactionBlotter; // 1.交易流水 + @AnViewField(table = "virtual_transaction_details", column = "design_id") + private long designId; // 2.订单号 + @AnViewField(table = "virtual_transaction_details", column = "ORDER_TEXT") + private String orderText; // 3.产品类型 + @AnViewField(table = "virtual_transaction_details", column = "RECEIVE_TIME") + private Timestamp receiveTime; // 4.设计师领单时间 + @AnViewField(table = "virtual_transaction_details", column = "END_TIME") + private Timestamp endTime; // 5.设计师定稿时间 + @AnViewField(table = "virtual_transaction_details", column = "transaction_status") + private int transactionStatus; // 6.交易类型 0,订单量奖励 1,加急单奖励 2,时效奖励 3,老客户奖励 4,完成订单奖励 5,售后处理 6,订单退回 + @AnViewField(table = "virtual_transaction_details", column = "order_money") + private long orderMoney; // 7.订单金额 + + public long getAccountBlotter() + { + return accountBlotter; + } + + public String getOperatorCode() + { + return operatorCode; + } + + public void setOperatorCode(String operatorCode) + { + this.operatorCode = operatorCode; + } + + public long getAccountTransactionBlotter() + { + return accountTransactionBlotter; + } + + public void setAccountTransactionBlotter(long accountTransactionBlotter) + { + this.accountTransactionBlotter = accountTransactionBlotter; + } + + public int getAccountTransactionStatus() + { + return accountTransactionStatus; + } + + public void setAccountTransactionStatus(int accountTransactionStatus) + { + this.accountTransactionStatus = accountTransactionStatus; + } + + public long getUsableMoneyAdd() + { + return usableMoneyAdd; + } + + public void setUsableMoneyAdd(long usableMoneyAdd) + { + this.usableMoneyAdd = usableMoneyAdd; + } + + public long getUsableMoneyDown() + { + return usableMoneyDown; + } + + public void setUsableMoneyDown(long usableMoneyDown) + { + this.usableMoneyDown = usableMoneyDown; + } + + public long getFreezeMoneyAdd() + { + return freezeMoneyAdd; + } + + public void setFreezeMoneyAdd(long freezeMoneyAdd) + { + this.freezeMoneyAdd = freezeMoneyAdd; + } + + public long getFreezeMoneyDown() + { + return freezeMoneyDown; + } + + public void setFreezeMoneyDown(long freezeMoneyDown) + { + this.freezeMoneyDown = freezeMoneyDown; + } + + public Timestamp getOperatorTime() + { + return operatorTime; + } + + public void setOperatorTime(Timestamp operatorTime) + { + this.operatorTime = operatorTime; + } + + public long getTransactionBlotter() + { + return transactionBlotter; + } + + public void setTransactionBlotter(long transactionBlotter) + { + this.transactionBlotter = transactionBlotter; + } + + public long getDesignId() + { + return designId; + } + + public void setDesignId(long designId) + { + this.designId = designId; + } + + public String getOrderText() + { + return orderText; + } + + public void setOrderText(String orderText) + { + this.orderText = orderText; + } + + public Timestamp getReceiveTime() + { + return receiveTime; + } + + public void setReceiveTime(Timestamp receiveTime) + { + this.receiveTime = receiveTime; + } + + public Timestamp getEndTime() + { + return endTime; + } + + public void setEndTime(Timestamp endTime) + { + this.endTime = endTime; + } + + public int getTransactionStatus() + { + return transactionStatus; + } + + public void setTransactionStatus(int transactionStatus) + { + this.transactionStatus = transactionStatus; + } + + public long getOrderMoney() + { + return orderMoney; + } + + public void setOrderMoney(long orderMoney) + { + this.orderMoney = orderMoney; + } + + public void setAccountBlotter(long accountBlotter) + { + this.accountBlotter = accountBlotter; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/account/VirtualAccountType.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/account/VirtualAccountType.java new file mode 100644 index 0000000..4439059 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/account/VirtualAccountType.java @@ -0,0 +1,86 @@ +package com.zhiqim.yangcai.design.dbo.account; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * + * [简要描述]:虚拟账户类型表
+ * [详细描述]:
+ * + * @version 1.0 @author hc 2021年6月19日 新建与整理 + */ +@AnAlias("VirtualAccountType") +@AnNew +@AnTable(table = "virtual_account_type", key = "type_id", type = "InnoDB") +public class VirtualAccountType implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "type_id", type = "int", notNull = true) + private int typeId; // 1.交易类型 + @AnTableField(column = "type_name", type = "string,32", notNull = true) + private String typeName; // 2.交易类型名 + @AnTableField(column = "last_operator_code", type = "string,32", notNull = false) + private String lastOperatorCode; // 3.最后操作员 + @AnTableField(column = "create_time", type = "datetime", notNull = false) + private Timestamp createTime; // 4.创建时间 + @AnTableField(column = "modify_time", type = "datetime", notNull = false) + private Timestamp modifyTime; // 5.修改时间 + + public int getTypeId() + { + return typeId; + } + + public void setTypeId(int typeId) + { + this.typeId = typeId; + } + + public String getTypeName() + { + return typeName; + } + + public void setTypeName(String typeName) + { + this.typeName = typeName; + } + + public String getLastOperatorCode() + { + return lastOperatorCode; + } + + public void setLastOperatorCode(String lastOperatorCode) + { + this.lastOperatorCode = lastOperatorCode; + } + + public Timestamp getCreateTime() + { + return createTime; + } + + public void setCreateTime(Timestamp createTime) + { + this.createTime = createTime; + } + + public Timestamp getModifyTime() + { + return modifyTime; + } + + public void setModifyTime(Timestamp modifyTime) + { + this.modifyTime = modifyTime; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/account/VirtualTransactionDetails.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/account/VirtualTransactionDetails.java new file mode 100644 index 0000000..68515ff --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/account/VirtualTransactionDetails.java @@ -0,0 +1,127 @@ +package com.zhiqim.yangcai.design.dbo.account; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 设计师虚拟交易明细 对应表《virtual_transaction_details》 + * + * @version 1.0 @author hc 2021年6月17日 新建与整理 + */ +@AnAlias("VirtualTransactionDetails") +@AnNew +@AnTable(table = "virtual_transaction_details", key = "transaction_blotter", type = "InnoDB") +public class VirtualTransactionDetails implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "operator_code", type = "string,32", notNull = true) + private String operatorCode; // 1.账户名 + @AnTableField(column = "transaction_blotter", type = "long", notNull = true) + private long transactionBlotter; // 2.交易流水 + @AnTableField(column = "design_id", type = "long", notNull = false) + private long designId; // 3.订单号 + @AnTableField(column = "ORDER_TEXT", type = "string,200", notNull = false) + private String orderText; // 4.产品类型 + @AnTableField(column = "END_TIME", type = "datetime", notNull = false) + private Timestamp endTime; // 5.设计师定稿时间 + @AnTableField(column = "transaction_time", type = "datetime", notNull = false) + private Timestamp transactionTime; // 6.操作时间 + @AnTableField(column = "transaction_status", type = "int", notNull = true) + private int transactionStatus; // 7.交易类型 0,订单量奖励 1,加急单奖励 2,时效奖励 3,老客户奖励 4,完成订单奖励 5,售后处理 6,订单退回 + @AnTableField(column = "order_money", type = "long", notNull = false) + private long orderMoney; // 8.订单金额 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public String getOperatorCode() + { + return operatorCode; + } + + public void setOperatorCode(String operatorCode) + { + this.operatorCode = operatorCode; + } + + public long getTransactionBlotter() + { + return transactionBlotter; + } + + public void setTransactionBlotter(long transactionBlotter) + { + this.transactionBlotter = transactionBlotter; + } + + public long getDesignId() + { + return designId; + } + + public void setDesignId(long designId) + { + this.designId = designId; + } + + public String getOrderText() + { + return orderText; + } + + public void setOrderText(String orderText) + { + this.orderText = orderText; + } + + public Timestamp getEndTime() + { + return endTime; + } + + public void setEndTime(Timestamp endTime) + { + this.endTime = endTime; + } + + public Timestamp getTransactionTime() + { + return transactionTime; + } + + public void setTransactionTime(Timestamp transactionTime) + { + this.transactionTime = transactionTime; + } + + public int getTransactionStatus() + { + return transactionStatus; + } + + public void setTransactionStatus(int transactionStatus) + { + this.transactionStatus = transactionStatus; + } + + public long getOrderMoney() + { + return orderMoney; + } + + public void setOrderMoney(long orderMoney) + { + this.orderMoney = orderMoney; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/after/DesignAfterOrder.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/after/DesignAfterOrder.java new file mode 100644 index 0000000..e0165de --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/after/DesignAfterOrder.java @@ -0,0 +1,359 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.after; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnIndex; +import org.zhiqim.orm.annotation.AnIndexValue; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 售后订单总表 对应表《DESIGN_AFTER_ORDER》 + */ +@AnAlias("DesignAfterOrder") +@AnNew +@AnTable(table = "DESIGN_AFTER_ORDER", key = "DESIGN_AFS_ID", type = "InnoDB") +@AnIndex( +{ + @AnIndexValue(name = "IX_DESIGN_ID", column = "DESIGN_ID", unique = false), + @AnIndexValue(name = "IX_AFTER_CREATE_TIME", column = "AFTER_CREATE_TIME", unique = false) +}) +public class DesignAfterOrder implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "DESIGN_AFS_ID", type = "long", notNull = true) + private long designAfsId; // 1.设计师平台售后单号 + @AnTableField(column = "OUT_AFS_ID", type = "string,64", notNull = true) + private String outAfsId; // 2.外部售后单号 + @AnTableField(column = "DESIGN_ID", type = "long", notNull = true) + private long designId; // 3.订单号 + @AnTableField(column = "LOSS_AMOUNT", type = "decimal,6,2", notNull = true) + private double lossAmount; // 4.损失金额 + @AnTableField(column = "COMPENSATE_AMOUNT", type = "decimal,6,2", notNull = true) + private double compensateAmount; // 4.赔付金额 + @AnTableField(column = "AFTER_STATUS", type = "int", notNull = true) + private int afterStatus; // 5.售后单处理状态 + @AnTableField(column = "NEW_DESIGN_ID", type = "long", notNull = false) + private long newDesignId; // 6.补单号(新单号) + @AnTableField(column = "PIC_ORG_ID", type = "long", notNull = false) + private long picOrgId; // 7.责任组织 + @AnTableField(column = "PIC_TYPE", type = "long", notNull = false) + private long picType; // 8.责任类型 设计师责任,系统责任 等 + @AnTableField(column = "PROBLEM_TYPE", type = "long", notNull = false) + private long problemType; // 9.问题类型, 设计与成品不符 , 设计师态度,色差等 + @AnTableField(column = "PROBLEM_REASON", type = "string,30", notNull = false) + private String problemReason; // 10.问题原因 + @AnTableField(column = "PROBLEM_DESC", type = "string,6000", notNull = false) + private String problemDesc; // 10.问题详细描述 + @AnTableField(column = "AFTER_CREATE_TIME", type = "datetime", notNull = true) + private Timestamp afterCreateTime; // 11.创建时间 + @AnTableField(column = "AFTER_MODIFY_TIME", type = "datetime", notNull = true) + private Timestamp afterModifyTime; // 12.变更时间 + @AnTableField(column = "AFTER_BLAMER", type = "string,64", notNull = false) + private String afterBlamer; // 13.责任人 + @AnTableField(column = "AFTER_RETURN_NOTE", type = "string,600", notNull = false) + private String afterReturnNote; // 14.售后退回原因,(系统之间原因) + @AnTableField(column = "AFTER_BLAME_RETURN_NOTE", type = "string,600", notNull = false) + private String afterBlameReturnNote; // 15.申诉退回 原因 + @AnTableField(column = "AFTER_BLAME_RETURN_TIME", type = "datetime", notNull = false) + private Timestamp afterBlameReturnTime; // 16.申诉退回 时间 + @AnTableField(column = "AFTER_HANDLER", type = "string,64", notNull = false) + private String afterHandler; // 17.处理人 (指派责任的人) + @AnTableField(column = "AFTER_HANDEL_TIME", type = "datetime", notNull = false) + private Timestamp afterHandelTime; // 18.处理时间 (责任指派时间) + @AnTableField(column = "AFTER_FINISH_NOTE", type = "string,600", notNull = false) + private String afterFinishNote; // 19.处理完成描述,处理这处理完成时需添加 描述内容 + @AnTableField(column = "AFTER_FINISH_TIME", type = "datetime", notNull = false) + private Timestamp afterFinishTime; // 20.售后完成时间 + @AnTableField(column = "AFTER_CANCELER", type = "string,64", notNull = false) + private String afterCanceler; // 21.取消人 + @AnTableField(column = "AFTER_CANCEL_TIME", type = "datetime", notNull = false) + private Timestamp afterCancelTime; // 22.取消时间 + @AnTableField(column = "AFTER_CANCEL_NOTE", type = "string,400", notNull = false) + private String afterCancelNote; // 23.取消原因 + @AnTableField(column = "AFTER_COMPLAIN_CHECK_NOTE", type = "string,400", notNull = false) + private String afterComplainCheckNote; // 24.申诉审核备注 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public long getDesignAfsId() + { + return designAfsId; + } + + public void setDesignAfsId(long designAfsId) + { + this.designAfsId = designAfsId; + } + + public String getOutAfsId() + { + return outAfsId; + } + + public void setOutAfsId(String outAfsId) + { + this.outAfsId = outAfsId; + } + + public long getDesignId() + { + return designId; + } + + public void setDesignId(long designId) + { + this.designId = designId; + } + + public double getLossAmount() + { + return lossAmount; + } + + public void setLossAmount(double lossAmount) + { + this.lossAmount = lossAmount; + } + + public int getAfterStatus() + { + return afterStatus; + } + + public void setAfterStatus(int afterStatus) + { + this.afterStatus = afterStatus; + } + + public long getNewDesignId() + { + return newDesignId; + } + + public void setNewDesignId(long newDesignId) + { + this.newDesignId = newDesignId; + } + + public long getPicOrgId() + { + return picOrgId; + } + + public void setPicOrgId(long picOrgId) + { + this.picOrgId = picOrgId; + } + + public long getPicType() + { + return picType; + } + + public void setPicType(long picType) + { + this.picType = picType; + } + + public long getProblemType() + { + return problemType; + } + + public void setProblemType(long problemType) + { + this.problemType = problemType; + } + + public String getProblemReason() + { + return problemReason; + } + + public void setProblemReason(String problemReason) + { + this.problemReason = problemReason; + } + + public String getProblemDesc() + { + return problemDesc; + } + + public void setProblemDesc(String problemDesc) + { + this.problemDesc = problemDesc; + } + + public Timestamp getAfterCreateTime() + { + return afterCreateTime; + } + + public void setAfterCreateTime(Timestamp afterCreateTime) + { + this.afterCreateTime = afterCreateTime; + } + + public Timestamp getAfterModifyTime() + { + return afterModifyTime; + } + + public void setAfterModifyTime(Timestamp afterModifyTime) + { + this.afterModifyTime = afterModifyTime; + } + + public String getAfterBlamer() + { + return afterBlamer; + } + + public void setAfterBlamer(String afterBlamer) + { + this.afterBlamer = afterBlamer; + } + + public String getAfterReturnNote() + { + return afterReturnNote; + } + + public void setAfterReturnNote(String afterReturnNote) + { + this.afterReturnNote = afterReturnNote; + } + + public String getAfterBlameReturnNote() + { + return afterBlameReturnNote; + } + + public void setAfterBlameReturnNote(String afterBlameReturnNote) + { + this.afterBlameReturnNote = afterBlameReturnNote; + } + + public Timestamp getAfterBlameReturnTime() + { + return afterBlameReturnTime; + } + + public void setAfterBlameReturnTime(Timestamp afterBlameReturnTime) + { + this.afterBlameReturnTime = afterBlameReturnTime; + } + + public String getAfterHandler() + { + return afterHandler; + } + + public void setAfterHandler(String afterHandler) + { + this.afterHandler = afterHandler; + } + + public Timestamp getAfterHandelTime() + { + return afterHandelTime; + } + + public void setAfterHandelTime(Timestamp afterHandelTime) + { + this.afterHandelTime = afterHandelTime; + } + + public String getAfterFinishNote() + { + return afterFinishNote; + } + + public void setAfterFinishNote(String afterFinishNote) + { + this.afterFinishNote = afterFinishNote; + } + + public Timestamp getAfterFinishTime() + { + return afterFinishTime; + } + + public void setAfterFinishTime(Timestamp afterFinishTime) + { + this.afterFinishTime = afterFinishTime; + } + + public String getAfterCanceler() + { + return afterCanceler; + } + + public void setAfterCanceler(String afterCanceler) + { + this.afterCanceler = afterCanceler; + } + + public Timestamp getAfterCancelTime() + { + return afterCancelTime; + } + + public void setAfterCancelTime(Timestamp afterCancelTime) + { + this.afterCancelTime = afterCancelTime; + } + + public String getAfterCancelNote() + { + return afterCancelNote; + } + + public void setAfterCancelNote(String afterCancelNote) + { + this.afterCancelNote = afterCancelNote; + } + + public String getAfterComplainCheckNote() + { + return afterComplainCheckNote; + } + + public void setAfterComplainCheckNote(String afterComplainCheckNote) + { + this.afterComplainCheckNote = afterComplainCheckNote; + } + + public double getCompensateAmount() + { + return compensateAmount; + } + + public void setCompensateAmount(double compensateAmount) + { + this.compensateAmount = compensateAmount; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/after/DesignAfterOrderView.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/after/DesignAfterOrderView.java new file mode 100644 index 0000000..4d9f913 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/after/DesignAfterOrderView.java @@ -0,0 +1,203 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.after; + +import com.zhiqim.yangcai.design.dbo.after.DesignAfterOrder; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 售后订单列表视图 对应视图《DESIGN_AFTER_ORDER_VIEW》 + */ +@AnAlias("DesignAfterOrderView") +@AnNew +@AnView("DESIGN_AFTER_ORDER,DESIGN_ORDER") +@AnViewJoin({@AnViewJoinValue(type="EQUAL", lTable="DESIGN_AFTER_ORDER", lColumn="DESIGN_ID", rTable="DESIGN_ORDER", rColumn="DESIGN_ID")}) +public class DesignAfterOrderView extends DesignAfterOrder +{ + private static final long serialVersionUID = 1L; + + @AnViewField(table="DESIGN_ORDER", column="MERCHANT_ID") private long merchantId; //2.订单商户编号 + @AnViewField(table="DESIGN_ORDER", column="ORG_ID") private long orgId; //3.操作员组织编号 + @AnViewField(table="DESIGN_ORDER", column="OUT_ID") private long outId; //4.外部系统单号 + @AnViewField(table="DESIGN_ORDER", column="ORDER_TEXT") private String orderText; //5.订单描述 + @AnViewField(table="DESIGN_ORDER", column="AFTER_NAMES") private String afterNames; //6.后加工名称,多个逗号隔开 + @AnViewField(table="DESIGN_ORDER", column="AMOUNT") private long amount; //7.订单总金额 + @AnViewField(table="DESIGN_ORDER", column="PRINT_SPECIAL") private String printSpecial; //8.印刷特殊工艺 + @AnViewField(table="DESIGN_ORDER", column="TYPE_ID") private long typeId; //9.设计类型,名片、彩页、等等 + @AnViewField(table="DESIGN_ORDER", column="SHOP_NICK") private String shopNick; //10.店铺名称 + @AnViewField(table="DESIGN_ORDER", column="DESIGNER") private String designer; //11.设计师 + @AnViewField(table="DESIGN_ORDER", column="BUYER_NICK") private String buyerNick; //12.客户昵称 + @AnViewField(table="DESIGN_ORDER", column="USER_CONTACT") private String userContact; //13.联系人 + @AnViewField(table="DESIGN_ORDER", column="USER_MOBILE") private String userMobile; //14.用户手机 + @AnViewField(table="DESIGN_ORDER", column="USER_QQ") private String userQq; //15.用户QQ + @AnViewField(table="DESIGN_ORDER", column="USER_WX") private String userWx; //16.用户微信 + + public String toString() + { + return Jsons.toString(this); + } + + public long getMerchantId() + { + return merchantId; + } + + public void setMerchantId(long merchantId) + { + this.merchantId = merchantId; + } + + public long getOrgId() + { + return orgId; + } + + public void setOrgId(long orgId) + { + this.orgId = orgId; + } + + public long getOutId() + { + return outId; + } + + public void setOutId(long outId) + { + this.outId = outId; + } + + public String getOrderText() + { + return orderText; + } + + public void setOrderText(String orderText) + { + this.orderText = orderText; + } + + public String getAfterNames() + { + return afterNames; + } + + public void setAfterNames(String afterNames) + { + this.afterNames = afterNames; + } + + public long getAmount() + { + return amount; + } + + public void setAmount(long amount) + { + this.amount = amount; + } + + public String getPrintSpecial() + { + return printSpecial; + } + + public void setPrintSpecial(String printSpecial) + { + this.printSpecial = printSpecial; + } + + public long getTypeId() + { + return typeId; + } + + public void setTypeId(long typeId) + { + this.typeId = typeId; + } + + public String getShopNick() + { + return shopNick; + } + + public void setShopNick(String shopNick) + { + this.shopNick = shopNick; + } + + public String getDesigner() + { + return designer; + } + + public void setDesigner(String designer) + { + this.designer = designer; + } + + public String getBuyerNick() + { + return buyerNick; + } + + public void setBuyerNick(String buyerNick) + { + this.buyerNick = buyerNick; + } + + public String getUserContact() + { + return userContact; + } + + public void setUserContact(String userContact) + { + this.userContact = userContact; + } + + public String getUserMobile() + { + return userMobile; + } + + public void setUserMobile(String userMobile) + { + this.userMobile = userMobile; + } + + public String getUserQq() + { + return userQq; + } + + public void setUserQq(String userQq) + { + this.userQq = userQq; + } + + public String getUserWx() + { + return userWx; + } + + public void setUserWx(String userWx) + { + this.userWx = userWx; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/after/DesignAfterStatisticDetail.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/after/DesignAfterStatisticDetail.java new file mode 100644 index 0000000..022a960 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/after/DesignAfterStatisticDetail.java @@ -0,0 +1,540 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.after; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnIndex; +import org.zhiqim.orm.annotation.AnIndexValue; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 售后统计详情表 对应表《DESIGN_AFTER_STATISTIC_DETAIL》 + */ +@AnAlias("DesignAfterStatisticDetail") +@AnNew +@AnTable(table = "DESIGN_AFTER_STATISTIC_DETAIL", key = "START_DATE,DESIGN_AFS_ID", type = "InnoDB") +@AnIndex( +{ + @AnIndexValue(name = "IX_DESIGN_ID", column = "DESIGN_ID", unique = false), @AnIndexValue(name = "IX_ORG_ID", column = "ORG_ID", unique = false), + @AnIndexValue(name = "IX_AFTER_BLAMER", column = "AFTER_BLAMER", unique = false), + @AnIndexValue(name = "IX_AFTER_FINISH_TIME", column = "AFTER_FINISH_TIME", unique = false) +}) +public class DesignAfterStatisticDetail implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "START_DATE", type = "string,32", notNull = true) + private String startDate; // 1.统计日期 yyyy-MM + @AnTableField(column = "DESIGN_AFS_ID", type = "long", notNull = true) + private long designAfsId; // 2.设计师平台 独立售后单号 + @AnTableField(column = "OUT_AFS_ID", type = "string,64", notNull = true) + private String outAfsId; // 3.设计师平台 独立售后单号 + @AnTableField(column = "DESIGN_ID", type = "long", notNull = true) + private long designId; // 4.设计师平台的那条 订单售后 + @AnTableField(column = "LOSS_AMOUNT", type = "decimal,6,2", notNull = true) + private double lossAmount; // 5.损失金额 + @AnTableField(column = "AFTER_STATUS", type = "int", notNull = true) + private int afterStatus; // 6.售后单处理状态 + @AnTableField(column = "NEW_DESIGN_ID", type = "long", notNull = false) + private long newDesignId; // 7.补单号(新单号) + @AnTableField(column = "PIC_ORG_ID", type = "long", notNull = false) + private long picOrgId; // 8.责任组织 + @AnTableField(column = "PIC_TYPE", type = "long", notNull = false) + private long picType; // 9.责任类型 设计师责任,系统责任 等 + @AnTableField(column = "PROBLEM_TYPE", type = "long", notNull = false) + private long problemType; // 10.问题类型, 设计与成品不符 , 设计师态度,色差等 + @AnTableField(column = "PROBLEM_DESC", type = "string,6000", notNull = false) + private String problemDesc; // 11.问题描述 + @AnTableField(column = "AFTER_CREATE_TIME", type = "datetime", notNull = true) + private Timestamp afterCreateTime; // 12.创建时间 + @AnTableField(column = "AFTER_MODIFY_TIME", type = "datetime", notNull = true) + private Timestamp afterModifyTime; // 13.变更时间 + @AnTableField(column = "AFTER_BLAMER", type = "string,64", notNull = false) + private String afterBlamer; // 14.责任人 + @AnTableField(column = "AFTER_RETURN_NOTE", type = "string,600", notNull = false) + private String afterReturnNote; // 15.售后退回原因,(系统之间原因) + @AnTableField(column = "AFTER_BLAME_RETURN_NOTE", type = "string,600", notNull = false) + private String afterBlameReturnNote; // 16.申诉退回 原因 + @AnTableField(column = "AFTER_BLAME_RETURN_TIME", type = "datetime", notNull = false) + private Timestamp afterBlameReturnTime; // 17.申诉退回 时间 + @AnTableField(column = "AFTER_HANDLER", type = "string,64", notNull = false) + private String afterHandler; // 18.处理人 (指派责任的人) + @AnTableField(column = "AFTER_HANDEL_TIME", type = "datetime", notNull = false) + private Timestamp afterHandelTime; // 19.处理时间 (责任指派时间) + @AnTableField(column = "AFTER_FINISH_NOTE", type = "string,600", notNull = false) + private String afterFinishNote; // 20.处理完成描述,处理这处理完成时需添加 描述内容 + @AnTableField(column = "AFTER_FINISH_TIME", type = "datetime", notNull = false) + private Timestamp afterFinishTime; // 21.售后完成时间 + @AnTableField(column = "AFTER_CANCELER", type = "string,64", notNull = false) + private String afterCanceler; // 22.取消人 + @AnTableField(column = "AFTER_CANCEL_TIME", type = "datetime", notNull = false) + private Timestamp afterCancelTime; // 23.取消时间 + @AnTableField(column = "AFTER_CANCEL_NOTE", type = "string,400", notNull = false) + private String afterCancelNote; // 24.取消原因 + @AnTableField(column = "AFTER_COMPLAIN_CHECK_NOTE", type = "string,400", notNull = false) + private String afterComplainCheckNote; // 25.申诉审核备注 + @AnTableField(column = "MERCHANT_ID", type = "long", notNull = true) + private long merchantId; // 26.订单商户ID + @AnTableField(column = "ORG_ID", type = "long", notNull = true) + private long orgId; // 27.责任组织ID + @AnTableField(column = "OUT_ID", type = "long", notNull = true) + private long outId; // 28.外部系统订单号ID + @AnTableField(column = "ORDER_TEXT", type = "string,600", notNull = false) + private String orderText; // 29.订单信息 + @AnTableField(column = "AFTER_NAMES", type = "string,600", notNull = false) + private String afterNames; // 30.后加工名称 + @AnTableField(column = "AMOUNT", type = "long", notNull = true) + private long amount; // 31.设计订单金额 + @AnTableField(column = "PRINT_SPECIAL", type = "string,100", notNull = false) + private String printSpecial; // 32.特殊工艺 + @AnTableField(column = "TYPE_ID", type = "long", notNull = true) + private long typeId; // 33.设计类型,名片、彩页、等等 + @AnTableField(column = "SHOP_NICK", type = "string,100", notNull = false) + private String shopNick; // 34.店铺名 + @AnTableField(column = "DESIGNER", type = "string,64", notNull = false) + private String designer; // 35.订单设计师 + @AnTableField(column = "BUYER_NICK", type = "string,100", notNull = false) + private String buyerNick; // 36.订单买家昵称 + @AnTableField(column = "USER_CONTACT", type = "string,200", notNull = false) + private String userContact; // 37.订单买家联系人 + @AnTableField(column = "USER_MOBILE", type = "string,100", notNull = false) + private String userMobile; // 38.订单买家联系手机 + @AnTableField(column = "USER_QQ", type = "string,100", notNull = false) + private String userQq; // 39.订单买家联系QQ + @AnTableField(column = "USER_WX", type = "string,100", notNull = false) + private String userWx; // 40.订单买家联系WX + + private double compensateAmount;// 赔付总金额 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public String getStartDate() + { + return startDate; + } + + public void setStartDate(String startDate) + { + this.startDate = startDate; + } + + public long getDesignAfsId() + { + return designAfsId; + } + + public void setDesignAfsId(long designAfsId) + { + this.designAfsId = designAfsId; + } + + public String getOutAfsId() + { + return outAfsId; + } + + public void setOutAfsId(String outAfsId) + { + this.outAfsId = outAfsId; + } + + public long getDesignId() + { + return designId; + } + + public void setDesignId(long designId) + { + this.designId = designId; + } + + public double getLossAmount() + { + return lossAmount; + } + + public void setLossAmount(double lossAmount) + { + this.lossAmount = lossAmount; + } + + public int getAfterStatus() + { + return afterStatus; + } + + public void setAfterStatus(int afterStatus) + { + this.afterStatus = afterStatus; + } + + public long getNewDesignId() + { + return newDesignId; + } + + public void setNewDesignId(long newDesignId) + { + this.newDesignId = newDesignId; + } + + public long getPicOrgId() + { + return picOrgId; + } + + public void setPicOrgId(long picOrgId) + { + this.picOrgId = picOrgId; + } + + public long getPicType() + { + return picType; + } + + public void setPicType(long picType) + { + this.picType = picType; + } + + public long getProblemType() + { + return problemType; + } + + public void setProblemType(long problemType) + { + this.problemType = problemType; + } + + public String getProblemDesc() + { + return problemDesc; + } + + public void setProblemDesc(String problemDesc) + { + this.problemDesc = problemDesc; + } + + public Timestamp getAfterCreateTime() + { + return afterCreateTime; + } + + public void setAfterCreateTime(Timestamp afterCreateTime) + { + this.afterCreateTime = afterCreateTime; + } + + public Timestamp getAfterModifyTime() + { + return afterModifyTime; + } + + public void setAfterModifyTime(Timestamp afterModifyTime) + { + this.afterModifyTime = afterModifyTime; + } + + public String getAfterBlamer() + { + return afterBlamer; + } + + public void setAfterBlamer(String afterBlamer) + { + this.afterBlamer = afterBlamer; + } + + public String getAfterReturnNote() + { + return afterReturnNote; + } + + public void setAfterReturnNote(String afterReturnNote) + { + this.afterReturnNote = afterReturnNote; + } + + public String getAfterBlameReturnNote() + { + return afterBlameReturnNote; + } + + public void setAfterBlameReturnNote(String afterBlameReturnNote) + { + this.afterBlameReturnNote = afterBlameReturnNote; + } + + public Timestamp getAfterBlameReturnTime() + { + return afterBlameReturnTime; + } + + public void setAfterBlameReturnTime(Timestamp afterBlameReturnTime) + { + this.afterBlameReturnTime = afterBlameReturnTime; + } + + public String getAfterHandler() + { + return afterHandler; + } + + public void setAfterHandler(String afterHandler) + { + this.afterHandler = afterHandler; + } + + public Timestamp getAfterHandelTime() + { + return afterHandelTime; + } + + public void setAfterHandelTime(Timestamp afterHandelTime) + { + this.afterHandelTime = afterHandelTime; + } + + public String getAfterFinishNote() + { + return afterFinishNote; + } + + public void setAfterFinishNote(String afterFinishNote) + { + this.afterFinishNote = afterFinishNote; + } + + public Timestamp getAfterFinishTime() + { + return afterFinishTime; + } + + public void setAfterFinishTime(Timestamp afterFinishTime) + { + this.afterFinishTime = afterFinishTime; + } + + public String getAfterCanceler() + { + return afterCanceler; + } + + public void setAfterCanceler(String afterCanceler) + { + this.afterCanceler = afterCanceler; + } + + public Timestamp getAfterCancelTime() + { + return afterCancelTime; + } + + public void setAfterCancelTime(Timestamp afterCancelTime) + { + this.afterCancelTime = afterCancelTime; + } + + public String getAfterCancelNote() + { + return afterCancelNote; + } + + public void setAfterCancelNote(String afterCancelNote) + { + this.afterCancelNote = afterCancelNote; + } + + public String getAfterComplainCheckNote() + { + return afterComplainCheckNote; + } + + public void setAfterComplainCheckNote(String afterComplainCheckNote) + { + this.afterComplainCheckNote = afterComplainCheckNote; + } + + public long getMerchantId() + { + return merchantId; + } + + public void setMerchantId(long merchantId) + { + this.merchantId = merchantId; + } + + public long getOrgId() + { + return orgId; + } + + public void setOrgId(long orgId) + { + this.orgId = orgId; + } + + public long getOutId() + { + return outId; + } + + public void setOutId(long outId) + { + this.outId = outId; + } + + public String getOrderText() + { + return orderText; + } + + public void setOrderText(String orderText) + { + this.orderText = orderText; + } + + public String getAfterNames() + { + return afterNames; + } + + public void setAfterNames(String afterNames) + { + this.afterNames = afterNames; + } + + public long getAmount() + { + return amount; + } + + public void setAmount(long amount) + { + this.amount = amount; + } + + public String getPrintSpecial() + { + return printSpecial; + } + + public void setPrintSpecial(String printSpecial) + { + this.printSpecial = printSpecial; + } + + public long getTypeId() + { + return typeId; + } + + public void setTypeId(long typeId) + { + this.typeId = typeId; + } + + public String getShopNick() + { + return shopNick; + } + + public void setShopNick(String shopNick) + { + this.shopNick = shopNick; + } + + public String getDesigner() + { + return designer; + } + + public void setDesigner(String designer) + { + this.designer = designer; + } + + public String getBuyerNick() + { + return buyerNick; + } + + public void setBuyerNick(String buyerNick) + { + this.buyerNick = buyerNick; + } + + public String getUserContact() + { + return userContact; + } + + public void setUserContact(String userContact) + { + this.userContact = userContact; + } + + public String getUserMobile() + { + return userMobile; + } + + public void setUserMobile(String userMobile) + { + this.userMobile = userMobile; + } + + public String getUserQq() + { + return userQq; + } + + public void setUserQq(String userQq) + { + this.userQq = userQq; + } + + public String getUserWx() + { + return userWx; + } + + public void setUserWx(String userWx) + { + this.userWx = userWx; + } + + public double getCompensateAmount() + { + return compensateAmount; + } + + public void setCompensateAmount(double compensateAmount) + { + this.compensateAmount = compensateAmount; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/api/ApiInvokeLog.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/api/ApiInvokeLog.java new file mode 100644 index 0000000..28d895d --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/api/ApiInvokeLog.java @@ -0,0 +1,142 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.api; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 接口调用日志表 对应表《API_INVOKE_LOG》 + */ +@AnAlias("ApiInvokeLog") +@AnNew +@AnTable(table="API_INVOKE_LOG", key="INVOKE_LOG_ID", type="InnoDB") +@AnIndex({@AnIndexValue(name="IX_INVOCK_IP", column="REMOTE_IP", unique=false), + @AnIndexValue(name="IX_REMOTE_USER", column="REMOTE_USER", unique=false), + @AnIndexValue(name="IX_USER_STATUS_TIME", column="REMOTE_USER,STATUS_CODE,CREATE_TIME", unique=false), + @AnIndexValue(name="IX_API_NAME", column="API_NAME", unique=false), + @AnIndexValue(name="IX_STATUS_CODE", column="STATUS_CODE", unique=false)}) +public class ApiInvokeLog implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column="INVOKE_LOG_ID", type="long", notNull=true) private long invokeLogId; //1.日志编号 + @AnTableField(column="REMOTE_IP", type="string,200", notNull=true) private String remoteIp; //2.用户IP地址 + @AnTableField(column="ERROR_ID", type="string,200", notNull=false) private String errorId; //3.错误订单号 -1或者null 表示该方法 订单号字段允许为空 + @AnTableField(column="STATUS_CODE", type="int", notNull=true) private int statusCode; //4.状态码 + @AnTableField(column="REMOTE_USER", type="string,200", notNull=true) private String remoteUser; //5.用户名 没有用户 名时填写IP地址 + @AnTableField(column="API_NAME", type="string,200", notNull=false) private String apiName; //6.调用接口名 + @AnTableField(column="INVOKE_MESSAGE", type="string,6000", notNull=false) private String invokeMessage; //7.调用接口结果描述 + @AnTableField(column="INVOKE_STACK_TRACE", type="string,4000", notNull=false) private String invokeStackTrace; //8.调用接口的堆栈信息 + @AnTableField(column="CREATE_TIME", type="datetime", notNull=true) private Timestamp createTime; //9.入库时间 + + public String toString() + { + return Jsons.toString(this); + } + + public long getInvokeLogId() + { + return invokeLogId; + } + + public void setInvokeLogId(long invokeLogId) + { + this.invokeLogId = invokeLogId; + } + + public String getRemoteIp() + { + return remoteIp; + } + + public void setRemoteIp(String remoteIp) + { + this.remoteIp = remoteIp; + } + + public String getErrorId() + { + return errorId; + } + + public void setErrorId(String errorId) + { + this.errorId = errorId; + } + + public int getStatusCode() + { + return statusCode; + } + + public void setStatusCode(int statusCode) + { + this.statusCode = statusCode; + } + + public String getRemoteUser() + { + return remoteUser; + } + + public void setRemoteUser(String remoteUser) + { + this.remoteUser = remoteUser; + } + + public String getApiName() + { + return apiName; + } + + public void setApiName(String apiName) + { + this.apiName = apiName; + } + + public String getInvokeMessage() + { + return invokeMessage; + } + + public void setInvokeMessage(String invokeMessage) + { + this.invokeMessage = invokeMessage; + } + + public String getInvokeStackTrace() + { + return invokeStackTrace; + } + + public void setInvokeStackTrace(String invokeStackTrace) + { + this.invokeStackTrace = invokeStackTrace; + } + + public Timestamp getCreateTime() + { + return createTime; + } + + public void setCreateTime(Timestamp createTime) + { + this.createTime = createTime; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/complain/DesignComplain.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/complain/DesignComplain.java new file mode 100644 index 0000000..bd80aec --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/complain/DesignComplain.java @@ -0,0 +1,295 @@ +/** + * 扬彩印刷设计 + * 文件名 :ComplainDetail.java + * 创建人 :gjx + * 创建时间:2019-8-14 + */ + +package com.zhiqim.yangcai.design.dbo.complain; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 投诉单详情表 + * + * @version 1.0 @author gjx 2019-8-14 新建与整理 + */ +@AnAlias("DesignComplain") +@AnNew +@AnTable(table = "DESIGN_COMPLAIN", key = "COMPLAIN_ID", type = "InnoDB") +public class DesignComplain implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "COMPLAIN_ID", type = "long", notNull = true) + private long complainId; // 1.投诉单ID + @AnTableField(column = "DESIGN_ID", type = "long", notNull = true) + private long designId; // 2.设计单号 + @AnTableField(column = "COMPLAIN_STATUS", type = "string,20", notNull = true) + private String complainStatus; // 3.投诉状态 + @AnTableField(column = "COMPLAIN_TYPE", type = "string,100", notNull = true) + private String complainType; // 4.投诉类型 + @AnTableField(column = "DISPOSE_PROJECT", type = "string,100", notNull = true) + private String disposeProject; // 5.处理方案 + @AnTableField(column = "SHOP_PUNISH_SCORE", type = "int", notNull = false) + private int shopPunishScore; // 6.店铺扣罚分数 + @AnTableField(column = "UNDERTAKE_DEPT", type = "string,100", notNull = true) + private String undertakeDept; // 7.责任部门 + @AnTableField(column = "UNDERTAKE_PERSON", type = "string,20", notNull = true) + private String undertakePerson; // 8.责任人 + @AnTableField(column = "IS_SATRAP_ASSIST", type = "boolean", notNull = false) + private boolean isSatrapAssist; // 9.是否需要主管协助,0不需要,1需要 + @AnTableField(column = "COMPLAIN_SPECIFIC_TEXT", type = "string,200", notNull = true) + private String complainSpecificText; // 10.投诉具体描述 + @AnTableField(column = "DISPOSE_IMG_PATH", type = "string,200", notNull = false) + private String disposeImgPath; // 11.投诉单处理图片路径 + @AnTableField(column = "FINISH_IMG_PATH", type = "string,200", notNull = false) + private String finishImgPath; // 12.投诉单完结图片路径 + @AnTableField(column = "COMPLAIN_ADD_NAME", type = "string,20", notNull = true) + private String complainAddName; // 13.投诉单受理人 + @AnTableField(column = "COMPLAIN_ADD_TIME", type = "datetime", notNull = true) + private Timestamp complainAddTime; // 14.投诉单受理时间 + @AnTableField(column = "COMPLAIN_MODIFY_TIME", type = "datetime", notNull = false) + private Timestamp complainModifyTime; // 15.修改时间 + @AnTableField(column = "ASSIST_PERSON", type = "string,20", notNull = false) + private String assistPerson; // 16.协助人 + @AnTableField(column = "ASSIST_ORG", type = "long", notNull = false) + private long assistOrg; // 17.协助组织 + @AnTableField(column = "UNDERTAKE_ORG_NAME", type = "string,20", notNull = false) + private String undertakeOrgName; // 18.责任组织名称 + @AnTableField(column = "ASSIST_DEPT_MANAGER", type = "string,20", notNull = false) + private String assistDeptManager; // 19.协助主管 + @AnTableField(column = "ASSIST_ORG_NAME", type = "string,20", notNull = false) + private String assistOrgName; // 20.协助组织名称 + @AnTableField(column = "UNDERTAKE_DEPT_MANAGER", type = "string,20", notNull = false) + private String undertakeDeptManager; // 21.责任主管 + @AnTableField(column = "UNDERTAKE_ORG", type = "long", notNull = false) + private long undertakeOrg; // 22.责任组织 + + public long getComplainId() + { + return complainId; + } + + public void setComplainId(long complainId) + { + this.complainId = complainId; + } + + public long getDesignId() + { + return designId; + } + + public void setDesignId(long designId) + { + this.designId = designId; + } + + public String getComplainStatus() + { + return complainStatus; + } + + public void setComplainStatus(String complainStatus) + { + this.complainStatus = complainStatus; + } + + public String getComplainType() + { + return complainType; + } + + public void setComplainType(String complainType) + { + this.complainType = complainType; + } + + public String getDisposeProject() + { + return disposeProject; + } + + public void setDisposeProject(String disposeProject) + { + this.disposeProject = disposeProject; + } + + public int getShopPunishScore() + { + return shopPunishScore; + } + + public void setShopPunishScore(int shopPunishScore) + { + this.shopPunishScore = shopPunishScore; + } + + public String getUndertakeDept() + { + return undertakeDept; + } + + public void setUndertakeDept(String undertakeDept) + { + this.undertakeDept = undertakeDept; + } + + public String getUndertakePerson() + { + return undertakePerson; + } + + public void setUndertakePerson(String undertakePerson) + { + this.undertakePerson = undertakePerson; + } + + public boolean isSatrapAssist() + { + return isSatrapAssist; + } + + public void setSatrapAssist(boolean isSatrapAssist) + { + this.isSatrapAssist = isSatrapAssist; + } + + public String getComplainSpecificText() + { + return complainSpecificText; + } + + public void setComplainSpecificText(String complainSpecificText) + { + this.complainSpecificText = complainSpecificText; + } + + public String getDisposeImgPath() + { + return disposeImgPath; + } + + public void setDisposeImgPath(String disposeImgPath) + { + this.disposeImgPath = disposeImgPath; + } + + public String getComplainAddName() + { + return complainAddName; + } + + public void setComplainAddName(String complainAddName) + { + this.complainAddName = complainAddName; + } + + public Timestamp getComplainAddTime() + { + return complainAddTime; + } + + public void setComplainAddTime(Timestamp complainAddTime) + { + this.complainAddTime = complainAddTime; + } + + public Timestamp getComplainModifyTime() + { + return complainModifyTime; + } + + public void setComplainModifyTime(Timestamp complainModifyTime) + { + this.complainModifyTime = complainModifyTime; + } + + public String getFinishImgPath() + { + return finishImgPath; + } + + public void setFinishImgPath(String finishImgPath) + { + this.finishImgPath = finishImgPath; + } + + public String getAssistPerson() + { + return assistPerson; + } + + public void setAssistPerson(String assistPerson) + { + this.assistPerson = assistPerson; + } + + public long getAssistOrg() + { + return assistOrg; + } + + public void setAssistOrg(long assistOrg) + { + this.assistOrg = assistOrg; + } + + public String getUndertakeOrgName() + { + return undertakeOrgName; + } + + public void setUndertakeOrgName(String undertakeOrgName) + { + this.undertakeOrgName = undertakeOrgName; + } + + public String getAssistDeptManager() + { + return assistDeptManager; + } + + public void setAssistDeptManager(String assistDeptManager) + { + this.assistDeptManager = assistDeptManager; + } + + public String getAssistOrgName() + { + return assistOrgName; + } + + public void setAssistOrgName(String assistOrgName) + { + this.assistOrgName = assistOrgName; + } + + public String getUndertakeDeptManager() + { + return undertakeDeptManager; + } + + public void setUndertakeDeptManager(String undertakeDeptManager) + { + this.undertakeDeptManager = undertakeDeptManager; + } + + public long getUndertakeOrg() + { + return undertakeOrg; + } + + public void setUndertakeOrg(long undertakeOrg) + { + this.undertakeOrg = undertakeOrg; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/complain/DesignComplainView.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/complain/DesignComplainView.java new file mode 100644 index 0000000..0484241 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/complain/DesignComplainView.java @@ -0,0 +1,235 @@ +/** + * 扬彩印刷设计 + * 文件名 :DesignComplainView.java + * 创建人 :gjx + * 创建时间:2019-8-15 + */ + +package com.zhiqim.yangcai.design.dbo.complain; + +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnView; +import org.zhiqim.orm.annotation.AnViewField; +import org.zhiqim.orm.annotation.AnViewJoin; +import org.zhiqim.orm.annotation.AnViewJoinValue; + +/** + * 投诉单视图 + * + * @version 1.0 @author gjx 2019-8-15 新建与整理 + */ +@AnAlias("DesignComplainView") +@AnNew +@AnView("DESIGN_COMPLAIN,DESIGN_ORDER") +@AnViewJoin( +{ + @AnViewJoinValue(type = "EQUAL", lTable = "DESIGN_COMPLAIN", lColumn = "DESIGN_ID", rTable = "DESIGN_ORDER", rColumn = "DESIGN_ID") +}) +public class DesignComplainView extends DesignComplain +{ + private static final long serialVersionUID = 1L; + + @AnViewField(table = "DESIGN_ORDER", column = "MERCHANT_ID") + private long merchantId; // 2.订单商户编号 + @AnViewField(table = "DESIGN_ORDER", column = "ORG_ID") + private long orgId; // 3.操作员组织编号 + @AnViewField(table = "DESIGN_ORDER", column = "OUT_ID") + private long outId; // 4.外部系统单号 + @AnViewField(table = "DESIGN_ORDER", column = "ORDER_TEXT") + private String orderText; // 5.订单描述 + @AnViewField(table = "DESIGN_ORDER", column = "AFTER_NAMES") + private String afterNames; // 6.后加工名称,多个逗号隔开 + @AnViewField(table = "DESIGN_ORDER", column = "AMOUNT") + private long amount; // 7.订单总金额 + @AnViewField(table = "DESIGN_ORDER", column = "PRINT_SPECIAL") + private String printSpecial; // 8.印刷特殊工艺 + @AnViewField(table = "DESIGN_ORDER", column = "TYPE_ID") + private long typeId; // 9.设计类型,名片、彩页、等等 + @AnViewField(table = "DESIGN_ORDER", column = "SHOP_NICK") + private String shopNick; // 10.店铺名称 + @AnViewField(table = "DESIGN_ORDER", column = "DESIGNER") + private String designer; // 11.设计师 + @AnViewField(table = "DESIGN_ORDER", column = "BUYER_NICK") + private String buyerNick; // 12.客户昵称 + @AnViewField(table = "DESIGN_ORDER", column = "USER_CONTACT") + private String userContact; // 13.联系人 + @AnViewField(table = "DESIGN_ORDER", column = "USER_MOBILE") + private String userMobile; // 14.用户手机 + @AnViewField(table = "DESIGN_ORDER", column = "USER_QQ") + private String userQq; // 15.用户QQ + @AnViewField(table = "DESIGN_ORDER", column = "USER_WX") + private String userWx; // 16.用户微信 + @AnViewField(table = "DESIGN_ORDER", column = "CREATE_TIME") + private Timestamp createTime; // 17.创建时间 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public long getMerchantId() + { + return merchantId; + } + + public void setMerchantId(long merchantId) + { + this.merchantId = merchantId; + } + + public long getOrgId() + { + return orgId; + } + + public void setOrgId(long orgId) + { + this.orgId = orgId; + } + + public long getOutId() + { + return outId; + } + + public void setOutId(long outId) + { + this.outId = outId; + } + + public String getOrderText() + { + return orderText; + } + + public void setOrderText(String orderText) + { + this.orderText = orderText; + } + + public String getAfterNames() + { + return afterNames; + } + + public void setAfterNames(String afterNames) + { + this.afterNames = afterNames; + } + + public long getAmount() + { + return amount; + } + + public void setAmount(long amount) + { + this.amount = amount; + } + + public String getPrintSpecial() + { + return printSpecial; + } + + public void setPrintSpecial(String printSpecial) + { + this.printSpecial = printSpecial; + } + + public long getTypeId() + { + return typeId; + } + + public void setTypeId(long typeId) + { + this.typeId = typeId; + } + + public String getShopNick() + { + return shopNick; + } + + public void setShopNick(String shopNick) + { + this.shopNick = shopNick; + } + + public String getDesigner() + { + return designer; + } + + public void setDesigner(String designer) + { + this.designer = designer; + } + + public String getBuyerNick() + { + return buyerNick; + } + + public void setBuyerNick(String buyerNick) + { + this.buyerNick = buyerNick; + } + + public String getUserContact() + { + return userContact; + } + + public void setUserContact(String userContact) + { + this.userContact = userContact; + } + + public String getUserMobile() + { + return userMobile; + } + + public void setUserMobile(String userMobile) + { + this.userMobile = userMobile; + } + + public String getUserQq() + { + return userQq; + } + + public void setUserQq(String userQq) + { + this.userQq = userQq; + } + + public String getUserWx() + { + return userWx; + } + + public void setUserWx(String userWx) + { + this.userWx = userWx; + } + + public Timestamp getCreateTime() + { + return createTime; + } + + public void setCreateTime(Timestamp createTime) + { + this.createTime = createTime; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/AfterPicType.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/AfterPicType.java new file mode 100644 index 0000000..f4f02dd --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/AfterPicType.java @@ -0,0 +1,70 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.design; + +import java.io.Serializable; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 责任类型 对应表《AFTER_PIC_TYPE》 + */ +@AnAlias("AfterPicType") +@AnNew +@AnTable(table="AFTER_PIC_TYPE", key="PIC_TYPE", type="InnoDB") +public class AfterPicType implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column="PIC_TYPE", type="long", notNull=true) private long picType; //1.责任类型 + @AnTableField(column="PIC_TYPE_NAME", type="string,128", notNull=true) private String picTypeName; //2.责任类型名 + @AnTableField(column="PIC_STATUS", type="int", notNull=true) private int picStatus; //3.0 正常 : 1 停用 + + public String toString() + { + return Jsons.toString(this); + } + + public long getPicType() + { + return picType; + } + + public void setPicType(long picType) + { + this.picType = picType; + } + + public String getPicTypeName() + { + return picTypeName; + } + + public void setPicTypeName(String picTypeName) + { + this.picTypeName = picTypeName; + } + + public int getPicStatus() + { + return picStatus; + } + + public void setPicStatus(int picStatus) + { + this.picStatus = picStatus; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/AfterProblemType.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/AfterProblemType.java new file mode 100644 index 0000000..350476b --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/AfterProblemType.java @@ -0,0 +1,81 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.design; + +import java.io.Serializable; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 问题类型 对应表《AFTER_PROBLEM_TYPE》 + */ +@AnAlias("AfterProblemType") +@AnNew +@AnTable(table="AFTER_PROBLEM_TYPE", key="PROBLEM_TYPE", type="InnoDB") +public class AfterProblemType implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column="PIC_TYPE", type="long", notNull=true) private long picType; //1.属于责任类型 + @AnTableField(column="PROBLEM_TYPE", type="long", notNull=true) private long problemType; //2.问题类型编号 + @AnTableField(column="PROBLEM_NAME", type="string,64", notNull=true) private String problemName; //3.问题类型名 + @AnTableField(column="PROBLEM_STATUS", type="int", notNull=true) private int problemStatus; //4.0 正常 : 1 停用 + + public String toString() + { + return Jsons.toString(this); + } + + public long getPicType() + { + return picType; + } + + public void setPicType(long picType) + { + this.picType = picType; + } + + public long getProblemType() + { + return problemType; + } + + public void setProblemType(long problemType) + { + this.problemType = problemType; + } + + public String getProblemName() + { + return problemName; + } + + public void setProblemName(String problemName) + { + this.problemName = problemName; + } + + public int getProblemStatus() + { + return problemStatus; + } + + public void setProblemStatus(int problemStatus) + { + this.problemStatus = problemStatus; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/DesignIndustry.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/DesignIndustry.java new file mode 100644 index 0000000..d92aa53 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/DesignIndustry.java @@ -0,0 +1,99 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.dbo.design; + +import java.io.Serializable; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 设计行业表 对应表《DESIGN_INDUSTRY》 + */ +@AnAlias("DesignIndustry") +@AnNew +@AnTable(table = "DESIGN_INDUSTRY", key = "INDUSTRY_ID", type = "InnoDB") +public class DesignIndustry implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "INDUSTRY_ID", type = "long", notNull = true) + private long industryId; // 1.行业编号 + @AnTableField(column = "INDUSTRY_NAME", type = "string,20", notNull = true) + private String industryName; // 2.行业名称 + @AnTableField(column = "INDUSTRY_KEYWORDS", type = "string,5000", notNull = false) + private String industryKeywords; // 3.行业关键词 + @AnTableField(column = "INDUSTRY_SEQ", type = "int", notNull = true) + private int industrySeq; // 4.序号 + @AnTableField(column = "IS_ENABLED", type = "boolean", notNull = true) + private boolean isEnabled; // 5.状态 true=正常、false=停用 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public long getIndustryId() + { + return industryId; + } + + public void setIndustryId(long industryId) + { + this.industryId = industryId; + } + + public String getIndustryName() + { + return industryName; + } + + public void setIndustryName(String industryName) + { + this.industryName = industryName; + } + + public String getIndustryKeywords() + { + return industryKeywords; + } + + public void setIndustryKeywords(String industryKeywords) + { + this.industryKeywords = industryKeywords; + } + + public int getIndustrySeq() + { + return industrySeq; + } + + public void setIndustrySeq(int industrySeq) + { + this.industrySeq = industrySeq; + } + + public boolean isEnabled() + { + return isEnabled; + } + + public void setEnabled(boolean isEnabled) + { + this.isEnabled = isEnabled; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/DesignMerchant.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/DesignMerchant.java new file mode 100644 index 0000000..b2acac9 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/DesignMerchant.java @@ -0,0 +1,81 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.design; + +import java.io.Serializable; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 设计订单商户表 对应表《DESIGN_MERCHANT》 + */ +@AnAlias("DesignMerchant") +@AnNew +@AnTable(table="DESIGN_MERCHANT", key="MERCHANT_ID", type="InnoDB") +public class DesignMerchant implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column="MERCHANT_ID", type="long", notNull=true) private long merchantId; //1.商户编号 + @AnTableField(column="MERCHANT_NAME", type="string,20", notNull=true) private String merchantName; //2.商户名 + @AnTableField(column="MERCHANT_SECRET", type="string,2048", notNull=true) private String merchantSecret; //3.商户秘钥 + @AnTableField(column="IS_ENABLED", type="boolean", notNull=true) private boolean isEnabled; //4.商户状态 =true 表示 正常 =false 停用 + + public String toString() + { + return Jsons.toString(this); + } + + public long getMerchantId() + { + return merchantId; + } + + public void setMerchantId(long merchantId) + { + this.merchantId = merchantId; + } + + public String getMerchantName() + { + return merchantName; + } + + public void setMerchantName(String merchantName) + { + this.merchantName = merchantName; + } + + public String getMerchantSecret() + { + return merchantSecret; + } + + public void setMerchantSecret(String merchantSecret) + { + this.merchantSecret = merchantSecret; + } + + public boolean isEnabled() + { + return isEnabled; + } + + public void setEnabled(boolean isEnabled) + { + this.isEnabled = isEnabled; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/DesignOrgMer.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/DesignOrgMer.java new file mode 100644 index 0000000..883c096 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/DesignOrgMer.java @@ -0,0 +1,329 @@ +package com.zhiqim.yangcai.design.dbo.design; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 组织接单规则表 对应表《DESIGN_ORG_MER》 + */ +@AnAlias("DesignOrgMer") +@AnNew +@AnTable(table = "DESIGN_ORG_MER", key = "ORG_ID", type = "InnoDB") +public class DesignOrgMer implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "ORG_ID", type = "long", notNull = true) + private long orgId; // 1.组织编号 + @AnTableField(column = "MER_STATUS", type = "int", notNull = true) + private int merStatus; // 2.商户状态 0=正常 1=停用 + @AnTableField(column = "DESIGN_TYPE_IDS", type = "string,400", notNull = false) + private String designTypeIds; // 3.支持的产品类型ID 多个逗号隔开,为空表示默认全部支持,条件已弃用 + @AnTableField(column = "INDUSTRY_IDS", type = "string,400", notNull = false) + private String industryIds; // 4.支持的行业类型 多个逗号隔开,为空表示默认全部支持 条件已弃用 + @AnTableField(column = "MER_MAX_ORDER", type = "int", notNull = true) + private int merMaxOrder; // 5.商户当天最大派单量 条件已弃用 + @AnTableField(column = "MER_MAX_WAIT_ORDER", type = "int", notNull = true) + private int merMaxWaitOrder; // 6.最大未领单数 条件已弃用 + @AnTableField(column = "PERSONAL_MAX_ORDER", type = "int", notNull = true) + private int personalMaxOrder; // 7.商户个人最大同时接单量,条件已弃用 + @AnTableField(column = "MAX_ORDER_AMOUNT", type = "long", notNull = true) + private long maxOrderAmount; // 8.订单最大金额 条件已弃用 + @AnTableField(column = "MER_LEVEL", type = "int", notNull = true) + private int merLevel; // 9.商家派单优先级 + @AnTableField(column = "IS_URGENT", type = "boolean", notNull = true) + private boolean isUrgent; // 11.是否支持加急单 =false 默认不支持 条件已弃用 + @AnTableField(column = "IS_PAUSE_RECIEIVE", type = "boolean", notNull = true) + private boolean isPauseRecieive; // 12.是否暂停接单 + @AnTableField(column = "IS_SPECIAL", type = "boolean", notNull = true) + private boolean isSpecial; // 13.是否支持异型订单 条件已弃用 + @AnTableField(column = "RECIEIVE_TIME", type = "string,400", notNull = false) + private String recieiveTime; // 17.商户接单时间段 条件已弃用 + @AnTableField(column = "ORDER_SHOP", type = "string,400", notNull = false) + private String orderShop; // 18.商户接单店铺 条件已弃用 + @AnTableField(column = "AFTER_NAMES", type = "string,4000", notNull = false) + private String afterNames; // 19.后加工名称,多个逗号隔开 条件已弃用 + @AnTableField(column = "MIN_ORDER_AMOUNT", type = "long", notNull = true) + private long minOrderAmount; // 20.订单最小金额 条件已弃用 + @AnTableField(column = "IS_DESIGN_ORDER", type = "boolean", notNull = true) + private boolean isDesignOrder; // 21.是否接取普通设计订单 条件已弃用 + @AnTableField(column = "IS_SENIOR_DESIGN_ORDER", type = "boolean", notNull = true) + private boolean isSeniorDesignOrder; // 22.是否接取资深设计订单, 条件已弃用 + @AnTableField(column = "IS_NORM_DRAFT_ORDER", type = "boolean", notNull = true) + private boolean isNormDraftOrder; // 23.是否接取标准自来稿, 条件已弃用 + @AnTableField(column = "IS_DRAFT_ORDER", type = "boolean", notNull = true) + private boolean isDraftOrder; // 24.是否接取改稿自来稿, 条件已弃用 + @AnTableField(column = "IS_HIGH_QUALITY_ORDER", type = "boolean", notNull = false) + private boolean isHighQualityOrder; // 25.是否优质订单, 条件已弃用 + @AnTableField(column = "MER_MAX_ORDINARY_ORDER", type = "int", notNull = true) + private int merMaxOrdinaryOrder; // 26.商户普通订单最大未领单量, 条件已弃用 + @AnTableField(column = "PERSONAL_MAX_ORDINARY_ORDER", type = "int", notNull = true) + private int personalMaxOrdinaryOrder; // 27.个人普通订单最大同时接单量 条件已弃用 + @AnTableField(column = "MODIFY_OPERATOR_CODE", type = "string,32", notNull = false) + private String modifyOperatorCode; // 28.修改操作员 + @AnTableField(column = "MODIFY_TIME", type = "datetime", notNull = false) + private Timestamp modifyTime; // 29.修改时间 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public long getOrgId() + { + return orgId; + } + + public void setOrgId(long orgId) + { + this.orgId = orgId; + } + + public int getMerStatus() + { + return merStatus; + } + + public void setMerStatus(int merStatus) + { + this.merStatus = merStatus; + } + + public String getDesignTypeIds() + { + return designTypeIds; + } + + public void setDesignTypeIds(String designTypeIds) + { + this.designTypeIds = designTypeIds; + } + + public String getIndustryIds() + { + return industryIds; + } + + public void setIndustryIds(String industryIds) + { + this.industryIds = industryIds; + } + + public int getMerMaxOrder() + { + return merMaxOrder; + } + + public void setMerMaxOrder(int merMaxOrder) + { + this.merMaxOrder = merMaxOrder; + } + + public int getMerMaxWaitOrder() + { + return merMaxWaitOrder; + } + + public void setMerMaxWaitOrder(int merMaxWaitOrder) + { + this.merMaxWaitOrder = merMaxWaitOrder; + } + + public int getPersonalMaxOrder() + { + return personalMaxOrder; + } + + public void setPersonalMaxOrder(int personalMaxOrder) + { + this.personalMaxOrder = personalMaxOrder; + } + + public long getMaxOrderAmount() + { + return maxOrderAmount; + } + + public void setMaxOrderAmount(long maxOrderAmount) + { + this.maxOrderAmount = maxOrderAmount; + } + + public int getMerLevel() + { + return merLevel; + } + + public void setMerLevel(int merLevel) + { + this.merLevel = merLevel; + } + + public boolean isUrgent() + { + return isUrgent; + } + + public void setUrgent(boolean isUrgent) + { + this.isUrgent = isUrgent; + } + + public boolean isPauseRecieive() + { + return isPauseRecieive; + } + + public void setPauseRecieive(boolean isPauseRecieive) + { + this.isPauseRecieive = isPauseRecieive; + } + + public boolean isSpecial() + { + return isSpecial; + } + + public void setSpecial(boolean isSpecial) + { + this.isSpecial = isSpecial; + } + + public String getRecieiveTime() + { + return recieiveTime; + } + + public void setRecieiveTime(String recieiveTime) + { + this.recieiveTime = recieiveTime; + } + + public String getOrderShop() + { + return orderShop; + } + + public void setOrderShop(String orderShop) + { + this.orderShop = orderShop; + } + + public String getAfterNames() + { + return afterNames; + } + + public void setAfterNames(String afterNames) + { + this.afterNames = afterNames; + } + + public long getMinOrderAmount() + { + return minOrderAmount; + } + + public void setMinOrderAmount(long minOrderAmount) + { + this.minOrderAmount = minOrderAmount; + } + + public boolean isDesignOrder() + { + return isDesignOrder; + } + + public void setDesignOrder(boolean isDesignOrder) + { + this.isDesignOrder = isDesignOrder; + } + + public boolean isSeniorDesignOrder() + { + return isSeniorDesignOrder; + } + + public void setSeniorDesignOrder(boolean isSeniorDesignOrder) + { + this.isSeniorDesignOrder = isSeniorDesignOrder; + } + + public boolean isNormDraftOrder() + { + return isNormDraftOrder; + } + + public void setNormDraftOrder(boolean isNormDraftOrder) + { + this.isNormDraftOrder = isNormDraftOrder; + } + + public boolean isDraftOrder() + { + return isDraftOrder; + } + + public void setDraftOrder(boolean isDraftOrder) + { + this.isDraftOrder = isDraftOrder; + } + + public boolean isHighQualityOrder() + { + return isHighQualityOrder; + } + + public void setHighQualityOrder(boolean isHighQualityOrder) + { + this.isHighQualityOrder = isHighQualityOrder; + } + + public int getMerMaxOrdinaryOrder() + { + return merMaxOrdinaryOrder; + } + + public void setMerMaxOrdinaryOrder(int merMaxOrdinaryOrder) + { + this.merMaxOrdinaryOrder = merMaxOrdinaryOrder; + } + + public int getPersonalMaxOrdinaryOrder() + { + return personalMaxOrdinaryOrder; + } + + public void setPersonalMaxOrdinaryOrder(int personalMaxOrdinaryOrder) + { + this.personalMaxOrdinaryOrder = personalMaxOrdinaryOrder; + } + + public String getModifyOperatorCode() + { + return modifyOperatorCode; + } + + public void setModifyOperatorCode(String modifyOperatorCode) + { + this.modifyOperatorCode = modifyOperatorCode; + } + + public Timestamp getModifyTime() + { + return modifyTime; + } + + public void setModifyTime(Timestamp modifyTime) + { + this.modifyTime = modifyTime; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/DesignPrice.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/DesignPrice.java new file mode 100644 index 0000000..674b8df --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/DesignPrice.java @@ -0,0 +1,106 @@ +package com.zhiqim.yangcai.design.dbo.design; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 设计单价表 对应表《design_price》 + */ +@AnAlias("DesignPrice") +@AnNew +@AnTable(table = "DESIGN_PRICE", key = "price_id", type = "InnoDB") +public class DesignPrice implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "price_id", type = "long", notNull = true) + private long priceId; // 设计单价ID + @AnTableField(column = "CONVERT_ID", type = "long", notNull = true) + private long convertId; // 产品单价id + @AnTableField(column = "PRD_TYPE_ID", type = "long", notNull = true) + private long prdTypeId; // 产品类型编号 + @AnTableField(column = "draft_type", type = "int", notNull = true) + private int draftType;// 稿件类型 + @AnTableField(column = "design_price_money", type = "long", notNull = true) + private long designPriceMoney;// 设计单价金额 + @AnTableField(column = "effect_time", type = "datetime", notNull = false) + private Timestamp effectTime;// 生效时间 + @AnTableField(column = "status", type = "int", notNull = true) + private int status;// 设计单价状态(0失效,1生效) + + public long getPriceId() + { + return priceId; + } + + public void setPriceId(long priceId) + { + this.priceId = priceId; + } + + public long getConvertId() + { + return convertId; + } + + public void setConvertId(long convertId) + { + this.convertId = convertId; + } + + public long getPrdTypeId() + { + return prdTypeId; + } + + public void setPrdTypeId(long prdTypeId) + { + this.prdTypeId = prdTypeId; + } + + public int getDraftType() + { + return draftType; + } + + public void setDraftType(int draftType) + { + this.draftType = draftType; + } + + public long getDesignPriceMoney() + { + return designPriceMoney; + } + + public void setDesignPriceMoney(long designPriceMoney) + { + this.designPriceMoney = designPriceMoney; + } + + public Timestamp getEffectTime() + { + return effectTime; + } + + public void setEffectTime(Timestamp effectTime) + { + this.effectTime = effectTime; + } + + public int getStatus() + { + return status; + } + + public void setStatus(int status) + { + this.status = status; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/DesignSize.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/DesignSize.java new file mode 100644 index 0000000..fd01b4a --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/DesignSize.java @@ -0,0 +1,125 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.design; + +import java.io.Serializable; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 设计尺寸表 对应表《DESIGN_SIZE》 + */ +@AnAlias("DesignSize") +@AnNew +@AnTable(table="DESIGN_SIZE", key="SIZE_ID", type="InnoDB") +public class DesignSize implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column="TYPE_ID", type="long", notNull=true) private long typeId; //1.订单类型编号 + @AnTableField(column="SIZE_ID", type="long", notNull=true) private long sizeId; //2.尺寸编号 + @AnTableField(column="SIZE_STATUS", type="int", notNull=true) private int sizeStatus; //3.尺寸状态,0:正常,1:停用 + @AnTableField(column="SIZE_WIDTH", type="decimal,5,2", notNull=true) private double sizeWidth; //4.设计尺寸宽度,单位mm,最多支持两位小数 + @AnTableField(column="SIZE_HEIGHT", type="decimal,5,2", notNull=true) private double sizeHeight; //5.设计尺寸高度,单位mm,最多支持两位小数 + @AnTableField(column="SIZE_SIDE", type="decimal,5,2", notNull=false) private double sizeSide; //6.设计尺寸侧面长度,单位mm,最多支持两位小数,某些类型的产品需要填写 + @AnTableField(column="SIZE_BLEED", type="decimal,5,2", notNull=true) private double sizeBleed; //7.设计出血,单位mm,最多支持两位小数 + @AnTableField(column="SIZE_SEQ", type="int", notNull=true) private int sizeSeq; //8.序号 + + public String toString() + { + return Jsons.toString(this); + } + + public long getTypeId() + { + return typeId; + } + + public void setTypeId(long typeId) + { + this.typeId = typeId; + } + + public long getSizeId() + { + return sizeId; + } + + public void setSizeId(long sizeId) + { + this.sizeId = sizeId; + } + + public int getSizeStatus() + { + return sizeStatus; + } + + public void setSizeStatus(int sizeStatus) + { + this.sizeStatus = sizeStatus; + } + + public double getSizeWidth() + { + return sizeWidth; + } + + public void setSizeWidth(double sizeWidth) + { + this.sizeWidth = sizeWidth; + } + + public double getSizeHeight() + { + return sizeHeight; + } + + public void setSizeHeight(double sizeHeight) + { + this.sizeHeight = sizeHeight; + } + + public double getSizeSide() + { + return sizeSide; + } + + public void setSizeSide(double sizeSide) + { + this.sizeSide = sizeSide; + } + + public double getSizeBleed() + { + return sizeBleed; + } + + public void setSizeBleed(double sizeBleed) + { + this.sizeBleed = sizeBleed; + } + + public int getSizeSeq() + { + return sizeSeq; + } + + public void setSizeSeq(int sizeSeq) + { + this.sizeSeq = sizeSeq; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/DesignType.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/DesignType.java new file mode 100644 index 0000000..aed013b --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/DesignType.java @@ -0,0 +1,208 @@ +package com.zhiqim.yangcai.design.dbo.design; + +import java.io.Serializable; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 设计平台产品类型表 对应表《DESIGN_TYPE》 + */ +@AnAlias("DesignType") +@AnNew +@AnTable(table = "DESIGN_TYPE", key = "TYPE_ID", type = "InnoDB") +public class DesignType implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "TYPE_ID", type = "long", notNull = true) + private long typeId; // 1.类型编号 + @AnTableField(column = "TYPE_NAME", type = "string,200", notNull = true) + private String typeName; // 2.类型名, 例如:名片、彩页、画册 + @AnTableField(column = "IS_ENABLED", type = "boolean", notNull = true) + private boolean isEnabled; // 3.状态 true=正常、false=停用 + @AnTableField(column = "MER_DISPATCH_EFFECTIVE_TIME", type = "int", notNull = true) + private int merDispatchEffectiveTime; // 4.分拣时效(分拣时间),单位分钟 + @AnTableField(column = "DISPATCH_ORDER_EFFECTIVE_TIME", type = "int", notNull = true) + private int dispatchOrderEffectiveTime; // 5.派单时效(派单时间),单位分钟 + @AnTableField(column = "EFFECTIVE_TIME", type = "int", notNull = true) + private int effectiveTime; // 6.初稿时效(初稿时间),单位分钟 + @AnTableField(column = "EFFECTIVE_END_TIME", type = "int", notNull = true) + private int effectiveEndTime; // 7.定稿时效(定稿时间),单位分钟 + @AnTableField(column = "TYPE_SEQ", type = "int", notNull = true) + private int typeSeq; // 8.排序 + @AnTableField(column = "SIZE_M_WIDTH", type = "decimal,5,2", notNull = true) + private double sizeMWidth; // 9.设计尺寸宽度,单位mm,最多支持两位小数 + @AnTableField(column = "SIZE_M_HEIGHT", type = "decimal,5,2", notNull = true) + private double sizeMHeight; // 10.设计尺寸高度,单位mm,最多支持两位小数 + @AnTableField(column = "DESIGN_FILE_TYPE", type = "string,100", notNull = true) + private String designFileType; // 11.设计文件上传类型 + @AnTableField(column = "PRINTING_FILE_TYPE", type = "string,100", notNull = true) + private String printingFileType; // 12.印刷文件上传类型 + @AnTableField(column = "BLEEDING", type = "decimal,5,2", notNull = true) + private double bleeding; // 13.产品出血 + @AnTableField(column = "DPI", type = "decimal,5,2", notNull = true) + private double dpi; // 14.产品分辨率 + @AnTableField(column = "CONTENT", type = "string,1000", notNull = false) + private String content; // 1.订单类型编号 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public long getTypeId() + { + return typeId; + } + + public void setTypeId(long typeId) + { + this.typeId = typeId; + } + + public String getTypeName() + { + return typeName; + } + + public void setTypeName(String typeName) + { + this.typeName = typeName; + } + + public boolean isEnabled() + { + return isEnabled; + } + + public void setEnabled(boolean isEnabled) + { + this.isEnabled = isEnabled; + } + + public int getMerDispatchEffectiveTime() + { + return merDispatchEffectiveTime; + } + + public void setMerDispatchEffectiveTime(int merDispatchEffectiveTime) + { + this.merDispatchEffectiveTime = merDispatchEffectiveTime; + } + + public int getDispatchOrderEffectiveTime() + { + return dispatchOrderEffectiveTime; + } + + public void setDispatchOrderEffectiveTime(int dispatchOrderEffectiveTime) + { + this.dispatchOrderEffectiveTime = dispatchOrderEffectiveTime; + } + + public int getEffectiveTime() + { + return effectiveTime; + } + + public void setEffectiveTime(int effectiveTime) + { + this.effectiveTime = effectiveTime; + } + + public int getEffectiveEndTime() + { + return effectiveEndTime; + } + + public void setEffectiveEndTime(int effectiveEndTime) + { + this.effectiveEndTime = effectiveEndTime; + } + + public int getTypeSeq() + { + return typeSeq; + } + + public void setTypeSeq(int typeSeq) + { + this.typeSeq = typeSeq; + } + + public double getSizeMWidth() + { + return sizeMWidth; + } + + public void setSizeMWidth(double sizeMWidth) + { + this.sizeMWidth = sizeMWidth; + } + + public double getSizeMHeight() + { + return sizeMHeight; + } + + public void setSizeMHeight(double sizeMHeight) + { + this.sizeMHeight = sizeMHeight; + } + + public String getDesignFileType() + { + return designFileType; + } + + public void setDesignFileType(String designFileType) + { + this.designFileType = designFileType; + } + + public String getPrintingFileType() + { + return printingFileType; + } + + public void setPrintingFileType(String printingFileType) + { + this.printingFileType = printingFileType; + } + + public double getBleeding() + { + return bleeding; + } + + public void setBleeding(double bleeding) + { + this.bleeding = bleeding; + } + + public double getDpi() + { + return dpi; + } + + public void setDpi(double dpi) + { + this.dpi = dpi; + } + + public String getContent() + { + return content; + } + + public void setContent(String content) + { + this.content = content; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/DesignTypeContent.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/DesignTypeContent.java new file mode 100644 index 0000000..fb64cf5 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/DesignTypeContent.java @@ -0,0 +1,64 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.dbo.design; + +import java.io.Serializable; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 设计订单类型表 对应表《DESIGN_TYPE》 + */ +@AnAlias("DesignTypeContent") +@AnNew +@AnTable(table = "DESIGN_TYPE_CONTENT", key = "TYPE_ID", type = "InnoDB") +public class DesignTypeContent implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "TYPE_ID", type = "long", notNull = true) + private long typeId; // 1.订单类型编号 + @AnTableField(column = "CONTENT", type = "string,1000", notNull = false) + private String content; // 1.订单类型编号 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public long getTypeId() + { + return typeId; + } + + public void setTypeId(long typeId) + { + this.typeId = typeId; + } + + + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/DesignerGroup.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/DesignerGroup.java new file mode 100644 index 0000000..9510025 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/DesignerGroup.java @@ -0,0 +1,233 @@ +package com.zhiqim.yangcai.design.dbo.design; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 设计师接单规则组表 对应表《DesignerGroup》 + */ +@AnAlias("DesignerGroup") +@AnNew +@AnTable(table = "DESIGNER_GROUP", key = "DESIGNER_GROUP_ID", type = "InnoDB") +public class DesignerGroup implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "DESIGNER_GROUP_ID", type = "long", notNull = true) + private long designerGroupId; // 1.接单规则组id + @AnTableField(column = "DESIGNER_GROUP_NAME", type = "string,32", notNull = true) + private String designerGroupName; // 2.接单规则组名称 + @AnTableField(column = "MAX_ORDER_AMOUNT", type = "long", notNull = true) + private long maxOrderAmount; // 3.订单最大金额 + @AnTableField(column = "MIN_ORDER_AMOUNT", type = "long", notNull = false) + private long minOrderAmount; // 4.订单最小金额 + @AnTableField(column = "IS_HIGH_QUALITY_ORDER", type = "boolean", notNull = true) + private boolean isHighQualityOrder; // 5.是否优质订单 + @AnTableField(column = "IS_LARGE_AMOUNT", type = "boolean", notNull = true) + private boolean isLargeAmount; // 6.是否大金额订单 + @AnTableField(column = "IS_URGENT", type = "boolean", notNull = true) + private boolean isUrgent; // 7.是否支持加急单 =false 默认不支持 + @AnTableField(column = "IS_DESIGN", type = "boolean", notNull = true) + private boolean isDesign; // 8.是否支持只设计不印刷单 =false 默认不支持 + @AnTableField(column = "IS_SPECIAL", type = "boolean", notNull = true) + private boolean isSpecial; // 9.是否支持异型订单 + @AnTableField(column = "AFTER_NAMES", type = "string,4000", notNull = false) + private String afterNames; // 10.后加工名称,多个逗号隔开 + @AnTableField(column = "MERCHANT_IDS", type = "string,1000", notNull = false) + private String merchantIds; // 11.关联渠道ID,多个逗号隔开 + @AnTableField(column = "REMARK", type = "string,6000", notNull = false) + private String remark; // 12.备注 + @AnTableField(column = "STATUS", type = "int", notNull = true) + private int status; // 13.状态 + @AnTableField(column = "MAX_ORDER_NUM", type = "int", notNull = true) + private int maxOrderNum; // 14.最大接单量(老用户除外) + @AnTableField(column = "MODIFY_OPERATOR_CODE", type = "string,32", notNull = false) + private String modifyOperatorCode; // 15.修改操作员 + @AnTableField(column = "MODIFY_TIME", type = "datetime", notNull = false) + private Timestamp modifyTime; // 16.修改时间 + @AnTableField(column = "MAX_WAIVE_NUM", type = "int", notNull = true) + private int maxWaiveNum; // 17.订单最大放弃次数(月度) + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public long getDesignerGroupId() + { + return designerGroupId; + } + + public void setDesignerGroupId(long designerGroupId) + { + this.designerGroupId = designerGroupId; + } + + public String getDesignerGroupName() + { + return designerGroupName; + } + + public void setDesignerGroupName(String designerGroupName) + { + this.designerGroupName = designerGroupName; + } + + public long getMaxOrderAmount() + { + return maxOrderAmount; + } + + public void setMaxOrderAmount(long maxOrderAmount) + { + this.maxOrderAmount = maxOrderAmount; + } + + public long getMinOrderAmount() + { + return minOrderAmount; + } + + public void setMinOrderAmount(long minOrderAmount) + { + this.minOrderAmount = minOrderAmount; + } + + public boolean isHighQualityOrder() + { + return isHighQualityOrder; + } + + public void setHighQualityOrder(boolean isHighQualityOrder) + { + this.isHighQualityOrder = isHighQualityOrder; + } + + public boolean isLargeAmount() + { + return isLargeAmount; + } + + public void setLargeAmount(boolean isLargeAmount) + { + this.isLargeAmount = isLargeAmount; + } + + public boolean isUrgent() + { + return isUrgent; + } + + public void setUrgent(boolean isUrgent) + { + this.isUrgent = isUrgent; + } + + public boolean isDesign() + { + return isDesign; + } + + public void setDesign(boolean isDesign) + { + this.isDesign = isDesign; + } + + public boolean isSpecial() + { + return isSpecial; + } + + public void setSpecial(boolean isSpecial) + { + this.isSpecial = isSpecial; + } + + public String getAfterNames() + { + return afterNames; + } + + public void setAfterNames(String afterNames) + { + this.afterNames = afterNames; + } + + public String getRemark() + { + return remark; + } + + public void setRemark(String remark) + { + this.remark = remark; + } + + public int getStatus() + { + return status; + } + + public void setStatus(int status) + { + this.status = status; + } + + public String getModifyOperatorCode() + { + return modifyOperatorCode; + } + + public void setModifyOperatorCode(String modifyOperatorCode) + { + this.modifyOperatorCode = modifyOperatorCode; + } + + public Timestamp getModifyTime() + { + return modifyTime; + } + + public void setModifyTime(Timestamp modifyTime) + { + this.modifyTime = modifyTime; + } + + public int getMaxOrderNum() + { + return maxOrderNum; + } + + public void setMaxOrderNum(int maxOrderNum) + { + this.maxOrderNum = maxOrderNum; + } + + public int getMaxWaiveNum() + { + return maxWaiveNum; + } + + public void setMaxWaiveNum(int maxWaiveNum) + { + this.maxWaiveNum = maxWaiveNum; + } + + public String getMerchantIds() + { + return merchantIds; + } + + public void setMerchantIds(String merchantIds) + { + this.merchantIds = merchantIds; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/DesignerGroupDispatch.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/DesignerGroupDispatch.java new file mode 100644 index 0000000..eb0f57f --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/DesignerGroupDispatch.java @@ -0,0 +1,257 @@ +package com.zhiqim.yangcai.design.dbo.design; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 设计师接单规则表 对应表《DesignerGroupDispatch》 + */ +@AnAlias("DesignerGroupDispatch") +@AnNew +@AnTable(table = "DESIGNER_GROUP_DISPATCH", key = "OPERATOR_CODE", type = "InnoDB") +public class DesignerGroupDispatch implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "OPERATOR_CODE", type = "string,32", notNull = true) + private String operatorCode; // 1.操作员编码 + @AnTableField(column = "ORG_ID", type = "long", notNull = true) + private long orgId; // 2.操作员组织编号 + @AnTableField(column = "DESIGNER_GROUP_ID", type = "long", notNull = true) + private long designerGroupId; // 2.接单规则组id + @AnTableField(column = "MAX_ORDER_AMOUNT", type = "long", notNull = true) + private long maxOrderAmount; // 3.订单最大金额 + @AnTableField(column = "MIN_ORDER_AMOUNT", type = "long", notNull = false) + private long minOrderAmount; // 4.订单最小金额 + @AnTableField(column = "IS_HIGH_QUALITY_ORDER", type = "boolean", notNull = true) + private boolean isHighQualityOrder; // 5.是否优质订单 + @AnTableField(column = "IS_LARGE_AMOUNT", type = "boolean", notNull = true) + private boolean isLargeAmount; // 6.是否大金额订单 + @AnTableField(column = "IS_URGENT", type = "boolean", notNull = true) + private boolean isUrgent; // 7.是否支持加急单 =false 默认不支持 + @AnTableField(column = "IS_DESIGN", type = "boolean", notNull = true) + private boolean isDesign; // 8.是否支持只设计不印刷单 =false 默认不支持 + @AnTableField(column = "IS_SPECIAL", type = "boolean", notNull = true) + private boolean isSpecial; // 9.是否支持异型订单 + @AnTableField(column = "AFTER_NAMES", type = "string,4000", notNull = false) + private String afterNames; // 10.后加工名称,多个逗号隔开 + @AnTableField(column = "MERCHANT_IDS", type = "string,1000", notNull = false) + private String merchantIds; // 11.关联渠道ID,多个逗号隔开 + @AnTableField(column = "STATUS", type = "int", notNull = true) + private int status; // 12.状态:0失效,1正常 + @AnTableField(column = "MODIFY_OPERATOR_CODE", type = "string,32", notNull = false) + private String modifyOperatorCode; // 13.修改操作员 + @AnTableField(column = "MODIFY_TIME", type = "datetime", notNull = false) + private Timestamp modifyTime; // 14.修改时间 + @AnTableField(column = "MAX_ORDER_NUM", type = "int", notNull = false) + private int maxOrderNum; // 15.最大接单量(老用户除外) + @AnTableField(column = "WAIVE_NUM", type = "int", notNull = false) + private int waiveNum; // 16.设计师当月可放弃订单数量 + @AnTableField(column = "IS_SHOW_COST", type = "int", notNull = true) + private int isShowCost; // 17。是否展示佣金:0不显示。1显示 + @AnTableField(column = "IS_SHOW_Qddt", type = "int", notNull = true) + private int isShowQddt; // 18。是否展示抢单大厅:0不显示。1显示 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public String getOperatorCode() + { + return operatorCode; + } + + public void setOperatorCode(String operatorCode) + { + this.operatorCode = operatorCode; + } + + public long getDesignerGroupId() + { + return designerGroupId; + } + + public void setDesignerGroupId(long designerGroupId) + { + this.designerGroupId = designerGroupId; + } + + public long getMaxOrderAmount() + { + return maxOrderAmount; + } + + public void setMaxOrderAmount(long maxOrderAmount) + { + this.maxOrderAmount = maxOrderAmount; + } + + public long getMinOrderAmount() + { + return minOrderAmount; + } + + public void setMinOrderAmount(long minOrderAmount) + { + this.minOrderAmount = minOrderAmount; + } + + public boolean isHighQualityOrder() + { + return isHighQualityOrder; + } + + public void setHighQualityOrder(boolean isHighQualityOrder) + { + this.isHighQualityOrder = isHighQualityOrder; + } + + public boolean isLargeAmount() + { + return isLargeAmount; + } + + public void setLargeAmount(boolean isLargeAmount) + { + this.isLargeAmount = isLargeAmount; + } + + public boolean isUrgent() + { + return isUrgent; + } + + public void setUrgent(boolean isUrgent) + { + this.isUrgent = isUrgent; + } + + public boolean isDesign() + { + return isDesign; + } + + public void setDesign(boolean isDesign) + { + this.isDesign = isDesign; + } + + public boolean isSpecial() + { + return isSpecial; + } + + public void setSpecial(boolean isSpecial) + { + this.isSpecial = isSpecial; + } + + public String getAfterNames() + { + return afterNames; + } + + public void setAfterNames(String afterNames) + { + this.afterNames = afterNames; + } + + public int getStatus() + { + return status; + } + + public void setStatus(int status) + { + this.status = status; + } + + public String getModifyOperatorCode() + { + return modifyOperatorCode; + } + + public void setModifyOperatorCode(String modifyOperatorCode) + { + this.modifyOperatorCode = modifyOperatorCode; + } + + public Timestamp getModifyTime() + { + return modifyTime; + } + + public void setModifyTime(Timestamp modifyTime) + { + this.modifyTime = modifyTime; + } + + public long getOrgId() + { + return orgId; + } + + public void setOrgId(long orgId) + { + this.orgId = orgId; + } + + public int getMaxOrderNum() + { + return maxOrderNum; + } + + public void setMaxOrderNum(int maxOrderNum) + { + this.maxOrderNum = maxOrderNum; + } + + public int getWaiveNum() + { + return waiveNum; + } + + public void setWaiveNum(int waiveNum) + { + this.waiveNum = waiveNum; + } + + public String getMerchantIds() + { + return merchantIds; + } + + public void setMerchantIds(String merchantIds) + { + this.merchantIds = merchantIds; + } + + public int getIsShowCost() + { + return isShowCost; + } + + public void setIsShowCost(int isShowCost) + { + this.isShowCost = isShowCost; + } + + public int getIsShowQddt() + { + return isShowQddt; + } + + public void setIsShowQddt(int isShowQddt) + { + this.isShowQddt = isShowQddt; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/DesignerGroupDispatchValue.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/DesignerGroupDispatchValue.java new file mode 100644 index 0000000..2697d03 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/DesignerGroupDispatchValue.java @@ -0,0 +1,76 @@ +package com.zhiqim.yangcai.design.dbo.design; + +import java.io.Serializable; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 设计师组关联设计师的属性值表 对应表《DesignerGroupDispatchValue》 + */ +@AnAlias("DesignerGroupDispatchValue") +@AnNew +@AnTable(table = "DESIGNER_GROUP_DISPATCH_VALUE", key = "DESIGNER_GROUP_DISPATCH_VALUE_ID", type = "InnoDB") +public class DesignerGroupDispatchValue implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "DESIGNER_GROUP_DISPATCH_VALUE_ID", type = "long", notNull = true) + private long designerGroupDispatchValueId; // 1.id + @AnTableField(column = "OPERATOR_CODE", type = "string,32", notNull = true) + private String operatorCode; // 2.操作员编码 + @AnTableField(column = "RELATED_TYPE", type = "int", notNull = true) + private int relatedType; // 3.关联类型:0标准自来稿,1普通设计,2资深设计,3行业,4改稿自来稿,5初/定稿免检产品 + @AnTableField(column = "RELATED_VALUE", type = "long", notNull = true) + private long relatedValue; // 4.关联的值 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public long getDesignerGroupDispatchValueId() + { + return designerGroupDispatchValueId; + } + + public void setDesignerGroupDispatchValueId(long designerGroupDispatchValueId) + { + this.designerGroupDispatchValueId = designerGroupDispatchValueId; + } + + public String getOperatorCode() + { + return operatorCode; + } + + public void setOperatorCode(String operatorCode) + { + this.operatorCode = operatorCode; + } + + public int getRelatedType() + { + return relatedType; + } + + public void setRelatedType(int relatedType) + { + this.relatedType = relatedType; + } + + public long getRelatedValue() + { + return relatedValue; + } + + public void setRelatedValue(long relatedValue) + { + this.relatedValue = relatedValue; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/DesignerGroupValue.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/DesignerGroupValue.java new file mode 100644 index 0000000..e3db7f8 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/DesignerGroupValue.java @@ -0,0 +1,76 @@ +package com.zhiqim.yangcai.design.dbo.design; + +import java.io.Serializable; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 设计师组关联的属性值表 对应表《DesignerGroupValue》 + */ +@AnAlias("DesignerGroupValue") +@AnNew +@AnTable(table = "DESIGNER_GROUP_VALUE", key = "DESIGNER_GROUP_VALUE_ID", type = "InnoDB") +public class DesignerGroupValue implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "DESIGNER_GROUP_VALUE_ID", type = "long", notNull = true) + private long designerGroupValueId; // 1.id + @AnTableField(column = "DESIGNER_GROUP_ID", type = "long", notNull = true) + private long designerGroupId; // 2.设计师组id + @AnTableField(column = "RELATED_TYPE", type = "int", notNull = true) + private int relatedType; // 3.关联类型:0标准自来稿,1普通设计,2资深设计,3行业,4改稿自来稿 + @AnTableField(column = "RELATED_VALUE", type = "long", notNull = true) + private long relatedValue; // 4.关联的值 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public long getDesignerGroupValueId() + { + return designerGroupValueId; + } + + public void setDesignerGroupValueId(long designerGroupValueId) + { + this.designerGroupValueId = designerGroupValueId; + } + + public long getDesignerGroupId() + { + return designerGroupId; + } + + public void setDesignerGroupId(long designerGroupId) + { + this.designerGroupId = designerGroupId; + } + + public int getRelatedType() + { + return relatedType; + } + + public void setRelatedType(int relatedType) + { + this.relatedType = relatedType; + } + + public long getRelatedValue() + { + return relatedValue; + } + + public void setRelatedValue(long relatedValue) + { + this.relatedValue = relatedValue; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/DesignerGroupView.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/DesignerGroupView.java new file mode 100644 index 0000000..c609672 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/DesignerGroupView.java @@ -0,0 +1,354 @@ +package com.zhiqim.yangcai.design.dbo.design; + +import java.io.Serializable; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.orm.annotation.AnView; +import org.zhiqim.orm.annotation.AnViewField; +import org.zhiqim.orm.annotation.AnViewJoin; +import org.zhiqim.orm.annotation.AnViewJoinValue; + +/** + * 设计师接单规则视图 + */ +@AnAlias("DesignerGroupView") +@AnNew +@AnView("DESIGNER_GROUP,DESIGNER_GROUP_DISPATCH") +@AnViewJoin( +{ + @AnViewJoinValue(type = "EQUAL", lTable = "DESIGNER_GROUP", lColumn = "DESIGNER_GROUP_ID", rTable = "DESIGNER_GROUP_DISPATCH", rColumn = "DESIGNER_GROUP_ID") +}) +public class DesignerGroupView implements Serializable +{ + private static final long serialVersionUID = 1L; + + // 接单规则组 + @AnViewField(table = "DESIGNER_GROUP", column = "DESIGNER_GROUP_NAME") + private String designerGroupName; // 1.接单规则组名称 + @AnViewField(table = "DESIGNER_GROUP", column = "MAX_ORDER_AMOUNT") + private long maxOrderAmount; // 2.订单最大金额 + @AnViewField(table = "DESIGNER_GROUP", column = "MIN_ORDER_AMOUNT") + private long minOrderAmount; // 3.订单最小金额 + @AnViewField(table = "DESIGNER_GROUP", column = "IS_HIGH_QUALITY_ORDER") + private boolean isHighQualityOrder; // 4.是否优质订单 + @AnViewField(table = "DESIGNER_GROUP", column = "IS_LARGE_AMOUNT") + private boolean isLargeAmount; // 5.是否大金额订单 + @AnViewField(table = "DESIGNER_GROUP", column = "IS_URGENT") + private boolean isUrgent; // 6.是否支持加急单 =false 默认不支持 + @AnViewField(table = "DESIGNER_GROUP", column = "IS_DESIGN") + private boolean isDesign; // 7.是否支持只设计不印刷单 =false 默认不支持 + @AnViewField(table = "DESIGNER_GROUP", column = "IS_SPECIAL") + private boolean isSpecial; // 8.是否支持异型订单 + @AnViewField(table = "DESIGNER_GROUP", column = "AFTER_NAMES") + private String afterNames; // 9.后加工名称,多个逗号隔开 + @AnViewField(table = "DESIGNER_GROUP", column = "MERCHANT_IDS") + private String merchantIds; // 10.关联渠道ID,多个逗号隔开 + @AnViewField(table = "DESIGNER_GROUP", column = "STATUS") + private int status; // 11.状态 + @AnViewField(table = "DESIGNER_GROUP", column = "MAX_ORDER_NUM") + private int maxOrderNum; // 12.最大接单量(老用户除外) + @AnViewField(table = "DESIGNER_GROUP", column = "MAX_WAIVE_NUM") + private int maxWaiveNum; // 13.订单最大放弃次数 + + // 设计师个人接单规则 + @AnViewField(table = "DESIGNER_GROUP_DISPATCH", column = "OPERATOR_CODE") + private String operatorCode; // 1.操作员编码 + @AnViewField(table = "DESIGNER_GROUP_DISPATCH", column = "ORG_ID") + private long designerOrgId; // 2.操作员组织编号 + @AnViewField(table = "DESIGNER_GROUP_DISPATCH", column = "MAX_ORDER_AMOUNT") + private long designerMaxOrderAmount; // 3.订单最大金额 + @AnViewField(table = "DESIGNER_GROUP_DISPATCH", column = "MIN_ORDER_AMOUNT") + private long designerMinOrderAmount; // 4.订单最小金额 + @AnViewField(table = "DESIGNER_GROUP_DISPATCH", column = "IS_HIGH_QUALITY_ORDER") + private boolean isDesignerHighQualityOrder; // 5.是否优质订单 + @AnViewField(table = "DESIGNER_GROUP_DISPATCH", column = "IS_LARGE_AMOUNT") + private boolean isDesignerLargeAmount; // 6.是否大金额订单 + @AnViewField(table = "DESIGNER_GROUP_DISPATCH", column = "IS_URGENT") + private boolean isDesignerUrgent; // 7.是否支持加急单 =false 默认不支持 + @AnViewField(table = "DESIGNER_GROUP_DISPATCH", column = "IS_DESIGN") + private boolean isDesignerDesign; // 8.是否支持只设计不印刷单 =false 默认不支持 + @AnViewField(table = "DESIGNER_GROUP_DISPATCH", column = "IS_SPECIAL") + private boolean isDesignerSpecial; // 9.是否支持异型订单 + @AnViewField(table = "DESIGNER_GROUP_DISPATCH", column = "AFTER_NAMES") + private String designerAfterNames; // 10.后加工名称,多个逗号隔开 + @AnViewField(table = "DESIGNER_GROUP_DISPATCH", column = "MERCHANT_IDS") + private String designerMerchantIds; // 11.关联渠道ID,多个逗号隔开 + @AnViewField(table = "DESIGNER_GROUP_DISPATCH", column = "STATUS") + private int designerStatus; // 12.状态:0失效,1正常 + @AnViewField(table = "DESIGNER_GROUP_DISPATCH", column = "MAX_ORDER_NUM") + private int designerMaxOrderNum; // 13.最大接单量(老用户除外) + @AnViewField(table = "DESIGNER_GROUP_DISPATCH", column = "WAIVE_NUM") + private int designerWaiveNum; // 14.订单可放弃当前数量 + + public String getDesignerGroupName() + { + return designerGroupName; + } + + public void setDesignerGroupName(String designerGroupName) + { + this.designerGroupName = designerGroupName; + } + + public long getMaxOrderAmount() + { + return maxOrderAmount; + } + + public void setMaxOrderAmount(long maxOrderAmount) + { + this.maxOrderAmount = maxOrderAmount; + } + + public long getMinOrderAmount() + { + return minOrderAmount; + } + + public void setMinOrderAmount(long minOrderAmount) + { + this.minOrderAmount = minOrderAmount; + } + + public boolean isHighQualityOrder() + { + return isHighQualityOrder; + } + + public void setHighQualityOrder(boolean isHighQualityOrder) + { + this.isHighQualityOrder = isHighQualityOrder; + } + + public boolean isLargeAmount() + { + return isLargeAmount; + } + + public void setLargeAmount(boolean isLargeAmount) + { + this.isLargeAmount = isLargeAmount; + } + + public boolean isUrgent() + { + return isUrgent; + } + + public void setUrgent(boolean isUrgent) + { + this.isUrgent = isUrgent; + } + + public boolean isDesign() + { + return isDesign; + } + + public void setDesign(boolean isDesign) + { + this.isDesign = isDesign; + } + + public boolean isSpecial() + { + return isSpecial; + } + + public void setSpecial(boolean isSpecial) + { + this.isSpecial = isSpecial; + } + + public String getAfterNames() + { + return afterNames; + } + + public void setAfterNames(String afterNames) + { + this.afterNames = afterNames; + } + + public int getStatus() + { + return status; + } + + public void setStatus(int status) + { + this.status = status; + } + + public int getMaxOrderNum() + { + return maxOrderNum; + } + + public void setMaxOrderNum(int maxOrderNum) + { + this.maxOrderNum = maxOrderNum; + } + + public int getMaxWaiveNum() + { + return maxWaiveNum; + } + + public void setMaxWaiveNum(int maxWaiveNum) + { + this.maxWaiveNum = maxWaiveNum; + } + + public String getMerchantIds() + { + return merchantIds; + } + + public void setMerchantIds(String merchantIds) + { + this.merchantIds = merchantIds; + } + + public String getOperatorCode() + { + return operatorCode; + } + + public void setOperatorCode(String operatorCode) + { + this.operatorCode = operatorCode; + } + + public long getDesignerOrgId() + { + return designerOrgId; + } + + public void setDesignerOrgId(long designerOrgId) + { + this.designerOrgId = designerOrgId; + } + + public long getDesignerMaxOrderAmount() + { + return designerMaxOrderAmount; + } + + public void setDesignerMaxOrderAmount(long designerMaxOrderAmount) + { + this.designerMaxOrderAmount = designerMaxOrderAmount; + } + + public long getDesignerMinOrderAmount() + { + return designerMinOrderAmount; + } + + public void setDesignerMinOrderAmount(long designerMinOrderAmount) + { + this.designerMinOrderAmount = designerMinOrderAmount; + } + + public boolean isDesignerHighQualityOrder() + { + return isDesignerHighQualityOrder; + } + + public void setDesignerHighQualityOrder(boolean isDesignerHighQualityOrder) + { + this.isDesignerHighQualityOrder = isDesignerHighQualityOrder; + } + + public boolean isDesignerLargeAmount() + { + return isDesignerLargeAmount; + } + + public void setDesignerLargeAmount(boolean isDesignerLargeAmount) + { + this.isDesignerLargeAmount = isDesignerLargeAmount; + } + + public boolean isDesignerUrgent() + { + return isDesignerUrgent; + } + + public void setDesignerUrgent(boolean isDesignerUrgent) + { + this.isDesignerUrgent = isDesignerUrgent; + } + + public boolean isDesignerDesign() + { + return isDesignerDesign; + } + + public void setDesignerDesign(boolean isDesignerDesign) + { + this.isDesignerDesign = isDesignerDesign; + } + + public boolean isDesignerSpecial() + { + return isDesignerSpecial; + } + + public void setDesignerSpecial(boolean isDesignerSpecial) + { + this.isDesignerSpecial = isDesignerSpecial; + } + + public String getDesignerAfterNames() + { + return designerAfterNames; + } + + public void setDesignerAfterNames(String designerAfterNames) + { + this.designerAfterNames = designerAfterNames; + } + + public int getDesignerStatus() + { + return designerStatus; + } + + public void setDesignerStatus(int designerStatus) + { + this.designerStatus = designerStatus; + } + + public int getDesignerMaxOrderNum() + { + return designerMaxOrderNum; + } + + public void setDesignerMaxOrderNum(int designerMaxOrderNum) + { + this.designerMaxOrderNum = designerMaxOrderNum; + } + + public int getDesignerWaiveNum() + { + return designerWaiveNum; + } + + public void setDesignerWaiveNum(int designerWaiveNum) + { + this.designerWaiveNum = designerWaiveNum; + } + + public String getDesignerMerchantIds() + { + return designerMerchantIds; + } + + public void setDesignerMerchantIds(String designerMerchantIds) + { + this.designerMerchantIds = designerMerchantIds; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/ProductConvert.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/ProductConvert.java new file mode 100644 index 0000000..f761b89 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/ProductConvert.java @@ -0,0 +1,149 @@ +/** + * 扬彩印刷设计 + * 文件名 :ProductConvert.java + * 创建人 :gjx + * 创建时间:2021年3月3日 +*/ + +package com.zhiqim.yangcai.design.dbo.design; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 产品单价表 对应表《PRODUCT_CONVERT》 + */ +@AnAlias("ProductConvert") +@AnNew +@AnTable(table = "PRODUCT_CONVERT", key = "CONVERT_ID", type = "InnoDB") +public class ProductConvert implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "CONVERT_ID", type = "long", notNull = true) + private long convertId; // 产品单价id + @AnTableField(column = "PRD_TYPE_ID", type = "long", notNull = true) + private long prdTypeId; // 产品类型编号 + @AnTableField(column = "PRD_SIZE_WIDTH", type = "int", notNull = true) + private int prdSizeWidth;// 尺寸范围宽度 + @AnTableField(column = "PRD_SIZE_HEIGHT", type = "int", notNull = true) + private int prdSizeHeight;// 尺寸范围高度 + @AnTableField(column = "PRD_PAGE_NAME", type = "string,50", notNull = false) + private String prdPageName;// 面数名称 + @AnTableField(column = "ADD_OPERATOR", type = "string,20", notNull = false) + private String addOperator;// 添加人 + @AnTableField(column = "ADD_TIME", type = "datetime", notNull = true) + private Timestamp addTime;// 添加时间 + @AnTableField(column = "UPDATE_OPERATOR", type = "string,20", notNull = false) + private String updateOperator;// 更新人 + @AnTableField(column = "UPDATE_TIME", type = "datetime", notNull = false) + private Timestamp updateTime;// 更新时间 + @AnTableField(column = "SEQ", type = "int", notNull = true) + private int seq; + + public long getConvertId() + { + return convertId; + } + + public void setConvertId(long convertId) + { + this.convertId = convertId; + } + + public long getPrdTypeId() + { + return prdTypeId; + } + + public void setPrdTypeId(long prdTypeId) + { + this.prdTypeId = prdTypeId; + } + + public int getPrdSizeWidth() + { + return prdSizeWidth; + } + + public void setPrdSizeWidth(int prdSizeWidth) + { + this.prdSizeWidth = prdSizeWidth; + } + + public int getPrdSizeHeight() + { + return prdSizeHeight; + } + + public void setPrdSizeHeight(int prdSizeHeight) + { + this.prdSizeHeight = prdSizeHeight; + } + + public String getPrdPageName() + { + return prdPageName; + } + + public void setPrdPageName(String prdPageName) + { + this.prdPageName = prdPageName; + } + + public String getAddOperator() + { + return addOperator; + } + + public void setAddOperator(String addOperator) + { + this.addOperator = addOperator; + } + + public Timestamp getAddTime() + { + return addTime; + } + + public void setAddTime(Timestamp addTime) + { + this.addTime = addTime; + } + + public String getUpdateOperator() + { + return updateOperator; + } + + public void setUpdateOperator(String updateOperator) + { + this.updateOperator = updateOperator; + } + + public Timestamp getUpdateTime() + { + return updateTime; + } + + public void setUpdateTime(Timestamp updateTime) + { + this.updateTime = updateTime; + } + + public int getSeq() + { + return seq; + } + + public void setSeq(int seq) + { + this.seq = seq; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/ProductDesignPriceView.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/ProductDesignPriceView.java new file mode 100644 index 0000000..d1fd5e7 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/design/ProductDesignPriceView.java @@ -0,0 +1,225 @@ +package com.zhiqim.yangcai.design.dbo.design; + +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.orm.annotation.AnView; +import org.zhiqim.orm.annotation.AnViewField; +import org.zhiqim.orm.annotation.AnViewJoin; +import org.zhiqim.orm.annotation.AnViewJoinValue; + +@AnAlias("ProductDesignPriceView") +@AnNew +@AnView("PRODUCT_CONVERT,DESIGN_PRICE") +@AnViewJoin( +{ + @AnViewJoinValue(type = "LEFT", lTable = "PRODUCT_CONVERT", lColumn = "CONVERT_ID", rTable = "DESIGN_PRICE", rColumn = "CONVERT_ID") +}) +public class ProductDesignPriceView extends ProductConvert +{ + private static final long serialVersionUID = 1L; + + @AnViewField(table = "PRODUCT_CONVERT", column = "CONVERT_ID") + private long convertId; // 产品单价id + @AnViewField(table = "PRODUCT_CONVERT", column = "PRD_TYPE_ID") + private long prdTypeId; // 产品类型编号 + @AnViewField(table = "PRODUCT_CONVERT", column = "PRD_SIZE_WIDTH") + private int prdSizeWidth;// 尺寸范围宽度 + @AnViewField(table = "PRODUCT_CONVERT", column = "PRD_SIZE_HEIGHT") + private int prdSizeHeight;// 尺寸范围高度 + @AnViewField(table = "PRODUCT_CONVERT", column = "PRD_PAGE_NAME") + private String prdPageName;// 面数名称 + @AnViewField(table = "PRODUCT_CONVERT", column = "ADD_OPERATOR") + private String addOperator;// 添加人 + @AnViewField(table = "PRODUCT_CONVERT", column = "ADD_TIME") + private Timestamp addTime;// 添加时间 + @AnViewField(table = "PRODUCT_CONVERT", column = "UPDATE_OPERATOR") + private String updateOperator;// 更新人 + @AnViewField(table = "PRODUCT_CONVERT", column = "UPDATE_TIME") + private Timestamp updateTime;// 更新时间 + @AnViewField(table = "PRODUCT_CONVERT", column = "SEQ") + private int seq; + + @AnViewField(table = "DESIGN_PRICE", column = "price_id") + private long priceId; // 设计单价ID + @AnViewField(table = "DESIGN_PRICE", column = "draft_type") + private int draftType;// 稿件类型 + @AnViewField(table = "DESIGN_PRICE", column = "design_price_money") + private long designPriceMoney;// 设计单价金额 + @AnViewField(table = "DESIGN_PRICE", column = "effect_time") + private Timestamp effectTime;// 生效时间 + @AnViewField(table = "DESIGN_PRICE", column = "status") + private int status;// 设计单价状态(0失效,1生效) + + @Override + public long getConvertId() + { + return convertId; + } + + @Override + public void setConvertId(long convertId) + { + this.convertId = convertId; + } + + @Override + public long getPrdTypeId() + { + return prdTypeId; + } + + @Override + public void setPrdTypeId(long prdTypeId) + { + this.prdTypeId = prdTypeId; + } + + @Override + public int getPrdSizeWidth() + { + return prdSizeWidth; + } + + @Override + public void setPrdSizeWidth(int prdSizeWidth) + { + this.prdSizeWidth = prdSizeWidth; + } + + @Override + public int getPrdSizeHeight() + { + return prdSizeHeight; + } + + @Override + public void setPrdSizeHeight(int prdSizeHeight) + { + this.prdSizeHeight = prdSizeHeight; + } + + @Override + public String getPrdPageName() + { + return prdPageName; + } + + @Override + public void setPrdPageName(String prdPageName) + { + this.prdPageName = prdPageName; + } + + @Override + public String getAddOperator() + { + return addOperator; + } + + @Override + public void setAddOperator(String addOperator) + { + this.addOperator = addOperator; + } + + @Override + public Timestamp getAddTime() + { + return addTime; + } + + @Override + public void setAddTime(Timestamp addTime) + { + this.addTime = addTime; + } + + @Override + public String getUpdateOperator() + { + return updateOperator; + } + + @Override + public void setUpdateOperator(String updateOperator) + { + this.updateOperator = updateOperator; + } + + @Override + public Timestamp getUpdateTime() + { + return updateTime; + } + + @Override + public void setUpdateTime(Timestamp updateTime) + { + this.updateTime = updateTime; + } + + @Override + public int getSeq() + { + return seq; + } + + @Override + public void setSeq(int seq) + { + this.seq = seq; + } + + public long getPriceId() + { + return priceId; + } + + public void setPriceId(long priceId) + { + this.priceId = priceId; + } + + public int getDraftType() + { + return draftType; + } + + public void setDraftType(int draftType) + { + this.draftType = draftType; + } + + public long getDesignPriceMoney() + { + return designPriceMoney; + } + + public void setDesignPriceMoney(long designPriceMoney) + { + this.designPriceMoney = designPriceMoney; + } + + public Timestamp getEffectTime() + { + return effectTime; + } + + public void setEffectTime(Timestamp effectTime) + { + this.effectTime = effectTime; + } + + public int getStatus() + { + return status; + } + + public void setStatus(int status) + { + this.status = status; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/dispatch/DesDispatchOrderLog.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/dispatch/DesDispatchOrderLog.java new file mode 100644 index 0000000..1742ba9 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/dispatch/DesDispatchOrderLog.java @@ -0,0 +1,181 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.dbo.dispatch; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 派单日志表 对应表《DES_DISPATCH_ORDER_LOG》 + */ +@AnAlias("DesDispatchOrderLog") +@AnNew +@AnTable(table = "DES_DISPATCH_ORDER_LOG", key = "DESIGN_ID,DES_TIME", type = "InnoDB") +public class DesDispatchOrderLog implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "DESIGN_ID", type = "long", notNull = true) + private long designId; // 1.订单ID + @AnTableField(column = "DES_TIME", type = "datetime", notNull = true) + private Timestamp desTime; // 2.派单时间 + @AnTableField(column = "DIS_TYPE", type = "byte", notNull = true) + private int disType; // 3.派单类型(0:自动派单,1:手工指单,2:手工领单) + @AnTableField(column = "DIS_ORDER_STATUS", type = "byte", notNull = true) + private int disOrderStatus; // 4.派单订单状态(0代表完成,1代表未完成,2代表转让,3代表退款,4代表已暂停) + @AnTableField(column = "OPERATOR_CODE", type = "string,32", notNull = true) + private String operatorCode; // 5.设计师编号(操作员) + @AnTableField(column = "ORG_ID", type = "long", notNull = true) + private long orgId; // 6.操作员组织编号 + @AnTableField(column = "INDUSTRY_ID", type = "long", notNull = true) + private long industryId; // 7.订单所属行业 + @AnTableField(column = "MONTH_CODE", type = "string,6", notNull = false) + private String monthCode; // 8.月份 + @AnTableField(column = "DAY_CODE", type = "string,10", notNull = false) + private String dayCode; // 9.日期 + @AnTableField(column = "ORDER_TEXT", type = "string,200", notNull = false) + private String orderText; // 10.订单产品说明 + @AnTableField(column = "DIS_DESC", type = "string,1000", notNull = false) + private String disDesc; // 11.派单描述 + @AnTableField(column = "DRAFT_TYPE", type = "int", notNull = true) + private int draftType; // 12.稿件类型,0:自来稿,1:改稿自来稿,2:普通设计,3:高级设计 + + public String toString() + { + return Jsons.toString(this); + } + + public long getDesignId() + { + return designId; + } + + public void setDesignId(long designId) + { + this.designId = designId; + } + + public Timestamp getDesTime() + { + return desTime; + } + + public void setDesTime(Timestamp desTime) + { + this.desTime = desTime; + } + + public int getDisType() + { + return disType; + } + + public void setDisType(int disType) + { + this.disType = disType; + } + + public int getDisOrderStatus() + { + return disOrderStatus; + } + + public void setDisOrderStatus(int disOrderStatus) + { + this.disOrderStatus = disOrderStatus; + } + + public String getOperatorCode() + { + return operatorCode; + } + + public void setOperatorCode(String operatorCode) + { + this.operatorCode = operatorCode; + } + + public long getOrgId() + { + return orgId; + } + + public void setOrgId(long orgId) + { + this.orgId = orgId; + } + + public long getIndustryId() + { + return industryId; + } + + public void setIndustryId(long industryId) + { + this.industryId = industryId; + } + + public String getMonthCode() + { + return monthCode; + } + + public void setMonthCode(String monthCode) + { + this.monthCode = monthCode; + } + + public String getDayCode() + { + return dayCode; + } + + public void setDayCode(String dayCode) + { + this.dayCode = dayCode; + } + + public String getOrderText() + { + return orderText; + } + + public void setOrderText(String orderText) + { + this.orderText = orderText; + } + + public String getDisDesc() + { + return disDesc; + } + + public void setDisDesc(String disDesc) + { + this.disDesc = disDesc; + } + + public int getDraftType() + { + return draftType; + } + + public void setDraftType(int draftType) + { + this.draftType = draftType; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/dispatch/DesDispatchProperty.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/dispatch/DesDispatchProperty.java new file mode 100644 index 0000000..9d46d8d --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/dispatch/DesDispatchProperty.java @@ -0,0 +1,218 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.dbo.dispatch; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 设计师派单属性 对应表《DES_DISPATCH_PROPERTY》 目前已不再使用,使用新的规则表DESIGNER_GROUP_DISPATCH代替了 --caohong + */ +@AnAlias("DesDispatchProperty") +@AnNew +@AnTable(table = "DES_DISPATCH_PROPERTY", key = "OPERATOR_CODE", type = "InnoDB") +public class DesDispatchProperty implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "OPERATOR_CODE", type = "string,32", notNull = true) + private String operatorCode; // 1.设计师编码(设计师即操作员) + @AnTableField(column = "ORG_ID", type = "long", notNull = true) + private long orgId; // 2.操作员组织编号 + @AnTableField(column = "MAJOR_TYPE", type = "long", notNull = true) + private long majorType; // 3.主类型ID + @AnTableField(column = "SECONDARY_TYPES", type = "string,2000", notNull = false) + private String secondaryTypes; // 4.副类型ID,多个逗号分隔 + @AnTableField(column = "MAJOR_INDUSTRY", type = "long", notNull = true) + private long majorIndustry; // 5.主行业ID + @AnTableField(column = "SECONDARY_INDUSTRYS", type = "string,2000", notNull = false) + private String secondaryIndustrys; // 6.副行业ID + @AnTableField(column = "DESIGNER_LEVEL", type = "int", notNull = true) + private int designerLevel; // 8.0:普通, 1:高级 + @AnTableField(column = "SHOP_NICK", type = "string,300", notNull = false) + private String shopNick; // 11.店铺名,多个逗号隔开 + @AnTableField(column = "CREATE_TIME", type = "datetime", notNull = true) + private Timestamp createTime; // 12.创建时间 + @AnTableField(column = "UPDATE_TIME", type = "datetime", notNull = false) + private Timestamp updateTime; // 13.最后修改时间 + @AnTableField(column = "IS_DESIGN_ORDER", type = "boolean", notNull = true) + private boolean isDesignOrder; // 17.是否接取设计订单 + @AnTableField(column = "IS_NORM_DRAFT_ORDER", type = "boolean", notNull = true) + private boolean isNormDraftOrder; // 18.是否接取标准自来稿 + @AnTableField(column = "IS_DRAFT_ORDER", type = "boolean", notNull = true) + private boolean isDraftOrder; // 19.是否接取改稿自来稿 + @AnTableField(column = "IS_HIGH_QUALITY_ORDER", type = "boolean", notNull = false) + private boolean isHighQualityOrder; // 20.是否优质订单 + @AnTableField(column = "IS_URGENT", type = "boolean", notNull = false) + private boolean isUrgent; // 21.是否加急订单 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public String getOperatorCode() + { + return operatorCode; + } + + public void setOperatorCode(String operatorCode) + { + this.operatorCode = operatorCode; + } + + public long getOrgId() + { + return orgId; + } + + public void setOrgId(long orgId) + { + this.orgId = orgId; + } + + public long getMajorType() + { + return majorType; + } + + public void setMajorType(long majorType) + { + this.majorType = majorType; + } + + public String getSecondaryTypes() + { + return secondaryTypes; + } + + public void setSecondaryTypes(String secondaryTypes) + { + this.secondaryTypes = secondaryTypes; + } + + public long getMajorIndustry() + { + return majorIndustry; + } + + public void setMajorIndustry(long majorIndustry) + { + this.majorIndustry = majorIndustry; + } + + public String getSecondaryIndustrys() + { + return secondaryIndustrys; + } + + public void setSecondaryIndustrys(String secondaryIndustrys) + { + this.secondaryIndustrys = secondaryIndustrys; + } + + public int getDesignerLevel() + { + return designerLevel; + } + + public void setDesignerLevel(int designerLevel) + { + this.designerLevel = designerLevel; + } + + public String getShopNick() + { + return shopNick; + } + + public void setShopNick(String shopNick) + { + this.shopNick = shopNick; + } + + public Timestamp getCreateTime() + { + return createTime; + } + + public void setCreateTime(Timestamp createTime) + { + this.createTime = createTime; + } + + public Timestamp getUpdateTime() + { + return updateTime; + } + + public void setUpdateTime(Timestamp updateTime) + { + this.updateTime = updateTime; + } + + public boolean isDesignOrder() + { + return isDesignOrder; + } + + public void setDesignOrder(boolean isDesignOrder) + { + this.isDesignOrder = isDesignOrder; + } + + public boolean isNormDraftOrder() + { + return isNormDraftOrder; + } + + public void setNormDraftOrder(boolean isNormDraftOrder) + { + this.isNormDraftOrder = isNormDraftOrder; + } + + public boolean isDraftOrder() + { + return isDraftOrder; + } + + public void setDraftOrder(boolean isDraftOrder) + { + this.isDraftOrder = isDraftOrder; + } + + public boolean isHighQualityOrder() + { + return isHighQualityOrder; + } + + public void setHighQualityOrder(boolean isHighQualityOrder) + { + this.isHighQualityOrder = isHighQualityOrder; + } + + public boolean isUrgent() + { + return isUrgent; + } + + public void setUrgent(boolean isUrgent) + { + this.isUrgent = isUrgent; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/dispatch/DesMerDispatchLog.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/dispatch/DesMerDispatchLog.java new file mode 100644 index 0000000..8b907d6 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/dispatch/DesMerDispatchLog.java @@ -0,0 +1,93 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.dispatch; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 商户分拣日志表 对应表《DES_MER_DISPATCH_LOG》 + */ +@AnAlias("DesMerDispatchLog") +@AnNew +@AnTable(table="DES_MER_DISPATCH_LOG", key="DESIGN_ID,DES_TIME", type="InnoDB") +public class DesMerDispatchLog implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column="ORG_ID", type="long", notNull=true) private long orgId; //1.组织编号 + @AnTableField(column="DESIGN_ID", type="long", notNull=true) private long designId; //2.订单ID + @AnTableField(column="DES_TIME", type="datetime", notNull=true) private Timestamp desTime; //3.分拣时间 + @AnTableField(column="DIS_DESC", type="string,1000", notNull=false) private String disDesc; //4.分拣描述 + @AnTableField(column="ANALYSIS_TEXT", type="string,20000", notNull=false) private String analysisText; //5.分拣分析 详情 + + public String toString() + { + return Jsons.toString(this); + } + + public long getOrgId() + { + return orgId; + } + + public void setOrgId(long orgId) + { + this.orgId = orgId; + } + + public long getDesignId() + { + return designId; + } + + public void setDesignId(long designId) + { + this.designId = designId; + } + + public Timestamp getDesTime() + { + return desTime; + } + + public void setDesTime(Timestamp desTime) + { + this.desTime = desTime; + } + + public String getDisDesc() + { + return disDesc; + } + + public void setDisDesc(String disDesc) + { + this.disDesc = disDesc; + } + + public String getAnalysisText() + { + return analysisText; + } + + public void setAnalysisText(String analysisText) + { + this.analysisText = analysisText; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/dispatch/DesNoticeLog.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/dispatch/DesNoticeLog.java new file mode 100644 index 0000000..6c4d0fa --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/dispatch/DesNoticeLog.java @@ -0,0 +1,82 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.dispatch; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 通知日志,暂用于检查任务通知日志记录 对应表《DES_NOTICE_LOG》 + */ +@AnAlias("DesNoticeLog") +@AnNew +@AnTable(table="DES_NOTICE_LOG", key="LOG_ID", type="InnoDB") +public class DesNoticeLog implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column="LOG_ID", type="long", notNull=true) private long logId; //1.主键 + @AnTableField(column="NOTICE_TIME", type="datetime", notNull=true) private Timestamp noticeTime; //2.日志时间 + @AnTableField(column="NOTICE_CONTENT", type="string,1024", notNull=true) private String noticeContent; //3.通知内容 + @AnTableField(column="KEY_WORD", type="string,128", notNull=true) private String keyWord; //4.通知关键字 + + public String toString() + { + return Jsons.toString(this); + } + + public long getLogId() + { + return logId; + } + + public void setLogId(long logId) + { + this.logId = logId; + } + + public Timestamp getNoticeTime() + { + return noticeTime; + } + + public void setNoticeTime(Timestamp noticeTime) + { + this.noticeTime = noticeTime; + } + + public String getNoticeContent() + { + return noticeContent; + } + + public void setNoticeContent(String noticeContent) + { + this.noticeContent = noticeContent; + } + + public String getKeyWord() + { + return keyWord; + } + + public void setKeyWord(String keyWord) + { + this.keyWord = keyWord; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/dispatch/DesOnline.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/dispatch/DesOnline.java new file mode 100644 index 0000000..cadc9f9 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/dispatch/DesOnline.java @@ -0,0 +1,160 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.dispatch; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 设计师在线表 对应表《DES_ONLINE》 + */ +@AnAlias("DesOnline") +@AnNew +@AnTable(table = "DES_ONLINE", key = "OPERATOR_CODE", type = "InnoDB") +public class DesOnline implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "ORG_ID", type = "long", notNull = true) + private long orgId; // 1.操作员组织编号 + @AnTableField(column = "OPERATOR_CODE", type = "string,32", notNull = true) + private String operatorCode; // 2.设计师编号(操作员) + @AnTableField(column = "ONLINE_STATUS", type = "int", notNull = true) + private int onlineStatus; // 3.在线状态(0:停止接单, 1:正在接单) + @AnTableField(column = "ORDER_NUM", type = "int", notNull = true) + private int orderNum; // 4.设计师订单数 + @AnTableField(column = "SESSION_ID", type = "string,32", notNull = false) + private String sessionId; // 5.设计师SESSION_ID + @AnTableField(column = "SESSION_TIME", type = "datetime", notNull = false) + private Timestamp sessionTime; // 6.设计师上班时间 + @AnTableField(column = "LAST_DRAFT_TYPE", type = "long", notNull = true) + private long lastDraftType; // 7.最近初稿类型,对应产品类型ID + @AnTableField(column = "LAST_DRAFT_TIME", type = "datetime", notNull = false) + private Timestamp lastDraftTime; // 8.最近初稿提交时间 + @AnTableField(column = "DESIGNER_LEVEL", type = "int", notNull = false) + private int designerLevel; // 9.设计师级别 + @AnTableField(column = "LAST_UPDATE_TIME", type = "datetime", notNull = false) + private Timestamp lastUpdateTime; // 10.最近状态刷新时间 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public long getOrgId() + { + return orgId; + } + + public void setOrgId(long orgId) + { + this.orgId = orgId; + } + + public String getOperatorCode() + { + return operatorCode; + } + + public void setOperatorCode(String operatorCode) + { + this.operatorCode = operatorCode; + } + + public int getOnlineStatus() + { + return onlineStatus; + } + + public void setOnlineStatus(int onlineStatus) + { + this.onlineStatus = onlineStatus; + } + + public int getOrderNum() + { + return orderNum; + } + + public void setOrderNum(int orderNum) + { + this.orderNum = orderNum; + } + + public String getSessionId() + { + return sessionId; + } + + public void setSessionId(String sessionId) + { + this.sessionId = sessionId; + } + + public Timestamp getSessionTime() + { + return sessionTime; + } + + public void setSessionTime(Timestamp sessionTime) + { + this.sessionTime = sessionTime; + } + + public long getLastDraftType() + { + return lastDraftType; + } + + public void setLastDraftType(long lastDraftType) + { + this.lastDraftType = lastDraftType; + } + + public Timestamp getLastDraftTime() + { + return lastDraftTime; + } + + public void setLastDraftTime(Timestamp lastDraftTime) + { + this.lastDraftTime = lastDraftTime; + } + + public int getDesignerLevel() + { + return designerLevel; + } + + public void setDesignerLevel(int designerLevel) + { + this.designerLevel = designerLevel; + } + + public Timestamp getLastUpdateTime() + { + return lastUpdateTime; + } + + public void setLastUpdateTime(Timestamp lastUpdateTime) + { + this.lastUpdateTime = lastUpdateTime; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/dispatch/DesOnlineTime.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/dispatch/DesOnlineTime.java new file mode 100644 index 0000000..6783a25 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/dispatch/DesOnlineTime.java @@ -0,0 +1,81 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.dispatch; + +import java.io.Serializable; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 设计师在线时长表 对应表《DES_ONLINE_TIME》 + */ +@AnAlias("DesOnlineTime") +@AnNew +@AnTable(table="DES_ONLINE_TIME", key="DAY_CODE,OPERATOR_CODE", type="InnoDB") +public class DesOnlineTime implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column="DAY_CODE", type="string,10", notNull=true) private String dayCode; //1.日期 + @AnTableField(column="ORG_ID", type="long", notNull=true) private long orgId; //2.操作员 组织编号 + @AnTableField(column="OPERATOR_CODE", type="string,32", notNull=true) private String operatorCode; //3.设计师编号(操作员) + @AnTableField(column="ONLINE_TIME", type="int", notNull=true) private int onlineTime; //4.设计师在线时长 + + public String toString() + { + return Jsons.toString(this); + } + + public String getDayCode() + { + return dayCode; + } + + public void setDayCode(String dayCode) + { + this.dayCode = dayCode; + } + + public long getOrgId() + { + return orgId; + } + + public void setOrgId(long orgId) + { + this.orgId = orgId; + } + + public String getOperatorCode() + { + return operatorCode; + } + + public void setOperatorCode(String operatorCode) + { + this.operatorCode = operatorCode; + } + + public int getOnlineTime() + { + return onlineTime; + } + + public void setOnlineTime(int onlineTime) + { + this.onlineTime = onlineTime; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/dispatch/DesWorkSearchLog.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/dispatch/DesWorkSearchLog.java new file mode 100644 index 0000000..707bdea --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/dispatch/DesWorkSearchLog.java @@ -0,0 +1,112 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.dispatch; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 工作日志查询表 对应表《DES_WORK_SEARCH_LOG》 + */ +@AnAlias("DesWorkSearchLog") +@AnNew +@AnTable(table = "DES_WORK_SEARCH_LOG", key = "LOG_ID", type = "InnoDB") +public class DesWorkSearchLog implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "LOG_ID", type = "long", notNull = true) + private long logId; // 1.日志ID + @AnTableField(column = "OPERATOR_CODE", type = "string,32", notNull = true) + private String operatorCode; // 2.操作员编号 + @AnTableField(column = "ORG_ID", type = "long", notNull = true) + private long orgId; // 3.操作员组织编号 + @AnTableField(column = "CREATE_TIME", type = "datetime", notNull = true) + private Timestamp createTime; // 4.操作时间 + @AnTableField(column = "OPR_DESC", type = "string,32", notNull = false) + private String oprDesc; // 5.操作日志描述 + @AnTableField(column = "LOG_TYPE", type = "int", notNull = false) + private int logType; // 6.操作日志类型 :1=正在接单,2 停止接单/退出浏览器 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public long getLogId() + { + return logId; + } + + public void setLogId(long logId) + { + this.logId = logId; + } + + public String getOperatorCode() + { + return operatorCode; + } + + public void setOperatorCode(String operatorCode) + { + this.operatorCode = operatorCode; + } + + public long getOrgId() + { + return orgId; + } + + public void setOrgId(long orgId) + { + this.orgId = orgId; + } + + public Timestamp getCreateTime() + { + return createTime; + } + + public void setCreateTime(Timestamp createTime) + { + this.createTime = createTime; + } + + public String getOprDesc() + { + return oprDesc; + } + + public void setOprDesc(String oprDesc) + { + this.oprDesc = oprDesc; + } + + public int getLogType() + { + return logType; + } + + public void setLogType(int logType) + { + this.logType = logType; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/dispatch/DesignerGroupDispatchLog.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/dispatch/DesignerGroupDispatchLog.java new file mode 100644 index 0000000..7fc2ead --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/dispatch/DesignerGroupDispatchLog.java @@ -0,0 +1,100 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.dispatch; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 设计师组分拣日志表 对应表《DESIGNER_GROUP_DISPATCH_LOG》 + */ +@AnAlias("DesignerGroupDispatchLog") +@AnNew +@AnTable(table = "DESIGNER_GROUP_DISPATCH_LOG", key = "DESIGN_ID,DES_TIME", type = "InnoDB") +public class DesignerGroupDispatchLog implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "ORG_ID", type = "long", notNull = true) + private long orgId; // 1.组织编号 + @AnTableField(column = "DESIGN_ID", type = "long", notNull = true) + private long designId; // 2.订单ID + @AnTableField(column = "DES_TIME", type = "datetime", notNull = true) + private Timestamp desTime; // 3.分拣时间 + @AnTableField(column = "DIS_DESC", type = "string,1000", notNull = false) + private String disDesc; // 4.分拣描述 + @AnTableField(column = "ANALYSIS_TEXT", type = "string,20000", notNull = false) + private String analysisText; // 5.分拣分析 详情 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public long getOrgId() + { + return orgId; + } + + public void setOrgId(long orgId) + { + this.orgId = orgId; + } + + public long getDesignId() + { + return designId; + } + + public void setDesignId(long designId) + { + this.designId = designId; + } + + public Timestamp getDesTime() + { + return desTime; + } + + public void setDesTime(Timestamp desTime) + { + this.desTime = desTime; + } + + public String getDisDesc() + { + return disDesc; + } + + public void setDisDesc(String disDesc) + { + this.disDesc = disDesc; + } + + public String getAnalysisText() + { + return analysisText; + } + + public void setAnalysisText(String analysisText) + { + this.analysisText = analysisText; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/dzmpsupport/DzmpDesignElement.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/dzmpsupport/DzmpDesignElement.java new file mode 100644 index 0000000..ea1f643 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/dzmpsupport/DzmpDesignElement.java @@ -0,0 +1,108 @@ +package com.zhiqim.yangcai.design.dbo.dzmpsupport; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 电子名片:名片设计元素 对应表《DZMP_DESIGN_ELEMENT》 + * + * @author HuangZhiGao + * @date 2020年7月22日 上午11:06:19 + */ +@AnAlias("DzmpDesignElement") +@AnNew +@AnTable(table = "DZMP_DESIGN_ELEMENT", key = "ID", type = "InnoDB") +public class DzmpDesignElement implements Serializable +{ + private static final long serialVersionUID = 1L; + + /** + * 名片设计元素对应id + */ + @AnTableField(column = "ID", type = "string,600", notNull = true) + private String id; + + /** + * 订单模板素材id + */ + @AnTableField(column = "MEDIA_ID", type = "long", notNull = true) + private long mediaId; + + /** + * 名片设计元素对应json字符串 + */ + @AnTableField(column = "ELE_JSON", type = "string,5000", notNull = true) + private String eleJson; + + /** + * 名片设计元素更新时间 + */ + @AnTableField(column = "MODIFY_TIME", type = "datetime", notNull = false) + private Timestamp modifyTime; + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public DzmpDesignElement() + { + } + + public DzmpDesignElement(String id, long mediaId, String eleJson, Timestamp modifyTime) + { + super(); + this.id = id; + this.mediaId = mediaId; + this.eleJson = eleJson; + this.modifyTime = modifyTime; + } + + public String getId() + { + return id; + } + + public void setId(String id) + { + this.id = id; + } + + public long getMediaId() + { + return mediaId; + } + + public void setMediaId(long mediaId) + { + this.mediaId = mediaId; + } + + public String getEleJson() + { + return eleJson; + } + + public void setEleJson(String eleJson) + { + this.eleJson = eleJson; + } + + public Timestamp getModifyTime() + { + return modifyTime; + } + + public void setModifyTime(Timestamp modifyTime) + { + this.modifyTime = modifyTime; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/editor/DesignEditorUser.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/editor/DesignEditorUser.java new file mode 100644 index 0000000..c375ddf --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/editor/DesignEditorUser.java @@ -0,0 +1,88 @@ +package com.zhiqim.yangcai.design.dbo.editor; + +import java.io.Serializable; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 订单表 对应表《DESIGN_ORDER》 + */ +@AnAlias("DesignEditorUser") +@AnNew +@AnTable(table = "DESIGN_EDITOR_USER", key = "EDITOR_ID", type = "InnoDB") +public class DesignEditorUser implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "EDITOR_ID", type = "long", notNull = true) + private long editorId; // 1.品类id + @AnTableField(column = "USER_NAME", type = "string,200", notNull = false) + private String userName; // 2.名称 + @AnTableField(column = "MOBILE", type = "string,200", notNull = false) + private String mobile; // 3.品类跳转id + @AnTableField(column = "HEAD_IMG", type = "string,200", notNull = false) + private String headImg; // 4.类型id + @AnTableField(column = "TYPE", type = "int", notNull = false) + private int type; // 5.类型名称 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public long getEditorId() + { + return editorId; + } + + public void setEditorId(long editorId) + { + this.editorId = editorId; + } + + public String getUserName() + { + return userName; + } + + public void setUserName(String userName) + { + this.userName = userName; + } + + public String getMobile() + { + return mobile; + } + + public void setMobile(String mobile) + { + this.mobile = mobile; + } + + public String getHeadImg() + { + return headImg; + } + + public void setHeadImg(String headImg) + { + this.headImg = headImg; + } + + public int getType() + { + return type; + } + + public void setType(int type) + { + this.type = type; + } + +} \ No newline at end of file diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/editor/DesignPinlei.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/editor/DesignPinlei.java new file mode 100644 index 0000000..2134c6d --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/editor/DesignPinlei.java @@ -0,0 +1,88 @@ +package com.zhiqim.yangcai.design.dbo.editor; + +import java.io.Serializable; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 订单表 对应表《DESIGN_ORDER》 + */ +@AnAlias("DesignPinlei") +@AnNew +@AnTable(table = "DESIGN_PINLEI", key = "ID", type = "InnoDB") +public class DesignPinlei implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "ID", type = "long", notNull = true) + private long id; // 1.品类id + @AnTableField(column = "NAME", type = "string,200", notNull = false) + private String name; // 2.名称 + @AnTableField(column = "CLASSIFY_ID", type = "long", notNull = false) + private long classifyId; // 3.品类跳转id + @AnTableField(column = "TYPE_ID", type = "long", notNull = false) + private long typeId; // 4.类型id + @AnTableField(column = "TYPE_NAME", type = "string,200", notNull = false) + private String typeName; // 5.类型名称 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public long getId() + { + return id; + } + + public void setId(long id) + { + this.id = id; + } + + public String getName() + { + return name; + } + + public void setName(String name) + { + this.name = name; + } + + public long getTypeId() + { + return typeId; + } + + public void setTypeId(long typeId) + { + this.typeId = typeId; + } + + public String getTypeName() + { + return typeName; + } + + public void setTypeName(String typeName) + { + this.typeName = typeName; + } + + public long getClassifyId() + { + return classifyId; + } + + public void setClassifyId(long classifyId) + { + this.classifyId = classifyId; + } + +} \ No newline at end of file diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/editor/OrderToken.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/editor/OrderToken.java new file mode 100644 index 0000000..df7152f --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/editor/OrderToken.java @@ -0,0 +1,77 @@ +package com.zhiqim.yangcai.design.dbo.editor; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 订单表 对应表《DESIGN_ORDER》 + */ +@AnAlias("OrderToken") +@AnNew +@AnTable(table = "ORDER_TOKEN", key = "ID", type = "InnoDB") +public class OrderToken implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "ID", type = "long", notNull = true) + private long id; // 1.品类id + @AnTableField(column = "TOKEN_KEY", type = "string,500", notNull = false) + private String tokenKey; // 2.名称 + @AnTableField(column = "CONTEXT", type = "string,500", notNull = false) + private String context; // 5.类型名称 + @AnTableField(column = "ADD_TIME", type = "datetime", notNull = true) + private Timestamp addTime; // 13.上传时间 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public long getId() + { + return id; + } + + public void setId(long id) + { + this.id = id; + } + + public String getTokenKey() + { + return tokenKey; + } + + public void setTokenKey(String tokenKey) + { + this.tokenKey = tokenKey; + } + + public String getContext() + { + return context; + } + + public void setContext(String context) + { + this.context = context; + } + + public Timestamp getAddTime() + { + return addTime; + } + + public void setAddTime(Timestamp addTime) + { + this.addTime = addTime; + } + +} \ No newline at end of file diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/keyword/DesKeywordCore.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/keyword/DesKeywordCore.java new file mode 100644 index 0000000..e03c237 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/keyword/DesKeywordCore.java @@ -0,0 +1,81 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.keyword; + +import java.io.Serializable; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 关键词库表 对应表《DES_KEYWORD_CORE》 + */ +@AnAlias("DesKeywordCore") +@AnNew +@AnTable(table="DES_KEYWORD_CORE", key="", type="InnoDB") +public class DesKeywordCore implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column="KEYWORD_NAME", type="string,1000", notNull=true) private String keywordName; //1.关键词名称 + @AnTableField(column="KEYWORD_HOT", type="int", notNull=true) private int keywordHot; //2.关键词热度(相似度50% + 1) + @AnTableField(column="KEYWORD_NUM", type="int", notNull=true) private int keywordNum; //3.关键词搜索次数 + @AnTableField(column="KEYWORD_SCORE", type="int", notNull=true) private int keywordScore; //4.关键词分数 + + public String toString() + { + return Jsons.toString(this); + } + + public String getKeywordName() + { + return keywordName; + } + + public void setKeywordName(String keywordName) + { + this.keywordName = keywordName; + } + + public int getKeywordHot() + { + return keywordHot; + } + + public void setKeywordHot(int keywordHot) + { + this.keywordHot = keywordHot; + } + + public int getKeywordNum() + { + return keywordNum; + } + + public void setKeywordNum(int keywordNum) + { + this.keywordNum = keywordNum; + } + + public int getKeywordScore() + { + return keywordScore; + } + + public void setKeywordScore(int keywordScore) + { + this.keywordScore = keywordScore; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/keyword/DesKeywordCoreLog.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/keyword/DesKeywordCoreLog.java new file mode 100644 index 0000000..2190c38 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/keyword/DesKeywordCoreLog.java @@ -0,0 +1,103 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.keyword; + +import java.io.Serializable; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 关键词库日志表 对应表《DES_KEYWORD_CORE_LOG》 + */ +@AnAlias("DesKeywordCoreLog") +@AnNew +@AnTable(table="DES_KEYWORD_CORE_LOG", key="LOG_ID", type="InnoDB") +public class DesKeywordCoreLog implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column="LOG_ID", type="long", notNull=true) private long logId; //1.日志ID + @AnTableField(column="DAY_CODE", type="string,10", notNull=true) private String dayCode; //2.日期 + @AnTableField(column="MONTH_CODE", type="string,10", notNull=true) private String monthCode; //3.月份 + @AnTableField(column="KEYWORD_NAME", type="string,5000", notNull=true) private String keywordName; //4.关键词名称 + @AnTableField(column="KEYWORD_HOT", type="int", notNull=false) private int keywordHot; //5.关键词热度(相似度50% + 1) + @AnTableField(column="KEYWORD_NUM", type="int", notNull=false) private int keywordNum; //6.关键词搜索次数 + + public String toString() + { + return Jsons.toString(this); + } + + public long getLogId() + { + return logId; + } + + public void setLogId(long logId) + { + this.logId = logId; + } + + public String getDayCode() + { + return dayCode; + } + + public void setDayCode(String dayCode) + { + this.dayCode = dayCode; + } + + public String getMonthCode() + { + return monthCode; + } + + public void setMonthCode(String monthCode) + { + this.monthCode = monthCode; + } + + public String getKeywordName() + { + return keywordName; + } + + public void setKeywordName(String keywordName) + { + this.keywordName = keywordName; + } + + public int getKeywordHot() + { + return keywordHot; + } + + public void setKeywordHot(int keywordHot) + { + this.keywordHot = keywordHot; + } + + public int getKeywordNum() + { + return keywordNum; + } + + public void setKeywordNum(int keywordNum) + { + this.keywordNum = keywordNum; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/keyword/DesKeywordCoreStat.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/keyword/DesKeywordCoreStat.java new file mode 100644 index 0000000..b5ec35b --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/keyword/DesKeywordCoreStat.java @@ -0,0 +1,114 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.keyword; + +import java.io.Serializable; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 关键词库统计表 对应表《DES_KEYWORD_CORE_STAT》 + */ +@AnAlias("DesKeywordCoreStat") +@AnNew +@AnTable(table="DES_KEYWORD_CORE_STAT", key="", type="InnoDB") +public class DesKeywordCoreStat implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column="DAY_CODE", type="string,10", notNull=true) private String dayCode; //1.日期 + @AnTableField(column="KEYWORD_NAME", type="string,1000", notNull=true) private String keywordName; //2.关键词名称 + @AnTableField(column="MONTH_CODE", type="string,10", notNull=true) private String monthCode; //3.月份 + @AnTableField(column="KEYWORD_HOT", type="int", notNull=true) private int keywordHot; //4.关键词热度(相似度50% + 1) + @AnTableField(column="KEYWORD_NUM", type="int", notNull=true) private int keywordNum; //5.关键词搜索次数 + @AnTableField(column="KEYWORD_NUM_RANK", type="int", notNull=true) private int keywordNumRank; //6.关键词搜索排名 + @AnTableField(column="KEYWORD_HOT_RANK", type="int", notNull=true) private int keywordHotRank; //7.关键词热度排名 + + public String toString() + { + return Jsons.toString(this); + } + + public String getDayCode() + { + return dayCode; + } + + public void setDayCode(String dayCode) + { + this.dayCode = dayCode; + } + + public String getKeywordName() + { + return keywordName; + } + + public void setKeywordName(String keywordName) + { + this.keywordName = keywordName; + } + + public String getMonthCode() + { + return monthCode; + } + + public void setMonthCode(String monthCode) + { + this.monthCode = monthCode; + } + + public int getKeywordHot() + { + return keywordHot; + } + + public void setKeywordHot(int keywordHot) + { + this.keywordHot = keywordHot; + } + + public int getKeywordNum() + { + return keywordNum; + } + + public void setKeywordNum(int keywordNum) + { + this.keywordNum = keywordNum; + } + + public int getKeywordNumRank() + { + return keywordNumRank; + } + + public void setKeywordNumRank(int keywordNumRank) + { + this.keywordNumRank = keywordNumRank; + } + + public int getKeywordHotRank() + { + return keywordHotRank; + } + + public void setKeywordHotRank(int keywordHotRank) + { + this.keywordHotRank = keywordHotRank; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/keyword/DesKeywordIndex.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/keyword/DesKeywordIndex.java new file mode 100644 index 0000000..9a65b17 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/keyword/DesKeywordIndex.java @@ -0,0 +1,92 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.keyword; + +import java.io.Serializable; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 关键词索引表 对应表《DES_KEYWORD_INDEX》 + */ +@AnAlias("DesKeywordIndex") +@AnNew +@AnTable(table="DES_KEYWORD_INDEX", key="MEDIA_ID", type="InnoDB") +public class DesKeywordIndex implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column="MEDIA_ID", type="long", notNull=true) private long mediaId; //1.媒体编号 + @AnTableField(column="LABEL_KEYWORD", type="string,5000", notNull=false) private String labelKeyword; //2.标签关键词 + @AnTableField(column="CUSTOM_LABEL_KEYWORD", type="string,5000", notNull=false) private String customLabelKeyword; //3.自定义标签关键词 + @AnTableField(column="LONG_TAIL_KEYWORD", type="string,5000", notNull=false) private String longTailKeyword; //4.长尾词关键词 + @AnTableField(column="MEDIA_SCORE", type="int", notNull=false) private int mediaScore; //5.模板指数 + + public String toString() + { + return Jsons.toString(this); + } + + public long getMediaId() + { + return mediaId; + } + + public void setMediaId(long mediaId) + { + this.mediaId = mediaId; + } + + public String getLabelKeyword() + { + return labelKeyword; + } + + public void setLabelKeyword(String labelKeyword) + { + this.labelKeyword = labelKeyword; + } + + public String getCustomLabelKeyword() + { + return customLabelKeyword; + } + + public void setCustomLabelKeyword(String customLabelKeyword) + { + this.customLabelKeyword = customLabelKeyword; + } + + public String getLongTailKeyword() + { + return longTailKeyword; + } + + public void setLongTailKeyword(String longTailKeyword) + { + this.longTailKeyword = longTailKeyword; + } + + public int getMediaScore() + { + return mediaScore; + } + + public void setMediaScore(int mediaScore) + { + this.mediaScore = mediaScore; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/keyword/DesKeywordIndustry.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/keyword/DesKeywordIndustry.java new file mode 100644 index 0000000..6f4d8c1 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/keyword/DesKeywordIndustry.java @@ -0,0 +1,70 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.keyword; + +import java.io.Serializable; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 行业关键词 对应表《DES_KEYWORD_INDUSTRY》 + */ +@AnAlias("DesKeywordIndustry") +@AnNew +@AnTable(table="DES_KEYWORD_INDUSTRY", key="", type="InnoDB") +public class DesKeywordIndustry implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column="INDUSTRY_ID", type="long", notNull=true) private long industryId; //1.行业ID + @AnTableField(column="INDUSTRY_SUB_ID", type="string,1000", notNull=true) private String industrySubId; //2.子行业ID + @AnTableField(column="INDUSTRY_KEYWORD", type="string,5000", notNull=true) private String industryKeyword; //3.行业关键词 + + public String toString() + { + return Jsons.toString(this); + } + + public long getIndustryId() + { + return industryId; + } + + public void setIndustryId(long industryId) + { + this.industryId = industryId; + } + + public String getIndustrySubId() + { + return industrySubId; + } + + public void setIndustrySubId(String industrySubId) + { + this.industrySubId = industrySubId; + } + + public String getIndustryKeyword() + { + return industryKeyword; + } + + public void setIndustryKeyword(String industryKeyword) + { + this.industryKeyword = industryKeyword; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/notice/Notice.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/notice/Notice.java new file mode 100644 index 0000000..44a61e6 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/notice/Notice.java @@ -0,0 +1,151 @@ +/** + * 扬彩印刷设计 + * 文件名 :Notice.java + * 创建人 :gjx + * 创建时间:2021年6月29日 +*/ + +package com.zhiqim.yangcai.design.dbo.notice; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 关键词库表 对应表《DES_KEYWORD_CORE》 + */ +@AnAlias("Notice") +@AnNew +@AnTable(table = "design_notice", key = "id", type = "InnoDB") +public class Notice implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "id", type = "long", notNull = true) + private long id; // 1.id + @AnTableField(column = "title", type = "string,100", notNull = false) + private String title; // 2.公告标题 + @AnTableField(column = "content", type = "string,50000", notNull = false) + private String content; // 3.公告内容 + @AnTableField(column = "add_user", type = "string,30", notNull = false) + private String addUser; // 4.发布的用户 + @AnTableField(column = "add_time", type = "datetime", notNull = false) + private Timestamp addTime; // 5.添加时间 + @AnTableField(column = "update_user", type = "string,30", notNull = false) + private String updateUser; // 6.修改的用户 + @AnTableField(column = "update_time", type = "datetime", notNull = false) + private Timestamp updateTime; // 7.修改时间 + @AnTableField(column = "status", type = "int", notNull = false) + private int status; // 9.公告状态 草稿=0;已发布=1;下线=2; + + @AnTableField(column = "finsh_time", type = "datetime", notNull = false) + private Timestamp finshTime; // 7.发布时间 + + @AnTableField(column = "finsh_user", type = "string,30", notNull = false) + private String finshUser; // 7.发布人 + + public String getFinshUser() + { + return finshUser; + } + + public void setFinshUser(String finshUser) + { + this.finshUser = finshUser; + } + + public Timestamp getFinshTime() + { + return finshTime; + } + + public void setFinshTime(Timestamp finshTime) + { + this.finshTime = finshTime; + } + + public long getId() + { + return id; + } + + public void setId(long id) + { + this.id = id; + } + + public String getTitle() + { + return title; + } + + public void setTitle(String title) + { + this.title = title; + } + + public String getContent() + { + return content; + } + + public void setContent(String content) + { + this.content = content; + } + + public String getAddUser() + { + return addUser; + } + + public void setAddUser(String addUser) + { + this.addUser = addUser; + } + + public Timestamp getAddTime() + { + return addTime; + } + + public void setAddTime(Timestamp addTime) + { + this.addTime = addTime; + } + + public String getUpdateUser() + { + return updateUser; + } + + public void setUpdateUser(String updateUser) + { + this.updateUser = updateUser; + } + + public Timestamp getUpdateTime() + { + return updateTime; + } + + public void setUpdateTime(Timestamp updateTime) + { + this.updateTime = updateTime; + } + + public int getStatus() + { + return status; + } + + public void setStatus(int status) + { + this.status = status; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/order/ConfigQuestions.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/order/ConfigQuestions.java new file mode 100644 index 0000000..a939709 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/order/ConfigQuestions.java @@ -0,0 +1,88 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.order; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 考试题库表 + */ +@AnAlias("ConfigQuestions") +@AnNew +@AnTable(table = "CONFIG_QUESTIONS", key = "QUESTIONS_ID", type = "InnoDB") +public class ConfigQuestions implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "QUESTIONS_ID", type = "long", notNull = true) + private long questionsId; // 1.题库编号 + @AnTableField(column = "DESIGN_REQUIREMENTS", type = "string,400", notNull = true) + private String designRequirements; // 2.设计要求 + @AnTableField(column = "UPDATE_OPERATOR", type = "string,50", notNull = true) + private String updateOperator; // 3.操作员 + @AnTableField(column = "MODIFICATION_TIME", type = "datetime", notNull = true) + private Timestamp modificationTime; // 4.最后修改时间 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public long getQuestionsId() + { + return questionsId; + } + + public void setQuestionsId(long questionsId) + { + this.questionsId = questionsId; + } + + public String getDesignRequirements() + { + return designRequirements; + } + + public void setDesignRequirements(String designRequirements) + { + this.designRequirements = designRequirements; + } + + public String getUpdateOperator() + { + return updateOperator; + } + + public void setUpdateOperator(String updateOperator) + { + this.updateOperator = updateOperator; + } + + public Timestamp getModificationTime() + { + return modificationTime; + } + + public void setModificationTime(Timestamp modificationTime) + { + this.modificationTime = modificationTime; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/order/DesignAtta.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/order/DesignAtta.java new file mode 100644 index 0000000..46ac966 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/order/DesignAtta.java @@ -0,0 +1,208 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.order; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 设计资料附件表 对应表《DESIGN_ATTA》 + */ +@AnAlias("DesignAtta") +@AnNew +@AnTable(table = "DESIGN_ATTA", key = "ATTA_ID", type = "InnoDB") +public class DesignAtta implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "ATTA_ID", type = "long", notNull = true) + private long attaId; // 1.订单附件编号 + @AnTableField(column = "DESIGN_ID", type = "long", notNull = true) + private long designId; // 2.设计订单编号 + @AnTableField(column = "ATTA_MODUL", type = "string,100", notNull = true) + private String attaModul; // 3.附件标识 + @AnTableField(column = "FILE_NAME", type = "string,200", notNull = true) + private String fileName; // 4.文件名 + @AnTableField(column = "FILE_TYPE", type = "string,10", notNull = true) + private String fileType; // 5.文件类型。.pdf、.cdr、.jpg + @AnTableField(column = "SAVE_PATH", type = "string,2000", notNull = false) + private String savePath; // 6.文件存储路径 + @AnTableField(column = "OSS_TYPE", type = "int", notNull = true) + private int ossType; // 7.存储类型-1=无效数据(本地和oss都不存在),=0 本地文件(oss未上传) 1= OSS文件(本地文件已删除) + @AnTableField(column = "ATTA_FLAG", type = "int", notNull = true) + private int attaFlag; // 8.附件表示,0=用户登录系统上传的文件,1=用户通过接口传送的文件 + @AnTableField(column = "OSS_URL", type = "string,400", notNull = false) + private String ossUrl; // 9.OSS访问地址 + @AnTableField(column = "FILE_SIZE", type = "long", notNull = true) + private long fileSize; // 10.文件大小 字节 + @AnTableField(column = "FILEID", type = "string,64", notNull = false) + private String fileid; // 11.文件Hash值 + @AnTableField(column = "OPERATOR_CODE", type = "string,64", notNull = false) + private String operatorCode; // 12.上传人 + @AnTableField(column = "UPLOAD_TIME", type = "datetime", notNull = true) + private Timestamp uploadTime; // 13.上传时间 + @AnTableField(column = "NOT_EXISTS_LOCAL_FILE", type = "int", notNull = true) + private int notExistsLocalFile; // 14.是否存在本地文件 =0或者=null 未被标记,1=本地存在, =2 本地文件已被删除 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public long getAttaId() + { + return attaId; + } + + public void setAttaId(long attaId) + { + this.attaId = attaId; + } + + public long getDesignId() + { + return designId; + } + + public void setDesignId(long designId) + { + this.designId = designId; + } + + public String getAttaModul() + { + return attaModul; + } + + public void setAttaModul(String attaModul) + { + this.attaModul = attaModul; + } + + public String getFileName() + { + return fileName; + } + + public void setFileName(String fileName) + { + this.fileName = fileName; + } + + public String getFileType() + { + return fileType; + } + + public void setFileType(String fileType) + { + this.fileType = fileType; + } + + public String getSavePath() + { + return savePath; + } + + public void setSavePath(String savePath) + { + this.savePath = savePath; + } + + public int getOssType() + { + return ossType; + } + + public void setOssType(int ossType) + { + this.ossType = ossType; + } + + public int getAttaFlag() + { + return attaFlag; + } + + public void setAttaFlag(int attaFlag) + { + this.attaFlag = attaFlag; + } + + public String getOssUrl() + { + return ossUrl; + } + + public void setOssUrl(String ossUrl) + { + this.ossUrl = ossUrl; + } + + public long getFileSize() + { + return fileSize; + } + + public void setFileSize(long fileSize) + { + this.fileSize = fileSize; + } + + public String getFileid() + { + return fileid; + } + + public void setFileid(String fileid) + { + this.fileid = fileid; + } + + public String getOperatorCode() + { + return operatorCode; + } + + public void setOperatorCode(String operatorCode) + { + this.operatorCode = operatorCode; + } + + public Timestamp getUploadTime() + { + return uploadTime; + } + + public void setUploadTime(Timestamp uploadTime) + { + this.uploadTime = uploadTime; + } + + public int getNotExistsLocalFile() + { + return notExistsLocalFile; + } + + public void setNotExistsLocalFile(int notExistsLocalFile) + { + this.notExistsLocalFile = notExistsLocalFile; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/order/DesignAttaView.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/order/DesignAttaView.java new file mode 100644 index 0000000..a43ff8d --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/order/DesignAttaView.java @@ -0,0 +1,171 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.order; + +import java.sql.Timestamp; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 设计订单附件视图 对应视图《DESIGN_ATTA_VIEW》 + */ +@AnAlias("DesignAttaView") +@AnNew +@AnView("DESIGN_ATTA,DESIGN_ORDER") +@AnViewJoin({@AnViewJoinValue(type="EQUAL", lTable="DESIGN_ORDER", lColumn="DESIGN_ID", rTable="DESIGN_ATTA", rColumn="DESIGN_ID")}) +public class DesignAttaView extends DesignOrder +{ + private static final long serialVersionUID = 1L; + + @AnViewField(table="DESIGN_ATTA", column="ATTA_ID") private long attaId; //2.订单附件编号 + @AnViewField(table="DESIGN_ATTA", column="ATTA_MODUL") private String attaModul; //3.附件标识 + @AnViewField(table="DESIGN_ATTA", column="FILE_NAME") private String fileName; //4.文件名 + @AnViewField(table="DESIGN_ATTA", column="FILE_TYPE") private String fileType; //5.文件类型。.pdf、.cdr、.jpg + @AnViewField(table="DESIGN_ATTA", column="SAVE_PATH") private String savePath; //6.文件存储路径 + @AnViewField(table="DESIGN_ATTA", column="OSS_TYPE") private int ossType; //7.存储类型-1=无效数据(本地和oss都不存在),=0 本地文件(oss未上传) 1= OSS文件(本地文件已删除) + @AnViewField(table="DESIGN_ATTA", column="OSS_URL") private String ossUrl; //8.OSS访问地址 + @AnViewField(table="DESIGN_ATTA", column="FILE_SIZE") private long fileSize; //9.文件大小 字节 + @AnViewField(table="DESIGN_ATTA", column="FILEID") private String fileid; //10.文件Hash值 + @AnViewField(table="DESIGN_ATTA", column="OPERATOR_CODE") private String operatorCode; //11.上传人 + @AnViewField(table="DESIGN_ATTA", column="UPLOAD_TIME") private Timestamp uploadTime; //12.上传时间 + @AnViewField(table="DESIGN_ATTA", column="NOT_EXISTS_LOCAL_FILE") private int notExistsLocalFile; //13.是否存在本地文件 =0或者=null 未被标记,1=本地存在, =2 本地文件已被删除 + + public String toString() + { + return Jsons.toString(this); + } + + public long getAttaId() + { + return attaId; + } + + public void setAttaId(long attaId) + { + this.attaId = attaId; + } + + public String getAttaModul() + { + return attaModul; + } + + public void setAttaModul(String attaModul) + { + this.attaModul = attaModul; + } + + public String getFileName() + { + return fileName; + } + + public void setFileName(String fileName) + { + this.fileName = fileName; + } + + public String getFileType() + { + return fileType; + } + + public void setFileType(String fileType) + { + this.fileType = fileType; + } + + public String getSavePath() + { + return savePath; + } + + public void setSavePath(String savePath) + { + this.savePath = savePath; + } + + public int getOssType() + { + return ossType; + } + + public void setOssType(int ossType) + { + this.ossType = ossType; + } + + public String getOssUrl() + { + return ossUrl; + } + + public void setOssUrl(String ossUrl) + { + this.ossUrl = ossUrl; + } + + public long getFileSize() + { + return fileSize; + } + + public void setFileSize(long fileSize) + { + this.fileSize = fileSize; + } + + public String getFileid() + { + return fileid; + } + + public void setFileid(String fileid) + { + this.fileid = fileid; + } + + public String getOperatorCode() + { + return operatorCode; + } + + public void setOperatorCode(String operatorCode) + { + this.operatorCode = operatorCode; + } + + public Timestamp getUploadTime() + { + return uploadTime; + } + + public void setUploadTime(Timestamp uploadTime) + { + this.uploadTime = uploadTime; + } + + public int getNotExistsLocalFile() + { + return notExistsLocalFile; + } + + public void setNotExistsLocalFile(int notExistsLocalFile) + { + this.notExistsLocalFile = notExistsLocalFile; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/order/DesignOrdLogView.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/order/DesignOrdLogView.java new file mode 100644 index 0000000..987ef92 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/order/DesignOrdLogView.java @@ -0,0 +1,80 @@ +/** + * 扬彩印刷设计 + * 文件名 :DesignOrdLogView.java + * 创建人 :gjx + * 创建时间:2019-9-19 + */ + +package com.zhiqim.yangcai.design.dbo.order; + +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnView; +import org.zhiqim.orm.annotation.AnViewField; +import org.zhiqim.orm.annotation.AnViewJoin; +import org.zhiqim.orm.annotation.AnViewJoinValue; + +/** + * + * 订单日志关联表 + * + * @version 1.0 @author gjx 2019-9-19 新建与整理 + */ +@AnAlias("DesignOrdLogView") +@AnNew +@AnView("DESIGN_ORDER,ORD_OPR_LOG") +@AnViewJoin( +{ + @AnViewJoinValue(type = "EQUAL", lTable = "ORD_OPR_LOG", lColumn = "DESIGN_ID", rTable = "DESIGN_ORDER", rColumn = "DESIGN_ID") +}) +public class DesignOrdLogView extends DesignOrder +{ + private static final long serialVersionUID = 1L; + + @AnViewField(table = "ORD_OPR_LOG", column = "OPERATE_DESC") + private String operateDesc; // 1.操作项,简述操作描述 + @AnViewField(table = "ORD_OPR_LOG", column = "EVENT_TYPE") + private int eventType; // 2.事件类型 + @AnViewField(table = "ORD_OPR_LOG", column = "CREATE_TIME") + private Timestamp createLogTime; // //3.日志创建时间 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public String getOperateDesc() + { + return operateDesc; + } + + public void setOperateDesc(String operateDesc) + { + this.operateDesc = operateDesc; + } + + public int getEventType() + { + return eventType; + } + + public void setEventType(int eventType) + { + this.eventType = eventType; + } + + public Timestamp getCreateLogTime() + { + return createLogTime; + } + + public void setCreateLogTime(Timestamp createLogTime) + { + this.createLogTime = createLogTime; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/order/DesignOrdRetentView.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/order/DesignOrdRetentView.java new file mode 100644 index 0000000..2dbb62b --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/order/DesignOrdRetentView.java @@ -0,0 +1,121 @@ +/** + * 扬彩印刷设计 + * 文件名 :DesignOrdRetentView.java + * 创建人 :高佳新 + * 创建时间:2019-7-22 + */ + +package com.zhiqim.yangcai.design.dbo.order; + +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.orm.annotation.AnView; +import org.zhiqim.orm.annotation.AnViewField; +import org.zhiqim.orm.annotation.AnViewJoin; +import org.zhiqim.orm.annotation.AnViewJoinValue; + +/** + * + * 订单与滞留信息关联视图 + * + * @version 1.0 @author gjx 2019-7-22 新建与整理 + */ +@AnAlias("DesignOrdRetentView") +@AnNew +@AnView("RETENTION_DETAILS,DESIGN_ORDER") +@AnViewJoin( +{ + @AnViewJoinValue(type = "EQUAL", lTable = "DESIGN_ORDER", lColumn = "DESIGN_ID", rTable = "RETENTION_DETAILS", rColumn = "DESIGN_ID") +}) +public class DesignOrdRetentView extends DesignOrder +{ + private static final long serialVersionUID = 1L; + + @AnViewField(table = "RETENTION_DETAILS", column = "IS_RETENT_DEAL") + private int isRetentDeal; // 2.设计师是否处理过滞留单,0 没、1 处理过 + @AnViewField(table = "RETENTION_DETAILS", column = "RETENT_DEAL_TIME") + private Timestamp retentDealTime; // 3.滞留单自行处理时间 + @AnViewField(table = "RETENTION_DETAILS", column = "RETENT_DEAL_NAME") + private String retentDealName; // 4.滞留单处理人 + @AnViewField(table = "RETENTION_DETAILS", column = "RETENT_DEAL_WAY") + private int retentDealWay; // 5.滞留单处理方式 0:寄存、1:退款 + @AnViewField(table = "RETENTION_DETAILS", column = "RETENT_FOLLOW_FLAG") + private int retentFollowFlag; // 6.设计师跟进情况:0:较好、1:一般、2:差 + @AnViewField(table = "RETENTION_DETAILS", column = "RETENT_REMARK") + private String retentRemark; // 7.滞留单处理备注 + @AnViewField(table = "RETENTION_DETAILS", column = "RETENTION_END_TIME") + private Timestamp retentionEndTime; // 8.滞留单处理时间 + + public int getIsRetentDeal() + { + return isRetentDeal; + } + + public void setIsRetentDeal(int isRetentDeal) + { + this.isRetentDeal = isRetentDeal; + } + + public Timestamp getRetentDealTime() + { + return retentDealTime; + } + + public void setRetentDealTime(Timestamp retentDealTime) + { + this.retentDealTime = retentDealTime; + } + + public String getRetentDealName() + { + return retentDealName; + } + + public void setRetentDealName(String retentDealName) + { + this.retentDealName = retentDealName; + } + + public int getRetentDealWay() + { + return retentDealWay; + } + + public void setRetentDealWay(int retentDealWay) + { + this.retentDealWay = retentDealWay; + } + + public int getRetentFollowFlag() + { + return retentFollowFlag; + } + + public void setRetentFollowFlag(int retentFollowFlag) + { + this.retentFollowFlag = retentFollowFlag; + } + + public String getRetentRemark() + { + return retentRemark; + } + + public void setRetentRemark(String retentRemark) + { + this.retentRemark = retentRemark; + } + + public Timestamp getRetentionEndTime() + { + return retentionEndTime; + } + + public void setRetentionEndTime(Timestamp retentionEndTime) + { + this.retentionEndTime = retentionEndTime; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/order/DesignOrder.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/order/DesignOrder.java new file mode 100644 index 0000000..2ebbdd3 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/order/DesignOrder.java @@ -0,0 +1,1145 @@ +package com.zhiqim.yangcai.design.dbo.order; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 订单表 对应表《DESIGN_ORDER》 + */ +@AnAlias("DesignOrder") +@AnNew +@AnTable(table = "DESIGN_ORDER", key = "DESIGN_ID", type = "InnoDB") +public class DesignOrder implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "DESIGN_ID", type = "long", notNull = true) + private long designId; // 1.设订单编号,设计平台独立编号 + @AnTableField(column = "MERCHANT_ID", type = "long", notNull = true) + private long merchantId; // 2.订单商户编号 + @AnTableField(column = "OUT_ID", type = "long", notNull = true) + private long outId; // 3.外部系统单号 + @AnTableField(column = "STATUS", type = "int", notNull = true) + private int status; // 4.订单状态 + @AnTableField(column = "ORDER_TEXT", type = "string,200", notNull = true) + private String orderText; // 5.订单描述 + @AnTableField(column = "AMOUNT", type = "long", notNull = true) + private long amount; // 6.订单总金额 + @AnTableField(column = "TYPE_ID", type = "long", notNull = true) + private long typeId; // 7.设计类型,名片、彩页、等等 + @AnTableField(column = "INDUSTRY_ID", type = "long", notNull = true) + private long industryId; // 8.所属行业 + @AnTableField(column = "DRAFT_TYPE", type = "int", notNull = true) + private int draftType; // 9.稿件类型,0:自来稿,1:改稿自来稿,2:普通设计,3:高级设计 + @AnTableField(column = "IS_URGENT", type = "boolean", notNull = true) + private boolean isUrgent; // 10.是否加急 + @AnTableField(column = "DESIGN_PAGE", type = "int", notNull = true) + private int designPage; // 11.设计面数 + @AnTableField(column = "DESIGN_WIDTH", type = "decimal,5,2", notNull = true) + private double designWidth; // 12.设计宽度 单位mm + @AnTableField(column = "DESIGN_HEIGHT", type = "decimal,5,2", notNull = true) + private double designHeight; // 13.设计高度 单位mm + @AnTableField(column = "PRINT_WIDTH", type = "decimal,5,2", notNull = true) + private double printWidth; // 14.印刷宽度,非常规尺寸使用(优先使用该尺寸) + @AnTableField(column = "PRINT_HEIGHT", type = "decimal,5,2", notNull = true) + private double printHeight; // 15.印刷高度,非常规尺寸使用(优先使用该尺寸) + @AnTableField(column = "PRINT_KS", type = "int", notNull = true) + private int printKs; // 16.印刷款数 + @AnTableField(column = "PRINT_MS", type = "int", notNull = true) + private int printMs; // 17.印刷模数 + @AnTableField(column = "USER_CONTACT", type = "string,100", notNull = true) + private String userContact; // 18.联系人 + @AnTableField(column = "USER_MOBILE", type = "string,64", notNull = true) + private String userMobile; // 19.用户手机 + @AnTableField(column = "AFTER_NAMES", type = "string,1000", notNull = false) + private String afterNames; // 20.后加工名称,多个逗号隔开 + @AnTableField(column = "PRINT_SPECIAL", type = "string,100", notNull = false) + private String printSpecial; // 21.印刷特殊工艺 + @AnTableField(column = "BUYER_NICK", type = "string,100", notNull = false) + private String buyerNick; // 22.客户昵称 + @AnTableField(column = "USER_TEXT", type = "string,4000", notNull = false) + private String userText; // 23.客户文本 + @AnTableField(column = "USER_NOTICE", type = "string,1000", notNull = false) + private String userNotice; // 24.客户注意事项 + @AnTableField(column = "USER_QQ", type = "string,64", notNull = false) + private String userQq; // 25.用户QQ + @AnTableField(column = "USER_WX", type = "string,64", notNull = false) + private String userWx; // 26.用户微信 + @AnTableField(column = "USER_TEXT_REPLACE", type = "string,4000", notNull = false) + private String userTextReplace; // 27.格式化后的客户文本 + @AnTableField(column = "REMINDER_NUM", type = "int", notNull = true) + private int reminderNum; // 28.催单次数 + @AnTableField(column = "SHOP_NICK", type = "string,32", notNull = false) + private String shopNick; // 29.店铺名称 + @AnTableField(column = "ORG_ID", type = "long", notNull = false) + private long orgId; // 30.操作员组织编号 + @AnTableField(column = "ORG_RECEIVE_TIME", type = "datetime", notNull = false) + private Timestamp orgReceiveTime; // 31.订单分拣至商户时间 + @AnTableField(column = "RECEIVE_TYPE", type = "int", notNull = false) + private int receiveType; // 32.订单领取类型,0手动领单, 1 自动派单,2 手工指定 + @AnTableField(column = "ORDER_FLAG", type = "int", notNull = true) + private int orderFlag; // 33.订单标记,0:正常订单,1:老用户订单(不计时效),2:老用户订单(计时效) + @AnTableField(column = "DESIGNER", type = "string,20", notNull = false) + private String designer; // 34.设计师 + @AnTableField(column = "DESIGN_RECEIVE_TIME", type = "datetime", notNull = false) + private Timestamp designReceiveTime; // 35.设计师领单时间 + @AnTableField(column = "DESIGN_BEGIN_TIME", type = "datetime", notNull = false) + private Timestamp designBeginTime; // 36.设计师开始设计时间 + @AnTableField(column = "DESIGN_DRAFT_TIME", type = "datetime", notNull = false) + private Timestamp designDraftTime; // 37.设计师初稿时间 + @AnTableField(column = "DESIGN_END_TIME", type = "datetime", notNull = false) + private Timestamp designEndTime; // 38.设计师定稿时间 + @AnTableField(column = "DESIGN_PAUSE_REASON", type = "string,200", notNull = false) + private String designPauseReason; // 39.设计师暂停原因(新增字段) + @AnTableField(column = "DESIGN_PAUSE_TIME", type = "datetime", notNull = false) + private Timestamp designPauseTime; // 40.设计师暂停时间 + @AnTableField(column = "DESIGN_EXCLUDE", type = "string,256", notNull = false) + private String designExclude; // 41.设计师排除,多个逗号分隔 + @AnTableField(column = "DESIGN_REQUEST_REASON", type = "string,256", notNull = false) + private String designRequestReason; // 42.设计师请求主管支援原由 + @AnTableField(column = "REQUEST_TIME", type = "datetime", notNull = false) + private Timestamp requestTime; // 43.设计师请求主管支援 时间 + @AnTableField(column = "DESIGN_REJECT_REASON", type = "string,1000", notNull = false) + private String designRejectReason; // 44.主管支援拒绝原因 + @AnTableField(column = "DESIGN_KEEP_DURATION", type = "int", notNull = true) + private int designKeepDuration; // 45.设计师保留时长,单位分钟 + @AnTableField(column = "REQUEST_REFOUND_ACCEPT_REASON", type = "string,200", notNull = false) + private String requestRefoundAcceptReason; // 46.请求退款通过原因 + @AnTableField(column = "REFUND_TIME", type = "string,19", notNull = false) + private String refundTime; // 47.退款时间 + @AnTableField(column = "CHECKER", type = "string,20", notNull = false) + private String checker; // 48.印前审核人员 + @AnTableField(column = "CHECK_TIME", type = "datetime", notNull = false) + private Timestamp checkTime; // 49.印前审核时间 + @AnTableField(column = "CHECK_BACK_REASON", type = "string,1200", notNull = false) + private String checkBackReason; // 50.印前审核退回原因 + @AnTableField(column = "CHECK_BACK_PICTURE_URL", type = "string,500", notNull = false) + private String checkBackPictureUrl; // 51.印前审核退回图片请求虚拟路径 + @AnTableField(column = "PREPRESS_BACK_REASON", type = "string,400", notNull = false) + private String prepressBackReason; // 52.印前工厂排产退回原因 + @AnTableField(column = "CANCELER", type = "string,20", notNull = false) + private String canceler; // 53.取消人 + @AnTableField(column = "CANCEL_TIME", type = "datetime", notNull = false) + private Timestamp cancelTime; // 54.取消时间 + @AnTableField(column = "CANCEL_REASON", type = "string,60", notNull = false) + private String cancelReason; // 55.取消原因 + @AnTableField(column = "CREATE_TIME", type = "datetime", notNull = true) + private Timestamp createTime; // 56.创建时间 + @AnTableField(column = "MODIFY_TIME", type = "datetime", notNull = true) + private Timestamp modifyTime; // 57.修改时间 + @AnTableField(column = "RE_DESIGN_SRC_ID", type = "long", notNull = false) + private long reDesignSrcId; // 58.重新设计来源订单(值大于0该单则是补单) + @AnTableField(column = "RE_DESIGN_CREATE_NOTE", type = "string,300", notNull = false) + private String reDesignCreateNote; // 59.重新设计原因, (售后创建重印的原因) + @AnTableField(column = "COMPLAINT_REASON", type = "string,500", notNull = false) + private String complaintReason; // 60.非设计师导致退款申诉原因 + @AnTableField(column = "COMPLAINT_FLAG", type = "int", notNull = false) + private int complaintFlag; // 61.0表示未申诉,1表示申诉成功,2表示申诉失败,3表示申诉中 + @AnTableField(column = "COMPLAINT_BACK_REASON", type = "string,200", notNull = false) + private String complaintBackReason; // 62.申诉退回原因 + @AnTableField(column = "SERVICES_MESSAGE", type = "string,500", notNull = false) + private String servicesMessage; // 63.客服留言 + @AnTableField(column = "QC_TIME", type = "datetime", notNull = false) + private Timestamp qcTime; // 64.质检时间 + @AnTableField(column = "QC_FLAG", type = "int", notNull = false) + private int qcFlag; // 65.质检标志,0表示未质检,1表示质检正常,2表示质检违规 + @AnTableField(column = "IS_OLD_USER", type = "int", notNull = false) + private int isOldUser; // 66.是否为老用户 1=是 ,0=否 + @AnTableField(column = "DESIGN_COPIES", type = "int", notNull = false) + private int designCopies; // 67.设计费份数 + @AnTableField(column = "RECEIVER_NAME", type = "string,50", notNull = true) + private String receiverName; // 68.收货人的姓名 + @AnTableField(column = "RECEIVER_MOBILE", type = "string,40", notNull = false) + private String receiverMobile; // 69.收货人的手机号码 + @AnTableField(column = "RECEIVER_STATE", type = "string,20", notNull = false) + private String receiverState; // 70.收货人的所在省份 + @AnTableField(column = "RECEIVER_CITY", type = "string,20", notNull = false) + private String receiverCity; // 71.收货人的所在城市 + @AnTableField(column = "RECEIVER_DISTRICT", type = "string,20", notNull = false) + private String receiverDistrict; // 72.收货人的所在区县 + @AnTableField(column = "RECEIVER_ADDRESS", type = "string,100", notNull = false) + private String receiverAddress; // 73.收货人的详细地址 + @AnTableField(column = "TYPESET_AUDITOR", type = "string,20", notNull = false) + private String typeSetAuditor; // 74.排版审核人 + @AnTableField(column = "GOTO_TYPESET_TIME", type = "datetime", notNull = false) + private Timestamp gotoTypeSetTime; // 75.提交选版时间 + @AnTableField(column = "SUBMIT_TYPESET_TIME", type = "datetime", notNull = false) + private Timestamp submitTypeSetTime; // 76.提交排版时间 + @AnTableField(column = "EXPRESS_CODE", type = "string,20", notNull = false) + private String expressCode; // 77.物流code + @AnTableField(column = "ORDER_SRC", type = "int", notNull = false) + private int orderSrc; // 78.订单来源,0:原订单,1:售后补单,2:售后赠单,3:微商单 + @AnTableField(column = "CREATER", type = "string,20", notNull = false) + private String creater; // 79.录单员 + @AnTableField(column = "TIDS", type = "string,200", notNull = false) + private String tids; // 80.淘宝单号,多个逗号分隔 + @AnTableField(column = "IS_ONLY_DESIGN", type = "boolean", notNull = true) + private boolean isOnlyDesign; // 81.是否仅设计,0印刷设计,1仅设计 + @AnTableField(column = "IS_TIME_OUT_REMIND", type = "boolean", notNull = true) + private boolean isTimeOutRemind; // 82.是否订单超时提醒 + @AnTableField(column = "SHOW_RED_MARK", type = "int", notNull = false) + private int showRedMark; // 83.淘宝申请退款时显示红色感叹号[0-不显示,1-显示] + @AnTableField(column = "IS_HIGH_QUALITY_ORDER", type = "boolean", notNull = false) + private boolean isHighQualityOrder; // 84.是否优质订单 + @AnTableField(column = "DESIGN_PRICE", type = "long", notNull = false) + private long designPrice; // 85.设计师佣金 + @AnTableField(column = "TEMPLATE_ID", type = "int", notNull = false) + private int templateId; // 86.编辑器模板id + @AnTableField(column = "FILE_FAIL_MSG", type = "string,200", notNull = false) + private String fileFailMsg; // 86.文件错误原因 + @AnTableField(column = "RETURN_MSG", type = "string,200", notNull = false) + private String returnMsg; // 86.退货信息 + @AnTableField(column = "RETURN_AFTER_STATUS", type = "int", notNull = true) + private int returnAfterStatus; // 4.订单状态 + @AnTableField(column = "IS_CHANGE", type = "boolean", notNull = true) + private boolean isChange; // 4.是否改稿 + @AnTableField(column = "IS_BACK", type = "boolean", notNull = true) + private boolean isBack; // 4.是否退回 + @AnTableField(column = "BACK_REASON", type = "string,250", notNull = true) + private String returnReason; + @AnTableField(column = "TID", type = "string,200", notNull = false) + private String tid; // 80.淘宝y原订单,多个逗号分隔 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public String getTid() + { + return tid; + } + + public void setTid(String tid) + { + this.tid = tid; + } + + public long getDesignId() + { + return designId; + } + + public void setDesignId(long designId) + { + this.designId = designId; + } + + public long getMerchantId() + { + return merchantId; + } + + public void setMerchantId(long merchantId) + { + this.merchantId = merchantId; + } + + public long getOutId() + { + return outId; + } + + public void setOutId(long outId) + { + this.outId = outId; + } + + public int getStatus() + { + return status; + } + + public void setStatus(int status) + { + this.status = status; + } + + public String getOrderText() + { + return orderText; + } + + public void setOrderText(String orderText) + { + this.orderText = orderText; + } + + public long getAmount() + { + return amount; + } + + public void setAmount(long amount) + { + this.amount = amount; + } + + public long getTypeId() + { + return typeId; + } + + public void setTypeId(long typeId) + { + this.typeId = typeId; + } + + public long getIndustryId() + { + return industryId; + } + + public void setIndustryId(long industryId) + { + this.industryId = industryId; + } + + public int getDraftType() + { + return draftType; + } + + public void setDraftType(int draftType) + { + this.draftType = draftType; + } + + public boolean isUrgent() + { + return isUrgent; + } + + public void setUrgent(boolean isUrgent) + { + this.isUrgent = isUrgent; + } + + public int getDesignPage() + { + return designPage; + } + + public void setDesignPage(int designPage) + { + this.designPage = designPage; + } + + public double getDesignWidth() + { + return designWidth; + } + + public void setDesignWidth(double designWidth) + { + this.designWidth = designWidth; + } + + public double getDesignHeight() + { + return designHeight; + } + + public void setDesignHeight(double designHeight) + { + this.designHeight = designHeight; + } + + public double getPrintWidth() + { + return printWidth; + } + + public void setPrintWidth(double printWidth) + { + this.printWidth = printWidth; + } + + public double getPrintHeight() + { + return printHeight; + } + + public void setPrintHeight(double printHeight) + { + this.printHeight = printHeight; + } + + public int getPrintKs() + { + return printKs; + } + + public void setPrintKs(int printKs) + { + this.printKs = printKs; + } + + public int getPrintMs() + { + return printMs; + } + + public void setPrintMs(int printMs) + { + this.printMs = printMs; + } + + public String getUserContact() + { + return userContact; + } + + public void setUserContact(String userContact) + { + this.userContact = userContact; + } + + public String getUserMobile() + { + return userMobile; + } + + public void setUserMobile(String userMobile) + { + this.userMobile = userMobile; + } + + public String getAfterNames() + { + return afterNames; + } + + public void setAfterNames(String afterNames) + { + this.afterNames = afterNames; + } + + public String getPrintSpecial() + { + return printSpecial; + } + + public void setPrintSpecial(String printSpecial) + { + this.printSpecial = printSpecial; + } + + public String getBuyerNick() + { + return buyerNick; + } + + public void setBuyerNick(String buyerNick) + { + this.buyerNick = buyerNick; + } + + public String getUserText() + { + return userText; + } + + public void setUserText(String userText) + { + this.userText = userText; + } + + public String getUserNotice() + { + return userNotice; + } + + public void setUserNotice(String userNotice) + { + this.userNotice = userNotice; + } + + public String getUserQq() + { + return userQq; + } + + public void setUserQq(String userQq) + { + this.userQq = userQq; + } + + public String getUserWx() + { + return userWx; + } + + public void setUserWx(String userWx) + { + this.userWx = userWx; + } + + public String getUserTextReplace() + { + return userTextReplace; + } + + public void setUserTextReplace(String userTextReplace) + { + this.userTextReplace = userTextReplace; + } + + public int getReminderNum() + { + return reminderNum; + } + + public void setReminderNum(int reminderNum) + { + this.reminderNum = reminderNum; + } + + public String getShopNick() + { + return shopNick; + } + + public void setShopNick(String shopNick) + { + this.shopNick = shopNick; + } + + public long getOrgId() + { + return orgId; + } + + public void setOrgId(long orgId) + { + this.orgId = orgId; + } + + public Timestamp getOrgReceiveTime() + { + return orgReceiveTime; + } + + public void setOrgReceiveTime(Timestamp orgReceiveTime) + { + this.orgReceiveTime = orgReceiveTime; + } + + public int getReceiveType() + { + return receiveType; + } + + public void setReceiveType(int receiveType) + { + this.receiveType = receiveType; + } + + public int getOrderFlag() + { + return orderFlag; + } + + public void setOrderFlag(int orderFlag) + { + this.orderFlag = orderFlag; + } + + public String getDesigner() + { + return designer; + } + + public void setDesigner(String designer) + { + this.designer = designer; + } + + public Timestamp getDesignReceiveTime() + { + return designReceiveTime; + } + + public void setDesignReceiveTime(Timestamp designReceiveTime) + { + this.designReceiveTime = designReceiveTime; + } + + public Timestamp getDesignBeginTime() + { + return designBeginTime; + } + + public void setDesignBeginTime(Timestamp designBeginTime) + { + this.designBeginTime = designBeginTime; + } + + public Timestamp getDesignDraftTime() + { + return designDraftTime; + } + + public void setDesignDraftTime(Timestamp designDraftTime) + { + this.designDraftTime = designDraftTime; + } + + public Timestamp getDesignEndTime() + { + return designEndTime; + } + + public void setDesignEndTime(Timestamp designEndTime) + { + this.designEndTime = designEndTime; + } + + public String getDesignPauseReason() + { + return designPauseReason; + } + + public void setDesignPauseReason(String designPauseReason) + { + this.designPauseReason = designPauseReason; + } + + public Timestamp getDesignPauseTime() + { + return designPauseTime; + } + + public void setDesignPauseTime(Timestamp designPauseTime) + { + this.designPauseTime = designPauseTime; + } + + public String getDesignExclude() + { + return designExclude; + } + + public void setDesignExclude(String designExclude) + { + this.designExclude = designExclude; + } + + public String getDesignRequestReason() + { + return designRequestReason; + } + + public void setDesignRequestReason(String designRequestReason) + { + this.designRequestReason = designRequestReason; + } + + public Timestamp getRequestTime() + { + return requestTime; + } + + public void setRequestTime(Timestamp requestTime) + { + this.requestTime = requestTime; + } + + public String getDesignRejectReason() + { + return designRejectReason; + } + + public void setDesignRejectReason(String designRejectReason) + { + this.designRejectReason = designRejectReason; + } + + public int getDesignKeepDuration() + { + return designKeepDuration; + } + + public void setDesignKeepDuration(int designKeepDuration) + { + this.designKeepDuration = designKeepDuration; + } + + public String getRequestRefoundAcceptReason() + { + return requestRefoundAcceptReason; + } + + public void setRequestRefoundAcceptReason(String requestRefoundAcceptReason) + { + this.requestRefoundAcceptReason = requestRefoundAcceptReason; + } + + public String getRefundTime() + { + return refundTime; + } + + public void setRefundTime(String refundTime) + { + this.refundTime = refundTime; + } + + public String getChecker() + { + return checker; + } + + public void setChecker(String checker) + { + this.checker = checker; + } + + public Timestamp getCheckTime() + { + return checkTime; + } + + public void setCheckTime(Timestamp checkTime) + { + this.checkTime = checkTime; + } + + public String getCheckBackReason() + { + return checkBackReason; + } + + public void setCheckBackReason(String checkBackReason) + { + this.checkBackReason = checkBackReason; + } + + public String getCheckBackPictureUrl() + { + return checkBackPictureUrl; + } + + public void setCheckBackPictureUrl(String checkBackPictureUrl) + { + this.checkBackPictureUrl = checkBackPictureUrl; + } + + public String getPrepressBackReason() + { + return prepressBackReason; + } + + public void setPrepressBackReason(String prepressBackReason) + { + this.prepressBackReason = prepressBackReason; + } + + public String getCanceler() + { + return canceler; + } + + public void setCanceler(String canceler) + { + this.canceler = canceler; + } + + public Timestamp getCancelTime() + { + return cancelTime; + } + + public void setCancelTime(Timestamp cancelTime) + { + this.cancelTime = cancelTime; + } + + public String getCancelReason() + { + return cancelReason; + } + + public void setCancelReason(String cancelReason) + { + this.cancelReason = cancelReason; + } + + public Timestamp getCreateTime() + { + return createTime; + } + + public void setCreateTime(Timestamp createTime) + { + this.createTime = createTime; + } + + public Timestamp getModifyTime() + { + return modifyTime; + } + + public void setModifyTime(Timestamp modifyTime) + { + this.modifyTime = modifyTime; + } + + public long getReDesignSrcId() + { + return reDesignSrcId; + } + + public void setReDesignSrcId(long reDesignSrcId) + { + this.reDesignSrcId = reDesignSrcId; + } + + public String getReDesignCreateNote() + { + return reDesignCreateNote; + } + + public void setReDesignCreateNote(String reDesignCreateNote) + { + this.reDesignCreateNote = reDesignCreateNote; + } + + public String getComplaintReason() + { + return complaintReason; + } + + public void setComplaintReason(String complaintReason) + { + this.complaintReason = complaintReason; + } + + public int getComplaintFlag() + { + return complaintFlag; + } + + public void setComplaintFlag(int complaintFlag) + { + this.complaintFlag = complaintFlag; + } + + public String getComplaintBackReason() + { + return complaintBackReason; + } + + public void setComplaintBackReason(String complaintBackReason) + { + this.complaintBackReason = complaintBackReason; + } + + public String getServicesMessage() + { + return servicesMessage; + } + + public void setServicesMessage(String servicesMessage) + { + this.servicesMessage = servicesMessage; + } + + public Timestamp getQcTime() + { + return qcTime; + } + + public void setQcTime(Timestamp qcTime) + { + this.qcTime = qcTime; + } + + public int getQcFlag() + { + return qcFlag; + } + + public void setQcFlag(int qcFlag) + { + this.qcFlag = qcFlag; + } + + public int getIsOldUser() + { + return isOldUser; + } + + public void setIsOldUser(int isOldUser) + { + this.isOldUser = isOldUser; + } + + public int getDesignCopies() + { + return designCopies; + } + + public void setDesignCopies(int designCopies) + { + this.designCopies = designCopies; + } + + public String getReceiverName() + { + return receiverName; + } + + public void setReceiverName(String receiverName) + { + this.receiverName = receiverName; + } + + public String getReceiverMobile() + { + return receiverMobile; + } + + public void setReceiverMobile(String receiverMobile) + { + this.receiverMobile = receiverMobile; + } + + public String getReceiverState() + { + return receiverState; + } + + public void setReceiverState(String receiverState) + { + this.receiverState = receiverState; + } + + public String getReceiverCity() + { + return receiverCity; + } + + public void setReceiverCity(String receiverCity) + { + this.receiverCity = receiverCity; + } + + public String getReceiverDistrict() + { + return receiverDistrict; + } + + public void setReceiverDistrict(String receiverDistrict) + { + this.receiverDistrict = receiverDistrict; + } + + public String getReceiverAddress() + { + return receiverAddress; + } + + public void setReceiverAddress(String receiverAddress) + { + this.receiverAddress = receiverAddress; + } + + public String getTypeSetAuditor() + { + return typeSetAuditor; + } + + public void setTypeSetAuditor(String typeSetAuditor) + { + this.typeSetAuditor = typeSetAuditor; + } + + public Timestamp getGotoTypeSetTime() + { + return gotoTypeSetTime; + } + + public void setGotoTypeSetTime(Timestamp gotoTypeSetTime) + { + this.gotoTypeSetTime = gotoTypeSetTime; + } + + public Timestamp getSubmitTypeSetTime() + { + return submitTypeSetTime; + } + + public void setSubmitTypeSetTime(Timestamp submitTypeSetTime) + { + this.submitTypeSetTime = submitTypeSetTime; + } + + public String getExpressCode() + { + return expressCode; + } + + public void setExpressCode(String expressCode) + { + this.expressCode = expressCode; + } + + public int getOrderSrc() + { + return orderSrc; + } + + public void setOrderSrc(int orderSrc) + { + this.orderSrc = orderSrc; + } + + public String getCreater() + { + return creater; + } + + public void setCreater(String creater) + { + this.creater = creater; + } + + public String getTids() + { + return tids; + } + + public void setTids(String tids) + { + this.tids = tids; + } + + public boolean isOnlyDesign() + { + return isOnlyDesign; + } + + public void setOnlyDesign(boolean isOnlyDesign) + { + this.isOnlyDesign = isOnlyDesign; + } + + public boolean isTimeOutRemind() + { + return isTimeOutRemind; + } + + public void setTimeOutRemind(boolean isTimeOutRemind) + { + this.isTimeOutRemind = isTimeOutRemind; + } + + public int getShowRedMark() + { + return showRedMark; + } + + public void setShowRedMark(int showRedMark) + { + this.showRedMark = showRedMark; + } + + public boolean isHighQualityOrder() + { + return isHighQualityOrder; + } + + public void setHighQualityOrder(boolean isHighQualityOrder) + { + this.isHighQualityOrder = isHighQualityOrder; + } + + public long getDesignPrice() + { + return designPrice; + } + + public void setDesignPrice(long designPrice) + { + this.designPrice = designPrice; + } + + public int getTemplateId() + { + return templateId; + } + + public void setTemplateId(int templateId) + { + this.templateId = templateId; + } + + public String getFileFailMsg() + { + return fileFailMsg; + } + + public void setFileFailMsg(String fileFailMsg) + { + this.fileFailMsg = fileFailMsg; + } + + public String getReturnMsg() + { + return returnMsg; + } + + public void setReturnMsg(String returnMsg) + { + this.returnMsg = returnMsg; + } + + public int getReturnAfterStatus() + { + return returnAfterStatus; + } + + public void setReturnAfterStatus(int returnAfterStatus) + { + this.returnAfterStatus = returnAfterStatus; + } + + public boolean isChange() + { + return isChange; + } + + public void setChange(boolean isChange) + { + this.isChange = isChange; + } + + public boolean isBack() + { + return isBack; + } + + public void setBack(boolean isBack) + { + this.isBack = isBack; + } + + public String getReturnReason() + { + return returnReason; + } + + public void setReturnReason(String returnReason) + { + this.returnReason = returnReason; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/order/DesignOrderRefundReason.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/order/DesignOrderRefundReason.java new file mode 100644 index 0000000..e16a7ea --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/order/DesignOrderRefundReason.java @@ -0,0 +1,69 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.order; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 退款原因配置 对应表《design_order_refund_reason》 + */ +@AnAlias("DesignOrderRefundReason") +@AnNew +@AnTable(table = "design_order_refund_reason", key = "id", type = "InnoDB") +public class DesignOrderRefundReason implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "id", type = "long", notNull = true) + private long id; // 1.id + @AnTableField(column = "title", type = "string,100", notNull = true) + private String title; // 2.退款原因 + @AnTableField(column = "update_time", type = "datetime") + private Timestamp updateTime; // 3.修改时间 + + public long getId() + { + return id; + } + + public void setId(long id) + { + this.id = id; + } + + public String getTitle() + { + return title; + } + + public void setTitle(String title) + { + this.title = title; + } + + public Timestamp getUpdateTime() + { + return updateTime; + } + + public void setUpdateTime(Timestamp updateTime) + { + this.updateTime = updateTime; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/order/DesignSelfView.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/order/DesignSelfView.java new file mode 100644 index 0000000..3f7365c --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/order/DesignSelfView.java @@ -0,0 +1,217 @@ +/** + * 扬彩印刷设计 + * 文件名 :DesignSelfView.java + * 创建人 :gjx + * 创建时间:2019-11-5 + */ + +package com.zhiqim.yangcai.design.dbo.order; + +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.orm.annotation.AnView; +import org.zhiqim.orm.annotation.AnViewField; +import org.zhiqim.orm.annotation.AnViewJoin; +import org.zhiqim.orm.annotation.AnViewJoinValue; + +/** + * 订单关联表 对应视图《Design_Self_View》 + * + * @version 1.0 @author gjx 2019-11-5 新建与整理 + */ + +@AnAlias("DesignSelfView") +@AnNew +@AnView("DESIGN_ORDER,SELF_ORDER") +@AnViewJoin( +{ + @AnViewJoinValue(type = "EQUAL", lTable = "SELF_ORDER", lColumn = "DESIGN_ID", rTable = "DESIGN_ORDER", rColumn = "DESIGN_ID") +}) +public class DesignSelfView extends DesignOrder +{ + private static final long serialVersionUID = 1L; + + @AnViewField(table = "SELF_ORDER", column = "LABEL_IDS") + private String labelIds; // 1.标签id(逗号拼接) + @AnViewField(table = "SELF_ORDER", column = "CONSUMER_TYPE") + private int consumerType; // 2.客户类型 1:企业 2:渠道商 3:个体户 + @AnViewField(table = "SELF_ORDER", column = "DEFAULT_LABEL") + private boolean defaultLabel; // 3.是否选用了原订单行业标签 + @AnViewField(table = "SELF_ORDER", column = "KF_DRAFT_STANDARD") + private boolean kfDraftStandard; // 4.是否为客服负责的标准自来稿订单[0-否,1-是],默认为0 + @AnViewField(table = "SELF_ORDER", column = "CUSTOMER_QRCODE_URL") + private String customerQrcodeUrl; // 5.客户服务群二维码图片路径 + @AnViewField(table = "SELF_ORDER", column = "DESIGNER_REFUND_REASON") + private long refundReason; // 6.退款原因 + @AnViewField(table = "SELF_ORDER", column = "DRAFT_CHECKER") + private String draftChecker; // 7.初稿审核人 + @AnViewField(table = "SELF_ORDER", column = "DRAFT_BACK_REASON") + private String draftBackReason; // 8.初稿审核退回原因 + @AnViewField(table = "SELF_ORDER", column = "DRAFT_BACK_TIME") + private Timestamp draftBackTime; // 9.初稿审核退回时间 + @AnViewField(table = "SELF_ORDER", column = "END_CHECKER") + private String endChecker; // 10.定稿审核人 + @AnViewField(table = "SELF_ORDER", column = "END_BACK_REASON") + private String endBackReason; // 11.定稿审核退回原因 + @AnViewField(table = "SELF_ORDER", column = "END_BACK_TIME") + private Timestamp endBackTime; // 12.定稿审核退回时间 + @AnViewField(table = "SELF_ORDER", column = "DRAFT_BACK_REASON_PIC_URL") + private String draftBackReasonPicUrl; // 13.初稿审核退回原因截图 + @AnViewField(table = "SELF_ORDER", column = "END_BACK_REASON_PIC_URL") + private String endBackReasonPicUrl; // 14.定稿审核退回原因截图 + @AnViewField(table = "SELF_ORDER", column = "URGENT_PRICE") + private long urgentPrice; // 15.加急费 + + public String getLabelIds() + { + return labelIds; + } + + public void setLabelIds(String labelIds) + { + this.labelIds = labelIds; + } + + public int getConsumerType() + { + return consumerType; + } + + public void setConsumerType(int consumerType) + { + this.consumerType = consumerType; + } + + public boolean isDefaultLabel() + { + return defaultLabel; + } + + public void setDefaultLabel(boolean defaultLabel) + { + this.defaultLabel = defaultLabel; + } + + public boolean isKfDraftStandard() + { + return kfDraftStandard; + } + + public void setKfDraftStandard(boolean kfDraftStandard) + { + this.kfDraftStandard = kfDraftStandard; + } + + public String getCustomerQrcodeUrl() + { + return customerQrcodeUrl; + } + + public void setCustomerQrcodeUrl(String customerQrcodeUrl) + { + this.customerQrcodeUrl = customerQrcodeUrl; + } + + public long getRefundReason() + { + return refundReason; + } + + public void setRefundReason(long refundReason) + { + this.refundReason = refundReason; + } + + public String getDraftChecker() + { + return draftChecker; + } + + public void setDraftChecker(String draftChecker) + { + this.draftChecker = draftChecker; + } + + public String getDraftBackReason() + { + return draftBackReason; + } + + public void setDraftBackReason(String draftBackReason) + { + this.draftBackReason = draftBackReason; + } + + public Timestamp getDraftBackTime() + { + return draftBackTime; + } + + public void setDraftBackTime(Timestamp draftBackTime) + { + this.draftBackTime = draftBackTime; + } + + public String getEndChecker() + { + return endChecker; + } + + public void setEndChecker(String endChecker) + { + this.endChecker = endChecker; + } + + public String getEndBackReason() + { + return endBackReason; + } + + public void setEndBackReason(String endBackReason) + { + this.endBackReason = endBackReason; + } + + public Timestamp getEndBackTime() + { + return endBackTime; + } + + public void setEndBackTime(Timestamp endBackTime) + { + this.endBackTime = endBackTime; + } + + public String getDraftBackReasonPicUrl() + { + return draftBackReasonPicUrl; + } + + public void setDraftBackReasonPicUrl(String draftBackReasonPicUrl) + { + this.draftBackReasonPicUrl = draftBackReasonPicUrl; + } + + public String getEndBackReasonPicUrl() + { + return endBackReasonPicUrl; + } + + public void setEndBackReasonPicUrl(String endBackReasonPicUrl) + { + this.endBackReasonPicUrl = endBackReasonPicUrl; + } + + public long getUrgentPrice() + { + return urgentPrice; + } + + public void setUrgentPrice(long urgentPrice) + { + this.urgentPrice = urgentPrice; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/order/DesignStandard.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/order/DesignStandard.java new file mode 100644 index 0000000..6cc9e41 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/order/DesignStandard.java @@ -0,0 +1,108 @@ +/* + * 版权所有 (C) 2015 知启蒙(WWW.ZHIQIM.COM) 保留所有权利。 + * + * Download http://www.zhiqim.com/fadfox/ 欢迎加盟[凡狐]兴趣小组。 + * + * 由数据库字典自动生成的类文件,修改请使用数据库字典编辑器修改。 + */ +package com.zhiqim.yangcai.design.dbo.order; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 印前原因预录 对应表《CHECK_BACK_REASON》 + */ +@AnAlias("DesignStandard") +@AnNew +@AnTable(table = "DESIGN_STANDRARD", key = "STANDRARD_ID", type = "InnoDB") +public class DesignStandard implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "STANDRARD_ID", type = "long", notNull = true) + private long standardId; // 1.类型编号 + @AnTableField(column = "IS_STANDRARD_TYPE", type = "boolean", notNull = true) + private boolean isStandardType; // 类型 + @AnTableField(column = "STANDRARD_PARENT", type = "long", notNull = true) + private long standardParent; // 3.具体原因项 所属分类 + @AnTableField(column = "STANDRARD_TITLE", type = "string,200", notNull = true) + private String standardTitle; // 3.标题 + @AnTableField(column = "STANDRARD_TEXT", type = "string,200", notNull = true) + private String standardText; // 4.规范内容 + @AnTableField(column = "CREATE_TIME", type = "datetime", notNull = true) + private Timestamp createTime; // 6.创建时间 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public long getStandardId() + { + return standardId; + } + + public void setStandardId(long standardId) + { + this.standardId = standardId; + } + + public boolean isStandardType() + { + return isStandardType; + } + + public void setStandardType(boolean isStandardType) + { + this.isStandardType = isStandardType; + } + + public long getStandardParent() + { + return standardParent; + } + + public void setStandardParent(long standardParent) + { + this.standardParent = standardParent; + } + + public String getStandardTitle() + { + return standardTitle; + } + + public void setStandardTitle(String standardTitle) + { + this.standardTitle = standardTitle; + } + + public String getStandardText() + { + return standardText; + } + + public void setStandardText(String standardText) + { + this.standardText = standardText; + } + + public Timestamp getCreateTime() + { + return createTime; + } + + public void setCreateTime(Timestamp createTime) + { + this.createTime = createTime; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/order/OrdOprLog.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/order/OrdOprLog.java new file mode 100644 index 0000000..9068e88 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/order/OrdOprLog.java @@ -0,0 +1,126 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.order; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 订单操作日志表 对应表《ORD_OPR_LOG》 + */ +@AnAlias("OrdOprLog") +@AnNew +@AnTable(table="ORD_OPR_LOG", key="LOG_ID", type="InnoDB") +public class OrdOprLog implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column="LOG_ID", type="long", notNull=true) private long logId; //1.日志编号 + @AnTableField(column="DESIGN_ID", type="long", notNull=true) private long designId; //2.订单编号 + @AnTableField(column="STATUS", type="int", notNull=true) private int status; //3.订单状态 + @AnTableField(column="OPERATOR_CODE", type="string,64", notNull=true) private String operatorCode; //4.操作员信息 + @AnTableField(column="OPERATE_DESC", type="string,2048", notNull=false) private String operateDesc; //5.操作描述 + @AnTableField(column="CREATE_TIME", type="datetime", notNull=true) private Timestamp createTime; //6.创建时间 + @AnTableField(column="EVENT_TYPE", type="int", notNull=false) private int eventType; //7.事件类型 + @AnTableField(column="DESIGNER", type="string,64", notNull=false) private String designer; //8.设计师 + + public String toString() + { + return Jsons.toString(this); + } + + public long getLogId() + { + return logId; + } + + public void setLogId(long logId) + { + this.logId = logId; + } + + public long getDesignId() + { + return designId; + } + + public void setDesignId(long designId) + { + this.designId = designId; + } + + public int getStatus() + { + return status; + } + + public void setStatus(int status) + { + this.status = status; + } + + public String getOperatorCode() + { + return operatorCode; + } + + public void setOperatorCode(String operatorCode) + { + this.operatorCode = operatorCode; + } + + public String getOperateDesc() + { + return operateDesc; + } + + public void setOperateDesc(String operateDesc) + { + this.operateDesc = operateDesc; + } + + public Timestamp getCreateTime() + { + return createTime; + } + + public void setCreateTime(Timestamp createTime) + { + this.createTime = createTime; + } + + public int getEventType() + { + return eventType; + } + + public void setEventType(int eventType) + { + this.eventType = eventType; + } + + public String getDesigner() + { + return designer; + } + + public void setDesigner(String designer) + { + this.designer = designer; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/order/OrdProgressNote.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/order/OrdProgressNote.java new file mode 100644 index 0000000..fc2cdb0 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/order/OrdProgressNote.java @@ -0,0 +1,82 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.order; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 订单进度备注表 对应表《ORD_PROGRESS_NOTE》 + */ +@AnAlias("OrdProgressNote") +@AnNew +@AnTable(table="ORD_PROGRESS_NOTE", key="", type="InnoDB") +public class OrdProgressNote implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column="DESIGN_ID", type="long", notNull=false) private long designId; //1.订单号 + @AnTableField(column="ORD_PROGRESS_NOTE", type="string,300", notNull=true) private String ordProgressNote; //2.备注内容 + @AnTableField(column="OPERATE_CODE", type="string,32", notNull=true) private String operateCode; //3.备注人 + @AnTableField(column="CREATE_TIME", type="datetime", notNull=true) private Timestamp createTime; //4.备注时间 + + public String toString() + { + return Jsons.toString(this); + } + + public long getDesignId() + { + return designId; + } + + public void setDesignId(long designId) + { + this.designId = designId; + } + + public String getOrdProgressNote() + { + return ordProgressNote; + } + + public void setOrdProgressNote(String ordProgressNote) + { + this.ordProgressNote = ordProgressNote; + } + + public String getOperateCode() + { + return operateCode; + } + + public void setOperateCode(String operateCode) + { + this.operateCode = operateCode; + } + + public Timestamp getCreateTime() + { + return createTime; + } + + public void setCreateTime(Timestamp createTime) + { + this.createTime = createTime; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/order/OrderMessage.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/order/OrderMessage.java new file mode 100644 index 0000000..a11db01 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/order/OrderMessage.java @@ -0,0 +1,217 @@ +/** + * 扬彩印刷设计 + * 文件名 :OrderReminder.java + * 创建人 :gjx + * 创建时间:2020年8月13日 +*/ +package com.zhiqim.yangcai.design.dbo.order; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * + * [简要描述]: 订单消息表
+ * [详细描述]:
+ * + * @version 1.0 @author gjx 2020年8月14日 新建与整理 + */ +@AnAlias("OrderMessage") +@AnNew +@AnTable(table = "ORDER_MESSAGE", key = "ID", type = "InnoDB") +public class OrderMessage implements Serializable +{ + private static final long serialVersionUID = 1L; + @AnTableField(column = "ID", type = "long", notNull = true) + private long id;// 业务主键 + @AnTableField(column = "DESIGN_ID", type = "long", notNull = true) + private long designId; // 订单号 + @AnTableField(column = "BUYER_NICK", type = "string,64", notNull = true) + private String buyerNick; // 旺旺号 + @AnTableField(column = "CREATE_TIME", type = "datetime", notNull = true) + private Timestamp createTime;// 创建时间 + @AnTableField(column = "MESSAGE_TYPE", type = "int", notNull = true) + private int messageType;// 消息类型(0:催稿,1:订单审核、排产退回) + @AnTableField(column = "TOPIC", type = "string,50", notNull = true) + private String topic;// 主题,(催稿大类,orderReminder:订单催稿/定稿,changeDesigner:更换/指定设计师/订单加急) + @AnTableField(column = "PRODUCTION_CODE", type = "string,64", notNull = true) + private String productionCode;// 生产者code + @AnTableField(column = "PRODUCTION_TIME", type = "datetime", notNull = true) + private Timestamp productionTime;// 生产时间 + @AnTableField(column = "MESSAGE_BODY", type = "string,200", notNull = true) + private String messageBody;// 消息内容 + @AnTableField(column = "CONSUMER_CODE_TYPE", type = "int", notNull = true) + private int consumerCodeType;// 消费者类型(0:操作员 1:协调人)。默认为0 + @AnTableField(column = "CONSUMER_PLATFORM_TYPE", type = "string,20", notNull = true) + private String consumerPlatformType;// 消费平台:ERP,TYT,DESIGN,CONSIGNMENT,XCX,TBERP + @AnTableField(column = "CONSUMER_CODE", type = "string,64", notNull = true) + private String consumerCode;// 消费者code + @AnTableField(column = "CONSUMER_STATE", type = "int", notNull = true) + private int consumerState;// 消费状态,0:未消费,1:已消费 + @AnTableField(column = "CONSUMER_TIME", type = "datetime", notNull = false) + private Timestamp consumerTime;// 消费时间 + @AnTableField(column = "REMARK", type = "string,400", notNull = false) + private String remark;// 备注 + + public String tosString() + { + return Jsons.toString(this); + } + + public long getId() + { + return id; + } + + public void setId(long id) + { + this.id = id; + } + + public long getDesignId() + { + return designId; + } + + public void setDesignId(long designId) + { + this.designId = designId; + } + + public String getBuyerNick() + { + return buyerNick; + } + + public void setBuyerNick(String buyerNick) + { + this.buyerNick = buyerNick; + } + + public Timestamp getCreateTime() + { + return createTime; + } + + public void setCreateTime(Timestamp createTime) + { + this.createTime = createTime; + } + + public int getMessageType() + { + return messageType; + } + + public void setMessageType(int messageType) + { + this.messageType = messageType; + } + + public String getTopic() + { + return topic; + } + + public void setTopic(String topic) + { + this.topic = topic; + } + + public String getProductionCode() + { + return productionCode; + } + + public void setProductionCode(String productionCode) + { + this.productionCode = productionCode; + } + + public Timestamp getProductionTime() + { + return productionTime; + } + + public void setProductionTime(Timestamp productionTime) + { + this.productionTime = productionTime; + } + + public String getMessageBody() + { + return messageBody; + } + + public void setMessageBody(String messageBody) + { + this.messageBody = messageBody; + } + + public int getConsumerCodeType() + { + return consumerCodeType; + } + + public void setConsumerCodeType(int consumerCodeType) + { + this.consumerCodeType = consumerCodeType; + } + + public String getConsumerPlatformType() + { + return consumerPlatformType; + } + + public void setConsumerPlatformType(String consumerPlatformType) + { + this.consumerPlatformType = consumerPlatformType; + } + + public String getConsumerCode() + { + return consumerCode; + } + + public void setConsumerCode(String consumerCode) + { + this.consumerCode = consumerCode; + } + + public int getConsumerState() + { + return consumerState; + } + + public void setConsumerState(int consumerState) + { + this.consumerState = consumerState; + } + + public Timestamp getConsumerTime() + { + return consumerTime; + } + + public void setConsumerTime(Timestamp consumerTime) + { + this.consumerTime = consumerTime; + } + + public String getRemark() + { + return remark; + } + + public void setRemark(String remark) + { + this.remark = remark; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/order/OrderQuestions.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/order/OrderQuestions.java new file mode 100644 index 0000000..e9678b9 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/order/OrderQuestions.java @@ -0,0 +1,125 @@ +package com.zhiqim.yangcai.design.dbo.order; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 设计师考试订单 对应表《ORDER_QUESTIONS》 + */ +@AnAlias("OrderQuestions") +@AnNew +@AnTable(table = "order_questions", key = "QUESTIONS_ID", type = "InnoDB") +public class OrderQuestions implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "QUESTIONS_ID", type = "long", notNull = true) + private long questionsId; // 1.考试订单编号 + @AnTableField(column = "DESIGN_REQUIREMENTS", type = "string,400", notNull = true) + private String designRequirements; // 2.设计要求 + @AnTableField(column = "STATUS", type = "int", notNull = true) + private int status; // 3.考试订单状态:0 理论考试 10 未提交 20 等待审核 30 审核通过 40 审核拒绝 + @AnTableField(column = "DESIGNER", type = "string,20", notNull = true) + private String designer; // 4.设计师 + @AnTableField(column = "CREATE_TIME", type = "datetime", notNull = true) + private Timestamp createTime; // 5.创建时间 + @AnTableField(column = "DESIGN_END_TIME", type = "datetime", notNull = false) + private Timestamp designEndTime; // 6.设计师定稿时间 + @AnTableField(column = "REMARKS", type = "string,200", notNull = false) + private String remarks; // 7.备注 + @AnTableField(column = "MOBILE", type = "string,15", notNull = false) + private String mobile; // 8.手机号 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public long getQuestionsId() + { + return questionsId; + } + + public void setQuestionsId(long questionsId) + { + this.questionsId = questionsId; + } + + public String getDesignRequirements() + { + return designRequirements; + } + + public void setDesignRequirements(String designRequirements) + { + this.designRequirements = designRequirements; + } + + public int getStatus() + { + return status; + } + + public void setStatus(int status) + { + this.status = status; + } + + public String getDesigner() + { + return designer; + } + + public void setDesigner(String designer) + { + this.designer = designer; + } + + public Timestamp getCreateTime() + { + return createTime; + } + + public void setCreateTime(Timestamp createTime) + { + this.createTime = createTime; + } + + public Timestamp getDesignEndTime() + { + return designEndTime; + } + + public void setDesignEndTime(Timestamp designEndTime) + { + this.designEndTime = designEndTime; + } + + public String getRemarks() + { + return remarks; + } + + public void setRemarks(String remarks) + { + this.remarks = remarks; + } + + public String getMobile() + { + return mobile; + } + + public void setMobile(String mobile) + { + this.mobile = mobile; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/order/QuestionsAtta.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/order/QuestionsAtta.java new file mode 100644 index 0000000..4fc5d80 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/order/QuestionsAtta.java @@ -0,0 +1,162 @@ +package com.zhiqim.yangcai.design.dbo.order; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 考试订单附件表 对应表《QUESTIONS_ATTA》 + */ +@AnAlias("QuestionsAtta") +@AnNew +@AnTable(table = "questions_atta", key = "ATTA_ID", type = "InnoDB") +public class QuestionsAtta implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "ATTA_ID", type = "long", notNull = true) + private long attaId; // 1.订单附件编号 + @AnTableField(column = "QUESTIONS_ID", type = "long", notNull = true) + private long questionsId; // 2.考试订单编号 + @AnTableField(column = "ATTA_MODUL", type = "string,20", notNull = true) + private String attaModul; // 3.附件标识:MaterialFile 素材文件,DesginFile 设计文件,EndFile 印刷文件,ExamVoucher + // 考试凭证 + @AnTableField(column = "FILE_NAME", type = "string,200", notNull = true) + private String fileName; // 4.文件名 + @AnTableField(column = "FILE_TYPE", type = "string,10", notNull = true) + private String fileType; // 5.文件类型。.pdf、.cdr、.jpg + @AnTableField(column = "SAVE_PATH", type = "string,200", notNull = false) + private String savePath; // 6.文件存储路径 + @AnTableField(column = "FILE_URL", type = "string,400", notNull = false) + private String fileUrl; // 7.访问地址 + @AnTableField(column = "FILE_SIZE", type = "long", notNull = true) + private long fileSize; // 8.文件大小 字节 + @AnTableField(column = "OPERATOR_CODE", type = "string,64", notNull = false) + private String operatorCode; // 9.上传人 + @AnTableField(column = "UPLOAD_TIME", type = "datetime", notNull = true) + private Timestamp uploadTime; // 10.上传时间 + @AnTableField(column = "FILEID", type = "string,64", notNull = false) + private String fileid; // 11.文件Hash值 + + public long getAttaId() + { + return attaId; + } + + public void setAttaId(long attaId) + { + this.attaId = attaId; + } + + public long getQuestionsId() + { + return questionsId; + } + + public void setQuestionsId(long questionsId) + { + this.questionsId = questionsId; + } + + public String getAttaModul() + { + return attaModul; + } + + public void setAttaModul(String attaModul) + { + this.attaModul = attaModul; + } + + public String getFileName() + { + return fileName; + } + + public void setFileName(String fileName) + { + this.fileName = fileName; + } + + public String getFileType() + { + return fileType; + } + + public void setFileType(String fileType) + { + this.fileType = fileType; + } + + public String getSavePath() + { + return savePath; + } + + public void setSavePath(String savePath) + { + this.savePath = savePath; + } + + public String getFileUrl() + { + return fileUrl; + } + + public void setFileUrl(String fileUrl) + { + this.fileUrl = fileUrl; + } + + public long getFileSize() + { + return fileSize; + } + + public void setFileSize(long fileSize) + { + this.fileSize = fileSize; + } + + public String getOperatorCode() + { + return operatorCode; + } + + public void setOperatorCode(String operatorCode) + { + this.operatorCode = operatorCode; + } + + public Timestamp getUploadTime() + { + return uploadTime; + } + + public void setUploadTime(Timestamp uploadTime) + { + this.uploadTime = uploadTime; + } + + public String getFileid() + { + return fileid; + } + + public void setFileid(String fileid) + { + this.fileid = fileid; + } + + @Override + public String toString() + { + return Jsons.toString(this); + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/order/SelfOrder.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/order/SelfOrder.java new file mode 100644 index 0000000..c427023 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/order/SelfOrder.java @@ -0,0 +1,228 @@ +package com.zhiqim.yangcai.design.dbo.order; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 订单扩展表 对应表《SELF_ORDER》 + * + * @version 1.0 @author gjx 2019-11-5 新建与整理 + */ +@AnAlias("SelfOrder") +@AnNew +@AnTable(table = "SELF_ORDER", key = "DESIGN_ID", type = "InnoDB") +public class SelfOrder implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "DESIGN_ID", type = "long", notNull = true) + private long designId; // 1.设计订单编号 + @AnTableField(column = "LABEL_IDS", type = "string,300", notNull = false) + private String labelIds; // 2.标签id(逗号拼接) + @AnTableField(column = "CONSUMER_TYPE", type = "int", notNull = false) + private int consumerType; // 3.客户类型 1:企业 2:渠道商 3:个体户 + @AnTableField(column = "DEFAULT_LABEL", type = "boolean", notNull = true) + private boolean defaultLabel; // 4.是否默认原订单行业标签 默认为true + @AnTableField(column = "KF_DRAFT_STANDARD", type = "boolean", notNull = false) + private boolean kfDraftStandard; // 5.是否为客服负责的标准自来稿订单[0-否,1-是],默认为0 + @AnTableField(column = "CUSTOMER_QRCODE_URL", type = "string,300", notNull = false) + private String customerQrcodeUrl; // 6.客户服务群二维码图片路径 + @AnTableField(column = "DESIGNER_REFUND_REASON", type = "long", notNull = false) + private long refundReason; // 7.设计师退款原因 + @AnTableField(column = "DRAFT_CHECKER", type = "string,50", notNull = false) + private String draftChecker; // 8.初稿审核人 + @AnTableField(column = "DRAFT_BACK_REASON", type = "string,200", notNull = false) + private String draftBackReason; // 9.初稿审核退回原因 + @AnTableField(column = "DRAFT_BACK_REASON_PIC_URL", type = "string,200", notNull = false) + private String draftBackReasonPicUrl; // 10.初稿审核退回原因截图 + @AnTableField(column = "DRAFT_BACK_TIME", type = "datetime", notNull = false) + private Timestamp draftBackTime; // 11.初稿审核退回时间 + @AnTableField(column = "END_CHECKER", type = "string,50", notNull = false) + private String endChecker; // 12.定稿审核人 + @AnTableField(column = "END_BACK_REASON", type = "string,200", notNull = false) + private String endBackReason; // 13.定稿审核退回原因 + @AnTableField(column = "END_BACK_TIME", type = "datetime", notNull = false) + private Timestamp endBackTime; // 14.定稿审核退回时间 + @AnTableField(column = "END_BACK_REASON_PIC_URL", type = "string,200", notNull = false) + private String endBackReasonPicUrl; // 15.定稿审核退回原因截图 + @AnTableField(column = "URGENT_PRICE", type = "long", notNull = false) + private long urgentPrice; // 16.加急费 + @AnTableField(column = "DESIGN_COST", type = "long", notNull = false) + private long designCost; // 17.设计费用(业务端收取费用) + + public long getDesignId() + { + return designId; + } + + public void setDesignId(long designId) + { + this.designId = designId; + } + + public String getLabelIds() + { + return labelIds; + } + + public void setLabelIds(String labelIds) + { + this.labelIds = labelIds; + } + + public int getConsumerType() + { + return consumerType; + } + + public void setConsumerType(int consumerType) + { + this.consumerType = consumerType; + } + + public boolean isDefaultLabel() + { + return defaultLabel; + } + + public void setDefaultLabel(boolean defaultLabel) + { + this.defaultLabel = defaultLabel; + } + + public boolean isKfDraftStandard() + { + return kfDraftStandard; + } + + public void setKfDraftStandard(boolean kfDraftStandard) + { + this.kfDraftStandard = kfDraftStandard; + } + + public String getCustomerQrcodeUrl() + { + return customerQrcodeUrl; + } + + public void setCustomerQrcodeUrl(String customerQrcodeUrl) + { + this.customerQrcodeUrl = customerQrcodeUrl; + } + + public long getRefundReason() + { + return refundReason; + } + + public void setRefundReason(long refundReason) + { + this.refundReason = refundReason; + } + + public String getDraftChecker() + { + return draftChecker; + } + + public void setDraftChecker(String draftChecker) + { + this.draftChecker = draftChecker; + } + + public String getDraftBackReason() + { + return draftBackReason; + } + + public void setDraftBackReason(String draftBackReason) + { + this.draftBackReason = draftBackReason; + } + + public Timestamp getDraftBackTime() + { + return draftBackTime; + } + + public void setDraftBackTime(Timestamp draftBackTime) + { + this.draftBackTime = draftBackTime; + } + + public String getEndChecker() + { + return endChecker; + } + + public void setEndChecker(String endChecker) + { + this.endChecker = endChecker; + } + + public String getEndBackReason() + { + return endBackReason; + } + + public void setEndBackReason(String endBackReason) + { + this.endBackReason = endBackReason; + } + + public Timestamp getEndBackTime() + { + return endBackTime; + } + + public void setEndBackTime(Timestamp endBackTime) + { + this.endBackTime = endBackTime; + } + + public String getDraftBackReasonPicUrl() + { + return draftBackReasonPicUrl; + } + + public void setDraftBackReasonPicUrl(String draftBackReasonPicUrl) + { + this.draftBackReasonPicUrl = draftBackReasonPicUrl; + } + + public String getEndBackReasonPicUrl() + { + return endBackReasonPicUrl; + } + + public void setEndBackReasonPicUrl(String endBackReasonPicUrl) + { + this.endBackReasonPicUrl = endBackReasonPicUrl; + } + + public long getUrgentPrice() + { + return urgentPrice; + } + + public void setUrgentPrice(long urgentPrice) + { + this.urgentPrice = urgentPrice; + } + + public long getDesignCost() + { + return designCost; + } + + public void setDesignCost(long designCost) + { + this.designCost = designCost; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/profile/DesignerCourse.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/profile/DesignerCourse.java new file mode 100644 index 0000000..2f9885d --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/profile/DesignerCourse.java @@ -0,0 +1,224 @@ +/** + * 扬彩印刷设计 + * 文件名 :DesignerCourse.java + * 创建人 :gjx + * 创建时间:2021年3月13日 +*/ + +package com.zhiqim.yangcai.design.dbo.profile; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * + * [简要描述]: 设计师个人信息扩展 + * + * @version 1.0 @author gjx 2021年3月13日 新建与整理 + */ +@AnAlias("DesignerCourse") +@AnNew +@AnTable(table = "DESIGNER_COURSE", key = "DESIGNER", type = "InnoDB") +public class DesignerCourse implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "DESIGNER", type = "string,32", notNull = true) + private String designer;// 设计师 + @AnTableField(column = "WORK_EXPERIENCE", type = "string,300", notNull = true) + private String workExperience;// 工作经历 + @AnTableField(column = "SKILL_SCOPE", type = "string,300", notNull = true) + private String skillScope;// 软件能力 + @AnTableField(column = "DESIGN_TYPE", type = "string,300", notNull = true) + private String designType;// 擅长设计 + @AnTableField(column = "WORK_DURATION", type = "string,30", notNull = true) + private String workDuration;// 工作时长 + @AnTableField(column = "WORK_STATUS", type = "string,30", notNull = true) + private String workStatus;// 在职情况 + @AnTableField(column = "RECEIVE_TYPE", type = "string,10", notNull = true) + private String receiveType;// 收款方式 + @AnTableField(column = "RECEIVE_ACCOUNT", type = "string,100", notNull = true) + private String receiveAccount;// 收款账号、收款信息 + @AnTableField(column = "DESIGNER_REMARK", type = "string,400", notNull = false) + private String designerRemark;// 备注 + @AnTableField(column = "PREVIOUS_END_COUNT", type = "int", notNull = false) + private int previousEndCount;// 上月订单数量 + @AnTableField(column = "PREVIOUS_PERFORMANCE", type = "long", notNull = false) + private long previousPerformance;// 上月绩效 + @AnTableField(column = "LAST_ONLIME_TIME", type = "datetime", notNull = false) + private Timestamp lastOnlimeTime;// 最后接单时间 + @AnTableField(column = "ADD_OPERATOR", type = "string,20", notNull = true) + private String addOperator;// 添加人 + @AnTableField(column = "ADD_TIME", type = "datetime", notNull = true) + private Timestamp addTime;// 添加时间 + @AnTableField(column = "UPDATE_OPERATOR", type = "string,20", notNull = false) + private String updateOperator;// 更新人 + @AnTableField(column = "UPDATE_TIME", type = "datetime", notNull = false) + private Timestamp updateTime;// 更新时间 + + public String getDesigner() + { + return designer; + } + + public void setDesigner(String designer) + { + this.designer = designer; + } + + public String getWorkExperience() + { + return workExperience; + } + + public void setWorkExperience(String workExperience) + { + this.workExperience = workExperience; + } + + public String getSkillScope() + { + return skillScope; + } + + public void setSkillScope(String skillScope) + { + this.skillScope = skillScope; + } + + public String getDesignType() + { + return designType; + } + + public void setDesignType(String designType) + { + this.designType = designType; + } + + public String getWorkDuration() + { + return workDuration; + } + + public void setWorkDuration(String workDuration) + { + this.workDuration = workDuration; + } + + public String getWorkStatus() + { + return workStatus; + } + + public void setWorkStatus(String workStatus) + { + this.workStatus = workStatus; + } + + public String getReceiveType() + { + return receiveType; + } + + public void setReceiveType(String receiveType) + { + this.receiveType = receiveType; + } + + public String getReceiveAccount() + { + return receiveAccount; + } + + public void setReceiveAccount(String receiveAccount) + { + this.receiveAccount = receiveAccount; + } + + public String getDesignerRemark() + { + return designerRemark; + } + + public void setDesignerRemark(String designerRemark) + { + this.designerRemark = designerRemark; + } + + public int getPreviousEndCount() + { + return previousEndCount; + } + + public void setPreviousEndCount(int previousEndCount) + { + this.previousEndCount = previousEndCount; + } + + public long getPreviousPerformance() + { + return previousPerformance; + } + + public void setPreviousPerformance(long previousPerformance) + { + this.previousPerformance = previousPerformance; + } + + public Timestamp getLastOnlimeTime() + { + return lastOnlimeTime; + } + + public void setLastOnlimeTime(Timestamp lastOnlimeTime) + { + this.lastOnlimeTime = lastOnlimeTime; + } + + public String getAddOperator() + { + return addOperator; + } + + public void setAddOperator(String addOperator) + { + this.addOperator = addOperator; + } + + public Timestamp getAddTime() + { + return addTime; + } + + public void setAddTime(Timestamp addTime) + { + this.addTime = addTime; + } + + public String getUpdateOperator() + { + return updateOperator; + } + + public void setUpdateOperator(String updateOperator) + { + this.updateOperator = updateOperator; + } + + public Timestamp getUpdateTime() + { + return updateTime; + } + + public void setUpdateTime(Timestamp updateTime) + { + this.updateTime = updateTime; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/profile/DesignerCourseView.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/profile/DesignerCourseView.java new file mode 100644 index 0000000..023a555 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/profile/DesignerCourseView.java @@ -0,0 +1,271 @@ +/** + * 扬彩印刷设计 + * 文件名 :DesignerCourse.java + * 创建人 :gjx + * 创建时间:2021年3月13日 +*/ + +package com.zhiqim.yangcai.design.dbo.profile; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.orm.annotation.AnView; +import org.zhiqim.orm.annotation.AnViewField; +import org.zhiqim.orm.annotation.AnViewJoin; +import org.zhiqim.orm.annotation.AnViewJoinValue; + +/** + * + * [简要描述]: 设计师个人信息扩展视图 + * + * @version 1.0 @author caohong 2021-6-2 + */ +@AnAlias("DesignerCourseView") +@AnNew +@AnView("DESIGNER_COURSE,ZMR_OPERATOR") +@AnViewJoin( +{ + @AnViewJoinValue(type = "EQUAL", lTable = "DESIGNER_COURSE", lColumn = "DESIGNER", rTable = "ZMR_OPERATOR", rColumn = "OPERATOR_CODE") +}) +public class DesignerCourseView implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnViewField(table = "DESIGNER_COURSE", column = "DESIGNER") + private String designer;// 设计师 + + @AnViewField(table = "DESIGNER_COURSE", column = "WORK_EXPERIENCE") + private String workExperience;// 工作经历 + + @AnViewField(table = "DESIGNER_COURSE", column = "SKILL_SCOPE") + private String skillScope;// 软件能力 + + @AnViewField(table = "DESIGNER_COURSE", column = "DESIGN_TYPE") + private String designType;// 擅长设计 + + @AnViewField(table = "DESIGNER_COURSE", column = "WORK_DURATION") + private String workDuration;// 工作时长 + + @AnViewField(table = "DESIGNER_COURSE", column = "WORK_STATUS") + private String workStatus;// 在职情况 + + @AnViewField(table = "DESIGNER_COURSE", column = "RECEIVE_TYPE") + private String receiveType;// 收款方式 + + @AnViewField(table = "DESIGNER_COURSE", column = "RECEIVE_ACCOUNT") + private String receiveAccount;// 收款账号、收款信息 + + @AnViewField(table = "DESIGNER_COURSE", column = "DESIGNER_REMARK") + private String designerRemark;// 备注 + + @AnViewField(table = "DESIGNER_COURSE", column = "PREVIOUS_END_COUNT") + private int previousEndCount;// 上月订单数量 + + @AnViewField(table = "DESIGNER_COURSE", column = "PREVIOUS_PERFORMANCE") + private long previousPerformance;// 上月绩效 + + @AnViewField(table = "DESIGNER_COURSE", column = "LAST_ONLIME_TIME") + private Timestamp lastOnlimeTime;// 最后接单时间 + + @AnViewField(table = "DESIGNER_COURSE", column = "ADD_TIME") + private Timestamp addTime;// 添加时间 + + @AnViewField(table = "ZMR_OPERATOR", column = "ORG_ID") + private long orgId; // 1.组织编号 + + @AnViewField(table = "ZMR_OPERATOR", column = "OPERATOR_MOBILE") + private String operatorMobile; // 2.操作员手机号 + + @AnViewField(table = "ZMR_OPERATOR", column = "OPERATOR_PARAM") + private String operatorParam; // 3.操作员参数,用于项目自定义设置 + + @AnViewField(table = "ZMR_OPERATOR", column = "OPERATOR_CREATED") + private String operatorCreated; // 4.操作员创建时间,格式:yyyy-MM-dd hh:mm:ss + + @AnViewField(table = "ZMR_OPERATOR", column = "OPERATOR_WXCODE") + private String operatorWxcode; // 5.个人微信 + + public String getDesigner() + { + return designer; + } + + public void setDesigner(String designer) + { + this.designer = designer; + } + + public String getWorkExperience() + { + return workExperience; + } + + public void setWorkExperience(String workExperience) + { + this.workExperience = workExperience; + } + + public String getSkillScope() + { + return skillScope; + } + + public void setSkillScope(String skillScope) + { + this.skillScope = skillScope; + } + + public String getDesignType() + { + return designType; + } + + public void setDesignType(String designType) + { + this.designType = designType; + } + + public String getWorkDuration() + { + return workDuration; + } + + public void setWorkDuration(String workDuration) + { + this.workDuration = workDuration; + } + + public String getWorkStatus() + { + return workStatus; + } + + public void setWorkStatus(String workStatus) + { + this.workStatus = workStatus; + } + + public String getReceiveType() + { + return receiveType; + } + + public void setReceiveType(String receiveType) + { + this.receiveType = receiveType; + } + + public String getReceiveAccount() + { + return receiveAccount; + } + + public void setReceiveAccount(String receiveAccount) + { + this.receiveAccount = receiveAccount; + } + + public String getDesignerRemark() + { + return designerRemark; + } + + public void setDesignerRemark(String designerRemark) + { + this.designerRemark = designerRemark; + } + + public int getPreviousEndCount() + { + return previousEndCount; + } + + public void setPreviousEndCount(int previousEndCount) + { + this.previousEndCount = previousEndCount; + } + + public long getPreviousPerformance() + { + return previousPerformance; + } + + public void setPreviousPerformance(long previousPerformance) + { + this.previousPerformance = previousPerformance; + } + + public Timestamp getLastOnlimeTime() + { + return lastOnlimeTime; + } + + public void setLastOnlimeTime(Timestamp lastOnlimeTime) + { + this.lastOnlimeTime = lastOnlimeTime; + } + + public Timestamp getAddTime() + { + return addTime; + } + + public void setAddTime(Timestamp addTime) + { + this.addTime = addTime; + } + + public long getOrgId() + { + return orgId; + } + + public void setOrgId(long orgId) + { + this.orgId = orgId; + } + + public String getOperatorMobile() + { + return operatorMobile; + } + + public void setOperatorMobile(String operatorMobile) + { + this.operatorMobile = operatorMobile; + } + + public String getOperatorParam() + { + return operatorParam; + } + + public void setOperatorParam(String operatorParam) + { + this.operatorParam = operatorParam; + } + + public String getOperatorCreated() + { + return operatorCreated; + } + + public void setOperatorCreated(String operatorCreated) + { + this.operatorCreated = operatorCreated; + } + + public String getOperatorWxcode() + { + return operatorWxcode; + } + + public void setOperatorWxcode(String operatorWxcode) + { + this.operatorWxcode = operatorWxcode; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/profile/DesignerProfile.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/profile/DesignerProfile.java new file mode 100644 index 0000000..49dc59e --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/profile/DesignerProfile.java @@ -0,0 +1,89 @@ +package com.zhiqim.yangcai.design.dbo.profile; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 设计师个人信息 对应表《DESIGNER_PROFILE》 + */ +@AnAlias("DesignerProfile") +@AnNew +@AnTable(table = "DESIGNER_PROFILE", key = "OPERATOR_CODE", type = "InnoDB") +public class DesignerProfile implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "OPERATOR_CODE", type = "string,32", notNull = true) + private String operatorCode; // 1.操作员 + @AnTableField(column = "PERSONAL_PROFILE", type = "string,350", notNull = false) + private String personalProfile; // 2.个人简介 + @AnTableField(column = "LABELS", type = "string,2000", notNull = false) + private String labels; // 3.标签 + @AnTableField(column = "STATE", type = "int", notNull = false) + private int state; // 4.状态: 0未审核 1审核通过 + @AnTableField(column = "ADD_TIME", type = "datetime", notNull = false) + private Timestamp addTime; // 5.提交时间 + + public String getOperatorCode() + { + return operatorCode; + } + + public void setOperatorCode(String operatorCode) + { + this.operatorCode = operatorCode; + } + + public String getPersonalProfile() + { + return personalProfile; + } + + public void setPersonalProfile(String personalProfile) + { + this.personalProfile = personalProfile; + } + + public String getLabels() + { + return labels; + } + + public void setLabels(String labels) + { + this.labels = labels; + } + + public int getState() + { + return state; + } + + public void setState(int state) + { + this.state = state; + } + + public Timestamp getAddTime() + { + return addTime; + } + + public void setAddTime(Timestamp addTime) + { + this.addTime = addTime; + } + + @Override + public String toString() + { + return Jsons.toString(this); + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/profile/DesignerWorks.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/profile/DesignerWorks.java new file mode 100644 index 0000000..b127e27 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/profile/DesignerWorks.java @@ -0,0 +1,101 @@ +package com.zhiqim.yangcai.design.dbo.profile; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 设计师作品 对应表《DesignerWorks》 + */ +@AnAlias("DesignerWorks") +@AnNew +@AnTable(table = "DESIGNER_WORKS", key = "DESIGNER_WORKS_ID", type = "InnoDB") +public class DesignerWorks implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "DESIGNER_WORKS_ID", type = "long", notNull = true) + private long designerWorksId; // 1.作品id + @AnTableField(column = "OPERATOR_CODE", type = "string,32", notNull = true) + private String operatorCode; // 2.操作员 + @AnTableField(column = "IMG_PATH", type = "string,2000", notNull = false) + private String imgPath; // 3.图片地址 + @AnTableField(column = "IMG_KEY", type = "string,2000", notNull = false) + private String imgKey; // 4.OSS图片key + @AnTableField(column = "STATE", type = "int", notNull = false) + private int state; // 5.0未审核 1审核退回 2审核通过 + @AnTableField(column = "ADD_TIME", type = "datetime", notNull = false) + private Timestamp addTime; // 6.提交时间 + + public long getDesignerWorksId() + { + return designerWorksId; + } + + public void setDesignerWorksId(long designerWorksId) + { + this.designerWorksId = designerWorksId; + } + + public String getOperatorCode() + { + return operatorCode; + } + + public void setOperatorCode(String operatorCode) + { + this.operatorCode = operatorCode; + } + + public String getImgPath() + { + return imgPath; + } + + public void setImgPath(String imgPath) + { + this.imgPath = imgPath; + } + + public String getImgKey() + { + return imgKey; + } + + public void setImgKey(String imgKey) + { + this.imgKey = imgKey; + } + + public int getState() + { + return state; + } + + public void setState(int state) + { + this.state = state; + } + + public Timestamp getAddTime() + { + return addTime; + } + + public void setAddTime(Timestamp addTime) + { + this.addTime = addTime; + } + + @Override + public String toString() + { + return Jsons.toString(this); + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/qc/QcApplyScore.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/qc/QcApplyScore.java new file mode 100644 index 0000000..9ba8fbe --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/qc/QcApplyScore.java @@ -0,0 +1,184 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.dbo.qc; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 质检加分表 对应表《QC_APPLY_SCORE》 + */ +@AnAlias("QcApplyScore") +@AnNew +@AnTable(table = "QC_APPLY_SCORE", key = "APPLY_ID", type = "InnoDB") +public class QcApplyScore implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "APPLY_ID", type = "long", notNull = true) + private long applyId; // 1.申请编号 + @AnTableField(column = "DESIGNER", type = "string,64", notNull = true) + private String designer; // 2.设计师 + @AnTableField(column = "ORG_ID", type = "long", notNull = true) + private long orgId; // 3.组织编号 + @AnTableField(column = "APPLY_REASON", type = "string,500", notNull = true) + private String applyReason; // 4.申请原因 + @AnTableField(column = "APPLY_IMG_PATH", type = "string,500", notNull = true) + private String applyImgPath; // 5.申请凭证路径 + @AnTableField(column = "APPLY_TIME", type = "datetime", notNull = true) + private Timestamp applyTime; // 6.申请时间 + @AnTableField(column = "SCORE", type = "decimal,10,1", notNull = true) + private double score; // 7.申请分数 + @AnTableField(column = "APPLY_FLAG", type = "int", notNull = true) + private int applyFlag; // 8.0表示申请中,1表示申请成功,2表示申请失败 + @AnTableField(column = "APPLY_BACK_REASON", type = "string,500", notNull = false) + private String applyBackReason; // 9.申请打回原因 + @AnTableField(column = "QC_TYPE_ID", type = "long", notNull = false) + private long qcTypeId; // 10.加分类型外键 + @AnTableField(column = "QC_AWARDED_AUDITOR", type = "string,200", notNull = false) + private String qcAwardedAuditor; // 11.审核人 + @AnTableField(column = "QC_AWARDED_AUDITOR_TIME", type = "datetime", notNull = false) + private Timestamp qcAwardedAuditorTime; // 12.审核时间 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public long getApplyId() + { + return applyId; + } + + public void setApplyId(long applyId) + { + this.applyId = applyId; + } + + public String getDesigner() + { + return designer; + } + + public void setDesigner(String designer) + { + this.designer = designer; + } + + public long getOrgId() + { + return orgId; + } + + public void setOrgId(long orgId) + { + this.orgId = orgId; + } + + public String getApplyReason() + { + return applyReason; + } + + public void setApplyReason(String applyReason) + { + this.applyReason = applyReason; + } + + public String getApplyImgPath() + { + return applyImgPath; + } + + public void setApplyImgPath(String applyImgPath) + { + this.applyImgPath = applyImgPath; + } + + public Timestamp getApplyTime() + { + return applyTime; + } + + public void setApplyTime(Timestamp applyTime) + { + this.applyTime = applyTime; + } + + public double getScore() + { + return score; + } + + public void setScore(double score) + { + this.score = score; + } + + public int getApplyFlag() + { + return applyFlag; + } + + public void setApplyFlag(int applyFlag) + { + this.applyFlag = applyFlag; + } + + public String getApplyBackReason() + { + return applyBackReason; + } + + public void setApplyBackReason(String applyBackReason) + { + this.applyBackReason = applyBackReason; + } + + public long getQcTypeId() + { + return qcTypeId; + } + + public void setQcTypeId(long qcTypeId) + { + this.qcTypeId = qcTypeId; + } + + public String getQcAwardedAuditor() + { + return qcAwardedAuditor; + } + + public void setQcAwardedAuditor(String qcAwardedAuditor) + { + this.qcAwardedAuditor = qcAwardedAuditor; + } + + public Timestamp getQcAwardedAuditorTime() + { + return qcAwardedAuditorTime; + } + + public void setQcAwardedAuditorTime(Timestamp qcAwardedAuditorTime) + { + this.qcAwardedAuditorTime = qcAwardedAuditorTime; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/qc/QcAwardedType.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/qc/QcAwardedType.java new file mode 100644 index 0000000..9e94ac4 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/qc/QcAwardedType.java @@ -0,0 +1,71 @@ +/** + * 扬彩印刷设计 + * 文件名 :QcAwardedType.java + * 创建人 :高佳新 + * 创建时间:2019-5-20 + */ + +package com.zhiqim.yangcai.design.dbo.qc; + +import java.io.Serializable; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 质检加分类型表 对应表《QC_AWARDED_TYPE》 + */ +@AnAlias("QcAwardedType") +@AnNew +@AnTable(table = "QC_AWARDED_TYPE", key = "QC_TYPE_ID", type = "InnoDB") +public class QcAwardedType implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "QC_TYPE_ID", type = "long", notNull = true) + private long qcTypeId; // 1.质检加分类型id + @AnTableField(column = "QC_AWARDED_NAME", type = "string,64", notNull = true) + private String qcAwardedName; // 2.质检加分类型名称 + @AnTableField(column = "QC_SCORE", type = "decimal,10,1", notNull = true) + private double qcScore; // 3.质检加分类型对应分数 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public long getQcTypeId() + { + return qcTypeId; + } + + public void setQcTypeId(long qcTypeId) + { + this.qcTypeId = qcTypeId; + } + + public String getQcAwardedName() + { + return qcAwardedName; + } + + public void setQcAwardedName(String qcAwardedName) + { + this.qcAwardedName = qcAwardedName; + } + + public double getQcScore() + { + return qcScore; + } + + public void setQcScore(double qcScore) + { + this.qcScore = qcScore; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/qc/QcOrderView.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/qc/QcOrderView.java new file mode 100644 index 0000000..69f1bd2 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/qc/QcOrderView.java @@ -0,0 +1,82 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.qc; + +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 质检订单视图 对应视图《QC_ORDER_VIEW》 + */ +@AnAlias("QcOrderView") +@AnNew +@AnView("QC_RECORD,DESIGN_ORDER") +@AnViewJoin({@AnViewJoinValue(type="EQUAL", lTable="QC_RECORD", lColumn="DESIGN_ID", rTable="DESIGN_ORDER", rColumn="DESIGN_ID")}) +public class QcOrderView extends DesignOrder +{ + private static final long serialVersionUID = 1L; + + @AnViewField(table="QC_RECORD", column="REASON") private String reason; //2.质检原因 + @AnViewField(table="QC_RECORD", column="SCORE") private double score; //3.质检分数 + @AnViewField(table="QC_RECORD", column="IMG_PATH") private String imgPath; //4.质检凭证路径 + @AnViewField(table="QC_RECORD", column="OPERATOR_CODE") private String operatorCode; //5.操作员 + + public String toString() + { + return Jsons.toString(this); + } + + public String getReason() + { + return reason; + } + + public void setReason(String reason) + { + this.reason = reason; + } + + public double getScore() + { + return score; + } + + public void setScore(double score) + { + this.score = score; + } + + public String getImgPath() + { + return imgPath; + } + + public void setImgPath(String imgPath) + { + this.imgPath = imgPath; + } + + public String getOperatorCode() + { + return operatorCode; + } + + public void setOperatorCode(String operatorCode) + { + this.operatorCode = operatorCode; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/qc/QcParameter.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/qc/QcParameter.java new file mode 100644 index 0000000..d4e7043 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/qc/QcParameter.java @@ -0,0 +1,81 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.qc; + +import java.io.Serializable; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 质检参数表 对应表《QC_PARAMETER》 + */ +@AnAlias("QcParameter") +@AnNew +@AnTable(table="QC_PARAMETER", key="PARAMETER_ID", type="InnoDB") +public class QcParameter implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column="PARAMETER_ID", type="long", notNull=true) private long parameterId; //1.参数编号 + @AnTableField(column="FLAG", type="byte", notNull=true) private int flag; //2.0表示加分,1表示减分 + @AnTableField(column="CONTENT", type="string,1000", notNull=true) private String content; //3.预录内容 + @AnTableField(column="SCORE", type="decimal,15,1", notNull=false) private double score; //4.内容对应分数 + + public String toString() + { + return Jsons.toString(this); + } + + public long getParameterId() + { + return parameterId; + } + + public void setParameterId(long parameterId) + { + this.parameterId = parameterId; + } + + public int getFlag() + { + return flag; + } + + public void setFlag(int flag) + { + this.flag = flag; + } + + public String getContent() + { + return content; + } + + public void setContent(String content) + { + this.content = content; + } + + public double getScore() + { + return score; + } + + public void setScore(double score) + { + this.score = score; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/qc/QcRecord.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/qc/QcRecord.java new file mode 100644 index 0000000..76bf435 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/qc/QcRecord.java @@ -0,0 +1,148 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.qc; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 质检记录表 对应表《QC_RECORD》 + */ +@AnAlias("QcRecord") +@AnNew +@AnTable(table="QC_RECORD", key="DESIGN_ID", type="InnoDB") +public class QcRecord implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column="DESIGN_ID", type="long", notNull=true) private long designId; //1.订单号 + @AnTableField(column="ORG_ID", type="long", notNull=true) private long orgId; //2.组织编号 + @AnTableField(column="DESIGNER", type="string,64", notNull=true) private String designer; //3.设计师 + @AnTableField(column="REASON", type="string,1000", notNull=false) private String reason; //4.质检原因 + @AnTableField(column="DESCRIPTION", type="string,1000", notNull=false) private String description; //5.质检违规描述 + @AnTableField(column="SCORE", type="decimal,15,1", notNull=false) private double score; //6.质检分数 + @AnTableField(column="IMG_PATH", type="string,200", notNull=false) private String imgPath; //7.质检凭证路径 + @AnTableField(column="OPERATOR_CODE", type="string,64", notNull=true) private String operatorCode; //8.操作员 + @AnTableField(column="QC_TIME", type="datetime", notNull=true) private Timestamp qcTime; //9.质检时间 + @AnTableField(column="QC_FLAG", type="int", notNull=true) private int qcFlag; //10.质检标志,0表示未质检,1表示质检正常,2表示质检违规 + + public String toString() + { + return Jsons.toString(this); + } + + public long getDesignId() + { + return designId; + } + + public void setDesignId(long designId) + { + this.designId = designId; + } + + public long getOrgId() + { + return orgId; + } + + public void setOrgId(long orgId) + { + this.orgId = orgId; + } + + public String getDesigner() + { + return designer; + } + + public void setDesigner(String designer) + { + this.designer = designer; + } + + public String getReason() + { + return reason; + } + + public void setReason(String reason) + { + this.reason = reason; + } + + public String getDescription() + { + return description; + } + + public void setDescription(String description) + { + this.description = description; + } + + public double getScore() + { + return score; + } + + public void setScore(double score) + { + this.score = score; + } + + public String getImgPath() + { + return imgPath; + } + + public void setImgPath(String imgPath) + { + this.imgPath = imgPath; + } + + public String getOperatorCode() + { + return operatorCode; + } + + public void setOperatorCode(String operatorCode) + { + this.operatorCode = operatorCode; + } + + public Timestamp getQcTime() + { + return qcTime; + } + + public void setQcTime(Timestamp qcTime) + { + this.qcTime = qcTime; + } + + public int getQcFlag() + { + return qcFlag; + } + + public void setQcFlag(int qcFlag) + { + this.qcFlag = qcFlag; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/retention/RetentionDetails.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/retention/RetentionDetails.java new file mode 100644 index 0000000..255dd74 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/retention/RetentionDetails.java @@ -0,0 +1,128 @@ +/** + * 扬彩印刷设计 + * 文件名 :RetentionDetails.java + * 创建人 :高佳新 + * 创建时间:2019-7-22 + */ + +package com.zhiqim.yangcai.design.dbo.retention; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * + * 滞留单详情表 + * + * @version 1.0 @author gjx 2019-7-22 新建与整理 + */ +@AnAlias("RetentionDetails") +@AnNew +@AnTable(table = "RETENTION_DETAILS", key = "DESIGN_ID", type = "InnoDB") +public class RetentionDetails implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "DESIGN_ID", type = "long", notNull = true) + private long designId; // 1.设订单编号,设计平台独立编号 + @AnTableField(column = "IS_RETENT_DEAL", type = "int", notNull = false) + private int isRetentDeal; // 2.设计师是否处理过滞留单,0 没、1 处理过 + @AnTableField(column = "RETENT_DEAL_TIME", type = "datetime", notNull = false) + private Timestamp retentDealTime; // 3.滞留单自行处理时间 + @AnTableField(column = "RETENT_DEAL_NAME", type = "string,64", notNull = false) + private String retentDealName; // 4.滞留单处理人 + @AnTableField(column = "RETENT_DEAL_WAY", type = "int", notNull = false) + private int retentDealWay; // 5.滞留单处理方式 0:寄存、1:退款 + @AnTableField(column = "RETENT_FOLLOW_FLAG", type = "int", notNull = false) + private int retentFollowFlag; // 6.设计师跟进情况:0:较好、1:一般、2:差 + @AnTableField(column = "RETENT_REMARK", type = "string,1000", notNull = false) + private String retentRemark; // 7.滞留单处理备注 + @AnTableField(column = "RETENTION_END_TIME", type = "datetime", notNull = false) + private Timestamp retentionEndTime; // 8.滞留单处理时间 + + public long getDesignId() + { + return designId; + } + + public void setDesignId(long designId) + { + this.designId = designId; + } + + public int getIsRetentDeal() + { + return isRetentDeal; + } + + public void setIsRetentDeal(int isRetentDeal) + { + this.isRetentDeal = isRetentDeal; + } + + public Timestamp getRetentDealTime() + { + return retentDealTime; + } + + public void setRetentDealTime(Timestamp retentDealTime) + { + this.retentDealTime = retentDealTime; + } + + public String getRetentDealName() + { + return retentDealName; + } + + public void setRetentDealName(String retentDealName) + { + this.retentDealName = retentDealName; + } + + public int getRetentDealWay() + { + return retentDealWay; + } + + public void setRetentDealWay(int retentDealWay) + { + this.retentDealWay = retentDealWay; + } + + public int getRetentFollowFlag() + { + return retentFollowFlag; + } + + public void setRetentFollowFlag(int retentFollowFlag) + { + this.retentFollowFlag = retentFollowFlag; + } + + public String getRetentRemark() + { + return retentRemark; + } + + public void setRetentRemark(String retentRemark) + { + this.retentRemark = retentRemark; + } + + public Timestamp getRetentionEndTime() + { + return retentionEndTime; + } + + public void setRetentionEndTime(Timestamp retentionEndTime) + { + this.retentionEndTime = retentionEndTime; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/score/DesScoreParam.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/score/DesScoreParam.java new file mode 100644 index 0000000..9ccae49 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/score/DesScoreParam.java @@ -0,0 +1,103 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.score; + +import java.io.Serializable; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 评分参数表 对应表《DES_SCORE_PARAM》 + */ +@AnAlias("DesScoreParam") +@AnNew +@AnTable(table="DES_SCORE_PARAM", key="PARAM_ID", type="InnoDB") +public class DesScoreParam implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column="PARAM_ID", type="long", notNull=true) private long paramId; //1.参数ID + @AnTableField(column="SCORE_NAME", type="string,32", notNull=false) private String scoreName; //2.规则名称(TEMPLATE,KEYWORD) + @AnTableField(column="SCORE_TYPE", type="string,32", notNull=true) private String scoreType; //3.评分规则类型(基础分:BASE_SCORE,动态分:FLOAT_SCORE,销售分:SALE_SCORE, 用户评分:USER_SCORE ) + @AnTableField(column="PARAM_TYPE", type="int", notNull=true) private int paramType; //4.参数类型(0代表加分,1代表减分) + @AnTableField(column="PARAM_KEY", type="string,32", notNull=true) private String paramKey; //5.参数键 + @AnTableField(column="PARAM_VALUE", type="int", notNull=true) private int paramValue; //6.参数值 + + public String toString() + { + return Jsons.toString(this); + } + + public long getParamId() + { + return paramId; + } + + public void setParamId(long paramId) + { + this.paramId = paramId; + } + + public String getScoreName() + { + return scoreName; + } + + public void setScoreName(String scoreName) + { + this.scoreName = scoreName; + } + + public String getScoreType() + { + return scoreType; + } + + public void setScoreType(String scoreType) + { + this.scoreType = scoreType; + } + + public int getParamType() + { + return paramType; + } + + public void setParamType(int paramType) + { + this.paramType = paramType; + } + + public String getParamKey() + { + return paramKey; + } + + public void setParamKey(String paramKey) + { + this.paramKey = paramKey; + } + + public int getParamValue() + { + return paramValue; + } + + public void setParamValue(int paramValue) + { + this.paramValue = paramValue; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/score/DesScoreWeight.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/score/DesScoreWeight.java new file mode 100644 index 0000000..bc2c09a --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/score/DesScoreWeight.java @@ -0,0 +1,103 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.score; + +import java.io.Serializable; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 评分权重表 对应表《DES_SCORE_WEIGHT》 + */ +@AnAlias("DesScoreWeight") +@AnNew +@AnTable(table="DES_SCORE_WEIGHT", key="SCORE_ID", type="InnoDB") +public class DesScoreWeight implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column="SCORE_ID", type="long", notNull=true) private long scoreId; //1.评分ID + @AnTableField(column="SCORE_NAME", type="string,32", notNull=true) private String scoreName; //2.评分名称(TEMPLATE,KEYWORD) + @AnTableField(column="DAY_CODE", type="string,10", notNull=true) private String dayCode; //3.日期 + @AnTableField(column="SCORE_TYPE", type="string,32", notNull=true) private String scoreType; //4.评分类型(基础分:BASE_SCORE,动态分:FLOAT_SCORE,销售分:SALE_SCORE, 用户评分:USER_SCORE ) + @AnTableField(column="SCORE_WEIGHT", type="int", notNull=true) private int scoreWeight; //5.评分权重值 + @AnTableField(column="SCORE_VALUE", type="int", notNull=false) private int scoreValue; //6.评分分值 + + public String toString() + { + return Jsons.toString(this); + } + + public long getScoreId() + { + return scoreId; + } + + public void setScoreId(long scoreId) + { + this.scoreId = scoreId; + } + + public String getScoreName() + { + return scoreName; + } + + public void setScoreName(String scoreName) + { + this.scoreName = scoreName; + } + + public String getDayCode() + { + return dayCode; + } + + public void setDayCode(String dayCode) + { + this.dayCode = dayCode; + } + + public String getScoreType() + { + return scoreType; + } + + public void setScoreType(String scoreType) + { + this.scoreType = scoreType; + } + + public int getScoreWeight() + { + return scoreWeight; + } + + public void setScoreWeight(int scoreWeight) + { + this.scoreWeight = scoreWeight; + } + + public int getScoreValue() + { + return scoreValue; + } + + public void setScoreValue(int scoreValue) + { + this.scoreValue = scoreValue; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/score/ScoreDesignerLever.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/score/ScoreDesignerLever.java new file mode 100644 index 0000000..ee4be39 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/score/ScoreDesignerLever.java @@ -0,0 +1,137 @@ +package com.zhiqim.yangcai.design.dbo.score; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 设计师积分等级配置 对应表《score_designer_lever》 + */ +@AnAlias("ScoreDesignerLever") +@AnNew +@AnTable(table = "score_designer_lever", key = "designer_lever_id", type = "InnoDB") +public class ScoreDesignerLever implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "designer_lever_id", type = "long", notNull = true) + private long designerLeverId; // 1.设计师等级id + @AnTableField(column = "designer_lever", type = "string,32", notNull = true) + private String designerLever; // 2.设计师等级名称 + @AnTableField(column = "min_score", type = "int", notNull = true) + private int minScore; // 3.分数下限 + @AnTableField(column = "max_score", type = "int", notNull = true) + private int maxScore; // 4.分数上限 + @AnTableField(column = "state", type = "int", notNull = true) + private int state; // 5.状态:0=失效;1=生效; + @AnTableField(column = "remark", type = "string,100", notNull = false) + private String remark; // 6.备注 + @AnTableField(column = "CREATE_TIME", type = "datetime", notNull = true) + private Timestamp createTime; // 56.创建时间 + @AnTableField(column = "MODIFY_TIME", type = "datetime", notNull = false) + private Timestamp modifyTime; // 57.修改时间 + @AnTableField(column = "LAST_OPERATOR_CODE", type = "string,64", notNull = true) + private String lastOperatorCode; // 58.操作人 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public long getDesignerLeverId() + { + return designerLeverId; + } + + public void setDesignerLeverId(long designerLeverId) + { + this.designerLeverId = designerLeverId; + } + + public String getDesignerLever() + { + return designerLever; + } + + public void setDesignerLever(String designerLever) + { + this.designerLever = designerLever; + } + + public int getMinScore() + { + return minScore; + } + + public void setMinScore(int minScore) + { + this.minScore = minScore; + } + + public int getMaxScore() + { + return maxScore; + } + + public void setMaxScore(int maxScore) + { + this.maxScore = maxScore; + } + + public int getState() + { + return state; + } + + public void setState(int state) + { + this.state = state; + } + + public String getRemark() + { + return remark; + } + + public void setRemark(String remark) + { + this.remark = remark; + } + + public Timestamp getCreateTime() + { + return createTime; + } + + public void setCreateTime(Timestamp createTime) + { + this.createTime = createTime; + } + + public Timestamp getModifyTime() + { + return modifyTime; + } + + public void setModifyTime(Timestamp modifyTime) + { + this.modifyTime = modifyTime; + } + + public String getLastOperatorCode() + { + return lastOperatorCode; + } + + public void setLastOperatorCode(String lastOperatorCode) + { + this.lastOperatorCode = lastOperatorCode; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/score/ScoreDesignerRecord.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/score/ScoreDesignerRecord.java new file mode 100644 index 0000000..6e7b517 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/score/ScoreDesignerRecord.java @@ -0,0 +1,161 @@ +package com.zhiqim.yangcai.design.dbo.score; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 设计师虚拟积分账户 对应表《score_designer_record》 + */ +@AnAlias("ScoreDesignerRecord") +@AnNew +@AnTable(table = "score_designer_record", key = "record_id", type = "InnoDB") +public class ScoreDesignerRecord implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "record_id", type = "long", notNull = true) + private long recordId; // 1.记录id + @AnTableField(column = "operator_code", type = "string,32", notNull = true) + private String operatorCode; // 2.设计师 + @AnTableField(column = "org_id", type = "long", notNull = false) + private long orgId; // 3.设计师所在组织id + @AnTableField(column = "state", type = "int", notNull = true) + private int state; // 4.状态:0=失效;1=生效; + @AnTableField(column = "score", type = "int", notNull = false) + private int score; // 5.得分 + @AnTableField(column = "CREATE_TIME", type = "datetime", notNull = true) + private Timestamp createTime; // 6.创建时间 + @AnTableField(column = "LAST_MODIFY_TIME", type = "datetime", notNull = false) + private Timestamp lastModifyTime; // 7.修改时间 + @AnTableField(column = "LAST_MODIFY_SCORE", type = "int", notNull = false) + private int lastModifyScore; // 8.最后更新积分 + @AnTableField(column = "LAST_SCORE_TYPE", type = "long", notNull = false) + private long lastScoreType; // 9.最后更新积分细则 + @AnTableField(column = "order_id", type = "long", notNull = false) + private long orderId; // 10.涉及订单 + @AnTableField(column = "remark", type = "string,3000", notNull = false) + private String remark; // 15.备注 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public long getRecordId() + { + return recordId; + } + + public void setRecordId(long recordId) + { + this.recordId = recordId; + } + + public String getOperatorCode() + { + return operatorCode; + } + + public void setOperatorCode(String operatorCode) + { + this.operatorCode = operatorCode; + } + + public long getOrgId() + { + return orgId; + } + + public void setOrgId(long orgId) + { + this.orgId = orgId; + } + + public int getState() + { + return state; + } + + public void setState(int state) + { + this.state = state; + } + + public int getScore() + { + return score; + } + + public void setScore(int score) + { + this.score = score; + } + + public Timestamp getCreateTime() + { + return createTime; + } + + public void setCreateTime(Timestamp createTime) + { + this.createTime = createTime; + } + + public Timestamp getLastModifyTime() + { + return lastModifyTime; + } + + public void setLastModifyTime(Timestamp lastModifyTime) + { + this.lastModifyTime = lastModifyTime; + } + + public int getLastModifyScore() + { + return lastModifyScore; + } + + public void setLastModifyScore(int lastModifyScore) + { + this.lastModifyScore = lastModifyScore; + } + + public long getLastScoreType() + { + return lastScoreType; + } + + public void setLastScoreType(long lastScoreType) + { + this.lastScoreType = lastScoreType; + } + + public long getOrderId() + { + return orderId; + } + + public void setOrderId(long orderId) + { + this.orderId = orderId; + } + + public String getRemark() + { + return remark; + } + + public void setRemark(String remark) + { + this.remark = remark; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/score/ScoreDesignerRecordDetail.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/score/ScoreDesignerRecordDetail.java new file mode 100644 index 0000000..00df47b --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/score/ScoreDesignerRecordDetail.java @@ -0,0 +1,149 @@ +package com.zhiqim.yangcai.design.dbo.score; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 设计师积分交易流水详情 对应表《score_designer_record_detail》 + */ +@AnAlias("ScoreDesignerRecordDetail") +@AnNew +@AnTable(table = "score_designer_record_detail", key = "record_id", type = "InnoDB") +public class ScoreDesignerRecordDetail implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "record_id", type = "long", notNull = true) + private long recordId; // 1.记录id + @AnTableField(column = "operator_code", type = "string,32", notNull = true) + private String operatorCode; // 2.设计师 + @AnTableField(column = "state", type = "int", notNull = true) + private int state; // 4.状态:0=失效;1=生效; + @AnTableField(column = "score", type = "int", notNull = false) + private int score; // 5.得分 + @AnTableField(column = "CREATE_TIME", type = "datetime", notNull = true) + private Timestamp createTime; // 6.创建时间 + @AnTableField(column = "create_operator", type = "string,32", notNull = true) + private String createOperator; // 7.操作人 + @AnTableField(column = "MODIFY_TIME", type = "datetime", notNull = false) + private Timestamp modifyTime; // 7.修改时间 + @AnTableField(column = "SCORE_TYPE", type = "long", notNull = false) + private long scoreType; // 9.积分细则ID + @AnTableField(column = "order_id", type = "long", notNull = false) + private long orderId; // 10.涉及订单 + @AnTableField(column = "remark", type = "string,3000", notNull = false) + private String remark; // 15.备注 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public long getRecordId() + { + return recordId; + } + + public void setRecordId(long recordId) + { + this.recordId = recordId; + } + + public String getOperatorCode() + { + return operatorCode; + } + + public void setOperatorCode(String operatorCode) + { + this.operatorCode = operatorCode; + } + + public int getState() + { + return state; + } + + public void setState(int state) + { + this.state = state; + } + + public int getScore() + { + return score; + } + + public void setScore(int score) + { + this.score = score; + } + + public Timestamp getCreateTime() + { + return createTime; + } + + public void setCreateTime(Timestamp createTime) + { + this.createTime = createTime; + } + + public Timestamp getModifyTime() + { + return modifyTime; + } + + public void setModifyTime(Timestamp modifyTime) + { + this.modifyTime = modifyTime; + } + + public long getScoreType() + { + return scoreType; + } + + public void setScoreType(long scoreType) + { + this.scoreType = scoreType; + } + + public long getOrderId() + { + return orderId; + } + + public void setOrderId(long orderId) + { + this.orderId = orderId; + } + + public String getRemark() + { + return remark; + } + + public void setRemark(String remark) + { + this.remark = remark; + } + + public String getCreateOperator() + { + return createOperator; + } + + public void setCreateOperator(String createOperator) + { + this.createOperator = createOperator; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/score/ScoreDesignerRecordDetailView.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/score/ScoreDesignerRecordDetailView.java new file mode 100644 index 0000000..d2f3af5 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/score/ScoreDesignerRecordDetailView.java @@ -0,0 +1,179 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.score; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnView; +import org.zhiqim.orm.annotation.AnViewField; +import org.zhiqim.orm.annotation.AnViewJoin; +import org.zhiqim.orm.annotation.AnViewJoinValue; + +/** + * 设计师积分详情 对应表《score_designer_record_detail》 + */ +@AnAlias("ScoreDesignerRecordDetailView") +@AnNew +@AnView("score_designer_record_detail,score_type") +@AnViewJoin( +{ + @AnViewJoinValue(type = "LEFT", lTable = "score_designer_record_detail", lColumn = "score_Type", rTable = "score_type", rColumn = "type_id") +}) +public class ScoreDesignerRecordDetailView implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnViewField(table = "score_designer_record_detail", column = "record_id") + private long recordId; // 1.记录id + @AnViewField(table = "score_designer_record_detail", column = "operator_code") + private String operatorCode; // 2.设计师 + @AnViewField(table = "score_designer_record_detail", column = "state") + private int state; // 4.状态:0=失效;1=生效; + @AnViewField(table = "score_designer_record_detail", column = "score") + private int score; // 5.得分 + @AnViewField(table = "score_designer_record_detail", column = "CREATE_TIME") + private Timestamp createTime; // 6.创建时间 + @AnViewField(table = "score_designer_record_detail", column = "MODIFY_TIME") + private Timestamp modifyTime; // 7.修改时间 + @AnViewField(table = "score_designer_record_detail", column = "SCORE_TYPE") + private long scoreType; // 9.积分细则ID + @AnViewField(table = "score_designer_record_detail", column = "order_id") + private long orderId; // 10.涉及订单 + @AnViewField(table = "score_designer_record_detail", column = "remark") + private String remark; // 15.备注 + @AnViewField(table = "score_designer_record_detail", column = "create_operator") + private String createOperator; // 2.操作人 + + @AnViewField(table = "score_type", column = "type_name") + private String typeName; // 2.积分细则名称 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public long getRecordId() + { + return recordId; + } + + public void setRecordId(long recordId) + { + this.recordId = recordId; + } + + public String getOperatorCode() + { + return operatorCode; + } + + public void setOperatorCode(String operatorCode) + { + this.operatorCode = operatorCode; + } + + public int getState() + { + return state; + } + + public void setState(int state) + { + this.state = state; + } + + public int getScore() + { + return score; + } + + public void setScore(int score) + { + this.score = score; + } + + public Timestamp getCreateTime() + { + return createTime; + } + + public void setCreateTime(Timestamp createTime) + { + this.createTime = createTime; + } + + public Timestamp getModifyTime() + { + return modifyTime; + } + + public void setModifyTime(Timestamp modifyTime) + { + this.modifyTime = modifyTime; + } + + public long getScoreType() + { + return scoreType; + } + + public void setScoreType(long scoreType) + { + this.scoreType = scoreType; + } + + public long getOrderId() + { + return orderId; + } + + public void setOrderId(long orderId) + { + this.orderId = orderId; + } + + public String getRemark() + { + return remark; + } + + public void setRemark(String remark) + { + this.remark = remark; + } + + public String getTypeName() + { + return typeName; + } + + public void setTypeName(String typeName) + { + this.typeName = typeName; + } + + public String getCreateOperator() + { + return createOperator; + } + + public void setCreateOperator(String createOperator) + { + this.createOperator = createOperator; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/score/ScoreDesignerRecordView.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/score/ScoreDesignerRecordView.java new file mode 100644 index 0000000..10f12c7 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/score/ScoreDesignerRecordView.java @@ -0,0 +1,191 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.score; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnView; +import org.zhiqim.orm.annotation.AnViewField; +import org.zhiqim.orm.annotation.AnViewJoin; +import org.zhiqim.orm.annotation.AnViewJoinValue; + +/** + * 设计师积分总账 + */ +@AnAlias("ScoreDesignerRecordView") +@AnNew +@AnView("score_designer_record,score_type") +@AnViewJoin( +{ + @AnViewJoinValue(type = "LEFT", lTable = "score_designer_record", lColumn = "last_Score_Type", rTable = "score_type", rColumn = "type_id") +}) +public class ScoreDesignerRecordView implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnViewField(table = "score_designer_record", column = "record_id") + private long recordId; // 1.记录id + @AnViewField(table = "score_designer_record", column = "operator_code") + private String operatorCode; // 2.设计师 + @AnViewField(table = "score_designer_record", column = "org_id") + private long orgId; // 3.设计师所在组织id + @AnViewField(table = "score_designer_record", column = "state") + private int state; // 4.状态:0=失效;1=生效; + @AnViewField(table = "score_designer_record", column = "score") + private int score; // 5.得分 + @AnViewField(table = "score_designer_record", column = "CREATE_TIME") + private Timestamp createTime; // 6.创建时间 + @AnViewField(table = "score_designer_record", column = "LAST_MODIFY_TIME") + private Timestamp lastModifyTime; // 7.修改时间 + @AnViewField(table = "score_designer_record", column = "LAST_MODIFY_SCORE") + private int lastModifyScore; // 8.最后更新积分 + @AnViewField(table = "score_designer_record", column = "LAST_SCORE_TYPE") + private long lastScoreType; // 9.最后更新积分细则 + @AnViewField(table = "score_designer_record", column = "order_id") + private long orderId; // 10.涉及订单 + @AnViewField(table = "score_designer_record", column = "remark") + private String remark; // 15.备注 + + @AnViewField(table = "score_type", column = "type_name") + private String typeName; // 2.积分细则名称 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public long getRecordId() + { + return recordId; + } + + public void setRecordId(long recordId) + { + this.recordId = recordId; + } + + public String getOperatorCode() + { + return operatorCode; + } + + public void setOperatorCode(String operatorCode) + { + this.operatorCode = operatorCode; + } + + public long getOrgId() + { + return orgId; + } + + public void setOrgId(long orgId) + { + this.orgId = orgId; + } + + public int getState() + { + return state; + } + + public void setState(int state) + { + this.state = state; + } + + public int getScore() + { + return score; + } + + public void setScore(int score) + { + this.score = score; + } + + public Timestamp getCreateTime() + { + return createTime; + } + + public void setCreateTime(Timestamp createTime) + { + this.createTime = createTime; + } + + public Timestamp getLastModifyTime() + { + return lastModifyTime; + } + + public void setLastModifyTime(Timestamp lastModifyTime) + { + this.lastModifyTime = lastModifyTime; + } + + public int getLastModifyScore() + { + return lastModifyScore; + } + + public void setLastModifyScore(int lastModifyScore) + { + this.lastModifyScore = lastModifyScore; + } + + public long getLastScoreType() + { + return lastScoreType; + } + + public void setLastScoreType(long lastScoreType) + { + this.lastScoreType = lastScoreType; + } + + public long getOrderId() + { + return orderId; + } + + public void setOrderId(long orderId) + { + this.orderId = orderId; + } + + public String getRemark() + { + return remark; + } + + public void setRemark(String remark) + { + this.remark = remark; + } + + public String getTypeName() + { + return typeName; + } + + public void setTypeName(String typeName) + { + this.typeName = typeName; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/score/ScoreType.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/score/ScoreType.java new file mode 100644 index 0000000..1b0fd51 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/score/ScoreType.java @@ -0,0 +1,136 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.score; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 评分细则 对应表《score_type》 + */ +@AnAlias("ScoreType") +@AnNew +@AnTable(table = "score_type", key = "type_id", type = "InnoDB") +public class ScoreType implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "type_id", type = "long", notNull = true) + private long typeId; // 1.类型id + @AnTableField(column = "type_name", type = "string,32", notNull = true) + private String typeName; // 2.类型名称 + @AnTableField(column = "value", type = "int", notNull = true) + private int value; // 3.积分值 + @AnTableField(column = "state", type = "int", notNull = true) + private int state; // 4.状态:0=失效;1=生效; + @AnTableField(column = "remark", type = "string,100", notNull = false) + private String remark; // 5.备注 + @AnTableField(column = "CREATE_TIME", type = "datetime", notNull = true) + private Timestamp createTime; // 56.创建时间 + @AnTableField(column = "MODIFY_TIME", type = "datetime", notNull = false) + private Timestamp modifyTime; // 57.修改时间 + @AnTableField(column = "LAST_OPERATOR_CODE", type = "string,64", notNull = true) + private String lastOperatorCode; // 58.操作人 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public long getTypeId() + { + return typeId; + } + + public void setTypeId(long typeId) + { + this.typeId = typeId; + } + + public String getTypeName() + { + return typeName; + } + + public void setTypeName(String typeName) + { + this.typeName = typeName; + } + + public int getValue() + { + return value; + } + + public void setValue(int value) + { + this.value = value; + } + + public int getState() + { + return state; + } + + public void setState(int state) + { + this.state = state; + } + + public String getRemark() + { + return remark; + } + + public void setRemark(String remark) + { + this.remark = remark; + } + + public Timestamp getCreateTime() + { + return createTime; + } + + public void setCreateTime(Timestamp createTime) + { + this.createTime = createTime; + } + + public Timestamp getModifyTime() + { + return modifyTime; + } + + public void setModifyTime(Timestamp modifyTime) + { + this.modifyTime = modifyTime; + } + + public String getLastOperatorCode() + { + return lastOperatorCode; + } + + public void setLastOperatorCode(String lastOperatorCode) + { + this.lastOperatorCode = lastOperatorCode; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/sms/SmsLog.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/sms/SmsLog.java new file mode 100644 index 0000000..a282ea4 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/sms/SmsLog.java @@ -0,0 +1,125 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.sms; + +import java.io.Serializable; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 短信发送日志表 对应表《SMS_LOG》 + */ +@AnAlias("SmsLog") +@AnNew +@AnTable(table="SMS_LOG", key="LOG_ID", type="InnoDB") +public class SmsLog implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column="LOG_ID", type="long", notNull=true) private long logId; //1.编号 + @AnTableField(column="MOBILE", type="string,20", notNull=true) private String mobile; //2.手机号 + @AnTableField(column="CONTENT", type="string,200", notNull=true) private String content; //3.短信内容 + @AnTableField(column="SEND_TIME", type="string,19", notNull=true) private String sendTime; //4.发送时间 + @AnTableField(column="SEND_STATUS", type="int", notNull=true) private int sendStatus; //5.发送状态,0:成功,1:失败,2:未发送 + @AnTableField(column="DESIGN_ID", type="long", notNull=false) private long designId; //6.订单号 + @AnTableField(column="RET_STATUS", type="int", notNull=false) private int retStatus; //7.报告状态,0:成功,其它失败 + @AnTableField(column="RET_DESC", type="string,100", notNull=false) private String retDesc; //8.报告说明 + + public String toString() + { + return Jsons.toString(this); + } + + public long getLogId() + { + return logId; + } + + public void setLogId(long logId) + { + this.logId = logId; + } + + public String getMobile() + { + return mobile; + } + + public void setMobile(String mobile) + { + this.mobile = mobile; + } + + public String getContent() + { + return content; + } + + public void setContent(String content) + { + this.content = content; + } + + public String getSendTime() + { + return sendTime; + } + + public void setSendTime(String sendTime) + { + this.sendTime = sendTime; + } + + public int getSendStatus() + { + return sendStatus; + } + + public void setSendStatus(int sendStatus) + { + this.sendStatus = sendStatus; + } + + public long getDesignId() + { + return designId; + } + + public void setDesignId(long designId) + { + this.designId = designId; + } + + public int getRetStatus() + { + return retStatus; + } + + public void setRetStatus(int retStatus) + { + this.retStatus = retStatus; + } + + public String getRetDesc() + { + return retDesc; + } + + public void setRetDesc(String retDesc) + { + this.retDesc = retDesc; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/stat/CheckBackReason.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/stat/CheckBackReason.java new file mode 100644 index 0000000..4bb5c52 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/stat/CheckBackReason.java @@ -0,0 +1,77 @@ +/* + * 版权所有 (C) 2015 知启蒙(WWW.ZHIQIM.COM) 保留所有权利。 + * + * Download http://www.zhiqim.com/fadfox/ 欢迎加盟[凡狐]兴趣小组。 + * + * 由数据库字典自动生成的类文件,修改请使用数据库字典编辑器修改。 + */ +package com.zhiqim.yangcai.design.dbo.stat; + +import java.io.Serializable; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 印前原因预录 对应表《CHECK_BACK_REASON》 + */ +@AnAlias("CheckBackReason") +@AnNew +@AnTable(table="CHECK_BACK_REASON", key="REASON_ID", type="InnoDB") +public class CheckBackReason implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column="REASON_ID", type="long", notNull=true) private long reasonId; //1.原因编号 + @AnTableField(column="IS_REASON_TYPE", type="boolean", notNull=true) private boolean isReasonType; //2.1 原因分类 0具体原因项 + @AnTableField(column="REASON_PARENT", type="long", notNull=true) private long reasonParent; //3.具体原因项 所属分类 + @AnTableField(column="REASON_TEXT", type="string,200", notNull=true) private String reasonText; //4.原因内容 + + public String toString() + { + return Jsons.toString(this); + } + + public long getReasonId() + { + return reasonId; + } + + public void setReasonId(long reasonId) + { + this.reasonId = reasonId; + } + + public boolean isReasonType() + { + return isReasonType; + } + + public void setReasonType(boolean isReasonType) + { + this.isReasonType = isReasonType; + } + + public long getReasonParent() + { + return reasonParent; + } + + public void setReasonParent(long reasonParent) + { + this.reasonParent = reasonParent; + } + + public String getReasonText() + { + return reasonText; + } + + public void setReasonText(String reasonText) + { + this.reasonText = reasonText; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/stat/CompleteOrderStat.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/stat/CompleteOrderStat.java new file mode 100644 index 0000000..b5c7eba --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/stat/CompleteOrderStat.java @@ -0,0 +1,135 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.dbo.stat; + +import java.io.Serializable; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 定稿统计表 对应表《COMPLETE_ORDER_STAT》 + */ +@AnAlias("CompleteOrderStat") +@AnNew +@AnTable(table = "COMPLETE_ORDER_STAT", key = "DESIGNER,COMPLETE_DATE", type = "InnoDB") +public class CompleteOrderStat implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "DESIGNER", type = "string,64", notNull = true) + private String designer; // 1.设计师 + @AnTableField(column = "COMPLETE_DATE", type = "string,19", notNull = true) + private String completeDate; // 2.定稿日期 + @AnTableField(column = "ORDER_PASS_ID", type = "string,5000", notNull = false) + private String orderPassId; // 3.定稿审核通过编号,多个用逗号隔开 + @AnTableField(column = "ORDER_BACK_ID", type = "string,500", notNull = false) + private String orderBackId; // 4.定稿审核退回编号,多个用逗号隔开 + @AnTableField(column = "ORDER_PASS_SUM", type = "int", notNull = true) + private int orderPassSum; // 5.定稿审核通过总数(次数) + @AnTableField(column = "ORDER_BACK_SUM", type = "int", notNull = true) + private int orderBackSum; // 6.定稿审核退回总数(次数) + @AnTableField(column = "PASS_CONVERT_SUM", type = "decimal,15,1", notNull = true) + private double passConvertSum; // 7.定稿审核通过折算总数 + @AnTableField(column = "BACK_CONVERT_SUM", type = "decimal,15,1", notNull = true) + private double backConvertSum; // 8.定稿审核退回折算总数 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public String getDesigner() + { + return designer; + } + + public void setDesigner(String designer) + { + this.designer = designer; + } + + public String getCompleteDate() + { + return completeDate; + } + + public void setCompleteDate(String completeDate) + { + this.completeDate = completeDate; + } + + public String getOrderPassId() + { + return orderPassId; + } + + public void setOrderPassId(String orderPassId) + { + this.orderPassId = orderPassId; + } + + public String getOrderBackId() + { + return orderBackId; + } + + public void setOrderBackId(String orderBackId) + { + this.orderBackId = orderBackId; + } + + public int getOrderPassSum() + { + return orderPassSum; + } + + public void setOrderPassSum(int orderPassSum) + { + this.orderPassSum = orderPassSum; + } + + public int getOrderBackSum() + { + return orderBackSum; + } + + public void setOrderBackSum(int orderBackSum) + { + this.orderBackSum = orderBackSum; + } + + public double getPassConvertSum() + { + return passConvertSum; + } + + public void setPassConvertSum(double passConvertSum) + { + this.passConvertSum = passConvertSum; + } + + public double getBackConvertSum() + { + return backConvertSum; + } + + public void setBackConvertSum(double backConvertSum) + { + this.backConvertSum = backConvertSum; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/stat/DesignGroup.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/stat/DesignGroup.java new file mode 100644 index 0000000..465a536 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/stat/DesignGroup.java @@ -0,0 +1,104 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.stat; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 设计组表 对应表《DESIGN_GROUP》 + */ +@AnAlias("DesignGroup") +@AnNew +@AnTable(table="DESIGN_GROUP", key="GROUP_ID", type="InnoDB") +public class DesignGroup implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column="GROUP_ID", type="long", notNull=true) private long groupId; //1.设计组编号 + @AnTableField(column="ORG_ID", type="long", notNull=true) private long orgId; //2.组织编号 + @AnTableField(column="GROUP_NAME", type="string,200", notNull=true) private String groupName; //3.设计组名称 + @AnTableField(column="GROUP_LEADER", type="string,64", notNull=true) private String groupLeader; //4.组长 + @AnTableField(column="GROUP_SEQ", type="int", notNull=true) private int groupSeq; //5.排序数 + @AnTableField(column="CREATE_TIME", type="datetime", notNull=true) private Timestamp createTime; //6.创建时间 + + public String toString() + { + return Jsons.toString(this); + } + + public long getGroupId() + { + return groupId; + } + + public void setGroupId(long groupId) + { + this.groupId = groupId; + } + + public long getOrgId() + { + return orgId; + } + + public void setOrgId(long orgId) + { + this.orgId = orgId; + } + + public String getGroupName() + { + return groupName; + } + + public void setGroupName(String groupName) + { + this.groupName = groupName; + } + + public String getGroupLeader() + { + return groupLeader; + } + + public void setGroupLeader(String groupLeader) + { + this.groupLeader = groupLeader; + } + + public int getGroupSeq() + { + return groupSeq; + } + + public void setGroupSeq(int groupSeq) + { + this.groupSeq = groupSeq; + } + + public Timestamp getCreateTime() + { + return createTime; + } + + public void setCreateTime(Timestamp createTime) + { + this.createTime = createTime; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/stat/DesignerOrderPerformanceStat.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/stat/DesignerOrderPerformanceStat.java new file mode 100644 index 0000000..aed6ab5 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/stat/DesignerOrderPerformanceStat.java @@ -0,0 +1,190 @@ +/** + * 扬彩印刷设计 + * 文件名 :DesignerPerformanceStat.java + * 创建人 :gjx + * 创建时间:2021年3月8日 +*/ + +package com.zhiqim.yangcai.design.dbo.stat; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * + * [简要描述]: 设计师订单绩效表
+ * [详细描述]:
+ * + * @version 1.0 @author gjx 2021年3月8日 新建与整理 + */ +@AnAlias("DesignerOrderPerformanceStat") +@AnNew +@AnTable(table = "DESIGNER_ORDER_PERFORMANCE_STAT", key = "DESIGN_ID", type = "InnoDB") +public class DesignerOrderPerformanceStat implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "DESIGN_ID", type = "long", notNull = true) + private long designId; // 订单编号 + @AnTableField(column = "DESIGNER", type = "string,20", notNull = true) + private String designer; // 设计师 + @AnTableField(column = "ORG_ID", type = "long", notNull = true) + private long orgId; // 组织编号 + @AnTableField(column = "PRINT_KS", type = "int", notNull = true) + private int printKs;// 款数 + @AnTableField(column = "TEMPLATE_DRAFT_FEE", type = "long", notNull = true) + private long templateDraftFee;// 改稿根据产品单价配置得出(改稿单价*款数) + @AnTableField(column = "PRD_CONVERT_FEE", type = "long", notNull = true) + private long prdConvertFee;// 产品单价 + @AnTableField(column = "MULTI_KS_FEE", type = "long", notNull = true) + private long multiKsFee;// 多款费用 + @AnTableField(column = "MULTI_MS_FEE", type = "long", notNull = true) + private long multiMsFee;// 多模费用 + @AnTableField(column = "DESIGN_COPIES", type = "int", notNull = true) + private int designCopies;// 设计份数 + @AnTableField(column = "ORDER_DESIGNER_FEE", type = "long", notNull = true) + private long orderDesignerFee;// 订单设计师费用 + @AnTableField(column = "DESIGN_END_TIME", type = "datetime", notNull = true) + private Timestamp designEndTime; // 设计师定稿时间 + @AnTableField(column = "ADD_TIME", type = "datetime", notNull = true) + private Timestamp addTime; // 添加时间 + + public DesignerOrderPerformanceStat() + { + + } + + public DesignerOrderPerformanceStat(long designId, String designer, long orgId) + { + super(); + this.designId = designId; + this.designer = designer; + this.orgId = orgId; + } + + public long getDesignId() + { + return designId; + } + + public void setDesignId(long designId) + { + this.designId = designId; + } + + public String getDesigner() + { + return designer; + } + + public void setDesigner(String designer) + { + this.designer = designer; + } + + public long getOrgId() + { + return orgId; + } + + public void setOrgId(long orgId) + { + this.orgId = orgId; + } + + public int getPrintKs() + { + return printKs; + } + + public void setPrintKs(int printKs) + { + this.printKs = printKs; + } + + public long getTemplateDraftFee() + { + return templateDraftFee; + } + + public void setTemplateDraftFee(long templateDraftFee) + { + this.templateDraftFee = templateDraftFee; + } + + public long getPrdConvertFee() + { + return prdConvertFee; + } + + public void setPrdConvertFee(long prdConvertFee) + { + this.prdConvertFee = prdConvertFee; + } + + public long getMultiKsFee() + { + return multiKsFee; + } + + public void setMultiKsFee(long multiKsFee) + { + this.multiKsFee = multiKsFee; + } + + public long getMultiMsFee() + { + return multiMsFee; + } + + public void setMultiMsFee(long multiMsFee) + { + this.multiMsFee = multiMsFee; + } + + public int getDesignCopies() + { + return designCopies; + } + + public void setDesignCopies(int designCopies) + { + this.designCopies = designCopies; + } + + public long getOrderDesignerFee() + { + return orderDesignerFee; + } + + public void setOrderDesignerFee(long orderDesignerFee) + { + this.orderDesignerFee = orderDesignerFee; + } + + public Timestamp getDesignEndTime() + { + return designEndTime; + } + + public void setDesignEndTime(Timestamp designEndTime) + { + this.designEndTime = designEndTime; + } + + public Timestamp getAddTime() + { + return addTime; + } + + public void setAddTime(Timestamp addTime) + { + this.addTime = addTime; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/stat/GroupMembers.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/stat/GroupMembers.java new file mode 100644 index 0000000..345a980 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/stat/GroupMembers.java @@ -0,0 +1,94 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.stat; + +import java.io.Serializable; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 人员调度表 对应表《GROUP_MEMBERS》 + */ +@AnAlias("GroupMembers") +@AnNew +@AnTable(table="GROUP_MEMBERS", key="START_DATE,USER_CODE", type="InnoDB") +@AnIndex({@AnIndexValue(name="IX_GROUP_ID", column="GROUP_ID", unique=false), + @AnIndexValue(name="IX_START_DATE_END_DATE", column="START_DATE,END_DATE", unique=false)}) +public class GroupMembers implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column="START_DATE", type="string,64", notNull=true) private String startDate; //1.调控时期 + @AnTableField(column="USER_CODE", type="string,100", notNull=true) private String userCode; //2.操作员 + @AnTableField(column="END_DATE", type="string,32", notNull=false) private String endDate; //3.调控结束时间,格式yyyy-MM-dd + @AnTableField(column="GROUP_ID", type="long", notNull=true) private long groupId; //4.组编号 + @AnTableField(column="IS_GROUP_LEADER", type="int", notNull=true) private int isGroupLeader; //5.是否为组长 0=组员, 1=组长 + + public String toString() + { + return Jsons.toString(this); + } + + public String getStartDate() + { + return startDate; + } + + public void setStartDate(String startDate) + { + this.startDate = startDate; + } + + public String getUserCode() + { + return userCode; + } + + public void setUserCode(String userCode) + { + this.userCode = userCode; + } + + public String getEndDate() + { + return endDate; + } + + public void setEndDate(String endDate) + { + this.endDate = endDate; + } + + public long getGroupId() + { + return groupId; + } + + public void setGroupId(long groupId) + { + this.groupId = groupId; + } + + public int getIsGroupLeader() + { + return isGroupLeader; + } + + public void setIsGroupLeader(int isGroupLeader) + { + this.isGroupLeader = isGroupLeader; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/stat/OrderConvert.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/stat/OrderConvert.java new file mode 100644 index 0000000..e5df8ff --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/stat/OrderConvert.java @@ -0,0 +1,126 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.stat; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 订单折算配置表 对应表《ORDER_CONVERT》 + */ +@AnAlias("OrderConvert") +@AnNew +@AnTable(table="ORDER_CONVERT", key="CONVERT_ID", type="InnoDB") +public class OrderConvert implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column="CONVERT_ID", type="long", notNull=true) private long convertId; //1.订单折算id + @AnTableField(column="CONVERT_TYPE", type="int", notNull=true) private int convertType; //2.订单折算类型,0不启用,1金额,2系数 + @AnTableField(column="CONVERT_NUM", type="decimal,10,2", notNull=true) private double convertNum; //3.订单折算系数 + @AnTableField(column="PRD_TYPE_ID", type="long", notNull=true) private long prdTypeId; //4.产品类型id + @AnTableField(column="PRD_TYPE_NAME", type="string,32", notNull=true) private String prdTypeName; //5.产品类型名称 + @AnTableField(column="CONVERT_MODULUS", type="string,500", notNull=true) private String convertModulus; //6.折算模数,最小为2模,模数唯一 + @AnTableField(column="CONVERT_MODULUS_NUM", type="string,500", notNull=true) private String convertModulusNum; //7.模数折算系数 + @AnTableField(column="MODIFY_TIME", type="datetime", notNull=true) private Timestamp modifyTime; //8.最后修改时间 + + public String toString() + { + return Jsons.toString(this); + } + + public long getConvertId() + { + return convertId; + } + + public void setConvertId(long convertId) + { + this.convertId = convertId; + } + + public int getConvertType() + { + return convertType; + } + + public void setConvertType(int convertType) + { + this.convertType = convertType; + } + + public double getConvertNum() + { + return convertNum; + } + + public void setConvertNum(double convertNum) + { + this.convertNum = convertNum; + } + + public long getPrdTypeId() + { + return prdTypeId; + } + + public void setPrdTypeId(long prdTypeId) + { + this.prdTypeId = prdTypeId; + } + + public String getPrdTypeName() + { + return prdTypeName; + } + + public void setPrdTypeName(String prdTypeName) + { + this.prdTypeName = prdTypeName; + } + + public String getConvertModulus() + { + return convertModulus; + } + + public void setConvertModulus(String convertModulus) + { + this.convertModulus = convertModulus; + } + + public String getConvertModulusNum() + { + return convertModulusNum; + } + + public void setConvertModulusNum(String convertModulusNum) + { + this.convertModulusNum = convertModulusNum; + } + + public Timestamp getModifyTime() + { + return modifyTime; + } + + public void setModifyTime(Timestamp modifyTime) + { + this.modifyTime = modifyTime; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/stat/OrderTypeStat.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/stat/OrderTypeStat.java new file mode 100644 index 0000000..66ced49 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/stat/OrderTypeStat.java @@ -0,0 +1,257 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.stat; + +import java.io.Serializable; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 订单类型统计表 对应表《ORDER_TYPE_STAT》 + */ +@AnAlias("OrderTypeStat") +@AnNew +@AnTable(table="ORDER_TYPE_STAT", key="DESIGNER,DATE", type="InnoDB") +public class OrderTypeStat implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column="DESIGNER", type="string,64", notNull=true) private String designer; //1.设计师 + @AnTableField(column="DATE", type="string,19", notNull=true) private String date; //2.统计日期 + @AnTableField(column="ORG_ID", type="long", notNull=true) private long orgId; //3.设计师所属组织,方便查询 + @AnTableField(column="ORDER_SUM", type="int", notNull=true) private int orderSum; //4.订单完成总数 + @AnTableField(column="MULTIPLE3_5", type="int", notNull=true) private int multiple35; //5.3-5款订单数量 + @AnTableField(column="MULTIPLE6_8", type="int", notNull=true) private int multiple68; //6.6-8款订单数量 + @AnTableField(column="MULTIPLE9_11", type="int", notNull=true) private int multiple911; //7.9-11款订单数量 + @AnTableField(column="MULTIPLE12", type="int", notNull=true) private int multiple12; //8.12款以上订单数量 + @AnTableField(column="NORMAL_PROCESSING", type="int", notNull=true) private int normalProcessing; //9.常规后加工订单数量 + @AnTableField(column="SPECIAL_PROCESSING", type="int", notNull=true) private int specialProcessing; //10.特殊后加工订单数量 + @AnTableField(column="APPLY_ORDER", type="int", notNull=true) private int applyOrder; //11.支援订单数量 + @AnTableField(column="AMOUNT100_150", type="int", notNull=true) private int amount100150; //12.大金额(100-150,左闭右开)订单数量 + @AnTableField(column="AMOUNT150_200", type="int", notNull=true) private int amount150200; //13.大金额(150-200,左闭右开)订单数量 + @AnTableField(column="AMOUNT200_250", type="int", notNull=true) private int amount200250; //14.大金额(200-250,左闭右开)订单数量 + @AnTableField(column="AMOUNT250_300", type="int", notNull=true) private int amount250300; //15.大金额(250_300,左闭右开)订单数量 + @AnTableField(column="AMOUNT300_350", type="int", notNull=true) private int amount300350; //16.大金额(300-350,左闭右开)订单数量 + @AnTableField(column="AMOUNT350_400", type="int", notNull=true) private int amount350400; //17.大金额(350-400,左闭右开)订单数量 + @AnTableField(column="AMOUNT400_450", type="int", notNull=true) private int amount400450; //18.大金额(400-450,左闭右开)订单数量 + @AnTableField(column="AMOUNT450_500", type="int", notNull=true) private int amount450500; //19.大金额(450-500,左闭右开)订单数量 + @AnTableField(column="AMOUNT500", type="int", notNull=true) private int amount500; //20.大金额(500以上)订单数量 + + public String toString() + { + return Jsons.toString(this); + } + + public String getDesigner() + { + return designer; + } + + public void setDesigner(String designer) + { + this.designer = designer; + } + + public String getDate() + { + return date; + } + + public void setDate(String date) + { + this.date = date; + } + + public long getOrgId() + { + return orgId; + } + + public void setOrgId(long orgId) + { + this.orgId = orgId; + } + + public int getOrderSum() + { + return orderSum; + } + + public void setOrderSum(int orderSum) + { + this.orderSum = orderSum; + } + + public int getMultiple35() + { + return multiple35; + } + + public void setMultiple35(int multiple35) + { + this.multiple35 = multiple35; + } + + public int getMultiple68() + { + return multiple68; + } + + public void setMultiple68(int multiple68) + { + this.multiple68 = multiple68; + } + + public int getMultiple911() + { + return multiple911; + } + + public void setMultiple911(int multiple911) + { + this.multiple911 = multiple911; + } + + public int getMultiple12() + { + return multiple12; + } + + public void setMultiple12(int multiple12) + { + this.multiple12 = multiple12; + } + + public int getNormalProcessing() + { + return normalProcessing; + } + + public void setNormalProcessing(int normalProcessing) + { + this.normalProcessing = normalProcessing; + } + + public int getSpecialProcessing() + { + return specialProcessing; + } + + public void setSpecialProcessing(int specialProcessing) + { + this.specialProcessing = specialProcessing; + } + + public int getApplyOrder() + { + return applyOrder; + } + + public void setApplyOrder(int applyOrder) + { + this.applyOrder = applyOrder; + } + + public int getAmount100150() + { + return amount100150; + } + + public void setAmount100150(int amount100150) + { + this.amount100150 = amount100150; + } + + public int getAmount150200() + { + return amount150200; + } + + public void setAmount150200(int amount150200) + { + this.amount150200 = amount150200; + } + + public int getAmount200250() + { + return amount200250; + } + + public void setAmount200250(int amount200250) + { + this.amount200250 = amount200250; + } + + public int getAmount250300() + { + return amount250300; + } + + public void setAmount250300(int amount250300) + { + this.amount250300 = amount250300; + } + + public int getAmount300350() + { + return amount300350; + } + + public void setAmount300350(int amount300350) + { + this.amount300350 = amount300350; + } + + public int getAmount350400() + { + return amount350400; + } + + public void setAmount350400(int amount350400) + { + this.amount350400 = amount350400; + } + + public int getAmount400450() + { + return amount400450; + } + + public void setAmount400450(int amount400450) + { + this.amount400450 = amount400450; + } + + public int getAmount450500() + { + return amount450500; + } + + public void setAmount450500(int amount450500) + { + this.amount450500 = amount450500; + } + + public int getAmount500() + { + return amount500; + } + + public void setAmount500(int amount500) + { + this.amount500 = amount500; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/stat/PerformanceParam.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/stat/PerformanceParam.java new file mode 100644 index 0000000..caf1fe2 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/stat/PerformanceParam.java @@ -0,0 +1,202 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.stat; + +import java.io.Serializable; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 设计绩效参数表,上线日志表 对应表《PERFORMANCE_PARAM》 + */ +@AnAlias("PerformanceParam") +@AnNew +@AnTable(table="PERFORMANCE_PARAM", key="VALID_DATE,ORG_ID,PRICE_TYPE", type="InnoDB") +public class PerformanceParam implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column="VALID_DATE", type="string,32", notNull=true) private String validDate; //1.数据生效日期,数据格式 yyyy-MM-dd + @AnTableField(column="ORG_ID", type="long", notNull=true) private long orgId; //2.组织编号 + @AnTableField(column="PRICE_TYPE", type="int", notNull=true) private int priceType; //3.单价类型0=设计师,1=设计组 + @AnTableField(column="PRICE_LEVEL_1", type="long", notNull=true) private long priceLevel1; //4.一级对应单价 + @AnTableField(column="PRICE_LEVEL_2", type="long", notNull=true) private long priceLevel2; //5.二级对应单价 + @AnTableField(column="PRICE_LEVEL_3", type="long", notNull=true) private long priceLevel3; //6.三级对应单价 + @AnTableField(column="PRICE_LEVEL_4", type="long", notNull=true) private long priceLevel4; //7.四级对应单价 + @AnTableField(column="PRICE_LEVEL_5", type="long", notNull=true) private long priceLevel5; //8.五级对应单价 + @AnTableField(column="PRICE_LEVEL_6", type="long", notNull=true) private long priceLevel6; //9.六级对应单价 + @AnTableField(column="LEVEL_1_MAX_COUNT", type="int", notNull=true) private int level1MaxCount; //10.一级单数上限 + @AnTableField(column="LEVEL_2_MAX_COUNT", type="int", notNull=true) private int level2MaxCount; //11.二级单数上限 + @AnTableField(column="LEVEL_3_MAX_COUNT", type="int", notNull=true) private int level3MaxCount; //12.三级单数上限 + @AnTableField(column="LEVEL_4_MAX_COUNT", type="int", notNull=true) private int level4MaxCount; //13.四级单数上限 + @AnTableField(column="LEVEL_5_MAX_COUNT", type="int", notNull=true) private int level5MaxCount; //14.五级单数上限 + @AnTableField(column="LEVEL_6_MAX_COUNT", type="int", notNull=true) private int level6MaxCount; //15.六级单数上限 + + public String toString() + { + return Jsons.toString(this); + } + + public String getValidDate() + { + return validDate; + } + + public void setValidDate(String validDate) + { + this.validDate = validDate; + } + + public long getOrgId() + { + return orgId; + } + + public void setOrgId(long orgId) + { + this.orgId = orgId; + } + + public int getPriceType() + { + return priceType; + } + + public void setPriceType(int priceType) + { + this.priceType = priceType; + } + + public long getPriceLevel1() + { + return priceLevel1; + } + + public void setPriceLevel1(long priceLevel1) + { + this.priceLevel1 = priceLevel1; + } + + public long getPriceLevel2() + { + return priceLevel2; + } + + public void setPriceLevel2(long priceLevel2) + { + this.priceLevel2 = priceLevel2; + } + + public long getPriceLevel3() + { + return priceLevel3; + } + + public void setPriceLevel3(long priceLevel3) + { + this.priceLevel3 = priceLevel3; + } + + public long getPriceLevel4() + { + return priceLevel4; + } + + public void setPriceLevel4(long priceLevel4) + { + this.priceLevel4 = priceLevel4; + } + + public long getPriceLevel5() + { + return priceLevel5; + } + + public void setPriceLevel5(long priceLevel5) + { + this.priceLevel5 = priceLevel5; + } + + public long getPriceLevel6() + { + return priceLevel6; + } + + public void setPriceLevel6(long priceLevel6) + { + this.priceLevel6 = priceLevel6; + } + + public int getLevel1MaxCount() + { + return level1MaxCount; + } + + public void setLevel1MaxCount(int level1MaxCount) + { + this.level1MaxCount = level1MaxCount; + } + + public int getLevel2MaxCount() + { + return level2MaxCount; + } + + public void setLevel2MaxCount(int level2MaxCount) + { + this.level2MaxCount = level2MaxCount; + } + + public int getLevel3MaxCount() + { + return level3MaxCount; + } + + public void setLevel3MaxCount(int level3MaxCount) + { + this.level3MaxCount = level3MaxCount; + } + + public int getLevel4MaxCount() + { + return level4MaxCount; + } + + public void setLevel4MaxCount(int level4MaxCount) + { + this.level4MaxCount = level4MaxCount; + } + + public int getLevel5MaxCount() + { + return level5MaxCount; + } + + public void setLevel5MaxCount(int level5MaxCount) + { + this.level5MaxCount = level5MaxCount; + } + + public int getLevel6MaxCount() + { + return level6MaxCount; + } + + public void setLevel6MaxCount(int level6MaxCount) + { + this.level6MaxCount = level6MaxCount; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/stat/PerformanceStatistics.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/stat/PerformanceStatistics.java new file mode 100644 index 0000000..a12e6b4 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/stat/PerformanceStatistics.java @@ -0,0 +1,231 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.dbo.stat; + +import java.io.Serializable; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 绩效统计表 对应表《PERFORMANCE_STATISTICS》 + */ +@AnAlias("PerformanceStatistics") +@AnNew +@AnTable(table = "PERFORMANCE_STATISTICS", key = "STAT_DATE,DESIGNER", type = "InnoDB") +public class PerformanceStatistics implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "STAT_DATE", type = "string,12", notNull = true) + private String statDate; // 1.统计日期 + @AnTableField(column = "DESIGNER", type = "string,64", notNull = true) + private String designer; // 2.设计师 + @AnTableField(column = "IS_GROUP_LEADER", type = "byte", notNull = true) + private int isGroupLeader; // 3.0表示设计师,1表示设计组长 + @AnTableField(column = "DESIGN_COMPLETE_SUM", type = "decimal,15,1", notNull = true) + private double designCompleteSum; // 4.设计定稿折算单数 + @AnTableField(column = "DESIGN_AMOUNT", type = "long", notNull = true) + private long designAmount; // 5.设计绩效金额 + @AnTableField(column = "ORDER_TYPE_SUM", type = "int", notNull = true) + private int orderTypeSum; // 6.订单类型单数 + @AnTableField(column = "ORDER_TYPE_AMOUNT", type = "long", notNull = true) + private long orderTypeAmount; // 7.订单类型绩效金额 + @AnTableField(column = "REFUND_SUM", type = "int", notNull = true) + private int refundSum; // 8.退款单数 + @AnTableField(column = "DESIGN_COUNT", type = "int", notNull = true) + private int designCount; // 9.设计总单数 + @AnTableField(column = "REFUND_RATE", type = "long", notNull = true) + private long refundRate; // 10.退款率 + @AnTableField(column = "REFUND_AMOUNT", type = "long", notNull = true) + private long refundAmount; // 11.退款绩效统计 + @AnTableField(column = "AFTER_COUNT", type = "int", notNull = false) + private int afterCount; // 12.售后单数 + @AnTableField(column = "AFTER_LOSS_AMOUNT", type = "long", notNull = true) + private long afterLossAmount; // 13.售后损失总金额 + @AnTableField(column = "AFTER_LOSS_AMOUNT_CANCELED", type = "long", notNull = true) + private long afterLossAmountCanceled; // 14.售后取消&售后审核通过的售后损失金额 + @AnTableField(column = "QC_SCORE", type = "decimal,5,2", notNull = false) + private double qcScore; // 15.质检分数 + @AnTableField(column = "QC_AMOUNT", type = "long", notNull = false) + private long qcAmount; // 16.质检金额 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public String getStatDate() + { + return statDate; + } + + public void setStatDate(String statDate) + { + this.statDate = statDate; + } + + public String getDesigner() + { + return designer; + } + + public void setDesigner(String designer) + { + this.designer = designer; + } + + public int getIsGroupLeader() + { + return isGroupLeader; + } + + public void setIsGroupLeader(int isGroupLeader) + { + this.isGroupLeader = isGroupLeader; + } + + public double getDesignCompleteSum() + { + return designCompleteSum; + } + + public void setDesignCompleteSum(double designCompleteSum) + { + this.designCompleteSum = designCompleteSum; + } + + public long getDesignAmount() + { + return designAmount; + } + + public void setDesignAmount(long designAmount) + { + this.designAmount = designAmount; + } + + public int getOrderTypeSum() + { + return orderTypeSum; + } + + public void setOrderTypeSum(int orderTypeSum) + { + this.orderTypeSum = orderTypeSum; + } + + public long getOrderTypeAmount() + { + return orderTypeAmount; + } + + public void setOrderTypeAmount(long orderTypeAmount) + { + this.orderTypeAmount = orderTypeAmount; + } + + public int getRefundSum() + { + return refundSum; + } + + public void setRefundSum(int refundSum) + { + this.refundSum = refundSum; + } + + public int getDesignCount() + { + return designCount; + } + + public void setDesignCount(int designCount) + { + this.designCount = designCount; + } + + public long getRefundRate() + { + return refundRate; + } + + public void setRefundRate(long refundRate) + { + this.refundRate = refundRate; + } + + public long getRefundAmount() + { + return refundAmount; + } + + public void setRefundAmount(long refundAmount) + { + this.refundAmount = refundAmount; + } + + public int getAfterCount() + { + return afterCount; + } + + public void setAfterCount(int afterCount) + { + this.afterCount = afterCount; + } + + public long getAfterLossAmount() + { + return afterLossAmount; + } + + public void setAfterLossAmount(long afterLossAmount) + { + this.afterLossAmount = afterLossAmount; + } + + public long getAfterLossAmountCanceled() + { + return afterLossAmountCanceled; + } + + public void setAfterLossAmountCanceled(long afterLossAmountCanceled) + { + this.afterLossAmountCanceled = afterLossAmountCanceled; + } + + public double getQcScore() + { + return qcScore; + } + + public void setQcScore(double qcScore) + { + this.qcScore = qcScore; + } + + public long getQcAmount() + { + return qcAmount; + } + + public void setQcAmount(long qcAmount) + { + this.qcAmount = qcAmount; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/stat/PrdFeePercentage.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/stat/PrdFeePercentage.java new file mode 100644 index 0000000..cc33193 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/stat/PrdFeePercentage.java @@ -0,0 +1,112 @@ +package com.zhiqim.yangcai.design.dbo.stat; + +/** + * + * [简要描述]:提成系数Model
+ * [详细描述]:
+ * + * @version 1.0 @author gjx 2019-11-21 新建与整理 + */ +public class PrdFeePercentage +{ + private long deptId; // 1.部门ID + private long prdTypeId; // 2.产品类型 + private int feeValid; // 3.规定时间,单位分钟 + private int feeHigh; // 4.高提成,单位‰(千分制) + private int feeLow; // 5.低提成,单位‰(千分制) + private int feeDisabled; // 6.失效时间,单位分钟 + private int feeType; // 7.计费类型,0:按单量,1:按比例, + private long feeDiscountAmount; // 8.折算金额,单位分 + private int feeDiscountMethod; // 9.折算方式,0:不启用,1:金额,2:系数 + + public long getDeptId() + { + return deptId; + } + + public void setDeptId(long deptId) + { + this.deptId = deptId; + } + + public long getPrdTypeId() + { + return prdTypeId; + } + + public void setPrdTypeId(long prdTypeId) + { + this.prdTypeId = prdTypeId; + } + + public int getFeeValid() + { + return feeValid; + } + + public void setFeeValid(int feeValid) + { + this.feeValid = feeValid; + } + + public int getFeeHigh() + { + return feeHigh; + } + + public void setFeeHigh(int feeHigh) + { + this.feeHigh = feeHigh; + } + + public int getFeeLow() + { + return feeLow; + } + + public void setFeeLow(int feeLow) + { + this.feeLow = feeLow; + } + + public int getFeeDisabled() + { + return feeDisabled; + } + + public void setFeeDisabled(int feeDisabled) + { + this.feeDisabled = feeDisabled; + } + + public int getFeeType() + { + return feeType; + } + + public void setFeeType(int feeType) + { + this.feeType = feeType; + } + + public long getFeeDiscountAmount() + { + return feeDiscountAmount; + } + + public void setFeeDiscountAmount(long feeDiscountAmount) + { + this.feeDiscountAmount = feeDiscountAmount; + } + + public int getFeeDiscountMethod() + { + return feeDiscountMethod; + } + + public void setFeeDiscountMethod(int feeDiscountMethod) + { + this.feeDiscountMethod = feeDiscountMethod; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/stat/QcPerformanceParam.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/stat/QcPerformanceParam.java new file mode 100644 index 0000000..c39ecc0 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/stat/QcPerformanceParam.java @@ -0,0 +1,133 @@ +/** + * 扬彩印刷设计 + * 文件名 :QcPerformanceParam.java + * 创建人 :gjx + * 创建时间:2019-9-4 + */ + +package com.zhiqim.yangcai.design.dbo.stat; + +import java.io.Serializable; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 质检绩效参数 + * + * @version 1.0 @author gjx 2019-9-4 新建与整理 + */ +@AnAlias("QcPerformanceParam") +@AnNew +@AnTable(table = "QC_PERFORMANCE_PARAM", key = "QC_PERFORMANCE_ID", type = "InnoDB") +public class QcPerformanceParam implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "QC_PERFORMANCE_ID", type = "long", notNull = true) + private long qcPerformanceId; // 1. 质检绩效参数编号 + @AnTableField(column = "STANDARD_QC_SCORE", type = "long", notNull = true) + private long standardQcScore; // 2. 标准质检分数 + @AnTableField(column = "REWARD_SCORE", type = "long", notNull = true) + private long rewardScore; // 3.奖励分 + @AnTableField(column = "PUNISH_SCORE", type = "long", notNull = true) + private long punishScore; // 4.扣罚分 + @AnTableField(column = "REWARD_AMOUNT", type = "long", notNull = true) + private long rewardAmount; // 5.奖励金额(单位元) + @AnTableField(column = "PUNISH_AMOUNT", type = "long", notNull = true) + private long punishAmount; // 6.扣罚金额(单位元) + @AnTableField(column = "REWARD_AMOUNT_MAX", type = "long", notNull = true) + private long rewardAmountMax; // 7.最大奖励金额(单位元) + @AnTableField(column = "PUNISH_AMOUNT_MAX", type = "long", notNull = true) + private long punishAmountMax; // 8.最大扣罚金额(单位元) + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public long getQcPerformanceId() + { + return qcPerformanceId; + } + + public void setQcPerformanceId(long qcPerformanceId) + { + this.qcPerformanceId = qcPerformanceId; + } + + public long getStandardQcScore() + { + return standardQcScore; + } + + public void setStandardQcScore(long standardQcScore) + { + this.standardQcScore = standardQcScore; + } + + public long getRewardScore() + { + return rewardScore; + } + + public void setRewardScore(long rewardScore) + { + this.rewardScore = rewardScore; + } + + public long getPunishScore() + { + return punishScore; + } + + public void setPunishScore(long punishScore) + { + this.punishScore = punishScore; + } + + public long getRewardAmount() + { + return rewardAmount; + } + + public void setRewardAmount(long rewardAmount) + { + this.rewardAmount = rewardAmount; + } + + public long getPunishAmount() + { + return punishAmount; + } + + public void setPunishAmount(long punishAmount) + { + this.punishAmount = punishAmount; + } + + public long getRewardAmountMax() + { + return rewardAmountMax; + } + + public void setRewardAmountMax(long rewardAmountMax) + { + this.rewardAmountMax = rewardAmountMax; + } + + public long getPunishAmountMax() + { + return punishAmountMax; + } + + public void setPunishAmountMax(long punishAmountMax) + { + this.punishAmountMax = punishAmountMax; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/stat/RefundParameter.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/stat/RefundParameter.java new file mode 100644 index 0000000..1772899 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/stat/RefundParameter.java @@ -0,0 +1,147 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.stat; + +import java.io.Serializable; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 退款参数表 对应表《REFUND_PARAMETER》 + */ +@AnAlias("RefundParameter") +@AnNew +@AnTable(table="REFUND_PARAMETER", key="REFUND_PARAMETER_ID", type="InnoDB") +public class RefundParameter implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column="REFUND_PARAMETER_ID", type="long", notNull=true) private long refundParameterId; //1.退款参数编号 + @AnTableField(column="STANDARD_REFUND_RATE_FLOOR", type="long", notNull=true) private long standardRefundRateFloor; //2.标准退款率下限 + @AnTableField(column="STANDARD_REFUND_RATE", type="long", notNull=true) private long standardRefundRate; //3.标准退款率 + @AnTableField(column="STANDARD_REFUND_RATE_CEIL", type="long", notNull=true) private long standardRefundRateCeil; //4.标准退款率上限 + @AnTableField(column="REWARD_DOT", type="long", notNull=true) private long rewardDot; //5.奖励点 + @AnTableField(column="PUNISH_DOT", type="long", notNull=true) private long punishDot; //6.扣罚点 + @AnTableField(column="REWARD_AMOUNT", type="long", notNull=true) private long rewardAmount; //7.每下降一个点奖励金额 + @AnTableField(column="PUNISH_AMOUNT", type="long", notNull=true) private long punishAmount; //8.每上升一个点扣罚金额 + @AnTableField(column="REWARD_AMOUNT_MAX", type="long", notNull=true) private long rewardAmountMax; //9.奖励金额上限 + @AnTableField(column="PUNISH_AMOUNT_MAX", type="long", notNull=true) private long punishAmountMax; //10.扣罚金额上限 + + public String toString() + { + return Jsons.toString(this); + } + + public long getRefundParameterId() + { + return refundParameterId; + } + + public void setRefundParameterId(long refundParameterId) + { + this.refundParameterId = refundParameterId; + } + + public long getStandardRefundRateFloor() + { + return standardRefundRateFloor; + } + + public void setStandardRefundRateFloor(long standardRefundRateFloor) + { + this.standardRefundRateFloor = standardRefundRateFloor; + } + + public long getStandardRefundRate() + { + return standardRefundRate; + } + + public void setStandardRefundRate(long standardRefundRate) + { + this.standardRefundRate = standardRefundRate; + } + + public long getStandardRefundRateCeil() + { + return standardRefundRateCeil; + } + + public void setStandardRefundRateCeil(long standardRefundRateCeil) + { + this.standardRefundRateCeil = standardRefundRateCeil; + } + + public long getRewardDot() + { + return rewardDot; + } + + public void setRewardDot(long rewardDot) + { + this.rewardDot = rewardDot; + } + + public long getPunishDot() + { + return punishDot; + } + + public void setPunishDot(long punishDot) + { + this.punishDot = punishDot; + } + + public long getRewardAmount() + { + return rewardAmount; + } + + public void setRewardAmount(long rewardAmount) + { + this.rewardAmount = rewardAmount; + } + + public long getPunishAmount() + { + return punishAmount; + } + + public void setPunishAmount(long punishAmount) + { + this.punishAmount = punishAmount; + } + + public long getRewardAmountMax() + { + return rewardAmountMax; + } + + public void setRewardAmountMax(long rewardAmountMax) + { + this.rewardAmountMax = rewardAmountMax; + } + + public long getPunishAmountMax() + { + return punishAmountMax; + } + + public void setPunishAmountMax(long punishAmountMax) + { + this.punishAmountMax = punishAmountMax; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/stat/SpecialOrderType.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/stat/SpecialOrderType.java new file mode 100644 index 0000000..e30a684 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/stat/SpecialOrderType.java @@ -0,0 +1,81 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.stat; + +import java.io.Serializable; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 特殊订单类型表 对应表《SPECIAL_ORDER_TYPE》 + */ +@AnAlias("SpecialOrderType") +@AnNew +@AnTable(table="SPECIAL_ORDER_TYPE", key="SPECIAL_TYPE_ID", type="InnoDB") +public class SpecialOrderType implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column="SPECIAL_TYPE_ID", type="long", notNull=true) private long specialTypeId; //1.特殊订单类型编号 + @AnTableField(column="SPECIAL_ORDER_DESCRIBE", type="string,200", notNull=true) private String specialOrderDescribe; //2.特殊订单描述 + @AnTableField(column="SPECIAL_ORDER_TYPE", type="string,200", notNull=true) private String specialOrderType; //3.特殊订单类型 + @AnTableField(column="SPECIAL_ORDER_AMOUNT", type="long", notNull=true) private long specialOrderAmount; //4.特殊订单类型每单奖励金额(单位分) + + public String toString() + { + return Jsons.toString(this); + } + + public long getSpecialTypeId() + { + return specialTypeId; + } + + public void setSpecialTypeId(long specialTypeId) + { + this.specialTypeId = specialTypeId; + } + + public String getSpecialOrderDescribe() + { + return specialOrderDescribe; + } + + public void setSpecialOrderDescribe(String specialOrderDescribe) + { + this.specialOrderDescribe = specialOrderDescribe; + } + + public String getSpecialOrderType() + { + return specialOrderType; + } + + public void setSpecialOrderType(String specialOrderType) + { + this.specialOrderType = specialOrderType; + } + + public long getSpecialOrderAmount() + { + return specialOrderAmount; + } + + public void setSpecialOrderAmount(long specialOrderAmount) + { + this.specialOrderAmount = specialOrderAmount; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/stat/TimelinessParameter.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/stat/TimelinessParameter.java new file mode 100644 index 0000000..086b509 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/stat/TimelinessParameter.java @@ -0,0 +1,57 @@ +package com.zhiqim.yangcai.design.dbo.stat; + +import java.io.Serializable; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 时效绩效参数表 对应表《TIMELINESS_PARAMETER》 + */ +@AnAlias("TimelinessParameter") +@AnNew +@AnTable(table = "TIMELINESS_PARAMETER", key = "TIMELINESS_PARAMETER_ID", type = "InnoDB") +public class TimelinessParameter implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "TIMELINESS_PARAMETER_ID", type = "long", notNull = true) + private long timelinessParameterId; // 1.时效参数编号 + @AnTableField(column = "PRD_TYPE_ID", type = "long", notNull = true) + private long prdTypeId; // 2.产品类型id + @AnTableField(column = "REWARD_AMOUNT", type = "long", notNull = true) + private long rewardAmount; // 3.奖励金额 + + public long getTimelinessParameterId() + { + return timelinessParameterId; + } + + public void setTimelinessParameterId(long timelinessParameterId) + { + this.timelinessParameterId = timelinessParameterId; + } + + public long getPrdTypeId() + { + return prdTypeId; + } + + public void setPrdTypeId(long prdTypeId) + { + this.prdTypeId = prdTypeId; + } + + public long getRewardAmount() + { + return rewardAmount; + } + + public void setRewardAmount(long rewardAmount) + { + this.rewardAmount = rewardAmount; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/subscribe/SubscribeDesignerQuotaRecord.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/subscribe/SubscribeDesignerQuotaRecord.java new file mode 100644 index 0000000..8ad3b38 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/subscribe/SubscribeDesignerQuotaRecord.java @@ -0,0 +1,280 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.subscribe; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 预约-设计师预约记录 对应表《subscribe_designer_quota_record》 + */ +@AnAlias("SubscribeDesignerQuotaRecord") +@AnNew +@AnTable(table = "subscribe_designer_quota_record", key = "record_id", type = "InnoDB") +public class SubscribeDesignerQuotaRecord implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "record_id", type = "long", notNull = true) + private long recordId; // 1.预约记录id + @AnTableField(column = "operator_code", type = "string,32", notNull = true) + private String operatorCode; // 2.设计师 + @AnTableField(column = "designer_lever_id", type = "long", notNull = true) + private long designerLeverId; // 3.当时设计师等级id + @AnTableField(column = "designer_lever", type = "string,32", notNull = false) + private String designerLever; // 4.当时设计师等级 + @AnTableField(column = "min_quota", type = "int", notNull = false) + private int minQuota; // 5.当时预约额度下限 + @AnTableField(column = "max_quota", type = "int", notNull = false) + private int maxQuota; // 6.当时预约额度上限 + @AnTableField(column = "max_drafted", type = "int", notNull = false) + private int maxDrafted; // 7.当时未定稿额度上限 + @AnTableField(column = "org_id", type = "long", notNull = true) + private long orgId; // 8.所属组织id + @AnTableField(column = "duty_time", type = "int", notNull = true) + private int dutyTime; // 9.预约日期(格式20190101) + @AnTableField(column = "duty_id", type = "long", notNull = false) + private long dutyId; // 10.预约班次 + @AnTableField(column = "duty_name", type = "string,32", notNull = false) + private String dutyName; // 11.预约班次名称 + @AnTableField(column = "subscribe_state", type = "int", notNull = true) + private int subscribeState; // 12.预约状态:1=未预约;2=已预约; + @AnTableField(column = "subscribe_num", type = "int", notNull = false) + private int subscribeNum; // 13.预约数量 + @AnTableField(column = "finished_num", type = "int", notNull = false) + private int finishedNum; // 14.完成数量 + @AnTableField(column = "state", type = "int", notNull = true) + private int state; // 15.状态:0=失效;1=生效; + @AnTableField(column = "remark", type = "string,100", notNull = false) + private String remark; // 16.备注 + @AnTableField(column = "CREATE_TIME", type = "datetime", notNull = true) + private Timestamp createTime; // 56.创建时间 + @AnTableField(column = "MODIFY_TIME", type = "datetime", notNull = false) + private Timestamp modifyTime; // 57.修改时间 + + private int dingGaoSum; // 定稿数量 + + private int jieDanOnlineTime; // 接单时长 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public long getRecordId() + { + return recordId; + } + + public void setRecordId(long recordId) + { + this.recordId = recordId; + } + + public String getOperatorCode() + { + return operatorCode; + } + + public void setOperatorCode(String operatorCode) + { + this.operatorCode = operatorCode; + } + + public long getDesignerLeverId() + { + return designerLeverId; + } + + public void setDesignerLeverId(long designerLeverId) + { + this.designerLeverId = designerLeverId; + } + + public String getDesignerLever() + { + return designerLever; + } + + public void setDesignerLever(String designerLever) + { + this.designerLever = designerLever; + } + + public int getMinQuota() + { + return minQuota; + } + + public void setMinQuota(int minQuota) + { + this.minQuota = minQuota; + } + + public int getMaxQuota() + { + return maxQuota; + } + + public void setMaxQuota(int maxQuota) + { + this.maxQuota = maxQuota; + } + + public int getMaxDrafted() + { + return maxDrafted; + } + + public void setMaxDrafted(int maxDrafted) + { + this.maxDrafted = maxDrafted; + } + + public long getOrgId() + { + return orgId; + } + + public void setOrgId(long orgId) + { + this.orgId = orgId; + } + + public int getDutyTime() + { + return dutyTime; + } + + public void setDutyTime(int dutyTime) + { + this.dutyTime = dutyTime; + } + + public long getDutyId() + { + return dutyId; + } + + public void setDutyId(long dutyId) + { + this.dutyId = dutyId; + } + + public String getDutyName() + { + return dutyName; + } + + public void setDutyName(String dutyName) + { + this.dutyName = dutyName; + } + + public int getSubscribeState() + { + return subscribeState; + } + + public void setSubscribeState(int subscribeState) + { + this.subscribeState = subscribeState; + } + + public int getSubscribeNum() + { + return subscribeNum; + } + + public void setSubscribeNum(int subscribeNum) + { + this.subscribeNum = subscribeNum; + } + + public int getFinishedNum() + { + return finishedNum; + } + + public void setFinishedNum(int finishedNum) + { + this.finishedNum = finishedNum; + } + + public int getState() + { + return state; + } + + public void setState(int state) + { + this.state = state; + } + + public String getRemark() + { + return remark; + } + + public void setRemark(String remark) + { + this.remark = remark; + } + + public Timestamp getCreateTime() + { + return createTime; + } + + public void setCreateTime(Timestamp createTime) + { + this.createTime = createTime; + } + + public Timestamp getModifyTime() + { + return modifyTime; + } + + public void setModifyTime(Timestamp modifyTime) + { + this.modifyTime = modifyTime; + } + + public int getDingGaoSum() + { + return dingGaoSum; + } + + public void setDingGaoSum(int dingGaoSum) + { + this.dingGaoSum = dingGaoSum; + } + + public int getJieDanOnlineTime() + { + return jieDanOnlineTime; + } + + public void setJieDanOnlineTime(int jieDanOnlineTime) + { + this.jieDanOnlineTime = jieDanOnlineTime; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/subscribe/SubscribeOrgTempQuota.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/subscribe/SubscribeOrgTempQuota.java new file mode 100644 index 0000000..a0b5caa --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/subscribe/SubscribeOrgTempQuota.java @@ -0,0 +1,124 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.subscribe; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 预约-组织临时额度配置 对应表《subscribe_org_temp_quota》 + */ +@AnAlias("SubscribeOrgTempQuota") +@AnNew +@AnTable(table = "subscribe_org_temp_quota", key = "org_id", type = "InnoDB") +public class SubscribeOrgTempQuota implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "org_id", type = "long", notNull = true) + private long orgId; // 1.组织id + @AnTableField(column = "temp_quota", type = "int", notNull = true) + private int tempQuota; // 2.临时额度 + @AnTableField(column = "safe_line", type = "int", notNull = true) + private int safeLine; // 3.安全线(当前未分配订单数超安全线设置时自动使用临时额度) + @AnTableField(column = "state", type = "int", notNull = true) + private int state; // 4.状态:0=失效;1=生效; + @AnTableField(column = "remark", type = "string,100", notNull = false) + private String remark; // 5.备注 + @AnTableField(column = "CREATE_TIME", type = "datetime", notNull = true) + private Timestamp createTime; // 56.创建时间 + @AnTableField(column = "MODIFY_TIME", type = "datetime", notNull = false) + private Timestamp modifyTime; // 57.修改时间 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public long getOrgId() + { + return orgId; + } + + public void setOrgId(long orgId) + { + this.orgId = orgId; + } + + public int getTempQuota() + { + return tempQuota; + } + + public void setTempQuota(int tempQuota) + { + this.tempQuota = tempQuota; + } + + public int getSafeLine() + { + return safeLine; + } + + public void setSafeLine(int safeLine) + { + this.safeLine = safeLine; + } + + public int getState() + { + return state; + } + + public void setState(int state) + { + this.state = state; + } + + public String getRemark() + { + return remark; + } + + public void setRemark(String remark) + { + this.remark = remark; + } + + public Timestamp getCreateTime() + { + return createTime; + } + + public void setCreateTime(Timestamp createTime) + { + this.createTime = createTime; + } + + public Timestamp getModifyTime() + { + return modifyTime; + } + + public void setModifyTime(Timestamp modifyTime) + { + this.modifyTime = modifyTime; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/subscribe/ZoaOrdermeal.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/subscribe/ZoaOrdermeal.java new file mode 100644 index 0000000..a8fe137 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/subscribe/ZoaOrdermeal.java @@ -0,0 +1,123 @@ +/* + * 版权所有 (C) 2015 知启蒙(ZHIQIM) 保留所有权利。 + * + * 指定登记&发行网站: https://www.zhiqim.com/ 欢迎加盟知启蒙,[编程有你,知启蒙一路随行]。 + * + * 本文采用《知启蒙许可证》,除非符合许可证,否则不可使用该文件! + * 1、您可以免费使用、修改、合并、出版发行和分发,再授权软件、软件副本及衍生软件; + * 2、您用于商业用途时,必须在原作者指定的登记网站,按原作者要求进行登记; + * 3、您在使用、修改、合并、出版发行和分发时,必须包含版权声明、许可声明,及保留原作者的著作权、商标和专利等知识产权; + * 4、您在互联网、移动互联网等大众网络下发行和分发再授权软件、软件副本及衍生软件时,必须在原作者指定的发行网站进行发行和分发; + * 5、您可以在以下链接获取一个完整的许可证副本。 + * + * 许可证链接:http://zhiqim.org/licenses/zhiqim_register_publish_license.htm + * + * 除非法律需要或书面同意,软件由原始码方式提供,无任何明示或暗示的保证和条件。详见完整许可证的权限和限制。 + */ +package com.zhiqim.yangcai.design.dbo.subscribe; + +import java.io.Serializable; +import java.sql.Timestamp; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +@AnAlias({"ZoaOrdermeal"}) +@AnNew +@AnTable(table="ZOA_ORDERMEAL", key="OPERATOR_CODE,ORDERMEAL_DATE,ORDERMEAL_TYPE", type="InnoDB") +public class ZoaOrdermeal + implements Serializable +{ + private static final long serialVersionUID = 1L; + @AnTableField(column="OPERATOR_CODE", type="string,32", notNull=true) + private String operatorCode; + @AnTableField(column="ORDERMEAL_DATE", type="int", notNull=true) + private int ordermealDate; + @AnTableField(column="ORDERMEAL_TYPE", type="byte", notNull=true) + private int ordermealType; + @AnTableField(column="ORDERMEAL_TIME", type="datetime", notNull=true) + private Timestamp ordermealTime; + @AnTableField(column="ORDERMEAL_CONFIRM", type="boolean", notNull=true) + private boolean ordermealConfirm; + @AnTableField(column="ORDERMEAL_CONFIRM_OPR", type="string,32", notNull=false) + private String ordermealConfirmOpr; + @AnTableField(column="ORDERMEAL_CONFIRM_TIME", type="datetime", notNull=false) + private Timestamp ordermealConfirmTime; + + public String toString() + { + return Jsons.toString(this); + } + + public String getOperatorCode() + { + return this.operatorCode; + } + + public void setOperatorCode(String operatorCode) + { + this.operatorCode = operatorCode; + } + + public int getOrdermealDate() + { + return this.ordermealDate; + } + + public void setOrdermealDate(int ordermealDate) + { + this.ordermealDate = ordermealDate; + } + + public int getOrdermealType() + { + return this.ordermealType; + } + + public void setOrdermealType(int ordermealType) + { + this.ordermealType = ordermealType; + } + + public Timestamp getOrdermealTime() + { + return this.ordermealTime; + } + + public void setOrdermealTime(Timestamp ordermealTime) + { + this.ordermealTime = ordermealTime; + } + + public boolean isOrdermealConfirm() + { + return this.ordermealConfirm; + } + + public void setOrdermealConfirm(boolean ordermealConfirm) + { + this.ordermealConfirm = ordermealConfirm; + } + + public String getOrdermealConfirmOpr() + { + return this.ordermealConfirmOpr; + } + + public void setOrdermealConfirmOpr(String ordermealConfirmOpr) + { + this.ordermealConfirmOpr = ordermealConfirmOpr; + } + + public Timestamp getOrdermealConfirmTime() + { + return this.ordermealConfirmTime; + } + + public void setOrdermealConfirmTime(Timestamp ordermealConfirmTime) + { + this.ordermealConfirmTime = ordermealConfirmTime; + } +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/template/DesErrorTemplate.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/template/DesErrorTemplate.java new file mode 100644 index 0000000..6cc76b9 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/template/DesErrorTemplate.java @@ -0,0 +1,81 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.template; + +import java.io.Serializable; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 错误模板 对应表《DES_ERROR_TEMPLATE》 + */ +@AnAlias("DesErrorTemplate") +@AnNew +@AnTable(table="DES_ERROR_TEMPLATE", key="MEDIA_ID", type="InnoDB") +public class DesErrorTemplate implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column="MEDIA_ID", type="long", notNull=true) private long mediaId; //1.媒体编号 + @AnTableField(column="ERROR_TYPE", type="int", notNull=true) private int errorType; //2.0:背景图,1:素材图 + @AnTableField(column="ERROR_SITE", type="string,16", notNull=false) private String errorSite; //3.错误位置 + @AnTableField(column="ERROR_DESC", type="string,500", notNull=false) private String errorDesc; //4.描述 + + public String toString() + { + return Jsons.toString(this); + } + + public long getMediaId() + { + return mediaId; + } + + public void setMediaId(long mediaId) + { + this.mediaId = mediaId; + } + + public int getErrorType() + { + return errorType; + } + + public void setErrorType(int errorType) + { + this.errorType = errorType; + } + + public String getErrorSite() + { + return errorSite; + } + + public void setErrorSite(String errorSite) + { + this.errorSite = errorSite; + } + + public String getErrorDesc() + { + return errorDesc; + } + + public void setErrorDesc(String errorDesc) + { + this.errorDesc = errorDesc; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/template/DesTemplateEvent.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/template/DesTemplateEvent.java new file mode 100644 index 0000000..d3cb5a9 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/template/DesTemplateEvent.java @@ -0,0 +1,93 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.template; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 模板事件表 对应表《DES_TEMPLATE_EVENT》 + */ +@AnAlias("DesTemplateEvent") +@AnNew +@AnTable(table="DES_TEMPLATE_EVENT", key="EVENT_ID", type="InnoDB") +public class DesTemplateEvent implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column="EVENT_ID", type="long", notNull=true) private long eventId; //1.事件ID + @AnTableField(column="MEDIA_ID", type="long", notNull=true) private long mediaId; //2.媒体编号 + @AnTableField(column="EVENT_TYPE", type="int", notNull=true) private int eventType; //3.事件类型(1代表浏览、2代表收藏,3代表给我分享的、4代表下载、5代表复制) + @AnTableField(column="OPERATOR_CODE", type="string,64", notNull=false) private String operatorCode; //4.操作人 + @AnTableField(column="CREATE_TIME", type="datetime", notNull=true) private Timestamp createTime; //5.创建时间 + + public String toString() + { + return Jsons.toString(this); + } + + public long getEventId() + { + return eventId; + } + + public void setEventId(long eventId) + { + this.eventId = eventId; + } + + public long getMediaId() + { + return mediaId; + } + + public void setMediaId(long mediaId) + { + this.mediaId = mediaId; + } + + public int getEventType() + { + return eventType; + } + + public void setEventType(int eventType) + { + this.eventType = eventType; + } + + public String getOperatorCode() + { + return operatorCode; + } + + public void setOperatorCode(String operatorCode) + { + this.operatorCode = operatorCode; + } + + public Timestamp getCreateTime() + { + return createTime; + } + + public void setCreateTime(Timestamp createTime) + { + this.createTime = createTime; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/template/DesTemplateEventView.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/template/DesTemplateEventView.java new file mode 100644 index 0000000..1483ad2 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/template/DesTemplateEventView.java @@ -0,0 +1,138 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.template; + +import com.zhiqim.yangcai.design.dbo.template.MediaTemplate; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 模板事件关联表 对应视图《DES_TEMPLATE_EVENT_VIEW》 + */ +@AnAlias("DesTemplateEventView") +@AnNew +@AnView("MEDIA_TEMPLATE,MEDIA_CANVAS,DES_TEMPLATE_EVENT") +@AnViewJoin({@AnViewJoinValue(type="EQUAL", lTable="MEDIA_TEMPLATE", lColumn="MEDIA_ID", rTable="MEDIA_CANVAS", rColumn="MEDIA_ID"), + @AnViewJoinValue(type="EQUAL", lTable="MEDIA_TEMPLATE", lColumn="MEDIA_ID", rTable="DES_TEMPLATE_EVENT", rColumn="MEDIA_ID")}) +public class DesTemplateEventView extends MediaTemplate +{ + private static final long serialVersionUID = 1L; + + @AnViewField(table="MEDIA_CANVAS", column="MEDIA_NAME") private String mediaName; //2.媒体名称 + @AnViewField(table="MEDIA_CANVAS", column="WIDTH") private double width; //3.画布宽度,单位像素 + @AnViewField(table="MEDIA_CANVAS", column="HEIGHT") private double height; //4.画布高度,单位像素 + @AnViewField(table="MEDIA_CANVAS", column="DPI") private int dpi; //5.分辨率 + @AnViewField(table="MEDIA_CANVAS", column="MEDIA_URL") private String mediaUrl; //6.媒体参考图片 + @AnViewField(table="MEDIA_CANVAS", column="CREATE_TIME") private String createTime; //7.创建时间 + @AnViewField(table="MEDIA_CANVAS", column="UPDATE_TIME") private String updateTime; //8.更新时间 + @AnViewField(table="DES_TEMPLATE_EVENT", column="EVENT_TYPE") private int eventType; //9.事件类型(1代表浏览、2代表收藏,3代表给我分享的、4代表下载、5代表复制) + @AnViewField(table="DES_TEMPLATE_EVENT", column="OPERATOR_CODE") private String operatorCode; //10.操作人 + + public String toString() + { + return Jsons.toString(this); + } + + public String getMediaName() + { + return mediaName; + } + + public void setMediaName(String mediaName) + { + this.mediaName = mediaName; + } + + public double getWidth() + { + return width; + } + + public void setWidth(double width) + { + this.width = width; + } + + public double getHeight() + { + return height; + } + + public void setHeight(double height) + { + this.height = height; + } + + public int getDpi() + { + return dpi; + } + + public void setDpi(int dpi) + { + this.dpi = dpi; + } + + public String getMediaUrl() + { + return mediaUrl; + } + + public void setMediaUrl(String mediaUrl) + { + this.mediaUrl = mediaUrl; + } + + public String getCreateTime() + { + return createTime; + } + + public void setCreateTime(String createTime) + { + this.createTime = createTime; + } + + public String getUpdateTime() + { + return updateTime; + } + + public void setUpdateTime(String updateTime) + { + this.updateTime = updateTime; + } + + public int getEventType() + { + return eventType; + } + + public void setEventType(int eventType) + { + this.eventType = eventType; + } + + public String getOperatorCode() + { + return operatorCode; + } + + public void setOperatorCode(String operatorCode) + { + this.operatorCode = operatorCode; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/template/DesTemplateIndexView.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/template/DesTemplateIndexView.java new file mode 100644 index 0000000..5242bf5 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/template/DesTemplateIndexView.java @@ -0,0 +1,182 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.template; + +import com.zhiqim.yangcai.design.dbo.template.MediaTemplate; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 模板索引关联表 对应视图《DES_TEMPLATE_INDEX_VIEW》 + */ +@AnAlias("DesTemplateIndexView") +@AnNew +@AnView("MEDIA_TEMPLATE,DES_KEYWORD_INDEX,MEDIA_CANVAS") +@AnViewJoin({@AnViewJoinValue(type="EQUAL", lTable="MEDIA_TEMPLATE", lColumn="MEDIA_ID", rTable="DES_KEYWORD_INDEX", rColumn="MEDIA_ID"), + @AnViewJoinValue(type="EQUAL", lTable="MEDIA_TEMPLATE", lColumn="MEDIA_ID", rTable="MEDIA_CANVAS", rColumn="MEDIA_ID")}) +public class DesTemplateIndexView extends MediaTemplate +{ + private static final long serialVersionUID = 1L; + + @AnViewField(table="MEDIA_CANVAS", column="MEDIA_NAME") private String mediaName; //2.媒体名称 + @AnViewField(table="MEDIA_CANVAS", column="WIDTH") private double width; //3.画布宽度,单位像素 + @AnViewField(table="MEDIA_CANVAS", column="HEIGHT") private double height; //4.画布高度,单位像素 + @AnViewField(table="MEDIA_CANVAS", column="WIDTH_MM") private double widthMm; //5.画布宽度,单位mm + @AnViewField(table="MEDIA_CANVAS", column="HEIGHT_MM") private double heightMm; //6.画布高度,单位mm + @AnViewField(table="MEDIA_CANVAS", column="DPI") private int dpi; //7.分辨率 + @AnViewField(table="MEDIA_CANVAS", column="MEDIA_URL") private String mediaUrl; //8.媒体参考图片 + @AnViewField(table="MEDIA_CANVAS", column="CREATE_TIME") private String createTime; //9.创建时间 + @AnViewField(table="MEDIA_CANVAS", column="UPDATE_TIME") private String updateTime; //10.更新时间 + @AnViewField(table="DES_KEYWORD_INDEX", column="LABEL_KEYWORD") private String labelKeyword; //11.标签关键词 + @AnViewField(table="DES_KEYWORD_INDEX", column="CUSTOM_LABEL_KEYWORD") private String customLabelKeyword; //12.自定义标签关键词 + @AnViewField(table="DES_KEYWORD_INDEX", column="LONG_TAIL_KEYWORD") private String longTailKeyword; //13.长尾词关键词 + @AnViewField(table="DES_KEYWORD_INDEX", column="MEDIA_SCORE") private int mediaScore; //14.模板指数 + + public String toString() + { + return Jsons.toString(this); + } + + public String getMediaName() + { + return mediaName; + } + + public void setMediaName(String mediaName) + { + this.mediaName = mediaName; + } + + public double getWidth() + { + return width; + } + + public void setWidth(double width) + { + this.width = width; + } + + public double getHeight() + { + return height; + } + + public void setHeight(double height) + { + this.height = height; + } + + public double getWidthMm() + { + return widthMm; + } + + public void setWidthMm(double widthMm) + { + this.widthMm = widthMm; + } + + public double getHeightMm() + { + return heightMm; + } + + public void setHeightMm(double heightMm) + { + this.heightMm = heightMm; + } + + public int getDpi() + { + return dpi; + } + + public void setDpi(int dpi) + { + this.dpi = dpi; + } + + public String getMediaUrl() + { + return mediaUrl; + } + + public void setMediaUrl(String mediaUrl) + { + this.mediaUrl = mediaUrl; + } + + public String getCreateTime() + { + return createTime; + } + + public void setCreateTime(String createTime) + { + this.createTime = createTime; + } + + public String getUpdateTime() + { + return updateTime; + } + + public void setUpdateTime(String updateTime) + { + this.updateTime = updateTime; + } + + public String getLabelKeyword() + { + return labelKeyword; + } + + public void setLabelKeyword(String labelKeyword) + { + this.labelKeyword = labelKeyword; + } + + public String getCustomLabelKeyword() + { + return customLabelKeyword; + } + + public void setCustomLabelKeyword(String customLabelKeyword) + { + this.customLabelKeyword = customLabelKeyword; + } + + public String getLongTailKeyword() + { + return longTailKeyword; + } + + public void setLongTailKeyword(String longTailKeyword) + { + this.longTailKeyword = longTailKeyword; + } + + public int getMediaScore() + { + return mediaScore; + } + + public void setMediaScore(int mediaScore) + { + this.mediaScore = mediaScore; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/template/DesTemplateLog.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/template/DesTemplateLog.java new file mode 100644 index 0000000..5a7b541 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/template/DesTemplateLog.java @@ -0,0 +1,93 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.template; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 模板日志表 对应表《DES_TEMPLATE_LOG》 + */ +@AnAlias("DesTemplateLog") +@AnNew +@AnTable(table="DES_TEMPLATE_LOG", key="LOG_ID", type="InnoDB") +public class DesTemplateLog implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column="LOG_ID", type="long", notNull=true) private long logId; //1.主键 + @AnTableField(column="MEDIA_ID", type="long", notNull=true) private long mediaId; //2.媒体编号 + @AnTableField(column="OPERATOR_CODE", type="string,64", notNull=true) private String operatorCode; //3.操作员 + @AnTableField(column="LOG_DESC", type="string,200", notNull=true) private String logDesc; //4.描述 + @AnTableField(column="CREATE_TIME", type="datetime", notNull=true) private Timestamp createTime; //5.创建时间 + + public String toString() + { + return Jsons.toString(this); + } + + public long getLogId() + { + return logId; + } + + public void setLogId(long logId) + { + this.logId = logId; + } + + public long getMediaId() + { + return mediaId; + } + + public void setMediaId(long mediaId) + { + this.mediaId = mediaId; + } + + public String getOperatorCode() + { + return operatorCode; + } + + public void setOperatorCode(String operatorCode) + { + this.operatorCode = operatorCode; + } + + public String getLogDesc() + { + return logDesc; + } + + public void setLogDesc(String logDesc) + { + this.logDesc = logDesc; + } + + public Timestamp getCreateTime() + { + return createTime; + } + + public void setCreateTime(Timestamp createTime) + { + this.createTime = createTime; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/template/DesTemplateOrder.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/template/DesTemplateOrder.java new file mode 100644 index 0000000..aab8d65 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/template/DesTemplateOrder.java @@ -0,0 +1,171 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.dbo.template; + +import java.io.Serializable; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 订单模板参数表 对应表《DES_TEMPLATE_ORDER》 + */ +@AnAlias("DesTemplateOrder") +@AnNew +@AnTable(table = "DES_TEMPLATE_ORDER", key = "DESIGN_ID", type = "InnoDB") +public class DesTemplateOrder implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "DESIGN_ID", type = "long", notNull = true) + private long designId; // 1.订单号 + @AnTableField(column = "INDUSTRY_ID", type = "long", notNull = false) + private long industryId; // 2.行业ID + @AnTableField(column = "TYPE_ID", type = "long", notNull = true) + private long typeId; // 3.类型ID + @AnTableField(column = "OPERATOR_CODE", type = "string,64", notNull = false) + private String operatorCode; // 4.操作人 + @AnTableField(column = "MEDIA_ID", type = "long", notNull = false) + private long mediaId; // 5.媒体编号 + @AnTableField(column = "DESIGN_MEDIA_ID", type = "long", notNull = false) + private long designMediaId; // 6.订单模板ID + @AnTableField(column = "OLD_PARAM_TEXT", type = "string,2000", notNull = false) + private String oldParamText; // 7.原参数文本 + @AnTableField(column = "OCR_TEXT", type = "string,2000", notNull = false) + private String ocrText; // 8.图片识别后文本 + @AnTableField(column = "PARAM_TEXT", type = "string,2000", notNull = false) + private String paramText; // 9.参数文本 + @AnTableField(column = "QR_CODE_PATH", type = "string,2000", notNull = false) + private String qrCodePath; // 10.二维码路径 + @AnTableField(column = "FILE_ID", type = "string,32", notNull = false) + private String fileId; // 11.上传组件CODE + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public long getDesignId() + { + return designId; + } + + public void setDesignId(long designId) + { + this.designId = designId; + } + + public long getIndustryId() + { + return industryId; + } + + public void setIndustryId(long industryId) + { + this.industryId = industryId; + } + + public long getTypeId() + { + return typeId; + } + + public void setTypeId(long typeId) + { + this.typeId = typeId; + } + + public String getOperatorCode() + { + return operatorCode; + } + + public void setOperatorCode(String operatorCode) + { + this.operatorCode = operatorCode; + } + + public long getMediaId() + { + return mediaId; + } + + public void setMediaId(long mediaId) + { + this.mediaId = mediaId; + } + + public long getDesignMediaId() + { + return designMediaId; + } + + public void setDesignMediaId(long designMediaId) + { + this.designMediaId = designMediaId; + } + + public String getOldParamText() + { + return oldParamText; + } + + public void setOldParamText(String oldParamText) + { + this.oldParamText = oldParamText; + } + + public String getOcrText() + { + return ocrText; + } + + public void setOcrText(String ocrText) + { + this.ocrText = ocrText; + } + + public String getParamText() + { + return paramText; + } + + public void setParamText(String paramText) + { + this.paramText = paramText; + } + + public String getQrCodePath() + { + return qrCodePath; + } + + public void setQrCodePath(String qrCodePath) + { + this.qrCodePath = qrCodePath; + } + + public String getFileId() + { + return fileId; + } + + public void setFileId(String fileId) + { + this.fileId = fileId; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/template/DesTemplateScore.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/template/DesTemplateScore.java new file mode 100644 index 0000000..531323c --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/template/DesTemplateScore.java @@ -0,0 +1,92 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.template; + +import java.io.Serializable; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 模板本身分数表 对应表《DES_TEMPLATE_SCORE》 + */ +@AnAlias("DesTemplateScore") +@AnNew +@AnTable(table="DES_TEMPLATE_SCORE", key="MEDIA_ID", type="InnoDB") +public class DesTemplateScore implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column="MEDIA_ID", type="long", notNull=true) private long mediaId; //1.媒体编号 + @AnTableField(column="BASE_SCORE", type="int", notNull=true) private int baseScore; //2.基础分 + @AnTableField(column="FLOAT_SCORE", type="int", notNull=true) private int floatScore; //3.动态分 + @AnTableField(column="SALE_SCORE", type="int", notNull=true) private int saleScore; //4.销量分 + @AnTableField(column="USER_SCORE", type="int", notNull=true) private int userScore; //5.用户评分 + + public String toString() + { + return Jsons.toString(this); + } + + public long getMediaId() + { + return mediaId; + } + + public void setMediaId(long mediaId) + { + this.mediaId = mediaId; + } + + public int getBaseScore() + { + return baseScore; + } + + public void setBaseScore(int baseScore) + { + this.baseScore = baseScore; + } + + public int getFloatScore() + { + return floatScore; + } + + public void setFloatScore(int floatScore) + { + this.floatScore = floatScore; + } + + public int getSaleScore() + { + return saleScore; + } + + public void setSaleScore(int saleScore) + { + this.saleScore = saleScore; + } + + public int getUserScore() + { + return userScore; + } + + public void setUserScore(int userScore) + { + this.userScore = userScore; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/template/DesTemplateScoreLog.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/template/DesTemplateScoreLog.java new file mode 100644 index 0000000..84c327b --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/template/DesTemplateScoreLog.java @@ -0,0 +1,126 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.template; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 模板分数日志表 对应表《DES_TEMPLATE_SCORE_LOG》 + */ +@AnAlias("DesTemplateScoreLog") +@AnNew +@AnTable(table="DES_TEMPLATE_SCORE_LOG", key="LOG_ID", type="InnoDB") +public class DesTemplateScoreLog implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column="LOG_ID", type="long", notNull=true) private long logId; //1.主键 + @AnTableField(column="MEDIA_ID", type="long", notNull=true) private long mediaId; //2.媒体编号 + @AnTableField(column="SCORE_NAME", type="string,32", notNull=false) private String scoreName; //3.规则名称(TEMPLATE,KEYWORD) + @AnTableField(column="SCORE_TYPE", type="string,32", notNull=true) private String scoreType; //4.评分规则类型(基础分:BASE_SCORE,动态分:FLOAT_SCORE,销售分:SALE_SCORE, 用户评分:USER_SCORE ) + @AnTableField(column="PARAM_TYPE", type="int", notNull=true) private int paramType; //5.参数类型(0代表加分,1代表减分) + @AnTableField(column="PARAM_KEY", type="string,32", notNull=true) private String paramKey; //6.参数键 + @AnTableField(column="PARAM_VALUE", type="int", notNull=true) private int paramValue; //7.参数值 + @AnTableField(column="CREATE_TIME", type="datetime", notNull=true) private Timestamp createTime; //8.创建时间 + + public String toString() + { + return Jsons.toString(this); + } + + public long getLogId() + { + return logId; + } + + public void setLogId(long logId) + { + this.logId = logId; + } + + public long getMediaId() + { + return mediaId; + } + + public void setMediaId(long mediaId) + { + this.mediaId = mediaId; + } + + public String getScoreName() + { + return scoreName; + } + + public void setScoreName(String scoreName) + { + this.scoreName = scoreName; + } + + public String getScoreType() + { + return scoreType; + } + + public void setScoreType(String scoreType) + { + this.scoreType = scoreType; + } + + public int getParamType() + { + return paramType; + } + + public void setParamType(int paramType) + { + this.paramType = paramType; + } + + public String getParamKey() + { + return paramKey; + } + + public void setParamKey(String paramKey) + { + this.paramKey = paramKey; + } + + public int getParamValue() + { + return paramValue; + } + + public void setParamValue(int paramValue) + { + this.paramValue = paramValue; + } + + public Timestamp getCreateTime() + { + return createTime; + } + + public void setCreateTime(Timestamp createTime) + { + this.createTime = createTime; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/template/MediaTemplate.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/template/MediaTemplate.java new file mode 100644 index 0000000..5ce2554 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/template/MediaTemplate.java @@ -0,0 +1,327 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.dbo.template; + +import java.io.Serializable; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 模板表 对应表《MEDIA_TEMPLATE》 + */ +@AnAlias("MediaTemplate") +@AnNew +@AnTable(table = "MEDIA_TEMPLATE", key = "MEDIA_ID", type = "InnoDB") +public class MediaTemplate implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "MEDIA_ID", type = "long", notNull = true) + private long mediaId; // 1.媒体编号 + @AnTableField(column = "TEMPLATE_TYPE", type = "int", notNull = true) + private int templateType; // 2.模板类型: 0:临时、 10:我的草稿、 20:我的模板、 80:订单模板、 100:系统模板、 110:精品模板 + @AnTableField(column = "TEMPLATE_STATUS", type = "int", notNull = true) + private int templateStatus; // 3.模板状态,0:未审核,1:审核中,2:已审核 + @AnTableField(column = "DESIGNER", type = "string,32", notNull = true) + private String designer; // 4.设计师 + @AnTableField(column = "TYPE_ID", type = "long", notNull = true) + private long typeId; // 5.类型编号 + @AnTableField(column = "PAGE_VALUE", type = "int", notNull = true) + private int pageValue; // 6.面数,单面=1,双面=2, 8P=8,12P=12 + @AnTableField(column = "INDUSTRY_ID", type = "long", notNull = false) + private long industryId; // 7.行业ID + @AnTableField(column = "ATTRIBUTE_ID", type = "long", notNull = false) + private long attributeId; // 8.属性ID + @AnTableField(column = "INDUSTRY_SUB_IDS", type = "string,5000", notNull = false) + private String industrySubIds; // 9.子行业ID + @AnTableField(column = "INDUSTRY_SUB_NAME", type = "string,5000", notNull = false) + private String industrySubName; // 10.子行业名称 + @AnTableField(column = "ATTRIBUTE_IDS", type = "string,5000", notNull = false) + private String attributeIds; // 11.属性ID + @AnTableField(column = "ATTRIBUTE_NAME", type = "string,5000", notNull = false) + private String attributeName; // 12.属性值名称 + @AnTableField(column = "TEMPLATE_GROUP", type = "string,850", notNull = false) + private String templateGroup; // 13.设计师所属小组 + @AnTableField(column = "SHARE_DEPT", type = "string,850", notNull = false) + private String shareDept; // 14.分享部门 + @AnTableField(column = "DESIGN_ID", type = "long", notNull = false) + private long designId; // 15.设计订单ID + @AnTableField(column = "THEME_COLOR", type = "string,10", notNull = false) + private String themeColor; // 16.主色调 + @AnTableField(column = "KEYWORD_ID", type = "long", notNull = false) + private long keywordId; // 17.关键词ID + @AnTableField(column = "KEYWORD_NAME", type = "string,5000", notNull = false) + private String keywordName; // 18.关键词名称 + @AnTableField(column = "KEYWORDS", type = "string,5000", notNull = false) + private String keywords; // 19.关键字,多个逗号分隔 + @AnTableField(column = "TEMPLATE_SRC", type = "long", notNull = false) + private long templateSrc; // 20.模板来源ID + @AnTableField(column = "RELEASE_STATUS", type = "byte", notNull = true) + private int releaseStatus; // 21.发布状态,0:未发布,1:已发布 + @AnTableField(column = "RELEASE_TIME", type = "string,19", notNull = false) + private String releaseTime; // 22.发布时间 + @AnTableField(column = "FILE_TYPE", type = "string,50", notNull = false) + private String fileType; // 23.模板外部稿件后缀格式pdf、cdr、ai,多个分隔符连接 + @AnTableField(column = "CREATE_CHANNEL", type = "string,20", notNull = false) + private String createChannel;// 创建通道 :out_draft外部稿件、platform_design平台设计 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public long getMediaId() + { + return mediaId; + } + + public void setMediaId(long mediaId) + { + this.mediaId = mediaId; + } + + public int getTemplateType() + { + return templateType; + } + + public void setTemplateType(int templateType) + { + this.templateType = templateType; + } + + public int getTemplateStatus() + { + return templateStatus; + } + + public void setTemplateStatus(int templateStatus) + { + this.templateStatus = templateStatus; + } + + public String getDesigner() + { + return designer; + } + + public void setDesigner(String designer) + { + this.designer = designer; + } + + public long getTypeId() + { + return typeId; + } + + public void setTypeId(long typeId) + { + this.typeId = typeId; + } + + public int getPageValue() + { + return pageValue; + } + + public void setPageValue(int pageValue) + { + this.pageValue = pageValue; + } + + public long getIndustryId() + { + return industryId; + } + + public void setIndustryId(long industryId) + { + this.industryId = industryId; + } + + public long getAttributeId() + { + return attributeId; + } + + public void setAttributeId(long attributeId) + { + this.attributeId = attributeId; + } + + public String getIndustrySubIds() + { + return industrySubIds; + } + + public void setIndustrySubIds(String industrySubIds) + { + this.industrySubIds = industrySubIds; + } + + public String getIndustrySubName() + { + return industrySubName; + } + + public void setIndustrySubName(String industrySubName) + { + this.industrySubName = industrySubName; + } + + public String getAttributeIds() + { + return attributeIds; + } + + public void setAttributeIds(String attributeIds) + { + this.attributeIds = attributeIds; + } + + public String getAttributeName() + { + return attributeName; + } + + public void setAttributeName(String attributeName) + { + this.attributeName = attributeName; + } + + public String getTemplateGroup() + { + return templateGroup; + } + + public void setTemplateGroup(String templateGroup) + { + this.templateGroup = templateGroup; + } + + public String getShareDept() + { + return shareDept; + } + + public void setShareDept(String shareDept) + { + this.shareDept = shareDept; + } + + public long getDesignId() + { + return designId; + } + + public void setDesignId(long designId) + { + this.designId = designId; + } + + public String getThemeColor() + { + return themeColor; + } + + public void setThemeColor(String themeColor) + { + this.themeColor = themeColor; + } + + public long getKeywordId() + { + return keywordId; + } + + public void setKeywordId(long keywordId) + { + this.keywordId = keywordId; + } + + public String getKeywordName() + { + return keywordName; + } + + public void setKeywordName(String keywordName) + { + this.keywordName = keywordName; + } + + public String getKeywords() + { + return keywords; + } + + public void setKeywords(String keywords) + { + this.keywords = keywords; + } + + public long getTemplateSrc() + { + return templateSrc; + } + + public void setTemplateSrc(long templateSrc) + { + this.templateSrc = templateSrc; + } + + public int getReleaseStatus() + { + return releaseStatus; + } + + public void setReleaseStatus(int releaseStatus) + { + this.releaseStatus = releaseStatus; + } + + public String getReleaseTime() + { + return releaseTime; + } + + public void setReleaseTime(String releaseTime) + { + this.releaseTime = releaseTime; + } + + public String getFileType() + { + return fileType; + } + + public void setFileType(String fileType) + { + this.fileType = fileType; + } + + public String getCreateChannel() + { + return createChannel; + } + + public void setCreateChannel(String createChannel) + { + this.createChannel = createChannel; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/template/MediaTemplateSolrModel.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/template/MediaTemplateSolrModel.java new file mode 100644 index 0000000..80f48ea --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/template/MediaTemplateSolrModel.java @@ -0,0 +1,465 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.dbo.template; + +import java.io.Serializable; +import java.util.Date; + +import org.apache.commons.lang3.time.DateFormatUtils; +import org.apache.solr.client.solrj.beans.Field; +import org.zhiqim.kernel.json.Jsons; + +/** + * 模板素材solrModel + */ +public class MediaTemplateSolrModel implements Serializable +{ + private static final long serialVersionUID = 1L; + + @Field + private String mediaName; // 2.媒体名称 + @Field + private double width; // 3.画布宽度,单位像素 + @Field + private double height; // 4.画布高度,单位像素 + @Field + private double widthMm; // 5.画布宽度,单位mm + @Field + private double heightMm; // 6.画布高度,单位mm + @Field + private int dpi; // 7.分辨率 + @Field + private String mediaUrl; // 8.媒体参考图片 + @Field + private Date createTime; // 9.创建时间 + @Field + private String updateTime; // 10.更新时间 + @Field + private int isEdit; // 11.是否支持编辑,0:支持,1:不支持 + @Field + private double bleedSize; // 12.出血尺寸,单位mm + @Field + private long mediaId; // 1.媒体编号 + @Field + private int templateType; // 2.模板类型: 0:临时、 10:我的草稿、 20:我的模板、 80:订单模板、 100:系统模板、 110:精品模板 + @Field + private long oddEven;// 版式ID 0横版 1竖版 + @Field + private int templateStatus; // 3.模板状态,0:未审核,1:审核中,2:已审核 + @Field + private String designer; // 4.设计师 + @Field + private long typeId; // 5.类型编号 + @Field + private int pageValue; // 6.面数,单面=1,双面=2, 8P=8,12P=12 + @Field + private long industryId; // 7.行业ID + @Field + private long attributeId; // 8.属性ID + @Field + private String industrySubIds; // 9.子行业ID + @Field + private String industrySubName; // 10.子行业名称 + @Field + private String attributeIds; // 11.属性ID + @Field + private String attributeName; // 12.属性值名称 + @Field + private String templateGroup; // 13.设计师所属小组 + @Field + private String shareDept; // 14.分享部门 + @Field + private long designId; // 15.设计订单ID + @Field + private String themeColor; // 16.主色调 + @Field + private long keywordId; // 17.关键词ID + @Field + private String keywordName; // 18.关键词名称 + @Field + private String keywords; // 19.关键字,多个逗号分隔 + @Field + private long templateSrc; // 20.模板来源ID + @Field + private int releaseStatus; // 21.发布状态,0:未发布,1:已发布 + @Field + private String releaseTime; // 22.发布时间 + @Field + private String fileType; // 23.模板外部稿件后缀格式pdf、cdr、ai,多个分隔符连接 + @Field + private int score;// 评分 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public String getMediaName() + { + return mediaName; + } + + public void setMediaName(String mediaName) + { + this.mediaName = mediaName; + } + + public double getWidth() + { + return width; + } + + public void setWidth(double width) + { + this.width = width; + } + + public double getHeight() + { + return height; + } + + public void setHeight(double height) + { + this.height = height; + } + + public double getWidthMm() + { + return widthMm; + } + + public void setWidthMm(double widthMm) + { + this.widthMm = widthMm; + } + + public double getHeightMm() + { + return heightMm; + } + + public void setHeightMm(double heightMm) + { + this.heightMm = heightMm; + } + + public int getDpi() + { + return dpi; + } + + public void setDpi(int dpi) + { + this.dpi = dpi; + } + + public String getMediaUrl() + { + return mediaUrl; + } + + public void setMediaUrl(String mediaUrl) + { + this.mediaUrl = mediaUrl; + } + + public String getCreateTime() + { + return DateFormatUtils.format(createTime, "yyyy-MM-dd HH:mm:ss"); + } + + public void setCreateTime(Date createTime) + { + this.createTime = createTime; + } + + public String getUpdateTime() + { + return updateTime; + } + + public void setUpdateTime(String updateTime) + { + this.updateTime = updateTime; + } + + public int getIsEdit() + { + return isEdit; + } + + public void setIsEdit(int isEdit) + { + this.isEdit = isEdit; + } + + public double getBleedSize() + { + return bleedSize; + } + + public void setBleedSize(double bleedSize) + { + this.bleedSize = bleedSize; + } + + public long getMediaId() + { + return mediaId; + } + + public void setMediaId(long mediaId) + { + this.mediaId = mediaId; + } + + public int getTemplateType() + { + return templateType; + } + + public void setTemplateType(int templateType) + { + this.templateType = templateType; + } + + public int getTemplateStatus() + { + return templateStatus; + } + + public void setTemplateStatus(int templateStatus) + { + this.templateStatus = templateStatus; + } + + public String getDesigner() + { + return designer; + } + + public void setDesigner(String designer) + { + this.designer = designer; + } + + public long getTypeId() + { + return typeId; + } + + public void setTypeId(long typeId) + { + this.typeId = typeId; + } + + public int getPageValue() + { + return pageValue; + } + + public void setPageValue(int pageValue) + { + this.pageValue = pageValue; + } + + public long getIndustryId() + { + return industryId; + } + + public void setIndustryId(long industryId) + { + this.industryId = industryId; + } + + public long getAttributeId() + { + return attributeId; + } + + public void setAttributeId(long attributeId) + { + this.attributeId = attributeId; + } + + public String getIndustrySubIds() + { + return industrySubIds; + } + + public void setIndustrySubIds(String industrySubIds) + { + this.industrySubIds = industrySubIds; + } + + public String getIndustrySubName() + { + return industrySubName; + } + + public void setIndustrySubName(String industrySubName) + { + this.industrySubName = industrySubName; + } + + public String getAttributeIds() + { + return attributeIds; + } + + public void setAttributeIds(String attributeIds) + { + this.attributeIds = attributeIds; + } + + public String getAttributeName() + { + return attributeName; + } + + public void setAttributeName(String attributeName) + { + this.attributeName = attributeName; + } + + public String getTemplateGroup() + { + return templateGroup; + } + + public void setTemplateGroup(String templateGroup) + { + this.templateGroup = templateGroup; + } + + public String getShareDept() + { + return shareDept; + } + + public void setShareDept(String shareDept) + { + this.shareDept = shareDept; + } + + public long getDesignId() + { + return designId; + } + + public void setDesignId(long designId) + { + this.designId = designId; + } + + public String getThemeColor() + { + return themeColor; + } + + public void setThemeColor(String themeColor) + { + this.themeColor = themeColor; + } + + public long getKeywordId() + { + return keywordId; + } + + public void setKeywordId(long keywordId) + { + this.keywordId = keywordId; + } + + public String getKeywordName() + { + return keywordName; + } + + public void setKeywordName(String keywordName) + { + this.keywordName = keywordName; + } + + public String getKeywords() + { + return keywords; + } + + public void setKeywords(String keywords) + { + this.keywords = keywords; + } + + public long getTemplateSrc() + { + return templateSrc; + } + + public void setTemplateSrc(long templateSrc) + { + this.templateSrc = templateSrc; + } + + public int getReleaseStatus() + { + return releaseStatus; + } + + public void setReleaseStatus(int releaseStatus) + { + this.releaseStatus = releaseStatus; + } + + public String getReleaseTime() + { + return releaseTime; + } + + public void setReleaseTime(String releaseTime) + { + this.releaseTime = releaseTime; + } + + public String getFileType() + { + return fileType; + } + + public void setFileType(String fileType) + { + this.fileType = fileType; + } + + public int getScore() + { + return score; + } + + public void setScore(int score) + { + this.score = score; + } + + public long getOddEven() + { + return oddEven; + } + + public void setOddEven(long oddEven) + { + this.oddEven = oddEven; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/template/MediaTemplateView.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/template/MediaTemplateView.java new file mode 100644 index 0000000..2748237 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/template/MediaTemplateView.java @@ -0,0 +1,172 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.dbo.template; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnView; +import org.zhiqim.orm.annotation.AnViewField; +import org.zhiqim.orm.annotation.AnViewJoin; +import org.zhiqim.orm.annotation.AnViewJoinValue; + +/** + * 模板素材关联表 对应视图《MEDIA_TEMPLATE_VIEW》 + */ +@AnAlias("MediaTemplateView") +@AnNew +@AnView("MEDIA_TEMPLATE,MEDIA_CANVAS") +@AnViewJoin( +{ + @AnViewJoinValue(type = "EQUAL", lTable = "MEDIA_TEMPLATE", lColumn = "MEDIA_ID", rTable = "MEDIA_CANVAS", rColumn = "MEDIA_ID") +}) +public class MediaTemplateView extends MediaTemplate +{ + private static final long serialVersionUID = 1L; + + @AnViewField(table = "MEDIA_CANVAS", column = "MEDIA_NAME") + private String mediaName; // 2.媒体名称 + @AnViewField(table = "MEDIA_CANVAS", column = "WIDTH") + private double width; // 3.画布宽度,单位像素 + @AnViewField(table = "MEDIA_CANVAS", column = "HEIGHT") + private double height; // 4.画布高度,单位像素 + @AnViewField(table = "MEDIA_CANVAS", column = "WIDTH_MM") + private double widthMm; // 5.画布宽度,单位mm + @AnViewField(table = "MEDIA_CANVAS", column = "HEIGHT_MM") + private double heightMm; // 6.画布高度,单位mm + @AnViewField(table = "MEDIA_CANVAS", column = "DPI") + private int dpi; // 7.分辨率 + @AnViewField(table = "MEDIA_CANVAS", column = "MEDIA_URL") + private String mediaUrl; // 8.媒体参考图片 + @AnViewField(table = "MEDIA_CANVAS", column = "CREATE_TIME") + private String createTime; // 9.创建时间 + @AnViewField(table = "MEDIA_CANVAS", column = "UPDATE_TIME") + private String updateTime; // 10.更新时间 + @AnViewField(table = "MEDIA_CANVAS", column = "IS_EDIT") + private int isEdit; // 11.是否支持编辑,0:支持,1:不支持 + @AnViewField(table = "MEDIA_CANVAS", column = "BLEED_SIZE") + private double bleedSize; // 12.出血尺寸,单位mm + + public String toString() + { + return Jsons.toString(this); + } + + public String getMediaName() + { + return mediaName; + } + + public void setMediaName(String mediaName) + { + this.mediaName = mediaName; + } + + public double getWidth() + { + return width; + } + + public void setWidth(double width) + { + this.width = width; + } + + public double getHeight() + { + return height; + } + + public void setHeight(double height) + { + this.height = height; + } + + public double getWidthMm() + { + return widthMm; + } + + public void setWidthMm(double widthMm) + { + this.widthMm = widthMm; + } + + public double getHeightMm() + { + return heightMm; + } + + public void setHeightMm(double heightMm) + { + this.heightMm = heightMm; + } + + public int getDpi() + { + return dpi; + } + + public void setDpi(int dpi) + { + this.dpi = dpi; + } + + public String getMediaUrl() + { + return mediaUrl; + } + + public void setMediaUrl(String mediaUrl) + { + this.mediaUrl = mediaUrl; + } + + public String getCreateTime() + { + return createTime; + } + + public void setCreateTime(String createTime) + { + this.createTime = createTime; + } + + public String getUpdateTime() + { + return updateTime; + } + + public void setUpdateTime(String updateTime) + { + this.updateTime = updateTime; + } + + public int getIsEdit() + { + return isEdit; + } + + public void setIsEdit(int isEdit) + { + this.isEdit = isEdit; + } + + public double getBleedSize() + { + return bleedSize; + } + + public void setBleedSize(double bleedSize) + { + this.bleedSize = bleedSize; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/template/UserMaterial.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/template/UserMaterial.java new file mode 100644 index 0000000..bd772bf --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/template/UserMaterial.java @@ -0,0 +1,114 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.template; + +import java.io.Serializable; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 用户素材表 对应表《USER_MATERIAL》 + */ +@AnAlias("UserMaterial") +@AnNew +@AnTable(table="USER_MATERIAL", key="SVG_ID", type="InnoDB") +public class UserMaterial implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column="SVG_ID", type="long", notNull=true) private long svgId; //1.素材编号 + @AnTableField(column="TYPE_CODE", type="string,16", notNull=true) private String typeCode; //2.素材类型,bg:背景,text:文字,image:素材,qcode:二维码 + @AnTableField(column="CAT_CODE", type="string,16", notNull=true) private String catCode; //3.分类编码 + @AnTableField(column="SVG_SEQ", type="int", notNull=true) private int svgSeq; //4.素材序号 + @AnTableField(column="DESIGNER", type="string,32", notNull=true) private String designer; //5.设计师 + @AnTableField(column="SVG_CODE", type="string,50000", notNull=true) private String svgCode; //6.SVG代码 + @AnTableField(column="KEYWORDS", type="string,128", notNull=false) private String keywords; //7.素材关键字,多个空格分隔 + + public String toString() + { + return Jsons.toString(this); + } + + public long getSvgId() + { + return svgId; + } + + public void setSvgId(long svgId) + { + this.svgId = svgId; + } + + public String getTypeCode() + { + return typeCode; + } + + public void setTypeCode(String typeCode) + { + this.typeCode = typeCode; + } + + public String getCatCode() + { + return catCode; + } + + public void setCatCode(String catCode) + { + this.catCode = catCode; + } + + public int getSvgSeq() + { + return svgSeq; + } + + public void setSvgSeq(int svgSeq) + { + this.svgSeq = svgSeq; + } + + public String getDesigner() + { + return designer; + } + + public void setDesigner(String designer) + { + this.designer = designer; + } + + public String getSvgCode() + { + return svgCode; + } + + public void setSvgCode(String svgCode) + { + this.svgCode = svgCode; + } + + public String getKeywords() + { + return keywords; + } + + public void setKeywords(String keywords) + { + this.keywords = keywords; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/user/BuyerUser.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/user/BuyerUser.java new file mode 100644 index 0000000..fee8c6e --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/user/BuyerUser.java @@ -0,0 +1,59 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.user; + +import java.io.Serializable; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * 客户表 对应表《BUYER_USER》 + */ +@AnAlias("BuyerUser") +@AnNew +@AnTable(table="BUYER_USER", key="BUYER_CODE", type="InnoDB") +public class BuyerUser implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column="BUYER_CODE", type="string,64", notNull=true) private String buyerCode; //1.客户编码 + @AnTableField(column="ORDER_COUNT", type="int", notNull=true) private int orderCount; //2.设计订单数 + + public String toString() + { + return Jsons.toString(this); + } + + public String getBuyerCode() + { + return buyerCode; + } + + public void setBuyerCode(String buyerCode) + { + this.buyerCode = buyerCode; + } + + public int getOrderCount() + { + return orderCount; + } + + public void setOrderCount(int orderCount) + { + this.orderCount = orderCount; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/utils/AssessIdUtil.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/utils/AssessIdUtil.java new file mode 100644 index 0000000..bd7682c --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/utils/AssessIdUtil.java @@ -0,0 +1,43 @@ +package com.zhiqim.yangcai.design.dbo.utils; + +import java.text.SimpleDateFormat; +import java.util.Date; + +/** + * + * [简要描述]:考核题库ID
+ * [详细描述]:
+ * + * @version 1.0 @author hc 2021年5月20日 新建与整理 + */ +public class AssessIdUtil +{ + private static long tmpID = 0; + + private static boolean tmpIDlocked = false; + + public static long getId() + { + long ltime = 0; + while (true) + { + if (tmpIDlocked == false) + { + tmpIDlocked = true; + // 当前:(年、月、日、时、分、秒、毫秒)*10000 + ltime = Long.valueOf(new SimpleDateFormat("yyMMddhhmmssSSS").format(new Date()).toString()) * 10000; + if (tmpID < ltime) + { + tmpID = ltime; + } + else + { + tmpID = tmpID + 1; + ltime = tmpID; + } + tmpIDlocked = false; + return ltime; + } + } + } +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/utils/BaseUtil.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/utils/BaseUtil.java new file mode 100644 index 0000000..efa7aa9 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/utils/BaseUtil.java @@ -0,0 +1,271 @@ +package com.zhiqim.yangcai.design.dbo.utils; + +import java.text.DecimalFormat; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import org.zhiqim.kernel.constants.SignConstants; +import org.zhiqim.kernel.util.Strings; +import org.zhiqim.kernel.util.Validates; + +import com.zhiqim.yangcai.design.model.PrintMsSize; + +/** + * 常用工具类 + * + * @author zhouwenbin + * + */ +public class BaseUtil implements SignConstants +{ + /**** + * 计算模数 + * userWidth和userHeight 小于等于 0 时 取 alias 第一个数据尺寸值 进行比较 + * + * @param alias 标准工厂尺寸,多个逗号隔开 例:92X56 含出血 + * @param userWidth 用户尺寸宽度,单位/mm 不含出血 + * @param userHeight 用户尺寸高度,单位/mm 不含出血 + * @param bleed 出血 单位/mm + * @return 模位数 + * @throws Exception + */ + public static int calcMod(String alias, int userWidth, int userHeight, int bleed) throws Exception + { + List list = getPtintMsSize(alias, userWidth, userHeight, bleed); + Collections.sort(list); + return list.get(0).getPrintMs(); + + } + + /**** + * 通过 模数获取 对应尺寸值 列表 + * userWidth和userHeight 小于等于 0 时 返回 alias 第一个数据尺寸值 + * + * @param alias 标准工厂尺寸,多个逗号隔开 例:92X56 含出血 + * @param userWidth 不含出血 + * @param userHeight 不含出血 + * @param bleed 模位数 + * @return + * @throws Exception + */ + public static List getPtintMsSize(String alias, int userWidth, int userHeight, int bleed) throws Exception + { + List msizeList = new ArrayList(); + alias = Strings.removeAllBlank(alias.toLowerCase()).replace(",", ",").toLowerCase(); + alias = alias.replace("X", "x"); + String[] strs = alias.split(","); + + // 默认尺寸宽高 + int defaultWidth = Integer.parseInt(strs[0].split("x")[0]);// 含出血 + int defaultHeight = Integer.parseInt(strs[0].split("x")[1]);// 含出血 + userWidth = userWidth <= 0 ? defaultWidth - bleed : userWidth; + userHeight = userHeight <= 0 ? defaultHeight - bleed : userHeight; + + int ms = 0; + for (int i = 0; i < strs.length; i++) + { + String[] strsTmp = strs[i].split("x"); + int width = Integer.parseInt(strsTmp[0]);// 含出血 + int height = Integer.parseInt(strsTmp[1]);// 含出血 + int side = 0; + if (strsTmp.length > 2) + { + // 类似手提袋的侧边搞数据不计算出血,// yixin 2019-06-06 先不计算出血 + side = Integer.parseInt(strsTmp[2].toLowerCase().replace("mm", "")); + } + + int m1 = ((userWidth + bleed - 1) / width + 1) * ((userHeight + bleed - 1) / height + 1); + int m2 = ((userWidth + bleed - 1) / height + 1) * ((userHeight + bleed - 1) / width + 1); + + double printWidth = width; + double printHeight = height; + double printSide = side; + + // 取最小模 + if (m1 > m2) + { + m1 = m2; + } + + if (ms == 0 || ms < m1) + { + ms = m1; + } + + if (ms == 0) + { + ms = 1; + } + + PrintMsSize mSize = new PrintMsSize(); + mSize.setPrintMs(ms); + mSize.setPrintWidth(printWidth); + mSize.setPrintHeight(printHeight); + mSize.setPrintSide(printSide); + msizeList.add(mSize); + } + Collections.sort(msizeList); + return msizeList; + } + + /** + * 计算尺寸面积 + * + * @param alias 具体尺寸,如:214X289 + * @return + */ + public static int calcSizeArea(String alias) + { + String aligns = alias.toLowerCase(); + String[] strs = aligns.split(","); + + int area = 0; // 面积 mm*mm + for (int i = 0; i < strs.length; i++) + { + int bw = Integer.parseInt(strs[i].split("x")[0]); + int bh = Integer.parseInt(strs[i].split("x")[1]); + + if (bw * bh > area) + { + area = bw * bh; + } + } + + return area; + } + + /** + * 获取尺寸的长宽值 + * + * @param alias + * @return + */ + public static List getSizeWH(String alias) + { + String aligns = alias.toLowerCase(); + String[] strs = aligns.split(","); + + List list = new ArrayList<>(); + for (int i = 0; i < strs.length; i++) + { + int bw = Integer.parseInt(strs[i].split("x")[0]); + int bh = Integer.parseInt(strs[i].split("x")[1]); + + int[] ret = + { + bw, bh + }; + list.add(ret); + } + + return list; + } + + /** + * 计算重量 + * + * @param width 自定义宽度 默认为-1 + * @param height 自定义高度 默认为-1 + * @param total 数量 + * @param unitKg 1000张重量,单位kg + * @param sizeAlias 尺寸 如:214X289 + * @return + */ + public static double calcKg(int width, int height, int total, double unitKg, String sizeAlias) + { + double kg = 0; + if (width <= 0 || height <= 0) + { + kg = 1.0 * total / 1000 * unitKg; // 总数量/1000*单位重量 + } + else + {// 自定义长宽 + int area = BaseUtil.calcSizeArea(sizeAlias); // 单位面积 + kg = (1.0 * width * height / area) * total / 1000 * unitKg; + } + + DecimalFormat df = new DecimalFormat("#.00"); + return Double.parseDouble(df.format(kg)); + } + + /** + * 文件大小单位 + * + * @param size 字节数 + * @return + */ + public static String getPrintSize(long size) + { + if (size < 1024) + { + return size + "B"; + } + + long kSize = size / KiB; + if (kSize < 1024) + {// 忽略KiB以下 + return kSize + "KiB"; + } + + long qSize = size / MiB; + long rSize = size % MiB; + if (qSize < 1024) + {// 要保留最后1位小数 + return qSize + "." + (rSize / (MiB / 10)) + "MiB"; + } + + // 保留1位小数 + qSize = size / GiB; + rSize = size % GiB; + return qSize + "." + (rSize / (GiB / 10)) + "GiB"; + + } + + /** + * 删除s中空白,多个空格间 只保留一个空格 (包括空格以下(0x00-0x20)之间的所有字符,包括\t,\r,\n,\b等) + * + * 举例: s = " a\tb\rc d ";得到结果是:returnString = "abcd"; + * + * @param s 原字符串 + * @return 删除空白之后的字符串 + */ + public static String removeBlank(String s) + { + if (Validates.isEmpty(s)) + { + return s; + } + + StringBuilder strb = new StringBuilder(); + for (int i = 0; i < s.length(); i++) + { + char c = s.charAt(i); + if (c < _SPACE_ || c == _SPACE_ZH_ || c == _SPACE_BOM_) + { + continue; + } + + if (c == _SPACE_) + { + if (strb.charAt(strb.length() - 1) != _SPACE_) + { + strb.append(c);// 当前是空格,上一个符也不是空格,则保留当前空格 + } + } + else + { + strb.append(c); + } + } + + return strb.toString(); + } + + public static void main(String[] args) throws Exception + { + int ms = BaseUtil.calcMod("92X56", 140, 68, 0); + System.out.println(ms); + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/utils/CalculationUtil.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/utils/CalculationUtil.java new file mode 100644 index 0000000..d0e120a --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/utils/CalculationUtil.java @@ -0,0 +1,633 @@ +package com.zhiqim.yangcai.design.dbo.utils; + +import java.math.BigDecimal; +import java.math.RoundingMode; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.util.Amounts; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.manager.dao.ZmrParamDao; +import org.zhiqim.manager.dbo.ZmrDept; +import org.zhiqim.manager.dbo.ZmrOperator; +import org.zhiqim.manager.dbo.ZmrOrg; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.constants.DraftConstants; +import com.zhiqim.yangcai.design.dao.DesignTypeDao; +import com.zhiqim.yangcai.design.dao.StatDao; +import com.zhiqim.yangcai.design.dbo.design.DesignType; +import com.zhiqim.yangcai.design.dbo.order.DesignSelfView; +import com.zhiqim.yangcai.design.dbo.retention.RetentionDetails; +import com.zhiqim.yangcai.design.dbo.stat.DesignerOrderPerformanceStat; + +/** + * 数字计算工具类 + * TODO:类功能介绍 + * + * @version v1.0.0 @author yixin 2019年6月18日 新建与整理 + */ +@AnAlias("CalculationUtil") +public class CalculationUtil +{ + + private static Map designTypeMap = new HashMap<>(); // 产品类型时效信息Map + + public static void designTypeListFill() throws Exception + { + List designTypeList = DesignTypeDao.listAll(); + for (DesignType designType : designTypeList) + { + designTypeMap.put(designType.getTypeId(), designType.getEffectiveEndTime()); + } + + } + + public static double subtraction(double a, double b) + { + return new BigDecimal(a - b).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); + } + + /** + * + * 退回率计算 + * + * @author gjx + * @param orderBackSum 退回次数 + * @param orderPassCount 定稿单数 + * @return + */ + public static String calculatePercent(int count, int sum) + { + if (sum == 0) + { + return "0%"; + } + BigDecimal countBig = new BigDecimal(count * 100 + ""); + BigDecimal sumBig = new BigDecimal(sum + ""); + double percent = countBig.divide(sumBig, 2, RoundingMode.HALF_UP).doubleValue(); + return percent + "%"; + } + + /** + * + * 定稿占比 + * + * @author gjx + * @param passOrderCount 组织定稿数 + * @param orgAllOrder 组织总定稿数 + * @return + */ + public static String orgOrderPercent(int passOrderCount, int orgAllOrder) + { + if (orgAllOrder == 0) + { + return "0%"; + } + BigDecimal passOrderCountBig = new BigDecimal(passOrderCount * 100 + ""); + BigDecimal orgAllOrderBig = new BigDecimal(orgAllOrder + ""); + double orgPercent = passOrderCountBig.divide(orgAllOrderBig, 2, RoundingMode.HALF_UP).doubleValue(); + return orgPercent + "%"; + } + + /** + * 计算定稿倒计时 + * + * @author gjx + * @throws Exception + */ + public static String reckonEndOrderTimeliness(Date designDraftTime, long typeId) throws Exception + { + if (typeId > 0 && designDraftTime != null) + { + if (!designTypeMap.containsKey(typeId)) + { + designTypeListFill(); + } + int minute = designTypeMap.get(typeId); // 得到定稿时效 + SimpleDateFormat simple = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String nowDesignDraftTime = DateTimes.getNextDateTimeStringBySecond(simple.format(designDraftTime), minute * 60); + Date compareTime = simple.parse(nowDesignDraftTime); + String currentDateTime = simple.format(new Date()); + Date currentDate = simple.parse(currentDateTime); + + if (currentDate.getTime() > compareTime.getTime()) + {// 已超时 + int diffMinte = DateTimes.compareMinute(currentDate, compareTime); + return dateTimeTran(diffMinte); + } + else + { + int diffMinte = DateTimes.compareMinute(compareTime, currentDate); + return dateTimeTran(diffMinte); + } + } + return "订单产品有误"; + } + + /** + * + * 定稿是否超时标识 + * + * @author gjx + * @param designDraftTime + * @param typeId + * @return + * @throws ParseException + */ + public static boolean reckonEndOrderTimelinessFlag(Date designDraftTime, long typeId) throws Exception + { + if (typeId > 0 && designDraftTime != null) + { + if (!designTypeMap.containsKey(typeId)) + { + designTypeListFill(); + } + int minute = designTypeMap.get(typeId); // 得到定稿时效 + SimpleDateFormat simple = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String nowDesignDraftTime = DateTimes.getNextDateTimeStringBySecond(simple.format(designDraftTime), minute * 60); + Date compareTime = simple.parse(nowDesignDraftTime); + String currentDateTime = simple.format(new Date()); + Date currentDate = simple.parse(currentDateTime); + + if (currentDate.getTime() > compareTime.getTime()) + {// 已超时 + return true; + } + else + { + return false; + } + } + return false; + } + + /** + * + * 分钟转化成 天:小时:分钟格式 + * + * @author gjx + * @param diffMinte + * @return + */ + public static String dateTimeTran(int diffMinte) + { + if (diffMinte == 0) + { + return "小于1分钟"; + } + int day = 0; + int hour = 0; + int minutes = 0; + if (diffMinte / (24 * 60) > 0) + { + day = diffMinte / (24 * 60); + diffMinte = diffMinte % (24 * 60); + } + if (diffMinte / 60 > 0) + { + hour = diffMinte / 60; + } + minutes = diffMinte % 60; + StringBuilder builder = new StringBuilder(); + builder.append(day > 0 ? day + "天" : ""); + builder.append(hour > 0 ? hour + "小时" : ""); + builder.append(minutes > 0 ? minutes + "分钟" : ""); + return builder.toString(); + } + + /** + * 滞留单处理倒计时计算 + * + * @author gjx + * @return + */ + public static String retentDealCountDownCal(HttpRequest request, long designId) throws Exception + { + if (designId > 0) + { + RetentionDetails retentionDetails = ORM.get(ZTable.class).item(RetentionDetails.class, new Selector().addMust("designId", designId)); + if (retentionDetails == null) + { + return ""; + } + String paramValue = ZmrParamDao.getString(request.getContext(), "yangcai.design", "retentDealHourTime"); + Date retentDealTime = retentionDetails.getRetentDealTime(); + if (retentDealTime == null) + { + return ""; + } + SimpleDateFormat simple = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String newestTime = DateTimes.getNextDateTimeStringByHour(simple.format(retentDealTime), Integer.valueOf(paramValue)); + String currentDate = simple.format(new Date()); + if (simple.parse(newestTime).getTime() > simple.parse(currentDate).getTime()) + { + int diffMinte = DateTimes.compareMinute(newestTime, currentDate); + return dateTimeTran(diffMinte); + } + else + { + return ""; + } + } + return ""; + } + + /** + * + * 滞留单处理限制时间 + * + * @author gjx + * @param request + * @return + * @throws Exception + */ + public static String retentDealDateTime(HttpRequest request) throws Exception + { + String paramValue = ZmrParamDao.getString(request.getContext(), "yangcai.design", "retentDealHourTime"); + return paramValue; + } + + /** + * + * 设计退款率,退款比例计算 + * + * @author gjx + * @param finalizeMoneySum + * @param refundMoneySum + * @return + * @throws Exception + */ + public static String designerRefundCalculate(long finalizeMoneySum, long refundMoneySum) throws Exception + { + if (finalizeMoneySum > 0) + { + BigDecimal refundMoneySumBig = new BigDecimal(refundMoneySum * 100 + ""); + BigDecimal finalizeMoneySumBig = new BigDecimal(finalizeMoneySum + ""); + double percent = refundMoneySumBig.divide(finalizeMoneySumBig, 2, RoundingMode.HALF_UP).doubleValue(); + return percent + "%"; + } + return "0%"; + } + + /** + * + * 根据操作员获取上级部门负责人 + * + * @author gjx + * @param operatorCode + * @return + * @throws Exception + */ + public static String operatorGetDeptSatrap(String operatorCode) throws Exception + { + if (Validates.isEmpty(operatorCode)) + { + return ""; + } + ZmrOperator operator = ORM.get(ZTable.class).item(ZmrOperator.class, new Selector().addMaybe("operatorCode", operatorCode)); + if (operator == null) + { + return ""; + } + String operatorDept = operator.getOperatorDept(); + if (operatorDept == null || "".equals(operatorDept)) + { + return ""; + } + String[] deptIdArray = operatorDept.split(","); + if (deptIdArray == null || deptIdArray.length == 0) + { + return ""; + } + long deptId = Long.valueOf(deptIdArray[0]); + ZmrDept dept = ORM.get(ZTable.class).item(ZmrDept.class, new Selector().addMaybe("deptId", deptId)); + if (dept == null) + { + return ""; + } + return dept.getDeptManager(); + } + + /** + * + * 根据操作员获取组织名 + * + * @author jiangbin + * @param operatorCode + * @return + * @throws Exception + */ + public static String operatorGetOrgName(String operatorCode) throws Exception + { + if (Validates.isEmpty(operatorCode)) + { + return ""; + } + ZmrOperator operator = ORM.get(ZTable.class).item(ZmrOperator.class, new Selector().addMaybe("operatorCode", operatorCode)); + if (operator == null) + { + return ""; + } + long operatorOrgId = operator.getOrgId(); + if (operatorOrgId <= 0) + { + return ""; + } + ZmrOrg org = ORM.get(ZTable.class).item(ZmrOrg.class, new Selector().addMust("orgId", operatorOrgId)); + if (Validates.isEmpty(org)) + { + return ""; + } + return org.getOrgName(); + } + + /** + * + * 计算审核退回处理是否超时 + * + * @author gjx + * @param checkTime + * @return + * @throws Exception + */ + public static boolean doCalculCheckBackCountDownBefore(String checkTime) throws Exception + { + if (Validates.isEmpty(checkTime)) + { + return false; + } + SimpleDateFormat simple = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String currTime = simple.format(new Date()); + int minute = DateTimes.compareMinute(currTime, checkTime); + if (minute < 120) + { + return false; + } + return true; + } + + /** + * + * 审核退回处理时间计算 + * + * @author gjx + * @param checkTime + * @return + * @throws Exception + */ + public static String doCalculCheckBackCountDown(String checkTime) throws Exception + { + if (Validates.isEmpty(checkTime)) + { + return null; + } + SimpleDateFormat simple = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String currTime = simple.format(new Date()); + int minute = DateTimes.compareMinute(currTime, checkTime); + if (minute < 120) + { + int countDownMinute = 120 - minute; + return dateTimeTran(countDownMinute); + } + return dateTimeTran(minute - 120); + } + + /** + * + * 计算审核退回处理是否超时 + * + * @author gjx + * @param checkTime + * @param dateTime + * @return + * @throws Exception + */ + public static boolean doCalculCheckBackCountDownBefore(String checkTime, String dateTime) throws Exception + { + if (Validates.isEmpty(checkTime) || Validates.isEmpty(dateTime)) + { + return false; + } + SimpleDateFormat simple = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String currTime = simple.format(simple.parse(dateTime)); + String checkBackTime = simple.format(simple.parse(checkTime)); + int minute = DateTimes.compareMinute(currTime, checkBackTime); + if (minute < 120) + { + return false; + } + return true; + } + + /** + * + * 审核退回处理时间计算 + * + * @author gjx + * @param checkTime + * @param dateTime + * @return + * @throws Exception + */ + public static String doCalculCheckBackCountDown(String checkTime, String dateTime) throws Exception + { + if (Validates.isEmpty(checkTime)) + { + return null; + } + SimpleDateFormat simple = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + Date designEndTime = simple.parse(dateTime); + String currTime = simple.format(designEndTime); + int minute = DateTimes.compareMinute(currTime, checkTime); + if (minute < 120) + { + int countDownMinute = 120 - minute; + return dateTimeTran(countDownMinute); + } + return dateTimeTran(minute - 120); + } + + /** + * + * 审核退回处理时间计算 + * + * @author gjx + * @param checkTime + * @param dateTime + * @return + * @throws Exception + */ + public static int doCalculCheckBackTotalTime(String checkTime, String dateTime) throws Exception + { + if (Validates.isEmpty(checkTime)) + { + return 0; + } + SimpleDateFormat simple = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String currTime = simple.format(simple.parse(dateTime)); + String checkBackTime = simple.format(simple.parse(checkTime)); + int minute = DateTimes.compareMinute(currTime, checkBackTime); + return minute; + } + + /** + * + * 计算滞留时长 + * + * @author gjx + * @param createTime + * @return + * @throws Exception + */ + public static String retentionDateTime(Date createTime) throws Exception + { + if (createTime != null) + { + SimpleDateFormat simple = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + int retentDealMinute = DateTimes.compareMinute(simple.format(new Date()), simple.format(createTime)); + return CalculationUtil.dateTimeTran(retentDealMinute); + } + + return ""; + } + + /** + * + * [简要描述]: 获取设计师订单绩效订单
+ * [详细描述]:
+ * + * @author gjx + * @param designId + * @param designEndTime + * @return + */ + public static Object getDesignerOrderPerformance(DesignSelfView order, String designer) throws Exception + { + // long typeId = order.getTypeId(); + int draftType = order.getDraftType(); + + long designPrice = 0L; + if (order.getDesignPrice() == 0) + { + designPrice = StatDao.calculateOrderPerformance(order); + } + else + { + designPrice = order.getDesignPrice(); + } + + if (order.getDesignEndTime().before(Sqls.toTimestampBegin(DateTimes.getFirstMonthDay()))) + {// 往月直接查设计师订单绩效表 + DesignerOrderPerformanceStat stat = ORM.get(ZTable.class).item(DesignerOrderPerformanceStat.class, order.getDesignId()); + if (stat == null) + { + return ""; + } + if (draftType == DraftConstants.DRAFT_TEMPLATE.value()) + { + int printKs = stat.getPrintKs(); + String fee = Amounts.toYuan(stat.getOrderDesignerFee()); + String templateFee = Amounts.toYuan(stat.getTemplateDraftFee()); + String desc = designPrice + "元 =  " + templateFee + " (改稿单价) "; + if (printKs > 0) + { + desc = fee + "元 =  " + templateFee + " (改稿单价)* " + printKs + " (款数)"; + } + return getTemplateDraftOrderPerformanceEquation(desc, fee); + } + String prdConvertFee = Amounts.toYuan(stat.getPrdConvertFee()); + return getOrderPerformanceEquation(order, prdConvertFee, designPrice); + } + else + { + int printKs = order.getPrintKs(); + + if (draftType == DraftConstants.DRAFT_TEMPLATE.value()) + {// 改稿自来稿设计费一律按0.5元 * 款计算不区分产品 + String fee = Amounts.toYuan(StatDao.calculateTemplateDraftOrderPrice(order)); + String templateFee = Amounts.toYuan(StatDao.calculateTemplateDraftProductPrice(order)); + String desc = designPrice + "元 =  " + templateFee + " (改稿单价) "; + if (printKs > 0) + { + desc = designPrice + "元 =  " + templateFee + " (改稿单价)* " + printKs + " (款数)"; + } + return getTemplateDraftOrderPerformanceEquation(desc, fee); + } + String prdConvertFee = Amounts.toYuan(StatDao.calculateOrderProductPerformance(order)); + return getOrderPerformanceEquation(order, prdConvertFee, designPrice); + } + } + + /** + * + * [简要描述]: 获取改稿订单绩效表达式
+ * [详细描述]:
+ * + * @author gjx + * @param desc + * @param fee + * @return + */ + public static String getTemplateDraftOrderPerformanceEquation(String desc, Object fee) + { + return "" + fee + "元"; + } + + /** + * + * [简要描述]: 获取订单绩效表达式
+ * [详细描述]:
+ * + * @author gjx + * @param order + * @param prdConvertFee + * @param multiKsFee + * @return + */ + private static String getOrderPerformanceEquation(DesignSelfView order, String prdConvertFee, long designPrice) + { + long typeId = order.getTypeId(); + int printKs = order.getPrintKs(); + int designCopies = order.getDesignCopies(); + if (designCopies < 1) + {// 设计费最少一份 + designCopies = 1; + } + + long urgentPrice = 0L; + if (order.isUrgent() && Validates.isNotEmpty(order.getUrgentPrice())) + { + urgentPrice = order.getUrgentPrice(); + } + + Double fee = (double) (designPrice + urgentPrice) / 100; + String desc = ""; + if (designCopies >= printKs || typeId == 13879L) + { // 设计费份数>=款数,则订单单价为:产品单价*设计费份数+加急费 海报产品特殊处理 设计单 = 单价*设计费份数 + 加急费 + desc = fee + "元 =  " + prdConvertFee + "(产品单价)* " + designCopies + " (多份设计费)+" + urgentPrice / 100 + "(加急费)"; + } + else + {// 设计费份数<款数,则订单单价为:产品单价*设计费份数+(款数-设计费份数)*改稿单价 + Double templateDraftPrice = Double.valueOf(Amounts.toYuan(StatDao.calculateTemplateDraftProductPrice(order))); + desc = fee + "元 =  " + prdConvertFee + "(产品单价)* " + designCopies + " (多份设计费)+ " + urgentPrice / 100 + "(加急费)" + + Double.valueOf((printKs - designCopies) * templateDraftPrice); + } + + String result = "" + fee + "元"; + return result; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/utils/LunarCalendarUtil.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/utils/LunarCalendarUtil.java new file mode 100644 index 0000000..b411526 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/utils/LunarCalendarUtil.java @@ -0,0 +1,431 @@ +/* + * 版权所有 (C) 2015 知启蒙(ZHIQIM) 保留所有权利。 + * + * 指定登记&发行网站: https://www.zhiqim.com/ 欢迎加盟知启蒙,[编程有你,知启蒙一路随行]。 + * + * 本文采用《知启蒙许可证》,除非符合许可证,否则不可使用该文件! + * 1、您可以免费使用、修改、合并、出版发行和分发,再授权软件、软件副本及衍生软件; + * 2、您用于商业用途时,必须在原作者指定的登记网站,按原作者要求进行登记; + * 3、您在使用、修改、合并、出版发行和分发时,必须包含版权声明、许可声明,及保留原作者的著作权、商标和专利等知识产权; + * 4、您在互联网、移动互联网等大众网络下发行和分发再授权软件、软件副本及衍生软件时,必须在原作者指定的发行网站进行发行和分发; + * 5、您可以在以下链接获取一个完整的许可证副本。 + * + * 许可证链接:http://zhiqim.org/licenses/zhiqim_register_publish_license.htm + * + * 除非法律需要或书面同意,软件由原始码方式提供,无任何明示或暗示的保证和条件。详见完整许可证的权限和限制。 + */ +package com.zhiqim.yangcai.design.dbo.utils; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.Locale; + +public class LunarCalendarUtil +{ + + private int year; // 农历的年份 + private int month; + private int day; + private String lunarMonth; // 农历的月份 + public int leapMonth = 0; // 闰的是哪个月 + + final static String chineseNumber[] = + { + "一", "二", "三", "四", "五", "六", "七", "八", "九", "十", "十一", "十二" + }; + static SimpleDateFormat chineseDateFormat = new SimpleDateFormat("yyyy年MM月dd日", Locale.CHINA); + final static long[] lunarInfo = new long[] + { // + 0x04bd8, 0x04ae0, 0x0a570, 0x054d5, 0x0d260, 0x0d950, 0x16554, 0x056a0, 0x09ad0, // + 0x055d2, 0x04ae0, 0x0a5b6, 0x0a4d0, 0x0d250, 0x1d255, 0x0b540, 0x0d6a0, 0x0ada2, // + 0x095b0, 0x14977, 0x04970, 0x0a4b0, 0x0b4b5, 0x06a50, 0x06d40, 0x1ab54, 0x02b60, // + 0x09570, 0x052f2, 0x04970, 0x06566, 0x0d4a0, 0x0ea50, 0x06e95, 0x05ad0, 0x02b60, // + 0x186e3, 0x092e0, 0x1c8d7, 0x0c950, 0x0d4a0, 0x1d8a6, 0x0b550, 0x056a0, 0x1a5b4, // + 0x025d0, 0x092d0, 0x0d2b2, 0x0a950, 0x0b557, 0x06ca0, 0x0b550, 0x15355, 0x04da0, // + 0x0a5d0, 0x14573, 0x052d0, 0x0a9a8, 0x0e950, 0x06aa0, 0x0aea6, 0x0ab50, 0x04b60, // + 0x0aae4, 0x0a570, 0x05260, 0x0f263, 0x0d950, 0x05b57, 0x056a0, 0x096d0, 0x04dd5, // + 0x04ad0, 0x0a4d0, 0x0d4d4, 0x0d250, 0x0d558, 0x0b540, 0x0b5a0, 0x195a6, 0x095b0, // + 0x049b0, 0x0a974, 0x0a4b0, 0x0b27a, 0x06a50, 0x06d40, 0x0af46, 0x0ab60, 0x09570, // + 0x04af5, 0x04970, 0x064b0, 0x074a3, 0x0ea50, 0x06b58, 0x055c0, 0x0ab60, 0x096d5, // + 0x092e0, 0x0c960, 0x0d954, 0x0d4a0, 0x0da50, 0x07552, 0x056a0, 0x0abb7, 0x025d0, // + 0x092d0, 0x0cab5, 0x0a950, 0x0b4a0, 0x0baa4, 0x0ad50, 0x055d9, 0x04ba0, 0x0a5b0, // + 0x15176, 0x052b0, 0x0a930, 0x07954, 0x06aa0, 0x0ad50, 0x05b52, 0x04b60, 0x0a6e6, // + 0x0a4e0, 0x0d260, 0x0ea65, 0x0d530, 0x05aa0, 0x076a3, 0x096d0, 0x04bd7, 0x04ad0, // + 0x0a4d0, 0x1d0b6, 0x0d250, 0x0d520, 0x0dd45, 0x0b5a0, 0x056d0, 0x055b2, 0x049b0, // + 0x0a577, 0x0a4b0, 0x0aa50, 0x1b255, 0x06d20, 0x0ada0 + }; + + // 农历部分假日 + final static String[] lunarHoliday = new String[] + { + "0101 春节", "0115 元宵", "0505 端午", "0707 情人", "0715 中元", "0815 中秋", "0909 重阳", "1208 腊八", "1224 小年", "0100 除夕" + }; + + // 公历部分节假日 + final static String[] solarHoliday = new String[] + { // + "0101 元旦", "0214 情人", "0308 妇女", "0312 植树", "0315 消费者权益日", "0401 愚人", "0501 劳动", "0504 青年", // + "0512 护士", "0601 儿童", "0701 建党", "0801 建军", "0808 父亲", "0909 毛泽东逝世纪念", "0910 教师", "0928 孔子诞辰", // + "1001 国庆", "1006 老人", "1024 联合国日", "1112 孙中山诞辰纪念", "1220 澳门回归纪念", "1225 圣诞", "1226 毛泽东诞辰纪念" + }; + + // ====== 传回农历 y年的总天数 + final private static int yearDays(int y) + { + int i, sum = 348; + for (i = 0x8000; i > 0x8; i >>= 1) + { + if ((lunarInfo[y - 1900] & i) != 0) + { + sum += 1; + } + } + return (sum + leapDays(y)); + } + + // ====== 传回农历 y年闰月的天数 + final private static int leapDays(int y) + { + if (leapMonth(y) != 0) + { + if ((lunarInfo[y - 1900] & 0x10000) != 0) + { + return 30; + } + else + { + return 29; + } + } + else + { + return 0; + } + } + + // ====== 传回农历 y年闰哪个月 1-12 , 没闰传回 0 + final private static int leapMonth(int y) + { + int result = (int) (lunarInfo[y - 1900] & 0xf); + return result; + } + + // ====== 传回农历 y年m月的总天数 + final private static int monthDays(int y, int m) + { + if ((lunarInfo[y - 1900] & (0x10000 >> m)) == 0) + { + return 29; + } + else + { + return 30; + } + } + + // ====== 传回农历 y年的生肖 + final public String animalsYear(int year) + { + final String[] Animals = new String[] + { + "鼠", "牛", "虎", "兔", "龙", "蛇", "马", "羊", "猴", "鸡", "狗", "猪" + }; + return Animals[(year - 4) % 12]; + } + + // ====== 传入 月日的offset 传回干支, 0=甲子 + final private static String cyclicalm(int num) + { + final String[] Gan = new String[] + { + "甲", "乙", "丙", "丁", "戊", "己", "庚", "辛", "壬", "癸" + }; + final String[] Zhi = new String[] + { + "子", "丑", "寅", "卯", "辰", "巳", "午", "未", "申", "酉", "戌", "亥" + }; + return (Gan[num % 10] + Zhi[num % 12]); + } + + // ====== 传入 offset 传回干支, 0=甲子 + final public String cyclical(int year) + { + int num = year - 1900 + 36; + return (cyclicalm(num)); + } + + public static String getChinaDayString(int day) + { + String chineseTen[] = + { + "初", "十", "廿", "卅" + }; + int n = day % 10 == 0 ? 9 : day % 10 - 1; + if (day > 30) + { + return ""; + } + if (day == 10) + { + return "初十"; + } + else + { + return chineseTen[day / 10] + chineseNumber[n]; + } + } + + /** + * 传出y年m月d日对应的农历. yearCyl3:农历年与1864的相差数 ? monCyl4:从1900年1月31日以来,闰月数 + * dayCyl5:与1900年1月31日相差的天数,再加40 ? + * + * isday: 这个参数为false---日期为节假日时,阴历日期就返回节假日 ,true---不管日期是否为节假日依然返回这天对应的阴历日期 + * + * @return + */ + public String getLunarDate(int year_log, int month_log, int day_log, boolean isday) + { + int yearCyl = 0; + int monCyl = 0; + int dayCyl = 0; + // int leapMonth = 0; + String nowadays; + Date baseDate = null; + Date nowaday = null; + try + { + baseDate = chineseDateFormat.parse("1900年1月31日"); + } + catch (ParseException e) + { + e.printStackTrace(); // To change body of catch statement use + // Options | File Templates. + } + + nowadays = year_log + "年" + month_log + "月" + day_log + "日"; + try + { + nowaday = chineseDateFormat.parse(nowadays); + } + catch (ParseException e) + { + e.printStackTrace(); // To change body of catch statement use + // Options | File Templates. + } + + // 求出和1900年1月31日相差的天数 + int offset = (int) ((nowaday.getTime() - baseDate.getTime()) / 86400000L); + dayCyl = offset + 40; + monCyl = 14; + // System.out.println(dayCyl + monCyl + yearCyl); + // 用offset减去每农历年的天数 + // 计算当天是农历第几天 + // i最终结果是农历的年份 + // offset是当年的第几天 + int iYear, daysOfYear = 0; + for (iYear = 1900; iYear < 10000 && offset > 0; iYear++) + { + daysOfYear = yearDays(iYear); + offset -= daysOfYear; + monCyl += 12; + } + if (offset < 0) + { + offset += daysOfYear; + iYear--; + monCyl -= 12; + } + // 农历年份 + year = iYear; + setYear(year); // 设置公历对应的农历年份 + + yearCyl = iYear - 1864; + leapMonth = leapMonth(iYear); // 闰哪个月,1-12 + boolean leap = false; + + // 用当年的天数offset,逐个减去每月(农历)的天数,求出当天是本月的第几天 + int iMonth, daysOfMonth = 0; + for (iMonth = 1; iMonth < 13 && offset > 0; iMonth++) + { + // 闰月 + if (leapMonth > 0 && iMonth == (leapMonth + 1) && !leap) + { + --iMonth; + leap = true; + daysOfMonth = leapDays(year); + } + else + { + daysOfMonth = monthDays(year, iMonth); + } + + offset -= daysOfMonth; + // 解除闰月 + if (leap && iMonth == (leapMonth + 1)) + { + leap = false; + } + if (!leap) + { + monCyl++; + } + } + // offset为0时,并且刚才计算的月份是闰月,要校正 + if (offset == 0 && leapMonth > 0 && iMonth == leapMonth + 1) + { + if (leap) + { + leap = false; + } + else + { + leap = true; + --iMonth; + --monCyl; + } + } + // offset小于0时,也要校正 + if (offset < 0) + { + offset += daysOfMonth; + --iMonth; + --monCyl; + } + month = iMonth; + setLunarMonth(chineseNumber[month - 1] + "月"); // 设置对应的阴历月份 + day = offset + 1; + + if (!isday) + { + // 如果日期为节假日则阴历日期则返回节假日 + // setLeapMonth(leapMonth); + for (int i = 0; i < solarHoliday.length; i++) + { + // 返回公历节假日名称 + String sd = solarHoliday[i].split(" ")[0]; // 节假日的日期 + String sdv = solarHoliday[i].split(" ")[1]; // 节假日的名称 + String smonth_v = month_log + ""; + String sday_v = day_log + ""; + String smd = ""; + if (month_log < 10) + { + smonth_v = "0" + month_log; + } + if (day_log < 10) + { + sday_v = "0" + day_log; + } + smd = smonth_v + sday_v; + if (sd.trim().equals(smd.trim())) + { + return sdv; + } + } + + for (int i = 0; i < lunarHoliday.length; i++) + { + // 返回农历节假日名称 + String ld = lunarHoliday[i].split(" ")[0]; // 节假日的日期 + String ldv = lunarHoliday[i].split(" ")[1]; // 节假日的名称 + String lmonth_v = month + ""; + String lday_v = day + ""; + String lmd = ""; + if (month < 10) + { + lmonth_v = "0" + month; + } + if (day < 10) + { + lday_v = "0" + day; + } + lmd = lmonth_v + lday_v; + if ("12".equals(lmonth_v)) + { // 除夕夜需要特殊处理 + if ((daysOfMonth == 29 && day == 29) || (daysOfMonth == 30 && day == 30)) + { + return ldv; + } + } + if (ld.trim().equals(lmd.trim())) + { + return ldv; + } + } + } + if (day == 1) + { + return chineseNumber[month - 1] + "月"; + } + else + { + return getChinaDayString(day); + } + + } + + @Override + public String toString() + { + if (chineseNumber[month - 1] == "一" && getChinaDayString(day) == "初一") + { + return "农历" + year + "年"; + } + else if (getChinaDayString(day) == "初一") + { + return chineseNumber[month - 1] + "月"; + } + else + { + return getChinaDayString(day); + // return year + "年" + (leap ? "闰" : "") + chineseNumber[month - 1] + + // "月" + getChinaDayString(day); + } + } + + /* + * public static void main(String[] args) { System.out.println(new + * LunarCalendar().getLunarDate(2012, 1, 23)); } + */ + + public int getLeapMonth() + { + return leapMonth; + } + + public void setLeapMonth(int leapMonth) + { + this.leapMonth = leapMonth; + } + + /** + * 得到当前日期对应的阴历月份 + * + * @return + */ + public String getLunarMonth() + { + return lunarMonth; + } + + public void setLunarMonth(String lunarMonth) + { + this.lunarMonth = lunarMonth; + } + + /** + * 得到当前年对应的农历年份 + * + * @return + */ + public int getYear() + { + return year; + } + + public void setYear(int year) + { + this.year = year; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/works/DesMaterialCat.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/works/DesMaterialCat.java new file mode 100644 index 0000000..a1c6739 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/works/DesMaterialCat.java @@ -0,0 +1,76 @@ +package com.zhiqim.yangcai.design.dbo.works; + +import java.io.Serializable; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * CDR素材分类表 对应表《DES_MATERIAL_CAT》 + */ +@AnAlias("DesMaterialCat") +@AnNew +@AnTable(table = "DES_MATERIAL_CAT", key = "CAT_ID", type = "InnoDB") +public class DesMaterialCat implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "CAT_ID", type = "long", notNull = true) + private long catId; // 1.分类编号 + @AnTableField(column = "CAT_NAME", type = "string,32", notNull = true) + private String catName; // 2.分类名称 + @AnTableField(column = "CAT_STATUS", type = "byte", notNull = true) + private int catStatus; // 3.状态,0:正常,1:停用 + @AnTableField(column = "CAT_SEQ", type = "int", notNull = true) + private int catSeq; // 4.序号 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public long getCatId() + { + return catId; + } + + public void setCatId(long catId) + { + this.catId = catId; + } + + public String getCatName() + { + return catName; + } + + public void setCatName(String catName) + { + this.catName = catName; + } + + public int getCatStatus() + { + return catStatus; + } + + public void setCatStatus(int catStatus) + { + this.catStatus = catStatus; + } + + public int getCatSeq() + { + return catSeq; + } + + public void setCatSeq(int catSeq) + { + this.catSeq = catSeq; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/works/DesMaterialCont.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/works/DesMaterialCont.java new file mode 100644 index 0000000..c78c152 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/works/DesMaterialCont.java @@ -0,0 +1,180 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dbo.works; + +import java.io.Serializable; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.*; + +/** + * CDR素材表 对应表《DES_MATERIAL_CONT》 + */ +@AnAlias("DesMaterialCont") +@AnNew +@AnTable(table="DES_MATERIAL_CONT", key="MID", type="InnoDB") +public class DesMaterialCont implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column="MID", type="long", notNull=true) private long mid; //1.素材编号 + @AnTableField(column="CAT_ID", type="long", notNull=true) private long catId; //2.分类编码 + @AnTableField(column="MATERIAL_STATUS", type="byte", notNull=true) private int materialStatus; //3.资源状态,0:正常,1:停用 + @AnTableField(column="MATERIAL_PATH", type="string,200", notNull=true) private String materialPath; //4.资源本地路径 + @AnTableField(column="MATERIAL_URL", type="string,200", notNull=true) private String materialUrl; //5.资源网络路径 + @AnTableField(column="MATERIAL_SEQ", type="int", notNull=true) private int materialSeq; //6.资源序号 + @AnTableField(column="MATERIAL_SUFFIX", type="string,16", notNull=true) private String materialSuffix; //7.扩展名 + @AnTableField(column="THUMB_PATH", type="string,200", notNull=false) private String thumbPath; //8.效果图本地路径 + @AnTableField(column="THUMB_URL", type="string,200", notNull=false) private String thumbUrl; //9.效果图网络路径 + @AnTableField(column="KEYWORDS", type="string,128", notNull=false) private String keywords; //10.关键字,多个空格分隔 + @AnTableField(column="UPLOADER", type="string,20", notNull=false) private String uploader; //11.上传者 + @AnTableField(column="UPLOAD_TIME", type="string,19", notNull=true) private String uploadTime; //12.上传时间 + @AnTableField(column="OSS_STATUS", type="int", notNull=true) private int ossStatus; //13.0=未上传,1=已上传,2=不需要上传 + + public String toString() + { + return Jsons.toString(this); + } + + public long getMid() + { + return mid; + } + + public void setMid(long mid) + { + this.mid = mid; + } + + public long getCatId() + { + return catId; + } + + public void setCatId(long catId) + { + this.catId = catId; + } + + public int getMaterialStatus() + { + return materialStatus; + } + + public void setMaterialStatus(int materialStatus) + { + this.materialStatus = materialStatus; + } + + public String getMaterialPath() + { + return materialPath; + } + + public void setMaterialPath(String materialPath) + { + this.materialPath = materialPath; + } + + public String getMaterialUrl() + { + return materialUrl; + } + + public void setMaterialUrl(String materialUrl) + { + this.materialUrl = materialUrl; + } + + public int getMaterialSeq() + { + return materialSeq; + } + + public void setMaterialSeq(int materialSeq) + { + this.materialSeq = materialSeq; + } + + public String getMaterialSuffix() + { + return materialSuffix; + } + + public void setMaterialSuffix(String materialSuffix) + { + this.materialSuffix = materialSuffix; + } + + public String getThumbPath() + { + return thumbPath; + } + + public void setThumbPath(String thumbPath) + { + this.thumbPath = thumbPath; + } + + public String getThumbUrl() + { + return thumbUrl; + } + + public void setThumbUrl(String thumbUrl) + { + this.thumbUrl = thumbUrl; + } + + public String getKeywords() + { + return keywords; + } + + public void setKeywords(String keywords) + { + this.keywords = keywords; + } + + public String getUploader() + { + return uploader; + } + + public void setUploader(String uploader) + { + this.uploader = uploader; + } + + public String getUploadTime() + { + return uploadTime; + } + + public void setUploadTime(String uploadTime) + { + this.uploadTime = uploadTime; + } + + public int getOssStatus() + { + return ossStatus; + } + + public void setOssStatus(int ossStatus) + { + this.ossStatus = ossStatus; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/works/DesWorksEvent.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/works/DesWorksEvent.java new file mode 100644 index 0000000..3393226 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/works/DesWorksEvent.java @@ -0,0 +1,89 @@ +package com.zhiqim.yangcai.design.dbo.works; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 作品库事件表 对应表《DES_WORKS_EVENT》 + */ +@AnAlias("DesWorksEvent") +@AnNew +@AnTable(table = "DES_WORKS_EVENT", key = "EVENT_ID", type = "InnoDB") +public class DesWorksEvent implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "EVENT_ID", type = "long", notNull = true) + private long eventId; // 1.事件ID + @AnTableField(column = "WORKS_ID", type = "long", notNull = true) + private long worksId; // 2.作品ID + @AnTableField(column = "EVENT_TYPE", type = "int", notNull = true) + private int eventType; // 3.事件类型(1代表浏览、2代表收藏,3代表给我分享的、4代表下载) + @AnTableField(column = "OPERATOR_CODE", type = "string,64", notNull = false) + private String operatorCode; // 4.操作人 + @AnTableField(column = "CREATE_TIME", type = "datetime", notNull = true) + private Timestamp createTime; // 5.创建时间 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public long getEventId() + { + return eventId; + } + + public void setEventId(long eventId) + { + this.eventId = eventId; + } + + public long getWorksId() + { + return worksId; + } + + public void setWorksId(long worksId) + { + this.worksId = worksId; + } + + public int getEventType() + { + return eventType; + } + + public void setEventType(int eventType) + { + this.eventType = eventType; + } + + public String getOperatorCode() + { + return operatorCode; + } + + public void setOperatorCode(String operatorCode) + { + this.operatorCode = operatorCode; + } + + public Timestamp getCreateTime() + { + return createTime; + } + + public void setCreateTime(Timestamp createTime) + { + this.createTime = createTime; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/works/DesWorksEventView.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/works/DesWorksEventView.java new file mode 100644 index 0000000..e6cc9f1 --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/works/DesWorksEventView.java @@ -0,0 +1,56 @@ +package com.zhiqim.yangcai.design.dbo.works; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnView; +import org.zhiqim.orm.annotation.AnViewField; +import org.zhiqim.orm.annotation.AnViewJoin; +import org.zhiqim.orm.annotation.AnViewJoinValue; + +/** + * 源文件事件关联表 对应视图《DES_WORKS_EVENT_VIEW》 + */ +@AnAlias("DesWorksEventView") +@AnNew +@AnView("DES_WORKS_FILE,DES_WORKS_EVENT") +@AnViewJoin( +{ + @AnViewJoinValue(type = "EQUAL", lTable = "DES_WORKS_FILE", lColumn = "WORKS_ID", rTable = "DES_WORKS_EVENT", rColumn = "WORKS_ID") +}) +public class DesWorksEventView extends DesWorksFile +{ + private static final long serialVersionUID = 1L; + + @AnViewField(table = "DES_WORKS_EVENT", column = "EVENT_TYPE") + private int eventType; // 1.事件类型(1代表浏览、2代表收藏,3代表给我分享的、4代表下载) + @AnViewField(table = "DES_WORKS_EVENT", column = "OPERATOR_CODE") + private String operatorCode; // 2.操作人 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public int getEventType() + { + return eventType; + } + + public void setEventType(int eventType) + { + this.eventType = eventType; + } + + public String getOperatorCode() + { + return operatorCode; + } + + public void setOperatorCode(String operatorCode) + { + this.operatorCode = operatorCode; + } + +} diff --git a/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/works/DesWorksFile.java b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/works/DesWorksFile.java new file mode 100644 index 0000000..67b076b --- /dev/null +++ b/Yangcai365_design/dbo/com/zhiqim/yangcai/design/dbo/works/DesWorksFile.java @@ -0,0 +1,365 @@ +package com.zhiqim.yangcai.design.dbo.works; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 作品库 对应表《DES_WORKS_FILE》 + */ +@AnAlias("DesWorksFile") +@AnNew +@AnTable(table = "DES_WORKS_FILE", key = "WORKS_ID", type = "InnoDB") +public class DesWorksFile implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "WORKS_ID", type = "long", notNull = true) + private long worksId; // 1.作品ID + @AnTableField(column = "INDUSTRY_ID", type = "long", notNull = true) + private long industryId; // 2.行业ID + @AnTableField(column = "PRD_TYPE_ID", type = "long", notNull = true) + private long prdTypeId; // 3.产品类型ID + @AnTableField(column = "PRD_PAGE_ID", type = "long", notNull = true) + private long prdPageId; // 4.面数ID + @AnTableField(column = "PRD_SIZE_ID", type = "long", notNull = true) + private long prdSizeId; // 5.尺寸ID + @AnTableField(column = "TEMPLATE_ID", type = "long", notNull = false) + private long templateId; // 6.模板ID + @AnTableField(column = "INDUSTRY_SUB_IDS", type = "string,5000", notNull = false) + private String industrySubIds; // 7.子行业ID + @AnTableField(column = "INDUSTRY_SUB_NAME", type = "string,5000", notNull = false) + private String industrySubName; // 8.子行业名称 + @AnTableField(column = "ATTRIBUTE_IDS", type = "string,5000", notNull = false) + private String attributeIds; // 9.属性ID + @AnTableField(column = "ATTRIBUTE_NAME", type = "string,5000", notNull = false) + private String attributeName; // 10.属性名称 + @AnTableField(column = "KEYWORD_ID", type = "long", notNull = false) + private long keywordId; // 11.关键词ID + @AnTableField(column = "KEYWORD_NAME", type = "string,5000", notNull = false) + private String keywordName; // 12.关键词名称 + @AnTableField(column = "WORKS_NAME", type = "string,255", notNull = false) + private String worksName; // 13.作品名称 + @AnTableField(column = "WORKS_TYPE", type = "int", notNull = false) + private int worksType; // 14.作品类型(0代表普通、1代表精品、2代表待审精品、3代表模板审核、4代表模板) + @AnTableField(column = "CDR_FILE_NAME", type = "string,255", notNull = true) + private String cdrFileName; // 15.CDR源文件名称 + @AnTableField(column = "PDF_FILE_NAME", type = "string,255", notNull = false) + private String pdfFileName; // 16.PDF源文件名称 + @AnTableField(column = "CDR_PATH", type = "string,500", notNull = true) + private String cdrPath; // 17.CDR路径 + @AnTableField(column = "PDF_PATH", type = "string,500", notNull = false) + private String pdfPath; // 18.PDF路径 + @AnTableField(column = "DESIGNER", type = "string,32", notNull = true) + private String designer; // 19.设计师 + @AnTableField(column = "DESIGN_GROUP_ID", type = "string,850", notNull = false) + private String designGroupId; // 20.包含设计小组ID在内的设计师所属部门 + @AnTableField(column = "DEPT_ID", type = "string,850", notNull = false) + private String deptId; // 21.分享部门ID + @AnTableField(column = "THUMB_IMAGE_PATH", type = "string,3000", notNull = false) + private String thumbImagePath; // 22.缩略图存储路径,多个用英文逗号分隔(OSS路径) + @AnTableField(column = "THUMB_IMAGE_OSS_URL", type = "string,3000", notNull = false) + private String thumbImageOssUrl; // 23.缩略图存储路径,多个用英文逗号分隔(OSS路径)废弃 + @AnTableField(column = "THUMB_IMAGE_PHY_PATH", type = "string,3000", notNull = false) + private String thumbImagePhyPath; // 24.缩略图存储路径,多个用英文逗号分隔(物理路径) + @AnTableField(column = "UPLOAD_TYPE", type = "int", notNull = false) + private int uploadType; // 25.上传类型(0代表订单作品,1代表手工上传,2代表只有CDR文件,3代表路径有误) + @AnTableField(column = "CREATE_TIME", type = "datetime", notNull = true) + private Timestamp createTime; // 26.创建时间 + @AnTableField(column = "OSS_STATUS", type = "int", notNull = true) + private int ossStatus; // 27.0=文件在本地, 1=文件已上传在OSS, 2=本地&oss都不存在 + @AnTableField(column = "FILE_TYPE", type = "string,10", notNull = false) + private String fileType; // 28.设计文件类型后缀。pdf、cdr、ai + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public long getWorksId() + { + return worksId; + } + + public void setWorksId(long worksId) + { + this.worksId = worksId; + } + + public long getIndustryId() + { + return industryId; + } + + public void setIndustryId(long industryId) + { + this.industryId = industryId; + } + + public long getPrdTypeId() + { + return prdTypeId; + } + + public void setPrdTypeId(long prdTypeId) + { + this.prdTypeId = prdTypeId; + } + + public long getPrdPageId() + { + return prdPageId; + } + + public void setPrdPageId(long prdPageId) + { + this.prdPageId = prdPageId; + } + + public long getPrdSizeId() + { + return prdSizeId; + } + + public void setPrdSizeId(long prdSizeId) + { + this.prdSizeId = prdSizeId; + } + + public long getTemplateId() + { + return templateId; + } + + public void setTemplateId(long templateId) + { + this.templateId = templateId; + } + + public String getIndustrySubIds() + { + return industrySubIds; + } + + public void setIndustrySubIds(String industrySubIds) + { + this.industrySubIds = industrySubIds; + } + + public String getIndustrySubName() + { + return industrySubName; + } + + public void setIndustrySubName(String industrySubName) + { + this.industrySubName = industrySubName; + } + + public String getAttributeIds() + { + return attributeIds; + } + + public void setAttributeIds(String attributeIds) + { + this.attributeIds = attributeIds; + } + + public String getAttributeName() + { + return attributeName; + } + + public void setAttributeName(String attributeName) + { + this.attributeName = attributeName; + } + + public long getKeywordId() + { + return keywordId; + } + + public void setKeywordId(long keywordId) + { + this.keywordId = keywordId; + } + + public String getKeywordName() + { + return keywordName; + } + + public void setKeywordName(String keywordName) + { + this.keywordName = keywordName; + } + + public String getWorksName() + { + return worksName; + } + + public void setWorksName(String worksName) + { + this.worksName = worksName; + } + + public int getWorksType() + { + return worksType; + } + + public void setWorksType(int worksType) + { + this.worksType = worksType; + } + + public String getCdrFileName() + { + return cdrFileName; + } + + public void setCdrFileName(String cdrFileName) + { + this.cdrFileName = cdrFileName; + } + + public String getPdfFileName() + { + return pdfFileName; + } + + public void setPdfFileName(String pdfFileName) + { + this.pdfFileName = pdfFileName; + } + + public String getCdrPath() + { + return cdrPath; + } + + public void setCdrPath(String cdrPath) + { + this.cdrPath = cdrPath; + } + + public String getPdfPath() + { + return pdfPath; + } + + public void setPdfPath(String pdfPath) + { + this.pdfPath = pdfPath; + } + + public String getDesigner() + { + return designer; + } + + public void setDesigner(String designer) + { + this.designer = designer; + } + + public String getDesignGroupId() + { + return designGroupId; + } + + public void setDesignGroupId(String designGroupId) + { + this.designGroupId = designGroupId; + } + + public String getDeptId() + { + return deptId; + } + + public void setDeptId(String deptId) + { + this.deptId = deptId; + } + + public String getThumbImagePath() + { + return thumbImagePath; + } + + public void setThumbImagePath(String thumbImagePath) + { + this.thumbImagePath = thumbImagePath; + } + + public String getThumbImageOssUrl() + { + return thumbImageOssUrl; + } + + public void setThumbImageOssUrl(String thumbImageOssUrl) + { + this.thumbImageOssUrl = thumbImageOssUrl; + } + + public String getThumbImagePhyPath() + { + return thumbImagePhyPath; + } + + public void setThumbImagePhyPath(String thumbImagePhyPath) + { + this.thumbImagePhyPath = thumbImagePhyPath; + } + + public int getUploadType() + { + return uploadType; + } + + public void setUploadType(int uploadType) + { + this.uploadType = uploadType; + } + + public Timestamp getCreateTime() + { + return createTime; + } + + public void setCreateTime(Timestamp createTime) + { + this.createTime = createTime; + } + + public int getOssStatus() + { + return ossStatus; + } + + public void setOssStatus(int ossStatus) + { + this.ossStatus = ossStatus; + } + + public String getFileType() + { + return fileType; + } + + public void setFileType(String fileType) + { + this.fileType = fileType; + } + +} diff --git a/Yangcai365_design/document/export/project.exp.xml b/Yangcai365_design/document/export/project.exp.xml new file mode 100644 index 0000000..0fa1070 --- /dev/null +++ b/Yangcai365_design/document/export/project.exp.xml @@ -0,0 +1,20 @@ + +
+
+ + + + + + + + + + + + + + + +
+
diff --git a/Yangcai365_design/lib/zhiqim.jar b/Yangcai365_design/lib/zhiqim.jar new file mode 100644 index 0000000..5c710ad Binary files /dev/null and b/Yangcai365_design/lib/zhiqim.jar differ diff --git a/Yangcai365_design/lib/zhiqim_httpd.jar b/Yangcai365_design/lib/zhiqim_httpd.jar new file mode 100644 index 0000000..31f9b33 Binary files /dev/null and b/Yangcai365_design/lib/zhiqim_httpd.jar differ diff --git a/Yangcai365_design/lib/zhiqim_icepdf_6.2.0.jar b/Yangcai365_design/lib/zhiqim_icepdf_6.2.0.jar new file mode 100644 index 0000000..1c1c8a3 Binary files /dev/null and b/Yangcai365_design/lib/zhiqim_icepdf_6.2.0.jar differ diff --git a/Yangcai365_design/lib/zhiqim_manager.jar b/Yangcai365_design/lib/zhiqim_manager.jar new file mode 100644 index 0000000..8017368 Binary files /dev/null and b/Yangcai365_design/lib/zhiqim_manager.jar differ diff --git a/Yangcai365_design/lib/zhiqim_media_editor.jar b/Yangcai365_design/lib/zhiqim_media_editor.jar new file mode 100644 index 0000000..fb64e15 Binary files /dev/null and b/Yangcai365_design/lib/zhiqim_media_editor.jar differ diff --git a/Yangcai365_design/lib/zhiqim_mysql5.0.8.jar b/Yangcai365_design/lib/zhiqim_mysql5.0.8.jar new file mode 100644 index 0000000..0f3c501 Binary files /dev/null and b/Yangcai365_design/lib/zhiqim_mysql5.0.8.jar differ diff --git a/Yangcai365_design/lib/zhiqim_orm.jar b/Yangcai365_design/lib/zhiqim_orm.jar new file mode 100644 index 0000000..2e4dcef Binary files /dev/null and b/Yangcai365_design/lib/zhiqim_orm.jar differ diff --git a/Yangcai365_design/lib/zhiqim_oss.jar b/Yangcai365_design/lib/zhiqim_oss.jar new file mode 100644 index 0000000..4e8e643 Binary files /dev/null and b/Yangcai365_design/lib/zhiqim_oss.jar differ diff --git a/Yangcai365_design/lib/zhiqim_text_editor.jar b/Yangcai365_design/lib/zhiqim_text_editor.jar new file mode 100644 index 0000000..4eede44 Binary files /dev/null and b/Yangcai365_design/lib/zhiqim_text_editor.jar differ diff --git a/Yangcai365_design/lib/zhiqim_ui.jar b/Yangcai365_design/lib/zhiqim_ui.jar new file mode 100644 index 0000000..20dcff2 Binary files /dev/null and b/Yangcai365_design/lib/zhiqim_ui.jar differ diff --git a/Yangcai365_design/lib/zhiqim_upload_large.jar b/Yangcai365_design/lib/zhiqim_upload_large.jar new file mode 100644 index 0000000..7cb5a65 Binary files /dev/null and b/Yangcai365_design/lib/zhiqim_upload_large.jar differ diff --git a/Yangcai365_design/lib/zhiqim_zml.jar b/Yangcai365_design/lib/zhiqim_zml.jar new file mode 100644 index 0000000..0e2aa82 Binary files /dev/null and b/Yangcai365_design/lib/zhiqim_zml.jar differ diff --git a/Yangcai365_design/libext/Zhiqim Studio.exe - 快捷方式.lnk b/Yangcai365_design/libext/Zhiqim Studio.exe - 快捷方式.lnk new file mode 100644 index 0000000..1b778bb Binary files /dev/null and b/Yangcai365_design/libext/Zhiqim Studio.exe - 快捷方式.lnk differ diff --git a/Yangcai365_design/libext/aip-java-sdk-4.1.1.jar b/Yangcai365_design/libext/aip-java-sdk-4.1.1.jar new file mode 100644 index 0000000..6fbfa0b Binary files /dev/null and b/Yangcai365_design/libext/aip-java-sdk-4.1.1.jar differ diff --git a/Yangcai365_design/libext/aliyun-java-sdk-core-4.1.0.jar b/Yangcai365_design/libext/aliyun-java-sdk-core-4.1.0.jar new file mode 100644 index 0000000..cc7da01 Binary files /dev/null and b/Yangcai365_design/libext/aliyun-java-sdk-core-4.1.0.jar differ diff --git a/Yangcai365_design/libext/aliyun-java-sdk-dysmsapi-1.1.0.jar b/Yangcai365_design/libext/aliyun-java-sdk-dysmsapi-1.1.0.jar new file mode 100644 index 0000000..d07e04f Binary files /dev/null and b/Yangcai365_design/libext/aliyun-java-sdk-dysmsapi-1.1.0.jar differ diff --git a/Yangcai365_design/libext/aliyun-sdk-oss-2.8.2.jar b/Yangcai365_design/libext/aliyun-sdk-oss-2.8.2.jar new file mode 100644 index 0000000..68fecab Binary files /dev/null and b/Yangcai365_design/libext/aliyun-sdk-oss-2.8.2.jar differ diff --git a/Yangcai365_design/libext/aliyun-sdk-oss-3.10.2.jar b/Yangcai365_design/libext/aliyun-sdk-oss-3.10.2.jar new file mode 100644 index 0000000..4889f96 Binary files /dev/null and b/Yangcai365_design/libext/aliyun-sdk-oss-3.10.2.jar differ diff --git a/Yangcai365_design/libext/aliyun-sdk-oss-3.17.4.jar b/Yangcai365_design/libext/aliyun-sdk-oss-3.17.4.jar new file mode 100644 index 0000000..9a7b9d6 Binary files /dev/null and b/Yangcai365_design/libext/aliyun-sdk-oss-3.17.4.jar differ diff --git a/Yangcai365_design/libext/aspose-imaging-23.11-jdk16.jar b/Yangcai365_design/libext/aspose-imaging-23.11-jdk16.jar new file mode 100644 index 0000000..a4f7529 Binary files /dev/null and b/Yangcai365_design/libext/aspose-imaging-23.11-jdk16.jar differ diff --git a/Yangcai365_design/libext/batik-all-1.9.jar b/Yangcai365_design/libext/batik-all-1.9.jar new file mode 100644 index 0000000..e21ef6d Binary files /dev/null and b/Yangcai365_design/libext/batik-all-1.9.jar differ diff --git a/Yangcai365_design/libext/commons-codec-1.9.jar b/Yangcai365_design/libext/commons-codec-1.9.jar new file mode 100644 index 0000000..ef35f1c Binary files /dev/null and b/Yangcai365_design/libext/commons-codec-1.9.jar differ diff --git a/Yangcai365_design/libext/commons-lang3-3.4.jar b/Yangcai365_design/libext/commons-lang3-3.4.jar new file mode 100644 index 0000000..8ec91d4 Binary files /dev/null and b/Yangcai365_design/libext/commons-lang3-3.4.jar differ diff --git a/Yangcai365_design/libext/commons-pool2-2.9.0.jar b/Yangcai365_design/libext/commons-pool2-2.9.0.jar new file mode 100644 index 0000000..a038b36 Binary files /dev/null and b/Yangcai365_design/libext/commons-pool2-2.9.0.jar differ diff --git a/Yangcai365_design/libext/fastjson-1.2.51.jar b/Yangcai365_design/libext/fastjson-1.2.51.jar new file mode 100644 index 0000000..aab8edd Binary files /dev/null and b/Yangcai365_design/libext/fastjson-1.2.51.jar differ diff --git a/Yangcai365_design/libext/fop-transcoder-allinone-2.2.jar b/Yangcai365_design/libext/fop-transcoder-allinone-2.2.jar new file mode 100644 index 0000000..b65175e Binary files /dev/null and b/Yangcai365_design/libext/fop-transcoder-allinone-2.2.jar differ diff --git a/Yangcai365_design/libext/gson-2.8.5.jar b/Yangcai365_design/libext/gson-2.8.5.jar new file mode 100644 index 0000000..0d5baf3 Binary files /dev/null and b/Yangcai365_design/libext/gson-2.8.5.jar differ diff --git a/Yangcai365_design/libext/httpasyncclient-4.1.3.jar b/Yangcai365_design/libext/httpasyncclient-4.1.3.jar new file mode 100644 index 0000000..a79f664 Binary files /dev/null and b/Yangcai365_design/libext/httpasyncclient-4.1.3.jar differ diff --git a/Yangcai365_design/libext/httpclient-4.4.1.jar b/Yangcai365_design/libext/httpclient-4.4.1.jar new file mode 100644 index 0000000..b80d379 Binary files /dev/null and b/Yangcai365_design/libext/httpclient-4.4.1.jar differ diff --git a/Yangcai365_design/libext/httpcore-4.4.1.jar b/Yangcai365_design/libext/httpcore-4.4.1.jar new file mode 100644 index 0000000..99715b6 Binary files /dev/null and b/Yangcai365_design/libext/httpcore-4.4.1.jar differ diff --git a/Yangcai365_design/libext/httpcore-nio-4.4.9.jar b/Yangcai365_design/libext/httpcore-nio-4.4.9.jar new file mode 100644 index 0000000..00b3444 Binary files /dev/null and b/Yangcai365_design/libext/httpcore-nio-4.4.9.jar differ diff --git a/Yangcai365_design/libext/httpmime-4.5.5.jar b/Yangcai365_design/libext/httpmime-4.5.5.jar new file mode 100644 index 0000000..4d3ee66 Binary files /dev/null and b/Yangcai365_design/libext/httpmime-4.5.5.jar differ diff --git a/Yangcai365_design/libext/im4java-1.4.0.jar b/Yangcai365_design/libext/im4java-1.4.0.jar new file mode 100644 index 0000000..b08eba9 Binary files /dev/null and b/Yangcai365_design/libext/im4java-1.4.0.jar differ diff --git a/Yangcai365_design/libext/itext5-itextpdf-5.5.11.jar b/Yangcai365_design/libext/itext5-itextpdf-5.5.11.jar new file mode 100644 index 0000000..cec5fe1 Binary files /dev/null and b/Yangcai365_design/libext/itext5-itextpdf-5.5.11.jar differ diff --git a/Yangcai365_design/libext/jacob.jar b/Yangcai365_design/libext/jacob.jar new file mode 100644 index 0000000..c35ad12 Binary files /dev/null and b/Yangcai365_design/libext/jacob.jar differ diff --git a/Yangcai365_design/libext/jdom-1.1.jar b/Yangcai365_design/libext/jdom-1.1.jar new file mode 100644 index 0000000..97c85f5 Binary files /dev/null and b/Yangcai365_design/libext/jdom-1.1.jar differ diff --git a/Yangcai365_design/libext/jdom2-2.0.6.jar b/Yangcai365_design/libext/jdom2-2.0.6.jar new file mode 100644 index 0000000..2850ca1 Binary files /dev/null and b/Yangcai365_design/libext/jdom2-2.0.6.jar differ diff --git a/Yangcai365_design/libext/jedis-2.9.0.jar b/Yangcai365_design/libext/jedis-2.9.0.jar new file mode 100644 index 0000000..f4d27d3 Binary files /dev/null and b/Yangcai365_design/libext/jedis-2.9.0.jar differ diff --git a/Yangcai365_design/libext/js.jar b/Yangcai365_design/libext/js.jar new file mode 100644 index 0000000..ccad3cc Binary files /dev/null and b/Yangcai365_design/libext/js.jar differ diff --git a/Yangcai365_design/libext/json-20160810.jar b/Yangcai365_design/libext/json-20160810.jar new file mode 100644 index 0000000..a90e448 Binary files /dev/null and b/Yangcai365_design/libext/json-20160810.jar differ diff --git a/Yangcai365_design/libext/jxl.jar b/Yangcai365_design/libext/jxl.jar new file mode 100644 index 0000000..b210c06 Binary files /dev/null and b/Yangcai365_design/libext/jxl.jar differ diff --git a/Yangcai365_design/libext/jxl_src.jar b/Yangcai365_design/libext/jxl_src.jar new file mode 100644 index 0000000..33e951c Binary files /dev/null and b/Yangcai365_design/libext/jxl_src.jar differ diff --git a/Yangcai365_design/libext/log4j-1.2.17.jar b/Yangcai365_design/libext/log4j-1.2.17.jar new file mode 100644 index 0000000..1d425cf Binary files /dev/null and b/Yangcai365_design/libext/log4j-1.2.17.jar differ diff --git a/Yangcai365_design/libext/message-box-0.0.1-SNAPSHOT.jar b/Yangcai365_design/libext/message-box-0.0.1-SNAPSHOT.jar new file mode 100644 index 0000000..85b5db4 Binary files /dev/null and b/Yangcai365_design/libext/message-box-0.0.1-SNAPSHOT.jar differ diff --git a/Yangcai365_design/libext/mq-http-sdk-1.0.1.jar b/Yangcai365_design/libext/mq-http-sdk-1.0.1.jar new file mode 100644 index 0000000..9727a87 Binary files /dev/null and b/Yangcai365_design/libext/mq-http-sdk-1.0.1.jar differ diff --git a/Yangcai365_design/libext/netty-all-4.1.23.Final.jar b/Yangcai365_design/libext/netty-all-4.1.23.Final.jar new file mode 100644 index 0000000..8212bd4 Binary files /dev/null and b/Yangcai365_design/libext/netty-all-4.1.23.Final.jar differ diff --git a/Yangcai365_design/libext/noggit-0.6.jar b/Yangcai365_design/libext/noggit-0.6.jar new file mode 100644 index 0000000..c23e06f Binary files /dev/null and b/Yangcai365_design/libext/noggit-0.6.jar differ diff --git a/Yangcai365_design/libext/redxyz_commons.jar b/Yangcai365_design/libext/redxyz_commons.jar new file mode 100644 index 0000000..1b7a604 Binary files /dev/null and b/Yangcai365_design/libext/redxyz_commons.jar differ diff --git a/Yangcai365_design/libext/sanselan-0.97-incubator.jar b/Yangcai365_design/libext/sanselan-0.97-incubator.jar new file mode 100644 index 0000000..fff931f Binary files /dev/null and b/Yangcai365_design/libext/sanselan-0.97-incubator.jar differ diff --git a/Yangcai365_design/libext/serializer-2.7.2.jar b/Yangcai365_design/libext/serializer-2.7.2.jar new file mode 100644 index 0000000..10c881c Binary files /dev/null and b/Yangcai365_design/libext/serializer-2.7.2.jar differ diff --git a/Yangcai365_design/libext/slf4j-api-1.7.25.jar b/Yangcai365_design/libext/slf4j-api-1.7.25.jar new file mode 100644 index 0000000..0143c09 Binary files /dev/null and b/Yangcai365_design/libext/slf4j-api-1.7.25.jar differ diff --git a/Yangcai365_design/libext/solr-solrj-6.6.3.jar b/Yangcai365_design/libext/solr-solrj-6.6.3.jar new file mode 100644 index 0000000..6b46942 Binary files /dev/null and b/Yangcai365_design/libext/solr-solrj-6.6.3.jar differ diff --git a/Yangcai365_design/libext/taobao-sdk-java-dingtalk-20191101.jar b/Yangcai365_design/libext/taobao-sdk-java-dingtalk-20191101.jar new file mode 100644 index 0000000..7385fc0 Binary files /dev/null and b/Yangcai365_design/libext/taobao-sdk-java-dingtalk-20191101.jar differ diff --git a/Yangcai365_design/libext/workwechat-service-provider-SNAPSHOT-1.0.0.jar b/Yangcai365_design/libext/workwechat-service-provider-SNAPSHOT-1.0.0.jar new file mode 100644 index 0000000..9f88093 Binary files /dev/null and b/Yangcai365_design/libext/workwechat-service-provider-SNAPSHOT-1.0.0.jar differ diff --git a/Yangcai365_design/libext/xalan-2.7.2.jar b/Yangcai365_design/libext/xalan-2.7.2.jar new file mode 100644 index 0000000..abdabe3 Binary files /dev/null and b/Yangcai365_design/libext/xalan-2.7.2.jar differ diff --git a/Yangcai365_design/libext/xercesImpl-2.9.1.jar b/Yangcai365_design/libext/xercesImpl-2.9.1.jar new file mode 100644 index 0000000..78abfdd Binary files /dev/null and b/Yangcai365_design/libext/xercesImpl-2.9.1.jar differ diff --git a/Yangcai365_design/libext/xml-apis-1.3.04.jar b/Yangcai365_design/libext/xml-apis-1.3.04.jar new file mode 100644 index 0000000..d42c0ea Binary files /dev/null and b/Yangcai365_design/libext/xml-apis-1.3.04.jar differ diff --git a/Yangcai365_design/libext/xml-apis-ext-1.3.04.jar b/Yangcai365_design/libext/xml-apis-ext-1.3.04.jar new file mode 100644 index 0000000..a7869d6 Binary files /dev/null and b/Yangcai365_design/libext/xml-apis-ext-1.3.04.jar differ diff --git a/Yangcai365_design/libext/xmlgraphics-commons-2.2.jar b/Yangcai365_design/libext/xmlgraphics-commons-2.2.jar new file mode 100644 index 0000000..d1813ff Binary files /dev/null and b/Yangcai365_design/libext/xmlgraphics-commons-2.2.jar differ diff --git a/Yangcai365_design/libext/zxing-core3.3.0.jar b/Yangcai365_design/libext/zxing-core3.3.0.jar new file mode 100644 index 0000000..b5fa0b3 Binary files /dev/null and b/Yangcai365_design/libext/zxing-core3.3.0.jar differ diff --git a/Yangcai365_design/libext/zxing-j2se3.3.0.jar b/Yangcai365_design/libext/zxing-j2se3.3.0.jar new file mode 100644 index 0000000..ebc53de Binary files /dev/null and b/Yangcai365_design/libext/zxing-j2se3.3.0.jar differ diff --git a/Yangcai365_design/logs/2023-07-03.database.log b/Yangcai365_design/logs/2023-07-03.database.log new file mode 100644 index 0000000..78d0cfe --- /dev/null +++ b/Yangcai365_design/logs/2023-07-03.database.log @@ -0,0 +1,46 @@ +2023-07-03 16:31:58,336 [main] ERROR - 创建数据库连接[jdbc:mysql://rm-wz92cy11q44y87b02.mysql.rds.aliyuncs.com:3306/yangcai365_design?useUnicode=true&characterEncoding=UTF-8|yangcai]时,发生异常:[Communications link failure due to underlying exception: + +** BEGIN NESTED EXCEPTION ** + +java.net.ConnectException +MESSAGE: Connection timed out: connect + +STACKTRACE: + +java.net.ConnectException: Connection timed out: connect + at java.net.DualStackPlainSocketImpl.connect0(Native Method) + at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79) + at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345) + at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) + at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) + at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) + at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) + at java.net.Socket.connect(Socket.java:589) + at java.net.Socket.connect(Socket.java:538) + at java.net.Socket.(Socket.java:434) + at java.net.Socket.(Socket.java:244) + at org.zhiqim.mysql5_0_8.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:256) + at org.zhiqim.mysql5_0_8.jdbc.MysqlIO.(MysqlIO.java:294) + at org.zhiqim.mysql5_0_8.jdbc.Connection.createNewIO(Connection.java:3357) + at org.zhiqim.mysql5_0_8.jdbc.Connection.(Connection.java:2065) + at org.zhiqim.mysql5_0_8.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:295) + at java.sql.DriverManager.getConnection(DriverManager.java:664) + at java.sql.DriverManager.getConnection(DriverManager.java:247) + at org.zhiqim.orm.datasource.ZDataSource.newProxyConnection(ZDataSource.java:463) + at org.zhiqim.orm.datasource.ZConnectionTester.isDbBreak(ZConnectionTester.java:81) + at org.zhiqim.orm.datasource.ZDataSource.createConnectionTester(ZDataSource.java:291) + at org.zhiqim.orm.datasource.ZDataSource.openBefore(ZDataSource.java:179) + at org.zhiqim.kernel.control.Threadx.open(Threadx.java:101) + at org.zhiqim.orm.ORMServer.create(ORMServer.java:108) + at org.zhiqim.orm.ORMServer.create(ORMServer.java:82) + at org.zhiqim.kernel.Zhiqim.createService(Zhiqim.java:305) + at org.zhiqim.kernel.Zhiqim.startup(Zhiqim.java:137) + at org.zhiqim.kernel.Zhiqim.main(Zhiqim.java:76) + + +** END NESTED EXCEPTION ** + + + +Last packet sent to the server was 0 ms ago.] +2023-07-03 16:31:58,337 [main] ERROR - 初始化数据库[jdbc:mysql://rm-wz92cy11q44y87b02.mysql.rds.aliyuncs.com:3306/yangcai365_design?useUnicode=true&characterEncoding=UTF-8|yangcai]连接池,发生异常:连接被断开 diff --git a/Yangcai365_design/logs/2023-07-03.error.log b/Yangcai365_design/logs/2023-07-03.error.log new file mode 100644 index 0000000..835fd2e --- /dev/null +++ b/Yangcai365_design/logs/2023-07-03.error.log @@ -0,0 +1,27 @@ +2023-07-03 16:31:57,203 [Thread-0] ERROR - Connect to 172.22.209.129:9201 [/172.22.209.129] failed: Connection timed out: connect +org.apache.http.conn.HttpHostConnectException: Connect to 172.22.209.129:9201 [/172.22.209.129] failed: Connection timed out: connect + at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:151) + at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353) + at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380) + at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) + at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) + at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) + at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) + at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) + at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) + at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107) + at com.zhiqim.yangcai.design.messagebox.CusumerThreads.run(CusumerThreads.java:52) +Caused by: java.net.ConnectException: Connection timed out: connect + at java.net.DualStackPlainSocketImpl.connect0(Native Method) + at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79) + at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345) + at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) + at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) + at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) + at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) + at java.net.Socket.connect(Socket.java:589) + at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:74) + at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:134) + ... 10 more +2023-07-03 16:31:58,338 [main] FATAL - 初始化连接池失败[mysql] +2023-07-03 16:31:58,338 [main] FATAL - 服务[org.zhiqim.orm.ORMServer]初始化失败,退出工程 diff --git a/Yangcai365_design/logs/2023-07-03.info.log b/Yangcai365_design/logs/2023-07-03.info.log new file mode 100644 index 0000000..80bcc62 --- /dev/null +++ b/Yangcai365_design/logs/2023-07-03.info.log @@ -0,0 +1 @@ +2023-07-03 16:31:37,231 [main] INFO - 初始化[数据库映射:orm]开始... diff --git a/Yangcai365_design/logs/error.log b/Yangcai365_design/logs/error.log new file mode 100644 index 0000000..e69de29 diff --git a/Yangcai365_design/logs/info.log b/Yangcai365_design/logs/info.log new file mode 100644 index 0000000..e69de29 diff --git a/Yangcai365_design/manage/conf/config.xml b/Yangcai365_design/manage/conf/config.xml new file mode 100644 index 0000000..7372b69 --- /dev/null +++ b/Yangcai365_design/manage/conf/config.xml @@ -0,0 +1,282 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Yangcai365_design/manage/conf/config.zml b/Yangcai365_design/manage/conf/config.zml new file mode 100644 index 0000000..799ab8d --- /dev/null +++ b/Yangcai365_design/manage/conf/config.zml @@ -0,0 +1,959 @@ +<#----------------------------------------------------> +<#-- 以下为变量定义 ------------------------> +<#----------------------------------------------------> + +<#--脚注标注--> +<#var zmr_copyname="2023 领淘众创"/> +<#var zmr_copyright="Copyright  © "+zmr_copyname+" All Rights Reserved"/> +${Styles.src(zhiqim.css)} +${Scripts.src(zhiqim.js)} +${Styles.src(context.getRootPath("/zinc/css/yangcai_question_main_v1.4.0R2018031701.css"))} +${Scripts.src(context.getRootPath("/zinc/css/zhiqim_search_auto_list_v1.4.0R2018031701.js"))} + +<#--属性定义--> +<#var name="设计师工作台"/> +<#var version="V4.0"/> +<#var zhiqim_uploadlarge.js = new ZmrCdnRuntime(context, "/service/res/zhiqim_upload_large_v1.5.0.r2018111001.js")/> + + +<#--刷新左边区域自定义块--> +<#function zhiqim_manager_topnav_left_defined()> +知识库 +
+ + + +<#-- 不同商户展示控制--> +<#function mercolumn_js(pageCode, pageName, orgId)> +${Scripts.src("/zinc/js/mercolumn_2018102301.js")} + + + + +<#-- 重写模板编辑版本号--> +<#var media_editor_js_version="v1.5.0_r2020121101"/> + +<#-- 重写模板定稿、预览--> +<#function zhqim_media_edit_print(mediaId)> + + +<#if !isTemplateEdit && editable> + + + + + + +<#-- 重写模板左边订单选项--> +<#function zhqim_media_edit_order_item_defined(mediaId)> + + +

  • 订单
  • + + + +<#--刷新右边区域自定义块--> +<#function zhiqim_manager_topnav_right_defined()> + + <#var onlineStatus = DesignerDao.getDesignerStatus(sessionUser)/> + <#--
    + 自动接单 +
    +
    --> + + + +<#function zhqim_media_my_material_defined()> + + +
    + 全部 + 文字 + 图片 + 形状 + 二维码 +
    +
    +
    +
    +
    +
    已经到底了!!
    +
    +
    + + +<#--计算左侧宽高值--> +<#function yangcai_calc_Left_width_height(width, height)> + + + + +<#--计算指定元素的宽度--> +<#function yangcai_designer_calc_width(width, containerId)> + + + + +<#function sweet_alert_reuse_method()> + ${Scripts.src("/zinc/js/sweetalert2.min.js")} + + + +<#function Mydome()> + + diff --git a/Yangcai365_design/manage/favicon.ico b/Yangcai365_design/manage/favicon.ico new file mode 100644 index 0000000..933836b Binary files /dev/null and b/Yangcai365_design/manage/favicon.ico differ diff --git a/Yangcai365_design/manage/robots.txt b/Yangcai365_design/manage/robots.txt new file mode 100644 index 0000000..77470cb --- /dev/null +++ b/Yangcai365_design/manage/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: / \ No newline at end of file diff --git a/Yangcai365_design/manage/zinc/chart/data.js b/Yangcai365_design/manage/zinc/chart/data.js new file mode 100644 index 0000000..df5b6ad --- /dev/null +++ b/Yangcai365_design/manage/zinc/chart/data.js @@ -0,0 +1,26 @@ +/* + Highcharts JS v5.0.7 (2017-01-17) + Data module + + (c) 2012-2016 Torstein Honsi + + License: www.highcharts.com/license +*/ +(function(p){"object"===typeof module&&module.exports?module.exports=p:p(Highcharts)})(function(p){(function(g){var p=g.win.document,m=g.each,z=g.pick,w=g.inArray,x=g.isNumber,A=g.splat,n,u=function(b,a){this.init(b,a)};g.extend(u.prototype,{init:function(b,a){this.options=b;this.chartOptions=a;this.columns=b.columns||this.rowsToColumns(b.rows)||[];this.firstRowAsNames=z(b.firstRowAsNames,!0);this.decimalRegex=b.decimalPoint&&new RegExp("^(-?[0-9]+)"+b.decimalPoint+"([0-9]+)$");this.rawColumns=[]; +this.columns.length?this.dataFound():(this.parseCSV(),this.parseTable(),this.parseGoogleSpreadsheet())},getColumnDistribution:function(){var b=this.chartOptions,a=this.options,d=[],f=function(b){return(g.seriesTypes[b||"line"].prototype.pointArrayMap||[0]).length},e=b&&b.chart&&b.chart.type,c=[],k=[],t=0,h;m(b&&b.series||[],function(b){c.push(f(b.type||e))});m(a&&a.seriesMapping||[],function(b){d.push(b.x||0)});0===d.length&&d.push(0);m(a&&a.seriesMapping||[],function(a){var d=new n,r,v=c[t]||f(e), +q=g.seriesTypes[((b&&b.series||[])[t]||{}).type||e||"line"].prototype.pointArrayMap||["y"];d.addColumnReader(a.x,"x");for(r in a)a.hasOwnProperty(r)&&"x"!==r&&d.addColumnReader(a[r],r);for(h=0;h=e&&d<=c&&!r&&""!==g&&(a= +a.split(h),m(a,function(b,a){a>=k&&a<=t&&(f[a-k]||(f[a-k]=[]),f[a-k][y]=b)}),y+=1)}),this.dataFound())},parseTable:function(){var b=this.options,a=b.table,d=this.columns,f=b.startRow||0,e=b.endRow||Number.MAX_VALUE,c=b.startColumn||0,k=b.endColumn||Number.MAX_VALUE;a&&("string"===typeof a&&(a=p.getElementById(a)),m(a.getElementsByTagName("tr"),function(b,a){a>=f&&a<=e&&m(b.children,function(b,e){("TD"===b.tagName||"TH"===b.tagName)&&e>=c&&e<=k&&(d[e-c]||(d[e-c]=[]),d[e-c][a-f]=b.innerHTML)})}),this.dataFound())}, +parseGoogleSpreadsheet:function(){var b=this,a=this.options,d=a.googleSpreadsheetKey,f=this.columns,e=a.startRow||0,c=a.endRow||Number.MAX_VALUE,k=a.startColumn||0,g=a.endColumn||Number.MAX_VALUE,h,v;d&&jQuery.ajax({dataType:"json",url:"https://spreadsheets.google.com/feeds/cells/"+d+"/"+(a.googleSpreadsheetWorksheet||"od6")+"/public/values?alt\x3djson-in-script\x26callback\x3d?",error:a.error,success:function(a){a=a.feed.entry;var d,t=a.length,q=0,n=0,l;for(l=0;l=k&&l<=g&&(f[l-k]=[],f[l-k].length=Math.min(n,c-e));for(l=0;l=k&&v<=g&&h>=e&&h<=c&&(f[v-k][h-e]=d.content.$t);m(f,function(a){for(l=0;lb[e+1])):(k=this.parseDate(c),m&&x(k)&&"float"!==u?(r[e]=c,b[e]=k,b.isDatetime=!0,void 0!==b[e+1]&&(c=k>b[e+1],c!==q&&void 0!==q&&(this.alternativeFormat?(this.dateFormat=this.alternativeFormat,e=b.length,this.alternativeFormat=this.dateFormats[this.dateFormat].alternative):b.unsorted=!0),q=c)):(b[e]=""===g?null:g,0!==e&&(b.isDatetime||b.isNumeric)&&(b.mixed=!0)));m&&b.mixed&&(f[a]=d[a]);if(m&&q&&this.options.sort)for(a=0;a(.*?$)/);e&&(e= +'\x3cforeignObject x\x3d"0" y\x3d"0" width\x3d"'+c.chart.width+'" height\x3d"'+c.chart.height+'"\x3e\x3cbody xmlns\x3d"http://www.w3.org/1999/xhtml"\x3e'+e[1]+"\x3c/body\x3e\x3c/foreignObject\x3e",a=a.replace("\x3c/svg\x3e",e+"\x3c/svg\x3e"))}a=a.replace(/zIndex="[^"]+"/g,"").replace(/isShadow="[^"]+"/g,"").replace(/symbolName="[^"]+"/g,"").replace(/jQuery[0-9]+="[^"]+"/g,"").replace(/url\(("|")(\S+)("|")\)/g,"url($2)").replace(/url\([^#]+#/g,"url(#").replace(/.*?$/,"\x3c/svg\x3e").replace(/(fill|stroke)="rgba\(([ 0-9]+,[ 0-9]+,[ 0-9]+),([ 0-9\.]+)\)"/g,'$1\x3d"rgb($2)" $1-opacity\x3d"$3"').replace(/ /g,"\u00a0").replace(/­/g,"\u00ad");return a=a.replace(//g,"\x3c$1title\x3e").replace(/height=([^" ]+)/g,'height\x3d"$1"').replace(/width=([^" ]+)/g,'width\x3d"$1"').replace(/hc-svg-href="([^"]+)">/g,'xlink:href\x3d"$1"/\x3e').replace(/ id=([^" >]+)/g,' id\x3d"$1"').replace(/class=([^" >]+)/g, +'class\x3d"$1"').replace(/ transform /g," ").replace(/:(path|rect)/g,"$1").replace(/style="([^"]+)"/g,function(a){return a.toLowerCase()})},getChartHTML:function(){return this.container.innerHTML},getSVG:function(a){var c,e,b,w,m,g=p(this.options,a);n.createElementNS||(n.createElementNS=function(a,c){return n.createElement(c)});e=q("div",null,{position:"absolute",top:"-9999em",width:this.chartWidth+"px",height:this.chartHeight+"px"},n.body);b=this.renderTo.style.width;m=this.renderTo.style.height; +b=g.exporting.sourceWidth||g.chart.width||/px$/.test(b)&&parseInt(b,10)||600;m=g.exporting.sourceHeight||g.chart.height||/px$/.test(m)&&parseInt(m,10)||400;r(g.chart,{animation:!1,renderTo:e,forExport:!0,renderer:"SVGRenderer",width:b,height:m});g.exporting.enabled=!1;delete g.data;g.series=[];k(this.series,function(a){w=p(a.userOptions,{animation:!1,enableMouseTracking:!1,showCheckbox:!1,visible:a.visible});w.isInternal||g.series.push(w)});k(this.axes,function(a){a.userOptions.internalKey=f.uniqueKey()}); +c=new f.Chart(g,this.callback);a&&k(["xAxis","yAxis","series"],function(b){var d={};a[b]&&(d[b]=a[b],c.update(d))});k(this.axes,function(a){var b=f.find(c.axes,function(b){return b.options.internalKey===a.userOptions.internalKey}),d=a.getExtremes(),e=d.userMin,d=d.userMax;!b||void 0===e&&void 0===d||b.setExtremes(e,d,!0,!1)});b=c.getChartHTML();b=this.sanitizeSVG(b,g);g=null;c.destroy();B(e);return b},getSVGForExport:function(a,c){var e=this.options.exporting;return this.getSVG(p({chart:{borderRadius:0}}, +e.chartOptions,c,{exporting:{sourceWidth:a&&a.sourceWidth||e.sourceWidth,sourceHeight:a&&a.sourceHeight||e.sourceHeight}}))},exportChart:function(a,c){c=this.getSVGForExport(a,c);a=p(this.options.exporting,a);f.post(a.url,{filename:a.filename||"chart",type:a.type,width:a.width||0,scale:a.scale,svg:c},a.formAttributes)},print:function(){var a=this,c=a.container,e=[],b=c.parentNode,f=n.body,m=f.childNodes,g=a.options.exporting.printMaxWidth,d,t;if(!a.isPrinting){a.isPrinting=!0;a.pointer.reset(null, +0);D(a,"beforePrint");if(t=g&&a.chartWidth>g)d=[a.options.chart.width,void 0,!1],a.setSize(g,void 0,!1);k(m,function(a,b){1===a.nodeType&&(e[b]=a.style.display,a.style.display="none")});f.appendChild(c);E.focus();E.print();setTimeout(function(){b.appendChild(c);k(m,function(a,b){1===a.nodeType&&(a.style.display=e[b])});a.isPrinting=!1;t&&a.setSize.apply(a,d);D(a,"afterPrint")},1E3)}},contextMenu:function(a,c,e,b,f,m,g){var d=this,t=d.options.navigation,w=d.chartWidth,h=d.chartHeight,p="cache-"+a, +l=d[p],x=Math.max(f,m),y,z;l||(d[p]=l=q("div",{className:a},{position:"absolute",zIndex:1E3,padding:x+"px"},d.container),y=q("div",{className:"highcharts-menu"},null,l),v(y,r({MozBoxShadow:"3px 3px 10px #888",WebkitBoxShadow:"3px 3px 10px #888",boxShadow:"3px 3px 10px #888"},t.menuStyle)),z=function(){v(l,{display:"none"});g&&g.setState(0);d.openMenu=!1},u(l,"mouseleave",function(){l.hideTimer=setTimeout(z,500)}),u(l,"mouseenter",function(){clearTimeout(l.hideTimer)}),p=u(n,"mouseup",function(b){d.pointer.inClass(b.target, +a)||z()}),u(d,"destroy",p),k(c,function(a){if(a){var b;a.separator?b=q("hr",null,null,y):(b=q("div",{className:"highcharts-menu-item",onclick:function(b){b&&b.stopPropagation();z();a.onclick&&a.onclick.apply(d,arguments)},innerHTML:a.text||d.options.lang[a.textKey]},null,y),b.onmouseover=function(){v(this,t.menuItemHoverStyle)},b.onmouseout=function(){v(this,t.menuItemStyle)},v(b,r({cursor:"pointer"},t.menuItemStyle)));d.exportDivElements.push(b)}}),d.exportDivElements.push(y,l),d.exportMenuWidth= +l.offsetWidth,d.exportMenuHeight=l.offsetHeight);c={display:"block"};e+d.exportMenuWidth>w?c.right=w-e-f-x+"px":c.left=e-x+"px";b+m+d.exportMenuHeight>h&&"top"!==g.alignOptions.verticalAlign?c.bottom=h-b-x+"px":c.top=b+m-x+"px";v(l,c);d.openMenu=!0},addButton:function(a){var c=this,e=c.renderer,b=p(c.options.navigation.buttonOptions,a),f=b.onclick,m=b.menuItems,g,d,h=b.symbolSize||12;c.btnCount||(c.btnCount=0);c.exportDivElements||(c.exportDivElements=[],c.exportSVGElements=[]);if(!1!==b.enabled){var k= +b.theme,n=k.states,q=n&&n.hover,n=n&&n.select,l;delete k.states;f?l=function(a){a.stopPropagation();f.call(c,a)}:m&&(l=function(){c.contextMenu(d.menuClassName,m,d.translateX,d.translateY,d.width,d.height,d);d.setState(2)});b.text&&b.symbol?k.paddingLeft=C(k.paddingLeft,25):b.text||r(k,{width:b.width,height:b.height,padding:0});d=e.button(b.text,0,0,l,k,q,n).addClass(a.className).attr({"stroke-linecap":"round",title:c.options.lang[b._titleKey],zIndex:3});d.menuClassName=a.menuClassName||"highcharts-menu-"+ +c.btnCount++;b.symbol&&(g=e.symbol(b.symbol,b.symbolX-h/2,b.symbolY-h/2,h,h).addClass("highcharts-button-symbol").attr({zIndex:1}).add(d),g.attr({stroke:b.symbolStroke,fill:b.symbolFill,"stroke-width":b.symbolStrokeWidth||1}));d.add().align(r(b,{width:d.width,x:C(b.x,c.buttonOffset)}),!0,"spacingBox");c.buttonOffset+=(d.width+b.buttonSpacing)*("right"===b.align?-1:1);c.exportSVGElements.push(d,g)}},destroyExport:function(a){var c=a?a.target:this;a=c.exportSVGElements;var e=c.exportDivElements;a&& +(k(a,function(a,e){a&&(a.onclick=a.ontouchstart=null,c.exportSVGElements[e]=a.destroy())}),a.length=0);e&&(k(e,function(a,e){clearTimeout(a.hideTimer);F(a,"mouseleave");c.exportDivElements[e]=a.onmouseout=a.onmouseover=a.ontouchstart=a.onclick=null;B(a)}),e.length=0)}});H.menu=function(a,c,e,b){return["M",a,c+2.5,"L",a+e,c+2.5,"M",a,c+b/2+.5,"L",a+e,c+b/2+.5,"M",a,c+b-1.5,"L",a+e,c+b-1.5]};A.prototype.renderExporting=function(){var a,c=this.options.exporting,e=c.buttons,b=this.isDirtyExporting||!this.exportSVGElements; +this.buttonOffset=0;this.isDirtyExporting&&this.destroyExport();if(b&&!1!==c.enabled){for(a in e)this.addButton(e[a]);this.isDirtyExporting=!1}u(this,"destroy",this.destroyExport)};A.prototype.callbacks.push(function(a){a.renderExporting();u(a,"redraw",a.renderExporting);k(["exporting","navigation"],function(c){a[c]={update:function(e,b){a.isDirtyExporting=!0;p(!0,a.options[c],e);C(b,!0)&&a.redraw()}}})})})(h)}); diff --git a/Yangcai365_design/manage/zinc/chart/highcharts-zh_CN.js b/Yangcai365_design/manage/zinc/chart/highcharts-zh_CN.js new file mode 100644 index 0000000..276b73b --- /dev/null +++ b/Yangcai365_design/manage/zinc/chart/highcharts-zh_CN.js @@ -0,0 +1,92 @@ +/** + * Highcharts-zh_CN plugins v1.0.0 (2017-02-22) + * + * (c) 2017 Jianshu Technology CO.,LTD (https://jianshukeji.com) + * + * Author : John@jianshukeji.com, Blue Monkey + * + * License: Creative Commons Attribution (CC) + */ + +(function(H) { + var protocol = window.location.protocol; + + var defaultOptionsZhCn = { + lang: { + // Highcharts + contextButtonTitle: '图表导出菜单', + decimalPoint: '.', + downloadJPEG: "下载JPEG图片", + downloadPDF: "下载PDF文件", + downloadPNG: "下载PNG文件", + downloadSVG: "下载SVG文件", + drillUpText: "返回 {series.name}", + invalidDate: '无效的时间', + loading: '加载中...', + months: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'], + noData: "没有数据", + numericSymbols: null, + printChart: "打印图表", + resetZoom: '重置缩放比例', + resetZoomTitle: '重置为原始大小', + shortMonths: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'], + thousandsSep: ',', + weekdays: ['星期一', '星期二', '星期三', '星期四', '星期五', '星期六', '星期天'], + + // Highstock + rangeSelectorFrom: '开始时间', + rangeSelectorTo: '结束时间', + rangeSelectorZoom: '缩放', + + // Highmaps + zoomIn: '缩小', + zoomOut: '放大' + }, + global: { + useUTC: true, + //timezoneOffset: -8 * 60, + canvasToolsURL: protocol + '//cdn.hcharts.cn/highcharts/modules/canvas-tools.js', + VMLRadialGradientURL: protocol + +'//cdn.hcharts.cn/highcharts/gfx/vml-radial-gradient.png' + }, + + title: { + text: '图表标题' + }, + tooltip: { + dateTimeLabelFormats: { + millisecond: '%H:%M:%S.%L', + second: '%H:%M:%S', + minute: '%H:%M', + hour: '%H:%M', + day: '%Y-%m-%d', + week: '%Y-%m-%d', + month: '%Y-%m', + year: '%Y' + } + }, + + exporting: { + url: protocol + '//export.highcharts.com.cn' + }, + credits: { + + text: 'Highcharts', + href: 'https://highcharts.com.cn', + + }, + xAxis: { + dateTimeLabelFormats: { + millisecond: '%H:%M:%S.%L', + second: '%H:%M:%S', + minute: '%H:%M', + hour: '%H:%M', + day: '%Y-%m-%d', + week: '%Y-%m-%d', + month: '%Y-%m', + year: '%Y' + } + } + }; + + H.setOptions(defaultOptionsZhCn); +}(Highcharts)); diff --git a/Yangcai365_design/manage/zinc/chart/highcharts.js b/Yangcai365_design/manage/zinc/chart/highcharts.js new file mode 100644 index 0000000..bc81ade --- /dev/null +++ b/Yangcai365_design/manage/zinc/chart/highcharts.js @@ -0,0 +1,5758 @@ +/* + Highcharts JS v5.0.7 (2017-01-17) + + (c) 2009-2016 Torstein Honsi + + License: www.highcharts.com/license + */ +(function (L, a) { + "object" === typeof module && module.exports ? module.exports = L.document ? a(L) : a : L.Highcharts = a(L) +})("undefined" !== typeof window ? window : this, function (L) { + L = function () { + var a = window, B = a.document, A = a.navigator && a.navigator.userAgent || "", H = B && B.createElementNS && !!B.createElementNS("http://www.w3.org/2000/svg", "svg").createSVGRect, G = /(edge|msie|trident)/i.test(A) && !window.opera, r = !H, g = /Firefox/.test(A), f = g && 4 > parseInt(A.split("Firefox/")[1], 10); + return a.Highcharts ? a.Highcharts.error(16, !0) : { + product: "", + version: "5.0.7", + deg2rad: 2 * Math.PI / 360, + doc: B, + hasBidiBug: f, + hasTouch: B && void 0 !== B.documentElement.ontouchstart, + isMS: G, + isWebKit: /AppleWebKit/.test(A), + isFirefox: g, + isTouchDevice: /(Mobile|Android|Windows Phone)/.test(A), + SVG_NS: "http://www.w3.org/2000/svg", + chartCount: 0, + seriesTypes: {}, + symbolSizes: {}, + svg: H, + vml: r, + win: a, + charts: [], + marginNames: ["plotTop", "marginRight", "marginBottom", "plotLeft"], + noop: function () { + } + } + }(); + (function (a) { + var B = [], A = a.charts, H = a.doc, G = a.win; + a.error = function (r, g) { + r = a.isNumber(r) ? "Highcharts error #" + + r + ": www.highcharts.com/errors/" + r : r; + if (g)throw Error(r); + G.console && console.log(r) + }; + a.Fx = function (a, g, f) { + this.options = g; + this.elem = a; + this.prop = f + }; + a.Fx.prototype = { + dSetter: function () { + var a = this.paths[0], g = this.paths[1], f = [], u = this.now, l = a.length, q; + if (1 === u)f = this.toD; else if (l === g.length && 1 > u)for (; l--;)q = parseFloat(a[l]), f[l] = isNaN(q) ? a[l] : u * parseFloat(g[l] - q) + q; else f = g; + this.elem.attr("d", f, null, !0) + }, update: function () { + var a = this.elem, g = this.prop, f = this.now, u = this.options.step; + if (this[g + "Setter"])this[g + + "Setter"](); else a.attr ? a.element && a.attr(g, f, null, !0) : a.style[g] = f + this.unit; + u && u.call(a, f, this) + }, run: function (a, g, f) { + var r = this, l = function (a) { + return l.stopped ? !1 : r.step(a) + }, q; + this.startTime = +new Date; + this.start = a; + this.end = g; + this.unit = f; + this.now = this.start; + this.pos = 0; + l.elem = this.elem; + l.prop = this.prop; + l() && 1 === B.push(l) && (l.timerId = setInterval(function () { + for (q = 0; q < B.length; q++)B[q]() || B.splice(q--, 1); + B.length || clearInterval(l.timerId) + }, 13)) + }, step: function (a) { + var r = +new Date, f, u = this.options; + f = this.elem; + var l = u.complete, q = u.duration, d = u.curAnim, b; + if (f.attr && !f.element)f = !1; else if (a || r >= q + this.startTime) { + this.now = this.end; + this.pos = 1; + this.update(); + a = d[this.prop] = !0; + for (b in d)!0 !== d[b] && (a = !1); + a && l && l.call(f); + f = !1 + } else this.pos = u.easing((r - this.startTime) / q), this.now = this.start + (this.end - this.start) * this.pos, this.update(), f = !0; + return f + }, initPath: function (r, g, f) { + function u(a) { + var e, b; + for (n = a.length; n--;)e = "M" === a[n] || "L" === a[n], b = /[a-zA-Z]/.test(a[n + 3]), e && b && a.splice(n + 1, 0, a[n + 1], a[n + 2], a[n + 1], a[n + + 2]) + } + + function l(a, e) { + for (; a.length < m;) { + a[0] = e[m - a.length]; + var b = a.slice(0, t); + [].splice.apply(a, [0, 0].concat(b)); + E && (b = a.slice(a.length - t), [].splice.apply(a, [a.length, 0].concat(b)), n--) + } + a[0] = "M" + } + + function q(a, e) { + for (var b = (m - a.length) / t; 0 < b && b--;)c = a.slice().splice(a.length / z - t, t * z), c[0] = e[m - t - b * t], C && (c[t - 6] = c[t - 2], c[t - 5] = c[t - 1]), [].splice.apply(a, [a.length / z, 0].concat(c)), E && b-- + } + + g = g || ""; + var d, b = r.startX, p = r.endX, C = -1 < g.indexOf("C"), t = C ? 7 : 3, m, c, n; + g = g.split(" "); + f = f.slice(); + var E = r.isArea, z = E ? 2 : 1, e; + C && (u(g), u(f)); + if (b && p) { + for (n = 0; n < b.length; n++)if (b[n] === p[0]) { + d = n; + break + } else if (b[0] === p[p.length - b.length + n]) { + d = n; + e = !0; + break + } + void 0 === d && (g = []) + } + g.length && a.isNumber(d) && (m = f.length + d * z * t, e ? (l(g, f), q(f, g)) : (l(f, g), q(g, f))); + return [g, f] + } + }; + a.extend = function (a, g) { + var f; + a || (a = {}); + for (f in g)a[f] = g[f]; + return a + }; + a.merge = function () { + var r, g = arguments, f, u = {}, l = function (q, d) { + var b, p; + "object" !== typeof q && (q = {}); + for (p in d)d.hasOwnProperty(p) && (b = d[p], a.isObject(b, !0) && "renderTo" !== p && "number" !== typeof b.nodeType ? + q[p] = l(q[p] || {}, b) : q[p] = d[p]); + return q + }; + !0 === g[0] && (u = g[1], g = Array.prototype.slice.call(g, 2)); + f = g.length; + for (r = 0; r < f; r++)u = l(u, g[r]); + return u + }; + a.pInt = function (a, g) { + return parseInt(a, g || 10) + }; + a.isString = function (a) { + return "string" === typeof a + }; + a.isArray = function (a) { + a = Object.prototype.toString.call(a); + return "[object Array]" === a || "[object Array Iterator]" === a + }; + a.isObject = function (r, g) { + return r && "object" === typeof r && (!g || !a.isArray(r)) + }; + a.isNumber = function (a) { + return "number" === typeof a && !isNaN(a) + }; + a.erase = + function (a, g) { + for (var f = a.length; f--;)if (a[f] === g) { + a.splice(f, 1); + break + } + }; + a.defined = function (a) { + return void 0 !== a && null !== a + }; + a.attr = function (r, g, f) { + var u, l; + if (a.isString(g))a.defined(f) ? r.setAttribute(g, f) : r && r.getAttribute && (l = r.getAttribute(g)); else if (a.defined(g) && a.isObject(g))for (u in g)r.setAttribute(u, g[u]); + return l + }; + a.splat = function (r) { + return a.isArray(r) ? r : [r] + }; + a.syncTimeout = function (a, g, f) { + if (g)return setTimeout(a, g, f); + a.call(0, f) + }; + a.pick = function () { + var a = arguments, g, f, u = a.length; + for (g = + 0; g < u; g++)if (f = a[g], void 0 !== f && null !== f)return f + }; + a.css = function (r, g) { + a.isMS && !a.svg && g && void 0 !== g.opacity && (g.filter = "alpha(opacity\x3d" + 100 * g.opacity + ")"); + a.extend(r.style, g) + }; + a.createElement = function (r, g, f, u, l) { + r = H.createElement(r); + var q = a.css; + g && a.extend(r, g); + l && q(r, {padding: 0, border: "none", margin: 0}); + f && q(r, f); + u && u.appendChild(r); + return r + }; + a.extendClass = function (r, g) { + var f = function () { + }; + f.prototype = new r; + a.extend(f.prototype, g); + return f + }; + a.pad = function (a, g, f) { + return Array((g || 2) + 1 - String(a).length).join(f || + 0) + a + }; + a.relativeLength = function (a, g) { + return /%$/.test(a) ? g * parseFloat(a) / 100 : parseFloat(a) + }; + a.wrap = function (a, g, f) { + var r = a[g]; + a[g] = function () { + var a = Array.prototype.slice.call(arguments), q = arguments, d = this; + d.proceed = function () { + r.apply(d, arguments.length ? arguments : q) + }; + a.unshift(r); + a = f.apply(this, a); + d.proceed = null; + return a + } + }; + a.getTZOffset = function (r) { + var g = a.Date; + return 6E4 * (g.hcGetTimezoneOffset && g.hcGetTimezoneOffset(r) || g.hcTimezoneOffset || 0) + }; + a.dateFormat = function (r, g, f) { + if (!a.defined(g) || isNaN(g))return a.defaultOptions.lang.invalidDate || + ""; + r = a.pick(r, "%Y-%m-%d %H:%M:%S"); + var u = a.Date, l = new u(g - a.getTZOffset(g)), q, d = l[u.hcGetHours](), b = l[u.hcGetDay](), p = l[u.hcGetDate](), C = l[u.hcGetMonth](), t = l[u.hcGetFullYear](), m = a.defaultOptions.lang, c = m.weekdays, n = m.shortWeekdays, E = a.pad, u = a.extend({ + a: n ? n[b] : c[b].substr(0, 3), + A: c[b], + d: E(p), + e: E(p, 2, " "), + w: b, + b: m.shortMonths[C], + B: m.months[C], + m: E(C + 1), + y: t.toString().substr(2, 2), + Y: t, + H: E(d), + k: d, + I: E(d % 12 || 12), + l: d % 12 || 12, + M: E(l[u.hcGetMinutes]()), + p: 12 > d ? "AM" : "PM", + P: 12 > d ? "am" : "pm", + S: E(l.getSeconds()), + L: E(Math.round(g % + 1E3), 3) + }, a.dateFormats); + for (q in u)for (; -1 !== r.indexOf("%" + q);)r = r.replace("%" + q, "function" === typeof u[q] ? u[q](g) : u[q]); + return f ? r.substr(0, 1).toUpperCase() + r.substr(1) : r + }; + a.formatSingle = function (r, g) { + var f = /\.([0-9])/, u = a.defaultOptions.lang; + /f$/.test(r) ? (f = (f = r.match(f)) ? f[1] : -1, null !== g && (g = a.numberFormat(g, f, u.decimalPoint, -1 < r.indexOf(",") ? u.thousandsSep : ""))) : g = a.dateFormat(r, g); + return g + }; + a.format = function (r, g) { + for (var f = "{", u = !1, l, q, d, b, p = [], C; r;) { + f = r.indexOf(f); + if (-1 === f)break; + l = r.slice(0, + f); + if (u) { + l = l.split(":"); + q = l.shift().split("."); + b = q.length; + C = g; + for (d = 0; d < b; d++)C = C[q[d]]; + l.length && (C = a.formatSingle(l.join(":"), C)); + p.push(C) + } else p.push(l); + r = r.slice(f + 1); + f = (u = !u) ? "}" : "{" + } + p.push(r); + return p.join("") + }; + a.getMagnitude = function (a) { + return Math.pow(10, Math.floor(Math.log(a) / Math.LN10)) + }; + a.normalizeTickInterval = function (r, g, f, u, l) { + var q, d = r; + f = a.pick(f, 1); + q = r / f; + g || (g = l ? [1, 1.2, 1.5, 2, 2.5, 3, 4, 5, 6, 8, 10] : [1, 2, 2.5, 5, 10], !1 === u && (1 === f ? g = a.grep(g, function (a) { + return 0 === a % 1 + }) : .1 >= f && (g = [1 / f]))); + for (u = 0; u < g.length && !(d = g[u], l && d * f >= r || !l && q <= (g[u] + (g[u + 1] || g[u])) / 2); u++); + return d = a.correctFloat(d * f, -Math.round(Math.log(.001) / Math.LN10)) + }; + a.stableSort = function (a, g) { + var f = a.length, r, l; + for (l = 0; l < f; l++)a[l].safeI = l; + a.sort(function (a, d) { + r = g(a, d); + return 0 === r ? a.safeI - d.safeI : r + }); + for (l = 0; l < f; l++)delete a[l].safeI + }; + a.arrayMin = function (a) { + for (var g = a.length, f = a[0]; g--;)a[g] < f && (f = a[g]); + return f + }; + a.arrayMax = function (a) { + for (var g = a.length, f = a[0]; g--;)a[g] > f && (f = a[g]); + return f + }; + a.destroyObjectProperties = + function (a, g) { + for (var f in a)a[f] && a[f] !== g && a[f].destroy && a[f].destroy(), delete a[f] + }; + a.discardElement = function (r) { + var g = a.garbageBin; + g || (g = a.createElement("div")); + r && g.appendChild(r); + g.innerHTML = "" + }; + a.correctFloat = function (a, g) { + return parseFloat(a.toPrecision(g || 14)) + }; + a.setAnimation = function (r, g) { + g.renderer.globalAnimation = a.pick(r, g.options.chart.animation, !0) + }; + a.animObject = function (r) { + return a.isObject(r) ? a.merge(r) : {duration: r ? 500 : 0} + }; + a.timeUnits = { + millisecond: 1, second: 1E3, minute: 6E4, hour: 36E5, + day: 864E5, week: 6048E5, month: 24192E5, year: 314496E5 + }; + a.numberFormat = function (r, g, f, u) { + r = +r || 0; + g = +g; + var l = a.defaultOptions.lang, q = (r.toString().split(".")[1] || "").length, d, b; + -1 === g ? g = Math.min(q, 20) : a.isNumber(g) || (g = 2); + b = (Math.abs(r) + Math.pow(10, -Math.max(g, q) - 1)).toFixed(g); + q = String(a.pInt(b)); + d = 3 < q.length ? q.length % 3 : 0; + f = a.pick(f, l.decimalPoint); + u = a.pick(u, l.thousandsSep); + r = (0 > r ? "-" : "") + (d ? q.substr(0, d) + u : ""); + r += q.substr(d).replace(/(\d{3})(?=\d)/g, "$1" + u); + g && (r += f + b.slice(-g)); + return r + }; + Math.easeInOutSine = + function (a) { + return -.5 * (Math.cos(Math.PI * a) - 1) + }; + a.getStyle = function (r, g) { + return "width" === g ? Math.min(r.offsetWidth, r.scrollWidth) - a.getStyle(r, "padding-left") - a.getStyle(r, "padding-right") : "height" === g ? Math.min(r.offsetHeight, r.scrollHeight) - a.getStyle(r, "padding-top") - a.getStyle(r, "padding-bottom") : (r = G.getComputedStyle(r, void 0)) && a.pInt(r.getPropertyValue(g)) + }; + a.inArray = function (a, g) { + return g.indexOf ? g.indexOf(a) : [].indexOf.call(g, a) + }; + a.grep = function (a, g) { + return [].filter.call(a, g) + }; + a.find = function (a, + g) { + return [].find.call(a, g) + }; + a.map = function (a, g) { + for (var f = [], u = 0, l = a.length; u < l; u++)f[u] = g.call(a[u], a[u], u, a); + return f + }; + a.offset = function (a) { + var g = H.documentElement; + a = a.getBoundingClientRect(); + return { + top: a.top + (G.pageYOffset || g.scrollTop) - (g.clientTop || 0), + left: a.left + (G.pageXOffset || g.scrollLeft) - (g.clientLeft || 0) + } + }; + a.stop = function (a, g) { + for (var f = B.length; f--;)B[f].elem !== a || g && g !== B[f].prop || (B[f].stopped = !0) + }; + a.each = function (a, g, f) { + return Array.prototype.forEach.call(a, g, f) + }; + a.addEvent = function (r, + g, f) { + function u(a) { + a.target = a.srcElement || G; + f.call(r, a) + } + + var l = r.hcEvents = r.hcEvents || {}; + r.addEventListener ? r.addEventListener(g, f, !1) : r.attachEvent && (r.hcEventsIE || (r.hcEventsIE = {}), r.hcEventsIE[f.toString()] = u, r.attachEvent("on" + g, u)); + l[g] || (l[g] = []); + l[g].push(f); + return function () { + a.removeEvent(r, g, f) + } + }; + a.removeEvent = function (r, g, f) { + function u(a, b) { + r.removeEventListener ? r.removeEventListener(a, b, !1) : r.attachEvent && (b = r.hcEventsIE[b.toString()], r.detachEvent("on" + a, b)) + } + + function l() { + var a, b; + if (r.nodeName)for (b in g ? + (a = {}, a[g] = !0) : a = d, a)if (d[b])for (a = d[b].length; a--;)u(b, d[b][a]) + } + + var q, d = r.hcEvents, b; + d && (g ? (q = d[g] || [], f ? (b = a.inArray(f, q), -1 < b && (q.splice(b, 1), d[g] = q), u(g, f)) : (l(), d[g] = [])) : (l(), r.hcEvents = {})) + }; + a.fireEvent = function (r, g, f, u) { + var l; + l = r.hcEvents; + var q, d; + f = f || {}; + if (H.createEvent && (r.dispatchEvent || r.fireEvent))l = H.createEvent("Events"), l.initEvent(g, !0, !0), a.extend(l, f), r.dispatchEvent ? r.dispatchEvent(l) : r.fireEvent(g, l); else if (l)for (l = l[g] || [], q = l.length, f.target || a.extend(f, { + preventDefault: function () { + f.defaultPrevented = !0 + }, target: r, type: g + }), g = 0; g < q; g++)(d = l[g]) && !1 === d.call(r, f) && f.preventDefault(); + u && !f.defaultPrevented && u(f) + }; + a.animate = function (r, g, f) { + var u, l = "", q, d, b; + a.isObject(f) || (u = arguments, f = {duration: u[2], easing: u[3], complete: u[4]}); + a.isNumber(f.duration) || (f.duration = 400); + f.easing = "function" === typeof f.easing ? f.easing : Math[f.easing] || Math.easeInOutSine; + f.curAnim = a.merge(g); + for (b in g)a.stop(r, b), d = new a.Fx(r, f, b), q = null, "d" === b ? (d.paths = d.initPath(r, r.d, g.d), d.toD = g.d, u = 0, q = 1) : r.attr ? u = r.attr(b) : (u = parseFloat(a.getStyle(r, + b)) || 0, "opacity" !== b && (l = "px")), q || (q = g[b]), q.match && q.match("px") && (q = q.replace(/px/g, "")), d.run(u, q, l) + }; + a.seriesType = function (r, g, f, u, l) { + var q = a.getOptions(), d = a.seriesTypes; + q.plotOptions[r] = a.merge(q.plotOptions[g], f); + d[r] = a.extendClass(d[g] || function () { + }, u); + d[r].prototype.type = r; + l && (d[r].prototype.pointClass = a.extendClass(a.Point, l)); + return d[r] + }; + a.uniqueKey = function () { + var a = Math.random().toString(36).substring(2, 9), g = 0; + return function () { + return "highcharts-" + a + "-" + g++ + } + }(); + G.jQuery && (G.jQuery.fn.highcharts = + function () { + var r = [].slice.call(arguments); + if (this[0])return r[0] ? (new (a[a.isString(r[0]) ? r.shift() : "Chart"])(this[0], r[0], r[1]), this) : A[a.attr(this[0], "data-highcharts-chart")] + }); + H && !H.defaultView && (a.getStyle = function (r, g) { + var f = {width: "clientWidth", height: "clientHeight"}[g]; + if (r.style[g])return a.pInt(r.style[g]); + "opacity" === g && (g = "filter"); + if (f)return r.style.zoom = 1, Math.max(r[f] - 2 * a.getStyle(r, "padding"), 0); + r = r.currentStyle[g.replace(/\-(\w)/g, function (a, l) { + return l.toUpperCase() + })]; + "filter" === + g && (r = r.replace(/alpha\(opacity=([0-9]+)\)/, function (a, l) { + return l / 100 + })); + return "" === r ? 1 : a.pInt(r) + }); + Array.prototype.forEach || (a.each = function (a, g, f) { + for (var u = 0, l = a.length; u < l; u++)if (!1 === g.call(f, a[u], u, a))return u + }); + Array.prototype.indexOf || (a.inArray = function (a, g) { + var f, u = 0; + if (g)for (f = g.length; u < f; u++)if (g[u] === a)return u; + return -1 + }); + Array.prototype.filter || (a.grep = function (a, g) { + for (var f = [], u = 0, l = a.length; u < l; u++)g(a[u], u) && f.push(a[u]); + return f + }); + Array.prototype.find || (a.find = function (a, g) { + var f, + u = a.length; + for (f = 0; f < u; f++)if (g(a[f], f))return a[f] + }) + })(L); + (function (a) { + var B = a.each, A = a.isNumber, H = a.map, G = a.merge, r = a.pInt; + a.Color = function (g) { + if (!(this instanceof a.Color))return new a.Color(g); + this.init(g) + }; + a.Color.prototype = { + parsers: [{ + regex: /rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/, + parse: function (a) { + return [r(a[1]), r(a[2]), r(a[3]), parseFloat(a[4], 10)] + } + }, { + regex: /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/, parse: function (a) { + return [r(a[1], + 16), r(a[2], 16), r(a[3], 16), 1] + } + }, { + regex: /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/, parse: function (a) { + return [r(a[1]), r(a[2]), r(a[3]), 1] + } + }], names: {white: "#ffffff", black: "#000000"}, init: function (g) { + var f, u, l, q; + if ((this.input = g = this.names[g] || g) && g.stops)this.stops = H(g.stops, function (d) { + return new a.Color(d[1]) + }); else for (l = this.parsers.length; l-- && !u;)q = this.parsers[l], (f = q.regex.exec(g)) && (u = q.parse(f)); + this.rgba = u || [] + }, get: function (a) { + var f = this.input, g = this.rgba, l; + this.stops ? + (l = G(f), l.stops = [].concat(l.stops), B(this.stops, function (f, d) { + l.stops[d] = [l.stops[d][0], f.get(a)] + })) : l = g && A(g[0]) ? "rgb" === a || !a && 1 === g[3] ? "rgb(" + g[0] + "," + g[1] + "," + g[2] + ")" : "a" === a ? g[3] : "rgba(" + g.join(",") + ")" : f; + return l + }, brighten: function (a) { + var f, g = this.rgba; + if (this.stops)B(this.stops, function (l) { + l.brighten(a) + }); else if (A(a) && 0 !== a)for (f = 0; 3 > f; f++)g[f] += r(255 * a), 0 > g[f] && (g[f] = 0), 255 < g[f] && (g[f] = 255); + return this + }, setOpacity: function (a) { + this.rgba[3] = a; + return this + } + }; + a.color = function (g) { + return new a.Color(g) + } + })(L); + (function (a) { + var B, A, H = a.addEvent, G = a.animate, r = a.attr, g = a.charts, f = a.color, u = a.css, l = a.createElement, q = a.defined, d = a.deg2rad, b = a.destroyObjectProperties, p = a.doc, C = a.each, t = a.extend, m = a.erase, c = a.grep, n = a.hasTouch, E = a.inArray, z = a.isArray, e = a.isFirefox, x = a.isMS, F = a.isObject, w = a.isString, h = a.isWebKit, y = a.merge, J = a.noop, K = a.pick, I = a.pInt, k = a.removeEvent, D = a.stop, P = a.svg, N = a.SVG_NS, S = a.symbolSizes, O = a.win; + B = a.SVGElement = function () { + return this + }; + B.prototype = { + opacity: 1, + SVG_NS: N, + textProps: "direction fontSize fontWeight fontFamily fontStyle color lineHeight width textDecoration textOverflow textOutline".split(" "), + init: function (a, k) { + this.element = "span" === k ? l(k) : p.createElementNS(this.SVG_NS, k); + this.renderer = a + }, + animate: function (v, k, e) { + k = a.animObject(K(k, this.renderer.globalAnimation, !0)); + 0 !== k.duration ? (e && (k.complete = e), G(this, v, k)) : this.attr(v, null, e); + return this + }, + colorGradient: function (v, k, e) { + var b = this.renderer, h, D, c, x, M, m, n, d, F, t, p, w = [], l; + v.linearGradient ? D = "linearGradient" : v.radialGradient && (D = "radialGradient"); + if (D) { + c = v[D]; + M = b.gradients; + n = v.stops; + t = e.radialReference; + z(c) && (v[D] = c = { + x1: c[0], y1: c[1], x2: c[2], + y2: c[3], gradientUnits: "userSpaceOnUse" + }); + "radialGradient" === D && t && !q(c.gradientUnits) && (x = c, c = y(c, b.getRadialAttr(t, x), {gradientUnits: "userSpaceOnUse"})); + for (p in c)"id" !== p && w.push(p, c[p]); + for (p in n)w.push(n[p]); + w = w.join(","); + M[w] ? t = M[w].attr("id") : (c.id = t = a.uniqueKey(), M[w] = m = b.createElement(D).attr(c).add(b.defs), m.radAttr = x, m.stops = [], C(n, function (v) { + 0 === v[1].indexOf("rgba") ? (h = a.color(v[1]), d = h.get("rgb"), F = h.get("a")) : (d = v[1], F = 1); + v = b.createElement("stop").attr({ + offset: v[0], "stop-color": d, + "stop-opacity": F + }).add(m); + m.stops.push(v) + })); + l = "url(" + b.url + "#" + t + ")"; + e.setAttribute(k, l); + e.gradient = w; + v.toString = function () { + return l + } + } + }, + applyTextOutline: function (a) { + var v = this.element, k, e, b, c; + -1 !== a.indexOf("contrast") && (a = a.replace(/contrast/g, this.renderer.getContrast(v.style.fill))); + this.fakeTS = !0; + this.ySetter = this.xSetter; + k = [].slice.call(v.getElementsByTagName("tspan")); + a = a.split(" "); + e = a[a.length - 1]; + (b = a[0]) && "none" !== b && (b = b.replace(/(^[\d\.]+)(.*?)$/g, function (a, v, k) { + return 2 * v + k + }), C(k, function (a) { + "highcharts-text-outline" === + a.getAttribute("class") && m(k, v.removeChild(a)) + }), c = v.firstChild, C(k, function (a, k) { + 0 === k && (a.setAttribute("x", v.getAttribute("x")), k = v.getAttribute("y"), a.setAttribute("y", k || 0), null === k && v.setAttribute("y", 0)); + a = a.cloneNode(1); + r(a, { + "class": "highcharts-text-outline", + fill: e, + stroke: e, + "stroke-width": b, + "stroke-linejoin": "round" + }); + v.insertBefore(a, c) + })) + }, + attr: function (a, k, e, b) { + var v, c = this.element, h, x = this, M; + "string" === typeof a && void 0 !== k && (v = a, a = {}, a[v] = k); + if ("string" === typeof a)x = (this[a + "Getter"] || + this._defaultGetter).call(this, a, c); else { + for (v in a)k = a[v], M = !1, b || D(this, v), this.symbolName && /^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)/.test(v) && (h || (this.symbolAttr(a), h = !0), M = !0), !this.rotation || "x" !== v && "y" !== v || (this.doTransform = !0), M || (M = this[v + "Setter"] || this._defaultSetter, M.call(this, k, v, c), this.shadows && /^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(v) && this.updateShadows(v, k, M)); + this.doTransform && (this.updateTransform(), this.doTransform = !1) + } + e && e(); + return x + }, + updateShadows: function (a, + k, e) { + for (var v = this.shadows, b = v.length; b--;)e.call(v[b], "height" === a ? Math.max(k - (v[b].cutHeight || 0), 0) : "d" === a ? this.d : k, a, v[b]) + }, + addClass: function (a, k) { + var v = this.attr("class") || ""; + -1 === v.indexOf(a) && (k || (a = (v + (v ? " " : "") + a).replace(" ", " ")), this.attr("class", a)); + return this + }, + hasClass: function (a) { + return -1 !== r(this.element, "class").indexOf(a) + }, + removeClass: function (a) { + r(this.element, "class", (r(this.element, "class") || "").replace(a, "")); + return this + }, + symbolAttr: function (a) { + var v = this; + C("x y r start end width height innerR anchorX anchorY".split(" "), + function (k) { + v[k] = K(a[k], v[k]) + }); + v.attr({d: v.renderer.symbols[v.symbolName](v.x, v.y, v.width, v.height, v)}) + }, + clip: function (a) { + return this.attr("clip-path", a ? "url(" + this.renderer.url + "#" + a.id + ")" : "none") + }, + crisp: function (a, k) { + var v, e = {}, b; + k = k || a.strokeWidth || 0; + b = Math.round(k) % 2 / 2; + a.x = Math.floor(a.x || this.x || 0) + b; + a.y = Math.floor(a.y || this.y || 0) + b; + a.width = Math.floor((a.width || this.width || 0) - 2 * b); + a.height = Math.floor((a.height || this.height || 0) - 2 * b); + q(a.strokeWidth) && (a.strokeWidth = k); + for (v in a)this[v] !== a[v] && + (this[v] = e[v] = a[v]); + return e + }, + css: function (a) { + var v = this.styles, k = {}, e = this.element, b, c, h = ""; + b = !v; + var D = ["textOverflow", "width"]; + a && a.color && (a.fill = a.color); + if (v)for (c in a)a[c] !== v[c] && (k[c] = a[c], b = !0); + if (b) { + b = this.textWidth = a && a.width && "text" === e.nodeName.toLowerCase() && I(a.width) || this.textWidth; + v && (a = t(v, k)); + this.styles = a; + b && !P && this.renderer.forExport && delete a.width; + if (x && !P)u(this.element, a); else { + v = function (a, v) { + return "-" + v.toLowerCase() + }; + for (c in a)-1 === E(c, D) && (h += c.replace(/([A-Z])/g, v) + + ":" + a[c] + ";"); + h && r(e, "style", h) + } + this.added && (b && this.renderer.buildText(this), a && a.textOutline && this.applyTextOutline(a.textOutline)) + } + return this + }, + strokeWidth: function () { + return this["stroke-width"] || 0 + }, + on: function (a, k) { + var v = this, e = v.element; + n && "click" === a ? (e.ontouchstart = function (a) { + v.touchEventFired = Date.now(); + a.preventDefault(); + k.call(e, a) + }, e.onclick = function (a) { + (-1 === O.navigator.userAgent.indexOf("Android") || 1100 < Date.now() - (v.touchEventFired || 0)) && k.call(e, a) + }) : e["on" + a] = k; + return this + }, + setRadialReference: function (a) { + var v = + this.renderer.gradients[this.element.gradient]; + this.element.radialReference = a; + v && v.radAttr && v.animate(this.renderer.getRadialAttr(a, v.radAttr)); + return this + }, + translate: function (a, k) { + return this.attr({translateX: a, translateY: k}) + }, + invert: function (a) { + this.inverted = a; + this.updateTransform(); + return this + }, + updateTransform: function () { + var a = this.translateX || 0, k = this.translateY || 0, e = this.scaleX, b = this.scaleY, c = this.inverted, h = this.rotation, D = this.element; + c && (a += this.width, k += this.height); + a = ["translate(" + a + "," + + k + ")"]; + c ? a.push("rotate(90) scale(-1,1)") : h && a.push("rotate(" + h + " " + (D.getAttribute("x") || 0) + " " + (D.getAttribute("y") || 0) + ")"); + (q(e) || q(b)) && a.push("scale(" + K(e, 1) + " " + K(b, 1) + ")"); + a.length && D.setAttribute("transform", a.join(" ")) + }, + toFront: function () { + var a = this.element; + a.parentNode.appendChild(a); + return this + }, + align: function (a, k, e) { + var v, b, c, h, D = {}; + b = this.renderer; + c = b.alignedObjects; + var x, y; + if (a) { + if (this.alignOptions = a, this.alignByTranslate = k, !e || w(e))this.alignTo = v = e || "renderer", m(c, this), c.push(this), + e = null + } else a = this.alignOptions, k = this.alignByTranslate, v = this.alignTo; + e = K(e, b[v], b); + v = a.align; + b = a.verticalAlign; + c = (e.x || 0) + (a.x || 0); + h = (e.y || 0) + (a.y || 0); + "right" === v ? x = 1 : "center" === v && (x = 2); + x && (c += (e.width - (a.width || 0)) / x); + D[k ? "translateX" : "x"] = Math.round(c); + "bottom" === b ? y = 1 : "middle" === b && (y = 2); + y && (h += (e.height - (a.height || 0)) / y); + D[k ? "translateY" : "y"] = Math.round(h); + this[this.placed ? "animate" : "attr"](D); + this.placed = !0; + this.alignAttr = D; + return this + }, + getBBox: function (a, k) { + var v, e = this.renderer, b, c = this.element, + h = this.styles, D, x = this.textStr, m, y = e.cache, n = e.cacheKeys, F; + k = K(k, this.rotation); + b = k * d; + D = h && h.fontSize; + void 0 !== x && (F = x.toString(), -1 === F.indexOf("\x3c") && (F = F.replace(/[0-9]/g, "0")), F += ["", k || 0, D, h && h.width, h && h.textOverflow].join()); + F && !a && (v = y[F]); + if (!v) { + if (c.namespaceURI === this.SVG_NS || e.forExport) { + try { + (m = this.fakeTS && function (a) { + C(c.querySelectorAll(".highcharts-text-outline"), function (v) { + v.style.display = a + }) + }) && m("none"), v = c.getBBox ? t({}, c.getBBox()) : { + width: c.offsetWidth, + height: c.offsetHeight + }, + m && m("") + } catch (W) { + } + if (!v || 0 > v.width)v = {width: 0, height: 0} + } else v = this.htmlGetBBox(); + e.isSVG && (a = v.width, e = v.height, h && "11px" === h.fontSize && 17 === Math.round(e) && (v.height = e = 14), k && (v.width = Math.abs(e * Math.sin(b)) + Math.abs(a * Math.cos(b)), v.height = Math.abs(e * Math.cos(b)) + Math.abs(a * Math.sin(b)))); + if (F && 0 < v.height) { + for (; 250 < n.length;)delete y[n.shift()]; + y[F] || n.push(F); + y[F] = v + } + } + return v + }, + show: function (a) { + return this.attr({visibility: a ? "inherit" : "visible"}) + }, + hide: function () { + return this.attr({visibility: "hidden"}) + }, + fadeOut: function (a) { + var v = this; + v.animate({opacity: 0}, { + duration: a || 150, complete: function () { + v.attr({y: -9999}) + } + }) + }, + add: function (a) { + var v = this.renderer, k = this.element, e; + a && (this.parentGroup = a); + this.parentInverted = a && a.inverted; + void 0 !== this.textStr && v.buildText(this); + this.added = !0; + if (!a || a.handleZ || this.zIndex)e = this.zIndexSetter(); + e || (a ? a.element : v.box).appendChild(k); + if (this.onAdd)this.onAdd(); + return this + }, + safeRemoveChild: function (a) { + var v = a.parentNode; + v && v.removeChild(a) + }, + destroy: function () { + var a = + this.element || {}, k = this.renderer.isSVG && "SPAN" === a.nodeName && this.parentGroup, e, b; + a.onclick = a.onmouseout = a.onmouseover = a.onmousemove = a.point = null; + D(this); + this.clipPath && (this.clipPath = this.clipPath.destroy()); + if (this.stops) { + for (b = 0; b < this.stops.length; b++)this.stops[b] = this.stops[b].destroy(); + this.stops = null + } + this.safeRemoveChild(a); + for (this.destroyShadows(); k && k.div && 0 === k.div.childNodes.length;)a = k.parentGroup, this.safeRemoveChild(k.div), delete k.div, k = a; + this.alignTo && m(this.renderer.alignedObjects, + this); + for (e in this)delete this[e]; + return null + }, + shadow: function (a, k, e) { + var v = [], b, c, h = this.element, D, x, m, y; + if (!a)this.destroyShadows(); else if (!this.shadows) { + x = K(a.width, 3); + m = (a.opacity || .15) / x; + y = this.parentInverted ? "(-1,-1)" : "(" + K(a.offsetX, 1) + ", " + K(a.offsetY, 1) + ")"; + for (b = 1; b <= x; b++)c = h.cloneNode(0), D = 2 * x + 1 - 2 * b, r(c, { + isShadow: "true", + stroke: a.color || "#000000", + "stroke-opacity": m * b, + "stroke-width": D, + transform: "translate" + y, + fill: "none" + }), e && (r(c, "height", Math.max(r(c, "height") - D, 0)), c.cutHeight = D), k ? + k.element.appendChild(c) : h.parentNode.insertBefore(c, h), v.push(c); + this.shadows = v + } + return this + }, + destroyShadows: function () { + C(this.shadows || [], function (a) { + this.safeRemoveChild(a) + }, this); + this.shadows = void 0 + }, + xGetter: function (a) { + "circle" === this.element.nodeName && ("x" === a ? a = "cx" : "y" === a && (a = "cy")); + return this._defaultGetter(a) + }, + _defaultGetter: function (a) { + a = K(this[a], this.element ? this.element.getAttribute(a) : null, 0); + /^[\-0-9\.]+$/.test(a) && (a = parseFloat(a)); + return a + }, + dSetter: function (a, k, e) { + a && a.join && (a = + a.join(" ")); + /(NaN| {2}|^$)/.test(a) && (a = "M 0 0"); + e.setAttribute(k, a); + this[k] = a + }, + dashstyleSetter: function (a) { + var v, k = this["stroke-width"]; + "inherit" === k && (k = 1); + if (a = a && a.toLowerCase()) { + a = a.replace("shortdashdotdot", "3,1,1,1,1,1,").replace("shortdashdot", "3,1,1,1").replace("shortdot", "1,1,").replace("shortdash", "3,1,").replace("longdash", "8,3,").replace(/dot/g, "1,3,").replace("dash", "4,3,").replace(/,$/, "").split(","); + for (v = a.length; v--;)a[v] = I(a[v]) * k; + a = a.join(",").replace(/NaN/g, "none"); + this.element.setAttribute("stroke-dasharray", + a) + } + }, + alignSetter: function (a) { + this.element.setAttribute("text-anchor", {left: "start", center: "middle", right: "end"}[a]) + }, + opacitySetter: function (a, k, e) { + this[k] = a; + e.setAttribute(k, a) + }, + titleSetter: function (a) { + var v = this.element.getElementsByTagName("title")[0]; + v || (v = p.createElementNS(this.SVG_NS, "title"), this.element.appendChild(v)); + v.firstChild && v.removeChild(v.firstChild); + v.appendChild(p.createTextNode(String(K(a), "").replace(/<[^>]*>/g, ""))) + }, + textSetter: function (a) { + a !== this.textStr && (delete this.bBox, + this.textStr = a, this.added && this.renderer.buildText(this)) + }, + fillSetter: function (a, k, e) { + "string" === typeof a ? e.setAttribute(k, a) : a && this.colorGradient(a, k, e) + }, + visibilitySetter: function (a, k, e) { + "inherit" === a ? e.removeAttribute(k) : e.setAttribute(k, a) + }, + zIndexSetter: function (a, k) { + var v = this.renderer, e = this.parentGroup, b = (e || v).element || v.box, c, h = this.element, D; + c = this.added; + var x; + q(a) && (h.zIndex = a, a = +a, this[k] === a && (c = !1), this[k] = a); + if (c) { + (a = this.zIndex) && e && (e.handleZ = !0); + k = b.childNodes; + for (x = 0; x < k.length && !D; x++)e = k[x], c = e.zIndex, e !== h && (I(c) > a || !q(a) && q(c) || 0 > a && !q(c) && b !== v.box) && (b.insertBefore(h, e), D = !0); + D || b.appendChild(h) + } + return D + }, + _defaultSetter: function (a, k, e) { + e.setAttribute(k, a) + } + }; + B.prototype.yGetter = B.prototype.xGetter; + B.prototype.translateXSetter = B.prototype.translateYSetter = B.prototype.rotationSetter = B.prototype.verticalAlignSetter = B.prototype.scaleXSetter = B.prototype.scaleYSetter = function (a, k) { + this[k] = a; + this.doTransform = !0 + }; + B.prototype["stroke-widthSetter"] = B.prototype.strokeSetter = function (a, + k, e) { + this[k] = a; + this.stroke && this["stroke-width"] ? (B.prototype.fillSetter.call(this, this.stroke, "stroke", e), e.setAttribute("stroke-width", this["stroke-width"]), this.hasStroke = !0) : "stroke-width" === k && 0 === a && this.hasStroke && (e.removeAttribute("stroke"), this.hasStroke = !1) + }; + A = a.SVGRenderer = function () { + this.init.apply(this, arguments) + }; + A.prototype = { + Element: B, SVG_NS: N, init: function (a, k, b, c, D, x) { + var v; + c = this.createElement("svg").attr({version: "1.1", "class": "highcharts-root"}).css(this.getStyle(c)); + v = c.element; + a.appendChild(v); + -1 === a.innerHTML.indexOf("xmlns") && r(v, "xmlns", this.SVG_NS); + this.isSVG = !0; + this.box = v; + this.boxWrapper = c; + this.alignedObjects = []; + this.url = (e || h) && p.getElementsByTagName("base").length ? O.location.href.replace(/#.*?$/, "").replace(/<[^>]*>/g, "").replace(/([\('\)])/g, "\\$1").replace(/ /g, "%20") : ""; + this.createElement("desc").add().element.appendChild(p.createTextNode("Created with Highcharts 5.0.7")); + this.defs = this.createElement("defs").add(); + this.allowHTML = x; + this.forExport = D; + this.gradients = + {}; + this.cache = {}; + this.cacheKeys = []; + this.imgCount = 0; + this.setSize(k, b, !1); + var m; + e && a.getBoundingClientRect && (k = function () { + u(a, {left: 0, top: 0}); + m = a.getBoundingClientRect(); + u(a, {left: Math.ceil(m.left) - m.left + "px", top: Math.ceil(m.top) - m.top + "px"}) + }, k(), this.unSubPixelFix = H(O, "resize", k)) + }, getStyle: function (a) { + return this.style = t({ + fontFamily: '"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif', + fontSize: "12px" + }, a) + }, setStyle: function (a) { + this.boxWrapper.css(this.getStyle(a)) + }, isHidden: function () { + return !this.boxWrapper.getBBox().width + }, + destroy: function () { + var a = this.defs; + this.box = null; + this.boxWrapper = this.boxWrapper.destroy(); + b(this.gradients || {}); + this.gradients = null; + a && (this.defs = a.destroy()); + this.unSubPixelFix && this.unSubPixelFix(); + return this.alignedObjects = null + }, createElement: function (a) { + var k = new this.Element; + k.init(this, a); + return k + }, draw: J, getRadialAttr: function (a, k) { + return {cx: a[0] - a[2] / 2 + k.cx * a[2], cy: a[1] - a[2] / 2 + k.cy * a[2], r: k.r * a[2]} + }, buildText: function (a) { + var k = a.element, v = this, e = v.forExport, b = K(a.textStr, "").toString(), + h = -1 !== b.indexOf("\x3c"), D = k.childNodes, x, m, y, n, F = r(k, "x"), d = a.styles, t = a.textWidth, w = d && d.lineHeight, l = d && d.textOutline, z = d && "ellipsis" === d.textOverflow, f = d && "nowrap" === d.whiteSpace, E = d && d.fontSize, q, g = D.length, d = t && !a.added && this.box, J = function (a) { + var e; + e = /(px|em)$/.test(a && a.style.fontSize) ? a.style.fontSize : E || v.style.fontSize || 12; + return w ? I(w) : v.fontMetrics(e, a.getAttribute("style") ? a : k).h + }; + q = [b, z, f, w, l, E, t].join(); + if (q !== a.textCache) { + for (a.textCache = q; g--;)k.removeChild(D[g]); + h || l || z || t || -1 !== + b.indexOf(" ") ? (x = /<.*class="([^"]+)".*>/, m = /<.*style="([^"]+)".*>/, y = /<.*href="(http[^"]+)".*>/, d && d.appendChild(k), b = h ? b.replace(/<(b|strong)>/g, '\x3cspan style\x3d"font-weight:bold"\x3e').replace(/<(i|em)>/g, '\x3cspan style\x3d"font-style:italic"\x3e').replace(//g, "\x3c/span\x3e").split(//g) : [b], b = c(b, function (a) { + return "" !== a + }), C(b, function (b, c) { + var h, D = 0; + b = b.replace(/^\s+|\s+$/g, "").replace(//g, "\x3c/span\x3e|||"); + h = b.split("|||"); + C(h, function (b) { + if ("" !== b || 1 === h.length) { + var d = {}, w = p.createElementNS(v.SVG_NS, "tspan"), l, E; + x.test(b) && (l = b.match(x)[1], r(w, "class", l)); + m.test(b) && (E = b.match(m)[1].replace(/(;| |^)color([ :])/, "$1fill$2"), r(w, "style", E)); + y.test(b) && !e && (r(w, "onclick", 'location.href\x3d"' + b.match(y)[1] + '"'), u(w, {cursor: "pointer"})); + b = (b.replace(/<(.|\n)*?>/g, "") || " ").replace(/</g, "\x3c").replace(/>/g, "\x3e"); + if (" " !== b) { + w.appendChild(p.createTextNode(b)); + D ? d.dx = 0 : c && null !== F && (d.x = F); + r(w, d); + k.appendChild(w); + !D && c && (!P && e && u(w, {display: "block"}), r(w, "dy", J(w))); + if (t) { + d = b.replace(/([^\^])-/g, "$1- ").split(" "); + l = 1 < h.length || c || 1 < d.length && !f; + for (var q, g, M = [], C = J(w), K = a.rotation, I = b, Q = I.length; (l || z) && (d.length || M.length);)a.rotation = 0, q = a.getBBox(!0), g = q.width, !P && v.forExport && (g = v.measureSpanWidth(w.firstChild.data, a.styles)), q = g > t, void 0 === n && (n = q), z && n ? (Q /= 2, "" === I || !q && .5 > Q ? d = [] : (I = b.substring(0, I.length + (q ? -1 : 1) * Math.ceil(Q)), d = [I + (3 < t ? "\u2026" : "")], w.removeChild(w.firstChild))) : + q && 1 !== d.length ? (w.removeChild(w.firstChild), M.unshift(d.pop())) : (d = M, M = [], d.length && !f && (w = p.createElementNS(N, "tspan"), r(w, { + dy: C, + x: F + }), E && r(w, "style", E), k.appendChild(w)), g > t && (t = g)), d.length && w.appendChild(p.createTextNode(d.join(" ").replace(/- /g, "-"))); + a.rotation = K + } + D++ + } + } + }) + }), n && a.attr("title", a.textStr), d && d.removeChild(k), l && a.applyTextOutline && a.applyTextOutline(l)) : k.appendChild(p.createTextNode(b.replace(/</g, "\x3c").replace(/>/g, "\x3e"))) + } + }, getContrast: function (a) { + a = f(a).rgba; + return 510 < + a[0] + a[1] + a[2] ? "#000000" : "#FFFFFF" + }, button: function (a, k, e, b, c, h, D, m, d) { + var v = this.label(a, k, e, d, null, null, null, null, "button"), n = 0; + v.attr(y({padding: 8, r: 2}, c)); + var F, w, p, l; + c = y({ + fill: "#f7f7f7", + stroke: "#cccccc", + "stroke-width": 1, + style: {color: "#333333", cursor: "pointer", fontWeight: "normal"} + }, c); + F = c.style; + delete c.style; + h = y(c, {fill: "#e6e6e6"}, h); + w = h.style; + delete h.style; + D = y(c, {fill: "#e6ebf5", style: {color: "#000000", fontWeight: "bold"}}, D); + p = D.style; + delete D.style; + m = y(c, {style: {color: "#cccccc"}}, m); + l = m.style; + delete m.style; + H(v.element, x ? "mouseover" : "mouseenter", function () { + 3 !== n && v.setState(1) + }); + H(v.element, x ? "mouseout" : "mouseleave", function () { + 3 !== n && v.setState(n) + }); + v.setState = function (a) { + 1 !== a && (v.state = n = a); + v.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-" + ["normal", "hover", "pressed", "disabled"][a || 0]); + v.attr([c, h, D, m][a || 0]).css([F, w, p, l][a || 0]) + }; + v.attr(c).css(t({cursor: "default"}, F)); + return v.on("click", function (a) { + 3 !== n && b.call(v, a) + }) + }, crispLine: function (a, + k) { + a[1] === a[4] && (a[1] = a[4] = Math.round(a[1]) - k % 2 / 2); + a[2] === a[5] && (a[2] = a[5] = Math.round(a[2]) + k % 2 / 2); + return a + }, path: function (a) { + var k = {fill: "none"}; + z(a) ? k.d = a : F(a) && t(k, a); + return this.createElement("path").attr(k) + }, circle: function (a, k, e) { + a = F(a) ? a : {x: a, y: k, r: e}; + k = this.createElement("circle"); + k.xSetter = k.ySetter = function (a, k, e) { + e.setAttribute("c" + k, a) + }; + return k.attr(a) + }, arc: function (a, k, e, b, c, h) { + F(a) && (k = a.y, e = a.r, b = a.innerR, c = a.start, h = a.end, a = a.x); + a = this.symbol("arc", a || 0, k || 0, e || 0, e || 0, { + innerR: b || + 0, start: c || 0, end: h || 0 + }); + a.r = e; + return a + }, rect: function (a, k, e, b, c, h) { + c = F(a) ? a.r : c; + var v = this.createElement("rect"); + a = F(a) ? a : void 0 === a ? {} : {x: a, y: k, width: Math.max(e, 0), height: Math.max(b, 0)}; + void 0 !== h && (a.strokeWidth = h, a = v.crisp(a)); + a.fill = "none"; + c && (a.r = c); + v.rSetter = function (a, k, e) { + r(e, {rx: a, ry: a}) + }; + return v.attr(a) + }, setSize: function (a, k, e) { + var b = this.alignedObjects, v = b.length; + this.width = a; + this.height = k; + for (this.boxWrapper.animate({width: a, height: k}, { + step: function () { + this.attr({ + viewBox: "0 0 " + this.attr("width") + + " " + this.attr("height") + }) + }, duration: K(e, !0) ? void 0 : 0 + }); v--;)b[v].align() + }, g: function (a) { + var k = this.createElement("g"); + return a ? k.attr({"class": "highcharts-" + a}) : k + }, image: function (a, k, e, b, c) { + var v = {preserveAspectRatio: "none"}; + 1 < arguments.length && t(v, {x: k, y: e, width: b, height: c}); + v = this.createElement("image").attr(v); + v.element.setAttributeNS ? v.element.setAttributeNS("http://www.w3.org/1999/xlink", "href", a) : v.element.setAttribute("hc-svg-href", a); + return v + }, symbol: function (a, k, e, b, c, h) { + var v = this, D, x = this.symbols[a], + m = q(k) && x && this.symbols[a](Math.round(k), Math.round(e), b, c, h), y = /^url\((.*?)\)$/, d, n; + x ? (D = this.path(m), D.attr("fill", "none"), t(D, { + symbolName: a, + x: k, + y: e, + width: b, + height: c + }), h && t(D, h)) : y.test(a) && (d = a.match(y)[1], D = this.image(d), D.imgwidth = K(S[d] && S[d].width, h && h.width), D.imgheight = K(S[d] && S[d].height, h && h.height), n = function () { + D.attr({width: D.width, height: D.height}) + }, C(["width", "height"], function (a) { + D[a + "Setter"] = function (a, k) { + var e = {}, b = this["img" + k], v = "width" === k ? "translateX" : "translateY"; + this[k] = a; + q(b) && (this.element && this.element.setAttribute(k, b), this.alignByTranslate || (e[v] = ((this[k] || 0) - b) / 2, this.attr(e))) + } + }), q(k) && D.attr({ + x: k, + y: e + }), D.isImg = !0, q(D.imgwidth) && q(D.imgheight) ? n() : (D.attr({width: 0, height: 0}), l("img", { + onload: function () { + var a = g[v.chartIndex]; + 0 === this.width && (u(this, {position: "absolute", top: "-999em"}), p.body.appendChild(this)); + S[d] = {width: this.width, height: this.height}; + D.imgwidth = this.width; + D.imgheight = this.height; + D.element && n(); + this.parentNode && this.parentNode.removeChild(this); + v.imgCount--; + if (!v.imgCount && a && a.onload)a.onload() + }, src: d + }), this.imgCount++)); + return D + }, symbols: { + circle: function (a, k, e, b) { + return this.arc(a + e / 2, k + b / 2, e / 2, b / 2, {start: 0, end: 2 * Math.PI, open: !1}) + }, square: function (a, k, e, b) { + return ["M", a, k, "L", a + e, k, a + e, k + b, a, k + b, "Z"] + }, triangle: function (a, k, e, b) { + return ["M", a + e / 2, k, "L", a + e, k + b, a, k + b, "Z"] + }, "triangle-down": function (a, k, e, b) { + return ["M", a, k, "L", a + e, k, a + e / 2, k + b, "Z"] + }, diamond: function (a, k, e, b) { + return ["M", a + e / 2, k, "L", a + e, k + b / 2, a + e / 2, k + b, a, k + b / 2, "Z"] + }, arc: function (a, + k, e, b, c) { + var v = c.start, h = c.r || e, D = c.r || b || e, x = c.end - .001; + e = c.innerR; + b = c.open; + var m = Math.cos(v), d = Math.sin(v), y = Math.cos(x), x = Math.sin(x); + c = c.end - v < Math.PI ? 0 : 1; + h = ["M", a + h * m, k + D * d, "A", h, D, 0, c, 1, a + h * y, k + D * x]; + q(e) && h.push(b ? "M" : "L", a + e * y, k + e * x, "A", e, e, 0, c, 0, a + e * m, k + e * d); + h.push(b ? "" : "Z"); + return h + }, callout: function (a, k, e, b, c) { + var h = Math.min(c && c.r || 0, e, b), D = h + 6, v = c && c.anchorX; + c = c && c.anchorY; + var x; + x = ["M", a + h, k, "L", a + e - h, k, "C", a + e, k, a + e, k, a + e, k + h, "L", a + e, k + b - h, "C", a + e, k + b, a + e, k + b, a + e - h, k + b, "L", a + h, k + b, "C", + a, k + b, a, k + b, a, k + b - h, "L", a, k + h, "C", a, k, a, k, a + h, k]; + v && v > e ? c > k + D && c < k + b - D ? x.splice(13, 3, "L", a + e, c - 6, a + e + 6, c, a + e, c + 6, a + e, k + b - h) : x.splice(13, 3, "L", a + e, b / 2, v, c, a + e, b / 2, a + e, k + b - h) : v && 0 > v ? c > k + D && c < k + b - D ? x.splice(33, 3, "L", a, c + 6, a - 6, c, a, c - 6, a, k + h) : x.splice(33, 3, "L", a, b / 2, v, c, a, b / 2, a, k + h) : c && c > b && v > a + D && v < a + e - D ? x.splice(23, 3, "L", v + 6, k + b, v, k + b + 6, v - 6, k + b, a + h, k + b) : c && 0 > c && v > a + D && v < a + e - D && x.splice(3, 3, "L", v - 6, k, v, k - 6, v + 6, k, e - h, k); + return x + } + }, clipRect: function (k, e, b, c) { + var h = a.uniqueKey(), D = this.createElement("clipPath").attr({id: h}).add(this.defs); + k = this.rect(k, e, b, c, 0).add(D); + k.id = h; + k.clipPath = D; + k.count = 0; + return k + }, text: function (a, k, e, b) { + var c = !P && this.forExport, h = {}; + if (b && (this.allowHTML || !this.forExport))return this.html(a, k, e); + h.x = Math.round(k || 0); + e && (h.y = Math.round(e)); + if (a || 0 === a)h.text = a; + a = this.createElement("text").attr(h); + c && a.css({position: "absolute"}); + b || (a.xSetter = function (a, k, e) { + var b = e.getElementsByTagName("tspan"), c, h = e.getAttribute(k), D; + for (D = 0; D < b.length; D++)c = b[D], c.getAttribute(k) === h && c.setAttribute(k, a); + e.setAttribute(k, + a) + }); + return a + }, fontMetrics: function (a, k) { + a = a || k && k.style && k.style.fontSize || this.style && this.style.fontSize; + a = /px/.test(a) ? I(a) : /em/.test(a) ? parseFloat(a) * (k ? this.fontMetrics(null, k.parentNode).f : 16) : 12; + k = 24 > a ? a + 3 : Math.round(1.2 * a); + return {h: k, b: Math.round(.8 * k), f: a} + }, rotCorr: function (a, k, e) { + var b = a; + k && e && (b = Math.max(b * Math.cos(k * d), 4)); + return {x: -a / 3 * Math.sin(k * d), y: b} + }, label: function (a, e, b, c, h, D, x, m, d) { + var v = this, n = v.g("button" !== d && "label"), F = n.text = v.text("", 0, 0, x).attr({zIndex: 1}), w, p, l = 0, z = 3, + E = 0, f, g, J, K, P, N = {}, I, u, r = /^url\((.*?)\)$/.test(c), M = r, S, Q, R, O; + d && n.addClass("highcharts-" + d); + M = r; + S = function () { + return (I || 0) % 2 / 2 + }; + Q = function () { + var a = F.element.style, k = {}; + p = (void 0 === f || void 0 === g || P) && q(F.textStr) && F.getBBox(); + n.width = (f || p.width || 0) + 2 * z + E; + n.height = (g || p.height || 0) + 2 * z; + u = z + v.fontMetrics(a && a.fontSize, F).b; + M && (w || (n.box = w = v.symbols[c] || r ? v.symbol(c) : v.rect(), w.addClass(("button" === d ? "" : "highcharts-label-box") + (d ? " highcharts-" + d + "-box" : "")), w.add(n), a = S(), k.x = a, k.y = (m ? -u : 0) + a), k.width = + Math.round(n.width), k.height = Math.round(n.height), w.attr(t(k, N)), N = {}) + }; + R = function () { + var a = E + z, k; + k = m ? 0 : u; + q(f) && p && ("center" === P || "right" === P) && (a += {center: .5, right: 1}[P] * (f - p.width)); + if (a !== F.x || k !== F.y)F.attr("x", a), void 0 !== k && F.attr("y", k); + F.x = a; + F.y = k + }; + O = function (a, k) { + w ? w.attr(a, k) : N[a] = k + }; + n.onAdd = function () { + F.add(n); + n.attr({text: a || 0 === a ? a : "", x: e, y: b}); + w && q(h) && n.attr({anchorX: h, anchorY: D}) + }; + n.widthSetter = function (a) { + f = a + }; + n.heightSetter = function (a) { + g = a + }; + n["text-alignSetter"] = function (a) { + P = a + }; + n.paddingSetter = function (a) { + q(a) && a !== z && (z = n.padding = a, R()) + }; + n.paddingLeftSetter = function (a) { + q(a) && a !== E && (E = a, R()) + }; + n.alignSetter = function (a) { + a = {left: 0, center: .5, right: 1}[a]; + a !== l && (l = a, p && n.attr({x: J})) + }; + n.textSetter = function (a) { + void 0 !== a && F.textSetter(a); + Q(); + R() + }; + n["stroke-widthSetter"] = function (a, k) { + a && (M = !0); + I = this["stroke-width"] = a; + O(k, a) + }; + n.strokeSetter = n.fillSetter = n.rSetter = function (a, k) { + "fill" === k && a && (M = !0); + O(k, a) + }; + n.anchorXSetter = function (a, k) { + h = a; + O(k, Math.round(a) - S() - J) + }; + n.anchorYSetter = + function (a, k) { + D = a; + O(k, a - K) + }; + n.xSetter = function (a) { + n.x = a; + l && (a -= l * ((f || p.width) + 2 * z)); + J = Math.round(a); + n.attr("translateX", J) + }; + n.ySetter = function (a) { + K = n.y = Math.round(a); + n.attr("translateY", K) + }; + var V = n.css; + return t(n, { + css: function (a) { + if (a) { + var k = {}; + a = y(a); + C(n.textProps, function (e) { + void 0 !== a[e] && (k[e] = a[e], delete a[e]) + }); + F.css(k) + } + return V.call(n, a) + }, getBBox: function () { + return {width: p.width + 2 * z, height: p.height + 2 * z, x: p.x - z, y: p.y - z} + }, shadow: function (a) { + a && (Q(), w && w.shadow(a)); + return n + }, destroy: function () { + k(n.element, + "mouseenter"); + k(n.element, "mouseleave"); + F && (F = F.destroy()); + w && (w = w.destroy()); + B.prototype.destroy.call(n); + n = v = Q = R = O = null + } + }) + } + }; + a.Renderer = A + })(L); + (function (a) { + var B = a.attr, A = a.createElement, H = a.css, G = a.defined, r = a.each, g = a.extend, f = a.isFirefox, u = a.isMS, l = a.isWebKit, q = a.pInt, d = a.SVGRenderer, b = a.win, p = a.wrap; + g(a.SVGElement.prototype, { + htmlCss: function (a) { + var b = this.element; + if (b = a && "SPAN" === b.tagName && a.width)delete a.width, this.textWidth = b, this.updateTransform(); + a && "ellipsis" === a.textOverflow && (a.whiteSpace = + "nowrap", a.overflow = "hidden"); + this.styles = g(this.styles, a); + H(this.element, a); + return this + }, htmlGetBBox: function () { + var a = this.element; + "text" === a.nodeName && (a.style.position = "absolute"); + return {x: a.offsetLeft, y: a.offsetTop, width: a.offsetWidth, height: a.offsetHeight} + }, htmlUpdateTransform: function () { + if (this.added) { + var a = this.renderer, b = this.element, m = this.translateX || 0, c = this.translateY || 0, n = this.x || 0, d = this.y || 0, p = this.textAlign || "left", e = { + left: 0, + center: .5, + right: 1 + }[p], x = this.styles; + H(b, {marginLeft: m, marginTop: c}); + this.shadows && r(this.shadows, function (a) { + H(a, {marginLeft: m + 1, marginTop: c + 1}) + }); + this.inverted && r(b.childNodes, function (e) { + a.invertChild(e, b) + }); + if ("SPAN" === b.tagName) { + var F = this.rotation, w = q(this.textWidth), h = x && x.whiteSpace, y = [F, p, b.innerHTML, this.textWidth, this.textAlign].join(); + y !== this.cTT && (x = a.fontMetrics(b.style.fontSize).b, G(F) && this.setSpanRotation(F, e, x), H(b, { + width: "", + whiteSpace: h || "nowrap" + }), b.offsetWidth > w && /[ \-]/.test(b.textContent || b.innerText) && H(b, { + width: w + "px", display: "block", whiteSpace: h || + "normal" + }), this.getSpanCorrection(b.offsetWidth, x, e, F, p)); + H(b, {left: n + (this.xCorr || 0) + "px", top: d + (this.yCorr || 0) + "px"}); + l && (x = b.offsetHeight); + this.cTT = y + } + } else this.alignOnAdd = !0 + }, setSpanRotation: function (a, d, m) { + var c = {}, n = u ? "-ms-transform" : l ? "-webkit-transform" : f ? "MozTransform" : b.opera ? "-o-transform" : ""; + c[n] = c.transform = "rotate(" + a + "deg)"; + c[n + (f ? "Origin" : "-origin")] = c.transformOrigin = 100 * d + "% " + m + "px"; + H(this.element, c) + }, getSpanCorrection: function (a, b, m) { + this.xCorr = -a * m; + this.yCorr = -b + } + }); + g(d.prototype, + { + html: function (a, b, m) { + var c = this.createElement("span"), n = c.element, d = c.renderer, l = d.isSVG, e = function (a, e) { + r(["opacity", "visibility"], function (b) { + p(a, b + "Setter", function (a, b, c, x) { + a.call(this, b, c, x); + e[c] = b + }) + }) + }; + c.textSetter = function (a) { + a !== n.innerHTML && delete this.bBox; + n.innerHTML = this.textStr = a; + c.htmlUpdateTransform() + }; + l && e(c, c.element.style); + c.xSetter = c.ySetter = c.alignSetter = c.rotationSetter = function (a, e) { + "align" === e && (e = "textAlign"); + c[e] = a; + c.htmlUpdateTransform() + }; + c.attr({ + text: a, x: Math.round(b), + y: Math.round(m) + }).css({fontFamily: this.style.fontFamily, fontSize: this.style.fontSize, position: "absolute"}); + n.style.whiteSpace = "nowrap"; + c.css = c.htmlCss; + l && (c.add = function (a) { + var b, x = d.box.parentNode, h = []; + if (this.parentGroup = a) { + if (b = a.div, !b) { + for (; a;)h.push(a), a = a.parentGroup; + r(h.reverse(), function (a) { + var n, m = B(a.element, "class"); + m && (m = {className: m}); + b = a.div = a.div || A("div", m, { + position: "absolute", + left: (a.translateX || 0) + "px", + top: (a.translateY || 0) + "px", + display: a.display, + opacity: a.opacity, + pointerEvents: a.styles && + a.styles.pointerEvents + }, b || x); + n = b.style; + g(a, { + on: function () { + c.on.apply({element: h[0].div}, arguments); + return a + }, translateXSetter: function (e, k) { + n.left = e + "px"; + a[k] = e; + a.doTransform = !0 + }, translateYSetter: function (e, k) { + n.top = e + "px"; + a[k] = e; + a.doTransform = !0 + } + }); + e(a, n) + }) + } + } else b = x; + b.appendChild(n); + c.added = !0; + c.alignOnAdd && c.htmlUpdateTransform(); + return c + }); + return c + } + }) + })(L); + (function (a) { + var B, A, H = a.createElement, G = a.css, r = a.defined, g = a.deg2rad, f = a.discardElement, u = a.doc, l = a.each, q = a.erase, d = a.extend; + B = a.extendClass; + var b = a.isArray, p = a.isNumber, C = a.isObject, t = a.merge; + A = a.noop; + var m = a.pick, c = a.pInt, n = a.SVGElement, E = a.SVGRenderer, z = a.win; + a.svg || (A = { + docMode8: u && 8 === u.documentMode, init: function (a, b) { + var e = ["\x3c", b, ' filled\x3d"f" stroked\x3d"f"'], c = ["position: ", "absolute", ";"], h = "div" === b; + ("shape" === b || h) && c.push("left:0;top:0;width:1px;height:1px;"); + c.push("visibility: ", h ? "hidden" : "visible"); + e.push(' style\x3d"', c.join(""), '"/\x3e'); + b && (e = h || "span" === b || "img" === b ? e.join("") : a.prepVML(e), this.element = H(e)); + this.renderer = + a + }, add: function (a) { + var e = this.renderer, b = this.element, c = e.box, h = a && a.inverted, c = a ? a.element || a : c; + a && (this.parentGroup = a); + h && e.invertChild(b, c); + c.appendChild(b); + this.added = !0; + this.alignOnAdd && !this.deferUpdateTransform && this.updateTransform(); + if (this.onAdd)this.onAdd(); + this.className && this.attr("class", this.className); + return this + }, updateTransform: n.prototype.htmlUpdateTransform, setSpanRotation: function () { + var a = this.rotation, b = Math.cos(a * g), c = Math.sin(a * g); + G(this.element, { + filter: a ? ["progid:DXImageTransform.Microsoft.Matrix(M11\x3d", + b, ", M12\x3d", -c, ", M21\x3d", c, ", M22\x3d", b, ", sizingMethod\x3d'auto expand')"].join("") : "none" + }) + }, getSpanCorrection: function (a, b, c, n, h) { + var e = n ? Math.cos(n * g) : 1, x = n ? Math.sin(n * g) : 0, d = m(this.elemHeight, this.element.offsetHeight), F; + this.xCorr = 0 > e && -a; + this.yCorr = 0 > x && -d; + F = 0 > e * x; + this.xCorr += x * b * (F ? 1 - c : c); + this.yCorr -= e * b * (n ? F ? c : 1 - c : 1); + h && "left" !== h && (this.xCorr -= a * c * (0 > e ? -1 : 1), n && (this.yCorr -= d * c * (0 > x ? -1 : 1)), G(this.element, {textAlign: h})) + }, pathToVML: function (a) { + for (var b = a.length, e = []; b--;)p(a[b]) ? e[b] = + Math.round(10 * a[b]) - 5 : "Z" === a[b] ? e[b] = "x" : (e[b] = a[b], !a.isArc || "wa" !== a[b] && "at" !== a[b] || (e[b + 5] === e[b + 7] && (e[b + 7] += a[b + 7] > a[b + 5] ? 1 : -1), e[b + 6] === e[b + 8] && (e[b + 8] += a[b + 8] > a[b + 6] ? 1 : -1))); + return e.join(" ") || "x" + }, clip: function (a) { + var b = this, e; + a ? (e = a.members, q(e, b), e.push(b), b.destroyClip = function () { + q(e, b) + }, a = a.getCSS(b)) : (b.destroyClip && b.destroyClip(), a = {clip: b.docMode8 ? "inherit" : "rect(auto)"}); + return b.css(a) + }, css: n.prototype.htmlCss, safeRemoveChild: function (a) { + a.parentNode && f(a) + }, destroy: function () { + this.destroyClip && + this.destroyClip(); + return n.prototype.destroy.apply(this) + }, on: function (a, b) { + this.element["on" + a] = function () { + var a = z.event; + a.target = a.srcElement; + b(a) + }; + return this + }, cutOffPath: function (a, b) { + var e; + a = a.split(/[ ,]/); + e = a.length; + if (9 === e || 11 === e)a[e - 4] = a[e - 2] = c(a[e - 2]) - 10 * b; + return a.join(" ") + }, shadow: function (a, b, n) { + var e = [], h, d = this.element, x = this.renderer, p, F = d.style, k, D = d.path, l, t, z, f; + D && "string" !== typeof D.value && (D = "x"); + t = D; + if (a) { + z = m(a.width, 3); + f = (a.opacity || .15) / z; + for (h = 1; 3 >= h; h++)l = 2 * z + 1 - 2 * h, n && + (t = this.cutOffPath(D.value, l + .5)), k = ['\x3cshape isShadow\x3d"true" strokeweight\x3d"', l, '" filled\x3d"false" path\x3d"', t, '" coordsize\x3d"10 10" style\x3d"', d.style.cssText, '" /\x3e'], p = H(x.prepVML(k), null, { + left: c(F.left) + m(a.offsetX, 1), + top: c(F.top) + m(a.offsetY, 1) + }), n && (p.cutOff = l + 1), k = ['\x3cstroke color\x3d"', a.color || "#000000", '" opacity\x3d"', f * h, '"/\x3e'], H(x.prepVML(k), null, null, p), b ? b.element.appendChild(p) : d.parentNode.insertBefore(p, d), e.push(p); + this.shadows = e + } + return this + }, updateShadows: A, + setAttr: function (a, b) { + this.docMode8 ? this.element[a] = b : this.element.setAttribute(a, b) + }, classSetter: function (a) { + (this.added ? this.element : this).className = a + }, dashstyleSetter: function (a, b, c) { + (c.getElementsByTagName("stroke")[0] || H(this.renderer.prepVML(["\x3cstroke/\x3e"]), null, null, c))[b] = a || "solid"; + this[b] = a + }, dSetter: function (a, b, c) { + var e = this.shadows; + a = a || []; + this.d = a.join && a.join(" "); + c.path = a = this.pathToVML(a); + if (e)for (c = e.length; c--;)e[c].path = e[c].cutOff ? this.cutOffPath(a, e[c].cutOff) : a; + this.setAttr(b, + a) + }, fillSetter: function (a, b, c) { + var e = c.nodeName; + "SPAN" === e ? c.style.color = a : "IMG" !== e && (c.filled = "none" !== a, this.setAttr("fillcolor", this.renderer.color(a, c, b, this))) + }, "fill-opacitySetter": function (a, b, c) { + H(this.renderer.prepVML(["\x3c", b.split("-")[0], ' opacity\x3d"', a, '"/\x3e']), null, null, c) + }, opacitySetter: A, rotationSetter: function (a, b, c) { + c = c.style; + this[b] = c[b] = a; + c.left = -Math.round(Math.sin(a * g) + 1) + "px"; + c.top = Math.round(Math.cos(a * g)) + "px" + }, strokeSetter: function (a, b, c) { + this.setAttr("strokecolor", + this.renderer.color(a, c, b, this)) + }, "stroke-widthSetter": function (a, b, c) { + c.stroked = !!a; + this[b] = a; + p(a) && (a += "px"); + this.setAttr("strokeweight", a) + }, titleSetter: function (a, b) { + this.setAttr(b, a) + }, visibilitySetter: function (a, b, c) { + "inherit" === a && (a = "visible"); + this.shadows && l(this.shadows, function (c) { + c.style[b] = a + }); + "DIV" === c.nodeName && (a = "hidden" === a ? "-999em" : 0, this.docMode8 || (c.style[b] = a ? "visible" : "hidden"), b = "top"); + c.style[b] = a + }, xSetter: function (a, b, c) { + this[b] = a; + "x" === b ? b = "left" : "y" === b && (b = "top"); + this.updateClipping ? + (this[b] = a, this.updateClipping()) : c.style[b] = a + }, zIndexSetter: function (a, b, c) { + c.style[b] = a + } + }, A["stroke-opacitySetter"] = A["fill-opacitySetter"], a.VMLElement = A = B(n, A), A.prototype.ySetter = A.prototype.widthSetter = A.prototype.heightSetter = A.prototype.xSetter, A = { + Element: A, isIE8: -1 < z.navigator.userAgent.indexOf("MSIE 8.0"), init: function (a, b, c) { + var e, h; + this.alignedObjects = []; + e = this.createElement("div").css({position: "relative"}); + h = e.element; + a.appendChild(e.element); + this.isVML = !0; + this.box = h; + this.boxWrapper = + e; + this.gradients = {}; + this.cache = {}; + this.cacheKeys = []; + this.imgCount = 0; + this.setSize(b, c, !1); + if (!u.namespaces.hcv) { + u.namespaces.add("hcv", "urn:schemas-microsoft-com:vml"); + try { + u.createStyleSheet().cssText = "hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } " + } catch (y) { + u.styleSheets[0].cssText += "hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } " + } + } + }, isHidden: function () { + return !this.box.offsetWidth + }, + clipRect: function (a, b, c, n) { + var e = this.createElement(), m = C(a); + return d(e, { + members: [], + count: 0, + left: (m ? a.x : a) + 1, + top: (m ? a.y : b) + 1, + width: (m ? a.width : c) - 1, + height: (m ? a.height : n) - 1, + getCSS: function (a) { + var b = a.element, c = b.nodeName, k = a.inverted, e = this.top - ("shape" === c ? b.offsetTop : 0), h = this.left, b = h + this.width, n = e + this.height, e = {clip: "rect(" + Math.round(k ? h : e) + "px," + Math.round(k ? n : b) + "px," + Math.round(k ? b : n) + "px," + Math.round(k ? e : h) + "px)"}; + !k && a.docMode8 && "DIV" === c && d(e, {width: b + "px", height: n + "px"}); + return e + }, + updateClipping: function () { + l(e.members, + function (a) { + a.element && a.css(e.getCSS(a)) + }) + } + }) + }, color: function (b, c, n, m) { + var e = this, d, x = /^rgba/, p, t, k = "none"; + b && b.linearGradient ? t = "gradient" : b && b.radialGradient && (t = "pattern"); + if (t) { + var D, w, z = b.linearGradient || b.radialGradient, f, E, v, q, g, F = ""; + b = b.stops; + var C, u = [], r = function () { + p = ['\x3cfill colors\x3d"' + u.join(",") + '" opacity\x3d"', v, '" o:opacity2\x3d"', E, '" type\x3d"', t, '" ', F, 'focus\x3d"100%" method\x3d"any" /\x3e']; + H(e.prepVML(p), null, null, c) + }; + f = b[0]; + C = b[b.length - 1]; + 0 < f[0] && b.unshift([0, f[1]]); + 1 > + C[0] && b.push([1, C[1]]); + l(b, function (k, b) { + x.test(k[1]) ? (d = a.color(k[1]), D = d.get("rgb"), w = d.get("a")) : (D = k[1], w = 1); + u.push(100 * k[0] + "% " + D); + b ? (v = w, q = D) : (E = w, g = D) + }); + if ("fill" === n)if ("gradient" === t)n = z.x1 || z[0] || 0, b = z.y1 || z[1] || 0, f = z.x2 || z[2] || 0, z = z.y2 || z[3] || 0, F = 'angle\x3d"' + (90 - 180 * Math.atan((z - b) / (f - n)) / Math.PI) + '"', r(); else { + var k = z.r, A = 2 * k, B = 2 * k, G = z.cx, U = z.cy, L = c.radialReference, T, k = function () { + L && (T = m.getBBox(), G += (L[0] - T.x) / T.width - .5, U += (L[1] - T.y) / T.height - .5, A *= L[2] / T.width, B *= L[2] / T.height); + F = + 'src\x3d"' + a.getOptions().global.VMLRadialGradientURL + '" size\x3d"' + A + "," + B + '" origin\x3d"0.5,0.5" position\x3d"' + G + "," + U + '" color2\x3d"' + g + '" '; + r() + }; + m.added ? k() : m.onAdd = k; + k = q + } else k = D + } else x.test(b) && "IMG" !== c.tagName ? (d = a.color(b), m[n + "-opacitySetter"](d.get("a"), n, c), k = d.get("rgb")) : (k = c.getElementsByTagName(n), k.length && (k[0].opacity = 1, k[0].type = "solid"), k = b); + return k + }, prepVML: function (a) { + var b = this.isIE8; + a = a.join(""); + b ? (a = a.replace("/\x3e", ' xmlns\x3d"urn:schemas-microsoft-com:vml" /\x3e'), a = + -1 === a.indexOf('style\x3d"') ? a.replace("/\x3e", ' style\x3d"display:inline-block;behavior:url(#default#VML);" /\x3e') : a.replace('style\x3d"', 'style\x3d"display:inline-block;behavior:url(#default#VML);')) : a = a.replace("\x3c", "\x3chcv:"); + return a + }, text: E.prototype.html, path: function (a) { + var c = {coordsize: "10 10"}; + b(a) ? c.d = a : C(a) && d(c, a); + return this.createElement("shape").attr(c) + }, circle: function (a, b, c) { + var e = this.symbol("circle"); + C(a) && (c = a.r, b = a.y, a = a.x); + e.isCircle = !0; + e.r = c; + return e.attr({x: a, y: b}) + }, g: function (a) { + var b; + a && (b = {className: "highcharts-" + a, "class": "highcharts-" + a}); + return this.createElement("div").attr(b) + }, image: function (a, b, c, n, h) { + var e = this.createElement("img").attr({src: a}); + 1 < arguments.length && e.attr({x: b, y: c, width: n, height: h}); + return e + }, createElement: function (a) { + return "rect" === a ? this.symbol(a) : E.prototype.createElement.call(this, a) + }, invertChild: function (a, b) { + var e = this; + b = b.style; + var n = "IMG" === a.tagName && a.style; + G(a, { + flip: "x", + left: c(b.width) - (n ? c(n.top) : 1), + top: c(b.height) - (n ? c(n.left) : 1), + rotation: -90 + }); + l(a.childNodes, function (b) { + e.invertChild(b, a) + }) + }, symbols: { + arc: function (a, b, c, n, h) { + var e = h.start, m = h.end, d = h.r || c || n; + c = h.innerR; + n = Math.cos(e); + var p = Math.sin(e), k = Math.cos(m), D = Math.sin(m); + if (0 === m - e)return ["x"]; + e = ["wa", a - d, b - d, a + d, b + d, a + d * n, b + d * p, a + d * k, b + d * D]; + h.open && !c && e.push("e", "M", a, b); + e.push("at", a - c, b - c, a + c, b + c, a + c * k, b + c * D, a + c * n, b + c * p, "x", "e"); + e.isArc = !0; + return e + }, circle: function (a, b, c, n, h) { + h && r(h.r) && (c = n = 2 * h.r); + h && h.isCircle && (a -= c / 2, b -= n / 2); + return ["wa", a, b, a + c, b + n, a + c, b + n / 2, a + c, b + n / 2, "e"] + }, + rect: function (a, b, c, n, h) { + return E.prototype.symbols[r(h) && h.r ? "callout" : "square"].call(0, a, b, c, n, h) + } + } + }, a.VMLRenderer = B = function () { + this.init.apply(this, arguments) + }, B.prototype = t(E.prototype, A), a.Renderer = B); + E.prototype.measureSpanWidth = function (a, b) { + var c = u.createElement("span"); + a = u.createTextNode(a); + c.appendChild(a); + G(c, b); + this.box.appendChild(c); + b = c.offsetWidth; + f(c); + return b + } + })(L); + (function (a) { + function B() { + var l = a.defaultOptions.global, f = u.moment; + if (l.timezone) { + if (f)return function (a) { + return -f.tz(a, + l.timezone).utcOffset() + }; + a.error(25) + } + return l.useUTC && l.getTimezoneOffset + } + + function A() { + var l = a.defaultOptions.global, q, d = l.useUTC, b = d ? "getUTC" : "get", p = d ? "setUTC" : "set"; + a.Date = q = l.Date || u.Date; + q.hcTimezoneOffset = d && l.timezoneOffset; + q.hcGetTimezoneOffset = B(); + q.hcMakeTime = function (a, b, m, c, n, p) { + var l; + d ? (l = q.UTC.apply(0, arguments), l += r(l)) : l = (new q(a, b, f(m, 1), f(c, 0), f(n, 0), f(p, 0))).getTime(); + return l + }; + G("Minutes Hours Day Date Month FullYear".split(" "), function (a) { + q["hcGet" + a] = b + a + }); + G("Milliseconds Seconds Minutes Hours Date Month FullYear".split(" "), + function (a) { + q["hcSet" + a] = p + a + }) + } + + var H = a.color, G = a.each, r = a.getTZOffset, g = a.merge, f = a.pick, u = a.win; + a.defaultOptions = { + colors: "#7cb5ec #434348 #90ed7d #f7a35c #8085e9 #f15c80 #e4d354 #2b908f #f45b5b #91e8e1".split(" "), + symbols: ["circle", "diamond", "square", "triangle", "triangle-down"], + lang: { + loading: "Loading...", + months: "January February March April May June July August September October November December".split(" "), + shortMonths: "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "), + weekdays: "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "), + decimalPoint: ".", + numericSymbols: "kMGTPE".split(""), + resetZoom: "Reset zoom", + resetZoomTitle: "Reset zoom level 1:1", + thousandsSep: " " + }, + global: {useUTC: !0, VMLRadialGradientURL: "http://code.highcharts.com/5.0.7/gfx/vml-radial-gradient.png"}, + chart: { + borderRadius: 0, + defaultSeriesType: "line", + ignoreHiddenSeries: !0, + spacing: [10, 10, 15, 10], + resetZoomButton: {theme: {zIndex: 20}, position: {align: "right", x: -10, y: 10}}, + width: null, + height: null, + borderColor: "#335cad", + backgroundColor: "#ffffff", + plotBorderColor: "#cccccc" + }, + title: { + text: "Chart title", + align: "center", margin: 15, widthAdjust: -44 + }, + subtitle: {text: "", align: "center", widthAdjust: -44}, + plotOptions: {}, + labels: {style: {position: "absolute", color: "#333333"}}, + legend: { + enabled: !0, + align: "center", + layout: "horizontal", + labelFormatter: function () { + return this.name + }, + borderColor: "#999999", + borderRadius: 0, + navigation: {activeColor: "#003399", inactiveColor: "#cccccc"}, + itemStyle: {color: "#333333", fontSize: "12px", fontWeight: "bold"}, + itemHoverStyle: {color: "#000000"}, + itemHiddenStyle: {color: "#cccccc"}, + shadow: !1, + itemCheckboxStyle: { + position: "absolute", + width: "13px", height: "13px" + }, + squareSymbol: !0, + symbolPadding: 5, + verticalAlign: "bottom", + x: 0, + y: 0, + title: {style: {fontWeight: "bold"}} + }, + loading: { + labelStyle: {fontWeight: "bold", position: "relative", top: "45%"}, + style: {position: "absolute", backgroundColor: "#ffffff", opacity: .5, textAlign: "center"} + }, + tooltip: { + enabled: !0, + animation: a.svg, + borderRadius: 3, + dateTimeLabelFormats: { + millisecond: "%A, %b %e, %H:%M:%S.%L", + second: "%A, %b %e, %H:%M:%S", + minute: "%A, %b %e, %H:%M", + hour: "%A, %b %e, %H:%M", + day: "%A, %b %e, %Y", + week: "Week from %A, %b %e, %Y", + month: "%B %Y", + year: "%Y" + }, + footerFormat: "", + padding: 8, + snap: a.isTouchDevice ? 25 : 10, + backgroundColor: H("#f7f7f7").setOpacity(.85).get(), + borderWidth: 1, + headerFormat: '\x3cspan style\x3d"font-size: 10px"\x3e{point.key}\x3c/span\x3e\x3cbr/\x3e', + pointFormat: '\x3cspan style\x3d"color:{point.color}"\x3e\u25cf\x3c/span\x3e {series.name}: \x3cb\x3e{point.y}\x3c/b\x3e\x3cbr/\x3e', + shadow: !0, + style: { + color: "#333333", + cursor: "default", + fontSize: "12px", + pointerEvents: "none", + whiteSpace: "nowrap" + } + }, + credits: { + } + }; + a.setOptions = function (l) { + a.defaultOptions = g(!0, a.defaultOptions, l); + A(); + return a.defaultOptions + }; + a.getOptions = function () { + return a.defaultOptions + }; + a.defaultPlotOptions = a.defaultOptions.plotOptions; + A() + })(L); + (function (a) { + var B = a.arrayMax, A = a.arrayMin, H = a.defined, G = a.destroyObjectProperties, r = a.each, g = a.erase, f = a.merge, u = a.pick; + a.PlotLineOrBand = function (a, f) { + this.axis = + a; + f && (this.options = f, this.id = f.id) + }; + a.PlotLineOrBand.prototype = { + render: function () { + var a = this, q = a.axis, d = q.horiz, b = a.options, p = b.label, g = a.label, t = b.to, m = b.from, c = b.value, n = H(m) && H(t), E = H(c), z = a.svgElem, e = !z, x = [], F, w = b.color, h = u(b.zIndex, 0), y = b.events, x = {"class": "highcharts-plot-" + (n ? "band " : "line ") + (b.className || "")}, J = {}, K = q.chart.renderer, I = n ? "bands" : "lines", k = q.log2lin; + q.isLog && (m = k(m), t = k(t), c = k(c)); + E ? (x = { + stroke: w, + "stroke-width": b.width + }, b.dashStyle && (x.dashstyle = b.dashStyle)) : n && (w && (x.fill = + w), b.borderWidth && (x.stroke = b.borderColor, x["stroke-width"] = b.borderWidth)); + J.zIndex = h; + I += "-" + h; + (w = q[I]) || (q[I] = w = K.g("plot-" + I).attr(J).add()); + e && (a.svgElem = z = K.path().attr(x).add(w)); + if (E)x = q.getPlotLinePath(c, z.strokeWidth()); else if (n)x = q.getPlotBandPath(m, t, b); else return; + if (e && x && x.length) { + if (z.attr({d: x}), y)for (F in b = function (b) { + z.on(b, function (k) { + y[b].apply(a, [k]) + }) + }, y)b(F) + } else z && (x ? (z.show(), z.animate({d: x})) : (z.hide(), g && (a.label = g = g.destroy()))); + p && H(p.text) && x && x.length && 0 < q.width && + 0 < q.height && !x.flat ? (p = f({ + align: d && n && "center", + x: d ? !n && 4 : 10, + verticalAlign: !d && n && "middle", + y: d ? n ? 16 : 10 : n ? 6 : -4, + rotation: d && !n && 90 + }, p), this.renderLabel(p, x, n, h)) : g && g.hide(); + return a + }, renderLabel: function (a, f, d, b) { + var p = this.label, l = this.axis.chart.renderer; + p || (p = { + align: a.textAlign || a.align, + rotation: a.rotation, + "class": "highcharts-plot-" + (d ? "band" : "line") + "-label " + (a.className || "") + }, p.zIndex = b, this.label = p = l.text(a.text, 0, 0, a.useHTML).attr(p).add(), p.css(a.style)); + b = [f[1], f[4], d ? f[6] : f[1]]; + f = [f[2], f[5], + d ? f[7] : f[2]]; + d = A(b); + l = A(f); + p.align(a, !1, {x: d, y: l, width: B(b) - d, height: B(f) - l}); + p.show() + }, destroy: function () { + g(this.axis.plotLinesAndBands, this); + delete this.axis; + G(this) + } + }; + a.AxisPlotLineOrBandExtension = { + getPlotBandPath: function (a, f) { + f = this.getPlotLinePath(f, null, null, !0); + (a = this.getPlotLinePath(a, null, null, !0)) && f ? (a.flat = a.toString() === f.toString(), a.push(f[4], f[5], f[1], f[2], "z")) : a = null; + return a + }, addPlotBand: function (a) { + return this.addPlotBandOrLine(a, "plotBands") + }, addPlotLine: function (a) { + return this.addPlotBandOrLine(a, + "plotLines") + }, addPlotBandOrLine: function (f, g) { + var d = (new a.PlotLineOrBand(this, f)).render(), b = this.userOptions; + d && (g && (b[g] = b[g] || [], b[g].push(f)), this.plotLinesAndBands.push(d)); + return d + }, removePlotBandOrLine: function (a) { + for (var f = this.plotLinesAndBands, d = this.options, b = this.userOptions, p = f.length; p--;)f[p].id === a && f[p].destroy(); + r([d.plotLines || [], b.plotLines || [], d.plotBands || [], b.plotBands || []], function (b) { + for (p = b.length; p--;)b[p].id === a && g(b, b[p]) + }) + } + } + })(L); + (function (a) { + var B = a.correctFloat, A = + a.defined, H = a.destroyObjectProperties, G = a.isNumber, r = a.merge, g = a.pick, f = a.deg2rad; + a.Tick = function (a, f, g, d) { + this.axis = a; + this.pos = f; + this.type = g || ""; + this.isNew = !0; + g || d || this.addLabel() + }; + a.Tick.prototype = { + addLabel: function () { + var a = this.axis, f = a.options, q = a.chart, d = a.categories, b = a.names, p = this.pos, C = f.labels, t = a.tickPositions, m = p === t[0], c = p === t[t.length - 1], b = d ? g(d[p], b[p], p) : p, d = this.label, t = t.info, n; + a.isDatetimeAxis && t && (n = f.dateTimeLabelFormats[t.higherRanks[p] || t.unitName]); + this.isFirst = m; + this.isLast = + c; + f = a.labelFormatter.call({ + axis: a, + chart: q, + isFirst: m, + isLast: c, + dateTimeLabelFormat: n, + value: a.isLog ? B(a.lin2log(b)) : b + }); + A(d) ? d && d.attr({text: f}) : (this.labelLength = (this.label = d = A(f) && C.enabled ? q.renderer.text(f, 0, 0, C.useHTML).css(r(C.style)).add(a.labelGroup) : null) && d.getBBox().width, this.rotation = 0) + }, getLabelSize: function () { + return this.label ? this.label.getBBox()[this.axis.horiz ? "height" : "width"] : 0 + }, handleOverflow: function (a) { + var l = this.axis, q = a.x, d = l.chart.chartWidth, b = l.chart.spacing, p = g(l.labelLeft, + Math.min(l.pos, b[3])), b = g(l.labelRight, Math.max(l.pos + l.len, d - b[1])), C = this.label, t = this.rotation, m = { + left: 0, + center: .5, + right: 1 + }[l.labelAlign], c = C.getBBox().width, n = l.getSlotWidth(), E = n, z = 1, e, x = {}; + if (t)0 > t && q - m * c < p ? e = Math.round(q / Math.cos(t * f) - p) : 0 < t && q + m * c > b && (e = Math.round((d - q) / Math.cos(t * f))); else if (d = q + (1 - m) * c, q - m * c < p ? E = a.x + E * (1 - m) - p : d > b && (E = b - a.x + E * m, z = -1), E = Math.min(n, E), E < n && "center" === l.labelAlign && (a.x += z * (n - E - m * (n - Math.min(c, E)))), c > E || l.autoRotation && (C.styles || {}).width)e = E; + e && (x.width = + e, (l.options.labels.style || {}).textOverflow || (x.textOverflow = "ellipsis"), C.css(x)) + }, getPosition: function (a, f, g, d) { + var b = this.axis, p = b.chart, l = d && p.oldChartHeight || p.chartHeight; + return { + x: a ? b.translate(f + g, null, null, d) + b.transB : b.left + b.offset + (b.opposite ? (d && p.oldChartWidth || p.chartWidth) - b.right - b.left : 0), + y: a ? l - b.bottom + b.offset - (b.opposite ? b.height : 0) : l - b.translate(f + g, null, null, d) - b.transB + } + }, getLabelPosition: function (a, g, q, d, b, p, C, t) { + var m = this.axis, c = m.transA, n = m.reversed, E = m.staggerLines, z = m.tickRotCorr || + {x: 0, y: 0}, e = b.y; + A(e) || (e = 0 === m.side ? q.rotation ? -8 : -q.getBBox().height : 2 === m.side ? z.y + 8 : Math.cos(q.rotation * f) * (z.y - q.getBBox(!1, 0).height / 2)); + a = a + b.x + z.x - (p && d ? p * c * (n ? -1 : 1) : 0); + g = g + e - (p && !d ? p * c * (n ? 1 : -1) : 0); + E && (q = C / (t || 1) % E, m.opposite && (q = E - q - 1), g += m.labelOffset / E * q); + return {x: a, y: Math.round(g)} + }, getMarkPath: function (a, f, g, d, b, p) { + return p.crispLine(["M", a, f, "L", a + (b ? 0 : -g), f + (b ? g : 0)], d) + }, render: function (a, f, q) { + var d = this.axis, b = d.options, p = d.chart.renderer, l = d.horiz, t = this.type, m = this.label, c = this.pos, + n = b.labels, E = this.gridLine, z = t ? t + "Tick" : "tick", e = d.tickSize(z), x = this.mark, F = !x, w = n.step, h = {}, y = !0, J = d.tickmarkOffset, K = this.getPosition(l, c, J, f), I = K.x, K = K.y, k = l && I === d.pos + d.len || !l && K === d.pos ? -1 : 1, D = t ? t + "Grid" : "grid", P = b[D + "LineWidth"], N = b[D + "LineColor"], r = b[D + "LineDashStyle"], D = g(b[z + "Width"], !t && d.isXAxis ? 1 : 0), z = b[z + "Color"]; + q = g(q, 1); + this.isActive = !0; + E || (h.stroke = N, h["stroke-width"] = P, r && (h.dashstyle = r), t || (h.zIndex = 1), f && (h.opacity = 0), this.gridLine = E = p.path().attr(h).addClass("highcharts-" + (t ? + t + "-" : "") + "grid-line").add(d.gridGroup)); + if (!f && E && (c = d.getPlotLinePath(c + J, E.strokeWidth() * k, f, !0)))E[this.isNew ? "attr" : "animate"]({ + d: c, + opacity: q + }); + e && (d.opposite && (e[0] = -e[0]), F && (this.mark = x = p.path().addClass("highcharts-" + (t ? t + "-" : "") + "tick").add(d.axisGroup), x.attr({ + stroke: z, + "stroke-width": D + })), x[F ? "attr" : "animate"]({ + d: this.getMarkPath(I, K, e[0], x.strokeWidth() * k, l, p), + opacity: q + })); + m && G(I) && (m.xy = K = this.getLabelPosition(I, K, m, l, n, J, a, w), this.isFirst && !this.isLast && !g(b.showFirstLabel, 1) || this.isLast && !this.isFirst && !g(b.showLastLabel, 1) ? y = !1 : !l || d.isRadial || n.step || n.rotation || f || 0 === q || this.handleOverflow(K), w && a % w && (y = !1), y && G(K.y) ? (K.opacity = q, m[this.isNew ? "attr" : "animate"](K)) : m.attr("y", -9999), this.isNew = !1) + }, destroy: function () { + H(this, this.axis) + } + } + })(L); + (function (a) { + var B = a.addEvent, A = a.animObject, H = a.arrayMax, G = a.arrayMin, r = a.AxisPlotLineOrBandExtension, g = a.color, f = a.correctFloat, u = a.defaultOptions, l = a.defined, q = a.deg2rad, d = a.destroyObjectProperties, b = a.each, p = a.extend, C = a.fireEvent, t = a.format, + m = a.getMagnitude, c = a.grep, n = a.inArray, E = a.isArray, z = a.isNumber, e = a.isString, x = a.merge, F = a.normalizeTickInterval, w = a.pick, h = a.PlotLineOrBand, y = a.removeEvent, J = a.splat, K = a.syncTimeout, I = a.Tick; + a.Axis = function () { + this.init.apply(this, arguments) + }; + a.Axis.prototype = { + defaultOptions: { + dateTimeLabelFormats: { + millisecond: "%H:%M:%S.%L", + second: "%H:%M:%S", + minute: "%H:%M", + hour: "%H:%M", + day: "%e. %b", + week: "%e. %b", + month: "%b '%y", + year: "%Y" + }, + endOnTick: !1, + labels: { + enabled: !0, style: {color: "#666666", cursor: "default", fontSize: "11px"}, + x: 0 + }, + minPadding: .01, + maxPadding: .01, + minorTickLength: 2, + minorTickPosition: "outside", + startOfWeek: 1, + startOnTick: !1, + tickLength: 10, + tickmarkPlacement: "between", + tickPixelInterval: 100, + tickPosition: "outside", + title: {align: "middle", style: {color: "#666666"}}, + type: "linear", + minorGridLineColor: "#f2f2f2", + minorGridLineWidth: 1, + minorTickColor: "#999999", + lineColor: "#ccd6eb", + lineWidth: 1, + gridLineColor: "#e6e6e6", + tickColor: "#ccd6eb" + }, + defaultYAxisOptions: { + endOnTick: !0, + tickPixelInterval: 72, + showLastLabel: !0, + labels: {x: -8}, + maxPadding: .05, + minPadding: .05, + startOnTick: !0, + title: {rotation: 270, text: "Values"}, + stackLabels: { + enabled: !1, formatter: function () { + return a.numberFormat(this.total, -1) + }, style: {fontSize: "11px", fontWeight: "bold", color: "#000000", textOutline: "1px contrast"} + }, + gridLineWidth: 1, + lineWidth: 0 + }, + defaultLeftAxisOptions: {labels: {x: -15}, title: {rotation: 270}}, + defaultRightAxisOptions: {labels: {x: 15}, title: {rotation: 90}}, + defaultBottomAxisOptions: {labels: {autoRotation: [-45], x: 0}, title: {rotation: 0}}, + defaultTopAxisOptions: { + labels: { + autoRotation: [-45], + x: 0 + }, title: {rotation: 0} + }, + init: function (a, b) { + var k = b.isX; + this.chart = a; + this.horiz = a.inverted ? !k : k; + this.isXAxis = k; + this.coll = this.coll || (k ? "xAxis" : "yAxis"); + this.opposite = b.opposite; + this.side = b.side || (this.horiz ? this.opposite ? 0 : 2 : this.opposite ? 1 : 3); + this.setOptions(b); + var c = this.options, e = c.type; + this.labelFormatter = c.labels.formatter || this.defaultLabelFormatter; + this.userOptions = b; + this.minPixelPadding = 0; + this.reversed = c.reversed; + this.visible = !1 !== c.visible; + this.zoomEnabled = !1 !== c.zoomEnabled; + this.hasNames = + "category" === e || !0 === c.categories; + this.categories = c.categories || this.hasNames; + this.names = this.names || []; + this.isLog = "logarithmic" === e; + this.isDatetimeAxis = "datetime" === e; + this.isLinked = l(c.linkedTo); + this.ticks = {}; + this.labelEdge = []; + this.minorTicks = {}; + this.plotLinesAndBands = []; + this.alternateBands = {}; + this.len = 0; + this.minRange = this.userMinRange = c.minRange || c.maxZoom; + this.range = c.range; + this.offset = c.offset || 0; + this.stacks = {}; + this.oldStacks = {}; + this.stacksTouched = 0; + this.min = this.max = null; + this.crosshair = w(c.crosshair, + J(a.options.tooltip.crosshairs)[k ? 0 : 1], !1); + var h; + b = this.options.events; + -1 === n(this, a.axes) && (k ? a.axes.splice(a.xAxis.length, 0, this) : a.axes.push(this), a[this.coll].push(this)); + this.series = this.series || []; + a.inverted && k && void 0 === this.reversed && (this.reversed = !0); + this.removePlotLine = this.removePlotBand = this.removePlotBandOrLine; + for (h in b)B(this, h, b[h]); + this.isLog && (this.val2lin = this.log2lin, this.lin2val = this.lin2log) + }, + setOptions: function (a) { + this.options = x(this.defaultOptions, "yAxis" === this.coll && this.defaultYAxisOptions, + [this.defaultTopAxisOptions, this.defaultRightAxisOptions, this.defaultBottomAxisOptions, this.defaultLeftAxisOptions][this.side], x(u[this.coll], a)) + }, + defaultLabelFormatter: function () { + var b = this.axis, c = this.value, e = b.categories, h = this.dateTimeLabelFormat, n = u.lang, d = n.numericSymbols, n = n.numericSymbolMagnitude || 1E3, v = d && d.length, m, f = b.options.labels.format, b = b.isLog ? c : b.tickInterval; + if (f)m = t(f, this); else if (e)m = c; else if (h)m = a.dateFormat(h, c); else if (v && 1E3 <= b)for (; v-- && void 0 === m;)e = Math.pow(n, v + 1), b >= + e && 0 === 10 * c % e && null !== d[v] && 0 !== c && (m = a.numberFormat(c / e, -1) + d[v]); + void 0 === m && (m = 1E4 <= Math.abs(c) ? a.numberFormat(c, -1) : a.numberFormat(c, -1, void 0, "")); + return m + }, + getSeriesExtremes: function () { + var a = this, e = a.chart; + a.hasVisibleSeries = !1; + a.dataMin = a.dataMax = a.threshold = null; + a.softThreshold = !a.isXAxis; + a.buildStacks && a.buildStacks(); + b(a.series, function (b) { + if (b.visible || !e.options.chart.ignoreHiddenSeries) { + var k = b.options, h = k.threshold, D; + a.hasVisibleSeries = !0; + a.isLog && 0 >= h && (h = null); + if (a.isXAxis)k = b.xData, + k.length && (b = G(k), z(b) || b instanceof Date || (k = c(k, function (a) { + return z(a) + }), b = G(k)), a.dataMin = Math.min(w(a.dataMin, k[0]), b), a.dataMax = Math.max(w(a.dataMax, k[0]), H(k))); else if (b.getExtremes(), D = b.dataMax, b = b.dataMin, l(b) && l(D) && (a.dataMin = Math.min(w(a.dataMin, b), b), a.dataMax = Math.max(w(a.dataMax, D), D)), l(h) && (a.threshold = h), !k.softThreshold || a.isLog)a.softThreshold = !1 + } + }) + }, + translate: function (a, b, c, e, h, n) { + var k = this.linkedParent || this, D = 1, m = 0, d = e ? k.oldTransA : k.transA; + e = e ? k.oldMin : k.min; + var f = k.minPixelPadding; + h = (k.isOrdinal || k.isBroken || k.isLog && h) && k.lin2val; + d || (d = k.transA); + c && (D *= -1, m = k.len); + k.reversed && (D *= -1, m -= D * (k.sector || k.len)); + b ? (a = (a * D + m - f) / d + e, h && (a = k.lin2val(a))) : (h && (a = k.val2lin(a)), a = D * (a - e) * d + m + D * f + (z(n) ? d * n : 0)); + return a + }, + toPixels: function (a, b) { + return this.translate(a, !1, !this.horiz, null, !0) + (b ? 0 : this.pos) + }, + toValue: function (a, b) { + return this.translate(a - (b ? 0 : this.pos), !0, !this.horiz, null, !0) + }, + getPlotLinePath: function (a, b, c, e, h) { + var k = this.chart, D = this.left, n = this.top, m, d, f = c && k.oldChartHeight || + k.chartHeight, p = c && k.oldChartWidth || k.chartWidth, y; + m = this.transB; + var t = function (a, b, k) { + if (a < b || a > k)e ? a = Math.min(Math.max(b, a), k) : y = !0; + return a + }; + h = w(h, this.translate(a, null, null, c)); + a = c = Math.round(h + m); + m = d = Math.round(f - h - m); + z(h) ? this.horiz ? (m = n, d = f - this.bottom, a = c = t(a, D, D + this.width)) : (a = D, c = p - this.right, m = d = t(m, n, n + this.height)) : y = !0; + return y && !e ? null : k.renderer.crispLine(["M", a, m, "L", c, d], b || 1) + }, + getLinearTickPositions: function (a, b, c) { + var k, e = f(Math.floor(b / a) * a), h = f(Math.ceil(c / a) * a), D = []; + if (b === + c && z(b))return [b]; + for (b = e; b <= h;) { + D.push(b); + b = f(b + a); + if (b === k)break; + k = b + } + return D + }, + getMinorTickPositions: function () { + var a = this.options, b = this.tickPositions, c = this.minorTickInterval, e = [], h, n = this.pointRangePadding || 0; + h = this.min - n; + var n = this.max + n, m = n - h; + if (m && m / c < this.len / 3)if (this.isLog)for (n = b.length, h = 1; h < n; h++)e = e.concat(this.getLogTickPositions(c, b[h - 1], b[h], !0)); else if (this.isDatetimeAxis && "auto" === a.minorTickInterval)e = e.concat(this.getTimeTicks(this.normalizeTimeTickInterval(c), h, n, a.startOfWeek)); + else for (b = h + (b[0] - h) % c; b <= n && b !== e[0]; b += c)e.push(b); + 0 !== e.length && this.trimTicks(e, a.startOnTick, a.endOnTick); + return e + }, + adjustForMinRange: function () { + var a = this.options, c = this.min, e = this.max, h, n = this.dataMax - this.dataMin >= this.minRange, m, v, d, f, p, y; + this.isXAxis && void 0 === this.minRange && !this.isLog && (l(a.min) || l(a.max) ? this.minRange = null : (b(this.series, function (a) { + f = a.xData; + for (v = p = a.xIncrement ? 1 : f.length - 1; 0 < v; v--)if (d = f[v] - f[v - 1], void 0 === m || d < m)m = d + }), this.minRange = Math.min(5 * m, this.dataMax - this.dataMin))); + e - c < this.minRange && (y = this.minRange, h = (y - e + c) / 2, h = [c - h, w(a.min, c - h)], n && (h[2] = this.isLog ? this.log2lin(this.dataMin) : this.dataMin), c = H(h), e = [c + y, w(a.max, c + y)], n && (e[2] = this.isLog ? this.log2lin(this.dataMax) : this.dataMax), e = G(e), e - c < y && (h[0] = e - y, h[1] = w(a.min, e - y), c = H(h))); + this.min = c; + this.max = e + }, + getClosest: function () { + var a; + this.categories ? a = 1 : b(this.series, function (b) { + var k = b.closestPointRange, c = b.visible || !b.chart.options.chart.ignoreHiddenSeries; + !b.noSharedTooltip && l(k) && c && (a = l(a) ? Math.min(a, k) : k) + }); + return a + }, + nameToX: function (a) { + var b = E(this.categories), k = b ? this.categories : this.names, c = a.options.x, e; + a.series.requireSorting = !1; + l(c) || (c = !1 === this.options.uniqueNames ? a.series.autoIncrement() : n(a.name, k)); + -1 === c ? b || (e = k.length) : e = c; + this.names[e] = a.name; + return e + }, + updateNames: function () { + var a = this; + 0 < this.names.length && (this.names.length = 0, this.minRange = void 0, b(this.series || [], function (k) { + k.xIncrement = null; + if (!k.points || k.isDirtyData)k.processData(), k.generatePoints(); + b(k.points, function (b, c) { + var e; + b.options && (e = a.nameToX(b), e !== b.x && (b.x = e, k.xData[c] = e)) + }) + })) + }, + setAxisTranslation: function (a) { + var k = this, c = k.max - k.min, h = k.axisPointRange || 0, n, m = 0, d = 0, f = k.linkedParent, y = !!k.categories, p = k.transA, t = k.isXAxis; + if (t || y || h)n = k.getClosest(), f ? (m = f.minPointOffset, d = f.pointRangePadding) : b(k.series, function (a) { + var b = y ? 1 : t ? w(a.options.pointRange, n, 0) : k.axisPointRange || 0; + a = a.options.pointPlacement; + h = Math.max(h, b); + k.single || (m = Math.max(m, e(a) ? 0 : b / 2), d = Math.max(d, "on" === a ? 0 : b)) + }), f = k.ordinalSlope && n ? k.ordinalSlope / + n : 1, k.minPointOffset = m *= f, k.pointRangePadding = d *= f, k.pointRange = Math.min(h, c), t && (k.closestPointRange = n); + a && (k.oldTransA = p); + k.translationSlope = k.transA = p = k.len / (c + d || 1); + k.transB = k.horiz ? k.left : k.bottom; + k.minPixelPadding = p * m + }, + minFromRange: function () { + return this.max - this.range + }, + setTickInterval: function (k) { + var c = this, e = c.chart, h = c.options, n = c.isLog, d = c.log2lin, v = c.isDatetimeAxis, y = c.isXAxis, p = c.isLinked, t = h.maxPadding, x = h.minPadding, g = h.tickInterval, E = h.tickPixelInterval, q = c.categories, J = c.threshold, + K = c.softThreshold, I, r, u, A; + v || q || p || this.getTickAmount(); + u = w(c.userMin, h.min); + A = w(c.userMax, h.max); + p ? (c.linkedParent = e[c.coll][h.linkedTo], e = c.linkedParent.getExtremes(), c.min = w(e.min, e.dataMin), c.max = w(e.max, e.dataMax), h.type !== c.linkedParent.options.type && a.error(11, 1)) : (!K && l(J) && (c.dataMin >= J ? (I = J, x = 0) : c.dataMax <= J && (r = J, t = 0)), c.min = w(u, I, c.dataMin), c.max = w(A, r, c.dataMax)); + n && (!k && 0 >= Math.min(c.min, w(c.dataMin, c.min)) && a.error(10, 1), c.min = f(d(c.min), 15), c.max = f(d(c.max), 15)); + c.range && l(c.max) && + (c.userMin = c.min = u = Math.max(c.min, c.minFromRange()), c.userMax = A = c.max, c.range = null); + C(c, "foundExtremes"); + c.beforePadding && c.beforePadding(); + c.adjustForMinRange(); + !(q || c.axisPointRange || c.usePercentage || p) && l(c.min) && l(c.max) && (d = c.max - c.min) && (!l(u) && x && (c.min -= d * x), !l(A) && t && (c.max += d * t)); + z(h.floor) ? c.min = Math.max(c.min, h.floor) : z(h.softMin) && (c.min = Math.min(c.min, h.softMin)); + z(h.ceiling) ? c.max = Math.min(c.max, h.ceiling) : z(h.softMax) && (c.max = Math.max(c.max, h.softMax)); + K && l(c.dataMin) && (J = J || 0, !l(u) && + c.min < J && c.dataMin >= J ? c.min = J : !l(A) && c.max > J && c.dataMax <= J && (c.max = J)); + c.tickInterval = c.min === c.max || void 0 === c.min || void 0 === c.max ? 1 : p && !g && E === c.linkedParent.options.tickPixelInterval ? g = c.linkedParent.tickInterval : w(g, this.tickAmount ? (c.max - c.min) / Math.max(this.tickAmount - 1, 1) : void 0, q ? 1 : (c.max - c.min) * E / Math.max(c.len, E)); + y && !k && b(c.series, function (a) { + a.processData(c.min !== c.oldMin || c.max !== c.oldMax) + }); + c.setAxisTranslation(!0); + c.beforeSetTickPositions && c.beforeSetTickPositions(); + c.postProcessTickInterval && + (c.tickInterval = c.postProcessTickInterval(c.tickInterval)); + c.pointRange && !g && (c.tickInterval = Math.max(c.pointRange, c.tickInterval)); + k = w(h.minTickInterval, c.isDatetimeAxis && c.closestPointRange); + !g && c.tickInterval < k && (c.tickInterval = k); + v || n || g || (c.tickInterval = F(c.tickInterval, null, m(c.tickInterval), w(h.allowDecimals, !(.5 < c.tickInterval && 5 > c.tickInterval && 1E3 < c.max && 9999 > c.max)), !!this.tickAmount)); + this.tickAmount || (c.tickInterval = c.unsquish()); + this.setTickPositions() + }, + setTickPositions: function () { + var a = + this.options, b, c = a.tickPositions, e = a.tickPositioner, h = a.startOnTick, n = a.endOnTick, m; + this.tickmarkOffset = this.categories && "between" === a.tickmarkPlacement && 1 === this.tickInterval ? .5 : 0; + this.minorTickInterval = "auto" === a.minorTickInterval && this.tickInterval ? this.tickInterval / 5 : a.minorTickInterval; + this.tickPositions = b = c && c.slice(); + !b && (b = this.isDatetimeAxis ? this.getTimeTicks(this.normalizeTimeTickInterval(this.tickInterval, a.units), this.min, this.max, a.startOfWeek, this.ordinalPositions, this.closestPointRange, + !0) : this.isLog ? this.getLogTickPositions(this.tickInterval, this.min, this.max) : this.getLinearTickPositions(this.tickInterval, this.min, this.max), b.length > this.len && (b = [b[0], b.pop()]), this.tickPositions = b, e && (e = e.apply(this, [this.min, this.max]))) && (this.tickPositions = b = e); + this.trimTicks(b, h, n); + this.isLinked || (this.min === this.max && l(this.min) && !this.tickAmount && (m = !0, this.min -= .5, this.max += .5), this.single = m, c || e || this.adjustTickAmount()) + }, + trimTicks: function (a, b, c) { + var k = a[0], e = a[a.length - 1], h = this.minPointOffset || + 0; + if (!this.isLinked) { + if (b)this.min = k; else for (; this.min - h > a[0];)a.shift(); + if (c)this.max = e; else for (; this.max + h < a[a.length - 1];)a.pop(); + 0 === a.length && l(k) && a.push((e + k) / 2) + } + }, + alignToOthers: function () { + var a = {}, c, e = this.options; + !1 === this.chart.options.chart.alignTicks || !1 === e.alignTicks || this.isLog || b(this.chart[this.coll], function (b) { + var k = b.options, k = [b.horiz ? k.left : k.top, k.width, k.height, k.pane].join(); + b.series.length && (a[k] ? c = !0 : a[k] = 1) + }); + return c + }, + getTickAmount: function () { + var a = this.options, b = a.tickAmount, + c = a.tickPixelInterval; + !l(a.tickInterval) && this.len < c && !this.isRadial && !this.isLog && a.startOnTick && a.endOnTick && (b = 2); + !b && this.alignToOthers() && (b = Math.ceil(this.len / c) + 1); + 4 > b && (this.finalTickAmt = b, b = 5); + this.tickAmount = b + }, + adjustTickAmount: function () { + var a = this.tickInterval, b = this.tickPositions, c = this.tickAmount, e = this.finalTickAmt, h = b && b.length; + if (h < c) { + for (; b.length < c;)b.push(f(b[b.length - 1] + a)); + this.transA *= (h - 1) / (c - 1); + this.max = b[b.length - 1] + } else h > c && (this.tickInterval *= 2, this.setTickPositions()); + if (l(e)) { + for (a = c = b.length; a--;)(3 === e && 1 === a % 2 || 2 >= e && 0 < a && a < c - 1) && b.splice(a, 1); + this.finalTickAmt = void 0 + } + }, + setScale: function () { + var a, c; + this.oldMin = this.min; + this.oldMax = this.max; + this.oldAxisLength = this.len; + this.setAxisSize(); + c = this.len !== this.oldAxisLength; + b(this.series, function (b) { + if (b.isDirtyData || b.isDirty || b.xAxis.isDirty)a = !0 + }); + c || a || this.isLinked || this.forceRedraw || this.userMin !== this.oldUserMin || this.userMax !== this.oldUserMax || this.alignToOthers() ? (this.resetStacks && this.resetStacks(), this.forceRedraw = !1, this.getSeriesExtremes(), this.setTickInterval(), this.oldUserMin = this.userMin, this.oldUserMax = this.userMax, this.isDirty || (this.isDirty = c || this.min !== this.oldMin || this.max !== this.oldMax)) : this.cleanStacks && this.cleanStacks() + }, + setExtremes: function (a, c, e, h, n) { + var k = this, m = k.chart; + e = w(e, !0); + b(k.series, function (a) { + delete a.kdTree + }); + n = p(n, {min: a, max: c}); + C(k, "setExtremes", n, function () { + k.userMin = a; + k.userMax = c; + k.eventArgs = n; + e && m.redraw(h) + }) + }, + zoom: function (a, b) { + var c = this.dataMin, k = this.dataMax, e = this.options, + h = Math.min(c, w(e.min, c)), e = Math.max(k, w(e.max, k)); + if (a !== this.min || b !== this.max)this.allowZoomOutside || (l(c) && (a < h && (a = h), a > e && (a = e)), l(k) && (b < h && (b = h), b > e && (b = e))), this.displayBtn = void 0 !== a || void 0 !== b, this.setExtremes(a, b, !1, void 0, {trigger: "zoom"}); + return !0 + }, + setAxisSize: function () { + var a = this.chart, b = this.options, c = b.offsets || [0, 0, 0, 0], e = this.horiz, h = w(b.width, a.plotWidth - c[3] + c[1]), n = w(b.height, a.plotHeight - c[0] + c[2]), m = w(b.top, a.plotTop + c[0]), b = w(b.left, a.plotLeft + c[3]), c = /%$/; + c.test(n) && (n = + Math.round(parseFloat(n) / 100 * a.plotHeight)); + c.test(m) && (m = Math.round(parseFloat(m) / 100 * a.plotHeight + a.plotTop)); + this.left = b; + this.top = m; + this.width = h; + this.height = n; + this.bottom = a.chartHeight - n - m; + this.right = a.chartWidth - h - b; + this.len = Math.max(e ? h : n, 0); + this.pos = e ? b : m + }, + getExtremes: function () { + var a = this.isLog, b = this.lin2log; + return { + min: a ? f(b(this.min)) : this.min, + max: a ? f(b(this.max)) : this.max, + dataMin: this.dataMin, + dataMax: this.dataMax, + userMin: this.userMin, + userMax: this.userMax + } + }, + getThreshold: function (a) { + var b = + this.isLog, c = this.lin2log, k = b ? c(this.min) : this.min, b = b ? c(this.max) : this.max; + null === a ? a = k : k > a ? a = k : b < a && (a = b); + return this.translate(a, 0, 1, 0, 1) + }, + autoLabelAlign: function (a) { + a = (w(a, 0) - 90 * this.side + 720) % 360; + return 15 < a && 165 > a ? "right" : 195 < a && 345 > a ? "left" : "center" + }, + tickSize: function (a) { + var b = this.options, c = b[a + "Length"], k = w(b[a + "Width"], "tick" === a && this.isXAxis ? 1 : 0); + if (k && c)return "inside" === b[a + "Position"] && (c = -c), [c, k] + }, + labelMetrics: function () { + return this.chart.renderer.fontMetrics(this.options.labels.style && + this.options.labels.style.fontSize, this.ticks[0] && this.ticks[0].label) + }, + unsquish: function () { + var a = this.options.labels, c = this.horiz, e = this.tickInterval, h = e, n = this.len / (((this.categories ? 1 : 0) + this.max - this.min) / e), m, d = a.rotation, f = this.labelMetrics(), p, y = Number.MAX_VALUE, t, x = function (a) { + a /= n || 1; + a = 1 < a ? Math.ceil(a) : 1; + return a * e + }; + c ? (t = !a.staggerLines && !a.step && (l(d) ? [d] : n < w(a.autoRotationLimit, 80) && a.autoRotation)) && b(t, function (a) { + var b; + if (a === d || a && -90 <= a && 90 >= a)p = x(Math.abs(f.h / Math.sin(q * a))), b = p + + Math.abs(a / 360), b < y && (y = b, m = a, h = p) + }) : a.step || (h = x(f.h)); + this.autoRotation = t; + this.labelRotation = w(m, d); + return h + }, + getSlotWidth: function () { + var a = this.chart, b = this.horiz, c = this.options.labels, e = Math.max(this.tickPositions.length - (this.categories ? 0 : 1), 1), h = a.margin[3]; + return b && 2 > (c.step || 0) && !c.rotation && (this.staggerLines || 1) * this.len / e || !b && (h && h - a.spacing[3] || .33 * a.chartWidth) + }, + renderUnsquish: function () { + var a = this.chart, c = a.renderer, h = this.tickPositions, n = this.ticks, m = this.options.labels, d = this.horiz, + v = this.getSlotWidth(), f = Math.max(1, Math.round(v - 2 * (m.padding || 5))), p = {}, y = this.labelMetrics(), t = m.style && m.style.textOverflow, g, z = 0, E, w; + e(m.rotation) || (p.rotation = m.rotation || 0); + b(h, function (a) { + (a = n[a]) && a.labelLength > z && (z = a.labelLength) + }); + this.maxLabelLength = z; + if (this.autoRotation)z > f && z > y.h ? p.rotation = this.labelRotation : this.labelRotation = 0; else if (v && (g = {width: f + "px"}, !t))for (g.textOverflow = "clip", E = h.length; !d && E--;)if (w = h[E], f = n[w].label)f.styles && "ellipsis" === f.styles.textOverflow ? f.css({textOverflow: "clip"}) : + n[w].labelLength > v && f.css({width: v + "px"}), f.getBBox().height > this.len / h.length - (y.h - y.f) && (f.specCss = {textOverflow: "ellipsis"}); + p.rotation && (g = {width: (z > .5 * a.chartHeight ? .33 * a.chartHeight : a.chartHeight) + "px"}, t || (g.textOverflow = "ellipsis")); + if (this.labelAlign = m.align || this.autoLabelAlign(this.labelRotation))p.align = this.labelAlign; + b(h, function (a) { + var b = (a = n[a]) && a.label; + b && (b.attr(p), g && b.css(x(g, b.specCss)), delete b.specCss, a.rotation = p.rotation) + }); + this.tickRotCorr = c.rotCorr(y.b, this.labelRotation || + 0, 0 !== this.side) + }, + hasData: function () { + return this.hasVisibleSeries || l(this.min) && l(this.max) && !!this.tickPositions + }, + addTitle: function (a) { + var b = this.chart.renderer, c = this.horiz, k = this.opposite, e = this.options.title, h; + this.axisTitle || ((h = e.textAlign) || (h = (c ? { + low: "left", + middle: "center", + high: "right" + } : { + low: k ? "right" : "left", + middle: "center", + high: k ? "left" : "right" + })[e.align]), this.axisTitle = b.text(e.text, 0, 0, e.useHTML).attr({ + zIndex: 7, + rotation: e.rotation || 0, + align: h + }).addClass("highcharts-axis-title").css(e.style).add(this.axisGroup), + this.axisTitle.isNew = !0); + this.axisTitle[a ? "show" : "hide"](!0) + }, + generateTick: function (a) { + var b = this.ticks; + b[a] ? b[a].addLabel() : b[a] = new I(this, a) + }, + getOffset: function () { + var a = this, c = a.chart, e = c.renderer, h = a.options, n = a.tickPositions, m = a.ticks, d = a.horiz, f = a.side, p = c.inverted ? [1, 0, 3, 2][f] : f, y, t, x = 0, g, z = 0, E = h.title, q = h.labels, F = 0, J = c.axisOffset, c = c.clipOffset, K = [-1, 1, 1, -1][f], C, I = h.className, r = a.axisParent, u = this.tickSize("tick"); + y = a.hasData(); + a.showAxis = t = y || w(h.showEmpty, !0); + a.staggerLines = a.horiz && q.staggerLines; + a.axisGroup || (a.gridGroup = e.g("grid").attr({zIndex: h.gridZIndex || 1}).addClass("highcharts-" + this.coll.toLowerCase() + "-grid " + (I || "")).add(r), a.axisGroup = e.g("axis").attr({zIndex: h.zIndex || 2}).addClass("highcharts-" + this.coll.toLowerCase() + " " + (I || "")).add(r), a.labelGroup = e.g("axis-labels").attr({zIndex: q.zIndex || 7}).addClass("highcharts-" + a.coll.toLowerCase() + "-labels " + (I || "")).add(r)); + if (y || a.isLinked)b(n, function (b, c) { + a.generateTick(b, c) + }), a.renderUnsquish(), !1 === q.reserveSpace || 0 !== f && 2 !== f && + {1: "left", 3: "right"}[f] !== a.labelAlign && "center" !== a.labelAlign || b(n, function (a) { + F = Math.max(m[a].getLabelSize(), F) + }), a.staggerLines && (F *= a.staggerLines, a.labelOffset = F * (a.opposite ? -1 : 1)); else for (C in m)m[C].destroy(), delete m[C]; + E && E.text && !1 !== E.enabled && (a.addTitle(t), t && (x = a.axisTitle.getBBox()[d ? "height" : "width"], g = E.offset, z = l(g) ? 0 : w(E.margin, d ? 5 : 10))); + a.renderLine(); + a.offset = K * w(h.offset, J[f]); + a.tickRotCorr = a.tickRotCorr || {x: 0, y: 0}; + e = 0 === f ? -a.labelMetrics().h : 2 === f ? a.tickRotCorr.y : 0; + z = Math.abs(F) + + z; + F && (z = z - e + K * (d ? w(q.y, a.tickRotCorr.y + 8 * K) : q.x)); + a.axisTitleMargin = w(g, z); + J[f] = Math.max(J[f], a.axisTitleMargin + x + K * a.offset, z, y && n.length && u ? u[0] : 0); + h = h.offset ? 0 : 2 * Math.floor(a.axisLine.strokeWidth() / 2); + c[p] = Math.max(c[p], h) + }, + getLinePath: function (a) { + var b = this.chart, c = this.opposite, k = this.offset, e = this.horiz, h = this.left + (c ? this.width : 0) + k, k = b.chartHeight - this.bottom - (c ? this.height : 0) + k; + c && (a *= -1); + return b.renderer.crispLine(["M", e ? this.left : h, e ? k : this.top, "L", e ? b.chartWidth - this.right : h, e ? k : b.chartHeight - + this.bottom], a) + }, + renderLine: function () { + this.axisLine || (this.axisLine = this.chart.renderer.path().addClass("highcharts-axis-line").add(this.axisGroup), this.axisLine.attr({ + stroke: this.options.lineColor, + "stroke-width": this.options.lineWidth, + zIndex: 7 + })) + }, + getTitlePosition: function () { + var a = this.horiz, b = this.left, c = this.top, e = this.len, h = this.options.title, n = a ? b : c, m = this.opposite, d = this.offset, f = h.x || 0, p = h.y || 0, y = this.chart.renderer.fontMetrics(h.style && h.style.fontSize, this.axisTitle).f, e = { + low: n + (a ? 0 : e), + middle: n + e / 2, high: n + (a ? e : 0) + }[h.align], b = (a ? c + this.height : b) + (a ? 1 : -1) * (m ? -1 : 1) * this.axisTitleMargin + (2 === this.side ? y : 0); + return { + x: a ? e + f : b + (m ? this.width : 0) + d + f, + y: a ? b + p - (m ? this.height : 0) + d : e + p + } + }, + renderMinorTick: function (a) { + var b = this.chart.hasRendered && z(this.oldMin), c = this.minorTicks; + c[a] || (c[a] = new I(this, a, "minor")); + b && c[a].isNew && c[a].render(null, !0); + c[a].render(null, !1, 1) + }, + renderTick: function (a, b) { + var c = this.isLinked, e = this.ticks, k = this.chart.hasRendered && z(this.oldMin); + if (!c || a >= this.min && a <= this.max)e[a] || + (e[a] = new I(this, a)), k && e[a].isNew && e[a].render(b, !0, .1), e[a].render(b) + }, + render: function () { + var a = this, c = a.chart, e = a.options, n = a.isLog, m = a.lin2log, d = a.isLinked, v = a.tickPositions, f = a.axisTitle, p = a.ticks, y = a.minorTicks, t = a.alternateBands, x = e.stackLabels, z = e.alternateGridColor, g = a.tickmarkOffset, E = a.axisLine, w = a.showAxis, l = A(c.renderer.globalAnimation), q, F; + a.labelEdge.length = 0; + a.overlap = !1; + b([p, y, t], function (a) { + for (var b in a)a[b].isActive = !1 + }); + if (a.hasData() || d)a.minorTickInterval && !a.categories && b(a.getMinorTickPositions(), + function (b) { + a.renderMinorTick(b) + }), v.length && (b(v, function (b, c) { + a.renderTick(b, c) + }), g && (0 === a.min || a.single) && (p[-1] || (p[-1] = new I(a, -1, null, !0)), p[-1].render(-1))), z && b(v, function (b, e) { + F = void 0 !== v[e + 1] ? v[e + 1] + g : a.max - g; + 0 === e % 2 && b < a.max && F <= a.max + (c.polar ? -g : g) && (t[b] || (t[b] = new h(a)), q = b + g, t[b].options = { + from: n ? m(q) : q, + to: n ? m(F) : F, + color: z + }, t[b].render(), t[b].isActive = !0) + }), a._addedPlotLB || (b((e.plotLines || []).concat(e.plotBands || []), function (b) { + a.addPlotBandOrLine(b) + }), a._addedPlotLB = !0); + b([p, y, t], + function (a) { + var b, e, h = [], k = l.duration; + for (b in a)a[b].isActive || (a[b].render(b, !1, 0), a[b].isActive = !1, h.push(b)); + K(function () { + for (e = h.length; e--;)a[h[e]] && !a[h[e]].isActive && (a[h[e]].destroy(), delete a[h[e]]) + }, a !== t && c.hasRendered && k ? k : 0) + }); + E && (E[E.isPlaced ? "animate" : "attr"]({d: this.getLinePath(E.strokeWidth())}), E.isPlaced = !0, E[w ? "show" : "hide"](!0)); + f && w && (f[f.isNew ? "attr" : "animate"](a.getTitlePosition()), f.isNew = !1); + x && x.enabled && a.renderStackTotals(); + a.isDirty = !1 + }, + redraw: function () { + this.visible && + (this.render(), b(this.plotLinesAndBands, function (a) { + a.render() + })); + b(this.series, function (a) { + a.isDirty = !0 + }) + }, + keepProps: "extKey hcEvents names series userMax userMin".split(" "), + destroy: function (a) { + var c = this, e = c.stacks, h, k = c.plotLinesAndBands, m; + a || y(c); + for (h in e)d(e[h]), e[h] = null; + b([c.ticks, c.minorTicks, c.alternateBands], function (a) { + d(a) + }); + if (k)for (a = k.length; a--;)k[a].destroy(); + b("stackTotalGroup axisLine axisTitle axisGroup gridGroup labelGroup cross".split(" "), function (a) { + c[a] && (c[a] = c[a].destroy()) + }); + for (m in c)c.hasOwnProperty(m) && -1 === n(m, c.keepProps) && delete c[m] + }, + drawCrosshair: function (a, b) { + var c, e = this.crosshair, h = w(e.snap, !0), k, n = this.cross; + a || (a = this.cross && this.cross.e); + this.crosshair && !1 !== (l(b) || !h) ? (h ? l(b) && (k = this.isXAxis ? b.plotX : this.len - b.plotY) : k = a && (this.horiz ? a.chartX - this.pos : this.len - a.chartY + this.pos), l(k) && (c = this.getPlotLinePath(b && (this.isXAxis ? b.x : w(b.stackY, b.y)), null, null, null, k) || null), l(c) ? (b = this.categories && !this.isRadial, n || (this.cross = n = this.chart.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-" + + (b ? "category " : "thin ") + e.className).attr({zIndex: w(e.zIndex, 2)}).add(), n.attr({ + stroke: e.color || (b ? g("#ccd6eb").setOpacity(.25).get() : "#cccccc"), + "stroke-width": w(e.width, 1) + }), e.dashStyle && n.attr({dashstyle: e.dashStyle})), n.show().attr({d: c}), b && !e.width && n.attr({"stroke-width": this.transA}), this.cross.e = a) : this.hideCrosshair()) : this.hideCrosshair() + }, + hideCrosshair: function () { + this.cross && this.cross.hide() + } + }; + p(a.Axis.prototype, r) + })(L); + (function (a) { + var B = a.Axis, A = a.Date, H = a.dateFormat, G = a.defaultOptions, + r = a.defined, g = a.each, f = a.extend, u = a.getMagnitude, l = a.getTZOffset, q = a.normalizeTickInterval, d = a.pick, b = a.timeUnits; + B.prototype.getTimeTicks = function (a, q, t, m) { + var c = [], n = {}, p = G.global.useUTC, z, e = new A(q - l(q)), x = A.hcMakeTime, F = a.unitRange, w = a.count, h; + if (r(q)) { + e[A.hcSetMilliseconds](F >= b.second ? 0 : w * Math.floor(e.getMilliseconds() / w)); + if (F >= b.second)e[A.hcSetSeconds](F >= b.minute ? 0 : w * Math.floor(e.getSeconds() / w)); + if (F >= b.minute)e[A.hcSetMinutes](F >= b.hour ? 0 : w * Math.floor(e[A.hcGetMinutes]() / w)); + if (F >= b.hour)e[A.hcSetHours](F >= + b.day ? 0 : w * Math.floor(e[A.hcGetHours]() / w)); + if (F >= b.day)e[A.hcSetDate](F >= b.month ? 1 : w * Math.floor(e[A.hcGetDate]() / w)); + F >= b.month && (e[A.hcSetMonth](F >= b.year ? 0 : w * Math.floor(e[A.hcGetMonth]() / w)), z = e[A.hcGetFullYear]()); + if (F >= b.year)e[A.hcSetFullYear](z - z % w); + if (F === b.week)e[A.hcSetDate](e[A.hcGetDate]() - e[A.hcGetDay]() + d(m, 1)); + z = e[A.hcGetFullYear](); + m = e[A.hcGetMonth](); + var y = e[A.hcGetDate](), J = e[A.hcGetHours](); + if (A.hcTimezoneOffset || A.hcGetTimezoneOffset)h = (!p || !!A.hcGetTimezoneOffset) && (t - q > 4 * b.month || + l(q) !== l(t)), e = e.getTime(), e = new A(e + l(e)); + p = e.getTime(); + for (q = 1; p < t;)c.push(p), p = F === b.year ? x(z + q * w, 0) : F === b.month ? x(z, m + q * w) : !h || F !== b.day && F !== b.week ? h && F === b.hour ? x(z, m, y, J + q * w) : p + F * w : x(z, m, y + q * w * (F === b.day ? 1 : 7)), q++; + c.push(p); + F <= b.hour && 1E4 > c.length && g(c, function (a) { + 0 === a % 18E5 && "000000000" === H("%H%M%S%L", a) && (n[a] = "day") + }) + } + c.info = f(a, {higherRanks: n, totalRange: F * w}); + return c + }; + B.prototype.normalizeTimeTickInterval = function (a, d) { + var f = d || [["millisecond", [1, 2, 5, 10, 20, 25, 50, 100, 200, 500]], ["second", + [1, 2, 5, 10, 15, 30]], ["minute", [1, 2, 5, 10, 15, 30]], ["hour", [1, 2, 3, 4, 6, 8, 12]], ["day", [1, 2]], ["week", [1, 2]], ["month", [1, 2, 3, 4, 6]], ["year", null]]; + d = f[f.length - 1]; + var m = b[d[0]], c = d[1], n; + for (n = 0; n < f.length && !(d = f[n], m = b[d[0]], c = d[1], f[n + 1] && a <= (m * c[c.length - 1] + b[f[n + 1][0]]) / 2); n++); + m === b.year && a < 5 * m && (c = [1, 2, 5]); + a = q(a / m, c, "year" === d[0] ? Math.max(u(a / m), 1) : 1); + return {unitRange: m, count: a, unitName: d[0]} + } + })(L); + (function (a) { + var B = a.Axis, A = a.getMagnitude, H = a.map, G = a.normalizeTickInterval, r = a.pick; + B.prototype.getLogTickPositions = + function (a, f, u, l) { + var g = this.options, d = this.len, b = this.lin2log, p = this.log2lin, C = []; + l || (this._minorAutoInterval = null); + if (.5 <= a)a = Math.round(a), C = this.getLinearTickPositions(a, f, u); else if (.08 <= a)for (var d = Math.floor(f), t, m, c, n, E, g = .3 < a ? [1, 2, 4] : .15 < a ? [1, 2, 4, 6, 8] : [1, 2, 3, 4, 5, 6, 7, 8, 9]; d < u + 1 && !E; d++)for (m = g.length, t = 0; t < m && !E; t++)c = p(b(d) * g[t]), c > f && (!l || n <= u) && void 0 !== n && C.push(n), n > u && (E = !0), n = c; else f = b(f), u = b(u), a = g[l ? "minorTickInterval" : "tickInterval"], a = r("auto" === a ? null : a, this._minorAutoInterval, + g.tickPixelInterval / (l ? 5 : 1) * (u - f) / ((l ? d / this.tickPositions.length : d) || 1)), a = G(a, null, A(a)), C = H(this.getLinearTickPositions(a, f, u), p), l || (this._minorAutoInterval = a / 5); + l || (this.tickInterval = a); + return C + }; + B.prototype.log2lin = function (a) { + return Math.log(a) / Math.LN10 + }; + B.prototype.lin2log = function (a) { + return Math.pow(10, a) + } + })(L); + (function (a) { + var B = a.dateFormat, A = a.each, H = a.extend, G = a.format, r = a.isNumber, g = a.map, f = a.merge, u = a.pick, l = a.splat, q = a.syncTimeout, d = a.timeUnits; + a.Tooltip = function () { + this.init.apply(this, + arguments) + }; + a.Tooltip.prototype = { + init: function (a, d) { + this.chart = a; + this.options = d; + this.crosshairs = []; + this.now = {x: 0, y: 0}; + this.isHidden = !0; + this.split = d.split && !a.inverted; + this.shared = d.shared || this.split + }, cleanSplit: function (a) { + A(this.chart.series, function (b) { + var d = b && b.tt; + d && (!d.isActive || a ? b.tt = d.destroy() : d.isActive = !1) + }) + }, getLabel: function () { + var a = this.chart.renderer, d = this.options; + this.label || (this.split ? this.label = a.g("tooltip") : (this.label = a.label("", 0, 0, d.shape || "callout", null, null, d.useHTML, + null, "tooltip").attr({ + padding: d.padding, + r: d.borderRadius + }), this.label.attr({ + fill: d.backgroundColor, + "stroke-width": d.borderWidth + }).css(d.style).shadow(d.shadow)), this.label.attr({zIndex: 8}).add()); + return this.label + }, update: function (a) { + this.destroy(); + this.init(this.chart, f(!0, this.options, a)) + }, destroy: function () { + this.label && (this.label = this.label.destroy()); + this.split && this.tt && (this.cleanSplit(this.chart, !0), this.tt = this.tt.destroy()); + clearTimeout(this.hideTimer); + clearTimeout(this.tooltipTimeout) + }, + move: function (a, d, f, t) { + var b = this, c = b.now, n = !1 !== b.options.animation && !b.isHidden && (1 < Math.abs(a - c.x) || 1 < Math.abs(d - c.y)), p = b.followPointer || 1 < b.len; + H(c, { + x: n ? (2 * c.x + a) / 3 : a, + y: n ? (c.y + d) / 2 : d, + anchorX: p ? void 0 : n ? (2 * c.anchorX + f) / 3 : f, + anchorY: p ? void 0 : n ? (c.anchorY + t) / 2 : t + }); + b.getLabel().attr(c); + n && (clearTimeout(this.tooltipTimeout), this.tooltipTimeout = setTimeout(function () { + b && b.move(a, d, f, t) + }, 32)) + }, hide: function (a) { + var b = this; + clearTimeout(this.hideTimer); + a = u(a, this.options.hideDelay, 500); + this.isHidden || (this.hideTimer = + q(function () { + b.getLabel()[a ? "fadeOut" : "hide"](); + b.isHidden = !0 + }, a)) + }, getAnchor: function (a, d) { + var b, f = this.chart, m = f.inverted, c = f.plotTop, n = f.plotLeft, p = 0, z = 0, e, x; + a = l(a); + b = a[0].tooltipPos; + this.followPointer && d && (void 0 === d.chartX && (d = f.pointer.normalize(d)), b = [d.chartX - f.plotLeft, d.chartY - c]); + b || (A(a, function (a) { + e = a.series.yAxis; + x = a.series.xAxis; + p += a.plotX + (!m && x ? x.left - n : 0); + z += (a.plotLow ? (a.plotLow + a.plotHigh) / 2 : a.plotY) + (!m && e ? e.top - c : 0) + }), p /= a.length, z /= a.length, b = [m ? f.plotWidth - z : p, this.shared && !m && 1 < a.length && d ? d.chartY - c : m ? f.plotHeight - p : z]); + return g(b, Math.round) + }, getPosition: function (a, d, f) { + var b = this.chart, m = this.distance, c = {}, n = f.h || 0, p, z = ["y", b.chartHeight, d, f.plotY + b.plotTop, b.plotTop, b.plotTop + b.plotHeight], e = ["x", b.chartWidth, a, f.plotX + b.plotLeft, b.plotLeft, b.plotLeft + b.plotWidth], x = !this.followPointer && u(f.ttBelow, !b.inverted === !!f.negative), g = function (a, b, e, h, d, f) { + var k = e < h - m, y = h + m + e < b, p = h - m - e; + h += m; + if (x && y)c[a] = h; else if (!x && k)c[a] = p; else if (k)c[a] = Math.min(f - e, 0 > p - n ? p : p - n); + else if (y)c[a] = Math.max(d, h + n + e > b ? h : h + n); else return !1 + }, w = function (a, b, e, h) { + var k; + h < m || h > b - m ? k = !1 : c[a] = h < e / 2 ? 1 : h > b - e / 2 ? b - e - 2 : h - e / 2; + return k + }, h = function (a) { + var b = z; + z = e; + e = b; + p = a + }, y = function () { + !1 !== g.apply(0, z) ? !1 !== w.apply(0, e) || p || (h(!0), y()) : p ? c.x = c.y = 0 : (h(!0), y()) + }; + (b.inverted || 1 < this.len) && h(); + y(); + return c + }, defaultFormatter: function (a) { + var b = this.points || l(this), d; + d = [a.tooltipFooterHeaderFormatter(b[0])]; + d = d.concat(a.bodyFormatter(b)); + d.push(a.tooltipFooterHeaderFormatter(b[0], !0)); + return d + }, refresh: function (a, + d) { + var b = this.chart, f, m = this.options, c, n, p = {}, z = []; + f = m.formatter || this.defaultFormatter; + var p = b.hoverPoints, e = this.shared; + clearTimeout(this.hideTimer); + this.followPointer = l(a)[0].series.tooltipOptions.followPointer; + n = this.getAnchor(a, d); + d = n[0]; + c = n[1]; + !e || a.series && a.series.noSharedTooltip ? p = a.getLabelConfig() : (b.hoverPoints = a, p && A(p, function (a) { + a.setState() + }), A(a, function (a) { + a.setState("hover"); + z.push(a.getLabelConfig()) + }), p = {x: a[0].category, y: a[0].y}, p.points = z, a = a[0]); + this.len = z.length; + p = f.call(p, + this); + e = a.series; + this.distance = u(e.tooltipOptions.distance, 16); + !1 === p ? this.hide() : (f = this.getLabel(), this.isHidden && f.attr({opacity: 1}).show(), this.split ? this.renderSplit(p, b.hoverPoints) : (f.attr({text: p && p.join ? p.join("") : p}), f.removeClass(/highcharts-color-[\d]+/g).addClass("highcharts-color-" + u(a.colorIndex, e.colorIndex)), f.attr({stroke: m.borderColor || a.color || e.color || "#666666"}), this.updatePosition({ + plotX: d, + plotY: c, + negative: a.negative, + ttBelow: a.ttBelow, + h: n[2] || 0 + })), this.isHidden = !1) + }, renderSplit: function (b, + d) { + var f = this, p = [], m = this.chart, c = m.renderer, n = !0, g = this.options, z, e = this.getLabel(); + A(b.slice(0, d.length + 1), function (a, b) { + b = d[b - 1] || {isHeader: !0, plotX: d[0].plotX}; + var x = b.series || f, h = x.tt, y = b.series || {}, t = "highcharts-color-" + u(b.colorIndex, y.colorIndex, "none"); + h || (x.tt = h = c.label(null, null, null, "callout").addClass("highcharts-tooltip-box " + t).attr({ + padding: g.padding, + r: g.borderRadius, + fill: g.backgroundColor, + stroke: b.color || y.color || "#333333", + "stroke-width": g.borderWidth + }).add(e)); + h.isActive = !0; + h.attr({text: a}); + h.css(g.style); + a = h.getBBox(); + y = a.width + h.strokeWidth(); + b.isHeader ? (z = a.height, y = Math.max(0, Math.min(b.plotX + m.plotLeft - y / 2, m.chartWidth - y))) : y = b.plotX + m.plotLeft - u(g.distance, 16) - y; + 0 > y && (n = !1); + a = (b.series && b.series.yAxis && b.series.yAxis.pos) + (b.plotY || 0); + a -= m.plotTop; + p.push({ + target: b.isHeader ? m.plotHeight + z : a, + rank: b.isHeader ? 1 : 0, + size: x.tt.getBBox().height + 1, + point: b, + x: y, + tt: h + }) + }); + this.cleanSplit(); + a.distribute(p, m.plotHeight + z); + A(p, function (a) { + var b = a.point, c = b.series; + a.tt.attr({ + visibility: void 0 === + a.pos ? "hidden" : "inherit", + x: n || b.isHeader ? a.x : b.plotX + m.plotLeft + u(g.distance, 16), + y: a.pos + m.plotTop, + anchorX: b.isHeader ? b.plotX + m.plotLeft : b.plotX + c.xAxis.pos, + anchorY: b.isHeader ? a.pos + m.plotTop - 15 : b.plotY + c.yAxis.pos + }) + }) + }, updatePosition: function (a) { + var b = this.chart, d = this.getLabel(), d = (this.options.positioner || this.getPosition).call(this, d.width, d.height, a); + this.move(Math.round(d.x), Math.round(d.y || 0), a.plotX + b.plotLeft, a.plotY + b.plotTop) + }, getDateFormat: function (a, f, g, t) { + var b = B("%m-%d %H:%M:%S.%L", + f), c, n, p = {millisecond: 15, second: 12, minute: 9, hour: 6, day: 3}, z = "millisecond"; + for (n in d) { + if (a === d.week && +B("%w", f) === g && "00:00:00.000" === b.substr(6)) { + n = "week"; + break + } + if (d[n] > a) { + n = z; + break + } + if (p[n] && b.substr(p[n]) !== "01-01 00:00:00.000".substr(p[n]))break; + "week" !== n && (z = n) + } + n && (c = t[n]); + return c + }, getXDateFormat: function (a, d, f) { + d = d.dateTimeLabelFormats; + var b = f && f.closestPointRange; + return (b ? this.getDateFormat(b, a.x, f.options.startOfWeek, d) : d.day) || d.year + }, tooltipFooterHeaderFormatter: function (a, d) { + var b = d ? "footer" : + "header"; + d = a.series; + var f = d.tooltipOptions, m = f.xDateFormat, c = d.xAxis, n = c && "datetime" === c.options.type && r(a.key), b = f[b + "Format"]; + n && !m && (m = this.getXDateFormat(a, f, c)); + n && m && (b = b.replace("{point.key}", "{point.key:" + m + "}")); + return G(b, {point: a, series: d}) + }, bodyFormatter: function (a) { + return g(a, function (a) { + var b = a.series.tooltipOptions; + return (b.pointFormatter || a.point.tooltipFormatter).call(a.point, b.pointFormat) + }) + } + } + })(L); + (function (a) { + var B = a.addEvent, A = a.attr, H = a.charts, G = a.color, r = a.css, g = a.defined, f = + a.doc, u = a.each, l = a.extend, q = a.fireEvent, d = a.offset, b = a.pick, p = a.removeEvent, C = a.splat, t = a.Tooltip, m = a.win; + a.Pointer = function (a, b) { + this.init(a, b) + }; + a.Pointer.prototype = { + init: function (a, d) { + this.options = d; + this.chart = a; + this.runChartClick = d.chart.events && !!d.chart.events.click; + this.pinchDown = []; + this.lastValidTouch = {}; + t && d.tooltip.enabled && (a.tooltip = new t(a, d.tooltip), this.followTouchMove = b(d.tooltip.followTouchMove, !0)); + this.setDOMEvents() + }, zoomOption: function (a) { + var c = this.chart, d = c.options.chart, m = d.zoomType || + "", c = c.inverted; + /touch/.test(a.type) && (m = b(d.pinchType, m)); + this.zoomX = a = /x/.test(m); + this.zoomY = m = /y/.test(m); + this.zoomHor = a && !c || m && c; + this.zoomVert = m && !c || a && c; + this.hasZoom = a || m + }, normalize: function (a, b) { + var c, n; + a = a || m.event; + a.target || (a.target = a.srcElement); + n = a.touches ? a.touches.length ? a.touches.item(0) : a.changedTouches[0] : a; + b || (this.chartPosition = b = d(this.chart.container)); + void 0 === n.pageX ? (c = Math.max(a.x, a.clientX - b.left), b = a.y) : (c = n.pageX - b.left, b = n.pageY - b.top); + return l(a, { + chartX: Math.round(c), + chartY: Math.round(b) + }) + }, getCoordinates: function (a) { + var b = {xAxis: [], yAxis: []}; + u(this.chart.axes, function (c) { + b[c.isXAxis ? "xAxis" : "yAxis"].push({axis: c, value: c.toValue(a[c.horiz ? "chartX" : "chartY"])}) + }); + return b + }, runPointActions: function (c) { + var d = this.chart, m = d.series, p = d.tooltip, e = p ? p.shared : !1, g = !0, t = d.hoverPoint, w = d.hoverSeries, h, y, l, q = [], r; + if (!e && !w)for (h = 0; h < m.length; h++)if (m[h].directTouch || !m[h].options.stickyTracking)m = []; + w && (e ? w.noSharedTooltip : w.directTouch) && t ? q = [t] : (e || !w || w.options.stickyTracking || + (m = [w]), u(m, function (a) { + y = a.noSharedTooltip && e; + l = !e && a.directTouch; + a.visible && !y && !l && b(a.options.enableMouseTracking, !0) && (r = a.searchPoint(c, !y && 1 === a.kdDimensions)) && r.series && q.push(r) + }), q.sort(function (a, b) { + var c = a.distX - b.distX, h = a.dist - b.dist, k = (b.series.group && b.series.group.zIndex) - (a.series.group && a.series.group.zIndex); + return 0 !== c && e ? c : 0 !== h ? h : 0 !== k ? k : a.series.index > b.series.index ? -1 : 1 + })); + if (e)for (h = q.length; h--;)(q[h].x !== q[0].x || q[h].series.noSharedTooltip) && q.splice(h, 1); + if (q[0] && (q[0] !== + this.prevKDPoint || p && p.isHidden)) { + if (e && !q[0].series.noSharedTooltip) { + for (h = 0; h < q.length; h++)q[h].onMouseOver(c, q[h] !== (w && w.directTouch && t || q[0])); + q.length && p && p.refresh(q.sort(function (a, b) { + return a.series.index - b.series.index + }), c) + } else if (p && p.refresh(q[0], c), !w || !w.directTouch)q[0].onMouseOver(c); + this.prevKDPoint = q[0]; + g = !1 + } + g && (m = w && w.tooltipOptions.followPointer, p && m && !p.isHidden && (m = p.getAnchor([{}], c), p.updatePosition({ + plotX: m[0], + plotY: m[1] + }))); + this.unDocMouseMove || (this.unDocMouseMove = B(f, + "mousemove", function (b) { + if (H[a.hoverChartIndex])H[a.hoverChartIndex].pointer.onDocumentMouseMove(b) + })); + u(e ? q : [b(t, q[0])], function (a) { + u(d.axes, function (b) { + (!a || a.series && a.series[b.coll] === b) && b.drawCrosshair(c, a) + }) + }) + }, reset: function (a, b) { + var c = this.chart, d = c.hoverSeries, e = c.hoverPoint, n = c.hoverPoints, m = c.tooltip, f = m && m.shared ? n : e; + a && f && u(C(f), function (b) { + b.series.isCartesian && void 0 === b.plotX && (a = !1) + }); + if (a)m && f && (m.refresh(f), e && (e.setState(e.state, !0), u(c.axes, function (a) { + a.crosshair && a.drawCrosshair(null, + e) + }))); else { + if (e)e.onMouseOut(); + n && u(n, function (a) { + a.setState() + }); + if (d)d.onMouseOut(); + m && m.hide(b); + this.unDocMouseMove && (this.unDocMouseMove = this.unDocMouseMove()); + u(c.axes, function (a) { + a.hideCrosshair() + }); + this.hoverX = this.prevKDPoint = c.hoverPoints = c.hoverPoint = null + } + }, scaleGroups: function (a, b) { + var c = this.chart, d; + u(c.series, function (e) { + d = a || e.getPlotBox(); + e.xAxis && e.xAxis.zoomEnabled && e.group && (e.group.attr(d), e.markerGroup && (e.markerGroup.attr(d), e.markerGroup.clip(b ? c.clipRect : null)), e.dataLabelsGroup && + e.dataLabelsGroup.attr(d)) + }); + c.clipRect.attr(b || c.clipBox) + }, dragStart: function (a) { + var b = this.chart; + b.mouseIsDown = a.type; + b.cancelClick = !1; + b.mouseDownX = this.mouseDownX = a.chartX; + b.mouseDownY = this.mouseDownY = a.chartY + }, drag: function (a) { + var b = this.chart, c = b.options.chart, d = a.chartX, e = a.chartY, m = this.zoomHor, f = this.zoomVert, p = b.plotLeft, h = b.plotTop, y = b.plotWidth, g = b.plotHeight, t, q = this.selectionMarker, k = this.mouseDownX, l = this.mouseDownY, r = c.panKey && a[c.panKey + "Key"]; + q && q.touch || (d < p ? d = p : d > p + y && (d = p + y), e < + h ? e = h : e > h + g && (e = h + g), this.hasDragged = Math.sqrt(Math.pow(k - d, 2) + Math.pow(l - e, 2)), 10 < this.hasDragged && (t = b.isInsidePlot(k - p, l - h), b.hasCartesianSeries && (this.zoomX || this.zoomY) && t && !r && !q && (this.selectionMarker = q = b.renderer.rect(p, h, m ? 1 : y, f ? 1 : g, 0).attr({ + fill: c.selectionMarkerFill || G("#335cad").setOpacity(.25).get(), + "class": "highcharts-selection-marker", + zIndex: 7 + }).add()), q && m && (d -= k, q.attr({ + width: Math.abs(d), + x: (0 < d ? 0 : d) + k + })), q && f && (d = e - l, q.attr({ + height: Math.abs(d), + y: (0 < d ? 0 : d) + l + })), t && !q && c.panning && b.pan(a, + c.panning))) + }, drop: function (a) { + var b = this, c = this.chart, d = this.hasPinched; + if (this.selectionMarker) { + var e = { + originalEvent: a, + xAxis: [], + yAxis: [] + }, m = this.selectionMarker, f = m.attr ? m.attr("x") : m.x, p = m.attr ? m.attr("y") : m.y, h = m.attr ? m.attr("width") : m.width, y = m.attr ? m.attr("height") : m.height, t; + if (this.hasDragged || d)u(c.axes, function (c) { + if (c.zoomEnabled && g(c.min) && (d || b[{xAxis: "zoomX", yAxis: "zoomY"}[c.coll]])) { + var m = c.horiz, k = "touchend" === a.type ? c.minPixelPadding : 0, n = c.toValue((m ? f : p) + k), m = c.toValue((m ? f + h : p + + y) - k); + e[c.coll].push({axis: c, min: Math.min(n, m), max: Math.max(n, m)}); + t = !0 + } + }), t && q(c, "selection", e, function (a) { + c.zoom(l(a, d ? {animation: !1} : null)) + }); + this.selectionMarker = this.selectionMarker.destroy(); + d && this.scaleGroups() + } + c && (r(c.container, {cursor: c._cursor}), c.cancelClick = 10 < this.hasDragged, c.mouseIsDown = this.hasDragged = this.hasPinched = !1, this.pinchDown = []) + }, onContainerMouseDown: function (a) { + a = this.normalize(a); + this.zoomOption(a); + a.preventDefault && a.preventDefault(); + this.dragStart(a) + }, onDocumentMouseUp: function (b) { + H[a.hoverChartIndex] && + H[a.hoverChartIndex].pointer.drop(b) + }, onDocumentMouseMove: function (a) { + var b = this.chart, c = this.chartPosition; + a = this.normalize(a, c); + !c || this.inClass(a.target, "highcharts-tracker") || b.isInsidePlot(a.chartX - b.plotLeft, a.chartY - b.plotTop) || this.reset() + }, onContainerMouseLeave: function (b) { + var c = H[a.hoverChartIndex]; + c && (b.relatedTarget || b.toElement) && (c.pointer.reset(), c.pointer.chartPosition = null) + }, onContainerMouseMove: function (b) { + var c = this.chart; + g(a.hoverChartIndex) && H[a.hoverChartIndex] && H[a.hoverChartIndex].mouseIsDown || + (a.hoverChartIndex = c.index); + b = this.normalize(b); + b.returnValue = !1; + "mousedown" === c.mouseIsDown && this.drag(b); + !this.inClass(b.target, "highcharts-tracker") && !c.isInsidePlot(b.chartX - c.plotLeft, b.chartY - c.plotTop) || c.openMenu || this.runPointActions(b) + }, inClass: function (a, b) { + for (var c; a;) { + if (c = A(a, "class")) { + if (-1 !== c.indexOf(b))return !0; + if (-1 !== c.indexOf("highcharts-container"))return !1 + } + a = a.parentNode + } + }, onTrackerMouseOut: function (a) { + var b = this.chart.hoverSeries; + a = a.relatedTarget || a.toElement; + if (!(!b || !a || + b.options.stickyTracking || this.inClass(a, "highcharts-tooltip") || this.inClass(a, "highcharts-series-" + b.index) && this.inClass(a, "highcharts-tracker")))b.onMouseOut() + }, onContainerClick: function (a) { + var b = this.chart, c = b.hoverPoint, d = b.plotLeft, e = b.plotTop; + a = this.normalize(a); + b.cancelClick || (c && this.inClass(a.target, "highcharts-tracker") ? (q(c.series, "click", l(a, {point: c})), b.hoverPoint && c.firePointEvent("click", a)) : (l(a, this.getCoordinates(a)), b.isInsidePlot(a.chartX - d, a.chartY - e) && q(b, "click", a))) + }, setDOMEvents: function () { + var b = + this, d = b.chart.container; + d.onmousedown = function (a) { + b.onContainerMouseDown(a) + }; + d.onmousemove = function (a) { + b.onContainerMouseMove(a) + }; + d.onclick = function (a) { + b.onContainerClick(a) + }; + B(d, "mouseleave", b.onContainerMouseLeave); + 1 === a.chartCount && B(f, "mouseup", b.onDocumentMouseUp); + a.hasTouch && (d.ontouchstart = function (a) { + b.onContainerTouchStart(a) + }, d.ontouchmove = function (a) { + b.onContainerTouchMove(a) + }, 1 === a.chartCount && B(f, "touchend", b.onDocumentTouchEnd)) + }, destroy: function () { + var b; + p(this.chart.container, "mouseleave", + this.onContainerMouseLeave); + a.chartCount || (p(f, "mouseup", this.onDocumentMouseUp), p(f, "touchend", this.onDocumentTouchEnd)); + clearInterval(this.tooltipTimeout); + for (b in this)this[b] = null + } + } + })(L); + (function (a) { + var B = a.charts, A = a.each, H = a.extend, G = a.map, r = a.noop, g = a.pick; + H(a.Pointer.prototype, { + pinchTranslate: function (a, g, l, q, d, b) { + this.zoomHor && this.pinchTranslateDirection(!0, a, g, l, q, d, b); + this.zoomVert && this.pinchTranslateDirection(!1, a, g, l, q, d, b) + }, pinchTranslateDirection: function (a, g, l, q, d, b, p, r) { + var f = + this.chart, m = a ? "x" : "y", c = a ? "X" : "Y", n = "chart" + c, E = a ? "width" : "height", z = f["plot" + (a ? "Left" : "Top")], e, x, F = r || 1, w = f.inverted, h = f.bounds[a ? "h" : "v"], y = 1 === g.length, J = g[0][n], u = l[0][n], I = !y && g[1][n], k = !y && l[1][n], D; + l = function () { + !y && 20 < Math.abs(J - I) && (F = r || Math.abs(u - k) / Math.abs(J - I)); + x = (z - u) / F + J; + e = f["plot" + (a ? "Width" : "Height")] / F + }; + l(); + g = x; + g < h.min ? (g = h.min, D = !0) : g + e > h.max && (g = h.max - e, D = !0); + D ? (u -= .8 * (u - p[m][0]), y || (k -= .8 * (k - p[m][1])), l()) : p[m] = [u, k]; + w || (b[m] = x - z, b[E] = e); + b = w ? 1 / F : F; + d[E] = e; + d[m] = g; + q[w ? a ? "scaleY" : + "scaleX" : "scale" + c] = F; + q["translate" + c] = b * z + (u - b * J) + }, pinch: function (a) { + var f = this, l = f.chart, q = f.pinchDown, d = a.touches, b = d.length, p = f.lastValidTouch, C = f.hasZoom, t = f.selectionMarker, m = {}, c = 1 === b && (f.inClass(a.target, "highcharts-tracker") && l.runTrackerClick || f.runChartClick), n = {}; + 1 < b && (f.initiated = !0); + C && f.initiated && !c && a.preventDefault(); + G(d, function (a) { + return f.normalize(a) + }); + "touchstart" === a.type ? (A(d, function (a, b) { + q[b] = {chartX: a.chartX, chartY: a.chartY} + }), p.x = [q[0].chartX, q[1] && q[1].chartX], p.y = [q[0].chartY, + q[1] && q[1].chartY], A(l.axes, function (a) { + if (a.zoomEnabled) { + var b = l.bounds[a.horiz ? "h" : "v"], c = a.minPixelPadding, d = a.toPixels(g(a.options.min, a.dataMin)), m = a.toPixels(g(a.options.max, a.dataMax)), f = Math.max(d, m); + b.min = Math.min(a.pos, Math.min(d, m) - c); + b.max = Math.max(a.pos + a.len, f + c) + } + }), f.res = !0) : f.followTouchMove && 1 === b ? this.runPointActions(f.normalize(a)) : q.length && (t || (f.selectionMarker = t = H({ + destroy: r, + touch: !0 + }, l.plotBox)), f.pinchTranslate(q, d, m, t, n, p), f.hasPinched = C, f.scaleGroups(m, n), f.res && (f.res = !1, this.reset(!1, 0))) + }, touch: function (f, r) { + var l = this.chart, q, d; + if (l.index !== a.hoverChartIndex)this.onContainerMouseLeave({relatedTarget: !0}); + a.hoverChartIndex = l.index; + 1 === f.touches.length ? (f = this.normalize(f), (d = l.isInsidePlot(f.chartX - l.plotLeft, f.chartY - l.plotTop)) && !l.openMenu ? (r && this.runPointActions(f), "touchmove" === f.type && (r = this.pinchDown, q = r[0] ? 4 <= Math.sqrt(Math.pow(r[0].chartX - f.chartX, 2) + Math.pow(r[0].chartY - f.chartY, 2)) : !1), g(q, !0) && this.pinch(f)) : r && this.reset()) : 2 === f.touches.length && + this.pinch(f) + }, onContainerTouchStart: function (a) { + this.zoomOption(a); + this.touch(a, !0) + }, onContainerTouchMove: function (a) { + this.touch(a) + }, onDocumentTouchEnd: function (f) { + B[a.hoverChartIndex] && B[a.hoverChartIndex].pointer.drop(f) + } + }) + })(L); + (function (a) { + var B = a.addEvent, A = a.charts, H = a.css, G = a.doc, r = a.extend, g = a.noop, f = a.Pointer, u = a.removeEvent, l = a.win, q = a.wrap; + if (l.PointerEvent || l.MSPointerEvent) { + var d = {}, b = !!l.PointerEvent, p = function () { + var a, b = []; + b.item = function (a) { + return this[a] + }; + for (a in d)d.hasOwnProperty(a) && + b.push({pageX: d[a].pageX, pageY: d[a].pageY, target: d[a].target}); + return b + }, C = function (b, d, c, f) { + "touch" !== b.pointerType && b.pointerType !== b.MSPOINTER_TYPE_TOUCH || !A[a.hoverChartIndex] || (f(b), f = A[a.hoverChartIndex].pointer, f[d]({ + type: c, + target: b.currentTarget, + preventDefault: g, + touches: p() + })) + }; + r(f.prototype, { + onContainerPointerDown: function (a) { + C(a, "onContainerTouchStart", "touchstart", function (a) { + d[a.pointerId] = {pageX: a.pageX, pageY: a.pageY, target: a.currentTarget} + }) + }, onContainerPointerMove: function (a) { + C(a, "onContainerTouchMove", + "touchmove", function (a) { + d[a.pointerId] = {pageX: a.pageX, pageY: a.pageY}; + d[a.pointerId].target || (d[a.pointerId].target = a.currentTarget) + }) + }, onDocumentPointerUp: function (a) { + C(a, "onDocumentTouchEnd", "touchend", function (a) { + delete d[a.pointerId] + }) + }, batchMSEvents: function (a) { + a(this.chart.container, b ? "pointerdown" : "MSPointerDown", this.onContainerPointerDown); + a(this.chart.container, b ? "pointermove" : "MSPointerMove", this.onContainerPointerMove); + a(G, b ? "pointerup" : "MSPointerUp", this.onDocumentPointerUp) + } + }); + q(f.prototype, + "init", function (a, b, c) { + a.call(this, b, c); + this.hasZoom && H(b.container, {"-ms-touch-action": "none", "touch-action": "none"}) + }); + q(f.prototype, "setDOMEvents", function (a) { + a.apply(this); + (this.hasZoom || this.followTouchMove) && this.batchMSEvents(B) + }); + q(f.prototype, "destroy", function (a) { + this.batchMSEvents(u); + a.call(this) + }) + } + })(L); + (function (a) { + var B, A = a.addEvent, H = a.css, G = a.discardElement, r = a.defined, g = a.each, f = a.extend, u = a.isFirefox, l = a.marginNames, q = a.merge, d = a.pick, b = a.setAnimation, p = a.stableSort, C = a.win, t = a.wrap; + B = a.Legend = function (a, b) { + this.init(a, b) + }; + B.prototype = { + init: function (a, b) { + this.chart = a; + this.setOptions(b); + b.enabled && (this.render(), A(this.chart, "endResize", function () { + this.legend.positionCheckboxes() + })) + }, setOptions: function (a) { + var b = d(a.padding, 8); + this.options = a; + this.itemStyle = a.itemStyle; + this.itemHiddenStyle = q(this.itemStyle, a.itemHiddenStyle); + this.itemMarginTop = a.itemMarginTop || 0; + this.initialItemX = this.padding = b; + this.initialItemY = b - 5; + this.itemHeight = this.maxItemWidth = 0; + this.symbolWidth = d(a.symbolWidth, + 16); + this.pages = [] + }, update: function (a, b) { + var c = this.chart; + this.setOptions(q(!0, this.options, a)); + this.destroy(); + c.isDirtyLegend = c.isDirtyBox = !0; + d(b, !0) && c.redraw() + }, colorizeItem: function (a, b) { + a.legendGroup[b ? "removeClass" : "addClass"]("highcharts-legend-item-hidden"); + var c = this.options, d = a.legendItem, m = a.legendLine, e = a.legendSymbol, f = this.itemHiddenStyle.color, c = b ? c.itemStyle.color : f, p = b ? a.color || f : f, g = a.options && a.options.marker, h = {fill: p}, y; + d && d.css({fill: c, color: c}); + m && m.attr({stroke: p}); + if (e) { + if (g && + e.isMarker && (h = a.pointAttribs(), !b))for (y in h)h[y] = f; + e.attr(h) + } + }, positionItem: function (a) { + var b = this.options, d = b.symbolPadding, b = !b.rtl, m = a._legendItemPos, f = m[0], m = m[1], e = a.checkbox; + (a = a.legendGroup) && a.element && a.translate(b ? f : this.legendWidth - f - 2 * d - 4, m); + e && (e.x = f, e.y = m) + }, destroyItem: function (a) { + var b = a.checkbox; + g(["legendItem", "legendLine", "legendSymbol", "legendGroup"], function (b) { + a[b] && (a[b] = a[b].destroy()) + }); + b && G(a.checkbox) + }, destroy: function () { + function a(a) { + this[a] && (this[a] = this[a].destroy()) + } + + g(this.getAllItems(), function (b) { + g(["legendItem", "legendGroup"], a, b) + }); + g(["box", "title", "group"], a, this); + this.display = null + }, positionCheckboxes: function (a) { + var b = this.group && this.group.alignAttr, d, m = this.clipHeight || this.legendHeight, f = this.titleHeight; + b && (d = b.translateY, g(this.allItems, function (c) { + var e = c.checkbox, n; + e && (n = d + f + e.y + (a || 0) + 3, H(e, { + left: b.translateX + c.checkboxOffset + e.x - 20 + "px", + top: n + "px", + display: n > d - 6 && n < d + m - 6 ? "" : "none" + })) + })) + }, renderTitle: function () { + var a = this.padding, b = this.options.title, + d = 0; + b.text && (this.title || (this.title = this.chart.renderer.label(b.text, a - 3, a - 4, null, null, null, null, null, "legend-title").attr({zIndex: 1}).css(b.style).add(this.group)), a = this.title.getBBox(), d = a.height, this.offsetWidth = a.width, this.contentGroup.attr({translateY: d})); + this.titleHeight = d + }, setText: function (b) { + var c = this.options; + b.legendItem.attr({text: c.labelFormat ? a.format(c.labelFormat, b) : c.labelFormatter.call(b)}) + }, renderItem: function (a) { + var b = this.chart, f = b.renderer, m = this.options, p = "horizontal" === + m.layout, e = this.symbolWidth, g = m.symbolPadding, l = this.itemStyle, t = this.itemHiddenStyle, h = this.padding, y = p ? d(m.itemDistance, 20) : 0, J = !m.rtl, r = m.width, I = m.itemMarginBottom || 0, k = this.itemMarginTop, u = this.initialItemX, C = a.legendItem, N = !a.series, A = !N && a.series.drawLegendSymbol ? a.series : a, B = A.options, B = this.createCheckboxForItem && B && B.showCheckbox, v = m.useHTML; + C || (a.legendGroup = f.g("legend-item").addClass("highcharts-" + A.type + "-series highcharts-color-" + a.colorIndex + (a.options.className ? " " + a.options.className : + "") + (N ? " highcharts-series-" + a.index : "")).attr({zIndex: 1}).add(this.scrollGroup), a.legendItem = C = f.text("", J ? e + g : -g, this.baseline || 0, v).css(q(a.visible ? l : t)).attr({ + align: J ? "left" : "right", + zIndex: 2 + }).add(a.legendGroup), this.baseline || (l = l.fontSize, this.fontMetrics = f.fontMetrics(l, C), this.baseline = this.fontMetrics.f + 3 + k, C.attr("y", this.baseline)), this.symbolHeight = m.symbolHeight || this.fontMetrics.f, A.drawLegendSymbol(this, a), this.setItemEvents && this.setItemEvents(a, C, v), B && this.createCheckboxForItem(a)); + this.colorizeItem(a, a.visible); + this.setText(a); + f = C.getBBox(); + e = a.checkboxOffset = m.itemWidth || a.legendItemWidth || e + g + f.width + y + (B ? 20 : 0); + this.itemHeight = g = Math.round(a.legendItemHeight || f.height); + p && this.itemX - u + e > (r || b.chartWidth - 2 * h - u - m.x) && (this.itemX = u, this.itemY += k + this.lastLineHeight + I, this.lastLineHeight = 0); + this.maxItemWidth = Math.max(this.maxItemWidth, e); + this.lastItemY = k + this.itemY + I; + this.lastLineHeight = Math.max(g, this.lastLineHeight); + a._legendItemPos = [this.itemX, this.itemY]; + p ? this.itemX += e : + (this.itemY += k + g + I, this.lastLineHeight = g); + this.offsetWidth = r || Math.max((p ? this.itemX - u - y : e) + h, this.offsetWidth) + }, getAllItems: function () { + var a = []; + g(this.chart.series, function (b) { + var c = b && b.options; + b && d(c.showInLegend, r(c.linkedTo) ? !1 : void 0, !0) && (a = a.concat(b.legendItems || ("point" === c.legendType ? b.data : b))) + }); + return a + }, adjustMargins: function (a, b) { + var c = this.chart, f = this.options, m = f.align.charAt(0) + f.verticalAlign.charAt(0) + f.layout.charAt(0); + f.floating || g([/(lth|ct|rth)/, /(rtv|rm|rbv)/, /(rbh|cb|lbh)/, + /(lbv|lm|ltv)/], function (e, n) { + e.test(m) && !r(a[n]) && (c[l[n]] = Math.max(c[l[n]], c.legend[(n + 1) % 2 ? "legendHeight" : "legendWidth"] + [1, -1, -1, 1][n] * f[n % 2 ? "x" : "y"] + d(f.margin, 12) + b[n])) + }) + }, render: function () { + var a = this, b = a.chart, d = b.renderer, q = a.group, l, e, t, r, w = a.box, h = a.options, y = a.padding; + a.itemX = a.initialItemX; + a.itemY = a.initialItemY; + a.offsetWidth = 0; + a.lastItemY = 0; + q || (a.group = q = d.g("legend").attr({zIndex: 7}).add(), a.contentGroup = d.g().attr({zIndex: 1}).add(q), a.scrollGroup = d.g().add(a.contentGroup)); + a.renderTitle(); + l = a.getAllItems(); + p(l, function (a, b) { + return (a.options && a.options.legendIndex || 0) - (b.options && b.options.legendIndex || 0) + }); + h.reversed && l.reverse(); + a.allItems = l; + a.display = e = !!l.length; + a.lastLineHeight = 0; + g(l, function (b) { + a.renderItem(b) + }); + t = (h.width || a.offsetWidth) + y; + r = a.lastItemY + a.lastLineHeight + a.titleHeight; + r = a.handleOverflow(r); + r += y; + w || (a.box = w = d.rect().addClass("highcharts-legend-box").attr({r: h.borderRadius}).add(q), w.isNew = !0); + w.attr({ + stroke: h.borderColor, "stroke-width": h.borderWidth || 0, fill: h.backgroundColor || + "none" + }).shadow(h.shadow); + 0 < t && 0 < r && (w[w.isNew ? "attr" : "animate"](w.crisp({ + x: 0, + y: 0, + width: t, + height: r + }, w.strokeWidth())), w.isNew = !1); + w[e ? "show" : "hide"](); + a.legendWidth = t; + a.legendHeight = r; + g(l, function (b) { + a.positionItem(b) + }); + e && q.align(f({width: t, height: r}, h), !0, "spacingBox"); + b.isResizing || this.positionCheckboxes() + }, handleOverflow: function (a) { + var b = this, f = this.chart, m = f.renderer, p = this.options, e = p.y, f = f.spacingBox.height + ("top" === p.verticalAlign ? -e : e) - this.padding, e = p.maxHeight, q, l = this.clipRect, t = p.navigation, + h = d(t.animation, !0), y = t.arrowSize || 12, r = this.nav, u = this.pages, I = this.padding, k, D = this.allItems, C = function (a) { + a ? l.attr({height: a}) : l && (b.clipRect = l.destroy(), b.contentGroup.clip()); + b.contentGroup.div && (b.contentGroup.div.style.clip = a ? "rect(" + I + "px,9999px," + (I + a) + "px,0)" : "auto") + }; + "horizontal" !== p.layout || "middle" === p.verticalAlign || p.floating || (f /= 2); + e && (f = Math.min(f, e)); + u.length = 0; + a > f && !1 !== t.enabled ? (this.clipHeight = q = Math.max(f - 20 - this.titleHeight - I, 0), this.currentPage = d(this.currentPage, 1), this.fullHeight = + a, g(D, function (a, b) { + var c = a._legendItemPos[1]; + a = Math.round(a.legendItem.getBBox().height); + var e = u.length; + if (!e || c - u[e - 1] > q && (k || c) !== u[e - 1])u.push(k || c), e++; + b === D.length - 1 && c + a - u[e - 1] > q && u.push(c); + c !== k && (k = c) + }), l || (l = b.clipRect = m.clipRect(0, I, 9999, 0), b.contentGroup.clip(l)), C(q), r || (this.nav = r = m.g().attr({zIndex: 1}).add(this.group), this.up = m.symbol("triangle", 0, 0, y, y).on("click", function () { + b.scroll(-1, h) + }).add(r), this.pager = m.text("", 15, 10).addClass("highcharts-legend-navigation").css(t.style).add(r), + this.down = m.symbol("triangle-down", 0, 0, y, y).on("click", function () { + b.scroll(1, h) + }).add(r)), b.scroll(0), a = f) : r && (C(), r.hide(), this.scrollGroup.attr({translateY: 1}), this.clipHeight = 0); + return a + }, scroll: function (a, c) { + var d = this.pages, f = d.length; + a = this.currentPage + a; + var m = this.clipHeight, e = this.options.navigation, p = this.pager, g = this.padding; + a > f && (a = f); + 0 < a && (void 0 !== c && b(c, this.chart), this.nav.attr({ + translateX: g, + translateY: m + this.padding + 7 + this.titleHeight, + visibility: "visible" + }), this.up.attr({ + "class": 1 === + a ? "highcharts-legend-nav-inactive" : "highcharts-legend-nav-active" + }), p.attr({text: a + "/" + f}), this.down.attr({ + x: 18 + this.pager.getBBox().width, + "class": a === f ? "highcharts-legend-nav-inactive" : "highcharts-legend-nav-active" + }), this.up.attr({fill: 1 === a ? e.inactiveColor : e.activeColor}).css({cursor: 1 === a ? "default" : "pointer"}), this.down.attr({fill: a === f ? e.inactiveColor : e.activeColor}).css({cursor: a === f ? "default" : "pointer"}), c = -d[a - 1] + this.initialItemY, this.scrollGroup.animate({translateY: c}), this.currentPage = + a, this.positionCheckboxes(c)) + } + }; + a.LegendSymbolMixin = { + drawRectangle: function (a, b) { + var c = a.symbolHeight, f = a.options.squareSymbol; + b.legendSymbol = this.chart.renderer.rect(f ? (a.symbolWidth - c) / 2 : 0, a.baseline - c + 1, f ? c : a.symbolWidth, c, d(a.options.symbolRadius, c / 2)).addClass("highcharts-point").attr({zIndex: 3}).add(b.legendGroup) + }, drawLineMarker: function (a) { + var b = this.options, f = b.marker, m = a.symbolWidth, p = a.symbolHeight, e = p / 2, g = this.chart.renderer, l = this.legendGroup; + a = a.baseline - Math.round(.3 * a.fontMetrics.b); + var t; + t = {"stroke-width": b.lineWidth || 0}; + b.dashStyle && (t.dashstyle = b.dashStyle); + this.legendLine = g.path(["M", 0, a, "L", m, a]).addClass("highcharts-graph").attr(t).add(l); + f && !1 !== f.enabled && (b = Math.min(d(f.radius, e), e), 0 === this.symbol.indexOf("url") && (f = q(f, { + width: p, + height: p + }), b = 0), this.legendSymbol = f = g.symbol(this.symbol, m / 2 - b, a - b, 2 * b, 2 * b, f).addClass("highcharts-point").add(l), f.isMarker = !0) + } + }; + (/Trident\/7\.0/.test(C.navigator.userAgent) || u) && t(B.prototype, "positionItem", function (a, b) { + var c = this, d = function () { + b._legendItemPos && + a.call(c, b) + }; + d(); + setTimeout(d) + }) + })(L); + (function (a) { + var B = a.addEvent, A = a.animate, H = a.animObject, G = a.attr, r = a.doc, g = a.Axis, f = a.createElement, u = a.defaultOptions, l = a.discardElement, q = a.charts, d = a.css, b = a.defined, p = a.each, C = a.extend, t = a.find, m = a.fireEvent, c = a.getStyle, n = a.grep, E = a.isNumber, z = a.isObject, e = a.isString, x = a.Legend, F = a.marginNames, w = a.merge, h = a.Pointer, y = a.pick, J = a.pInt, K = a.removeEvent, I = a.seriesTypes, k = a.splat, D = a.svg, P = a.syncTimeout, N = a.win, S = a.Renderer, O = a.Chart = function () { + this.getArgs.apply(this, + arguments) + }; + a.chart = function (a, b, c) { + return new O(a, b, c) + }; + O.prototype = { + callbacks: [], getArgs: function () { + var a = [].slice.call(arguments); + if (e(a[0]) || a[0].nodeName)this.renderTo = a.shift(); + this.init(a[0], a[1]) + }, init: function (b, c) { + var e, h = b.series; + b.series = null; + e = w(u, b); + e.series = b.series = h; + this.userOptions = b; + this.respRules = []; + b = e.chart; + h = b.events; + this.margin = []; + this.spacing = []; + this.bounds = {h: {}, v: {}}; + this.callback = c; + this.isResizing = 0; + this.options = e; + this.axes = []; + this.series = []; + this.hasCartesianSeries = b.showAxes; + var d; + this.index = q.length; + q.push(this); + a.chartCount++; + if (h)for (d in h)B(this, d, h[d]); + this.xAxis = []; + this.yAxis = []; + this.pointCount = this.colorCounter = this.symbolCounter = 0; + this.firstRender() + }, initSeries: function (b) { + var c = this.options.chart; + (c = I[b.type || c.type || c.defaultSeriesType]) || a.error(17, !0); + c = new c; + c.init(this, b); + return c + }, orderSeries: function (a) { + var b = this.series; + for (a = a || 0; a < b.length; a++)b[a] && (b[a].index = a, b[a].name = b[a].name || "Series " + (b[a].index + 1)) + }, isInsidePlot: function (a, b, c) { + var e = c ? + b : a; + a = c ? a : b; + return 0 <= e && e <= this.plotWidth && 0 <= a && a <= this.plotHeight + }, redraw: function (b) { + var c = this.axes, e = this.series, h = this.pointer, d = this.legend, k = this.isDirtyLegend, f, n, y = this.hasCartesianSeries, g = this.isDirtyBox, v = e.length, l = v, q = this.renderer, t = q.isHidden(), w = []; + this.setResponsive && this.setResponsive(!1); + a.setAnimation(b, this); + t && this.cloneRenderTo(); + for (this.layOutTitles(); l--;)if (b = e[l], b.options.stacking && (f = !0, b.isDirty)) { + n = !0; + break + } + if (n)for (l = v; l--;)b = e[l], b.options.stacking && (b.isDirty = !0); + p(e, function (a) { + a.isDirty && "point" === a.options.legendType && (a.updateTotals && a.updateTotals(), k = !0); + a.isDirtyData && m(a, "updatedData") + }); + k && d.options.enabled && (d.render(), this.isDirtyLegend = !1); + f && this.getStacks(); + y && p(c, function (a) { + a.updateNames(); + a.setScale() + }); + this.getMargins(); + y && (p(c, function (a) { + a.isDirty && (g = !0) + }), p(c, function (a) { + var b = a.min + "," + a.max; + a.extKey !== b && (a.extKey = b, w.push(function () { + m(a, "afterSetExtremes", C(a.eventArgs, a.getExtremes())); + delete a.eventArgs + })); + (g || f) && a.redraw() + })); + g && this.drawChartBox(); + m(this, "predraw"); + p(e, function (a) { + (g || a.isDirty) && a.visible && a.redraw(); + a.isDirtyData = !1 + }); + h && h.reset(!0); + q.draw(); + m(this, "redraw"); + m(this, "render"); + t && this.cloneRenderTo(!0); + p(w, function (a) { + a.call() + }) + }, get: function (a) { + function b(b) { + return b.id === a || b.options && b.options.id === a + } + + var c, e = this.series, h; + c = t(this.axes, b) || t(this.series, b); + for (h = 0; !c && h < e.length; h++)c = t(e[h].points || [], b); + return c + }, getAxes: function () { + var a = this, b = this.options, c = b.xAxis = k(b.xAxis || {}), b = b.yAxis = k(b.yAxis || + {}); + p(c, function (a, b) { + a.index = b; + a.isX = !0 + }); + p(b, function (a, b) { + a.index = b + }); + c = c.concat(b); + p(c, function (b) { + new g(a, b) + }) + }, getSelectedPoints: function () { + var a = []; + p(this.series, function (b) { + a = a.concat(n(b.points || [], function (a) { + return a.selected + })) + }); + return a + }, getSelectedSeries: function () { + return n(this.series, function (a) { + return a.selected + }) + }, setTitle: function (a, b, c) { + var e = this, h = e.options, d; + d = h.title = w({style: {color: "#333333", fontSize: h.isStock ? "16px" : "18px"}}, h.title, a); + h = h.subtitle = w({style: {color: "#666666"}}, + h.subtitle, b); + p([["title", a, d], ["subtitle", b, h]], function (a, b) { + var c = a[0], h = e[c], d = a[1]; + a = a[2]; + h && d && (e[c] = h = h.destroy()); + a && a.text && !h && (e[c] = e.renderer.text(a.text, 0, 0, a.useHTML).attr({ + align: a.align, + "class": "highcharts-" + c, + zIndex: a.zIndex || 4 + }).add(), e[c].update = function (a) { + e.setTitle(!b && a, b && a) + }, e[c].css(a.style)) + }); + e.layOutTitles(c) + }, layOutTitles: function (a) { + var b = 0, c, e = this.renderer, h = this.spacingBox; + p(["title", "subtitle"], function (a) { + var c = this[a], d = this.options[a], k; + c && (k = d.style.fontSize, + k = e.fontMetrics(k, c).b, c.css({width: (d.width || h.width + d.widthAdjust) + "px"}).align(C({y: b + k + ("title" === a ? -3 : 2)}, d), !1, "spacingBox"), d.floating || d.verticalAlign || (b = Math.ceil(b + c.getBBox().height))) + }, this); + c = this.titleOffset !== b; + this.titleOffset = b; + !this.isDirtyBox && c && (this.isDirtyBox = c, this.hasRendered && y(a, !0) && this.isDirtyBox && this.redraw()) + }, getChartSize: function () { + var a = this.options.chart, e = a.width, a = a.height, h = this.renderToClone || this.renderTo; + b(e) || (this.containerWidth = c(h, "width")); + b(a) || (this.containerHeight = + c(h, "height")); + this.chartWidth = Math.max(0, e || this.containerWidth || 600); + this.chartHeight = Math.max(0, a || this.containerHeight || 400) + }, cloneRenderTo: function (a) { + var b = this.renderToClone, c = this.container; + if (a) { + if (b) { + for (; b.childNodes.length;)this.renderTo.appendChild(b.firstChild); + l(b); + delete this.renderToClone + } + } else c && c.parentNode === this.renderTo && this.renderTo.removeChild(c), this.renderToClone = b = this.renderTo.cloneNode(0), d(b, { + position: "absolute", + top: "-9999px", + display: "block" + }), b.style.setProperty && + b.style.setProperty("display", "block", "important"), r.body.appendChild(b), c && b.appendChild(c) + }, setClassName: function (a) { + this.container.className = "highcharts-container " + (a || "") + }, getContainer: function () { + var b, c = this.options, h = c.chart, d, k; + b = this.renderTo; + var m = a.uniqueKey(), n; + b || (this.renderTo = b = h.renderTo); + e(b) && (this.renderTo = b = r.getElementById(b)); + b || a.error(13, !0); + d = J(G(b, "data-highcharts-chart")); + E(d) && q[d] && q[d].hasRendered && q[d].destroy(); + G(b, "data-highcharts-chart", this.index); + b.innerHTML = ""; + h.skipClone || b.offsetWidth || this.cloneRenderTo(); + this.getChartSize(); + d = this.chartWidth; + k = this.chartHeight; + n = C({ + position: "relative", + overflow: "hidden", + width: d + "px", + height: k + "px", + textAlign: "left", + lineHeight: "normal", + zIndex: 0, + "-webkit-tap-highlight-color": "rgba(0,0,0,0)" + }, h.style); + this.container = b = f("div", {id: m}, n, this.renderToClone || b); + this._cursor = b.style.cursor; + this.renderer = new (a[h.renderer] || S)(b, d, k, null, h.forExport, c.exporting && c.exporting.allowHTML); + this.setClassName(h.className); + this.renderer.setStyle(h.style); + this.renderer.chartIndex = this.index + }, getMargins: function (a) { + var c = this.spacing, e = this.margin, h = this.titleOffset; + this.resetMargins(); + h && !b(e[0]) && (this.plotTop = Math.max(this.plotTop, h + this.options.title.margin + c[0])); + this.legend.display && this.legend.adjustMargins(e, c); + this.extraMargin && (this[this.extraMargin.type] = (this[this.extraMargin.type] || 0) + this.extraMargin.value); + this.extraTopMargin && (this.plotTop += this.extraTopMargin); + a || this.getAxisMargins() + }, getAxisMargins: function () { + var a = this, c = a.axisOffset = + [0, 0, 0, 0], e = a.margin; + a.hasCartesianSeries && p(a.axes, function (a) { + a.visible && a.getOffset() + }); + p(F, function (h, d) { + b(e[d]) || (a[h] += c[d]) + }); + a.setChartSize() + }, reflow: function (a) { + var e = this, h = e.options.chart, d = e.renderTo, k = b(h.width), f = h.width || c(d, "width"), h = h.height || c(d, "height"), d = a ? a.target : N; + if (!k && !e.isPrinting && f && h && (d === N || d === r)) { + if (f !== e.containerWidth || h !== e.containerHeight)clearTimeout(e.reflowTimeout), e.reflowTimeout = P(function () { + e.container && e.setSize(void 0, void 0, !1) + }, a ? 100 : 0); + e.containerWidth = + f; + e.containerHeight = h + } + }, initReflow: function () { + var a = this, b; + b = B(N, "resize", function (b) { + a.reflow(b) + }); + B(a, "destroy", b) + }, setSize: function (b, c, e) { + var h = this, k = h.renderer; + h.isResizing += 1; + a.setAnimation(e, h); + h.oldChartHeight = h.chartHeight; + h.oldChartWidth = h.chartWidth; + void 0 !== b && (h.options.chart.width = b); + void 0 !== c && (h.options.chart.height = c); + h.getChartSize(); + b = k.globalAnimation; + (b ? A : d)(h.container, {width: h.chartWidth + "px", height: h.chartHeight + "px"}, b); + h.setChartSize(!0); + k.setSize(h.chartWidth, h.chartHeight, + e); + p(h.axes, function (a) { + a.isDirty = !0; + a.setScale() + }); + h.isDirtyLegend = !0; + h.isDirtyBox = !0; + h.layOutTitles(); + h.getMargins(); + h.redraw(e); + h.oldChartHeight = null; + m(h, "resize"); + P(function () { + h && m(h, "endResize", null, function () { + --h.isResizing + }) + }, H(b).duration) + }, setChartSize: function (a) { + var b = this.inverted, c = this.renderer, e = this.chartWidth, h = this.chartHeight, d = this.options.chart, k = this.spacing, f = this.clipOffset, m, n, y, g; + this.plotLeft = m = Math.round(this.plotLeft); + this.plotTop = n = Math.round(this.plotTop); + this.plotWidth = + y = Math.max(0, Math.round(e - m - this.marginRight)); + this.plotHeight = g = Math.max(0, Math.round(h - n - this.marginBottom)); + this.plotSizeX = b ? g : y; + this.plotSizeY = b ? y : g; + this.plotBorderWidth = d.plotBorderWidth || 0; + this.spacingBox = c.spacingBox = {x: k[3], y: k[0], width: e - k[3] - k[1], height: h - k[0] - k[2]}; + this.plotBox = c.plotBox = {x: m, y: n, width: y, height: g}; + e = 2 * Math.floor(this.plotBorderWidth / 2); + b = Math.ceil(Math.max(e, f[3]) / 2); + c = Math.ceil(Math.max(e, f[0]) / 2); + this.clipBox = { + x: b, y: c, width: Math.floor(this.plotSizeX - Math.max(e, f[1]) / + 2 - b), height: Math.max(0, Math.floor(this.plotSizeY - Math.max(e, f[2]) / 2 - c)) + }; + a || p(this.axes, function (a) { + a.setAxisSize(); + a.setAxisTranslation() + }) + }, resetMargins: function () { + var a = this, b = a.options.chart; + p(["margin", "spacing"], function (c) { + var e = b[c], h = z(e) ? e : [e, e, e, e]; + p(["Top", "Right", "Bottom", "Left"], function (e, d) { + a[c][d] = y(b[c + e], h[d]) + }) + }); + p(F, function (b, c) { + a[b] = y(a.margin[c], a.spacing[c]) + }); + a.axisOffset = [0, 0, 0, 0]; + a.clipOffset = [0, 0, 0, 0] + }, drawChartBox: function () { + var a = this.options.chart, b = this.renderer, c = + this.chartWidth, e = this.chartHeight, h = this.chartBackground, d = this.plotBackground, k = this.plotBorder, f, m = this.plotBGImage, n = a.backgroundColor, p = a.plotBackgroundColor, y = a.plotBackgroundImage, g, l = this.plotLeft, q = this.plotTop, t = this.plotWidth, w = this.plotHeight, x = this.plotBox, r = this.clipRect, z = this.clipBox, J = "animate"; + h || (this.chartBackground = h = b.rect().addClass("highcharts-background").add(), J = "attr"); + f = a.borderWidth || 0; + g = f + (a.shadow ? 8 : 0); + n = {fill: n || "none"}; + if (f || h["stroke-width"])n.stroke = a.borderColor, + n["stroke-width"] = f; + h.attr(n).shadow(a.shadow); + h[J]({x: g / 2, y: g / 2, width: c - g - f % 2, height: e - g - f % 2, r: a.borderRadius}); + J = "animate"; + d || (J = "attr", this.plotBackground = d = b.rect().addClass("highcharts-plot-background").add()); + d[J](x); + d.attr({fill: p || "none"}).shadow(a.plotShadow); + y && (m ? m.animate(x) : this.plotBGImage = b.image(y, l, q, t, w).add()); + r ? r.animate({width: z.width, height: z.height}) : this.clipRect = b.clipRect(z); + J = "animate"; + k || (J = "attr", this.plotBorder = k = b.rect().addClass("highcharts-plot-border").attr({zIndex: 1}).add()); + k.attr({stroke: a.plotBorderColor, "stroke-width": a.plotBorderWidth || 0, fill: "none"}); + k[J](k.crisp({x: l, y: q, width: t, height: w}, -k.strokeWidth())); + this.isDirtyBox = !1 + }, propFromSeries: function () { + var a = this, b = a.options.chart, c, e = a.options.series, h, d; + p(["inverted", "angular", "polar"], function (k) { + c = I[b.type || b.defaultSeriesType]; + d = b[k] || c && c.prototype[k]; + for (h = e && e.length; !d && h--;)(c = I[e[h].type]) && c.prototype[k] && (d = !0); + a[k] = d + }) + }, linkSeries: function () { + var a = this, b = a.series; + p(b, function (a) { + a.linkedSeries.length = + 0 + }); + p(b, function (b) { + var c = b.options.linkedTo; + e(c) && (c = ":previous" === c ? a.series[b.index - 1] : a.get(c)) && c.linkedParent !== b && (c.linkedSeries.push(b), b.linkedParent = c, b.visible = y(b.options.visible, c.options.visible, b.visible)) + }) + }, renderSeries: function () { + p(this.series, function (a) { + a.translate(); + a.render() + }) + }, renderLabels: function () { + var a = this, b = a.options.labels; + b.items && p(b.items, function (c) { + var e = C(b.style, c.style), h = J(e.left) + a.plotLeft, d = J(e.top) + a.plotTop + 12; + delete e.left; + delete e.top; + a.renderer.text(c.html, + h, d).attr({zIndex: 2}).css(e).add() + }) + }, render: function () { + var a = this.axes, b = this.renderer, c = this.options, e, h, d; + this.setTitle(); + this.legend = new x(this, c.legend); + this.getStacks && this.getStacks(); + this.getMargins(!0); + this.setChartSize(); + c = this.plotWidth; + e = this.plotHeight -= 21; + p(a, function (a) { + a.setScale() + }); + this.getAxisMargins(); + h = 1.1 < c / this.plotWidth; + d = 1.05 < e / this.plotHeight; + if (h || d)p(a, function (a) { + (a.horiz && h || !a.horiz && d) && a.setTickInterval(!0) + }), this.getMargins(); + this.drawChartBox(); + this.hasCartesianSeries && + p(a, function (a) { + a.visible && a.render() + }); + this.seriesGroup || (this.seriesGroup = b.g("series-group").attr({zIndex: 3}).add()); + this.renderSeries(); + this.renderLabels(); + this.addCredits(); + this.setResponsive && this.setResponsive(); + this.hasRendered = !0 + }, addCredits: function (a) { + var b = this; + a = w(!0, this.options.credits, a); + a.enabled && !this.credits && (this.credits = this.renderer.text(a.text + (this.mapCredits || ""), 0, 0).addClass("highcharts-credits").on("click", function () { + a.href && (N.location.href = a.href) + }).attr({ + align: a.position.align, + zIndex: 8 + }).css(a.style).add().align(a.position), this.credits.update = function (a) { + b.credits = b.credits.destroy(); + b.addCredits(a) + }) + }, destroy: function () { + var b = this, c = b.axes, e = b.series, h = b.container, d, k = h && h.parentNode; + m(b, "destroy"); + q[b.index] = void 0; + a.chartCount--; + b.renderTo.removeAttribute("data-highcharts-chart"); + K(b); + for (d = c.length; d--;)c[d] = c[d].destroy(); + this.scroller && this.scroller.destroy && this.scroller.destroy(); + for (d = e.length; d--;)e[d] = e[d].destroy(); + p("title subtitle chartBackground plotBackground plotBGImage plotBorder seriesGroup clipRect credits pointer rangeSelector legend resetZoomButton tooltip renderer".split(" "), + function (a) { + var c = b[a]; + c && c.destroy && (b[a] = c.destroy()) + }); + h && (h.innerHTML = "", K(h), k && l(h)); + for (d in b)delete b[d] + }, isReadyToRender: function () { + var a = this; + return D || N != N.top || "complete" === r.readyState ? !0 : (r.attachEvent("onreadystatechange", function () { + r.detachEvent("onreadystatechange", a.firstRender); + "complete" === r.readyState && a.firstRender() + }), !1) + }, firstRender: function () { + var a = this, b = a.options; + if (a.isReadyToRender()) { + a.getContainer(); + m(a, "init"); + a.resetMargins(); + a.setChartSize(); + a.propFromSeries(); + a.getAxes(); + p(b.series || [], function (b) { + a.initSeries(b) + }); + a.linkSeries(); + m(a, "beforeRender"); + h && (a.pointer = new h(a, b)); + a.render(); + if (!a.renderer.imgCount && a.onload)a.onload(); + a.cloneRenderTo(!0) + } + }, onload: function () { + p([this.callback].concat(this.callbacks), function (a) { + a && void 0 !== this.index && a.apply(this, [this]) + }, this); + m(this, "load"); + m(this, "render"); + b(this.index) && !1 !== this.options.chart.reflow && this.initReflow(); + this.onload = null + } + } + })(L); + (function (a) { + var B, A = a.each, H = a.extend, G = a.erase, r = a.fireEvent, + g = a.format, f = a.isArray, u = a.isNumber, l = a.pick, q = a.removeEvent; + B = a.Point = function () { + }; + B.prototype = { + init: function (a, b, f) { + this.series = a; + this.color = a.color; + this.applyOptions(b, f); + a.options.colorByPoint ? (b = a.options.colors || a.chart.options.colors, this.color = this.color || b[a.colorCounter], b = b.length, f = a.colorCounter, a.colorCounter++, a.colorCounter === b && (a.colorCounter = 0)) : f = a.colorIndex; + this.colorIndex = l(this.colorIndex, f); + a.chart.pointCount++; + return this + }, applyOptions: function (a, b) { + var d = this.series, f = d.options.pointValKey || + d.pointValKey; + a = B.prototype.optionsToObject.call(this, a); + H(this, a); + this.options = this.options ? H(this.options, a) : a; + a.group && delete this.group; + f && (this.y = this[f]); + this.isNull = l(this.isValid && !this.isValid(), null === this.x || !u(this.y, !0)); + this.selected && (this.state = "select"); + "name" in this && void 0 === b && d.xAxis && d.xAxis.hasNames && (this.x = d.xAxis.nameToX(this)); + void 0 === this.x && d && (this.x = void 0 === b ? d.autoIncrement(this) : b); + return this + }, optionsToObject: function (a) { + var b = {}, d = this.series, g = d.options.keys, + l = g || d.pointArrayMap || ["y"], m = l.length, c = 0, n = 0; + if (u(a) || null === a)b[l[0]] = a; else if (f(a))for (!g && a.length > m && (d = typeof a[0], "string" === d ? b.name = a[0] : "number" === d && (b.x = a[0]), c++); n < m;)g && void 0 === a[c] || (b[l[n]] = a[c]), c++, n++; else"object" === typeof a && (b = a, a.dataLabels && (d._hasPointLabels = !0), a.marker && (d._hasPointMarkers = !0)); + return b + }, getClassName: function () { + return "highcharts-point" + (this.selected ? " highcharts-point-select" : "") + (this.negative ? " highcharts-negative" : "") + (this.isNull ? " highcharts-null-point" : + "") + (void 0 !== this.colorIndex ? " highcharts-color-" + this.colorIndex : "") + (this.options.className ? " " + this.options.className : "") + (this.zone && this.zone.className ? " " + this.zone.className.replace("highcharts-negative", "") : "") + }, getZone: function () { + var a = this.series, b = a.zones, a = a.zoneAxis || "y", f = 0, g; + for (g = b[f]; this[a] >= g.value;)g = b[++f]; + g && g.color && !this.options.color && (this.color = g.color); + return g + }, destroy: function () { + var a = this.series.chart, b = a.hoverPoints, f; + a.pointCount--; + b && (this.setState(), G(b, this), b.length || + (a.hoverPoints = null)); + if (this === a.hoverPoint)this.onMouseOut(); + if (this.graphic || this.dataLabel)q(this), this.destroyElements(); + this.legendItem && a.legend.destroyItem(this); + for (f in this)this[f] = null + }, destroyElements: function () { + for (var a = ["graphic", "dataLabel", "dataLabelUpper", "connector", "shadowGroup"], b, f = 6; f--;)b = a[f], this[b] && (this[b] = this[b].destroy()) + }, getLabelConfig: function () { + return { + x: this.category, + y: this.y, + color: this.color, + colorIndex: this.colorIndex, + key: this.name || this.category, + series: this.series, + point: this, + percentage: this.percentage, + total: this.total || this.stackTotal + } + }, tooltipFormatter: function (a) { + var b = this.series, d = b.tooltipOptions, f = l(d.valueDecimals, ""), q = d.valuePrefix || "", m = d.valueSuffix || ""; + A(b.pointArrayMap || ["y"], function (b) { + b = "{point." + b; + if (q || m)a = a.replace(b + "}", q + b + "}" + m); + a = a.replace(b + "}", b + ":,." + f + "f}") + }); + return g(a, {point: this, series: this.series}) + }, firePointEvent: function (a, b, f) { + var d = this, g = this.series.options; + (g.point.events[a] || d.options && d.options.events && d.options.events[a]) && + this.importEvents(); + "click" === a && g.allowPointSelect && (f = function (a) { + d.select && d.select(null, a.ctrlKey || a.metaKey || a.shiftKey) + }); + r(this, a, b, f) + }, visible: !0 + } + })(L); + (function (a) { + var B = a.addEvent, A = a.animObject, H = a.arrayMax, G = a.arrayMin, r = a.correctFloat, g = a.Date, f = a.defaultOptions, u = a.defaultPlotOptions, l = a.defined, q = a.each, d = a.erase, b = a.extend, p = a.fireEvent, C = a.grep, t = a.isArray, m = a.isNumber, c = a.isString, n = a.merge, E = a.pick, z = a.removeEvent, e = a.splat, x = a.SVGElement, F = a.syncTimeout, w = a.win; + a.Series = a.seriesType("line", + null, { + lineWidth: 2, + allowPointSelect: !1, + showCheckbox: !1, + animation: {duration: 1E3}, + events: {}, + marker: { + lineWidth: 0, + lineColor: "#ffffff", + radius: 4, + states: { + hover: {animation: {duration: 50}, enabled: !0, radiusPlus: 2, lineWidthPlus: 1}, + select: {fillColor: "#cccccc", lineColor: "#000000", lineWidth: 2} + } + }, + point: {events: {}}, + dataLabels: { + align: "center", + formatter: function () { + return null === this.y ? "" : a.numberFormat(this.y, -1) + }, + style: {fontSize: "11px", fontWeight: "bold", color: "contrast", textOutline: "1px contrast"}, + verticalAlign: "bottom", + x: 0, + y: 0, + padding: 5 + }, + cropThreshold: 300, + pointRange: 0, + softThreshold: !0, + states: {hover: {lineWidthPlus: 1, marker: {}, halo: {size: 10, opacity: .25}}, select: {marker: {}}}, + stickyTracking: !0, + turboThreshold: 1E3 + }, { + isCartesian: !0, + pointClass: a.Point, + sorted: !0, + requireSorting: !0, + directTouch: !1, + axisTypes: ["xAxis", "yAxis"], + colorCounter: 0, + parallelArrays: ["x", "y"], + coll: "series", + init: function (a, c) { + var e = this, h, d, k = a.series, f; + e.chart = a; + e.options = c = e.setOptions(c); + e.linkedSeries = []; + e.bindAxes(); + b(e, { + name: c.name, state: "", visible: !1 !== + c.visible, selected: !0 === c.selected + }); + d = c.events; + for (h in d)B(e, h, d[h]); + if (d && d.click || c.point && c.point.events && c.point.events.click || c.allowPointSelect)a.runTrackerClick = !0; + e.getColor(); + e.getSymbol(); + q(e.parallelArrays, function (a) { + e[a + "Data"] = [] + }); + e.setData(c.data, !1); + e.isCartesian && (a.hasCartesianSeries = !0); + k.length && (f = k[k.length - 1]); + e._i = E(f && f._i, -1) + 1; + a.orderSeries(this.insert(k)) + }, + insert: function (a) { + var b = this.options.index, c; + if (m(b)) { + for (c = a.length; c--;)if (b >= E(a[c].options.index, a[c]._i)) { + a.splice(c + + 1, 0, this); + break + } + -1 === c && a.unshift(this); + c += 1 + } else a.push(this); + return E(c, a.length - 1) + }, + bindAxes: function () { + var b = this, c = b.options, e = b.chart, d; + q(b.axisTypes || [], function (h) { + q(e[h], function (a) { + d = a.options; + if (c[h] === d.index || void 0 !== c[h] && c[h] === d.id || void 0 === c[h] && 0 === d.index)b.insert(a.series), b[h] = a, a.isDirty = !0 + }); + b[h] || b.optionalAxis === h || a.error(18, !0) + }) + }, + updateParallelArrays: function (a, b) { + var c = a.series, e = arguments, h = m(b) ? function (e) { + var h = "y" === e && c.toYData ? c.toYData(a) : a[e]; + c[e + "Data"][b] = + h + } : function (a) { + Array.prototype[b].apply(c[a + "Data"], Array.prototype.slice.call(e, 2)) + }; + q(c.parallelArrays, h) + }, + autoIncrement: function () { + var a = this.options, b = this.xIncrement, c, e = a.pointIntervalUnit, b = E(b, a.pointStart, 0); + this.pointInterval = c = E(this.pointInterval, a.pointInterval, 1); + e && (a = new g(b), "day" === e ? a = +a[g.hcSetDate](a[g.hcGetDate]() + c) : "month" === e ? a = +a[g.hcSetMonth](a[g.hcGetMonth]() + c) : "year" === e && (a = +a[g.hcSetFullYear](a[g.hcGetFullYear]() + c)), c = a - b); + this.xIncrement = b + c; + return b + }, + setOptions: function (a) { + var b = + this.chart, c = b.options.plotOptions, b = b.userOptions || {}, e = b.plotOptions || {}, h = c[this.type]; + this.userOptions = a; + c = n(h, c.series, a); + this.tooltipOptions = n(f.tooltip, f.plotOptions[this.type].tooltip, b.tooltip, e.series && e.series.tooltip, e[this.type] && e[this.type].tooltip, a.tooltip); + null === h.marker && delete c.marker; + this.zoneAxis = c.zoneAxis; + a = this.zones = (c.zones || []).slice(); + !c.negativeColor && !c.negativeFillColor || c.zones || a.push({ + value: c[this.zoneAxis + "Threshold"] || c.threshold || 0, className: "highcharts-negative", + color: c.negativeColor, fillColor: c.negativeFillColor + }); + a.length && l(a[a.length - 1].value) && a.push({color: this.color, fillColor: this.fillColor}); + return c + }, + getCyclic: function (a, b, c) { + var e, h = this.chart, d = this.userOptions, f = a + "Index", n = a + "Counter", m = c ? c.length : E(h.options.chart[a + "Count"], h[a + "Count"]); + b || (e = E(d[f], d["_" + f]), l(e) || (h.series.length || (h[n] = 0), d["_" + f] = e = h[n] % m, h[n] += 1), c && (b = c[e])); + void 0 !== e && (this[f] = e); + this[a] = b + }, + getColor: function () { + this.options.colorByPoint ? this.options.color = null : this.getCyclic("color", + this.options.color || u[this.type].color, this.chart.options.colors) + }, + getSymbol: function () { + this.getCyclic("symbol", this.options.marker.symbol, this.chart.options.symbols) + }, + drawLegendSymbol: a.LegendSymbolMixin.drawLineMarker, + setData: function (b, e, d, f) { + var h = this, k = h.points, n = k && k.length || 0, g, p = h.options, y = h.chart, l = null, w = h.xAxis, x = p.turboThreshold, r = this.xData, z = this.yData, F = (g = h.pointArrayMap) && g.length; + b = b || []; + g = b.length; + e = E(e, !0); + if (!1 !== f && g && n === g && !h.cropped && !h.hasGroupedData && h.visible)q(b, function (a, + b) { + k[b].update && a !== p.data[b] && k[b].update(a, !1, null, !1) + }); else { + h.xIncrement = null; + h.colorCounter = 0; + q(this.parallelArrays, function (a) { + h[a + "Data"].length = 0 + }); + if (x && g > x) { + for (d = 0; null === l && d < g;)l = b[d], d++; + if (m(l))for (d = 0; d < g; d++)r[d] = this.autoIncrement(), z[d] = b[d]; else if (t(l))if (F)for (d = 0; d < g; d++)l = b[d], r[d] = l[0], z[d] = l.slice(1, F + 1); else for (d = 0; d < g; d++)l = b[d], r[d] = l[0], z[d] = l[1]; else a.error(12) + } else for (d = 0; d < g; d++)void 0 !== b[d] && (l = {series: h}, h.pointClass.prototype.applyOptions.apply(l, [b[d]]), h.updateParallelArrays(l, + d)); + c(z[0]) && a.error(14, !0); + h.data = []; + h.options.data = h.userOptions.data = b; + for (d = n; d--;)k[d] && k[d].destroy && k[d].destroy(); + w && (w.minRange = w.userMinRange); + h.isDirty = y.isDirtyBox = !0; + h.isDirtyData = !!k; + d = !1 + } + "point" === p.legendType && (this.processData(), this.generatePoints()); + e && y.redraw(d) + }, + processData: function (b) { + var c = this.xData, e = this.yData, h = c.length, d; + d = 0; + var k, f, n = this.xAxis, m, g = this.options; + m = g.cropThreshold; + var p = this.getExtremesFromAll || g.getExtremesFromAll, l = this.isCartesian, g = n && n.val2lin, q = n && + n.isLog, t, w; + if (l && !this.isDirty && !n.isDirty && !this.yAxis.isDirty && !b)return !1; + n && (b = n.getExtremes(), t = b.min, w = b.max); + if (l && this.sorted && !p && (!m || h > m || this.forceCrop))if (c[h - 1] < t || c[0] > w)c = [], e = []; else if (c[0] < t || c[h - 1] > w)d = this.cropData(this.xData, this.yData, t, w), c = d.xData, e = d.yData, d = d.start, k = !0; + for (m = c.length || 1; --m;)h = q ? g(c[m]) - g(c[m - 1]) : c[m] - c[m - 1], 0 < h && (void 0 === f || h < f) ? f = h : 0 > h && this.requireSorting && a.error(15); + this.cropped = k; + this.cropStart = d; + this.processedXData = c; + this.processedYData = e; + this.closestPointRange = + f + }, + cropData: function (a, b, c, e) { + var h = a.length, d = 0, f = h, n = E(this.cropShoulder, 1), m; + for (m = 0; m < h; m++)if (a[m] >= c) { + d = Math.max(0, m - n); + break + } + for (c = m; c < h; c++)if (a[c] > e) { + f = c + n; + break + } + return {xData: a.slice(d, f), yData: b.slice(d, f), start: d, end: f} + }, + generatePoints: function () { + var a = this.options.data, b = this.data, c, d = this.processedXData, f = this.processedYData, k = this.pointClass, n = d.length, m = this.cropStart || 0, g, p = this.hasGroupedData, l, q = [], t; + b || p || (b = [], b.length = a.length, b = this.data = b); + for (t = 0; t < n; t++)g = m + t, p ? (l = (new k).init(this, + [d[t]].concat(e(f[t]))), l.dataGroup = this.groupMap[t]) : (l = b[g]) || void 0 === a[g] || (b[g] = l = (new k).init(this, a[g], d[t])), l.index = g, q[t] = l; + if (b && (n !== (c = b.length) || p))for (t = 0; t < c; t++)t !== m || p || (t += n), b[t] && (b[t].destroyElements(), b[t].plotX = void 0); + this.data = b; + this.points = q + }, + getExtremes: function (a) { + var b = this.yAxis, c = this.processedXData, e, h = [], d = 0; + e = this.xAxis.getExtremes(); + var f = e.min, n = e.max, g, p, l, q; + a = a || this.stackedYData || this.processedYData || []; + e = a.length; + for (q = 0; q < e; q++)if (p = c[q], l = a[q], g = (m(l, !0) || + t(l)) && (!b.isLog || l.length || 0 < l), p = this.getExtremesFromAll || this.options.getExtremesFromAll || this.cropped || (c[q + 1] || p) >= f && (c[q - 1] || p) <= n, g && p)if (g = l.length)for (; g--;)null !== l[g] && (h[d++] = l[g]); else h[d++] = l; + this.dataMin = G(h); + this.dataMax = H(h) + }, + translate: function () { + this.processedXData || this.processData(); + this.generatePoints(); + var a = this.options, b = a.stacking, c = this.xAxis, e = c.categories, d = this.yAxis, k = this.points, f = k.length, n = !!this.modifyValue, g = a.pointPlacement, p = "between" === g || m(g), q = a.threshold, + t = a.startFromThreshold ? q : 0, w, x, z, F, u = Number.MAX_VALUE; + "between" === g && (g = .5); + m(g) && (g *= E(a.pointRange || c.pointRange)); + for (a = 0; a < f; a++) { + var C = k[a], A = C.x, B = C.y; + x = C.low; + var H = b && d.stacks[(this.negStacks && B < (t ? 0 : q) ? "-" : "") + this.stackKey], G; + d.isLog && null !== B && 0 >= B && (C.isNull = !0); + C.plotX = w = r(Math.min(Math.max(-1E5, c.translate(A, 0, 0, 0, 1, g, "flags" === this.type)), 1E5)); + b && this.visible && !C.isNull && H && H[A] && (F = this.getStackIndicator(F, A, this.index), G = H[A], B = G.points[F.key], x = B[0], B = B[1], x === t && F.key === H[A].base && + (x = E(q, d.min)), d.isLog && 0 >= x && (x = null), C.total = C.stackTotal = G.total, C.percentage = G.total && C.y / G.total * 100, C.stackY = B, G.setOffset(this.pointXOffset || 0, this.barW || 0)); + C.yBottom = l(x) ? d.translate(x, 0, 1, 0, 1) : null; + n && (B = this.modifyValue(B, C)); + C.plotY = x = "number" === typeof B && Infinity !== B ? Math.min(Math.max(-1E5, d.translate(B, 0, 1, 0, 1)), 1E5) : void 0; + C.isInside = void 0 !== x && 0 <= x && x <= d.len && 0 <= w && w <= c.len; + C.clientX = p ? r(c.translate(A, 0, 0, 0, 1, g)) : w; + C.negative = C.y < (q || 0); + C.category = e && void 0 !== e[C.x] ? e[C.x] : C.x; + C.isNull || + (void 0 !== z && (u = Math.min(u, Math.abs(w - z))), z = w); + C.zone = this.zones.length && C.getZone() + } + this.closestPointRangePx = u + }, + getValidPoints: function (a, b) { + var c = this.chart; + return C(a || this.points || [], function (a) { + return b && !c.isInsidePlot(a.plotX, a.plotY, c.inverted) ? !1 : !a.isNull + }) + }, + setClip: function (a) { + var b = this.chart, c = this.options, e = b.renderer, d = b.inverted, h = this.clipBox, f = h || b.clipBox, n = this.sharedClipKey || ["_sharedClip", a && a.duration, a && a.easing, f.height, c.xAxis, c.yAxis].join(), m = b[n], g = b[n + "m"]; + m || (a && (f.width = + 0, b[n + "m"] = g = e.clipRect(-99, d ? -b.plotLeft : -b.plotTop, 99, d ? b.chartWidth : b.chartHeight)), b[n] = m = e.clipRect(f), m.count = {length: 0}); + a && !m.count[this.index] && (m.count[this.index] = !0, m.count.length += 1); + !1 !== c.clip && (this.group.clip(a || h ? m : b.clipRect), this.markerGroup.clip(g), this.sharedClipKey = n); + a || (m.count[this.index] && (delete m.count[this.index], --m.count.length), 0 === m.count.length && n && b[n] && (h || (b[n] = b[n].destroy()), b[n + "m"] && (this.markerGroup.clip(), b[n + "m"] = b[n + "m"].destroy()))) + }, + animate: function (a) { + var b = + this.chart, c = A(this.options.animation), e; + a ? this.setClip(c) : (e = this.sharedClipKey, (a = b[e]) && a.animate({width: b.plotSizeX}, c), b[e + "m"] && b[e + "m"].animate({width: b.plotSizeX + 99}, c), this.animate = null) + }, + afterAnimate: function () { + this.setClip(); + p(this, "afterAnimate") + }, + drawPoints: function () { + var a = this.points, b = this.chart, c, e, d, k, f = this.options.marker, n, g, p, l, q = this.markerGroup, t = E(f.enabled, this.xAxis.isRadial ? !0 : null, this.closestPointRangePx > 2 * f.radius); + if (!1 !== f.enabled || this._hasPointMarkers)for (e = 0; e < a.length; e++)d = + a[e], c = d.plotY, k = d.graphic, n = d.marker || {}, g = !!d.marker, p = t && void 0 === n.enabled || n.enabled, l = d.isInside, p && m(c) && null !== d.y ? (c = E(n.symbol, this.symbol), d.hasImage = 0 === c.indexOf("url"), p = this.markerAttribs(d, d.selected && "select"), k ? k[l ? "show" : "hide"](!0).animate(p) : l && (0 < p.width || d.hasImage) && (d.graphic = k = b.renderer.symbol(c, p.x, p.y, p.width, p.height, g ? n : f).add(q)), k && k.attr(this.pointAttribs(d, d.selected && "select")), k && k.addClass(d.getClassName(), !0)) : k && (d.graphic = k.destroy()) + }, + markerAttribs: function (a, + b) { + var c = this.options.marker, e = a.marker || {}, d = E(e.radius, c.radius); + b && (c = c.states[b], b = e.states && e.states[b], d = E(b && b.radius, c && c.radius, d + (c && c.radiusPlus || 0))); + a.hasImage && (d = 0); + a = {x: Math.floor(a.plotX) - d, y: a.plotY - d}; + d && (a.width = a.height = 2 * d); + return a + }, + pointAttribs: function (a, b) { + var c = this.options.marker, e = a && a.options, d = e && e.marker || {}, h = this.color, f = e && e.color, n = a && a.color, e = E(d.lineWidth, c.lineWidth); + a = a && a.zone && a.zone.color; + h = f || a || n || h; + a = d.fillColor || c.fillColor || h; + h = d.lineColor || c.lineColor || + h; + b && (c = c.states[b], b = d.states && d.states[b] || {}, e = E(b.lineWidth, c.lineWidth, e + E(b.lineWidthPlus, c.lineWidthPlus, 0)), a = b.fillColor || c.fillColor || a, h = b.lineColor || c.lineColor || h); + return {stroke: h, "stroke-width": e, fill: a} + }, + destroy: function () { + var a = this, b = a.chart, c = /AppleWebKit\/533/.test(w.navigator.userAgent), e, f = a.data || [], k, n, m; + p(a, "destroy"); + z(a); + q(a.axisTypes || [], function (b) { + (m = a[b]) && m.series && (d(m.series, a), m.isDirty = m.forceRedraw = !0) + }); + a.legendItem && a.chart.legend.destroyItem(a); + for (e = f.length; e--;)(k = + f[e]) && k.destroy && k.destroy(); + a.points = null; + clearTimeout(a.animationTimeout); + for (n in a)a[n] instanceof x && !a[n].survive && (e = c && "group" === n ? "hide" : "destroy", a[n][e]()); + b.hoverSeries === a && (b.hoverSeries = null); + d(b.series, a); + b.orderSeries(); + for (n in a)delete a[n] + }, + getGraphPath: function (a, b, c) { + var e = this, d = e.options, h = d.step, f, n = [], m = [], g; + a = a || e.points; + (f = a.reversed) && a.reverse(); + (h = {right: 1, center: 2}[h] || h && 3) && f && (h = 4 - h); + !d.connectNulls || b || c || (a = this.getValidPoints(a)); + q(a, function (f, k) { + var p = f.plotX, + q = f.plotY, t = a[k - 1]; + (f.leftCliff || t && t.rightCliff) && !c && (g = !0); + f.isNull && !l(b) && 0 < k ? g = !d.connectNulls : f.isNull && !b ? g = !0 : (0 === k || g ? k = ["M", f.plotX, f.plotY] : e.getPointSpline ? k = e.getPointSpline(a, f, k) : h ? (k = 1 === h ? ["L", t.plotX, q] : 2 === h ? ["L", (t.plotX + p) / 2, t.plotY, "L", (t.plotX + p) / 2, q] : ["L", p, t.plotY], k.push("L", p, q)) : k = ["L", p, q], m.push(f.x), h && m.push(f.x), n.push.apply(n, k), g = !1) + }); + n.xMap = m; + return e.graphPath = n + }, + drawGraph: function () { + var a = this, b = this.options, c = (this.gappedPath || this.getGraphPath).call(this), + e = [["graph", "highcharts-graph", b.lineColor || this.color, b.dashStyle]]; + q(this.zones, function (c, d) { + e.push(["zone-graph-" + d, "highcharts-graph highcharts-zone-graph-" + d + " " + (c.className || ""), c.color || a.color, c.dashStyle || b.dashStyle]) + }); + q(e, function (e, d) { + var h = e[0], f = a[h]; + f ? (f.endX = c.xMap, f.animate({d: c})) : c.length && (a[h] = a.chart.renderer.path(c).addClass(e[1]).attr({zIndex: 1}).add(a.group), f = { + stroke: e[2], + "stroke-width": b.lineWidth, + fill: a.fillGraph && a.color || "none" + }, e[3] ? f.dashstyle = e[3] : "square" !== b.linecap && + (f["stroke-linecap"] = f["stroke-linejoin"] = "round"), f = a[h].attr(f).shadow(2 > d && b.shadow)); + f && (f.startX = c.xMap, f.isArea = c.isArea) + }) + }, + applyZones: function () { + var a = this, b = this.chart, c = b.renderer, e = this.zones, d, f, n = this.clips || [], m, g = this.graph, p = this.area, l = Math.max(b.chartWidth, b.chartHeight), t = this[(this.zoneAxis || "y") + "Axis"], w, x, r = b.inverted, z, F, u, C, A = !1; + e.length && (g || p) && t && void 0 !== t.min && (x = t.reversed, z = t.horiz, g && g.hide(), p && p.hide(), w = t.getExtremes(), q(e, function (e, h) { + d = x ? z ? b.plotWidth : 0 : z ? 0 : + t.toPixels(w.min); + d = Math.min(Math.max(E(f, d), 0), l); + f = Math.min(Math.max(Math.round(t.toPixels(E(e.value, w.max), !0)), 0), l); + A && (d = f = t.toPixels(w.max)); + F = Math.abs(d - f); + u = Math.min(d, f); + C = Math.max(d, f); + t.isXAxis ? (m = { + x: r ? C : u, + y: 0, + width: F, + height: l + }, z || (m.x = b.plotHeight - m.x)) : (m = { + x: 0, + y: r ? C : u, + width: l, + height: F + }, z && (m.y = b.plotWidth - m.y)); + r && c.isVML && (m = t.isXAxis ? { + x: 0, + y: x ? u : C, + height: m.width, + width: b.chartWidth + } : {x: m.y - b.plotLeft - b.spacingBox.x, y: 0, width: m.height, height: b.chartHeight}); + n[h] ? n[h].animate(m) : (n[h] = + c.clipRect(m), g && a["zone-graph-" + h].clip(n[h]), p && a["zone-area-" + h].clip(n[h])); + A = e.value > w.max + }), this.clips = n) + }, + invertGroups: function (a) { + function b() { + q(["group", "markerGroup"], function (b) { + c[b] && (c[b].width = c.yAxis.len, c[b].height = c.xAxis.len, c[b].invert(a)) + }) + } + + var c = this, e; + c.xAxis && (e = B(c.chart, "resize", b), B(c, "destroy", e), b(a), c.invertGroups = b) + }, + plotGroup: function (a, b, c, e, d) { + var h = this[a], f = !h; + f && (this[a] = h = this.chart.renderer.g(b).attr({zIndex: e || .1}).add(d), h.addClass("highcharts-series-" + this.index + + " highcharts-" + this.type + "-series highcharts-color-" + this.colorIndex + " " + (this.options.className || ""))); + h.attr({visibility: c})[f ? "attr" : "animate"](this.getPlotBox()); + return h + }, + getPlotBox: function () { + var a = this.chart, b = this.xAxis, c = this.yAxis; + a.inverted && (b = c, c = this.xAxis); + return { + translateX: b ? b.left : a.plotLeft, + translateY: c ? c.top : a.plotTop, + scaleX: 1, + scaleY: 1 + } + }, + render: function () { + var a = this, b = a.chart, c, e = a.options, d = !!a.animate && b.renderer.isSVG && A(e.animation).duration, f = a.visible ? "inherit" : "hidden", n = + e.zIndex, m = a.hasRendered, g = b.seriesGroup, p = b.inverted; + c = a.plotGroup("group", "series", f, n, g); + a.markerGroup = a.plotGroup("markerGroup", "markers", f, n, g); + d && a.animate(!0); + c.inverted = a.isCartesian ? p : !1; + a.drawGraph && (a.drawGraph(), a.applyZones()); + a.drawDataLabels && a.drawDataLabels(); + a.visible && a.drawPoints(); + a.drawTracker && !1 !== a.options.enableMouseTracking && a.drawTracker(); + a.invertGroups(p); + !1 === e.clip || a.sharedClipKey || m || c.clip(b.clipRect); + d && a.animate(); + m || (a.animationTimeout = F(function () { + a.afterAnimate() + }, + d)); + a.isDirty = !1; + a.hasRendered = !0 + }, + redraw: function () { + var a = this.chart, b = this.isDirty || this.isDirtyData, c = this.group, e = this.xAxis, d = this.yAxis; + c && (a.inverted && c.attr({ + width: a.plotWidth, + height: a.plotHeight + }), c.animate({translateX: E(e && e.left, a.plotLeft), translateY: E(d && d.top, a.plotTop)})); + this.translate(); + this.render(); + b && delete this.kdTree + }, + kdDimensions: 1, + kdAxisArray: ["clientX", "plotY"], + searchPoint: function (a, b) { + var c = this.xAxis, e = this.yAxis, d = this.chart.inverted; + return this.searchKDTree({ + clientX: d ? + c.len - a.chartY + c.pos : a.chartX - c.pos, + plotY: d ? e.len - a.chartX + e.pos : a.chartY - e.pos + }, b) + }, + buildKDTree: function () { + function a(c, e, d) { + var h, f; + if (f = c && c.length)return h = b.kdAxisArray[e % d], c.sort(function (a, b) { + return a[h] - b[h] + }), f = Math.floor(f / 2), { + point: c[f], + left: a(c.slice(0, f), e + 1, d), + right: a(c.slice(f + 1), e + 1, d) + } + } + + this.buildingKdTree = !0; + var b = this, c = b.kdDimensions; + delete b.kdTree; + F(function () { + b.kdTree = a(b.getValidPoints(null, !b.directTouch), c, c); + b.buildingKdTree = !1 + }, b.options.kdNow ? 0 : 1) + }, + searchKDTree: function (a, + b) { + function c(a, b, k, n) { + var m = b.point, g = e.kdAxisArray[k % n], p, t, q = m; + t = l(a[d]) && l(m[d]) ? Math.pow(a[d] - m[d], 2) : null; + p = l(a[h]) && l(m[h]) ? Math.pow(a[h] - m[h], 2) : null; + p = (t || 0) + (p || 0); + m.dist = l(p) ? Math.sqrt(p) : Number.MAX_VALUE; + m.distX = l(t) ? Math.sqrt(t) : Number.MAX_VALUE; + g = a[g] - m[g]; + p = 0 > g ? "left" : "right"; + t = 0 > g ? "right" : "left"; + b[p] && (p = c(a, b[p], k + 1, n), q = p[f] < q[f] ? p : m); + b[t] && Math.sqrt(g * g) < q[f] && (a = c(a, b[t], k + 1, n), q = a[f] < q[f] ? a : q); + return q + } + + var e = this, d = this.kdAxisArray[0], h = this.kdAxisArray[1], f = b ? "distX" : "dist"; + this.kdTree || this.buildingKdTree || this.buildKDTree(); + if (this.kdTree)return c(a, this.kdTree, this.kdDimensions, this.kdDimensions) + } + }) + })(L); + (function (a) { + function B(a, d, b, f, g) { + var p = a.chart.inverted; + this.axis = a; + this.isNegative = b; + this.options = d; + this.x = f; + this.total = null; + this.points = {}; + this.stack = g; + this.rightCliff = this.leftCliff = 0; + this.alignOptions = { + align: d.align || (p ? b ? "left" : "right" : "center"), + verticalAlign: d.verticalAlign || (p ? "middle" : b ? "bottom" : "top"), + y: l(d.y, p ? 4 : b ? 14 : -6), + x: l(d.x, p ? b ? -6 : 6 : 0) + }; + this.textAlign = + d.textAlign || (p ? b ? "right" : "left" : "center") + } + + var A = a.Axis, H = a.Chart, G = a.correctFloat, r = a.defined, g = a.destroyObjectProperties, f = a.each, u = a.format, l = a.pick; + a = a.Series; + B.prototype = { + destroy: function () { + g(this, this.axis) + }, render: function (a) { + var d = this.options, b = d.format, b = b ? u(b, this) : d.formatter.call(this); + this.label ? this.label.attr({ + text: b, + visibility: "hidden" + }) : this.label = this.axis.chart.renderer.text(b, null, null, d.useHTML).css(d.style).attr({ + align: this.textAlign, + rotation: d.rotation, + visibility: "hidden" + }).add(a) + }, + setOffset: function (a, d) { + var b = this.axis, f = b.chart, g = f.inverted, l = b.reversed, l = this.isNegative && !l || !this.isNegative && l, m = b.translate(b.usePercentage ? 100 : this.total, 0, 0, 0, 1), b = b.translate(0), b = Math.abs(m - b); + a = f.xAxis[0].translate(this.x) + a; + var c = f.plotHeight, g = { + x: g ? l ? m : m - b : a, + y: g ? c - a - d : l ? c - m - b : c - m, + width: g ? b : d, + height: g ? d : b + }; + if (d = this.label)d.align(this.alignOptions, null, g), g = d.alignAttr, d[!1 === this.options.crop || f.isInsidePlot(g.x, g.y) ? "show" : "hide"](!0) + } + }; + H.prototype.getStacks = function () { + var a = this; + f(a.yAxis, function (a) { + a.stacks && a.hasVisibleSeries && (a.oldStacks = a.stacks) + }); + f(a.series, function (d) { + !d.options.stacking || !0 !== d.visible && !1 !== a.options.chart.ignoreHiddenSeries || (d.stackKey = d.type + l(d.options.stack, "")) + }) + }; + A.prototype.buildStacks = function () { + var a = this.series, d, b = l(this.options.reversedStacks, !0), f = a.length, g; + if (!this.isXAxis) { + this.usePercentage = !1; + for (g = f; g--;)a[b ? g : f - g - 1].setStackedPoints(); + for (g = f; g--;)d = a[b ? g : f - g - 1], d.setStackCliffs && d.setStackCliffs(); + if (this.usePercentage)for (g = + 0; g < f; g++)a[g].setPercentStacks() + } + }; + A.prototype.renderStackTotals = function () { + var a = this.chart, d = a.renderer, b = this.stacks, f, g, l = this.stackTotalGroup; + l || (this.stackTotalGroup = l = d.g("stack-labels").attr({visibility: "visible", zIndex: 6}).add()); + l.translate(a.plotLeft, a.plotTop); + for (f in b)for (g in a = b[f], a)a[g].render(l) + }; + A.prototype.resetStacks = function () { + var a = this.stacks, d, b; + if (!this.isXAxis)for (d in a)for (b in a[d])a[d][b].touched < this.stacksTouched ? (a[d][b].destroy(), delete a[d][b]) : (a[d][b].total = + null, a[d][b].cum = null) + }; + A.prototype.cleanStacks = function () { + var a, d, b; + if (!this.isXAxis)for (d in this.oldStacks && (a = this.stacks = this.oldStacks), a)for (b in a[d])a[d][b].cum = a[d][b].total + }; + a.prototype.setStackedPoints = function () { + if (this.options.stacking && (!0 === this.visible || !1 === this.chart.options.chart.ignoreHiddenSeries)) { + var a = this.processedXData, d = this.processedYData, b = [], f = d.length, g = this.options, t = g.threshold, m = g.startFromThreshold ? t : 0, c = g.stack, g = g.stacking, n = this.stackKey, u = "-" + n, z = this.negStacks, + e = this.yAxis, x = e.stacks, F = e.oldStacks, w, h, y, A, K, I, k; + e.stacksTouched += 1; + for (K = 0; K < f; K++)I = a[K], k = d[K], w = this.getStackIndicator(w, I, this.index), A = w.key, y = (h = z && k < (m ? 0 : t)) ? u : n, x[y] || (x[y] = {}), x[y][I] || (F[y] && F[y][I] ? (x[y][I] = F[y][I], x[y][I].total = null) : x[y][I] = new B(e, e.options.stackLabels, h, I, c)), y = x[y][I], null !== k && (y.points[A] = y.points[this.index] = [l(y.cum, m)], r(y.cum) || (y.base = A), y.touched = e.stacksTouched, 0 < w.index && !1 === this.singleStacks && (y.points[A][0] = y.points[this.index + "," + I + ",0"][0])), "percent" === + g ? (h = h ? n : u, z && x[h] && x[h][I] ? (h = x[h][I], y.total = h.total = Math.max(h.total, y.total) + Math.abs(k) || 0) : y.total = G(y.total + (Math.abs(k) || 0))) : y.total = G(y.total + (k || 0)), y.cum = l(y.cum, m) + (k || 0), null !== k && (y.points[A].push(y.cum), b[K] = y.cum); + "percent" === g && (e.usePercentage = !0); + this.stackedYData = b; + e.oldStacks = {} + } + }; + a.prototype.setPercentStacks = function () { + var a = this, d = a.stackKey, b = a.yAxis.stacks, g = a.processedXData, l; + f([d, "-" + d], function (d) { + for (var f = g.length, c, n; f--;)if (c = g[f], l = a.getStackIndicator(l, c, a.index, + d), c = (n = b[d] && b[d][c]) && n.points[l.key])n = n.total ? 100 / n.total : 0, c[0] = G(c[0] * n), c[1] = G(c[1] * n), a.stackedYData[f] = c[1] + }) + }; + a.prototype.getStackIndicator = function (a, d, b, f) { + !r(a) || a.x !== d || f && a.key !== f ? a = {x: d, index: 0, key: f} : a.index++; + a.key = [b, d, a.index].join(); + return a + } + })(L); + (function (a) { + var B = a.addEvent, A = a.animate, H = a.Axis, G = a.createElement, r = a.css, g = a.defined, f = a.each, u = a.erase, l = a.extend, q = a.fireEvent, d = a.inArray, b = a.isNumber, p = a.isObject, C = a.merge, t = a.pick, m = a.Point, c = a.Series, n = a.seriesTypes, E = a.setAnimation, + z = a.splat; + l(a.Chart.prototype, { + addSeries: function (a, b, c) { + var e, d = this; + a && (b = t(b, !0), q(d, "addSeries", {options: a}, function () { + e = d.initSeries(a); + d.isDirtyLegend = !0; + d.linkSeries(); + b && d.redraw(c) + })); + return e + }, + addAxis: function (a, b, c, d) { + var e = b ? "xAxis" : "yAxis", f = this.options; + a = C(a, {index: this[e].length, isX: b}); + new H(this, a); + f[e] = z(f[e] || {}); + f[e].push(a); + t(c, !0) && this.redraw(d) + }, + showLoading: function (a) { + var b = this, c = b.options, e = b.loadingDiv, d = c.loading, f = function () { + e && r(e, { + left: b.plotLeft + "px", top: b.plotTop + + "px", width: b.plotWidth + "px", height: b.plotHeight + "px" + }) + }; + e || (b.loadingDiv = e = G("div", {className: "highcharts-loading highcharts-loading-hidden"}, null, b.container), b.loadingSpan = G("span", {className: "highcharts-loading-inner"}, null, e), B(b, "redraw", f)); + e.className = "highcharts-loading"; + b.loadingSpan.innerHTML = a || c.lang.loading; + r(e, l(d.style, {zIndex: 10})); + r(b.loadingSpan, d.labelStyle); + b.loadingShown || (r(e, { + opacity: 0, + display: "" + }), A(e, {opacity: d.style.opacity || .5}, {duration: d.showDuration || 0})); + b.loadingShown = !0; + f() + }, + hideLoading: function () { + var a = this.options, b = this.loadingDiv; + b && (b.className = "highcharts-loading highcharts-loading-hidden", A(b, {opacity: 0}, { + duration: a.loading.hideDuration || 100, + complete: function () { + r(b, {display: "none"}) + } + })); + this.loadingShown = !1 + }, + propsRequireDirtyBox: "backgroundColor borderColor borderWidth margin marginTop marginRight marginBottom marginLeft spacing spacingTop spacingRight spacingBottom spacingLeft borderRadius plotBackgroundColor plotBackgroundImage plotBorderColor plotBorderWidth plotShadow shadow".split(" "), + propsRequireUpdateSeries: "chart.inverted chart.polar chart.ignoreHiddenSeries chart.type colors plotOptions".split(" "), + update: function (a, c) { + var e, n = {credits: "addCredits", title: "setTitle", subtitle: "setSubtitle"}, h = a.chart, m, p; + if (h) { + C(!0, this.options.chart, h); + "className" in h && this.setClassName(h.className); + if ("inverted" in h || "polar" in h)this.propFromSeries(), m = !0; + for (e in h)h.hasOwnProperty(e) && (-1 !== d("chart." + e, this.propsRequireUpdateSeries) && (p = !0), -1 !== d(e, this.propsRequireDirtyBox) && (this.isDirtyBox = !0)); + "style" in h && this.renderer.setStyle(h.style) + } + for (e in a) { + if (this[e] && "function" === typeof this[e].update)this[e].update(a[e], !1); else if ("function" === typeof this[n[e]])this[n[e]](a[e]); + "chart" !== e && -1 !== d(e, this.propsRequireUpdateSeries) && (p = !0) + } + a.colors && (this.options.colors = a.colors); + a.plotOptions && C(!0, this.options.plotOptions, a.plotOptions); + f(["xAxis", "yAxis", "series"], function (b) { + a[b] && f(z(a[b]), function (a, c) { + (c = g(a.id) && this.get(a.id) || this[b][c]) && c.coll === b && c.update(a, !1) + }, this) + }, this); + m && f(this.axes, function (a) { + a.update({}, !1) + }); + p && f(this.series, function (a) { + a.update({}, !1) + }); + a.loading && C(!0, this.options.loading, a.loading); + e = h && h.width; + h = h && h.height; + b(e) && e !== this.chartWidth || b(h) && h !== this.chartHeight ? this.setSize(e, h) : t(c, !0) && this.redraw() + }, + setSubtitle: function (a) { + this.setTitle(void 0, a) + } + }); + l(m.prototype, { + update: function (a, b, c, d) { + function e() { + f.applyOptions(a); + null === f.y && n && (f.graphic = n.destroy()); + p(a, !0) && (n && n.element && a && a.marker && a.marker.symbol && (f.graphic = n.destroy()), + a && a.dataLabels && f.dataLabel && (f.dataLabel = f.dataLabel.destroy())); + m = f.index; + g.updateParallelArrays(f, m); + l.data[m] = p(l.data[m], !0) ? f.options : a; + g.isDirty = g.isDirtyData = !0; + !g.fixedBox && g.hasCartesianSeries && (k.isDirtyBox = !0); + "point" === l.legendType && (k.isDirtyLegend = !0); + b && k.redraw(c) + } + + var f = this, g = f.series, n = f.graphic, m, k = g.chart, l = g.options; + b = t(b, !0); + !1 === d ? e() : f.firePointEvent("update", {options: a}, e) + }, remove: function (a, b) { + this.series.removePoint(d(this, this.series.data), a, b) + } + }); + l(c.prototype, { + addPoint: function (a, + b, c, d) { + var e = this.options, f = this.data, g = this.chart, n = this.xAxis, n = n && n.hasNames && n.names, m = e.data, k, p, l = this.xData, q, w; + b = t(b, !0); + k = {series: this}; + this.pointClass.prototype.applyOptions.apply(k, [a]); + w = k.x; + q = l.length; + if (this.requireSorting && w < l[q - 1])for (p = !0; q && l[q - 1] > w;)q--; + this.updateParallelArrays(k, "splice", q, 0, 0); + this.updateParallelArrays(k, q); + n && k.name && (n[w] = k.name); + m.splice(q, 0, a); + p && (this.data.splice(q, 0, null), this.processData()); + "point" === e.legendType && this.generatePoints(); + c && (f[0] && f[0].remove ? + f[0].remove(!1) : (f.shift(), this.updateParallelArrays(k, "shift"), m.shift())); + this.isDirtyData = this.isDirty = !0; + b && g.redraw(d) + }, removePoint: function (a, b, c) { + var e = this, d = e.data, f = d[a], g = e.points, n = e.chart, m = function () { + g && g.length === d.length && g.splice(a, 1); + d.splice(a, 1); + e.options.data.splice(a, 1); + e.updateParallelArrays(f || {series: e}, "splice", a, 1); + f && f.destroy(); + e.isDirty = !0; + e.isDirtyData = !0; + b && n.redraw() + }; + E(c, n); + b = t(b, !0); + f ? f.firePointEvent("remove", null, m) : m() + }, remove: function (a, b, c) { + function e() { + d.destroy(); + f.isDirtyLegend = f.isDirtyBox = !0; + f.linkSeries(); + t(a, !0) && f.redraw(b) + } + + var d = this, f = d.chart; + !1 !== c ? q(d, "remove", null, e) : e() + }, update: function (a, b) { + var c = this, e = this.chart, d = this.userOptions, g = this.type, m = a.type || d.type || e.options.chart.type, p = n[g].prototype, q = ["group", "markerGroup", "dataLabelsGroup"], k; + if (m && m !== g || void 0 !== a.zIndex)q.length = 0; + f(q, function (a) { + q[a] = c[a]; + delete c[a] + }); + a = C(d, {animation: !1, index: this.index, pointStart: this.xData[0]}, {data: this.options.data}, a); + this.remove(!1, null, !1); + for (k in p)this[k] = void 0; + l(this, n[m || g].prototype); + f(q, function (a) { + c[a] = q[a] + }); + this.init(e, a); + e.linkSeries(); + t(b, !0) && e.redraw(!1) + } + }); + l(H.prototype, { + update: function (a, b) { + var c = this.chart; + a = c.options[this.coll][this.options.index] = C(this.userOptions, a); + this.destroy(!0); + this.init(c, l(a, {events: void 0})); + c.isDirtyBox = !0; + t(b, !0) && c.redraw() + }, remove: function (a) { + for (var b = this.chart, c = this.coll, e = this.series, d = e.length; d--;)e[d] && e[d].remove(!1); + u(b.axes, this); + u(b[c], this); + b.options[c].splice(this.options.index, 1); + f(b[c], + function (a, b) { + a.options.index = b + }); + this.destroy(); + b.isDirtyBox = !0; + t(a, !0) && b.redraw() + }, setTitle: function (a, b) { + this.update({title: a}, b) + }, setCategories: function (a, b) { + this.update({categories: a}, b) + } + }) + })(L); + (function (a) { + var B = a.color, A = a.each, H = a.map, G = a.pick, r = a.Series, g = a.seriesType; + g("area", "line", {softThreshold: !1, threshold: 0}, { + singleStacks: !1, getStackPoints: function () { + var a = [], g = [], l = this.xAxis, q = this.yAxis, d = q.stacks[this.stackKey], b = {}, p = this.points, r = this.index, t = q.series, m = t.length, c, n = G(q.options.reversedStacks, + !0) ? 1 : -1, E, z; + if (this.options.stacking) { + for (E = 0; E < p.length; E++)b[p[E].x] = p[E]; + for (z in d)null !== d[z].total && g.push(z); + g.sort(function (a, b) { + return a - b + }); + c = H(t, function () { + return this.visible + }); + A(g, function (e, f) { + var p = 0, t, h; + if (b[e] && !b[e].isNull)a.push(b[e]), A([-1, 1], function (a) { + var p = 1 === a ? "rightNull" : "leftNull", l = 0, q = d[g[f + a]]; + if (q)for (E = r; 0 <= E && E < m;)t = q.points[E], t || (E === r ? b[e][p] = !0 : c[E] && (h = d[e].points[E]) && (l -= h[1] - h[0])), E += n; + b[e][1 === a ? "rightCliff" : "leftCliff"] = l + }); else { + for (E = r; 0 <= E && E < m;) { + if (t = + d[e].points[E]) { + p = t[1]; + break + } + E += n + } + p = q.toPixels(p, !0); + a.push({isNull: !0, plotX: l.toPixels(e, !0), plotY: p, yBottom: p}) + } + }) + } + return a + }, getGraphPath: function (a) { + var f = r.prototype.getGraphPath, g = this.options, q = g.stacking, d = this.yAxis, b, p, C = [], t = [], m = this.index, c, n = d.stacks[this.stackKey], E = g.threshold, z = d.getThreshold(g.threshold), e, g = g.connectNulls || "percent" === q, x = function (b, e, f) { + var h = a[b]; + b = q && n[h.x].points[m]; + var g = h[f + "Null"] || 0; + f = h[f + "Cliff"] || 0; + var p, l, h = !0; + f || g ? (p = (g ? b[0] : b[1]) + f, l = b[0] + f, h = !!g) : !q && + a[e] && a[e].isNull && (p = l = E); + void 0 !== p && (t.push({ + plotX: c, + plotY: null === p ? z : d.getThreshold(p), + isNull: h + }), C.push({plotX: c, plotY: null === l ? z : d.getThreshold(l), doCurve: !1})) + }; + a = a || this.points; + q && (a = this.getStackPoints()); + for (b = 0; b < a.length; b++)if (p = a[b].isNull, c = G(a[b].rectPlotX, a[b].plotX), e = G(a[b].yBottom, z), !p || g)g || x(b, b - 1, "left"), p && !q && g || (t.push(a[b]), C.push({ + x: b, + plotX: c, + plotY: e + })), g || x(b, b + 1, "right"); + b = f.call(this, t, !0, !0); + C.reversed = !0; + p = f.call(this, C, !0, !0); + p.length && (p[0] = "L"); + p = b.concat(p); + f = + f.call(this, t, !1, g); + p.xMap = b.xMap; + this.areaPath = p; + return f + }, drawGraph: function () { + this.areaPath = []; + r.prototype.drawGraph.apply(this); + var a = this, g = this.areaPath, l = this.options, q = [["area", "highcharts-area", this.color, l.fillColor]]; + A(this.zones, function (d, b) { + q.push(["zone-area-" + b, "highcharts-area highcharts-zone-area-" + b + " " + d.className, d.color || a.color, d.fillColor || l.fillColor]) + }); + A(q, function (d) { + var b = d[0], f = a[b]; + f ? (f.endX = g.xMap, f.animate({d: g})) : (f = a[b] = a.chart.renderer.path(g).addClass(d[1]).attr({ + fill: G(d[3], + B(d[2]).setOpacity(G(l.fillOpacity, .75)).get()), zIndex: 0 + }).add(a.group), f.isArea = !0); + f.startX = g.xMap; + f.shiftUnit = l.step ? 2 : 1 + }) + }, drawLegendSymbol: a.LegendSymbolMixin.drawRectangle + }) + })(L); + (function (a) { + var B = a.pick; + a = a.seriesType; + a("spline", "line", {}, { + getPointSpline: function (a, H, G) { + var r = H.plotX, g = H.plotY, f = a[G - 1]; + G = a[G + 1]; + var u, l, q, d; + if (f && !f.isNull && !1 !== f.doCurve && G && !G.isNull && !1 !== G.doCurve) { + a = f.plotY; + q = G.plotX; + G = G.plotY; + var b = 0; + u = (1.5 * r + f.plotX) / 2.5; + l = (1.5 * g + a) / 2.5; + q = (1.5 * r + q) / 2.5; + d = (1.5 * g + G) / 2.5; + q !== u && (b = (d - l) * (q - r) / (q - u) + g - d); + l += b; + d += b; + l > a && l > g ? (l = Math.max(a, g), d = 2 * g - l) : l < a && l < g && (l = Math.min(a, g), d = 2 * g - l); + d > G && d > g ? (d = Math.max(G, g), l = 2 * g - d) : d < G && d < g && (d = Math.min(G, g), l = 2 * g - d); + H.rightContX = q; + H.rightContY = d + } + H = ["C", B(f.rightContX, f.plotX), B(f.rightContY, f.plotY), B(u, r), B(l, g), r, g]; + f.rightContX = f.rightContY = null; + return H + } + }) + })(L); + (function (a) { + var B = a.seriesTypes.area.prototype, A = a.seriesType; + A("areaspline", "spline", a.defaultPlotOptions.area, { + getStackPoints: B.getStackPoints, + getGraphPath: B.getGraphPath, + setStackCliffs: B.setStackCliffs, + drawGraph: B.drawGraph, + drawLegendSymbol: a.LegendSymbolMixin.drawRectangle + }) + })(L); + (function (a) { + var B = a.animObject, A = a.color, H = a.each, G = a.extend, r = a.isNumber, g = a.merge, f = a.pick, u = a.Series, l = a.seriesType, q = a.svg; + l("column", "line", { + borderRadius: 0, + groupPadding: .2, + marker: null, + pointPadding: .1, + minPointLength: 0, + cropThreshold: 50, + pointRange: null, + states: { + hover: {halo: !1, brightness: .1, shadow: !1}, + select: {color: "#cccccc", borderColor: "#000000", shadow: !1} + }, + dataLabels: { + align: null, verticalAlign: null, + y: null + }, + softThreshold: !1, + startFromThreshold: !0, + stickyTracking: !1, + tooltip: {distance: 6}, + threshold: 0, + borderColor: "#ffffff" + }, { + cropShoulder: 0, + directTouch: !0, + trackerGroups: ["group", "dataLabelsGroup"], + negStacks: !0, + init: function () { + u.prototype.init.apply(this, arguments); + var a = this, b = a.chart; + b.hasRendered && H(b.series, function (b) { + b.type === a.type && (b.isDirty = !0) + }) + }, + getColumnMetrics: function () { + var a = this, b = a.options, g = a.xAxis, l = a.yAxis, t = g.reversed, m, c = {}, n = 0; + !1 === b.grouping ? n = 1 : H(a.chart.series, function (b) { + var e = + b.options, d = b.yAxis, f; + b.type === a.type && b.visible && l.len === d.len && l.pos === d.pos && (e.stacking ? (m = b.stackKey, void 0 === c[m] && (c[m] = n++), f = c[m]) : !1 !== e.grouping && (f = n++), b.columnIndex = f) + }); + var q = Math.min(Math.abs(g.transA) * (g.ordinalSlope || b.pointRange || g.closestPointRange || g.tickInterval || 1), g.len), r = q * b.groupPadding, e = (q - 2 * r) / (n || 1), b = Math.min(b.maxPointWidth || g.len, f(b.pointWidth, e * (1 - 2 * b.pointPadding))); + a.columnMetrics = { + width: b, + offset: (e - b) / 2 + (r + ((a.columnIndex || 0) + (t ? 1 : 0)) * e - q / 2) * (t ? -1 : 1) + }; + return a.columnMetrics + }, + crispCol: function (a, b, f, g) { + var d = this.chart, m = this.borderWidth, c = -(m % 2 ? .5 : 0), m = m % 2 ? .5 : 1; + d.inverted && d.renderer.isVML && (m += 1); + f = Math.round(a + f) + c; + a = Math.round(a) + c; + g = Math.round(b + g) + m; + c = .5 >= Math.abs(b) && .5 < g; + b = Math.round(b) + m; + g -= b; + c && g && (--b, g += 1); + return {x: a, y: b, width: f - a, height: g} + }, + translate: function () { + var a = this, b = a.chart, g = a.options, l = a.dense = 2 > a.closestPointRange * a.xAxis.transA, l = a.borderWidth = f(g.borderWidth, l ? 0 : 1), t = a.yAxis, m = a.translatedThreshold = t.getThreshold(g.threshold), c = f(g.minPointLength, + 5), n = a.getColumnMetrics(), q = n.width, r = a.barW = Math.max(q, 1 + 2 * l), e = a.pointXOffset = n.offset; + b.inverted && (m -= .5); + g.pointPadding && (r = Math.ceil(r)); + u.prototype.translate.apply(a); + H(a.points, function (d) { + var g = f(d.yBottom, m), n = 999 + Math.abs(g), n = Math.min(Math.max(-n, d.plotY), t.len + n), h = d.plotX + e, l = r, p = Math.min(n, g), z, x = Math.max(n, g) - p; + Math.abs(x) < c && c && (x = c, z = !t.reversed && !d.negative || t.reversed && d.negative, p = Math.abs(p - m) > c ? g - c : m - (z ? c : 0)); + d.barX = h; + d.pointWidth = q; + d.tooltipPos = b.inverted ? [t.len + t.pos - b.plotLeft - + n, a.xAxis.len - h - l / 2, x] : [h + l / 2, n + t.pos - b.plotTop, x]; + d.shapeType = "rect"; + d.shapeArgs = a.crispCol.apply(a, d.isNull ? [d.plotX, t.len / 2, 0, 0] : [h, p, l, x]) + }) + }, + getSymbol: a.noop, + drawLegendSymbol: a.LegendSymbolMixin.drawRectangle, + drawGraph: function () { + this.group[this.dense ? "addClass" : "removeClass"]("highcharts-dense-data") + }, + pointAttribs: function (a, b) { + var d = this.options, f, g = this.pointAttrToOptions || {}; + f = g.stroke || "borderColor"; + var m = g["stroke-width"] || "borderWidth", c = a && a.color || this.color, n = a[f] || d[f] || this.color || + c, l = a[m] || d[m] || this[m] || 0, g = d.dashStyle; + a && this.zones.length && (c = (c = a.getZone()) && c.color || a.options.color || this.color); + b && (a = d.states[b], b = a.brightness, c = a.color || void 0 !== b && A(c).brighten(a.brightness).get() || c, n = a[f] || n, l = a[m] || l, g = a.dashStyle || g); + f = {fill: c, stroke: n, "stroke-width": l}; + d.borderRadius && (f.r = d.borderRadius); + g && (f.dashstyle = g); + return f + }, + drawPoints: function () { + var a = this, b = this.chart, f = a.options, l = b.renderer, t = f.animationLimit || 250, m; + H(a.points, function (c) { + var d = c.graphic; + if (r(c.plotY) && + null !== c.y) { + m = c.shapeArgs; + if (d)d[b.pointCount < t ? "animate" : "attr"](g(m)); else c.graphic = d = l[c.shapeType](m).attr({"class": c.getClassName()}).add(c.group || a.group); + d.attr(a.pointAttribs(c, c.selected && "select")).shadow(f.shadow, null, f.stacking && !f.borderRadius) + } else d && (c.graphic = d.destroy()) + }) + }, + animate: function (a) { + var b = this, d = this.yAxis, f = b.options, g = this.chart.inverted, m = {}; + q && (a ? (m.scaleY = .001, a = Math.min(d.pos + d.len, Math.max(d.pos, d.toPixels(f.threshold))), g ? m.translateX = a - d.len : m.translateY = a, b.group.attr(m)) : + (m[g ? "translateX" : "translateY"] = d.pos, b.group.animate(m, G(B(b.options.animation), { + step: function (a, d) { + b.group.attr({scaleY: Math.max(.001, d.pos)}) + } + })), b.animate = null)) + }, + remove: function () { + var a = this, b = a.chart; + b.hasRendered && H(b.series, function (b) { + b.type === a.type && (b.isDirty = !0) + }); + u.prototype.remove.apply(a, arguments) + } + }) + })(L); + (function (a) { + a = a.seriesType; + a("bar", "column", null, {inverted: !0}) + })(L); + (function (a) { + var B = a.Series; + a = a.seriesType; + a("scatter", "line", { + lineWidth: 0, marker: {enabled: !0}, tooltip: { + headerFormat: '\x3cspan style\x3d"color:{point.color}"\x3e\u25cf\x3c/span\x3e \x3cspan style\x3d"font-size: 0.85em"\x3e {series.name}\x3c/span\x3e\x3cbr/\x3e', + pointFormat: "x: \x3cb\x3e{point.x}\x3c/b\x3e\x3cbr/\x3ey: \x3cb\x3e{point.y}\x3c/b\x3e\x3cbr/\x3e" + } + }, { + sorted: !1, + requireSorting: !1, + noSharedTooltip: !0, + trackerGroups: ["group", "markerGroup", "dataLabelsGroup"], + takeOrdinalPosition: !1, + kdDimensions: 2, + drawGraph: function () { + this.options.lineWidth && B.prototype.drawGraph.call(this) + } + }) + })(L); + (function (a) { + var B = a.pick, A = a.relativeLength; + a.CenteredSeriesMixin = { + getCenter: function () { + var a = this.options, G = this.chart, r = 2 * (a.slicedOffset || 0), g = G.plotWidth - 2 * r, G = G.plotHeight - + 2 * r, f = a.center, f = [B(f[0], "50%"), B(f[1], "50%"), a.size || "100%", a.innerSize || 0], u = Math.min(g, G), l, q; + for (l = 0; 4 > l; ++l)q = f[l], a = 2 > l || 2 === l && /%$/.test(q), f[l] = A(q, [g, G, u, f[2]][l]) + (a ? r : 0); + f[3] > f[2] && (f[3] = f[2]); + return f + } + } + })(L); + (function (a) { + var B = a.addEvent, A = a.defined, H = a.each, G = a.extend, r = a.inArray, g = a.noop, f = a.pick, u = a.Point, l = a.Series, q = a.seriesType, d = a.setAnimation; + q("pie", "line", { + center: [null, null], + clip: !1, + colorByPoint: !0, + dataLabels: { + distance: 30, enabled: !0, formatter: function () { + return null === this.y ? + void 0 : this.point.name + }, x: 0 + }, + ignoreHiddenPoint: !0, + legendType: "point", + marker: null, + size: null, + showInLegend: !1, + slicedOffset: 10, + stickyTracking: !1, + tooltip: {followPointer: !0}, + borderColor: "#ffffff", + borderWidth: 1, + states: {hover: {brightness: .1, shadow: !1}} + }, { + isCartesian: !1, + requireSorting: !1, + directTouch: !0, + noSharedTooltip: !0, + trackerGroups: ["group", "dataLabelsGroup"], + axisTypes: [], + pointAttribs: a.seriesTypes.column.prototype.pointAttribs, + animate: function (a) { + var b = this, d = b.points, f = b.startAngleRad; + a || (H(d, function (a) { + var c = + a.graphic, d = a.shapeArgs; + c && (c.attr({r: a.startR || b.center[3] / 2, start: f, end: f}), c.animate({ + r: d.r, + start: d.start, + end: d.end + }, b.options.animation)) + }), b.animate = null) + }, + updateTotals: function () { + var a, d = 0, f = this.points, g = f.length, m, c = this.options.ignoreHiddenPoint; + for (a = 0; a < g; a++)m = f[a], 0 > m.y && (m.y = null), d += c && !m.visible ? 0 : m.y; + this.total = d; + for (a = 0; a < g; a++)m = f[a], m.percentage = 0 < d && (m.visible || !c) ? m.y / d * 100 : 0, m.total = d + }, + generatePoints: function () { + l.prototype.generatePoints.call(this); + this.updateTotals() + }, + translate: function (a) { + this.generatePoints(); + var b = 0, d = this.options, g = d.slicedOffset, m = g + (d.borderWidth || 0), c, n, l, q = d.startAngle || 0, e = this.startAngleRad = Math.PI / 180 * (q - 90), q = (this.endAngleRad = Math.PI / 180 * (f(d.endAngle, q + 360) - 90)) - e, r = this.points, u = d.dataLabels.distance, d = d.ignoreHiddenPoint, w, h = r.length, y; + a || (this.center = a = this.getCenter()); + this.getX = function (b, c) { + l = Math.asin(Math.min((b - a[1]) / (a[2] / 2 + u), 1)); + return a[0] + (c ? -1 : 1) * Math.cos(l) * (a[2] / 2 + u) + }; + for (w = 0; w < h; w++) { + y = r[w]; + c = e + b * q; + if (!d || y.visible)b += y.percentage / 100; + n = e + b * q; + y.shapeType = + "arc"; + y.shapeArgs = { + x: a[0], + y: a[1], + r: a[2] / 2, + innerR: a[3] / 2, + start: Math.round(1E3 * c) / 1E3, + end: Math.round(1E3 * n) / 1E3 + }; + l = (n + c) / 2; + l > 1.5 * Math.PI ? l -= 2 * Math.PI : l < -Math.PI / 2 && (l += 2 * Math.PI); + y.slicedTranslation = { + translateX: Math.round(Math.cos(l) * g), + translateY: Math.round(Math.sin(l) * g) + }; + c = Math.cos(l) * a[2] / 2; + n = Math.sin(l) * a[2] / 2; + y.tooltipPos = [a[0] + .7 * c, a[1] + .7 * n]; + y.half = l < -Math.PI / 2 || l > Math.PI / 2 ? 1 : 0; + y.angle = l; + m = Math.min(m, u / 5); + y.labelPos = [a[0] + c + Math.cos(l) * u, a[1] + n + Math.sin(l) * u, a[0] + c + Math.cos(l) * m, a[1] + n + Math.sin(l) * + m, a[0] + c, a[1] + n, 0 > u ? "center" : y.half ? "right" : "left", l] + } + }, + drawGraph: null, + drawPoints: function () { + var a = this, d = a.chart.renderer, f, g, m, c, n = a.options.shadow; + n && !a.shadowGroup && (a.shadowGroup = d.g("shadow").add(a.group)); + H(a.points, function (b) { + if (null !== b.y) { + g = b.graphic; + c = b.shapeArgs; + f = b.sliced ? b.slicedTranslation : {}; + var l = b.shadowGroup; + n && !l && (l = b.shadowGroup = d.g("shadow").add(a.shadowGroup)); + l && l.attr(f); + m = a.pointAttribs(b, b.selected && "select"); + g ? g.setRadialReference(a.center).attr(m).animate(G(c, f)) : (b.graphic = + g = d[b.shapeType](c).addClass(b.getClassName()).setRadialReference(a.center).attr(f).add(a.group), b.visible || g.attr({visibility: "hidden"}), g.attr(m).attr({"stroke-linejoin": "round"}).shadow(n, l)) + } + }) + }, + searchPoint: g, + sortByAngle: function (a, d) { + a.sort(function (a, b) { + return void 0 !== a.angle && (b.angle - a.angle) * d + }) + }, + drawLegendSymbol: a.LegendSymbolMixin.drawRectangle, + getCenter: a.CenteredSeriesMixin.getCenter, + getSymbol: g + }, { + init: function () { + u.prototype.init.apply(this, arguments); + var a = this, d; + a.name = f(a.name, "Slice"); + d = function (b) { + a.slice("select" === b.type) + }; + B(a, "select", d); + B(a, "unselect", d); + return a + }, setVisible: function (a, d) { + var b = this, g = b.series, m = g.chart, c = g.options.ignoreHiddenPoint; + d = f(d, c); + a !== b.visible && (b.visible = b.options.visible = a = void 0 === a ? !b.visible : a, g.options.data[r(b, g.data)] = b.options, H(["graphic", "dataLabel", "connector", "shadowGroup"], function (c) { + if (b[c])b[c][a ? "show" : "hide"](!0) + }), b.legendItem && m.legend.colorizeItem(b, a), a || "hover" !== b.state || b.setState(""), c && (g.isDirty = !0), d && m.redraw()) + }, + slice: function (a, g, l) { + var b = this.series; + d(l, b.chart); + f(g, !0); + this.sliced = this.options.sliced = a = A(a) ? a : !this.sliced; + b.options.data[r(this, b.data)] = this.options; + a = a ? this.slicedTranslation : {translateX: 0, translateY: 0}; + this.graphic.animate(a); + this.shadowGroup && this.shadowGroup.animate(a) + }, haloPath: function (a) { + var b = this.shapeArgs; + return this.sliced || !this.visible ? [] : this.series.chart.renderer.symbols.arc(b.x, b.y, b.r + a, b.r + a, { + innerR: this.shapeArgs.r, + start: b.start, + end: b.end + }) + } + }) + })(L); + (function (a) { + var B = + a.addEvent, A = a.arrayMax, H = a.defined, G = a.each, r = a.extend, g = a.format, f = a.map, u = a.merge, l = a.noop, q = a.pick, d = a.relativeLength, b = a.Series, p = a.seriesTypes, C = a.stableSort; + a.distribute = function (a, b) { + function c(a, b) { + return a.target - b.target + } + + var d, g = !0, m = a, e = [], l; + l = 0; + for (d = a.length; d--;)l += a[d].size; + if (l > b) { + C(a, function (a, b) { + return (b.rank || 0) - (a.rank || 0) + }); + for (l = d = 0; l <= b;)l += a[d].size, d++; + e = a.splice(d - 1, a.length) + } + C(a, c); + for (a = f(a, function (a) { + return {size: a.size, targets: [a.target]} + }); g;) { + for (d = a.length; d--;)g = + a[d], l = (Math.min.apply(0, g.targets) + Math.max.apply(0, g.targets)) / 2, g.pos = Math.min(Math.max(0, l - g.size / 2), b - g.size); + d = a.length; + for (g = !1; d--;)0 < d && a[d - 1].pos + a[d - 1].size > a[d].pos && (a[d - 1].size += a[d].size, a[d - 1].targets = a[d - 1].targets.concat(a[d].targets), a[d - 1].pos + a[d - 1].size > b && (a[d - 1].pos = b - a[d - 1].size), a.splice(d, 1), g = !0) + } + d = 0; + G(a, function (a) { + var b = 0; + G(a.targets, function () { + m[d].pos = a.pos + b; + b += m[d].size; + d++ + }) + }); + m.push.apply(m, e); + C(m, c) + }; + b.prototype.drawDataLabels = function () { + var a = this, b = a.options, + c = b.dataLabels, d = a.points, f, l, e = a.hasRendered || 0, p, r, w = q(c.defer, !0), h = a.chart.renderer; + if (c.enabled || a._hasPointLabels)a.dlProcessOptions && a.dlProcessOptions(c), r = a.plotGroup("dataLabelsGroup", "data-labels", w && !e ? "hidden" : "visible", c.zIndex || 6), w && (r.attr({opacity: +e}), e || B(a, "afterAnimate", function () { + a.visible && r.show(!0); + r[b.animation ? "animate" : "attr"]({opacity: 1}, {duration: 200}) + })), l = c, G(d, function (e) { + var d, m = e.dataLabel, n, k, t, z = e.connector, w = !m, x; + f = e.dlOptions || e.options && e.options.dataLabels; + if (d = q(f && f.enabled, l.enabled) && null !== e.y)for (k in c = u(l, f), n = e.getLabelConfig(), p = c.format ? g(c.format, n) : c.formatter.call(n, c), x = c.style, t = c.rotation, x.color = q(c.color, x.color, a.color, "#000000"), "contrast" === x.color && (x.color = c.inside || 0 > c.distance || b.stacking ? h.getContrast(e.color || a.color) : "#000000"), b.cursor && (x.cursor = b.cursor), n = { + fill: c.backgroundColor, + stroke: c.borderColor, + "stroke-width": c.borderWidth, + r: c.borderRadius || 0, + rotation: t, + padding: c.padding, + zIndex: 1 + }, n)void 0 === n[k] && delete n[k]; + !m || + d && H(p) ? d && H(p) && (m ? n.text = p : (m = e.dataLabel = h[t ? "text" : "label"](p, 0, -9999, c.shape, null, null, c.useHTML, null, "data-label"), m.addClass("highcharts-data-label-color-" + e.colorIndex + " " + (c.className || "") + (c.useHTML ? "highcharts-tracker" : ""))), m.attr(n), m.css(x).shadow(c.shadow), m.added || m.add(r), a.alignDataLabel(e, m, c, null, w)) : (e.dataLabel = m.destroy(), z && (e.connector = z.destroy())) + }) + }; + b.prototype.alignDataLabel = function (a, b, c, d, f) { + var g = this.chart, e = g.inverted, m = q(a.plotX, -9999), n = q(a.plotY, -9999), l = b.getBBox(), + h, p = c.rotation, t = c.align, u = this.visible && (a.series.forceDL || g.isInsidePlot(m, Math.round(n), e) || d && g.isInsidePlot(m, e ? d.x + 1 : d.y + d.height - 1, e)), E = "justify" === q(c.overflow, "justify"); + u && (h = c.style.fontSize, h = g.renderer.fontMetrics(h, b).b, d = r({ + x: e ? g.plotWidth - n : m, + y: Math.round(e ? g.plotHeight - m : n), + width: 0, + height: 0 + }, d), r(c, { + width: l.width, + height: l.height + }), p ? (E = !1, e = g.renderer.rotCorr(h, p), e = { + x: d.x + c.x + d.width / 2 + e.x, + y: d.y + c.y + {top: 0, middle: .5, bottom: 1}[c.verticalAlign] * d.height + }, b[f ? "attr" : "animate"](e).attr({align: t}), + m = (p + 720) % 360, m = 180 < m && 360 > m, "left" === t ? e.y -= m ? l.height : 0 : "center" === t ? (e.x -= l.width / 2, e.y -= l.height / 2) : "right" === t && (e.x -= l.width, e.y -= m ? 0 : l.height)) : (b.align(c, null, d), e = b.alignAttr), E ? this.justifyDataLabel(b, c, e, l, d, f) : q(c.crop, !0) && (u = g.isInsidePlot(e.x, e.y) && g.isInsidePlot(e.x + l.width, e.y + l.height)), c.shape && !p && b.attr({ + anchorX: a.plotX, + anchorY: a.plotY + })); + u || (b.attr({y: -9999}), b.placed = !1) + }; + b.prototype.justifyDataLabel = function (a, b, c, d, f, g) { + var e = this.chart, m = b.align, n = b.verticalAlign, l, h, p = a.box ? + 0 : a.padding || 0; + l = c.x + p; + 0 > l && ("right" === m ? b.align = "left" : b.x = -l, h = !0); + l = c.x + d.width - p; + l > e.plotWidth && ("left" === m ? b.align = "right" : b.x = e.plotWidth - l, h = !0); + l = c.y + p; + 0 > l && ("bottom" === n ? b.verticalAlign = "top" : b.y = -l, h = !0); + l = c.y + d.height - p; + l > e.plotHeight && ("top" === n ? b.verticalAlign = "bottom" : b.y = e.plotHeight - l, h = !0); + h && (a.placed = !g, a.align(b, null, f)) + }; + p.pie && (p.pie.prototype.drawDataLabels = function () { + var d = this, g = d.data, c, l = d.chart, p = d.options.dataLabels, r = q(p.connectorPadding, 10), e = q(p.connectorWidth, 1), u = + l.plotWidth, F = l.plotHeight, w, h = p.distance, y = d.center, C = y[2] / 2, B = y[1], H = 0 < h, k, D, L, N, S = [[], []], O, v, M, Q, R = [0, 0, 0, 0]; + d.visible && (p.enabled || d._hasPointLabels) && (b.prototype.drawDataLabels.apply(d), G(g, function (a) { + a.dataLabel && a.visible && (S[a.half].push(a), a.dataLabel._pos = null) + }), G(S, function (b, e) { + var g, m, n = b.length, q, t, z; + if (n)for (d.sortByAngle(b, e - .5), 0 < h && (g = Math.max(0, B - C - h), m = Math.min(B + C + h, l.plotHeight), q = f(b, function (a) { + if (a.dataLabel)return z = a.dataLabel.getBBox().height || 21, { + target: a.labelPos[1] - + g + z / 2, size: z, rank: a.y + } + }), a.distribute(q, m + z - g)), Q = 0; Q < n; Q++)c = b[Q], L = c.labelPos, k = c.dataLabel, M = !1 === c.visible ? "hidden" : "inherit", t = L[1], q ? void 0 === q[Q].pos ? M = "hidden" : (N = q[Q].size, v = g + q[Q].pos) : v = t, O = p.justify ? y[0] + (e ? -1 : 1) * (C + h) : d.getX(v < g + 2 || v > m - 2 ? t : v, e), k._attr = { + visibility: M, + align: L[6] + }, k._pos = { + x: O + p.x + ({left: r, right: -r}[L[6]] || 0), + y: v + p.y - 10 + }, L.x = O, L.y = v, null === d.options.size && (D = k.width, O - D < r ? R[3] = Math.max(Math.round(D - O + r), R[3]) : O + D > u - r && (R[1] = Math.max(Math.round(O + D - u + r), R[1])), 0 > v - N / 2 ? R[0] = + Math.max(Math.round(-v + N / 2), R[0]) : v + N / 2 > F && (R[2] = Math.max(Math.round(v + N / 2 - F), R[2]))) + }), 0 === A(R) || this.verifyDataLabelOverflow(R)) && (this.placeDataLabels(), H && e && G(this.points, function (a) { + var b; + w = a.connector; + if ((k = a.dataLabel) && k._pos && a.visible) { + M = k._attr.visibility; + if (b = !w)a.connector = w = l.renderer.path().addClass("highcharts-data-label-connector highcharts-color-" + a.colorIndex).add(d.dataLabelsGroup), w.attr({ + "stroke-width": e, + stroke: p.connectorColor || a.color || "#666666" + }); + w[b ? "attr" : "animate"]({d: d.connectorPath(a.labelPos)}); + w.attr("visibility", M) + } else w && (a.connector = w.destroy()) + })) + }, p.pie.prototype.connectorPath = function (a) { + var b = a.x, c = a.y; + return q(this.options.dataLabels.softConnector, !0) ? ["M", b + ("left" === a[6] ? 5 : -5), c, "C", b, c, 2 * a[2] - a[4], 2 * a[3] - a[5], a[2], a[3], "L", a[4], a[5]] : ["M", b + ("left" === a[6] ? 5 : -5), c, "L", a[2], a[3], "L", a[4], a[5]] + }, p.pie.prototype.placeDataLabels = function () { + G(this.points, function (a) { + var b = a.dataLabel; + b && a.visible && ((a = b._pos) ? (b.attr(b._attr), b[b.moved ? "animate" : "attr"](a), b.moved = !0) : b && b.attr({y: -9999})) + }) + }, + p.pie.prototype.alignDataLabel = l, p.pie.prototype.verifyDataLabelOverflow = function (a) { + var b = this.center, c = this.options, f = c.center, g = c.minSize || 80, l, e; + null !== f[0] ? l = Math.max(b[2] - Math.max(a[1], a[3]), g) : (l = Math.max(b[2] - a[1] - a[3], g), b[0] += (a[3] - a[1]) / 2); + null !== f[1] ? l = Math.max(Math.min(l, b[2] - Math.max(a[0], a[2])), g) : (l = Math.max(Math.min(l, b[2] - a[0] - a[2]), g), b[1] += (a[0] - a[2]) / 2); + l < b[2] ? (b[2] = l, b[3] = Math.min(d(c.innerSize || 0, l), l), this.translate(b), this.drawDataLabels && this.drawDataLabels()) : e = !0; + return e + }); + p.column && (p.column.prototype.alignDataLabel = function (a, d, c, f, g) { + var l = this.chart.inverted, e = a.series, m = a.dlBox || a.shapeArgs, n = q(a.below, a.plotY > q(this.translatedThreshold, e.yAxis.len)), p = q(c.inside, !!this.options.stacking); + m && (f = u(m), 0 > f.y && (f.height += f.y, f.y = 0), m = f.y + f.height - e.yAxis.len, 0 < m && (f.height -= m), l && (f = { + x: e.yAxis.len - f.y - f.height, + y: e.xAxis.len - f.x - f.width, + width: f.height, + height: f.width + }), p || (l ? (f.x += n ? 0 : f.width, f.width = 0) : (f.y += n ? f.height : 0, f.height = 0))); + c.align = q(c.align, !l || p ? "center" : + n ? "right" : "left"); + c.verticalAlign = q(c.verticalAlign, l || p ? "middle" : n ? "top" : "bottom"); + b.prototype.alignDataLabel.call(this, a, d, c, f, g) + }) + })(L); + (function (a) { + var B = a.Chart, A = a.each, H = a.pick, G = a.addEvent; + B.prototype.callbacks.push(function (a) { + function g() { + var f = []; + A(a.series, function (a) { + var g = a.options.dataLabels, q = a.dataLabelCollections || ["dataLabel"]; + (g.enabled || a._hasPointLabels) && !g.allowOverlap && a.visible && A(q, function (d) { + A(a.points, function (a) { + a[d] && (a[d].labelrank = H(a.labelrank, a.shapeArgs && a.shapeArgs.height), + f.push(a[d])) + }) + }) + }); + a.hideOverlappingLabels(f) + } + + g(); + G(a, "redraw", g) + }); + B.prototype.hideOverlappingLabels = function (a) { + var g = a.length, f, r, l, q, d, b, p, C, t, m = function (a, b, d, f, e, g, l, m) { + return !(e > a + d || e + l < a || g > b + f || g + m < b) + }; + for (r = 0; r < g; r++)if (f = a[r])f.oldOpacity = f.opacity, f.newOpacity = 1; + a.sort(function (a, b) { + return (b.labelrank || 0) - (a.labelrank || 0) + }); + for (r = 0; r < g; r++)for (l = a[r], f = r + 1; f < g; ++f)if (q = a[f], l && q && l.placed && q.placed && 0 !== l.newOpacity && 0 !== q.newOpacity && (d = l.alignAttr, b = q.alignAttr, p = l.parentGroup, C = q.parentGroup, + t = 2 * (l.box ? 0 : l.padding), d = m(d.x + p.translateX, d.y + p.translateY, l.width - t, l.height - t, b.x + C.translateX, b.y + C.translateY, q.width - t, q.height - t)))(l.labelrank < q.labelrank ? l : q).newOpacity = 0; + A(a, function (a) { + var b, c; + a && (c = a.newOpacity, a.oldOpacity !== c && a.placed && (c ? a.show(!0) : b = function () { + a.hide() + }, a.alignAttr.opacity = c, a[a.isOld ? "animate" : "attr"](a.alignAttr, null, b)), a.isOld = !0) + }) + } + })(L); + (function (a) { + var B = a.addEvent, A = a.Chart, H = a.createElement, G = a.css, r = a.defaultOptions, g = a.defaultPlotOptions, f = a.each, u = + a.extend, l = a.fireEvent, q = a.hasTouch, d = a.inArray, b = a.isObject, p = a.Legend, C = a.merge, t = a.pick, m = a.Point, c = a.Series, n = a.seriesTypes, E = a.svg; + a = a.TrackerMixin = { + drawTrackerPoint: function () { + var a = this, b = a.chart, c = b.pointer, d = function (a) { + for (var c = a.target, e; c && !e;)e = c.point, c = c.parentNode; + if (void 0 !== e && e !== b.hoverPoint)e.onMouseOver(a) + }; + f(a.points, function (a) { + a.graphic && (a.graphic.element.point = a); + a.dataLabel && (a.dataLabel.div ? a.dataLabel.div.point = a : a.dataLabel.element.point = a) + }); + a._hasTracking || (f(a.trackerGroups, + function (b) { + if (a[b]) { + a[b].addClass("highcharts-tracker").on("mouseover", d).on("mouseout", function (a) { + c.onTrackerMouseOut(a) + }); + if (q)a[b].on("touchstart", d); + a.options.cursor && a[b].css(G).css({cursor: a.options.cursor}) + } + }), a._hasTracking = !0) + }, drawTrackerGraph: function () { + var a = this, b = a.options, c = b.trackByArea, d = [].concat(c ? a.areaPath : a.graphPath), g = d.length, h = a.chart, l = h.pointer, m = h.renderer, n = h.options.tooltip.snap, p = a.tracker, k, r = function () { + if (h.hoverSeries !== a)a.onMouseOver() + }, t = "rgba(192,192,192," + + (E ? .0001 : .002) + ")"; + if (g && !c)for (k = g + 1; k--;)"M" === d[k] && d.splice(k + 1, 0, d[k + 1] - n, d[k + 2], "L"), (k && "M" === d[k] || k === g) && d.splice(k, 0, "L", d[k - 2] + n, d[k - 1]); + p ? p.attr({d: d}) : a.graph && (a.tracker = m.path(d).attr({ + "stroke-linejoin": "round", + visibility: a.visible ? "visible" : "hidden", + stroke: t, + fill: c ? t : "none", + "stroke-width": a.graph.strokeWidth() + (c ? 0 : 2 * n), + zIndex: 2 + }).add(a.group), f([a.tracker, a.markerGroup], function (a) { + a.addClass("highcharts-tracker").on("mouseover", r).on("mouseout", function (a) { + l.onTrackerMouseOut(a) + }); + b.cursor && a.css({cursor: b.cursor}); + if (q)a.on("touchstart", r) + })) + } + }; + n.column && (n.column.prototype.drawTracker = a.drawTrackerPoint); + n.pie && (n.pie.prototype.drawTracker = a.drawTrackerPoint); + n.scatter && (n.scatter.prototype.drawTracker = a.drawTrackerPoint); + u(p.prototype, { + setItemEvents: function (a, b, c) { + var e = this, d = e.chart, f = "highcharts-legend-" + (a.series ? "point" : "series") + "-active"; + (c ? b : a.legendGroup).on("mouseover", function () { + a.setState("hover"); + d.seriesGroup.addClass(f); + b.css(e.options.itemHoverStyle) + }).on("mouseout", + function () { + b.css(a.visible ? e.itemStyle : e.itemHiddenStyle); + d.seriesGroup.removeClass(f); + a.setState() + }).on("click", function (b) { + var c = function () { + a.setVisible && a.setVisible() + }; + b = {browserEvent: b}; + a.firePointEvent ? a.firePointEvent("legendItemClick", b, c) : l(a, "legendItemClick", b, c) + }) + }, createCheckboxForItem: function (a) { + a.checkbox = H("input", { + type: "checkbox", + checked: a.selected, + defaultChecked: a.selected + }, this.options.itemCheckboxStyle, this.chart.container); + B(a.checkbox, "click", function (b) { + l(a.series || a, "checkboxClick", + {checked: b.target.checked, item: a}, function () { + a.select() + }) + }) + } + }); + r.legend.itemStyle.cursor = "pointer"; + u(A.prototype, { + showResetZoom: function () { + var a = this, b = r.lang, c = a.options.chart.resetZoomButton, d = c.theme, f = d.states, g = "chart" === c.relativeTo ? null : "plotBox"; + this.resetZoomButton = a.renderer.button(b.resetZoom, null, null, function () { + a.zoomOut() + }, d, f && f.hover).attr({ + align: c.position.align, + title: b.resetZoomTitle + }).addClass("highcharts-reset-zoom").add().align(c.position, !1, g) + }, zoomOut: function () { + var a = this; + l(a, "selection", {resetSelection: !0}, function () { + a.zoom() + }) + }, zoom: function (a) { + var c, d = this.pointer, g = !1, l; + !a || a.resetSelection ? f(this.axes, function (a) { + c = a.zoom() + }) : f(a.xAxis.concat(a.yAxis), function (a) { + var b = a.axis; + d[b.isXAxis ? "zoomX" : "zoomY"] && (c = b.zoom(a.min, a.max), b.displayBtn && (g = !0)) + }); + l = this.resetZoomButton; + g && !l ? this.showResetZoom() : !g && b(l) && (this.resetZoomButton = l.destroy()); + c && this.redraw(t(this.options.chart.animation, a && a.animation, 100 > this.pointCount)) + }, pan: function (a, b) { + var c = this, d = c.hoverPoints, + e; + d && f(d, function (a) { + a.setState() + }); + f("xy" === b ? [1, 0] : [1], function (b) { + b = c[b ? "xAxis" : "yAxis"][0]; + var d = b.horiz, f = a[d ? "chartX" : "chartY"], d = d ? "mouseDownX" : "mouseDownY", g = c[d], h = (b.pointRange || 0) / 2, k = b.getExtremes(), l = b.toValue(g - f, !0) + h, h = b.toValue(g + b.len - f, !0) - h, m = h < l, g = m ? h : l, l = m ? l : h, h = Math.min(k.dataMin, k.min) - g, k = l - Math.max(k.dataMax, k.max); + b.series.length && 0 > h && 0 > k && (b.setExtremes(g, l, !1, !1, {trigger: "pan"}), e = !0); + c[d] = f + }); + e && c.redraw(!1); + G(c.container, {cursor: "move"}) + } + }); + u(m.prototype, { + select: function (a, + b) { + var c = this, e = c.series, g = e.chart; + a = t(a, !c.selected); + c.firePointEvent(a ? "select" : "unselect", {accumulate: b}, function () { + c.selected = c.options.selected = a; + e.options.data[d(c, e.data)] = c.options; + c.setState(a && "select"); + b || f(g.getSelectedPoints(), function (a) { + a.selected && a !== c && (a.selected = a.options.selected = !1, e.options.data[d(a, e.data)] = a.options, a.setState(""), a.firePointEvent("unselect")) + }) + }) + }, onMouseOver: function (a, b) { + var c = this.series, d = c.chart, e = d.tooltip, f = d.hoverPoint; + if (this.series) { + if (!b) { + if (f && + f !== this)f.onMouseOut(); + if (d.hoverSeries !== c)c.onMouseOver(); + d.hoverPoint = this + } + !e || e.shared && !c.noSharedTooltip ? e || this.setState("hover") : (this.setState("hover"), e.refresh(this, a)); + this.firePointEvent("mouseOver") + } + }, onMouseOut: function () { + var a = this.series.chart, b = a.hoverPoints; + this.firePointEvent("mouseOut"); + b && -1 !== d(this, b) || (this.setState(), a.hoverPoint = null) + }, importEvents: function () { + if (!this.hasImportedEvents) { + var a = C(this.series.options.point, this.options).events, b; + this.events = a; + for (b in a)B(this, + b, a[b]); + this.hasImportedEvents = !0 + } + }, setState: function (a, b) { + var c = Math.floor(this.plotX), d = this.plotY, e = this.series, f = e.options.states[a] || {}, l = g[e.type].marker && e.options.marker, m = l && !1 === l.enabled, n = l && l.states && l.states[a] || {}, p = !1 === n.enabled, k = e.stateMarkerGraphic, q = this.marker || {}, r = e.chart, z = e.halo, C, A = l && e.markerAttribs; + a = a || ""; + if (!(a === this.state && !b || this.selected && "select" !== a || !1 === f.enabled || a && (p || m && !1 === n.enabled) || a && q.states && q.states[a] && !1 === q.states[a].enabled)) { + A && (C = e.markerAttribs(this, + a)); + if (this.graphic)this.state && this.graphic.removeClass("highcharts-point-" + this.state), a && this.graphic.addClass("highcharts-point-" + a), this.graphic.attr(e.pointAttribs(this, a)), C && this.graphic.animate(C, t(r.options.chart.animation, n.animation, l.animation)), k && k.hide(); else { + if (a && n) { + l = q.symbol || e.symbol; + k && k.currentSymbol !== l && (k = k.destroy()); + if (k)k[b ? "animate" : "attr"]({ + x: C.x, + y: C.y + }); else l && (e.stateMarkerGraphic = k = r.renderer.symbol(l, C.x, C.y, C.width, C.height).add(e.markerGroup), k.currentSymbol = + l); + k && k.attr(e.pointAttribs(this, a)) + } + k && (k[a && r.isInsidePlot(c, d, r.inverted) ? "show" : "hide"](), k.element.point = this) + } + (c = f.halo) && c.size ? (z || (e.halo = z = r.renderer.path().add(A ? e.markerGroup : e.group)), z[b ? "animate" : "attr"]({d: this.haloPath(c.size)}), z.attr({"class": "highcharts-halo highcharts-color-" + t(this.colorIndex, e.colorIndex)}), z.point = this, z.attr(u({ + fill: this.color || e.color, + "fill-opacity": c.opacity, + zIndex: -1 + }, c.attributes))) : z && z.point && z.point.haloPath && z.animate({d: z.point.haloPath(0)}); + this.state = + a + } + }, haloPath: function (a) { + return this.series.chart.renderer.symbols.circle(Math.floor(this.plotX) - a, this.plotY - a, 2 * a, 2 * a) + } + }); + u(c.prototype, { + onMouseOver: function () { + var a = this.chart, b = a.hoverSeries; + if (b && b !== this)b.onMouseOut(); + this.options.events.mouseOver && l(this, "mouseOver"); + this.setState("hover"); + a.hoverSeries = this + }, onMouseOut: function () { + var a = this.options, b = this.chart, c = b.tooltip, d = b.hoverPoint; + b.hoverSeries = null; + if (d)d.onMouseOut(); + this && a.events.mouseOut && l(this, "mouseOut"); + !c || a.stickyTracking || + c.shared && !this.noSharedTooltip || c.hide(); + this.setState() + }, setState: function (a) { + var b = this, c = b.options, d = b.graph, g = c.states, h = c.lineWidth, c = 0; + a = a || ""; + if (b.state !== a && (f([b.group, b.markerGroup], function (c) { + c && (b.state && c.removeClass("highcharts-series-" + b.state), a && c.addClass("highcharts-series-" + a)) + }), b.state = a, !g[a] || !1 !== g[a].enabled) && (a && (h = g[a].lineWidth || h + (g[a].lineWidthPlus || 0)), d && !d.dashstyle))for (g = {"stroke-width": h}, d.attr(g); b["zone-graph-" + c];)b["zone-graph-" + c].attr(g), c += 1 + }, setVisible: function (a, + b) { + var c = this, d = c.chart, e = c.legendItem, g, m = d.options.chart.ignoreHiddenSeries, n = c.visible; + g = (c.visible = a = c.options.visible = c.userOptions.visible = void 0 === a ? !n : a) ? "show" : "hide"; + f(["group", "dataLabelsGroup", "markerGroup", "tracker", "tt"], function (a) { + if (c[a])c[a][g]() + }); + if (d.hoverSeries === c || (d.hoverPoint && d.hoverPoint.series) === c)c.onMouseOut(); + e && d.legend.colorizeItem(c, a); + c.isDirty = !0; + c.options.stacking && f(d.series, function (a) { + a.options.stacking && a.visible && (a.isDirty = !0) + }); + f(c.linkedSeries, function (b) { + b.setVisible(a, + !1) + }); + m && (d.isDirtyBox = !0); + !1 !== b && d.redraw(); + l(c, g) + }, show: function () { + this.setVisible(!0) + }, hide: function () { + this.setVisible(!1) + }, select: function (a) { + this.selected = a = void 0 === a ? !this.selected : a; + this.checkbox && (this.checkbox.checked = a); + l(this, a ? "select" : "unselect") + }, drawTracker: a.drawTrackerGraph + }) + })(L); + (function (a) { + var B = a.Chart, A = a.each, H = a.inArray, G = a.isObject, r = a.pick, g = a.splat; + B.prototype.setResponsive = function (a) { + var f = this.options.responsive; + f && f.rules && A(f.rules, function (f) { + this.matchResponsiveRule(f, + a) + }, this) + }; + B.prototype.matchResponsiveRule = function (f, g) { + var l = this.respRules, q = f.condition, d; + d = q.callback || function () { + return this.chartWidth <= r(q.maxWidth, Number.MAX_VALUE) && this.chartHeight <= r(q.maxHeight, Number.MAX_VALUE) && this.chartWidth >= r(q.minWidth, 0) && this.chartHeight >= r(q.minHeight, 0) + }; + void 0 === f._id && (f._id = a.uniqueKey()); + d = d.call(this); + !l[f._id] && d ? f.chartOptions && (l[f._id] = this.currentOptions(f.chartOptions), this.update(f.chartOptions, g)) : l[f._id] && !d && (this.update(l[f._id], g), delete l[f._id]) + }; + B.prototype.currentOptions = function (a) { + function f(a, d, b, l) { + var p, q; + for (p in a)if (!l && -1 < H(p, ["series", "xAxis", "yAxis"]))for (a[p] = g(a[p]), b[p] = [], q = 0; q < a[p].length; q++)b[p][q] = {}, f(a[p][q], d[p][q], b[p][q], l + 1); else G(a[p]) ? (b[p] = {}, f(a[p], d[p] || {}, b[p], l + 1)) : b[p] = d[p] || null + } + + var l = {}; + f(a, this.options, l, 0); + return l + } + })(L); + return L +}); diff --git a/Yangcai365_design/manage/zinc/css/base.css b/Yangcai365_design/manage/zinc/css/base.css new file mode 100644 index 0000000..5c23b32 --- /dev/null +++ b/Yangcai365_design/manage/zinc/css/base.css @@ -0,0 +1,39 @@ +.reg-box{width:100%; height:100%; background: url(../../ztmpl/zhiqim_manager/index_bg_00.jpg) no-repeat top center;background-size:auto 100%;} +a,a:visited{color:#333;text-decoration:none;cursor:pointer;} +a:active,a:hover{color:#1e7eec;text-decoration:none;} +.clear:after{content:'';display:block;clear:both;height:0;overflow:hidden;visibility:hidden;} +.clear{zoom:1;} + +/****注册 ****/ +.header{width:100%;background:rgba(255,255,255,.3); filter:alpha(opacity=30); height:40px; line-height:40px; padding:0 0 0 10px; color:#fff; font-size:14px;} +.reg-footer{position:fixed;bottom:0px; width:100%;height:40px;background:rgba(255,255,255,0.2);line-height:40px;text-align:center;color:#fff;} +.reg-login{width:825px; background:rgba(255,255,255,.3); filter:alpha(opacity=30); border-radius:12px; position: absolute; right:7%; top:50%; margin:-260px 0 0 0;} +.p-login{ margin:-210px 0 0 0;} +input{background:#fff;color:#86BFE9; width:300px; font-size:14px;border:1px solid #3b8edc;border-radius:5px;height:45px;line-height:45px;text-indent:10px;} + .design-logo{float:left; padding:170px 40px 0 40px;} + .p-int{ padding:120px 40px 0 40px;} + input::-webkit-input-placeholder{color:#86BFE9;} + .input-code{ width:192px;} + .reg-h{ font-size:20px; color:#fff; padding:0 0 10px 0;} + .reg{ float:left; width:450px; border-left:1px solid #fff; padding:0 0 0 50px; margin:30px 0;} + .reg-list{ float:left; margin:20px 0 0 0; width:100%;} + .reg-list button{ width:100px; float:right; margin:0 12px 0 0; background:#427ae1; border:none; line-height:42px; border-radius:5px; color:#fff; font-size:14px;} + .reg-list span{ width:86px; float:left; color:#fff; font-size:14px; line-height:45px;} + .reg-btn{ float:left; background:#427ae1; color:#fff; width:180px; line-height:40px; margin:10px 0 0 110px; border:none; border-radius:5px; font-size:14px;} + .p-btn{ margin:30px 0 0 110px;} + .agree-popup{position: fixed; top:50%; left:50%; width:60%; height:600px; margin:-300px 0 0 -30%; background:#fff; display:none; } + .agree-title{ font-size:16px; line-height:48px; border-bottom:1px solid #dfdfdf; color:#666; padding:0 0 0 20px;} + .agree-content{ overflow-y:scroll; height:552px;} + .agree-title span{float:right; line-height:44px; padding:0 20px; font-size:20px; color:#999; cursor:pointer;} + .z-checkbox{ border:2px solid #fff; border-radius:16px; width:18px; height:18px; } +.z-checkbox:hover{ border:2px solid #2fb6d4!important;} +.z-checkbox.z-active{ background-color:#2fb6d4!important; border:#2fb6d4!important; background-position: 0 -191px;} +.reg-check{ text-align:center; font-size:14px; line-height:40px; float:left; width:100%; margin:20px 0 0 0; color:#fff;} +.reg-check a{color:#2fb6d4;} +.reg-title{ font-size:14px; color:#fff; position: absolute; top:34px; right:30px;} +.reg-title a{color:#ffd200;} +.agree-content{padding:20px;} +.agree-content h2{font-size:18px;} +.agree-content p{ font-size:14px; color:#666; line-height:36px;} + + \ No newline at end of file diff --git a/Yangcai365_design/manage/zinc/css/design_2018102301.css b/Yangcai365_design/manage/zinc/css/design_2018102301.css new file mode 100644 index 0000000..c63f55f --- /dev/null +++ b/Yangcai365_design/manage/zinc/css/design_2018102301.css @@ -0,0 +1,124 @@ +/*瀑布*/ +.srcFileList{ + /* + -moz-column-count:5; + -webkit-column-count:5; + column-count:5; + -moz-column-gap: 1em; + -webkit-column-gap: 1em; + column-gap: 1em; + */ + overflow:hidden; +} +.srcFileList:before,.srcFileList:after{content:"";display:table;} +.srcFileList:after{clear:both;} + +/*一个内容层*/ +.item{ + padding: 1em; + position:relative; + /* + -moz-page-break-inside: avoid; + -webkit-column-break-inside: avoid; + break-inside: avoid; + */ + width:20%; + float:left; + overflow:hidden; +} + +.item>div{ + padding: 10px; + background-color: #fff; + width:100%; + height:100%; + overflow:hidden; + position:relative; +} +.item>div:hover{ + -webkit-box-shadow: #666 0px 0px 10px; + -moz-box-shadow: #666 0px 0px 10px; + box-shadow: #666 0px 0px 10px; + behavior: url(/PIE.htc); +} +.item>div>img{ + width: 100%; +} + +.z-tabnav-main>nav span.z-cover{height:35px;line-height:1;} +.z-tabnav-main>nav span.z-cover li{height:auto;} + +/** 申请精品 **/ +.applyEssenceBtn{width:40px;height:130px;right:20px;top:50%;margin-top:-50px;font-size:16px;text-align:center;line-height:20px;background:#1299ec;color:#fff;box-shadow:0 0 10px 0 rgba(0,0,0,.3);border-radius:5px;cursor:pointer;z-index:999;overflow:hidden;} +.applyEssenceBtn:hover{background:#28a3ef} +.applyEssenceBtn>span{display:block;} +.applyEssenceBtn>span{padding:12px 10px 18px;} +.applyEssenceBtn>span:last-child:hover{background:#0b85d0} +.applyEssenceBtn>span:first-child,.applyEssenceBtn.active>span:last-child{display:block;} +.applyEssenceBtn>span:last-child,.applyEssenceBtn.active>span:first-child{display:none;} +.item>.checkBox{display:none;left:0;top:0;background:rgba(255,255,255,.8);background-clip:content-box;padding:1em;} +/** +.item.selectedItem>.checkBox{display:block;} +.item.selectedItem>.checkBox::before{content:"\f00d";font-family:"z-font" !important;font-style:normal;-webkit-font-smoothing:antialiased;-webkit-text-stroke-width:0.2px;-moz-osx-font-smoothing:grayscale; + font-size:30px;position: absolute;left:50%;top:50%;width:30px;height:16px;margin-top:-8px;margin-left:-15px;color:#006400;} +**/ +.item>.checkBox>input{visibility: hidden;} + +/** 悬浮操作按钮 **/ +.item>div.z-bg-white.z-pointer:hover .itemCtrBar{display:block;} +.itemCtrBar{top:0;right:0;bottom:0;left:0;padding:10px;display:none;background:rgba(0,0,0,.3);background-origin:content-box;background-clip:content-box;pointer-events:none;} +.itemCtrBar>button,.itemCtrBar>.itemCtrBar-item{pointer-events:auto;} +.itemCtrBar>.itemCtrBar-item{width:30px;height:30px;margin:15px;text-align:center;line-height:26px;border-radius:50%;background:#fff;opacity:.9;} +.itemCtrBar>.itemCtrBar-item-delete,.selectedItem .itemCtrBar>.itemCtrBar-item-success{display:none;} +.selectedItem .itemCtrBar>.itemCtrBar-item-delete{display:block;} + +.selectedItemBar{content:"精品";border-color:transparent transparent #f55 #f55;} + +/** 显示 **/ +.allItem-info::before{position:absolute;font-size:12px;white-space:nowrap;color:#fff;text-indent:-20px;line-height:15px;bottom:0;border-width:16px 22px;border-style:solid;width:0;height:0;} +.allItem-info{width:100%;height:32px;line-height:35px;left:0;bottom:0;color:#fff;background:rgba(0,0,0,.3);text-indent:35px} + +/** 精品显示 **/ +.bestItem .allItem-info::before{content:"精品";left:0;border-color:transparent transparent #f55 #f55} + +/** 模板显示 **/ +.modelItem .allItem-info::before{content:"模板";left:0;border-color:transparent transparent #00a2eb #00a2eb;} + +/** 订单显示 **/ +.orderItem .allItem-info::before{content:"定稿";left:0;border-color:transparent transparent #9e70ca #9e70ca;} + +/** 临时显示 **/ +.temporaryItem .allItem-info::before{content:"临时";left:0;border-color:transparent transparent #fb53cf #fb53cf;} + +/**我的显示**/ +.myItem .allItem-info::before{content:"我的";left:0;border-color:transparent transparent #fb53cf #fb53cf;} + + + +/** 已选显示 **/ +.selectedItemBar{right:0;top:0;text-indent:-4px;line-height:15px;border-color:#008b8b #008b8b transparent transparent;display:none;} +.selectedItemBar::before{content:"已选";position:relative;top:-14px;} +.selectedItem .selectedItemBar{display:block;} + +/** 浮动选择框 **/ +.fixedDialog{transition:right .6s;} +.fixedDialog.z-active{right:0 !important;} +.fixedDialog-title{width:36px;padding:10px 3px;font-size:16px;color:#fff;background-clip:padding-box;cursor:pointer;text-align:center;border-top-left-radius:5px;border-bottom-left-radius:5px;border-width:5px 0 5px 5px;border-style:solid;border-color:rgba(0,0,0,.1);} +.fixedDialog-content{height:100%;position:relative;background:#fff;border:1px solid #ccc;} +.fixedDialog-content ul{width:100%;height:100%;} +.fixedDialog-confirm{width:100%;position:absolute;bottom:8px;text-align:center;} +.fixedDialog-hiddenBtn{bottom:0;background:#ccc;width:36px;padding:5px 0;text-align:center;color:#fff;cursor:pointer;} + +#fixedDialog_1{height:400px;right:-210px;bottom:100px;} +#fixedDialog_content_1{width:220px;padding:5px 5px 45px 5px;} +#fixedDialog_content_1 li{float:left;position:relative;width:50%;height:25%;padding:10px;text-align:center;border:1px solid #f5f5f5;} +#fixedDialog_content_1 li::before{content:"";display:inline-block;width:0;height:100%;vertical-align:middle;} +#fixedDialog_content_1 li>img{} +#fixedDialog_content_1 li>.z-delete{position:absolute;width:100%;height:100%;left:0;top:0;padding-top:35px;background:rgba(255,255,255,.5);cursor:pointer;text-align:center;font-size:25px;display:none;} +#fixedDialog_content_1 li.z-active:hover>.z-delete{display:block;} + +/** 浮动框订单信息 **/ +#fixedDialog_2{height:200px;right:-400px;bottom:630px;} +#fixedDialog_content_2{width:410px;padding:10px;} +#fixedDialog_content_2>ul{overflow:auto;} +#fixedDialog_content_2 li{line-height:20px;padding:3px 2px;border-bottom:1px solid #f5f5f5;} diff --git a/Yangcai365_design/manage/zinc/css/dome.css b/Yangcai365_design/manage/zinc/css/dome.css new file mode 100644 index 0000000..2cb238b --- /dev/null +++ b/Yangcai365_design/manage/zinc/css/dome.css @@ -0,0 +1,104 @@ +.bos{ + width: 478px; + height: 125px; + float: left; + position: relative; + border: 1px solid #dcdcdc; + border-radius: 2px; + color: #666; + background-color: #f6f6f6; + margin-bottom: 15px; +} +.bos_son span{ + display:inline-block +} +.bos_two{ + width: 478px; + height: 680px; +} +.bos_two_one{ + width: 100%; + height: 155px; + margin-bottom: 20px; +} +.my-textarea{ + width: 100%; + height: 100%; +} +.text{ + margin-bottom: 10px; + padding-left: 5px; +} +.my_text{ + display: inline-block; +} +.btn{ + display: inline-block; + margin-left: 242px; + +} +.my_bos_two_one{ + margin-top: 35px; +} +.my_btn{ + position: absolute; + top: 45%; + left: 30.5%; + line-height: 24px; + font-size: 16px; +} +.boxs{ + float: left; + width: 515px; +} +.boxs_two{ + float: right; + /*margin-left: 100px;*/ + width: 1048px; + position: absolute; + top: 20px; + right: 65px; +} +.boxs_two ul li{ + width:159px; + height:100%; + text-align: center; + line-height: 45px !important; +} +.boxs_sons{ + width: 100%; + height:100%; + border-radius: 2px; + color: #666; + /* border: 1px solid #dcdcdc;*/ + border: none; + background-color: #ffffff +} +.my_z-float-right{ + width: 116px; + height: 48px !important; +} +.mystyle{ + height: 100% !important; + margin-bottom: 6px; +} +.mystyle_svg{ + /* height:945px;*/ + width: 100%; + height:100%; +} +.boxs_svg{ + width:1050px; + height:950px; +} +.mybtn_style_one{ + position: absolute; + top:5px; + right:10px; +} +.mybtn_style_two{ + position: absolute; + top:5px; + right:115px; +} + diff --git a/Yangcai365_design/manage/zinc/css/plugin.css b/Yangcai365_design/manage/zinc/css/plugin.css new file mode 100644 index 0000000..441659e --- /dev/null +++ b/Yangcai365_design/manage/zinc/css/plugin.css @@ -0,0 +1,46 @@ +.min-width{min-width:450px;} + +.main{position: relative;} +.main .box{padding: 10px 0 0 10px; float: left;} +.main .box .pic{padding: 5px; border: 1px solid #CCCCCC;border-radius: 5px; box-shadow: 0 0 5px #ccc;cursor:pointer} +.main .box .pic >img{width: 150px; height: auto;} +.main .box .pic .cont{width: 150px; height: auto; word-wrap:break-word;} +.main .box .pic .z-content{width:auto !important;} + +/*列表*/ +.list-file{overflow:hidden;} +.list-file:before,.list-file:after{content:"";display:table;} +.list-file:after{clear:both;} + +/*内容项*/ +.list-file .item{ + padding: 5px; + position:relative; + width:33.3%; + float:left; + overflow:hidden; +} + +.list-file .item>div{ + padding: 3px; + background-color: #fff; + width:100%; + height:100%; + overflow:hidden; + position:relative; + border: 1px solid #CCCCCC; + border-radius: 5px; + box-shadow: 0 0 5px #ccc; + cursor:pointer; +} + +.list-file .item>div:hover{ + -webkit-box-shadow: #666 0px 0px 10px; + -moz-box-shadow: #666 0px 0px 10px; + box-shadow: #666 0px 0px 10px; + behavior: url(/PIE.htc); +} + +.list-file .item>div>img{width: 100%;} + +.list-file .z-content{width:auto !important;} diff --git a/Yangcai365_design/manage/zinc/css/sweetalert2.min.css b/Yangcai365_design/manage/zinc/css/sweetalert2.min.css new file mode 100644 index 0000000..cbe0ba4 --- /dev/null +++ b/Yangcai365_design/manage/zinc/css/sweetalert2.min.css @@ -0,0 +1 @@ +@-webkit-keyframes swal2-show{0%{-webkit-transform:scale(.7);transform:scale(.7)}45%{-webkit-transform:scale(1.05);transform:scale(1.05)}80%{-webkit-transform:scale(.95);transform:scale(.95)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes swal2-show{0%{-webkit-transform:scale(.7);transform:scale(.7)}45%{-webkit-transform:scale(1.05);transform:scale(1.05)}80%{-webkit-transform:scale(.95);transform:scale(.95)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}100%{-webkit-transform:scale(.5);transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}100%{-webkit-transform:scale(.5);transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.875em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.875em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}5%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}12%{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}100%{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}5%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}12%{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}100%{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;-webkit-transform:scale(.4);transform:scale(.4);opacity:0}50%{margin-top:1.625em;-webkit-transform:scale(.4);transform:scale(.4);opacity:0}80%{margin-top:-.375em;-webkit-transform:scale(1.15);transform:scale(1.15)}100%{margin-top:0;-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;-webkit-transform:scale(.4);transform:scale(.4);opacity:0}50%{margin-top:1.625em;-webkit-transform:scale(.4);transform:scale(.4);opacity:0}80%{margin-top:-.375em;-webkit-transform:scale(1.15);transform:scale(1.15)}100%{margin-top:0;-webkit-transform:scale(1);transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{-webkit-transform:rotateX(100deg);transform:rotateX(100deg);opacity:0}100%{-webkit-transform:rotateX(0);transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{-webkit-transform:rotateX(100deg);transform:rotateX(100deg);opacity:0}100%{-webkit-transform:rotateX(0);transform:rotateX(0);opacity:1}}body.swal2-toast-shown .swal2-container{background-color:transparent}body.swal2-toast-shown .swal2-container.swal2-shown{background-color:transparent}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;-webkit-transform:translateY(-50%);transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;-webkit-transform:translateY(-50%);transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}body.swal2-toast-column .swal2-toast{flex-direction:column;align-items:stretch}body.swal2-toast-column .swal2-toast .swal2-actions{flex:1;align-self:stretch;height:2.2em;margin-top:.3125em}body.swal2-toast-column .swal2-toast .swal2-loading{justify-content:center}body.swal2-toast-column .swal2-toast .swal2-input{height:2em;margin:.3125em auto;font-size:1em}body.swal2-toast-column .swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast{flex-direction:row;align-items:center;width:auto;padding:.625em;box-shadow:0 0 .625em #d9d9d9;overflow-y:hidden}.swal2-popup.swal2-toast .swal2-header{flex-direction:row}.swal2-popup.swal2-toast .swal2-title{flex-grow:1;justify-content:flex-start;margin:0 .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{position:initial;width:.8em;height:.8em;line-height:.8}.swal2-popup.swal2-toast .swal2-content{justify-content:flex-start;font-size:1em}.swal2-popup.swal2-toast .swal2-icon{width:2em;min-width:2em;height:2em;margin:0}.swal2-popup.swal2-toast .swal2-icon-text{font-size:2em;font-weight:700;line-height:1em}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{height:auto;margin:0 .3125em}.swal2-popup.swal2-toast .swal2-styled{margin:0 .3125em;padding:.3125em .625em;font-size:1em}.swal2-popup.swal2-toast .swal2-styled:focus{box-shadow:0 0 0 .0625em #fff,0 0 0 .125em rgba(50,100,150,.4)}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:2em;height:2.8125em;-webkit-transform:rotate(45deg);transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.25em;left:-.9375em;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transform-origin:2em 2em;transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.25em;left:.9375em;-webkit-transform-origin:0 2em;transform-origin:0 2em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast.swal2-show{-webkit-animation:showSweetToast .5s;animation:showSweetToast .5s}.swal2-popup.swal2-toast.swal2-hide{-webkit-animation:hideSweetToast .2s forwards;animation:hideSweetToast .2s forwards}.swal2-popup.swal2-toast .swal2-animate-success-icon .swal2-success-line-tip{-webkit-animation:animate-toast-success-tip .75s;animation:animate-toast-success-tip .75s}.swal2-popup.swal2-toast .swal2-animate-success-icon .swal2-success-line-long{-webkit-animation:animate-toast-success-long .75s;animation:animate-toast-success-long .75s}@-webkit-keyframes showSweetToast{0%{-webkit-transform:translateY(-.625em) rotateZ(2deg);transform:translateY(-.625em) rotateZ(2deg);opacity:0}33%{-webkit-transform:translateY(0) rotateZ(-2deg);transform:translateY(0) rotateZ(-2deg);opacity:.5}66%{-webkit-transform:translateY(.3125em) rotateZ(2deg);transform:translateY(.3125em) rotateZ(2deg);opacity:.7}100%{-webkit-transform:translateY(0) rotateZ(0);transform:translateY(0) rotateZ(0);opacity:1}}@keyframes showSweetToast{0%{-webkit-transform:translateY(-.625em) rotateZ(2deg);transform:translateY(-.625em) rotateZ(2deg);opacity:0}33%{-webkit-transform:translateY(0) rotateZ(-2deg);transform:translateY(0) rotateZ(-2deg);opacity:.5}66%{-webkit-transform:translateY(.3125em) rotateZ(2deg);transform:translateY(.3125em) rotateZ(2deg);opacity:.7}100%{-webkit-transform:translateY(0) rotateZ(0);transform:translateY(0) rotateZ(0);opacity:1}}@-webkit-keyframes hideSweetToast{0%{opacity:1}33%{opacity:.5}100%{-webkit-transform:rotateZ(1deg);transform:rotateZ(1deg);opacity:0}}@keyframes hideSweetToast{0%{opacity:1}33%{opacity:.5}100%{-webkit-transform:rotateZ(1deg);transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes animate-toast-success-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes animate-toast-success-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes animate-toast-success-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes animate-toast-success-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-shown{top:auto;right:auto;bottom:auto;left:auto;background-color:transparent}body.swal2-no-backdrop .swal2-shown>.swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}body.swal2-no-backdrop .swal2-shown.swal2-top{top:0;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}body.swal2-no-backdrop .swal2-shown.swal2-top-left,body.swal2-no-backdrop .swal2-shown.swal2-top-start{top:0;left:0}body.swal2-no-backdrop .swal2-shown.swal2-top-end,body.swal2-no-backdrop .swal2-shown.swal2-top-right{top:0;right:0}body.swal2-no-backdrop .swal2-shown.swal2-center{top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}body.swal2-no-backdrop .swal2-shown.swal2-center-left,body.swal2-no-backdrop .swal2-shown.swal2-center-start{top:50%;left:0;-webkit-transform:translateY(-50%);transform:translateY(-50%)}body.swal2-no-backdrop .swal2-shown.swal2-center-end,body.swal2-no-backdrop .swal2-shown.swal2-center-right{top:50%;right:0;-webkit-transform:translateY(-50%);transform:translateY(-50%)}body.swal2-no-backdrop .swal2-shown.swal2-bottom{bottom:0;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}body.swal2-no-backdrop .swal2-shown.swal2-bottom-left,body.swal2-no-backdrop .swal2-shown.swal2-bottom-start{bottom:0;left:0}body.swal2-no-backdrop .swal2-shown.swal2-bottom-end,body.swal2-no-backdrop .swal2-shown.swal2-bottom-right{right:0;bottom:0}.swal2-container{display:flex;position:fixed;top:0;right:0;bottom:0;left:0;flex-direction:row;align-items:center;justify-content:center;padding:10px;background-color:transparent;z-index:106000000;overflow-x:hidden;-webkit-overflow-scrolling:touch}.swal2-container.swal2-top{align-items:flex-start}.swal2-container.swal2-top-left,.swal2-container.swal2-top-start{align-items:flex-start;justify-content:flex-start}.swal2-container.swal2-top-end,.swal2-container.swal2-top-right{align-items:flex-start;justify-content:flex-end}.swal2-container.swal2-center{align-items:center}.swal2-container.swal2-center-left,.swal2-container.swal2-center-start{align-items:center;justify-content:flex-start}.swal2-container.swal2-center-end,.swal2-container.swal2-center-right{align-items:center;justify-content:flex-end}.swal2-container.swal2-bottom{align-items:flex-end}.swal2-container.swal2-bottom-left,.swal2-container.swal2-bottom-start{align-items:flex-end;justify-content:flex-start}.swal2-container.swal2-bottom-end,.swal2-container.swal2-bottom-right{align-items:flex-end;justify-content:flex-end}.swal2-container.swal2-grow-fullscreen>.swal2-modal{display:flex!important;flex:1;align-self:stretch;justify-content:center}.swal2-container.swal2-grow-row>.swal2-modal{display:flex!important;flex:1;align-content:center;justify-content:center}.swal2-container.swal2-grow-column{flex:1;flex-direction:column}.swal2-container.swal2-grow-column.swal2-bottom,.swal2-container.swal2-grow-column.swal2-center,.swal2-container.swal2-grow-column.swal2-top{align-items:center}.swal2-container.swal2-grow-column.swal2-bottom-left,.swal2-container.swal2-grow-column.swal2-bottom-start,.swal2-container.swal2-grow-column.swal2-center-left,.swal2-container.swal2-grow-column.swal2-center-start,.swal2-container.swal2-grow-column.swal2-top-left,.swal2-container.swal2-grow-column.swal2-top-start{align-items:flex-start}.swal2-container.swal2-grow-column.swal2-bottom-end,.swal2-container.swal2-grow-column.swal2-bottom-right,.swal2-container.swal2-grow-column.swal2-center-end,.swal2-container.swal2-grow-column.swal2-center-right,.swal2-container.swal2-grow-column.swal2-top-end,.swal2-container.swal2-grow-column.swal2-top-right{align-items:flex-end}.swal2-container.swal2-grow-column>.swal2-modal{display:flex!important;flex:1;align-content:center;justify-content:center}.swal2-container:not(.swal2-top):not(.swal2-top-start):not(.swal2-top-end):not(.swal2-top-left):not(.swal2-top-right):not(.swal2-center-start):not(.swal2-center-end):not(.swal2-center-left):not(.swal2-center-right):not(.swal2-bottom):not(.swal2-bottom-start):not(.swal2-bottom-end):not(.swal2-bottom-left):not(.swal2-bottom-right):not(.swal2-grow-fullscreen)>.swal2-modal{margin:auto}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.swal2-container .swal2-modal{margin:0!important}}.swal2-container.swal2-fade{transition:background-color .1s}.swal2-container.swal2-shown{background-color:rgba(0,0,0,.4)}.swal2-popup{display:none;position:relative;flex-direction:column;justify-content:center;width:32em;max-width:100%;padding:1.25em;border-radius:.3125em;background:#fff;font-family:inherit;font-size:1rem;box-sizing:border-box}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-popup .swal2-header{display:flex;flex-direction:column;align-items:center}.swal2-popup .swal2-title{display:block;position:relative;max-width:100%;margin:0 0 .4em;padding:0;color:#595959;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-popup .swal2-actions{flex-wrap:wrap;align-items:center;justify-content:center;margin:1.25em auto 0;z-index:1}.swal2-popup .swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-popup .swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-popup .swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-popup .swal2-actions.swal2-loading .swal2-styled.swal2-confirm{width:2.5em;height:2.5em;margin:.46875em;padding:0;border:.25em solid transparent;border-radius:100%;border-color:transparent;background-color:transparent!important;color:transparent;cursor:default;box-sizing:border-box;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-popup .swal2-actions.swal2-loading .swal2-styled.swal2-cancel{margin-right:30px;margin-left:30px}.swal2-popup .swal2-actions.swal2-loading :not(.swal2-styled).swal2-confirm::after{display:inline-block;width:15px;height:15px;margin-left:5px;border:3px solid #999;border-radius:50%;border-right-color:transparent;box-shadow:1px 1px 1px #fff;content:'';-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal}.swal2-popup .swal2-styled{margin:.3125em;padding:.625em 2em;font-weight:500;box-shadow:none}.swal2-popup .swal2-styled:not([disabled]){cursor:pointer}.swal2-popup .swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#3085d6;color:#fff;font-size:1.0625em}.swal2-popup .swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#aaa;color:#fff;font-size:1.0625em}.swal2-popup .swal2-styled:focus{outline:0;box-shadow:0 0 0 2px #fff,0 0 0 4px rgba(50,100,150,.4)}.swal2-popup .swal2-styled::-moz-focus-inner{border:0}.swal2-popup .swal2-footer{justify-content:center;margin:1.25em 0 0;padding:1em 0 0;border-top:1px solid #eee;color:#545454;font-size:1em}.swal2-popup .swal2-image{max-width:100%;margin:1.25em auto}.swal2-popup .swal2-close{position:absolute;top:0;right:0;justify-content:center;width:1.2em;height:1.2em;padding:0;transition:color .1s ease-out;border:none;border-radius:0;outline:initial;background:0 0;color:#ccc;font-family:serif;font-size:2.5em;line-height:1.2;cursor:pointer;overflow:hidden}.swal2-popup .swal2-close:hover{-webkit-transform:none;transform:none;color:#f27474}.swal2-popup>.swal2-checkbox,.swal2-popup>.swal2-file,.swal2-popup>.swal2-input,.swal2-popup>.swal2-radio,.swal2-popup>.swal2-select,.swal2-popup>.swal2-textarea{display:none}.swal2-popup .swal2-content{justify-content:center;margin:0;padding:0;color:#545454;font-size:1.125em;font-weight:300;line-height:normal;z-index:1;word-wrap:break-word}.swal2-popup #swal2-content{text-align:center}.swal2-popup .swal2-checkbox,.swal2-popup .swal2-file,.swal2-popup .swal2-input,.swal2-popup .swal2-radio,.swal2-popup .swal2-select,.swal2-popup .swal2-textarea{margin:1em auto}.swal2-popup .swal2-file,.swal2-popup .swal2-input,.swal2-popup .swal2-textarea{width:100%;transition:border-color .3s,box-shadow .3s;border:1px solid #d9d9d9;border-radius:.1875em;font-size:1.125em;box-shadow:inset 0 1px 1px rgba(0,0,0,.06);box-sizing:border-box}.swal2-popup .swal2-file.swal2-inputerror,.swal2-popup .swal2-input.swal2-inputerror,.swal2-popup .swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-popup .swal2-file:focus,.swal2-popup .swal2-input:focus,.swal2-popup .swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:0 0 3px #c4e6f5}.swal2-popup .swal2-file::-webkit-input-placeholder,.swal2-popup .swal2-input::-webkit-input-placeholder,.swal2-popup .swal2-textarea::-webkit-input-placeholder{color:#ccc}.swal2-popup .swal2-file:-ms-input-placeholder,.swal2-popup .swal2-input:-ms-input-placeholder,.swal2-popup .swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-popup .swal2-file::-ms-input-placeholder,.swal2-popup .swal2-input::-ms-input-placeholder,.swal2-popup .swal2-textarea::-ms-input-placeholder{color:#ccc}.swal2-popup .swal2-file::placeholder,.swal2-popup .swal2-input::placeholder,.swal2-popup .swal2-textarea::placeholder{color:#ccc}.swal2-popup .swal2-range input{width:80%}.swal2-popup .swal2-range output{width:20%;font-weight:600;text-align:center}.swal2-popup .swal2-range input,.swal2-popup .swal2-range output{height:2.625em;margin:1em auto;padding:0;font-size:1.125em;line-height:2.625em}.swal2-popup .swal2-input{height:2.625em;padding:0 .75em}.swal2-popup .swal2-input[type=number]{max-width:10em}.swal2-popup .swal2-file{font-size:1.125em}.swal2-popup .swal2-textarea{height:6.75em;padding:.75em}.swal2-popup .swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;color:#545454;font-size:1.125em}.swal2-popup .swal2-checkbox,.swal2-popup .swal2-radio{align-items:center;justify-content:center}.swal2-popup .swal2-checkbox label,.swal2-popup .swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-popup .swal2-checkbox input,.swal2-popup .swal2-radio input{margin:0 .4em}.swal2-popup .swal2-validation-message{display:none;align-items:center;justify-content:center;padding:.625em;background:#f0f0f0;color:#666;font-size:1em;font-weight:300;overflow:hidden}.swal2-popup .swal2-validation-message::before{display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center;content:'!';zoom:normal}@supports (-ms-accelerator:true){.swal2-range input{width:100%!important}.swal2-range output{display:none}}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.swal2-range input{width:100%!important}.swal2-range output{display:none}}@-moz-document url-prefix(){.swal2-close:focus{outline:2px solid rgba(50,100,150,.4)}}.swal2-icon{position:relative;justify-content:center;width:5em;height:5em;margin:1.25em auto 1.875em;border:.25em solid transparent;border-radius:50%;line-height:5em;cursor:default;box-sizing:content-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;zoom:normal}.swal2-icon-text{font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-success{border-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;-webkit-transform:rotate(45deg);transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transform-origin:3.75em 3.75em;transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transform-origin:0 3.75em;transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;top:-.25em;left:-.25em;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%;z-index:2;box-sizing:content-box}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;top:.5em;left:1.625em;width:.4375em;height:5.625em;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);z-index:1}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;height:.3125em;border-radius:.125em;background-color:#a5dc86;z-index:2}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.875em;width:1.5625em;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.swal2-progresssteps{align-items:center;margin:0 0 1.25em;padding:0;font-weight:600}.swal2-progresssteps li{display:inline-block;position:relative}.swal2-progresssteps .swal2-progresscircle{width:2em;height:2em;border-radius:2em;background:#3085d6;color:#fff;line-height:2em;text-align:center;z-index:20}.swal2-progresssteps .swal2-progresscircle:first-child{margin-left:0}.swal2-progresssteps .swal2-progresscircle:last-child{margin-right:0}.swal2-progresssteps .swal2-progresscircle.swal2-activeprogressstep{background:#3085d6}.swal2-progresssteps .swal2-progresscircle.swal2-activeprogressstep~.swal2-progresscircle{background:#add8e6}.swal2-progresssteps .swal2-progresscircle.swal2-activeprogressstep~.swal2-progressline{background:#add8e6}.swal2-progresssteps .swal2-progressline{width:2.5em;height:.4em;margin:0 -1px;background:#3085d6;z-index:10}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-show.swal2-noanimation{-webkit-animation:none;animation:none}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-hide.swal2-noanimation{-webkit-animation:none;animation:none}.swal2-rtl .swal2-close{right:auto;left:0}.swal2-animate-success-icon .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-animate-success-icon .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-animate-success-icon .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-animate-error-icon{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-animate-error-icon .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}@-webkit-keyframes swal2-rotate-loading{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:initial!important}} \ No newline at end of file diff --git a/Yangcai365_design/manage/zinc/css/yangcai_question_main_v1.4.0R2018031701.css b/Yangcai365_design/manage/zinc/css/yangcai_question_main_v1.4.0R2018031701.css new file mode 100644 index 0000000..72b108e --- /dev/null +++ b/Yangcai365_design/manage/zinc/css/yangcai_question_main_v1.4.0R2018031701.css @@ -0,0 +1,112 @@ +/**************************************************************************************/ +/* 布局(全局、导航、脚注) */ +/**************************************************************************************/ + +/** [全局定义] */ +html{overflow-x:auto;} +body{background:#f5f5f5;} +body,table,td,div{font-size:14px;line-height:120%;} +a,a:visited{color:#333;text-decoration:none;cursor:pointer;} +a:active,a:hover{color:#2173b2;text-decoration:none;} + +/* [主导航] */ +.mainnav{position:fixed;top:0px;width:100%;height:76px;border-bottom:1px solid #dadada;background-color:#fff;z-index:9999;} +.mainnav .mainnav-wrap{margin:0px auto;max-width:1200px;min-width:1000px;height:75px;} +.mainnav .logo{float:left;width:290px;margin-top:8px;} +.mainnav .logo-text{float:right;font-size:18px;font-weight:bold;line-height:58px;} +.mainnav .menu{float:left; font-size:16px;height:75px;text-align:center;margin:10px 5px 0px 30px;} +.mainnav .menu li{float:left; width:80px; line-height:30px; margin:12px 10px;} +.mainnav .menu li:hover{border-bottom:2px solid #4bacc6;color:#4bacc6;cursor:pointer;} +.mainnav .menu li.active{border-bottom:2px solid #4bacc6;color:#4bacc6;} + +@media screen and (max-width: 1071px) { + .mainnav .menu li{margin:12px 5px;} +} + +.mainnav .help{float:right;line-height:75px;color:#2173b2;} +.mainnav .help a{background-color:#a4132a; color:#ffffff;font-size:16px;border-radius:20px; padding:6px 15px;margin-left:15px;} + +/* [导航固定96px] */ +.navmargin{position:relative;width:100%;height:96px;} + +.scrolltotop{position:fixed;right:20px;bottom:20px;display:none;z-index:99999;border:1px solid #d3d3d3;padding:10px;cursor:pointer;} +.scrolltotop:hover{background-color:#333;} + +/* [脚注] */ +.footer {position:relative;width:100%;min-width:1200px;z-index:0;display:block;border-top:1px solid #e6e6e6;overflow:hidden;background:#fff;} +.footer-wrap {margin:10px auto;height:160px;width:1200px;text-align:center;color:#333;font-size:14px;} +.footer li {float:left;height:130px;margin:10px 20px 10px 0;text-align:left;line-height:30px;color:#888;} +.footer li a {margin:10px;color:#888;} +.footer li a:hover {color:#4bacc6;} +.footer li.fproduct{width:180px;margin-left:30px;} +.footer li.fhelp{width:222px;} +.footer li.fabout{width:190px;} +.footer li.abountus {width:300px;} +.footer li.fproduct,.footer li.fhelp,.footer li.fabout{border-right:1px dashed #ccc;} + +@media screen and (max-width: 1071px) { + .footer li.fproduct{width:140px;} + .footer li.fhelp{width:180px;} + .footer li.fabout{width:150px;} + .footer li.abountus {width:280px;} +} + +.footer-cp {position:relative;width:100%;min-width:1200px;height:85px;line-height:85px;background-color:#eee;overflow:hidden;} +.footer-cp-wrap{position:relative;margin:0 auto;width:1200px;height:85px;z-index:0;display:block;overflow:hidden;} +.footer-cp .footer-text{width:1200px;height:85px;line-height:85px;text-align:center;} +@media screen and (max-width: 1071px) { + .footer-cp-wrap{width:1000px;} + .footer-cp .footer-text{width:1000px;margin-left:-100px;} +} + + +/**************************************************************************************/ +/* 容器内容 */ +/**************************************************************************************/ + +/** [容器定义] */ +.container {position:relative;margin:0 auto;padding-bottom:20px;height:auto !important;min-height:1200px;width:1200px;overflow:hidden;z-index:0;} + +/* [左导航] */ +.sidebar {position:relative;float:left;height:100%;padding-bottom:30px;overflow:hidden;width:220px;background:#fff;border:1px solid #e5e5e5;border-radius:3px;} +.sidebar main {position:relative;display:block;width:100%;height:98px;line-height:98px;font-size:16px;text-align:center;color:#333;cursor:pointer;border-bottom:1px solid #f5f5f5;} +.sidebar main.selected{color:#007d7e;border:1px solid #e6e6e6;background-color:#eee;} + +.sidebar p{position:relative;padding:0 40px;height:40px;line-height:40px;font-size:16px;color:#333;cursor:pointer;border-bottom:1px solid #eee;} +.sidebar p .z-font{position:absolute;font-size:14px;left:15px;bottom:0;} +.sidebar ul{position:relative;height:auto;overflow:hidden;line-height:40px;background:#f9f9f9;} +.sidebar ul li{display:block;padding:0 40px;line-height:38px;cursor:pointer;font-size:14px;color:#777;border:1px solid transparent;} +.sidebar ul li:hover{color:#2173b2;text-decoration:none;} +.sidebar p.z-selected,.sidebar ul li.z-selected{color:#fff; background-color:#2173b2;} + +/* [主体部分] */ +.mainbody{position:relative;float:right;width:960px;background:#fff;border:1px solid #e5e5e5;border-radius:3px;} +/* [搜索框]*/ +.mainsearch{text-align:center;padding:30px 10px;border-bottom:1px solid #f5f5f5;} +.mainsearch .z-input{width:600px;font-size:14px;border-color:#2173b2;} +.mainsearch .z-button{width:60px;height:38px;margin-left:-1px;font-family:"z-font";font-size:20px;background:#2173b2;border-color:#2173b2;box-shadow:none;color:#fff;} +/* [问题显示主体] */ +.questionbody{padding:20px 40px 80px;} +/*文章列表*/ +.article-list dd{margin:0;font-size:15px;line-height:38px;} +/*文章内容*/ +.article {} +.article,.article div{line-height:30px;font-size:15px;} +.article h1{font-weight:normal;} + +/* [搜索结果] */ +.search-resultBar {border-bottom:1px solid #fcfcfc;} +.search-resultBar span{display:inline-block;max-width:300px;overflow:hidden;white-space:nowrap;text-overflow: ellipsis;vertical-align:top;color:#a4132a;} +.search-resultList {} +.search-resultList dt{margin:30px 0 10px;} +.search-resultList dt a{display:inline-block;font-size:15px;color:#2173b2;line-height:30px;} +.search-resultList dt a:hover{text-decoration:underline;color:#a4132a;} +.search-resultList dd{margin:0;color:#666;line-height:20px;} + +/**************************************************************************************/ +/* Mobile配置 */ +/**************************************************************************************/ + +/* [脚注](Mobile) */ +.m-footer {position:relative;width:100%;border-top:1px solid #e6e6e6;background-color:#eee;padding:4% 0px;} +.m-footer-wrap {width:100%;height:100%;color:#333;text-align:center;font-size:12px;height:28px;line-height:28px;} diff --git a/Yangcai365_design/manage/zinc/css/zhiqim_search_auto_list_v1.4.0R2018031701.js b/Yangcai365_design/manage/zinc/css/zhiqim_search_auto_list_v1.4.0R2018031701.js new file mode 100644 index 0000000..064bf7a --- /dev/null +++ b/Yangcai365_design/manage/zinc/css/zhiqim_search_auto_list_v1.4.0R2018031701.js @@ -0,0 +1,286 @@ ++(function(Z) +{ +//BEGIN + +Z.SearchAutoList = Z.Class.newInstance(); +Z.SearchAutoList.prototype = +{ + defaults: + { + elem: null, //输入框/输入框盒子ID + className: null, //Ajax调用的类名 + methodName: null, //Ajax调用的类方法 + history: true, //历史记录显示 + callback: null //选中后的回调函数 + }, + + execute: function() + { + this.$elem = Z.$elem(this.elem, "Z.SearchAutoList"); + this.id = this.$elem.attr("id") || "FSearchAutoList"; + + this.width = this.$elem.offsetWidth(); + var height = this.$elem.offsetHeight(); + var fontSize = this.$elem.css("fontSize"); + this.pdLeft = this.$elem.css("paddingLeft"); + this.pdRight = this.$elem.css("paddingRight"); + this.lHeight = this.$elem.css("lineHeight"); + + this.$cover = Z.$cover(this.$elem); + this.$list = Z('
    ') + .css({width: this.width, left: 0, top: height-1, fontSize: fontSize, zIndex: 99}) + .appendTo(this.$cover); + + //事件绑定 + this.$elem.on("focus", this.onFocus, this); + this.$elem.on("input", this.onInput, this); + this.$elem.keydown(this.onKeyDown, this); + Z(document).click(this.onDocClick, this); + }, + + onFocus: function(e) + {//获取焦点事件 + this.value = Z.S.trim(this.$elem.val()); + if (Z.V.isEmptyBlank(this.value)) + { + this.doHistoryList(); + return; + } + + if (this.beforeValue == this.value) + {//内容不改变 + if (this.$list.html() != "") + this.$list.show(); + } + else + {//内容已改变 + this.beforeValue = this.value; + this.$list.show(); + this.doAjax(); + } + }, + + onInput: function(e) + {//input事件 + this.value = Z.S.trim(this.$elem.val()); + if (Z.V.isEmptyBlank(this.value)) + { + this.doHistoryList(); + return; + } + + if (this.beforeValue != this.value) + {//调用查询 + this.beforeValue = this.value; + this.$list.show(); + this.doAjax(); + } + }, + + //ajax调用,生成列表 + doAjax: function() + { + this.ajax = new Z.Ajax(); + this.ajax._this = this; + this.ajax.setClassName(this.className); + this.ajax.setMethodName(this.methodName); + this.ajax.addParam(this.value); + this.ajax.setCallback(function() + { + var _this = this._this; + var titleList = Z.J.toObject(this.responseText); + if (titleList.length == 0) + { + _this.$list.html("").hide(); + return; + } + + var html = '
      '; + Z.eachof(_this, titleList, function(item){ + html += '
    • ' + item + "
    • "; + }); + html += "
    "; + + _this.$list.html(html); + _this.lis = _this.$list.find("li"); + _this.lis.click(_this.doSelect, _this); + _this.lis.mouseenter(_this.onMouseEnter, _this); + _this.lis.mouseleave(_this.onMouseLeave, _this); + }); + this.ajax.execute(); + }, + + doSelect: function(e) + {//鼠标选中 + Z.E.forbidden(e); + + this.beforeValue = this.value; + this.value = Z(Z.E.target(e)).text(); + this.$elem.val(this.value); + + this.$list.hide(); + this.doAjax(); + + this.saveHistory(e); + this.doCallback(e); + }, + + onDocClick: function(e) + {//空白处点击,隐藏列表 + var target = Z.E.target(e); + if (target == this.$elem[0]) + return; + + this.$list.hide(); + if (this.beforeValue != this.value) + {//静默调用 + this.beforeValue = this.value; + this.doAjax(); + } + }, + + onKeyDown: function(e) + {//键盘 “上” “下” “回车”按键监听 + var keyVal = Z.E.key(e); + if (keyVal != Z.E.KEY.UP && keyVal != Z.E.KEY.DOWN && keyVal != Z.E.KEY.ENTER) + return; + + Z.E.forbidden(e); + if (this.lis) + {//有选择列表的搜索框 + var liSetLength = this.lis.length; + var liActive = this.$list.find(".z-bg-gray"); + var liActiveIndex = -1; + var toIndex = null; + if (liActive.length != 0) + liActiveIndex = Z.EL.parentIndex(liActive[0]); + + switch (keyVal) + { + case Z.E.KEY.UP://上 + toIndex = liActiveIndex - 1; + if (toIndex <= -1) + toIndex = liSetLength - 1; + break; + case Z.E.KEY.DOWN://下 + toIndex = liActiveIndex + 1; + if (toIndex == liSetLength) + toIndex = 0; + break; + case Z.E.KEY.ENTER://回车选中 + this.$elem[0].blur(); + this.$list.hide(); + this.value = Z.S.trim(this.$elem.val()); + this.beforeValue = this.value; + this.doAjax(); + this.saveHistory(e); + this.doCallback(e); + return; + } + toIndex++; + this.lis.removeClass("z-bg-gray"); + var toLi = this.$list.find("li:nth-child(" + toIndex +")").addClass("z-bg-gray"); + this.value = toLi.html(); + this.$elem.val(toLi.html()); + } + else if (keyVal == Z.E.KEY.ENTER) + {//直接在输入框回车搜索 + this.value = Z.S.trim(this.$elem.val()); + this.beforeValue = this.value; + this.doAjax(); + this.saveHistory(e); + this.doCallback(e); + } + }, + + //选中后的回掉函数 + doCallback: function(e) + { + if(!this.callback) + return; + this.callback(e); + }, + + //历史记录列表展示 + doHistoryList: function(e) + { + if (!this.history) + return; + + this.$list.html("").hide(); + if (!localStorage.getItem(this.id)) + return; + + var htmlStr = '
      '; + var hisArr = localStorage.getItem(this.id).split(";"); + for (var i = 0;i < hisArr.length;i++) + { + htmlStr += '
    • ' + + hisArr[i] + "
    • "; + } + htmlStr += "
    "; + Z(htmlStr).appendTo(this.$list.show()); + var hisBar = '
    ' + + '清空历史' + + '
    '; + Z(hisBar).appendTo(this.$list.show()); + //绑定事件 + this.lis = this.$list.find("li"); + this.lis.click(this.doSelect,this); + this.lis.mouseenter(this.onMouseEnter,this); + this.lis.mouseleave(this.onMouseLeave,this); + //绑定删除事件 + var $delBtn = this.$list.find(".z-deleteBtn"); + $delBtn.click(this.emptyHistory,this); + }, + + emptyHistory: function(e) + { + localStorage.removeItem(this.id); + }, + + //输入完成,存储历史记录 + saveHistory: function(e) + { + if (!this.history) + return; + + var hisStr = localStorage.getItem(this.id); + if (!hisStr) + return localStorage.setItem(this.id, this.value); + + var hisArr = hisStr.split(";"); + hisArr.unshift(this.value); + + //去重 + var resultArr = []; + for(var i = 0; i < hisArr.length; i++) + { + if(!Z.AR.contains(resultArr, hisArr[i])) + resultArr.push(hisArr[i]); + } + + //限制个数 + if (resultArr.length > 10) + resultArr.length = 10; + + hisStr = resultArr.join(";"); + localStorage.setItem(this.id, hisStr); + }, + + //鼠标悬浮,背景颜色变化 + onMouseEnter: function(e) + { + var $thisLi = Z(Z.E.target(e)); + $thisLi.addClass("z-bg-gray"); + }, + + onMouseLeave: function(e) + { + var $thisLi = Z(Z.E.target(e)); + $thisLi.removeClass("z-bg-gray"); + } +} + +//END +})(zhiqim) \ No newline at end of file diff --git a/Yangcai365_design/manage/zinc/images/VXQRcode.png b/Yangcai365_design/manage/zinc/images/VXQRcode.png new file mode 100644 index 0000000..e83c444 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/VXQRcode.png differ diff --git a/Yangcai365_design/manage/zinc/images/add-manuscript.png b/Yangcai365_design/manage/zinc/images/add-manuscript.png new file mode 100644 index 0000000..430134d Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/add-manuscript.png differ diff --git a/Yangcai365_design/manage/zinc/images/after.png b/Yangcai365_design/manage/zinc/images/after.png new file mode 100644 index 0000000..da92d48 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/after.png differ diff --git a/Yangcai365_design/manage/zinc/images/after_on.png b/Yangcai365_design/manage/zinc/images/after_on.png new file mode 100644 index 0000000..248987a Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/after_on.png differ diff --git a/Yangcai365_design/manage/zinc/images/ai.png b/Yangcai365_design/manage/zinc/images/ai.png new file mode 100644 index 0000000..b623c62 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/ai.png differ diff --git a/Yangcai365_design/manage/zinc/images/annotation.png b/Yangcai365_design/manage/zinc/images/annotation.png new file mode 100644 index 0000000..11e26b2 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/annotation.png differ diff --git a/Yangcai365_design/manage/zinc/images/arrow_down.png b/Yangcai365_design/manage/zinc/images/arrow_down.png new file mode 100644 index 0000000..60f3a75 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/arrow_down.png differ diff --git a/Yangcai365_design/manage/zinc/images/attention.jpg b/Yangcai365_design/manage/zinc/images/attention.jpg new file mode 100644 index 0000000..073920c Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/attention.jpg differ diff --git a/Yangcai365_design/manage/zinc/images/back.png b/Yangcai365_design/manage/zinc/images/back.png new file mode 100644 index 0000000..715a541 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/back.png differ diff --git a/Yangcai365_design/manage/zinc/images/cdr.png b/Yangcai365_design/manage/zinc/images/cdr.png new file mode 100644 index 0000000..37d7a7d Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/cdr.png differ diff --git a/Yangcai365_design/manage/zinc/images/cli.png b/Yangcai365_design/manage/zinc/images/cli.png new file mode 100644 index 0000000..54b4d54 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/cli.png differ diff --git a/Yangcai365_design/manage/zinc/images/code.png b/Yangcai365_design/manage/zinc/images/code.png new file mode 100644 index 0000000..07f9baa Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/code.png differ diff --git a/Yangcai365_design/manage/zinc/images/code02.png b/Yangcai365_design/manage/zinc/images/code02.png new file mode 100644 index 0000000..52bb4cd Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/code02.png differ diff --git a/Yangcai365_design/manage/zinc/images/code_on.png b/Yangcai365_design/manage/zinc/images/code_on.png new file mode 100644 index 0000000..a874dfb Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/code_on.png differ diff --git a/Yangcai365_design/manage/zinc/images/complain.png b/Yangcai365_design/manage/zinc/images/complain.png new file mode 100644 index 0000000..c6d42ce Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/complain.png differ diff --git a/Yangcai365_design/manage/zinc/images/complain_on.png b/Yangcai365_design/manage/zinc/images/complain_on.png new file mode 100644 index 0000000..ecb74c2 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/complain_on.png differ diff --git a/Yangcai365_design/manage/zinc/images/copy.png b/Yangcai365_design/manage/zinc/images/copy.png new file mode 100644 index 0000000..d08db08 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/copy.png differ diff --git a/Yangcai365_design/manage/zinc/images/dropDown.png b/Yangcai365_design/manage/zinc/images/dropDown.png new file mode 100644 index 0000000..907c3d8 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/dropDown.png differ diff --git a/Yangcai365_design/manage/zinc/images/error.png b/Yangcai365_design/manage/zinc/images/error.png new file mode 100644 index 0000000..40d1d71 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/error.png differ diff --git a/Yangcai365_design/manage/zinc/images/examine.png b/Yangcai365_design/manage/zinc/images/examine.png new file mode 100644 index 0000000..1d8ab80 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/examine.png differ diff --git a/Yangcai365_design/manage/zinc/images/examine_on.png b/Yangcai365_design/manage/zinc/images/examine_on.png new file mode 100644 index 0000000..c1af639 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/examine_on.png differ diff --git a/Yangcai365_design/manage/zinc/images/fire.png b/Yangcai365_design/manage/zinc/images/fire.png new file mode 100644 index 0000000..f74b154 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/fire.png differ diff --git a/Yangcai365_design/manage/zinc/images/frist-error.png b/Yangcai365_design/manage/zinc/images/frist-error.png new file mode 100644 index 0000000..ed15768 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/frist-error.png differ diff --git a/Yangcai365_design/manage/zinc/images/gif.png b/Yangcai365_design/manage/zinc/images/gif.png new file mode 100644 index 0000000..0584da8 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/gif.png differ diff --git a/Yangcai365_design/manage/zinc/images/home.png b/Yangcai365_design/manage/zinc/images/home.png new file mode 100644 index 0000000..9995e65 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/home.png differ diff --git a/Yangcai365_design/manage/zinc/images/home_on.png b/Yangcai365_design/manage/zinc/images/home_on.png new file mode 100644 index 0000000..1b7f03d Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/home_on.png differ diff --git a/Yangcai365_design/manage/zinc/images/jpeg.png b/Yangcai365_design/manage/zinc/images/jpeg.png new file mode 100644 index 0000000..0a148cf Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/jpeg.png differ diff --git a/Yangcai365_design/manage/zinc/images/jpg.png b/Yangcai365_design/manage/zinc/images/jpg.png new file mode 100644 index 0000000..1395fac Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/jpg.png differ diff --git a/Yangcai365_design/manage/zinc/images/login_new.png b/Yangcai365_design/manage/zinc/images/login_new.png new file mode 100644 index 0000000..9668acd Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/login_new.png differ diff --git a/Yangcai365_design/manage/zinc/images/logo.png b/Yangcai365_design/manage/zinc/images/logo.png new file mode 100644 index 0000000..edf4d61 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/logo.png differ diff --git a/Yangcai365_design/manage/zinc/images/logout-icon.png b/Yangcai365_design/manage/zinc/images/logout-icon.png new file mode 100644 index 0000000..86b00b5 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/logout-icon.png differ diff --git a/Yangcai365_design/manage/zinc/images/logout.png b/Yangcai365_design/manage/zinc/images/logout.png new file mode 100644 index 0000000..1d3ab7b Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/logout.png differ diff --git a/Yangcai365_design/manage/zinc/images/message.png b/Yangcai365_design/manage/zinc/images/message.png new file mode 100644 index 0000000..ce463a0 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/message.png differ diff --git a/Yangcai365_design/manage/zinc/images/message_icon.png b/Yangcai365_design/manage/zinc/images/message_icon.png new file mode 100644 index 0000000..525a529 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/message_icon.png differ diff --git a/Yangcai365_design/manage/zinc/images/nopic.png b/Yangcai365_design/manage/zinc/images/nopic.png new file mode 100644 index 0000000..3b7e9ec Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/nopic.png differ diff --git a/Yangcai365_design/manage/zinc/images/notice.png b/Yangcai365_design/manage/zinc/images/notice.png new file mode 100644 index 0000000..7ea41c6 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/notice.png differ diff --git a/Yangcai365_design/manage/zinc/images/notice2.png b/Yangcai365_design/manage/zinc/images/notice2.png new file mode 100644 index 0000000..73d3b72 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/notice2.png differ diff --git a/Yangcai365_design/manage/zinc/images/order-icon.png b/Yangcai365_design/manage/zinc/images/order-icon.png new file mode 100644 index 0000000..6f79f3d Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/order-icon.png differ diff --git a/Yangcai365_design/manage/zinc/images/order-icon01.png b/Yangcai365_design/manage/zinc/images/order-icon01.png new file mode 100644 index 0000000..525845c Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/order-icon01.png differ diff --git a/Yangcai365_design/manage/zinc/images/order-icon02-active.png b/Yangcai365_design/manage/zinc/images/order-icon02-active.png new file mode 100644 index 0000000..86f8c26 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/order-icon02-active.png differ diff --git a/Yangcai365_design/manage/zinc/images/order-icon02.png b/Yangcai365_design/manage/zinc/images/order-icon02.png new file mode 100644 index 0000000..d16e240 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/order-icon02.png differ diff --git a/Yangcai365_design/manage/zinc/images/order-icon03-active.png b/Yangcai365_design/manage/zinc/images/order-icon03-active.png new file mode 100644 index 0000000..e405c05 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/order-icon03-active.png differ diff --git a/Yangcai365_design/manage/zinc/images/order-icon03.png b/Yangcai365_design/manage/zinc/images/order-icon03.png new file mode 100644 index 0000000..3cf5dd4 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/order-icon03.png differ diff --git a/Yangcai365_design/manage/zinc/images/order-icon04-active.png b/Yangcai365_design/manage/zinc/images/order-icon04-active.png new file mode 100644 index 0000000..dfd559a Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/order-icon04-active.png differ diff --git a/Yangcai365_design/manage/zinc/images/order-icon04.png b/Yangcai365_design/manage/zinc/images/order-icon04.png new file mode 100644 index 0000000..aedd412 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/order-icon04.png differ diff --git a/Yangcai365_design/manage/zinc/images/order-icon05-active.png b/Yangcai365_design/manage/zinc/images/order-icon05-active.png new file mode 100644 index 0000000..6e3f863 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/order-icon05-active.png differ diff --git a/Yangcai365_design/manage/zinc/images/order-icon05.png b/Yangcai365_design/manage/zinc/images/order-icon05.png new file mode 100644 index 0000000..acd7ae3 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/order-icon05.png differ diff --git a/Yangcai365_design/manage/zinc/images/order-icon2.png b/Yangcai365_design/manage/zinc/images/order-icon2.png new file mode 100644 index 0000000..6982643 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/order-icon2.png differ diff --git a/Yangcai365_design/manage/zinc/images/order-icon3.png b/Yangcai365_design/manage/zinc/images/order-icon3.png new file mode 100644 index 0000000..b0fdcd8 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/order-icon3.png differ diff --git a/Yangcai365_design/manage/zinc/images/order-icon4.png b/Yangcai365_design/manage/zinc/images/order-icon4.png new file mode 100644 index 0000000..afa7959 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/order-icon4.png differ diff --git a/Yangcai365_design/manage/zinc/images/order.png b/Yangcai365_design/manage/zinc/images/order.png new file mode 100644 index 0000000..9e54664 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/order.png differ diff --git a/Yangcai365_design/manage/zinc/images/orderDispatch.jpg b/Yangcai365_design/manage/zinc/images/orderDispatch.jpg new file mode 100644 index 0000000..432d7dd Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/orderDispatch.jpg differ diff --git a/Yangcai365_design/manage/zinc/images/order_on.png b/Yangcai365_design/manage/zinc/images/order_on.png new file mode 100644 index 0000000..115c46c Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/order_on.png differ diff --git a/Yangcai365_design/manage/zinc/images/pdf.png b/Yangcai365_design/manage/zinc/images/pdf.png new file mode 100644 index 0000000..538f455 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/pdf.png differ diff --git a/Yangcai365_design/manage/zinc/images/png.png b/Yangcai365_design/manage/zinc/images/png.png new file mode 100644 index 0000000..e72a277 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/png.png differ diff --git a/Yangcai365_design/manage/zinc/images/psb.png b/Yangcai365_design/manage/zinc/images/psb.png new file mode 100644 index 0000000..23e16c0 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/psb.png differ diff --git a/Yangcai365_design/manage/zinc/images/psd.png b/Yangcai365_design/manage/zinc/images/psd.png new file mode 100644 index 0000000..cff5ce1 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/psd.png differ diff --git a/Yangcai365_design/manage/zinc/images/qiantu.png b/Yangcai365_design/manage/zinc/images/qiantu.png new file mode 100644 index 0000000..cbe0520 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/qiantu.png differ diff --git a/Yangcai365_design/manage/zinc/images/qq.png b/Yangcai365_design/manage/zinc/images/qq.png new file mode 100644 index 0000000..b2f8b88 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/qq.png differ diff --git a/Yangcai365_design/manage/zinc/images/qrcode.png b/Yangcai365_design/manage/zinc/images/qrcode.png new file mode 100644 index 0000000..76f7eef Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/qrcode.png differ diff --git a/Yangcai365_design/manage/zinc/images/rar.png b/Yangcai365_design/manage/zinc/images/rar.png new file mode 100644 index 0000000..d3ba22e Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/rar.png differ diff --git a/Yangcai365_design/manage/zinc/images/receive.png b/Yangcai365_design/manage/zinc/images/receive.png new file mode 100644 index 0000000..3a14d7f Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/receive.png differ diff --git a/Yangcai365_design/manage/zinc/images/receive_on.png b/Yangcai365_design/manage/zinc/images/receive_on.png new file mode 100644 index 0000000..9577d14 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/receive_on.png differ diff --git a/Yangcai365_design/manage/zinc/images/red_exclamation_mark.png b/Yangcai365_design/manage/zinc/images/red_exclamation_mark.png new file mode 100644 index 0000000..2117c31 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/red_exclamation_mark.png differ diff --git a/Yangcai365_design/manage/zinc/images/refresh.png b/Yangcai365_design/manage/zinc/images/refresh.png new file mode 100644 index 0000000..4eec73e Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/refresh.png differ diff --git a/Yangcai365_design/manage/zinc/images/refresh_icon.png b/Yangcai365_design/manage/zinc/images/refresh_icon.png new file mode 100644 index 0000000..e87000c Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/refresh_icon.png differ diff --git a/Yangcai365_design/manage/zinc/images/shop.png b/Yangcai365_design/manage/zinc/images/shop.png new file mode 100644 index 0000000..5772c83 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/shop.png differ diff --git a/Yangcai365_design/manage/zinc/images/shop_on.png b/Yangcai365_design/manage/zinc/images/shop_on.png new file mode 100644 index 0000000..53db7ce Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/shop_on.png differ diff --git a/Yangcai365_design/manage/zinc/images/sidebar_arrow.png b/Yangcai365_design/manage/zinc/images/sidebar_arrow.png new file mode 100644 index 0000000..50bbb9a Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/sidebar_arrow.png differ diff --git a/Yangcai365_design/manage/zinc/images/statistics.png b/Yangcai365_design/manage/zinc/images/statistics.png new file mode 100644 index 0000000..b487f3d Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/statistics.png differ diff --git a/Yangcai365_design/manage/zinc/images/statistics_on.png b/Yangcai365_design/manage/zinc/images/statistics_on.png new file mode 100644 index 0000000..2bb8c7f Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/statistics_on.png differ diff --git a/Yangcai365_design/manage/zinc/images/svg.png b/Yangcai365_design/manage/zinc/images/svg.png new file mode 100644 index 0000000..b11f1a9 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/svg.png differ diff --git a/Yangcai365_design/manage/zinc/images/template.png b/Yangcai365_design/manage/zinc/images/template.png new file mode 100644 index 0000000..b6e279e Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/template.png differ diff --git a/Yangcai365_design/manage/zinc/images/template_on.png b/Yangcai365_design/manage/zinc/images/template_on.png new file mode 100644 index 0000000..35326b8 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/template_on.png differ diff --git a/Yangcai365_design/manage/zinc/images/txt.png b/Yangcai365_design/manage/zinc/images/txt.png new file mode 100644 index 0000000..1b9a966 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/txt.png differ diff --git a/Yangcai365_design/manage/zinc/images/user.png b/Yangcai365_design/manage/zinc/images/user.png new file mode 100644 index 0000000..6cf1e84 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/user.png differ diff --git a/Yangcai365_design/manage/zinc/images/user_on.png b/Yangcai365_design/manage/zinc/images/user_on.png new file mode 100644 index 0000000..fa0c747 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/user_on.png differ diff --git a/Yangcai365_design/manage/zinc/images/wangwang.png b/Yangcai365_design/manage/zinc/images/wangwang.png new file mode 100644 index 0000000..6a7033d Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/wangwang.png differ diff --git a/Yangcai365_design/manage/zinc/images/zip.png b/Yangcai365_design/manage/zinc/images/zip.png new file mode 100644 index 0000000..fc51bb7 Binary files /dev/null and b/Yangcai365_design/manage/zinc/images/zip.png differ diff --git a/Yangcai365_design/manage/zinc/js/design_2018102301.js b/Yangcai365_design/manage/zinc/js/design_2018102301.js new file mode 100644 index 0000000..ee4e573 --- /dev/null +++ b/Yangcai365_design/manage/zinc/js/design_2018102301.js @@ -0,0 +1,72 @@ ++(function(Z) +{ +//BEGIN + +var Design = window.Design = {}; + +Z.onload(function() +{ + +}) + +Design.doWorksShow = function (value,urlParam) +{//展示弹窗页,全铺满 + var ajax = new Z.Ajax(); + ajax.setClassName("WorksPresenter"); + ajax.setMethodName("doWorksBrowse"); + ajax.addParam(value) + ajax.execute(); + + var dialog = new Z.Dialog(); + dialog.shadow = true; + dialog.title = "作品详情"; + dialog.fixed = true; + + dialog.url = "worksShow.htm?worksId="+value; + dialog.width = Z.D.clientWidth(); + dialog.height =Z.D.clientHeight()-40; + dialog.execute(); +} + +Design.doTemplateShow = function (value,urlParam) +{//展示弹窗页,全铺满 + + var keywordName = Z("#searchinput").val(); + if (keywordName == null) + keywordName = ""; + + var ajax = new Z.Ajax(); + ajax.setClassName("TemplatePresenter"); + ajax.setMethodName("doTemplateBrowse"); + ajax.addParam("mediaId", value) + ajax.execute(); + + var dialog = new Z.Dialog(); + dialog.shadow = true; + dialog.title = "模板详情"; + dialog.fixed = true; + + dialog.url = "templateShow.htm?mediaId=" + value + "&keywordName=" + keywordName + "&urlParam=" + urlParam; + dialog.width = Z.D.clientWidth() -30; + dialog.height =Z.D.clientHeight() - 65; + dialog.execute(); +} + +Design.openWangWang = function(buyerNick) +{//打开旺旺 + Z("#openFrm").attr("src","http://amos.alicdn.com/msg.aw?v=2&uid="+buyerNick+"&site=cntaobao&s=2&charset=utf-8"); +}; + +Design.openQQ = function(userQq) +{//打开QQ + if (!Z.V.isInteger(userQq)) + { + Z.alert("客户未提供QQ号,请旺旺联系"); + return; + } + + Z("#openFrm").attr("src","tencent://message/?uin="+userQq); +}; + +//END +})(zhiqim); \ No newline at end of file diff --git a/Yangcai365_design/manage/zinc/js/designer_2021031501.js b/Yangcai365_design/manage/zinc/js/designer_2021031501.js new file mode 100644 index 0000000..7cc4edd --- /dev/null +++ b/Yangcai365_design/manage/zinc/js/designer_2021031501.js @@ -0,0 +1,76 @@ + +/*****************************************************************************/ +//定义设计师工作初始化 +/*****************************************************************************/ +//启动websocket +Z.onload(function() +{ + Z("#switch-work").click(function(){ + if(Z("#switch-work").hasClass('switch-active')){ + stopWork() + }else{ + startWork() + } + + }) + //1.检查上下班状态 + +}); + +/*****************************************************************************/ +//定义设计师工作对象 +/*****************************************************************************/ + +function startWork() +{//设计师开始接单 + var ajax = new Z.Ajax(); + ajax.setClassName("DesignerWorkPresenter"); + ajax.setMethodName("startWork"); + ajax.setFailureAlert(); + ajax.setFailure(function(){ + if(this.responseText == "1"){ + Z.alert("接单前请前往个人中心完善个人简介~", function(){ + Z("a[onclick*='profile.htm']").click(); + }); + return; + } + Z.alert(this.responseText); + }) + ajax.setSuccess(function() + { + Z("#switch-work").addClass("switch-active") + }); + ajax.execute(); +}; + +function stopWork() +{//设计师停止接单 + + //1.查询未完成订单数 + var ajax = new Z.Ajax(); + ajax.setSync(); + ajax.setClassName("DesignerWorkPresenter"); + ajax.setMethodName("getOrderNumber"); + ajax.execute(); + + if (ajax.responseStatus != 0) + { + Z.alert("抱歉请求处理失败,请重试!"); + return; + } + + //2.提醒下班 + var confirm = "确认现在停止接单吗?" + ((ajax.responseText != "0")?"您还有" + ajax.responseText + "个订单未完成!":""); + Z.confirm(confirm, function() + { + var _ajax = new Z.Ajax(); + _ajax.setClassName("DesignerWorkPresenter"); + _ajax.setMethodName("stopWork"); + _ajax.setFailureAlert(); + _ajax.setSuccess(function() + { + Z("#switch-work").removeClass("switch-active") + }); + _ajax.execute(); + }); +}; \ No newline at end of file diff --git a/Yangcai365_design/manage/zinc/js/global_2019010801.js b/Yangcai365_design/manage/zinc/js/global_2019010801.js new file mode 100644 index 0000000..2192088 --- /dev/null +++ b/Yangcai365_design/manage/zinc/js/global_2019010801.js @@ -0,0 +1,80 @@ ++(function(Z) +{ +//BEGIN + +var Global = window.Global = {}; + +/**************************************************************************************/ +//打开旺旺&打开QQ +/**************************************************************************************/ + +Global.contectWangWang = function() +{//打开旺旺 + var designId = Z.FM.getChecked("designId"); + var buyerNick = Z("#buyerNick_" + designId).val(); + Z("#openFrm").attr("src","http://amos.alicdn.com/msg.aw?v=2&uid="+buyerNick+"&site=cntaobao&s=2&charset=utf-8"); +}; + +Global.contectQQ = function() +{//打开QQ + var designId = Z.FM.getChecked("designId") + var userQq = Z("#userQq_" + designId).val(); + if (!Z.V.isInteger(userQq)) + { + Z.alert("客户未提供QQ号,请旺旺联系"); + return; + } + + Z("#openFrm").attr("src","tencent://message/?uin="+userQq); +}; + +Global.openWangWang = function(elemId, attrName) +{//打开旺旺 + if (!elemId && !attrName) + { + Global.contectWangWang(); + } + else + { + var nick = Z("#"+elemId).attr(Z.V.isEmptyBlank(attrName) ? "data-ww" : attrName); + Global.openWangWangParam(nick); + } + +}; + +Global.openQQ = function(elemId, attrName) +{//打开QQ + if (!elemId && !attrName) + { + Global.contectQQ(); + } + else + { + var nick = Z("#"+elemId).attr(Z.V.isEmptyBlank(attrName) ? "data-qq" : attrName); + Global.openQQParam(nick); + } + +}; + +Global.openWangWangParam = function(buyerNick) +{//打开旺旺 + if (Z.V.isEmptyBlank(buyerNick)) + { + Z.failure("客户未提供该联系方式"); + return; + } + Z("#openFrm").attr("src","http://amos.alicdn.com/msg.aw?v=2&uid="+buyerNick+"&site=cntaobao&s=2&charset=utf-8"); +} + +Global.openQQParam = function(userQq) +{//打开QQ + if (!Z.V.isInteger(userQq)) + { + Z.failure("客户未提供该联系方式"); + return; + } + Z("#openFrm").attr("src","tencent://message/?uin="+userQq); +} + +//END +})(zhiqim); \ No newline at end of file diff --git a/Yangcai365_design/manage/zinc/js/globalcomplain_2019010801.js b/Yangcai365_design/manage/zinc/js/globalcomplain_2019010801.js new file mode 100644 index 0000000..eba7e16 --- /dev/null +++ b/Yangcai365_design/manage/zinc/js/globalcomplain_2019010801.js @@ -0,0 +1,80 @@ ++(function(Z) +{ +//BEGIN + +var Global = window.Global = {}; + +/**************************************************************************************/ +//打开旺旺&打开QQ +/**************************************************************************************/ + +Global.contectWangWang = function() +{//打开旺旺complainId + var complainId = Z.FM.getChecked("complainId"); + var buyerNick = Z("#buyerNick_" + complainId).val(); + Z("#openFrm").attr("src","http://amos.alicdn.com/msg.aw?v=2&uid="+buyerNick+"&site=cntaobao&s=2&charset=utf-8"); +}; + +Global.contectQQ = function() +{//打开QQ + var complainId = Z.FM.getChecked("complainId") + var userQq = Z("#userQq_" + complainId).val(); + if (!Z.V.isInteger(userQq)) + { + Z.alert("客户未提供QQ号,请旺旺联系"); + return; + } + + Z("#openFrm").attr("src","tencent://message/?uin="+userQq); +}; + +Global.openWangWang = function(elemId, attrName) +{//打开旺旺 + if (!elemId && !attrName) + { + Global.contectWangWang(); + } + else + { + var nick = Z("#"+elemId).attr(Z.V.isEmptyBlank(attrName) ? "data-ww" : attrName); + Global.openWangWangParam(nick); + } + +}; + +Global.openQQ = function(elemId, attrName) +{//打开QQ + if (!elemId && !attrName) + { + Global.contectQQ(); + } + else + { + var nick = Z("#"+elemId).attr(Z.V.isEmptyBlank(attrName) ? "data-qq" : attrName); + Global.openQQParam(nick); + } + +}; + +Global.openWangWangParam = function(buyerNick) +{//打开旺旺 + if (Z.V.isEmptyBlank(buyerNick)) + { + Z.failure("客户未提供该联系方式"); + return; + } + Z("#openFrm").attr("src","http://amos.alicdn.com/msg.aw?v=2&uid="+buyerNick+"&site=cntaobao&s=2&charset=utf-8"); +} + +Global.openQQParam = function(userQq) +{//打开QQ + if (!Z.V.isInteger(userQq)) + { + Z.failure("客户未提供该联系方式"); + return; + } + Z("#openFrm").attr("src","tencent://message/?uin="+userQq); +} + +//END +})(zhiqim); \ No newline at end of file diff --git a/Yangcai365_design/manage/zinc/js/jquery-1.11.1.min.js b/Yangcai365_design/manage/zinc/js/jquery-1.11.1.min.js new file mode 100644 index 0000000..ab28a24 --- /dev/null +++ b/Yangcai365_design/manage/zinc/js/jquery-1.11.1.min.js @@ -0,0 +1,4 @@ +/*! jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.1",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b=a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="
    ",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="
    ","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h; +if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthh;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML="
    a",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function ab(){return!0}function bb(){return!1}function cb(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h]","i"),hb=/^\s+/,ib=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,jb=/<([\w:]+)/,kb=/\s*$/g,rb={option:[1,""],legend:[1,"
    ","
    "],area:[1,"",""],param:[1,"",""],thead:[1,"","
    "],tr:[2,"","
    "],col:[2,"","
    "],td:[3,"","
    "],_default:k.htmlSerialize?[0,"",""]:[1,"X
    ","
    "]},sb=db(y),tb=sb.appendChild(y.createElement("div"));rb.optgroup=rb.option,rb.tbody=rb.tfoot=rb.colgroup=rb.caption=rb.thead,rb.th=rb.td;function ub(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ub(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function vb(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wb(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xb(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function yb(a){var b=pb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function zb(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Ab(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Bb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xb(b).text=a.text,yb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!gb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(tb.innerHTML=a.outerHTML,tb.removeChild(f=tb.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ub(f),h=ub(a),g=0;null!=(e=h[g]);++g)d[g]&&Bb(e,d[g]);if(b)if(c)for(h=h||ub(a),d=d||ub(f),g=0;null!=(e=h[g]);g++)Ab(e,d[g]);else Ab(a,f);return d=ub(f,"script"),d.length>0&&zb(d,!i&&ub(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=db(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(lb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(jb.exec(f)||["",""])[1].toLowerCase(),l=rb[i]||rb._default,h.innerHTML=l[1]+f.replace(ib,"<$1>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&hb.test(f)&&p.push(b.createTextNode(hb.exec(f)[0])),!k.tbody){f="table"!==i||kb.test(f)?""!==l[1]||kb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ub(p,"input"),vb),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ub(o.appendChild(f),"script"),g&&zb(h),c)){e=0;while(f=h[e++])ob.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ub(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&zb(ub(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ub(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fb,""):void 0;if(!("string"!=typeof a||mb.test(a)||!k.htmlSerialize&&gb.test(a)||!k.leadingWhitespace&&hb.test(a)||rb[(jb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ib,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ub(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ub(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&nb.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ub(i,"script"),xb),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ub(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,yb),j=0;f>j;j++)d=g[j],ob.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qb,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Cb,Db={};function Eb(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fb(a){var b=y,c=Db[a];return c||(c=Eb(a,b),"none"!==c&&c||(Cb=(Cb||m("',"",""].join(""));return l.ie&&l.ie<8?c.removeClass("layui-hide").addClass(o):(d[0]&&d.remove(),s.call(a,m,c[0],y),c.addClass("layui-hide").after(m),a.index)},c.prototype.getContent=function(t){var e=u(t);if(e[0])return d(e[0].document.body.innerHTML)},c.prototype.getText=function(t){var i=u(t);if(i[0])return e(i[0].document.body).text()},c.prototype.setContent=function(t,i,a){var l=u(t);l[0]&&(a?e(l[0].document.body).append(i):e(l[0].document.body).html(i),layedit.sync(t))},c.prototype.sync=function(t){var i=u(t);if(i[0]){var a=e("#"+i[1].attr("textarea"));a.val(d(i[0].document.body.innerHTML))}},c.prototype.getSelection=function(t){var e=u(t);if(e[0]){var i=m(e[0].document);return document.selection?i.text:i.toString()}};var s=function(t,i,a){var l=this,n=t.find("iframe");n.css({height:a.height}).on("load",function(){var o=n.contents(),r=n.prop("contentWindow"),c=o.find("head"),s=e([""].join("")),u=o.find("body");c.append(s),u.attr("contenteditable","true").css({"min-height":a.height}).html(i.value||""),y.apply(l,[r,n,i,a]),g.call(l,r,t,a)})},u=function(t){var i=e("#LAY_layedit_"+t),a=i.prop("contentWindow");return[a,i]},d=function(t){return 8==l.ie&&(t=t.replace(/<.+>/g,function(t){return t.toLowerCase()})),t},y=function(t,a,n,o){var r=t.document,c=e(r.body);c.on("keydown",function(t){var e=t.keyCode;if(13===e){var a=m(r),l=p(a),n=l.parentNode;if("pre"===n.tagName.toLowerCase()){if(t.shiftKey)return;return i.msg("请暂时用shift+enter"),!1}r.execCommand("formatBlock",!1,"

    ")}}),e(n).parents("form").on("submit",function(){var t=c.html();8==l.ie&&(t=t.replace(/<.+>/g,function(t){return t.toLowerCase()})),n.value=t}),c.on("paste",function(e){r.execCommand("formatBlock",!1,"

    "),setTimeout(function(){f.call(t,c),n.value=c.html()},100)})},f=function(t){var i=this;i.document;t.find("*[style]").each(function(){var t=this.style.textAlign;this.removeAttribute("style"),e(this).css({"text-align":t||""})}),t.find("table").addClass("layui-table"),t.find("script,link").remove()},m=function(t){return t.selection?t.selection.createRange():t.getSelection().getRangeAt(0)},p=function(t){return t.endContainer||t.parentElement().childNodes[0]},v=function(t,i,a){var l=this.document,n=document.createElement(t);for(var o in i)n.setAttribute(o,i[o]);if(n.removeAttribute("text"),l.selection){var r=a.text||i.text;if("a"===t&&!r)return;r&&(n.innerHTML=r),a.pasteHTML(e(n).prop("outerHTML")),a.select()}else{var r=a.toString()||i.text;if("a"===t&&!r)return;r&&(n.innerHTML=r),a.deleteContents(),a.insertNode(n)}},h=function(t,i){var a=this.document,l="layedit-tool-active",n=p(m(a)),o=function(e){return t.find(".layedit-tool-"+e)};i&&i[i.hasClass(l)?"removeClass":"addClass"](l),t.find(">i").removeClass(l),o("unlink").addClass(r),e(n).parents().each(function(){var t=this.tagName.toLowerCase(),e=this.style.textAlign;"b"!==t&&"strong"!==t||o("b").addClass(l),"i"!==t&&"em"!==t||o("i").addClass(l),"u"===t&&o("u").addClass(l),"strike"===t&&o("d").addClass(l),"p"===t&&("center"===e?o("center").addClass(l):"right"===e?o("right").addClass(l):o("left").addClass(l)),"a"===t&&(o("link").addClass(l),o("unlink").removeClass(r))})},g=function(t,a,l){var n=t.document,o=e(n.body),c={link:function(i){var a=p(i),l=e(a).parent();b.call(o,{href:l.attr("href"),target:l.attr("target")},function(e){var a=l[0];"A"===a.tagName?a.href=e.url:v.call(t,"a",{target:e.target,href:e.url,text:e.url},i)})},unlink:function(t){n.execCommand("unlink")},face:function(e){x.call(this,function(i){v.call(t,"img",{src:i.src,alt:i.alt},e)})},image:function(a){var n=this;layui.use("upload",function(o){var r=l.uploadImage||{};o.render({url:r.url,method:r.type,elem:e(n).find("input")[0],done:function(e){0==e.code?(e.data=e.data||{},v.call(t,"img",{src:e.data.src,alt:e.data.title},a)):i.msg(e.msg||"上传失败")}})})},code:function(e){k.call(o,function(i){v.call(t,"pre",{text:i.code,"lay-lang":i.lang},e)})},help:function(){i.open({type:2,title:"帮助",area:["600px","380px"],shadeClose:!0,shade:.1,skin:"layui-layer-msg",content:["http://www.layui.com/about/layedit/help.html","no"]})}},s=a.find(".layui-layedit-tool"),u=function(){var i=e(this),a=i.attr("layedit-event"),l=i.attr("lay-command");if(!i.hasClass(r)){o.focus();var u=m(n);u.commonAncestorContainer;l?(n.execCommand(l),/justifyLeft|justifyCenter|justifyRight/.test(l)&&n.execCommand("formatBlock",!1,"

    "),setTimeout(function(){o.focus()},10)):c[a]&&c[a].call(this,u),h.call(t,s,i)}},d=/image/;s.find(">i").on("mousedown",function(){var t=e(this),i=t.attr("layedit-event");d.test(i)||u.call(this)}).on("click",function(){var t=e(this),i=t.attr("layedit-event");d.test(i)&&u.call(this)}),o.on("click",function(){h.call(t,s),i.close(x.index)})},b=function(t,e){var l=this,n=i.open({type:1,id:"LAY_layedit_link",area:"350px",shade:.05,shadeClose:!0,moveType:1,title:"超链接",skin:"layui-layer-msg",content:['

      ','
    • ','','
      ','',"
      ","
    • ",'
    • ','','
      ','",'","
      ","
    • ",'
    • ','','',"
    • ","
    "].join(""),success:function(t,n){var o="submit(layedit-link-yes)";a.render("radio"),t.find(".layui-btn-primary").on("click",function(){i.close(n),l.focus()}),a.on(o,function(t){i.close(b.index),e&&e(t.field)})}});b.index=n},x=function(t){var a=function(){var t=["[微笑]","[嘻嘻]","[哈哈]","[可爱]","[可怜]","[挖鼻]","[吃惊]","[害羞]","[挤眼]","[闭嘴]","[鄙视]","[爱你]","[泪]","[偷笑]","[亲亲]","[生病]","[太开心]","[白眼]","[右哼哼]","[左哼哼]","[嘘]","[衰]","[委屈]","[吐]","[哈欠]","[抱抱]","[怒]","[疑问]","[馋嘴]","[拜拜]","[思考]","[汗]","[困]","[睡]","[钱]","[失望]","[酷]","[色]","[哼]","[鼓掌]","[晕]","[悲伤]","[抓狂]","[黑线]","[阴险]","[怒骂]","[互粉]","[心]","[伤心]","[猪头]","[熊猫]","[兔子]","[ok]","[耶]","[good]","[NO]","[赞]","[来]","[弱]","[草泥马]","[神马]","[囧]","[浮云]","[给力]","[围观]","[威武]","[奥特曼]","[礼物]","[钟]","[话筒]","[蜡烛]","[蛋糕]"],e={};return layui.each(t,function(t,i){e[i]=layui.cache.dir+"images/face/"+t+".gif"}),e}();return x.hide=x.hide||function(t){"face"!==e(t.target).attr("layedit-event")&&i.close(x.index)},x.index=i.tips(function(){var t=[];return layui.each(a,function(e,i){t.push('
  • '+e+'
  • ')}),'
      '+t.join("")+"
    "}(),this,{tips:1,time:0,skin:"layui-box layui-util-face",maxWidth:500,success:function(l,n){l.css({marginTop:-4,marginLeft:-10}).find(".layui-clear>li").on("click",function(){t&&t({src:a[this.title],alt:this.title}),i.close(n)}),e(document).off("click",x.hide).on("click",x.hide)}})},k=function(t){var e=this,l=i.open({type:1,id:"LAY_layedit_code",area:"550px",shade:.05,shadeClose:!0,moveType:1,title:"插入代码",skin:"layui-layer-msg",content:['
      ','
    • ','','
      ','","
      ","
    • ",'
    • ','','
      ','',"
      ","
    • ",'
    • ','','',"
    • ","
    "].join(""),success:function(l,n){var o="submit(layedit-code-yes)";a.render("select"),l.find(".layui-btn-primary").on("click",function(){i.close(n),e.focus()}),a.on(o,function(e){i.close(k.index),t&&t(e.field)})}});k.index=l},C={html:'',strong:'',italic:'',underline:'',del:'',"|":'',left:'',center:'',right:'',link:'',unlink:'',face:'',image:'',code:'',help:''},w=new c;t(n,w)}); \ No newline at end of file diff --git a/Yangcai365_design/manage/zinc/layui/lay/modules/layer.js b/Yangcai365_design/manage/zinc/layui/lay/modules/layer.js new file mode 100644 index 0000000..3220857 --- /dev/null +++ b/Yangcai365_design/manage/zinc/layui/lay/modules/layer.js @@ -0,0 +1,2 @@ +/** layui-v2.5.4 MIT License By https://www.layui.com */ + ;!function(e,t){"use strict";var i,n,a=e.layui&&layui.define,o={getPath:function(){var e=document.currentScript?document.currentScript.src:function(){for(var e,t=document.scripts,i=t.length-1,n=i;n>0;n--)if("interactive"===t[n].readyState){e=t[n].src;break}return e||t[i].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),config:{},end:{},minIndex:0,minLeft:[],btn:["确定","取消"],type:["dialog","page","iframe","loading","tips"],getStyle:function(t,i){var n=t.currentStyle?t.currentStyle:e.getComputedStyle(t,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](i)},link:function(t,i,n){if(r.path){var a=document.getElementsByTagName("head")[0],s=document.createElement("link");"string"==typeof i&&(n=i);var l=(n||t).replace(/\.|\//g,""),f="layuicss-"+l,c=0;s.rel="stylesheet",s.href=r.path+t,s.id=f,document.getElementById(f)||a.appendChild(s),"function"==typeof i&&!function u(){return++c>80?e.console&&console.error("layer.css: Invalid"):void(1989===parseInt(o.getStyle(document.getElementById(f),"width"))?i():setTimeout(u,100))}()}}},r={v:"3.1.1",ie:function(){var t=navigator.userAgent.toLowerCase();return!!(e.ActiveXObject||"ActiveXObject"in e)&&((t.match(/msie\s(\d+)/)||[])[1]||"11")}(),index:e.layer&&e.layer.v?1e5:0,path:o.getPath,config:function(e,t){return e=e||{},r.cache=o.config=i.extend({},o.config,e),r.path=o.config.path||r.path,"string"==typeof e.extend&&(e.extend=[e.extend]),o.config.path&&r.ready(),e.extend?(a?layui.addcss("modules/layer/"+e.extend):o.link("theme/"+e.extend),this):this},ready:function(e){var t="layer",i="",n=(a?"modules/layer/":"theme/")+"default/layer.css?v="+r.v+i;return a?layui.addcss(n,e,t):o.link(n,e,t),this},alert:function(e,t,n){var a="function"==typeof t;return a&&(n=t),r.open(i.extend({content:e,yes:n},a?{}:t))},confirm:function(e,t,n,a){var s="function"==typeof t;return s&&(a=n,n=t),r.open(i.extend({content:e,btn:o.btn,yes:n,btn2:a},s?{}:t))},msg:function(e,n,a){var s="function"==typeof n,f=o.config.skin,c=(f?f+" "+f+"-msg":"")||"layui-layer-msg",u=l.anim.length-1;return s&&(a=n),r.open(i.extend({content:e,time:3e3,shade:!1,skin:c,title:!1,closeBtn:!1,btn:!1,resize:!1,end:a},s&&!o.config.skin?{skin:c+" layui-layer-hui",anim:u}:function(){return n=n||{},(n.icon===-1||n.icon===t&&!o.config.skin)&&(n.skin=c+" "+(n.skin||"layui-layer-hui")),n}()))},load:function(e,t){return r.open(i.extend({type:3,icon:e||0,resize:!1,shade:.01},t))},tips:function(e,t,n){return r.open(i.extend({type:4,content:[e,t],closeBtn:!1,time:3e3,shade:!1,resize:!1,fixed:!1,maxWidth:210},n))}},s=function(e){var t=this;t.index=++r.index,t.config=i.extend({},t.config,o.config,e),document.body?t.creat():setTimeout(function(){t.creat()},30)};s.pt=s.prototype;var l=["layui-layer",".layui-layer-title",".layui-layer-main",".layui-layer-dialog","layui-layer-iframe","layui-layer-content","layui-layer-btn","layui-layer-close"];l.anim=["layer-anim-00","layer-anim-01","layer-anim-02","layer-anim-03","layer-anim-04","layer-anim-05","layer-anim-06"],s.pt.config={type:0,shade:.3,fixed:!0,move:l[1],title:"信息",offset:"auto",area:"auto",closeBtn:1,time:0,zIndex:19891014,maxWidth:360,anim:0,isOutAnim:!0,icon:-1,moveType:1,resize:!0,scrollbar:!0,tips:2},s.pt.vessel=function(e,t){var n=this,a=n.index,r=n.config,s=r.zIndex+a,f="object"==typeof r.title,c=r.maxmin&&(1===r.type||2===r.type),u=r.title?'
    '+(f?r.title[0]:r.title)+"
    ":"";return r.zIndex=s,t([r.shade?'
    ':"",'
    '+(e&&2!=r.type?"":u)+'
    '+(0==r.type&&r.icon!==-1?'':"")+(1==r.type&&e?"":r.content||"")+'
    '+function(){var e=c?'':"";return r.closeBtn&&(e+=''),e}()+""+(r.btn?function(){var e="";"string"==typeof r.btn&&(r.btn=[r.btn]);for(var t=0,i=r.btn.length;t'+r.btn[t]+"";return'
    '+e+"
    "}():"")+(r.resize?'':"")+"
    "],u,i('
    ')),n},s.pt.creat=function(){var e=this,t=e.config,a=e.index,s=t.content,f="object"==typeof s,c=i("body");if(!t.id||!i("#"+t.id)[0]){switch("string"==typeof t.area&&(t.area="auto"===t.area?["",""]:[t.area,""]),t.shift&&(t.anim=t.shift),6==r.ie&&(t.fixed=!1),t.type){case 0:t.btn="btn"in t?t.btn:o.btn[0],r.closeAll("dialog");break;case 2:var s=t.content=f?t.content:[t.content||"","auto"];t.content='';break;case 3:delete t.title,delete t.closeBtn,t.icon===-1&&0===t.icon,r.closeAll("loading");break;case 4:f||(t.content=[t.content,"body"]),t.follow=t.content[1],t.content=t.content[0]+'',delete t.title,t.tips="object"==typeof t.tips?t.tips:[t.tips,!0],t.tipsMore||r.closeAll("tips")}if(e.vessel(f,function(n,r,u){c.append(n[0]),f?function(){2==t.type||4==t.type?function(){i("body").append(n[1])}():function(){s.parents("."+l[0])[0]||(s.data("display",s.css("display")).show().addClass("layui-layer-wrap").wrap(n[1]),i("#"+l[0]+a).find("."+l[5]).before(r))}()}():c.append(n[1]),i(".layui-layer-move")[0]||c.append(o.moveElem=u),e.layero=i("#"+l[0]+a),t.scrollbar||l.html.css("overflow","hidden").attr("layer-full",a)}).auto(a),i("#layui-layer-shade"+e.index).css({"background-color":t.shade[1]||"#000",opacity:t.shade[0]||t.shade}),2==t.type&&6==r.ie&&e.layero.find("iframe").attr("src",s[0]),4==t.type?e.tips():e.offset(),t.fixed&&n.on("resize",function(){e.offset(),(/^\d+%$/.test(t.area[0])||/^\d+%$/.test(t.area[1]))&&e.auto(a),4==t.type&&e.tips()}),t.time<=0||setTimeout(function(){r.close(e.index)},t.time),e.move().callback(),l.anim[t.anim]){var u="layer-anim "+l.anim[t.anim];e.layero.addClass(u).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){i(this).removeClass(u)})}t.isOutAnim&&e.layero.data("isOutAnim",!0)}},s.pt.auto=function(e){var t=this,a=t.config,o=i("#"+l[0]+e);""===a.area[0]&&a.maxWidth>0&&(r.ie&&r.ie<8&&a.btn&&o.width(o.innerWidth()),o.outerWidth()>a.maxWidth&&o.width(a.maxWidth));var s=[o.innerWidth(),o.innerHeight()],f=o.find(l[1]).outerHeight()||0,c=o.find("."+l[6]).outerHeight()||0,u=function(e){e=o.find(e),e.height(s[1]-f-c-2*(0|parseFloat(e.css("padding-top"))))};switch(a.type){case 2:u("iframe");break;default:""===a.area[1]?a.maxHeight>0&&o.outerHeight()>a.maxHeight?(s[1]=a.maxHeight,u("."+l[5])):a.fixed&&s[1]>=n.height()&&(s[1]=n.height(),u("."+l[5])):u("."+l[5])}return t},s.pt.offset=function(){var e=this,t=e.config,i=e.layero,a=[i.outerWidth(),i.outerHeight()],o="object"==typeof t.offset;e.offsetTop=(n.height()-a[1])/2,e.offsetLeft=(n.width()-a[0])/2,o?(e.offsetTop=t.offset[0],e.offsetLeft=t.offset[1]||e.offsetLeft):"auto"!==t.offset&&("t"===t.offset?e.offsetTop=0:"r"===t.offset?e.offsetLeft=n.width()-a[0]:"b"===t.offset?e.offsetTop=n.height()-a[1]:"l"===t.offset?e.offsetLeft=0:"lt"===t.offset?(e.offsetTop=0,e.offsetLeft=0):"lb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=0):"rt"===t.offset?(e.offsetTop=0,e.offsetLeft=n.width()-a[0]):"rb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=n.width()-a[0]):e.offsetTop=t.offset),t.fixed||(e.offsetTop=/%$/.test(e.offsetTop)?n.height()*parseFloat(e.offsetTop)/100:parseFloat(e.offsetTop),e.offsetLeft=/%$/.test(e.offsetLeft)?n.width()*parseFloat(e.offsetLeft)/100:parseFloat(e.offsetLeft),e.offsetTop+=n.scrollTop(),e.offsetLeft+=n.scrollLeft()),i.attr("minLeft")&&(e.offsetTop=n.height()-(i.find(l[1]).outerHeight()||0),e.offsetLeft=i.css("left")),i.css({top:e.offsetTop,left:e.offsetLeft})},s.pt.tips=function(){var e=this,t=e.config,a=e.layero,o=[a.outerWidth(),a.outerHeight()],r=i(t.follow);r[0]||(r=i("body"));var s={width:r.outerWidth(),height:r.outerHeight(),top:r.offset().top,left:r.offset().left},f=a.find(".layui-layer-TipsG"),c=t.tips[0];t.tips[1]||f.remove(),s.autoLeft=function(){s.left+o[0]-n.width()>0?(s.tipLeft=s.left+s.width-o[0],f.css({right:12,left:"auto"})):s.tipLeft=s.left},s.where=[function(){s.autoLeft(),s.tipTop=s.top-o[1]-10,f.removeClass("layui-layer-TipsB").addClass("layui-layer-TipsT").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left+s.width+10,s.tipTop=s.top,f.removeClass("layui-layer-TipsL").addClass("layui-layer-TipsR").css("border-bottom-color",t.tips[1])},function(){s.autoLeft(),s.tipTop=s.top+s.height+10,f.removeClass("layui-layer-TipsT").addClass("layui-layer-TipsB").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left-o[0]-10,s.tipTop=s.top,f.removeClass("layui-layer-TipsR").addClass("layui-layer-TipsL").css("border-bottom-color",t.tips[1])}],s.where[c-1](),1===c?s.top-(n.scrollTop()+o[1]+16)<0&&s.where[2]():2===c?n.width()-(s.left+s.width+o[0]+16)>0||s.where[3]():3===c?s.top-n.scrollTop()+s.height+o[1]+16-n.height()>0&&s.where[0]():4===c&&o[0]+16-s.left>0&&s.where[1](),a.find("."+l[5]).css({"background-color":t.tips[1],"padding-right":t.closeBtn?"30px":""}),a.css({left:s.tipLeft-(t.fixed?n.scrollLeft():0),top:s.tipTop-(t.fixed?n.scrollTop():0)})},s.pt.move=function(){var e=this,t=e.config,a=i(document),s=e.layero,l=s.find(t.move),f=s.find(".layui-layer-resize"),c={};return t.move&&l.css("cursor","move"),l.on("mousedown",function(e){e.preventDefault(),t.move&&(c.moveStart=!0,c.offset=[e.clientX-parseFloat(s.css("left")),e.clientY-parseFloat(s.css("top"))],o.moveElem.css("cursor","move").show())}),f.on("mousedown",function(e){e.preventDefault(),c.resizeStart=!0,c.offset=[e.clientX,e.clientY],c.area=[s.outerWidth(),s.outerHeight()],o.moveElem.css("cursor","se-resize").show()}),a.on("mousemove",function(i){if(c.moveStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1],l="fixed"===s.css("position");if(i.preventDefault(),c.stX=l?0:n.scrollLeft(),c.stY=l?0:n.scrollTop(),!t.moveOut){var f=n.width()-s.outerWidth()+c.stX,u=n.height()-s.outerHeight()+c.stY;af&&(a=f),ou&&(o=u)}s.css({left:a,top:o})}if(t.resize&&c.resizeStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1];i.preventDefault(),r.style(e.index,{width:c.area[0]+a,height:c.area[1]+o}),c.isResize=!0,t.resizing&&t.resizing(s)}}).on("mouseup",function(e){c.moveStart&&(delete c.moveStart,o.moveElem.hide(),t.moveEnd&&t.moveEnd(s)),c.resizeStart&&(delete c.resizeStart,o.moveElem.hide())}),e},s.pt.callback=function(){function e(){var e=a.cancel&&a.cancel(t.index,n);e===!1||r.close(t.index)}var t=this,n=t.layero,a=t.config;t.openLayer(),a.success&&(2==a.type?n.find("iframe").on("load",function(){a.success(n,t.index)}):a.success(n,t.index)),6==r.ie&&t.IE6(n),n.find("."+l[6]).children("a").on("click",function(){var e=i(this).index();if(0===e)a.yes?a.yes(t.index,n):a.btn1?a.btn1(t.index,n):r.close(t.index);else{var o=a["btn"+(e+1)]&&a["btn"+(e+1)](t.index,n);o===!1||r.close(t.index)}}),n.find("."+l[7]).on("click",e),a.shadeClose&&i("#layui-layer-shade"+t.index).on("click",function(){r.close(t.index)}),n.find(".layui-layer-min").on("click",function(){var e=a.min&&a.min(n);e===!1||r.min(t.index,a)}),n.find(".layui-layer-max").on("click",function(){i(this).hasClass("layui-layer-maxmin")?(r.restore(t.index),a.restore&&a.restore(n)):(r.full(t.index,a),setTimeout(function(){a.full&&a.full(n)},100))}),a.end&&(o.end[t.index]=a.end)},o.reselect=function(){i.each(i("select"),function(e,t){var n=i(this);n.parents("."+l[0])[0]||1==n.attr("layer")&&i("."+l[0]).length<1&&n.removeAttr("layer").show(),n=null})},s.pt.IE6=function(e){i("select").each(function(e,t){var n=i(this);n.parents("."+l[0])[0]||"none"===n.css("display")||n.attr({layer:"1"}).hide(),n=null})},s.pt.openLayer=function(){var e=this;r.zIndex=e.config.zIndex,r.setTop=function(e){var t=function(){r.zIndex++,e.css("z-index",r.zIndex+1)};return r.zIndex=parseInt(e[0].style.zIndex),e.on("mousedown",t),r.zIndex}},o.record=function(e){var t=[e.width(),e.height(),e.position().top,e.position().left+parseFloat(e.css("margin-left"))];e.find(".layui-layer-max").addClass("layui-layer-maxmin"),e.attr({area:t})},o.rescollbar=function(e){l.html.attr("layer-full")==e&&(l.html[0].style.removeProperty?l.html[0].style.removeProperty("overflow"):l.html[0].style.removeAttribute("overflow"),l.html.removeAttr("layer-full"))},e.layer=r,r.getChildFrame=function(e,t){return t=t||i("."+l[4]).attr("times"),i("#"+l[0]+t).find("iframe").contents().find(e)},r.getFrameIndex=function(e){return i("#"+e).parents("."+l[4]).attr("times")},r.iframeAuto=function(e){if(e){var t=r.getChildFrame("html",e).outerHeight(),n=i("#"+l[0]+e),a=n.find(l[1]).outerHeight()||0,o=n.find("."+l[6]).outerHeight()||0;n.css({height:t+a+o}),n.find("iframe").css({height:t})}},r.iframeSrc=function(e,t){i("#"+l[0]+e).find("iframe").attr("src",t)},r.style=function(e,t,n){var a=i("#"+l[0]+e),r=a.find(".layui-layer-content"),s=a.attr("type"),f=a.find(l[1]).outerHeight()||0,c=a.find("."+l[6]).outerHeight()||0;a.attr("minLeft");s!==o.type[3]&&s!==o.type[4]&&(n||(parseFloat(t.width)<=260&&(t.width=260),parseFloat(t.height)-f-c<=64&&(t.height=64+f+c)),a.css(t),c=a.find("."+l[6]).outerHeight(),s===o.type[2]?a.find("iframe").css({height:parseFloat(t.height)-f-c}):r.css({height:parseFloat(t.height)-f-c-parseFloat(r.css("padding-top"))-parseFloat(r.css("padding-bottom"))}))},r.min=function(e,t){var a=i("#"+l[0]+e),s=a.find(l[1]).outerHeight()||0,f=a.attr("minLeft")||181*o.minIndex+"px",c=a.css("position");o.record(a),o.minLeft[0]&&(f=o.minLeft[0],o.minLeft.shift()),a.attr("position",c),r.style(e,{width:180,height:s,left:f,top:n.height()-s,position:"fixed",overflow:"hidden"},!0),a.find(".layui-layer-min").hide(),"page"===a.attr("type")&&a.find(l[4]).hide(),o.rescollbar(e),a.attr("minLeft")||o.minIndex++,a.attr("minLeft",f)},r.restore=function(e){var t=i("#"+l[0]+e),n=t.attr("area").split(",");t.attr("type");r.style(e,{width:parseFloat(n[0]),height:parseFloat(n[1]),top:parseFloat(n[2]),left:parseFloat(n[3]),position:t.attr("position"),overflow:"visible"},!0),t.find(".layui-layer-max").removeClass("layui-layer-maxmin"),t.find(".layui-layer-min").show(),"page"===t.attr("type")&&t.find(l[4]).show(),o.rescollbar(e)},r.full=function(e){var t,a=i("#"+l[0]+e);o.record(a),l.html.attr("layer-full")||l.html.css("overflow","hidden").attr("layer-full",e),clearTimeout(t),t=setTimeout(function(){var t="fixed"===a.css("position");r.style(e,{top:t?0:n.scrollTop(),left:t?0:n.scrollLeft(),width:n.width(),height:n.height()},!0),a.find(".layui-layer-min").hide()},100)},r.title=function(e,t){var n=i("#"+l[0]+(t||r.index)).find(l[1]);n.html(e)},r.close=function(e){var t=i("#"+l[0]+e),n=t.attr("type"),a="layer-anim-close";if(t[0]){var s="layui-layer-wrap",f=function(){if(n===o.type[1]&&"object"===t.attr("conType")){t.children(":not(."+l[5]+")").remove();for(var a=t.find("."+s),r=0;r<2;r++)a.unwrap();a.css("display",a.data("display")).removeClass(s)}else{if(n===o.type[2])try{var f=i("#"+l[4]+e)[0];f.contentWindow.document.write(""),f.contentWindow.close(),t.find("."+l[5])[0].removeChild(f)}catch(c){}t[0].innerHTML="",t.remove()}"function"==typeof o.end[e]&&o.end[e](),delete o.end[e]};t.data("isOutAnim")&&t.addClass("layer-anim "+a),i("#layui-layer-moves, #layui-layer-shade"+e).remove(),6==r.ie&&o.reselect(),o.rescollbar(e),t.attr("minLeft")&&(o.minIndex--,o.minLeft.push(t.attr("minLeft"))),r.ie&&r.ie<10||!t.data("isOutAnim")?f():setTimeout(function(){f()},200)}},r.closeAll=function(e){i.each(i("."+l[0]),function(){var t=i(this),n=e?t.attr("type")===e:1;n&&r.close(t.attr("times")),n=null})};var f=r.cache||{},c=function(e){return f.skin?" "+f.skin+" "+f.skin+"-"+e:""};r.prompt=function(e,t){var a="";if(e=e||{},"function"==typeof e&&(t=e),e.area){var o=e.area;a='style="width: '+o[0]+"; height: "+o[1]+';"',delete e.area}var s,l=2==e.formType?'":function(){return''}(),f=e.success;return delete e.success,r.open(i.extend({type:1,btn:["确定","取消"],content:l,skin:"layui-layer-prompt"+c("prompt"),maxWidth:n.width(),success:function(t){s=t.find(".layui-layer-input"),s.val(e.value||"").focus(),"function"==typeof f&&f(t)},resize:!1,yes:function(i){var n=s.val();""===n?s.focus():n.length>(e.maxlength||500)?r.tips("最多输入"+(e.maxlength||500)+"个字数",s,{tips:1}):t&&t(n,i,s)}},e))},r.tab=function(e){e=e||{};var t=e.tab||{},n="layui-this",a=e.success;return delete e.success,r.open(i.extend({type:1,skin:"layui-layer-tab"+c("tab"),resize:!1,title:function(){var e=t.length,i=1,a="";if(e>0)for(a=''+t[0].title+"";i"+t[i].title+"";return a}(),content:'
      '+function(){var e=t.length,i=1,a="";if(e>0)for(a='
    • '+(t[0].content||"no content")+"
    • ";i'+(t[i].content||"no content")+"";return a}()+"
    ",success:function(t){var o=t.find(".layui-layer-title").children(),r=t.find(".layui-layer-tabmain").children();o.on("mousedown",function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0;var a=i(this),o=a.index();a.addClass(n).siblings().removeClass(n),r.eq(o).show().siblings().hide(),"function"==typeof e.change&&e.change(o)}),"function"==typeof a&&a(t)}},e))},r.photos=function(t,n,a){function o(e,t,i){var n=new Image;return n.src=e,n.complete?t(n):(n.onload=function(){n.onload=null,t(n)},void(n.onerror=function(e){n.onerror=null,i(e)}))}var s={};if(t=t||{},t.photos){var l=t.photos.constructor===Object,f=l?t.photos:{},u=f.data||[],d=f.start||0;s.imgIndex=(0|d)+1,t.img=t.img||"img";var y=t.success;if(delete t.success,l){if(0===u.length)return r.msg("没有图片")}else{var p=i(t.photos),h=function(){u=[],p.find(t.img).each(function(e){var t=i(this);t.attr("layer-index",e),u.push({alt:t.attr("alt"),pid:t.attr("layer-pid"),src:t.attr("layer-src")||t.attr("src"),thumb:t.attr("src")})})};if(h(),0===u.length)return;if(n||p.on("click",t.img,function(){var e=i(this),n=e.attr("layer-index");r.photos(i.extend(t,{photos:{start:n,data:u,tab:t.tab},full:t.full}),!0),h()}),!n)return}s.imgprev=function(e){s.imgIndex--,s.imgIndex<1&&(s.imgIndex=u.length),s.tabimg(e)},s.imgnext=function(e,t){s.imgIndex++,s.imgIndex>u.length&&(s.imgIndex=1,t)||s.tabimg(e)},s.keyup=function(e){if(!s.end){var t=e.keyCode;e.preventDefault(),37===t?s.imgprev(!0):39===t?s.imgnext(!0):27===t&&r.close(s.index)}},s.tabimg=function(e){if(!(u.length<=1))return f.start=s.imgIndex-1,r.close(s.index),r.photos(t,!0,e)},s.event=function(){s.bigimg.hover(function(){s.imgsee.show()},function(){s.imgsee.hide()}),s.bigimg.find(".layui-layer-imgprev").on("click",function(e){e.preventDefault(),s.imgprev()}),s.bigimg.find(".layui-layer-imgnext").on("click",function(e){e.preventDefault(),s.imgnext()}),i(document).on("keyup",s.keyup)},s.loadi=r.load(1,{shade:!("shade"in t)&&.9,scrollbar:!1}),o(u[d].src,function(n){r.close(s.loadi),s.index=r.open(i.extend({type:1,id:"layui-layer-photos",area:function(){var a=[n.width,n.height],o=[i(e).width()-100,i(e).height()-100];if(!t.full&&(a[0]>o[0]||a[1]>o[1])){var r=[a[0]/o[0],a[1]/o[1]];r[0]>r[1]?(a[0]=a[0]/r[0],a[1]=a[1]/r[0]):r[0]'+(u[d].alt||
    '+(u.length>1?'':"")+'
    '+(u[d].alt||"")+""+s.imgIndex+"/"+u.length+"
    ",success:function(e,i){s.bigimg=e.find(".layui-layer-phimg"),s.imgsee=e.find(".layui-layer-imguide,.layui-layer-imgbar"),s.event(e),t.tab&&t.tab(u[d],e),"function"==typeof y&&y(e)},end:function(){s.end=!0,i(document).off("keyup",s.keyup)}},t))},function(){r.close(s.loadi),r.msg("当前图片地址异常
    是否继续查看下一张?",{time:3e4,btn:["下一张","不看了"],yes:function(){u.length>1&&s.imgnext(!0,!0)}})})}},o.run=function(t){i=t,n=i(e),l.html=i("html"),r.open=function(e){var t=new s(e);return t.index}},e.layui&&layui.define?(r.ready(),layui.define("jquery",function(t){r.path=layui.cache.dir,o.run(layui.$),e.layer=r,t("layer",r)})):"function"==typeof define&&define.amd?define(["jquery"],function(){return o.run(e.jQuery),r}):function(){o.run(e.jQuery),r.ready()}()}(window); \ No newline at end of file diff --git a/Yangcai365_design/manage/zinc/layui/lay/modules/laypage.js b/Yangcai365_design/manage/zinc/layui/lay/modules/laypage.js new file mode 100644 index 0000000..0ddc3cb --- /dev/null +++ b/Yangcai365_design/manage/zinc/layui/lay/modules/laypage.js @@ -0,0 +1,2 @@ +/** layui-v2.5.4 MIT License By https://www.layui.com */ + ;layui.define(function(e){"use strict";var a=document,t="getElementById",n="getElementsByTagName",i="laypage",r="layui-disabled",u=function(e){var a=this;a.config=e||{},a.config.index=++s.index,a.render(!0)};u.prototype.type=function(){var e=this.config;if("object"==typeof e.elem)return void 0===e.elem.length?2:3},u.prototype.view=function(){var e=this,a=e.config,t=a.groups="groups"in a?0|a.groups:5;a.layout="object"==typeof a.layout?a.layout:["prev","page","next"],a.count=0|a.count,a.curr=0|a.curr||1,a.limits="object"==typeof a.limits?a.limits:[10,20,30,40,50],a.limit=0|a.limit||10,a.pages=Math.ceil(a.count/a.limit)||1,a.curr>a.pages&&(a.curr=a.pages),t<0?t=1:t>a.pages&&(t=a.pages),a.prev="prev"in a?a.prev:"上一页",a.next="next"in a?a.next:"下一页";var n=a.pages>t?Math.ceil((a.curr+(t>1?1:0))/(t>0?t:1)):1,i={prev:function(){return a.prev?''+a.prev+"":""}(),page:function(){var e=[];if(a.count<1)return"";n>1&&a.first!==!1&&0!==t&&e.push(''+(a.first||1)+"");var i=Math.floor((t-1)/2),r=n>1?a.curr-i:1,u=n>1?function(){var e=a.curr+(t-i-1);return e>a.pages?a.pages:e}():t;for(u-r2&&e.push('');r<=u;r++)r===a.curr?e.push('"+r+""):e.push(''+r+"");return a.pages>t&&a.pages>u&&a.last!==!1&&(u+1…'),0!==t&&e.push(''+(a.last||a.pages)+"")),e.join("")}(),next:function(){return a.next?''+a.next+"":""}(),count:'共 '+a.count+" 条",limit:function(){var e=['"}(),refresh:['','',""].join(""),skip:function(){return['到第','','页',""].join("")}()};return['
    ',function(){var e=[];return layui.each(a.layout,function(a,t){i[t]&&e.push(i[t])}),e.join("")}(),"
    "].join("")},u.prototype.jump=function(e,a){if(e){var t=this,i=t.config,r=e.children,u=e[n]("button")[0],l=e[n]("input")[0],p=e[n]("select")[0],c=function(){var e=0|l.value.replace(/\s|\D/g,"");e&&(i.curr=e,t.render())};if(a)return c();for(var o=0,y=r.length;oi.pages||(i.curr=e,t.render())});p&&s.on(p,"change",function(){var e=this.value;i.curr*e>i.count&&(i.curr=Math.ceil(i.count/e)),i.limit=e,t.render()}),u&&s.on(u,"click",function(){c()})}},u.prototype.skip=function(e){if(e){var a=this,t=e[n]("input")[0];t&&s.on(t,"keyup",function(t){var n=this.value,i=t.keyCode;/^(37|38|39|40)$/.test(i)||(/\D/.test(n)&&(this.value=n.replace(/\D/,"")),13===i&&a.jump(e,!0))})}},u.prototype.render=function(e){var n=this,i=n.config,r=n.type(),u=n.view();2===r?i.elem&&(i.elem.innerHTML=u):3===r?i.elem.html(u):a[t](i.elem)&&(a[t](i.elem).innerHTML=u),i.jump&&i.jump(i,e);var s=a[t]("layui-laypage-"+i.index);n.jump(s),i.hash&&!e&&(location.hash="!"+i.hash+"="+i.curr),n.skip(s)};var s={render:function(e){var a=new u(e);return a.index},index:layui.laypage?layui.laypage.index+1e4:0,on:function(e,a,t){return e.attachEvent?e.attachEvent("on"+a,function(a){a.target=a.srcElement,t.call(e,a)}):e.addEventListener(a,t,!1),this}};e(i,s)}); \ No newline at end of file diff --git a/Yangcai365_design/manage/zinc/layui/lay/modules/laytpl.js b/Yangcai365_design/manage/zinc/layui/lay/modules/laytpl.js new file mode 100644 index 0000000..7590e08 --- /dev/null +++ b/Yangcai365_design/manage/zinc/layui/lay/modules/laytpl.js @@ -0,0 +1,2 @@ +/** layui-v2.5.4 MIT License By https://www.layui.com */ + ;layui.define(function(e){"use strict";var r={open:"{{",close:"}}"},c={exp:function(e){return new RegExp(e,"g")},query:function(e,c,t){var o=["#([\\s\\S])+?","([^{#}])*?"][e||0];return n((c||"")+r.open+o+r.close+(t||""))},escape:function(e){return String(e||"").replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")},error:function(e,r){var c="Laytpl Error:";return"object"==typeof console&&console.error(c+e+"\n"+(r||"")),c+e}},n=c.exp,t=function(e){this.tpl=e};t.pt=t.prototype,window.errors=0,t.pt.parse=function(e,t){var o=this,p=e,a=n("^"+r.open+"#",""),l=n(r.close+"$","");e=e.replace(/\s+|\r|\t|\n/g," ").replace(n(r.open+"#"),r.open+"# ").replace(n(r.close+"}"),"} "+r.close).replace(/\\/g,"\\\\").replace(n(r.open+"!(.+?)!"+r.close),function(e){return e=e.replace(n("^"+r.open+"!"),"").replace(n("!"+r.close),"").replace(n(r.open+"|"+r.close),function(e){return e.replace(/(.)/g,"\\$1")})}).replace(/(?="|')/g,"\\").replace(c.query(),function(e){return e=e.replace(a,"").replace(l,""),'";'+e.replace(/\\/g,"")+';view+="'}).replace(c.query(1),function(e){var c='"+(';return e.replace(/\s/g,"")===r.open+r.close?"":(e=e.replace(n(r.open+"|"+r.close),""),/^=/.test(e)&&(e=e.replace(/^=/,""),c='"+_escape_('),c+e.replace(/\\/g,"")+')+"')}),e='"use strict";var view = "'+e+'";return view;';try{return o.cache=e=new Function("d, _escape_",e),e(t,c.escape)}catch(u){return delete o.cache,c.error(u,p)}},t.pt.render=function(e,r){var n,t=this;return e?(n=t.cache?t.cache(e,c.escape):t.parse(t.tpl,e),r?void r(n):n):c.error("no data")};var o=function(e){return"string"!=typeof e?c.error("Template not found"):new t(e)};o.config=function(e){e=e||{};for(var c in e)r[c]=e[c]},o.v="1.2.0",e("laytpl",o)}); \ No newline at end of file diff --git a/Yangcai365_design/manage/zinc/layui/lay/modules/mobile.js b/Yangcai365_design/manage/zinc/layui/lay/modules/mobile.js new file mode 100644 index 0000000..4b3e7ae --- /dev/null +++ b/Yangcai365_design/manage/zinc/layui/lay/modules/mobile.js @@ -0,0 +1,2 @@ +/** layui-v2.5.4 MIT License By https://www.layui.com */ + ;layui.define(function(i){i("layui.mobile",layui.v)});layui.define(function(e){"use strict";var r={open:"{{",close:"}}"},c={exp:function(e){return new RegExp(e,"g")},query:function(e,c,t){var o=["#([\\s\\S])+?","([^{#}])*?"][e||0];return n((c||"")+r.open+o+r.close+(t||""))},escape:function(e){return String(e||"").replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")},error:function(e,r){var c="Laytpl Error:";return"object"==typeof console&&console.error(c+e+"\n"+(r||"")),c+e}},n=c.exp,t=function(e){this.tpl=e};t.pt=t.prototype,window.errors=0,t.pt.parse=function(e,t){var o=this,p=e,a=n("^"+r.open+"#",""),l=n(r.close+"$","");e=e.replace(/\s+|\r|\t|\n/g," ").replace(n(r.open+"#"),r.open+"# ").replace(n(r.close+"}"),"} "+r.close).replace(/\\/g,"\\\\").replace(n(r.open+"!(.+?)!"+r.close),function(e){return e=e.replace(n("^"+r.open+"!"),"").replace(n("!"+r.close),"").replace(n(r.open+"|"+r.close),function(e){return e.replace(/(.)/g,"\\$1")})}).replace(/(?="|')/g,"\\").replace(c.query(),function(e){return e=e.replace(a,"").replace(l,""),'";'+e.replace(/\\/g,"")+';view+="'}).replace(c.query(1),function(e){var c='"+(';return e.replace(/\s/g,"")===r.open+r.close?"":(e=e.replace(n(r.open+"|"+r.close),""),/^=/.test(e)&&(e=e.replace(/^=/,""),c='"+_escape_('),c+e.replace(/\\/g,"")+')+"')}),e='"use strict";var view = "'+e+'";return view;';try{return o.cache=e=new Function("d, _escape_",e),e(t,c.escape)}catch(u){return delete o.cache,c.error(u,p)}},t.pt.render=function(e,r){var n,t=this;return e?(n=t.cache?t.cache(e,c.escape):t.parse(t.tpl,e),r?void r(n):n):c.error("no data")};var o=function(e){return"string"!=typeof e?c.error("Template not found"):new t(e)};o.config=function(e){e=e||{};for(var c in e)r[c]=e[c]},o.v="1.2.0",e("laytpl",o)});layui.define(function(e){"use strict";var t=(window,document),i="querySelectorAll",n="getElementsByClassName",a=function(e){return t[i](e)},s={type:0,shade:!0,shadeClose:!0,fixed:!0,anim:"scale"},l={extend:function(e){var t=JSON.parse(JSON.stringify(s));for(var i in e)t[i]=e[i];return t},timer:{},end:{}};l.touch=function(e,t){e.addEventListener("click",function(e){t.call(this,e)},!1)};var o=0,r=["layui-m-layer"],d=function(e){var t=this;t.config=l.extend(e),t.view()};d.prototype.view=function(){var e=this,i=e.config,s=t.createElement("div");e.id=s.id=r[0]+o,s.setAttribute("class",r[0]+" "+r[0]+(i.type||0)),s.setAttribute("index",o);var l=function(){var e="object"==typeof i.title;return i.title?'

    '+(e?i.title[0]:i.title)+"

    ":""}(),d=function(){"string"==typeof i.btn&&(i.btn=[i.btn]);var e,t=(i.btn||[]).length;return 0!==t&&i.btn?(e=''+i.btn[0]+"",2===t&&(e=''+i.btn[1]+""+e),'
    '+e+"
    "):""}();if(i.fixed||(i.top=i.hasOwnProperty("top")?i.top:100,i.style=i.style||"",i.style+=" top:"+(t.body.scrollTop+i.top)+"px"),2===i.type&&(i.content='

    '+(i.content||"")+"

    "),i.skin&&(i.anim="up"),"msg"===i.skin&&(i.shade=!1),s.innerHTML=(i.shade?"
    ':"")+'
    "+l+'
    '+i.content+"
    "+d+"
    ",!i.type||2===i.type){var y=t[n](r[0]+i.type),u=y.length;u>=1&&c.close(y[0].getAttribute("index"))}document.body.appendChild(s);var m=e.elem=a("#"+e.id)[0];i.success&&i.success(m),e.index=o++,e.action(i,m)},d.prototype.action=function(e,t){var i=this;e.time&&(l.timer[i.index]=setTimeout(function(){c.close(i.index)},1e3*e.time));var a=function(){var t=this.getAttribute("type");0==t?(e.no&&e.no(),c.close(i.index)):e.yes?e.yes(i.index):c.close(i.index)};if(e.btn)for(var s=t[n]("layui-m-layerbtn")[0].children,o=s.length,r=0;r0&&e-1 in t)}function s(t){return A.call(t,function(t){return null!=t})}function u(t){return t.length>0?T.fn.concat.apply([],t):t}function c(t){return t.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function l(t){return t in F?F[t]:F[t]=new RegExp("(^|\\s)"+t+"(\\s|$)")}function f(t,e){return"number"!=typeof e||k[c(t)]?e:e+"px"}function h(t){var e,n;return $[t]||(e=L.createElement(t),L.body.appendChild(e),n=getComputedStyle(e,"").getPropertyValue("display"),e.parentNode.removeChild(e),"none"==n&&(n="block"),$[t]=n),$[t]}function p(t){return"children"in t?D.call(t.children):T.map(t.childNodes,function(t){if(1==t.nodeType)return t})}function d(t,e){var n,r=t?t.length:0;for(n=0;n]*>/,R=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,z=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Z=/^(?:body|html)$/i,q=/([A-Z])/g,H=["val","css","html","text","data","width","height","offset"],I=["after","prepend","before","append"],V=L.createElement("table"),_=L.createElement("tr"),B={tr:L.createElement("tbody"),tbody:V,thead:V,tfoot:V,td:_,th:_,"*":L.createElement("div")},U=/complete|loaded|interactive/,X=/^[\w-]*$/,J={},W=J.toString,Y={},G=L.createElement("div"),K={tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},Q=Array.isArray||function(t){return t instanceof Array};return Y.matches=function(t,e){if(!e||!t||1!==t.nodeType)return!1;var n=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.matchesSelector;if(n)return n.call(t,e);var r,i=t.parentNode,o=!i;return o&&(i=G).appendChild(t),r=~Y.qsa(i,e).indexOf(t),o&&G.removeChild(t),r},C=function(t){return t.replace(/-+(.)?/g,function(t,e){return e?e.toUpperCase():""})},N=function(t){return A.call(t,function(e,n){return t.indexOf(e)==n})},Y.fragment=function(t,e,n){var r,i,a;return R.test(t)&&(r=T(L.createElement(RegExp.$1))),r||(t.replace&&(t=t.replace(z,"<$1>")),e===E&&(e=M.test(t)&&RegExp.$1),e in B||(e="*"),a=B[e],a.innerHTML=""+t,r=T.each(D.call(a.childNodes),function(){a.removeChild(this)})),o(n)&&(i=T(r),T.each(n,function(t,e){H.indexOf(t)>-1?i[t](e):i.attr(t,e)})),r},Y.Z=function(t,e){return new d(t,e)},Y.isZ=function(t){return t instanceof Y.Z},Y.init=function(t,n){var r;if(!t)return Y.Z();if("string"==typeof t)if(t=t.trim(),"<"==t[0]&&M.test(t))r=Y.fragment(t,RegExp.$1,n),t=null;else{if(n!==E)return T(n).find(t);r=Y.qsa(L,t)}else{if(e(t))return T(L).ready(t);if(Y.isZ(t))return t;if(Q(t))r=s(t);else if(i(t))r=[t],t=null;else if(M.test(t))r=Y.fragment(t.trim(),RegExp.$1,n),t=null;else{if(n!==E)return T(n).find(t);r=Y.qsa(L,t)}}return Y.Z(r,t)},T=function(t,e){return Y.init(t,e)},T.extend=function(t){var e,n=D.call(arguments,1);return"boolean"==typeof t&&(e=t,t=n.shift()),n.forEach(function(n){m(t,n,e)}),t},Y.qsa=function(t,e){var n,r="#"==e[0],i=!r&&"."==e[0],o=r||i?e.slice(1):e,a=X.test(o);return t.getElementById&&a&&r?(n=t.getElementById(o))?[n]:[]:1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType?[]:D.call(a&&!r&&t.getElementsByClassName?i?t.getElementsByClassName(o):t.getElementsByTagName(e):t.querySelectorAll(e))},T.contains=L.documentElement.contains?function(t,e){return t!==e&&t.contains(e)}:function(t,e){for(;e&&(e=e.parentNode);)if(e===t)return!0;return!1},T.type=t,T.isFunction=e,T.isWindow=n,T.isArray=Q,T.isPlainObject=o,T.isEmptyObject=function(t){var e;for(e in t)return!1;return!0},T.isNumeric=function(t){var e=Number(t),n=typeof t;return null!=t&&"boolean"!=n&&("string"!=n||t.length)&&!isNaN(e)&&isFinite(e)||!1},T.inArray=function(t,e,n){return O.indexOf.call(e,t,n)},T.camelCase=C,T.trim=function(t){return null==t?"":String.prototype.trim.call(t)},T.uuid=0,T.support={},T.expr={},T.noop=function(){},T.map=function(t,e){var n,r,i,o=[];if(a(t))for(r=0;r=0?t:t+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!=this.parentNode&&this.parentNode.removeChild(this)})},each:function(t){return O.every.call(this,function(e,n){return t.call(e,n,e)!==!1}),this},filter:function(t){return e(t)?this.not(this.not(t)):T(A.call(this,function(e){return Y.matches(e,t)}))},add:function(t,e){return T(N(this.concat(T(t,e))))},is:function(t){return this.length>0&&Y.matches(this[0],t)},not:function(t){var n=[];if(e(t)&&t.call!==E)this.each(function(e){t.call(this,e)||n.push(this)});else{var r="string"==typeof t?this.filter(t):a(t)&&e(t.item)?D.call(t):T(t);this.forEach(function(t){r.indexOf(t)<0&&n.push(t)})}return T(n)},has:function(t){return this.filter(function(){return i(t)?T.contains(this,t):T(this).find(t).size()})},eq:function(t){return t===-1?this.slice(t):this.slice(t,+t+1)},first:function(){var t=this[0];return t&&!i(t)?t:T(t)},last:function(){var t=this[this.length-1];return t&&!i(t)?t:T(t)},find:function(t){var e,n=this;return e=t?"object"==typeof t?T(t).filter(function(){var t=this;return O.some.call(n,function(e){return T.contains(e,t)})}):1==this.length?T(Y.qsa(this[0],t)):this.map(function(){return Y.qsa(this,t)}):T()},closest:function(t,e){var n=[],i="object"==typeof t&&T(t);return this.each(function(o,a){for(;a&&!(i?i.indexOf(a)>=0:Y.matches(a,t));)a=a!==e&&!r(a)&&a.parentNode;a&&n.indexOf(a)<0&&n.push(a)}),T(n)},parents:function(t){for(var e=[],n=this;n.length>0;)n=T.map(n,function(t){if((t=t.parentNode)&&!r(t)&&e.indexOf(t)<0)return e.push(t),t});return v(e,t)},parent:function(t){return v(N(this.pluck("parentNode")),t)},children:function(t){return v(this.map(function(){return p(this)}),t)},contents:function(){return this.map(function(){return this.contentDocument||D.call(this.childNodes)})},siblings:function(t){return v(this.map(function(t,e){return A.call(p(e.parentNode),function(t){return t!==e})}),t)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(t){return T.map(this,function(e){return e[t]})},show:function(){return this.each(function(){"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=h(this.nodeName))})},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){var n=e(t);if(this[0]&&!n)var r=T(t).get(0),i=r.parentNode||this.length>1;return this.each(function(e){T(this).wrapAll(n?t.call(this,e):i?r.cloneNode(!0):r)})},wrapAll:function(t){if(this[0]){T(this[0]).before(t=T(t));for(var e;(e=t.children()).length;)t=e.first();T(t).append(this)}return this},wrapInner:function(t){var n=e(t);return this.each(function(e){var r=T(this),i=r.contents(),o=n?t.call(this,e):t;i.length?i.wrapAll(o):r.append(o)})},unwrap:function(){return this.parent().each(function(){T(this).replaceWith(T(this).children())}),this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(t){return this.each(function(){var e=T(this);(t===E?"none"==e.css("display"):t)?e.show():e.hide()})},prev:function(t){return T(this.pluck("previousElementSibling")).filter(t||"*")},next:function(t){return T(this.pluck("nextElementSibling")).filter(t||"*")},html:function(t){return 0 in arguments?this.each(function(e){var n=this.innerHTML;T(this).empty().append(g(this,t,e,n))}):0 in this?this[0].innerHTML:null},text:function(t){return 0 in arguments?this.each(function(e){var n=g(this,t,e,this.textContent);this.textContent=null==n?"":""+n}):0 in this?this.pluck("textContent").join(""):null},attr:function(t,e){var n;return"string"!=typeof t||1 in arguments?this.each(function(n){if(1===this.nodeType)if(i(t))for(j in t)y(this,j,t[j]);else y(this,t,g(this,e,n,this.getAttribute(t)))}):0 in this&&1==this[0].nodeType&&null!=(n=this[0].getAttribute(t))?n:E},removeAttr:function(t){return this.each(function(){1===this.nodeType&&t.split(" ").forEach(function(t){y(this,t)},this)})},prop:function(t,e){return t=K[t]||t,1 in arguments?this.each(function(n){this[t]=g(this,e,n,this[t])}):this[0]&&this[0][t]},removeProp:function(t){return t=K[t]||t,this.each(function(){delete this[t]})},data:function(t,e){var n="data-"+t.replace(q,"-$1").toLowerCase(),r=1 in arguments?this.attr(n,e):this.attr(n);return null!==r?b(r):E},val:function(t){return 0 in arguments?(null==t&&(t=""),this.each(function(e){this.value=g(this,t,e,this.value)})):this[0]&&(this[0].multiple?T(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value)},offset:function(t){if(t)return this.each(function(e){var n=T(this),r=g(this,t,e,n.offset()),i=n.offsetParent().offset(),o={top:r.top-i.top,left:r.left-i.left};"static"==n.css("position")&&(o.position="relative"),n.css(o)});if(!this.length)return null;if(L.documentElement!==this[0]&&!T.contains(L.documentElement,this[0]))return{top:0,left:0};var e=this[0].getBoundingClientRect();return{left:e.left+window.pageXOffset,top:e.top+window.pageYOffset,width:Math.round(e.width),height:Math.round(e.height)}},css:function(e,n){if(arguments.length<2){var r=this[0];if("string"==typeof e){if(!r)return;return r.style[C(e)]||getComputedStyle(r,"").getPropertyValue(e)}if(Q(e)){if(!r)return;var i={},o=getComputedStyle(r,"");return T.each(e,function(t,e){i[e]=r.style[C(e)]||o.getPropertyValue(e)}),i}}var a="";if("string"==t(e))n||0===n?a=c(e)+":"+f(e,n):this.each(function(){this.style.removeProperty(c(e))});else for(j in e)e[j]||0===e[j]?a+=c(j)+":"+f(j,e[j])+";":this.each(function(){this.style.removeProperty(c(j))});return this.each(function(){this.style.cssText+=";"+a})},index:function(t){return t?this.indexOf(T(t)[0]):this.parent().children().indexOf(this[0])},hasClass:function(t){return!!t&&O.some.call(this,function(t){return this.test(x(t))},l(t))},addClass:function(t){return t?this.each(function(e){if("className"in this){S=[];var n=x(this),r=g(this,t,e,n);r.split(/\s+/g).forEach(function(t){T(this).hasClass(t)||S.push(t)},this),S.length&&x(this,n+(n?" ":"")+S.join(" "))}}):this},removeClass:function(t){return this.each(function(e){if("className"in this){if(t===E)return x(this,"");S=x(this),g(this,t,e,S).split(/\s+/g).forEach(function(t){S=S.replace(l(t)," ")}),x(this,S.trim())}})},toggleClass:function(t,e){return t?this.each(function(n){var r=T(this),i=g(this,t,n,x(this));i.split(/\s+/g).forEach(function(t){(e===E?!r.hasClass(t):e)?r.addClass(t):r.removeClass(t)})}):this},scrollTop:function(t){if(this.length){var e="scrollTop"in this[0];return t===E?e?this[0].scrollTop:this[0].pageYOffset:this.each(e?function(){this.scrollTop=t}:function(){this.scrollTo(this.scrollX,t)})}},scrollLeft:function(t){if(this.length){var e="scrollLeft"in this[0];return t===E?e?this[0].scrollLeft:this[0].pageXOffset:this.each(e?function(){this.scrollLeft=t}:function(){this.scrollTo(t,this.scrollY)})}},position:function(){if(this.length){var t=this[0],e=this.offsetParent(),n=this.offset(),r=Z.test(e[0].nodeName)?{top:0,left:0}:e.offset();return n.top-=parseFloat(T(t).css("margin-top"))||0,n.left-=parseFloat(T(t).css("margin-left"))||0,r.top+=parseFloat(T(e[0]).css("border-top-width"))||0,r.left+=parseFloat(T(e[0]).css("border-left-width"))||0,{top:n.top-r.top,left:n.left-r.left}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||L.body;t&&!Z.test(t.nodeName)&&"static"==T(t).css("position");)t=t.offsetParent;return t})}},T.fn.detach=T.fn.remove,["width","height"].forEach(function(t){var e=t.replace(/./,function(t){return t[0].toUpperCase()});T.fn[t]=function(i){var o,a=this[0];return i===E?n(a)?a["inner"+e]:r(a)?a.documentElement["scroll"+e]:(o=this.offset())&&o[t]:this.each(function(e){a=T(this),a.css(t,g(this,i,e,a[t]()))})}}),I.forEach(function(e,n){var r=n%2;T.fn[e]=function(){var e,i,o=T.map(arguments,function(n){var r=[];return e=t(n),"array"==e?(n.forEach(function(t){return t.nodeType!==E?r.push(t):T.zepto.isZ(t)?r=r.concat(t.get()):void(r=r.concat(Y.fragment(t)))}),r):"object"==e||null==n?n:Y.fragment(n)}),a=this.length>1;return o.length<1?this:this.each(function(t,e){i=r?e:e.parentNode,e=0==n?e.nextSibling:1==n?e.firstChild:2==n?e:null;var s=T.contains(L.documentElement,i);o.forEach(function(t){if(a)t=t.cloneNode(!0);else if(!i)return T(t).remove();i.insertBefore(t,e),s&&w(t,function(t){if(!(null==t.nodeName||"SCRIPT"!==t.nodeName.toUpperCase()||t.type&&"text/javascript"!==t.type||t.src)){var e=t.ownerDocument?t.ownerDocument.defaultView:window;e.eval.call(e,t.innerHTML)}})})})},T.fn[r?e+"To":"insert"+(n?"Before":"After")]=function(t){return T(t)[e](this),this}}),Y.Z.prototype=d.prototype=T.fn,Y.uniq=N,Y.deserializeValue=b,T.zepto=Y,T}();!function(t){function e(t){return t._zid||(t._zid=h++)}function n(t,n,o,a){if(n=r(n),n.ns)var s=i(n.ns);return(v[e(t)]||[]).filter(function(t){return t&&(!n.e||t.e==n.e)&&(!n.ns||s.test(t.ns))&&(!o||e(t.fn)===e(o))&&(!a||t.sel==a)})}function r(t){var e=(""+t).split(".");return{e:e[0],ns:e.slice(1).sort().join(" ")}}function i(t){return new RegExp("(?:^| )"+t.replace(" "," .* ?")+"(?: |$)")}function o(t,e){return t.del&&!y&&t.e in x||!!e}function a(t){return b[t]||y&&x[t]||t}function s(n,i,s,u,l,h,p){var d=e(n),m=v[d]||(v[d]=[]);i.split(/\s/).forEach(function(e){if("ready"==e)return t(document).ready(s);var i=r(e);i.fn=s,i.sel=l,i.e in b&&(s=function(e){var n=e.relatedTarget;if(!n||n!==this&&!t.contains(this,n))return i.fn.apply(this,arguments)}),i.del=h;var d=h||s;i.proxy=function(t){if(t=c(t),!t.isImmediatePropagationStopped()){t.data=u;var e=d.apply(n,t._args==f?[t]:[t].concat(t._args));return e===!1&&(t.preventDefault(),t.stopPropagation()),e}},i.i=m.length,m.push(i),"addEventListener"in n&&n.addEventListener(a(i.e),i.proxy,o(i,p))})}function u(t,r,i,s,u){var c=e(t);(r||"").split(/\s/).forEach(function(e){n(t,e,i,s).forEach(function(e){delete v[c][e.i],"removeEventListener"in t&&t.removeEventListener(a(e.e),e.proxy,o(e,u))})})}function c(e,n){return!n&&e.isDefaultPrevented||(n||(n=e),t.each(T,function(t,r){var i=n[t];e[t]=function(){return this[r]=w,i&&i.apply(n,arguments)},e[r]=E}),e.timeStamp||(e.timeStamp=Date.now()),(n.defaultPrevented!==f?n.defaultPrevented:"returnValue"in n?n.returnValue===!1:n.getPreventDefault&&n.getPreventDefault())&&(e.isDefaultPrevented=w)),e}function l(t){var e,n={originalEvent:t};for(e in t)j.test(e)||t[e]===f||(n[e]=t[e]);return c(n,t)}var f,h=1,p=Array.prototype.slice,d=t.isFunction,m=function(t){return"string"==typeof t},v={},g={},y="onfocusin"in window,x={focus:"focusin",blur:"focusout"},b={mouseenter:"mouseover",mouseleave:"mouseout"};g.click=g.mousedown=g.mouseup=g.mousemove="MouseEvents",t.event={add:s,remove:u},t.proxy=function(n,r){var i=2 in arguments&&p.call(arguments,2);if(d(n)){var o=function(){return n.apply(r,i?i.concat(p.call(arguments)):arguments)};return o._zid=e(n),o}if(m(r))return i?(i.unshift(n[r],n),t.proxy.apply(null,i)):t.proxy(n[r],n);throw new TypeError("expected function")},t.fn.bind=function(t,e,n){return this.on(t,e,n)},t.fn.unbind=function(t,e){return this.off(t,e)},t.fn.one=function(t,e,n,r){return this.on(t,e,n,r,1)};var w=function(){return!0},E=function(){return!1},j=/^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,T={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};t.fn.delegate=function(t,e,n){return this.on(e,t,n)},t.fn.undelegate=function(t,e,n){return this.off(e,t,n)},t.fn.live=function(e,n){return t(document.body).delegate(this.selector,e,n),this},t.fn.die=function(e,n){return t(document.body).undelegate(this.selector,e,n),this},t.fn.on=function(e,n,r,i,o){var a,c,h=this;return e&&!m(e)?(t.each(e,function(t,e){h.on(t,n,r,e,o)}),h):(m(n)||d(i)||i===!1||(i=r,r=n,n=f),i!==f&&r!==!1||(i=r,r=f),i===!1&&(i=E),h.each(function(f,h){o&&(a=function(t){return u(h,t.type,i),i.apply(this,arguments)}),n&&(c=function(e){var r,o=t(e.target).closest(n,h).get(0);if(o&&o!==h)return r=t.extend(l(e),{currentTarget:o,liveFired:h}),(a||i).apply(o,[r].concat(p.call(arguments,1)))}),s(h,e,i,r,n,c||a)}))},t.fn.off=function(e,n,r){var i=this;return e&&!m(e)?(t.each(e,function(t,e){i.off(t,n,e)}),i):(m(n)||d(r)||r===!1||(r=n,n=f),r===!1&&(r=E),i.each(function(){u(this,e,r,n)}))},t.fn.trigger=function(e,n){return e=m(e)||t.isPlainObject(e)?t.Event(e):c(e),e._args=n,this.each(function(){e.type in x&&"function"==typeof this[e.type]?this[e.type]():"dispatchEvent"in this?this.dispatchEvent(e):t(this).triggerHandler(e,n)})},t.fn.triggerHandler=function(e,r){var i,o;return this.each(function(a,s){i=l(m(e)?t.Event(e):e),i._args=r,i.target=s,t.each(n(s,e.type||e),function(t,e){if(o=e.proxy(i),i.isImmediatePropagationStopped())return!1})}),o},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(e){t.fn[e]=function(t){return 0 in arguments?this.bind(e,t):this.trigger(e)}}),t.Event=function(t,e){m(t)||(e=t,t=e.type);var n=document.createEvent(g[t]||"Events"),r=!0;if(e)for(var i in e)"bubbles"==i?r=!!e[i]:n[i]=e[i];return n.initEvent(t,r,!0),c(n)}}(e),function(t){function e(e,n,r){var i=t.Event(n);return t(e).trigger(i,r),!i.isDefaultPrevented()}function n(t,n,r,i){if(t.global)return e(n||x,r,i)}function r(e){e.global&&0===t.active++&&n(e,null,"ajaxStart")}function i(e){e.global&&!--t.active&&n(e,null,"ajaxStop")}function o(t,e){var r=e.context;return e.beforeSend.call(r,t,e)!==!1&&n(e,r,"ajaxBeforeSend",[t,e])!==!1&&void n(e,r,"ajaxSend",[t,e])}function a(t,e,r,i){var o=r.context,a="success";r.success.call(o,t,a,e),i&&i.resolveWith(o,[t,a,e]),n(r,o,"ajaxSuccess",[e,r,t]),u(a,e,r)}function s(t,e,r,i,o){var a=i.context;i.error.call(a,r,e,t),o&&o.rejectWith(a,[r,e,t]),n(i,a,"ajaxError",[r,i,t||e]),u(e,r,i)}function u(t,e,r){var o=r.context;r.complete.call(o,e,t),n(r,o,"ajaxComplete",[e,r]),i(r)}function c(t,e,n){if(n.dataFilter==l)return t;var r=n.context;return n.dataFilter.call(r,t,e)}function l(){}function f(t){return t&&(t=t.split(";",2)[0]),t&&(t==T?"html":t==j?"json":w.test(t)?"script":E.test(t)&&"xml")||"text"}function h(t,e){return""==e?t:(t+"&"+e).replace(/[&?]{1,2}/,"?")}function p(e){e.processData&&e.data&&"string"!=t.type(e.data)&&(e.data=t.param(e.data,e.traditional)),!e.data||e.type&&"GET"!=e.type.toUpperCase()&&"jsonp"!=e.dataType||(e.url=h(e.url,e.data),e.data=void 0)}function d(e,n,r,i){return t.isFunction(n)&&(i=r,r=n,n=void 0),t.isFunction(r)||(i=r,r=void 0),{url:e,data:n,success:r,dataType:i}}function m(e,n,r,i){var o,a=t.isArray(n),s=t.isPlainObject(n);t.each(n,function(n,u){o=t.type(u),i&&(n=r?i:i+"["+(s||"object"==o||"array"==o?n:"")+"]"),!i&&a?e.add(u.name,u.value):"array"==o||!r&&"object"==o?m(e,u,r,n):e.add(n,u)})}var v,g,y=+new Date,x=window.document,b=/)<[^<]*)*<\/script>/gi,w=/^(?:text|application)\/javascript/i,E=/^(?:text|application)\/xml/i,j="application/json",T="text/html",S=/^\s*$/,C=x.createElement("a");C.href=window.location.href,t.active=0,t.ajaxJSONP=function(e,n){if(!("type"in e))return t.ajax(e);var r,i,u=e.jsonpCallback,c=(t.isFunction(u)?u():u)||"Zepto"+y++,l=x.createElement("script"),f=window[c],h=function(e){t(l).triggerHandler("error",e||"abort")},p={abort:h};return n&&n.promise(p),t(l).on("load error",function(o,u){clearTimeout(i),t(l).off().remove(),"error"!=o.type&&r?a(r[0],p,e,n):s(null,u||"error",p,e,n),window[c]=f,r&&t.isFunction(f)&&f(r[0]),f=r=void 0}),o(p,e)===!1?(h("abort"),p):(window[c]=function(){r=arguments},l.src=e.url.replace(/\?(.+)=\?/,"?$1="+c),x.head.appendChild(l),e.timeout>0&&(i=setTimeout(function(){h("timeout")},e.timeout)),p)},t.ajaxSettings={type:"GET",beforeSend:l,success:l,error:l,complete:l,context:null,global:!0,xhr:function(){return new window.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:j,xml:"application/xml, text/xml",html:T,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0,dataFilter:l},t.ajax=function(e){var n,i,u=t.extend({},e||{}),d=t.Deferred&&t.Deferred();for(v in t.ajaxSettings)void 0===u[v]&&(u[v]=t.ajaxSettings[v]);r(u),u.crossDomain||(n=x.createElement("a"),n.href=u.url,n.href=n.href,u.crossDomain=C.protocol+"//"+C.host!=n.protocol+"//"+n.host),u.url||(u.url=window.location.toString()),(i=u.url.indexOf("#"))>-1&&(u.url=u.url.slice(0,i)),p(u);var m=u.dataType,y=/\?.+=\?/.test(u.url);if(y&&(m="jsonp"),u.cache!==!1&&(e&&e.cache===!0||"script"!=m&&"jsonp"!=m)||(u.url=h(u.url,"_="+Date.now())),"jsonp"==m)return y||(u.url=h(u.url,u.jsonp?u.jsonp+"=?":u.jsonp===!1?"":"callback=?")),t.ajaxJSONP(u,d);var b,w=u.accepts[m],E={},j=function(t,e){E[t.toLowerCase()]=[t,e]},T=/^([\w-]+:)\/\//.test(u.url)?RegExp.$1:window.location.protocol,N=u.xhr(),O=N.setRequestHeader;if(d&&d.promise(N),u.crossDomain||j("X-Requested-With","XMLHttpRequest"),j("Accept",w||"*/*"),(w=u.mimeType||w)&&(w.indexOf(",")>-1&&(w=w.split(",",2)[0]),N.overrideMimeType&&N.overrideMimeType(w)),(u.contentType||u.contentType!==!1&&u.data&&"GET"!=u.type.toUpperCase())&&j("Content-Type",u.contentType||"application/x-www-form-urlencoded"),u.headers)for(g in u.headers)j(g,u.headers[g]);if(N.setRequestHeader=j,N.onreadystatechange=function(){if(4==N.readyState){N.onreadystatechange=l,clearTimeout(b);var e,n=!1;if(N.status>=200&&N.status<300||304==N.status||0==N.status&&"file:"==T){if(m=m||f(u.mimeType||N.getResponseHeader("content-type")),"arraybuffer"==N.responseType||"blob"==N.responseType)e=N.response;else{e=N.responseText;try{e=c(e,m,u),"script"==m?(0,eval)(e):"xml"==m?e=N.responseXML:"json"==m&&(e=S.test(e)?null:t.parseJSON(e))}catch(r){n=r}if(n)return s(n,"parsererror",N,u,d)}a(e,N,u,d)}else s(N.statusText||null,N.status?"error":"abort",N,u,d)}},o(N,u)===!1)return N.abort(),s(null,"abort",N,u,d),N;var P=!("async"in u)||u.async;if(N.open(u.type,u.url,P,u.username,u.password),u.xhrFields)for(g in u.xhrFields)N[g]=u.xhrFields[g];for(g in E)O.apply(N,E[g]);return u.timeout>0&&(b=setTimeout(function(){N.onreadystatechange=l,N.abort(),s(null,"timeout",N,u,d)},u.timeout)),N.send(u.data?u.data:null),N},t.get=function(){return t.ajax(d.apply(null,arguments))},t.post=function(){var e=d.apply(null,arguments);return e.type="POST",t.ajax(e)},t.getJSON=function(){var e=d.apply(null,arguments);return e.dataType="json",t.ajax(e)},t.fn.load=function(e,n,r){if(!this.length)return this;var i,o=this,a=e.split(/\s/),s=d(e,n,r),u=s.success;return a.length>1&&(s.url=a[0],i=a[1]),s.success=function(e){o.html(i?t("
    ").html(e.replace(b,"")).find(i):e),u&&u.apply(o,arguments)},t.ajax(s),this};var N=encodeURIComponent;t.param=function(e,n){var r=[];return r.add=function(e,n){t.isFunction(n)&&(n=n()),null==n&&(n=""),this.push(N(e)+"="+N(n))},m(r,e,n),r.join("&").replace(/%20/g,"+")}}(e),function(t){t.fn.serializeArray=function(){var e,n,r=[],i=function(t){return t.forEach?t.forEach(i):void r.push({name:e,value:t})};return this[0]&&t.each(this[0].elements,function(r,o){n=o.type,e=o.name,e&&"fieldset"!=o.nodeName.toLowerCase()&&!o.disabled&&"submit"!=n&&"reset"!=n&&"button"!=n&&"file"!=n&&("radio"!=n&&"checkbox"!=n||o.checked)&&i(t(o).val())}),r},t.fn.serialize=function(){var t=[];return this.serializeArray().forEach(function(e){t.push(encodeURIComponent(e.name)+"="+encodeURIComponent(e.value))}),t.join("&")},t.fn.submit=function(e){if(0 in arguments)this.bind("submit",e);else if(this.length){var n=t.Event("submit");this.eq(0).trigger(n),n.isDefaultPrevented()||this.get(0).submit()}return this}}(e),function(){try{getComputedStyle(void 0)}catch(t){var e=getComputedStyle;window.getComputedStyle=function(t,n){try{return e(t,n)}catch(r){return null}}}}(),t("zepto",e)});layui.define(["layer-mobile","zepto"],function(e){"use strict";var t=layui.zepto,a=layui["layer-mobile"],i=(layui.device(),"layui-upload-enter"),n="layui-upload-iframe",r={icon:2,shift:6},o={file:"文件",video:"视频",audio:"音频"};a.msg=function(e){return a.open({content:e||"",skin:"msg",time:2})};var s=function(e){this.options=e};s.prototype.init=function(){var e=this,a=e.options,r=t("body"),s=t(a.elem||".layui-upload-file"),u=t('');return t("#"+n)[0]||r.append(u),s.each(function(r,s){s=t(s);var u='
    ',l=s.attr("lay-type")||a.type;a.unwrap||(u='
    '+u+''+(s.attr("lay-title")||a.title||"上传"+(o[l]||"图片"))+"
    "),u=t(u),a.unwrap||u.on("dragover",function(e){e.preventDefault(),t(this).addClass(i)}).on("dragleave",function(){t(this).removeClass(i)}).on("drop",function(){t(this).removeClass(i)}),s.parent("form").attr("target")===n&&(a.unwrap?s.unwrap():(s.parent().next().remove(),s.unwrap().unwrap())),s.wrap(u),s.off("change").on("change",function(){e.action(this,l)})})},s.prototype.action=function(e,i){var o=this,s=o.options,u=e.value,l=t(e),p=l.attr("lay-ext")||s.ext||"";if(u){switch(i){case"file":if(p&&!RegExp("\\w\\.("+p+")$","i").test(escape(u)))return a.msg("不支持该文件格式",r),e.value="";break;case"video":if(!RegExp("\\w\\.("+(p||"avi|mp4|wma|rmvb|rm|flash|3gp|flv")+")$","i").test(escape(u)))return a.msg("不支持该视频格式",r),e.value="";break;case"audio":if(!RegExp("\\w\\.("+(p||"mp3|wav|mid")+")$","i").test(escape(u)))return a.msg("不支持该音频格式",r),e.value="";break;default:if(!RegExp("\\w\\.("+(p||"jpg|png|gif|bmp|jpeg")+")$","i").test(escape(u)))return a.msg("不支持该图片格式",r),e.value=""}s.before&&s.before(e),l.parent().submit();var c=t("#"+n),f=setInterval(function(){var t;try{t=c.contents().find("body").text()}catch(i){a.msg("上传接口存在跨域",r),clearInterval(f)}if(t){clearInterval(f),c.contents().find("body").html("");try{t=JSON.parse(t)}catch(i){return t={},a.msg("请对上传接口返回JSON字符",r)}"function"==typeof s.success&&s.success(t,e)}},30);e.value=""}},e("upload-mobile",function(e){var t=new s(e=e||{});t.init()})});layui.define(function(i){i("layim-mobile",layui.v)});layui["layui.mobile"]||layui.config({base:layui.cache.dir+"lay/modules/mobile/"}).extend({"layer-mobile":"layer-mobile",zepto:"zepto","upload-mobile":"upload-mobile","layim-mobile":"layim-mobile"}),layui.define(["layer-mobile","zepto","layim-mobile"],function(l){l("mobile",{layer:layui["layer-mobile"],layim:layui["layim-mobile"]})}); \ No newline at end of file diff --git a/Yangcai365_design/manage/zinc/layui/lay/modules/rate.js b/Yangcai365_design/manage/zinc/layui/lay/modules/rate.js new file mode 100644 index 0000000..7ba3f14 --- /dev/null +++ b/Yangcai365_design/manage/zinc/layui/lay/modules/rate.js @@ -0,0 +1,2 @@ +/** layui-v2.5.4 MIT License By https://www.layui.com */ + ;layui.define("jquery",function(e){"use strict";var a=layui.jquery,i={config:{},index:layui.rate?layui.rate.index+1e4:0,set:function(e){var i=this;return i.config=a.extend({},i.config,e),i},on:function(e,a){return layui.onevent.call(this,n,e,a)}},l=function(){var e=this,a=e.config;return{setvalue:function(a){e.setvalue.call(e,a)},config:a}},n="rate",t="layui-rate",o="layui-icon-rate",s="layui-icon-rate-solid",u="layui-icon-rate-half",r="layui-icon-rate-solid layui-icon-rate-half",c="layui-icon-rate-solid layui-icon-rate",f="layui-icon-rate layui-icon-rate-half",v=function(e){var l=this;l.index=++i.index,l.config=a.extend({},l.config,i.config,e),l.render()};v.prototype.config={length:5,text:!1,readonly:!1,half:!1,value:0,theme:""},v.prototype.render=function(){var e=this,i=e.config,l=i.theme?'style="color: '+i.theme+';"':"";i.elem=a(i.elem),parseInt(i.value)!==i.value&&(i.half||(i.value=Math.ceil(i.value)-i.value<.5?Math.ceil(i.value):Math.floor(i.value)));for(var n='
      ",u=1;u<=i.length;u++){var r='
    • ";i.half&&parseInt(i.value)!==i.value&&u==Math.ceil(i.value)?n=n+'
    • ":n+=r}n+="
    "+(i.text?''+i.value+"星":"")+"";var c=i.elem,f=c.next("."+t);f[0]&&f.remove(),e.elemTemp=a(n),i.span=e.elemTemp.next("span"),i.setText&&i.setText(i.value),c.html(e.elemTemp),c.addClass("layui-inline"),i.readonly||e.action()},v.prototype.setvalue=function(e){var a=this,i=a.config;i.value=e,a.render()},v.prototype.action=function(){var e=this,i=e.config,l=e.elemTemp,n=l.find("i").width();l.children("li").each(function(e){var t=e+1,v=a(this);v.on("click",function(e){if(i.value=t,i.half){var o=e.pageX-a(this).offset().left;o<=n/2&&(i.value=i.value-.5)}i.text&&l.next("span").text(i.value+"星"),i.choose&&i.choose(i.value),i.setText&&i.setText(i.value)}),v.on("mousemove",function(e){if(l.find("i").each(function(){a(this).addClass(o).removeClass(r)}),l.find("i:lt("+t+")").each(function(){a(this).addClass(s).removeClass(f)}),i.half){var c=e.pageX-a(this).offset().left;c<=n/2&&v.children("i").addClass(u).removeClass(s)}}),v.on("mouseleave",function(){l.find("i").each(function(){a(this).addClass(o).removeClass(r)}),l.find("i:lt("+Math.floor(i.value)+")").each(function(){a(this).addClass(s).removeClass(f)}),i.half&&parseInt(i.value)!==i.value&&l.children("li:eq("+Math.floor(i.value)+")").children("i").addClass(u).removeClass(c)})})},v.prototype.events=function(){var e=this;e.config},i.render=function(e){var a=new v(e);return l.call(a)},e(n,i)}); \ No newline at end of file diff --git a/Yangcai365_design/manage/zinc/layui/lay/modules/slider.js b/Yangcai365_design/manage/zinc/layui/lay/modules/slider.js new file mode 100644 index 0000000..54d6d00 --- /dev/null +++ b/Yangcai365_design/manage/zinc/layui/lay/modules/slider.js @@ -0,0 +1,2 @@ +/** layui-v2.5.4 MIT License By https://www.layui.com */ + ;layui.define("jquery",function(e){"use strict";var i=layui.jquery,t={config:{},index:layui.slider?layui.slider.index+1e4:0,set:function(e){var t=this;return t.config=i.extend({},t.config,e),t},on:function(e,i){return layui.onevent.call(this,n,e,i)}},a=function(){var e=this,i=e.config;return{setValue:function(i,t){return e.slide("set",i,t||0)},config:i}},n="slider",l="layui-disabled",s="layui-slider",r="layui-slider-bar",o="layui-slider-wrap",u="layui-slider-wrap-btn",d="layui-slider-tips",v="layui-slider-input",c="layui-slider-input-txt",m="layui-slider-input-btn",p="layui-slider-hover",f=function(e){var a=this;a.index=++t.index,a.config=i.extend({},a.config,t.config,e),a.render()};f.prototype.config={type:"default",min:0,max:100,value:0,step:1,showstep:!1,tips:!0,input:!1,range:!1,height:200,disabled:!1,theme:"#009688"},f.prototype.render=function(){var e=this,t=e.config;if(t.step<1&&(t.step=1),t.maxt.min?a:t.min,t.value[1]=n>t.min?n:t.min,t.value[0]=t.value[0]>t.max?t.max:t.value[0],t.value[1]=t.value[1]>t.max?t.max:t.value[1];var r=Math.floor((t.value[0]-t.min)/(t.max-t.min)*100),v=Math.floor((t.value[1]-t.min)/(t.max-t.min)*100),m=v-r+"%";r+="%",v+="%"}else{"object"==typeof t.value&&(t.value=Math.min.apply(null,t.value)),t.valuet.max&&(t.value=t.max);var m=Math.floor((t.value-t.min)/(t.max-t.min)*100)+"%"}var p=t.disabled?"#c2c2c2":t.theme,f='
    '+(t.tips?'
    ':"")+'
    '+(t.range?'
    ':"")+"
    ",h=i(t.elem),y=h.next("."+s);if(y[0]&&y.remove(),e.elemTemp=i(f),t.range?(e.elemTemp.find("."+o).eq(0).data("value",t.value[0]),e.elemTemp.find("."+o).eq(1).data("value",t.value[1])):e.elemTemp.find("."+o).data("value",t.value),h.html(e.elemTemp),"vertical"===t.type&&e.elemTemp.height(t.height+"px"),t.showstep){for(var g=(t.max-t.min)/t.step,b="",x=1;x
    ')}e.elemTemp.append(b)}if(t.input&&!t.range){var w=i('
    ');h.css("position","relative"),h.append(w),h.find("."+c).children("input").val(t.value),"vertical"===t.type?w.css({left:0,top:-48}):e.elemTemp.css("margin-right",w.outerWidth()+15)}t.disabled?(e.elemTemp.addClass(l),e.elemTemp.find("."+u).addClass(l)):e.slide(),e.elemTemp.find("."+u).on("mouseover",function(){var a="vertical"===t.type?t.height:e.elemTemp[0].offsetWidth,n=e.elemTemp.find("."+o),l="vertical"===t.type?a-i(this).parent()[0].offsetTop-n.height():i(this).parent()[0].offsetLeft,s=l/a*100,r=i(this).parent().data("value"),u=t.setTips?t.setTips(r):r;e.elemTemp.find("."+d).html(u),"vertical"===t.type?e.elemTemp.find("."+d).css({bottom:s+"%","margin-bottom":"20px",display:"inline-block"}):e.elemTemp.find("."+d).css({left:s+"%",display:"inline-block"})}).on("mouseout",function(){e.elemTemp.find("."+d).css("display","none")})},f.prototype.slide=function(e,t,a){var n=this,l=n.config,s=n.elemTemp,f=function(){return"vertical"===l.type?l.height:s[0].offsetWidth},h=s.find("."+o),y=s.next("."+v),g=y.children("."+c).children("input").val(),b=100/((l.max-l.min)/Math.ceil(l.step)),x=function(e,i){e=Math.ceil(e)*b>100?Math.ceil(e)*b:Math.round(e)*b,e=e>100?100:e,h.eq(i).css("vertical"===l.type?"bottom":"left",e+"%");var t=T(h[0].offsetLeft),a=l.range?T(h[1].offsetLeft):0;"vertical"===l.type?(s.find("."+d).css({bottom:e+"%","margin-bottom":"20px"}),t=T(f()-h[0].offsetTop-h.height()),a=l.range?T(f()-h[1].offsetTop-h.height()):0):s.find("."+d).css("left",e+"%"),t=t>100?100:t,a=a>100?100:a;var n=Math.min(t,a),o=Math.abs(t-a);"vertical"===l.type?s.find("."+r).css({height:o+"%",bottom:n+"%"}):s.find("."+r).css({width:o+"%",left:n+"%"});var u=l.min+Math.round((l.max-l.min)*e/100);if(g=u,y.children("."+c).children("input").val(g),h.eq(i).data("value",u),u=l.setTips?l.setTips(u):u,s.find("."+d).html(u),l.range){var v=[h.eq(0).data("value"),h.eq(1).data("value")];v[0]>v[1]&&v.reverse()}l.change&&l.change(l.range?v:u)},T=function(e){var i=e/f()*100/b,t=Math.round(i)*b;return e==f()&&(t=Math.ceil(i)*b),t},w=i(['
    f()&&(r=f());var o=r/f()*100/b;x(o,e),t.addClass(p),s.find("."+d).show(),i.preventDefault()},o=function(){t.removeClass(p),s.find("."+d).hide()};M(r,o)})}),s.on("click",function(e){var t=i("."+u);if(!t.is(event.target)&&0===t.has(event.target).length&&t.length){var a,n="vertical"===l.type?f()-e.clientY+i(this).offset().top:e.clientX-i(this).offset().left;n<0&&(n=0),n>f()&&(n=f());var s=n/f()*100/b;a=l.range?"vertical"===l.type?Math.abs(n-parseInt(i(h[0]).css("bottom")))>Math.abs(n-parseInt(i(h[1]).css("bottom")))?1:0:Math.abs(n-h[0].offsetLeft)>Math.abs(n-h[1].offsetLeft)?1:0:0,x(s,a),e.preventDefault()}}),y.hover(function(){var e=i(this);e.children("."+m).fadeIn("fast")},function(){var e=i(this);e.children("."+m).fadeOut("fast")}),y.children("."+m).children("i").each(function(e){i(this).on("click",function(){g=1==e?g-l.stepl.max?l.max:Number(g)+l.step;var i=(g-l.min)/(l.max-l.min)*100/b;x(i,0)})});var q=function(){var e=this.value;e=isNaN(e)?0:e,e=el.max?l.max:e,this.value=e;var i=(e-l.min)/(l.max-l.min)*100/b;x(i,0)};y.children("."+c).children("input").on("keydown",function(e){13===e.keyCode&&(e.preventDefault(),q.call(this))}).on("change",q)},f.prototype.events=function(){var e=this;e.config},t.render=function(e){var i=new f(e);return a.call(i)},e(n,t)}); \ No newline at end of file diff --git a/Yangcai365_design/manage/zinc/layui/lay/modules/table.js b/Yangcai365_design/manage/zinc/layui/lay/modules/table.js new file mode 100644 index 0000000..11e4d44 --- /dev/null +++ b/Yangcai365_design/manage/zinc/layui/lay/modules/table.js @@ -0,0 +1,2 @@ +/** layui-v2.5.4 MIT License By https://www.layui.com */ + ;layui.define(["laytpl","laypage","layer","form","util"],function(e){"use strict";var t=layui.$,i=layui.laytpl,a=layui.laypage,l=layui.layer,n=layui.form,o=(layui.util,layui.hint()),r=layui.device(),d={config:{checkName:"LAY_CHECKED",indexName:"LAY_TABLE_INDEX"},cache:{},index:layui.table?layui.table.index+1e4:0,set:function(e){var i=this;return i.config=t.extend({},i.config,e),i},on:function(e,t){return layui.onevent.call(this,y,e,t)}},c=function(){var e=this,t=e.config,i=t.id||t.index;return i&&(c.that[i]=e,c.config[i]=t),{config:t,reload:function(t){e.reload.call(e,t)},setColsWidth:function(){e.setColsWidth.call(e)},resize:function(){e.resize.call(e)}}},s=function(e){var t=c.config[e];return t||o.error("The ID option was not found in the table instance"),t||null},u=function(e,a,l,n){var o=e.templet?function(){return"function"==typeof e.templet?e.templet(l):i(t(e.templet).html()||String(a)).render(l)}():a;return n?t("
    "+o+"
    ").text():o},y="table",h=".layui-table",f="layui-hide",p="layui-none",v="layui-table-view",m=".layui-table-tool",g=".layui-table-box",b=".layui-table-init",x=".layui-table-header",k=".layui-table-body",C=".layui-table-main",w=".layui-table-fixed",T=".layui-table-fixed-l",A=".layui-table-fixed-r",L=".layui-table-total",N=".layui-table-page",S=".layui-table-sort",W="layui-table-edit",_="layui-table-hover",E=function(e){var t='{{#if(item2.colspan){}} colspan="{{item2.colspan}}"{{#} if(item2.rowspan){}} rowspan="{{item2.rowspan}}"{{#}}}';return e=e||{},['
    ',"","{{# layui.each(d.data.cols, function(i1, item1){ }}","","{{# layui.each(item1, function(i2, item2){ }}",'{{# if(item2.fixed && item2.fixed !== "right"){ left = true; } }}','{{# if(item2.fixed === "right"){ right = true; } }}',function(){return e.fixed&&"right"!==e.fixed?'{{# if(item2.fixed && item2.fixed !== "right"){ }}':"right"===e.fixed?'{{# if(item2.fixed === "right"){ }}':""}(),"{{# var isSort = !(item2.colGroup) && item2.sort; }}",'",e.fixed?"{{# }; }}":"","{{# }); }}","","{{# }); }}","","
    ','
    ','{{# if(item2.type === "checkbox"){ }}','',"{{# } else { }}",'{{item2.title||""}}',"{{# if(isSort){ }}",'',"{{# } }}","{{# } }}","
    ","
    "].join("")},z=['',"","
    "].join(""),H=['
    ',"{{# if(d.data.toolbar){ }}",'
    ','
    ','
    ',"
    ","{{# } }}",'
    ',"{{# if(d.data.loading){ }}",'
    ','',"
    ","{{# } }}","{{# var left, right; }}",'
    ',E(),"
    ",'
    ',z,"
    ","{{# if(left){ }}",'
    ','
    ',E({fixed:!0}),"
    ",'
    ',z,"
    ","
    ","{{# }; }}","{{# if(right){ }}",'
    ','
    ',E({fixed:"right"}),'
    ',"
    ",'
    ',z,"
    ","
    ","{{# }; }}","
    ","{{# if(d.data.totalRow){ }}",'
    ','','',"
    ","
    ","{{# } }}","{{# if(d.data.page){ }}",'
    ','
    ',"
    ","{{# } }}","","
    "].join(""),R=t(window),F=t(document),I=function(e){var i=this;i.index=++d.index,i.config=t.extend({},i.config,d.config,e),i.render()};I.prototype.config={limit:10,loading:!0,cellMinWidth:60,defaultToolbar:["filter","exports","print"],autoSort:!0,text:{none:"无数据"}},I.prototype.render=function(){var e=this,a=e.config;if(a.elem=t(a.elem),a.where=a.where||{},a.id=a.id||a.elem.attr("id")||e.index,a.request=t.extend({pageName:"page",limitName:"limit"},a.request),a.response=t.extend({statusName:"code",statusCode:0,msgName:"msg",dataName:"data",countName:"count"},a.response),"object"==typeof a.page&&(a.limit=a.page.limit||a.limit,a.limits=a.page.limits||a.limits,e.page=a.page.curr=a.page.curr||1,delete a.page.elem,delete a.page.jump),!a.elem[0])return e;a.height&&/^full-\d+$/.test(a.height)&&(e.fullHeightGap=a.height.split("-")[1],a.height=R.height()-e.fullHeightGap),e.setInit();var l=a.elem,n=l.next("."+v),o=e.elem=t(i(H).render({VIEW_CLASS:v,data:a,index:e.index}));if(a.index=e.index,e.key=a.id||a.index,n[0]&&n.remove(),l.after(o),e.layTool=o.find(m),e.layBox=o.find(g),e.layHeader=o.find(x),e.layMain=o.find(C),e.layBody=o.find(k),e.layFixed=o.find(w),e.layFixLeft=o.find(T),e.layFixRight=o.find(A),e.layTotal=o.find(L),e.layPage=o.find(N),e.renderToolbar(),e.fullSize(),a.cols.length>1){var r=e.layFixed.find(x).find("th");r.height(e.layHeader.height()-1-parseFloat(r.css("padding-top"))-parseFloat(r.css("padding-bottom")))}e.pullData(e.page),e.events()},I.prototype.initOpts=function(e){var t=this,i=(t.config,{checkbox:48,radio:48,space:15,numbers:40});e.checkbox&&(e.type="checkbox"),e.space&&(e.type="space"),e.type||(e.type="normal"),"normal"!==e.type&&(e.unresize=!0,e.width=e.width||i[e.type])},I.prototype.setInit=function(e){var t=this,i=t.config;return i.clientWidth=i.width||function(){var e=function(t){var a,l;t=t||i.elem.parent(),a=t.width();try{l="none"===t.css("display")}catch(n){}return!t[0]||a&&!l?a:e(t.parent())};return e()}(),"width"===e?i.clientWidth:void layui.each(i.cols,function(e,a){layui.each(a,function(l,n){if(!n)return void a.splice(l,1);if(n.key=e+"-"+l,n.hide=n.hide||!1,n.colGroup||n.colspan>1){var o=0;layui.each(i.cols[e+1],function(t,i){i.HAS_PARENT||o>1&&o==n.colspan||(i.HAS_PARENT=!0,i.parentKey=e+"-"+l,o+=parseInt(i.colspan>1?i.colspan:1))}),n.colGroup=!0}t.initOpts(n)})})},I.prototype.renderToolbar=function(){var e=this,a=e.config,l=['
    ','
    ','
    '].join(""),n=e.layTool.find(".layui-table-tool-temp");if("default"===a.toolbar)n.html(l);else if("string"==typeof a.toolbar){var o=t(a.toolbar).html()||"";o&&n.html(i(o).render(a))}var r={filter:{title:"筛选列",layEvent:"LAYTABLE_COLS",icon:"layui-icon-cols"},exports:{title:"导出",layEvent:"LAYTABLE_EXPORT",icon:"layui-icon-export"},print:{title:"打印",layEvent:"LAYTABLE_PRINT",icon:"layui-icon-print"}},d=[];"object"==typeof a.defaultToolbar&&layui.each(a.defaultToolbar,function(e,t){var i=r[t];i&&d.push('
    ')}),e.layTool.find(".layui-table-tool-self").html(d.join(""))},I.prototype.setParentCol=function(e,t){var i=this,a=i.config,l=i.layHeader.find('th[data-key="'+a.index+"-"+t+'"]'),n=parseInt(l.attr("colspan"))||0;if(l[0]){var o=t.split("-"),r=a.cols[o[0]][o[1]];e?n--:n++,l.attr("colspan",n),l[n<1?"addClass":"removeClass"](f),r.colspan=n,r.hide=n<1;var d=l.data("parentkey");d&&i.setParentCol(e,d)}},I.prototype.setColsPatch=function(){var e=this,t=e.config;layui.each(t.cols,function(t,i){layui.each(i,function(t,i){i.hide&&e.setParentCol(i.hide,i.parentKey)})})},I.prototype.setColsWidth=function(){var e=this,t=e.config,i=0,a=0,l=0,n=0,o=e.setInit("width");e.eachCols(function(e,t){t.hide||i++}),o=o-function(){return"line"===t.skin||"nob"===t.skin?2:i+1}()-e.getScrollWidth(e.layMain[0])-1;var r=function(e){layui.each(t.cols,function(i,r){layui.each(r,function(i,d){var c=0,s=d.minWidth||t.cellMinWidth;return d?void(d.colGroup||d.hide||(e?l&&ln&&a&&(l=(o-n)/a)};r(),r(!0),e.autoColNums=a,e.eachCols(function(i,a){var n=a.minWidth||t.cellMinWidth;a.colGroup||a.hide||(0===a.width?e.getCssRule(t.index+"-"+a.key,function(e){e.style.width=Math.floor(l>=n?l:n)+"px"}):/\d+%$/.test(a.width)&&e.getCssRule(t.index+"-"+a.key,function(e){e.style.width=Math.floor(parseFloat(a.width)/100*o)+"px"}))});var d=e.layMain.width()-e.getScrollWidth(e.layMain[0])-e.layMain.children("table").outerWidth();if(e.autoColNums&&d>=-i&&d<=i){var c=function(t){var i;return t=t||e.layHeader.eq(0).find("thead th:last-child"),i=t.data("field"),!i&&t.prev()[0]?c(t.prev()):t},s=c(),u=s.data("key");e.getCssRule(u,function(t){var i=t.style.width||s.outerWidth();t.style.width=parseFloat(i)+d+"px",e.layMain.height()-e.layMain.prop("clientHeight")>0&&(t.style.width=parseFloat(t.style.width)-1+"px")})}e.loading(!0)},I.prototype.resize=function(){var e=this;e.fullSize(),e.setColsWidth(),e.scrollPatch()},I.prototype.reload=function(e){var i=this;e=e||{},delete i.haveInit,e.data&&e.data.constructor===Array&&delete i.config.data,i.config=t.extend(!0,{},i.config,e),i.render()},I.prototype.errorView=function(e){var i=this,a=i.layMain.find("."+p),l=t('
    '+(e||"Error")+"
    ");a[0]&&(i.layNone.remove(),a.remove()),i.layFixed.addClass(f),i.layMain.find("tbody").html(""),i.layMain.append(i.layNone=l),d.cache[i.key]=[]},I.prototype.page=1,I.prototype.pullData=function(e){var i=this,a=i.config,l=a.request,n=a.response,o=function(){"object"==typeof a.initSort&&i.sort(a.initSort.field,a.initSort.type)};if(i.startTime=(new Date).getTime(),a.url){var r={};r[l.pageName]=e,r[l.limitName]=a.limit;var d=t.extend(r,a.where);a.contentType&&0==a.contentType.indexOf("application/json")&&(d=JSON.stringify(d)),i.loading(),t.ajax({type:a.method||"get",url:a.url,contentType:a.contentType,data:d,dataType:"json",headers:a.headers||{},success:function(t){"function"==typeof a.parseData&&(t=a.parseData(t)||t),t[n.statusName]!=n.statusCode?(i.renderForm(),i.errorView(t[n.msgName]||'返回的数据不符合规范,正确的成功状态码应为:"'+n.statusName+'": '+n.statusCode)):(i.renderData(t,e,t[n.countName]),o(),a.time=(new Date).getTime()-i.startTime+" ms"),i.setColsWidth(),"function"==typeof a.done&&a.done(t,e,t[n.countName])},error:function(e,t){reqErrorHandling(e, t);i.errorView("数据接口请求异常:"+t),i.renderForm(),i.setColsWidth()}})}else if(a.data&&a.data.constructor===Array){var c={},s=e*a.limit-a.limit;c[n.dataName]=a.data.concat().splice(s,a.limit),c[n.countName]=a.data.length,i.renderData(c,e,c[n.countName]),o(),i.setColsWidth(),"function"==typeof a.done&&a.done(c,e,c[n.countName])}},I.prototype.eachCols=function(e){var t=this;return d.eachCols(null,e,t.config.cols),t},I.prototype.renderData=function(e,n,o,r){var c=this,s=c.config,y=e[s.response.dataName]||[],h=[],v=[],m=[],g=function(){var e;return!r&&c.sortKey?c.sort(c.sortKey.field,c.sortKey.sort,!0):(layui.each(y,function(a,l){var o=[],y=[],p=[],g=a+s.limit*(n-1)+1;0!==l.length&&(r||(l[d.config.indexName]=a),c.eachCols(function(n,r){var c=r.field||n,h=s.index+"-"+r.key,v=l[c];if(void 0!==v&&null!==v||(v=""),!r.colGroup){var m=['','
    '+function(){var n=t.extend(!0,{LAY_INDEX:g},l),o=d.config.checkName;switch(r.type){case"checkbox":return'";case"radio":return n[o]&&(e=a),'';case"numbers":return g}return r.toolbar?i(t(r.toolbar).html()||"").render(n):u(r,v,n)}(),"
    "].join("");o.push(m),r.fixed&&"right"!==r.fixed&&y.push(m),"right"===r.fixed&&p.push(m)}}),h.push(''+o.join("")+""),v.push(''+y.join("")+""),m.push(''+p.join("")+""))}),c.layBody.scrollTop(0),c.layMain.find("."+p).remove(),c.layMain.find("tbody").html(h.join("")),c.layFixLeft.find("tbody").html(v.join("")),c.layFixRight.find("tbody").html(m.join("")),c.renderForm(),"number"==typeof e&&c.setThisRowChecked(e),c.syncCheckAll(),c.haveInit?c.scrollPatch():setTimeout(function(){c.scrollPatch()},50),c.haveInit=!0,l.close(c.tipsIndex),s.HAS_SET_COLS_PATCH||c.setColsPatch(),void(s.HAS_SET_COLS_PATCH=!0))};return d.cache[c.key]=y,c.layPage[0==o||0===y.length&&1==n?"addClass":"removeClass"](f),r?g():0===y.length?(c.renderForm(),c.errorView(s.text.none)):(c.layFixed.removeClass(f),g(),c.renderTotal(y),void(s.page&&(s.page=t.extend({elem:"layui-table-page"+s.index,count:o,limit:s.limit,limits:s.limits||[10,20,30,40,50,60,70,80,90],groups:3,layout:["prev","page","next","skip","count","limit"],prev:'',next:'',jump:function(e,t){t||(c.page=e.curr,s.limit=e.limit,c.pullData(e.curr))}},s.page),s.page.count=o,a.render(s.page))))},I.prototype.renderTotal=function(e){var t=this,i=t.config,a={};if(i.totalRow){layui.each(e,function(e,i){0!==i.length&&t.eachCols(function(e,t){var l=t.field||e,n=i[l];t.totalRow&&(a[l]=(a[l]||0)+(parseFloat(n)||0))})});var l=[];t.eachCols(function(e,t){var n=t.field||e,o=['','
    '+function(){var e=t.totalRowText||"";return t.totalRow?parseFloat(a[n]).toFixed(2)||e:e}(),"
    "].join("");l.push(o)}),t.layTotal.find("tbody").html(""+l.join("")+"")}},I.prototype.getColElem=function(e,t){var i=this,a=i.config;return e.eq(0).find(".laytable-cell-"+(a.index+"-"+t)+":eq(0)")},I.prototype.renderForm=function(e){n.render(e,"LAY-table-"+this.index)},I.prototype.setThisRowChecked=function(e){var t=this,i=(t.config,"layui-table-click"),a=t.layBody.find('tr[data-index="'+e+'"]');a.addClass(i).siblings("tr").removeClass(i)},I.prototype.sort=function(e,i,a,l){var n,r,c=this,s={},u=c.config,h=u.elem.attr("lay-filter"),f=d.cache[c.key];"string"==typeof e&&c.layHeader.find("th").each(function(i,a){var l=t(this),o=l.data("field");if(o===e)return e=l,n=o,!1});try{var n=n||e.data("field"),p=e.data("key");if(c.sortKey&&!a&&n===c.sortKey.field&&i===c.sortKey.sort)return;var v=c.layHeader.find("th .laytable-cell-"+p).find(S);c.layHeader.find("th").find(S).removeAttr("lay-sort"),v.attr("lay-sort",i||null),c.layFixed.find("th")}catch(m){return o.error("Table modules: Did not match to field")}c.sortKey={field:n,sort:i},u.autoSort&&("asc"===i?r=layui.sort(f,n):"desc"===i?r=layui.sort(f,n,!0):(r=layui.sort(f,d.config.indexName),delete c.sortKey)),s[u.response.dataName]=r||f,c.renderData(s,c.page,c.count,!0),l&&layui.event.call(e,y,"sort("+h+")",{field:n,type:i})},I.prototype.loading=function(e){var i=this,a=i.config;a.loading&&(e?(i.layInit&&i.layInit.remove(),delete i.layInit,i.layBox.find(b).remove()):(i.layInit=t(['
    ','',"
    "].join("")),i.layBox.append(i.layInit)))},I.prototype.setCheckData=function(e,t){var i=this,a=i.config,l=d.cache[i.key];l[e]&&l[e].constructor!==Array&&(l[e][a.checkName]=t)},I.prototype.syncCheckAll=function(){var e=this,t=e.config,i=e.layHeader.find('input[name="layTableCheckbox"]'),a=function(i){return e.eachCols(function(e,a){"checkbox"===a.type&&(a[t.checkName]=i)}),i};i[0]&&(d.checkStatus(e.key).isAll?(i[0].checked||(i.prop("checked",!0),e.renderForm("checkbox")),a(!0)):(i[0].checked&&(i.prop("checked",!1),e.renderForm("checkbox")),a(!1)))},I.prototype.getCssRule=function(e,t){var i=this,a=i.elem.find("style")[0],l=a.sheet||a.styleSheet||{},n=l.cssRules||l.rules;layui.each(n,function(i,a){if(a.selectorText===".laytable-cell-"+e)return t(a),!0})},I.prototype.fullSize=function(){var e,t=this,i=t.config,a=i.height;t.fullHeightGap&&(a=R.height()-t.fullHeightGap,a<135&&(a=135),t.elem.css("height",a)),a&&(e=parseFloat(a)-(t.layHeader.outerHeight()||38),i.toolbar&&(e-=t.layTool.outerHeight()||50),i.totalRow&&(e-=t.layTotal.outerHeight()||40),i.page&&(e-=t.layPage.outerHeight()||41),t.layMain.css("height",e-2))},I.prototype.getScrollWidth=function(e){var t=0;return e?t=e.offsetWidth-e.clientWidth:(e=document.createElement("div"),e.style.width="100px",e.style.height="100px",e.style.overflowY="scroll",document.body.appendChild(e),t=e.offsetWidth-e.clientWidth,document.body.removeChild(e)),t},I.prototype.scrollPatch=function(){var e=this,i=e.layMain.children("table"),a=e.layMain.width()-e.layMain.prop("clientWidth"),l=e.layMain.height()-e.layMain.prop("clientHeight"),n=(e.getScrollWidth(e.layMain[0]),i.outerWidth()-e.layMain.width()),o=function(e){if(a&&l){if(e=e.eq(0),!e.find(".layui-table-patch")[0]){var i=t('
    ');i.find("div").css({width:a}),e.find("tr").append(i)}}else e.find(".layui-table-patch").remove()};o(e.layHeader),o(e.layTotal);var r=e.layMain.height(),d=r-l;e.layFixed.find(k).css("height",i.height()>=d?d:"auto"),e.layFixRight[n>0?"removeClass":"addClass"](f),e.layFixRight.css("right",a-1)},I.prototype.events=function(){var e,a=this,o=a.config,c=t("body"),s={},u=a.layHeader.find("th"),h=".layui-table-cell",p=o.elem.attr("lay-filter");a.layTool.on("click","*[lay-event]",function(e){var i=t(this),c=i.attr("lay-event"),s=function(e){var l=t(e.list),n=t('
      ');n.html(l),o.height&&n.css("max-height",o.height-(a.layTool.outerHeight()||50)),i.find(".layui-table-tool-panel")[0]||i.append(n),a.renderForm(),n.on("click",function(e){layui.stope(e)}),e.done&&e.done(n,l)};switch(layui.stope(e),F.trigger("table.tool.panel.remove"),l.close(a.tipsIndex),c){case"LAYTABLE_COLS":s({list:function(){var e=[];return a.eachCols(function(t,i){i.field&&"normal"==i.type&&e.push('
    • ')}),e.join("")}(),done:function(){n.on("checkbox(LAY_TABLE_TOOL_COLS)",function(e){var i=t(e.elem),l=this.checked,n=i.data("key"),r=i.data("parentkey");layui.each(o.cols,function(e,t){layui.each(t,function(t,i){if(e+"-"+t===n){var d=i.hide;i.hide=!l,a.elem.find('*[data-key="'+o.index+"-"+n+'"]')[l?"removeClass":"addClass"](f),d!=i.hide&&a.setParentCol(!l,r),a.resize()}})})})}});break;case"LAYTABLE_EXPORT":r.ie?l.tips("导出功能不支持 IE,请用 Chrome 等高级浏览器导出",this,{tips:3}):s({list:function(){return['
    • 导出到 Csv 文件
    • ','
    • 导出到 Excel 文件
    • '].join("")}(),done:function(e,i){i.on("click",function(){var e=t(this).data("type");d.exportFile(o.id,null,e)})}});break;case"LAYTABLE_PRINT":var u=window.open("打印窗口","_blank"),h=[""].join(""),v=t(a.layHeader.html());v.append(a.layMain.find("table").html()),v.append(a.layTotal.find("table").html()),v.find("th.layui-table-patch").remove(),v.find(".layui-table-col-special").remove(),u.document.write(h+v.prop("outerHTML")),u.document.close(),u.print(),u.close()}layui.event.call(this,y,"toolbar("+p+")",t.extend({event:c,config:o},{}))}),u.on("mousemove",function(e){var i=t(this),a=i.offset().left,l=e.clientX-a;i.data("unresize")||s.resizeStart||(s.allowResize=i.width()-l<=10,c.css("cursor",s.allowResize?"col-resize":""))}).on("mouseleave",function(){t(this);s.resizeStart||c.css("cursor","")}).on("mousedown",function(e){var i=t(this);if(s.allowResize){var l=i.data("key");e.preventDefault(),s.resizeStart=!0,s.offset=[e.clientX,e.clientY],a.getCssRule(l,function(e){var t=e.style.width||i.outerWidth();s.rule=e,s.ruleWidth=parseFloat(t),s.minWidth=i.data("minwidth")||o.cellMinWidth})}}),F.on("mousemove",function(t){if(s.resizeStart){if(t.preventDefault(),s.rule){var i=s.ruleWidth+t.clientX-s.offset[0];i');return n[0].value=i.data("content")||l.text(),i.find("."+W)[0]||i.append(n),n.focus(),void layui.stope(e)}}).on("mouseenter","td",function(){b.call(this)}).on("mouseleave","td",function(){b.call(this,"hide")});var g="layui-table-grid-down",b=function(e){var i=t(this),a=i.children(h);if(!i.data("off"))if(e)i.find(".layui-table-grid-down").remove();else if(a.prop("scrollWidth")>a.outerWidth()){if(a.find("."+g)[0])return;i.append('
      ')}};a.layBody.on("click","."+g,function(e){var i=t(this),n=i.parent(),d=n.children(h);a.tipsIndex=l.tips(['
      ',d.html(),"
      ",''].join(""),d[0],{tips:[3,""],time:-1,anim:-1,maxWidth:r.ios||r.android?300:a.elem.width()/2,isOutAnim:!1,skin:"layui-table-tips",success:function(e,t){e.find(".layui-table-tips-c").on("click",function(){l.close(t)})}}),layui.stope(e)}),a.layBody.on("click","*[lay-event]",function(){var e=t(this),i=e.parents("tr").eq(0).data("index");layui.event.call(this,y,"tool("+p+")",v.call(this,{event:e.attr("lay-event")})),a.setThisRowChecked(i)}),a.layMain.on("scroll",function(){var e=t(this),i=e.scrollLeft(),n=e.scrollTop();a.layHeader.scrollLeft(i),a.layTotal.scrollLeft(i),a.layFixed.find(k).scrollTop(n),l.close(a.tipsIndex)}),F.on("click",function(){F.trigger("table.remove.tool.panel")}),F.on("table.remove.tool.panel",function(){t(".layui-table-tool-panel").remove()}),R.on("resize",function(){a.resize()})},d.init=function(e,i){i=i||{};var a=this,l=t(e?'table[lay-filter="'+e+'"]':h+"[lay-data]"),n="Table element property lay-data configuration item has a syntax error: ";return l.each(function(){var a=t(this),l=a.attr("lay-data");try{l=new Function("return "+l)()}catch(r){o.error(n+l)}var c=[],s=t.extend({elem:this,cols:[],data:[],skin:a.attr("lay-skin"),size:a.attr("lay-size"),even:"string"==typeof a.attr("lay-even")},d.config,i,l);e&&a.hide(),a.find("thead>tr").each(function(e){s.cols[e]=[],t(this).children().each(function(i){var a=t(this),l=a.attr("lay-data");try{l=new Function("return "+l)()}catch(r){return o.error(n+l)}var d=t.extend({title:a.text(),colspan:a.attr("colspan")||0,rowspan:a.attr("rowspan")||0},l);d.colspan<2&&c.push(d),s.cols[e].push(d)})}),a.find("tbody>tr").each(function(e){var i=t(this),a={};i.children("td").each(function(e,i){var l=t(this),n=l.data("field");if(n)return a[n]=l.html()}),layui.each(c,function(e,t){var l=i.children("td").eq(e);a[t.field]=l.html()}),s.data[e]=a}),d.render(s)}),a},c.that={},c.config={},d.eachCols=function(e,i,a){var l=c.config[e]||{},n=[],o=0;a=t.extend(!0,[],a||l.cols),layui.each(a,function(e,t){layui.each(t,function(t,i){if(i.colGroup){var l=0;o++,i.CHILD_COLS=[],layui.each(a[e+1],function(e,t){t.PARENT_COL_INDEX||l>1&&l==i.colspan||(t.PARENT_COL_INDEX=o,i.CHILD_COLS.push(t),l+=parseInt(t.colspan>1?t.colspan:1))})}i.PARENT_COL_INDEX||n.push(i)})});var r=function(e){layui.each(e||n,function(e,t){return t.CHILD_COLS?r(t.CHILD_COLS):void("function"==typeof i&&i(e,t))})};r()},d.checkStatus=function(e){var t=0,i=0,a=[],l=d.cache[e]||[];return layui.each(l,function(e,l){return l.constructor===Array?void i++:void(l[d.config.checkName]&&(t++,a.push(d.clearCacheKey(l))))}),{data:a,isAll:!!l.length&&t===l.length-i}},d.exportFile=function(e,t,i){t=t||d.clearCacheKey(d.cache[e]),i=i||"csv";var a=c.config[e]||{},l={csv:"text/csv",xls:"application/vnd.ms-excel"}[i],n=document.createElement("a");return r.ie?o.error("IE_NOT_SUPPORT_EXPORTS"):(n.href="data:"+l+";charset=utf-8,\ufeff"+encodeURIComponent(function(){var i=[],a=[];return layui.each(t,function(t,l){var n=[];"object"==typeof e?(layui.each(e,function(e,a){0==t&&i.push(a||"")}),layui.each(d.clearCacheKey(l),function(e,t){n.push('"'+(t||"")+'"')})):d.eachCols(e,function(e,a){a.field&&"normal"==a.type&&!a.hide&&(0==t&&i.push(a.title||""),n.push('"'+u(a,l[a.field],l,"text")+'"'))}),a.push(n.join(","))}),i.join(",")+"\r\n"+a.join("\r\n")}()),n.download=(a.title||"table_"+(a.index||""))+"."+i,document.body.appendChild(n),n.click(),void document.body.removeChild(n))},d.resize=function(e){if(e){var t=s(e);if(!t)return;c.that[e].resize()}else layui.each(c.that,function(){this.resize()})},d.reload=function(e,t){var i=s(e);if(i){var a=c.that[e];return a.reload(t),c.call(a)}},d.render=function(e){var t=new I(e);return c.call(t)},d.clearCacheKey=function(e){return e=t.extend({},e),delete e[d.config.checkName],delete e[d.config.indexName],e},d.init(),e(y,d)}); \ No newline at end of file diff --git a/Yangcai365_design/manage/zinc/layui/lay/modules/transfer.js b/Yangcai365_design/manage/zinc/layui/lay/modules/transfer.js new file mode 100644 index 0000000..3d19012 --- /dev/null +++ b/Yangcai365_design/manage/zinc/layui/lay/modules/transfer.js @@ -0,0 +1,2 @@ +/** layui-v2.5.4 MIT License By https://www.layui.com */ + ;layui.define(["laytpl","form"],function(e){"use strict";var a=layui.$,t=layui.laytpl,n=layui.form,i="transfer",l={config:{},index:layui[i]?layui[i].index+1e4:0,set:function(e){var t=this;return t.config=a.extend({},t.config,e),t},on:function(e,a){return layui.onevent.call(this,i,e,a)}},r=function(){var e=this,a=e.config,t=a.id||e.index;return r.that[t]=e,r.config[t]=a,{config:a,reload:function(a){e.reload.call(e,a)},getData:function(){return e.getData.call(e)}}},c="layui-hide",o="layui-btn-disabled",d="layui-none",s="layui-transfer-box",u="layui-transfer-header",h="layui-transfer-search",f="layui-transfer-active",y="layui-transfer-data",p=function(e){return e=e||{},['
      ','
      ','","
      ","{{# if(d.data.showSearch){ }}",'","{{# } }}",'
        ',"
        "].join("")},v=['
        ',p({index:0,checkAllName:"layTransferLeftCheckAll"}),'
        ','",'","
        ",p({index:1,checkAllName:"layTransferRightCheckAll"}),"
        "].join(""),x=function(e){var t=this;t.index=++l.index,t.config=a.extend({},t.config,l.config,e),t.render()};x.prototype.config={title:["列表一","列表二"],width:200,height:360,data:[],value:[],showSearch:!1,id:"",text:{none:"无数据",searchNone:"无匹配数据"}},x.prototype.reload=function(e){var t=this;layui.each(e,function(e,a){a.constructor===Array&&delete t.config[e]}),t.config=a.extend(!0,{},t.config,e),t.render()},x.prototype.render=function(){var e=this,n=e.config,i=e.elem=a(t(v).render({data:n,index:e.index})),l=n.elem=a(n.elem);l[0]&&(n.data=n.data||[],n.value=n.value||[],e.key=n.id||e.index,l.html(e.elem),e.layBox=e.elem.find("."+s),e.layHeader=e.elem.find("."+u),e.laySearch=e.elem.find("."+h),e.layData=i.find("."+y),e.layBtn=i.find("."+f+" .layui-btn"),e.layBox.css({width:n.width,height:n.height}),e.layData.css({height:function(){return n.height-e.layHeader.outerHeight()-e.laySearch.outerHeight()-2}()}),e.renderData(),e.events())},x.prototype.renderData=function(){var e=this,a=(e.config,[{checkName:"layTransferLeftCheck",views:[]},{checkName:"layTransferRightCheck",views:[]}]);e.parseData(function(e){var t=e.selected?1:0,n=["
      • ",'',"
      • "].join("");a[t].views.push(n),delete e.selected}),e.layData.eq(0).html(a[0].views.join("")),e.layData.eq(1).html(a[1].views.join("")),e.renderCheckBtn()},x.prototype.renderForm=function(e){n.render(e,"LAY-transfer-"+this.index)},x.prototype.renderCheckBtn=function(e){var t=this,n=t.config;e=e||{},t.layBox.each(function(i){var l=a(this),r=l.find("."+y),d=l.find("."+u).find('input[type="checkbox"]'),s=r.find('input[type="checkbox"]'),h=0,f=!1;if(s.each(function(){var e=a(this).data("hide");(this.checked||this.disabled||e)&&h++,this.checked&&!e&&(f=!0)}),d.prop("checked",f&&h===s.length),t.layBtn.eq(i)[f?"removeClass":"addClass"](o),!e.stopNone){var p=r.children("li:not(."+c+")").length;t.noneView(r,p?"":n.text.none)}}),t.renderForm("checkbox")},x.prototype.noneView=function(e,t){var n=a('

        '+(t||"")+"

        ");e.find("."+d)[0]&&e.find("."+d).remove(),t.replace(/\s/g,"")&&e.append(n)},x.prototype.setValue=function(){var e=this,t=e.config,n=[];return e.layBox.eq(1).find("."+y+' input[type="checkbox"]').each(function(){var e=a(this).data("hide");e||n.push(this.value)}),t.value=n,e},x.prototype.parseData=function(e){var t=this,n=t.config,i=[];return layui.each(n.data,function(t,l){l=("function"==typeof n.parseData?n.parseData(l):l)||l,i.push(l=a.extend({},l)),layui.each(n.value,function(e,a){a==l.value&&(l.selected=!0)}),e&&e(l)}),n.data=i,t},x.prototype.getData=function(e){var a=this,t=a.config,n=[];return layui.each(e||t.value,function(e,a){layui.each(t.data,function(e,t){delete t.selected,a==t.value&&n.push(t)})}),n},x.prototype.events=function(){var e=this,t=e.config;e.elem.on("click",'input[lay-filter="layTransferCheckbox"]+',function(){var t=a(this).prev(),n=t[0].checked,i=t.parents("."+s).eq(0).find("."+y);t[0].disabled||("all"===t.attr("lay-type")&&i.find('input[type="checkbox"]').each(function(){this.disabled||(this.checked=n)}),e.renderCheckBtn({stopNone:!0}))}),e.layBtn.on("click",function(){var n=a(this),i=n.data("index"),l=e.layBox.eq(i),r=[];if(!n.hasClass(o)){e.layBox.eq(i).each(function(t){var n=a(this),i=n.find("."+y);i.children("li").each(function(){var t=a(this),n=t.find('input[type="checkbox"]'),i=n.data("hide");n[0].checked&&!i&&(n[0].checked=!1,l.siblings("."+s).find("."+y).append(t.clone()),t.remove(),r.push(n[0].value)),e.setValue()})}),e.renderCheckBtn();var c=l.siblings("."+s).find("."+h+" input");""===c.val()||c.trigger("keyup"),t.onchange&&t.onchange(e.getData(r),i)}}),e.laySearch.find("input").on("keyup",function(){var n=this.value,i=a(this).parents("."+h).eq(0).siblings("."+y),l=i.children("li");l.each(function(){var e=a(this),t=e.find('input[type="checkbox"]'),i=t[0].title.indexOf(n)!==-1;e[i?"removeClass":"addClass"](c),t.data("hide",!i)}),e.renderCheckBtn();var r=l.length===i.children("li."+c).length;e.noneView(i,r?t.text.searchNone:"")})},r.that={},r.config={},l.reload=function(e,a){var t=r.that[e];return t.reload(a),r.call(t)},l.getData=function(e){var a=r.that[e];return a.getData()},l.render=function(e){var a=new x(e);return r.call(a)},e(i,l)}); \ No newline at end of file diff --git a/Yangcai365_design/manage/zinc/layui/lay/modules/tree.js b/Yangcai365_design/manage/zinc/layui/lay/modules/tree.js new file mode 100644 index 0000000..07d3a9f --- /dev/null +++ b/Yangcai365_design/manage/zinc/layui/lay/modules/tree.js @@ -0,0 +1,2 @@ +/** layui-v2.5.4 MIT License By https://www.layui.com */ + ;layui.define("form",function(e){"use strict";var i=layui.$,a=layui.form,n="tree",r={config:{},index:layui[n]?layui[n].index+1e4:0,set:function(e){var a=this;return a.config=i.extend({},a.config,e),a},on:function(e,i){return layui.onevent.call(this,n,e,i)}},l=function(){var e=this,i=e.config,a=i.id||e.index;return l.that[a]=e,l.config[a]=i,{config:i,reload:function(i){e.reload.call(e,i)},getChecked:function(){return e.getChecked.call(e)},setChecked:function(i){return e.setChecked.call(e,i)}}},t="layui-hide",d="layui-disabled",s="layui-tree-set",c="layui-tree-iconClick",o="layui-icon-addition",h="layui-icon-subtraction",u="layui-tree-entry",f="layui-tree-main",p="layui-tree-txt",y="layui-tree-pack",v="layui-tree-spread",C="layui-tree-setLineShort",m="layui-tree-showLine",k="layui-tree-lineExtend",g=function(e){var a=this;a.index=++r.index,a.config=i.extend({},a.config,r.config,e),a.render()};g.prototype.config={data:[],showCheckbox:!1,showLine:!0,accordion:!1,onlyIconControl:!1,isJump:!1,edit:!1,text:{defaultNodeName:"未命名",none:"无数据"}},g.prototype.reload=function(e){var a=this;layui.each(e,function(e,i){i.constructor===Array&&delete a.config[e]}),a.config=i.extend(!0,{},a.config,e),a.render()},g.prototype.render=function(){var e=this,a=e.config,n=i('
        ');e.tree(n);var r=a.elem=i(a.elem);if(r[0]){if(a.showSearch&&n.prepend(''),e.key=a.id||e.index,e.elem=n,e.elemNone=i('
        '+a.text.none+"
        "),r.html(e.elem),0==e.elem.find(".layui-tree-set").length)return e.elem.append(e.elemNone);a.drag&&e.drag(),a.showCheckbox&&e.renderForm("checkbox"),e.elem.find(".layui-tree-set").each(function(){var e=i(this);e.parent(".layui-tree-pack")[0]||e.addClass("layui-tree-setHide"),!e.next()[0]&&e.parents(".layui-tree-pack").eq(1).hasClass("layui-tree-lineExtend")&&e.addClass(C),e.next()[0]||e.parents(".layui-tree-set").eq(0).next()[0]||e.addClass(C)}),e.events()}},g.prototype.renderForm=function(e){a.render(e,"LAY-tree-"+this.index)},g.prototype.tree=function(e,a){var n=this,r=n.config,l=a||r.data;layui.each(l,function(a,l){var c=l.children&&l.children.length>0,o=i('
        '),h=i(['
        ',"
        ','
        ',function(){return r.showLine?c?'':'':''}(),function(){return r.showCheckbox?'':""}(),function(){return r.isJump&&l.href?''+(l.title||l.label||r.text.defaultNodeName)+"":''+(l.title||l.label||r.text.defaultNodeName)+""}(),"
        ",function(){if(!r.edit)return"";var e={add:'',update:'',del:''},i=['
        '];return r.edit===!0&&(r.edit=["update","del"]),"object"==typeof r.edit?(layui.each(r.edit,function(a,n){i.push(e[n]||"")}),i.join("")+"
        "):void 0}(),"
        "].join(""));c&&(h.append(o),n.tree(o,l.children)),e.append(h),h.prev("."+s)[0]&&h.prev().children(".layui-tree-pack").addClass("layui-tree-showLine"),c||h.parent(".layui-tree-pack").addClass("layui-tree-lineExtend"),n.spread(h,l),r.showCheckbox&&n.checkClick(h,l),r.edit&&n.operate(h,l)})},g.prototype.spread=function(e,a){var n=this,r=n.config,l=e.children("."+u),t=l.children("."+f),C=l.find("."+c),m=l.find("."+p),k=r.onlyIconControl?C:t,g="";k.on("click",function(i){var a=e.children("."+y),n=k.children(".layui-icon")[0]?k.children(".layui-icon"):k.find(".layui-tree-icon").children(".layui-icon");if(a[0]){if(e.hasClass(v))e.removeClass(v),a.slideUp(200),n.removeClass(h).addClass(o);else if(e.addClass(v),a.slideDown(200),n.addClass(h).removeClass(o),r.accordion){var l=e.siblings("."+s);l.removeClass(v),l.children("."+y).slideUp(200),l.find(".layui-tree-icon").children(".layui-icon").removeClass(h).addClass(o)}}else g="normal"}),m.on("click",function(){var n=i(this);n.hasClass(d)||(g=e.hasClass(v)?r.onlyIconControl?"open":"close":r.onlyIconControl?"close":"open",r.click&&r.click({elem:e,state:g,data:a}))})},g.prototype.setCheckbox=function(e,i,a){var n=this,r=(n.config,a.prop("checked"));if("object"==typeof i.children||e.find("."+y)[0]){var l=e.find("."+y).find('input[name="layuiTreeCheck"]');l.each(function(){this.disabled||(this.checked=r)})}var t=function(e){if(e.parents("."+s)[0]){var i,a=e.parent("."+y),n=a.parent(),l=a.prev().find('input[name="layuiTreeCheck"]');r?l.prop("checked",r):(a.find('input[name="layuiTreeCheck"]').each(function(){this.checked&&(i=!0)}),i||l.prop("checked",!1)),t(n)}};t(e),n.renderForm("checkbox")},g.prototype.checkClick=function(e,a){var n=this,r=n.config,l=e.children("."+u),t=l.children("."+f);t.on("click",'input[name="layuiTreeCheck"]+',function(l){layui.stope(l);var t=i(this).prev(),d=t.prop("checked");t.prop("disabled")||(n.setCheckbox(e,a,t),r.oncheck&&r.oncheck({elem:e,checked:d,data:a}))})},g.prototype.operate=function(e,a){var n=this,r=n.config,l=e.children("."+u),d=l.children("."+f);l.children(".layui-tree-btnGroup").on("click",".layui-icon",function(l){layui.stope(l);var f=i(this).data("type"),g=e.children("."+y),x={data:a,type:f,elem:e};if("add"==f){g[0]||(r.showLine?(d.find("."+c).addClass("layui-tree-icon"),d.find("."+c).children(".layui-icon").addClass(o).removeClass("layui-icon-file")):d.find(".layui-tree-iconArrow").removeClass(t),e.append('
        '));var b=r.operate&&r.operate(x),w={};if(w.title=r.text.defaultNodeName,w.id=b,n.tree(e.children("."+y),[w]),r.showLine)if(g[0])g.hasClass(k)||g.addClass(k),e.find("."+y).each(function(){i(this).children("."+s).last().addClass(C)}),g.children("."+s).last().prev().hasClass(C)?g.children("."+s).last().prev().removeClass(C):g.children("."+s).last().removeClass(C),!e.parent("."+y)[0]&&e.next()[0]&&g.children("."+s).last().removeClass(C);else{var T=e.siblings("."+s),L=1,N=e.parent("."+y);layui.each(T,function(e,a){i(a).children("."+y)[0]||(L=0)}),1==L?(T.children("."+y).addClass(m),T.children("."+y).children("."+s).removeClass(C),e.children("."+y).addClass(m),N.removeClass(k),N.children("."+s).last().children("."+y).children("."+s).last().addClass(C)):e.children("."+y).children("."+s).addClass(C)}if(!r.showCheckbox)return;if(d.find('input[name="layuiTreeCheck"]')[0].checked){var A=e.children("."+y).children("."+s).last();A.find('input[name="layuiTreeCheck"]')[0].checked=!0}n.renderForm("checkbox")}else if("update"==f){var q=d.children("."+p).html();d.children("."+p).html(""),d.append(''),d.children(".layui-tree-editInput").val(q).focus();var F=function(e){var i=e.val().trim();i=i?i:r.text.defaultNodeName,e.remove(),d.children("."+p).html(i),x.data.title=i,r.operate&&r.operate(x)};d.children(".layui-tree-editInput").blur(function(){F(i(this))}),d.children(".layui-tree-editInput").on("keydown",function(e){13===e.keyCode&&(e.preventDefault(),F(i(this)))})}else{if(r.operate&&r.operate(x),x.status="remove",!e.prev("."+s)[0]&&!e.next("."+s)[0]&&!e.parent("."+y)[0])return e.remove(),void n.elem.append(n.elemNone);if(e.siblings("."+s).children("."+u)[0]){if(r.showCheckbox){var I=function(e){if(e.parents("."+s)[0]){var a=e.siblings("."+s).children("."+u),r=e.parent("."+y).prev(),l=r.find('input[name="layuiTreeCheck"]')[0],t=1,d=0;0==l.checked&&(a.each(function(e,a){var n=i(a).find('input[name="layuiTreeCheck"]')[0];0!=n.checked||n.disabled||(t=0),n.disabled||(d=1)}),1==t&&1==d&&(l.checked=!0,n.renderForm("checkbox"),I(r.parent("."+s))))}};I(e)}if(r.showLine){var T=e.siblings("."+s),L=1,N=e.parent("."+y);layui.each(T,function(e,a){i(a).children("."+y)[0]||(L=0)}),1==L?(g[0]||(N.removeClass(k),T.children("."+y).addClass(m),T.children("."+y).children("."+s).removeClass(C)),e.next()[0]?N.children("."+s).last().children("."+y).children("."+s).last().addClass(C):e.prev().children("."+y).children("."+s).last().addClass(C),e.next()[0]||e.parents("."+s)[1]||e.parents("."+s).eq(0).next()[0]||e.prev("."+s).addClass(C)):!e.next()[0]&&e.hasClass(C)&&e.prev().addClass(C)}}else{var H=e.parent("."+y).prev();if(r.showLine){H.find("."+c).removeClass("layui-tree-icon"),H.find("."+c).children(".layui-icon").removeClass(h).addClass("layui-icon-file");var S=H.parents("."+y).eq(0);S.addClass(k),S.children("."+s).each(function(){i(this).children("."+y).children("."+s).last().addClass(C)})}else H.find(".layui-tree-iconArrow").addClass(t);e.parents("."+s).eq(0).removeClass(v),e.parent("."+y).remove()}e.remove()}})},g.prototype.drag=function(){var e=this,a=e.config;e.elem.on("dragstart","."+u,function(){var e=i(this).parent("."+s),n=e.parents("."+s)[0]?e.parents("."+s).eq(0):"未找到父节点";a.dragstart&&a.dragstart(e,n)}),e.elem.on("dragend","."+u,function(n){var n=n||event,r=n.clientY,l=i(this),d=l.parent("."+s),f=d.height(),p=d.offset().top,g=e.elem.find("."+s),x=e.elem.height(),b=e.elem.offset().top,w=x+b-13,T=d.parents("."+s)[0],L=d.next()[0];if(T)var N=d.parent("."+y),A=d.parents("."+s).eq(0),q=A.parent("."+y),F=A.offset().top,I=d.siblings(),H=A.children("."+y).children("."+s).length;var S=function(n){if(T||L||e.elem.children("."+s).last().children("."+y).children("."+s).last().addClass(C),!T)return void d.removeClass("layui-tree-setHide");if(1==H)a.showLine?(n.find("."+c).removeClass("layui-tree-icon"),n.find("."+c).children(".layui-icon").removeClass(h).addClass("layui-icon-file"),q.addClass(k),q.children("."+s).children("."+y).each(function(){i(this).children("."+s).last().addClass(C)})):n.find(".layui-tree-iconArrow").addClass(t),n.children("."+y).remove(),n.removeClass(v);else{if(a.showLine){var r=1;layui.each(I,function(e,a){i(a).children("."+y)[0]||(r=0)}),1==r?(d.children("."+y)[0]||(N.removeClass(k),I.children("."+y).addClass(m),I.children("."+y).children("."+s).removeClass(C)),N.children("."+s).last().children("."+y).children("."+s).last().addClass(C),L||n.parents("."+s)[0]||n.next()[0]||N.children("."+s).last().addClass(C)):!L&&d.hasClass(C)&&N.children("."+s).last().addClass(C)}if(a.showCheckbox){var l=function(a){if(a){if(!a.parents("."+s)[0])return}else if(!n[0])return;var r=a?a.siblings().children("."+u):I.children("."+u),t=a?a.parent("."+y).prev():N.prev(),d=t.find('input[name="layuiTreeCheck"]')[0],c=1,o=0;0==d.checked&&(r.each(function(e,a){var n=i(a).find('input[name="layuiTreeCheck"]')[0];0!=n.checked||n.disabled||(c=0),n.disabled||(o=1)}),1==c&&1==o&&(d.checked=!0,e.renderForm("checkbox"),l(t.parent("."+s)||n)))};l()}}};g.each(function(){if(0!=i(this).height()){if(r>p&&rF&&rn&&r')),i(this).children("."+y).append(d),S(A),a.showLine){var l=i(this).children("."+y).children("."+s);if(d.children("."+y).children("."+s).last().addClass(C),1==l.length){var h=i(this).siblings("."+s),v=1,g=i(this).parent("."+y);layui.each(h,function(e,a){i(a).children("."+y)[0]||(v=0)}),1==v?(h.children("."+y).addClass(m),h.children("."+y).children("."+s).removeClass(C),i(this).children("."+y).addClass(m),g.removeClass(k),g.children("."+s).last().children("."+y).children("."+s).last().addClass(C).removeClass("layui-tree-setHide")):i(this).children("."+y).children("."+s).addClass(C).removeClass("layui-tree-setHide")}else d.prev("."+s).hasClass(C)?(d.prev("."+s).removeClass(C),d.addClass(C)):(d.removeClass("layui-tree-setLineShort layui-tree-setHide"),d.children("."+y)[0]?d.prev("."+s).children("."+y).children("."+s).last().removeClass(C):d.siblings("."+s).find("."+y).each(function(){i(this).children("."+s).last().addClass(C)})),i(this).next()[0]||d.addClass(C)}if(a.showCheckbox&&i(this).children("."+u).find('input[name="layuiTreeCheck"]')[0].checked){var x=d.children("."+u);x.find('input[name="layuiTreeCheck"]+').click()}return a.dragend&&a.dragend("drag success",d,i(this)),!1}if(rw)return e.elem.children("."+s).last().children("."+y).addClass(m),e.elem.append(d),S(A),d.prev().children("."+y).children("."+s).last().removeClass(C),d.addClass("layui-tree-setHide"),d.children("."+y).children("."+s).last().addClass(C),a.dragend&&a.dragend("拖拽成功,插入最外层节点",d,e.elem),!1}})})},g.prototype.events=function(){var e=this,a=e.config,n=e.elem.find(".layui-tree-checkedFirst");layui.each(n,function(e,a){i(a).children("."+u).find('input[name="layuiTreeCheck"]+').trigger("click")}),e.elem.find(".layui-tree-search").on("keyup",function(){var n=i(this),r=n.val(),l=n.nextAll(),d=[];l.find("."+p).each(function(){var e=i(this).parents("."+u);if(i(this).html().indexOf(r)!=-1){d.push(i(this).parent());var a=function(e){e.addClass("layui-tree-searchShow"),e.parent("."+y)[0]&&a(e.parent("."+y).parent("."+s))};a(e.parent("."+s))}}),l.find("."+u).each(function(){var e=i(this).parent("."+s);e.hasClass("layui-tree-searchShow")||e.addClass(t)}),0==l.find(".layui-tree-searchShow").length&&e.elem.append(e.elemNone),a.onsearch&&a.onsearch({elem:d})}),e.elem.find(".layui-tree-search").on("keydown",function(){i(this).nextAll().find("."+u).each(function(){var e=i(this).parent("."+s);e.removeClass("layui-tree-searchShow "+t)}),i(".layui-tree-emptyText")[0]&&i(".layui-tree-emptyText").remove()})},g.prototype.getChecked=function(){var e=this,a=e.config,n=[],r=[];e.elem.find(".layui-form-checked").each(function(){n.push(i(this).prev()[0].value)});var l=function(e,a){layui.each(e,function(e,r){layui.each(n,function(e,n){if(r.id==n){var t=i.extend({},r);return delete t.children,a.push(t),r.children&&(t.children=[],l(r.children,t.children)),!0}})})};return l(i.extend({},a.data),r),r},g.prototype.setChecked=function(e){var a=this;a.config;a.elem.find("."+s).each(function(a,n){var r=i(this).data("id"),l=i(n).children("."+u).find('input[name="layuiTreeCheck"]'),t=l.next();if("number"==typeof e){if(r==e)return l[0].checked||t.click(),!1}else i.inArray(r,e)!=-1&&(l[0].checked||t.click())})},l.that={},l.config={},r.reload=function(e,i){var a=l.that[e];return a.reload(i),l.call(a)},r.getChecked=function(e){var i=l.that[e];return i.getChecked()},r.setChecked=function(e,i){var a=l.that[e];return a.setChecked(i)},r.render=function(e){var i=new g(e);return l.call(i)},e(n,r)}); \ No newline at end of file diff --git a/Yangcai365_design/manage/zinc/layui/lay/modules/upload.js b/Yangcai365_design/manage/zinc/layui/lay/modules/upload.js new file mode 100644 index 0000000..e5aecbb --- /dev/null +++ b/Yangcai365_design/manage/zinc/layui/lay/modules/upload.js @@ -0,0 +1,2 @@ +/** layui-v2.5.4 MIT License By https://www.layui.com */ +;layui.define("layer",function(e){"use strict";var t=layui.$,i=layui.layer,n=layui.hint(),a=layui.device(),o={config:{},set:function(e){var i=this;return i.config=t.extend({},i.config,e),i},on:function(e,t){return layui.onevent.call(this,r,e,t)}},l=function(){var e=this;return{upload:function(t){e.upload.call(e,t)},reload:function(t){e.reload.call(e,t)},config:e.config}},r="upload",u="layui-upload-file",c="layui-upload-form",f="layui-upload-iframe",s="layui-upload-choose",p=function(e){var i=this;i.config=t.extend({},i.config,o.config,e),i.render()};p.prototype.config={accept:"images",exts:"",auto:!0,bindAction:"",url:"",field:"file",acceptMime:"",method:"post",data:{},drag:!0,size:0,number:0,multiple:!1,defaultMsg:""},p.prototype.render=function(e){var i=this,e=i.config;e.elem=t(e.elem),e.bindAction=t(e.bindAction),i.file(),i.events()},p.prototype.file=function(){var e=this,i=e.config,n=e.elemFile=t(['"].join("")),o=i.elem.next();(o.hasClass(u)||o.hasClass(c))&&o.remove(),a.ie&&a.ie<10&&i.elem.wrap('
        '),e.isFile()?(e.elemFile=i.elem,i.field=i.elem[0].name):i.elem.after(n),a.ie&&a.ie<10&&e.initIE()},p.prototype.initIE=function(){var e=this,i=e.config,n=t(''),a=t(['
        ',"
        "].join(""));t("#"+f)[0]||t("body").append(n),i.elem.next().hasClass(c)||(e.elemFile.wrap(a),i.elem.next("."+c).append(function(){var e=[];return layui.each(i.data,function(t,i){i="function"==typeof i?i():i,e.push('')}),e.join("")}()))},p.prototype.msg=function(e){return i.msg(e,{icon:2,shift:6})},p.prototype.isFile=function(){var e=this.config.elem[0];if(e){return"input"===e.tagName.toLocaleLowerCase()&&"file"===e.type}},p.prototype.preview=function(e){var t=this;window.FileReader&&layui.each(t.chooseFiles,function(t,i){var n=new FileReader;n.readAsDataURL(i),n.onload=function(){e&&e(t,i,this.result)}})},p.prototype.upload=function(e,i){var n,o=this,l=o.config,r=o.elemFile[0],u=function(){var i=0,n=0,a=e||o.files||o.chooseFiles||r.files,u=function(){l.multiple&&i+n===o.fileLength&&"function"==typeof l.allDone&&l.allDone({total:o.fileLength,successful:i,aborted:n})};layui.each(a,function(e,a){var r=new FormData;r.append(l.field,a),layui.each(l.data,function(e,t){t="function"==typeof t?t():t,r.append(e,t)}),t.ajax({url:l.url,type:"post",data:r,contentType:!1,processData:!1,dataType:"json",headers:l.headers||{},success:function(t){i++,d(e,t),u()},error:function(){n++,m(e),u()}})})},c=function(){var e=t("#"+f);o.elemFile.parent().submit(),clearInterval(p.timer),p.timer=setInterval(function(){var t,i=e.contents().find("body");try{t=i.text()}catch(n){o.msg("获取上传后的响应信息出现异常"),clearInterval(p.timer),m()}t&&(clearInterval(p.timer),i.html(""),d(0,t))},30)},d=function(e,t){if(o.elemFile.next("."+s).remove(),r.value="","object"!=typeof t){try{t=JSON.parse(t)}catch(i){return t={},o.msg("请对上传接口返回有效JSON")}}"function"==typeof l.done&&l.done(t,e||0,function(e){o.upload(e)})},m=function(e){l.auto&&(r.value=""),"function"==typeof l.error&&l.error(e||0,function(e){o.upload(e)})},h=l.exts,v=function(){var t=[];return layui.each(e||o.chooseFiles,function(e,i){t.push(i.name)}),t}(),g={preview:function(e){o.preview(e)},upload:function(e,t){var i={};i[e]=t,o.upload(i)},pushFile:function(){return o.files=o.files||{},layui.each(o.chooseFiles,function(e,t){o.files[e]=t}),o.files},resetFile:function(e,t,i){var n=new File([t],i);o.files=o.files||{},o.files[e]=n}},y=function(){if("choose"!==i&&!l.auto||(l.choose&&l.choose(g),"choose"!==i)){return l.before&&l.before(g),a.ie?a.ie>9?u():c():void u()}};if(v=0===v.length?r.value.match(/[^\/\\]+\..+/g)||[]||"":v,0!==v.length){switch(l.accept){case"file":if(h&&!RegExp("\\w\\.("+h+")$","i").test(escape(v))){return l.defaultMsg?o.msg(l.defaultMsg):o.msg("选择的文件中包含不支持的格式"),r.value=""}break;case"video":if(!RegExp("\\w\\.("+(h||"avi|mp4|wma|rmvb|rm|flash|3gp|flv")+")$","i").test(escape(v))){return o.msg("选择的视频中包含不支持的格式"),r.value=""}break;case"audio":if(!RegExp("\\w\\.("+(h||"mp3|wav|mid")+")$","i").test(escape(v))){return o.msg("选择的音频中包含不支持的格式"),r.value=""}break;default:if(layui.each(v,function(e,t){RegExp("\\w\\.("+(h||"jpg|png|gif|bmp|jpeg$")+")","i").test(escape(t))||(n=!0)}),n){return o.msg("选择的图片中包含不支持的格式"),r.value=""}}if(o.fileLength=function(){var t=0,i=e||o.files||o.chooseFiles||r.files;return layui.each(i,function(){t++}),t}(),l.number&&o.fileLength>l.number){return o.msg("同时最多只能上传的数量为:"+l.number)}if(l.size>0&&!(a.ie&&a.ie<10)){var F;if(layui.each(o.chooseFiles,function(e,t){if(t.size>1024*l.size){var i=l.size/1024;i=i>=1?i.toFixed(2)+"MB":l.size+"KB",r.value="",F=i}}),F){return o.msg("文件不能超过"+F)}}y()}},p.prototype.reload=function(e){e=e||{},delete e.elem,delete e.bindAction;var i=this,e=i.config=t.extend({},i.config,o.config,e),n=e.elem.next();n.attr({name:e.name,accept:e.acceptMime,multiple:e.multiple})},p.prototype.events=function(){var e=this,i=e.config,o=function(t){e.chooseFiles={},layui.each(t,function(t,i){var n=(new Date).getTime();e.chooseFiles[n+"-"+t]=i})},l=function(t,n){var a=e.elemFile,o=t.length>1?t.length+"个文件":(t[0]||{}).name||a[0].value.match(/[^\/\\]+\..+/g)||[]||"";a.next().hasClass(s)&&a.next().remove(),e.upload(null,"choose"),e.isFile()||i.choose||a.after(''+o+"")};i.elem.off("upload.start").on("upload.start",function(){var a=t(this),o=a.attr("lay-data");if(o){try{o=new Function("return "+o)(),e.config=t.extend({},i,o)}catch(l){n.error("Upload element property lay-data configuration item has a syntax error: "+o)}}e.config.item=a,e.elemFile[0].click()}),a.ie&&a.ie<10||i.elem.off("upload.over").on("upload.over",function(){var e=t(this);e.attr("lay-over","")}).off("upload.leave").on("upload.leave",function(){var e=t(this);e.removeAttr("lay-over")}).off("upload.drop").on("upload.drop",function(n,a){var r=t(this),u=a.originalEvent.dataTransfer.files||[];r.removeAttr("lay-over"),o(u),i.auto?e.upload(u):l(u)}),e.elemFile.off("upload.change").on("upload.change",function(){var t=this.files||[];o(t),i.auto?e.upload():l(t)}),i.bindAction.off("upload.action").on("upload.action",function(){e.upload()}),i.elem.data("haveEvents")||(e.elemFile.on("change",function(){t(this).trigger("upload.change")}),i.elem.on("click",function(){e.isFile()||t(this).trigger("upload.start")}),i.drag&&i.elem.on("dragover",function(e){e.preventDefault(),t(this).trigger("upload.over")}).on("dragleave",function(e){t(this).trigger("upload.leave")}).on("drop",function(e){e.preventDefault(),t(this).trigger("upload.drop",e)}),i.bindAction.on("click",function(){t(this).trigger("upload.action")}),i.elem.data("haveEvents",!0))},o.render=function(e){var t=new p(e);return l.call(t)},e(r,o)}); \ No newline at end of file diff --git a/Yangcai365_design/manage/zinc/layui/lay/modules/util.js b/Yangcai365_design/manage/zinc/layui/lay/modules/util.js new file mode 100644 index 0000000..4148c2c --- /dev/null +++ b/Yangcai365_design/manage/zinc/layui/lay/modules/util.js @@ -0,0 +1,2 @@ +/** layui-v2.5.4 MIT License By https://www.layui.com */ + ;layui.define("jquery",function(t){"use strict";var e=layui.$,i={fixbar:function(t){var i,n,a="layui-fixbar",o="layui-fixbar-top",r=e(document),l=e("body");t=e.extend({showHeight:200},t),t.bar1=t.bar1===!0?"":t.bar1,t.bar2=t.bar2===!0?"":t.bar2,t.bgcolor=t.bgcolor?"background-color:"+t.bgcolor:"";var c=[t.bar1,t.bar2,""],g=e(['
          ',t.bar1?'
        • '+c[0]+"
        • ":"",t.bar2?'
        • '+c[1]+"
        • ":"",'
        • '+c[2]+"
        • ","
        "].join("")),s=g.find("."+o),u=function(){var e=r.scrollTop();e>=t.showHeight?i||(s.show(),i=1):i&&(s.hide(),i=0)};e("."+a)[0]||("object"==typeof t.css&&g.css(t.css),l.append(g),u(),g.find("li").on("click",function(){var i=e(this),n=i.attr("lay-type");"top"===n&&e("html,body").animate({scrollTop:0},200),t.click&&t.click.call(this,n)}),r.on("scroll",function(){clearTimeout(n),n=setTimeout(function(){u()},100)}))},countdown:function(t,e,i){var n=this,a="function"==typeof e,o=new Date(t).getTime(),r=new Date(!e||a?(new Date).getTime():e).getTime(),l=o-r,c=[Math.floor(l/864e5),Math.floor(l/36e5)%24,Math.floor(l/6e4)%60,Math.floor(l/1e3)%60];a&&(i=e);var g=setTimeout(function(){n.countdown(t,r+1e3,i)},1e3);return i&&i(l>0?c:[0,0,0,0],e,g),l<=0&&clearTimeout(g),g},timeAgo:function(t,e){var i=this,n=[[],[]],a=(new Date).getTime()-new Date(t).getTime();return a>6912e5?(a=new Date(t),n[0][0]=i.digit(a.getFullYear(),4),n[0][1]=i.digit(a.getMonth()+1),n[0][2]=i.digit(a.getDate()),e||(n[1][0]=i.digit(a.getHours()),n[1][1]=i.digit(a.getMinutes()),n[1][2]=i.digit(a.getSeconds())),n[0].join("-")+" "+n[1].join(":")):a>=864e5?(a/1e3/60/60/24|0)+"天前":a>=36e5?(a/1e3/60/60|0)+"小时前":a>=12e4?(a/1e3/60|0)+"分钟前":a<0?"未来":"刚刚"},digit:function(t,e){var i="";t=String(t),e=e||2;for(var n=t.length;n/g,">").replace(/'/g,"'").replace(/"/g,""")},event:function(t,n,a){n=i.event[t]=e.extend(!0,i.event[t],n)||{},e("body").on(a||"click","*["+t+"]",function(){var i=e(this),a=i.attr(t);n[a]&&n[a].call(this,i)})}};!function(t,e,i){"$:nomunge";function n(){a=e[l](function(){o.each(function(){var e=t(this),i=e.width(),n=e.height(),a=t.data(this,g);(i!==a.w||n!==a.h)&&e.trigger(c,[a.w=i,a.h=n])}),n()},r[s])}var a,o=t([]),r=t.resize=t.extend(t.resize,{}),l="setTimeout",c="resize",g=c+"-special-event",s="delay",u="throttleWindow";r[s]=250,r[u]=!0,t.event.special[c]={setup:function(){if(!r[u]&&this[l])return!1;var e=t(this);o=o.add(e),t.data(this,g,{w:e.width(),h:e.height()}),1===o.length&&n()},teardown:function(){if(!r[u]&&this[l])return!1;var e=t(this);o=o.not(e),e.removeData(g),o.length||clearTimeout(a)},add:function(e){function n(e,n,o){var r=t(this),l=t.data(this,g)||{};l.w=n!==i?n:r.width(),l.h=o!==i?o:r.height(),a.apply(this,arguments)}if(!r[u]&&this[l])return!1;var a;return t.isFunction(e)?(a=e,n):(a=e.handler,void(e.handler=n))}}}(e,window),t("util",i)}); \ No newline at end of file diff --git a/Yangcai365_design/manage/zinc/layui/layui.all.js b/Yangcai365_design/manage/zinc/layui/layui.all.js new file mode 100644 index 0000000..49eb673 --- /dev/null +++ b/Yangcai365_design/manage/zinc/layui/layui.all.js @@ -0,0 +1,5 @@ +/** layui-v2.5.4 MIT License By https://www.layui.com */ + ;!function(e){"use strict";var t=document,o={modules:{},status:{},timeout:10,event:{}},n=function(){this.v="2.5.4"},r=function(){var e=t.currentScript?t.currentScript.src:function(){for(var e,o=t.scripts,n=o.length-1,r=n;r>0;r--)if("interactive"===o[r].readyState){e=o[r].src;break}return e||o[n].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),i=function(t){e.console&&console.error&&console.error("Layui hint: "+t)},a="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),u={layer:"modules/layer",laydate:"modules/laydate",laypage:"modules/laypage",laytpl:"modules/laytpl",layim:"modules/layim",layedit:"modules/layedit",form:"modules/form",upload:"modules/upload",transfer:"modules/transfer",tree:"modules/tree",table:"modules/table",element:"modules/element",rate:"modules/rate",colorpicker:"modules/colorpicker",slider:"modules/slider",carousel:"modules/carousel",flow:"modules/flow",util:"modules/util",code:"modules/code",jquery:"modules/jquery",mobile:"modules/mobile","layui.all":"../layui.all"};n.prototype.cache=o,n.prototype.define=function(e,t){var n=this,r="function"==typeof e,i=function(){var e=function(e,t){layui[e]=t,o.status[e]=!0};return"function"==typeof t&&t(function(n,r){e(n,r),o.callback[n]=function(){t(e)}}),this};return r&&(t=e,e=[]),!layui["layui.all"]&&layui["layui.mobile"]?i.call(n):(n.use(e,i),n)},n.prototype.use=function(e,n,l){function s(e,t){var n="PLaySTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/;("load"===e.type||n.test((e.currentTarget||e.srcElement).readyState))&&(o.modules[f]=t,d.removeChild(v),function r(){return++m>1e3*o.timeout/4?i(f+" is not a valid module"):void(o.status[f]?c():setTimeout(r,4))}())}function c(){l.push(layui[f]),e.length>1?y.use(e.slice(1),n,l):"function"==typeof n&&n.apply(layui,l)}var y=this,p=o.dir=o.dir?o.dir:r,d=t.getElementsByTagName("head")[0];e="string"==typeof e?[e]:e,window.jQuery&&jQuery.fn.on&&(y.each(e,function(t,o){"jquery"===o&&e.splice(t,1)}),layui.jquery=layui.$=jQuery);var f=e[0],m=0;if(l=l||[],o.host=o.host||(p.match(/\/\/([\s\S]+?)\//)||["//"+location.host+"/"])[0],0===e.length||layui["layui.all"]&&u[f]||!layui["layui.all"]&&layui["layui.mobile"]&&u[f])return c(),y;if(o.modules[f])!function g(){return++m>1e3*o.timeout/4?i(f+" is not a valid module"):void("string"==typeof o.modules[f]&&o.status[f]?c():setTimeout(g,4))}();else{var v=t.createElement("script"),h=(u[f]?p+"lay/":/^\{\/\}/.test(y.modules[f])?"":o.base||"")+(y.modules[f]||f)+".js";h=h.replace(/^\{\/\}/,""),v.async=!0,v.charset="utf-8",v.src=h+function(){var e=o.version===!0?o.v||(new Date).getTime():o.version||"";return e?"?v="+e:""}(),d.appendChild(v),!v.attachEvent||v.attachEvent.toString&&v.attachEvent.toString().indexOf("[native code")<0||a?v.addEventListener("load",function(e){s(e,h)},!1):v.attachEvent("onreadystatechange",function(e){s(e,h)}),o.modules[f]=h}return y},n.prototype.getStyle=function(t,o){var n=t.currentStyle?t.currentStyle:e.getComputedStyle(t,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](o)},n.prototype.link=function(e,n,r){var a=this,u=t.createElement("link"),l=t.getElementsByTagName("head")[0];"string"==typeof n&&(r=n);var s=(r||e).replace(/\.|\//g,""),c=u.id="layuicss-"+s,y=0;return u.rel="stylesheet",u.href=e+(o.debug?"?v="+(new Date).getTime():""),u.media="all",t.getElementById(c)||l.appendChild(u),"function"!=typeof n?a:(function p(){return++y>1e3*o.timeout/100?i(e+" timeout"):void(1989===parseInt(a.getStyle(t.getElementById(c),"width"))?function(){n()}():setTimeout(p,100))}(),a)},o.callback={},n.prototype.factory=function(e){if(layui[e])return"function"==typeof o.callback[e]?o.callback[e]:null},n.prototype.addcss=function(e,t,n){return layui.link(o.dir+"css/"+e,t,n)},n.prototype.img=function(e,t,o){var n=new Image;return n.src=e,n.complete?t(n):(n.onload=function(){n.onload=null,"function"==typeof t&&t(n)},void(n.onerror=function(e){n.onerror=null,"function"==typeof o&&o(e)}))},n.prototype.config=function(e){e=e||{};for(var t in e)o[t]=e[t];return this},n.prototype.modules=function(){var e={};for(var t in u)e[t]=u[t];return e}(),n.prototype.extend=function(e){var t=this;e=e||{};for(var o in e)t[o]||t.modules[o]?i("模块名 "+o+" 已被占用"):t.modules[o]=e[o];return t},n.prototype.router=function(e){var t=this,e=e||location.hash,o={path:[],search:{},hash:(e.match(/[^#](#.*$)/)||[])[1]||""};return/^#\//.test(e)?(e=e.replace(/^#\//,""),o.href="/"+e,e=e.replace(/([^#])(#.*$)/,"$1").split("/")||[],t.each(e,function(e,t){/^\w+=/.test(t)?function(){t=t.split("="),o.search[t[0]]=t[1]}():o.path.push(t)}),o):o},n.prototype.data=function(t,o,n){if(t=t||"layui",n=n||localStorage,e.JSON&&e.JSON.parse){if(null===o)return delete n[t];o="object"==typeof o?o:{key:o};try{var r=JSON.parse(n[t])}catch(i){var r={}}return"value"in o&&(r[o.key]=o.value),o.remove&&delete r[o.key],n[t]=JSON.stringify(r),o.key?r[o.key]:r}},n.prototype.sessionData=function(e,t){return this.data(e,t,sessionStorage)},n.prototype.device=function(t){var o=navigator.userAgent.toLowerCase(),n=function(e){var t=new RegExp(e+"/([^\\s\\_\\-]+)");return e=(o.match(t)||[])[1],e||!1},r={os:function(){return/windows/.test(o)?"windows":/linux/.test(o)?"linux":/iphone|ipod|ipad|ios/.test(o)?"ios":/mac/.test(o)?"mac":void 0}(),ie:function(){return!!(e.ActiveXObject||"ActiveXObject"in e)&&((o.match(/msie\s(\d+)/)||[])[1]||"11")}(),weixin:n("micromessenger")};return t&&!r[t]&&(r[t]=n(t)),r.android=/android/.test(o),r.ios="ios"===r.os,r},n.prototype.hint=function(){return{error:i}},n.prototype.each=function(e,t){var o,n=this;if("function"!=typeof t)return n;if(e=e||[],e.constructor===Object){for(o in e)if(t.call(e[o],o,e[o]))break}else for(o=0;oi?1:r/g,">").replace(/'/g,"'").replace(/"/g,""")},error:function(e,r){var c="Laytpl Error:";return"object"==typeof console&&console.error(c+e+"\n"+(r||"")),c+e}},n=c.exp,t=function(e){this.tpl=e};t.pt=t.prototype,window.errors=0,t.pt.parse=function(e,t){var o=this,p=e,a=n("^"+r.open+"#",""),l=n(r.close+"$","");e=e.replace(/\s+|\r|\t|\n/g," ").replace(n(r.open+"#"),r.open+"# ").replace(n(r.close+"}"),"} "+r.close).replace(/\\/g,"\\\\").replace(n(r.open+"!(.+?)!"+r.close),function(e){return e=e.replace(n("^"+r.open+"!"),"").replace(n("!"+r.close),"").replace(n(r.open+"|"+r.close),function(e){return e.replace(/(.)/g,"\\$1")})}).replace(/(?="|')/g,"\\").replace(c.query(),function(e){return e=e.replace(a,"").replace(l,""),'";'+e.replace(/\\/g,"")+';view+="'}).replace(c.query(1),function(e){var c='"+(';return e.replace(/\s/g,"")===r.open+r.close?"":(e=e.replace(n(r.open+"|"+r.close),""),/^=/.test(e)&&(e=e.replace(/^=/,""),c='"+_escape_('),c+e.replace(/\\/g,"")+')+"')}),e='"use strict";var view = "'+e+'";return view;';try{return o.cache=e=new Function("d, _escape_",e),e(t,c.escape)}catch(u){return delete o.cache,c.error(u,p)}},t.pt.render=function(e,r){var n,t=this;return e?(n=t.cache?t.cache(e,c.escape):t.parse(t.tpl,e),r?void r(n):n):c.error("no data")};var o=function(e){return"string"!=typeof e?c.error("Template not found"):new t(e)};o.config=function(e){e=e||{};for(var c in e)r[c]=e[c]},o.v="1.2.0",e("laytpl",o)});layui.define(function(e){"use strict";var a=document,t="getElementById",n="getElementsByTagName",i="laypage",r="layui-disabled",u=function(e){var a=this;a.config=e||{},a.config.index=++s.index,a.render(!0)};u.prototype.type=function(){var e=this.config;if("object"==typeof e.elem)return void 0===e.elem.length?2:3},u.prototype.view=function(){var e=this,a=e.config,t=a.groups="groups"in a?0|a.groups:5;a.layout="object"==typeof a.layout?a.layout:["prev","page","next"],a.count=0|a.count,a.curr=0|a.curr||1,a.limits="object"==typeof a.limits?a.limits:[10,20,30,40,50],a.limit=0|a.limit||10,a.pages=Math.ceil(a.count/a.limit)||1,a.curr>a.pages&&(a.curr=a.pages),t<0?t=1:t>a.pages&&(t=a.pages),a.prev="prev"in a?a.prev:"上一页",a.next="next"in a?a.next:"下一页";var n=a.pages>t?Math.ceil((a.curr+(t>1?1:0))/(t>0?t:1)):1,i={prev:function(){return a.prev?''+a.prev+"":""}(),page:function(){var e=[];if(a.count<1)return"";n>1&&a.first!==!1&&0!==t&&e.push(''+(a.first||1)+"");var i=Math.floor((t-1)/2),r=n>1?a.curr-i:1,u=n>1?function(){var e=a.curr+(t-i-1);return e>a.pages?a.pages:e}():t;for(u-r2&&e.push('');r<=u;r++)r===a.curr?e.push('"+r+""):e.push(''+r+"");return a.pages>t&&a.pages>u&&a.last!==!1&&(u+1…'),0!==t&&e.push(''+(a.last||a.pages)+"")),e.join("")}(),next:function(){return a.next?''+a.next+"":""}(),count:'共 '+a.count+" 条",limit:function(){var e=['"}(),refresh:['','',""].join(""),skip:function(){return['到第','','页',""].join("")}()};return['
        ',function(){var e=[];return layui.each(a.layout,function(a,t){i[t]&&e.push(i[t])}),e.join("")}(),"
        "].join("")},u.prototype.jump=function(e,a){if(e){var t=this,i=t.config,r=e.children,u=e[n]("button")[0],l=e[n]("input")[0],p=e[n]("select")[0],c=function(){var e=0|l.value.replace(/\s|\D/g,"");e&&(i.curr=e,t.render())};if(a)return c();for(var o=0,y=r.length;oi.pages||(i.curr=e,t.render())});p&&s.on(p,"change",function(){var e=this.value;i.curr*e>i.count&&(i.curr=Math.ceil(i.count/e)),i.limit=e,t.render()}),u&&s.on(u,"click",function(){c()})}},u.prototype.skip=function(e){if(e){var a=this,t=e[n]("input")[0];t&&s.on(t,"keyup",function(t){var n=this.value,i=t.keyCode;/^(37|38|39|40)$/.test(i)||(/\D/.test(n)&&(this.value=n.replace(/\D/,"")),13===i&&a.jump(e,!0))})}},u.prototype.render=function(e){var n=this,i=n.config,r=n.type(),u=n.view();2===r?i.elem&&(i.elem.innerHTML=u):3===r?i.elem.html(u):a[t](i.elem)&&(a[t](i.elem).innerHTML=u),i.jump&&i.jump(i,e);var s=a[t]("layui-laypage-"+i.index);n.jump(s),i.hash&&!e&&(location.hash="!"+i.hash+"="+i.curr),n.skip(s)};var s={render:function(e){var a=new u(e);return a.index},index:layui.laypage?layui.laypage.index+1e4:0,on:function(e,a,t){return e.attachEvent?e.attachEvent("on"+a,function(a){a.target=a.srcElement,t.call(e,a)}):e.addEventListener(a,t,!1),this}};e(i,s)});!function(){"use strict";var e=window.layui&&layui.define,t={getPath:function(){var e=document.currentScript?document.currentScript.src:function(){for(var e,t=document.scripts,n=t.length-1,a=n;a>0;a--)if("interactive"===t[a].readyState){e=t[a].src;break}return e||t[n].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),getStyle:function(e,t){var n=e.currentStyle?e.currentStyle:window.getComputedStyle(e,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](t)},link:function(e,a,i){if(n.path){var r=document.getElementsByTagName("head")[0],o=document.createElement("link");"string"==typeof a&&(i=a);var s=(i||e).replace(/\.|\//g,""),l="layuicss-"+s,d=0;o.rel="stylesheet",o.href=n.path+e,o.id=l,document.getElementById(l)||r.appendChild(o),"function"==typeof a&&!function c(){return++d>80?window.console&&console.error("laydate.css: Invalid"):void(1989===parseInt(t.getStyle(document.getElementById(l),"width"))?a():setTimeout(c,100))}()}}},n={v:"5.0.9",config:{},index:window.laydate&&window.laydate.v?1e5:0,path:t.getPath,set:function(e){var t=this;return t.config=w.extend({},t.config,e),t},ready:function(a){var i="laydate",r="",o=(e?"modules/laydate/":"theme/")+"default/laydate.css?v="+n.v+r;return e?layui.addcss(o,a,i):t.link(o,a,i),this}},a=function(){var e=this;return{hint:function(t){e.hint.call(e,t)},config:e.config}},i="laydate",r=".layui-laydate",o="layui-this",s="laydate-disabled",l="开始日期超出了结束日期
        建议重新选择",d=[100,2e5],c="layui-laydate-static",m="layui-laydate-list",u="laydate-selected",h="layui-laydate-hint",y="laydate-day-prev",f="laydate-day-next",p="layui-laydate-footer",g=".laydate-btns-confirm",v="laydate-time-text",D=".laydate-btns-time",T=function(e){var t=this;t.index=++n.index,t.config=w.extend({},t.config,n.config,e),n.ready(function(){t.init()})},w=function(e){return new C(e)},C=function(e){for(var t=0,n="object"==typeof e?[e]:(this.selector=e,document.querySelectorAll(e||null));t0)return n[0].getAttribute(e)}():n.each(function(n,a){a.setAttribute(e,t)})},C.prototype.removeAttr=function(e){return this.each(function(t,n){n.removeAttribute(e)})},C.prototype.html=function(e){return this.each(function(t,n){n.innerHTML=e})},C.prototype.val=function(e){return this.each(function(t,n){n.value=e})},C.prototype.append=function(e){return this.each(function(t,n){"object"==typeof e?n.appendChild(e):n.innerHTML=n.innerHTML+e})},C.prototype.remove=function(e){return this.each(function(t,n){e?n.removeChild(e):n.parentNode.removeChild(n)})},C.prototype.on=function(e,t){return this.each(function(n,a){a.attachEvent?a.attachEvent("on"+e,function(e){e.target=e.srcElement,t.call(a,e)}):a.addEventListener(e,t,!1)})},C.prototype.off=function(e,t){return this.each(function(n,a){a.detachEvent?a.detachEvent("on"+e,t):a.removeEventListener(e,t,!1)})},T.isLeapYear=function(e){return e%4===0&&e%100!==0||e%400===0},T.prototype.config={type:"date",range:!1,format:"yyyy-MM-dd",value:null,isInitValue:!0,min:"1900-1-1",max:"2099-12-31",trigger:"focus",show:!1,showBottom:!0,btns:["clear","now","confirm"],lang:"cn",theme:"default",position:null,calendar:!1,mark:{},zIndex:null,done:null,change:null},T.prototype.lang=function(){var e=this,t=e.config,n={cn:{weeks:["日","一","二","三","四","五","六"],time:["时","分","秒"],timeTips:"选择时间",startTime:"开始时间",endTime:"结束时间",dateTips:"返回日期",month:["一","二","三","四","五","六","七","八","九","十","十一","十二"],tools:{confirm:"确定",clear:"清空",now:"现在"}},en:{weeks:["Su","Mo","Tu","We","Th","Fr","Sa"],time:["Hours","Minutes","Seconds"],timeTips:"Select Time",startTime:"Start Time",endTime:"End Time",dateTips:"Select Date",month:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],tools:{confirm:"Confirm",clear:"Clear",now:"Now"}}};return n[t.lang]||n.cn},T.prototype.init=function(){var e=this,t=e.config,n="yyyy|y|MM|M|dd|d|HH|H|mm|m|ss|s",a="static"===t.position,i={year:"yyyy",month:"yyyy-MM",date:"yyyy-MM-dd",time:"HH:mm:ss",datetime:"yyyy-MM-dd HH:mm:ss"};t.elem=w(t.elem),t.eventElem=w(t.eventElem),t.elem[0]&&(t.range===!0&&(t.range="-"),t.format===i.date&&(t.format=i[t.type]),e.format=t.format.match(new RegExp(n+"|.","g"))||[],e.EXP_IF="",e.EXP_SPLIT="",w.each(e.format,function(t,a){var i=new RegExp(n).test(a)?"\\d{"+function(){return new RegExp(n).test(e.format[0===t?t+1:t-1]||"")?/^yyyy|y$/.test(a)?4:a.length:/^yyyy$/.test(a)?"1,4":/^y$/.test(a)?"1,308":"1,2"}()+"}":"\\"+a;e.EXP_IF=e.EXP_IF+i,e.EXP_SPLIT=e.EXP_SPLIT+"("+i+")"}),e.EXP_IF=new RegExp("^"+(t.range?e.EXP_IF+"\\s\\"+t.range+"\\s"+e.EXP_IF:e.EXP_IF)+"$"),e.EXP_SPLIT=new RegExp("^"+e.EXP_SPLIT+"$",""),e.isInput(t.elem[0])||"focus"===t.trigger&&(t.trigger="click"),t.elem.attr("lay-key")||(t.elem.attr("lay-key",e.index),t.eventElem.attr("lay-key",e.index)),t.mark=w.extend({},t.calendar&&"cn"===t.lang?{"0-1-1":"元旦","0-2-14":"情人","0-3-8":"妇女","0-3-12":"植树","0-4-1":"愚人","0-5-1":"劳动","0-5-4":"青年","0-6-1":"儿童","0-9-10":"教师","0-9-18":"国耻","0-10-1":"国庆","0-12-25":"圣诞"}:{},t.mark),w.each(["min","max"],function(e,n){var a=[],i=[];if("number"==typeof t[n]){var r=t[n],o=(new Date).getTime(),s=864e5,l=new Date(r?r0)return!0;var a=w.elem("div",{"class":"layui-laydate-header"}),i=[function(){var e=w.elem("i",{"class":"layui-icon laydate-icon laydate-prev-y"});return e.innerHTML="",e}(),function(){var e=w.elem("i",{"class":"layui-icon laydate-icon laydate-prev-m"});return e.innerHTML="",e}(),function(){var e=w.elem("div",{"class":"laydate-set-ym"}),t=w.elem("span"),n=w.elem("span");return e.appendChild(t),e.appendChild(n),e}(),function(){var e=w.elem("i",{"class":"layui-icon laydate-icon laydate-next-m"});return e.innerHTML="",e}(),function(){var e=w.elem("i",{"class":"layui-icon laydate-icon laydate-next-y"});return e.innerHTML="",e}()],d=w.elem("div",{"class":"layui-laydate-content"}),c=w.elem("table"),m=w.elem("thead"),u=w.elem("tr");w.each(i,function(e,t){a.appendChild(t)}),m.appendChild(u),w.each(new Array(6),function(e){var t=c.insertRow(0);w.each(new Array(7),function(a){if(0===e){var i=w.elem("th");i.innerHTML=n.weeks[a],u.appendChild(i)}t.insertCell(a)})}),c.insertBefore(m,c.children[0]),d.appendChild(c),r[e]=w.elem("div",{"class":"layui-laydate-main laydate-main-list-"+e}),r[e].appendChild(a),r[e].appendChild(d),o.push(i),s.push(d),l.push(c)}),w(d).html(function(){var e=[],i=[];return"datetime"===t.type&&e.push(''+n.timeTips+""),w.each(t.btns,function(e,r){var o=n.tools[r]||"btn";t.range&&"now"===r||(a&&"clear"===r&&(o="cn"===t.lang?"重置":"Reset"),i.push(''+o+""))}),e.push('"),e.join("")}()),w.each(r,function(e,t){i.appendChild(t)}),t.showBottom&&i.appendChild(d),/^#/.test(t.theme)){var m=w.elem("style"),u=["#{{id}} .layui-laydate-header{background-color:{{theme}};}","#{{id}} .layui-this{background-color:{{theme}} !important;}"].join("").replace(/{{id}}/g,e.elemID).replace(/{{theme}}/g,t.theme);"styleSheet"in m?(m.setAttribute("type","text/css"),m.styleSheet.cssText=u):m.innerHTML=u,w(i).addClass("laydate-theme-molv"),i.appendChild(m)}e.remove(T.thisElemDate),a?t.elem.append(i):(document.body.appendChild(i),e.position()),e.checkDate().calendar(),e.changeEvent(),T.thisElemDate=e.elemID,"function"==typeof t.ready&&t.ready(w.extend({},t.dateTime,{month:t.dateTime.month+1}))},T.prototype.remove=function(e){var t=this,n=(t.config,w("#"+(e||t.elemID)));return n.hasClass(c)||t.checkDate(function(){n.remove()}),t},T.prototype.position=function(){var e=this,t=e.config,n=e.bindElem||t.elem[0],a=n.getBoundingClientRect(),i=e.elem.offsetWidth,r=e.elem.offsetHeight,o=function(e){return e=e?"scrollLeft":"scrollTop",document.body[e]|document.documentElement[e]},s=function(e){return document.documentElement[e?"clientWidth":"clientHeight"]},l=5,d=a.left,c=a.bottom;d+i+l>s("width")&&(d=s("width")-i-l),c+r+l>s()&&(c=a.top>r?a.top-r:s()-r,c-=2*l),t.position&&(e.elem.style.position=t.position),e.elem.style.left=d+("fixed"===t.position?0:o(1))+"px",e.elem.style.top=c+("fixed"===t.position?0:o())+"px"},T.prototype.hint=function(e){var t=this,n=(t.config,w.elem("div",{"class":h}));t.elem&&(n.innerHTML=e||"",w(t.elem).find("."+h).remove(),t.elem.appendChild(n),clearTimeout(t.hinTimer),t.hinTimer=setTimeout(function(){w(t.elem).find("."+h).remove()},3e3))},T.prototype.getAsYM=function(e,t,n){return n?t--:t++,t<0&&(t=11,e--),t>11&&(t=0,e++),[e,t]},T.prototype.systemDate=function(e){var t=e||new Date;return{year:t.getFullYear(),month:t.getMonth(),date:t.getDate(),hours:e?e.getHours():0,minutes:e?e.getMinutes():0,seconds:e?e.getSeconds():0}},T.prototype.checkDate=function(e){var t,a,i=this,r=(new Date,i.config),o=r.dateTime=r.dateTime||i.systemDate(),s=i.bindElem||r.elem[0],l=(i.isInput(s)?"val":"html",i.isInput(s)?s.value:"static"===r.position?"":s.innerHTML),c=function(e){e.year>d[1]&&(e.year=d[1],a=!0),e.month>11&&(e.month=11,a=!0),e.hours>23&&(e.hours=0,a=!0),e.minutes>59&&(e.minutes=0,e.hours++,a=!0),e.seconds>59&&(e.seconds=0,e.minutes++,a=!0),t=n.getEndDate(e.month+1,e.year),e.date>t&&(e.date=t,a=!0)},m=function(e,t,n){var o=["startTime","endTime"];t=(t.match(i.EXP_SPLIT)||[]).slice(1),n=n||0,r.range&&(i[o[n]]=i[o[n]]||{}),w.each(i.format,function(s,l){var c=parseFloat(t[s]);t[s].length必须遵循下述格式:
        "+(r.range?r.format+" "+r.range+" "+r.format:r.format)+"
        已为你重置"),a=!0):l&&l.constructor===Date?r.dateTime=i.systemDate(l):(r.dateTime=i.systemDate(),delete i.startState,delete i.endState,delete i.startDate,delete i.endDate,delete i.startTime,delete i.endTime),c(o),a&&l&&i.setValue(r.range?i.endDate?i.parse():"":i.parse()),e&&e(),i)},T.prototype.mark=function(e,t){var n,a=this,i=a.config;return w.each(i.mark,function(e,a){var i=e.split("-");i[0]!=t[0]&&0!=i[0]||i[1]!=t[1]&&0!=i[1]||i[2]!=t[2]||(n=a||t[2])}),n&&e.html(''+n+""),a},T.prototype.limit=function(e,t,n,a){var i,r=this,o=r.config,l={},d=o[n>41?"endDate":"dateTime"],c=w.extend({},d,t||{});return w.each({now:c,min:o.min,max:o.max},function(e,t){l[e]=r.newDate(w.extend({year:t.year,month:t.month,date:t.date},function(){var e={};return w.each(a,function(n,a){e[a]=t[a]}),e}())).getTime()}),i=l.nowl.max,e&&e[i?"addClass":"removeClass"](s),i},T.prototype.calendar=function(e){var t,a,i,r=this,s=r.config,l=e||s.dateTime,c=new Date,m=r.lang(),u="date"!==s.type&&"datetime"!==s.type,h=e?1:0,y=w(r.table[h]).find("td"),f=w(r.elemHeader[h][2]).find("span");if(l.yeard[1]&&(l.year=d[1],r.hint("最高只能支持到公元"+d[1]+"年")),r.firstDate||(r.firstDate=w.extend({},l)),c.setFullYear(l.year,l.month,1),t=c.getDay(),a=n.getEndDate(l.month||12,l.year),i=n.getEndDate(l.month+1,l.year),w.each(y,function(e,n){var d=[l.year,l.month],c=0;n=w(n),n.removeAttr("class"),e=t&&e=n.firstDate.year&&(r.month=a.max.month,r.date=a.max.date),n.limit(w(i),r,t),M++}),w(u[f?0:1]).attr("lay-ym",M-8+"-"+T[1]).html(b+p+" - "+(M-1+p))}else if("month"===e)w.each(new Array(12),function(e){var i=w.elem("li",{"lay-ym":e}),s={year:T[0],month:e};e+1==T[1]&&w(i).addClass(o),i.innerHTML=r.month[e]+(f?"月":""),d.appendChild(i),T[0]=n.firstDate.year&&(s.date=a.max.date),n.limit(w(i),s,t)}),w(u[f?0:1]).attr("lay-ym",T[0]+"-"+T[1]).html(T[0]+p);else if("time"===e){var E=function(){w(d).find("ol").each(function(e,a){w(a).find("li").each(function(a,i){n.limit(w(i),[{hours:a},{hours:n[x].hours,minutes:a},{hours:n[x].hours,minutes:n[x].minutes,seconds:a}][e],t,[["hours"],["hours","minutes"],["hours","minutes","seconds"]][e])})}),a.range||n.limit(w(n.footer).find(g),n[x],0,["hours","minutes","seconds"])};a.range?n[x]||(n[x]={hours:0,minutes:0,seconds:0}):n[x]=i,w.each([24,60,60],function(e,t){var a=w.elem("li"),i=["

        "+r.time[e]+"

          "];w.each(new Array(t),function(t){i.push(""+w.digit(t,2)+"")}),a.innerHTML=i.join("")+"
        ",d.appendChild(a)}),E()}if(y&&h.removeChild(y),h.appendChild(d),"year"===e||"month"===e)w(n.elemMain[t]).addClass("laydate-ym-show"),w(d).find("li").on("click",function(){var r=0|w(this).attr("lay-ym");if(!w(this).hasClass(s)){if(0===t)i[e]=r,l&&(n.startDate[e]=r),n.limit(w(n.footer).find(g),null,0);else if(l)n.endDate[e]=r;else{var c="year"===e?n.getAsYM(r,T[1]-1,"sub"):n.getAsYM(T[0],r,"sub");w.extend(i,{year:c[0],month:c[1]})}"year"===a.type||"month"===a.type?(w(d).find("."+o).removeClass(o),w(this).addClass(o),"month"===a.type&&"year"===e&&(n.listYM[t][0]=r,l&&(n[["startDate","endDate"][t]].year=r),n.list("month",t))):(n.checkDate("limit").calendar(),n.closeList()),n.setBtnStatus(),a.range||n.done(null,"change"),w(n.footer).find(D).removeClass(s)}});else{var S=w.elem("span",{"class":v}),k=function(){w(d).find("ol").each(function(e){var t=this,a=w(t).find("li");t.scrollTop=30*(n[x][C[e]]-2),t.scrollTop<=0&&a.each(function(e,n){if(!w(this).hasClass(s))return t.scrollTop=30*(e-2),!0})})},H=w(c[2]).find("."+v);k(),S.innerHTML=a.range?[r.startTime,r.endTime][t]:r.timeTips,w(n.elemMain[t]).addClass("laydate-time-show"),H[0]&&H.remove(),c[2].appendChild(S),w(d).find("ol").each(function(e){var t=this;w(t).find("li").on("click",function(){var r=0|this.innerHTML;w(this).hasClass(s)||(a.range?n[x][C[e]]=r:i[C[e]]=r,w(t).find("."+o).removeClass(o),w(this).addClass(o),E(),k(),(n.endDate||"time"===a.type)&&n.done(null,"change"),n.setBtnStatus())})})}return n},T.prototype.listYM=[],T.prototype.closeList=function(){var e=this;e.config;w.each(e.elemCont,function(t,n){w(this).find("."+m).remove(),w(e.elemMain[t]).removeClass("laydate-ym-show laydate-time-show")}),w(e.elem).find("."+v).remove()},T.prototype.setBtnStatus=function(e,t,n){var a,i=this,r=i.config,o=w(i.footer).find(g),d=r.range&&"date"!==r.type&&"time"!==r.type;d&&(t=t||i.startDate,n=n||i.endDate,a=i.newDate(t).getTime()>i.newDate(n).getTime(),i.limit(null,t)||i.limit(null,n)?o.addClass(s):o[a?"addClass":"removeClass"](s),e&&a&&i.hint("string"==typeof e?l.replace(/日期/g,e):l))},T.prototype.parse=function(e,t){var n=this,a=n.config,i=t||(e?w.extend({},n.endDate,n.endTime):a.range?w.extend({},n.startDate,n.startTime):a.dateTime),r=n.format.concat();return w.each(r,function(e,t){/yyyy|y/.test(t)?r[e]=w.digit(i.year,t.length):/MM|M/.test(t)?r[e]=w.digit(i.month+1,t.length):/dd|d/.test(t)?r[e]=w.digit(i.date,t.length):/HH|H/.test(t)?r[e]=w.digit(i.hours,t.length):/mm|m/.test(t)?r[e]=w.digit(i.minutes,t.length):/ss|s/.test(t)&&(r[e]=w.digit(i.seconds,t.length))}),a.range&&!e?r.join("")+" "+a.range+" "+n.parse(1):r.join("")},T.prototype.newDate=function(e){return e=e||{},new Date(e.year||1,e.month||0,e.date||1,e.hours||0,e.minutes||0,e.seconds||0)},T.prototype.setValue=function(e){var t=this,n=t.config,a=t.bindElem||n.elem[0],i=t.isInput(a)?"val":"html";return"static"===n.position||w(a)[i](e||""),this},T.prototype.stampRange=function(){var e,t,n=this,a=n.config,i=w(n.elem).find("td");if(a.range&&!n.endDate&&w(n.footer).find(g).addClass(s),n.endDate)return e=n.newDate({year:n.startDate.year,month:n.startDate.month,date:n.startDate.date}).getTime(),t=n.newDate({year:n.endDate.year,month:n.endDate.month,date:n.endDate.date}).getTime(),e>t?n.hint(l):void w.each(i,function(a,i){var r=w(i).attr("lay-ymd").split("-"),s=n.newDate({year:r[0],month:r[1]-1,date:r[2]}).getTime();w(i).removeClass(u+" "+o),s!==e&&s!==t||w(i).addClass(w(i).hasClass(y)||w(i).hasClass(f)?u:o),s>e&&s0&&t-1 in e)}function r(e,t,n){if(pe.isFunction(t))return pe.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return pe.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(Ce.test(t))return pe.filter(t,e,n);t=pe.filter(t,e)}return pe.grep(e,function(e){return pe.inArray(e,t)>-1!==n})}function i(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function o(e){var t={};return pe.each(e.match(De)||[],function(e,n){t[n]=!0}),t}function a(){re.addEventListener?(re.removeEventListener("DOMContentLoaded",s),e.removeEventListener("load",s)):(re.detachEvent("onreadystatechange",s),e.detachEvent("onload",s))}function s(){(re.addEventListener||"load"===e.event.type||"complete"===re.readyState)&&(a(),pe.ready())}function u(e,t,n){if(void 0===n&&1===e.nodeType){var r="data-"+t.replace(_e,"-$1").toLowerCase();if(n=e.getAttribute(r),"string"==typeof n){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:qe.test(n)?pe.parseJSON(n):n)}catch(i){}pe.data(e,t,n)}else n=void 0}return n}function l(e){var t;for(t in e)if(("data"!==t||!pe.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function c(e,t,n,r){if(He(e)){var i,o,a=pe.expando,s=e.nodeType,u=s?pe.cache:e,l=s?e[a]:e[a]&&a;if(l&&u[l]&&(r||u[l].data)||void 0!==n||"string"!=typeof t)return l||(l=s?e[a]=ne.pop()||pe.guid++:a),u[l]||(u[l]=s?{}:{toJSON:pe.noop}),"object"!=typeof t&&"function"!=typeof t||(r?u[l]=pe.extend(u[l],t):u[l].data=pe.extend(u[l].data,t)),o=u[l],r||(o.data||(o.data={}),o=o.data),void 0!==n&&(o[pe.camelCase(t)]=n),"string"==typeof t?(i=o[t],null==i&&(i=o[pe.camelCase(t)])):i=o,i}}function f(e,t,n){if(He(e)){var r,i,o=e.nodeType,a=o?pe.cache:e,s=o?e[pe.expando]:pe.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){pe.isArray(t)?t=t.concat(pe.map(t,pe.camelCase)):t in r?t=[t]:(t=pe.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;for(;i--;)delete r[t[i]];if(n?!l(r):!pe.isEmptyObject(r))return}(n||(delete a[s].data,l(a[s])))&&(o?pe.cleanData([e],!0):fe.deleteExpando||a!=a.window?delete a[s]:a[s]=void 0)}}}function d(e,t,n,r){var i,o=1,a=20,s=r?function(){return r.cur()}:function(){return pe.css(e,t,"")},u=s(),l=n&&n[3]||(pe.cssNumber[t]?"":"px"),c=(pe.cssNumber[t]||"px"!==l&&+u)&&Me.exec(pe.css(e,t));if(c&&c[3]!==l){l=l||c[3],n=n||[],c=+u||1;do o=o||".5",c/=o,pe.style(e,t,c+l);while(o!==(o=s()/u)&&1!==o&&--a)}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}function p(e){var t=ze.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function h(e,t){var n,r,i=0,o="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):void 0;if(!o)for(o=[],n=e.childNodes||e;null!=(r=n[i]);i++)!t||pe.nodeName(r,t)?o.push(r):pe.merge(o,h(r,t));return void 0===t||t&&pe.nodeName(e,t)?pe.merge([e],o):o}function g(e,t){for(var n,r=0;null!=(n=e[r]);r++)pe._data(n,"globalEval",!t||pe._data(t[r],"globalEval"))}function m(e){Be.test(e.type)&&(e.defaultChecked=e.checked)}function y(e,t,n,r,i){for(var o,a,s,u,l,c,f,d=e.length,y=p(t),v=[],x=0;x"!==f[1]||Ve.test(a)?0:u:u.firstChild,o=a&&a.childNodes.length;o--;)pe.nodeName(c=a.childNodes[o],"tbody")&&!c.childNodes.length&&a.removeChild(c);for(pe.merge(v,u.childNodes),u.textContent="";u.firstChild;)u.removeChild(u.firstChild);u=y.lastChild}else v.push(t.createTextNode(a));for(u&&y.removeChild(u),fe.appendChecked||pe.grep(h(v,"input"),m),x=0;a=v[x++];)if(r&&pe.inArray(a,r)>-1)i&&i.push(a);else if(s=pe.contains(a.ownerDocument,a),u=h(y.appendChild(a),"script"),s&&g(u),n)for(o=0;a=u[o++];)Ie.test(a.type||"")&&n.push(a);return u=null,y}function v(){return!0}function x(){return!1}function b(){try{return re.activeElement}catch(e){}}function w(e,t,n,r,i,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)w(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),i===!1)i=x;else if(!i)return e;return 1===o&&(a=i,i=function(e){return pe().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=pe.guid++)),e.each(function(){pe.event.add(this,t,i,r,n)})}function T(e,t){return pe.nodeName(e,"table")&&pe.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function C(e){return e.type=(null!==pe.find.attr(e,"type"))+"/"+e.type,e}function E(e){var t=it.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function N(e,t){if(1===t.nodeType&&pe.hasData(e)){var n,r,i,o=pe._data(e),a=pe._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;r1&&"string"==typeof p&&!fe.checkClone&&rt.test(p))return e.each(function(i){var o=e.eq(i);g&&(t[0]=p.call(this,i,o.html())),S(o,t,n,r)});if(f&&(l=y(t,e[0].ownerDocument,!1,e,r),i=l.firstChild,1===l.childNodes.length&&(l=i),i||r)){for(s=pe.map(h(l,"script"),C),a=s.length;c")).appendTo(t.documentElement),t=(ut[0].contentWindow||ut[0].contentDocument).document,t.write(),t.close(),n=D(e,t),ut.detach()),lt[e]=n),n}function L(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function H(e){if(e in Et)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=Ct.length;n--;)if(e=Ct[n]+t,e in Et)return e}function q(e,t){for(var n,r,i,o=[],a=0,s=e.length;a=0&&n=0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},isPlainObject:function(e){var t;if(!e||"object"!==pe.type(e)||e.nodeType||pe.isWindow(e))return!1;try{if(e.constructor&&!ce.call(e,"constructor")&&!ce.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}if(!fe.ownFirst)for(t in e)return ce.call(e,t);for(t in e);return void 0===t||ce.call(e,t)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?ue[le.call(e)]||"object":typeof e},globalEval:function(t){t&&pe.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(ge,"ms-").replace(me,ye)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var r,i=0;if(n(e))for(r=e.length;iT.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[P]=!0,e}function i(e){var t=H.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=n.length;r--;)T.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||V)-(~e.sourceIndex||V);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function u(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function l(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function c(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function f(){}function d(e){for(var t=0,n=e.length,r="";t1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function g(e,n,r){for(var i=0,o=n.length;i-1&&(r[l]=!(a[l]=f))}}else x=m(x===a?x.splice(h,x.length):x),o?o(null,a,x,u):Q.apply(a,x)})}function v(e){for(var t,n,r,i=e.length,o=T.relative[e[0].type],a=o||T.relative[" "],s=o?1:0,u=p(function(e){return e===t},a,!0),l=p(function(e){return ee(t,e)>-1},a,!0),c=[function(e,n,r){var i=!o&&(r||n!==A)||((t=n).nodeType?u(e,n,r):l(e,n,r));return t=null,i}];s1&&h(c),s>1&&d(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(se,"$1"),n,s0,o=e.length>0,a=function(r,a,s,u,l){var c,f,d,p=0,h="0",g=r&&[],y=[],v=A,x=r||o&&T.find.TAG("*",l),b=W+=null==v?1:Math.random()||.1,w=x.length;for(l&&(A=a===H||a||l);h!==w&&null!=(c=x[h]);h++){if(o&&c){for(f=0,a||c.ownerDocument===H||(L(c),s=!_);d=e[f++];)if(d(c,a||H,s)){u.push(c);break}l&&(W=b)}i&&((c=!d&&c)&&p--,r&&g.push(c))}if(p+=h,i&&h!==p){for(f=0;d=n[f++];)d(g,y,a,s);if(r){if(p>0)for(;h--;)g[h]||y[h]||(y[h]=G.call(u));y=m(y)}Q.apply(u,y),l&&!r&&y.length>0&&p+n.length>1&&t.uniqueSort(u)}return l&&(W=b,A=v),g};return i?r(a):a}var b,w,T,C,E,N,k,S,A,D,j,L,H,q,_,F,M,O,R,P="sizzle"+1*new Date,B=e.document,W=0,I=0,$=n(),z=n(),X=n(),U=function(e,t){return e===t&&(j=!0),0},V=1<<31,Y={}.hasOwnProperty,J=[],G=J.pop,K=J.push,Q=J.push,Z=J.slice,ee=function(e,t){for(var n=0,r=e.length;n+~]|"+ne+")"+ne+"*"),ce=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),fe=new RegExp(oe),de=new RegExp("^"+re+"$"),pe={ID:new RegExp("^#("+re+")"),CLASS:new RegExp("^\\.("+re+")"),TAG:new RegExp("^("+re+"|[*])"),ATTR:new RegExp("^"+ie),PSEUDO:new RegExp("^"+oe),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},he=/^(?:input|select|textarea|button)$/i,ge=/^h\d$/i,me=/^[^{]+\{\s*\[native \w/,ye=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ve=/[+~]/,xe=/'|\\/g,be=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),we=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},Te=function(){L()};try{Q.apply(J=Z.call(B.childNodes),B.childNodes),J[B.childNodes.length].nodeType}catch(Ce){Q={apply:J.length?function(e,t){K.apply(e,Z.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}w=t.support={},E=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},L=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:B;return r!==H&&9===r.nodeType&&r.documentElement?(H=r,q=H.documentElement,_=!E(H),(n=H.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Te,!1):n.attachEvent&&n.attachEvent("onunload",Te)),w.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),w.getElementsByTagName=i(function(e){return e.appendChild(H.createComment("")),!e.getElementsByTagName("*").length}),w.getElementsByClassName=me.test(H.getElementsByClassName),w.getById=i(function(e){return q.appendChild(e).id=P,!H.getElementsByName||!H.getElementsByName(P).length}),w.getById?(T.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&_){var n=t.getElementById(e);return n?[n]:[]}},T.filter.ID=function(e){var t=e.replace(be,we);return function(e){return e.getAttribute("id")===t}}):(delete T.find.ID,T.filter.ID=function(e){var t=e.replace(be,we);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),T.find.TAG=w.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):w.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},T.find.CLASS=w.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&_)return t.getElementsByClassName(e)},M=[],F=[],(w.qsa=me.test(H.querySelectorAll))&&(i(function(e){q.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&F.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||F.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+P+"-]").length||F.push("~="),e.querySelectorAll(":checked").length||F.push(":checked"),e.querySelectorAll("a#"+P+"+*").length||F.push(".#.+[+~]")}),i(function(e){var t=H.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&F.push("name"+ne+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||F.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),F.push(",.*:")})),(w.matchesSelector=me.test(O=q.matches||q.webkitMatchesSelector||q.mozMatchesSelector||q.oMatchesSelector||q.msMatchesSelector))&&i(function(e){w.disconnectedMatch=O.call(e,"div"),O.call(e,"[s!='']:x"),M.push("!=",oe)}),F=F.length&&new RegExp(F.join("|")),M=M.length&&new RegExp(M.join("|")),t=me.test(q.compareDocumentPosition),R=t||me.test(q.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},U=t?function(e,t){if(e===t)return j=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!w.sortDetached&&t.compareDocumentPosition(e)===n?e===H||e.ownerDocument===B&&R(B,e)?-1:t===H||t.ownerDocument===B&&R(B,t)?1:D?ee(D,e)-ee(D,t):0:4&n?-1:1)}:function(e,t){if(e===t)return j=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],u=[t];if(!i||!o)return e===H?-1:t===H?1:i?-1:o?1:D?ee(D,e)-ee(D,t):0;if(i===o)return a(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;s[r]===u[r];)r++;return r?a(s[r],u[r]):s[r]===B?-1:u[r]===B?1:0},H):H},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==H&&L(e),n=n.replace(ce,"='$1']"),w.matchesSelector&&_&&!X[n+" "]&&(!M||!M.test(n))&&(!F||!F.test(n)))try{var r=O.call(e,n);if(r||w.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(i){}return t(n,H,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==H&&L(e),R(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==H&&L(e);var n=T.attrHandle[t.toLowerCase()],r=n&&Y.call(T.attrHandle,t.toLowerCase())?n(e,t,!_):void 0;return void 0!==r?r:w.attributes||!_?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(j=!w.detectDuplicates,D=!w.sortStable&&e.slice(0),e.sort(U),j){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return D=null,e},C=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=C(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=C(t);return n},T=t.selectors={cacheLength:50,createPseudo:r,match:pe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(be,we),e[3]=(e[3]||e[4]||e[5]||"").replace(be,we),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return pe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&fe.test(n)&&(t=N(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(be,we).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=$[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&$(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(ae," ")+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,d,p,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s,x=!1;if(m){if(o){for(;g;){for(d=t;d=d[g];)if(s?d.nodeName.toLowerCase()===y:1===d.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){for(d=m,f=d[P]||(d[P]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}), +l=c[e]||[],p=l[0]===W&&l[1],x=p&&l[2],d=p&&m.childNodes[p];d=++p&&d&&d[g]||(x=p=0)||h.pop();)if(1===d.nodeType&&++x&&d===t){c[e]=[W,p,x];break}}else if(v&&(d=t,f=d[P]||(d[P]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),l=c[e]||[],p=l[0]===W&&l[1],x=p),x===!1)for(;(d=++p&&d&&d[g]||(x=p=0)||h.pop())&&((s?d.nodeName.toLowerCase()!==y:1!==d.nodeType)||!++x||(v&&(f=d[P]||(d[P]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),c[e]=[W,x]),d!==t)););return x-=i,x===r||x%r===0&&x/r>=0}}},PSEUDO:function(e,n){var i,o=T.pseudos[e]||T.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[P]?o(n):o.length>1?(i=[e,e,"",n],T.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)r=ee(e,i[a]),e[r]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=k(e.replace(se,"$1"));return i[P]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(be,we),function(t){return(t.textContent||t.innerText||C(t)).indexOf(e)>-1}}),lang:r(function(e){return de.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(be,we).toLowerCase(),function(t){var n;do if(n=_?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===q},focus:function(e){return e===H.activeElement&&(!H.hasFocus||H.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!T.pseudos.empty(e)},header:function(e){return ge.test(e.nodeName)},input:function(e){return he.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:l(function(){return[0]}),last:l(function(e,t){return[t-1]}),eq:l(function(e,t,n){return[n<0?n+t:n]}),even:l(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:l(function(e,t,n){for(var r=n<0?n+t:n;++r2&&"ID"===(a=o[0]).type&&w.getById&&9===t.nodeType&&_&&T.relative[o[1].type]){if(t=(T.find.ID(a.matches[0].replace(be,we),t)||[])[0],!t)return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=pe.needsContext.test(e)?0:o.length;i--&&(a=o[i],!T.relative[s=a.type]);)if((u=T.find[s])&&(r=u(a.matches[0].replace(be,we),ve.test(o[0].type)&&c(t.parentNode)||t))){if(o.splice(i,1),e=r.length&&d(o),!e)return Q.apply(n,r),n;break}}return(l||k(e,f))(r,t,!_,n,!t||ve.test(e)&&c(t.parentNode)||t),n},w.sortStable=P.split("").sort(U).join("")===P,w.detectDuplicates=!!j,L(),w.sortDetached=i(function(e){return 1&e.compareDocumentPosition(H.createElement("div"))}),i(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),w.attributes&&i(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(te,function(e,t,n){var r;if(!n)return e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);pe.find=ve,pe.expr=ve.selectors,pe.expr[":"]=pe.expr.pseudos,pe.uniqueSort=pe.unique=ve.uniqueSort,pe.text=ve.getText,pe.isXMLDoc=ve.isXML,pe.contains=ve.contains;var xe=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&pe(e).is(n))break;r.push(e)}return r},be=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},we=pe.expr.match.needsContext,Te=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,Ce=/^.[^:#\[\.,]*$/;pe.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?pe.find.matchesSelector(r,e)?[r]:[]:pe.find.matches(e,pe.grep(t,function(e){return 1===e.nodeType}))},pe.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(pe(e).filter(function(){for(t=0;t1?pe.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},filter:function(e){return this.pushStack(r(this,e||[],!1))},not:function(e){return this.pushStack(r(this,e||[],!0))},is:function(e){return!!r(this,"string"==typeof e&&we.test(e)?pe(e):e||[],!1).length}});var Ee,Ne=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,ke=pe.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||Ee,"string"==typeof e){if(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:Ne.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof pe?t[0]:t,pe.merge(this,pe.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:re,!0)),Te.test(r[1])&&pe.isPlainObject(t))for(r in t)pe.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}if(i=re.getElementById(r[2]),i&&i.parentNode){if(i.id!==r[2])return Ee.find(e);this.length=1,this[0]=i}return this.context=re,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):pe.isFunction(e)?"undefined"!=typeof n.ready?n.ready(e):e(pe):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),pe.makeArray(e,this))};ke.prototype=pe.fn,Ee=pe(re);var Se=/^(?:parents|prev(?:Until|All))/,Ae={children:!0,contents:!0,next:!0,prev:!0};pe.fn.extend({has:function(e){var t,n=pe(e,this),r=n.length;return this.filter(function(){for(t=0;t-1:1===n.nodeType&&pe.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?pe.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?pe.inArray(this[0],pe(e)):pe.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(pe.uniqueSort(pe.merge(this.get(),pe(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),pe.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return xe(e,"parentNode")},parentsUntil:function(e,t,n){return xe(e,"parentNode",n)},next:function(e){return i(e,"nextSibling")},prev:function(e){return i(e,"previousSibling")},nextAll:function(e){return xe(e,"nextSibling")},prevAll:function(e){return xe(e,"previousSibling")},nextUntil:function(e,t,n){return xe(e,"nextSibling",n)},prevUntil:function(e,t,n){return xe(e,"previousSibling",n)},siblings:function(e){return be((e.parentNode||{}).firstChild,e)},children:function(e){return be(e.firstChild)},contents:function(e){return pe.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:pe.merge([],e.childNodes)}},function(e,t){pe.fn[e]=function(n,r){var i=pe.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=pe.filter(r,i)),this.length>1&&(Ae[e]||(i=pe.uniqueSort(i)),Se.test(e)&&(i=i.reverse())),this.pushStack(i)}});var De=/\S+/g;pe.Callbacks=function(e){e="string"==typeof e?o(e):pe.extend({},e);var t,n,r,i,a=[],s=[],u=-1,l=function(){for(i=e.once,r=t=!0;s.length;u=-1)for(n=s.shift();++u-1;)a.splice(n,1),n<=u&&u--}),this},has:function(e){return e?pe.inArray(e,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return i=s=[],a=n="",this},disabled:function(){return!a},lock:function(){return i=!0,n||c.disable(),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=n||[],n=[e,n.slice?n.slice():n],s.push(n),t||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},pe.extend({Deferred:function(e){var t=[["resolve","done",pe.Callbacks("once memory"),"resolved"],["reject","fail",pe.Callbacks("once memory"),"rejected"],["notify","progress",pe.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return pe.Deferred(function(n){pe.each(t,function(t,o){var a=pe.isFunction(e[t])&&e[t];i[o[1]](function(){var e=a&&a.apply(this,arguments);e&&pe.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[o[0]+"With"](this===r?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?pe.extend(e,r):r}},i={};return r.pipe=r.then,pe.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,o=ie.call(arguments),a=o.length,s=1!==a||e&&pe.isFunction(e.promise)?a:0,u=1===s?e:pe.Deferred(),l=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?ie.call(arguments):i,r===t?u.notifyWith(n,r):--s||u.resolveWith(n,r)}};if(a>1)for(t=new Array(a),n=new Array(a),r=new Array(a);i0||(je.resolveWith(re,[pe]),pe.fn.triggerHandler&&(pe(re).triggerHandler("ready"),pe(re).off("ready"))))}}),pe.ready.promise=function(t){if(!je)if(je=pe.Deferred(),"complete"===re.readyState||"loading"!==re.readyState&&!re.documentElement.doScroll)e.setTimeout(pe.ready);else if(re.addEventListener)re.addEventListener("DOMContentLoaded",s),e.addEventListener("load",s);else{re.attachEvent("onreadystatechange",s),e.attachEvent("onload",s);var n=!1;try{n=null==e.frameElement&&re.documentElement}catch(r){}n&&n.doScroll&&!function i(){if(!pe.isReady){try{n.doScroll("left")}catch(t){return e.setTimeout(i,50)}a(),pe.ready()}}()}return je.promise(t)},pe.ready.promise();var Le;for(Le in pe(fe))break;fe.ownFirst="0"===Le,fe.inlineBlockNeedsLayout=!1,pe(function(){var e,t,n,r;n=re.getElementsByTagName("body")[0],n&&n.style&&(t=re.createElement("div"),r=re.createElement("div"),r.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(r).appendChild(t),"undefined"!=typeof t.style.zoom&&(t.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",fe.inlineBlockNeedsLayout=e=3===t.offsetWidth,e&&(n.style.zoom=1)),n.removeChild(r))}),function(){var e=re.createElement("div");fe.deleteExpando=!0;try{delete e.test}catch(t){fe.deleteExpando=!1}e=null}();var He=function(e){var t=pe.noData[(e.nodeName+" ").toLowerCase()],n=+e.nodeType||1;return(1===n||9===n)&&(!t||t!==!0&&e.getAttribute("classid")===t)},qe=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,_e=/([A-Z])/g;pe.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?pe.cache[e[pe.expando]]:e[pe.expando],!!e&&!l(e)},data:function(e,t,n){return c(e,t,n)},removeData:function(e,t){return f(e,t)},_data:function(e,t,n){return c(e,t,n,!0)},_removeData:function(e,t){return f(e,t,!0)}}),pe.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=pe.data(o),1===o.nodeType&&!pe._data(o,"parsedAttrs"))){for(n=a.length;n--;)a[n]&&(r=a[n].name,0===r.indexOf("data-")&&(r=pe.camelCase(r.slice(5)),u(o,r,i[r])));pe._data(o,"parsedAttrs",!0)}return i}return"object"==typeof e?this.each(function(){pe.data(this,e)}):arguments.length>1?this.each(function(){pe.data(this,e,t)}):o?u(o,e,pe.data(o,e)):void 0},removeData:function(e){return this.each(function(){pe.removeData(this,e)})}}),pe.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=pe._data(e,t),n&&(!r||pe.isArray(n)?r=pe._data(e,t,pe.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=pe.queue(e,t),r=n.length,i=n.shift(),o=pe._queueHooks(e,t),a=function(){pe.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return pe._data(e,n)||pe._data(e,n,{empty:pe.Callbacks("once memory").add(function(){pe._removeData(e,t+"queue"),pe._removeData(e,n)})})}}),pe.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length
        a",fe.leadingWhitespace=3===e.firstChild.nodeType,fe.tbody=!e.getElementsByTagName("tbody").length,fe.htmlSerialize=!!e.getElementsByTagName("link").length,fe.html5Clone="<:nav>"!==re.createElement("nav").cloneNode(!0).outerHTML,n.type="checkbox",n.checked=!0,t.appendChild(n),fe.appendChecked=n.checked,e.innerHTML="",fe.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue,t.appendChild(e),n=re.createElement("input"),n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),e.appendChild(n),fe.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,fe.noCloneEvent=!!e.addEventListener,e[pe.expando]=1,fe.attributes=!e.getAttribute(pe.expando)}();var Xe={option:[1,""],legend:[1,"
        ","
        "],area:[1,"",""],param:[1,"",""],thead:[1,"","
        "],tr:[2,"","
        "],col:[2,"","
        "],td:[3,"","
        "],_default:fe.htmlSerialize?[0,"",""]:[1,"X
        ","
        "]};Xe.optgroup=Xe.option,Xe.tbody=Xe.tfoot=Xe.colgroup=Xe.caption=Xe.thead,Xe.th=Xe.td;var Ue=/<|&#?\w+;/,Ve=/-1&&(h=p.split("."),p=h.shift(),h.sort()),a=p.indexOf(":")<0&&"on"+p,t=t[pe.expando]?t:new pe.Event(p,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=h.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:pe.makeArray(n,[t]),l=pe.event.special[p]||{},i||!l.trigger||l.trigger.apply(r,n)!==!1)){if(!i&&!l.noBubble&&!pe.isWindow(r)){for(u=l.delegateType||p,Ke.test(u+p)||(s=s.parentNode);s;s=s.parentNode)d.push(s),c=s;c===(r.ownerDocument||re)&&d.push(c.defaultView||c.parentWindow||e)}for(f=0;(s=d[f++])&&!t.isPropagationStopped();)t.type=f>1?u:l.bindType||p,o=(pe._data(s,"events")||{})[t.type]&&pe._data(s,"handle"),o&&o.apply(s,n),o=a&&s[a],o&&o.apply&&He(s)&&(t.result=o.apply(s,n),t.result===!1&&t.preventDefault());if(t.type=p,!i&&!t.isDefaultPrevented()&&(!l._default||l._default.apply(d.pop(),n)===!1)&&He(r)&&a&&r[p]&&!pe.isWindow(r)){c=r[a],c&&(r[a]=null),pe.event.triggered=p;try{r[p]()}catch(g){}pe.event.triggered=void 0,c&&(r[a]=c)}return t.result}},dispatch:function(e){e=pe.event.fix(e);var t,n,r,i,o,a=[],s=ie.call(arguments),u=(pe._data(this,"events")||{})[e.type]||[],l=pe.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!l.preDispatch||l.preDispatch.call(this,e)!==!1){for(a=pe.event.handlers.call(this,e,u),t=0;(i=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!e.isImmediatePropagationStopped();)e.rnamespace&&!e.rnamespace.test(o.namespace)||(e.handleObj=o,e.data=o.data,r=((pe.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s),void 0!==r&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,a=[],s=t.delegateCount,u=e.target;if(s&&u.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(r=[],n=0;n-1:pe.find(i,this,null,[u]).length),r[i]&&r.push(o);r.length&&a.push({elem:u,handlers:r})}return s]","i"),tt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,nt=/\s*$/g,at=p(re),st=at.appendChild(re.createElement("div"));pe.extend({htmlPrefilter:function(e){return e.replace(tt,"<$1>")},clone:function(e,t,n){var r,i,o,a,s,u=pe.contains(e.ownerDocument,e);if(fe.html5Clone||pe.isXMLDoc(e)||!et.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(st.innerHTML=e.outerHTML,st.removeChild(o=st.firstChild)),!(fe.noCloneEvent&&fe.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||pe.isXMLDoc(e)))for(r=h(o),s=h(e),a=0;null!=(i=s[a]);++a)r[a]&&k(i,r[a]);if(t)if(n)for(s=s||h(e),r=r||h(o),a=0;null!=(i=s[a]);a++)N(i,r[a]);else N(e,o);return r=h(o,"script"),r.length>0&&g(r,!u&&h(e,"script")),r=s=i=null,o},cleanData:function(e,t){for(var n,r,i,o,a=0,s=pe.expando,u=pe.cache,l=fe.attributes,c=pe.event.special;null!=(n=e[a]);a++)if((t||He(n))&&(i=n[s],o=i&&u[i])){if(o.events)for(r in o.events)c[r]?pe.event.remove(n,r):pe.removeEvent(n,r,o.handle);u[i]&&(delete u[i],l||"undefined"==typeof n.removeAttribute?n[s]=void 0:n.removeAttribute(s),ne.push(i))}}}),pe.fn.extend({domManip:S,detach:function(e){return A(this,e,!0)},remove:function(e){return A(this,e)},text:function(e){return Pe(this,function(e){return void 0===e?pe.text(this):this.empty().append((this[0]&&this[0].ownerDocument||re).createTextNode(e))},null,e,arguments.length)},append:function(){return S(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=T(this,e);t.appendChild(e)}})},prepend:function(){return S(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=T(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return S(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return S(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&pe.cleanData(h(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&pe.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return pe.clone(this,e,t)})},html:function(e){return Pe(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e)return 1===t.nodeType?t.innerHTML.replace(Ze,""):void 0;if("string"==typeof e&&!nt.test(e)&&(fe.htmlSerialize||!et.test(e))&&(fe.leadingWhitespace||!$e.test(e))&&!Xe[(We.exec(e)||["",""])[1].toLowerCase()]){e=pe.htmlPrefilter(e);try{for(;nt",t=l.getElementsByTagName("td"),t[0].style.cssText="margin:0;border:0;padding:0;display:none",o=0===t[0].offsetHeight,o&&(t[0].style.display="",t[1].style.display="none",o=0===t[0].offsetHeight)),f.removeChild(u)}var n,r,i,o,a,s,u=re.createElement("div"),l=re.createElement("div");l.style&&(l.style.cssText="float:left;opacity:.5",fe.opacity="0.5"===l.style.opacity,fe.cssFloat=!!l.style.cssFloat,l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",fe.clearCloneStyle="content-box"===l.style.backgroundClip,u=re.createElement("div"),u.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",l.innerHTML="",u.appendChild(l),fe.boxSizing=""===l.style.boxSizing||""===l.style.MozBoxSizing||""===l.style.WebkitBoxSizing,pe.extend(fe,{reliableHiddenOffsets:function(){return null==n&&t(),o},boxSizingReliable:function(){return null==n&&t(),i},pixelMarginRight:function(){return null==n&&t(),r},pixelPosition:function(){return null==n&&t(),n},reliableMarginRight:function(){return null==n&&t(),a},reliableMarginLeft:function(){return null==n&&t(),s}}))}();var ht,gt,mt=/^(top|right|bottom|left)$/;e.getComputedStyle?(ht=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},gt=function(e,t,n){var r,i,o,a,s=e.style;return n=n||ht(e),a=n?n.getPropertyValue(t)||n[t]:void 0,""!==a&&void 0!==a||pe.contains(e.ownerDocument,e)||(a=pe.style(e,t)),n&&!fe.pixelMarginRight()&&ft.test(a)&&ct.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o),void 0===a?a:a+""}):pt.currentStyle&&(ht=function(e){return e.currentStyle},gt=function(e,t,n){var r,i,o,a,s=e.style;return n=n||ht(e),a=n?n[t]:void 0,null==a&&s&&s[t]&&(a=s[t]),ft.test(a)&&!mt.test(t)&&(r=s.left,i=e.runtimeStyle,o=i&&i.left,o&&(i.left=e.currentStyle.left),s.left="fontSize"===t?"1em":a,a=s.pixelLeft+"px",s.left=r,o&&(i.left=o)),void 0===a?a:a+""||"auto"});var yt=/alpha\([^)]*\)/i,vt=/opacity\s*=\s*([^)]*)/i,xt=/^(none|table(?!-c[ea]).+)/,bt=new RegExp("^("+Fe+")(.*)$","i"),wt={position:"absolute",visibility:"hidden",display:"block"},Tt={letterSpacing:"0",fontWeight:"400"},Ct=["Webkit","O","Moz","ms"],Et=re.createElement("div").style;pe.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=gt(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":fe.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=pe.camelCase(t),u=e.style;if(t=pe.cssProps[s]||(pe.cssProps[s]=H(s)||s),a=pe.cssHooks[t]||pe.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:u[t];if(o=typeof n,"string"===o&&(i=Me.exec(n))&&i[1]&&(n=d(e,t,i),o="number"),null!=n&&n===n&&("number"===o&&(n+=i&&i[3]||(pe.cssNumber[s]?"":"px")),fe.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),!(a&&"set"in a&&void 0===(n=a.set(e,n,r)))))try{u[t]=n}catch(l){}}},css:function(e,t,n,r){var i,o,a,s=pe.camelCase(t);return t=pe.cssProps[s]||(pe.cssProps[s]=H(s)||s),a=pe.cssHooks[t]||pe.cssHooks[s],a&&"get"in a&&(o=a.get(e,!0,n)),void 0===o&&(o=gt(e,t,r)),"normal"===o&&t in Tt&&(o=Tt[t]),""===n||n?(i=parseFloat(o),n===!0||isFinite(i)?i||0:o):o}}),pe.each(["height","width"],function(e,t){pe.cssHooks[t]={get:function(e,n,r){if(n)return xt.test(pe.css(e,"display"))&&0===e.offsetWidth?dt(e,wt,function(){return M(e,t,r)}):M(e,t,r)},set:function(e,n,r){var i=r&&ht(e);return _(e,n,r?F(e,t,r,fe.boxSizing&&"border-box"===pe.css(e,"boxSizing",!1,i),i):0)}}}),fe.opacity||(pe.cssHooks.opacity={get:function(e,t){return vt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=pe.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===pe.trim(o.replace(yt,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=yt.test(o)?o.replace(yt,i):o+" "+i)}}),pe.cssHooks.marginRight=L(fe.reliableMarginRight,function(e,t){if(t)return dt(e,{display:"inline-block"},gt,[e,"marginRight"])}),pe.cssHooks.marginLeft=L(fe.reliableMarginLeft,function(e,t){if(t)return(parseFloat(gt(e,"marginLeft"))||(pe.contains(e.ownerDocument,e)?e.getBoundingClientRect().left-dt(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}):0))+"px"}),pe.each({margin:"",padding:"",border:"Width"},function(e,t){pe.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+Oe[r]+t]=o[r]||o[r-2]||o[0];return i}},ct.test(e)||(pe.cssHooks[e+t].set=_)}),pe.fn.extend({css:function(e,t){return Pe(this,function(e,t,n){var r,i,o={},a=0;if(pe.isArray(t)){for(r=ht(e),i=t.length;a1)},show:function(){return q(this,!0)},hide:function(){return q(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Re(this)?pe(this).show():pe(this).hide()})}}),pe.Tween=O,O.prototype={constructor:O,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||pe.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(pe.cssNumber[n]?"":"px")},cur:function(){var e=O.propHooks[this.prop];return e&&e.get?e.get(this):O.propHooks._default.get(this)},run:function(e){var t,n=O.propHooks[this.prop];return this.options.duration?this.pos=t=pe.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):O.propHooks._default.set(this),this}},O.prototype.init.prototype=O.prototype,O.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=pe.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){pe.fx.step[e.prop]?pe.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[pe.cssProps[e.prop]]&&!pe.cssHooks[e.prop]?e.elem[e.prop]=e.now:pe.style(e.elem,e.prop,e.now+e.unit)}}},O.propHooks.scrollTop=O.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},pe.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},pe.fx=O.prototype.init,pe.fx.step={};var Nt,kt,St=/^(?:toggle|show|hide)$/,At=/queueHooks$/;pe.Animation=pe.extend($,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return d(n.elem,e,Me.exec(t),n),n}]},tweener:function(e,t){pe.isFunction(e)?(t=e,e=["*"]):e=e.match(De);for(var n,r=0,i=e.length;r
        a",e=n.getElementsByTagName("a")[0],t.setAttribute("type","checkbox"),n.appendChild(t),e=n.getElementsByTagName("a")[0],e.style.cssText="top:1px",fe.getSetAttribute="t"!==n.className,fe.style=/top/.test(e.getAttribute("style")),fe.hrefNormalized="/a"===e.getAttribute("href"),fe.checkOn=!!t.value,fe.optSelected=i.selected,fe.enctype=!!re.createElement("form").enctype,r.disabled=!0,fe.optDisabled=!i.disabled,t=re.createElement("input"),t.setAttribute("value",""),fe.input=""===t.getAttribute("value"),t.value="t",t.setAttribute("type","radio"),fe.radioValue="t"===t.value}();var Dt=/\r/g,jt=/[\x20\t\r\n\f]+/g;pe.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=pe.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,pe(this).val()):e,null==i?i="":"number"==typeof i?i+="":pe.isArray(i)&&(i=pe.map(i,function(e){return null==e?"":e+""})),t=pe.valHooks[this.type]||pe.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return t=pe.valHooks[i.type]||pe.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(Dt,""):null==n?"":n)}}}),pe.extend({valHooks:{option:{get:function(e){var t=pe.find.attr(e,"value");return null!=t?t:pe.trim(pe.text(e)).replace(jt," ")}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||i<0,a=o?null:[],s=o?i+1:r.length,u=i<0?s:o?i:0;u-1)try{r.selected=n=!0}catch(s){r.scrollHeight}else r.selected=!1;return n||(e.selectedIndex=-1),i}}}}),pe.each(["radio","checkbox"],function(){pe.valHooks[this]={set:function(e,t){if(pe.isArray(t))return e.checked=pe.inArray(pe(e).val(),t)>-1}},fe.checkOn||(pe.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Lt,Ht,qt=pe.expr.attrHandle,_t=/^(?:checked|selected)$/i,Ft=fe.getSetAttribute,Mt=fe.input;pe.fn.extend({attr:function(e,t){return Pe(this,pe.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){pe.removeAttr(this,e)})}}),pe.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?pe.prop(e,t,n):(1===o&&pe.isXMLDoc(e)||(t=t.toLowerCase(),i=pe.attrHooks[t]||(pe.expr.match.bool.test(t)?Ht:Lt)),void 0!==n?null===n?void pe.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=pe.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!fe.radioValue&&"radio"===t&&pe.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(De);if(o&&1===e.nodeType)for(;n=o[i++];)r=pe.propFix[n]||n,pe.expr.match.bool.test(n)?Mt&&Ft||!_t.test(n)?e[r]=!1:e[pe.camelCase("default-"+n)]=e[r]=!1:pe.attr(e,n,""),e.removeAttribute(Ft?n:r)}}),Ht={set:function(e,t,n){return t===!1?pe.removeAttr(e,n):Mt&&Ft||!_t.test(n)?e.setAttribute(!Ft&&pe.propFix[n]||n,n):e[pe.camelCase("default-"+n)]=e[n]=!0,n}},pe.each(pe.expr.match.bool.source.match(/\w+/g),function(e,t){var n=qt[t]||pe.find.attr;Mt&&Ft||!_t.test(t)?qt[t]=function(e,t,r){var i,o;return r||(o=qt[t],qt[t]=i,i=null!=n(e,t,r)?t.toLowerCase():null,qt[t]=o),i}:qt[t]=function(e,t,n){if(!n)return e[pe.camelCase("default-"+t)]?t.toLowerCase():null}}),Mt&&Ft||(pe.attrHooks.value={set:function(e,t,n){return pe.nodeName(e,"input")?void(e.defaultValue=t):Lt&&Lt.set(e,t,n)}}),Ft||(Lt={set:function(e,t,n){var r=e.getAttributeNode(n);if(r||e.setAttributeNode(r=e.ownerDocument.createAttribute(n)),r.value=t+="","value"===n||t===e.getAttribute(n))return t}},qt.id=qt.name=qt.coords=function(e,t,n){var r;if(!n)return(r=e.getAttributeNode(t))&&""!==r.value?r.value:null},pe.valHooks.button={get:function(e,t){var n=e.getAttributeNode(t);if(n&&n.specified)return n.value},set:Lt.set},pe.attrHooks.contenteditable={set:function(e,t,n){Lt.set(e,""!==t&&t,n)}},pe.each(["width","height"],function(e,t){pe.attrHooks[t]={set:function(e,n){if(""===n)return e.setAttribute(t,"auto"),n}}})),fe.style||(pe.attrHooks.style={get:function(e){return e.style.cssText||void 0},set:function(e,t){return e.style.cssText=t+""}});var Ot=/^(?:input|select|textarea|button|object)$/i,Rt=/^(?:a|area)$/i;pe.fn.extend({prop:function(e,t){return Pe(this,pe.prop,e,t,arguments.length>1)},removeProp:function(e){return e=pe.propFix[e]||e,this.each(function(){try{this[e]=void 0,delete this[e]}catch(t){}})}}),pe.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&pe.isXMLDoc(e)||(t=pe.propFix[t]||t,i=pe.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=pe.find.attr(e,"tabindex");return t?parseInt(t,10):Ot.test(e.nodeName)||Rt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),fe.hrefNormalized||pe.each(["href","src"],function(e,t){pe.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),fe.optSelected||(pe.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),pe.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){pe.propFix[this.toLowerCase()]=this}),fe.enctype||(pe.propFix.enctype="encoding");var Pt=/[\t\r\n\f]/g;pe.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(pe.isFunction(e))return this.each(function(t){pe(this).addClass(e.call(this,t,z(this)))});if("string"==typeof e&&e)for(t=e.match(De)||[];n=this[u++];)if(i=z(n),r=1===n.nodeType&&(" "+i+" ").replace(Pt," ")){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");s=pe.trim(r),i!==s&&pe.attr(n,"class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(pe.isFunction(e))return this.each(function(t){pe(this).removeClass(e.call(this,t,z(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(De)||[];n=this[u++];)if(i=z(n),r=1===n.nodeType&&(" "+i+" ").replace(Pt," ")){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");s=pe.trim(r),i!==s&&pe.attr(n,"class",s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):pe.isFunction(e)?this.each(function(n){pe(this).toggleClass(e.call(this,n,z(this),t),t)}):this.each(function(){var t,r,i,o;if("string"===n)for(r=0,i=pe(this),o=e.match(De)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||(t=z(this),t&&pe._data(this,"__className__",t),pe.attr(this,"class",t||e===!1?"":pe._data(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+z(n)+" ").replace(Pt," ").indexOf(t)>-1)return!0;return!1}}),pe.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){pe.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),pe.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}});var Bt=e.location,Wt=pe.now(),It=/\?/,$t=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;pe.parseJSON=function(t){if(e.JSON&&e.JSON.parse)return e.JSON.parse(t+"");var n,r=null,i=pe.trim(t+"");return i&&!pe.trim(i.replace($t,function(e,t,i,o){return n&&t&&(r=0),0===r?e:(n=i||t,r+=!o-!i,"")}))?Function("return "+i)():pe.error("Invalid JSON: "+t)},pe.parseXML=function(t){var n,r;if(!t||"string"!=typeof t)return null;try{e.DOMParser?(r=new e.DOMParser,n=r.parseFromString(t,"text/xml")):(n=new e.ActiveXObject("Microsoft.XMLDOM"),n.async="false",n.loadXML(t))}catch(i){n=void 0}return n&&n.documentElement&&!n.getElementsByTagName("parsererror").length||pe.error("Invalid XML: "+t),n};var zt=/#.*$/,Xt=/([?&])_=[^&]*/,Ut=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Vt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Yt=/^(?:GET|HEAD)$/,Jt=/^\/\//,Gt=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Kt={},Qt={},Zt="*/".concat("*"),en=Bt.href,tn=Gt.exec(en.toLowerCase())||[];pe.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:en,type:"GET",isLocal:Vt.test(tn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Zt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":pe.parseJSON,"text xml":pe.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?V(V(e,pe.ajaxSettings),t):V(pe.ajaxSettings,e)},ajaxPrefilter:X(Kt),ajaxTransport:X(Qt),ajax:function(t,n){function r(t,n,r,i){var o,f,v,x,w,C=n;2!==b&&(b=2,u&&e.clearTimeout(u),c=void 0,s=i||"",T.readyState=t>0?4:0,o=t>=200&&t<300||304===t,r&&(x=Y(d,T,r)),x=J(d,x,T,o),o?(d.ifModified&&(w=T.getResponseHeader("Last-Modified"),w&&(pe.lastModified[a]=w),w=T.getResponseHeader("etag"),w&&(pe.etag[a]=w)),204===t||"HEAD"===d.type?C="nocontent":304===t?C="notmodified":(C=x.state,f=x.data,v=x.error,o=!v)):(v=C,!t&&C||(C="error",t<0&&(t=0))),T.status=t,T.statusText=(n||C)+"",o?g.resolveWith(p,[f,C,T]):g.rejectWith(p,[T,C,v]),T.statusCode(y),y=void 0,l&&h.trigger(o?"ajaxSuccess":"ajaxError",[T,d,o?f:v]),m.fireWith(p,[T,C]),l&&(h.trigger("ajaxComplete",[T,d]),--pe.active||pe.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,a,s,u,l,c,f,d=pe.ajaxSetup({},n),p=d.context||d,h=d.context&&(p.nodeType||p.jquery)?pe(p):pe.event,g=pe.Deferred(),m=pe.Callbacks("once memory"),y=d.statusCode||{},v={},x={},b=0,w="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!f)for(f={};t=Ut.exec(s);)f[t[1].toLowerCase()]=t[2];t=f[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?s:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=x[n]=x[n]||e,v[e]=t),this},overrideMimeType:function(e){return b||(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(b<2)for(t in e)y[t]=[y[t],e[t]];else T.always(e[T.status]);return this},abort:function(e){var t=e||w;return c&&c.abort(t),r(0,t),this}};if(g.promise(T).complete=m.add,T.success=T.done,T.error=T.fail,d.url=((t||d.url||en)+"").replace(zt,"").replace(Jt,tn[1]+"//"),d.type=n.method||n.type||d.method||d.type,d.dataTypes=pe.trim(d.dataType||"*").toLowerCase().match(De)||[""],null==d.crossDomain&&(i=Gt.exec(d.url.toLowerCase()),d.crossDomain=!(!i||i[1]===tn[1]&&i[2]===tn[2]&&(i[3]||("http:"===i[1]?"80":"443"))===(tn[3]||("http:"===tn[1]?"80":"443")))),d.data&&d.processData&&"string"!=typeof d.data&&(d.data=pe.param(d.data,d.traditional)),U(Kt,d,n,T),2===b)return T;l=pe.event&&d.global,l&&0===pe.active++&&pe.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Yt.test(d.type),a=d.url,d.hasContent||(d.data&&(a=d.url+=(It.test(a)?"&":"?")+d.data,delete d.data),d.cache===!1&&(d.url=Xt.test(a)?a.replace(Xt,"$1_="+Wt++):a+(It.test(a)?"&":"?")+"_="+Wt++)),d.ifModified&&(pe.lastModified[a]&&T.setRequestHeader("If-Modified-Since",pe.lastModified[a]),pe.etag[a]&&T.setRequestHeader("If-None-Match",pe.etag[a])),(d.data&&d.hasContent&&d.contentType!==!1||n.contentType)&&T.setRequestHeader("Content-Type",d.contentType),T.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+Zt+"; q=0.01":""):d.accepts["*"]);for(o in d.headers)T.setRequestHeader(o,d.headers[o]);if(d.beforeSend&&(d.beforeSend.call(p,T,d)===!1||2===b))return T.abort();w="abort";for(o in{success:1,error:1,complete:1})T[o](d[o]);if(c=U(Qt,d,n,T)){if(T.readyState=1,l&&h.trigger("ajaxSend",[T,d]),2===b)return T;d.async&&d.timeout>0&&(u=e.setTimeout(function(){T.abort("timeout")},d.timeout));try{b=1,c.send(v,r)}catch(C){if(!(b<2))throw C;r(-1,C)}}else r(-1,"No Transport");return T},getJSON:function(e,t,n){return pe.get(e,t,n,"json")},getScript:function(e,t){return pe.get(e,void 0,t,"script")}}),pe.each(["get","post"],function(e,t){pe[t]=function(e,n,r,i){return pe.isFunction(n)&&(i=i||r,r=n,n=void 0),pe.ajax(pe.extend({url:e,type:t,dataType:i,data:n,success:r},pe.isPlainObject(e)&&e))}}),pe._evalUrl=function(e){return pe.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},pe.fn.extend({wrapAll:function(e){if(pe.isFunction(e))return this.each(function(t){pe(this).wrapAll(e.call(this,t))});if(this[0]){var t=pe(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return pe.isFunction(e)?this.each(function(t){pe(this).wrapInner(e.call(this,t))}):this.each(function(){var t=pe(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=pe.isFunction(e);return this.each(function(n){pe(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){pe.nodeName(this,"body")||pe(this).replaceWith(this.childNodes)}).end()}}),pe.expr.filters.hidden=function(e){return fe.reliableHiddenOffsets()?e.offsetWidth<=0&&e.offsetHeight<=0&&!e.getClientRects().length:K(e)},pe.expr.filters.visible=function(e){return!pe.expr.filters.hidden(e)};var nn=/%20/g,rn=/\[\]$/,on=/\r?\n/g,an=/^(?:submit|button|image|reset|file)$/i,sn=/^(?:input|select|textarea|keygen)/i;pe.param=function(e,t){var n,r=[],i=function(e,t){t=pe.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=pe.ajaxSettings&&pe.ajaxSettings.traditional),pe.isArray(e)||e.jquery&&!pe.isPlainObject(e))pe.each(e,function(){i(this.name,this.value)});else for(n in e)Q(n,e[n],t,i);return r.join("&").replace(nn,"+")},pe.fn.extend({serialize:function(){return pe.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=pe.prop(this,"elements");return e?pe.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!pe(this).is(":disabled")&&sn.test(this.nodeName)&&!an.test(e)&&(this.checked||!Be.test(e))}).map(function(e,t){var n=pe(this).val();return null==n?null:pe.isArray(n)?pe.map(n,function(e){return{name:t.name,value:e.replace(on,"\r\n")}}):{name:t.name,value:n.replace(on,"\r\n")}}).get()}}),pe.ajaxSettings.xhr=void 0!==e.ActiveXObject?function(){return this.isLocal?ee():re.documentMode>8?Z():/^(get|post|head|put|delete|options)$/i.test(this.type)&&Z()||ee()}:Z;var un=0,ln={},cn=pe.ajaxSettings.xhr();e.attachEvent&&e.attachEvent("onunload",function(){for(var e in ln)ln[e](void 0,!0)}),fe.cors=!!cn&&"withCredentials"in cn,cn=fe.ajax=!!cn,cn&&pe.ajaxTransport(function(t){if(!t.crossDomain||fe.cors){var n;return{send:function(r,i){var o,a=t.xhr(),s=++un;if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)a[o]=t.xhrFields[o];t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(o in r)void 0!==r[o]&&a.setRequestHeader(o,r[o]+"");a.send(t.hasContent&&t.data||null),n=function(e,r){var o,u,l;if(n&&(r||4===a.readyState))if(delete ln[s],n=void 0,a.onreadystatechange=pe.noop,r)4!==a.readyState&&a.abort();else{l={},o=a.status,"string"==typeof a.responseText&&(l.text=a.responseText);try{u=a.statusText}catch(c){u=""}o||!t.isLocal||t.crossDomain?1223===o&&(o=204):o=l.text?200:404}l&&i(o,u,l,a.getAllResponseHeaders())},t.async?4===a.readyState?e.setTimeout(n):a.onreadystatechange=ln[s]=n:n()},abort:function(){n&&n(void 0,!0)}}}}),pe.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return pe.globalEval(e),e}}}),pe.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),pe.ajaxTransport("script",function(e){if(e.crossDomain){var t,n=re.head||pe("head")[0]||re.documentElement;return{send:function(r,i){t=re.createElement("script"),t.async=!0,e.scriptCharset&&(t.charset=e.scriptCharset),t.src=e.url,t.onload=t.onreadystatechange=function(e,n){(n||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,n||i(200,"success"))},n.insertBefore(t,n.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}});var fn=[],dn=/(=)\?(?=&|$)|\?\?/;pe.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=fn.pop()||pe.expando+"_"+Wt++;return this[e]=!0,e}}),pe.ajaxPrefilter("json jsonp",function(t,n,r){var i,o,a,s=t.jsonp!==!1&&(dn.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&dn.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=pe.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(dn,"$1"+i):t.jsonp!==!1&&(t.url+=(It.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||pe.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){a=arguments},r.always(function(){void 0===o?pe(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,fn.push(i)),a&&pe.isFunction(o)&&o(a[0]),a=o=void 0}),"script"}),pe.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||re;var r=Te.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=y([e],t,i),i&&i.length&&pe(i).remove(),pe.merge([],r.childNodes))};var pn=pe.fn.load;return pe.fn.load=function(e,t,n){if("string"!=typeof e&&pn)return pn.apply(this,arguments);var r,i,o,a=this,s=e.indexOf(" ");return s>-1&&(r=pe.trim(e.slice(s,e.length)),e=e.slice(0,s)),pe.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&pe.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?pe("
        ").append(pe.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},pe.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){pe.fn[t]=function(e){return this.on(t,e)}}),pe.expr.filters.animated=function(e){return pe.grep(pe.timers,function(t){return e===t.elem}).length},pe.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l,c=pe.css(e,"position"),f=pe(e),d={};"static"===c&&(e.style.position="relative"),s=f.offset(),o=pe.css(e,"top"),u=pe.css(e,"left"),l=("absolute"===c||"fixed"===c)&&pe.inArray("auto",[o,u])>-1,l?(r=f.position(),a=r.top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),pe.isFunction(t)&&(t=t.call(e,n,pe.extend({},s))),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+i),"using"in t?t.using.call(e,d):f.css(d)}},pe.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){pe.offset.setOffset(this,e,t)});var t,n,r={top:0,left:0},i=this[0],o=i&&i.ownerDocument;if(o)return t=o.documentElement,pe.contains(t,i)?("undefined"!=typeof i.getBoundingClientRect&&(r=i.getBoundingClientRect()),n=te(o),{top:r.top+(n.pageYOffset||t.scrollTop)-(t.clientTop||0),left:r.left+(n.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):r},position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===pe.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),pe.nodeName(e[0],"html")||(n=e.offset()),n.top+=pe.css(e[0],"borderTopWidth",!0),n.left+=pe.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-pe.css(r,"marginTop",!0),left:t.left-n.left-pe.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){ +for(var e=this.offsetParent;e&&!pe.nodeName(e,"html")&&"static"===pe.css(e,"position");)e=e.offsetParent;return e||pt})}}),pe.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n=/Y/.test(t);pe.fn[e]=function(r){return Pe(this,function(e,r,i){var o=te(e);return void 0===i?o?t in o?o[t]:o.document.documentElement[r]:e[r]:void(o?o.scrollTo(n?pe(o).scrollLeft():i,n?i:pe(o).scrollTop()):e[r]=i)},e,r,arguments.length,null)}}),pe.each(["top","left"],function(e,t){pe.cssHooks[t]=L(fe.pixelPosition,function(e,n){if(n)return n=gt(e,t),ft.test(n)?pe(e).position()[t]+"px":n})}),pe.each({Height:"height",Width:"width"},function(e,t){pe.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){pe.fn[r]=function(r,i){var o=arguments.length&&(n||"boolean"!=typeof r),a=n||(r===!0||i===!0?"margin":"border");return Pe(this,function(t,n,r){var i;return pe.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):void 0===r?pe.css(t,n,a):pe.style(t,n,r,a)},t,o?r:void 0,o,null)}})}),pe.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),pe.fn.size=function(){return this.length},pe.fn.andSelf=pe.fn.addBack,layui.define(function(e){layui.$=pe,e("jquery",pe)}),pe});!function(e,t){"use strict";var i,n,a=e.layui&&layui.define,o={getPath:function(){var e=document.currentScript?document.currentScript.src:function(){for(var e,t=document.scripts,i=t.length-1,n=i;n>0;n--)if("interactive"===t[n].readyState){e=t[n].src;break}return e||t[i].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),config:{},end:{},minIndex:0,minLeft:[],btn:["确定","取消"],type:["dialog","page","iframe","loading","tips"],getStyle:function(t,i){var n=t.currentStyle?t.currentStyle:e.getComputedStyle(t,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](i)},link:function(t,i,n){if(r.path){var a=document.getElementsByTagName("head")[0],s=document.createElement("link");"string"==typeof i&&(n=i);var l=(n||t).replace(/\.|\//g,""),f="layuicss-"+l,c=0;s.rel="stylesheet",s.href=r.path+t,s.id=f,document.getElementById(f)||a.appendChild(s),"function"==typeof i&&!function u(){return++c>80?e.console&&console.error("layer.css: Invalid"):void(1989===parseInt(o.getStyle(document.getElementById(f),"width"))?i():setTimeout(u,100))}()}}},r={v:"3.1.1",ie:function(){var t=navigator.userAgent.toLowerCase();return!!(e.ActiveXObject||"ActiveXObject"in e)&&((t.match(/msie\s(\d+)/)||[])[1]||"11")}(),index:e.layer&&e.layer.v?1e5:0,path:o.getPath,config:function(e,t){return e=e||{},r.cache=o.config=i.extend({},o.config,e),r.path=o.config.path||r.path,"string"==typeof e.extend&&(e.extend=[e.extend]),o.config.path&&r.ready(),e.extend?(a?layui.addcss("modules/layer/"+e.extend):o.link("theme/"+e.extend),this):this},ready:function(e){var t="layer",i="",n=(a?"modules/layer/":"theme/")+"default/layer.css?v="+r.v+i;return a?layui.addcss(n,e,t):o.link(n,e,t),this},alert:function(e,t,n){var a="function"==typeof t;return a&&(n=t),r.open(i.extend({content:e,yes:n},a?{}:t))},confirm:function(e,t,n,a){var s="function"==typeof t;return s&&(a=n,n=t),r.open(i.extend({content:e,btn:o.btn,yes:n,btn2:a},s?{}:t))},msg:function(e,n,a){var s="function"==typeof n,f=o.config.skin,c=(f?f+" "+f+"-msg":"")||"layui-layer-msg",u=l.anim.length-1;return s&&(a=n),r.open(i.extend({content:e,time:3e3,shade:!1,skin:c,title:!1,closeBtn:!1,btn:!1,resize:!1,end:a},s&&!o.config.skin?{skin:c+" layui-layer-hui",anim:u}:function(){return n=n||{},(n.icon===-1||n.icon===t&&!o.config.skin)&&(n.skin=c+" "+(n.skin||"layui-layer-hui")),n}()))},load:function(e,t){return r.open(i.extend({type:3,icon:e||0,resize:!1,shade:.01},t))},tips:function(e,t,n){return r.open(i.extend({type:4,content:[e,t],closeBtn:!1,time:3e3,shade:!1,resize:!1,fixed:!1,maxWidth:210},n))}},s=function(e){var t=this;t.index=++r.index,t.config=i.extend({},t.config,o.config,e),document.body?t.creat():setTimeout(function(){t.creat()},30)};s.pt=s.prototype;var l=["layui-layer",".layui-layer-title",".layui-layer-main",".layui-layer-dialog","layui-layer-iframe","layui-layer-content","layui-layer-btn","layui-layer-close"];l.anim=["layer-anim-00","layer-anim-01","layer-anim-02","layer-anim-03","layer-anim-04","layer-anim-05","layer-anim-06"],s.pt.config={type:0,shade:.3,fixed:!0,move:l[1],title:"信息",offset:"auto",area:"auto",closeBtn:1,time:0,zIndex:19891014,maxWidth:360,anim:0,isOutAnim:!0,icon:-1,moveType:1,resize:!0,scrollbar:!0,tips:2},s.pt.vessel=function(e,t){var n=this,a=n.index,r=n.config,s=r.zIndex+a,f="object"==typeof r.title,c=r.maxmin&&(1===r.type||2===r.type),u=r.title?'
        '+(f?r.title[0]:r.title)+"
        ":"";return r.zIndex=s,t([r.shade?'
        ':"",'
        '+(e&&2!=r.type?"":u)+'
        '+(0==r.type&&r.icon!==-1?'':"")+(1==r.type&&e?"":r.content||"")+'
        '+function(){var e=c?'':"";return r.closeBtn&&(e+=''),e}()+""+(r.btn?function(){var e="";"string"==typeof r.btn&&(r.btn=[r.btn]);for(var t=0,i=r.btn.length;t'+r.btn[t]+"";return'
        '+e+"
        "}():"")+(r.resize?'':"")+"
        "],u,i('
        ')),n},s.pt.creat=function(){var e=this,t=e.config,a=e.index,s=t.content,f="object"==typeof s,c=i("body");if(!t.id||!i("#"+t.id)[0]){switch("string"==typeof t.area&&(t.area="auto"===t.area?["",""]:[t.area,""]),t.shift&&(t.anim=t.shift),6==r.ie&&(t.fixed=!1),t.type){case 0:t.btn="btn"in t?t.btn:o.btn[0],r.closeAll("dialog");break;case 2:var s=t.content=f?t.content:[t.content||"","auto"];t.content='';break;case 3:delete t.title,delete t.closeBtn,t.icon===-1&&0===t.icon,r.closeAll("loading");break;case 4:f||(t.content=[t.content,"body"]),t.follow=t.content[1],t.content=t.content[0]+'',delete t.title,t.tips="object"==typeof t.tips?t.tips:[t.tips,!0],t.tipsMore||r.closeAll("tips")}if(e.vessel(f,function(n,r,u){c.append(n[0]),f?function(){2==t.type||4==t.type?function(){i("body").append(n[1])}():function(){s.parents("."+l[0])[0]||(s.data("display",s.css("display")).show().addClass("layui-layer-wrap").wrap(n[1]),i("#"+l[0]+a).find("."+l[5]).before(r))}()}():c.append(n[1]),i(".layui-layer-move")[0]||c.append(o.moveElem=u),e.layero=i("#"+l[0]+a),t.scrollbar||l.html.css("overflow","hidden").attr("layer-full",a)}).auto(a),i("#layui-layer-shade"+e.index).css({"background-color":t.shade[1]||"#000",opacity:t.shade[0]||t.shade}),2==t.type&&6==r.ie&&e.layero.find("iframe").attr("src",s[0]),4==t.type?e.tips():e.offset(),t.fixed&&n.on("resize",function(){e.offset(),(/^\d+%$/.test(t.area[0])||/^\d+%$/.test(t.area[1]))&&e.auto(a),4==t.type&&e.tips()}),t.time<=0||setTimeout(function(){r.close(e.index)},t.time),e.move().callback(),l.anim[t.anim]){var u="layer-anim "+l.anim[t.anim];e.layero.addClass(u).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){i(this).removeClass(u)})}t.isOutAnim&&e.layero.data("isOutAnim",!0)}},s.pt.auto=function(e){var t=this,a=t.config,o=i("#"+l[0]+e);""===a.area[0]&&a.maxWidth>0&&(r.ie&&r.ie<8&&a.btn&&o.width(o.innerWidth()),o.outerWidth()>a.maxWidth&&o.width(a.maxWidth));var s=[o.innerWidth(),o.innerHeight()],f=o.find(l[1]).outerHeight()||0,c=o.find("."+l[6]).outerHeight()||0,u=function(e){e=o.find(e),e.height(s[1]-f-c-2*(0|parseFloat(e.css("padding-top"))))};switch(a.type){case 2:u("iframe");break;default:""===a.area[1]?a.maxHeight>0&&o.outerHeight()>a.maxHeight?(s[1]=a.maxHeight,u("."+l[5])):a.fixed&&s[1]>=n.height()&&(s[1]=n.height(),u("."+l[5])):u("."+l[5])}return t},s.pt.offset=function(){var e=this,t=e.config,i=e.layero,a=[i.outerWidth(),i.outerHeight()],o="object"==typeof t.offset;e.offsetTop=(n.height()-a[1])/2,e.offsetLeft=(n.width()-a[0])/2,o?(e.offsetTop=t.offset[0],e.offsetLeft=t.offset[1]||e.offsetLeft):"auto"!==t.offset&&("t"===t.offset?e.offsetTop=0:"r"===t.offset?e.offsetLeft=n.width()-a[0]:"b"===t.offset?e.offsetTop=n.height()-a[1]:"l"===t.offset?e.offsetLeft=0:"lt"===t.offset?(e.offsetTop=0,e.offsetLeft=0):"lb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=0):"rt"===t.offset?(e.offsetTop=0,e.offsetLeft=n.width()-a[0]):"rb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=n.width()-a[0]):e.offsetTop=t.offset),t.fixed||(e.offsetTop=/%$/.test(e.offsetTop)?n.height()*parseFloat(e.offsetTop)/100:parseFloat(e.offsetTop),e.offsetLeft=/%$/.test(e.offsetLeft)?n.width()*parseFloat(e.offsetLeft)/100:parseFloat(e.offsetLeft),e.offsetTop+=n.scrollTop(),e.offsetLeft+=n.scrollLeft()),i.attr("minLeft")&&(e.offsetTop=n.height()-(i.find(l[1]).outerHeight()||0),e.offsetLeft=i.css("left")),i.css({top:e.offsetTop,left:e.offsetLeft})},s.pt.tips=function(){var e=this,t=e.config,a=e.layero,o=[a.outerWidth(),a.outerHeight()],r=i(t.follow);r[0]||(r=i("body"));var s={width:r.outerWidth(),height:r.outerHeight(),top:r.offset().top,left:r.offset().left},f=a.find(".layui-layer-TipsG"),c=t.tips[0];t.tips[1]||f.remove(),s.autoLeft=function(){s.left+o[0]-n.width()>0?(s.tipLeft=s.left+s.width-o[0],f.css({right:12,left:"auto"})):s.tipLeft=s.left},s.where=[function(){s.autoLeft(),s.tipTop=s.top-o[1]-10,f.removeClass("layui-layer-TipsB").addClass("layui-layer-TipsT").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left+s.width+10,s.tipTop=s.top,f.removeClass("layui-layer-TipsL").addClass("layui-layer-TipsR").css("border-bottom-color",t.tips[1])},function(){s.autoLeft(),s.tipTop=s.top+s.height+10,f.removeClass("layui-layer-TipsT").addClass("layui-layer-TipsB").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left-o[0]-10,s.tipTop=s.top,f.removeClass("layui-layer-TipsR").addClass("layui-layer-TipsL").css("border-bottom-color",t.tips[1])}],s.where[c-1](),1===c?s.top-(n.scrollTop()+o[1]+16)<0&&s.where[2]():2===c?n.width()-(s.left+s.width+o[0]+16)>0||s.where[3]():3===c?s.top-n.scrollTop()+s.height+o[1]+16-n.height()>0&&s.where[0]():4===c&&o[0]+16-s.left>0&&s.where[1](),a.find("."+l[5]).css({"background-color":t.tips[1],"padding-right":t.closeBtn?"30px":""}),a.css({left:s.tipLeft-(t.fixed?n.scrollLeft():0),top:s.tipTop-(t.fixed?n.scrollTop():0)})},s.pt.move=function(){var e=this,t=e.config,a=i(document),s=e.layero,l=s.find(t.move),f=s.find(".layui-layer-resize"),c={};return t.move&&l.css("cursor","move"),l.on("mousedown",function(e){e.preventDefault(),t.move&&(c.moveStart=!0,c.offset=[e.clientX-parseFloat(s.css("left")),e.clientY-parseFloat(s.css("top"))],o.moveElem.css("cursor","move").show())}),f.on("mousedown",function(e){e.preventDefault(),c.resizeStart=!0,c.offset=[e.clientX,e.clientY],c.area=[s.outerWidth(),s.outerHeight()],o.moveElem.css("cursor","se-resize").show()}),a.on("mousemove",function(i){if(c.moveStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1],l="fixed"===s.css("position");if(i.preventDefault(),c.stX=l?0:n.scrollLeft(),c.stY=l?0:n.scrollTop(),!t.moveOut){var f=n.width()-s.outerWidth()+c.stX,u=n.height()-s.outerHeight()+c.stY;af&&(a=f),ou&&(o=u)}s.css({left:a,top:o})}if(t.resize&&c.resizeStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1];i.preventDefault(),r.style(e.index,{width:c.area[0]+a,height:c.area[1]+o}),c.isResize=!0,t.resizing&&t.resizing(s)}}).on("mouseup",function(e){c.moveStart&&(delete c.moveStart,o.moveElem.hide(),t.moveEnd&&t.moveEnd(s)),c.resizeStart&&(delete c.resizeStart,o.moveElem.hide())}),e},s.pt.callback=function(){function e(){var e=a.cancel&&a.cancel(t.index,n);e===!1||r.close(t.index)}var t=this,n=t.layero,a=t.config;t.openLayer(),a.success&&(2==a.type?n.find("iframe").on("load",function(){a.success(n,t.index)}):a.success(n,t.index)),6==r.ie&&t.IE6(n),n.find("."+l[6]).children("a").on("click",function(){var e=i(this).index();if(0===e)a.yes?a.yes(t.index,n):a.btn1?a.btn1(t.index,n):r.close(t.index);else{var o=a["btn"+(e+1)]&&a["btn"+(e+1)](t.index,n);o===!1||r.close(t.index)}}),n.find("."+l[7]).on("click",e),a.shadeClose&&i("#layui-layer-shade"+t.index).on("click",function(){r.close(t.index)}),n.find(".layui-layer-min").on("click",function(){var e=a.min&&a.min(n);e===!1||r.min(t.index,a)}),n.find(".layui-layer-max").on("click",function(){i(this).hasClass("layui-layer-maxmin")?(r.restore(t.index),a.restore&&a.restore(n)):(r.full(t.index,a),setTimeout(function(){a.full&&a.full(n)},100))}),a.end&&(o.end[t.index]=a.end)},o.reselect=function(){i.each(i("select"),function(e,t){var n=i(this);n.parents("."+l[0])[0]||1==n.attr("layer")&&i("."+l[0]).length<1&&n.removeAttr("layer").show(),n=null})},s.pt.IE6=function(e){i("select").each(function(e,t){var n=i(this);n.parents("."+l[0])[0]||"none"===n.css("display")||n.attr({layer:"1"}).hide(),n=null})},s.pt.openLayer=function(){var e=this;r.zIndex=e.config.zIndex,r.setTop=function(e){var t=function(){r.zIndex++,e.css("z-index",r.zIndex+1)};return r.zIndex=parseInt(e[0].style.zIndex),e.on("mousedown",t),r.zIndex}},o.record=function(e){var t=[e.width(),e.height(),e.position().top,e.position().left+parseFloat(e.css("margin-left"))];e.find(".layui-layer-max").addClass("layui-layer-maxmin"),e.attr({area:t})},o.rescollbar=function(e){l.html.attr("layer-full")==e&&(l.html[0].style.removeProperty?l.html[0].style.removeProperty("overflow"):l.html[0].style.removeAttribute("overflow"),l.html.removeAttr("layer-full"))},e.layer=r,r.getChildFrame=function(e,t){return t=t||i("."+l[4]).attr("times"),i("#"+l[0]+t).find("iframe").contents().find(e)},r.getFrameIndex=function(e){return i("#"+e).parents("."+l[4]).attr("times")},r.iframeAuto=function(e){if(e){var t=r.getChildFrame("html",e).outerHeight(),n=i("#"+l[0]+e),a=n.find(l[1]).outerHeight()||0,o=n.find("."+l[6]).outerHeight()||0;n.css({height:t+a+o}),n.find("iframe").css({height:t})}},r.iframeSrc=function(e,t){i("#"+l[0]+e).find("iframe").attr("src",t)},r.style=function(e,t,n){var a=i("#"+l[0]+e),r=a.find(".layui-layer-content"),s=a.attr("type"),f=a.find(l[1]).outerHeight()||0,c=a.find("."+l[6]).outerHeight()||0;a.attr("minLeft");s!==o.type[3]&&s!==o.type[4]&&(n||(parseFloat(t.width)<=260&&(t.width=260),parseFloat(t.height)-f-c<=64&&(t.height=64+f+c)),a.css(t),c=a.find("."+l[6]).outerHeight(),s===o.type[2]?a.find("iframe").css({height:parseFloat(t.height)-f-c}):r.css({height:parseFloat(t.height)-f-c-parseFloat(r.css("padding-top"))-parseFloat(r.css("padding-bottom"))}))},r.min=function(e,t){var a=i("#"+l[0]+e),s=a.find(l[1]).outerHeight()||0,f=a.attr("minLeft")||181*o.minIndex+"px",c=a.css("position");o.record(a),o.minLeft[0]&&(f=o.minLeft[0],o.minLeft.shift()),a.attr("position",c),r.style(e,{width:180,height:s,left:f,top:n.height()-s,position:"fixed",overflow:"hidden"},!0),a.find(".layui-layer-min").hide(),"page"===a.attr("type")&&a.find(l[4]).hide(),o.rescollbar(e),a.attr("minLeft")||o.minIndex++,a.attr("minLeft",f)},r.restore=function(e){var t=i("#"+l[0]+e),n=t.attr("area").split(",");t.attr("type");r.style(e,{width:parseFloat(n[0]),height:parseFloat(n[1]),top:parseFloat(n[2]),left:parseFloat(n[3]),position:t.attr("position"),overflow:"visible"},!0),t.find(".layui-layer-max").removeClass("layui-layer-maxmin"),t.find(".layui-layer-min").show(),"page"===t.attr("type")&&t.find(l[4]).show(),o.rescollbar(e)},r.full=function(e){var t,a=i("#"+l[0]+e);o.record(a),l.html.attr("layer-full")||l.html.css("overflow","hidden").attr("layer-full",e),clearTimeout(t),t=setTimeout(function(){var t="fixed"===a.css("position");r.style(e,{top:t?0:n.scrollTop(),left:t?0:n.scrollLeft(),width:n.width(),height:n.height()},!0),a.find(".layui-layer-min").hide()},100)},r.title=function(e,t){var n=i("#"+l[0]+(t||r.index)).find(l[1]);n.html(e)},r.close=function(e){var t=i("#"+l[0]+e),n=t.attr("type"),a="layer-anim-close";if(t[0]){var s="layui-layer-wrap",f=function(){if(n===o.type[1]&&"object"===t.attr("conType")){t.children(":not(."+l[5]+")").remove();for(var a=t.find("."+s),r=0;r<2;r++)a.unwrap();a.css("display",a.data("display")).removeClass(s)}else{if(n===o.type[2])try{var f=i("#"+l[4]+e)[0];f.contentWindow.document.write(""),f.contentWindow.close(),t.find("."+l[5])[0].removeChild(f)}catch(c){}t[0].innerHTML="",t.remove()}"function"==typeof o.end[e]&&o.end[e](),delete o.end[e]};t.data("isOutAnim")&&t.addClass("layer-anim "+a),i("#layui-layer-moves, #layui-layer-shade"+e).remove(),6==r.ie&&o.reselect(),o.rescollbar(e),t.attr("minLeft")&&(o.minIndex--,o.minLeft.push(t.attr("minLeft"))),r.ie&&r.ie<10||!t.data("isOutAnim")?f():setTimeout(function(){f()},200)}},r.closeAll=function(e){i.each(i("."+l[0]),function(){var t=i(this),n=e?t.attr("type")===e:1;n&&r.close(t.attr("times")),n=null})};var f=r.cache||{},c=function(e){return f.skin?" "+f.skin+" "+f.skin+"-"+e:""};r.prompt=function(e,t){var a="";if(e=e||{},"function"==typeof e&&(t=e),e.area){var o=e.area;a='style="width: '+o[0]+"; height: "+o[1]+';"',delete e.area}var s,l=2==e.formType?'":function(){return''}(),f=e.success;return delete e.success,r.open(i.extend({type:1,btn:["确定","取消"],content:l,skin:"layui-layer-prompt"+c("prompt"),maxWidth:n.width(),success:function(t){s=t.find(".layui-layer-input"),s.val(e.value||"").focus(),"function"==typeof f&&f(t)},resize:!1,yes:function(i){var n=s.val();""===n?s.focus():n.length>(e.maxlength||500)?r.tips("最多输入"+(e.maxlength||500)+"个字数",s,{tips:1}):t&&t(n,i,s)}},e))},r.tab=function(e){e=e||{};var t=e.tab||{},n="layui-this",a=e.success;return delete e.success,r.open(i.extend({type:1,skin:"layui-layer-tab"+c("tab"),resize:!1,title:function(){var e=t.length,i=1,a="";if(e>0)for(a=''+t[0].title+"";i"+t[i].title+"";return a}(),content:'
          '+function(){var e=t.length,i=1,a="";if(e>0)for(a='
        • '+(t[0].content||"no content")+"
        • ";i'+(t[i].content||"no content")+"";return a}()+"
        ",success:function(t){var o=t.find(".layui-layer-title").children(),r=t.find(".layui-layer-tabmain").children();o.on("mousedown",function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0;var a=i(this),o=a.index();a.addClass(n).siblings().removeClass(n),r.eq(o).show().siblings().hide(),"function"==typeof e.change&&e.change(o)}),"function"==typeof a&&a(t)}},e))},r.photos=function(t,n,a){function o(e,t,i){var n=new Image;return n.src=e,n.complete?t(n):(n.onload=function(){n.onload=null,t(n)},void(n.onerror=function(e){n.onerror=null,i(e)}))}var s={};if(t=t||{},t.photos){var l=t.photos.constructor===Object,f=l?t.photos:{},u=f.data||[],d=f.start||0;s.imgIndex=(0|d)+1,t.img=t.img||"img";var y=t.success;if(delete t.success,l){if(0===u.length)return r.msg("没有图片")}else{var p=i(t.photos),h=function(){u=[],p.find(t.img).each(function(e){var t=i(this);t.attr("layer-index",e),u.push({alt:t.attr("alt"),pid:t.attr("layer-pid"),src:t.attr("layer-src")||t.attr("src"),thumb:t.attr("src")})})};if(h(),0===u.length)return;if(n||p.on("click",t.img,function(){var e=i(this),n=e.attr("layer-index");r.photos(i.extend(t,{photos:{start:n,data:u,tab:t.tab},full:t.full}),!0),h()}),!n)return}s.imgprev=function(e){s.imgIndex--,s.imgIndex<1&&(s.imgIndex=u.length),s.tabimg(e)},s.imgnext=function(e,t){s.imgIndex++,s.imgIndex>u.length&&(s.imgIndex=1,t)||s.tabimg(e)},s.keyup=function(e){if(!s.end){var t=e.keyCode;e.preventDefault(),37===t?s.imgprev(!0):39===t?s.imgnext(!0):27===t&&r.close(s.index)}},s.tabimg=function(e){if(!(u.length<=1))return f.start=s.imgIndex-1,r.close(s.index),r.photos(t,!0,e)},s.event=function(){s.bigimg.hover(function(){s.imgsee.show()},function(){s.imgsee.hide()}),s.bigimg.find(".layui-layer-imgprev").on("click",function(e){e.preventDefault(),s.imgprev()}),s.bigimg.find(".layui-layer-imgnext").on("click",function(e){e.preventDefault(),s.imgnext()}),i(document).on("keyup",s.keyup)},s.loadi=r.load(1,{shade:!("shade"in t)&&.9,scrollbar:!1}),o(u[d].src,function(n){r.close(s.loadi),s.index=r.open(i.extend({type:1,id:"layui-layer-photos",area:function(){var a=[n.width,n.height],o=[i(e).width()-100,i(e).height()-100];if(!t.full&&(a[0]>o[0]||a[1]>o[1])){var r=[a[0]/o[0],a[1]/o[1]];r[0]>r[1]?(a[0]=a[0]/r[0],a[1]=a[1]/r[0]):r[0]'+(u[d].alt||
        '+(u.length>1?'':"")+'
        '+(u[d].alt||"")+""+s.imgIndex+"/"+u.length+"
        ",success:function(e,i){s.bigimg=e.find(".layui-layer-phimg"),s.imgsee=e.find(".layui-layer-imguide,.layui-layer-imgbar"),s.event(e),t.tab&&t.tab(u[d],e),"function"==typeof y&&y(e)},end:function(){s.end=!0,i(document).off("keyup",s.keyup)}},t))},function(){r.close(s.loadi),r.msg("当前图片地址异常
        是否继续查看下一张?",{time:3e4,btn:["下一张","不看了"],yes:function(){u.length>1&&s.imgnext(!0,!0)}})})}},o.run=function(t){i=t,n=i(e),l.html=i("html"),r.open=function(e){var t=new s(e);return t.index}},e.layui&&layui.define?(r.ready(),layui.define("jquery",function(t){r.path=layui.cache.dir,o.run(layui.$),e.layer=r,t("layer",r)})):"function"==typeof define&&define.amd?define(["jquery"],function(){return o.run(e.jQuery),r}):function(){o.run(e.jQuery),r.ready()}()}(window);layui.define("jquery",function(t){"use strict";var a=layui.$,i=(layui.hint(),layui.device()),e="element",l="layui-this",n="layui-show",s=function(){this.config={}};s.prototype.set=function(t){var i=this;return a.extend(!0,i.config,t),i},s.prototype.on=function(t,a){return layui.onevent.call(this,e,t,a)},s.prototype.tabAdd=function(t,i){var e=".layui-tab-title",l=a(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.children(".layui-tab-bar"),o=l.children(".layui-tab-content"),r='
      • "+(i.title||"unnaming")+"
      • ";return s[0]?s.before(r):n.append(r),o.append('
        '+(i.content||"")+"
        "),f.hideTabMore(!0),f.tabAuto(),this},s.prototype.tabDelete=function(t,i){var e=".layui-tab-title",l=a(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.find('>li[lay-id="'+i+'"]');return f.tabDelete(null,s),this},s.prototype.tabChange=function(t,i){var e=".layui-tab-title",l=a(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.find('>li[lay-id="'+i+'"]');return f.tabClick.call(s[0],null,null,s),this},s.prototype.tab=function(t){t=t||{},b.on("click",t.headerElem,function(i){var e=a(this).index();f.tabClick.call(this,i,e,null,t)})},s.prototype.progress=function(t,i){var e="layui-progress",l=a("."+e+"[lay-filter="+t+"]"),n=l.find("."+e+"-bar"),s=n.find("."+e+"-text");return n.css("width",i),s.text(i),this};var o=".layui-nav",r="layui-nav-item",c="layui-nav-bar",u="layui-nav-tree",d="layui-nav-child",y="layui-nav-more",h="layui-anim layui-anim-upbit",f={tabClick:function(t,i,s,o){o=o||{};var r=s||a(this),i=i||r.parent().children("li").index(r),c=o.headerElem?r.parent():r.parents(".layui-tab").eq(0),u=o.bodyElem?a(o.bodyElem):c.children(".layui-tab-content").children(".layui-tab-item"),d=r.find("a"),y=c.attr("lay-filter");"javascript:;"!==d.attr("href")&&"_blank"===d.attr("target")||(r.addClass(l).siblings().removeClass(l),u.eq(i).addClass(n).siblings().removeClass(n)),layui.event.call(this,e,"tab("+y+")",{elem:c,index:i})},tabDelete:function(t,i){var n=i||a(this).parent(),s=n.index(),o=n.parents(".layui-tab").eq(0),r=o.children(".layui-tab-content").children(".layui-tab-item"),c=o.attr("lay-filter");n.hasClass(l)&&(n.next()[0]?f.tabClick.call(n.next()[0],null,s+1):n.prev()[0]&&f.tabClick.call(n.prev()[0],null,s-1)),n.remove(),r.eq(s).remove(),setTimeout(function(){f.tabAuto()},50),layui.event.call(this,e,"tabDelete("+c+")",{elem:o,index:s})},tabAuto:function(){var t="layui-tab-more",e="layui-tab-bar",l="layui-tab-close",n=this;a(".layui-tab").each(function(){var s=a(this),o=s.children(".layui-tab-title"),r=(s.children(".layui-tab-content").children(".layui-tab-item"),'lay-stope="tabmore"'),c=a('');if(n===window&&8!=i.ie&&f.hideTabMore(!0),s.attr("lay-allowClose")&&o.find("li").each(function(){var t=a(this);if(!t.find("."+l)[0]){var i=a('');i.on("click",f.tabDelete),t.append(i)}}),"string"!=typeof s.attr("lay-unauto"))if(o.prop("scrollWidth")>o.outerWidth()+1){if(o.find("."+e)[0])return;o.append(c),s.attr("overflow",""),c.on("click",function(a){o[this.title?"removeClass":"addClass"](t),this.title=this.title?"":"收缩"})}else o.find("."+e).remove(),s.removeAttr("overflow")})},hideTabMore:function(t){var i=a(".layui-tab-title");t!==!0&&"tabmore"===a(t.target).attr("lay-stope")||(i.removeClass("layui-tab-more"),i.find(".layui-tab-bar").attr("title",""))},clickThis:function(){var t=a(this),i=t.parents(o),n=i.attr("lay-filter"),s=t.parent(),c=t.siblings("."+d),y="string"==typeof s.attr("lay-unselect");"javascript:;"!==t.attr("href")&&"_blank"===t.attr("target")||y||c[0]||(i.find("."+l).removeClass(l),s.addClass(l)),i.hasClass(u)&&(c.removeClass(h),c[0]&&(s["none"===c.css("display")?"addClass":"removeClass"](r+"ed"),"all"===i.attr("lay-shrink")&&s.siblings().removeClass(r+"ed"))),layui.event.call(this,e,"nav("+n+")",t)},collapse:function(){var t=a(this),i=t.find(".layui-colla-icon"),l=t.siblings(".layui-colla-content"),s=t.parents(".layui-collapse").eq(0),o=s.attr("lay-filter"),r="none"===l.css("display");if("string"==typeof s.attr("lay-accordion")){var c=s.children(".layui-colla-item").children("."+n);c.siblings(".layui-colla-title").children(".layui-colla-icon").html(""),c.removeClass(n)}l[r?"addClass":"removeClass"](n),i.html(r?"":""),layui.event.call(this,e,"collapse("+o+")",{title:t,content:l,show:r})}};s.prototype.init=function(t,e){var l=function(){return e?'[lay-filter="'+e+'"]':""}(),s={tab:function(){f.tabAuto.call({})},nav:function(){var t=200,e={},s={},p={},b=function(l,o,r){var c=a(this),f=c.find("."+d);o.hasClass(u)?l.css({top:c.position().top,height:c.children("a").outerHeight(),opacity:1}):(f.addClass(h),l.css({left:c.position().left+parseFloat(c.css("marginLeft")),top:c.position().top+c.height()-l.height()}),e[r]=setTimeout(function(){l.css({width:c.width(),opacity:1})},i.ie&&i.ie<10?0:t),clearTimeout(p[r]),"block"===f.css("display")&&clearTimeout(s[r]),s[r]=setTimeout(function(){f.addClass(n),c.find("."+y).addClass(y+"d")},300))};a(o+l).each(function(i){var l=a(this),o=a(''),h=l.find("."+r);l.find("."+c)[0]||(l.append(o),h.on("mouseenter",function(){b.call(this,o,l,i)}).on("mouseleave",function(){l.hasClass(u)||(clearTimeout(s[i]),s[i]=setTimeout(function(){l.find("."+d).removeClass(n),l.find("."+y).removeClass(y+"d")},300))}),l.on("mouseleave",function(){clearTimeout(e[i]),p[i]=setTimeout(function(){l.hasClass(u)?o.css({height:0,top:o.position().top+o.height()/2,opacity:0}):o.css({width:0,left:o.position().left+o.width()/2,opacity:0})},t)})),h.find("a").each(function(){var t=a(this),i=(t.parent(),t.siblings("."+d));i[0]&&!t.children("."+y)[0]&&t.append(''),t.off("click",f.clickThis).on("click",f.clickThis)})})},breadcrumb:function(){var t=".layui-breadcrumb";a(t+l).each(function(){var t=a(this),i="lay-separator",e=t.attr(i)||"/",l=t.find("a");l.next("span["+i+"]")[0]||(l.each(function(t){t!==l.length-1&&a(this).after(""+e+"")}),t.css("visibility","visible"))})},progress:function(){var t="layui-progress";a("."+t+l).each(function(){var i=a(this),e=i.find(".layui-progress-bar"),l=e.attr("lay-percent");e.css("width",function(){return/^.+\/.+$/.test(l)?100*new Function("return "+l)()+"%":l}()),i.attr("lay-showPercent")&&setTimeout(function(){e.html(''+l+"")},350)})},collapse:function(){var t="layui-collapse";a("."+t+l).each(function(){var t=a(this).find(".layui-colla-item");t.each(function(){var t=a(this),i=t.find(".layui-colla-title"),e=t.find(".layui-colla-content"),l="none"===e.css("display");i.find(".layui-colla-icon").remove(),i.append(''+(l?"":"")+""),i.off("click",f.collapse).on("click",f.collapse)})})}};return s[t]?s[t]():layui.each(s,function(t,a){a()})},s.prototype.render=s.prototype.init;var p=new s,b=a(document);p.render();var v=".layui-tab-title li";b.on("click",v,f.tabClick),b.on("click",f.hideTabMore),a(window).on("resize",f.tabAuto),t(e,p)});layui.define("layer",function(e){"use strict";var t=layui.$,i=layui.layer,n=layui.hint(),a=layui.device(),o={config:{},set:function(e){var i=this;return i.config=t.extend({},i.config,e),i},on:function(e,t){return layui.onevent.call(this,r,e,t)}},l=function(){var e=this;return{upload:function(t){e.upload.call(e,t)},reload:function(t){e.reload.call(e,t)},config:e.config}},r="upload",u="layui-upload-file",c="layui-upload-form",f="layui-upload-iframe",s="layui-upload-choose",p=function(e){var i=this;i.config=t.extend({},i.config,o.config,e),i.render()};p.prototype.config={accept:"images",exts:"",auto:!0,bindAction:"",url:"",field:"file",acceptMime:"",method:"post",data:{},drag:!0,size:0,number:0,multiple:!1},p.prototype.render=function(e){var i=this,e=i.config;e.elem=t(e.elem),e.bindAction=t(e.bindAction),i.file(),i.events()},p.prototype.file=function(){var e=this,i=e.config,n=e.elemFile=t(['"].join("")),o=i.elem.next();(o.hasClass(u)||o.hasClass(c))&&o.remove(),a.ie&&a.ie<10&&i.elem.wrap('
        '),e.isFile()?(e.elemFile=i.elem,i.field=i.elem[0].name):i.elem.after(n),a.ie&&a.ie<10&&e.initIE()},p.prototype.initIE=function(){var e=this,i=e.config,n=t(''),a=t(['
        ',"
        "].join(""));t("#"+f)[0]||t("body").append(n),i.elem.next().hasClass(c)||(e.elemFile.wrap(a),i.elem.next("."+c).append(function(){var e=[];return layui.each(i.data,function(t,i){i="function"==typeof i?i():i,e.push('')}),e.join("")}()))},p.prototype.msg=function(e){return i.msg(e,{icon:2,shift:6})},p.prototype.isFile=function(){var e=this.config.elem[0];if(e)return"input"===e.tagName.toLocaleLowerCase()&&"file"===e.type},p.prototype.preview=function(e){var t=this;window.FileReader&&layui.each(t.chooseFiles,function(t,i){var n=new FileReader;n.readAsDataURL(i),n.onload=function(){e&&e(t,i,this.result)}})},p.prototype.upload=function(e,i){var n,o=this,l=o.config,r=o.elemFile[0],u=function(){var i=0,n=0,a=e||o.files||o.chooseFiles||r.files,u=function(){l.multiple&&i+n===o.fileLength&&"function"==typeof l.allDone&&l.allDone({total:o.fileLength,successful:i,aborted:n})};layui.each(a,function(e,a){var r=new FormData;r.append(l.field,a),layui.each(l.data,function(e,t){t="function"==typeof t?t():t,r.append(e,t)}),t.ajax({url:l.url,type:"post",data:r,contentType:!1,processData:!1,dataType:"json",headers:l.headers||{},success:function(t){i++,d(e,t),u()},error:function(){n++,m(e),u()}})})},c=function(){var e=t("#"+f);o.elemFile.parent().submit(),clearInterval(p.timer),p.timer=setInterval(function(){var t,i=e.contents().find("body");try{t=i.text()}catch(n){o.msg("获取上传后的响应信息出现异常"),clearInterval(p.timer),m()}t&&(clearInterval(p.timer),i.html(""),d(0,t))},30)},d=function(e,t){if(o.elemFile.next("."+s).remove(),r.value="","object"!=typeof t)try{t=JSON.parse(t)}catch(i){return t={},o.msg("请对上传接口返回有效JSON")}"function"==typeof l.done&&l.done(t,e||0,function(e){o.upload(e)})},m=function(e){l.auto&&(r.value=""),"function"==typeof l.error&&l.error(e||0,function(e){o.upload(e)})},h=l.exts,v=function(){var t=[];return layui.each(e||o.chooseFiles,function(e,i){t.push(i.name)}),t}(),g={preview:function(e){o.preview(e)},upload:function(e,t){var i={};i[e]=t,o.upload(i)},pushFile:function(){return o.files=o.files||{},layui.each(o.chooseFiles,function(e,t){o.files[e]=t}),o.files},resetFile:function(e,t,i){var n=new File([t],i);o.files=o.files||{},o.files[e]=n}},y=function(){if("choose"!==i&&!l.auto||(l.choose&&l.choose(g),"choose"!==i))return l.before&&l.before(g),a.ie?a.ie>9?u():c():void u()};if(v=0===v.length?r.value.match(/[^\/\\]+\..+/g)||[]||"":v,0!==v.length){switch(l.accept){case"file":if(h&&!RegExp("\\w\\.("+h+")$","i").test(escape(v)))return o.msg("选择的文件中包含不支持的格式"),r.value="";break;case"video":if(!RegExp("\\w\\.("+(h||"avi|mp4|wma|rmvb|rm|flash|3gp|flv")+")$","i").test(escape(v)))return o.msg("选择的视频中包含不支持的格式"),r.value="";break;case"audio":if(!RegExp("\\w\\.("+(h||"mp3|wav|mid")+")$","i").test(escape(v)))return o.msg("选择的音频中包含不支持的格式"),r.value="";break;default:if(layui.each(v,function(e,t){RegExp("\\w\\.("+(h||"jpg|png|gif|bmp|jpeg$")+")","i").test(escape(t))||(n=!0)}),n)return o.msg("选择的图片中包含不支持的格式"),r.value=""}if(o.fileLength=function(){var t=0,i=e||o.files||o.chooseFiles||r.files;return layui.each(i,function(){t++}),t}(),l.number&&o.fileLength>l.number)return o.msg("同时最多只能上传的数量为:"+l.number);if(l.size>0&&!(a.ie&&a.ie<10)){var F;if(layui.each(o.chooseFiles,function(e,t){if(t.size>1024*l.size){var i=l.size/1024;i=i>=1?i.toFixed(2)+"MB":l.size+"KB",r.value="",F=i}}),F)return o.msg("文件不能超过"+F)}y()}},p.prototype.reload=function(e){e=e||{},delete e.elem,delete e.bindAction;var i=this,e=i.config=t.extend({},i.config,o.config,e),n=e.elem.next();n.attr({name:e.name,accept:e.acceptMime,multiple:e.multiple})},p.prototype.events=function(){var e=this,i=e.config,o=function(t){e.chooseFiles={},layui.each(t,function(t,i){var n=(new Date).getTime();e.chooseFiles[n+"-"+t]=i})},l=function(t,n){var a=e.elemFile,o=t.length>1?t.length+"个文件":(t[0]||{}).name||a[0].value.match(/[^\/\\]+\..+/g)||[]||"";a.next().hasClass(s)&&a.next().remove(),e.upload(null,"choose"),e.isFile()||i.choose||a.after(''+o+"")};i.elem.off("upload.start").on("upload.start",function(){var a=t(this),o=a.attr("lay-data");if(o)try{o=new Function("return "+o)(),e.config=t.extend({},i,o)}catch(l){n.error("Upload element property lay-data configuration item has a syntax error: "+o)}e.config.item=a,e.elemFile[0].click()}),a.ie&&a.ie<10||i.elem.off("upload.over").on("upload.over",function(){var e=t(this);e.attr("lay-over","")}).off("upload.leave").on("upload.leave",function(){var e=t(this);e.removeAttr("lay-over")}).off("upload.drop").on("upload.drop",function(n,a){var r=t(this),u=a.originalEvent.dataTransfer.files||[];r.removeAttr("lay-over"),o(u),i.auto?e.upload(u):l(u)}),e.elemFile.off("upload.change").on("upload.change",function(){var t=this.files||[];o(t),i.auto?e.upload():l(t)}),i.bindAction.off("upload.action").on("upload.action",function(){e.upload()}),i.elem.data("haveEvents")||(e.elemFile.on("change",function(){t(this).trigger("upload.change")}),i.elem.on("click",function(){e.isFile()||t(this).trigger("upload.start")}),i.drag&&i.elem.on("dragover",function(e){e.preventDefault(),t(this).trigger("upload.over")}).on("dragleave",function(e){t(this).trigger("upload.leave")}).on("drop",function(e){e.preventDefault(),t(this).trigger("upload.drop",e)}),i.bindAction.on("click",function(){t(this).trigger("upload.action")}),i.elem.data("haveEvents",!0))},o.render=function(e){var t=new p(e);return l.call(t)},e(r,o)});layui.define("jquery",function(e){"use strict";var i=layui.jquery,t={config:{},index:layui.slider?layui.slider.index+1e4:0,set:function(e){var t=this;return t.config=i.extend({},t.config,e),t},on:function(e,i){return layui.onevent.call(this,n,e,i)}},a=function(){var e=this,i=e.config;return{setValue:function(i,t){return e.slide("set",i,t||0)},config:i}},n="slider",l="layui-disabled",s="layui-slider",r="layui-slider-bar",o="layui-slider-wrap",u="layui-slider-wrap-btn",d="layui-slider-tips",v="layui-slider-input",c="layui-slider-input-txt",m="layui-slider-input-btn",p="layui-slider-hover",f=function(e){var a=this;a.index=++t.index,a.config=i.extend({},a.config,t.config,e),a.render()};f.prototype.config={type:"default",min:0,max:100,value:0,step:1,showstep:!1,tips:!0,input:!1,range:!1,height:200,disabled:!1,theme:"#009688"},f.prototype.render=function(){var e=this,t=e.config;if(t.step<1&&(t.step=1),t.maxt.min?a:t.min,t.value[1]=n>t.min?n:t.min,t.value[0]=t.value[0]>t.max?t.max:t.value[0],t.value[1]=t.value[1]>t.max?t.max:t.value[1];var r=Math.floor((t.value[0]-t.min)/(t.max-t.min)*100),v=Math.floor((t.value[1]-t.min)/(t.max-t.min)*100),m=v-r+"%";r+="%",v+="%"}else{"object"==typeof t.value&&(t.value=Math.min.apply(null,t.value)),t.valuet.max&&(t.value=t.max);var m=Math.floor((t.value-t.min)/(t.max-t.min)*100)+"%"}var p=t.disabled?"#c2c2c2":t.theme,f='
        '+(t.tips?'
        ':"")+'
        '+(t.range?'
        ':"")+"
        ",h=i(t.elem),y=h.next("."+s);if(y[0]&&y.remove(),e.elemTemp=i(f),t.range?(e.elemTemp.find("."+o).eq(0).data("value",t.value[0]),e.elemTemp.find("."+o).eq(1).data("value",t.value[1])):e.elemTemp.find("."+o).data("value",t.value),h.html(e.elemTemp),"vertical"===t.type&&e.elemTemp.height(t.height+"px"),t.showstep){for(var g=(t.max-t.min)/t.step,b="",x=1;x')}e.elemTemp.append(b)}if(t.input&&!t.range){var w=i('
        ');h.css("position","relative"),h.append(w),h.find("."+c).children("input").val(t.value),"vertical"===t.type?w.css({left:0,top:-48}):e.elemTemp.css("margin-right",w.outerWidth()+15)}t.disabled?(e.elemTemp.addClass(l),e.elemTemp.find("."+u).addClass(l)):e.slide(),e.elemTemp.find("."+u).on("mouseover",function(){var a="vertical"===t.type?t.height:e.elemTemp[0].offsetWidth,n=e.elemTemp.find("."+o),l="vertical"===t.type?a-i(this).parent()[0].offsetTop-n.height():i(this).parent()[0].offsetLeft,s=l/a*100,r=i(this).parent().data("value"),u=t.setTips?t.setTips(r):r;e.elemTemp.find("."+d).html(u),"vertical"===t.type?e.elemTemp.find("."+d).css({bottom:s+"%","margin-bottom":"20px",display:"inline-block"}):e.elemTemp.find("."+d).css({left:s+"%",display:"inline-block"})}).on("mouseout",function(){e.elemTemp.find("."+d).css("display","none")})},f.prototype.slide=function(e,t,a){var n=this,l=n.config,s=n.elemTemp,f=function(){return"vertical"===l.type?l.height:s[0].offsetWidth},h=s.find("."+o),y=s.next("."+v),g=y.children("."+c).children("input").val(),b=100/((l.max-l.min)/Math.ceil(l.step)),x=function(e,i){e=Math.ceil(e)*b>100?Math.ceil(e)*b:Math.round(e)*b,e=e>100?100:e,h.eq(i).css("vertical"===l.type?"bottom":"left",e+"%");var t=T(h[0].offsetLeft),a=l.range?T(h[1].offsetLeft):0;"vertical"===l.type?(s.find("."+d).css({bottom:e+"%","margin-bottom":"20px"}),t=T(f()-h[0].offsetTop-h.height()),a=l.range?T(f()-h[1].offsetTop-h.height()):0):s.find("."+d).css("left",e+"%"),t=t>100?100:t,a=a>100?100:a;var n=Math.min(t,a),o=Math.abs(t-a);"vertical"===l.type?s.find("."+r).css({height:o+"%",bottom:n+"%"}):s.find("."+r).css({width:o+"%",left:n+"%"});var u=l.min+Math.round((l.max-l.min)*e/100);if(g=u,y.children("."+c).children("input").val(g),h.eq(i).data("value",u),u=l.setTips?l.setTips(u):u,s.find("."+d).html(u),l.range){var v=[h.eq(0).data("value"),h.eq(1).data("value")];v[0]>v[1]&&v.reverse()}l.change&&l.change(l.range?v:u)},T=function(e){var i=e/f()*100/b,t=Math.round(i)*b;return e==f()&&(t=Math.ceil(i)*b),t},w=i(['
        f()&&(r=f());var o=r/f()*100/b;x(o,e),t.addClass(p),s.find("."+d).show(),i.preventDefault()},o=function(){t.removeClass(p),s.find("."+d).hide()};M(r,o)})}),s.on("click",function(e){var t=i("."+u);if(!t.is(event.target)&&0===t.has(event.target).length&&t.length){var a,n="vertical"===l.type?f()-e.clientY+i(this).offset().top:e.clientX-i(this).offset().left;n<0&&(n=0),n>f()&&(n=f());var s=n/f()*100/b;a=l.range?"vertical"===l.type?Math.abs(n-parseInt(i(h[0]).css("bottom")))>Math.abs(n-parseInt(i(h[1]).css("bottom")))?1:0:Math.abs(n-h[0].offsetLeft)>Math.abs(n-h[1].offsetLeft)?1:0:0,x(s,a),e.preventDefault()}}),y.hover(function(){var e=i(this);e.children("."+m).fadeIn("fast")},function(){var e=i(this);e.children("."+m).fadeOut("fast")}),y.children("."+m).children("i").each(function(e){i(this).on("click",function(){g=1==e?g-l.stepl.max?l.max:Number(g)+l.step;var i=(g-l.min)/(l.max-l.min)*100/b;x(i,0)})});var q=function(){var e=this.value;e=isNaN(e)?0:e,e=el.max?l.max:e,this.value=e;var i=(e-l.min)/(l.max-l.min)*100/b;x(i,0)};y.children("."+c).children("input").on("keydown",function(e){13===e.keyCode&&(e.preventDefault(),q.call(this))}).on("change",q)},f.prototype.events=function(){var e=this;e.config},t.render=function(e){var i=new f(e);return a.call(i)},e(n,t)});layui.define("jquery",function(e){"use strict";var i=layui.jquery,o={config:{},index:layui.colorpicker?layui.colorpicker.index+1e4:0,set:function(e){var o=this;return o.config=i.extend({},o.config,e),o},on:function(e,i){return layui.onevent.call(this,"colorpicker",e,i)}},r=function(){var e=this,i=e.config;return{config:i}},t="colorpicker",n="layui-show",l="layui-colorpicker",c=".layui-colorpicker-main",a="layui-icon-down",s="layui-icon-close",f="layui-colorpicker-trigger-span",d="layui-colorpicker-trigger-i",u="layui-colorpicker-side",p="layui-colorpicker-side-slider",g="layui-colorpicker-basis",v="layui-colorpicker-alpha-bgcolor",h="layui-colorpicker-alpha-slider",m="layui-colorpicker-basis-cursor",b="layui-colorpicker-main-input",k=function(e){var i={h:0,s:0,b:0},o=Math.min(e.r,e.g,e.b),r=Math.max(e.r,e.g,e.b),t=r-o;return i.b=r,i.s=0!=r?255*t/r:0,0!=i.s?e.r==r?i.h=(e.g-e.b)/t:e.g==r?i.h=2+(e.b-e.r)/t:i.h=4+(e.r-e.g)/t:i.h=-1,r==o&&(i.h=0),i.h*=60,i.h<0&&(i.h+=360),i.s*=100/255,i.b*=100/255,i},y=function(e){var e=e.indexOf("#")>-1?e.substring(1):e;if(3==e.length){var i=e.split("");e=i[0]+i[0]+i[1]+i[1]+i[2]+i[2]}e=parseInt(e,16);var o={r:e>>16,g:(65280&e)>>8,b:255&e};return k(o)},x=function(e){var i={},o=e.h,r=255*e.s/100,t=255*e.b/100;if(0==r)i.r=i.g=i.b=t;else{var n=t,l=(255-r)*t/255,c=(n-l)*(o%60)/60;360==o&&(o=0),o<60?(i.r=n,i.b=l,i.g=l+c):o<120?(i.g=n,i.b=l,i.r=n-c):o<180?(i.g=n,i.r=l,i.b=l+c):o<240?(i.b=n,i.r=l,i.g=n-c):o<300?(i.b=n,i.g=l,i.r=l+c):o<360?(i.r=n,i.g=l,i.b=n-c):(i.r=0,i.g=0,i.b=0)}return{r:Math.round(i.r),g:Math.round(i.g),b:Math.round(i.b)}},C=function(e){var o=x(e),r=[o.r.toString(16),o.g.toString(16),o.b.toString(16)];return i.each(r,function(e,i){1==i.length&&(r[e]="0"+i)}),r.join("")},P=function(e){var i=/[0-9]{1,3}/g,o=e.match(i)||[];return{r:o[0],g:o[1],b:o[2]}},B=i(window),w=i(document),D=function(e){var r=this;r.index=++o.index,r.config=i.extend({},r.config,o.config,e),r.render()};D.prototype.config={color:"",size:null,alpha:!1,format:"hex",predefine:!1,colors:["#009688","#5FB878","#1E9FFF","#FF5722","#FFB800","#01AAED","#999","#c00","#ff8c00","#ffd700","#90ee90","#00ced1","#1e90ff","#c71585","rgb(0, 186, 189)","rgb(255, 120, 0)","rgb(250, 212, 0)","#393D49","rgba(0,0,0,.5)","rgba(255, 69, 0, 0.68)","rgba(144, 240, 144, 0.5)","rgba(31, 147, 255, 0.73)"]},D.prototype.render=function(){var e=this,o=e.config,r=i(['
        ',"",'3&&(o.alpha&&"rgb"==o.format||(e="#"+C(k(P(o.color))))),"background: "+e):e}()+'">','',"","","
        "].join("")),t=i(o.elem);o.size&&r.addClass("layui-colorpicker-"+o.size),t.addClass("layui-inline").html(e.elemColorBox=r),e.color=e.elemColorBox.find("."+f)[0].style.background,e.events()},D.prototype.renderPicker=function(){var e=this,o=e.config,r=e.elemColorBox[0],t=e.elemPicker=i(['
        ','
        ','
        ','
        ','
        ','
        ',"
        ",'
        ','
        ',"
        ","
        ",'
        ','
        ','
        ',"
        ","
        ",function(){if(o.predefine){var e=['
        '];return layui.each(o.colors,function(i,o){e.push(['
        ','
        ',"
        "].join(""))}),e.push("
        "),e.join("")}return""}(),'
        ','
        ','',"
        ",'
        ','','',"","
        "].join(""));e.elemColorBox.find("."+f)[0];i(c)[0]&&i(c).data("index")==e.index?e.removePicker(D.thisElemInd):(e.removePicker(D.thisElemInd),i("body").append(t)),D.thisElemInd=e.index,D.thisColor=r.style.background,e.position(),e.pickerEvents()},D.prototype.removePicker=function(e){var o=this;o.config;return i("#layui-colorpicker"+(e||o.index)).remove(),o},D.prototype.position=function(){var e=this,i=e.config,o=e.bindElem||e.elemColorBox[0],r=e.elemPicker[0],t=o.getBoundingClientRect(),n=r.offsetWidth,l=r.offsetHeight,c=function(e){return e=e?"scrollLeft":"scrollTop",document.body[e]|document.documentElement[e]},a=function(e){return document.documentElement[e?"clientWidth":"clientHeight"]},s=5,f=t.left,d=t.bottom;f-=(n-o.offsetWidth)/2,d+=s,f+n+s>a("width")?f=a("width")-n-s:fa()&&(d=t.top>l?t.top-l:a()-l,d-=2*s),i.position&&(r.style.position=i.position),r.style.left=f+("fixed"===i.position?0:c(1))+"px",r.style.top=d+("fixed"===i.position?0:c())+"px"},D.prototype.val=function(){var e=this,i=(e.config,e.elemColorBox.find("."+f)),o=e.elemPicker.find("."+b),r=i[0],t=r.style.backgroundColor;if(t){var n=k(P(t)),l=i.attr("lay-type");if(e.select(n.h,n.s,n.b),"torgb"===l&&o.find("input").val(t),"rgba"===l){var c=P(t);if(3==(t.match(/[0-9]{1,3}/g)||[]).length)o.find("input").val("rgba("+c.r+", "+c.g+", "+c.b+", 1)"),e.elemPicker.find("."+h).css("left",280);else{o.find("input").val(t);var a=280*t.slice(t.lastIndexOf(",")+1,t.length-1);e.elemPicker.find("."+h).css("left",a)}e.elemPicker.find("."+v)[0].style.background="linear-gradient(to right, rgba("+c.r+", "+c.g+", "+c.b+", 0), rgb("+c.r+", "+c.g+", "+c.b+"))"}}else e.select(0,100,100),o.find("input").val(""),e.elemPicker.find("."+v)[0].style.background="",e.elemPicker.find("."+h).css("left",280)},D.prototype.side=function(){var e=this,o=e.config,r=e.elemColorBox.find("."+f),t=r.attr("lay-type"),n=e.elemPicker.find("."+u),l=e.elemPicker.find("."+p),c=e.elemPicker.find("."+g),y=e.elemPicker.find("."+m),C=e.elemPicker.find("."+v),w=e.elemPicker.find("."+h),D=l[0].offsetTop/180*360,E=100-(y[0].offsetTop+3)/180*100,H=(y[0].offsetLeft+3)/260*100,W=Math.round(w[0].offsetLeft/280*100)/100,j=e.elemColorBox.find("."+d),F=e.elemPicker.find(".layui-colorpicker-pre").children("div"),L=function(i,n,l,c){e.select(i,n,l);var f=x({h:i,s:n,b:l});if(j.addClass(a).removeClass(s),r[0].style.background="rgb("+f.r+", "+f.g+", "+f.b+")","torgb"===t&&e.elemPicker.find("."+b).find("input").val("rgb("+f.r+", "+f.g+", "+f.b+")"),"rgba"===t){var d=0;d=280*c,w.css("left",d),e.elemPicker.find("."+b).find("input").val("rgba("+f.r+", "+f.g+", "+f.b+", "+c+")"),r[0].style.background="rgba("+f.r+", "+f.g+", "+f.b+", "+c+")",C[0].style.background="linear-gradient(to right, rgba("+f.r+", "+f.g+", "+f.b+", 0), rgb("+f.r+", "+f.g+", "+f.b+"))"}o.change&&o.change(e.elemPicker.find("."+b).find("input").val())},M=i(['
        t&&(r=t);var l=r/180*360;D=l,L(l,H,E,W),e.preventDefault()};Y(r),e.preventDefault()}),n.on("click",function(e){var o=e.clientY-i(this).offset().top;o<0&&(o=0),o>this.offsetHeight&&(o=this.offsetHeight);var r=o/180*360;D=r,L(r,H,E,W),e.preventDefault()}),y.on("mousedown",function(e){var i=this.offsetTop,o=this.offsetLeft,r=e.clientY,t=e.clientX,n=function(e){var n=i+(e.clientY-r),l=o+(e.clientX-t),a=c[0].offsetHeight-3,s=c[0].offsetWidth-3;n<-3&&(n=-3),n>a&&(n=a),l<-3&&(l=-3),l>s&&(l=s);var f=(l+3)/260*100,d=100-(n+3)/180*100;E=d,H=f,L(D,f,d,W),e.preventDefault()};layui.stope(e),Y(n),e.preventDefault()}),c.on("mousedown",function(e){var o=e.clientY-i(this).offset().top-3+B.scrollTop(),r=e.clientX-i(this).offset().left-3+B.scrollLeft();o<-3&&(o=-3),o>this.offsetHeight-3&&(o=this.offsetHeight-3),r<-3&&(r=-3),r>this.offsetWidth-3&&(r=this.offsetWidth-3);var t=(r+3)/260*100,n=100-(o+3)/180*100;E=n,H=t,L(D,t,n,W),e.preventDefault(),y.trigger(e,"mousedown")}),w.on("mousedown",function(e){var i=this.offsetLeft,o=e.clientX,r=function(e){var r=i+(e.clientX-o),t=C[0].offsetWidth;r<0&&(r=0),r>t&&(r=t);var n=Math.round(r/280*100)/100;W=n,L(D,H,E,n),e.preventDefault()};Y(r),e.preventDefault()}),C.on("click",function(e){var o=e.clientX-i(this).offset().left;o<0&&(o=0),o>this.offsetWidth&&(o=this.offsetWidth);var r=Math.round(o/280*100)/100;W=r,L(D,H,E,r),e.preventDefault()}),F.each(function(){i(this).on("click",function(){i(this).parent(".layui-colorpicker-pre").addClass("selected").siblings().removeClass("selected");var e,o=this.style.backgroundColor,r=k(P(o)),t=o.slice(o.lastIndexOf(",")+1,o.length-1);D=r.h,H=r.s,E=r.b,3==(o.match(/[0-9]{1,3}/g)||[]).length&&(t=1),W=t,e=280*t,L(r.h,r.s,r.b,t)})})},D.prototype.select=function(e,i,o,r){var t=this,n=(t.config,C({h:e,s:100,b:100})),l=C({h:e,s:i,b:o}),c=e/360*180,a=180-o/100*180-3,s=i/100*260-3;t.elemPicker.find("."+p).css("top",c),t.elemPicker.find("."+g)[0].style.background="#"+n,t.elemPicker.find("."+m).css({top:a,left:s}),"change"!==r&&t.elemPicker.find("."+b).find("input").val("#"+l)},D.prototype.pickerEvents=function(){var e=this,o=e.config,r=e.elemColorBox.find("."+f),t=e.elemPicker.find("."+b+" input"),n={clear:function(i){r[0].style.background="",e.elemColorBox.find("."+d).removeClass(a).addClass(s),e.color="",o.done&&o.done(""),e.removePicker()},confirm:function(i,n){var l=t.val(),c=l,f={};if(l.indexOf(",")>-1){if(f=k(P(l)),e.select(f.h,f.s,f.b),r[0].style.background=c="#"+C(f),(l.match(/[0-9]{1,3}/g)||[]).length>3&&"rgba"===r.attr("lay-type")){var u=280*l.slice(l.lastIndexOf(",")+1,l.length-1);e.elemPicker.find("."+h).css("left",u),r[0].style.background=l,c=l}}else f=y(l),r[0].style.background=c="#"+C(f),e.elemColorBox.find("."+d).removeClass(s).addClass(a);return"change"===n?(e.select(f.h,f.s,f.b,n),void(o.change&&o.change(c))):(e.color=l,o.done&&o.done(l),void e.removePicker())}};e.elemPicker.on("click","*[colorpicker-events]",function(){var e=i(this),o=e.attr("colorpicker-events");n[o]&&n[o].call(this,e)}),t.on("keyup",function(e){var o=i(this);n.confirm.call(this,o,13===e.keyCode?null:"change")})},D.prototype.events=function(){var e=this,o=e.config,r=e.elemColorBox.find("."+f);e.elemColorBox.on("click",function(){e.renderPicker(),i(c)[0]&&(e.val(),e.side())}),o.elem[0]&&!e.elemColorBox[0].eventHandler&&(w.on("click",function(o){if(!i(o.target).hasClass(l)&&!i(o.target).parents("."+l)[0]&&!i(o.target).hasClass(c.replace(/\./g,""))&&!i(o.target).parents(c)[0]&&e.elemPicker){if(e.color){var t=k(P(e.color));e.select(t.h,t.s,t.b)}else e.elemColorBox.find("."+d).removeClass(a).addClass(s);r[0].style.background=e.color||"",e.removePicker()}}),B.on("resize",function(){return!(!e.elemPicker||!i(c)[0])&&void e.position()}),e.elemColorBox[0].eventHandler=!0)},o.render=function(e){var i=new D(e);return r.call(i)},e(t,o)});layui.define("layer",function(e){"use strict";var t=layui.$,i=layui.layer,a=layui.hint(),n=layui.device(),l="form",r=".layui-form",s="layui-this",o="layui-hide",c="layui-disabled",u=function(){this.config={verify:{required:[/[\S]+/,"必填项不能为空"],phone:[/^1\d{10}$/,"请输入正确的手机号"],email:[/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/,"邮箱格式不正确"],url:[/(^#)|(^http(s*):\/\/[^\s]+\.[^\s]+)/,"链接格式不正确"],number:function(e){if(!e||isNaN(e))return"只能填写数字"},date:[/^(\d{4})[-\/](\d{1}|0\d{1}|1[0-2])([-\/](\d{1}|0\d{1}|[1-2][0-9]|3[0-1]))*$/,"日期格式不正确"],identity:[/(^\d{15}$)|(^\d{17}(x|X|\d)$)/,"请输入正确的身份证号"]}}};u.prototype.set=function(e){var i=this;return t.extend(!0,i.config,e),i},u.prototype.verify=function(e){var i=this;return t.extend(!0,i.config.verify,e),i},u.prototype.on=function(e,t){return layui.onevent.call(this,l,e,t)},u.prototype.val=function(e,i){var a=t(r+'[lay-filter="'+e+'"]');a.each(function(e,a){var n=t(this);layui.each(i,function(e,t){var i,a=n.find('[name="'+e+'"]');a[0]&&(i=a[0].type,"checkbox"===i?a[0].checked=t:"radio"===i?a.each(function(){this.value==t&&(this.checked=!0)}):a.val(t))})}),f.render(null,e)},u.prototype.render=function(e,i){var n=this,u=t(r+function(){return i?'[lay-filter="'+i+'"]':""}()),d={select:function(){var e,i="请选择",a="layui-form-select",n="layui-select-title",r="layui-select-none",d="",f=u.find("select"),v=function(i,l){t(i.target).parent().hasClass(n)&&!l||(t("."+a).removeClass(a+"ed "+a+"up"),e&&d&&e.val(d)),e=null},y=function(i,u,f){var y,p=t(this),m=i.find("."+n),k=m.find("input"),x=i.find("dl"),g=x.children("dd"),b=this.selectedIndex;if(!u){var C=function(){var e=i.offset().top+i.outerHeight()+5-h.scrollTop(),t=x.outerHeight();b=p[0].selectedIndex,i.addClass(a+"ed"),g.removeClass(o),y=null,g.eq(b).addClass(s).siblings().removeClass(s),e+t>h.height()&&e>=t&&i.addClass(a+"up"),T()},w=function(e){i.removeClass(a+"ed "+a+"up"),k.blur(),y=null,e||$(k.val(),function(e){var i=p[0].selectedIndex;e&&(d=t(p[0].options[i]).html(),0===i&&d===k.attr("placeholder")&&(d=""),k.val(d||""))})},T=function(){var e=x.children("dd."+s);if(e[0]){var t=e.position().top,i=x.height(),a=e.height();t>i&&x.scrollTop(t+x.scrollTop()-i+a-5),t<0&&x.scrollTop(t+x.scrollTop()-5)}};m.on("click",function(e){i.hasClass(a+"ed")?w():(v(e,!0),C()),x.find("."+r).remove()}),m.find(".layui-edge").on("click",function(){k.focus()}),k.on("keyup",function(e){var t=e.keyCode;9===t&&C()}).on("keydown",function(e){var t=e.keyCode;9===t&&w();var i=function(t,a){var n,l;e.preventDefault();var r=function(){var e=x.children("dd."+s);if(x.children("dd."+o)[0]&&"next"===t){var i=x.children("dd:not(."+o+",."+c+")"),n=i.eq(0).index();if(n>=0&&n无匹配项

        '):x.find("."+r).remove()},"keyup"),""===t&&x.find("."+r).remove(),void T())};f&&k.on("keyup",q).on("blur",function(i){var a=p[0].selectedIndex;e=k,d=t(p[0].options[a]).html(),0===a&&d===k.attr("placeholder")&&(d=""),setTimeout(function(){$(k.val(),function(e){d||k.val("")},"blur")},200)}),g.on("click",function(){var e=t(this),a=e.attr("lay-value"),n=p.attr("lay-filter");return!e.hasClass(c)&&(e.hasClass("layui-select-tips")?k.val(""):(k.val(e.text()),e.addClass(s)),e.siblings().removeClass(s),p.val(a).removeClass("layui-form-danger"),layui.event.call(this,l,"select("+n+")",{elem:p[0],value:a,othis:i}),w(!0),!1)}),i.find("dl>dt").on("click",function(e){return!1}),t(document).off("click",v).on("click",v)}};f.each(function(e,l){var r=t(this),o=r.next("."+a),u=this.disabled,d=l.value,f=t(l.options[l.selectedIndex]),v=l.options[0];if("string"==typeof r.attr("lay-ignore"))return r.show();var h="string"==typeof r.attr("lay-search"),p=v?v.value?i:v.innerHTML||i:i,m=t(['
        ','
        ','','
        ','
        ',function(e){var t=[];return layui.each(e,function(e,a){0!==e||a.value?"optgroup"===a.tagName.toLowerCase()?t.push("
        "+a.label+"
        "):t.push('
        '+a.innerHTML+"
        "):t.push('
        '+(a.innerHTML||i)+"
        ")}),0===t.length&&t.push('
        没有选项
        '),t.join("")}(r.find("*"))+"
        ","
        "].join(""));o[0]&&o.remove(),r.after(m),y.call(this,m,u,h)})},checkbox:function(){var e={checkbox:["layui-form-checkbox","layui-form-checked","checkbox"],_switch:["layui-form-switch","layui-form-onswitch","switch"]},i=u.find("input[type=checkbox]"),a=function(e,i){var a=t(this);e.on("click",function(){var t=a.attr("lay-filter"),n=(a.attr("lay-text")||"").split("|");a[0].disabled||(a[0].checked?(a[0].checked=!1,e.removeClass(i[1]).find("em").text(n[1])):(a[0].checked=!0,e.addClass(i[1]).find("em").text(n[0])),layui.event.call(a[0],l,i[2]+"("+t+")",{elem:a[0],value:a[0].value,othis:e}))})};i.each(function(i,n){var l=t(this),r=l.attr("lay-skin"),s=(l.attr("lay-text")||"").split("|"),o=this.disabled;"switch"===r&&(r="_"+r);var u=e[r]||e.checkbox;if("string"==typeof l.attr("lay-ignore"))return l.show();var d=l.next("."+u[0]),f=t(['
        ",function(){var e=n.title.replace(/\s/g,""),t={checkbox:[e?""+n.title+"":"",''].join(""),_switch:""+((n.checked?s[0]:s[1])||"")+""};return t[r]||t.checkbox}(),"
        "].join(""));d[0]&&d.remove(),l.after(f),a.call(this,f,u)})},radio:function(){var e="layui-form-radio",i=["",""],a=u.find("input[type=radio]"),n=function(a){var n=t(this),s="layui-anim-scaleSpring";a.on("click",function(){var o=n[0].name,c=n.parents(r),u=n.attr("lay-filter"),d=c.find("input[name="+o.replace(/(\.|#|\[|\])/g,"\\$1")+"]");n[0].disabled||(layui.each(d,function(){var a=t(this).next("."+e);this.checked=!1,a.removeClass(e+"ed"),a.find(".layui-icon").removeClass(s).html(i[1])}),n[0].checked=!0,a.addClass(e+"ed"),a.find(".layui-icon").addClass(s).html(i[0]),layui.event.call(n[0],l,"radio("+u+")",{elem:n[0],value:n[0].value,othis:a}))})};a.each(function(a,l){var r=t(this),s=r.next("."+e),o=this.disabled;if("string"==typeof r.attr("lay-ignore"))return r.show();s[0]&&s.remove();var u=t(['
        ',''+i[l.checked?0:1]+"","
        "+function(){var e=l.title||"";return"string"==typeof r.next().attr("lay-radio")&&(e=r.next().html(),r.next().remove()),e}()+"
        ","
        "].join(""));r.after(u),n.call(this,u)})}};return e?d[e]?d[e]():a.error("不支持的"+e+"表单渲染"):layui.each(d,function(e,t){t()}),n};var d=function(){var e=t(this),a=f.config.verify,s=null,o="layui-form-danger",c={},u=e.parents(r),d=u.find("*[lay-verify]"),v=e.parents("form")[0],h=u.find("input,select,textarea"),y=e.attr("lay-filter");if(layui.each(d,function(e,l){var r=t(this),c=r.attr("lay-verify").split("|"),u=r.attr("lay-verType"),d=r.val();if(r.removeClass(o),layui.each(c,function(e,t){var c,f="",v="function"==typeof a[t];if(a[t]){var c=v?f=a[t](d,l):!a[t][0].test(d);if(f=f||a[t][1],"required"===t&&(f=r.attr("lay-reqText")||f),c)return"tips"===u?i.tips(f,function(){return"string"==typeof r.attr("lay-ignore")||"select"!==l.tagName.toLowerCase()&&!/^checkbox|radio$/.test(l.type)?r:r.next()}(),{tips:1}):"alert"===u?i.alert(f,{title:"提示",shadeClose:!0}):i.msg(f,{icon:5,shift:6}),n.android||n.ios||setTimeout(function(){l.focus()},7),r.addClass(o),s=!0}}),s)return s}),s)return!1;var p={};return layui.each(h,function(e,t){if(t.name=(t.name||"").replace(/^\s*|\s*&/,""),t.name){if(/^.*\[\]$/.test(t.name)){var i=t.name.match(/^(.*)\[\]$/g)[0];p[i]=0|p[i],t.name=t.name.replace(/^(.*)\[\]$/,"$1["+p[i]++ +"]")}/^checkbox|radio$/.test(t.type)&&!t.checked||(c[t.name]=t.value)}}),layui.event.call(this,l,"submit("+y+")",{elem:this,form:v,field:c})},f=new u,v=t(document),h=t(window);f.render(),v.on("reset",r,function(){var e=t(this).attr("lay-filter");setTimeout(function(){f.render(null,e)},50)}),v.on("submit",r,d).on("click","*[lay-submit]",d),e(l,f)});layui.define("form",function(e){"use strict";var i=layui.$,a=layui.form,n="tree",r={config:{},index:layui[n]?layui[n].index+1e4:0,set:function(e){var a=this;return a.config=i.extend({},a.config,e),a},on:function(e,i){return layui.onevent.call(this,n,e,i)}},l=function(){var e=this,i=e.config,a=i.id||e.index;return l.that[a]=e,l.config[a]=i,{config:i,reload:function(i){e.reload.call(e,i)},getChecked:function(){return e.getChecked.call(e)},setChecked:function(i){return e.setChecked.call(e,i)}}},t="layui-hide",d="layui-disabled",s="layui-tree-set",c="layui-tree-iconClick",o="layui-icon-addition",h="layui-icon-subtraction",u="layui-tree-entry",f="layui-tree-main",p="layui-tree-txt",y="layui-tree-pack",v="layui-tree-spread",C="layui-tree-setLineShort",m="layui-tree-showLine",k="layui-tree-lineExtend",g=function(e){var a=this;a.index=++r.index,a.config=i.extend({},a.config,r.config,e),a.render()};g.prototype.config={data:[],showCheckbox:!1,showLine:!0,accordion:!1,onlyIconControl:!1,isJump:!1,edit:!1,text:{defaultNodeName:"未命名",none:"无数据"}},g.prototype.reload=function(e){var a=this;layui.each(e,function(e,i){i.constructor===Array&&delete a.config[e]}),a.config=i.extend(!0,{},a.config,e),a.render()},g.prototype.render=function(){var e=this,a=e.config,n=i('
        ');e.tree(n);var r=a.elem=i(a.elem);if(r[0]){if(a.showSearch&&n.prepend(''),e.key=a.id||e.index,e.elem=n,e.elemNone=i('
        '+a.text.none+"
        "),r.html(e.elem),0==e.elem.find(".layui-tree-set").length)return e.elem.append(e.elemNone);a.drag&&e.drag(),a.showCheckbox&&e.renderForm("checkbox"),e.elem.find(".layui-tree-set").each(function(){var e=i(this);e.parent(".layui-tree-pack")[0]||e.addClass("layui-tree-setHide"),!e.next()[0]&&e.parents(".layui-tree-pack").eq(1).hasClass("layui-tree-lineExtend")&&e.addClass(C),e.next()[0]||e.parents(".layui-tree-set").eq(0).next()[0]||e.addClass(C)}),e.events()}},g.prototype.renderForm=function(e){a.render(e,"LAY-tree-"+this.index)},g.prototype.tree=function(e,a){var n=this,r=n.config,l=a||r.data;layui.each(l,function(a,l){var c=l.children&&l.children.length>0,o=i('
        '),h=i(['
        ',"
        ','
        ',function(){return r.showLine?c?'':'':''}(),function(){return r.showCheckbox?'':""}(),function(){return r.isJump&&l.href?''+(l.title||l.label||r.text.defaultNodeName)+"":''+(l.title||l.label||r.text.defaultNodeName)+""}(),"
        ",function(){if(!r.edit)return"";var e={add:'',update:'',del:''},i=['
        '];return r.edit===!0&&(r.edit=["update","del"]),"object"==typeof r.edit?(layui.each(r.edit,function(a,n){i.push(e[n]||"")}),i.join("")+"
        "):void 0}(),"
        "].join(""));c&&(h.append(o),n.tree(o,l.children)),e.append(h),h.prev("."+s)[0]&&h.prev().children(".layui-tree-pack").addClass("layui-tree-showLine"),c||h.parent(".layui-tree-pack").addClass("layui-tree-lineExtend"),n.spread(h,l),r.showCheckbox&&n.checkClick(h,l),r.edit&&n.operate(h,l)})},g.prototype.spread=function(e,a){var n=this,r=n.config,l=e.children("."+u),t=l.children("."+f),C=l.find("."+c),m=l.find("."+p),k=r.onlyIconControl?C:t,g="";k.on("click",function(i){var a=e.children("."+y),n=k.children(".layui-icon")[0]?k.children(".layui-icon"):k.find(".layui-tree-icon").children(".layui-icon");if(a[0]){if(e.hasClass(v))e.removeClass(v),a.slideUp(200),n.removeClass(h).addClass(o);else if(e.addClass(v),a.slideDown(200),n.addClass(h).removeClass(o),r.accordion){var l=e.siblings("."+s);l.removeClass(v),l.children("."+y).slideUp(200),l.find(".layui-tree-icon").children(".layui-icon").removeClass(h).addClass(o)}}else g="normal"}),m.on("click",function(){var n=i(this);n.hasClass(d)||(g=e.hasClass(v)?r.onlyIconControl?"open":"close":r.onlyIconControl?"close":"open",r.click&&r.click({elem:e,state:g,data:a}))})},g.prototype.setCheckbox=function(e,i,a){var n=this,r=(n.config,a.prop("checked"));if("object"==typeof i.children||e.find("."+y)[0]){var l=e.find("."+y).find('input[name="layuiTreeCheck"]');l.each(function(){this.disabled||(this.checked=r)})}var t=function(e){if(e.parents("."+s)[0]){var i,a=e.parent("."+y),n=a.parent(),l=a.prev().find('input[name="layuiTreeCheck"]');r?l.prop("checked",r):(a.find('input[name="layuiTreeCheck"]').each(function(){this.checked&&(i=!0)}),i||l.prop("checked",!1)),t(n)}};t(e),n.renderForm("checkbox")},g.prototype.checkClick=function(e,a){var n=this,r=n.config,l=e.children("."+u),t=l.children("."+f);t.on("click",'input[name="layuiTreeCheck"]+',function(l){layui.stope(l);var t=i(this).prev(),d=t.prop("checked");t.prop("disabled")||(n.setCheckbox(e,a,t),r.oncheck&&r.oncheck({elem:e,checked:d,data:a}))})},g.prototype.operate=function(e,a){var n=this,r=n.config,l=e.children("."+u),d=l.children("."+f);l.children(".layui-tree-btnGroup").on("click",".layui-icon",function(l){layui.stope(l);var f=i(this).data("type"),g=e.children("."+y),x={data:a,type:f,elem:e};if("add"==f){g[0]||(r.showLine?(d.find("."+c).addClass("layui-tree-icon"),d.find("."+c).children(".layui-icon").addClass(o).removeClass("layui-icon-file")):d.find(".layui-tree-iconArrow").removeClass(t),e.append('
        '));var b=r.operate&&r.operate(x),w={};if(w.title=r.text.defaultNodeName,w.id=b,n.tree(e.children("."+y),[w]),r.showLine)if(g[0])g.hasClass(k)||g.addClass(k),e.find("."+y).each(function(){i(this).children("."+s).last().addClass(C)}),g.children("."+s).last().prev().hasClass(C)?g.children("."+s).last().prev().removeClass(C):g.children("."+s).last().removeClass(C),!e.parent("."+y)[0]&&e.next()[0]&&g.children("."+s).last().removeClass(C);else{var T=e.siblings("."+s),L=1,N=e.parent("."+y);layui.each(T,function(e,a){i(a).children("."+y)[0]||(L=0)}),1==L?(T.children("."+y).addClass(m),T.children("."+y).children("."+s).removeClass(C),e.children("."+y).addClass(m),N.removeClass(k),N.children("."+s).last().children("."+y).children("."+s).last().addClass(C)):e.children("."+y).children("."+s).addClass(C)}if(!r.showCheckbox)return;if(d.find('input[name="layuiTreeCheck"]')[0].checked){var A=e.children("."+y).children("."+s).last();A.find('input[name="layuiTreeCheck"]')[0].checked=!0}n.renderForm("checkbox")}else if("update"==f){var q=d.children("."+p).html();d.children("."+p).html(""),d.append(''),d.children(".layui-tree-editInput").val(q).focus();var F=function(e){var i=e.val().trim();i=i?i:r.text.defaultNodeName,e.remove(),d.children("."+p).html(i),x.data.title=i,r.operate&&r.operate(x)};d.children(".layui-tree-editInput").blur(function(){F(i(this))}),d.children(".layui-tree-editInput").on("keydown",function(e){13===e.keyCode&&(e.preventDefault(),F(i(this)))})}else{if(r.operate&&r.operate(x),x.status="remove",!e.prev("."+s)[0]&&!e.next("."+s)[0]&&!e.parent("."+y)[0])return e.remove(),void n.elem.append(n.elemNone);if(e.siblings("."+s).children("."+u)[0]){if(r.showCheckbox){var I=function(e){if(e.parents("."+s)[0]){var a=e.siblings("."+s).children("."+u),r=e.parent("."+y).prev(),l=r.find('input[name="layuiTreeCheck"]')[0],t=1,d=0;0==l.checked&&(a.each(function(e,a){var n=i(a).find('input[name="layuiTreeCheck"]')[0];0!=n.checked||n.disabled||(t=0),n.disabled||(d=1)}),1==t&&1==d&&(l.checked=!0,n.renderForm("checkbox"),I(r.parent("."+s))))}};I(e)}if(r.showLine){var T=e.siblings("."+s),L=1,N=e.parent("."+y);layui.each(T,function(e,a){i(a).children("."+y)[0]||(L=0)}),1==L?(g[0]||(N.removeClass(k),T.children("."+y).addClass(m),T.children("."+y).children("."+s).removeClass(C)),e.next()[0]?N.children("."+s).last().children("."+y).children("."+s).last().addClass(C):e.prev().children("."+y).children("."+s).last().addClass(C),e.next()[0]||e.parents("."+s)[1]||e.parents("."+s).eq(0).next()[0]||e.prev("."+s).addClass(C)):!e.next()[0]&&e.hasClass(C)&&e.prev().addClass(C)}}else{var H=e.parent("."+y).prev();if(r.showLine){H.find("."+c).removeClass("layui-tree-icon"),H.find("."+c).children(".layui-icon").removeClass(h).addClass("layui-icon-file");var S=H.parents("."+y).eq(0);S.addClass(k),S.children("."+s).each(function(){i(this).children("."+y).children("."+s).last().addClass(C)})}else H.find(".layui-tree-iconArrow").addClass(t);e.parents("."+s).eq(0).removeClass(v),e.parent("."+y).remove()}e.remove()}})},g.prototype.drag=function(){var e=this,a=e.config;e.elem.on("dragstart","."+u,function(){var e=i(this).parent("."+s),n=e.parents("."+s)[0]?e.parents("."+s).eq(0):"未找到父节点";a.dragstart&&a.dragstart(e,n)}),e.elem.on("dragend","."+u,function(n){var n=n||event,r=n.clientY,l=i(this),d=l.parent("."+s),f=d.height(),p=d.offset().top,g=e.elem.find("."+s),x=e.elem.height(),b=e.elem.offset().top,w=x+b-13,T=d.parents("."+s)[0],L=d.next()[0];if(T)var N=d.parent("."+y),A=d.parents("."+s).eq(0),q=A.parent("."+y),F=A.offset().top,I=d.siblings(),H=A.children("."+y).children("."+s).length;var S=function(n){if(T||L||e.elem.children("."+s).last().children("."+y).children("."+s).last().addClass(C),!T)return void d.removeClass("layui-tree-setHide");if(1==H)a.showLine?(n.find("."+c).removeClass("layui-tree-icon"),n.find("."+c).children(".layui-icon").removeClass(h).addClass("layui-icon-file"),q.addClass(k),q.children("."+s).children("."+y).each(function(){i(this).children("."+s).last().addClass(C)})):n.find(".layui-tree-iconArrow").addClass(t),n.children("."+y).remove(),n.removeClass(v);else{if(a.showLine){var r=1;layui.each(I,function(e,a){i(a).children("."+y)[0]||(r=0)}),1==r?(d.children("."+y)[0]||(N.removeClass(k),I.children("."+y).addClass(m),I.children("."+y).children("."+s).removeClass(C)),N.children("."+s).last().children("."+y).children("."+s).last().addClass(C),L||n.parents("."+s)[0]||n.next()[0]||N.children("."+s).last().addClass(C)):!L&&d.hasClass(C)&&N.children("."+s).last().addClass(C)}if(a.showCheckbox){var l=function(a){if(a){if(!a.parents("."+s)[0])return}else if(!n[0])return;var r=a?a.siblings().children("."+u):I.children("."+u),t=a?a.parent("."+y).prev():N.prev(),d=t.find('input[name="layuiTreeCheck"]')[0],c=1,o=0;0==d.checked&&(r.each(function(e,a){var n=i(a).find('input[name="layuiTreeCheck"]')[0];0!=n.checked||n.disabled||(c=0),n.disabled||(o=1)}),1==c&&1==o&&(d.checked=!0,e.renderForm("checkbox"),l(t.parent("."+s)||n)))};l()}}};g.each(function(){if(0!=i(this).height()){if(r>p&&rF&&rn&&r
        ')),i(this).children("."+y).append(d),S(A),a.showLine){var l=i(this).children("."+y).children("."+s);if(d.children("."+y).children("."+s).last().addClass(C),1==l.length){var h=i(this).siblings("."+s),v=1,g=i(this).parent("."+y);layui.each(h,function(e,a){i(a).children("."+y)[0]||(v=0)}),1==v?(h.children("."+y).addClass(m),h.children("."+y).children("."+s).removeClass(C),i(this).children("."+y).addClass(m),g.removeClass(k),g.children("."+s).last().children("."+y).children("."+s).last().addClass(C).removeClass("layui-tree-setHide")):i(this).children("."+y).children("."+s).addClass(C).removeClass("layui-tree-setHide")}else d.prev("."+s).hasClass(C)?(d.prev("."+s).removeClass(C),d.addClass(C)):(d.removeClass("layui-tree-setLineShort layui-tree-setHide"),d.children("."+y)[0]?d.prev("."+s).children("."+y).children("."+s).last().removeClass(C):d.siblings("."+s).find("."+y).each(function(){i(this).children("."+s).last().addClass(C)})),i(this).next()[0]||d.addClass(C)}if(a.showCheckbox&&i(this).children("."+u).find('input[name="layuiTreeCheck"]')[0].checked){var x=d.children("."+u);x.find('input[name="layuiTreeCheck"]+').click()}return a.dragend&&a.dragend("drag success",d,i(this)),!1}if(rw)return e.elem.children("."+s).last().children("."+y).addClass(m),e.elem.append(d),S(A),d.prev().children("."+y).children("."+s).last().removeClass(C),d.addClass("layui-tree-setHide"),d.children("."+y).children("."+s).last().addClass(C),a.dragend&&a.dragend("拖拽成功,插入最外层节点",d,e.elem),!1}})})},g.prototype.events=function(){var e=this,a=e.config,n=e.elem.find(".layui-tree-checkedFirst");layui.each(n,function(e,a){i(a).children("."+u).find('input[name="layuiTreeCheck"]+').trigger("click")}),e.elem.find(".layui-tree-search").on("keyup",function(){var n=i(this),r=n.val(),l=n.nextAll(),d=[];l.find("."+p).each(function(){var e=i(this).parents("."+u);if(i(this).html().indexOf(r)!=-1){d.push(i(this).parent());var a=function(e){e.addClass("layui-tree-searchShow"),e.parent("."+y)[0]&&a(e.parent("."+y).parent("."+s))};a(e.parent("."+s))}}),l.find("."+u).each(function(){var e=i(this).parent("."+s);e.hasClass("layui-tree-searchShow")||e.addClass(t)}),0==l.find(".layui-tree-searchShow").length&&e.elem.append(e.elemNone),a.onsearch&&a.onsearch({elem:d})}),e.elem.find(".layui-tree-search").on("keydown",function(){i(this).nextAll().find("."+u).each(function(){var e=i(this).parent("."+s);e.removeClass("layui-tree-searchShow "+t)}),i(".layui-tree-emptyText")[0]&&i(".layui-tree-emptyText").remove()})},g.prototype.getChecked=function(){var e=this,a=e.config,n=[],r=[];e.elem.find(".layui-form-checked").each(function(){n.push(i(this).prev()[0].value)});var l=function(e,a){layui.each(e,function(e,r){layui.each(n,function(e,n){if(r.id==n){var t=i.extend({},r);return delete t.children,a.push(t),r.children&&(t.children=[],l(r.children,t.children)),!0}})})};return l(i.extend({},a.data),r),r},g.prototype.setChecked=function(e){var a=this;a.config;a.elem.find("."+s).each(function(a,n){var r=i(this).data("id"),l=i(n).children("."+u).find('input[name="layuiTreeCheck"]'),t=l.next();if("number"==typeof e){if(r==e)return l[0].checked||t.click(),!1}else i.inArray(r,e)!=-1&&(l[0].checked||t.click())})},l.that={},l.config={},r.reload=function(e,i){var a=l.that[e];return a.reload(i),l.call(a)},r.getChecked=function(e){var i=l.that[e];return i.getChecked()},r.setChecked=function(e,i){var a=l.that[e];return a.setChecked(i)},r.render=function(e){var i=new g(e);return l.call(i)},e(n,r)});layui.define(["laytpl","form"],function(e){"use strict";var a=layui.$,t=layui.laytpl,n=layui.form,i="transfer",l={config:{},index:layui[i]?layui[i].index+1e4:0,set:function(e){var t=this;return t.config=a.extend({},t.config,e),t},on:function(e,a){return layui.onevent.call(this,i,e,a)}},r=function(){var e=this,a=e.config,t=a.id||e.index;return r.that[t]=e,r.config[t]=a,{config:a,reload:function(a){e.reload.call(e,a)},getData:function(){return e.getData.call(e)}}},c="layui-hide",o="layui-btn-disabled",d="layui-none",s="layui-transfer-box",u="layui-transfer-header",h="layui-transfer-search",f="layui-transfer-active",y="layui-transfer-data",p=function(e){return e=e||{},['
        ','
        ','","
        ","{{# if(d.data.showSearch){ }}",'","{{# } }}",'
          ',"
          "].join("")},v=['
          ',p({index:0,checkAllName:"layTransferLeftCheckAll"}),'
          ','",'","
          ",p({index:1,checkAllName:"layTransferRightCheckAll"}),"
          "].join(""),x=function(e){var t=this;t.index=++l.index,t.config=a.extend({},t.config,l.config,e),t.render()};x.prototype.config={title:["列表一","列表二"],width:200,height:360,data:[],value:[],showSearch:!1,id:"",text:{none:"无数据",searchNone:"无匹配数据"}},x.prototype.reload=function(e){var t=this;layui.each(e,function(e,a){a.constructor===Array&&delete t.config[e]}),t.config=a.extend(!0,{},t.config,e),t.render()},x.prototype.render=function(){var e=this,n=e.config,i=e.elem=a(t(v).render({data:n,index:e.index})),l=n.elem=a(n.elem);l[0]&&(n.data=n.data||[],n.value=n.value||[],e.key=n.id||e.index,l.html(e.elem),e.layBox=e.elem.find("."+s),e.layHeader=e.elem.find("."+u),e.laySearch=e.elem.find("."+h),e.layData=i.find("."+y),e.layBtn=i.find("."+f+" .layui-btn"),e.layBox.css({width:n.width,height:n.height}),e.layData.css({height:function(){return n.height-e.layHeader.outerHeight()-e.laySearch.outerHeight()-2}()}),e.renderData(),e.events())},x.prototype.renderData=function(){var e=this,a=(e.config,[{checkName:"layTransferLeftCheck",views:[]},{checkName:"layTransferRightCheck",views:[]}]);e.parseData(function(e){var t=e.selected?1:0,n=["
        • ",'',"
        • "].join("");a[t].views.push(n),delete e.selected}),e.layData.eq(0).html(a[0].views.join("")),e.layData.eq(1).html(a[1].views.join("")),e.renderCheckBtn()},x.prototype.renderForm=function(e){n.render(e,"LAY-transfer-"+this.index)},x.prototype.renderCheckBtn=function(e){var t=this,n=t.config;e=e||{},t.layBox.each(function(i){var l=a(this),r=l.find("."+y),d=l.find("."+u).find('input[type="checkbox"]'),s=r.find('input[type="checkbox"]'),h=0,f=!1;if(s.each(function(){var e=a(this).data("hide");(this.checked||this.disabled||e)&&h++,this.checked&&!e&&(f=!0)}),d.prop("checked",f&&h===s.length),t.layBtn.eq(i)[f?"removeClass":"addClass"](o),!e.stopNone){var p=r.children("li:not(."+c+")").length;t.noneView(r,p?"":n.text.none)}}),t.renderForm("checkbox")},x.prototype.noneView=function(e,t){var n=a('

          '+(t||"")+"

          ");e.find("."+d)[0]&&e.find("."+d).remove(),t.replace(/\s/g,"")&&e.append(n)},x.prototype.setValue=function(){var e=this,t=e.config,n=[];return e.layBox.eq(1).find("."+y+' input[type="checkbox"]').each(function(){var e=a(this).data("hide");e||n.push(this.value)}),t.value=n,e},x.prototype.parseData=function(e){var t=this,n=t.config,i=[];return layui.each(n.data,function(t,l){l=("function"==typeof n.parseData?n.parseData(l):l)||l,i.push(l=a.extend({},l)),layui.each(n.value,function(e,a){a==l.value&&(l.selected=!0)}),e&&e(l)}),n.data=i,t},x.prototype.getData=function(e){var a=this,t=a.config,n=[];return layui.each(e||t.value,function(e,a){layui.each(t.data,function(e,t){delete t.selected,a==t.value&&n.push(t)})}),n},x.prototype.events=function(){var e=this,t=e.config;e.elem.on("click",'input[lay-filter="layTransferCheckbox"]+',function(){var t=a(this).prev(),n=t[0].checked,i=t.parents("."+s).eq(0).find("."+y);t[0].disabled||("all"===t.attr("lay-type")&&i.find('input[type="checkbox"]').each(function(){this.disabled||(this.checked=n)}),e.renderCheckBtn({stopNone:!0}))}),e.layBtn.on("click",function(){var n=a(this),i=n.data("index"),l=e.layBox.eq(i),r=[];if(!n.hasClass(o)){e.layBox.eq(i).each(function(t){var n=a(this),i=n.find("."+y);i.children("li").each(function(){var t=a(this),n=t.find('input[type="checkbox"]'),i=n.data("hide");n[0].checked&&!i&&(n[0].checked=!1,l.siblings("."+s).find("."+y).append(t.clone()),t.remove(),r.push(n[0].value)),e.setValue()})}),e.renderCheckBtn();var c=l.siblings("."+s).find("."+h+" input");""===c.val()||c.trigger("keyup"),t.onchange&&t.onchange(e.getData(r),i)}}),e.laySearch.find("input").on("keyup",function(){var n=this.value,i=a(this).parents("."+h).eq(0).siblings("."+y),l=i.children("li");l.each(function(){var e=a(this),t=e.find('input[type="checkbox"]'),i=t[0].title.indexOf(n)!==-1;e[i?"removeClass":"addClass"](c),t.data("hide",!i)}),e.renderCheckBtn();var r=l.length===i.children("li."+c).length;e.noneView(i,r?t.text.searchNone:"")})},r.that={},r.config={},l.reload=function(e,a){var t=r.that[e];return t.reload(a),r.call(t)},l.getData=function(e){var a=r.that[e];return a.getData()},l.render=function(e){var a=new x(e);return r.call(a)},e(i,l)});layui.define(["laytpl","laypage","layer","form","util"],function(e){"use strict";var t=layui.$,i=layui.laytpl,a=layui.laypage,l=layui.layer,n=layui.form,o=(layui.util,layui.hint()),r=layui.device(),d={config:{checkName:"LAY_CHECKED",indexName:"LAY_TABLE_INDEX"},cache:{},index:layui.table?layui.table.index+1e4:0,set:function(e){var i=this;return i.config=t.extend({},i.config,e),i},on:function(e,t){return layui.onevent.call(this,y,e,t)}},c=function(){var e=this,t=e.config,i=t.id||t.index;return i&&(c.that[i]=e,c.config[i]=t),{config:t,reload:function(t){e.reload.call(e,t)},setColsWidth:function(){e.setColsWidth.call(e)},resize:function(){e.resize.call(e)}}},s=function(e){var t=c.config[e];return t||o.error("The ID option was not found in the table instance"),t||null},u=function(e,a,l,n){var o=e.templet?function(){return"function"==typeof e.templet?e.templet(l):i(t(e.templet).html()||String(a)).render(l)}():a;return n?t("
          "+o+"
          ").text():o},y="table",h=".layui-table",f="layui-hide",p="layui-none",v="layui-table-view",m=".layui-table-tool",g=".layui-table-box",b=".layui-table-init",x=".layui-table-header",k=".layui-table-body",C=".layui-table-main",w=".layui-table-fixed",T=".layui-table-fixed-l",A=".layui-table-fixed-r",L=".layui-table-total",N=".layui-table-page",S=".layui-table-sort",W="layui-table-edit",_="layui-table-hover",E=function(e){var t='{{#if(item2.colspan){}} colspan="{{item2.colspan}}"{{#} if(item2.rowspan){}} rowspan="{{item2.rowspan}}"{{#}}}';return e=e||{},['',"","{{# layui.each(d.data.cols, function(i1, item1){ }}","","{{# layui.each(item1, function(i2, item2){ }}",'{{# if(item2.fixed && item2.fixed !== "right"){ left = true; } }}','{{# if(item2.fixed === "right"){ right = true; } }}',function(){return e.fixed&&"right"!==e.fixed?'{{# if(item2.fixed && item2.fixed !== "right"){ }}':"right"===e.fixed?'{{# if(item2.fixed === "right"){ }}':""}(),"{{# var isSort = !(item2.colGroup) && item2.sort; }}",'",e.fixed?"{{# }; }}":"","{{# }); }}","","{{# }); }}","","
          ','
          ','{{# if(item2.type === "checkbox"){ }}','',"{{# } else { }}",'{{item2.title||""}}',"{{# if(isSort){ }}",'',"{{# } }}","{{# } }}","
          ","
          "].join("")},z=['',"","
          "].join(""),H=['
          ',"{{# if(d.data.toolbar){ }}",'
          ','
          ','
          ',"
          ","{{# } }}",'
          ',"{{# if(d.data.loading){ }}",'
          ','',"
          ","{{# } }}","{{# var left, right; }}",'
          ',E(),"
          ",'
          ',z,"
          ","{{# if(left){ }}",'
          ','
          ',E({fixed:!0}),"
          ",'
          ',z,"
          ","
          ","{{# }; }}","{{# if(right){ }}",'
          ','
          ',E({fixed:"right"}),'
          ',"
          ",'
          ',z,"
          ","
          ","{{# }; }}","
          ","{{# if(d.data.totalRow){ }}",'
          ','','',"
          ","
          ","{{# } }}","{{# if(d.data.page){ }}",'
          ','
          ',"
          ","{{# } }}","","
          "].join(""),R=t(window),F=t(document),I=function(e){var i=this;i.index=++d.index,i.config=t.extend({},i.config,d.config,e),i.render()};I.prototype.config={limit:10,loading:!0,cellMinWidth:60,defaultToolbar:["filter","exports","print"],autoSort:!0,text:{none:"无数据"}},I.prototype.render=function(){var e=this,a=e.config;if(a.elem=t(a.elem),a.where=a.where||{},a.id=a.id||a.elem.attr("id")||e.index,a.request=t.extend({pageName:"page",limitName:"limit"},a.request),a.response=t.extend({statusName:"code",statusCode:0,msgName:"msg",dataName:"data",countName:"count"},a.response),"object"==typeof a.page&&(a.limit=a.page.limit||a.limit,a.limits=a.page.limits||a.limits,e.page=a.page.curr=a.page.curr||1,delete a.page.elem,delete a.page.jump),!a.elem[0])return e;a.height&&/^full-\d+$/.test(a.height)&&(e.fullHeightGap=a.height.split("-")[1],a.height=R.height()-e.fullHeightGap),e.setInit();var l=a.elem,n=l.next("."+v),o=e.elem=t(i(H).render({VIEW_CLASS:v,data:a,index:e.index}));if(a.index=e.index,e.key=a.id||a.index,n[0]&&n.remove(),l.after(o),e.layTool=o.find(m),e.layBox=o.find(g),e.layHeader=o.find(x),e.layMain=o.find(C),e.layBody=o.find(k),e.layFixed=o.find(w),e.layFixLeft=o.find(T),e.layFixRight=o.find(A),e.layTotal=o.find(L),e.layPage=o.find(N),e.renderToolbar(),e.fullSize(),a.cols.length>1){var r=e.layFixed.find(x).find("th");r.height(e.layHeader.height()-1-parseFloat(r.css("padding-top"))-parseFloat(r.css("padding-bottom")))}e.pullData(e.page),e.events()},I.prototype.initOpts=function(e){var t=this,i=(t.config,{checkbox:48,radio:48,space:15,numbers:40});e.checkbox&&(e.type="checkbox"),e.space&&(e.type="space"),e.type||(e.type="normal"),"normal"!==e.type&&(e.unresize=!0,e.width=e.width||i[e.type])},I.prototype.setInit=function(e){var t=this,i=t.config;return i.clientWidth=i.width||function(){var e=function(t){var a,l;t=t||i.elem.parent(),a=t.width();try{l="none"===t.css("display")}catch(n){}return!t[0]||a&&!l?a:e(t.parent())};return e()}(),"width"===e?i.clientWidth:void layui.each(i.cols,function(e,a){layui.each(a,function(l,n){if(!n)return void a.splice(l,1);if(n.key=e+"-"+l,n.hide=n.hide||!1,n.colGroup||n.colspan>1){var o=0;layui.each(i.cols[e+1],function(t,i){i.HAS_PARENT||o>1&&o==n.colspan||(i.HAS_PARENT=!0,i.parentKey=e+"-"+l,o+=parseInt(i.colspan>1?i.colspan:1))}),n.colGroup=!0}t.initOpts(n)})})},I.prototype.renderToolbar=function(){var e=this,a=e.config,l=['
          ','
          ','
          '].join(""),n=e.layTool.find(".layui-table-tool-temp");if("default"===a.toolbar)n.html(l);else if("string"==typeof a.toolbar){var o=t(a.toolbar).html()||"";o&&n.html(i(o).render(a))}var r={filter:{title:"筛选列",layEvent:"LAYTABLE_COLS",icon:"layui-icon-cols"},exports:{title:"导出",layEvent:"LAYTABLE_EXPORT",icon:"layui-icon-export"},print:{title:"打印",layEvent:"LAYTABLE_PRINT",icon:"layui-icon-print"}},d=[];"object"==typeof a.defaultToolbar&&layui.each(a.defaultToolbar,function(e,t){var i=r[t];i&&d.push('
          ')}),e.layTool.find(".layui-table-tool-self").html(d.join(""))},I.prototype.setParentCol=function(e,t){var i=this,a=i.config,l=i.layHeader.find('th[data-key="'+a.index+"-"+t+'"]'),n=parseInt(l.attr("colspan"))||0;if(l[0]){var o=t.split("-"),r=a.cols[o[0]][o[1]];e?n--:n++,l.attr("colspan",n),l[n<1?"addClass":"removeClass"](f),r.colspan=n,r.hide=n<1;var d=l.data("parentkey");d&&i.setParentCol(e,d)}},I.prototype.setColsPatch=function(){var e=this,t=e.config;layui.each(t.cols,function(t,i){layui.each(i,function(t,i){i.hide&&e.setParentCol(i.hide,i.parentKey)})})},I.prototype.setColsWidth=function(){var e=this,t=e.config,i=0,a=0,l=0,n=0,o=e.setInit("width");e.eachCols(function(e,t){t.hide||i++}),o=o-function(){return"line"===t.skin||"nob"===t.skin?2:i+1}()-e.getScrollWidth(e.layMain[0])-1;var r=function(e){layui.each(t.cols,function(i,r){layui.each(r,function(i,d){var c=0,s=d.minWidth||t.cellMinWidth;return d?void(d.colGroup||d.hide||(e?l&&ln&&a&&(l=(o-n)/a)};r(),r(!0),e.autoColNums=a,e.eachCols(function(i,a){var n=a.minWidth||t.cellMinWidth;a.colGroup||a.hide||(0===a.width?e.getCssRule(t.index+"-"+a.key,function(e){e.style.width=Math.floor(l>=n?l:n)+"px"}):/\d+%$/.test(a.width)&&e.getCssRule(t.index+"-"+a.key,function(e){e.style.width=Math.floor(parseFloat(a.width)/100*o)+"px"}))});var d=e.layMain.width()-e.getScrollWidth(e.layMain[0])-e.layMain.children("table").outerWidth();if(e.autoColNums&&d>=-i&&d<=i){var c=function(t){var i;return t=t||e.layHeader.eq(0).find("thead th:last-child"),i=t.data("field"),!i&&t.prev()[0]?c(t.prev()):t},s=c(),u=s.data("key");e.getCssRule(u,function(t){var i=t.style.width||s.outerWidth();t.style.width=parseFloat(i)+d+"px",e.layMain.height()-e.layMain.prop("clientHeight")>0&&(t.style.width=parseFloat(t.style.width)-1+"px")})}e.loading(!0)},I.prototype.resize=function(){var e=this;e.fullSize(),e.setColsWidth(),e.scrollPatch()},I.prototype.reload=function(e){var i=this;e=e||{},delete i.haveInit,e.data&&e.data.constructor===Array&&delete i.config.data,i.config=t.extend(!0,{},i.config,e),i.render()},I.prototype.errorView=function(e){var i=this,a=i.layMain.find("."+p),l=t('
          '+(e||"Error")+"
          ");a[0]&&(i.layNone.remove(),a.remove()),i.layFixed.addClass(f),i.layMain.find("tbody").html(""),i.layMain.append(i.layNone=l),d.cache[i.key]=[]},I.prototype.page=1,I.prototype.pullData=function(e){var i=this,a=i.config,l=a.request,n=a.response,o=function(){"object"==typeof a.initSort&&i.sort(a.initSort.field,a.initSort.type)};if(i.startTime=(new Date).getTime(),a.url){var r={};r[l.pageName]=e,r[l.limitName]=a.limit;var d=t.extend(r,a.where);a.contentType&&0==a.contentType.indexOf("application/json")&&(d=JSON.stringify(d)),i.loading(),t.ajax({type:a.method||"get",url:a.url,contentType:a.contentType,data:d,dataType:"json",headers:a.headers||{},success:function(t){"function"==typeof a.parseData&&(t=a.parseData(t)||t),t[n.statusName]!=n.statusCode?(i.renderForm(),i.errorView(t[n.msgName]||'返回的数据不符合规范,正确的成功状态码应为:"'+n.statusName+'": '+n.statusCode)):(i.renderData(t,e,t[n.countName]),o(),a.time=(new Date).getTime()-i.startTime+" ms"),i.setColsWidth(),"function"==typeof a.done&&a.done(t,e,t[n.countName])},error:function(e,t){i.errorView("数据接口请求异常:"+t),i.renderForm(),i.setColsWidth()}})}else if(a.data&&a.data.constructor===Array){var c={},s=e*a.limit-a.limit;c[n.dataName]=a.data.concat().splice(s,a.limit),c[n.countName]=a.data.length,i.renderData(c,e,c[n.countName]),o(),i.setColsWidth(),"function"==typeof a.done&&a.done(c,e,c[n.countName])}},I.prototype.eachCols=function(e){var t=this;return d.eachCols(null,e,t.config.cols),t},I.prototype.renderData=function(e,n,o,r){var c=this,s=c.config,y=e[s.response.dataName]||[],h=[],v=[],m=[],g=function(){var e;return!r&&c.sortKey?c.sort(c.sortKey.field,c.sortKey.sort,!0):(layui.each(y,function(a,l){var o=[],y=[],p=[],g=a+s.limit*(n-1)+1;0!==l.length&&(r||(l[d.config.indexName]=a),c.eachCols(function(n,r){var c=r.field||n,h=s.index+"-"+r.key,v=l[c];if(void 0!==v&&null!==v||(v=""),!r.colGroup){var m=['','
          '+function(){var n=t.extend(!0,{LAY_INDEX:g},l),o=d.config.checkName;switch(r.type){case"checkbox":return'";case"radio":return n[o]&&(e=a),'';case"numbers":return g}return r.toolbar?i(t(r.toolbar).html()||"").render(n):u(r,v,n)}(),"
          "].join("");o.push(m),r.fixed&&"right"!==r.fixed&&y.push(m),"right"===r.fixed&&p.push(m)}}),h.push(''+o.join("")+""),v.push(''+y.join("")+""),m.push(''+p.join("")+""))}),c.layBody.scrollTop(0),c.layMain.find("."+p).remove(),c.layMain.find("tbody").html(h.join("")),c.layFixLeft.find("tbody").html(v.join("")),c.layFixRight.find("tbody").html(m.join("")),c.renderForm(),"number"==typeof e&&c.setThisRowChecked(e),c.syncCheckAll(),c.haveInit?c.scrollPatch():setTimeout(function(){c.scrollPatch()},50),c.haveInit=!0,l.close(c.tipsIndex),s.HAS_SET_COLS_PATCH||c.setColsPatch(),void(s.HAS_SET_COLS_PATCH=!0))};return d.cache[c.key]=y,c.layPage[0==o||0===y.length&&1==n?"addClass":"removeClass"](f),r?g():0===y.length?(c.renderForm(),c.errorView(s.text.none)):(c.layFixed.removeClass(f),g(),c.renderTotal(y),void(s.page&&(s.page=t.extend({elem:"layui-table-page"+s.index,count:o,limit:s.limit,limits:s.limits||[10,20,30,40,50,60,70,80,90],groups:3,layout:["prev","page","next","skip","count","limit"],prev:'',next:'',jump:function(e,t){t||(c.page=e.curr,s.limit=e.limit,c.pullData(e.curr))}},s.page),s.page.count=o,a.render(s.page))))},I.prototype.renderTotal=function(e){var t=this,i=t.config,a={};if(i.totalRow){layui.each(e,function(e,i){0!==i.length&&t.eachCols(function(e,t){var l=t.field||e,n=i[l];t.totalRow&&(a[l]=(a[l]||0)+(parseFloat(n)||0))})});var l=[];t.eachCols(function(e,t){var n=t.field||e,o=['','
          '+function(){var e=t.totalRowText||"";return t.totalRow?parseFloat(a[n]).toFixed(2)||e:e}(),"
          "].join("");l.push(o)}),t.layTotal.find("tbody").html(""+l.join("")+"")}},I.prototype.getColElem=function(e,t){var i=this,a=i.config;return e.eq(0).find(".laytable-cell-"+(a.index+"-"+t)+":eq(0)")},I.prototype.renderForm=function(e){n.render(e,"LAY-table-"+this.index)},I.prototype.setThisRowChecked=function(e){var t=this,i=(t.config,"layui-table-click"),a=t.layBody.find('tr[data-index="'+e+'"]');a.addClass(i).siblings("tr").removeClass(i)},I.prototype.sort=function(e,i,a,l){var n,r,c=this,s={},u=c.config,h=u.elem.attr("lay-filter"),f=d.cache[c.key];"string"==typeof e&&c.layHeader.find("th").each(function(i,a){var l=t(this),o=l.data("field");if(o===e)return e=l,n=o,!1});try{var n=n||e.data("field"),p=e.data("key");if(c.sortKey&&!a&&n===c.sortKey.field&&i===c.sortKey.sort)return;var v=c.layHeader.find("th .laytable-cell-"+p).find(S);c.layHeader.find("th").find(S).removeAttr("lay-sort"),v.attr("lay-sort",i||null),c.layFixed.find("th")}catch(m){return o.error("Table modules: Did not match to field")}c.sortKey={field:n,sort:i},u.autoSort&&("asc"===i?r=layui.sort(f,n):"desc"===i?r=layui.sort(f,n,!0):(r=layui.sort(f,d.config.indexName),delete c.sortKey)),s[u.response.dataName]=r||f,c.renderData(s,c.page,c.count,!0),l&&layui.event.call(e,y,"sort("+h+")",{field:n,type:i})},I.prototype.loading=function(e){var i=this,a=i.config;a.loading&&(e?(i.layInit&&i.layInit.remove(),delete i.layInit,i.layBox.find(b).remove()):(i.layInit=t(['
          ','',"
          "].join("")),i.layBox.append(i.layInit)))},I.prototype.setCheckData=function(e,t){var i=this,a=i.config,l=d.cache[i.key];l[e]&&l[e].constructor!==Array&&(l[e][a.checkName]=t)},I.prototype.syncCheckAll=function(){var e=this,t=e.config,i=e.layHeader.find('input[name="layTableCheckbox"]'),a=function(i){return e.eachCols(function(e,a){"checkbox"===a.type&&(a[t.checkName]=i)}),i};i[0]&&(d.checkStatus(e.key).isAll?(i[0].checked||(i.prop("checked",!0),e.renderForm("checkbox")),a(!0)):(i[0].checked&&(i.prop("checked",!1),e.renderForm("checkbox")),a(!1)))},I.prototype.getCssRule=function(e,t){var i=this,a=i.elem.find("style")[0],l=a.sheet||a.styleSheet||{},n=l.cssRules||l.rules;layui.each(n,function(i,a){if(a.selectorText===".laytable-cell-"+e)return t(a),!0})},I.prototype.fullSize=function(){var e,t=this,i=t.config,a=i.height;t.fullHeightGap&&(a=R.height()-t.fullHeightGap,a<135&&(a=135),t.elem.css("height",a)),a&&(e=parseFloat(a)-(t.layHeader.outerHeight()||38),i.toolbar&&(e-=t.layTool.outerHeight()||50),i.totalRow&&(e-=t.layTotal.outerHeight()||40),i.page&&(e-=t.layPage.outerHeight()||41),t.layMain.css("height",e-2))},I.prototype.getScrollWidth=function(e){var t=0;return e?t=e.offsetWidth-e.clientWidth:(e=document.createElement("div"),e.style.width="100px",e.style.height="100px",e.style.overflowY="scroll",document.body.appendChild(e),t=e.offsetWidth-e.clientWidth,document.body.removeChild(e)),t},I.prototype.scrollPatch=function(){var e=this,i=e.layMain.children("table"),a=e.layMain.width()-e.layMain.prop("clientWidth"),l=e.layMain.height()-e.layMain.prop("clientHeight"),n=(e.getScrollWidth(e.layMain[0]),i.outerWidth()-e.layMain.width()),o=function(e){if(a&&l){if(e=e.eq(0),!e.find(".layui-table-patch")[0]){var i=t('
          ');i.find("div").css({width:a}),e.find("tr").append(i)}}else e.find(".layui-table-patch").remove()};o(e.layHeader),o(e.layTotal);var r=e.layMain.height(),d=r-l;e.layFixed.find(k).css("height",i.height()>=d?d:"auto"),e.layFixRight[n>0?"removeClass":"addClass"](f),e.layFixRight.css("right",a-1)},I.prototype.events=function(){var e,a=this,o=a.config,c=t("body"),s={},u=a.layHeader.find("th"),h=".layui-table-cell",p=o.elem.attr("lay-filter");a.layTool.on("click","*[lay-event]",function(e){var i=t(this),c=i.attr("lay-event"),s=function(e){var l=t(e.list),n=t('
            ');n.html(l),o.height&&n.css("max-height",o.height-(a.layTool.outerHeight()||50)),i.find(".layui-table-tool-panel")[0]||i.append(n),a.renderForm(),n.on("click",function(e){layui.stope(e)}),e.done&&e.done(n,l)};switch(layui.stope(e),F.trigger("table.tool.panel.remove"),l.close(a.tipsIndex),c){case"LAYTABLE_COLS":s({list:function(){var e=[];return a.eachCols(function(t,i){i.field&&"normal"==i.type&&e.push('
          • ')}),e.join("")}(),done:function(){n.on("checkbox(LAY_TABLE_TOOL_COLS)",function(e){var i=t(e.elem),l=this.checked,n=i.data("key"),r=i.data("parentkey");layui.each(o.cols,function(e,t){layui.each(t,function(t,i){if(e+"-"+t===n){var d=i.hide;i.hide=!l,a.elem.find('*[data-key="'+o.index+"-"+n+'"]')[l?"removeClass":"addClass"](f),d!=i.hide&&a.setParentCol(!l,r),a.resize()}})})})}});break;case"LAYTABLE_EXPORT":r.ie?l.tips("导出功能不支持 IE,请用 Chrome 等高级浏览器导出",this,{tips:3}):s({list:function(){return['
          • 导出到 Csv 文件
          • ','
          • 导出到 Excel 文件
          • '].join("")}(),done:function(e,i){i.on("click",function(){var e=t(this).data("type");d.exportFile(o.id,null,e)})}});break;case"LAYTABLE_PRINT":var u=window.open("打印窗口","_blank"),h=[""].join(""),v=t(a.layHeader.html());v.append(a.layMain.find("table").html()),v.append(a.layTotal.find("table").html()),v.find("th.layui-table-patch").remove(),v.find(".layui-table-col-special").remove(),u.document.write(h+v.prop("outerHTML")),u.document.close(),u.print(),u.close()}layui.event.call(this,y,"toolbar("+p+")",t.extend({event:c,config:o},{}))}),u.on("mousemove",function(e){var i=t(this),a=i.offset().left,l=e.clientX-a;i.data("unresize")||s.resizeStart||(s.allowResize=i.width()-l<=10,c.css("cursor",s.allowResize?"col-resize":""))}).on("mouseleave",function(){t(this);s.resizeStart||c.css("cursor","")}).on("mousedown",function(e){var i=t(this);if(s.allowResize){var l=i.data("key");e.preventDefault(),s.resizeStart=!0,s.offset=[e.clientX,e.clientY],a.getCssRule(l,function(e){var t=e.style.width||i.outerWidth();s.rule=e,s.ruleWidth=parseFloat(t),s.minWidth=i.data("minwidth")||o.cellMinWidth})}}),F.on("mousemove",function(t){if(s.resizeStart){if(t.preventDefault(),s.rule){var i=s.ruleWidth+t.clientX-s.offset[0];i');return n[0].value=i.data("content")||l.text(),i.find("."+W)[0]||i.append(n),n.focus(),void layui.stope(e)}}).on("mouseenter","td",function(){b.call(this)}).on("mouseleave","td",function(){b.call(this,"hide")});var g="layui-table-grid-down",b=function(e){var i=t(this),a=i.children(h);if(!i.data("off"))if(e)i.find(".layui-table-grid-down").remove();else if(a.prop("scrollWidth")>a.outerWidth()){if(a.find("."+g)[0])return;i.append('
            ')}};a.layBody.on("click","."+g,function(e){var i=t(this),n=i.parent(),d=n.children(h);a.tipsIndex=l.tips(['
            ',d.html(),"
            ",''].join(""),d[0],{tips:[3,""],time:-1,anim:-1,maxWidth:r.ios||r.android?300:a.elem.width()/2,isOutAnim:!1,skin:"layui-table-tips",success:function(e,t){e.find(".layui-table-tips-c").on("click",function(){l.close(t)})}}),layui.stope(e)}),a.layBody.on("click","*[lay-event]",function(){var e=t(this),i=e.parents("tr").eq(0).data("index");layui.event.call(this,y,"tool("+p+")",v.call(this,{event:e.attr("lay-event")})),a.setThisRowChecked(i)}),a.layMain.on("scroll",function(){var e=t(this),i=e.scrollLeft(),n=e.scrollTop();a.layHeader.scrollLeft(i),a.layTotal.scrollLeft(i),a.layFixed.find(k).scrollTop(n),l.close(a.tipsIndex)}),F.on("click",function(){F.trigger("table.remove.tool.panel")}),F.on("table.remove.tool.panel",function(){t(".layui-table-tool-panel").remove()}),R.on("resize",function(){a.resize()})},d.init=function(e,i){i=i||{};var a=this,l=t(e?'table[lay-filter="'+e+'"]':h+"[lay-data]"),n="Table element property lay-data configuration item has a syntax error: ";return l.each(function(){var a=t(this),l=a.attr("lay-data");try{l=new Function("return "+l)()}catch(r){o.error(n+l)}var c=[],s=t.extend({elem:this,cols:[],data:[],skin:a.attr("lay-skin"),size:a.attr("lay-size"),even:"string"==typeof a.attr("lay-even")},d.config,i,l);e&&a.hide(),a.find("thead>tr").each(function(e){s.cols[e]=[],t(this).children().each(function(i){var a=t(this),l=a.attr("lay-data");try{l=new Function("return "+l)()}catch(r){return o.error(n+l)}var d=t.extend({title:a.text(),colspan:a.attr("colspan")||0,rowspan:a.attr("rowspan")||0},l);d.colspan<2&&c.push(d),s.cols[e].push(d)})}),a.find("tbody>tr").each(function(e){var i=t(this),a={};i.children("td").each(function(e,i){var l=t(this),n=l.data("field");if(n)return a[n]=l.html()}),layui.each(c,function(e,t){var l=i.children("td").eq(e);a[t.field]=l.html()}),s.data[e]=a}),d.render(s)}),a},c.that={},c.config={},d.eachCols=function(e,i,a){var l=c.config[e]||{},n=[],o=0;a=t.extend(!0,[],a||l.cols),layui.each(a,function(e,t){layui.each(t,function(t,i){if(i.colGroup){var l=0;o++,i.CHILD_COLS=[],layui.each(a[e+1],function(e,t){t.PARENT_COL_INDEX||l>1&&l==i.colspan||(t.PARENT_COL_INDEX=o,i.CHILD_COLS.push(t),l+=parseInt(t.colspan>1?t.colspan:1))})}i.PARENT_COL_INDEX||n.push(i)})});var r=function(e){layui.each(e||n,function(e,t){return t.CHILD_COLS?r(t.CHILD_COLS):void("function"==typeof i&&i(e,t))})};r()},d.checkStatus=function(e){var t=0,i=0,a=[],l=d.cache[e]||[];return layui.each(l,function(e,l){return l.constructor===Array?void i++:void(l[d.config.checkName]&&(t++,a.push(d.clearCacheKey(l))))}),{data:a,isAll:!!l.length&&t===l.length-i}},d.exportFile=function(e,t,i){t=t||d.clearCacheKey(d.cache[e]),i=i||"csv";var a=c.config[e]||{},l={csv:"text/csv",xls:"application/vnd.ms-excel"}[i],n=document.createElement("a");return r.ie?o.error("IE_NOT_SUPPORT_EXPORTS"):(n.href="data:"+l+";charset=utf-8,\ufeff"+encodeURIComponent(function(){var i=[],a=[];return layui.each(t,function(t,l){var n=[];"object"==typeof e?(layui.each(e,function(e,a){0==t&&i.push(a||"")}),layui.each(d.clearCacheKey(l),function(e,t){n.push('"'+(t||"")+'"')})):d.eachCols(e,function(e,a){a.field&&"normal"==a.type&&!a.hide&&(0==t&&i.push(a.title||""),n.push('"'+u(a,l[a.field],l,"text")+'"'))}),a.push(n.join(","))}),i.join(",")+"\r\n"+a.join("\r\n")}()),n.download=(a.title||"table_"+(a.index||""))+"."+i,document.body.appendChild(n),n.click(),void document.body.removeChild(n))},d.resize=function(e){if(e){var t=s(e);if(!t)return;c.that[e].resize()}else layui.each(c.that,function(){this.resize()})},d.reload=function(e,t){var i=s(e);if(i){var a=c.that[e];return a.reload(t),c.call(a)}},d.render=function(e){var t=new I(e);return c.call(t)},d.clearCacheKey=function(e){return e=t.extend({},e),delete e[d.config.checkName],delete e[d.config.indexName],e},d.init(),e(y,d)});layui.define("jquery",function(e){"use strict";var i=layui.$,n=(layui.hint(),layui.device(),{config:{},set:function(e){var n=this;return n.config=i.extend({},n.config,e),n},on:function(e,i){return layui.onevent.call(this,t,e,i)}}),t="carousel",a="layui-this",l=">*[carousel-item]>*",o="layui-carousel-left",r="layui-carousel-right",d="layui-carousel-prev",s="layui-carousel-next",u="layui-carousel-arrow",c="layui-carousel-ind",m=function(e){var t=this;t.config=i.extend({},t.config,n.config,e),t.render()};m.prototype.config={width:"600px",height:"280px",full:!1,arrow:"hover",indicator:"inside",autoplay:!0,interval:3e3,anim:"",trigger:"click",index:0},m.prototype.render=function(){var e=this,n=e.config;n.elem=i(n.elem),n.elem[0]&&(e.elemItem=n.elem.find(l),n.index<0&&(n.index=0),n.index>=e.elemItem.length&&(n.index=e.elemItem.length-1),n.interval<800&&(n.interval=800),n.full?n.elem.css({position:"fixed",width:"100%",height:"100%",zIndex:9999}):n.elem.css({width:n.width,height:n.height}),n.elem.attr("lay-anim",n.anim),e.elemItem.eq(n.index).addClass(a),e.elemItem.length<=1||(e.indicator(),e.arrow(),e.autoplay(),e.events()))},m.prototype.reload=function(e){var n=this;clearInterval(n.timer),n.config=i.extend({},n.config,e),n.render()},m.prototype.prevIndex=function(){var e=this,i=e.config,n=i.index-1;return n<0&&(n=e.elemItem.length-1),n},m.prototype.nextIndex=function(){var e=this,i=e.config,n=i.index+1;return n>=e.elemItem.length&&(n=0),n},m.prototype.addIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index+e,n.index>=i.elemItem.length&&(n.index=0)},m.prototype.subIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index-e,n.index<0&&(n.index=i.elemItem.length-1)},m.prototype.autoplay=function(){var e=this,i=e.config;i.autoplay&&(clearInterval(e.timer),e.timer=setInterval(function(){e.slide()},i.interval))},m.prototype.arrow=function(){var e=this,n=e.config,t=i(['",'"].join(""));n.elem.attr("lay-arrow",n.arrow),n.elem.find("."+u)[0]&&n.elem.find("."+u).remove(),n.elem.append(t),t.on("click",function(){var n=i(this),t=n.attr("lay-type");e.slide(t)})},m.prototype.indicator=function(){var e=this,n=e.config,t=e.elemInd=i(['
              ',function(){var i=[];return layui.each(e.elemItem,function(e){i.push("")}),i.join("")}(),"
            "].join(""));n.elem.attr("lay-indicator",n.indicator),n.elem.find("."+c)[0]&&n.elem.find("."+c).remove(),n.elem.append(t),"updown"===n.anim&&t.css("margin-top",-(t.height()/2)),t.find("li").on("hover"===n.trigger?"mouseover":n.trigger,function(){var t=i(this),a=t.index();a>n.index?e.slide("add",a-n.index):a",u=1;u<=i.length;u++){var r='
          • ";i.half&&parseInt(i.value)!==i.value&&u==Math.ceil(i.value)?n=n+'
          • ":n+=r}n+=""+(i.text?''+i.value+"星":"")+"";var c=i.elem,f=c.next("."+t);f[0]&&f.remove(),e.elemTemp=a(n),i.span=e.elemTemp.next("span"),i.setText&&i.setText(i.value),c.html(e.elemTemp),c.addClass("layui-inline"),i.readonly||e.action()},v.prototype.setvalue=function(e){var a=this,i=a.config;i.value=e,a.render()},v.prototype.action=function(){var e=this,i=e.config,l=e.elemTemp,n=l.find("i").width();l.children("li").each(function(e){var t=e+1,v=a(this);v.on("click",function(e){if(i.value=t,i.half){var o=e.pageX-a(this).offset().left;o<=n/2&&(i.value=i.value-.5)}i.text&&l.next("span").text(i.value+"星"),i.choose&&i.choose(i.value),i.setText&&i.setText(i.value)}),v.on("mousemove",function(e){if(l.find("i").each(function(){a(this).addClass(o).removeClass(r)}),l.find("i:lt("+t+")").each(function(){a(this).addClass(s).removeClass(f)}),i.half){var c=e.pageX-a(this).offset().left;c<=n/2&&v.children("i").addClass(u).removeClass(s)}}),v.on("mouseleave",function(){l.find("i").each(function(){a(this).addClass(o).removeClass(r)}),l.find("i:lt("+Math.floor(i.value)+")").each(function(){a(this).addClass(s).removeClass(f)}),i.half&&parseInt(i.value)!==i.value&&l.children("li:eq("+Math.floor(i.value)+")").children("i").addClass(u).removeClass(c)})})},v.prototype.events=function(){var e=this;e.config},i.render=function(e){var a=new v(e);return l.call(a)},e(n,i)});layui.define("jquery",function(t){"use strict";var e=layui.$,i={fixbar:function(t){var i,n,a="layui-fixbar",o="layui-fixbar-top",r=e(document),l=e("body");t=e.extend({showHeight:200},t),t.bar1=t.bar1===!0?"":t.bar1,t.bar2=t.bar2===!0?"":t.bar2,t.bgcolor=t.bgcolor?"background-color:"+t.bgcolor:"";var c=[t.bar1,t.bar2,""],g=e(['
              ',t.bar1?'
            • '+c[0]+"
            • ":"",t.bar2?'
            • '+c[1]+"
            • ":"",'
            • '+c[2]+"
            • ","
            "].join("")),s=g.find("."+o),u=function(){var e=r.scrollTop();e>=t.showHeight?i||(s.show(),i=1):i&&(s.hide(),i=0)};e("."+a)[0]||("object"==typeof t.css&&g.css(t.css),l.append(g),u(),g.find("li").on("click",function(){var i=e(this),n=i.attr("lay-type");"top"===n&&e("html,body").animate({scrollTop:0},200),t.click&&t.click.call(this,n)}),r.on("scroll",function(){clearTimeout(n),n=setTimeout(function(){u()},100)}))},countdown:function(t,e,i){var n=this,a="function"==typeof e,o=new Date(t).getTime(),r=new Date(!e||a?(new Date).getTime():e).getTime(),l=o-r,c=[Math.floor(l/864e5),Math.floor(l/36e5)%24,Math.floor(l/6e4)%60,Math.floor(l/1e3)%60];a&&(i=e);var g=setTimeout(function(){n.countdown(t,r+1e3,i)},1e3);return i&&i(l>0?c:[0,0,0,0],e,g),l<=0&&clearTimeout(g),g},timeAgo:function(t,e){var i=this,n=[[],[]],a=(new Date).getTime()-new Date(t).getTime();return a>6912e5?(a=new Date(t),n[0][0]=i.digit(a.getFullYear(),4),n[0][1]=i.digit(a.getMonth()+1),n[0][2]=i.digit(a.getDate()),e||(n[1][0]=i.digit(a.getHours()),n[1][1]=i.digit(a.getMinutes()),n[1][2]=i.digit(a.getSeconds())),n[0].join("-")+" "+n[1].join(":")):a>=864e5?(a/1e3/60/60/24|0)+"天前":a>=36e5?(a/1e3/60/60|0)+"小时前":a>=12e4?(a/1e3/60|0)+"分钟前":a<0?"未来":"刚刚"},digit:function(t,e){var i="";t=String(t),e=e||2;for(var n=t.length;n/g,">").replace(/'/g,"'").replace(/"/g,""")},event:function(t,n,a){n=i.event[t]=e.extend(!0,i.event[t],n)||{},e("body").on(a||"click","*["+t+"]",function(){var i=e(this),a=i.attr(t);n[a]&&n[a].call(this,i)})}};!function(t,e,i){"$:nomunge";function n(){a=e[l](function(){o.each(function(){var e=t(this),i=e.width(),n=e.height(),a=t.data(this,g);(i!==a.w||n!==a.h)&&e.trigger(c,[a.w=i,a.h=n])}),n()},r[s])}var a,o=t([]),r=t.resize=t.extend(t.resize,{}),l="setTimeout",c="resize",g=c+"-special-event",s="delay",u="throttleWindow";r[s]=250,r[u]=!0,t.event.special[c]={setup:function(){if(!r[u]&&this[l])return!1;var e=t(this);o=o.add(e),t.data(this,g,{w:e.width(),h:e.height()}),1===o.length&&n()},teardown:function(){if(!r[u]&&this[l])return!1;var e=t(this);o=o.not(e),e.removeData(g),o.length||clearTimeout(a)},add:function(e){function n(e,n,o){var r=t(this),l=t.data(this,g)||{};l.w=n!==i?n:r.width(),l.h=o!==i?o:r.height(),a.apply(this,arguments)}if(!r[u]&&this[l])return!1;var a;return t.isFunction(e)?(a=e,n):(a=e.handler,void(e.handler=n))}}}(e,window),t("util",i)});layui.define("jquery",function(e){"use strict";var l=layui.$,o=function(e){},t='';o.prototype.load=function(e){var o,i,n,r,a=this,c=0;e=e||{};var f=l(e.elem);if(f[0]){var m=l(e.scrollElem||document),u=e.mb||50,s=!("isAuto"in e)||e.isAuto,v=e.end||"没有更多了",y=e.scrollElem&&e.scrollElem!==document,d="加载更多",h=l('");f.find(".layui-flow-more")[0]||f.append(h);var p=function(e,t){e=l(e),h.before(e),t=0==t||null,t?h.html(v):h.find("a").html(d),i=t,o=null,n&&n()},g=function(){o=!0,h.find("a").html(t),"function"==typeof e.done&&e.done(++c,p)};if(g(),h.find("a").on("click",function(){l(this);i||o||g()}),e.isLazyimg)var n=a.lazyimg({elem:e.elem+" img",scrollElem:e.scrollElem});return s?(m.on("scroll",function(){var e=l(this),t=e.scrollTop();r&&clearTimeout(r),i||(r=setTimeout(function(){var i=y?e.height():l(window).height(),n=y?e.prop("scrollHeight"):document.documentElement.scrollHeight;n-t-i<=u&&(o||g())},100))}),a):a}},o.prototype.lazyimg=function(e){var o,t=this,i=0;e=e||{};var n=l(e.scrollElem||document),r=e.elem||"img",a=e.scrollElem&&e.scrollElem!==document,c=function(e,l){var o=n.scrollTop(),r=o+l,c=a?function(){return e.offset().top-n.offset().top+o}():e.offset().top;if(c>=o&&c<=r&&!e.attr("src")){var m=e.attr("lay-src");layui.img(m,function(){var l=t.lazyimg.elem.eq(i);e.attr("src",m).removeAttr("lay-src"),l[0]&&f(l),i++})}},f=function(e,o){var f=a?(o||n).height():l(window).height(),m=n.scrollTop(),u=m+f;if(t.lazyimg.elem=l(r),e)c(e,f);else for(var s=0;su)break}};if(f(),!o){var m;n.on("scroll",function(){var e=l(this);m&&clearTimeout(m),m=setTimeout(function(){f(null,e)},50)}),o=!0}return f},e("flow",new o)});layui.define(["layer","form"],function(t){"use strict";var e=layui.$,i=layui.layer,a=layui.form,l=(layui.hint(),layui.device()),n="layedit",o="layui-show",r="layui-disabled",c=function(){var t=this;t.index=0,t.config={tool:["strong","italic","underline","del","|","left","center","right","|","link","unlink","face","image"],hideTool:[],height:280}};c.prototype.set=function(t){var i=this;return e.extend(!0,i.config,t),i},c.prototype.on=function(t,e){return layui.onevent(n,t,e)},c.prototype.build=function(t,i){i=i||{};var a=this,n=a.config,r="layui-layedit",c=e("string"==typeof t?"#"+t:t),u="LAY_layedit_"+ ++a.index,d=c.next("."+r),y=e.extend({},n,i),f=function(){var t=[],e={};return layui.each(y.hideTool,function(t,i){e[i]=!0}),layui.each(y.tool,function(i,a){C[a]&&!e[a]&&t.push(C[a])}),t.join("")}(),m=e(['
            ','
            '+f+"
            ",'
            ','',"
            ","
            "].join(""));return l.ie&&l.ie<8?c.removeClass("layui-hide").addClass(o):(d[0]&&d.remove(),s.call(a,m,c[0],y),c.addClass("layui-hide").after(m),a.index)},c.prototype.getContent=function(t){var e=u(t);if(e[0])return d(e[0].document.body.innerHTML)},c.prototype.getText=function(t){var i=u(t);if(i[0])return e(i[0].document.body).text()},c.prototype.setContent=function(t,i,a){var l=u(t);l[0]&&(a?e(l[0].document.body).append(i):e(l[0].document.body).html(i),layedit.sync(t))},c.prototype.sync=function(t){var i=u(t);if(i[0]){var a=e("#"+i[1].attr("textarea"));a.val(d(i[0].document.body.innerHTML))}},c.prototype.getSelection=function(t){var e=u(t);if(e[0]){var i=m(e[0].document);return document.selection?i.text:i.toString()}};var s=function(t,i,a){var l=this,n=t.find("iframe");n.css({height:a.height}).on("load",function(){var o=n.contents(),r=n.prop("contentWindow"),c=o.find("head"),s=e([""].join("")),u=o.find("body");c.append(s),u.attr("contenteditable","true").css({"min-height":a.height}).html(i.value||""),y.apply(l,[r,n,i,a]),g.call(l,r,t,a)})},u=function(t){var i=e("#LAY_layedit_"+t),a=i.prop("contentWindow");return[a,i]},d=function(t){return 8==l.ie&&(t=t.replace(/<.+>/g,function(t){return t.toLowerCase()})),t},y=function(t,a,n,o){var r=t.document,c=e(r.body);c.on("keydown",function(t){var e=t.keyCode;if(13===e){var a=m(r),l=p(a),n=l.parentNode;if("pre"===n.tagName.toLowerCase()){if(t.shiftKey)return;return i.msg("请暂时用shift+enter"),!1}r.execCommand("formatBlock",!1,"

            ")}}),e(n).parents("form").on("submit",function(){var t=c.html();8==l.ie&&(t=t.replace(/<.+>/g,function(t){return t.toLowerCase()})),n.value=t}),c.on("paste",function(e){r.execCommand("formatBlock",!1,"

            "),setTimeout(function(){f.call(t,c),n.value=c.html()},100)})},f=function(t){var i=this;i.document;t.find("*[style]").each(function(){var t=this.style.textAlign;this.removeAttribute("style"),e(this).css({"text-align":t||""})}),t.find("table").addClass("layui-table"),t.find("script,link").remove()},m=function(t){return t.selection?t.selection.createRange():t.getSelection().getRangeAt(0)},p=function(t){return t.endContainer||t.parentElement().childNodes[0]},v=function(t,i,a){var l=this.document,n=document.createElement(t);for(var o in i)n.setAttribute(o,i[o]);if(n.removeAttribute("text"),l.selection){var r=a.text||i.text;if("a"===t&&!r)return;r&&(n.innerHTML=r),a.pasteHTML(e(n).prop("outerHTML")),a.select()}else{var r=a.toString()||i.text;if("a"===t&&!r)return;r&&(n.innerHTML=r),a.deleteContents(),a.insertNode(n)}},h=function(t,i){var a=this.document,l="layedit-tool-active",n=p(m(a)),o=function(e){return t.find(".layedit-tool-"+e)};i&&i[i.hasClass(l)?"removeClass":"addClass"](l),t.find(">i").removeClass(l),o("unlink").addClass(r),e(n).parents().each(function(){var t=this.tagName.toLowerCase(),e=this.style.textAlign;"b"!==t&&"strong"!==t||o("b").addClass(l),"i"!==t&&"em"!==t||o("i").addClass(l),"u"===t&&o("u").addClass(l),"strike"===t&&o("d").addClass(l),"p"===t&&("center"===e?o("center").addClass(l):"right"===e?o("right").addClass(l):o("left").addClass(l)),"a"===t&&(o("link").addClass(l),o("unlink").removeClass(r))})},g=function(t,a,l){var n=t.document,o=e(n.body),c={link:function(i){var a=p(i),l=e(a).parent();b.call(o,{href:l.attr("href"),target:l.attr("target")},function(e){var a=l[0];"A"===a.tagName?a.href=e.url:v.call(t,"a",{target:e.target,href:e.url,text:e.url},i)})},unlink:function(t){n.execCommand("unlink")},face:function(e){x.call(this,function(i){v.call(t,"img",{src:i.src,alt:i.alt},e)})},image:function(a){var n=this;layui.use("upload",function(o){var r=l.uploadImage||{};o.render({url:r.url,method:r.type,elem:e(n).find("input")[0],done:function(e){0==e.code?(e.data=e.data||{},v.call(t,"img",{src:e.data.src,alt:e.data.title},a)):i.msg(e.msg||"上传失败")}})})},code:function(e){k.call(o,function(i){v.call(t,"pre",{text:i.code,"lay-lang":i.lang},e)})},help:function(){i.open({type:2,title:"帮助",area:["600px","380px"],shadeClose:!0,shade:.1,skin:"layui-layer-msg",content:["http://www.layui.com/about/layedit/help.html","no"]})}},s=a.find(".layui-layedit-tool"),u=function(){var i=e(this),a=i.attr("layedit-event"),l=i.attr("lay-command");if(!i.hasClass(r)){o.focus();var u=m(n);u.commonAncestorContainer;l?(n.execCommand(l),/justifyLeft|justifyCenter|justifyRight/.test(l)&&n.execCommand("formatBlock",!1,"

            "),setTimeout(function(){o.focus()},10)):c[a]&&c[a].call(this,u),h.call(t,s,i)}},d=/image/;s.find(">i").on("mousedown",function(){var t=e(this),i=t.attr("layedit-event");d.test(i)||u.call(this)}).on("click",function(){var t=e(this),i=t.attr("layedit-event");d.test(i)&&u.call(this)}),o.on("click",function(){h.call(t,s),i.close(x.index)})},b=function(t,e){var l=this,n=i.open({type:1,id:"LAY_layedit_link",area:"350px",shade:.05,shadeClose:!0,moveType:1,title:"超链接",skin:"layui-layer-msg",content:['

              ','
            • ','','
              ','',"
              ","
            • ",'
            • ','','
              ','",'","
              ","
            • ",'
            • ','','',"
            • ","
            "].join(""),success:function(t,n){var o="submit(layedit-link-yes)";a.render("radio"),t.find(".layui-btn-primary").on("click",function(){i.close(n),l.focus()}),a.on(o,function(t){i.close(b.index),e&&e(t.field)})}});b.index=n},x=function(t){var a=function(){var t=["[微笑]","[嘻嘻]","[哈哈]","[可爱]","[可怜]","[挖鼻]","[吃惊]","[害羞]","[挤眼]","[闭嘴]","[鄙视]","[爱你]","[泪]","[偷笑]","[亲亲]","[生病]","[太开心]","[白眼]","[右哼哼]","[左哼哼]","[嘘]","[衰]","[委屈]","[吐]","[哈欠]","[抱抱]","[怒]","[疑问]","[馋嘴]","[拜拜]","[思考]","[汗]","[困]","[睡]","[钱]","[失望]","[酷]","[色]","[哼]","[鼓掌]","[晕]","[悲伤]","[抓狂]","[黑线]","[阴险]","[怒骂]","[互粉]","[心]","[伤心]","[猪头]","[熊猫]","[兔子]","[ok]","[耶]","[good]","[NO]","[赞]","[来]","[弱]","[草泥马]","[神马]","[囧]","[浮云]","[给力]","[围观]","[威武]","[奥特曼]","[礼物]","[钟]","[话筒]","[蜡烛]","[蛋糕]"],e={};return layui.each(t,function(t,i){e[i]=layui.cache.dir+"images/face/"+t+".gif"}),e}();return x.hide=x.hide||function(t){"face"!==e(t.target).attr("layedit-event")&&i.close(x.index)},x.index=i.tips(function(){var t=[];return layui.each(a,function(e,i){t.push('
          • '+e+'
          • ')}),'
              '+t.join("")+"
            "}(),this,{tips:1,time:0,skin:"layui-box layui-util-face",maxWidth:500,success:function(l,n){l.css({marginTop:-4,marginLeft:-10}).find(".layui-clear>li").on("click",function(){t&&t({src:a[this.title],alt:this.title}),i.close(n)}),e(document).off("click",x.hide).on("click",x.hide)}})},k=function(t){var e=this,l=i.open({type:1,id:"LAY_layedit_code",area:"550px",shade:.05,shadeClose:!0,moveType:1,title:"插入代码",skin:"layui-layer-msg",content:['
              ','
            • ','','
              ','","
              ","
            • ",'
            • ','','
              ','',"
              ","
            • ",'
            • ','','',"
            • ","
            "].join(""),success:function(l,n){var o="submit(layedit-code-yes)";a.render("select"),l.find(".layui-btn-primary").on("click",function(){i.close(n),e.focus()}),a.on(o,function(e){i.close(k.index),t&&t(e.field)})}});k.index=l},C={html:'',strong:'',italic:'',underline:'',del:'',"|":'',left:'',center:'',right:'',link:'',unlink:'',face:'',image:'',code:'',help:''},w=new c;t(n,w)});layui.define("jquery",function(e){"use strict";var a=layui.$,l="http://www.layui.com/doc/modules/code.html";e("code",function(e){var t=[];e=e||{},e.elem=a(e.elem||".layui-code"),e.about=!("about"in e)||e.about,e.elem.each(function(){t.push(this)}),layui.each(t.reverse(),function(t,i){var c=a(i),o=c.html();(c.attr("lay-encode")||e.encode)&&(o=o.replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")),c.html('
            1. '+o.replace(/[\r\t\n]+/g,"
            2. ")+"
            "),c.find(">.layui-code-h3")[0]||c.prepend('

            '+(c.attr("lay-title")||e.title||"code")+(e.about?'layui.code':"")+"

            ");var d=c.find(">.layui-code-ol");c.addClass("layui-box layui-code-view"),(c.attr("lay-skin")||e.skin)&&c.addClass("layui-code-"+(c.attr("lay-skin")||e.skin)),(d.find("li").length/100|0)>0&&d.css("margin-left",(d.find("li").length/100|0)+"px"),(c.attr("lay-height")||e.height)&&d.css("max-height",c.attr("lay-height")||e.height)})})}).addcss("modules/code.css","skincodecss"); \ No newline at end of file diff --git a/Yangcai365_design/manage/zinc/layui/layui.js b/Yangcai365_design/manage/zinc/layui/layui.js new file mode 100644 index 0000000..b6c4c49 --- /dev/null +++ b/Yangcai365_design/manage/zinc/layui/layui.js @@ -0,0 +1,2 @@ +/** layui-v2.5.4 MIT License By https://www.layui.com */ + ;!function(e){"use strict";var t=document,o={modules:{},status:{},timeout:10,event:{}},n=function(){this.v="2.5.4"},r=function(){var e=t.currentScript?t.currentScript.src:function(){for(var e,o=t.scripts,n=o.length-1,r=n;r>0;r--)if("interactive"===o[r].readyState){e=o[r].src;break}return e||o[n].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),i=function(t){e.console&&console.error&&console.error("Layui hint: "+t)},a="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),u={layer:"modules/layer",laydate:"modules/laydate",laypage:"modules/laypage",laytpl:"modules/laytpl",layim:"modules/layim",layedit:"modules/layedit",form:"modules/form",upload:"modules/upload",transfer:"modules/transfer",tree:"modules/tree",table:"modules/table",element:"modules/element",rate:"modules/rate",colorpicker:"modules/colorpicker",slider:"modules/slider",carousel:"modules/carousel",flow:"modules/flow",util:"modules/util",code:"modules/code",jquery:"modules/jquery",mobile:"modules/mobile","layui.all":"../layui.all"};n.prototype.cache=o,n.prototype.define=function(e,t){var n=this,r="function"==typeof e,i=function(){var e=function(e,t){layui[e]=t,o.status[e]=!0};return"function"==typeof t&&t(function(n,r){e(n,r),o.callback[n]=function(){t(e)}}),this};return r&&(t=e,e=[]),!layui["layui.all"]&&layui["layui.mobile"]?i.call(n):(n.use(e,i),n)},n.prototype.use=function(e,n,l){function s(e,t){var n="PLaySTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/;("load"===e.type||n.test((e.currentTarget||e.srcElement).readyState))&&(o.modules[f]=t,d.removeChild(v),function r(){return++m>1e3*o.timeout/4?i(f+" is not a valid module"):void(o.status[f]?c():setTimeout(r,4))}())}function c(){l.push(layui[f]),e.length>1?y.use(e.slice(1),n,l):"function"==typeof n&&n.apply(layui,l)}var y=this,p=o.dir=o.dir?o.dir:r,d=t.getElementsByTagName("head")[0];e="string"==typeof e?[e]:e,window.jQuery&&jQuery.fn.on&&(y.each(e,function(t,o){"jquery"===o&&e.splice(t,1)}),layui.jquery=layui.$=jQuery);var f=e[0],m=0;if(l=l||[],o.host=o.host||(p.match(/\/\/([\s\S]+?)\//)||["//"+location.host+"/"])[0],0===e.length||layui["layui.all"]&&u[f]||!layui["layui.all"]&&layui["layui.mobile"]&&u[f])return c(),y;if(o.modules[f])!function g(){return++m>1e3*o.timeout/4?i(f+" is not a valid module"):void("string"==typeof o.modules[f]&&o.status[f]?c():setTimeout(g,4))}();else{var v=t.createElement("script"),h=(u[f]?p+"lay/":/^\{\/\}/.test(y.modules[f])?"":o.base||"")+(y.modules[f]||f)+".js";h=h.replace(/^\{\/\}/,""),v.async=!0,v.charset="utf-8",v.src=h+function(){var e=o.version===!0?o.v||(new Date).getTime():o.version||"";return e?"?v="+e:""}(),d.appendChild(v),!v.attachEvent||v.attachEvent.toString&&v.attachEvent.toString().indexOf("[native code")<0||a?v.addEventListener("load",function(e){s(e,h)},!1):v.attachEvent("onreadystatechange",function(e){s(e,h)}),o.modules[f]=h}return y},n.prototype.getStyle=function(t,o){var n=t.currentStyle?t.currentStyle:e.getComputedStyle(t,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](o)},n.prototype.link=function(e,n,r){var a=this,u=t.createElement("link"),l=t.getElementsByTagName("head")[0];"string"==typeof n&&(r=n);var s=(r||e).replace(/\.|\//g,""),c=u.id="layuicss-"+s,y=0;return u.rel="stylesheet",u.href=e+(o.debug?"?v="+(new Date).getTime():""),u.media="all",t.getElementById(c)||l.appendChild(u),"function"!=typeof n?a:(function p(){return++y>1e3*o.timeout/100?i(e+" timeout"):void(1989===parseInt(a.getStyle(t.getElementById(c),"width"))?function(){n()}():setTimeout(p,100))}(),a)},o.callback={},n.prototype.factory=function(e){if(layui[e])return"function"==typeof o.callback[e]?o.callback[e]:null},n.prototype.addcss=function(e,t,n){return layui.link(o.dir+"css/"+e,t,n)},n.prototype.img=function(e,t,o){var n=new Image;return n.src=e,n.complete?t(n):(n.onload=function(){n.onload=null,"function"==typeof t&&t(n)},void(n.onerror=function(e){n.onerror=null,"function"==typeof o&&o(e)}))},n.prototype.config=function(e){e=e||{};for(var t in e)o[t]=e[t];return this},n.prototype.modules=function(){var e={};for(var t in u)e[t]=u[t];return e}(),n.prototype.extend=function(e){var t=this;e=e||{};for(var o in e)t[o]||t.modules[o]?i("模块名 "+o+" 已被占用"):t.modules[o]=e[o];return t},n.prototype.router=function(e){var t=this,e=e||location.hash,o={path:[],search:{},hash:(e.match(/[^#](#.*$)/)||[])[1]||""};return/^#\//.test(e)?(e=e.replace(/^#\//,""),o.href="/"+e,e=e.replace(/([^#])(#.*$)/,"$1").split("/")||[],t.each(e,function(e,t){/^\w+=/.test(t)?function(){t=t.split("="),o.search[t[0]]=t[1]}():o.path.push(t)}),o):o},n.prototype.data=function(t,o,n){if(t=t||"layui",n=n||localStorage,e.JSON&&e.JSON.parse){if(null===o)return delete n[t];o="object"==typeof o?o:{key:o};try{var r=JSON.parse(n[t])}catch(i){var r={}}return"value"in o&&(r[o.key]=o.value),o.remove&&delete r[o.key],n[t]=JSON.stringify(r),o.key?r[o.key]:r}},n.prototype.sessionData=function(e,t){return this.data(e,t,sessionStorage)},n.prototype.device=function(t){var o=navigator.userAgent.toLowerCase(),n=function(e){var t=new RegExp(e+"/([^\\s\\_\\-]+)");return e=(o.match(t)||[])[1],e||!1},r={os:function(){return/windows/.test(o)?"windows":/linux/.test(o)?"linux":/iphone|ipod|ipad|ios/.test(o)?"ios":/mac/.test(o)?"mac":void 0}(),ie:function(){return!!(e.ActiveXObject||"ActiveXObject"in e)&&((o.match(/msie\s(\d+)/)||[])[1]||"11")}(),weixin:n("micromessenger")};return t&&!r[t]&&(r[t]=n(t)),r.android=/android/.test(o),r.ios="ios"===r.os,r},n.prototype.hint=function(){return{error:i}},n.prototype.each=function(e,t){var o,n=this;if("function"!=typeof t)return n;if(e=e||[],e.constructor===Object){for(o in e)if(t.call(e[o],o,e[o]))break}else for(o=0;oi?1:rli{display:inline-block;padding-right:5px;padding-left:5px}.mui-clearfix:after,.mui-clearfix:before{display:table;content:' '}.mui-clearfix:after{clear:both}.mui-bg-primary{background-color:#007aff}.mui-bg-positive{background-color:#4cd964}.mui-bg-negative{background-color:#dd524d}.mui-error{margin:88px 35px;padding:10px;border-radius:6px;background-color:#bbb}.mui-subtitle{font-size:15px}h1,h2,h3,h4,h5,h6{line-height:1;margin-top:5px;margin-bottom:5px}.mui-h1,h1{font-size:36px}.mui-h2,h2{font-size:30px}.mui-h3,h3{font-size:24px}.mui-h4,h4{font-size:18px}.mui-h5,h5{font-size:14px;font-weight:400;color:#8f8f94}.mui-h6,h6{font-size:12px;font-weight:400;color:#8f8f94}p{font-size:14px;margin-top:0;margin-bottom:10px;color:#8f8f94}.mui-row:after,.mui-row:before{display:table;content:' '}.mui-row:after{clear:both}.mui-col-sm-1,.mui-col-sm-10,.mui-col-sm-11,.mui-col-sm-12,.mui-col-sm-2,.mui-col-sm-3,.mui-col-sm-4,.mui-col-sm-5,.mui-col-sm-6,.mui-col-sm-7,.mui-col-sm-8,.mui-col-sm-9,.mui-col-xs-1,.mui-col-xs-10,.mui-col-xs-11,.mui-col-xs-12,.mui-col-xs-2,.mui-col-xs-3,.mui-col-xs-4,.mui-col-xs-5,.mui-col-xs-6,.mui-col-xs-7,.mui-col-xs-8,.mui-col-xs-9{position:relative;min-height:1px}.mui-row>[class*=mui-col-]{float:left}.mui-col-xs-12{width:100%}.mui-col-xs-11{width:91.66666667%}.mui-col-xs-10{width:83.33333333%}.mui-col-xs-9{width:75%}.mui-col-xs-8{width:66.66666667%}.mui-col-xs-7{width:58.33333333%}.mui-col-xs-6{width:50%}.mui-col-xs-5{width:41.66666667%}.mui-col-xs-4{width:33.33333333%}.mui-col-xs-3{width:25%}.mui-col-xs-2{width:16.66666667%}.mui-col-xs-1{width:8.33333333%}@media (min-width:400px){.mui-col-sm-12{width:100%}.mui-col-sm-11{width:91.66666667%}.mui-col-sm-10{width:83.33333333%}.mui-col-sm-9{width:75%}.mui-col-sm-8{width:66.66666667%}.mui-col-sm-7{width:58.33333333%}.mui-col-sm-6{width:50%}.mui-col-sm-5{width:41.66666667%}.mui-col-sm-4{width:33.33333333%}.mui-col-sm-3{width:25%}.mui-col-sm-2{width:16.66666667%}.mui-col-sm-1{width:8.33333333%}}.mui-scroll-wrapper{position:absolute;z-index:2;top:0;bottom:0;left:0;overflow:hidden;width:100%}.mui-scroll{position:absolute;z-index:1;width:100%}.mui-scrollbar{position:absolute;z-index:9998;overflow:hidden;-webkit-transition:500ms;transition:500ms;transform:translateZ(0px);pointer-events:none;opacity:0}.mui-scrollbar-vertical{top:0;right:1px;bottom:2px;width:4px}.mui-scrollbar-vertical .mui-scrollbar-indicator{width:100%}.mui-scrollbar-horizontal{right:2px;bottom:0;left:2px;height:4px}.mui-scrollbar-horizontal .mui-scrollbar-indicator{height:100%}.mui-scrollbar-indicator{position:absolute;display:block;box-sizing:border-box;-webkit-transition:.01s cubic-bezier(.1,.57,.1,1);transition:.01s cubic-bezier(.1,.57,.1,1);transform:translate(0px,0) translateZ(0px);border:1px solid rgba(255,255,255,.80196);border-radius:2px;background:rgba(0,0,0,.39804)}.mui-plus-pullrefresh .mui-fullscreen .mui-scroll-wrapper .mui-scroll-wrapper,.mui-plus-pullrefresh .mui-fullscreen .mui-slider-group .mui-scroll-wrapper{position:absolute;top:0;bottom:0;left:0;overflow:hidden;width:100%}.mui-plus-pullrefresh .mui-fullscreen .mui-scroll-wrapper .mui-scroll,.mui-plus-pullrefresh .mui-fullscreen .mui-slider-group .mui-scroll{position:absolute;width:100%}.mui-plus-pullrefresh .mui-scroll-wrapper,.mui-plus-pullrefresh .mui-slider-group{position:static;top:auto;bottom:auto;left:auto;overflow:auto;width:auto}.mui-plus-pullrefresh .mui-slider-group{overflow:visible}.mui-plus-pullrefresh .mui-scroll{position:static;width:auto}.mui-off-canvas-wrap .mui-bar{position:absolute!important;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-webkit-box-shadow:none;box-shadow:none}.mui-off-canvas-wrap{position:relative;z-index:1;overflow:hidden;width:100%;height:100%}.mui-off-canvas-wrap .mui-inner-wrap{position:relative;z-index:1;width:100%;height:100%}.mui-off-canvas-wrap .mui-inner-wrap.mui-transitioning{-webkit-transition:-webkit-transform 350ms;transition:transform 350ms cubic-bezier(.165,.84,.44,1)}.mui-off-canvas-wrap .mui-inner-wrap .mui-off-canvas-left{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.mui-off-canvas-wrap .mui-inner-wrap .mui-off-canvas-right{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.mui-off-canvas-wrap.mui-active{overflow:hidden;height:100%}.mui-off-canvas-wrap.mui-active .mui-off-canvas-backdrop{position:absolute;z-index:998;top:0;right:0;bottom:0;left:0;display:block;transition:background 350ms cubic-bezier(.165,.84,.44,1);background:rgba(0,0,0,.4);box-shadow:-4px 0 4px rgba(0,0,0,.5),4px 0 4px rgba(0,0,0,.5);-webkit-tap-highlight-color:transparent}.mui-off-canvas-wrap.mui-slide-in .mui-off-canvas-right{z-index:10000!important;-webkit-transform:translate3d(100%,0,0)}.mui-off-canvas-wrap.mui-slide-in .mui-off-canvas-left{z-index:10000!important;-webkit-transform:translate3d(-100%,0,0)}.mui-off-canvas-left,.mui-off-canvas-right{position:absolute;z-index:-1;top:0;bottom:0;visibility:hidden;box-sizing:content-box;width:70%;min-height:100%;background:#333;-webkit-overflow-scrolling:touch}.mui-off-canvas-left.mui-transitioning,.mui-off-canvas-right.mui-transitioning{-webkit-transition:-webkit-transform 350ms cubic-bezier(.165,.84,.44,1);transition:transform 350ms cubic-bezier(.165,.84,.44,1)}.mui-off-canvas-left{left:0}.mui-off-canvas-right{right:0}.mui-off-canvas-wrap:not(.mui-slide-in).mui-scalable{background-color:#333}.mui-off-canvas-wrap:not(.mui-slide-in).mui-scalable>.mui-off-canvas-left,.mui-off-canvas-wrap:not(.mui-slide-in).mui-scalable>.mui-off-canvas-right{width:80%;-webkit-transform:scale(.8);transform:scale(.8);opacity:.1}.mui-off-canvas-wrap:not(.mui-slide-in).mui-scalable>.mui-off-canvas-left.mui-transitioning,.mui-off-canvas-wrap:not(.mui-slide-in).mui-scalable>.mui-off-canvas-right.mui-transitioning{-webkit-transition:-webkit-transform 350ms cubic-bezier(.165,.84,.44,1),opacity 350ms cubic-bezier(.165,.84,.44,1);transition:transform 350ms cubic-bezier(.165,.84,.44,1),opacity 350ms cubic-bezier(.165,.84,.44,1)}.mui-off-canvas-wrap:not(.mui-slide-in).mui-scalable>.mui-off-canvas-left{-webkit-transform-origin:-100%;transform-origin:-100%}.mui-off-canvas-wrap:not(.mui-slide-in).mui-scalable>.mui-off-canvas-right{-webkit-transform-origin:200%;transform-origin:200%}.mui-off-canvas-wrap:not(.mui-slide-in).mui-scalable.mui-active>.mui-inner-wrap{-webkit-transform:scale(.8);transform:scale(.8)}.mui-off-canvas-wrap:not(.mui-slide-in).mui-scalable.mui-active>.mui-off-canvas-left,.mui-off-canvas-wrap:not(.mui-slide-in).mui-scalable.mui-active>.mui-off-canvas-right{-webkit-transform:scale(1);transform:scale(1);opacity:1}.mui-loading .mui-spinner{display:block;margin:0 auto}.mui-spinner{display:inline-block;width:24px;height:24px;-webkit-transform-origin:50%;transform-origin:50%;-webkit-animation:spinner-spin 1s step-end infinite;animation:spinner-spin 1s step-end infinite}.mui-spinner:after{display:block;width:100%;height:100%;content:'';background-image:url('data:image/svg+xml;charset=utf-8,');background-repeat:no-repeat;background-position:50%;background-size:100%}.mui-spinner-white:after{background-image:url('data:image/svg+xml;charset=utf-8,')}@-webkit-keyframes spinner-spin{0%{-webkit-transform:rotate(0deg)}8.33333333%{-webkit-transform:rotate(30deg)}16.66666667%{-webkit-transform:rotate(60deg)}25%{-webkit-transform:rotate(90deg)}33.33333333%{-webkit-transform:rotate(120deg)}41.66666667%{-webkit-transform:rotate(150deg)}50%{-webkit-transform:rotate(180deg)}58.33333333%{-webkit-transform:rotate(210deg)}66.66666667%{-webkit-transform:rotate(240deg)}75%{-webkit-transform:rotate(270deg)}83.33333333%{-webkit-transform:rotate(300deg)}91.66666667%{-webkit-transform:rotate(330deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spinner-spin{0%{transform:rotate(0deg)}8.33333333%{transform:rotate(30deg)}16.66666667%{transform:rotate(60deg)}25%{transform:rotate(90deg)}33.33333333%{transform:rotate(120deg)}41.66666667%{transform:rotate(150deg)}50%{transform:rotate(180deg)}58.33333333%{transform:rotate(210deg)}66.66666667%{transform:rotate(240deg)}75%{transform:rotate(270deg)}83.33333333%{transform:rotate(300deg)}91.66666667%{transform:rotate(330deg)}100%{transform:rotate(360deg)}}.mui-btn,button,input[type=button],input[type=reset],input[type=submit]{font-size:14px;font-weight:400;line-height:1.42;position:relative;display:inline-block;margin-bottom:0;padding:6px 12px;cursor:pointer;-webkit-transition:all;transition:all;-webkit-transition-timing-function:linear;transition-timing-function:linear;-webkit-transition-duration:.2s;transition-duration:.2s;text-align:center;vertical-align:top;white-space:nowrap;color:#333;border:1px solid #ccc;border-radius:3px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;background-color:#fff;background-clip:padding-box}.mui-btn.mui-active:enabled,.mui-btn:enabled:active,button.mui-active:enabled,button:enabled:active,input[type=button].mui-active:enabled,input[type=button]:enabled:active,input[type=reset].mui-active:enabled,input[type=reset]:enabled:active,input[type=submit].mui-active:enabled,input[type=submit]:enabled:active{color:#fff;background-color:#929292}.mui-btn.mui-disabled,.mui-btn:disabled,button.mui-disabled,button:disabled,input[type=button].mui-disabled,input[type=button]:disabled,input[type=reset].mui-disabled,input[type=reset]:disabled,input[type=submit].mui-disabled,input[type=submit]:disabled{opacity:.6}.mui-btn-blue,.mui-btn-primary,input[type=submit]{color:#fff;border:1px solid #007aff;background-color:#007aff}.mui-btn-blue.mui-active:enabled,.mui-btn-blue:enabled:active,.mui-btn-primary.mui-active:enabled,.mui-btn-primary:enabled:active,input[type=submit].mui-active:enabled,input[type=submit]:enabled:active{color:#fff;border:1px solid #0062cc;background-color:#0062cc}.mui-btn-green,.mui-btn-positive,.mui-btn-success{color:#fff;border:1px solid #4cd964;background-color:#4cd964}.mui-btn-green.mui-active:enabled,.mui-btn-green:enabled:active,.mui-btn-positive.mui-active:enabled,.mui-btn-positive:enabled:active,.mui-btn-success.mui-active:enabled,.mui-btn-success:enabled:active{color:#fff;border:1px solid #2ac845;background-color:#2ac845}.mui-btn-warning,.mui-btn-yellow{color:#fff;border:1px solid #f0ad4e;background-color:#f0ad4e}.mui-btn-warning.mui-active:enabled,.mui-btn-warning:enabled:active,.mui-btn-yellow.mui-active:enabled,.mui-btn-yellow:enabled:active{color:#fff;border:1px solid #ec971f;background-color:#ec971f}.mui-btn-danger,.mui-btn-negative,.mui-btn-red{color:#fff;border:1px solid #dd524d;background-color:#dd524d}.mui-btn-danger.mui-active:enabled,.mui-btn-danger:enabled:active,.mui-btn-negative.mui-active:enabled,.mui-btn-negative:enabled:active,.mui-btn-red.mui-active:enabled,.mui-btn-red:enabled:active{color:#fff;border:1px solid #cf2d28;background-color:#cf2d28}.mui-btn-purple,.mui-btn-royal{color:#fff;border:1px solid #8a6de9;background-color:#8a6de9}.mui-btn-purple.mui-active:enabled,.mui-btn-purple:enabled:active,.mui-btn-royal.mui-active:enabled,.mui-btn-royal:enabled:active{color:#fff;border:1px solid #6641e2;background-color:#6641e2}.mui-btn-grey{color:#fff;border:1px solid #c7c7cc;background-color:#c7c7cc}.mui-btn-grey.mui-active:enabled,.mui-btn-grey:enabled:active{color:#fff;border:1px solid #acacb4;background-color:#acacb4}.mui-btn-outlined{background-color:transparent}.mui-btn-outlined.mui-btn-blue,.mui-btn-outlined.mui-btn-primary{color:#007aff}.mui-btn-outlined.mui-btn-green,.mui-btn-outlined.mui-btn-positive,.mui-btn-outlined.mui-btn-success{color:#4cd964}.mui-btn-outlined.mui-btn-warning,.mui-btn-outlined.mui-btn-yellow{color:#f0ad4e}.mui-btn-outlined.mui-btn-danger,.mui-btn-outlined.mui-btn-negative,.mui-btn-outlined.mui-btn-red{color:#dd524d}.mui-btn-outlined.mui-btn-purple,.mui-btn-outlined.mui-btn-royal{color:#8a6de9}.mui-btn-outlined.mui-btn-blue:enabled:active,.mui-btn-outlined.mui-btn-danger:enabled:active,.mui-btn-outlined.mui-btn-green:enabled:active,.mui-btn-outlined.mui-btn-negative:enabled:active,.mui-btn-outlined.mui-btn-positive:enabled:active,.mui-btn-outlined.mui-btn-primary:enabled:active,.mui-btn-outlined.mui-btn-purple:enabled:active,.mui-btn-outlined.mui-btn-red:enabled:active,.mui-btn-outlined.mui-btn-royal:enabled:active,.mui-btn-outlined.mui-btn-success:enabled:active,.mui-btn-outlined.mui-btn-warning:enabled:active,.mui-btn-outlined.mui-btn-yellow:enabled:active{color:#fff}.mui-btn-link{padding-top:6px;padding-bottom:6px;color:#007aff;border:0;background-color:transparent}.mui-btn-link.mui-active:enabled,.mui-btn-link:enabled:active{color:#0062cc;background-color:transparent}.mui-btn-block{font-size:18px;display:block;width:100%;margin-bottom:10px;padding:15px 0}.mui-btn .mui-badge{font-size:14px;margin:-2px -4px -2px 4px;background-color:rgba(0,0,0,.15)}.mui-btn .mui-badge-inverted,.mui-btn:enabled:active .mui-badge-inverted{background-color:transparent}.mui-btn-negative:enabled:active .mui-badge-inverted,.mui-btn-positive:enabled:active .mui-badge-inverted,.mui-btn-primary:enabled:active .mui-badge-inverted{color:#fff}.mui-btn-block .mui-badge{position:absolute;right:0;margin-right:10px}.mui-btn .mui-icon{font-size:inherit}.mui-btn.mui-icon{font-size:14px;line-height:1.42}.mui-btn.mui-fab{width:56px;height:56px;padding:16px;border-radius:50%;outline:0}.mui-btn.mui-fab.mui-btn-mini{width:40px;height:40px;padding:8px}.mui-btn.mui-fab .mui-icon{font-size:24px;line-height:24px;width:24px;height:24px}.mui-btn .mui-spinner{width:14px;height:14px;vertical-align:text-bottom}.mui-btn-block .mui-spinner{width:22px;height:22px}.mui-bar{position:fixed;z-index:10;right:0;left:0;height:44px;padding-right:10px;padding-left:10px;border-bottom:0;background-color:#f7f7f7;-webkit-box-shadow:0 0 1px rgba(0,0,0,.85);box-shadow:0 0 1px rgba(0,0,0,.85);-webkit-backface-visibility:hidden;backface-visibility:hidden}.mui-bar .mui-title{right:40px;left:40px;display:inline-block;overflow:hidden;width:auto;margin:0;text-overflow:ellipsis}.mui-bar .mui-backdrop{background:0 0}.mui-bar-header-secondary{top:44px}.mui-bar-footer{bottom:0}.mui-bar-footer-secondary{bottom:44px}.mui-bar-footer-secondary-tab{bottom:50px}.mui-bar-footer,.mui-bar-footer-secondary,.mui-bar-footer-secondary-tab{border-top:0}.mui-bar-transparent{top:0;background-color:rgba(247,247,247,0);-webkit-box-shadow:none;box-shadow:none}.mui-bar-nav{top:0;-webkit-box-shadow:0 1px 6px #ccc;box-shadow:0 1px 6px #ccc}.mui-bar-nav~.mui-content .mui-anchor{display:block;visibility:hidden;height:45px;margin-top:-45px}.mui-bar-nav.mui-bar .mui-icon{margin-right:-10px;margin-left:-10px;padding-right:10px;padding-left:10px}.mui-title{font-size:17px;font-weight:500;line-height:44px;position:absolute;display:block;width:100%;margin:0 -10px;padding:0;text-align:center;white-space:nowrap;color:#000}.mui-title a{color:inherit}.mui-bar-tab{bottom:0;display:table;width:100%;height:50px;padding:0;table-layout:fixed;border-top:0;border-bottom:0;-webkit-touch-callout:none}.mui-bar-tab .mui-tab-item{display:table-cell;overflow:hidden;width:1%;height:50px;text-align:center;vertical-align:middle;white-space:nowrap;text-overflow:ellipsis;color:#929292}.mui-bar-tab .mui-tab-item.mui-active{color:#007aff}.mui-bar-tab .mui-tab-item .mui-icon{top:3px;width:24px;height:24px;padding-top:0;padding-bottom:0}.mui-bar-tab .mui-tab-item .mui-icon~.mui-tab-label{font-size:11px;display:block;overflow:hidden;text-overflow:ellipsis}.mui-bar-tab .mui-tab-item .mui-icon:active{background:0 0}.mui-focusin>.mui-bar-header-secondary,.mui-focusin>.mui-bar-nav{position:absolute}.mui-focusin>.mui-bar~.mui-content{padding-bottom:0}.mui-bar .mui-btn{font-weight:400;position:relative;z-index:20;top:7px;margin-top:0;padding:6px 12px 7px}.mui-bar .mui-btn.mui-pull-right{margin-left:10px}.mui-bar .mui-btn.mui-pull-left{margin-right:10px}.mui-bar .mui-btn-link{font-size:16px;line-height:44px;top:0;padding:0;color:#007aff;border:0}.mui-bar .mui-btn-link.mui-active,.mui-bar .mui-btn-link:active{color:#0062cc}.mui-bar .mui-btn-block{font-size:16px;top:6px;margin-bottom:0;padding:5px 0}.mui-bar .mui-btn-nav.mui-pull-left{margin-left:-5px}.mui-bar .mui-btn-nav.mui-pull-left .mui-icon-left-nav{margin-right:-3px}.mui-bar .mui-btn-nav.mui-pull-right{margin-right:-5px}.mui-bar .mui-btn-nav.mui-pull-right .mui-icon-right-nav{margin-left:-3px}.mui-bar .mui-btn-nav:active{opacity:.3}.mui-bar .mui-icon{font-size:24px;position:relative;z-index:20;padding-top:10px;padding-bottom:10px}.mui-bar .mui-icon:active{opacity:.3}.mui-bar .mui-btn .mui-icon{top:1px;margin:0;padding:0}.mui-bar .mui-title .mui-icon{margin:0;padding:0}.mui-bar .mui-title .mui-icon.mui-icon-caret{top:4px;margin-left:-5px}.mui-bar input[type=search]{height:29px;margin:6px 0}.mui-bar .mui-input-row .mui-btn{padding:12px 10px}.mui-bar .mui-search:before{margin-top:-10px}.mui-bar .mui-input-row .mui-input-clear~.mui-icon-clear,.mui-bar .mui-input-row .mui-input-speech~.mui-icon-speech{top:0;right:12px}.mui-bar.mui-bar-header-secondary .mui-input-row .mui-input-clear~.mui-icon-clear,.mui-bar.mui-bar-header-secondary .mui-input-row .mui-input-speech~.mui-icon-speech{top:0;right:0}.mui-bar .mui-segmented-control{top:7px;width:auto;margin:0 auto}.mui-bar.mui-bar-header-secondary .mui-segmented-control{top:0}.mui-badge{font-size:12px;line-height:1;display:inline-block;padding:3px 6px;color:#333;border-radius:100px;background-color:rgba(0,0,0,.15)}.mui-badge.mui-badge-inverted{padding:0 5px 0 0;color:#929292;background-color:transparent}.mui-badge-blue,.mui-badge-primary{color:#fff;background-color:#007aff}.mui-badge-blue.mui-badge-inverted,.mui-badge-primary.mui-badge-inverted{color:#007aff;background-color:transparent}.mui-badge-green,.mui-badge-success{color:#fff;background-color:#4cd964}.mui-badge-green.mui-badge-inverted,.mui-badge-success.mui-badge-inverted{color:#4cd964;background-color:transparent}.mui-badge-warning,.mui-badge-yellow{color:#fff;background-color:#f0ad4e}.mui-badge-warning.mui-badge-inverted,.mui-badge-yellow.mui-badge-inverted{color:#f0ad4e;background-color:transparent}.mui-badge-danger,.mui-badge-red{color:#fff;background-color:#dd524d}.mui-badge-danger.mui-badge-inverted,.mui-badge-red.mui-badge-inverted{color:#dd524d;background-color:transparent}.mui-badge-purple,.mui-badge-royal{color:#fff;background-color:#8a6de9}.mui-badge-purple.mui-badge-inverted,.mui-badge-royal.mui-badge-inverted{color:#8a6de9;background-color:transparent}.mui-icon .mui-badge{font-size:10px;line-height:1.4;position:absolute;top:-2px;left:100%;margin-left:-10px;padding:1px 5px;color:#fff;background:red}.mui-card{font-size:14px;position:relative;overflow:hidden;margin:10px;border-radius:2px;background-color:#fff;background-clip:padding-box;box-shadow:0 1px 2px rgba(0,0,0,.3)}.mui-content>.mui-card:first-child{margin-top:15px}.mui-card .mui-input-group .mui-input-row:last-child:after,.mui-card .mui-input-group .mui-input-row:last-child:before,.mui-card .mui-input-group:after,.mui-card .mui-input-group:before{height:0}.mui-card .mui-table-view{margin-bottom:0;border-top:0;border-bottom:0;border-radius:6px}.mui-card .mui-table-view .mui-table-view-cell:first-child,.mui-card .mui-table-view .mui-table-view-divider:first-child{top:0;border-top-left-radius:6px;border-top-right-radius:6px}.mui-card .mui-table-view .mui-table-view-cell:last-child,.mui-card .mui-table-view .mui-table-view-divider:last-child{border-bottom-right-radius:6px;border-bottom-left-radius:6px}.mui-card .mui-table-view:after,.mui-card .mui-table-view:before,.mui-card>.mui-table-view>.mui-table-view-cell:last-child:after,.mui-card>.mui-table-view>.mui-table-view-cell:last-child:before{height:0}.mui-card-footer,.mui-card-header{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;min-height:44px;padding:10px 15px;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.mui-card-footer .mui-card-link,.mui-card-header .mui-card-link{line-height:44px;position:relative;display:-webkit-box;display:-webkit-flex;display:flex;height:44px;margin-top:-10px;margin-bottom:-10px;-webkit-transition-duration:.3s;transition-duration:.3s;text-decoration:none;-webkit-box-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.mui-card-footer:before,.mui-card-header:after{position:absolute;top:0;right:0;left:0;height:1px;content:'';-webkit-transform:scaleY(.5);transform:scaleY(.5);background-color:#c8c7cc}.mui-card-header{font-size:17px;border-radius:2px 2px 0 0}.mui-card-header:after{top:auto;bottom:0}.mui-card-header>img:first-child{font-size:0;line-height:0;float:left;width:34px;height:34px}.mui-card-footer{color:#6d6d72;border-radius:0 0 2px 2px}.mui-card-content{font-size:14px;position:relative}.mui-card-content-inner{position:relative;padding:15px}.mui-card-media{vertical-align:bottom;color:#fff;background-position:center;background-size:cover}.mui-card-header.mui-card-media{display:block;padding:10px}.mui-card-header.mui-card-media .mui-media-body{font-size:14px;font-weight:500;line-height:17px;margin-bottom:0;margin-left:44px;color:#333}.mui-card-header.mui-card-media .mui-media-body p{font-size:13px;margin-bottom:0}.mui-table-view{position:relative;margin-top:0;margin-bottom:0;padding-left:0;list-style:none;background-color:#fff}.mui-table-view:after{position:absolute;right:0;bottom:0;left:0;height:1px;content:'';-webkit-transform:scaleY(.5);transform:scaleY(.5);background-color:#c8c7cc}.mui-table-view:before{position:absolute;right:0;left:0;height:1px;content:'';-webkit-transform:scaleY(.5);transform:scaleY(.5);background-color:#c8c7cc;top:-1px}.mui-table-view-icon .mui-table-view-cell .mui-navigate-right .mui-icon{font-size:20px;margin-top:-1px;margin-right:5px;margin-left:-5px}.mui-table-view-icon .mui-table-view-cell:after{left:40px}.mui-table-view-chevron .mui-table-view-cell{padding-right:65px}.mui-table-view-chevron .mui-table-view-cell>a:not(.mui-btn){margin-right:-65px}.mui-table-view-radio .mui-table-view-cell{padding-right:65px}.mui-table-view-radio .mui-table-view-cell>a:not(.mui-btn){margin-right:-65px}.mui-table-view-radio .mui-table-view-cell .mui-navigate-right:after{font-size:30px;font-weight:600;right:9px;content:'';color:#007aff}.mui-table-view-radio .mui-table-view-cell.mui-selected .mui-navigate-right:after{content:'\e472'}.mui-table-view-inverted{color:#fff;background:#333}.mui-table-view-inverted:after{position:absolute;right:0;bottom:0;left:0;height:1px;content:'';-webkit-transform:scaleY(.5);transform:scaleY(.5);background-color:#222}.mui-table-view-inverted:before{position:absolute;top:0;right:0;left:0;height:1px;content:'';-webkit-transform:scaleY(.5);transform:scaleY(.5);background-color:#222}.mui-table-view-inverted .mui-table-view-cell:after{position:absolute;right:0;bottom:0;left:15px;height:1px;content:'';-webkit-transform:scaleY(.5);transform:scaleY(.5);background-color:#222}.mui-table-view-inverted .mui-table-view-cell.mui-active,.mui-table-view-inverted .mui-table-view-cell>a:not(.mui-btn).mui-active{background-color:#242424}.mui-table-view-cell{position:relative;overflow:hidden;padding:11px 15px;-webkit-touch-callout:none}.mui-table-view-cell:after{position:absolute;right:0;bottom:0;left:15px;height:1px;content:'';-webkit-transform:scaleY(.5);transform:scaleY(.5);background-color:#c8c7cc}.mui-table-view-cell.mui-checkbox input[type=checkbox],.mui-table-view-cell.mui-radio input[type=radio]{top:8px}.mui-table-view-cell.mui-checkbox.mui-left,.mui-table-view-cell.mui-radio.mui-left{padding-left:58px}.mui-table-view-cell.mui-active{background-color:#eee}.mui-table-view-cell:last-child:after,.mui-table-view-cell:last-child:before{height:0}.mui-table-view-cell>a:not(.mui-btn){position:relative;display:block;overflow:hidden;margin:-11px -15px;padding:inherit;white-space:nowrap;text-overflow:ellipsis;color:inherit}.mui-table-view-cell>a:not(.mui-btn).mui-active{background-color:#eee}.mui-table-view-cell p{margin-bottom:0}.mui-table-view-cell.mui-transitioning>.mui-slider-handle,.mui-table-view-cell.mui-transitioning>.mui-slider-left .mui-btn,.mui-table-view-cell.mui-transitioning>.mui-slider-right .mui-btn{-webkit-transition:-webkit-transform 300ms ease;transition:transform 300ms ease}.mui-table-view-cell.mui-active>.mui-slider-handle{background-color:#eee}.mui-table-view-cell>.mui-slider-handle{position:relative;background-color:#fff}.mui-table-view-cell>.mui-slider-handle .mui-navigate-right:after,.mui-table-view-cell>.mui-slider-handle.mui-navigate-right:after{right:0}.mui-table-view-cell>.mui-slider-handle,.mui-table-view-cell>.mui-slider-left .mui-btn,.mui-table-view-cell>.mui-slider-right .mui-btn{-webkit-transition:-webkit-transform 0ms ease;transition:transform 0ms ease}.mui-table-view-cell>.mui-slider-left,.mui-table-view-cell>.mui-slider-right{position:absolute;top:0;display:-webkit-box;display:-webkit-flex;display:flex;height:100%}.mui-table-view-cell>.mui-slider-left>.mui-btn,.mui-table-view-cell>.mui-slider-right>.mui-btn{position:relative;left:0;display:-webkit-box;display:-webkit-flex;display:flex;padding:0 30px;color:#fff;border:0;border-radius:0;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.mui-table-view-cell>.mui-slider-left>.mui-btn:after,.mui-table-view-cell>.mui-slider-right>.mui-btn:after{position:absolute;z-index:-1;top:0;width:600%;height:100%;content:'';background:inherit}.mui-table-view-cell>.mui-slider-left>.mui-btn.mui-icon,.mui-table-view-cell>.mui-slider-right>.mui-btn.mui-icon{font-size:30px}.mui-table-view-cell>.mui-slider-right{right:0;-webkit-transition:-webkit-transform 0ms ease;transition:transform 0ms ease;-webkit-transform:translateX(100%);transform:translateX(100%)}.mui-table-view-cell>.mui-slider-left{left:0;-webkit-transition:-webkit-transform 0ms ease;transition:transform 0ms ease;-webkit-transform:translateX(-100%);transform:translateX(-100%)}.mui-table-view-cell>.mui-slider-left>.mui-btn:after{right:100%;margin-right:-1px}.mui-table-view-divider{font-weight:500;position:relative;margin-top:-1px;margin-left:0;padding-top:6px;padding-bottom:6px;padding-left:15px;color:#999;background-color:#fafafa}.mui-table-view-divider:after{position:absolute;right:0;bottom:0;left:0;height:1px;content:'';-webkit-transform:scaleY(.5);transform:scaleY(.5);background-color:#c8c7cc}.mui-table-view-divider:before{position:absolute;top:0;right:0;left:0;height:1px;content:'';-webkit-transform:scaleY(.5);transform:scaleY(.5);background-color:#c8c7cc}.mui-table-view .mui-media,.mui-table-view .mui-media-body{overflow:hidden}.mui-table-view .mui-media-large .mui-media-object{line-height:80px;max-width:80px;height:80px}.mui-table-view .mui-media .mui-subtitle{color:#000}.mui-table-view .mui-media-object{line-height:42px;max-width:42px;height:42px}.mui-table-view .mui-media-object.mui-pull-left{margin-right:10px}.mui-table-view .mui-media-object.mui-pull-right{margin-left:10px}.mui-table-view .mui-table-view-cell.mui-media-icon .mui-media-object{line-height:29px;max-width:29px;height:29px;margin:-4px 0}.mui-table-view .mui-table-view-cell.mui-media-icon .mui-media-object img{line-height:29px;max-width:29px;height:29px}.mui-table-view .mui-table-view-cell.mui-media-icon .mui-media-object.mui-pull-left{margin-right:10px}.mui-table-view .mui-table-view-cell.mui-media-icon .mui-media-object .mui-icon{font-size:29px}.mui-table-view .mui-table-view-cell.mui-media-icon .mui-media-body:after{position:absolute;right:0;bottom:0;left:55px;height:1px;content:'';-webkit-transform:scaleY(.5);transform:scaleY(.5);background-color:#c8c7cc}.mui-table-view .mui-table-view-cell.mui-media-icon:after{height:0!important}.mui-table-view.mui-unfold .mui-table-view-cell.mui-collapse .mui-table-view{display:block}.mui-table-view.mui-unfold .mui-table-view-cell.mui-collapse .mui-table-view:after,.mui-table-view.mui-unfold .mui-table-view-cell.mui-collapse .mui-table-view:before{height:0!important}.mui-table-view.mui-unfold .mui-table-view-cell.mui-media-icon.mui-collapse .mui-media-body:after{position:absolute;right:0;bottom:0;left:70px;height:1px;content:'';-webkit-transform:scaleY(.5);transform:scaleY(.5);background-color:#c8c7cc}.mui-table-view-cell>.mui-badge,.mui-table-view-cell>.mui-btn,.mui-table-view-cell>.mui-switch,.mui-table-view-cell>a>.mui-badge,.mui-table-view-cell>a>.mui-btn,.mui-table-view-cell>a>.mui-switch{position:absolute;top:50%;right:15px;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.mui-table-view-cell .mui-navigate-right>.mui-badge,.mui-table-view-cell .mui-navigate-right>.mui-btn,.mui-table-view-cell .mui-navigate-right>.mui-switch,.mui-table-view-cell .mui-push-left>.mui-badge,.mui-table-view-cell .mui-push-left>.mui-btn,.mui-table-view-cell .mui-push-left>.mui-switch,.mui-table-view-cell .mui-push-right>.mui-badge,.mui-table-view-cell .mui-push-right>.mui-btn,.mui-table-view-cell .mui-push-right>.mui-switch,.mui-table-view-cell>a .mui-navigate-right>.mui-badge,.mui-table-view-cell>a .mui-navigate-right>.mui-btn,.mui-table-view-cell>a .mui-navigate-right>.mui-switch,.mui-table-view-cell>a .mui-push-left>.mui-badge,.mui-table-view-cell>a .mui-push-left>.mui-btn,.mui-table-view-cell>a .mui-push-left>.mui-switch,.mui-table-view-cell>a .mui-push-right>.mui-badge,.mui-table-view-cell>a .mui-push-right>.mui-btn,.mui-table-view-cell>a .mui-push-right>.mui-switch{right:35px}.mui-content>.mui-table-view:first-child{margin-top:15px}.mui-table-view-cell.mui-collapse .mui-table-view .mui-table-view-cell:last-child:after,.mui-table-view-cell.mui-collapse .mui-table-view:after,.mui-table-view-cell.mui-collapse .mui-table-view:before{height:0}.mui-table-view-cell.mui-collapse>.mui-navigate-right:after,.mui-table-view-cell.mui-collapse>.mui-push-right:after{content:'\e581'}.mui-table-view-cell.mui-collapse.mui-active{margin-top:-1px}.mui-table-view-cell.mui-collapse.mui-active .mui-collapse-content,.mui-table-view-cell.mui-collapse.mui-active .mui-table-view{display:block}.mui-table-view-cell.mui-collapse.mui-active>.mui-navigate-right:after,.mui-table-view-cell.mui-collapse.mui-active>.mui-push-right:after{content:'\e580'}.mui-table-view-cell.mui-collapse.mui-active .mui-table-view-cell>a:not(.mui-btn).mui-active{margin-left:-31px;padding-left:47px}.mui-table-view-cell.mui-collapse .mui-collapse-content{position:relative;display:none;overflow:hidden;margin:11px -15px -11px;padding:8px 15px;-webkit-transition:height .35s ease;-o-transition:height .35s ease;transition:height .35s ease;background:#fff}.mui-table-view-cell.mui-collapse .mui-collapse-content>.mui-input-group,.mui-table-view-cell.mui-collapse .mui-collapse-content>.mui-slider{width:auto;height:auto;margin:-8px -15px}.mui-table-view-cell.mui-collapse .mui-collapse-content>.mui-slider{margin:-8px -16px}.mui-table-view-cell.mui-collapse .mui-table-view{display:none;margin-top:11px;margin-right:-15px;margin-bottom:-11px;margin-left:-15px;border:0}.mui-table-view-cell.mui-collapse .mui-table-view.mui-table-view-chevron{margin-right:-65px}.mui-table-view-cell.mui-collapse .mui-table-view .mui-table-view-cell{padding-left:31px;background-position:31px 100%}.mui-table-view-cell.mui-collapse .mui-table-view .mui-table-view-cell:after{position:absolute;right:0;bottom:0;left:30px;height:1px;content:'';-webkit-transform:scaleY(.5);transform:scaleY(.5);background-color:#c8c7cc}.mui-table-view.mui-grid-view{font-size:0;display:block;width:100%;padding:0 10px 10px 0;white-space:normal}.mui-table-view.mui-grid-view .mui-table-view-cell{font-size:17px;display:inline-block;margin-right:-4px;padding:10px 0 0 14px;text-align:center;vertical-align:middle;background:0 0}.mui-table-view.mui-grid-view .mui-table-view-cell .mui-media-object{width:100%;max-width:100%;height:auto}.mui-table-view.mui-grid-view .mui-table-view-cell>a:not(.mui-btn){margin:-10px 0 0 -14px}.mui-table-view.mui-grid-view .mui-table-view-cell>a:not(.mui-btn).mui-active,.mui-table-view.mui-grid-view .mui-table-view-cell>a:not(.mui-btn):active{background:0 0}.mui-table-view.mui-grid-view .mui-table-view-cell .mui-media-body{font-size:15px;line-height:15px;display:block;width:100%;height:15px;margin-top:8px;text-overflow:ellipsis;color:#333}.mui-table-view.mui-grid-view .mui-table-view-cell:after,.mui-table-view.mui-grid-view .mui-table-view-cell:before{height:0}.mui-grid-view.mui-grid-9{margin:0;padding:0;border-top:1px solid #eee;border-left:1px solid #eee;background-color:#f2f2f2}.mui-grid-view.mui-grid-9:after,.mui-grid-view.mui-grid-9:before{display:table;content:' '}.mui-grid-view.mui-grid-9:after{clear:both;position:static}.mui-grid-view.mui-grid-9 .mui-table-view-cell{margin:0;padding:11px 15px;vertical-align:top;border-right:1px solid #eee;border-bottom:1px solid #eee}.mui-grid-view.mui-grid-9 .mui-table-view-cell.mui-active{background-color:#eee}.mui-grid-view.mui-grid-9 .mui-table-view-cell>a:not(.mui-btn){margin:0;padding:10px 0}.mui-grid-view.mui-grid-9:before{height:0}.mui-grid-view.mui-grid-9 .mui-media{color:#797979}.mui-grid-view.mui-grid-9 .mui-media .mui-icon{font-size:2.4em;position:relative}.mui-slider-cell{position:relative}.mui-slider-cell>.mui-slider-handle{z-index:1}.mui-slider-cell>.mui-slider-left,.mui-slider-cell>.mui-slider-right{position:absolute;z-index:0;top:0;bottom:0}.mui-slider-cell>.mui-slider-left{left:0}.mui-slider-cell>.mui-slider-right{right:0}input,select,textarea{font-family:'Helvetica Neue',Helvetica,sans-serif;font-size:17px;-webkit-tap-highlight-color:transparent;-webkit-tap-highlight-color:transparent}input:focus,select:focus,textarea:focus{-webkit-tap-highlight-color:transparent;-webkit-tap-highlight-color:transparent;-webkit-user-modify:read-write-plaintext-only}input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],select,textarea{line-height:21px;width:100%;height:40px;margin-bottom:15px;padding:10px 15px;-webkit-user-select:text;border:1px solid rgba(0,0,0,.2);border-radius:3px;outline:0;background-color:#fff;-webkit-appearance:none}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{margin:0;-webkit-appearance:none}input[type=search]{font-size:16px;-webkit-box-sizing:border-box;box-sizing:border-box;height:34px;text-align:center;border:0;border-radius:6px;background-color:rgba(0,0,0,.1)}input[type=search]:focus{text-align:left}textarea{height:auto;resize:none}select{font-size:14px;height:auto;margin-top:1px;border:0!important;background-color:#fff}select:focus{-webkit-user-modify:read-only}.mui-input-group{position:relative;padding:0;border:0;background-color:#fff}.mui-input-group:after{position:absolute;right:0;bottom:0;left:0;height:1px;content:'';-webkit-transform:scaleY(.5);transform:scaleY(.5);background-color:#c8c7cc}.mui-input-group:before{position:absolute;top:0;right:0;left:0;height:1px;content:'';-webkit-transform:scaleY(.5);transform:scaleY(.5);background-color:#c8c7cc}.mui-input-group input,.mui-input-group textarea{margin-bottom:0;border:0;border-radius:0;background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.mui-input-group input[type=search]{background:0 0}.mui-input-group input:last-child{background-image:none}.mui-input-row{clear:left;overflow:hidden}.mui-input-row select{font-size:17px;height:37px;padding:0}.mui-input-row .mui-btn+input,.mui-input-row label+input,.mui-input-row:last-child{background:0 0}.mui-input-group .mui-input-row{height:40px}.mui-input-group .mui-input-row:after{position:absolute;right:0;bottom:0;left:15px;height:1px;content:'';-webkit-transform:scaleY(.5);transform:scaleY(.5);background-color:#c8c7cc}.mui-input-row label{font-family:'Helvetica Neue',Helvetica,sans-serif;line-height:1.1;float:left;width:35%;padding:11px 15px}.mui-input-row label~input,.mui-input-row label~select,.mui-input-row label~textarea{float:right;width:65%;margin-bottom:0;padding-left:0;border:0}.mui-input-row .mui-btn{line-height:1.1;float:right;width:15%;padding:10px 15px}.mui-input-row .mui-btn~input,.mui-input-row .mui-btn~select,.mui-input-row .mui-btn~textarea{float:left;width:85%;margin-bottom:0;padding-left:0;border:0}.mui-button-row{position:relative;padding-top:5px;text-align:center}.mui-input-group .mui-button-row{height:45px}.mui-input-row{position:relative}.mui-input-row.mui-input-range{overflow:visible;padding-right:20px}.mui-input-row .mui-inline{padding:8px 0}.mui-input-row .mui-input-clear~.mui-icon-clear,.mui-input-row .mui-input-password~.mui-icon-eye,.mui-input-row .mui-input-speech~.mui-icon-speech{font-size:20px;position:absolute;z-index:1;top:10px;right:0;width:38px;height:38px;text-align:center;color:#999}.mui-input-row .mui-input-clear~.mui-icon-clear.mui-active,.mui-input-row .mui-input-password~.mui-icon-eye.mui-active,.mui-input-row .mui-input-speech~.mui-icon-speech.mui-active{color:#007aff}.mui-input-row .mui-input-speech~.mui-icon-speech{font-size:24px;top:8px}.mui-input-row .mui-input-clear~.mui-icon-clear~.mui-icon-speech{display:none}.mui-input-row .mui-input-clear~.mui-icon-clear.mui-hidden~.mui-icon-speech{display:inline-block}.mui-input-row .mui-icon-speech~.mui-placeholder{right:38px}.mui-input-row.mui-search .mui-icon-clear{top:7px}.mui-input-row.mui-search .mui-icon-speech{top:5px}.mui-checkbox,.mui-radio{position:relative}.mui-checkbox label,.mui-radio label{display:inline-block;float:none;width:100%;padding-right:58px}.mui-checkbox.mui-left input[type=checkbox],.mui-radio.mui-left input[type=radio]{left:20px}.mui-checkbox.mui-left label,.mui-radio.mui-left label{padding-right:15px;padding-left:58px}.mui-checkbox input[type=checkbox],.mui-radio input[type=radio]{position:absolute;top:4px;right:20px;display:inline-block;width:28px;height:26px;border:0;outline:0!important;background-color:transparent;-webkit-appearance:none}.mui-checkbox input[type=checkbox][disabled]:before,.mui-radio input[type=radio][disabled]:before{opacity:.3}.mui-checkbox input[type=checkbox]:before,.mui-radio input[type=radio]:before{font-family:Muiicons;font-size:28px;font-weight:400;line-height:1;text-decoration:none;color:#aaa;border-radius:0;background:0 0;-webkit-font-smoothing:antialiased}.mui-checkbox input[type=checkbox]:checked:before,.mui-radio input[type=radio]:checked:before{color:#007aff}.mui-checkbox label.mui-disabled,.mui-checkbox.mui-disabled label,.mui-radio label.mui-disabled,.mui-radio.mui-disabled label{opacity:.4}.mui-radio input[type=radio]:before{content:'\e411'}.mui-radio input[type=radio]:checked:before{content:'\e441'}.mui-checkbox input[type=checkbox]:before{content:'\e411'}.mui-checkbox input[type=checkbox]:checked:before{content:'\e442'}.mui-select{position:relative}.mui-select:before{font-family:Muiicons;position:absolute;top:8px;right:21px;content:'\e581';color:rgba(170,170,170,.6)}.mui-input-row .mui-switch{float:right;margin-top:5px;margin-right:20px}.mui-input-range input[type=range]{position:relative;width:100%;height:2px;margin:17px 0;padding:0;cursor:pointer;border:0;border-radius:3px;outline:0;background-color:#999;-webkit-appearance:none!important}.mui-input-range input[type=range]::-webkit-slider-thumb{width:28px;height:28px;border-color:#0062cc;border-radius:50%;background-color:#007aff;background-clip:padding-box;-webkit-appearance:none!important}.mui-input-range label~input[type=range]{width:65%}.mui-input-range .mui-tooltip{font-size:36px;line-height:64px;position:absolute;z-index:1;top:-70px;width:64px;height:64px;text-align:center;opacity:.8;color:#333;border:1px solid #ddd;border-radius:6px;background-color:#fff;text-shadow:0 1px 0 #f3f3f3}.mui-search{position:relative}.mui-search input[type=search]{padding-left:30px}.mui-search .mui-placeholder{font-size:16px;line-height:34px;position:absolute;z-index:1;top:0;right:0;bottom:0;left:0;display:inline-block;height:34px;text-align:center;color:#999;border:0;border-radius:6px;background:0 0}.mui-search .mui-placeholder .mui-icon{font-size:20px;color:#333}.mui-search:before{font-family:Muiicons;font-size:20px;font-weight:400;position:absolute;top:50%;right:50%;display:none;margin-top:-18px;margin-right:31px;content:'\e466'}.mui-search.mui-active:before{font-size:20px;right:auto;left:5px;display:block;margin-right:0}.mui-search.mui-active input[type=search]{text-align:left}.mui-search.mui-active .mui-placeholder{display:none}.mui-segmented-control{font-size:15px;font-weight:400;position:relative;display:table;overflow:hidden;width:100%;table-layout:fixed;border:1px solid #007aff;border-radius:3px;background-color:transparent;-webkit-touch-callout:none}.mui-segmented-control.mui-segmented-control-vertical{border-collapse:collapse;border-width:0;border-radius:0}.mui-segmented-control.mui-segmented-control-vertical .mui-control-item{display:block;border-bottom:1px solid #c8c7cc;border-left-width:0}.mui-segmented-control.mui-scroll-wrapper{height:38px}.mui-segmented-control.mui-scroll-wrapper .mui-scroll{width:auto;height:40px;white-space:nowrap}.mui-segmented-control.mui-scroll-wrapper .mui-control-item{display:inline-block;width:auto;padding:0 20px;border:0}.mui-segmented-control .mui-control-item{line-height:38px;display:table-cell;overflow:hidden;width:1%;-webkit-transition:background-color .1s linear;transition:background-color .1s linear;text-align:center;white-space:nowrap;text-overflow:ellipsis;color:#007aff;border-color:#007aff;border-left:1px solid #007aff}.mui-segmented-control .mui-control-item:first-child{border-left-width:0}.mui-segmented-control .mui-control-item.mui-active{color:#fff;background-color:#007aff}.mui-segmented-control.mui-segmented-control-inverted{width:100%;border:0;border-radius:0}.mui-segmented-control.mui-segmented-control-inverted.mui-segmented-control-vertical .mui-control-item,.mui-segmented-control.mui-segmented-control-inverted.mui-segmented-control-vertical .mui-control-item.mui-active{border-bottom:1px solid #c8c7cc}.mui-segmented-control.mui-segmented-control-inverted .mui-control-item{color:inherit;border:0}.mui-segmented-control.mui-segmented-control-inverted .mui-control-item.mui-active{color:#007aff;border-bottom:2px solid #007aff;background:0 0}.mui-segmented-control.mui-segmented-control-inverted~.mui-slider-progress-bar{background-color:#007aff}.mui-segmented-control-positive{border:1px solid #4cd964}.mui-segmented-control-positive .mui-control-item{color:#4cd964;border-color:inherit}.mui-segmented-control-positive .mui-control-item.mui-active{color:#fff;background-color:#4cd964}.mui-segmented-control-positive.mui-segmented-control-inverted .mui-control-item.mui-active{color:#4cd964;border-bottom:2px solid #4cd964;background:0 0}.mui-segmented-control-positive.mui-segmented-control-inverted~.mui-slider-progress-bar{background-color:#4cd964}.mui-segmented-control-negative{border:1px solid #dd524d}.mui-segmented-control-negative .mui-control-item{color:#dd524d;border-color:inherit}.mui-segmented-control-negative .mui-control-item.mui-active{color:#fff;background-color:#dd524d}.mui-segmented-control-negative.mui-segmented-control-inverted .mui-control-item.mui-active{color:#dd524d;border-bottom:2px solid #dd524d;background:0 0}.mui-segmented-control-negative.mui-segmented-control-inverted~.mui-slider-progress-bar{background-color:#dd524d}.mui-control-content{position:relative;display:none}.mui-control-content.mui-active{display:block}.mui-popover{position:absolute;z-index:999;display:none;width:280px;-webkit-transition:opacity .3s;transition:opacity .3s;-webkit-transition-property:opacity;transition-property:opacity;-webkit-transform:none;transform:none;opacity:0;border-radius:7px;background-color:#f7f7f7;-webkit-box-shadow:0 0 15px rgba(0,0,0,.1);box-shadow:0 0 15px rgba(0,0,0,.1)}.mui-popover .mui-popover-arrow{position:absolute;z-index:1000;top:-25px;left:0;overflow:hidden;width:26px;height:26px}.mui-popover .mui-popover-arrow:after{position:absolute;top:19px;left:0;width:26px;height:26px;content:' ';-webkit-transform:rotate(45deg);transform:rotate(45deg);border-radius:3px;background:#f7f7f7}.mui-popover .mui-popover-arrow.mui-bottom{top:100%;left:-26px;margin-top:-1px}.mui-popover .mui-popover-arrow.mui-bottom:after{top:-19px;left:0}.mui-popover.mui-popover-action{bottom:0;width:100%;-webkit-transition:-webkit-transform .3s,opacity .3s;transition:transform .3s,opacity .3s;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);border-radius:0;background:0 0;-webkit-box-shadow:none;box-shadow:none}.mui-popover.mui-popover-action .mui-popover-arrow{display:none}.mui-popover.mui-popover-action.mui-popover-bottom{position:fixed}.mui-popover.mui-popover-action.mui-active{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.mui-popover.mui-popover-action .mui-table-view{margin:8px;text-align:center;color:#007aff;border-radius:4px}.mui-popover.mui-popover-action .mui-table-view .mui-table-view-cell:after{position:absolute;right:0;bottom:0;left:0;height:1px;content:'';-webkit-transform:scaleY(.5);transform:scaleY(.5);background-color:#c8c7cc}.mui-popover.mui-popover-action .mui-table-view small{font-weight:400;line-height:1.3;display:block}.mui-popover.mui-active{display:block;opacity:1}.mui-popover .mui-bar~.mui-table-view{padding-top:44px}.mui-backdrop{position:fixed;z-index:998;top:0;right:0;bottom:0;left:0;background-color:rgba(0,0,0,.3)}.mui-bar-backdrop.mui-backdrop{bottom:50px;background:0 0}.mui-backdrop-action.mui-backdrop{background-color:rgba(0,0,0,.3)}.mui-backdrop-action.mui-backdrop,.mui-bar-backdrop.mui-backdrop{opacity:0}.mui-backdrop-action.mui-backdrop.mui-active,.mui-bar-backdrop.mui-backdrop.mui-active{-webkit-transition:all .4s ease;transition:all .4s ease;opacity:1}.mui-popover .mui-btn-block{margin-bottom:5px}.mui-popover .mui-btn-block:last-child{margin-bottom:0}.mui-popover .mui-bar{-webkit-box-shadow:none;box-shadow:none}.mui-popover .mui-bar-nav{border-bottom:1px solid rgba(0,0,0,.15);border-top-left-radius:12px;border-top-right-radius:12px;-webkit-box-shadow:none;box-shadow:none}.mui-popover .mui-scroll-wrapper{margin:7px 0;border-radius:7px;background-clip:padding-box}.mui-popover .mui-scroll .mui-table-view{max-height:none}.mui-popover .mui-table-view{overflow:auto;max-height:300px;margin-bottom:0;border-radius:7px;background-color:#f7f7f7;background-image:none;-webkit-overflow-scrolling:touch}.mui-popover .mui-table-view:after,.mui-popover .mui-table-view:before{height:0}.mui-popover .mui-table-view .mui-table-view-cell:first-child,.mui-popover .mui-table-view .mui-table-view-cell:first-child>a:not(.mui-btn){border-top-left-radius:12px;border-top-right-radius:12px}.mui-popover .mui-table-view .mui-table-view-cell:last-child,.mui-popover .mui-table-view .mui-table-view-cell:last-child>a:not(.mui-btn){border-bottom-right-radius:12px;border-bottom-left-radius:12px}.mui-popover.mui-bar-popover .mui-table-view{width:106px}.mui-popover.mui-bar-popover .mui-table-view .mui-table-view-cell{padding:11px 15px;background-position:0 100%}.mui-popover.mui-bar-popover .mui-table-view .mui-table-view-cell>a:not(.mui-btn){margin:-11px -15px -11px -15px}.mui-popup-backdrop{position:fixed;z-index:998;top:0;right:0;bottom:0;left:0;-webkit-transition-duration:400ms;transition-duration:400ms;opacity:0;background:rgba(0,0,0,.4)}.mui-popup-backdrop.mui-active{opacity:1}.mui-popup{position:fixed;z-index:10000;top:50%;left:50%;display:none;overflow:hidden;width:270px;-webkit-transition-property:-webkit-transform,opacity;transition-property:transform,opacity;-webkit-transform:translate3d(-50%,-50%,0) scale(1.185);transform:translate3d(-50%,-50%,0) scale(1.185);text-align:center;opacity:0;color:#000;border-radius:13px}.mui-popup.mui-popup-in{display:block;-webkit-transition-duration:400ms;transition-duration:400ms;-webkit-transform:translate3d(-50%,-50%,0) scale(1);transform:translate3d(-50%,-50%,0) scale(1);opacity:1}.mui-popup.mui-popup-out{-webkit-transition-duration:400ms;transition-duration:400ms;-webkit-transform:translate3d(-50%,-50%,0) scale(1);transform:translate3d(-50%,-50%,0) scale(1);opacity:0}.mui-popup-inner{position:relative;padding:15px;border-radius:13px 13px 0 0;background:rgba(255,255,255,.95)}.mui-popup-inner:after{position:absolute;z-index:15;top:auto;right:auto;bottom:0;left:0;display:block;width:100%;height:1px;content:'';-webkit-transform:scaleY(.5);transform:scaleY(.5);-webkit-transform-origin:50% 100%;transform-origin:50% 100%;background-color:rgba(0,0,0,.2)}.mui-popup-title{font-size:18px;font-weight:500;text-align:center}.mui-popup-title+.mui-popup-text{font-family:inherit;font-size:14px;margin:5px 0 0}.mui-popup-buttons{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;height:44px;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.mui-popup-button{font-size:17px;line-height:44px;position:relative;display:block;overflow:hidden;box-sizing:border-box;width:100%;height:44px;padding:0 5px;cursor:pointer;text-align:center;white-space:nowrap;text-overflow:ellipsis;color:#007aff;background:rgba(255,255,255,.95);-webkit-box-flex:1}.mui-popup-button:after{position:absolute;z-index:15;top:0;right:0;bottom:auto;left:auto;display:block;width:1px;height:100%;content:'';-webkit-transform:scaleX(.5);transform:scaleX(.5);-webkit-transform-origin:100% 50%;transform-origin:100% 50%;background-color:rgba(0,0,0,.2)}.mui-popup-button:first-child{border-radius:0 0 0 13px}.mui-popup-button:first-child:last-child{border-radius:0 0 13px 13px}.mui-popup-button:last-child{border-radius:0 0 13px}.mui-popup-button:last-child:after{display:none}.mui-popup-button.mui-popup-button-bold{font-weight:600}.mui-popup-input input{font-size:14px;width:100%;height:26px;margin:15px 0 0;padding:0 5px;border:1px solid rgba(0,0,0,.3);border-radius:0;background:#fff}.mui-plus.mui-android .mui-popup-backdrop{-webkit-transition-duration:1ms;transition-duration:1ms}.mui-plus.mui-android .mui-popup{-webkit-transition-duration:1ms;transition-duration:1ms;-webkit-transform:translate3d(-50%,-50%,0) scale(1);transform:translate3d(-50%,-50%,0) scale(1)}.mui-progressbar{position:relative;display:block;overflow:hidden;width:100%;height:2px;-webkit-transform-origin:center top;transform-origin:center top;vertical-align:middle;border-radius:2px;background:#b6b6b6;-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.mui-progressbar span{position:absolute;top:0;left:0;width:100%;height:100%;-webkit-transition:150ms;transition:150ms;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);background:#007aff}.mui-progressbar.mui-progressbar-infinite:before{position:absolute;top:0;left:0;width:100%;height:100%;content:'';-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-webkit-transform-origin:left center;transform-origin:left center;-webkit-animation:mui-progressbar-infinite 1s linear infinite;animation:mui-progressbar-infinite 1s linear infinite;background:#007aff}body>.mui-progressbar{position:absolute;z-index:10000;top:44px;left:0;border-radius:0}.mui-progressbar-in{-webkit-animation:mui-progressbar-in 300ms forwards;animation:mui-progressbar-in 300ms forwards}.mui-progressbar-out{-webkit-animation:mui-progressbar-out 300ms forwards;animation:mui-progressbar-out 300ms forwards}@-webkit-keyframes mui-progressbar-in{from{-webkit-transform:scaleY(0);opacity:0}to{-webkit-transform:scaleY(1);opacity:1}}@keyframes mui-progressbar-in{from{transform:scaleY(0);opacity:0}to{transform:scaleY(1);opacity:1}}@-webkit-keyframes mui-progressbar-out{from{-webkit-transform:scaleY(1);opacity:1}to{-webkit-transform:scaleY(0);opacity:0}}@keyframes mui-progressbar-out{from{transform:scaleY(1);opacity:1}to{transform:scaleY(0);opacity:0}}@-webkit-keyframes mui-progressbar-infinite{0%{-webkit-transform:translate3d(-50%,0,0) scaleX(.5)}100%{-webkit-transform:translate3d(100%,0,0) scaleX(.5)}}@keyframes mui-progressbar-infinite{0%{transform:translate3d(-50%,0,0) scaleX(.5)}100%{transform:translate3d(100%,0,0) scaleX(.5)}}.mui-pagination{display:inline-block;margin:0 auto;padding-left:0;border-radius:6px}.mui-pagination>li{display:inline}.mui-pagination>li>a,.mui-pagination>li>span{line-height:1.428571429;position:relative;float:left;margin-left:-1px;padding:6px 12px;text-decoration:none;color:#007aff;border:1px solid #ddd;background-color:#fff}.mui-pagination>li:first-child>a,.mui-pagination>li:first-child>span{margin-left:0;border-top-left-radius:6px;border-bottom-left-radius:6px;background-clip:padding-box}.mui-pagination>li:last-child>a,.mui-pagination>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px;background-clip:padding-box}.mui-pagination>li.mui-active>a,.mui-pagination>li.mui-active>a:active,.mui-pagination>li.mui-active>span,.mui-pagination>li.mui-active>span:active,.mui-pagination>li:active>a,.mui-pagination>li:active>a:active,.mui-pagination>li:active>span,.mui-pagination>li:active>span:active{z-index:2;cursor:default;color:#fff;border-color:#007aff;background-color:#007aff}.mui-pagination>li.mui-disabled>a,.mui-pagination>li.mui-disabled>a:active,.mui-pagination>li.mui-disabled>span,.mui-pagination>li.mui-disabled>span:active{opacity:.6;color:#777;border:1px solid #ddd;background-color:#fff}.mui-pagination-lg>li>a,.mui-pagination-lg>li>span{font-size:18px;padding:10px 16px}.mui-pagination-sm>li>a,.mui-pagination-sm>li>span{font-size:12px;padding:5px 10px}.mui-pager{padding-left:0;list-style:none;text-align:center}.mui-pager:after,.mui-pager:before{display:table;content:' '}.mui-pager:after{clear:both}.mui-pager li{display:inline}.mui-pager li>a,.mui-pager li>span{display:inline-block;padding:5px 14px;border:1px solid #ddd;border-radius:6px;background-color:#fff;background-clip:padding-box}.mui-pager li.mui-active>a,.mui-pager li.mui-active>span,.mui-pager li:active>a,.mui-pager li:active>span{cursor:default;text-decoration:none;color:#fff;border-color:#007aff;background-color:#007aff}.mui-pager .mui-next>a,.mui-pager .mui-next>span{float:right}.mui-pager .mui-previous>a,.mui-pager .mui-previous>span{float:left}.mui-pager .mui-disabled>a,.mui-pager .mui-disabled>a:active,.mui-pager .mui-disabled>span,.mui-pager .mui-disabled>span:active{opacity:.6;color:#777;border:1px solid #ddd;background-color:#fff}.mui-modal{position:fixed;z-index:999;top:0;overflow:hidden;width:100%;min-height:100%;-webkit-transition:-webkit-transform .25s,opacity 1ms .25s;transition:transform .25s,opacity 1ms .25s;-webkit-transition-timing-function:cubic-bezier(.1,.5,.1,1);transition-timing-function:cubic-bezier(.1,.5,.1,1);-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);opacity:0;background-color:#fff}.mui-modal.mui-active{height:100%;-webkit-transition:-webkit-transform .25s;transition:transform .25s;-webkit-transition-timing-function:cubic-bezier(.1,.5,.1,1);transition-timing-function:cubic-bezier(.1,.5,.1,1);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1}.mui-android .mui-modal .mui-bar{position:static}.mui-android .mui-modal .mui-bar-nav~.mui-content{padding-top:0}.mui-slider{position:relative;z-index:1;overflow:hidden;width:100%}.mui-slider .mui-segmented-control.mui-segmented-control-inverted .mui-control-item.mui-active{border-bottom:0}.mui-slider .mui-segmented-control.mui-segmented-control-inverted~.mui-slider-group .mui-slider-item{border-top:1px solid #c8c7cc;border-bottom:1px solid #c8c7cc}.mui-slider .mui-slider-group{font-size:0;position:relative;-webkit-transition:all 0s linear;transition:all 0s linear;white-space:nowrap}.mui-slider .mui-slider-group .mui-slider-item{font-size:14px;position:relative;display:inline-block;width:100%;height:100%;vertical-align:top;white-space:normal}.mui-slider .mui-slider-group .mui-slider-item>a:not(.mui-control-item){line-height:0;position:relative;display:block}.mui-slider .mui-slider-group .mui-slider-item img{width:100%}.mui-slider .mui-slider-group .mui-slider-item .mui-table-view:after,.mui-slider .mui-slider-group .mui-slider-item .mui-table-view:before{height:0}.mui-slider .mui-slider-group.mui-slider-loop{-webkit-transform:translate(-100%,0);transform:translate(-100%,0)}.mui-slider-title{line-height:30px;position:absolute;bottom:0;left:0;width:100%;height:30px;margin:0;text-align:left;text-indent:12px;opacity:.8;background-color:#000}.mui-slider-indicator{position:absolute;bottom:8px;width:100%;text-align:center;background:0 0}.mui-slider-indicator.mui-segmented-control{position:relative;bottom:auto}.mui-slider-indicator .mui-indicator{display:inline-block;width:6px;height:6px;margin:1px 6px;cursor:pointer;border-radius:50%;background:#aaa;-webkit-box-shadow:0 0 1px 1px rgba(130,130,130,.7);box-shadow:0 0 1px 1px rgba(130,130,130,.7)}.mui-slider-indicator .mui-active.mui-indicator{background:#fff}.mui-slider-indicator .mui-icon{font-size:20px;line-height:30px;width:40px;height:30px;margin:3px;text-align:center;border:1px solid #ddd}.mui-slider-indicator .mui-number{line-height:32px;display:inline-block;width:58px}.mui-slider-indicator .mui-number span{color:#ff5053}.mui-slider-progress-bar{z-index:1;height:2px;-webkit-transform:translateZ(0);transform:translateZ(0)}.mui-switch{position:relative;display:block;width:74px;height:30px;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out;-webkit-transition-duration:.2s;transition-duration:.2s;-webkit-transition-property:background-color,border;transition-property:background-color,border;border:2px solid #ddd;border-radius:20px;background-color:#fff;background-clip:padding-box}.mui-switch.mui-disabled{opacity:.3}.mui-switch .mui-switch-handle{position:absolute;z-index:1;top:-1px;left:-1px;width:28px;height:28px;-webkit-transition:.2s ease-in-out;transition:.2s ease-in-out;-webkit-transition-property:-webkit-transform,width,left;transition-property:transform,width,left;border-radius:16px;background-color:#fff;background-clip:padding-box;-webkit-box-shadow:0 2px 5px rgba(0,0,0,.4);box-shadow:0 2px 5px rgba(0,0,0,.4)}.mui-switch:before{font-size:13px;position:absolute;top:3px;right:11px;content:'Off';text-transform:uppercase;color:#999}.mui-switch.mui-dragging{border-color:#f7f7f7;background-color:#f7f7f7}.mui-switch.mui-dragging .mui-switch-handle{width:38px}.mui-switch.mui-dragging.mui-active .mui-switch-handle{left:-11px;width:38px}.mui-switch.mui-active{border-color:#4cd964;background-color:#4cd964}.mui-switch.mui-active .mui-switch-handle{-webkit-transform:translate(43px,0);transform:translate(43px,0)}.mui-switch.mui-active:before{right:auto;left:15px;content:'On';color:#fff}.mui-switch input[type=checkbox]{display:none}.mui-switch-mini{width:47px}.mui-switch-mini:before{display:none}.mui-switch-mini.mui-active .mui-switch-handle{-webkit-transform:translate(16px,0);transform:translate(16px,0)}.mui-switch-blue.mui-active{border:2px solid #007aff;background-color:#007aff}.mui-content.mui-fade{left:0;opacity:0}.mui-content.mui-fade.mui-in{opacity:1}.mui-content.mui-sliding{z-index:2;-webkit-transition:-webkit-transform .4s;transition:transform .4s;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.mui-content.mui-sliding.mui-left{z-index:1;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.mui-content.mui-sliding.mui-right{z-index:3;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.mui-navigate-right:after,.mui-push-left:after,.mui-push-right:after{font-family:Muiicons;font-size:inherit;line-height:1;position:absolute;top:50%;display:inline-block;-webkit-transform:translateY(-50%);transform:translateY(-50%);text-decoration:none;color:#bbb;-webkit-font-smoothing:antialiased}.mui-push-left:after{left:15px;content:'\e582'}.mui-navigate-right:after,.mui-push-right:after{right:15px;content:'\e583'}.mui-pull-bottom-pocket,.mui-pull-top-pocket{position:absolute;left:0;display:block;visibility:hidden;overflow:hidden;width:100%;height:50px}.mui-plus-pullrefresh .mui-pull-bottom-pocket,.mui-plus-pullrefresh .mui-pull-top-pocket{display:none;visibility:visible}.mui-pull-top-pocket{top:0}.mui-bar-nav~.mui-content .mui-pull-top-pocket{top:44px}.mui-bar-nav~.mui-bar-header-secondary~.mui-content .mui-pull-top-pocket{top:88px}.mui-pull-bottom-pocket{position:relative;bottom:0;height:40px}.mui-pull-bottom-pocket .mui-pull-loading{visibility:hidden}.mui-pull-bottom-pocket .mui-pull-loading.mui-in{display:inline-block}.mui-pull{font-weight:700;position:absolute;right:0;bottom:10px;left:0;text-align:center;color:#777}.mui-pull-loading{margin-right:10px;-webkit-transition:-webkit-transform .4s;transition:transform .4s;-webkit-transition-duration:400ms;transition-duration:400ms;vertical-align:middle}.mui-pull-loading.mui-reverse{-webkit-transform:rotate(180deg) translateZ(0);transform:rotate(180deg) translateZ(0)}.mui-pull-caption{font-size:15px;line-height:24px;position:relative;display:inline-block;overflow:visible;margin-top:0;vertical-align:middle}.mui-pull-caption span{display:none}.mui-pull-caption span.mui-in{display:inline}.mui-toast-container{line-height:17px;position:fixed;z-index:9999;bottom:50px;left:50%;-webkit-transition:opacity .3s;transition:opacity .3s;-webkit-transform:translate(-50%,0);transform:translate(-50%,0);opacity:0}.mui-toast-container.mui-active{opacity:.9}.mui-toast-message{font-size:14px;padding:10px 25px;text-align:center;color:#fff;border-radius:6px;background-color:#323232}.mui-numbox{position:relative;display:inline-block;overflow:hidden;width:120px;height:35px;padding:0 40px;vertical-align:top;vertical-align:middle;border:solid 1px #bbb;border-radius:3px;background-color:#efeff4}.mui-numbox [class*=btn-numbox],.mui-numbox [class*=numbox-btn]{font-size:18px;font-weight:400;line-height:100%;position:absolute;top:0;overflow:hidden;width:40px;height:100%;padding:0;color:#555;border:none;border-radius:0;background-color:#f9f9f9}.mui-numbox [class*=btn-numbox]:active,.mui-numbox [class*=numbox-btn]:active{background-color:#ccc}.mui-numbox [class*=btn-numbox][disabled],.mui-numbox [class*=numbox-btn][disabled]{color:silver}.mui-numbox .mui-btn-numbox-plus,.mui-numbox .mui-numbox-btn-plus{right:0;border-top-right-radius:3px;border-bottom-right-radius:3px}.mui-numbox .mui-btn-numbox-minus,.mui-numbox .mui-numbox-btn-minus{left:0;border-top-left-radius:3px;border-bottom-left-radius:3px}.mui-numbox .mui-input-numbox,.mui-numbox .mui-numbox-input{display:inline-block;overflow:hidden;width:100%!important;height:100%;margin:0;padding:0 3px!important;text-align:center;text-overflow:ellipsis;word-break:normal;border:none!important;border-right:solid 1px #ccc!important;border-left:solid 1px #ccc!important;border-radius:0!important}.mui-input-row .mui-numbox{float:right;margin:2px 8px}@font-face{font-family:Muiicons;font-weight:400;font-style:normal;src:url(../fonts/mui.ttf) format('truetype')}.mui-icon{font-family:Muiicons;font-size:24px;font-weight:400;font-style:normal;line-height:1;display:inline-block;text-decoration:none;-webkit-font-smoothing:antialiased}.mui-icon.mui-active{color:#007aff}.mui-icon.mui-right:before{float:right;padding-left:.2em}.mui-icon-contact:before{content:'\e100'}.mui-icon-person:before{content:'\e101'}.mui-icon-personadd:before{content:'\e102'}.mui-icon-contact-filled:before{content:'\e130'}.mui-icon-person-filled:before{content:'\e131'}.mui-icon-personadd-filled:before{content:'\e132'}.mui-icon-phone:before{content:'\e200'}.mui-icon-email:before{content:'\e201'}.mui-icon-chatbubble:before{content:'\e202'}.mui-icon-chatboxes:before{content:'\e203'}.mui-icon-phone-filled:before{content:'\e230'}.mui-icon-email-filled:before{content:'\e231'}.mui-icon-chatbubble-filled:before{content:'\e232'}.mui-icon-chatboxes-filled:before{content:'\e233'}.mui-icon-weibo:before{content:'\e260'}.mui-icon-weixin:before{content:'\e261'}.mui-icon-pengyouquan:before{content:'\e262'}.mui-icon-chat:before{content:'\e263'}.mui-icon-qq:before{content:'\e264'}.mui-icon-videocam:before{content:'\e300'}.mui-icon-camera:before{content:'\e301'}.mui-icon-mic:before{content:'\e302'}.mui-icon-location:before{content:'\e303'}.mui-icon-mic-filled:before,.mui-icon-speech:before{content:'\e332'}.mui-icon-location-filled:before{content:'\e333'}.mui-icon-micoff:before{content:'\e360'}.mui-icon-image:before{content:'\e363'}.mui-icon-map:before{content:'\e364'}.mui-icon-compose:before{content:'\e400'}.mui-icon-trash:before{content:'\e401'}.mui-icon-upload:before{content:'\e402'}.mui-icon-download:before{content:'\e403'}.mui-icon-close:before{content:'\e404'}.mui-icon-redo:before{content:'\e405'}.mui-icon-undo:before{content:'\e406'}.mui-icon-refresh:before{content:'\e407'}.mui-icon-star:before{content:'\e408'}.mui-icon-plus:before{content:'\e409'}.mui-icon-minus:before{content:'\e410'}.mui-icon-checkbox:before,.mui-icon-circle:before{content:'\e411'}.mui-icon-clear:before,.mui-icon-close-filled:before{content:'\e434'}.mui-icon-refresh-filled:before{content:'\e437'}.mui-icon-star-filled:before{content:'\e438'}.mui-icon-plus-filled:before{content:'\e439'}.mui-icon-minus-filled:before{content:'\e440'}.mui-icon-circle-filled:before{content:'\e441'}.mui-icon-checkbox-filled:before{content:'\e442'}.mui-icon-closeempty:before{content:'\e460'}.mui-icon-refreshempty:before{content:'\e461'}.mui-icon-reload:before{content:'\e462'}.mui-icon-starhalf:before{content:'\e463'}.mui-icon-spinner:before{content:'\e464'}.mui-icon-spinner-cycle:before{content:'\e465'}.mui-icon-search:before{content:'\e466'}.mui-icon-plusempty:before{content:'\e468'}.mui-icon-forward:before{content:'\e470'}.mui-icon-back:before,.mui-icon-left-nav:before{content:'\e471'}.mui-icon-checkmarkempty:before{content:'\e472'}.mui-icon-home:before{content:'\e500'}.mui-icon-navigate:before{content:'\e501'}.mui-icon-gear:before{content:'\e502'}.mui-icon-paperplane:before{content:'\e503'}.mui-icon-info:before{content:'\e504'}.mui-icon-help:before{content:'\e505'}.mui-icon-locked:before{content:'\e506'}.mui-icon-more:before{content:'\e507'}.mui-icon-flag:before{content:'\e508'}.mui-icon-home-filled:before{content:'\e530'}.mui-icon-gear-filled:before{content:'\e532'}.mui-icon-info-filled:before{content:'\e534'}.mui-icon-help-filled:before{content:'\e535'}.mui-icon-more-filled:before{content:'\e537'}.mui-icon-settings:before{content:'\e560'}.mui-icon-list:before{content:'\e562'}.mui-icon-bars:before{content:'\e563'}.mui-icon-loop:before{content:'\e565'}.mui-icon-paperclip:before{content:'\e567'}.mui-icon-eye:before{content:'\e568'}.mui-icon-arrowup:before{content:'\e580'}.mui-icon-arrowdown:before{content:'\e581'}.mui-icon-arrowleft:before{content:'\e582'}.mui-icon-arrowright:before{content:'\e583'}.mui-icon-arrowthinup:before{content:'\e584'}.mui-icon-arrowthindown:before{content:'\e585'}.mui-icon-arrowthinleft:before{content:'\e586'}.mui-icon-arrowthinright:before{content:'\e587'}.mui-icon-pulldown:before{content:'\e588'}.mui-fullscreen{position:absolute;top:0;right:0;bottom:0;left:0}.mui-fullscreen.mui-slider .mui-slider-group{height:100%}.mui-fullscreen .mui-segmented-control~.mui-slider-group{position:absolute;top:40px;bottom:0;width:100%;height:auto}.mui-fullscreen.mui-slider .mui-slider-item>a{top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.mui-fullscreen .mui-off-canvas-wrap .mui-slider-item>a{top:auto;-webkit-transform:none;transform:none}.mui-bar-nav~.mui-content .mui-slider.mui-fullscreen{top:44px}.mui-bar-tab~.mui-content .mui-slider.mui-fullscreen .mui-segmented-control~.mui-slider-group{bottom:50px}.mui-android.mui-android-4-0 input:focus,.mui-android.mui-android-4-0 textarea:focus{-webkit-user-modify:inherit}.mui-android.mui-android-4-2 input,.mui-android.mui-android-4-2 textarea,.mui-android.mui-android-4-3 input,.mui-android.mui-android-4-3 textarea{-webkit-user-select:text}.mui-ios .mui-table-view-cell{-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.mui-plus-visible,.mui-wechat-visible{display:none!important}.mui-plus-hidden,.mui-wechat-hidden{display:block!important}.mui-tab-item.mui-plus-hidden,.mui-tab-item.mui-wechat-hidden{display:table-cell!important}.mui-plus .mui-plus-visible,.mui-wechat .mui-wechat-visible{display:block!important}.mui-plus .mui-tab-item.mui-plus-visible,.mui-wechat .mui-tab-item.mui-wechat-visible{display:table-cell!important}.mui-plus .mui-plus-hidden,.mui-wechat .mui-wechat-hidden{display:none!important}.mui-plus.mui-statusbar.mui-statusbar-offset .mui-bar-nav{height:64px;padding-top:20px}.mui-plus.mui-statusbar.mui-statusbar-offset .mui-bar-nav~.mui-content{padding-top:64px}.mui-plus.mui-statusbar.mui-statusbar-offset .mui-bar-header-secondary,.mui-plus.mui-statusbar.mui-statusbar-offset .mui-bar-nav~.mui-content .mui-pull-top-pocket{top:64px}.mui-plus.mui-statusbar.mui-statusbar-offset .mui-bar-header-secondary~.mui-content{padding-top:94px}.mui-iframe-wrapper{position:absolute;right:0;left:0;-webkit-overflow-scrolling:touch}.mui-iframe-wrapper iframe{width:100%;height:100%;border:0} \ No newline at end of file diff --git a/Yangcai365_design/manage/zinc/mobileWorks/css/mui.picker.css b/Yangcai365_design/manage/zinc/mobileWorks/css/mui.picker.css new file mode 100644 index 0000000..015723d --- /dev/null +++ b/Yangcai365_design/manage/zinc/mobileWorks/css/mui.picker.css @@ -0,0 +1,85 @@ +/** + * 选择列表插件 + * varstion 2.0.0 + * by Houfeng + * Houfeng@DCloud.io + */ + +.mui-picker { + background-color: #ddd; + position: relative; + height: 200px; + overflow: hidden; + border: solid 1px rgba(0, 0, 0, 0.1); + -webkit-user-select: none; + user-select: none; + box-sizing: border-box; +} +.mui-picker-inner { + box-sizing: border-box; + position: relative; + width: 100%; + height: 100%; + overflow: hidden; + -webkit-mask-box-image: -webkit-linear-gradient(bottom, transparent, transparent 5%, #fff 20%, #fff 80%, transparent 95%, transparent); + -webkit-mask-box-image: linear-gradient(top, transparent, transparent 5%, #fff 20%, #fff 80%, transparent 95%, transparent); +} +.mui-pciker-list, +.mui-pciker-rule { + box-sizing: border-box; + padding: 0px; + margin: 0px; + width: 100%; + height: 36px; + line-height: 36px; + position: absolute; + left: 0px; + top: 50%; + margin-top: -18px; +} +.mui-pciker-rule-bg { + z-index: 0; + /*background-color: #cfd5da;*/ +} +.mui-pciker-rule-ft { + z-index: 2; + border-top: solid 1px rgba(0, 0, 0, 0.1); + border-bottom: solid 1px rgba(0, 0, 0, 0.1); + /*-webkit-box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1);*/ + /*box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1);*/ +} +.mui-pciker-list { + z-index: 1; + -webkit-transform-style: preserve-3d; + transform-style: preserve-3d; + -webkit-transform: perspective(1000px) rotateY(0deg) rotateX(0deg); + transform: perspective(1000px) rotateY(0deg) rotateX(0deg); +} +.mui-pciker-list li { + width: 100%; + height: 100%; + position: absolute; + text-align: center; + vertical-align: middle; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + overflow: hidden; + box-sizing: border-box; + font-size: 16px; + font-family: "Helvetica Neue", "Helvetica", "Arial", "sans-serif"; + color: #888; + padding: 0px 8px; + white-space: nowrap; + -webkit-text-overflow: ellipsis; + text-overflow: ellipsis; + overflow: hidden; + cursor: default; + visibility: hidden; +} +.mui-pciker-list li.highlight, +.mui-pciker-list li.visible { + visibility: visible; +} +.mui-pciker-list li.highlight { + color: #222; +} \ No newline at end of file diff --git a/Yangcai365_design/manage/zinc/mobileWorks/css/mui.poppicker.css b/Yangcai365_design/manage/zinc/mobileWorks/css/mui.poppicker.css new file mode 100644 index 0000000..a96c8a5 --- /dev/null +++ b/Yangcai365_design/manage/zinc/mobileWorks/css/mui.poppicker.css @@ -0,0 +1,64 @@ +.mui-poppicker { + position: fixed; + left: 0px; + width: 100%; + z-index: 999; + background-color: #eee; + border-top: solid 1px #ccc; + box-shadow: 0px -5px 7px 0px rgba(0, 0, 0, 0.1); + -webkit-transition: .3s; + bottom: 0px; + -webkit-transform: translateY(300px); +} +.mui-poppicker.mui-active { + -webkit-transform: translateY(0px); +} +.mui-android-5-1 .mui-poppicker { + bottom: -300px; + -webkit-transition-property: bottom; + -webkit-transform: none; +} +.mui-android-5-1 .mui-poppicker.mui-active { + bottom: 0px; + -webkit-transition-property: bottom; + -webkit-transform: none; +} +.mui-poppicker-header { + padding: 6px; + font-size: 14px; + color: #888; +} +.mui-poppicker-header .mui-btn { + font-size: 12px; + padding: 5px 10px; +} +.mui-poppicker-btn-cancel { + float: left; +} +.mui-poppicker-btn-ok { + float: right; +} +.mui-poppicker-clear { + clear: both; + height: 0px; + line-height: 0px; + font-size: 0px; + overflow: hidden; +} +.mui-poppicker-body { + position: relative; + width: 100%; + height: 200px; + border-top: solid 1px #ddd; + /*-webkit-perspective: 1200px; + perspective: 1200px; + -webkit-transform-style: preserve-3d; + transform-style: preserve-3d;*/ +} +.mui-poppicker-body .mui-picker { + width: 100%; + height: 100%; + margin: 0px; + border: none; + float: left; +} \ No newline at end of file diff --git a/Yangcai365_design/manage/zinc/mobileWorks/css/pagination.css b/Yangcai365_design/manage/zinc/mobileWorks/css/pagination.css new file mode 100644 index 0000000..eeafeae --- /dev/null +++ b/Yangcai365_design/manage/zinc/mobileWorks/css/pagination.css @@ -0,0 +1,201 @@ +/* +*{ + margin: 0px; + padding: 0px; +} +*/ + +.ht-page-hide { + display:none; +} + +.ht-page { + padding: 30px; + text-align: center +} + +.ht-page span { + vertical-align: middle +} + +.ht-page a { + text-decoration: none; + color: #555; + outline: 0 +} + +.ht-page .pagebtn { + width: 52px; + height: 30px; + background: #1875f0; + border: 0; + border-radius: 4px; + color: #fff; + font-size: 14px; + cursor: pointer +} + +.ht-page .pagebtn:hover { + background: #1875f0 +} + +.ht-page .previous { + display: inline-block; + height: 30px; + line-height: 30px; + border: 1px solid #e9e9e9; + border-bottom-left-radius: 4px; + border-top-left-radius: 4px; + background: url(../images/page-left.png) no-repeat center +} + +.ht-page .previous.disable { + display: inline-block; + padding: 0 15px; + background: url(../images/page-disabled.png) no-repeat center; + cursor: default +} + +.ht-page .previous.disable:hover { + background: url(../images/page-disabled-hover.png) no-repeat center +} + +.ht-page .previous:hover { + background: url(../images/page-left-hover.png) no-repeat center +} + +.ht-page .previous a { + display: inline-block; + height: 30px; + line-height: 30px; + padding: 0 15px +} + +.ht-page .next { + display: inline-block; + height: 30px; + line-height: 30px; + border: 1px solid #e9e9e9; + border-left: 0; + border-bottom-right-radius: 4px; + border-top-right-radius: 4px; + background: url(../images/page-right.png) no-repeat center +} + +.ht-page .next:hover { + background: url(../images/page-right-hover.png) no-repeat center +} + +.ht-page .next.disable { + display: inline-block; + padding: 0 15px; + cursor: default; + background: url(../images/page-disabled.png) no-repeat center +} + +.ht-page .next.disable:hover { + background: url(../images/page-disabled-hover.png) no-repeat center +} + +.ht-page .next a { + display: inline-block; + height: 30px; + line-height: 30px; + padding: 0 15px +} + +.ht-page .num { + display: inline-block; + height: 30px; + line-height: 30px; + border: 1px solid #e9e9e9; + border-left: 0 +} + +.ht-page .num.current { + padding: 0 15px; + background: #f1f1f1 +} + +.ht-page .num a { + display: inline-block; + height: 30px; + line-height: 30px; + padding: 0 15px +} + +.ht-page .num a:hover { + color: #555; + background: #f1f1f1 +} + +.ht-page .dots { + display: inline-block; + height: 30px; + line-height: 30px; + border: 1px solid #e9e9e9; + border-left: 0; + padding: 0 15px +} + +.ht-page .total { + margin-left: 20px; + margin-right: 10px +} + +.ht-page .total.total_page { + margin-left: 5px; + margin-right: 5px +} + +.ht-page .page_jump { + margin: 0 10px +} + +.ht-page .pageInput { + width: 60px; + height: 30px; + border: 1px solid #e9e9e9; + outline: 0; + border-radius: 4px; + text-align: center +} + +.ht-page .pageInput:focus { + border: 1px solid #1875f0 +} + +@media screen and (max-width: 799px) { + .ht-page { + padding:10px 0 + } + + .ht-page .num,.ht-page .dots,.ht-page .total { + display: none + } + + .ht-page .num.current { + display: inline-block; + padding: 0 10px + } + + .ht-page .total.total_page { + display: inline-block + } + + /* + .ht-page .pageInput,.ht-page .pagebtn { + width: 40px + } + */ + + /* + .ht-page .pagebtn { + display: none + } + */ + + .ht-page .page_jump { + margin: 0 5px + } +} diff --git a/Yangcai365_design/manage/zinc/mobileWorks/fonts/mui.ttf b/Yangcai365_design/manage/zinc/mobileWorks/fonts/mui.ttf new file mode 100644 index 0000000..45d3b04 Binary files /dev/null and b/Yangcai365_design/manage/zinc/mobileWorks/fonts/mui.ttf differ diff --git a/Yangcai365_design/manage/zinc/mobileWorks/images/degree-gray.png b/Yangcai365_design/manage/zinc/mobileWorks/images/degree-gray.png new file mode 100644 index 0000000..96c0b36 Binary files /dev/null and b/Yangcai365_design/manage/zinc/mobileWorks/images/degree-gray.png differ diff --git a/Yangcai365_design/manage/zinc/mobileWorks/images/degree-red.png b/Yangcai365_design/manage/zinc/mobileWorks/images/degree-red.png new file mode 100644 index 0000000..487aac9 Binary files /dev/null and b/Yangcai365_design/manage/zinc/mobileWorks/images/degree-red.png differ diff --git a/Yangcai365_design/manage/zinc/mobileWorks/images/icons.png b/Yangcai365_design/manage/zinc/mobileWorks/images/icons.png new file mode 100644 index 0000000..90e2a7c Binary files /dev/null and b/Yangcai365_design/manage/zinc/mobileWorks/images/icons.png differ diff --git a/Yangcai365_design/manage/zinc/mobileWorks/images/page-disabled-hover.png b/Yangcai365_design/manage/zinc/mobileWorks/images/page-disabled-hover.png new file mode 100644 index 0000000..3ffbfd8 Binary files /dev/null and b/Yangcai365_design/manage/zinc/mobileWorks/images/page-disabled-hover.png differ diff --git a/Yangcai365_design/manage/zinc/mobileWorks/images/page-disabled.png b/Yangcai365_design/manage/zinc/mobileWorks/images/page-disabled.png new file mode 100644 index 0000000..795fb00 Binary files /dev/null and b/Yangcai365_design/manage/zinc/mobileWorks/images/page-disabled.png differ diff --git a/Yangcai365_design/manage/zinc/mobileWorks/images/page-left-hover.png b/Yangcai365_design/manage/zinc/mobileWorks/images/page-left-hover.png new file mode 100644 index 0000000..7450000 Binary files /dev/null and b/Yangcai365_design/manage/zinc/mobileWorks/images/page-left-hover.png differ diff --git a/Yangcai365_design/manage/zinc/mobileWorks/images/page-left.png b/Yangcai365_design/manage/zinc/mobileWorks/images/page-left.png new file mode 100644 index 0000000..d1920af Binary files /dev/null and b/Yangcai365_design/manage/zinc/mobileWorks/images/page-left.png differ diff --git a/Yangcai365_design/manage/zinc/mobileWorks/images/page-right-hover.png b/Yangcai365_design/manage/zinc/mobileWorks/images/page-right-hover.png new file mode 100644 index 0000000..aaf6387 Binary files /dev/null and b/Yangcai365_design/manage/zinc/mobileWorks/images/page-right-hover.png differ diff --git a/Yangcai365_design/manage/zinc/mobileWorks/images/page-right.png b/Yangcai365_design/manage/zinc/mobileWorks/images/page-right.png new file mode 100644 index 0000000..ebdc8f2 Binary files /dev/null and b/Yangcai365_design/manage/zinc/mobileWorks/images/page-right.png differ diff --git a/Yangcai365_design/manage/zinc/mobileWorks/images/search.png b/Yangcai365_design/manage/zinc/mobileWorks/images/search.png new file mode 100644 index 0000000..0b6c111 Binary files /dev/null and b/Yangcai365_design/manage/zinc/mobileWorks/images/search.png differ diff --git a/Yangcai365_design/manage/zinc/mobileWorks/images/tx.png b/Yangcai365_design/manage/zinc/mobileWorks/images/tx.png new file mode 100644 index 0000000..538e723 Binary files /dev/null and b/Yangcai365_design/manage/zinc/mobileWorks/images/tx.png differ diff --git a/Yangcai365_design/manage/zinc/mobileWorks/images/xjt.png b/Yangcai365_design/manage/zinc/mobileWorks/images/xjt.png new file mode 100644 index 0000000..743639e Binary files /dev/null and b/Yangcai365_design/manage/zinc/mobileWorks/images/xjt.png differ diff --git a/Yangcai365_design/manage/zinc/mobileWorks/js/mobileWorkDetail.js b/Yangcai365_design/manage/zinc/mobileWorks/js/mobileWorkDetail.js new file mode 100644 index 0000000..999f21f --- /dev/null +++ b/Yangcai365_design/manage/zinc/mobileWorks/js/mobileWorkDetail.js @@ -0,0 +1,44 @@ +$(function(){ +// 点击复制 +$(".btn-copy").on('tap',function(){ + var flag=false + // 创建元素用于复制 + var aux = document.createElement("input"); + // 获取复制内容 + var content = document.querySelector(".val").innerHTML; + console.log(content) + // 解决在移动端进行复制时产生的白屏抖动问题 + aux.setAttribute('readonly', 'readonly') + // 设置元素内容 + aux.setAttribute("value", content); + // 将元素插入页面进行调用 + document.body.appendChild(aux); + // 复制内容 + aux.select(); + // 将内容复制到剪贴板 + document.execCommand("copy"); + // 删除创建元素 + document.body.removeChild(aux); + flag=true + if(flag){ + mui.alert('复制成功', '提示', '确定', '', 'div') + }else{ + mui.alert('复制失败,请重试', '提示', '确定', '', 'div') + } +}) +//显示图片预览数量 +document.querySelector('.mui-slider').addEventListener('slide', function(event) { + console.log(event) + //注意slideNumber是从0开始的; + document.querySelector(".swiper-pagination-current").innerHTML = event.detail.slideNumber+1; +}) +//点击返回至作品库首页 +$(".my-btn-back-works-home").on('tap',function(){ + location.href='./mobileWorksHome.htm' +}) + +//点击返回至模板库首页 +$(".my-btn-back-template-home").on('tap',function(){ + location.href='./mobileTemplateHome.htm' +}) +}) diff --git a/Yangcai365_design/manage/zinc/mobileWorks/js/mobileWorksHome.js b/Yangcai365_design/manage/zinc/mobileWorks/js/mobileWorksHome.js new file mode 100644 index 0000000..1c3fb37 --- /dev/null +++ b/Yangcai365_design/manage/zinc/mobileWorks/js/mobileWorksHome.js @@ -0,0 +1,118 @@ +$(function(){ + //默认遮罩层 隐藏 + $(".mui-backdrop").addClass('none'); + // 默认选中第一个行业 全部 + $(".my-style").children().first().addClass('actives') + $(".select").children().first().addClass('actives') + + // tab栏切换 + $(".header-cater-left").on('click',function(){ + $(".header-cater-rigth").css("border-bottom", "none;") + $(this).css("border-bottom", "2px solid #54708c;") + $(".dom-arrow").css("display","block") + }) + + $(".header-cater-rigth").on('click',function(){ + $(".header-cater-left").css("border-bottom", "none;") + $(this).css("border-bottom", "2px solid #54708c;") + $(".dom-arrow").css("display","none") + }) + // 更多模板显示和隐藏 + $(".dom-arrow").on('click',function(){ + $(".mui-backdrop").toggleClass('none');//toggleClass() 对设置或移除被选元素的一个或多个类进行切换。 + }) + // 更多模板选中添加样式 + $(".select").on("click",".text-value",function(){ + $(this).addClass('active').siblings().removeClass('active') + $(".mui-backdrop").addClass('none'); + }) + //点击分类显示 + $(".classify").on('tap',function(){ + $(".cates-box").css("display","block") + }) + + // 选择行业 + $(".my-style").on("click",".catres-value",function(){ + $(this).addClass('actives').siblings().removeClass('actives') + }) + $(".select").on("click",".text-value",function(){ + $(this).addClass('actives').siblings().removeClass('actives') + }) + // 确定之后隐藏 + $(".my-style-btn").on("click",function(){ + // 获取右侧遮盖层选中行业数据 + var elem = $(".catres-value.actives"); + var elemId = elem[0].id; + + // 判断页面元素id是否为[全部]的id,否则根据行业id查询作品列表 + if(elemId != "clazz_ind_all"){ + var idStrs = elemId.split("clazz_ind_"); + // 根据行业id查询作品 + doWorksSearchByIndustryId(idStrs[1]); + } else { + // 查询全部 + doWorksSearchByIndustryId(); + } + + $(".cates-box").css("display","none") + }) + $(".box-showdom").on("tap",function(){ + $(".cates-box").css("display","none") + }) + + // 模板库首页-行业选中-确定之后隐藏 + $(".my-style-btn-template-home").on("click",function(){ + // 获取右侧遮盖层选中行业数据 + var elem = $(".catres-value.actives"); + var elemId = elem[0].id; + + // 判断页面元素id是否为[全部]的id,否则根据行业id查询作品列表 + if(elemId != "clazz_ind_all"){ + var idStrs = elemId.split("clazz_ind_"); + // 根据行业id查询作品 + doTemplateSearchByIndustryId(idStrs[1]); + } else { + // 查询全部 + doTemplateSearchByIndustryId(); + } + + $(".cates-box").css("display","none") + }) + $(".box-showdom").on("tap",function(){ + $(".cates-box").css("display","none") + }) + + //显示出返回顶部 + $(window).scrollTop(); + // 被卷去的头部 scrollTop() / 被卷去的左侧 scrollLeft() + // 页面滚动事件 + // .son-box 改为 .commodity-box + var boxTop = $(".commodity-box").offset().top; + $(window).scroll(function() { + // console.log(11); + // console.log($(window).scrollTop()); + if ($(window).scrollTop() >= boxTop) { + $(".top").show(); + } else { + $(".top").hide(); + } + }); + // 返回顶部 + $(".top").click(function() { + clickHandler() + }) + // 动画返回 + function clickHandler() { +     var currentScroll = document.documentElement.scrollTop || document.body.scrollTop; +     if (currentScroll > 0) { +         window.requestAnimationFrame(clickHandler);//专门用于请求动画的API requestAnimationFrame,顾名思义就是请求动画帧。 +         window.scrollTo(0, currentScroll - (currentScroll / 6)); +     } + } + + //搜索之后显示的 + $(".my-classify").on('tap',function(){ + $(".serch-show").show() + $(".header-cater").hide() + }) +}) \ No newline at end of file diff --git a/Yangcai365_design/manage/zinc/mobileWorks/js/mui.min.js b/Yangcai365_design/manage/zinc/mobileWorks/js/mui.min.js new file mode 100644 index 0000000..56ed8de --- /dev/null +++ b/Yangcai365_design/manage/zinc/mobileWorks/js/mui.min.js @@ -0,0 +1,6 @@ +/*! + * ===================================================== + * Mui v3.7.3 (http://dev.dcloud.net.cn/mui) + * ===================================================== + */ +var mui=function(a,b){var c=/complete|loaded|interactive/,d=/^#([\w-]+)$/,e=/^\.([\w-]+)$/,f=/^[\w-]+$/,g=/translate(?:3d)?\((.+?)\)/,h=/matrix(3d)?\((.+?)\)/,i=function(b,c){if(c=c||a,!b)return j();if("object"==typeof b)return i.isArrayLike(b)?j(i.slice.call(b),null):j([b],null);if("function"==typeof b)return i.ready(b);if("string"==typeof b)try{if(b=b.trim(),d.test(b)){var e=a.getElementById(RegExp.$1);return j(e?[e]:[])}return j(i.qsa(b,c),b)}catch(a){}return j()},j=function(a,b){return a=a||[],Object.setPrototypeOf(a,i.fn),a.selector=b||"",a};i.uuid=0,i.data={},i.extend=function(){var a,c,d,e,f,g,h=arguments[0]||{},j=1,k=arguments.length,l=!1;for("boolean"==typeof h&&(l=h,h=arguments[j]||{},j++),"object"==typeof h||i.isFunction(h)||(h={}),j===k&&(h=this,j--);j0&&b-1 in a)},i.isWindow=function(a){return null!=a&&a===a.window},i.isObject=function(a){return"object"===i.type(a)},i.isPlainObject=function(a){return i.isObject(a)&&!i.isWindow(a)&&Object.getPrototypeOf(a)===Object.prototype},i.isEmptyObject=function(a){for(var c in a)if(c!==b)return!1;return!0},i.isFunction=function(a){return"function"===i.type(a)},i.qsa=function(b,c){return c=c||a,i.slice.call(e.test(b)?c.getElementsByClassName(RegExp.$1):f.test(b)?c.getElementsByTagName(b):c.querySelectorAll(b))},i.ready=function(b){return c.test(a.readyState)?b(i):a.addEventListener("DOMContentLoaded",function(){b(i)},!1),this},i.buffer=function(a,b,c){function d(){e&&(e.cancel(),e=0),f=i.now(),a.apply(c||this,arguments),g=i.now()}var e,f=0,g=0,b=b||150;return i.extend(function(){!f||g>=f&&i.now()-g>b||g8*b?d.apply(this,arguments):(e&&e.cancel(),e=i.later(d,b,null,i.slice.call(arguments)))},{stop:function(){e&&(e.cancel(),e=0)}})},i.each=function(a,b,c){if(!a)return this;if("number"==typeof a.length)[].every.call(a,function(a,c){return!1!==b.call(a,c,a)});else for(var d in a)if(c){if(a.hasOwnProperty(d)&&!1===b.call(a[d],d,a[d]))return a}else if(!1===b.call(a[d],d,a[d]))return a;return this},i.focus=function(a){i.os.ios?setTimeout(function(){a.focus()},10):a.focus()},i.trigger=function(a,b,c){return a.dispatchEvent(new CustomEvent(b,{detail:c,bubbles:!0,cancelable:!0})),this},i.getStyles=function(a,b){var c=a.ownerDocument.defaultView.getComputedStyle(a,null);return b?c.getPropertyValue(b)||c[b]:c},i.parseTranslate=function(a,b){var c=a.match(g||"");return c&&c[1]||(c=["","0,0,0"]),c=c[1].split(","),c={x:parseFloat(c[0]),y:parseFloat(c[1]),z:parseFloat(c[2])},b&&c.hasOwnProperty(b)?c[b]:c},i.parseTranslateMatrix=function(a,b){var c=a.match(h),d=c&&c[1];c?(c=c[2].split(","),"3d"===d?c=c.slice(12,15):(c.push(0),c=c.slice(4,7))):c=[0,0,0];var e={x:parseFloat(c[0]),y:parseFloat(c[1]),z:parseFloat(c[2])};return b&&e.hasOwnProperty(b)?e[b]:e},i.hooks={},i.addAction=function(a,b){var c=i.hooks[a];return c||(c=[]),b.index=b.index||1e3,c.push(b),c.sort(function(a,b){return a.index-b.index}),i.hooks[a]=c,i.hooks[a]},i.doAction=function(a,b){i.isFunction(b)?i.each(i.hooks[a],b):i.each(i.hooks[a],function(a,b){return!b.handle()})},i.later=function(a,b,c,d){b=b||0;var e,f,g=a,h=d;return"string"==typeof a&&(g=c[a]),e=function(){g.apply(c,i.isArray(h)?h:[h])},f=setTimeout(e,b),{id:f,cancel:function(){clearTimeout(f)}}},i.now=Date.now||function(){return+new Date};var k={};return i.each(["Boolean","Number","String","Function","Array","Date","RegExp","Object","Error"],function(a,b){k["[object "+b+"]"]=b.toLowerCase()}),window.JSON&&(i.parseJSON=JSON.parse),i.fn={each:function(a){return[].every.call(this,function(b,c){return!1!==a.call(b,c,b)}),this}},"function"==typeof define&&define.amd&&define("mui",[],function(){return i}),i}(document);!function(a,b){function c(c){this.os={};var d=[function(){var a=c.match(/(MicroMessenger)\/([\d\.]+)/i);return a&&(this.os.wechat={version:a[2].replace(/_/g,".")}),!1},function(){var a=c.match(/(Android);?[\s\/]+([\d.]+)?/);return a&&(this.os.android=!0,this.os.version=a[2],this.os.isBadAndroid=!/Chrome\/\d/.test(b.navigator.appVersion)),!0===this.os.android},function(){var a=c.match(/(iPhone\sOS)\s([\d_]+)/);if(a)this.os.ios=this.os.iphone=!0,this.os.version=a[2].replace(/_/g,".");else{var b=c.match(/(iPad).*OS\s([\d_]+)/);b&&(this.os.ios=this.os.ipad=!0,this.os.version=b[2].replace(/_/g,"."))}return!0===this.os.ios}];[].every.call(d,function(b){return!b.call(a)})}c.call(a,navigator.userAgent)}(mui,window),function(a,b){function c(c){this.os=this.os||{},c.match(/Html5Plus/i)&&(this.os.plus=!0,a(function(){b.body.classList.add("mui-plus")}),c.match(/StreamApp/i)&&(this.os.stream=!0,a(function(){b.body.classList.add("mui-plus-stream")})))}c.call(a,navigator.userAgent)}(mui,document),function(a){"ontouchstart"in window?(a.isTouchable=!0,a.EVENT_START="touchstart",a.EVENT_MOVE="touchmove",a.EVENT_END="touchend"):(a.isTouchable=!1,a.EVENT_START="mousedown",a.EVENT_MOVE="mousemove",a.EVENT_END="mouseup"),a.EVENT_CANCEL="touchcancel",a.EVENT_CLICK="click";var b=1,c={},d={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"},e=function(){return!0},f=function(){return!1},g=function(b,c){return b.detail?b.detail.currentTarget=c:b.detail={currentTarget:c},a.each(d,function(a,c){var d=b[a];b[a]=function(){return this[c]=e,d&&d.apply(b,arguments)},b[c]=f},!0),b},h=function(a){return a&&(a._mid||(a._mid=b++))},i={},j=function(b,d,e,f){return function(e){for(var f=c[b._mid][d],h=[],i=e.target,j={};i&&i!==document&&i!==b&&(!~["click","tap","doubletap","longtap","hold"].indexOf(d)||!i.disabled&&!i.classList.contains("mui-disabled"));i=i.parentNode){var k={};a.each(f,function(c,d){j[c]||(j[c]=a.qsa(c,b)),j[c]&&~j[c].indexOf(i)&&(k[c]||(k[c]=d))},!0),a.isEmptyObject(k)||h.push({element:i,handlers:k})}j=null,e=g(e),a.each(h,function(b,c){i=c.element;var f=i.tagName;if("tap"===d&&"INPUT"!==f&&"TEXTAREA"!==f&&"SELECT"!==f&&(e.preventDefault(),e.detail&&e.detail.gesture&&e.detail.gesture.preventDefault()),a.each(c.handlers,function(b,c){a.each(c,function(a,b){!1===b.call(i,e)&&(e.preventDefault(),e.stopPropagation())},!0)},!0),e.isPropagationStopped())return!1},!0)}},k=function(a,b){var c=i[h(a)],d=[];if(c){if(d=[],b){var e=function(a){return a.type===b};return c.filter(e)}d=c}return d},l=/^(INPUT|TEXTAREA|BUTTON|SELECT)$/;a.fn.on=function(b,d,e){return this.each(function(){var f=this;h(f),h(e);var g=!1,k=c[f._mid]||(c[f._mid]={}),m=k[b]||(k[b]={});if(a.isEmptyObject(m)&&(g=!0),(m[d]||(m[d]=[])).push(e),g){var n=i[h(f)];n||(n=[]);var o=j(f,b,d,e);n.push(o),o.i=n.length-1,o.type=b,i[h(f)]=n,f.addEventListener(b,o),"tap"===b&&f.addEventListener("click",function(a){if(a.target){var b=a.target.tagName;if(!l.test(b))if("A"===b){var c=a.target.href;c&&~c.indexOf("tel:")||a.preventDefault()}else a.preventDefault()}})}})},a.fn.off=function(b,d,e){return this.each(function(){var f=h(this);if(b)if(d)if(e){var g=c[f]&&c[f][b]&&c[f][b][d];a.each(g,function(a,b){if(h(b)===h(e))return g.splice(a,1),!1},!0)}else c[f]&&c[f][b]&&delete c[f][b][d];else c[f]&&delete c[f][b];else c[f]&&delete c[f];c[f]?c[f][b]&&!a.isEmptyObject(c[f][b])||k(this,b).forEach(function(a){this.removeEventListener(a.type,a),delete i[f][a.i]}.bind(this)):k(this).forEach(function(a){this.removeEventListener(a.type,a),delete i[f][a.i]}.bind(this))})}}(mui),function(a,b,c){a.targets={},a.targetHandles=[],a.registerTarget=function(b){return b.index=b.index||1e3,a.targetHandles.push(b),a.targetHandles.sort(function(a,b){return a.index-b.index}),a.targetHandles},b.addEventListener(a.EVENT_START,function(b){for(var d=b.target,e={};d&&d!==c;d=d.parentNode){var f=!1;if(a.each(a.targetHandles,function(c,g){var h=g.name;f||e[h]||!g.hasOwnProperty("handle")?e[h]||!1!==g.isReset&&(a.targets[h]=!1):(a.targets[h]=g.handle(b,d),a.targets[h]&&(e[h]=!0,!0!==g.isContinue&&(f=!0)))}),f)break}}),b.addEventListener("click",function(b){for(var d=b.target,e=!1;d&&d!==c&&("A"!==d.tagName||(a.each(a.targetHandles,function(a,c){c.name;if(c.hasOwnProperty("handle")&&c.handle(b,d))return e=!0,b.preventDefault(),!1}),!e));d=d.parentNode);})}(mui,window,document),function(a){String.prototype.trim===a&&(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}),Object.setPrototypeOf=Object.setPrototypeOf||function(a,b){return a.__proto__=b,a}}(),function(){function a(a,b){b=b||{bubbles:!1,cancelable:!1,detail:void 0};var c=document.createEvent("Events"),d=!0;for(var e in b)"bubbles"===e?d=!!b[e]:c[e]=b[e];return c.initEvent(a,d,!0),c}void 0===window.CustomEvent&&(a.prototype=window.Event.prototype,window.CustomEvent=a)}(),Function.prototype.bind=Function.prototype.bind||function(a){var b=Array.prototype.splice.call(arguments,1),c=this,d=function(){var e=b.concat(Array.prototype.splice.call(arguments,0));if(!(this instanceof d))return c.apply(a,e);c.apply(this,e)};return d.prototype=c.prototype,d},function(a){"classList"in a.documentElement||!Object.defineProperty||"undefined"==typeof HTMLElement||Object.defineProperty(HTMLElement.prototype,"classList",{get:function(){function a(a){return function(c){var d=b.className.split(/\s+/),e=d.indexOf(c);a(d,e,c),b.className=d.join(" ")}}var b=this,c={add:a(function(a,b,c){~b||a.push(c)}),remove:a(function(a,b){~b&&a.splice(b,1)}),toggle:a(function(a,b,c){~b?a.splice(b,1):a.push(c)}),contains:function(a){return!!~b.className.split(/\s+/).indexOf(a)},item:function(a){return b.className.split(/\s+/)[a]||null}};return Object.defineProperty(c,"length",{get:function(){return b.className.split(/\s+/).length}}),c}})}(document),function(a){if(!a.requestAnimationFrame){var b=0;a.requestAnimationFrame=a.webkitRequestAnimationFrame||function(c,d){var e=(new Date).getTime(),f=Math.max(0,16.7-(e-b)),g=a.setTimeout(function(){c(e+f)},f);return b=e+f,g},a.cancelAnimationFrame=a.webkitCancelAnimationFrame||a.webkitCancelRequestAnimationFrame||function(a){clearTimeout(a)}}}(window),function(a,b,c){if((a.os.android||a.os.ios)&&!b.FastClick){var d=function(a,b){return"LABEL"===b.tagName&&b.parentNode&&(b=b.parentNode.querySelector("input")),!(!b||"radio"!==b.type&&"checkbox"!==b.type||b.disabled)&&b};a.registerTarget({name:c,index:40,handle:d,target:!1});var e=function(c){var d=a.targets.click;if(d){var e,f;document.activeElement&&document.activeElement!==d&&document.activeElement.blur(),f=c.detail.gesture.changedTouches[0],e=document.createEvent("MouseEvents"),e.initMouseEvent("click",!0,!0,b,1,f.screenX,f.screenY,f.clientX,f.clientY,!1,!1,!1,!1,0,null),e.forwardedTouchEvent=!0,d.dispatchEvent(e),c.detail&&c.detail.gesture.preventDefault()}};b.addEventListener("tap",e),b.addEventListener("doubletap",e),b.addEventListener("click",function(b){if(a.targets.click&&!b.forwardedTouchEvent)return b.stopImmediatePropagation?b.stopImmediatePropagation():b.propagationStopped=!0,b.stopPropagation(),b.preventDefault(),!1},!0)}}(mui,window,"click"),function(a,b){a(function(){if(a.os.ios){var c="mui-focusin";b.addEventListener("focusin",function(d){if(!(a.os.plus&&window.plus&&plus.webview.currentWebview().children().length>0)){var e=d.target;if(e.tagName&&("TEXTAREA"===e.tagName||"INPUT"===e.tagName&&("text"===e.type||"search"===e.type||"number"===e.type))){if(e.disabled||e.readOnly)return;b.body.classList.add(c);for(var f=!1;e&&e!==b;e=e.parentNode){var g=e.classList;if(g&&g.contains("mui-bar-tab")||g.contains("mui-bar-footer")||g.contains("mui-bar-footer-secondary")||g.contains("mui-bar-footer-secondary-tab")){f=!0;break}}if(f){var h=b.body.scrollHeight,i=b.body.scrollLeft;setTimeout(function(){window.scrollTo(i,h)},20)}}}}),b.addEventListener("focusout",function(a){var d=b.body.classList;d.contains(c)&&(d.remove(c),setTimeout(function(){window.scrollTo(b.body.scrollLeft,b.body.scrollTop)},20))})}})}(mui,document),function(a){a.namespace="mui",a.classNamePrefix=a.namespace+"-",a.classSelectorPrefix="."+a.classNamePrefix,a.className=function(b){return a.classNamePrefix+b},a.classSelector=function(b){return b.replace(/\./g,a.classSelectorPrefix)},a.eventName=function(b,c){return b+(a.namespace?"."+a.namespace:"")+(c?"."+c:"")}}(mui),function(a,b){a.gestures={session:{}},a.preventDefault=function(a){a.preventDefault()},a.stopPropagation=function(a){a.stopPropagation()},a.addGesture=function(b){return a.addAction("gestures",b)};var c=Math.round,d=Math.abs,e=Math.sqrt,f=(Math.atan,Math.atan2),g=function(a,b,c){c||(c=["x","y"]);var d=b[c[0]]-a[c[0]],f=b[c[1]]-a[c[1]];return e(d*d+f*f)},h=function(a,b){if(a.length>=2&&b.length>=2){var c=["pageX","pageY"];return g(b[1],b[0],c)/g(a[1],a[0],c)}return 1},i=function(a,b,c){c||(c=["x","y"]);var d=b[c[0]]-a[c[0]],e=b[c[1]]-a[c[1]];return 180*f(e,d)/Math.PI},j=function(a,b){return a===b?"":d(a)>=d(b)?a>0?"left":"right":b>0?"up":"down"},k=function(a,b){var c=["pageX","pageY"];return i(b[1],b[0],c)-i(a[1],a[0],c)},l=function(a,b,c){return{x:b/a||0,y:c/a||0}},m=function(b,c){a.gestures.stoped||a.doAction("gestures",function(d,e){a.gestures.stoped||!1!==a.options.gestureConfig[e.name]&&e.handle(b,c)})},n=function(a,b){for(;a;){if(a==b)return!0;a=a.parentNode}return!1},o=function(a,b,c){for(var d=[],e=[],f=0;fc[b]}):d.sort()),d},p=function(a){var b=a.length;if(1===b)return{x:c(a[0].pageX),y:c(a[0].pageY)};for(var d=0,e=0,f=0;f1&&!c.firstMultiTouch?c.firstMultiTouch=r(b):1===e&&(c.firstMultiTouch=!1);var f=c.firstTouch,l=c.firstMultiTouch,m=l?l.center:f.center,n=b.center=p(d);b.timestamp=a.now(),b.deltaTime=b.timestamp-f.timestamp,b.angle=i(m,n),b.distance=g(m,n),s(b),b.offsetDirection=j(b.deltaX,b.deltaY),b.scale=l?h(l.touches,d):1,b.rotation=l?k(l.touches,d):0,v(b)},u=25,v=function(b){var c,e,f,g,h=a.gestures.session,i=h.lastInterval||b,k=b.timestamp-i.timestamp;if(b.gesture.type!=a.EVENT_CANCEL&&(k>u||void 0===i.velocity)){var m=i.deltaX-b.deltaX,n=i.deltaY-b.deltaY,o=l(k,m,n);e=o.x,f=o.y,c=d(o.x)>d(o.y)?o.x:o.y,g=j(m,n)||i.direction,h.lastInterval=b}else c=i.velocity,e=i.velocityX,f=i.velocityY,g=i.direction;b.velocity=c,b.velocityX=e,b.velocityY=f,b.direction=g},w={},x=function(a){for(var b=0;b300&&(c=h,f.flickStart=e.center);break;case a.EVENT_END:case a.EVENT_CANCEL:e.flick=!1,f.flickStart&&g.flickMaxTime>h-c&&e.distance>g.flickMinDistince&&(e.flick=!0,e.flickTime=h-c,e.flickDistanceX=e.center.x-f.flickStart.x,e.flickDistanceY=e.center.y-f.flickStart.y,a.trigger(f.target,b,e),a.trigger(f.target,b+e.direction,e))}};a.addGesture({name:b,index:5,handle:d,options:{flickMaxTime:200,flickMinDistince:10}})}(mui,"flick"),function(a,b){var c=function(c,d){var e=a.gestures.session;if(c.type===a.EVENT_END||c.type===a.EVENT_CANCEL){var f=this.options;d.swipe=!1,d.direction&&f.swipeMaxTime>d.deltaTime&&d.distance>f.swipeMinDistince&&(d.swipe=!0,a.trigger(e.target,b,d),a.trigger(e.target,b+d.direction,d))}};a.addGesture({name:b,index:10,handle:c,options:{swipeMaxTime:300,swipeMinDistince:18}})}(mui,"swipe"),function(a,b){var c=function(c,d){var e=a.gestures.session;switch(c.type){case a.EVENT_START:break;case a.EVENT_MOVE:if(!d.direction||!e.target)return;e.lockDirection&&e.startDirection&&e.startDirection&&e.startDirection!==d.direction&&("up"===e.startDirection||"down"===e.startDirection?d.direction=d.deltaY<0?"up":"down":d.direction=d.deltaX<0?"left":"right"),e.drag||(e.drag=!0,a.trigger(e.target,b+"start",d)),a.trigger(e.target,b,d),a.trigger(e.target,b+d.direction,d);break;case a.EVENT_END:case a.EVENT_CANCEL:e.drag&&d.isFinal&&a.trigger(e.target,b+"end",d)}};a.addGesture({name:b,index:20,handle:c,options:{fingers:1}})}(mui,"drag"),function(a,b){var c,d,e=function(e,f){var g=a.gestures.session,h=this.options;switch(e.type){case a.EVENT_END:if(!f.isFinal)return;var i=g.target;if(!i||i.disabled||i.classList&&i.classList.contains("mui-disabled"))return;if(f.distanceg.holdThreshold&&clearTimeout(c);break;case a.EVENT_END:case a.EVENT_CANCEL:clearTimeout(c)}};a.addGesture({name:b,index:10,handle:d,options:{fingers:1,holdTimeout:500,holdThreshold:2}})}(mui,"longtap"),function(a,b){var c,d=function(d,e){var f=a.gestures.session,g=this.options;switch(d.type){case a.EVENT_START:a.options.gestureConfig.hold&&(c&&clearTimeout(c),c=setTimeout(function(){e.hold=!0,a.trigger(f.target,b,e)},g.holdTimeout));break;case a.EVENT_MOVE:break;case a.EVENT_END:case a.EVENT_CANCEL:c&&(clearTimeout(c)&&(c=null),a.trigger(f.target,"release",e))}};a.addGesture({name:b,index:10,handle:d,options:{fingers:1,holdTimeout:0}})}(mui,"hold"),function(a,b){var c=function(c,d){var e=this.options,f=a.gestures.session;switch(c.type){case a.EVENT_START:break;case a.EVENT_MOVE:if(a.options.gestureConfig.pinch){if(d.touches.length<2)return;f.pinch||(f.pinch=!0,a.trigger(f.target,b+"start",d)),a.trigger(f.target,b,d);var g=d.scale,h=d.rotation,i=void 0===d.lastScale?1:d.lastScale,j=1e-12;g>i?(i=g-j,a.trigger(f.target,b+"out",d)):ge.minRotationAngle&&a.trigger(f.target,"rotate",d)}break;case a.EVENT_END:case a.EVENT_CANCEL:a.options.gestureConfig.pinch&&f.pinch&&2===d.touches.length&&(f.pinch=!1,a.trigger(f.target,b+"end",d))}};a.addGesture({name:b,index:10,handle:c,options:{minRotationAngle:0}})}(mui,"pinch"),function(a){function b(a,b){var c="MUI_SCROLL_POSITION_"+document.location.href+"_"+b.src,d=parseFloat(localStorage.getItem(c))||0;d&&function(a){b.onload=function(){window.scrollTo(0,a)}}(d),setInterval(function(){var a=window.scrollY;d!==a&&(localStorage.setItem(c,a+""),d=a)},100)}a.global=a.options={gestureConfig:{tap:!0,doubletap:!1,longtap:!1,hold:!1,flick:!0,swipe:!0,drag:!0,pinch:!1}},a.initGlobal=function(b){return a.options=a.extend(!0,a.global,b),this};var c={};a.init=function(b){return a.options=a.extend(!0,a.global,b||{}),a.ready(function(){a.doAction("inits",function(b,d){!(c[d.name]&&!d.repeat)&&(d.handle.call(a),c[d.name]=!0)})}),this},a.addInit=function(b){return a.addAction("inits",b)},a.addInit({name:"iframe",index:100,handle:function(){var b=a.options,c=b.subpages||[];!a.os.plus&&c.length&&d(c[0])}});var d=function(c){var d=document.createElement("div");d.className="mui-iframe-wrapper";var e=c.styles||{};"string"!=typeof e.top&&(e.top="0px"),"string"!=typeof e.bottom&&(e.bottom="0px"),d.style.top=e.top,d.style.bottom=e.bottom;var f=document.createElement("iframe");f.src=c.url,f.id=c.id||c.url,f.name=f.id,d.appendChild(f),document.body.appendChild(d),a.os.wechat&&b(d,f)};a(function(){var b=document.body.classList,c=[];a.os.ios?(c.push({os:"ios",version:a.os.version}),b.add("mui-ios")):a.os.android&&(c.push({os:"android",version:a.os.version}),b.add("mui-android")),a.os.wechat&&(c.push({os:"wechat",version:a.os.wechat.version}),b.add("mui-wechat")),c.length&&a.each(c,function(c,d){var e="";d.version&&a.each(d.version.split("."),function(c,f){e=e+(e?"-":"")+f,b.add(a.className(d.os+"-"+e))})})})}(mui),function(a){var b={swipeBack:!1,preloadPages:[],preloadLimit:10,keyEventBind:{backbutton:!0,menubutton:!0},titleConfig:{height:"44px",backgroundColor:"#f7f7f7",bottomBorderColor:"#cccccc",title:{text:"",position:{top:0,left:0,width:"100%",height:"100%"},styles:{color:"#000000",align:"center",family:"'Helvetica Neue',Helvetica,sans-serif",size:"17px",style:"normal",weight:"normal",fontSrc:""}},back:{image:{base64Data:"",imgSrc:"",sprite:{top:"0px",left:"0px",width:"100%",height:"100%"},position:{top:"10px",left:"10px",width:"24px",height:"24px"}}}}},c={event:"titleUpdate",autoShow:!0,duration:300,aniShow:"slide-in-right",extras:{}};a.options.show&&(c=a.extend(!0,c,a.options.show)),a.currentWebview=null,a.extend(!0,a.global,b),a.extend(!0,a.options,b),a.waitingOptions=function(b){return a.extend(!0,{},{autoShow:!0,title:"",modal:!1},b)},a.showOptions=function(b){return a.extend(!0,{},c,b)},a.windowOptions=function(b){return a.extend({scalable:!1,bounce:""},b)},a.plusReady=function(a){return window.plus?setTimeout(function(){a()},0):document.addEventListener("plusready",function(){a()},!1),this},a.fire=function(b,c,d){if(b){if(void 0===d)d="";else{if("boolean"==typeof d||"number"==typeof d)return void b.evalJS("typeof mui!=='undefined'&&mui.receive('"+c+"',"+d+")");(a.isPlainObject(d)||a.isArray(d))&&(d=JSON.stringify(d||{}).replace(/\'/g,"\\u0027").replace(/\\/g,"\\u005c"))}b.evalJS("typeof mui!=='undefined'&&mui.receive('"+c+"','"+d+"')")}},a.receive=function(b,c){if(b){try{c&&"string"==typeof c&&(c=JSON.parse(c))}catch(a){}a.trigger(document,b,c)}};var d=function(b){if(!b.preloaded){a.fire(b,"preload");for(var c=b.children(),d=0;dt.left&&ca.options.preloadLimit){var h=a.data.preloads.shift(),i=a.webviews[h];i&&i.webview&&a.closeAll(i.webview),delete a.webviews[h]}}else!1!==c&&(d=plus.webview.create(b.url,e,a.windowOptions(b.styles),b.extras),b.subpages&&a.each(b.subpages,function(b,c){var e=c.id||c.url,f=plus.webview.getWebviewById(e);f||(f=plus.webview.create(c.url,e,a.windowOptions(c.styles),c.extras)),d.append(f)}));return d}},a.preload=function(b){return b.preload||(b.preload=!0),a.createWindow(b)},a.closeOpened=function(b){var c=b.opened();if(c)for(var d=0,e=c.length;d0?(a.closeOpened(f),f.close("none")):f.parent()!==b&&f.close("none")}},a.closeAll=function(b,c){a.closeOpened(b),c?b.close(c):b.close()},a.createWindows=function(b){a.each(b,function(b,c){a.createWindow(c,!1)})},a.appendWebview=function(b){if(window.plus){var c,d=b.id||b.url;return a.webviews[d]||(plus.webview.getWebviewById(d)||(c=plus.webview.create(b.url,d,b.styles,b.extras)),plus.webview.currentWebview().append(c),a.webviews[d]=b),c}},a.webviews={},a.data.preloads=[],a.plusReady(function(){a.currentWebview=plus.webview.currentWebview()}),a.addInit({name:"5+",index:100,handle:function(){var b=a.options,c=b.subpages||[];a.os.plus&&a.plusReady(function(){a.each(c,function(b,c){a.appendWebview(c)}),plus.webview.currentWebview()===plus.webview.getWebviewById(plus.runtime.appid)&&setTimeout(function(){d(plus.webview.currentWebview())},300),a.os.ios&&a.options.statusBarBackground&&plus.navigator.setStatusBarBackground(a.options.statusBarBackground),a.os.android&&parseFloat(a.os.version)<4.4&&null==plus.webview.currentWebview().parent()&&document.addEventListener("resume",function(){var a=document.body;a.style.display="none",setTimeout(function(){a.style.display=""},10)})})}}),window.addEventListener("preload",function(){var b=a.options.preloadPages||[];a.plusReady(function(){a.each(b,function(b,c){a.createWindow(a.extend(c,{preload:!0}))})})}),a.supportStatusbarOffset=function(){return a.os.plus&&a.os.ios&&parseFloat(a.os.version)>=7},a.ready(function(){a.supportStatusbarOffset()&&document.body.classList.add("mui-statusbar")})}(mui),function(a,b){a.addBack=function(b){return a.addAction("backs",b)},a.addBack({name:"browser",index:100,handle:function(){return b.history.length>1&&(b.history.back(),!0)}}),a.back=function(){"function"==typeof a.options.beforeback&&!1===a.options.beforeback()||a.doAction("backs")},b.addEventListener("tap",function(b){var c=a.targets.action;c&&c.classList.contains("mui-action-back")&&(a.back(),a.targets.action=!1)}),b.addEventListener("swiperight",function(b){var c=b.detail;!0===a.options.swipeBack&&Math.abs(c.angle)<3&&a.back()})}(mui,window),function(a,b){a.os.plus&&a.os.android&&a.addBack({name:"mui",index:5,handle:function(){if(a.targets._popover&&a.targets._popover.classList.contains("mui-active"))return a(a.targets._popover).popover("hide"),!0;var b=document.querySelector(".mui-off-canvas-wrap.mui-active");if(b)return a(b).offCanvas("close"),!0;var c=a.isFunction(a.getPreviewImage)&&a.getPreviewImage();return c&&c.isShown()?(c.close(),!0):a.closePopup()}}),a.__back__first=null,a.addBack({name:"5+",index:10,handle:function(){if(!b.plus)return!1;var c=plus.webview.currentWebview(),d=c.parent();return d?d.evalJS("mui&&mui.back();"):c.canBack(function(d){d.canBack?b.history.back():c.id===plus.runtime.appid?a.__back__first?(new Date).getTime()-a.__back__first<2e3&&plus.runtime.quit():(a.__back__first=(new Date).getTime(),mui.toast("再按一次退出应用"),setTimeout(function(){a.__back__first=null},2e3)):c.preload?c.hide("auto"):a.closeAll(c)}),!0}}),a.menu=function(){var c=document.querySelector(".mui-action-menu");if(c)a.trigger(c,a.EVENT_START),a.trigger(c,"tap");else if(b.plus){var d=a.currentWebview,e=d.parent();e&&e.evalJS("mui&&mui.menu();")}};var c=function(){a.back()},d=function(){a.menu()};a.plusReady(function(){a.options.keyEventBind.backbutton&&plus.key.addEventListener("backbutton",c,!1),a.options.keyEventBind.menubutton&&plus.key.addEventListener("menubutton",d,!1)}),a.addInit({name:"keyEventBind",index:1e3,handle:function(){a.plusReady(function(){a.options.keyEventBind.backbutton||plus.key.removeEventListener("backbutton",c),a.options.keyEventBind.menubutton||plus.key.removeEventListener("menubutton",d)})}})}(mui,window),function(a){a.addInit({name:"pullrefresh",index:1e3,handle:function(){var b=a.options,c=b.pullRefresh||{},d=c.down&&c.down.hasOwnProperty("callback"),e=c.up&&c.up.hasOwnProperty("callback");if(d||e){var f=c.container;if(f){var g=a(f);1===g.length&&(a.os.plus?d&&"circle"==c.down.style?a.plusReady(function(){a.fn.pullRefresh=a.fn.pullRefresh_native,g.pullRefresh(c)}):a.os.android?a.plusReady(function(){a.fn.pullRefresh=a.fn.pullRefresh_native;var b=plus.webview.currentWebview();if(!1===window.__NWin_Enable__)g.pullRefresh(c);else{if(e){var f={};f.up=c.up,f.webviewId=b.id||b.getURL(),g.pullRefresh(f)}if(d){var h=b.parent(),i=b.id||b.getURL();if(h){e||g.pullRefresh({webviewId:i});var j={webviewId:i};j.down=a.extend({},c.down),j.down.callback="_CALLBACK",h.evalJS("mui.fn.pullRefresh=mui.fn.pullRefresh_native"),h.evalJS("mui&&mui(document.querySelector('.mui-content')).pullRefresh('"+JSON.stringify(j)+"')")}}}}):g.pullRefresh(c):g.pullRefresh(c))}}}})}(mui),function(a,b,c){var d="application/json",e="text/html",f=/)<[^<]*)*<\/script>/gi,g=/^(?:text|application)\/javascript/i,h=/^(?:text|application)\/xml/i,i=/^\s*$/;a.ajaxSettings={type:"GET",beforeSend:a.noop,success:a.noop,error:a.noop,complete:a.noop,context:null,xhr:function(a){return new b.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:d,xml:"application/xml, text/xml",html:e,text:"text/plain"},timeout:0,processData:!0,cache:!0};var j=function(a,b){var c=b.context;if(!1===b.beforeSend.call(c,a,b))return!1},k=function(a,b,c){c.success.call(c.context,a,"success",b),m("success",b,c)},l=function(a,b,c,d){d.error.call(d.context,c,b,a),m(b,c,d)},m=function(a,b,c){c.complete.call(c.context,b,a)},n=function(b,c,d,e){var f,g=a.isArray(c),h=a.isPlainObject(c);a.each(c,function(c,i){f=a.type(i),e&&(c=d?e:e+"["+(h||"object"===f||"array"===f?c:"")+"]"),!e&&g?b.add(i.name,i.value):"array"===f||!d&&"object"===f?n(b,i,d,c):b.add(c,i)})},o=function(b){if(b.processData&&b.data&&"string"!=typeof b.data){var e=b.contentType;!e&&b.headers&&(e=b.headers["Content-Type"]),e&&~e.indexOf(d)?b.data=JSON.stringify(b.data):b.data=a.param(b.data,b.traditional)}!b.data||b.type&&"GET"!==b.type.toUpperCase()||(b.url=p(b.url,b.data),b.data=c)},p=function(a,b){return""===b?a:(a+"&"+b).replace(/[&?]{1,2}/,"?")},q=function(a){return a&&(a=a.split(";",2)[0]),a&&(a===e?"html":a===d?"json":g.test(a)?"script":h.test(a)&&"xml")||"text"},r=function(b,d,e,f){return a.isFunction(d)&&(f=e,e=d,d=c),a.isFunction(e)||(f=e,e=c),{url:b,data:d,success:e,dataType:f}};a.ajax=function(d,e){"object"==typeof d&&(e=d,d=c);var f=e||{};f.url=d||f.url;for(var g in a.ajaxSettings)f[g]===c&&(f[g]=a.ajaxSettings[g]);o(f);var h=f.dataType;!1!==f.cache&&(e&&!0===e.cache||"script"!==h)||(f.url=p(f.url,"_="+a.now()));var m=f.accepts[h&&h.toLowerCase()],n={},r=function(a,b){n[a.toLowerCase()]=[a,b]},s=/^([\w-]+:)\/\//.test(f.url)?RegExp.$1:b.location.protocol,t=f.xhr(f);"file:"===location.protocol&&a.os.ios&&b.webkit&&b.webkit.messageHandlers&&!(t instanceof plus.net.XMLHttpRequest)&&console.error("当前运行环境为WKWebview,需在plusReady事件触发后再调用mui.ajax,否则可能会执行失败或报Script error的错误");var u,v=t.setRequestHeader;if(r("X-Requested-With","XMLHttpRequest"),r("Accept",m||"*/*"),(m=f.mimeType||m)&&(m.indexOf(",")>-1&&(m=m.split(",",2)[0]),t.overrideMimeType&&t.overrideMimeType(m)),(f.contentType||!1!==f.contentType&&f.data&&"GET"!==f.type.toUpperCase())&&r("Content-Type",f.contentType||"application/x-www-form-urlencoded"),f.headers)for(var w in f.headers)r(w,f.headers[w]);if(t.setRequestHeader=r,t.onreadystatechange=function(){if(4===t.readyState){t.onreadystatechange=a.noop,clearTimeout(u);var b,c=!1,d="file:"===s;if(t.status>=200&&t.status<300||304===t.status||0===t.status&&d&&t.responseText){h=h||q(f.mimeType||t.getResponseHeader("content-type")),b=t.responseText;try{"script"===h?(0,eval)(b):"xml"===h?b=t.responseXML:"json"===h&&(b=i.test(b)?null:a.parseJSON(b))}catch(a){c=a}c?l(c,"parsererror",t,f):k(b,t,f)}else{var e=t.status?"error":"abort",g=t.statusText||null;d&&(e="error",g="404"),l(g,e,t,f)}}},!1===j(t,f))return t.abort(),l(null,"abort",t,f),t;if(f.xhrFields)for(var w in f.xhrFields)t[w]=f.xhrFields[w];var x=!("async"in f)||f.async;t.open(f.type.toUpperCase(),f.url,x,f.username,f.password);for(var w in n)n.hasOwnProperty(w)&&v.apply(t,n[w]);return f.timeout>0&&(u=setTimeout(function(){t.onreadystatechange=a.noop,t.abort(),l(null,"timeout",t,f)},f.timeout)),t.send(f.data?f.data:null),t},a.param=function(a,b){var c=[];return c.add=function(a,b){this.push(encodeURIComponent(a)+"="+encodeURIComponent(b))},n(c,a,b),c.join("&").replace(/%20/g,"+")},a.get=function(){return a.ajax(r.apply(null,arguments))},a.post=function(){var b=r.apply(null,arguments);return b.type="POST",a.ajax(b)},a.getJSON=function(){var b=r.apply(null,arguments);return b.dataType="json",a.ajax(b)},a.fn.load=function(b,c,d){if(!this.length)return this;var e,g=this,h=b.split(/\s/),i=r(b,c,d),j=i.success;return h.length>1&&(i.url=h[0],e=h[1]),i.success=function(a){if(e){var b=document.createElement("div");b.innerHTML=a.replace(f,"");var c=document.createElement("div"),d=b.querySelectorAll(e);if(d&&d.length>0)for(var h=0,i=d.length;h','
            ','
            {contentrefresh}
            ',"
            "].join(""),v={init:function(b,c){this._super(b,a.extend(!0,{scrollY:!0,scrollX:!1,indicators:!0,deceleration:.003,down:{height:50,contentinit:"下拉可以刷新",contentdown:"下拉可以刷新",contentover:"释放立即刷新",contentrefresh:"正在刷新..."},up:{height:50,auto:!1,contentinit:"上拉显示更多",contentdown:"上拉显示更多",contentrefresh:"正在加载...",contentnomore:"没有更多数据了",duration:300}},c))},_init:function(){this._super(),this._initPocket()},_initPulldownRefresh:function(){this.pulldown=!0,this.topPocket&&(this.pullPocket=this.topPocket,this.pullPocket.classList.add(o),this.pullPocket.classList.add(q),this.pullCaption=this.topCaption,this.pullLoading=this.topLoading)},_initPullupRefresh:function(){this.pulldown=!1,this.bottomPocket&&(this.pullPocket=this.bottomPocket,this.pullPocket.classList.add(o),this.pullPocket.classList.add(q),this.pullCaption=this.bottomCaption,this.pullLoading=this.bottomLoading)},_initPocket:function(){var a=this.options;a.down&&a.down.hasOwnProperty("callback")&&(this.topPocket=this.scroller.querySelector("."+d),this.topPocket||(this.topPocket=this._createPocket(d,a.down,s),this.wrapper.insertBefore(this.topPocket,this.wrapper.firstChild)),this.topLoading=this.topPocket.querySelector("."+g),this.topCaption=this.topPocket.querySelector("."+h)),a.up&&a.up.hasOwnProperty("callback")&&(this.bottomPocket=this.scroller.querySelector("."+e),this.bottomPocket||(this.bottomPocket=this._createPocket(e,a.up,t),this.scroller.appendChild(this.bottomPocket)),this.bottomLoading=this.bottomPocket.querySelector("."+g),this.bottomCaption=this.bottomPocket.querySelector("."+h),this.wrapper.addEventListener("scrollbottom",this))},_createPocket:function(a,c,d){var e=b.createElement("div");return e.className=a,e.innerHTML=u.replace("{contentrefresh}",c.contentinit).replace("{icon}",d),e},_resetPullDownLoading:function(){var a=this.pullLoading;a&&(this.pullCaption.innerHTML=this.options.down.contentdown,a.style.webkitTransition="",a.style.webkitTransform="",a.style.webkitAnimation="",a.className=s)},_setCaptionClass:function(a,b,c){if(!a)switch(c){case this.options.up.contentdown:b.className=h+" "+i;break;case this.options.up.contentrefresh:b.className=h+" "+j;break;case this.options.up.contentnomore:b.className=h+" "+k}},_setCaption:function(a,b){if(!this.loading){var c=this.options,d=this.pullPocket,e=this.pullCaption,f=this.pullLoading,g=this.pulldown,h=this;d&&(b?setTimeout(function(){e.innerHTML=h.lastTitle=a,g?f.className=s:(h._setCaptionClass(!1,e,a),f.className=t),f.style.webkitAnimation="",f.style.webkitTransition="",f.style.webkitTransform=""},100):a!==this.lastTitle&&(e.innerHTML=a,g?a===c.down.contentrefresh?(f.className=t,f.style.webkitAnimation="spinner-spin 1s step-end infinite"):a===c.down.contentover?(f.className=r,f.style.webkitTransition="-webkit-transform 0.3s ease-in",f.style.webkitTransform="rotate(180deg)"):a===c.down.contentdown&&(f.className=s,f.style.webkitTransition="-webkit-transform 0.3s ease-in",f.style.webkitTransform="rotate(0deg)"):(a===c.up.contentrefresh?f.className=t+" "+q:f.className=t+" "+p,h._setCaptionClass(!1,e,a)),this.lastTitle=a))}}};a.PullRefresh=v}(mui,document),function(a,b,c,d){var e="mui-scroll",f="mui-scrollbar",g="mui-scrollbar-indicator",h=f+"-vertical",i=f+"-horizontal",j="mui-active",k={quadratic:{style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",fn:function(a){return a*(2-a)}},circular:{style:"cubic-bezier(0.1, 0.57, 0.1, 1)",fn:function(a){return Math.sqrt(1- --a*a)}},outCirc:{style:"cubic-bezier(0.075, 0.82, 0.165, 1)"},outCubic:{style:"cubic-bezier(0.165, 0.84, 0.44, 1)"}},l=a.Class.extend({init:function(b,c){this.wrapper=this.element=b,this.scroller=this.wrapper.children[0],this.scrollerStyle=this.scroller&&this.scroller.style,this.stopped=!1,this.options=a.extend(!0,{scrollY:!0,scrollX:!1,startX:0,startY:0,indicators:!0,stopPropagation:!1,hardwareAccelerated:!0,fixedBadAndorid:!1,preventDefaultException:{tagName:/^(INPUT|TEXTAREA|BUTTON|SELECT|VIDEO)$/},momentum:!0,snapX:.5,snap:!1,bounce:!0,bounceTime:500,bounceEasing:k.outCirc,scrollTime:500,scrollEasing:k.outCubic,directionLockThreshold:5,parallaxElement:!1,parallaxRatio:.5},c),this.x=0,this.y=0,this.translateZ=this.options.hardwareAccelerated?" translateZ(0)":"",this._init(),this.scroller&&(this.refresh(),this.scrollTo(this.options.startX,this.options.startY))},_init:function(){this._initParallax(),this._initIndicators(),this._initEvent()},_initParallax:function(){this.options.parallaxElement&&(this.parallaxElement=c.querySelector(this.options.parallaxElement),this.parallaxStyle=this.parallaxElement.style,this.parallaxHeight=this.parallaxElement.offsetHeight,this.parallaxImgStyle=this.parallaxElement.querySelector("img").style)},_initIndicators:function(){var a=this;if(a.indicators=[],this.options.indicators){var b,c=[];a.options.scrollY&&(b={el:this._createScrollBar(h),listenX:!1},this.wrapper.appendChild(b.el),c.push(b)),this.options.scrollX&&(b={el:this._createScrollBar(i),listenY:!1},this.wrapper.appendChild(b.el),c.push(b));for(var d=c.length;d--;)this.indicators.push(new m(this,c[d]))}},_initSnap:function(){this.currentPage={},this.pages=[];for(var a=this.snaps,b=a.length,c=0,d=-1,e=0,f=0,g=0,h=0,i=0;i=this.maxScrollX&&c++}this.options.startX=this.currentPage.x||0},_getSnapX:function(a){return Math.max(Math.min(0,-a+this.wrapperWidth/2),this.maxScrollX)},_gotoPage:function(a){this.currentPage=this.pages[Math.min(a,this.pages.length-1)][0];for(var b=0,c=this.snaps.length;b0?a=0:a=("left"===this.direction?this.pages[b][0].leftX:this.pages[b][0].rightX))return this.pages[b][0]}return{x:0,pageX:0}},_initEvent:function(c){var d=c?"removeEventListener":"addEventListener";b[d]("orientationchange",this),b[d]("resize",this),this.scroller[d]("webkitTransitionEnd",this),this.wrapper[d](a.EVENT_START,this),this.wrapper[d](a.EVENT_CANCEL,this),this.wrapper[d](a.EVENT_END,this),this.wrapper[d]("drag",this),this.wrapper[d]("dragend",this),this.wrapper[d]("flick",this),this.wrapper[d]("scrollend",this),this.options.scrollX&&this.wrapper[d]("swiperight",this);var e=this.wrapper.querySelector(".mui-segmented-control");e&&mui(e)[c?"off":"on"]("click","a",a.preventDefault),this.wrapper[d]("scrollstart",this),this.wrapper[d]("refresh",this)},_handleIndicatorScrollend:function(){this.indicators.map(function(a){a.fade()})},_handleIndicatorScrollstart:function(){this.indicators.map(function(a){a.fade(1)})},_handleIndicatorRefresh:function(){this.indicators.map(function(a){a.refresh()})},handleEvent:function(b){if(this.stopped)return void this.resetPosition();switch(b.type){case a.EVENT_START:this._start(b);break;case"drag":this.options.stopPropagation&&b.stopPropagation(),this._drag(b);break;case"dragend":case"flick":this.options.stopPropagation&&b.stopPropagation(),this._flick(b);break;case a.EVENT_CANCEL:case a.EVENT_END:this._end(b);break;case"webkitTransitionEnd":this.transitionTimer&&this.transitionTimer.cancel(),this._transitionEnd(b);break;case"scrollstart":this._handleIndicatorScrollstart(b);break;case"scrollend":this._handleIndicatorScrollend(b),this._scrollend(b),b.stopPropagation();break;case"orientationchange":case"resize":this._resize();break;case"swiperight":b.stopPropagation();break;case"refresh":this._handleIndicatorRefresh(b)}},_start:function(b){if(this.moved=this.needReset=!1,this._transitionTime(),this.isInTransition){this.needReset=!0,this.isInTransition=!1;var c=a.parseTranslateMatrix(a.getStyles(this.scroller,"webkitTransform"));this.setTranslate(Math.round(c.x),Math.round(c.y)),a.trigger(this.scroller,"scrollend",this),b.preventDefault()}this.reLayout(),a.trigger(this.scroller,"beforescrollstart",this)},_getDirectionByAngle:function(a){return a<-80&&a>-100?"up":a>=80&&a<100?"down":a>=170||a<=-170?"left":a>=-35&&a<=10?"right":null},_drag:function(c){var d=c.detail;if((this.options.scrollY||"up"===d.direction||"down"===d.direction)&&a.os.ios&&parseFloat(a.os.version)>=8){var e=d.gesture.touches[0].clientY;if(e+10>b.innerHeight||e<10)return void this.resetPosition(this.options.bounceTime)}var f=isReturn=!1;this._getDirectionByAngle(d.angle);if("left"===d.direction||"right"===d.direction?this.options.scrollX?(f=!0,this.moved||(a.gestures.session.lockDirection=!0,a.gestures.session.startDirection=d.direction)):this.options.scrollY&&!this.moved&&(isReturn=!0):"up"===d.direction||"down"===d.direction?this.options.scrollY?(f=!0,this.moved||(a.gestures.session.lockDirection=!0,a.gestures.session.startDirection=d.direction)):this.options.scrollX&&!this.moved&&(isReturn=!0):isReturn=!0,(this.moved||f)&&(c.stopPropagation(),d.gesture&&d.gesture.preventDefault()),!isReturn){this.moved?c.stopPropagation():a.trigger(this.scroller,"scrollstart",this);var g=0,h=0;this.moved?(g=d.deltaX-a.gestures.session.prevTouch.deltaX,h=d.deltaY-a.gestures.session.prevTouch.deltaY):(g=d.deltaX,h=d.deltaY);var i=Math.abs(d.deltaX),j=Math.abs(d.deltaY);i>j+this.options.directionLockThreshold?h=0:j>=i+this.options.directionLockThreshold&&(g=0),g=this.hasHorizontalScroll?g:0,h=this.hasVerticalScroll?h:0;var k=this.x+g,l=this.y+h;(k>0||k0?0:this.maxScrollX),(l>0||l0?0:this.maxScrollY),this.requestAnimationFrame||this._updateTranslate(),this.direction=d.deltaX>0?"right":"left",this.moved=!0,this.x=k,this.y=l,a.trigger(this.scroller,"scroll",this)}},_flick:function(b){if(this.moved){b.stopPropagation();var c=b.detail;if(this._clearRequestAnimationFrame(),"dragend"!==b.type||!c.flick){var d=Math.round(this.x),e=Math.round(this.y);if(this.isInTransition=!1,!this.resetPosition(this.options.bounceTime)){if(this.scrollTo(d,e),"dragend"===b.type)return void a.trigger(this.scroller,"scrollend",this);var f=0,g="";if(this.options.momentum&&c.flickTime<300&&(momentumX=this.hasHorizontalScroll?this._momentum(this.x,c.flickDistanceX,c.flickTime,this.maxScrollX,this.options.bounce?this.wrapperWidth:0,this.options.deceleration):{destination:d,duration:0},momentumY=this.hasVerticalScroll?this._momentum(this.y,c.flickDistanceY,c.flickTime,this.maxScrollY,this.options.bounce?this.wrapperHeight:0,this.options.deceleration):{destination:e,duration:0},d=momentumX.destination,e=momentumY.destination,f=Math.max(momentumX.duration,momentumY.duration),this.isInTransition=!0),d!=this.x||e!=this.y)return(d>0||d0||e0&&this.y<=this.maxScrollY)&&a.trigger(this.scroller,"scrollbottom",this)},_resize:function(){var a=this;clearTimeout(a.resizeTimeout),a.resizeTimeout=setTimeout(function(){a.refresh()},a.options.resizePolling)},_transitionTime:function(b){if(b=b||0,this.scrollerStyle.webkitTransitionDuration=b+"ms",this.parallaxElement&&this.options.scrollY&&(this.parallaxStyle.webkitTransitionDuration=b+"ms"),this.options.fixedBadAndorid&&!b&&a.os.isBadAndroid&&(this.scrollerStyle.webkitTransitionDuration="0.001s",this.parallaxElement&&this.options.scrollY&&(this.parallaxStyle.webkitTransitionDuration="0.001s")),this.indicators)for(var c=this.indicators.length;c--;)this.indicators[c].transitionTime(b);b&&(this.transitionTimer&&this.transitionTimer.cancel(),this.transitionTimer=a.later(function(){a.trigger(this.scroller,"webkitTransitionEnd")},b+100,this))},_transitionTimingFunction:function(a){if(this.scrollerStyle.webkitTransitionTimingFunction=a,this.parallaxElement&&this.options.scrollY&&(this.parallaxStyle.webkitTransitionDuration=a),this.indicators)for(var b=this.indicators.length;b--;)this.indicators[b].transitionTimingFunction(a)},_translate:function(a,b){this.x=a,this.y=b},_clearRequestAnimationFrame:function(){this.requestAnimationFrame&&(cancelAnimationFrame(this.requestAnimationFrame),this.requestAnimationFrame=null)},_updateTranslate:function(){var a=this;a.x===a.lastX&&a.y===a.lastY||a.setTranslate(a.x,a.y),a.requestAnimationFrame=requestAnimationFrame(function(){a._updateTranslate()})},_createScrollBar:function(a){var b=c.createElement("div"),d=c.createElement("div");return b.className=f+" "+a,d.className=g,b.appendChild(d),a===h?(this.scrollbarY=b,this.scrollbarIndicatorY=d):a===i&&(this.scrollbarX=b,this.scrollbarIndicatorX=d),this.wrapper.appendChild(b),b},_preventDefaultException:function(a,b){for(var c in b)if(b[c].test(a[c]))return!0;return!1},_reLayout:function(){if(this.hasHorizontalScroll||(this.maxScrollX=0,this.scrollerWidth=this.wrapperWidth),this.hasVerticalScroll||(this.maxScrollY=0,this.scrollerHeight=this.wrapperHeight),this.indicators.map(function(a){a.refresh()}),this.options.snap&&"string"==typeof this.options.snap){var a=this.scroller.querySelectorAll(this.options.snap);this.itemLength=0,this.snaps=[];for(var b=0,c=a.length;b0&&(h=f?f/2.5*(j/8):0,b=Math.abs(a)+h,i=b/j),{destination:Math.round(h),duration:i}},_getTranslateStr:function(a,b){return this.options.hardwareAccelerated?"translate3d("+a+"px,"+b+"px,0px) "+this.translateZ:"translate("+a+"px,"+b+"px) "},setStopped:function(a){a?(this.disablePullupToRefresh(),this.disablePulldownToRefresh()):(this.enablePullupToRefresh(),this.enablePulldownToRefresh())},setTranslate:function(b,c){if(this.x=b,this.y=c,this.scrollerStyle.webkitTransform=this._getTranslateStr(b,c),this.parallaxElement&&this.options.scrollY){var d=c*this.options.parallaxRatio,e=1+d/((this.parallaxHeight-d)/2);e>1?(this.parallaxImgStyle.opacity=1-d/100*this.options.parallaxRatio,this.parallaxStyle.webkitTransform=this._getTranslateStr(0,-d)+" scale("+e+","+e+")"):(this.parallaxImgStyle.opacity=1,this.parallaxStyle.webkitTransform=this._getTranslateStr(0,-1)+" scale(1,1)")}if(this.indicators)for(var f=this.indicators.length;f--;)this.indicators[f].updatePosition();this.lastX=this.x,this.lastY=this.y,a.trigger(this.scroller,"scroll",this)},reLayout:function(){this.wrapper.offsetHeight;var b=parseFloat(a.getStyles(this.wrapper,"padding-left"))||0,c=parseFloat(a.getStyles(this.wrapper,"padding-right"))||0,d=parseFloat(a.getStyles(this.wrapper,"padding-top"))||0,e=parseFloat(a.getStyles(this.wrapper,"padding-bottom"))||0,f=this.wrapper.clientWidth,g=this.wrapper.clientHeight;this.scrollerWidth=this.scroller.offsetWidth,this.scrollerHeight=this.scroller.offsetHeight,this.wrapperWidth=f-b-c,this.wrapperHeight=g-d-e,this.maxScrollX=Math.min(this.wrapperWidth-this.scrollerWidth,0),this.maxScrollY=Math.min(this.wrapperHeight-this.scrollerHeight,0),this.hasHorizontalScroll=this.options.scrollX&&this.maxScrollX<0,this.hasVerticalScroll=this.options.scrollY&&this.maxScrollY<0,this._reLayout()},resetPosition:function(a){var b=this.x,c=this.y;return a=a||0,!this.hasHorizontalScroll||this.x>0?b=0:this.x0?c=0:this.y0,this.isInTransition?(this._clearRequestAnimationFrame(),this._transitionTimingFunction(d.style),this._transitionTime(c),this.setTranslate(a,b)):this.setTranslate(a,b)},scrollToBottom:function(a,b){a=a||this.options.scrollTime,this.scrollTo(0,this.maxScrollY,a,b)},gotoPage:function(a){this._gotoPage(a)},destroy:function(){this._initEvent(!0),delete a.data[this.wrapper.getAttribute("data-scroll")],this.wrapper.setAttribute("data-scroll","")}}),m=function(b,d){this.wrapper="string"==typeof d.el?c.querySelector(d.el):d.el,this.wrapperStyle=this.wrapper.style,this.indicator=this.wrapper.children[0],this.indicatorStyle=this.indicator.style,this.scroller=b,this.options=a.extend({listenX:!0,listenY:!0,fade:!1,speedRatioX:0,speedRatioY:0},d),this.sizeRatioX=1,this.sizeRatioY=1,this.maxPosX=0,this.maxPosY=0,this.options.fade&&(this.wrapperStyle.webkitTransform=this.scroller.translateZ,this.wrapperStyle.webkitTransitionDuration=this.options.fixedBadAndorid&&a.os.isBadAndroid?"0.001s":"0ms",this.wrapperStyle.opacity="0")};m.prototype={handleEvent:function(a){},transitionTime:function(b){b=b||0,this.indicatorStyle.webkitTransitionDuration=b+"ms",this.scroller.options.fixedBadAndorid&&!b&&a.os.isBadAndroid&&(this.indicatorStyle.webkitTransitionDuration="0.001s")},transitionTimingFunction:function(a){this.indicatorStyle.webkitTransitionTimingFunction=a},refresh:function(){this.transitionTime(),this.options.listenX&&!this.options.listenY?this.indicatorStyle.display=this.scroller.hasHorizontalScroll?"block":"none":this.options.listenY&&!this.options.listenX?this.indicatorStyle.display=this.scroller.hasVerticalScroll?"block":"none":this.indicatorStyle.display=this.scroller.hasHorizontalScroll||this.scroller.hasVerticalScroll?"block":"none",this.wrapper.offsetHeight,this.options.listenX&&(this.wrapperWidth=this.wrapper.clientWidth,this.indicatorWidth=Math.max(Math.round(this.wrapperWidth*this.wrapperWidth/(this.scroller.scrollerWidth||this.wrapperWidth||1)),8),this.indicatorStyle.width=this.indicatorWidth+"px",this.maxPosX=this.wrapperWidth-this.indicatorWidth,this.minBoundaryX=0,this.maxBoundaryX=this.maxPosX,this.sizeRatioX=this.options.speedRatioX||this.scroller.maxScrollX&&this.maxPosX/this.scroller.maxScrollX),this.options.listenY&&(this.wrapperHeight=this.wrapper.clientHeight,this.indicatorHeight=Math.max(Math.round(this.wrapperHeight*this.wrapperHeight/(this.scroller.scrollerHeight||this.wrapperHeight||1)),8),this.indicatorStyle.height=this.indicatorHeight+"px",this.maxPosY=this.wrapperHeight-this.indicatorHeight,this.minBoundaryY=0,this.maxBoundaryY=this.maxPosY,this.sizeRatioY=this.options.speedRatioY||this.scroller.maxScrollY&&this.maxPosY/this.scroller.maxScrollY),this.updatePosition()},updatePosition:function(){var a=this.options.listenX&&Math.round(this.sizeRatioX*this.scroller.x)||0,b=this.options.listenY&&Math.round(this.sizeRatioY*this.scroller.y)||0;athis.maxBoundaryX?(this.width=Math.max(this.indicatorWidth-(a-this.maxPosX),8),this.indicatorStyle.width=this.width+"px",a=this.maxPosX+this.indicatorWidth-this.width):this.width!=this.indicatorWidth&&(this.width=this.indicatorWidth,this.indicatorStyle.width=this.width+"px"),bthis.maxBoundaryY?(this.height=Math.max(this.indicatorHeight-3*(b-this.maxPosY),8),this.indicatorStyle.height=this.height+"px",b=this.maxPosY+this.indicatorHeight-this.height):this.height!=this.indicatorHeight&&(this.height=this.indicatorHeight,this.indicatorStyle.height=this.height+"px"),this.x=a,this.y=b,this.indicatorStyle.webkitTransform=this.scroller._getTranslateStr(a,b)},fade:function(a,b){if(!b||this.visible){clearTimeout(this.fadeTimeout),this.fadeTimeout=null;var c=a?250:500,d=a?0:300;a=a?"1":"0",this.wrapperStyle.webkitTransitionDuration=c+"ms",this.fadeTimeout=setTimeout(function(a){this.wrapperStyle.opacity=a,this.visible=+a}.bind(this,a),d)}}},a.Scroll=l,a.fn.scroll=function(b){var c=[];return this.each(function(){var d=null,e=this,f=e.getAttribute("data-scroll");if(f)d=a.data[f];else{f=++a.uuid;var g=a.extend({},b);e.classList.contains("mui-segmented-control")&&(g=a.extend(g,{scrollY:!1,scrollX:!0,indicators:!1,snap:".mui-control-item"})),a.data[f]=d=new l(e,g),e.setAttribute("data-scroll",f)}c.push(d)}),1===c.length?c[0]:c}}(mui,window,document),function(a,b,c,d){var e="mui-visibility",f="mui-hidden",g=a.Scroll.extend(a.extend({handleEvent:function(a){this._super(a),"scrollbottom"===a.type&&a.target===this.scroller&&this._scrollbottom()},_scrollbottom:function(){this.pulldown||this.loading||(this.pulldown=!1,this._initPullupRefresh(),this.pullupLoading())},_start:function(a){a.touches&&a.touches.length&&a.touches[0].clientX>30&&a.target&&!this._preventDefaultException(a.target,this.options.preventDefaultException)&&a.preventDefault(),this.loading||(this.pulldown=this.pullPocket=this.pullCaption=this.pullLoading=!1),this._super(a)},_drag:function(a){this.y>=0&&this.disablePulldown&&"down"===a.detail.direction||(this._super(a),!this.pulldown&&!this.loading&&this.topPocket&&"down"===a.detail.direction&&this.y>=0&&this._initPulldownRefresh(),this.pulldown&&this._setCaption(this.y>this.options.down.height?this.options.down.contentover:this.options.down.contentdown))},_reLayout:function(){this.hasVerticalScroll=!0,this._super()},resetPosition:function(a){if(this.pulldown&&!this.disablePulldown){if(this.y>=this.options.down.height)return this.pulldownLoading(d,a||0),!0;!this.loading&&this.topPocket.classList.remove(e)}return this._super(a)},pulldownLoading:function(a,b){if(void 0===a&&(a=this.options.down.height),this.scrollTo(0,a,b,this.options.bounceEasing),!this.loading){this._initPulldownRefresh(),this._setCaption(this.options.down.contentrefresh),this.loading=!0,this.indicators.map(function(a){a.fade(0)});var c=this.options.down.callback;c&&c.call(this)}},endPulldownToRefresh:function(){var a=this;a.topPocket&&a.loading&&this.pulldown&&(a.scrollTo(0,0,a.options.bounceTime,a.options.bounceEasing),a.loading=!1,a._setCaption(a.options.down.contentdown,!0),setTimeout(function(){a.loading||a.topPocket.classList.remove(e)},350))},pullupLoading:function(a,b,c){b=b||0,this.scrollTo(b,this.maxScrollY,c,this.options.bounceEasing),this.loading||(this._initPullupRefresh(),this._setCaption(this.options.up.contentrefresh),this.indicators.map(function(a){a.fade(0)}),this.loading=!0,(a=a||this.options.up.callback)&&a.call(this))},endPullupToRefresh:function(a){var b=this;b.bottomPocket&&(b.loading=!1,a?(this.finished=!0,b._setCaption(b.options.up.contentnomore),b.wrapper.removeEventListener("scrollbottom",b)):(b._setCaption(b.options.up.contentdown),b.loading||b.bottomPocket.classList.remove(e)))},disablePullupToRefresh:function(){this._initPullupRefresh(),this.bottomPocket.className="mui-pull-bottom-pocket "+f,this.wrapper.removeEventListener("scrollbottom",this)},disablePulldownToRefresh:function(){this._initPulldownRefresh(),this.topPocket.className="mui-pull-top-pocket "+f,this.disablePulldown=!0},enablePulldownToRefresh:function(){this._initPulldownRefresh(),this.topPocket.classList.remove(f),this._setCaption(this.options.down.contentdown),this.disablePulldown=!1},enablePullupToRefresh:function(){this._initPullupRefresh(),this.bottomPocket.classList.remove(f),this._setCaption(this.options.up.contentdown),this.wrapper.addEventListener("scrollbottom",this)},refresh:function(a){a&&this.finished&&(this.enablePullupToRefresh(),this.finished=!1),this._super()}},a.PullRefresh));a.fn.pullRefresh=function(b){if(1===this.length){var c=this[0],d=null,e=c.getAttribute("data-pullrefresh");return!(!e&&void 0===b)&&(b=b||{},e?d=a.data[e]:(e=++a.uuid,a.data[e]=d=new g(c,b),c.setAttribute("data-pullrefresh",e)),b.down&&b.down.auto?d.pulldownLoading(b.down.autoY):b.up&&b.up.auto&&d.pullupLoading(),d)}}}(mui,window,document),function(a,b){var c="mui-slider",d="mui-slider-group",e="mui-slider-loop",f="mui-action-previous",g="mui-action-next",h="mui-slider-item",i="mui-active",j="."+h,k=".mui-slider-progress-bar",l=a.Slider=a.Scroll.extend({init:function(b,c){this._super(b,a.extend(!0,{fingers:1,interval:0,scrollY:!1,scrollX:!0,indicators:!1,scrollTime:1e3,startX:!1,slideTime:0,snap:j},c)),this.options.startX},_init:function(){this._reInit(),this.scroller&&(this.scrollerStyle=this.scroller.style,this.progressBar=this.wrapper.querySelector(k),this.progressBar&&(this.progressBarWidth=this.progressBar.offsetWidth,this.progressBarStyle=this.progressBar.style),this._super(),this._initTimer())},_triggerSlide:function(){var b=this;b.isInTransition=!1;b.currentPage;b.slideNumber=b._fixedSlideNumber(),b.loop&&(0===b.slideNumber?b.setTranslate(b.pages[1][0].x,0):b.slideNumber===b.itemLength-3&&b.setTranslate(b.pages[b.itemLength-2][0].x,0)),b.lastSlideNumber!=b.slideNumber&&(b.lastSlideNumber=b.slideNumber,b.lastPage=b.currentPage,a.trigger(b.wrapper,"slide",{slideNumber:b.slideNumber})),b._initTimer()},_handleSlide:function(b){var c=this;if(b.target===c.wrapper){var d=b.detail;d.slideNumber=d.slideNumber||0;for(var e=c.scroller.querySelectorAll(j),f=[],g=0,h=e.length;g0)for(var g=0,h=n.length;gthis.itemLength-(b?2:3)?(a=1,time=0):a<(b?-1:0)?(a=this.itemLength-2,time=0):a+=1:(b||(a>this.itemLength-1?(a=0,time=0):a<0&&(a=this.itemLength-1,time=0)),a=Math.min(Math.max(0,a),this.itemLength-1)),this.pages[a][0]},_gotoItem:function(b,c){this.currentPage=this._getPage(b,!0),this.scrollTo(this.currentPage.x,0,c,this.options.scrollEasing),0===c&&a.trigger(this.wrapper,"scrollend",this)},setTranslate:function(a,b){this._super(a,b),this.progressBar&&(this.progressBarStyle.webkitTransform=this._getTranslateStr(-a*(this.progressBarWidth/this.wrapperWidth),0))},resetPosition:function(a){return a=a||0,this.x>0?this.x=0:this.x=b.documentElement.scrollHeight&&(a.isScroll=!1,a.bottomPocket&&a.pullupLoading())},100)},_initPulldownRefreshEvent:function(){var b=this;a.plusReady(function(){if("circle"==b.options.down.style)b.options.webview=plus.webview.currentWebview(),b.options.webview.setPullToRefresh({support:!0,color:b.options.down.color||"#2BD009",height:b.options.down.height||"50px",range:b.options.down.range||"100px",style:"circle",offset:b.options.down.offset||"0px"},function(){b.options.down.callback()});else if(b.topPocket&&b.options.webviewId){var a=plus.webview.getWebviewById(b.options.webviewId);if(!a)return;b.options.webview=a;var c=b.options.down,d=c.height;a.addEventListener("close",function(){var a=b.options.webviewId&&b.options.webviewId.replace(/\//g,"_");b.element.removeAttribute("data-pullrefresh-plus-"+a)}),a.addEventListener("dragBounce",function(d){switch(b.pulldown?b.pullPocket.classList.add(e):b._initPulldownRefresh(),d.status){case"beforeChangeOffset":b._setCaption(c.contentdown);break;case"afterChangeOffset":b._setCaption(c.contentover);break;case"dragEndAfterChangeOffset":a.evalJS("window.mui&&mui.options.pullRefresh.down.callback()"),b._setCaption(c.contentrefresh)}},!1),a.setBounce({position:{top:2*d+"px"},changeoffset:{top:d+"px"}})}})},handleEvent:function(a){var b=this;b.stopped||(b.isScroll=!1,"dragup"!==a.type&&"plusscrollbottom"!==a.type||(b.isScroll=!0,setTimeout(function(){b.isScroll=!1},1e3)))}}).extend(a.extend({setStopped:function(a){this.stopped=!!a,this.stopped?(this.disablePullupToRefresh(),this.disablePulldownToRefresh()):(this.enablePullupToRefresh(),this.enablePulldownToRefresh())},beginPulldown:function(){var b=this;a.plusReady(function(){setTimeout(function(){if("circle"==b.options.down.style)plus.webview.currentWebview().beginPullToRefresh();else{var a=b.options.webview;a&&a.setBounce({offset:{top:b.options.down.height+"px"}})}},15)}.bind(this))},pulldownLoading:function(){this.beginPulldown()},_pulldownLoading:function(){var b=this;a.plusReady(function(){var a=plus.webview.getWebviewById(b.options.webviewId);a&&a.setBounce({offset:{top:b.options.down.height+"px"}})})},endPulldown:function(){var a=plus.webview.currentWebview();a.parent()&&"circle"!==this.options.down.style?a.parent().evalJS("mui&&mui(document.querySelector('.mui-content')).pullRefresh('"+JSON.stringify({webviewId:a.id})+"')._endPulldownToRefresh()"):a.endPullToRefresh()},endPulldownToRefresh:function(){this.endPulldown()},_endPulldownToRefresh:function(){var a=this;a.topPocket&&a.options.webview&&(a.options.webview.endPullToRefresh(),a.loading=!1,a._setCaption(a.options.down.contentdown,!0),setTimeout(function(){a.loading||a.topPocket.classList.remove(e)},350))},beginPullup:function(a){var b=this;b.isLoading||(b.isLoading=!0,!1!==b.pulldown?b._initPullupRefresh():this.pullPocket.classList.add(e),setTimeout(function(){b.pullLoading.classList.add(c),b.pullLoading.classList.remove(d),b.pullCaption.innerHTML="",b.pullCaption.className=f+" "+h,b.pullCaption.innerHTML=b.options.up.contentrefresh,(a=a||b.options.up.callback)&&a.call(b)},300))},pullupLoading:function(a){this.beginPullup(a)},endPullup:function(a){var e=this;e.pullLoading&&(e.pullLoading.classList.remove(c),e.pullLoading.classList.add(d),e.isLoading=!1,a?(e.finished=!0,e.pullCaption.className=f+" "+i,e.pullCaption.innerHTML=e.options.up.contentnomore,b.removeEventListener("plusscrollbottom",e),window.removeEventListener("dragup",e)):(e.pullCaption.className=f+" "+g,e.pullCaption.innerHTML=e.options.up.contentdown))},endPullupToRefresh:function(a){this.endPullup(a)},disablePulldownToRefresh:function(){var a=plus.webview.currentWebview();this.options.down.style&&"circle"==this.options.down.style?this.options.webview.setPullToRefresh({support:!1,style:"circle"}):(a.setStyle({bounce:"none"}),a.setBounce({position:{top:"none"}}))},enablePulldownToRefresh:function(){var a=this,b=plus.webview.currentWebview(),c=this.options.down.height;this.options.down.style&&"circle"==this.options.down.style?b.setPullToRefresh({support:!0,height:c||"50px",range:a.options.down.range||"100px",style:"circle",offset:a.options.down.offset||"0px"}):(b.setStyle({bounce:"vertical"}),b.setBounce({position:{top:2*c+"px"},changeoffset:{top:c+"px"}}))},disablePullupToRefresh:function(){this._initPullupRefresh(),this.bottomPocket.className="mui-pull-bottom-pocket "+d,window.removeEventListener("dragup",this)},enablePullupToRefresh:function(){this._initPullupRefresh(),this.bottomPocket.classList.remove(d),this.pullCaption.className=f+" "+g,this.pullCaption.innerHTML=this.options.up.contentdown,b.addEventListener("plusscrollbottom",this),window.addEventListener("dragup",this)},scrollTo:function(b,c,d){a.scrollTo(c,d)},scrollToBottom:function(c){a.scrollTo(b.documentElement.scrollHeight,c)},refresh:function(a){a&&this.finished&&(this.enablePullupToRefresh(),this.finished=!1)}},a.PullRefresh));a.fn.pullRefresh_native=function(c){var d;0===this.length?(d=b.createElement("div"),d.className="mui-content",b.body.appendChild(d)):d=this[0];var e=c;c=c||{},"string"==typeof c&&(c=a.parseJSON(c)),!c.webviewId&&(c.webviewId=plus.webview.currentWebview().id||plus.webview.currentWebview().getURL());var f=null,g=c.webviewId&&c.webviewId.replace(/\//g,"_"),h=d.getAttribute("data-pullrefresh-plus-"+g);return!(!h&&void 0===e)&&(h?f=a.data[h]:(h=++a.uuid,d.setAttribute("data-pullrefresh-plus-"+g,h),b.body.classList.add("mui-plus-pullrefresh"),a.data[h]=f=new j(d,c)),c.down&&c.down.auto?f.beginPulldown():c.up&&c.up.auto&&f.beginPullup(),f)}}})}(mui,document),function(a,b,c,d){var e="mui-off-canvas-left",f="mui-off-canvas-right",g="mui-off-canvas-backdrop",h="mui-off-canvas-wrap",i="mui-slide-in",j="mui-active",k="mui-transitioning",l=".mui-inner-wrap",m=a.Class.extend({init:function(b,d){this.wrapper=this.element=b,this.scroller=this.wrapper.querySelector(l),this.classList=this.wrapper.classList,this.scroller&&(this.options=a.extend(!0,{dragThresholdX:10,scale:.8,opacity:.1,preventDefaultException:{tagName:/^(INPUT|TEXTAREA|BUTTON|SELECT|VIDEO)$/}},d),c.body.classList.add("mui-fullscreen"),this.refresh(),this.initEvent())},_preventDefaultException:function(a,b){for(var c in b)if(b[c].test(a[c]))return!0;return!1},refresh:function(a){this.slideIn=this.classList.contains(i),this.scalable=this.classList.contains("mui-scalable")&&!this.slideIn,this.scroller=this.wrapper.querySelector(l),this.offCanvasLefts=this.wrapper.querySelectorAll("."+e),this.offCanvasRights=this.wrapper.querySelectorAll("."+f),a?a.classList.contains(e)?this.offCanvasLeft=a:a.classList.contains(f)&&(this.offCanvasRight=a):(this.offCanvasRight=this.wrapper.querySelector("."+f),this.offCanvasLeft=this.wrapper.querySelector("."+e)),this.offCanvasRightWidth=this.offCanvasLeftWidth=0,this.offCanvasLeftSlideIn=this.offCanvasRightSlideIn=!1,this.offCanvasRight&&(this.offCanvasRightWidth=this.offCanvasRight.offsetWidth,this.offCanvasRightSlideIn=this.slideIn&&this.offCanvasRight.parentNode===this.wrapper),this.offCanvasLeft&&(this.offCanvasLeftWidth=this.offCanvasLeft.offsetWidth,this.offCanvasLeftSlideIn=this.slideIn&&this.offCanvasLeft.parentNode===this.wrapper),this.backdrop=this.scroller.querySelector("."+g),this.options.dragThresholdX=this.options.dragThresholdX||10,this.visible=!1,this.startX=null,this.lastX=null,this.offsetX=null,this.lastTranslateX=null},handleEvent:function(b){switch(b.type){case a.EVENT_START:b.target&&!this._preventDefaultException(b.target,this.options.preventDefaultException)&&b.preventDefault();break;case"webkitTransitionEnd":b.target===this.scroller&&this._dispatchEvent();break;case"drag":var c=b.detail;this.startX?this.lastX=c.center.x:(this.startX=c.center.x,this.lastX=this.startX),!this.isDragging&&Math.abs(this.lastX-this.startX)>this.options.dragThresholdX&&("left"===c.direction||"right"===c.direction)&&(this.slideIn?(this.scroller=this.wrapper.querySelector(l),this.classList.contains(j)?this.offCanvasRight&&this.offCanvasRight.classList.contains(j)?(this.offCanvas=this.offCanvasRight,this.offCanvasWidth=this.offCanvasRightWidth):(this.offCanvas=this.offCanvasLeft,this.offCanvasWidth=this.offCanvasLeftWidth):"left"===c.direction&&this.offCanvasRight?(this.offCanvas=this.offCanvasRight,this.offCanvasWidth=this.offCanvasRightWidth):"right"===c.direction&&this.offCanvasLeft?(this.offCanvas=this.offCanvasLeft,this.offCanvasWidth=this.offCanvasLeftWidth):this.scroller=null):this.classList.contains(j)?"left"===c.direction?(this.offCanvas=this.offCanvasLeft,this.offCanvasWidth=this.offCanvasLeftWidth):(this.offCanvas=this.offCanvasRight,this.offCanvasWidth=this.offCanvasRightWidth):"right"===c.direction?(this.offCanvas=this.offCanvasLeft,this.offCanvasWidth=this.offCanvasLeftWidth):(this.offCanvas=this.offCanvasRight,this.offCanvasWidth=this.offCanvasRightWidth),this.offCanvas&&this.scroller&&(this.startX=this.lastX,this.isDragging=!0,a.gestures.session.lockDirection=!0,a.gestures.session.startDirection=c.direction,this.offCanvas.classList.remove(k),this.scroller.classList.remove(k),this.offsetX=this.getTranslateX(),this._initOffCanvasVisible())),this.isDragging&&(this.updateTranslate(this.offsetX+(this.lastX-this.startX)),c.gesture.preventDefault(),b.stopPropagation());break;case"dragend":if(this.isDragging){var c=b.detail,d=c.direction;this.isDragging=!1,this.offCanvas.classList.add(k),this.scroller.classList.add(k);var e=0,f=this.getTranslateX();if(this.slideIn){if(e=f>=0?this.offCanvasRightWidth&&f/this.offCanvasRightWidth||0:this.offCanvasLeftWidth&&f/this.offCanvasLeftWidth||0,"right"===d&&e<=0&&(e>=-.5||c.swipe)?this.openPercentage(100):"right"===d&&e>0&&(e>=.5||c.swipe)?this.openPercentage(0):"right"===d&&e<=-.5?this.openPercentage(0):"right"===d&&e>0&&e<=.5?this.openPercentage(-100):"left"===d&&e>=0&&(e<=.5||c.swipe)?this.openPercentage(-100):"left"===d&&e<0&&(e<=-.5||c.swipe)?this.openPercentage(0):"left"===d&&e>=.5?this.openPercentage(0):"left"===d&&e>=-.5&&e<0?this.openPercentage(100):this.openPercentage(0),1===e||-1===e||0===e)return void this._dispatchEvent()}else{if(0===(e=f>=0?this.offCanvasLeftWidth&&f/this.offCanvasLeftWidth||0:this.offCanvasRightWidth&&f/this.offCanvasRightWidth||0))return this.openPercentage(0),void this._dispatchEvent();"right"===d&&e>=0&&(e>=.5||c.swipe)?this.openPercentage(100):"right"===d&&e<0&&(e>-.5||c.swipe)?this.openPercentage(0):"right"===d&&e>0&&e<.5?this.openPercentage(0):"right"===d&&e<.5?this.openPercentage(-100):"left"===d&&e<=0&&(e<=-.5||c.swipe)?this.openPercentage(-100):"left"===d&&e>0&&(e<=.5||c.swipe)?this.openPercentage(0):"left"===d&&e<0&&e>=-.5?this.openPercentage(0):"left"===d&&e>.5?this.openPercentage(100):this.openPercentage(0),1!==e&&-1!==e||this._dispatchEvent()}}}},_dispatchEvent:function(){this.classList.contains(j)?a.trigger(this.wrapper,"shown",this):a.trigger(this.wrapper,"hidden",this)},_initOffCanvasVisible:function(){this.visible||(this.visible=!0,this.offCanvasLeft&&(this.offCanvasLeft.style.visibility="visible"),this.offCanvasRight&&(this.offCanvasRight.style.visibility="visible"))},initEvent:function(){var b=this;b.backdrop&&b.backdrop.addEventListener("tap",function(a){b.close(),a.detail.gesture.preventDefault()}),this.classList.contains("mui-draggable")&&(this.wrapper.addEventListener(a.EVENT_START,this),this.wrapper.addEventListener("drag",this),this.wrapper.addEventListener("dragend",this)),this.wrapper.addEventListener("webkitTransitionEnd",this)},openPercentage:function(a){var b=a/100;this.slideIn?(this.offCanvasLeft&&a>=0?(b=0===b?-1:0,this.updateTranslate(this.offCanvasLeftWidth*b),this.offCanvasLeft.classList[0!==a?"add":"remove"](j)):this.offCanvasRight&&a<=0&&(b=0===b?1:0,this.updateTranslate(this.offCanvasRightWidth*b),this.offCanvasRight.classList[0!==a?"add":"remove"](j)),this.classList[0!==a?"add":"remove"](j)):(this.offCanvasLeft&&a>=0?(this.updateTranslate(this.offCanvasLeftWidth*b),this.offCanvasLeft.classList[0!==b?"add":"remove"](j)):this.offCanvasRight&&a<=0&&(this.updateTranslate(this.offCanvasRightWidth*b),this.offCanvasRight.classList[0!==b?"add":"remove"](j)),this.classList[0!==b?"add":"remove"](j))},updateTranslate:function(b){if(b!==this.lastTranslateX){if(this.slideIn){if(this.offCanvas.classList.contains(f)){if(b<0)return void this.setTranslateX(0);if(b>this.offCanvasRightWidth)return void this.setTranslateX(this.offCanvasRightWidth)}else{if(b>0)return void this.setTranslateX(0);if(b<-this.offCanvasLeftWidth)return void this.setTranslateX(-this.offCanvasLeftWidth)}this.setTranslateX(b)}else{if(!this.offCanvasLeft&&b>0||!this.offCanvasRight&&b<0)return void this.setTranslateX(0);if(this.leftShowing&&b>this.offCanvasLeftWidth)return void this.setTranslateX(this.offCanvasLeftWidth);if(this.rightShowing&&b<-this.offCanvasRightWidth)return void this.setTranslateX(-this.offCanvasRightWidth);this.setTranslateX(b),b>=0?(this.leftShowing=!0,this.rightShowing=!1,b>0&&(this.offCanvasLeft&&a.each(this.offCanvasLefts,function(a,b){b===this.offCanvasLeft?this.offCanvasLeft.style.zIndex=0:b.style.zIndex=-1}.bind(this)),this.offCanvasRight&&(this.offCanvasRight.style.zIndex=-1))):(this.rightShowing=!0,this.leftShowing=!1,this.offCanvasRight&&a.each(this.offCanvasRights,function(a,b){b===this.offCanvasRight?b.style.zIndex=0:b.style.zIndex=-1}.bind(this)),this.offCanvasLeft&&(this.offCanvasLeft.style.zIndex=-1))}this.lastTranslateX=b}},setTranslateX:a.animationFrame(function(a){if(this.scroller)if(this.scalable&&this.offCanvas.parentNode===this.wrapper){var b=Math.abs(a)/this.offCanvasWidth,c=1-(1-this.options.scale)*b,d=this.options.scale+(1-this.options.scale)*b,f=(this.options.opacity,this.options.opacity+(1-this.options.opacity)*b);this.offCanvas.classList.contains(e)?(this.offCanvas.style.webkitTransformOrigin="-100%",this.scroller.style.webkitTransformOrigin="left"):(this.offCanvas.style.webkitTransformOrigin="200%",this.scroller.style.webkitTransformOrigin="right"),this.offCanvas.style.opacity=f,this.offCanvas.style.webkitTransform="translate3d(0,0,0) scale("+d+")",this.scroller.style.webkitTransform="translate3d("+a+"px,0,0) scale("+c+")"}else this.slideIn?this.offCanvas.style.webkitTransform="translate3d("+a+"px,0,0)":this.scroller.style.webkitTransform="translate3d("+a+"px,0,0)"}),getTranslateX:function(){if(this.offCanvas){var b=this.slideIn?this.offCanvas:this.scroller,c=a.parseTranslateMatrix(a.getStyles(b,"webkitTransform"));return c&&c.x||0}return 0},isShown:function(a){var b=!1;if(this.slideIn)b="left"===a?this.classList.contains(j)&&this.wrapper.querySelector("."+e+"."+j):"right"===a?this.classList.contains(j)&&this.wrapper.querySelector("."+f+"."+j):this.classList.contains(j)&&(this.wrapper.querySelector("."+e+"."+j)||this.wrapper.querySelector("."+f+"."+j));else{var c=this.getTranslateX();b="right"===a?this.classList.contains(j)&&c<0:"left"===a?this.classList.contains(j)&&c>0:this.classList.contains(j)&&0!==c}return b},close:function(){this._initOffCanvasVisible(),this.offCanvas=this.wrapper.querySelector("."+f+"."+j)||this.wrapper.querySelector("."+e+"."+j),this.offCanvasWidth=this.offCanvas.offsetWidth,this.scroller&&(this.offCanvas.offsetHeight,this.offCanvas.classList.add(k),this.scroller.classList.add(k),this.openPercentage(0))},show:function(a){return this._initOffCanvasVisible(),!this.isShown(a)&&(a||(a=this.wrapper.querySelector("."+f)?"right":"left"),"right"===a?(this.offCanvas=this.offCanvasRight,this.offCanvasWidth=this.offCanvasRightWidth):(this.offCanvas=this.offCanvasLeft,this.offCanvasWidth=this.offCanvasLeftWidth),this.scroller&&(this.offCanvas.offsetHeight,this.offCanvas.classList.add(k),this.scroller.classList.add(k),this.openPercentage("left"===a?100:-100)),!0)},toggle:function(a){var b=a;a&&a.classList&&(b=a.classList.contains(e)?"left":"right",this.refresh(a)),this.show(b)||this.close()}}),n=function(a){if(parentNode=a.parentNode,parentNode){if(parentNode.classList.contains(h))return parentNode;if(parentNode=parentNode.parentNode,parentNode.classList.contains(h))return parentNode}},o=function(b,d){if("A"===d.tagName&&d.hash){var e=c.getElementById(d.hash.replace("#",""));if(e){var f=n(e);if(f)return a.targets._container=f,e}}return!1};a.registerTarget({name:d,index:60,handle:o,target:!1,isReset:!1,isContinue:!0}),b.addEventListener("tap",function(b){if(a.targets.offcanvas)for(var d=b.target;d&&d!==c;d=d.parentNode)if("A"===d.tagName&&d.hash&&d.hash==="#"+a.targets.offcanvas.id){b.detail&&b.detail.gesture&&b.detail.gesture.preventDefault(),a(a.targets._container).offCanvas().toggle(a.targets.offcanvas),a.targets.offcanvas=a.targets._container=null;break}}),a.fn.offCanvas=function(b){var c=[];return this.each(function(){var d=null,e=this;e.classList.contains(h)||(e=n(e));var f=e.getAttribute("data-offCanvas");f?d=a.data[f]:(f=++a.uuid,a.data[f]=d=new m(e,b),e.setAttribute("data-offCanvas",f)),"show"!==b&&"close"!==b&&"toggle"!==b||d.toggle(),c.push(d)}),1===c.length?c[0]:c},a.ready(function(){a(".mui-off-canvas-wrap").offCanvas()})}(mui,window,document,"offcanvas"),function(a,b){var c="mui-action",d=function(a,b){var d=b.className||"";return"string"!=typeof d&&(d=""),!(!d||!~d.indexOf(c))&&(b.classList.contains("mui-action-back")&&a.preventDefault(),b)};a.registerTarget({name:b,index:50,handle:d,target:!1,isContinue:!0})}(mui,"action"),function(a,b,c,d){var e="mui-modal",f=function(a,b){if("A"===b.tagName&&b.hash){var d=c.getElementById(b.hash.replace("#",""));if(d&&d.classList.contains(e))return d}return!1};a.registerTarget({name:d,index:50,handle:f,target:!1,isReset:!1,isContinue:!0}),b.addEventListener("tap",function(b){a.targets.modal&&(b.detail.gesture.preventDefault(),a.targets.modal.classList.toggle("mui-active"))})}(mui,window,document,"modal"),function(a,b,c,d){var e="mui-popover",f="mui-popover-arrow",g="mui-popover-action",h="mui-backdrop",i="mui-bar-popover",j="mui-bar-backdrop",k="mui-backdrop-action",l="mui-active",m="mui-bottom",n=function(b,d){if("A"===d.tagName&&d.hash){if(a.targets._popover=c.getElementById(d.hash.replace("#","")),a.targets._popover&&a.targets._popover.classList.contains(e))return d;a.targets._popover=null}return!1};a.registerTarget({name:d,index:60,handle:n,target:!1,isReset:!1,isContinue:!0});var o,p=function(b){this.removeEventListener("webkitTransitionEnd",p),this.addEventListener(a.EVENT_MOVE,a.preventDefault),a.trigger(this,"shown",this)},q=function(b){u(this,"none"),this.removeEventListener("webkitTransitionEnd",q),this.removeEventListener(a.EVENT_MOVE,a.preventDefault),a.trigger(this,"hidden",this)},r=function(){var b=c.createElement("div");return b.classList.add(h),b.addEventListener(a.EVENT_MOVE,a.preventDefault),b.addEventListener("tap",function(b){var c=a.targets._popover;c&&(c.addEventListener("webkitTransitionEnd",q),c.classList.remove(l),s(c))}),b}(),s=function(b){r.setAttribute("style","opacity:0"),a.targets.popover=a.targets._popover=null,o=a.later(function(){!b.classList.contains(l)&&r.parentNode&&r.parentNode===c.body&&c.body.removeChild(r)},350)};b.addEventListener("tap",function(b){if(a.targets.popover){for(var d=!1,e=b.target;e&&e!==c;e=e.parentNode)e===a.targets.popover&&(d=!0);d&&(b.detail.gesture.preventDefault(),t(a.targets._popover,a.targets.popover))}});var t=function(a,b,d){if(!("show"===d&&a.classList.contains(l)||"hide"===d&&!a.classList.contains(l))){o&&o.cancel(),a.removeEventListener("webkitTransitionEnd",p),a.removeEventListener("webkitTransitionEnd",q),r.classList.remove(j),r.classList.remove(k);var e=c.querySelector(".mui-popover.mui-active");if(e&&(e.addEventListener("webkitTransitionEnd",q),e.classList.remove(l),a===e))return void s(e);var f=!1;(a.classList.contains(i)||a.classList.contains(g))&&(a.classList.contains(g)?(f=!0,r.classList.add(k)):r.classList.add(j)),u(a,"block"),a.offsetHeight,a.classList.add(l),r.setAttribute("style",""),c.body.appendChild(r),v(a,b,f),r.classList.add(l),a.addEventListener("webkitTransitionEnd",p)}},u=function(a,b,c,d){var e=a.style;void 0!==b&&(e.display=b),void 0!==c&&(e.top=c+"px"),void 0!==d&&(e.left=d+"px")},v=function(d,e,h){if(d&&e){if(h)return void u(d,"block");var i=b.innerWidth,j=b.innerHeight,k=d.offsetWidth,l=d.offsetHeight,n=e.offsetWidth,o=e.offsetHeight,p=a.offset(e),q=d.querySelector("."+f);q||(q=c.createElement("div"),q.className=f,d.appendChild(q));var r=q&&q.offsetWidth/2||0,s=0,t=0,v=0,w=0,x=d.classList.contains(g)?0:5,y="top";l+ri&&(t=i-k-x),q&&("top"===y?q.classList.add(m):q.classList.remove(m),v-=t,w=k/2-r/2+v,w=Math.max(Math.min(w,k-2*r-6),6),q.setAttribute("style","left:"+w+"px"))):"middle"===y&&q.setAttribute("style","display:none"),u(d,"block",s,t)}};a.createMask=function(b){var d=c.createElement("div");d.classList.add(h),d.addEventListener(a.EVENT_MOVE,a.preventDefault),d.addEventListener("tap",function(){e.close()});var e=[d];return e._show=!1,e.show=function(){return e._show=!0,d.setAttribute("style","opacity:1"),c.body.appendChild(d),e},e._remove=function(){return e._show&&(e._show=!1,d.setAttribute("style","opacity:0"),a.later(function(){var a=c.body;d.parentNode===a&&a.removeChild(d)},350)),e},e.close=function(){b?!1!==b()&&e._remove():e._remove()},e},a.fn.popover=function(){var b=arguments;this.each(function(){a.targets._popover=this,"show"!==b[0]&&"hide"!==b[0]&&"toggle"!==b[0]||t(this,b[1],b[0])})}}(mui,window,document,"popover"),function(a,b,c,d,e){var f="mui-control-item",g="mui-segmented-control-vertical",h="mui-control-content",i="mui-tab-item",j=function(a,b){return!(!b.classList||!b.classList.contains(f)&&!b.classList.contains(i))&&(b.parentNode&&b.parentNode.classList&&b.parentNode.classList.contains(g)||a.preventDefault(),b)};a.registerTarget({name:d,index:80,handle:j,target:!1}),b.addEventListener("tap",function(b){var e=a.targets.tab;if(e){for(var g,j,k,l="mui-active",m="."+l,n=e.parentNode;n&&n!==c;n=n.parentNode){if(n.classList.contains("mui-segmented-control")){g=n.querySelector(m+"."+f);break}n.classList.contains("mui-bar-tab")&&(g=n.querySelector(m+"."+i))}g&&g.classList.remove(l);var o=e===g;if(e&&e.classList.add(l),e.hash&&(k=c.getElementById(e.hash.replace("#","")))){if(!k.classList.contains(h))return void e.classList[o?"remove":"add"](l);if(!o){var p=k.parentNode;j=p.querySelectorAll("."+h+m);for(var q=0;qthis.handleX/2||!this.initialState&&a>this.handleX/2)&&(b=!0),this.lastChanged!==b&&(b?(this.handle.style.webkitTransform="translate("+(this.initialState?0:this.handleX)+"px,0)",this.classList[this.initialState?"remove":"add"](f)):(this.handle.style.webkitTransform="translate("+(this.initialState?this.handleX:0)+"px,0)",this.classList[this.initialState?"add":"remove"](f)),this.lastChanged=b)}}),a.fn.switch=function(b){var c=[];return this.each(function(){var b=null,d=this.getAttribute("data-switch");d?b=a.data[d]:(d=++a.uuid,a.data[d]=new k(this),this.setAttribute("data-switch",d)),c.push(b)}),c.length>1?c:c[0]},a.ready(function(){a("."+d).switch()})}(mui,window,"toggle"),function(a,b,c){function d(a,b){var c=b?"removeEventListener":"addEventListener";a[c]("drag",F),a[c]("dragend",F),a[c]("swiperight",F),a[c]("swipeleft",F),a[c]("flick",F)}var e,f,g="mui-active",h="mui-selected",i="mui-grid-view",j="mui-table-view-radio",k="mui-table-view-cell",l="mui-collapse-content",m="mui-disabled",n="mui-switch",o="mui-btn",p="mui-slider-handle",q="mui-slider-left",r="mui-slider-right",s="mui-transitioning",t="."+p,u="."+q,v="."+r,w="."+h,x="."+o,y=.8,z=isOpened=openedActions=progress=!1,A=sliderActionLeft=sliderActionRight=buttonsLeft=buttonsRight=sliderDirection=sliderRequestAnimationFrame=!1,B=translateX=lastTranslateX=sliderActionLeftWidth=sliderActionRightWidth=0,C=function(a){a?f?f.classList.add(g):e&&e.classList.add(g):(B&&B.cancel(),f?f.classList.remove(g):e&&e.classList.remove(g))},D=function(){if(translateX!==lastTranslateX){if(buttonsRight&&buttonsRight.length>0){progress=translateX/sliderActionRightWidth,translateX<-sliderActionRightWidth&&(translateX=-sliderActionRightWidth-Math.pow(-translateX-sliderActionRightWidth,y));for(var a=0,b=buttonsRight.length;a0){progress=translateX/sliderActionLeftWidth,translateX>sliderActionLeftWidth&&(translateX=sliderActionLeftWidth+Math.pow(translateX-sliderActionLeftWidth,y));for(var a=0,b=buttonsLeft.length;a1&&(d.style.zIndex=buttonsLeft.length-a),E(d,translateX+buttonOffset*(1-Math.min(progress,1)))}}E(A,translateX),lastTranslateX=translateX}sliderRequestAnimationFrame=requestAnimationFrame(function(){D()})},E=function(a,b){a&&(a.style.webkitTransform="translate("+b+"px,0)")};b.addEventListener(a.EVENT_START,function(b){e&&C(!1),e=f=!1,z=isOpened=openedActions=!1;for(var g=b.target,h=!1;g&&g!==c;g=g.parentNode)if(g.classList){var p=g.classList;if(("INPUT"===g.tagName&&"radio"!==g.type&&"checkbox"!==g.type||"BUTTON"===g.tagName||p.contains(n)||p.contains(o)||p.contains(m))&&(h=!0),p.contains(l))break;if(p.contains(k)){e=g;var q=e.parentNode.querySelector(w);if(!e.parentNode.classList.contains(j)&&q&&q!==e)return a.swipeoutClose(q),void(e=h=!1);if(!e.parentNode.classList.contains(i)){var r=e.querySelector("a");r&&r.parentNode===e&&(f=r)}var s=e.querySelector(t);s&&(d(e),b.stopPropagation()),h||(s?(B&&B.cancel(),B=a.later(function(){C(!0)},100)):C(!0));break}}}),b.addEventListener(a.EVENT_MOVE,function(a){C(!1)});var F={handleEvent:function(a){switch(a.type){case"drag":this.drag(a);break;case"dragend":this.dragend(a);break;case"flick":this.flick(a);break;case"swiperight":this.swiperight(a);break;case"swipeleft":this.swipeleft(a)}},drag:function(a){if(e){z||(A=sliderActionLeft=sliderActionRight=buttonsLeft=buttonsRight=sliderDirection=sliderRequestAnimationFrame=!1,(A=e.querySelector(t))&&(sliderActionLeft=e.querySelector(u),sliderActionRight=e.querySelector(v),sliderActionLeft&&(sliderActionLeftWidth=sliderActionLeft.offsetWidth,buttonsLeft=sliderActionLeft.querySelectorAll(x)),sliderActionRight&&(sliderActionRightWidth=sliderActionRight.offsetWidth,buttonsRight=sliderActionRight.querySelectorAll(x)),e.classList.remove(s),isOpened=e.classList.contains(h),isOpened&&(openedActions=e.querySelector(u+w)?"left":"right")));var b=a.detail,c=b.direction,d=b.angle;if("left"===c&&(d>150||d<-150)?(buttonsRight||buttonsLeft&&isOpened)&&(z=!0):"right"===c&&d>-30&&d<30&&(buttonsLeft||buttonsRight&&isOpened)&&(z=!0),z){a.stopPropagation(),a.detail.gesture.preventDefault();var f=a.detail.deltaX;if(isOpened&&("right"===openedActions?f-=sliderActionRightWidth:f+=sliderActionLeftWidth),f>0&&!buttonsLeft||f<0&&!buttonsRight){if(!isOpened)return;f=0}f<0?sliderDirection="toLeft":f>0?sliderDirection="toRight":sliderDirection||(sliderDirection="toLeft"),sliderRequestAnimationFrame||D(),translateX=f}}},flick:function(a){z&&a.stopPropagation()},swipeleft:function(a){z&&a.stopPropagation()},swiperight:function(a){z&&a.stopPropagation()},dragend:function(b){if(z){b.stopPropagation(),sliderRequestAnimationFrame&&(cancelAnimationFrame(sliderRequestAnimationFrame),sliderRequestAnimationFrame=null);var c=b.detail;z=!1;var d="close",f="toLeft"===sliderDirection?sliderActionRightWidth:sliderActionLeftWidth;(c.swipe||Math.abs(translateX)>f/2)&&(isOpened?"left"===c.direction&&"right"===openedActions?d="open":"right"===c.direction&&"left"===openedActions&&(d="open"):d="open"),e.classList.add(s);var g;if("open"===d){var i="toLeft"===sliderDirection?-f:f;if(E(A,i),void 0!==(g="toLeft"===sliderDirection?buttonsRight:buttonsLeft)){for(var j=null,k=0;k0&&buttonsLeft!==g)for(var k=0,m=buttonsLeft.length;k0&&buttonsRight!==g)for(var k=0,m=buttonsRight.length;k0?d.duration:e.short:duration=e[d.duration],duration||(duration=e.short);var f=document.createElement("div");return f.classList.add("mui-toast-container"),f.innerHTML='
            '+b+"
            ",f.addEventListener("webkitTransitionEnd",function(){f.classList.contains(c)||(f.parentNode.removeChild(f),f=null)}),f.addEventListener("click",function(){f.parentNode.removeChild(f),f=null}),document.body.appendChild(f),f.offsetHeight,f.classList.add(c),setTimeout(function(){f&&f.classList.remove(c)},duration),{isVisible:function(){return!!f}}}a.plusReady(function(){plus.nativeUI.toast(b,{verticalAlign:"bottom",duration:d.duration})})}}(mui,window),function(a,b,c){var d="mui-popup",e="mui-popup-backdrop",f="mui-popup-in",g="mui-popup-out",h="mui-popup-inner",i="mui-popup-title",j="mui-popup-text",k="mui-popup-input",l="mui-popup-buttons",m="mui-popup-button",n="mui-popup-button-bold",e="mui-popup-backdrop",o="mui-active",p=[],q=function(){var b=c.createElement("div");return b.classList.add(e),b.addEventListener(a.EVENT_MOVE,a.preventDefault),b.addEventListener("webkitTransitionEnd",function(){this.classList.contains(o)||b.parentNode&&b.parentNode.removeChild(b)}),b}(),r=function(a){return'
            '},s=function(a,b,c){return'
            '+b+'
            '+a.replace(/\r\n/g,"
            ").replace(/\n/g,"
            ")+"
            "+(c||"")+"
            "},t=function(a){for(var b=a.length,c=[],d=0;d'+a[d]+"");return'
            '+c.join("")+"
            "},u=function(b,e){var h=c.createElement("div");h.className=d,h.innerHTML=b;var i=function(){h.parentNode&&h.parentNode.removeChild(h),h=null};h.addEventListener(a.EVENT_MOVE,a.preventDefault),h.addEventListener("webkitTransitionEnd",function(a){h&&a.target===h&&h.classList.contains(g)&&i()}),h.style.display="block",c.body.appendChild(h),h.offsetHeight,h.classList.add(f),q.classList.contains(o)||(q.style.display="block",c.body.appendChild(q),q.offsetHeight,q.classList.add(o));var j=a.qsa("."+m,h),l=h.querySelector("."+k+" input"),n={element:h,close:function(a,b){if(h){if(!1===(e&&e({index:a||0,value:l&&l.value||""})))return;!1!==b?(h.classList.remove(f),h.classList.add(g)):i(),p.pop(),p.length?p[p.length-1].show(b):q.classList.remove(o)}}},r=function(a){n.close(j.indexOf(a.target))};return a(h).on("tap","."+m,r),p.length&&p[p.length-1].hide(),p.push({close:n.close,show:function(a){h.style.display="block",h.offsetHeight,h.classList.add(f)},hide:function(){h.style.display="none",h.classList.remove(f)}}),n},v=function(b,c,d,e,f){if(void 0!==b)return"function"==typeof c?(e=c,f=d,c=null,d=null):"function"==typeof d&&(f=e,e=d,d=null),a.os.plus&&"div"!==f?plus.nativeUI.alert(b,e,c||"提示",d||"确定"):u(s(b,c||"提示")+t([d||"确定"]),e)},w=function(b,c,d,e,f){if(void 0!==b)return"function"==typeof c?(e=c,f=d,c=null,d=null):"function"==typeof d&&(f=e,e=d,d=null),a.os.plus&&"div"!==f?plus.nativeUI.confirm(b,e,c,d||["取消","确认"]):u(s(b,c||"提示")+t(d||["取消","确认"]),e)},x=function(b,c,d,e,f,g){if(void 0!==b)return"function"==typeof c?(f=c,g=d,c=null,d=null,e=null):"function"==typeof d?(f=d,g=e,d=null,e=null):"function"==typeof e&&(g=f,f=e,e=null),a.os.plus&&"div"!==g?plus.nativeUI.prompt(b,f,d||"提示",c,e||["取消","确认"]):u(s(b,d||"提示",r(c))+t(e||["取消","确认"]),f)},y=function(){return!!p.length&&(p[p.length-1].close(),!0)},z=function(){for(;p.length;)p[p.length-1].close()};a.closePopup=y,a.closePopups=z,a.alert=v,a.confirm=w,a.prompt=x}(mui,window,document),function(a,b){var c="mui-progressbar",d="mui-progressbar-in",e="mui-progressbar-out",f="mui-progressbar-infinite",g=".mui-progressbar",h=function(b){if(b=a(b||"body"),0!==b.length){if(b=b[0],b.classList.contains(c))return b;var d=b.querySelectorAll(g);if(d)for(var e=0,f=d.length;e"),h.appendChild(l))}return i&&k(h,i),l}},j=function(a){var b=h(a);if(b){var c=b.classList;c.contains(d)&&!c.contains(e)&&(c.remove(d),c.add(e),b.addEventListener("webkitAnimationEnd",function(){b.parentNode&&b.parentNode.removeChild(b),b=null}))}},k=function(a,b,c){"number"==typeof a&&(c=b,b=a,a=!1);var d=h(a);if(d&&!d.classList.contains(f)){b&&(b=Math.min(Math.max(b,0),100)),d.offsetHeight;var e=d.querySelector("span");if(e){var g=e.style;g.webkitTransform="translate3d("+(-100+b)+"%,0,0)",g.webkitTransitionDuration=void 0!==c?c+"ms":""}return d}};a.fn.progressbar=function(a){var b=[];return a=a||{},this.each(function(){var c=this,d=c.mui_plugin_progressbar;d?a&&d.setOptions(a):c.mui_plugin_progressbar=d={options:a,setOptions:function(a){this.options=a},show:function(){return i(c,this.options.progress,this.options.color)},setProgress:function(a){return k(c,a)},hide:function(){return j(c)}},b.push(d)}),1===b.length?b[0]:b}}(mui,document),function(a,b,c){var d="mui-icon",e="mui-icon-clear",f="mui-icon-speech",g="mui-icon-eye",h="mui-input-row",i="mui-placeholder",j="mui-tooltip",k="mui-hidden",l="mui-focusin",m="."+e,n="."+f,o="."+g,p="."+i,q="."+j,r=function(a){for(;a&&a!==c;a=a.parentNode)if(a.classList&&a.classList.contains(h))return a;return null},s=function(a,b){this.element=a,this.options=b||{actions:"clear"},~this.options.actions.indexOf("slider")?(this.sliderActionClass=j+" "+k,this.sliderActionSelector=q):(~this.options.actions.indexOf("clear")&&(this.clearActionClass=d+" "+e+" "+k,this.clearActionSelector=m),~this.options.actions.indexOf("speech")&&(this.speechActionClass=d+" "+f,this.speechActionSelector=n),~this.options.actions.indexOf("search")&&(this.searchActionClass=i,this.searchActionSelector=p),~this.options.actions.indexOf("password")&&(this.passwordActionClass=d+" "+g,this.passwordActionSelector=o)),this.init()};s.prototype.init=function(){this.initAction(),this.initElementEvent()},s.prototype.initAction=function(){var b=this,c=b.element.parentNode;c&&(b.sliderActionClass?b.sliderAction=b.createAction(c,b.sliderActionClass,b.sliderActionSelector):(b.searchActionClass&&(b.searchAction=b.createAction(c,b.searchActionClass,b.searchActionSelector),b.searchAction.addEventListener("tap",function(c){a.focus(b.element),c.stopPropagation()})),b.speechActionClass&&(b.speechAction=b.createAction(c,b.speechActionClass,b.speechActionSelector),b.speechAction.addEventListener("click",a.stopPropagation),b.speechAction.addEventListener("tap",function(a){b.speechActionClick(a)})),b.clearActionClass&&(b.clearAction=b.createAction(c,b.clearActionClass,b.clearActionSelector),b.clearAction.addEventListener("tap",function(a){b.clearActionClick(a)})),b.passwordActionClass&&(b.passwordAction=b.createAction(c,b.passwordActionClass,b.passwordActionSelector),b.passwordAction.addEventListener("tap",function(a){b.passwordActionClick(a)}))))},s.prototype.createAction=function(a,b,e){var f=a.querySelector(e);if(!f){var f=c.createElement("span");f.className=b,b===this.searchActionClass&&(f.innerHTML=''+this.element.getAttribute("placeholder")+"",this.element.setAttribute("placeholder",""),this.element.value.trim()&&a.classList.add("mui-active")),a.insertBefore(f,this.element.nextSibling)}return f},s.prototype.initElementEvent=function(){var b=this.element;if(this.sliderActionClass){var c=this.sliderAction,d=null,e=function(){c.classList.remove(k);var a=b.offsetLeft,e=b.offsetWidth-28,f=c.offsetWidth,g=Math.abs(b.max-b.min),h=e/g*Math.abs(b.value-b.min);c.style.left=14+a+h-f/2+"px",c.innerText=b.value,d&&clearTimeout(d),d=setTimeout(function(){c.classList.add(k)},1e3)};b.addEventListener("input",e),b.addEventListener("tap",e),b.addEventListener(a.EVENT_MOVE,function(a){a.stopPropagation()})}else{if(this.clearActionClass){var f=this.clearAction;if(!f)return;a.each(["keyup","change","input","focus","cut","paste"],function(a,c){!function(a){b.addEventListener(a,function(){f.classList[b.value.trim()?"remove":"add"](k)})}(c)}),b.addEventListener("blur",function(){f.classList.add(k)})}this.searchActionClass&&(b.addEventListener("focus",function(){b.parentNode.classList.add("mui-active")}),b.addEventListener("blur",function(){b.value.trim()||b.parentNode.classList.remove("mui-active")}))}},s.prototype.setPlaceholder=function(a){if(this.searchActionClass){var b=this.element.parentNode.querySelector(p);b&&(b.getElementsByTagName("span")[1].innerText=a)}else this.element.setAttribute("placeholder",a)},s.prototype.passwordActionClick=function(a){"text"===this.element.type?this.element.type="password":this.element.type="text",this.passwordAction.classList.toggle("mui-active"),a.preventDefault()},s.prototype.clearActionClick=function(b){var c=this;c.element.value="",a.focus(c.element),c.clearAction.classList.add(k),b.preventDefault()},s.prototype.speechActionClick=function(d){if(b.plus){var e=this,f=e.element.value;e.element.value="",c.body.classList.add(l),plus.speech.startRecognize({engine:"iFly"},function(b){e.element.value+=b,a.focus(e.element),plus.speech.stopRecognize(),a.trigger(e.element,"recognized",{value:e.element.value}),f!==e.element.value&&(a.trigger(e.element,"change"),a.trigger(e.element,"input"))},function(a){c.body.classList.remove(l)})}else alert("only for 5+");d.preventDefault()},a.fn.input=function(b){var c=[];return this.each(function(){var b=null,d=[],e=r(this.parentNode);if("range"===this.type&&e.classList.contains("mui-input-range"))d.push("slider");else{var f=this.classList;f.contains("mui-input-clear")&&d.push("clear"),a.os.android&&a.os.stream||!f.contains("mui-input-speech")||d.push("speech"),f.contains("mui-input-password")&&d.push("password"),"search"===this.type&&e.classList.contains("mui-search")&&d.push("search")}var g=this.getAttribute("data-input-"+d[0]);if(g)b=a.data[g];else{g=++a.uuid,b=a.data[g]=new s(this,{actions:d.join(",")});for(var h=0,i=d.length;hthis._A?this.element.classList.add(c):this.element.classList.remove(c),this.lastOpacity!==f&&(a.trigger(this.element,"alpha",{alpha:f}),this.lastOpacity=f)},f.prototype.destory=function(){this.scrollByElem.removeEventListener("scroll",this._bufferFn),this.scrollByElem.removeEventListener(a.EVENT_MOVE,this._bufferFn),this.element.style.backgroundColor=this._bgColor,this.element.mui_plugin_transparent=null},a.fn.transparent=function(a){a=a||{};var c=[];return this.each(function(){var d=this.mui_plugin_transparent;if(!d){var e=this.getAttribute("data-top"),g=this.getAttribute("data-offset"),h=this.getAttribute("data-duration"),i=this.getAttribute("data-scrollby");null!==e&&void 0===a.top&&(a.top=e),null!==g&&void 0===a.offset&&(a.offset=g),null!==h&&void 0===a.duration&&(a.duration=h),null!==i&&void 0===a.scrollby&&(a.scrollby=document.querySelector(i)||b),d=this.mui_plugin_transparent=new f(this,a)}c.push(d)}),1===c.length?c[0]:c},a.ready(function(){a(".mui-bar-transparent").transparent()})}(mui,window),function(a){var b="ontouchstart"in document,c=b?"tap":"click",d="change",e=".mui-btn-numbox-plus,.mui-numbox-btn-plus",f=".mui-btn-numbox-minus,.mui-numbox-btn-minus",g=".mui-input-numbox,.mui-numbox-input",h=a.Numbox=a.Class.extend({init:function(b,c){var d=this;if(!b)throw"构造 numbox 时缺少容器元素";d.holder=b,c=c||{},c.step=parseInt(c.step||1),d.options=c,d.input=a.qsa(g,d.holder)[0],d.plus=a.qsa(e,d.holder)[0],d.minus=a.qsa(f,d.holder)[0],d.checkValue(),d.initEvent()},initEvent:function(){var b=this;b.plus.addEventListener(c,function(c){var e=parseInt(b.input.value)+b.options.step;b.input.value=e.toString(),a.trigger(b.input,d,null)}),b.minus.addEventListener(c,function(c){var e=parseInt(b.input.value)-b.options.step;b.input.value=e.toString(),a.trigger(b.input,d,null)}),b.input.addEventListener(d,function(c){b.checkValue();var e=parseInt(b.input.value);a.trigger(b.holder,d,{value:e})})},getValue:function(){var a=this;return parseInt(a.input.value)},checkValue:function(){var a=this,b=a.input.value;if(null==b||""==b||isNaN(b))a.input.value=a.options.min||0,a.minus.disabled=null!=a.options.min;else{var b=parseInt(b);null!=a.options.max&&!isNaN(a.options.max)&&b>=parseInt(a.options.max)?(b=a.options.max,a.plus.disabled=!0):a.plus.disabled=!1,null!=a.options.min&&!isNaN(a.options.min)&&b<=parseInt(a.options.min)?(b=a.options.min,a.minus.disabled=!0):a.minus.disabled=!1,a.input.value=b}},setOption:function(a,b){this.options[a]=b},setValue:function(a){this.input.value=a,this.checkValue()}});a.fn.numbox=function(a){return this.each(function(a,b){if(!b.numbox)if(d)b.numbox=new h(b,d);else{var c=b.getAttribute("data-numbox-options"),d=c?JSON.parse(c):{};d.step=b.getAttribute("data-numbox-step")||d.step,d.min=b.getAttribute("data-numbox-min")||d.min,d.max=b.getAttribute("data-numbox-max")||d.max,b.numbox=new h(b,d)}}),this[0]?this[0].numbox:null},a.ready(function(){a(".mui-numbox").numbox()})}(mui),function(a,b,c){var d="mui-disabled",e="reset",f="loading",g={loadingText:"Loading...",loadingIcon:"mui-spinner mui-spinner-white",loadingIconPosition:"left"},h=function(b,c){this.element=b,this.options=a.extend({},g,c),this.options.loadingText||(this.options.loadingText=g.loadingText),null===this.options.loadingIcon&&(this.options.loadingIcon="mui-spinner","rgb(255, 255, 255)"===a.getStyles(this.element,"color")&&(this.options.loadingIcon+=" mui-spinner-white")),this.isInput="INPUT"===this.element.tagName,this.resetHTML=this.isInput?this.element.value:this.element.innerHTML,this.state=""};h.prototype.loading=function(){this.setState(f)},h.prototype.reset=function(){this.setState(e)},h.prototype.setState=function(a){if(this.state===a)return!1;if(this.state=a,a===e)this.element.disabled=!1,this.element.classList.remove(d),this.setHtml(this.resetHTML);else if(a===f){this.element.disabled=!0,this.element.classList.add(d);var b=this.isInput?this.options.loadingText:""+this.options.loadingText+"";this.options.loadingIcon&&!this.isInput&&("right"===this.options.loadingIconPosition?b+=' ':b=' '+b),this.setHtml(b)}},h.prototype.setHtml=function(a){this.isInput?this.element.value=a:this.element.innerHTML=a},a.fn.button=function(a){var b=[];return this.each(function(){var c=this.mui_plugin_button;if(!c){var d=this.getAttribute("data-loading-text"),g=this.getAttribute("data-loading-icon"),i=this.getAttribute("data-loading-icon-position");this.mui_plugin_button=c=new h(this,{loadingText:d,loadingIcon:g,loadingIconPosition:i})}a!==f&&a!==e||c.setState(a),b.push(c)}),1===b.length?b[0]:b}}(mui,window,document); \ No newline at end of file diff --git a/Yangcai365_design/manage/zinc/mobileWorks/js/mui.picker.js b/Yangcai365_design/manage/zinc/mobileWorks/js/mui.picker.js new file mode 100644 index 0000000..6dc78ae --- /dev/null +++ b/Yangcai365_design/manage/zinc/mobileWorks/js/mui.picker.js @@ -0,0 +1,389 @@ +/** + * 选择列表插件 + * varstion 2.0.0 + * by Houfeng + * Houfeng@DCloud.io + */ + +(function($, window, document, undefined) { + + var MAX_EXCEED = 30; + var VISIBLE_RANGE = 90; + var DEFAULT_ITEM_HEIGHT = 40; + var BLUR_WIDTH = 10; + + var rad2deg = $.rad2deg = function(rad) { + return rad / (Math.PI / 180); + }; + + var deg2rad = $.deg2rad = function(deg) { + return deg * (Math.PI / 180); + }; + + var platform = navigator.platform.toLowerCase(); + var userAgent = navigator.userAgent.toLowerCase(); + var isIos = (userAgent.indexOf('iphone') > -1 || + userAgent.indexOf('ipad') > -1 || + userAgent.indexOf('ipod') > -1) && + (platform.indexOf('iphone') > -1 || + platform.indexOf('ipad') > -1 || + platform.indexOf('ipod') > -1); + //alert(isIos); + + var Picker = $.Picker = function(holder, options) { + var self = this; + self.holder = holder; + self.options = options || {}; + self.init(); + self.initInertiaParams(); + self.calcElementItemPostion(true); + self.bindEvent(); + }; + + Picker.prototype.findElementItems = function() { + var self = this; + self.elementItems = [].slice.call(self.holder.querySelectorAll('li')); + return self.elementItems; + }; + + Picker.prototype.init = function() { + var self = this; + self.list = self.holder.querySelector('ul'); + self.findElementItems(); + self.height = self.holder.offsetHeight; + self.r = self.height / 2 - BLUR_WIDTH; + self.d = self.r * 2; + self.itemHeight = self.elementItems.length > 0 ? self.elementItems[0].offsetHeight : DEFAULT_ITEM_HEIGHT; + self.itemAngle = parseInt(self.calcAngle(self.itemHeight * 0.8)); + self.hightlightRange = self.itemAngle / 2; + self.visibleRange = VISIBLE_RANGE; + self.beginAngle = 0; + self.beginExceed = self.beginAngle - MAX_EXCEED; + self.list.angle = self.beginAngle; + if (isIos) { + self.list.style.webkitTransformOrigin = "center center " + self.r + "px"; + } + }; + + Picker.prototype.calcElementItemPostion = function(andGenerateItms) { + var self = this; + if (andGenerateItms) { + self.items = []; + } + self.elementItems.forEach(function(item) { + var index = self.elementItems.indexOf(item); + self.endAngle = self.itemAngle * index; + item.angle = self.endAngle; + item.style.webkitTransformOrigin = "center center -" + self.r + "px"; + item.style.webkitTransform = "translateZ(" + self.r + "px) rotateX(" + (-self.endAngle) + "deg)"; + if (andGenerateItms) { + var dataItem = {}; + dataItem.text = item.innerHTML || ''; + dataItem.value = item.getAttribute('data-value') || dataItem.text; + self.items.push(dataItem); + } + }); + self.endExceed = self.endAngle + MAX_EXCEED; + self.calcElementItemVisibility(self.beginAngle); + }; + + Picker.prototype.calcAngle = function(c) { + var self = this; + var a = b = parseFloat(self.r); + //直径的整倍数部分直接乘以 180 + c = Math.abs(c); //只算角度不关心正否值 + var intDeg = parseInt(c / self.d) * 180; + c = c % self.d; + //余弦 + var cosC = (a * a + b * b - c * c) / (2 * a * b); + var angleC = intDeg + rad2deg(Math.acos(cosC)); + return angleC; + }; + + Picker.prototype.calcElementItemVisibility = function(angle) { + var self = this; + self.elementItems.forEach(function(item) { + var difference = Math.abs(item.angle - angle); + if (difference < self.hightlightRange) { + item.classList.add('highlight'); + } else if (difference < self.visibleRange) { + item.classList.add('visible'); + item.classList.remove('highlight'); + } else { + item.classList.remove('highlight'); + item.classList.remove('visible'); + } + }); + }; + + Picker.prototype.setAngle = function(angle) { + var self = this; + self.list.angle = angle; + self.list.style.webkitTransform = "perspective(1000px) rotateY(0deg) rotateX(" + angle + "deg)"; + self.calcElementItemVisibility(angle); + }; + + Picker.prototype.bindEvent = function() { + var self = this; + var lastAngle = 0; + var startY = null; + var isPicking = false; + self.holder.addEventListener($.EVENT_START, function(event) { + isPicking = true; + event.preventDefault(); + self.list.style.webkitTransition = ''; + startY = (event.changedTouches ? event.changedTouches[0] : event).pageY; + lastAngle = self.list.angle; + self.updateInertiaParams(event, true); + }, false); + self.holder.addEventListener($.EVENT_END, function(event) { + isPicking = false; + event.preventDefault(); + self.startInertiaScroll(event); + }, false); + self.holder.addEventListener($.EVENT_CANCEL, function(event) { + isPicking = false; + event.preventDefault(); + self.startInertiaScroll(event); + }, false); + self.holder.addEventListener($.EVENT_MOVE, function(event) { + if (!isPicking) { + return; + } + event.preventDefault(); + var endY = (event.changedTouches ? event.changedTouches[0] : event).pageY; + var dragRange = endY - startY; + var dragAngle = self.calcAngle(dragRange); + var newAngle = dragRange > 0 ? lastAngle - dragAngle : lastAngle + dragAngle; + if (newAngle > self.endExceed) { + newAngle = self.endExceed + } + if (newAngle < self.beginExceed) { + newAngle = self.beginExceed + } + self.setAngle(newAngle); + self.updateInertiaParams(event); + }, false); + //-- + self.list.addEventListener('tap', function(event) { + elementItem = event.target; + if (elementItem.tagName == 'LI') { + self.setSelectedIndex(self.elementItems.indexOf(elementItem), 200); + } + }, false); + }; + + Picker.prototype.initInertiaParams = function() { + var self = this; + self.lastMoveTime = 0; + self.lastMoveStart = 0; + self.stopInertiaMove = false; + }; + + Picker.prototype.updateInertiaParams = function(event, isStart) { + var self = this; + var point = event.changedTouches ? event.changedTouches[0] : event; + if (isStart) { + self.lastMoveStart = point.pageY; + self.lastMoveTime = event.timeStamp || Date.now(); + self.startAngle = self.list.angle; + } else { + var nowTime = event.timeStamp || Date.now(); + if (nowTime - self.lastMoveTime > 300) { + self.lastMoveTime = nowTime; + self.lastMoveStart = point.pageY; + } + } + self.stopInertiaMove = true; + }; + + Picker.prototype.startInertiaScroll = function(event) { + var self = this; + var point = event.changedTouches ? event.changedTouches[0] : event; + /** + * 缓动代码 + */ + var nowTime = event.timeStamp || Date.now(); + var v = (point.pageY - self.lastMoveStart) / (nowTime - self.lastMoveTime); //最后一段时间手指划动速度 + var dir = v > 0 ? -1 : 1; //加速度方向 + var deceleration = dir * 0.0006 * -1; + var duration = Math.abs(v / deceleration); // 速度消减至0所需时间 + var dist = v * duration / 2; //最终移动多少 + var startAngle = self.list.angle; + var distAngle = self.calcAngle(dist) * dir; + //---- + var srcDistAngle = distAngle; + if (startAngle + distAngle < self.beginExceed) { + distAngle = self.beginExceed - startAngle; + duration = duration * (distAngle / srcDistAngle) * 0.6; + } + if (startAngle + distAngle > self.endExceed) { + distAngle = self.endExceed - startAngle; + duration = duration * (distAngle / srcDistAngle) * 0.6; + } + //---- + if (distAngle == 0) { + self.endScroll(); + return; + } + self.scrollDistAngle(nowTime, startAngle, distAngle, duration); + }; + + Picker.prototype.scrollDistAngle = function(nowTime, startAngle, distAngle, duration) { + var self = this; + self.stopInertiaMove = false; + (function(nowTime, startAngle, distAngle, duration) { + var frameInterval = 13; + var stepCount = duration / frameInterval; + var stepIndex = 0; + (function inertiaMove() { + if (self.stopInertiaMove) return; + var newAngle = self.quartEaseOut(stepIndex, startAngle, distAngle, stepCount); + self.setAngle(newAngle); + stepIndex++; + if (stepIndex > stepCount - 1 || newAngle < self.beginExceed || newAngle > self.endExceed) { + self.endScroll(); + return; + } + setTimeout(inertiaMove, frameInterval); + })(); + })(nowTime, startAngle, distAngle, duration); + }; + + Picker.prototype.quartEaseOut = function(t, b, c, d) { + return -c * ((t = t / d - 1) * t * t * t - 1) + b; + }; + + Picker.prototype.endScroll = function() { + var self = this; + if (self.list.angle < self.beginAngle) { + self.list.style.webkitTransition = "150ms ease-out"; + self.setAngle(self.beginAngle); + } else if (self.list.angle > self.endAngle) { + self.list.style.webkitTransition = "150ms ease-out"; + self.setAngle(self.endAngle); + } else { + var index = parseInt((self.list.angle / self.itemAngle).toFixed(0)); + self.list.style.webkitTransition = "100ms ease-out"; + self.setAngle(self.itemAngle * index); + } + self.triggerChange(); + }; + + Picker.prototype.triggerChange = function(force) { + var self = this; + setTimeout(function() { + var index = self.getSelectedIndex(); + var item = self.items[index]; + if ($.trigger && (index != self.lastIndex || force === true)) { + $.trigger(self.holder, 'change', { + "index": index, + "item": item + }); + //console.log('change:' + index); + } + self.lastIndex = index; + typeof force === 'function' && force(); + }, 0); + }; + + Picker.prototype.correctAngle = function(angle) { + var self = this; + if (angle < self.beginAngle) { + return self.beginAngle; + } else if (angle > self.endAngle) { + return self.endAngle; + } else { + return angle; + } + }; + + Picker.prototype.setItems = function(items) { + var self = this; + self.items = items || []; + var buffer = []; + self.items.forEach(function(item) { + if (item !== null && item !== undefined) { + buffer.push('
          • ' + (item.text || item) + '
          • '); + } + }); + self.list.innerHTML = buffer.join(''); + self.findElementItems(); + self.calcElementItemPostion(); + self.setAngle(self.correctAngle(self.list.angle)); + self.triggerChange(true); + }; + + Picker.prototype.getItems = function() { + var self = this; + return self.items; + }; + + Picker.prototype.getSelectedIndex = function() { + var self = this; + return parseInt((self.list.angle / self.itemAngle).toFixed(0)); + }; + + Picker.prototype.setSelectedIndex = function(index, duration, callback) { + var self = this; + self.list.style.webkitTransition = ''; + var angle = self.correctAngle(self.itemAngle * index); + if (duration && duration > 0) { + var distAngle = angle - self.list.angle; + self.scrollDistAngle(Date.now(), self.list.angle, distAngle, duration); + } else { + self.setAngle(angle); + } + self.triggerChange(callback); + }; + + Picker.prototype.getSelectedItem = function() { + var self = this; + return self.items[self.getSelectedIndex()]; + }; + + Picker.prototype.getSelectedValue = function() { + var self = this; + return (self.items[self.getSelectedIndex()] || {}).value; + }; + + Picker.prototype.getSelectedText = function() { + var self = this; + return (self.items[self.getSelectedIndex()] || {}).text; + }; + + Picker.prototype.setSelectedValue = function(value, duration, callback) { + var self = this; + for (var index in self.items) { + var item = self.items[index]; + if (item.value == value) { + self.setSelectedIndex(index, duration, callback); + return; + } + } + }; + + if ($.fn) { + $.fn.picker = function(options) { + //遍历选择的元素 + this.each(function(i, element) { + if (element.picker) return; + if (options) { + element.picker = new Picker(element, options); + } else { + var optionsText = element.getAttribute('data-picker-options'); + var _options = optionsText ? JSON.parse(optionsText) : {}; + element.picker = new Picker(element, _options); + } + }); + return this[0] ? this[0].picker : null; + }; + + //自动初始化 + $.ready(function() { + $('.mui-picker').picker(); + }); + } + +})(window.mui || window, window, document, undefined); +//end \ No newline at end of file diff --git a/Yangcai365_design/manage/zinc/mobileWorks/js/mui.poppicker.js b/Yangcai365_design/manage/zinc/mobileWorks/js/mui.poppicker.js new file mode 100644 index 0000000..4c4ce1e --- /dev/null +++ b/Yangcai365_design/manage/zinc/mobileWorks/js/mui.poppicker.js @@ -0,0 +1,160 @@ +/** + * 弹出选择列表插件 + * 此组件依赖 listpcker ,请在页面中先引入 mui.picker.css + mui.picker.js + * varstion 1.0.1 + * by Houfeng + * Houfeng@DCloud.io + */ + +(function($, document) { + + //创建 DOM + $.dom = function(str) { + if (typeof(str) !== 'string') { + if ((str instanceof Array) || (str[0] && str.length)) { + return [].slice.call(str); + } else { + return [str]; + } + } + if (!$.__create_dom_div__) { + $.__create_dom_div__ = document.createElement('div'); + } + $.__create_dom_div__.innerHTML = str; + return [].slice.call($.__create_dom_div__.childNodes); + }; + + var panelBuffer = '
            \ +
            \ + \ + \ +
            \ +
            \ +
            \ +
            \ +
            '; + + var pickerBuffer = '
            \ +
            \ +
            \ +
              \ +
            \ +
            \ +
            \ +
            '; + + //定义弹出选择器类 + var PopPicker = $.PopPicker = $.Class.extend({ + //构造函数 + init: function(options) { + var self = this; + self.options = options || {}; + self.options.buttons = self.options.buttons || ['取消', '确定']; + self.panel = $.dom(panelBuffer)[0]; + document.body.appendChild(self.panel); + self.ok = self.panel.querySelector('.mui-poppicker-btn-ok'); + self.cancel = self.panel.querySelector('.mui-poppicker-btn-cancel'); + self.body = self.panel.querySelector('.mui-poppicker-body'); + self.mask = $.createMask(); + self.cancel.innerText = self.options.buttons[0]; + self.ok.innerText = self.options.buttons[1]; + self.cancel.addEventListener('tap', function(event) { + self.hide(); + }, false); + self.ok.addEventListener('tap', function(event) { + if (self.callback) { + var rs = self.callback(self.getSelectedItems()); + if (rs !== false) { + self.hide(); + } + } + }, false); + self.mask[0].addEventListener('tap', function() { + self.hide(); + }, false); + self._createPicker(); + //防止滚动穿透 + self.panel.addEventListener($.EVENT_START, function(event) { + event.preventDefault(); + }, false); + self.panel.addEventListener($.EVENT_MOVE, function(event) { + event.preventDefault(); + }, false); + }, + _createPicker: function() { + var self = this; + var layer = self.options.layer || 1; + var width = (100 / layer) + '%'; + self.pickers = []; + for (var i = 1; i <= layer; i++) { + var pickerElement = $.dom(pickerBuffer)[0]; + pickerElement.style.width = width; + self.body.appendChild(pickerElement); + var picker = $(pickerElement).picker(); + self.pickers.push(picker); + pickerElement.addEventListener('change', function(event) { + var nextPickerElement = this.nextSibling; + if (nextPickerElement && nextPickerElement.picker) { + var eventData = event.detail || {}; + var preItem = eventData.item || {}; + nextPickerElement.picker.setItems(preItem.children); + } + }, false); + } + }, + //填充数据 + setData: function(data) { + var self = this; + data = data || []; + self.pickers[0].setItems(data); + }, + //获取选中的项(数组) + getSelectedItems: function() { + var self = this; + var items = []; + for (var i in self.pickers) { + if(self.pickers.hasOwnProperty(i)) { // 修复for in会访问继承属性造成items报错情况 + var picker = self.pickers[i]; + items.push(picker.getSelectedItem() || {}); + } + } + return items; + }, + //显示 + show: function(callback) { + var self = this; + self.callback = callback; + self.mask.show(); + document.body.classList.add($.className('poppicker-active-for-page')); + self.panel.classList.add($.className('active')); + //处理物理返回键 + self.__back = $.back; + $.back = function() { + self.hide(); + }; + }, + //隐藏 + hide: function() { + var self = this; + if (self.disposed) return; + self.panel.classList.remove($.className('active')); + self.mask.close(); + document.body.classList.remove($.className('poppicker-active-for-page')); + //处理物理返回键 + $.back=self.__back; + }, + dispose: function() { + var self = this; + self.hide(); + setTimeout(function() { + self.panel.parentNode.removeChild(self.panel); + for (var name in self) { + self[name] = null; + delete self[name]; + }; + self.disposed = true; + }, 300); + } + }); + +})(mui, document); \ No newline at end of file diff --git a/Yangcai365_design/manage/zinc/mobileWorks/js/mui.pullToRefresh.js b/Yangcai365_design/manage/zinc/mobileWorks/js/mui.pullToRefresh.js new file mode 100644 index 0000000..8e76e35 --- /dev/null +++ b/Yangcai365_design/manage/zinc/mobileWorks/js/mui.pullToRefresh.js @@ -0,0 +1,407 @@ +(function($, window, document) { + var STATE_BEFORECHANGEOFFSET = 'beforeChangeOffset'; + var STATE_AFTERCHANGEOFFSET = 'afterChangeOffset'; + + var EVENT_PULLSTART = 'pullstart'; + var EVENT_PULLING = 'pulling'; + var EVENT_BEFORECHANGEOFFSET = STATE_BEFORECHANGEOFFSET; + var EVENT_AFTERCHANGEOFFSET = STATE_AFTERCHANGEOFFSET; + var EVENT_DRAGENDAFTERCHANGEOFFSET = 'dragEndAfterChangeOffset'; + + var CLASS_TRANSITIONING = $.className('transitioning'); + var CLASS_PULL_TOP_TIPS = $.className('pull-top-tips'); + var CLASS_PULL_BOTTOM_TIPS = $.className('pull-bottom-tips'); + var CLASS_PULL_LOADING = $.className('pull-loading'); + var CLASS_SCROLL = $.className('scroll'); + + var CLASS_PULL_TOP_ARROW = $.className('pull-loading') + ' ' + $.className('icon') + ' ' + $.className('icon-pulldown'); + var CLASS_PULL_TOP_ARROW_REVERSE = CLASS_PULL_TOP_ARROW + ' ' + $.className('reverse'); + var CLASS_PULL_TOP_SPINNER = $.className('pull-loading') + ' ' + $.className('spinner'); + var CLASS_HIDDEN = $.className('hidden'); + + var SELECTOR_PULL_LOADING = '.' + CLASS_PULL_LOADING; + $.PullToRefresh = $.Class.extend({ + init: function(element, options) { + this.element = element; + this.options = $.extend(true, { + down: { + height: 75, + callback: false, + }, + up: { + auto: false, + offset: 100, //距离底部高度(到达该高度即触发) + show: true, + contentinit: '上拉显示更多', + contentdown: '上拉显示更多', + contentrefresh: '正在加载...', + contentnomore: '没有更多数据了', + callback: false + }, + preventDefaultException: { + tagName: /^(INPUT|TEXTAREA|BUTTON|SELECT)$/ + } + }, options); + this.stopped = this.isNeedRefresh = this.isDragging = false; + this.state = STATE_BEFORECHANGEOFFSET; + this.isInScroll = this.element.classList.contains(CLASS_SCROLL); + this.initPullUpTips(); + + this.initEvent(); + }, + _preventDefaultException: function(el, exceptions) { + for (var i in exceptions) { + if (exceptions[i].test(el[i])) { + return true; + } + } + return false; + }, + initEvent: function() { + if ($.isFunction(this.options.down.callback)) { + this.element.addEventListener($.EVENT_START, this); + this.element.addEventListener('drag', this); + this.element.addEventListener('dragend', this); + } + if (this.pullUpTips) { + this.element.addEventListener('dragup', this); + if (this.isInScroll) { + this.element.addEventListener('scrollbottom', this); + } else { + window.addEventListener('scroll', this); + } + } + }, + handleEvent: function(e) { + switch (e.type) { + case $.EVENT_START: + this.isInScroll && this._canPullDown() && e.target && !this._preventDefaultException(e.target, this.options.preventDefaultException) && e.preventDefault(); + break; + case 'drag': + this._drag(e); + break; + case 'dragend': + this._dragend(e); + break; + case 'webkitTransitionEnd': + this._transitionEnd(e); + break; + case 'dragup': + case 'scroll': + this._dragup(e); + break; + case 'scrollbottom': + if (e.target === this.element) { + this.pullUpLoading(e); + } + break; + } + }, + initPullDownTips: function() { + var self = this; + if ($.isFunction(self.options.down.callback)) { + self.pullDownTips = (function() { + var element = document.querySelector('.' + CLASS_PULL_TOP_TIPS); + if (element) { + element.parentNode.removeChild(element); + } + if (!element) { + element = document.createElement('div'); + element.classList.add(CLASS_PULL_TOP_TIPS); + element.innerHTML = '
            '; + element.addEventListener('webkitTransitionEnd', self); + } + self.pullDownTipsIcon = element.querySelector(SELECTOR_PULL_LOADING); + document.body.appendChild(element); + return element; + }()); + } + }, + initPullUpTips: function() { + var self = this; + if ($.isFunction(self.options.up.callback)) { + self.pullUpTips = (function() { + var element = self.element.querySelector('.' + CLASS_PULL_BOTTOM_TIPS); + if (!element) { + element = document.createElement('div'); + element.classList.add(CLASS_PULL_BOTTOM_TIPS); + if (!self.options.up.show) { + element.classList.add(CLASS_HIDDEN); + } + element.innerHTML = '
            ' + self.options.up.contentinit + '
            '; + self.element.appendChild(element); + } + self.pullUpTipsIcon = element.querySelector(SELECTOR_PULL_LOADING); + return element; + }()); + } + }, + _transitionEnd: function(e) { + if (e.target === this.pullDownTips && this.removing) { + this.removePullDownTips(); + } + }, + _dragup: function(e) { + var self = this; + if (self.loading) { + return; + } + if (e && e.detail && $.gestures.session.drag) { + self.isDraggingUp = true; + } else { + if (!self.isDraggingUp) { //scroll event + return; + } + } + if (!self.isDragging) { + if (self._canPullUp()) { + self.pullUpLoading(e); + } + } + }, + _canPullUp: function() { + if (this.removing) { + return false; + } + if (this.isInScroll) { + var scrollId = this.element.parentNode.getAttribute('data-scroll'); + if (scrollId) { + var scrollApi = $.data[scrollId]; + return scrollApi.y === scrollApi.maxScrollY; + } + } + return window.pageYOffset + window.innerHeight + this.options.up.offset >= document.documentElement.scrollHeight; + }, + _canPullDown: function() { + if (this.removing) { + return false; + } + if (this.isInScroll) { + var scrollId = this.element.parentNode.getAttribute('data-scroll'); + if (scrollId) { + var scrollApi = $.data[scrollId]; + return scrollApi.y === 0; + } + } + return document.body.scrollTop === 0; + }, + _drag: function(e) { + if (this.loading || this.stopped) { + e.stopPropagation(); + e.detail.gesture.preventDefault(); + return; + } + var detail = e.detail; + if (!this.isDragging) { + if (detail.direction === 'down' && this._canPullDown()) { + if (document.querySelector('.' + CLASS_PULL_TOP_TIPS)) { + e.stopPropagation(); + e.detail.gesture.preventDefault(); + return; + } + this.isDragging = true; + this.removing = false; + this.startDeltaY = detail.deltaY; + $.gestures.session.lockDirection = true; //锁定方向 + $.gestures.session.startDirection = detail.direction; + this._pullStart(this.startDeltaY); + } + } + if (this.isDragging) { + e.stopPropagation(); + e.detail.gesture.preventDefault(); + var deltaY = detail.deltaY - this.startDeltaY; + deltaY = Math.min(deltaY, 1.5 * this.options.down.height); + this.deltaY = deltaY; + this._pulling(deltaY); + var state = deltaY > this.options.down.height ? STATE_AFTERCHANGEOFFSET : STATE_BEFORECHANGEOFFSET; + if (this.state !== state) { + this.state = state; + if (this.state === STATE_AFTERCHANGEOFFSET) { + this.removing = false; + this.isNeedRefresh = true; + } else { + this.removing = true; + this.isNeedRefresh = false; + } + this['_' + state](deltaY); + } + if ($.os.ios && parseFloat($.os.version) >= 8) { + var clientY = detail.gesture.touches[0].clientY; + if ((clientY + 10) > window.innerHeight || clientY < 10) { + this._dragend(e); + return; + } + } + } + }, + _dragend: function(e) { + var self = this; + if (self.isDragging) { + self.isDragging = false; + self._dragEndAfterChangeOffset(self.isNeedRefresh); + } + if (self.isPullingUp) { + if (self.pullingUpTimeout) { + clearTimeout(self.pullingUpTimeout); + } + self.pullingUpTimeout = setTimeout(function() { + self.isPullingUp = false; + }, 1000); + } + }, + _pullStart: function(startDeltaY) { + this.pullStart(startDeltaY); + $.trigger(this.element, EVENT_PULLSTART, { + api: this, + startDeltaY: startDeltaY + }); + }, + _pulling: function(deltaY) { + this.pulling(deltaY); + $.trigger(this.element, EVENT_PULLING, { + api: this, + deltaY: deltaY + }); + }, + _beforeChangeOffset: function(deltaY) { + this.beforeChangeOffset(deltaY); + $.trigger(this.element, EVENT_BEFORECHANGEOFFSET, { + api: this, + deltaY: deltaY + }); + }, + _afterChangeOffset: function(deltaY) { + this.afterChangeOffset(deltaY); + $.trigger(this.element, EVENT_AFTERCHANGEOFFSET, { + api: this, + deltaY: deltaY + }); + }, + _dragEndAfterChangeOffset: function(isNeedRefresh) { + this.dragEndAfterChangeOffset(isNeedRefresh); + $.trigger(this.element, EVENT_DRAGENDAFTERCHANGEOFFSET, { + api: this, + isNeedRefresh: isNeedRefresh + }); + }, + removePullDownTips: function() { + if (this.pullDownTips) { + try { + this.pullDownTips.parentNode && this.pullDownTips.parentNode.removeChild(this.pullDownTips); + this.pullDownTips = null; + this.removing = false; + } catch (e) {} + } + }, + pullStart: function(startDeltaY) { + this.initPullDownTips(startDeltaY); + }, + pulling: function(deltaY) { + this.pullDownTips.style.webkitTransform = 'translate3d(0,' + deltaY + 'px,0)'; + }, + beforeChangeOffset: function(deltaY) { + this.pullDownTipsIcon.className = CLASS_PULL_TOP_ARROW; + }, + afterChangeOffset: function(deltaY) { + this.pullDownTipsIcon.className = CLASS_PULL_TOP_ARROW_REVERSE; + }, + dragEndAfterChangeOffset: function(isNeedRefresh) { + if (isNeedRefresh) { + this.pullDownTipsIcon.className = CLASS_PULL_TOP_SPINNER; + this.pullDownLoading(); + } else { + this.pullDownTipsIcon.className = CLASS_PULL_TOP_ARROW; + this.endPullDownToRefresh(); + } + }, + pullDownLoading: function() { + if (this.loading) { + return; + } + if (!this.pullDownTips) { + this.initPullDownTips(); + this.dragEndAfterChangeOffset(true); + return; + } + this.loading = true; + this.pullDownTips.classList.add(CLASS_TRANSITIONING); + this.pullDownTips.style.webkitTransform = 'translate3d(0,' + this.options.down.height + 'px,0)'; + this.options.down.callback.apply(this); + }, + pullUpLoading: function(e) { + if (this.loading || this.finished) { + return; + } + this.loading = true; + this.isDraggingUp = false; + this.pullUpTips.classList.remove(CLASS_HIDDEN); + e && e.detail && e.detail.gesture && e.detail.gesture.preventDefault(); + this.pullUpTipsIcon.innerHTML = this.options.up.contentrefresh; + this.options.up.callback.apply(this); + }, + endPullDownToRefresh: function() { + this.loading = false; + this.pullUpTips && this.pullUpTips.classList.remove(CLASS_HIDDEN); + this.pullDownTips.classList.add(CLASS_TRANSITIONING); + this.pullDownTips.style.webkitTransform = 'translate3d(0,0,0)'; + if (this.deltaY <= 0) { + this.removePullDownTips(); + } else { + this.removing = true; + } + if (this.isInScroll) { + $(this.element.parentNode).scroll().refresh(); + } + }, + endPullUpToRefresh: function(finished) { + if (finished) { + this.finished = true; + this.pullUpTipsIcon.innerHTML = this.options.up.contentnomore; + this.element.removeEventListener('dragup', this); + window.removeEventListener('scroll', this); + } else { + this.pullUpTipsIcon.innerHTML = this.options.up.contentdown; + } + this.loading = false; + if (this.isInScroll) { + $(this.element.parentNode).scroll().refresh(); + } + }, + setStopped: function(stopped) { + if (stopped != this.stopped) { + this.stopped = stopped; + this.pullUpTips && this.pullUpTips.classList[stopped ? 'add' : 'remove'](CLASS_HIDDEN); + } + }, + refresh: function(isReset) { + if (isReset && this.finished && this.pullUpTipsIcon) { + this.pullUpTipsIcon.innerHTML = this.options.up.contentdown; + this.element.addEventListener('dragup', this); + window.addEventListener('scroll', this); + this.finished = false; + } + } + }); + $.fn.pullToRefresh = function(options) { + var pullRefreshApis = []; + options = options || {}; + this.each(function() { + var self = this; + var pullRefreshApi = null; + var id = self.getAttribute('data-pullToRefresh'); + if (!id) { + id = ++$.uuid; + $.data[id] = pullRefreshApi = new $.PullToRefresh(self, options); + self.setAttribute('data-pullToRefresh', id); + } else { + pullRefreshApi = $.data[id]; + } + if (options.up && options.up.auto) { //如果设置了auto,则自动上拉一次 + pullRefreshApi.pullUpLoading(); + } + pullRefreshApis.push(pullRefreshApi); + }); + return pullRefreshApis.length === 1 ? pullRefreshApis[0] : pullRefreshApis; + } +})(mui, window, document); \ No newline at end of file diff --git a/Yangcai365_design/manage/zinc/mobileWorks/js/mui.pullToRefresh.material.js b/Yangcai365_design/manage/zinc/mobileWorks/js/mui.pullToRefresh.material.js new file mode 100644 index 0000000..af16c9e --- /dev/null +++ b/Yangcai365_design/manage/zinc/mobileWorks/js/mui.pullToRefresh.material.js @@ -0,0 +1,352 @@ +(function($) { + var CLASS_PULL_TOP_TIPS = $.className('pull-top-tips'); + + $.PullToRefresh = $.PullToRefresh.extend({ + init: function(element, options) { + this._super(element, options); + this.options = $.extend(true, { + down: { + tips: { + colors: ['008000', 'd8ad44', 'd00324', 'dc00b8', '017efc'], + size: 200, //width=height=size;x=y=size/2;radius=size/4 + lineWidth: 15, + duration: 1000, + tail_duration: 1000 * 2.5 + } + } + }, this.options); + this.options.down.tips.color = this.options.down.tips.colors[0]; + this.options.down.tips.colors = this.options.down.tips.colors.map(function(color) { + return { + r: parseInt(color.substring(0, 2), 16), + g: parseInt(color.substring(2, 4), 16), + b: parseInt(color.substring(4, 6), 16) + }; + }); + }, + initPullDownTips: function() { + var self = this; + if ($.isFunction(self.options.down.callback)) { + self.pullDownTips = (function() { + var element = document.querySelector('.' + CLASS_PULL_TOP_TIPS); + if (element) { + element.parentNode.removeChild(element); + } + if (!element) { + element = document.createElement('div'); + element.classList.add(CLASS_PULL_TOP_TIPS); + element.innerHTML = '
            '; + element.addEventListener('webkitTransitionEnd', self); + document.body.appendChild(element); + } + self.pullDownCanvas = document.getElementById("pullDownTips"); + self.pullDownCanvasCtx = self.pullDownCanvas.getContext('2d'); + self.canvasUtils.init(self.pullDownCanvas, self.options.down.tips); + return element; + }()); + } + }, + removePullDownTips: function() { + this._super(); + this.canvasUtils.stopSpin(); + }, + pulling: function(deltaY) { + var ratio = Math.min(deltaY / (this.options.down.height * 1.5), 1); + var ratioPI = Math.min(1, ratio * 2); + this.pullDownTips.style.webkitTransform = 'translate3d(0,' + (deltaY < 0 ? 0 : deltaY) + 'px,0)'; + this.pullDownCanvas.style.opacity = ratioPI; + this.pullDownCanvas.style.webkitTransform = 'rotate(' + 300 * ratio + 'deg)'; + var canvas = this.pullDownCanvas; + var ctx = this.pullDownCanvasCtx; + var size = this.options.down.tips.size; + ctx.lineWidth = this.options.down.tips.lineWidth; + ctx.fillStyle = '#' + this.options.down.tips.color; + ctx.strokeStyle = '#' + this.options.down.tips.color; + ctx.stroke(); + ctx.clearRect(0, 0, size, size); + //fixed android 4.1.x + canvas.style.display = 'none'; // Detach from DOM + canvas.offsetHeight; // Force the detach + canvas.style.display = 'inherit'; // Reattach to DOM + this.canvasUtils.drawArcedArrow(ctx, size / 2 + 0.5, size / 2, size / 4, 0 * Math.PI, 5 / 3 * Math.PI * ratioPI, false, 1, 2, 0.7853981633974483, 25, this.options.down.tips.lineWidth, this.options.down.tips.lineWidth); + }, + + beforeChangeOffset: function(deltaY) {}, + afterChangeOffset: function(deltaY) {}, + dragEndAfterChangeOffset: function(isNeedRefresh) { + if (isNeedRefresh) { + this.canvasUtils.startSpin(); + this.pullDownLoading(); + } else { + this.canvasUtils.stopSpin(); + this.endPullDownToRefresh(); + } + }, + canvasUtils: (function() { + var canvasObj = null, + ctx = null, + size = 200, + lineWidth = 15, + tick = 0, + startTime = 0, + frameTime = 0, + timeLast = 0, + oldStep = 0, + acc = 0, + head = 0, + tail = 180, + rad = Math.PI / 180, + duration = 1000, + tail_duration = 1000 * 2.5, + colors = ['35ad0e', 'd8ad44', 'd00324', 'dc00b8', '017efc'], + rAF = null; + + function easeLinear(currentIteration, startValue, changeInValue, totalIterations) { + return changeInValue * currentIteration / totalIterations + startValue; + } + + function easeInOutQuad(currentIteration, startValue, changeInValue, totalIterations) { + if ((currentIteration /= totalIterations / 2) < 1) { + return changeInValue / 2 * currentIteration * currentIteration + startValue; + } + return -changeInValue / 2 * ((--currentIteration) * (currentIteration - 2) - 1) + startValue; + } + + function minmax(value, v0, v1) { + var min = Math.min(v0, v1); + var max = Math.max(v0, v1); + if (value < min) + return min; + if (value > max) + return min; + return value; + } + var drawHead = function(ctx, x0, y0, x1, y1, x2, y2, style) { + 'use strict'; + if (typeof(x0) == 'string') x0 = parseInt(x0); + if (typeof(y0) == 'string') y0 = parseInt(y0); + if (typeof(x1) == 'string') x1 = parseInt(x1); + if (typeof(y1) == 'string') y1 = parseInt(y1); + if (typeof(x2) == 'string') x2 = parseInt(x2); + if (typeof(y2) == 'string') y2 = parseInt(y2); + var radius = 3; + var twoPI = 2 * Math.PI; + ctx.save(); + ctx.beginPath(); + ctx.moveTo(x0, y0); + ctx.lineTo(x1, y1); + ctx.lineTo(x2, y2); + switch (style) { + case 0: + var backdist = Math.sqrt(((x2 - x0) * (x2 - x0)) + ((y2 - y0) * (y2 - y0))); + ctx.arcTo(x1, y1, x0, y0, .55 * backdist); + ctx.fill(); + break; + case 1: + ctx.beginPath(); + ctx.moveTo(x0, y0); + ctx.lineTo(x1, y1); + ctx.lineTo(x2, y2); + ctx.lineTo(x0, y0); + ctx.fill(); + break; + case 2: + ctx.stroke(); + break; + case 3: + var cpx = (x0 + x1 + x2) / 3; + var cpy = (y0 + y1 + y2) / 3; + ctx.quadraticCurveTo(cpx, cpy, x0, y0); + ctx.fill(); + break; + case 4: + var cp1x, cp1y, cp2x, cp2y, backdist; + var shiftamt = 5; + if (x2 == x0) { + backdist = y2 - y0; + cp1x = (x1 + x0) / 2; + cp2x = (x1 + x0) / 2; + cp1y = y1 + backdist / shiftamt; + cp2y = y1 - backdist / shiftamt; + } else { + backdist = Math.sqrt(((x2 - x0) * (x2 - x0)) + ((y2 - y0) * (y2 - y0))); + var xback = (x0 + x2) / 2; + var yback = (y0 + y2) / 2; + var xmid = (xback + x1) / 2; + var ymid = (yback + y1) / 2; + var m = (y2 - y0) / (x2 - x0); + var dx = (backdist / (2 * Math.sqrt(m * m + 1))) / shiftamt; + var dy = m * dx; + cp1x = xmid - dx; + cp1y = ymid - dy; + cp2x = xmid + dx; + cp2y = ymid + dy; + } + ctx.bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x0, y0); + ctx.fill(); + break; + } + ctx.restore(); + }; + var drawArcedArrow = function(ctx, x, y, r, startangle, endangle, anticlockwise, style, which, angle, d, lineWidth, lineRatio) { + 'use strict'; + style = typeof(style) != 'undefined' ? style : 3; + which = typeof(which) != 'undefined' ? which : 1; + angle = typeof(angle) != 'undefined' ? angle : Math.PI / 8; + lineWidth = lineWidth || 1; + lineRatio = lineRatio || 10; + d = typeof(d) != 'undefined' ? d : 10; + ctx.save(); + ctx.lineWidth = lineWidth; + ctx.beginPath(); + ctx.arc(x, y, r, startangle, endangle, anticlockwise); + ctx.stroke(); + var sx, sy, lineangle, destx, desty; + if (which & 1) { + sx = Math.cos(startangle) * r + x; + sy = Math.sin(startangle) * r + y; + lineangle = Math.atan2(x - sx, sy - y); + if (anticlockwise) { + destx = sx + 10 * Math.cos(lineangle); + desty = sy + 10 * Math.sin(lineangle); + } else { + destx = sx - 10 * Math.cos(lineangle); + desty = sy - 10 * Math.sin(lineangle); + } + drawArrow(ctx, sx, sy, destx, desty, style, 2, angle, d); + } + if (which & 2) { + sx = Math.cos(endangle) * r + x; + sy = Math.sin(endangle) * r + y; + lineangle = Math.atan2(x - sx, sy - y); + if (anticlockwise) { + destx = sx - 10 * Math.cos(lineangle); + desty = sy - 10 * Math.sin(lineangle); + } else { + destx = sx + 10 * Math.cos(lineangle); + desty = sy + 10 * Math.sin(lineangle); + } + drawArrow(ctx, sx - lineRatio * Math.sin(endangle), sy + lineRatio * Math.cos(endangle), destx - lineRatio * Math.sin(endangle), desty + lineRatio * Math.cos(endangle), style, 2, angle, d) + } + ctx.restore(); + } + var drawArrow = function(ctx, x1, y1, x2, y2, style, which, angle, d) { + 'use strict'; + if (typeof(x1) == 'string') x1 = parseInt(x1); + if (typeof(y1) == 'string') y1 = parseInt(y1); + if (typeof(x2) == 'string') x2 = parseInt(x2); + if (typeof(y2) == 'string') y2 = parseInt(y2); + style = typeof(style) != 'undefined' ? style : 3; + which = typeof(which) != 'undefined' ? which : 1; + angle = typeof(angle) != 'undefined' ? angle : Math.PI / 8; + d = typeof(d) != 'undefined' ? d : 10; + var toDrawHead = typeof(style) != 'function' ? drawHead : style; + var dist = Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)); + var ratio = (dist - d / 3) / dist; + var tox, toy, fromx, fromy; + if (which & 1) { + tox = Math.round(x1 + (x2 - x1) * ratio); + toy = Math.round(y1 + (y2 - y1) * ratio); + } else { + tox = x2; + toy = y2; + } + if (which & 2) { + fromx = x1 + (x2 - x1) * (1 - ratio); + fromy = y1 + (y2 - y1) * (1 - ratio); + } else { + fromx = x1; + fromy = y1; + } + ctx.beginPath(); + ctx.moveTo(fromx, fromy); + ctx.lineTo(tox, toy); + ctx.stroke(); + var lineangle = Math.atan2(y2 - y1, x2 - x1); + var h = Math.abs(d / Math.cos(angle)); + if (which & 1) { + var angle1 = lineangle + Math.PI + angle; + var topx = x2 + Math.cos(angle1) * h; + var topy = y2 + Math.sin(angle1) * h; + var angle2 = lineangle + Math.PI - angle; + var botx = x2 + Math.cos(angle2) * h; + var boty = y2 + Math.sin(angle2) * h; + toDrawHead(ctx, topx, topy, x2, y2, botx, boty, style); + } + if (which & 2) { + var angle1 = lineangle + angle; + var topx = x1 + Math.cos(angle1) * h; + var topy = y1 + Math.sin(angle1) * h; + var angle2 = lineangle - angle; + var botx = x1 + Math.cos(angle2) * h; + var boty = y1 + Math.sin(angle2) * h; + toDrawHead(ctx, topx, topy, x1, y1, botx, boty, style); + } + }; + + var spinColors = function(currentIteration, totalIterations) { + var step = currentIteration % totalIterations; + if (step < oldStep) + colors.push(colors.shift()); + var c0 = colors[0], + c1 = colors[1], + r = minmax(easeLinear(step, c0.r, c1.r - c0.r, totalIterations), c0.r, c1.r), + g = minmax(easeLinear(step, c0.g, c1.g - c0.g, totalIterations), c0.g, c1.g), + b = minmax(easeLinear(step, c0.b, c1.b - c0.b, totalIterations), c0.b, c1.b); + + oldStep = step; + return "rgb(" + parseInt(r) + "," + parseInt(g) + "," + parseInt(b) + ")"; + } + + var spin = function(t) { + var timeCurrent = t || (new Date).getTime(); + if (!startTime) { + startTime = timeCurrent; + } + tick = timeCurrent - startTime; + acc = easeInOutQuad((tick + tail_duration / 2) % tail_duration, 0, duration, tail_duration); + head = easeLinear((tick + acc) % duration, 0, 360, duration); + tail = 20 + Math.abs(easeLinear((tick + tail_duration / 2) % tail_duration, -300, 600, tail_duration)); + + ctx.lineWidth = lineWidth; + ctx.lineCap = "round"; + + ctx.strokeStyle = spinColors(tick, duration); + ctx.clearRect(0, 0, size, size); + //fixed android 4.1.x + canvasObj.style.display = 'none'; // Detach from DOM + canvasObj.offsetHeight; // Force the detach + canvasObj.style.display = 'inherit'; // Reattach to DOM + ctx.beginPath(); + ctx.arc(size / 2, size / 2, size / 4, parseInt(head - tail) % 360 * rad, parseInt(head) % 360 * rad, false); + ctx.stroke(); + + rAF = requestAnimationFrame(spin); + }; + var startSpin = function() { + startTime = 0; + oldStep = 0; + rAF = requestAnimationFrame(spin); + }; + var stopSpin = function() { + rAF && cancelAnimationFrame(rAF); + } + var init = function(canvas, options) { + canvasObj = canvas; + ctx = canvasObj.getContext('2d'); + var options = $.extend(true, {}, options); + colors = options.colors; + duration = options.duration; + tail_duration = options.tail_duration; + size = options.size; + lineWidth = options.lineWidth; + }; + return { + init: init, + drawArcedArrow: drawArcedArrow, + startSpin: startSpin, + stopSpin: stopSpin + }; + })() + }); +})(mui); \ No newline at end of file diff --git a/Yangcai365_design/manage/zinc/mobileWorks/js/mui.view.js b/Yangcai365_design/manage/zinc/mobileWorks/js/mui.view.js new file mode 100644 index 0000000..65ae4e0 --- /dev/null +++ b/Yangcai365_design/manage/zinc/mobileWorks/js/mui.view.js @@ -0,0 +1,628 @@ +/** + *
            +
            +
            +
            +
            +
            +
            +
            + * @param {Object} $ + * @param {Object} window + */ +(function($, window) { + var CLASS_LEFT = $.className('left'); + var CLASS_CENTER = $.className('center'); + var CLASS_RIGHT = $.className('right'); + var CLASS_PAGE = $.className('page'); + var CLASS_PAGE_LEFT = $.className('page-left'); + var CLASS_PAGE_CENTER = $.className('page-center'); + var CLASS_NAVBAR_LEFT = $.className('navbar-left'); + var CLASS_NAVBAR_CENTER = $.className('navbar-center'); + var CLASS_PAGE_SHADOW = $.className('page-shadow'); + + var CLASS_TRANSITIONING = $.className('transitioning'); + + var SELECTOR_LEFT = '.' + CLASS_LEFT; + var SELECTOR_CENTER = '.' + CLASS_CENTER; + var SELECTOR_RIGHT = '.' + CLASS_RIGHT; + + var SELECTOR_ICON = $.classSelector('.icon'); + var SELECTOR_NAVBAR = $.classSelector('.navbar'); + var SELECTOR_NAVBAR_INNER = $.classSelector('.navbar-inner'); + var SELECTOR_PAGES = $.classSelector('.pages'); + var SELECTOR_BTN_NAV = $.classSelector('.btn-nav'); + var SELECTOR_PAGE_LEFT = '.' + CLASS_PAGE_LEFT; + var SELECTOR_PAGE_CENTER = '.' + CLASS_PAGE_CENTER; + var SELECTOR_NAVBAR_LEFT = '.' + CLASS_NAVBAR_LEFT; + var SELECTOR_NAVBAR_CENTER = '.' + CLASS_NAVBAR_CENTER; + + var View = $.Class.extend({ + init: function(element, options) { + this.view = this.element = element; + this.options = $.extend({ + animateNavbar: 'ios', //ios + swipeBackPageActiveArea: 30, + hardwareAccelerated: true + }, options); + this.navbars = this.view.querySelector(SELECTOR_NAVBAR); + this.pages = this.view.querySelector(SELECTOR_PAGES); + + this.history = []; //history + + this.maxScrollX = this.view.offsetWidth; + this.x = this.y = 0; + this.translateZ = this.options.hardwareAccelerated ? ' translateZ(0)' : ''; + this.ratio = 0; + this.isBack = true; + this.moved = this.dragging = false; + + this.activeNavbar = this.previousNavbar = null; + this.activePage = this.previousPage = null; + + this._initPageEventMethod(); + + this._initDefaultPage(); + + this.navbars && this._initNavBar(); + + this.initEvent(); + }, + _initPageEventMethod: function() { + var self = this; + $.each(['onPageBeforeShow', 'onPageShow', 'onPageBeforeBack', 'onPageBack'], function(index, event) { + self[event + 'Callbacks'] = {}; + self[event] = function(page, callback) { + var eventCallbacks = event + 'Callbacks'; + if (!self[eventCallbacks].hasOwnProperty(page)) { + self[eventCallbacks][page] = [callback]; + } else { + self[eventCallbacks][page].push(callback); + } + }; + }); + }, + _initDefaultPage: function() { + var defaultPage = document.querySelector(this.options.defaultPage); + if (defaultPage) { + this._appendPage(defaultPage); + } else { + throw new Error('defaultPage[' + this.options.defaultPage + '] does not exist'); + } + }, + initEvent: function() { + this.view.addEventListener('click', this); + this.view.addEventListener('tap', this); + this.pages.addEventListener('drag', this); + this.pages.addEventListener('dragend', this); + this.pages.addEventListener('webkitTransitionEnd', this); + }, + handleEvent: function(event) { + switch (event.type) { + case 'click': + this._click(event); + break; + case 'tap': + this._tap(event); + break; + case 'drag': + this._drag(event); + break; + case 'dragend': + this._dragend(event); + break; + case 'webkitTransitionEnd': + this._webkitTransitionEnd(event); + break; + } + }, + shadow: function() { + var shadow = document.createElement('div'); + shadow.className = CLASS_PAGE_SHADOW; + return shadow; + }(), + _removePage: function(page, navbar) { + navbar && this._removeNavbar(page, navbar); + document.body.appendChild(page); + this._cleanPageClass(page); + }, + _prependPage: function(page) { + var navbar = page.querySelector(SELECTOR_NAVBAR_INNER); + navbar && this._prependNavbar(navbar); + page.classList.add(CLASS_PAGE_LEFT); + this.pages.insertBefore(page, this.pages.firstElementChild); + }, + _appendPage: function(page) { + var navbar = page.querySelector(SELECTOR_NAVBAR_INNER); + navbar && this._appendNavbar(navbar); + page.classList.add(CLASS_PAGE_CENTER); + this.pages.appendChild(page); + }, + _removeNavbar: function(page, navbar) { + page.insertBefore(navbar, page.firstElementChild); + this._cleanNavbarClass(navbar); + }, + _prependNavbar: function(navbar) { + navbar.classList.add(CLASS_NAVBAR_LEFT); + this.navbars.insertBefore(navbar, this.navbars.firstElementChild); + }, + _appendNavbar: function(navbar) { + navbar.classList.add(CLASS_NAVBAR_CENTER); + this.navbars.appendChild(navbar); + }, + _cleanPageClass: function(page) { + page.classList.remove(CLASS_PAGE_CENTER); + page.classList.remove(CLASS_PAGE_LEFT); + }, + _cleanNavbarClass: function(navbar) { + navbar.classList.remove(CLASS_NAVBAR_CENTER); + navbar.classList.remove(CLASS_NAVBAR_LEFT); + }, + _tap: function(event) { + var target = event.target; + for (; target && target !== document; target = target.parentNode) { + if (target.tagName === 'A' && target.hash) { + var page = document.getElementById(target.hash.replace('#', '')); + if (page && page.classList.contains(CLASS_PAGE)) { + event.stopPropagation(); + event.detail.gesture.preventDefault(); + this.go(target.hash); + break; + } + } + } + }, + _click: function(event) { + var target = event.target; + for (; target && target !== document; target = target.parentNode) { + if (target.tagName === 'A' && target.hash) { + var page = document.getElementById(target.hash.replace('#', '')); + if (page && page.classList.contains(CLASS_PAGE)) { + event.preventDefault(); + break; + } + } + } + }, + _cleanStyle: function(el) { + if (el) { + el.style.webkitTransform = ''; + el.style.opacity = ''; + } + }, + _isAnimateNavbarIOS: function() { + return !$.os.android && this.options.animateNavbar === 'ios'; + }, + _webkitTransitionEnd: function(event) { + this.dragging = this.moved = false; + if (this.activePage !== event.target) { + return; + } + + this.isInTransition = false; + + this.shadow.parentNode === this.activePage && this.activePage.removeChild(this.shadow); + this.previousPageClassList.remove(CLASS_TRANSITIONING); + this.activePageClassList.remove(CLASS_TRANSITIONING); + + var self = this; + if (this._isAnimateNavbarIOS() && this.previousNavElements && this.activeNavElements) { + var isBack = this.isBack; + $.each(this.previousNavElements, function(i, el) { + el.classList.remove(CLASS_TRANSITIONING); + isBack && self._cleanStyle(el); + }); + $.each(this.activeNavElements, function(i, el) { + el.classList.remove(CLASS_TRANSITIONING); + self._cleanStyle(el); + }); + if (this.previousNavBackIcon) { + this.previousNavBackIcon.classList.remove(CLASS_TRANSITIONING); + isBack && this._cleanStyle(this.previousNavBackIcon); + } + if (this.activeNavBackIcon) { + this.activeNavBackIcon.classList.remove(CLASS_TRANSITIONING); + this._cleanStyle(this.activeNavBackIcon); + } + } else { + this.previousNavbar && this.previousNavbar.classList.remove(CLASS_TRANSITIONING); + this.activeNavbar && this.activeNavbar.classList.remove(CLASS_TRANSITIONING); + this._cleanStyle(this.previousNavbar); + this._cleanStyle(this.activeNavbar); + } + + this._cleanStyle(this.previousPage); + this._cleanStyle(this.activePage); + + if (this.ratio <= 0.5) { + return; + } + if (this.isBack) { + this._removePage(this.activePage, this.activeNavbar); + this.previousPageClassList.remove(CLASS_PAGE_LEFT); + this.previousPageClassList.add(CLASS_PAGE_CENTER); + if (this.previousNavbar) { + this.previousNavbar.classList.remove(CLASS_NAVBAR_LEFT); + this.previousNavbar.classList.add(CLASS_NAVBAR_CENTER); + } + if (this.history.length > 0) { + this._prependPage(this.history.pop()); + } + this.navbars && this._initNavBar(); + this._trigger('pageBack', this.activePage); + this._trigger('pageShow', this.previousPage); + } else { + this.previousPageClassList.add(CLASS_PAGE_LEFT); + this.activePageClassList.add(CLASS_PAGE_CENTER); + this._trigger('pageShow', this.activePage); + } + + + }, + _trigger: function(eventType, page) { + var eventCallbacks = 'on' + eventType.charAt(0).toUpperCase() + eventType.slice(1) + 'Callbacks'; + if (this[eventCallbacks].hasOwnProperty(page.id)) { + var callbacks = this[eventCallbacks][page.id]; + var event = new CustomEvent(eventType, { + detail: { + page: page + }, + bubbles: true, + cancelable: true + }); + for (var len = callbacks.length; len--;) { + callbacks[len].call(this, event); + } + } + $.trigger(this.view, eventType, { + page: page + }); + }, + _initPageTransform: function() { + this.previousPage = this.pages.querySelector(SELECTOR_PAGE_LEFT); + this.activePage = this.pages.querySelector(SELECTOR_PAGE_CENTER); + if (this.previousPage && this.activePage) { + this.activePage.appendChild(this.shadow); + this.previousPageClassList = this.previousPage.classList; + this.activePageClassList = this.activePage.classList; + + this.previousPageStyle = this.previousPage.style; + this.activePageStyle = this.activePage.style; + + this.previousPageClassList.remove(CLASS_TRANSITIONING); + this.activePageClassList.remove(CLASS_TRANSITIONING); + + if (this.navbars) { + this.previousNavbar = this.navbars.querySelector(SELECTOR_NAVBAR_LEFT); + this.activeNavbar = this.navbars.querySelector(SELECTOR_NAVBAR_CENTER); + if (this._isAnimateNavbarIOS() && this.previousNavbar && this.activeNavbar) { + this.previousNavElements = this.previousNavbar.querySelectorAll(SELECTOR_LEFT + ',' + SELECTOR_CENTER + ',' + SELECTOR_RIGHT); + this.activeNavElements = this.activeNavbar.querySelectorAll(SELECTOR_LEFT + ',' + SELECTOR_CENTER + ',' + SELECTOR_RIGHT); + this.previousNavBackIcon = this.previousNavbar.querySelector(SELECTOR_LEFT + SELECTOR_BTN_NAV + ' ' + SELECTOR_ICON); + this.activeNavBackIcon = this.activeNavbar.querySelector(SELECTOR_LEFT + SELECTOR_BTN_NAV + ' ' + SELECTOR_ICON); + } + } + this.x = 0; + this.dragging = true; + return true; + } + return false; + }, + _initNavBar: function() { + if (this._isAnimateNavbarIOS() && this.navbars) { + var inners = this.navbars.querySelectorAll(SELECTOR_NAVBAR_INNER); + var inner, left, right, center, leftWidth, rightWidth, centerWidth, noLeft, onRight, currLeft, diff, navbarWidth; + for (var i = 0, len = inners.length; i < len; i++) { + inner = inners[i]; + left = inner.querySelector(SELECTOR_LEFT); + right = inner.querySelector(SELECTOR_RIGHT); + center = inner.querySelector(SELECTOR_CENTER); + noLeft = !left; + noRight = !right; + leftWidth = noLeft ? 0 : left.offsetWidth; + rightWidth = noRight ? 0 : right.offsetWidth; + centerWidth = center ? center.offsetWidth : 0; + navbarWidth = this.maxScrollX; + onLeft = inner.classList.contains('navbar-left'); + if (noRight) { + currLeft = navbarWidth - centerWidth; + } + if (noLeft) { + currLeft = 0; + } + if (!noLeft && !noRight) { + currLeft = (navbarWidth - rightWidth - centerWidth + leftWidth) / 2; + } + var requiredLeft = (navbarWidth - centerWidth) / 2; + if (navbarWidth - leftWidth - rightWidth > centerWidth) { + if (requiredLeft < leftWidth) { + requiredLeft = leftWidth; + } + if (requiredLeft + centerWidth > navbarWidth - rightWidth) { + requiredLeft = navbarWidth - rightWidth - centerWidth; + } + diff = requiredLeft - currLeft; + } else { + diff = 0; + } + + var centerLeft = diff; + if (center) { + center.style.marginLeft = -leftWidth + 'px'; + center.mNavbarLeftOffset = -(currLeft + diff) + 30; //这个30是测出来的。后续要实际计算一下 + center.mNavbarRightOffset = navbarWidth - currLeft - diff - centerWidth; + } + + if (onLeft) center.style.webkitTransform = ('translate3d(' + center.mNavbarLeftOffset + 'px, 0, 0)'); + + if (!noLeft) { + left.mNavbarLeftOffset = -leftWidth; + left.mNavbarRightOffset = (navbarWidth - leftWidth) / 2; + if (onLeft) left.style.webkitTransform = ('translate3d(' + left[0].mNavbarLeftOffset + 'px, 0, 0)'); + } + + if (!noRight) { + right.mNavbarLeftOffset = -(navbarWidth - rightWidth) / 2; + right.mNavbarRightOffset = rightWidth; + if (onLeft) right.style.webkitTransform = ('translate3d(' + right[0].mNavbarLeftOffset + 'px, 0, 0)'); + } + + } + } + }, + _drag: function(event) { + if (this.isInTransition) { + return; + } + var detail = event.detail; + if (!this.dragging) { + if (($.gestures.session.firstTouch.center.x - this.view.offsetLeft) < this.options.swipeBackPageActiveArea) { + this.isBack = true; + this._initPageTransform(); + } + } + if (this.dragging) { + var deltaX = 0; + if (!this.moved) { //start + deltaX = detail.deltaX; + $.gestures.session.lockDirection = true; //锁定方向 + $.gestures.session.startDirection = detail.direction; + } else { //move + deltaX = detail.deltaX - ($.gestures.session.prevTouch && $.gestures.session.prevTouch.deltaX || 0); + } + var newX = this.x + deltaX; + if (newX < 0 || newX > this.maxScrollX) { + newX = newX < 0 ? 0 : this.maxScrollX; + } + + event.stopPropagation(); + detail.gesture.preventDefault(); + + if (!this.requestAnimationFrame) { + this._updateTranslate(); + } + + this.moved = true; + this.x = newX; + this.y = 0; + } + }, + _dragend: function(event) { + if (!this.moved) { + return; + } + + event.stopPropagation(); + + var detail = event.detail; + + this._clearRequestAnimationFrame(); + + this._prepareTransition(); + + this.ratio = this.x / this.maxScrollX; + if (this.ratio === 1 || this.ratio === 0) { + $.trigger(this.activePage, 'webkitTransitionEnd'); + return; + } + if (this.ratio > 0.5) { + this.setTranslate(this.maxScrollX, 0); + } else { + this._cleanStyle(this.previousPage); + this._cleanStyle(this.activePage); + } + }, + _prepareTransition: function() { + this.isInTransition = true; + this.previousPageClassList.add(CLASS_TRANSITIONING); + this.activePageClassList.add(CLASS_TRANSITIONING); + var self = this; + if (this.previousNavbar && this.activeNavbar) { + this.previousNavbar.classList.add(CLASS_TRANSITIONING); + this.activeNavbar.classList.add(CLASS_TRANSITIONING); + if (this._isAnimateNavbarIOS() && this.previousNavElements && this.activeNavElements) { + $.each(this.previousNavElements, function(i, el) { + el.classList.add(CLASS_TRANSITIONING); + self._cleanStyle(el); + }); + $.each(this.activeNavElements, function(i, el) { + el.classList.add(CLASS_TRANSITIONING); + self._cleanStyle(el); + }); + if (this.previousNavBackIcon) { + this._cleanStyle(this.previousNavBackIcon); + this.previousNavBackIcon.classList.add(CLASS_TRANSITIONING); + } + if (this.activeNavBackIcon) { + this._cleanStyle(this.activeNavBackIcon); + this.activeNavBackIcon.classList.add(CLASS_TRANSITIONING); + } + } + } + }, + _clearRequestAnimationFrame: function() { + if (this.requestAnimationFrame) { + cancelAnimationFrame(this.requestAnimationFrame); + this.requestAnimationFrame = null; + } + }, + _getTranslateStr: function(x, y) { + if (this.options.hardwareAccelerated) { + return 'translate3d(' + x + 'px,' + y + 'px,0px) ' + this.translateZ; + } + return 'translate(' + x + 'px,' + y + 'px) '; + }, + + _updateTranslate: function() { + var self = this; + if (self.x !== self.lastX || self.y !== self.lastY) { + self.setTranslate(self.x, self.y); + } + self.requestAnimationFrame = requestAnimationFrame(function() { + self._updateTranslate(); + }); + }, + _setNavbarTranslate: function(x, y) { + var percentage = x / this.maxScrollX; + //only for ios + if (this._isAnimateNavbarIOS()) { + if (this.previousNavElements && this.activeNavElements) { + this.animateNavbarByIOS(percentage); + } + } else { //pop-in + this.activeNavbar.style.opacity = 1 - percentage * 1.3; + this.previousNavbar.style.opacity = percentage * 1.3 - 0.3; + } + }, + animateNavbarByIOS: function(percentage) { + var i, len, style, el; + for (i = 0, len = this.activeNavElements.length; i < len; i++) { + el = this.activeNavElements[i]; + style = el.style; + style.opacity = (1 - percentage * (el.classList.contains(CLASS_LEFT) ? 3.5 : 1.3)); + if (!el.classList.contains(CLASS_RIGHT)) { + var activeNavTranslate = percentage * el.mNavbarRightOffset; + el.style.webkitTransform = ('translate3d(' + activeNavTranslate + 'px,0,0)'); + if (el.classList.contains(CLASS_LEFT) && this.activeNavBackIcon) { + this.activeNavBackIcon.style.webkitTransform = ('translate3d(' + -activeNavTranslate + 'px,0,0)'); + } + } + } + for (i = 0, len = this.previousNavElements.length; i < len; i++) { + el = this.previousNavElements[i]; + style = el.style; + style.opacity = percentage * 1.3 - 0.3; + if (!el.classList.contains(CLASS_RIGHT)) { + var previousNavTranslate = el.mNavbarLeftOffset * (1 - percentage); + el.style.webkitTransform = ('translate3d(' + previousNavTranslate + 'px,0,0)'); + if (el.classList.contains(CLASS_LEFT) && this.previousNavBackIcon) { + this.previousNavBackIcon.style.webkitTransform = ('translate3d(' + -previousNavTranslate + 'px,0,0)'); + } + } + } + }, + setTranslate: function(x, y) { + this.x = x; + this.y = y; + this.previousPage.style.opacity = 0.9 + 0.1 * x / this.maxScrollX; + this.previousPage.style['webkitTransform'] = this._getTranslateStr((x / 6 - this.maxScrollX / 6), y); + this.activePage.style['webkitTransform'] = this._getTranslateStr(x, y); + + this.navbars && this._setNavbarTranslate(x, y); + this.lastX = this.x; + this.lastY = this.y; + }, + canBack: function() { + return this.pages.querySelector(SELECTOR_PAGE_LEFT); + }, + back: function() { + if (this.isInTransition) { + return; + } + this.isBack = true; + this.ratio = 1; + if (this._initPageTransform()) { + this._trigger('pageBeforeBack', this.activePage); + this._trigger('pageBeforeShow', this.previousPage); + this._prepareTransition(); + this.previousPage.offsetHeight; + this.activePage.offsetHeight; + this.setTranslate(this.maxScrollX, 0); + } + }, + go: function(pageSelector) { + if (this.isInTransition) { + return; + } + var nextPage = document.querySelector(pageSelector); + + if (nextPage) { + var previousPage = this.pages.querySelector(SELECTOR_PAGE_LEFT); + var activePage = this.pages.querySelector(SELECTOR_PAGE_CENTER); + var previousNavbar; + var activeNavbar; + if (this.navbars) { + previousNavbar = this.navbars.querySelector(SELECTOR_NAVBAR_LEFT); + activeNavbar = this.navbars.querySelector(SELECTOR_NAVBAR_CENTER); + } + if (activeNavbar) { + activeNavbar.classList.remove(CLASS_NAVBAR_CENTER); + activeNavbar.classList.add(CLASS_NAVBAR_LEFT); + } + + if (previousPage) { + this._removePage(previousPage, previousNavbar); + this.history.push(previousPage); //add to history + } + + if (activePage) { + activePage.classList.remove(CLASS_PAGE_CENTER); + activePage.style.webkitTransform = 'translate3d(0,0,0)'; + activePage.classList.add(CLASS_PAGE_LEFT); + } + + + nextPage.style.webkitTransform = 'translate3d(100%,0,0)'; + this._appendPage(nextPage); + nextPage.appendChild(this.shadow); //shadow + nextPage.offsetHeight; //force + this.isBack = false; + this.ratio = 1; + + this._initPageTransform(); + + this.navbars && this._initNavBar(); + + this.navbars && this._setNavbarTranslate(this.maxScrollX, 0); + //force + this.previousPage.offsetHeight; + this.activePage.offsetHeight; + + if (this.navbars) { + this.previousNavbar.offsetHeight; + this.activeNavbar.offsetHeight; + } + + this._trigger('pageBeforeShow', this.activePage); + this._prepareTransition(); + this.setTranslate(0, 0); + } + } + + }); + + + $.fn.view = function(options) { + var self = this[0]; + var viewApi = null; + var id = self.getAttribute('data-view'); + if (!id) { + id = ++$.uuid; + $.data[id] = viewApi = new View(self, options); + self.setAttribute('data-view', id); + } else { + viewApi = $.data[id]; + } + return viewApi; + } +})(mui, window); \ No newline at end of file diff --git a/Yangcai365_design/manage/zinc/mobileWorks/js/pagination.js b/Yangcai365_design/manage/zinc/mobileWorks/js/pagination.js new file mode 100644 index 0000000..b21a4b7 --- /dev/null +++ b/Yangcai365_design/manage/zinc/mobileWorks/js/pagination.js @@ -0,0 +1,213 @@ +/*分页插件*/ +var Pagination = { + + showPageCount: 7, + + init: function (obj, callback,topFlag) { + this.bindListener(obj, callback,topFlag); + }, + createHtml: function (pageIndex, recordCount, pageSize) { + + var pageCount = Math.ceil(recordCount / pageSize); //总页数 + var showPageCount = this.showPageCount; + var MaxCount = 10000000000; + var HalfPageCount = (showPageCount + 1) / 2; + var html = []; + + if (pageCount > MaxCount) { + pageCount = MaxCount; + } + if (pageIndex > pageCount - 1) { + pageIndex = pageCount - 1; + } + html.push("共" + recordCount + "条"); + if (pageIndex > 0) { + html.push(""); + } + else { + html.push(""); + } + if (pageCount <= showPageCount) { + for (var i = 0; i < pageCount; i++) { + if (pageIndex == i) { + html.push("" + (i + 1) + ""); + } + else { + html.push("" + (i + 1) + ""); + } + } + } + else if (pageIndex < HalfPageCount) { + for (var i = 0; i < showPageCount - 1; i++) { + if (pageIndex == i) { + html.push("" + (i + 1) + ""); + } + else { + html.push("" + (i + 1) + ""); + } + } + + html.push("..."); + html.push("" + pageCount + ""); + } + else if (pageIndex >= pageCount - HalfPageCount - 1) { + html.push("" + 1 + ""); + html.push("..."); + for (var i = pageCount - showPageCount + 1; i < pageCount; i++) { + if (pageIndex == i) { + html.push("" + (i + 1) + ""); + } + else { + html.push("" + (i + 1) + ""); + } + } + } + else { + html.push("" + 1 + ""); + html.push("..."); + + for (var i = pageIndex - HalfPageCount / 2; i <= pageIndex + HalfPageCount / 2; i++) { + if (pageIndex == i) { + html.push("" + (i + 1) + ""); + } + else { + html.push("" + (i + 1) + ""); + } + } + html.push("..."); + html.push("" + pageCount + ""); + } + + if (pageIndex < pageCount - 1) { + html.push(""); + } + else { + html.push(""); + } + + // html.push("每页" + pageSize + "条"); + html.push("共" + pageCount + "页"); + html.push(""); + + // html.push(""); + return html.join(""); + }, + + bindListener: function (obj, callback,topFlag) { + var topFlag = topFlag || true; + obj.on("click", "a", function () { + if (typeof callback === "function") { + var index = $(this).attr("page"); + callback(parseInt(index)); + } + if(topFlag){ + $(window).scrollTop(0); + } + return false; + }); + obj.on("click", "button", function () { + var pageInput = obj.find('input'); + if (typeof callback === "function") { + var index = pageInput.val(); + if (index == '') { + pageInput.focus(); + return false; + // index = 1; + } + callback(parseInt(index) - 1); + } + return false; + }); + + // var pageButton = $("#pageButton"); + + obj.on("keyup", "input", function (e) { + + switch (e.keyCode) { + case 37: + break; + case 38: + break; + case 39: + break; + case 40: + break; + case 13: + changePage(); + break; + case 8: + $(e.target).attr('oldpage', $(e.target).val()); + break; + case 46: + $(e.target).attr('oldpage', $(e.target).val()); + break; + default : + validPage(); + } + return false; + }); + + //分页 + function changePage() { + var pageInput = obj.find('input'); + var page = pageInput.val(); + var maxPage = parseInt(obj.find(".total_page").html().substring(1)); + var pattern = new RegExp("^[1-9]\\d{0," + maxPage.toString().length + "}$"); + if (page.trim() == "") { + pageInput.focus(); + return; + } + if (pattern.test(page)) { + page = parseInt(page); + maxPage = parseInt(maxPage); + if (page > maxPage || page < 0) { + pageInput.val("").focus(); + return; + } + } else { + + pageInput.val("").focus(); + return; + } + callback(parseInt(page) - 1); + } + + //页码校验v2 + function validPage() { + var pageInput = obj.find('input'); + + var totalPageHtml = obj.find(".total_page").html(); + var maxPage = parseInt(totalPageHtml.substring(1, totalPageHtml.length - 1)); + + var page = pageInput.val(); + var pattern = /^[0-9]+$/; + var oldpage = pageInput.attr("oldpage") || ''; + if (page.trim() == "") { + pageInput.val(""); + return; + } + if (!pattern.test(page)) { + pageInput.val(oldpage); + return; + } + var pageInt = parseInt(page); + if (page.substr(0, 1) == '0') { + pageInput.val(pageInt); + } + if (pageInt == 0) { + pageInput.val(''); + return; + } + if (pageInt > parseInt(maxPage)) { + pageInput.val(page.substr(0, page.length - 1)); + return; + } + pageInput.attr('oldpage', pageInput.val()); + } + }, + Page: function (obj, pageIndex, recordCount, pageSize) { + obj.empty(); + obj.html(this.createHtml(pageIndex, recordCount, pageSize)); + } + +}; diff --git a/Yangcai365_design/manage/zinc/mobileWorks/zepto/zepto.min.js b/Yangcai365_design/manage/zinc/mobileWorks/zepto/zepto.min.js new file mode 100644 index 0000000..4821a1c --- /dev/null +++ b/Yangcai365_design/manage/zinc/mobileWorks/zepto/zepto.min.js @@ -0,0 +1,2 @@ +/* Zepto v1.2.0 - zepto event ajax form ie - zeptojs.com/license */ +!function(t,e){"function"==typeof define&&define.amd?define(function(){return e(t)}):e(t)}(this,function(t){var e=function(){function $(t){return null==t?String(t):S[C.call(t)]||"object"}function F(t){return"function"==$(t)}function k(t){return null!=t&&t==t.window}function M(t){return null!=t&&t.nodeType==t.DOCUMENT_NODE}function R(t){return"object"==$(t)}function Z(t){return R(t)&&!k(t)&&Object.getPrototypeOf(t)==Object.prototype}function z(t){var e=!!t&&"length"in t&&t.length,n=r.type(t);return"function"!=n&&!k(t)&&("array"==n||0===e||"number"==typeof e&&e>0&&e-1 in t)}function q(t){return a.call(t,function(t){return null!=t})}function H(t){return t.length>0?r.fn.concat.apply([],t):t}function I(t){return t.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function V(t){return t in l?l[t]:l[t]=new RegExp("(^|\\s)"+t+"(\\s|$)")}function _(t,e){return"number"!=typeof e||h[I(t)]?e:e+"px"}function B(t){var e,n;return c[t]||(e=f.createElement(t),f.body.appendChild(e),n=getComputedStyle(e,"").getPropertyValue("display"),e.parentNode.removeChild(e),"none"==n&&(n="block"),c[t]=n),c[t]}function U(t){return"children"in t?u.call(t.children):r.map(t.childNodes,function(t){return 1==t.nodeType?t:void 0})}function X(t,e){var n,r=t?t.length:0;for(n=0;r>n;n++)this[n]=t[n];this.length=r,this.selector=e||""}function J(t,r,i){for(n in r)i&&(Z(r[n])||L(r[n]))?(Z(r[n])&&!Z(t[n])&&(t[n]={}),L(r[n])&&!L(t[n])&&(t[n]=[]),J(t[n],r[n],i)):r[n]!==e&&(t[n]=r[n])}function W(t,e){return null==e?r(t):r(t).filter(e)}function Y(t,e,n,r){return F(e)?e.call(t,n,r):e}function G(t,e,n){null==n?t.removeAttribute(e):t.setAttribute(e,n)}function K(t,n){var r=t.className||"",i=r&&r.baseVal!==e;return n===e?i?r.baseVal:r:void(i?r.baseVal=n:t.className=n)}function Q(t){try{return t?"true"==t||("false"==t?!1:"null"==t?null:+t+""==t?+t:/^[\[\{]/.test(t)?r.parseJSON(t):t):t}catch(e){return t}}function tt(t,e){e(t);for(var n=0,r=t.childNodes.length;r>n;n++)tt(t.childNodes[n],e)}var e,n,r,i,O,P,o=[],s=o.concat,a=o.filter,u=o.slice,f=t.document,c={},l={},h={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},p=/^\s*<(\w+|!)[^>]*>/,d=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,m=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,g=/^(?:body|html)$/i,v=/([A-Z])/g,y=["val","css","html","text","data","width","height","offset"],x=["after","prepend","before","append"],b=f.createElement("table"),E=f.createElement("tr"),j={tr:f.createElement("tbody"),tbody:b,thead:b,tfoot:b,td:E,th:E,"*":f.createElement("div")},w=/complete|loaded|interactive/,T=/^[\w-]*$/,S={},C=S.toString,N={},A=f.createElement("div"),D={tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},L=Array.isArray||function(t){return t instanceof Array};return N.matches=function(t,e){if(!e||!t||1!==t.nodeType)return!1;var n=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.matchesSelector;if(n)return n.call(t,e);var r,i=t.parentNode,o=!i;return o&&(i=A).appendChild(t),r=~N.qsa(i,e).indexOf(t),o&&A.removeChild(t),r},O=function(t){return t.replace(/-+(.)?/g,function(t,e){return e?e.toUpperCase():""})},P=function(t){return a.call(t,function(e,n){return t.indexOf(e)==n})},N.fragment=function(t,n,i){var o,s,a;return d.test(t)&&(o=r(f.createElement(RegExp.$1))),o||(t.replace&&(t=t.replace(m,"<$1>")),n===e&&(n=p.test(t)&&RegExp.$1),n in j||(n="*"),a=j[n],a.innerHTML=""+t,o=r.each(u.call(a.childNodes),function(){a.removeChild(this)})),Z(i)&&(s=r(o),r.each(i,function(t,e){y.indexOf(t)>-1?s[t](e):s.attr(t,e)})),o},N.Z=function(t,e){return new X(t,e)},N.isZ=function(t){return t instanceof N.Z},N.init=function(t,n){var i;if(!t)return N.Z();if("string"==typeof t)if(t=t.trim(),"<"==t[0]&&p.test(t))i=N.fragment(t,RegExp.$1,n),t=null;else{if(n!==e)return r(n).find(t);i=N.qsa(f,t)}else{if(F(t))return r(f).ready(t);if(N.isZ(t))return t;if(L(t))i=q(t);else if(R(t))i=[t],t=null;else if(p.test(t))i=N.fragment(t.trim(),RegExp.$1,n),t=null;else{if(n!==e)return r(n).find(t);i=N.qsa(f,t)}}return N.Z(i,t)},r=function(t,e){return N.init(t,e)},r.extend=function(t){var e,n=u.call(arguments,1);return"boolean"==typeof t&&(e=t,t=n.shift()),n.forEach(function(n){J(t,n,e)}),t},N.qsa=function(t,e){var n,r="#"==e[0],i=!r&&"."==e[0],o=r||i?e.slice(1):e,s=T.test(o);return t.getElementById&&s&&r?(n=t.getElementById(o))?[n]:[]:1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType?[]:u.call(s&&!r&&t.getElementsByClassName?i?t.getElementsByClassName(o):t.getElementsByTagName(e):t.querySelectorAll(e))},r.contains=f.documentElement.contains?function(t,e){return t!==e&&t.contains(e)}:function(t,e){for(;e&&(e=e.parentNode);)if(e===t)return!0;return!1},r.type=$,r.isFunction=F,r.isWindow=k,r.isArray=L,r.isPlainObject=Z,r.isEmptyObject=function(t){var e;for(e in t)return!1;return!0},r.isNumeric=function(t){var e=Number(t),n=typeof t;return null!=t&&"boolean"!=n&&("string"!=n||t.length)&&!isNaN(e)&&isFinite(e)||!1},r.inArray=function(t,e,n){return o.indexOf.call(e,t,n)},r.camelCase=O,r.trim=function(t){return null==t?"":String.prototype.trim.call(t)},r.uuid=0,r.support={},r.expr={},r.noop=function(){},r.map=function(t,e){var n,i,o,r=[];if(z(t))for(i=0;i=0?t:t+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!=this.parentNode&&this.parentNode.removeChild(this)})},each:function(t){return o.every.call(this,function(e,n){return t.call(e,n,e)!==!1}),this},filter:function(t){return F(t)?this.not(this.not(t)):r(a.call(this,function(e){return N.matches(e,t)}))},add:function(t,e){return r(P(this.concat(r(t,e))))},is:function(t){return this.length>0&&N.matches(this[0],t)},not:function(t){var n=[];if(F(t)&&t.call!==e)this.each(function(e){t.call(this,e)||n.push(this)});else{var i="string"==typeof t?this.filter(t):z(t)&&F(t.item)?u.call(t):r(t);this.forEach(function(t){i.indexOf(t)<0&&n.push(t)})}return r(n)},has:function(t){return this.filter(function(){return R(t)?r.contains(this,t):r(this).find(t).size()})},eq:function(t){return-1===t?this.slice(t):this.slice(t,+t+1)},first:function(){var t=this[0];return t&&!R(t)?t:r(t)},last:function(){var t=this[this.length-1];return t&&!R(t)?t:r(t)},find:function(t){var e,n=this;return e=t?"object"==typeof t?r(t).filter(function(){var t=this;return o.some.call(n,function(e){return r.contains(e,t)})}):1==this.length?r(N.qsa(this[0],t)):this.map(function(){return N.qsa(this,t)}):r()},closest:function(t,e){var n=[],i="object"==typeof t&&r(t);return this.each(function(r,o){for(;o&&!(i?i.indexOf(o)>=0:N.matches(o,t));)o=o!==e&&!M(o)&&o.parentNode;o&&n.indexOf(o)<0&&n.push(o)}),r(n)},parents:function(t){for(var e=[],n=this;n.length>0;)n=r.map(n,function(t){return(t=t.parentNode)&&!M(t)&&e.indexOf(t)<0?(e.push(t),t):void 0});return W(e,t)},parent:function(t){return W(P(this.pluck("parentNode")),t)},children:function(t){return W(this.map(function(){return U(this)}),t)},contents:function(){return this.map(function(){return this.contentDocument||u.call(this.childNodes)})},siblings:function(t){return W(this.map(function(t,e){return a.call(U(e.parentNode),function(t){return t!==e})}),t)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(t){return r.map(this,function(e){return e[t]})},show:function(){return this.each(function(){"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=B(this.nodeName))})},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){var e=F(t);if(this[0]&&!e)var n=r(t).get(0),i=n.parentNode||this.length>1;return this.each(function(o){r(this).wrapAll(e?t.call(this,o):i?n.cloneNode(!0):n)})},wrapAll:function(t){if(this[0]){r(this[0]).before(t=r(t));for(var e;(e=t.children()).length;)t=e.first();r(t).append(this)}return this},wrapInner:function(t){var e=F(t);return this.each(function(n){var i=r(this),o=i.contents(),s=e?t.call(this,n):t;o.length?o.wrapAll(s):i.append(s)})},unwrap:function(){return this.parent().each(function(){r(this).replaceWith(r(this).children())}),this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(t){return this.each(function(){var n=r(this);(t===e?"none"==n.css("display"):t)?n.show():n.hide()})},prev:function(t){return r(this.pluck("previousElementSibling")).filter(t||"*")},next:function(t){return r(this.pluck("nextElementSibling")).filter(t||"*")},html:function(t){return 0 in arguments?this.each(function(e){var n=this.innerHTML;r(this).empty().append(Y(this,t,e,n))}):0 in this?this[0].innerHTML:null},text:function(t){return 0 in arguments?this.each(function(e){var n=Y(this,t,e,this.textContent);this.textContent=null==n?"":""+n}):0 in this?this.pluck("textContent").join(""):null},attr:function(t,r){var i;return"string"!=typeof t||1 in arguments?this.each(function(e){if(1===this.nodeType)if(R(t))for(n in t)G(this,n,t[n]);else G(this,t,Y(this,r,e,this.getAttribute(t)))}):0 in this&&1==this[0].nodeType&&null!=(i=this[0].getAttribute(t))?i:e},removeAttr:function(t){return this.each(function(){1===this.nodeType&&t.split(" ").forEach(function(t){G(this,t)},this)})},prop:function(t,e){return t=D[t]||t,1 in arguments?this.each(function(n){this[t]=Y(this,e,n,this[t])}):this[0]&&this[0][t]},removeProp:function(t){return t=D[t]||t,this.each(function(){delete this[t]})},data:function(t,n){var r="data-"+t.replace(v,"-$1").toLowerCase(),i=1 in arguments?this.attr(r,n):this.attr(r);return null!==i?Q(i):e},val:function(t){return 0 in arguments?(null==t&&(t=""),this.each(function(e){this.value=Y(this,t,e,this.value)})):this[0]&&(this[0].multiple?r(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value)},offset:function(e){if(e)return this.each(function(t){var n=r(this),i=Y(this,e,t,n.offset()),o=n.offsetParent().offset(),s={top:i.top-o.top,left:i.left-o.left};"static"==n.css("position")&&(s.position="relative"),n.css(s)});if(!this.length)return null;if(f.documentElement!==this[0]&&!r.contains(f.documentElement,this[0]))return{top:0,left:0};var n=this[0].getBoundingClientRect();return{left:n.left+t.pageXOffset,top:n.top+t.pageYOffset,width:Math.round(n.width),height:Math.round(n.height)}},css:function(t,e){if(arguments.length<2){var i=this[0];if("string"==typeof t){if(!i)return;return i.style[O(t)]||getComputedStyle(i,"").getPropertyValue(t)}if(L(t)){if(!i)return;var o={},s=getComputedStyle(i,"");return r.each(t,function(t,e){o[e]=i.style[O(e)]||s.getPropertyValue(e)}),o}}var a="";if("string"==$(t))e||0===e?a=I(t)+":"+_(t,e):this.each(function(){this.style.removeProperty(I(t))});else for(n in t)t[n]||0===t[n]?a+=I(n)+":"+_(n,t[n])+";":this.each(function(){this.style.removeProperty(I(n))});return this.each(function(){this.style.cssText+=";"+a})},index:function(t){return t?this.indexOf(r(t)[0]):this.parent().children().indexOf(this[0])},hasClass:function(t){return t?o.some.call(this,function(t){return this.test(K(t))},V(t)):!1},addClass:function(t){return t?this.each(function(e){if("className"in this){i=[];var n=K(this),o=Y(this,t,e,n);o.split(/\s+/g).forEach(function(t){r(this).hasClass(t)||i.push(t)},this),i.length&&K(this,n+(n?" ":"")+i.join(" "))}}):this},removeClass:function(t){return this.each(function(n){if("className"in this){if(t===e)return K(this,"");i=K(this),Y(this,t,n,i).split(/\s+/g).forEach(function(t){i=i.replace(V(t)," ")}),K(this,i.trim())}})},toggleClass:function(t,n){return t?this.each(function(i){var o=r(this),s=Y(this,t,i,K(this));s.split(/\s+/g).forEach(function(t){(n===e?!o.hasClass(t):n)?o.addClass(t):o.removeClass(t)})}):this},scrollTop:function(t){if(this.length){var n="scrollTop"in this[0];return t===e?n?this[0].scrollTop:this[0].pageYOffset:this.each(n?function(){this.scrollTop=t}:function(){this.scrollTo(this.scrollX,t)})}},scrollLeft:function(t){if(this.length){var n="scrollLeft"in this[0];return t===e?n?this[0].scrollLeft:this[0].pageXOffset:this.each(n?function(){this.scrollLeft=t}:function(){this.scrollTo(t,this.scrollY)})}},position:function(){if(this.length){var t=this[0],e=this.offsetParent(),n=this.offset(),i=g.test(e[0].nodeName)?{top:0,left:0}:e.offset();return n.top-=parseFloat(r(t).css("margin-top"))||0,n.left-=parseFloat(r(t).css("margin-left"))||0,i.top+=parseFloat(r(e[0]).css("border-top-width"))||0,i.left+=parseFloat(r(e[0]).css("border-left-width"))||0,{top:n.top-i.top,left:n.left-i.left}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||f.body;t&&!g.test(t.nodeName)&&"static"==r(t).css("position");)t=t.offsetParent;return t})}},r.fn.detach=r.fn.remove,["width","height"].forEach(function(t){var n=t.replace(/./,function(t){return t[0].toUpperCase()});r.fn[t]=function(i){var o,s=this[0];return i===e?k(s)?s["inner"+n]:M(s)?s.documentElement["scroll"+n]:(o=this.offset())&&o[t]:this.each(function(e){s=r(this),s.css(t,Y(this,i,e,s[t]()))})}}),x.forEach(function(n,i){var o=i%2;r.fn[n]=function(){var n,a,s=r.map(arguments,function(t){var i=[];return n=$(t),"array"==n?(t.forEach(function(t){return t.nodeType!==e?i.push(t):r.zepto.isZ(t)?i=i.concat(t.get()):void(i=i.concat(N.fragment(t)))}),i):"object"==n||null==t?t:N.fragment(t)}),u=this.length>1;return s.length<1?this:this.each(function(e,n){a=o?n:n.parentNode,n=0==i?n.nextSibling:1==i?n.firstChild:2==i?n:null;var c=r.contains(f.documentElement,a);s.forEach(function(e){if(u)e=e.cloneNode(!0);else if(!a)return r(e).remove();a.insertBefore(e,n),c&&tt(e,function(e){if(!(null==e.nodeName||"SCRIPT"!==e.nodeName.toUpperCase()||e.type&&"text/javascript"!==e.type||e.src)){var n=e.ownerDocument?e.ownerDocument.defaultView:t;n.eval.call(n,e.innerHTML)}})})})},r.fn[o?n+"To":"insert"+(i?"Before":"After")]=function(t){return r(t)[n](this),this}}),N.Z.prototype=X.prototype=r.fn,N.uniq=P,N.deserializeValue=Q,r.zepto=N,r}();return t.Zepto=e,void 0===t.$&&(t.$=e),function(e){function h(t){return t._zid||(t._zid=n++)}function p(t,e,n,r){if(e=d(e),e.ns)var i=m(e.ns);return(a[h(t)]||[]).filter(function(t){return t&&(!e.e||t.e==e.e)&&(!e.ns||i.test(t.ns))&&(!n||h(t.fn)===h(n))&&(!r||t.sel==r)})}function d(t){var e=(""+t).split(".");return{e:e[0],ns:e.slice(1).sort().join(" ")}}function m(t){return new RegExp("(?:^| )"+t.replace(" "," .* ?")+"(?: |$)")}function g(t,e){return t.del&&!f&&t.e in c||!!e}function v(t){return l[t]||f&&c[t]||t}function y(t,n,i,o,s,u,f){var c=h(t),p=a[c]||(a[c]=[]);n.split(/\s/).forEach(function(n){if("ready"==n)return e(document).ready(i);var a=d(n);a.fn=i,a.sel=s,a.e in l&&(i=function(t){var n=t.relatedTarget;return!n||n!==this&&!e.contains(this,n)?a.fn.apply(this,arguments):void 0}),a.del=u;var c=u||i;a.proxy=function(e){if(e=T(e),!e.isImmediatePropagationStopped()){e.data=o;var n=c.apply(t,e._args==r?[e]:[e].concat(e._args));return n===!1&&(e.preventDefault(),e.stopPropagation()),n}},a.i=p.length,p.push(a),"addEventListener"in t&&t.addEventListener(v(a.e),a.proxy,g(a,f))})}function x(t,e,n,r,i){var o=h(t);(e||"").split(/\s/).forEach(function(e){p(t,e,n,r).forEach(function(e){delete a[o][e.i],"removeEventListener"in t&&t.removeEventListener(v(e.e),e.proxy,g(e,i))})})}function T(t,n){return(n||!t.isDefaultPrevented)&&(n||(n=t),e.each(w,function(e,r){var i=n[e];t[e]=function(){return this[r]=b,i&&i.apply(n,arguments)},t[r]=E}),t.timeStamp||(t.timeStamp=Date.now()),(n.defaultPrevented!==r?n.defaultPrevented:"returnValue"in n?n.returnValue===!1:n.getPreventDefault&&n.getPreventDefault())&&(t.isDefaultPrevented=b)),t}function S(t){var e,n={originalEvent:t};for(e in t)j.test(e)||t[e]===r||(n[e]=t[e]);return T(n,t)}var r,n=1,i=Array.prototype.slice,o=e.isFunction,s=function(t){return"string"==typeof t},a={},u={},f="onfocusin"in t,c={focus:"focusin",blur:"focusout"},l={mouseenter:"mouseover",mouseleave:"mouseout"};u.click=u.mousedown=u.mouseup=u.mousemove="MouseEvents",e.event={add:y,remove:x},e.proxy=function(t,n){var r=2 in arguments&&i.call(arguments,2);if(o(t)){var a=function(){return t.apply(n,r?r.concat(i.call(arguments)):arguments)};return a._zid=h(t),a}if(s(n))return r?(r.unshift(t[n],t),e.proxy.apply(null,r)):e.proxy(t[n],t);throw new TypeError("expected function")},e.fn.bind=function(t,e,n){return this.on(t,e,n)},e.fn.unbind=function(t,e){return this.off(t,e)},e.fn.one=function(t,e,n,r){return this.on(t,e,n,r,1)};var b=function(){return!0},E=function(){return!1},j=/^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,w={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};e.fn.delegate=function(t,e,n){return this.on(e,t,n)},e.fn.undelegate=function(t,e,n){return this.off(e,t,n)},e.fn.live=function(t,n){return e(document.body).delegate(this.selector,t,n),this},e.fn.die=function(t,n){return e(document.body).undelegate(this.selector,t,n),this},e.fn.on=function(t,n,a,u,f){var c,l,h=this;return t&&!s(t)?(e.each(t,function(t,e){h.on(t,n,a,e,f)}),h):(s(n)||o(u)||u===!1||(u=a,a=n,n=r),(u===r||a===!1)&&(u=a,a=r),u===!1&&(u=E),h.each(function(r,o){f&&(c=function(t){return x(o,t.type,u),u.apply(this,arguments)}),n&&(l=function(t){var r,s=e(t.target).closest(n,o).get(0);return s&&s!==o?(r=e.extend(S(t),{currentTarget:s,liveFired:o}),(c||u).apply(s,[r].concat(i.call(arguments,1)))):void 0}),y(o,t,u,a,n,l||c)}))},e.fn.off=function(t,n,i){var a=this;return t&&!s(t)?(e.each(t,function(t,e){a.off(t,n,e)}),a):(s(n)||o(i)||i===!1||(i=n,n=r),i===!1&&(i=E),a.each(function(){x(this,t,i,n)}))},e.fn.trigger=function(t,n){return t=s(t)||e.isPlainObject(t)?e.Event(t):T(t),t._args=n,this.each(function(){t.type in c&&"function"==typeof this[t.type]?this[t.type]():"dispatchEvent"in this?this.dispatchEvent(t):e(this).triggerHandler(t,n)})},e.fn.triggerHandler=function(t,n){var r,i;return this.each(function(o,a){r=S(s(t)?e.Event(t):t),r._args=n,r.target=a,e.each(p(a,t.type||t),function(t,e){return i=e.proxy(r),r.isImmediatePropagationStopped()?!1:void 0})}),i},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(t){e.fn[t]=function(e){return 0 in arguments?this.bind(t,e):this.trigger(t)}}),e.Event=function(t,e){s(t)||(e=t,t=e.type);var n=document.createEvent(u[t]||"Events"),r=!0;if(e)for(var i in e)"bubbles"==i?r=!!e[i]:n[i]=e[i];return n.initEvent(t,r,!0),T(n)}}(e),function(e){function p(t,n,r){var i=e.Event(n);return e(t).trigger(i,r),!i.isDefaultPrevented()}function d(t,e,n,i){return t.global?p(e||r,n,i):void 0}function m(t){t.global&&0===e.active++&&d(t,null,"ajaxStart")}function g(t){t.global&&!--e.active&&d(t,null,"ajaxStop")}function v(t,e){var n=e.context;return e.beforeSend.call(n,t,e)===!1||d(e,n,"ajaxBeforeSend",[t,e])===!1?!1:void d(e,n,"ajaxSend",[t,e])}function y(t,e,n,r){var i=n.context,o="success";n.success.call(i,t,o,e),r&&r.resolveWith(i,[t,o,e]),d(n,i,"ajaxSuccess",[e,n,t]),b(o,e,n)}function x(t,e,n,r,i){var o=r.context;r.error.call(o,n,e,t),i&&i.rejectWith(o,[n,e,t]),d(r,o,"ajaxError",[n,r,t||e]),b(e,n,r)}function b(t,e,n){var r=n.context;n.complete.call(r,e,t),d(n,r,"ajaxComplete",[e,n]),g(n)}function E(t,e,n){if(n.dataFilter==j)return t;var r=n.context;return n.dataFilter.call(r,t,e)}function j(){}function w(t){return t&&(t=t.split(";",2)[0]),t&&(t==c?"html":t==f?"json":a.test(t)?"script":u.test(t)&&"xml")||"text"}function T(t,e){return""==e?t:(t+"&"+e).replace(/[&?]{1,2}/,"?")}function S(t){t.processData&&t.data&&"string"!=e.type(t.data)&&(t.data=e.param(t.data,t.traditional)),!t.data||t.type&&"GET"!=t.type.toUpperCase()&&"jsonp"!=t.dataType||(t.url=T(t.url,t.data),t.data=void 0)}function C(t,n,r,i){return e.isFunction(n)&&(i=r,r=n,n=void 0),e.isFunction(r)||(i=r,r=void 0),{url:t,data:n,success:r,dataType:i}}function O(t,n,r,i){var o,s=e.isArray(n),a=e.isPlainObject(n);e.each(n,function(n,u){o=e.type(u),i&&(n=r?i:i+"["+(a||"object"==o||"array"==o?n:"")+"]"),!i&&s?t.add(u.name,u.value):"array"==o||!r&&"object"==o?O(t,u,r,n):t.add(n,u)})}var i,o,n=+new Date,r=t.document,s=/)<[^<]*)*<\/script>/gi,a=/^(?:text|application)\/javascript/i,u=/^(?:text|application)\/xml/i,f="application/json",c="text/html",l=/^\s*$/,h=r.createElement("a");h.href=t.location.href,e.active=0,e.ajaxJSONP=function(i,o){if(!("type"in i))return e.ajax(i);var c,p,s=i.jsonpCallback,a=(e.isFunction(s)?s():s)||"Zepto"+n++,u=r.createElement("script"),f=t[a],l=function(t){e(u).triggerHandler("error",t||"abort")},h={abort:l};return o&&o.promise(h),e(u).on("load error",function(n,r){clearTimeout(p),e(u).off().remove(),"error"!=n.type&&c?y(c[0],h,i,o):x(null,r||"error",h,i,o),t[a]=f,c&&e.isFunction(f)&&f(c[0]),f=c=void 0}),v(h,i)===!1?(l("abort"),h):(t[a]=function(){c=arguments},u.src=i.url.replace(/\?(.+)=\?/,"?$1="+a),r.head.appendChild(u),i.timeout>0&&(p=setTimeout(function(){l("timeout")},i.timeout)),h)},e.ajaxSettings={type:"GET",beforeSend:j,success:j,error:j,complete:j,context:null,global:!0,xhr:function(){return new t.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:f,xml:"application/xml, text/xml",html:c,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0,dataFilter:j},e.ajax=function(n){var u,f,s=e.extend({},n||{}),a=e.Deferred&&e.Deferred();for(i in e.ajaxSettings)void 0===s[i]&&(s[i]=e.ajaxSettings[i]);m(s),s.crossDomain||(u=r.createElement("a"),u.href=s.url,u.href=u.href,s.crossDomain=h.protocol+"//"+h.host!=u.protocol+"//"+u.host),s.url||(s.url=t.location.toString()),(f=s.url.indexOf("#"))>-1&&(s.url=s.url.slice(0,f)),S(s);var c=s.dataType,p=/\?.+=\?/.test(s.url);if(p&&(c="jsonp"),s.cache!==!1&&(n&&n.cache===!0||"script"!=c&&"jsonp"!=c)||(s.url=T(s.url,"_="+Date.now())),"jsonp"==c)return p||(s.url=T(s.url,s.jsonp?s.jsonp+"=?":s.jsonp===!1?"":"callback=?")),e.ajaxJSONP(s,a);var P,d=s.accepts[c],g={},b=function(t,e){g[t.toLowerCase()]=[t,e]},C=/^([\w-]+:)\/\//.test(s.url)?RegExp.$1:t.location.protocol,N=s.xhr(),O=N.setRequestHeader;if(a&&a.promise(N),s.crossDomain||b("X-Requested-With","XMLHttpRequest"),b("Accept",d||"*/*"),(d=s.mimeType||d)&&(d.indexOf(",")>-1&&(d=d.split(",",2)[0]),N.overrideMimeType&&N.overrideMimeType(d)),(s.contentType||s.contentType!==!1&&s.data&&"GET"!=s.type.toUpperCase())&&b("Content-Type",s.contentType||"application/x-www-form-urlencoded"),s.headers)for(o in s.headers)b(o,s.headers[o]);if(N.setRequestHeader=b,N.onreadystatechange=function(){if(4==N.readyState){N.onreadystatechange=j,clearTimeout(P);var t,n=!1;if(N.status>=200&&N.status<300||304==N.status||0==N.status&&"file:"==C){if(c=c||w(s.mimeType||N.getResponseHeader("content-type")),"arraybuffer"==N.responseType||"blob"==N.responseType)t=N.response;else{t=N.responseText;try{t=E(t,c,s),"script"==c?(1,eval)(t):"xml"==c?t=N.responseXML:"json"==c&&(t=l.test(t)?null:e.parseJSON(t))}catch(r){n=r}if(n)return x(n,"parsererror",N,s,a)}y(t,N,s,a)}else x(N.statusText||null,N.status?"error":"abort",N,s,a)}},v(N,s)===!1)return N.abort(),x(null,"abort",N,s,a),N;var A="async"in s?s.async:!0;if(N.open(s.type,s.url,A,s.username,s.password),s.xhrFields)for(o in s.xhrFields)N[o]=s.xhrFields[o];for(o in g)O.apply(N,g[o]);return s.timeout>0&&(P=setTimeout(function(){N.onreadystatechange=j,N.abort(),x(null,"timeout",N,s,a)},s.timeout)),N.send(s.data?s.data:null),N},e.get=function(){return e.ajax(C.apply(null,arguments))},e.post=function(){var t=C.apply(null,arguments);return t.type="POST",e.ajax(t)},e.getJSON=function(){var t=C.apply(null,arguments);return t.dataType="json",e.ajax(t)},e.fn.load=function(t,n,r){if(!this.length)return this;var a,i=this,o=t.split(/\s/),u=C(t,n,r),f=u.success;return o.length>1&&(u.url=o[0],a=o[1]),u.success=function(t){i.html(a?e("
            ").html(t.replace(s,"")).find(a):t),f&&f.apply(i,arguments)},e.ajax(u),this};var N=encodeURIComponent;e.param=function(t,n){var r=[];return r.add=function(t,n){e.isFunction(n)&&(n=n()),null==n&&(n=""),this.push(N(t)+"="+N(n))},O(r,t,n),r.join("&").replace(/%20/g,"+")}}(e),function(t){t.fn.serializeArray=function(){var e,n,r=[],i=function(t){return t.forEach?t.forEach(i):void r.push({name:e,value:t})};return this[0]&&t.each(this[0].elements,function(r,o){n=o.type,e=o.name,e&&"fieldset"!=o.nodeName.toLowerCase()&&!o.disabled&&"submit"!=n&&"reset"!=n&&"button"!=n&&"file"!=n&&("radio"!=n&&"checkbox"!=n||o.checked)&&i(t(o).val())}),r},t.fn.serialize=function(){var t=[];return this.serializeArray().forEach(function(e){t.push(encodeURIComponent(e.name)+"="+encodeURIComponent(e.value))}),t.join("&")},t.fn.submit=function(e){if(0 in arguments)this.bind("submit",e);else if(this.length){var n=t.Event("submit");this.eq(0).trigger(n),n.isDefaultPrevented()||this.get(0).submit()}return this}}(e),function(){try{getComputedStyle(void 0)}catch(e){var n=getComputedStyle;t.getComputedStyle=function(t,e){try{return n(t,e)}catch(r){return null}}}}(),e}); \ No newline at end of file diff --git a/Yangcai365_design/manage/zinc/module/xmSelect/xm-select.js b/Yangcai365_design/manage/zinc/module/xmSelect/xm-select.js new file mode 100644 index 0000000..c8257a9 --- /dev/null +++ b/Yangcai365_design/manage/zinc/module/xmSelect/xm-select.js @@ -0,0 +1,8 @@ +/*! + * @Title: xm-select + * @Version: 1.1.9 + * @Description:基于layui的多选解决方案 + * @Site: https://gitee.com/maplemei/xm-select + * @Author: maplemei + * @License:Apache License 2.0 + */!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="./",n(n.s=213)}({104:function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,o=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(e,t){var r,i=t.trim().replace(/^"(.*)"$/,(function(e,t){return t})).replace(/^'(.*)'$/,(function(e,t){return t}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i)?e:(r=0===i.indexOf("//")?i:0===i.indexOf("/")?n+i:o+i.replace(/^\.\//,""),"url("+JSON.stringify(r)+")")}))}},213:function(e,t,n){"use strict";n.r(t),function(e){n(215),n(216),n(218);var t=n(65);window.addEventListener("click",(function(){Object.keys(t.b).forEach((function(e){var n=t.b[e];n&&n.closed&&n.closed()}))})),"object"===("undefined"==typeof exports?"undefined":_typeof(exports))?e.exports=t.c:"function"==typeof define&&n(220)?define(xmSelect):window.layui&&layui.define&&layui.define((function(e){e("xmSelect",t.c)})),window.xmSelect=t.c}.call(this,n(214)(e))},214:function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},215:function(e,t){Array.prototype.map||(Array.prototype.map=function(e,t){var n,o,r,i=Object(this),l=i.length>>>0;for(t&&(n=t),o=new Array(l),r=0;r>>0;if("function"!=typeof e)throw new TypeError(e+" is not a function");for(arguments.length>1&&(n=t),o=0;o>>0;if("function"!=typeof e)throw new TypeError;for(var o=[],r=arguments[1],i=0;i>>0,r=arguments[1],i=0;i .xm-tips {\n color: #999999;\n padding: 0 10px;\n position: absolute;\n display: flex;\n height: 100%;\n align-items: center;\n}\nxm-select > .xm-icon {\n display: inline-block;\n overflow: hidden;\n position: absolute;\n width: 0;\n height: 0;\n right: 10px;\n top: 50%;\n margin-top: -3px;\n cursor: pointer;\n border: 6px dashed transparent;\n border-top-color: #C2C2C2;\n border-top-style: solid;\n transition: all 0.3s;\n -webkit-transition: all 0.3s;\n}\nxm-select > .xm-icon-expand {\n margin-top: -9px;\n transform: rotate(180deg);\n}\nxm-select > .xm-label.single-row {\n position: absolute;\n top: 0;\n bottom: 0px;\n left: 0px;\n right: 30px;\n overflow: auto hidden;\n}\nxm-select > .xm-label.single-row .scroll {\n overflow-y: hidden;\n}\nxm-select > .xm-label.single-row .label-content {\n flex-wrap: nowrap;\n}\nxm-select > .xm-label.auto-row .label-content {\n flex-wrap: wrap;\n}\nxm-select > .xm-label.auto-row .xm-label-block > span {\n white-space: unset;\n height: 100%;\n}\nxm-select > .xm-label .scroll .label-content {\n display: flex;\n padding: 3px 30px 3px 10px;\n}\nxm-select > .xm-label .xm-label-block {\n display: flex;\n position: relative;\n padding: 0px 5px;\n margin: 2px 5px 2px 0;\n border-radius: 3px;\n align-items: baseline;\n color: #FFF;\n}\nxm-select > .xm-label .xm-label-block > span {\n display: flex;\n color: #FFF;\n white-space: nowrap;\n}\nxm-select > .xm-label .xm-label-block > i {\n color: #FFF;\n margin-left: 8px;\n font-size: 12px;\n cursor: pointer;\n display: flex;\n}\nxm-select > .xm-label .xm-label-block.disabled {\n background-color: #C2C2C2 !important;\n cursor: no-drop !important;\n}\nxm-select > .xm-label .xm-label-block.disabled > i {\n cursor: no-drop !important;\n}\nxm-select > .xm-body {\n position: absolute;\n left: 0;\n top: 42px;\n padding: 5px 0;\n z-index: 999;\n width: 100%;\n min-width: fit-content;\n border: 1px solid #E6E6E6;\n background-color: #fff;\n border-radius: 2px;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);\n animation-name: xm-upbit;\n animation-duration: 0.3s;\n animation-fill-mode: both;\n}\nxm-select > .xm-body .scroll-body {\n overflow-x: hidden;\n overflow-y: auto;\n}\nxm-select > .xm-body .scroll-body::-webkit-scrollbar {\n width: 8px;\n}\nxm-select > .xm-body .scroll-body::-webkit-scrollbar-track {\n -webkit-border-radius: 2em;\n -moz-border-radius: 2em;\n -ms-border-radius: 2em;\n border-radius: 2em;\n background-color: #FFF;\n}\nxm-select > .xm-body .scroll-body::-webkit-scrollbar-thumb {\n -webkit-border-radius: 2em;\n -moz-border-radius: 2em;\n -ms-border-radius: 2em;\n border-radius: 2em;\n background-color: #C2C2C2;\n}\nxm-select > .xm-body.up {\n top: auto;\n bottom: 42px;\n}\nxm-select > .xm-body.relative {\n position: relative;\n display: block !important;\n top: 0;\n box-shadow: none;\n border: none;\n animation-name: none;\n animation-duration: 0;\n min-width: 100%;\n}\nxm-select > .xm-body .xm-group {\n cursor: default;\n}\nxm-select > .xm-body .xm-group-item {\n display: inline-block;\n cursor: pointer;\n padding: 0 10px;\n color: #999;\n font-size: 12px;\n}\nxm-select > .xm-body .xm-option {\n display: flex;\n align-items: center;\n position: relative;\n padding: 0 10px;\n cursor: pointer;\n}\nxm-select > .xm-body .xm-option-icon {\n color: transparent;\n display: flex;\n border: 1px solid #E6E6E6;\n border-radius: 3px;\n justify-content: center;\n align-items: center;\n}\nxm-select > .xm-body .xm-option-icon.xm-icon-danx {\n border-radius: 100%;\n}\nxm-select > .xm-body .xm-option-content {\n display: flex;\n position: relative;\n padding-left: 15px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n color: #666;\n width: calc(100% - 20px);\n}\nxm-select > .xm-body .xm-option.hide-icon .xm-option-content {\n padding-left: 0;\n}\nxm-select > .xm-body .xm-option.selected.hide-icon .xm-option-content {\n color: #FFF !important;\n}\nxm-select > .xm-body .xm-option .loader {\n width: 0.8em;\n height: 0.8em;\n margin-right: 6px;\n color: #C2C2C2;\n}\nxm-select > .xm-body .xm-select-empty {\n text-align: center;\n color: #999;\n}\nxm-select > .xm-body .disabled {\n cursor: no-drop;\n}\nxm-select > .xm-body .disabled:hover {\n background-color: #FFF;\n}\nxm-select > .xm-body .disabled .xm-option-icon {\n border-color: #C2C2C2 !important;\n}\nxm-select > .xm-body .disabled .xm-option-content {\n color: #C2C2C2 !important;\n}\nxm-select > .xm-body .disabled.selected > .xm-option-icon {\n color: #C2C2C2 !important;\n}\nxm-select > .xm-body .xm-search {\n background-color: #FFF !important;\n position: relative;\n padding: 0 10px;\n margin-bottom: 5px;\n cursor: pointer;\n}\nxm-select > .xm-body .xm-search > i {\n position: absolute;\n color: #666;\n}\nxm-select > .xm-body .xm-search-input {\n border: none;\n border-bottom: 1px solid #E6E6E6;\n padding-left: 27px;\n cursor: text;\n}\nxm-select > .xm-body .xm-paging {\n padding: 0 10px;\n display: flex;\n margin-top: 5px;\n}\nxm-select > .xm-body .xm-paging > span:first-child {\n border-radius: 2px 0 0 2px;\n}\nxm-select > .xm-body .xm-paging > span:last-child {\n border-radius: 0 2px 2px 0;\n}\nxm-select > .xm-body .xm-paging > span {\n display: flex;\n flex: auto;\n justify-content: center;\n vertical-align: middle;\n margin: 0 -1px 0 0;\n background-color: #fff;\n color: #333;\n font-size: 12px;\n border: 1px solid #e2e2e2;\n flex-wrap: nowrap;\n width: 100%;\n overflow: hidden;\n min-width: 50px;\n}\nxm-select > .xm-body .xm-toolbar {\n padding: 0 10px;\n display: flex;\n margin: -3px 0;\n cursor: default;\n}\nxm-select > .xm-body .xm-toolbar .toolbar-tag {\n cursor: pointer;\n display: flex;\n margin-right: 20px;\n color: #666;\n align-items: baseline;\n}\nxm-select > .xm-body .xm-toolbar .toolbar-tag:hover {\n opacity: 0.8;\n}\nxm-select > .xm-body .xm-toolbar .toolbar-tag:active {\n opacity: 1;\n}\nxm-select > .xm-body .xm-toolbar .toolbar-tag > i {\n margin-right: 2px;\n font-size: 14px;\n}\nxm-select > .xm-body .xm-toolbar .toolbar-tag:last-child {\n margin-right: 0;\n}\nxm-select > .xm-body .xm-body-custom {\n line-height: initial;\n cursor: default;\n}\nxm-select > .xm-body .xm-body-custom * {\n box-sizing: initial;\n}\nxm-select > .xm-body .xm-tree {\n position: relative;\n}\nxm-select > .xm-body .xm-tree-icon {\n display: inline-block;\n margin-right: 3px;\n cursor: pointer;\n border: 6px dashed transparent;\n border-left-color: #C2C2C2;\n border-left-style: solid;\n transition: all 0.3s;\n -webkit-transition: all 0.3s;\n z-index: 2;\n visibility: hidden;\n}\nxm-select > .xm-body .xm-tree-icon.expand {\n margin-top: 3px;\n margin-right: 5px;\n margin-left: -2px;\n transform: rotate(90deg);\n}\nxm-select > .xm-body .xm-tree-icon.xm-visible {\n visibility: visible;\n}\nxm-select > .xm-body .xm-tree .left-line {\n position: absolute;\n left: 13px;\n width: 0;\n z-index: 1;\n border-left: 1px dotted #c0c4cc !important;\n}\nxm-select > .xm-body .xm-tree .top-line {\n position: absolute;\n left: 13px;\n height: 0;\n z-index: 1;\n border-top: 1px dotted #c0c4cc !important;\n}\nxm-select > .xm-body .xm-tree .xm-tree-icon + .top-line {\n margin-left: 1px;\n}\nxm-select > .xm-body .scroll-body > .xm-tree > .xm-option > .top-line,\nxm-select > .xm-body .scroll-body > .xm-option > .top-line {\n width: 0 !important;\n}\nxm-select > .xm-body .xm-cascader-box {\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n padding: 5px 0;\n border: 1px solid #E6E6E6;\n background-color: #fff;\n border-radius: 2px;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);\n margin: -1px;\n}\nxm-select > .xm-body .xm-cascader-box::before {\n content: ' ';\n position: absolute;\n width: 0;\n height: 0;\n border: 6px solid transparent;\n border-right-color: #E6E6E6;\n top: 10px;\n left: -12px;\n}\nxm-select > .xm-body .xm-cascader-box::after {\n content: ' ';\n position: absolute;\n width: 0;\n height: 0;\n border: 6px solid transparent;\n border-right-color: #fff;\n top: 10px;\n left: -11px;\n}\nxm-select > .xm-body .xm-cascader-scroll {\n height: 100%;\n overflow-x: hidden;\n overflow-y: auto;\n}\nxm-select > .xm-body.cascader {\n width: unset;\n min-width: unset;\n}\nxm-select > .xm-body.cascader .xm-option-content {\n padding-left: 8px;\n}\nxm-select > .xm-body.cascader .disabled .xm-right-arrow {\n color: #C2C2C2 !important;\n}\nxm-select .xm-input {\n cursor: pointer;\n border-radius: 2px;\n border-width: 1px;\n border-style: solid;\n border-color: #E6E6E6;\n display: block;\n width: 100%;\n box-sizing: border-box;\n background-color: #FFF;\n line-height: 1.3;\n padding-left: 10px;\n outline: 0;\n user-select: text;\n -ms-user-select: text;\n -moz-user-select: text;\n -webkit-user-select: text;\n}\nxm-select .dis {\n display: none;\n}\nxm-select .loading {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(255, 255, 255, 0.6);\n display: flex;\n align-items: center;\n justify-content: center;\n}\nxm-select .loader {\n border: 0.2em dotted currentcolor;\n border-radius: 50%;\n -webkit-animation: 1s loader linear infinite;\n animation: 1s loader linear infinite;\n display: inline-block;\n width: 1em;\n height: 1em;\n color: inherit;\n vertical-align: middle;\n pointer-events: none;\n}\nxm-select .xm-select-default {\n position: absolute;\n width: 100%;\n height: 100%;\n border: none;\n visibility: hidden;\n}\nxm-select .xm-select-disabled {\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n cursor: no-drop;\n z-index: 2;\n opacity: 0.3;\n background-color: #FFF;\n}\nxm-select .item--divided {\n border-top: 1px solid #ebeef5;\n width: calc(100% - 20px);\n cursor: initial;\n}\nxm-select .xm-right-arrow {\n position: absolute;\n color: #666;\n right: 5px;\n top: -1px;\n font-weight: 700;\n transform: scale(0.6, 1);\n}\nxm-select .xm-right-arrow::after {\n content: '>';\n}\nxm-select[size='large'] {\n min-height: 40px;\n line-height: 40px;\n}\nxm-select[size='large'] .xm-input {\n height: 40px;\n}\nxm-select[size='large'] .xm-label .scroll .label-content {\n line-height: 34px;\n}\nxm-select[size='large'] .xm-label .xm-label-block {\n height: 30px;\n line-height: 30px;\n}\nxm-select[size='large'] .xm-body .xm-option .xm-option-icon {\n height: 20px;\n width: 20px;\n font-size: 20px;\n}\nxm-select[size='large'] .xm-paging > span {\n height: 34px;\n line-height: 34px;\n}\nxm-select[size='large'] .xm-tree .left-line {\n height: 100%;\n bottom: 20px;\n}\nxm-select[size='large'] .xm-tree .left-line-group {\n height: calc(100% - 40px);\n}\nxm-select[size='large'] .xm-tree .xm-tree-icon.xm-hidden + .top-line {\n top: 19px;\n}\nxm-select[size='large'] .item--divided {\n margin: 10px;\n}\nxm-select {\n min-height: 36px;\n line-height: 36px;\n}\nxm-select .xm-input {\n height: 36px;\n}\nxm-select .xm-label .scroll .label-content {\n line-height: 30px;\n}\nxm-select .xm-label .xm-label-block {\n height: 26px;\n line-height: 26px;\n}\nxm-select .xm-body .xm-option .xm-option-icon {\n height: 18px;\n width: 18px;\n font-size: 18px;\n}\nxm-select .xm-paging > span {\n height: 30px;\n line-height: 30px;\n}\nxm-select .xm-tree .left-line {\n height: 100%;\n bottom: 18px;\n}\nxm-select .xm-tree .left-line-group {\n height: calc(100% - 36px);\n}\nxm-select .xm-tree .xm-tree-icon.xm-hidden + .top-line {\n top: 17px;\n}\nxm-select .item--divided {\n margin: 9px;\n}\nxm-select[size='small'] {\n min-height: 32px;\n line-height: 32px;\n}\nxm-select[size='small'] .xm-input {\n height: 32px;\n}\nxm-select[size='small'] .xm-label .scroll .label-content {\n line-height: 26px;\n}\nxm-select[size='small'] .xm-label .xm-label-block {\n height: 22px;\n line-height: 22px;\n}\nxm-select[size='small'] .xm-body .xm-option .xm-option-icon {\n height: 16px;\n width: 16px;\n font-size: 16px;\n}\nxm-select[size='small'] .xm-paging > span {\n height: 26px;\n line-height: 26px;\n}\nxm-select[size='small'] .xm-tree .left-line {\n height: 100%;\n bottom: 16px;\n}\nxm-select[size='small'] .xm-tree .left-line-group {\n height: calc(100% - 32px);\n}\nxm-select[size='small'] .xm-tree .xm-tree-icon.xm-hidden + .top-line {\n top: 15px;\n}\nxm-select[size='small'] .item--divided {\n margin: 8px;\n}\nxm-select[size='mini'] {\n min-height: 28px;\n line-height: 28px;\n}\nxm-select[size='mini'] .xm-input {\n height: 28px;\n}\nxm-select[size='mini'] .xm-label .scroll .label-content {\n line-height: 22px;\n}\nxm-select[size='mini'] .xm-label .xm-label-block {\n height: 18px;\n line-height: 18px;\n}\nxm-select[size='mini'] .xm-body .xm-option .xm-option-icon {\n height: 14px;\n width: 14px;\n font-size: 14px;\n}\nxm-select[size='mini'] .xm-paging > span {\n height: 22px;\n line-height: 22px;\n}\nxm-select[size='mini'] .xm-tree .left-line {\n height: 100%;\n bottom: 14px;\n}\nxm-select[size='mini'] .xm-tree .left-line-group {\n height: calc(100% - 28px);\n}\nxm-select[size='mini'] .xm-tree .xm-tree-icon.xm-hidden + .top-line {\n top: 13px;\n}\nxm-select[size='mini'] .item--divided {\n margin: 7px;\n}\n.layui-form-pane xm-select {\n margin: -1px -1px -1px 0;\n}\n",""])},218:function(e,t,n){var o=n(219);"string"==typeof o&&(o=[[e.i,o,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};n(27)(o,r);o.locals&&(e.exports=o.locals)},219:function(e,t,n){(e.exports=n(26)(!1)).push([e.i,'@font-face {\n font-family: "xm-iconfont";\n src: url(\'//at.alicdn.com/t/font_792691_ptvyboo0bno.eot?t=1574048839056\');\n /* IE9 */\n src: url(\'//at.alicdn.com/t/font_792691_ptvyboo0bno.eot?t=1574048839056#iefix\') format(\'embedded-opentype\'), /* IE6-IE8 */ url(\'data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAksAAsAAAAAEYAAAAjeAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCEUgqTXI8lATYCJAM0CxwABCAFhG0HgTwbZQ4jEbaCkVIj+4sD3sS6BFAp9ka91ulVG4leTC/+h+3V+zyRYCTyREKkcZ+D5/u137lPdveLGJBMunoiNPOQPBMq0/FQtEKIkMRDZng69d+hOiQumAr7bJdBOEzMTU77s78mhbI58aCg7ebCs4LBTgCk+cD/4ZqWUHebipp7al3tyKOjwCV/hVyw9PdzaktxI7IMQs26/1N8gV4DI0bVut3UhCaflGGgwM3oTXg1IfRMbCsmrEnriJVeYM2eXHII4KdMMzL4OoACHgZBCTasITcReDUBE8kWPLMTCGoQaDV+eKpUPQI49r8vP6BTPIDCaiBSml3oOQX0voNPebv/u2P0AUfP1w0s5EADzYBZsNdByylo2eVq/NtRdgFpovQR5x2CIwmIZeik6/u0T/m/A7RJP00sCmmyksj/kwc+LC5BFBqDEMDDjwPiANDB9MpJTXwHmsO3YyBwWDA4OFwwJLRcRgAOBUYMDg0mHRwGTAYozsV0AgWYruDwwExDHfzwKWf4OurQ9jzQDtoF+wpistfBfluQ5bQiiJa4ZQoKhShLiMayBbyg05AIkYBoIBJEEApQy/FwYv4HchADIUBXl61dW6mpwIgyp7p8PrHddieSjhY9oqTxyPB/FGNYDklpfYh8VtaoqSgb0bKoGB17CuVUp9Ll2nS2UpNGMSw9hyirA7C6+QLyByIQS0sSSmxvArC5odZmYZMxZSiBR5OkQl0uiufxMH5eL8t3u0d4XKyuq6EMdcpNe2+oXA8p9yPa+4T1PM7+A54tc7tpl2vcAHAftnhZj2chy1CyaCRFsyMqQ5nkNnskEt2yxxZinPsOZjFm4+XWvKqLkfCGS1k4MNP82isxSMf7ZsGYvQVCNAeSSVtzWCxRdXGxyZlA2CvCEevuO7y9M2z2NWH8icydzq/qAJSp1lGvDWFp6Nw3xChJowPD+76nU+upQk6Kw9jI0Rgym9Ct8VlxMI3CSIaDCZja5tDYt0/EYra4tn0Kp3v8Rdezk8svcy1mKhoSvNcZz3LKlUe777Gmval0s7bzAc0k13LGk896V9DuvNn34N0ebKgItkQgOomuJtgQPChNI4cwa7CEWCvfk5QjJFlem6i3SfVShWi5LTFRG+JwdCNpSqbpRFwrtb1TbcRkJi/AbJJQOmfCdnswLNGVM7qqSRO1zO0Q0j5Vr3cYQ07HB0MX6KoIZhx+D9Djs2C5bXtVwvbgJHtSCIL7hjFJme4sZDdS5IlJdKUO1Qt8opn0trBafz3AX933kmCRgyMEWGZjMAkRKhwmIHJGR4ruwFCdWKYzrap2R/mvd2UKajzRAZu88pGAD90Y+02kTFCKrBSXwGGJ3wRcPCdIppTxSmHOfESRwIli0S5J/8AYDCxTGh4XZua4xvfvGx320rDK2qA8g5FlS7pWNLx71+BwgA/KZ5I0aeKmNeCNoNPl8qNHu8uHHzqaKc86fHi4vPuRI4ny+I/vjxw+clh4HXVCFvVnVFx07EHZwVhSRliTTMWSEi0h6YuS6DxCRmiin0B3L4ry6cvR0ijYexFdBL3wGQM0YOrUAZCBkLOBBtQ+xdk7omfgUv+u++admyUeXduyxLM+r/+49rPfhgEZor6GymToNYksNsZyC7ntwAH0928UpgMpxpF0ydNlsMMBw7QsxTCmu0Hf3F+/+vb99Yumhb+e9R0LBNm+4O+hu7lQ5bGjI9j5G88qQ5SLFyuEC7cwd25xoYo2j4eA4bhpM7TZhPtmc+uhVEVSMYXLWh0bfjI8dvUpvDUocPZmU4kwwOfc83wB5wPehrpD3waApbwW+fgRrZXcxw+mB/3woZT+8JFMYwRMIy2k/18qhqcKpjYeYSnIACaUoRDu0e3kQFh98R5fiI8oJqwwGZSJDSbehLzZs7zIeWTQ4UGOIs2c4j2/Q/tn7n7j9juO33On6WhURCT/wO6Y3QdmWFY0Ef6JUeGRggO7ZbtaZlh5RYKWXbLPBLc3l/5h4A0mu3ZXTZ+u6t6VHMAzZhxak50T+24NnRuaOmehRkXlqVR5lIpuwezUUDUdCuJysv8Z/0/8uNE1s7jIJIubFWnI/x7g4nAZx79yYpFoAOU3a9iwT1O/GxUxPY0ljVPv9EukI3qNrl/So2YfzasqHCroNjS0+w0tlPlsYfC6v/01ixquizJH1Kd/VK+OS3iS3rTJWmqsMPdU3B3oFyC9RSumWE/0gG36IjTysfH51IJ/5oOgNYu6p4yb5Fdufhr/Kjtu0oSyYP/WJQrz35aNFnMhtFcwb55NlNnH8Wdu1b+XZA9zqlZrhdPo/V3uBhiUlQ66h0LhbAmFYIncdFOpVMh6Fl7peqy5Z2ZdQBITO2x1Asj1dRFjIBMC3hbuUh8Ooc4W03EjAdo8UL/t0oUfyU8630bmMcw/vqDNAsC9BQD4OqCgH+ljy0UhJB8AAJA+8EmArxk5gnRLik90AElf8rBm+IMvBTWnucb3+0o0ARk+r0ZBv8sU01nnSmP45/H8Dp8C8X+iE9e+ZvXymK/sQJ5/DuqhYKebPnKmPqLYuDcIMWS2/Rjxp2s8Do821LVn6A/xMK1RKvBLK5gyDsZ5uQ6bYusmx2yqLFe4lECHDPcFhojmckuAbnCI6Cn308RI6AAJdtCICQLQyBHKhSgX5YowN6BBPIEB8VxuSfNncpAuutzPnCSiDHDEo+DsKQBPoJi4MpRktepIs2zjO5h84IEMM3ffECKSZU1ZHxfewEI4h494MuuUNNOBjuw18QKHAzEXaAcylS3m3baq9MpnKenYmfEUgCdbXTHEtTVKsvruNGv9/DuYfOAhcuKu9TeEiA9nNJTUDOUbbVkn3sv2eDJrEnVrpvcHOjJeqRsOcpYYLuxoBzKVtCOm3ZaKbtJcurw+e/zN6c7Pd6r4gqUo0WLEiiOueOITvwQkKCEJM9nO3F60y5HkqLhdqUyXZtK3lqwReQ+G40O92UhOt0x/KmKM+u7LTPMzoEBOCYtiUPfSjODiuFXjSDm2idzAoc4Tj9bs2eJYDOU7HQA=\') format(\'woff2\'), url(\'//at.alicdn.com/t/font_792691_ptvyboo0bno.woff?t=1574048839056\') format(\'woff\'), url(\'//at.alicdn.com/t/font_792691_ptvyboo0bno.ttf?t=1574048839056\') format(\'truetype\'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */ url(\'//at.alicdn.com/t/font_792691_ptvyboo0bno.svg?t=1574048839056#iconfont\') format(\'svg\');\n /* iOS 4.1- */\n}\n.xm-iconfont {\n font-family: "xm-iconfont" !important;\n font-size: 16px;\n font-style: normal;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n.xm-icon-quanxuan:before {\n content: "\\e62c";\n}\n.xm-icon-caidan:before {\n content: "\\e610";\n}\n.xm-icon-fanxuan:before {\n content: "\\e837";\n}\n.xm-icon-pifu:before {\n content: "\\e668";\n}\n.xm-icon-qingkong:before {\n content: "\\e63e";\n}\n.xm-icon-sousuo:before {\n content: "\\e600";\n}\n.xm-icon-danx:before {\n content: "\\e62b";\n}\n.xm-icon-duox:before {\n content: "\\e613";\n}\n.xm-icon-close:before {\n content: "\\e601";\n}\n.xm-icon-expand:before {\n content: "\\e641";\n}\n.xm-icon-banxuan:before {\n content: "\\e60d";\n}\n',""])},220:function(e,t){(function(t){e.exports=t}).call(this,{})},26:function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",o=e[3];if(!o)return n;if(t&&"function"==typeof btoa){var r=function(e){var t=btoa(unescape(encodeURIComponent(JSON.stringify(e)))),n="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(t);return"/*# ".concat(n," */")}(o),i=o.sources.map((function(e){return"/*# sourceURL=".concat(o.sourceRoot).concat(e," */")}));return[n].concat(i).concat([r]).join("\n")}return[n].join("\n")}(t,e);return t[2]?"@media ".concat(t[2],"{").concat(n,"}"):n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var o={},r=0;r=0&&p.splice(t,1)}function x(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var o=function(){0;return n.nc}();o&&(e.attrs.nonce=o)}return y(t,e.attrs),m(e,t),t}function y(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function v(e,t){var n,o,r,i;if(t.transform&&e.css){if(!(i="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=i}if(t.singleton){var l=u++;n=c||(c=x(t)),o=w.bind(null,n,l,!1),r=w.bind(null,n,l,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",y(t,e.attrs),m(e,t),t}(t),o=C.bind(null,n,t),r=function(){b(n),n.href&&URL.revokeObjectURL(n.href)}):(n=x(t),o=k.bind(null,n),r=function(){b(n)});return o(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;o(e=t)}else r()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=l()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=h(e,t);return f(n,t),function(e){for(var o=[],r=0;r3)for(n=[n],o=3;or?n-r:r,l=this.labelRef.scrollLeft+e.deltaY;l<0&&(l=0),l>i&&(l=i),this.labelRef.scrollLeft=l}}},{key:"componentDidMount",value:function(){this.labelRef.addEventListener&&this.labelRef.addEventListener("DOMMouseScroll",this.scrollFunc.bind(this),!1),this.labelRef.attachEvent&&this.labelRef.attachEvent("onmousewheel",this.scrollFunc.bind(this)),this.labelRef.onmousewheel=this.scrollFunc.bind(this)}},{key:"render",value:function(e){var t=this,n=e.data,o=e.prop,r=e.theme,i=e.model,l=e.sels,a=e.autoRow,s=e.tree,c=o.name,p=o.disabled,d=i.label,h=d.type,m=d[h],b=l;s.show&&s.strict&&s.simple&&f(n,l,b=[],o);var x="",y=!0,v=b.map((function(e){return e[c]})).join(",");if("text"===h)x=b.map((function(e){return"".concat(m.left).concat(e[c]).concat(m.right)})).join(m.separator);else if("block"===h){y=!1;var g=Y(b),_={backgroundColor:r.color},w=m.showCount<=0?g.length:m.showCount;x=g.splice(0,w).map((function(e){var n={width:m.showIcon?"calc(100% - 20px)":"100%"};return O("div",{class:["xm-label-block",e[p]?"disabled":""].join(" "),style:_},m.template&&u(m.template)?O("span",{style:n,dangerouslySetInnerHTML:{__html:m.template(e,g)}}):O("span",{style:n},e[c]),m.showIcon&&O("i",{class:"xm-iconfont xm-icon-close",onClick:t.iconClick.bind(t,e,!0,e[p])}))})),g.length&&x.push(O("div",{class:"xm-label-block",style:_},"+ ",g.length))}else x=b.length&&m&&m.template?m.template(n,b):b.map((function(e){return e[c]})).join(",");return O("div",{class:["xm-label",a?"auto-row":"single-row"].join(" ")},O("div",{class:"scroll",ref:function(e){return t.labelRef=e}},y?O("div",{class:"label-content",dangerouslySetInnerHTML:{__html:x}}):O("div",{class:"label-content",title:v},x)))}}])&&Z(n.prototype,o),r&&Z(n,r),t}(E);function X(e){return(X="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function ee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function te(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:this.size;var e=this.state.pageIndex;e<=1||(this.changePageIndex(e-1),this.props.pageRemote&&this.postData(e-1,!0))}},{key:"pageNextClick",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.size,t=this.state.pageIndex;t>=e||(this.changePageIndex(t+1),this.props.pageRemote&&this.postData(t+1,!0))}},{key:"changePageIndex",value:function(e){this.setState({pageIndex:e})}},{key:"searchInput",value:function(e){var t=this,n=e.target.value;n!==this.__value&&(clearTimeout(this.searchCid),this.inputOver&&(this.__value=n,this.searchCid=setTimeout((function(){t.callback=!0,t.setState({filterValue:t.__value,remote:!0,pageIndex:1})}),this.props.delay)))}},{key:"focus",value:function(){this.searchInputRef&&this.searchInputRef.focus()}},{key:"blur",value:function(){this.searchInputRef&&this.searchInputRef.blur()}},{key:"handleComposition",value:function(e){var t=e.type;"compositionstart"===t?(this.inputOver=!1,clearTimeout(this.searchCid)):"compositionend"===t&&(this.inputOver=!0,this.searchInput(e))}},{key:"postData",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state.pageIndex,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(this.state.remote||n)&&(this.callback=!1,this.setState({loading:!0,remote:!1}),this.blur(),this.props.remoteMethod(this.state.filterValue,(function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;setTimeout((function(){e.focus(),e.callback=!0,e.setState({loading:!1,totalSize:n}),e.props.onReset(t,"data")}),10)}),this.props.show,t))}},{key:"keydown",value:function(e,t){var n=this,o=t.keyCode;"div"===e&&(27===o||9===o?this.props.onReset(!1,"close"):37===o?this.pagePrevClick():39===o&&this.pageNextClick());var r=this.props.prop,i=r.value,l=r.optgroup,a=r.disabled,s=this.tempData.filter((function(e){return!e[l]&&!e[a]})),c=s.length-1;if(-1!==c){var u=s.findIndex((function(e){return e[i]===n.state.val}));if(38===o){u<=0?u=c:u>0&&(u-=1);var p=s[u][i];this.setState({val:p})}else if(40===o){-1===u||u===c?u=0:uM&&(T=M),M>0&&T<=0&&(T=1),!v){var z=(T-1)*e.pageSize,L=z+e.pageSize;j=j.slice(z,L)}var V={cursor:"no-drop",color:"#d2d2d2"},F={},U={};T<=1&&(F=V),T==M&&(U=V),this.state.pageIndex!==T&&this.changePageIndex(T),this.size=M,D=O("div",{class:"xm-paging"},O("span",{style:F,onClick:this.pagePrevClick.bind(this,M)},"上一页"),O("span",null,this.state.pageIndex," / ",M),O("span",{style:U,onClick:this.pageNextClick.bind(this,M)},"下一页"))}else e.showCount>0&&(j=j.slice(0,e.showCount));var B,N=[],H={__tmp:!0};H[S]=!0,j.forEach((function(e){var t=I[e[w]];B&&!t&&(t=H),t!=B&&(B=t,t&&N.push(B)),N.push(e)})),j=N,t&&(t=y(this.state.filterValue,p([],j)))&&j.splice(0,0,function(e){for(var t=1;t0?l.length>=g?l:d(r.slice(0,g-l.length),l,i):d(r,c,i),n.props.onReset(a,"sels")}}:"CLEAR"===t?{icon:"xm-iconfont xm-icon-qingkong",name:r,method:function(e){n.props.onReset(c.filter((function(e){return e[i.disabled]})),"sels")}}:"REVERSE"===t?{icon:"xm-iconfont xm-icon-fanxuan",name:r,method:function(e){var t=i.optgroup,o=i.disabled,r=e.filter((function(e){return!e[t]})).filter((function(e){return!e[o]})),l=[];c.forEach((function(e){var t=r.findIndex((function(t){return t[w]===e[w]}));-1==t?l.push(e):r.splice(t,1)}));var a=l.filter((function(e){return e[i.disabled]})),u=[];u=s?a.length?a:r.slice(0,1):g>0?a.length>=g?a:d(r.slice(0,g-a.length),a,i):d(r,l,i),n.props.onReset(u,"sels")}}:t;var l=function(e){"mouseenter"===e.type&&(e.target.style.color=a.color),"mouseleave"===e.type&&(e.target.style.color="")};return O("div",{class:"toolbar-tag",style:{},onClick:function(){u(o.method)&&o.method(K),n.focus()},onMouseEnter:l,onMouseLeave:l},e.toolbar.showIcon&&O("i",{class:o.icon}),O("span",null,o.name))})).filter((function(e){return e}))),Y="hidden"!=e.model.icon;return(j=j.map((function(e){return e[S]?e.__tmp?O("div",{class:"item--divided"}):O("div",{class:"xm-group"},O("div",{class:"xm-group-item",onClick:n.groupClick.bind(n,e)},e[_])):function(e){var t=!!c.find((function(t){return t[w]==e[w]})),r=t?{color:a.color,border:"none"}:{borderColor:a.color},i={};e[w]===n.state.val&&(i.backgroundColor=a.hover),!Y&&t&&(i.backgroundColor=a.color,e[k]&&(i.backgroundColor="#C2C2C2"));var u=["xm-option",e[k]?" disabled":"",t?" selected":"",Y?"show-icon":"hide-icon"].join(" "),p=["xm-option-icon xm-iconfont",s?"xm-icon-danx":"xm-icon-duox"].join(" "),d=function(t){"mouseenter"===t.type&&(e[k]||n.setState({val:e[w]}))};return O("div",{class:u,style:i,value:e[w],onClick:n.optionClick.bind(n,e,t,e[k]),onMouseEnter:d,onMouseLeave:d},Y&&O("i",{class:p,style:r}),O("div",{class:"xm-option-content",dangerouslySetInnerHTML:{__html:l({data:o,item:e,arr:c,name:e[_],value:e[w]})}}))}(e)}))).length||(!e.pageEmptyShow&&(D=""),j.push(O("div",{class:"xm-select-empty"},f))),O("div",{onClick:this.blockClick,tabindex:"1",style:"outline: none;"},O("div",null,e.toolbar.show&&q,P,O("div",{class:"scroll-body",style:{maxHeight:e.height}},j),e.paging&&D),this.state.loading&&O("div",{class:"loading"},O("span",{class:"loader"})))}},{key:"componentDidMount",value:function(){var e=this.base.querySelector(".xm-search-input");e&&(e.addEventListener("compositionstart",this.handleComposition.bind(this)),e.addEventListener("compositionupdate",this.handleComposition.bind(this)),e.addEventListener("compositionend",this.handleComposition.bind(this)),e.addEventListener("input",this.searchInput.bind(this)),this.searchInputRef=e),this.base.addEventListener("keydown",this.keydown.bind(this,"div"))}},{key:"componentDidUpdate",value:function(){if(this.callback){this.callback=!1;var e=this.props.filterDone;u(e)&&e(this.state.filterValue,this.tempData||[])}}}])&&te(n.prototype,o),r&&te(n,r),t}(E);function ae(e){return(ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function se(e,t){for(var n=0;n0||f.lazy&&!1!==e.__node.loading)?"xm-visible":"xm-hidden"].join(" "),k=[];f.showFolderIcon&&(k.push(O("i",{class:_})),f.showLine&&(o&&k.push(O("i",{class:"left-line",style:{left:t-f.indent+3+"px"}})),k.push(O("i",{class:"top-line",style:{left:t-f.indent+3+"px",width:f.indent+(0===o?10:-2)+"px"}}))));var C=function(t){"mouseenter"===t.type&&(e[v]||n.setState({val:e[y]}))};return O("div",{class:m,style:h,value:e[y],onClick:n.optionClick.bind(n,e,r,e[v],"line"),onMouseEnter:C,onMouseLeave:C},k,e.__node.loading&&O("span",{class:"loader"}),w&&O("i",{class:b,style:d,onClick:n.optionClick.bind(n,e,r,e[v],"checkbox")}),O("div",{class:"xm-option-content",dangerouslySetInnerHTML:{__html:s({data:c,item:e,arr:i,name:e[x],value:e[y]})}}))};h&&(m?this.postData():this.filterData(c,this.state.filterValue));var C=p([],c),S=p([],i);this.tempData=C;var j=c.map((function(e){return function e(t,o){if(!t.__node.hidn){var r=t[g];if(o+=f.indent,r){var i=-1!==n.state.expandedKeys.findIndex((function(e){return t[y]===e}));return 0===r.length&&(i=!1),O("div",{class:"xm-tree"},f.showFolderIcon&&f.showLine&&i&&r.length>0&&O("i",{class:"left-line left-line-group",style:{left:o+3+"px"}}),k(t,o,0===r.length&&(!f.lazy||f.lazy&&!1===t.__node.loading)?0:i),i&&O("div",{class:"xm-tree-box"},r.map((function(t){return e(t,o)}))))}return k(t,o,0)}}(e,10-f.indent)})).filter((function(e){return e}));function E(e,t){t.forEach((function(t){return t[_]?(!f.strict&&e.push(t),E(e,t[g])):e.push(t)}))}var A=O("div",{class:"xm-toolbar"},e.toolbar.list.map((function(t){var r,s=e.languageProp.toolbar[t];r="ALL"===t?{icon:"xm-iconfont xm-icon-quanxuan",name:s,method:function(e){var t=[];E(t,e),t=t.filter((function(e){return!e[v]})),n.props.onReset(a?t.slice(0,1):d(t,i,o),"treeData")}}:"CLEAR"===t?{icon:"xm-iconfont xm-icon-qingkong",name:s,method:function(e){n.props.onReset(i.filter((function(e){return e[o.disabled]})),"treeData")}}:"REVERSE"===t?{icon:"xm-iconfont xm-icon-fanxuan",name:s,method:function(e){var t=[];E(t,e),t=t.filter((function(e){return!e[v]}));var r=[];i.forEach((function(e){var n=t.findIndex((function(t){return t[y]===e[y]}));-1==n?r.push(e):t.splice(n,1)})),n.props.onReset(a?r.slice(0,1):d(t,r,o),"treeData")}}:t;var c=function(e){"mouseenter"===e.type&&(e.target.style.color=l.color),"mouseleave"===e.type&&(e.target.style.color="")};return O("div",{class:"toolbar-tag",onClick:function(){u(r.method)&&r.method(C,S)},onMouseEnter:c,onMouseLeave:c},e.toolbar.showIcon&&O("i",{class:r.icon}),O("span",null,r.name))})).filter((function(e){return e}))),R=O("div",{class:h?"xm-search":"xm-search dis"},O("i",{class:"xm-iconfont xm-icon-sousuo"}),O("input",{class:"xm-input xm-search-input",placeholder:b}));return j.length||j.push(O("div",{class:"xm-select-empty"},r)),O("div",{onClick:this.blockClick,class:"xm-body-tree"},e.toolbar.show&&A,R,O("div",{class:"scroll-body",style:{maxHeight:e.height}},j),this.state.loading&&O("div",{class:"loading"},O("span",{class:"loader"})))}},{key:"componentDidMount",value:function(){var e=this.base.querySelector(".xm-search-input");e&&(e.addEventListener("compositionstart",this.handleComposition.bind(this)),e.addEventListener("compositionupdate",this.handleComposition.bind(this)),e.addEventListener("compositionend",this.handleComposition.bind(this)),e.addEventListener("input",this.searchInput.bind(this)),this.searchInputRef=e)}},{key:"componentDidUpdate",value:function(){if(this.callback){this.callback=!1;var e=this.props.filterDone;u(e)&&e(this.state.filterValue,this.tempData||[])}}}])&&he(n.prototype,o),r&&he(n,r),t}(E);function ge(e){return(ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _e(e,t){for(var n=0;n1&&(n=n.slice(0,1)),this.setState({sels:n,dataObj:a,flatData:s})}return this.setState({data:o}),n}},{key:"exchangeValue",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state.dataObj,o=e.map((function(e){return"object"===Re(e)?Ee({},e,{__node:{}}):n[e]})).filter((function(e){return e})),r=!0,i=this.props.tree;return i.show&&!1===i.strict&&(r=!1),r&&(o=o.filter((function(e){return!0!==e[t.props.prop.optgroup]}))),o}},{key:"value",value:function(e,t,n){!1!==t&&!0!==t&&(t=this.state.show);var o=this.props,r=o.prop,i=o.tree,l=this.exchangeValue(e);if(i.show&&i.strict){var a=this.state.data;this.clearAndReset(a,l),l=this.init({data:a,prop:r},!0)}this.resetSelectValue(l,l,!0,n),this.setState({show:t})}},{key:"clearAndReset",value:function(e,t){var n=this,o=this.props.prop,r=o.selected,i=o.children,l=o.value;e.forEach((function(e){e[r]=-1!=t.findIndex((function(t){return t[l]===e[l]}));var o=e[i];o&&c(o)&&n.clearAndReset(o,t)}))}},{key:"load",value:function(e,t,n,o){var r=this,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,l=this.props,a=l.prop,s=l.tree,u=a.children,p=a.optgroup,d=a.value,f=a.selected,h=a.disabled;e.forEach((function(e){e.__node={parent:o,level:i,loading:e.__node&&e.__node.loading},t[e[d]]=e,n.push(e);var l=e[u];if(l&&c(l)){var a=l.length;if(a>0){r.load(l,t,n,e,i+1),e[p]=!0,s.strict&&(!0===e[f]&&(delete e[f],l.forEach((function(e){return e[f]=!0}))),!0===e[h]&&(delete e[h],l.forEach((function(e){return e[h]=!0}))));var m=l.filter((function(e){return!0===e[f]||!0===e.__node.selected})).length;e.__node.selected=m===a,e.__node.half=m>0&&m0,e.__node.disabled=l.filter((function(e){return!0===e[h]||!0===e.__node.disabled})).length===a}}}))}},{key:"resetSelectValue",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=this.props.on;if(u(r)&&this.prepare&&o){var i=r({arr:e,change:t,isAdd:n});if(c(i))return this.value(i,null,!1)}this.setState({sels:e})}},{key:"updateBorderColor",value:function(e){this.setState({tmpColor:e})}},{key:"treeHandler",value:function(e,t,n,o){var r=this,i=this.props.prop,l=i.value,a=(i.selected,i.disabled),s=i.children,c=i.optgroup,u=t[s];u.filter((function(e){return!(e[a]||e.__node.disabled)})).forEach((function(t){if(t[c])r.treeHandler(e,t,n,o);else{var i=e.findIndex((function(e){return e[l]==t[l]}));"del"===o?-1!=i&&(e.splice(i,1),n.push(t)):"half"!==o&&"add"!==o||-1==i&&(e.push(t),n.push(t))}}));var p=u.length,d=u.filter((function(t){return-1!==e.findIndex((function(e){return e[l]===t[l]}))||!0===t.__node.selected})).length;t.__node.selected=d===p,t.__node.half=d>0&&d0&&h.length>=g)return this.updateBorderColor(i.maxColor),void(d&&u(d)&&d(h,e));h=a?[e]:[].concat(Se(h),[e]),this.resetSelectValue(h,[e],!t)}else{var _=h.findIndex((function(t){return t[m]==e[m]}));-1!=_&&(h.splice(_,1),this.resetSelectValue(h,[e],!t))}var w,k=e.__node.parent;if(k){for(;k;){var C=k[b],O=C.length,S=C.filter((function(e){return-1!==h.findIndex((function(t){return t[m]===e[m]}))||!0===e.__node.selected})).length;k.__node.selected=S===O,k.__node.half=S>0&&S0,k=k.__node.parent}this.setState({data:this.state.data})}c&&!o&&this.onClick()}}},{key:"onClick",value:function(e){var t=this;if("relative"!==this.props.model.type)if(this.props.disabled)!1!==this.state.show&&this.setState({show:!1});else{var n=!this.state.show;if(n){if(this.props.show&&0==this.props.show())return;Object.keys(He).filter((function(e){return e!=t.props.el})).forEach((function(e){return He[e].closed()}))}else{if(this.props.hide&&0==this.props.hide())return;this.bodyView.scroll&&this.bodyView.scroll(0,0)}this.setState({show:n}),e&&e.stopPropagation()}}},{key:"onReset",value:function(e,t){var n=this;if("data"===t){var o=e.filter((function(e){return!0===e[n.props.prop.selected]}));this.resetSelectValue(d(o,this.state.sels,this.props.prop),o,!0);var r=[];this.load(e,{},r),this.setState({data:e,flatData:r})}else"sels"===t?this.resetSelectValue(e,e,!0):"append"===t?this.append(e):"delete"===t?this.del(e):"auto"===t?this.auto(e):"treeData"===t?this.value(e,null,!0):"close"===t?this.onClick():"class"===t&&this.setState({bodyClass:e})}},{key:"append",value:function(e){var t=this.exchangeValue(e);this.resetSelectValue(d(t,this.state.sels,this.props.prop),t,!0)}},{key:"del",value:function(e){var t=this.props.prop.value,n=this.state.sels;(e=this.exchangeValue(e)).forEach((function(e){var o=n.findIndex((function(n){return n[t]===e[t]}));-1!=o&&n.splice(o,1)})),this.resetSelectValue(n,e,!1)}},{key:"auto",value:function(e){var t=this,n=this.props.prop.value;e.filter((function(e){return-1!=t.state.sels.findIndex((function(t){return t[n]===e[n]}))})).length==e.length?this.del(e):this.append(e)}},{key:"componentWillReceiveProps",value:function(e){this.init(e,e.updateData)}},{key:"componentWillMount",value:function(){this.init(this.props,!0)}},{key:"render",value:function(e,t){var n=this,o=e.theme,r=e.prop,i=(e.radio,e.repeat,e.clickClose,e.on,e.max,e.maxMethod,e.content),l=e.disabled,a=e.tree,s={borderColor:o.color},c=t.data,u=t.dataObj,p=t.flatData,d=t.sels,f=t.show,h=t.tmpColor,m=t.bodyClass;l&&(f=!1);var b={style:Ee({},e.style,{},f?s:{}),onClick:this.onClick.bind(this),ua:-1!=navigator.userAgent.indexOf("Mac OS")?"mac":"win",size:e.size,tabindex:1};h&&(b.style.borderColor=h,setTimeout((function(){b.style.borderColor="",n.updateBorderColor("")}),300)),r.value;var x=Ee({},e,{data:c,sels:d,ck:this.itemClick.bind(this),title:d.map((function(e){return e[r.name]})).join(",")}),y=Ee({},e,{data:c,dataObj:u,flatData:p,sels:d,ck:this.itemClick.bind(this),show:f,onReset:this.onReset.bind(this)}),v=i?O(de,y):a.show?O(ve,y):e.cascader.show?O(Oe,y):O(le,y);return O("xm-select",b,O("input",{class:"xm-select-default","lay-verify":e.layVerify,"lay-verType":e.layVerType,name:e.name,value:d.map((function(e){return e[r.value]})).join(",")}),O("i",{class:f?"xm-icon xm-icon-expand":"xm-icon"}),0===d.length&&O("div",{class:"xm-tips"},e.tips),O(G,x),O("div",{class:["xm-body",m,e.model.type,f?"":"dis"].join(" "),ref:function(e){return n.bodyView=e}},v),l&&O("div",{class:"xm-select-disabled"}))}},{key:"componentDidMount",value:function(){var e=this;this.prepare=!0,this.base.addEventListener("keydown",(function(t){13===t.keyCode&&e.onClick()})),this.input=this.base.querySelector(".xm-select-default");var t=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;t&&new t((function(t){t.forEach((function(t){"attributes"==t.type&&"class"===t.attributeName&&-1!==e.input.className.indexOf("layui-form-danger")&&(e.input.className="xm-select-default",e.base.style.borderColor=e.props.theme.maxColor)}))})).observe(this.input,{attributes:!0});for(var n=this.base;n;){if("FORM"===n.tagName){var o=n.querySelector('button[type="reset"]');o&&o.addEventListener("click",(function(t){e.init(e.props,!0)}));break}n=n.parentElement}}},{key:"componentDidUpdate",value:function(){var e=this.props,t=e.direction;if("relative"!==e.model.type){var n=this.base.getBoundingClientRect();if("auto"===t){this.bodyView.style.display="block",this.bodyView.style.visibility="hidden";var o=this.bodyView.getBoundingClientRect().height;this.bodyView.style.display="",this.bodyView.style.visibility="";var r=n.y||n.top||0,i=document.documentElement.clientHeight-r-n.height-20;t=i>o||r0&&void 0!==arguments[0]?arguments[0]:"zn",t=Le[e]||ze;return{language:e,languageProp:t,data:[],content:"",name:"select",layVerify:"",layVerType:"",size:"medium",disabled:!1,initValue:null,create:null,tips:t.tips,empty:t.empty,delay:500,searchTips:t.searchTips,filterable:!1,filterMethod:function(e,t,n,o){return!e||-1!=t[o.name].indexOf(e)},remoteSearch:!1,remoteMethod:function(e,t){t([])},direction:"auto",style:{},height:"200px",autoRow:!1,paging:!1,pageSize:10,pageEmptyShow:!0,pageRemote:!1,radio:!1,repeat:!1,clickClose:!1,max:0,maxMethod:function(e,t){},showCount:0,toolbar:{show:!1,showIcon:!0,list:["ALL","CLEAR"]},tree:{show:!1,showFolderIcon:!0,showLine:!0,indent:20,expandedKeys:[],strict:!0,lazy:!1,load:null,simple:!1},cascader:{show:!1,indent:100,strict:!0},prop:{name:"name",value:"value",selected:"selected",disabled:"disabled",children:"children",optgroup:"optgroup",click:"click"},theme:{color:"#009688",maxColor:"#e54d42",hover:"#f2f2f2"},model:{label:{type:"block",text:{left:"",right:"",separator:", "},block:{showCount:0,showIcon:!0,template:null},count:{template:function(e,t){return"已选中 ".concat(t.length," 项, 共 ").concat(e.length," 项")}}},icon:"show",type:"absolute"},show:function(){},hide:function(){},template:function(e){e.item,e.sels;var t=e.name;return e.value,t},on:function(e){e.arr,e.item,e.selected}}}(e.language),this.update(e)}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=!!e.data;this.options=p(this.options,e);var n=this.options.dom;if(n){var o=this.options.data||[];if("function"==typeof o&&(o=o(),this.options.data=o),c(o))return K(O(Te,Ve({},this.options,{updateData:t})),n),this;s("data数据必须为数组类型, 不能是".concat("undefined"==typeof data?"undefined":Fe(data),"类型"))}else s("没有找到渲染对象: ".concat(e.el,", 请检查"))}},{key:"reset",value:function(){var e=this.options.el;return this.init(Ke[e]),qe[e].init(this.options,!0),this}},{key:"opened",value:function(){var e=qe[this.options.el];return!e.state.show&&e.onClick(),this}},{key:"closed",value:function(){var e=qe[this.options.el];return e.state.show&&e.onClick(),this}},{key:"getValue",value:function(e){var t=this,n=this.options,o=n.tree,r=n.prop,i=n.data,l=qe[this.options.el].state.sels,a=l;o.show&&o.strict&&o.simple&&f(i,l,a=[],r);var s=h(a,r.children,["__node"]);return"name"===e?s.map((function(e){return e[t.options.prop.name]})):"nameStr"===e?s.map((function(e){return e[t.options.prop.name]})).join(","):"value"===e?s.map((function(e){return e[t.options.prop.value]})):"valueStr"===e?s.map((function(e){return e[t.options.prop.value]})).join(","):s}},{key:"setValue",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(c(e))return qe[this.options.el].value(this.options.radio?e.slice(0,1):e,t,n),this;s("请传入数组结构...")}},{key:"append",value:function(e){if(c(e))return qe[this.options.el].append(e),this;s("请传入数组结构...")}},{key:"delete",value:function(e){if(c(e))return qe[this.options.el].del(e),this;s("请传入数组结构...")}},{key:"warning",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e||this.options.theme.maxColor;return!0===t?qe[this.options.el].base.style.borderColor=n:qe[this.options.el].updateBorderColor(n),this}}])&&Ue(t.prototype,n),o&&Ue(t,o),e}();function Ne(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t + + +${context.getContextName()} + + + +${Styles.src(zhiqim.css)} +${Scripts.src(zhiqim.js)} +${Styles.src(zmr_theme.css)} +${Scripts.src(zmr_theme.js)} + + + + +${Htmls.toCallFrame()} + +
            + +
            +
            +
            + ${zhiqim_manager_topnav_right_defined()} +
            +
            + ${zhiqim_manager_topnav_left_defined()} + + +
            +
            + + +
            + + + + + +
            + <#include include/> +
            + + +
            + + + \ No newline at end of file diff --git a/Yangcai365_design/manage/ztmpl/zhiqim_manager/00_default/default_2019010101.css b/Yangcai365_design/manage/ztmpl/zhiqim_manager/00_default/default_2019010101.css new file mode 100644 index 0000000..18086b5 --- /dev/null +++ b/Yangcai365_design/manage/ztmpl/zhiqim_manager/00_default/default_2019010101.css @@ -0,0 +1,143 @@ +@charset "utf-8"; + +/* ZhiqimUI */ +.z-input{color:#333;} + +/* global */ +body{color:#333;background-color:#fff;} +body,table,td,div{font-size:14px;line-height:120%;} +a,a:visited{color:#333;text-decoration:none;cursor:pointer;} +a:active,a:hover{color:#4bb0af;text-decoration:none;} +a.blue,a.blue:visited{color:#0066cc;text-decoration:none;cursor:pointer;} +a.blue:active,a.blue:hover{color:#0066cc;text-decoration:underline;} + +/* topnav */ +.topnav {position:relative;width:100%;min-width:680px;color:#3c4353;background-color:#fff;height:64px;z-index:99; } +.topnav .logo {float:left;width:208px; color:#fff; height:64px;} +.topnav a{color: #3c4353; float:left; line-height:64px; text-align: center;} +.my-message{ float:left; position: relative; cursor: pointer;} +.my-message span{position: absolute; top:18px; right:4px; background:#ff5448; min-width:14px; height:14px; border-radius:12px; font-size:10px; color:#fff; line-height:12px;text-align: center;} + +.topnav .topnavleft {float:left;height:55px;} +.topnav .topnavleft .bar {float:left;height:64px; padding:23px 0 0 24px; cursor: pointer;} +.topnav .topnavleft .first {border-left:1px solid #008bd2;} +.topnav .topnavleft .nav, .topnav .topnavleft .nav-only {float:left;height:55px;line-height:55px;border-right:1px solid #008bd2;} +.topnav .topnavleft .nav:hover{background-color:#008bd2; color:#fff;} + +.topnav .topnavright {float:right;height:64px;} +.topnav .topnavright .nav, .topnav .topnavright .nav-only {float:left;height:64px;line-height:64px;} +.topnav .topnavright .nav:hover {background-color:#008bd2; color:#fff;} + +.user-info{ float:left; padding:0 40px 0 16px; cursor:pointer; position: relative; line-height:64px; } +.user-info span{ padding:0 2px 0 6px; color:#333; font-size:14px;} +.user-avatar{ width:28px; height:28px; border-radius:28px;} +.arrow-down{ width:12px; height:8px;} +.user-popup{width:120px; display:none; text-align: left; position: absolute; background:#fff; right:30px; top:60px; box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%); border: 1px solid #EBEEF5; border-radius:4px;} +.operate-item{ line-height:44px; font-size:14px; color: #303030; text-align: center;} +.operate-item:nth-child(1){ border-bottom:1px solid #e8e8e8;} +.nav-item{ float:left; line-height:64px; margin:0 20px 0 30px; cursor:pointer;} + +/*switch */ +.switch{-webkit-appearance: none; float:left; margin:20px 0 0 0; width: 54px; height:24px!important; border:1px solid #cecece!important; border-radius: 26px; position: relative; outline: none; transition: linear 0.2s;} +/*伪类*/ +.switch:before{content: ''; width: 16px; height: 16px; border-radius: 50%; background: #cecece; position: absolute; top: 3px; left: 3px; transition: linear 0.2s;} +.switch:checked{box-shadow: 0 0 16px 16px #00a9f2 inset; background: #00a9f2; transition: linear 0.2s;} +.switch:checked:before{left: 48px; background: #fff; transition: linear 0.2s;} +.switch-active{ border:1px solid #1182fc!important; background: #e6f2fe;} +.switch-active:before{ top: 3px; left: 31px; background: #1182fc; transition: linear 0.2s;} + +.takeOrder{ padding:0 0 0 20px; float:left;} +.takeOrder span{color:#1182fa; font-size:14px; line-height:64px; float:left; font-weight: bold; margin:0 10px 0 0;} + + +/* container */ +.container {position:relative;width:100%;height:100%;min-height:900px;overflow:hidden;background-color:#e6e9ef;} + +/*[替换z-tabnav的背景色为容器背景色]*/ +.container .z-tabnav>nav li.z-active{ border-bottom:1px solid #eaedf1; } +.container .z-tabnav>nav li.z-active:hover{ background-color:#eaedf1; } + +.sidebar {position:relative;float:left;width:208px;min-height:1000px;overflow:hidden;background-color:#ffffff;margin-bottom:-9999px;padding-bottom:9999px; padding-top:8px;} +.sidebar a{float:left;background-color:#fff;width:208px;height:48px;color:#3c4353; line-height:48px;padding-left:40px;cursor:pointer; margin-bottom:8px;} +.sidebar a:hover{background-color:#e6e9ef;color:#1081f9;} +.sidebar a.active{background-color:#e6e9ef;color:#1081f9; position: relative;} +.sidebar a.active::after{content:''; display: block; position: absolute; width:2px; height:24px; background:#1182fa; left:0; top:12px;} + +.nav-home{ background:url(/zinc/images/home.png) no-repeat 10px;} +.nav-home.active{background:#e6e9ef url(/zinc/images/home_on.png) no-repeat 10px;} + +.nav-receive{ background:url(/zinc/images/receive.png) no-repeat 10px;} +.nav-receive.active{background:#e6e9ef url(/zinc/images/receive_on.png) no-repeat 10px;} + +.nav-order{ background:url(/zinc/images/order.png) no-repeat 10px;} +.nav-order.active{background:#e6e9ef url(/zinc/images/order_on.png) no-repeat 10px;} + +.nav-after{ background:url(/zinc/images/after.png) no-repeat 10px;} +.nav-after.active{background:#e6e9ef url(/zinc/images/after_on.png) no-repeat 10px;} + +.nav-complain{ background:url(/zinc/images/complain.png) no-repeat 10px;} +.nav-complain.active{background:#e6e9ef url(/zinc/images/complain_on.png) no-repeat 10px;} + +.nav-code{ background:url(/zinc/images/code.png) no-repeat 10px;} +.nav-code.active{background:#e6e9ef url(/zinc/images/code_on.png) no-repeat 10px;} + +.nav-template{ background:url(/zinc/images/template.png) no-repeat 10px;} +.nav-template.active{background:#e6e9ef url(/zinc/images/template_on.png) no-repeat 10px;} + +.nav-performance{ background:url(/zinc/images/statistics.png) no-repeat 10px;} +.nav-performance.active{background:#e6e9ef url(/zinc/images/statistics_on.png) no-repeat 10px;} + +.nav-examine{background:url(/zinc/images/examine.png) no-repeat 10px !important;} +.nav-examine.active{background:#e6e9ef url(/zinc/images/examine_on.png) no-repeat 10px !important;} + +.nav-info{background:url(/zinc/images/user.png) no-repeat 10px !important; } +.nav-info.active{background:#e6e9ef url(/zinc/images/user_on.png) no-repeat 10px !important;} + + +/* iframenav */ +.iframenav{position:relative;margin-left:200px;height:40px;line-height:40px;} + +/* [iframenav翻页] */ +.iframenav-prev,.iframenav-next{position:absolute;top:0;width:50px;height:39px;z-index:1;background:#fff;cursor:pointer;padding:0 22px;text-align:center;line-height:39px;} +.iframenav-prev:hover,.iframenav-next:hover{background-color:#f5f5f5;} +.iframenav-prev{left:0;border-right:1px solid #d3d3d3;} +.iframenav-next{right:100px;border-left:1px solid #d3d3d3;} +.iframenav-prev .z-font,.iframenav-next .z-font{color:#999;margin-left:-8px;} + +/* [iframenav控制] */ +.iframenav-ctrl{position:absolute;top:0;right:0;} +.iframenav-ctrl-title{position:absolute;top:0;right:0;width:100px;height:39px;z-index:1;border-left:1px solid #d3d3d3;text-align:center;line-height:39px;color:#666;background:#fff;cursor:pointer;} +.iframenav-ctrl-title:hover{background-color:#f5f5f5;} +.iframenav-ctrl-title .z-font{color:#999;margin-left:6px;font-size:10px;} +.iframenav-ctrl-wrap{position:absolute;top:39px;right:0;display:none;width:150px;height:130px;z-index:2;background-color:#fff;border:1px solid #d3d3d3;} +.iframenav-ctrl-wrap ul{padding:10px 0;} +.iframenav-ctrl-wrap ul+ul{border-top:1px solid #ccc;} +.iframenav-ctrl-wrap li{padding:0 25px;line-height:30px;cursor:pointer;} +.iframenav-ctrl-wrap li:hover{background:#f1f1f1;} + +/* [iframenav选项卡] */ +.iframenav-tab-wrap{height:39px;margin:0 150px 0 50px;overflow:hidden;position:relative;} +.iframenav-tab-list{position:absolute;left:0;top:0;height:39px;background-color:#fff;overflow:hidden;} +.iframenav-tab-item{position:relative;float:left;line-height:39px;border-right:1px solid #d3d3d3;padding:0 35px 0 20px;background:#fff;color:#666;cursor:pointer;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;} +.iframenav-tab-item.active{background-color:#d4d8db;} +.iframenav-tab-item:hover{color:#222;} +.iframenav-tab-item:first-child{padding-right:23px;} + +.iframenav-tab-item .z-font{position:absolute;top:2px;width:25px;line-height:39px;color:#666;font-size:12px;cursor:pointer;text-align:center;} +.iframenav-tab-item .z-error{right:0;padding-right:5px;} +.iframenav-tab-item .z-error:hover{color:#f00;} + +/* [iframenav内容页] */ +.iframenav-cont{} +.iframenav-cont-item{width:100%;height:100%;display:none;} +.iframenav-cont-item.active{display:block;} +.iframenav-cont-item > iframe{width:100%;height:100%;border:0;margin:0;padding:0;} + +/* mainbody */ +.mainbody{margin-left:208px; } +.mainbody .breadcrumb{position:relative;float:left;width:100%;} +.mainbody .content{position:relative;float:left;width:100%;padding:20px;} + +/* footer */ +.footer {position:relative;width:100%;height:60px;display:block;overflow:hidden;background-color:#f4f4f4;border-top:1px solid #d3d3d3;z-index:99;} +.footer-wrap {position:relative;margin:0 auto;height:100%;line-height:60px;text-align: center;color:#333;} diff --git a/Yangcai365_design/manage/ztmpl/zhiqim_manager/00_default/default_2019010101.js b/Yangcai365_design/manage/ztmpl/zhiqim_manager/00_default/default_2019010101.js new file mode 100644 index 0000000..9b220e6 --- /dev/null +++ b/Yangcai365_design/manage/ztmpl/zhiqim_manager/00_default/default_2019010101.js @@ -0,0 +1,115 @@ +/* + * 版权所有 (C) 2015 知启蒙(ZHIQIM) 保留所有权利。 + * + * 指定登记&发行网站: https://www.zhiqim.com/ 欢迎加盟知启蒙,[编程有你,知启蒙一路随行]。 + * + * 本文采用《知启蒙许可证》,除非符合许可证,否则不可使该文件! + * 1、您可以免费使用、修改、合并、出版发行和分发,再授权软件、软件副本及衍生软件; + * 2、您用于商业用途时,必须在原作者指定的登记网站进行实名登记; + * 3、您在使用、修改、合并、出版发行和分发时,必须包含版权声明、许可声明,及保留原作者的著作权、商标和专利等知识产权; + * 4、您在互联网、移动互联网等大众网络下发行和分发再授权软件、软件副本及衍生软件时,必须在原作者指定的发行网站进行发行和分发; + * 5、您可以在以下链接获取一个完整的许可证副本。 + * + * 许可证链接:http://zhiqim.org/licenses/LICENSE.htm + * + * 除非法律需要或书面同意,软件由原始码方式提供,无任何明示或暗示的保证和条件。详见完整许可证的权限和限制。 + */ ++(function(Z) +{//BEGIN + +/**************************************************/ +//定义全局的对象,便于所有的页面调用 +/**************************************************/ +var Zmr = window.Zmr = {}; + +Zmr.selectOrgDialog = function() +{//弹出组织选择框 + var dialog = new Z.Dialog(); + dialog.title = "选择组织"; + dialog.url = "orgSelector.htm"; + dialog.width = 392; + dialog.height = 423; + dialog.fixed = true; + dialog.scroll = true; + dialog.execute(); +}; + +Zmr.sidebar = function() +{//打开&关闭边导航 + var $sidebar = Z("#sidebar"); + if ($sidebar.isHide()) + { + $sidebar.show(); + Z("#logo").show(); + Z("#iframenav").css("margin-left", 208); + Z("#mainbody").css("margin-left", 208); + } + else + { + $sidebar.hide(); + Z("#logo").hide(); + Z("#iframenav").css("margin-left", 0); + Z("#mainbody").css("margin-left", 0); + } + + Z.ajax().setContextPath(Zmr.contextPath) + .setClassName("sessionUser").setMethodName("setSidebar").addParam(!$sidebar.isHide()) + .execute(); +}; + +Zmr.calcMainbodyHeight = function() +{//计算主体高度 + var height = Z(document).clientHeight()-55;//55为topnav的高度 + Z("#container").css("height", height); + Z("#mainbody").css("height", height-40);//40为iframenav高度 +}; + +Zmr.treeExpand = function(code) +{//树菜单展开和关闭 + var $menu = Z("#menu-"+code); + var $ico = Z("#ico-"+code); + + if (!$menu.isHide()) + { + $menu.hide(); + if ($ico.hasClass("z-mlastnode")) + $ico.removeClass("z-mlastnode").addClass("z-plastnode"); + else + $ico.removeClass("z-mnode").addClass("z-pnode"); + } + else + { + $menu.show(); + if ($ico.hasClass("z-plastnode")) + $ico.removeClass("z-plastnode").addClass("z-mlastnode"); + else + $ico.removeClass("z-pnode").addClass("z-mnode"); + } +}; + +Zmr.addTopMenuClick = function() +{//增加顶级栏目点击事件,先定义两个开关,防止并发时导致数据混乱 + Zmr.doClickTopMenuUp = false; + Zmr.doClickTopMenuDw = false; + + Z(".sidebar p").click(function() + { + if (Zmr.doClickTopMenuUp || Zmr.doClickTopMenuDw) + return; + + Zmr.doClickTopMenuUp = true;Zmr.doClickTopMenuDw = true; + Z(this).next("ul").slideToggle(200, function(){Zmr.doClickTopMenuDw = false;}) + .siblings("ul").slideUp(200, function(){Zmr.doClickTopMenuUp = false;}); + }); +}; + +/**************************************************/ +//定义初始化滑动菜单 +/**************************************************/ +Z.onload(function() +{//菜单隐藏展开 + Zmr.addTopMenuClick(); +}); + +//END +})(zhiqim); \ No newline at end of file diff --git a/Yangcai365_design/manage/ztmpl/zhiqim_manager/00_default/define.htm b/Yangcai365_design/manage/ztmpl/zhiqim_manager/00_default/define.htm new file mode 100644 index 0000000..fc9f704 --- /dev/null +++ b/Yangcai365_design/manage/ztmpl/zhiqim_manager/00_default/define.htm @@ -0,0 +1,61 @@ +<#--变量定义--> +<#var zmr_theme.css = context.getRootPath("/ztmpl/zhiqim_manager/"+themeMain+"/default_2019010101.css?v=20210730")/> +<#var zmr_theme.js = context.getRootPath("/ztmpl/zhiqim_manager/"+themeMain+"/default_2019010101.js?v=20210730")/> +<#var zmr_color_class = "z-blue"/> +<#var zmr_sidebar_width = 200/> +<#var zmr_topnav_height = 55/> +<#var zmr_breadcrumb_height = 40/> +<#var zmr_title_bgcolor = "#efefef"/> +<#var zmr_thead_bgcolor = "#efefef"/> +<#var zmr_tr_odd_bgcolor = "#f3fdfc"/> +<#var zmr_tr_even_bgcolor = "#ffffff"/> +<#var zmr_tr_over_bgcolor = "#f3fdfc"/> +<#var zmr_tfoot_bgcolor = "#ffffff"/> +<#--面包屑 --> +<#function zhiqim_manager_breadcrumb_name(name)> +<#if !ZmrParamDao.isThemeFrame(context)> + + + +<#--面包屑一级栏目 --> +<#function zhiqim_manager_breadcrumb(name)> +<#if !ZmrParamDao.isThemeFrame(context)> + + + +<#--面包屑二级栏目 --> +<#function zhiqim_manager_breadcrumb_parent(parentUrl, parentName, name)> +<#if !ZmrParamDao.isThemeFrame(context)> + + + +<#--面包屑三级栏目 --> +<#function zhiqim_manager_breadcrumb_parent_last(parentUrl, parentName, lastUrl, lastName, name)> +<#if !ZmrParamDao.isThemeFrame(context)> + + + +<#--显示记录分页--> +<#function zhiqim_manager_paging(result, link)> + + + + +
            ${PagingStd.toHtmlLink(result, link)}
            + +<#--显示记录分页JS--> +<#function zhiqim_manager_paging_jsMethod(result, jsMethod)> + + + + +
            ${PagingStd.toHtmlClick(result, jsMethod)}
            + \ No newline at end of file diff --git a/Yangcai365_design/manage/ztmpl/zhiqim_manager/00_default/iframeMain.htm b/Yangcai365_design/manage/ztmpl/zhiqim_manager/00_default/iframeMain.htm new file mode 100644 index 0000000..1db5f00 --- /dev/null +++ b/Yangcai365_design/manage/ztmpl/zhiqim_manager/00_default/iframeMain.htm @@ -0,0 +1,172 @@ + + + +${context.getContextName()} + + +${Styles.src(zhiqim.css)} +${Scripts.src(zhiqim.js)} +${Styles.src(zmr_theme.css)} +${Scripts.src(zmr_theme.js)} +${Scripts.src(zhiqim_iframenav.js)} +${Styles.htmlOverflowHidden()} + + + + + +
            + +
            +
            + ${zhiqim_manager_topnav_left_defined()} +
            +
            + ${zhiqim_manager_topnav_right_defined()} + + +
            +
            + + +
            + + + + + +
            +
            +
            +
              +
            • 首页
            • +
            +
            +
            +
            +
            关闭操作
            +
            +
              +
            • 定位当前选项卡
            • +
            +
              +
            • 关闭全部选项卡
            • +
            • 关闭其他选项卡
            • +
            +
            +
            +
            + + +
            +
            + +
            +
            + + +
            +<#if Validates.isNotEmptyBlank(sessionUser.getOperator().getInitialPassword()) && sessionUser.getOperator().getInitialPassword().equals(sessionUser.getOperator().getOperatorPass())> + + + + \ No newline at end of file diff --git a/Yangcai365_design/manage/ztmpl/zhiqim_manager/all.png b/Yangcai365_design/manage/ztmpl/zhiqim_manager/all.png new file mode 100644 index 0000000..2896bec Binary files /dev/null and b/Yangcai365_design/manage/ztmpl/zhiqim_manager/all.png differ diff --git a/Yangcai365_design/manage/ztmpl/zhiqim_manager/announcement-horn.gif b/Yangcai365_design/manage/ztmpl/zhiqim_manager/announcement-horn.gif new file mode 100644 index 0000000..054b08e Binary files /dev/null and b/Yangcai365_design/manage/ztmpl/zhiqim_manager/announcement-horn.gif differ diff --git a/Yangcai365_design/manage/ztmpl/zhiqim_manager/announcementBackground.png b/Yangcai365_design/manage/ztmpl/zhiqim_manager/announcementBackground.png new file mode 100644 index 0000000..ba48c8b Binary files /dev/null and b/Yangcai365_design/manage/ztmpl/zhiqim_manager/announcementBackground.png differ diff --git a/Yangcai365_design/manage/ztmpl/zhiqim_manager/backlogAffair.png b/Yangcai365_design/manage/ztmpl/zhiqim_manager/backlogAffair.png new file mode 100644 index 0000000..7d1afd0 Binary files /dev/null and b/Yangcai365_design/manage/ztmpl/zhiqim_manager/backlogAffair.png differ diff --git a/Yangcai365_design/manage/ztmpl/zhiqim_manager/currentMonthOrder.png b/Yangcai365_design/manage/ztmpl/zhiqim_manager/currentMonthOrder.png new file mode 100644 index 0000000..edc7d22 Binary files /dev/null and b/Yangcai365_design/manage/ztmpl/zhiqim_manager/currentMonthOrder.png differ diff --git a/Yangcai365_design/manage/ztmpl/zhiqim_manager/day.png b/Yangcai365_design/manage/ztmpl/zhiqim_manager/day.png new file mode 100644 index 0000000..682a11f Binary files /dev/null and b/Yangcai365_design/manage/ztmpl/zhiqim_manager/day.png differ diff --git a/Yangcai365_design/manage/ztmpl/zhiqim_manager/designAfterOrgStatistics.png b/Yangcai365_design/manage/ztmpl/zhiqim_manager/designAfterOrgStatistics.png new file mode 100644 index 0000000..8f7d161 Binary files /dev/null and b/Yangcai365_design/manage/ztmpl/zhiqim_manager/designAfterOrgStatistics.png differ diff --git a/Yangcai365_design/manage/ztmpl/zhiqim_manager/designAfterOrgStatisticsAmount.png b/Yangcai365_design/manage/ztmpl/zhiqim_manager/designAfterOrgStatisticsAmount.png new file mode 100644 index 0000000..1e64bfa Binary files /dev/null and b/Yangcai365_design/manage/ztmpl/zhiqim_manager/designAfterOrgStatisticsAmount.png differ diff --git a/Yangcai365_design/manage/ztmpl/zhiqim_manager/designBacklogAffair.png b/Yangcai365_design/manage/ztmpl/zhiqim_manager/designBacklogAffair.png new file mode 100644 index 0000000..cf3cd95 Binary files /dev/null and b/Yangcai365_design/manage/ztmpl/zhiqim_manager/designBacklogAffair.png differ diff --git a/Yangcai365_design/manage/ztmpl/zhiqim_manager/designLogo.png b/Yangcai365_design/manage/ztmpl/zhiqim_manager/designLogo.png new file mode 100644 index 0000000..169c3f3 Binary files /dev/null and b/Yangcai365_design/manage/ztmpl/zhiqim_manager/designLogo.png differ diff --git a/Yangcai365_design/manage/ztmpl/zhiqim_manager/designing.png b/Yangcai365_design/manage/ztmpl/zhiqim_manager/designing.png new file mode 100644 index 0000000..665f7f2 Binary files /dev/null and b/Yangcai365_design/manage/ztmpl/zhiqim_manager/designing.png differ diff --git a/Yangcai365_design/manage/ztmpl/zhiqim_manager/dialog.htm b/Yangcai365_design/manage/ztmpl/zhiqim_manager/dialog.htm new file mode 100644 index 0000000..11ca99f --- /dev/null +++ b/Yangcai365_design/manage/ztmpl/zhiqim_manager/dialog.htm @@ -0,0 +1,17 @@ + + + +${context.getContextName()} + + +${Styles.src(zhiqim.css)} +${Scripts.src(zhiqim.js)} + + + +<#include "/ztmpl/zhiqim_manager/"+themeMain+"/define.htm"/> +
            + <#include include/> +
            + + \ No newline at end of file diff --git a/Yangcai365_design/manage/ztmpl/zhiqim_manager/index.htm b/Yangcai365_design/manage/ztmpl/zhiqim_manager/index.htm new file mode 100644 index 0000000..4664981 --- /dev/null +++ b/Yangcai365_design/manage/ztmpl/zhiqim_manager/index.htm @@ -0,0 +1,185 @@ + + + +${context.getContextName()} + + + +${Styles.src(zhiqim.css)} +${Scripts.src(zhiqim.js)} +${Scripts.src(jsencrypt.js)} +${Styles.htmlOverflowHidden()} + + + + + +<#-- 主题变量和函数定义 --> +<#include "/ztmpl/zhiqim_manager/"+themeIndex+"/define.htm"/> + +${Htmls.toCallFrame()} +
            +
            欢迎登录  [ ${context.getContextName()} ]!
            +
            +
            + + + + diff --git a/Yangcai365_design/manage/ztmpl/zhiqim_manager/index_bg_00.jpg b/Yangcai365_design/manage/ztmpl/zhiqim_manager/index_bg_00.jpg new file mode 100644 index 0000000..ec70165 Binary files /dev/null and b/Yangcai365_design/manage/ztmpl/zhiqim_manager/index_bg_00.jpg differ diff --git a/Yangcai365_design/manage/ztmpl/zhiqim_manager/index_logo_00.png b/Yangcai365_design/manage/ztmpl/zhiqim_manager/index_logo_00.png new file mode 100644 index 0000000..63148c8 Binary files /dev/null and b/Yangcai365_design/manage/ztmpl/zhiqim_manager/index_logo_00.png differ diff --git a/Yangcai365_design/manage/ztmpl/zhiqim_manager/index_slogan_00.png b/Yangcai365_design/manage/ztmpl/zhiqim_manager/index_slogan_00.png new file mode 100644 index 0000000..e3e56c9 Binary files /dev/null and b/Yangcai365_design/manage/ztmpl/zhiqim_manager/index_slogan_00.png differ diff --git a/Yangcai365_design/manage/ztmpl/zhiqim_manager/login_new.png b/Yangcai365_design/manage/ztmpl/zhiqim_manager/login_new.png new file mode 100644 index 0000000..9668acd Binary files /dev/null and b/Yangcai365_design/manage/ztmpl/zhiqim_manager/login_new.png differ diff --git a/Yangcai365_design/manage/ztmpl/zhiqim_manager/month.png b/Yangcai365_design/manage/ztmpl/zhiqim_manager/month.png new file mode 100644 index 0000000..de3a6ec Binary files /dev/null and b/Yangcai365_design/manage/ztmpl/zhiqim_manager/month.png differ diff --git a/Yangcai365_design/manage/ztmpl/zhiqim_manager/percentage_blue.png b/Yangcai365_design/manage/ztmpl/zhiqim_manager/percentage_blue.png new file mode 100644 index 0000000..ab43f6e Binary files /dev/null and b/Yangcai365_design/manage/ztmpl/zhiqim_manager/percentage_blue.png differ diff --git a/Yangcai365_design/manage/ztmpl/zhiqim_manager/percentage_green.png b/Yangcai365_design/manage/ztmpl/zhiqim_manager/percentage_green.png new file mode 100644 index 0000000..b1e0b53 Binary files /dev/null and b/Yangcai365_design/manage/ztmpl/zhiqim_manager/percentage_green.png differ diff --git a/Yangcai365_design/manage/ztmpl/zhiqim_manager/percentage_red.png b/Yangcai365_design/manage/ztmpl/zhiqim_manager/percentage_red.png new file mode 100644 index 0000000..028fda1 Binary files /dev/null and b/Yangcai365_design/manage/ztmpl/zhiqim_manager/percentage_red.png differ diff --git a/Yangcai365_design/manage/ztmpl/zhiqim_manager/refundOrgMergeCount.png b/Yangcai365_design/manage/ztmpl/zhiqim_manager/refundOrgMergeCount.png new file mode 100644 index 0000000..6634181 Binary files /dev/null and b/Yangcai365_design/manage/ztmpl/zhiqim_manager/refundOrgMergeCount.png differ diff --git a/Yangcai365_design/manage/ztmpl/zhiqim_manager/rejected.png b/Yangcai365_design/manage/ztmpl/zhiqim_manager/rejected.png new file mode 100644 index 0000000..88ade3d Binary files /dev/null and b/Yangcai365_design/manage/ztmpl/zhiqim_manager/rejected.png differ diff --git a/Yangcai365_design/manage/ztmpl/zhiqim_manager/reviewing.png b/Yangcai365_design/manage/ztmpl/zhiqim_manager/reviewing.png new file mode 100644 index 0000000..b7093e1 Binary files /dev/null and b/Yangcai365_design/manage/ztmpl/zhiqim_manager/reviewing.png differ diff --git a/Yangcai365_design/manage/ztmpl/zhiqim_manager/showing.png b/Yangcai365_design/manage/ztmpl/zhiqim_manager/showing.png new file mode 100644 index 0000000..9d60f01 Binary files /dev/null and b/Yangcai365_design/manage/ztmpl/zhiqim_manager/showing.png differ diff --git a/Yangcai365_design/manage/ztmpl/zhiqim_manager/template.htm b/Yangcai365_design/manage/ztmpl/zhiqim_manager/template.htm new file mode 100644 index 0000000..7e237b6 --- /dev/null +++ b/Yangcai365_design/manage/ztmpl/zhiqim_manager/template.htm @@ -0,0 +1,4 @@ +<#-- 主题变量和函数定义 --> +<#include "/ztmpl/zhiqim_manager/"+themeMain+"/define.htm"/> +<#-- 判断是否启用了iframe --> +<#include "/ztmpl/zhiqim_manager/"+themeMain+"/alone.htm"/> \ No newline at end of file diff --git a/Yangcai365_design/manage/ztmpl/zhiqim_manager/timeoutOrderToday.png b/Yangcai365_design/manage/ztmpl/zhiqim_manager/timeoutOrderToday.png new file mode 100644 index 0000000..9e75edb Binary files /dev/null and b/Yangcai365_design/manage/ztmpl/zhiqim_manager/timeoutOrderToday.png differ diff --git a/Yangcai365_design/manage/ztmpl/zhiqim_manager/todayOrder.png b/Yangcai365_design/manage/ztmpl/zhiqim_manager/todayOrder.png new file mode 100644 index 0000000..2031ef9 Binary files /dev/null and b/Yangcai365_design/manage/ztmpl/zhiqim_manager/todayOrder.png differ diff --git a/Yangcai365_design/manage/ztmpl/zhiqim_manager/unsorted.png b/Yangcai365_design/manage/ztmpl/zhiqim_manager/unsorted.png new file mode 100644 index 0000000..f6beae0 Binary files /dev/null and b/Yangcai365_design/manage/ztmpl/zhiqim_manager/unsorted.png differ diff --git a/Yangcai365_design/manage/ztmpl/zhiqim_manager/year.png b/Yangcai365_design/manage/ztmpl/zhiqim_manager/year.png new file mode 100644 index 0000000..770fc5c Binary files /dev/null and b/Yangcai365_design/manage/ztmpl/zhiqim_manager/year.png differ diff --git a/Yangcai365_design/manage/zview/account/freezeSalary.zml b/Yangcai365_design/manage/zview/account/freezeSalary.zml new file mode 100644 index 0000000..faa9311 --- /dev/null +++ b/Yangcai365_design/manage/zview/account/freezeSalary.zml @@ -0,0 +1,39 @@ + + +
            +
            冻结资金
            +
            设计师账户:${operatorCode}
            +
            当前可用金额: ${usableMoney} 元
            +
            冻结金额: 元
            +
            操作备注:
            +
            +<#-- 操作 --> +
            + + +
            +
            diff --git a/Yangcai365_design/manage/zview/account/sendSalary.zml b/Yangcai365_design/manage/zview/account/sendSalary.zml new file mode 100644 index 0000000..407b49f --- /dev/null +++ b/Yangcai365_design/manage/zview/account/sendSalary.zml @@ -0,0 +1,42 @@ + + +
            +
            发放工资
            +
            设计师账户: ${operatorCode}
            +
            当前可用金额: ${usableMoney} 元
            +
            发放金额: 元
            +
            操作备注:
            +
            +<#-- 操作 --> +
            + + +
            +
            diff --git a/Yangcai365_design/manage/zview/account/virtualAccount.zml b/Yangcai365_design/manage/zview/account/virtualAccount.zml new file mode 100644 index 0000000..e7d888f --- /dev/null +++ b/Yangcai365_design/manage/zview/account/virtualAccount.zml @@ -0,0 +1,168 @@ +${Styles.htmlOverflowHidden()} +${Scripts.src("/zinc/js/global_2019010801.js")} +${yangcai_calc_Left_width_height(400, 70)} + +${zhiqim_manager_content()} + + + +<#-- 导航 --> +
            + +
            + <#-- 查询条件 --> + ${zhiqim_manager_title("查询条件")} +
            + + + + + +
             设计师: + + +   + +
            +
            +
            + <#-- 分页列表--> +
            + + + + + + + + + + <#if pageResult.size() == 0> + ${zhiqim_manager_no_record(26,"暂不存在资金账户列表")} + + <#for item : pageResult.list()> + + + + + + + + + +
            设计师账户账户状态总金额(元)冻结金额(元)可用金额(元)操作
            ${item.getOperatorCode()}
            + checked onclick='goSwitch(this,"${item.getOperatorCode()}");' class="switch" /> + +
            ${Amounts.toYuan(item.getSumMoney())}${Amounts.toYuan(item.getFreezeMoney())}${Amounts.toYuan(item.getUsableMoney())} +      + +
            +
            + ${zhiqim_manager_paging(pageResult, "/virtualAccount.htm")} +
            +${zhiqim_manager_content_end()} diff --git a/Yangcai365_design/manage/zview/account/virtualAccountDetails.zml b/Yangcai365_design/manage/zview/account/virtualAccountDetails.zml new file mode 100644 index 0000000..c858163 --- /dev/null +++ b/Yangcai365_design/manage/zview/account/virtualAccountDetails.zml @@ -0,0 +1,89 @@ +${Styles.htmlOverflowHidden()} +${Scripts.src("/zinc/js/global_2019010801.js")} +${yangcai_calc_Left_width_height(400, 70)} + +${zhiqim_manager_content()} + +<#-- 导航栏 --> +
            + +
            + <#-- 查询条件 --> + ${zhiqim_manager_title("查询条件")} +
            + + + + + + + + +
             账户流水: + +  交易流水: + +  交易类型: + +  交易时间: + - + + +   + +
            +
            +
            + <#-- 分页列表--> +
            + + + + + + + + + + + + + + + + + <#if pageResult.size() == 0> + ${zhiqim_manager_no_record(26,"暂不存在账户明细")} + + <#for item : pageResult.list()> + + + + + + + + + + + + + + + + +
            账户流水账户名称交易流水交易类型可提现增加(元)可提现减少(元)待结算增加(元)待结算减少(元)变动后可提现(元)变动后待结算(元)变动后总收入(元)交易时间备注
            ${item.getAccountBlotter()}${item.getOperatorCode()}${item.getTransactionBlotter()}${VirtualAccountConstants.getTransactionStatusListDesc(item.getTransactionStatus()+"")}<#if Amounts.toYuan(item.getUsableMoneyAdd())=0>0<#else>${Amounts.toYuan(item.getUsableMoneyAdd())}<#if Amounts.toYuan(item.getUsableMoneyDown())=0>0<#else>${Amounts.toYuan(item.getUsableMoneyDown())}<#if Amounts.toYuan(item.getFreezeMoneyAdd())=0>0<#else>${Amounts.toYuan(item.getFreezeMoneyAdd())}<#if Amounts.toYuan(item.getFreezeMoneyDown())=0>0<#else>${Amounts.toYuan(item.getFreezeMoneyDown())}<#if Amounts.toYuan(item.getUsableMoney())=0>0<#else>${Amounts.toYuan(item.getUsableMoney())}<#if Amounts.toYuan(item.getFreezeMoney())=0>0<#else>${Amounts.toYuan(item.getFreezeMoney())}<#if Amounts.toYuan(item.getSumMoney())=0>0<#else>${Amounts.toYuan(item.getSumMoney())}${Sqls.toDateTimeString(item.getOperatorTime())}${item.getOperatorRemark()}
            +
            + ${zhiqim_manager_paging(pageResult, "/virtualAccountDetails.htm")} +
            +${zhiqim_manager_content_end()} diff --git a/Yangcai365_design/manage/zview/account/virtualAccountTransactionDetails.zml b/Yangcai365_design/manage/zview/account/virtualAccountTransactionDetails.zml new file mode 100644 index 0000000..2c4349c --- /dev/null +++ b/Yangcai365_design/manage/zview/account/virtualAccountTransactionDetails.zml @@ -0,0 +1,76 @@ +${Styles.htmlOverflowHidden()} +${Scripts.src("/zinc/js/global_2019010801.js")} +${yangcai_calc_Left_width_height(400, 70)} +${zhiqim_manager_content()} + +<#-- 导航栏 --> +
            + +
            + <#-- 查询条件 --> + ${zhiqim_manager_title("查询条件")} +
            + + + + + + + + +
             交易流水: + +  订单号: + +  交易类型: + +  交易时间: + - + + +   + +
            +
            +
            + <#-- 分页列表--> +
            + + + + + + + + + + <#if pageResult.size() == 0> + ${zhiqim_manager_no_record(26,"暂不存在交易明细")} + + <#for item : pageResult.list()> + + + + + + + + + +
            交易流水订单号产品类型交易时间交易类型订单金额(元)
            ${item.getTransactionBlotter()}<#if item.getDesignId()=0>/<#else>${item.getDesignId()}<#if item.getOrderText()=null>/<#else>${item.getOrderText()}${Sqls.toDateTimeString(item.getTransactionTime())}${VirtualAccountConstants.getTransactionStatusListDesc(item.getTransactionStatus()+"")} + <#if status=999 && item.getTransactionStatus()==101>${Amounts.toYuan(-item.getOrderMoney())}<#else>${Amounts.toYuan(item.getOrderMoney())} +
            +
            + ${zhiqim_manager_paging(pageResult, "/virtualAccountTransactionDetails.htm")} +
            +${zhiqim_manager_content_end()} diff --git a/Yangcai365_design/manage/zview/after/afterBlameReturn.zml b/Yangcai365_design/manage/zview/after/afterBlameReturn.zml new file mode 100644 index 0000000..99b637b --- /dev/null +++ b/Yangcai365_design/manage/zview/after/afterBlameReturn.zml @@ -0,0 +1,641 @@ +${Styles.htmlOverflowHidden()} +${Scripts.src("/zinc/js/global_2019010801.js")} +${yangcai_calc_Left_width_height(340, 110)} + + +${zhiqim_manager_breadcrumb("售后申诉单列表")} +${zhiqim_manager_content()} + +<#-- 导航 --> +
            + +
            + +<#-- 左侧功能 --> +
            + <#-- 查询条件 --> + ${zhiqim_manager_title("查询条件")} +
            + + + + + + + + + + + + + + +
            售后单号:订 单 号 : + 创建时间: +  -  + +
            责 任 人 : + + 处理状态: + + +
            +
            + + <#-- 操作功能 --> +
            + <#if ZmrPathRule.check(request, "openWangWang")> + <#if ZmrPathRule.check(request, "/afterBlameReturnCheck.htm")> +
            + + <#-- 列表--> +
            + + + + + + + + + + + + + + + + + + + + + + ${zhiqim_manager_tr_no_record(pageResult, 23, "暂时没有订单信息")} + <#for item : pageResult.list()> + + + + + + + + + + + + + + + + + + + + + +
            选择售后单号责任组织设计单号商户处理状态售后原因产品店铺旺旺号特殊工艺订单金额创建时间设计师联系人对稿手机对稿微信新补单号
            ${item.getDesignAfsId()}${ZmrOrgDao.getOrgName(request, item.getPicOrgId())}${item.getDesignId()}${Global.get(DesignMerchantCache.class).getName(item.getMerchantId())}${AfterConstants.statusHtml(item.getAfterStatus())}${item.getProblemDesc()}${item.getOrderText()}${item.getShopNick()}${item.getBuyerNick()}${item.getPrintSpecial()}${Amounts.toYuanMustRadix(item.getAmount())}${Sqls.toDateTimeString(item.getAfterCreateTime())}${item.getDesigner()}${item.getUserContact()}${item.getUserMobile()}${item.getUserWx()}<#if item.getNewDesignId() gt 0>${item.getNewDesignId()}
            +
            + ${zhiqim_manager_paging(pageResult, "afterBlameReturn.htm")} +
            +${zhiqim_manager_content_end()} + +<#--右侧文件信息--> +
            +
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            产品信息:
            请选择订单
            问题描述:
            +
            +
            +
            + + 售后文件 + +
            +
            +
            +
            + + 设计文件 + +
            +
            +
            +
            + + 印刷文件 + +
            +
            +
            +
            +
            +
            + +<#-- 联系旺旺&联系QQ弹窗框 --> + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/after/designAfterOrder.zml b/Yangcai365_design/manage/zview/after/designAfterOrder.zml new file mode 100644 index 0000000..8e894bc --- /dev/null +++ b/Yangcai365_design/manage/zview/after/designAfterOrder.zml @@ -0,0 +1,551 @@ +${Styles.htmlOverflowHidden()} +${Scripts.src("/zinc/js/global_2019010801.js")} +${yangcai_calc_Left_width_height(340, 110)} + + +${zhiqim_manager_breadcrumb("售后单列表")} +${zhiqim_manager_content()} +<#-- 导航 --> +
            + +
            + +<#-- 左侧功能 --> +
            + <#-- 查询条件 --> + ${zhiqim_manager_title("查询条件")} +
            + + + + + + + + + + + + + + +
            售后单号:订 单 号 : + 创建时间: +  -  + +
            设 计 师 : + + 处理状态: + + + +
            +
            + + <#-- 操作功能 --> +
            + <#if ZmrPathRule.check(request, "openWangWang")> + +
            + + <#-- 列表--> +
            + + + + + + + + + + + + + + + + + + + + + + + ${zhiqim_manager_tr_no_record(pageResult, 21, "暂时没有订单信息")} + <#for item : pageResult.list()> + + + + + + + + + + + + + + + + + + + + + + +
            选择售后单号责任组织订单号处理状态损失金额售后原因产品店铺旺旺号特殊工艺订单金额创建时间设计师联系人对稿微信新补单号申诉拒绝原因申诉拒绝时间
            ${item.getDesignAfsId()}${ZmrOrgDao.getOrgName(request, item.getPicOrgId())}${item.getDesignId()}${AfterConstants.statusHtml(item.getAfterStatus())}${item.getLossAmount()}${item.getProblemDesc()}${item.getOrderText()}${item.getShopNick()}${item.getBuyerNick()}${item.getPrintSpecial()}${Amounts.toYuanMustRadix(item.getAmount())}${Sqls.toDateTimeString(item.getAfterCreateTime())}${item.getDesigner()}${item.getUserContact()}${item.getUserWx()}<#if item.getNewDesignId() gt 0>${item.getNewDesignId()}${item.getAfterReturnNote()}${Sqls.toDateTimeString(item.getAfterBlameReturnTime())}
            +
            + ${zhiqim_manager_paging(pageResult, "designAfterOrder.htm")} +
            +${zhiqim_manager_content_end()} + +<#--右侧文件信息--> +
            +
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            产品信息:
            请选择订单
            问题描述:
            +
            +
            +
            + + 售后文件 + +
            +
            +
            +
            + + 设计文件 + +
            +
            +
            +
            + + 印刷文件 + +
            +
            +
            +
            +
            +
            + +<#-- 联系旺旺&联系QQ弹窗框 --> + diff --git a/Yangcai365_design/manage/zview/after/handledAfterOrder.zml b/Yangcai365_design/manage/zview/after/handledAfterOrder.zml new file mode 100644 index 0000000..f99be26 --- /dev/null +++ b/Yangcai365_design/manage/zview/after/handledAfterOrder.zml @@ -0,0 +1,533 @@ +${Styles.htmlOverflowHidden()} +${Scripts.src("/zinc/js/global_2019010801.js")} +${yangcai_calc_Left_width_height(340, 110)} + + +${zhiqim_manager_breadcrumb("我导致的售后单")} +${zhiqim_manager_content()} +<#-- 导航 --> +
            + +
            + +<#-- 左侧功能 --> +
            + <#-- 查询条件 --> + ${zhiqim_manager_title("查询条件")} +
            + + + + + + + + + + +
            售后单号:订 单 号 : + 创建时间: +  -  + +
            责 任 人 : + +
            +
            + + <#-- 操作功能 --> +
            + <#if ZmrPathRule.check(request, "openWangWang")> +
            + + <#-- 列表--> +
            + + + + + + + + + + + + + + + + + + + + + + ${zhiqim_manager_tr_no_record(pageResult, 19, "暂时没有订单信息")} + <#for item : pageResult.list()> + + + + + + + + + + + + + + + + + + + + + +
            选择售后单号责任组织设计单号处理状态损失金额售后原因产品店铺旺旺号特殊工艺订单金额创建时间设计师联系人对稿手机对稿微信新补单号
            ${item.getDesignAfsId()}${ZmrOrgDao.getOrgName(request, item.getPicOrgId())}${item.getDesignId()}${AfterConstants.statusHtml(item.getAfterStatus())}${item.getLossAmount()}${item.getProblemDesc()}${item.getOrderText()}${item.getShopNick()}${item.getBuyerNick()}${item.getPrintSpecial()}${Amounts.toYuanMustRadix(item.getAmount())}${Sqls.toDateTimeString(item.getAfterCreateTime())}${item.getDesigner()}${item.getUserContact()}${item.getUserMobile()}${item.getUserWx()}<#if item.getNewDesignId() gt 0>${item.getNewDesignId()}
            +
            + ${zhiqim_manager_paging(pageResult, "designAfterOrder.htm")} +
            +${zhiqim_manager_content_end()} + +<#--右侧文件信息--> +
            +
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            产品信息:
            请选择订单
            问题描述:
            +
            +
            +
            + + 售后文件 + +
            +
            +
            +
            + + 设计文件 + +
            +
            +
            +
            + + 印刷文件 + +
            +
            +
            +
            +
            +
            + +<#-- 联系旺旺&联系QQ弹窗框 --> + diff --git a/Yangcai365_design/manage/zview/after/personalAfterOrder.zml b/Yangcai365_design/manage/zview/after/personalAfterOrder.zml new file mode 100644 index 0000000..fbb8bfe --- /dev/null +++ b/Yangcai365_design/manage/zview/after/personalAfterOrder.zml @@ -0,0 +1,337 @@ +${Styles.htmlOverflowHidden()} +${Scripts.src("/zinc/js/global_2019010801.js")} +${yangcai_calc_Left_width_height(340, 110)} + + +${zhiqim_manager_breadcrumb("售后单列表")} +${zhiqim_manager_content()} +<#-- 导航 --> +
            + +
            + +<#-- 左侧功能 --> +
            + <#-- 查询条件 --> + ${zhiqim_manager_title("查询条件")} +
            + + + + + + + + + + + + + + + +
            售后单号:订 单 号 : + 创建时间: +  -  + +
            责 任 人 : + + 处理状态: + + +
            +
            + + <#-- 操作功能 --> +
            +
            + + <#-- 列表--> +
            + + + + + + + + + + + + + + + + + + + + ${zhiqim_manager_tr_no_record(pageResult, 23, "暂时没有订单信息")} + <#for item : pageResult.list()> + + + + + + + + + + + + + + + + + + + +
            选择售后单号责任组织设计单号处理状态售后原因产品旺旺号特殊工艺订单金额创建时间责任人联系人对稿手机对稿微信新补单号
            ${item.getDesignAfsId()}${ZmrOrgDao.getOrgName(request, item.getPicOrgId())}${item.getDesignId()}${AfterConstants.statusHtml(item.getAfterStatus())}${item.getProblemDesc()}${item.getOrderText()}${item.getBuyerNick()}${item.getPrintSpecial()}${Amounts.toYuanMustRadix(item.getAmount())}${Sqls.toDateTimeString(item.getAfterCreateTime())}${item.getAfterBlamer()}${item.getUserContact()}${item.getUserMobile()}${item.getUserWx()}<#if item.getNewDesignId() gt 0>${item.getNewDesignId()}
            +
            + ${zhiqim_manager_paging(pageResult, "personalAfterOrder.htm")} +
            +${zhiqim_manager_content_end()} + +<#--右侧文件信息--> +
            +
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            产品信息:
            请选择订单
            问题描述:
            +
            +
            +
            + + 售后文件 + +
            +
            +
            +
            + + 设计文件 + +
            +
            +
            +
            + + 印刷文件 + +
            +
            +
            +
            +
            +
            + +<#-- 联系旺旺&联系QQ弹窗框 --> + diff --git a/Yangcai365_design/manage/zview/after/waitHandleAfterOrder.zml b/Yangcai365_design/manage/zview/after/waitHandleAfterOrder.zml new file mode 100644 index 0000000..9e774e6 --- /dev/null +++ b/Yangcai365_design/manage/zview/after/waitHandleAfterOrder.zml @@ -0,0 +1,652 @@ +${Styles.htmlOverflowHidden()} +${Scripts.src("/zinc/js/global_2019010801.js")} +${Scripts.src(zhiqim_uploadlarge.js)} +${yangcai_calc_Left_width_height(340, 110)} + + +${zhiqim_manager_breadcrumb("我的售后")} +${zhiqim_manager_content()} +<#-- 导航栏 --> +
            + +
            + +<#-- 左侧功能 --> +
            + <#-- 查询条件 --> + ${zhiqim_manager_title("查询条件")} +
            + + + + + + + + + + +
            订 单 号 : 旺 旺 号: + 创建时间: +  -  + +
            处理状态: + +
            +
            + + <#-- 操作功能 --> +
            + + +
            + + <#-- 列表--> +
            + + + + + + + + + + + + + + + + + ${zhiqim_manager_tr_no_record(pageResult, 18, "暂时没有订单信息")} + <#for item : pageResult.list()> + + + + + + + + <#if item.getAfterCreateTime().getTime() gte lNowTime> + + <#else> + + + + + + + + + + + +
            选择订单号旺旺号处理状态损失金额赔付金额 *售后原因产品特殊工艺创建时间新补单号申诉拒绝原因申诉拒绝时间
            ${item.getDesignId()}${item.getBuyerNick()}${AfterConstants.statusHtml(item.getAfterStatus())}${item.getLossAmount()}${(item.getLossAmount()*Long.parseLong(ParamDao.getString("yangcai.web","AfterPayProportion")))/100}${item.getLossAmount()}${item.getProblemDesc()}${item.getOrderText()}${item.getPrintSpecial()}${Sqls.toDateTimeString(item.getAfterCreateTime())}<#if item.getNewDesignId() gt 0>${item.getNewDesignId()}${item.getAfterBlameReturnNote()}${Sqls.toDateTimeString(item.getAfterModifyTime())}
            +
            + ${zhiqim_manager_paging(pageResult, "waitHandleAfterOrder.htm")} +
            +${zhiqim_manager_content_end()} + +<#--右侧文件信息--> +
            +
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            产品信息:
            请选择订单
            问题描述:
            +
            +
            +
            + + 售后文件 + +
            +
            +
            +
            + + 设计文件 + +
            +
            +
            +
            + + 印刷文件 + +
            +
            +
            +
            + + 编辑器文件 + +
            +
            +
            +
            +
            +
            + +<#-- 联系旺旺&联系QQ弹窗框 --> + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/allOrderDetail.zml b/Yangcai365_design/manage/zview/allOrderDetail.zml new file mode 100644 index 0000000..d344905 --- /dev/null +++ b/Yangcai365_design/manage/zview/allOrderDetail.zml @@ -0,0 +1,863 @@ +${Styles.htmlOverflowYAuto()} +${Scripts.src(zhiqim_uploadlarge.js)} + + + + + +
            +
            +
            返回
            + 订单详情 +
            +
            +
            +
            +
            +
            +
            +
            第1步
            +

            任务接单

            ${Sqls.toDateTimeString(order.getDesignBeginTime())}

            +
            +
            +
            +
            第2步
            +

            完成初稿

            +
            + <#--
            完成初稿
            --> +
            +
            +
            第3步
            +

            定稿审核

            +
            +
            完成定稿
            +
            +
            +
            第4步
            +

            印前审核

            +
            +
            +
            +
            第5步
            +

            订单完成

            +
            +
            +
            +
            +
            产品信息
            复制文件名
            +
            +
            ${order.getOrderText()}
            + <#if !order.isOnlyDesign()> + 收货信息:${order.getReceiverName()} ${order.getUserMobile()} ${order.getReceiverState()} ${order.getReceiverCity()} ${order.getReceiverDistrict()} ${order.getReceiverAddress()} + +
            +
            +
            +
            +
            设计师文件
            + <#if checkToken != ""> + <#if designOrder.getTemplateId() != 0> + 重新设计 + <#else> + + + 绑定客户模板文件 + <#else> + 渲染服务器出问题了,拿不到数据,请联系管理员处理 + + + +
            +
            + <#if order.getDraftType() != 0> + + + + <#if designOrder.getTemplateId() != 0 && checkToken != ""> + + + +
            +
            + + <#for item : attaList> + <#if order.isOnlyDesign()> + display:none"> + + + + <#elseif item.getType() == "file" && item.getId() != "CustomFile"> + + display:none"> + + + + + + + + + +
            +
            ${item.getName()}
            +
            + <#if item.getId()=="TbzFile" && checkToken != ""> + 编辑器文件
            (注:不要随意删除,文件删除后必须点击代编修改保存后才可重新同步) + <#else> + 请上传设计稿件
            (支持稿件类型:${designType.getDesignFileType()}) + +
            + +
            + +
            + <#if designOrder.getTemplateId() != 0 && item.getId()=="DesginFile" && checkToken != "" && order.getStatus() lt 55 > + + + <#for atta : fileList> + <#if checkToken != "" && Validates.isEqual(atta.getAttaModul(), item.getId())> +
            +
            + +
            +
            下载
            + +
            +
            +

            ${atta.getFileName()}

            +
            + + +
            +
            +
            ${item.getName()}
            +
            + <#if item.getId()=="DesginFile">请上传设计稿件
            (支持稿件类型:${designType.getDesignFileType()}) + <#elseif item.getId()=="EndFile">请根据产品格式要求上传定稿转曲印刷文件
            (支持稿件类型:${designType.getPrintingFileType()}) + <#elseif item.getId()=="WorkFile">请将带后加工产品详细工艺标示出来,并在图片上备注清楚 + <#elseif item.getId()=="TbzFile" && checkToken != "">编辑器文件
            (注:不要随意删除,文件删除后必须点击代编修改保存后才可重新同步) + +
            +
            + +
            + <#for atta : fileList> + <#if checkToken != "" && Validates.isEqual(atta.getAttaModul(), item.getId())> +
            +
            + +
            +
            下载
            + +
            +
            +

            ${atta.getFileName()}

            +
            + + + <#if checkToken != "" && designOrder.getTemplateId() != 0 && item.getId()=="DesginFile" && order.getStatus() lt 55> + + +
            +
            +
            初稿缩略图
            +
            +
            + <#if order != null> +
            + +
            +
            +
            +
            +
            +
            +
            +
            联系客户
            +
            注意:如果客户问你是哪个店铺的设计师,请告诉客户你是【领淘设计】的设计师
            +
            +
            +
            联系方式
            +
            + +
            +
            +
            +
            客户资料
            +
            ${order.getUserText()}
            +
            +
            +
            客户素材
            +
            +
            +
            + + 全选 +
            + +
            + <#for atta : fileList> + + <#if atta.getAttaModul() == "CustomFile"> +
            + + ${atta.getFileName()} +
            + + +
            +
            + <#if Validates.isNotEmptyBlank(order.getPrintSpecial())> +
            +
            特殊工艺
            +
            ${order.getPrintSpecial()}
            +
            + + <#if Validates.isNotEmptyBlank(order.getServicesMessage())> +
            +
            客服备注
            +
            ${order.getServicesMessage()}
            +
            + +
            +
            +
            +
            交稿规范
            + + +
            +
            +
            + +
            +
            +
            +
            + diff --git a/Yangcai365_design/manage/zview/article/article.zml b/Yangcai365_design/manage/zview/article/article.zml new file mode 100644 index 0000000..e111796 --- /dev/null +++ b/Yangcai365_design/manage/zview/article/article.zml @@ -0,0 +1,44 @@ + + +<#-- 导航 --> +
            + +
            + +<#-- 列表 --> + + + + + + + + +${zhiqim_manager_tr_no_record(articlePage, 5, "暂时没有文章信息")} +<#for item : articlePage.list()> + + + + + + + + +
            选择文章状态文章所属分类文章标题发表时间
            <#if item.getArticleStatus()==0>正常<#else>停用${item.getCategoryName()}${item.getArticleTitle()}${Sqls.toDateTimeString(item.getArticleTime())}
            +${zhiqim_manager_paging(articlePage, "article.htm")} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/article/articleAdd.zml b/Yangcai365_design/manage/zview/article/articleAdd.zml new file mode 100644 index 0000000..6526474 --- /dev/null +++ b/Yangcai365_design/manage/zview/article/articleAdd.zml @@ -0,0 +1,65 @@ +<#def designatedPath="/category.htm"/> +${request.getValidateScript()} +${zhiqim_manager_history ("article.htm")} + +${zhiqim_manager_breadcrumb_parent ("article.htm", "知识库内容", "增加文章")} +${zhiqim_manager_content()} +
            + + + + + + + + + + + + + + + + + + + +
            增加文章
            所属分类:(请选择) +  * +
            分类状态:(请选择) +  * +
            文章标题:(32位不定长字符) *
            +
            文章内容:(不能超过25000个字符) *
            +
            + +
            +
            +${zhiqim_manager_submit()} +
            +${zhiqim_manager_content_end()} + + + + diff --git a/Yangcai365_design/manage/zview/article/articleModify.zml b/Yangcai365_design/manage/zview/article/articleModify.zml new file mode 100644 index 0000000..190f967 --- /dev/null +++ b/Yangcai365_design/manage/zview/article/articleModify.zml @@ -0,0 +1,61 @@ +<#def designatedPath="/category.htm"/> +${request.getValidateScript()} +${zhiqim_manager_history ("article.htm")} + +${zhiqim_manager_breadcrumb_parent ("article.htm", "知识库内容", "修改文章")} +${zhiqim_manager_content()} +
            + + + + + + + + + + + + + + + + + + + + +
            修改文章
            所属分类:(请选择) +  * +
            分类状态:(请选择) +  * +
            文章标题:(32位不定长字符) *
            +
            文章内容:(不能超过25000个字符) *
            +
            + +
            +
            +${zhiqim_manager_submit()} +
            +${zhiqim_manager_content_end()} + + + + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/article/category.zml b/Yangcai365_design/manage/zview/article/category.zml new file mode 100644 index 0000000..98577e0 --- /dev/null +++ b/Yangcai365_design/manage/zview/article/category.zml @@ -0,0 +1,78 @@ +${zhiqim_manager_content()} +<#-- 显示子分类,并递归显示下级子分类 --> +<#function showChildCategory(self, parent)> + + + ${self.self().getCategoryId()} + + <#var level = self.self().getCategoryLevel()/> + <#if level == 0> + + <#else> + <#for i : 1..(level-1)> + <#if self.isLastNode(level-i)> + + <#else> + + + + <#if self.isLastNode()> + + <#else> + + + + + #{self.self().getCategoryName()} + + <#if self.self().getCategoryStatus() == 0>正常<#else>停用 + ${self.self().getCategoryLevel()} + +<#for child : self.children()> +${showChildCategory(child, self)} + + + +${zhiqim_manager_breadcrumb ("知识库分类")} + +<#-- 导航 --> +
            + +
            + +<#-- 列表 --> + + + + + + + + +<#if size == 0> +${zhiqim_manager_no_record(5, "暂时没有分类信息")} +<#else> + + + + + + + +<#for child : tree.children()> +${showChildCategory(child, tree)} + + +
            选择分类编号分类名称分类状态分类级别
            ${tree.self().getCategoryId()}#{tree.self().getCategoryName()}<#if tree.self().getCategoryStatus() == 0>正常<#else>停用${tree.self().getCategoryLevel()}
            +${zhiqim_manager_list(size)} +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/article/categoryAdd.zml b/Yangcai365_design/manage/zview/article/categoryAdd.zml new file mode 100644 index 0000000..b25eccd --- /dev/null +++ b/Yangcai365_design/manage/zview/article/categoryAdd.zml @@ -0,0 +1,37 @@ +<#def designatedPath="/category.htm"/> +${request.getValidateScript()} +${zhiqim_manager_history ("category.htm")} + +${zhiqim_manager_breadcrumb_parent ("category.htm", "知识库分类", "增加分类")} +${zhiqim_manager_content()} +
            + + + + + + + + + + + + + + + + + + + + + + +
            增加分类
            上级分类:(32位不定长字符)${category.getCategoryName()}
            分类名称:(32位不定长字符) *
            分类状态:(请选择) +  * +
            分类排序数:(填整型) *
            +${zhiqim_manager_submit()} +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/article/categoryModify.zml b/Yangcai365_design/manage/zview/article/categoryModify.zml new file mode 100644 index 0000000..1168534 --- /dev/null +++ b/Yangcai365_design/manage/zview/article/categoryModify.zml @@ -0,0 +1,41 @@ +<#def designatedPath="/category.htm"/> +${request.getValidateScript()} +${zhiqim_manager_history ("category.htm")} + +${zhiqim_manager_breadcrumb_parent ("category.htm", "知识库分类", "修改分类")} +${zhiqim_manager_content()} +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            修改分类
            分类编号:(自定义)${category.getCategoryId()}
            上级分类:(32位不定长字符)${parent.getCategoryName()}
            分类名称:(32位不定长字符) *
            分类状态:(请选择) +  * +
            分类排序数:(填整型) *
            +${zhiqim_manager_submit()} +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/article/question.zml b/Yangcai365_design/manage/zview/article/question.zml new file mode 100644 index 0000000..2e704b1 --- /dev/null +++ b/Yangcai365_design/manage/zview/article/question.zml @@ -0,0 +1,125 @@ +<#def title = "扬彩帮助中心"/> +<#def keywords = "帮助中心"/> +<#def desc = "扬彩帮助中心"/> +<#--头部起始--> + + + +扬彩知识库 + + + + + + + +${Styles.src(zhiqim.css)} +${Scripts.src(zhiqim.js)} +${Styles.src(context.getRootPath("/zinc/css/yangcai_question_main_v1.4.0R2018031701.css"))} +${Scripts.src(context.getRootPath("/zinc/css/zhiqim_search_auto_list_v1.4.0R2018031701.js"))} + + + + +
            + + +<#--容器开始--> + + + + +
            + +
            + + + +
            +
            + + <#if articleStr != null> +
            + ${articleStr}
            +
            +
            + ${content} +
            + + <#elseif !articleList.isEmpty()> +
            + <#for article : articleList> +
            ${article.getArticleTitle()}${article.getArticleTime().toString().substring(0, article.getArticleTime().toString().length() - 2)}
            + +
            + <#else> +

            没有找到相关项目

            + +
            +
            + + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/article/search.zml b/Yangcai365_design/manage/zview/article/search.zml new file mode 100644 index 0000000..b97f161 --- /dev/null +++ b/Yangcai365_design/manage/zview/article/search.zml @@ -0,0 +1,120 @@ +<#def title = "扬彩知识库"/> +<#def keywords = "知识库"/> +<#def desc = "扬彩知识库"/> +<#--头部起始--> + + + +扬彩知识库 + + + + + + + +${Styles.src(zhiqim.css)} +${Scripts.src(zhiqim.js)} +${Styles.src(context.getRootPath("/zinc/css/yangcai_question_main_v1.4.0R2018031701.css"))} +${Scripts.src(context.getRootPath("/zinc/css/zhiqim_search_auto_list_v1.4.0R2018031701.js"))} + + + +<#--容器开始--> +
            + + + + +
            + +
            + + + +
            +
            +
            搜索结果: + ${keyword}  共找到  + ${articleList.size()} 个结果 +
            +
            + <#for article : articleList> +
            ${article.getArticleTitle()}
            +
            ${contentList.get(articleList.indexOf(article))}
            + + <#if articleList.size()==0> +

            没有找到相关项目

            + +
            +
            +
            +
            + + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/attaFileList.zml b/Yangcai365_design/manage/zview/attaFileList.zml new file mode 100644 index 0000000..da149e0 --- /dev/null +++ b/Yangcai365_design/manage/zview/attaFileList.zml @@ -0,0 +1,403 @@ +${Styles.htmlOverflowYAuto()} +${Scripts.src(zhiqim_uploadlarge.js)} + +${Htmls.toCallFrame()} + + +<#for item : attaList> +<#if item.getId() == "copy"> + + + + + + <#if Validates.isNotEmpty(order)> + + <#else> + + + + +<#if item.getId() == "userText" && Validates.isNotEmptyBlank(order.getUserText())> + + + + + + + + +<#if item.getId() == "userNotice" && Validates.isNotEmptyBlank(order.getUserNotice())> + + + + + + + + +<#if item.getType() == "file"> + + + + + + + + + +<#if item.getType() == "thumFile"> + + + + + + + + +<#if item.getType() == "firstThumFile"> + + + + + + + + + + + + +<#if Validates.isNotEmptyBlank(order.getServicesMessage())> + + + + + + + +
            产品信息: + + + + +
            ${order.getDesignId()}-${order.getBuyerNick()}-${order.getOrderText()}
            客户文本
            + +
            注意事项
            + +
            + ${item.getName()} + + <#if item.getId() == "EndFile" && endFileLink != null> + + + + + +
            +
            z-h100<#elseif item.getName()=="印刷文件">z-h50<#else>z-h60"> + <#for atta : fileList> + <#if Validates.isEqual(atta.getAttaModul(), item.getId())> +
            showThumImg('${atta.getAttaId()}', '${atta.getFileType()}')" title="${atta.getFileName()}"> + ${atta.getFileName()}
            +
            + + +
            +
            ${item.getName()}:
            +
            <#if Validates.isNotEmpty(item.getSavePath())>
            +
            ${item.getName()}
            + <#if order != null> +
            + +
            客服留言
            + +
            diff --git a/Yangcai365_design/manage/zview/complain/complainDeal.zml b/Yangcai365_design/manage/zview/complain/complainDeal.zml new file mode 100644 index 0000000..354deeb --- /dev/null +++ b/Yangcai365_design/manage/zview/complain/complainDeal.zml @@ -0,0 +1,173 @@ +${sweet_alert_reuse_method()} + +${zhiqim_manager_content()} + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            客户旺旺:${order.getBuyerNick()}产品名称:${order.getOrderText()}
            店铺名称:${order.getShopNick()}设 计 师:${order.getDesigner()}录单时间:${Sqls.toDateTimeString(order.getCreateTime())}
            责任部门:${order.getUndertakeDept()}投诉类型:${order.getComplainType()}店铺扣罚:${order.getShopPunishScore()} 分
            处理方案:${order.getDisposeProject()}责任人:${order.getUndertakePerson()} + +
            备注:${order.getComplainSpecificText()} +
            受理截图 +
            + +
            +
            跟进截图: + <#if order.getComplainStatus() != 20> + +
            +
            +
            +
            +${zhiqim_manager_content_end()} + +<#-- 操作 --> +
            +
            + + + + + +
            订单受理人:受理时间:
            +
            +
            + <#if order.getComplainStatus() != 20>   + +
            +
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/complain/complainDetail.zml b/Yangcai365_design/manage/zview/complain/complainDetail.zml new file mode 100644 index 0000000..d091d99 --- /dev/null +++ b/Yangcai365_design/manage/zview/complain/complainDetail.zml @@ -0,0 +1,90 @@ + +${zhiqim_manager_content()} +
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            客户旺旺:${order.getBuyerNick()}产品名称:${order.getOrderText()}
            店铺名称:${order.getShopNick()}设 计 师:${order.getDesigner()}录单时间:${Sqls.toDateTimeString(order.getCreateTime())}
            责任部门:${order.getUndertakeDept()}投诉类型:${order.getComplainType()}店铺扣罚:${order.getShopPunishScore()} 分
            处理方案:${order.getDisposeProject()}责任人:${order.getUndertakePerson()} + +
            备注:${order.getComplainSpecificText()} +
            受理截图: +
            + +
            +
            跟进截图: + +
            +
            +${zhiqim_manager_content_end()} + +
            +
            + + + + + +
            订单受理人:受理时间:
            +
            +
            + +
            +
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/complain/complainFinishList.zml b/Yangcai365_design/manage/zview/complain/complainFinishList.zml new file mode 100644 index 0000000..de5d74f --- /dev/null +++ b/Yangcai365_design/manage/zview/complain/complainFinishList.zml @@ -0,0 +1,112 @@ +${Scripts.src("/zinc/chart/highcharts.js")} +${Scripts.src("/zinc/chart/exporting.js")} +${Scripts.src("/zinc/chart/highcharts-zh_CN.js")} + +${zhiqim_manager_breadcrumb("我导致的投诉")} +${zhiqim_manager_content()} + +<#-- 左侧功能 --> +<#-- 查询条件 --> +${zhiqim_manager_title("查询条件")} +
            + + + + + + + +
            + 受理时间: - + +  组  织 + + 责 任 人: + + + +
            +
            + + +<#-- 列表 --> + + + +
            + + + + + + + + + + + ${zhiqim_manager_tr_no_record(pageResult, 7, "暂时没有数据")} + <#for item : pageResult.list()> + + + + + + + + + + + ${zhiqim_manager_paging(pageResult, "/complainFinishList.htm")} +
            订单编号投诉单号责任组织责任人受理状态受理时间操作
            ${item.getDesignId()}${item.getComplainId()}${ZmrOrgDao.getOrgName(request,item.getUndertakeOrg())}${item.getUndertakePerson()}${ComplainConstants.getStatus(item.getComplainStatus())}${Sqls.toDateTimeString(item.getComplainAddTime())}
            +
            +${zhiqim_manager_content_end()} diff --git a/Yangcai365_design/manage/zview/complain/complainTotalOrderList.zml b/Yangcai365_design/manage/zview/complain/complainTotalOrderList.zml new file mode 100644 index 0000000..efa5599 --- /dev/null +++ b/Yangcai365_design/manage/zview/complain/complainTotalOrderList.zml @@ -0,0 +1,128 @@ + + + +${zhiqim_manager_breadcrumb("投诉单列表")} +${zhiqim_manager_content()} + +<#-- 导航 --> +
            + +
            + +<#-- 左侧功能 --> +<#-- 查询条件 --> +${zhiqim_manager_title("查询条件")} +
            + + + + + + + + + + + + + +
            订单编号:投诉单号:责 任 人: + + 旺旺号:
            + 受理状态: + 店铺名称: + + 受理时间: - + +
            +
            + +<#-- 操作功能 --> +
            + +
            + +<#-- 列表 --> +
            + + + + + + + + + + + + + + + + + + + + + ${zhiqim_manager_tr_no_record(pageResult, 17, "暂时没有投诉单")} + <#for item : pageResult.list()> + style="color:#8a8a8a;"<#elseif item.getComplainStatus()== "20">style="color:#000000;" ${zhiqim_manager_tr_onmouse()} ${zhiqim_manager_tr_click_radio()}> + + + + + + + + + + + + + + + + + + + +
            选择订单编号所属组织旺旺号店铺责任人责任主管责任组织协助人协助人主管协助组织受理状态受理时间产品订单金额投诉类型店铺扣分
            ${item.getDesignId()}

            style="color:#000000;"<#else>class="z-text-red">TS:${item.getComplainId()}

            ${ZmrOrgDao.getOrgName(request,item.getOrgId())}${item.getBuyerNick()}${item.getShopNick()}${item.getUndertakePerson()}${CalculationUtil.operatorGetDeptSatrap(item.getUndertakePerson())}${CalculationUtil.operatorGetOrgName(item.getUndertakePerson())}<#if item.getAssistPerson()==null><#else>${item.getAssistPerson()}<#if item.getAssistPerson()==null><#else>${CalculationUtil.operatorGetDeptSatrap(item.getAssistPerson())}${ZmrOrgDao.getOrgName(request, item.getAssistOrg())}${ComplainConstants.getStatus(item.getComplainStatus())}${Sqls.toDateTimeString(item.getComplainAddTime())}${item.getOrderText()}${Amounts.toYuanMustRadix(item.getAmount())}${item.getComplainType()}${item.getShopPunishScore()}分
            +
            +${zhiqim_manager_paging(pageResult, "/complainTotalOrderList.htm")} +${zhiqim_manager_content_end()} diff --git a/Yangcai365_design/manage/zview/complain/complainWantDealList.zml b/Yangcai365_design/manage/zview/complain/complainWantDealList.zml new file mode 100644 index 0000000..31c7b87 --- /dev/null +++ b/Yangcai365_design/manage/zview/complain/complainWantDealList.zml @@ -0,0 +1,125 @@ +${Scripts.src("/zinc/js/globalcomplain_2019010801.js")} + + +${zhiqim_manager_breadcrumb("我的投诉")} +${zhiqim_manager_content()} +<#-- 导航栏 --> +
            + +
            +<#-- 左侧功能 --> +<#-- 查询条件 --> +${zhiqim_manager_title("查询条件")} +
            + + + + + + + + + + + + +
            订单编号:投诉单号: + 受理状态: + 旺旺号:
            店铺名称: + + 受理时间: - + +
            +
            + +<#-- 操作功能 --> +
            + + +
            + +<#-- 列表 --> + + + + + + + + + + + + + ${zhiqim_manager_tr_no_record(pageResult, 17, "暂时没有待处理的投诉")} + <#for item : pageResult.list()> + + + + + + + + + + + + + + ${zhiqim_manager_paging(pageResult, "/complainWantDealList.htm")} +
            选择订单编号旺旺号店铺受理状态受理时间产品订单金额投诉类型
            ${item.getDesignId()}

            TS:${item.getComplainId()}

            ${item.getBuyerNick()}${item.getShopNick()}${ComplainConstants.getStatus(item.getComplainStatus())}${Sqls.toDateTimeString(item.getComplainAddTime())}${item.getOrderText()}${Amounts.toYuanMustRadix(item.getAmount())}${item.getComplainType()}
            +${zhiqim_manager_content_end()} + +<#-- 联系旺旺&联系QQ弹窗框 --> + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/des/H5DesignView.zml b/Yangcai365_design/manage/zview/des/H5DesignView.zml new file mode 100644 index 0000000..047a20e --- /dev/null +++ b/Yangcai365_design/manage/zview/des/H5DesignView.zml @@ -0,0 +1,23 @@ + + + +
            + +
            diff --git a/Yangcai365_design/manage/zview/des/inner/copyImage.zml b/Yangcai365_design/manage/zview/des/inner/copyImage.zml new file mode 100644 index 0000000..6e6a95a --- /dev/null +++ b/Yangcai365_design/manage/zview/des/inner/copyImage.zml @@ -0,0 +1,79 @@ + + + +${zhiqim_manager_content()} + +
            +
            +
            +     +   +
            +
            +

            +${zhiqim_manager_content_end()} + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/des/presenter/templateCardHistorySelect.zml b/Yangcai365_design/manage/zview/des/presenter/templateCardHistorySelect.zml new file mode 100644 index 0000000..78ab9c0 --- /dev/null +++ b/Yangcai365_design/manage/zview/des/presenter/templateCardHistorySelect.zml @@ -0,0 +1,22 @@ +<#if cardList.isEmpty()> +
            未查询到历史模板
            +<#else> + + +
            + <#for item : cardList> +
            + <#if item.getCardUrl() != null && item.getCardUrl() != ""> +
            + <#else> +
            + + + + +
            ${item.getId()}
            +
            + +
            + diff --git a/Yangcai365_design/manage/zview/des/presenter/templateCustomerPreviewInfo.zml b/Yangcai365_design/manage/zview/des/presenter/templateCustomerPreviewInfo.zml new file mode 100644 index 0000000..df0a8d3 --- /dev/null +++ b/Yangcai365_design/manage/zview/des/presenter/templateCustomerPreviewInfo.zml @@ -0,0 +1,14 @@ + +
            + <#for key : svgMap.keySet()> + <#var item = svgMap.get(key)/> +
            + <#if item != null> + <#for bg : item.getBgList()> +
            ${bg.getSvgCode()}
            + + +
            ${item.getMediaId()}
            +
            + +
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/des/presenter/templatePreviewCardListInfo.zml b/Yangcai365_design/manage/zview/des/presenter/templatePreviewCardListInfo.zml new file mode 100644 index 0000000..346244e --- /dev/null +++ b/Yangcai365_design/manage/zview/des/presenter/templatePreviewCardListInfo.zml @@ -0,0 +1,24 @@ +<#if cardList.isEmpty()> +
            请创建名片
            +<#else> + + +
            + <#for item : cardList> +
            + <#if item.getCardUrl() != null && item.getCardUrl() != ""> +
            + <#else> +
            + + + + + + +
            ${item.getId()}
            +
            + +
            + diff --git a/Yangcai365_design/manage/zview/des/presenter/templatePreviewInfo.zml b/Yangcai365_design/manage/zview/des/presenter/templatePreviewInfo.zml new file mode 100644 index 0000000..444b736 --- /dev/null +++ b/Yangcai365_design/manage/zview/des/presenter/templatePreviewInfo.zml @@ -0,0 +1,35 @@ +<#if svgMap.isEmpty()> +
            请选择模板
            +<#else> + +
            + <#for key : svgMap.keySet()> + <#var item = svgMap.get(key)/> +
            + <#if item != null> + <#for bg : item.getBgList()> +
            ${bg.getSvgCode()}
            + + + + + + +
            ${item.getMediaId()}
            +
            + +
            + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/des/presenter/templateQueryInfo.zml b/Yangcai365_design/manage/zview/des/presenter/templateQueryInfo.zml new file mode 100644 index 0000000..3447ab9 --- /dev/null +++ b/Yangcai365_design/manage/zview/des/presenter/templateQueryInfo.zml @@ -0,0 +1,70 @@ +<#if Validates.isEqual(queryType, "KEYWORD")> +
            +
            + + + + + +
            热词: + <#for item : subIndustryList> + ${item.getIndustrySubName()}  + +
            +
            +
            +<#elseif Validates.isEqual(queryType, "COLLECT")> +
            +
            + +
            +
            +<#else> +<#if pageResult.total() gt 0> +
            + 换一批 +
            + + + +
            + <#for item : pageResult.list()> + <#var key = item.getMediaId()/> + + +
            + +<#if pageResult.total()==0> +
            该关键词未查询到模板 请换其他关键词试试!
            + + +<#if Validates.isEqual(queryType, "KEYWORD") || Validates.isEqual(queryType, "COLLECT")> +
            + + + + +
            ${PagingGo.toHtmlClick(pageResult, "doKeywordQuery")}
            +
            + diff --git a/Yangcai365_design/manage/zview/des/templateCardPreview.zml b/Yangcai365_design/manage/zview/des/templateCardPreview.zml new file mode 100644 index 0000000..94fc96e --- /dev/null +++ b/Yangcai365_design/manage/zview/des/templateCardPreview.zml @@ -0,0 +1,318 @@ + +${request.getValidateScript()} +${Mydome()} + + + + +${zhiqim_manager_breadcrumb_parent("/designOrder.htm", "设计订单", "订单模板设计")} +
            +${Scripts.src("/zinc/js/global_2019010801.js")} +${Scripts.src("/zinc/js/zhiqim_search_auto_list.js")} + +
            + +
            + +<#-- 导航栏 --> +
            +
            + +
            + +<#-- 替换参数 --> +
            +
            +

            客户文本

            + +
            +
            +

            注意事项

            + +
            +
            + +<#-- 导航栏 --> +
            +
            +
            + +
            +
            +
            +
            + +${zhiqim_manager_content_end()} +<#-- 联系旺旺&联系QQ弹窗框 --> + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/des/templateCustomerPreview.zml b/Yangcai365_design/manage/zview/des/templateCustomerPreview.zml new file mode 100644 index 0000000..1059f17 --- /dev/null +++ b/Yangcai365_design/manage/zview/des/templateCustomerPreview.zml @@ -0,0 +1,63 @@ +${request.getValidateScript()} + + + + +
            diff --git a/Yangcai365_design/manage/zview/des/templatePreview.zml b/Yangcai365_design/manage/zview/des/templatePreview.zml new file mode 100644 index 0000000..0b9c1bd --- /dev/null +++ b/Yangcai365_design/manage/zview/des/templatePreview.zml @@ -0,0 +1,469 @@ +${request.getValidateScript()} +${Mydome()} + + + + +${zhiqim_manager_breadcrumb_parent("/designOrder.htm", "设计订单", "订单模板设计")} +
            +${Scripts.src("/zinc/js/global_2019010801.js")} +${Scripts.src("/zinc/js/zhiqim_search_auto_list.js")} + +
            + +
            + +<#-- 导航栏 --> +
            +
            + +
            + +<#-- 替换参数 --> +
            + + + + + +
            + + +
            +

            客户文本

            + +
            + + + +
            + +

            文本识别

            +
            + + +    + +
            + +
            + + +
            +

            +

            文本分析

            +
            +    + +
            + +
            + + + + +
            +
            +
            + +<#-- 导航栏 --> +
            +
            +
            + + +
            +
            + +
            + +
            + +${zhiqim_manager_content_end()} +<#-- 联系旺旺&联系QQ弹窗框 --> + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/designerworks/checkApproved.zml b/Yangcai365_design/manage/zview/designerworks/checkApproved.zml new file mode 100644 index 0000000..e5df1f2 --- /dev/null +++ b/Yangcai365_design/manage/zview/designerworks/checkApproved.zml @@ -0,0 +1,53 @@ + +
            + + +
            + + + + + + + + + +
            分配组织: + +
            接单规则: + +
            初始积分: + +
            +
            + +<#-- 操作 --> +
            + + +
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/designerworks/designerProfile.zml b/Yangcai365_design/manage/zview/designerworks/designerProfile.zml new file mode 100644 index 0000000..9f97e79 --- /dev/null +++ b/Yangcai365_design/manage/zview/designerworks/designerProfile.zml @@ -0,0 +1,67 @@ +${zhiqim_manager_breadcrumb("简介审核")} +${zhiqim_manager_content()} + +<#-- 导航 --> +
            + +
            + +<#-- 列表 --> +
            + +
            + + + + + + + +${zhiqim_manager_tr_no_record(pageResult, 39, "暂时没有介绍信息")} +<#for item : pageResult.list()> + + + + + + + +
            设计师审核内容提交时间操作
            ${item.getOperatorCode()}${item.getPersonalProfile()}${Sqls.toDateTimeString(item.getAddTime())} + + +
            +${zhiqim_manager_paging(pageResult, "/designerProfile.htm")} +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/designerworks/designerWorks.zml b/Yangcai365_design/manage/zview/designerworks/designerWorks.zml new file mode 100644 index 0000000..cbfa47f --- /dev/null +++ b/Yangcai365_design/manage/zview/designerworks/designerWorks.zml @@ -0,0 +1,112 @@ +${zhiqim_manager_breadcrumb("作品审核")} +${zhiqim_manager_content()} + + +<#-- 导航 --> +
            + +
            + +<#-- 列表 --> +
            + +
            +<#-- 列表 --> +${zhiqim_manager_tr_no_record(pageResult, 39, "
            暂时没有作品信息
            ")} +
            +<#for item : pageResult.list()> +
            +
            + + + + + +
            + 设计师: ${item.getOperatorCode()} 时间:${Sqls.toDateTimeString(item.getAddTime())} +
            +
            +
            + +
            +${zhiqim_manager_paging(pageResult, "/designerWorks.htm")} +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/designerworks/modifyOrderNum.zml b/Yangcai365_design/manage/zview/designerworks/modifyOrderNum.zml new file mode 100644 index 0000000..48ee53d --- /dev/null +++ b/Yangcai365_design/manage/zview/designerworks/modifyOrderNum.zml @@ -0,0 +1,31 @@ + +
            + 原数量:<#if operatorParam.isEmpty()>0<#else>${operatorParam} +
            +
            + 新数量: + * +
            +
            + + +
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/designerworks/profile.zml b/Yangcai365_design/manage/zview/designerworks/profile.zml new file mode 100644 index 0000000..423c230 --- /dev/null +++ b/Yangcai365_design/manage/zview/designerworks/profile.zml @@ -0,0 +1,427 @@ +${Scripts.src("/zinc/layui/layui.js")} + +${Scripts.src(zhiqim_uploadlarge.js)} + + +${zhiqim_manager_breadcrumb_name("个人中心")} +${zhiqim_manager_content()} +
            + + + + + + + + + + + + + + + + + + + +
            账号信息
            + + 用户昵称:#{operator.getOperatorCode()}登录密码:********  修改
            手机号码:<#if Validates.isNotEmpty(operator.getOperatorMobile())>${operator.getOperatorMobile()}  修改<#else>点击绑定个人微信: + <#if Validates.isNotEmpty(operator.getOperatorWxcode())>${operator.getOperatorWxcode()}  修改<#else>点击绑定
            + + + + + + + + + + +
            接单配置
            最大同时接单量:<#if Validates.isNotEmpty(operator.getOperatorParam())>${operator.getOperatorParam()}<#else>0  + 修改 + + 说明:正在设计状态订单总数超过最大同时接单数时,系统将不会自动派单(大于0规则才会生效) +
            + + + + + + + + + + + + + + + + + + + + + +
            个人简介
            +
            *工作经历 
            +
            +
            *软件能力 
            +
            +
            *擅长设计 
            +
            + * + 工作年限  + + * + 在职情况  + + * + 收款方式  +
            + *支付宝账号  + +
            +
            + +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/designerworks/regCheckBack.zml b/Yangcai365_design/manage/zview/designerworks/regCheckBack.zml new file mode 100644 index 0000000..e2d4f79 --- /dev/null +++ b/Yangcai365_design/manage/zview/designerworks/regCheckBack.zml @@ -0,0 +1,25 @@ + +
            + + 拒绝原因: + +
            +
            + + +
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/editor/editorSystem.zml b/Yangcai365_design/manage/zview/editor/editorSystem.zml new file mode 100644 index 0000000..2d390fd --- /dev/null +++ b/Yangcai365_design/manage/zview/editor/editorSystem.zml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/editor/iphoneLogin.zml b/Yangcai365_design/manage/zview/editor/iphoneLogin.zml new file mode 100644 index 0000000..6b51882 --- /dev/null +++ b/Yangcai365_design/manage/zview/editor/iphoneLogin.zml @@ -0,0 +1,281 @@ + + + + + + 【HTML+CSS】实现移动端高级简约的登录注册界面 + + ${Scripts.src(zhiqim_uploadlarge.js)} + + + +
            + + + +
            + + + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/editor/iphoneLogin1.zml b/Yangcai365_design/manage/zview/editor/iphoneLogin1.zml new file mode 100644 index 0000000..51f0c50 --- /dev/null +++ b/Yangcai365_design/manage/zview/editor/iphoneLogin1.zml @@ -0,0 +1,72 @@ + + + +${context.getContextName()} + + + +${Styles.src(zhiqim.css)} +${Scripts.src(zhiqim.js)} +${Scripts.src(jsencrypt.js)} +${Styles.htmlOverflowHidden()} + + + + + +<#-- Z.onload(function() +{//默认焦点 + if (Z.V.isEmpty(Z("#operatorCode").val())) + Z("#operatorCode").focus(); + else if (Z.V.isEmpty(Z("#operatorPass").val())) + Z("#operatorPass").focus(); + else if (Z("#verificationCode").length > 0) + Z("#verificationCode").focus(); + + Z(document).keydown(function(e) + { + if (Z.E.key(e) != Z.E.KEY.ENTER) + return; + + if (!Z.Dialog.cache.isEmpty()) + return; + + doLogin(); + }); +}); --> +<#-- 主题变量和函数定义 --> + +
            +
            欢迎登录简奈自助设计!
            +
            +
            +
            + + + + +
            + + + + + + + + + + + + +
            用户登录
            +
            +
            + + diff --git a/Yangcai365_design/manage/zview/editor/updateTemplateId.zml b/Yangcai365_design/manage/zview/editor/updateTemplateId.zml new file mode 100644 index 0000000..d8ef530 --- /dev/null +++ b/Yangcai365_design/manage/zview/editor/updateTemplateId.zml @@ -0,0 +1,34 @@ + +
            + 原模板文件id:<#if templateId.isEmpty()><#else>${templateId} +
            +
            + + 新模板文件id: + * +
            +
            + + +
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/keyword/keywordIndustryTop.zml b/Yangcai365_design/manage/zview/keyword/keywordIndustryTop.zml new file mode 100644 index 0000000..7006d01 --- /dev/null +++ b/Yangcai365_design/manage/zview/keyword/keywordIndustryTop.zml @@ -0,0 +1,41 @@ + + +${zhiqim_manager_breadcrumb("关键词排行榜")} +${zhiqim_manager_content()} + +<#-- 导航栏 --> +
            + +
            + +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/keyword/keywordTop.zml b/Yangcai365_design/manage/zview/keyword/keywordTop.zml new file mode 100644 index 0000000..d06eda8 --- /dev/null +++ b/Yangcai365_design/manage/zview/keyword/keywordTop.zml @@ -0,0 +1,130 @@ +${zhiqim_manager_breadcrumb("关键词排行榜")} +${zhiqim_manager_content()} + +<#-- 导航栏 --> +
            + +
            + + + + + + +
            +
            +
            +

            今日搜索榜

            +
            +
            + <#for item : threeList> +
            +
            +
            +
            ${item.getKeywordName()}
            +
            ${item.getKeywordNum()}
            +
            + +
            +
            +
              +
            • +
              关键词
              +
              指数
              升降    
              +
            • + <#for item : restList> +
            • +
              ${item.getKeywordName()}
              +
              ${item.getKeywordNum()}
              +
            • + +
            • +
              +
            • +
            +
            +
            +
            +
            +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/keyword/presenter/keywordIndustryTopInfo.zml b/Yangcai365_design/manage/zview/keyword/presenter/keywordIndustryTopInfo.zml new file mode 100644 index 0000000..806f790 --- /dev/null +++ b/Yangcai365_design/manage/zview/keyword/presenter/keywordIndustryTopInfo.zml @@ -0,0 +1,36 @@ +<#include "/ztmpl/zhiqim_manager/"+themeMain+"/define.htm"/> + + + + + +
            子行业: + <#for item : inSubList> + + +
            +
            + +
            +
            + + + + + + +<#for item : coreList> + + + + + + +
            排名关键词搜索次数
            ${item_index + 1}${item.getKeywordName()}${item.getKeywordNum()}
            +
            +
            +
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/label/labelAttribute.zml b/Yangcai365_design/manage/zview/label/labelAttribute.zml new file mode 100644 index 0000000..c6cce16 --- /dev/null +++ b/Yangcai365_design/manage/zview/label/labelAttribute.zml @@ -0,0 +1,64 @@ +${zhiqim_manager_breadcrumb("标签属性")} +${zhiqim_manager_content()} + +<#-- 导航栏 --> +
            + +
            + + + + + + + + + + + + +<#if pageResult.total() == 0> + ${zhiqim_manager_no_record(4 "暂时没有标签属性信息")} + +<#for item : pageResult.list()> + + + + + + + + +
             标签属性值列表
            选择行业名称属性名称属性值名称创建时间
            + <#for industry : industryList> + <#if item.getIndustryId() == industry.getIndustryId()>${industry.getIndustryName()} + + ${LabelPresenter.doAttributeCatName(item.getAttributeCatId())}${item.getAttributeName()}${Sqls.toDateTimeString(item.getCreateTime())}
            +${zhiqim_manager_paging(pageResult, "/labelAttribute.htm")} +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/label/labelAttributeAdd.zml b/Yangcai365_design/manage/zview/label/labelAttributeAdd.zml new file mode 100644 index 0000000..af2e35c --- /dev/null +++ b/Yangcai365_design/manage/zview/label/labelAttributeAdd.zml @@ -0,0 +1,68 @@ + + +${zhiqim_manager_history("/labelAttribute.htm")} +${request.getValidateScript()} +${zhiqim_manager_breadcrumb_parent("/labelAttribute.htm", "标签属性值", "增加标签属性值")} +
            +${zhiqim_manager_title("新增标签属性值")} +
            + + + + + + + + + + + + + +
            标签行业:(请选择) +  * +
            属性:(请选择) +  * +
            属性值:(逗号隔开) *
            +${zhiqim_manager_submit()} +
            +
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/label/labelAttributeCat.zml b/Yangcai365_design/manage/zview/label/labelAttributeCat.zml new file mode 100644 index 0000000..cc8ea55 --- /dev/null +++ b/Yangcai365_design/manage/zview/label/labelAttributeCat.zml @@ -0,0 +1,61 @@ +${zhiqim_manager_breadcrumb("标签属性分类")} +${zhiqim_manager_content()} +<#-- 属性分类栏 --> +
            + +
            + + + + + + + + + + + +<#if pageResult.total() == 0> + ${zhiqim_manager_no_record(4 "暂时没有标签属性信息")} + +<#for item : pageResult.list()> + + + + + + + +
             标签属性列表
            选择行业名称属性名称创建时间
            + <#for industry : industryList> + <#if item.getIndustryId() == industry.getIndustryId()>${industry.getIndustryName()} + + ${item.getAttributeCatName()}${Sqls.toDateTimeString(item.getCreateTime())}
            +${zhiqim_manager_paging(pageResult, "/labelAttributeCat.htm")} +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/label/labelAttributeCatAdd.zml b/Yangcai365_design/manage/zview/label/labelAttributeCatAdd.zml new file mode 100644 index 0000000..db33a57 --- /dev/null +++ b/Yangcai365_design/manage/zview/label/labelAttributeCatAdd.zml @@ -0,0 +1,25 @@ +${zhiqim_manager_history("/labelAttributeCat.htm")} +${request.getValidateScript()} +${zhiqim_manager_breadcrumb_parent("/labelAttributeCat.htm", "标签属性", "增加标签属性")} +
            +${zhiqim_manager_title("新增标签属性")} +
            + + + + + + + + + +
            标签行业:(请选择) +  * +
            标签属性名称:(64位不定长字符) *
            +${zhiqim_manager_submit()} +
            +
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/label/labelAttributeCatModify.zml b/Yangcai365_design/manage/zview/label/labelAttributeCatModify.zml new file mode 100644 index 0000000..6505765 --- /dev/null +++ b/Yangcai365_design/manage/zview/label/labelAttributeCatModify.zml @@ -0,0 +1,26 @@ +${zhiqim_manager_history("/labelAttributeCat.htm")} +${request.getValidateScript()} +${zhiqim_manager_breadcrumb_parent("/labelAttributeCat.htm", "标签属性", "修改标签属性")} +
            +${zhiqim_manager_title("修改标签属性")} +
            + + + + + + + + + + +
            标签行业:(请选择) +  * +
            标签属性名称:(64位不定长字符) *
            +${zhiqim_manager_submit()} +
            +
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/label/labelAttributeModify.zml b/Yangcai365_design/manage/zview/label/labelAttributeModify.zml new file mode 100644 index 0000000..b1bc38b --- /dev/null +++ b/Yangcai365_design/manage/zview/label/labelAttributeModify.zml @@ -0,0 +1,69 @@ + + +${zhiqim_manager_history("/labelAttribute.htm")} +${request.getValidateScript()} +${zhiqim_manager_breadcrumb_parent("/labelAttribute.htm", "标签属性值", "修改标签属性值")} +
            +${zhiqim_manager_title("修改标签属性值")} +
            + + + + + + + + + + + + + + +
            标签分类:(请选择) +  * +
            属性:(请选择) +  * +
            属性值名称:(64位不定长字符) *
            +${zhiqim_manager_submit()} +
            +
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/label/labelBrand.zml b/Yangcai365_design/manage/zview/label/labelBrand.zml new file mode 100644 index 0000000..98ac2d7 --- /dev/null +++ b/Yangcai365_design/manage/zview/label/labelBrand.zml @@ -0,0 +1,47 @@ +${zhiqim_manager_breadcrumb("标签品牌")} +${zhiqim_manager_content()} +<#-- 导航栏 --> +
            + +
            + + + + + + + + + + + + + +<#if pageResult.total() == 0> + ${zhiqim_manager_no_record(6 "暂时没有标签品牌信息")} + +<#for item : pageResult.list()> + + + + + + + + + +
             标签品牌列表
            选择排序品牌ID品牌名称产品类型状态
            ${item.getBrandSeq()}${item.getBrandId()}${item.getBrandName()}${Global.get(ProductTypeCache.class).getName(item.getTypeId())}<#if item.getBrandStatus() == 0>有效<#else>已停用
            +${zhiqim_manager_paging(pageResult, "/labelBrand.htm")} +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/label/labelBrandAdd.zml b/Yangcai365_design/manage/zview/label/labelBrandAdd.zml new file mode 100644 index 0000000..d99d096 --- /dev/null +++ b/Yangcai365_design/manage/zview/label/labelBrandAdd.zml @@ -0,0 +1,38 @@ +${zhiqim_manager_history("/labelBrand.htm")} +${request.getValidateScript()} +${zhiqim_manager_breadcrumb_parent("/labelBrand.htm", "标签品牌", "增加标签品牌")} +
            +${zhiqim_manager_title("新增标签品牌")} +
            + + + + + + + + + + + + + + + + + +
            标签分类:(请选择) +  * +
            标签品牌名称:(64位不定长字符) *
            序号:
            行业状态:(有效|停用) + +  *
            +${zhiqim_manager_submit()} +
            +
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/label/labelBrandModify.zml b/Yangcai365_design/manage/zview/label/labelBrandModify.zml new file mode 100644 index 0000000..154d215 --- /dev/null +++ b/Yangcai365_design/manage/zview/label/labelBrandModify.zml @@ -0,0 +1,39 @@ +${zhiqim_manager_history("/labelBrand.htm")} +${request.getValidateScript()} +${zhiqim_manager_breadcrumb_parent("/labelBrand.htm", "标签品牌", "修改标签品牌")} +
            +${zhiqim_manager_title("修改标签品牌")} +
            + + + + + + + + + + + + + + + + + + +
            标签分类:(请选择) +  * +
            标签品牌名称:(64位不定长字符) *
            序号:
            品牌状态:(有效|停用) +  * +
            +${zhiqim_manager_submit()} +
            +
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/label/labelIndustry.zml b/Yangcai365_design/manage/zview/label/labelIndustry.zml new file mode 100644 index 0000000..fef7915 --- /dev/null +++ b/Yangcai365_design/manage/zview/label/labelIndustry.zml @@ -0,0 +1,56 @@ + + +${zhiqim_manager_breadcrumb("标签行业")} +${zhiqim_manager_content()} +<#-- 导航栏 --> +
            + +
            + + + + + + + +
            + + + <#for item : indList> + + + + +
            标签导航
            ${item.getIndustryName()}
            +
            +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/label/labelIndustryAdd.zml b/Yangcai365_design/manage/zview/label/labelIndustryAdd.zml new file mode 100644 index 0000000..4b80a94 --- /dev/null +++ b/Yangcai365_design/manage/zview/label/labelIndustryAdd.zml @@ -0,0 +1,25 @@ +${zhiqim_manager_history("/labelIndustry.htm")} +${request.getValidateScript()} +${zhiqim_manager_breadcrumb_parent("/labelIndustry.htm", "标签行业", "增加标签行业")} +
            +${zhiqim_manager_title("新增标签行业")} +
            + + + + + + + + + +
            标签行业:(请选择) +  * +
            子行业名称:(逗号隔开) *
            +${zhiqim_manager_submit()} +
            +
            diff --git a/Yangcai365_design/manage/zview/label/labelIndustryModify.zml b/Yangcai365_design/manage/zview/label/labelIndustryModify.zml new file mode 100644 index 0000000..4b7989e --- /dev/null +++ b/Yangcai365_design/manage/zview/label/labelIndustryModify.zml @@ -0,0 +1,26 @@ +${zhiqim_manager_history("/labelIndustry.htm")} +${request.getValidateScript()} +${zhiqim_manager_breadcrumb_parent("/labelIndustry.htm", "标签行业", "修改标签行业")} +
            +${zhiqim_manager_title("修改标签行业")} +
            + + + + + + + + + + +
            标签行业:(请选择) +  * +
            子行业名称:(5000位不定长字符) *
            +${zhiqim_manager_submit()} +
            +
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/label/labelRelation.zml b/Yangcai365_design/manage/zview/label/labelRelation.zml new file mode 100644 index 0000000..b49aed8 --- /dev/null +++ b/Yangcai365_design/manage/zview/label/labelRelation.zml @@ -0,0 +1,80 @@ + + +
            +${zhiqim_manager_title("关联标签行业")} + + + + + + + + + + + + + +
            产品类型: ${Global.get(ProductTypeCache.class).getName(works.getDesignType())}
            标签行业:${Global.get(DesignIndustryCache.class).getIndustryName(works.getIndustryId())}
            标签子行业: + <#for item : inSubList> + + +

            +${zhiqim_manager_title("关联标签属性")} + +<#for item : attrCatList> + + + + + +
            ${item.getAttributeCatName()}: + <#for aitem : map.get(item.getAttributeCatId())> + + +
            +
            + + +
            +
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/label/presenter/industrySubInfo.zml b/Yangcai365_design/manage/zview/label/presenter/industrySubInfo.zml new file mode 100644 index 0000000..e7f0e17 --- /dev/null +++ b/Yangcai365_design/manage/zview/label/presenter/industrySubInfo.zml @@ -0,0 +1,26 @@ +<#include "/ztmpl/zhiqim_manager/"+themeMain+"/define.htm"/> + + + + + + + + + +<#for item : result> + + + + + + +<#if result.size() == 0> +${zhiqim_manager_no_record(4 "暂时没有相关信息")} + +
            [${Global.get(DesignIndustryCache.class).getIndustryName(industryId)}] 的子行业信息
            选择子行业名称创建时间
            ${item.getIndustrySubName()}${Sqls.toDateTimeString(item.getCreateTime())}
            + + + + +
            ${result.size()} 条数据
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/label/presenter/labelAttributeInfo.zml b/Yangcai365_design/manage/zview/label/presenter/labelAttributeInfo.zml new file mode 100644 index 0000000..d49af5b --- /dev/null +++ b/Yangcai365_design/manage/zview/label/presenter/labelAttributeInfo.zml @@ -0,0 +1,26 @@ +<#include "/ztmpl/zhiqim_manager/"+themeMain+"/define.htm"/> + + + + + + + + + +<#for item : result> + + + + + + +<#if result.size() == 0> +${zhiqim_manager_no_record(3 "暂时没有相关信息")} + +
            标签分类 [${labelName}] 的属性信息
            选择属性名称排序号
            ${item.getLabelName()}${item.getLabelOrder()}
            + + + + +
            ${result.size()} 条数据
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/mobileTemplate/mobileTemplateDetail.zml b/Yangcai365_design/manage/zview/mobileTemplate/mobileTemplateDetail.zml new file mode 100644 index 0000000..cfa0ad2 --- /dev/null +++ b/Yangcai365_design/manage/zview/mobileTemplate/mobileTemplateDetail.zml @@ -0,0 +1,33 @@ + + + + + + + 秒绘名片详情页 + + + + + + + + +
            +
            + + <#for path : Arrays.toStringArray(media.getMediaUrl())> +
            +
            + +
            +
            + +
            +
            1/${MobileTemplatePresenter.getTemplateDetailCount(media.getMediaUrl())}
            +
            + + 复制模板ID:${media.getMediaId()} +
            返回首页
            + + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/mobileTemplate/mobileTemplateHome.zml b/Yangcai365_design/manage/zview/mobileTemplate/mobileTemplateHome.zml new file mode 100644 index 0000000..ea8e305 --- /dev/null +++ b/Yangcai365_design/manage/zview/mobileTemplate/mobileTemplateHome.zml @@ -0,0 +1,671 @@ + + + + + + 扬彩设计模板库 + + + + + + + + + + + + + + + + + + +
            +
            +
            +
            +
            +
            +
            +
            + + + +
            + +
            +
            + + + +
            +
            + +
            +
            +
            +
            + <#for item : DesignTypeDao.listTemmplate()> + + ${item.getTypeName()} + + +
            +
            +
            +
            +
            +
            + +
            +
            +
            +
            +
            +
            + + +
            + +
            +
            + +

            模板详情

            +
            +
            +
            +
            +
            +
            +
            +
            +
            + +
            + +
            +
            +
            复制后发送设计师
            +
            +
            + + +
            +
            +
            +
            +
            + + + + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/mobileWorks/mobileWorkDetail.zml b/Yangcai365_design/manage/zview/mobileWorks/mobileWorkDetail.zml new file mode 100644 index 0000000..06080e3 --- /dev/null +++ b/Yangcai365_design/manage/zview/mobileWorks/mobileWorkDetail.zml @@ -0,0 +1,33 @@ + + + + + + + 秒绘彩页详情页 + + + + + + + + +
            +
            + + <#for path : Arrays.toStringArray(works.getThumbImagePath())> +
            +
            + +
            +
            + +
            +
            1/${MobileWorksPresenter.getWorksDetailCount(works.getThumbImagePath())}
            +
            + + 复制模板ID:${works.getWorksId()} +
            返回首页
            + + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/mobileWorks/mobileWorksHome.zml b/Yangcai365_design/manage/zview/mobileWorks/mobileWorksHome.zml new file mode 100644 index 0000000..831480f --- /dev/null +++ b/Yangcai365_design/manage/zview/mobileWorks/mobileWorksHome.zml @@ -0,0 +1,372 @@ + + + + + + + 秒绘彩页库 + + + + + + + + + ${Scripts.src(zhiqim.js)} + ${Scripts.src("/zinc/js/zhiqim_search_auto_list.js")} + + + +
            + 分类 +
            + + +
            + 搜索 +
            + + +
            +
            精品推荐
            +
            更多模板 + + +
            +
            + +
            + +
            + +
            + + +
            +
              +
                +
            +
            + + +
            + +
            + +
            +

            行业

            +
            + 全部 + <#for item : indList> + ${item.getIndustryName()} + +
            +

            产品

            +
            + 彩页 + 名片 +
            + +
            +
            + + + + +

            顶部

            +
            + +
            + 检索结果 +
            + + + + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/notice/noticeAdd.zml b/Yangcai365_design/manage/zview/notice/noticeAdd.zml new file mode 100644 index 0000000..3154c47 --- /dev/null +++ b/Yangcai365_design/manage/zview/notice/noticeAdd.zml @@ -0,0 +1,53 @@ +${request.getValidateScript()} +${zhiqim_manager_history ("noticeList.htm")} + +${zhiqim_manager_breadcrumb_parent ("noticeAdd.htm", "公告内容", "增加公告")} +${zhiqim_manager_content()} +
            + + + + + + + + + + + + + + + +
            增加公告
            是否发布:(请选择) + 保存草稿: + 立即发布: +
            公告标题:(32位不定长字符) *
            +
            公告内容:(不能超过50000个字符) *
            +
            + +
            +
            +${zhiqim_manager_submit()} +
            +${zhiqim_manager_content_end()} + + + + diff --git a/Yangcai365_design/manage/zview/notice/noticeHistory.zml b/Yangcai365_design/manage/zview/notice/noticeHistory.zml new file mode 100644 index 0000000..1eb6b20 --- /dev/null +++ b/Yangcai365_design/manage/zview/notice/noticeHistory.zml @@ -0,0 +1,41 @@ +${zhiqim_manager_breadcrumb("公告列表")} +${zhiqim_manager_content()} +${sweet_alert_reuse_method()} +<#-- 列表 --> + + + + + + + +<#for item : result.list()> + + + + + + + + +${zhiqim_manager_tr_no_record(result, 10, "暂时没有公告")} +
            公告标题公告内容发布人发布时间
            #{item.getTitle()}点击查看#{item.getFinshUser()}#{Sqls.toDateTimeString(item.getFinshTime())}
            + + + + +
            ${PagingGo.toHtmlLink(result)}
            +${zhiqim_manager_content_end()} + + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/notice/noticeInfo.zml b/Yangcai365_design/manage/zview/notice/noticeInfo.zml new file mode 100644 index 0000000..49b1800 --- /dev/null +++ b/Yangcai365_design/manage/zview/notice/noticeInfo.zml @@ -0,0 +1,58 @@ +
            +
            +

            + +
            +
            +

            +
            +
            + + + + diff --git a/Yangcai365_design/manage/zview/notice/noticeList.zml b/Yangcai365_design/manage/zview/notice/noticeList.zml new file mode 100644 index 0000000..4ea2dec --- /dev/null +++ b/Yangcai365_design/manage/zview/notice/noticeList.zml @@ -0,0 +1,120 @@ +${zhiqim_manager_content()} +<#-- 导航 --> +
            + +
            + +<#-- 列表 --> + + + + + + + + + + + +${zhiqim_manager_tr_no_record(noticeList, 5, "暂时没有公告信息")} +<#for item :noticeList.list()> + + + + + + + + + + + +
            选择公告状态文章标题创建人创建时间发布人发布时间操作
            + <#if item.getStatus()==0>草稿 + <#if item.getStatus()==1>已发布 + <#if item.getStatus()==2>已下线 + ${item.getTitle()}${item.getAddUser()} + ${Sqls.toDateTimeString(item.getAddTime())} + ${item.getFinshUser()}${Sqls.toDateTimeString(item.getFinshTime())} + <#if item.getStatus()==0> + + + + + <#if item.getStatus()==1> + + + +
            +${zhiqim_manager_paging(noticeList, "noticeList.htm")} + + diff --git a/Yangcai365_design/manage/zview/notice/noticeModify.zml b/Yangcai365_design/manage/zview/notice/noticeModify.zml new file mode 100644 index 0000000..dacda98 --- /dev/null +++ b/Yangcai365_design/manage/zview/notice/noticeModify.zml @@ -0,0 +1,48 @@ +${request.getValidateScript()} +${zhiqim_manager_history ("noticeList.htm")} + +${zhiqim_manager_breadcrumb_parent ("noticeModify.htm", "公告内容", "修改公告")} +${zhiqim_manager_content()} +
            + + + + + + + + + + + + + + + + +
            修改公告
            是否发布:(请选择) + 保存草稿: + 立即发布: +
            公告标题:(32位不定长字符) *
            +
            公告内容:(不能超过50000个字符) *
            +
            + +
            +
            +${zhiqim_manager_submit()} +
            +${zhiqim_manager_content_end()} + + + + diff --git a/Yangcai365_design/manage/zview/order/afterMessageAdd.zml b/Yangcai365_design/manage/zview/order/afterMessageAdd.zml new file mode 100644 index 0000000..c75c00b --- /dev/null +++ b/Yangcai365_design/manage/zview/order/afterMessageAdd.zml @@ -0,0 +1,69 @@ +${sweet_alert_reuse_method()} + + +${zhiqim_manager_content()} + + + + + + + + + + + + + + + + + + + + + + + + +
            客户旺旺:${order.getBuyerNick()}店铺名称:${order.getShopNick()}
            产品名称:${order.getOrderText()}录单时间:${Sqls.toDateTimeString(order.getCreateTime())}
            + + 是否有投诉/差评意向  + 勾选此选项,则在留言列表中置顶标红售后优先处理 +
            + +
            留言提交人:提交时间:
            +${zhiqim_manager_content_end()} + +<#-- 操作 --> +
            +    + +
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/order/chargeOrder.zml b/Yangcai365_design/manage/zview/order/chargeOrder.zml new file mode 100644 index 0000000..6e61753 --- /dev/null +++ b/Yangcai365_design/manage/zview/order/chargeOrder.zml @@ -0,0 +1,184 @@ +${Styles.htmlOverflowHidden()} +${Scripts.src("/zinc/js/global_2019010801.js")} +${yangcai_calc_Left_width_height(414, 110)} + + +<#var data="data=copy,userText,CustomFile,TemplateFile,userNotice"/> +<#var addRule=""/> +<#var delRule=""/> +${zhiqim_manager_breadcrumb("主管审核")} +${zhiqim_manager_content()} + +<#-- 导航栏 --> +
            + +
            + +<#-- 左侧功能 --> +
            + + <#-- 查询条件 --> + ${zhiqim_manager_title("查询条件")} +
            + + + + + + + + + + +
            订单号:产品类型: + 行业分类: +
            旺旺号:
            +
            + + <#-- 操作功能--> +
            + <#if ZmrPathRule.check(request, "openWangWang")> + <#if ZmrPathRule.check(request, "openQQ")> + + + + +
            + + <#-- 分页列表--> +
            + + ${zhiqim_manager_tr_title(14, "主管审核订单列表")} + + + + + + + + + + + + + + + + + + + <#if pageResult.size() == 0> + ${zhiqim_manager_no_record(14, "暂不存在主管审核订单")} + + <#for item : pageResult.list()> + + + + + + + + + + + + + + + + + + + + + +
            选择订单号设计类型旺旺号设计师领取时间设计时间订单状态进度备注产品行业付款金额对稿QQ对稿微信对稿手机申请原因
            ${item.getDesignId()}${DraftConstants.get(item.getDraftType())}${item.getBuyerNick()}${item.getDesigner()}${Sqls.toDateTimeString(item.getDesignReceiveTime())}${Sqls.toDateTimeString(item.getDesignBeginTime())}${StatusConstants.getStatus(item.getStatus())}${progressNoteMap.get(item.getDesignId())}${item.getOrderText()}${industryNameMap.get(item.getIndustryId())}${Amounts.toYuanMustRadix(item.getAmount())}${item.getUserQq()}${item.getUserWx()}${item.getUserMobile()}${item.getDesignRequestReason()}
            +
            + ${zhiqim_manager_paging(pageResult, "chargeOrder.htm")} +
            +${zhiqim_manager_content_end()} + +<#--右侧文件信息--> +
            + +
            + +<#-- 联系旺旺&联系QQ弹窗框 --> + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/order/chargeOrderAudit.zml b/Yangcai365_design/manage/zview/order/chargeOrderAudit.zml new file mode 100644 index 0000000..adc4186 --- /dev/null +++ b/Yangcai365_design/manage/zview/order/chargeOrderAudit.zml @@ -0,0 +1,22 @@ +
            + + + + + + + + + +
            原设计师:
            指定新设计师: +  * +
            + + + +
            + diff --git a/Yangcai365_design/manage/zview/order/checkBackDetail.zml b/Yangcai365_design/manage/zview/order/checkBackDetail.zml new file mode 100644 index 0000000..11c7533 --- /dev/null +++ b/Yangcai365_design/manage/zview/order/checkBackDetail.zml @@ -0,0 +1,38 @@ + + + +${zhiqim_manager_content()} +
            + ${orderCheckModel.getBackReason()}
            +
            +<#if Validates.isNotEmpty(orderCheckModel.getBackReasonPicUrl())> +
            + 审核退回图片 +
            + +

            + +<#-- 操作 --> +
            + +
            +${zhiqim_manager_content_end()} + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/order/complaintOrder.zml b/Yangcai365_design/manage/zview/order/complaintOrder.zml new file mode 100644 index 0000000..6fdfcd8 --- /dev/null +++ b/Yangcai365_design/manage/zview/order/complaintOrder.zml @@ -0,0 +1,147 @@ +${Scripts.src("/zinc/js/global_2019010801.js")} + + +${zhiqim_manager_breadcrumb("申诉列表")} +${zhiqim_manager_content()} + +<#-- 导航 --> +
            + +
            + +<#-- 左侧功能 --> +
            + <#-- 查询条件 --> + ${zhiqim_manager_title("查询条件")} + + + + + + + + + + + +
            订单号:设计师: + + 旺旺号:退款时间: -  + +
            + + + <#-- 操作功能 --> +
            + + + + +
            + + <#-- 列表 --> +
            + + + + + + + + + + + + + + + + ${zhiqim_manager_tr_no_record(pageResult, 20, "暂时没有申诉订单")} + <#for item : pageResult.list()> + + + + + + + + + + + + + + + + + +
            选择订单号所属组织商户旺旺号状态产品订单金额领单时间退款时间设计师申诉详情
            ${item.getDesignId()} <#if item.isUrgent()>${ZmrOrgDao.getOrgName(request, item.getOrgId())}${item.getShopNick()}${item.getBuyerNick()}${StatusConstants.getStatus(item.getStatus())}${item.getOrderText()}${Amounts.toYuanMustRadix(item.getAmount())}${Sqls.toDateTimeString(item.getDesignReceiveTime())}${item.getRefundTime()}${item.getDesigner()}
            +
            + ${zhiqim_manager_paging(pageResult, "complaintOrder.htm")} +
            +${zhiqim_manager_content_end()} + +<#-- 联系旺旺&联系QQ弹窗框 --> + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/order/complaintView.zml b/Yangcai365_design/manage/zview/order/complaintView.zml new file mode 100644 index 0000000..c7c04cd --- /dev/null +++ b/Yangcai365_design/manage/zview/order/complaintView.zml @@ -0,0 +1,88 @@ + + + +${zhiqim_manager_content()} +
            + +
            +<#for item : attaList> +
            + 截图 +
            + +

            +
            +
            + +     +
            +
            +${zhiqim_manager_content_end()} diff --git a/Yangcai365_design/manage/zview/order/configQuestionsAdd.zml b/Yangcai365_design/manage/zview/order/configQuestionsAdd.zml new file mode 100644 index 0000000..48cdc72 --- /dev/null +++ b/Yangcai365_design/manage/zview/order/configQuestionsAdd.zml @@ -0,0 +1,62 @@ +${request.getValidateScript()} + + + + + + + + + + + + + + + +
            + 产品类型:    + 材质描述: +
            + 尺寸长(mm):    + 尺寸宽(mm): +
            + 单双面:        + 款数:       +
            + 其他需求: +
            +<#-- 操作 --> +
            +   + +
            diff --git a/Yangcai365_design/manage/zview/order/configQuestionsModify.zml b/Yangcai365_design/manage/zview/order/configQuestionsModify.zml new file mode 100644 index 0000000..cb7dd42 --- /dev/null +++ b/Yangcai365_design/manage/zview/order/configQuestionsModify.zml @@ -0,0 +1,38 @@ +${request.getValidateScript()} + + +
            + + + + + + + +
            设计要求:
            +     +
            +<#-- 操作 --> +
            +   + +
            +
            diff --git a/Yangcai365_design/manage/zview/order/contendOrder.zml b/Yangcai365_design/manage/zview/order/contendOrder.zml new file mode 100644 index 0000000..15292c8 --- /dev/null +++ b/Yangcai365_design/manage/zview/order/contendOrder.zml @@ -0,0 +1,36 @@ + + +
            +
            接受订单
            +
            订单编号: ${designId}
            +
            产品类型: ${orderText}
            + +
            +<#-- 操作 --> +
            + + +
            +
            diff --git a/Yangcai365_design/manage/zview/order/designOrder.zml b/Yangcai365_design/manage/zview/order/designOrder.zml new file mode 100644 index 0000000..b92886b --- /dev/null +++ b/Yangcai365_design/manage/zview/order/designOrder.zml @@ -0,0 +1,610 @@ +${Styles.htmlOverflowHidden()} +${Scripts.src("/zinc/js/global_2019010801.js")} +${yangcai_calc_Left_width_height(400, 70)} + + + +<#var data="data=copy,userText,userNotice,CustomFile,DesginFile,EndFile,WorkFile,FristThumFile,TbzFile"/> +<#var addRule="addRule=CustomFile"/> +<#var delRule="delRule=CustomFile"/> +${zhiqim_manager_breadcrumb("未完成订单")} +${zhiqim_manager_content()} + +
            +<#-- 导航栏 --> +
            + +
            + +<#-- 左侧功能 --> +
            + + <#-- 查询条件 --> +
            +
            + + + + + + + +
            +
            + + <#-- 操作功能--> +
            + + + + <#-- + --> + + + + + + + +
            + + <#-- 分页列表--> +
            + + + + + + + + + <#if isShowCost == 1> + + + + + + + + + + + <#if pageResult.size() == 0> + ${zhiqim_manager_no_record(15, "暂不存在设计订单信息")} + + <#for item : pageResult.list()> + + + + + + + + + + + <#if isShowCost == 1> + + + + + + + + + + + +
            选择产品类型设计等级
            设计类型
            订单号旺旺号领单时间设计佣金加急费订单状态淘宝信息进度备注退回理由操作客户信息
            ${Global.get(DesignTypeCache.class).getName(item.getTypeId())}${DraftConstants.get(item.getDraftType())}
            + <#if item.isOnlyDesign()> + 仅设计 + <#else>印刷设计 +
            ${item.getDesignId()} + <#if Validates.isNotEmpty(item.getCheckBackReason()) && item.getStatus() lt 55 > + + <#elseif Validates.isNotEmpty(item.getDraftBackReason()) && item.getStatus() lt 55 > + + <#elseif Validates.isNotEmpty(item.getEndBackReason()) && item.getStatus() lt 55 > + + + <#if item.isUrgent()> + + + <#if item.isChange()> + + + <#if item.isBack()> + + + <#if item.getIsOldUser() gt 0> + + + ${item.getBuyerNick()}${Sqls.toDateTimeString(item.getDesignReceiveTime())}${Amounts.toYuanMustRadix(item.getDesignPrice())}<#if item.getUrgentPrice() gt 0> + ${Amounts.toYuanMustRadix(item.getUrgentPrice())} + <#else> + ${StatusConstants.getStatus(item.getStatus())}${item.getReturnMsg()}${progressNoteMap.get(item.getDesignId())}${item.getReturnReason()} + 详情 + <#if item.getStatus() == 34> +
            确认退款 +
            拒绝退款 + +
            + 查看 +
            +
            + ${zhiqim_manager_paging(pageResult, "designOrder.htm")} +
            +
            +${zhiqim_manager_content_end()} + + + +<#-- 联系旺旺&联系QQ弹窗框 --> + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/order/designOrderDraft.zml b/Yangcai365_design/manage/zview/order/designOrderDraft.zml new file mode 100644 index 0000000..a66e9c1 --- /dev/null +++ b/Yangcai365_design/manage/zview/order/designOrderDraft.zml @@ -0,0 +1,90 @@ + + + +${zhiqim_manager_content()} + +
            +
            +
            +     +   +   +
            +
            +

            +${zhiqim_manager_content_end()} + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/order/designOrderFinish.zml b/Yangcai365_design/manage/zview/order/designOrderFinish.zml new file mode 100644 index 0000000..dd52f1a --- /dev/null +++ b/Yangcai365_design/manage/zview/order/designOrderFinish.zml @@ -0,0 +1,167 @@ + + +<#def designatedPath="/designOrder.htm"/> +<#var data="data=copy,userText,CustomFile,DesginFile,EndFile,WorkFile,AftersaleFile,ThumFile,userNotice,TbzFile"/> +<#var addRule="addRule=CustomFile,DesginFile,EndFile,WorkFile,TbzFile"/> +<#var delRule="delRule=CustomFile,DesginFile,EndFile,WorkFile,TbzFile"/> +${Styles.htmlOverflowHidden()} +${yangcai_calc_Left_width_height(400, 70)} +${zhiqim_manager_breadcrumb("已完成订单")} +${zhiqim_manager_content()} + +
            +<#-- 导航栏 --> +
            + +
            +
            +
            +
            + + + + + + + +
            +
            + + + <#-- 分页列表--> +
            + + + + + + + + + + + + + + + <#if pageResult.total() == 0> + ${zhiqim_manager_no_record(23, "暂时没有数据")} + + <#for item : pageResult.list()> + + + + + + + + + + + + + + + + +
            选择订单号设计等级旺旺号订单状态产品类型下单时间领单时间初稿时间定稿时间操作
            ${item.getDesignId()} + <#if item.isUrgent()> + + + <#if item.isChange()> + + + <#if item.isBack()> + + ${DraftConstants.get(item.getDraftType())}${item.getBuyerNick()}${StatusConstants.getStatus(item.getStatus())}${Global.get(DesignTypeCache.class).getName(item.getTypeId())}${Sqls.toDateTimeString(item.getCreateTime())}${Sqls.toDateTimeString(item.getDesignBeginTime())}${Sqls.toDateTimeString(item.getDesignDraftTime())}${Sqls.toDateTimeString(item.getDesignEndTime())}详情
            +
            + ${zhiqim_manager_paging(pageResult, "designOrderFinish.htm")} +
            +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/order/designOrderRefund.zml b/Yangcai365_design/manage/zview/order/designOrderRefund.zml new file mode 100644 index 0000000..d6b77e0 --- /dev/null +++ b/Yangcai365_design/manage/zview/order/designOrderRefund.zml @@ -0,0 +1,105 @@ + + + +${zhiqim_manager_content()} + +
            + + +
            +
            +
            +
            +
            +
            +
            +
            +     +   +
            +
            +

            +${zhiqim_manager_content_end()} + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/order/designOrderRefundInfo.zml b/Yangcai365_design/manage/zview/order/designOrderRefundInfo.zml new file mode 100644 index 0000000..495798e --- /dev/null +++ b/Yangcai365_design/manage/zview/order/designOrderRefundInfo.zml @@ -0,0 +1,122 @@ +${request.getValidateScript()} + +
            +
            + ! +
            +   当前订单状态:请求退款 +
            +
            +
            + + ${order.getDesignId()} +
            +
            + + ${Global.get(DesignMerchantCache.class).getName(order.getMerchantId())} +
            +
            + + ${Global.get(OrgCache.class).name(order.getOrgId())} +
            +
            +
            +
            + + <#if order.getDraftType()==0> + 标准自来稿 + + <#if order.getDraftType()==1> + 改稿自来稿 + + <#if order.getDraftType()==2> + 普通设计 + + <#if order.getDraftType()==3> + 资深设计 + + <#if order.getDraftType()==4> + 现货 + +
            +
            + + ${order.getBuyerNick()} +
            +
            + + ${order.getDesigner()} +
            +
            +
            +
            + + ${order.getUserWx()} +
            +
            + + ${order.getShopNick()} +
            +
            + + ${Amounts.toYuanMustRadix(order.getAmount())} +
            +
            +
            +
            + + ${order.getUserMobile()} +
            +
            +
            +
            + + ${order.getOrderText()} +
            +
            +
            +
            + + ${order.getReceiverName()} +
            +
            + + ${order.getCreater()} +
            + +
            +
            +
            + + ${order.getReceiverAddress()} +
            +
            +
            + + ${Global.get(DesignOrderRefundReasonCache.class).getName(order.getRefundReason())}
            + +
            +<#-- 操作 --> +
            +
            + +
            +
            diff --git a/Yangcai365_design/manage/zview/order/designOrderRefundModify.zml b/Yangcai365_design/manage/zview/order/designOrderRefundModify.zml new file mode 100644 index 0000000..450cf0b --- /dev/null +++ b/Yangcai365_design/manage/zview/order/designOrderRefundModify.zml @@ -0,0 +1,34 @@ +${request.getValidateScript()} + + +
            + + +
            +<#-- 操作 --> +
            +   + +
            diff --git a/Yangcai365_design/manage/zview/order/designOrderRefundReason.zml b/Yangcai365_design/manage/zview/order/designOrderRefundReason.zml new file mode 100644 index 0000000..69c0798 --- /dev/null +++ b/Yangcai365_design/manage/zview/order/designOrderRefundReason.zml @@ -0,0 +1,85 @@ +<#def designatedPath="/designOrderRefundReason.htm"/> +${zhiqim_manager_breadcrumb("设计师退款问题类型配置")} +${zhiqim_manager_content()} + + +<#-- 导航 --> +
            + +
            + + + + + + + + + +<#if pageResult.total() == 0> + ${zhiqim_manager_no_record(6 "暂时没有配置退款原因")} + +<#for item : pageResult.list()> + + + + + + +
            +
            + + + +
            +
            选择标题最后一次修改时间
            ${item.getTitle()}${Sqls.toDateTimeString(item.getUpdateTime())}
            +${zhiqim_manager_paging(pageResult, "/designOrderRefundReason.htm")} +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/order/designOrderRefundReasonAdd.zml b/Yangcai365_design/manage/zview/order/designOrderRefundReasonAdd.zml new file mode 100644 index 0000000..a99695f --- /dev/null +++ b/Yangcai365_design/manage/zview/order/designOrderRefundReasonAdd.zml @@ -0,0 +1,33 @@ +${request.getValidateScript()} + + +
            + + +
            +<#-- 操作 --> +
            +   + +
            diff --git a/Yangcai365_design/manage/zview/order/designOrderStop.zml b/Yangcai365_design/manage/zview/order/designOrderStop.zml new file mode 100644 index 0000000..98f7fcc --- /dev/null +++ b/Yangcai365_design/manage/zview/order/designOrderStop.zml @@ -0,0 +1,48 @@ + + +
            + + + + + + + + + + +
            暂停选项: +  * +
            暂停原因:
            + + + + + diff --git a/Yangcai365_design/manage/zview/order/designStandard.zml b/Yangcai365_design/manage/zview/order/designStandard.zml new file mode 100644 index 0000000..96822dc --- /dev/null +++ b/Yangcai365_design/manage/zview/order/designStandard.zml @@ -0,0 +1,129 @@ +${Styles.htmlOverflowHidden()} +${Scripts.src("/zinc/js/global_2019010801.js")} +${yangcai_calc_Left_width_height(400, 70)} + + + +<#var data="data=copy,userText,userNotice,CustomFile,DesginFile,EndFile,WorkFile,FristThumFile,TbzFile"/> +<#var addRule="addRule=CustomFile"/> +<#var delRule="delRule=CustomFile"/> +${zhiqim_manager_breadcrumb("未完成订单")} +${zhiqim_manager_content()} + +
            +<#-- 导航栏 --> +
            + +
            + +<#-- 左侧功能 --> +
            + + <#-- 查询条件 --> + + + + + <#-- 分页列表--> + + +
            + +
            +${zhiqim_manager_content_end()} +
            + +
            + + +<#-- 联系旺旺&联系QQ弹窗框 --> + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/order/designStandardDetails.zml b/Yangcai365_design/manage/zview/order/designStandardDetails.zml new file mode 100644 index 0000000..b986250 --- /dev/null +++ b/Yangcai365_design/manage/zview/order/designStandardDetails.zml @@ -0,0 +1,101 @@ +<#def designatedPath="/designStandardDetails.htm"/> + + + +${zhiqim_manager_breadcrumb("设计类型")} +${zhiqim_manager_content()} + +<#-- 导航 --> + +
            +
            + + + diff --git a/Yangcai365_design/manage/zview/order/designStandardList.zml b/Yangcai365_design/manage/zview/order/designStandardList.zml new file mode 100644 index 0000000..3a4b893 --- /dev/null +++ b/Yangcai365_design/manage/zview/order/designStandardList.zml @@ -0,0 +1,245 @@ + + +<#-- 导航 --> + + +<#-- 列表 --> +${Htmls.toCallFrame()} + +
            +
            + + + + + + ${zhiqim_manager_tr_no_record(pageResult, 27, "暂时没有数据")} + <#for item : reasonList> + + + + + + + <#if Validates.isEmpty(reasonList) || reasonList.size() == 0> + + + + +
            序号标题创建时间
            ${item_index+1}${item.getStandardTitle()}${Sqls.toDateTimeString(item.getCreateTime())}
            暂时没有数据信息
            +
            + ${zhiqim_manager_paging(pageResult, "/designStandardList.htm")} + +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/order/designerTest.zml b/Yangcai365_design/manage/zview/order/designerTest.zml new file mode 100644 index 0000000..f942e9f --- /dev/null +++ b/Yangcai365_design/manage/zview/order/designerTest.zml @@ -0,0 +1,427 @@ +${zhiqim_manager_content()} +${Scripts.src(zhiqim.js)} +${Scripts.src(zhiqim_uploadlarge.js)} + + +
            + + +
            + + + + +
            + +
            + +
            + + + + + + + + + + + + +
            开始理论考试 + 说明:为了提高审核通过率,请提交80分以上的截图,否则审核将不通过 +
            考试成绩截图完成考试成绩截图后,直接 CTRL+V 粘贴即可 + +
            +
            +
            + + +
            +
            + +
            + +
            +
            +
            + + + + + + + + + + + + + + + + + + + + + + + +
            设计要求${orderQuestions.getDesignRequirements()}
            设计素材 + <#for item : materialFilerAttaList> + ${item.getFileName()}   下载

            + +
            设计文件 + <#for item : desginFileAttaList> + ${item.getFileName()}   删除

            + +
            印刷文件
            pdf格式
            + <#for item : endFileAttaList> + ${item.getFileName()}   删除

            + +
            +
            + +
            +
            +
            +
            +
            +
            +
            +
            +

            +

            +

            +

            审核中,请通过微信扫码联系审核人员确认相关入驻事宜

            +
            +

            +

            +
            + +
            + +
            + <#if initialStatus = 40> +
            +
            +
            +

            +

            +

            +

            抱歉,审核未通过。未通过原因:${orderQuestions.getRemarks()}

            +
            +

            +

            详情请通过微信扫码联系审核人员

            +
            +

            + + +
            + <#else> +
            +
            +
            +

            +

            +

            +

            恭喜你通过审核,请退出重新登录设计平台,马上开始你的接单之旅吧!

            +
            +

            +

            +
            +
            + + +${zhiqim_manager_content_end()} +<#-- 联系QQ弹窗框 --> + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/order/modifyIndustry.zml b/Yangcai365_design/manage/zview/order/modifyIndustry.zml new file mode 100644 index 0000000..363e2ad --- /dev/null +++ b/Yangcai365_design/manage/zview/order/modifyIndustry.zml @@ -0,0 +1,50 @@ +${request.getValidateScript()} + + + + + + + + + + + + + + + +
            订单号:${order.getDesignId()}
            产品:${order.getOrderText()}
            行业: + +  *
            +<#-- 操作 --> +
            +   + +
            + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/order/myDesignOrder.zml b/Yangcai365_design/manage/zview/order/myDesignOrder.zml new file mode 100644 index 0000000..fd55b1c --- /dev/null +++ b/Yangcai365_design/manage/zview/order/myDesignOrder.zml @@ -0,0 +1,273 @@ +${Styles.htmlOverflowHidden()} +${Scripts.src("/zinc/js/global_2019010801.js")} +${yangcai_calc_Left_width_height(400, 70)} + + +<#var data="data=copy,userText,CustomFile,TemplateFile,userNotice"/> +<#var addRule=""/> +<#var delRule=""/> +${zhiqim_manager_breadcrumb("我的设计订单")} +${zhiqim_manager_content()} +<#-- 导航栏 --> +
            + +
            + +<#-- 左侧功能 --> +
            + + <#-- 查询条件 --> + ${zhiqim_manager_title("查询条件")} +
            + + + + + + + + + + + +
            订单号:产品类型: + 行业分类: +
            旺旺号:淘宝单号:
            +
            + + <#-- 操作功能--> +
            + <#if ZmrPathRule.check(request, "openWangWang")> + <#if ZmrPathRule.check(request, "openQQ")> + + + + + + + +
            + + <#-- 分页列表--> +
            + + ${zhiqim_manager_tr_title(18, "设计订单列表")} + + + + + + + + + + + + + + + + + + + + + + <#if pageResult.size() == 0> + ${zhiqim_manager_no_record(18, "暂不存在设计订单信息")} + + <#for item : pageResult.list()> + + + + + + + + + + + + + + + + + + + + + + + + +
            选择订单号设计类型店铺旺旺号设计师领取时间设计时间订单状态产品行业付款金额进度备注对稿QQ对稿微信对稿手机暂停设计原因主管退回原因审核退回原因
            ${item.getDesignId()}${DraftConstants.get(item.getDraftType())}${Global.get(ShopCache.class).getName(item.getShopNick())}${item.getBuyerNick()}${item.getDesigner()}${Sqls.toDateTimeString(item.getDesignReceiveTime())}${Sqls.toDateTimeString(item.getDesignBeginTime())}${StatusConstants.getStatus(item.getStatus())}${item.getOrderText()}${Global.get(DesignIndustryCache.class).getIndustryName(item.getIndustryId())}${Amounts.toYuanMustRadix(item.getAmount())}${progressNoteMap.get(item.getDesignId())}${item.getUserQq()}${item.getUserWx()}${item.getUserMobile()}${item.getDesignPauseReason()}${item.getDesignRejectReason()}${item.getCheckRejectReason()}
            +
            + ${zhiqim_manager_paging(pageResult, "designOrder.htm")} +
            +${zhiqim_manager_content_end()} + +<#--右侧文件信息--> +
            + +
            + +<#-- 联系旺旺&联系QQ弹窗框 --> + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/order/myRetentionOrder.zml b/Yangcai365_design/manage/zview/order/myRetentionOrder.zml new file mode 100644 index 0000000..fc7510e --- /dev/null +++ b/Yangcai365_design/manage/zview/order/myRetentionOrder.zml @@ -0,0 +1,352 @@ +${Scripts.src("/zinc/js/global_2019010801.js")} + + + +${zhiqim_manager_breadcrumb("我的滞留单")} +${zhiqim_manager_content()} + +<#-- 导航 --> +
            + +
            + +<#-- 左侧功能 --> +<#-- 查询条件 --> +${zhiqim_manager_title("查询条件")} +
            + + + + + + + + + + + + + +
            订 单 号 :产品类型: + 责 任 人: + + 旺旺号:
            + 稿件类型: + 店铺名称: + 滞留时长: + + +
            +
            + +<#-- 操作功能 --> +
            + + + <#if ZmrPathRule.check(request, "doApplyRefund")> + + + + + + + + +
            + +<#-- 列表 --> + + + + + + + + + + + + + + + + + + + ${zhiqim_manager_tr_no_record(pageResult, 12, "暂时没有滞留单")} + <#for item : pageResult.list()> + <#var isCountDown=CalculationUtil.retentDealCountDownCal(request,item.getDesignId())/> + + + z-text-red" ${zhiqim_manager_tr_onmouse()} ${zhiqim_manager_tr_click_radio()}> + + + + + + + + + + + + + + + + + + ${zhiqim_manager_paging(pageResult, "/myRetentionOrder.htm")} +
            选择订单号所属组织稿件类型旺旺号店铺设计师创建时间领单时间订单状态进度备注产品订单金额倒计时印刷设计
            ${item.getDesignId()} + <#if item.getReDesignSrcId() gt 0> + <#if item.isUrgent()> + <#if item.isHighQualityOrder()> + <#if item.getIsOldUser() gt 0> + <#if !(item.getAmount() lt 30000)> + <#if item.getShowRedMark() == 1> + ${ZmrOrgDao.getOrgName(request,item.getOrgId())}${DraftConstants.get(item.getDraftType())}${item.getBuyerNick()}${item.getShopNick()}${item.getDesigner()}${Sqls.toDateTimeString(item.getCreateTime())}${Sqls.toDateTimeString(item.getDesignReceiveTime())}${StatusConstants.getStatus(item.getStatus())}${progressNoteMap.get(item.getDesignId())}${item.getOrderText()}${Amounts.toYuanMustRadix(item.getAmount())}<#if isCountDown != "">${isCountDown}<#if item.isOnlyDesign()>仅设计<#else>设计印刷
            +${zhiqim_manager_content_end()} + +<#-- 联系旺旺&联系QQ弹窗框 --> + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/order/orderBack.zml b/Yangcai365_design/manage/zview/order/orderBack.zml new file mode 100644 index 0000000..ed9261f --- /dev/null +++ b/Yangcai365_design/manage/zview/order/orderBack.zml @@ -0,0 +1,50 @@ +${zhiqim_manager_breadcrumb("待办")} +${zhiqim_manager_content()} +${sweet_alert_reuse_method()} + +<#-- 列表 --> + + + + + + + + +<#for item : result.list()> + + + + + + + + +${zhiqim_manager_tr_no_record(result, 10, "暂时没有公告")} +
            待办状态待办内容通知人待办创建时间操作
            + <#if item.getMessageType() == 1>待办事项 + <#if item.getMessageType() == 2>已办事项 + <#if item.getMessageType() == 3>已办事项 + #{item.getMessageBody()}#{item.getConsumerCode()}#{Sqls.toDateTimeString(item.getCreateTime())} + 前往处理 +
            + + + + +
            ${PagingGo.toHtmlLink(result)}
            +${zhiqim_manager_content_end()} + + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/order/orderLogList.zml b/Yangcai365_design/manage/zview/order/orderLogList.zml new file mode 100644 index 0000000..a0daea9 --- /dev/null +++ b/Yangcai365_design/manage/zview/order/orderLogList.zml @@ -0,0 +1,64 @@ +<#def designatedPath="/orderList.htm"/> + + +${zhiqim_manager_breadcrumb("订单日志列表")} +${zhiqim_manager_content()} + +<#-- 导航 --> +
            + +
            + +<#-- 查询条件 --> +${zhiqim_manager_title("订单日志查询")} +
            + + + + +
            + 订单号: + +
            +
            + +<#-- 列表 --> + + + + + + + + +${zhiqim_manager_tr_no_record(pageResult, 6, "暂时没有订单日志信息")} +<#for item : pageResult.list()> + + + + + + + + +
            订单号状态操作员操作项操作时间
            ${item.getDesignId()}${StatusConstants.getStatus(item.getStatus())}${item.getOperatorCode()}${item.getOperateDesc()}${Sqls.toDateTimeString(item.getCreateTime())}
            +${zhiqim_manager_paging(pageResult, "orderLogList.htm")} +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/order/orderRefundList.zml b/Yangcai365_design/manage/zview/order/orderRefundList.zml new file mode 100644 index 0000000..ec330ee --- /dev/null +++ b/Yangcai365_design/manage/zview/order/orderRefundList.zml @@ -0,0 +1,168 @@ +${Scripts.src("/zinc/js/global_2019010801.js")} +${zhiqim_manager_breadcrumb("订单列表")} +${zhiqim_manager_content()} + +<#-- 导航 --> +
            + +
            + + <#-- 查询条件 --> + ${zhiqim_manager_title("查询条件")} +
            + + + + + + + + + + + +
            订单号: + 商户名称: + + 稿件类型: + 产品类型: +
            旺旺号: + + + 退款原因: + + + +
            +
            + + <#-- 操作功能 --> +
            + + + + +
            + + <#-- 列表--> +
            + + + + + + + + + + + + + + ${zhiqim_manager_tr_no_record(pageResult, 10, "暂时没有退款订单信息")} + <#for item : pageResult.list()> + + + + + + + + + + + + + + + + +
            选择订单号商户旺旺号店铺产品付款金额特殊工艺退款原因申请时间
            ${item.getDesignId()}${Global.get(DesignMerchantCache.class).getName(item.getMerchantId())}
            ${DraftConstants.get(item.getDraftType())}
            ${item.getBuyerNick()}${item.getShopNick()}${item.getOrderText()}${Amounts.toYuanMustRadix(item.getAmount())}${item.getPrintSpecial()}${Global.get(DesignOrderRefundReasonCache.class).getName(item.getRefundReason())}${item.getRefundTime()}
            +
            + ${zhiqim_manager_paging(pageResult, "/orderRefundList.htm")} +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/order/orderTagList.zml b/Yangcai365_design/manage/zview/order/orderTagList.zml new file mode 100644 index 0000000..6fb1f0a --- /dev/null +++ b/Yangcai365_design/manage/zview/order/orderTagList.zml @@ -0,0 +1,171 @@ +${Scripts.src("/zinc/js/global_2019010801.js")} +${Styles.htmlOverflowHidden()} +${yangcai_calc_Left_width_height(414, 110)} + + +${zhiqim_manager_breadcrumb("订单标签列表")} +${zhiqim_manager_content()} + +<#-- 导航 --> +
            + +
            + +<#-- 左侧功能 --> +
            + <#-- 查询条件 --> + ${zhiqim_manager_title("查询条件")} +
            + + + + + + + + + + + + + + + +
            订单号:产品类型: + + 设计师: + +
            旺旺号: + 录单时间: -  + + 行业类型: +
            + +
            +
            + + <#-- 操作功能 --> +
            + + + +
            + <#-- 列表--> +
            + + + + + + + + + + + + + + ${zhiqim_manager_tr_no_record(pageResult, 10, "暂时没有订单标签数据")} + <#for item : pageResult.list()> + + + + + + + + + + + + + + +
            选择订单号旺旺号手机号店铺行业子行业产品类型金额创建时间
            ${item.getDesignId()} + <#if item.getReDesignSrcId() gt 0> + <#if item.isUrgent()> + <#if item.getOrderFlag() gt 0> + <#if !(item.getAmount() lt 30000)> + <#if item.getShowRedMark() == 1> + ${item.getBuyerNick()}${item.getUserMobile()}${item.getShopNick()}${Global.get(DesignIndustryCache.class).getIndustryName(item.getIndustryId())}${map.get(item.getDesignId())}${item.getOrderText()}${Amounts.toYuanMustRadix(item.getAmount())}${Sqls.toDateTimeString(item.getCreateTime())}
            +
            + ${zhiqim_manager_paging(pageResult, "/orderTagList.htm")} +
            +${zhiqim_manager_content_end()} + +<#--右侧文件信息--> +
            + +
            + +<#-- 联系旺旺&联系QQ弹窗框 --> + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/order/presenter/completeOrderInfo.zml b/Yangcai365_design/manage/zview/order/presenter/completeOrderInfo.zml new file mode 100644 index 0000000..7d3634c --- /dev/null +++ b/Yangcai365_design/manage/zview/order/presenter/completeOrderInfo.zml @@ -0,0 +1,10 @@ +<#if Validates.isEqual(text, "BLOCK")> +
            + 今日定稿目标数:${goalNum}单,已完成定稿数:${comNum}单 +
            + +<#if Validates.isEqual(text, "HIDDEN")> +
            + 今日未设置定稿目标数 +
            + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/order/presenter/historyBackDetails.zml b/Yangcai365_design/manage/zview/order/presenter/historyBackDetails.zml new file mode 100644 index 0000000..1820f64 --- /dev/null +++ b/Yangcai365_design/manage/zview/order/presenter/historyBackDetails.zml @@ -0,0 +1,29 @@ + +<#-- 列表 --> + + + + + + + + + + ${zhiqim_manager_tr_no_record(pageResult, 8, "没有历史退回记录")} + <#for item : models> + ${item.getOrderText()} + + + +
            订单号旺旺号订单金额退回时间产品描述退回原因
            ${item.getCheckBackReason()}
            + +
            +
            +
            + +
            diff --git a/Yangcai365_design/manage/zview/order/presenter/historyOrderTagLog.zml b/Yangcai365_design/manage/zview/order/presenter/historyOrderTagLog.zml new file mode 100644 index 0000000..96b04c0 --- /dev/null +++ b/Yangcai365_design/manage/zview/order/presenter/historyOrderTagLog.zml @@ -0,0 +1,25 @@ + + <#for item : modelList> + + + + + + + + + + + + + + + + + + + + + + +
            主行业:${item.getMainIndustryName()}子行业:${item.getSonIndustryName()}应用场景:${item.getAppScenarios()}
            客户类型:${item.getCustomerType()}未匹配关键字:${item.getUnmatchKeyword()}设计风格:${item.getDesignStyle()}
            标签编辑人:${item.getOperatorCode()}标签编辑时间:${Sqls.toDateTimeString(item.getOperatorTime())}
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/order/presenter/quickContact.zml b/Yangcai365_design/manage/zview/order/presenter/quickContact.zml new file mode 100644 index 0000000..6fffd37 --- /dev/null +++ b/Yangcai365_design/manage/zview/order/presenter/quickContact.zml @@ -0,0 +1,115 @@ + + +
            +
            +
            订单【${order.getDesignId()}】快捷联系方式
            +
            +
            + +
            +
            + + <#if order.getMerchantId() == "2019491431057"> + <#if order.getShopNick() == "领淘"> +
            +
            + 售前客服:玉米 +
            +
            + 联系电话:15200463922 +
            +
            + 个人微信:15200463922 +
            +
            + <#else> +
            +
            + 售前客服:玲珑 +
            +
            + 联系电话:13667316513 +
            +
            + 个人微信:13667316513 +
            +
            + + + <#elseif order.getMerchantId() == "1920862616055"> +
            +
            + 售前客服:木易 +
            +
            + 联系电话:15874971979 +
            +
            + 个人微信:15874971979 +
            +
            + + <#elseif order.getMerchantId() == "2000922684001"> +
            +
            + 售前客服:崔崔 +
            +
            + 联系电话:13786298968 +
            +
            + 个人微信:13786298968 +
            +
            + <#else> +
            +
            + 售前客服:${createrDesigner.getOperatorCode()} +
            +
            + 联系电话:${createrDesigner.getOperatorMobile()} +
            +
            + 个人微信:${createrDesigner.getOperatorWxcode()} +
            +
            + +
            +
            + +
            +
            +
            +
            + <#if Validates.isNotEmptyBlank(order.getCustomerQrcodeUrl())> + 对稿沟通群服务二维码: + + <#else> + <#if order.getShopNick() == "领淘"> + 对稿沟通: 企业微信搜索:${order.getUserContact()}  ${order.getUserMobile()} + <#else> + 对稿沟通请联系售前客服 + + +
            +
            +
            +
            +<#-- 操作 --> +
            + +
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/order/progressNote.zml b/Yangcai365_design/manage/zview/order/progressNote.zml new file mode 100644 index 0000000..835b2df --- /dev/null +++ b/Yangcai365_design/manage/zview/order/progressNote.zml @@ -0,0 +1,52 @@ + + +
            + + + + +
            + + + + + + + + +<#if pageResult.size() == 0> + + + + +<#for item : pageResult.list()> + + + + + + + +${zhiqim_manager_paging(pageResult, "progressNote.htm")} +
            订单号备注内容备注人备注时间
            暂不存在进度备注信息
            ${item.getDesignId()}${item.getOrdProgressNote()}${item.getOperateCode()}${Sqls.toDateTimeString(item.getCreateTime())}
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/order/qcApplyDetail.zml b/Yangcai365_design/manage/zview/order/qcApplyDetail.zml new file mode 100644 index 0000000..c28197e --- /dev/null +++ b/Yangcai365_design/manage/zview/order/qcApplyDetail.zml @@ -0,0 +1,120 @@ + + + +${zhiqim_manager_content()} +
            + +
            +
              + <#for item : awardedTypeList> +
            • + +
            +
            +
            +
            + +
            +
            + 凭证 +
            +

            +
            +
            + <#if !readonly> + +     + <#else> + + +
            +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/order/qcApplyScore.zml b/Yangcai365_design/manage/zview/order/qcApplyScore.zml new file mode 100644 index 0000000..b8c5771 --- /dev/null +++ b/Yangcai365_design/manage/zview/order/qcApplyScore.zml @@ -0,0 +1,125 @@ + + + +${zhiqim_manager_content()} + + + + +
            +
              + <#for item : awardedTypeList> +
            • + +
            +
            + + + + +
            + +
            + +
            +<#-- 操作 --> +
            +    + +
            +${zhiqim_manager_content_end()} diff --git a/Yangcai365_design/manage/zview/order/qcApplyScoreList.zml b/Yangcai365_design/manage/zview/order/qcApplyScoreList.zml new file mode 100644 index 0000000..534290b --- /dev/null +++ b/Yangcai365_design/manage/zview/order/qcApplyScoreList.zml @@ -0,0 +1,172 @@ + + + +${zhiqim_manager_breadcrumb("质检加分列表")} +${zhiqim_manager_content()} + +<#-- 导航 --> +
            + +
            + +<#-- 左侧功能 --> +<#-- 查询条件 --> +${zhiqim_manager_title("查询条件")} +
            + + + + + + + + + + + + + +
            设计师: + + + 申请状态: + + 加分类型: + + + 申请时间: - + +
            审核人: + 审核时间: - + + + +
            +
            + +<#-- 操作功能 --> +
            + <#-- + --> +
            + +<#-- 列表 --> + + + + + + + + + + + + + + + ${zhiqim_manager_tr_no_record(pageResult, 20, "暂时没有申请")} + <#for item : pageResult.list()> + + + + + + + + + + + + + + +
            选择设计师组织加分类型申请理由审核人审核时间质检加分申请时间申请状态操作
            ${item.getDesigner()}${ZmrOrgDao.getOrgName(request, item.getOrgId())}${AwardedTypeConstants.getAwardedTypeId(item.getQcTypeId())}${item.getApplyReason()}${item.getQcAwardedAuditor()}${Sqls.toDateTimeString(item.getQcAwardedAuditorTime())}${item.getScore()}${DateTimes.toDateTimeString(item.getApplyTime())} + <#if item.getApplyFlag()==0>申请中 + <#if item.getApplyFlag()==1>申请成功 + <#if item.getApplyFlag()==2>申请失败 +
            + ${zhiqim_manager_paging(pageResult, "/qcApplyScoreList.htm")} +${zhiqim_manager_content_end()} + +<#-- 联系旺旺&联系QQ弹窗框 --> + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/order/qcJudge.zml b/Yangcai365_design/manage/zview/order/qcJudge.zml new file mode 100644 index 0000000..4d5d9c5 --- /dev/null +++ b/Yangcai365_design/manage/zview/order/qcJudge.zml @@ -0,0 +1,138 @@ + + + +${zhiqim_manager_content()} + + + + + + + + + + + + + + + + + + + + + + + + +
            订 单 号 :${order.getDesignId()}组 织:${ZmrOrgDao.getOrgName(request, order.getOrgId())}设计师:${order.getDesigner()}
            店 铺 名 称 :${order.getShopNick()}旺旺号:${order.getBuyerNick()}
            质检违规原因: + +
            质检违规描述: + +
            +
            + +
            +
            +<#-- 操作 --> +
            +
            +    + +
            +
            +${zhiqim_manager_content_end()} diff --git a/Yangcai365_design/manage/zview/order/qcOrderList.zml b/Yangcai365_design/manage/zview/order/qcOrderList.zml new file mode 100644 index 0000000..137a4fc --- /dev/null +++ b/Yangcai365_design/manage/zview/order/qcOrderList.zml @@ -0,0 +1,157 @@ +${Scripts.src("/zinc/js/global_2019010801.js")} + + +${zhiqim_manager_breadcrumb("质检订单列表")} +${zhiqim_manager_content()} + +<#-- 导航 --> +
            + +
            + +<#-- 左侧功能 --> +<#-- 查询条件 --> +${zhiqim_manager_title("查询条件")} +
            + + + + + + + + + + + + + + +
            订 单 号 :设计师: + + + 订单状态: + + 稿件类型: +
            + 质检状态: + + 录单时间: - + +
            +
            + +<#-- 操作功能 --> +
            + + + +
            + +<#-- 列表 --> + + + + + + + + + + + + + + + + + + + ${zhiqim_manager_tr_no_record(pageResult, 20, "暂时没有质检订单")} + <#for item : pageResult.list()> + + + + + + + + + + + + + + + + + + + + + + ${zhiqim_manager_paging(pageResult, "/qcOrderList.htm")} +
            选择订单号所属组织设计旺旺号店铺设计师状态产品进度备注订单金额领取时间设计时间初稿时间状态
            ${item.getDesignId()}${ZmrOrgDao.getOrgName(request, item.getOrgId())}${DraftConstants.get(item.getDraftType())}${item.getBuyerNick()}${item.getShopNick()}${item.getDesigner()}${StatusConstants.getStatus(item.getStatus())}${item.getOrderText()}${progressNoteMap.get(item.getDesignId())}${Amounts.toYuanMustRadix(item.getAmount())}${Sqls.toDateTimeString(item.getDesignReceiveTime())}${Sqls.toDateTimeString(item.getDesignBeginTime())}${Sqls.toDateTimeString(item.getDesignDraftTime())} + <#if item.getQcFlag()==0>未质检 + <#if item.getQcFlag()==1>质检正常 +
            +${zhiqim_manager_content_end()} + +<#-- 联系旺旺&联系QQ弹窗框 --> + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/order/qcPersonal.zml b/Yangcai365_design/manage/zview/order/qcPersonal.zml new file mode 100644 index 0000000..d5f454c --- /dev/null +++ b/Yangcai365_design/manage/zview/order/qcPersonal.zml @@ -0,0 +1,181 @@ +${Styles.htmlOverflowHidden()} +${Scripts.src("/zinc/chart/highcharts.js")} +${Scripts.src("/zinc/chart/exporting.js")} +${Scripts.src("/zinc/chart/highcharts-zh_CN.js")} + +${zhiqim_manager_breadcrumb("我的质检")} +${zhiqim_manager_content()} + +<#-- 导航 --> +
            + +
            + + + + + + + +
            + + + + + + + + + + + + <#for item : pageResult.list()> + + + + + + + + + ${zhiqim_manager_tr_no_record(pageResult, 20, "没有质检扣分订单")} +
            设计师[${designer}]质检扣分表
            违规单号违规原因违规扣分质检时间操作
            ${item.getDesignId()}${item.getReason()}-${item.getScore()}${item.getQcTime()}
            + ${zhiqim_manager_paging(pageResult, "/qcPersonal.htm")} + + + + + + + + + + + + + + + <#for item : result.list()> + + + + + + + + + + + ${zhiqim_manager_tr_no_record(result, 20, "没有申请加分")} +
            设计师[${designer}]质检加分表
            申请ID申请原因退回原因质检加分申请时间申请状态操作
            ${item.getApplyId()}${item.getApplyReason()}${item.getApplyBackReason()}+${item.getScore()}${item.getApplyTime()} + <#if item.getApplyFlag()==0>申请中 + <#if item.getApplyFlag()==1>申请成功 + <#if item.getApplyFlag()==2>申请失败 +
            + ${zhiqim_manager_paging(result, "/qcPersonal.htm")} +
            +${zhiqim_manager_content_end()} diff --git a/Yangcai365_design/manage/zview/order/qcViolationsDetail.zml b/Yangcai365_design/manage/zview/order/qcViolationsDetail.zml new file mode 100644 index 0000000..b5ee1e6 --- /dev/null +++ b/Yangcai365_design/manage/zview/order/qcViolationsDetail.zml @@ -0,0 +1,61 @@ + + + +${zhiqim_manager_content()} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            设计订单:${order.getDesignId()}组织:${ZmrOrgDao.getOrgName(request, order.getOrgId())}设计师:${order.getDesigner()}
            店铺名称:${order.getShopNick()}旺旺号:${order.getBuyerNick()}违规扣分:-${record.getScore()}
            产品信息:${order.getOrderText()}
            质检违规原因:${record.getReason()}
            质检违规描述:${record.getDescription()}
            +
            + 质检违规证据图 +
            +
            +
            + +
            +
            +${zhiqim_manager_content_end()} diff --git a/Yangcai365_design/manage/zview/order/qcViolationsList.zml b/Yangcai365_design/manage/zview/order/qcViolationsList.zml new file mode 100644 index 0000000..8b26e58 --- /dev/null +++ b/Yangcai365_design/manage/zview/order/qcViolationsList.zml @@ -0,0 +1,127 @@ + + +${zhiqim_manager_breadcrumb("质检违规列表")} +${zhiqim_manager_content()} + +<#-- 导航 --> +
            + +
            + +<#-- 左侧功能 --> +<#-- 查询条件 --> +${zhiqim_manager_title("查询条件")} +
            + + + + + + + + + + + + + +
            订单号:设计师: + + + 订单状态: + + 稿件类型: +
            + 录单时间: - + +
            +
            + +<#-- 操作功能 --> +
            + +
            + +<#-- 列表 --> + + + + + + + + + + + + + + + + + + ${zhiqim_manager_tr_no_record(pageResult, 20, "暂时没有质检订单")} + <#for item : pageResult.list()> + + + + + + + + + + + + + + + + + + + +
            选择订单号所属组织设计旺旺号店铺设计师状态产品订单金额录单时间对稿微信对稿手机操作
            ${item.getDesignId()}${ZmrOrgDao.getOrgName(request, item.getOrgId())}${DraftConstants.get(item.getDraftType())}${item.getBuyerNick()}${item.getShopNick()}${item.getDesigner()}${StatusConstants.getStatus(item.getStatus())}${item.getOrderText()}${Amounts.toYuanMustRadix(item.getAmount())}${Sqls.toDateTimeString(item.getCreateTime())}${item.getUserWx()}${item.getUserMobile()}
            +${zhiqim_manager_paging(pageResult, "/qcViolationsList.htm")} +${zhiqim_manager_content_end()} + +<#-- 联系旺旺&联系QQ弹窗框 --> + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/order/receiveOrder.zml b/Yangcai365_design/manage/zview/order/receiveOrder.zml new file mode 100644 index 0000000..5e8e6ad --- /dev/null +++ b/Yangcai365_design/manage/zview/order/receiveOrder.zml @@ -0,0 +1,116 @@ +${Styles.htmlOverflowHidden()} +${Scripts.src("/zinc/js/global_2019010801.js")} +${yangcai_calc_Left_width_height(400, 70)} + + + + +${zhiqim_manager_content()} +
            +
            + + <#-- 查询条件 --> +
            + + +
            +
            + <#-- 分页列表--> +
            + + + + + + + <#if isShowCost == 1> + + + + + + + + <#if pageResult.size() == 0> + ${zhiqim_manager_no_record(8,"暂不存在抢单信息,或者当积分少于0的时候不允许抢单,请联系客服")} + + <#for item : pageResult.list()> + + + + + + <#if isShowCost == 1> + + + + + + + + +
            产品类型订单号产品信息设计要求设计佣金设计等级下单时间操作
            ${Global.get(DesignTypeCache.class).getName(item.getTypeId())}${item.getDesignId()}${item.getOrderText()}${item.getUserNotice()}${Amounts.toYuanMustRadix(item.getDesignPrice())}${DraftConstants.get(item.getDraftType())}${Sqls.toDateTimeString(item.getCreateTime())}
            +
            + ${zhiqim_manager_paging(pageResult, "/receiveOrder.htm")} +
            +
            +${zhiqim_manager_content_end()} diff --git a/Yangcai365_design/manage/zview/order/retentionDealOrderDetails.zml b/Yangcai365_design/manage/zview/order/retentionDealOrderDetails.zml new file mode 100644 index 0000000..0508a39 --- /dev/null +++ b/Yangcai365_design/manage/zview/order/retentionDealOrderDetails.zml @@ -0,0 +1,95 @@ + + +
            +
            +
            订 单 号:${order.getDesignId()}
            +
            滞留时长:${retentDealTime}
            +
            +
            + + +
            +
            +
            + 旺旺号: + ${order.getBuyerNick()} +
            +
            + 产品类型: + ${order.getOrderText()} +
            +
            + 设计师: + ${order.getDesigner()} +
            +
            +
            +
            + 组织名称: + ${ZmrOrgDao.getOrgName(request, order.getOrgId())} +
            +
            + 订单金额: + ${Amounts.toYuan(order.getAmount())} +
            +
            + 店铺名称: + ${order.getShopNick()} +
            +
            +
            + +
            +
            处理方式: + + +
            +
            设计师跟进情况: + + + +
            +
            + +
            备注
            +
            + +
            +
            + + +
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/order/retentionFinishOrderDetails.zml b/Yangcai365_design/manage/zview/order/retentionFinishOrderDetails.zml new file mode 100644 index 0000000..8efdd26 --- /dev/null +++ b/Yangcai365_design/manage/zview/order/retentionFinishOrderDetails.zml @@ -0,0 +1,59 @@ + +
            +
            +
            订 单 号:${order.getDesignId()}
            +
            滞留时长:${retentDealTime}
            +
            +
            + + +
            +
            +
            + 旺旺号: + ${order.getBuyerNick()} +
            +
            + 产品类型: + ${order.getOrderText()} +
            +
            + 设计师: + ${order.getDesigner()} +
            +
            +
            +
            + 组织名称: + ${ZmrOrgDao.getOrgName(request, order.getOrgId())} +
            +
            + 订单金额: + ${Amounts.toYuan(order.getAmount())} +
            +
            + 店铺名称: + ${order.getShopNick()} +
            +
            +
            +
            滞留单处理结果反馈
            +
            +
            处理方式: + + +
            +
            设计师跟进情况: + + + +
            +
            + +
            备注
            +
            + +
            +
            + +
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/order/selectRefundOrderImg.zml b/Yangcai365_design/manage/zview/order/selectRefundOrderImg.zml new file mode 100644 index 0000000..1bc3d16 --- /dev/null +++ b/Yangcai365_design/manage/zview/order/selectRefundOrderImg.zml @@ -0,0 +1,27 @@ + + + +${zhiqim_manager_content()} +<#for item : attaList> +
            + 截图 +
            + +

            +${zhiqim_manager_content_end()} diff --git a/Yangcai365_design/manage/zview/order/uploadCustomCdrInfo.zml b/Yangcai365_design/manage/zview/order/uploadCustomCdrInfo.zml new file mode 100644 index 0000000..9260414 --- /dev/null +++ b/Yangcai365_design/manage/zview/order/uploadCustomCdrInfo.zml @@ -0,0 +1,88 @@ +<#-- 主题变量和函数定义 --> +<#include "/ztmpl/zhiqim_manager/"+themeMain+"/define.htm"/> + + + +${context.getContextName()} + + +${Styles.src(zhiqim.css)} +${Scripts.src(zhiqim.js)} +${Styles.src(zmr_theme.css)} +${Styles.src(context.getRootPath("/zinc/layui/css/layui.css"))} +${Scripts.src(context.getRootPath("/zinc/layui/layui.js"))} + + + + + + + + + + + + +
            客户素材
            +
            + +

            点击上传或拖拽资料素材到此处

            +


            + 共上传:0个   + 成功:0个   + 失败:0个 +
            + +
            + +
            + + diff --git a/Yangcai365_design/manage/zview/order/uploadData.zml b/Yangcai365_design/manage/zview/order/uploadData.zml new file mode 100644 index 0000000..69a0dfa --- /dev/null +++ b/Yangcai365_design/manage/zview/order/uploadData.zml @@ -0,0 +1,161 @@ +${Styles.htmlOverflowHidden()} +${Scripts.src("/zinc/js/global_2019010801.js")} +${yangcai_calc_Left_width_height(400, 70)} + +<#var data="data=copy,userText,CustomFile,TemplateFile,DesginFile,EndFile,WorkFile,AftersaleFile,ThumFile,userNotice"/> +<#var addRule="addRule=DesginFile,EndFile,WorkFile,AftersaleFile"/> +<#var delRule="delRule=DesginFile,EndFile,WorkFile,AftersaleFile"/> +${zhiqim_manager_breadcrumb("资料上传")} +${zhiqim_manager_content()} + +<#-- 导航栏 --> +
            + +
            + + +<#-- 左侧功能 --> +
            + + <#-- 查询条件 --> + ${zhiqim_manager_title("查询条件")} +
            + + + + + + + + + + + + + + + + + + + +
            订单号:产品类型: + 其他信息:
            旺旺号:淘宝单号:录单时间: -  + +
            + 稿件类型: + 是否印刷: + 添加行业: +
            +
            + + <#-- 操作功能 --> +
            + + <#if ZmrPathRule.check(request, "openWangWang")> + <#if ZmrPathRule.check(request, "openQQ")> +
            + + <#-- 分页列表--> +
            + + ${zhiqim_manager_tr_title(30, "订单列表")} + + + + + + + + + + + + + + + + + + + + + <#if pageResult.total() == 0> + ${zhiqim_manager_no_record(30, "暂时没有订单信息")} + + <#for item : pageResult.list()> + + + + + + + + + + + + + + + + + + + + + + + +
            选择订单号店铺设计旺旺号状态行业产品印刷金额特殊工艺录单时间完稿时间设计师审核人联系人对稿手机对稿QQ对稿微信
            ${item.getDesignId()}${item.getShopNick()}${DraftConstants.get(item.getDraftType())}${item.getBuyerNick()}${StatusConstants.getStatus(item.getStatus())}${Global.get(DesignIndustryCache.class).getIndustryName(item.getIndustryId())}${item.getOrderText()}${Amounts.toYuanMustRadix(item.getAmount())}${item.getPrintSpecial()}${Sqls.toDateTimeString(item.getCreateTime())}${Sqls.toDateTimeString(item.getDesignEndTime())}${item.getDesigner()}${item.getChecker()}${item.getUserContact()}${item.getUserMobile()}${item.getUserQq()}${item.getUserWx()}
            +
            + ${zhiqim_manager_paging(pageResult, "uploadData.htm")} +
            +${zhiqim_manager_content_end()} + +<#--右侧文件信息--> +
            + +
            + +<#-- 联系旺旺&联系QQ弹窗框 --> + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/order/waiveOrder.zml b/Yangcai365_design/manage/zview/order/waiveOrder.zml new file mode 100644 index 0000000..16703ad --- /dev/null +++ b/Yangcai365_design/manage/zview/order/waiveOrder.zml @@ -0,0 +1,36 @@ + + +
            +
            放弃订单
            +
            订单编号: ${designId}
            +
            产品类型: ${typeName}
            +
            确认放弃订单,将扣除积分-10分
            本月仅剩(${waiveNum})次放弃次数
            +
            +<#-- 操作 --> +
            + + +
            + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/order/wangwangOrder.zml b/Yangcai365_design/manage/zview/order/wangwangOrder.zml new file mode 100644 index 0000000..5e9c021 --- /dev/null +++ b/Yangcai365_design/manage/zview/order/wangwangOrder.zml @@ -0,0 +1,60 @@ +${Styles.htmlOverflowHidden()} +${Scripts.src("/zinc/js/global_2019010801.js")} +${yangcai_calc_Left_width_height(400, 70)} + +<#var data="data=copy,userText,userNotice,CustomFile,DesginFile,EndFile,WorkFile,FristThumFile,TbzFile"/> +<#var addRule="addRule=CustomFile,DesginFile,EndFile,WorkFile,TbzFile"/> +<#var delRule="delRule=CustomFile,DesginFile,EndFile,WorkFile,TbzFile"/> +${zhiqim_manager_breadcrumb("旺旺订单")} +${zhiqim_manager_content()} + +<#-- 导航栏 --> +
            + +
            + +<#-- 左侧功能 --> +
            + <#-- 分页列表--> + + ${zhiqim_manager_tr_title(7, "旺旺订单列表")} + + + + + + + + + + + + + <#for item : orderList> + + + + + + + + + + + + + +
            选择订单号稿件类型设计师订单状态旺旺号产品类型特殊工艺收货人收件地址
            ${item.getDesignId()}${DraftConstants.get(item.getDraftType())}${item.getDesigner()}${StatusConstants.getStatus(item.getStatus())}${item.getBuyerNick()}${Global.get(DesignTypeCache.class).getName(item.getTypeId())}${item.getPrintSpecial()}${item.getReceiverName()}${item.getReceiverState()} ${item.getReceiverCity()} ${item.getReceiverDistrict()} ${item.getReceiverAddress()}
            +
            +${zhiqim_manager_content_end()} + +<#--右侧文件信息--> +
            + +
            diff --git a/Yangcai365_design/manage/zview/pdfQueue.zml b/Yangcai365_design/manage/zview/pdfQueue.zml new file mode 100644 index 0000000..b5b293b --- /dev/null +++ b/Yangcai365_design/manage/zview/pdfQueue.zml @@ -0,0 +1,93 @@ + + + + + + + + + + + + + <#for item : theaderList> + + + + + + + +
            + 线程池状态(正在处理:${runNum} 休眠:${sleepNum}) +
            线程名当前状态上次休眠时间
            ${item.getThreadName()}${item.isActive() ? "正在处理" : "休眠"}${item.getIdleTimeString()}
            + + + + + + + + + + + + <#for item : waitQueue> + + + + + + + + +
            + 等待队列(${waitQueue.size()}) +
            队列ID队列状态模板ID完成时间
            ${item.getObj().getHandleId()} + <#if item.getObj().getHandleStatus()==0> + 等待处理 + <#elseif item.getObj().getHandleStatus()==1> + 处理中 + <#elseif item.getObj().getHandleStatus()==2> + 处理完成 + <#elseif item.getObj().getHandleStatus()==3> + 处理失败 + + ${item.getObj().getMediaId()}${DateTimes.toDateTimeString(item.getObj().getFinishTime())}
            + + + + + + + + + + + + <#for item : finishList> + + + + + + + + +
            + 已完成队列(${finishList.size()}) +
            队列ID队列状态模板ID完成时间
            ${item.getHandleId()} + <#if item.getHandleStatus()==0> + 等待处理 + <#elseif item.getHandleStatus()==1> + 处理中 + <#elseif item.getHandleStatus()==2> + 处理完成 + <#elseif item.getHandleStatus()==3> + 处理失败 + + ${item.getMediaId()}${DateTimes.toDateTimeString(item.getFinishTime())}
            diff --git a/Yangcai365_design/manage/zview/score/keywordScore.zml b/Yangcai365_design/manage/zview/score/keywordScore.zml new file mode 100644 index 0000000..dd63e03 --- /dev/null +++ b/Yangcai365_design/manage/zview/score/keywordScore.zml @@ -0,0 +1,97 @@ + + +${zhiqim_manager_breadcrumb("关键词分数权重")} +${zhiqim_manager_content()} +<#-- 导航栏 --> +
            + +
            + +<#-- 列表 --> + + + + + + +
            + + + + + + <#for item : scoreList> + + + + +
            序号类型名称
            ${item_index+1}${ScoreConstants.getKeywordScoreTypeDesc(item.getScoreType())}
            +
            + + + + + + + + + + + + <#for item : paramList> + + + + + + + + + +
              + <#if Validates.isNotEmpty(scoreType)>[${ScoreConstants.getKeywordScoreTypeDesc(scoreType)}]参数列表<#else>所有参数列表 +
            操作类型参数名称参数键参数值操作
            + <#if item.getParamType() == 0>加分 + <#if item.getParamType() == 1>减分 + ${KeywordScoreConstants.getKeywordParamDesc(item.getParamKey())}${item.getParamKey()}
            +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/score/keywordScoreAdd.zml b/Yangcai365_design/manage/zview/score/keywordScoreAdd.zml new file mode 100644 index 0000000..41e1409 --- /dev/null +++ b/Yangcai365_design/manage/zview/score/keywordScoreAdd.zml @@ -0,0 +1,57 @@ +${zhiqim_manager_history("/keywordScore.htm")} +${zhiqim_manager_breadcrumb_parent("/keywordScore.htm", "关键词评分参数", "增加关键词评分参数")} +${request.getValidateScript()} + +
            +${zhiqim_manager_title("新增关键词评分参数")} +
            + + + + + + + + + + + + + + + + + + + + + +
            评分类型:(请选择) +  * +
            评分类型:(请选择) +  * +
            参数操作类型:(请选择) +  * +
            参数键:(32位不定长字符) +   * +
            参数值:(请输入) *
            +${zhiqim_manager_submit()} +
            +
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/score/keywordWeight.zml b/Yangcai365_design/manage/zview/score/keywordWeight.zml new file mode 100644 index 0000000..ca5e6bd --- /dev/null +++ b/Yangcai365_design/manage/zview/score/keywordWeight.zml @@ -0,0 +1,50 @@ +${zhiqim_manager_breadcrumb("关键词分数权重")} +${zhiqim_manager_content()} +<#-- 导航栏 --> +
            + +
            + + + + + + + + + + + + + +<#if pageResult.total() == 0> + ${zhiqim_manager_no_record(6 "暂时没有关键词分数权重信息")} + +<#for item : pageResult.list()> + + + + + + + + + +
             关键词分数权重列表
            选择类型名称日期规则类型类型分值权重比例
            + <#if Validates.isEqual("TEMPLATE", item.getScoreName())>模板 + <#if Validates.isEqual("KEYWORD", item.getScoreName())>关键词 + ${item.getDayCode()}${ScoreConstants.getKeywordScoreTypeDesc(item.getScoreType())}<#if item.getScoreValue() gt 0> ${item.getScoreValue()}${Amounts.toYuanMustRadix(item.getScoreWeight())}
            +${zhiqim_manager_paging(pageResult, "/keywordWeight.htm")} +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/score/keywordWeightAdd.zml b/Yangcai365_design/manage/zview/score/keywordWeightAdd.zml new file mode 100644 index 0000000..c4e5eec --- /dev/null +++ b/Yangcai365_design/manage/zview/score/keywordWeightAdd.zml @@ -0,0 +1,43 @@ +${zhiqim_manager_history("/templateWeight.htm")} +${zhiqim_manager_breadcrumb_parent("/templateWeight.htm", "关键词分数权重", "增加关键词分数权重")} +${request.getValidateScript()} + +
            +${zhiqim_manager_title("新增关键词分数权重")} +
            + + + + + + + + + + + + + + + + + + + + + +
            类型名称: +  * +
            权重类型:(请选择) +  * +
            日期:(请选择) *
            基础分:(请输入)
            权重值:(百分比,如50%,只需填写50)% *
            +${zhiqim_manager_submit()} +
            +
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/score/keywordWeightModify.zml b/Yangcai365_design/manage/zview/score/keywordWeightModify.zml new file mode 100644 index 0000000..b025a73 --- /dev/null +++ b/Yangcai365_design/manage/zview/score/keywordWeightModify.zml @@ -0,0 +1,37 @@ +${zhiqim_manager_history("/keywordWeight.htm")} +${zhiqim_manager_breadcrumb_parent("/keywordWeight.htm", "关键词分数权重", "修改关键词分数权重")} +${request.getValidateScript()} + +
            +${zhiqim_manager_title("修改关键词分数权重")} +
            + + + + + + + + + + + + + + + + + + + + + + + +
            类型名称: + <#if Validates.isEqual("TEMPLATE", weight.getScoreName())>模板 + <#if Validates.isEqual("KEYWORD", weight.getScoreName())>关键词 +
            权重类型:${ScoreConstants.getKeywordScoreTypeDesc(weight.getScoreType())}
            日期:(请选择) *
            基础分:(请输入)
            权重值:(百分比,如50%,只需填写50)% *
            +${zhiqim_manager_submit()} +
            +
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/score/scoreDesignerLever.zml b/Yangcai365_design/manage/zview/score/scoreDesignerLever.zml new file mode 100644 index 0000000..d8ada54 --- /dev/null +++ b/Yangcai365_design/manage/zview/score/scoreDesignerLever.zml @@ -0,0 +1,44 @@ +${zhiqim_manager_breadcrumb("设计师等级配置")} +${zhiqim_manager_content()} +<#-- 导航栏 --> +
            + +
            + + + + + + + + + + + + +<#if pageResult.total() == 0> + ${zhiqim_manager_no_record(6 "暂时没有设计师等级配置信息")} + +<#for item : pageResult.list()> + + + + + + + + +
             设计师等级配置列表
            选择设计师等级积分分数操作人更新时间
            ${item.getDesignerLever()}${item.getMinScore()}至${item.getMaxScore()}${item.getLastOperatorCode()}${item.getModifyTime()}
            +${zhiqim_manager_paging(pageResult, "/scoreDesignerLever.htm")} +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/score/scoreDesignerLeverAdd.zml b/Yangcai365_design/manage/zview/score/scoreDesignerLeverAdd.zml new file mode 100644 index 0000000..3344cae --- /dev/null +++ b/Yangcai365_design/manage/zview/score/scoreDesignerLeverAdd.zml @@ -0,0 +1,22 @@ +${zhiqim_manager_history("/scoreDesignerLever.htm")} +${zhiqim_manager_breadcrumb_parent("/scoreDesignerLever.htm", "设计师等级配置", "增加设计师等级配置")} +${request.getValidateScript()} + +
            +${zhiqim_manager_title("新增设计师等级配置")} +
            + + + + + + + + + +
            设计师等级: + +
            评分分数:-
            +${zhiqim_manager_submit()} +
            +
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/score/scoreDesignerLeverModify.zml b/Yangcai365_design/manage/zview/score/scoreDesignerLeverModify.zml new file mode 100644 index 0000000..b214556 --- /dev/null +++ b/Yangcai365_design/manage/zview/score/scoreDesignerLeverModify.zml @@ -0,0 +1,24 @@ +${zhiqim_manager_history("/scoreDesignerLever.htm")} +${zhiqim_manager_breadcrumb_parent("/scoreDesignerLever.htm", "设计师等级配置", "修改设计师等级配置")} +${request.getValidateScript()} + +
            +${zhiqim_manager_title("修改设计师等级配置")} +
            + + + + + + + + + + + +
            设计师等级: + +
            评分分数:-
            +${zhiqim_manager_submit()} +
            +
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/score/scoreDesignerRecord.zml b/Yangcai365_design/manage/zview/score/scoreDesignerRecord.zml new file mode 100644 index 0000000..df9091c --- /dev/null +++ b/Yangcai365_design/manage/zview/score/scoreDesignerRecord.zml @@ -0,0 +1,111 @@ + +${zhiqim_manager_breadcrumb("设计师积分列表")} +${zhiqim_manager_content()} +<#-- 导航栏 --> +<#-- 导航栏 --> +
            + +
            + + + + + + + + + + + + + + + + + +<#if pageResult.total() == 0> + ${zhiqim_manager_no_record(6 "暂时没有设计师积分信息")} + +<#for item : pageResult.list()> + + + + + + + + + + + + +
             设计师积分列表
            设计师当前积分当前等级状态最后更新积分值最后更新积分细则最后更新涉及订单最后更新时间操作
            ${item.getOperatorCode()}${item.getScore()} + <#for scoreDesignerLever : scoreDesignerLeverList> + <#if scoreDesignerLever.maxScore gte item.getScore() && item.getScore() gte scoreDesignerLever.minScore > + ${scoreDesignerLever.getDesignerLever()} + + + + <#if item.getState() == 1> +
            生效
            + <#else> +
            失效
            + +
            + <#if item.getLastModifyScore() !=0 > + ${item.getLastModifyScore()} + + ${item.getTypeName()} + <#if item.getOrderId() !=-1 && item.getOrderId() !=0> + ${item.getOrderId()} + + ${item.getLastModifyTime()} + + +
            +${zhiqim_manager_paging(pageResult, "/scoreDesignerRecord.htm")} +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/score/scoreDesignerRecordAdd.zml b/Yangcai365_design/manage/zview/score/scoreDesignerRecordAdd.zml new file mode 100644 index 0000000..a7b1dbe --- /dev/null +++ b/Yangcai365_design/manage/zview/score/scoreDesignerRecordAdd.zml @@ -0,0 +1,27 @@ +${zhiqim_manager_history("/scoreDesignerRecord.htm")} +${zhiqim_manager_breadcrumb_parent("/scoreDesignerRecord.htm", "设计师积分", "人工修正")} +${request.getValidateScript()} + +
            +${zhiqim_manager_title("人工修正设计师积分")} +
            + + + + + + + + + + + + + + +
            积分(正数为增加,负数为减少): *
            备注: *
            涉及订单: + +
            +${zhiqim_manager_submit()} +
            +
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/score/scoreDesignerRecordDetail.zml b/Yangcai365_design/manage/zview/score/scoreDesignerRecordDetail.zml new file mode 100644 index 0000000..47db1ed --- /dev/null +++ b/Yangcai365_design/manage/zview/score/scoreDesignerRecordDetail.zml @@ -0,0 +1,48 @@ +${zhiqim_manager_content()} + +
            +
            + + 项目类型: + + + 记录时间: +  -  + + +
            +
            + + + + + + + + + + +<#if pageResult.total() == 0> + ${zhiqim_manager_no_record(6 "暂时没有设计师积分详情")} + +<#for item : pageResult.list()> + + + + + + + + + +
            积分时间积分细则涉及订单备注操作人
            ${item.getScore()}${item.getModifyTime()}${item.getTypeName()} + <#if item.getOrderId() !=-1 && item.getOrderId() !=0> + ${item.getOrderId()} + + ${item.getRemark()}${item.getCreateOperator()}
            +${zhiqim_manager_paging(pageResult, "/scoreDesignerRecordDetail.htm")} +${zhiqim_manager_content_end()} diff --git a/Yangcai365_design/manage/zview/score/scoreType.zml b/Yangcai365_design/manage/zview/score/scoreType.zml new file mode 100644 index 0000000..b26bad9 --- /dev/null +++ b/Yangcai365_design/manage/zview/score/scoreType.zml @@ -0,0 +1,71 @@ + +${zhiqim_manager_breadcrumb("积分细则")} +${zhiqim_manager_content()} +<#-- 导航栏 --> +
            + +
            + + + + + + + + + + + + + + +<#if pageResult.total() == 0> + ${zhiqim_manager_no_record(6 "暂时没有积分细则信息")} + +<#for item : pageResult.list()> + + + + + + + + + + +
             积分细则列表
            操作类型积分值状态备注操作人更新时间操作
            ${item.getTypeName()} + + + + ${item.getRemark()}${item.getLastOperatorCode()}${item.getModifyTime()}
            +${zhiqim_manager_paging(pageResult, "/scoreType.htm")} +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/score/templateScore.zml b/Yangcai365_design/manage/zview/score/templateScore.zml new file mode 100644 index 0000000..18ddd2d --- /dev/null +++ b/Yangcai365_design/manage/zview/score/templateScore.zml @@ -0,0 +1,98 @@ + + +${zhiqim_manager_breadcrumb("模板评分参数")} +${zhiqim_manager_content()} +<#-- 导航栏 --> +
            + +
            + +<#-- 列表 --> + + + + + + +
            + + + + + + <#for item : scoreList> + + + + + +
            序号类型名称
            ${item_index+1}${ScoreConstants.getTemplateScoreTypeDesc(item.getScoreType())}
            +
            + + + + + + + + + + + + <#for item : paramList> + + + + + + + + + +
              + <#if Validates.isNotEmpty(scoreType)>[${ScoreConstants.getTemplateScoreTypeDesc(scoreType)}]参数列表<#else>所有参数列表 +
            操作类型参数名称参数键参数值操作
            + <#if item.getParamType() == 0>加分 + <#if item.getParamType() == 1>减分 + ${TemplateScoreConstants.getTemplateParamDesc(item.getParamKey())}${item.getParamKey()}
            +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/score/templateScoreAdd.zml b/Yangcai365_design/manage/zview/score/templateScoreAdd.zml new file mode 100644 index 0000000..556647c --- /dev/null +++ b/Yangcai365_design/manage/zview/score/templateScoreAdd.zml @@ -0,0 +1,57 @@ +${zhiqim_manager_history("/templateScore.htm")} +${zhiqim_manager_breadcrumb_parent("/templateScore.htm", "模板评分参数", "增加模板评分参数")} +${request.getValidateScript()} + +
            +${zhiqim_manager_title("新增模板评分参数")} +
            + + + + + + + + + + + + + + + + + + + + + +
            评分类型:(请选择) +  * +
            评分类型:(请选择) +  * +
            参数操作类型:(请选择) +  * +
            参数键:(32位不定长字符) +   * +
            参数值:(请输入) *
            +${zhiqim_manager_submit()} +
            +
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/score/templateWeight.zml b/Yangcai365_design/manage/zview/score/templateWeight.zml new file mode 100644 index 0000000..a788f37 --- /dev/null +++ b/Yangcai365_design/manage/zview/score/templateWeight.zml @@ -0,0 +1,50 @@ +${zhiqim_manager_breadcrumb("模板分数权重")} +${zhiqim_manager_content()} +<#-- 导航栏 --> +
            + +
            + + + + + + + + + + + + + +<#if pageResult.total() == 0> + ${zhiqim_manager_no_record(6 "暂时没有模板分数权重信息")} + +<#for item : pageResult.list()> + + + + + + + + + +
             模板分数权重列表
            选择类型名称日期规则类型类型分值权重比例
            + <#if Validates.isEqual("TEMPLATE", item.getScoreName())>模板 + <#if Validates.isEqual("KEYWORD", item.getScoreName())>关键词 + ${item.getDayCode()}${ScoreConstants.getTemplateScoreTypeDesc(item.getScoreType())}<#if item.getScoreValue() gt 0> ${item.getScoreValue()}${Amounts.toYuanMustRadix(item.getScoreWeight())}
            +${zhiqim_manager_paging(pageResult, "/templateWeight.htm")} +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/score/templateWeightAdd.zml b/Yangcai365_design/manage/zview/score/templateWeightAdd.zml new file mode 100644 index 0000000..cf8ef43 --- /dev/null +++ b/Yangcai365_design/manage/zview/score/templateWeightAdd.zml @@ -0,0 +1,43 @@ +${zhiqim_manager_history("/templateWeight.htm")} +${zhiqim_manager_breadcrumb_parent("/templateWeight.htm", "模板分数权重", "增加模板分数权重")} +${request.getValidateScript()} + +
            +${zhiqim_manager_title("新增模板分数权重")} +
            + + + + + + + + + + + + + + + + + + + + + +
            类型名称: +  * +
            权重类型:(请选择) +  * +
            日期:(请选择) *
            基础分:(请输入)
            权重值:(百分比,如50%,只需填写50)% *
            +${zhiqim_manager_submit()} +
            +
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/score/templateWeightModify.zml b/Yangcai365_design/manage/zview/score/templateWeightModify.zml new file mode 100644 index 0000000..5b172f8 --- /dev/null +++ b/Yangcai365_design/manage/zview/score/templateWeightModify.zml @@ -0,0 +1,37 @@ +${zhiqim_manager_history("/templateWeight.htm")} +${zhiqim_manager_breadcrumb_parent("/templateWeight.htm", "模板分数权重", "修改模板分数权重")} +${request.getValidateScript()} + +
            +${zhiqim_manager_title("修改模板分数权重")} +
            + + + + + + + + + + + + + + + + + + + + + + + +
            类型名称: + <#if Validates.isEqual("TEMPLATE", weight.getScoreName())>模板 + <#if Validates.isEqual("KEYWORD", weight.getScoreName())>关键词 +
            权重类型:${ScoreConstants.getTemplateScoreTypeDesc(weight.getScoreType())}
            日期:(请选择) *
            基础分:(请输入)
            权重值:(百分比,如50%,只需填写50)% *
            +${zhiqim_manager_submit()} +
            +
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/scoreList.zml b/Yangcai365_design/manage/zview/scoreList.zml new file mode 100644 index 0000000..371dc9a --- /dev/null +++ b/Yangcai365_design/manage/zview/scoreList.zml @@ -0,0 +1,360 @@ + + + +设计组件 + + + + + + + + + + + + +
            +
            + +
            +
            +
            +
            +
            +

            今日关注上升榜

            +
            +
            +
            +
            上升154位
            +
            + +
            39110
            +
            +
            +
            上升154位
            +
            + +
            39110
            +
            +
            +
            上升154位
            +
            + +
            39110
            +
            +
            +
            +
              +
            • +
              关键词
              +
              指数
              升降    
              +
            • +
            • +
              4
              关键词
              +
              16582
              55    
              +
            • +
            • +
              5
              关键词
              +
              16582
              55    
              +
            • +
            • +
              6
              关键词
              +
              16582
              55    
              +
            • +
            • +
              7
              关键词
              +
              16582
              55    
              +
            • +
            • +
              8
              关键词
              +
              16582
              55    
              +
            • +
            • +
              9
              关键词
              +
              16582
              55    
              +
            • +
            • +
              10
              关键词
              +
              16582
              55    
              +
            • +
            • +
              +
            • +
            +
            +
            +
            +
            +

            一周关注热门榜

            +
            +
            +
            +
            16582
            +
            + +
            39110
            +
            +
            +
            16582
            +
            + +
            39110
            +
            +
            +
            16582
            +
            + +
            39110
            +
            +
            +
            +
              +
            • +
              关键词
              +
              指数
              升降    
              +
            • +
            • +
              4
              关键词
              +
              16582
              55    
              +
            • +
            • +
              5
              关键词
              +
              16582
              55    
              +
            • +
            • +
              6
              关键词
              +
              16582
              55    
              +
            • +
            • +
              7
              关键词
              +
              16582
              55    
              +
            • +
            • +
              8
              关键词
              +
              16582
              55    
              +
            • +
            • +
              9
              关键词
              +
              16582
              55    
              +
            • +
            • +
              10
              关键词
              +
              16582
              55    
              +
            • +
            • +
              +
            • +
            +
            +
            +
            +
            + +
            +
            +
            + + + + + + + + + + + + + + +
            +
            +
            + 标签一标签二标签三 +
            +
              +
            • +
              排名
              关键词
              +
              指数
              升降位数
              +
            • +
            • +
              9
              关键词
              +
              16582
              55    
              +
            • +
            • +
              9
              关键词
              +
              16582
              55    
              +
            • +
            • +
              9
              关键词
              +
              16582
              55    
              +
            • +
            • +
              9
              关键词
              +
              16582
              55    
              +
            • +
            • +
              9
              关键词
              +
              16582
              55    
              +
            • +
            • +
              9
              关键词
              +
              16582
              55    
              +
            • +
            • +
              9
              关键词
              +
              16582
              55    
              +
            • +
            • +
              9
              关键词
              +
              16582
              55    
              +
            • +
            • +
              9
              关键词
              +
              16582
              55    
              +
            • +
            • +
              9
              关键词
              +
              16582
              55    
              +
            • +
            • +
              9
              关键词
              +
              16582
              55    
              +
            • +
            • +
              9
              关键词
              +
              16582
              55    
              +
            • +
            • +
              9
              关键词
              +
              16582
              55    
              +
            • +
            • +
              9
              关键词
              +
              16582
              55    
              +
            • +
            • +
              9
              关键词
              +
              16582
              55    
              +
            • +
            • +
              9
              关键词
              +
              16582
              55    
              +
            • +
            • +
              9
              关键词
              +
              16582
              55    
              +
            • +
            • +
              9
              关键词
              +
              16582
              55    
              +
            • +
            • +
              9
              关键词
              +
              16582
              55    
              +
            • +
            • +
              9
              关键词
              +
              16582
              55    
              +
            • +
            • +
              9
              关键词
              +
              16582
              55    
              +
            • +
            • +
              9
              关键词
              +
              16582
              55    
              +
            • +
            • +
              9
              关键词
              +
              16582
              55    
              +
            • +
            +
            +
            +
            + + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/showLargeImg.zml b/Yangcai365_design/manage/zview/showLargeImg.zml new file mode 100644 index 0000000..8c0f224 --- /dev/null +++ b/Yangcai365_design/manage/zview/showLargeImg.zml @@ -0,0 +1,45 @@ + + +
            +
            + +
            +
            diff --git a/Yangcai365_design/manage/zview/sms/smsSendLog.zml b/Yangcai365_design/manage/zview/sms/smsSendLog.zml new file mode 100644 index 0000000..0f083cb --- /dev/null +++ b/Yangcai365_design/manage/zview/sms/smsSendLog.zml @@ -0,0 +1,63 @@ +${zhiqim_manager_breadcrumb("短信日志")} +${zhiqim_manager_content()} +<#-- 导航栏 --> +
            + +
            + + + + + + + + + + + + + + +<#if pageResult.size() == 0> + + + + +<#for item : pageResult.list()> + + + + + + + + + + +
             短信日志列表
            订单号手机号发送状态发送时间报告状态报告描述短信内容
            暂不存在短信日志信息
            ${item.getDesignId()}${item.getMobile()} + <#if item.getSendStatus() ==0>发送成功 + <#if item.getSendStatus() ==1>发送失败 + <#if item.getSendStatus() ==2>未发送 + ${item.getSendTime()}${item.getRetStatus()}${item.getRetDesc()}${item.getContent()}
            +${zhiqim_manager_paging(pageResult, "/smsSendLog.htm")} +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/stat/after/designAfterStatistics.zml b/Yangcai365_design/manage/zview/stat/after/designAfterStatistics.zml new file mode 100644 index 0000000..23b9427 --- /dev/null +++ b/Yangcai365_design/manage/zview/stat/after/designAfterStatistics.zml @@ -0,0 +1,284 @@ +<#def designatedPath="/personalRefundRateStat.htm"/> + + +${zhiqim_manager_breadcrumb("售后统计")} +${zhiqim_manager_content()} +<#-- 导航栏 --> +
            + +
            + + + + + + + + + +
            +
            + + + + +
             统计查询条件:
            + + + + <#if Validates.isNotEmpty(orgList)> + + + +
            查询日期: + + +  组  织 + + + +
            +
            +
            +
            + + + + + + + + + +
            责任人售后单数损失金额
            暂时没有数据信息
            +
            +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/stat/design/completeDesignRateStat.zml b/Yangcai365_design/manage/zview/stat/design/completeDesignRateStat.zml new file mode 100644 index 0000000..2d67312 --- /dev/null +++ b/Yangcai365_design/manage/zview/stat/design/completeDesignRateStat.zml @@ -0,0 +1,105 @@ + + +${zhiqim_manager_breadcrumb("设计师定稿率统计")} +${zhiqim_manager_content()} +<#-- 导航栏 --> +
            + +
            + + + + + + + + + +
            +
            + + + +
            接单日期: + - + + +
            +
            +
            + + + + + + + + <#for item : modelList> + + + + + + + <#if modelList.size() == 0> + ${zhiqim_manager_no_record(4, "暂时没有定稿率数据信息")} + +
            设计师接单量定稿量定稿率
            ${item.getDesigner()}${item.getOrderNum()}${item.getOrderEndNum()}${item.getEndProportion()}%
            +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/stat/design/designOrderCountStat.zml b/Yangcai365_design/manage/zview/stat/design/designOrderCountStat.zml new file mode 100644 index 0000000..d9ef9b1 --- /dev/null +++ b/Yangcai365_design/manage/zview/stat/design/designOrderCountStat.zml @@ -0,0 +1,69 @@ +${zhiqim_manager_breadcrumb("设计总订单数量统计")} +${zhiqim_manager_content()} +<#-- 导航栏 --> +
            + +
            + +<#-- 查询条件 --> +${zhiqim_manager_title("查询条件")} +
            + + + + + +
            录单时间: + - + + + + +
            +
            +<#var typeList = DesignTypeDao.listAll()/> + +${zhiqim_manager_tr_title(13, "设计总订单数量统计")} + + + + <#if Validates.isNotEmpty(typeList)> + <#for type : typeList> + <#if type_index lte 9> + + + + +${zhiqim_manager_tr_no_record(list, 13, "设计总订单数量统计暂无信息")} +<#for item : list> +<#var typeMap = item.getTypeMap()/> + + + + <#if Validates.isNotEmpty(typeList)> + <#for type : typeList> + <#if type_index lte 9> + + + + + +
            日期总设计订单${type.getPrdTypeName()}其他
            ${item.getDate()}${item.getSumCount()}${typeMap.get(type.getTypeId())}${item.getSumCount() - item.getElseCount()}
            +${zhiqim_manager_list(list.size())} +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/stat/design/designOrderTypeStat.zml b/Yangcai365_design/manage/zview/stat/design/designOrderTypeStat.zml new file mode 100644 index 0000000..270adda --- /dev/null +++ b/Yangcai365_design/manage/zview/stat/design/designOrderTypeStat.zml @@ -0,0 +1,90 @@ +<#def designatedPath="/draftStatusOrderStat.htm"/> + +${zhiqim_manager_breadcrumb("订单类型统计")} +${zhiqim_manager_content()} +<#-- 导航栏 --> +
            + +
            + +<#-- 查询条件 --> +${zhiqim_manager_title("查询条件")} +
            + + + + +
            定稿日期: + - + + +
            +
            +
            + +<#-- 分页列表--> + +${zhiqim_manager_tr_title(20,"订单类型统计详情")} + + + + + + + + + + + + + + + + + + + <#if ZmrPathRule.check(request, "/designOrderTypeStat.htm")> + + +<#for item : pageResult.list()> + + + + + + + + + + + + + + + + + + + <#if ZmrPathRule.check(request, "/designOrderTypeStat.htm")> + + + +<#if pageResult.size() == 0> + ${zhiqim_manager_no_record(20, "暂时没有订单类型统计信息")} + +
            设计师3-5款6-8款9-11款12款以上常规后加工特殊后加工支援订单 大金额  (100-150) 大金额  (150-200) 大金额  (200-250) 大金额  (250-300) 大金额  (300-350) 大金额  (350-400) 大金额  (400-450) 大金额  (450-500) 大金额  (500以上)奖励金额
            ${item.getDesigner()}${item.getMultiple3_5()}${item.getMultiple6_8()}${item.getMultiple9_11()}${item.getMultiple12()}${item.getNormalProcessing()}${item.getSpecialProcessing()}${item.getApplyOrder()}${item.getAmount100_150()}${item.getAmount150_200()}${item.getAmount200_250()}${item.getAmount250_300()}${item.getAmount300_350()}${item.getAmount350_400()}${item.getAmount400_450()}${item.getAmount450_500()}${item.getAmount500()}${Amounts.toYuan(item.getAmount())}
            +${zhiqim_manager_paging(pageResult, "/designOrderTypeStat.htm")} +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/stat/design/designerPerformance.zml b/Yangcai365_design/manage/zview/stat/design/designerPerformance.zml new file mode 100644 index 0000000..a465769 --- /dev/null +++ b/Yangcai365_design/manage/zview/stat/design/designerPerformance.zml @@ -0,0 +1,84 @@ + +${zhiqim_manager_breadcrumb("设计师绩效统计")} +${zhiqim_manager_content()} + +<#-- 导航栏 --> +
            + +
            + + + + + + + + + +
            +
            + + + + +
            定稿日期: + - + + +   + +
            +
            +
            + + + + + + + <#for item : pageModelList> + + + + + + + <#if pageModelList.size() == 0> + ${zhiqim_manager_no_record(4, "暂时没有绩效数据信息")} + +
            设计师定稿单数绩效
            ${item.getDesigner()}${item.getOrderEndCount()}${Amounts.toYuan(item.getDesignPerformance())}元
            +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/stat/design/draftOrderOrgTimeliness.zml b/Yangcai365_design/manage/zview/stat/design/draftOrderOrgTimeliness.zml new file mode 100644 index 0000000..82e0f4e --- /dev/null +++ b/Yangcai365_design/manage/zview/stat/design/draftOrderOrgTimeliness.zml @@ -0,0 +1,133 @@ +<#def designatedPath="/draftStatusOrderStat.htm"/> + +${zhiqim_manager_breadcrumb("初稿时效统计(组织)")} +${zhiqim_manager_content()} +<#-- 导航栏 --> +
            + +
            + +<#-- 查询条件 --> +${zhiqim_manager_title("查询条件")} +
            + + + + +
            初稿日期: + - + + +
            +
            +
            + +<#-- 分页列表--> + +${zhiqim_manager_tr_title( 2 , "初稿时效统计详情(组织)")} + + + <#for type : showTypeList> + + + + + + +<#for item : pageResult.list()> +bgcolor="#f3fdfc"> + + <#for type : showTypeList> + + + + + + + +<#if pageResult.size() == 0> + + + + +${zhiqim_manager_paging(pageResult, "draftOrderOrgTimeliness.htm")} +
            组织${type.getTypeName()}其他总数量
            + ${item.getOrgName()} + + <#var num = item.getNumberMap().get(type.getTypeName())/> + <#var time =item.getTimeMap().get(type.getTypeName())/> + <#if num gt 0 && time gt 0> +
            (${num}单) + +
            + <#if item.getNumberMap().get("其他") gt 0 && item.getTimeMap().get("其他") gt 0> +
            (${item.getNumberMap().get("其他")}单) + +
            ${item.getAllCount()}
            暂无初稿时效统计详情
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/stat/design/draftOrderTimeliness.zml b/Yangcai365_design/manage/zview/stat/design/draftOrderTimeliness.zml new file mode 100644 index 0000000..f923efb --- /dev/null +++ b/Yangcai365_design/manage/zview/stat/design/draftOrderTimeliness.zml @@ -0,0 +1,141 @@ +<#def designatedPath="/draftStatusOrderStat.htm"/> + +${zhiqim_manager_breadcrumb("初稿时效统计")} +${zhiqim_manager_content()} +<#-- 导航栏 --> +
            + +
            + +<#-- 查询条件 --> +${zhiqim_manager_title("查询条件")} +
            + + + + +
            初稿日期: + - + + +
            +
            +
            + +<#-- 分页列表--> + +${zhiqim_manager_tr_title( 1 , "初稿时效统计详情")} + + + <#for type : showTypeList> + + + + + + +<#for item : pageResult.list()> +bgcolor="#f3fdfc"> + + <#for type : showTypeList> + + + + + + + + + +<#if pageResult.size() == 0> + + + + +${zhiqim_manager_paging(pageResult, "draftOrderTimeliness.htm")} +
            设计师${type.getTypeName()}其他总数量
            ${item.getDesigner()} + <#var num = item.getNumberMap().get(type.getTypeName())/> + <#var time =item.getTimeMap().get(type.getTypeName())/> + <#if num gt 0 && time gt 0> + +
            (${num}单) +
            + +
            + <#if item.getNumberMap().get("其他") gt 0 && item.getTimeMap().get("其他") gt 0> +
            (${item.getNumberMap().get("其他")}单) + +
            ${item.getAllCount()}
            暂无初稿时效统计详情
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/stat/design/draftOrderTypeTimeliness.zml b/Yangcai365_design/manage/zview/stat/design/draftOrderTypeTimeliness.zml new file mode 100644 index 0000000..76c72b1 --- /dev/null +++ b/Yangcai365_design/manage/zview/stat/design/draftOrderTypeTimeliness.zml @@ -0,0 +1,106 @@ + +${zhiqim_manager_breadcrumb("初稿产品时效统计")} +${zhiqim_manager_content()} +<#-- 导航栏 --> +
            + +
            + +<#-- 查询条件 --> +${zhiqim_manager_title("查询条件")} +
            + + + + +
            初稿日期: + - + + +
            +
            +
            + +<#-- 分页列表--> + +${zhiqim_manager_tr_title(4 , "初稿产品时效统计详情")} + + + + + + + +<#var allcount = 0/> +<#var allTime = 0/> +<#var typeMap = DesignTypeDao.mapAll()/> +<#for item : timelinessList> +bgcolor="#f3fdfc"> + + + + + +<#var allcount = allcount + item.getCount()/> +<#var allTime = allTime + item.getTime()/> + + +<#if timelinessList.size() == 0> +${zhiqim_manager_no_record(4, "暂无初稿产品时效统计详情")} +<#else> + + + + + + + +
            产品类型数量总时长平均耗时
            <#if Validates.isNotEmpty(typeMap) && typeMap.containsKey(item.getTypeId())>${typeMap.get(item.getTypeId()).getTypeName(item.getTypeId())}${item.getCount()}
            总计${allcount}
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/stat/design/inner/completeDesignRateStatInfo.zml b/Yangcai365_design/manage/zview/stat/design/inner/completeDesignRateStatInfo.zml new file mode 100644 index 0000000..e294d1b --- /dev/null +++ b/Yangcai365_design/manage/zview/stat/design/inner/completeDesignRateStatInfo.zml @@ -0,0 +1,35 @@ +<#include "/ztmpl/zhiqim_manager/"+themeMain+"/define.htm"/> + + + + + + + + + + + + + + + +<#if pageResult.size() == 0> + + + + +<#for item : pageResult.list()> + + + + + + + + + + + +
            未定稿订单详情
            订单号旺旺号设计师产品订单状态进度备注领单时间初稿时间
            暂不存在未定稿订单信息
            ${item.getDesignId()}${item.getBuyerNick()}${item.getDesigner()}${item.getOrderText()}${StatusConstants.getStatus(item.getStatus())}${progressNoteMap.get(item.getDesignId())}${Sqls.toDateTimeString(item.getDesignBeginTime())}${Sqls.toDateTimeString(item.getDesignDraftTime())}
            +${zhiqim_manager_paging_jsMethod(pageResult, "doQueryDesignNotCompleteOrderInfo")} diff --git a/Yangcai365_design/manage/zview/stat/design/inner/completeOrderDetailInfo.zml b/Yangcai365_design/manage/zview/stat/design/inner/completeOrderDetailInfo.zml new file mode 100644 index 0000000..12704f8 --- /dev/null +++ b/Yangcai365_design/manage/zview/stat/design/inner/completeOrderDetailInfo.zml @@ -0,0 +1,74 @@ +<#include "/ztmpl/zhiqim_manager/"+themeMain+"/define.htm"/> + + + + + + + + + + + + + + + +<#if passResult.size() == 0> + + + + +<#for item : passResult.list()> + + + + + + + + + + + + +
             <#if Validates.isNotEmpty(designer)>[${designer}]定稿订单详情
            订单号旺旺号设计师产品设计费份数领单时间初稿时间定稿时间折算单数
            暂不存在定稿订单信息
            ${item.getDesignId()}${item.getBuyerNick()}${item.getDesigner()}${item.getOrderText()}${item.getDesignCopies()}${Sqls.toDateTimeString(item.getDesignReceiveTime())}${Sqls.toDateTimeString(item.getDesignDraftTime())}${Sqls.toDateTimeString(item.getDesignEndTime())}${orderConvertMap.get(item.getDesignId())}
            +${zhiqim_manager_paging_jsMethod(passResult, "doQueryCompleteOrderDetailInfo")} + + + + + + + + + + + + + + + + + +<#if backResult.size() == 0> + + + + +<#for item : backResult.list()> + + + + + + + + + + + + + +
             <#if Validates.isNotEmpty(designer)>[${designer}]定稿退回订单详情
            订单号旺旺号设计师产品设计费份数定稿时间退回时间退回次数退回原因分类折算单数
            暂不存在定稿退回订单信息
            ${item.getDesignId()}${item.getBuyerNick()}${item.getDesigner()}${item.getOrderText()}${item.getDesignCopies()}${Sqls.toDateTimeString(item.getDesignEndTime())}${Sqls.toDateTimeString(item.getCheckTime())}${item.getBackOrderCount()}${item.getCheckBackReason()}${orderConvertMap.get(item.getDesignId())}
            +${zhiqim_manager_paging_jsMethod(backResult, "doQueryCompleteOrderDetailInfo")} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/stat/design/inner/designerCompleteOrderInfo.zml b/Yangcai365_design/manage/zview/stat/design/inner/designerCompleteOrderInfo.zml new file mode 100644 index 0000000..5b50f79 --- /dev/null +++ b/Yangcai365_design/manage/zview/stat/design/inner/designerCompleteOrderInfo.zml @@ -0,0 +1,38 @@ +<#include "/ztmpl/zhiqim_manager/"+themeMain+"/define.htm"/> + + + + + + + + + + + + + + + + +<#if result.size() == 0> + + + + +<#for item : result.list()> + + + + + + + + + + + + + +
            订单详情
            订单号旺旺号设计师店铺设计类型产品设计费份数领单时间定稿时间订单绩效
            暂不存在定稿订单信息
            ${item.getDesignId()}${item.getBuyerNick()}${item.getDesigner()}${item.getShopNick()}${DraftConstants.get(item.getDraftType())}${item.getOrderText()}${item.getDesignCopies()}${Sqls.toDateTimeString(item.getDesignReceiveTime())}${Sqls.toDateTimeString(item.getDesignEndTime())}${CalculationUtil.getDesignerOrderPerformance(item,designer)}
            +${zhiqim_manager_paging_jsMethod(result, "doQueryCompleteOrderInfo")} diff --git a/Yangcai365_design/manage/zview/stat/design/inner/draftOrderTimelinessInfo.zml b/Yangcai365_design/manage/zview/stat/design/inner/draftOrderTimelinessInfo.zml new file mode 100644 index 0000000..5694e97 --- /dev/null +++ b/Yangcai365_design/manage/zview/stat/design/inner/draftOrderTimelinessInfo.zml @@ -0,0 +1,32 @@ + + + + + + + + + + + + +<#if pageResult.size() == 0> + + + + +<#for item : pageResult.list()> + + + + + + + + + + + + +${zhiqim_manager_paging(pageResult, "draftOrderTimelinessInfo.htm")} +
            订单号店铺旺旺状态产品录单时间初稿耗时领单时间初稿时间
            暂不存在清单信息
            ${item.getDesignId()}${item.getShopNick()}${item.getBuyerNick()}${StatusConstants.getStatus(item.getStatus())}${item.getOrderText()}${Sqls.toDateTimeString(item.getCreateTime())}${DateTimes.compareMinute(item.getDesignDraftTime(), item.getDesignReceiveTime())} 分钟${Sqls.toDateTimeString(item.getDesignReceiveTime())}${Sqls.toDateTimeString(item.getDesignDraftTime())}
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/stat/design/inner/timeoutDesignerCompleteInfo.zml b/Yangcai365_design/manage/zview/stat/design/inner/timeoutDesignerCompleteInfo.zml new file mode 100644 index 0000000..c104397 --- /dev/null +++ b/Yangcai365_design/manage/zview/stat/design/inner/timeoutDesignerCompleteInfo.zml @@ -0,0 +1,45 @@ +<#include "/ztmpl/zhiqim_manager/"+themeMain+"/define.htm"/> + + + + + + + + + + + + + + +<#if result.size() == 0> + + + + +<#var typeMap = DesignTypeDao.mapAll()/> +<#for item : pageResult.list()> +<#var effectiveTime = Validates.isEmpty(typeMap) ? 0 : ( typeMap.containsKey(item.getTypeId()) ? typeMap.get(item.getTypeId()).getEffectiveEndTime() : 0)/> + + + + + + + + + + + + + + +
            订单号旺旺号产品组织设计师订单状态进度备注领单时间初稿时间定稿时间超时时效
            暂不存在定稿超时订单信息
            ${item.getDesignId()}${item.getBuyerNick()}${item.getOrderText()}${ZmrOrgDao.getOrgName(request, item.getOrgId())}${item.getDesigner()}${StatusConstants.getStatus(item.getStatus())}${progressNoteMap.get(item.getDesignId())}${Sqls.toDateTimeString(item.getDesignBeginTime())}${Sqls.toDateTimeString(item.getDesignDraftTime())}${Sqls.toDateTimeString(item.getDesignEndTime())} + <#if item.getStatus() gte "55" > + ${CalculationUtil.dateTimeTran(DateTimes.compareMinute(item.getDesignEndTime(), item.getDesignBeginTime()) - effectiveTime)} + <#else> + ${CalculationUtil.dateTimeTran(DateTimes.compareMinute(Sqls.nowTimestamp(), item.getDesignBeginTime()) - effectiveTime)} + +
            +${zhiqim_manager_paging_jsMethod(pageResult, "doQueryCompleteTimeoutOrderInfo")} diff --git a/Yangcai365_design/manage/zview/stat/design/inner/toMonthDesignInfo.zml b/Yangcai365_design/manage/zview/stat/design/inner/toMonthDesignInfo.zml new file mode 100644 index 0000000..f4d1c7a --- /dev/null +++ b/Yangcai365_design/manage/zview/stat/design/inner/toMonthDesignInfo.zml @@ -0,0 +1,36 @@ +<#include "/ztmpl/zhiqim_manager/"+themeMain+"/define.htm"/> + + + + + + + + + + + + + + + +<#if pageResult.size() == 0> + + + + +<#for item : pageResult.list()> + + + + + + + + + + + + +
            定稿订单详情
            订单号旺旺号设计师产品订单状态进度备注领单时间初稿时间定稿时间
            暂不存在定稿订单信息
            ${item.getDesignId()}${item.getBuyerNick()}${item.getDesigner()}${item.getOrderText()}${StatusConstants.getStatus(item.getStatus())}${progressNoteMap.get(item.getDesignId())}${Sqls.toDateTimeString(item.getDesignBeginTime())}${Sqls.toDateTimeString(item.getDesignDraftTime())}${Sqls.toDateTimeString(item.getDesignEndTime())}
            +${zhiqim_manager_paging_jsMethod(pageResult, "doQueryDesignNotCompleteOrderInfo")} diff --git a/Yangcai365_design/manage/zview/stat/design/timeoutDesignerComplete.zml b/Yangcai365_design/manage/zview/stat/design/timeoutDesignerComplete.zml new file mode 100644 index 0000000..54f49ae --- /dev/null +++ b/Yangcai365_design/manage/zview/stat/design/timeoutDesignerComplete.zml @@ -0,0 +1,126 @@ + + + +${zhiqim_manager_breadcrumb("设计师定稿超时")} +${zhiqim_manager_content()} +<#-- 导航栏 --> +
            + +
            + + + + + + + <#if timeoutOrderNumSum == 0> + ${zhiqim_manager_no_record(2, "没有定稿超时数据信息")} + <#else> + + + + +
            +
            + + + +
            定稿日期: + - + + +
            +
            +
            + + + + + + + + + <#for item : timeoutMap.keySet()> + + + + + + + + + +
            超时订单列表
            设计师超时订单
            ${item}${timeoutMap.get(item)}
            总计${timeoutOrderNumSum}
            +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/stat/design/toMonthDesign.zml b/Yangcai365_design/manage/zview/stat/design/toMonthDesign.zml new file mode 100644 index 0000000..005ec22 --- /dev/null +++ b/Yangcai365_design/manage/zview/stat/design/toMonthDesign.zml @@ -0,0 +1,101 @@ + + +${zhiqim_manager_breadcrumb("设计师定稿率统计")} +${zhiqim_manager_content()} +<#-- 导航栏 --> +
            + +
            + + + + + + + + + +
            +
            + + + +
            接单日期: + - + + +
            +
            +
            + + + + + + <#for item : modelList> + + + + + <#if modelList.size() == 0> + ${zhiqim_manager_no_record(4, "暂时没有当月定稿率数据信息")} + +
            设计师定稿量
            ${item.getDesigner()}${item.getOrderEndNum()}
            +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/stat/refund/designOrderRefundRateStat.zml b/Yangcai365_design/manage/zview/stat/refund/designOrderRefundRateStat.zml new file mode 100644 index 0000000..3b4fd98 --- /dev/null +++ b/Yangcai365_design/manage/zview/stat/refund/designOrderRefundRateStat.zml @@ -0,0 +1,120 @@ +<#def designatedPath="/personalRefundRateStat.htm"/> + + +${zhiqim_manager_breadcrumb("退款率统计")} +${zhiqim_manager_content()} +<#-- 导航栏 --> +
            + +
            + + + + + + + + + +
            +
            + + + +
            接单日期: + - + + + +
            +
            +
            + + + + + + + + + + + <#for item : designerStatList> + + + + + + + + + + + <#if completeList.size() == 0> + ${zhiqim_manager_no_record(7, "暂时没有退款数据信息")} + <#else> + + + + + + + + + + +
            设计师设计单数设计金额退款单数退款金额退款率退款金额比例
            ${item.getDesigner()}${item.getSumCount()}${Amounts.toYuan(item.getFinalizeMoneySum())}${item.getRefundCount()}${Amounts.toYuan(item.getRefundMoneySum())}${Amounts.toYuan(item.getRefundRate())}%${CalculationUtil.designerRefundCalculate(item.getFinalizeMoneySum(),item.getRefundMoneySum())}
            总计${sum}${refundSum}<#if sum gt 0>${Maths.division(refundSum*100, sum, 1)}%<#else>0.0%${CalculationUtil.designerRefundCalculate(finalizeMoneyMerge,refundMoneyMerge)}
            +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/stat/refund/inner/designOrderRefundRateStatInfo.zml b/Yangcai365_design/manage/zview/stat/refund/inner/designOrderRefundRateStatInfo.zml new file mode 100644 index 0000000..5350e2f --- /dev/null +++ b/Yangcai365_design/manage/zview/stat/refund/inner/designOrderRefundRateStatInfo.zml @@ -0,0 +1,74 @@ +<#include "/ztmpl/zhiqim_manager/"+themeMain+"/define.htm"/> + + + + + + + + + + + + + + + + +<#if responsibleRefundResult.list().size() == 0> + + + + +<#for item : responsibleRefundResult.list()> + + + + + + + + + + + + +
            有责退款订单详细
            订单号店铺旺旺号设计师产品订单金额领单时间退款时间退款原因
            暂不存在有责退款订单
            ${item.getDesignId()}${item.getShopNick()}${item.getBuyerNick()}${item.getDesigner()}${item.getOrderText()}${Amounts.toYuan(item.getAmount())}${Sqls.toDateTimeString(item.getDesignReceiveTime())}${item.getRefundTime()}${Global.get(DesignOrderRefundReasonCache.class).getName(item.getRefundReason())}
            +${zhiqim_manager_paging_jsMethod(responsibleRefundResult, "doQueryRefundOrderInfo")} + + + + + + + + + + + + + + + + +<#if noResponsibleRefundResult.list().size() == 0> + + + + +<#for item : noResponsibleRefundResult.list()> + + + + + + + + + + + + +
            无责退款订单详细
            订单号店铺旺旺号设计师产品订单金额领单时间退款时间退款原因
            暂不存在无责退款订单
            ${item.getDesignId()}${item.getShopNick()}${item.getBuyerNick()}${item.getDesigner()}${item.getOrderText()}${Amounts.toYuan(item.getAmount())}${Sqls.toDateTimeString(item.getDesignReceiveTime())}${item.getRefundTime()}${Global.get(DesignOrderRefundReasonCache.class).getName(item.getRefundReason())}
            +${zhiqim_manager_paging_jsMethod(noResponsibleRefundResult, "doQueryRefundOrderInfo")} + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/stat/refund/personalRefundComplaint.zml b/Yangcai365_design/manage/zview/stat/refund/personalRefundComplaint.zml new file mode 100644 index 0000000..2a25bad --- /dev/null +++ b/Yangcai365_design/manage/zview/stat/refund/personalRefundComplaint.zml @@ -0,0 +1,84 @@ + + + +${zhiqim_manager_content()} +
            + +
            +
            +
            +
            +
            + +     +
            +
            +

            +${zhiqim_manager_content_end()} + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/afterPicType.zml b/Yangcai365_design/manage/zview/sys/afterPicType.zml new file mode 100644 index 0000000..f23b5ae --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/afterPicType.zml @@ -0,0 +1,44 @@ +<#def designatedPath="/afterPicType.htm"/> + + +${zhiqim_manager_breadcrumb("售后参数管理")} +${zhiqim_manager_content()} + +<#-- 导航 --> +
            + +
            + +<#-- 列表 --> + + + + + + + +<#if Lists.size(dataList) == 0> +${zhiqim_manager_no_record(6, "暂时没有数据信息")} + +<#for item : dataList> + + + + + + + +
            选项类型ID名称状态
            ${item.getPicType()}${item.getPicTypeName()}<#if item.getPicStatus() == 0>正常<#else>停用
            +${zhiqim_manager_list(dataList.size())} +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/afterPicTypeAdd.zml b/Yangcai365_design/manage/zview/sys/afterPicTypeAdd.zml new file mode 100644 index 0000000..929441a --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/afterPicTypeAdd.zml @@ -0,0 +1,32 @@ +<#def designatedPath="/afterPicType.htm"/> +${request.getValidateScript()} +${zhiqim_manager_history("afterPicType.htm")} +${zhiqim_manager_breadcrumb_parent("afterPicType.htm", "售后责任类型", "增加责任类型")} +${zhiqim_manager_content()} + + + +
            + + + + + + + + + + + + +
            增加责任归属
            责任归属名称:(64位不定长字符) *
            状态:(请选择) +  * +
            +${zhiqim_manager_submit()} +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/afterPicTypeModify.zml b/Yangcai365_design/manage/zview/sys/afterPicTypeModify.zml new file mode 100644 index 0000000..13d7b43 --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/afterPicTypeModify.zml @@ -0,0 +1,36 @@ +<#def designatedPath="/afterPicType.htm"/> +${request.getValidateScript()} +${zhiqim_manager_history("afterPicType.htm")} +${zhiqim_manager_breadcrumb_parent("afterPicType.htm", "售后责任类型", "修改责任类型")} +${zhiqim_manager_content()} + + + +
            + + + + + + + + + + + + +
            修改责任归属
            责任归属名称:(64位不定长字符) + + +  * +
            状态:(请选择) +  * +
            +${zhiqim_manager_submit()} +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/afterProblemType.zml b/Yangcai365_design/manage/zview/sys/afterProblemType.zml new file mode 100644 index 0000000..9236c7f --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/afterProblemType.zml @@ -0,0 +1,46 @@ +<#def designatedPath="/afterPicType.htm"/> + + +${zhiqim_manager_breadcrumb("售后参数管理")} +${zhiqim_manager_content()} + +<#-- 导航 --> +
            + +
            + +<#-- 列表 --> + + + + + + + + +<#if Lists.size(pageResult.list()) == 0> +${zhiqim_manager_no_record(6, "暂时没有数据信息")} + +<#for item : pageResult.list()> + + + + + + + + +
            选项类型ID名称责任类型状态
            ${item.getProblemType()}${item.getProblemName()}${picNameMap.get(item.getPicType())}<#if item.getProblemStatus() == 0>正常<#else>停用
            +${zhiqim_manager_paging(pageResult, "afterProblemType.htm")} +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/afterProblemTypeAdd.zml b/Yangcai365_design/manage/zview/sys/afterProblemTypeAdd.zml new file mode 100644 index 0000000..95f7b72 --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/afterProblemTypeAdd.zml @@ -0,0 +1,46 @@ +<#def designatedPath="/afterPicType.htm"/> +${request.getValidateScript()} +${zhiqim_manager_history("afterProblemType.htm")} +${zhiqim_manager_breadcrumb_parent("afterProblemType.htm", "售后问题类型", "增加问题类型")} +${zhiqim_manager_content()} + + + +
            + + + + + + + + + + + + + + + + +
            增加售后问题
            责任归属:(请选择) + + +
            售后问题名称:(64位不定长字符) *
            状态:(请选择) +  * +
            +${zhiqim_manager_submit()} +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/afterProblemTypeModify.zml b/Yangcai365_design/manage/zview/sys/afterProblemTypeModify.zml new file mode 100644 index 0000000..236d8be --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/afterProblemTypeModify.zml @@ -0,0 +1,48 @@ +<#def designatedPath="/afterPicType.htm"/> +${request.getValidateScript()} +${zhiqim_manager_history("afterProblemType.htm")} +${zhiqim_manager_breadcrumb_parent("afterProblemType.htm", "售后问题类型", "修改问题类型")} +${zhiqim_manager_content()} + + + +
            + + + + + + + + + + + + + + + + + +
            修改售后问题
            责任归属:(请选择) + + +
            售后问题名称:(64位不定长字符) *
            状态:(请选择) +  * +
            +${zhiqim_manager_submit()} +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/apiInvokeLog.zml b/Yangcai365_design/manage/zview/sys/apiInvokeLog.zml new file mode 100644 index 0000000..2bf4c8f --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/apiInvokeLog.zml @@ -0,0 +1,150 @@ +<#def designatedPath="/orderMerchantList.htm"/> +${zhiqim_manager_breadcrumb("商家管理")} +${zhiqim_manager_content()} + +<#-- 导航 --> +
            + +
            +${zhiqim_manager_title("查询条件")} +
            + + + + + + + + + + + + + + +
            用户IP:用户名称:创建时间: -  + + 接口名称: +
            状态码:结果描述: + +
            +
            +<#-- 列表 --> + + + + + + + + + + + + +${zhiqim_manager_tr_no_record(pageResult, 10, "暂时没有数据信息")} +<#for item : pageResult.list()> + + + + + + + + + + + + +
            选择用户名用户IP接口名错误编号调用结果结果描述/错误原因创建时间操作
            ${item.getRemoteUser()}${item.getRemoteIp()}${item.getApiName()}${item.getErrorId()}<#if item.getStatusCode() gt 0>失败<#else>成功 +
            + ${item.getInvokeMessage()} +
            +
            ${item.getCreateTime()} + <#if Validates.isNotEmptyBlank(item.getInvokeStackTrace())> + + <#var stackTrace= item.getInvokeStackTrace()/> + ${stackTrace} + + +
            +${zhiqim_manager_paging(pageResult, "apiInvokeLog.htm")} +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/businessParam.zml b/Yangcai365_design/manage/zview/sys/businessParam.zml new file mode 100644 index 0000000..9de0f13 --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/businessParam.zml @@ -0,0 +1,59 @@ +${sweet_alert_reuse_method()} +${zhiqim_manager_breadcrumb("公共参数")} +${zhiqim_manager_content()} + + + +<#-- 导航 --> +
            + +
            + +<#for group : ParamDao.doQueryBusinessParam().entrySet()> + +${zhiqim_manager_tr_title(4, "业务参数["+group.getKey()+"]列表")} + + + + + +${zhiqim_manager_tr_no_record(group.getValue(), 3, "暂时没有业务参数信息")} +
            业务配置描述业务配置值操作
            +<#for item : group.getValue().values()> +
            + + + + + + + + +
            ${item.getParamDesc()}
            +
            + + +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/checkBackReasonList.zml b/Yangcai365_design/manage/zview/sys/checkBackReasonList.zml new file mode 100644 index 0000000..65b52a2 --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/checkBackReasonList.zml @@ -0,0 +1,255 @@ +${zhiqim_manager_breadcrumb("字段参数")} +${zhiqim_manager_content()} +${sweet_alert_reuse_method()} + +<#-- 导航 --> +
            + +
            + +<#-- 列表 --> + + + + + + +
            + + + + + + <#for item : catList> + style="background-color:#eaeaff;"> + + + + + <#if catList.size() == 0> + + + + +
            序号类型名称
            ${item_index+1}${item.getReasonText()}
            暂时没有数据信息
            +
            + + + + + + + <#for item : reasonList> + + + + + + <#if Validates.isEmpty(reasonList) || reasonList.size() == 0> + + + + +
            序号名称操作
            ${item_index+1}${item.getReasonText()} + + +
            暂时没有数据信息
            +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/designGroup.zml b/Yangcai365_design/manage/zview/sys/designGroup.zml new file mode 100644 index 0000000..a46b927 --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/designGroup.zml @@ -0,0 +1,43 @@ +${zhiqim_manager_breadcrumb("设计组管理")} +${zhiqim_manager_content()} + +<#-- 导航 --> +
            + +
            + +<#-- 列表 --> + + + + + + + + + + +${zhiqim_manager_tr_no_record(pageResult, 10, "暂时没有设计组")} +<#for item : pageResult.list()> + + + + + + + + + + +
            选择所属组织设计组名称当月组长下月组长创建时间排序
            ${ZmrOrgDao.getOrgName(request, item.getOrgId())}#{item.getGroupName()}${currLeaderMap.get(Strings.valueOf(item.getGroupId())).getUserCode()}${nextLeaderMap.get(Strings.valueOf(item.getGroupId())).getUserCode()}${Sqls.toDateString(item.getCreateTime())}${item.getGroupSeq()}
            +${zhiqim_manager_paging(pageResult, "designGroup.htm")} +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/designGroupAdd.zml b/Yangcai365_design/manage/zview/sys/designGroupAdd.zml new file mode 100644 index 0000000..df465b6 --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/designGroupAdd.zml @@ -0,0 +1,47 @@ +${zhiqim_manager_history("designGroup.htm")} +${request.getValidateScript()} + + +${zhiqim_manager_breadcrumb_parent("designGroup.htm" "设计组管理" "增加设计组")} +${zhiqim_manager_content()} +
            + + + + + + + + + + + + + + + + + + + + + +
            增加设计组
            组织:${org.getOrgName()}
            组名称:(请填写) *
            组长:(正常|停用)
            组排序数:(必须是[0, 999999]范围的非负整数) *
            +${zhiqim_manager_submit()} +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/designGroupModify.zml b/Yangcai365_design/manage/zview/sys/designGroupModify.zml new file mode 100644 index 0000000..9e036c3 --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/designGroupModify.zml @@ -0,0 +1,47 @@ +${zhiqim_manager_history("designGroup.htm")} +${request.getValidateScript()} + + +${zhiqim_manager_breadcrumb_parent("designGroup.htm" "设计组管理" "修改设计组")} +${zhiqim_manager_content()} +
            + + + + + + + + + + + + + + + + + + + + + +
            增加设计组
            组织:(请选择)${ZmrOrgDao.getOrgName(request, item.getOrgId())}
            组名称:(请填写) *
            组长:(正常|停用)
            组排序数:(必须是[0, 999999]范围的非负整数) *
            +${zhiqim_manager_submit()} +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/designTypeAdd.zml b/Yangcai365_design/manage/zview/sys/designTypeAdd.zml new file mode 100644 index 0000000..2b8a367 --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/designTypeAdd.zml @@ -0,0 +1,154 @@ +<#def designatedPath="/designTypeList.htm"/> +${request.getValidateScript()} +${zhiqim_manager_history("designTypeList.htm")} +${zhiqim_manager_breadcrumb_parent("designTypeList.htm", "设计类型", "增加设计类型")} +${zhiqim_manager_content()} + + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            增加产品类型
            类型名称:(100位不定长字符) *
            分拣时效:(单位:分钟) *
            派单时效:(单位:分钟) *
            初稿时效:(单位:分钟) *
            定稿时效:(单位:分钟) *
            状态:(请选择) +  * +
            序号:(填数字,越小越靠前)
            尺寸/单位mm:(支持两位小数)(含出血) + +
            +
            + +
            +
            计算模位尺寸/单位mm:(支持两位小数)(含出血) + x + mm +
            +${zhiqim_manager_submit()} +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/designTypeList.zml b/Yangcai365_design/manage/zview/sys/designTypeList.zml new file mode 100644 index 0000000..cb6cf2d --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/designTypeList.zml @@ -0,0 +1,87 @@ +<#def designatedPath="/designTypeList.htm"/> + + +${zhiqim_manager_breadcrumb("设计类型")} +${zhiqim_manager_content()} + +<#-- 导航 --> +
            + +
            + +
            + + + + + + + +
            类型ID:产品名称:状态: + + + +
            +
            + +<#-- 列表 --> + + + + + + + + + + + + + +<#if Lists.size(pageResult.list()) == 0> +${zhiqim_manager_no_record(9, "暂时没有设计类型信息")} + +<#for item : pageResult.list()> + + + + + + + + + + + + + +
            选项类型ID名称设计尺寸(含出血)模位尺寸(含出血)分拣时效(分钟)派单时效(分钟)初稿时效(分钟)定稿时效(分钟)状态
            ${item.getTypeId()}${item.getTypeName()} + <#var sizeList=typeSizeMap.get(item.getTypeId())/> + <#if Validates.isNotEmpty(sizeList)> + <#for size : sizeList> +
            ${size.getSizeWidth()}x${size.getSizeHeight()}<#if size.getSizeSide() gt 0 >x${size.getSizeSide()}mm 出血:${size.getSizeBleed()}mm
            + + +
            + <#if item.getSizeMWidth() gt 0 || item.getSizeMHeight() gt 0>${item.getSizeMWidth()}x${item.getSizeMHeight()} + ${item.getMerDispatchEffectiveTime()}${item.getDispatchOrderEffectiveTime()}${item.getEffectiveTime()}${item.getEffectiveEndTime()}<#if item.isEnabled()>正常<#else>停用
            +${zhiqim_manager_paging(pageResult, "/designTypeList.htm")} +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/designTypeModify.zml b/Yangcai365_design/manage/zview/sys/designTypeModify.zml new file mode 100644 index 0000000..a59049f --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/designTypeModify.zml @@ -0,0 +1,173 @@ +<#def designatedPath="/typeIdList.htm"/> +${request.getValidateScript()} +${zhiqim_manager_history("designTypeList.htm")} +${zhiqim_manager_breadcrumb_parent("designTypeList.htm", "设计类型", "修改设计类型")} +${zhiqim_manager_content()} + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            增加产品类型
            类型:(100位不定长字符)${type.getTypeId()}
            类型名称:(100位不定长字符) *
            分拣时效:(单位:分钟) *
            派单时效:(单位:分钟) *
            初稿时效:(单位:分钟) *
            定稿时效:(单位:分钟) *
            状态:(请选择) +  * +
            序号:(填数字,越小越靠前)
            尺寸/单位mm:(支持两位小数)(含出血) + + <#for size : sizeList> + + + + +
            + x + x + mm + + + +
            +
            + +
            +
            计算模位尺寸/单位mm:(支持两位小数)(含出血) + x + mm +
            +${zhiqim_manager_submit()} +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/dialog/membersSelector.zml b/Yangcai365_design/manage/zview/sys/dialog/membersSelector.zml new file mode 100644 index 0000000..461a4f3 --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/dialog/membersSelector.zml @@ -0,0 +1,56 @@ +${Styles.htmlOverflowHidden()} + + +<#-- 查询 --> +
            +
            + + +
            +
            + +<#-- 列表 --> +
            + + + + + + + +${zhiqim_manager_tr_no_record(list, 4, "没有可选择的操作员")} +<#for item : list> +${zhiqim_manager_tr_click_checkbox()}<#else>${zhiqim_manager_tr_click_radio()} > + + + + + + + + + +<#-- 操作 --> +
            + + +
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/groupMembers.zml b/Yangcai365_design/manage/zview/sys/groupMembers.zml new file mode 100644 index 0000000..77bb709 --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/groupMembers.zml @@ -0,0 +1,124 @@ + +${zhiqim_manager_breadcrumb("设计组成员")} +${zhiqim_manager_content()} + +<#-- 导航 --> +
            + +
            + +<#-- 列表 --> +
            <#if multiSelect> 全选<#else>选择操作员头像操作员编码操作员姓名
            ${item.getOperatorCode()}${item.getOperatorName()}
            + + + + + +
            + + + <#for item : groupList> + + +
            设计组
            ${item.getGroupName()}
            +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/industryAdd.zml b/Yangcai365_design/manage/zview/sys/industryAdd.zml new file mode 100644 index 0000000..536193b --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/industryAdd.zml @@ -0,0 +1,36 @@ +<#def designatedPath="/industryList.htm"/> +${request.getValidateScript()} +${zhiqim_manager_history("industryList.htm")} + +${zhiqim_manager_breadcrumb_parent("industryList.htm", "行业管理", "增加行业")} +${zhiqim_manager_content()} +
            + + + + + + + + + + + + + + + + + + + + +
            增加行业
            行业名称:(20位不定长字符) *
            行业关键字:(逗号隔开)
            状态:(请选择) +  * +
            序号:(填数字)
            +${zhiqim_manager_submit()} +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/industryList.zml b/Yangcai365_design/manage/zview/sys/industryList.zml new file mode 100644 index 0000000..9f003d7 --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/industryList.zml @@ -0,0 +1,59 @@ +<#def designatedPath="/industryList.htm"/> +${zhiqim_manager_breadcrumb("行业管理")} +${zhiqim_manager_content()} +${sweet_alert_reuse_method()} + +<#-- 导航 --> +
            + +
            + +<#-- 列表 --> + + + + + + + + + +<#if Lists.size(industryList) == 0> +${zhiqim_manager_no_record(6, "暂时没有行业信息")} + +<#for item : industryList> + + + + + + + + + +
            选择行业Id行业名称关键字关键字序号
            ${item.getIndustryId()}${item.getIndustryName()}${item.getIndustryKeywords()}<#if item.isEnabled()>正常<#else>停用${item.getIndustrySeq()}
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/industryModify.zml b/Yangcai365_design/manage/zview/sys/industryModify.zml new file mode 100644 index 0000000..70feeb9 --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/industryModify.zml @@ -0,0 +1,37 @@ +<#def designatedPath="/industryList.htm"/> +${request.getValidateScript()} +${zhiqim_manager_history("/industryList.htm")} + +${zhiqim_manager_breadcrumb_parent("/industryList.htm", "行业管理", "修改行业")} +${zhiqim_manager_content()} +
            + + + + + + + + + + + + + + + + + + + + + +
            修改行业
            行业名称:(20位不定长字符) *
            行业关键字:(逗号隔开)
            状态:(请选择) +  * +
            序号:(填数字)
            +${zhiqim_manager_submit()} +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/orderConvertAdd.zml b/Yangcai365_design/manage/zview/sys/orderConvertAdd.zml new file mode 100644 index 0000000..a23dd55 --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/orderConvertAdd.zml @@ -0,0 +1,134 @@ +<#def designatedPath="/orderConvertList.htm"/> +${request.getValidateScript()} +${zhiqim_manager_history("orderConvertList.htm")} + +${zhiqim_manager_breadcrumb_parent("orderConvertList.htm", "订单折算参数", "增加订单折算参数")} +${zhiqim_manager_content()} +
            + + + + + + + + + + + + + + + + + + + + +
            增加订单折算参数
            产品类型:(请选择) + + +  * +
            折算类型:(请选择) + +  * +
            折算系数:(请填写) + +  * +
            折算参数: + + + + +
            + 折算模数: +   +   + 折算系数: +  * +
            +
            + +
            +
            +${zhiqim_manager_submit()} +
            +${zhiqim_manager_content_end()} + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/orderConvertList.zml b/Yangcai365_design/manage/zview/sys/orderConvertList.zml new file mode 100644 index 0000000..0ff5f42 --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/orderConvertList.zml @@ -0,0 +1,49 @@ +${zhiqim_manager_breadcrumb("订单折算参数")} +${zhiqim_manager_content()} + +<#-- 导航 --> +
            + +
            + +<#-- 列表 --> + + + + + + +${zhiqim_manager_tr_no_record(pageResult, 10, "暂时没有订单折算参数")} +<#for item : pageResult.list()> + + + + + + +
            选择产品类型最后修改时间
            ${item.getPrdTypeName()}${Sqls.toDateTimeString(item.getModifyTime())}
            +${zhiqim_manager_paging(pageResult, "orderConvertList.htm")} +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/orderConvertModify.zml b/Yangcai365_design/manage/zview/sys/orderConvertModify.zml new file mode 100644 index 0000000..ba6a4bc --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/orderConvertModify.zml @@ -0,0 +1,146 @@ +<#def designatedPath="/orderConvertList.htm"/> +${request.getValidateScript()} +${zhiqim_manager_history("orderConvertList.htm")} + +${zhiqim_manager_breadcrumb_parent("orderConvertList.htm", "订单折算参数", "修改订单折算参数")} +${zhiqim_manager_content()} +
            + + + + + + + + + + + + + + + + + + + + +
            修改订单折算参数
            产品类型: + ${orderConvert.getPrdTypeName()} +
            折算类型:(请选择) + +  * +
            折算系数:(请填写) + + + +  * +
            折算参数: + + <#for modulu : convertModulus> + <#var index=modulu_index/> + + + + +
            + 折算模数: +   +   + 折算系数: +  * + <#if index != 0> + + +
            +
            + +
            +
            +${zhiqim_manager_submit()} +
            +${zhiqim_manager_content_end()} + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/orderMerchantAdd.zml b/Yangcai365_design/manage/zview/sys/orderMerchantAdd.zml new file mode 100644 index 0000000..2460d71 --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/orderMerchantAdd.zml @@ -0,0 +1,37 @@ +<#def designatedPath="/orderMerchantList.htm"/> +${request.getValidateScript()} +${zhiqim_manager_history("orderMerchantList.htm")} +${zhiqim_manager_breadcrumb_parent("orderMerchantList.htm", "商家管理", "增加商家")} +${zhiqim_manager_content()} + +
            + + + + + + + + + + + + + + + + +
            增加商家
            商家名称:(20位不定长字符) *
            商家状态:(请选择) +  * +
            商家秘钥: +
            +
            +
            +${zhiqim_manager_submit()} +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/orderMerchantList.zml b/Yangcai365_design/manage/zview/sys/orderMerchantList.zml new file mode 100644 index 0000000..be7ec99 --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/orderMerchantList.zml @@ -0,0 +1,40 @@ +<#def designatedPath="/orderMerchantList.htm"/> +${zhiqim_manager_breadcrumb("商家管理")} +${zhiqim_manager_content()} + +<#-- 导航 --> +
            + +
            + +<#-- 列表 --> + + + + + + + + +${zhiqim_manager_tr_no_record(pageResult, 4, "暂时没有商家信息")} +<#for item : merchantList> + + + + + + + + +
            选择商家ID商家名称商家秘钥状态
            ${item.getMerchantId()}${item.getMerchantName()}${item.getMerchantSecret()}<#if item.isEnabled()>正常<#else>停用
            +${zhiqim_manager_paging(pageResult, "/orderMerchantList.htm")} +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/orderMerchantModify.zml b/Yangcai365_design/manage/zview/sys/orderMerchantModify.zml new file mode 100644 index 0000000..df1f082 --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/orderMerchantModify.zml @@ -0,0 +1,35 @@ +<#def designatedPath="/orderMerchantList.htm"/> +${request.getValidateScript()} +${zhiqim_manager_history("orderMerchantList.htm")} +${zhiqim_manager_breadcrumb_parent("orderMerchantList.htm", "商家管理", "修改商家")} +${zhiqim_manager_content()} +
            + + + + + + + + + + + + + + + + + +
            修改商家
            商家名称:(20位不定长字符) *
            商家状态:(请选择) +  * +
            商家秘钥: +
            +
            +
            +${zhiqim_manager_submit()} +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/performanceParameter.zml b/Yangcai365_design/manage/zview/sys/performanceParameter.zml new file mode 100644 index 0000000..2461956 --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/performanceParameter.zml @@ -0,0 +1,86 @@ +${zhiqim_manager_breadcrumb("设计绩效参数")} +${zhiqim_manager_content()} + +<#-- 导航 --> +
            + +
            + +<#-- 列表 --> + + + + + + + + + + + + + + +${zhiqim_manager_tr_no_record(count, 10, "暂时没有设计绩效参数")} +<#for entry : dataMap.entrySet()> + <#var list = entry.getValue()/> + <#for item : list> + id="tr${item.getOrgId()}" ${zhiqim_manager_tr_click_radio()} <#else> onclick="Z('#tr${item.getOrgId()}').click()" class="z-pointer onmounse${item.getOrgId()}" onmouseover="Z('tr.onmounse${item.getOrgId()}').css('background-color', '#f3fdfc')" onmouseout="Z('tr.onmounse${item.getOrgId()}').css('background-color', '#ffffff')"> + + <#if list.size() gt 1> + <#if item_index==0> + + + + <#else> + + + + + + + + + + + + + + + +
            选择组织角色试一级单价/单数试二级单价/单数正三级单价/单数正四级单价/单数正五级单价/单数正六级单价/单数操作
            ${ZmrOrgDao.getOrgName(request, item.getOrgId())}${ZmrOrgDao.getOrgName(request, item.getOrgId())}<#if item.getPriceType()==1>设计组<#else>设计师${Amounts.toYuan(item.getPriceLevel1())}<#if item.getLevel1MaxCount() gt 0>( 0-${item.getLevel1MaxCount()}单)${Amounts.toYuan(item.getPriceLevel2())}<#if item.getLevel2MaxCount() gt 0>(${item.getLevel1MaxCount()+1}-${item.getLevel2MaxCount()}单)${Amounts.toYuan(item.getPriceLevel3())}<#if item.getLevel3MaxCount() gt 0>(${item.getLevel2MaxCount()+1}-${item.getLevel3MaxCount()}单)${Amounts.toYuan(item.getPriceLevel4())}<#if item.getLevel4MaxCount() gt 0>(${item.getLevel3MaxCount()+1}-${item.getLevel4MaxCount()}单)${Amounts.toYuan(item.getPriceLevel5())}<#if item.getLevel5MaxCount() gt 0>(${item.getLevel4MaxCount()+1}-${item.getLevel5MaxCount()}单)${Amounts.toYuan(item.getPriceLevel6())}<#if item.getLevel6MaxCount() gt 0>(${item.getLevel5MaxCount()+1}-${item.getLevel6MaxCount()}单) + <#if DateTimes.compareDay(item.getValidDate(), DateTimes.getFirstMonthDay()) gte 0 > + + +
            +${zhiqim_manager_paging(pageResult, "performanceParameter.htm")} +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/performanceParameterAdd.zml b/Yangcai365_design/manage/zview/sys/performanceParameterAdd.zml new file mode 100644 index 0000000..39e15f3 --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/performanceParameterAdd.zml @@ -0,0 +1,78 @@ +<#def designatedPath="performanceParameter.htm"/> +${request.getValidateScript()} +${zhiqim_manager_history("performanceParameter.htm?page="+page)} + +${zhiqim_manager_breadcrumb_parent("performanceParameter.htm?page="+page, "设计绩效参数", "增加设计绩效参数")} +${zhiqim_manager_content()} +
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            增加设计绩效参数
            组织:(请选择) + +
            单价类型:(请选择) + +
            试一级单价:(请输入数字,允许小数) + + +
            试二级单价:(请输入数字,允许小数) + + +
            正三级单价:(请输入数字,允许小数) + + +
            正四级单价:(请输入数字,允许小数) + + +
            正五级单价:(请输入数字,允许小数) + + +
            正六级单价:(请输入数字,允许小数) + + +
            +${zhiqim_manager_submit()} +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/performanceParameterModify.zml b/Yangcai365_design/manage/zview/sys/performanceParameterModify.zml new file mode 100644 index 0000000..66059a3 --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/performanceParameterModify.zml @@ -0,0 +1,71 @@ +<#def designatedPath="performanceParameter.htm"/> +${request.getValidateScript()} +${zhiqim_manager_history("performanceParameter.htm?page="+page)} + +${zhiqim_manager_breadcrumb_parent("performanceParameter.htm?page="+page, "设计绩效参数", "修改设计绩效参数")} +${zhiqim_manager_content()} + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            增加设计绩效参数
            组织:${ZmrOrgDao.getOrgName(request, param.getOrgId())}
            单价类型:(请选择) + <#if param.getPriceType()==1>设计组<#else>设计师 +
            试一级单价:(请输入数字,允许小数) + + +
            试二级单价:(请输入数字,允许小数) + + +
            正三级单价:(请输入数字,允许小数) + + +
            正四级单价:(请输入数字,允许小数) + + +
            正五级单价:(请输入数字,允许小数) + + +
            正六级单价:(请输入数字,允许小数) + + +
            +${zhiqim_manager_submit()} +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/presenter/groupMembersInfo.zml b/Yangcai365_design/manage/zview/sys/presenter/groupMembersInfo.zml new file mode 100644 index 0000000..1e9ce7d --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/presenter/groupMembersInfo.zml @@ -0,0 +1,50 @@ +<#include "/ztmpl/zhiqim_manager/"+themeMain+"/define.htm"/> + + + + + + + + + + + + + +${zhiqim_manager_tr_no_record(operatorList, 4, "暂时没有成员信息")} +<#for item : memberList> + + + + + + + + + +
            + [${group.getGroupName()}]成员 + + + + 年 + 月 +
            头像姓名任职加入日期离开日期操作
            + <#var opr=operatorMap.get(item.getUserCode())/> + + ${item.getUserCode()}<#if item.getIsGroupLeader() == 1>组长<#else>组员${item.getStartDate()}<#if Validates.isNotEmptyBlank(item.getEndDate())>${item.getEndDate()}<#else> -- + <#if ZmrPathRule.check(request, "/groupMemberAdd.htm") && item.getEndDate() == null && item.getIsGroupLeader() == 0> + + <#else> -- + +
            +${zhiqim_manager_list(memberList.size())} diff --git a/Yangcai365_design/manage/zview/sys/productConvert.zml b/Yangcai365_design/manage/zview/sys/productConvert.zml new file mode 100644 index 0000000..c627a88 --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/productConvert.zml @@ -0,0 +1,117 @@ +${zhiqim_manager_breadcrumb("产品单价")} +${zhiqim_manager_content()} + + + +<#-- 导航 --> +
            + +
            + +<#-- 列表 --> + + + + + + + + + +${zhiqim_manager_tr_no_record(pageResult, 10, "暂时没有产品单价信息")} +<#for item : pageResult.list()> + + + + + + + + + +
            选择产品尺寸面数最后修改时间操作人
            ${Global.get(DesignTypeCache.class).getName(item.getPrdTypeId())} + <#if item.getPrdSizeWidth() gt 0 && item.getPrdSizeHeight() gt 0> + ${item.getPrdSizeWidth()}X${item.getPrdSizeHeight()} + <#else>/ + <#if Validates.isNotEmpty(item.getPrdPageName())>${item.getPrdPageName()}<#else>/${Sqls.toDateTimeString(item.getUpdateTime())}${item.getUpdateOperator()}
            +${zhiqim_manager_paging(pageResult,"/productConvert.htm")} +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/productConvertAdd.zml b/Yangcai365_design/manage/zview/sys/productConvertAdd.zml new file mode 100644 index 0000000..cb95917 --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/productConvertAdd.zml @@ -0,0 +1,115 @@ +${request.getValidateScript()} +${zhiqim_manager_history("productConvert.htm")} + +${zhiqim_manager_breadcrumb_parent("productConvert.htm", "产品单价" , "增加产品单价")} +${zhiqim_manager_content()} + +
            + + + + + + + + + + + + + + + + + + + + + + + + +
            增加产品单价
            产品 + +  * +
            尺寸 +
            + 长:小于  宽:小于   + +
            +
            面数 + +
            等级绩效单价 +
              +
            • ${leverList.get(0).getDesignerLever()}*
            • +
            • ${leverList.get(1).getDesignerLever()}*
            • +
            • ${leverList.get(2).getDesignerLever()}*
            • +
            • ${leverList.get(3).getDesignerLever()}*
            • +
            • ${leverList.get(4).getDesignerLever()}*
            • +
            • ${leverList.get(5).getDesignerLever()}*
            • +
            • ${leverList.get(6).getDesignerLever()}*
            • +
            +
            改稿价格 + +
            +${zhiqim_manager_submit()} +
            +${zhiqim_manager_content_end()} + + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/productConvertModify.zml b/Yangcai365_design/manage/zview/sys/productConvertModify.zml new file mode 100644 index 0000000..0e80c73 --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/productConvertModify.zml @@ -0,0 +1,122 @@ +${request.getValidateScript()} +${zhiqim_manager_history("productConvert.htm")} + +${zhiqim_manager_breadcrumb_parent("productConvert.htm", "产品单价" , "增加产品单价")} +${zhiqim_manager_content()} + +
            + + + + + + + + + + + + + + + + + + + + + + + + + +
            修改产品单价
            产品 + +  * +
            尺寸 +
            + 长:小于  宽:小于   +
            +
            面数 + +
            等级绩效单价 +
              +
            • ${leverList.get(0).getDesignerLever()}*
            • +
            • ${leverList.get(1).getDesignerLever()}*
            • +
            • ${leverList.get(2).getDesignerLever()}*
            • +
            • ${leverList.get(3).getDesignerLever()}*
            • +
            • ${leverList.get(4).getDesignerLever()}*
            • +
            • ${leverList.get(5).getDesignerLever()}*
            • +
            • ${leverList.get(6).getDesignerLever()}*
            • +
            +
            改稿价格 + +
            +${zhiqim_manager_submit()} +
            +${zhiqim_manager_content_end()} + + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/qcAwardedType.zml b/Yangcai365_design/manage/zview/sys/qcAwardedType.zml new file mode 100644 index 0000000..690e78d --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/qcAwardedType.zml @@ -0,0 +1,42 @@ +${zhiqim_manager_breadcrumb("质检加分管理")} +${zhiqim_manager_content()} + +<#-- 导航 --> +
            + +
            + +<#-- 列表 --> + + + + + + + +${zhiqim_manager_tr_no_record(pageResult, 10, "暂时没有质检加分类型信息")} +<#for item : pageResult.list()> + + + + + + + +
            选择加分类型ID加分类型加分类型分数
            ${item.getQcTypeId()}${item.getQcAwardedName()}${item.getQcScore()}
            +${zhiqim_manager_paging(pageResult, "qcAwardedType.htm")} +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/qcAwardedTypeAdd.zml b/Yangcai365_design/manage/zview/sys/qcAwardedTypeAdd.zml new file mode 100644 index 0000000..6ee8968 --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/qcAwardedTypeAdd.zml @@ -0,0 +1,23 @@ +<#def designatedPath="/qcAwardedType.htm"/> +${request.getValidateScript()} +${zhiqim_manager_history("qcAwardedType.htm?page="+page)} + +${zhiqim_manager_breadcrumb_parent("qcAwardedType.htm?page="+page, "质检加分", "增加质检加分类型")} +${zhiqim_manager_content()} +
            + + + + + + + + + + + + +
            增加质检加分类型
            质检加分类型:(请填写)
            加分类型分数:(请输入数字,允许小数)
            +${zhiqim_manager_submit()} +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/qcAwardedTypeModify.zml b/Yangcai365_design/manage/zview/sys/qcAwardedTypeModify.zml new file mode 100644 index 0000000..0376ec9 --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/qcAwardedTypeModify.zml @@ -0,0 +1,24 @@ +<#def designatedPath="/qcAwardedType.htm"/> +${request.getValidateScript()} +${zhiqim_manager_history("qcAwardedType.htm?page="+page)} + +${zhiqim_manager_breadcrumb_parent("qcAwardedType.htm?page="+page, "质检加分", "修改质检加分类型")} +${zhiqim_manager_content()} +
            + + + + + + + + + + + + + +
            修改质检加分类型
            质检加分类型:(请填写)
            加分类型分数:(请输入数字,允许小数)
            +${zhiqim_manager_submit()} +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/qcParameter.zml b/Yangcai365_design/manage/zview/sys/qcParameter.zml new file mode 100644 index 0000000..fdb0cfa --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/qcParameter.zml @@ -0,0 +1,42 @@ +${zhiqim_manager_breadcrumb("质检参数")} +${zhiqim_manager_content()} + +<#-- 导航 --> +
            + +
            + +<#-- 列表 --> + + + + + + + +${zhiqim_manager_tr_no_record(pageResult, 10, "暂时没有质检违规类型")} +<#for item : pageResult.list()> + + + + + + + +
            选择类型ID违规内容扣罚分数
            ${item.getParameterId()}${item.getContent()}${item.getScore()}
            +${zhiqim_manager_paging(pageResult, "qcParameter.htm")} +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/qcParameterAdd.zml b/Yangcai365_design/manage/zview/sys/qcParameterAdd.zml new file mode 100644 index 0000000..c4aed11 --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/qcParameterAdd.zml @@ -0,0 +1,23 @@ +<#def designatedPath="/qcParameter.htm"/> +${request.getValidateScript()} +${zhiqim_manager_history("qcParameter.htm?page="+page)} + +${zhiqim_manager_breadcrumb_parent("qcParameter.htm?page="+page, "质检参数", "增加质检违规类型")} +${zhiqim_manager_content()} +
            + + + + + + + + + + + + +
            增加质检违规类型
            违规内容:(请填写)
            扣罚分数:(请输入数字,允许小数)
            +${zhiqim_manager_submit()} +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/qcParameterModify.zml b/Yangcai365_design/manage/zview/sys/qcParameterModify.zml new file mode 100644 index 0000000..5975833 --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/qcParameterModify.zml @@ -0,0 +1,24 @@ +<#def designatedPath="/qcParameter.htm"/> +${request.getValidateScript()} +${zhiqim_manager_history("qcParameter.htm?page="+page)} + +${zhiqim_manager_breadcrumb_parent("qcParameter.htm?page="+page, "质检参数", "修改质检违规类型")} +${zhiqim_manager_content()} +
            + + + + + + + + + + + + + +
            修改质检违规类型
            违规内容:(请填写)
            扣罚分数:(请输入数字,允许小数)
            +${zhiqim_manager_submit()} +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/qcPerformanceParam.zml b/Yangcai365_design/manage/zview/sys/qcPerformanceParam.zml new file mode 100644 index 0000000..345d3b7 --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/qcPerformanceParam.zml @@ -0,0 +1,53 @@ +${zhiqim_manager_breadcrumb("质检绩效参数")} +${zhiqim_manager_content()} + +<#-- 导航 --> +
            + +
            + +<#-- 列表 --> + + + + + + + + + + + +${zhiqim_manager_tr_no_record(pageResult, 8, "暂时没有质检绩效")} +<#for item : pageResult.list()> + + + + + + + + + + + +
            选择标准质检分奖励分扣罚分奖励金额(单位/元)扣罚金额(单位/元)最大奖励金额(单位/元)最大扣罚金额(单位/元)
            ${Maths.division(item.getStandardQcScore(), 100, 2)}${Maths.division(item.getRewardScore(), 100, 2)}${Maths.division(item.getPunishScore(), 100, 2)}${Maths.division(item.getRewardAmount(), 100, 2)}${Maths.division(item.getPunishAmount(), 100, 2)}${Maths.division(item.getRewardAmountMax(), 100, 2)}${Maths.division(item.getPunishAmountMax(), 100, 2)}
            +${zhiqim_manager_paging(pageResult, "qcPerformanceParam.htm")} +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/qcPerformanceParamAdd.zml b/Yangcai365_design/manage/zview/sys/qcPerformanceParamAdd.zml new file mode 100644 index 0000000..fceadd7 --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/qcPerformanceParamAdd.zml @@ -0,0 +1,43 @@ +<#def designatedPath="/qcPerformanceParam.htm"/> +${request.getValidateScript()} +${zhiqim_manager_history("qcPerformanceParam.htm?page="+page)} + +${zhiqim_manager_breadcrumb_parent("qcPerformanceParam.htm?page="+page, "质检绩效参数", "增加质检绩效参数")} +${zhiqim_manager_content()} +
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            增加质检绩效参数
            标准质检分:(请输入数字,允许小数)
            奖励分:(请输入数字,允许小数)
            扣罚分:(请输入数字,允许小数)
            奖励金额:(单位/元)
            扣罚金额:(单位/元)
            最大奖励金额:(单位/元)
            最大扣罚金额:(单位/元)
            +${zhiqim_manager_submit()} +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/qcPerformanceParamModify.zml b/Yangcai365_design/manage/zview/sys/qcPerformanceParamModify.zml new file mode 100644 index 0000000..5bb11bc --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/qcPerformanceParamModify.zml @@ -0,0 +1,44 @@ +<#def designatedPath="/qcPerformanceParam.htm"/> +${request.getValidateScript()} +${zhiqim_manager_history("qcPerformanceParam.htm?page="+page)} + +${zhiqim_manager_breadcrumb_parent("qcPerformanceParam.htm?page="+page, "质检绩效参数", "增加质检绩效参数")} +${zhiqim_manager_content()} +
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            修改质检绩效参数
            标准质检分:(请输入数字,允许小数)
            奖励分:(请输入数字,允许小数)
            扣罚分:(请输入数字,允许小数)
            奖励金额:(单位/元)
            扣罚金额:(单位/元)
            最大奖励金额:(单位/元)
            最大扣罚金额:(单位/元)
            +${zhiqim_manager_submit()} +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/receiveMerAdd.zml b/Yangcai365_design/manage/zview/sys/receiveMerAdd.zml new file mode 100644 index 0000000..7111706 --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/receiveMerAdd.zml @@ -0,0 +1,113 @@ +<#def designatedPath="/receiveMerManage.htm"/> +${request.getValidateScript()} +${zhiqim_manager_history("/receiveMerManage.htm")} +${zhiqim_manager_breadcrumb_parent("/receiveMerManage.htm", "接单商户管理", "添加接单商户")} +${zhiqim_manager_content()} + + +
            + + + + + + + + + + + + + + + + +
            添加接单组织
            选择接组织: + + 组织接单优先级:数字越小派单越前 + + * +
            接单状态: + + 组织状态: + +
            +${zhiqim_manager_submit()} +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/receiveMerManage.zml b/Yangcai365_design/manage/zview/sys/receiveMerManage.zml new file mode 100644 index 0000000..cc360cf --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/receiveMerManage.zml @@ -0,0 +1,83 @@ +<#def designatedPath="/receiveMerManage.htm"/> +${zhiqim_manager_breadcrumb("组织接单管理")} +${zhiqim_manager_content()} + + + +<#-- 导航 --> +
            + +
            + +<#-- 列表 --> + + + + + + + + + + + ${zhiqim_manager_tr_no_record(pageResult, 7, "无数据")} +<#for item : pageResult.list()> + + + + + + + + + + +
            选择组织名称优先级组织状态接单状态最后更新时间最后操作人
            ${ZmrOrgDao.getOrgName(request, item.getOrgId())}${item.getMerLevel()}<#if item.getMerStatus() == 1>停用<#else>正常<#if item.isPauseRecieive()>已暂停<#else>接单中${Sqls.toDateTimeString(item.getModifyTime())}${item.getModifyOperatorCode()}
            + ${zhiqim_manager_paging(pageResult, "/receiveMerManage.htm")} +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/receiveMerModify.zml b/Yangcai365_design/manage/zview/sys/receiveMerModify.zml new file mode 100644 index 0000000..92699d0 --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/receiveMerModify.zml @@ -0,0 +1,212 @@ +<#def designatedPath="/receiveMerManage.htm"/> +${request.getValidateScript()} +${zhiqim_manager_history("/receiveMerManage.htm")} + +${zhiqim_manager_breadcrumb_parent("/receiveMerManage.htm", "接单商户管理", "修改接单商户")} +${zhiqim_manager_content()} + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            修改接单商户
            选择接单商户: + + 商户排序优先级:数字越小排序越前 + + * +
            接单状态: + + 商户状态: + +
            个人同时最大接单量:个人正在设计订单总数(老用户订单派单除外) + + * + 个人非加急订单最大接单量:普通订单正在设计数量 + + * +
            支持店铺: +
            + checked data-class="z-blue"/>全选 +
            +
            + <#var merShop = Lists.toStringList(orgMer.getOrderShop())/> + <#for item : shopList> +
            + checked class="z-checkbox" value="${item}" data-role="z-checkbox" data-class="${zmr_color_class}"> + ${item} +
            + +
            +
            +${zhiqim_manager_submit()} +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/receiveMerModifyInfo.zml b/Yangcai365_design/manage/zview/sys/receiveMerModifyInfo.zml new file mode 100644 index 0000000..6c0e3e0 --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/receiveMerModifyInfo.zml @@ -0,0 +1,57 @@ + + +
            + + + + + + + + + + + + + +
            选择接单商户: + + 组织状态: + +
            接单状态: + + 接单优先级: + +
            + +<#-- 操作 --> +
            + + +
            +
            diff --git a/Yangcai365_design/manage/zview/sys/refundParameter.zml b/Yangcai365_design/manage/zview/sys/refundParameter.zml new file mode 100644 index 0000000..2220308 --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/refundParameter.zml @@ -0,0 +1,57 @@ +${zhiqim_manager_breadcrumb("退款绩效参数")} +${zhiqim_manager_content()} + +<#-- 导航 --> +
            + +
            + +<#-- 列表 --> + + + + + + + + + + + + + +${zhiqim_manager_tr_no_record(pageResult, 10, "暂时没有退款绩效")} +<#for item : pageResult.list()> + + + + + + + + + + + + + +
            选择标准退款率(%)标准退款率下限(%)标准退款率上限(%)奖励点(%)扣罚点(%)奖励金额(单位/元)扣罚金额(单位/元)最大奖励金额(单位/元)最大扣罚金额(单位/元)
            ${Maths.division(item.getStandardRefundRate(), 100, 2)}${Maths.division(item.getStandardRefundRateFloor(), 100, 2)}${Maths.division(item.getStandardRefundRateCeil(), 100, 2)}${Maths.division(item.getRewardDot(), 100, 2)}${Maths.division(item.getPunishDot(), 100, 2)}${Maths.division(item.getRewardAmount(), 100, 2)}${Maths.division(item.getPunishAmount(), 100, 2)}${Maths.division(item.getRewardAmountMax(), 100, 2)}${Maths.division(item.getPunishAmountMax(), 100, 2)}
            +${zhiqim_manager_paging(pageResult, "refundParameter.htm")} +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/refundParameterAdd.zml b/Yangcai365_design/manage/zview/sys/refundParameterAdd.zml new file mode 100644 index 0000000..72d8529 --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/refundParameterAdd.zml @@ -0,0 +1,52 @@ +<#def designatedPath="/refundParameter.htm"/> +${request.getValidateScript()} +${zhiqim_manager_history("refundParameter.htm?page="+page)} + +${zhiqim_manager_breadcrumb_parent("refundParameter.htm?page="+page, "退款绩效参数", "增加退款绩效参数")} +${zhiqim_manager_content()} +
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            增加退款绩效参数
            标准退款率:(请输入数字,允许小数)%
            标准退款率下限:(请输入数字,允许小数)%
            标准退款率上限:(请输入数字,允许小数)%
            奖励点:(请输入数字,允许小数)%
            扣罚点:(请输入数字,允许小数)%
            奖励金额:(单位/元)
            扣罚金额:(单位/元)
            最大奖励金额:(单位/元)
            最大扣罚金额:(单位/元)
            +${zhiqim_manager_submit()} +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/refundParameterModify.zml b/Yangcai365_design/manage/zview/sys/refundParameterModify.zml new file mode 100644 index 0000000..d99b28e --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/refundParameterModify.zml @@ -0,0 +1,53 @@ +<#def designatedPath="/refundParameter.htm"/> +${request.getValidateScript()} +${zhiqim_manager_history("refundParameter.htm?page="+page)} + +${zhiqim_manager_breadcrumb_parent("refundParameter.htm?page="+page, "退款绩效参数", "修改退款绩效参数")} +${zhiqim_manager_content()} +
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            修改退款绩效参数
            标准退款率:(请输入数字,允许小数)%
            标准退款率下限:(请输入数字,允许小数)%
            标准退款率上限:(请输入数字,允许小数)%
            奖励点:(请输入数字,允许小数)%
            扣罚点:(请输入数字,允许小数)%
            奖励金额:(单位/元)
            扣罚金额:(单位/元)
            最大奖励金额:(单位/元)
            最大扣罚金额:(单位/元)
            +${zhiqim_manager_submit()} +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/specialOrderTypeAdd.zml b/Yangcai365_design/manage/zview/sys/specialOrderTypeAdd.zml new file mode 100644 index 0000000..c0b0b43 --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/specialOrderTypeAdd.zml @@ -0,0 +1,31 @@ +<#def designatedPath="/specialOrderTypeList.htm"/> +${request.getValidateScript()} +${zhiqim_manager_history("specialOrderTypeList.htm")} + +${zhiqim_manager_breadcrumb_parent("specialOrderTypeList.htm", "特殊订单绩效参数", "增加订单绩效参数")} +${zhiqim_manager_content()} +
            + + + + + + + + + + + + + + + + + +
            增加订单绩效参数
            特殊订单类型:(请填写) *
            特殊订单类型描述:(请填写) *
            奖励金额:(单位/元) + +  * +
            +${zhiqim_manager_submit()} +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/specialOrderTypeList.zml b/Yangcai365_design/manage/zview/sys/specialOrderTypeList.zml new file mode 100644 index 0000000..9f0bc84 --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/specialOrderTypeList.zml @@ -0,0 +1,46 @@ +${zhiqim_manager_breadcrumb("特殊订单绩效参数")} +${zhiqim_manager_content()} + +<#-- 导航 --> +
            + +
            + +<#-- 列表 --> + + + + + + + +${zhiqim_manager_tr_no_record(pageResult, 10, "暂时没有特殊订单类型")} +<#for item : pageResult.list()> + + + + + + + +
            选择特殊订单类型特殊订单描述特殊订单类型奖励金额
            ${item.getSpecialOrderType()}${item.getSpecialOrderDescribe()}${Maths.division(item.getSpecialOrderAmount(), 100, 2)}
            +${zhiqim_manager_paging(pageResult, "specialOrderTypeList.htm")} +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/specialOrderTypeModify.zml b/Yangcai365_design/manage/zview/sys/specialOrderTypeModify.zml new file mode 100644 index 0000000..93fbf44 --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/specialOrderTypeModify.zml @@ -0,0 +1,29 @@ +<#def designatedPath="/specialOrderTypeList.htm"/> +${request.getValidateScript()} +${zhiqim_manager_history("specialOrderTypeList.htm?page="+page)} + +${zhiqim_manager_breadcrumb_parent("specialOrderTypeList.htm?page="+page, "特殊订单绩效参数", "修改订单绩效参数")} +${zhiqim_manager_content()} +
            + + + + + + + + + + + + + + + + + + +
            修改订单绩效参数
            特殊订单类型:
            特殊订单类型描述:
            奖励金额:(单位/元)
            +${zhiqim_manager_submit()} +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/timelinessParameterAdd.zml b/Yangcai365_design/manage/zview/sys/timelinessParameterAdd.zml new file mode 100644 index 0000000..aa5285c --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/timelinessParameterAdd.zml @@ -0,0 +1,34 @@ +<#def designatedPath="/timelinessParameterList.htm"/> +${request.getValidateScript()} +${zhiqim_manager_history("timelinessParameterList.htm")} + +${zhiqim_manager_breadcrumb_parent("timelinessParameterList.htm", "时效绩效参数", "增加时效绩效参数")} +${zhiqim_manager_content()} +
            + + + + + + + + + + + + +
            增加时效绩效参数
            产品类型 + +  * +
            奖励金额:(单位/元) + +  * +
            +${zhiqim_manager_submit()} +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/timelinessParameterList.zml b/Yangcai365_design/manage/zview/sys/timelinessParameterList.zml new file mode 100644 index 0000000..7e6624d --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/timelinessParameterList.zml @@ -0,0 +1,43 @@ +${zhiqim_manager_breadcrumb("时效绩效参数")} +${zhiqim_manager_content()} + +<#-- 导航 --> +
            + +
            + +<#-- 列表 --> + + + + + + +${zhiqim_manager_tr_no_record(pageResult, 10, "暂时没有时效绩效参数")} +<#for item : pageResult.list()> + + + + + + +
            选择产品类型奖励金额
            ${prdTypeMap.get(item.getPrdTypeId()).getTypeName()}${Maths.division(item.getRewardAmount(), 100, 2)}
            +${zhiqim_manager_paging(pageResult, "timelinessParameterList.htm")} +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/sys/timelinessParameterModify.zml b/Yangcai365_design/manage/zview/sys/timelinessParameterModify.zml new file mode 100644 index 0000000..006d706 --- /dev/null +++ b/Yangcai365_design/manage/zview/sys/timelinessParameterModify.zml @@ -0,0 +1,35 @@ +<#def designatedPath="/timelinessParameterList.htm"/> +${request.getValidateScript()} +${zhiqim_manager_history("timelinessParameterList.htm?page="+page)} + +${zhiqim_manager_breadcrumb_parent("timelinessParameterList.htm?page="+page, "时效绩效参数", "修改时效绩效参数")} +${zhiqim_manager_content()} +
            + + + + + + + + + + + + + +
            修改订单绩效参数
            产品类型 + +  * +
            奖励金额:(单位/元) + +  * +
            +${zhiqim_manager_submit()} +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/tagAttaInfoList.zml b/Yangcai365_design/manage/zview/tagAttaInfoList.zml new file mode 100644 index 0000000..082d483 --- /dev/null +++ b/Yangcai365_design/manage/zview/tagAttaInfoList.zml @@ -0,0 +1,259 @@ +${Styles.htmlOverflowYAuto()} +${sweet_alert_reuse_method()} + +${Htmls.toCallFrame()} + + + + + + + + <#if order.getDesignId() gt 0> + + <#else> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            产品信息: + + + + +
            ${order.getDesignId()}-${order.getBuyerNick()}-${order.getOrderText()} | ¥${Amounts.toYuan(order.getAmount())}元
            +
            + + +
            +
            行业:
            + <#for item : Global.get(DesignIndustryCache.class).getIndustryList()> + + +
            子行业:
            +
            设计风格:
            +
            应用场景:
            +
            客户类型: + <#for item : Global.get(CustomerTypeCache.class).getCustomerTypeCacheAll()> + + +
            +
            diff --git a/Yangcai365_design/manage/zview/template/addSysMaterial.zml b/Yangcai365_design/manage/zview/template/addSysMaterial.zml new file mode 100644 index 0000000..f686a08 --- /dev/null +++ b/Yangcai365_design/manage/zview/template/addSysMaterial.zml @@ -0,0 +1,89 @@ + +
            +
            + + + + + + + + + + + + + + + + + +
            选择类型: + +
            选择分类: + +
            关键字:(多个逗号分隔) + + *
            序号: + + *
            +
            + +
            + + +
            +
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/template/allTemplate.zml b/Yangcai365_design/manage/zview/template/allTemplate.zml new file mode 100644 index 0000000..4890d8d --- /dev/null +++ b/Yangcai365_design/manage/zview/template/allTemplate.zml @@ -0,0 +1,163 @@ +${Styles.src("/zinc/css/design_2018102301.css")} +${Scripts.src("/zinc/js/design_2018102301.js")} +${Scripts.src("/zinc/js/zhiqim_search_auto_list.js")} + + +${zhiqim_manager_breadcrumb_parent("/templateMy.htm", "我的模板", "所有模板")} +${zhiqim_manager_content()} + +<#-- 导航栏 --> +
            + +
            + + +<#-- 关键词搜索 --> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            +
            + + + + + + + +
            +
            类型: + + <#for item : DesignTypeDao.listTemmplate()> + + +
            行业: + + <#for item : Global.get(DesignIndustryCache.class).getIndustryList()> + + +
            文件格式: + + + + + + +
            排序: + + + + + +
            + +
            + +${zhiqim_manager_content_end()} diff --git a/Yangcai365_design/manage/zview/template/bestTemplate.zml b/Yangcai365_design/manage/zview/template/bestTemplate.zml new file mode 100644 index 0000000..6d492f7 --- /dev/null +++ b/Yangcai365_design/manage/zview/template/bestTemplate.zml @@ -0,0 +1,95 @@ +<#def designatedPath="/allTemplate.htm"/> + + +${Styles.src("/zinc/css/design_2018102301.css")} +${Scripts.src("/zinc/js/design_2018102301.js")} +${zhiqim_manager_breadcrumb_parent("/templateMy.htm", "我的模板", "精品模板")} +${zhiqim_manager_content()} + +<#-- 导航栏 --> +
            + +
            + +
            + + + +
            + + + + + + + + + + + + + + + + + +
            类型: + + <#for item : DesignTypeDao.list()> + + +
            行业: + + <#for item : Global.get(DesignIndustryCache.class).getIndustryList()> + + +
            文件格式: + + + + + +
            + +
            + +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/template/desTemplateLogList.zml b/Yangcai365_design/manage/zview/template/desTemplateLogList.zml new file mode 100644 index 0000000..50038a3 --- /dev/null +++ b/Yangcai365_design/manage/zview/template/desTemplateLogList.zml @@ -0,0 +1,85 @@ + + +${zhiqim_manager_breadcrumb("模版日志")} +${zhiqim_manager_content()} + +<#-- 导航 --> +
            + +
            + +<#-- 查询条件 --> +${zhiqim_manager_title("模版日志查询")} +
            + + + + +
            + +   模版号: + +
            +
            + +<#-- 列表 --> + + + + + + + +${zhiqim_manager_tr_no_record(pageResult, 4, "暂时没有模版日志信息")} +<#for item : pageResult.list()> + + + + + + + +
            模版号审核人描述操作时间
            ${item.getMediaId()}${item.getOperatorCode()}${item.getLogDesc()}<#if queryType == 0>${Sqls.toDateTimeString(item.getCreateTime())}<#else>
            +${zhiqim_manager_paging(pageResult, "desTemplateLogList.htm")} +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/template/externalDraftDownload.zml b/Yangcai365_design/manage/zview/template/externalDraftDownload.zml new file mode 100644 index 0000000..d663957 --- /dev/null +++ b/Yangcai365_design/manage/zview/template/externalDraftDownload.zml @@ -0,0 +1,37 @@ +${Scripts.src(zhiqim_uploadlarge.js)} + + + + + + +
            请选择: +<#if Validates.isNotEmpty(urlMap.get("pdf"))> + + +<#if Validates.isNotEmpty(urlMap.get("cdr"))> + + +<#if Validates.isNotEmpty(urlMap.get("psd"))> + + +<#if Validates.isNotEmpty(urlMap.get("ai"))> + + +
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/template/externalDraftUpload.zml b/Yangcai365_design/manage/zview/template/externalDraftUpload.zml new file mode 100644 index 0000000..eedd8a9 --- /dev/null +++ b/Yangcai365_design/manage/zview/template/externalDraftUpload.zml @@ -0,0 +1,212 @@ +${Scripts.src(zhiqim_uploadlarge.js)} + +
            + + + + + + + + + + + + + +
            文件格式(默认CDR): + + + + +
            设计文件上传: +
            (最大150MB)
            缩略图上传: +
            (最大1MB)
            +
            + + +
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/template/inner/industrySelect.zml b/Yangcai365_design/manage/zview/template/inner/industrySelect.zml new file mode 100644 index 0000000..76371e2 --- /dev/null +++ b/Yangcai365_design/manage/zview/template/inner/industrySelect.zml @@ -0,0 +1,57 @@ + +<#-- 查询 --> +
            +
            + +
            +
            +<#-- 列表 --> + + + +
            +
            + + + + + + +<#for item : searchIndustryList> + + + + + + + + +<#-- 操作 --> +
            + + +
            + diff --git a/Yangcai365_design/manage/zview/template/inner/newMyTemplate.zml b/Yangcai365_design/manage/zview/template/inner/newMyTemplate.zml new file mode 100644 index 0000000..0675277 --- /dev/null +++ b/Yangcai365_design/manage/zview/template/inner/newMyTemplate.zml @@ -0,0 +1,327 @@ + +
            +
            + + + + + + + +
            选择行业名称
            ${item.getIndustryName()}
            + + + + + + + + + + + + +
            产品类型: + <#for item : DesignTypeDao.listTemmplate()> + + +
            设计面数: + + +
            设计尺寸: + + + + +  X  +  mm + +
            + + + + + +
            模板类型: + +
            + + +
            + + +
            +
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/template/presenter/checkTemplateInfo.zml b/Yangcai365_design/manage/zview/template/presenter/checkTemplateInfo.zml new file mode 100644 index 0000000..91fcf01 --- /dev/null +++ b/Yangcai365_design/manage/zview/template/presenter/checkTemplateInfo.zml @@ -0,0 +1,47 @@ +<#if pageResult.total() != 0> +
            + <#for item : pageResult.list()> + <#if item_index!=0 && item_index%5==0>
            + <#if item_index%5==0>
            +
            +
            + + ${item.getMediaUrl()} + <#else> + <#for path : Arrays.toStringArray(item.getMediaUrl())> + <#if path_index lt 1> + ${path} + + + + + " onclick="Design.doTemplateShow('${item.getMediaId()}');" /> + ${item.getMediaId()} + + + + +
            +
            + <#if item_index == (pageResult.list().size() - 1)>
            + +
            +
            + + + + +
            ${PagingGo.toHtmlClick(pageResult, "doTemplateSearch")}
            +
            +<#else> +
            暂无模板信息
            + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/template/presenter/keywordSearchInfo.zml b/Yangcai365_design/manage/zview/template/presenter/keywordSearchInfo.zml new file mode 100644 index 0000000..4808c44 --- /dev/null +++ b/Yangcai365_design/manage/zview/template/presenter/keywordSearchInfo.zml @@ -0,0 +1,41 @@ +<#if pageResult.total() != 0> +
            + <#for item : pageResult.list()> + <#if item_index!=0 && item_index%5==0>
            + <#if item_index%5==0>
            +
            +
            + + ${item.getMediaUrl()} + <#else> + <#for path : Arrays.toStringArray(item.getMediaUrl())> + <#if path_index lt 1> + ${path} + + + + + " onclick="Design.doTemplateShow('${item.getMediaId()}');" /> + ${item.getMediaId()} +
            +
            + <#if item_index == (pageResult.list().size() - 1)>
            + +
            + +
            + + + + +
            ${PagingGo.toHtmlClick(pageResult, "doSearchAjax")}
            +
            +<#else> +
            暂无模板信息,请重新搜索
            + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/template/presenter/orderTemplateInfo.zml b/Yangcai365_design/manage/zview/template/presenter/orderTemplateInfo.zml new file mode 100644 index 0000000..b3eebab --- /dev/null +++ b/Yangcai365_design/manage/zview/template/presenter/orderTemplateInfo.zml @@ -0,0 +1,28 @@ +<#if pageResult.total() != 0> +
            + <#for item : pageResult.list()> + <#if item_index!=0 && item_index%5==0>
            + <#if item_index%5==0>
            +
            +
            + + ${item.getDesignId()} +
            +
            + <#if item_index == (pageResult.list().size() - 1)>
            + +
            + +
            + + + + +
            ${PagingGo.toHtmlClick(pageResult, "doTemplateSearch")}
            +
            +<#else> +
            暂无模板信息
            + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/template/presenter/retentionDealOrderDetail.zml b/Yangcai365_design/manage/zview/template/presenter/retentionDealOrderDetail.zml new file mode 100644 index 0000000..e143549 --- /dev/null +++ b/Yangcai365_design/manage/zview/template/presenter/retentionDealOrderDetail.zml @@ -0,0 +1,46 @@ +<#include "/ztmpl/zhiqim_manager/"+themeMain+"/define.htm"/> + + +<#-- 列表 --> + + + + + + + + + + + + + + + + + ${zhiqim_manager_tr_no_record(pageResult, 12, "暂时没有滞留单")} + <#for item : pageResult.list()> + <#var isCountDown=CalculationUtil.retentDealCountDownCal(request,item.getDesignId())/> + + + z-text-red" ${zhiqim_manager_tr_onmouse()} ${zhiqim_manager_tr_click_radio()}> + + + + + + + + + + + + + + + +
            订单号订单类型所属组织旺旺号店铺设计师录单时间倒计时领单时间订单状态进度备注产品订单金额
            ${item.getDesignId()}${DraftConstants.get(item.getDraftType())}${ZmrOrgDao.getOrgName(request,item.getOrgId())}${item.getBuyerNick()}${item.getShopNick()}${item.getDesigner()}${Sqls.toDateTimeString(item.getCreateTime())} + <#var effectiveTime = typeMap.get(item.getTypeId()).getEffectiveTime()/> + + ${Sqls.toDateTimeString(item.getDesignReceiveTime())}${StatusConstants.getStatus(item.getStatus())}${progressNoteMap.get(item.getDesignId())}${item.getOrderText()}${Amounts.toYuanMustRadix(item.getAmount())}
            +${zhiqim_manager_paging_jsMethod(pageResult, "doQueryRetentionDealOrder")} diff --git a/Yangcai365_design/manage/zview/template/presenter/templateInfo.zml b/Yangcai365_design/manage/zview/template/presenter/templateInfo.zml new file mode 100644 index 0000000..c39d98d --- /dev/null +++ b/Yangcai365_design/manage/zview/template/presenter/templateInfo.zml @@ -0,0 +1,44 @@ +<#if pageResult.total() != 0> +
            + <#for item : pageResult.list()> + <#if item_index!=0 && item_index%5==0>
            + <#if item_index%5==0>
            +
            +
            + + ${item.getMediaUrl()} + <#else> + <#for path : Arrays.toStringArray(item.getMediaUrl())> + <#if path_index lt 1> + ${path} + + + + + " onclick="Design.doTemplateShow('${item.getMediaId()}','${urlParam}');" /> + ${item.getMediaId()} +
            +
            + <#if item_index == (pageResult.list().size() - 1)>
            + + + +
            + + + + +
            ${PagingGo.toHtmlClick(pageResult, "doTemplateSearch")}
            +
            +<#else> +
            暂无模板信息,请重新搜索
            + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/template/templateAudit.zml b/Yangcai365_design/manage/zview/template/templateAudit.zml new file mode 100644 index 0000000..61c0082 --- /dev/null +++ b/Yangcai365_design/manage/zview/template/templateAudit.zml @@ -0,0 +1,139 @@ +<#def designatedPath="/allTemplate.htm"/> + + +${Styles.src("/zinc/css/design_2018102301.css")} +${Scripts.src("/zinc/js/design_2018102301.js")} +${zhiqim_manager_breadcrumb_parent("/templateMy.htm", "我的模板", "模板审核")} +${zhiqim_manager_content()} + +<#-- 导航栏 --> +
            + +
            + + + + + + + + + + + + + + + + + +
            类型:${typeId} + + <#for item : DesignTypeDao.list()> + + +
            行业: + + <#for item : Global.get(DesignIndustryCache.class).getIndustryList()> + + +
            审核类型: + + +
            + +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/template/templateBestAudit.zml b/Yangcai365_design/manage/zview/template/templateBestAudit.zml new file mode 100644 index 0000000..bb9e5d2 --- /dev/null +++ b/Yangcai365_design/manage/zview/template/templateBestAudit.zml @@ -0,0 +1,98 @@ +<#def designatedPath="/allTemplate.htm"/> + + +${Styles.src("/zinc/css/design_2018102301.css")} +${Scripts.src("/zinc/js/design_2018102301.js")} +${zhiqim_manager_breadcrumb_parent("/templateMy.htm", "我的模板", "精品审核")} +${zhiqim_manager_content()} + +<#-- 导航栏 --> +
            + +
            + + + + + + + + + + + + +
            类型: + + <#for item : DesignTypeDao.list()> + + +
            行业: + + <#for item : Global.get(DesignIndustryCache.class).getIndustryList()> + + +
            + +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/template/templateCollect.zml b/Yangcai365_design/manage/zview/template/templateCollect.zml new file mode 100644 index 0000000..70c870b --- /dev/null +++ b/Yangcai365_design/manage/zview/template/templateCollect.zml @@ -0,0 +1,73 @@ +<#def designatedPath="/allTemplate.htm"/> + + +${Styles.src("/zinc/css/design_2018102301.css")} +${Scripts.src("/zinc/js/design_2018102301.js")} +${zhiqim_manager_breadcrumb("我的模板")} +${zhiqim_manager_content()} + +<#-- 导航栏 --> +
            + +
            + + + + + + + + + + + + +
            类型:${typeId} + + <#for item : DesignTypeDao.listTemmplate()> + + +
            行业: + + <#for item : Global.get(DesignIndustryCache.class).getIndustryList()> + + +
            + +
            + +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/template/templateDraftMy.zml b/Yangcai365_design/manage/zview/template/templateDraftMy.zml new file mode 100644 index 0000000..18299f0 --- /dev/null +++ b/Yangcai365_design/manage/zview/template/templateDraftMy.zml @@ -0,0 +1,82 @@ +<#def designatedPath="/allTemplate.htm"/> + + +${Styles.src("/zinc/css/design_2018102301.css")} +${Scripts.src("/zinc/js/design_2018102301.js")} +${zhiqim_manager_breadcrumb_parent("/templateMy.htm", "我的模板", " 我的订单草稿")} +${zhiqim_manager_content()} + +<#-- 导航栏 --> +
            + +
            + +<#-- 订单搜索 --> +
            + + + + + + +
            + + + + + + + + + + +
            类型: + + <#for item : DesignTypeDao.list()> + + +
            行业: + + <#for item : Global.get(DesignIndustryCache.class).getIndustryList()> + + +
            + +
            + +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/template/templateLabel.zml b/Yangcai365_design/manage/zview/template/templateLabel.zml new file mode 100644 index 0000000..d47fdf4 --- /dev/null +++ b/Yangcai365_design/manage/zview/template/templateLabel.zml @@ -0,0 +1,207 @@ + + +
            + + + + + + + + + + + + + +
            产品类型: ${DesignTypeDao.name(template.getTypeId())}
            行业:  
            子行业: + <#for item : inSubList> + + +

            +${zhiqim_manager_title("关联属性")} +
            + +<#for item : attrCatList> + + + + + +
            ${item.getAttributeCatName()}: + <#for aitem : map.get(item.getAttributeCatId())> + + +
            +
            +
            + + +
            +
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/template/templateMy.zml b/Yangcai365_design/manage/zview/template/templateMy.zml new file mode 100644 index 0000000..72eab9e --- /dev/null +++ b/Yangcai365_design/manage/zview/template/templateMy.zml @@ -0,0 +1,122 @@ +<#def designatedPath="/allTemplate.htm"/> + + +${Styles.src("/zinc/css/design_2018102301.css")} +${Scripts.src("/zinc/js/design_2018102301.js")} +${zhiqim_manager_breadcrumb("我的模板")} +${zhiqim_manager_content()} + +<#-- 导航栏 --> +
            + +
            + + + + + + + + + + + + + + + + + +
            类型:${typeId} + + <#for item : DesignTypeDao.listTemmplate()> + + +
            行业: + + <#for item : Global.get(DesignIndustryCache.class).getIndustryList()> + + +
            文件格式: + + + + + + +
            + +
            + + +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/template/templateOrderMy.zml b/Yangcai365_design/manage/zview/template/templateOrderMy.zml new file mode 100644 index 0000000..b896199 --- /dev/null +++ b/Yangcai365_design/manage/zview/template/templateOrderMy.zml @@ -0,0 +1,88 @@ +<#def designatedPath="/allTemplate.htm"/> + + +${Styles.src("/zinc/css/design_2018102301.css")} +${Scripts.src("/zinc/js/design_2018102301.js")} +${zhiqim_manager_breadcrumb_parent("/templateMy.htm", "我的模板", " 我的订单模板")} +${zhiqim_manager_content()} + +<#-- 导航栏 --> +
            + +
            + +<#-- 订单搜索 --> +
            + + + + + <#if ZmrPathRule.check(request, "/viewAllCompletedOrderTemplate.htm")> + + + + +
            + + + + + + + + + + +
            类型: + + <#for item : DesignTypeDao.list()> + + +
            行业: + + <#for item : Global.get(DesignIndustryCache.class).getIndustryList()> + + +
            + +
            + +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/template/templateParam.zml b/Yangcai365_design/manage/zview/template/templateParam.zml new file mode 100644 index 0000000..e269c99 --- /dev/null +++ b/Yangcai365_design/manage/zview/template/templateParam.zml @@ -0,0 +1,200 @@ + +
            +
            + + + + + + + +<#if ZmrPathRule.check(request, "/templateSizeModify.htm")> + +<#else> + + + + + + + + + +<#if Validates.isNotEmpty(paramStr)> + + + + + +<#else> + + + + + + + + + + + + + + + + + +
            产品类型:${Global.get(ProductTypeCache.class).getName(works.getDesignType())}
            设计尺寸: + + + 自定义   +  X  +  mm + +
            面数:${Global.get(PrdPageCache.class).getName(works.getPrdPageId())}
            成品尺寸:${Global.get(PrdSizeCache.class).getName(works.getPrdSizeId())}
            设计尺寸: + <#for item : strList> + checked>${item} + +
            +
            +
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/template/templateShare.zml b/Yangcai365_design/manage/zview/template/templateShare.zml new file mode 100644 index 0000000..066275a --- /dev/null +++ b/Yangcai365_design/manage/zview/template/templateShare.zml @@ -0,0 +1,73 @@ +<#def designatedPath="/allTemplate.htm"/> + + +${Styles.src("/zinc/css/design_2018102301.css")} +${Scripts.src("/zinc/js/design_2018102301.js")} +${zhiqim_manager_breadcrumb("我的模板")} +${zhiqim_manager_content()} + +<#-- 导航栏 --> +
            + +
            + + + + + + + + + + + + +
            类型:${typeId} + + <#for item : DesignTypeDao.listTemmplate()> + + +
            行业: + + <#for item : Global.get(DesignIndustryCache.class).getIndustryList()> + + +
            + +
            + +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/template/templateShow.zml b/Yangcai365_design/manage/zview/template/templateShow.zml new file mode 100644 index 0000000..4c37e04 --- /dev/null +++ b/Yangcai365_design/manage/zview/template/templateShow.zml @@ -0,0 +1,553 @@ +${Scripts.src(zhiqim_uploadlarge.js)} + + + +
            +
            +
              + <#if media.getMediaUrl().indexOf(",")==-1> +
            • + <#else> + <#for path : Arrays.toStringArray(media.getMediaUrl())> +
            • + +

            • + + +
            +
            +
            +
              +
            • + <#if media.getTemplateStatus() == 1> + <#if media.getTemplateType() = 100 && media.getTemplateStatus() == 0> + <#if media.getTemplateType() = 20 && media.getTemplateStatus() == 0> + <#if media.getTemplateType() = 10 && Validates.isEqual(media.getDesigner(), sessionUser.getOperatorCode())> + <#if ZmrPathRule.check(request, "/templateBestAudit.htm")> + <#if media.getTemplateType() = 100> + + <#elseif media.getTemplateType() = 110> + + + +
            • + <#if media.getTemplateType()!=0 && media.getTemplateType()!=80> + <#if Validates.isNotEmpty(fileTypeSet)> +
            • +

              模板下载(点击对应格式下载)

              + <#for fileType : fileTypeSet> + ${fileType.toUpperCase()} + +
            • + + +
            • + + + 浏览(${browseNum}) + 收藏(${collectNum}) +
            • +
            • +
              设计师:${media.getDesigner()}
              +
              热度:${score}
              +
            • +
            • +
              + + <#if Validates.isEmpty(media.getCreateChannel()) || "platform_design" == media.getCreateChannel()> +
              + + <#if media.getTemplateType() != 80> + <#if Validates.isEmpty(media.getCreateChannel()) || "platform_design" == media.getCreateChannel()> + <#if Validates.isEqual(media.getDesigner(), sessionUser.getOperatorCode()) || ZmrPathRule.check(request, "/templateBestAudit.htm")> +
              + + + <#if ZmrPathRule.check(request, "/templateDelete.htm")>
              + + <#if urlParam == "SHARE"> +
              + + <#if Validates.isEmpty(media.getCreateChannel()) || "out_draft" == media.getCreateChannel()> + <#if media.getTemplateType()!=0 && media.getTemplateType()!=80> +
              + + + <#if media.getTemplateType() == 80> +
              + +
              +
            • +
            • +
              + + <#if ZmrPathRule.check(request, "/templateBestAudit.htm")> + + <#elseif ZmrPathRule.check(request, "/templateAudit.htm") && media.getTemplateType() == 100> + + <#else> + <#if media.getTemplateType() lt 100> + + + + + + 行业属性 +
              +
                +
              • + ${DesignTypeDao.name(media.getTypeId())}  + ${Global.get(DesignIndustryCache.class).getIndustryName(media.getIndustryId())}  + <#for subsName : Arrays.toStringArray(media.getIndustrySubName())> + ${subsName}  + + <#for attar : Arrays.toStringArray(media.getAttributeName())> + ${attar}  + +
              • +
              +
            • +
            • +
              自定义标签
              +
              +
              + <#for keyword : DesignerPresenter.updateKeywordArr(media.getKeywordName(), "template", media.getMediaId())> + ${keyword} + +
              + + <#if ZmrPathRule.check(request, "/templateBestAudit.htm")> +
                
              + <#elseif ZmrPathRule.check(request, "/templateAudit.htm") && media.getTemplateType() == 100> +
                
              + <#else> + <#if media.getTemplateType() lt 100> +
                
              + + +
              +
            • +
            • +
              参数
              +
                +
              • 名称:${media.getMediaName()}
              • +
              • 类型:${DesignTypeDao.name(media.getTypeId())}
              • + <#if media.getTypeId()==3> +
              • P 数:${media.getPageValue()}P
              • + <#else> +
              • 面数:${media.getPageValue()}
              • + +
              • 版式:<#if oddEven == 0>横版<#elseif oddEven == 1>竖版
              • +
              • 大小(px):${media.getWidth()}X${media.getHeight()}
              • +
              • DPI:${media.getDpi()}
              • +
              • 模板ID:${media.getMediaId()}
              • +
              • 创建时间:${media.getCreateTime()}
              • +
              • 更新时间:${media.getUpdateTime()}
              • +
              +
            • +
            +
            +
            diff --git a/Yangcai365_design/manage/zview/template/userMaterialList.zml b/Yangcai365_design/manage/zview/template/userMaterialList.zml new file mode 100644 index 0000000..8f31bd6 --- /dev/null +++ b/Yangcai365_design/manage/zview/template/userMaterialList.zml @@ -0,0 +1,74 @@ +<#def designatedPath="/zhiqimMediaEditor/materialCatList.htm"/> + + +${zhiqim_manager_breadcrumb("用户素材列表")} + +
            +<#-- 导航栏 --> +
            + +
            + + + + + + + + + + + + + +<#if pageResult.size() == 0> +${zhiqim_manager_no_record (10, "暂时没有素材资源信息")} + +<#for item : pageResult.list()> +${zmr_tr_odd_bgcolor}<#else>${zmr_tr_even_bgcolor} class="z-text-center z-h60"> + + + + + + + + + + +
            选择类型分类设计师序号关键字预览图代码
            ${MaterialConstants.getMaterialTypeName(item.getTypeCode())}${Global.get(MaterialCatCache.class).getName(item.getCatCode())}${item.getDesigner()}${item.getSvgSeq()}${item.getKeywords()}
            +${zhiqim_manager_paging (pageResult, "userMaterialList.htm")} +
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/templateOrder/fillLabelInfo.zml b/Yangcai365_design/manage/zview/templateOrder/fillLabelInfo.zml new file mode 100644 index 0000000..c2995dd --- /dev/null +++ b/Yangcai365_design/manage/zview/templateOrder/fillLabelInfo.zml @@ -0,0 +1,244 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            行业关键词: + + +
            主行业: +
            +
            推荐行业: +
            +
            子行业: +
            +
            应用场景: +
            +
            设计风格: +
            +
            客户类型: +
            + <#for item : Global.get(CustomerTypeCache.class).getCustomerTypeCacheAll()> + + +
            +
            + + +<#-- 操作 --> +
            +    + +
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/templateOrder/templateOrder.zml b/Yangcai365_design/manage/zview/templateOrder/templateOrder.zml new file mode 100644 index 0000000..c6cda79 --- /dev/null +++ b/Yangcai365_design/manage/zview/templateOrder/templateOrder.zml @@ -0,0 +1,120 @@ +
            + +
            +
            +
            + <#if ZmrPathRule.check(request, "openWangWang")> + <#if ZmrPathRule.check(request, "openQQ")> +
            +
            订单号:${order.getDesignId()}
            +
            产品名:${order.getOrderText()}
            + +<#-- 客户素材 --> +
            + + + + + + + +<#for atta : attaList> + + + + +
            + +
            + +
            +
            + +
            +
            + +
            +
            +
            +
            客户素材
            ${atta.getFileName()}
            +
            + +<#-- 联系旺旺&联系QQ弹窗框 --> + +
            + + +
            +
            +
            + <#for key : svgMap.keySet()> + <#var item = svgMap.get(key)/> +
            +
            + <#for bg : item.getBgList()> + <#if bg_index lt 2> + ${bg.getSvgCode()} + + + <#if mediaId != item.getMediaId()> + <#if bg_index == 0> + 复制正面 + + <#if bg_index == 1> + 复制反面 + + + +
            + <#if mediaId != item.getMediaId()> + + 编辑 + 删除 + + +
            + +
            +
            +
            + +
            +
            + + + diff --git a/Yangcai365_design/manage/zview/templateOrder/templateOrderLabel.zml b/Yangcai365_design/manage/zview/templateOrder/templateOrderLabel.zml new file mode 100644 index 0000000..8096898 --- /dev/null +++ b/Yangcai365_design/manage/zview/templateOrder/templateOrderLabel.zml @@ -0,0 +1,65 @@ + + + +
            +

            客户类型

            +
            + <#for item : Global.get(CustomerTypeCache.class).getCustomerTypeCacheAll()> + + +
            +
            +
            +

            行业关键词

            +
            + +
            +
            +
            +

            主行业

            +
            +
            +
            +

            推荐行业

            +
            +
            +
            +

            子行业

            +
            +
            +
            +

            应用场景

            +
            +
            +
            +

            设计风格

            +
            +
            +
            + + +
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/works/allWorks.zml b/Yangcai365_design/manage/zview/works/allWorks.zml new file mode 100644 index 0000000..ed07838 --- /dev/null +++ b/Yangcai365_design/manage/zview/works/allWorks.zml @@ -0,0 +1,94 @@ + + +${Styles.src("/zinc/css/design_2018102301.css")} +${Scripts.src("/zinc/js/works_20171030.js")} +${Scripts.src("/zinc/js/zhiqim_search_auto_list.js")} +${zhiqim_manager_breadcrumb_parent("/worksMy.htm", "我的作品", "所有作品")} +${zhiqim_manager_content()} + +<#-- 导航栏 --> +
            + +
            + +<#-- 关键词搜索 --> +
            + + + + + + + +
            + + + + + + + + + + +
            类型: + + <#for item : prdList> + + +
            行业: + + <#for item : indList> + + +
            + +
            + +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/works/bestWorks.zml b/Yangcai365_design/manage/zview/works/bestWorks.zml new file mode 100644 index 0000000..e151680 --- /dev/null +++ b/Yangcai365_design/manage/zview/works/bestWorks.zml @@ -0,0 +1,127 @@ + + +${Styles.src("/zinc/css/design_2018102301.css")} +${Scripts.src("/zinc/js/works_20171030.js")} +${Scripts.src("/zinc/js/zhiqim_search_auto_list.js")} +${zhiqim_manager_breadcrumb_parent("/worksMy.htm", "我的作品", "精品作品")} +${zhiqim_manager_content()} + +<#-- 导航栏 --> +
            + +
            + +<#-- 关键词搜索 --> +
            + + + +
            + + + + + + + + + + +
            类型: + + <#for item : prdList> + + +
            行业: + + <#for item : indList> + + +
            + +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/works/groupWorks.zml b/Yangcai365_design/manage/zview/works/groupWorks.zml new file mode 100644 index 0000000..d7aab54 --- /dev/null +++ b/Yangcai365_design/manage/zview/works/groupWorks.zml @@ -0,0 +1,81 @@ + + +${Styles.src("/zinc/css/design_2018102301.css")} +${Scripts.src("/zinc/js/works_20171030.js")} +${Scripts.src("/zinc/js/zhiqim_search_auto_list.js")} +${zhiqim_manager_breadcrumb_parent("/worksMy.htm", "我的作品", "小组作品")} +${zhiqim_manager_content()} + +<#-- 导航栏 --> +
            + +
            + +<#-- 关键词搜索 --> +
            + + + +
            + + + + + + + + + + +
            类型: + + <#for item : prdList> + + +
            行业: + + <#for item : indList> + + +
            + +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/works/labelRelation.zml b/Yangcai365_design/manage/zview/works/labelRelation.zml new file mode 100644 index 0000000..3e3ef7f --- /dev/null +++ b/Yangcai365_design/manage/zview/works/labelRelation.zml @@ -0,0 +1,209 @@ + + +
            +${zhiqim_manager_title("关联标签行业")} + + + + + + + + + + + + + +
            产品类型: ${Global.get(ProductTypeCache.class).getName(works.getPrdTypeId())}
            标签行业:  
            标签子行业: + <#for item : inSubList> + + +

            +${zhiqim_manager_title("关联标签属性")} +
            + +<#for item : attrCatList> + + + + + +
            ${item.getAttributeCatName()}: + <#for aitem : map.get(item.getAttributeCatId())> + + +
            +
            +
            + + +
            +
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/works/materialCatAdd.zml b/Yangcai365_design/manage/zview/works/materialCatAdd.zml new file mode 100644 index 0000000..44c6f55 --- /dev/null +++ b/Yangcai365_design/manage/zview/works/materialCatAdd.zml @@ -0,0 +1,38 @@ +<#def designatedPath="/works/materialCatList.htm"/> +${request.getValidateScript()} +${zhiqim_manager_history ("/works/materialCatList.htm")} + +${zhiqim_manager_breadcrumb_parent ("/works/materialCatList.htm", "分类管理", "增加分类")} + +
            +${zhiqim_manager_title ("增加分类")} + +
            + + + + + + + + + + + + + +
            分类名称: + + *
            状态: + +
            序号: + + *
            +${zhiqim_manager_submit()} +
            +
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/works/materialCatList.zml b/Yangcai365_design/manage/zview/works/materialCatList.zml new file mode 100644 index 0000000..210a4e9 --- /dev/null +++ b/Yangcai365_design/manage/zview/works/materialCatList.zml @@ -0,0 +1,42 @@ +<#def designatedPath="/works/materialCatList.htm"/> +${zhiqim_manager_breadcrumb ("分类管理")} + +
            +<#-- 导航栏 --> +
            + +
            + + + + + + + + + +<#if result.size() == 0> +${zhiqim_manager_no_record(5, "暂时没有分类信息")} + +<#for item : result> +${zmr_tr_odd_bgcolor}<#else>${zmr_tr_even_bgcolor} class="z-text-center z-h60"> + + + + + + + +
            选择分类编码名称状态序号
            ${item.getCatId()}${item.getCatName()}<#if item.getCatStatus() == 0>正常<#else>停用${item.getCatSeq()}
            +${zhiqim_manager_list(result.size())} +
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/works/materialCatModify.zml b/Yangcai365_design/manage/zview/works/materialCatModify.zml new file mode 100644 index 0000000..679c6f8 --- /dev/null +++ b/Yangcai365_design/manage/zview/works/materialCatModify.zml @@ -0,0 +1,41 @@ +<#def designatedPath="/works/materialCatList.htm"/> +${request.getValidateScript()} +${zhiqim_manager_history ("/works/materialCatList.htm")} + +${zhiqim_manager_breadcrumb_parent ("/works/materialCatList.htm", "分类管理", "修改分类")} + +
            +${zhiqim_manager_title ("修改分类")} + +
            + + + + + + + + + + + + + + + + + + +
            分类编号:${item.getCatId()}
            状态: + +
            分类名称: + + *
            序号: + + *
            +${zhiqim_manager_submit()} +
            +
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/works/materialContAdd.zml b/Yangcai365_design/manage/zview/works/materialContAdd.zml new file mode 100644 index 0000000..f81bcd7 --- /dev/null +++ b/Yangcai365_design/manage/zview/works/materialContAdd.zml @@ -0,0 +1,140 @@ +${request.getValidateScript()} +${Scripts.src(zhiqim_uploadlarge.js)} + +
            + + + + + + + + + + + + + + + + + + + + + + +
            素材分类: + +  *
            素材状态: + +  *
            关键字(多个可空格分隔):
            选择素材(上传cdr时,请上传效果图): + +  *
            选择效果图: + +
            +
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/works/materialContList.zml b/Yangcai365_design/manage/zview/works/materialContList.zml new file mode 100644 index 0000000..5bdfca1 --- /dev/null +++ b/Yangcai365_design/manage/zview/works/materialContList.zml @@ -0,0 +1,127 @@ +<#def designatedPath="/works/materialCatList.htm"/> + + +${zhiqim_manager_breadcrumb("素材列表")} + +
            +<#-- 导航栏 --> +
            + +
            + + + + + + + + + + + + + +<#if pageResult.size() == 0> +${zhiqim_manager_no_record (10, "暂时没有素材信息")} + +<#for item : pageResult.list()> +${zmr_tr_odd_bgcolor}<#else>${zmr_tr_even_bgcolor} class="z-text-center z-h60"> + + + + + + + + + + +
            选择分类状态序号关键字文件格式预览图操作
            ${Global.get(DesMaterialCatCache.class).name(item.getCatId())} + ${item.getMaterialSuffix()}<#if Validates.isNotEmpty(item.getThumbUrl())>
            +${zhiqim_manager_paging (pageResult, "/works/materialContList.htm")} +
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/works/materialContModify.zml b/Yangcai365_design/manage/zview/works/materialContModify.zml new file mode 100644 index 0000000..b1e6c73 --- /dev/null +++ b/Yangcai365_design/manage/zview/works/materialContModify.zml @@ -0,0 +1,40 @@ +<#def designatedPath="/works/materialCatList.htm"/> +${request.getValidateScript()} + +${zhiqim_manager_history ("/works/materialContList.htm")} + +${zhiqim_manager_breadcrumb_parent ("/works/materialContList.htm", "素材管理", "修改素材")} + +
            +${zhiqim_manager_title ("修改素材")} + +
            + + + + + + + + + + + + + + +
            素材状态: + +  *
            关键字(多个可空格分隔): + +  *
            序号: + +
            +${zhiqim_manager_submit()} +
            +
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/works/pcWorks.zml b/Yangcai365_design/manage/zview/works/pcWorks.zml new file mode 100644 index 0000000..f2a1280 --- /dev/null +++ b/Yangcai365_design/manage/zview/works/pcWorks.zml @@ -0,0 +1,128 @@ + + + + 扬彩设计模板库 + + + + + + + + + + + + +
            +
            + + + +${Styles.src("/zinc/css/design_2018102301.css")} +${Scripts.src("/zinc/js/works_20171030.js")} +${Scripts.src("/zinc/js/zhiqim_search_auto_list.js")} +
            +<#-- 关键词搜索 --> +
            + + + +
            + + + + + + + + + + + + + + + + + + + + + +
            类型: + + <#for item : DesignTypeDao.listTemmplate()> + + +
            所属行业: + + <#for item : indList> + + +
            排序: + + + + + +
            + +
            +
            + +
            +
            + + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/works/presenter/pcWorksInfo.zml b/Yangcai365_design/manage/zview/works/presenter/pcWorksInfo.zml new file mode 100644 index 0000000..a4a6d32 --- /dev/null +++ b/Yangcai365_design/manage/zview/works/presenter/pcWorksInfo.zml @@ -0,0 +1,39 @@ +
            +<#if pageResult.total()!= 0> +<#for item : pageResult.list()> +
            +
            + <#for path : Arrays.toStringArray(item.getMediaUrl())> + <#if path_index lt 1> + + + + +
            +
            +
            +

            ${item.getWidthMm()}X${item.getHeightMm()}mm

              +

            <#if item.getOddEven()=0>横版<#elseif item.getOddEven()=1>竖版

            +

            <#if item.getTypeId()=3>P数:<#else>面数:${item.getPageValue()}


            +
            +
            +
            +

            ID:${item.getMediaId()}

            +

            复制ID

            +
            +
            +
            + +
            +
            + + + + +
            ${PagingGo.toHtmlClick(pageResult, "doWorksSearch")}
            +
            +<#else> +
            + 无作品数据 +
            + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/works/presenter/pcWorksSearchInfo.zml b/Yangcai365_design/manage/zview/works/presenter/pcWorksSearchInfo.zml new file mode 100644 index 0000000..b62e743 --- /dev/null +++ b/Yangcai365_design/manage/zview/works/presenter/pcWorksSearchInfo.zml @@ -0,0 +1,33 @@ +
            +<#if pageResult.total()!= 0> +<#for item : pageResult.list()> +
            +
            + <#for path : Arrays.toStringArray(item.getThumbImagePath())> + <#if path_index lt 1> + + + +
            + + ID:${item.getWorksId()} +
            + +
            +
            + + + + +
            ${PagingGo.toHtmlClick(pageResult, "Works.doSearchAjaxForPC")}
            +
            + + + + +<#else> +
            + 无作品数据 +
            + + diff --git a/Yangcai365_design/manage/zview/works/presenter/worksInfo.zml b/Yangcai365_design/manage/zview/works/presenter/worksInfo.zml new file mode 100644 index 0000000..e3697ea --- /dev/null +++ b/Yangcai365_design/manage/zview/works/presenter/worksInfo.zml @@ -0,0 +1,41 @@ +
            +<#if pageResult.total()!= 0> +<#for item : pageResult.list()> +
            +
            + <#for path : Arrays.toStringArray(item.getThumbImagePath())> + <#if path_index lt 1> + + + + <#if item.getWorksType() == 3> + ${item.getTemplateId()} + + <#if Validates.isEqual(param, "AUDIT")> + + + + + +
            + ID:${item.getWorksId()} +
            + +
            +<#if Validates.isEqual(apple, "BEST")> + +
            +
            设计模板
            +
            取消选择
            + +
            + + +
            + + + + +
            ${PagingGo.toHtmlClick(pageResult, "doWorksSearch")}
            +
            + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/works/presenter/worksSearchInfo.zml b/Yangcai365_design/manage/zview/works/presenter/worksSearchInfo.zml new file mode 100644 index 0000000..ca0d145 --- /dev/null +++ b/Yangcai365_design/manage/zview/works/presenter/worksSearchInfo.zml @@ -0,0 +1,40 @@ +
            +<#if pageResult.total()!= 0> +<#for item : pageResult.list()> +
            +
            + <#for path : Arrays.toStringArray(item.getThumbImagePath())> + <#if path_index lt 1> + + + + <#if item.getWorksType() == 3> + ${item.getTemplateId()} + +
            + ID:${item.getWorksId()} +
            + +
            +<#if Validates.isEqual(urlParam, "BEST")> + +
            +
            设计模板
            +
            取消选择
            + +
            + + +
            + + + + +
            ${PagingGo.toHtmlClick(pageResult, "Works.doSearchAjax")}
            +
            + + + + + + diff --git a/Yangcai365_design/manage/zview/works/worksAudit.zml b/Yangcai365_design/manage/zview/works/worksAudit.zml new file mode 100644 index 0000000..4d1eda0 --- /dev/null +++ b/Yangcai365_design/manage/zview/works/worksAudit.zml @@ -0,0 +1,108 @@ + + +${Styles.src("/zinc/css/design_2018102301.css")} +${Scripts.src("/zinc/js/works_20171030.js")} +${Scripts.src("/zinc/js/zhiqim_search_auto_list.js")} +${zhiqim_manager_breadcrumb("精品审核")} +${zhiqim_manager_content()} + + +<#-- 导航栏 --> +
            + +
            + +<#-- 关键词搜索 --> +
            + + + +
            + + + + + + + + + + +
            类型: + <#for item : prdList> + + +
            行业: + <#for item : indList> + + +
            + +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/works/worksBest.zml b/Yangcai365_design/manage/zview/works/worksBest.zml new file mode 100644 index 0000000..0bcd565 --- /dev/null +++ b/Yangcai365_design/manage/zview/works/worksBest.zml @@ -0,0 +1,81 @@ + + +${Styles.src("/zinc/css/design_2018102301.css")} +${Scripts.src("/zinc/js/works_20171030.js")} +${Scripts.src("/zinc/js/zhiqim_search_auto_list.js")} +${zhiqim_manager_breadcrumb_parent("/worksMy.htm", "我的作品", "我的精品")} +${zhiqim_manager_content()} + +<#-- 导航栏 --> +
            + +
            + +<#-- 关键词搜索 --> +
            + + + +
            + + + + + + + + + + +
            类型: + + <#for item : prdList> + + +
            行业: + + <#for item : indList> + + +
            + +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/works/worksCollect.zml b/Yangcai365_design/manage/zview/works/worksCollect.zml new file mode 100644 index 0000000..dc45502 --- /dev/null +++ b/Yangcai365_design/manage/zview/works/worksCollect.zml @@ -0,0 +1,83 @@ + + +${Styles.src("/zinc/css/design_2018102301.css")} +${Scripts.src("/zinc/js/works_20171030.js")} +${Scripts.src("/zinc/js/zhiqim_search_auto_list.js")} +${zhiqim_manager_breadcrumb_parent("/worksMy.htm", "我的作品", "我收藏的")} +${zhiqim_manager_content()} + +<#-- 导航栏 --> +
            + +
            + +<#-- 关键词搜索 --> +
            + + + +
            + + + + + + + + + + +
            类型: + + <#for item : prdList> + + +
            行业: + + <#for item : indList> + + +
            + +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/works/worksList.zml b/Yangcai365_design/manage/zview/works/worksList.zml new file mode 100644 index 0000000..00eda02 --- /dev/null +++ b/Yangcai365_design/manage/zview/works/worksList.zml @@ -0,0 +1,81 @@ +${zhiqim_manager_breadcrumb("作品列表")} +${zhiqim_manager_content()} +${Scripts.src("/zinc/js/works_20171030.js")} + +<#-- 导航栏 --> +
            + +
            + +
            + + + + + + + + + +
            作品类型: + + 产品类型: + + 行业名称: + +
            +

            + + + + + + + + + + +<#if pageResult.total() == 0> + ${zhiqim_manager_no_record(3 "暂时没有作品列表信息")} + +<#for item : pageResult.list()> + + + + + + + +
             作品列表
            缩略图关联标签关联关键词操作
            + <#for path : Arrays.toStringArray(item.getThumbImagePath())> + <#if path_index lt 1> + + ${LabelPresenter.doWorksLabelName(item.getWorksId())}${item.getKeywordName()}
            +${zhiqim_manager_paging(pageResult, "/worksList.htm")} +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/works/worksMy.zml b/Yangcai365_design/manage/zview/works/worksMy.zml new file mode 100644 index 0000000..057090e --- /dev/null +++ b/Yangcai365_design/manage/zview/works/worksMy.zml @@ -0,0 +1,94 @@ + + +${Styles.src("/zinc/css/design_2018102301.css")} +${Scripts.src("/zinc/js/works_20171030.js")} +${Scripts.src("/zinc/js/zhiqim_search_auto_list.js")} +${zhiqim_manager_breadcrumb("我的作品")} +${zhiqim_manager_content()} + +<#-- 导航栏 --> +
            + +
            + +<#-- 关键词搜索 --> +
            + + + +
            + + + + + + + + + + +
            类型: + + <#for item : prdList> + + +
            行业: + + <#for item : indList> + + +
            + +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/works/worksShare.zml b/Yangcai365_design/manage/zview/works/worksShare.zml new file mode 100644 index 0000000..64a9b56 --- /dev/null +++ b/Yangcai365_design/manage/zview/works/worksShare.zml @@ -0,0 +1,82 @@ + + +${Styles.src("/zinc/css/design_2018102301.css")} +${Scripts.src("/zinc/js/works_20171030.js")} +${Scripts.src("/zinc/js/zhiqim_search_auto_list.js")} +${zhiqim_manager_breadcrumb_parent("/worksMy.htm", "我的作品", "分享给我的")} +${zhiqim_manager_content()} + +<#-- 导航栏 --> +
            + +
            + +<#-- 关键词搜索 --> +
            + + + +
            + + + + + + + + + + +
            类型: + + <#for item : prdList> + + +
            行业: + + <#for item : indList> + + +
            + +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/works/worksShow.zml b/Yangcai365_design/manage/zview/works/worksShow.zml new file mode 100644 index 0000000..1b57d0d --- /dev/null +++ b/Yangcai365_design/manage/zview/works/worksShow.zml @@ -0,0 +1,303 @@ + + + +
            +
            +
              + <#for path : Arrays.toStringArray(works.getThumbImagePath())> +
            • + +
            +
            +
            +
              +
            • ID:${works.getWorksId()}
            • +
            • 创建时间:${works.getCreateTime()}
            • +
            • <#if works.getWorksName() != null>名称:${works.getWorksName()} | 设计师:${works.getDesigner()}
            • +
            • + 浏览(${browseNum}) + 收藏(${collectNum}) +
            • +
            • +
              + <#if works.getWorksType() == 0> + <#if works.getWorksType() == 1> + <#if works.getWorksType() == 2> +
              +
              +
            • +
            • +
              + + <#if ZmrPathRule.check(request, "/labelRelation.htm")> + + 行业属性 +
              +
                +
              • + ${Global.get(ProductTypeCache.class).getName(works.getPrdTypeId())}   + ${Global.get(DesignIndustryCache.class).getIndustryName(works.getIndustryId())}   + ${works.getIndustrySubName()}   + ${works.getAttributeName()}   +
              • +
              +
            • +
            • +
              关键词
              +
              +
              + <#for keyword : DesignerPresenter.updateKeywordArr(works.getKeywordName(), "work", works.getWorksId())> + ${keyword} + +
              +
              +
              +
            • + + <#if ZmrPathRule.check(request, "doWorksDelete")> +
            • +
              作品操作
              +
              + + +
              +
            • + + +
            +
            +
            diff --git a/Yangcai365_design/manage/zview/works/worksShowPC.zml b/Yangcai365_design/manage/zview/works/worksShowPC.zml new file mode 100644 index 0000000..3e907ec --- /dev/null +++ b/Yangcai365_design/manage/zview/works/worksShowPC.zml @@ -0,0 +1,116 @@ + + + +
            +
            +
              + <#if media.getMediaUrl().indexOf(",")==-1> +
            • + <#else> + <#for path : Arrays.toStringArray(media.getMediaUrl())> +
            • + +

            • + + +
            +
            +
            +
              + + <#if media.getTypeId()!=3> +
            • + ID:${media.getMediaId()} + + + +
            • + <#else> +
            • +
              名称:${media.getMediaName()}

              + ID:${media.getMediaId()} + + +

              +
              P 数:${media.getPageValue()}P

              +
              版式:<#if media.getOddEven()=0>横版<#elseif media.getOddEven()=1>竖版${media.getWidthMm()}X${media.getHeightMm()}mm
              +
            • + +
            • 创建时间:${media.getCreateTime()}
            • +
            • +
              + 行业属性 +
              +
                +
              • + ${Global.get(ProductTypeCache.class).getName(media.getTypeId())}   + ${Global.get(DesignIndustryCache.class).getIndustryName(media.getIndustryId())}   + ${media.getIndustrySubName()}   + ${media.getAttributeName()}   +
              • +
              +
            • +
            • +
              关键词
              +
              +
              + <#for keyword : DesignerPresenter.updateKeywordArr(media.getKeywordName(), "work", media.getMediaId())> + ${keyword} + +
              +
              +
            • +
            +
            +
            diff --git a/Yangcai365_design/manage/zview/works/worksUpload.zml b/Yangcai365_design/manage/zview/works/worksUpload.zml new file mode 100644 index 0000000..0567f7f --- /dev/null +++ b/Yangcai365_design/manage/zview/works/worksUpload.zml @@ -0,0 +1,279 @@ +${Scripts.src(zhiqim_uploadlarge.js)} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            作品类型选择: + +
            作品行业选择: + <#for item : indList> + + +
            子行业选择: + <#for item : inSubList> + + +
            作品名称: + +
            作品关键字: +   用于作品搜索,多组关键字用空格隔开 +
            设计文件上传(默认不断点续传):  必须是cdr文件
            印刷文件上传(默认不断点续传):  必须是pdf文件
            \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/zhiqim_manager/attaFileMaterials.zml b/Yangcai365_design/manage/zview/zhiqim_manager/attaFileMaterials.zml new file mode 100644 index 0000000..47f63c7 --- /dev/null +++ b/Yangcai365_design/manage/zview/zhiqim_manager/attaFileMaterials.zml @@ -0,0 +1,406 @@ +${Styles.htmlOverflowYAuto()} +${Scripts.src(zhiqim_uploadlarge.js)} + +${Htmls.toCallFrame()} + + +<#for item : attaList> +<#if item.getId() == "copy"> + + + + + + <#if Validates.isNotEmpty(order)> + + <#else> + + + + +<#if item.getId() == "userText"> + + + + + + + + +<#if item.getType() == "file"> + + + + + + + + + +<#if item.getType() == "thumFile"> + + + + + + + + +<#if item.getType() == "firstThumFile"> + + + + + + + + +<#if item.getId() == "userNotice"> + + + + + + + + + + + + + + + + + +
            产品信息: + + + + +
            ${order.getDesignId()}-${order.getBuyerNick()}-${order.getOrderText()}
            客户文本:
            + +
            + ${item.getName()} + + <#if item.getId() == "EndFile" && endFileLink != null> + + + + + +
            +
            z-h100<#elseif item.getName()=="印刷文件">z-h50<#else>z-h60"> + <#for atta : fileList> + <#if Validates.isEqual(atta.getAttaModul(), item.getId())> +
            showThumImg('${atta.getAttaId()}', '${atta.getFileType()}')" title="${atta.getFileName()}"> + ${atta.getFileName()}
            +
            + + +
            +
            ${item.getName()}:
            +
            <#if Validates.isNotEmpty(item.getSavePath())>
            +
            ${item.getName()}:
            + <#if order != null> +
            + +
            注意事项:
            + +
            客服留言:
            + +
            diff --git a/Yangcai365_design/manage/zview/zhiqim_manager/backLogWork.zml b/Yangcai365_design/manage/zview/zhiqim_manager/backLogWork.zml new file mode 100644 index 0000000..efc10f5 --- /dev/null +++ b/Yangcai365_design/manage/zview/zhiqim_manager/backLogWork.zml @@ -0,0 +1,237 @@ +${Scripts.src("/zinc/js/global_2019010801.js")} + + +${zhiqim_manager_breadcrumb("待办事项")} +${zhiqim_manager_content()} +<#-- 导航栏 --> +
            + +
            + + + +<#-- 左侧功能 --> +
            + <#-- 查询条件 --> + ${zhiqim_manager_title("查询条件")} +
            + + + + + + + + + + + + + + + + +
            订单号:旺 旺 号: + 发出时间: -  + +
            + 接收人:  + + 处理状态: + + 催稿主题: +
            催稿号:
            +
            + + <#-- 操作功能 --> +
            + + + <#if ZmrPathRule.check(request, "/assignDesigner.htm")> + +
            + + <#-- 列表--> +
            + + + + + + + + + + + + + + + + + ${zhiqim_manager_tr_no_record(pageResult, 20, "暂时没有催稿信息")} + <#for item : pageResult.list()> + + + style="color:#AAAAAA"> + + + + + + + + + + + + + + + +
            选择催稿单号订单号旺旺号主题发送者发送时间消息内容接收者订单状态处理状态处理时间备注
            ${item.getId()}
            ${item.getDesignId()}
            + <#if ordMap.get(item.getDesignId()).getReDesignSrcId() gt 0> + <#if ordMap.get(item.getDesignId()).isUrgent()> + <#if ordMap.get(item.getDesignId()).isHighQualityOrder()> + <#if ordMap.get(item.getDesignId()).getIsOldUser() gt 0> + <#if !(ordMap.get(item.getDesignId()).getAmount() lt 30000)> + <#if ordMap.get(item.getDesignId()).getShowRedMark() == 1> +
            ${item.getBuyerNick()}${MessageThemeConstants.getName(item.getTopic())}${item.getProductionCode()}${Sqls.toDateTimeString(item.getProductionTime())}${item.getMessageBody()}${item.getConsumerCode()}${StatusConstants.getStatus(ordMap.get(item.getDesignId()).getStatus())} + <#if item.getConsumerState() == 0> + 未处理 + <#elseif item.getConsumerState() == 1> + 已处理 + <#else> + ${Sqls.toDateTimeString(item.getConsumerTime())}${item.getRemark()}
            +
            + ${zhiqim_manager_paging(pageResult, "/manager/backLogWork.htm")} +
            +${zhiqim_manager_content_end()} + +<#-- 联系旺旺&联系QQ弹窗框 --> + \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/zhiqim_manager/main.zml b/Yangcai365_design/manage/zview/zhiqim_manager/main.zml new file mode 100644 index 0000000..eec7acb --- /dev/null +++ b/Yangcai365_design/manage/zview/zhiqim_manager/main.zml @@ -0,0 +1,812 @@ + +${zhiqim_manager_content()} + + + + + + + + + + + + + + +
            + +
            +
            +
            +
            当前等级  
            +
            当前积分  积分明细
            +
            +
            当前平台排名
            +
            本月定稿率
            +
            本月退款率
            +
            +
            +
            订单概述
            +
            +
            +
            + 今日接单量 +
            +
            + 今日接单数量 + + +
            +
            +
            +
            + 今日定稿量 +
            +
            + 今日定稿数量 + + +
            +
            +
            +
            + 今日退款量 +
            +
            + 今日退款数量 + + +
            +
            +
            +
            + 今日总金额 +
            +
            + 今日总金额 + + +
            +
            +
            +
            + 本月接单量 +
            +
            + 本月接单数量 + + +
            +
            +
            +
            + 本月定稿量 +
            +
            + 本月定稿数量 + + +
            +
            +
            +
            + 本月退款量 +
            +
            + 本月退款数量 + + +
            +
            +
            +
            + 本月总金额 +
            +
            + 本月总金额 + + +
            +
            +
            +
            + 上月接单量 +
            +
            + 上月接单数量 + + +
            +
            +
            +
            + 上月定稿量 +
            +
            + 上月定稿数量 + + +
            +
            +
            +
            + 上月退款量 +
            +
            + 上月退款数量 + + +
            +
            +
            +
            + 上月总金额 +
            +
            + 上月总金额 + + +
            +
            +
            +
            +
            +
            未完成订单
            +
            +
            +
            + 24小时内未完成 +
            +
            + 未完成订单数 + + +
            +
            +
            +
            + 24-48小时未完成 +
            +
            + 未完成订单数 + + +
            +
            +
            +
            + 48小时以上未完成 +
            +
            + 未完成订单数 + + +
            +
            +
            +
            + 即将到手金额 +
            +
            + 未完成订单金额 + + +
            +
            +
            +
            +
            +
            +
            +
            +
            +
            最新公告栏
            + + 历史公告 + + +
            +
            +
            +
            +
            +
            待办事项
            + + 其他待办 + + +
            +
            +
            + +
            +
            账户中心 +
            +
            +
            +
            +

            余额(元)

            +
            +
            +
            收支明细
            +
            +
            +
            +

            待结算金额(元) + +

            +
            +
            +
            +

            已结算金额(元)

            +
            +
            +
            +
            +
            +
            +
            +
            + + +${zhiqim_manager_content_end()} diff --git a/Yangcai365_design/manage/zview/zhiqim_manager/notice.zml b/Yangcai365_design/manage/zview/zhiqim_manager/notice.zml new file mode 100644 index 0000000..4d51616 --- /dev/null +++ b/Yangcai365_design/manage/zview/zhiqim_manager/notice.zml @@ -0,0 +1,25 @@ +${zhiqim_manager_breadcrumb("公告列表")} +${zhiqim_manager_content()} +${sweet_alert_reuse_method()} +<#-- 列表 --> + + + + + + +<#for item : result.list()> + + + + + + +${zhiqim_manager_tr_no_record(result, 10, "暂时没有公告")} +
            公告标题公告内容发布时间
            #{item.getNoticeTitle()}#{item.getNoticeContent()}#{Sqls.toDateTimeString(item.getReleaseTime())}
            + + + + +
            ${PagingGo.toHtmlLink(result)}
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/zhiqim_manager/operatorModify.zml b/Yangcai365_design/manage/zview/zhiqim_manager/operatorModify.zml new file mode 100644 index 0000000..3db2070 --- /dev/null +++ b/Yangcai365_design/manage/zview/zhiqim_manager/operatorModify.zml @@ -0,0 +1,136 @@ +${zhiqim_manager_history("operator.htm")} +${request.getValidateScript()} + + + +${zhiqim_manager_breadcrumb_parent("operator.htm" "操作员管理" "修改操作员")} +${zhiqim_manager_content()} + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<#if ZmrSuperAdminRule.check(request)> + + + + +<#else> + + + + + +
            修改操作员
            操作员编码:${operator.getOperatorCode()}
            操作员名称:(64位不定长字符) *
            操作员密码:(为空表示不修改,如果修改请输入6-16位密码,大小写字母数字特殊字符必须四选三,特殊字符支持._-`~!@#$%  
            操作员状态:(停用或正常) + +  * +
            操作员手机号: *
            操作员个人微信号: *
            操作员类型:(管理员或操作员) + +  * +
            操作员类型: + + <#if operator.getOperatorType()=2>操作员 + <#if operator.getOperatorType()=1>管理员 + <#if operator.getOperatorType()=0>超级管理员 +
            + + + + + +
            返回上一页
            +
            +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/manage/zview/zhiqim_manager/reg.zml b/Yangcai365_design/manage/zview/zhiqim_manager/reg.zml new file mode 100644 index 0000000..16ff434 --- /dev/null +++ b/Yangcai365_design/manage/zview/zhiqim_manager/reg.zml @@ -0,0 +1,229 @@ +${Styles.src(zhiqim.css)} +${Scripts.src(zhiqim.js)} + + + +
            +
            欢迎注册 [ ${context.getContextName()} ]!
            + + +
            + + + +
            +
            设计师注册协议x
            +
            +

            一、总则

            +

            1.1 秒绘设计平台网站的所有权和运营权归湖南秒绘科技有限公司所有。

            +

            1.2 用户在注册之前,应当仔细阅读本协议,并同意遵守本协议后方可成为注册用户。一旦注册成功,则用户与秒绘设计平台网站两者之间自动形成协议关系,用户应当受本协议的约束。用户在使用特殊的服务或产品时,应当同意接受相关协议后方能使用。

            +

            1.3 本协议则可由秒绘设计平台网站随时更新,用户应当及时关注并同意本站不承担通知义务。本站的通知、公告、声明或其它类似内容是本协议的一部分。

            +

            二、服务内容

            +

            2.1 秒绘设计平台网站的具体内容由本站根据实际情况提供。

            +

            2.2 本站仅提供相关的技术服务。

            +

            三、用户帐号

            +

            3.1 经本站注册系统完成注册程序并通过身份认证的用户即成为正式用户,可以获得本站规定用户所应享有的一切权限;秒绘设计平台网站有权对用户的权限设计进行变更。

            +

            3.2 用户只能按照注册要求注册。用户有义务保证密码和帐号的安全,用户利用该密码和帐号所进行的一切活动引起的任何损失或损害,由用户自行承担全部责任,本站不承担任何责任。如用户发现帐号遭到未授权的使用或发生其他任何安全问题,应立即修改帐号密码并妥善保管,如有必要,请通知本站。因黑客行为或用户的保管疏忽导致帐号非法使用,本站不承担任何责任。

            +

            四、使用规则

            +

            4.1 4.1 遵守中华人民共和国相关法律法规,包括但不限于《中华人民共和国计算机信息系统安全保护条例》、《计算机软件保护条例》、《最高人民法院关于审理涉及计算机网络著作权纠纷案件适用法律若干问题的解释(法释[2004]1号)》、《全国人大常委会关于维护互联网安全的决定》、《互联网电子公告服务管理规定》、《互联网新闻信息服务管理规定》、《互联网著作权行政保护办法》和《信息网络传播权保护条例》等有关计算机互联网规定和知识产权的法律和法规、实施办法。

            +

            4.2 用户对其自行发表、上传或传送的内容负全部责任,所有用户不得在本站任何页面发布、转载、传送含有下列内容之一的信息,否则本站有权自行处理并不通知用户: (1)违反宪法确定的基本原则的; (2)危害国家安全,泄漏国家机密,颠覆国家政权,破坏国家统一的; (3)损害国家荣誉和利益的; (4)煽动民族仇恨、民族歧视,破坏民族团结的; (5)破坏国家宗教政策,宣扬邪教和封建迷信的; (6)散布谣言,扰乱社会秩序,破坏社会稳定的; (7)散布淫秽、色情、赌博、暴力、恐怖或者教唆犯罪的; (8)侮辱或者诽谤他人,侵害他人合法权益的; (9)煽动非法集会、结社、游行、示威、聚众扰乱社会秩序的; (10)以非法民间组织名义活动的; (11)含有法律、行政法规禁止的其他内容的。

            +

            4.3用户承诺对其发表或者上传于本站的所有信息(即属于《中华人民共和国著作权法》规定的作品,包括但不限于文字、图片、音乐、电影、表演和录音录像制品和电脑程序等)均享有完整的知识产权,或者已经得到相关权利人的合法授权;如用户违反本条规定造成本站被第三人索赔的,用户应全额补偿本站一切费用(包括但不限于各种赔偿费、诉讼代理费及为此支出的其它合理费用);

            +

            4.4当第三方认为用户发表或者上传于本站的信息侵犯其权利,并根据《信息网络传播权保护条例》或者相关法律规定向本站发送权利通知书时,用户同意本站可以自行判断决定删除涉嫌侵权信息,除非用户提交书面证据材料排除侵权的可能性,本站将不会自动恢复上述删除的信息; (1)不得为任何非法目的而使用网络服务系统; (2)遵守所有与网络服务有关的网络协议、规定和程序; (3)不得利用本站进行任何可能对互联网的正常运转造成不利影响的行为; (4)不得利用本站进行任何不利于本站的行为。

            +

            4.5如用户在使用本站时违反上述任何规定,本站有权要求用户改正或直接采取一切必要的措施(包括但不限于删除用户张贴的内容、暂停或终止用户使用本站的权利)以减轻用户不当行为而造成的影响。

            +

            五、隐私保护

            +

            5.1 本站不对外公开或向第三方提供单个用户的注册资料及用户在使用网络服务时存储在本站的非公开内容,但下列情况除外: (1)事先获得用户的明确授权; (2)根据有关的法律法规要求; (3)按照相关政府主管部门的要求; (4)为维护社会公众的利益。

            +

            5.2 本站可能会与第三方合作向用户提供相关的网络服务,在此情况下,如该第三方同意承担与本站同等的保护用户隐私的责任,则本站有权将用户的注册资料等提供给该第三方。

            +

            5.3 在不透露单个用户隐私资料的前提下,本站有权对整个用户数据库进行分析并对用户数据库进行商业上的利用。

            +

            六、版权声明

            +

            6.1 本站的文字、图片、音频、视频等版权均归湖南秒绘科技有限公司享有或与作者共同享有,未经本站许可,不得任意转载。

            +

            6.2 本站特有的标识、版面设计、编排方式等版权均属湖南秒绘科技有限公司享有,未经本站许可,不得任意复制或转载。 

            +

            6.3 使用本站的任何内容均应注明“来源于秒绘设计平台网站”及署上作者姓名,按法律规定需要支付稿酬的,应当通知本站及作者及支付稿酬,并独立承担一切法律责任。

            +

            6.4 本站享有所有作品用于其它用途的优先权,包括但不限于网站、电子杂志、平面出版等,但在使用前会通知作者,并按同行业的标准支付稿酬。

            +

            6.5 本站所有内容仅代表作者自己的立场和观点,与本站无关,由作者本人承担一切法律责任。 

            +

            6.6 恶意转载本站内容的,本站保留将其诉诸法律的权利。

            +

            七、责任声明

            +

            7.1 用户明确同意其使用本站所存在的风险及一切后果将完全由用户本人承担,秒绘设计平台网站对此不承担任何责任。 

            +

            7.2 本站无法保证服务一定能满足用户的要求,也不保证服务的及时性、安全性、准确性。 

            +

            7.3 本站不保证为方便用户而设置的外部链接的准确性和完整性,同时,对于该等外部链接指向的不由本站实际控制的任何网页上的内容,本站不承担任何责任。

            +

            7.4 对于因不可抗力或本站不能控制的原因造成的服务中断或其它缺陷,本站不承担任何责任,但将尽力减少因此而给用户造成的损失和影响。

            +

            7.5 对于本站向用户提供的下列产品或者服务的质量缺陷本身及其引发的任何损失,本站无需承担任何责任: (1)本站向用户免费提供的各项服务; (2)本站向用户赠送的任何产品或者服务。

            +

            7.6 本站有权于任何时间暂时或永久修改或终止本服务(或其任何部分),而无论其通知与否,本站对用户和任何第三人均无需承担任何责任。

            +

            八、附则

            +

            8.1 本协议的订立、执行和解释及争议的解决均应适用中华人民共和国法律。 

            +

            8.2 如本协议中的任何条款无论因何种原因完全或部分无效或不具有执行力,本协议的其余条款仍应有效并且有约束力。

            +

            8.3 本协议解释权及修订权归湖南秒绘科技有限公司所有。

            +
            +
            + + diff --git a/Yangcai365_design/manage/zview/zhiqim_manager/resetPassword.zml b/Yangcai365_design/manage/zview/zhiqim_manager/resetPassword.zml new file mode 100644 index 0000000..1b4e537 --- /dev/null +++ b/Yangcai365_design/manage/zview/zhiqim_manager/resetPassword.zml @@ -0,0 +1,129 @@ +${Styles.src(zhiqim.css)} +${Scripts.src(zhiqim.js)} + + + +
            +
            欢迎注册 [ ${context.getContextName()} ]!
            + + +
            + diff --git a/Yangcai365_design/manage/zview/zhiqim_manager/trainData.zml b/Yangcai365_design/manage/zview/zhiqim_manager/trainData.zml new file mode 100644 index 0000000..9d4755e --- /dev/null +++ b/Yangcai365_design/manage/zview/zhiqim_manager/trainData.zml @@ -0,0 +1,29 @@ +${zhiqim_manager_breadcrumb("培训文档")} +${zhiqim_manager_content()} +<#-- 导航栏 --> +
            + +
            + + + + + + + + + <#for item : modelList> + + + + + + + +
            附件名称附件大小更新时间操作
            ${item.getFileName()}${item.getFileSize()}${item.getModifyTime()}下载
            + +${zhiqim_manager_content_end()} \ No newline at end of file diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/CheckIsShowQddt.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/CheckIsShowQddt.java new file mode 100644 index 0000000..ffc4ab6 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/CheckIsShowQddt.java @@ -0,0 +1,54 @@ +/* + * 版权所有 (C) 2015 知启蒙(ZHIQIM) 保留所有权利。[欢迎加盟知启蒙,一起邂逅框架梦] + * + * https://www.zhiqim.com/gitcan/zhiqim/zhiqim_manager.htm + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.zhiqim.yangcai.design; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.rule.CheckPermissionRule; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnGlobal; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.design.DesignerGroupDispatch; + +/** + * 验证页面是否显示该路径 + * + * @version v1.0.0 @author zouzhigang 2015-5-28 新建与整理 + */ +@AnAlias("CheckIsShowQddt") +@AnGlobal +public class CheckIsShowQddt implements CheckPermissionRule +{ + @Override + public boolean check(HttpRequest request, String permission) throws Exception + { + String operatorCode = request.getSessionName(); + DesignerGroupDispatch item = ORM.get(ZTable.class).item(DesignerGroupDispatch.class, new Selector().addMaybe("operatorCode", operatorCode)); + + if (item == null) + { + return false; + } + else + { + return item.getIsShowQddt() == 1 ? true : false; + } + } +} \ No newline at end of file diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/ChkLongTailKeyword.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/ChkLongTailKeyword.java new file mode 100644 index 0000000..76b3dd8 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/ChkLongTailKeyword.java @@ -0,0 +1,128 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Interceptor; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.manager.ZmrSessionUser; + +import com.zhiqim.yangcai.design.constant.DesignConstants; +import com.zhiqim.yangcai.design.dao.KeywordDao; +import com.zhiqim.yangcai.design.model.LongTailKeywordModel; + +/** + * 长尾词关联 + * + * @version v1.0.0 @author Deng 2018-3-19 新建与整理 + */ +@AnAlias("ChkLongTailKeyword") +public class ChkLongTailKeyword implements Interceptor, DesignConstants +{ + @Override + public void intercept(HttpRequest request) throws Exception + { + long mediaId = request.getParameterLong("mediaId"); + String LongTailKeyword = request.getParameter("keywordName"); + + if (mediaId == -1) + return; + + if (Validates.isEmptyBlank(LongTailKeyword)) + return; + + LongTailKeywordModel model = isHashLongTailKeywordModel(request, LongTailKeyword); + if (model != null) + { + if (model.hasMediaId(mediaId)) + { + KeywordDao.doSolrLongTailKeyword(mediaId, LongTailKeyword);//更新长尾词 + } + } + + KeywordDao.dokeywordIndustryAdd(mediaId, LongTailKeyword);//更新行业关键词 + } + /** + * 设置长尾词Map缓存 + * @param request + * @return + */ + public static final void setSessionLongTailKeywordMap(HttpRequest request, String longTailKeyword, List mediaList)throws Exception + { + Map longTailKeywordMap = getSessionLongTailKeywordMap(request); + LongTailKeywordModel model = longTailKeywordMap.get(longTailKeyword); + if (model == null) + { + model = new LongTailKeywordModel(); + model.setLongTailKeyword(longTailKeyword); + model.setMediaList(mediaList); + + longTailKeywordMap.put(longTailKeyword, model); + } + } + + /** + * 获取Map缓存 + * @param request + * @param keyword + * @return + */ + public static final Map getSessionLongTailKeywordMap(HttpRequest request) + { + ZmrSessionUser sessionUser = request.getSessionUser(ZmrSessionUser.class); + + @SuppressWarnings("unchecked") + Map longTailKeywordMap = (Map)sessionUser.getValue(LONG_TAIL_KEYWORD_MAP); + if (longTailKeywordMap == null) + { + longTailKeywordMap = new HashMap(); + sessionUser.setValue(LONG_TAIL_KEYWORD_MAP, longTailKeywordMap); + } + + return longTailKeywordMap; + } + + /** + * 清空指定长尾词缓存 + * @param request + * @throws Exception + */ + public static final void deleteSessionLongTailKeywordMap(HttpRequest request, String longTailKeyword)throws Exception + { + Map longTailKeywordMap = getSessionLongTailKeywordMap(request); + longTailKeywordMap.remove(longTailKeyword); + } + + /** + * 判断长尾词缓存是否存在 + * @param request + * @param longTailKeyword + * @return + */ + public static LongTailKeywordModel isHashLongTailKeywordModel(HttpRequest request, String longTailKeyword) + { + Map longTailKeywordMap = getSessionLongTailKeywordMap(request); + if (longTailKeywordMap == null) + return null; + + LongTailKeywordModel model = longTailKeywordMap.get(longTailKeyword); + if (model == null) + return null; + + return model; + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/ChkPluginInterceptor.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/ChkPluginInterceptor.java new file mode 100644 index 0000000..569a47e --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/ChkPluginInterceptor.java @@ -0,0 +1,49 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Interceptor; +import org.zhiqim.manager.ZmrSessionUser; + +/** + * CDR插件拦截器 + * + * @version v1.0.0 @author zhouwenbin 2018-5-5 新建与整理 + */ +public class ChkPluginInterceptor implements Interceptor +{ + + @Override + public void intercept(HttpRequest request) throws Exception + { + if (request.isXMLHttpRequest()) + {// AJAX访问 + + if (!request.hasSessionUser(ZmrSessionUser.class)) + { + request.setResponseError("您闲置太久或未登录,请重新登录后再操作..."); + return; + } + } + else + { + ZmrSessionUser sessionUser = request.getSessionUser(ZmrSessionUser.class); + if (sessionUser == null) + { + request.setRedirectTop("/plugin/login.htm", "您闲置太久或未登录,正在返回初始界面,请确定....."); + return; + } + } + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/DesignerWorkListner.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/DesignerWorkListner.java new file mode 100644 index 0000000..3e6debc --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/DesignerWorkListner.java @@ -0,0 +1,143 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design; + +import org.zhiqim.httpd.HttpWebsocket; +import org.zhiqim.httpd.HttpWebsocketConnection; +import org.zhiqim.httpd.HttpWebsocketManager; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.kernel.util.Bytes; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.design.constants.DesignerWorkStatus; +import com.zhiqim.yangcai.design.dao.DesignerDao; +import com.zhiqim.yangcai.design.dbo.dispatch.DesOnline; + +/** + * 设计师上下班监听器 + * + * @version v1.0.0 @author zouzhigang 2017-12-21 新建与整理 + */ +@AnAlias("yangcai_designer") +public class DesignerWorkListner implements HttpWebsocket +{ + private static final Log log = LogFactory.getLog(DesignerWorkListner.class); + + @Override + public void onOpen(HttpWebsocketConnection conn) + { + if (!"yangcai_designer".equals(conn.getProtocol())) + { + return; + } + + ZmrSessionUser sessionUser = conn.getSession().getSessionUser(ZmrSessionUser.class); + if (sessionUser == null) + { + conn.close(); + return; + } + + HttpWebsocketManager websocketManager = conn.getWebsocketManager(); + if (websocketManager.get("yangcai_designer", sessionUser.getSessionId()).size() == 0) + { + websocketManager.add(conn); + } + + Updater updater = new Updater().addMust("operatorCode", sessionUser.getSessionName()).addField("sessionId", sessionUser.getSessionId()); + + try + { + ORM.get(ZTable.class).update(DesOnline.class, updater); + + // 写入登录浏览器日志 + DesignerDao.doWorksStatusLog(sessionUser.getOperatorOrgId(), sessionUser.getSessionName(), "登录浏览器", DesignerWorkStatus.LOGIN_ED); + } + catch (Exception e) + { + log.error("设计师[%s][%s]异常", sessionUser.getSessionName(), "登录浏览器", e); + } + } + + @Override + public void onClose(HttpWebsocketConnection conn) + { + close(conn, "退出浏览器"); + } + + @Override + public void onException(HttpWebsocketConnection conn, Throwable e) + { + close(conn, "异常退出浏览器"); + } + + @Override + public void onMessage(HttpWebsocketConnection conn, String message) + { + if (!"yangcai_designer".equals(conn.getProtocol())) + { + return; + } + + log.info("设计师信息:" + message); + } + + @Override + public void onMessage(HttpWebsocketConnection conn, byte[] message) + { + if (!"yangcai_designer".equals(conn.getProtocol())) + { + return; + } + + log.info("设计师信息:" + Bytes.toStringASCII(message)); + } + + private void close(HttpWebsocketConnection conn, String reason) + { + if (!"yangcai_designer".equals(conn.getProtocol())) + { + return; + } + + ZmrSessionUser user = conn.getSession().getSessionUser(ZmrSessionUser.class); + if (user == null) + { + conn.close(); + return; + } + + try + { + + // 设计师下班&停止接单操作 + if (DesignerDao.isDesignerOnWork(user.getSessionName())) + { + DesignerDao.stopWorkExec(user.getOperatorOrgId(), user.getSessionName(), "停止接单(浏览器断开)"); + } + + DesignerDao.doWorksStatusLog(user.getOperatorOrgId(), user.getSessionName(), reason, DesignerWorkStatus.LOGOUT); + } + catch (Exception e) + { + log.error("设计师[%s][%s]异常", user.getSessionName(), reason, e); + } + + log.info("设计师[%s][%s]", user.getSessionName(), reason); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/MediaDesignBootstrap.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/MediaDesignBootstrap.java new file mode 100644 index 0000000..c9a65d8 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/MediaDesignBootstrap.java @@ -0,0 +1,102 @@ +package com.zhiqim.yangcai.design; + +import org.zhiqim.httpd.context.core.Context; +import org.zhiqim.kernel.Global; +import org.zhiqim.manager.ZmrBootstrapApi; + +import com.zhiqim.media.service.Employee; +import com.zhiqim.yangcai.cache.CustomerTypeCache; +import com.zhiqim.yangcai.cache.DesMaterialCatCache; +import com.zhiqim.yangcai.cache.DesignIndustryCache; +import com.zhiqim.yangcai.cache.DesignMerchantCache; +import com.zhiqim.yangcai.cache.DesignOrderRefundReasonCache; +import com.zhiqim.yangcai.cache.DesignTypeCache; +import com.zhiqim.yangcai.cache.ExpressCache; +import com.zhiqim.yangcai.cache.IndustryLabelCache; +import com.zhiqim.yangcai.cache.LabelDimensionCache; +import com.zhiqim.yangcai.cache.OrgCache; +import com.zhiqim.yangcai.cache.ProductConvertCache; +import com.zhiqim.yangcai.design.service.MediaDesignEmployee; + +/** + * 初始化类 + * + * @version v1.0.0 @author zhouwenbin 2017-7-24 新建与整理 + * @version v1.1.0 @author caohong 2019-8-29 增加商户信息缓存 + */ +public class MediaDesignBootstrap extends ZmrBootstrapApi +{ + /** + * 在配置加载之后,初始化系统接口 + * + * @throws Exception + */ + public void init(Context context) throws Exception + { + initCache(); + } + + public static void initCache() + { + // Test.test();//处理历史模板库数据 + + // 实现编辑编辑回调 + MediaDesignEmployee ws = new MediaDesignEmployee(); + Employee employee = new Employee(); + employee.setEmployer(ws); + Global.add(Employee.class, employee); + + // 初始化作品素材分类 + Global.add(DesMaterialCatCache.class, new DesMaterialCatCache().doRefresh()); + + // 初始化商户信息缓存 + DesignMerchantCache merchantCache = Global.get(DesignMerchantCache.class); + merchantCache = merchantCache != null ? merchantCache : new DesignMerchantCache(); + Global.add(DesignMerchantCache.class, merchantCache.doRefresh()); + + // 设计分类 + DesignTypeCache dc = Global.get(DesignTypeCache.class); + dc = dc != null ? dc : new DesignTypeCache(); + Global.add(DesignTypeCache.class, dc.doRefresh()); + + // 产品单价 + ProductConvertCache pc = Global.get(ProductConvertCache.class); + pc = pc != null ? pc : new ProductConvertCache(); + Global.add(ProductConvertCache.class, pc.doRefresh()); + + // 设计行业分类 + DesignIndustryCache dic = Global.get(DesignIndustryCache.class); + dic = dic != null ? dic : new DesignIndustryCache(); + Global.add(DesignIndustryCache.class, dic.doRefresh()); + + // 物流信息缓存 + ExpressCache wuliu = Global.get(ExpressCache.class); + wuliu = wuliu != null ? wuliu : new ExpressCache(); + Global.add(ExpressCache.class, wuliu.doRefresh()); + + // 行业标签缓存 + IndustryLabelCache ilc = Global.get(IndustryLabelCache.class); + ilc = ilc != null ? ilc : new IndustryLabelCache(); + Global.add(IndustryLabelCache.class, new IndustryLabelCache()); + + // 标签维度缓存 + LabelDimensionCache ldc = Global.get(LabelDimensionCache.class); + ldc = ldc != null ? ldc : new LabelDimensionCache(); + Global.add(LabelDimensionCache.class, new LabelDimensionCache()); + + // 客户类型缓存 + CustomerTypeCache ctt = Global.get(CustomerTypeCache.class); + ctt = ctt != null ? ctt : new CustomerTypeCache(); + Global.add(CustomerTypeCache.class, new CustomerTypeCache()); + + // 组织信息缓存 + OrgCache oc = Global.get(OrgCache.class); + oc = oc != null ? oc : new OrgCache(); + Global.add(OrgCache.class, oc.doRefresh()); + // 退款问题配置缓存 + + DesignOrderRefundReasonCache reasonCache = Global.get(DesignOrderRefundReasonCache.class); + reasonCache = reasonCache != null ? reasonCache : new DesignOrderRefundReasonCache(); + Global.add(DesignOrderRefundReasonCache.class, reasonCache.doRefresh()); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/YangcaiPassworder.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/YangcaiPassworder.java new file mode 100644 index 0000000..0d247f9 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/YangcaiPassworder.java @@ -0,0 +1,52 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design; + +import org.zhiqim.kernel.util.Strings; +import org.zhiqim.kernel.util.codes.MD5; +import org.zhiqim.kernel.util.codes.SHA256; +import org.zhiqim.manager.ZmrPassworder; + +public class YangcaiPassworder extends ZmrPassworder +{ + /** + * 重写 + * + * 操作员密码不可逆编码,默认SHA256(name + code + pass + salt) + * + * @param operatorCode 操作员编码 + * @param operatorPass 操作员密码 + * @param operatorPassSalt 操作员密码盐值 + * @return 编码之后的密码 + */ + public String encode(String operatorCode, String operatorPass, String operatorPassSalt) + { + return SHA256.encodeUTF8("fadfox" + operatorCode + operatorPass + operatorPassSalt); + } + + /** + * 重写 + * + * 密钥编码,默认MD5(name + code + salt),取MD5前10 + len + 后20 + * + * @param operatorCode 操作员编码 + * @param operatorPass 操作员密码 + * @param operatorPassSalt 操作员密码盐值 + * @return 编码之后的密码 + */ + public String secret(String operatorCode, String operatorPass, String operatorPassSalt) + { + String value = Strings.prefixZero(operatorPass.length(), 2); + String md5 = MD5.encodeUTF8("fadfox" + operatorCode + operatorPassSalt); + return md5.substring(0, 10) + value + md5.substring(12); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/AttaFileListAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/AttaFileListAction.java new file mode 100644 index 0000000..551dce6 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/AttaFileListAction.java @@ -0,0 +1,470 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action; + +import java.io.File; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Lists; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.manager.dao.ZmrOperatorDao; +import org.zhiqim.manager.dbo.ZmrOperator; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.alibaba.fastjson.JSONObject; +import com.zhiqim.media.dbo.dzmp.DzmpUserCardStorage; +import com.zhiqim.yangcai.design.constants.EventConstants; +import com.zhiqim.yangcai.design.constants.FileTypeConstants; +import com.zhiqim.yangcai.design.constants.StatusConstants; +import com.zhiqim.yangcai.design.dao.AttaFileDao; +import com.zhiqim.yangcai.design.dao.OrderCheckDao; +import com.zhiqim.yangcai.design.dao.OrderLogDao; +import com.zhiqim.yangcai.design.dbo.design.DesignType; +import com.zhiqim.yangcai.design.dbo.design.DesignTypeContent; +import com.zhiqim.yangcai.design.dbo.editor.DesignEditorUser; +import com.zhiqim.yangcai.design.dbo.editor.DesignPinlei; +import com.zhiqim.yangcai.design.dbo.editor.OrderToken; +import com.zhiqim.yangcai.design.dbo.order.DesignAtta; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; +import com.zhiqim.yangcai.design.dbo.order.DesignSelfView; +import com.zhiqim.yangcai.design.model.AttaFileModel; +import com.zhiqim.yangcai.util.BusinessTbzBjqUtil; + +/** + * 设计文件列表,右边iframe使用 + * + * @author zhouwenbin + * + */ +public class AttaFileListAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + + String data = request.getParameter("data"); + String addRule = request.getParameter("addRule"); // 添加排除项 + String delRule = request.getParameter("delRule"); // 删除排除项 + String checkeds = request.getParameter("checkeds"); + long designId = request.getParameterLong("designId"); + + String operatorCode = request.getSessionName(); + ZmrOperator zmrOperator = ZmrOperatorDao.getOperator(request, operatorCode); + String redisKey = "toEditor" + zmrOperator.getOperatorMobile(); + + // 获取设计师的编辑器用户信息 + DesignEditorUser designEditorUser = ORM.get(ZTable.class).item(DesignEditorUser.class, + new Selector().addMust("userName", operatorCode).addMust("mobile", zmrOperator.getOperatorMobile())); + if (null == designEditorUser) + { + designEditorUser = new DesignEditorUser(); + designEditorUser.setUserName(operatorCode); + designEditorUser.setMobile(zmrOperator.getOperatorMobile()); + designEditorUser.setType(1);// 设计师,2为客户 + ORM.get(ZTable.class).insert(designEditorUser); + designEditorUser = ORM.get(ZTable.class).item(DesignEditorUser.class, new Selector().addMust("userName", operatorCode)); + + } + String token = ""; + try + { + // token = BusinessTbzBjqUtil.getAccessToken(operatorCode, + // Integer.valueOf(String.valueOf(designEditorUser.getEditorId())), 0L, 0L, "", + // designEditorUser.getMobile()); + } + catch (Exception e) + { + System.out.print("渲染服务器崩了"); + } + /* + * if (token == "") + * { + * // 记录token不行,每五分钟去发起一次,不要一直发起 + * jedis.del("token_redis");// 先尝试删除之前的数据 + * jedis.set("token_redis", tokenRedis, 5000); + * } + */ + // 获取订单信息 + DesignOrder designOrder = null; + if (designId > 0) + { + designOrder = ORM.get(ZTable.class).item(DesignOrder.class, new Selector().addMust("designId", designId)); + } + if (("".equals(data) || null == data) && designId <= 0)// 如果参数都没有,就是编辑器调过来的,就从redis里面获取数据 + { + /* 回调之后存模板数据 */ + String ss = request.getHeaderLine().substring(request.getHeaderLine().indexOf("?") + 1, request.getHeaderLine().indexOf("&")); + OrderToken orderToken = ORM.get(ZTable.class).item(OrderToken.class, new Selector().addMust("tokenKey", redisKey)); + + String mapString = orderToken.getContext(); + JSONObject jsonobject = JSONObject.parseObject(mapString); + Map map = jsonobject; + data = String.valueOf(map.get("data")); + addRule = String.valueOf(map.get("addRule")); + delRule = String.valueOf(map.get("delRule")); + checkeds = String.valueOf(map.get("checkeds")); + if ("designId".equals(ss)) + { + designId = (long) map.get("designId"); + } + else + { + designId = Long.valueOf(ss); + } + int templateId = request.getParameterInt("template_id");// 模板id + + designOrder = ORM.get(ZTable.class).item(DesignOrder.class, new Selector().addMust("designId", designId)); + System.out.print(designId + "========================template_id:" + templateId); + if (designOrder.getTemplateId() != templateId) + { + Updater updater = new Updater(); + updater.addMust("designId", designId); + updater.addField("templateId", templateId); + ORM.get(ZTable.class).update(DesignOrder.class, updater); + // 删除文件 + List attaList = ORM.get(ZTable.class).list(DesignAtta.class, new Selector().addMustInLong("designId", designId)); + for (int i = 0; i < attaList.size(); i++) + { + DesignAtta designAtta = attaList.get(i); + // 如果是编辑器文件或者印刷文件,则直接删除 + if ("TbzFile".equals(designAtta.getAttaModul()) || "EndFile".equals(designAtta.getAttaModul())) + { + delete(request, designAtta.getAttaId()); + } + + } + } + + } + + else + { + // 先尝试删除之前的数据 + OrderToken orderToken = ORM.get(ZTable.class).item(OrderToken.class, new Selector().addMust("tokenKey", redisKey)); + + Map map = new HashMap<>(); + map.put("data", data); + map.put("addRule", addRule); + map.put("delRule", delRule); + map.put("checkeds", checkeds); + map.put("designId", designId); + JSONObject json = new JSONObject(map); + if (orderToken == null) + { + OrderToken orderToken1 = new OrderToken(); + orderToken1.setTokenKey(redisKey); + orderToken1.setContext(json.toString()); + orderToken1.setAddTime(Sqls.nowTimestamp()); + ORM.get(ZTable.class).insert(orderToken1); + } + else + { + Updater updater = new Updater(); + updater.addMust("id", orderToken.getId()); + updater.addField("context", json.toString()); + updater.addField("addTime", Sqls.nowTimestamp()); + ORM.get(ZTable.class).update(OrderToken.class, updater); + } + + } + + if (designOrder != null && designOrder.getTemplateId() > 0) + { + String daitoken = ""; + try + { + if (!"".equals(token)) + { + daitoken = BusinessTbzBjqUtil.getAccessToken("test", 1001, 0L, 0L, "", "17362985940"); + } + } + catch (Exception e) + { + System.out.print("渲染服务器崩了"); + } + Map mapDai = new HashMap(); + mapDai.put("method", "member"); + mapDai.put("templateId", designOrder.getTemplateId()); + String mi = new JSONObject(mapDai).toString(); + String miyao = org.apache.commons.codec.binary.Base64.encodeBase64String(mi.getBytes()); + request.setAttribute("daiEditorUrl", "https://diy.lingtao8.com/design/cate/" + miyao + "?loginCode=" + daitoken); + } + + request.setAttribute("redisKey", redisKey); + request.setAttribute("checkeds", (Validates.isEmpty(checkeds) || "null".equals(checkeds)) ? false : true); + + List addList = Lists.toStringList(addRule); + List delList = Lists.toStringList(delRule); + + int height = 0; + List attaList = new ArrayList<>(); + if (Validates.isNotEmpty(data)) + { + String dateDir = DateTimes.getDateTime8String(); + for (String key : data.split(",")) + { + key = key.trim(); + if (key.equals("WorkFile") || key.equals("TbzFile")) + { + continue; + } + AttaFileModel temp = AttaFileDao.get(key); + if (temp != null) + { + if ("file".equals(temp.getType())) + { + temp.setSavePath(dateDir + "/" + temp.getName()); + if (addList.contains(key)) + { + temp.setAdd(false); + } + else + { + temp.setAdd(true); + } + + if (delList.contains(key)) + { + temp.setDel(false); + } + else + { + temp.setDel(true); + } + } + + height += temp.getHeight(); + attaList.add(temp); + } + } + } + + request.setAttribute("attaList", attaList); + request.setAttribute("height", height); + + if (designId == -1) + { + return; + } + Selector selector = new Selector(); + selector.addMust("designId", designId); + DesignSelfView order = ORM.get(ZView.class).item(DesignSelfView.class, selector); + request.setAttribute("order", order); + // 获取订单信息、获取编辑器种类 + request.setAttribute("designOrder", designOrder); + DesignPinlei designPinlei = ORM.get(ZTable.class).item(DesignPinlei.class, new Selector().addMust("typeId", designOrder.getTypeId())); + request.setAttribute("designPinlei", designPinlei); + + // 获取模板url地址 + /* + * Map map = new HashMap<>(); + * map.put("template_id", designOrder.getTemplateId()); + * map.put("callback_url", ""); + * map.put("uid", Integer.valueOf(String.valueOf(designEditorUser.getEditorId()))); + * BusinessTbzBjqUtil.getBjqUrl(map, + * Integer.valueOf(String.valueOf(designEditorUser.getEditorId())), + * designEditorUser.getUserName()); + */ + + // 再拿一次token + try + { + if (!"".equals(token)) + { + token = BusinessTbzBjqUtil.getAccessToken(operatorCode, Integer.valueOf(String.valueOf(designEditorUser.getEditorId())), 0L, 0L, "", + designEditorUser.getMobile()); + } + + } + catch (Exception e) + { + System.out.print("渲染服务器崩了"); + } + if (null == designPinlei)// 编辑器品类为空,跳入编辑器首页 + { + // String token = BusinessTbzBjqUtil.getAccessToken("", uid, expireAt, expireAtM, + // headImg, mobile); + request.setAttribute("editorUrl", "https://diy.lingtao8.com?loginCode=" + token); + } + else// 编辑器品类不为空,跳入编辑器次页 + { + request.setAttribute("editorUrl", "https://diy.lingtao8.com/spec-list/pid-" + designPinlei.getClassifyId() + "-all-1.html?loginCode=" + token); + } + if (order.getTypeId() < 1) + { + request.setAttribute("designType", ""); + } + else + { + DesignType designType = ORM.get(ZTable.class).item(DesignType.class, new Selector().addMust("typeId", order.getTypeId())); + request.setAttribute("designType", designType); + if (designType != null) + { + DesignTypeContent order1 = ORM.get(ZTable.class).item(DesignTypeContent.class, new Selector().addMust("typeId", order.getTypeId())); + if (order1 != null) + { + request.setAttribute("content", order1.getContent()); + } + + } + + } + + if (data.contains("ThumFile") && order.getStatus() >= StatusConstants.ORDER_55.value()) + {// 智能名片展示缩略图 + DzmpUserCardStorage card = ORM.get(ZTable.class).item(DzmpUserCardStorage.class, new Selector("designId", designId).addOrderbyAsc("addTime")); + if (card != null && Validates.isNotEmpty(card.getCardUrl())) + { + int thumFileListIndex = 0; + for (Iterator it = attaList.iterator(); it.hasNext();) + { + AttaFileModel attaFileModel = it.next(); + if ("thumFile".equals(attaFileModel.getType())) + { + it.remove();// 先删除 + + AttaFileModel attaModel = new AttaFileModel("thumFile", "缩略图", "thumFile"); + + attaModel.setName("缩略图"); + attaModel.setType("thumFile"); + attaModel.setHeight(190); + attaModel.setSavePath(card.getCardUrl()); + + attaList.add(thumFileListIndex, attaModel);// 当前位置替换文件对象 + break; + } + thumFileListIndex++; + } + } + } + request.setAttribute("attaList", attaList); + + // 订单客户素材、源文件、成品文件 + List fileList = ORM.get(ZTable.class).list(DesignAtta.class, new Selector("designId", designId)); + request.setAttribute("fileList", fileList); + + String endFileLink = null; + for (DesignAtta atta : fileList) + { + if (FileTypeConstants.FILE_END.value().equals(atta.getAttaModul()) && Validates.isNotEmptyBlank(atta.getOssUrl())) + { + endFileLink = atta.getOssUrl(); + break; + } + else if (FileTypeConstants.FILE_END.value().equals(atta.getAttaModul()) && new File(atta.getSavePath()).exists()) + { + String prefix = Global.getString("designParam", "endFileLink"); + if (Validates.isUrl(prefix)) + { + endFileLink = prefix + atta.getAttaId(); + } + } + } + request.setAttribute("endFileLink", endFileLink); + request.setAttribute("checkToken", "111"); + } + + public static void toSyncFile(HttpRequest request, long designId, boolean isOnlyDesign) throws Exception + { + String operatorCode = request.getSessionName(); + ZmrOperator zmrOperator = ZmrOperatorDao.getOperator(request, operatorCode); + DesignEditorUser designEditorUser = ORM.get(ZTable.class).item(DesignEditorUser.class, + new Selector().addMust("userName", operatorCode).addMust("mobile", zmrOperator.getOperatorMobile())); + if (null == designEditorUser) + { + designEditorUser = new DesignEditorUser(); + designEditorUser.setUserName(operatorCode); + designEditorUser.setMobile(zmrOperator.getOperatorMobile()); + designEditorUser.setType(1);// 设计师,2为客户 + ORM.get(ZTable.class).insert(designEditorUser); + designEditorUser = ORM.get(ZTable.class).item(DesignEditorUser.class, new Selector().addMust("userName", operatorCode)); + } + /* + * String token = BusinessTbzBjqUtil.getAccessToken(operatorCode, + * Integer.valueOf(String.valueOf(designEditorUser.getEditorId())), 0L, 0L, "", + * designEditorUser.getMobile()); + */ + DesignOrder designOrder = ORM.get(ZTable.class).item(DesignOrder.class, new Selector().addMust("designId", designId)); + long uid = designEditorUser.getEditorId(); + int template_id = designOrder.getTemplateId(); + String[] typeArr = + { + "jpg", "cmyk", "rgb", "jpg-rgb" + }; + + // 删除文件 + List attaList = ORM.get(ZTable.class).list(DesignAtta.class, new Selector().addMustInLong("designId", designId)); + for (int i = 0; i < attaList.size(); i++) + { + DesignAtta designAtta = attaList.get(i); + // 如果是编辑器文件或者印刷文件,则直接删除 + if ("TbzFile".equals(designAtta.getAttaModul()) || "EndFile".equals(designAtta.getAttaModul())) + { + delete(request, designAtta.getAttaId()); + } + + } + + for (int i = 0; i < typeArr.length; i++) + { + String type = typeArr[i]; + // String type = "jpg";// cmyk\rgb,cmyk,jpg-rgb + long order_no = designOrder.getDesignId(); + Map map = new HashMap<>(); + map.put("uid", uid); + map.put("template_id", template_id); + map.put("type", type); + map.put("order_no", order_no + "_" + type); + BusinessTbzBjqUtil.toSyncFile(map, Integer.valueOf(String.valueOf(designEditorUser.getEditorId())), designEditorUser.getUserName()); + } + + } + + public static String delete(HttpRequest request, long attaidArr) throws Exception + { + List attaList = ORM.get(ZTable.class).list(DesignAtta.class, new Selector().addMustInLong("attaId", attaidArr)); + for (DesignAtta atta : attaList) + { + long designId = atta.getDesignId(); + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, designId); + if (order == null) + { + return "订单不存在"; + } + + if (order.getStatus() >= StatusConstants.ORDER_60.value() && !atta.getAttaModul().equals(FileTypeConstants.FILE_AFTE_COMPLAIN_EVIDENCE.value())) + {// 非售后 凭证文件不允许删除 + return "订单已审,不允许删除订单文件"; + } + + OrderCheckDao.doDeleteAttaFile(atta); + OrderLogDao.saveOrderOperateLog(atta.getDesignId(), request.getSessionName(), "删除上传的[" + atta.getAttaModul() + "]文件", + EventConstants.ORDER_20.value()); + + } + return null; + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/CacheRefreshAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/CacheRefreshAction.java new file mode 100644 index 0000000..b204405 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/CacheRefreshAction.java @@ -0,0 +1,56 @@ +/** + * 扬彩印刷设计 + * 文件名 :CacheRefreshAction.java + * 创建人 :gjx + * 创建时间:2019-12-23 + */ + +package com.zhiqim.yangcai.design.action; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.Global; + +import com.zhiqim.yangcai.cache.CustomerTypeCache; +import com.zhiqim.yangcai.cache.DesignIndustryCache; +import com.zhiqim.yangcai.cache.IndustryLabelCache; +import com.zhiqim.yangcai.cache.LabelDimensionCache; + +/** + * [简要描述]刷新缓存 :
            + * [详细描述]:
            + * + * @version 1.0 @author gjx 2019-12-23 新建与整理 + */ +public class CacheRefreshAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + // 设计行业分类 + DesignIndustryCache dic = Global.get(DesignIndustryCache.class); + dic = dic != null ? dic : new DesignIndustryCache(); + Global.remove(DesignIndustryCache.class); + Global.add(DesignIndustryCache.class, dic.doRefresh()); + + // 行业标签缓存 + IndustryLabelCache idl = Global.get(IndustryLabelCache.class); + idl = idl != null ? idl : new IndustryLabelCache(); + Global.remove(IndustryLabelCache.class); + Global.add(IndustryLabelCache.class, idl.doRefresh()); + + // 标签维度缓存 + LabelDimensionCache lbd = Global.get(LabelDimensionCache.class); + lbd = lbd != null ? lbd : new LabelDimensionCache(); + Global.remove(LabelDimensionCache.class); + Global.add(LabelDimensionCache.class, lbd.doRefresh()); + + // 客户类型缓存 + CustomerTypeCache ctt = Global.get(CustomerTypeCache.class); + ctt = ctt != null ? ctt : new CustomerTypeCache(); + Global.remove(CustomerTypeCache.class); + Global.add(CustomerTypeCache.class, ctt.doRefresh()); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/DesignLogoutAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/DesignLogoutAction.java new file mode 100644 index 0000000..a4c0c66 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/DesignLogoutAction.java @@ -0,0 +1,28 @@ +package com.zhiqim.yangcai.design.action; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.manager.ZmrSessionUser; + +import com.zhiqim.yangcai.design.dao.DesignerDao; + +/*** + * + * 用户退出系统 + * + * @version v1.0.0 @author longguizhi 2018-11-9 新建与整理 + */ +public class DesignLogoutAction extends org.zhiqim.manager.action.LogoutAction +{ + @Override + public void execute(HttpRequest request) throws Exception + { + if (DesignerDao.isDesignerOnWork(request.getSessionName()))// 正在接单 + { + ZmrSessionUser user = request.getSessionUser(ZmrSessionUser.class); + long orgId = user != null ? user.getOperatorOrgId() : 0L; + DesignerDao.stopWorkExec(orgId, request.getSessionName(), "退出浏览器");// 则下班 + } + + super.execute(request); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/DownloadDesignOperatorOrderAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/DownloadDesignOperatorOrderAction.java new file mode 100644 index 0000000..0a53621 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/DownloadDesignOperatorOrderAction.java @@ -0,0 +1,28 @@ +/** + * 扬彩印刷设计 + * 文件名 :ExpressCacheProvideAction.java + * 创建人 :yixin + * 创建时间:2020-10-17 + */ + +package com.zhiqim.yangcai.design.action; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; + +import com.zhiqim.yangcai.design.presenter.OperatorOrderPresenter; + +/** + * 下载操作员未完成订单 + * + * @version 1.0 @author gjx 2019-11-5 新建与整理 + */ +public class DownloadDesignOperatorOrderAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + OperatorOrderPresenter.downloadDesignOperatorOrder(request); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/DownloadFileAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/DownloadFileAction.java new file mode 100644 index 0000000..eb0a5cf --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/DownloadFileAction.java @@ -0,0 +1,310 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.action; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.nio.charset.Charset; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import java.util.zip.ZipEntry; +import java.util.zip.ZipOutputStream; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.HttpResponse; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.httpclient.HttpDownload; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.kernel.schedule.Day; +import org.zhiqim.kernel.schedule.Scheduler; +import org.zhiqim.kernel.util.Arrays; +import org.zhiqim.kernel.util.Files; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.kernel.util.Streams; +import org.zhiqim.kernel.util.Strings; +import org.zhiqim.kernel.util.Urls; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.order.DesignAtta; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; +import com.zhiqim.yangcai.design.presenter.UploadFilePresenter; +import com.zhiqim.yangcai.design.task.TempFileDeleteTask; + +/** + * 文件流下载 + * + * @version v1.0.0 @author zhouwenbin 2017-8-10 新建与整理 + */ +public class DownloadFileAction implements Action +{ + @SuppressWarnings("unused") + private static Log log = LogFactory.getLog(DownloadFileAction.class); + private static TempFileDeleteTask deleteTempFileTask = TempFileDeleteTask.getInstance(); + + @Override + public void execute(HttpRequest request) throws Exception + { + + downLoadFromOss(request); + + // 启动删除临时文件任务 + if (!deleteTempFileTask.isRunning()) + { + Scheduler scheduler = Global.getWithoutNew(Scheduler.class); + scheduler.create(); + scheduler.addTask(new Day(deleteTempFileTask, 5, 29, 59)); + deleteTempFileTask.setRunning(true); + } + } + + /** 从oss下载 */ + public void downLoadFromOss(HttpRequest request) throws Exception + { + long[] attaIds = Arrays.toLongArray(request.getParameter("attaId")); + if (attaIds.length == 0) + { + request.returnHistory("文件不存在"); + return; + } + + List attaList = ORM.get(ZTable.class).list(DesignAtta.class, new Selector().addMustInLong("attaId", attaIds)); + + // 至少要有一个文件 + Iterator iterator = attaList.iterator(); + while (iterator.hasNext()) + { + DesignAtta atta = iterator.next(); + if (Validates.isNotEmptyBlank(atta.getOssUrl())) + { + continue;// 有文件 + } + + if (Validates.isNotEmptyBlank(atta.getSavePath())) + { + File file = new File(atta.getSavePath()); + if (file.exists() && file.isFile()) + { + continue;// 有文件 + } + } + + iterator.remove(); + } + + if (attaList.size() == 0) + { + request.returnHistory("文件不存在"); + return; + } + + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, attaList.get(0).getDesignId()); + if (attaList.size() == 1) + { + DesignAtta atta = attaList.get(0); + String fileName = atta.getFileName(); + String savePath = atta.getSavePath(); + String ossUrl = atta.getOssUrl(); + + // 1.检查是否有下载的临时文件 + String tempFilePath = UploadFilePresenter.getCurrentTempFolder(Strings.addEndsWith(atta.getAttaModul(), "/")) + atta.getAttaId() + + Strings.addStartsWith(atta.getFileType(), "."); + File tempFile = new File(tempFilePath); + if (tempFile.exists() && tempFile.isFile()) + { + // 响应文件 + responseFile(tempFilePath, request, fileName); + return; + } + + // 2.只有网络路径情况 (外部系统提供的信息) + if (Validates.isEmptyBlank(savePath) && Validates.isNotEmptyBlank(ossUrl)) + {// 只有网络路径情况 (外部系统提供的信息) + // 检查 临时文件 + // 没有临时文件 文件时 直接重定向 下载地址 + request.setRedirect(ossUrl); + return; + } + + // 3.本地有文件 + File file = new File(savePath); + if (file.exists() && file.isFile()) + { + // 响应文件 + responseFile(savePath, request, fileName); + return; + } + + if (Validates.isNotEmptyBlank(atta.getOssUrl())) + { + request.setRedirect(ossUrl); + return; + } + + request.returnHistory("文件不存在"); + return; + } + else + { + String zipName = order.getDesignId() + "-" + (Validates.isEmptyBlank(order.getBuyerNick()) ? order.getUserContact() : order.getBuyerNick()) + + ".zip"; + String tempZipDir = UploadFilePresenter.getCurrentTempFolder(Strings.addEndsWith("zip", "/")); + String tempZipFilePath = tempZipDir + Ids.longId() + ".zip"; + File dir = new File(tempZipDir); + if (!dir.exists()) + { + Files.mkDirectory(dir); + } + + ZipOutputStream zipOut = new ZipOutputStream(new FileOutputStream(tempZipFilePath), Charset.forName("utf-8")); + Map fileNameContMap = new LinkedHashMap(); + for (DesignAtta atta : attaList) + { + if (Validates.isNotEmptyBlank(atta.getOssUrl())) + {// 有网络地址 + String tempFileDir = UploadFilePresenter.getCurrentTempFolder(Strings.addEndsWith(atta.getAttaModul(), "/")); + File tempFile = new File(tempFileDir + atta.getAttaId() + Strings.addStartsWith(atta.getFileType(), ".")); + if (!tempFile.exists() && !tempFile.isFile()) + { + HttpDownload download = new HttpDownload(atta.getOssUrl()); + download.setConnectTimeout(30); + download.setReadTimeout(50 * 60); + download.setFileDir(tempFileDir); + download.setFileName(tempFile.getName()); + download.execute(); + } + + Integer fileNameCount = fileNameContMap.get(atta.getFileName()); + fileNameCount = fileNameCount == null ? 0 : fileNameCount; + fileNameCount += 1; + fileNameContMap.put(atta.getFileName(), fileNameCount); + String attaName = atta.getFileName(); + String zipEntryName = attaName; + if (attaName.lastIndexOf(".") != -1) + { + zipEntryName = attaName.substring(0, attaName.lastIndexOf(".")); + } + + zipOut.putNextEntry(new ZipEntry(Strings.addEndsWith(zipEntryName + (fileNameCount > 1 ? "(" + (fileNameCount - 1) + ")" : ""), + Strings.addStartsWith(atta.getFileType(), ".")))); + try (FileInputStream input = new FileInputStream(tempFile)) + { + int len = 0; + byte[] buf = new byte[1024 * 20]; + while ((len = input.read(buf)) != -1) + { + zipOut.write(buf, 0, len); + zipOut.flush(); + } + } + zipOut.closeEntry(); + } + else + {// 没有网络地址 + if (Validates.isEmptyBlank(atta.getSavePath())) + { + continue; + } + + File file = new File(atta.getSavePath()); + Integer fileNameCount = fileNameContMap.get(atta.getFileName()); + fileNameCount = fileNameCount == null ? 0 : fileNameCount; + fileNameCount += 1; + fileNameContMap.put(atta.getFileName(), fileNameCount); + String attaName = atta.getFileName(); + String zipEntryName = attaName; + if (attaName.lastIndexOf(".") != -1) + { + zipEntryName = attaName.substring(0, attaName.lastIndexOf(".")); + } + + zipOut.putNextEntry(new ZipEntry(Strings.addEndsWith(zipEntryName + (fileNameCount > 1 ? "(" + (fileNameCount - 1) + ")" : ""), + Strings.addStartsWith(atta.getFileType(), ".")))); + try (FileInputStream input = new FileInputStream(file)) + { + int len = 0; + byte[] buf = new byte[1024 * 20]; + while ((len = input.read(buf)) != -1) + { + zipOut.write(buf, 0, len); + zipOut.flush(); + } + } + zipOut.closeEntry(); + } + } + + zipOut.finish(); + zipOut.close(); + + // 最后打包写出 + responseFile(tempZipFilePath, request, zipName); + } + } + + /** + * 响应文件 + * + * @param filePath 文件路径 + * @param response + * @throws IOException + * @throws Exception + */ + public static void responseFile(String filePath, HttpRequest request, String fileName) throws IOException + { + HttpResponse response = request.getResponse(); + if (Validates.isEmptyBlank(fileName)) + { + fileName = Files.getFileName(filePath); + } + + try (FileInputStream input = new FileInputStream(filePath)) + { + String downName = fileName; + Matcher resizeMatcher = Pattern.compile("[\u4e00-\u9fa5]+").matcher(fileName); + while (resizeMatcher.find()) + { + String zhCode = resizeMatcher.group(); + String encode = Urls.encodeUTF8(zhCode); + downName = resizeMatcher.replaceAll(encode); + } + if (request.isChrome()) + {// chrome不支持括号也是醉了 + downName = downName.replaceAll("%28", "("); + downName = downName.replaceAll("%29", ")"); + } + + if (request.isFirefox()) + { + response.setHeader(_CONTENT_DISPOSITION_, "attachment; filename*=UTF-8''" + fileName); + } + else + { + response.setHeader(_CONTENT_DISPOSITION_, "attachment; filename=" + downName); + } + + response.setContentType(_APPLICATION_OCTET_STREAM_); + response.setHeader(_CONTENT_LENGTH_, new File(filePath).length()); + Streams.putBytes(input, response.getOutputStream()); + } + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/DownloadQuestionsFileAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/DownloadQuestionsFileAction.java new file mode 100644 index 0000000..3d8aade --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/DownloadQuestionsFileAction.java @@ -0,0 +1,213 @@ +package com.zhiqim.yangcai.design.action; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.nio.charset.Charset; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import java.util.zip.ZipEntry; +import java.util.zip.ZipOutputStream; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.HttpResponse; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.util.Arrays; +import org.zhiqim.kernel.util.Files; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.kernel.util.Streams; +import org.zhiqim.kernel.util.Strings; +import org.zhiqim.kernel.util.Urls; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.order.QuestionsAtta; +import com.zhiqim.yangcai.design.presenter.UploadFilePresenter; + +/** + * 文件流下载 + */ +public class DownloadQuestionsFileAction implements Action +{ + @Override + public void execute(HttpRequest request) throws Exception + { + downLoad(request); + + } + + public void downLoad(HttpRequest request) throws Exception + { + long[] attaIds = Arrays.toLongArray(request.getParameter("attaId")); + String downFileType = request.getParameter("downFileType"); + if (attaIds.length == 0) + { + request.returnHistory("文件不存在"); + return; + } + + List attaList = ORM.get(ZTable.class).list(QuestionsAtta.class, new Selector().addMustInLong("attaId", attaIds)); + + // 至少要有一个文件 + Iterator iterator = attaList.iterator(); + while (iterator.hasNext()) + { + QuestionsAtta atta = iterator.next(); + + if (Validates.isNotEmptyBlank(atta.getSavePath())) + { + File file = new File(atta.getSavePath()); + if (file.exists() && file.isFile()) + { + continue;// 有文件 + } + } + + iterator.remove(); + } + + if (attaList.size() == 0) + { + request.returnHistory("文件不存在"); + return; + } + + if (attaList.size() == 1) + { + QuestionsAtta atta = attaList.get(0); + String fileName = atta.getFileName(); + String savePath = atta.getSavePath(); + + // 本地有文件 + File file = new File(savePath); + if (file.exists() && file.isFile()) + { + // 响应文件 + responseFile(savePath, request, fileName); + return; + } + + request.returnHistory("文件不存在"); + return; + } + else + { + String zipName = null; + if (downFileType.equals("DesginFile")) + { + zipName = attaList.get(0).getQuestionsId() + "-设计文件.zip"; + } + else if (downFileType.equals("EndFile")) + { + zipName = attaList.get(0).getQuestionsId() + "-印刷文件.zip"; + } + else + { + zipName = attaList.get(0).getQuestionsId() + "-素材文件.zip"; + } + String tempZipDir = UploadFilePresenter.getCurrentTempFolder(Strings.addEndsWith("zip", "/")); + String tempZipFilePath = tempZipDir + Ids.longId() + ".zip"; + File dir = new File(tempZipDir); + if (!dir.exists()) + { + Files.mkDirectory(dir); + } + + ZipOutputStream zipOut = new ZipOutputStream(new FileOutputStream(tempZipFilePath), Charset.forName("utf-8")); + Map fileNameContMap = new LinkedHashMap(); + for (QuestionsAtta atta : attaList) + { + if (Validates.isEmptyBlank(atta.getSavePath())) + { + continue; + } + + File file = new File(atta.getSavePath()); + Integer fileNameCount = fileNameContMap.get(atta.getFileName()); + fileNameCount = fileNameCount == null ? 0 : fileNameCount; + fileNameCount += 1; + fileNameContMap.put(atta.getFileName(), fileNameCount); + String attaName = atta.getFileName(); + String zipEntryName = attaName; + if (attaName.lastIndexOf(".") != -1) + { + zipEntryName = attaName.substring(0, attaName.lastIndexOf(".")); + } + + zipOut.putNextEntry(new ZipEntry(Strings.addEndsWith(zipEntryName + (fileNameCount > 1 ? "(" + (fileNameCount - 1) + ")" : ""), + Strings.addStartsWith(atta.getFileType(), ".")))); + try (FileInputStream input = new FileInputStream(file)) + { + int len = 0; + byte[] buf = new byte[1024 * 20]; + while ((len = input.read(buf)) != -1) + { + zipOut.write(buf, 0, len); + zipOut.flush(); + } + } + zipOut.closeEntry(); + } + + zipOut.finish(); + zipOut.close(); + + // 最后打包写出 + responseFile(tempZipFilePath, request, zipName); + } + } + + /** + * 响应文件 + * + * @param filePath 文件路径 + * @param response + * @throws IOException + * @throws Exception + */ + public static void responseFile(String filePath, HttpRequest request, String fileName) throws IOException + { + HttpResponse response = request.getResponse(); + if (Validates.isEmptyBlank(fileName)) + { + fileName = Files.getFileName(filePath); + } + + try (FileInputStream input = new FileInputStream(filePath)) + { + String downName = fileName; + Matcher resizeMatcher = Pattern.compile("[\u4e00-\u9fa5]+").matcher(fileName); + while (resizeMatcher.find()) + { + String zhCode = resizeMatcher.group(); + String encode = Urls.encodeUTF8(zhCode); + downName = resizeMatcher.replaceAll(encode); + } + if (request.isChrome()) + {// chrome不支持括号也是醉了 + downName = downName.replaceAll("%28", "("); + downName = downName.replaceAll("%29", ")"); + } + + if (request.isFirefox()) + { + response.setHeader(_CONTENT_DISPOSITION_, "attachment; filename*=UTF-8''" + fileName); + } + else + { + response.setHeader(_CONTENT_DISPOSITION_, "attachment; filename=" + downName); + } + + response.setContentType(_APPLICATION_OCTET_STREAM_); + response.setHeader(_CONTENT_LENGTH_, new File(filePath).length()); + Streams.putBytes(input, response.getOutputStream()); + } + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/OrgSelectorAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/OrgSelectorAction.java new file mode 100644 index 0000000..c3870a9 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/OrgSelectorAction.java @@ -0,0 +1,27 @@ +package com.zhiqim.yangcai.design.action; + +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.manager.ZmrBootstrap; +import org.zhiqim.manager.dbo.ZmrOrg; +import org.zhiqim.orm.dbo.Selector; + +/** + * + * [简要描述] 组织选择器:
            + * [详细描述]:
            + * + * @version 1.0 @author gjx 2020年9月21日 新建与整理 + */ +public class OrgSelectorAction implements Action +{ + @Override + public void execute(HttpRequest request) throws Exception + { + String orgName = request.getParameter("orgName"); + List list = ZmrBootstrap.tableOpr(request).list(ZmrOrg.class, new Selector().addMaybeLike("orgName", orgName).addMust("orgStatus", 0)); + request.setAttribute("list", list); + } +} \ No newline at end of file diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/PNGAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/PNGAction.java new file mode 100644 index 0000000..95bb7cf --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/PNGAction.java @@ -0,0 +1,73 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.action; + +import java.io.File; +import java.io.FileInputStream; +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.HttpResponse; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.util.Longs; +import org.zhiqim.kernel.util.Streams; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.constants.FileTypeConstants; +import com.zhiqim.yangcai.design.dbo.order.DesignAtta; + +/** + * TODO:初稿缩略图读取PNG图片 + * + * @version v1.0.0 @author Deng 2017-6-9 新建与整理 + */ +public class PNGAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + HttpResponse response = request.getResponse(); + List paramList = request.getParameterMatch(); + + long designId = Longs.toLong(paramList.get(0)); + Selector selector = new Selector(); + selector.addMust("designId", designId); + selector.addMust("attaModul", FileTypeConstants.FILE_FIRSTTHUMFILE.value()); + DesignAtta atta = ORM.get(ZTable.class).item(DesignAtta.class, selector); + if (atta == null) + { + response.sendError(_404_NOT_FOUND_); + return; + } + + if (Validates.isNotEmptyBlank(atta.getOssUrl())) + request.setRedirect(atta.getOssUrl());//从oss下载数据做显示 + else + {//从本地响应做显示 + response.setContentType("image/png"); + File file = new File(atta.getSavePath()); + if (!file.exists()) + { + response.sendError(_404_NOT_FOUND_); + return; + } + try (FileInputStream input = new FileInputStream(file)) + { + Streams.putBytes(input, response.getOutputStream()); + } + } + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/PdfQueueAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/PdfQueueAction.java new file mode 100644 index 0000000..661ab97 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/PdfQueueAction.java @@ -0,0 +1,73 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.action; + +import java.lang.reflect.Field; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.control.HandlerController; +import org.zhiqim.kernel.control.Queue; +import org.zhiqim.kernel.control.Threader; + +import com.zhiqim.media.service.handler.MediaCanvasController; + +/** + * pdf定稿队列 不能修改数据 否则会造成定稿错误 + * + * @version v1.0.0 @author yixin 2020-08-29 新建与整理 + */ +public class PdfQueueAction implements Action +{ + + @SuppressWarnings( + { + "unchecked", "rawtypes" + }) + @Override + public void execute(HttpRequest request) throws Exception + { + MediaCanvasController controller = Global.getService(MediaCanvasController.class); + Field topdfcontrollerField = controller.getClass().getDeclaredField("topdfcontroller"); + topdfcontrollerField.setAccessible(true); + HandlerController topdfcontroller = (HandlerController) topdfcontrollerField.get(controller); + List theaderList = topdfcontroller.getThreaderList(); + int sleepNum = 0; + int runNum = 0; + for (Threader threader : theaderList) + { + if (threader.isActive()) + { + runNum++; + } + else + { + sleepNum++; + } + } + Queue queue = topdfcontroller.getQueue(); + Field runnableListField = queue.getClass().getDeclaredField("list"); + runnableListField.setAccessible(true); + List runnableList = (List) runnableListField.get(queue); + Field pdfSuccMapField = controller.getClass().getDeclaredField("pdfSuccMap"); + pdfSuccMapField.setAccessible(true); + Map pdfSuccMap = (Map) pdfSuccMapField.get(controller); + request.setAttribute("theaderList", theaderList); + request.setAttribute("waitQueue", runnableList); + request.setAttribute("finishList", pdfSuccMap.values()); + request.setAttribute("sleepNum", sleepNum); + request.setAttribute("runNum", runNum); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/QuickContextAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/QuickContextAction.java new file mode 100644 index 0000000..d80ce1e --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/QuickContextAction.java @@ -0,0 +1,129 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.HttpResponse; +import org.zhiqim.httpd.context.ZmlContexts; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.httpd.validate.ones.IsNotEmpty; +import org.zhiqim.kernel.constants.HttpConstants; +import org.zhiqim.kernel.extend.HashMapSO; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.kernel.util.Lists; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.manager.ZmrBootstrap; +import org.zhiqim.manager.dao.ZmrOperatorDao; +import org.zhiqim.manager.dbo.ZmrDept; +import org.zhiqim.manager.dbo.ZmrOperator; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; + +/**** + * 快捷联系 + * + * @version v1.0.0 @author lgz 2019-4-13 新建与整理 + */ +public class QuickContextAction implements Action, HttpConstants +{ + private static final Log log = LogFactory.getLog(QuickContextAction.class); + + @Override + public void execute(HttpRequest request) + { + HttpResponse response = request.getResponse(); + response.setCharacterEncoding(_UTF_8_); + try + { + request.addValidate(new IsNotEmpty("orderId", "请选择订单")); + if (!request.chkValidate()) + { + response.print(""); + return; + } + + long designId = request.getParameterLong("orderId"); + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, new Selector("designId", designId)); + if (order == null) + { + response.print(""); + return; + } + + // 获取客服信息 + HashMapSO attrMap = new HashMapSO(); + attrMap.put("order", order); + + ZmrOperator deptManager = null; + ZmrOperator supperDeptManager = null; + if (Validates.isNotEmptyBlank(order.getDesigner())) + {// 已经分派给设计师了 + // 设计师 + ZmrOperator designer = ZmrOperatorDao.getOperator(request, order.getDesigner()); + attrMap.put("operator", designer); + if (designer != null) + { + long deptId = 0; + if (Lists.toLongList(designer.getOperatorDept()).size() > 0) + { + deptId = Lists.toLongList(designer.getOperatorDept()).get(0); + } + + if (deptId > 0 && designer.getOrgId() > 0) + { + Selector sel = new Selector("orgId", designer.getOrgId()).addMust("deptId", deptId).addOrderbyAsc("deptLevel,deptSeq,deptId"); + ZmrDept dept = ZmrBootstrap.table(request).item(ZmrDept.class, sel); + if (dept != null) + { + // 设计主管 及部门负责人 + if (Validates.isNotEmptyBlank(dept.getDeptManager())) + { + deptManager = ZmrOperatorDao.getOperator(request, dept.getDeptManager()); + } + + if (dept.getParentId() == 0) + { + supperDeptManager = deptManager; + } + else + {// 紧急联系人 紧急联系人为上上级部门负责人。 + Selector sel2 = new Selector("orgId", dept.getOrgId()); + sel2.addMust("deptId", dept.getParentId()); + sel2.addOrderbyAsc("deptLevel,deptSeq,deptId"); + ZmrDept supperDept = ZmrBootstrap.table(request).item(ZmrDept.class, sel2); + if (supperDept != null && Validates.isNotEmptyBlank(supperDept.getDeptManager())) + { + supperDeptManager = ZmrOperatorDao.getOperator(request, supperDept.getDeptManager()); + } + } + } + } + } + } + + attrMap.put("deptManager", deptManager); + attrMap.put("supperDeptManager", supperDeptManager); + String resultHtml = ZmlContexts.parseZmlPath(request, "/zview/order/presenter/quickContact.zml", attrMap); + + // 响应结果 + response.print(resultHtml); + } + catch (Exception e) + { + log.error("快捷联系 异常:", e); + } + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/QuickContextInfoAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/QuickContextInfoAction.java new file mode 100644 index 0000000..562a7e5 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/QuickContextInfoAction.java @@ -0,0 +1,131 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.HttpResponse; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.httpd.validate.ones.IsNotEmpty; +import org.zhiqim.kernel.constants.HttpConstants; +import org.zhiqim.kernel.extend.HashMapSO; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.kernel.util.Lists; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.manager.ZmrBootstrap; +import org.zhiqim.manager.dao.ZmrOperatorDao; +import org.zhiqim.manager.dbo.ZmrDept; +import org.zhiqim.manager.dbo.ZmrOperator; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; + +/**** + * 快捷联系(返回json字符串) + * + * @version v1.0.0 @author 蒋斌 2019-10-10 新建与整理 + */ +public class QuickContextInfoAction implements Action, HttpConstants +{ + private static final Log log = LogFactory.getLog(QuickContextInfoAction.class); + + @Override + public void execute(HttpRequest request) + { + + HttpResponse response = request.getResponse(); + response.setCharacterEncoding(_UTF_8_); + try + { + request.addValidate(new IsNotEmpty("orderId", "请选择订单")); + if (!request.chkValidate()) + { + response.print(""); + return; + } + + long designId = request.getParameterLong("orderId"); + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, new Selector("designId", designId)); + if (order == null) + { + response.print(""); + return; + } + + // 获取客服信息 + HashMapSO attrMap = new HashMapSO(); + attrMap.put("order", order); + + ZmrOperator deptManager = null; + ZmrOperator supperDeptManager = null; + if (Validates.isNotEmptyBlank(order.getDesigner())) + {// 已经分派给设计师了 + // 设计师 + ZmrOperator designer = ZmrOperatorDao.getOperator(request, order.getDesigner()); + attrMap.put("operator", designer); + if (designer != null) + { + long deptId = 0; + if (Lists.toLongList(designer.getOperatorDept()).size() > 0) + { + deptId = Lists.toLongList(designer.getOperatorDept()).get(0); + } + + if (deptId > 0 && designer.getOrgId() > 0) + { + Selector sel = new Selector("orgId", designer.getOrgId()).addMust("deptId", deptId).addOrderbyAsc("deptLevel,deptSeq,deptId"); + ZmrDept dept = ZmrBootstrap.table(request).item(ZmrDept.class, sel); + if (dept != null) + { + // 设计主管 及部门负责人 + if (Validates.isNotEmptyBlank(dept.getDeptManager())) + { + deptManager = ZmrOperatorDao.getOperator(request, dept.getDeptManager()); + } + + if (dept.getParentId() == 0) + { + supperDeptManager = deptManager; + } + else + {// 紧急联系人 紧急联系人为上上级部门负责人。 + Selector sel2 = new Selector("orgId", dept.getOrgId()); + sel2.addMust("deptId", dept.getParentId()); + sel2.addOrderbyAsc("deptLevel,deptSeq,deptId"); + ZmrDept supperDept = ZmrBootstrap.table(request).item(ZmrDept.class, sel2); + if (supperDept != null && Validates.isNotEmptyBlank(supperDept.getDeptManager())) + { + supperDeptManager = ZmrOperatorDao.getOperator(request, supperDept.getDeptManager()); + } + } + } + } + } + } + + attrMap.put("deptManager", deptManager); + attrMap.put("supperDeptManager", supperDeptManager); + String result = Jsons.toString(attrMap); + + // 响应结果 + response.print(result); + + } + catch (Exception e) + { + log.error("快捷联系 异常:", e); + } + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/TagAttaInfoListAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/TagAttaInfoListAction.java new file mode 100644 index 0000000..6032df4 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/TagAttaInfoListAction.java @@ -0,0 +1,43 @@ +/** + * 扬彩印刷设计 + * 文件名 :TagAttaInfoListAction.java + * 创建人 :gjx + * 创建时间:2019-12-19 + */ + +package com.zhiqim.yangcai.design.action; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.order.DesignSelfView; +import com.zhiqim.yangcai.design.dbo.template.MediaTemplateView; + +/** + * [简要描述]订单标签列表,右边iframe使用:
            + * [详细描述]:
            + * + * @version 1.0 @author gjx 2019-12-19 新建与整理 + */ +public class TagAttaInfoListAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + long designId = request.getParameterLong("designId"); + DesignSelfView order = new DesignSelfView(); + MediaTemplateView mediaTemplate = new MediaTemplateView(); + if (designId > 0) + { + order = ORM.get(ZView.class).item(DesignSelfView.class, new Selector("designId", designId)); + mediaTemplate = ORM.get(ZView.class).item(MediaTemplateView.class, new Selector("designId", designId)); + } + request.setAttribute("order", order); + request.setAttribute("mediaTemplate", mediaTemplate); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/ThumImgAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/ThumImgAction.java new file mode 100644 index 0000000..e00d73c --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/ThumImgAction.java @@ -0,0 +1,245 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.action; + +import java.awt.image.BufferedImage; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.OutputStream; +import java.net.FileNameMap; +import java.net.URLConnection; +import java.util.List; + +import javax.imageio.ImageIO; + +import org.icepdf.core.pobjects.Document; +import org.icepdf.core.pobjects.Page; +import org.icepdf.core.util.GraphicsRenderingHints; +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.HttpResponse; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.kernel.util.Ints; +import org.zhiqim.kernel.util.Longs; +import org.zhiqim.kernel.util.Streams; +import org.zhiqim.kernel.util.Strings; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; + +import com.zhiqim.yangcai.design.constants.FileTypeConstants; +import com.zhiqim.yangcai.design.dbo.order.DesignAtta; +import com.zhiqim.yangcai.design.presenter.UploadFilePresenter; + +/** + * TODO:读取PDF文件 + * + * @version v1.0.0 @author longguizhi 2017-5-23 新建与整理 + */ +public class ThumImgAction implements Action +{ + private static Log log = LogFactory.getLog(ThumImgAction.class); + + @Override + public void execute(HttpRequest request) throws Exception + { + HttpResponse response = request.getResponse(); + + String name = Strings.trim(request.getPathInContext(), "/", ""); + String[] nameinfo = name.split("-"); + if (nameinfo.length < 2) + { + response.sendError(_404_NOT_FOUND_); + return; + } + + if (!Validates.isIntegerPositive(nameinfo[0])) + { + response.sendError(_404_NOT_FOUND_); + return; + } + + long attaId = Longs.toLong(nameinfo[0]); + int page = Ints.toInt(nameinfo[1]); + + DesignAtta atta = ORM.get(ZTable.class).item(DesignAtta.class, attaId); + String suffix = atta.getFileType(); + if (Validates.isEmptyBlank(suffix)) + { + response.sendError(_404_NOT_FOUND_); + return; + } + + suffix = suffix.toLowerCase(); + if ("cdr".equals(suffix)) + { + response.sendError(_404_NOT_FOUND_); + return; + } + + if (Validates.isUrl(atta.getOssUrl())) + {// 设置重定向到OSS + request.setRedirect(atta.getOssUrl()); + return; + } + + sendThumbnail(atta, response, page); + } + + /*** + * 读取缩略图 + * + * @param atta + * @param response + * @param page + * @throws Exception + */ + private void sendThumbnail(DesignAtta atta, HttpResponse response, int page) throws Exception + { + if (atta == null) + { + response.sendError(_404_NOT_FOUND_); + return; + } + + if ("pdf".equalsIgnoreCase(atta.getFileType())) + {// pdf文件 + List thumFileNameList = UploadFilePresenter.getThumFileNames(atta); + if (thumFileNameList.size() == 0) + { + response.sendError(_404_NOT_FOUND_); + return; + } + + String thumFilePath = Strings + .addEndsWith(UploadFilePresenter.getCurrentTempFolder(Strings.addEndsWith(FileTypeConstants.FILE_THUMFILE.value(), "/")), "/") + + atta.getAttaId() + "-" + FileTypeConstants.FILE_THUMFILE.value() + "-" + page + ".png"; + File thumFile = new File(thumFilePath); + if (!thumFile.exists()) + { + response.sendError(_404_NOT_FOUND_); + return; + } + + response.setContentType("image/png"); + + try (FileInputStream input = new FileInputStream(thumFile)) + { + OutputStream os = response.getOutputStream(); + Streams.putBytes(input, os); + os.flush(); + os.close(); + input.close(); + } + } + else + {// 其他图片类型 + FileNameMap mime = URLConnection.getFileNameMap(); + String mimeType = mime.getContentTypeFor(atta.getSavePath()); + if (Validates.isEmptyBlank(mimeType) || !Strings.toLowerCase(mimeType).startsWith("image")) + { + response.sendError(_404_NOT_FOUND_); + return; + } + + response.setContentType("image/png"); + + File file = new File(atta.getSavePath()); + if (!file.exists()) + { + response.sendError(_404_NOT_FOUND_); + return; + } + + try (FileInputStream input = new FileInputStream(file)) + { + Streams.putBytes(input, response.getOutputStream()); + } + } + } + + @SuppressWarnings("unused") + private void sendPDFtoImg(DesignAtta atta, HttpResponse response, int page) throws Exception + { + + if (atta == null) + { + response.sendError(_404_NOT_FOUND_); + return; + } + + response.setContentType("image/png"); + Document document = new Document(); + + try + { + File file = new File(atta.getSavePath()); + if (!file.exists()) + { + response.sendError(_404_NOT_FOUND_); + return; + } + + document.setFile(atta.getSavePath()); + int pdfpage = document.getNumberOfPages(); + + page = page > pdfpage ? pdfpage : (page < 0 ? 0 : page); + float scale = 2f; + float rotation = 0f; + + BufferedImage image = document.getPageImage(page, GraphicsRenderingHints.SCREEN, Page.BOUNDARY_CROPBOX, rotation, scale); + try + { + ByteArrayOutputStream output = new ByteArrayOutputStream(); + ImageIO.write(image, "png", output); + Streams.putBytes(new ByteArrayInputStream(output.toByteArray()), response.getOutputStream()); + } + catch (IOException e) + { + log.error("显示缩略图异常:", e); + } + } + catch (Exception e) + { + log.error("显示缩略图异常:", e); + } + finally + { + document.dispose(); + } + } + + @SuppressWarnings("unused") + private void sendImg(DesignAtta atta, HttpResponse response) throws Exception + { + if (atta == null) + { + response.sendError(_404_NOT_FOUND_); + return; + } + + response.setContentType("image/png"); + String filePath = atta.getSavePath(); + File file = new File(filePath); + if (file.exists()) + { + try (FileInputStream input = new FileInputStream(file)) + { + Streams.putBytes(input, response.getOutputStream()); + } + } + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/account/VirtualAccountAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/account/VirtualAccountAction.java new file mode 100644 index 0000000..3c199af --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/account/VirtualAccountAction.java @@ -0,0 +1,290 @@ +package com.zhiqim.yangcai.design.action.account; + +import java.sql.Timestamp; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.transaction.Transaction; +import org.zhiqim.kernel.transaction.TransactionManager; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.design.constant.VirtualAccountConstants; +import com.zhiqim.yangcai.design.dbo.account.VirtualAccount; +import com.zhiqim.yangcai.design.dbo.account.VirtualAccountDetails; +import com.zhiqim.yangcai.design.dbo.account.VirtualTransactionDetails; + +/** + * + * [简要描述]:虚拟账户 资金账户列表
            + * [详细描述]:
            + * + * @version 1.0 @author hc 2021年6月21日 新建与整理 + */ +@AnAlias("VirtualAccountAction") +public class VirtualAccountAction implements Action +{ + + private static final Log log = LogFactory.getLog(VirtualAccountAction.class); + + @Override + public void execute(HttpRequest request) throws Exception + { + int pageNo = request.getParameterInt("page", 1); + int pageSize = request.getParameterInt("pageSize", 8); + + Selector selector = new Selector(); + selector.addMaybeLike("operatorCode", request.getParameter("operatorCode")); + + PageResult pageResult = ORM.get(ZTable.class).page(VirtualAccount.class, pageNo, pageSize, selector); + pageResult.addConditionMap(request.getParameterMap()); + + request.setAttribute("pageResult", pageResult); + } + + /** + * + * [简要描述]:发工资
            + * [详细描述]:
            + * + * @author hc + * @param request + * @param operatorCode + * @param modifyMoney + * @throws Exception + */ + public static void sendSalary(HttpRequest request) throws Exception + { + String desinger = request.getParameter("operatorCode");// 设计师 + String operatorCode = request.getSessionName();// 操作人员 + long modifyMoney = request.getParameterLong("modifyMoney"); + String remark = request.getParameter("remark"); + if (-1 == modifyMoney) + { + request.setResponseError("发放金额不能为空!"); + return; + } + VirtualAccount virtualAccount = ORM.get(ZTable.class).item(VirtualAccount.class, new Selector().addMust("operatorCode", desinger)); + long modifyMoneys = modifyMoney * 100; + + if (modifyMoneys <= 0) + { + request.setResponseError("发放金额必须大于0!"); + return; + } + + if (modifyMoneys > virtualAccount.getUsableMoney()) + { + request.setResponseError("发放金额不可大于可用金额!"); + return; + } + + int sendSalary = Integer.parseInt((VirtualAccountConstants.SENDSALARY.value())); + + Transaction tx = null; + try + { + tx = TransactionManager.beginTransaction(); + operatorSalary(desinger, operatorCode, virtualAccount, modifyMoneys, sendSalary, remark); + tx.commit(); + } + catch (Exception e) + { + if (tx != null) + { + tx.rollback(); + } + request.returnCloseDialog("发放失败,请重试"); + log.error("设计师:【" + desinger + "】发放工资失败,金额为:【" + modifyMoneys + "】", e); + } + finally + { + if (tx != null) + { + tx.close(); + } + } + + } + + /** + * + * [简要描述]:冻结资金
            + * [详细描述]:
            + * + * @author hc + * @param request + * @param operatorCode + * @param modifyMoney + * @throws Exception + */ + public static void freezeSalary(HttpRequest request) throws Exception + { + String desinger = request.getParameter("operatorCode"); + String operatorCode = request.getSessionName(); + long modifyMoney = request.getParameterLong("modifyMoney"); + String remark = request.getParameter("remark"); + if (-1 == modifyMoney) + { + request.setResponseError("冻结金额不能为空!"); + return; + } + VirtualAccount virtualAccount = ORM.get(ZTable.class).item(VirtualAccount.class, new Selector().addMust("operatorCode", desinger)); + long modifyMoneys = modifyMoney * 100; + + if (modifyMoneys <= 0) + { + request.setResponseError("冻结金额必须大于0!"); + return; + } + + if (modifyMoneys > virtualAccount.getUsableMoney()) + { + request.setResponseError("冻结金额不可大于可用金额!"); + return; + } + + int sendSalary = Integer.parseInt((VirtualAccountConstants.FREEZESALARY.value())); + + Transaction tx = null; + try + { + tx = TransactionManager.beginTransaction(); + operatorSalary(desinger, operatorCode, virtualAccount, modifyMoneys, sendSalary, remark); + tx.commit(); + } + catch (Exception e) + { + if (tx != null) + { + tx.rollback(); + } + request.returnCloseDialog("冻结失败,请重试"); + log.error("设计师:【" + desinger + "】冻结工资失败,金额为:【" + modifyMoneys + "】", e); + } + finally + { + if (tx != null) + { + tx.close(); + } + } + + } + + // 发放工资,冻结资金共用同步信息 + public static void operatorSalary(String desinger, String operatorCode, VirtualAccount virtualAccount, long modifyMoneys, int sendSalary, String remark) + throws Exception + { + Updater updater = new Updater(); + // 设计师 + VirtualAccountDetails designerAccountDetails = new VirtualAccountDetails(); + VirtualTransactionDetails designerTransactionDetails = new VirtualTransactionDetails(); + // 操作人员 + VirtualAccountDetails operatorAccountDetails = new VirtualAccountDetails(); + VirtualTransactionDetails operatorTransactionDetails = new VirtualTransactionDetails(); + + // 发放工资记录 + if (sendSalary == 102) + { + // 设计师记录 + updater.addField("sumMoney", virtualAccount.getSumMoney() - modifyMoneys); + + designerAccountDetails.setTransactionStatus(sendSalary); + designerAccountDetails.setUsableMoney(virtualAccount.getUsableMoney() - modifyMoneys); + designerAccountDetails.setSumMoney(virtualAccount.getSumMoney() - modifyMoneys); + designerAccountDetails.setOperatorRemark(operatorCode + "发放" + "-
            " + remark); + + designerTransactionDetails.setTransactionStatus(sendSalary); + + // 操作人员记录 + operatorAccountDetails.setTransactionStatus(sendSalary); + operatorAccountDetails.setOperatorRemark("发给:" + desinger + "-
            " + remark); + + operatorTransactionDetails.setTransactionStatus(sendSalary); + } + // 冻结资金记录 + else if (sendSalary == 103) + { + // 设计师记录 + updater.addField("freezeMoney", virtualAccount.getFreezeMoney() + modifyMoneys); + + designerAccountDetails.setTransactionStatus(sendSalary); + designerAccountDetails.setFreezeMoneyAdd(modifyMoneys); + designerAccountDetails.setOperatorRemark(operatorCode + "冻结" + "-
            " + remark); + + designerTransactionDetails.setTransactionStatus(sendSalary); + + // 操作人员记录 + operatorAccountDetails.setTransactionStatus(sendSalary); + operatorAccountDetails.setOperatorRemark("冻结:" + desinger + "-
            " + remark); + + operatorTransactionDetails.setTransactionStatus(sendSalary); + } + + updater.addMust("operatorCode", desinger); + updater.addField("usableMoney", virtualAccount.getUsableMoney() - modifyMoneys); + ORM.get(ZTable.class).update(VirtualAccount.class, updater); + + Timestamp nowTimestamp = Sqls.nowTimestamp(); + long designerTransactionBlotter = Ids.longId(); + long operatorTransactionBlotter = Ids.longId(); + Timestamp endTime = Sqls.nowTimestamp(); + // 同步虚拟账户 账户明细表 + // 设计师记录 + designerAccountDetails.setAccountBlotter(Ids.longId()); + designerAccountDetails.setOperatorCode(desinger); + designerAccountDetails.setTransactionBlotter(designerTransactionBlotter); + designerAccountDetails.setUsableMoneyDown(-modifyMoneys); + designerAccountDetails.setOperatorTime(nowTimestamp); + ORM.get(ZTable.class).insert(designerAccountDetails); + + // 操作人员记录 + operatorAccountDetails.setAccountBlotter(Ids.longId()); + operatorAccountDetails.setOperatorCode(operatorCode); + operatorAccountDetails.setTransactionBlotter(operatorTransactionBlotter); + operatorAccountDetails.setOperatorTime(nowTimestamp); + ORM.get(ZTable.class).insert(operatorAccountDetails); + + // 同步虚拟账户 交易明细表 + // 设计师记录 + designerTransactionDetails.setOperatorCode(desinger); + designerTransactionDetails.setTransactionBlotter(designerTransactionBlotter); + designerTransactionDetails.setOrderMoney(modifyMoneys); + designerTransactionDetails.setEndTime(endTime); + designerTransactionDetails.setTransactionTime(nowTimestamp); + ORM.get(ZTable.class).insert(designerTransactionDetails); + + // 操作人员记录 + operatorTransactionDetails.setOperatorCode(operatorCode); + operatorTransactionDetails.setTransactionBlotter(operatorTransactionBlotter); + operatorTransactionDetails.setEndTime(endTime); + operatorTransactionDetails.setTransactionTime(nowTimestamp); + operatorTransactionDetails.setOrderMoney(modifyMoneys); + ORM.get(ZTable.class).insert(operatorTransactionDetails); + } + + // 修改设计师账户状态 + public static void updateStatus(HttpRequest request, int num, String operatorCode) throws Exception + { + Updater updater = new Updater(); + updater.addMust("operatorCode", operatorCode); + if (num == 1) + { + updater.addField("operatorStatus", 1); + } + else + { + updater.addField("operatorStatus", 0); + } + ORM.get(ZTable.class).update(VirtualAccount.class, updater); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/account/VirtualAccountDetailsAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/account/VirtualAccountDetailsAction.java new file mode 100644 index 0000000..53f33ab --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/account/VirtualAccountDetailsAction.java @@ -0,0 +1,74 @@ +package com.zhiqim.yangcai.design.action.account; + +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.account.VirtualAccountDetails; +import com.zhiqim.yangcai.design.dbo.account.VirtualAccountType; + +/** + * + * [简要描述]:虚拟账户 账户明细表
            + * [详细描述]:
            + * + * @version 1.0 @author hc 2021年6月19日 新建与整理 + */ +public class VirtualAccountDetailsAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + int pageNo = request.getParameterInt("page", 1); + int pageSize = request.getParameterInt("pageSize", 12); + String operatorCode = null; + if (request.getParameter("operatorCode") == null || request.getParameter("operatorCode").isEmpty()) + { + operatorCode = request.getSessionName(); + } + else + { + operatorCode = request.getParameter("operatorCode"); + } + + Long parameter = request.getParameterLong("status"); + request.setAttribute("status", parameter); + + Long typeId = request.getParameterLong("typeId"); + + String beginDate = request.getParameter("beginDate", DateTimes.getPreviousDateStringByMonth(1)); + String endDate = request.getParameter("endDate", DateTimes.getDateString()); + request.setAttribute("beginDate", beginDate); + request.setAttribute("endDate", endDate); + + Selector vadSel = new Selector(); + Selector vatSel = new Selector(); + // 总账户页面 + vadSel.addMaybe("transactionStatus", typeId); + + vadSel.addMaybe("accountBlotter", request.getParameterLong("accountBlotter")); + vadSel.addMaybe("transactionBlotter", request.getParameterLong("transactionBlotter")); + vadSel.addMustThenGE("operatorTime", Sqls.toTimestamp(beginDate, "00:00:00")); + vadSel.addMustThenLE("operatorTime", Sqls.toTimestamp(endDate, "23:59:59")); + vadSel.addMust("operatorCode", operatorCode); + vadSel.addOrderbyDesc("operatorTime"); + vadSel.addOrderbyDesc("usableMoney"); + PageResult pageResult = ORM.get(ZTable.class).page(VirtualAccountDetails.class, pageNo, pageSize, vadSel); + pageResult.addConditionMap(request.getParameterMap()); + + request.setAttribute("pageResult", pageResult); + + // 可查询条件 + List statusType = ORM.get(ZTable.class).list(VirtualAccountType.class, vatSel); + request.setAttribute("statusType", statusType); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/account/VirtualAccountTransactionDetailsAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/account/VirtualAccountTransactionDetailsAction.java new file mode 100644 index 0000000..6d865c7 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/account/VirtualAccountTransactionDetailsAction.java @@ -0,0 +1,76 @@ +package com.zhiqim.yangcai.design.action.account; + +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.account.VirtualAccountType; +import com.zhiqim.yangcai.design.dbo.account.VirtualTransactionDetails; + +/** + * + * [简要描述]:虚拟账户 交易明细表
            + * [详细描述]:
            + * + * @version 1.0 @author hc 2021年6月19日 新建与整理 + */ +public class VirtualAccountTransactionDetailsAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + int pageNo = request.getParameterInt("page", 1); + int pageSize = request.getParameterInt("pageSize", 12); + String operatorCode = null; + if (request.getParameter("operatorCode") == null || request.getParameter("operatorCode").isEmpty()) + { + operatorCode = request.getSessionName(); + } + else + { + operatorCode = request.getParameter("operatorCode"); + } + Long parameter = request.getParameterLong("status"); + request.setAttribute("status", parameter); + + Long typeId = request.getParameterLong("typeId"); + + long designId = request.getParameterLong("designId"); + long transactionBlotter = request.getParameterLong("transactionBlotter"); + + String beginDate = request.getParameter("beginDate", DateTimes.getPreviousDateStringByMonth(1)); + String endDate = request.getParameter("endDate", DateTimes.getDateString()); + request.setAttribute("beginDate", beginDate); + request.setAttribute("endDate", endDate); + + Selector vadSel = new Selector(); + Selector vatSel = new Selector(); + // 总账户页面 + + vadSel.addMaybe("transactionStatus", typeId); + + vadSel.addMaybe("transactionBlotter", transactionBlotter); + vadSel.addMaybe("designId", designId); + vadSel.addMustThenGE("transactionTime", Sqls.toTimestamp(beginDate, "00:00:00")); + vadSel.addMustThenLE("transactionTime", Sqls.toTimestamp(endDate, "23:59:59")); + vadSel.addMust("operatorCode", operatorCode); + vadSel.addOrderbyDesc("transactionTime"); + PageResult pageResult = ORM.get(ZTable.class).page(VirtualTransactionDetails.class, pageNo, pageSize, vadSel); + pageResult.addConditionMap(request.getParameterMap()); + request.setAttribute("pageResult", pageResult); + + // 可查询条件 + List statusType = ORM.get(ZTable.class).list(VirtualAccountType.class, vatSel); + request.setAttribute("statusType", statusType); + + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/after/AfterBlameReturnOrderAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/after/AfterBlameReturnOrderAction.java new file mode 100644 index 0000000..41f3245 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/after/AfterBlameReturnOrderAction.java @@ -0,0 +1,154 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action.after; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.manager.dao.ZmrOperatorDao; +import org.zhiqim.manager.dao.ZmrOrgDao; +import org.zhiqim.manager.dbo.ZmrOperator; +import org.zhiqim.manager.dbo.ZmrOrg; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.constants.AfterConstants; +import com.zhiqim.yangcai.design.dbo.after.DesignAfterOrderView; +import com.zhiqim.yangcai.design.dbo.design.AfterPicType; +import com.zhiqim.yangcai.design.dbo.design.AfterProblemType; + +/*** + * 申诉单列表 + * + * @version v1.0.0 @author longguizhi 2018-12-16 新建与整理 + */ +public class AfterBlameReturnOrderAction implements Action +{ + @Override + public void execute(HttpRequest request) throws Exception + { + int pageNo = request.getParameterInt("page"); + pageNo = pageNo <= 0 ? 1 : pageNo; + int pageSize = request.getParameterInt("pageSize"); + pageSize = pageSize <= 0 ? 20 : (pageSize > 1000 ? 1000 : pageSize); + String startCreateDate = request.getParameter("startCreateDate", DateTimes.getPreviousDateString(20));// 默认查询20天前 + String endCreateDate = request.getParameter("endCreateDate", DateTimes.getDateString());// 默认当天 + long designId = request.getParameterLong("designId"); + int day = DateTimes.compareDay(endCreateDate, startCreateDate); + if (day > 31) + { + request.setResponseError("请勿将时间区间跨度选择大于一个月"); + return; + } + Selector selector = new Selector(); + String afterStatus = request.getParameter("afterStatus"); + if (afterStatus == null || "".equals(afterStatus)) + { + selector.addMaybeIn("afterStatus", AfterConstants.CS_100.value(), AfterConstants.CS_200.value(), AfterConstants.CS_500.value(), + AfterConstants.CS_F100.value()); + } + else if (afterStatus.equals("100")) + { + selector.addMaybe("afterStatus", AfterConstants.CS_100.value()); + } + else if (afterStatus.equals("200")) + { + selector.addMaybe("afterStatus", AfterConstants.CS_200.value()); + } + else if (afterStatus.equals("500")) + { + selector.addMaybe("afterStatus", AfterConstants.CS_500.value()); + } + else if (afterStatus.equals("-100")) + { + selector.addMaybe("afterStatus", AfterConstants.CS_F100.value()); + } + request.setAttribute("afterStatus", afterStatus); + // 不展示淘印通的申述 + selector.addMustNotInLong("merchantId", 1823193227002L); + selector.addMaybe("designAfsId", request.getParameterLong("designAfsId")); + selector.addMaybe("designId", request.getParameterLong("designId")); + selector.addMaybe("merchantId", request.getParameterLong("merchantId")); + selector.addMaybe("picType", request.getParameterInt("picType")); + selector.addMaybe("problemType", request.getParameter("problemType")); + selector.addMaybe("afterBlamer", request.getParameter("afterBlamer")); + selector.addMaybeThenGE("afterCreateTime", Sqls.toTimestamp(startCreateDate, "00:00:00")); + selector.addMaybeThenLE("afterCreateTime", Sqls.toTimestamp(endCreateDate, "23:59:59")); + + if (designId > 0) + { + selector.addOr(new Selector("designId", designId).addMust("outId", designId)); + } + + // 根据组织显示 + ZmrSessionUser sessionUser = request.getSessionUser(ZmrSessionUser.class); + long rootOrgId = ZmrOrgDao.getOrgRootId(request); + // 非总组织 + if (rootOrgId != sessionUser.getSelectedOrgId()) + { + selector.addMust("picOrgId", sessionUser.getSelectedOrgId()); + } + + selector.addOrderbyDesc("afterCreateTime"); + PageResult pageResult = ORM.get(ZView.class).page(DesignAfterOrderView.class, pageNo, pageSize, selector); + pageResult.addConditionMap(request.getParameterMap()); + + Map picNameMap = new HashMap(); + Map troubleNameMap = new HashMap(); + List picList = ORM.get(ZTable.class).list(AfterPicType.class); + for (AfterPicType item : picList) + { + picNameMap.put(item.getPicType(), item.getPicTypeName()); + } + + List troubleList = ORM.get(ZTable.class).list(AfterProblemType.class); + for (AfterProblemType item : troubleList) + { + troubleNameMap.put(item.getProblemType(), item.getProblemName()); + } + + // 数据设置 + request.setAttribute("pageResult", pageResult); + request.setAttribute("picList", picList); + request.setAttribute("troubleList", troubleList); + request.setAttribute("startCreateDate", startCreateDate); + request.setAttribute("endCreateDate", endCreateDate); + request.setAttribute("picNameMap", picNameMap); + request.setAttribute("troubleNameMap", troubleNameMap); + request.setAttribute("page", pageNo); + + List designerList = new ArrayList(); + if (rootOrgId == sessionUser.getSelectedOrgId()) + { + request.setAttribute("queryAll", true); + for (ZmrOrg org : ZmrOrgDao.list(request)) + { + designerList.addAll(ZmrOperatorDao.getOperator(request, org.getOrgId())); + } + } + else + { + designerList = ZmrOperatorDao.getOperator(request, sessionUser.getSelectedOrgId()); + } + + request.setAttribute("designerList", designerList); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/after/DesignAfterOrderAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/after/DesignAfterOrderAction.java new file mode 100644 index 0000000..0971c43 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/after/DesignAfterOrderAction.java @@ -0,0 +1,131 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action.after; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.manager.dao.ZmrOperatorDao; +import org.zhiqim.manager.dao.ZmrOrgDao; +import org.zhiqim.manager.dbo.ZmrOperator; +import org.zhiqim.manager.dbo.ZmrOrg; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.after.DesignAfterOrderView; +import com.zhiqim.yangcai.design.dbo.design.AfterPicType; +import com.zhiqim.yangcai.design.dbo.design.AfterProblemType; + +/*** + * 售后订单列表 + * + * @version v1.0.0 @author longguizhi 2018-12-16 新建与整理 + */ +public class DesignAfterOrderAction implements Action +{ + @Override + public void execute(HttpRequest request) throws Exception + { + int pageNo = request.getParameterInt("page"); + pageNo = pageNo <= 0 ? 1 : pageNo; + int pageSize = request.getParameterInt("pageSize"); + pageSize = pageSize <= 0 ? 20 : (pageSize > 1000 ? 1000 : pageSize); + String startCreateDate = request.getParameter("startCreateDate", DateTimes.getPreviousDateString(20));// 默认查询20天前 + String endCreateDate = request.getParameter("endCreateDate", DateTimes.getDateString());// 默认当天 + long designId = request.getParameterLong("designId"); + int day = DateTimes.compareDay(endCreateDate, startCreateDate); + if (day > 31) + { + request.setResponseError("请勿将时间区间跨度选择大于一个月"); + return; + } + Selector selector = new Selector(); + selector.addMaybe("designAfsId", request.getParameterLong("designAfsId")); + selector.addMaybe("designId", request.getParameterLong("designId")); + selector.addMaybe("merchantId", request.getParameterLong("merchantId")); + selector.addMaybe("afterStatus", request.getParameter("afterStatus")); + selector.addMaybe("picType", request.getParameterInt("picType")); + selector.addMaybe("problemType", request.getParameter("problemType")); + selector.addMaybe("designer", request.getParameter("designer")); + selector.addMaybeThenGE("afterCreateTime", Sqls.toTimestamp(startCreateDate, "00:00:00")); + selector.addMaybeThenLE("afterCreateTime", Sqls.toTimestamp(endCreateDate, "23:59:59")); + + if (designId > 0) + { + selector.addOr(new Selector("designId", designId).addMust("outId", designId)); + } + + // 根据组织显示 + ZmrSessionUser sessionUser = request.getSessionUser(ZmrSessionUser.class); + long rootOrgId = ZmrOrgDao.getOrgRootId(request); + // 非总组织 + if (rootOrgId != sessionUser.getSelectedOrgId()) + { + selector.addMust("picOrgId", sessionUser.getSelectedOrgId()); + } + + selector.addOrderbyDesc("afterCreateTime"); + PageResult pageResult = ORM.get(ZView.class).page(DesignAfterOrderView.class, pageNo, pageSize, selector); + pageResult.addConditionMap(request.getParameterMap()); + + Map picNameMap = new HashMap(); + Map troubleNameMap = new HashMap(); + List picList = ORM.get(ZTable.class).list(AfterPicType.class); + for (AfterPicType item : picList) + { + picNameMap.put(item.getPicType(), item.getPicTypeName()); + } + + List troubleList = ORM.get(ZTable.class).list(AfterProblemType.class); + for (AfterProblemType item : troubleList) + { + troubleNameMap.put(item.getProblemType(), item.getProblemName()); + } + + // 数据设置 + request.setAttribute("pageResult", pageResult); + request.setAttribute("picList", picList); + request.setAttribute("troubleList", troubleList); + request.setAttribute("startCreateDate", startCreateDate); + request.setAttribute("endCreateDate", endCreateDate); + request.setAttribute("picNameMap", picNameMap); + request.setAttribute("troubleNameMap", troubleNameMap); + request.setAttribute("page", pageNo); + + List designerList = new ArrayList(); + if (rootOrgId == sessionUser.getSelectedOrgId()) + { + request.setAttribute("queryAll", true); + for (ZmrOrg org : ZmrOrgDao.list(request)) + { + designerList.addAll(ZmrOperatorDao.getOperator(request, org.getOrgId())); + } + } + else + { + designerList = ZmrOperatorDao.getOperator(request, sessionUser.getSelectedOrgId()); + } + + request.setAttribute("designerList", designerList); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/after/HandledAfterOrderAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/after/HandledAfterOrderAction.java new file mode 100644 index 0000000..39edb37 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/after/HandledAfterOrderAction.java @@ -0,0 +1,133 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action.after; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.manager.dao.ZmrOperatorDao; +import org.zhiqim.manager.dao.ZmrOrgDao; +import org.zhiqim.manager.dbo.ZmrOperator; +import org.zhiqim.manager.dbo.ZmrOrg; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.constants.AfterConstants; +import com.zhiqim.yangcai.design.dbo.after.DesignAfterOrderView; +import com.zhiqim.yangcai.design.dbo.design.AfterPicType; +import com.zhiqim.yangcai.design.dbo.design.AfterProblemType; + +/**** + * 我导致的售后单 + * + * @version v1.0.0 @author lgz 2019-3-12 新建与整理 + */ +public class HandledAfterOrderAction implements Action +{ + @Override + public void execute(HttpRequest request) throws Exception + { + int pageNo = request.getParameterInt("page"); + pageNo = pageNo <= 0 ? 1 : pageNo; + int pageSize = request.getParameterInt("pageSize"); + pageSize = pageSize <= 0 ? 20 : (pageSize > 1000 ? 1000 : pageSize); + String startCreateDate = request.getParameter("startCreateDate", DateTimes.getPreviousDateString(20));// 默认查询20天前 + String endCreateDate = request.getParameter("endCreateDate", DateTimes.getDateString());// 默认当天 + long designId = request.getParameterLong("designId"); + int day = DateTimes.compareDay(endCreateDate, startCreateDate); + if (day > 31) + { + request.setResponseError("请勿将时间区间跨度选择大于一个月"); + return; + } + Selector selector = new Selector(); + selector.addMust("afterStatus", AfterConstants.CS_400.value()); + selector.addMaybe("designAfsId", request.getParameterLong("designAfsId")); + selector.addMaybe("designId", request.getParameterLong("designId")); + selector.addMaybe("merchantId", request.getParameterLong("merchantId")); + selector.addMaybe("picType", request.getParameterInt("picType")); + selector.addMaybe("afterBlamer", request.getParameter("afterBlamer")); + // selector.addMaybe("afterHandler", request.getParameter("afterHandler", + // request.getSessionName())); + selector.addMaybeThenGE("afterCreateTime", Sqls.toTimestamp(startCreateDate, "00:00:00")); + selector.addMaybeThenLE("afterCreateTime", Sqls.toTimestamp(endCreateDate, "23:59:59")); + + if (designId > 0) + { + selector.addOr(new Selector("designId", designId).addMust("outId", designId)); + } + + // 根据组织显示 + ZmrSessionUser sessionUser = request.getSessionUser(ZmrSessionUser.class); + long rootOrgId = ZmrOrgDao.getOrgRootId(request); + // 非总组织 + if (rootOrgId != sessionUser.getSelectedOrgId()) + { + selector.addMust("picOrgId", sessionUser.getSelectedOrgId()); + } + + selector.addOrderbyDesc("afterCreateTime"); + PageResult pageResult = ORM.get(ZView.class).page(DesignAfterOrderView.class, pageNo, pageSize, selector); + pageResult.addConditionMap(request.getParameterMap()); + + Map picNameMap = new HashMap(); + Map troubleNameMap = new HashMap(); + List picList = ORM.get(ZTable.class).list(AfterPicType.class); + for (AfterPicType item : picList) + { + picNameMap.put(item.getPicType(), item.getPicTypeName()); + } + + List troubleList = ORM.get(ZTable.class).list(AfterProblemType.class); + for (AfterProblemType item : troubleList) + { + troubleNameMap.put(item.getProblemType(), item.getProblemName()); + } + + // 数据设置 + request.setAttribute("pageResult", pageResult); + request.setAttribute("picList", picList); + request.setAttribute("troubleList", troubleList); + request.setAttribute("startCreateDate", startCreateDate); + request.setAttribute("endCreateDate", endCreateDate); + request.setAttribute("picNameMap", picNameMap); + request.setAttribute("troubleNameMap", troubleNameMap); + request.setAttribute("page", pageNo); + + List designerList = new ArrayList(); + if (rootOrgId == sessionUser.getSelectedOrgId()) + { + request.setAttribute("queryAll", true); + for (ZmrOrg org : ZmrOrgDao.list(request)) + { + designerList.addAll(ZmrOperatorDao.getOperator(request, org.getOrgId())); + } + } + else + { + designerList = ZmrOperatorDao.getOperator(request, sessionUser.getSelectedOrgId()); + } + + request.setAttribute("designerList", designerList); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/after/PersonalAfterOrderAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/after/PersonalAfterOrderAction.java new file mode 100644 index 0000000..671a00b --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/after/PersonalAfterOrderAction.java @@ -0,0 +1,126 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action.after; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.manager.dao.ZmrOperatorDao; +import org.zhiqim.manager.dao.ZmrOrgDao; +import org.zhiqim.manager.dbo.ZmrOperator; +import org.zhiqim.manager.dbo.ZmrOrg; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.after.DesignAfterOrderView; +import com.zhiqim.yangcai.design.dbo.design.AfterPicType; +import com.zhiqim.yangcai.design.dbo.design.AfterProblemType; + +/*** + * 申诉单列表 + * + * @version v1.0.0 @author longguizhi 2018-12-16 新建与整理 + */ +public class PersonalAfterOrderAction implements Action +{ + @Override + public void execute(HttpRequest request) throws Exception + { + int pageNo = request.getParameterInt("page"); + pageNo = pageNo <= 0 ? 1 : pageNo; + int pageSize = request.getParameterInt("pageSize"); + pageSize = pageSize <= 0 ? 20 : (pageSize > 1000 ? 1000 : pageSize); + String startCreateDate = request.getParameter("startCreateDate", DateTimes.getPreviousDateString(20));// 默认查询20 + String endCreateDate = request.getParameter("endCreateDate", DateTimes.getDateString());// 默认当天 + long designId = request.getParameterLong("designId"); + Selector selector = new Selector(); + selector.addMaybe("designAfsId", request.getParameterLong("designAfsId")); + selector.addMaybe("designId", request.getParameterLong("designId")); + selector.addMaybe("merchantId", request.getParameterLong("merchantId")); + selector.addMaybe("afterStatus", request.getParameter("afterStatus")); + selector.addMaybe("picType", request.getParameterInt("picType")); + selector.addMaybe("afterBlamer", request.getParameter("afterBlamer")); + selector.addMaybe("problemType", request.getParameter("problemType")); + selector.addMaybe("designer", request.getParameter("designer")); + selector.addMaybeThenGE("afterCreateTime", Sqls.toTimestamp(startCreateDate, "00:00:00")); + selector.addMaybeThenLE("afterCreateTime", Sqls.toTimestamp(endCreateDate, "23:59:59")); + + if (designId > 0) + { + selector.addOr(new Selector("designId", designId).addMust("outId", designId)); + } + + // 根据组织显示 + ZmrSessionUser sessionUser = request.getSessionUser(ZmrSessionUser.class); + long rootOrgId = ZmrOrgDao.getOrgRootId(request); + //非总组织 + if (rootOrgId != sessionUser.getSelectedOrgId()) + { + selector.addMust("picOrgId", sessionUser.getSelectedOrgId()); + } + + selector.addOrderbyDesc("afterCreateTime"); + PageResult pageResult = ORM.get(ZView.class).page(DesignAfterOrderView.class, pageNo, pageSize, selector); + pageResult.addConditionMap(request.getParameterMap()); + + Map picNameMap = new HashMap(); + Map troubleNameMap = new HashMap(); + List picList = ORM.get(ZTable.class).list(AfterPicType.class); + for (AfterPicType item : picList) + { + picNameMap.put(item.getPicType(), item.getPicTypeName()); + } + + List troubleList = ORM.get(ZTable.class).list(AfterProblemType.class); + for (AfterProblemType item : troubleList) + { + troubleNameMap.put(item.getProblemType(), item.getProblemName()); + } + + // 数据设置 + request.setAttribute("pageResult", pageResult); + request.setAttribute("picList", picList); + request.setAttribute("troubleList", troubleList); + request.setAttribute("startCreateDate", startCreateDate); + request.setAttribute("endCreateDate", endCreateDate); + request.setAttribute("picNameMap", picNameMap); + request.setAttribute("troubleNameMap", troubleNameMap); + request.setAttribute("page", pageNo); + + List designerList = new ArrayList(); + if (rootOrgId == sessionUser.getSelectedOrgId()) + { + request.setAttribute("queryAll", true); + for (ZmrOrg org : ZmrOrgDao.list(request)) + { + designerList.addAll(ZmrOperatorDao.getOperator(request, org.getOrgId())); + } + } + else + { + designerList = ZmrOperatorDao.getOperator(request, sessionUser.getSelectedOrgId()); + } + + request.setAttribute("designerList", designerList); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/after/WaitHandleAfterOrderAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/after/WaitHandleAfterOrderAction.java new file mode 100644 index 0000000..c5bdcfc --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/after/WaitHandleAfterOrderAction.java @@ -0,0 +1,96 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action.after; + +import java.text.SimpleDateFormat; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.after.DesignAfterOrderView; +import com.zhiqim.yangcai.design.dbo.design.AfterPicType; +import com.zhiqim.yangcai.design.dbo.design.AfterProblemType; + +/*** + * 等待处理的售后单 + * + * @version v1.0.0 @author longguizhi 2018-12-27 新建与整理 + */ +public class WaitHandleAfterOrderAction implements Action +{ + @Override + public void execute(HttpRequest request) throws Exception + { + int pageNo = request.getParameterInt("page", 1); + int pageSize = request.getParameterInt("pageSize", 15); + + String startCreateDate = request.getParameter("startCreateDate", DateTimes.getPreviousDateString(20));// 默认查询20天前 + String endCreateDate = request.getParameter("endCreateDate", DateTimes.getDateString());// 默认当天 + int day = DateTimes.compareDay(endCreateDate, startCreateDate); + if (day > 31) + { + request.setResponseError("请勿将时间区间跨度选择大于一个月"); + return; + } + + Selector selector = new Selector(); + selector.addMust("afterBlamer", request.getSessionName()); + selector.addMaybe("designId", request.getParameterLong("designId")); + selector.addMaybe("buyerNick", request.getParameter("buyerNick")); + selector.addMustThenGE("afterCreateTime", Sqls.toTimestamp(startCreateDate, "00:00:00")); + selector.addMustThenLE("afterCreateTime", Sqls.toTimestamp(endCreateDate, "23:59:59")); + selector.addMaybe("afterStatus", request.getParameterInt("afterStatus")); + selector.addOrderbyDesc("afterCreateTime"); + PageResult pageResult = ORM.get(ZView.class).page(DesignAfterOrderView.class, pageNo, pageSize, selector); + pageResult.addConditionMap(request.getParameterMap()); + + Map picNameMap = new HashMap(); + Map troubleNameMap = new HashMap(); + List picList = ORM.get(ZTable.class).list(AfterPicType.class); + for (AfterPicType item : picList) + { + picNameMap.put(item.getPicType(), item.getPicTypeName()); + } + + List troubleList = ORM.get(ZTable.class).list(AfterProblemType.class); + for (AfterProblemType item : troubleList) + { + troubleNameMap.put(item.getProblemType(), item.getProblemName()); + } + + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + long lNowTime = simpleDateFormat.parse("2021-10-01 00:00:00").getTime(); + // 数据设置 + request.setAttribute("pageResult", pageResult); + request.setAttribute("picList", picList); + request.setAttribute("troubleList", troubleList); + request.setAttribute("startCreateDate", startCreateDate); + request.setAttribute("endCreateDate", endCreateDate); + request.setAttribute("picNameMap", picNameMap); + request.setAttribute("troubleNameMap", troubleNameMap); + request.setAttribute("page", pageNo); + // request.setAttribute("designerList", OperatorDao.getOrgOperatorList(request, + // sessionUser.getSelectedOrgId(), request.getSessionName())); + request.setAttribute("lNowTime", lNowTime); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/complain/ComplainDealAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/complain/ComplainDealAction.java new file mode 100644 index 0000000..c2fab3f --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/complain/ComplainDealAction.java @@ -0,0 +1,39 @@ +/** + * 扬彩印刷设计 + * 文件名 :complainDetailAction.java + * 创建人 :gjx + * 创建时间:2019-8-15 + */ + +package com.zhiqim.yangcai.design.action.complain; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.complain.DesignComplainView; + +/** + * 投诉详情 + * + * @version 1.0 @author gjx 2019-8-15 新建与整理 + */ +public class ComplainDealAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + long complainId = request.getParameterLong("complainId"); + DesignComplainView order = ORM.get(ZView.class).item(DesignComplainView.class, new Selector().addMust("complainId", complainId)); + if (order == null) + { + request.setResponseError("订单不存在"); + return; + + } + request.setAttribute("order", order); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/complain/ComplainDetailAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/complain/ComplainDetailAction.java new file mode 100644 index 0000000..c05895f --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/complain/ComplainDetailAction.java @@ -0,0 +1,39 @@ +/** + * 扬彩印刷设计 + * 文件名 :complainDetailAction.java + * 创建人 :gjx + * 创建时间:2019-8-15 + */ + +package com.zhiqim.yangcai.design.action.complain; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.complain.DesignComplainView; + +/** + * 投诉详情 + * + * @version 1.0 @author gjx 2019-8-15 新建与整理 + */ +public class ComplainDetailAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + long complainId = request.getParameterLong("complainId"); + DesignComplainView order = ORM.get(ZView.class).item(DesignComplainView.class, new Selector().addMust("complainId", complainId)); + if (order == null) + { + request.setResponseError("订单不存在"); + return; + + } + request.setAttribute("order", order); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/complain/ComplainFinishlListAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/complain/ComplainFinishlListAction.java new file mode 100644 index 0000000..a545b83 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/complain/ComplainFinishlListAction.java @@ -0,0 +1,74 @@ +package com.zhiqim.yangcai.design.action.complain; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.paging.PageBuilder; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.manager.dbo.ZmrOrg; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dao.ShopDao; +import com.zhiqim.yangcai.design.dbo.complain.DesignComplainView; + +/** + * 投诉订单统计 + * + * @version 1.0 @author gjx 2019-8-15 新建与整理 + */ +public class ComplainFinishlListAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page", 1); + int pageSize = request.getContextAttributeInt("page.size", 10); + String startDate = request.getParameter("startDate", DateTimes.getPreviousDateStringByMonth(6)); + String endDate = request.getParameter("endDate", DateTimes.getDateString()); + + Selector selector = new Selector(); + selector.addMaybeThenGE("complainAddTime", Sqls.toTimestamp(startDate, "00:00:00")); + selector.addMaybeThenLE("complainAddTime", Sqls.toTimestamp(endDate, "23:59:59")); + selector.addOrderbyDesc("complainAddTime"); + // selector.addMaybe("complainStatus", ComplainConstants.TX_40.value()); + selector.addMaybe("undertakePerson", request.getParameter("undertakePerson")); + selector.addMaybe("undertakeOrg", request.getParameterLong("orgId")); + + List complainList = ORM.get(ZView.class).list(DesignComplainView.class, selector); + + Map pcMap = new HashMap(); + for (DesignComplainView complain : complainList) + { + String text = complain.getComplainType(); + Integer count = pcMap.get(text); + count = count == null ? 0 : count; + pcMap.put(text, count + 1); + } + PageResult pageResult = PageBuilder.pageResult(page, pageSize, complainList); + pageResult.addConditionMap(request.getParameterMap()); + + request.setAttribute("pageResult", pageResult); + request.setAttribute("shopNickList", ShopDao.getShopList()); + request.setAttribute("startDate", startDate); + request.setAttribute("endDate", endDate); + request.setAttribute("pcMap", pcMap); + request.setAttribute("orgAllOrder", complainList.size()); + + Selector selOrg = new Selector(); + selOrg.addMust("orgStatus", 0); + selOrg.addMust("orgLevel", 1); + selOrg.addMustNotEqual("orgId", 1808071102554512L); + List orgList = ORM.get(ZTable.class).list(ZmrOrg.class, selOrg); + + request.setAttribute("orgList", orgList); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/complain/ComplainTotalOrderListAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/complain/ComplainTotalOrderListAction.java new file mode 100644 index 0000000..cf03a81 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/complain/ComplainTotalOrderListAction.java @@ -0,0 +1,120 @@ +/** + * 扬彩印刷设计 + * 文件名 :ComplainTotalOrderListAction.java + * 创建人 :gjx + * 创建时间:2019-8-15 + */ + +package com.zhiqim.yangcai.design.action.complain; + +import java.util.ArrayList; +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.paging.PageBuilder; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.manager.dao.ZmrDeptDao; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dao.ShopDao; +import com.zhiqim.yangcai.design.dbo.complain.DesignComplainView; + +/** + * 投诉单列表 + * + * @version 1.0 @author gjx 2019-8-15 新建与整理 + */ +public class ComplainTotalOrderListAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page", 1); + int pageSize = request.getContextAttributeInt("page.size", 12); + String startDate = request.getParameter("startDate", DateTimes.getPreviousDateStringByMonth(6)); + String endDate = request.getParameter("endDate", DateTimes.getDateString()); + + Selector selector = new Selector(); + selector.addMaybeThenGE("complainAddTime", Sqls.toTimestamp(startDate, "00:00:00")); + selector.addMaybeThenLE("complainAddTime", Sqls.toTimestamp(endDate, "23:59:59")); + selector.addOrderbyDesc("complainAddTime"); + selector.addMaybe("designId", request.getParameterLong("designId")); + selector.addMaybe("complainId", request.getParameterLong("complainId")); + selector.addMaybe("buyerNick", request.getParameter("buyerNick")); + selector.addMaybe("complainStatus", request.getParameter("complainStatus")); + selector.addMaybe("shopNick", request.getParameter("shopNick")); + + // 根据组织以及部门权限显示 + ZmrSessionUser sessionUser = request.getSessionUser(ZmrSessionUser.class); + String undertakePerson = request.getParameter("undertakePerson", "all"); + List list = new ArrayList<>(); + List designComplainViewlist = new ArrayList<>(); + + List designComplainViews = ORM.get(ZView.class).list(DesignComplainView.class, selector); + // 如果是管理员查看所有的 + if (sessionUser.getOperatorType() <= 1) + { + list = designComplainViews; + } + else if (ZmrDeptDao.isDeptManager(request, sessionUser.getOperatorCode())) + {// 如果是部门主管查看部门下所有操作员的 + List operators = ZmrDeptDao.getDeptOperatorCodeList(request, sessionUser.getOperatorCode(), true); + for (DesignComplainView designComplainView : designComplainViews) + { + for (String operatorCode : operators) + { + if (operatorCode.equals(designComplainView.getUndertakePerson()) || operatorCode.equals(designComplainView.getAssistPerson())) + { + list.add(designComplainView); + } + } + } + } + else + {// 普通操作员查看自己的 + for (DesignComplainView designComplainView : designComplainViews) + { + if (sessionUser.getOperatorCode().equals(designComplainView.getUndertakePerson()) + || sessionUser.getOperatorCode().equals(designComplainView.getAssistPerson())) + { + list.add(designComplainView); + } + } + } + + // 判断搜索条件有没有输入负责人 + if (Validates.isNotEmpty(list)) + { + if ("all".equals(undertakePerson)) + { + designComplainViewlist = list; + } + else + { + for (DesignComplainView designComplainView : list) + { + if (undertakePerson.equals(designComplainView.getUndertakePerson())) + { + designComplainViewlist.add(designComplainView); + } + } + } + } + + PageResult pageResult = PageBuilder.pageResult(page, pageSize, designComplainViewlist); + pageResult.addConditionMap(request.getParameterMap()); + + request.setAttribute("pageResult", pageResult); + request.setAttribute("shopNickList", ShopDao.getShopList()); + request.setAttribute("startDate", startDate); + request.setAttribute("endDate", endDate); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/complain/ComplainWantDealListAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/complain/ComplainWantDealListAction.java new file mode 100644 index 0000000..f86d7d9 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/complain/ComplainWantDealListAction.java @@ -0,0 +1,59 @@ +/** + * 扬彩印刷设计 + * 文件名 :ComplainTotalOrderListAction.java + * 创建人 :gjx + * 创建时间:2019-8-15 + */ + +package com.zhiqim.yangcai.design.action.complain; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dao.ShopDao; +import com.zhiqim.yangcai.design.dbo.complain.DesignComplainView; + +/** + * 设计师-我的投诉 + * + * @version 1.0 @author gjx 2019-8-15 新建与整理 + */ +public class ComplainWantDealListAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page", 1); + int pageSize = request.getContextAttributeInt("page.size", 12); + String startDate = request.getParameter("startDate", DateTimes.getPreviousDateStringByMonth(6)); + String endDate = request.getParameter("endDate", DateTimes.getDateString()); + + Selector selector = new Selector(); + selector.addMaybe("undertakePerson", request.getSessionName()); + selector.addMaybeThenGE("complainAddTime", Sqls.toTimestamp(startDate, "00:00:00")); + selector.addMaybeThenLE("complainAddTime", Sqls.toTimestamp(endDate, "23:59:59")); + selector.addOrderbyDesc("complainAddTime"); + selector.addMaybe("complainStatus", request.getParameter("complainStatus")); + selector.addMaybe("designId", request.getParameterLong("designId")); + selector.addMaybe("complainId", request.getParameterLong("complainId")); + selector.addMaybe("buyerNick", request.getParameter("buyerNick")); + selector.addMaybe("complainStatus", request.getParameter("complainStatus")); + selector.addMaybe("shopNick", request.getParameter("shopNick")); + + PageResult pageResult = ORM.get(ZView.class).page(DesignComplainView.class, page, pageSize, selector); + pageResult.addConditionMap(request.getParameterMap()); + + request.setAttribute("pageResult", pageResult); + request.setAttribute("shopNickList", ShopDao.getShopList()); + request.setAttribute("startDate", startDate); + request.setAttribute("endDate", endDate); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/des/TemplateCardPreviewAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/des/TemplateCardPreviewAction.java new file mode 100644 index 0000000..37b5105 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/des/TemplateCardPreviewAction.java @@ -0,0 +1,107 @@ +package com.zhiqim.yangcai.design.action.des; + +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.uploadlarge.dbo.UpllFile; + +import com.zhiqim.media.service.dao.MediaPathDao; +import com.zhiqim.yangcai.design.constant.DesignConstants; +import com.zhiqim.yangcai.design.constants.FileTypeConstants; +import com.zhiqim.yangcai.design.dao.DesignTypeDao; +import com.zhiqim.yangcai.design.dbo.design.DesignType; +import com.zhiqim.yangcai.design.dbo.order.DesignAtta; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; +import com.zhiqim.yangcai.design.dbo.template.DesTemplateOrder; +import com.zhiqim.yangcai.design.dbo.template.MediaTemplateView; + +/** + * 电子名片设计模板预览 + * + * @version v1.0.0 + */ +public class TemplateCardPreviewAction implements Action, DesignConstants +{ + @Override + public void execute(HttpRequest request) throws Exception + { + long designId = request.getParameterLong("designId"); + String src = request.getParameter("src"); + if (designId == -1) + { + request.returnCloseWindow("设计订单信息不存在"); + return; + } + + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, designId); + if (order == null) + { + request.returnCloseWindow("设计订单信息不存在"); + return; + } + + DesignType typeItem = DesignTypeDao.get(order.getTypeId()); + if (typeItem == null) + { + request.returnCloseWindow("订单对应类型不存在"); + return; + } + + int templateNum = ORM.get(ZView.class).count(MediaTemplateView.class, new Selector("designId", designId)); + request.setAttribute("display", templateNum > 0); // 显示选项卡 + + request.setAttribute("order", order); + request.addParam("designId", designId); + + // 订单所需参数 + DesTemplateOrder desOrder = ORM.get(ZTable.class).item(DesTemplateOrder.class, designId); + if (desOrder != null) + { + request.setAttribute("paramData", desOrder.getParamText()); + request.setAttribute("ocrText", desOrder.getOcrText()); + + if (Validates.isNotEmpty(desOrder.getFileId())) + { + UpllFile file = ORM.get(ZTable.class).item(UpllFile.class, new Selector("fileId", desOrder.getFileId()).addReplace("id", null)); + request.setAttribute("fileUrl", file.getFileUrl()); + } + } + + String midPath = MediaPathDao.getDesignMaterialMidPath(DateTimes.getDateTime8String());// 二维码中间路径 + String qrCodePath = MediaPathDao.getDesignMaterialLocalPre(DateTimes.getDateTime8String());// 二维码绝对路径 + request.setAttribute("qrCodePath", qrCodePath); + request.setAttribute("midPath", midPath); + + // 订单的客户素材 + Selector attaSel = new Selector(); + attaSel.addMust("designId", designId); + attaSel.addMust("attaModul", FileTypeConstants.FILE_CUSTOM.value()); + List attaList = ORM.get(ZTable.class).list(DesignAtta.class, attaSel); + + /* 此处数据用于电子名片设计时在设计页面生成二维码 */ + Boolean orderIsCardType = Boolean.FALSE; + if (order.getTypeId() == 2023207561256L) + { + orderIsCardType = Boolean.TRUE; + } + + request.setAttribute("orderIsCardType", orderIsCardType); + request.setAttribute("attaList", attaList); + request.setAttribute("typeItem", typeItem); + if ("design".equals(src)) + { + request.setAttribute("srcUrl", "/designOrder.htm"); + } + else + { + request.setAttribute("srcUrl", "/designOrderFinish.htm"); + } + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/des/TemplateCustomerPreviewAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/des/TemplateCustomerPreviewAction.java new file mode 100644 index 0000000..8679b1f --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/des/TemplateCustomerPreviewAction.java @@ -0,0 +1,35 @@ +package com.zhiqim.yangcai.design.action.des; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; + +import com.zhiqim.yangcai.design.constant.DesignConstants; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; + +/** + * 模板客户预览 + * + * @version v1.0.0 @author Deng 2019-10-22 新建与整理 + */ +public class TemplateCustomerPreviewAction implements Action, DesignConstants +{ + @Override + public void execute(HttpRequest request) throws Exception + { + long designId = request.getParameterLong("designId"); + if (designId == -1) + { + request.returnCloseWindow("设计订单信息不存在"); + return; + } + + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, designId); + if (order == null) + { + request.returnCloseWindow("设计订单信息不存在"); + return; + } + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/des/TemplatePreviewAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/des/TemplatePreviewAction.java new file mode 100644 index 0000000..f484591 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/des/TemplatePreviewAction.java @@ -0,0 +1,61 @@ +package com.zhiqim.yangcai.design.action.des; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.constant.DesignConstants; +import com.zhiqim.yangcai.design.constants.StatusConstants; +import com.zhiqim.yangcai.design.dao.DesignTypeDao; +import com.zhiqim.yangcai.design.dbo.design.DesignType; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; +import com.zhiqim.yangcai.design.dbo.template.MediaTemplateView; + +/** + * 产品设计模板预览 + * + * @version v1.0.0 @author caohong + */ +public class TemplatePreviewAction implements Action, DesignConstants +{ + @Override + public void execute(HttpRequest request) throws Exception + { + long designId = request.getParameterLong("designId"); + if (designId == -1) + { + request.returnCloseWindow("设计订单信息不存在"); + return; + } + + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, designId); + if (order == null) + { + request.returnCloseWindow("设计订单信息不存在"); + return; + } + + if (order.getStatus() > StatusConstants.ORDER_50.value()) + { + request.returnCloseWindow("该订单已定稿,不允许前往设计"); + return; + } + + DesignType typeItem = DesignTypeDao.get(order.getTypeId()); + if (typeItem == null) + { + request.returnCloseWindow("订单对应类型不存在"); + return; + } + + int templateNum = ORM.get(ZView.class).count(MediaTemplateView.class, new Selector("designId", designId)); + request.setAttribute("display", templateNum > 0); // 显示选项卡 + + request.setAttribute("order", order); + request.addParam("designId", designId); + request.setAttribute("typeItem", typeItem); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/designerworks/DesignerProfileAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/designerworks/DesignerProfileAction.java new file mode 100644 index 0000000..0a70c96 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/designerworks/DesignerProfileAction.java @@ -0,0 +1,32 @@ +package com.zhiqim.yangcai.design.action.designerworks; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.profile.DesignerProfile; + +/** + * 设计师简介待审核信息 + * + * @version v1.0.0 @author yixin 20020-09-12 新建与整理 + */ +public class DesignerProfileAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page"); + int pageSize = 20; + Selector selector = new Selector(); + selector.addOrderbyDesc("addTime"); + // 只查询未审核的 + selector.addMust("state", 1); + PageResult pageResult = ORM.get(ZTable.class).page(DesignerProfile.class, page, pageSize, selector); + request.setAttribute("pageResult", pageResult); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/designerworks/DesignerRegAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/designerworks/DesignerRegAction.java new file mode 100644 index 0000000..f984e28 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/designerworks/DesignerRegAction.java @@ -0,0 +1,106 @@ +package com.zhiqim.yangcai.design.action.designerworks; + +import java.util.ArrayList; +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.HttpResponse; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.order.OrderQuestions; +import com.zhiqim.yangcai.design.dbo.order.QuestionsAtta; + +/** + * 设计师考试审核操作 + * + * @version v1.0.0 @author caohong 2021-5-25 08:50:15 + */ +@AnAlias("DesignerRegAction") +public class DesignerRegAction implements Action +{ + @Override + public void execute(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page"); + int pageSize = 15; + int status = request.getParameterInt("status"); + Selector selector = new Selector(); + selector.addMaybe("designer", request.getParameter("designer")); + selector.addMaybe("mobile", request.getParameter("mobile")); + if (status >= 0) + { + selector.addMust("status", status); + } + else + { + selector.addMustNotEqual("status", 30); // 默认排除已审核的 + } + selector.addOrderbyDesc("designEndTime"); + PageResult pageResult = ORM.get(ZTable.class).page(OrderQuestions.class, page, pageSize, selector); + request.setAttribute("pageResult", pageResult); + } + + /** + * 查看考试凭证 + * + * @author caohong + * @param questionsId + * @throws Exception + */ + public void queryExamVoucher(HttpRequest request, long questionsId) throws Exception + { + Selector sel = new Selector(); + sel.addMust("questionsId", questionsId); + sel.addMaybe("attaModul", "ExamVoucher"); + QuestionsAtta examVoucher = ORM.get(ZTable.class).item(QuestionsAtta.class, sel); + if (examVoucher != null) + { + request.setResponseResult(examVoucher.getFileUrl()); + } + else + { + request.setResponseError("未找到考试凭证信息,请重新刷新查看"); + } + } + + /** + * + * [简要描述]:设计文件和印刷文件下载
            + * [详细描述]:
            + * + * @author hc + * @param request + * @param downFileType + * @param questionsId + * @throws Exception + */ + public void downFile(HttpRequest request, long questionsId, String downFileType, HttpResponse response) throws Exception + { + Selector sel = new Selector(); + sel.addMust("questionsId", questionsId); + sel.addMaybe("attaModul", downFileType); + List result = ORM.get(ZTable.class).list(QuestionsAtta.class, sel); + if (result != null && result.size() > 0) + { + List attaIdList = new ArrayList(); + for (QuestionsAtta attaId : result) + { + attaIdList.add(attaId.getAttaId()); + } + + request.setResponseResult(Jsons.toString(attaIdList)); + } + else + { + request.setResponseError("未找到考试文件信息,请重新刷新查看"); + } + + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/designerworks/DesignerWorksAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/designerworks/DesignerWorksAction.java new file mode 100644 index 0000000..9e21f36 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/designerworks/DesignerWorksAction.java @@ -0,0 +1,32 @@ +package com.zhiqim.yangcai.design.action.designerworks; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.profile.DesignerWorks; + +/** + * 设计师作品待审核信息 + * + * @version v1.0.0 @author yixin 20020-09-12 新建与整理 + */ +public class DesignerWorksAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page"); + int pageSize = 20; + Selector selector = new Selector(); + selector.addOrderbyDesc("addTime"); + // 只查询未审核的 + selector.addMust("state", 0); + PageResult pageResult = ORM.get(ZTable.class).page(DesignerWorks.class, page, pageSize, selector); + request.setAttribute("pageResult", pageResult); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/designerworks/ProfileAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/designerworks/ProfileAction.java new file mode 100644 index 0000000..68142b7 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/designerworks/ProfileAction.java @@ -0,0 +1,54 @@ +package com.zhiqim.yangcai.design.action.designerworks; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.manager.ZmrBootstrap; +import org.zhiqim.manager.dbo.ZmrOperator; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; + +import com.zhiqim.yangcai.design.dbo.profile.DesignerCourse; + +/** + * 操作员个人中心 + * + * @version v1.0.0 + */ +public class ProfileAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + String operatorCode = request.getSessionName(); + ZmrOperator operator = ZmrBootstrap.tableOpr(request).item(ZmrOperator.class, operatorCode); + // DesignerProfile profile = ORM.get(ZTable.class).item(DesignerProfile.class, + // request.getSessionName()); + // List works = ORM.get(ZTable.class).list(DesignerWorks.class, new + // Selector("operatorCode", operatorCode)); + // ScoreDesignerRecord scoreDesignerRecord = + // ORM.get(ZTable.class).item(ScoreDesignerRecord.class, new Selector("operatorCode", + // operatorCode)); + // int orderCount = ORM.get(ZTable.class).count(DesignOrder.class, new Selector("designer", + // operatorCode)); + // int worksCount = ORM.get(ZTable.class).count(MediaTemplate.class, new + // Selector("designer", operatorCode)); + request.setAttribute("operator", operator); + // request.setAttribute("profile", profile); + // request.setAttribute("works", works); + // request.setAttribute("scoreDesignerRecord", scoreDesignerRecord); + // request.setAttribute("orderCount", orderCount); + // request.setAttribute("worksCount", worksCount); + // Selector selector = new Selector(); + // List scoreDesignerLeverList = + // ORM.get(ZTable.class).list(ScoreDesignerLever.class, selector); + // request.setAttribute("scoreDesignerLeverList", scoreDesignerLeverList); + + DesignerCourse designerCourse = ORM.get(ZTable.class).item(DesignerCourse.class, operatorCode); + if (designerCourse == null) + { + designerCourse = new DesignerCourse(); + } + request.setAttribute("course", designerCourse); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/designerworks/RegCheckApprovedAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/designerworks/RegCheckApprovedAction.java new file mode 100644 index 0000000..ef2c1d4 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/designerworks/RegCheckApprovedAction.java @@ -0,0 +1,164 @@ +package com.zhiqim.yangcai.design.action.designerworks; + +import java.io.File; +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.util.Files; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.manager.dbo.ZmrOperator; +import org.zhiqim.manager.dbo.ZmrOrg; +import org.zhiqim.manager.dbo.ZmrRole; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; +import org.zhiqim.uploadlarge.dbo.UpllFile; + +import com.zhiqim.yangcai.design.constant.ScoreConstants; +import com.zhiqim.yangcai.design.dao.OssFileDao; +import com.zhiqim.yangcai.design.dao.ScoreDesignerRecordDao; +import com.zhiqim.yangcai.design.dbo.design.DesignerGroup; +import com.zhiqim.yangcai.design.dbo.design.DesignerGroupDispatch; +import com.zhiqim.yangcai.design.dbo.order.OrderQuestions; +import com.zhiqim.yangcai.design.dbo.order.QuestionsAtta; +import com.zhiqim.yangcai.design.dbo.score.ScoreDesignerRecordDetail; + +/** + * 设计师审核通过 + * + * @version v1.0.0 @author caohong 2021-5-25 08:50:15 + */ +@AnAlias("RegCheckApprovedAction") +public class RegCheckApprovedAction implements Action +{ + @Override + public void execute(HttpRequest request) throws Exception + { + String questionsId = request.getParameter("questionsId"); + + // 查询考试订单数据 + request.setAttribute("questionsId", questionsId); + + // 初始组织 + Selector selector = new Selector(); + selector.addMust("orgLevel", 1); + selector.addMust("orgStatus", 0); + selector.addMustNotEqual("orgId", 1808071102554512L); + List orgList = ORM.get(ZTable.class).list(ZmrOrg.class, selector); + request.setAttribute("orgList", orgList); + + // 初始接单规则组 + List designerGroupList = ORM.get(ZTable.class).list(DesignerGroup.class, new Selector().addMust("status", 1)); + request.setAttribute("designerGroupList", designerGroupList); + } + + /** + * [简要描述]:注册审核通过
            + * + * @author caohong + * @param request + * @param questionsId + * @throws Exception + */ + public void checkApproved(HttpRequest request) throws Exception + { + long questionsId = request.getParameterLong("questionsId"); + long orgId = request.getParameterLong("orgId"); + int score = request.getParameterInt("score"); + long designerGroupId = request.getParameterLong("designerGroupId"); + + OrderQuestions questions = ORM.get(ZTable.class).item(OrderQuestions.class, questionsId); + if (questions == null) + { + request.setResponseError("未找到考试订单信息"); + return; + } + + // 查询组织对接角色 + List role_list = ORM.get(ZTable.class).list(ZmrRole.class, new Selector("orgId", orgId).addOrderbyAsc("roleSeq")); + if (role_list == null || role_list.size() == 0) + { + request.setResponseError("对应组织未配置操作员角色信息"); + return; + } + + // 1.修改考试记录 + Updater updater = new Updater(); + updater.addMust("questionsId", questionsId); + updater.addField("status", 30); + ORM.get(ZTable.class).update(OrderQuestions.class, updater); + + // 删除附件记录 + List attaList = ORM.get(ZTable.class).list(QuestionsAtta.class, new Selector().addMustInLong("questionsId", questionsId)); + for (QuestionsAtta atta : attaList) + { + // 素材文件需要共用,不能删除 + if (!"MaterialFile".equals(atta.getAttaModul())) + { + File file = new File(atta.getSavePath()); + if (file.exists()) + { + Files.deleteFile(atta.getSavePath()); + } + + if (Validates.isNotEmpty(atta.getFileid())) + { + ORM.get(ZTable.class).delete(UpllFile.class, new Selector("fileId", atta.getFileid()).addReplace("id", null)); + } + } + + // 考试凭证需要删除oss + if ("ExamVoucher".equals(atta.getAttaModul())) + { + String path = atta.getFileUrl().split(OssFileDao.getPrefix_dir())[1]; + OssFileDao.deleteOssFile(OssFileDao.getPrefix_dir() + path); + } + + ORM.get(ZTable.class).delete(QuestionsAtta.class, atta.getAttaId()); + } + + // 2.账号权限角色分配 + Updater updater_oper = new Updater(); + updater_oper.addMust("operatorCode", questions.getDesigner()); + updater_oper.addField("orgId", orgId); + updater_oper.addField("operatorRole", String.valueOf(role_list.get(0).getRoleId())); + updater_oper.addField("operatorParam", ""); + ORM.get(ZTable.class).update(ZmrOperator.class, updater_oper); + + // 3.关联接单规则 + DesignerGroupDispatch designerGroupDispatch = new DesignerGroupDispatch(); + designerGroupDispatch.setDesignerGroupId(designerGroupId); + designerGroupDispatch.setOrgId(orgId); + designerGroupDispatch.setMaxOrderAmount(0); + designerGroupDispatch.setMinOrderAmount(0); + designerGroupDispatch.setHighQualityOrder(false); + designerGroupDispatch.setDesign(false); + designerGroupDispatch.setModifyOperatorCode(request.getSessionName()); + designerGroupDispatch.setModifyTime(Sqls.nowTimestamp()); + designerGroupDispatch.setStatus(1); + designerGroupDispatch.setLargeAmount(false); + designerGroupDispatch.setMaxOrderNum(0); + designerGroupDispatch.setOperatorCode(questions.getDesigner()); + designerGroupDispatch.setSpecial(false); + designerGroupDispatch.setUrgent(false); + ORM.get(ZTable.class).replace(designerGroupDispatch); + + // 4.初始积分设置 + if (score > 0) + { + ScoreDesignerRecordDetail scoreDesignerRecordDetail = new ScoreDesignerRecordDetail(); + scoreDesignerRecordDetail.setScoreType(Long.valueOf(ScoreConstants.SCORE_TYPE_100.value())); + scoreDesignerRecordDetail.setOperatorCode(questions.getDesigner()); + scoreDesignerRecordDetail.setCreateOperator(request.getSessionUser(ZmrSessionUser.class).getOperatorCode()); + scoreDesignerRecordDetail.setRemark("注册初始积分"); + scoreDesignerRecordDetail.setScore(score); + ScoreDesignerRecordDao.addScoreDesignerRecordDetail(scoreDesignerRecordDetail); + } + + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/designerworks/RegCheckBackAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/designerworks/RegCheckBackAction.java new file mode 100644 index 0000000..3e0a73c --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/designerworks/RegCheckBackAction.java @@ -0,0 +1,53 @@ +package com.zhiqim.yangcai.design.action.designerworks; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.design.dbo.order.OrderQuestions; + +/** + * 设计师审核拒绝 + * + * @version v1.0.0 @author caohong 2021-5-25 08:50:15 + */ +@AnAlias("RegCheckBackAction") +public class RegCheckBackAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + String questionsId = request.getParameter("questionsId"); + + // 查询考试订单数据 + request.setAttribute("questionsId", questionsId); + } + + /** + * [简要描述]:注册审核拒绝
            + * + * @author caohong + * @param request + * @param questionsId + * @throws Exception + */ + public void backRemarks(HttpRequest request, long questionsId, String remarks) throws Exception + { + if (questionsId < 0) + { + request.setResponseError("未找到考试订单信息"); + return; + } + + Updater updater = new Updater(); + updater.addMust("questionsId", questionsId); + updater.addField("status", 40); + updater.addField("remarks", remarks); + ORM.get(ZTable.class).update(OrderQuestions.class, updater); + + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/dispatch/DesOnliceTimeLogAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/dispatch/DesOnliceTimeLogAction.java new file mode 100644 index 0000000..a8ed952 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/dispatch/DesOnliceTimeLogAction.java @@ -0,0 +1,94 @@ +package com.zhiqim.yangcai.design.action.dispatch; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.concurrent.Callable; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.Future; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.kernel.paging.PageBuilder; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.dispatch.DesWorkSearchLog; +import com.zhiqim.yangcai.design.model.DesOnliceTimeLogModel; +import com.zhiqim.yangcai.design.service.DesOnliceTimeLogCallable; + +/** + * 在线时长 + * + * @version v1.0.0 @author zzy 2018-7-4 新建与整理 + * @version v1.0.1 @author gjx 2020-09-03 新建与整理 + */ +public class DesOnliceTimeLogAction implements Action +{ + private static final Log log = LogFactory.getLog(DesOnliceTimeLogAction.class); + + @Override + public void execute(HttpRequest request) + { + int page = request.getParameterInt("page", 1); + int pageSize = 15; + String dayCode = request.getParameter("dayCode", DateTimes.getDateString()); + String operatorCode = request.getParameter("operatorCode"); + try + { + + Selector selector = new Selector(); + selector.addMaybe("operatorCode", operatorCode); + selector.addMustThenGE("createTime", Sqls.toTimestamp(dayCode, "00:00:00")); + selector.addMustThenLE("createTime", Sqls.toTimestamp(dayCode, "23:59:59")); + selector.addMust("logType", 1);// 有开启接单记录 + selector.addGroupbyFields("operatorCode"); + + List logList = ORM.get(ZTable.class).list(DesWorkSearchLog.class, selector); + + List modelList = new ArrayList(); + int logSize = logList.size(); + if (logSize > 0) + { + // 创建一个线程池 + ExecutorService pool = Executors.newFixedThreadPool(2); + // 创建多个有返回值的任务 + List> futureList = new ArrayList>(); + for (int i = 0; i < logList.size(); i++) + { + Selector sel = new Selector(); + sel.addMust("operatorCode", logList.get(i).getOperatorCode()); + sel.addMustThenGE("createTime", Sqls.toTimestamp(dayCode, "00:00:00")); + sel.addMustThenLE("createTime", Sqls.toTimestamp(dayCode, "23:59:59")); + sel.addOrderbyAsc("createTime"); + Callable c = new DesOnliceTimeLogCallable(sel); + Future f = pool.submit(c); + futureList.add(f); + } + pool.shutdown(); + for (Future f : futureList) + { + DesOnliceTimeLogModel model = (DesOnliceTimeLogModel) f.get(); + modelList.add(model); + } + } + + Collections.sort(modelList); + PageResult pageResult = PageBuilder.pageResult(page, pageSize, modelList); + pageResult.addConditionMap(request.getParameterMap()); + request.setAttribute("pageResult", pageResult); + } + catch (Exception e) + { + log.error("设计师在线时长查询异常," + e.getMessage(), e); + } + + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/dispatch/DispatchLogAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/dispatch/DispatchLogAction.java new file mode 100644 index 0000000..9d64eb1 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/dispatch/DispatchLogAction.java @@ -0,0 +1,88 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action.dispatch; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.manager.ZmrBootstrap; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.manager.dbo.ZmrOrg; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.dispatch.DesDispatchOrderLog; + +/** + * + * 派单日志 + * + * @version v1.0.0 @author Deng 2017-8-21 新建与整理 + */ +public class DispatchLogAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page"); + int pageSize = 20; + + String destime = request.getParameter("destime", DateTimes.getDateString()); + String operatorCode = request.getParameter("operatorCode"); + long designId = request.getParameterLong("designId"); + long industryId = request.getParameterLong("industryId"); + long disOrderStatus = request.getParameterLong("disOrderStatus"); + + Selector selector = new Selector(); + long orgId = request.getSessionUser(ZmrSessionUser.class).getSelectedOrgId(); + if (orgId > 0) + { + ZmrOrg org = request.getContextAttribute(ZmrBootstrap.class).table().item(ZmrOrg.class, orgId); + if (org != null && org.getOrgLevel() > 0) + { + selector.addMust("orgId", orgId); + } + } + selector.addOrderbyDesc("desTime"); + selector.addMaybeLike("operatorCode", operatorCode); + selector.addMaybe("designId", designId); + selector.addMaybe("industryId", industryId); + if (disOrderStatus != -1) + { + selector.addMust("disOrderStatus", disOrderStatus); + } + + if (Validates.isNotEmpty(destime)) + { + selector.addMaybeThenGE("desTime", Sqls.toTimestamp(destime, "00:00:00")); + selector.addMaybeThenLE("desTime", Sqls.toTimestamp(destime, "23:59:59")); + } + + PageResult pageResult = ORM.get(ZTable.class).page(DesDispatchOrderLog.class, page, pageSize, selector); + pageResult.addConditionMap(request.getParameterMap()); + request.setAttribute("pageResult", pageResult); + request.setAttribute("operatorCode", operatorCode); + request.setAttribute("industryId", industryId); + request.setAttribute("destime", destime); + + if (designId != -1) + { + request.setAttribute("designId", designId); + } + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/dispatch/DispatchPropertyAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/dispatch/DispatchPropertyAction.java new file mode 100644 index 0000000..bc9ec7d --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/dispatch/DispatchPropertyAction.java @@ -0,0 +1,230 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action.dispatch; + +import java.util.ArrayList; +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.extend.StdSwitchAction; +import org.zhiqim.httpd.validate.ones.IsNotEmpty; +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.annotation.AnTransaction; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.Lists; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Strings; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.manager.dao.ZmrOperatorDao; +import org.zhiqim.manager.dao.ZmrOrgDao; +import org.zhiqim.manager.dbo.ZmrOperator; +import org.zhiqim.manager.dbo.ZmrOrg; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.cache.DesignIndustryCache; +import com.zhiqim.yangcai.design.dao.DesignTypeDao; +import com.zhiqim.yangcai.design.dao.OperatorDao; +import com.zhiqim.yangcai.design.dao.ParamDao; +import com.zhiqim.yangcai.design.dbo.dispatch.DesDispatchProperty; +import com.zhiqim.yangcai.design.dbo.dispatch.DesOnline; + +/** + * + * 派单属性 + * + * @version v1.0.0 @author Deng 2017-8-21 新建与整理 + */ +public class DispatchPropertyAction extends StdSwitchAction +{ + @Override + protected void validateId(HttpRequest request) + { + request.addValidate(new IsNotEmpty("operatorCode", "请选择一个选项")); + } + + @Override + protected void validateForm(HttpRequest request) + { + request.addValidate(new IsNotEmpty("operatorCode", "必须选择设计师")); + request.addValidate(new IsNotEmpty("majorType", "请选择一个主产品类型")); + request.addValidate(new IsNotEmpty("majorIndustry", "请选择一个主行业")); + request.addValidate(new IsNotEmpty("designerLevel", "选择设计师级别")); + } + + @Override + protected void list(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page"); + int pageSize = 20; + + Selector selector = new Selector(); + selector.addMaybe("operatorStatus", request.getParameterInt("operatorStatus")); + selector.addMaybeLike("operatorCode", request.getParameter("operatorCode")); + + long orgId = request.getSessionUser(ZmrSessionUser.class).getSelectedOrgId(); + if (orgId > 0) + { + ZmrOrg org = ZmrOrgDao.getOrg(request, orgId); + if (org != null && org.getOrgLevel() > 0) + { + selector.addMust("orgId", orgId); + } + } + + PageResult pageResult = ORM.get(ZTable.class).page(DesDispatchProperty.class, page, pageSize, selector); + pageResult.addConditionMap(request.getParameterMap()); + request.setAttribute("pageResult", pageResult); + request.setAttribute("typeMap", DesignTypeDao.mapAll()); + request.setAttribute("industryMap", Global.get(DesignIndustryCache.class).mapAll()); + } + + @Override + protected void add(HttpRequest request) throws Exception + { + List operatorList = new ArrayList(); + List orgList = OperatorDao.getOperatorOrgList(request, request.getSessionName(), false); + if (orgList.size() > 0) + { + operatorList = OperatorDao.getOrgOperatorAllList(orgList.get(0).getOrgId()); + } + + request.setAttribute("orgList", orgList); + request.setAttribute("operatorList", operatorList); + + // 查找店铺 + request.setAttribute("shopList", ParamDao.doGetShopNameParam()); + } + + @Override + @AnTransaction + protected void insert(HttpRequest request) throws Exception + { + String operatorCode = request.getParameter("operatorCode"); + int designerLevel = request.getParameterInt("designerLevel"); + + long majorType = request.getParameterLong("majorType"); + String secondaryTypesVals = request.getParameter("secondaryTypes", ""); + long majorIndustry = request.getParameterLong("majorIndustry"); + String secondaryIndustryVals = request.getParameter("secondaryIndustry", ""); + String shopNick = request.getParameter("shopNick"); + boolean isDesignOrder = request.getParameterBoolean("isDesignOrder"); + boolean isDraftOrder = request.getParameterBoolean("isDraftOrder"); + boolean isNormDraftOrder = request.getParameterBoolean("isNormDraftOrder"); + boolean isHighQualityOrder = request.getParameterBoolean("isHighQualityOrder"); + int count = ORM.get(ZTable.class).count(DesDispatchProperty.class, new Selector("operatorCode", operatorCode)); + if (count > 0) + { + request.setResponseError("设计师已经关联了派单属性"); + request.returnHistory(); + return; + } + + List typeList = Lists.toStringList(secondaryTypesVals); + if (!typeList.contains("" + majorType)) + { + typeList.add("" + majorType); + } + + List industryList = Lists.toStringList(secondaryIndustryVals); + if (!industryList.contains("" + majorIndustry)) + { + industryList.add("" + majorIndustry); + } + + DesDispatchProperty prop = new DesDispatchProperty(); + prop.setCreateTime(Sqls.nowTimestamp()); + prop.setUpdateTime(Sqls.nowTimestamp()); + prop.setMajorType(majorType); + prop.setSecondaryTypes(Lists.toString(typeList)); + prop.setMajorIndustry(majorIndustry); + prop.setSecondaryIndustrys(Lists.toString(industryList)); + prop.setOperatorCode(operatorCode); + prop.setOrgId(ZmrOperatorDao.getOperator(request, operatorCode).getOrgId()); + prop.setDesignerLevel(designerLevel); + prop.setShopNick(Strings.trim(shopNick)); + prop.setDesignOrder(isDesignOrder); + prop.setDraftOrder(isDraftOrder); + prop.setNormDraftOrder(isNormDraftOrder); + prop.setHighQualityOrder(isHighQualityOrder); + + ORM.get(ZTable.class).insert(prop); + } + + @Override + protected void modify(HttpRequest request) throws Exception + { + String operatorCode = request.getParameter("operatorCode"); + + DesDispatchProperty dispatchProperty = ORM.get(ZTable.class).item(DesDispatchProperty.class, new Selector("operatorCode", operatorCode)); + request.setAttribute("dispatchProperty", dispatchProperty); + // 查找店铺 + request.setAttribute("shopList", ParamDao.doGetShopNameParam()); + } + + @Override + @AnTransaction + protected void update(HttpRequest request) throws Exception + { + String operatorCode = request.getParameter("operatorCode"); + int designerLevel = request.getParameterInt("designerLevel"); + + long majorType = request.getParameterLong("majorType"); + String secondaryTypesVals = request.getParameter("secondaryTypes", ""); + long majorIndustry = request.getParameterLong("majorIndustry"); + String secondaryIndustryVals = request.getParameter("secondaryIndustry", ""); + String shopNick = request.getParameter("shopNick"); + boolean isDesignOrder = request.getParameterBoolean("isDesignOrder"); + boolean isDraftOrder = request.getParameterBoolean("isDraftOrder"); + boolean isNormDraftOrder = request.getParameterBoolean("isNormDraftOrder"); + boolean isHighQualityOrder = request.getParameterBoolean("isHighQualityOrder"); + boolean isUrgent = request.getParameterBoolean("isUrgent"); + + List typeList = Lists.toStringList(secondaryTypesVals); + if (!typeList.contains("" + majorType)) + { + typeList.add("" + majorType); + } + + List industryList = Lists.toStringList(secondaryIndustryVals); + if (!industryList.contains("" + majorIndustry)) + { + industryList.add("" + majorIndustry); + } + Updater updater = new Updater(); + updater.addMust("operatorCode", operatorCode); + updater.addField("majorType", majorType); + updater.addField("secondaryTypes", Lists.toString(typeList)); + updater.addField("majorIndustry", majorIndustry); + updater.addField("secondaryIndustrys", Lists.toString(industryList)); + updater.addField("designerLevel", designerLevel); + updater.addField("updateTime", Sqls.nowTimestamp()); + updater.addField("shopNick", Strings.trim(shopNick)); + updater.addField("isDesignOrder", isDesignOrder); + updater.addField("isDraftOrder", isDraftOrder); + updater.addField("isNormDraftOrder", isNormDraftOrder); + updater.addField("isHighQualityOrder", isHighQualityOrder); + updater.addField("isUrgent", isUrgent); + + ORM.get(ZTable.class).update(DesDispatchProperty.class, updater); + } + + @Override + @AnTransaction + protected void delete(HttpRequest request) throws Exception + { + String operatorCode = request.getParameter("operatorCode"); + ORM.get(ZTable.class).delete(DesDispatchProperty.class, operatorCode); + ORM.get(ZTable.class).delete(DesOnline.class, operatorCode); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/dispatch/DispatchStatAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/dispatch/DispatchStatAction.java new file mode 100644 index 0000000..1e9eefc --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/dispatch/DispatchStatAction.java @@ -0,0 +1,132 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action.dispatch; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Lists; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.manager.dao.ZmrParamDao; +import org.zhiqim.manager.dbo.ZmrOrg; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; +import com.zhiqim.yangcai.design.model.DispatchStatModel; + +public class DispatchStatAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + String beginDate = request.getParameter("beginDate", DateTimes.getDateString()); + // String endDate = request.getParameter("endDate", DateTimes.getDateString()); + request.setAttribute("beginDate", beginDate); + // request.setAttribute("endDate", endDate); + // int day = DateTimes.compareDay(endDate, beginDate); + // if (day > 0) + // { + // request.setResponseError("请勿将时间区间跨度选择大于一天"); + // return; + // } + Selector sel = new Selector(); + sel.addMaybeThenGE("designReceiveTime", Sqls.toTimestamp(beginDate, "00:00:00")); + sel.addMaybeThenLE("designReceiveTime", Sqls.toTimestamp(beginDate, "23:59:59")); + List orderList = ORM.get(ZTable.class).list(DesignOrder.class, sel); + + int sumCount = orderList.size(); // 总单数 + int contendOrder = 0; + int dispatchCount = 0; // 自动派发订单数 + int assignCount = 0; // 手工指定订单数 + + String cards = ZmrParamDao.getParam(request.getContext(), "yangcai.design", "card").getParamValue(); + String colorPages = ZmrParamDao.getParam(request.getContext(), "yangcai.design", "colorPage").getParamValue(); + + Map map = new HashMap(); + for (DesignOrder ord : orderList) + { + DispatchStatModel temp = map.get(ord.getOrgId()); + if (temp == null) + { + temp = new DispatchStatModel(); + } + + temp.setOrgId(ord.getOrgId()); + temp.setOrderNum(temp.getOrderNum() + 1); + + if (Lists.toLongList(cards).contains(ord.getTypeId())) + { + temp.setCardNum(temp.getCardNum() + 1); // 名片类 + if (1 == ord.getTypeId())// 名片 + { + temp.setOnlyCardNum(temp.getOnlyCardNum() + 1); + } + } + else if (Lists.toLongList(colorPages).contains(ord.getTypeId())) + { + temp.setColorPageNum(temp.getColorPageNum() + 1); // 彩页类 + if (2 == ord.getTypeId())// 彩页 + { + temp.setOnlyColorPageNum(temp.getOnlyColorPageNum() + 1); + } + } + else + { + temp.setOtherNum(temp.getOtherNum() + 1); + } + + map.put(ord.getOrgId(), temp); + + if (ord.getReceiveType() == 0) + { + contendOrder++; + } + + if (ord.getReceiveType() == 1) + { + dispatchCount++; + } + else if (ord.getReceiveType() == 2) + { + assignCount++; + } + } + + // 组织列表 + List orgList = ORM.get(ZTable.class).list(ZmrOrg.class); + for (DispatchStatModel dis : map.values()) + { + for (ZmrOrg org : orgList) + { + if (dis.getOrgId() == org.getOrgId()) + { + dis.setOrgName(org.getOrgName()); + map.put(dis.getOrgId(), dis); + } + } + } + + request.setAttribute("sumCount", sumCount); + request.setAttribute("contendOrder", contendOrder); + request.setAttribute("assignCount", assignCount); + request.setAttribute("dispatchCount", dispatchCount); + request.setAttribute("map", map); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/dispatch/DispatchWaitStatAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/dispatch/DispatchWaitStatAction.java new file mode 100644 index 0000000..938b920 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/dispatch/DispatchWaitStatAction.java @@ -0,0 +1,109 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.action.dispatch; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.util.Lists; +import org.zhiqim.manager.dao.ZmrParamDao; +import org.zhiqim.manager.dbo.ZmrOrg; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.constants.DraftConstants; +import com.zhiqim.yangcai.design.constants.StatusConstants; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; +import com.zhiqim.yangcai.design.model.DispatchStatModel; + +/** + * 已分拣待派发 + * + * @version v1.0.0 @author zzy 2018-9-11 新建与整理 + */ +public class DispatchWaitStatAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + Selector sel = new Selector(); + sel.addMust("status", StatusConstants.ORDER_20.value()); + sel.addMustIsNotNull("orgId"); + sel.addMustNotEqual("orgId", 0); + sel.addMustThenGE("draftType", DraftConstants.DRAFT_COMMON_DESIGN.value()); + List orderList = ORM.get(ZTable.class).list(DesignOrder.class, sel); + + int sumCount = orderList.size(); // 总单数 + String cards = ZmrParamDao.getParam(request.getContext(), "yangcai.design", "card").getParamValue(); + String colorPages = ZmrParamDao.getParam(request.getContext(), "yangcai.design", "colorPage").getParamValue(); + + Map map = new HashMap(); + for (DesignOrder ord : orderList) + { + DispatchStatModel temp = map.get(ord.getOrgId()); + if (temp == null) + { + temp = new DispatchStatModel(); + } + + temp.setOrgId(ord.getOrgId()); + temp.setOrderNum(temp.getOrderNum() + 1); + + if (Lists.toLongList(cards).contains(ord.getTypeId())) + { + temp.setCardNum(temp.getCardNum() + 1); // 名片类 + if (1 == ord.getTypeId())// 名片 + { + temp.setOnlyCardNum(temp.getOnlyCardNum() + 1); + } + } + else if (Lists.toLongList(colorPages).contains(ord.getTypeId())) + { + temp.setColorPageNum(temp.getColorPageNum() + 1); // 彩页类 + if (2 == ord.getTypeId())// 彩页 + { + temp.setOnlyColorPageNum(temp.getOnlyColorPageNum() + 1); + } + } + else + { + temp.setOtherNum(temp.getOtherNum() + 1); + } + + map.put(ord.getOrgId(), temp); + + } + + // 组织列表 + List orgList = ORM.get(ZTable.class).list(ZmrOrg.class); + for (DispatchStatModel dis : map.values()) + { + for (ZmrOrg org : orgList) + { + if (dis.getOrgId() == org.getOrgId()) + { + dis.setOrgName(org.getOrgName()); + map.put(dis.getOrgId(), dis); + } + } + } + + request.setAttribute("sumCount", sumCount); + request.setAttribute("map", map); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/dispatch/MerDispatchLogAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/dispatch/MerDispatchLogAction.java new file mode 100644 index 0000000..4e026cf --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/dispatch/MerDispatchLogAction.java @@ -0,0 +1,72 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action.dispatch; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.manager.ZmrBootstrap; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.manager.dbo.ZmrOrg; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.dispatch.DesMerDispatchLog; + +/** + * + * 派单日志 + * + * @version v1.0.0 @author Deng 2017-8-21 新建与整理 + */ +public class MerDispatchLogAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page"); + int pageSize = 20; + + String destime = request.getParameter("destime", DateTimes.getDateString()); + long designId = request.getParameterLong("designId"); + designId = designId != -1 ? designId : request.getParameterLong("oid"); + Selector selector = new Selector(); + long orgId = request.getSessionUser(ZmrSessionUser.class).getSelectedOrgId(); + if (orgId > 0) + { + ZmrOrg org = request.getContextAttribute(ZmrBootstrap.class).table().item(ZmrOrg.class, orgId); + if (org != null && org.getOrgLevel() > 0) + { + selector.addMust("orgId", orgId); + } + } + + selector.addOrderbyDesc("desTime"); + selector.addMaybe("designId", designId); + + if (Validates.isNotEmpty(destime)) + { + selector.addMaybeThenGE("desTime", Sqls.toTimestamp(destime, "00:00:00")); + selector.addMaybeThenLE("desTime", Sqls.toTimestamp(destime, "23:59:59")); + } + + PageResult pageResult = ORM.get(ZTable.class).page(DesMerDispatchLog.class, page, pageSize, selector); + pageResult.addConditionMap(request.getParameterMap()); + request.setAttribute("pageResult", pageResult); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/dispatch/NoticeLogAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/dispatch/NoticeLogAction.java new file mode 100644 index 0000000..40d570e --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/dispatch/NoticeLogAction.java @@ -0,0 +1,65 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.action.dispatch; + +import java.sql.Timestamp; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.dispatch.DesNoticeLog; + +public class NoticeLogAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page"); + int pageSize = 15; + + Selector selector = new Selector(); + + String search = request.getParameter("search"); + if (Validates.isNotEmpty(search) && "0001".equals(search)) + { + String noticeTime = request.getParameter("noticeTime"); + String keyWord = request.getParameter("keyWord"); + request.setAttribute("noticeTime", noticeTime); + request.setAttribute("keyWord", keyWord); + + if (Validates.isNotEmpty(noticeTime)) + { + String noticeTimeStart = noticeTime + " 00:00:00.0"; + String noticeTimeEnd = noticeTime + " 23:59:59.999"; + selector.addMustThenGE("noticeTime", Timestamp.valueOf(noticeTimeStart)); + selector.addMustThenLE("noticeTime", Timestamp.valueOf(noticeTimeEnd)); + } + + if (Validates.isNotEmpty(keyWord)) + { + selector.addMustLike("keyWord", keyWord); + } + + } + selector.addOrderbyDesc("noticeTime"); + PageResult pageResult = ORM.get(ZTable.class).page(DesNoticeLog.class, page, pageSize,selector); + pageResult.addConditionMap(request.getParameterMap()); + request.setAttribute("pageResult", pageResult); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/dispatch/OnlineLogAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/dispatch/OnlineLogAction.java new file mode 100644 index 0000000..2120144 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/dispatch/OnlineLogAction.java @@ -0,0 +1,60 @@ +package com.zhiqim.yangcai.design.action.dispatch; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dao.DesignTypeDao; +import com.zhiqim.yangcai.design.dbo.design.DesignType; +import com.zhiqim.yangcai.design.dbo.dispatch.DesOnline; + +/** + * 在线设计师 + * + * @version v1.0.0 @author Deng 2018-1-3 新建与整理 + * @version V1.1 @author caohong 2021-5-13 优化设计师订单数量逻辑 + */ +public class OnlineLogAction implements Action +{ + @Override + public void execute(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page", 1); + int pageSize = 20; + + String operatorCode = request.getParameter("operatorCode"); + int onlineStatus = request.getParameterInt("onlineStatus", -1); + + Selector selector = new Selector(); + selector.addOrderbyDesc("onlineStatus").addOrderbyDesc("lastDraftTime"); + + if (Validates.isNotEmpty(operatorCode)) + { + selector.addMust("operatorCode", operatorCode); + } + if (onlineStatus != -1) + { + selector.addMust("onlineStatus", onlineStatus); + } + PageResult pageResult = ORM.get(ZTable.class).page(DesOnline.class, page, pageSize, selector); + pageResult.addConditionMap(request.getParameterMap()); + request.setAttribute("pageResult", pageResult); + request.setAttribute("operatorCode", operatorCode); + request.setAttribute("onlineStatus", onlineStatus); + Map typeMap = new HashMap(); + List typeList = DesignTypeDao.listAll(); + for (DesignType designType : typeList) + { + typeMap.put(designType.getTypeId(), designType); + } + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/dispatch/WaitDisMerOrderAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/dispatch/WaitDisMerOrderAction.java new file mode 100644 index 0000000..a6e5d68 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/dispatch/WaitDisMerOrderAction.java @@ -0,0 +1,69 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action.dispatch; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.cache.DesignIndustryCache; +import com.zhiqim.yangcai.design.constants.StatusConstants; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; + +/**** + * 等待分拣列表 + * + * @version v1.0.0 @author longguizhi 2018-11-26 新建与整理 + */ +public class WaitDisMerOrderAction implements Action +{ + @Override + public void execute(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page"); + int pageSize = 20; + + long designId = request.getParameterLong("designId"); + long industryId = request.getParameterLong("industryId"); + + Selector selector = new Selector(); + if (designId != -1) + { + selector.addMust("designId", designId); + } + + if (industryId != -1) + { + selector.addMust("industryId", industryId); + } + + selector.addMust("status", StatusConstants.ORDER_10.value()); + + selector.addOrderbyAsc("createTime"); + PageResult pageResult = ORM.get(ZTable.class).page(DesignOrder.class, page, pageSize, selector); + pageResult.addConditionMap(request.getParameterMap()); + + request.setAttribute("pageResult", pageResult); + request.setAttribute("industryId", industryId); + + if (designId != -1) + { + request.setAttribute("designId", designId); + } + + request.setAttribute("industryMap", Global.get(DesignIndustryCache.class).mapAll()); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/dispatch/WaitDisOrderAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/dispatch/WaitDisOrderAction.java new file mode 100644 index 0000000..52bdb18 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/dispatch/WaitDisOrderAction.java @@ -0,0 +1,81 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action.dispatch; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.manager.ZmrBootstrap; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.manager.dbo.ZmrOrg; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.cache.DesignIndustryCache; +import com.zhiqim.yangcai.design.constants.StatusConstants; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; + +/** + * 待派订单 + * + * @version v1.0.0 @author Deng 2018-4-25 新建与整理 + */ +public class WaitDisOrderAction implements Action +{ + @Override + public void execute(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page"); + int pageSize = 20; + + long designId = request.getParameterLong("designId"); + long industryId = request.getParameterLong("industryId"); + + Selector selector = new Selector(); + long orgId = request.getSessionUser(ZmrSessionUser.class).getSelectedOrgId(); + if (orgId > 0) + { + ZmrOrg org = request.getContextAttribute(ZmrBootstrap.class).table().item(ZmrOrg.class, orgId); + if (org != null && org.getOrgLevel() > 0) + { + selector.addMust("orgId", orgId); + } + } + if (designId != -1) + { + selector.addMust("designId", designId); + } + + if (industryId != -1) + { + selector.addMust("industryId", industryId); + } + + selector.addMust("status", StatusConstants.ORDER_20.value()); + + selector.addOrderbyAsc("createTime"); + PageResult pageResult = ORM.get(ZTable.class).page(DesignOrder.class, page, pageSize, selector); + pageResult.addConditionMap(request.getParameterMap()); + + request.setAttribute("pageResult", pageResult); + request.setAttribute("industryId", industryId); + + if (designId != -1) + { + request.setAttribute("designId", designId); + } + request.setAttribute("industryMap", Global.get(DesignIndustryCache.class).mapAll()); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/dispatch/WorkSearchLogAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/dispatch/WorkSearchLogAction.java new file mode 100644 index 0000000..8cbe339 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/dispatch/WorkSearchLogAction.java @@ -0,0 +1,60 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action.dispatch; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.dispatch.DesWorkSearchLog; + +/** + * 派单日志 + * + * @version v1.0.0 @author Deng 2018-4-25 新建与整理 + */ +public class WorkSearchLogAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page"); + int pageSize = 20; + + String operatorCode = request.getParameter("operatorCode"); + String startDate = DateTimes.getPreviousDateString(7); + String endDate = DateTimes.getDateString(); + Selector selector = new Selector(); + selector.addOrderbyDesc("createTime"); + + selector.addMaybeThenGE("createTime", Sqls.toTimestamp(startDate, "00:00:00")); + selector.addMaybeThenLE("createTime", Sqls.toTimestamp(endDate, "23:59:59")); + if (Validates.isNotEmpty(operatorCode)) + { + selector.addMust("operatorCode", operatorCode); + } + + PageResult pageResult = ORM.get(ZTable.class).page(DesWorkSearchLog.class, page, pageSize, selector); + pageResult.addConditionMap(request.getParameterMap()); + request.setAttribute("pageResult", pageResult); + + request.setAttribute("operatorCode", operatorCode); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/draft/MySelfRetentionOrderAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/draft/MySelfRetentionOrderAction.java new file mode 100644 index 0000000..4d84414 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/draft/MySelfRetentionOrderAction.java @@ -0,0 +1,106 @@ +/** + * 扬彩印刷设计 + * 文件名 :MyRetentionOrderAction.java + * 创建人 :高佳新 + * 创建时间:2019-7-17 + */ + +package com.zhiqim.yangcai.design.action.draft; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.constants.DraftConstants; +import com.zhiqim.yangcai.design.constants.StatusConstants; +import com.zhiqim.yangcai.design.dao.OperatorDao; +import com.zhiqim.yangcai.design.dbo.order.DesignSelfView; +import com.zhiqim.yangcai.design.dbo.order.OrdProgressNote; + +/** + * + * 我的滞留单 + * + * @version 1.0 @author gjx 2019-7-24 新建与整理 + */ +public class MySelfRetentionOrderAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page", 1); + int pageSize = request.getContextAttributeInt("page.size", 12); + String startDate = request.getParameter("startDate", DateTimes.getPreviousDateStringByMonth(3)); + String endDate = request.getParameter("endDate", DateTimes.getDateString()); + int draftType = request.getParameterInt("draftType"); + int monthFlag = request.getParameterInt("retentionTime"); + monthFlag = monthFlag < 1 ? 1 : monthFlag; + + Selector selector = new Selector(); + selector.addMaybeThenGE("createTime", Sqls.toTimestamp(startDate, "00:00:00")); + selector.addMaybeThenLE("createTime", Sqls.toTimestamp(endDate, "23:59:59")); + selector.addOrderbyDesc("createTime"); + selector.addMustThenLE("status", StatusConstants.ORDER_50.value());// 小于等于已初稿状态 + selector.addMustThenGE("status", StatusConstants.ORDER_10.value());// 大于等于已付款 + // 历史数据:非客服负责的标准自来稿订单 + selector.addMust("kfDraftStandard", Boolean.FALSE); + if (draftType == -1) + { + selector.addMustIn("draftType", DraftConstants.DRAFT_STANDARD.value(), DraftConstants.DRAFT_TEMPLATE.value());// 自来稿订单 + } + else + { + selector.addMustIn("draftType", draftType); + } + selector.addMaybe("designId", request.getParameterLong("designId")); + selector.addMaybe("typeId", request.getParameterLong("typeId")); + selector.addMaybe("selfDraftDesigner", request.getParameter("selfDraftDesigner")); + selector.addMaybe("buyerNick", request.getParameter("buyerNick")); + selector.addMaybe("shopNick", request.getParameter("shopNick")); + selector.addExpressionThenL("createTime", "DATE_SUB(now(),INTERVAL " + monthFlag * 31 + " DAY)"); + + String sessionName = request.getSessionName(); + OperatorDao.getOperatorSelector(request, selector, "selfDraftDesigner", sessionName); + PageResult pageResult = ORM.get(ZView.class).page(DesignSelfView.class, page, pageSize, selector); + pageResult.addConditionMap(request.getParameterMap()); + + List ordOrderList = pageResult.list(); + long[] designIdArray = new long[ordOrderList.size()]; + for (int i = 0; i < ordOrderList.size(); i++) + { + designIdArray[i] = ordOrderList.get(i).getDesignId(); + + } + // 进度备注 + Map progressNoteMap = new HashMap(); + + if (Validates.isNotEmpty(designIdArray)) + { + List progressNotes = ORM.get(ZTable.class).list(OrdProgressNote.class, + new Selector().addMaybeInLong("designId", designIdArray).addOrderbyAsc("createTime")); + for (OrdProgressNote ordProgressNote : progressNotes) + { + progressNoteMap.put(ordProgressNote.getDesignId(), ordProgressNote.getOrdProgressNote()); + } + } + + request.setAttribute("progressNoteMap", progressNoteMap); + request.setAttribute("operatorList", OperatorDao.getOperatorList(request, sessionName)); + request.setAttribute("pageResult", pageResult); + request.setAttribute("startDate", startDate); + request.setAttribute("endDate", endDate); + + } +} \ No newline at end of file diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/dzmpsupport/DzmpSupportAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/dzmpsupport/DzmpSupportAction.java new file mode 100644 index 0000000..39756af --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/dzmpsupport/DzmpSupportAction.java @@ -0,0 +1,217 @@ +package com.zhiqim.yangcai.design.action.dzmpsupport; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.HttpResponse; +import org.zhiqim.httpd.context.extend.StdSwitchAction; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.manager.ZmrConstants; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.media.dbo.dzmp.DzmpImageStorage; +import com.zhiqim.media.dbo.dzmp.DzmpUserCardStorage; +import com.zhiqim.media.manage.model.DzmpImageModel; +import com.zhiqim.media.manage.utils.CollectionUtils; +import com.zhiqim.yangcai.design.dbo.dzmpsupport.DzmpDesignElement; + +/** + * 电子名片支持接口
            + * + * @author HuangZhiGao + * @date 2020年7月16日 下午2:28:16 + */ +public class DzmpSupportAction extends StdSwitchAction implements ZmrConstants +{ + private static final Log log = LogFactory.getLog(DzmpSupportAction.class); + private static Map resultMap = new HashMap(6); + + /** + * 校验参数[id必须传入] + */ + private Boolean checkParams(HttpRequest request) throws Exception + { + HttpResponse response = request.getResponse(); + String id = request.getParameter("id"); + if (Validates.isEmpty(id)) + { + resultMap.clear(); + resultMap.put("error", Boolean.TRUE); + resultMap.put("errorMsg", "请求参数错误,必须携带id参数"); + String result = Jsons.toString(resultMap); + response.print(result); + return Boolean.FALSE; + } + return Boolean.TRUE; + } + + /** + * 电子名片小程序:查询电子名片设计元素json字符串
            + * GET请求,参数id放在URL中 + */ + @Override + public void list(HttpRequest request) + { + + try + { + if (!checkParams(request)) + { + return; + } + + HttpResponse response = request.getResponse(); + String id = request.getParameter("id"); + String result; + resultMap.clear(); + + /** 设计平台电子名片版式布局信息 **/ + DzmpDesignElement cardLayout = ORM.get(ZTable.class).item(DzmpDesignElement.class, new Selector("id", id)); + /** 设计平台电子名片信息 **/ + DzmpUserCardStorage cardStorage = ORM.get(ZTable.class).item(DzmpUserCardStorage.class, new Selector("id", Long.parseLong(id))); + /** 设计平台名片关联的个人相册图片 **/ + List albumList = ORM.get(ZTable.class).list(DzmpImageStorage.class, + new Selector("userCardId", Long.parseLong(id)).addMust("type", 1).addOrderbyAsc("sort")); + List imageList = new ArrayList(); + for (DzmpImageStorage album : albumList) + { + if (Validates.isNotEmpty(album)) + { + DzmpImageModel dzmpImageModel = new DzmpImageModel(); + dzmpImageModel.setType(album.getType()); + dzmpImageModel.setUserCardId(Long.parseLong(id)); + dzmpImageModel.setImgUrl(album.getImgUrl()); + imageList.add(dzmpImageModel); + } + } + + if (Validates.isNotEmpty(cardLayout)) + { + resultMap.put("error", Boolean.FALSE); + resultMap.put("cardLayoutInfo", cardLayout); + } + if (Validates.isNotEmpty(cardStorage)) + { + resultMap.put("error", Boolean.FALSE); + resultMap.put("cardInfo", cardStorage); + } + if (!CollectionUtils.isEmpty(imageList)) + { + resultMap.put("error", Boolean.FALSE); + resultMap.put("cardAlbums", imageList); + } + + if (Validates.isEmpty(cardLayout) && Validates.isEmpty(cardStorage)) + { + resultMap.put("error", Boolean.TRUE); + resultMap.put("errorMsg", "设计平台电子名片信息不存在,id为[" + id + "]"); + } + result = Jsons.toString(resultMap); + response.print(result); + return; + } + catch (Exception e) + { + log.error("电子名片小程序调用查询电子名片设计元素json字符串异常:" + e.getMessage()); + } + } + + /** + * 电子名片小程序:编辑电子名片设计元素json字符串
            + * POST请求,参数id放在URL中,参数eleJson放在请求体body里面
            + * Content-Type设置为application/json
            + */ + @Override + protected void update(HttpRequest request) + { + try + { + if (!checkParams(request)) + { + return; + } + + HttpResponse response = request.getResponse(); + String id = request.getParameter("id"); + String jsonStr = request.getInputStreamString(); + jsonStr = Jsons.getString(jsonStr, "eleJson"); + + String result; + resultMap.clear(); + if (Validates.isEmpty(jsonStr)) + { + resultMap.put("error", Boolean.TRUE); + resultMap.put("errorMsg", "请求参数错误,设计元素json字符串不能为空"); + result = Jsons.toString(resultMap); + response.print(result); + return; + } + + DzmpDesignElement item = ORM.get(ZTable.class).item(DzmpDesignElement.class, new Selector("id", id)); + if (Validates.isEmpty(item)) + { + resultMap.put("error", Boolean.TRUE); + resultMap.put("errorMsg", "电子名片设计元素json字符串不存在,id为[" + id + "]"); + result = Jsons.toString(resultMap); + response.print(result); + return; + } + Updater updater = new Updater(); + updater.addMust("id", id); + updater.addField("eleJson", jsonStr); + updater.addField("modifyTime", Sqls.nowTimestamp()); + ORM.get(ZTable.class).update(DzmpDesignElement.class, updater); + + resultMap.put("error", Boolean.FALSE); + resultMap.put("successMsg", "修改成功"); + result = Jsons.toString(resultMap); + response.print(result); + return; + } + catch (Exception e) + { + log.error("电子名片小程序调用编辑电子名片设计元素json字符串异常:" + e.getMessage()); + } + } + + @Override + protected void validateId(HttpRequest request) throws Exception + { + } + + @Override + protected void validateForm(HttpRequest request) throws Exception + { + } + + @Override + protected void add(HttpRequest request) throws Exception + { + } + + @Override + protected void modify(HttpRequest request) throws Exception + { + } + + @Override + protected void insert(HttpRequest request) throws Exception + { + } + + @Override + protected void delete(HttpRequest request) throws Exception + { + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/dzmpsupport/DzmpUserBindCardAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/dzmpsupport/DzmpUserBindCardAction.java new file mode 100644 index 0000000..365f13e --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/dzmpsupport/DzmpUserBindCardAction.java @@ -0,0 +1,318 @@ +package com.zhiqim.yangcai.design.action.dzmpsupport; + +import java.math.BigDecimal; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.HttpResponse; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ORMException; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.alibaba.fastjson.JSON; +import com.zhiqim.media.dbo.dzmp.DzmpImageStorage; +import com.zhiqim.media.dbo.dzmp.DzmpUserCardStorage; +import com.zhiqim.media.manage.model.DzmpImageModel; +import com.zhiqim.media.manage.model.DzmpUserCardModel; +import com.zhiqim.media.manage.utils.CollectionUtils; +import com.zhiqim.media.manage.utils.DzmpServiceClientUtil; +import com.zhiqim.media.service.dao.DzmpUserCardStorageDao; + +/** + * 电子名片用户绑定设计平台名片相关信息接口
            + * + * @author HuangZhiGao + * @date 2020年11月25日 下午3:11:51 + */ +public class DzmpUserBindCardAction implements Action +{ + private static final Log log = LogFactory.getLog(DzmpUserBindCardAction.class); + private static Map resultMap = new HashMap(2); + + @Override + public void execute(HttpRequest request) + { + long cardId = request.getParameterLong("cardId"); + long userId = request.getParameterLong("userId"); + if (cardId < 0) + { + resultMap.clear(); + resultMap.put("error", Boolean.TRUE); + resultMap.put("errorMsg", "请求参数错误,必须携带cardId参数"); + return; + } + if (userId < 0) + { + resultMap.clear(); + resultMap.put("error", Boolean.TRUE); + resultMap.put("errorMsg", "请求参数错误,必须携带userId参数"); + return; + } + + try + { + // 查询设计平台电子名片 + DzmpUserCardStorage cardStorage = ORM.get(ZTable.class).item(DzmpUserCardStorage.class, new Selector("id", cardId)); + if (Validates.isEmpty(cardStorage)) + { + resultMap.clear(); + resultMap.put("error", Boolean.TRUE); + resultMap.put("errorMsg", "设计平台不存在[" + cardId + "]名片"); + return; + } + + // 更新设计平台电子名片信息 + String data = request.getInputStreamString(); + String jsonStr = Jsons.getString(data, "jsonData"); + DzmpUserCardStorage updateCardStorage = JSON.parseObject(jsonStr, DzmpUserCardStorage.class); + if (Validates.isNotEmpty(updateCardStorage)) + { + updateCardInfo(updateCardStorage, cardId); + } + + cardStorage = ORM.get(ZTable.class).item(DzmpUserCardStorage.class, new Selector("id", cardId)); + // 电子名片用户绑定设计平台名片信息及其关联的个人相册图片信息 + bindCard(cardStorage, userId); + + HttpResponse response = request.getResponse(); + resultMap.clear(); + resultMap.put("error", Boolean.FALSE); + String result = Jsons.toString(resultMap); + response.print(result); + } + catch (Exception e) + { + String tempMsg = "电子名片用户绑定设计平台名片信息异常:" + e.getMessage(); + log.error(tempMsg); + } + return; + } + + /** + * 更新设计平台电子名片信息
            + * + * @param cardStorage + * @return void + * @author HuangZhiGao + * @throws SQLException + * @throws ORMException + * @date 2020年11月25日 下午5:06:29 + */ + private static void updateCardInfo(DzmpUserCardStorage cardStorage, long cardId) throws ORMException, SQLException + { + Updater updater = new Updater(); + updater.addMust("id", cardId); + if (Validates.isNotEmpty(cardStorage.getUserCardName())) + { + updater.addField("userCardName", cardStorage.getUserCardName()); + } + if (Validates.isNotEmpty(cardStorage.getUserRemark())) + { + updater.addField("userRemark", cardStorage.getUserRemark()); + } + if (Validates.isNotEmpty(cardStorage.getCompanyAlias())) + { + updater.addField("companyAlias", cardStorage.getCompanyAlias()); + } + if (Validates.isNotEmpty(cardStorage.getPosition())) + { + updater.addField("position", cardStorage.getPosition()); + } + if (Validates.isNotEmpty(cardStorage.getCardUrl())) + { + updater.addField("cardUrl", cardStorage.getCardUrl()); + } + if (Validates.isNotEmpty(cardStorage.getRegion())) + { + updater.addField("region", cardStorage.getRegion()); + } + if (Validates.isNotEmpty(cardStorage.getCity())) + { + updater.addField("city", cardStorage.getCity()); + } + if (Validates.isNotEmpty(cardStorage.getDistrict())) + { + updater.addField("district", cardStorage.getDistrict()); + } + if (Validates.isNotEmpty(cardStorage.getAddress())) + { + updater.addField("address", cardStorage.getAddress()); + } + if (Validates.isNotEmpty(cardStorage.getLatitude())) + { + updater.addField("latitude", cardStorage.getLatitude()); + } + if (Validates.isNotEmpty(cardStorage.getLongitude())) + { + updater.addField("longitude", cardStorage.getLongitude()); + } + if (Validates.isNotEmpty(cardStorage.getWxcode())) + { + updater.addField("wxcode", cardStorage.getWxcode()); + } + if (Validates.isNotEmpty(cardStorage.getUserQq())) + { + updater.addField("userQq", cardStorage.getUserQq()); + } + if (Validates.isNotEmpty(cardStorage.getUserEmail())) + { + updater.addField("userEmail", cardStorage.getUserEmail()); + } + if (Validates.isNotEmpty(cardStorage.getMobile())) + { + updater.addField("mobile", cardStorage.getMobile()); + } + if (Validates.isNotEmpty(cardStorage.getLandline())) + { + updater.addField("landline", cardStorage.getLandline()); + } + if (Validates.isNotEmpty(cardStorage.getUserFax())) + { + updater.addField("userFax", cardStorage.getUserFax()); + } + if (Validates.isNotEmpty(cardStorage.getWebsiteUrl())) + { + updater.addField("websiteUrl", cardStorage.getWebsiteUrl()); + } + if (Validates.isNotEmpty(cardStorage.getCardAvatar())) + { + updater.addField("cardAvatar", cardStorage.getCardAvatar()); + } + if (Validates.isNotEmpty(cardStorage.getCardBackground())) + { + updater.addField("cardBackground", cardStorage.getCardBackground()); + } + if (Validates.isNotEmpty(cardStorage.getCardBackgroundType())) + { + updater.addField("cardBackgroundType", cardStorage.getCardBackgroundType()); + } + if (Validates.isNotEmpty(cardStorage.getCardLayoutId())) + { + updater.addField("cardLayoutId", cardStorage.getCardLayoutId()); + } + if (Validates.isNotEmpty(cardStorage.getRemark())) + { + updater.addField("remark", cardStorage.getRemark()); + } + + updater.addField("updateOperatorCode", "0"); + updater.addField("updateTime", Sqls.nowTimestamp()); + + ORM.get(ZTable.class).update(DzmpUserCardStorage.class, updater); + } + + /** + * 电子名片用户绑定设计平台名片信息
            + * + * @param cardStorage 设计平台名片信息 + * @param userId 电子名片用户id + * @return void + * @author HuangZhiGao + * @throws SQLException + * @throws ORMException + * @date 2020年11月25日 下午2:31:35 + */ + private static void bindCard(DzmpUserCardStorage cardStorage, long userId) throws ORMException, SQLException + { + // 组装数据 + DzmpUserCardModel dzmpUserCardModel = new DzmpUserCardModel(); + dzmpUserCardModel.setUserId(userId); + dzmpUserCardModel.setDesignId(cardStorage.getDesignId()); + dzmpUserCardModel.setUserCardName(cardStorage.getUserCardName()); + dzmpUserCardModel.setUserRemark(cardStorage.getUserRemark()); + dzmpUserCardModel.setCompanyAlias(cardStorage.getCompanyAlias()); + dzmpUserCardModel.setPosition(cardStorage.getPosition()); + dzmpUserCardModel.setCardUrl(cardStorage.getCardUrl()); + dzmpUserCardModel.setRegion(cardStorage.getRegion()); + dzmpUserCardModel.setCity(cardStorage.getCity()); + dzmpUserCardModel.setDistrict(cardStorage.getDistrict()); + dzmpUserCardModel.setAddress(cardStorage.getAddress()); + if (Validates.isNotEmpty(cardStorage.getLatitude())) + { + dzmpUserCardModel.setLatitude(new BigDecimal(cardStorage.getLatitude())); + } + if (Validates.isNotEmpty(cardStorage.getLongitude())) + { + dzmpUserCardModel.setLongitude(new BigDecimal(cardStorage.getLongitude())); + } + dzmpUserCardModel.setWxcode(cardStorage.getWxcode()); + dzmpUserCardModel.setUserQq(cardStorage.getUserQq()); + dzmpUserCardModel.setUserEmail(cardStorage.getUserEmail()); + dzmpUserCardModel.setMobile(cardStorage.getMobile()); + dzmpUserCardModel.setLandline(cardStorage.getLandline()); + dzmpUserCardModel.setUserFax(cardStorage.getUserFax()); + dzmpUserCardModel.setWebsiteUrl(cardStorage.getWebsiteUrl()); + dzmpUserCardModel.setCardAvatar(cardStorage.getCardAvatar()); + dzmpUserCardModel.setCardBackground(cardStorage.getCardBackground()); + dzmpUserCardModel.setCardBackgroundType(cardStorage.getCardBackgroundType()); + dzmpUserCardModel.setCardLayoutId(cardStorage.getCardLayoutId()); + dzmpUserCardModel.setRemark(cardStorage.getRemark()); + dzmpUserCardModel.setCardCodeId(String.valueOf(cardStorage.getId())); + + // 在运营平台新建名片 + String newCardId = DzmpServiceClientUtil.doCreateCardInfo(dzmpUserCardModel); + if (Validates.isNotEmpty(newCardId)) + { + Updater updater = new Updater(); + updater.addMust("id", cardStorage.getId()); + updater.addMust("useState", DzmpUserCardStorageDao.USED);// 修改设计平台名片为已使用状态 + updater.addField("updateOperatorCode", "0"); + updater.addField("updateTime", Sqls.nowTimestamp()); + ORM.get(ZTable.class).update(DzmpUserCardStorage.class, updater); + + // 在运营平台新建的名片绑定设计平台个人相册信息 + cardBindImages(newCardId, cardStorage.getId()); + } + } + + /** + * 在运营平台新建的名片绑定设计平台个人相册信息
            + * + * @param newCardId 运营平台名片id + * @param cardId 设计平台名片id + * @return void + * @author HuangZhiGao + * @throws SQLException + * @throws ORMException + * @date 2020年11月25日 下午2:37:39 + */ + private static void cardBindImages(String newCardId, long cardId) throws ORMException, SQLException + { + // 设计平台名片关联的个人相册图片 + List albumList = ORM.get(ZTable.class).list(DzmpImageStorage.class, new Selector("userCardId", cardId).addMust("type", 1)); + List imageList = new ArrayList(); + for (DzmpImageStorage album : albumList) + { + if (Validates.isNotEmpty(album)) + { + DzmpImageModel dzmpImageModel = new DzmpImageModel(); + dzmpImageModel.setType(album.getType()); + dzmpImageModel.setUserCardId(Long.parseLong(newCardId)); + dzmpImageModel.setImgUrl(album.getImgUrl()); + dzmpImageModel.setSort(album.getSort()); + imageList.add(dzmpImageModel); + } + } + + if (!CollectionUtils.isEmpty(imageList)) + { + LinkedHashMap jsonParamsMap = new LinkedHashMap(); + jsonParamsMap.put("drArr", imageList); + DzmpServiceClientUtil.doBatchCreateImageInfo(jsonParamsMap); + } + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/editor/EditorSystemAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/editor/EditorSystemAction.java new file mode 100644 index 0000000..c1a41f0 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/editor/EditorSystemAction.java @@ -0,0 +1,41 @@ +package com.zhiqim.yangcai.design.action.editor; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.constants.HttpConstants; +import org.zhiqim.manager.dao.ZmrOperatorDao; +import org.zhiqim.manager.dbo.ZmrOperator; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.editor.DesignEditorUser; +import com.zhiqim.yangcai.util.BusinessTbzBjqUtil; + +public class EditorSystemAction implements Action, HttpConstants +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + String operatorCode = request.getSessionName(); + ZmrOperator zmrOperator = ZmrOperatorDao.getOperator(request, operatorCode); + // 获取设计师的编辑器用户信息 + DesignEditorUser designEditorUser = ORM.get(ZTable.class).item(DesignEditorUser.class, + new Selector().addMust("userName", operatorCode).addMust("mobile", zmrOperator.getOperatorMobile())); + if (null == designEditorUser) + { + designEditorUser = new DesignEditorUser(); + designEditorUser.setUserName(operatorCode); + designEditorUser.setMobile(zmrOperator.getOperatorMobile()); + designEditorUser.setType(1);// 设计师,2为客户 + ORM.get(ZTable.class).insert(designEditorUser); + designEditorUser = ORM.get(ZTable.class).item(DesignEditorUser.class, new Selector().addMust("userName", operatorCode)); + + } + String token = BusinessTbzBjqUtil.getAccessToken(operatorCode, Integer.valueOf(String.valueOf(designEditorUser.getEditorId())), 0L, 0L, "", + designEditorUser.getMobile()); + request.setAttribute("token", token); + } + +} \ No newline at end of file diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/editor/GetFileUrlAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/editor/GetFileUrlAction.java new file mode 100644 index 0000000..3cfa56e --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/editor/GetFileUrlAction.java @@ -0,0 +1,339 @@ +package com.zhiqim.yangcai.design.action.editor; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.InputStream; +import java.net.URL; +import java.net.URLConnection; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.constants.HttpConstants; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Strings; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.alibaba.fastjson.JSONObject; +import com.zhiqim.oss.service.oss.OssUploadService; +import com.zhiqim.yangcai.design.constants.FileTypeConstants; +import com.zhiqim.yangcai.design.dao.OssFileDao; +import com.zhiqim.yangcai.design.dbo.order.DesignAtta; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; + +public class GetFileUrlAction implements Action, HttpConstants +{ + private static final Log log = LogFactory.getLog(GetFileUrlAction.class); + + @Override + public void execute(HttpRequest request) throws Exception + { + JSONObject result = new JSONObject(); + String queryString = request.getInputStreamString(); + // {"order_no":"2346650490001","timestamp":1691725361,"uid":"1005","url":"//imagediy.xfni.cn/download/202308/11/5f2e56a826bd25530f1d82aebb7aa014.pdf","sign":"36B8DD02667F3429D6DB658A2790CDE1BCFDA24C","size":"142M"} + System.out.print("===================================================queryString:" + queryString); + /* + * TreeMap paramMap = new TreeMap(); + * Urls.toMapUTF8(queryString, paramMap); + */ + JSONObject jsonObject = JSONObject.parseObject(queryString); + String designId = jsonObject.getString("order_no"); + String[] order_noArr = designId.split("_"); + if (order_noArr.length < 2) + { + log.error("同步编辑器文件失败:【" + queryString + "】,请排查"); + request.setAttribute("success", false); + request.setAttribute("errmsg", "订单标识错误"); + return; + } + + String order_no = order_noArr[0]; + String type = order_noArr[1]; + String url = "https:" + jsonObject.getString("url"); + String size = jsonObject.getString("size"); + long attaId = Ids.longId(); + DesignAtta designAtta = new DesignAtta(); + designAtta.setAttaId(attaId); + String sizeStr = size.replaceAll("[0-9]", ""); + int sizeInt = Integer.valueOf(size.replaceAll("[a-zA-Z]", "")); + if ("M".equals(sizeStr)) + { + designAtta.setFileSize(sizeInt * 1024 * 1024); + } + else + { + designAtta.setFileSize(sizeInt * 1024); + } + String fileName = ""; + DesignOrder designOrder = ORM.get(ZTable.class).item(DesignOrder.class, new Selector().addMust("designId", Long.valueOf(order_no))); + if ("cmyk".equals(type) && !designOrder.isOnlyDesign()) + { + designAtta.setAttaModul(FileTypeConstants.FILE_END.value());// 印刷文件 + fileName = order_no + "-" + designOrder.getBuyerNick() + "." + url.substring(url.lastIndexOf(".") + 1); + } + else + { + designAtta.setAttaModul(FileTypeConstants.FILE_TBZ.value());// 印刷文件 + fileName = order_no + "-" + designOrder.getBuyerNick() + "_" + type + "." + url.substring(url.lastIndexOf(".") + 1); + } + + String savePath = downloadImg(url, "/temp/" + fileName); + designAtta.setSavePath(savePath); + designAtta.setOssType(0); + designAtta.setFileName(fileName); + designAtta.setAttaFlag(1); + designAtta.setFileType(url.substring(url.lastIndexOf(".") + 1)); + designAtta.setDesignId(Long.valueOf(order_no)); + + designAtta.setUploadTime(Sqls.nowTimestamp()); + designAtta.setOperatorCode(request.getSessionName()); + // designAtta.setOperatorCode("玉米"); + try + { + // 需要校验文件 + /** + * if ("cmyk".equals(type)) + * { + * String ret = OrderCheckDao.doCheckFile2(Long.valueOf(order_no), savePath, + * designAtta.getAttaModul()); + * System.out.println("=======ret==============ret===========ret:" + ret); + * if (Validates.isNotEmpty(ret)) + * { + * + * Updater updater = new Updater(); + * updater.addMust("designId", Long.valueOf(order_no)); + * updater.addField("fileFailMsg", ret); + * ORM.get(ZTable.class).update(DesignOrder.class, updater); + * OrderCheckDao.doDeleteEndFile(designAtta); + * OrderLogDao.saveOrderOperateLog(Long.valueOf(order_no), "秒绘设计平台", "设计平台文件审核失败自动删除", + * EventConstants.ORDER_16.value()); + * + * request.setResponseError(ret); + * return; + * } + * Updater updater = new Updater(); + * updater.addMust("designId", Long.valueOf(order_no)); + * updater.addField("fileFailMsg", ""); + * ORM.get(ZTable.class).update(DesignOrder.class, updater); + * } + **/ + System.out.println("================================designAtta:" + designAtta); + ORM.get(ZTable.class).insert(designAtta); + + String fileKey = getUploadFileKey(designAtta); + System.out.println("================================fileKey:" + fileKey); + long fileSize = designAtta.getFileSize(); + long uploadSize = 10 * MiB;// 大于10M标记用断点续传 + boolean uploaded = false; + if (fileSize > uploadSize) + { + uploaded = OssFileDao.uploadBreak(designAtta);// 断点续传 + } + else + { + uploaded = OssFileDao.uploadFile(designAtta); + } + if (!uploaded) + { + System.out.println("OssUploadTask 订单[" + designAtta.getDesignId() + "]上传附件[" + designAtta.getAttaModul() + "]失败"); + } + } + catch (Exception e) + { + System.out.println("================================e:" + e.getMessage()); + e.printStackTrace(); + } + + request.setAttribute("success", true); + request.setAttribute("errmsg", "OK"); + return; + } + + private static String bucketName = Global.getString("oss", "dfdiyfile"); + private static String prefix_dir = Global.getString("oss", "prefix_dir"); + private static boolean isInternal = "true".equalsIgnoreCase(Global.getString("oss", "isInternal")) ? true : false; + public static String ossEndpoint = "dfdiyfile.oss-cn-shenzhen.aliyuncs.com"; + + /** 获取oss前缀目录 **/ + public static String getPrefix_dir() + { + String dir = Strings.trim(prefix_dir); + dir = Strings.trim(dir, "/", "/"); + return Strings.trim(dir); + } + + public static void main(String[] args) + { + String path = "https://imagediy.lingtao8.com/download/202308/12/6f451a72cf11222595666317182d96c8.zip"; + + try + { + downloadImg(path, "D:\\ddd\\6f451a72cf11222595666317182d96c8.zip"); + } + catch (Exception e) + { + // TODO Auto-generated catch block + e.printStackTrace(); + } + /* + * try + * { + * URL url = new URL(path); + * System.out.print("文件没找到" + url.openStream()); + * } + * catch (MalformedURLException e) + * { + * // TODO Auto-generated catch block + * e.printStackTrace(); + * } + * catch (IOException e) + * { + * // TODO Auto-generated catch block + * e.printStackTrace(); + * } + */ /* + * File file = new File("C:\\Users\\zzqzz\\Pictures\\企业微信截图_16880901879786.png"); + * if (!file.exists() || file.isDirectory()) + * {// 文件不存在 + * System.out.print("文件没找到"); + * } + * else + * { + * System.out.print("文件找到"); + * } + */ + } + + /** + * 保存url文件到本地 + * + * @param urlString 文件url + * @param filePath 本地写入文件路径 + * @return filePath 保存文件地址 + * @throws Exception + */ + public static String downloadImg(String urlString, String filePath) throws Exception + { + // 构造URL + URL url = new URL(urlString); + // 打开连接 + URLConnection con = url.openConnection(); + // 输入流 + InputStream is = con.getInputStream(); + // 1K的数据缓冲 + byte[] bs = new byte[1024]; + // 读取到的数据长度 + int len; + // 输出的文件流 + File file = new File(filePath); + FileOutputStream os = new FileOutputStream(file, true); + // 开始读取 + while ((len = is.read(bs)) != -1) + { + os.write(bs, 0, len); + } + // 完毕,关闭所有链接 + os.close(); + is.close(); + return filePath; + } + + public void a() + { + String queryString = "{\"order_no\":\"2346650490001\",\"timestamp\":1691725361,\"uid\":\"1005\",\"url\":\"//imagediy.xfni.cn/download/202308/11/5f2e56a826bd25530f1d82aebb7aa014.pdf\",\"sign\":\"36B8DD02667F3429D6DB658A2790CDE1BCFDA24C\",\"size\":\"142M\"}"; + JSONObject jsonObject = JSONObject.parseObject(queryString); + String order_no = jsonObject.getString("order_no"); + String url = "https" + jsonObject.getString("url"); + String size = jsonObject.getString("size"); + long attaId = Ids.longId(); + DesignAtta designAtta = new DesignAtta(); + designAtta.setAttaId(attaId); + String sizeStr = size.replaceAll("[0-9]", ""); + int sizeInt = Integer.valueOf(size.replaceAll("[a-zA-Z]", "")); + if ("M".equals(sizeStr)) + { + designAtta.setFileSize(sizeInt * 1024 * 1024); + } + else + { + designAtta.setFileSize(sizeInt * 1024); + } + + designAtta.setSavePath(url); + designAtta.setOssType(1); + designAtta.setAttaFlag(1); + designAtta.setFileType(url.substring(url.lastIndexOf(".") + 1)); + designAtta.setDesignId(Long.valueOf(order_no)); + designAtta.setAttaModul(FileTypeConstants.FILE_DESGIN.value()); + designAtta.setUploadTime(Sqls.nowTimestamp()); + // designAtta.setOperatorCode(request.getSessionName()); + designAtta.setOperatorCode("玉米"); + try + { + System.out.println("================================designAtta:" + designAtta); + ORM.get(ZTable.class).insert(designAtta); + + String fileKey = getUploadFileKey(designAtta); + System.out.println("================================fileKey:" + fileKey); + OssUploadService ossUploadService = Global.get(OssUploadService.class); + String ossUrl = ossUploadService.uploadFile(bucketName, fileKey, designAtta.getSavePath(), isInternal); + System.out.println("================================ossUrl:" + ossUrl); + designAtta.setOssUrl(ossUrl); + designAtta.setOssType(1); + Updater updater = new Updater(); + updater.addMust("attaId", designAtta.getAttaId()); + updater.addField("ossUrl", ossUrl); + updater.addField("ossType", 1); + ORM.get(ZTable.class).update(DesignAtta.class, updater); + } + catch (Exception e) + { + System.out.println("================================e:" + e.getMessage()); + e.fillInStackTrace(); + } + } + + /** + * 获取组装文件在OSS上的key + * + * @param atta 附件对象 + * @return 返回 文件的key + */ + public static String getUploadFileKey(DesignAtta atta) + { + // 模拟文件夹 + if (atta == null) + { + return null; + } + + String date = Sqls.toDateString(atta.getUploadTime()).replace("-", ""); + String attaModul = atta.getAttaModul(); + String folder = Strings.addEndsWith(date, "/") + Strings.addEndsWith(attaModul, "/"); + String fileKey = folder + atta.getAttaId() + Strings.addStartsWith(atta.getFileType(), "."); + + /* + * if (Validates.isNotEmptyBlank(atta.getOssUrl()) && + * Validates.isNotEmptyBlank(getPrefix_dir()) && atta.getOssUrl().indexOf(getPrefix_dir()) + * == -1) + * { + * return fileKey;// 老数据 已经上传过了 + * } + */ + + if (Validates.isNotEmptyBlank(getPrefix_dir())) + { + fileKey = Strings.addEndsWith(getPrefix_dir(), "/") + fileKey; + } + + return fileKey; + } + +} \ No newline at end of file diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/editor/IphoneLogintAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/editor/IphoneLogintAction.java new file mode 100644 index 0000000..a3c9ca1 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/editor/IphoneLogintAction.java @@ -0,0 +1,16 @@ +package com.zhiqim.yangcai.design.action.editor; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.constants.HttpConstants; + +public class IphoneLogintAction implements Action, HttpConstants +{ + + @Override + public void execute(HttpRequest arg0) throws Exception + { + + } + +} \ No newline at end of file diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/keyword/KeywordIndustryTopAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/keyword/KeywordIndustryTopAction.java new file mode 100644 index 0000000..38c4bd3 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/keyword/KeywordIndustryTopAction.java @@ -0,0 +1,34 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.action.keyword; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; + +/** + * 行业关键词排行 + * + * @version v1.0.0 @author Deng 2018-3-20 新建与整理 + */ +public class KeywordIndustryTopAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + long industryId = request.getParameterLong("industryId"); + long industrySubId = request.getParameterLong("industrySubId"); + + request.setAttribute("industryId", industryId); + request.setAttribute("industrySubId", industrySubId); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/keyword/KeywordTopAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/keyword/KeywordTopAction.java new file mode 100644 index 0000000..6137b63 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/keyword/KeywordTopAction.java @@ -0,0 +1,67 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action.keyword; + +import java.util.ArrayList; +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.keyword.DesKeywordCoreLog; + +/** + * 关键词排行 + * + * @version v1.0.0 @author Deng 2018-3-20 新建与整理 + */ +public class KeywordTopAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + String dayCode = DateTimes.getPreviousDateString(); + + Selector selector = new Selector(); + selector.addMust("dayCode", dayCode); + selector.addOrderbyDesc("keywordNum"); + List logList = ORM.get(ZTable.class).list(DesKeywordCoreLog.class, selector); + if (logList == null) + { + return; + } + + int toIndex = logList.size() > 3 ? 3 : logList.size(); + List threeList = logList.subList(0, toIndex); + request.setAttribute("threeList", threeList); + + List restList = new ArrayList(); + for (int i = 3; i < logList.size(); i++) + { + DesKeywordCoreLog log = logList.get(i); + restList.add(log); + + if (i == 7) + { + break; + } + } + + request.setAttribute("restList", restList); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/label/LabelAttributeAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/label/LabelAttributeAction.java new file mode 100644 index 0000000..c5bf4e9 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/label/LabelAttributeAction.java @@ -0,0 +1,155 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action.label; + +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.extend.StdSwitchAction; +import org.zhiqim.httpd.validate.ones.IsLen; +import org.zhiqim.httpd.validate.ones.IsNotEmpty; +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.manager.ZmrConstants; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.cache.DesignIndustryCache; +import com.zhiqim.yangcai.design.dbo.DesLabelAttribute; +import com.zhiqim.yangcai.design.dbo.design.DesignIndustry; + +/** + * 标签属性 + * + * @version v1.0.0 @author Deng 2017-11-13 新建与整理 + */ +public class LabelAttributeAction extends StdSwitchAction implements ZmrConstants +{ + @Override + protected void validateId(HttpRequest request) + { + request.addValidate(new IsNotEmpty("attributeId", "请选择一个选项")); + } + + @Override + protected void validateForm(HttpRequest request) + { + request.addValidate(new IsNotEmpty("industryId", "请选择标签行业")); + request.addValidate(new IsNotEmpty("attributeCatId", "请选择标签属性分类")); + request.addValidate(new IsLen("attributeName", "标签属性名称不能为空且不能超过64个字符", 1, 64)); + } + + @Override + protected void list(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page", 1); + int pageSize = 20; + long industryId = request.getParameterLong("industryId"); + + Selector selector = new Selector(); + if (industryId != -1) + { + selector.addMust("industryId", industryId); + } + selector.addOrderbyDesc("industryId"); + selector.addOrderbyDesc("attributeCatId"); + PageResult pageResult = ORM.get(ZTable.class).page(DesLabelAttribute.class, page, pageSize, selector); + pageResult.addConditionMap(request.getParameterMap()); + request.setAttribute("pageResult", pageResult); + request.setAttribute("industryList", Global.get(DesignIndustryCache.class).getIndustryListAll()); + } + + @Override + protected void add(HttpRequest request) throws Exception + { + List indList = Global.get(DesignIndustryCache.class).getIndustryListAll(); + request.setAttribute("indList", indList); + } + + @Override + protected void insert(HttpRequest request) throws Exception + { + long industryId = request.getParameterLong("industryId"); + long attributeCatId = request.getParameterLong("attributeCatId"); + String attributeName = request.getParameter("attributeName"); + if (attributeName.indexOf(",") < -1) + { + DesLabelAttribute attr = new DesLabelAttribute(); + attr.setAttributeId(Ids.longId19()); + attr.setAttributeCatId(attributeCatId); + attr.setAttributeName(attributeName); + attr.setIndustryId(industryId); + attr.setCreateTime(Sqls.nowTimestamp()); + + ORM.get(ZTable.class).insert(attr); + } + else + { + for (String attrStr : attributeName.split(",")) + { + DesLabelAttribute attr = new DesLabelAttribute(); + attr.setAttributeId(Ids.longId19()); + attr.setAttributeCatId(attributeCatId); + attr.setAttributeName(attrStr); + attr.setIndustryId(industryId); + attr.setCreateTime(Sqls.nowTimestamp()); + + ORM.get(ZTable.class).insert(attr); + } + } + } + + @Override + protected void modify(HttpRequest request) throws Exception + { + List indList = Global.get(DesignIndustryCache.class).getIndustryListAll(); + request.setAttribute("indList", indList); + + long attributeId = request.getParameterLong("attributeId"); + DesLabelAttribute attr = ORM.get(ZTable.class).item(DesLabelAttribute.class, attributeId); + if (attr == null) + { + request.returnHistory("标签属性不存在,请重新选择"); + return; + } + + request.setAttribute("attr", attr); + } + + @Override + protected void update(HttpRequest request) throws Exception + { + long attributeId = request.getParameterLong("attributeId"); + long attributeCatId = request.getParameterLong("attributeCatId"); + int industryId = request.getParameterInt("industryId"); + String attributeName = request.getParameter("attributeName"); + + Updater updater = new Updater(); + updater.addMust("attributeId", attributeId); + updater.addField("attributeCatId", attributeCatId); + updater.addField("industryId", industryId); + updater.addField("attributeName", attributeName); + + ORM.get(ZTable.class).update(DesLabelAttribute.class, updater); + } + + @Override + protected void delete(HttpRequest request) throws Exception + { + long attributeId = request.getParameterLong("attributeId"); + ORM.get(ZTable.class).delete(DesLabelAttribute.class, attributeId); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/label/LabelAttributeCatAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/label/LabelAttributeCatAction.java new file mode 100644 index 0000000..9c0e7f1 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/label/LabelAttributeCatAction.java @@ -0,0 +1,138 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action.label; + +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.extend.StdSwitchAction; +import org.zhiqim.httpd.validate.ones.IsLen; +import org.zhiqim.httpd.validate.ones.IsNotEmpty; +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.manager.ZmrConstants; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.cache.DesignIndustryCache; +import com.zhiqim.yangcai.design.dbo.DesLabelAttribute; +import com.zhiqim.yangcai.design.dbo.DesLabelAttributeCat; +import com.zhiqim.yangcai.design.dbo.design.DesignIndustry; + +/** + * 标签属性分类 + * + * @version v1.0.0 @author Deng 2017-6-27 新建与整理 + */ +public class LabelAttributeCatAction extends StdSwitchAction implements ZmrConstants +{ + @Override + protected void validateId(HttpRequest request) + { + request.addValidate(new IsNotEmpty("attributeCatId", "请选择一个选项")); + } + + @Override + protected void validateForm(HttpRequest request) + { + request.addValidate(new IsLen("attributeCatName", "标签属性分类名称不能为空且不能超过64个字符", 1, 64)); + } + + @Override + protected void list(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page"); + int pageSize = request.getContextAttributeInt("page.size", 15); + long industryId = request.getParameterLong("industryId"); + + Selector selector = new Selector(); + if (industryId != -1) + { + selector.addMust("industryId", industryId); + } + selector.addOrderbyDesc("createTime"); + PageResult pageResult = ORM.get(ZTable.class).page(DesLabelAttributeCat.class, page, pageSize, selector); + request.setAttribute("pageResult", pageResult); + request.setAttribute("industryList", Global.get(DesignIndustryCache.class).getIndustryListAll()); + } + + @Override + protected void add(HttpRequest request) throws Exception + { + List indList = Global.get(DesignIndustryCache.class).getIndustryListAll(); + request.setAttribute("indList", indList); + } + + @Override + protected void insert(HttpRequest request) throws Exception + { + long industryId = request.getParameterLong("industryId"); + String attributeCatName = request.getParameter("attributeCatName"); + + DesLabelAttributeCat cat = new DesLabelAttributeCat(); + cat.setAttributeCatId(Ids.longId19()); + cat.setIndustryId(industryId); + cat.setAttributeCatName(attributeCatName); + cat.setCreateTime(Sqls.nowTimestamp()); + + ORM.get(ZTable.class).insert(cat); + } + + @Override + protected void modify(HttpRequest request) throws Exception + { + List indList = Global.get(DesignIndustryCache.class).getIndustryListAll(); + request.setAttribute("indList", indList); + + long attributeCatId = request.getParameterLong("attributeCatId"); + DesLabelAttributeCat cat = ORM.get(ZTable.class).item(DesLabelAttributeCat.class, attributeCatId); + if (cat == null) + { + request.returnHistory("标签属性分类不存在,请重新选择"); + return; + } + + request.setAttribute("cat", cat); + } + + @Override + protected void update(HttpRequest request) throws Exception + { + long attributeCatId = request.getParameterLong("attributeCatId"); + long industryId = request.getParameterLong("industryId"); + String attributeCatName = request.getParameter("attributeCatName"); + + Updater updater = new Updater(); + updater.addMust("attributeCatId", attributeCatId); + updater.addField("industryId", industryId); + updater.addField("attributeCatName", attributeCatName); + + ORM.get(ZTable.class).update(DesLabelAttributeCat.class, updater); + } + + @Override + protected void delete(HttpRequest request) throws Exception + { + long attributeCatId = request.getParameterLong("attributeCatId"); + if (ORM.get(ZTable.class).count(DesLabelAttribute.class, new Selector().addMust("attributeCatId", attributeCatId)) > 0) + { + request.returnHistory("标签属性分类下存在属性,请先删除标签属性"); + return; + } + + ORM.get(ZTable.class).delete(DesLabelAttributeCat.class, attributeCatId); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/label/LabelIndustryAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/label/LabelIndustryAction.java new file mode 100644 index 0000000..c423645 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/label/LabelIndustryAction.java @@ -0,0 +1,125 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action.label; + +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.extend.StdSwitchAction; +import org.zhiqim.httpd.validate.ones.IsLen; +import org.zhiqim.httpd.validate.ones.IsNotEmpty; +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.kernel.util.Lists; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.manager.ZmrConstants; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.cache.DesignIndustryCache; +import com.zhiqim.yangcai.design.dbo.DesLabelIndustry; +import com.zhiqim.yangcai.design.dbo.design.DesignIndustry; + +/** + * 标签行业 + * + * @version v1.0.0 @author PVer 2017-6-27 新建与整理 + */ +public class LabelIndustryAction extends StdSwitchAction implements ZmrConstants +{ + @Override + protected void validateId(HttpRequest request) + { + request.addValidate(new IsNotEmpty("industrySubId", "请选择一个选项")); + } + + @Override + protected void validateForm(HttpRequest request) + { + request.addValidate(new IsNotEmpty("industryId", "请选择标签行业")); + request.addValidate(new IsLen("industrySubName", "子行业名称不能为空且不能超过64个字符", 1, 64)); + } + + @Override + protected void list(HttpRequest request) throws Exception + { + List indList = Global.get(DesignIndustryCache.class).getIndustryListAll(); + request.setAttribute("indList", indList); + request.setAttribute("industryId", indList.size() > 0 ? indList.get(0).getIndustryId() : 0); + } + + @Override + protected void add(HttpRequest request) throws Exception + { + List indList = Global.get(DesignIndustryCache.class).getIndustryListAll(); + request.setAttribute("indList", indList); + } + + @Override + protected void insert(HttpRequest request) throws Exception + { + long industryId = request.getParameterLong("industryId"); + String industrySubName = request.getParameter("industrySubName"); + industrySubName = industrySubName.replaceAll("\\s", "").replaceAll(",", ","); + + List subList = Lists.toStringList(industrySubName); + for (String industryStr : subList) + { + DesLabelIndustry industry = new DesLabelIndustry(); + industry.setIndustryId(industryId); + industry.setIndustrySubId(Ids.longId13()); + industry.setIndustrySubName(industryStr); + industry.setCreateTime(Sqls.nowTimestamp()); + + ORM.get(ZTable.class).insert(industry); + } + } + + @Override + protected void modify(HttpRequest request) throws Exception + { + List indList = Global.get(DesignIndustryCache.class).getIndustryListAll(); + request.setAttribute("indList", indList); + + long industrySubId = request.getParameterLong("industrySubId"); + DesLabelIndustry industry = ORM.get(ZTable.class).item(DesLabelIndustry.class, industrySubId); + if (industry == null) + { + request.returnHistory("标签行业不存在,请重新选择"); + return; + } + request.setAttribute("industry", industry); + } + + @Override + protected void update(HttpRequest request) throws Exception + { + long industrySubId = request.getParameterLong("industrySubId"); + long industryId = request.getParameterLong("industryId"); + String industrySubName = request.getParameter("industrySubName"); + + Updater updater = new Updater(); + updater.addMust("industrySubId", industrySubId); + updater.addField("industryId", industryId); + updater.addField("industrySubName", industrySubName); + + ORM.get(ZTable.class).update(DesLabelIndustry.class, updater); + } + + @Override + protected void delete(HttpRequest request) throws Exception + { + long industrySubId = request.getParameterLong("industrySubId"); + ORM.get(ZTable.class).delete(DesLabelIndustry.class, industrySubId); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/mobiletemplate/MobileTemplateAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/mobiletemplate/MobileTemplateAction.java new file mode 100644 index 0000000..56b40a4 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/mobiletemplate/MobileTemplateAction.java @@ -0,0 +1,33 @@ +package com.zhiqim.yangcai.design.action.mobiletemplate; + +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.Global; + +import com.zhiqim.yangcai.cache.DesignIndustryCache; +import com.zhiqim.yangcai.design.dbo.design.DesignIndustry; + +/** + * 移动端模板库Action + * + * @author HuangZhiGao + * @date 2020-02-26 14:00 + */ +public class MobileTemplateAction implements Action +{ + @Override + public void execute(HttpRequest httpRequest) throws Exception + { + // 如果是pc则重定向到pc端 + if (!httpRequest.isMobile()) + { + httpRequest.setRedirect("/pcWorks.htm"); + return; + } + // 准备行业分类数据[可用] + List indList = Global.get(DesignIndustryCache.class).getIndustryList(); + httpRequest.setAttribute("indList", indList); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/mobiletemplate/MobileTemplateDetailAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/mobiletemplate/MobileTemplateDetailAction.java new file mode 100644 index 0000000..4c6b11a --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/mobiletemplate/MobileTemplateDetailAction.java @@ -0,0 +1,43 @@ +package com.zhiqim.yangcai.design.action.mobiletemplate; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.HttpResponse; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.constants.BaseConstants; +import com.zhiqim.yangcai.design.dbo.template.MediaTemplateView; + +/** + * 移动端单个模板详情Action + * + * @author HuangZhiGao + * @date 2020-02-26 16:43 + */ +public class MobileTemplateDetailAction implements Action +{ + + @Override + public void execute(HttpRequest httpRequest) throws Exception + { + long mediaId = httpRequest.getParameterLong("mediaId"); + if (mediaId == -1L) + { + return; + } + MediaTemplateView media = ORM.get(ZView.class).item(MediaTemplateView.class, new Selector("mediaId", mediaId)); + // 素材图片替换cdn域名 + if (Validates.isNotEmpty(media.getMediaUrl())) + { + String newUrl = media.getMediaUrl().replace(BaseConstants.OSS_URL, BaseConstants.CDN_URL); + media.setMediaUrl(newUrl); + } + + HttpResponse response = httpRequest.getResponse(); + response.print(media.toString()); + + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/mobileworks/MobileWorksAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/mobileworks/MobileWorksAction.java new file mode 100644 index 0000000..cc2322e --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/mobileworks/MobileWorksAction.java @@ -0,0 +1,26 @@ +package com.zhiqim.yangcai.design.action.mobileworks; + +import com.zhiqim.yangcai.cache.DesignIndustryCache; +import com.zhiqim.yangcai.design.dbo.design.DesignIndustry; +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.Global; + +import java.util.List; + +/** + * 移动端作品库Action + * + * @author HuangZhiGao + * @date 2020-02-22 14:00 + */ +public class MobileWorksAction implements Action +{ + @Override + public void execute(HttpRequest httpRequest) throws Exception + { + // 准备行业分类数据[可用] + List indList = Global.get(DesignIndustryCache.class).getIndustryList(); + httpRequest.setAttribute("indList", indList); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/mobileworks/MobileWorksDetailAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/mobileworks/MobileWorksDetailAction.java new file mode 100644 index 0000000..f77c741 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/mobileworks/MobileWorksDetailAction.java @@ -0,0 +1,60 @@ +package com.zhiqim.yangcai.design.action.mobileworks; + +import com.zhiqim.yangcai.design.dbo.works.DesWorksEvent; +import com.zhiqim.yangcai.design.dbo.works.DesWorksFile; +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.manager.dbo.ZmrDept; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import java.util.List; + +/** + * 移动端单个作品详情Action + * + * @author HuangZhiGao + * @date 2020-02-24 16:43 + */ +public class MobileWorksDetailAction implements Action +{ + @Override + public void execute(HttpRequest httpRequest) throws Exception + { + long worksId = httpRequest.getParameterLong("worksId"); + DesWorksFile works = ORM.get(ZTable.class).item(DesWorksFile.class, worksId); + if (works == null) + { + httpRequest.returnHistory("文件不存在,请重新选择"); + return; + } + + if (Validates.isNotEmptyBlank(works.getKeywordName())) + { + works.setKeywordName(works.getKeywordName().replace(" ", ",")); + } + + Selector dSelector = new Selector(); + dSelector.addMustInLong("parentId", 1803021010350856L, 1803021011250863L); + List deptList = ORM.get(ZTable.class).list(ZmrDept.class, dSelector); + httpRequest.setAttribute("deptList", deptList); + + // 浏览数 + int browseNum = ORM.get(ZTable.class).count(DesWorksEvent.class, new Selector().addMust("worksId", worksId).addMust("eventType", 1)); + + // 浏览事件-新增浏览记录 + DesWorksEvent event = new DesWorksEvent(); + event.setEventId(Ids.longId19()); + event.setWorksId(worksId); + event.setEventType(1); + event.setCreateTime(Sqls.nowTimestamp()); + ORM.get(ZTable.class).insert(event); + + httpRequest.setAttribute("browseNum", browseNum); + httpRequest.setAttribute("works", works); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/notice/NoticeHistoryAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/notice/NoticeHistoryAction.java new file mode 100644 index 0000000..6eb96a1 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/notice/NoticeHistoryAction.java @@ -0,0 +1,31 @@ +/** + * 扬彩印刷设计 + * 文件名 :NoticeHistoryAction.java + * 创建人 :xiepan + * 创建时间:2021年7月1日 +*/ + +package com.zhiqim.yangcai.design.action.notice; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.notice.Notice; + +public class NoticeHistoryAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + int pageNo = request.getParameterInt("page", 1); + int pageSize = request.getParameterInt("page.size", 15); + PageResult result = ORM.get(ZTable.class).page(Notice.class, pageNo, pageSize, new Selector().addMust("status", 1).addOrderbyDesc("finshTime")); + request.setAttribute("result", result); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/notice/NoticeListAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/notice/NoticeListAction.java new file mode 100644 index 0000000..5648c09 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/notice/NoticeListAction.java @@ -0,0 +1,134 @@ +/** + * 扬彩印刷设计 + * 文件名 :NoticeListAction.java + * 创建人 :xiepan + * 创建时间:2021年6月29日 +*/ + +package com.zhiqim.yangcai.design.action.notice; + +import org.apache.commons.lang3.StringUtils; +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.extend.StdSwitchAction; +import org.zhiqim.httpd.validate.ones.IsLen; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.design.dbo.notice.Notice; + +public class NoticeListAction extends StdSwitchAction +{ + @Override + protected void list(HttpRequest request) throws Exception + { + int pageNo = request.getParameterInt("page", 1); + int pageSize = request.getParameterInt("page.size", 15); + Selector selector = new Selector(); + String title = request.getParameter("title"); + + if (!StringUtils.isEmpty(title)) + { + selector.addMaybeLike("title", title); + } + String status = request.getParameter("status"); + if (!StringUtils.isEmpty(status)) + { + selector.addMaybe("status", Integer.valueOf(status)); + } + selector.addOrderbyAsc("status"); + selector.addOrderbyDesc("updateTime"); + PageResult pageResult = ORM.get(ZTable.class).page(Notice.class, pageNo, pageSize, selector); + request.setAttribute("noticeList", pageResult); + + } + + @Override + protected void add(HttpRequest httprequest) throws Exception + { + + } + + @Override + protected void modify(HttpRequest request) throws Exception + { + long id = Long.valueOf(request.getParameter("noticeId")); + Notice notice = ORM.get(ZTable.class).item(Notice.class, id); + request.setAttribute("notice", notice); + } + + @Override + protected void insert(HttpRequest request) throws Exception + { + String title = request.getParameter("title"); + + int status = Integer.valueOf(request.getParameter("status")); + String content = request.getParameterNoFileterOnCNT("content"); + Notice notice = new Notice(); + if (status == 1) + { + notice.setUpdateTime(Sqls.nowTimestamp()); + notice.setUpdateUser(request.getSessionName()); + notice.setFinshTime(Sqls.nowTimestamp()); + notice.setFinshUser(request.getSessionName()); + } + notice.setId(Ids.longId()); + notice.setTitle(title); + notice.setStatus(status); + notice.setAddUser(request.getSessionName()); + notice.setAddTime(Sqls.nowTimestamp()); + notice.setContent(content); + ORM.get(ZTable.class).insert(notice); + + } + + @Override + protected void update(HttpRequest request) throws Exception + { + long id = Long.valueOf(request.getParameter("noticeId")); + String title = request.getParameter("title"); + int status = Integer.valueOf(request.getParameter("status")); + String content = request.getParameterNoFileterOnCNT("content"); + Updater updater = new Updater(); + updater.addMust("id", id); + updater.addField("title", title); + updater.addField("content", content); + updater.addField("status", status); + updater.addField("updateTime", Sqls.nowTimestamp()); + updater.addField("updateUser", request.getSessionName()); + if (status == 0) + { + updater.addField("finshTime", null); + updater.addField("finshUser", ""); + } + if (status == 1) + { + updater.addField("finshTime", Sqls.nowTimestamp()); + updater.addField("finshUser", request.getSessionName()); + } + + ORM.get(ZTable.class).update(Notice.class, updater); + } + + @Override + protected void delete(HttpRequest request) throws Exception + { + long id = Long.valueOf(request.getParameter("noticeId")); + ORM.get(ZTable.class).delete(Notice.class, id); + } + + @Override + protected void validateId(HttpRequest request) throws Exception + { + } + + @Override + protected void validateForm(HttpRequest request) throws Exception + { + request.addValidate(new IsLen("title", "标题不能为空且不能超过32个字符", 1, 32)); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/AfterMessageAddAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/AfterMessageAddAction.java new file mode 100644 index 0000000..dbb8752 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/AfterMessageAddAction.java @@ -0,0 +1,39 @@ +/** + * 扬彩印刷设计 + * 文件名 :AfterMessageAddAction.java + * 创建人 :jiangbin + * 创建时间:2020-1-11 + */ +package com.zhiqim.yangcai.design.action.order; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; + +/** + * 添加售后留言页面 + * + * @version 1.0 @author jiangbin 2020-1-11 新建与整理 + */ +public class AfterMessageAddAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + Long designId = request.getParameterLong("designId"); + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, new Selector().addMust("designId", designId)); + if (Validates.isEmpty(order)) + { + request.setResponseError("订单不存在"); + return; + } + request.setAttribute("order", order); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/ChargeOrderAuditAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/ChargeOrderAuditAction.java new file mode 100644 index 0000000..ca9471c --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/ChargeOrderAuditAction.java @@ -0,0 +1,43 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.action.order; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; + +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; + +/** + * TODO:主管审核 + * + * @version v1.0.0 @author Deng 2017-4-12 新建与整理 + */ +public class ChargeOrderAuditAction implements Action +{ + @Override + public void execute(HttpRequest request) throws Exception + { + long designId = request.getParameterLong("designId"); + if(designId == -1) + return; + + //设计订单信息 + DesignOrder bill = ORM.get(ZTable.class).item(DesignOrder.class, designId); + request.setAttribute("bill", bill); + +// List operatorList = ORM.get(ZTable.class).list(ZmrOperatorGroup.class, new Selector("groupCode", "SJS")); +// request.setAttribute("operatorList", operatorList); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/CheckBackDetailAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/CheckBackDetailAction.java new file mode 100644 index 0000000..fbb7326 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/CheckBackDetailAction.java @@ -0,0 +1,97 @@ +package com.zhiqim.yangcai.design.action.order; + +import java.text.DateFormat; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.order.DesignSelfView; +import com.zhiqim.yangcai.design.model.OrderCheckModel; + +/** + * 审核退回详情 + * + * @version v1.0.0 @author liuhu 2018-12-20 新建与整理 + */ +public class CheckBackDetailAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + long designId = request.getParameterLong("designId"); + Selector sel = new Selector(); + sel.addMust("designId", designId); + DesignSelfView order = ORM.get(ZView.class).item(DesignSelfView.class, sel); + if (order == null) + { + request.returnCloseDialog("订单数据未查到,请核对后再操作。"); + return; + } + + if (Validates.isEmpty(order.getCheckBackReason()) && Validates.isEmpty(order.getDraftBackReason()) && Validates.isEmpty(order.getEndBackReason())) + { + request.returnCloseDialog("您的订单无审核记录"); + return; + } + + // 有初稿、定稿、印前审核退回场景,根据退回时间展示最近记录 + List checkModelList = new ArrayList(); + if (Validates.isNotEmpty(order.getCheckBackReason())) + { + OrderCheckModel model = new OrderCheckModel(); + model.setBackReason(order.getCheckBackReason()); + model.setBackReasonPicUrl(order.getCheckBackPictureUrl()); + model.setBackTime(order.getCheckTime()); + checkModelList.add(model); + } + if (Validates.isNotEmpty(order.getDraftBackReason())) + { + OrderCheckModel model = new OrderCheckModel(); + model.setBackReason(order.getDraftBackReason()); + model.setBackReasonPicUrl(order.getDraftBackReasonPicUrl()); + model.setBackTime(order.getDraftBackTime()); + checkModelList.add(model); + } + if (Validates.isNotEmpty(order.getEndBackReason())) + { + OrderCheckModel model = new OrderCheckModel(); + model.setBackReason(order.getEndBackReason()); + model.setBackReasonPicUrl(order.getEndBackReasonPicUrl()); + model.setBackTime(order.getEndBackTime()); + checkModelList.add(model); + } + + Collections.sort(checkModelList, new Comparator() + { + DateFormat f = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + + @Override + public int compare(OrderCheckModel o1, OrderCheckModel o2) + { + try + { + return f.parse(Sqls.toDateTimeString(o2.getBackTime())).compareTo(f.parse(Sqls.toDateTimeString(o1.getBackTime()))); + } + catch (ParseException e) + { + throw new IllegalArgumentException(e); + } + } + }); + + request.setAttribute("orderCheckModel", checkModelList.get(0)); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/ComplaintOrderAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/ComplaintOrderAction.java new file mode 100644 index 0000000..a7ca786 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/ComplaintOrderAction.java @@ -0,0 +1,74 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action.order; + +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.manager.dao.ZmrOperatorDao; +import org.zhiqim.manager.dbo.ZmrOperator; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dao.OperatorDao; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; + +/** + * 申诉订单列表 + * + * @version v1.0.0 @author liuhu 2018-12-7 新建与整理 + */ +public class ComplaintOrderAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page", 1); + int pageSize = request.getContextAttributeInt("pageSize", 10); + String designer = request.getParameter("designer", ""); + long designId = request.getParameterLong("designId"); + String buyerNick = request.getParameter("buyerNick"); + String beginDate = request.getParameter("beginDate", DateTimes.getPreviousDateStringByMonth(1)); + String endDate = request.getParameter("endDate", DateTimes.getDateString()); + int day = DateTimes.compareDay(endDate, beginDate); + if (day > 31) + { + request.setResponseError("请勿将时间区间跨度选择大于一个月"); + return; + } + Selector selector = new Selector(); + selector.addMaybe("designId", designId); + selector.addMaybe("designer", designer); + selector.addMaybe("buyerNick", buyerNick); + OperatorDao.getOrgSelector(request, selector); + selector.addMustThenGE("refundTime", beginDate + " 00:00:00"); + selector.addMustThenLE("refundTime", endDate + " 23:59:59"); + selector.addMustIsNotEmpty("complaintReason"); + selector.addMust("complaintFlag", 3); + PageResult pageResult = ORM.get(ZTable.class).page(DesignOrder.class, page, pageSize, selector); + pageResult.addConditionMap(request.getParameterMap()); + + List operatorList = ZmrOperatorDao.getOperator(request, request.getSessionUser(ZmrSessionUser.class).getSelectedOrgId()); + + request.setAttribute("operatorList", operatorList); + request.setAttribute("pageResult", pageResult); + request.setAttribute("beginDate", beginDate); + request.setAttribute("endDate", endDate); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/ComplaintViewAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/ComplaintViewAction.java new file mode 100644 index 0000000..72cdfaa --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/ComplaintViewAction.java @@ -0,0 +1,49 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.action.order; + +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.constants.FileTypeConstants; +import com.zhiqim.yangcai.design.dbo.order.DesignAtta; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; + +/** + * 申诉详情 + * + * @version v1.0.0 @author liuhu 2018-12-7 新建与整理 + */ +public class ComplaintViewAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + long designId = request.getParameterLong("designId"); + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, designId); + if (order == null) + { + request.setResponseError("订单不存在"); + return; + } + request.setAttribute("order", order); + List attaList = ORM.get(ZTable.class).list(DesignAtta.class, new Selector("designId", designId).addMust("attaModul", FileTypeConstants.FILE_COMPLAINT.value())); + request.setAttribute("attaList", attaList); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/ConfigQuestionsAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/ConfigQuestionsAction.java new file mode 100644 index 0000000..34e4a5d --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/ConfigQuestionsAction.java @@ -0,0 +1,158 @@ +package com.zhiqim.yangcai.design.action.order; + +import java.io.File; +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.annotation.AnIntercept; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Files; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; +import org.zhiqim.uploadlarge.dbo.UpllFile; + +import com.zhiqim.yangcai.design.dao.OssFileDao; +import com.zhiqim.yangcai.design.dbo.order.ConfigQuestions; +import com.zhiqim.yangcai.design.dbo.order.QuestionsAtta; + +/** + * + * [简要描述]:考试题库
            + * + * @version 1.0 @author hc 2021年5月19日 新建与整理 + */ + +@AnAlias("ConfigQuestionsAction") +@AnIntercept("chkZmrLogin") +public class ConfigQuestionsAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page"); + int pageSize = request.getContextAttributeInt("page.size", 20); + + Selector selector = new Selector(); + selector.addMaybeLike("designRequirements", request.getParameter("designRequirements")); + selector.addOrderbyDesc("modificationTime"); + PageResult pageResult = ORM.get(ZTable.class).page(ConfigQuestions.class, page, pageSize, selector); + request.setAttribute("pageResult", pageResult); + + // 获取订单素材上传路径 + String dateDir = DateTimes.getDateTime8String(); + String customFile = "订单考核/设计素材"; + String customPath = dateDir + "/" + customFile; + request.setAttribute("customPath", customPath); + } + + /** + * + * [简要描述]:添加考试订单
            + * [详细描述]:
            + * + * @author hc + * @param request + * @throws Exception + */ + public void orderQuestionsAdd(HttpRequest request) throws Exception + { + + String product = request.getParameter("product"); + String materials = request.getParameter("materials"); + String sizeLength = request.getParameter("sizeLength"); + String sizeWidth = request.getParameter("sizeWidth"); + String faceCount = request.getParameter("faceCount"); + String styleCount = request.getParameter("styleCount"); + String others = request.getParameter("others"); + + String designRequirement = product + materials + sizeLength + sizeWidth + faceCount + styleCount; + + String designRequirements = null; + + if (designRequirement.isEmpty()) + { + request.setResponseError("设计需求不能为空!"); + return; + } + + ConfigQuestions cq = request.getParameter(ConfigQuestions.class); + + designRequirements = product + " | " + materials + " | " + sizeLength + "×" + sizeWidth + "mm | " + faceCount + " | " + styleCount + " | " + others; + + cq.setQuestionsId(Ids.longId()); + cq.setDesignRequirements(designRequirements); + cq.setUpdateOperator(request.getSessionName()); + cq.setModificationTime(Sqls.nowTimestamp()); + + ORM.get(ZTable.class).insert(cq); + + } + + /** + * + * [简要描述]:修改考试订单
            + * [详细描述]:
            + * + * @author hc + * @param request + * @throws Exception + */ + public void orderQuestionsModify(HttpRequest request) throws Exception + { + long questionsId = request.getParameterLong("questionsId"); + String designRequirements = request.getParameter("designRequirements"); + Updater updater = new Updater(); + updater.addMust("questionsId", questionsId); + updater.addField("designRequirements", designRequirements); + + ORM.get(ZTable.class).update(ConfigQuestions.class, updater); + } + + /** + * + * [简要描述]:删除考试订单
            + * [详细描述]:
            + * + * @author hc + * @param request + * @throws Exception + */ + public void designOrderQuestionsDelete(HttpRequest request) throws Exception + { + long questionsId = request.getParameterLong("questionsId"); + List attaList = ORM.get(ZTable.class).list(QuestionsAtta.class, new Selector().addMust("questionsId", questionsId)); + for (QuestionsAtta atta : attaList) + { + File file = new File(atta.getSavePath()); + if (file.exists()) + { + Files.deleteFile(atta.getSavePath()); + } + + if (Validates.isNotEmpty(atta.getFileid())) + { + ORM.get(ZTable.class).delete(UpllFile.class, new Selector("fileId", atta.getFileid()).addReplace("id", null)); + } + + if ("ExamVoucher".equals(atta.getAttaModul())) + { + String path = atta.getFileUrl().split(OssFileDao.getPrefix_dir())[1]; + OssFileDao.deleteOssFile(OssFileDao.getPrefix_dir() + path); + } + + } + + ORM.get(ZTable.class).delete(QuestionsAtta.class, questionsId); + ORM.get(ZTable.class).delete(ConfigQuestions.class, questionsId); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/ConfigQuestionsModifyAciton.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/ConfigQuestionsModifyAciton.java new file mode 100644 index 0000000..300e85c --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/ConfigQuestionsModifyAciton.java @@ -0,0 +1,25 @@ +package com.zhiqim.yangcai.design.action.order; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.order.ConfigQuestions; + +public class ConfigQuestionsModifyAciton implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + long questionsId = request.getParameterLong("questionsId"); + Selector selector = new Selector(); + selector.addMust("questionsId", questionsId); + ConfigQuestions result = ORM.get(ZTable.class).item(ConfigQuestions.class, selector); + request.setAttribute("result", result); + + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/ContendOrderAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/ContendOrderAction.java new file mode 100644 index 0000000..1df35e3 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/ContendOrderAction.java @@ -0,0 +1,97 @@ +package com.zhiqim.yangcai.design.action.order; + +import java.util.Map; +import java.util.Map.Entry; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.annotation.AnIntercept; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.constants.EventConstants; +import com.zhiqim.yangcai.design.dao.OrderLogDao; +import com.zhiqim.yangcai.design.dbo.design.DesignerGroupDispatch; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; +import com.zhiqim.yangcai.design.service.ContendOrderService; + +/** + * + * [简要描述]:抢单 Controller
            + * [详细描述]:
            + * + * @version 1.0 @author hc 2021年6月2日 新建与整理 + */ +@AnAlias("ContendOrderAction") +@AnIntercept("chkZmrLogin") +public class ContendOrderAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + long designId = request.getParameterLong("designId"); + String orderText = request.getParameter("orderText"); + request.setAttribute("designId", designId); + request.setAttribute("orderText", orderText); + } + + /** + * + * [简要描述]:抢单
            + * [详细描述]:
            + * + * @author hc + * @param request + * @throws Exception + */ + public void contendOrder(HttpRequest request) throws Exception + { + long designId = request.getParameterLong("designId"); + String operatorCode = request.getSessionName(); + + // 是否有已完善个人信息 + boolean orderAuthority = ContendOrderService.isOrderAuthority(operatorCode); + if (!orderAuthority) + { + request.setResponseError("接单前请前往个人中心完善个人简介~"); + return; + } + + DesignerGroupDispatch designerGroupDispatchResult = ORM.get(ZTable.class).item(DesignerGroupDispatch.class, + new Selector().addMaybe("operatorCode", operatorCode)); + + // 是否有权限接受此单 + Map passMuster = ContendOrderService.isPassMuster(designId, operatorCode, designerGroupDispatchResult); + for (Entry m : passMuster.entrySet()) + { + if (!m.getKey().equals("true")) + { + request.setResponseError(m.getValue()); + return; + } + } + + DesignOrder item = ORM.get(ZTable.class).item(DesignOrder.class, new Selector().addMust("designId", designId)); + if (item.getStatus() != 10 && Validates.isNotEmpty(item.getDesigner())) + { + request.setResponseError("该订单已被领取,请选择其他订单~"); + return; + } + + // 抢单 + String contendOrderResult = ContendOrderService.isContendOrderSuccess(designId, operatorCode, designerGroupDispatchResult); + if (contendOrderResult.equals("error")) + { + request.setResponseError("该订单已被领取,请选择其他订单~"); + return; + } + + String logItem = "设计师在抢单大厅领取订单"; + OrderLogDao.saveOrderOperateLog(designId, request.getSessionName(), logItem, EventConstants.ORDER_3.value()); + + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/DesignOrderAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/DesignOrderAction.java new file mode 100644 index 0000000..33c3023 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/DesignOrderAction.java @@ -0,0 +1,99 @@ +package com.zhiqim.yangcai.design.action.order; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.constants.StatusConstants; +import com.zhiqim.yangcai.design.dao.DesignTypeDao; +import com.zhiqim.yangcai.design.dbo.design.DesignType; +import com.zhiqim.yangcai.design.dbo.design.DesignerGroupDispatch; +import com.zhiqim.yangcai.design.dbo.order.DesignSelfView; +import com.zhiqim.yangcai.design.dbo.order.OrdProgressNote; + +/** + * 设计师名下未完成订单列表 + * + * @version v1.0.0 @author Deng 2017-4-6 新建与整理 + * @version v2.0.0 @author caohong 2021-6-2 去掉组织规则条件,只查自己 + */ +public class DesignOrderAction implements Action +{ + @Override + public void execute(HttpRequest request) throws Exception + { + ZmrSessionUser sessionUser = request.getSessionUser(ZmrSessionUser.class); + + int page = request.getParameterInt("page", 1); + int pageSize = request.getContextAttributeInt("page.size", 10); + int status = request.getParameterInt("orderStatus"); + long designId = request.getParameterLong("designId"); + Selector selector = new Selector(); + selector.addMaybe("designId", designId); + selector.addMaybe("draftType", request.getParameterInt("draftType")); + selector.addMaybe("buyerNick", request.getParameter("buyerNick")); + selector.addMaybe("typeId", request.getParameterLong("typeId")); + if (status != -1) + { + selector.addMust("status", status); + } + else + { + selector.addMustThenGE("status", StatusConstants.ORDER_30.value());// 大于等于 正在设计 + selector.addMustThenLE("status", StatusConstants.ORDER_52.value());// 小于等于定稿待审状态 + } + + if (designId > 0 && sessionUser.getOperatorOrgId() == 1806051109012492L) + { + // 如果是设计一组(内部设计师),可以精准搜索非自己的订单号 + } + else + { + selector.addMust("designer", sessionUser.getOperatorCode()); + } + + selector.addOrderbyDesc("isUrgent"); + selector.addOrderbyDesc("checkBackReason"); + selector.addOrderbyDesc("createTime"); + + PageResult pageResult = ORM.get(ZView.class).page(DesignSelfView.class, page, pageSize, selector); + pageResult.addConditionMap(request.getParameterMap()); + Map progressNoteMap = new HashMap(); + for (DesignSelfView order : pageResult.list()) + { // 进度备注 + OrdProgressNote note = ORM.get(ZTable.class).item(OrdProgressNote.class, + new Selector("designId", order.getDesignId()).addOrderbyDesc("createTime")); + progressNoteMap.put(order.getDesignId(), note == null ? "" + : "" + + "

            " + + note.getOrdProgressNote() + "

            " + Sqls.toDateTimeString(note.getCreateTime()) + "
            "); + } + + Map typeMap = new HashMap(); + List typeList = DesignTypeDao.listAll(); + for (DesignType designType : typeList) + { + typeMap.put(designType.getTypeId(), designType); + } + + request.setAttribute("pageResult", pageResult); + request.setAttribute("typeList", typeList); + request.setAttribute("typeMap", typeMap); + request.setAttribute("progressNoteMap", progressNoteMap); + String operatorCode = request.getSessionName(); + DesignerGroupDispatch designerGroupDispatch = ORM.get(ZTable.class).item(DesignerGroupDispatch.class, + new Selector().addMaybe("operatorCode", operatorCode)); + + request.setAttribute("isShowCost", designerGroupDispatch.getIsShowCost()); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/DesignOrderFinishAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/DesignOrderFinishAction.java new file mode 100644 index 0000000..a564bd9 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/DesignOrderFinishAction.java @@ -0,0 +1,76 @@ +package com.zhiqim.yangcai.design.action.order; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.constants.StatusConstants; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; + +/** + * 设计师名下已完结订单 + * + * @version v1.0.0 @author Deng 2017-9-7 新建与整理 + * @version v2.0.0 @author caohong 2021-6-2 去掉组织规则条件,只查自己 + */ +public class DesignOrderFinishAction implements Action +{ + @Override + public void execute(HttpRequest request) throws Exception + { + ZmrSessionUser sessionUser = request.getSessionUser(ZmrSessionUser.class); + + int page = request.getParameterInt("page", 1); + int pageSize = request.getContextAttributeInt("page.size", 10); + long designId = request.getParameterLong("designId"); + String buyerNick = request.getParameter("buyerNick"); + String beginDate = request.getParameter("beginDate", DateTimes.getDateString()); + String endDate = request.getParameter("endDate", DateTimes.getDateString()); + int day = DateTimes.compareDay(endDate, beginDate); + if (Validates.isEmpty(buyerNick) && designId <= 0 && day > 180) + { + request.setResponseError("请勿将时间区间跨度选择大于6个月"); + return; + } + + Selector daySel = new Selector(); + if (designId > 0 && sessionUser.getOperatorOrgId() == 1806051109012492L) + { + // 如果是设计一组(内部设计师),可以精准搜索非自己的订单号 + } + else + { + daySel.addMust("designer", sessionUser.getOperatorCode()); + } + + Selector orSel = new Selector(); + orSel.addMustThenGE("status", StatusConstants.ORDER_55.value()); + orSel.addMustIn("status", StatusConstants.ORDER_F130.value(), StatusConstants.ORDER_F110.value(), StatusConstants.ORDER_F100.value()); + + if (Validates.isEmpty(buyerNick) && designId <= 0) + { + daySel.addMaybeThenGE("designEndTime", Sqls.toTimestamp(beginDate, "00:00:00")); + daySel.addMaybeThenLE("designEndTime", Sqls.toTimestamp(endDate, "23:59:59")); + } + + daySel.addOr(orSel); + daySel.addMaybe("buyerNick", buyerNick); + daySel.addMaybe("designId", designId); + daySel.addOrderbyDesc("designEndTime"); + + PageResult pageResult = ORM.get(ZTable.class).page(DesignOrder.class, page, pageSize, daySel); + pageResult.addConditionMap(request.getParameterMap()); + + request.setAttribute("beginDate", beginDate); + request.setAttribute("endDate", endDate); + request.setAttribute("pageResult", pageResult); + + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/DesignOrderRefundAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/DesignOrderRefundAction.java new file mode 100644 index 0000000..d1f76cf --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/DesignOrderRefundAction.java @@ -0,0 +1,29 @@ +/** + * 扬彩印刷设计 + * 文件名 :DesignOrderRefundAction.java + * 创建人 :gjx + * 创建时间:2021年6月2日 +*/ + +package com.zhiqim.yangcai.design.action.order; + +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; + +import com.zhiqim.yangcai.design.dbo.order.DesignOrderRefundReason; + +public class DesignOrderRefundAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + List list = ORM.get(ZTable.class).list(DesignOrderRefundReason.class); + request.setAttribute("list", list); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/DesignOrderRefundInfoAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/DesignOrderRefundInfoAction.java new file mode 100644 index 0000000..9d20915 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/DesignOrderRefundInfoAction.java @@ -0,0 +1,91 @@ +/** + * 扬彩印刷设计 + * 文件名 :DesignOrderRefundInfoAction.java + * 创建人 :gjx + * 创建时间:2021年6月5日 +*/ + +package com.zhiqim.yangcai.design.action.order; + +import java.io.File; +import java.io.FileInputStream; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; + +import com.aliyun.oss.common.utils.StringUtils; +import com.zhiqim.yangcai.design.dao.DesignTypeDao; +import com.zhiqim.yangcai.design.dbo.design.DesignType; +import com.zhiqim.yangcai.design.dbo.order.DesignAtta; +import com.zhiqim.yangcai.design.dbo.order.DesignSelfView; + +/** + * TODO:退款订单详情 + * + * @version v1.0.0 @author PVer 2017-6-5 新建与整理 + */ +public class DesignOrderRefundInfoAction implements Action +{ + private static final Log log = LogFactory.getLog(DesignOrderRefundInfoAction.class); + + @Override + public void execute(HttpRequest request) throws Exception + { + long designId = Long.parseLong(request.getParameter("designId")); + DesignSelfView order = ORM.get(ZView.class).item(DesignSelfView.class, new Selector().addMaybe("designId", designId)); + Map typeMap = new HashMap(); + List typeList = DesignTypeDao.listAll(); + for (DesignType designType : typeList) + { + typeMap.put(designType.getTypeId(), designType); + } + Selector selector = new Selector(); + selector.addMaybe("attaModul", "ApplyRefundFile"); + selector.addMust("designId", order.getDesignId()); + DesignAtta designAtta = ORM.get(ZTable.class).item(DesignAtta.class, selector); + // 读取服务器硬盘文件,使用base64输出 + FileInputStream is = null; + if (!StringUtils.isNullOrEmpty(designAtta.getSavePath())) + { + try + { + File file = new File(designAtta.getSavePath()); + is = new FileInputStream(file); + byte[] data = new byte[is.available()]; + is.read(data); + /* + * BASE64Encoder encoder = new BASE64Encoder(); + * String base64Img = encoder.encode(data); + * request.setAttribute("base64Img", base64Img); + */ + } + catch (Exception e) + { + e.printStackTrace(); + log.error("读取订单退款截图失败:订单号:{}", designId); + } + finally + { + if (is != null) + { + is.close(); + } + + } + + } + + request.setAttribute("typeList", typeList); + request.setAttribute("typeMap", typeMap); + request.setAttribute("" + "", order); + } +} \ No newline at end of file diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/DesignOrderRefundModifyAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/DesignOrderRefundModifyAction.java new file mode 100644 index 0000000..882b066 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/DesignOrderRefundModifyAction.java @@ -0,0 +1,29 @@ +/** + * 扬彩印刷设计 + * 文件名 :DesignOrderRefundModifyAction.java + * 创建人 :xp + * 创建时间:2021年6月24日 +*/ + +package com.zhiqim.yangcai.design.action.order; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.order.DesignOrderRefundReason; + +public class DesignOrderRefundModifyAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + Long id = Long.valueOf(request.getParameter("id")); + DesignOrderRefundReason designOrderRefundReason = ORM.get(ZTable.class).item(DesignOrderRefundReason.class, new Selector().addMust("id", id)); + request.setAttribute("designOrderRefundReason", designOrderRefundReason); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/DesignOrderRefundReasonAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/DesignOrderRefundReasonAction.java new file mode 100644 index 0000000..a4833cc --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/DesignOrderRefundReasonAction.java @@ -0,0 +1,28 @@ +package com.zhiqim.yangcai.design.action.order; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.order.DesignOrderRefundReason; + +/** + * TODO:退款问题列表 + * + * @version v1.0.0 @author PVer 2017-6-5 新建与整理 + */ +public class DesignOrderRefundReasonAction implements Action +{ + @Override + public void execute(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page", 1); + int pageSize = request.getContextAttributeInt("page.size", 10); + PageResult pageResult = ORM.get(ZTable.class).page(DesignOrderRefundReason.class, page, pageSize, + new Selector().addOrderbyDesc("updateTime")); + request.setAttribute("pageResult", pageResult); + } +} \ No newline at end of file diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/DesignStandardAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/DesignStandardAction.java new file mode 100644 index 0000000..8128c43 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/DesignStandardAction.java @@ -0,0 +1,107 @@ +package com.zhiqim.yangcai.design.action.order; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.order.DesignStandard; + +/** + * 设计师名下未完成订单列表 + * + * @version v1.0.0 @author Deng 2017-4-6 新建与整理 + * @version v2.0.0 @author caohong 2021-6-2 去掉组织规则条件,只查自己 + */ +public class DesignStandardAction implements Action +{ + @Override + public void execute(HttpRequest request) throws Exception + { + long catId = request.getParameterLong("reasonId"); + int page = request.getParameterInt("page", 1); + int pageSize = request.getContextAttributeInt("page.size", 15); + Map> reasonMap = new HashMap>(); + List catList = new ArrayList(); + List tresaonList = ORM.get(ZTable.class).list(DesignStandard.class, new Selector().addOrderbyDesc("createTime")); + for (DesignStandard reason : tresaonList) + { + + if (reason.isStandardType()) + { + catList.add(reason); + } + else + { + List list = reasonMap.get(reason.getStandardParent()); + list = list != null ? list : new ArrayList(); + list.add(reason); + reasonMap.put(reason.getStandardParent(), list); + } + } + + if (catId <= 0) + { + catId = 0; + if (catList.size() > 0) + { + catId = catList.get(0).getStandardId(); + } + } + Selector sel = new Selector(); + sel.addMaybe("standardParent", catId); + sel.addOrderbyDesc("createTime"); + + PageResult pageResult2 = ORM.get(ZTable.class).page(DesignStandard.class, page, pageSize, + new Selector().addOrderbyDesc("createTime").addMaybe("standardParent", catId)); + + /* + * PageResult pageResult = ORM.get(ZView.class).page(DesignStandard.class, + * page, pageSize, sel); + */ + List reasonList = reasonMap.get(catId); + request.setAttribute("catList", catList); + request.setAttribute("catId", catId); + request.setAttribute("reasonList", reasonList != null ? reasonList : new ArrayList<>()); + request.setAttribute("pageResult", pageResult2); + /* + * Map> reasonMap = new HashMap>(); + * List catList = new ArrayList(); + * List tresaonList = ORM.get(ZTable.class).list(DesignStandard.class, new + * Selector().addOrderbyDesc("createTime")); + * for (DesignStandard reason : tresaonList) + * { + * if (reason.isStandardType()) + * { + * catList.add(reason); + * } + * else + * { + * List list = reasonMap.get(reason.getStandardParent()); + * list = list != null ? list : new ArrayList(); + * list.add(reason); + * reasonMap.put(reason.getStandardParent(), list); + * } + * } + * if (catId <= 0) + * { + * catId = 0; + * if (catList.size() > 0) + * { + * catId = catList.get(0).getStandardId(); + * } + * } + * List reasonList = reasonMap.get(catId); + * request.setAttribute("catList", catList); + * request.setAttribute("catId", catId); + * request.setAttribute("reasonList", reasonList != null ? reasonList : new ArrayList<>()); + */ + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/DesignStandardDetailsAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/DesignStandardDetailsAction.java new file mode 100644 index 0000000..199aeea --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/DesignStandardDetailsAction.java @@ -0,0 +1,187 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action.order; + +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.annotation.AnTransaction; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.design.dbo.order.DesignStandard; +import com.zhiqim.yangcai.design.dbo.utils.BaseUtil; + +/** + * + * 印前原因预录 + * + * @version 1.0 @author gjx 2019-9-16 新建与整理 + */ +public class DesignStandardDetailsAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + long catId = request.getParameterLong("reasonId"); + DesignStandard parent = ORM.get(ZTable.class).item(DesignStandard.class, catId); + if (parent != null) + { + request.setAttribute("content", parent.getStandardText()); + request.setAttribute("reasonId", catId); + } + + } + + @AnTransaction + public void insert(HttpRequest request) throws Exception + { + DesignStandard data = request.getParameter(DesignStandard.class); + data.setStandardId(Ids.longId()); + if (data.isStandardType()) + { + if (Validates.isEmptyBlank(data.getStandardTitle()) || data.getStandardTitle().length() > 32) + { + request.setResponseError("原因分类 不能为空 且不能超过32字符"); + return; + } + + } + else + {// 原因项 + long parentId = data.getStandardParent(); + parentId = parentId <= 0 ? 0 : parentId; + + DesignStandard parent = ORM.get(ZTable.class).item(DesignStandard.class, parentId); + if (parent == null) + { + request.setResponseError("未知原因分类"); + return; + } + + if (data.isStandardType() && Validates.isEmptyBlank(data.getStandardTitle()) || data.getStandardTitle().length() > 32) + { + request.setResponseError("原因项 不能为空 且不能超过32字符"); + return; + } + } + + data.setStandardTitle(BaseUtil.removeBlank(data.getStandardTitle())); + ORM.get(ZTable.class).replace(data); + } + + @AnTransaction + public void update(HttpRequest request) throws Exception + { + DesignStandard data = request.getParameter(DesignStandard.class); + long reasonId = data.getStandardId(); + reasonId = reasonId <= 0 ? 0 : reasonId; + DesignStandard reason = ORM.get(ZTable.class).item(DesignStandard.class, reasonId); + if (reason == null) + { + request.setResponseError("未知原因"); + return; + } + + Updater exUpdater = new Updater(); + exUpdater.addMust("standardId", Long.valueOf(reasonId)); + exUpdater.addField("standardTitle", data.getStandardTitle()); + ORM.get(ZTable.class).update(DesignStandard.class, exUpdater); + + /* + * long parentId = data.getStandardParent(); + * parentId = parentId <= 0 ? 0 : parentId; + * DesignStandard parent = ORM.get(ZTable.class).item(DesignStandard.class, parentId); + * if (parent == null) + * { + * request.setResponseError("未知原因分类"); + * return; + * } + * if (data.isStandardType() && Validates.isEmptyBlank(data.getStandardTitle()) || + * data.getStandardTitle().length() > 32) + * { + * request.setResponseError("原因项 不能为空 且不能超过32字符"); + * return; + * } + * data.setStandardTitle(BaseUtil.removeBlank(data.getStandardTitle())); + * ORM.get(ZTable.class).replace(data); + * ORM.get(ZTable.class).update(reason); + */ + } + + public void beforeDelete(HttpRequest request) throws Exception + { + long reasonId = request.getParameterLong("reasonId"); + DesignStandard reason = ORM.get(ZTable.class).item(DesignStandard.class, new Selector().addMaybe("standardId", reasonId)); + if (reason == null) + { + request.setResponseError("预录原因不存在"); + return; + } + ORM.get(ZTable.class).delete(DesignStandard.class, reason.getStandardId()); + /* + * List reasonList = ORM.get(ZTable.class).list(DesignStandard.class, new + * Selector().addMust("standardParent", reason.getStandardParent())); + * boolean returnContent = false; + * if (reasonList.size() == 1) + * { + * returnContent = true; + * } + */ + + request.setResponseResult(Jsons.toString(true)); + } + + @AnTransaction + public void Details(HttpRequest request) throws Exception + { + long reasonId = request.getParameterLong("reasonId"); + + /* + * List reasonList = ORM.get(ZTable.class).list(DesignStandard.class, new + * Selector().addMust("standardParent", reason.getStandardParent())); + * boolean returnContent = false; + * if (reasonList.size() == 1) + * { + * returnContent = true; + * } + */ + + request.setResponseResult(Jsons.toString(true)); + } + + @AnTransaction + public void delete(HttpRequest request) throws Exception + { + long reasonId = request.getParameterLong("reasonId"); + DesignStandard reason = ORM.get(ZTable.class).item(DesignStandard.class, new Selector().addMaybe("standardId", reasonId)); + if (reason == null) + { + request.setResponseError("预录原因不存在"); + return; + } + + List reasonList = ORM.get(ZTable.class).list(DesignStandard.class, new Selector().addMust("reasonParent", reason.getStandardParent())); + if (reasonList.size() == 1) + { + ORM.get(ZTable.class).delete(DesignStandard.class, reason.getStandardParent()); + } + ORM.get(ZTable.class).delete(DesignStandard.class, reasonId); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/DesignerTestAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/DesignerTestAction.java new file mode 100644 index 0000000..ca6d9f8 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/DesignerTestAction.java @@ -0,0 +1,142 @@ +package com.zhiqim.yangcai.design.action.order; + +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.extend.LinkedMapSO; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZSQL; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.order.OrderQuestions; +import com.zhiqim.yangcai.design.dbo.order.QuestionsAtta; + +/** + * + * [简要描述]:接单考试
            + * [详细描述]:
            + * + * @version 1.0 @author hc 2021年5月22日 新建与整理 + */ + +public class DesignerTestAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + // String operatorCode = request.getSessionName(); + ZmrSessionUser sessionUser = request.getSessionUser(ZmrSessionUser.class); + + Selector selector = new Selector(); + selector.addMust("designer", sessionUser.getOperatorCode()); + OrderQuestions orderQuestions = ORM.get(ZTable.class).item(OrderQuestions.class, selector); + + // 没有考试记录 + if (orderQuestions == null) + { + // 随机获取一条考试订单 + String designRequirements = "未获取到考试订单信息,请联系管理员"; + String configQuestionsId = "0L"; + + List configQuestions = ORM.get(ZSQL.class) + .executeQuery("select QUESTIONS_ID,DESIGN_REQUIREMENTS from config_questions ORDER BY RAND() LIMIT 1"); + if (configQuestions != null && configQuestions.size() > 0) + { + for (LinkedMapSO so : configQuestions) + { + designRequirements = so.get("DESIGN_REQUIREMENTS").toString(); + configQuestionsId = so.get("QUESTIONS_ID").toString(); + continue; + } + } + else + { + request.setResponseError("没有找到考试题库信息,请联系管理员"); + return; + } + + orderQuestions = new OrderQuestions(); + orderQuestions.setCreateTime(Sqls.nowTimestamp()); + orderQuestions.setDesigner(sessionUser.getOperatorCode()); + orderQuestions.setQuestionsId(Ids.longId13()); + orderQuestions.setStatus(0); + orderQuestions.setDesignRequirements(designRequirements); + orderQuestions.setMobile(sessionUser.getOperatorMobile()); + ORM.get(ZTable.class).insert(orderQuestions); + + // 复制一份订单附件 + Selector sel = new Selector(); + sel.addMust("questionsId", Long.parseLong(configQuestionsId)); + sel.addMust("attaModul", "MaterialFile"); + List attaList = ORM.get(ZTable.class).list(QuestionsAtta.class, sel); + if (attaList != null && attaList.size() > 0) + { + for (QuestionsAtta config_atta : attaList) + { + // 插入考试订单附属表 + QuestionsAtta atta = new QuestionsAtta(); + atta.setQuestionsId(orderQuestions.getQuestionsId()); + atta.setAttaId(Ids.longId()); + atta.setAttaModul("MaterialFile"); + atta.setFileName(config_atta.getFileName()); + atta.setFileType(config_atta.getFileType()); + atta.setFileSize(config_atta.getFileSize()); + atta.setSavePath(config_atta.getSavePath()); + atta.setFileUrl(config_atta.getFileUrl()); + atta.setOperatorCode(request.getSessionName()); + atta.setUploadTime(Sqls.nowTimestamp()); + ORM.get(ZTable.class).insert(atta); + } + } + } + + // 展示素材文件 + Selector selMaterialFile = new Selector(); + selMaterialFile.addMust("questionsId", orderQuestions.getQuestionsId()); + selMaterialFile.addMust("attaModul", "MaterialFile"); + List materialFilerAttaList = ORM.get(ZTable.class).list(QuestionsAtta.class, selMaterialFile); + request.setAttribute("materialFilerAttaList", materialFilerAttaList); + request.setAttribute("initialStatus", orderQuestions.getStatus()); + request.setAttribute("orderQuestions", orderQuestions); + request.setAttribute("questionsId", orderQuestions.getQuestionsId()); + + // 展示设计文件 + Selector selDesginFile = new Selector(); + selDesginFile.addMust("questionsId", orderQuestions.getQuestionsId()); + selDesginFile.addMust("attaModul", "DesginFile"); + List desginFileAttaList = ORM.get(ZTable.class).list(QuestionsAtta.class, selDesginFile); + request.setAttribute("desginFileAttaList", desginFileAttaList); + + // 展示印刷文件 + Selector selEndFile = new Selector(); + selEndFile.addMust("questionsId", orderQuestions.getQuestionsId()); + selEndFile.addMust("attaModul", "EndFile"); + List endFileAttaList = ORM.get(ZTable.class).list(QuestionsAtta.class, selEndFile); + request.setAttribute("endFileAttaList", endFileAttaList); + + // 获取订单文件上传路径 + String dateDir = DateTimes.getDateTime8String(); + String desginFile = "订单考核/设计文件"; + String desginPath = dateDir + "/" + desginFile; + request.setAttribute("desginPath", desginPath); + + String endFile = "订单考核/印刷文件"; + String endPath = dateDir + "/" + endFile; + request.setAttribute("endPath", endPath); + + } + + protected void delete(HttpRequest request) throws Exception + { + long attaId = request.getParameterLong("attaId"); + + ORM.get(ZTable.class).delete(QuestionsAtta.class, attaId); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/HistoryBackDetailsAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/HistoryBackDetailsAction.java new file mode 100644 index 0000000..bf60a55 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/HistoryBackDetailsAction.java @@ -0,0 +1,87 @@ +/** + * 扬彩印刷设计 + * 文件名 :HistoryBackDetailsAction.java + * 创建人 :gjx + * 创建时间:2019-9-18 + */ + +package com.zhiqim.yangcai.design.action.order; + +import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.constants.EventConstants; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; +import com.zhiqim.yangcai.design.dbo.order.OrdOprLog; +import com.zhiqim.yangcai.design.dbo.utils.CalculationUtil; +import com.zhiqim.yangcai.design.model.HistoryBackDetailsModel; + +/** + * 订单历史审核退回详情 + * + * @version 1.0 @author gjx 2019-9-18 新建与整理 + */ +public class HistoryBackDetailsAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + long designId = request.getParameterLong("designId"); + DesignOrder designOrder = ORM.get(ZTable.class).item(DesignOrder.class, new Selector().addMaybe("designId", designId)); + if (designOrder == null) + { + request.setResponseError("订单不存在"); + return; + } + + List models = new ArrayList<>(); + List finalizeLogList = ORM.get(ZTable.class).list(OrdOprLog.class, + new Selector().addMust("designId", designId).addMust("eventType", EventConstants.ORDER_9.value()).addOrderbyAsc("createTime")); + List backLogList = ORM.get(ZTable.class).list(OrdOprLog.class, + new Selector().addMust("designId", designId).addMust("eventType", EventConstants.ORDER_10.value()).addOrderbyAsc("createTime")); + for (int i = 0; i < backLogList.size(); i++) + { + HistoryBackDetailsModel model = new HistoryBackDetailsModel(); + model.setDesignId(designOrder.getDesignId()); + model.setBuyerNick(designOrder.getBuyerNick()); + model.setOrderText(designOrder.getOrderText()); + model.setAmount(designOrder.getAmount()); + model.setBackTime(backLogList.get(i).getCreateTime()); + model.setCheckBackReason(backLogList.get(i).getOperateDesc()); + Timestamp checkBackTime = backLogList.get(i).getCreateTime(); + if (i < finalizeLogList.size() - 1) + { + Timestamp designEndTime = finalizeLogList.get(i + 1).getCreateTime(); + model.setDesignEndTime(designEndTime); + boolean isTimeOut = CalculationUtil + .doCalculCheckBackCountDownBefore(Sqls.toDateTimeString(checkBackTime), Sqls.toDateTimeString(designEndTime)); + String dateText = CalculationUtil.doCalculCheckBackCountDown(Sqls.toDateTimeString(checkBackTime), Sqls.toDateTimeString(designEndTime)); + model.setTimeOut(isTimeOut); + model.setBackCountDown(dateText); + } + else + { + boolean isTimeOut = CalculationUtil.doCalculCheckBackCountDownBefore(Sqls.toDateTimeString(checkBackTime), + String.valueOf(DateTimes.getDateTimeString())); + String dateText = CalculationUtil.doCalculCheckBackCountDown(Sqls.toDateTimeString(checkBackTime), + String.valueOf(DateTimes.getDateTimeString())); + model.setTimeOut(isTimeOut); + model.setBackCountDown(dateText); + } + + models.add(model); + } + + request.setAttribute("models", models); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/HistoryOrderTagLogAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/HistoryOrderTagLogAction.java new file mode 100644 index 0000000..141eb9c --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/HistoryOrderTagLogAction.java @@ -0,0 +1,91 @@ +/** + * 扬彩印刷设计 + * 文件名 :HistoryOrderTagLogAction.java + * 创建人 :gjx + * 创建时间:2019-12-19 + */ + +package com.zhiqim.yangcai.design.action.order; + +import java.util.ArrayList; +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.util.Strings; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.constants.EventConstants; +import com.zhiqim.yangcai.design.dbo.order.OrdOprLog; +import com.zhiqim.yangcai.design.model.HisToryOrderTagLogModel; + +/** + * [简要描述]历史订单标签日志查询:
            + * [详细描述]:
            + * + * @version 1.0 @author gjx 2019-12-19 新建与整理 + */ +public class HistoryOrderTagLogAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + long designId = request.getParameterLong("designId"); + + Selector selector = new Selector(); + selector.addMust("designId", designId); + selector.addMust("eventType", EventConstants.ORDER_31.value()); + selector.addOrderbyDesc("createTime"); + List logList = ORM.get(ZTable.class).list(OrdOprLog.class, selector); + List modelList = new ArrayList<>(); + HisToryOrderTagLogModel model = null; + for (OrdOprLog log : logList) + { + model = new HisToryOrderTagLogModel(); + model.setOperatorCode(log.getOperatorCode()); + model.setOperatorTime(log.getCreateTime()); + String operateDesc = Validates.isNotEmpty(log.getOperateDesc()) ? log.getOperateDesc() : ""; + // 修改订单标签 :主行业:美容妆饰,客户类型:渠道商,子行业:理发,应用场景:舞会,设计风格:欧美风 + // 修改订单标签 :客户类型:渠道商,子行业:理发,应用场景:舞会,设计风格:中国风, + // 修改订单标签 :主行业:美容妆饰,客户类型:,子行业:,应用场景:,设计风格: + String[] orderTag1 = operateDesc.split(":"); + String orderTagStr = orderTag1[1]; + String[] orderTag2 = orderTagStr.split(","); + for (int i = 0; i < orderTag2.length; i++) + { + String strKey = Strings.trim(orderTag2[i].substring(0, orderTag2[i].indexOf(":"))); + if ("主行业".equals(strKey)) + { + model.setMainIndustryName(Strings.trim(orderTag2[i].substring(strKey.length() + 1, orderTag2[i].length()))); + } + if ("客户类型".equals(strKey)) + { + model.setCustomerType(Strings.trim(orderTag2[i].substring(strKey.length() + 1, orderTag2[i].length()))); + } + if ("子行业".equals(strKey)) + { + model.setSonIndustryName(Strings.trim(orderTag2[i].substring(strKey.length() + 1, orderTag2[i].length()))); + } + if ("应用场景".equals(strKey)) + { + model.setAppScenarios(Strings.trim(orderTag2[i].substring(strKey.length() + 1, orderTag2[i].length()))); + } + if ("设计风格".equals(strKey)) + { + model.setDesignStyle(Strings.trim(orderTag2[i].substring(strKey.length() + 1, orderTag2[i].length()))); + } + if ("未匹配的关键词".equals(strKey)) + { + model.setUnmatchKeyword(Strings.trim(orderTag2[i].substring(strKey.length() + 1, orderTag2[i].length()))); + } + } + modelList.add(model); + } + + request.setAttribute("modelList", modelList); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/ModifyIndustryAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/ModifyIndustryAction.java new file mode 100644 index 0000000..8073690 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/ModifyIndustryAction.java @@ -0,0 +1,50 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.action.order; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; + +/** + * + * 修改行业 + * + * @version v1.0.0 @author Deng 2018-3-17 新建与整理 + */ +public class ModifyIndustryAction implements Action +{ + @Override + public void execute(HttpRequest request) throws Exception + { + long designId = request.getParameterLong("designId"); + if(designId <= 0) + { + request.returnCloseDialog("订单【"+designId+"】不存在,请重新选择!"); + return; + } + + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, new Selector("designId", designId)); + if(order == null) + { + request.returnCloseDialog("订单【"+designId+"】不存在,请重新选择!"); + return; + } + + request.setAttribute("order", order); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/MyDesignOrderAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/MyDesignOrderAction.java new file mode 100644 index 0000000..4c872bc --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/MyDesignOrderAction.java @@ -0,0 +1,66 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.action.order; + + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.manager.dao.ZmrOrgDao; +import org.zhiqim.manager.dbo.ZmrOrg; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.constants.StatusConstants; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; + +/** + * 我的设计订单 + * + * @version v1.0.0 @author Deng 2017-4-6 新建与整理 + */ +public class MyDesignOrderAction implements Action +{ + @Override + public void execute(HttpRequest request) throws Exception + { + ZmrSessionUser sessionUser = request.getSessionUser(ZmrSessionUser.class); + + int page = request.getParameterInt("page", 1); + int pageSize = request.getContextAttributeInt("page.size", 15); + long designId = request.getParameterLong("designId"); + + Selector selector = new Selector(); + selector.addOrderbyDesc("designReceiveTime"); + selector.addMustThenGE("status", StatusConstants.ORDER_30.value()); + if (designId > 0) + selector.addOr(new Selector("designId", designId).addMust("outId", designId)); + + selector.addMaybe("buyerNick", request.getParameter("buyerNick")); + selector.addMaybeLike("tids", request.getParameter("tid")); + selector.addMaybe("designType", request.getParameterLong("designType")); + selector.addMaybe("industryId", request.getParameterLong("industryId")); + selector.addMust("designer", sessionUser.getOperatorCode()); + + //根据组织显示 + long orgId = sessionUser.getSelectedOrgId(); + ZmrOrg org = ZmrOrgDao.getOrg(request, orgId); + if (org.getOrgLevel() > 0) + selector.addMust("orgId", orgId); + + PageResult pageResult = ORM.get(ZTable.class).page(DesignOrder.class, page, pageSize,selector); + pageResult.addConditionMap(request.getParameterMap()); + request.setAttribute("pageResult", pageResult); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/MyDraftOrderAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/MyDraftOrderAction.java new file mode 100644 index 0000000..f7dc7e7 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/MyDraftOrderAction.java @@ -0,0 +1,68 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action.order; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.manager.dao.ZmrOrgDao; +import org.zhiqim.manager.dbo.ZmrOrg; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.constants.StatusConstants; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; + +/** + * 我的初稿订单 + * + * @version v1.0.0 @author Deng 2017-4-6 新建与整理 + */ +public class MyDraftOrderAction implements Action +{ + @Override + public void execute(HttpRequest request) throws Exception + { + ZmrSessionUser sessionUser = request.getSessionUser(ZmrSessionUser.class); + + int page = request.getParameterInt("page", 1); + int pageSize = request.getContextAttributeInt("page.size", 15); + long designId = request.getParameterLong("designId"); + + Selector selector = new Selector(); + selector.addOrderbyDesc("designDraftTime"); + if (designId > 0) + { + selector.addOr(new Selector("designId", designId).addMust("outId", designId)); + } + selector.addMust("status", StatusConstants.ORDER_50.value()); + selector.addMaybe("buyerNick", request.getParameter("buyerNick")); + selector.addMaybeLike("tids", request.getParameter("tid")); + selector.addMaybe("designType", request.getParameterLong("designType")); + selector.addMaybe("industryId", request.getParameterLong("industryId")); + selector.addMust("designer", sessionUser.getOperatorCode()); + + // 根据组织显示 + long orgId = sessionUser.getSelectedOrgId(); + ZmrOrg org = ZmrOrgDao.getOrg(request, orgId); + if (org.getOrgLevel() > 0) + { + selector.addMust("orgId", orgId); + } + + PageResult pageResult = ORM.get(ZTable.class).page(DesignOrder.class, page, pageSize, selector); + pageResult.addConditionMap(request.getParameterMap()); + request.setAttribute("pageResult", pageResult); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/MyRetentionOrderAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/MyRetentionOrderAction.java new file mode 100644 index 0000000..32a7367 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/MyRetentionOrderAction.java @@ -0,0 +1,115 @@ +/** + * 扬彩印刷设计 + * 文件名 :MyRetentionOrderAction.java + * 创建人 :高佳新 + * 创建时间:2019-7-17 + */ + +package com.zhiqim.yangcai.design.action.order; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.manager.dao.ZmrOperatorDao; +import org.zhiqim.manager.dao.ZmrOrgDao; +import org.zhiqim.manager.dbo.ZmrOperator; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.constants.StatusConstants; +import com.zhiqim.yangcai.design.dao.AuthorityDao; +import com.zhiqim.yangcai.design.dao.ShopDao; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; +import com.zhiqim.yangcai.design.dbo.order.OrdProgressNote; + +/** + * + * 我的滞留单 + * + * @version 1.0 @author gjx 2019-7-17 新建与整理 + */ +public class MyRetentionOrderAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page", 1); + int pageSize = request.getContextAttributeInt("page.size", 12); + // String startDate = request.getParameter("startDate", + // DateTimes.getPreviousDateStringByMonth(6)); + // String endDate = request.getParameter("endDate", DateTimes.getDateString()); + int monthFlag = request.getParameterInt("retentionTime"); + monthFlag = monthFlag < 1 ? 1 : monthFlag; + + Selector selector = new Selector(); + // selector.addMaybeThenGE("createTime", Sqls.toTimestamp(startDate, "00:00:00")); + // selector.addMaybeThenLE("createTime", Sqls.toTimestamp(endDate, "23:59:59")); + selector.addOrderbyDesc("createTime"); + selector.addMustThenL("status", StatusConstants.ORDER_55.value());// 小于已定稿状态 + selector.addMustThenGE("status", StatusConstants.ORDER_10.value());// 大于已付款 + // selector.addMustIn("draftType", DraftConstants.DRAFT_TEMPLATE.value(), + // DraftConstants.DRAFT_COMMON_DESIGN.value(), + // DraftConstants.DRAFT_PAGE_DESIGN.value());// 设计订单 + selector.addMaybe("designId", request.getParameterLong("designId")); + selector.addMaybe("typeId", request.getParameterLong("typeId")); + selector.addMaybe("designer", request.getParameter("designer")); + selector.addMaybe("buyerNick", request.getParameter("buyerNick")); + selector.addMaybe("draftType", request.getParameterInt("draftType")); + selector.addMaybe("shopNick", request.getParameter("shopNick")); + selector.addExpressionThenL("createTime", "DATE_SUB(now(),INTERVAL " + monthFlag * 31 + " DAY)"); + + // 根据组织以及部门权限显示 + ZmrSessionUser sessionUser = request.getSessionUser(ZmrSessionUser.class); + ZmrOperator operator = ZmrOperatorDao.getOperator(request, request.getSessionName()); + if (operator.getOrgId() != ZmrOrgDao.getOrgRootId(request)) + { + AuthorityDao.ergodicOpecoterCode(request, request.getSessionName(), selector, "designer"); + } + else + { + List operatorList = ORM.get(ZTable.class).list(ZmrOperator.class, new Selector().addMust("operatorStatus", 0)); + request.setAttribute("operatorList", operatorList); + } + if (ZmrOrgDao.getOrgRootId(request) != sessionUser.getSelectedOrgId()) + { + selector.addMust("orgId", sessionUser.getSelectedOrgId()); + } + + PageResult pageResult = ORM.get(ZTable.class).page(DesignOrder.class, page, pageSize, selector); + pageResult.addConditionMap(request.getParameterMap()); + List designOrderList = pageResult.list(); + long[] oidArray = new long[pageResult.list().size()]; + for (int i = 0; i < designOrderList.size(); i++) + { + oidArray[i] = designOrderList.get(i).getDesignId(); + } + Map progressNoteMap = new HashMap(); + List progressNotes = ORM.get(ZTable.class).list(OrdProgressNote.class, + new Selector().addMaybeInLong("designId", oidArray).addOrderbyDesc("createTime")); + for (OrdProgressNote note : progressNotes) + { + if (!progressNoteMap.containsKey(note.getDesignId())) + { + progressNoteMap.put(note.getDesignId(), note == null ? "" + : "" + + "

            " + + note.getOrdProgressNote() + "

            " + Sqls.toDateTimeString(note.getCreateTime()) + "
            "); + } + } + + request.setAttribute("pageResult", pageResult); + request.setAttribute("progressNoteMap", progressNoteMap); + request.setAttribute("shopNickList", ShopDao.getShopList()); + // request.setAttribute("startDate", startDate); + // request.setAttribute("endDate", endDate); + } +} \ No newline at end of file diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/OrderBackLogAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/OrderBackLogAction.java new file mode 100644 index 0000000..e44bd93 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/OrderBackLogAction.java @@ -0,0 +1,32 @@ +/** + * 扬彩印刷设计 + * 文件名 :NoticeHistoryAction.java + * 创建人 :xiepan + * 创建时间:2021年7月1日 +*/ + +package com.zhiqim.yangcai.design.action.order; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.model.OrderBacklog; + +public class OrderBackLogAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + int pageNo = request.getParameterInt("page", 1); + int pageSize = request.getParameterInt("page.size", 15); + PageResult pageResult = ORM.get(ZTable.class).page(OrderBacklog.class, pageNo, pageSize, + new Selector().addOrderbyDesc("createTime").addMaybe("consumerCode", request.getSessionName())); + request.setAttribute("result", pageResult); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/OrderListAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/OrderListAction.java new file mode 100644 index 0000000..24dccfc --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/OrderListAction.java @@ -0,0 +1,112 @@ +package com.zhiqim.yangcai.design.action.order; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.constants.StatusConstants; +import com.zhiqim.yangcai.design.dao.DesignTypeDao; +import com.zhiqim.yangcai.design.dbo.design.DesignType; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; +import com.zhiqim.yangcai.design.dbo.order.OrdProgressNote; + +/** + * 平台所有订单列表 + * + * @version v1.0.0 @author zhouwenbin 2017-8-11 新建与整理 + * @version v2.0.0 @author caohong 2021-6-2 去掉组织规则条件,增加未完成,退回等逻辑状态条件 + */ +public class OrderListAction implements Action +{ + @Override + public void execute(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page", 1); + int pageSize = request.getContextAttributeInt("page.size", 15); + + String startDate = request.getParameter("startDate", DateTimes.getPreviousDateStringByMonth(1)); + String endDate = request.getParameter("endDate", DateTimes.getDateString()); + int day = DateTimes.compareDay(endDate, startDate); + if (day > 183) + { + request.setResponseError("请勿将时间区间跨度选择大于六个月"); + return; + } + long designId = request.getParameterLong("designId"); + String buyerNick = request.getParameter("buyerNick"); + int status = request.getParameterInt("orderStatus"); + + Selector sel = new Selector(); + sel.addMaybe("designId", designId); + if (status != -1) + { + if (status == 110) + { + // 所有未完成订单 + sel.addMustThenGE("status", StatusConstants.ORDER_30.value());// 大于等于 正在设计 + sel.addMustThenLE("status", StatusConstants.ORDER_50.value());// 小于等于已初稿状态 + } + else if (status == 120) + { + // 所有未完成订单 + sel.addMustThenGE("status", StatusConstants.ORDER_30.value());// 大于等于 正在设计 + sel.addMustThenLE("status", StatusConstants.ORDER_50.value());// 小于等于已初稿状态 + + // 有审核打回记录 + sel.addMustIsNotNull("checkBackReason"); + } + else + { + sel.addMust("status", status); + } + } + + if (designId <= 0 && Validates.isEmpty(buyerNick) && status < 100) + {// 如果输入订单号或者旺旺号不加时间限制 + sel.addMustThenGE("createTime", Sqls.toTimestamp(startDate + " 00:00:00")); + sel.addMustThenLE("createTime", Sqls.toTimestamp(endDate + " 23:59:59")); + } + + sel.addMaybe("typeId", request.getParameterLong("typeId")); + sel.addMaybe("draftType", request.getParameterInt("draftType")); + sel.addMaybe("buyerNick", buyerNick); + sel.addMaybe("designer", request.getParameter("designer")); + sel.addMaybe("merchantId", request.getParameterLong("merchantId")); + sel.addMaybeThenGE("amount", request.getParameterLong("amount")); + sel.addOrderbyDesc("createTime"); + + PageResult pageResult = ORM.get(ZTable.class).page(DesignOrder.class, page, pageSize, sel); + pageResult.addConditionMap(request.getParameterMap()); + + // 获取进度备注 + Map progressNoteMap = new HashMap(); + for (DesignOrder order : pageResult.list()) + { + // 进度备注 + OrdProgressNote note = ORM.get(ZTable.class).item(OrdProgressNote.class, + new Selector("designId", order.getDesignId()).addOrderbyDesc("createTime")); + progressNoteMap.put(order.getDesignId(), note == null ? "" + : "" + + "

            " + + note.getOrdProgressNote() + "

            " + Sqls.toDateTimeString(note.getCreateTime()) + "
            "); + } + + request.setAttribute("pageResult", pageResult); + request.setAttribute("startDate", startDate); + request.setAttribute("endDate", endDate); + request.setAttribute("progressNoteMap", progressNoteMap); + + List typeList = DesignTypeDao.listAll(); + request.setAttribute("typeList", typeList); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/OrderLogListAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/OrderLogListAction.java new file mode 100644 index 0000000..f375dc2 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/OrderLogListAction.java @@ -0,0 +1,38 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.action.order; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.order.OrdOprLog; + +public class OrderLogListAction implements Action +{ + public void execute(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page", 1); + int pageSize = request.getContextAttributeInt("page.size", 15); + long designId = request.getParameterLong("designId", 0); + Selector sel = new Selector(); + sel.addMust("designId", designId); + sel.addOrderbyDesc("createTime"); + sel.addOrderbyDesc("logId"); + PageResult pageResult = ORM.get(ZTable.class).page(OrdOprLog.class, page, pageSize, sel); + pageResult.addConditionMap(request.getParameterMap()); + request.setAttribute("pageResult", pageResult); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/OrderRefundListAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/OrderRefundListAction.java new file mode 100644 index 0000000..a37b57e --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/OrderRefundListAction.java @@ -0,0 +1,54 @@ +package com.zhiqim.yangcai.design.action.order; + +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.cache.DesignOrderRefundReasonCache; +import com.zhiqim.yangcai.design.constants.StatusConstants; +import com.zhiqim.yangcai.design.dao.DesignTypeDao; +import com.zhiqim.yangcai.design.dbo.design.DesignType; +import com.zhiqim.yangcai.design.dbo.order.DesignSelfView; + +/** + * 退款列表 + * + * @version v1.0.0 @author 高佳新 2019-05-05 @modify:谢盼 2021-06-03 新建与整理 + */ +public class OrderRefundListAction implements Action +{ + @Override + public void execute(HttpRequest request) throws Exception + { + Global.get(DesignOrderRefundReasonCache.class).doRefresh(); + int page = request.getParameterInt("page", 1); + int pageSize = request.getContextAttributeInt("page.size", 15); + + Selector sel = new Selector(); + sel.addMust("status", StatusConstants.ORDER_34.value()); + sel.addMaybe("designId", request.getParameterLong("designId")); + long refundReason = request.getParameterLong("refundReason"); + if (refundReason >= 0) + { + sel.addMust("refundReason", refundReason); + } + sel.addMaybe("typeId", request.getParameterLong("typeId")); + sel.addMaybe("draftType", request.getParameterInt("draftType")); + sel.addMaybe("buyerNick", request.getParameter("buyerNick")); + sel.addMaybe("shopNick", request.getParameter("merchantId")); + + sel.addOrderbyDesc("refundTime"); + PageResult pageResult = ORM.get(ZView.class).page(DesignSelfView.class, page, pageSize, sel); + pageResult.addConditionMap(request.getParameterMap()); + // 退款原因查询列表 + request.setAttribute("pageResult", pageResult); + List typeList = DesignTypeDao.listAll(); + request.setAttribute("typeList", typeList); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/OrderTagListAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/OrderTagListAction.java new file mode 100644 index 0000000..67f0b57 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/OrderTagListAction.java @@ -0,0 +1,117 @@ +/** + * 扬彩印刷设计 + * 文件名 :OrderTagListAction.java + * 创建人 :gjx + * 创建时间:2019-12-19 + */ + +package com.zhiqim.yangcai.design.action.order; + +import java.util.HashMap; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.manager.ZmrConstants; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.cache.IndustryLabelCache; +import com.zhiqim.yangcai.cache.LabelDimensionCache; +import com.zhiqim.yangcai.design.constants.DraftConstants; +import com.zhiqim.yangcai.design.constants.StatusConstants; +import com.zhiqim.yangcai.design.dao.OperatorDao; +import com.zhiqim.yangcai.design.dbo.order.DesignSelfView; +import com.zhiqim.yangcai.design.model.IndustryLabelModel; +import com.zhiqim.yangcai.design.model.LabelDimensionModel; + +/** + * [简要描述]订单标签列表:
            + * [详细描述]:
            + * + * @version 1.0 @author gjx 2019-12-19 新建与整理 + */ +public class OrderTagListAction implements Action, ZmrConstants +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page", 1); + int pageSize = request.getContextAttributeInt("page.size", 15); + ZmrSessionUser sessionUser = request.getSessionUser(ZmrSessionUser.class); + if (sessionUser == null) + { + request.setRedirectTop("/" + request.getContextAttributeString(ZMR_PATH) + "/logout.htm", "您闲置太久或未登录,正在返回初始界面,请确定....."); + return; + } + + String startDate = request.getParameter("startDate", DateTimes.getPreviousDateStringByMonth(1)); + String endDate = request.getParameter("endDate", DateTimes.getDateString()); + int day = DateTimes.compareDay(endDate, startDate); + if (day > 183) + { + request.setResponseError("请勿将时间区间跨度选择大于六个月"); + return; + } + + Selector selector = new Selector(); + selector.addMustThenGE("status", StatusConstants.ORDER_55.value()); + selector.addMustThenGE("draftType", DraftConstants.DRAFT_COMMON_DESIGN.value()); + selector.addMustThenGE("createTime", Sqls.toTimestamp(startDate + " 00:00:00")); + selector.addMustThenLE("createTime", Sqls.toTimestamp(endDate + " 23:59:59")); + selector.addMaybe("designId", request.getParameterLong("designId")); + selector.addMaybe("typeId", request.getParameterLong("typeId")); + selector.addMaybe("buyerNick", request.getParameter("buyerNick")); + selector.addMaybe("industryId", request.getParameterLong("industryId")); + selector.addMaybe("industryId", request.getParameterLong("waitRedress")); + selector.addMaybe("designer", request.getParameter("designer")); + selector.addMustIsNotNull("labelIds"); + + PageResult pageResult = ORM.get(ZView.class).page(DesignSelfView.class, page, pageSize, selector); + pageResult.addConditionMap(request.getParameterMap()); + Map map = new HashMap(); + + String subIndustry = ""; + String value = ""; + for (LabelDimensionModel label : Global.get(LabelDimensionCache.class).getDimensionAll()) + { + if ("子行业".endsWith(label.getDimensionName())) + { + subIndustry = label.getDimensionId(); + break; + } + } + + Map labelMap = Global.get(IndustryLabelCache.class).mapAll(); + + for (DesignSelfView order : pageResult.list()) + { + + String[] tags = Validates.isNotEmpty(order.getLabelIds()) ? order.getLabelIds().split(",") : new String[0]; + for (int i = 0; i < tags.length; i++) + { + String tag = tags[i]; + IndustryLabelModel labelModel = labelMap.get(Long.valueOf(tag)); + if (labelModel != null && subIndustry.equals(labelModel.getDimensionId())) + { + value = labelModel.getLabelName(); + } + } + map.put(order.getDesignId(), value); + } + + request.setAttribute("pageResult", pageResult); + request.setAttribute("startDate", startDate); + request.setAttribute("endDate", endDate); + request.setAttribute("map", map); + request.setAttribute("designerList", OperatorDao.getOrgOperatorAllList(sessionUser.getSelectedOrgId())); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/ProgressNoteAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/ProgressNoteAction.java new file mode 100644 index 0000000..0e22c47 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/ProgressNoteAction.java @@ -0,0 +1,46 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.action.order; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.order.OrdProgressNote; + +/**** + * 进度备注 + * + * @version v1.0.0 @author longguizhi 2018-9-13 新建与整理 + */ +public class ProgressNoteAction implements Action +{ + public void execute(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page", 1); + int pageSize = request.getContextAttributeInt("page.size", 10); + + long designId = request.getParameterLong("designId"); + + Selector selector = new Selector(); + selector.addMust("designId", designId); + selector.addOrderbyDesc("createTime"); + PageResult pageResult = ORM.get(ZTable.class).page(OrdProgressNote.class, page, pageSize, selector); + pageResult.addConditionMap(request.getParameterMap()); + + request.setAttribute("pageResult", pageResult); + request.setAttribute("designId", designId); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/QcApplyDetailAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/QcApplyDetailAction.java new file mode 100644 index 0000000..d7c8351 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/QcApplyDetailAction.java @@ -0,0 +1,51 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action.order; + +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; + +import com.zhiqim.yangcai.design.constants.AwardedTypeConstants; +import com.zhiqim.yangcai.design.dbo.qc.QcApplyScore; +import com.zhiqim.yangcai.design.dbo.qc.QcAwardedType; + +/** + * 申请详情(图片) + * + * @version v1.0.0 @author liuhu 2019-1-29 新建与整理 + */ +public class QcApplyDetailAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + long applyId = request.getParameterLong("applyId"); + boolean readonly = request.getParameterBoolean("readonly"); + QcApplyScore apply = ORM.get(ZTable.class).item(QcApplyScore.class, applyId); + if (apply == null) + { + request.setResponseError("订单申请不存在"); + return; + } + + request.setAttribute("readonly", readonly); + request.setAttribute("apply", apply); + request.setAttribute("qcTypeIdChecked", apply.getQcTypeId()); + List awardedTypeList = AwardedTypeConstants.getAwardedTypeList(); + request.setAttribute("awardedTypeList", awardedTypeList); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/QcApplyScoreAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/QcApplyScoreAction.java new file mode 100644 index 0000000..477911f --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/QcApplyScoreAction.java @@ -0,0 +1,34 @@ +/** + * 扬彩印刷设计 + * 文件名 :QcApplyScoreAction.java + * 创建人 :高佳新 + * 创建时间:2019-5-20 + */ + +package com.zhiqim.yangcai.design.action.order; + +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; + +import com.zhiqim.yangcai.design.constants.AwardedTypeConstants; +import com.zhiqim.yangcai.design.dbo.qc.QcAwardedType; + +/** + * + * 查询加分类型列表 + * + * @version 1.0 @author 高佳新 2019-5-21 新建与整理 + */ +public class QcApplyScoreAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + List awardedTypeList = AwardedTypeConstants.getAwardedTypeList(); + request.setAttribute("awardedTypeList", awardedTypeList); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/QcApplyScoreListAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/QcApplyScoreListAction.java new file mode 100644 index 0000000..51b94a1 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/QcApplyScoreListAction.java @@ -0,0 +1,96 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action.order; + +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.manager.dbo.ZmrOperator; +import org.zhiqim.manager.dbo.ZmrOrg; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.constants.AwardedTypeConstants; +import com.zhiqim.yangcai.design.dbo.qc.QcApplyScore; +import com.zhiqim.yangcai.design.dbo.qc.QcAwardedType; + +/** + * 质检加分列表 + * + * @version v1.0.0 @author liuhu 2019-1-29 新建与整理 + */ +public class QcApplyScoreListAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page", 1); + int pageSize = request.getContextAttributeInt("page.size", 15); + long orgId = request.getSessionUser(ZmrSessionUser.class).getSelectedOrgId(); + ZmrOrg org = ORM.get(ZTable.class).item(ZmrOrg.class, orgId); + int applyFlag = request.getParameterInt("applyFlag"); + Long qcTypeId = request.getParameterLong("qcTypeId"); + String qcAwardedAuditor = request.getParameter("qcAwardedAuditor"); + String designer = request.getParameter("designer"); + + String beginAuditDate = request.getParameter("beginAuditDate"); + String endAuditDate = request.getParameter("endAuditDate"); + + String beginDate = request.getParameter("beginDate", DateTimes.getFirstMonthDay()); + String endDate = request.getParameter("endDate", DateTimes.getDateString()); + + Selector selector = new Selector(); + selector.addMustThenGE("applyTime", Sqls.toTimestamp(beginDate + " 00:00:00")); + selector.addMustThenLE("applyTime", Sqls.toTimestamp(endDate + " 23:59:59")); + selector.addMaybe("designer", designer); + if (beginAuditDate != null && !beginAuditDate.equals("")) + { + selector.addMustThenGE("qcAwardedAuditorTime", Sqls.toTimestamp(beginAuditDate + " 00:00:00")); + selector.addMustThenLE("qcAwardedAuditorTime", Sqls.toTimestamp(endAuditDate + " 23:59:59")); + } + selector.addMaybe("applyFlag", applyFlag); + selector.addMaybeLike("qcAwardedAuditor", qcAwardedAuditor); + selector.addMaybe("qcTypeId", qcTypeId); + if (org.getOrgLevel() > 0) + { + selector.addMust("orgId", orgId); + } + selector.addOrderbyDesc("applyTime"); + request.setAttribute("qcTypeIdSelected", qcTypeId); + PageResult pageResult = ORM.get(ZTable.class).page(QcApplyScore.class, page, pageSize, selector); + pageResult.addConditionMap(request.getParameterMap()); + + List operatorList = ORM.get(ZTable.class).list(ZmrOperator.class); + if (org.getOrgLevel() > 0) + { + operatorList = ORM.get(ZTable.class).list(ZmrOperator.class, new Selector("orgId", orgId)); + } + + List awardedTypeList = AwardedTypeConstants.getAwardedTypeList(); + request.setAttribute("awardedTypeList", awardedTypeList); + request.setAttribute("applyFlag", applyFlag); + request.setAttribute("qcAwardedAuditor", qcAwardedAuditor); + request.setAttribute("operatorList", operatorList); + request.setAttribute("beginAuditDate", beginAuditDate); + request.setAttribute("endAuditDate", endAuditDate); + request.setAttribute("beginDate", beginDate); + request.setAttribute("endDate", endDate); + request.setAttribute("pageResult", pageResult); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/QcJudgeAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/QcJudgeAction.java new file mode 100644 index 0000000..67fb072 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/QcJudgeAction.java @@ -0,0 +1,49 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.action.order; + +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; +import com.zhiqim.yangcai.design.dbo.qc.QcParameter; + +/** + * 质检判定类 + * + * @version v1.0.0 @author liuhu 2019-1-16 新建与整理 + */ +public class QcJudgeAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + long designId = request.getParameterLong("designId"); + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, designId); + if(order == null) + { + request.returnCloseDialog("订单不存在"); + return; + } + List list = ORM.get(ZTable.class).list(QcParameter.class, new Selector("flag", 1)); + + request.setAttribute("order", order); + request.setAttribute("list", list); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/QcOrderListAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/QcOrderListAction.java new file mode 100644 index 0000000..837e39d --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/QcOrderListAction.java @@ -0,0 +1,139 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action.order; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.manager.dbo.ZmrOperator; +import org.zhiqim.manager.dbo.ZmrOrg; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; +import com.zhiqim.yangcai.design.dbo.order.OrdProgressNote; +import com.zhiqim.yangcai.design.dbo.stat.PerformanceStatistics; +import com.zhiqim.yangcai.design.dbo.stat.RefundParameter; + +/** + * 质检订单列表 + * + * @version v1.0.0 @author liuhu 2019-1-16 新建与整理 + */ +public class QcOrderListAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + long orgId = request.getSessionUser(ZmrSessionUser.class).getSelectedOrgId(); + ZmrOrg org = ORM.get(ZTable.class).item(ZmrOrg.class, orgId); + + int page = request.getParameterInt("page", 1); + int pageSize = request.getContextAttributeInt("page.size", 15); + String designer = request.getParameter("designer"); + long designId = request.getParameterLong("designId"); + String startDate = request.getParameter("startDate", DateTimes.getPreviousDateString(7)); + String stopDate = request.getParameter("stopDate", DateTimes.getDateString()); + int qcFlag = request.getParameterInt("qcFlag"); + int orderStatus = request.getParameterInt("orderStatus"); + int draftType = request.getParameterInt("draftType"); + int day = DateTimes.compareDay(stopDate, startDate); + if (day > 31) + { + request.setResponseError("请勿将时间区间跨度选择为大于一个月"); + return; + } + // String beginDate = request.getParameter("beginDate", + // DateTimes.getPreviousDateStringByMonth(1)); + // String endDate = request.getParameter("endDate", DateTimes.getDateString()); + + Selector selector = new Selector(); + selector.addMaybe("designer", designer); + selector.addMaybe("designId", designId); + selector.addMaybe("status", orderStatus); + selector.addMaybe("draftType", draftType); + selector.addMaybeThenGE("createTime", Sqls.toTimestamp(startDate + " 00:00:00")); + selector.addMaybeThenLE("createTime", Sqls.toTimestamp(stopDate + " 23:59:59")); + + // selector.addMaybeThenGE("designBeginTime", Sqls.toTimestamp(beginDate + " 00:00:00")); + // selector.addMaybeThenLE("designBeginTime", Sqls.toTimestamp(endDate + " 23:59:59")); + + if (org.getOrgLevel() > 0) + { + selector.addMust("orgId", orgId); + } + selector.addMustNotEqual("qcFlag", 2); + selector.addMaybe("qcFlag", qcFlag); + selector.addOrderbyAsc("qcFlag"); + selector.addOrderbyDesc("designReceiveTime"); + PageResult pageResult = ORM.get(ZTable.class).page(DesignOrder.class, page, pageSize, selector); + pageResult.addConditionMap(request.getParameterMap()); + + List operatorList = org.getOrgLevel() > 0 ? ORM.get(ZTable.class).list(ZmrOperator.class, new Selector("orgId", orgId)) : ORM.get( + ZTable.class).list(ZmrOperator.class); + + // 查询退款率超标设计师 + List designerList = new ArrayList(); + int currentDay = DateTimes.getCurrentDay(); + String date = currentDay < 10 ? DateTimes.getPreviousDateStringByMonth(2) : DateTimes.getPreviousDateStringByMonth(1); + date = date.substring(0, date.lastIndexOf("-")); + + RefundParameter parameter = ORM.get(ZTable.class).item(RefundParameter.class); + + Selector select = new Selector(); + select.addMust("statDate", date); + select.addMustThenG("refundRate", parameter.getStandardRefundRate()); + List list = ORM.get(ZTable.class).list(PerformanceStatistics.class, select); + for (PerformanceStatistics stat : list) + { + designerList.add(stat.getDesigner()); + } + + // 进度备注 + Map progressNoteMap = new HashMap(); + for (DesignOrder order : pageResult.list()) + { + if (Validates.isEmptyBlank(order.getDesigner())) + { + continue; + } + + // 进度备注 + OrdProgressNote note = ORM.get(ZTable.class) + .item(OrdProgressNote.class, new Selector("designId", order.getDesignId()).addOrderbyDesc("createTime")); + progressNoteMap.put(order.getDesignId(), note == null ? "" : note.getOrdProgressNote()); + } + + request.setAttribute("progressNoteMap", progressNoteMap); + + request.setAttribute("draftType", draftType); + request.setAttribute("orderStatus", orderStatus); + request.setAttribute("qcFlag", qcFlag); + request.setAttribute("designerList", designerList); + request.setAttribute("operatorList", operatorList); + request.setAttribute("startDate", startDate); + request.setAttribute("stopDate", stopDate); + request.setAttribute("pageResult", pageResult); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/QcPersonalAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/QcPersonalAction.java new file mode 100644 index 0000000..0feb0fc --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/QcPersonalAction.java @@ -0,0 +1,143 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.action.order; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.paging.PageBuilder; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.constant.PerformanceStatConstants; +import com.zhiqim.yangcai.design.dao.StatDao; +import com.zhiqim.yangcai.design.dbo.qc.QcApplyScore; +import com.zhiqim.yangcai.design.dbo.qc.QcRecord; + +/** + * 我的质检 + * + * @version v1.0.0 @author liuhu 2019-2-20 新建与整理 + */ +public class QcPersonalAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page", 1); + int pageSize = 8; + + String operatorCode = request.getSessionName(); + String year = request.getParameter("year", DateTimes.getCurrentYear()+""); + String month = request.getParameter("month", DateTimes.getCurrentMonth() +""); + String dateTime = year + "-" + month; + int day = DateTimes.getMonthDays(year + month); + + Selector selector = new Selector(); + selector.addMustThenGE("qcTime", Sqls.toTimestamp(dateTime+ "-01" + " 00:00:00")); + selector.addMustThenLE("qcTime", Sqls.toTimestamp(dateTime + "-" + day + " 23:59:59")); + selector.addMust("designer", operatorCode); + selector.addMust("qcFlag", 2); + + List list = ORM.get(ZTable.class).list(QcRecord.class, selector); + + Map map = new HashMap(); + for (QcRecord record : list) + { + String reason = record.getReason(); + if (!map.containsKey(reason)) + map.put(reason, 1); + + else + map.put(reason, map.get(reason) + 1); + } + + PageResult pageResult = PageBuilder.pageResult(page, pageSize, list); + pageResult.addConditionMap(request.getParameterMap()); + + Selector select = new Selector(); + select.addMustThenGE("applyTime", Sqls.toTimestamp(dateTime+ "-01" + " 00:00:00")); + select.addMustThenLE("applyTime", Sqls.toTimestamp(dateTime + "-" + day + " 23:59:59")); + select.addMust("designer", operatorCode); + + PageResult result = ORM.get(ZTable.class).page(QcApplyScore.class, page, pageSize, select); + + //计算当月质检分数 + double score = PerformanceStatConstants.QC_SCORE; //质检分数 + double punishScore = 0; //质检扣分 + double applyScore = 0; //质检加分 + + Selector selector2 = new Selector(); + selector2.addMustThenGE("qcTime", Sqls.toTimestamp(dateTime + "-01" + " 00:00:00")); + selector2.addMustThenLE("qcTime", Sqls.toTimestamp(dateTime + "-" + day + " 23:59:59")); + selector2.addMust("qcFlag", 2); + selector2.addMust("designer", operatorCode); + List qcList = ORM.get(ZTable.class).list(QcRecord.class, selector); + List repeatList = new ArrayList(); + + for (QcRecord record : qcList) + { + String designer = record.getDesigner(); + String reason = record.getReason(); + String date = Sqls.toDateString(record.getQcTime()); + + boolean flag = true; + for (QcRecord qcRecord : repeatList) + {//单个设计师一天内 多条订单违反同一条违规内容 只统计一次违规扣分 + String designer2 = qcRecord.getDesigner(); + String reason2 = qcRecord.getReason(); + String date2 = Sqls.toDateString(qcRecord.getQcTime()); + if (designer.equals(designer2) && reason.equals(reason2) && date.equals(date2)) + { + flag = false; + break; + } + } + + if (flag) + punishScore += record.getScore(); + } + + Selector selector3 = new Selector(); + selector3.addMustThenGE("applyTime", Sqls.toTimestamp(dateTime + "-01" + " 00:00:00")); + selector3.addMustThenLE("applyTime", Sqls.toTimestamp(dateTime + "-" + day + " 23:59:59")); + selector3.addMust("applyFlag", 1); + selector3.addMust("designer", operatorCode); + List applyList = ORM.get(ZTable.class).list(QcApplyScore.class, selector3); + + for (QcApplyScore apply : applyList) + { + applyScore += apply.getScore(); + } + + List yearList = StatDao.yearList(2018, DateTimes.getCurrentYear()); + + request.setAttribute("score", score + applyScore - punishScore); + request.setAttribute("result", result); + request.setAttribute("designer", operatorCode); + request.setAttribute("year", year); + request.setAttribute("yearList", yearList); + request.setAttribute("month", month); + request.setAttribute("pageResult", pageResult); + request.setAttribute("map", map); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/QcViolationsDetailAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/QcViolationsDetailAction.java new file mode 100644 index 0000000..af3e1e1 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/QcViolationsDetailAction.java @@ -0,0 +1,47 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.action.order; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.constants.FileTypeConstants; +import com.zhiqim.yangcai.design.dbo.order.DesignAtta; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; +import com.zhiqim.yangcai.design.dbo.qc.QcRecord; + +/** + * 质检违规详情 + * + * @version v1.0.0 @author liuhu 2019-1-25 新建与整理 + */ +public class QcViolationsDetailAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + long designId = request.getParameterLong("designId"); + + QcRecord record = ORM.get(ZTable.class).item(QcRecord.class, designId); + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, designId); + DesignAtta atta = ORM.get(ZTable.class).item(DesignAtta.class, new Selector("designId", designId).addMust("attaModul", FileTypeConstants.FILE_QC_JUDGE.value())); + + request.setAttribute("record", record); + request.setAttribute("order", order); + request.setAttribute("atta", atta); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/QcViolationsListAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/QcViolationsListAction.java new file mode 100644 index 0000000..7af9df0 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/QcViolationsListAction.java @@ -0,0 +1,85 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action.order; + +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.manager.dbo.ZmrOperator; +import org.zhiqim.manager.dbo.ZmrOrg; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; + +/** + * 质检违规订单列表类 + * + * @version v1.0.0 @author liuhu 2019-1-18 新建与整理 + */ +public class QcViolationsListAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + long orgId = request.getSessionUser(ZmrSessionUser.class).getSelectedOrgId(); + ZmrOrg org = ORM.get(ZTable.class).item(ZmrOrg.class, orgId); + + int page = request.getParameterInt("page", 1); + int pageSize = request.getContextAttributeInt("page.size", 15); + String designer = request.getParameter("designer"); + String beginDate = request.getParameter("beginDate", DateTimes.getPreviousDateString(30)); + String endDate = request.getParameter("endDate", DateTimes.getDateString()); + int day = DateTimes.compareDay(endDate, beginDate); + if (day > 31) + { + request.setResponseError("请勿将时间区间跨度选择为大于一个月"); + return; + } + long designId = request.getParameterLong("designId"); + int status = request.getParameterInt("status"); + int draftType = request.getParameterInt("draftType"); + + Selector selector = new Selector(); + selector.addMaybe("designer", designer); + selector.addMust("qcFlag", 2); + selector.addMaybe("designId", designId); + selector.addMaybe("status", status); + selector.addMaybe("draftType", draftType); + selector.addMaybeThenGE("createTime", Sqls.toTimestamp(beginDate + " 00:00:00")); + selector.addMaybeThenLE("createTime", Sqls.toTimestamp(endDate + " 23:59:59")); + if (org.getOrgLevel() > 0) + { + selector.addMust("orgId", orgId); + } + + PageResult pageResult = ORM.get(ZTable.class).page(DesignOrder.class, page, pageSize, selector); + pageResult.addConditionMap(request.getParameterMap()); + + List operatorList = org.getOrgLevel() > 0 ? ORM.get(ZTable.class).list(ZmrOperator.class, new Selector("orgId", orgId)) : ORM.get( + ZTable.class).list(ZmrOperator.class); + + request.setAttribute("operatorList", operatorList); + request.setAttribute("beginDate", beginDate); + request.setAttribute("endDate", endDate); + request.setAttribute("designer", designer); + request.setAttribute("pageResult", pageResult); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/ReceiveOrderAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/ReceiveOrderAction.java new file mode 100644 index 0000000..4c3e867 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/ReceiveOrderAction.java @@ -0,0 +1,94 @@ +package com.zhiqim.yangcai.design.action.order; + +import java.sql.Timestamp; +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.constants.DraftConstants; +import com.zhiqim.yangcai.design.constants.StatusConstants; +import com.zhiqim.yangcai.design.dao.DesignTypeDao; +import com.zhiqim.yangcai.design.dbo.design.DesignType; +import com.zhiqim.yangcai.design.dbo.design.DesignerGroupDispatch; +import com.zhiqim.yangcai.design.dbo.order.DesignSelfView; +import com.zhiqim.yangcai.design.dbo.score.ScoreDesignerRecord; +import com.zhiqim.yangcai.design.model.teamManagement; + +/** + * 抢单大厅列表 + * + * @version v1.0.0 @author hc 2021.6.1 + */ +public class ReceiveOrderAction implements Action +{ + @Override + public void execute(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page", 1); + int pageSize = request.getParameterInt("pageSize", 12); + + Timestamp timestamp = Sqls.toTimestamp(DateTimes.getPreviousDateTimeStringBySecond(300)); + Selector selector = new Selector(); + selector.addMaybe("typeId", request.getParameterLong("typeId")); + selector.addMust("status", StatusConstants.ORDER_10.value()); // 等待设计 + selector.addMustThenL("createTime", timestamp); + + // 印前组织只抢标准自来稿,反之需要过滤掉 + ZmrSessionUser sessionUser = request.getSessionUser(ZmrSessionUser.class); + // 印前组织 + if (sessionUser.getSelectedOrgId() == 2018280240394L) + { + selector.addMust("draftType", DraftConstants.DRAFT_STANDARD.value()); + } + else + { + selector.addMustNotEqual("draftType", DraftConstants.DRAFT_STANDARD.value()); + } + + selector.addOr(new Selector("orgId", 0).addMustIsNull("orgId")); // 未派单给组织 + selector.addOrderbyAsc("createTime"); + + Selector selector3 = new Selector(); + selector3.addMustLike("teamSecret", sessionUser.getSessionName()); + selector3.addMaybe("isEnabled", true); + List teamManagementList = ORM.get(ZTable.class).list(teamManagement.class, selector3); + if (teamManagementList.size() > 0) + { + teamManagement team = teamManagementList.get(0); + selector.addMustIn("shopNick", team.getMerchantName().split(",")); + } + + List list = ORM.get(ZTable.class).list(ScoreDesignerRecord.class, + new Selector().addMust("state", 1).addMustLike("operatorCode", sessionUser.getSessionName())); + if (list.size() > 0) + { + int cj = list.get(0).getScore(); + if (0 > cj) + { + selector.addMust("status", -1000); // 等待设计 + } + } + + PageResult pageResult = ORM.get(ZView.class).page(DesignSelfView.class, page, pageSize, selector); + + request.setAttribute("pageResult", pageResult); + + List typeList = DesignTypeDao.listAll(); + request.setAttribute("typeList", typeList); + String operatorCode = request.getSessionName(); + DesignerGroupDispatch designerGroupDispatch = ORM.get(ZTable.class).item(DesignerGroupDispatch.class, + new Selector().addMaybe("operatorCode", operatorCode)); + + request.setAttribute("isShowCost", designerGroupDispatch.getIsShowCost()); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/SelectRefundOrderImgAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/SelectRefundOrderImgAction.java new file mode 100644 index 0000000..3f51bba --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/SelectRefundOrderImgAction.java @@ -0,0 +1,59 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action.order; + +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.annotation.AnIntercept; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.constants.FileTypeConstants; +import com.zhiqim.yangcai.design.dbo.order.DesignAtta; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; + +/** + * 单个退款订单查询 + * + * @version v1.0.0 @author 高佳新 2019-05-05 新建与整理 + */ +@AnAlias("SelectRefundOrderImgAction") +@AnIntercept("chkZmrLogin") +public class SelectRefundOrderImgAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + long designId = request.getParameterLong("designId"); + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, designId); + if (order == null) + { + request.setResponseError("订单不存在"); + return; + } + request.setAttribute("order", order); + List attaList = ORM.get(ZTable.class).list(DesignAtta.class, + new Selector("designId", designId).addMust("attaModul", FileTypeConstants.FILE_REFUND.value())); + if (attaList.size() <= 0) + { + request.setResponseError("该订单未上传截图"); + return; + } + request.setAttribute("attaList", attaList); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/TimelinessOrgStatAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/TimelinessOrgStatAction.java new file mode 100644 index 0000000..667985b --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/TimelinessOrgStatAction.java @@ -0,0 +1,204 @@ +/** + * 扬彩印刷设计 + * 文件名 :TimelinessOrgStatAction.java + * 创建人 :高佳新 + * 创建时间:2019-7-11 + */ + +package com.zhiqim.yangcai.design.action.order; + +import java.math.BigDecimal; +import java.math.RoundingMode; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.manager.dbo.ZmrOrg; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.constants.StatusConstants; +import com.zhiqim.yangcai.design.dao.DesignTypeDao; +import com.zhiqim.yangcai.design.dbo.design.DesignType; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; +import com.zhiqim.yangcai.design.model.TimelinessOrgStatModel; + +/** + * + * 组织初稿时效统计 + * + * @version 1.0 @author gjx 2019-7-11 新建与整理 + */ +public class TimelinessOrgStatAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + String startDate = request.getParameter("startDate", DateTimes.getDateString()); + String endDate = request.getParameter("endDate", DateTimes.getDateString()); + int day = DateTimes.compareDay(endDate, startDate); + if (day > 31) + { + request.setResponseError("请勿将时间区间跨度选择大于一个月"); + return; + } + Long typeId = request.getParameterLong("typeId"); + + Selector selector = new Selector(); + selector.addMustThenGE("createTime", Sqls.toTimestamp(startDate + " 00:00:00")); + selector.addMustThenLE("createTime", Sqls.toTimestamp(endDate + " 23:59:59")); + // selector.addMustNotEqual("status", StatusConstants.ORDER_F100.value()); + selector.addMustNotIn("status", StatusConstants.ORDER_F100.value(), StatusConstants.ORDER_F110.value()); + selector.addMaybe("typeId", typeId); + + List designOrderList = ORM.get(ZTable.class).list(DesignOrder.class, selector); + + Map designTypeMap = new HashMap<>(); // 产品类型时效信息Map + Map proTypeMap = new HashMap<>(); // 产品类型Map + Map orgMap = new HashMap<>(); // 组织map + Map orgTimelinessMap = new HashMap(); + List designTypeList = DesignTypeDao.listAll(); + for (DesignType designType : designTypeList) + { + designTypeMap.put(designType.getTypeName(), designType.getEffectiveTime()); + proTypeMap.put(designType.getTypeId(), designType.getTypeName()); + } + List zmrOrgList = ORM.get(ZTable.class).list(ZmrOrg.class); // 得到所有组织id与名称 + if (zmrOrgList.size() == 0) + { + request.setResponseError("系统组织异常"); + return; + } + for (ZmrOrg zmrOrg : zmrOrgList) + { + orgMap.put(zmrOrg.getOrgId(), zmrOrg.getOrgName()); + } + SimpleDateFormat simple = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + + int firstDraftSum = 0;// 总初稿量 + int timelinessSum = 0;// 初稿时效内订单量 + int sleepDraftSum = 0;// 等待初稿量 + int sleepTimelinessSum = 0;// 等待初稿时效内订单量 + for (DesignOrder designOrder : designOrderList) + { + Integer minute = designTypeMap.get(proTypeMap.get(designOrder.getTypeId())); // 获取订单产品对应时效(分钟) + String orgName = orgMap.get(designOrder.getOrgId()); // 获取组织名称 + if (orgName == null) + { + orgName = "印前改稿组织"; + } + if (!orgTimelinessMap.containsKey(orgName)) + { + orgTimelinessMap.put(orgName, new TimelinessOrgStatModel(orgName));// 组织名称 + } + TimelinessOrgStatModel orgModel = orgTimelinessMap.get(orgName); + orgModel.setOrgOrderSum(orgModel.getOrgOrderSum() + 1); // 组织总单量 + if (designOrder.getStatus() >= StatusConstants.ORDER_50.value()) + { + orgModel.setOrgFirstDraftSum(orgModel.getOrgFirstDraftSum() + 1); // 组织已初稿量 + firstDraftSum++; + if (designOrder.getCreateTime() != null && minute != null) + { + String createTime = DateTimes.getNextDateTimeStringBySecond(simple.format(designOrder.getCreateTime()), minute * 60); + Date nowCreateTime = simple.parse(createTime); + if (designOrder.getDesignDraftTime() != null) + { + String draftTime = simple.format(designOrder.getDesignDraftTime()); + Date draftDateTime = simple.parse(draftTime); + if (draftDateTime.getTime() <= nowCreateTime.getTime()) + {// 初稿时间小于等于订单创建时间+订单产品初稿时效时间则属于时效内订单 + timelinessSum++; + orgModel.setOrgTimelinessSum(orgModel.getOrgTimelinessSum() + 1); // 组织已初稿时效内订单 + } + else + { + orgModel.setOrgExceedTimelinessSum(orgModel.getOrgExceedTimelinessSum() + 1);// 组织已初稿已超时订单 + } + } + } + } + else + { + orgModel.setOrgSleepDraftSum(orgModel.getOrgSleepDraftSum() + 1); // 组织等待初稿量 + sleepDraftSum++; + if (designOrder.getCreateTime() != null && minute != null) + { + String createTime = DateTimes.getNextDateTimeStringBySecond(simple.format(designOrder.getCreateTime()), minute * 60); + Date nowCreateTime = simple.parse(createTime); + String currentDate = simple.format(new Date()); + Date currentDateTime = simple.parse(currentDate); + if (currentDateTime.getTime() <= nowCreateTime.getTime()) + {// 当前时间小于等于等于订单创建时间+订单产品初稿时效时间则属于时效内订单 + sleepTimelinessSum++; + orgModel.setOrgSleepTimelinessSum(orgModel.getOrgSleepTimelinessSum() + 1);// 组织等待初稿时效内订单 + } + else + { + orgModel.setOrgExceedSleepTimelinessSum(orgModel.getOrgExceedSleepTimelinessSum() + 1);// 组织等待初稿已超时订单 + } + } + } + } + + List orgStatModelList = new ArrayList<>(orgTimelinessMap.values()); + BigDecimal bigDecimal = null; + for (TimelinessOrgStatModel timelinessOrgStatModel : orgStatModelList) + { + if (timelinessOrgStatModel.getOrgOrderSum() > 0) + { + int exceedSum = timelinessOrgStatModel.getOrgExceedTimelinessSum() + timelinessOrgStatModel.getOrgExceedSleepTimelinessSum(); + bigDecimal = new BigDecimal(exceedSum * 100 + ""); + double orgExceedPrent = bigDecimal.divide(new BigDecimal(timelinessOrgStatModel.getOrgOrderSum() + ""), 2, RoundingMode.HALF_UP).doubleValue(); + timelinessOrgStatModel.setOrgExceedPrent(orgExceedPrent); + } + + } + List sortList = null; + for (int g = 0; g < orgStatModelList.size() - 1; g++) + { // 冒泡按指定条件降序 + for (int d = 0; d < orgStatModelList.size() - 1 - g; d++) + { + if (orgStatModelList.get(d).getOrgOrderSum() < orgStatModelList.get(d + 1).getOrgOrderSum()) + { + sortList = new ArrayList<>(); + sortList.add(0, orgStatModelList.get(d)); + orgStatModelList.set(d, orgStatModelList.get(d + 1)); + orgStatModelList.set(d + 1, sortList.get(0)); + } + } + } + int exceedSum = firstDraftSum - timelinessSum + sleepDraftSum - sleepTimelinessSum; + BigDecimal bigExceed = new BigDecimal(exceedSum * 100 + ""); + double prentSum = 0.0; + if (designOrderList.size() > 0) + { + prentSum = bigExceed.divide(new BigDecimal(designOrderList.size() + ""), 2, RoundingMode.HALF_UP).doubleValue(); + } + Map statMap = new HashMap<>();// 报表Map + statMap.put("超时", firstDraftSum - timelinessSum + sleepDraftSum - sleepTimelinessSum); + statMap.put("未超时", timelinessSum + sleepTimelinessSum); + + request.setAttribute("startDate", startDate); + request.setAttribute("endDate", endDate); + request.setAttribute("statMap", statMap); + request.setAttribute("orgStatModelList", orgStatModelList); + request.setAttribute("designTypeList", designTypeList); + request.setAttribute("designOrderSum", designOrderList.size());// 总订单量 + request.setAttribute("firstDraftSum", firstDraftSum);// 总初稿量 + request.setAttribute("timelinessSum", timelinessSum);// 初稿时效内订单量 + request.setAttribute("exceedTimelinessSum", firstDraftSum - timelinessSum);// 初稿已超时订单量 + request.setAttribute("sleepDraftSum", sleepDraftSum);// 等待初稿量 + request.setAttribute("sleepTimelinessSum", sleepTimelinessSum);// 等待初稿时效内订单量 + request.setAttribute("exceedSleepTimelinessSum", sleepDraftSum - sleepTimelinessSum);// 等待初稿已超时订单量 + request.setAttribute("prentSum", prentSum);// 等待初稿已超时订单量 + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/UploadDataAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/UploadDataAction.java new file mode 100644 index 0000000..4a590f2 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/UploadDataAction.java @@ -0,0 +1,92 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.action.order; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; + +/** + * 资料上传 + * + * @version v1.0.0 @author Deng 2017-9-14 新建与整理 + */ +public class UploadDataAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page", 1); + int pageSize = request.getContextAttributeInt("page.size", 15); + + String startDate = request.getParameter("startDate", DateTimes.getPreviousDateStringByMonth(1)); + String endDate = request.getParameter("endDate", DateTimes.getDateString()); + long designId = request.getParameterLong("designId"); + + Selector sel = new Selector(); + if (designId > 0) + sel.addOr(new Selector("designId", designId).addMust("outId", designId)); + + sel.addMaybe("designType", request.getParameterLong("designType")); + sel.addMaybeLike("buyerNick", request.getParameter("buyerNick")); + sel.addMaybeLike("tids", request.getParameter("tid")); + sel.addMaybe("draftType", request.getParameterInt("draftType")); + sel.addMustThenGE("createTime", Sqls.toTimestamp(startDate + " 00:00:00")); + sel.addMustThenLE("createTime", Sqls.toTimestamp(endDate + " 23:59:59")); + + String otherText = request.getParameter("otherInfo",""); + if(!Validates.isEmptyBlank(otherText)) + { + sel.addOr(new Selector() + .addMaybeLike("userQq", otherText) + .addMaybeLike("receiverName", otherText) + .addMaybeLike("receiverMobile", otherText) + .addMaybeLike("userMobile", otherText)); + } + + int isOnlyDesign = request.getParameterInt("isOnlyDesign"); + if(isOnlyDesign != -1) + sel.addMust("isOnlyDesign", isOnlyDesign == 1 ? true : false); + + int havaIndustry = request.getParameterInt("havaIndustry"); + if(havaIndustry == 0) + sel.addMaybeIsNotNull("industryId"); + if(havaIndustry == 1) + sel.addMaybe("industryId", 0); + +// //根据组织显示 +// ZmrOrg org = ORM.get(ZTable.class).item(ZmrOrg.class, new Selector("orgLevel", 0)); +// ZmrSessionUser sessionUser = request.getSessionUser(ZmrSessionUser.class); +// long orgId = sessionUser.getOperator().getOrgId(); +// if (org.getOrgId() != orgId) +// sel.addMust("orgId", orgId); + + sel.addOrderbyDesc("createTime"); + sel.addOrderbyAsc("buyerNick"); + + PageResult pageResult = ORM.get(ZTable.class).page(DesignOrder.class, page, pageSize, sel); + pageResult.addConditionMap(request.getParameterMap()); + request.setAttribute("pageResult", pageResult); + request.setAttribute("startDate", startDate); + request.setAttribute("endDate", endDate); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/WaiveOrderAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/WaiveOrderAction.java new file mode 100644 index 0000000..7419c5d --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/WaiveOrderAction.java @@ -0,0 +1,118 @@ +package com.zhiqim.yangcai.design.action.order; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.annotation.AnIntercept; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.aliyun.oss.common.utils.StringUtils; +import com.zhiqim.yangcai.cache.DesignTypeCache; +import com.zhiqim.yangcai.design.constant.ScoreConstants; +import com.zhiqim.yangcai.design.constants.EventConstants; +import com.zhiqim.yangcai.design.constants.StatusConstants; +import com.zhiqim.yangcai.design.dao.DispatchDao; +import com.zhiqim.yangcai.design.dao.OrderLogDao; +import com.zhiqim.yangcai.design.dao.ScoreDesignerRecordDao; +import com.zhiqim.yangcai.design.dbo.design.DesignerGroupDispatch; +import com.zhiqim.yangcai.design.dbo.design.DesignerGroupView; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; +import com.zhiqim.yangcai.design.dbo.score.ScoreDesignerRecordDetail; +import com.zhiqim.yangcai.util.ErpClassService; +import com.zhiqim.yangcai.util.ErpClassService.statusEnum; + +/** + * + * [简要描述]:放弃订单
            + * [详细描述]:
            + * + * @version 1.0 @author hc 2021年6月3日 新建与整理 + */ +@AnAlias("WaiveOrderAction") +@AnIntercept("chkZmrLogin") +public class WaiveOrderAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + long designId = request.getParameterLong("designId"); + String operatorCode = request.getSessionName(); + DesignOrder result = ORM.get(ZTable.class).item(DesignOrder.class, new Selector().addMust("designId", designId)); + String typeName = Global.get(DesignTypeCache.class).getName(result.getTypeId()); + DesignerGroupView designerGroupView = ORM.get(ZView.class).item(DesignerGroupView.class, new Selector().addMaybe("operatorCode", operatorCode)); + + request.setAttribute("designId", designId); + request.setAttribute("typeName", typeName); + request.setAttribute("waiveNum", designerGroupView.getDesignerWaiveNum()); + + } + + /** + * + * [简要描述]:放弃订单
            + * [详细描述]:
            + * + * @author hc + * @param request + * @throws Exception + */ + public static void waiveOrder(HttpRequest request) throws Exception + { + long designId = request.getParameterLong("designId"); + String operatorCode = request.getSessionName(); + + DesignOrder item = ORM.get(ZTable.class).item(DesignOrder.class, new Selector().addMust("designId", designId)); + if (item == null) + { + request.setResponseError("此订单不存在,请联系管理员处理!"); + return; + } + if (item.getReceiveType() == 2) + { + request.setResponseError("该订单是指定订单不能放弃哦~"); + return; + } + DesignerGroupView designerGroupView = ORM.get(ZView.class).item(DesignerGroupView.class, new Selector().addMust("operatorCode", operatorCode)); + if (designerGroupView.getDesignerWaiveNum() == 0) + { + request.setResponseError("您的放弃订单次数已使用完!"); + return; + } + + String logItem = "设计师放弃订单"; + Updater updater = new Updater(); + updater.addMust("designId", designId); + updater.addField("designer", ""); + updater.addField("status", StatusConstants.ORDER_10.value()); + updater.addField("orgId", 0); + ORM.get(ZTable.class).update(DesignOrder.class, updater); + + if (item != null && !StringUtils.isNullOrEmpty(item.getTids())) + { + new ErpClassService(item.getTids(), item.getDesigner(), statusEnum.TO_BE_DESIGNED.getCode()); + } + DispatchDao.doUpdateDesignerOrderNum(operatorCode); + + Updater updaterWaiverNum = new Updater(); + updaterWaiverNum.addMust("operatorCode", operatorCode); + updaterWaiverNum.addField("waiveNum", designerGroupView.getDesignerWaiveNum() - 1); + ORM.get(ZTable.class).update(DesignerGroupDispatch.class, updaterWaiverNum); + + ScoreDesignerRecordDetail scoreDesignerRecordDetail = new ScoreDesignerRecordDetail(); + scoreDesignerRecordDetail.setScoreType(Long.valueOf(ScoreConstants.SCORE_TYPE_108.value())); + scoreDesignerRecordDetail.setOperatorCode(operatorCode); + scoreDesignerRecordDetail.setCreateOperator(request.getSessionUser(ZmrSessionUser.class).getOperatorCode()); + scoreDesignerRecordDetail.setRemark("设计师放弃订单"); + scoreDesignerRecordDetail.setScore(-10); + ScoreDesignerRecordDao.addScoreDesignerRecordDetail(scoreDesignerRecordDetail); + + OrderLogDao.saveOrderOperateLog(designId, request.getSessionName(), logItem, EventConstants.ORDER_38.value()); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/WangwangOrderAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/WangwangOrderAction.java new file mode 100644 index 0000000..a63d8e9 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/order/WangwangOrderAction.java @@ -0,0 +1,54 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.action.order; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; +import com.zhiqim.yangcai.design.dbo.order.OrdProgressNote; + +public class WangwangOrderAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + String buyerNick = request.getParameter("buyerNick"); + if (Validates.isEmptyBlank(buyerNick)) + { + request.returnHistory("旺旺号不能为空,请重新选择"); + return; + } + + List orderList = ORM.get(ZTable.class).list(DesignOrder.class, new Selector("buyerNick", buyerNick).addOrderbyDesc("createTime")); + request.setAttribute("orderList", orderList); + //获取进度备注 + Map progressNoteMap = new HashMap(); + for (DesignOrder order : orderList) + { + //进度备注 + OrdProgressNote note = ORM.get(ZTable.class).item(OrdProgressNote.class, new Selector("designId", order.getDesignId()).addOrderbyDesc("createTime")); + progressNoteMap.put(order.getDesignId(), note == null ? "" : note.getOrdProgressNote()); + } + request.setAttribute("progressNoteMap", progressNoteMap); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/plugin/LoginAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/plugin/LoginAction.java new file mode 100644 index 0000000..494260f --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/plugin/LoginAction.java @@ -0,0 +1,66 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.action.plugin; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.httpd.validate.ones.IsLen; +import org.zhiqim.httpd.validate.ones.IsNumericLen; +import org.zhiqim.kernel.util.Strings; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.manager.ZmrBootstrap; +import org.zhiqim.manager.ZmrPassworder; +import org.zhiqim.manager.dao.ZmrParamDao; + +/** + * cdr插件登录 + * @version v1.0.0 @author zhouwenbin 2018-5-5 新建与整理 + */ +public class LoginAction implements Action +{ + public void execute(HttpRequest request) throws Exception + { + request.setResponsePrivateCache(); + + request.addValidate(new IsLen("operatorCode", "请输入正确的帐号", 2, 32)); + request.addValidate(new IsLen("operatorPass", "请输入正确的密码", 6, 90)); + + boolean hasVerificationCode = ZmrParamDao.hasVerificationCode(request.getContext()); + boolean hasRememberCode = ZmrParamDao.hasRememberCode(request.getContext()); + boolean hasRememberPass = ZmrParamDao.hasRememberPass(request.getContext()); + if(hasVerificationCode) + { + request.addValidate(new IsNumericLen("verificationCode", "验证码必须是4位数字", 4, 4)); + } + + request.setAttribute("hasRememberCode", hasRememberCode); + request.setAttribute("hasRememberPass", hasRememberPass); + request.setAttribute("hasVerificationCode", hasVerificationCode); + + if(hasRememberCode) + {//记住用户名 + String operatorCode = request.getCookie("operatorCode"); + request.setAttribute("operatorCode", operatorCode); + + if (hasRememberPass) + {//记住密码 + String operatorPass = request.getCookie("operatorPass"); + if (!Validates.isEmptyBlank(operatorPass)) + { + ZmrPassworder passworder = request.getContextAttribute(ZmrBootstrap.class).getPassworder(); + int len = passworder.secretLen(operatorPass); + request.setAttribute("operatorPass", Strings.prefixLen("", len, '●')); + } + } + } + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/question/ArticleAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/question/ArticleAction.java new file mode 100644 index 0000000..d1e5ce3 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/question/ArticleAction.java @@ -0,0 +1,156 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.action.question; + +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.extend.StdSwitchAction; +import org.zhiqim.httpd.validate.ones.IsLen; +import org.zhiqim.httpd.validate.onex.IsInteger; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.design.dbo.YqArticle; +import com.zhiqim.yangcai.design.dbo.YqArticleEx; +import com.zhiqim.yangcai.design.dbo.YqCategory; + +/** + * 文章详情 + * + * @version v1.0.0 @author huangsufang 2017-9-20 新建与整理 + */ +public class ArticleAction extends StdSwitchAction +{ + @Override + protected void validateId(HttpRequest request) + { + request.addValidate(new IsInteger("articleId", "请选择一个选项")); + } + + @Override + protected void validateForm(HttpRequest request) + { + // request.addValidate(new IsSelect("categoryId", "二级分类为空,请先添加")); + request.addValidate(new IsLen("articleTitle", "标题不能为空且不能超过32个字符", 1, 32)); + request.addValidate(new IsLen("articleContent", "内容不能为空且不能超过25000个字符", 1, 25000)); + } + + @Override + protected void list(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page", 1); + int pageSize = request.getContextAttributeInt("page.size", 10); + + Selector selector = new Selector("categoryId,categoryName,articleId,articleTitle,articleStatus,articleTime"); + selector.addOrderbyDesc("articleTime"); + selector.addMaybeLike("articleTitle", request.getParameter("articleKey")); + + PageResult articlePage = ORM.get(ZView.class).page(YqArticleEx.class, page, pageSize, selector); + articlePage.addConditionMap(request.getParameterMap()); + + request.setAttribute("articlePage", articlePage); + } + + @Override + protected void add(HttpRequest request) throws Exception + { + Selector selector = new Selector(); + selector.addMustNotEqual("categoryLevel", 0); + selector.addMustNotEqual("categoryLevel", 1); + + List categoryList = ORM.get(ZTable.class).list(YqCategory.class, selector); + if (categoryList.size() == 0) + { + request.returnHistory("二级分类为空,请先添加"); + return; + } + + request.setAttribute("categoryList", categoryList); + } + + @Override + protected void modify(HttpRequest request) throws Exception + { + Selector selector = new Selector(); + selector.addMustNotEqual("categoryLevel", 0); + selector.addMustNotEqual("categoryLevel", 1); + + List categoryList = ORM.get(ZTable.class).list(YqCategory.class, selector); + request.setAttribute("categoryList", categoryList); + + long articleId = request.getParameterLong("articleId"); + YqArticle article = ORM.get(ZTable.class).item(YqArticle.class, articleId); + if (article == null) + { + request.returnHistory("该文章不存在,请重新选择!"); + return; + } + + request.setAttribute("article", article); + } + + @Override + protected void insert(HttpRequest request) throws Exception + { + long categoryId = request.getParameterLong("categoryId"); + String articleTitle = request.getParameter("articleTitle"); + String articleContent = request.getParameterNoFileterOnCNT("articleContent"); + int articleStatus = request.getParameterInt("articleStatus"); + + // 插入到数据库 + YqArticle article = new YqArticle(); + article.setArticleId(Ids.longId()); + article.setArticleTitle(articleTitle); + article.setArticleContent(articleContent); + article.setCategoryId(categoryId); + article.setArticleTime(Sqls.toTimestamp(DateTimes.getDateTimeString())); + article.setArticleStatus(articleStatus); + + ORM.get(ZTable.class).insert(article); + } + + @Override + protected void update(HttpRequest request) throws Exception + { + long articleId = request.getParameterLong("articleId"); + long categoryId = request.getParameterLong("categoryId"); + String articleTitle = request.getParameter("articleTitle"); + String articleContent = request.getParameterNoFileterOnCNT("articleContent"); + int articleStatus = request.getParameterInt("articleStatus"); + + Updater updater = new Updater(); + updater.addMust("articleId", articleId); + updater.addField("articleTitle", articleTitle); + updater.addField("articleContent", articleContent); + updater.addField("categoryId", categoryId); + updater.addField("articleStatus", articleStatus); + updater.addField("articleTime", Sqls.nowTimestamp()); + + ORM.get(ZTable.class).update(YqArticle.class, updater); + } + + @Override + protected void delete(HttpRequest request) throws Exception + { + long articleId = request.getParameterLong("articleId"); + + ORM.get(ZTable.class).delete(YqArticle.class, articleId); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/question/CategoryAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/question/CategoryAction.java new file mode 100644 index 0000000..93f4a38 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/question/CategoryAction.java @@ -0,0 +1,208 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.action.question; + +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.extend.StdSwitchAction; +import org.zhiqim.httpd.validate.ones.IsLen; +import org.zhiqim.httpd.validate.onex.IsInteger; +import org.zhiqim.kernel.tree.Tree; +import org.zhiqim.kernel.tree.TreeBuilder; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.design.dbo.YqArticle; +import com.zhiqim.yangcai.design.dbo.YqCategory; + +/** + * 文章分类 + * + * @version v1.0.0 @author huangsufang 2017-9-20 新建与整理 + */ +public class CategoryAction extends StdSwitchAction +{ + @Override + protected void validateId(HttpRequest request) + { + request.addValidate(new IsInteger("categoryId", "请选择一个选项")); + } + + @Override + protected void validateForm(HttpRequest request) + { + request.addValidate(new IsLen("categoryName", "分类名称为空且不能超过32个字符", 1, 32)); + request.addValidate(new IsInteger("categorySeq", "分类排序编号不能为空")); + } + + @Override + protected void list(HttpRequest request) throws Exception + { + if (ORM.get(ZTable.class).count(YqCategory.class) == 0) + { + YqCategory firstCategory = new YqCategory(); + firstCategory.setParentId(0); + firstCategory.setCategoryId(1000000000000000L); + firstCategory.setCategoryName("扬彩知识库"); + firstCategory.setCategoryLevel(0); + firstCategory.setCategoryStatus(0); + firstCategory.setCategorySeq(0); + + ORM.get(ZTable.class).insert(firstCategory); + } + + List list = ORM.get(ZTable.class).list(YqCategory.class, new Selector().addOrderbyAsc("categoryLevel,categorySeq,categoryId")); + Tree tree = TreeBuilder.newTree(list, "parentId", "categoryId"); + + request.setAttribute("tree", tree); + request.setAttribute("size", getTreeSize(tree)); + } + + public int getTreeSize(Tree tree) + { + int size = 1; + for (Tree tre : tree.children()) + { + size += getTreeSize(tre); + } + return size; + } + + @Override + protected void add(HttpRequest request) throws Exception + { + Selector selector = new Selector(); + selector.addMust("parentId", 0); + List categoryList = ORM.get(ZTable.class).list(YqCategory.class, selector); + + long categoryId = request.getParameterLong("categoryId"); + YqCategory category = ORM.get(ZTable.class).item(YqCategory.class, categoryId); + if (category == null) + { + request.returnHistory("该分类不存在,请重新选择!"); + return; + } + if (category.getCategoryLevel() != 0) + { + request.returnHistory("最多添加1级分类!"); + return; + } + + request.setAttribute("categoryList", categoryList); + request.setAttribute("category", category); + } + + @Override + protected void modify(HttpRequest request) throws Exception + { + Selector selector = new Selector(); + selector.addMust("parentId", 0); + + List categoryList = ORM.get(ZTable.class).list(YqCategory.class, selector); + + long categoryId = request.getParameterLong("categoryId"); + if (categoryId == 1000000000000000L) + { + request.returnHistory("该分类为根分类,不能修改!"); + return; + } + YqCategory category = ORM.get(ZTable.class).item(YqCategory.class, categoryId); + if (category == null) + { + request.returnHistory("该分类不存在,请重新选择!"); + return; + } + + YqCategory parent = ORM.get(ZTable.class).item(YqCategory.class, category.getParentId()); + + Selector selector2 = new Selector(); + selector2.addMust("categoryId", category.getCategoryId()); + + List articleList = ORM.get(ZTable.class).list(YqArticle.class, selector2); + + request.setAttribute("categoryList", categoryList); + request.setAttribute("category", category); + request.setAttribute("parent", parent); + request.setAttribute("articleList", articleList); + } + + @Override + protected void insert(HttpRequest request) throws Exception + { + long parentId = request.getParameterLong("parentId"); + String categoryName = request.getParameter("categoryName"); + // int categoryLevel = request.getParameterInt("parentLevel"); + // categoryLevel++; + int categoryStatus = request.getParameterInt("categoryStatus"); + int categorySeq = request.getParameterInt("categorySeq"); + + // 插入到数据库 + YqCategory category = new YqCategory(); + category.setParentId(parentId); + category.setCategoryId(Ids.longId()); + category.setCategoryName(categoryName); + category.setCategoryLevel(2); + category.setCategoryStatus(categoryStatus); + category.setCategorySeq(categorySeq); + + ORM.get(ZTable.class).insert(category); + } + + @Override + protected void update(HttpRequest request) throws Exception + { + long categoryId = request.getParameterLong("categoryId"); + String categoryName = request.getParameter("categoryName"); + int categoryStatus = request.getParameterInt("categoryStatus"); + int categorySeq = request.getParameterInt("categorySeq"); + + Updater updater = new Updater(); + updater.addMust("categoryId", categoryId); + updater.addField("categoryStatus", categoryStatus); + updater.addField("categoryName", categoryName); + updater.addField("categorySeq", categorySeq); + + ORM.get(ZTable.class).update(YqCategory.class, updater); + } + + @Override + protected void delete(HttpRequest request) throws Exception + { + long categoryId = request.getParameterLong("categoryId"); + if (categoryId == 1000000000000000L) + { + request.returnHistory("该分类为根分类,不能删除!"); + return; + } + // 判断分类下是否有子分类 + if (ORM.get(ZTable.class).count(YqCategory.class, new Selector().addMust("parentId", categoryId)) > 0) + { + request.returnHistory("该分类下存在子分类,请先删除"); + return; + } + + // //判断分类下是否有文章 + // if (ORM.get(ZTable.class).count(YqArticle.class, new Selector().addMust("categoryId", + // categoryId)) > 0) + // { + // request.returnHistory("该分类下存在文章,请先删除"); + // return; + // } + + ORM.get(ZTable.class).delete(YqCategory.class, categoryId); + ORM.get(ZTable.class).delete(YqArticle.class, new Selector().addMust("categoryId", categoryId)); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/question/QuestionAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/question/QuestionAction.java new file mode 100644 index 0000000..4e0367b --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/question/QuestionAction.java @@ -0,0 +1,167 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.action.question; + +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ORMException; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.design.dbo.YqArticle; +import com.zhiqim.yangcai.design.dbo.YqCategory; + +public class QuestionAction implements Action +{ + @Override + public void execute(HttpRequest request) throws Exception + { + Selector categorSelector = new Selector(); + categorSelector.addOrderbyDesc("categorySeq"); + categorSelector.addMust("categoryStatus", 0); + + List categoryList = ORM.get(ZTable.class).list(YqCategory.class, categorSelector); + List childrenList = new ArrayList(); + List parentList = new ArrayList(); + int categoryLength = categoryList.size(); + List selectedList = new ArrayList(); + for (int i = 0; i < categoryLength; i++) + { + selectedList.add(false); + } + + for (int i = 0; i < categoryLength; i++) + { + YqCategory category = categoryList.get(i); + int forNum = 0; + if (category.getParentId() != -1) + { + childrenList.add(category); + } + // 检测是不是有子分类 + for (int j = 0; j < categoryLength; j++) + { + if (category.getCategoryId() == categoryList.get(j).getParentId()) + { + continue; + } + forNum++; + } + if (forNum == categoryLength) + { + parentList.add(false); + } + else + { + parentList.add(true); + } + } + + // 文章列表 + Selector articleSelector = new Selector(); + articleSelector.addMust("articleStatus", 0); + List articleList = ORM.get(ZTable.class).list(YqArticle.class, 1, 10, articleSelector); + + // 读取当前分类id + long categoryId = request.getParameterLong("categoryId", 0); + int categoryIndex = getCategoryIndex(categoryList, categoryId); + if (categoryId != 0 && categoryIndex > 0) + { + // 标识已选中 + selectedList.set(categoryIndex, true); + // 获取当前分类下文章列表 + articleSelector.addMust("categoryId", categoryId); + articleSelector.addOrderbyDesc("articleTime"); + articleList = ORM.get(ZTable.class).list(YqArticle.class, articleSelector); + } + else + { + // 标识已选中 + // 获取当前分类下文章列表 + articleSelector.addOrderbyDesc("articleNumber"); + articleList = ORM.get(ZTable.class).list(YqArticle.class, 1, 20, articleSelector); + } + + // 读取当前文章id + long articleId = request.getParameterLong("articleId", 0); + if (articleId != 0) + { + Selector itemSelector = new Selector(); + itemSelector.addMust("articleId", articleId); + itemSelector.addOrderbyDesc("articleTime"); + YqArticle article = ORM.get(ZTable.class).item(YqArticle.class, itemSelector); + int articleNumber = article.getArticleNumber(); + articleNumber++; + + // 点击次数+1 + Updater updater = new Updater(); + updater.addMust("articleId", articleId); + updater.addField("articleNumber", articleNumber); + + ORM.get(ZTable.class).update(YqArticle.class, updater); + + String articleStr = "

            " + article.getArticleTitle() + "

            " + + "

            " + + article.getArticleTime().toString().substring(0, article.getArticleTime().toString().length() - 2) + "

            "; + request.setAttribute("articleStr", articleStr); + request.setAttribute("content", article.getArticleContent()); + } + request.setAttribute("categoryList", categoryList); + request.setAttribute("categoryId", categoryId); + request.setAttribute("parentList", parentList); + request.setAttribute("selectedList", selectedList); + request.setAttribute("childrenList", childrenList); + request.setAttribute("articleList", articleList); + } + + /** + * 获取分类在列表中的排序位置 + * + * @param list + * @param categoryId + * @return + * @throws ORMException + * @throws SQLException + */ + public static int getCategoryIndex(List list, long categoryId) throws ORMException, SQLException + { + int categoryLength = list.size(); + for (int i = 0; i < categoryLength; i++) + { + if (list.get(i).getCategoryId() == categoryId) + { + long targId = list.get(i).getParentId(); + if (targId != 0) + { + for (int j = 0; j < categoryLength; j++) + { + if (list.get(j).getCategoryId() == targId) + { + return j; + } + } + } + else + { + return i; + } + } + } + return -1; + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/question/SearchAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/question/SearchAction.java new file mode 100644 index 0000000..429bc9a --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/question/SearchAction.java @@ -0,0 +1,100 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.action.question; + +import java.util.ArrayList; +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.YqArticle; +import com.zhiqim.yangcai.design.dbo.YqCategory; + +public class SearchAction implements Action +{ + @Override + public void execute(HttpRequest request) throws Exception + { + // TODO Auto-generated method stub + // 获取分类列表 + Selector categorSelector = new Selector(); + categorSelector.addOrderbyDesc("categorySeq"); + categorSelector.addMust("categoryStatus", 0); + + List categoryList = ORM.get(ZTable.class).list(YqCategory.class, categorSelector); + List childrenList = new ArrayList(); + List isParent = new ArrayList(); + int categoryLength = categoryList.size(); + + for (int i = 0; i < categoryLength; i++) + { + YqCategory category = categoryList.get(i); + int forNum = 0; + if (category.getParentId() != -1) + { + childrenList.add(category); + } + // 检测是不是有子分类 + for (int j = 0; j < categoryLength; j++) + { + if (category.getCategoryId() == categoryList.get(j).getParentId()) + { + continue; + } + forNum++; + } + ; + if (forNum == categoryLength) + { + isParent.add(false); + } + else + { + isParent.add(true); + } + } + ; + + String keyword = request.getParameter("keyword", ""); + + Selector selector = new Selector(); + selector.addMaybeLike("articleTitle", keyword); + selector.addOrderbyDesc("articleId"); + selector.addMust("articleStatus", 0); + + List articleList = ORM.get(ZTable.class).list(YqArticle.class, selector); + List contentList = new ArrayList(); + for (YqArticle article : articleList) + { + String content = new String(article.getArticleContent()); + content = content.replaceAll("<[a-zA-Z\\/][^>]*>", "").replaceAll(" ", ""); + int subEnd = 100; + if (content.length() < 100) + { + subEnd = content.length(); + } + content = content.substring(0, subEnd); + contentList.add(content); + } + + request.setAttribute("categoryList", categoryList); + request.setAttribute("isParent", isParent); + request.setAttribute("childrenList", childrenList); + request.setAttribute("articleList", articleList); + request.setAttribute("contentList", contentList); + request.setAttribute("keyword", keyword); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/question/api/ArticleSearchForUccnAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/question/api/ArticleSearchForUccnAction.java new file mode 100644 index 0000000..8396ca8 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/question/api/ArticleSearchForUccnAction.java @@ -0,0 +1,61 @@ +/** + * 扬彩印刷设计 + * 文件名 :ArticleSearchForUccnAction.java + * 创建人 :gjx + * 创建时间:2021年5月20日 +*/ + +package com.zhiqim.yangcai.design.action.question.api; + +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.YqArticle; +import com.zhiqim.yangcai.util.CodeEnum; +import com.zhiqim.yangcai.util.ResponseData; + +public class ArticleSearchForUccnAction implements Action +{ + // 模糊查询文章 + @Override + public void execute(HttpRequest request) throws Exception + { + request.getResponse().setHeader("Access-Control-Allow-Origin", "*"); + request.getResponse().setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE"); + request.getResponse().setHeader("Access-Control-Max-Age", "3600"); + request.getResponse().setHeader("Access-Control-Allow-Headers", "x-requested-with"); + Selector yqArticleSelector = new Selector(); + String articleTitle = request.getParameter("articleTitle").toString(); + if (!articleTitle.equals("")) + { + yqArticleSelector.addMustLike("articleTitle", articleTitle); + } + try + { + yqArticleSelector.addMust("articleStatus", 0); + List YqArticleList = ORM.get(ZTable.class).list(YqArticle.class, yqArticleSelector); + if (YqArticleList.size() == 0 || null == YqArticleList) + { + Object res = ResponseData.out(CodeEnum.SUCCESS.getCode(), new int[0], "操作成功"); + request.getResponse().println(Jsons.toString(res)); + return; + } + Object res = ResponseData.out(CodeEnum.SUCCESS.getCode(), YqArticleList, "操作成功"); + request.getResponse().println(Jsons.toString(res)); + } + catch (Exception e) + { + Object res = ResponseData.out(CodeEnum.ERROR.getCode(), "服务器错误," + e.getMessage()); + request.getResponse().println(Jsons.toString(res)); + + } + + } + +} \ No newline at end of file diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/question/api/CategoryLeval2ContentForUccnAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/question/api/CategoryLeval2ContentForUccnAction.java new file mode 100644 index 0000000..44b789f --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/question/api/CategoryLeval2ContentForUccnAction.java @@ -0,0 +1,67 @@ +/** + * 扬彩印刷设计 + * 文件名 :ArticleForUccnAction.java + * 创建人 :gjx + * 创建时间:2021年5月20日 +*/ + +package com.zhiqim.yangcai.design.action.question.api; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.design.dbo.YqArticle; +import com.zhiqim.yangcai.util.CodeEnum; +import com.zhiqim.yangcai.util.ResponseData; + +public class CategoryLeval2ContentForUccnAction implements Action +{ + // 查询文章富文本内容信息 + @Override + public void execute(HttpRequest request) throws Exception + { + request.getResponse().setHeader("Access-Control-Allow-Origin", "*"); + request.getResponse().setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE"); + request.getResponse().setHeader("Access-Control-Max-Age", "3600"); + request.getResponse().setHeader("Access-Control-Allow-Headers", "x-requested-with"); + Selector yqArticleSelector = new Selector(); + String articleIdStr = request.getParameter("articleId").toString(); + try + { + if (articleIdStr == null || articleIdStr.equals("")) + { + Object res = ResponseData.out(CodeEnum.SUCCESS.getCode(), new int[0], "操作成功"); + request.getResponse().println(Jsons.toString(res)); + return; + } + + Long articleId = Long.valueOf(articleIdStr); + yqArticleSelector.addMust("articleId", articleId); + yqArticleSelector.addMust("articleStatus", 0); + YqArticle yqArticle = ORM.get(ZTable.class).item(YqArticle.class, yqArticleSelector); + int articleNumber = yqArticle.getArticleNumber(); + articleNumber++; + + // 点击次数+1 + Updater updater = new Updater(); + updater.addMust("articleId", articleId); + updater.addField("articleNumber", articleNumber); + ORM.get(ZTable.class).update(YqArticle.class, updater); + + Object res = ResponseData.out(CodeEnum.SUCCESS.getCode(), yqArticle, "操作成功"); + request.getResponse().println(Jsons.toString(res)); + } + catch (Exception e) + { + Object res = ResponseData.out(CodeEnum.SUCCESS.getCode(), "查询文章错误"); + request.getResponse().println(Jsons.toString(res)); + } + + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/question/api/CategoryLeval2DetailForUccnAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/question/api/CategoryLeval2DetailForUccnAction.java new file mode 100644 index 0000000..c0744c3 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/question/api/CategoryLeval2DetailForUccnAction.java @@ -0,0 +1,73 @@ +/** + * 扬彩印刷设计 + * 文件名 :CategoryLeval3ForUccnAction.java + * 创建人 :gjx + * 创建时间:2021年5月20日 +*/ + +package com.zhiqim.yangcai.design.action.question.api; + +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.YqArticle; +import com.zhiqim.yangcai.util.CodeEnum; +import com.zhiqim.yangcai.util.ResponseData; + +public class CategoryLeval2DetailForUccnAction implements Action +{ + // 查询二级分类下文章 + @Override + public void execute(HttpRequest request) throws Exception + { + request.getResponse().setHeader("Access-Control-Allow-Origin", "*"); + request.getResponse().setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE"); + request.getResponse().setHeader("Access-Control-Max-Age", "3600"); + request.getResponse().setHeader("Access-Control-Allow-Headers", "x-requested-with"); + Selector yqArticleSelector = new Selector(); + String categoryIdStr = request.getParameter("categoryId").toString(); + try + { + if (categoryIdStr == null || categoryIdStr.equals("")) + { + Selector yqArticleOrderbyNum = new Selector(); + yqArticleOrderbyNum.addOrderbyDesc("articleNumber"); + List yqArticleList = ORM.get(ZTable.class).list(YqArticle.class, yqArticleOrderbyNum); + Object res = ResponseData.out(CodeEnum.SUCCESS.getCode(), yqArticleList, "操作成功"); + request.getResponse().println(Jsons.toString(res)); + return; + } + + Long categoryId = Long.valueOf(categoryIdStr); + yqArticleSelector.addMust("categoryId", categoryId); + yqArticleSelector.addMust("articleStatus", 0); + yqArticleSelector.addOrderbyDesc("articleTime"); + List yqArticleList = ORM.get(ZTable.class).list(YqArticle.class, yqArticleSelector); + if (yqArticleList == null) + { + Object res = ResponseData.out(CodeEnum.SUCCESS.getCode(), new int[0], "操作成功"); + request.getResponse().println(Jsons.toString(res)); + return; + } + for (YqArticle yqArticleItem : yqArticleList) + { + yqArticleItem.setArticleContent(null); + } + Object res = ResponseData.out(CodeEnum.SUCCESS.getCode(), yqArticleList, "操作成功"); + request.getResponse().println(Jsons.toString(res)); + } + catch (Exception e) + { + Object res = ResponseData.out(CodeEnum.SUCCESS.getCode(), "查询文章错误"); + request.getResponse().println(Jsons.toString(res)); + } + + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/score/KeywordScoreAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/score/KeywordScoreAction.java new file mode 100644 index 0000000..c8357ae --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/score/KeywordScoreAction.java @@ -0,0 +1,131 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.action.score; + +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.extend.StdSwitchAction; +import org.zhiqim.httpd.validate.ones.IsNotEmpty; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.manager.ZmrConstants; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.constant.ScoreConstants; +import com.zhiqim.yangcai.design.dbo.score.DesScoreParam; +import com.zhiqim.yangcai.design.dbo.score.DesScoreWeight; + +/** + * 关键词评分参数 + * + * @version v1.0.0 @author Deng 2018-3-13 新建与整理 + */ +public class KeywordScoreAction extends StdSwitchAction implements ZmrConstants +{ + @Override + protected void validateId(HttpRequest request) + { + + } + + @Override + protected void validateForm(HttpRequest request) + { + request.addValidate(new IsNotEmpty("paramKey","请选择参数名称")); + request.addValidate(new IsNotEmpty("paramKey","请选择参数键")); + request.addValidate(new IsNotEmpty("paramValue","请选择参数值")); + } + + @Override + protected void list(HttpRequest request) throws Exception + { + Selector selector = new Selector(); + selector.addMust("scoreName", ScoreConstants.SCORE_KEYWORD); + selector.addMust("scoreValue", 0); + List scoreList = ORM.get(ZTable.class).list(DesScoreWeight.class, selector); + request.setAttribute("scoreList", scoreList); + + String scoreType = request.getParameter("scoreType"); + Selector pSelector = new Selector(); + pSelector.addMust("scoreName", "KEYWORD"); + pSelector.addOrderbyAsc("paramType"); + + if (Validates.isNotEmpty(scoreType)) + pSelector.addMust("scoreType", scoreType); + + List paramList = ORM.get(ZTable.class).list(DesScoreParam.class, pSelector); + request.setAttribute("paramList", paramList); + request.setAttribute("scoreType", scoreType); + } + + @Override + protected void add(HttpRequest request) throws Exception + { + String scoreType = request.getParameter("scoreType"); + + Selector selector = new Selector(); + selector.addMust("scoreName", ScoreConstants.SCORE_KEYWORD); + + if (Validates.isNotEmpty(scoreType)) + selector.addMust("scoreType", scoreType); + else + selector.addMust("scoreValue", 0); + + List scoreList = ORM.get(ZTable.class).list(DesScoreWeight.class, selector); + request.setAttribute("scoreList", scoreList); + + request.setAttribute("scoreType", scoreType); + } + + @Override + protected void insert(HttpRequest request) throws Exception + { + String scoreName = request.getParameter("scoreName"); + String scoreType = request.getParameter("scoreType"); + String paramKey = request.getParameter("paramKey"); + int paramType = request.getParameterInt("paramType"); + int paramValue = request.getParameterInt("paramValue"); + + DesScoreParam param = new DesScoreParam(); + param.setParamId(Ids.longId()); + param.setScoreName(scoreName); + param.setScoreType(scoreType); + param.setParamType(paramType); + param.setParamKey(paramKey); + param.setParamValue(paramValue); + + ORM.get(ZTable.class).insert(param); + + request.addParam("scoreType", scoreType); + } + + @Override + protected void modify(HttpRequest request) throws Exception + { + + } + + @Override + protected void update(HttpRequest request) throws Exception + { + } + + @Override + protected void delete(HttpRequest request) throws Exception + { + + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/score/KeywordWeightAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/score/KeywordWeightAction.java new file mode 100644 index 0000000..820718a --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/score/KeywordWeightAction.java @@ -0,0 +1,127 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.action.score; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.extend.StdSwitchAction; +import org.zhiqim.httpd.validate.ones.IsNotEmpty; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.manager.ZmrConstants; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.design.constant.ScoreConstants; +import com.zhiqim.yangcai.design.dbo.score.DesScoreWeight; + +/** + * 关键词分数权重 + * + * @version v1.0.0 @author Deng 2018-3-14 新建与整理 + */ +public class KeywordWeightAction extends StdSwitchAction implements ZmrConstants +{ + + @Override + protected void validateId(HttpRequest request) + { + request.addValidate(new IsNotEmpty("scoreId", "请选择一个选项")); + } + + @Override + protected void validateForm(HttpRequest request) + { + request.addValidate(new IsNotEmpty("dayCode","请选择日期")); + request.addValidate(new IsNotEmpty("scoreWeight","请输入权重比例")); + } + + @Override + protected void list(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page"); + int pageSize = request.getContextAttributeInt("page.size", 20); + + Selector selector = new Selector(); + selector.addMust("scoreName", ScoreConstants.SCORE_KEYWORD); + selector.addOrderbyDesc("dayCode"); + PageResult pageResult = ORM.get(ZTable.class).page(DesScoreWeight.class, page, pageSize, selector); + request.setAttribute("pageResult", pageResult); + } + + @Override + protected void add(HttpRequest request) throws Exception + { + + } + + @Override + protected void insert(HttpRequest request) throws Exception + { + String scoreName = request.getParameter("scoreName"); + String dayCode = request.getParameter("dayCode"); + String scoreType = request.getParameter("scoreType"); + int scoreWeight = request.getParameterInt("scoreWeight"); + int scoreValue = request.getParameterInt("scoreValue", 0); + + DesScoreWeight weight = new DesScoreWeight(); + weight.setScoreId(Ids.longId()); + weight.setScoreName(scoreName); + weight.setDayCode(dayCode); + weight.setScoreType(scoreType); + weight.setScoreWeight(scoreWeight); + weight.setScoreValue(scoreValue); + + ORM.get(ZTable.class).insert(weight); + } + + @Override + protected void modify(HttpRequest request) throws Exception + { + long scoreId = request.getParameterLong("scoreId"); + DesScoreWeight weight = ORM.get(ZTable.class).item(DesScoreWeight.class, scoreId); + if (weight == null) + { + request.returnHistory("该关键词分数权重不存在,请重新选择"); + return; + } + + request.setAttribute("weight", weight); + } + + @Override + protected void update(HttpRequest request) throws Exception + { + long scoreId = request.getParameterLong("scoreId"); + String dayCode = request.getParameter("dayCode"); + int scoreWeight = request.getParameterInt("scoreWeight"); + int scoreValue = request.getParameterInt("scoreValue", 0); + + Updater update = new Updater(); + update.addMust("scoreId", scoreId); + update.addField("dayCode", dayCode); + update.addField("scoreWeight", scoreWeight); + update.addField("scoreValue", scoreValue); + + ORM.get(ZTable.class).update(DesScoreWeight.class, update); + } + + @Override + protected void delete(HttpRequest request) throws Exception + { + long scoreId = request.getParameterLong("scoreId"); + + ORM.get(ZTable.class).delete(DesScoreWeight.class, scoreId); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/score/ScoreDesignerLeverAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/score/ScoreDesignerLeverAction.java new file mode 100644 index 0000000..370c4de --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/score/ScoreDesignerLeverAction.java @@ -0,0 +1,189 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.action.score; + +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.extend.StdSwitchAction; +import org.zhiqim.httpd.validate.ones.IsIntegerValue; +import org.zhiqim.httpd.validate.ones.IsLen; +import org.zhiqim.httpd.validate.ones.IsNotEmpty; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.manager.ZmrConstants; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.design.dbo.score.ScoreDesignerLever; + +/** + * 设计师等级配置 + * + * @version v1.0.0 @author jiangfan 2020-8-27 新建与整理 + */ +public class ScoreDesignerLeverAction extends StdSwitchAction implements ZmrConstants +{ + + @Override + protected void validateId(HttpRequest request) + { + + } + + @Override + protected void validateForm(HttpRequest request) + { + request.addValidate(new IsNotEmpty("designerLever", "请输入设计师等级名称")); + request.addValidate(new IsLen("designerLever", "设计师等级名称不能超过10个字符", 1, 10)); + request.addValidate(new IsNotEmpty("minScore", "请输入最小评分分数")); + request.addValidate(new IsNotEmpty("maxScore", "请输入最大评分分数")); + request.addValidate(new IsIntegerValue("minScore", "最小评分分数在【-999999到999999】之间", -999999, 999999)); + request.addValidate(new IsIntegerValue("maxScore", "最大评分分数在【-999999到999999】之间", -999999, 999999)); + } + + @Override + protected void list(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page"); + int pageSize = request.getContextAttributeInt("page.size", 20); + + Selector selector = new Selector(); + PageResult pageResult = ORM.get(ZTable.class).page(ScoreDesignerLever.class, page, pageSize, selector); + request.setAttribute("pageResult", pageResult); + } + + @Override + protected void add(HttpRequest request) throws Exception + { + + } + + @Override + protected void insert(HttpRequest request) throws Exception + { + String designerLever = request.getParameter("designerLever"); + Integer minScore = request.getParameterInt("minScore"); + Integer maxScore = request.getParameterInt("maxScore"); + if (minScore > maxScore) + { + request.setResponseError("最小分数应小于最大分数"); + return; + } + List scoreDesignerLeverList = ORM.get(ZTable.class).list(ScoreDesignerLever.class); + if (null != scoreDesignerLeverList) + { + for (ScoreDesignerLever scoreDesignerLever : scoreDesignerLeverList) + { + if (scoreDesignerLever.getDesignerLever().equals(designerLever)) + { + request.setResponseError("设计师等级名称冲突"); + return; + } + } + } + for (int i = minScore; i < maxScore; i++) + { + for (ScoreDesignerLever scoreDesignerLever : scoreDesignerLeverList) + { + if (scoreDesignerLever.getMinScore() <= i && i < scoreDesignerLever.getMaxScore()) + { + request.setResponseError("评分分数与其他数据有交集,如" + i); + return; + } + } + } + ScoreDesignerLever scoreDesignerLever = new ScoreDesignerLever(); + scoreDesignerLever.setDesignerLeverId(Ids.longId()); + scoreDesignerLever.setDesignerLever(designerLever); + scoreDesignerLever.setMinScore(minScore); + scoreDesignerLever.setMaxScore(maxScore); + scoreDesignerLever.setState(1); + scoreDesignerLever.setLastOperatorCode(request.getSessionName()); + scoreDesignerLever.setCreateTime(Sqls.nowTimestamp()); + scoreDesignerLever.setModifyTime(Sqls.nowTimestamp()); + ORM.get(ZTable.class).insert(scoreDesignerLever); + request.setRedirect("/scoreDesignerLever.htm"); + } + + @Override + protected void modify(HttpRequest request) throws Exception + { + long designerLeverId = request.getParameterLong("designerLeverId"); + ScoreDesignerLever scoreDesignerLever = ORM.get(ZTable.class).item(ScoreDesignerLever.class, designerLeverId); + if (scoreDesignerLever == null) + { + request.returnHistory("该设计师等级不存在,请重新选择"); + return; + } + + request.setAttribute("scoreDesignerLever", scoreDesignerLever); + } + + @Override + protected void update(HttpRequest request) throws Exception + { + long designerLeverId = request.getParameterLong("designerLeverId"); + String designerLever = request.getParameter("designerLever"); + int minScore = request.getParameterInt("minScore"); + int maxScore = request.getParameterInt("maxScore"); + if (minScore > maxScore) + { + request.setResponseError("最小分数应小于最大分数"); + return; + } + List scoreDesignerLeverList = ORM.get(ZTable.class).list(ScoreDesignerLever.class); + if (null != scoreDesignerLeverList) + { + for (ScoreDesignerLever scoreDesignerLever : scoreDesignerLeverList) + { + if (scoreDesignerLever.getDesignerLever().equals(designerLever) && scoreDesignerLever.getDesignerLeverId() != designerLeverId) + { + request.setResponseError("设计师等级名称冲突"); + return; + } + } + } + for (int i = minScore; i < maxScore; i++) + { + for (ScoreDesignerLever scoreDesignerLever : scoreDesignerLeverList) + { + if (scoreDesignerLever.getMinScore() <= i && i < scoreDesignerLever.getMaxScore() && scoreDesignerLever.getDesignerLeverId() != designerLeverId) + { + request.setResponseError("评分分数与其他数据有交集,如" + i); + return; + } + } + } + Updater update = new Updater(); + update.addMust("designerLeverId", designerLeverId); + update.addField("designerLever", designerLever); + update.addField("minScore", minScore); + update.addField("maxScore", maxScore); + update.addField("lastOperatorCode", request.getSessionName()); + update.addField("modifyTime", Sqls.nowTimestamp()); + ORM.get(ZTable.class).update(ScoreDesignerLever.class, update); + request.setRedirect("/scoreDesignerLever.htm"); + } + + @Override + protected void delete(HttpRequest request) throws Exception + { + long designerLeverId = request.getParameterLong("designerLeverId"); + + ORM.get(ZTable.class).delete(ScoreDesignerLever.class, designerLeverId); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/score/ScoreDesignerRecordAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/score/ScoreDesignerRecordAction.java new file mode 100644 index 0000000..10fce70 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/score/ScoreDesignerRecordAction.java @@ -0,0 +1,140 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.action.score; + +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.extend.StdSwitchAction; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.manager.ZmrConstants; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.manager.dao.ZmrOrgDao; +import org.zhiqim.manager.dbo.ZmrOrg; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.design.DesignerGroupDispatch; +import com.zhiqim.yangcai.design.dbo.score.ScoreDesignerLever; +import com.zhiqim.yangcai.design.dbo.score.ScoreDesignerRecordView; + +/** + * 设计师积分总账 + * + * @version v1.0.0 @author jiangfan 2020-8-27 新建与整理 + */ +public class ScoreDesignerRecordAction extends StdSwitchAction implements ZmrConstants +{ + + @Override + protected void validateId(HttpRequest request) + { + + } + + @Override + protected void validateForm(HttpRequest request) + { + + } + + @Override + protected void list(HttpRequest request) throws Exception + { + Selector selector = new Selector(); + + List scoreDesignerLeverList = ORM.get(ZTable.class).list(ScoreDesignerLever.class, selector); + request.setAttribute("scoreDesignerLeverList", scoreDesignerLeverList); + + long orgId = request.getSessionUser(ZmrSessionUser.class).getSelectedOrgId(); + if (orgId > 0) + { + ZmrOrg org = ZmrOrgDao.getOrg(request, orgId); + if (org != null && org.getOrgLevel() > 0) + { + selector.addMust("orgId", orgId); + } + } + + List designerList = ORM.get(ZTable.class).list(DesignerGroupDispatch.class, selector); + request.setAttribute("designerList", designerList); + + int page = request.getParameterInt("page", 1); + int pageSize = request.getContextAttributeInt("page.size", 15); + String sortColumn = request.getParameter("sortColumn", "score"); + request.setAttribute("sortColumn", sortColumn); + String sortType = request.getParameter("sortType", "desc"); + request.setAttribute("sortType", sortType); + int state = request.getParameterInt("state"); + request.setAttribute("state", state); + + Selector pSelector = new Selector(); + pSelector.addMaybe("state", state); + pSelector.addMaybe("orgId", request.getParameterLong("orgId")); + String operatorCode = request.getParameter("operatorCode"); + request.setAttribute("operatorCode", operatorCode); + if (Validates.isNotEmpty(operatorCode)) + { + pSelector.addMust("operatorCode", operatorCode); + } + if ("desc".equals(sortType)) + { + pSelector.addOrderbyDesc(sortColumn); + } + else + { + pSelector.addOrderbyAsc(sortColumn); + } + PageResult pageResult = ORM.get(ZView.class).page(ScoreDesignerRecordView.class, page, pageSize, pSelector); + pageResult.addConditionMap(request.getParameterMap()); + request.setAttribute("pageResult", pageResult); + + Selector selOrg = new Selector(); + selOrg.addMust("orgStatus", 0); + selOrg.addMust("orgLevel", 1); + selOrg.addMustNotEqual("orgId", 1808071102554512L); + List orgList = ORM.get(ZTable.class).list(ZmrOrg.class, selOrg); + + request.setAttribute("orgList", orgList); + } + + @Override + protected void add(HttpRequest request) throws Exception + { + } + + @Override + protected void insert(HttpRequest request) throws Exception + { + } + + @Override + protected void modify(HttpRequest request) throws Exception + { + + } + + @Override + protected void update(HttpRequest request) throws Exception + { + // TODO + } + + @Override + protected void delete(HttpRequest request) throws Exception + { + + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/score/ScoreDesignerRecordDetailAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/score/ScoreDesignerRecordDetailAction.java new file mode 100644 index 0000000..bbfe1e0 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/score/ScoreDesignerRecordDetailAction.java @@ -0,0 +1,135 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.action.score; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.extend.StdSwitchAction; +import org.zhiqim.httpd.validate.ones.IsIntegerValue; +import org.zhiqim.httpd.validate.ones.IsLen; +import org.zhiqim.httpd.validate.ones.IsNotEmpty; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.manager.ZmrConstants; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.constant.ScoreConstants; +import com.zhiqim.yangcai.design.dao.ScoreDesignerRecordDao; +import com.zhiqim.yangcai.design.dbo.score.ScoreDesignerRecordDetail; +import com.zhiqim.yangcai.design.dbo.score.ScoreDesignerRecordDetailView; + +/** + * 设计师积分总账 + * + * @version v1.0.0 @author jiangfan 2020-8-27 新建与整理 + */ +public class ScoreDesignerRecordDetailAction extends StdSwitchAction implements ZmrConstants +{ + + @Override + protected void validateId(HttpRequest request) + { + + } + + @Override + protected void validateForm(HttpRequest request) + { + + request.addValidate(new IsNotEmpty("score", "请输入分数")); + request.addValidate(new IsIntegerValue("score", "分数在【-999999到999999】之间", -999999, 999999)); + request.addValidate(new IsNotEmpty("remark", "请输入备注")); + request.addValidate(new IsLen("remark", "备注不能超过100个字符", 1, 100)); + } + + @Override + protected void list(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page", 1); + int pageSize = request.getContextAttributeInt("page.size", 15); + String detailType = request.getParameter("detailType", "all"); + String startDate = request.getParameter("startDate", DateTimes.getPreviousDateStringByMonth(1)); + String endDate = request.getParameter("endDate", DateTimes.getDateString()); + + Selector pSelector = new Selector(); + pSelector.addMust("operatorCode", request.getParameter("operatorCode")); + pSelector.addMust("state", 1); + if ("add".equals(detailType)) + { + pSelector.addMustThenGE("score", 0); + } + else if ("sub".equals(detailType)) + { + pSelector.addMustThenLE("score", 0); + } + pSelector.addMustThenGE("createTime", Sqls.toTimestamp(startDate + " 00:00:00")); + pSelector.addMustThenLE("createTime", Sqls.toTimestamp(endDate + " 23:59:59")); + pSelector.addOrderbyDesc("modifyTime"); + PageResult pageResult = ORM.get(ZView.class).page(ScoreDesignerRecordDetailView.class, page, pageSize, pSelector); + pageResult.addConditionMap(request.getParameterMap()); + request.setAttribute("pageResult", pageResult); + request.setAttribute("detailType", detailType); + request.setAttribute("operatorCode", request.getParameter("operatorCode")); + request.setAttribute("startDate", startDate); + request.setAttribute("endDate", endDate); + } + + @Override + protected void add(HttpRequest request) throws Exception + { + request.setAttribute("operatorCode", request.getParameter("operatorCode")); + } + + @Override + protected void insert(HttpRequest request) throws Exception + { + String operatorCode = request.getParameter("operatorCode"); + String score = request.getParameter("score"); + long orderId = request.getParameterLong("orderId"); + String remark = request.getParameter("remark"); + + // 人工修正 + ScoreDesignerRecordDetail scoreDesignerRecordDetail = new ScoreDesignerRecordDetail(); + scoreDesignerRecordDetail.setScoreType(Long.valueOf(ScoreConstants.SCORE_TYPE_100.value())); + scoreDesignerRecordDetail.setOperatorCode(operatorCode); + scoreDesignerRecordDetail.setCreateOperator(request.getSessionUser(ZmrSessionUser.class).getOperatorCode()); + if (orderId > 0) + { + scoreDesignerRecordDetail.setOrderId(orderId); + } + scoreDesignerRecordDetail.setRemark(remark); + scoreDesignerRecordDetail.setScore(Integer.valueOf(score)); + ScoreDesignerRecordDao.addScoreDesignerRecordDetail(scoreDesignerRecordDetail); + } + + @Override + protected void modify(HttpRequest request) throws Exception + { + + } + + @Override + protected void update(HttpRequest request) throws Exception + { + // TODO + } + + @Override + protected void delete(HttpRequest request) throws Exception + { + + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/score/ScoreTypeAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/score/ScoreTypeAction.java new file mode 100644 index 0000000..4c42c51 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/score/ScoreTypeAction.java @@ -0,0 +1,124 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.action.score; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.extend.StdSwitchAction; +import org.zhiqim.httpd.validate.ones.IsNotEmpty; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.manager.ZmrConstants; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.design.constant.ScoreConstants; +import com.zhiqim.yangcai.design.dbo.score.ScoreType; + +/** + * 评分权重 + * + * @version v1.0.0 @author jiangfan 2020-8-27 新建与整理 + */ +public class ScoreTypeAction extends StdSwitchAction implements ZmrConstants +{ + + @Override + protected void validateId(HttpRequest request) + { + } + + @Override + protected void validateForm(HttpRequest request) + { + request.addValidate(new IsNotEmpty("typeId", "请选择评分类型")); + request.addValidate(new IsNotEmpty("value", "请输入积分值")); + } + + @Override + protected void list(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page"); + int pageSize = request.getContextAttributeInt("page.size", 20); + + Selector selector = new Selector(); + selector.addOrderbyDesc("modifyTime").addOrderbyDesc("state"); + PageResult pageResult = ORM.get(ZTable.class).page(ScoreType.class, page, pageSize, selector); + request.setAttribute("pageResult", pageResult); + } + + @Override + protected void add(HttpRequest request) throws Exception + { + request.setAttribute("scoreTypeList", ScoreConstants.getScoreTypeList()); + } + + @Override + protected void insert(HttpRequest request) throws Exception + { + Long typeId = request.getParameterLong("typeId"); + int value = request.getParameterInt("value"); + String remark = request.getParameter("remark"); + ScoreType scoreType = new ScoreType(); + scoreType.setTypeId(typeId); + scoreType.setTypeName(ScoreConstants.getScoreTypeListDesc(String.valueOf(typeId))); + scoreType.setValue(value); + scoreType.setState(1); + scoreType.setRemark(remark); + scoreType.setLastOperatorCode(request.getSessionName()); + scoreType.setCreateTime(Sqls.nowTimestamp()); + scoreType.setModifyTime(Sqls.nowTimestamp()); + ORM.get(ZTable.class).insert(scoreType); + } + + @Override + protected void modify(HttpRequest request) throws Exception + { + long typeId = request.getParameterLong("typeId"); + ScoreType scoreType = ORM.get(ZTable.class).item(ScoreType.class, typeId); + if (scoreType == null) + { + request.returnHistory("该评分权重不存在,请重新选择"); + return; + } + request.setAttribute("typeId", typeId); + request.setAttribute("scoreTypeList", ScoreConstants.getScoreTypeList()); + request.setAttribute("scoreType", scoreType); + } + + @Override + protected void update(HttpRequest request) throws Exception + { + Long typeId = request.getParameterLong("typeId"); + int value = request.getParameterInt("value"); + String remark = request.getParameter("remark"); + + Updater update = new Updater(); + update.addMust("typeId", typeId); + update.addField("typeName", ScoreConstants.getScoreTypeListDesc(String.valueOf(typeId))); + update.addField("value", value); + update.addField("remark", remark); + update.addField("lastOperatorCode", request.getSessionName()); + update.addField("modifyTime", Sqls.nowTimestamp()); + ORM.get(ZTable.class).update(ScoreType.class, update); + } + + @Override + protected void delete(HttpRequest request) throws Exception + { + long typeId = request.getParameterLong("typeId"); + + ORM.get(ZTable.class).delete(ScoreType.class, typeId); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/score/TemplateScoreAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/score/TemplateScoreAction.java new file mode 100644 index 0000000..2c0cbf8 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/score/TemplateScoreAction.java @@ -0,0 +1,131 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.action.score; + +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.extend.StdSwitchAction; +import org.zhiqim.httpd.validate.ones.IsNotEmpty; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.manager.ZmrConstants; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.constant.ScoreConstants; +import com.zhiqim.yangcai.design.dbo.score.DesScoreParam; +import com.zhiqim.yangcai.design.dbo.score.DesScoreWeight; + +/** + * 模板评分参数 + * + * @version v1.0.0 @author Deng 2018-3-13 新建与整理 + */ +public class TemplateScoreAction extends StdSwitchAction implements ZmrConstants +{ + @Override + protected void validateId(HttpRequest request) + { + + } + + @Override + protected void validateForm(HttpRequest request) + { + request.addValidate(new IsNotEmpty("paramKey","请选择参数名称")); + request.addValidate(new IsNotEmpty("paramKey","请选择参数键")); + request.addValidate(new IsNotEmpty("paramValue","请选择参数值")); + } + + @Override + protected void list(HttpRequest request) throws Exception + { + Selector selector = new Selector(); + selector.addMust("scoreName", ScoreConstants.SCORE_TEMPLATE); + selector.addMust("scoreValue", 0); + List scoreList = ORM.get(ZTable.class).list(DesScoreWeight.class, selector); + request.setAttribute("scoreList", scoreList); + + String scoreType = request.getParameter("scoreType"); + Selector pSelector = new Selector(); + pSelector.addMust("scoreName", "TEMPLATE"); + pSelector.addOrderbyAsc("paramType"); + + if (Validates.isNotEmpty(scoreType)) + pSelector.addMust("scoreType", scoreType); + + List paramList = ORM.get(ZTable.class).list(DesScoreParam.class, pSelector); + request.setAttribute("paramList", paramList); + request.setAttribute("scoreType", scoreType); + } + + @Override + protected void add(HttpRequest request) throws Exception + { + String scoreType = request.getParameter("scoreType"); + + Selector selector = new Selector(); + selector.addMust("scoreName", ScoreConstants.SCORE_TEMPLATE); + + if (Validates.isNotEmpty(scoreType)) + selector.addMust("scoreType", scoreType); + else + selector.addMust("scoreValue", 0); + + List scoreList = ORM.get(ZTable.class).list(DesScoreWeight.class, selector); + request.setAttribute("scoreList", scoreList); + + request.setAttribute("scoreType", scoreType); + } + + @Override + protected void insert(HttpRequest request) throws Exception + { + String scoreName = request.getParameter("scoreName"); + String scoreType = request.getParameter("scoreType"); + String paramKey = request.getParameter("paramKey"); + int paramType = request.getParameterInt("paramType"); + int paramValue = request.getParameterInt("paramValue"); + + DesScoreParam param = new DesScoreParam(); + param.setParamId(Ids.longId()); + param.setScoreName(scoreName); + param.setScoreType(scoreType); + param.setParamType(paramType); + param.setParamKey(paramKey); + param.setParamValue(paramValue); + + ORM.get(ZTable.class).insert(param); + + request.addParam("scoreType", scoreType); + } + + @Override + protected void modify(HttpRequest request) throws Exception + { + + } + + @Override + protected void update(HttpRequest request) throws Exception + { + } + + @Override + protected void delete(HttpRequest request) throws Exception + { + + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/score/TemplateWeightAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/score/TemplateWeightAction.java new file mode 100644 index 0000000..fc6c9ec --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/score/TemplateWeightAction.java @@ -0,0 +1,125 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.action.score; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.extend.StdSwitchAction; +import org.zhiqim.httpd.validate.ones.IsNotEmpty; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.manager.ZmrConstants; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.design.constant.ScoreConstants; +import com.zhiqim.yangcai.design.dbo.score.DesScoreWeight; + +/** + * 模板分数权重 + * + * @version v1.0.0 @author Deng 2018-3-14 新建与整理 + */ +public class TemplateWeightAction extends StdSwitchAction implements ZmrConstants +{ + @Override + protected void validateId(HttpRequest request) + { + request.addValidate(new IsNotEmpty("scoreId", "请选择一个选项")); + } + + @Override + protected void validateForm(HttpRequest request) + { + request.addValidate(new IsNotEmpty("dayCode","请选择日期")); + request.addValidate(new IsNotEmpty("scoreWeight","请输入权重比例")); + } + + @Override + protected void list(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page"); + int pageSize = request.getContextAttributeInt("page.size", 20); + + Selector selector = new Selector(); + selector.addMust("scoreName", ScoreConstants.SCORE_TEMPLATE); + selector.addOrderbyDesc("dayCode"); + PageResult pageResult = ORM.get(ZTable.class).page(DesScoreWeight.class, page, pageSize, selector); + request.setAttribute("pageResult", pageResult); + } + + @Override + protected void add(HttpRequest request) throws Exception + { + + } + + @Override + protected void insert(HttpRequest request) throws Exception + { + String scoreName = request.getParameter("scoreName"); + String dayCode = request.getParameter("dayCode"); + String scoreType = request.getParameter("scoreType"); + int scoreWeight = request.getParameterInt("scoreWeight"); + int scoreValue = request.getParameterInt("scoreValue", 0); + + DesScoreWeight weight = new DesScoreWeight(); + weight.setScoreId(Ids.longId()); + weight.setScoreName(scoreName); + weight.setDayCode(dayCode); + weight.setScoreType(scoreType); + weight.setScoreWeight(scoreWeight); + weight.setScoreValue(scoreValue); + + ORM.get(ZTable.class).insert(weight); + } + + @Override + protected void modify(HttpRequest request) throws Exception + { + long scoreId = request.getParameterLong("scoreId"); + DesScoreWeight weight = ORM.get(ZTable.class).item(DesScoreWeight.class, scoreId); + if (weight == null) + { + request.returnHistory("该模板分数权重不存在,请重新选择"); + return; + } + + request.setAttribute("weight", weight); + } + + @Override + protected void update(HttpRequest request) throws Exception + { + long scoreId = request.getParameterLong("scoreId"); + String dayCode = request.getParameter("dayCode"); + int scoreWeight = request.getParameterInt("scoreWeight"); + int scoreValue = request.getParameterInt("scoreValue", 0); + + Updater update = new Updater(); + update.addMust("scoreId", scoreId); + update.addField("dayCode", dayCode); + update.addField("scoreWeight", scoreWeight); + update.addField("scoreValue", scoreValue); + + ORM.get(ZTable.class).update(DesScoreWeight.class, update); + } + + @Override + protected void delete(HttpRequest request) throws Exception + { + long scoreId = request.getParameterLong("scoreId"); + + ORM.get(ZTable.class).delete(DesScoreWeight.class, scoreId); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sms/SmsSendLogAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sms/SmsSendLogAction.java new file mode 100644 index 0000000..6612e2f --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sms/SmsSendLogAction.java @@ -0,0 +1,54 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.action.sms; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.sms.SmsLog; + +/** + * 短信发送日志 + * @version v1.0.0 @author zhouwenbin 2018-6-12 新建与整理 + */ +public class SmsSendLogAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page"); + int pageSize = 20; + + int sendStatus = request.getParameterInt("sendStatus"); + long designId = request.getParameterLong("designId"); + String mobile = request.getParameter("mobile"); + + Selector selector = new Selector(); + selector.addMaybe("mobile", mobile); + selector.addMaybe("designId", designId); + if(sendStatus != -1) + selector.addMaybe("sendStatus", sendStatus); + + selector.addOrderbyDesc("sendTime"); + + PageResult pageResult = ORM.get(ZTable.class).page(SmsLog.class, page, pageSize, selector); + pageResult.addConditionMap(request.getParameterMap()); + + request.setAttribute("pageResult", pageResult); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/stat/after/DesignAfterStatisticsAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/stat/after/DesignAfterStatisticsAction.java new file mode 100644 index 0000000..f3ab9bb --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/stat/after/DesignAfterStatisticsAction.java @@ -0,0 +1,99 @@ +package com.zhiqim.yangcai.design.action.stat.after; + +import java.math.BigDecimal; +import java.math.RoundingMode; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Objects; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.constants.AfterConstants; +import com.zhiqim.yangcai.design.constants.StatusConstants; +import com.zhiqim.yangcai.design.dbo.after.DesignAfterOrderView; +import com.zhiqim.yangcai.design.dbo.after.DesignAfterStatisticDetail; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; +import com.zhiqim.yangcai.design.stat.model.AfterStatisticModule; + +/***** + * 售后订单统计 + * + * @version v1.0.0 @author lgz 2019-3-13 新建与整理 + */ +public class DesignAfterStatisticsAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + int currYear = DateTimes.getCurrentYear(); + int currMonth = DateTimes.getCurrentMonth(); + currYear = currMonth == 1 ? currYear - 1 : currYear; + currMonth = currMonth == 1 ? 12 : currMonth; + + int year = request.getParameterInt("year", currYear); + int month = request.getParameterInt("month", currMonth); + month = month < 1 ? 1 : (month > 12 ? 12 : month); + + String afterBlamer = request.getParameter("afterBlamer", request.getSessionName()); + + request.setAttribute("year", year); + request.setAttribute("month", month); + request.setAttribute("afterBlamer", afterBlamer); + + long picOrgId = request.getSessionUser(ZmrSessionUser.class).getSelectedOrgId(); + String startDate = year + "-" + (month < 10 ? "0" : "") + month; + + Selector selector = new Selector(); + selector.addMust("afterBlamer", afterBlamer); + selector.addMust("picOrgId", picOrgId); + selector.addMustNotEqual("afterStatus", AfterConstants.CS_0.value()); + selector.addMustThenGE("afterHandelTime", Sqls.toTimestamp(year + "-" + (month < 10 ? "0" : "") + month + "-01", "00:00:00")); + selector.addMustThenLE("afterHandelTime", Sqls.toTimestamp(DateTimes.getLastMonthDay(year + (month < 10 ? "0" : "") + month), "23:59:59")); + Map blamerAfterMap = new HashMap(); + List dataList = ORM.get(ZView.class).list(DesignAfterOrderView.class, selector); + + for (DesignAfterOrderView after : dataList) + { + DesignAfterStatisticDetail detail = new DesignAfterStatisticDetail(); + Objects.copyDeep(after, detail); + detail.setStartDate(startDate); + detail.setStartDate(year + "-" + (month < 10 ? "0" : "") + month); + ORM.get(ZTable.class).replace(detail); + + AfterStatisticModule module = blamerAfterMap.get(detail.getAfterBlamer()); + module = module != null ? module : new AfterStatisticModule(); + detail.setCompensateAmount(after.getCompensateAmount()); + module.addAfterDetail(detail); + blamerAfterMap.put(detail.getAfterBlamer(), module); + } + + for (AfterStatisticModule model : blamerAfterMap.values()) + { + Selector sel = new Selector("designer", model.getAfterBlamer()); + sel.addMustThenGE("status", StatusConstants.ORDER_55.value()); + sel.addMustThenGE("designEndTime", Sqls.toTimestampBegin(startDate + "-01")); + sel.addMustThenLE("designEndTime", Sqls.toTimestampEnd(DateTimes.getLastMonthDay(startDate.replace("-", "")))); + + // 定稿单数 + int orderEnds = ORM.get(ZTable.class).count(DesignOrder.class, sel); + model.setOrderEnds(orderEnds); + if (orderEnds > 0) + {// 售后率 + model.setAfterRatio(new BigDecimal(String.valueOf(model.getAfterCount() * 100)) + .divide(new BigDecimal(String.valueOf(orderEnds)), 2, RoundingMode.HALF_UP).doubleValue()); + } + } + + request.setAttribute("blamerAfterMap", blamerAfterMap); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/stat/design/CompleteDesignRateStatAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/stat/design/CompleteDesignRateStatAction.java new file mode 100644 index 0000000..a912aa8 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/stat/design/CompleteDesignRateStatAction.java @@ -0,0 +1,81 @@ +/** + * 扬彩印刷设计 + * 文件名 :CompleteDesignRateStatAction.java + * 创建人 :gjx + * 创建时间:2020年11月9日 +*/ + +package com.zhiqim.yangcai.design.action.stat.design; + +import java.util.ArrayList; +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.extend.LinkedMapSO; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZSQL; + +import com.zhiqim.yangcai.design.model.CompleteDesignRateStatModel; + +/** + * + * [简要描述]: 设计师定稿率统计
            + * [详细描述]:
            + * + * @version 1.0 @author gjx 2020年11月9日 新建与整理 + */ +public class CompleteDesignRateStatAction implements Action +{ + @Override + public void execute(HttpRequest request) throws Exception + { + ZmrSessionUser sessionUser = request.getSessionUser(ZmrSessionUser.class); + String startDate = request.getParameter("startDate", DateTimes.getFirstMonthDay()); + String endDate = request.getParameter("endDate", DateTimes.getDateString()); + String designer = sessionUser.getOperatorCode(); + if (DateTimes.compareDay(endDate, startDate) > 183) + { + request.setResponseError("请勿将时间区间跨度选择大于6个月"); + return; + } + + StringBuilder sqlStr = new StringBuilder( + " SELECT d.designer, COUNT(*) orderNum,(SELECT COUNT(*) FROM design_order WHERE DESIGN_BEGIN_TIME >= 'startDateStr' AND DESIGN_BEGIN_TIME <= 'endDateStr' AND STATUS >= 55 AND ORG_ID = orgIdStr AND designer IS NOT NULL AND designer = d.designer ) orderEndNum,"); + sqlStr.append( + " ROUND((SELECT COUNT(*) FROM design_order WHERE DESIGN_BEGIN_TIME >= 'startDateStr' AND DESIGN_BEGIN_TIME <= 'endDateStr' AND STATUS >= 55 AND ORG_ID = orgIdStr AND designer IS NOT NULL AND designer = d.designer ) / COUNT(*) * 100,2) endProportion"); + sqlStr.append( + " FROM design_order d WHERE d.DESIGN_BEGIN_TIME >= 'startDateStr' AND d.DESIGN_BEGIN_TIME <= 'endDateStr' AND d.ORG_ID = orgIdStr AND d.designer IS NOT NULL AND d.designer = 'designerStr' GROUP BY d.designer ORDER BY endProportion DESC;"); + + String sql = sqlStr.toString().replace("startDateStr", startDate + " 00:00:00").replace("endDateStr", endDate + " 23:59:59"); + + sql = sql.replace("orgIdStr", String.valueOf(sessionUser.getSelectedOrgId())); + sql = sql.replace("designerStr", designer); + + List modelList = new ArrayList(); + List statList = ORM.get(ZSQL.class).executeQuery(sql); + for (LinkedMapSO so : statList) + { + String designerItem = String.valueOf(so.get("designer")); + if (Validates.isEmpty(designerItem)) + { + continue; + } + + CompleteDesignRateStatModel model = new CompleteDesignRateStatModel(designerItem); + model.setOrderNum(Integer.valueOf(String.valueOf(so.get("orderNum")))); + model.setOrderEndNum(Integer.valueOf(String.valueOf(so.get("orderEndNum")))); + model.setEndProportion(Double.valueOf(String.valueOf(so.get("endProportion")))); + + modelList.add(model); + } + + request.setAttribute("modelList", modelList); + request.setAttribute("designer", designer); + request.setAttribute("startDate", startDate); + request.setAttribute("endDate", endDate); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/stat/design/DesignOrderCountStatAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/stat/design/DesignOrderCountStatAction.java new file mode 100644 index 0000000..a36bc1c --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/stat/design/DesignOrderCountStatAction.java @@ -0,0 +1,98 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.action.stat.design; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.constants.DraftConstants; +import com.zhiqim.yangcai.design.constants.StatusConstants; +import com.zhiqim.yangcai.design.dao.DesignTypeDao; +import com.zhiqim.yangcai.design.dbo.design.DesignType; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; +import com.zhiqim.yangcai.design.stat.model.OrderCountStatModel; + +/*** + * 设计总订单数量统计 + * + * @version v1.0.0 @author longguizhi 2018-10-22 新建与整理 + */ +public class DesignOrderCountStatAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + String startDate = request.getParameter("startDate", DateTimes.getPreviousDateString(7)); + String endDate = request.getParameter("endDate", DateTimes.getDateString()); + request.setAttribute("startDate", startDate); + request.setAttribute("endDate", endDate); + + Selector selector = new Selector(); + selector.addMustThenGE("draftType", DraftConstants.DRAFT_COMMON_DESIGN.value()); //设计订单 + selector.addMustThenGE("createTime", Sqls.toTimestamp(startDate + " 00:00:00")); + selector.addMustThenLE("createTime", Sqls.toTimestamp(endDate + " 23:59:59")); + selector.addMustNotEqual("status", StatusConstants.ORDER_F100.value()); + selector.addMustNotEqual("status", StatusConstants.ORDER_F110.value()); + selector.addOrderbyAsc("createTime"); + List orderList = ORM.get(ZTable.class).list(DesignOrder.class, selector); + + //仅展示名片、特种纸、精品特种纸、PVC名片、彩页、折页、画册、优惠券、展架、喷绘 + //仅展示产品类型前九 + List typeList = DesignTypeDao.listAll(); + List typeIdList = new ArrayList();; + int index = 0; + for (DesignType type : typeList) + { + index++; + if (index > 9) + break; + + typeIdList.add(type.getTypeId()); + } + + LinkedHashMap map = new LinkedHashMap(); + for (DesignOrder order : orderList) + { + String date = Sqls.toDateString(order.getCreateTime()); + OrderCountStatModel temp = map.get(date); + if (temp == null) + temp = new OrderCountStatModel(date); + + Map typeMap = temp.getTypeMap(); + if (typeIdList.contains(order.getTypeId())) + { + int count = typeMap.get(order.getTypeId()) == null?0:typeMap.get(order.getTypeId()); + typeMap.put(order.getTypeId(), count+1); + + temp.setElseCount(temp.getElseCount() +1); + } + + temp.setSumCount(temp.getSumCount() +1); + map.put(date, temp); + } + + request.setAttribute("list", map.values()); + request.setAttribute("typeList", map.values()); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/stat/design/DesignOrderRefundRateStatAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/stat/design/DesignOrderRefundRateStatAction.java new file mode 100644 index 0000000..f32f66f --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/stat/design/DesignOrderRefundRateStatAction.java @@ -0,0 +1,164 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action.stat.design; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Maths; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.constants.DraftConstants; +import com.zhiqim.yangcai.design.constants.StatusConstants; +import com.zhiqim.yangcai.design.dao.StatDao; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; +import com.zhiqim.yangcai.design.dbo.order.DesignSelfView; +import com.zhiqim.yangcai.design.stat.model.RefundRateModel; + +/** + * 设计退款率统计 + * + * @version v1.0.0 @author liuhu 2018-11-30 新建与整理 + */ +public class DesignOrderRefundRateStatAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + ZmrSessionUser sessionUser = request.getSessionUser(ZmrSessionUser.class); + long orgId = sessionUser.getSelectedOrgId(); + + String beginDate = request.getParameter("beginDate", DateTimes.getFirstMonthDay()); + String endDate = request.getParameter("endDate", DateTimes.getDateString()); + String operatorCode = sessionUser.getOperatorCode(); + int day = DateTimes.compareDay(endDate, beginDate); + if (day > 31) + { + request.setResponseError("请勿将时间区间跨度选择大于一个月"); + return; + } + + String beginTime = beginDate + " 00:00:00"; + String endTime = endDate + " 23:59:59"; + + Selector refundSelector = new Selector(); + refundSelector.addMustThenGE("draftType", DraftConstants.DRAFT_TEMPLATE.value()); + refundSelector.addMustThenLE("draftType", DraftConstants.DRAFT_PAGE_DESIGN.value()); + refundSelector.addMustIsNotNull("designer"); + refundSelector.addMustNotEqual("complaintFlag", 1); + refundSelector.addMaybeThenGE("designBeginTime", Sqls.toTimestamp(beginTime)); + refundSelector.addMaybeThenLE("designBeginTime", Sqls.toTimestamp(endTime)); + // refundSelector.addMustIn("status", StatusConstants.ORDER_F110.value(), + // StatusConstants.ORDER_F100.value()); 去掉已取消 状态订单 + refundSelector.addMustIn("status", StatusConstants.ORDER_F110.value()); + // 相关子查询(一小时内重新下单不算设计师责任) + refundSelector.addExpressionNotEqual("buyerNick", "all (select BUYER_NICK from design_order as b " + "where b.DESIGN_ID <> design_order.DESIGN_ID " + + "and b.CREATE_TIME >= design_order.REFUND_TIME " + "and DATE_SUB(b.CREATE_TIME,INTERVAL 1 HOUR) <= design_order.REFUND_TIME)"); + + refundSelector.addExpression("designer", "any (select operator_code from zmr_operator AS a WHERE a.ORG_ID = $orgId$)"); + refundSelector.addReplace("ORG_ID", orgId + ""); + refundSelector.addMust("designer", sessionUser.getOperatorCode()); + + List refundList = ORM.get(ZView.class).list(DesignSelfView.class, refundSelector); + int refundSum = 0; + long refundMoneyMerge = 0L;// 总退回金额 + Map map = new HashMap(); + for (DesignOrder order : refundList) + { + String designer = order.getDesigner(); + if (!map.containsKey(designer)) + { + map.put(designer, new RefundRateModel(designer)); + } + + RefundRateModel model = map.get(designer); + model.setRefundCount(model.getRefundCount() + 1); + model.setRefundMoneySum(model.getRefundMoneySum() + order.getAmount()); + refundMoneyMerge += order.getAmount(); + refundSum++; + } + + Selector selector = new Selector(); + selector.addMustThenGE("draftType", DraftConstants.DRAFT_TEMPLATE.value()); + selector.addMustThenLE("draftType", DraftConstants.DRAFT_PAGE_DESIGN.value()); + selector.addMustIsNotNull("designer"); + selector.addMaybeThenGE("designBeginTime", Sqls.toTimestamp(beginTime)); + selector.addMaybeThenLE("designBeginTime", Sqls.toTimestamp(endTime)); + selector.addExpression("designer", "any (select operator_code from zmr_operator AS a WHERE a.ORG_ID = $orgId$)"); + selector.addReplace("ORG_ID", orgId + ""); + selector.addMust("designer", sessionUser.getOperatorCode()); + List list = ORM.get(ZTable.class).list(DesignOrder.class, selector); + + int sum = 0; + long finalizeMoneyMerge = 0L;// 总设计金额 + for (DesignOrder order : list) + { + String designer = order.getDesigner(); + if (!map.containsKey(designer)) + { + map.put(designer, new RefundRateModel(designer)); + } + + RefundRateModel model = map.get(designer); + model.setSumCount(model.getSumCount() + 1); + model.setFinalizeMoneySum(model.getFinalizeMoneySum() + order.getAmount()); + finalizeMoneyMerge += order.getAmount(); + sum++; + } + + List designerStatList = new ArrayList(); + for (RefundRateModel model : map.values()) + {// 计算奖罚金 + if (model.getSumCount() == 0) + { + model.setRefundRate(0); + model.setAmount(0); + designerStatList.add(model); + continue; + } + + // 计算退款率 + String rate = Maths.division(model.getRefundCount() * 100, model.getSumCount(), 2); + long refundRate = (long) (Double.parseDouble(rate) * 100); + model.setRefundRate(refundRate); + + // 计算奖罚金 + long amount = StatDao.calculateAmount(refundRate, model.getSumCount(), request); + model.setAmount(amount); + + designerStatList.add(model); + } + + Collections.sort(designerStatList); + + request.setAttribute("beginDate", beginDate); + request.setAttribute("endDate", endDate); + request.setAttribute("designerStatList", designerStatList); + request.setAttribute("refundSum", refundSum); + request.setAttribute("sum", sum); + request.setAttribute("refundMoneyMerge", refundMoneyMerge); + request.setAttribute("finalizeMoneyMerge", finalizeMoneyMerge); + request.setAttribute("designer", operatorCode); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/stat/design/DesignOrderTypeStatAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/stat/design/DesignOrderTypeStatAction.java new file mode 100644 index 0000000..feeb787 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/stat/design/DesignOrderTypeStatAction.java @@ -0,0 +1,118 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action.stat.design; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.paging.PageBuilder; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dao.OperatorDao; +import com.zhiqim.yangcai.design.dbo.stat.OrderTypeStat; +import com.zhiqim.yangcai.design.model.OrderTypeStatModel; + +/** + * 订单类型统计显示 + * + * @version v1.0.0 @author liuhu 2018-12-14 新建与整理 + */ +public class DesignOrderTypeStatAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page", 1); + int pageSize = request.getContextAttributeInt("page.size", 15); + + String beginDate = request.getParameter("beginDate", DateTimes.getFirstMonthDay()); + String endDate = request.getParameter("endDate", DateTimes.getDateString()); + int day = DateTimes.compareDay(endDate, beginDate); + if (day > 31) + { + request.setResponseError("请勿将时间区间跨度选择大于一个月"); + return; + } + request.setAttribute("beginDate", beginDate); + request.setAttribute("endDate", endDate); + + Selector selector = new Selector(); + selector.addMustIsNotNull("designer"); + selector.addMaybeThenGE("date", beginDate); + selector.addMaybeThenLE("date", endDate); + OperatorDao.getOrgSelector(request, selector); + + List statList = ORM.get(ZTable.class).list(OrderTypeStat.class, selector); + + Map map = new HashMap(); + + for (OrderTypeStat stat : statList) + { + String designer = stat.getDesigner(); + if (!map.containsKey(designer)) + { + map.put(designer, new OrderTypeStatModel(designer)); + } + + OrderTypeStatModel model = map.get(designer); + model.setOrderSum(model.getOrderSum() + stat.getOrderSum()); + + model.setMultiple3_5(model.getMultiple3_5() + stat.getMultiple35()); + model.setMultiple6_8(model.getMultiple6_8() + stat.getMultiple68()); + model.setMultiple9_11(model.getMultiple9_11() + stat.getMultiple911()); + model.setMultiple12(model.getMultiple12() + stat.getMultiple12()); + + model.setNormalProcessing(model.getNormalProcessing() + stat.getNormalProcessing()); + model.setSpecialProcessing(model.getSpecialProcessing() + stat.getSpecialProcessing()); + model.setApplyOrder(model.getApplyOrder() + stat.getApplyOrder()); + + model.setAmount100_150(model.getAmount100_150() + stat.getAmount100150()); + model.setAmount150_200(model.getAmount150_200() + stat.getAmount150200()); + model.setAmount200_250(model.getAmount200_250() + stat.getAmount200250()); + model.setAmount250_300(model.getAmount250_300() + stat.getAmount250300()); + model.setAmount300_350(model.getAmount300_350() + stat.getAmount300350()); + model.setAmount350_400(model.getAmount350_400() + stat.getAmount350400()); + model.setAmount400_450(model.getAmount400_450() + stat.getAmount400450()); + model.setAmount450_500(model.getAmount450_500() + stat.getAmount450500()); + model.setAmount500(model.getAmount500() + stat.getAmount500()); + + long amount = model.getMultiple3_5() * 50 + model.getMultiple6_8() * 100 + model.getMultiple9_11() * 150 + model.getMultiple12() * 200 + + model.getNormalProcessing() * 100 + model.getSpecialProcessing() * 200 + model.getApplyOrder() * 100 + model.getAmount100_150() * 100 + + model.getAmount150_200() * 150 + model.getAmount200_250() * 200 + model.getAmount250_300() * 250 + model.getAmount300_350() * 300 + + model.getAmount350_400() * 350 + model.getAmount400_450() * 400 + model.getAmount450_500() * 450 + model.getAmount500() * 500; + model.setAmount(amount); + } + + List list = new ArrayList(); + for (OrderTypeStatModel model : map.values()) + { + list.add(model); + } + + Collections.sort(list); + PageResult pageResult = PageBuilder.pageResult(page, pageSize, list); + pageResult.addConditionMap(request.getParameterMap()); + + request.setAttribute("pageResult", pageResult); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/stat/design/DesignerPerformanceAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/stat/design/DesignerPerformanceAction.java new file mode 100644 index 0000000..1ea3998 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/stat/design/DesignerPerformanceAction.java @@ -0,0 +1,136 @@ +/** +* 扬彩印刷设计 + * 文件名 :DesignerPerformanceAction.java + * 创建人 :gjx + * 创建时间:2021年3月8日 +*/ + +package com.zhiqim.yangcai.design.action.stat.design; + +import java.util.ArrayList; +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.extend.LinkedMapSO; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZSQL; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.cache.ProductConvertCache; +import com.zhiqim.yangcai.design.constants.DraftConstants; +import com.zhiqim.yangcai.design.constants.StatusConstants; +import com.zhiqim.yangcai.design.dao.StatDao; +import com.zhiqim.yangcai.design.dbo.order.DesignSelfView; +import com.zhiqim.yangcai.design.model.DesignerPerformanceModel; + +/** + * + * [简要描述]: 设计师绩效统计
            + * [详细描述]:
            + * + * @version 1.0 @author gjx 2021年3月8日 新建与整理 + */ +public class DesignerPerformanceAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + String beginDate = request.getParameter("beginDate", DateTimes.getDateString()); + String endDate = request.getParameter("endDate", DateTimes.getDateString()); + int query = request.getParameterInt("query"); + int queryFlag = -1; + + int day = DateTimes.compareDay(endDate, beginDate); + if (day > 31) + { + request.setResponseError("请勿将时间区间跨度选择大于一个月"); + return; + } + + ZmrSessionUser sessionUser = request.getSessionUser(ZmrSessionUser.class); + // 只查自己 + String designer = sessionUser.getOperatorCode(); + + List pageModelList = new ArrayList(); + String firstMonthDay = DateTimes.getFirstMonthDay(); + if (query == 1 && firstMonthDay.compareTo(beginDate) > 0 && firstMonthDay.compareTo(endDate) > 0) + {// 往月 + queryFlag = 1; + StringBuilder builder = new StringBuilder(); + builder.append("select designer,count(*) orderEndCount,sum(order_designer_fee) designPerformance from designer_order_performance_stat"); + builder.append(" where designer = 'DESIGNER' and org_id = orgId and design_end_time >= 'beginDate' and design_end_time <= 'endDate'"); + builder.append(" group by designer order by designPerformance desc"); + String sql = builder.toString().replace("beginDate", beginDate + " 00:00:00").replace("endDate", endDate + " 23:59:59"); + sql = sql.replace("DESIGNER", designer); + sql = sql.replace("orgId", String.valueOf(sessionUser.getSelectedOrgId())); + + List queryList = ORM.get(ZSQL.class).executeQuery(sql); + for (LinkedMapSO so : queryList) + { + DesignerPerformanceModel model = new DesignerPerformanceModel(so.get("designer").toString()); + model.setOrderEndCount(Integer.valueOf(so.get("orderEndCount").toString())); + model.setDesignPerformance(Long.valueOf(so.get("designPerformance").toString())); + + pageModelList.add(model); + } + } + else if (query == 1 && firstMonthDay.compareTo(beginDate) <= 0 && firstMonthDay.compareTo(endDate) <= 0 && Validates.isNotEmpty(designer)) + {// 当月有选设计师才查询 + queryFlag = 1; + DesignerPerformanceModel model = new DesignerPerformanceModel(designer); + + Selector selector = new Selector(); + selector.addMustThenGE("designEndTime", Sqls.toTimestampBegin(beginDate)); + selector.addMustThenLE("designEndTime", Sqls.toTimestampEnd(endDate)); + selector.addMust("designer", designer); + selector.addMustThenGE("status", StatusConstants.ORDER_55.value()); + selector.addMustThenGE("draftType", DraftConstants.DRAFT_TEMPLATE.value()); + selector.addMustThenLE("draftType", DraftConstants.DRAFT_PAGE_DESIGN.value()); + selector.addOrderbyAsc("createTime"); + List orderList = ORM.get(ZView.class).list(DesignSelfView.class, selector); + + // 先更新产品单价缓存,防止数据未同步 + Global.get(ProductConvertCache.class).doRefresh(); + + long designerOrdCost = 0L; + long urgentPrice = 0L; + for (DesignSelfView order : orderList) + { + long designPrice = 0L; + if (order.getDesignPrice() == 0) + { + designPrice = StatDao.calculateOrderPerformance(order); + } + else + { + designPrice = order.getDesignPrice(); + } + + designerOrdCost += designPrice; + if (order.isUrgent() && Validates.isNotEmpty(order.getUrgentPrice())) + { + urgentPrice = order.getUrgentPrice(); + designerOrdCost += urgentPrice; + } + } + model.setDesignPerformance(designerOrdCost); + model.setOrderEndCount(orderList.size());// 定稿单数 + + pageModelList.add(model); + } + + request.setAttribute("queryFlag", queryFlag); + request.setAttribute("pageModelList", pageModelList); + request.setAttribute("designer", designer); + request.setAttribute("beginDate", beginDate); + request.setAttribute("endDate", endDate); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/stat/design/DraftOrderOrgTimelinessAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/stat/design/DraftOrderOrgTimelinessAction.java new file mode 100644 index 0000000..c25cb29 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/stat/design/DraftOrderOrgTimelinessAction.java @@ -0,0 +1,154 @@ +/** + * 扬彩印刷设计 + * 文件名 :DraftOrderOrgTimelinessAction.java + * 创建人 :jiangbin + * 创建时间:2020-6-19 + */ +package com.zhiqim.yangcai.design.action.stat.design; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.paging.PageBuilder; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.manager.dao.ZmrOrgDao; +import org.zhiqim.manager.dbo.ZmrOrg; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.constants.DraftConstants; +import com.zhiqim.yangcai.design.constants.StatusConstants; +import com.zhiqim.yangcai.design.dao.DesignTypeDao; +import com.zhiqim.yangcai.design.dbo.design.DesignType; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; +import com.zhiqim.yangcai.design.stat.model.DraftOrgTimelinessModel; + +/*** + * 初稿时效统计(组织) + * + * @version v1.0.0 @author jiangbin 2020-06-19 新建与整理 + */ +public class DraftOrderOrgTimelinessAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page", 1); + int pageSize = request.getContextAttributeInt("page.size", 15); + String beginDate = request.getParameter("beginDate", DateTimes.getPreviousDateString(7)); + String endDate = request.getParameter("endDate", DateTimes.getDateString()); + int day = DateTimes.compareDay(endDate, beginDate); + if (day > 31) + { + request.setResponseError("请勿将时间区间跨度选择大于一个月"); + return; + } + request.setAttribute("beginDate", beginDate); + request.setAttribute("endDate", endDate); + + Selector selector = new Selector(); + selector.addMustNotIn("status", StatusConstants.ORDER_F100.value(), StatusConstants.ORDER_F110.value()); + selector.addMustThenGE("status", StatusConstants.ORDER_50.value()); + selector.addMaybeThenGE("designDraftTime", Sqls.toTimestamp(beginDate, "00:00:00")); + selector.addMaybeThenLE("designDraftTime", Sqls.toTimestamp(endDate, "23:59:59")); + selector.addMustIn("draftType", DraftConstants.DRAFT_COMMON_DESIGN.value(), DraftConstants.DRAFT_PAGE_DESIGN.value()); + long orgId = request.getSessionUser(ZmrSessionUser.class).getSelectedOrgId(); + ZmrOrg org = ORM.get(ZTable.class).item(ZmrOrg.class, orgId); + if (org.getOrgLevel() > 0) + { + selector.addMust("orgId", orgId); + } + + List orgList = ZmrOrgDao.list(request); + List orderList = ORM.get(ZTable.class).list(DesignOrder.class, selector); + + Map modelMap = new HashMap(); + List typeList = DesignTypeDao.listAll(); + List showTypeList = DesignTypeDao.listDraftOrderTimelinessShowType(); + + for (DesignOrder order : orderList) + { + String orgName = ""; + for (ZmrOrg zmrOrg : orgList) + { + if (zmrOrg.getOrgId() == order.getOrgId()) + { + orgName = zmrOrg.getOrgName(); + } + } + DraftOrgTimelinessModel temp = modelMap.get(order.getOrgId()); + if (temp == null) + { + temp = new DraftOrgTimelinessModel(order.getOrgId(), orgName); + } + + HashMap numberMap = temp.getNumberMap(); + HashMap timeMap = temp.getTimeMap(); + + for (DesignType type : typeList) + { + int number = 0; // 类型的单数 + int time = 0; // 类型初稿总耗时(分钟) + + String typeName = type.getTypeName(); + if (order.getTypeId() == type.getTypeId()) // 先匹配单的类型 + { + boolean flag = false; + for (DesignType designType : showTypeList) + { + if (designType.getTypeId() == order.getTypeId()) + { + flag = true; + break; + } + } + if (!flag) + { + typeName = "其他"; + } + + if (numberMap.containsKey(typeName)) + { + number = numberMap.get(typeName) + 1; + } + else + { + number = 1; + } + + if (timeMap.containsKey(typeName)) + { + time = timeMap.get(typeName) + DateTimes.compareMinute(order.getDesignDraftTime(), order.getDesignReceiveTime()); + } + else + { + time = DateTimes.compareMinute(order.getDesignDraftTime(), order.getDesignReceiveTime()); + } + + numberMap.put(typeName, number); + timeMap.put(typeName, time); + + temp.setAllCount(temp.getAllCount() + 1); + temp.setAllTime(temp.getAllTime() + DateTimes.compareMinute(order.getDesignDraftTime(), order.getDesignReceiveTime())); + break; + } + } + modelMap.put(order.getOrgId(), temp); + } + + PageResult pageResult = PageBuilder.pageResult(page, pageSize, modelMap.values()); + pageResult.addConditionMap(request.getParameterMap()); + + request.setAttribute("pageResult", pageResult); + request.setAttribute("showTypeList", showTypeList); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/stat/design/DraftOrderOrgTimelinessInfoAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/stat/design/DraftOrderOrgTimelinessInfoAction.java new file mode 100644 index 0000000..8c9c7c3 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/stat/design/DraftOrderOrgTimelinessInfoAction.java @@ -0,0 +1,167 @@ +/** + * 扬彩印刷设计 + * 文件名 :DraftOrderOrgTimelinessInfoAction.java + * 创建人 :jiangbin + * 创建时间:2020-6-19 + */ +package com.zhiqim.yangcai.design.action.stat.design; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.paging.PageBuilder; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.manager.dao.ZmrDeptDao; +import org.zhiqim.manager.dbo.ZmrOrg; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.constants.DraftConstants; +import com.zhiqim.yangcai.design.constants.StatusConstants; +import com.zhiqim.yangcai.design.dao.DesignTypeDao; +import com.zhiqim.yangcai.design.dbo.design.DesignType; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; +import com.zhiqim.yangcai.design.stat.model.DraftTimelinessModel; + +/*** + * 初稿统计清单(组织) + * + * @version v1.0.0 @author jiangbin 2020-6-19 新建与整理 + */ +public class DraftOrderOrgTimelinessInfoAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page", 1); + int pageSize = request.getContextAttributeInt("page.size", 15); + String beginDate = request.getParameter("beginDate"); + String endDate = request.getParameter("endDate"); + long orgId = request.getParameterLong("orgId"); + + Selector selector = new Selector(); + selector.addMust("orgId", orgId); + selector.addMustNotIn("status", StatusConstants.ORDER_F100.value(), StatusConstants.ORDER_F110.value()); + selector.addMustThenGE("status", StatusConstants.ORDER_50.value()); + selector.addMaybeThenGE("designDraftTime", Sqls.toTimestamp(beginDate, "00:00:00")); + selector.addMaybeThenLE("designDraftTime", Sqls.toTimestamp(endDate, "23:59:59")); + selector.addMustIn("draftType", DraftConstants.DRAFT_COMMON_DESIGN.value(), DraftConstants.DRAFT_PAGE_DESIGN.value()); + ZmrSessionUser sessionUser = request.getSessionUser(ZmrSessionUser.class); + ZmrOrg sessionUserOrg = ORM.get(ZTable.class).item(ZmrOrg.class, sessionUser.getSelectedOrgId()); + + List allOrderList = ORM.get(ZTable.class).list(DesignOrder.class, selector); + + List orderList = new ArrayList<>(); + // 如果是管理员或者是总部的查看所有的 + if (sessionUser.getOperatorType() <= 1 || sessionUserOrg.getOrgLevel() == 0) + { + orderList = allOrderList; + } + else if (ZmrDeptDao.isDeptManager(request, sessionUser.getOperatorCode())) + {// 如果是部门主管查看部门下所有操作员的 + List operators = ZmrDeptDao.getDeptOperatorCodeList(request, sessionUser.getOperatorCode(), true); + for (DesignOrder designOrder : allOrderList) + { + for (String operatorCode : operators) + { + if (operatorCode.equals(designOrder.getDesigner())) + { + orderList.add(designOrder); + } + } + } + } + else + {// 普通操作员查看自己的 + for (DesignOrder designOrder : allOrderList) + { + if (sessionUser.getOperatorCode().equals(designOrder.getDesigner())) + { + orderList.add(designOrder); + } + } + } + + Map modelMap = new HashMap(); + List typeList = DesignTypeDao.listAll(); + List showTypeList = DesignTypeDao.listDraftOrderTimelinessShowType(); + + for (DesignOrder order : orderList) + { + DraftTimelinessModel temp = modelMap.get(order.getDesigner()); + if (temp == null) + { + temp = new DraftTimelinessModel(order.getDesigner()); + } + + HashMap numberMap = temp.getNumberMap(); + HashMap timeMap = temp.getTimeMap(); + + for (DesignType type : typeList) + { + int number = 0; // 类型的单数 + int time = 0; // 类型初稿总耗时(分钟) + + String typeName = type.getTypeName(); + if (order.getTypeId() == type.getTypeId()) // 先匹配单的类型 + { + boolean flag = false; + for (DesignType designType : showTypeList) + { + if (designType.getTypeId() == order.getTypeId()) + { + flag = true; + break; + } + } + if (!flag) + { + typeName = "其他"; + } + + if (numberMap.containsKey(typeName)) + { + number = numberMap.get(typeName) + 1; + } + else + { + number = 1; + } + + if (timeMap.containsKey(typeName)) + { + time = timeMap.get(typeName) + DateTimes.compareMinute(order.getDesignDraftTime(), order.getDesignReceiveTime()); + } + else + { + time = DateTimes.compareMinute(order.getDesignDraftTime(), order.getDesignReceiveTime()); + } + + numberMap.put(typeName, number); + timeMap.put(typeName, time); + + temp.setAllCount(temp.getAllCount() + 1); + temp.setAllTime(temp.getAllTime() + DateTimes.compareMinute(order.getDesignDraftTime(), order.getDesignReceiveTime())); + break; + } + } + modelMap.put(order.getDesigner(), temp); + } + + PageResult pageResult = PageBuilder.pageResult(page, pageSize, modelMap.values()); + pageResult.addConditionMap(request.getParameterMap()); + + request.setAttribute("pageResult", pageResult); + request.setAttribute("showTypeList", showTypeList); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/stat/design/DraftOrderTimelinessAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/stat/design/DraftOrderTimelinessAction.java new file mode 100644 index 0000000..5c36e12 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/stat/design/DraftOrderTimelinessAction.java @@ -0,0 +1,184 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action.stat.design; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.paging.PageBuilder; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.manager.dao.ZmrDeptDao; +import org.zhiqim.manager.dbo.ZmrOrg; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.constants.DraftConstants; +import com.zhiqim.yangcai.design.constants.StatusConstants; +import com.zhiqim.yangcai.design.dao.DesignTypeDao; +import com.zhiqim.yangcai.design.dbo.design.DesignType; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; +import com.zhiqim.yangcai.design.stat.model.DraftTimelinessModel; + +/*** + * 初稿时效统计 + * + * @version v1.0.0 @author longguizhi 2018-10-22 新建与整理 + */ +public class DraftOrderTimelinessAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page", 1); + int pageSize = request.getContextAttributeInt("page.size", 15); + String beginDate = request.getParameter("beginDate", DateTimes.getPreviousDateString(7)); + String endDate = request.getParameter("endDate", DateTimes.getDateString()); + int day = DateTimes.compareDay(endDate, beginDate); + if (day > 31) + { + request.setResponseError("请勿将时间区间跨度选择大于一个月"); + return; + } + request.setAttribute("beginDate", beginDate); + request.setAttribute("endDate", endDate); + + Selector selector = new Selector(); + selector.addMustNotIn("status", StatusConstants.ORDER_F100.value(), StatusConstants.ORDER_F110.value()); + selector.addMustThenGE("status", StatusConstants.ORDER_50.value()); + selector.addMaybeThenGE("designDraftTime", Sqls.toTimestamp(beginDate, "00:00:00")); + selector.addMaybeThenLE("designDraftTime", Sqls.toTimestamp(endDate, "23:59:59")); + selector.addMustIn("draftType", DraftConstants.DRAFT_COMMON_DESIGN.value(), DraftConstants.DRAFT_PAGE_DESIGN.value()); + + ZmrSessionUser sessionUser = request.getSessionUser(ZmrSessionUser.class); + long orgId = sessionUser.getSelectedOrgId(); + ZmrOrg org = ORM.get(ZTable.class).item(ZmrOrg.class, orgId); + if (org.getOrgLevel() > 0) + { + selector.addMust("orgId", orgId); + } + + List allOrderList = ORM.get(ZTable.class).list(DesignOrder.class, selector); + + List orderList = new ArrayList<>(); + // 如果是管理员或者是总部的查看所有的 + if (sessionUser.getOperatorType() <= 1 || org.getOrgLevel() == 0) + { + orderList = allOrderList; + } + else if (ZmrDeptDao.isDeptManager(request, sessionUser.getOperatorCode())) + {// 如果是部门主管查看部门下所有操作员的 + List operators = ZmrDeptDao.getDeptOperatorCodeList(request, sessionUser.getOperatorCode(), true); + for (DesignOrder designOrder : allOrderList) + { + for (String operatorCode : operators) + { + if (operatorCode.equals(designOrder.getDesigner())) + { + orderList.add(designOrder); + } + } + } + } + else + {// 普通操作员查看自己的 + for (DesignOrder designOrder : allOrderList) + { + if (sessionUser.getOperatorCode().equals(designOrder.getDesigner())) + { + orderList.add(designOrder); + } + } + } + + Map modelMap = new HashMap(); + List typeList = DesignTypeDao.listAll(); + List showTypeList = DesignTypeDao.listDraftOrderTimelinessShowType(); + + for (DesignOrder order : orderList) + { + DraftTimelinessModel temp = modelMap.get(order.getDesigner()); + if (temp == null) + { + temp = new DraftTimelinessModel(order.getDesigner()); + } + + HashMap numberMap = temp.getNumberMap(); + HashMap timeMap = temp.getTimeMap(); + + for (DesignType type : typeList) + { + int number = 0; // 类型的单数 + int time = 0; // 类型初稿总耗时(分钟) + + String typeName = type.getTypeName(); + if (order.getTypeId() == type.getTypeId()) // 先匹配单的类型 + { + boolean flag = false; + for (DesignType designType : showTypeList) + { + if (designType.getTypeId() == order.getTypeId()) + { + flag = true; + break; + } + } + if (!flag) + { + typeName = "其他"; + } + + if (numberMap.containsKey(typeName)) + { + number = numberMap.get(typeName) + 1; + } + else + { + number = 1; + } + + if (timeMap.containsKey(typeName)) + { + time = timeMap.get(typeName) + DateTimes.compareMinute(order.getDesignDraftTime(), order.getDesignReceiveTime()); + } + else + { + time = DateTimes.compareMinute(order.getDesignDraftTime(), order.getDesignReceiveTime()); + } + + numberMap.put(typeName, number); + timeMap.put(typeName, time); + + temp.setAllCount(temp.getAllCount() + 1); + temp.setAllTime(temp.getAllTime() + DateTimes.compareMinute(order.getDesignDraftTime(), order.getDesignReceiveTime())); + break; + } + } + modelMap.put(order.getDesigner(), temp); + } + + PageResult pageResult = PageBuilder.pageResult(page, pageSize, modelMap.values()); + pageResult.addConditionMap(request.getParameterMap()); + + request.setAttribute("pageResult", pageResult); + request.setAttribute("showTypeList", showTypeList); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/stat/design/DraftOrderTimelinessInfoAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/stat/design/DraftOrderTimelinessInfoAction.java new file mode 100644 index 0000000..1a3a5f2 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/stat/design/DraftOrderTimelinessInfoAction.java @@ -0,0 +1,67 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.action.stat.design; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.manager.dbo.ZmrOrg; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.constants.DraftConstants; +import com.zhiqim.yangcai.design.constants.StatusConstants; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; + +/*** + * 初稿统计清单 + * + * @version v1.0.0 @author longguizhi 2018-10-22 新建与整理 + */ +public class DraftOrderTimelinessInfoAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page", 1); + int pageSize = request.getContextAttributeInt("page.size", 15); + String beginDate = request.getParameter("beginDate"); + String endDate = request.getParameter("endDate"); + String designer = request.getParameter("designer"); + long prdTypeId = request.getParameterLong("prdTypeId"); + + Selector selector = new Selector(); + selector.addMust("designer", designer); + selector.addMust("typeId", prdTypeId); + selector.addMustNotIn("status", StatusConstants.ORDER_F100.value(), StatusConstants.ORDER_F110.value()); + selector.addMustThenGE("status", StatusConstants.ORDER_50.value()); + selector.addMaybeThenGE("designDraftTime", Sqls.toTimestamp(beginDate, "00:00:00")); + selector.addMaybeThenLE("designDraftTime", Sqls.toTimestamp(endDate, "23:59:59")); + selector.addMustIn("draftType", DraftConstants.DRAFT_COMMON_DESIGN.value(), DraftConstants.DRAFT_PAGE_DESIGN.value()); + long orgId = request.getSessionUser(ZmrSessionUser.class).getSelectedOrgId(); + ZmrOrg org = ORM.get(ZTable.class).item(ZmrOrg.class, orgId); + if (org.getOrgLevel() > 0) + { + selector.addMust("orgId", orgId); + } + + PageResult pageResult = ORM.get(ZTable.class).page(DesignOrder.class, page, pageSize, selector); + pageResult.addConditionMap(request.getParameterMap()); + + request.setAttribute("pageResult", pageResult); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/stat/design/DraftOrderTypeTimelinessAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/stat/design/DraftOrderTypeTimelinessAction.java new file mode 100644 index 0000000..1d83af1 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/stat/design/DraftOrderTypeTimelinessAction.java @@ -0,0 +1,80 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.action.stat.design; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.manager.dbo.ZmrOrg; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.constants.DraftConstants; +import com.zhiqim.yangcai.design.constants.StatusConstants; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; +import com.zhiqim.yangcai.design.stat.model.DraftTypeTimelinessModel; + +/** + * 初稿订单产品类型时效 + * + * @version v1.0.0 @author zzy 2018-8-7 新建与整理 + */ +public class DraftOrderTypeTimelinessAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + String beginDate = request.getParameter("beginDate", DateTimes.getFirstMonthDay()); + String endDate = request.getParameter("endDate", DateTimes.getDateString()); + request.setAttribute("beginDate", beginDate); + request.setAttribute("endDate", endDate); + + Selector selector = new Selector(); + selector.addMustNotIn("status", StatusConstants.ORDER_F100.value(), StatusConstants.ORDER_F110.value()); + selector.addMustThenGE("status", StatusConstants.ORDER_50.value()); + selector.addMaybeThenGE("designDraftTime", Sqls.toTimestamp(beginDate, "00:00:00")); + selector.addMaybeThenLE("designDraftTime", Sqls.toTimestamp(endDate, "23:59:59")); + selector.addMustIn("draftType",DraftConstants.DRAFT_COMMON_DESIGN.value() , DraftConstants.DRAFT_PAGE_DESIGN.value()); + long orgId = request.getSessionUser(ZmrSessionUser.class).getSelectedOrgId(); + ZmrOrg org = ORM.get(ZTable.class).item(ZmrOrg.class, orgId); + if(org.getOrgLevel() > 0) + { + selector.addMust("orgId", orgId); + return; + } + + List orderList = ORM.get(ZTable.class).list(DesignOrder.class,selector); + Map modelMap = new HashMap(); + for (DesignOrder order : orderList) + { + DraftTypeTimelinessModel temp = modelMap.get(order.getTypeId()); + if (temp == null) + temp = new DraftTypeTimelinessModel(order.getTypeId()); + + temp.setCount(temp.getCount() +1); + temp.setTime(temp.getTime() + DateTimes.compareMinute(order.getDesignDraftTime(), order.getCreateTime())); + + modelMap.put(order.getTypeId(), temp); + } + + request.setAttribute("timelinessList", modelMap.values()); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/stat/design/TimeoutDesignerCompleteAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/stat/design/TimeoutDesignerCompleteAction.java new file mode 100644 index 0000000..a37cb77 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/stat/design/TimeoutDesignerCompleteAction.java @@ -0,0 +1,74 @@ +/** + * 扬彩印刷设计 + * 文件名 :TimeoutDesignerCompleteAction.java + * 创建人 :gjx + * 创建时间:2020年11月6日 +*/ + +package com.zhiqim.yangcai.design.action.stat.design; + +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.extend.LinkedMapSO; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZSQL; + +/** + * + * [简要描述]:设计师定稿超时
            + * [详细描述]:
            + * + * @version 1.0 @author gjx 2020年11月6日 新建与整理 + */ +public class TimeoutDesignerCompleteAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + ZmrSessionUser sessionUser = request.getSessionUser(ZmrSessionUser.class); + String startDate = request.getParameter("startDate", DateTimes.getFirstMonthDay()); + String endDate = request.getParameter("endDate", DateTimes.getDateString()); + + int day = DateTimes.compareDay(endDate, startDate); + if (day > 31) + { + request.setResponseError("请勿将时间区间跨度选择大于一个月"); + return; + } + + String designer = sessionUser.getOperatorCode(); + + StringBuilder sqlStr = new StringBuilder( + "SELECT designer, count(*) timeoutNum FROM design_order WHERE CREATE_TIME >= 'startDateStr' AND CREATE_TIME <= 'endDateStr' "); + sqlStr.append(" AND designer = '" + designer + "'"); + sqlStr.append( + " AND DESIGN_BEGIN_TIME < SUBDATE(IF(design_order.`STATUS` >= 55,design_order.DESIGN_END_TIME,now()),INTERVAL (SELECT dt.EFFECTIVE_END_TIME FROM design_type dt WHERE dt.TYPE_ID = DESIGN_ORDER.TYPE_ID) MINUTE) GROUP BY DESIGNER HAVING count(*) > 0"); + sqlStr.append(" ORDER BY timeoutNum DESC"); + String sql = sqlStr.toString().replace("startDateStr", startDate + " 00:00:00").replace("endDateStr", endDate + " 23:59:59"); + Map timeoutMap = new LinkedHashMap(); + int timeoutOrderNumSum = 0; + + List timeoutEndStatList = ORM.get(ZSQL.class).executeQuery(sql); + for (LinkedMapSO so : timeoutEndStatList) + { + Integer timeoutOrderNum = Integer.valueOf(String.valueOf(so.get("timeoutNum"))); + timeoutOrderNumSum += timeoutOrderNum; + timeoutMap.put(String.valueOf(so.get("designer")), timeoutOrderNum); + } + + request.setAttribute("timeoutMap", timeoutMap); + request.setAttribute("timeoutOrderNumSum", timeoutOrderNumSum); + request.setAttribute("designer", designer); + request.setAttribute("startDate", startDate); + request.setAttribute("endDate", endDate); + + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/stat/design/ToMonthDesignStatAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/stat/design/ToMonthDesignStatAction.java new file mode 100644 index 0000000..ee1aed5 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/stat/design/ToMonthDesignStatAction.java @@ -0,0 +1,83 @@ +/** + * 扬彩印刷设计 + * 文件名 :CompleteDesignRateStatAction.java + * 创建人 :gjx + * 创建时间:2020年11月9日 +*/ + +package com.zhiqim.yangcai.design.action.stat.design; + +import java.util.ArrayList; +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.extend.LinkedMapSO; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZSQL; + +import com.zhiqim.yangcai.design.model.CompleteDesignRateStatModel; + +/** + * + * [简要描述]: 设计师定稿率统计
            + * [详细描述]:
            + * + * @version 1.0 @author gjx 2020年11月9日 新建与整理 + */ +public class ToMonthDesignStatAction implements Action +{ + @Override + public void execute(HttpRequest request) throws Exception + { + ZmrSessionUser sessionUser = request.getSessionUser(ZmrSessionUser.class); + String startDate = request.getParameter("startDate", DateTimes.getFirstMonthDay()); + String endDate = request.getParameter("endDate", DateTimes.getDateString()); + String designer = sessionUser.getOperatorCode(); + String firstMonthDay = DateTimes.getFirstMonthDay(); + if (((firstMonthDay.compareTo(startDate) > 0 && firstMonthDay.compareTo(endDate) <= 0) + || (firstMonthDay.compareTo(endDate) > 0 && firstMonthDay.compareTo(startDate) <= 0))) + { + request.setResponseError("不支持当月与往月跨月查询"); + return; + } + + StringBuilder sqlStr = new StringBuilder( + " SELECT d.designer, COUNT(*) orderNum,(SELECT COUNT(*) FROM design_order WHERE DESIGN_END_TIME >= 'startDateStr' AND DESIGN_END_TIME <= 'endDateStr' AND STATUS >= 55 AND ORG_ID = orgIdStr AND designer IS NOT NULL AND designer = d.designer ) orderEndNum,"); + sqlStr.append( + " ROUND((SELECT COUNT(*) FROM design_order WHERE DESIGN_END_TIME >= 'startDateStr' AND DESIGN_END_TIME <= 'endDateStr' AND STATUS >= 55 AND ORG_ID = orgIdStr AND designer IS NOT NULL AND designer = d.designer ) / COUNT(*) * 100,2) endProportion"); + sqlStr.append( + " FROM design_order d WHERE d.DESIGN_END_TIME >= 'startDateStr' AND d.DESIGN_END_TIME <= 'endDateStr' AND d.ORG_ID = orgIdStr AND d.designer IS NOT NULL AND d.designer = 'designerStr' GROUP BY d.designer ORDER BY endProportion DESC;"); + + String sql = sqlStr.toString().replace("startDateStr", startDate + " 00:00:00").replace("endDateStr", endDate + " 23:59:59"); + + sql = sql.replace("orgIdStr", String.valueOf(sessionUser.getSelectedOrgId())); + sql = sql.replace("designerStr", designer); + + List modelList = new ArrayList(); + List statList = ORM.get(ZSQL.class).executeQuery(sql); + for (LinkedMapSO so : statList) + { + String designerItem = String.valueOf(so.get("designer")); + if (Validates.isEmpty(designerItem)) + { + continue; + } + + CompleteDesignRateStatModel model = new CompleteDesignRateStatModel(designerItem); + model.setOrderNum(Integer.valueOf(String.valueOf(so.get("orderNum")))); + model.setOrderEndNum(Integer.valueOf(String.valueOf(so.get("orderEndNum")))); + model.setEndProportion(Double.valueOf(String.valueOf(so.get("endProportion")))); + + modelList.add(model); + } + + request.setAttribute("modelList", modelList); + request.setAttribute("designer", designer); + request.setAttribute("startDate", startDate); + request.setAttribute("endDate", endDate); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/AfterPicTypeAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/AfterPicTypeAction.java new file mode 100644 index 0000000..1de6e74 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/AfterPicTypeAction.java @@ -0,0 +1,97 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.action.sys; + +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.extend.StdSwitchAction; +import org.zhiqim.httpd.validate.ones.IsLen; +import org.zhiqim.httpd.validate.onex.IsNumeric; +import org.zhiqim.kernel.annotation.AnTransaction; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.design.dbo.design.AfterPicType; + +/**** + * 售后责任类型 + * + * @version v1.0.0 @author longguizhi 2018-12-15 新建与整理 + */ +public class AfterPicTypeAction extends StdSwitchAction +{ + protected void validateId(HttpRequest request) + { + request.addValidate(new IsNumeric("picType", "请选择一个选项")); + } + + protected void validateForm(HttpRequest request) + { + request.addValidate(new IsLen("picTypeName","责任归属名称不能为空且不能超过64个字符",1,64)); + } + + public void list(HttpRequest request) throws Exception + { + List dataList = ORM.get(ZTable.class).list(AfterPicType.class); + request.setAttribute("dataList", dataList); + } + + public void add(HttpRequest request) throws Exception + { + } + + public void modify(HttpRequest request) throws Exception + { + AfterPicType pic = ORM.get(ZTable.class).item(AfterPicType.class, request.getParameterLong("picType")); + if (pic == null) + { + request.returnHistory("数据不存在, 请稍后重试!"); + return; + } + request.setAttribute("pic", pic); + } + + @AnTransaction + protected void insert(HttpRequest request) throws Exception + { + AfterPicType data = request.getParameter(AfterPicType.class); + data.setPicType(Ids.longId()); + ORM.get(ZTable.class).insert(data); + } + + @AnTransaction + protected void update(HttpRequest request) throws Exception + { + AfterPicType data = request.getParameter(AfterPicType.class); + if (!Validates.isNumeric(request.getParameter("picType"))) + { + request.returnHistory("无效参数编号, 请稍后重试!"); + return; + } + + Updater update = new Updater(); + update.addMust("picType", data.getPicType()); + update.addField("picTypeName", data.getPicTypeName()); + update.addField("picStatus", data.getPicStatus()); + + ORM.get(ZTable.class).update(AfterPicType.class, update); + } + + protected void delete(HttpRequest request) throws Exception + { + + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/AfterProblemTypeAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/AfterProblemTypeAction.java new file mode 100644 index 0000000..b939db2 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/AfterProblemTypeAction.java @@ -0,0 +1,118 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.action.sys; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.extend.StdSwitchAction; +import org.zhiqim.httpd.validate.ones.IsLen; +import org.zhiqim.httpd.validate.ones.IsNumericLen; +import org.zhiqim.httpd.validate.onex.IsNumeric; +import org.zhiqim.kernel.annotation.AnTransaction; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.design.dbo.design.AfterPicType; +import com.zhiqim.yangcai.design.dbo.design.AfterProblemType; + + +/**** + * 售后责任类型 + * + * @version v1.0.0 @author longguizhi 2018-12-15 新建与整理 + */ +public class AfterProblemTypeAction extends StdSwitchAction +{ + protected void validateId(HttpRequest request) + { + request.addValidate(new IsNumeric("problemType", "请选择一个选项")); + } + + @Override + protected void validateForm(HttpRequest request) + { + request.addValidate(new IsNumericLen("picType", "请选择责任归属", 1, 20)); + request.addValidate(new IsLen("problemName","问题类型名称不能为空且不能超过100个字符",1,64)); + } + + public void list(HttpRequest request) throws Exception + { + int pageNo = request.getParameterInt("page"); + pageNo = pageNo <= 0 ? 1 : pageNo; + Selector selector = new Selector().addOrderbyAsc("picType,problemType"); + selector.addMaybe("picType", request.getParameterLong("picType")); + PageResult pageResult= ORM.get(ZTable.class).page(AfterProblemType.class, 1, 20, selector); + request.setAttribute("pageResult", pageResult); + + Map picNameMap = new HashMap(); + List picList = ORM.get(ZTable.class).list(AfterPicType.class); + for (AfterPicType pic : picList) + picNameMap.put(pic.getPicType(), pic.getPicTypeName()); + + request.setAttribute("picNameMap", picNameMap); + } + + public void add(HttpRequest request) throws Exception + { + List picList = ORM.get(ZTable.class).list(AfterPicType.class); + request.setAttribute("picList", picList); + } + + public void modify(HttpRequest request) throws Exception + { + List picList = ORM.get(ZTable.class).list(AfterPicType.class); + request.setAttribute("picList", picList); + + AfterProblemType problem = ORM.get(ZTable.class).item(AfterProblemType.class, request.getParameterLong("problemType")); + request.setAttribute("problem", problem); + } + + @AnTransaction + protected void insert(HttpRequest request) throws Exception + { + AfterProblemType data = request.getParameter(AfterProblemType.class); + data.setProblemType(Ids.longId()); + ORM.get(ZTable.class).insert(data); + } + + @AnTransaction + protected void update(HttpRequest request) throws Exception + { + AfterProblemType data = request.getParameter(AfterProblemType.class); + if (!Validates.isNumeric(request.getParameter("problemType"))) + { + request.returnHistory("无效参数编号, 请稍后重试!"); + return; + } + + Updater update = new Updater(); + update.addMust("problemType", data.getProblemType()); + update.addField("picType", data.getPicType()); + update.addField("problemName", data.getProblemName()); + update.addField("problemStatus", data.getProblemStatus()); + ORM.get(ZTable.class).update(AfterProblemType.class, update); + } + + @AnTransaction + protected void delete(HttpRequest request) throws Exception + { + ORM.get(ZTable.class).delete(AfterProblemType.class, request.getParameterLong("problemType")); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/CheckBackReasonAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/CheckBackReasonAction.java new file mode 100644 index 0000000..ac8430e --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/CheckBackReasonAction.java @@ -0,0 +1,186 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action.sys; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.annotation.AnTransaction; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.stat.CheckBackReason; +import com.zhiqim.yangcai.design.dbo.utils.BaseUtil; + +/** + * + * 印前原因预录 + * + * @version 1.0 @author gjx 2019-9-16 新建与整理 + */ +public class CheckBackReasonAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + long catId = request.getParameterLong("reasonCatId"); + Map> reasonMap = new HashMap>(); + List catList = new ArrayList(); + List tresaonList = ORM.get(ZTable.class).list(CheckBackReason.class, new Selector().addOrderbyAsc("reasonParent,reasonId")); + for (CheckBackReason reason : tresaonList) + { + + if (reason.isReasonType()) + { + catList.add(reason); + } + else + { + List list = reasonMap.get(reason.getReasonParent()); + list = list != null ? list : new ArrayList(); + list.add(reason); + reasonMap.put(reason.getReasonParent(), list); + } + } + + if (catId <= 0) + { + catId = 0; + if (catList.size() > 0) + { + catId = catList.get(0).getReasonId(); + } + } + + List reasonList = reasonMap.get(catId); + request.setAttribute("catList", catList); + request.setAttribute("catId", catId); + request.setAttribute("reasonList", reasonList != null ? reasonList : new ArrayList<>()); + } + + @AnTransaction + public void insert(HttpRequest request) throws Exception + { + CheckBackReason data = request.getParameter(CheckBackReason.class); + data.setReasonId(Ids.longId()); + if (data.isReasonType()) + { + if (Validates.isEmptyBlank(data.getReasonText()) || data.getReasonText().length() > 32) + { + request.setResponseError("原因分类 不能为空 且不能超过32字符"); + return; + } + + } + else + {// 原因项 + long parentId = data.getReasonParent(); + parentId = parentId <= 0 ? 0 : parentId; + + CheckBackReason parent = ORM.get(ZTable.class).item(CheckBackReason.class, parentId); + if (parent == null) + { + request.setResponseError("未知原因分类"); + return; + } + + if (data.isReasonType() && Validates.isEmptyBlank(data.getReasonText()) || data.getReasonText().length() > 32) + { + request.setResponseError("原因项 不能为空 且不能超过32字符"); + return; + } + } + + data.setReasonText(BaseUtil.removeBlank(data.getReasonText())); + ORM.get(ZTable.class).replace(data); + } + + @AnTransaction + public void update(HttpRequest request) throws Exception + { + CheckBackReason data = request.getParameter(CheckBackReason.class); + long reasonId = data.getReasonId(); + reasonId = reasonId <= 0 ? 0 : reasonId; + CheckBackReason reason = ORM.get(ZTable.class).item(CheckBackReason.class, reasonId); + if (reason == null) + { + request.setResponseError("未知原因"); + return; + } + + long parentId = data.getReasonParent(); + parentId = parentId <= 0 ? 0 : parentId; + + CheckBackReason parent = ORM.get(ZTable.class).item(CheckBackReason.class, parentId); + if (parent == null) + { + request.setResponseError("未知原因分类"); + return; + } + + if (data.isReasonType() && Validates.isEmptyBlank(data.getReasonText()) || data.getReasonText().length() > 32) + { + request.setResponseError("原因项 不能为空 且不能超过32字符"); + return; + } + data.setReasonText(BaseUtil.removeBlank(data.getReasonText())); + ORM.get(ZTable.class).replace(data); + } + + public void beforeDelete(HttpRequest request) throws Exception + { + long reasonId = request.getParameterLong("reasonId"); + CheckBackReason reason = ORM.get(ZTable.class).item(CheckBackReason.class, new Selector().addMaybe("reasonId", reasonId)); + if (reason == null) + { + request.setResponseError("预录原因不存在"); + return; + } + List reasonList = ORM.get(ZTable.class).list(CheckBackReason.class, new Selector().addMust("reasonParent", reason.getReasonParent())); + + boolean returnContent = false; + if (reasonList.size() == 1) + { + returnContent = true; + } + + request.setResponseResult(Jsons.toString(returnContent)); + } + + @AnTransaction + public void delete(HttpRequest request) throws Exception + { + long reasonId = request.getParameterLong("reasonId"); + CheckBackReason reason = ORM.get(ZTable.class).item(CheckBackReason.class, new Selector().addMaybe("reasonId", reasonId)); + if (reason == null) + { + request.setResponseError("预录原因不存在"); + return; + } + + List reasonList = ORM.get(ZTable.class).list(CheckBackReason.class, new Selector().addMust("reasonParent", reason.getReasonParent())); + if (reasonList.size() == 1) + { + ORM.get(ZTable.class).delete(CheckBackReason.class, reason.getReasonParent()); + } + ORM.get(ZTable.class).delete(CheckBackReason.class, reasonId); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/DesignTypeAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/DesignTypeAction.java new file mode 100644 index 0000000..0ac8e67 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/DesignTypeAction.java @@ -0,0 +1,477 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action.sys; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.extend.StdSwitchAction; +import org.zhiqim.httpd.validate.ones.IsIntegerValue; +import org.zhiqim.httpd.validate.ones.IsLen; +import org.zhiqim.httpd.validate.ones.IsNotEmpty; +import org.zhiqim.httpd.validate.onex.IsFloat; +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.annotation.AnTransaction; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.kernel.util.Lists; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.cache.DesignTypeCache; +import com.zhiqim.yangcai.design.dao.DesignTypeDao; +import com.zhiqim.yangcai.design.dbo.design.DesignSize; +import com.zhiqim.yangcai.design.dbo.design.DesignType; + +/*** + * 设计类型 + * + * @version v1.0.0 @author longguizhi 2018-9-6 新建与整理 + */ +public class DesignTypeAction extends StdSwitchAction +{ + @Override + protected void validateId(HttpRequest request) + { + request.addValidate(new IsNotEmpty("typeId", "请选择一个选项")); + } + + @Override + protected void validateForm(HttpRequest request) + { + request.addValidate(new IsLen("typeName", "设计类型名称不能为空且不能超过100个字符", 1, 100)); + request.addValidate(new IsIntegerValue("merDispatchEffectiveTime", "分拣时效不能为空,且数值在【1-99999】", 1, 99999)); + request.addValidate(new IsIntegerValue("dispatchOrderEffectiveTime", "派单时效不能为空,且数值在【1-99999】", 1, 99999)); + request.addValidate(new IsIntegerValue("effectiveTime", "初稿时效不能为空,且数值在【1-99999】", 1, 99999)); + request.addValidate(new IsIntegerValue("effectiveEndTime", "定稿时效不能为空,且数值在【1-99999】", 1, 99999)); + request.addValidate(new IsFloat("sizeMWidth", "模位尺寸宽不能为空")); + request.addValidate(new IsFloat("sizeMHeight", "模位尺寸高不能为空")); + } + + @Override + public void list(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page"); + int pageSize = request.getParameterInt("pageSize", 5); + + Selector selector = new Selector(); + selector.addMaybeLike("typeName", request.getParameter("typeName")); + selector.addMaybe("typeId", request.getParameterLong("typeId")); + if (request.getParameterInt("isEnabled") >= 0) + { + selector.addMaybe("isEnabled", request.getParameterInt("isEnabled") == 0 ? true : false); + } + selector.addOrderbyAsc("typeSeq"); + selector.addOrderbyDesc("typeId"); + + PageResult pageResult = ORM.get(ZTable.class).page(DesignType.class, page, pageSize, selector); + pageResult.addConditionMap(request.getParameterMap()); + + request.setAttribute("pageResult", pageResult); + + Map> typeSizeMap = new HashMap>(); + for (DesignType type : pageResult.list()) + { + List sizeList = ORM.get(ZTable.class).list(DesignSize.class, new Selector("typeId", type.getTypeId()).addOrderbyAsc("sizeSeq")); + typeSizeMap.put(type.getTypeId(), sizeList); + } + + request.setAttribute("typeSizeMap", typeSizeMap); + } + + @Override + public void add(HttpRequest request) throws Exception + { + List tempList = DesignTypeDao.listAll(); + + // 最大值排序号 + int typeSeq = tempList.size() == 0 ? 1 : tempList.get(tempList.size() - 1).getTypeSeq(); + request.setAttribute("typeSeq", typeSeq); + } + + @Override + public void modify(HttpRequest request) throws Exception + { + long typeId = request.getParameterLong("typeId"); + DesignType designType = ORM.get(ZTable.class).item(DesignType.class, typeId); + request.setAttribute("type", designType); + + List sizeList = ORM.get(ZTable.class).list(DesignSize.class, new Selector("typeId", typeId).addOrderbyAsc("sizeSeq")); + request.setAttribute("sizeList", sizeList); + } + + @Override + @AnTransaction + protected void insert(HttpRequest request) throws Exception + { + String designTypeName = request.getParameter("typeName"); + boolean isEnabled = request.getParameterBoolean("isEnabled"); + int typeSeq = request.getParameterInt("typeSeq"); + int merDispatchEffectiveTime = request.getParameterInt("merDispatchEffectiveTime"); + int dispatchOrderEffectiveTime = request.getParameterInt("dispatchOrderEffectiveTime"); + int effectiveTime = request.getParameterInt("effectiveTime"); + int effectiveEndTime = request.getParameterInt("effectiveEndTime"); + typeSeq = typeSeq <= 0 ? 1 : typeSeq; + + DesignType type = new DesignType(); + long typeId = Ids.longId13(); + type.setTypeId(typeId); + type.setTypeName(designTypeName); + type.setMerDispatchEffectiveTime(merDispatchEffectiveTime); + type.setDispatchOrderEffectiveTime(dispatchOrderEffectiveTime); + type.setEffectiveTime(effectiveTime); + type.setEffectiveEndTime(effectiveEndTime); + type.setEnabled(isEnabled); + type.setTypeSeq(typeSeq); + + String sizeMWidth = request.getParameter("sizeMWidth"); + String sizeMHeight = request.getParameter("sizeMHeight"); + type.setSizeMWidth(Double.valueOf(sizeMWidth)); + type.setSizeMHeight(Double.valueOf(sizeMHeight)); + + // 新增尺寸 + String sizeItem_new = request.getParameter("sizeItem_new"); + List sizeIdList_new = Lists.toLongList(sizeItem_new); + List sizeList = new ArrayList(); + for (int i = 0; i < sizeIdList_new.size(); i++) + { + long tempId = sizeIdList_new.get(i); + int sizeSeq = i + 1; + + int notLength = 2; + String width_str = request.getParameter("width_" + tempId); + String height_str = request.getParameter("height_" + tempId); + String side_str = request.getParameter("side_" + tempId, "0"); + String bleed_str = request.getParameter("bleed_" + tempId); + int sizeStatus = request.getParameterInt("sizeStatus_" + tempId); + if (!Validates.isFloat(width_str)) + { + request.returnHistory("您有不正确的设计尺寸,或者未填写"); + return; + } + + if (width_str.indexOf(".") != -1 && width_str.substring(width_str.indexOf(".") + 1).length() > notLength) + { + request.returnHistory("尺寸宽度只能保持" + notLength + "位小数"); + return; + } + + if (!Validates.isFloat(height_str)) + { + request.returnHistory("您有不正确的设计尺寸,或者未填写"); + return; + } + + if (height_str.indexOf(".") != -1 && height_str.substring(height_str.indexOf(".") + 1).length() > notLength) + { + request.returnHistory("尺寸宽度只能保持" + notLength + "位小数"); + return; + } + + if (Validates.isNotEmptyBlank(bleed_str) && !Validates.isFloat(bleed_str)) + { + request.returnHistory("您有不正确的设计尺寸,或者未填写"); + return; + } + + if (Validates.isNotEmptyBlank(bleed_str) && height_str.indexOf(".") != -1 && height_str.substring(height_str.indexOf(".") + 1).length() > notLength) + { + request.returnHistory("尺寸宽度只能保持" + notLength + "位小数"); + return; + } + + // yixin 2019-06-06 添加侧面长度支持,可为空 + if (!"".equals(side_str)) + { + if (!Validates.isFloat(side_str)) + { + request.returnHistory("您有不正确的设计尺寸,或者未填写"); + return; + } + + if (side_str.indexOf(".") != -1 && side_str.substring(side_str.indexOf(".") + 1).length() > notLength) + { + request.returnHistory("尺寸宽度只能保持" + notLength + "位小数"); + return; + } + } + + double sizeWidth = Double.valueOf(width_str); + double sizeHeight = Double.valueOf(height_str); + double sizeSide = Double.valueOf(side_str); + double sizeBleed = Double.valueOf(bleed_str); + + DesignSize size = new DesignSize(); + size.setSizeId(Ids.longId13()); + size.setTypeId(typeId); + size.setSizeWidth(sizeWidth); + size.setSizeHeight(sizeHeight); + size.setSizeSide(sizeSide); + size.setSizeBleed(sizeBleed); + size.setSizeStatus(sizeStatus == 1 ? 1 : 0); + size.setSizeSeq(sizeSeq); + sizeList.add(size); + } + + if (sizeList.size() == 0) + { + request.returnHistory("请添加设计尺寸"); + return; + } + + ORM.get(ZTable.class).insert(type); + // 重新排序 + sortTypeBySeq(typeId); + ORM.get(ZTable.class).insertBatch(sizeList); + + // 刷新缓存 + DesignTypeCache ctt = Global.get(DesignTypeCache.class); + ctt = ctt != null ? ctt : new DesignTypeCache(); + Global.remove(DesignTypeCache.class); + Global.add(DesignTypeCache.class, ctt.doRefresh()); + } + + @Override + @AnTransaction + protected void update(HttpRequest request) throws Exception + { + long typeId = request.getParameterLong("typeId"); + String designTypeName = request.getParameter("typeName"); + boolean isEnabled = request.getParameterBoolean("isEnabled"); + int typeSeq = request.getParameterInt("typeSeq"); + int merDispatchEffectiveTime = request.getParameterInt("merDispatchEffectiveTime"); + int dispatchOrderEffectiveTime = request.getParameterInt("dispatchOrderEffectiveTime"); + int effectiveTime = request.getParameterInt("effectiveTime"); + int effectiveEndTime = request.getParameterInt("effectiveEndTime"); + typeSeq = typeSeq <= 0 ? 1 : typeSeq; + Updater updater = new Updater(); + updater.addMust("typeId", typeId); + updater.addField("typeName", designTypeName); + updater.addField("isEnabled", isEnabled); + updater.addField("typeSeq", typeSeq); + updater.addField("merDispatchEffectiveTime", merDispatchEffectiveTime); + updater.addField("dispatchOrderEffectiveTime", dispatchOrderEffectiveTime); + updater.addField("effectiveTime", effectiveTime); + updater.addField("effectiveEndTime", effectiveEndTime); + String sizeMWidth = request.getParameter("sizeMWidth"); + String sizeMHeight = request.getParameter("sizeMHeight"); + updater.addField("sizeMWidth", Double.valueOf(sizeMWidth)); + updater.addField("sizeMHeight", Double.valueOf(sizeMHeight)); + ORM.get(ZTable.class).update(DesignType.class, updater); + // 重新排序 + sortTypeBySeq(typeId); + + // 刷新缓存 + DesignTypeCache ctt = Global.get(DesignTypeCache.class); + ctt = ctt != null ? ctt : new DesignTypeCache(); + Global.remove(DesignTypeCache.class); + Global.add(DesignTypeCache.class, ctt.doRefresh()); + + // 修改尺寸 + String sizeItem = request.getParameter("sizeItem"); + List sizeIdList = Lists.toLongList(sizeItem); + for (Long tempId : sizeIdList) + { + int notLength = 2; + + String width_str = request.getParameter("width_" + tempId); + String height_str = request.getParameter("height_" + tempId); + String side_str = request.getParameter("side_" + tempId, "0"); + String bleed_str = request.getParameter("bleed_" + tempId); + int sizeStatus = request.getParameterInt("sizeStatus_" + tempId); + if (!Validates.isFloat(width_str)) + { + request.returnHistory("您有不正确的设计尺寸,或者未填写"); + return; + } + + if (width_str.indexOf(".") != -1 && width_str.substring(width_str.indexOf(".") + 1).length() > notLength) + { + request.returnHistory("尺寸宽度只能保持" + notLength + "位小数"); + return; + } + + if (!Validates.isFloat(height_str)) + { + request.returnHistory("您有不正确的设计尺寸,或者未填写"); + return; + } + + if (height_str.indexOf(".") != -1 && height_str.substring(height_str.indexOf(".") + 1).length() > notLength) + { + request.returnHistory("尺寸宽度只能保持" + notLength + "位小数"); + return; + } + + // yixin 2019-06-06 添加侧面长度支持,可为空 + if (!"".equals(side_str)) + { + if (!Validates.isFloat(side_str)) + { + request.returnHistory("您有不正确的设计尺寸,或者未填写"); + return; + } + + if (side_str.indexOf(".") != -1 && side_str.substring(side_str.indexOf(".") + 1).length() > notLength) + { + request.returnHistory("尺寸宽度只能保持" + notLength + "位小数"); + return; + } + } + + if (Validates.isNotEmptyBlank(bleed_str) && !Validates.isFloat(bleed_str)) + { + request.returnHistory("您有不正确的设计尺寸,或者未填写"); + return; + } + + if (Validates.isNotEmptyBlank(bleed_str) && height_str.indexOf(".") != -1 && height_str.substring(height_str.indexOf(".") + 1).length() > notLength) + { + request.returnHistory("尺寸宽度只能保持" + notLength + "位小数"); + return; + } + + double sizeWidth = Double.valueOf(width_str); + double sizeSide = Double.valueOf(side_str); + double sizeHeight = Double.valueOf(height_str); + double sizeBleed = Double.valueOf(bleed_str); + + Updater updater2 = new Updater(); + updater2.addMust("typeId", typeId); + updater2.addMust("sizeId", tempId); + updater2.addField("sizeWidth", sizeWidth); + updater2.addField("sizeHeight", sizeHeight); + updater2.addField("sizeSide", sizeSide); + updater2.addField("sizeBleed", sizeBleed); + updater2.addField("sizeStatus", sizeStatus == 1 ? 1 : 0); + ORM.get(ZTable.class).update(DesignSize.class, updater2); + // DesignSize + } + + int sizeSeq = sizeIdList.size(); + // 新增尺寸 + String sizeItem_new = request.getParameter("sizeItem_new"); + List sizeIdList_new = Lists.toLongList(sizeItem_new); + + if (sizeIdList_new.size() == 0 && sizeIdList.size() == 0) + { + request.returnHistory("请添加设计尺寸"); + return; + } + + for (Long sizeId : sizeIdList_new) + { + sizeSeq++; + + int notLength = 2; + String width_str = request.getParameter("width_" + sizeId); + String height_str = request.getParameter("height_" + sizeId); + String bleed_str = request.getParameter("bleed_" + sizeId); + int sizeStatus = request.getParameterInt("sizeStatus_" + sizeId); + if (!Validates.isFloat(width_str)) + { + request.returnHistory("您有不正确的设计尺寸,或者未填写"); + return; + } + + if (width_str.indexOf(".") != -1 && width_str.substring(width_str.indexOf(".") + 1).length() > notLength) + { + request.returnHistory("尺寸宽度只能保持" + notLength + "位小数"); + return; + } + + if (!Validates.isFloat(height_str)) + { + request.returnHistory("您有不正确的设计尺寸,或者未填写"); + return; + } + + if (height_str.indexOf(".") != -1 && height_str.substring(height_str.indexOf(".") + 1).length() > notLength) + { + request.returnHistory("尺寸宽度只能保持" + notLength + "位小数"); + return; + } + + if (Validates.isNotEmptyBlank(bleed_str) && !Validates.isFloat(bleed_str)) + { + request.returnHistory("您有不正确的设计尺寸,或者未填写"); + return; + } + + if (Validates.isNotEmptyBlank(bleed_str) && height_str.indexOf(".") != -1 && height_str.substring(height_str.indexOf(".") + 1).length() > notLength) + { + request.returnHistory("尺寸宽度只能保持" + notLength + "位小数"); + return; + } + + double sizeWidth = Double.valueOf(width_str); + double sizeHeight = Double.valueOf(height_str); + double sizeBleed = Double.valueOf(bleed_str); + + DesignSize size = new DesignSize(); + size.setSizeId(Ids.longId13()); + size.setTypeId(typeId); + size.setSizeWidth(sizeWidth); + size.setSizeHeight(sizeHeight); + size.setSizeBleed(sizeBleed); + size.setSizeStatus(sizeStatus == 1 ? 1 : 0); + size.setSizeSeq(sizeSeq); + ORM.get(ZTable.class).insert(size); + } + + } + + @Override + protected void delete(HttpRequest request) throws Exception + { + // long designTypeId = request.getParameterLong("designTypeId"); + // ORM.get(ZTable.class).delete(designType.class, designTypeId); + } + + private void sortTypeBySeq(long currTypeId) throws Exception + { + List tempList = DesignTypeDao.listAll(); + Iterator iterator = tempList.iterator(); + int typeSeq = 0; + while (iterator.hasNext()) + { + DesignType item = iterator.next(); + if (currTypeId == item.getTypeId()) + { + typeSeq = item.getTypeSeq(); + iterator.remove(); + } + } + + if (tempList.size() == 0) + { + return; + } + + for (DesignType designType : tempList) + { + if (typeSeq == designType.getTypeSeq()) + { + typeSeq++; + designType.setTypeSeq(typeSeq); + ORM.get(ZTable.class).update(DesignType.class, + new Updater().addMust("typeId", designType.getTypeId()).addField("typeSeq", designType.getTypeSeq())); + } + } + + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/GroupMembersAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/GroupMembersAction.java new file mode 100644 index 0000000..cc2ee42 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/GroupMembersAction.java @@ -0,0 +1,42 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.action.sys; + +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.manager.dao.ZmrOrgDao; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.stat.DesignGroup; + +public class GroupMembersAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + long orgId = request.getSessionUser(ZmrSessionUser.class).getSelectedOrgId(); + Selector selector = new Selector(); + if (ZmrOrgDao.getOrgRootId(request) != orgId) + selector.addMust("orgId", orgId); + selector.addOrderbyAsc("groupSeq"); + List groupList = ORM.get(ZTable.class).list(DesignGroup.class, selector); + + request.setAttribute("groupList", groupList); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/IndustryListAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/IndustryListAction.java new file mode 100644 index 0000000..9886e9c --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/IndustryListAction.java @@ -0,0 +1,98 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action.sys; + +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.extend.StdSwitchAction; +import org.zhiqim.httpd.validate.ones.IsLen; +import org.zhiqim.httpd.validate.ones.IsNotEmpty; +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; + +import com.zhiqim.yangcai.cache.DesignIndustryCache; +import com.zhiqim.yangcai.design.dbo.design.DesignIndustry; + +public class IndustryListAction extends StdSwitchAction +{ + @Override + protected void validateId(HttpRequest request) + { + request.addValidate(new IsNotEmpty("industryId", "请选择一个选项")); + } + + @Override + protected void validateForm(HttpRequest request) + { + request.addValidate(new IsLen("industryName", "行业名称不能为空且不能超过20个字符", 1, 20)); + } + + @Override + protected void list(HttpRequest request) throws Exception + { + List industryList = Global.get(DesignIndustryCache.class).getIndustryListAll(); + + request.setAttribute("industryList", industryList); + } + + @Override + protected void add(HttpRequest request) throws Exception + { + } + + @Override + protected void modify(HttpRequest request) throws Exception + { + long industryId = request.getParameterLong("industryId"); + DesignIndustry industry = ORM.get(ZTable.class).item(DesignIndustry.class, industryId); + + request.setAttribute("industry", industry); + } + + @Override + protected void insert(HttpRequest request) throws Exception + { + DesignIndustry industry = request.getParameter(DesignIndustry.class); + + industry.setIndustryId(Ids.longId13()); + + if (industry.getIndustrySeq() <= 0) + { + industry.setIndustrySeq(ORM.get(ZTable.class).count(DesignIndustry.class) + 1); + } + + ORM.get(ZTable.class).insert(industry); + } + + @Override + protected void update(HttpRequest request) throws Exception + { + DesignIndustry industry = request.getParameter(DesignIndustry.class); + + if (industry.getIndustrySeq() <= 0) + { + industry.setIndustrySeq(ORM.get(ZTable.class).count(DesignIndustry.class) + 1); + } + + ORM.get(ZTable.class).replace(industry); + } + + @Override + protected void delete(HttpRequest request) throws Exception + { + long industryId = request.getParameterLong("industryId"); + ORM.get(ZTable.class).delete(DesignIndustry.class, industryId); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/MembersSelectorAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/MembersSelectorAction.java new file mode 100644 index 0000000..b33cafa --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/MembersSelectorAction.java @@ -0,0 +1,105 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.action.sys; + +import java.util.ArrayList; +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.util.Arrays; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Lists; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.manager.ZmrBootstrap; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.manager.dbo.ZmrOperator; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.stat.DesignGroup; +import com.zhiqim.yangcai.design.dbo.stat.GroupMembers; + +/**** + * TODO:设计师选择 + * + * @version v1.0.0 @author lgz 2019-3-6 新建与整理 + */ +public class MembersSelectorAction implements Action +{ + public void execute(HttpRequest request) throws Exception + { + request.setResponsePrivateCache(); + int operatorType = request.getParameterInt("operatorType"); + //查询本组织操作员(超级管理员可以查管理员,管理员和操作员只能查操作员) + long orgId = request.getParameterLong("orgId"); + if(orgId == -1) + return; + List excludesList = new ArrayList(); + + //获取查询排除的人 + switch (operatorType) + { + case 1://选择组长 + //需要排除的人 + Selector sel = new Selector(); + sel.addOrderbyAsc("orgId,groupSeq"); + List list = ORM.get(ZTable.class).list(DesignGroup.class, sel); + for (DesignGroup designGroup : list) + excludesList.add(designGroup.getGroupLeader()); + break; + case 2://选择操作员 + long groupId = request.getParameterLong("groupId"); + if (groupId == -1) + { + request.returnCloseDialog("未知小组编号"); + return; + } + + //有预设的不能选 + Selector sel1 = new Selector("startDate", DateTimes.getNextMonthFirstDay()); + List lms = ORM.get(ZTable.class).list(GroupMembers.class, sel1); + for (GroupMembers m : lms) + excludesList.add(m.getUserCode()); + + //未结束 组长不能选 + Selector sel2 = new Selector("isGroupLeader", 1); + sel2.addMustIsNull("endDate"); + List lms2 = ORM.get(ZTable.class).list(GroupMembers.class, sel2); + for (GroupMembers m : lms2) + excludesList.add(m.getUserCode()); + + break; + default: + request.returnCloseDialog("未知选择操作类型"); + return; + } + + ZmrSessionUser sessionUser = request.getSessionUser(ZmrSessionUser.class); + Selector selector = new Selector(); + selector.addMustThenG("operatorType", sessionUser.getOperatorTypeThenG()); + selector.addMust("orgId", orgId); + selector.addMust("operatorStatus", 0); + String operatorKey = request.getParameter("operatorKey"); + if (Validates.isNotEmpty(operatorKey))//条件 + selector.addOr(new Selector().addMaybeLike("operatorCode", operatorKey).addMaybeLike("operatorName", operatorKey)); + + if (excludesList.size() > 0) + selector.addMustNotIn("operatorCode", Arrays.toStringArray(Lists.toString(excludesList))); + List list = ZmrBootstrap.tableOpr(request).list(ZmrOperator.class, selector); + + request.setAttribute("list", list); + request.setAttribute("multiSelect", operatorType == 2); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/OrderConvertAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/OrderConvertAction.java new file mode 100644 index 0000000..f38d750 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/OrderConvertAction.java @@ -0,0 +1,197 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action.sys; + +import java.util.Arrays; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.extend.StdSwitchAction; +import org.zhiqim.httpd.validate.ones.IsGreaterThenValue; +import org.zhiqim.httpd.validate.ones.IsLen; +import org.zhiqim.httpd.validate.ones.IsNotEmpty; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.design.dbo.stat.OrderConvert; + +/** + * 订单折算类 + * + * @version v1.0.0 @author liuhu 2018-12-13 新建与整理 + */ +public class OrderConvertAction extends StdSwitchAction +{ + @Override + protected void validateId(HttpRequest request) + { + request.addValidate(new IsNotEmpty("convertId", "请选择一个选项")); + request.addParam("page", request.getParameterInt("page", 1)); + request.setAttribute("page", request.getParameterInt("page", 1)); + } + + @Override + protected void validateForm(HttpRequest request) + { + request.addValidate(new IsGreaterThenValue("prdTypeId", "请选择产品类型", "0")); + request.addValidate(new IsGreaterThenValue("convertType", "请选择折算类型", "-1")); + request.addValidate(new IsLen("convertNum", "折算系数不能为空且不超过10个字符", 1, 10)); + } + + @Override + protected void list(HttpRequest request) throws Exception + { + + int page = request.getParameterInt("page", 1); + int pageSize = request.getContextAttributeInt("page.size", 15); + long prdTypeId = request.getParameterLong("prdTypeId"); + + Selector selector = new Selector(); + selector.addOrderbyAsc("prdTypeId"); + if (prdTypeId != -1) + { + selector.addMustInLong("prdTypeId", prdTypeId); + } + PageResult pageResult = ORM.get(ZTable.class).page(OrderConvert.class, page, pageSize, selector); + request.setAttribute("pageResult", pageResult); + } + + @Override + protected void add(HttpRequest request) throws Exception + { + } + + @Override + protected void insert(HttpRequest request) throws Exception + { + String[] modulus = request.getParameterValues("modulus"); + String[] modulusConvertNum = request.getParameterValues("modulusConvertNum"); + int convertType = request.getParameterInt("convertType"); + + // 如果折算类型为系数则校验-折算模数和折算系数 + if (2 == convertType) + { + if (Validates.isEmpty(modulus) || Validates.isEmpty(modulusConvertNum)) + { + request.returnHistory("模数折算系数不能为空!"); + return; + } + if (modulus.length != modulusConvertNum.length) + { + request.returnHistory("模数折算系数不能为空!"); + return; + } + for (int i = 0; i < modulusConvertNum.length; i++) + { + if (Validates.isEmpty(modulusConvertNum[i])) + { + request.returnHistory("模数折算系数不能为空!"); + return; + } + } + } + + String convertStr = request.getParameter("convertNum"); + long prdTypeId = request.getParameterLong("prdTypeId"); + String prdTypeName = request.getParameter("prdTypeName"); + + double convertNum = Double.valueOf(convertStr); + + Selector selector = new Selector(); + selector.addMustInLong("prdTypeId", prdTypeId); + OrderConvert orderConvert = ORM.get(ZTable.class).item(OrderConvert.class, selector); + if (orderConvert != null) + { + request.returnHistory("每种产品只允许一条折算系数"); + return; + } + + orderConvert = new OrderConvert(); + orderConvert.setConvertId(Ids.longId13()); + orderConvert.setConvertType(convertType); + orderConvert.setConvertNum(convertNum); + orderConvert.setPrdTypeId(prdTypeId); + orderConvert.setPrdTypeName(prdTypeName); + orderConvert.setConvertModulus(request.getParameter("modulus")); + orderConvert.setConvertModulusNum(request.getParameter("modulusConvertNum")); + orderConvert.setModifyTime(Sqls.nowTimestamp()); + ORM.get(ZTable.class).insert(orderConvert); + } + + @Override + protected void modify(HttpRequest request) throws Exception + { + long convertId = request.getParameterLong("convertId"); + OrderConvert orderConvert = ORM.get(ZTable.class).item(OrderConvert.class, convertId); + request.setAttribute("convertModulus", Arrays.asList(orderConvert.getConvertModulus().split(","))); + request.setAttribute("convertModulusNum", Arrays.asList(orderConvert.getConvertModulusNum().split(","))); + request.setAttribute("orderConvert", orderConvert); + } + + @Override + protected void update(HttpRequest request) throws Exception + { + long convertId = request.getParameterLong("convertId"); + String[] modulus = request.getParameterValues("modulus"); + String[] modulusConvertNum = request.getParameterValues("modulusConvertNum"); + int convertType = request.getParameterInt("convertType"); + + // 如果折算类型为系数则校验-折算模数和折算系数 + if (2 == convertType) + { + if (Validates.isEmpty(modulus) || Validates.isEmpty(modulusConvertNum)) + { + request.returnHistory("模数折算系数不能为空!"); + return; + } + if (modulus.length != modulusConvertNum.length) + { + request.returnHistory("模数折算系数不能为空!"); + return; + } + for (int i = 0; i < modulusConvertNum.length; i++) + { + if (Validates.isEmpty(modulusConvertNum[i])) + { + request.returnHistory("模数折算系数不能为空!"); + return; + } + } + } + + String convertStr = request.getParameter("convertNum"); + double convertNum = Double.valueOf(convertStr); + + Updater updater = new Updater(); + updater.addMust("convertId", convertId); + updater.addField("convertType", convertType); + updater.addField("convertNum", convertNum); + updater.addField("convertModulus", request.getParameter("modulus")); + updater.addField("convertModulusNum", request.getParameter("modulusConvertNum")); + updater.addField("modifyTime", Sqls.nowTimestamp()); + ORM.get(ZTable.class).update(OrderConvert.class, updater); + } + + @Override + protected void delete(HttpRequest request) throws Exception + { + long convertId = request.getParameterLong("convertId"); + + ORM.get(ZTable.class).delete(OrderConvert.class, convertId); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/OrderMerchantAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/OrderMerchantAction.java new file mode 100644 index 0000000..05aa683 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/OrderMerchantAction.java @@ -0,0 +1,105 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.action.sys; + +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.extend.StdSwitchAction; +import org.zhiqim.httpd.validate.ones.IsLen; +import org.zhiqim.httpd.validate.ones.IsNotEmpty; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.design.dbo.design.DesignMerchant; + +/*** + * 订单商户 + * + * @version v1.0.0 @author longguizhi 2018-9-10 新建与整理 + */ +public class OrderMerchantAction extends StdSwitchAction +{ + + @Override + protected void validateId(HttpRequest request) throws Exception + { + request.addValidate(new IsNotEmpty("merchantId", "请选择一个选项")); + } + + @Override + protected void validateForm(HttpRequest request) throws Exception + { + request.addValidate(new IsLen("merchantName", "商户名不能为空,且不能操作20个字符", 1, 20)); + request.addValidate(new IsLen("merchantSecret", "商户名不能为空,且不能操作2048个字符", 6, 2048)); + } + + @Override + protected void list(HttpRequest request) throws Exception + { + List merchantList = ORM.get(ZTable.class).list(DesignMerchant.class); + request.setAttribute("merchantList", merchantList); + } + + @Override + protected void add(HttpRequest request) throws Exception + { + + } + + @Override + protected void modify(HttpRequest request) throws Exception + { + long merchantId = request.getParameterLong("merchantId", 0); + DesignMerchant merchant = ORM.get(ZTable.class).item(DesignMerchant.class, merchantId); + if (merchant == null) + { + request.returnHistory("商户不存在!"); + return; + } + + request.setAttribute("merchant", merchant); + } + + @Override + protected void insert(HttpRequest request) throws Exception + { + DesignMerchant merchant = request.getParameter(DesignMerchant.class); + merchant.setMerchantId(Ids.longId13()); + ORM.get(ZTable.class).insert(merchant); + } + + @Override + protected void update(HttpRequest request) throws Exception + { + long merchantId = request.getParameterLong("merchantId", 0); + String merchantName = request.getParameter("merchantName"); + String merchantSecret = request.getParameter("merchantSecret"); + boolean isEnabled = request.getParameterBoolean("isEnabled"); + Updater updater = new Updater(); + updater.addMust("merchantId", merchantId); + updater.addField("merchantName", merchantName); + updater.addField("merchantSecret", merchantSecret); + updater.addField("isEnabled", isEnabled); + ORM.get(ZTable.class).update(DesignMerchant.class, updater); + } + + @Override + protected void delete(HttpRequest request) throws Exception + { + // TODO Auto-generated method stub + + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/PerformanceParameterAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/PerformanceParameterAction.java new file mode 100644 index 0000000..4495cba --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/PerformanceParameterAction.java @@ -0,0 +1,320 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action.sys; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.extend.StdSwitchAction; +import org.zhiqim.httpd.validate.ones.IsIntegerValue; +import org.zhiqim.httpd.validate.ones.IsNotEmpty; +import org.zhiqim.httpd.validate.onex.IsFloat; +import org.zhiqim.kernel.annotation.AnTransaction; +import org.zhiqim.kernel.paging.PageBuilder; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.stat.PerformanceParam; + +/** + * 设计绩效参数类 + * + * @version v1.0.0 @author liuhu 2019-1-5 新建与整理 + */ +public class PerformanceParameterAction extends StdSwitchAction +{ + + @Override + protected void validateId(HttpRequest request) throws Exception + { + request.addValidate(new IsNotEmpty("orgId", "请选择一个选项")); + } + + @Override + protected void validateForm(HttpRequest request) throws Exception + { + request.addValidate(new IsFloat("priceLevel1", "请填写试一级单价")); + request.addValidate(new IsFloat("priceLevel1", "请填写试二级单价")); + request.addValidate(new IsFloat("priceLevel1", "请填写正三级单价")); + request.addValidate(new IsFloat("priceLevel1", "请填写正四级单价")); + request.addValidate(new IsFloat("priceLevel1", "请填写正五级单价")); + request.addValidate(new IsFloat("priceLevel1", "请填写正六级单价")); + + request.addValidate(new IsIntegerValue("level1MaxCount", "请填写试一级上限单数(1-6)字符", 0, 999999)); + request.addValidate(new IsIntegerValue("level2MaxCount", "请填写试二级上限单数(1-6)字符", 0, 999999)); + request.addValidate(new IsIntegerValue("level3MaxCount", "请填写正三级上限单数(1-6)字符", 0, 999999)); + request.addValidate(new IsIntegerValue("level4MaxCount", "请填写正四级上限单数(1-6)字符", 0, 999999)); + request.addValidate(new IsIntegerValue("level5MaxCount", "请填写正五级上限单数(1-6)字符", 0, 999999)); + request.addValidate(new IsIntegerValue("level6MaxCount", "请填写正六级上限单数(1-6)字符", 0, 999999)); + } + + @Override + protected void list(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page", 1); + int pageSize = request.getContextAttributeInt("page.size", 20); + String validDate = request.getParameter("validDate", DateTimes.getFirstMonthDay()); + + String validDate1 = DateTimes.compareDay(validDate, DateTimes.getNextMonthFirstDay()) > 0 ? DateTimes.getNextMonthFirstDay() : validDate; + Selector selector = new Selector(); + selector.addMustThenLE("validDate", validDate1); + selector.addOrderbyDesc("validDate");// 必须倒序显示 + selector.addOrderbyAsc("orgId"); + selector.addOrderbyDesc("priceType"); + PageResult tempPageResult = ORM.get(ZTable.class).page(PerformanceParam.class, page, pageSize, selector); + Map> dataMap = new LinkedHashMap<>(); + Map tempMap = new HashMap(); + List dataList = new ArrayList(); + for (PerformanceParam param : tempPageResult.list()) + { + List list = dataMap.get(param.getOrgId()); + list = list != null ? list : new ArrayList(); + + String key = "" + param.getOrgId() + "_" + param.getPriceType(); + PerformanceParam tp = tempMap.get(key); + if (tp == null || DateTimes.compareDay(tp.getValidDate(), param.getValidDate()) < 0) + { + tempMap.put(key, param); + list.add(param); + dataList.add(param); + } + dataMap.put(param.getOrgId(), list); + } + + PageResult pageResult = PageBuilder.pageResult(page, pageSize, dataList); + pageResult.addConditionMap(request.getParameterMap()); + request.setAttribute("dataMap", dataMap); + request.setAttribute("pageResult", pageResult); + request.setAttribute("validDate", validDate); + request.setAttribute("year", Integer.valueOf(validDate.split("-")[0])); + request.setAttribute("month", Integer.valueOf(validDate.split("-")[1])); + + } + + @Override + protected void add(HttpRequest request) throws Exception + { + } + + @Override + protected void modify(HttpRequest request) throws Exception + { + long orgId = request.getParameterLong("orgId"); + String validDate = request.getParameter("validDate"); + int priceType = request.getParameterInt("priceType"); + + if (orgId <= 0 || !Validates.isDate(validDate) || (priceType != 0 && priceType != 1)) + { + request.returnHistory("未知请求参数"); + return; + } + + PerformanceParam parameter = ORM.get(ZTable.class).item(PerformanceParam.class, + new Selector("validDate", validDate).addMust("orgId", orgId).addMust("priceType", priceType)); + if (parameter == null) + { + request.returnHistory("参数不存在"); + return; + } + + request.setAttribute("param", parameter); + } + + @Override + @AnTransaction + protected void insert(HttpRequest request) throws Exception + { + long orgId = request.getParameterLong("orgId"); + if (orgId == -1) + { + request.returnHistory("请选择组织"); + return; + } + + int priceType = request.getParameterInt("priceType"); + if (priceType != 1 && priceType != 0) + { + request.returnHistory("无效单价类型"); + return; + } + + PerformanceParam parameter = ORM.get(ZTable.class).item(PerformanceParam.class, new Selector("orgId", orgId).addMust("priceType", priceType)); + if (parameter != null) + { + request.returnHistory("该组织 已设置设计绩效参数"); + return; + } + + long priceLevel1 = request.getParameterAmount2RLong("priceLevel1"); + long priceLevel2 = request.getParameterAmount2RLong("priceLevel2"); + long priceLevel3 = request.getParameterAmount2RLong("priceLevel3"); + long priceLevel4 = request.getParameterAmount2RLong("priceLevel4"); + long priceLevel5 = request.getParameterAmount2RLong("priceLevel5"); + long priceLevel6 = request.getParameterAmount2RLong("priceLevel6"); + + int level1MaxCount = request.getParameterInt("level1MaxCount"); + int level2MaxCount = request.getParameterInt("level2MaxCount"); + int level3MaxCount = request.getParameterInt("level3MaxCount"); + int level4MaxCount = request.getParameterInt("level4MaxCount"); + int level5MaxCount = request.getParameterInt("level5MaxCount"); + int level6MaxCount = request.getParameterInt("level6MaxCount"); + + if (level6MaxCount != 0 && level6MaxCount <= level5MaxCount) + { + request.returnHistory("正六级上限单数 必须大于正五级上限单数"); + return; + } + + if (level5MaxCount != 0 && level5MaxCount <= level4MaxCount) + { + request.returnHistory("正五级上限单数 必须大于正四级上限单数"); + return; + } + + if (level4MaxCount != 0 && level4MaxCount <= level3MaxCount) + { + request.returnHistory("正四级上限单数 必须大于正三级上限单数"); + return; + } + + if (level3MaxCount != 0 && level3MaxCount <= level2MaxCount) + { + request.returnHistory("正三级上限单数 必须大于试二级上限单数"); + return; + } + + if (level2MaxCount != 0 && level2MaxCount <= level1MaxCount) + { + request.returnHistory("试二级上限单数 必须大于试一级上限单数"); + return; + } + + parameter = new PerformanceParam(); + parameter.setValidDate(DateTimes.getFirstMonthDay()); + parameter.setOrgId(orgId); + parameter.setPriceType(priceType); + + parameter.setPriceLevel1(priceLevel1); + parameter.setPriceLevel2(priceLevel2); + parameter.setPriceLevel3(priceLevel3); + parameter.setPriceLevel4(priceLevel4); + parameter.setPriceLevel5(priceLevel5); + parameter.setPriceLevel6(priceLevel6); + + parameter.setLevel1MaxCount(level1MaxCount); + parameter.setLevel2MaxCount(level2MaxCount); + parameter.setLevel3MaxCount(level3MaxCount); + parameter.setLevel4MaxCount(level4MaxCount); + parameter.setLevel5MaxCount(level5MaxCount); + parameter.setLevel6MaxCount(level6MaxCount); + + ORM.get(ZTable.class).insert(parameter); + } + + @Override + @AnTransaction + protected void update(HttpRequest request) throws Exception + { + long orgId = request.getParameterLong("orgId"); + String validDate = request.getParameter("validDate"); + int priceType = request.getParameterInt("priceType"); + if (priceType != 1 && priceType != 0) + { + request.returnHistory("无效单价类型"); + return; + } + + long priceLevel1 = request.getParameterAmount2RLong("priceLevel1"); + long priceLevel2 = request.getParameterAmount2RLong("priceLevel2"); + long priceLevel3 = request.getParameterAmount2RLong("priceLevel3"); + long priceLevel4 = request.getParameterAmount2RLong("priceLevel4"); + long priceLevel5 = request.getParameterAmount2RLong("priceLevel5"); + long priceLevel6 = request.getParameterAmount2RLong("priceLevel6"); + + int level1MaxCount = request.getParameterInt("level1MaxCount"); + int level2MaxCount = request.getParameterInt("level2MaxCount"); + int level3MaxCount = request.getParameterInt("level3MaxCount"); + int level4MaxCount = request.getParameterInt("level4MaxCount"); + int level5MaxCount = request.getParameterInt("level5MaxCount"); + int level6MaxCount = request.getParameterInt("level6MaxCount"); + + if (level6MaxCount != 0 && level6MaxCount <= level5MaxCount) + { + request.returnHistory("正六级上限单数 必须大于正五级上限单数"); + return; + } + + if (level5MaxCount != 0 && level5MaxCount <= level4MaxCount) + { + request.returnHistory("正五级上限单数 必须大于正四级上限单数"); + return; + } + + if (level4MaxCount != 0 && level4MaxCount <= level3MaxCount) + { + request.returnHistory("正四级上限单数 必须大于正三级上限单数"); + return; + } + + if (level3MaxCount != 0 && level3MaxCount <= level2MaxCount) + { + request.returnHistory("正三级上限单数 必须大于试二级上限单数"); + return; + } + + if (level2MaxCount != 0 && level2MaxCount <= level1MaxCount) + { + request.returnHistory("试二级上限单数 必须大于试一级上限单数"); + return; + } + + PerformanceParam parameter = new PerformanceParam(); + parameter.setValidDate(validDate); + parameter.setOrgId(orgId); + parameter.setPriceType(priceType); + + parameter.setPriceLevel1(priceLevel1); + parameter.setPriceLevel2(priceLevel2); + parameter.setPriceLevel3(priceLevel3); + parameter.setPriceLevel4(priceLevel4); + parameter.setPriceLevel5(priceLevel5); + parameter.setPriceLevel6(priceLevel6); + + parameter.setLevel1MaxCount(level1MaxCount); + parameter.setLevel2MaxCount(level2MaxCount); + parameter.setLevel3MaxCount(level3MaxCount); + parameter.setLevel4MaxCount(level4MaxCount); + parameter.setLevel5MaxCount(level5MaxCount); + parameter.setLevel6MaxCount(level6MaxCount); + + ORM.get(ZTable.class).replace(parameter); + + } + + @Override + @AnTransaction + protected void delete(HttpRequest request) throws Exception + { + // long orgId = request.getParameterLong("orgId"); + // + // ORM.get(ZTable.class).delete(PerformanceParam.class, orgId); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/ProductConvertAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/ProductConvertAction.java new file mode 100644 index 0000000..a2c79b7 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/ProductConvertAction.java @@ -0,0 +1,324 @@ +/** + * 扬彩印刷设计 + * 文件名 :ProductConvertAction.java + * 创建人 :gjx + * 创建时间:2021年3月4日 +*/ + +package com.zhiqim.yangcai.design.action.sys; + +import java.sql.Timestamp; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.extend.StdSwitchAction; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.Amounts; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.design.dbo.design.DesignPrice; +import com.zhiqim.yangcai.design.dbo.design.ProductConvert; +import com.zhiqim.yangcai.design.dbo.design.ProductDesignPriceView; +import com.zhiqim.yangcai.design.dbo.score.ScoreDesignerLever; +import com.zhiqim.yangcai.util.RandomUtil; + +/** + * + * [简要描述]: 产品单价配置
            + * [详细描述]:
            + * + * @version 1.0 @author gjx 2021年3月4日 新建与整理 + */ +@AnAlias("ProductConvertAction") +public class ProductConvertAction extends StdSwitchAction +{ + + @Override + protected void add(HttpRequest request) throws Exception + { + List leverList = ORM.get(ZTable.class).list(ScoreDesignerLever.class, new Selector().addOrderbyAsc("minScore")); + + request.setAttribute("leverList", leverList); + + } + + @Override + protected void delete(HttpRequest request) throws Exception + { + long convertId = request.getParameterLong("convertId"); + + ORM.get(ZTable.class).delete(ProductConvert.class, convertId); + ORM.get(ZTable.class).delete(DesignPrice.class, new Selector().addMust("convertId", convertId)); + } + + @Override + protected void insert(HttpRequest request) throws Exception + { + ProductConvert prdCvt = request.getParameter(ProductConvert.class); + + int prdSizeWidth = prdCvt.getPrdSizeWidth(); + int prdSizeHeight = prdCvt.getPrdSizeHeight(); + if ((prdSizeWidth > 0 && prdSizeHeight <= 0) || (prdSizeHeight > 0 && prdSizeWidth <= 0)) + { + request.returnHistory("请完整填写尺寸信息"); + return; + } + + boolean sizeNotNull = prdSizeWidth > 0 && prdSizeHeight > 0; + + Selector selector = new Selector(); + selector.addMust("prdTypeId", prdCvt.getPrdTypeId()); + if (sizeNotNull && Validates.isNotEmpty(prdCvt.getPrdPageName())) + { + prdCvt.setSeq(Integer.valueOf(RandomUtil.randomLengthDigit(8))); + + selector.addMustThenG("prdSizeWidth", 0); + selector.addMustThenG("prdSizeHeight", 0); + selector.addMust("prdPageName", prdCvt.getPrdPageName());// 查询产品配有尺寸 面数名称相等的数据 + } + else if (sizeNotNull) + { + prdCvt.setSeq(Integer.valueOf(RandomUtil.randomLengthDigit(6))); + + selector.addMustThenG("prdSizeWidth", 0); + selector.addMustThenG("prdSizeHeight", 0); + selector.addMustIsEmpty("prdPageName");// 查询产品配有尺寸 面数名称为空的数据 + } + else if (Validates.isNotEmpty(prdCvt.getPrdPageName())) + { + prdCvt.setSeq(Integer.valueOf(RandomUtil.randomLengthDigit(4))); + + selector.addMust("prdPageName", prdCvt.getPrdPageName()); + selector.addMust("prdSizeWidth", 0); + selector.addMust("prdSizeHeight", 0);// 查看产品面数名称相等 尺寸为空的数据 + } + else + { + prdCvt.setSeq(Integer.valueOf(RandomUtil.randomLengthDigit(2))); + + selector.addMustIsEmpty("prdPageName"); + selector.addMust("prdSizeWidth", 0); + selector.addMust("prdSizeHeight", 0);// 查询产品面数 尺寸为空的数据 + } + + if (sizeNotNull) + {// 添加有尺寸的配置需要校验 + List convertList = ORM.get(ZTable.class).list(ProductConvert.class, selector); + for (ProductConvert cvt : convertList) + { + int dbPrdSizeWidth = cvt.getPrdSizeWidth(); + int dbPrdSizeHeight = cvt.getPrdSizeHeight(); + if ((prdSizeWidth == dbPrdSizeWidth && prdSizeHeight == dbPrdSizeHeight) || (prdSizeWidth == dbPrdSizeHeight && prdSizeHeight == dbPrdSizeWidth) + || (prdSizeWidth < dbPrdSizeWidth && prdSizeHeight > dbPrdSizeHeight) + || (prdSizeWidth > dbPrdSizeWidth && prdSizeHeight < dbPrdSizeHeight)) + { + request.returnHistory("尺寸不允许重复添加或者交叉存在"); + return; + } + } + } + else if (ORM.get(ZTable.class).count(ProductConvert.class, selector) > 0) + { + request.returnHistory("重复单价配置"); + return; + } + + Timestamp nowTimestamp = Sqls.nowTimestamp(); + prdCvt.setAddOperator(request.getSessionName()); + prdCvt.setAddTime(nowTimestamp); + prdCvt.setUpdateOperator(request.getSessionName()); + prdCvt.setUpdateTime(nowTimestamp); + ORM.get(ZTable.class).insert(prdCvt); + + ProductConvert item = ORM.get(ZTable.class).item(ProductConvert.class, + new Selector().addMust("prdTypeId", prdCvt.getPrdTypeId()).addMust("addTime", nowTimestamp)); + + // 设计单价 + String prdPriceParameter = request.getParameter("prdPriceDate"); + String prdPriceDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new SimpleDateFormat("yyyy-MM-dd").parse(prdPriceParameter)); + DesignPrice designPrice = new DesignPrice(); + designPrice.setConvertId(item.getConvertId()); + designPrice.setPrdTypeId(item.getPrdTypeId()); + designPrice.setDraftType(2);// 暂定总设计类型 + designPrice.setDesignPriceMoney(Amounts.toFen(request.getParameter("prdPrice"), 0L)); + designPrice.setEffectTime(Sqls.toTimestamp(prdPriceDate)); + designPrice.setStatus(0);// 新增默认为0失效 + ORM.get(ZTable.class).insert(designPrice); + + // 改稿单价 + String rewritePriceParameter = request.getParameter("rewritePriceDate"); + String rewritePriceDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new SimpleDateFormat("yyyy-MM-dd").parse(rewritePriceParameter)); + DesignPrice rewritePrice = new DesignPrice(); + rewritePrice.setConvertId(item.getConvertId()); + rewritePrice.setPrdTypeId(item.getPrdTypeId()); + rewritePrice.setDraftType(1);// 改稿自来稿 + rewritePrice.setDesignPriceMoney(Amounts.toFen(request.getParameter("templateDraftPrice"), 0L)); + rewritePrice.setEffectTime(Sqls.toTimestamp(rewritePriceDate)); + rewritePrice.setStatus(0);// 新增默认为0失效 + ORM.get(ZTable.class).insert(rewritePrice); + } + + @Override + protected void list(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page", 1); + int pageSize = request.getContextAttributeInt("page.size", 12); + long prdTypeId = request.getParameterLong("prdTypeId"); + String prdSizeStd = request.getParameter("prdSizeStd"); + String prdPageName = request.getParameter("prdPageName"); + + Selector selector = new Selector(); + selector.addMaybe("prdTypeId", prdTypeId); + selector.addMaybe("prdSizeStd", prdSizeStd); + selector.addMaybe("prdPageName", prdPageName); + selector.addOrderbyAsc("prdTypeId"); + selector.addOrderbyDesc("seq"); + + PageResult pageResult = ORM.get(ZTable.class).page(ProductConvert.class, page, pageSize, selector); + pageResult.addConditionMap(request.getParameterMap()); + request.setAttribute("pageResult", pageResult); + } + + @Override + protected void modify(HttpRequest request) throws Exception + { + long convertId = request.getParameterLong("convertId"); + + List itemList = ORM.get(ZView.class).list(ProductDesignPriceView.class, new Selector().addMust("convertId", convertId)); + ProductConvert item = ORM.get(ZTable.class).item(ProductConvert.class, new Selector().addMust("convertId", convertId)); + request.setAttribute("convert", item); + request.setAttribute("ProductDesignPriceView", itemList); + } + + @Override + protected void update(HttpRequest request) throws Exception + { + ProductConvert prdCvt = request.getParameter(ProductConvert.class); + + int prdSizeWidth = prdCvt.getPrdSizeWidth(); + int prdSizeHeight = prdCvt.getPrdSizeHeight(); + if ((prdSizeWidth > 0 && prdSizeHeight <= 0) || (prdSizeHeight > 0 && prdSizeWidth <= 0)) + { + request.returnHistory("请完整填写尺寸信息"); + return; + } + + Updater updater = new Updater(); + updater.addMust("convertId", prdCvt.getConvertId()); + updater.addField("seq", Integer.valueOf(RandomUtil.randomLengthDigit(2))); + + boolean sizeNotNull = prdSizeWidth > 0 && prdSizeHeight > 0; + + Selector selector = new Selector(); + selector.addMust("prdTypeId", prdCvt.getPrdTypeId()); + selector.addMustNotEqual("convertId", prdCvt.getConvertId());// 排除自己 + if (sizeNotNull && Validates.isNotEmpty(prdCvt.getPrdPageName())) + { + updater.addField("seq", Integer.valueOf(RandomUtil.randomLengthDigit(8))); + + selector.addMustThenG("prdSizeWidth", 0); + selector.addMustThenG("prdSizeHeight", 0); + selector.addMust("prdPageName", prdCvt.getPrdPageName());// 查询产品配有尺寸 面数名称相等的数据 + } + else if (sizeNotNull) + { + updater.addField("seq", Integer.valueOf(RandomUtil.randomLengthDigit(6))); + + selector.addMustThenG("prdSizeWidth", 0); + selector.addMustThenG("prdSizeHeight", 0); + selector.addMustIsEmpty("prdPageName");// 查询产品配有尺寸 面数名称为空的数据 + } + else if (Validates.isNotEmpty(prdCvt.getPrdPageName())) + { + updater.addField("seq", Integer.valueOf(RandomUtil.randomLengthDigit(4))); + + selector.addMust("prdPageName", prdCvt.getPrdPageName()); + selector.addMust("prdSizeWidth", 0); + selector.addMust("prdSizeHeight", 0);// 查看产品面数名称相等 尺寸为空的数据 + } + else + { + + selector.addMustIsEmpty("prdPageName"); + selector.addMust("prdSizeWidth", 0); + selector.addMust("prdSizeHeight", 0);// 查询产品面数 尺寸为空的数据 + } + + if (sizeNotNull) + {// 添加有尺寸的配置需要校验 + List convertList = ORM.get(ZTable.class).list(ProductConvert.class, selector); + for (ProductConvert cvt : convertList) + { + int dbPrdSizeWidth = cvt.getPrdSizeWidth(); + int dbPrdSizeHeight = cvt.getPrdSizeHeight(); + if ((prdSizeWidth == dbPrdSizeWidth && prdSizeHeight == dbPrdSizeHeight) || (prdSizeWidth == dbPrdSizeHeight && prdSizeHeight == dbPrdSizeWidth) + || (prdSizeWidth < dbPrdSizeWidth && prdSizeHeight > dbPrdSizeHeight) + || (prdSizeWidth > dbPrdSizeWidth && prdSizeHeight < dbPrdSizeHeight)) + { + request.returnHistory("尺寸不允许重复添加或者交叉存在"); + return; + } + } + } + else if (ORM.get(ZTable.class).count(ProductConvert.class, selector) > 0) + { + request.returnHistory("重复单价配置"); + return; + } + + updater.addField("prdTypeId", prdCvt.getPrdTypeId()); + updater.addField("prdSizeWidth", prdSizeWidth); + updater.addField("prdSizeHeight", prdSizeHeight); + updater.addField("prdPageName", prdCvt.getPrdPageName()); + updater.addField("updateOperator", request.getSessionName()); + updater.addField("updateTime", Sqls.nowTimestamp()); + ORM.get(ZTable.class).update(ProductConvert.class, updater); + } + + @Override + protected void validateForm(HttpRequest request) throws Exception + { + } + + @Override + protected void validateId(HttpRequest request) throws Exception + { + } + + // 删除单个设计单价 + public static void delDesignPrice(HttpRequest request, long priceId) throws Exception + { + ORM.get(ZTable.class).delete(DesignPrice.class, priceId); + } + + // 添加单个设计单价 + public static void insertDesignPrice(HttpRequest request) throws Exception + { + String prdPriceDate = request.getParameter("prdPriceDate"); + long prdPrice = request.getParameterLong("prdPrice"); + long convertId = request.getParameterLong("convertId"); + long prdTypeId = request.getParameterLong("prdTypeId"); + int draftType = request.getParameterInt("draftType"); + + Date prpDate = new SimpleDateFormat("yyyy-MM-dd").parse(prdPriceDate); + String prpDateString = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(prpDate); + + DesignPrice designPrice = new DesignPrice(); + designPrice.setDesignPriceMoney(prdPrice * 100); + designPrice.setEffectTime(Sqls.toTimestamp(prpDateString)); + designPrice.setStatus(0);// 默认是0失效 + designPrice.setConvertId(convertId); + designPrice.setPrdTypeId(prdTypeId); + designPrice.setDraftType(draftType); + ORM.get(ZTable.class).replace(designPrice); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/QcAwardedTypeAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/QcAwardedTypeAction.java new file mode 100644 index 0000000..efee1c3 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/QcAwardedTypeAction.java @@ -0,0 +1,113 @@ +/** + * 扬彩印刷设计 + * 文件名 :QcAwardedTypeAction.java + * 创建人 :高佳新 + * 创建时间:2019-5-20 + */ + +package com.zhiqim.yangcai.design.action.sys; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.extend.StdSwitchAction; +import org.zhiqim.httpd.validate.ones.IsNotEmpty; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.design.dbo.qc.QcAwardedType; + +/** + * + * 质检加分类型列表 + * + * @version 1.0 @author 高佳新 2019-5-20 新建与整理 + */ +public class QcAwardedTypeAction extends StdSwitchAction +{ + + @Override + protected void validateId(HttpRequest request) throws Exception + { + request.addValidate(new IsNotEmpty("qcTypeId", "请选择一个选项")); + } + + @Override + protected void validateForm(HttpRequest request) throws Exception + { + request.addValidate(new IsNotEmpty("qcAwardedName", "请填写加分类型名称")); + request.addValidate(new IsNotEmpty("qcScore", "请填写加分类型分数")); + } + + @Override + protected void list(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page", 1); + int pageSize = request.getContextAttributeInt("page.size", 15); + PageResult pageResult = ORM.get(ZTable.class).page(QcAwardedType.class, page, pageSize); + + request.setAttribute("pageResult", pageResult); + + } + + @Override + protected void add(HttpRequest request) throws Exception + { + + } + + @Override + protected void delete(HttpRequest request) throws Exception + { + long qcTypeId = request.getParameterLong("qcTypeId"); + ORM.get(ZTable.class).delete(QcAwardedType.class, qcTypeId); + } + + @Override + protected void insert(HttpRequest request) throws Exception + { + String qcAwardedName = request.getParameter("qcAwardedName"); + String qcScore = request.getParameter("qcScore"); + + QcAwardedType qcAwardedType = new QcAwardedType(); + qcAwardedType.setQcTypeId(Ids.longId13()); + qcAwardedType.setQcAwardedName(qcAwardedName); + qcAwardedType.setQcScore(Double.parseDouble(qcScore)); + + ORM.get(ZTable.class).insert(qcAwardedType); + + } + + @Override + protected void modify(HttpRequest request) throws Exception + { + long qcTypeId = request.getParameterLong("qcTypeId"); + QcAwardedType qcAwardedType = ORM.get(ZTable.class).item(QcAwardedType.class, qcTypeId); + if (qcAwardedType == null) + { + request.setResponseError("质检加分类型不存在"); + return; + } + + request.setAttribute("qcAwardedType", qcAwardedType); + + } + + @Override + protected void update(HttpRequest request) throws Exception + { + long qcTypeId = request.getParameterLong("qcTypeId"); + String qcAwardedName = request.getParameter("qcAwardedName"); + String qcScore = request.getParameter("qcScore"); + + Updater updater = new Updater(); + updater.addMust("qcTypeId", qcTypeId); + updater.addField("qcAwardedName", qcAwardedName); + updater.addField("qcScore", Double.parseDouble(qcScore)); + + ORM.get(ZTable.class).update(QcAwardedType.class, updater); + + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/QcParameterAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/QcParameterAction.java new file mode 100644 index 0000000..bc1b9cf --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/QcParameterAction.java @@ -0,0 +1,113 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.action.sys; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.extend.StdSwitchAction; +import org.zhiqim.httpd.validate.ones.IsNotEmpty; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.design.dbo.qc.QcParameter; + +/** + * 质检参数类 + * + * @version v1.0.0 @author liuhu 2019-1-15 新建与整理 + */ +public class QcParameterAction extends StdSwitchAction +{ + + @Override + protected void validateId(HttpRequest request) throws Exception + { + request.addValidate(new IsNotEmpty("parameterId", "请选择一个选项")); + } + + @Override + protected void validateForm(HttpRequest request) throws Exception + { + request.addValidate(new IsNotEmpty("content", "请填写参数内容")); + request.addValidate(new IsNotEmpty("score", "请填写分数")); + } + + @Override + protected void list(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page", 1); + int pageSize = request.getContextAttributeInt("page.size", 15); + PageResult pageResult = ORM.get(ZTable.class).page(QcParameter.class, page, pageSize); + + request.setAttribute("pageResult", pageResult); + } + + @Override + protected void add(HttpRequest request) throws Exception + { + + } + + @Override + protected void modify(HttpRequest request) throws Exception + { + long parameterId = request.getParameterLong("parameterId"); + QcParameter parameter = ORM.get(ZTable.class).item(QcParameter.class, parameterId); + if (parameter == null) + { + request.setResponseError("质检参数不存在"); + return; + } + + request.setAttribute("parameter", parameter); + } + + @Override + protected void insert(HttpRequest request) throws Exception + { + String content = request.getParameter("content"); + String score = request.getParameter("score"); + + QcParameter parameter = new QcParameter(); + parameter.setParameterId(Ids.longId13()); + parameter.setFlag(1); //默认减分 + parameter.setContent(content); + parameter.setScore(Double.parseDouble(score)); + + ORM.get(ZTable.class).insert(parameter); + } + + @Override + protected void update(HttpRequest request) throws Exception + { + long parameterId = request.getParameterLong("parameterId"); + String content = request.getParameter("content"); + String score = request.getParameter("score"); + + Updater updater = new Updater(); + updater.addMust("parameterId", parameterId); + updater.addField("content", content); + updater.addField("score", Double.parseDouble(score)); + + ORM.get(ZTable.class).update(QcParameter.class, updater); + } + + @Override + protected void delete(HttpRequest request) throws Exception + { + long parameterId = request.getParameterLong("parameterId"); + ORM.get(ZTable.class).delete(QcParameter.class, parameterId); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/QcPerformanceParamAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/QcPerformanceParamAction.java new file mode 100644 index 0000000..8254db7 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/QcPerformanceParamAction.java @@ -0,0 +1,138 @@ +/** + * 扬彩印刷设计 + * 文件名 :QcPerformanceParamAction.java + * 创建人 :gjx + * 创建时间:2019-9-4 + */ + +package com.zhiqim.yangcai.design.action.sys; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.extend.StdSwitchAction; +import org.zhiqim.httpd.validate.onex.IsFloat; +import org.zhiqim.httpd.validate.onex.IsNumeric; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.design.dbo.stat.QcPerformanceParam; + +/** + * 质检绩效参数 + * + * @version 1.0 @author gjx 2019-9-4 新建与整理 + */ +public class QcPerformanceParamAction extends StdSwitchAction +{ + @Override + protected void validateForm(HttpRequest request) throws Exception + { + request.addValidate(new IsFloat("rewardScore", "奖励分不能为空且只能为数字", false)); + request.addValidate(new IsFloat("punishScore", "扣罚分不能为空且只能为数字", false)); + request.addValidate(new IsFloat("rewardAmount", "奖励金额不能为空且只能为数字", false)); + request.addValidate(new IsFloat("punishAmount", "扣罚金额不能为空且只能为数字", false)); + request.addValidate(new IsFloat("rewardAmountMax", "最大奖励金额不能为空且只能为数字", false)); + request.addValidate(new IsFloat("punishAmountMax", "最大扣罚金额不能为空且只能为数字", false)); + } + + @Override + protected void validateId(HttpRequest request) throws Exception + { + request.addValidate(new IsNumeric("qcPerformanceId", "请选择一个选项", false)); + } + + @Override + protected void list(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page", 1); + int pageSize = request.getContextAttributeInt("page.size", 15); + PageResult pageResult = ORM.get(ZTable.class).page(QcPerformanceParam.class, page, pageSize); + + request.setAttribute("pageResult", pageResult); + request.setAttribute("listSize", pageResult.list().size()); + } + + @Override + protected void add(HttpRequest request) throws Exception + { + + } + + @Override + protected void insert(HttpRequest request) throws Exception + { + + // long standardQcScore = request.getParameterLong("standardQcScore"); + long rewardScore = request.getParameterAmount2RLong("rewardScore"); + long punishScore = request.getParameterAmount2RLong("punishScore"); + long rewardAmount = request.getParameterAmount2RLong("rewardAmount"); + long punishAmount = request.getParameterAmount2RLong("punishAmount"); + long rewardAmountMax = request.getParameterAmount2RLong("rewardAmountMax"); + long punishAmountMax = request.getParameterAmount2RLong("punishAmountMax"); + + QcPerformanceParam qcParam = new QcPerformanceParam(); + qcParam.setQcPerformanceId(Ids.longId13()); + qcParam.setStandardQcScore(10000); + qcParam.setRewardScore(rewardScore); + qcParam.setPunishScore(punishScore); + qcParam.setRewardAmount(rewardAmount); + qcParam.setPunishAmount(punishAmount); + qcParam.setRewardAmountMax(rewardAmountMax); + qcParam.setPunishAmountMax(punishAmountMax); + + ORM.get(ZTable.class).insert(qcParam); + } + + @Override + protected void modify(HttpRequest request) throws Exception + { + long qcPerformanceId = request.getParameterLong("qcPerformanceId"); + QcPerformanceParam qcParam = ORM.get(ZTable.class).item(QcPerformanceParam.class, new Selector().addMust("qcPerformanceId", qcPerformanceId)); + if (qcParam == null) + { + request.setResponseError("参数订单不存在"); + return; + } + request.setAttribute("order", qcParam); + } + + @Override + protected void update(HttpRequest request) throws Exception + { + long qcPerformanceId = request.getParameterLong("qcPerformanceId"); + long rewardScore = request.getParameterAmount2RLong("rewardScore"); + long punishScore = request.getParameterAmount2RLong("punishScore"); + long rewardAmount = request.getParameterAmount2RLong("rewardAmount"); + long punishAmount = request.getParameterAmount2RLong("punishAmount"); + long rewardAmountMax = request.getParameterAmount2RLong("rewardAmountMax"); + long punishAmountMax = request.getParameterAmount2RLong("punishAmountMax"); + QcPerformanceParam qcParam = ORM.get(ZTable.class).item(QcPerformanceParam.class, new Selector().addMust("qcPerformanceId", qcPerformanceId)); + if (qcParam == null) + { + request.setResponseError("参数订单不存在"); + return; + } + + Updater updater = new Updater(); + updater.addMust("qcPerformanceId", qcPerformanceId); + updater.addField("rewardScore", rewardScore); + updater.addField("punishScore", punishScore); + updater.addField("rewardAmount", rewardAmount); + updater.addField("punishAmount", punishAmount); + updater.addField("rewardAmountMax", rewardAmountMax); + updater.addField("punishAmountMax", punishAmountMax); + + ORM.get(ZTable.class).update(QcPerformanceParam.class, updater); + + } + + @Override + protected void delete(HttpRequest request) throws Exception + { + + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/ReceiveMerManage.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/ReceiveMerManage.java new file mode 100644 index 0000000..09ea8b1 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/ReceiveMerManage.java @@ -0,0 +1,139 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action.sys; + +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.extend.StdSwitchAction; +import org.zhiqim.httpd.validate.ones.IsNotEmpty; +import org.zhiqim.httpd.validate.ones.IsNumericLen; +import org.zhiqim.httpd.validate.ones.IsSelect; +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.manager.dao.ZmrOrgDao; +import org.zhiqim.manager.dbo.ZmrOrg; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.cache.DesignIndustryCache; +import com.zhiqim.yangcai.design.dao.DesignTypeDao; +import com.zhiqim.yangcai.design.dao.ParamDao; +import com.zhiqim.yangcai.design.dbo.design.DesignIndustry; +import com.zhiqim.yangcai.design.dbo.design.DesignOrgMer; +import com.zhiqim.yangcai.design.dbo.design.DesignType; + +/** + * 组织派单属性 + * + * @version v1.0.0 @author longguizhi 2018-5-30 新建与整理 + */ +public class ReceiveMerManage extends StdSwitchAction +{ + + @Override + protected void validateId(HttpRequest request) + { + request.addValidate(new IsNotEmpty("orgId", "请选择一个选项")); + } + + @Override + protected void validateForm(HttpRequest request) + { + request.addValidate(new IsSelect("orgId", "请选择商户")); + request.addValidate(new IsNumericLen("merLevel", "请输入排序优先级别,并且不能超过6个字符", 1, 6)); + } + + @Override + protected void list(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page"); + boolean isPauseRecieive = request.getParameterBoolean("isPauseRecieive"); + int merStatus = request.getParameterInt("merStatus"); + int pageSize = 10; + + Selector selector = new Selector(); + selector.addMaybe("isPauseRecieive", isPauseRecieive); + selector.addMaybe("merStatus", merStatus); + selector.addOrderbyAsc("merLevel"); + PageResult pageResult = ORM.get(ZTable.class).page(DesignOrgMer.class, page, pageSize, selector); + request.setAttribute("pageResult", pageResult); + request.setAttribute("isPauseRecieive", isPauseRecieive); + request.setAttribute("merStatus", merStatus); + } + + @Override + protected void add(HttpRequest request) throws Exception + { + List orgList = ZmrOrgDao.levelList(request, 1); + request.setAttribute("orgList", orgList); + // 查找店铺 + request.setAttribute("shopList", ParamDao.doGetShopNameParam()); + } + + @Override + protected void modify(HttpRequest request) throws Exception + { + long orgId = request.getParameterLong("orgId", 0); + List orgList = ZmrOrgDao.levelList(request, 1); + DesignOrgMer orgMer = ORM.get(ZTable.class).item(DesignOrgMer.class, orgId); + if (orgMer == null) + { + request.returnHistory("数据不存在"); + return; + } + + List industryList = Global.get(DesignIndustryCache.class).getIndustryListAll(); + List typeList = DesignTypeDao.list(); + request.setAttribute("typeList", typeList); + request.setAttribute("industryList", industryList); + request.setAttribute("orgMer", orgMer); + request.setAttribute("orgList", orgList); + + // 查找店铺 + request.setAttribute("shopList", ParamDao.doGetShopNameParam()); + // 查找后加工 + request.setAttribute("afterList", ParamDao.doGetAfterNameParam()); + } + + @Override + protected void insert(HttpRequest request) throws Exception + { + String orderShop = request.getParameter("orderShop"); + + DesignOrgMer orgMer = request.getParameter(DesignOrgMer.class); + orgMer.setOrderShop(orderShop); + orgMer.setModifyOperatorCode(request.getSessionName()); + orgMer.setModifyTime(Sqls.nowTimestamp()); + ORM.get(ZTable.class).replace(orgMer); + } + + @Override + protected void update(HttpRequest request) throws Exception + { + String orderShop = request.getParameter("orderShop"); + + DesignOrgMer orgMer = request.getParameter(DesignOrgMer.class); + orgMer.setOrderShop(orderShop); + orgMer.setModifyOperatorCode(request.getSessionName()); + orgMer.setModifyTime(Sqls.nowTimestamp()); + ORM.get(ZTable.class).replace(orgMer); + } + + @Override + protected void delete(HttpRequest request) throws Exception + { + long orgId = request.getParameterLong("orgId", 0); + ORM.get(ZTable.class).delete(DesignOrgMer.class, orgId); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/ReceiveMerModifyAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/ReceiveMerModifyAction.java new file mode 100644 index 0000000..9f343f5 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/ReceiveMerModifyAction.java @@ -0,0 +1,62 @@ +package com.zhiqim.yangcai.design.action.sys; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.extend.ViewExecAction; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.design.dbo.design.DesignOrgMer; + +/** + * 组织派单规则 + * + * @version v1.0.0 @author longguizhi 2018-5-30 新建与整理 + */ +public class ReceiveMerModifyAction extends ViewExecAction +{ + + @Override + protected void view(HttpRequest request) throws Exception + { + long orgId = request.getParameterLong("orgId", 0); + DesignOrgMer orgMer = ORM.get(ZTable.class).item(DesignOrgMer.class, orgId); + if (orgMer == null) + { + request.returnCloseDialog("数据不存在"); + return; + } + request.setAttribute("orgMer", orgMer); + } + + @Override + protected void exec(HttpRequest request) throws Exception + { + } + + public void update(HttpRequest request) throws Exception + { + long orgId = request.getParameterLong("orgId"); // 组织编号 + int merStatus = request.getParameterInt("merStatus"); // 组织状态 + int merLevel = request.getParameterInt("merLevel"); // 优先级 + boolean isPauseRecieive = request.getParameterBoolean("isPauseRecieive"); // 是否暂停接单 + + if (orgId <= 0) + { + request.setResponseError("商户编号正确"); + return; + } + + Updater updater = new Updater(); + updater.addMust("orgId", orgId); + updater.addField("merStatus", merStatus); + updater.addField("isPauseRecieive", isPauseRecieive); + updater.addField("modifyOperatorCode", request.getSessionName()); + updater.addField("modifyTime", Sqls.nowTimestamp()); + updater.addField("merLevel", merLevel); + + ORM.get(ZTable.class).update(DesignOrgMer.class, updater); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/RefundParameterAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/RefundParameterAction.java new file mode 100644 index 0000000..0194fed --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/RefundParameterAction.java @@ -0,0 +1,145 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action.sys; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.extend.StdSwitchAction; +import org.zhiqim.httpd.validate.onex.IsFloat; +import org.zhiqim.httpd.validate.onex.IsNumeric; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.design.dbo.stat.RefundParameter; + +/** + * 退款参数类 + * + * @version v1.0.0 @author liuhu 2019-1-15 新建与整理 + */ +public class RefundParameterAction extends StdSwitchAction +{ + + @Override + protected void validateId(HttpRequest request) throws Exception + { + request.addValidate(new IsNumeric("parameterId", "请选择一个选项", false)); + } + + @Override + protected void validateForm(HttpRequest request) throws Exception + { + request.addValidate(new IsFloat("standardRefundRate", "标准退款率不能未空且只能为数字", false)); + request.addValidate(new IsFloat("floor", "标准退款率下限不能未空且只能为数字", false)); + request.addValidate(new IsFloat("ceil", "标准退款率上限不能未空且只能为数字", false)); + request.addValidate(new IsFloat("rewardDot", "奖励点不能未空且只能为数字", false)); + request.addValidate(new IsFloat("punishDot", "扣罚点不能未空且只能为数字", false)); + request.addValidate(new IsFloat("rewardAmount", "奖励金额不能未空且只能为数字", false)); + request.addValidate(new IsFloat("punishAmount", "扣罚金额不能未空且只能为数字", false)); + request.addValidate(new IsFloat("rewardAmountMax", "最大奖励金额不能未空且只能为数字", false)); + request.addValidate(new IsFloat("punishAmountMax", "最大扣罚金额不能未空且只能为数字", false)); + } + + @Override + protected void list(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page", 1); + int pageSize = request.getContextAttributeInt("page.size", 15); + PageResult pageResult = ORM.get(ZTable.class).page(RefundParameter.class, page, pageSize); + + request.setAttribute("pageResult", pageResult); + } + + @Override + protected void add(HttpRequest request) throws Exception + { + } + + @Override + protected void modify(HttpRequest request) throws Exception + { + long parameterId = request.getParameterLong("parameterId"); + RefundParameter parameter = ORM.get(ZTable.class).item(RefundParameter.class, parameterId); + if (parameter == null) + { + request.returnHistory("退款参数不存在"); + return; + } + + request.setAttribute("item", parameter); + } + + @Override + protected void insert(HttpRequest request) throws Exception + { + long standardRefundRate = request.getParameterAmount2RLong("standardRefundRate"); + long floor = request.getParameterAmount2RLong("floor"); + long ceil = request.getParameterAmount2RLong("ceil"); + long rewardDot = request.getParameterAmount2RLong("rewardDot"); + long punishDot = request.getParameterAmount2RLong("punishDot"); + long rewardAmount = request.getParameterAmount2RLong("rewardAmount"); + long punishAmount = request.getParameterAmount2RLong("punishAmount"); + long rewardAmountMax = request.getParameterAmount2RLong("rewardAmountMax"); + long punishAmountMax = request.getParameterAmount2RLong("punishAmountMax"); + + RefundParameter parameter = new RefundParameter(); + parameter.setRefundParameterId(Ids.longId()); + parameter.setStandardRefundRate(standardRefundRate); + parameter.setStandardRefundRateFloor(floor); + parameter.setStandardRefundRateCeil(ceil); + parameter.setRewardDot(rewardDot); + parameter.setPunishDot(punishDot); + parameter.setRewardAmount(rewardAmount); + parameter.setPunishAmount(punishAmount); + parameter.setRewardAmount(rewardAmountMax); + parameter.setPunishAmount(punishAmountMax); + + ORM.get(ZTable.class).insert(parameter); + } + + @Override + protected void update(HttpRequest request) throws Exception + { + long parameterId = request.getParameterLong("parameterId"); + long standardRefundRate = request.getParameterAmount2RLong("standardRefundRate"); + long floor = request.getParameterAmount2RLong("floor"); + long ceil = request.getParameterAmount2RLong("ceil"); + long rewardDot = request.getParameterAmount2RLong("rewardDot"); + long punishDot = request.getParameterAmount2RLong("punishDot"); + long rewardAmount = request.getParameterAmount2RLong("rewardAmount"); + long punishAmount = request.getParameterAmount2RLong("punishAmount"); + long rewardAmountMax = request.getParameterAmount2RLong("rewardAmountMax"); + long punishAmountMax = request.getParameterAmount2RLong("punishAmountMax"); + + Updater updater = new Updater(); + updater.addMust("refundParameterId", parameterId); + updater.addField("standardRefundRate", standardRefundRate); + updater.addField("standardRefundRateFloor", floor); + updater.addField("standardRefundRateCeil", ceil); + updater.addField("rewardDot", rewardDot); + updater.addField("punishDot", punishDot); + updater.addField("rewardAmount", rewardAmount); + updater.addField("punishAmount", punishAmount); + updater.addField("rewardAmountMax", rewardAmountMax); + updater.addField("punishAmountMax", punishAmountMax); + + ORM.get(ZTable.class).update(RefundParameter.class, updater); + } + + @Override + protected void delete(HttpRequest request) throws Exception + { + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/SpecialOrderTypeAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/SpecialOrderTypeAction.java new file mode 100644 index 0000000..40ecaf4 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/SpecialOrderTypeAction.java @@ -0,0 +1,112 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.action.sys; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.extend.StdSwitchAction; +import org.zhiqim.httpd.validate.ones.IsLen; +import org.zhiqim.httpd.validate.ones.IsNotEmpty; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.design.dbo.stat.SpecialOrderType; + +/** + * 特殊订单类型类 + * + * @version v1.0.0 @author liuhu 2018-12-13 新建与整理 + */ +public class SpecialOrderTypeAction extends StdSwitchAction +{ + @Override + protected void validateId(HttpRequest request) + { + request.addValidate(new IsNotEmpty("typeId", "请选择一个选项")); + request.addParam("page", request.getParameterInt("page", 1)); + request.setAttribute("page", request.getParameterInt("page", 1)); + } + + @Override + protected void validateForm(HttpRequest request) + { + request.addValidate(new IsLen("specialOrderType", "特殊订单类型不能为空且不超过200字符", 1, 200)); + request.addValidate(new IsLen("specialOrderDescribe", "特殊订单类型描述不能为空且不超过200字符", 1, 200)); + request.addValidate(new IsLen("specialOrderAmount", "金额不能为空且不超过10个字符", 1, 10)); + } + + @Override + protected void list(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page",1); + int pageSize = request.getContextAttributeInt("page.size", 15); + + PageResult pageResult = ORM.get(ZTable.class).page(SpecialOrderType.class, page, pageSize); + request.setAttribute("pageResult", pageResult); + } + + @Override + protected void add(HttpRequest request) throws Exception + { + } + + @Override + protected void insert(HttpRequest request) throws Exception + { + String specialOrderType = request.getParameter("specialOrderType"); + String specialOrderDescribe = request.getParameter("specialOrderDescribe"); + long specialOrderAmount = request.getParameterAmount2RLong("specialOrderAmount"); + + SpecialOrderType type = new SpecialOrderType(); + type.setSpecialTypeId(Ids.longId13()); + type.setSpecialOrderType(specialOrderType); + type.setSpecialOrderDescribe(specialOrderDescribe); + type.setSpecialOrderAmount(specialOrderAmount); + ORM.get(ZTable.class).insert(type); + } + + @Override + protected void modify(HttpRequest request) throws Exception + { + long typeId = request.getParameterLong("typeId"); + SpecialOrderType specialOrderType = ORM.get(ZTable.class).item(SpecialOrderType.class, typeId); + + request.setAttribute("item", specialOrderType); + } + + + @Override + protected void update(HttpRequest request) throws Exception + { + long typeId = request.getParameterLong("typeId"); + String specialOrderType = request.getParameter("specialOrderType"); + String specialOrderDescribe = request.getParameter("specialOrderDescribe"); + long specialOrderAmount = request.getParameterAmount2RLong("specialOrderAmount"); + + Updater updater = new Updater(); + updater.addMust("specialTypeId", typeId); + updater.addField("specialOrderType", specialOrderType); + updater.addField("specialOrderDescribe", specialOrderDescribe); + updater.addField("specialOrderAmount", specialOrderAmount); + ORM.get(ZTable.class).update(SpecialOrderType.class, updater); + } + + @Override + protected void delete(HttpRequest request) throws Exception + { + long typeId = request.getParameterLong("typeId"); + + ORM.get(ZTable.class).delete(SpecialOrderType.class, typeId); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/TimelinessParameterAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/TimelinessParameterAction.java new file mode 100644 index 0000000..674a8e9 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/sys/TimelinessParameterAction.java @@ -0,0 +1,155 @@ +/** + * 扬彩印刷设计 + * 文件名 :TimelinessParameterAction.java + * 创建人 :jiangbin + * 创建时间:2020-05-12 + */ +package com.zhiqim.yangcai.design.action.sys; + +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.extend.StdSwitchAction; +import org.zhiqim.httpd.validate.ones.IsGreaterThenValue; +import org.zhiqim.httpd.validate.ones.IsNotEmpty; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dao.DesignTypeDao; +import com.zhiqim.yangcai.design.dbo.design.DesignType; +import com.zhiqim.yangcai.design.dbo.stat.TimelinessParameter; + +/** + * 时效绩效参数action + * + * @version v1.0.0 @author jiangbin 2020-05-12 新建与整理 + */ +public class TimelinessParameterAction extends StdSwitchAction +{ + @Override + protected void validateId(HttpRequest request) + { + request.addValidate(new IsNotEmpty("timelinessParameterId", "请选择一个选项")); + request.addParam("page", request.getParameterInt("page", 1)); + request.setAttribute("page", request.getParameterInt("page", 1)); + } + + @Override + protected void validateForm(HttpRequest request) + { + request.addValidate(new IsGreaterThenValue("prdTypeId", "请选择产品类型", "0")); + request.addValidate(new IsGreaterThenValue("rewardAmount", "请输入奖励金额", "0")); + } + + @Override + protected void list(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page", 1); + int pageSize = request.getContextAttributeInt("page.size", 15); + Map prdTypeMap = DesignTypeDao.mapAll(); + Selector selector = new Selector(); + selector.addOrderbyAsc("prdTypeId"); + PageResult pageResult = ORM.get(ZTable.class).page(TimelinessParameter.class, page, pageSize, selector); + request.setAttribute("pageResult", pageResult); + request.setAttribute("prdTypeMap", prdTypeMap); + } + + @Override + protected void add(HttpRequest request) throws Exception + { + List list = DesignTypeDao.listAll(); + request.setAttribute("prdTypeList", list); + } + + @Override + protected void insert(HttpRequest request) throws Exception + { + long prdTypeId = request.getParameterLong("prdTypeId"); + long rewardAmount = request.getParameterAmount2RLong("rewardAmount"); + if (prdTypeId < 0) + { + request.returnHistory("产品类型不能为空!"); + return; + } + + if (rewardAmount < 0) + { + request.returnHistory("奖励金额不能为空!"); + return; + } + List oldList = ORM.get(ZTable.class).list(TimelinessParameter.class); + for (TimelinessParameter tp : oldList) + { + if (tp.getPrdTypeId() == prdTypeId) + { + request.returnHistory("该产品类型的时效绩效参数已存在!"); + return; + } + } + TimelinessParameter timelinessParameter = new TimelinessParameter(); + timelinessParameter.setTimelinessParameterId(Ids.longId13_4()); + timelinessParameter.setPrdTypeId(prdTypeId); + timelinessParameter.setRewardAmount(rewardAmount); + ORM.get(ZTable.class).insert(timelinessParameter); + } + + @Override + protected void modify(HttpRequest request) throws Exception + { + long timelinessParameterId = request.getParameterLong("timelinessParameterId"); + TimelinessParameter timelinessParameter = ORM.get(ZTable.class).item(TimelinessParameter.class, timelinessParameterId); + List list = DesignTypeDao.listAll(); + request.setAttribute("prdTypeList", list); + request.setAttribute("timelinessParameter", timelinessParameter); + } + + @Override + protected void update(HttpRequest request) throws Exception + { + long timelinessParameterId = request.getParameterLong("timelinessParameterId"); + long prdTypeId = request.getParameterLong("prdTypeId"); + long rewardAmount = request.getParameterAmount2RLong("rewardAmount"); + if (timelinessParameterId < 0) + { + request.returnHistory("时效绩效参数ID不能为空!"); + return; + } + if (prdTypeId < 0) + { + request.returnHistory("产品类型不能为空!"); + return; + } + if (rewardAmount < 0) + { + request.returnHistory("奖励金额不能为空!"); + return; + } + List oldList = ORM.get(ZTable.class).list(TimelinessParameter.class, + new Selector().addMustNotEqual("timelinessParameterId", timelinessParameterId)); + for (TimelinessParameter tp : oldList) + { + if (tp.getPrdTypeId() == prdTypeId) + { + request.returnHistory("该产品类型的时效绩效参数已存在!"); + return; + } + } + TimelinessParameter timelinessParameter = new TimelinessParameter(); + timelinessParameter.setTimelinessParameterId(timelinessParameterId); + timelinessParameter.setPrdTypeId(prdTypeId); + timelinessParameter.setRewardAmount(rewardAmount); + ORM.get(ZTable.class).update(timelinessParameter); + } + + @Override + protected void delete(HttpRequest request) throws Exception + { + long timelinessParameterId = request.getParameterLong("timelinessParameterId"); + ORM.get(ZTable.class).delete(TimelinessParameter.class, timelinessParameterId); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/template/DesTemplateLogAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/template/DesTemplateLogAction.java new file mode 100644 index 0000000..c6182eb --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/template/DesTemplateLogAction.java @@ -0,0 +1,70 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.action.template; + +import java.util.ArrayList; +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.paging.PageBuilder; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.template.DesTemplateLog; +import com.zhiqim.yangcai.design.dbo.template.MediaTemplate; + +/** + * 模版审核日志查询 + * + * @version v1.0.0 @author zzy 2018-7-11 新建与整理 + */ +public class DesTemplateLogAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page", 1); + int pageSize = request.getContextAttributeInt("page.size", 15); + long mediaId = request.getParameterLong("mediaId", 0); + long queryType = request.getParameterLong("queryType", 0); + + if(queryType == 0) + { + Selector sel = new Selector(); + sel.addMust("mediaId", mediaId); + sel.addOrderbyDesc("createTime"); + PageResult pageResult = ORM.get(ZTable.class).page(DesTemplateLog.class, page, pageSize, sel); + pageResult.addConditionMap(request.getParameterMap()); + + request.setAttribute("pageResult", pageResult); + } + else + { + MediaTemplate temp = ORM.get(ZTable.class).item(MediaTemplate.class, mediaId); + List list = new ArrayList<>(); + if(temp != null) + { + DesTemplateLog data = new DesTemplateLog(); + data.setMediaId(mediaId); + list.add(data); + } + + PageResult pageResult = PageBuilder.newResult(list.size(), 1, pageSize, list); + request.setAttribute("pageResult", pageResult); + } + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/template/ExternalDraftDownloadAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/template/ExternalDraftDownloadAction.java new file mode 100644 index 0000000..bfbf26e --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/template/ExternalDraftDownloadAction.java @@ -0,0 +1,51 @@ +/** + * 扬彩印刷设计 + * 文件名 :ExternalDraftDownloadAction.java + * 创建人 :gjx + * 创建时间:2019-12-14 + */ + +package com.zhiqim.yangcai.design.action.template; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.works.DesWorksFile; + +/** + * [简要描述]:外部稿件下载
            + * + * @version 1.0 @author gjx 2019-12-14 新建与整理 + */ +public class ExternalDraftDownloadAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + long mediaId = request.getParameterLong("mediaId"); + List worksFiles = ORM.get(ZTable.class).list(DesWorksFile.class, new Selector("templateId", mediaId)); + Map urlMap = new HashMap<>(); + for (DesWorksFile desWorksFile : worksFiles) + { + urlMap.put(desWorksFile.getFileType(), desWorksFile.getCdrPath()); + if (Validates.isNotEmpty(desWorksFile.getPdfPath())) + { + { + urlMap.put("pdf", desWorksFile.getPdfPath()); + } + } + + } + request.setAttribute("mediaId", mediaId); + request.setAttribute("urlMap", urlMap); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/template/FillLabelInfoAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/template/FillLabelInfoAction.java new file mode 100644 index 0000000..eac5afa --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/template/FillLabelInfoAction.java @@ -0,0 +1,48 @@ +/** + * 扬彩印刷设计 + * 文件名 :FillLabelInfoAction.java + * 创建人 :jiangbin + * 创建时间:2019-12-19 + */ +package com.zhiqim.yangcai.design.action.template; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.order.DesignSelfView; + +/** + * + * 补充标签信息 + * + * @version 1.0 @author jiangbin 2019-12-19 新建与整理 + */ +public class FillLabelInfoAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + long designId = request.getParameterLong("designId"); + long mediaId = request.getParameterLong("mediaId"); + int mark = request.getParameterInt("mark", 0); + if (designId < 0) + { + request.setResponseError("订单号不存在!"); + return; + } + DesignSelfView order = ORM.get(ZView.class).item(DesignSelfView.class, new Selector("designId", designId)); + if (Validates.isEmpty(order)) + { + request.setResponseError("订单不存在!"); + return; + } + request.setAttribute("order", order); + request.setAttribute("mediaId", mediaId); + request.setAttribute("mark", mark); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/template/IndustrySelectAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/template/IndustrySelectAction.java new file mode 100644 index 0000000..fb92009 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/template/IndustrySelectAction.java @@ -0,0 +1,58 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action.template; + +import java.util.ArrayList; +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.util.Validates; + +import com.zhiqim.yangcai.cache.DesignIndustryCache; +import com.zhiqim.yangcai.design.dbo.design.DesignIndustry; + +/** + * 行业例表 + * + * @version v1.0.0 @author Deng 2017-11-16 新建与整理 + */ +public class IndustrySelectAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + String industryKeywords = request.getParameter("industryKeywords"); + + List searchIndustryList = new ArrayList<>(); + List industrieList = Global.get(DesignIndustryCache.class).getIndustryListAll(); + + if (Validates.isEmptyBlank(industryKeywords)) + { + searchIndustryList = industrieList; + } + else + { + for (DesignIndustry industry : industrieList) + { + if (industry.getIndustryName().contains(industryKeywords) || industry.getIndustryKeywords().contains(industryKeywords)) + { + searchIndustryList.add(industry); + } + } + } + + request.setAttribute("searchIndustryList", searchIndustryList); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/template/NewMyTemplateAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/template/NewMyTemplateAction.java new file mode 100644 index 0000000..6d20dd6 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/template/NewMyTemplateAction.java @@ -0,0 +1,59 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.action.template; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dao.DesignTypeDao; +import com.zhiqim.yangcai.design.dbo.design.DesignSize; + +/** + * 新建我的模板 + * + * @version v1.0.0 @author zhouwenbin 2018-9-8 新建与整理 + */ +public class NewMyTemplateAction implements Action +{ + @Override + public void execute(HttpRequest request) throws Exception + { + Map> sizeMap = new HashMap<>(); + List sizeList = ORM.get(ZTable.class).list(DesignSize.class, new Selector().addMust("sizeStatus", 0).addOrderbyAsc("typeId,sizeSeq")); + for (DesignSize size : sizeList) + { + long key = size.getTypeId(); + if (sizeMap.containsKey(key)) + { + sizeMap.get(key).add(size); + } + else + { + List tempList = new ArrayList<>(); + tempList.add(size); + sizeMap.put(key, tempList); + } + } + + request.setAttribute("sizeMap", Jsons.toString(sizeMap)); + request.setAttribute("typeList", DesignTypeDao.listTemmplate()); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/template/TemplateDownloadAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/template/TemplateDownloadAction.java new file mode 100644 index 0000000..2f9b1c6 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/template/TemplateDownloadAction.java @@ -0,0 +1,102 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.action.template; + +import java.io.File; +import java.io.FileInputStream; +import java.io.OutputStream; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.HttpResponse; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.util.Urls; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; + +import com.zhiqim.yangcai.design.dbo.order.DesignAtta; + +/** + * 模板下载 + * @version v1.0.0 @author Deng 2017-11-22 新建与整理 + */ +public class TemplateDownloadAction implements Action +{ + @Override + public void execute(HttpRequest request) throws Exception + { + String _APPLICATION_OCTET_STREAM_ = "application/octet-stream"; + String _CONTENT_DISPOSITION_ = "Content-Disposition"; + long attaId = request.getParameterLong("attaId"); + + DesignAtta atta = ORM.get(ZTable.class).item(DesignAtta.class, attaId); + if (atta == null) + { + request.returnHistory("该文件不存在,请重新操作"); + return; + } + + if (Validates.isNotEmptyBlank(atta.getOssUrl()) && Validates.isUrl(atta.getOssUrl())) + {//优先从网络地址下载 + request.setRedirect(atta.getOssUrl()); + return; + } + + String savePath = atta.getSavePath(); + File file = new File(savePath); + if (!file.exists() || !file.isFile()) + { + request.returnHistory("该文件不存在,请重新操作"); + return; + } + + String fileName = Urls.encodeUTF8(file.getName()); + + HttpResponse response = request.getResponse(); + response.setContentType(_APPLICATION_OCTET_STREAM_); + if (request.isChrome()) + {//chrome不支持括号 + fileName = fileName.replaceAll("%28", "("); + fileName = fileName.replaceAll("%29", ")"); + } + + if (request.isFirefox()) + response.setHeader(_CONTENT_DISPOSITION_, "attachment; filename*=UTF-8''"+file.getName()); + else + response.setHeader(_CONTENT_DISPOSITION_, "attachment; filename="+fileName); + + FileInputStream stream = new FileInputStream(savePath); + OutputStream out = response.getOutputStream(); + try + { + // 设置响应头和下载保存的文件名 + if (fileName != null && fileName.length() > 0) + { + if (stream != null) + { + byte[] buffer = new byte[1024]; + int len = 0; + while ((len = stream.read(buffer)) != -1) + { + out.write(buffer, 0, len); + } + } + } + } + catch (Exception e){} + finally + { + stream.close(); + out.close(); + } + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/template/TemplateLabelAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/template/TemplateLabelAction.java new file mode 100644 index 0000000..009d92f --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/template/TemplateLabelAction.java @@ -0,0 +1,125 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.action.template; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.util.Lists; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.DesLabelAttribute; +import com.zhiqim.yangcai.design.dbo.DesLabelAttributeCat; +import com.zhiqim.yangcai.design.dbo.DesLabelIndustry; +import com.zhiqim.yangcai.design.dbo.template.MediaTemplate; + +/** + * 模板关联标签 + * + * @version v1.0.0 @author Deng 2017-11-24 新建与整理 + */ +public class TemplateLabelAction implements Action +{ + @Override + public void execute(HttpRequest request) throws Exception + { + long mediaId = request.getParameterLong("mediaId"); + if (mediaId == -1) + return; + + MediaTemplate template = ORM.get(ZTable.class).item(MediaTemplate.class, mediaId); + request.setAttribute("template", template); + + List subsList = new ArrayList(); + List attrList = new ArrayList(); + + //组装已关联的行业属性 + if(Validates.isNotEmpty(template.getIndustrySubIds()) && + Validates.isNotEmpty( template.getAttributeIds())) + { + for(String subs : template.getIndustrySubIds().split(",")) + subsList.add(subs); + + for(String attr : template.getAttributeIds().split(",")) + attrList.add(attr); + } + + request.setAttribute("indIdarr", Lists.toString(subsList)); + request.setAttribute("subsList", subsList); + request.setAttribute("attrIdarr", Lists.toString(attrList)); + request.setAttribute("attrList", attrList); + + //获取行业下的子行业 + List inSubList = ORM.get(ZTable.class).list(DesLabelIndustry.class, new Selector("industryId", template.getIndustryId())); + request.setAttribute("inSubList", inSubList); + + //获取行业下的属性分类 + List attrCatList = ORM.get(ZTable.class).list(DesLabelAttributeCat.class, new Selector("industryId", template.getIndustryId())); + request.setAttribute("attrCatList", attrCatList); + + Map> map = new HashMap>(); + for(DesLabelAttributeCat cat : attrCatList) + { + List attrsList = ORM.get(ZTable.class).list(DesLabelAttribute.class, new Selector("attributeCatId", cat.getAttributeCatId())); + map.put(cat.getAttributeCatId(), attrsList); + } + request.setAttribute("map", map); + + //==================================================================================== + + //子行业列表 + List subIndustryList = ORM.get(ZTable.class).list(DesLabelIndustry.class); + Map> subIndustryMap = new HashMap<>(); + for (DesLabelIndustry subIn: subIndustryList) + { + List subList = subIndustryMap.get(subIn.getIndustryId()); + subList = subList != null ? subList : new ArrayList(); + subList.add(subIn); + + subIndustryMap.put(subIn.getIndustryId(), subList); + } + request.setAttribute("subIndustryMap", subIndustryMap); + + //行业所有分类 + List attributeCatList = ORM.get(ZTable.class).list(DesLabelAttributeCat.class); + Map> attributeCatMap = new HashMap<>(); + for (DesLabelAttributeCat cat : attributeCatList) + { + List group = attributeCatMap.get(cat.getIndustryId()); + group = group != null ? group : new ArrayList(); + group.add(cat); + + attributeCatMap.put(cat.getIndustryId(), group); + } + request.setAttribute("attributeCatMap", attributeCatMap); + + //关联标签属性 列表 + List attributeList = ORM.get(ZTable.class).list(DesLabelAttribute.class); + Map> attributeMap = new HashMap>(); + for (DesLabelAttribute attr : attributeList) + { + List group = attributeMap.get(attr.getAttributeCatId()); + group = group != null ? group : new ArrayList(); + group.add(attr); + + attributeMap.put(attr.getAttributeCatId(), group); + } + request.setAttribute("attributeMap", attributeMap); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/template/TemplateShowAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/template/TemplateShowAction.java new file mode 100644 index 0000000..1403d83 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/template/TemplateShowAction.java @@ -0,0 +1,107 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action.template; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.manager.ZmrBootstrap; +import org.zhiqim.manager.dbo.ZmrOperator; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.media.dbo.MediaBg; +import com.zhiqim.yangcai.design.dbo.template.DesTemplateEvent; +import com.zhiqim.yangcai.design.dbo.template.DesTemplateScore; +import com.zhiqim.yangcai.design.dbo.template.MediaTemplateView; +import com.zhiqim.yangcai.design.dbo.works.DesWorksFile; + +/** + * 模板详情 + * + * @version v1.0.0 @author PVer 2017-11-17 新建与整理 + */ +public class TemplateShowAction implements Action +{ + @Override + public void execute(HttpRequest request) throws Exception + { + long mediaId = request.getParameterLong("mediaId"); + if (mediaId == -1) + { + return; + } + + MediaTemplateView media = ORM.get(ZView.class).item(MediaTemplateView.class, new Selector("mediaId", mediaId)); + if (media == null) + { + request.setResponseError("该模板已删除"); + return; + } + request.setAttribute("media", media); + request.setAttribute("urlParam", request.getParameter("urlParam")); + + // 浏览数 + int browseNum = ORM.get(ZTable.class).count(DesTemplateEvent.class, new Selector().addMust("mediaId", mediaId).addMust("eventType", 1)); + // 收藏数mediaId + int collectNum = ORM.get(ZTable.class).count(DesTemplateEvent.class, new Selector().addMust("mediaId", mediaId).addMust("eventType", 2)); + // 下载数 + int downNum = ORM.get(ZTable.class).count(DesTemplateEvent.class, new Selector().addMust("mediaId", mediaId).addMust("eventType", 4)); + // 版式 + MediaBg mediaBg = ORM.get(ZTable.class).item(MediaBg.class, new Selector().addMust("mediaId", mediaId)); + + // 此用户是否已收藏 + Selector selector = new Selector(); + selector.addMust("mediaId", mediaId); + selector.addMust("eventType", 2); + selector.addMust("operatorCode", request.getSessionName()); + DesTemplateEvent event = ORM.get(ZTable.class).item(DesTemplateEvent.class, selector); + if (event != null) + { + request.setAttribute("userEventId", event.getEventId()); + } + else + { + request.setAttribute("userEventId", 0); + } + + List worksFiles = ORM.get(ZTable.class).list(DesWorksFile.class, new Selector("templateId", mediaId)); + Set fileTypeSet = new HashSet<>(); + Map urlMap = new HashMap<>(); + for (DesWorksFile desWorksFile : worksFiles) + { + urlMap.put(desWorksFile.getFileType(), desWorksFile.getCdrPath()); + fileTypeSet.add(desWorksFile.getFileType()); + } + Selector sel = new Selector("operatorStatus", 0); + List oplist = ZmrBootstrap.table(request).list(ZmrOperator.class, sel); + DesTemplateScore templateScore = ORM.get(ZTable.class).item(DesTemplateScore.class, mediaId); + int score = 0; + if (templateScore != null) + { + score = templateScore.getFloatScore() + templateScore.getSaleScore() + templateScore.getUserScore(); + } + request.setAttribute("score", score); + request.setAttribute("oplist", oplist); + request.setAttribute("urlMap", urlMap); + request.setAttribute("fileTypeSet", fileTypeSet); + request.setAttribute("browseNum", browseNum); + request.setAttribute("collectNum", collectNum); + request.setAttribute("downNum", downNum); + request.setAttribute("oddEven", mediaBg.getOddEven()); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/template/UserMaterialAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/template/UserMaterialAction.java new file mode 100644 index 0000000..e03e01a --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/template/UserMaterialAction.java @@ -0,0 +1,57 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.action.template; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.extend.SwitchAction; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.template.UserMaterial; + +/** + * 用户素材管理 + * @version v1.0.0 @author zhouwenbin 2018-10-10 新建与整理 + */ +public class UserMaterialAction extends SwitchAction +{ + + public void list(HttpRequest request) throws Exception + { + int pageNo = request.getParameterInt("page", 1); + int pageSize = request.getParameterInt("page.size", 20); + String typeCode = request.getParameter("typeCode"); + String catCode = request.getParameter("catCode"); + String designer = request.getParameter("designer"); + + Selector sel = new Selector(); + sel.addMaybe("typeCode", typeCode); + sel.addMaybe("catCode", catCode); + sel.addMaybeLike("designer", designer); + + sel.addOrderbyAsc("svgSeq"); + PageResult pageResult = ORM.get(ZTable.class).page(UserMaterial.class, pageNo, pageSize, sel); + pageResult.addConditionMap(request.getParameterMap()); + request.setAttribute("pageResult", pageResult); + + request.setAttribute("catCode", catCode); + } + + public void add(HttpRequest request) throws Exception + { + long svgId = request.getParameterLong("svgId"); + UserMaterial material = ORM.get(ZTable.class).item(UserMaterial.class, svgId); + request.setAttribute("material", material); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/wkwechatsupport/WkwechatSupportAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/wkwechatsupport/WkwechatSupportAction.java new file mode 100644 index 0000000..9b784e0 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/wkwechatsupport/WkwechatSupportAction.java @@ -0,0 +1,76 @@ +package com.zhiqim.yangcai.design.action.wkwechatsupport; + +import java.util.HashMap; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.HttpResponse; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.manager.dbo.ZmrOperator; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +/** + * 微信公众号支持接口:用于获取设计师个人信息
            + * + * @author HuangZhiGao + * @date 2020年9月14日 下午11:33:49 + */ +public class WkwechatSupportAction implements Action +{ + + private static final Log log = LogFactory.getLog(WkwechatSupportAction.class); + + /** + * 根据设计师名称获取设计师企业微信账号或联系电话
            + * + * @author HuangZhiGao + * @throws Exception + * @date 2020年9月14日 下午11:33:49 + */ + @Override + public void execute(HttpRequest request) throws Exception + { + HttpResponse response = request.getResponse(); + Map jsonMap = new HashMap(); + jsonMap.put("error", Boolean.FALSE); + + String designerName = request.getParameter("designerName"); + if (Validates.isEmpty(designerName)) + { + jsonMap.put("error", Boolean.TRUE); + jsonMap.put("errorMsg", "参数-设计师名称不能为空"); + response.print(Jsons.toString(jsonMap)); + return; + } + + try + { + ZmrOperator operator = ORM.get(ZTable.class).item(ZmrOperator.class, new Selector().addMust("operatorCode", designerName)); + + if (Validates.isNotEmpty(operator)) + { + jsonMap.put("data", Jsons.toString(operator)); + } + else + { + jsonMap.put("error", Boolean.TRUE); + jsonMap.put("errorMsg", "没有匹配到设计师"); + } + } + catch (Exception e) + { + jsonMap.put("error", Boolean.TRUE); + jsonMap.put("errorMsg", "查询异常:" + e.getMessage()); + log.error("查询异常:" + e.getMessage(), e); + } + + response.print(Jsons.toString(jsonMap)); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/AllWorksAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/AllWorksAction.java new file mode 100644 index 0000000..cabea54 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/AllWorksAction.java @@ -0,0 +1,46 @@ +package com.zhiqim.yangcai.design.action.works; + +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.Global; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; + +import com.zhiqim.yangcai.cache.DesignIndustryCache; +import com.zhiqim.yangcai.design.dbo.design.DesignIndustry; +import com.zhiqim.yangcai.design.dbo.design.DesignType; + +/** + * 所有作品 + * + * @version v1.0.0 @author Deng 2017-10-24 新建与整理 + */ +public class AllWorksAction implements Action +{ + @Override + public void execute(HttpRequest request) throws Exception + { + String uri = request.getRequestURI(); + String[] param = uri.split("\\?"); + + // 如果是手机则重定向到手机端 + if (request.isMobile()) + { + String url = "/mobileTemplateHome.htm"; + if (param.length > 1) + { + url += "?" + param[1]; + } + + request.setRedirect(url); + return; + } + List prdList = ORM.get(ZTable.class).list(DesignType.class); + request.setAttribute("prdList", prdList); + + List indList = Global.get(DesignIndustryCache.class).getIndustryListAll(); + request.setAttribute("indList", indList); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/BestWorksAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/BestWorksAction.java new file mode 100644 index 0000000..381ccc5 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/BestWorksAction.java @@ -0,0 +1,42 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action.works; + +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.Global; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; + +import com.zhiqim.yangcai.cache.DesignIndustryCache; +import com.zhiqim.yangcai.design.dbo.design.DesignIndustry; +import com.zhiqim.yangcai.design.dbo.design.DesignType; + +/** + * 精品作品 + * + * @version v1.0.0 @author Deng 2017-11-2 新建与整理 + */ +public class BestWorksAction implements Action +{ + @Override + public void execute(HttpRequest request) throws Exception + { + List prdList = ORM.get(ZTable.class).list(DesignType.class); + request.setAttribute("prdList", prdList); + + List indList = Global.get(DesignIndustryCache.class).getIndustryListAll(); + request.setAttribute("indList", indList); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/CdrWorksDownloadAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/CdrWorksDownloadAction.java new file mode 100644 index 0000000..0bd2ef6 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/CdrWorksDownloadAction.java @@ -0,0 +1,104 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action.works; + +import java.io.FileInputStream; +import java.io.OutputStream; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.HttpResponse; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.kernel.util.Files; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; + +import com.zhiqim.yangcai.design.dbo.works.DesWorksEvent; +import com.zhiqim.yangcai.design.dbo.works.DesWorksFile; + +/** + * 作品下载 + * + * @version v1.0.0 @author zzy 2017-10-21 新建与整理 + */ +public class CdrWorksDownloadAction implements Action +{ + + private static final Log log = LogFactory.getLog(CdrWorksDownloadAction.class); + + @Override + public void execute(HttpRequest request) throws Exception + { + long worksId = request.getParameterLong("worksId"); + DesWorksFile srcFile = ORM.get(ZTable.class).item(DesWorksFile.class, worksId); + if (srcFile == null) + { + HttpResponse response = request.getResponse(); + response.sendError(701, "数据库不存在!"); + return; + } + + String fileName = srcFile.getCdrFileName(); + String savePath = srcFile.getCdrPath(); + if (!Files.exists(savePath)) + { + HttpResponse response = request.getResponse(); + response.sendError(702, "文件或目录不存在!"); + return; + } + + HttpResponse response = request.getResponse(); + FileInputStream stream = new FileInputStream(savePath); + OutputStream out = response.getOutputStream(); + response.setContentType("application/octet-stream"); + response.addHeader("Content-Disposition", "attachment;filename=" + new String(fileName.getBytes())); + try + { + // 设置响应头和下载保存的文件名 + if (Validates.isNotEmpty(fileName) && fileName.length() > 0) + { + if (stream != null) + { + int filelen = stream.available(); + // 文件太大时内存不能一次读出,要循环 + byte a[] = new byte[filelen]; + stream.read(a); + + out.write(a); + out.flush(); + } + } + } + catch (Exception e) + { + log.error(e.getMessage(), e); + } + finally + { + stream.close(); + out.close(); + } + + DesWorksEvent event = new DesWorksEvent(); + event.setEventId(Ids.longId19()); + event.setWorksId(worksId); + event.setEventType(4); + event.setOperatorCode(request.getSessionName()); + event.setCreateTime(Sqls.nowTimestamp()); + + ORM.get(ZTable.class).insert(event); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/GroupWorksAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/GroupWorksAction.java new file mode 100644 index 0000000..db139b1 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/GroupWorksAction.java @@ -0,0 +1,42 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action.works; + +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.Global; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; + +import com.zhiqim.yangcai.cache.DesignIndustryCache; +import com.zhiqim.yangcai.design.dbo.design.DesignIndustry; +import com.zhiqim.yangcai.design.dbo.design.DesignType; + +/** + * 小组作品 + * + * @version v1.0.0 @author Deng 2017-10-24 新建与整理 + */ +public class GroupWorksAction implements Action +{ + @Override + public void execute(HttpRequest request) throws Exception + { + List prdList = ORM.get(ZTable.class).list(DesignType.class); + request.setAttribute("prdList", prdList); + + List indList = Global.get(DesignIndustryCache.class).getIndustryListAll(); + request.setAttribute("indList", indList); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/LabelRelationAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/LabelRelationAction.java new file mode 100644 index 0000000..6653bef --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/LabelRelationAction.java @@ -0,0 +1,130 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action.works; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.util.Lists; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.DesLabelAttribute; +import com.zhiqim.yangcai.design.dbo.DesLabelAttributeCat; +import com.zhiqim.yangcai.design.dbo.DesLabelIndustry; +import com.zhiqim.yangcai.design.dbo.works.DesWorksFile; + +/** + * 标签关联 + * + * @version v1.0.0 @author Deng 2017-10-25 新建与整理 + */ +public class LabelRelationAction implements Action +{ + @Override + public void execute(HttpRequest request) throws Exception + { + long worksId = request.getParameterLong("worksId"); + if (worksId == -1) + { + return; + } + + DesWorksFile works = ORM.get(ZTable.class).item(DesWorksFile.class, worksId); + request.setAttribute("works", works); + + List subsList = new ArrayList(); + List attrList = new ArrayList(); + + // 组装已关联的行业属性 + if (Validates.isNotEmpty(works.getIndustrySubIds()) && Validates.isNotEmpty(works.getAttributeIds())) + { + for (String subs : works.getIndustrySubIds().split(",")) + { + subsList.add(subs); + } + + for (String attr : works.getAttributeIds().split(",")) + { + attrList.add(attr); + } + } + + request.setAttribute("indIdarr", Lists.toString(subsList)); + request.setAttribute("subsList", subsList); + request.setAttribute("attrIdarr", Lists.toString(attrList)); + request.setAttribute("attrList", attrList); + + // 获取行业下的子行业 + List inSubList = ORM.get(ZTable.class).list(DesLabelIndustry.class, new Selector("industryId", works.getIndustryId())); + request.setAttribute("inSubList", inSubList); + + // 获取行业下的属性分类 + List attrCatList = ORM.get(ZTable.class).list(DesLabelAttributeCat.class, new Selector("industryId", works.getIndustryId())); + request.setAttribute("attrCatList", attrCatList); + + Map> map = new HashMap>(); + for (DesLabelAttributeCat cat : attrCatList) + { + List attrsList = ORM.get(ZTable.class).list(DesLabelAttribute.class, new Selector("attributeCatId", cat.getAttributeCatId())); + map.put(cat.getAttributeCatId(), attrsList); + } + request.setAttribute("map", map); + + // ==================================================================================== + + // 子行业列表 + List subIndustryList = ORM.get(ZTable.class).list(DesLabelIndustry.class); + Map> subIndustryMap = new HashMap<>(); + for (DesLabelIndustry subIn : subIndustryList) + { + List subList = subIndustryMap.get(subIn.getIndustryId()); + subList = subList != null ? subList : new ArrayList(); + subList.add(subIn); + + subIndustryMap.put(subIn.getIndustryId(), subList); + } + request.setAttribute("subIndustryMap", subIndustryMap); + + // 行业所有分类 + List attributeCatList = ORM.get(ZTable.class).list(DesLabelAttributeCat.class); + Map> attributeCatMap = new HashMap<>(); + for (DesLabelAttributeCat cat : attributeCatList) + { + List group = attributeCatMap.get(cat.getIndustryId()); + group = group != null ? group : new ArrayList(); + group.add(cat); + + attributeCatMap.put(cat.getIndustryId(), group); + } + request.setAttribute("attributeCatMap", attributeCatMap); + + // 关联标签属性 列表 + List attributeList = ORM.get(ZTable.class).list(DesLabelAttribute.class); + Map> attributeMap = new HashMap>(); + for (DesLabelAttribute attr : attributeList) + { + List group = attributeMap.get(attr.getAttributeCatId()); + group = group != null ? group : new ArrayList(); + group.add(attr); + + attributeMap.put(attr.getAttributeCatId(), group); + } + request.setAttribute("attributeMap", attributeMap); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/MaterialCatAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/MaterialCatAction.java new file mode 100644 index 0000000..a507c12 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/MaterialCatAction.java @@ -0,0 +1,104 @@ +package com.zhiqim.yangcai.design.action.works; + +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.extend.StdSwitchAction; +import org.zhiqim.httpd.validate.ones.IsNotEmpty; +import org.zhiqim.httpd.validate.ones.IsSelect; +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.annotation.AnTransaction; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.cache.DesMaterialCatCache; +import com.zhiqim.yangcai.design.dbo.works.DesMaterialCat; +import com.zhiqim.yangcai.design.dbo.works.DesMaterialCont; + +/** + * [简要描述]:作品素材分类
            + * + * @version 1.0 @author caohong 2019-9-5 新建与整理 + */ +public class MaterialCatAction extends StdSwitchAction +{ + + @Override + protected void validateId(HttpRequest request) + { + request.addValidate(new IsSelect("catId", "字符编码不能为空且不超过16个字母")); + } + + @Override + protected void validateForm(HttpRequest request) + { + request.addValidate(new IsNotEmpty("catName", "请输入分类名称")); + request.addValidate(new IsNotEmpty("catSeq", "请选分类序号")); + } + + @Override + protected void list(HttpRequest request) throws Exception + { + List result = ORM.get(ZTable.class).list(DesMaterialCat.class, new Selector().addOrderbyAsc("catSeq")); + request.setAttribute("result", result); + } + + @Override + protected void add(HttpRequest request) throws Exception + { + + } + + @Override + protected void modify(HttpRequest request) throws Exception + { + long catId = request.getParameterLong("catId"); + DesMaterialCat cat = ORM.get(ZTable.class).item(DesMaterialCat.class, catId); + + request.setAttribute("item", cat); + } + + @Override + @AnTransaction + protected void insert(HttpRequest request) throws Exception + { + DesMaterialCat cat = request.getParameter(DesMaterialCat.class); + cat.setCatId(Ids.longId13()); + if (ORM.get(ZTable.class).count(DesMaterialCat.class, cat.getCatId()) > 0) + { + request.returnHistory("分类编码已存在,请重新输入"); + return; + } + + ORM.get(ZTable.class).insert(cat); + Global.get(DesMaterialCatCache.class).doRefresh(); + } + + @Override + @AnTransaction + protected void update(HttpRequest request) throws Exception + { + DesMaterialCat cat = request.getParameter(DesMaterialCat.class); + + ORM.get(ZTable.class).replace(cat); + Global.get(DesMaterialCatCache.class).doRefresh(); + } + + @Override + @AnTransaction + protected void delete(HttpRequest request) throws Exception + { + long catId = request.getParameterLong("catId"); + if (ORM.get(ZTable.class).count(DesMaterialCont.class, new Selector("catId", catId)) > 0) + { + request.returnHistory("该分类已被使用,不允许删除"); + return; + } + + ORM.get(ZTable.class).delete(DesMaterialCat.class, catId); + Global.get(DesMaterialCatCache.class).doRefresh(); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/MaterialContAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/MaterialContAction.java new file mode 100644 index 0000000..04662f6 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/MaterialContAction.java @@ -0,0 +1,46 @@ +package com.zhiqim.yangcai.design.action.works; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.extend.SwitchAction; +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Strings; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.works.DesMaterialCont; + +/** + * [简要描述]:素材内容管理
            + * + * @version 1.0 @author caohong 2019-9-5 新建与整理 + */ +public class MaterialContAction extends SwitchAction +{ + public static String ROOT = Global.getString("works", "root", "works"); // 根目录 + + public void list(HttpRequest request) throws Exception + { + int pageNo = request.getParameterInt("page", 1); + int pageSize = request.getParameterInt("page.size", 20); + String keywords = request.getParameter("keywords"); + long catId = request.getParameterLong("catId"); + + Selector sel = new Selector(); + sel.addMaybe("catId", catId); + sel.addMaybeLike("keywords", keywords); + + sel.addOrderbyAsc("materialSeq"); + PageResult pageResult = ORM.get(ZTable.class).page(DesMaterialCont.class, pageNo, pageSize, sel); + pageResult.addConditionMap(request.getParameterMap()); + request.setAttribute("pageResult", pageResult); + } + + public void add(HttpRequest request) throws Exception + { + request.setAttribute("uploadPath", Strings.addEndsWith(ROOT, "/") + "material/" + DateTimes.getDateTime6String()); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/WorksAuditAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/WorksAuditAction.java new file mode 100644 index 0000000..15a8fda --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/WorksAuditAction.java @@ -0,0 +1,42 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action.works; + +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.Global; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; + +import com.zhiqim.yangcai.cache.DesignIndustryCache; +import com.zhiqim.yangcai.design.dbo.design.DesignIndustry; +import com.zhiqim.yangcai.design.dbo.design.DesignType; + +/** + * 精品审核 + * + * @version v1.0.0 @author Deng 2017-11-4 新建与整理 + */ +public class WorksAuditAction implements Action +{ + @Override + public void execute(HttpRequest request) throws Exception + { + List prdList = ORM.get(ZTable.class).list(DesignType.class); + request.setAttribute("prdList", prdList); + + List indList = Global.get(DesignIndustryCache.class).getIndustryListAll(); + request.setAttribute("indList", indList); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/WorksBestAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/WorksBestAction.java new file mode 100644 index 0000000..60a3dab --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/WorksBestAction.java @@ -0,0 +1,42 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action.works; + +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.Global; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; + +import com.zhiqim.yangcai.cache.DesignIndustryCache; +import com.zhiqim.yangcai.design.dbo.design.DesignIndustry; +import com.zhiqim.yangcai.design.dbo.design.DesignType; + +/** + * 我的精品 + * + * @version v1.0.0 @author Deng 2017-10-21 新建与整理 + */ +public class WorksBestAction implements Action +{ + @Override + public void execute(HttpRequest request) throws Exception + { + List prdList = ORM.get(ZTable.class).list(DesignType.class); + request.setAttribute("prdList", prdList); + + List indList = Global.get(DesignIndustryCache.class).getIndustryListAll(); + request.setAttribute("indList", indList); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/WorksCollectAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/WorksCollectAction.java new file mode 100644 index 0000000..f2a40de --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/WorksCollectAction.java @@ -0,0 +1,42 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action.works; + +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.Global; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; + +import com.zhiqim.yangcai.cache.DesignIndustryCache; +import com.zhiqim.yangcai.design.dbo.design.DesignIndustry; +import com.zhiqim.yangcai.design.dbo.design.DesignType; + +/** + * 我收藏的 + * + * @version v1.0.0 @author Deng 2017-10-21 新建与整理 + */ +public class WorksCollectAction implements Action +{ + @Override + public void execute(HttpRequest request) throws Exception + { + List prdList = ORM.get(ZTable.class).list(DesignType.class); + request.setAttribute("prdList", prdList); + + List indList = Global.get(DesignIndustryCache.class).getIndustryListAll(); + request.setAttribute("indList", indList); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/WorksDownloadAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/WorksDownloadAction.java new file mode 100644 index 0000000..5f15ac7 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/WorksDownloadAction.java @@ -0,0 +1,160 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action.works; + +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.HttpResponse; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.httpclient.HttpDownload; +import org.zhiqim.kernel.util.Files; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Streams; +import org.zhiqim.kernel.util.Strings; +import org.zhiqim.kernel.util.Urls; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.constants.FileTypeConstants; +import com.zhiqim.yangcai.design.dao.FileCheckDao; +import com.zhiqim.yangcai.design.dbo.order.DesignAtta; +import com.zhiqim.yangcai.design.dbo.works.DesWorksEvent; +import com.zhiqim.yangcai.design.dbo.works.DesWorksFile; + +/** + * 作品下载 + * + * @version v1.0.0 @author zzy 2017-10-21 新建与整理 + */ +public class WorksDownloadAction implements Action +{ + @Override + public void execute(HttpRequest request) throws Exception + { + long worksId = request.getParameterLong("worksId"); + DesWorksFile srcFile = ORM.get(ZTable.class).item(DesWorksFile.class, worksId); + if (srcFile == null) + { + request.setAlertMsg("文件不存在,请重新选择"); + return; + } + + String fileName = srcFile.getCdrFileName(); + String cdrPath = srcFile.getCdrPath(); + + if (Validates.isUrl(cdrPath)) + { + String dir = FileCheckDao.getCurrentTempFolder("works/srcFile"); + HttpDownload download = new HttpDownload(cdrPath); + download.setConnectTimeout(30); + download.setReadTimeout(30 * 60); + download.setFileDir(dir); + download.setFileName(fileName); + download.execute(); + + responseFile(dir + "/" + fileName, request, fileName); + return; + } + + if (Files.exists(cdrPath)) + {// 本地文件存在 + responseFile(cdrPath, request, fileName); + } + else + { + Selector selector = new Selector(); + selector.addMust("designId", worksId); + selector.addMust("attaModul", FileTypeConstants.FILE_DESGIN.value()); + DesignAtta atta = ORM.get(ZTable.class).item(DesignAtta.class, selector); + if (atta == null) + { + request.returnHistory("文件不存在,请重新选择"); + return; + } + + if (Files.exists(atta.getSavePath())) + { + responseFile(cdrPath, request, fileName); + return; + } + + if (Validates.isEmptyBlank(atta.getOssUrl())) + { + request.returnHistory("文件不存在,请重新选择"); + return; + } + + String dir = FileCheckDao.getCurrentTempFolder("works"); + String filePath = Strings.addEndsWith(dir, "/") + fileName; + HttpDownload download = new HttpDownload(atta.getOssUrl()); + download.setConnectTimeout(30); + download.setReadTimeout(30 * 60); + download.setFileDir(dir); + download.setFileName(fileName); + download.execute(); + if (!download.isResponseSuccess()) + {// 下载失败 + request.returnHistory("下载失败"); + return; + } + + responseFile(filePath, request, fileName); + } + + DesWorksEvent event = new DesWorksEvent(); + event.setEventId(Ids.longId19()); + event.setWorksId(worksId); + event.setEventType(4); + event.setOperatorCode(request.getSessionName()); + event.setCreateTime(Sqls.nowTimestamp()); + + ORM.get(ZTable.class).insert(event); + } + + private static void responseFile(String filePath, HttpRequest request, String fileName) throws IOException + { + HttpResponse response = request.getResponse(); + if (Validates.isEmptyBlank(fileName)) + { + fileName = Files.getFileName(filePath); + } + + try (FileInputStream input = new FileInputStream(filePath)) + { + String downName = Urls.encodeUTF8(fileName); + if (request.isChrome()) + {// chrome不支持括号也是醉了 + downName = downName.replaceAll("%28", "("); + downName = downName.replaceAll("%29", ")"); + } + + if (request.isFirefox()) + { + response.setHeader(_CONTENT_DISPOSITION_, "attachment; filename*=UTF-8''" + fileName); + } + else + { + response.setHeader(_CONTENT_DISPOSITION_, "attachment; filename=" + downName); + } + + response.setContentType(_APPLICATION_OCTET_STREAM_); + response.setHeader(_CONTENT_LENGTH_, new File(filePath).length()); + Streams.putBytes(input, response.getOutputStream()); + } + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/WorksListAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/WorksListAction.java new file mode 100644 index 0000000..0aab801 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/WorksListAction.java @@ -0,0 +1,55 @@ +package com.zhiqim.yangcai.design.action.works; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.works.DesWorksFile; + +/** + * 作品列表 + * + * @version v1.0.0 @author Deng 2017-11-24 新建与整理 + */ +public class WorksListAction implements Action +{ + @Override + public void execute(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page", 1); + int pageSize = 20; + + long worksType = request.getParameterLong("worksType"); + long prdTypeId = request.getParameterLong("prdTypeId"); + long industryId = request.getParameterLong("industryId"); + + Selector selector = new Selector(); + if (worksType != -1) + { + selector.addMust("worksType", worksType); + } + + if (prdTypeId != -1) + { + selector.addMust("prdTypeId", prdTypeId); + } + + if (industryId != -1) + { + selector.addMust("industryId", industryId); + } + + selector.addOrderbyDesc("createTime"); + PageResult pageResult = ORM.get(ZTable.class).page(DesWorksFile.class, page, pageSize, selector); + pageResult.addConditionMap(request.getParameterMap()); + request.setAttribute("pageResult", pageResult); + + request.setAttribute("worksType", worksType); + request.setAttribute("prdTypeId", prdTypeId); + request.setAttribute("industryId", industryId); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/WorksMyAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/WorksMyAction.java new file mode 100644 index 0000000..9ed75d7 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/WorksMyAction.java @@ -0,0 +1,42 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action.works; + +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.Global; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; + +import com.zhiqim.yangcai.cache.DesignIndustryCache; +import com.zhiqim.yangcai.design.dbo.design.DesignIndustry; +import com.zhiqim.yangcai.design.dbo.design.DesignType; + +/** + * 我的作品 + * + * @version v1.0.0 @author Deng 2017-10-21 新建与整理 + */ +public class WorksMyAction implements Action +{ + @Override + public void execute(HttpRequest request) throws Exception + { + List prdList = ORM.get(ZTable.class).list(DesignType.class); + request.setAttribute("prdList", prdList); + + List indList = Global.get(DesignIndustryCache.class).getIndustryListAll(); + request.setAttribute("indList", indList); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/WorksShareAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/WorksShareAction.java new file mode 100644 index 0000000..7e69a29 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/WorksShareAction.java @@ -0,0 +1,42 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action.works; + +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.Global; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; + +import com.zhiqim.yangcai.cache.DesignIndustryCache; +import com.zhiqim.yangcai.design.dbo.design.DesignIndustry; +import com.zhiqim.yangcai.design.dbo.design.DesignType; + +/** + * 给我分享的 + * + * @version v1.0.0 @author Deng 2017-10-21 新建与整理 + */ +public class WorksShareAction implements Action +{ + @Override + public void execute(HttpRequest request) throws Exception + { + List prdList = ORM.get(ZTable.class).list(DesignType.class); + request.setAttribute("prdList", prdList); + + List indList = Global.get(DesignIndustryCache.class).getIndustryListAll(); + request.setAttribute("indList", indList); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/WorksShowAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/WorksShowAction.java new file mode 100644 index 0000000..c786363 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/WorksShowAction.java @@ -0,0 +1,96 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.action.works; + +import java.util.ArrayList; +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.manager.dbo.ZmrDept; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.works.DesWorksEvent; +import com.zhiqim.yangcai.design.dbo.works.DesWorksFile; + +/** + * + * 查看作品 + * + * @version v1.0.0 @author Deng 2017-11-2 新建与整理 + */ +public class WorksShowAction implements Action +{ + @Override + public void execute(HttpRequest request) throws Exception + { + long worksId = request.getParameterLong("worksId"); + DesWorksFile works = ORM.get(ZTable.class).item(DesWorksFile.class, worksId); + if (works == null) + { + request.returnHistory("文件不存在,请重新选择"); + return; + } + + if (works.getKeywordName() != null) + { + works.setKeywordName(works.getKeywordName().replace(" ", ",")); + } + + Selector dSelector = new Selector(); + dSelector.addMustInLong("parentId", 1803021010350856L, 1803021011250863L); + List deptList = ORM.get(ZTable.class).list(ZmrDept.class, dSelector); + request.setAttribute("deptList", deptList); + + // 组装已分享的部门ID + List constrList = new ArrayList(); + if (Validates.isNotEmpty(works.getDeptId())) + { + String[] deptStr = works.getDeptId().split(","); + for (String str : deptStr) + { + constrList.add(str); + } + } + request.setAttribute("constrList", constrList); + + // 浏览数 + int browseNum = ORM.get(ZTable.class).count(DesWorksEvent.class, new Selector().addMust("worksId", worksId).addMust("eventType", 1)); + // 收藏数 + int collectNum = ORM.get(ZTable.class).count(DesWorksEvent.class, new Selector().addMust("worksId", worksId).addMust("eventType", 2)); + // 下载数 + int downNum = ORM.get(ZTable.class).count(DesWorksEvent.class, new Selector().addMust("worksId", worksId).addMust("eventType", 4)); + + // 此用户是否已收藏 + Selector selector = new Selector(); + selector.addMust("worksId", worksId); + selector.addMust("eventType", 2); + selector.addMust("operatorCode", request.getSessionName()); + DesWorksEvent event = ORM.get(ZTable.class).item(DesWorksEvent.class, selector); + if (event != null) + { + request.setAttribute("userEventId", event.getEventId()); + } + else + { + request.setAttribute("userEventId", 0); + } + + request.setAttribute("browseNum", browseNum); + request.setAttribute("collectNum", collectNum); + request.setAttribute("downNum", downNum); + request.setAttribute("works", works); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/WorksShowPCAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/WorksShowPCAction.java new file mode 100644 index 0000000..51ef42e --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/WorksShowPCAction.java @@ -0,0 +1,42 @@ +package com.zhiqim.yangcai.design.action.works; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.constants.BaseConstants; +import com.zhiqim.yangcai.design.dbo.template.MediaTemplateView; + +/** + * + * 对外查看作品 + * + * @version v1.0.0 @author caohong 2019-9-7 新建与整理 + */ +public class WorksShowPCAction implements Action +{ + @Override + public void execute(HttpRequest request) throws Exception + { + long templateId = request.getParameterLong("templateId"); + + MediaTemplateView media = ORM.get(ZView.class).item(MediaTemplateView.class, new Selector("mediaId", templateId)); + if (media == null) + { + request.setResponseError("该模板已删除"); + return; + } + + // 素材图片替换cdn域名 + if (Validates.isNotEmpty(media.getMediaUrl())) + { + String newUrl = media.getMediaUrl().replace(BaseConstants.OSS_URL, BaseConstants.CDN_URL); + media.setMediaUrl(newUrl); + } + + request.setAttribute("media", media); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/WorksUploadAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/WorksUploadAction.java new file mode 100644 index 0000000..31547af --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/action/works/WorksUploadAction.java @@ -0,0 +1,66 @@ +package com.zhiqim.yangcai.design.action.works; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.cache.DesignIndustryCache; +import com.zhiqim.yangcai.cache.DesignTypeCache; +import com.zhiqim.yangcai.design.dbo.DesLabelIndustry; +import com.zhiqim.yangcai.design.dbo.design.DesignIndustry; +import com.zhiqim.yangcai.design.dbo.design.DesignType; + +/** + * 作品上传 + * + * @version v1.0.0 @author caohong 2019-9-5 新建与整理 + */ +public class WorksUploadAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + List prdList = ORM.get(ZTable.class).list(DesignType.class); + request.setAttribute("prdList", prdList); + List indList = Global.get(DesignIndustryCache.class).getIndustryListAll(); + request.setAttribute("indList", indList); + + // 获取行业下的子行业,默认取第一个 + List inSubList = ORM.get(ZTable.class).list(DesLabelIndustry.class, new Selector("industryId", indList.get(0).getIndustryId())); + request.setAttribute("inSubList", inSubList); + + Map prdMap = new HashMap(); + for (DesignType type : Global.get(DesignTypeCache.class).getList()) + { + prdMap.put(type.getTypeId(), type.getTypeName()); + } + + // 子行业列表 + List subIndustryList = ORM.get(ZTable.class).list(DesLabelIndustry.class); + Map> subIndustryMap = new HashMap<>(); + for (DesLabelIndustry subIn : subIndustryList) + { + List subList = subIndustryMap.get(subIn.getIndustryId()); + subList = subList != null ? subList : new ArrayList(); + subList.add(subIn); + + subIndustryMap.put(subIn.getIndustryId(), subList); + } + request.setAttribute("subIndustryMap", subIndustryMap); + + String dateDir = DateTimes.getDateTime8String(); + + request.setAttribute("dateDir", dateDir); + request.setAttribute("prdMap", prdMap); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/constant/ConsumerTypeConstants.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/constant/ConsumerTypeConstants.java new file mode 100644 index 0000000..733b26e --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/constant/ConsumerTypeConstants.java @@ -0,0 +1,60 @@ +/** + * 扬彩印刷设计 + * 文件名 :ConsumerTypeConstants.java + * 创建人 :jiangbin + * 创建时间:2019-12-17 + */ +package com.zhiqim.yangcai.design.constant; + +import java.util.HashMap; +import java.util.Map; + +import org.zhiqim.kernel.annotation.AnAlias; + +/** + * 客户类型常量 + * + * @version v1.0.0 @author jiangbin 2019-12-17 新建与整理 + */ +@AnAlias("ConsumerTypeConstants") +public class ConsumerTypeConstants +{ + /** 企业 */ + public static int ENTERPRISE = 1; + + /** 渠道商 */ + public static int CHANNEL_BUSINESS = 2; + + /** 个体户 */ + public static int SELF_EMPLOYED = 3; + + public static Map map = new HashMap<>(); + + static + { + map.clear(); + + map.put(ENTERPRISE, "企业"); + map.put(CHANNEL_BUSINESS, "渠道商"); + map.put(SELF_EMPLOYED, "个体户"); + } + + /** + * 客户类型map + * @return + */ + public static Map getConsumerTypeMap() + { + return map; + } + + /** + * 获取客户类型 + * @param i + * @return + */ + public static String getConsumerType(int i) + { + return map.get(i); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/constant/DesignConstants.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/constant/DesignConstants.java new file mode 100644 index 0000000..92be198 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/constant/DesignConstants.java @@ -0,0 +1,17 @@ +package com.zhiqim.yangcai.design.constant; + +/** + * + * 公共常量定义 + * + * @version v1.0.0 @author PVer 2018-3-19 新建与整理 + */ +public interface DesignConstants +{ + public static final String DESIGNNING_MAP = "designningMap"; + + public static final String LONG_TAIL_KEYWORD_MAP = "longTailKeywordMap"; + + /** 11位手机号 */ + public static final String ZMR_MOBILE = "^0?(13|14|15|16|17|18|19)[0-9]{9}$"; +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/constant/KeywordScoreConstants.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/constant/KeywordScoreConstants.java new file mode 100644 index 0000000..907ff9f --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/constant/KeywordScoreConstants.java @@ -0,0 +1,82 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.constant; + +import java.util.ArrayList; +import java.util.List; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.util.consts.Str; + +/** + * 关键词分数常量 + * + * @version v1.0.0 @author Deng 2018-3-5 新建与整理 + */ +@AnAlias("KeywordScoreConstants") +public class KeywordScoreConstants +{ + /** 选中 */ + public static Str KEYWORD_SELECT = new Str("KEYWORD_SELECT", "选中"); + + /** 初稿 */ + public static Str KEYWORD_DRAFT = new Str("KEYWORD_DRAFT", "初稿"); + + /** 定稿 */ + public static Str KEYWORD_FINAL = new Str("KEYWORD_FINAL", "定稿"); + + /** 取消选中 */ + public static Str KEYWORD_SELECT_CANCEL = new Str("KEYWORD_SELECT_CANCEL", "取消选中"); + + /** 订单取消 */ + public static Str KEYWORD_ORDER_CANCEL = new Str("KEYWORD_ORDER_CANCEL", "订单取消"); + + /**************************************************/ + //业务操作 + /**************************************************/ + private static List allList = new ArrayList<>(); + + static + { + allList.add(KEYWORD_SELECT); + allList.add(KEYWORD_DRAFT); + allList.add(KEYWORD_FINAL); + allList.add(KEYWORD_SELECT_CANCEL); + allList.add(KEYWORD_ORDER_CANCEL); + } + + /** + * 关键词参数列表 + * @param scoreName + * @return + */ + public static List getKeywordParamList() + { + return allList; + } + + /** + * 查询关键词参数描述 + * @param key + * @return + */ + public static String getKeywordParamDesc(String key) + { + for (Str score : allList) + { + if (score.value().equals(key)) + return score.desc(); + } + + return ""; + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/constant/PerformanceStatConstants.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/constant/PerformanceStatConstants.java new file mode 100644 index 0000000..04bd291 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/constant/PerformanceStatConstants.java @@ -0,0 +1,31 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.constant; + +import org.zhiqim.kernel.util.consts.Str; + +/** + * 统计绩效常量 + * + * @version v1.0.0 @author liuhu 2018-12-13 新建与整理 + */ +public class PerformanceStatConstants +{ + public static Str NORMAL_PROCESSING = new Str("NORMAL_PROCESSING", "常规后加工"); + public static Str SPECIAL_PROCESSING = new Str("SPECIAL_PROCESSING", "特殊后加工"); + + public static long SOFT_ROLE_ID = 1822254949277L; // 软件应用组 设计组长角色编号 + + public static long CDR_ROLE_ID = 1806191442254777L; // CDR组 设计组长角色编号 + + public static double QC_SCORE = 100; // 设计师质检初始分数; +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/constant/ScoreConstants.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/constant/ScoreConstants.java new file mode 100644 index 0000000..004e7ce --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/constant/ScoreConstants.java @@ -0,0 +1,211 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.constant; + +import java.util.ArrayList; +import java.util.List; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.util.consts.Str; + +/** + * 模板分数常量 + * + * @version v1.0.0 @author Deng 2018-3-5 新建与整理 + */ +@AnAlias("ScoreConstants") +public class ScoreConstants +{ + public static final String SCORE_TEMPLATE = "TEMPLATE"; + + public static final String SCORE_KEYWORD = "KEYWORD"; + + /**************************************************/ + // 关键词常量 + /**************************************************/ + + /** 关键词基础分 */ + public static Str KEYWROD_BASE_SCORE = new Str("KEYWROD_BASE_SCORE", "基础分"); + + /** 关键词搜索分 */ + public static Str KEYWROD_SEARCH_SCORE = new Str("KEYWROD_SEARCH_SCORE", "搜索分"); + + /** 关键词标签 */ + public static Str KEYWROD_LABEL_SCORE = new Str("KEYWROD_LABEL_SCORE", "标签"); + + /** 自定义标签 */ + public static Str CUSTOM_LABEL_KEYWORD = new Str("CUSTOM_LABEL_KEYWORD", "自定义标签"); + + /** 长尾词 */ + public static Str LONG_TAIL_KEYWROD_SCORE = new Str("LONG_TAIL_KEYWROD_SCORE", "长尾词"); + + /**************************************************/ + // 模板分数常量 + /**************************************************/ + + /** 基础分 */ + public static Str BASE_SCORE = new Str("BASE_SCORE", "基础分"); + + /** 动态分 */ + public static Str FLOAT_SCORE = new Str("FLOAT_SCORE", "动态分"); + + /** 销量分 */ + public static Str SALE_SCORE = new Str("SALE_SCORE", "销量分"); + + /** 用户评分 */ + public static Str USER_SCORE = new Str("USER_SCORE", "用户评分"); + + /** 积分类型 */ + public static Str SCORE_TYPE_1 = new Str("1", "常规时间内开启接单"); + public static Str SCORE_TYPE_2 = new Str("2", "接单4小时内定稿"); + public static Str SCORE_TYPE_3 = new Str("3", "接单4-6小时内定稿"); + public static Str SCORE_TYPE_4 = new Str("4", "大金额订单定稿奖励(300-500元)"); + public static Str SCORE_TYPE_5 = new Str("5", "大金额订单定稿奖励(500元以上)"); + public static Str SCORE_TYPE_6 = new Str("6", "定稿5款及以上订单"); + public static Str SCORE_TYPE_7 = new Str("7", "定稿包含后加工"); + public static Str SCORE_TYPE_100 = new Str("100", "人工修正"); + public static Str SCORE_TYPE_101 = new Str("101", "接单48小时未定稿"); + public static Str SCORE_TYPE_102 = new Str("102", "待办事项12小时内未处理"); + public static Str SCORE_TYPE_103 = new Str("103", "订单申请退款"); + public static Str SCORE_TYPE_104 = new Str("104", "订单产生售后"); + public static Str SCORE_TYPE_105 = new Str("105", "客户投诉"); + public static Str SCORE_TYPE_106 = new Str("106", "订单设计取消"); + public static Str SCORE_TYPE_107 = new Str("107", "老客户订单"); + public static Str SCORE_TYPE_108 = new Str("108", "设计师放弃订单"); + + /**************************************************/ + // 业务操作 + /**************************************************/ + + private static List keywordList = new ArrayList<>(); + private static List templateList = new ArrayList<>(); + private static List scoreTypeList = new ArrayList<>(); + static + { + templateList.add(BASE_SCORE); + templateList.add(FLOAT_SCORE); + templateList.add(SALE_SCORE); + templateList.add(USER_SCORE); + + keywordList.add(KEYWROD_BASE_SCORE); + keywordList.add(KEYWROD_SEARCH_SCORE); + keywordList.add(KEYWROD_LABEL_SCORE); + keywordList.add(CUSTOM_LABEL_KEYWORD); + keywordList.add(LONG_TAIL_KEYWROD_SCORE); + + scoreTypeList.add(SCORE_TYPE_1); + scoreTypeList.add(SCORE_TYPE_2); + scoreTypeList.add(SCORE_TYPE_3); + scoreTypeList.add(SCORE_TYPE_4); + scoreTypeList.add(SCORE_TYPE_5); + scoreTypeList.add(SCORE_TYPE_6); + scoreTypeList.add(SCORE_TYPE_7); + scoreTypeList.add(SCORE_TYPE_100); + scoreTypeList.add(SCORE_TYPE_101); + scoreTypeList.add(SCORE_TYPE_102); + scoreTypeList.add(SCORE_TYPE_103); + scoreTypeList.add(SCORE_TYPE_104); + scoreTypeList.add(SCORE_TYPE_105); + scoreTypeList.add(SCORE_TYPE_106); + scoreTypeList.add(SCORE_TYPE_107); + scoreTypeList.add(SCORE_TYPE_108); + } + + /** + * 模板分数类型列表 + * + * @param scoreName + * @return + */ + public static List getTemplateScoreTypeList() + { + return templateList; + } + + /** + * 查询模板类型描述 + * + * @param key + * @return + */ + public static String getTemplateScoreTypeDesc(String key) + { + for (Str score : templateList) + { + if (score.value().equals(key)) + { + return score.desc(); + } + } + + return ""; + } + + /** + * 关键词分数类型列表 + * + * @param scoreName + * @return + */ + public static List getKeywordScoreTypeList() + { + return keywordList; + } + + /** + * 查询关键词类型描述 + * + * @param key + * @return + */ + public static String getKeywordScoreTypeDesc(String key) + { + for (Str score : keywordList) + { + if (score.value().equals(key)) + { + return score.desc(); + } + } + + return ""; + } + + /** + * 评分类型列表 + * + * @return + */ + public static List getScoreTypeList() + { + return scoreTypeList; + } + + /** + * 查询评分类型描述 + * + * @param key + * @return + */ + public static String getScoreTypeListDesc(String key) + { + for (Str score : scoreTypeList) + { + if (score.value().equals(key)) + { + return score.desc(); + } + } + + return ""; + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/constant/TemplateScoreConstants.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/constant/TemplateScoreConstants.java new file mode 100644 index 0000000..6f47efd --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/constant/TemplateScoreConstants.java @@ -0,0 +1,194 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.constant; + +import java.util.ArrayList; +import java.util.List; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.util.consts.Str; + +/** + * 模板分数常量 + * + * @version v1.0.0 @author Deng 2018-3-5 新建与整理 + */ +@AnAlias("TemplateScoreConstants") +public class TemplateScoreConstants +{ + + /**************************************************/ + // 动态分常量 + /**************************************************/ + + /** 浏览 */ + public static Str TEMPLATE_BROWSE = new Str("TEMPLATE_BROWSE", "浏览"); + + /** 下载 */ + public static Str TEMPLATE_DOWN = new Str("TEMPLATE_DOWN", "下载"); + + /** 收藏 */ + public static Str TEMPLATE_COLLECT = new Str("TEMPLATE_COLLECT", "收藏"); + + /** 分享 */ + public static Str TEMPLATE_SHARE = new Str("TEMPLATE_SHARE", "分享"); + + /** 取消分享 */ + public static Str CANCEL_TEMPLATE_SHARE = new Str("CANCEL_TEMPLATE_SHARE", "取消分享"); + + /** 复制 */ + public static Str TEMPLATE_COPY = new Str("TEMPLATE_COPY", "复制"); + + /** 精品 */ + public static Str TEMPLATE_BEST = new Str("TEMPLATE_BEST", "精品"); + + /** 取消精品 */ + public static Str TEMPLATE_BEST_CANCEL = new Str("TEMPLATE_BEST_CANCEL", "取消精品"); + + /** 取消收藏 */ + public static Str TEMPLATE_COLLECT_CANCEL = new Str("TEMPLATE_COLLECT_CANCEL", "取消收藏"); + + /**************************************************/ + // 销量分常量 + /**************************************************/ + /** 初稿 */ + public static Str TEMPLATE_DRAFT = new Str("TEMPLATE_DRAFT", "初稿"); + + /** 定稿 */ + public static Str TEMPLATE_FINAL = new Str("TEMPLATE_FINAL", "定稿"); + + /** 定稿退回 */ + public static Str TEMPLATE_FINAL_CANCEL = new Str("TEMPLATE_FINAL_CANCEL", "定稿退回"); + + /** 取消订单 */ + public static Str TEMPLATE_ORDER_CANCEL = new Str("TEMPLATE_ORDER_CANCEL", "取消订单"); + + /**************************************************/ + // 业务操作 + /**************************************************/ + private static List allList = new ArrayList<>(); + private static List floatList = new ArrayList<>(); + private static List saleList = new ArrayList<>(); + + static + { + allList.add(TEMPLATE_BROWSE); + allList.add(TEMPLATE_DOWN); + allList.add(TEMPLATE_COLLECT); + allList.add(TEMPLATE_SHARE); + allList.add(CANCEL_TEMPLATE_SHARE); + allList.add(TEMPLATE_COPY); + allList.add(TEMPLATE_BEST); + allList.add(TEMPLATE_BEST_CANCEL); + allList.add(TEMPLATE_COLLECT_CANCEL); + allList.add(TEMPLATE_DRAFT); + allList.add(TEMPLATE_FINAL); + allList.add(TEMPLATE_FINAL_CANCEL); + allList.add(TEMPLATE_ORDER_CANCEL); + + floatList.add(TEMPLATE_BROWSE); + floatList.add(TEMPLATE_DOWN); + floatList.add(TEMPLATE_COLLECT); + floatList.add(TEMPLATE_SHARE); + floatList.add(CANCEL_TEMPLATE_SHARE); + floatList.add(TEMPLATE_COPY); + floatList.add(TEMPLATE_BEST); + floatList.add(TEMPLATE_BEST_CANCEL); + floatList.add(TEMPLATE_COLLECT_CANCEL); + + saleList.add(TEMPLATE_DRAFT); + saleList.add(TEMPLATE_FINAL); + saleList.add(TEMPLATE_ORDER_CANCEL); + } + + /** + * 模板分数列表 + * + * @param scoreName + * @return + */ + public static List getTemplateParamList() + { + return allList; + } + + /** + * 查询模板动态分描述 + * + * @param key + * @return + */ + public static String getTemplateParamDesc(String key) + { + for (Str score : allList) + { + if (score.value().equals(key)) + return score.desc(); + } + + return ""; + } + + /** + * 模板动态分列表 + * + * @param scoreName + * @return + */ + public static List getTemplateFloatList() + { + return floatList; + } + + /** + * 查询模板动态分描述 + * + * @param key + * @return + */ + public static String getTemplateFloatDesc(String key) + { + for (Str score : floatList) + { + if (score.value().equals(key)) + return score.desc(); + } + + return ""; + } + + /** + * 模板销量分列表 + * + * @param scoreName + * @return + */ + public static List getTemplateSaleList() + { + return saleList; + } + + /** + * 查询模板销量分描述 + * + * @param key + * @return + */ + public static String getTemplateSaleDesc(String key) + { + for (Str score : saleList) + { + if (score.value().equals(key)) + return score.desc(); + } + + return ""; + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/constant/VirtualAccountConstants.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/constant/VirtualAccountConstants.java new file mode 100644 index 0000000..3987f77 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/constant/VirtualAccountConstants.java @@ -0,0 +1,81 @@ +package com.zhiqim.yangcai.design.constant; + +import java.util.ArrayList; +import java.util.List; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.util.consts.Str; + +/** + * 虚拟账户交易类型常量 + * + * @version 1.0 @author hc 2021年6月17日 新建与整理 + */ +@AnAlias("VirtualAccountConstants") +public class VirtualAccountConstants +{ + + /** 交易类型 */ + public static Str UNFREEZE = new Str("101", "解冻金额"); + public static Str SENDSALARY = new Str("102", "发放工资"); + public static Str FREEZESALARY = new Str("103", "冻结资金"); + public static Str ABNORMALAUDIT = new Str("104", "异常稽核"); + + public static Str TRANSACTION_STATUS_0 = new Str("0", "订单量奖励"); + public static Str TRANSACTION_STATUS_1 = new Str("1", "加急单奖励"); + public static Str TRANSACTION_STATUS_2 = new Str("2", "时效奖励"); + public static Str TRANSACTION_STATUS_3 = new Str("3", "老客户奖励"); + public static Str TRANSACTION_STATUS_4 = new Str("4", "完成订单奖励"); + public static Str TRANSACTION_STATUS_5 = new Str("5", "售后处理"); + public static Str TRANSACTION_STATUS_6 = new Str("6", "订单退回"); + public static Str TRANSACTION_STATUS_7 = new Str("7", "跨月订单退回"); + + /**************************************************/ + // 业务操作 + /**************************************************/ + + private static List transactionStatusList = new ArrayList<>(); + static + { + transactionStatusList.add(UNFREEZE); + transactionStatusList.add(SENDSALARY); + transactionStatusList.add(FREEZESALARY); + transactionStatusList.add(ABNORMALAUDIT); + + transactionStatusList.add(TRANSACTION_STATUS_0); + transactionStatusList.add(TRANSACTION_STATUS_1); + transactionStatusList.add(TRANSACTION_STATUS_2); + transactionStatusList.add(TRANSACTION_STATUS_3); + transactionStatusList.add(TRANSACTION_STATUS_4); + transactionStatusList.add(TRANSACTION_STATUS_5); + transactionStatusList.add(TRANSACTION_STATUS_6); + transactionStatusList.add(TRANSACTION_STATUS_7); + } + + /** + * 交易类型列表 + */ + public static List getTransactionStatusList() + { + return transactionStatusList; + } + + /** + * 查询交易类型描述 + * + * @param key + * @return + */ + public static String getTransactionStatusListDesc(String key) + { + for (Str status : transactionStatusList) + { + if (status.value().equals(key)) + { + return status.desc(); + } + } + + return ""; + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/AttaFileDao.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/AttaFileDao.java new file mode 100644 index 0000000..4a04ebd --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/AttaFileDao.java @@ -0,0 +1,93 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dao; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.kernel.util.consts.Str; + +import com.zhiqim.yangcai.design.constants.FileTypeConstants; +import com.zhiqim.yangcai.design.model.AttaFileModel; + +/** + * 附件文件常用方法 + * + * @version v1.0.0 @author zhouwenbin 2017-8-10 新建与整理 + */ +public class AttaFileDao +{ + private static Map baseMap = new HashMap<>(); + private static Map> pageMap = new HashMap<>(); + static + { + AttaFileModel copy = new AttaFileModel("copy", "产品信息", "button"); + copy.setHeight(100); + baseMap.put("copy", copy); + + AttaFileModel userText = new AttaFileModel("userText", "客户文件", "text"); + userText.setHeight(160); + baseMap.put("userText", userText); + + AttaFileModel userNotice = new AttaFileModel("userNotice", "注意事项", "text"); + userNotice.setHeight(160); + baseMap.put("userNotice", userNotice); + + for (Str temp : FileTypeConstants.getFileTypeList()) + { + if (FileTypeConstants.FILE_THUMFILE.value().equals(temp.value())) + {// 缩略图 + AttaFileModel custom = new AttaFileModel(temp.value(), temp.desc(), "thumFile"); + custom.setHeight(190); + baseMap.put(temp.value(), custom); + } + else if (FileTypeConstants.FILE_FIRSTTHUMFILE.value().equals(temp.value())) + {// 初稿缩略图 + AttaFileModel custom = new AttaFileModel(temp.value(), temp.desc(), "firstThumFile"); + custom.setHeight(190); + baseMap.put(temp.value(), custom); + } + else + { + AttaFileModel custom = new AttaFileModel(temp.value(), temp.desc(), "file"); + custom.setHeight(190); + baseMap.put(temp.value(), custom); + } + } + } + + public static List getFileList(String name) + { + if (pageMap.containsKey(name)) + { + return pageMap.get(name); + } + else + { + return new ArrayList<>(); + } + } + + public static AttaFileModel get(String key) + { + if (baseMap.containsKey(key)) + { + return baseMap.get(key); + } + else + { + return null; + } + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/AuthorityDao.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/AuthorityDao.java new file mode 100644 index 0000000..51adf6d --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/AuthorityDao.java @@ -0,0 +1,142 @@ +/** + * 扬彩印刷设计 + * 文件名 :AuthorityDao.java + * 创建人 :高佳新 + * 创建时间:2019-6-6 + */ + +package com.zhiqim.yangcai.design.dao; + +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.manager.dbo.ZmrDept; +import org.zhiqim.manager.dbo.ZmrOperator; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ORMException; +import org.zhiqim.orm.ZSQL; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +/** + * + * 权限部门遍历dao + * + * @version 1.0 @author gjx 2019-7-19 新建与整理 + */ +public class AuthorityDao +{ + /** + * + * 区分用户权限公用方法 + * + * @author gjx + * @param request + * @param sessionName 用户名(登录账号) + * @param selector 要添加的查询器 + * @param fieldName 区分权限字段名称 + * @throws ORMException + * @throws SQLException + */ + public static void ergodicOpecoterCode(HttpRequest request, String sessionName, Selector selector, String fieldName) throws ORMException, SQLException + { + + ZmrOperator zmrOperator = ORM.get(ZTable.class).item(ZmrOperator.class, new Selector().addMust("operatorCode", sessionName)); + if (zmrOperator == null) + { + request.returnHistory("该用户不存在"); + return; + } + if (zmrOperator.getOperatorType() == 2) + { + // 判定是否是部门管理人 + StringBuffer isDeptManagerSql = new StringBuffer(); + isDeptManagerSql.append("select * from zmr_dept where DEPT_MANAGER = '"); + isDeptManagerSql.append(sessionName); + isDeptManagerSql.append("' or FIND_IN_SET('"); + isDeptManagerSql.append(sessionName); + isDeptManagerSql.append("',DEPT_SUB_MANAGER)"); + List listDept = ORM.get(ZSQL.class).executeQuery(isDeptManagerSql.toString(), ZmrDept.class); + boolean isDeptManager = null != listDept && listDept.size() > 0; + // 不是部门管理员只允许看自己的 + if (!isDeptManager) + { + request.setAttribute("operatorList", new ArrayList<>()); + selector.addMust(fieldName, sessionName); + } + // 是部门管理员可以查看部门下所有人 + else if (isDeptManager) + { + // 递归所有子部门 + List newDeptList = new ArrayList<>(listDept); + for (ZmrDept zmrDept : listDept) + { + ergodicAllDept(zmrDept, newDeptList); + } + // 查询部门人员 + StringBuffer deptOperatorSql = new StringBuffer(); + deptOperatorSql.append("select * from ZMR_OPERATOR where 1=1 AND ("); + for (ZmrDept zmrDept : newDeptList) + { + deptOperatorSql.append(" FIND_IN_SET("); + deptOperatorSql.append(zmrDept.getDeptId()); + deptOperatorSql.append(",OPERATOR_DEPT) "); + deptOperatorSql.append("OR"); + } + deptOperatorSql.delete(deptOperatorSql.length() - 2, deptOperatorSql.length()); + deptOperatorSql.append(" ) "); + List oplist = ORM.get(ZSQL.class).executeQuery(deptOperatorSql.toString(), ZmrOperator.class); + request.setAttribute("operatorList", oplist); + String[] operatorId = new String[oplist.size()]; + for (int i = 0; i < operatorId.length; i++) + { + operatorId[i] = oplist.get(i).getOperatorCode(); + } + selector.addMustIn(fieldName, operatorId); + } + } + else + { + List operatorList = ORM.get(ZTable.class).list(ZmrOperator.class, new Selector().addMust("operatorStatus", 0)); + request.setAttribute("operatorList", operatorList); + } + } + + /** + * 递归所有子部门 + * + * @param dept + * @param list + */ + public static void ergodicAllDept(ZmrDept dept, List list) + { + if (null == dept || dept.getDeptId() <= 0 || null == list) + { + return; + } + StringBuffer sb = new StringBuffer("select * from zmr_dept where parent_id = "); + sb.append(dept.getDeptId()); + try + { + List oplist = ORM.get(ZSQL.class).executeQuery(sb.toString(), ZmrDept.class); + for (ZmrDept zmrDept : oplist) + { + if (!list.contains(zmrDept)) + { + list.add(zmrDept); + } + } + } + catch (ORMException e) + { + e.printStackTrace(); + } + catch (SQLException e) + { + e.printStackTrace(); + } + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/DesignerDao.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/DesignerDao.java new file mode 100644 index 0000000..4551a2d --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/DesignerDao.java @@ -0,0 +1,325 @@ +package com.zhiqim.yangcai.design.dao; + +import java.sql.SQLException; +import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnTransaction; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.kernel.util.Lists; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.manager.dao.ZmrOperatorDao; +import org.zhiqim.manager.dbo.ZmrOperator; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ORMException; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.design.constants.DesignerWorkStatus; +import com.zhiqim.yangcai.design.dbo.design.DesignOrgMer; +import com.zhiqim.yangcai.design.dbo.design.DesignType; +import com.zhiqim.yangcai.design.dbo.design.DesignerGroupDispatchValue; +import com.zhiqim.yangcai.design.dbo.dispatch.DesOnline; +import com.zhiqim.yangcai.design.dbo.dispatch.DesOnlineTime; +import com.zhiqim.yangcai.design.dbo.dispatch.DesWorkSearchLog; +import com.zhiqim.yangcai.design.dbo.profile.DesignerCourse; +import com.zhiqim.yangcai.design.dbo.qc.QcApplyScore; + +/** + * 设计师数据访问对象 + * + * @version v1.0.0 @author zouzhigang 2017-12-21 新建与整理 + */ +@AnAlias("DesignerDao") +public class DesignerDao +{ + + private static final Log log = LogFactory.getLog(DesignerDao.class); + + /** + * 是否显示接单 + * + * @param operatorCode 操作员编码 + * @return =true表示是设计师 + * @throws Exception 异常 + */ + public static boolean isDesigner(HttpRequest request, String operatorCode) throws Exception + { + + ZmrOperator operator = ZmrOperatorDao.getOperator(request, operatorCode); + if (operator == null) + { + return false; + } + + if ("reg".equals(operator.getOperatorParam())) + { + // 外部注册设计师标记,审核通过之后清除 + return false; + } + + DesignOrgMer org = ORM.get(ZTable.class).item(DesignOrgMer.class, operator.getOrgId()); + if (org == null) + { + return false; + } + + return true; + } + + /** + * 判断设计师是否正在接单状态 + * + * @param operatorCode 操作员编码 + * @return =true表示上班中 + * @throws Exception 异常 + */ + public static boolean isDesignerOnWork(String operatorCode) throws Exception + { + if (Validates.isEmptyBlank(operatorCode)) + { + return false; + } + + DesOnline online = ORM.get(ZTable.class).item(DesOnline.class, operatorCode); + return online != null && online.getOnlineStatus() == 1; + } + + /** + * 获取设计师接单状态 + * + * @param sessionUser 设计师会话 + * @return =0表示停止接单,=1表示正在接单 + * @throws Exception 异常 + */ + public static int getDesignerStatus(ZmrSessionUser sessionUser) throws Exception + { + DesOnline online = ORM.get(ZTable.class).item(DesOnline.class, sessionUser.getOperatorCode()); + if (online == null) + { + return 0; + } + + int status = online.getOnlineStatus(); + if (status == 1 && !sessionUser.getSessionId().equals(online.getSessionId())) + {// 在上班状态,但会话不同更新会话 + Updater updater = new Updater().addMust("operatorCode", sessionUser.getOperatorCode()).addField("sessionId", sessionUser.getSessionId()); + + ORM.get(ZTable.class).update(DesOnline.class, updater); + } + + return status; + } + + /** + * 获取设计师接单状态 + * + * @param sessionUser 设计师会话 + * @return =0表示停止接单,=1表示正在接单 + * @throws Exception 异常 + */ + public static int getDesignerStatus(String operatorCode) throws Exception + { + DesOnline online = ORM.get(ZTable.class).item(DesOnline.class, operatorCode); + if (online == null) + { + return 0; + } + + int status = online.getOnlineStatus(); + return status; + } + + /** + * 设计师开始接单 + * + * @param operatorCode + * @throws Exception + */ + @AnTransaction + public static void startWorkExec(long orgId, String operatorCode, Timestamp ondutyTime, String desc) throws Exception + { + // 上班操作日志 + doWorksStatusLog(orgId, operatorCode, desc, DesignerWorkStatus.ON_DUTY); + } + + /** + * 设计师停止接单 + * + * @param operatorCode + * @throws Exception + */ + @AnTransaction + public static void stopWorkExec(long orgId, String operatorCode, String desc) throws Exception + { + // 更新接单状态 + Updater updater = new Updater(); + updater.addMust("operatorCode", operatorCode); + updater.addField("onlineStatus", 0); + updater.addField("sessionId", null); + updater.addField("sessionTime", null); + updater.addField("orderNum", DispatchDao.getUnCompleteOrderNumber(operatorCode)); + ORM.get(ZTable.class).update(DesOnline.class, updater); + + // 设计师在线时长 ,根据日志计算 + // doDesOnlineTime(orgId, operatorCode); + + // 下班操作日志 + doWorksStatusLog(orgId, operatorCode, desc, DesignerWorkStatus.OFF_DUTY); + } + + /*** + * 接单状态操作日志 + * + * @param operatorCode 操作员 + * @param oprDesc 操作日志描述 + * @param type 操作类型 0=登录系统, 1=停止接单,2 正在接单,3=退出浏览器 + * @throws Exception + */ + public static void doWorksStatusLog(long orgId, String operatorCode, String oprDesc, int type) throws Exception + { + // 更新工作日志表 + DesWorkSearchLog log = new DesWorkSearchLog(); + log.setLogId(Ids.longId()); + log.setCreateTime(Sqls.nowTimestamp()); + log.setOperatorCode(operatorCode); + log.setOprDesc(oprDesc); + log.setLogType(type); + log.setOrgId(orgId); + ORM.get(ZTable.class).insert(log); + + // 更新扩展表 + Updater updater = new Updater(); + updater.addMust("designer", operatorCode); + updater.addField("lastOnlimeTime", Sqls.nowTimestamp()); + updater.addField("updateTime", Sqls.nowTimestamp()); + ORM.get(ZTable.class).update(DesignerCourse.class, updater); + } + + /** + * 设计师在线时长 + * + * @param operatorCode + * @param status + * @throws Exception + */ + public static void doDesOnlineTime(long orgId, String operatorCode) throws Exception + { + String dayCode = DateTimes.getDateString(); + + Selector selector = new Selector(); + selector.addMust("operatorCode", operatorCode); + selector.addMustThenGE("createTime", Sqls.toTimestamp(dayCode, "00:00:00")); + selector.addOrderbyDesc("createTime"); + DesWorkSearchLog log = ORM.get(ZTable.class).item(DesWorkSearchLog.class, selector); + if (log == null) + { + return; + } + + if (!"点击开始接单".equals(log.getOprDesc())) + { + return; + } + + int onlineTime = DateTimes.compareMinute(Sqls.nowTimestamp(), log.getCreateTime()); + DesOnlineTime des = ORM.get(ZTable.class).item(DesOnlineTime.class, dayCode, operatorCode); + if (des == null) + { + DesOnlineTime time = new DesOnlineTime(); + time.setDayCode(dayCode); + time.setOperatorCode(operatorCode); + time.setOnlineTime(onlineTime); + time.setOrgId(orgId); + ORM.get(ZTable.class).insert(time); + } + else + { + Updater updater = new Updater(); + updater.addMust("dayCode", dayCode); + updater.addMust("operatorCode", operatorCode); + updater.addField("onlineTime", onlineTime + des.getOnlineTime()); + updater.addField("orgId", orgId); + ORM.get(ZTable.class).update(DesOnlineTime.class, updater); + } + } + + /** + * 通过产品类型编号查询产品类型 + * + * @param typeId + * @return + * @throws ORMException + * @throws SQLException + */ + public static String queryTypeName(long typeId) throws Exception + { + DesignType type = ORM.get(ZTable.class).item(DesignType.class, typeId); + if (type == null) + { + return ""; + } + + return type.getTypeName(); + } + + public static double getApplyScore(String designer) throws ORMException, SQLException + { + double score = 0; + if (Validates.isEmptyBlank(designer)) + { + return score; + } + + List list = ORM.get(ZTable.class).list(QcApplyScore.class, new Selector("designer", designer).addMust("applyFlag", 1)); + for (QcApplyScore temp : list) + { + score += temp.getScore(); + } + + return score; + } + + /** + * [简要描述]:初稿/定稿流程是否满足免检要求
            + * + * @author caohong + * @param designer 设计师账号code + * @param typeId 产品id + * @return true 符合免检,false 需要人工审核 + */ + public static boolean isFreeCheck(String designer, Long typeId) + { + try + { + List groupDispatchValues = ORM.get(ZTable.class).list(DesignerGroupDispatchValue.class, + new Selector("operatorCode", designer).addMust("relatedType", 5)); + // 免检产品 + List freeCheckTypes = new ArrayList(); + for (DesignerGroupDispatchValue value : groupDispatchValues) + { + freeCheckTypes.add(value.getRelatedValue()); + } + + if (freeCheckTypes.size() > 0 && Lists.contains(freeCheckTypes, null, typeId)) + { + return true; + } + } + catch (Exception e) + { + log.error("设计师[" + designer + "]定稿产品免检判断异常:" + e.getMessage(), e); + } + + return false; + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/DesignerOrderDao.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/DesignerOrderDao.java new file mode 100644 index 0000000..f1f473f --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/DesignerOrderDao.java @@ -0,0 +1,77 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dao; + +import java.util.ArrayList; +import java.util.List; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.template.MediaTemplate; +import com.zhiqim.yangcai.design.dbo.template.MediaTemplateView; + +/** + * + * 设计师订单Dao + * + * @version v1.0.0 @author Deng 2017-12-27 新建与整理 + */ +@AnAlias("DesignerOrderDao") +public class DesignerOrderDao +{ + /** + * 查询订单是否有关联模板 + * @param designId + * @throws Exception + */ + public static boolean isOrderTemplate(long designId)throws Exception + { + int count = ORM.get(ZTable.class).count(MediaTemplate.class, new Selector("designId", designId)); + if(count > 0) + return true; + else + return false; + } + + /** + * 查询订单已选模板id + * @param oid + * @return + */ + public static List getOrderTemplate(long designId)throws Exception + { + List idList = new ArrayList(); + List mediaList = ORM.get(ZView.class).list(MediaTemplateView.class, new Selector("designId", designId)); + + for(MediaTemplateView media: mediaList) + { + idList.add(media.getMediaId()); + } + + return idList; + } + + /** + * 查询订单是否有缓存 + * @param designId + * @return + * @throws Exception + */ + public static boolean isOrderSession(long designId)throws Exception + { + return false; + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/DesignerTemplateScoreDao.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/DesignerTemplateScoreDao.java new file mode 100644 index 0000000..3b35bc1 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/DesignerTemplateScoreDao.java @@ -0,0 +1,247 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.dao; + +import org.zhiqim.kernel.annotation.AnTransaction; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.design.constant.ScoreConstants; +import com.zhiqim.yangcai.design.dbo.keyword.DesKeywordIndex; +import com.zhiqim.yangcai.design.dbo.score.DesScoreParam; +import com.zhiqim.yangcai.design.dbo.score.DesScoreWeight; +import com.zhiqim.yangcai.design.dbo.template.DesTemplateScore; +import com.zhiqim.yangcai.design.dbo.template.DesTemplateScoreLog; +import com.zhiqim.yangcai.design.dbo.template.MediaTemplate; +import com.zhiqim.yangcai.util.SolrUtil; + +/** + * 设计师模板评分Dao + * + * @version v1.0.0 @author Deng 2018-3-5 新建与整理 + */ +public class DesignerTemplateScoreDao +{ + /** + * 模板基础分数计算 + * + * @param mediaId + * @param paramKey + * @throws Exception + */ + @AnTransaction + public static void doTempalteBaseScore(long mediaId) throws Exception + { + Selector selector = new Selector(); + selector.addMust("scoreName", ScoreConstants.SCORE_TEMPLATE); + selector.addMust("scoreType", ScoreConstants.BASE_SCORE.value()); + DesScoreWeight weight = ORM.get(ZTable.class).item(DesScoreWeight.class, selector); + if (weight == null) + return; + + DesTemplateScore score = new DesTemplateScore(); + score.setMediaId(mediaId); + score.setBaseScore(weight.getScoreValue()); + + ORM.get(ZTable.class).insert(score); + + doTemplateScoreCalc(mediaId); + } + + /** + * 模板动态分计算 + * + * @param mediaId + * @throws Exception + */ + @AnTransaction + public static void doTemplateFloatScore(long mediaId, String paramKey) throws Exception + { + MediaTemplate media = ORM.get(ZTable.class).item(MediaTemplate.class, mediaId); + if (media == null) + return; + + if (media.getTemplateType() < 100) + return; + + Selector selector = new Selector(); + selector.addMust("scoreName", ScoreConstants.SCORE_TEMPLATE); + selector.addMust("scoreType", ScoreConstants.FLOAT_SCORE.value()); + selector.addMust("paramKey", paramKey); + DesScoreParam param = ORM.get(ZTable.class).item(DesScoreParam.class, selector); + if (param == null) + return; + + int paramValue = param.getParamValue(); + DesTemplateScore score = ORM.get(ZTable.class).item(DesTemplateScore.class, mediaId); + if (score == null) + { + score = new DesTemplateScore(); + score.setMediaId(mediaId); + if (param.getParamType() == 0) + score.setFloatScore(paramValue); + else + score.setFloatScore(-paramValue); + + ORM.get(ZTable.class).insert(score); + } + else + { + Updater sUpdater = new Updater(); + sUpdater.addMust("mediaId", mediaId); + if (param.getParamType() == 0) + {// 加分 + sUpdater.addField("floatScore", score.getFloatScore() + paramValue); + } + else + {// 减分 + if (score.getFloatScore() < 0) + { + int floatScore = Math.abs(score.getFloatScore()) - paramValue; + sUpdater.addField("floatScore", floatScore); + } + else + sUpdater.addField("floatScore", score.getFloatScore() - paramValue); + } + + ORM.get(ZTable.class).update(DesTemplateScore.class, sUpdater); + } + + doTemplateScoreCalc(mediaId); + doDesTemplateScoreLogAdd(mediaId, ScoreConstants.FLOAT_SCORE.value(), param); + } + + /** + * 模板销量分计算 + * + * @param mediaId + * @throws Exception + */ + @AnTransaction + public static void doTemplateSaleScore(long mediaId, String paramKey) throws Exception + { + MediaTemplate media = ORM.get(ZTable.class).item(MediaTemplate.class, mediaId); + if (media == null) + return; + + if (media.getTemplateType() < 100) + return; + + Selector selector = new Selector(); + selector.addMust("scoreName", ScoreConstants.SCORE_TEMPLATE); + selector.addMust("scoreType", ScoreConstants.SALE_SCORE.value()); + selector.addMust("paramKey", paramKey); + DesScoreParam param = ORM.get(ZTable.class).item(DesScoreParam.class, selector); + if (param == null) + return; + + int paramValue = param.getParamValue(); + DesTemplateScore score = ORM.get(ZTable.class).item(DesTemplateScore.class, mediaId); + if (score == null) + { + score = new DesTemplateScore(); + score.setMediaId(mediaId); + if (param.getParamType() == 0) + score.setSaleScore(paramValue); + else + score.setSaleScore(-paramValue); + + ORM.get(ZTable.class).insert(score); + } + else + { + Updater sUpdater = new Updater(); + sUpdater.addMust("mediaId", mediaId); + if (param.getParamType() == 0) + {// 加分 + sUpdater.addField("floatScore", score.getSaleScore() + paramValue); + } + else + {// 减分 + if (score.getFloatScore() < 0) + { + int saleScore = Math.abs(score.getSaleScore()) - paramValue; + sUpdater.addField("saleScore", saleScore); + } + else + sUpdater.addField("saleScore", score.getSaleScore() - paramValue); + } + + ORM.get(ZTable.class).update(DesTemplateScore.class, sUpdater); + } + + doTemplateScoreCalc(mediaId); + doDesTemplateScoreLogAdd(mediaId, ScoreConstants.SALE_SCORE.value(), param); + } + + /** + * 模板分数计算 + * + * @param mediaId + * @param scoreType + * @throws Exception + */ + @AnTransaction + public static void doTemplateScoreCalc(long mediaId) throws Exception + { + DesTemplateScore score = ORM.get(ZTable.class).item(DesTemplateScore.class, mediaId); + int baseWeight = ScoreDao.doTemplateWeight(ScoreConstants.BASE_SCORE.value()); + int floatWeight = ScoreDao.doTemplateWeight(ScoreConstants.FLOAT_SCORE.value()); + int saleWeight = ScoreDao.doTemplateWeight(ScoreConstants.SALE_SCORE.value()); + + int scoreValue = score.getBaseScore() * baseWeight + score.getFloatScore() * floatWeight + score.getSaleScore() * saleWeight; + DesKeywordIndex index = ORM.get(ZTable.class).item(DesKeywordIndex.class, mediaId); + if (index == null) + { + index = new DesKeywordIndex(); + index.setMediaId(mediaId); + index.setMediaScore(scoreValue); + + ORM.get(ZTable.class).insert(index); + } + else + { + // 更新数据库模板指数 + Updater update = new Updater(); + update.addMust("mediaId", mediaId); + update.addField("mediaScore", scoreValue); + ORM.get(ZTable.class).update(DesKeywordIndex.class, update); + } + // 更新solr模板 + SolrUtil.updateMediaData(mediaId); + } + + /** + * 模板本身分数日志 + * + * @param mediaId + * @param scoreType + * @param param + * @throws Exception + */ + private static void doDesTemplateScoreLogAdd(long mediaId, String scoreType, DesScoreParam param) throws Exception + { + DesTemplateScoreLog log = new DesTemplateScoreLog(); + log.setLogId(Ids.longId()); + log.setMediaId(mediaId); + log.setScoreName(ScoreConstants.SCORE_TEMPLATE); + log.setScoreType(scoreType); + log.setParamType(param.getParamType()); + log.setParamKey(param.getParamKey()); + log.setParamValue(param.getParamValue()); + log.setCreateTime(Sqls.nowTimestamp()); + + ORM.get(ZTable.class).insert(log); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/DispatchDao.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/DispatchDao.java new file mode 100644 index 0000000..fcb47d7 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/DispatchDao.java @@ -0,0 +1,293 @@ +package com.zhiqim.yangcai.design.dao; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Lists; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.cache.DesignIndustryCache; +import com.zhiqim.yangcai.design.constants.StatusConstants; +import com.zhiqim.yangcai.design.dbo.design.DesignIndustry; +import com.zhiqim.yangcai.design.dbo.design.DesignerGroupView; +import com.zhiqim.yangcai.design.dbo.dispatch.DesDispatchProperty; +import com.zhiqim.yangcai.design.dbo.dispatch.DesOnline; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; +import com.zhiqim.yangcai.design.dbo.subscribe.SubscribeDesignerQuotaRecord; + +/** + * + * 派单Utils + * + * @version v1.0.0 @author Deng 2017-9-14 新建与整理 + */ +@AnAlias("DispatchDao") +public class DispatchDao +{ + /** + * 获取在线设计师 + * + * @param operatorCode + * @return + * @throws Exception + */ + public static DesOnline getOnlineDesigner(String operatorCode) throws Exception + { + DesOnline online = ORM.get(ZTable.class).item(DesOnline.class, new Selector().addMust("operatorCode", operatorCode).addMustIn("onlineStatus", 1)); + return online; + } + + /** + * 获取当前组织正在接单设计师列表 + * + * @return + * @throws Exception + */ + public static List getOnlineDesignerList(long orgId) throws Exception + { + Selector selector = new Selector(); + selector.addMust("orgId", orgId); + selector.addMust("onlineStatus", 1); + List desList = ORM.get(ZTable.class).list(DesOnline.class, selector); + + return desList; + } + + /** + * 获取设计师关联的行业 + * + * @param operatorCode + * @return + * @throws Exception + */ + public static String getDesignerIndustry(String operatorCode) throws Exception + { + DesDispatchProperty dp = ORM.get(ZTable.class).item(DesDispatchProperty.class, operatorCode); + if (dp == null) + { + return ""; + } + + List idList = Lists.toLongList(dp.getSecondaryIndustrys()); + if (!idList.contains(dp.getMajorIndustry())) + { + idList.add(dp.getMajorIndustry()); + } + + List industryList = new ArrayList<>(); + Map map = Global.get(DesignIndustryCache.class).mapAll(); + for (long industryId : idList) + { + if (map.containsKey(industryId)) + { + industryList.add(map.get(industryId).getIndustryName()); + } + } + + return Lists.toString(industryList); + } + + /** + * 获取正在接单设计师列表 + * + * @return + * @throws Exception + */ + public static List getDesignerWorkingList() throws Exception + { + List desList = ORM.get(ZTable.class).list(DesOnline.class, new Selector("onlineStatus", 1)); + return desList; + } + + /** + * 获取设计师全部未完成订单数,未定稿状态(正在设计,补全资料,联系不上,已初稿,请求退款) + * + * @author caohong + * @param operatorCode + * @return + * @throws Exception + */ + public static int getUnCompleteOrderNumber(String operatorCode) throws Exception + { + Selector selector = new Selector(); + selector.addMust("designer", operatorCode); + selector.addMustThenGE("status", StatusConstants.ORDER_30.value());// + selector.addMustThenLE("status", StatusConstants.ORDER_50.value());// 大于等于 正在设计 小于等于已初稿状态 + int count = ORM.get(ZTable.class).count(DesignOrder.class, selector); + return count; + } + + /** + * 获取设计师设计中订单数量 + * + * @author caohong + * @param operatorCode + * @return + * @throws Exception + */ + public static int getDesignOrderNumber(String operatorCode) throws Exception + { + Selector selector = new Selector(); + selector.addMust("designer", operatorCode); + selector.addMust("status", StatusConstants.ORDER_30.value()); + int count = ORM.get(ZTable.class).count(DesignOrder.class, selector); + return count; + } + + /** + * 更新设计师的未完成订单数量 + * + * @param operatorCode + * @throws Exception + */ + public static void doUpdateDesignerOrderNum(String operatorCode) throws Exception + { + Updater oUpdater = new Updater(); + oUpdater.addMust("operatorCode", operatorCode); + oUpdater.addField("orderNum", DispatchDao.getUnCompleteOrderNumber(operatorCode)); + ORM.get(ZTable.class).update(DesOnline.class, oUpdater); + } + + /** + * 更新设计师预约完成数量 + * + * @param operatorCode + * @throws Exception + */ + public static void doUpdateSubscribeDesignerQuotaRecordFinishedNum(String operatorCode) throws Exception + { + int today = DateTimes.getCurrentDate(); + SubscribeDesignerQuotaRecord subscribeDesignerQuotaRecord = ORM.get(ZTable.class).item(SubscribeDesignerQuotaRecord.class, + new Selector("operatorCode", operatorCode).addMust("dutyTime", today)); + if (subscribeDesignerQuotaRecord != null) + { + int finishedNum = subscribeDesignerQuotaRecord.getFinishedNum(); + finishedNum++; + Updater oUpdater = new Updater(); + oUpdater.addMust("operatorCode", operatorCode); + oUpdater.addMust("dutyTime", today); + oUpdater.addField("finishedNum", finishedNum); + oUpdater.addField("modifyTime", Sqls.nowTimestamp()); + ORM.get(ZTable.class).update(SubscribeDesignerQuotaRecord.class, oUpdater); + } + } + + /** + * 设置最近完成初稿类型和初稿完成时间 + * + * @param operatorCode + * @param draftType + * @throws Exception + */ + public static void setDraftType(String operatorCode, long designType) throws Exception + { + DesOnline designer = ORM.get(ZTable.class).item(DesOnline.class, operatorCode); + if (designer == null) + { + return; + } + + Updater updater = new Updater(); + updater.addMust("operatorCode", operatorCode); + updater.addField("lastDraftType", designType); + updater.addField("lastDraftTime", Sqls.nowTimestamp()); + updater.addField("orderNum", DispatchDao.getUnCompleteOrderNumber(operatorCode)); + + ORM.get(ZTable.class).update(DesOnline.class, updater); + } + + /** + * 换算时分秒格式 + * + * @param seconds + * @throws Exception + */ + public static String doCaclTime(int seconds) throws Exception + { + int hour = seconds / 3600; + int minute = (seconds - hour * 3600) / 60; + int second = (seconds - hour * 3600 - minute * 60); + + if (hour > 0 && minute > 0) + { + return hour + "小时" + minute + "分" + second + "秒"; + } + else if (hour > 0 && minute <= 0) + { + return hour + "小时" + "0分" + second + "秒"; + } + else if (hour <= 0 && minute > 0) + { + return minute + "分" + second + "秒"; + } + else + { + return second + "秒"; + } + } + + /** + * + * [简要描述]: 设计师/设计师组-订单来源渠道 + * + * @author hc + * @param designOrderId // 订单ID + * @param designer // 设计师 + * @return + * @throws Exception + */ + public static boolean ifRelevance(DesignOrder order, String designer) throws Exception + { + // 设计师组设计师关联表 + DesignerGroupView designerGroupView = ORM.get(ZView.class).item(DesignerGroupView.class, new Selector().addMust("operatorCode", designer)); + if (designerGroupView == null) + { + return false; + } + + String merchantIds = designerGroupView.getMerchantIds(); + String designerMerchantIds = designerGroupView.getDesignerMerchantIds(); + + if (merchantIds == null && designerMerchantIds == null) + { + return false; + } + + // 设计师组 + if (merchantIds != null) + { + String[] merchantIdsSplit = merchantIds.split(","); + for (String merchantId : merchantIdsSplit) + { + if (merchantId.equals(order.getMerchantId() + "")) + { + return true; + } + } + } + + // 设计师个人 + if (designerMerchantIds != null) + { + String[] designerMerchantIdsSplit = designerMerchantIds.split(","); + for (String merchantId : designerMerchantIdsSplit) + { + if (merchantId.equals(order.getMerchantId() + "")) + { + return true; + } + } + } + + return false; + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/EventDao.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/EventDao.java new file mode 100644 index 0000000..b34d470 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/EventDao.java @@ -0,0 +1,94 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.dao; + + +/** + * + * 事件类型DAO + * + * @version v1.0.0 @author PVer 2017-10-17 新建与整理 + */ +public class EventDao +{ + /* *//** + * 创建类型 + * + * @param draftType + * @return + * @throws Exception + */ + /* + * public static String doCreateType(int draftType) throws Exception + * { + * String createStr = ""; + * if (draftType == DraftConstants.DRAFT_STANDARD.value() || draftType == + * DraftConstants.DRAFT_TEMPLATE.value()) + * { + * createStr = EventConstants.ORDER_24.desc(); + * } + * else + * { + * createStr = EventConstants.ORDER_30.value(); + * } + * return createStr; + * } + */ + /* *//** + * 取消类型 + * + * @param order + * @return + * @throws Exception + */ + /* + * public static String doCancelType(OrdOrderView view) throws Exception + * { + * OrdOrderView order = ORM.get(ZView.class).item(OrdOrderView.class, new Selector("oid", + * view.getOid())); + * String cancelStr = ""; + * String cancelTime = Sqls.toDateTimeString(order.getCancelTime()); + * String createTime = Sqls.toDateTimeString(order.getCreateTime()); + * if (DateTimes.compareDay(cancelTime.substring(0, 10), createTime.substring(0, 10)) > 0) + * {// 历史取消 + * if (Validates.isNotEmpty(order.getSelfDraftDesigner())) + * { + * cancelStr = EventConstants.YC_SELFDRAFT_HISTORY_CANCEL.value(); + * } + * else if (Validates.isNotEmpty(order.getDesigner())) + * { + * cancelStr = EventConstants.YC_DESIGN_HISTORY_CANCEL.value(); + * } + * else + * { + * cancelStr = EventConstants.YC_ORDER_HISTORY_CANCEL.value(); + * } + * } + * else + * { + * if (Validates.isNotEmpty(order.getSelfDraftDesigner())) + * { + * cancelStr = EventConstants.YC_SELFDRAFT_CANCEL.value(); + * } + * else if (Validates.isNotEmpty(order.getDesigner())) + * { + * cancelStr = EventConstants.YC_DESIGN_CANCEL.value(); + * } + * else + * { + * cancelStr = EventConstants.YC_ORDER_CANCEL.value(); + * } + * } + * return cancelStr; + * } + */ +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/FileCheckDao.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/FileCheckDao.java new file mode 100644 index 0000000..882720c --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/FileCheckDao.java @@ -0,0 +1,538 @@ +package com.zhiqim.yangcai.design.dao; + +import java.awt.image.BufferedImage; +import java.io.File; +import java.util.HashMap; +import java.util.Map; + +import org.icepdf.core.pobjects.Document; +import org.icepdf.core.pobjects.Page; +import org.icepdf.core.util.GraphicsRenderingHints; +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.annotation.AnTransaction; +import org.zhiqim.kernel.httpclient.HttpDownload; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.kernel.schedule.Day; +import org.zhiqim.kernel.schedule.Scheduler; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Files; +import org.zhiqim.kernel.util.Strings; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.kernel.util.consts.Int; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.uploadlarge.dbo.UpllFile; + +import com.itextpdf.text.pdf.PdfReader; +import com.itextpdf.text.pdf.parser.PdfTextExtractor; +import com.zhiqim.yangcai.design.dbo.order.DesignAtta; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; +import com.zhiqim.yangcai.design.dbo.order.DesignSelfView; +import com.zhiqim.yangcai.design.dbo.utils.BaseUtil; +import com.zhiqim.yangcai.design.model.PrdNumberModel; +import com.zhiqim.yangcai.design.model.PrdProductModel; +import com.zhiqim.yangcai.design.rmi.erp.ErpRmiService; +import com.zhiqim.yangcai.design.task.TempFileDeleteTask; + +/** + * 文件审核相关方法 + * + * @version v1.0.0 @author zhouwenbin 2017-9-6 新建与整理 + */ +public class FileCheckDao +{ + private static final Log log = LogFactory.getLog(FileCheckDao.class); + private static final Map checkingMap = new HashMap();// 正在审核的文件 + public static float MM = 2.83464579439252f;// pdf尺寸转毫米的系数 + + /** + * 检测文件命名是否正确 + * + * @param fileName + * @param designId + * @param wangwang + * @param receiveName + * @return + */ + public static Int checkSelfFileName(String fileName, String designId, String wangwang, String receiveName) + { + if (Validates.isEmpty(fileName)) + { + return new Int(-1, "文件名不能为空"); + } + + String fileExt = Files.getFileExt(fileName); + if (Validates.isEmpty(fileExt)) + { + return new Int(-1, "文件扩展名不正确,扩展名:" + fileExt); + } + fileName = fileName.substring(0, fileName.lastIndexOf(".")); + String subOid = fileName.substring(0, fileName.indexOf("-")); + String subWangwang = fileName.substring(fileName.indexOf("-") + 1, fileName.length()); + if (Validates.isNotEmptyBlank(wangwang)) + { + wangwang = Strings.trim(wangwang); + } + + if (Validates.isNotEmptyBlank(receiveName)) + { + receiveName = Strings.trim(receiveName); + } + // if (!subOid.equals(designId)) + // {// 第一项必须是订单号 + // return new Int(-1, "文件命名第一项订单号不正确"); + // } + // if (!subWangwang.equals(wangwang)) + // { + // return new Int(-1, "文件命名第二项不是旺旺号"); + // } + + return new Int("成功"); + } + + /** + * 成品文件审核 + * + * @param oid 订单编号 + * @param fileName 文件名 + * @param attaModul 附件标识 + * @return 错误信息 + * @throws Exception + */ + public static String doCheckSelfFile(long designId, String fileName, String attaModul) throws Exception + { + if (designId == -1) + { + return "订单不存在-" + designId; + } + + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, designId); + if (order == null) + { + return "订单不存在-" + designId; + } + + Selector selector = new Selector("designId", designId); + selector.addMust("fileName", fileName); + selector.addMust("attaModul", attaModul); + selector.addOrderbyDesc("uploadTime"); + DesignAtta atta = ORM.get(ZTable.class).item(DesignAtta.class, selector); + if (atta == null) + { + return "文件审核失败,印刷文件不存在"; + } + + if (!"pdf".equalsIgnoreCase(atta.getFileType())) + { + return "";// 不是pdf文件不审核 + } + + File file = new File(atta.getSavePath()); + if (!file.exists() && Validates.isEmptyBlank(atta.getOssUrl())) + { + return "文件审核失败,系统找不到指定的文件"; + } + + if (!file.exists()) + {// + String dir = getCurrentTempFolder(atta.getAttaModul()); + String tempFileName = Strings.addEndsWith(fileName, Strings.addStartsWith(atta.getFileType(), ".")); + HttpDownload download = new HttpDownload(atta.getOssUrl()); + download.setConnectTimeout(30); + download.setReadTimeout(50 * 60); + download.setFileDir(dir); + download.setFileName(tempFileName); + download.execute(); + if (!download.isResponseSuccess()) + { + return "文件审核失败,无效的下载地址"; + } + + file = new File(Strings.addEndsWith(dir, "/" + tempFileName)); + } + + String error = ""; + try + { + checkingMap.put(atta.getAttaId(), true);// 标记正在检测文件 + error = checkEndFile(order, file); + } + catch (Exception e) + { + log.error("文件内容检测异常:", e); + error = "文件内容检测异常"; + } + finally + { + checkingMap.remove(atta.getAttaId());// 检测完毕 + } + + return error; + } + + /** + * 检测文件命名是否正确 + * + * @param fileName + * @param oid + * @param wangwang + * @param receiveName + * @return + */ + public static Int checkFileName(String fileName, String oid, String wangwang, String receiveName) + { + if (Validates.isEmpty(fileName)) + { + return new Int(-1, "文件名不能为空"); + } + + String fileExt = Files.getFileExt(fileName); + if (Validates.isEmpty(fileExt)) + { + return new Int(-1, "文件扩展名不正确,扩展名:" + fileExt); + } + + fileName = fileName.substring(0, fileName.lastIndexOf(".")); + String[] strs = fileName.split("-"); + if (strs == null || strs.length < 2 || strs.length > 3) + { + return new Int(-1, "文件命名规则不正确"); + } + + if (Validates.isNotEmptyBlank(wangwang)) + { + wangwang = Strings.trim(wangwang); + } + + if (Validates.isNotEmptyBlank(receiveName)) + { + receiveName = Strings.trim(receiveName); + } + + String data1 = Strings.trim(strs[0]);// 订单号 + String data2 = Strings.trim(strs[1]);// 旺旺或者收件人 + + data1 = data1.replaceAll("[\r\n]", ""); + data2 = data2.replaceAll("[\r\n]", ""); + + // if (!data1.equals(oid)) + // {// 第一项必须是订单号 + // return new Int(-1, "文件命名第一项订单号不正确"); + // } + // + // if (strs.length == 2) + // { + // if (!data2.equals(wangwang) && !data2.equals(receiveName)) + // { + // return new Int(-1, "文件命名第二项不是旺旺号\r\n且不是收件人"); + // } + // } + // else + // { + // String data3 = Strings.trim(strs[2]);// 收件人 + // data3 = data3.replaceAll("[\r\n]", ""); + // + // if (!data2.equals(wangwang)) + // { + // return new Int(-1, "文件命名第二项不是旺旺号"); + // } + // + // if (!data3.equals(receiveName)) + // { + // return new Int(-1, "文件命名第三项不是收件人"); + // } + // } + + return new Int("成功"); + } + + /*** + * 判断文件是否正在审核 + * + * @param attaId 附件ID + * @return 返回=true 表示正在审核 + */ + public static boolean isChecking(long attaId) + { + return checkingMap.containsKey(attaId); + } + + /*** + * 获取当天临时文件目录 + * + * @return 例:./temp/20180112/fileModel/ + */ + private static TempFileDeleteTask deleteTempFileTask = TempFileDeleteTask.getInstance(); + + public static String getCurrentTempFolder(String fileModel) + { + String date = DateTimes.getDateTime8String(); + String folder = Strings.addEndsWith("./temp", "/") + date; + folder = Strings.addEndsWith(folder, "/"); + if (Validates.isNotEmptyBlank(fileModel)) + { + folder = folder + Strings.addEndsWith(fileModel, "/"); + } + + Files.mkDirectory(folder); + + // 启动临时文件删除任务 每天早上在 5:29:59 执行 + if (!deleteTempFileTask.isRunning()) + { + Scheduler scheduler = Global.getWithoutNew(Scheduler.class); + scheduler.create(); + scheduler.addTask(new Day(deleteTempFileTask, 5, 29, 59)); + deleteTempFileTask.setRunning(true); + } + + return folder; + } + + /** + * 成品文件审核,自来稿 设计流程历史订单还在临时使用,现在已合并到设计流程了 + * + * @param order 订单对象 + * @param file 文件对象 + * @return 错误信息 + * @throws Exception + */ + private static String checkEndFile(DesignOrder order, File file) throws Exception + { + if (order == null) + { + return "订单不存在"; + } + + if (file == null || !file.exists()) + { + return "文件审核失败,印刷文件不存在"; + } + + PdfReader readerN = null; + try + { + // 文字转曲判断 --caohong 2020-4-20 + readerN = new PdfReader(file.getPath()); + int nrPages = readerN.getNumberOfPages(); + for (int i = 1; i < nrPages; i++) + { + String text = PdfTextExtractor.getTextFromPage(readerN, i); + if (text != null && !"".equals(text)) + { + return ("文件审核失败,第" + i + "页有文字未转曲!"); + } + } + } + catch (Exception e) + { + log.error("文件审核异常[" + order.getDesignId() + "]:" + e.getMessage(), e); + return "文件审核失败,有文字未转曲或编码异常!"; + } + catch (Error e) + { + log.error("文件审核异常[" + order.getDesignId() + "]:" + e.getMessage(), e); + return "文件审核失败,有文字未转曲或编码异常!"; + } + finally + { + if (readerN != null) + { + readerN.close(); + } + } + + // PVC名片,并且是印白墨后加工的情况,不判断版面数量,因为有白墨版,比较特殊 --caohong + if (order.getTypeId() == 1806070857392601L && order.getAfterNames() != null && order.getAfterNames().contains("印白墨")) + { + return ""; + } + + int pageValue = order.getDesignPage(); + double stdWidth = order.getDesignWidth(); + double stdHeight = order.getDesignHeight(); + + // 优惠券产品需要特殊处理,由于录单去掉了模位计算操作,审核的时候需要使用名片标准尺寸来检查内容。--caohong 2019-11-12 + if ("1710131129568467".equals(String.valueOf(order.getTypeId()))) + { + stdWidth = 92; + stdHeight = 56; + + double tmpWidth = order.getDesignWidth(); + double tmpHeight = order.getDesignHeight(); + if (order.getPrintWidth() > 0 && order.getPrintHeight() > 0) + { + tmpWidth = order.getPrintWidth(); + tmpHeight = order.getPrintHeight(); + } + // 临时计算模位用于计算检测 + int ms = BaseUtil.calcMod("92X56", new Double(tmpWidth).intValue(), new Double(tmpHeight).intValue(), 0); + order.setPrintMs(ms); + } + + // 画册产品不需要检查内容 + if (!"3".equals(String.valueOf(order.getTypeId()))) + { + Document document = new Document(); + document.setFile(file.getPath()); + int pageTotal = document.getNumberOfPages(); + if (pageTotal < 1) + { + return "文件审核失败,印刷文件无页面"; + } + + // 总页数%单或双面 + if (pageTotal % pageValue != 0) + { + return "文件审核失败,印刷文件页数错误"; + } + + float firstWidth = 0f, firstHeight = 0f; + try + { + boolean flag = false; + float scale = 1f; + float rotation = 0f; + + // 获取第一条文件尺寸 + BufferedImage oneImage = document.getPageImage(0, GraphicsRenderingHints.SCREEN, Page.BOUNDARY_CROPBOX, rotation, scale); + firstWidth = oneImage.getWidth() / MM; + firstHeight = oneImage.getHeight() / MM; + + for (int i = 1; i < pageTotal; i++) + { + BufferedImage image = document.getPageImage(i, GraphicsRenderingHints.SCREEN, Page.BOUNDARY_CROPBOX, rotation, scale); + if (Math.abs(image.getWidth() / MM - firstWidth) >= 0.1) + { + return "文件审核失败,第" + i + "页,尺寸错误,实际宽:" + firstWidth + ",期望宽:" + stdWidth; + } + + if (Math.abs(image.getHeight() / MM - firstHeight) >= 0.1) + { + return "文件审核失败,第" + i + "页,尺寸错误,实际高:" + firstHeight + ",期望高:" + stdHeight; + } + } + + // 误差不超过0.1,则收为整数 + firstWidth = Math.round(firstWidth); + firstHeight = Math.round(firstHeight); + + // 根据面积判断是否符合规则 92*56 3款2模 92*56*6 92*56*6 + float rate = (float) Math + .abs((firstWidth * firstHeight * pageTotal / pageValue) - (stdWidth * stdHeight * order.getPrintMs() * order.getPrintKs())); + if (rate < 0.1) + { + flag = true; + } + + if (!flag) + { + return "文件审核失败,尺寸或模数错误"; + } + } + catch (Exception e) + { + log.error("[订单" + order.getDesignId() + "]印刷文件审核异常," + e.getMessage(), e); + return "文件审核异常,请重新上传"; + } + finally + { + document.dispose(); + } + } + + return ""; + } + + /** + * 文件审核失败,删除成品文件及数据 + * + * @param atta + * @throws Exception + */ + @AnTransaction + public static void doDeleteFile(DesignAtta atta) throws Exception + { + if (atta == null) + { + return; + } + + // 删除数据 + File file = new File(atta.getSavePath()); + if (file.exists()) + { + Files.deleteFile(atta.getSavePath()); + } + + ORM.get(ZTable.class).delete(DesignAtta.class, atta.getAttaId()); + + if (Validates.isNotEmpty(atta.getFileid())) + { + ORM.get(ZTable.class).delete(UpllFile.class, new Selector("fileId", atta.getFileid()).addReplace("id", null)); + if (!file.exists() && Validates.isNotEmptyBlank(atta.getSavePath())) + { + ORM.get(ZTable.class).delete(UpllFile.class, new Selector("filePath", atta.getSavePath()).addReplace("id", null)); + } + } + // 删除OSS文件 + OssFileDao.deleteOssFile(atta); + } + + /** + * + * [简要描述]判断自来稿是否需要人工审核:
            + * [详细描述]:
            + * + * @author gjx + * @param order + * @return + * @throws Exception + */ + public static boolean isCheckDraft(DesignSelfView order) throws Exception + { + Map map = ErpRmiService.doQueryOrderProductInfo(order.getDesignId()); + PrdProductModel product = Jsons.toObject(map.get("product"), PrdProductModel.class); + PrdNumberModel number = Jsons.toObject(map.get("number"), PrdNumberModel.class); + // 非名片、彩页都需审核 + String prdTypeName = product.getProductName(); + if (!(Validates.isEqual("名片", prdTypeName) || Validates.isEqual("彩页", prdTypeName))) + { + return true; + } + + // 金额大于300 + if (order.getAmount() > 200 * 100) + { + return true; + } + + // 非常规尺寸 + if (order.getPrintWidth() > 0 && order.getPrintHeight() > 0) + { + return true; + } + + // 数量大于3000张 + if (number.getPrdNumberValue() >= 3000) + { + return true; + } + + // 存在后加工 + if (Validates.isNotEmpty(order.getAfterNames())) + { + return true; + } + + // 产品定义需审核 + if (product.isProductCheck()) + { + return true; + } + + return false; + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/HotWordDao.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/HotWordDao.java new file mode 100644 index 0000000..b2421c6 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/HotWordDao.java @@ -0,0 +1,93 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dao; + +/** + * 热搜词Dao + * + * @version v1.0.0 @author Deng 2018-1-8 新建与整理 + */ +public class HotWordDao +{ + /** + * 相似度比较 + * @param str + * @param target + * @return + */ + private static int compare(String str, String target) + { + int d[][]; // 矩阵 + int n = str.length(); + int m = target.length(); + int i; // 遍历str的 + int j; // 遍历target的 + char ch1; // str的 + char ch2; // target的 + int temp; // 记录相同字符,在某个矩阵位置值的增量,不是0就是1 + + if (n == 0) + return m; + + if (m == 0) + return n; + + d = new int[n + 1][m + 1]; + for (i = 0; i <= n; i++)// 初始化第一列 + d[i][0] = i; + + for (j = 0; j <= m; j++) // 初始化第一行 + d[0][j] = j; + + for (i = 1; i <= n; i++) + { // 遍历str + ch1 = str.charAt(i - 1); + // 去匹配target + for (j = 1; j <= m; j++) + { + ch2 = target.charAt(j - 1); + if (ch1 == ch2) + temp = 0; + else + temp = 1; + + // 左边+1,上边+1, 左上角+temp取最小 + d[i][j] = min(d[i - 1][j] + 1, d[i][j - 1] + 1, d[i - 1][j - 1] + temp); + } + } + + return d[n][m]; + } + + private static int min(int one, int two, int three) + { + return (one = one < two ? one : two) < three ? one : three; + } + + /** + * 获取两字符串的相似度 + * + * @param str + * @param target + * @return + */ + + public static float getSimilarityRatio(String str, String target) + { + return 1 - (float) compare(str, target) / Math.max(str.length(), target.length()); + } + + public static void main(String[] args) + { + System.err.println((int)(getSimilarityRatio("我家", "先生家") * 10000)); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/KeywordDao.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/KeywordDao.java new file mode 100644 index 0000000..3dd7437 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/KeywordDao.java @@ -0,0 +1,780 @@ +package com.zhiqim.yangcai.design.dao; + +import java.text.DecimalFormat; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnTransaction; +import org.zhiqim.kernel.util.Arrays; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.kernel.util.Lists; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Strings; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.design.dbo.DesKeyword; +import com.zhiqim.yangcai.design.dbo.DesKeywordLog; +import com.zhiqim.yangcai.design.dbo.DesLabelAttribute; +import com.zhiqim.yangcai.design.dbo.DesLabelIndustry; +import com.zhiqim.yangcai.design.dbo.keyword.DesKeywordCore; +import com.zhiqim.yangcai.design.dbo.keyword.DesKeywordCoreLog; +import com.zhiqim.yangcai.design.dbo.keyword.DesKeywordIndex; +import com.zhiqim.yangcai.design.dbo.keyword.DesKeywordIndustry; +import com.zhiqim.yangcai.design.dbo.template.MediaTemplate; +import com.zhiqim.yangcai.design.dbo.works.DesWorksFile; +import com.zhiqim.yangcai.design.model.HotKeywordModel; + +/** + * 关键词Dao + * + * @version v1.0.0 @author Deng 2018-1-10 新建与整理 + */ +@AnAlias("KeywordDao") +public class KeywordDao +{ + /** + * 组装solr查询器 + * + * @param attrList + * @param q + * @return + */ + public static String createQueryCondition(List attrList, String keyword) + { + if (Validates.isEmpty(attrList) && Validates.isEmptyBlank(keyword)) + { + return ""; + } + + String attr = ""; + if (Validates.isNotEmpty(attrList)) + { + attr = "labelKeyword:(" + Lists.toString(attrList, "&&") + ")"; + } + + if (Validates.isEmptyBlank(keyword)) + { + return attr; + } + + List keyList = new ArrayList(); + String query = keyword.replace(" ", " "); // 中文空格替换成英文空格 + + for (String key : Lists.toStringList(query, " ")) + { + if (Validates.isEmptyBlank(key)) + { + continue; + } + + keyList.add("\"" + Strings.trim(key) + "\""); + } + + query = Lists.toString(keyList, "||"); + if (Validates.isEmpty(attr)) + { + return query; + } + + return attr + "&&(" + query + ")"; + } + + /** + * 判断中文长度 + * + * @param keywowrdName + * @return length >=2 计算热度,length >=3 长尾词 + * @throws Exception + */ + public static boolean isChineseLength(String keywowrdName, int length) throws Exception + { + // 至少三个以上的中文,认为是长尾词 + boolean flag = false; + int chinaCount = 0; + Pattern p = Pattern.compile("[\u4E00-\u9FA5]+"); + char c[] = keywowrdName.toCharArray(); + for (int i = 0; i < c.length; i++) + { + Matcher matcher = p.matcher(String.valueOf(c[i])); + if (matcher.matches()) + { + chinaCount++; + if (chinaCount >= length) + { + flag = true; + break; + } + } + } + + return flag; + } + + /** + * 计算热词度 + * + * @throws Exception + */ + @AnTransaction + public static void doKeywordHotSearch(String keyword) throws Exception + { + List floatList = new ArrayList(); + List coreList = ORM.get(ZTable.class).list(DesKeywordCore.class, new Selector().addMustLike("keywordName", keyword)); + if (!coreList.isEmpty()) + { + for (DesKeywordCore core : coreList) + { + float strValue = HotWordDao.getSimilarityRatio(keyword, core.getKeywordName()); + + HotKeywordModel model = new HotKeywordModel(); + model.setKeywordName(core.getKeywordName()); + model.setDegree((int) (strValue * 10000));// 转换成整型,进行排序 + + floatList.add(model); + } + + // 排序,降序 + Collections.sort(floatList, new Comparator() + { + @Override + public int compare(HotKeywordModel o1, HotKeywordModel o2) + { + return o2.getDegree() - o1.getDegree(); + } + }); + + // 相似度最高的词条,并且大于等于50% + 1 + String keywordName = floatList.get(0).getKeywordName(); + int degree = floatList.get(0).getDegree(); + int maxNum = 5000; + + if (degree >= maxNum) + { + DesKeywordCore core = ORM.get(ZTable.class).item(DesKeywordCore.class, new Selector("keywordName", keywordName)); + + Updater update = new Updater(); + update.addMust("keywordName", keywordName); + update.addField("keywordHot", core.getKeywordHot() + 1); + + ORM.get(ZTable.class).update(DesKeywordCore.class, update); + + doKeywordCoreLog(keywordName, 0); + } + } + } + + /** + * 计算关键词之前的向量相似性 + * + * @param list + * @param list2 + * @return + */ + public static int getSimilarDegree(List list, List list2) + { + // 创建向量空间模型,使用map实现,主键为词项,值为长度为2的数组,存放着对应词项在字符串中的出现次数 + Map vectorSpace = new HashMap(); + int[] itemCountArray = null;// 为了避免频繁产生局部变量,所以将itemCountArray声明在此 + + // 动态数组转为数组 + int size1 = list.size(); + String[] strArray1 = list.toArray(new String[size1]); + + for (int i = 0; i < strArray1.length; ++i) + { + if (vectorSpace.containsKey(strArray1[i])) + { + ++(vectorSpace.get(strArray1[i])[0]); + } + else + { + itemCountArray = new int[2]; + itemCountArray[0] = 1; + itemCountArray[1] = 0; + vectorSpace.put(strArray1[i], itemCountArray); + } + } + int size2 = list2.size(); + String[] strArray2 = list2.toArray(new String[size2]); + for (int i = 0; i < strArray2.length; ++i) + { + if (vectorSpace.containsKey(strArray2[i])) + { + ++(vectorSpace.get(strArray2[i])[1]); + } + else + { + itemCountArray = new int[2]; + itemCountArray[0] = 0; + itemCountArray[1] = 1; + vectorSpace.put(strArray2[i], itemCountArray); + } + } + + // 计算相似度 + double vector1Modulo = 0.00;// 向量1的模 + double vector2Modulo = 0.00;// 向量2的模 + double vectorProduct = 0.00; // 向量积 + Iterator> iter = vectorSpace.entrySet().iterator(); + + while (iter.hasNext()) + { + Entry entry = iter.next(); + itemCountArray = entry.getValue(); + + vector1Modulo += itemCountArray[0] * itemCountArray[0]; + vector2Modulo += itemCountArray[1] * itemCountArray[1]; + + vectorProduct += itemCountArray[0] * itemCountArray[1]; + } + + vector1Modulo = Math.sqrt(vector1Modulo); + vector2Modulo = Math.sqrt(vector2Modulo); + + double value = vectorProduct / (vector1Modulo * vector2Modulo); + DecimalFormat df = new DecimalFormat("#.00"); + df.format(value); + + int dfValue = (int) (value * 100); + + // 返回相似度 + return dfValue; + } + + /** + * 单次或多次增加关键词及关键词日志 + * + * @param keywordName + * @param operatorCode + * @throws Exception + */ + @AnTransaction + public static void doKeywordLostofAdd(String keywordName, String operatorCode, int keywordType) throws Exception + { + DesKeyword keyword = new DesKeyword(); + keyword.setKeywordId(Ids.longId()); + keyword.setKeywordName(keywordName); + keyword.setOperatorCode(operatorCode); + keyword.setCreateTime(Sqls.nowTimestamp()); + keyword.setKeywordType(keywordType); + + ORM.get(ZTable.class).insert(keyword); + + DesKeywordLog log = new DesKeywordLog(); + log.setLogId(Ids.longId()); + log.setKeywordName(keywordName); + log.setSearchCount(0); + log.setCreateTime(Sqls.nowTimestamp()); + + ORM.get(ZTable.class).insert(log); + } + + /** + * 删除关键词时,更新作品或模板的keywordName参数 + * + * @param media + * @param keywordName + * @throws Exception + */ + public static boolean doKeywordNameUpdater(long mediaId, String keywordName, String type) throws Exception + { + if (Validates.isEmpty(keywordName)) + { + return false; + } + + if ("template".equals(type)) + { + MediaTemplate media = ORM.get(ZTable.class).item(MediaTemplate.class, mediaId); + String oldName = media.getKeywordName(); + String newName = ""; + + String[] keyStrName = oldName.split(","); + for (String kName : keyStrName) + { + if (kName.equals(keywordName)) + { + continue; + } + + newName += kName + ","; + } + + Updater updater = new Updater(); + updater.addMust("mediaId", mediaId); + + if (Validates.isNotEmpty(newName)) + { + updater.addField("keywordName", newName.substring(0, newName.length() - 1)); + } + else + { + updater.addField("keywordName", newName); + } + + ORM.get(ZTable.class).update(MediaTemplate.class, updater); + } + else + { + DesWorksFile works = ORM.get(ZTable.class).item(DesWorksFile.class, mediaId); + String oldName = works.getKeywordName(); + String newName = ""; + + String[] keyStrName = oldName.split(",| "); + for (String kName : keyStrName) + { + if (kName.equals(keywordName)) + { + continue; + } + + newName += kName + ","; + } + + Updater updater = new Updater(); + updater.addMust("worksId", mediaId); + + if (Validates.isNotEmpty(newName)) + { + updater.addField("keywordName", newName.substring(0, newName.length() - 1)); + } + else + { + updater.addField("keywordName", newName); + } + + ORM.get(ZTable.class).update(DesWorksFile.class, updater); + } + + return true; + } + + /** + * 获取子行业名称 + * + * @param industrySubIds + * @return + * @throws Exception + */ + public static String doIndustrySubName(String industrySubIds) throws Exception + { + if (Validates.isEmpty(industrySubIds)) + { + return ""; + } + + String subsName = ""; + String[] subsStr = industrySubIds.split(","); + if (subsStr.length == 0) + { + return ""; + } + + for (String subs : subsStr) + { + DesLabelIndustry industry = ORM.get(ZTable.class).item(DesLabelIndustry.class, Long.parseLong(subs)); + if (industry == null) + { + continue; + } + + subsName += industry.getIndustrySubName() + " "; + } + + return subsName.substring(0, subsName.length() - 1); + } + + /** + * 获取属性名称 + * + * @param attributeIds + * @return + * @throws Exception + */ + public static String doAttributeName(String attributeIds) throws Exception + { + if (Validates.isEmpty(attributeIds)) + { + return ""; + } + + String attributeName = ""; + String[] subsStr = attributeIds.split(","); + if (subsStr.length == 0) + { + return ""; + } + + for (String subs : subsStr) + { + DesLabelAttribute attr = ORM.get(ZTable.class).item(DesLabelAttribute.class, Long.parseLong(subs)); + if (attr == null) + { + continue; + } + + attributeName += attr.getAttributeName() + " "; + } + + return attributeName.substring(0, attributeName.length() - 1); + } + + /** + * 同步更新solr行业属性 + * + * @param mediaId + * @param labelName + * @throws Exception + */ + public static void doSolrLabelKeyword(long mediaId, String labelName) throws Exception + { + DesKeywordIndex index = ORM.get(ZTable.class).item(DesKeywordIndex.class, mediaId); + if (index == null) + { + DesKeywordIndex in = new DesKeywordIndex(); + in.setMediaId(mediaId); + in.setCustomLabelKeyword(labelName); + + ORM.get(ZTable.class).insert(index); + } + else + { + Updater updater = new Updater(); + updater.addMust("mediaId", mediaId); + updater.addField("labelKeyword", labelName); + + ORM.get(ZTable.class).update(DesKeywordIndex.class, updater); + } + + } + + /** + * 同步更新solr自定义标签 + * + * @param mediaId + * @param labelName 自定义标签 + * @param coreName 关键字 + * @param type 0:新增至关键字库,1:关键字库删除该关键字 + * @throws Exception + */ + public static void doSolrCustomLabelKeyword(long mediaId, String labelName, String coreName, int type) throws Exception + { + DesKeywordIndex index = ORM.get(ZTable.class).item(DesKeywordIndex.class, mediaId); + if (index == null) + { + index = new DesKeywordIndex(); + index.setMediaId(mediaId); + index.setCustomLabelKeyword(labelName); + + ORM.get(ZTable.class).insert(index); + } + else + { + Updater updater = new Updater(); + updater.addMust("mediaId", mediaId); + updater.addField("customLabelKeyword", labelName); + + ORM.get(ZTable.class).update(DesKeywordIndex.class, updater); + } + + if (type == 0) + { + doKeywordCoreAdd(coreName);// 更新关键词库 + } + else + { + doKeywordCoreDelete(coreName); + } + } + + /** + * 同步更新solr长尾词 + * + * @param mediaId + * @param keyword + * @throws Exception + */ + public static void doSolrLongTailKeyword(long mediaId, String longTailKeyword) throws Exception + { + DesKeywordIndex index = ORM.get(ZTable.class).item(DesKeywordIndex.class, mediaId); + if (index == null) + { + index = new DesKeywordIndex(); + index.setMediaId(mediaId); + index.setLongTailKeyword(longTailKeyword); + + ORM.get(ZTable.class).insert(index); + + doKeywordCoreAdd(longTailKeyword);// 更新关键词库 + } + else + { + Updater updater = new Updater(); + updater.addMust("mediaId", mediaId); + + if (Validates.isEmpty(index.getLongTailKeyword())) + { + updater.addField("longTailKeyword", longTailKeyword); + ORM.get(ZTable.class).update(DesKeywordIndex.class, updater); + } + else if (!isHashLongTailKeyword(mediaId, index, longTailKeyword)) + { + updater.addField("longTailKeyword", index.getLongTailKeyword() + "," + longTailKeyword); + ORM.get(ZTable.class).update(DesKeywordIndex.class, updater); + } + + doKeywordCoreAdd(longTailKeyword);// 更新关键词库. + } + + } + + /** + * 判断长尾词是否存在 + * + * @param mediaId + * @param longTailKeyword + * @return + * @throws Exception + */ + public static boolean isHashLongTailKeyword(long mediaId, DesKeywordIndex index, String longTailKeyword) throws Exception + { + String[] longStr = index.getLongTailKeyword().split(","); + for (String str : longStr) + { + if (longTailKeyword.equals(str)) + { + return true; + } + } + + return false; + } + + /** + * 增加关键词库 + * + * @param keywordName + * @throws Exception + */ + public static void doKeywordCoreAdd(String keywordName) throws Exception + { + if (Validates.isEmptyBlank(keywordName)) + { + return; + } + + DesKeywordCore core = ORM.get(ZTable.class).item(DesKeywordCore.class, new Selector("keywordName", keywordName)); + if (core == null) + { + core = new DesKeywordCore(); + core.setKeywordName(keywordName); + core.setKeywordHot(0); + core.setKeywordNum(0); + core.setKeywordScore(0); + + ORM.get(ZTable.class).insert(core); + } + } + + /** + * 删除关键词库 + * + * @param keywordName + * @throws Exception + */ + public static void doKeywordCoreDelete(String keywordName) throws Exception + { + if (Validates.isEmptyBlank(keywordName)) + { + return; + } + + ORM.get(ZTable.class).delete(DesKeywordCore.class, new Selector("keywordName", keywordName)); + } + + /** + * 增加行业关键词 + * + * @param keywordName + * @throws Exception + */ + public static void dokeywordIndustryAdd(long mediaId, String industryKeyword) throws Exception + { + doKeywordCoreAdd(industryKeyword);// 更新关键词库 + + MediaTemplate media = ORM.get(ZTable.class).item(MediaTemplate.class, mediaId); + long industryId = media.getIndustryId(); + String industrySubIds = media.getIndustrySubIds(); + + if (Validates.isEmpty(industrySubIds)) + { + return; + } + + Selector selector = new Selector(); + selector.addMust("industryId", industryId); + selector.addMustLike("industrySubId", media.getIndustrySubIds()); + DesKeywordIndustry ki = ORM.get(ZTable.class).item(DesKeywordIndustry.class, selector); + if (ki == null) + { + ki = new DesKeywordIndustry(); + ki.setIndustryId(industryId); + ki.setIndustrySubId(media.getIndustrySubIds()); + ki.setIndustryKeyword(industryKeyword); + + ORM.get(ZTable.class).insert(ki); + } + else + { + // 关键词是否存在 + String[] ikStr = ki.getIndustryKeyword().split(","); + for (String str : ikStr) + { + if (str.equals(industryKeyword)) + { + return; + } + } + + Updater update = new Updater(); + update.addMust("industryId", industryId); + update.addMustLike("industrySubId", media.getIndustrySubIds()); + + if (Validates.isEmpty(ki.getIndustryKeyword())) + { + update.addField("industryKeyword", industryKeyword); + } + else + { + update.addField("industryKeyword", ki.getIndustryKeyword() + "," + industryKeyword); + } + + ORM.get(ZTable.class).update(DesKeywordIndustry.class, update); + } + } + + /** + * 关键词搜索次数增加 + * + * @param keyword + * @throws Exception + */ + public static void doKeywordCoreNumAdd(String keywordName) throws Exception + { + DesKeywordCore core = ORM.get(ZTable.class).item(DesKeywordCore.class, new Selector("keywordName", keywordName)); + if (core == null) + { + return; + } + + Updater update = new Updater(); + update.addMust("keywordName", keywordName); + update.addField("keywordNum", core.getKeywordNum() + 1); + ORM.get(ZTable.class).update(DesKeywordCore.class, update); + + doKeywordCoreLog(keywordName, 1); + } + + /** + * 关键词库日志 + * + * @param keywordName + * @throws Exception + */ + public static void doKeywordCoreLog(String keywordName, int keywordType) throws Exception + { + DesKeywordCore core = ORM.get(ZTable.class).item(DesKeywordCore.class, new Selector("keywordName", keywordName)); + if (core == null) + { + return; + } + + String dayCode = DateTimes.getDateString(); + Selector selector = new Selector(); + selector.addMust("keywordName", keywordName); + selector.addMust("dayCode", dayCode); + DesKeywordCoreLog log = ORM.get(ZTable.class).item(DesKeywordCoreLog.class, selector); + if (log == null) + { + log = new DesKeywordCoreLog(); + log.setLogId(Ids.longId()); + log.setKeywordName(keywordName); + log.setDayCode(DateTimes.getDateString()); + log.setMonthCode(DateTimes.getDateTime7String()); + if (keywordType == 0) + { + log.setKeywordHot(1); + } + else + { + log.setKeywordNum(1); + } + + ORM.get(ZTable.class).insert(log); + } + else + { + Updater update = new Updater(); + update.addMust("logId", log.getLogId()); + if (keywordType == 0) + { + update.addField("keywordHot", log.getKeywordHot() + 1); + } + else + { + update.addField("keywordNum", log.getKeywordNum() + 1); + } + + ORM.get(ZTable.class).update(DesKeywordCoreLog.class, update); + } + } + + /** + * 查询关键词搜索次数,并且排序 + * + * @param keywordName + * @return + * @throws Exception + */ + public static List doKeywordCoreSort(String keywordName) throws Exception + { + List coreList = new ArrayList(); + String[] keywordStr = Arrays.toStringArray(keywordName); + for (String keyword : keywordStr) + { + DesKeywordCore core = ORM.get(ZTable.class).item(DesKeywordCore.class, new Selector("keywordName", keyword)); + if (core == null) + { + continue; + } + + coreList.add(core); + } + + // 排序,降序 + Collections.sort(coreList, new Comparator() + { + @Override + public int compare(DesKeywordCore o1, DesKeywordCore o2) + { + return o2.getKeywordNum() - o1.getKeywordNum(); + } + }); + + return coreList; + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/LabelDao.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/LabelDao.java new file mode 100644 index 0000000..aa8e78e --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/LabelDao.java @@ -0,0 +1,104 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dao; + +import java.util.ArrayList; +import java.util.List; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.util.Lists; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.DesLabelAttribute; +import com.zhiqim.yangcai.design.dbo.DesLabelIndustry; + +/** + * 标签Dao + * + * @version v1.0.0 @author Deng 2018-3-15 新建与整理 + */ +@AnAlias("LabelDao") +public class LabelDao +{ + /** + * 获取子行业名称 + * @param industrySubIds + * @return + * @throws Exception + */ + public static String doIndustrySubName(String industrySubIds)throws Exception + { + if(Validates.isEmpty(industrySubIds)) + return ""; + + String[] subsStr = industrySubIds.split(","); + if(subsStr.length == 0) + return ""; + + List subList = new ArrayList<>(); + for (String subs : subsStr) + { + DesLabelIndustry industry = ORM.get(ZTable.class).item(DesLabelIndustry.class, Long.parseLong(subs)); + if (industry == null) + continue; + + subList.add(industry.getIndustrySubName()); + } + + return Lists.toString(subList); + } + + /** + * 获取行业下的子行业 + * @param industryId + * @return + * @throws Exception + */ + public static long getIndustrySubId(long industryId)throws Exception + { + DesLabelIndustry industry = ORM.get(ZTable.class).item(DesLabelIndustry.class, new Selector("industryId", industryId)); + + return industry.getIndustrySubId(); + } + + /** + * 获取属性值名称 + * @param attributeIds + * @return + * @throws Exception + */ + public static String doAttributeName(String attributeIds)throws Exception + { + if(Validates.isEmpty(attributeIds)) + return ""; + + String[] subsStr = attributeIds.split(","); + if(subsStr.length == 0) + return ""; + + List attrList = new ArrayList<>(); + for (String subs : subsStr) + { + DesLabelAttribute attr = ORM.get(ZTable.class).item(DesLabelAttribute.class, Long.parseLong(subs)); + if(attr == null) + continue; + + attrList.add(attr.getAttributeName()); + } + + return Lists.toString(attrList); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/ParamTypeDao.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/ParamTypeDao.java new file mode 100644 index 0000000..f8b21ea --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/ParamTypeDao.java @@ -0,0 +1,368 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dao; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import org.zhiqim.kernel.util.Validates; + +/** + * 文本参数分析 + * + * @version v1.0.0 @author Deng 2018-1-8 新建与整理 + */ +public class ParamTypeDao +{ + + public static String isAnalysis(String str) + { + if (isUserName(str)) + return "姓名"; + + else if (isPosition(str)) + return "职位"; + + else if (isMobile(str)) + return "手机"; + + else if (isTel(str)) + return "固定电话"; + + else if (isQQ(str)) + return "QQ"; + + else if (isWechat(str)) + return "微信"; + + else if (isEmail(str)) + return "邮箱"; + + else if (isCompany(str)) + return "公司名称"; + + else if (isAddr(str)) + return "公司地址"; + + else if (isBusiness(str)) + return "经营(业务)范围"; + + return null; + } + + /** + * 判断是否为姓名 + * @param str + * @return + */ + public static boolean isUserName(String str) + { + String[] USERNAME_STR = {"姓名", "名字", "联系人"}; + if (Validates.isStrContainStrArr(str, USERNAME_STR)) + return true; + + return false; + + } + + /** + * 判断是否为职位 + * @param str + * @return + */ + public static boolean isPosition(String str) + { + String[] POSITION_STR = {"职位", "title", "公司职位", "头衔"}; + if (Validates.isStrContainStrArr(str, POSITION_STR)) + return true; + + return false; + + } + + /** + * 判断是否为手机号码 + * @param str + * @return + */ + public static boolean isMobile(String str) + { + String[] MOBILE_STR = {"手机", "电话","电话号码" ,"mobile", "phone", "TEL", "Tel"}; + if (Validates.isStrContainStrArr(str, MOBILE_STR)) + return true; + + return false; + + } + + /** + * 判断是否为固定电话 + * @param str + * @return + */ + public static boolean isTel(String str) + { + String[] TEL_STR = {"固定电话", "座机电话", "座机号码"}; + if (Validates.isStrContainStrArr(str, TEL_STR)) + return true; + + return false; + } + + /** + * 判断是否为QQ + * @param str + * @return + */ + public static boolean isQQ(String str) + { + String[] QQ_STR = {"QQ" ,"QQ号码", "Qq", "qq"}; + if (Validates.isStrContainStrArr(str, QQ_STR)) + return true; + + return false; + + } + + /** + * 判断是否为微信 + * @param str + * @return + */ + public static boolean isWechat(String str) + { + String[] WECHAT_STR = {"微信" ,"微信号码"}; + if (Validates.isStrContainStrArr(str, WECHAT_STR)) + return true; + + return false; + + } + + /** + * 判断是否为邮箱 + * @param str + * @return + */ + public static boolean isEmail(String str) + { + String[] EMAIL_STR ={"邮箱","电子邮箱","EMAIL","email"}; + if (Validates.isStrContainStrArr(str, EMAIL_STR)) + return true; + + Validates.isEmail(str); + return false; + + } + + /** + * 判断是否为公司名称 + * @param str + * @return + */ + public static boolean isCompany(String str) + { + String[] COMPANY_STR = {"有限公司", "公司名称", "公司", "公司名"}; + if (Validates.isStrContainStrArr(str, COMPANY_STR)) + return true; + + return false; + + } + + /** + * 判断是否为公司地址 + * @param str + * @return + */ + public static boolean isAddr(String str) + { + String[] ADDR_STR = {"公司地址", "地址", "addr", "店址"}; + if (Validates.isStrContainStrArr(str, ADDR_STR)) + return true; + return false; + + } + + /** + * 判断是否为经营(业务)范围 + * @param str + * @return + */ + public static boolean isBusiness(String str) + { + String[] BUSINESS_STR = {"经营","范围", "经营范围", "营业范围", "主营"}; + if (Validates.isStrContainStrArr(str, BUSINESS_STR)) + return true; + + return false; + + } + + /** + * 文本字符检查判断替换 + * @param argStr + * @param splitFormat + * @return + */ + public static List ChkPhaseChar(String argStr, String[] splitFormat) + { + List dataList = new ArrayList(); + if (Validates.isStrContainStrArr(argStr, splitFormat)) + {//存在文本单字符 + String[] characterStr = doContentSplit(argStr, splitFormat); //段段文本字节 + if (characterStr == null) + return dataList; + + //查找同义词 + String synonym = ParamTypeDao.isAnalysis(characterStr[0]); + if (synonym != null) + dataList.add(synonym + ":" + characterStr[1]); + } + else + {//正则表达式判断 + + //汉字 + 数字 + String chrInt = "^[\\u4E00-\\u9FA5_0-9]+$"; + if (Validates.isRegexp(chrInt, argStr)) + dataList.addAll(ParamTypeDao.doRegEx(argStr)); + + if (Validates.isPhone(argStr)) + dataList.add("固定电话:" + argStr); + + if (Validates.isEmail(argStr)) + dataList.add("邮箱:" + argStr); + } + + return dataList; + } + + /** + * 汉字数字格式判断 + * @param argStr + * @return + */ + public static List doRegEx(String argStr) + { + List strList = new ArrayList(); + String chnName = doChnName(argStr); + String number = doNumber(argStr); + if (chnName.length() == 0) + {//只有数字 + //纯数字 + if (Validates.isInteger(argStr) && argStr.length() == 11) + strList.add("手机:" + argStr); + } + else if (chnName.length() <= 3) + { + //检查同义词 + String name = isAnalysis(chnName); + if (name == null) + strList.add("姓名:" + chnName); + else if (number.length() != 0) + { + strList.add(name + ":" + number); + } + } + else if (chnName.length() !=0 && number.length() != 0) + { + strList.add("公司地址:" + argStr); + } + + else if (chnName.length() >= 5 && number.length() == 0) + { + if (chnName.contains("有限公司")) + strList.add("公司名称:" + chnName); + } + + return strList; + } + + /** + * 获取汉字 + * @param argStr + * @return + */ + public static String doChnName(String argStr) + { + String regEx = "[\\u4e00-\\u9fa5]"; + Pattern p = Pattern.compile(regEx); + Matcher m = p.matcher(argStr); + StringBuffer sb = new StringBuffer(); + while(m.find()){ + sb.append(m.group()); + } + + return sb.toString(); + } + + /** + * 获取数字 + * @param argStr + * @return + */ + public static String doNumber(String argStr) + { + String regEx = "[0-9]+"; + Pattern p = Pattern.compile(regEx); + Matcher m = p.matcher(argStr); + StringBuffer sb = new StringBuffer(); + while(m.find()){ + sb.append(m.group()); + } + + return sb.toString(); + } + + /** + * 数组转List + * @param phaseStr + * @return + */ + public static List doDataStrList(String[] phaseStr) + { + List phaseStrList = Arrays.asList(phaseStr); + + return phaseStrList; + } + + /** + * 数组分隔,去除空格组装 + * @param contentStr + * @param splitFormat + * @return + */ + public static String[] doContentSplit(String contentStr, String[] splitFormat) + { + String[] textStr = null; + for (String str : splitFormat) + { + if (contentStr.contains(str)) + textStr = contentStr.split(str); + } + + List strList = doDataStrList(textStr); + List strListNew=new ArrayList<>(); + for (int i = 0; i 4 * 1000 * 60 * 60 && finishHour <= 6 * 1000 * 60 * 60) + { + // 接单6小时内定稿奖励积分 + ScoreDesignerRecordDetail scoreDesignerRecordDetail = new ScoreDesignerRecordDetail(); + scoreDesignerRecordDetail.setScoreType(Long.valueOf(ScoreConstants.SCORE_TYPE_3.value())); + scoreDesignerRecordDetail.setOperatorCode(order.getDesigner()); + scoreDesignerRecordDetail.setOrderId(order.getDesignId()); + ScoreDesignerRecordDao.addScoreDesignerRecordDetail(scoreDesignerRecordDetail); + } + if (order.getAmount() >= 30000 && order.getAmount() < 50000) + { + // 定稿大金额奖励300-500元区间 + ScoreDesignerRecordDetail scoreDesignerRecordDetail = new ScoreDesignerRecordDetail(); + scoreDesignerRecordDetail.setScoreType(Long.valueOf(ScoreConstants.SCORE_TYPE_4.value())); + scoreDesignerRecordDetail.setOperatorCode(order.getDesigner()); + scoreDesignerRecordDetail.setOrderId(order.getDesignId()); + ScoreDesignerRecordDao.addScoreDesignerRecordDetail(scoreDesignerRecordDetail); + } + else if (order.getAmount() >= 50000) + { + // 定稿大金额奖励500元以上 + ScoreDesignerRecordDetail scoreDesignerRecordDetail = new ScoreDesignerRecordDetail(); + scoreDesignerRecordDetail.setScoreType(Long.valueOf(ScoreConstants.SCORE_TYPE_5.value())); + scoreDesignerRecordDetail.setOperatorCode(order.getDesigner()); + scoreDesignerRecordDetail.setOrderId(order.getDesignId()); + ScoreDesignerRecordDao.addScoreDesignerRecordDetail(scoreDesignerRecordDetail); + } + if (order.getPrintKs() >= 5) + { + // 定稿5款及以上订单 + ScoreDesignerRecordDetail scoreDesignerRecordDetail = new ScoreDesignerRecordDetail(); + scoreDesignerRecordDetail.setScoreType(Long.valueOf(ScoreConstants.SCORE_TYPE_6.value())); + scoreDesignerRecordDetail.setOperatorCode(order.getDesigner()); + scoreDesignerRecordDetail.setOrderId(order.getDesignId()); + ScoreDesignerRecordDao.addScoreDesignerRecordDetail(scoreDesignerRecordDetail); + } + if (StringUtils.isNotEmpty(order.getAfterNames())) + { + // 定稿包含后加工 + ScoreDesignerRecordDetail scoreDesignerRecordDetail = new ScoreDesignerRecordDetail(); + scoreDesignerRecordDetail.setScoreType(Long.valueOf(ScoreConstants.SCORE_TYPE_7.value())); + scoreDesignerRecordDetail.setOperatorCode(order.getDesigner()); + scoreDesignerRecordDetail.setOrderId(order.getDesignId()); + ScoreDesignerRecordDao.addScoreDesignerRecordDetail(scoreDesignerRecordDetail); + } + return true; + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/StatDao.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/StatDao.java new file mode 100644 index 0000000..0cd0739 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/StatDao.java @@ -0,0 +1,453 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.dao; + +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.util.Amounts; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ORMException; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.cache.ProductConvertCache; +import com.zhiqim.yangcai.design.constants.DraftConstants; +import com.zhiqim.yangcai.design.dbo.design.ProductDesignPriceView; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; +import com.zhiqim.yangcai.design.dbo.order.DesignSelfView; +import com.zhiqim.yangcai.design.dbo.score.ScoreDesignerLever; +import com.zhiqim.yangcai.design.dbo.score.ScoreDesignerRecordView; +import com.zhiqim.yangcai.design.dbo.stat.DesignGroup; +import com.zhiqim.yangcai.design.dbo.stat.RefundParameter; + +/** + * 设计统计DAO + * + * @version v1.0.0 @author Deng 2017-9-18 新建与整理 + */ +public class StatDao +{ + + /** + * 计算退款奖罚金 + * + * @param model + * @param request + * @return + * @throws ORMException + * @throws SQLException + */ + public static long calculateAmount(long refundRate, int sumCount, HttpRequest request) throws ORMException, SQLException + { + RefundParameter parameter = ORM.get(ZTable.class).item(RefundParameter.class); + if (parameter == null) + { + request.returnHistory("请先设置退款率奖罚参数"); + return 0; + } + + // 退款率高于标准退款率(罚钱) + if (refundRate > parameter.getStandardRefundRateCeil()) + { + long difference = refundRate + 1 - parameter.getStandardRefundRateCeil(); + + double multiple = difference * 1.0 / parameter.getPunishDot(); + long amount = (long) (Math.ceil(multiple) * parameter.getPunishAmount()); + + return -amount < -parameter.getPunishAmountMax() ? -parameter.getPunishAmountMax() : -amount; + } + + // 退款在标准退款率范围内(不奖不罚) + else if (refundRate >= parameter.getStandardRefundRateFloor() && refundRate < parameter.getStandardRefundRateCeil()) + { + return 0; + } + else if (refundRate < parameter.getStandardRefundRateFloor()) + { // 退款率高于标准退款率(奖励) + if (sumCount < 200) + { + return 0; + } + + long difference = parameter.getStandardRefundRateFloor() - refundRate; + double multiple = difference * 1.0 / parameter.getRewardDot(); + long amount = (long) (Math.ceil(multiple) * parameter.getRewardAmount()); + + return amount > parameter.getRewardAmountMax() ? parameter.getRewardAmountMax() : amount; + } + + return 0; + } + + /** + * 计算退款奖罚金 + * + * @param model + * @param request + * @return + * @throws ORMException + * @throws SQLException + */ + public static long calculateAmount(long refundRate, int sumCount) throws ORMException, SQLException + { + RefundParameter parameter = ORM.get(ZTable.class).item(RefundParameter.class); + if (parameter == null) + { + return 0; + } + + // 退款率高于标准退款率(罚钱) + if (refundRate > parameter.getStandardRefundRateCeil()) + { + long difference = refundRate + 1 - parameter.getStandardRefundRateCeil(); + + double multiple = difference * 1.0 / parameter.getPunishDot(); + long amount = (long) (Math.ceil(multiple) * parameter.getPunishAmount()); + + return -amount < -parameter.getPunishAmountMax() ? -parameter.getPunishAmountMax() : -amount; + } + + // 退款在标准退款率范围内(不奖不罚) + else if (refundRate >= parameter.getStandardRefundRateFloor() && refundRate < parameter.getStandardRefundRateCeil()) + { + return 0; + } + else if (refundRate < parameter.getStandardRefundRateFloor()) + { + if (sumCount < 200) + {// 小于两百单只罚不奖 + return 0; + } + + long difference = parameter.getStandardRefundRateFloor() - refundRate; + double multiple = difference * 1.0 / parameter.getRewardDot(); + long amount = (long) (Math.ceil(multiple) * parameter.getRewardAmount()); + + return amount > parameter.getRewardAmountMax() ? parameter.getRewardAmountMax() : amount; + } + + return 0; + } + + /** + * 返回一个年份列表 + * + * @param beginYear + * @param endYear + * @return + */ + public static List yearList(int beginYear, int endYear) + { + List yearList = new ArrayList(); + for (int i = beginYear; i <= endYear; i++) + { + yearList.add(i); + } + + return yearList; + } + + /** + * 根据设计组ID查组织ID + * + * @param groupId + * @return + * @throws ORMException + * @throws SQLException + */ + public static long queryOrgIdByGroupId(long groupId) throws ORMException, SQLException + { + DesignGroup group = ORM.get(ZTable.class).item(DesignGroup.class, groupId); + if (group == null) + { + return 0; + } + + return group.getOrgId(); + } + + /** + * + * [简要描述]: 获取设计师积分对象
            + * [详细描述]:
            + * + * @author gjx + * @param designer + * @return + * @throws Exception + */ + public static ScoreDesignerRecordView doQueryDesignerScore(String designer) throws Exception + { + Selector pSelector = new Selector(); + pSelector.addMust("operatorCode", designer); + + return ORM.get(ZView.class).item(ScoreDesignerRecordView.class, pSelector); + } + + /** + * + * [简要描述]: 获取设计师等级对象
            + * [详细描述]:
            + * + * @author gjx + * @param scoreDesignerLeverList + * @param designer + * @return + * @throws Exception + */ + public static ScoreDesignerLever doQueryDesignerScoreLever(List scoreDesignerLeverList, ScoreDesignerRecordView scoreDesignerRecordView) + throws Exception + { + for (ScoreDesignerLever scoreDesignerLever : scoreDesignerLeverList) + { + if (scoreDesignerLever.getMaxScore() >= scoreDesignerRecordView.getScore() + && scoreDesignerRecordView.getScore() >= scoreDesignerLever.getMinScore()) + { + return scoreDesignerLever; + } + } + return null; + } + + /** + * + * [简要描述]: 计算订单设计师绩效
            + * [详细描述]:
            + * + * @author gjx + * @param scoreDesignerLever + * @param order + * @return + */ + public static long calculateOrderPerformance(DesignSelfView order) + { + // 刷新缓存 + Global.get(ProductConvertCache.class).doRefresh(); + int printKs = order.getPrintKs(); + // long typeId = order.getTypeId(); + int draftType = order.getDraftType(); + int designCopies = order.getDesignCopies(); + + // 排除标准自来稿 + if (draftType == DraftConstants.DRAFT_STANDARD.value()) + { + return 0L; + } + + if (draftType == DraftConstants.DRAFT_TEMPLATE.value()) + {// 改稿 + return calculateTemplateDraftOrderPrice(order); + } + + long orderDesignerFee = calculateOrderProductPerformance(order); + + if (designCopies < 1) + {// 设计费最少一份 + designCopies = 1; + } + + if (designCopies >= printKs || order.getTypeId() == 13879L || order.getTypeId() == 4L) + { // 设计费份数>=款数,则订单单价为:产品单价*设计费份数 海报产品,展架特殊处理 设计单 = 单价*设计费份数 + orderDesignerFee = orderDesignerFee * designCopies; + } + else + { // 设计费份数<款数,则订单单价为:产品单价*设计费份数+(款数-设计费份数)*改稿单价 + orderDesignerFee = (orderDesignerFee * designCopies) + + Amounts.toFen(String.valueOf((printKs - designCopies) * Double.valueOf(Amounts.toYuan(calculateTemplateDraftProductPrice(order)))), 0); + } + + return orderDesignerFee; + } + + /** + * + * [简要描述]: 获取改稿订单价格
            + * [详细描述]: 改稿根据产品单价配置得出(改稿单价*款数)
            + * + * @author gjx + * @param order + * @return + */ + public static long calculateTemplateDraftOrderPrice(DesignSelfView order) + { + long templateDraftPrice = calculateTemplateDraftProductPrice(order); + if (order.getTypeId() == 13879) + {// 海报类不计算份数 + return templateDraftPrice; + } + if (order.getPrintKs() > 0) + { + templateDraftPrice = templateDraftPrice * order.getPrintKs(); + } + return templateDraftPrice; + } + + /** + * + * [简要描述]: 获取改稿产品单价
            + * [详细描述]:
            + * + * @author gjx + * @param order + * @return + */ + public static long calculateTemplateDraftProductPrice(DesignSelfView order) + { + // 按产品+尺寸+面数 产品+尺寸 产品+面数 产品排序 + List prdPriceList = Global.get(ProductConvertCache.class).getProductLeverPriceList(order.getTypeId()); + if (Validates.isEmpty(prdPriceList)) + {// 未匹配上产品单价配置 + return 0; + } + + List prdCvt = matchOrderPrdPriceRule(prdPriceList, order, 1); + if (null == prdCvt) + {// 未匹配上产品单价配置 + return 0; + } + + // return prdCvt.getTemplateDraftPrice(); + for (ProductDesignPriceView prpd : prdCvt) + { + if (prpd.getDraftType() == 1)// 改稿单价 + { + return prpd.getDesignPriceMoney(); + } + } + + return 0L; + } + + /** + * + * [简要描述]: 计算订单产品单价
            + * [详细描述]:
            + * + * @author gjx + * @param scoreDesignerLever + * @param order + */ + public static long calculateOrderProductPerformance(DesignOrder order) + { + // 按产品+尺寸+面数 产品+尺寸 产品+面数 产品排序 + List prdPriceList = Global.get(ProductConvertCache.class).getProductLeverPriceList(order.getTypeId()); + if (prdPriceList == null) + { + return 0L;// 未配置返回0 + } + // 尺寸升序排序 + // prdPriceList.sort(Comparator.comparing(ProductConvert::getPrdSizeHeight)); + Collections.sort(prdPriceList, new Comparator() + { + @Override + public int compare(ProductDesignPriceView p1, ProductDesignPriceView p2) + { + if (p1.getPrdSizeHeight() == 0) + { + return Integer.compare(p2.getPrdSizeHeight(), p1.getPrdSizeHeight()); + } + else + { + return Integer.compare(p1.getPrdSizeHeight(), p2.getPrdSizeHeight()); + } + } + }); + if (Validates.isEmpty(prdPriceList)) + {// 未匹配上产品单价配置 + return 0; + } + + List prdCvt = matchOrderPrdPriceRule(prdPriceList, order, order.getDraftType()); + if (null == prdCvt) + {// 未匹配上产品单价配置 + return 0; + } + + for (ProductDesignPriceView prpd : prdCvt) + { + if (prpd.getDraftType() == order.getDraftType())// 设计单价 + { + // 画册、电子画册特殊处理 + if (order.getTypeId() == 3 || order.getTypeId() == 2127009652009L) + { + return prpd.getDesignPriceMoney() * order.getDesignPage(); + } + return prpd.getDesignPriceMoney(); + } + } + + return 0L; + } + + /** + * + * [简要描述]: 订单匹配产品单价
            + * [详细描述]:
            + * + * @author gjx + * @param prdPriceList + * @param order + * @return + */ + public static List matchOrderPrdPriceRule(List prdPriceList, DesignOrder order, int draftType) + { + double designWidth = order.getDesignWidth(); + double designHeight = order.getDesignHeight(); + if (order.getPrintWidth() > 0 && order.getPrintHeight() > 0) + {// 自定义尺寸 + designWidth = order.getPrintWidth(); + designHeight = order.getPrintHeight(); + } + String prdText = order.getOrderText(); + List prdpList = new ArrayList(); + for (ProductDesignPriceView cvt : prdPriceList) + { + int prdSizeWidth = cvt.getPrdSizeWidth(); + int prdSizeHeight = cvt.getPrdSizeHeight(); + String prdPageName = cvt.getPrdPageName(); + + if (prdSizeWidth > 0 && prdSizeHeight > 0) + { + boolean match = false; + + if ((designWidth <= prdSizeWidth && designHeight <= prdSizeHeight) || (designHeight <= prdSizeWidth && designWidth <= prdSizeHeight)) + { + match = true; + } + + if (!match) + {// 尺寸不匹配 + continue; + } + } + + if (Validates.isNotEmpty(prdPageName) && !prdText.contains(prdPageName)) + {// 产品描述不包含产品单价配置面数 + continue; + } + + // 稿件类型不匹配 + if (cvt.getDraftType() != draftType) + { + continue; + } + prdpList.add(cvt); + } + return prdpList; + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/TemplateDao.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/TemplateDao.java new file mode 100644 index 0000000..05098b4 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/TemplateDao.java @@ -0,0 +1,747 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.dao; + +import java.awt.image.BufferedImage; +import java.awt.image.RenderedImage; +import java.io.File; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; + +import javax.imageio.ImageIO; + +import org.icepdf.core.pobjects.Document; +import org.icepdf.core.pobjects.Page; +import org.icepdf.core.util.GraphicsRenderingHints; +import org.zhiqim.kernel.annotation.AnTransaction; +import org.zhiqim.kernel.constants.SignConstants; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Files; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.kernel.util.Objects; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Strings; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.media.dbo.MediaBg; +import com.zhiqim.media.dbo.MediaCanvas; +import com.zhiqim.media.dbo.MediaCoverMaterial; +import com.zhiqim.media.dbo.MediaImageUse; +import com.zhiqim.media.dbo.MediaMaterialParamEx; +import com.zhiqim.media.dbo.MediaParam; +import com.zhiqim.media.service.dao.MediaDao; +import com.zhiqim.media.service.dao.MediaPathDao; +import com.zhiqim.media.service.model.MediaBgModel; +import com.zhiqim.yangcai.design.constants.FileTypeConstants; +import com.zhiqim.yangcai.design.dbo.order.DesignAtta; +import com.zhiqim.yangcai.design.dbo.template.DesTemplateEventView; +import com.zhiqim.yangcai.design.dbo.template.DesTemplateIndexView; +import com.zhiqim.yangcai.design.dbo.template.MediaTemplate; +import com.zhiqim.yangcai.design.dbo.template.MediaTemplateView; +import com.zhiqim.yangcai.design.model.CopyTemplateModel; +import com.zhiqim.yangcai.design.model.TemplatePreviewModel; +import com.zhiqim.yangcai.util.SolrUtil; + +/** + * 模板dao + * + * @version v1.0.0 @author zhouwenbin 2017-11-27 新建与整理 + */ +public class TemplateDao implements SignConstants +{ + private static final Log log = LogFactory.getLog(TemplateDao.class); + + /** + * 查询事件模板列表 + * + * @param urlParam + * @param user + * @return + * @throws Exception + */ + public static List doTemplateEventList(String urlParam, ZmrSessionUser user, long designType, long industryId) throws Exception + { + List templateList = new ArrayList(); + + Selector selector = new Selector(); + selector.addOrderbyDesc("createTime"); + + if (designType != -1) + { + selector.addMust("designType", designType); + } + + if (industryId != -1) + { + selector.addMust("industryId", industryId); + } + + if (Validates.isNotEmpty(urlParam) && urlParam.equals("COLLECT")) + {// 我收藏的 + selector.addMust("operatorCode", user.getOperatorCode()); + selector.addMust("eventType", 2); + templateList = ORM.get(ZView.class).list(DesTemplateEventView.class, selector); + } + + return templateList; + } + + /** + * 关键词或全部查询模板,订单类型,按模板指数降顺 + * + * @param allList + * @param keyword + * @return + * @throws Exception + */ + public static List doTemplateList(List sorlList) throws Exception + { + List mediaList = new ArrayList(); + for (long mediaId : sorlList) + { + Selector selector = new Selector(); + selector.addMust("mediaId", mediaId); + DesTemplateIndexView index = ORM.get(ZView.class).item(DesTemplateIndexView.class, selector); + if (index == null) + { + continue; + } + + mediaList.add(index); + } + + // 组装新的模板列表,按模板指数降序 + Collections.sort(mediaList, new Comparator() + { + @Override + public int compare(DesTemplateIndexView o1, DesTemplateIndexView o2) + { + return o2.getMediaScore() - o1.getMediaScore(); + } + }); + + return mediaList; + } + + /** + * 复制模板,返回模板对象 + * + * @param mediaId 原id + * @param newMediaId 新id + * @param designer 创建者 + * @return + * @throws Exception + */ + private static CopyTemplateModel copyTemplate(long mediaId, long newMediaId, String designer) throws Exception + { + MediaTemplate template = ORM.get(ZTable.class).item(MediaTemplate.class, mediaId); + if (template == null) + { + return null; + } + + MediaCanvas newCanvas = ORM.get(ZTable.class).item(MediaCanvas.class, newMediaId); + if (newCanvas != null) + { + log.error("复制模板时,新mediaId已存在,新mediaId=" + newMediaId); + return null; + } + + // 复制模板 + MediaTemplate newTemplate = new MediaTemplate(); + Objects.copyDeep(template, newTemplate); + newTemplate.setMediaId(newMediaId); + + newTemplate.setTemplateType(20); + + newTemplate.setTemplateStatus(0); + // newTemplate.setOrderId(0); + newTemplate.setDesignId(0); + newTemplate.setTemplateSrc(mediaId); // 来源 + newTemplate.setReleaseTime(null); + newTemplate.setReleaseStatus(0); + newTemplate.setDesigner(designer); + + String time = DateTimes.getDateTimeString(); + List newBgList = new ArrayList<>(); + List refList = new ArrayList<>(); + + // 画布 + MediaCanvas canvas = ORM.get(ZTable.class).item(MediaCanvas.class, mediaId); + newCanvas = new MediaCanvas(); + Objects.copyDeep(canvas, newCanvas); + newCanvas.setMediaId(newMediaId); + newCanvas.setIsEdit(0); // 可编辑 + newCanvas.setMediaName(canvas.getMediaName()); + newCanvas.setCreateTime(time); + newCanvas.setUpdateTime(time); + + MediaDao.updateCanvasFullSize(newCanvas, newCanvas.getBaseWidthMm(), newCanvas.getBaseHeightMm(), true); + + // 背景 + List bgList = ORM.get(ZTable.class).list(MediaBg.class, new Selector("mediaId", mediaId)); + for (MediaBg bg : bgList) + { + MediaBg newBg = new MediaBg(); + Objects.copyDeep(bg, newBg); + newBg.setMediaId(newMediaId); + + newBgList.add(newBg); + } + + refList.addAll(MediaDao.recordBgRefNum(newBgList, "add")); // 添加引用记录 + + // 素材 + List materialList = ORM.get(ZView.class).list(MediaMaterialParamEx.class, new Selector("mediaId", mediaId)); + List newMaterialList = new ArrayList<>(); + for (MediaMaterialParamEx m : materialList) + { + MediaMaterialParamEx newM = new MediaMaterialParamEx(); + Objects.copyDeep(m, newM); + newM.setMediaId(newMediaId); + + newMaterialList.add(newM); + } + + List newCoverMaterialList = new ArrayList(); + List coverMaterialList = ORM.get(ZTable.class).list(MediaCoverMaterial.class, new Selector("mediaId", mediaId)); + for (MediaCoverMaterial mediaCoverMaterial : coverMaterialList) + { + MediaCoverMaterial newCoverMaterial = new MediaCoverMaterial(); + Objects.copyDeep(mediaCoverMaterial, newCoverMaterial); + newCoverMaterial.setMediaId(newMediaId); + + newCoverMaterialList.add(newCoverMaterial); + } + + refList.addAll(MediaDao.recordMaterialRefNum(newMaterialList, "add")); // 添加引用记录 + + CopyTemplateModel media = new CopyTemplateModel(newCanvas, newBgList, newMaterialList, newCoverMaterialList); + media.setTemplate(newTemplate); + media.setRefList(refList); + + return media; + } + + /** + * 复制模板,并入库 + * + * @param mediaId 原id + * @param newMediaId 新id + * @param designer 创建者 + * @return + * @throws Exception + */ + @AnTransaction + public static CopyTemplateModel copyTemplateAndInsert(long mediaId, long newMediaId, String designer) throws Exception + { + try + { + CopyTemplateModel media = copyTemplate(mediaId, newMediaId, designer); + + MediaCanvas canvas = media.getCanvas(); + String oldUrl = canvas.getMediaUrl(); + if (Validates.isNotEmpty(oldUrl)) + { + String oldFilePath = MediaPathDao.parseUplUrl(oldUrl); + + String fileName = Files.getFileName(oldFilePath); + String destPath = MediaPathDao.getCanvasLocalPre(newMediaId) + fileName; // 本地存储路径 + + if (!Files.copyFile(oldFilePath, destPath)) + { + log.error("复制模板时,复制素材效果图失败,原mediaId=" + mediaId); + return null; + } + + String mediaUrl = MediaPathDao.getCanvasUrlPre(newMediaId) + fileName; // 网络存储路径 + canvas.setMediaUrl(mediaUrl); // 更换url地址 + } + + ORM.get(ZTable.class).insert(media.getTemplate()); + ORM.get(ZTable.class).insert(canvas); + ORM.get(ZTable.class).insertBatch(media.getBgList()); + ORM.get(ZTable.class).insertBatch(media.getMediaMaterialList()); + ORM.get(ZTable.class).insertBatch(media.getMaterialParamList()); + ORM.get(ZTable.class).replaceBatch(media.getRefList()); // 替换引用数 + + return media; + } + catch (Exception e) + { + log.error("复制模板时异常,原mediaId=" + mediaId, e); + return null; + } + } + + /** + * 替换素材参数 + * + * @param materialList + * @param paramMap + * @return + * @throws Exception + */ + public static List replaceMaterialParam(List materialList, Map paramMap) throws Exception + { + List newMaterialList = new ArrayList<>(); + for (MediaMaterialParamEx m : materialList) + { + newMaterialList.add(replaceMaterialParam(m, paramMap)); + } + + return newMaterialList; + } + + /** + * 单个替换素材参数 + * + * @param m + * @param paramMap + * @return + * @throws Exception + */ + public static MediaMaterialParamEx replaceMaterialParam(MediaMaterialParamEx m, Map paramMap) throws Exception + { + String key = m.getParamKey(); + if (Validates.isEmpty(key)) + { + return m; + } + + // 3表示组合素材 + if (paramMap == null || !paramMap.containsKey(key) || m.getType() == 3) + { + return m; + } + + String paramValue = (String) paramMap.get(key); + if (Validates.isEmpty(paramValue)) + { + return m; + } + + String source = m.getSource(); + if (m.getType() == 1) + {// 文字 + source = MediaDao.replaceMaterialText(source, paramValue); + } + else + {// 图片 + String value = MediaDao.getImageValue(source); + source = source.replace(value, paramValue); + } + + m.setSource(source); + + return m; + } + + /** + * 解析客户文本数据 + * + * @param paramData + * @throws Exception + */ + public static Map doParseReplaceData(long paramCat, String paramData) throws Exception + { + Map dataMap = new HashMap(); + Map replaceMap = new HashMap(); + + if (Validates.isEmpty(paramData)) + { + return replaceMap; + } + + String[] paramStr = paramData.split("\n"); + for (String param : paramStr) + { + param = param.replace(":", ":"); // 中文冒号替换成英文冒号 + + int indx = param.indexOf(":"); + if (indx == -1) + { + continue; + } + + String first = Strings.trimLeft(param.substring(0, indx)); + + // 查询参数是否匹配 + MediaParam mParam = ORM.get(ZTable.class).item(MediaParam.class, new Selector("paramName", first)); + if (mParam == null) + { + Selector paramSel = new Selector(); + paramSel.addMaybeLike("paramDesc", first); + mParam = ORM.get(ZTable.class).item(MediaParam.class, paramSel); + } + + if (mParam == null) + { + continue; + } + + String paramCode = mParam.getParamName(); + String second = Strings.trimRight(param.substring(indx + 1)); + + dataMap.put(paramCode, second); + } + + Selector paramSel = new Selector(); + paramSel.addMust("paramCat", paramCat); + paramSel.addOrderbyAsc("paramIndex"); + List paramList = ORM.get(ZTable.class).list(MediaParam.class); + for (MediaParam param : paramList) + { + String paramName = param.getParamName(); + if (dataMap.containsKey(paramName)) + { + replaceMap.put(param.getParamKey(), dataMap.get(paramName)); + } + } + + return replaceMap; + } + + /** + * 生成模板svg展示图 + * + * @param mediaIdList + * @return + * @throws Exception + */ + public static Map getTemplatePreview(List mediaIdList) throws Exception + { + Map svgMap = new HashMap(); + if (mediaIdList == null || mediaIdList.isEmpty()) + { + return svgMap; + } + + for (long mediaId : mediaIdList) + { + MediaTemplateView canvas = ORM.get(ZView.class).item(MediaTemplateView.class, new Selector("mediaId", mediaId)); + int mediaScore = TemplateOrderDao.getTemplateScore(mediaId); + TemplatePreviewModel priview = new TemplatePreviewModel(mediaId, canvas.getPageValue(), mediaScore, canvas.getWidth(), canvas.getHeight()); + + // 设置svg内容展示代码 + List bgList = MediaDao.toSvgList(mediaId, 0, 0, MediaPathDao.MEDIA_URL_PRE, false, null, null, null, "SVG"); + List svgList = new ArrayList<>(); + for (MediaBgModel bg : bgList) + { + svgList.add(bg.getSvgCode()); + } + + // priview.setSvgList(svgList); + priview.setBgList(bgList); + svgMap.put(mediaId, priview); + } + + // 按模板指数,降序排列 + List> entryList = new ArrayList>(svgMap.entrySet()); + Collections.sort(entryList, new Comparator>() + { + @Override + public int compare(Entry o1, Entry o2) + { + return o2.getValue().getMediaScore() - o1.getValue().getMediaScore(); + } + }); + + return svgMap; + } + + /** + * 模板订单保存初稿、设计、成品文件 + * + * @param designId + * @throws Exception + */ + @AnTransaction + public static void doSaveTemplateOrderFile(long designId, String operatorCode, String pdfPath, String pdfFileName, String designPath, String designFielName, + String thumPath, String thumFileName) throws Exception + { + // 插入初稿缩图 + DesignAtta thumAtta = new DesignAtta(); + thumAtta.setDesignId(designId); + thumAtta.setAttaId(Ids.longId()); + thumAtta.setAttaModul(FileTypeConstants.FILE_FIRSTTHUMFILE.value()); + thumAtta.setSavePath(thumPath); + thumAtta.setFileName(thumFileName); + thumAtta.setFileType("png"); + thumAtta.setFileSize(Files.read(thumPath).length); + thumAtta.setUploadTime(Sqls.nowTimestamp()); + thumAtta.setOperatorCode(operatorCode); + + // 插入设计文件 + DesignAtta desAtta = new DesignAtta(); + desAtta.setDesignId(designId); + desAtta.setAttaId(Ids.longId()); + desAtta.setAttaModul(FileTypeConstants.FILE_DESGIN.value()); + desAtta.setSavePath(designPath); + desAtta.setFileName(designFielName); + desAtta.setFileType("svg"); + desAtta.setFileSize(Files.read(designPath).length); + desAtta.setUploadTime(Sqls.nowTimestamp()); + desAtta.setOperatorCode(operatorCode); + + // 插入成品文件附件 + byte[] cont = Files.read(new File(pdfPath), 500 * MiB); + long len = 0L; + if (cont != null) + { + len = cont.length; + } + + DesignAtta endAtta = new DesignAtta(); + endAtta.setDesignId(designId); + endAtta.setAttaId(Ids.longId()); + endAtta.setAttaModul("EndFile"); + endAtta.setSavePath(pdfPath); + endAtta.setFileName(pdfFileName); + endAtta.setFileType("pdf"); + endAtta.setFileSize(len); + endAtta.setUploadTime(Sqls.nowTimestamp()); + endAtta.setOperatorCode(operatorCode); + + ORM.get(ZTable.class).insert(thumAtta); + ORM.get(ZTable.class).insert(desAtta); + ORM.get(ZTable.class).insert(endAtta); + } + + /** + * 复制模板来创建新的订单模板 + * + * @param designId 订单号 + * @param mediaId 选择的模板ID + * @param designer 设计师 + * @return + */ + public static boolean doNewOrderTemplate(long designId, long mediaId, String designer) throws Exception + { + long newMediaId = Ids.longId(); + CopyTemplateModel media = TemplateDao.copyTemplateAndInsert(mediaId, newMediaId, designer); + if (media == null) + { + return false; + } + + // 生成临时订单草稿 + Updater tupdater = new Updater(); + tupdater.addMust("mediaId", newMediaId); + tupdater.addField("templateType", 0); + tupdater.addField("templateStatus", 0); + tupdater.addField("designId", designId); + ORM.get(ZTable.class).update(MediaTemplate.class, tupdater); + // 更新solr数据 + SolrUtil.updateMediaData(newMediaId); + return true; + } + + /** + * 复制模板来创建新的订单模板 + * + * @param designId 订单号 + * @param mediaId 选择的模板ID + * @param mediaId new模板ID + * @param designer 设计师 + * @return + */ + public static boolean doNewOrderTemplate(long designId, long mediaId, long newMediaId, String designer) throws Exception + { + CopyTemplateModel media = TemplateDao.copyTemplateAndInsert(mediaId, newMediaId, designer); + if (media == null) + { + return false; + } + + // 生成临时订单草稿 + Updater tupdater = new Updater(); + tupdater.addMust("mediaId", newMediaId); + tupdater.addField("templateType", 0); + tupdater.addField("templateStatus", 0); + tupdater.addField("designId", designId); + ORM.get(ZTable.class).update(MediaTemplate.class, tupdater); + // 更新solr数据 + SolrUtil.updateMediaData(newMediaId); + return true; + } + + /** + * pdf生成缩略图 + * + * @param path + * @param createPath + * @return + * @throws Exception + */ + public static boolean doThumFileCreate(String path, String createPath) throws Exception + { + Document document = new Document(); + document.setFile(path); + + float scale = 1f; + float rotation = 0f; + int pageTotal = document.getNumberOfPages(); + if (pageTotal == 0) + { + return false; + } + + for (int n = 0; n < 1; n++) + { + BufferedImage image = document.getPageImage(n, GraphicsRenderingHints.SCREEN, Page.BOUNDARY_CROPBOX, rotation, scale); + RenderedImage rendImage = image; + try + { + File outFile = new File(createPath); + ImageIO.write(rendImage, "png", outFile); + } + catch (Exception e) + { + Files.deleteFile(createPath); + log.error("作品库文件定时任务:生成缩略图失败" + e); + return false; + } + finally + { + document.dispose(); + } + + image.flush(); + } + + return true; + } + + /** + * 订单模板定稿处理更新模板为定稿模板 + * + * @param designId + * @param mediaId + * @throws Exception + */ + @AnTransaction + public static void doTemplateOrderCompleteExec(long designId, long mediaId) throws Exception + { + // 1.更新模板为定稿模类型 + Updater mUpdater = new Updater(); + mUpdater.addMust("designId", designId); + mUpdater.addMust("mediaId", mediaId); + mUpdater.addField("templateType", 80); + ORM.get(ZTable.class).update(MediaTemplate.class, mUpdater); + + // 2.更新模板为不可编辑状态 + Updater cUpdater = new Updater(); + cUpdater.addMust("mediaId", mediaId); + cUpdater.addField("isEdit", 1); // 不可编辑 + cUpdater.addField("updateTime", DateTimes.getDateTimeString()); + ORM.get(ZTable.class).update(MediaCanvas.class, cUpdater); + } + + /** + * 获取模板对象 + * + * @param mediaId + * @return + * @throws Exception + */ + public static List getTemplateViewList(List allList) throws Exception + { + List mediaList = new ArrayList();// 组装新的模板对象 + for (Long mediaId : allList) + { + Selector selector = new Selector(); + selector.addMust("mediaId", mediaId); + MediaTemplateView media = ORM.get(ZView.class).item(MediaTemplateView.class, selector); + if (media == null) + { + continue; + } + + mediaList.add(media); + } + + return mediaList; + } + + /** + * 获取模板事件对象 + * + * @param mediaId + * @return + * @throws Exception + */ + public static DesTemplateEventView getTemplateEventView(long mediaId) throws Exception + { + DesTemplateEventView media = ORM.get(ZView.class).item(DesTemplateEventView.class, new Selector("mediaId", mediaId)); + if (media == null) + { + return null; + } + + return media; + } + + /** + * 获取收藏模板对象ID + * + * @param mediaId + * @return + * @throws Exception + */ + public static long getTemplateEventId(long mediaId) throws Exception + { + DesTemplateEventView media = ORM.get(ZView.class).item(DesTemplateEventView.class, new Selector("mediaId", mediaId)); + if (media == null) + { + return 0L; + } + + return media.getMediaId(); + } + + /** + * 判断solr返回的模板对象 + * + * @param templateList + * @param mediaId + * @return + * @throws Exception + */ + public static List isSearchResult(List templateList, long mediaId) throws Exception + { + List mediaList = new ArrayList(); + if (!templateList.isEmpty()) + { + for (MediaTemplateView temp : templateList) + { + if (temp.getMediaId() == mediaId) + { + mediaList.add(temp); + } + } + } + + return mediaList; + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/TemplateOrderDao.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/TemplateOrderDao.java new file mode 100644 index 0000000..dc3b487 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/TemplateOrderDao.java @@ -0,0 +1,54 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dao; + +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.keyword.DesKeywordIndex; +import com.zhiqim.yangcai.design.dbo.template.DesTemplateOrder; + +/** + * 订单模板Dao + * + * @version v1.0.0 @author Deng 2018-3-24 新建与整理 + */ +public class TemplateOrderDao +{ + /** + * 获取模板初稿次数 + * @param mediaId + * @throws Exception + */ + public static int getTemplateDraftNum(long mediaId)throws Exception + { + int count = ORM.get(ZTable.class).count(DesTemplateOrder.class, new Selector("mediaId", mediaId)); + + return count; + } + + /** + * 获取模板分数 + * @param mediaId + * @return + * @throws Exception + */ + public static int getTemplateScore(long mediaId)throws Exception + { + DesKeywordIndex index = ORM.get(ZTable.class).item(DesKeywordIndex.class, mediaId); + if (index == null) + return 0; + + return index.getMediaScore(); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/TemplateScoreDao.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/TemplateScoreDao.java new file mode 100644 index 0000000..6bc8d51 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/TemplateScoreDao.java @@ -0,0 +1,262 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.dao; + +import org.zhiqim.kernel.annotation.AnTransaction; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.design.constant.ScoreConstants; +import com.zhiqim.yangcai.design.dbo.keyword.DesKeywordIndex; +import com.zhiqim.yangcai.design.dbo.score.DesScoreParam; +import com.zhiqim.yangcai.design.dbo.score.DesScoreWeight; +import com.zhiqim.yangcai.design.dbo.template.DesTemplateScore; +import com.zhiqim.yangcai.design.dbo.template.DesTemplateScoreLog; +import com.zhiqim.yangcai.design.dbo.template.MediaTemplate; +import com.zhiqim.yangcai.util.SolrUtil; + +/** + * 模板评分Dao + * + * @version v1.0.0 @author Deng 2018-3-5 新建与整理 + */ +public class TemplateScoreDao +{ + /** + * 模板基础分数计算 + * + * @param mediaId + * @param paramKey + * @throws Exception + */ + @AnTransaction + public static void doTempalteBaseScore(long mediaId) throws Exception + { + Selector selector = new Selector(); + selector.addMust("scoreName", ScoreConstants.SCORE_TEMPLATE); + selector.addMust("scoreType", ScoreConstants.BASE_SCORE.value()); + DesScoreWeight weight = ORM.get(ZTable.class).item(DesScoreWeight.class, selector); + if (weight == null) + return; + + DesTemplateScore score = ORM.get(ZTable.class).item(DesTemplateScore.class, mediaId); + if (score == null) + { + score = new DesTemplateScore(); + score.setMediaId(mediaId); + score.setBaseScore(weight.getScoreValue()); + ORM.get(ZTable.class).insert(score); + + doTemplateScoreCalc(mediaId);// 计算模板分数 + } + } + + /** + * 模板动态分计算 + * + * @param mediaId + * @throws Exception + */ + @AnTransaction + public static void doTemplateFloatScore(long mediaId, String paramKey) throws Exception + { + MediaTemplate media = ORM.get(ZTable.class).item(MediaTemplate.class, mediaId); + if (media == null) + return; + + if (media.getTemplateType() < 100) + { + // 更新solr模板 + SolrUtil.updateMediaData(mediaId); + return; + } + + Selector selector = new Selector(); + selector.addMust("scoreName", ScoreConstants.SCORE_TEMPLATE); + selector.addMust("scoreType", ScoreConstants.FLOAT_SCORE.value()); + selector.addMust("paramKey", paramKey); + DesScoreParam param = ORM.get(ZTable.class).item(DesScoreParam.class, selector); + if (param == null) + return; + + int paramValue = param.getParamValue(); + DesTemplateScore score = ORM.get(ZTable.class).item(DesTemplateScore.class, mediaId); + if (score == null) + { + score = new DesTemplateScore(); + score.setMediaId(mediaId); + if (param.getParamType() == 0) + score.setFloatScore(paramValue); + else + score.setFloatScore(-paramValue); + + ORM.get(ZTable.class).insert(score); + } + else + { + Updater sUpdater = new Updater(); + sUpdater.addMust("mediaId", mediaId); + if (param.getParamType() == 0) + {// 加分 + sUpdater.addField("floatScore", score.getFloatScore() + paramValue); + } + else + {// 减分 + if (score.getFloatScore() < 0) + { + int floatScore = Math.abs(score.getFloatScore()) - paramValue; + sUpdater.addField("floatScore", floatScore); + } + else + sUpdater.addField("floatScore", score.getFloatScore() - paramValue); + } + + ORM.get(ZTable.class).update(DesTemplateScore.class, sUpdater); + } + + doTemplateScoreCalc(mediaId); + doDesTemplateScoreLogAdd(mediaId, ScoreConstants.FLOAT_SCORE.value(), param); + + } + + /** + * 模板销量分计算 + * + * @param mediaId + * @throws Exception + */ + @AnTransaction + public static void doTemplateSaleScore(long mediaId, String paramKey) throws Exception + { + MediaTemplate media = ORM.get(ZTable.class).item(MediaTemplate.class, mediaId); + if (media == null) + return; + + if (media.getTemplateType() < 100) + { + // 更新solr模板 + SolrUtil.updateMediaData(mediaId); + return; + } + + Selector selector = new Selector(); + selector.addMust("scoreName", ScoreConstants.SCORE_TEMPLATE); + selector.addMust("scoreType", ScoreConstants.SALE_SCORE.value()); + selector.addMust("paramKey", paramKey); + DesScoreParam param = ORM.get(ZTable.class).item(DesScoreParam.class, selector); + if (param == null) + return; + + int paramValue = param.getParamValue(); + DesTemplateScore score = ORM.get(ZTable.class).item(DesTemplateScore.class, mediaId); + if (score == null) + { + score = new DesTemplateScore(); + score.setMediaId(mediaId); + if (param.getParamType() == 0) + score.setSaleScore(paramValue); + else + score.setSaleScore(-paramValue); + + ORM.get(ZTable.class).insert(score); + } + else + { + Updater sUpdater = new Updater(); + sUpdater.addMust("mediaId", mediaId); + if (param.getParamType() == 0) + {// 加分 + sUpdater.addField("floatScore", score.getSaleScore() + paramValue); + } + else + {// 减分 + if (score.getFloatScore() < 0) + { + int saleScore = Math.abs(score.getSaleScore()) - paramValue; + sUpdater.addField("saleScore", saleScore); + } + else + sUpdater.addField("saleScore", score.getSaleScore() - paramValue); + } + + ORM.get(ZTable.class).update(DesTemplateScore.class, sUpdater); + } + + doTemplateScoreCalc(mediaId); + doDesTemplateScoreLogAdd(mediaId, ScoreConstants.SALE_SCORE.value(), param); + } + + /** + * 模板分数计算 + * + * @param mediaId + * @param scoreType + * @throws Exception + */ + @AnTransaction + public static void doTemplateScoreCalc(long mediaId) throws Exception + { + DesTemplateScore score = ORM.get(ZTable.class).item(DesTemplateScore.class, mediaId); + int baseWeight = ScoreDao.doTemplateWeight(ScoreConstants.BASE_SCORE.value()); + int floatWeight = ScoreDao.doTemplateWeight(ScoreConstants.FLOAT_SCORE.value()); + int saleWeight = ScoreDao.doTemplateWeight(ScoreConstants.SALE_SCORE.value()); + + int scoreValue = score.getBaseScore() * baseWeight + score.getFloatScore() * floatWeight + score.getSaleScore() * saleWeight; + + DesKeywordIndex index = ORM.get(ZTable.class).item(DesKeywordIndex.class, mediaId); + if (index == null) + { + index = new DesKeywordIndex(); + index.setMediaId(mediaId); + index.setMediaScore(scoreValue); + + ORM.get(ZTable.class).insert(index); + } + else + { + // 更新数据库模板指数 + Updater update = new Updater(); + update.addMust("mediaId", mediaId); + update.addField("mediaScore", scoreValue); + ORM.get(ZTable.class).update(DesKeywordIndex.class, update); + } + + // 更新solr模板 + SolrUtil.updateMediaData(mediaId); + + } + + /** + * 模板本身分数日志 + * + * @param mediaId + * @param scoreType + * @param param + * @throws Exception + */ + private static void doDesTemplateScoreLogAdd(long mediaId, String scoreType, DesScoreParam param) throws Exception + { + DesTemplateScoreLog log = new DesTemplateScoreLog(); + log.setLogId(Ids.longId()); + log.setMediaId(mediaId); + log.setScoreName(ScoreConstants.SCORE_TEMPLATE); + log.setScoreType(scoreType); + log.setParamType(param.getParamType()); + log.setParamKey(param.getParamKey()); + log.setParamValue(param.getParamValue()); + log.setCreateTime(Sqls.nowTimestamp()); + + ORM.get(ZTable.class).insert(log); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/VirtualAccountDao.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/VirtualAccountDao.java new file mode 100644 index 0000000..5895ecc --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/VirtualAccountDao.java @@ -0,0 +1,221 @@ +package com.zhiqim.yangcai.design.dao; + +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.design.dbo.account.VirtualAccount; +import com.zhiqim.yangcai.design.dbo.account.VirtualAccountDetails; +import com.zhiqim.yangcai.design.dbo.account.VirtualAccountTransactionView; +import com.zhiqim.yangcai.design.dbo.account.VirtualTransactionDetails; +import com.zhiqim.yangcai.design.dbo.after.DesignAfterOrder; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; +import com.zhiqim.yangcai.design.dbo.order.DesignSelfView; +import com.zhiqim.yangcai.design.dbo.stat.DesignerOrderPerformanceStat; + +/** + * + * [简要描述]:设计师虚拟账户Dao
            + * [详细描述]:
            + * + * @version 1.0 @author hc 2021年6月17日 新建与整理 + */ +@AnAlias("VirtualAccountDao") +public class VirtualAccountDao +{ + private static final Log log = LogFactory.getLog(VirtualAccountDao.class); + + /** + * + * [简要描述]:设计师虚拟账户交易 + * [详细描述]:
            + * + * @author hc + * @param virtualAccountTransactionView + * @throws Exception + */ + public static boolean VirtualAccountTransactionDetails(VirtualAccountTransactionView virtualAccountTransactionView) throws Exception + { + VirtualAccount item = ORM.get(ZTable.class).item(VirtualAccount.class, + new Selector().addMaybe("operatorCode", virtualAccountTransactionView.getOperatorCode())); + + long usableMoney = 0L; + long freezeMoney = 0L; + // 设计师虚拟账户不存在则创建 + if (item == null) + { + VirtualAccount virtualAccount = new VirtualAccount(); + virtualAccount.setOperatorCode(virtualAccountTransactionView.getOperatorCode()); + virtualAccount.setOperatorStatus(1); + ORM.get(ZTable.class).insert(virtualAccount); + + usableMoney = virtualAccountTransactionView.getUsableMoneyAdd() + virtualAccountTransactionView.getUsableMoneyDown(); + freezeMoney = virtualAccountTransactionView.getFreezeMoneyAdd() + virtualAccountTransactionView.getFreezeMoneyDown(); + } + else + { + usableMoney = item.getUsableMoney() + virtualAccountTransactionView.getUsableMoneyAdd() + virtualAccountTransactionView.getUsableMoneyDown(); + freezeMoney = item.getFreezeMoney() + virtualAccountTransactionView.getFreezeMoneyAdd() + virtualAccountTransactionView.getFreezeMoneyDown(); + } + // 设计师账户停用 + if (Validates.isNotEmpty(item) && item.getOperatorStatus() == 2) + { + log.info("设计师【" + virtualAccountTransactionView.getOperatorCode() + "】同步虚拟账户资金失败,该设计师账户已停用"); + return false; + } + + VirtualAccountDetails virtualAccountDetails = new VirtualAccountDetails(); + VirtualTransactionDetails virtualTransactionDetails = new VirtualTransactionDetails(); + + // 同步虚拟账户表 + Updater virtualAccountUpdater = new Updater(); + virtualAccountUpdater.addMust("operatorCode", virtualAccountTransactionView.getOperatorCode()); + virtualAccountUpdater.addField("usableMoney", usableMoney); + virtualAccountUpdater.addField("freezeMoney", freezeMoney); + virtualAccountUpdater.addField("sumMoney", usableMoney + freezeMoney); + ORM.get(ZTable.class).update(VirtualAccount.class, virtualAccountUpdater); + + // 同步虚拟账户明细表 + virtualAccountDetails.setOperatorCode(virtualAccountTransactionView.getOperatorCode()); + virtualAccountDetails.setAccountBlotter(virtualAccountTransactionView.getAccountBlotter()); + virtualAccountDetails.setTransactionBlotter(virtualAccountTransactionView.getAccountTransactionBlotter()); + virtualAccountDetails.setTransactionStatus(virtualAccountTransactionView.getAccountTransactionStatus()); + virtualAccountDetails.setUsableMoneyAdd(virtualAccountTransactionView.getUsableMoneyAdd()); + virtualAccountDetails.setUsableMoneyDown(virtualAccountTransactionView.getUsableMoneyDown()); + virtualAccountDetails.setFreezeMoneyAdd(virtualAccountTransactionView.getFreezeMoneyAdd()); + virtualAccountDetails.setFreezeMoneyDown(virtualAccountTransactionView.getFreezeMoneyDown()); + virtualAccountDetails.setOperatorTime(virtualAccountTransactionView.getOperatorTime()); + virtualAccountDetails.setUsableMoney(usableMoney); + virtualAccountDetails.setFreezeMoney(freezeMoney); + virtualAccountDetails.setSumMoney(usableMoney + freezeMoney); + ORM.get(ZTable.class).insert(virtualAccountDetails); + + // 同步虚拟交易明细表 + virtualTransactionDetails.setOperatorCode(virtualAccountTransactionView.getOperatorCode()); + virtualTransactionDetails.setDesignId(virtualAccountTransactionView.getDesignId()); + virtualTransactionDetails.setTransactionBlotter(virtualAccountTransactionView.getAccountTransactionBlotter()); + virtualTransactionDetails.setOrderText(virtualAccountTransactionView.getOrderText()); + virtualTransactionDetails.setEndTime(virtualAccountTransactionView.getEndTime()); + virtualTransactionDetails.setTransactionTime(virtualAccountTransactionView.getOperatorTime()); + virtualTransactionDetails.setTransactionStatus(virtualAccountTransactionView.getAccountTransactionStatus()); + virtualTransactionDetails.setOrderMoney(virtualAccountTransactionView.getOrderMoney()); + ORM.get(ZTable.class).insert(virtualTransactionDetails); + + return true; + } + + /** + * + * [简要描述]:
            + * [详细描述]:
            + * + * @author hc + * @param order + * @return + * @throws Exception + */ + public static boolean finishDesign(DesignSelfView order, String operatorCode, int status) throws Exception + { + VirtualAccountTransactionView virtualAccountTransactionView = new VirtualAccountTransactionView(); + + Timestamp endTime = Sqls.nowTimestamp(); + + long designPrice = 0L; + if (order.getDesignPrice() == 0) + { + designPrice = StatDao.calculateOrderPerformance(order); + ORM.get(ZTable.class).update(DesignOrder.class, new Updater().addMust("designId", order.getDesignId()).addField("designPrice", designPrice)); + } + else + { + designPrice = order.getDesignPrice(); + } + + if (status == 4)// 完成定稿奖励 + { + if (order.getTypeId() == 2023207561256L)// 电子名片 + { + boolean vCardFinalize = vCardFinalize(order, operatorCode); + if (!vCardFinalize) + { + log.error("设计师:【" + operatorCode + "】,订单:【" + order.getDesignId() + "】电子名片已完成过定稿"); + return false; + } + } + + virtualAccountTransactionView.setAccountTransactionStatus(status); + virtualAccountTransactionView.setFreezeMoneyAdd(designPrice); + virtualAccountTransactionView.setOrderMoney(designPrice); + } + else if (status == 5)// 订单售后 处理 扣除售后金额 + { + DesignAfterOrder designAfterOrder = ORM.get(ZTable.class).item(DesignAfterOrder.class, new Selector().addMust("designId", order.getDesignId())); + if (null == designAfterOrder) + { + return true; + } + long longValue = new Double(designAfterOrder.getLossAmount() * 100).longValue(); + virtualAccountTransactionView.setAccountTransactionStatus(status); + virtualAccountTransactionView.setFreezeMoneyDown(-longValue); + virtualAccountTransactionView.setOrderMoney(-longValue); + } + else if (status == 6)// 订单退回 处理 + { + virtualAccountTransactionView.setAccountTransactionStatus(status); + virtualAccountTransactionView.setFreezeMoneyDown(-designPrice); + virtualAccountTransactionView.setOrderMoney(-designPrice); + } + else if (status == 1)// 订单加急奖励 + { + if (!order.isUrgent()) + { + return true; + } + + virtualAccountTransactionView.setAccountTransactionStatus(status); + virtualAccountTransactionView.setFreezeMoneyAdd(order.getUrgentPrice()); + virtualAccountTransactionView.setOrderMoney(order.getUrgentPrice()); + } + else if (status == 7)// 订单跨月退回 + { + virtualAccountTransactionView.setAccountTransactionStatus(status); + virtualAccountTransactionView.setUsableMoneyDown(-order.getDesignPrice()); + virtualAccountTransactionView.setOrderMoney(-order.getDesignPrice()); + + ORM.get(ZTable.class).delete(DesignerOrderPerformanceStat.class, new Selector("designId", order.getDesignId())); + } + + virtualAccountTransactionView.setAccountBlotter(Ids.longId()); + virtualAccountTransactionView.setOperatorCode(operatorCode); + virtualAccountTransactionView.setOperatorTime(Sqls.nowTimestamp()); + virtualAccountTransactionView.setAccountTransactionBlotter(Ids.longId()); + virtualAccountTransactionView.setDesignId(order.getDesignId()); + virtualAccountTransactionView.setOrderText(order.getOrderText()); + virtualAccountTransactionView.setReceiveTime(order.getDesignReceiveTime()); + virtualAccountTransactionView.setEndTime(endTime); + + boolean result = VirtualAccountDao.VirtualAccountTransactionDetails(virtualAccountTransactionView); + return result; + } + + // 电子名片已定稿过无退回不再记录绩效 + public static boolean vCardFinalize(DesignOrder order, String operatorCode) throws Exception + { + int vtdListCount = ORM.get(ZTable.class).count(VirtualTransactionDetails.class, + new Selector().addMust("operatorCode", operatorCode).addMust("designId", order.getDesignId())); + if (vtdListCount % 2 == 0) + { + return true; + } + return false; + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/WhetherMayLeadToDao.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/WhetherMayLeadToDao.java new file mode 100644 index 0000000..dab5e84 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/WhetherMayLeadToDao.java @@ -0,0 +1,54 @@ +/** + * 扬彩印刷设计 + * 文件名 :WhetherAllowLeadToDao.java + * 创建人 :高佳新 + * 创建时间:2019-8-2 + */ + +package com.zhiqim.yangcai.design.dao; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.manager.dbo.ZmrOperator; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; + +/*** + * + * 设计智能平台操作权限判断 + * + * @version 1.0 @author gjx 2019-8-2 新建与整理 + */ +@AnAlias("WhetherMayLeadToDao") +public class WhetherMayLeadToDao +{ + /** + * + * 区分用户设计操作权限 + * + * @author gjx + * @param request + * @param sessionName 用户名(登录账号) + * @param designer 设计师 + */ + public static void ergodicOpecoterCode(HttpRequest request, String sessionName, DesignOrder order) throws Exception + { + ZmrOperator zmrOperator = ORM.get(ZTable.class).item(ZmrOperator.class, new Selector().addMust("operatorCode", sessionName)); + if (zmrOperator == null) + { + request.returnHistory("该用户不存在"); + return; + } + + if (!order.getDesigner().equals(sessionName) && order.getTypeId() != 2023207561256L) + {// 操作员不是设计师则不允许初稿/定稿/预览操作,电子名片产品除外 + request.setResponseError("订单设计师是:" + order.getDesigner() + ",您无法操作"); + return; + } + + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/WorksDao.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/WorksDao.java new file mode 100644 index 0000000..3852bc8 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/dao/WorksDao.java @@ -0,0 +1,27 @@ +package com.zhiqim.yangcai.design.dao; + +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Strings; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.kernel.util.consts.Str; + +public class WorksDao +{ + /***/ + public static final String WORK_PREFIX = "works"; + public static final Str WORK_THUMB = new Str("thumb", "作品缩略图"); + public static final Str WORK_END = new Str("endFile", "作品文件"); + public static final Str WORK_DESIGN = new Str("designFile", "作品源文件"); + public static final Str WORK_MATERIAL = new Str("material", "作品素材文件"); + public static final Str WORK_MATERIAL_THUMB = new Str("material/thumb", "作品素材缩略图"); + + public static String getWorksOssFilekey(Str modul, String fileName) + { + String module = modul == null ? "" : Strings.trim(modul.value()); + String fileKey = Strings.addEndsWith(WORK_PREFIX, "/"); + fileKey = fileKey + Strings.addEndsWith(DateTimes.getDateTime8String(), "/"); + fileKey = Validates.isEmptyBlank(module) ? fileKey : fileKey + Strings.addEndsWith(Strings.trimLeft(module, "/"), "/"); + fileKey = fileKey + fileName; + return fileKey; + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/messagebox/BackLogWorkAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/messagebox/BackLogWorkAction.java new file mode 100644 index 0000000..dfc54d4 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/messagebox/BackLogWorkAction.java @@ -0,0 +1,131 @@ +/** + * 扬彩印刷设计 + * 文件名 :BackLogWorkAction.java + * 创建人 :gjx + * 创建时间:2020年8月15日 +*/ + +package com.zhiqim.yangcai.design.messagebox; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.Arrays; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.manager.ZmrBootstrap; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.manager.dao.ZmrOperatorDao; +import org.zhiqim.manager.dbo.ZmrDept; +import org.zhiqim.manager.dbo.ZmrOperator; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dao.OperatorDao; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; +import com.zhiqim.yangcai.design.dbo.order.OrderMessage; + +/** + * + * [简要描述] 待办事项:
            + * [详细描述]:
            + * + * @version 1.0 @author gjx 2020年8月15日 新建与整理 + */ +public class BackLogWorkAction implements Action +{ + + @Override + public void execute(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page", 1); + int pageSize = request.getContextAttributeInt("page.size", 10); + + String startDate = request.getParameter("startDate", DateTimes.getPreviousDateStringByMonth(1)); + String endDate = request.getParameter("endDate", DateTimes.getDateString()); + int day = DateTimes.compareDay(endDate, startDate); + if (day > 365) + { + request.setResponseError("请勿将时间区间跨度选择大于一年"); + return; + } + + String consumerCode = request.getParameter("consumerCode"); + + boolean steer = false; + List operatorList = new ArrayList(); + ZmrSessionUser sessionUser = request.getSessionUser(ZmrSessionUser.class); + String operatorCode = sessionUser.getOperatorCode(); + String[] consumerCodes = {}; + if (sessionUser.isAdmin()) + { + steer = true; + operatorList = ZmrOperatorDao.getOperatorAll(request); + } + else + { + List deptList = ZmrBootstrap.table(request).list(ZmrDept.class, + new Selector().addOr(new Selector().addMust("deptManager", operatorCode).addMustLike("deptSubManager", operatorCode))); + if (!deptList.isEmpty()) + { + steer = true; + operatorList = OperatorDao.getDeptOperatorList(request, operatorCode, true); + consumerCodes = new String[operatorList.size()]; + for (int i = 0; i < operatorList.size(); i++) + { + consumerCodes[i] = operatorList.get(i).getOperatorCode(); + } + } + } + + Selector selector = new Selector(); + selector.addMaybe("id", request.getParameterLong("id")); + selector.addMaybe("designId", request.getParameterLong("designId")); + selector.addMaybe("buyerNick", request.getParameter("buyerNick")); + selector.addMaybe("consumerCode", steer ? consumerCode : operatorCode); + if (steer && Validates.isNotEmpty(consumerCodes)) + {// 管理员 + selector.addMustIn("consumerCode", consumerCodes); + } + selector.addMaybe("topic", request.getParameter("topic")); + selector.addMaybe("consumerState", request.getParameterInt("consumerState")); + selector.addMustThenGE("createTime", Sqls.toTimestamp(startDate, "00:00:00")); + selector.addMustThenLE("createTime", Sqls.toTimestamp(endDate, "23:59:59")); + selector.addOrderbyAsc("consumerState"); + selector.addOrderbyAsc("createTime"); + + PageResult pageResult = ORM.get(ZTable.class).page(OrderMessage.class, page, pageSize, selector); + pageResult.addConditionMap(request.getParameterMap()); + + Map ordMap = new HashMap(); + List designIdList = new ArrayList(); + for (OrderMessage message : pageResult.list()) + { + designIdList.add(message.getDesignId()); + } + if (designIdList.size() > 0) + { + List orderList = ORM.get(ZTable.class).list(DesignOrder.class, + new Selector().addMustInLong("designId", Arrays.toArrayLong(designIdList))); + for (DesignOrder ord : orderList) + { + ordMap.put(ord.getDesignId(), ord); + } + } + + request.setAttribute("pageResult", pageResult); + request.setAttribute("operatorList", operatorList); + request.setAttribute("ordMap", ordMap); + request.setAttribute("startDate", startDate); + request.setAttribute("endDate", endDate); + + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/messagebox/CusumerThreads.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/messagebox/CusumerThreads.java new file mode 100644 index 0000000..0a88c16 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/messagebox/CusumerThreads.java @@ -0,0 +1,130 @@ +package com.zhiqim.yangcai.design.messagebox; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; + +@AnAlias("CusumerThreads") +public class CusumerThreads extends Thread +{ + private static final Log log = LogFactory.getLog(CusumerThreads.class); + + // 启动多线程。 + static + { + // new CusumerThreads().start(); + } + + @Override + public void run() + { + log.info("消息消费线程CusumerThreads-线程名称:" + this.getName() + "开始运行。。。。。。。。。。"); + do + { + try + { + /* + * String beginTime = Urls.encodeUTF8(DateTimes.getPreviousDateString(3) + + * " 00:00:00"); + * String endTime = Urls.encodeUTF8(DateTimes.getDateString() + " 23:59:59"); + * CloseableHttpClient httpclient = HttpClients.createDefault(); + * HttpGet get = new HttpGet(BusinessPlatformClientUtil.GATE_WAY_URL + + * "api-busi/messageBusi/list?consumerPlatformType=" + * + Global.getString("message-box", "sysCode") + + * "&state=1&page=1&limit=100&beginTime=" + beginTime + "&endTime=" + endTime); + * get.setHeader("Authorization", "bearer " + + * BusinessPlatformClientUtil.getAccessToken()); + * org.apache.http.HttpResponse resultRep = httpclient.execute(get); + * int statusCode = resultRep.getStatusLine().getStatusCode(); + * List messages = null; + * if (statusCode == 200) + * { + * String resultString = EntityUtils.toString(resultRep.getEntity()); + * JSONObject jsonObject = JSONObject.parseObject(resultString); + * int total = jsonObject.getIntValue("count"); + * // 没有消息 + * if (total == 0) + * { + * Thread.sleep(60000);// 1分钟执行一次 + * continue; + * } + * JSONArray array = jsonObject.getJSONArray("data"); + * messages = array.toJavaList(MessageBusi.class); + * } + * else + * { + * // 查询失败 + * try + * { + * Thread.sleep(60000);// 遇到错误,就1分钟后再次重试。 + * continue; + * } + * catch (InterruptedException e1) + * { + * log.error(e1.getMessage(), e1); + * } + * } + * log.info("消息消费线程CusumerThreads-线程名称:" + Thread.currentThread().getName() + + * ": 收到消息!"); + * // 有消息的情况 + * StringBuffer tempIds = new StringBuffer(); + * for (MessageBusi message : messages) + * { + * tempIds.append(message.getId()); + * tempIds.append(","); + * } + * if (Validates.isEmptyBlank(tempIds.toString())) + * { + * return; + * } + * tempIds.deleteCharAt(tempIds.length() - 1); + * // 告知busi已经接收到 + * HttpPost post = new HttpPost(BusinessPlatformClientUtil.GATE_WAY_URL + + * "api-busi/messageBusi/consumeMessage?ids=" + tempIds); + * post.setHeader("Authorization", "bearer " + + * BusinessPlatformClientUtil.getAccessToken()); + * resultRep = httpclient.execute(post); + * statusCode = resultRep.getStatusLine().getStatusCode(); + * if (statusCode == 200) + * { + * log.info("更新消息消费状态成功"); + * } + * else + * { + * log.error("更新消息消费状态失败(非重要)"); + * } + * // 通过Websocket发送到前端 + * for (MessageBusi message : messages) + * { + * ZqmLoginUser user = ZqmMessageUtil.getUserById(message.getConsumerPlatformType(), + * message.getConsumerOperateType(), + * message.getConsumerOperateCode()); + * JSONArray array = new JSONArray(); + * JSONObject obj = (JSONObject) JSON.toJSON(message); + * array.add(obj); + * if (user != null && user.hasConnections()) + * { + * for (HttpWebsocketConnection connection : user.getConnections()) + * { + * connection.send(array.toJSONString()); + * } + * } + * } + * Thread.sleep(60000);// 1分钟执行一次 + */ } + catch (Throwable e) + { + log.error(e.getMessage(), e); + try + { + Thread.sleep(60000);// 遇到错误,就1分钟后再次重试。 + } + catch (InterruptedException e1) + { + log.error(e1.getMessage(), e1); + } + } + } + while (true); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/messagebox/MessageAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/messagebox/MessageAction.java new file mode 100644 index 0000000..4502493 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/messagebox/MessageAction.java @@ -0,0 +1,169 @@ +package com.zhiqim.yangcai.design.messagebox; + +import java.lang.reflect.Constructor; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.http.HttpResponse; +import org.apache.http.NameValuePair; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.client.utils.URIBuilder; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClients; +import org.apache.http.message.BasicNameValuePair; +import org.apache.http.util.EntityUtils; +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.constants.HttpConstants; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.Arrays; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Strings; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.manager.ZmrConstants; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; + +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.zhiqim.yangcai.design.constants.StatusConstants; +import com.zhiqim.yangcai.design.model.DersignerOrgOrderView; +import com.zhiqim.yangcai.design.model.MessageBusiModel; +import com.zhiqim.yangcai.util.BusinessPlatformClientUtil; + +import yangcai.messagebox.model.MessageBusi; + +/** + * 个人消息盒子(我接收的)查询 + * + * @version v1.0.0 @author yixin 2019-11-12 新建与整理 + */ +public class MessageAction implements Action, ZmrConstants +{ + private static final Log log = LogFactory.getLog(MessageAction.class); + + @SuppressWarnings( + { + "unchecked", "rawtypes" + }) + @Override + public void execute(HttpRequest request) throws Exception + { + ZmrSessionUser sessionUser = request.getSessionUser(ZmrSessionUser.class); + int page = request.getParameterInt("page", 1); + int pageSize = request.getContextAttributeInt(ZMR_PAGE_SIZE, 20); + String beginTime = request.getParameter("beginTime", DateTimes.getPreviousDateString(3) + " 00:00:00"); + String endTime = request.getParameter("endTime", DateTimes.getDateString() + " 23:59:59"); + String orderId = request.getParameter("orderId", ""); + String state = request.getParameter("state", ""); + String consumerPlatformType = Global.getString("message-box", "sysCode"); + // 消息服务中心个人消息查看接口URL + String busiAddress = BusinessPlatformClientUtil.GATE_WAY_URL + "api-busi/messageBusi/list"; + String consumerOperateCode = sessionUser.getSessionName(); + + CloseableHttpClient httpclient = HttpClients.createDefault(); + URIBuilder uriBuilder = new URIBuilder(busiAddress); + List list = new LinkedList(); + list.add(new BasicNameValuePair("access_token", BusinessPlatformClientUtil.getAccessToken())); + list.add(new BasicNameValuePair("page", String.valueOf(page))); + list.add(new BasicNameValuePair("limit", String.valueOf(pageSize))); + list.add(new BasicNameValuePair("beginTime", beginTime)); + list.add(new BasicNameValuePair("endTime", endTime)); + list.add(new BasicNameValuePair("consumerPlatformType", consumerPlatformType)); + list.add(new BasicNameValuePair("consumerOperateCode", consumerOperateCode)); + list.add(new BasicNameValuePair("consumerOperateType", "1")); + list.add(new BasicNameValuePair("orderId", orderId)); + list.add(new BasicNameValuePair("state", state)); + uriBuilder.setParameters(list); + HttpGet get = new HttpGet(uriBuilder.build()); + PageResult result = null; + Class pageResultclass = PageResult.class; + Constructor constructor = pageResultclass.getDeclaredConstructor(new Class[] + { + int.class, int.class, int.class, List.class + }); + constructor.setAccessible(true); + try + { + HttpResponse resultRep = httpclient.execute(get); + int statusCode = resultRep.getStatusLine().getStatusCode(); + if (statusCode == HttpConstants._200_OK_) + { + String resultString = EntityUtils.toString(resultRep.getEntity()); + JSONObject jsonObject = JSONObject.parseObject(resultString); + int total = jsonObject.getIntValue("count"); + JSONArray array = jsonObject.getJSONArray("data"); + List data = array.toJavaList(MessageBusiModel.class); + List oidList = new ArrayList<>(); + for (MessageBusiModel messageBusiModel : data) + { + if (Validates.isNotEmpty(messageBusiModel.getOrderId())) + { + oidList.add(Long.parseLong(messageBusiModel.getOrderId())); + } + } + + if (Validates.isNotEmpty(oidList)) + { + List dersignerOrgOrderViews = ORM.get(ZView.class).list(DersignerOrgOrderView.class, + new Selector().addMustInLong("designId", Arrays.toArrayLong(oidList))); + for (DersignerOrgOrderView view : dersignerOrgOrderViews) + { + for (int i = 0; i < data.size(); i++) + { + if (data.get(i).getOrderId().equals(Strings.toString(view.getDesignId()))) + { + data.get(i).setDesignerCode(view.getDesigner()); + data.get(i).setDesignerName(view.getDesignerName()); + data.get(i).setDesignerOrgId(view.getDesignerOrgId()); + data.get(i).setDesignerOrgName(view.getDesignerOrgName()); + data.get(i).setOrderStatus(Strings.toString(view.getStatus())); + data.get(i).setOrderStatusName(StatusConstants.getOrderStatusItem(view.getStatus()).desc()); + } + } + } + } + + result = (PageResult) constructor.newInstance(new Object[] + { + total, page, pageSize, data + }); + result.addConditionMap(request.getParameterMap()); + request.setAttribute("result", result); + request.setAttribute("startTime", beginTime); + request.setAttribute("endTime", endTime); + request.setAttribute("orderId", orderId); + } + else + { + log.error("操作员【" + consumerOperateCode + "】查询消息(我接收的)调用接口HTTP错误,错误码[" + statusCode + "]"); + result = (PageResult) constructor.newInstance(new Object[] + { + 0, page, pageSize, null + }); + } + } + catch (Exception e) + { + log.error("操作员【" + consumerOperateCode + "】个人消息中心(我接收的)查询异常", e); + result = (PageResult) constructor.newInstance(new Object[] + { + 0, page, pageSize, null + }); + } + + result.addConditionMap(request.getParameterMap()); + request.setAttribute("result", result); + request.setAttribute("startTime", beginTime); + request.setAttribute("endTime", endTime); + request.setAttribute("orderId", orderId); + + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/messagebox/MessageFromMeAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/messagebox/MessageFromMeAction.java new file mode 100644 index 0000000..21d7d64 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/messagebox/MessageFromMeAction.java @@ -0,0 +1,169 @@ +package com.zhiqim.yangcai.design.messagebox; + +import java.lang.reflect.Constructor; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.http.HttpResponse; +import org.apache.http.NameValuePair; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.client.utils.URIBuilder; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClients; +import org.apache.http.message.BasicNameValuePair; +import org.apache.http.util.EntityUtils; +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.constants.HttpConstants; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.Arrays; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Strings; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.manager.ZmrConstants; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; + +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.zhiqim.yangcai.design.constants.StatusConstants; +import com.zhiqim.yangcai.design.model.DersignerOrgOrderView; +import com.zhiqim.yangcai.design.model.MessageBusiModel; +import com.zhiqim.yangcai.util.BusinessPlatformClientUtil; + +import yangcai.messagebox.model.MessageBusi; + +/** + * 个人消息盒子(我发送的)查询 + * + * @version v1.0.0 @author jiangbin 2020-5-6 新建与整理 + */ +public class MessageFromMeAction implements Action, ZmrConstants +{ + private static final Log log = LogFactory.getLog(MessageFromMeAction.class); + + @SuppressWarnings( + { + "unchecked", "rawtypes" + }) + @Override + public void execute(HttpRequest request) throws Exception + { + ZmrSessionUser sessionUser = request.getSessionUser(ZmrSessionUser.class); + int page = request.getParameterInt("page", 1); + int pageSize = request.getContextAttributeInt(ZMR_PAGE_SIZE, 20); + String beginTime = request.getParameter("beginTime", DateTimes.getPreviousDateString(3) + " 00:00:00"); + String endTime = request.getParameter("endTime", DateTimes.getDateString() + " 23:59:59"); + String orderId = request.getParameter("orderId", ""); + String state = request.getParameter("state", ""); + String producerPlatformType = Global.getString("message-box", "sysCode"); + // 消息服务中心个人消息查看接口URL + String busiAddress = BusinessPlatformClientUtil.GATE_WAY_URL + "api-busi/messageBusi/list"; + String producerOperateCode = sessionUser.getSessionName(); + + CloseableHttpClient httpclient = HttpClients.createDefault(); + URIBuilder uriBuilder = new URIBuilder(busiAddress); + List list = new LinkedList(); + list.add(new BasicNameValuePair("access_token", BusinessPlatformClientUtil.getAccessToken())); + list.add(new BasicNameValuePair("page", String.valueOf(page))); + list.add(new BasicNameValuePair("limit", String.valueOf(pageSize))); + list.add(new BasicNameValuePair("beginTime", beginTime)); + list.add(new BasicNameValuePair("endTime", endTime)); + list.add(new BasicNameValuePair("producerPlatformType", producerPlatformType)); + list.add(new BasicNameValuePair("producerOperateCode", producerOperateCode)); + list.add(new BasicNameValuePair("producerOperateType", "1")); + list.add(new BasicNameValuePair("orderId", orderId)); + list.add(new BasicNameValuePair("state", state)); + uriBuilder.setParameters(list); + HttpGet get = new HttpGet(uriBuilder.build()); + PageResult result = null; + Class pageResultclass = PageResult.class; + Constructor constructor = pageResultclass.getDeclaredConstructor(new Class[] + { + int.class, int.class, int.class, List.class + }); + constructor.setAccessible(true); + try + { + HttpResponse resultRep = httpclient.execute(get); + int statusCode = resultRep.getStatusLine().getStatusCode(); + if (statusCode == HttpConstants._200_OK_) + { + String resultString = EntityUtils.toString(resultRep.getEntity()); + JSONObject jsonObject = JSONObject.parseObject(resultString); + int total = jsonObject.getIntValue("count"); + JSONArray array = jsonObject.getJSONArray("data"); + List data = array.toJavaList(MessageBusiModel.class); + List oidList = new ArrayList<>(); + for (MessageBusiModel messageBusiModel : data) + { + if (Validates.isNotEmpty(messageBusiModel.getOrderId())) + { + oidList.add(Long.parseLong(messageBusiModel.getOrderId())); + } + } + + if (Validates.isNotEmpty(oidList)) + { + List dersignerOrgOrderViews = ORM.get(ZView.class).list(DersignerOrgOrderView.class, + new Selector().addMustInLong("designId", Arrays.toArrayLong(oidList))); + for (DersignerOrgOrderView view : dersignerOrgOrderViews) + { + for (int i = 0; i < data.size(); i++) + { + if (data.get(i).getOrderId().equals(Strings.toString(view.getDesignId()))) + { + data.get(i).setDesignerCode(view.getDesigner()); + data.get(i).setDesignerName(view.getDesignerName()); + data.get(i).setDesignerOrgId(view.getDesignerOrgId()); + data.get(i).setDesignerOrgName(view.getDesignerOrgName()); + data.get(i).setOrderStatus(Strings.toString(view.getStatus())); + data.get(i).setOrderStatusName(StatusConstants.getOrderStatusItem(view.getStatus()).desc()); + } + } + } + } + + result = (PageResult) constructor.newInstance(new Object[] + { + total, page, pageSize, data + }); + result.addConditionMap(request.getParameterMap()); + request.setAttribute("result", result); + request.setAttribute("startTime", beginTime); + request.setAttribute("endTime", endTime); + request.setAttribute("orderId", orderId); + } + else + { + log.error("操作员【" + producerOperateCode + "】查询消息(我发送的)调用接口HTTP错误,错误码[" + statusCode + "]"); + result = (PageResult) constructor.newInstance(new Object[] + { + 0, page, pageSize, null + }); + } + } + catch (Exception e) + { + log.error("操作员【" + producerOperateCode + "】个人消息中心(我发送的)查看异常", e); + result = (PageResult) constructor.newInstance(new Object[] + { + 0, page, pageSize, null + }); + } + + result.addConditionMap(request.getParameterMap()); + request.setAttribute("result", result); + request.setAttribute("startTime", beginTime); + request.setAttribute("endTime", endTime); + request.setAttribute("orderId", orderId); + + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/messagebox/NoticeAction.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/messagebox/NoticeAction.java new file mode 100644 index 0000000..24a7b11 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/messagebox/NoticeAction.java @@ -0,0 +1,117 @@ +package com.zhiqim.yangcai.design.messagebox; + +import java.lang.reflect.Constructor; +import java.util.LinkedList; +import java.util.List; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.http.HttpResponse; +import org.apache.http.NameValuePair; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.client.utils.URIBuilder; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClients; +import org.apache.http.message.BasicNameValuePair; +import org.apache.http.util.EntityUtils; +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.core.Action; +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.constants.HttpConstants; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.manager.ZmrConstants; + +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.zhiqim.yangcai.design.model.NoticeModel; +import com.zhiqim.yangcai.util.BusinessPlatformClientUtil; + +import yangcai.messagebox.model.MessageBusi; + +/** + * 公告查询 + * + * @version v1.0.0 @author yixin 2019-11-12 新建与整理 + */ +public class NoticeAction implements Action, ZmrConstants +{ + private static final Log log = LogFactory.getLog(NoticeAction.class); + + @SuppressWarnings( + { + "unchecked", "rawtypes" + }) + @Override + public void execute(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page", 1); + int pageSize = request.getContextAttributeInt(ZMR_PAGE_SIZE, 20); + String gtReleaseTime = "1"; + String isOffline = "1"; + String state = "1"; + String consumerPlatformType = Global.getString("message-box", "sysCode"); + // 消息服务中心个人消息查看接口URL + String busiAddress = BusinessPlatformClientUtil.GATE_WAY_URL + "api-conf/notice/list"; + + CloseableHttpClient httpclient = HttpClients.createDefault(); + URIBuilder uriBuilder = new URIBuilder(busiAddress); + List list = new LinkedList(); + list.add(new BasicNameValuePair("access_token", BusinessPlatformClientUtil.getAccessToken())); + list.add(new BasicNameValuePair("page", String.valueOf(page))); + list.add(new BasicNameValuePair("limit", String.valueOf(pageSize))); + list.add(new BasicNameValuePair("noticeObject", consumerPlatformType)); + list.add(new BasicNameValuePair("gtReleaseTime", gtReleaseTime)); + list.add(new BasicNameValuePair("isOffline", isOffline)); + list.add(new BasicNameValuePair("state", state)); + uriBuilder.setParameters(list); + HttpGet get = new HttpGet(uriBuilder.build()); + PageResult result = null; + Class pageResultclass = PageResult.class; + Constructor constructor = pageResultclass.getDeclaredConstructor(new Class[] + { + int.class, int.class, int.class, List.class + }); + constructor.setAccessible(true); + try + { + HttpResponse resultRep = httpclient.execute(get); + int statusCode = resultRep.getStatusLine().getStatusCode(); + if (statusCode == HttpConstants._200_OK_) + { + String resultString = EntityUtils.toString(resultRep.getEntity()); + JSONObject jsonObject = JSONObject.parseObject(resultString); + int total = jsonObject.getIntValue("count"); + JSONArray array = jsonObject.getJSONArray("data"); + List data = array.toJavaList(NoticeModel.class); + + result = (PageResult) constructor.newInstance(new Object[] + { + total, page, pageSize, data + }); + result.addConditionMap(request.getParameterMap()); + request.setAttribute("result", result); + } + else + { + log.error("查询运营平台公告调用接口HTTP错误,错误码[" + statusCode + "]"); + result = (PageResult) constructor.newInstance(new Object[] + { + 0, page, pageSize, null + }); + } + } + catch (Exception e) + { + log.error("查询运营平台公告调用接口HTTP查询异常", e); + result = (PageResult) constructor.newInstance(new Object[] + { + 0, page, pageSize, null + }); + } + + result.addConditionMap(request.getParameterMap()); + request.setAttribute("result", result); + + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/messagebox/ZqmLoginUser.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/messagebox/ZqmLoginUser.java new file mode 100644 index 0000000..6a0a8b4 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/messagebox/ZqmLoginUser.java @@ -0,0 +1,75 @@ +package com.zhiqim.yangcai.design.messagebox; + +import java.util.List; +import org.zhiqim.httpd.HttpWebsocketConnection; + +public class ZqmLoginUser +{ + private String sysCode; + private int userType; + private String userId; + private List connections; + + public ZqmLoginUser(String sysCode, int userType, String userId, List connections) + { + this.sysCode = sysCode; + this.userType = userType; + this.userId = userId; + this.connections = connections; + } + + public void destroyConnection(HttpWebsocketConnection connection) + { + if (connections != null && !connections.isEmpty() && connections.contains(connection)) + { + connection.close(); + connections.remove(connection); + } + } + + public String getSysCode() + { + return sysCode; + } + + public void setSysCode(String sysCode) + { + this.sysCode = sysCode; + } + + public String getUserId() + { + return userId; + } + + public List getConnections() + { + return connections; + } + + public boolean hasConnections() + { + return connections != null && !connections.isEmpty(); + } + + public int getUserType() + { + return userType; + } + + public void setUserType(int userType) + { + this.userType = userType; + } + + public void setUserId(String userId) + { + this.userId = userId; + } + + public void setConnections(List connections) + { + this.connections = connections; + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/messagebox/ZqmMessageBoxMQConsumerFactory.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/messagebox/ZqmMessageBoxMQConsumerFactory.java new file mode 100644 index 0000000..5553b16 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/messagebox/ZqmMessageBoxMQConsumerFactory.java @@ -0,0 +1,34 @@ +package com.zhiqim.yangcai.design.messagebox; + +import java.util.concurrent.ConcurrentHashMap; +import org.zhiqim.kernel.Global; +import com.aliyun.mq.http.MQClient; +import com.aliyun.mq.http.MQConsumer; + +public class ZqmMessageBoxMQConsumerFactory +{ + private static ConcurrentHashMap mqConsumerMap = new ConcurrentHashMap<>(100); + + /** + * 获取MQ消费者 + * + * @param topic + * @return + */ + public static MQConsumer getMQConsumer(String topic) + { + topic = Global.getString("message-box", "sysCode") + "-" + topic; + String mapKey = Global.getString("message-box", "aliyun.instanceId") + "-" + topic + "-" + Global.getString("message-box", "aliyun.groupId"); + MQConsumer consumer = mqConsumerMap.get(mapKey); + if (consumer == null) + { + MQClient mqClient = new MQClient(Global.getString("message-box", "aliyun.namesrvAddr"), Global.getString("message-box", "aliyun.accessKey"), + Global.getString("message-box", "aliyun.secretKey")); + // 获取消费者 + consumer = mqClient.getConsumer(Global.getString("message-box", "aliyun.instanceId"), topic, Global.getString("message-box", "aliyun.groupId"), + null); + mqConsumerMap.put(mapKey, consumer); + } + return consumer; + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/messagebox/ZqmMessageBoxMQProducerFactory.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/messagebox/ZqmMessageBoxMQProducerFactory.java new file mode 100644 index 0000000..e1478a3 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/messagebox/ZqmMessageBoxMQProducerFactory.java @@ -0,0 +1,36 @@ +package com.zhiqim.yangcai.design.messagebox; + +import org.zhiqim.kernel.Global; + +import com.aliyun.mq.http.MQClient; +import com.aliyun.mq.http.MQProducer; + +import java.util.concurrent.ConcurrentHashMap; + +public class ZqmMessageBoxMQProducerFactory +{ + + private static ConcurrentHashMap mqProducerMap = new ConcurrentHashMap<>(100); + + /** + * 获取MQ生产者 + * + * @param topic + * @return + */ + public static MQProducer getMQProducer(String topic) + { + topic = Global.getString("message-box", "sysCode") + "-" + topic; + + MQProducer producer = mqProducerMap.get(topic); + if (producer == null) + { + MQClient mqClient = new MQClient(Global.getString("message-box", "aliyun.namesrvAddr"), Global.getString("message-box", "aliyun.accessKey"), + Global.getString("message-box", "aliyun.secretKey")); + // 获取Topic的生产者 + producer = mqClient.getProducer(Global.getString("message-box", "aliyun.instanceId"), Global.getString("message-box", "sysCode") + "-" + topic); + mqProducerMap.put(topic, producer); + } + return producer; + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/messagebox/ZqmMessageBoxWS.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/messagebox/ZqmMessageBoxWS.java new file mode 100644 index 0000000..96ca215 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/messagebox/ZqmMessageBoxWS.java @@ -0,0 +1,153 @@ +package com.zhiqim.yangcai.design.messagebox; + +import org.apache.http.client.methods.HttpGet; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClients; +import org.apache.http.util.EntityUtils; +import org.zhiqim.httpd.HttpSession; +import org.zhiqim.httpd.HttpSessionUser; +import org.zhiqim.httpd.HttpWebsocket; +import org.zhiqim.httpd.HttpWebsocketConnection; +import org.zhiqim.httpd.HttpWebsocketMessage; +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; + +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.zhiqim.yangcai.util.BusinessPlatformClientUtil; + +@AnAlias("message_box") +public class ZqmMessageBoxWS implements HttpWebsocket +{ + private static final Log log = LogFactory.getLog(ZqmMessageBoxWS.class); + + @Override + public void onOpen(final HttpWebsocketConnection conn) + { + if (!"message_box".equals(conn.getProtocol())) + { + return; + } + HttpSessionUser sessionUser = conn.getSession().getSessionUser(); + if (sessionUser == null) + { + conn.close(); + return; + } + try + { + ZqmMessageUtil.putUserChannel(Global.getString("message-box", "sysCode"), 1, sessionUser.getSessionName(), conn); + } + catch (Exception e1) + { + conn.close(); + log.error("打开消费者失败", e1); + } + + new Thread(new Runnable() + { + @Override + public void run() + { + try + { + Thread.sleep(1000); + CloseableHttpClient httpclient = HttpClients.createDefault(); + ZqmLoginUser loginUser = ZqmMessageUtil.getUserByChannelId(conn); + if (null == loginUser) + { + return; + } + HttpGet get = new HttpGet(BusinessPlatformClientUtil.GATE_WAY_URL + + "api-busi/messageBusi/queryUnReadMessageListWhenLogin?consumerPlatformType=" + loginUser.getSysCode() + "&consumerOperateType=" + + loginUser.getUserType() + "&consumerOperateCode=" + loginUser.getUserId()); + get.setHeader("Authorization", "bearer " + BusinessPlatformClientUtil.getAccessToken()); + org.apache.http.HttpResponse resultRep = httpclient.execute(get); + int statusCode = resultRep.getStatusLine().getStatusCode(); + if (statusCode == 200) + { + JSONArray array = new JSONArray(); + JSONObject obj = JSONObject.parseObject(EntityUtils.toString(resultRep.getEntity())); + // log.info(loginUser.getUserId()+"第一次登陆时查询历史消息Result:"+obj); + array.add(obj); + conn.send(array.toJSONString()); + // log.info(loginUser.getUserId() + "send Success !!"); + } + } + catch (Exception e) + { + // 推送消息失败 + log.error(e.getMessage(), e); + } + } + }).start(); + } + + @Override + public void onClose(HttpWebsocketConnection conn) + { + if (!"message_box".equals(conn.getProtocol())) + { + return; + } + HttpSessionUser sessionUser = conn.getSession().getSessionUser(); + if (sessionUser == null) + { + return; + } + ZqmMessageUtil.removeConnection(conn); + } + + @Override + public void onException(HttpWebsocketConnection conn, Throwable e) + { + if (!"message_box".equals(conn.getProtocol())) + { + return; + } + HttpSessionUser sessionUser = conn.getSession().getSessionUser(); + if (sessionUser == null) + { + return; + } + ZqmMessageUtil.removeConnection(conn); + } + + @Override + public void onMessage(HttpWebsocketConnection conn, String message) + { + if (!"message_box".equals(conn.getProtocol())) + { + return; + } + HttpSession session = conn.getSession(); + HttpSessionUser sessionUser = session.getSessionUser(); + if (sessionUser == null) + { + conn.close(); + return; + } + + conn.send(new HttpWebsocketMessage().buildPong().toBytes()); + } + + @Override + public void onMessage(HttpWebsocketConnection conn, byte[] message) + { + if (!"message_box".equals(conn.getProtocol())) + { + return; + } + HttpSessionUser sessionUser = conn.getSession().getSessionUser(); + if (sessionUser == null) + { + conn.close(); + return; + } + + conn.send(new HttpWebsocketMessage().buildPong().toBytes()); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/messagebox/ZqmMessageProducerHandler.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/messagebox/ZqmMessageProducerHandler.java new file mode 100644 index 0000000..bbb2945 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/messagebox/ZqmMessageProducerHandler.java @@ -0,0 +1,83 @@ +package com.zhiqim.yangcai.design.messagebox; + +import java.net.URLEncoder; +import java.util.Date; +import java.util.HashMap; + +import org.apache.commons.lang3.StringUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.http.HttpResponse; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.entity.ContentType; +import org.apache.http.entity.StringEntity; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClients; +import org.zhiqim.kernel.Global; + +import yangcai.messagebox.model.MessageBusi; +import yangcai.messagebox.model.MessageResult; + +import com.alibaba.fastjson.JSONObject; +import com.zhiqim.yangcai.util.BusinessPlatformClientUtil; + +public class ZqmMessageProducerHandler +{ + + private static final Log log = LogFactory.getLog(ZqmMessageProducerHandler.class); + + public static MessageResult sendMessage(MessageBusi messageBusi, HashMap propertyMap) + { + + try + { + + String sysCode = Global.getString("message-box", "sysCode"); + + // 单条消息准备 + messageBusi.setState(1); + messageBusi.setSendTime(new Date()); + if (StringUtils.isEmpty(messageBusi.getProducerPlatformType())) + { + messageBusi.setProducerPlatformType(sysCode); + } + StringBuffer tagName = new StringBuffer(); + tagName.append(messageBusi.getConsumerPlatformType()); + tagName.append("-"); + tagName.append(messageBusi.getConsumerOperateType()); + tagName.append("-"); + tagName.append(messageBusi.getConsumerOperateCode()); + tagName.append("-tag"); + messageBusi.setTags(URLEncoder.encode(tagName.toString(), "GBK")); + + // 单条消息保存并发送 + HttpPost post = new HttpPost(BusinessPlatformClientUtil.GATE_WAY_URL + "api-busi/messageBusi/save"); + post.setHeader("Authorization", "bearer " + BusinessPlatformClientUtil.getAccessToken()); + CloseableHttpClient httpclient = HttpClients.createDefault(); + StringEntity stringEntity = new StringEntity(JSONObject.toJSONString(messageBusi), ContentType.APPLICATION_JSON); + post.setEntity(stringEntity); + try + { + HttpResponse resultRep = httpclient.execute(post); + int statusCode = resultRep.getStatusLine().getStatusCode(); + if (statusCode == 200) + { + log.info("新增消息成功"); + } + } + catch (Exception e) + { + log.error(e.toString()); + return MessageResult.failed(e.toString()); + } + + return MessageResult.succeed("执行成功"); + } + catch (Exception e) + { + // 其他异常处理 + log.error(e); + return MessageResult.failed(e.toString()); + } + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/messagebox/ZqmMessageUtil.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/messagebox/ZqmMessageUtil.java new file mode 100644 index 0000000..57bcfa4 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/messagebox/ZqmMessageUtil.java @@ -0,0 +1,180 @@ +package com.zhiqim.yangcai.design.messagebox; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.ConcurrentHashMap; + +import org.apache.http.HttpResponse; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClients; +import org.zhiqim.httpd.HttpWebsocketConnection; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; + +import com.zhiqim.yangcai.util.BusinessPlatformClientUtil; + +public final class ZqmMessageUtil +{ + + private static final Log log = LogFactory.getLog(ZqmMessageUtil.class); + + private static final ConcurrentHashMap userMap = new ConcurrentHashMap<>(100); + private static final ConcurrentHashMap connectionMap = new ConcurrentHashMap<>(100); + + /** + * 根据userId获取用户 + * + * @param sysCode + * @param userType + * @param userId + * @return + */ + public static ZqmLoginUser getUserById(String sysCode, String userType, String userId) + { + return userMap.get(sysCode + "-" + userType + "-" + userId); + } + + /** + * 根据tag获取用户 + * + * @param tag + * @return + */ + public static ZqmLoginUser getUserByTag(String tag) + { + if (null != tag && tag.length() > 4) + { + return userMap.get(tag.substring(0, tag.length() - 4)); + } + else + { + return null; + } + } + + /** + * 根据httpWebsocketConnection获取用户 + * + * @param httpWebsocketConnection + * @return + */ + public static ZqmLoginUser getUserByChannelId(HttpWebsocketConnection httpWebsocketConnection) + { + return connectionMap.get(httpWebsocketConnection); + } + + /** + * 根据通道销毁缓存数据 + * + * @param channel + * @return + */ + public static boolean removeConnection(HttpWebsocketConnection connection) + { + ZqmLoginUser user = connectionMap.get(connection); + if (user != null) + { + connectionMap.remove(connection); + user.destroyConnection(connection); + if (!user.hasConnections()) + { + userMap.remove(user.getSysCode() + "-" + user.getUserType() + "-" + user.getUserId()); + } + } + return true; + } + + /** + * 添加用户通道映射 + * + * @param sysCode + * @param userType + * @param userId + * @param connection + * @return + */ + public static boolean putUserChannel(String sysCode, int userType, String userId, HttpWebsocketConnection connection) throws Exception + { + ZqmLoginUser user = userMap.get(sysCode + "-" + userType + "-" + userId); + List connectionList = null; + if (user == null) + { + connectionList = new ArrayList<>(); + }else{ + connectionList = user.getConnections(); + } + + if (!connectionList.contains(connection)) + { + connectionList.add(connection); + user = new ZqmLoginUser(sysCode, userType, userId, connectionList); + userMap.put(sysCode + "-" + userType + "-" + userId, user); + connectionMap.put(connection, user); + } + return true; + } + + public static void readMessages(String ids) + { + if (ids == null || ids.isEmpty()) + { + return; + } + StringBuffer url = new StringBuffer(); + url.append(BusinessPlatformClientUtil.GATE_WAY_URL + "api-busi/messageBusi/readMessages?ids="); + url.append(ids); + CloseableHttpClient httpclient = HttpClients.createDefault(); + HttpPost post = new HttpPost(url.toString()); + post.setHeader("Authorization", "bearer " + BusinessPlatformClientUtil.getAccessToken()); + try + { + HttpResponse resultRep = httpclient.execute(post); + int statusCode = resultRep.getStatusLine().getStatusCode(); + if (statusCode == 200) + { + log.info("已读信息状态成功"); + } + else + { + log.error("已读信息状态失败(非重要)"); + } + } + catch (IOException e) + { + log.error("已读信息状态失败(非重要)"); + } + } + + public static void consumeMessages(String ids) + { + if (ids == null || ids.isEmpty()) + { + return; + } + StringBuffer url = new StringBuffer(); + url.append(BusinessPlatformClientUtil.GATE_WAY_URL + "api-busi/messageBusi/consumeMessage?ids="); + url.append(ids); + CloseableHttpClient httpclient = HttpClients.createDefault(); + HttpPost post = new HttpPost(url.toString()); + post.setHeader("Authorization", "bearer " + BusinessPlatformClientUtil.getAccessToken()); + try + { + HttpResponse resultRep = httpclient.execute(post); + int statusCode = resultRep.getStatusLine().getStatusCode(); + if (statusCode == 200) + { + log.info("更新消息消费状态成功"); + } + else + { + log.error("更新消息消费状态失败(非重要)"); + } + } + catch (IOException e) + { + log.error("更新消息消费状态失败(非重要)"); + } + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/AttaFileModel.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/AttaFileModel.java new file mode 100644 index 0000000..78ce7bb --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/AttaFileModel.java @@ -0,0 +1,143 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.model; + +import org.zhiqim.kernel.json.Jsons; + +/** + * @author longguizhi + * + */ +public class AttaFileModel +{ + private String id; // + private String name = ""; // 中文名称,如:模板文件等 + private String type; // 文件类型,file,button,text,thumFile四种 + private String savePath; // 存储文件夹名 + + private int width = 340; // 默认宽度 + private int height = 160; // 默认高度 + private boolean isAdd = true; + private boolean isDel = true; + private boolean isDownload = true; + + public AttaFileModel(String id, String name, String type) + { + this.id = id; + this.name = name == null ? "" : name; + this.type = type; + } + + public void setSize(int width, int height) + { + this.width = width < 340 ? 340 : width; + this.height = height < 160 ? 160 : height; + } + + public void setOperate(boolean isAdd, boolean isDel, boolean isDownload) + { + this.isAdd = isAdd; + this.isDel = isDel; + this.isDownload = isDownload; + } + + public void setSavePath(String savePath) + { + this.savePath = savePath; + } + + public String getId() + { + return id; + } + + public String getName() + { + return name; + } + + public void setName(String name) + { + this.name = name; + } + + public String getType() + { + return type; + } + + public String getSavePath() + { + return savePath; + } + + public int getWidth() + { + return width; + } + + public int getHeight() + { + return height; + } + + public boolean isAdd() + { + return isAdd; + } + + public boolean isDel() + { + return isDel; + } + + public boolean isDownload() + { + return isDownload; + } + + public void setType(String type) + { + this.type = type; + } + + public void setWidth(int width) + { + this.width = width; + } + + public void setHeight(int height) + { + this.height = height; + } + + public void setAdd(boolean isAdd) + { + this.isAdd = isAdd; + } + + public void setDel(boolean isDel) + { + this.isDel = isDel; + } + + public void setDownload(boolean isDownload) + { + this.isDownload = isDownload; + } + + @Override + public String toString() + { + return Jsons.toString(this); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/CompleteDesignRateStatModel.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/CompleteDesignRateStatModel.java new file mode 100644 index 0000000..73a46c1 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/CompleteDesignRateStatModel.java @@ -0,0 +1,69 @@ +/** + * 扬彩印刷设计 + * 文件名 :DesignCompleteStatModel.java + * 创建人 :gjx + * 创建时间:2020年11月9日 +*/ + +package com.zhiqim.yangcai.design.model; + +/** + * + * [简要描述]: 设计师定稿率
            + * [详细描述]:
            + * + * @version 1.0 @author gjx 2020年11月9日 新建与整理 + */ +public class CompleteDesignRateStatModel +{ + private String designer;// 设计师 + private int orderNum;// 接单量 + private int orderEndNum;// 定稿量 + private double endProportion;// 定稿率 + + public CompleteDesignRateStatModel(String designer) + { + this.designer = designer; + } + + public String getDesigner() + { + return designer; + } + + public void setDesigner(String designer) + { + this.designer = designer; + } + + public int getOrderNum() + { + return orderNum; + } + + public void setOrderNum(int orderNum) + { + this.orderNum = orderNum; + } + + public int getOrderEndNum() + { + return orderEndNum; + } + + public void setOrderEndNum(int orderEndNum) + { + this.orderEndNum = orderEndNum; + } + + public double getEndProportion() + { + return endProportion; + } + + public void setEndProportion(double endProportion) + { + this.endProportion = endProportion; + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/CompleteStatModel.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/CompleteStatModel.java new file mode 100644 index 0000000..c0de199 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/CompleteStatModel.java @@ -0,0 +1,173 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.model; + +import java.util.HashSet; +import java.util.Set; + +public class CompleteStatModel implements Comparable +{ + private String designer; // 设计师 + private Set orderPassSet = new HashSet(); + private String orderPassId; // 3.定稿审核通过编号,多个用逗号隔开 + private String orderBackId; // 4.定稿审核退回编号 + private int orderPassSum; // 5.定稿审核通过总数(次数) + private int orderBackSum; // 6.定稿审核退回总数(次数) + private double passConvertSum; // 7.定稿审核通过折算总数 + private double backConvertSum; // 8.定稿审核退回折算总数 + private long designAmount; // 9.设计绩效金额 + private int orderBackCount; // 10.实际退稿单数 + private int orderPassCount; // 11.实际定稿单数 + private int achieveOrderCount; // 12 结算单数(定稿单数 - 退稿单数(退稿了没有再次定稿的退稿单数)) + private double achieveConvertCount; // 定稿单数折算总数 + + public CompleteStatModel(String designer) + { + this.designer = designer; + } + + public double getAchieveConvertCount() + { + return achieveConvertCount; + } + + public void setAchieveConvertCount(double achieveConvertCount) + { + this.achieveConvertCount = achieveConvertCount; + } + + public String getDesigner() + { + return designer; + } + + public void setDesigner(String designer) + { + this.designer = designer; + } + + public int getOrderPassCount() + { + return orderPassCount; + } + + public void setOrderPassCount(int orderPassCount) + { + this.orderPassCount = orderPassCount; + } + + public String getOrderPassId() + { + return orderPassId; + } + + public void setOrderPassId(String orderPassId) + { + this.orderPassId = orderPassId; + } + + public String getOrderBackId() + { + return orderBackId; + } + + public void setOrderBackId(String orderBackId) + { + this.orderBackId = orderBackId; + } + + public int getOrderPassSum() + { + return orderPassSum; + } + + public void setOrderPassSum(int orderPassSum) + { + this.orderPassSum = orderPassSum; + } + + public int getOrderBackSum() + { + return orderBackSum; + } + + public void setOrderBackSum(int orderBackSum) + { + this.orderBackSum = orderBackSum; + } + + public double getPassConvertSum() + { + return passConvertSum; + } + + public void setPassConvertSum(double passConvertSum) + { + this.passConvertSum = passConvertSum; + } + + public double getBackConvertSum() + { + return backConvertSum; + } + + public void setBackConvertSum(double backConvertSum) + { + this.backConvertSum = backConvertSum; + } + + public long getDesignAmount() + { + return designAmount; + } + + public void setDesignAmount(long designAmount) + { + this.designAmount = designAmount; + } + + public int getOrderBackCount() + { + return orderBackCount; + } + + public void setOrderBackCount(int orderBackCount) + { + this.orderBackCount = orderBackCount; + } + + public int getAchieveOrderCount() + { + return achieveOrderCount; + } + + public void setAchieveOrderCount(int achieveOrderCount) + { + this.achieveOrderCount = achieveOrderCount; + } + + public Set getOrderPassSet() + { + return orderPassSet; + } + + public void setOrderPassSet(Set orderPassSet) + { + this.orderPassSet = orderPassSet; + } + + @Override + public int compareTo(CompleteStatModel o) + {// 乘上10防止double转int时小数位丢失导致排序不对 + return o.getOrderPassCount() - orderPassCount; + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/CustomerTypeCacheModel.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/CustomerTypeCacheModel.java new file mode 100644 index 0000000..681a6b3 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/CustomerTypeCacheModel.java @@ -0,0 +1,41 @@ +/** + * 扬彩印刷设计 + * 文件名 :CustomerTypeCacheModel.java + * 创建人 :gjx + * 创建时间:2019-12-23 + */ + +package com.zhiqim.yangcai.design.model; + +/** + * [简要描述]客户类型缓存Model :
            + * [详细描述]:
            + * + * @version 1.0 @author gjx 2019-12-23 新建与整理 + */ +public class CustomerTypeCacheModel +{ + private int customerTypeId; + private String customerTypeName; + + public int getCustomerTypeId() + { + return customerTypeId; + } + + public void setCustomerTypeId(int customerTypeId) + { + this.customerTypeId = customerTypeId; + } + + public String getCustomerTypeName() + { + return customerTypeName; + } + + public void setCustomerTypeName(String customerTypeName) + { + this.customerTypeName = customerTypeName; + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/DersignerOrgOrderView.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/DersignerOrgOrderView.java new file mode 100644 index 0000000..026d2fe --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/DersignerOrgOrderView.java @@ -0,0 +1,64 @@ +package com.zhiqim.yangcai.design.model; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.orm.annotation.AnView; +import org.zhiqim.orm.annotation.AnViewField; +import org.zhiqim.orm.annotation.AnViewJoin; +import org.zhiqim.orm.annotation.AnViewJoinValue; + +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; + +/** + * 设计师,组织,订单 对应视图《DERSIGNER_ORG_ORDER_VIEW》 + */ +@AnAlias("DersignerOrgOrderView") +@AnNew +@AnView("ZMR_OPERATOR,ZMR_ORG,DESIGN_ORDER") +@AnViewJoin( +{ + @AnViewJoinValue(type = "EQUAL", lTable = "DESIGN_ORDER", lColumn = "DESIGNER", rTable = "ZMR_OPERATOR", rColumn = "OPERATOR_CODE"), + @AnViewJoinValue(type = "EQUAL", lTable = "ZMR_OPERATOR", lColumn = "ORG_ID", rTable = "ZMR_ORG", rColumn = "ORG_ID") +}) +public class DersignerOrgOrderView extends DesignOrder +{ + private static final long serialVersionUID = 1L; + + @AnViewField(table = "ZMR_ORG", column = "ORG_ID") + private long designerOrgId; // //1.设计师组织ID + @AnViewField(table = "ZMR_ORG", column = "ORG_NAME") + private String designerOrgName; // 2.设计师组织名称 + @AnViewField(table = "ZMR_OPERATOR", column = "OPERATOR_NAME") + private String designerName; // 3.设计师名称 + + public long getDesignerOrgId() + { + return designerOrgId; + } + + public void setDesignerOrgId(long designerOrgId) + { + this.designerOrgId = designerOrgId; + } + + public String getDesignerOrgName() + { + return designerOrgName; + } + + public void setDesignerOrgName(String designerOrgName) + { + this.designerOrgName = designerOrgName; + } + + public String getDesignerName() + { + return designerName; + } + + public void setDesignerName(String designerName) + { + this.designerName = designerName; + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/DesOnliceTimeLogModel.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/DesOnliceTimeLogModel.java new file mode 100644 index 0000000..ba4abf7 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/DesOnliceTimeLogModel.java @@ -0,0 +1,73 @@ +/** + * 扬彩印刷设计 + * 文件名 :DesOnliceTimeLogModel.java + * 创建人 :gjx + * 创建时间:2020年9月2日 +*/ + +package com.zhiqim.yangcai.design.model; + +import org.zhiqim.kernel.json.Jsons; + +/** + * + * [简要描述]: 在线时长Model
            + * [详细描述]:
            + * + * @version 1.0 @author gjx 2020年9月2日 新建与整理 + */ +public class DesOnliceTimeLogModel implements Comparable +{ + private String dayCode; + private String designer; + private int onlineTime; + + public DesOnliceTimeLogModel(String dayCode, String designer) + { + this.dayCode = dayCode; + this.designer = designer; + } + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public String getDayCode() + { + return dayCode; + } + + public void setDayCode(String dayCode) + { + this.dayCode = dayCode; + } + + public String getDesigner() + { + return designer; + } + + public void setDesigner(String designer) + { + this.designer = designer; + } + + public int getOnlineTime() + { + return onlineTime; + } + + public void setOnlineTime(int onlineTime) + { + this.onlineTime = onlineTime; + } + + @Override + public int compareTo(DesOnliceTimeLogModel o) + { + return o.getOnlineTime() - onlineTime; + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/DesStatModel.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/DesStatModel.java new file mode 100644 index 0000000..e59161c --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/DesStatModel.java @@ -0,0 +1,57 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.model; + +/** + * 初稿统计DTO + * + * @version v1.0.0 @author Deng 2017-6-16 新建与整理 + */ +public class DesStatModel implements Comparable +{ + private String designName; // 1.设计师名称 + private int draftCount; // 2.初搞订单数 + + public DesStatModel(String designName, int draftCount) + { + this.designName = designName; + this.draftCount = draftCount; + } + + public String getDesignName() + { + return designName; + } + + public void setDesignName(String designName) + { + this.designName = designName; + } + + public int getDraftCount() + { + return draftCount; + } + + public void setDraftCount(int draftCount) + { + this.draftCount = draftCount; + } + + @Override + public int compareTo(DesStatModel o1) + { + + return this.getDraftCount() - o1.getDraftCount(); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/DesWorksFileModel.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/DesWorksFileModel.java new file mode 100644 index 0000000..ffd4c50 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/DesWorksFileModel.java @@ -0,0 +1,352 @@ +package com.zhiqim.yangcai.design.model; + +import java.sql.Timestamp; + +/** + * 用于返回带浏览数的DesWorksFileModel + * + * @author HuangZhiGao + * @date 2020-02-25 8:44 + */ +public class DesWorksFileModel +{ + private long worksId; // 1.作品ID + private long industryId; // 2.行业ID + private long prdTypeId; // 3.产品类型ID + + private long prdPageId; // 4.面数ID + private long prdSizeId; // 5.尺寸ID + private long templateId; // 6.模板ID + + private String industrySubIds; // 7.子行业ID + private String industrySubName; // 8.子行业名称 + private String attributeIds; // 9.属性ID + + private String attributeName; // 10.属性名称 + private long keywordId; // 11.关键词ID + private String keywordName; // 12.关键词名称 + + private String worksName; // 13.作品名称 + private int worksType; // 14.作品类型(0代表普通、1代表精品、2代表待审精品、3代表模板审核、4代表模板) + private String cdrFileName; // 15.CDR源文件名称 + + private String pdfFileName; // 16.PDF源文件名称 + private String cdrPath; // 17.CDR路径 + private String pdfPath; // 18.PDF路径 + + private String designer; // 19.设计师 + private String designGroupId; // 20.包含设计小组ID在内的设计师所属部门 + private String deptId; // 21.分享部门ID + + private String thumbImagePath; // 22.缩略图存储路径,多个用英文逗号分隔(OSS路径) + private String thumbImageOssUrl; // 23.缩略图存储路径,多个用英文逗号分隔(OSS路径)废弃 + private String thumbImagePhyPath; // 24.缩略图存储路径,多个用英文逗号分隔(物理路径) + + private int uploadType; // 25.上传类型(0代表订单作品,1代表手工上传,2代表只有CDR文件,3代表路径有误) + private Timestamp createTime; // 26.创建时间 + private int ossStatus; // 27.0=文件在本地, 1=文件已上传在OSS, 2=本地&oss都不存在 + + private String fileType; // 28.设计文件类型后缀。pdf、cdr、ai + + // 29.作品热度标签(1无、2精品、3推荐、4热门) + // 根据作品类型判断精品,否则根据浏览次数判断:无(<20)、推荐(>=20 <50)和热门(>=50) + private int worksHeatLabel; + + + public DesWorksFileModel() + { + super(); + } + + + public long getWorksId() + { + return worksId; + } + + public void setWorksId(long worksId) + { + this.worksId = worksId; + } + + public long getIndustryId() + { + return industryId; + } + + public void setIndustryId(long industryId) + { + this.industryId = industryId; + } + + public long getPrdTypeId() + { + return prdTypeId; + } + + public void setPrdTypeId(long prdTypeId) + { + this.prdTypeId = prdTypeId; + } + + public long getPrdPageId() + { + return prdPageId; + } + + public void setPrdPageId(long prdPageId) + { + this.prdPageId = prdPageId; + } + + public long getPrdSizeId() + { + return prdSizeId; + } + + public void setPrdSizeId(long prdSizeId) + { + this.prdSizeId = prdSizeId; + } + + public long getTemplateId() + { + return templateId; + } + + public void setTemplateId(long templateId) + { + this.templateId = templateId; + } + + public String getIndustrySubIds() + { + return industrySubIds; + } + + public void setIndustrySubIds(String industrySubIds) + { + this.industrySubIds = industrySubIds; + } + + public String getIndustrySubName() + { + return industrySubName; + } + + public void setIndustrySubName(String industrySubName) + { + this.industrySubName = industrySubName; + } + + public String getAttributeIds() + { + return attributeIds; + } + + public void setAttributeIds(String attributeIds) + { + this.attributeIds = attributeIds; + } + + public String getAttributeName() + { + return attributeName; + } + + public void setAttributeName(String attributeName) + { + this.attributeName = attributeName; + } + + public long getKeywordId() + { + return keywordId; + } + + public void setKeywordId(long keywordId) + { + this.keywordId = keywordId; + } + + public String getKeywordName() + { + return keywordName; + } + + public void setKeywordName(String keywordName) + { + this.keywordName = keywordName; + } + + public String getWorksName() + { + return worksName; + } + + public void setWorksName(String worksName) + { + this.worksName = worksName; + } + + public int getWorksType() + { + return worksType; + } + + public void setWorksType(int worksType) + { + this.worksType = worksType; + } + + public String getCdrFileName() + { + return cdrFileName; + } + + public void setCdrFileName(String cdrFileName) + { + this.cdrFileName = cdrFileName; + } + + public String getPdfFileName() + { + return pdfFileName; + } + + public void setPdfFileName(String pdfFileName) + { + this.pdfFileName = pdfFileName; + } + + public String getCdrPath() + { + return cdrPath; + } + + public void setCdrPath(String cdrPath) + { + this.cdrPath = cdrPath; + } + + public String getPdfPath() + { + return pdfPath; + } + + public void setPdfPath(String pdfPath) + { + this.pdfPath = pdfPath; + } + + public String getDesigner() + { + return designer; + } + + public void setDesigner(String designer) + { + this.designer = designer; + } + + public String getDesignGroupId() + { + return designGroupId; + } + + public void setDesignGroupId(String designGroupId) + { + this.designGroupId = designGroupId; + } + + public String getDeptId() + { + return deptId; + } + + public void setDeptId(String deptId) + { + this.deptId = deptId; + } + + public String getThumbImagePath() + { + return thumbImagePath; + } + + public void setThumbImagePath(String thumbImagePath) + { + this.thumbImagePath = thumbImagePath; + } + + public String getThumbImageOssUrl() + { + return thumbImageOssUrl; + } + + public void setThumbImageOssUrl(String thumbImageOssUrl) + { + this.thumbImageOssUrl = thumbImageOssUrl; + } + + public String getThumbImagePhyPath() + { + return thumbImagePhyPath; + } + + public void setThumbImagePhyPath(String thumbImagePhyPath) + { + this.thumbImagePhyPath = thumbImagePhyPath; + } + + public int getUploadType() + { + return uploadType; + } + + public void setUploadType(int uploadType) + { + this.uploadType = uploadType; + } + + public Timestamp getCreateTime() + { + return createTime; + } + + public void setCreateTime(Timestamp createTime) + { + this.createTime = createTime; + } + + public int getOssStatus() + { + return ossStatus; + } + + public void setOssStatus(int ossStatus) + { + this.ossStatus = ossStatus; + } + + public String getFileType() + { + return fileType; + } + + public void setFileType(String fileType) + { + this.fileType = fileType; + } + + public int getWorksHeatLabel() + { + return worksHeatLabel; + } + + public void setWorksHeatLabel(int worksHeatLabel) + { + this.worksHeatLabel = worksHeatLabel; + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/DesignBackCountModel.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/DesignBackCountModel.java new file mode 100644 index 0000000..6039cd4 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/DesignBackCountModel.java @@ -0,0 +1,131 @@ +/** + * 扬彩印刷设计 + * 文件名 :DesignBackOrderCountModel.java + * 创建人 :高佳新 + * 创建时间:2019-7-3 + */ + +package com.zhiqim.yangcai.design.model; + +import java.sql.Timestamp; + +/** + * + * 定稿统计(日志)定稿退回订单详情model + * + * @version 1.0 @author 高佳新 2019-7-3 新建与整理 + */ +public class DesignBackCountModel +{ + private long designId; // 1.设订单编号,设计平台独立编号 + private String shopNick; // 2.店铺名称 + private String buyerNick; // 3.客户昵称 + private String designer; // 4.设计师 + private String orderText; // 5.订单描述 + private Timestamp designEndTime; // 6.设计师定稿时间 + private Timestamp checkTime; // 7.审核时间(退回时间) + private int backOrderCount; // 8.单个订单退回次数 + private String checkBackReason; // 9.审核退回原因 + private int designCopies; // 10.设计费份数 + + public int getDesignCopies() + { + return designCopies; + } + + public void setDesignCopies(int designCopies) + { + this.designCopies = designCopies; + } + + public long getDesignId() + { + return designId; + } + + public void setDesignId(long designId) + { + this.designId = designId; + } + + public String getShopNick() + { + return shopNick; + } + + public void setShopNick(String shopNick) + { + this.shopNick = shopNick; + } + + public String getBuyerNick() + { + return buyerNick; + } + + public void setBuyerNick(String buyerNick) + { + this.buyerNick = buyerNick; + } + + public String getDesigner() + { + return designer; + } + + public void setDesigner(String designer) + { + this.designer = designer; + } + + public String getOrderText() + { + return orderText; + } + + public void setOrderText(String orderText) + { + this.orderText = orderText; + } + + public Timestamp getDesignEndTime() + { + return designEndTime; + } + + public void setDesignEndTime(Timestamp designEndTime) + { + this.designEndTime = designEndTime; + } + + public Timestamp getCheckTime() + { + return checkTime; + } + + public void setCheckTime(Timestamp checkTime) + { + this.checkTime = checkTime; + } + + public int getBackOrderCount() + { + return backOrderCount; + } + + public void setBackOrderCount(int backOrderCount) + { + this.backOrderCount = backOrderCount; + } + + public String getCheckBackReason() + { + return checkBackReason; + } + + public void setCheckBackReason(String checkBackReason) + { + this.checkBackReason = checkBackReason; + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/DesignGroupStatModel.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/DesignGroupStatModel.java new file mode 100644 index 0000000..172a327 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/DesignGroupStatModel.java @@ -0,0 +1,88 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.model; + +public class DesignGroupStatModel +{ + private long groupId; //设计组ID + private String groupLeader; //组长 + private int memberSize; //成员人数 + private double groupCompleteSum; //设计组总定稿数 + private int groupCompleteAvgCount; //设计组平均定稿数 + private long groupPerformanceAmount; //设计组绩效 + + public DesignGroupStatModel(long groupId) + { + this.groupId = groupId; + } + + public long getGroupId() + { + return groupId; + } + + public void setGroupId(long groupId) + { + this.groupId = groupId; + } + + public String getGroupLeader() + { + return groupLeader; + } + + public void setGroupLeader(String groupLeader) + { + this.groupLeader = groupLeader; + } + + public int getMemberSize() + { + return memberSize; + } + + public void setMemberSize(int memberSize) + { + this.memberSize = memberSize; + } + + public double getGroupCompleteSum() + { + return groupCompleteSum; + } + + public void setGroupCompleteSum(double groupCompleteSum) + { + this.groupCompleteSum = groupCompleteSum; + } + + public int getGroupCompleteAvgCount() + { + return groupCompleteAvgCount; + } + + public void setGroupCompleteAvgCount(int groupCompleteAvgCount) + { + this.groupCompleteAvgCount = groupCompleteAvgCount; + } + + public long getGroupPerformanceAmount() + { + return groupPerformanceAmount; + } + + public void setGroupPerformanceAmount(long groupPerformanceAmount) + { + this.groupPerformanceAmount = groupPerformanceAmount; + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/DesignOrderQuestionsModel.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/DesignOrderQuestionsModel.java new file mode 100644 index 0000000..bec414a --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/DesignOrderQuestionsModel.java @@ -0,0 +1,50 @@ +package com.zhiqim.yangcai.design.model; + +public class DesignOrderQuestionsModel +{ + private String questionsId; + private String designRequirements; + private String updateOperator; + private String modificationTime; + + public String getQuestionsId() + { + return questionsId; + } + + public void setQuestionsId(String questionsId) + { + this.questionsId = questionsId; + } + + public String getDesignRequirements() + { + return designRequirements; + } + + public void setDesignRequirements(String designRequirements) + { + this.designRequirements = designRequirements; + } + + public String getUpdateOperator() + { + return updateOperator; + } + + public void setUpdateOperator(String updateOperator) + { + this.updateOperator = updateOperator; + } + + public String getModificationTime() + { + return modificationTime; + } + + public void setModificationTime(String modificationTime) + { + this.modificationTime = modificationTime; + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/DesignQuickTimeOutModel.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/DesignQuickTimeOutModel.java new file mode 100644 index 0000000..3963eaa --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/DesignQuickTimeOutModel.java @@ -0,0 +1,120 @@ +/** + * 扬彩印刷设计 + * 文件名 :DesignQuickTimeOutModel.java + * 创建人 :高佳新 + * 创建时间:2019-7-10 + */ + +package com.zhiqim.yangcai.design.model; + +import java.sql.Timestamp; + +/** + * + * 快超时订单model + * + * @version 1.0 @author gjx 2019-7-10 新建与整理 + */ +public class DesignQuickTimeOutModel +{ + private long designId; // 1.设订单编号,设计平台独立编号 + private long orgId; // 2.操作员组织编号 + private String orderText; // 3.订单描述 + private long industryId; // 4.所属行业 + private String buyerNick; // 5.客户昵称 + private Timestamp createTime; // 6.创建时间 + private Timestamp designReceiveTime; // 7.设计师领单时间 + private int countDown; // 8倒计时 + private String designer; // 9.设计师 + + public long getDesignId() + { + return designId; + } + + public void setDesignId(long designId) + { + this.designId = designId; + } + + public long getOrgId() + { + return orgId; + } + + public void setOrgId(long orgId) + { + this.orgId = orgId; + } + + public String getOrderText() + { + return orderText; + } + + public void setOrderText(String orderText) + { + this.orderText = orderText; + } + + public long getIndustryId() + { + return industryId; + } + + public void setIndustryId(long industryId) + { + this.industryId = industryId; + } + + public String getBuyerNick() + { + return buyerNick; + } + + public void setBuyerNick(String buyerNick) + { + this.buyerNick = buyerNick; + } + + public Timestamp getCreateTime() + { + return createTime; + } + + public void setCreateTime(Timestamp createTime) + { + this.createTime = createTime; + } + + public Timestamp getDesignReceiveTime() + { + return designReceiveTime; + } + + public void setDesignReceiveTime(Timestamp designReceiveTime) + { + this.designReceiveTime = designReceiveTime; + } + + public int getCountDown() + { + return countDown; + } + + public void setCountDown(int countDown) + { + this.countDown = countDown; + } + + public String getDesigner() + { + return designer; + } + + public void setDesigner(String designer) + { + this.designer = designer; + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/DesignerPerformanceModel.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/DesignerPerformanceModel.java new file mode 100644 index 0000000..f12cb39 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/DesignerPerformanceModel.java @@ -0,0 +1,59 @@ +/** + * 扬彩印刷设计 + * 文件名 :DesignerPerformanceModel.java + * 创建人 :gjx + * 创建时间:2021年3月8日 +*/ + +package com.zhiqim.yangcai.design.model; + +/** + * + * [简要描述]: 设计师绩效model
            + * [详细描述]:
            + * + * @version 1.0 @author gjx 2021年3月8日 新建与整理 + */ +public class DesignerPerformanceModel +{ + private String designer; + private int orderEndCount; + private long designPerformance; + + public DesignerPerformanceModel(String designer) + { + super(); + this.designer = designer; + } + + public String getDesigner() + { + return designer; + } + + public void setDesigner(String designer) + { + this.designer = designer; + } + + public int getOrderEndCount() + { + return orderEndCount; + } + + public void setOrderEndCount(int orderEndCount) + { + this.orderEndCount = orderEndCount; + } + + public long getDesignPerformance() + { + return designPerformance; + } + + public void setDesignPerformance(long designPerformance) + { + this.designPerformance = designPerformance; + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/DispatchStatModel.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/DispatchStatModel.java new file mode 100644 index 0000000..7a5f7e8 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/DispatchStatModel.java @@ -0,0 +1,104 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.model; + +public class DispatchStatModel +{ + private long orgId; // 组织编号 + private String orgName; // 组织名称 + private int orderNum; // 订单数 + private int cardNum; // 名片类单数 + private int onlyCardNum; // 名片单数 + private int colorPageNum; // 彩页类单数 + private int onlyColorPageNum; // 彩页单数 + private int otherNum; // 其他类单数 + + public long getOrgId() + { + return orgId; + } + + public void setOrgId(long orgId) + { + this.orgId = orgId; + } + + public String getOrgName() + { + return orgName; + } + + public void setOrgName(String orgName) + { + this.orgName = orgName; + } + + public int getOrderNum() + { + return orderNum; + } + + public void setOrderNum(int orderNum) + { + this.orderNum = orderNum; + } + + public int getCardNum() + { + return cardNum; + } + + public void setCardNum(int cardNum) + { + this.cardNum = cardNum; + } + + public int getColorPageNum() + { + return colorPageNum; + } + + public void setColorPageNum(int colorPageNum) + { + this.colorPageNum = colorPageNum; + } + + public int getOtherNum() + { + return otherNum; + } + + public void setOtherNum(int otherNum) + { + this.otherNum = otherNum; + } + + public int getOnlyCardNum() + { + return onlyCardNum; + } + + public void setOnlyCardNum(int onlyCardNum) + { + this.onlyCardNum = onlyCardNum; + } + + public int getOnlyColorPageNum() + { + return onlyColorPageNum; + } + + public void setOnlyColorPageNum(int onlyColorPageNum) + { + this.onlyColorPageNum = onlyColorPageNum; + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/ExpressModel.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/ExpressModel.java new file mode 100644 index 0000000..0e323c5 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/ExpressModel.java @@ -0,0 +1,52 @@ +/** + * 扬彩印刷设计 + * 文件名 :ExpressModel.java + * 创建人 :gjx + * 创建时间:2019-11-5 + */ + +package com.zhiqim.yangcai.design.model; + +/** + * [简要描述]:
            + * [详细描述]:
            + * + * @version 1.0 @author gjx 2019-11-5 新建与整理 + */ +public class ExpressModel +{ + private String expressCode; // 1.物流code + private String expressName; // 2.物流名称别名 + private String expressAliasName; // 3.物流名称别名 + + public String getExpressCode() + { + return expressCode; + } + + public void setExpressCode(String expressCode) + { + this.expressCode = expressCode; + } + + public String getExpressName() + { + return expressName; + } + + public void setExpressName(String expressName) + { + this.expressName = expressName; + } + + public String getExpressAliasName() + { + return expressAliasName; + } + + public void setExpressAliasName(String expressAliasName) + { + this.expressAliasName = expressAliasName; + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/FesignerFinishSelfDraftModel.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/FesignerFinishSelfDraftModel.java new file mode 100644 index 0000000..818402b --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/FesignerFinishSelfDraftModel.java @@ -0,0 +1,58 @@ +/** + * 扬彩印刷设计 + * 文件名 :FesignerFinishSelfDraftModel.java + * 创建人 :gjx + * 创建时间:2019-11-11 + */ + +package com.zhiqim.yangcai.design.model; + +/** + * [简要描述] 设计师完成自来稿统计dto :
            + * [详细描述]:
            + * + * @version 1.0 @author gjx 2019-11-11 新建与整理 + */ +public class FesignerFinishSelfDraftModel implements Comparable +{ + private String designer; // 设计师 + private int revisedDraftNum; // 改稿自来稿数量 + private int standardDraftNum; // 标准自来稿数量 + + public String getDesigner() + { + return designer; + } + + public void setDesigner(String designer) + { + this.designer = designer; + } + + public int getRevisedDraftNum() + { + return revisedDraftNum; + } + + public void setRevisedDraftNum(int revisedDraftNum) + { + this.revisedDraftNum = revisedDraftNum; + } + + public int getStandardDraftNum() + { + return standardDraftNum; + } + + public void setStandardDraftNum(int standardDraftNum) + { + this.standardDraftNum = standardDraftNum; + } + + @Override + public int compareTo(FesignerFinishSelfDraftModel o) + { + return o.getStandardDraftNum() - this.standardDraftNum; + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/GoalModel.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/GoalModel.java new file mode 100644 index 0000000..9869d2c --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/GoalModel.java @@ -0,0 +1,112 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.model; + +/** + * 日历Model + * + * @version v1.0.0 @author Deng 2018-3-9 新建与整理 + */ +public class GoalModel +{ + private String goalMonth; + private int goalDate; + private int goalNum; + private boolean isSet; + + private int year; + private int month; + private int day; + + /****************************************************************/ + // 设置属性 + /****************************************************************/ + + public void setGoalMonth(String goalMonth) + { + this.goalMonth = goalMonth; + } + + public void setSet(boolean isSet) + { + this.isSet = isSet; + } + + public void setGoalNum(int goalNum) + { + this.goalNum = goalNum; + } + + public void setIsSet(int goalNum) + { + if (goalNum > 0) + this.isSet = true; + else + this.isSet = false; + } + + public void setGoalDate(int year, int month, int day) + { + this.goalDate = year * 10000 + month * 100 + day; + + this.year = year; + this.month = month; + this.day = day; + } + + public void setGoalDate(int goalDate) + { + this.goalDate = goalDate; + + this.year = goalDate / 10000; + this.month = goalDate / 100 % 100; + this.day = goalDate % 100; + } + + /****************************************************************/ + // 获取属性 + /****************************************************************/ + public String getGoalMonth() + { + return goalMonth; + } + + public int getGoalDate() + { + return goalDate; + } + + public int getGoalNum() + { + return goalNum; + } + + public boolean isSet() + { + return isSet; + } + + public int getYear() + { + return year; + } + + public int getMonth() + { + return month; + } + + public int getDay() + { + return day; + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/HeatKeywordModel.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/HeatKeywordModel.java new file mode 100644 index 0000000..70d3d6d --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/HeatKeywordModel.java @@ -0,0 +1,44 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.model; + +/** + * 热词搜索MODEL + * + * @version v1.0.0 @author Deng 2018-1-8 新建与整理 + */ +public class HeatKeywordModel +{ + private long logId; + private int str; + + public long getLogId() + { + return logId; + } + + public void setLogId(long logId) + { + this.logId = logId; + } + + public int getStr() + { + return str; + } + + public void setStr(int str) + { + this.str = str; + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/HisToryOrderTagLogModel.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/HisToryOrderTagLogModel.java new file mode 100644 index 0000000..8741804 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/HisToryOrderTagLogModel.java @@ -0,0 +1,109 @@ +/** + * 扬彩印刷设计 + * 文件名 :HisToryOrderTagLogModel.java + * 创建人 :gjx + * 创建时间:2019-12-19 + */ + +package com.zhiqim.yangcai.design.model; + +import java.sql.Timestamp; + +/** + * [简要描述]标签日志Model:
            + * [详细描述]:
            + * + * @version 1.0 @author gjx 2019-12-19 新建与整理 + */ +public class HisToryOrderTagLogModel +{ + private String mainIndustryName;// 主行业名称 + private String sonIndustryName;// 子行业名称 + private String appScenarios;// 应用场景 + private String customerType;// 客户类型 + private String designStyle;// 设计风格 + private String operatorCode;// 操作人 + private String unmatchKeyword;// 未匹配关键字 + private Timestamp operatorTime; // 38.操作时间 + + public String getMainIndustryName() + { + return mainIndustryName; + } + + public void setMainIndustryName(String mainIndustryName) + { + this.mainIndustryName = mainIndustryName; + } + + public String getSonIndustryName() + { + return sonIndustryName; + } + + public void setSonIndustryName(String sonIndustryName) + { + this.sonIndustryName = sonIndustryName; + } + + public String getAppScenarios() + { + return appScenarios; + } + + public void setAppScenarios(String appScenarios) + { + this.appScenarios = appScenarios; + } + + public String getCustomerType() + { + return customerType; + } + + public void setCustomerType(String customerType) + { + this.customerType = customerType; + } + + public String getDesignStyle() + { + return designStyle; + } + + public void setDesignStyle(String designStyle) + { + this.designStyle = designStyle; + } + + public String getOperatorCode() + { + return operatorCode; + } + + public void setOperatorCode(String operatorCode) + { + this.operatorCode = operatorCode; + } + + public String getUnmatchKeyword() + { + return unmatchKeyword; + } + + public void setUnmatchKeyword(String unmatchKeyword) + { + this.unmatchKeyword = unmatchKeyword; + } + + public Timestamp getOperatorTime() + { + return operatorTime; + } + + public void setOperatorTime(Timestamp operatorTime) + { + this.operatorTime = operatorTime; + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/HistoryBackDetailsModel.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/HistoryBackDetailsModel.java new file mode 100644 index 0000000..210cefd --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/HistoryBackDetailsModel.java @@ -0,0 +1,119 @@ +/** + * 扬彩印刷设计 + * 文件名 :HistoryBackDetailsModel.java + * 创建人 :gjx + * 创建时间:2019-9-18 + */ + +package com.zhiqim.yangcai.design.model; + +import java.sql.Timestamp; + +/** + * 订单历史审核退回详情Model + * + * @version 1.0 @author gjx 2019-9-18 新建与整理 + */ +public class HistoryBackDetailsModel +{ + private long designId;// 订单号 + private String buyerNick;// 旺旺名 + private Timestamp backTime;// 审核退回时间 + private String backCountDown;// 退回处理倒计时 + private String checkBackReason;// 退回原因 + private Timestamp designEndTime;// 定稿时间 + private String orderText;// 产品文本 + private long amount;// 订单金额 + private boolean isTimeOut;// 是否超时 + + public long getDesignId() + { + return designId; + } + + public void setDesignId(long designId) + { + this.designId = designId; + } + + public String getBuyerNick() + { + return buyerNick; + } + + public void setBuyerNick(String buyerNick) + { + this.buyerNick = buyerNick; + } + + public Timestamp getBackTime() + { + return backTime; + } + + public void setBackTime(Timestamp backTime) + { + this.backTime = backTime; + } + + public String getBackCountDown() + { + return backCountDown; + } + + public void setBackCountDown(String backCountDown) + { + this.backCountDown = backCountDown; + } + + public String getCheckBackReason() + { + return checkBackReason; + } + + public void setCheckBackReason(String checkBackReason) + { + this.checkBackReason = checkBackReason; + } + + public Timestamp getDesignEndTime() + { + return designEndTime; + } + + public void setDesignEndTime(Timestamp designEndTime) + { + this.designEndTime = designEndTime; + } + + public String getOrderText() + { + return orderText; + } + + public void setOrderText(String orderText) + { + this.orderText = orderText; + } + + public long getAmount() + { + return amount; + } + + public void setAmount(long amount) + { + this.amount = amount; + } + + public boolean isTimeOut() + { + return isTimeOut; + } + + public void setTimeOut(boolean isTimeOut) + { + this.isTimeOut = isTimeOut; + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/HotKeywordModel.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/HotKeywordModel.java new file mode 100644 index 0000000..2d42fa1 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/HotKeywordModel.java @@ -0,0 +1,44 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.model; + +/** + * 热词搜索MODEL + * + * @version v1.0.0 @author Deng 2018-1-8 新建与整理 + */ +public class HotKeywordModel +{ + private String keywordName; + private int degree; + + public String getKeywordName() + { + return keywordName; + } + + public void setKeywordName(String keywordName) + { + this.keywordName = keywordName; + } + + public int getDegree() + { + return degree; + } + + public void setDegree(int degree) + { + this.degree = degree; + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/IndustryLabelModel.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/IndustryLabelModel.java new file mode 100644 index 0000000..03f4645 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/IndustryLabelModel.java @@ -0,0 +1,73 @@ +/** + * 扬彩印刷设计 + * 文件名 :IndustryLabelModel.java + * 创建人 :jiangbin + * 创建时间:2019-12-16 + */ +package com.zhiqim.yangcai.design.model; + + +/** + * [简要描述]:行业标签model
            + * [详细描述]:
            + * + * @version 1.0 @author jiangbin 2019-12-16 新建与整理 + */ +public class IndustryLabelModel +{ + private long id;// 标签ID + private long industryId;// 行业ID 注意:这里对应运营平台行业表的CODE + private String dimensionId;// 维度ID + private String labelName;// 标签名称 + private int state;// 状态:0=失效;1=生效 + + public long getId() + { + return id; + } + + public void setId(long id) + { + this.id = id; + } + + public long getIndustryId() + { + return industryId; + } + + public void setIndustryId(long industryId) + { + this.industryId = industryId; + } + + public String getDimensionId() + { + return dimensionId; + } + + public void setDimensionId(String dimensionId) + { + this.dimensionId = dimensionId; + } + + public String getLabelName() + { + return labelName; + } + + public void setLabelName(String labelName) + { + this.labelName = labelName; + } + + public int getState() + { + return state; + } + + public void setState(int state) + { + this.state = state; + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/LabelDimensionModel.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/LabelDimensionModel.java new file mode 100644 index 0000000..ffea673 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/LabelDimensionModel.java @@ -0,0 +1,73 @@ +/** + * 扬彩印刷设计 + * 文件名 :LabelDimensionModel.java + * 创建人 :jiangbin + * 创建时间:2019-12-18 + */ +package com.zhiqim.yangcai.design.model; + +/** + * [简要描述]:标签维度model
            + * [详细描述]:
            + * + * @version 1.0 @author jiangbin 2019-12-18 新建与整理 + */ +public class LabelDimensionModel +{ + private String dimensionId;// 维度ID + private int dimensionSeq;// 序号 + private String remark;// 备注 + private String dimensionName;// 维度名称 + private boolean isEnabled;// 状态false=失效;true=生效 + + public String getDimensionId() + { + return dimensionId; + } + + public void setDimensionId(String dimensionId) + { + this.dimensionId = dimensionId; + } + + public int getDimensionSeq() + { + return dimensionSeq; + } + + public void setDimensionSeq(int dimensionSeq) + { + this.dimensionSeq = dimensionSeq; + } + + public String getRemark() + { + return remark; + } + + public void setRemark(String remark) + { + this.remark = remark; + } + + public String getDimensionName() + { + return dimensionName; + } + + public void setDimensionName(String dimensionName) + { + this.dimensionName = dimensionName; + } + + public boolean isEnabled() + { + return isEnabled; + } + + public void setEnabled(boolean isEnabled) + { + this.isEnabled = isEnabled; + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/LongTailKeywordModel.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/LongTailKeywordModel.java new file mode 100644 index 0000000..ff31bd2 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/LongTailKeywordModel.java @@ -0,0 +1,61 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.model; + +import java.util.ArrayList; +import java.util.List; + + +/** + * 长尾词Model + * + * @version v1.0.0 @author Deng 2018-3-19 新建与整理 + */ +public class LongTailKeywordModel +{ + private String longTailKeyword; + private List mediaList = new ArrayList(); + + public String getLongTailKeyword() + { + return longTailKeyword; + } + + public void setLongTailKeyword(String longTailKeyword) + { + this.longTailKeyword = longTailKeyword; + } + + public List getMediaList() + { + return mediaList; + } + + public void setMediaList(List mediaList) + { + this.mediaList = mediaList; + } + + public boolean hasMediaId(long templateId) + { + if (mediaList == null) + return false; + + for (long mediaId : mediaList) + { + if (mediaId == templateId) + return true; + } + + return false; + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/MediaTemplateViewModel.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/MediaTemplateViewModel.java new file mode 100644 index 0000000..4f0c4be --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/MediaTemplateViewModel.java @@ -0,0 +1,418 @@ +package com.zhiqim.yangcai.design.model; + +/** + * 用于返回带浏览数的MediaTemplateViewModel + * + * @author HuangZhiGao + * @date 2020-02-26 17:54 + */ +public class MediaTemplateViewModel +{ + private long mediaId; // 1.媒体编号 + private int templateType; // 2.模板类型: 0:临时、 10:我的草稿、 20:我的模板、 80:订单模板、 100:系统模板、 110:精品模板 + private int templateStatus; // 3.模板状态,0:未审核,1:审核中,2:已审核 + + private String designer; // 4.设计师 + private long typeId; // 5.类型编号 + private int pageValue; // 6.面数,单面=1,双面=2, 8P=8,12P=12 + + private long industryId; // 7.行业ID + private long attributeId; // 8.属性ID + private String industrySubIds; // 9.子行业ID + + private String industrySubName; // 10.子行业名称 + private String attributeIds; // 11.属性ID + private String attributeName; // 12.属性值名称 + + private String templateGroup; // 13.设计师所属小组 + private String shareDept; // 14.分享部门 + private long designId; // 15.设计订单ID + + private String themeColor; // 16.主色调 + private long keywordId; // 17.关键词ID + private String keywordName; // 18.关键词名称 + + private String keywords; // 19.关键字,多个逗号分隔 + private long templateSrc; // 20.模板来源ID + private int releaseStatus; // 21.发布状态,0:未发布,1:已发布 + + private String releaseTime; // 22.发布时间 + private String fileType; // 23.模板外部稿件后缀格式pdf、cdr、ai,多个分隔符连接 + private String mediaName; // 24.媒体名称 + + private double width; // 25.画布宽度,单位像素 + private double height; // 26.画布高度,单位像素 + private double widthMm; // 27.画布宽度,单位mm + + private double heightMm; // 28.画布高度,单位mm + private int dpi; // 29.分辨率 + private String mediaUrl; // 30.媒体参考图片 + + private String createTime; // 31.创建时间 + private String updateTime; // 32.更新时间 + private int isEdit; // 33.是否支持编辑,0:支持,1:不支持 + + private double bleedSize; // 34.出血尺寸,单位mm + + // 35.模板热度标签(1无、2精品、3推荐、4热门) + // 根据模板类型判断精品,否则根据浏览次数判断:无(<20)、推荐(>=20 <50)和热门(>=50) + private int templateHeatLabel; + + + public MediaTemplateViewModel() + { + super(); + } + + + public long getMediaId() + { + return mediaId; + } + + public void setMediaId(long mediaId) + { + this.mediaId = mediaId; + } + + public int getTemplateType() + { + return templateType; + } + + public void setTemplateType(int templateType) + { + this.templateType = templateType; + } + + public int getTemplateStatus() + { + return templateStatus; + } + + public void setTemplateStatus(int templateStatus) + { + this.templateStatus = templateStatus; + } + + public String getDesigner() + { + return designer; + } + + public void setDesigner(String designer) + { + this.designer = designer; + } + + public long getTypeId() + { + return typeId; + } + + public void setTypeId(long typeId) + { + this.typeId = typeId; + } + + public int getPageValue() + { + return pageValue; + } + + public void setPageValue(int pageValue) + { + this.pageValue = pageValue; + } + + public long getIndustryId() + { + return industryId; + } + + public void setIndustryId(long industryId) + { + this.industryId = industryId; + } + + public long getAttributeId() + { + return attributeId; + } + + public void setAttributeId(long attributeId) + { + this.attributeId = attributeId; + } + + public String getIndustrySubIds() + { + return industrySubIds; + } + + public void setIndustrySubIds(String industrySubIds) + { + this.industrySubIds = industrySubIds; + } + + public String getIndustrySubName() + { + return industrySubName; + } + + public void setIndustrySubName(String industrySubName) + { + this.industrySubName = industrySubName; + } + + public String getAttributeIds() + { + return attributeIds; + } + + public void setAttributeIds(String attributeIds) + { + this.attributeIds = attributeIds; + } + + public String getAttributeName() + { + return attributeName; + } + + public void setAttributeName(String attributeName) + { + this.attributeName = attributeName; + } + + public String getTemplateGroup() + { + return templateGroup; + } + + public void setTemplateGroup(String templateGroup) + { + this.templateGroup = templateGroup; + } + + public String getShareDept() + { + return shareDept; + } + + public void setShareDept(String shareDept) + { + this.shareDept = shareDept; + } + + public long getDesignId() + { + return designId; + } + + public void setDesignId(long designId) + { + this.designId = designId; + } + + public String getThemeColor() + { + return themeColor; + } + + public void setThemeColor(String themeColor) + { + this.themeColor = themeColor; + } + + public long getKeywordId() + { + return keywordId; + } + + public void setKeywordId(long keywordId) + { + this.keywordId = keywordId; + } + + public String getKeywordName() + { + return keywordName; + } + + public void setKeywordName(String keywordName) + { + this.keywordName = keywordName; + } + + public String getKeywords() + { + return keywords; + } + + public void setKeywords(String keywords) + { + this.keywords = keywords; + } + + public long getTemplateSrc() + { + return templateSrc; + } + + public void setTemplateSrc(long templateSrc) + { + this.templateSrc = templateSrc; + } + + public int getReleaseStatus() + { + return releaseStatus; + } + + public void setReleaseStatus(int releaseStatus) + { + this.releaseStatus = releaseStatus; + } + + public String getReleaseTime() + { + return releaseTime; + } + + public void setReleaseTime(String releaseTime) + { + this.releaseTime = releaseTime; + } + + public String getFileType() + { + return fileType; + } + + public void setFileType(String fileType) + { + this.fileType = fileType; + } + + public String getMediaName() + { + return mediaName; + } + + public void setMediaName(String mediaName) + { + this.mediaName = mediaName; + } + + public double getWidth() + { + return width; + } + + public void setWidth(double width) + { + this.width = width; + } + + public double getHeight() + { + return height; + } + + public void setHeight(double height) + { + this.height = height; + } + + public double getWidthMm() + { + return widthMm; + } + + public void setWidthMm(double widthMm) + { + this.widthMm = widthMm; + } + + public double getHeightMm() + { + return heightMm; + } + + public void setHeightMm(double heightMm) + { + this.heightMm = heightMm; + } + + public int getDpi() + { + return dpi; + } + + public void setDpi(int dpi) + { + this.dpi = dpi; + } + + public String getMediaUrl() + { + return mediaUrl; + } + + public void setMediaUrl(String mediaUrl) + { + this.mediaUrl = mediaUrl; + } + + public String getCreateTime() + { + return createTime; + } + + public void setCreateTime(String createTime) + { + this.createTime = createTime; + } + + public String getUpdateTime() + { + return updateTime; + } + + public void setUpdateTime(String updateTime) + { + this.updateTime = updateTime; + } + + public int getIsEdit() + { + return isEdit; + } + + public void setIsEdit(int isEdit) + { + this.isEdit = isEdit; + } + + public double getBleedSize() + { + return bleedSize; + } + + public void setBleedSize(double bleedSize) + { + this.bleedSize = bleedSize; + } + + public int getTemplateHeatLabel() + { + return templateHeatLabel; + } + + public void setTemplateHeatLabel(int templateHeatLabel) + { + this.templateHeatLabel = templateHeatLabel; + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/MessageBusiModel.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/MessageBusiModel.java new file mode 100644 index 0000000..950f02f --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/MessageBusiModel.java @@ -0,0 +1,82 @@ +package com.zhiqim.yangcai.design.model; + +import yangcai.messagebox.model.MessageBusi; + +/** + * 消息Model + * + * @version v1.0.0 @author jiangbin 2020-4-29 新建与整理 + */ +public class MessageBusiModel extends MessageBusi +{ + + private static final long serialVersionUID = 1L; + + private String designerCode;// 设计师code + private String designerName;// 设计师名称 + private long designerOrgId;// 设计师所属组织ID + private String designerOrgName;// 设计师所属组织名称 + private String orderStatus;// 订单状态 + private String orderStatusName;// 订单状态名称 + + public String getOrderStatus() + { + return orderStatus; + } + + public void setOrderStatus(String orderStatus) + { + this.orderStatus = orderStatus; + } + + public String getOrderStatusName() + { + return orderStatusName; + } + + public void setOrderStatusName(String orderStatusName) + { + this.orderStatusName = orderStatusName; + } + + public String getDesignerCode() + { + return designerCode; + } + + public void setDesignerCode(String designerCode) + { + this.designerCode = designerCode; + } + + public String getDesignerName() + { + return designerName; + } + + public void setDesignerName(String designerName) + { + this.designerName = designerName; + } + + public long getDesignerOrgId() + { + return designerOrgId; + } + + public void setDesignerOrgId(long designerOrgId) + { + this.designerOrgId = designerOrgId; + } + + public String getDesignerOrgName() + { + return designerOrgName; + } + + public void setDesignerOrgName(String designerOrgName) + { + this.designerOrgName = designerOrgName; + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/NoticeModel.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/NoticeModel.java new file mode 100644 index 0000000..0bf021a --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/NoticeModel.java @@ -0,0 +1,150 @@ +package com.zhiqim.yangcai.design.model; + +import java.io.Serializable; +import java.sql.Timestamp; + +/** + * 公告表 + * + * @Author jiangbin + * @Email + * @Date 2020-04-07 11:15:06 + */ + +public class NoticeModel implements Serializable +{ + private static final long serialVersionUID = 1L; + private long id; // 公告ID + private String noticeTitle; // 公告标题 + private String noticeObject; // 公告对象(英文逗号分割) + private String noticeContent; // 公告内容 + private Timestamp releaseTime; // 发布时间 + private Timestamp offlineTime; // 下线时间 + private int state; // 状态 + private long addUserId; // 添加人ID + private Timestamp addTime; // 添加时间 + private long updateUserId; // 修改人ID + private Timestamp updateTime; // 修改时间 + private int noOfflineTime; // 1 无下线时间(虚拟字段) + + public long getId() + { + return id; + } + + public void setId(long id) + { + this.id = id; + } + + public String getNoticeTitle() + { + return noticeTitle; + } + + public void setNoticeTitle(String noticeTitle) + { + this.noticeTitle = noticeTitle; + } + + public String getNoticeObject() + { + return noticeObject; + } + + public void setNoticeObject(String noticeObject) + { + this.noticeObject = noticeObject; + } + + public String getNoticeContent() + { + return noticeContent; + } + + public void setNoticeContent(String noticeContent) + { + this.noticeContent = noticeContent; + } + + public Timestamp getReleaseTime() + { + return releaseTime; + } + + public void setReleaseTime(Timestamp releaseTime) + { + this.releaseTime = releaseTime; + } + + public Timestamp getOfflineTime() + { + return offlineTime; + } + + public void setOfflineTime(Timestamp offlineTime) + { + this.offlineTime = offlineTime; + } + + public int getState() + { + return state; + } + + public void setState(int state) + { + this.state = state; + } + + public long getAddUserId() + { + return addUserId; + } + + public void setAddUserId(long addUserId) + { + this.addUserId = addUserId; + } + + public Timestamp getAddTime() + { + return addTime; + } + + public void setAddTime(Timestamp addTime) + { + this.addTime = addTime; + } + + public long getUpdateUserId() + { + return updateUserId; + } + + public void setUpdateUserId(long updateUserId) + { + this.updateUserId = updateUserId; + } + + public Timestamp getUpdateTime() + { + return updateTime; + } + + public void setUpdateTime(Timestamp updateTime) + { + this.updateTime = updateTime; + } + + public int getNoOfflineTime() + { + return noOfflineTime; + } + + public void setNoOfflineTime(int noOfflineTime) + { + this.noOfflineTime = noOfflineTime; + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/OrdOrderStatModel.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/OrdOrderStatModel.java new file mode 100644 index 0000000..6db3d14 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/OrdOrderStatModel.java @@ -0,0 +1,1012 @@ +/** + * 扬彩印刷设计 + * 文件名 :OrdOrderStatModel.java + * 创建人 :gjx + * 创建时间:2019-11-25 + */ + +package com.zhiqim.yangcai.design.model; + +import java.sql.Timestamp; + +/** + * [简要描述]订单统计Model:
            + * [详细描述]:
            + * + * @version 1.0 @author gjx 2019-11-25 新建与整理 + */ +public class OrdOrderStatModel +{ + private long oid; // 1.订单编号 + private String tids; // 2.淘宝单号,多个逗号分隔 + private String status; // 3.订单状态 -1 退回给售中,-2 退回给设计, -100 取消, 0 报价, 1 已提交, 1.1 等待打字 ,1.2 正在打字, 2 + // 等待设计, 3 正在设计, 4 已初稿 , 5 审稿(已定稿/待审) 6 已审核 , 7 已下单 ,8 已生产, 9 已发货 + private String shopNick; // 4.店铺昵称 + private String buyerNick; // 5.客户昵称 + private long prdTypeId; // 6.产品类型,冗余字段,便于查询 + private long productId; // 7.产品id + private String productText; // 8.产品描述,自动组装 + private String policyIds; // 9.后加工策略,多个逗号分隔 + private long amount; // 10.订单总金额 + private long productAmount; // 11.产品费 + private long productConcessionalAmount; // 产品优惠价 + private long designAmount; // 12.设计费 + private long expressAmount; // 13.物流费 + private int draftType; // 14.稿件类型:0标准自来稿、1改稿、2普通设计、3资深设计 + private int invoiceType; // 15.发票类型 + private String invoiceNotes; // 16.发票抬头 + private String invoiceItin; // 17.买家纳税识别号 + private long industryId; // 18.所属行业 + private String thumbnail; // 19.缩略图,多个逗号分隔 + private boolean isOnlyDesign; // 20.是否仅设计 + private boolean isUrgent; // 21.是否加急 + private int printWidth; // 22.印刷宽度,非常规尺寸使用 + private int printHeight; // 23.印刷高度,非常规尺寸使用 + private int printKs; // 24.印刷款数 + private int printMs; // 25.印刷模数 + private String printOrderNum; // 26.印刷第几单 + private String printSpecial; // 27.印刷特殊工艺 + private String creater; // 28.录单员 + private Timestamp createTime; // 29.录单时间 + private Timestamp modifyTime; // 30.修改时间 + private String userText; // 31.客户文本 + private String userNotice; // 32.客户注意事项 + private String userMobile; // 33.用户手机 + private String userQq; // 34.用户QQ + private String userWx; // 35.用户微信 + private String receiverName; // 36.收货人的姓名 + private String receiverMobile; // 37.收货人的手机号码 + private String receiverState; // 38.收货人的所在省份 + private String receiverCity; // 39.收货人的所在城市 + private String receiverDistrict; // 40.收货人的所在区县 + private String receiverAddress; // 41.收货人的详细地址 + private long supplierId; // 42.供应商 + private String supplierOid; // 43.供应商订单号 + private String supplierOidStatus; // 44.供应商订单生产状态 + private Timestamp supplierTime; // 45.工厂下单时间 + private String canceler; // 46.取消人 + private Timestamp cancelTime; // 47.取消时间 + private String cancelNote; // 48.取消原因 + private boolean isSendSelfAddr; // 49.是否已发送自主上传链接 + private int csCount; // 50.售后记录数 + private int orderSrc; // 51.订单来源,0:原订单,1:售后补单,2:售后赠单,3:微商单 + private long orderSrcOid; // 52.来源订单号 + private String expressCode; // 53.物流code + private int ordPost; // 54.订单是否包邮 =1表示不包邮, =1表示包邮 + private boolean isSelfPickup; // 55.是否自提印刷品 + private boolean isSfTopay; // 56.是否顺丰到付 + private boolean isMergeOrder; // 57.是否合单 + private boolean isModifyAddrSend; // 58.是否改地址过地址发货 + private int unpackingNum; // 59.订单拆包数 + private String sendWaitSureNote; // 60.发货待定备注 + private String productCostPriceJson; // 61.产品成本价Json数据 + private String policyCostPriceJsons; // 62.后加工成本价json数据 + private String cancelLation; // 63.作废原因 + private int ordShipHours; // 64.预计耗时(小时),预计耗时 = 产品预计出货时间(小时)+后加工(加工耗时) + private Timestamp ordShipTime; // 65.预计出货时间 + private String userTextReplace; // 66.格式化后的客户文本 + private long consignmentOid; // 67.平台订单 + private int sendRemindType; // 68.发货提醒类型 + private long orgId; // 69.商户组织编号 + private Timestamp orgReceiveTime; // 70.商户接单时间 + private int orderFlag; // 71.订单标记,0:正常订单,1:老用户订单(不计时效),2:老用户订单(计时效) + private int ordDesignPlatformFlag; // 72.设计订单表示 0=表示默认订单, 1=表示需要发送到设计平台,2=已发送到设计平台 + private long designId; // 73.设计平台订单号 + private Timestamp designRetrunTime; // 74.设计平台退回时间 + private int designRetrunCount; // 75.设计平台退回次数 + private String servicesMessage; // 76.客服留言 + private int isOldUser; // 77.是否未老用户 + private int qcFlag; // 78.质检标志,0表示未质检,1表示质检正常,2表示质检违规 + private Timestamp qcTime; // 79.质检时间 + private String serverManageCode; // 80.质检人 + private int isSupplierChange; // 81.是否手工指定过厂家或定时任务修改过 1是 null则不是 + private String transferName; // 82.转让人 + private String transferPassName; // 83.被转让人 + private int transferFlag; // 84.转让标志,1订单转让中,2转让通过,3转让失败 + private Timestamp transferTime; // 85.转让时间 + private String transferDesc; // 86.转让描述 + private int designCopies; // 87.设计费份数 + private int isSynchronized;// 88.是否已同步:是否已经将订单客户信息同步到淘印通,0-未同步,1-已同步 + private int showRedMark; // 89.淘宝申请退款时显示红色感叹号[0-不显示,1-显示] + + public long getOid() + { + return oid; + } + + public void setOid(long oid) + { + this.oid = oid; + } + + public String getTids() + { + return tids; + } + + public void setTids(String tids) + { + this.tids = tids; + } + + public String getStatus() + { + return status; + } + + public void setStatus(String status) + { + this.status = status; + } + + public String getShopNick() + { + return shopNick; + } + + public void setShopNick(String shopNick) + { + this.shopNick = shopNick; + } + + public String getBuyerNick() + { + return buyerNick; + } + + public void setBuyerNick(String buyerNick) + { + this.buyerNick = buyerNick; + } + + public long getPrdTypeId() + { + return prdTypeId; + } + + public void setPrdTypeId(long prdTypeId) + { + this.prdTypeId = prdTypeId; + } + + public long getProductId() + { + return productId; + } + + public void setProductId(long productId) + { + this.productId = productId; + } + + public String getProductText() + { + return productText; + } + + public void setProductText(String productText) + { + this.productText = productText; + } + + public String getPolicyIds() + { + return policyIds; + } + + public void setPolicyIds(String policyIds) + { + this.policyIds = policyIds; + } + + public long getAmount() + { + return amount; + } + + public void setAmount(long amount) + { + this.amount = amount; + } + + public long getProductAmount() + { + return productAmount; + } + + public void setProductAmount(long productAmount) + { + this.productAmount = productAmount; + } + + public long getProductConcessionalAmount() + { + return productConcessionalAmount; + } + + public void setProductConcessionalAmount(long productConcessionalAmount) + { + this.productConcessionalAmount = productConcessionalAmount; + } + + public long getDesignAmount() + { + return designAmount; + } + + public void setDesignAmount(long designAmount) + { + this.designAmount = designAmount; + } + + public long getExpressAmount() + { + return expressAmount; + } + + public void setExpressAmount(long expressAmount) + { + this.expressAmount = expressAmount; + } + + public int getDraftType() + { + return draftType; + } + + public void setDraftType(int draftType) + { + this.draftType = draftType; + } + + public int getInvoiceType() + { + return invoiceType; + } + + public void setInvoiceType(int invoiceType) + { + this.invoiceType = invoiceType; + } + + public String getInvoiceNotes() + { + return invoiceNotes; + } + + public void setInvoiceNotes(String invoiceNotes) + { + this.invoiceNotes = invoiceNotes; + } + + public String getInvoiceItin() + { + return invoiceItin; + } + + public void setInvoiceItin(String invoiceItin) + { + this.invoiceItin = invoiceItin; + } + + public long getIndustryId() + { + return industryId; + } + + public void setIndustryId(long industryId) + { + this.industryId = industryId; + } + + public String getThumbnail() + { + return thumbnail; + } + + public void setThumbnail(String thumbnail) + { + this.thumbnail = thumbnail; + } + + public boolean isOnlyDesign() + { + return isOnlyDesign; + } + + public void setOnlyDesign(boolean isOnlyDesign) + { + this.isOnlyDesign = isOnlyDesign; + } + + public boolean isUrgent() + { + return isUrgent; + } + + public void setUrgent(boolean isUrgent) + { + this.isUrgent = isUrgent; + } + + public int getPrintWidth() + { + return printWidth; + } + + public void setPrintWidth(int printWidth) + { + this.printWidth = printWidth; + } + + public int getPrintHeight() + { + return printHeight; + } + + public void setPrintHeight(int printHeight) + { + this.printHeight = printHeight; + } + + public int getPrintKs() + { + return printKs; + } + + public void setPrintKs(int printKs) + { + this.printKs = printKs; + } + + public int getPrintMs() + { + return printMs; + } + + public void setPrintMs(int printMs) + { + this.printMs = printMs; + } + + public String getPrintOrderNum() + { + return printOrderNum; + } + + public void setPrintOrderNum(String printOrderNum) + { + this.printOrderNum = printOrderNum; + } + + public String getPrintSpecial() + { + return printSpecial; + } + + public void setPrintSpecial(String printSpecial) + { + this.printSpecial = printSpecial; + } + + public String getCreater() + { + return creater; + } + + public void setCreater(String creater) + { + this.creater = creater; + } + + public Timestamp getCreateTime() + { + return createTime; + } + + public void setCreateTime(Timestamp createTime) + { + this.createTime = createTime; + } + + public Timestamp getModifyTime() + { + return modifyTime; + } + + public void setModifyTime(Timestamp modifyTime) + { + this.modifyTime = modifyTime; + } + + public String getUserText() + { + return userText; + } + + public void setUserText(String userText) + { + this.userText = userText; + } + + public String getUserNotice() + { + return userNotice; + } + + public void setUserNotice(String userNotice) + { + this.userNotice = userNotice; + } + + public String getUserMobile() + { + return userMobile; + } + + public void setUserMobile(String userMobile) + { + this.userMobile = userMobile; + } + + public String getUserQq() + { + return userQq; + } + + public void setUserQq(String userQq) + { + this.userQq = userQq; + } + + public String getUserWx() + { + return userWx; + } + + public void setUserWx(String userWx) + { + this.userWx = userWx; + } + + public String getReceiverName() + { + return receiverName; + } + + public void setReceiverName(String receiverName) + { + this.receiverName = receiverName; + } + + public String getReceiverMobile() + { + return receiverMobile; + } + + public void setReceiverMobile(String receiverMobile) + { + this.receiverMobile = receiverMobile; + } + + public String getReceiverState() + { + return receiverState; + } + + public void setReceiverState(String receiverState) + { + this.receiverState = receiverState; + } + + public String getReceiverCity() + { + return receiverCity; + } + + public void setReceiverCity(String receiverCity) + { + this.receiverCity = receiverCity; + } + + public String getReceiverDistrict() + { + return receiverDistrict; + } + + public void setReceiverDistrict(String receiverDistrict) + { + this.receiverDistrict = receiverDistrict; + } + + public String getReceiverAddress() + { + return receiverAddress; + } + + public void setReceiverAddress(String receiverAddress) + { + this.receiverAddress = receiverAddress; + } + + public long getSupplierId() + { + return supplierId; + } + + public void setSupplierId(long supplierId) + { + this.supplierId = supplierId; + } + + public String getSupplierOid() + { + return supplierOid; + } + + public void setSupplierOid(String supplierOid) + { + this.supplierOid = supplierOid; + } + + public String getSupplierOidStatus() + { + return supplierOidStatus; + } + + public void setSupplierOidStatus(String supplierOidStatus) + { + this.supplierOidStatus = supplierOidStatus; + } + + public Timestamp getSupplierTime() + { + return supplierTime; + } + + public void setSupplierTime(Timestamp supplierTime) + { + this.supplierTime = supplierTime; + } + + public String getCanceler() + { + return canceler; + } + + public void setCanceler(String canceler) + { + this.canceler = canceler; + } + + public Timestamp getCancelTime() + { + return cancelTime; + } + + public void setCancelTime(Timestamp cancelTime) + { + this.cancelTime = cancelTime; + } + + public String getCancelNote() + { + return cancelNote; + } + + public void setCancelNote(String cancelNote) + { + this.cancelNote = cancelNote; + } + + public boolean isSendSelfAddr() + { + return isSendSelfAddr; + } + + public void setSendSelfAddr(boolean isSendSelfAddr) + { + this.isSendSelfAddr = isSendSelfAddr; + } + + public int getCsCount() + { + return csCount; + } + + public void setCsCount(int csCount) + { + this.csCount = csCount; + } + + public int getOrderSrc() + { + return orderSrc; + } + + public void setOrderSrc(int orderSrc) + { + this.orderSrc = orderSrc; + } + + public long getOrderSrcOid() + { + return orderSrcOid; + } + + public void setOrderSrcOid(long orderSrcOid) + { + this.orderSrcOid = orderSrcOid; + } + + public String getExpressCode() + { + return expressCode; + } + + public void setExpressCode(String expressCode) + { + this.expressCode = expressCode; + } + + public int getOrdPost() + { + return ordPost; + } + + public void setOrdPost(int ordPost) + { + this.ordPost = ordPost; + } + + public boolean isSelfPickup() + { + return isSelfPickup; + } + + public void setSelfPickup(boolean isSelfPickup) + { + this.isSelfPickup = isSelfPickup; + } + + public boolean isSfTopay() + { + return isSfTopay; + } + + public void setSfTopay(boolean isSfTopay) + { + this.isSfTopay = isSfTopay; + } + + public boolean isMergeOrder() + { + return isMergeOrder; + } + + public void setMergeOrder(boolean isMergeOrder) + { + this.isMergeOrder = isMergeOrder; + } + + public boolean isModifyAddrSend() + { + return isModifyAddrSend; + } + + public void setModifyAddrSend(boolean isModifyAddrSend) + { + this.isModifyAddrSend = isModifyAddrSend; + } + + public int getUnpackingNum() + { + return unpackingNum; + } + + public void setUnpackingNum(int unpackingNum) + { + this.unpackingNum = unpackingNum; + } + + public String getSendWaitSureNote() + { + return sendWaitSureNote; + } + + public void setSendWaitSureNote(String sendWaitSureNote) + { + this.sendWaitSureNote = sendWaitSureNote; + } + + public String getProductCostPriceJson() + { + return productCostPriceJson; + } + + public void setProductCostPriceJson(String productCostPriceJson) + { + this.productCostPriceJson = productCostPriceJson; + } + + public String getPolicyCostPriceJsons() + { + return policyCostPriceJsons; + } + + public void setPolicyCostPriceJsons(String policyCostPriceJsons) + { + this.policyCostPriceJsons = policyCostPriceJsons; + } + + public String getCancelLation() + { + return cancelLation; + } + + public void setCancelLation(String cancelLation) + { + this.cancelLation = cancelLation; + } + + public int getOrdShipHours() + { + return ordShipHours; + } + + public void setOrdShipHours(int ordShipHours) + { + this.ordShipHours = ordShipHours; + } + + public Timestamp getOrdShipTime() + { + return ordShipTime; + } + + public void setOrdShipTime(Timestamp ordShipTime) + { + this.ordShipTime = ordShipTime; + } + + public String getUserTextReplace() + { + return userTextReplace; + } + + public void setUserTextReplace(String userTextReplace) + { + this.userTextReplace = userTextReplace; + } + + public long getConsignmentOid() + { + return consignmentOid; + } + + public void setConsignmentOid(long consignmentOid) + { + this.consignmentOid = consignmentOid; + } + + public int getSendRemindType() + { + return sendRemindType; + } + + public void setSendRemindType(int sendRemindType) + { + this.sendRemindType = sendRemindType; + } + + public long getOrgId() + { + return orgId; + } + + public void setOrgId(long orgId) + { + this.orgId = orgId; + } + + public Timestamp getOrgReceiveTime() + { + return orgReceiveTime; + } + + public void setOrgReceiveTime(Timestamp orgReceiveTime) + { + this.orgReceiveTime = orgReceiveTime; + } + + public int getOrderFlag() + { + return orderFlag; + } + + public void setOrderFlag(int orderFlag) + { + this.orderFlag = orderFlag; + } + + public int getOrdDesignPlatformFlag() + { + return ordDesignPlatformFlag; + } + + public void setOrdDesignPlatformFlag(int ordDesignPlatformFlag) + { + this.ordDesignPlatformFlag = ordDesignPlatformFlag; + } + + public long getDesignId() + { + return designId; + } + + public void setDesignId(long designId) + { + this.designId = designId; + } + + public Timestamp getDesignRetrunTime() + { + return designRetrunTime; + } + + public void setDesignRetrunTime(Timestamp designRetrunTime) + { + this.designRetrunTime = designRetrunTime; + } + + public int getDesignRetrunCount() + { + return designRetrunCount; + } + + public void setDesignRetrunCount(int designRetrunCount) + { + this.designRetrunCount = designRetrunCount; + } + + public String getServicesMessage() + { + return servicesMessage; + } + + public void setServicesMessage(String servicesMessage) + { + this.servicesMessage = servicesMessage; + } + + public int getIsOldUser() + { + return isOldUser; + } + + public void setIsOldUser(int isOldUser) + { + this.isOldUser = isOldUser; + } + + public int getQcFlag() + { + return qcFlag; + } + + public void setQcFlag(int qcFlag) + { + this.qcFlag = qcFlag; + } + + public Timestamp getQcTime() + { + return qcTime; + } + + public void setQcTime(Timestamp qcTime) + { + this.qcTime = qcTime; + } + + public String getServerManageCode() + { + return serverManageCode; + } + + public void setServerManageCode(String serverManageCode) + { + this.serverManageCode = serverManageCode; + } + + public int getIsSupplierChange() + { + return isSupplierChange; + } + + public void setIsSupplierChange(int isSupplierChange) + { + this.isSupplierChange = isSupplierChange; + } + + public String getTransferName() + { + return transferName; + } + + public void setTransferName(String transferName) + { + this.transferName = transferName; + } + + public String getTransferPassName() + { + return transferPassName; + } + + public void setTransferPassName(String transferPassName) + { + this.transferPassName = transferPassName; + } + + public int getTransferFlag() + { + return transferFlag; + } + + public void setTransferFlag(int transferFlag) + { + this.transferFlag = transferFlag; + } + + public Timestamp getTransferTime() + { + return transferTime; + } + + public void setTransferTime(Timestamp transferTime) + { + this.transferTime = transferTime; + } + + public String getTransferDesc() + { + return transferDesc; + } + + public void setTransferDesc(String transferDesc) + { + this.transferDesc = transferDesc; + } + + public int getDesignCopies() + { + return designCopies; + } + + public void setDesignCopies(int designCopies) + { + this.designCopies = designCopies; + } + + public int getIsSynchronized() + { + return isSynchronized; + } + + public void setIsSynchronized(int isSynchronized) + { + this.isSynchronized = isSynchronized; + } + + public int getShowRedMark() + { + return showRedMark; + } + + public void setShowRedMark(int showRedMark) + { + this.showRedMark = showRedMark; + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/OrderBackEffectInfoStatModel.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/OrderBackEffectInfoStatModel.java new file mode 100644 index 0000000..bccf5d9 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/OrderBackEffectInfoStatModel.java @@ -0,0 +1,117 @@ +/** + * 扬彩印刷设计 + * 文件名 :OrderBackEffectInfoStatModel.java + * 创建人 :gjx + * 创建时间:2019-9-19 + */ + +package com.zhiqim.yangcai.design.model; + +/** + * 退回时效统计详细Model + * + * @version 1.0 @author gjx 2019-9-19 新建与整理 + */ +public class OrderBackEffectInfoStatModel +{ + private long designId; // 设订单编号,设计平台独立编号 + private String shopNick; // 店铺名称 + private String buyerNick; // 客户昵称 + private String designer; // 设计师 + private String orderText; // 订单描述 + private long amount; // 订单总金额 + private int backCount;// 退回次数 + private int backOverCount;// 退回超时次数 + private String backTotalTime;// 退回累计用时 + + public long getDesignId() + { + return designId; + } + + public void setDesignId(long designId) + { + this.designId = designId; + } + + public String getShopNick() + { + return shopNick; + } + + public void setShopNick(String shopNick) + { + this.shopNick = shopNick; + } + + public String getBuyerNick() + { + return buyerNick; + } + + public void setBuyerNick(String buyerNick) + { + this.buyerNick = buyerNick; + } + + public String getDesigner() + { + return designer; + } + + public void setDesigner(String designer) + { + this.designer = designer; + } + + public String getOrderText() + { + return orderText; + } + + public void setOrderText(String orderText) + { + this.orderText = orderText; + } + + public long getAmount() + { + return amount; + } + + public void setAmount(long amount) + { + this.amount = amount; + } + + public int getBackCount() + { + return backCount; + } + + public void setBackCount(int backCount) + { + this.backCount = backCount; + } + + public int getBackOverCount() + { + return backOverCount; + } + + public void setBackOverCount(int backOverCount) + { + this.backOverCount = backOverCount; + } + + public String getBackTotalTime() + { + return backTotalTime; + } + + public void setBackTotalTime(String backTotalTime) + { + this.backTotalTime = backTotalTime; + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/OrderBacklog.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/OrderBacklog.java new file mode 100644 index 0000000..a824824 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/OrderBacklog.java @@ -0,0 +1,181 @@ +/** + * 扬彩印刷设计 + * 文件名 :OrderReminder.java + * 创建人 :gjx + * 创建时间:2020年8月13日 +*/ +package com.zhiqim.yangcai.design.model; + +import java.io.Serializable; +import java.sql.Timestamp; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * + * [简要描述]: 订单消息表
            + * [详细描述]:
            + * + * @version 1.0 @author gjx 2020年8月14日 新建与整理 + */ +@AnAlias("OrderBacklog") +@AnNew +@AnTable(table = "ORDER_BACKLOG", key = "ID", type = "InnoDB") +public class OrderBacklog implements Serializable +{ + private static final long serialVersionUID = 1L; + @AnTableField(column = "ID", type = "long", notNull = true) + private long id;// 业务主键 + @AnTableField(column = "DESIGN_ID", type = "long", notNull = true) + private long designId; // 订单号 + @AnTableField(column = "CREATE_TIME", type = "datetime", notNull = true) + private Timestamp createTime;// 创建时间 + @AnTableField(column = "MESSAGE_TYPE", type = "int", notNull = true) + private int messageType;// 消息类型(0:催稿,1:订单审核、排产退回) + @AnTableField(column = "PRODUCTION_CODE", type = "string,64", notNull = true) + private String productionCode;// 跟单操作员 + @AnTableField(column = "PRODUCTION_TIME", type = "datetime", notNull = true) + private Timestamp productionTime;// 生产时间 + @AnTableField(column = "MESSAGE_BODY", type = "string,200", notNull = true) + private String messageBody;// 消息内容 + @AnTableField(column = "CONSUMER_CODE_TYPE", type = "int", notNull = true) + private int consumerCodeType;// 1: 已发送 2:已处理 + @AnTableField(column = "CONSUMER_CODE", type = "string,64", notNull = true) + private String consumerCode;// 处理人 + @AnTableField(column = "CONSUMER_STATE", type = "int", notNull = true) + private int consumerState;// 订单状态 + @AnTableField(column = "CONSUMER_TIME", type = "datetime", notNull = false) + private Timestamp consumerTime;// 处理时间 + @AnTableField(column = "REMARK", type = "string,400", notNull = false) + private String remark;// 备注 + + public String tosString() + { + return Jsons.toString(this); + } + + public long getId() + { + return id; + } + + public void setId(long id) + { + this.id = id; + } + + public long getDesignId() + { + return designId; + } + + public void setDesignId(long designId) + { + this.designId = designId; + } + + public Timestamp getCreateTime() + { + return createTime; + } + + public void setCreateTime(Timestamp createTime) + { + this.createTime = createTime; + } + + public int getMessageType() + { + return messageType; + } + + public void setMessageType(int messageType) + { + this.messageType = messageType; + } + + public String getProductionCode() + { + return productionCode; + } + + public void setProductionCode(String productionCode) + { + this.productionCode = productionCode; + } + + public Timestamp getProductionTime() + { + return productionTime; + } + + public void setProductionTime(Timestamp productionTime) + { + this.productionTime = productionTime; + } + + public String getMessageBody() + { + return messageBody; + } + + public void setMessageBody(String messageBody) + { + this.messageBody = messageBody; + } + + public int getConsumerCodeType() + { + return consumerCodeType; + } + + public void setConsumerCodeType(int consumerCodeType) + { + this.consumerCodeType = consumerCodeType; + } + + public String getConsumerCode() + { + return consumerCode; + } + + public void setConsumerCode(String consumerCode) + { + this.consumerCode = consumerCode; + } + + public int getConsumerState() + { + return consumerState; + } + + public void setConsumerState(int consumerState) + { + this.consumerState = consumerState; + } + + public Timestamp getConsumerTime() + { + return consumerTime; + } + + public void setConsumerTime(Timestamp consumerTime) + { + this.consumerTime = consumerTime; + } + + public String getRemark() + { + return remark; + } + + public void setRemark(String remark) + { + this.remark = remark; + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/OrderCheckModel.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/OrderCheckModel.java new file mode 100644 index 0000000..8c8e548 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/OrderCheckModel.java @@ -0,0 +1,90 @@ +package com.zhiqim.yangcai.design.model; + +import java.sql.Timestamp; + +/** + * 订单审核数据model + * + * @version v1.0.0 @author caohong + */ +public class OrderCheckModel +{ + private String designer; // 设计师 + private int orderCount; // 单数 + private int orderPassCount; // 审核通过单数 + private double passRatio; // 审核通过比例 + private String backReason; // 审核退回原因 + private Timestamp backTime; // 审核退回时间 + private String backReasonPicUrl; // 审核退回原因截图 + + public String getDesigner() + { + return designer; + } + + public void setDesigner(String designer) + { + this.designer = designer; + } + + public int getOrderCount() + { + return orderCount; + } + + public void setOrderCount(int orderCount) + { + this.orderCount = orderCount; + } + + public int getOrderPassCount() + { + return orderPassCount; + } + + public void setOrderPassCount(int orderPassCount) + { + this.orderPassCount = orderPassCount; + } + + public double getPassRatio() + { + return passRatio; + } + + public void setPassRatio(double passRatio) + { + this.passRatio = passRatio; + } + + public String getBackReason() + { + return backReason; + } + + public void setBackReason(String backReason) + { + this.backReason = backReason; + } + + public Timestamp getBackTime() + { + return backTime; + } + + public void setBackTime(Timestamp backTime) + { + this.backTime = backTime; + } + + public String getBackReasonPicUrl() + { + return backReasonPicUrl; + } + + public void setBackReasonPicUrl(String backReasonPicUrl) + { + this.backReasonPicUrl = backReasonPicUrl; + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/OrderInfoModel.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/OrderInfoModel.java new file mode 100644 index 0000000..85474e8 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/OrderInfoModel.java @@ -0,0 +1,33 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.model; + +/** + * 订单信息model类 + * + * @version v1.0.0 @author zhouwenbin 2017-8-29 新建与整理 + */ +public class OrderInfoModel +{ + private OrdOrderStatModel order; + + public OrdOrderStatModel getOrder() + { + return order; + } + + public void setOrder(OrdOrderStatModel order) + { + this.order = order; + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/OrderTypeStatModel.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/OrderTypeStatModel.java new file mode 100644 index 0000000..76d56d8 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/OrderTypeStatModel.java @@ -0,0 +1,209 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.model; + +/** + * 订单类型统计model + * + * @version v1.0.0 @author liuhu 2018-12-13 新建与整理 + */ +public class OrderTypeStatModel implements Comparable +{ + private String designer; //设计师 + private int orderSum; //订单总数量 + private int multiple3_5; //3-5款订单数量 + private int multiple6_8; //6-8款订单数量 + private int multiple9_11; //9-11款订单数量 + private int multiple12; //12款以上数量 + private int normalProcessing; //常规后加工订单数量 + private int specialProcessing;//特殊后加工订单数量 + private int applyOrder; //支援订单数量 + private int amount100_150; //100-150金额订单数量 (左闭右开) + private int amount150_200; //150-200金额订单数量 + private int amount200_250; //200_250金额订单数量 + private int amount250_300; //250_300金额订单数量 + private int amount300_350; //300_350金额订单数量 + private int amount350_400; //350_400金额订单数量 + private int amount400_450; //400_450金额订单数量 + private int amount450_500; //450_500金额订单数量 + private int amount500; //500金额以上订单数量 + private long amount; //绩效金额(单位分) + + public OrderTypeStatModel(String designer) + { + this.designer = designer; + } + + public int getOrderSum() + { + return orderSum; + } + + public void setOrderSum(int orderSum) + { + this.orderSum = orderSum; + } + + public String getDesigner() + { + return designer; + } + public void setDesigner(String designer) + { + this.designer = designer; + } + public int getMultiple3_5() + { + return multiple3_5; + } + public void setMultiple3_5(int multiple3_5) + { + this.multiple3_5 = multiple3_5; + } + public int getMultiple6_8() + { + return multiple6_8; + } + public void setMultiple6_8(int multiple6_8) + { + this.multiple6_8 = multiple6_8; + } + public int getMultiple9_11() + { + return multiple9_11; + } + public void setMultiple9_11(int multiple9_11) + { + this.multiple9_11 = multiple9_11; + } + public int getMultiple12() + { + return multiple12; + } + public void setMultiple12(int multiple12) + { + this.multiple12 = multiple12; + } + public int getNormalProcessing() + { + return normalProcessing; + } + public void setNormalProcessing(int normalProcessing) + { + this.normalProcessing = normalProcessing; + } + public int getSpecialProcessing() + { + return specialProcessing; + } + public void setSpecialProcessing(int specialProcessing) + { + this.specialProcessing = specialProcessing; + } + public int getApplyOrder() + { + return applyOrder; + } + public void setApplyOrder(int applyOrder) + { + this.applyOrder = applyOrder; + } + public int getAmount100_150() + { + return amount100_150; + } + public void setAmount100_150(int amount100_150) + { + this.amount100_150 = amount100_150; + } + public int getAmount150_200() + { + return amount150_200; + } + public void setAmount150_200(int amount150_200) + { + this.amount150_200 = amount150_200; + } + public int getAmount200_250() + { + return amount200_250; + } + public void setAmount200_250(int amount200_250) + { + this.amount200_250 = amount200_250; + } + public int getAmount250_300() + { + return amount250_300; + } + public void setAmount250_300(int amount250_300) + { + this.amount250_300 = amount250_300; + } + public int getAmount300_350() + { + return amount300_350; + } + public void setAmount300_350(int amount300_350) + { + this.amount300_350 = amount300_350; + } + public int getAmount350_400() + { + return amount350_400; + } + public void setAmount350_400(int amount350_400) + { + this.amount350_400 = amount350_400; + } + public int getAmount400_450() + { + return amount400_450; + } + public void setAmount400_450(int amount400_450) + { + this.amount400_450 = amount400_450; + } + public int getAmount450_500() + { + return amount450_500; + } + public void setAmount450_500(int amount450_500) + { + this.amount450_500 = amount450_500; + } + public int getAmount500() + { + return amount500; + } + public void setAmount500(int amount500) + { + this.amount500 = amount500; + } + + public long getAmount() + { + return amount; + } + + public void setAmount(long amount) + { + this.amount = amount; + } + + @Override + public int compareTo(OrderTypeStatModel o) + { + return (int) -(this.getAmount() - o.getAmount()); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/PerformanceStatCalculModel.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/PerformanceStatCalculModel.java new file mode 100644 index 0000000..5c33800 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/PerformanceStatCalculModel.java @@ -0,0 +1,73 @@ +/** + * 扬彩印刷设计 + * 文件名 :PerformanceStatCalculModel.java + * 创建人 :gjx + * 创建时间:2019-9-9 + */ + +package com.zhiqim.yangcai.design.model; + +/** + * 绩效统计计算Model + * + * @version 1.0 @author gjx 2019-9-9 新建与整理 + */ +public class PerformanceStatCalculModel +{ + private double designCompleteSum;// 组单量 + private long refundRate; // 组退款率 + private long refundAmount;// 组退款率奖罚 + private double qcScore; // 组质检分数 + private long qcAmount;// 组质检奖罚 + + public double getDesignCompleteSum() + { + return designCompleteSum; + } + + public void setDesignCompleteSum(double designCompleteSum) + { + this.designCompleteSum = designCompleteSum; + } + + public long getRefundRate() + { + return refundRate; + } + + public void setRefundRate(long refundRate) + { + this.refundRate = refundRate; + } + + public long getRefundAmount() + { + return refundAmount; + } + + public void setRefundAmount(long refundAmount) + { + this.refundAmount = refundAmount; + } + + public double getQcScore() + { + return qcScore; + } + + public void setQcScore(double qcScore) + { + this.qcScore = qcScore; + } + + public long getQcAmount() + { + return qcAmount; + } + + public void setQcAmount(long qcAmount) + { + this.qcAmount = qcAmount; + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/PerformanceStatModel.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/PerformanceStatModel.java new file mode 100644 index 0000000..279229e --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/PerformanceStatModel.java @@ -0,0 +1,52 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.model; + +/** + * 绩效统计DTO + * + * @version v1.0.0 @author liuhu 2019-1-5 新建与整理 + */ +public class PerformanceStatModel implements Comparable +{ + private String designer; //设计师 + private long designAmount; //设计金额 + + public PerformanceStatModel(String designer) + { + this.designer = designer; + } + + public String getDesigner() + { + return designer; + } + public void setDesigner(String designer) + { + this.designer = designer; + } + public long getDesignAmount() + { + return designAmount; + } + public void setDesignAmount(long designAmount) + { + this.designAmount = designAmount; + } + + @Override + public int compareTo(PerformanceStatModel o) + {//根据金额排序 + return -(int)(this.designAmount - o.designAmount); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/PreSaleCommissionStatModel.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/PreSaleCommissionStatModel.java new file mode 100644 index 0000000..720a670 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/PreSaleCommissionStatModel.java @@ -0,0 +1,55 @@ +package com.zhiqim.yangcai.design.model; + +import java.util.HashMap; +import java.util.Map; + +/** + * + * [简要描述]售前提成Model:
            + * [详细描述]:
            + * + * @version 1.0 @author gjx 2019-11-21 新建与整理 + */ +public class PreSaleCommissionStatModel +{ + private String userName; // 1.售前人员 + private long amount; // 2.提成金额 + private Map proMap = new HashMap<>();// 3. 类型 | 金额 + + public PreSaleCommissionStatModel(String userName, long amount) + { + this.userName = userName; + this.amount = amount; + } + + public String getUserName() + { + return userName; + } + + public void setUserName(String userName) + { + this.userName = userName; + } + + public long getAmount() + { + return amount; + } + + public void setAmount(long d) + { + this.amount = d; + } + + public Map getProMap() + { + return proMap; + } + + public void setProMap(Map proMap) + { + this.proMap = proMap; + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/PreSaleOrderStatModel.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/PreSaleOrderStatModel.java new file mode 100644 index 0000000..fd51241 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/PreSaleOrderStatModel.java @@ -0,0 +1,55 @@ +package com.zhiqim.yangcai.design.model; + +import java.util.HashMap; +import java.util.Map; + +/** + * + * [简要描述]售前订单统计Model:
            + * [详细描述]:
            + * + * @version 1.0 @author gjx 2019-11-21 新建与整理 + */ +public class PreSaleOrderStatModel +{ + private String userName; // 1.售前人员 + private int totalNumber; // 2.订单总数 + private Map proMap = new HashMap<>();// <产品类型,数量> + + public PreSaleOrderStatModel(String userName, int totalNumber) + { + this.userName = userName; + this.totalNumber = totalNumber; + } + + public String getUserName() + { + return userName; + } + + public void setUserName(String userName) + { + this.userName = userName; + } + + public int getTotalNumber() + { + return totalNumber; + } + + public void setTotalNumber(int totalNumber) + { + this.totalNumber = totalNumber; + } + + public Map getProMap() + { + return proMap; + } + + public void setProMap(Map proMap) + { + this.proMap = proMap; + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/QcDisposeModel.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/QcDisposeModel.java new file mode 100644 index 0000000..97c578a --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/QcDisposeModel.java @@ -0,0 +1,70 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.model; + +/** + * 质检处理情况model + * + * @version v1.0.0 @author liuhu 2019-1-28 新建与整理 + */ +public class QcDisposeModel implements Comparable +{ + private String operatorCode; //处理人 + private int qcCount; //质检单数 + private int normalCount; //质检正常单数 + private int violationsCount; //质检违规单数; + + public QcDisposeModel(String operatorCode) + { + this.operatorCode = operatorCode; + } + + public String getOperatorCode() + { + return operatorCode; + } + public void setOperatorCode(String operatorCode) + { + this.operatorCode = operatorCode; + } + public int getQcCount() + { + return qcCount; + } + public void setQcCount(int qcCount) + { + this.qcCount = qcCount; + } + public int getNormalCount() + { + return normalCount; + } + public void setNormalCount(int normalCount) + { + this.normalCount = normalCount; + } + public int getViolationsCount() + { + return violationsCount; + } + public void setViolationsCount(int violationsCount) + { + this.violationsCount = violationsCount; + } + + @Override + public int compareTo(QcDisposeModel o) + {//按处理单数倒序 + return -(this.qcCount - o.qcCount); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/QcReasonModel.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/QcReasonModel.java new file mode 100644 index 0000000..c254478 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/QcReasonModel.java @@ -0,0 +1,46 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.model; + +/** + * 质检违规原因DTO + * + * @version v1.0.0 @author liuhu 2019-1-24 新建与整理 + */ +public class QcReasonModel +{ + + private String qcReason; //质检违规原因 + private int count; //质检违规次数 + + public QcReasonModel(String qcReason) + { + this.qcReason = qcReason; + } + public String getQcReason() + { + return qcReason; + } + public void setQcReason(String qcReason) + { + this.qcReason = qcReason; + } + public int getCount() + { + return count; + } + public void setCount(int count) + { + this.count = count; + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/QcStatModel.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/QcStatModel.java new file mode 100644 index 0000000..09d38d2 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/QcStatModel.java @@ -0,0 +1,74 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.model; + +import com.zhiqim.yangcai.design.constant.PerformanceStatConstants; + +/** + * 质检统计model + * + * @version v1.0.0 @author liuhu 2019-1-28 新建与整理 + */ +public class QcStatModel +{ + private String designer; // 设计师 + private double qcScore; // 质检分数 默认12分 + private double punishScore; // 扣罚分数 + private double rewardScore; // 奖励分数 + + public QcStatModel(String designer) + { + this.designer = designer; + this.qcScore = PerformanceStatConstants.QC_SCORE; + } + + public String getDesigner() + { + return designer; + } + + public void setDesigner(String designer) + { + this.designer = designer; + } + + public double getQcScore() + { + return qcScore; + } + + public void setQcScore(double qcScore) + { + this.qcScore = qcScore; + } + + public double getPunishScore() + { + return punishScore; + } + + public void setPunishScore(double punishScore) + { + this.punishScore = punishScore; + } + + public double getRewardScore() + { + return rewardScore; + } + + public void setRewardScore(double rewardScore) + { + this.rewardScore = rewardScore; + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/StatPrdTypeStrModel.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/StatPrdTypeStrModel.java new file mode 100644 index 0000000..56f2448 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/StatPrdTypeStrModel.java @@ -0,0 +1,88 @@ +package com.zhiqim.yangcai.design.model; + +import java.util.HashMap; +import java.util.List; + +import org.zhiqim.kernel.Global; + +import com.zhiqim.yangcai.cache.DesignTypeCache; +import com.zhiqim.yangcai.design.dbo.design.DesignType; + +/** + * 产品类型数量详情MODEL + * + * @version v1.0.0 @author Deng 2017-9-21 新建与整理 + */ +public class StatPrdTypeStrModel +{ + private HashMap typeInfo = new HashMap(); + + public StatPrdTypeStrModel() + { + List typeList = Global.get(DesignTypeCache.class).getListAll(); + for (DesignType t : typeList) + { + this.typeInfo.put(t.getTypeName(), 0); + } + } + + public int getTypeInfo(String typeName) + { + if (this.typeInfo.containsKey(typeName)) + { + return this.typeInfo.get(typeName); + } + + return 0; + } + + public int getTypeInfo(long typeid) + { + DesignType type = Global.get(DesignTypeCache.class).get(typeid); + if (type == null) + { + return 0; + } + + if (this.typeInfo.containsKey(type.getTypeName())) + { + return this.typeInfo.get(type.getTypeName()); + } + + return 0; + } + + public void setTypeInfo(String typeName, int value) + { + + if (this.typeInfo.containsKey(typeName)) + { + this.typeInfo.put(typeName, value); + } + } + + public HashMap getTypeInfo() + { + return typeInfo; + } + + public void setTypeInfo(HashMap typeInfo) + { + this.typeInfo = typeInfo; + } + + public String export() + { + if (typeInfo == null || typeInfo.size() == 0) + { + return ""; + } + String info = ""; + for (String key : typeInfo.keySet()) + { + info += key + ":" + typeInfo.get(key) + " "; + } + + return info; + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/StatSelfdraftDayModel.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/StatSelfdraftDayModel.java new file mode 100644 index 0000000..a36a136 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/StatSelfdraftDayModel.java @@ -0,0 +1,140 @@ +/** + * 扬彩印刷设计 + * 文件名 :StatSelfdraftDayModel.java + * 创建人 :gjx + * 创建时间:2019-11-25 + */ + +package com.zhiqim.yangcai.design.model; + +/** + * [简要描述]自来稿日统计表:
            + * [详细描述]:
            + * + * @version 1.0 @author gjx 2019-11-25 新建与整理 + */ +public class StatSelfdraftDayModel +{ + private String dayCode; // 1.日期 + private String operatorCode; // 2.操作CODE + private int addNum; // 3.初稿新增数 + private int cancelNum; // 4.初稿取消数 + private int historyNum; // 5.历史取消数 + private int recevieNum; // 6.被别人领取数 + private int vaildNum; // 7.有效初稿数(新增数-取消数-历史取消数-被别人领取数) + private String addNumStr; // 8.初稿新增数详情 + private String cancelNumStr; // 9.初稿取消数详情 + private String historyNumStr; // 10.历史取消数详情 + private String recevieNumStr; // 11.被别人领取数详情 + + public String getDayCode() + { + return dayCode; + } + + public void setDayCode(String dayCode) + { + this.dayCode = dayCode; + } + + public String getOperatorCode() + { + return operatorCode; + } + + public void setOperatorCode(String operatorCode) + { + this.operatorCode = operatorCode; + } + + public int getAddNum() + { + return addNum; + } + + public void setAddNum(int addNum) + { + this.addNum = addNum; + } + + public int getCancelNum() + { + return cancelNum; + } + + public void setCancelNum(int cancelNum) + { + this.cancelNum = cancelNum; + } + + public int getHistoryNum() + { + return historyNum; + } + + public void setHistoryNum(int historyNum) + { + this.historyNum = historyNum; + } + + public int getRecevieNum() + { + return recevieNum; + } + + public void setRecevieNum(int recevieNum) + { + this.recevieNum = recevieNum; + } + + public int getVaildNum() + { + return vaildNum; + } + + public void setVaildNum(int vaildNum) + { + this.vaildNum = vaildNum; + } + + public String getAddNumStr() + { + return addNumStr; + } + + public void setAddNumStr(String addNumStr) + { + this.addNumStr = addNumStr; + } + + public String getCancelNumStr() + { + return cancelNumStr; + } + + public void setCancelNumStr(String cancelNumStr) + { + this.cancelNumStr = cancelNumStr; + } + + public String getHistoryNumStr() + { + return historyNumStr; + } + + public void setHistoryNumStr(String historyNumStr) + { + this.historyNumStr = historyNumStr; + } + + public String getRecevieNumStr() + { + return recevieNumStr; + } + + public void setRecevieNumStr(String recevieNumStr) + { + this.recevieNumStr = recevieNumStr; + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/StatSelfraftListingModel.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/StatSelfraftListingModel.java new file mode 100644 index 0000000..0e30dc4 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/StatSelfraftListingModel.java @@ -0,0 +1,84 @@ +package com.zhiqim.yangcai.design.model; + +import org.zhiqim.kernel.json.Jsons; + +/** + * 自来稿日统计清单Model + */ +public class StatSelfraftListingModel +{ + + private String dayCode; // 1.日期 + private String operatorCode; // 2.操作CODE + private long oid; // 3.订单OID + private long prdTypeId; // 4.产品类型ID + private String statType; // 5.统计类型 + private String listingInfo; // 6.清单明细 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public String getDayCode() + { + return dayCode; + } + + public void setDayCode(String dayCode) + { + this.dayCode = dayCode; + } + + public String getOperatorCode() + { + return operatorCode; + } + + public void setOperatorCode(String operatorCode) + { + this.operatorCode = operatorCode; + } + + public long getOid() + { + return oid; + } + + public void setOid(long oid) + { + this.oid = oid; + } + + public long getPrdTypeId() + { + return prdTypeId; + } + + public void setPrdTypeId(long prdTypeId) + { + this.prdTypeId = prdTypeId; + } + + public String getStatType() + { + return statType; + } + + public void setStatType(String statType) + { + this.statType = statType; + } + + public String getListingInfo() + { + return listingInfo; + } + + public void setListingInfo(String listingInfo) + { + this.listingInfo = listingInfo; + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/SubscribeDesignerQuotaRecordModel.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/SubscribeDesignerQuotaRecordModel.java new file mode 100644 index 0000000..8aad089 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/SubscribeDesignerQuotaRecordModel.java @@ -0,0 +1,132 @@ +/* + * 版权所有 (C) 2015 知启蒙(ZHIQIM) 保留所有权利。 + * + * 指定登记&发行网站: https://www.zhiqim.com/ 欢迎加盟知启蒙,[编程有你,知启蒙一路随行]。 + * + * 本文采用《知启蒙许可证》,除非符合许可证,否则不可使用该文件! + * 1、您可以免费使用、修改、合并、出版发行和分发,再授权软件、软件副本及衍生软件; + * 2、您用于商业用途时,必须在原作者指定的登记网站,按原作者要求进行登记; + * 3、您在使用、修改、合并、出版发行和分发时,必须包含版权声明、许可声明,及保留原作者的著作权、商标和专利等知识产权; + * 4、您在互联网、移动互联网等大众网络下发行和分发再授权软件、软件副本及衍生软件时,必须在原作者指定的发行网站进行发行和分发; + * 5、您可以在以下链接获取一个完整的许可证副本。 + * + * 许可证链接:http://zhiqim.org/licenses/zhiqim_register_publish_license.htm + * + * 除非法律需要或书面同意,软件由原始码方式提供,无任何明示或暗示的保证和条件。详见完整许可证的权限和限制。 + */ +package com.zhiqim.yangcai.design.model; + +import com.zhiqim.yangcai.design.dbo.subscribe.SubscribeDesignerQuotaRecord; +import com.zhiqim.yangcai.design.dbo.utils.LunarCalendarUtil; + +public class SubscribeDesignerQuotaRecordModel extends SubscribeDesignerQuotaRecord +{ + private static final long serialVersionUID = 1L; + private String dutyMonth; + private int dutyTime; + private int subscribeState; + private int year; + private int month; + private int day; + private String LunarDay; + private int canSubscribe; + + public void setDutyMonth(String dutyMonth) + { + this.dutyMonth = dutyMonth; + } + + public String getDutyMonth() + { + return this.dutyMonth; + } + + public void setDutyTime(int year, int month, int day) + { + this.dutyTime = (year * 10000 + month * 100 + day); + + this.year = year; + this.month = month; + this.day = day; + LunarCalendarUtil lunarCalendarUtil = new LunarCalendarUtil(); + this.LunarDay = lunarCalendarUtil.getLunarDate(year, month, day, true); + } + + @Override + public void setDutyTime(int dutyTime) + { + this.dutyTime = dutyTime; + + this.year = (dutyTime / 10000); + this.month = (dutyTime / 100 % 100); + this.day = (dutyTime % 100); + } + + @Override + public int getDutyTime() + { + return this.dutyTime; + } + + @Override + public void setSubscribeState(int subscribeState) + { + this.subscribeState = subscribeState; + } + + @Override + public int getSubscribeState() + { + return this.subscribeState; + } + + public int getYear() + { + return this.year; + } + + public int getMonth() + { + return this.month; + } + + public int getDay() + { + return this.day; + } + + public String getLunarDay() + { + return LunarDay; + } + + public void setLunarDay(String lunarDay) + { + LunarDay = lunarDay; + } + + public void setYear(int year) + { + this.year = year; + } + + public void setMonth(int month) + { + this.month = month; + } + + public void setDay(int day) + { + this.day = day; + } + + public int getCanSubscribe() + { + return this.canSubscribe; + } + + public void setCanSubscribe(int canSubscribe) + { + this.canSubscribe = canSubscribe; + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/SvgDataModel.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/SvgDataModel.java new file mode 100644 index 0000000..b0716ed --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/SvgDataModel.java @@ -0,0 +1,109 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.model; + +import java.util.ArrayList; +import java.util.List; + +import com.zhiqim.media.service.model.MediaModel; +import com.zhiqim.yangcai.design.dbo.template.MediaTemplate; + +/** + * SVG缓存model类 + * @version v1.0.0 @author zhouwenbin 2017-11-17 新建与整理 + */ +public class SvgDataModel +{ + private long oldMediaId; + private String oldMeidaUrl; + private int width; + private int height; + private List svgList = new ArrayList<>(); + private MediaModel media; + private MediaTemplate template; + + public SvgDataModel(int width, int height) + { + this.width = width; + this.height = height; + } + + public long getOldMediaId() + { + return oldMediaId; + } + + public void setOldMediaId(long oldMediaId) + { + this.oldMediaId = oldMediaId; + } + + public String getOldMeidaUrl() + { + return oldMeidaUrl; + } + + public void setOldMeidaUrl(String oldMeidaUrl) + { + this.oldMeidaUrl = oldMeidaUrl; + } + + public int getWidth() + { + return width; + } + + public void setWidth(int width) + { + this.width = width; + } + + public int getHeight() + { + return height; + } + + public void setHeight(int height) + { + this.height = height; + } + + public List getSvgList() + { + return svgList; + } + + public void setSvgList(List svgList) + { + this.svgList = svgList; + } + + public MediaModel getMedia() + { + return media; + } + + public void setMedia(MediaModel media) + { + this.media = media; + } + + public MediaTemplate getTemplate() + { + return template; + } + + public void setTemplate(MediaTemplate template) + { + this.template = template; + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/TemplateDataModel.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/TemplateDataModel.java new file mode 100644 index 0000000..a13a05a --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/TemplateDataModel.java @@ -0,0 +1,39 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.model; + +/** + * 缓存模板Model + * + * @version v1.0.0 @author Deng 2017-12-27 新建与整理 + */ +public class TemplateDataModel +{ + private long mediaId; + private String meidaUrl; + + public TemplateDataModel(long mediaId, String meidaUrl) + { + this.mediaId = mediaId; + this.meidaUrl = meidaUrl; + } + + public long getMediaId() + { + return mediaId; + } + + public String getMeidaUrl() + { + return meidaUrl; + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/TimelinessOrgStatModel.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/TimelinessOrgStatModel.java new file mode 100644 index 0000000..3b4566f --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/TimelinessOrgStatModel.java @@ -0,0 +1,124 @@ +/** + * 扬彩印刷设计 + * 文件名 :TimelinessOrgStatModel.java + * 创建人 :高佳新 + * 创建时间:2019-7-11 + */ + +package com.zhiqim.yangcai.design.model; + +/** + * + * 组织时效统计Model + * + * @version 1.0 @author gjx 2019-7-11 新建与整理 + */ +public class TimelinessOrgStatModel +{ + private String orgName; // 组织名称 + private int orgOrderSum; // 组织总单量 + private int orgFirstDraftSum; // 组织已初稿量 + private int orgTimelinessSum; // 组织时效内初稿量 + private int orgExceedTimelinessSum; // 组织已超时初稿量 + private int orgSleepDraftSum; // 组织等待初稿量 + private int orgSleepTimelinessSum; // 组织等待初稿时效内订单 + private int orgExceedSleepTimelinessSum; // 组织等待初稿已超时订单 + private double orgExceedPrent; // 超时百分比 + + public TimelinessOrgStatModel(String orgName) + { + super(); + this.orgName = orgName; + } + + public String getOrgName() + { + return orgName; + } + + public void setOrgName(String orgName) + { + this.orgName = orgName; + } + + public int getOrgOrderSum() + { + return orgOrderSum; + } + + public void setOrgOrderSum(int orgOrderSum) + { + this.orgOrderSum = orgOrderSum; + } + + public int getOrgFirstDraftSum() + { + return orgFirstDraftSum; + } + + public void setOrgFirstDraftSum(int orgFirstDraftSum) + { + this.orgFirstDraftSum = orgFirstDraftSum; + } + + public int getOrgTimelinessSum() + { + return orgTimelinessSum; + } + + public void setOrgTimelinessSum(int orgTimelinessSum) + { + this.orgTimelinessSum = orgTimelinessSum; + } + + public int getOrgExceedTimelinessSum() + { + return orgExceedTimelinessSum; + } + + public void setOrgExceedTimelinessSum(int orgExceedTimelinessSum) + { + this.orgExceedTimelinessSum = orgExceedTimelinessSum; + } + + public int getOrgSleepDraftSum() + { + return orgSleepDraftSum; + } + + public void setOrgSleepDraftSum(int orgSleepDraftSum) + { + this.orgSleepDraftSum = orgSleepDraftSum; + } + + public int getOrgSleepTimelinessSum() + { + return orgSleepTimelinessSum; + } + + public void setOrgSleepTimelinessSum(int orgSleepTimelinessSum) + { + this.orgSleepTimelinessSum = orgSleepTimelinessSum; + } + + public int getOrgExceedSleepTimelinessSum() + { + return orgExceedSleepTimelinessSum; + } + + public void setOrgExceedSleepTimelinessSum(int orgExceedSleepTimelinessSum) + { + this.orgExceedSleepTimelinessSum = orgExceedSleepTimelinessSum; + } + + public double getOrgExceedPrent() + { + return orgExceedPrent; + } + + public void setOrgExceedPrent(double orgExceedPrent) + { + this.orgExceedPrent = orgExceedPrent; + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/TimelinessStatModel.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/TimelinessStatModel.java new file mode 100644 index 0000000..f3e8011 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/TimelinessStatModel.java @@ -0,0 +1,50 @@ +/** + * 扬彩印刷设计 + * 文件名 :TimelinessStatModel.java + * 创建人 :jiangbin + * 创建时间:2020-5-13 + */ +package com.zhiqim.yangcai.design.model; + +/** + * + * 定稿未超时统计Model + * + * @version 1.0 @author jiangbin 2020-5-13 新建与整理 + */ +public class TimelinessStatModel +{ + private String designer; // 设计师名称 + private int designOrderSum; // 订单数 + private long rewardAmountSum; // 奖励金额总数 + + public String getDesigner() + { + return designer; + } + + public void setDesigner(String designer) + { + this.designer = designer; + } + + public int getDesignOrderSum() + { + return designOrderSum; + } + + public void setDesignOrderSum(int designOrderSum) + { + this.designOrderSum = designOrderSum; + } + + public long getRewardAmountSum() + { + return rewardAmountSum; + } + + public void setRewardAmountSum(long rewardAmountSum) + { + this.rewardAmountSum = rewardAmountSum; + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/TrainDataModel.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/TrainDataModel.java new file mode 100644 index 0000000..3c67748 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/TrainDataModel.java @@ -0,0 +1,64 @@ +/** + * 扬彩印刷设计 + * 文件名 :TrainDataModel.java + * 创建人 :gjx + * 创建时间:2021年3月1日 +*/ + +package com.zhiqim.yangcai.design.model; + +/** + * + * [简要描述] 培训资料:
            + * [详细描述]:
            + * + * @version 1.0 @author gjx 2021年3月1日 新建与整理 + */ +public class TrainDataModel +{ + private String fileName; + private String fileUrl; + private String fileSize; + private String modifyTime; + + public String getFileName() + { + return fileName; + } + + public void setFileName(String fileName) + { + this.fileName = fileName; + } + + public String getFileUrl() + { + return fileUrl; + } + + public void setFileUrl(String fileUrl) + { + this.fileUrl = fileUrl; + } + + public String getFileSize() + { + return fileSize; + } + + public void setFileSize(String fileSize) + { + this.fileSize = fileSize; + } + + public String getModifyTime() + { + return modifyTime; + } + + public void setModifyTime(String modifyTime) + { + this.modifyTime = modifyTime; + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/VirtualQuestionsOrder.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/VirtualQuestionsOrder.java new file mode 100644 index 0000000..089d455 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/VirtualQuestionsOrder.java @@ -0,0 +1,50 @@ +package com.zhiqim.yangcai.design.model; + +public class VirtualQuestionsOrder +{ + private String questionsId; + private String designRequirements; + private String fileName; + private String url; + + public String getQuestionsId() + { + return questionsId; + } + + public void setQuestionsId(String questionsId) + { + this.questionsId = questionsId; + } + + public String getDesignRequirements() + { + return designRequirements; + } + + public void setDesignRequirements(String designRequirements) + { + this.designRequirements = designRequirements; + } + + public String getFileName() + { + return fileName; + } + + public void setFileName(String fileName) + { + this.fileName = fileName; + } + + public String getUrl() + { + return url; + } + + public void setUrl(String url) + { + this.url = url; + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/teamManagement.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/teamManagement.java new file mode 100644 index 0000000..42fc99e --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/model/teamManagement.java @@ -0,0 +1,123 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.model; + +import java.io.Serializable; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnNew; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.orm.annotation.AnTable; +import org.zhiqim.orm.annotation.AnTableField; + +/** + * 责任类型 对应表《TEAM_MANAGEMENT》 + */ +@AnAlias("Team_Management") +@AnNew +@AnTable(table = "TEAM_MANAGEMENT", key = "TEAM_ID", type = "InnoDB") +public class teamManagement implements Serializable +{ + private static final long serialVersionUID = 1L; + + @AnTableField(column = "TEAM_ID", type = "long", notNull = true) + private long teamId; // 1.团队编号 + @AnTableField(column = "MERCHANT_NAME", type = "string,200", notNull = true) + private String merchantName; // 2.商户名 + @AnTableField(column = "TEAM_SECRET", type = "string,2048", notNull = true) + private String teamSecret; // 3.设计师 + @AnTableField(column = "IS_ENABLED", type = "boolean", notNull = true) + private boolean isEnabled; // 4.商户状态 =true 表示 正常 =false 停用 + @AnTableField(column = "TEAM_NAME", type = "string,20", notNull = true) + private String teamName; // 2.商户名 + @AnTableField(column = "DEPT_TEAM", type = "string,200", notNull = true) + private String deptTeam; // 2.团队主管 + @AnTableField(column = "DEPT_ORG", type = "string,200", notNull = true) + private String deptOrg; // 2.组织 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public long getTeamId() + { + return teamId; + } + + public void setTeamId(long teamId) + { + this.teamId = teamId; + } + + public String getMerchantName() + { + return merchantName; + } + + public void setMerchantName(String merchantName) + { + this.merchantName = merchantName; + } + + public String getTeamSecret() + { + return teamSecret; + } + + public void setTeamSecret(String teamSecret) + { + this.teamSecret = teamSecret; + } + + public boolean isEnabled() + { + return isEnabled; + } + + public String getDeptTeam() + { + return deptTeam; + } + + public void setDeptTeam(String deptTeam) + { + this.deptTeam = deptTeam; + } + + public void setEnabled(boolean isEnabled) + { + this.isEnabled = isEnabled; + } + + public String getTeamName() + { + return teamName; + } + + public void setTeamName(String teamName) + { + this.teamName = teamName; + } + + public String getDeptOrg() + { + return deptOrg; + } + + public void setDeptOrg(String deptOrg) + { + this.deptOrg = deptOrg; + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/BasePresenter.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/BasePresenter.java new file mode 100644 index 0000000..aa050cf --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/BasePresenter.java @@ -0,0 +1,154 @@ +/** + * 扬彩印刷设计 + * 文件名 :BasePresenter.java + * 创建人 :gjx + * 创建时间:2020年11月14日 +*/ + +package com.zhiqim.yangcai.design.presenter; + +import java.util.ArrayList; +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.annotation.AnIntercept; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.httpclient.HttpGet; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.kernel.util.Urls; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.manager.dao.ZmrParamDao; +import org.zhiqim.manager.dbo.ZmrParam; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; + +/** + * + * [简要描述]: 系统参数基础Presenter
            + * [详细描述]:
            + * + * @version 1.0 @author gjx 2020年11月14日 新建与整理 + */ + +@AnAlias("BasePresenter") +@AnIntercept("chkZmrLogin") +public class BasePresenter +{ + /** + * + * [简要描述]: 更新业务参数值
            + * [详细描述]:
            + * + * @author gjx + * @param request + * @throws Exception + */ + public static void doUpdateBusinessParamValue(HttpRequest request) throws Exception + { + String paramGroup = request.getParameter("paramGroup"); + String paramKey = request.getParameter("paramKey"); + String paramValue = request.getParameterNoFilter("paramValue"); + + ZmrParam param = ZmrParamDao.getParam(request.getContext(), paramGroup, paramKey); + if (param == null) + { + request.setResponseError("您选择的参数不存在,请选择有效的参数进行修改"); + return; + } + + if (Validates.isEqual(param.getParamValue(), paramValue)) + { + return; + } + + ZmrParamDao.doUpdate(request.getContext(), paramGroup, paramKey, paramValue); + } + + /** + * + * [简要描述]: 查询erp产品尺寸信息
            + * [详细描述]:
            + * + * @author gjx + * @param request + * @throws Exception + */ + public static void doQueryPrdSizeByTypeId(HttpRequest request) throws Exception + { + String prdTypeId = request.getParameter("prdTypeId"); + + Selector select = new Selector(); + select.addMust("paramGroup", "yangcai.erp"); + select.addMust("paramKey", "productSize"); + try + { + ZmrParam zparam = ORM.get(ZTable.class).item(ZmrParam.class, select); + HttpGet get = new HttpGet(Urls.add(zparam.getParamValue(), "prdTypeId", prdTypeId)); + get.setConnectTimeout(2); + get.setReadTimeout(3); + get.execute(); + if (get.isResponseSuccess()) + { + String respText = get.getResponseText(); + + List prdSizeNameList = new ArrayList(); + JSONArray respArray = JSON.parseArray(Jsons.getString(respText, "data")); + for (int i = 0; i < respArray.size(); i++) + { + prdSizeNameList.add(respArray.getJSONObject(i).getString("prdSizeStd")); + } + + request.setResponseResult(Jsons.toString(prdSizeNameList)); + } + } + catch (Exception e) + { + } + } + + /** + * + * [简要描述]: 查询erp产品面数信息
            + * [详细描述]:
            + * + * @author gjx + * @param request + * @throws Exception + */ + public static void doQueryPrdPageByTypeId(HttpRequest request) throws Exception + { + String prdTypeId = request.getParameter("prdTypeId"); + + Selector select = new Selector(); + select.addMust("paramGroup", "yangcai.erp"); + select.addMust("paramKey", "productPage"); + try + { + ZmrParam zparam = ORM.get(ZTable.class).item(ZmrParam.class, select); + HttpGet get = new HttpGet(Urls.add(zparam.getParamValue(), "prdTypeId", prdTypeId)); + get.setConnectTimeout(2); + get.setReadTimeout(3); + get.execute(); + if (get.isResponseSuccess()) + { + String respText = get.getResponseText(); + + List prdSizeNameList = new ArrayList(); + JSONArray respArray = JSON.parseArray(Jsons.getString(respText, "data")); + for (int i = 0; i < respArray.size(); i++) + { + prdSizeNameList.add(respArray.getJSONObject(i).getString("prdPageName")); + } + + request.setResponseResult(Jsons.toString(prdSizeNameList)); + } + } + catch (Exception e) + { + } + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/ComplainDealPresenter.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/ComplainDealPresenter.java new file mode 100644 index 0000000..12ee6e9 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/ComplainDealPresenter.java @@ -0,0 +1,88 @@ +/** + * 扬彩印刷设计 + * 文件名 :ComplainDealPresenter.java + * 创建人 :gjx + * 创建时间:2019-8-15 + */ + +package com.zhiqim.yangcai.design.presenter; + +import java.io.File; + +import javax.imageio.stream.FileImageOutputStream; +import javax.imageio.stream.ImageOutputStream; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.annotation.AnIntercept; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Files; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Strings; +import org.zhiqim.kernel.util.codes.Base64Decoder; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.design.constants.ComplainConstants; +import com.zhiqim.yangcai.design.dao.OssFileDao; +import com.zhiqim.yangcai.design.dbo.complain.DesignComplain; + +/** + * 投诉单处理 + * + * @version 1.0 @author gjx 2019-8-15 新建与整理 + */ +@AnAlias("ComplainDealPresenter") +@AnIntercept("chkZmrLogin") +public class ComplainDealPresenter +{ + /** + * + * 提交投诉单处理 + * + * @author gjx + * @param request + * @throws Exception + */ + public static void doDealComplainOrder(HttpRequest request) throws Exception + { + long complainId = request.getParameterLong("complainId"); + String imgBase64Str = request.getParameter("imgData"); + + DesignComplain order = ORM.get(ZTable.class).item(DesignComplain.class, new Selector().addMust("complainId", complainId)); + if (order == null) + { + request.setResponseError("投诉单不存在"); + return; + } + + String rootDir = Strings.trimRight(request.getContext().getAttributeString("upload.rootDir"), "/"); + + String fileName = request.getSessionName() + "-" + DateTimes.getDateTime14String() + ".png"; + String checkPath = rootDir + "/" + DateTimes.getDateTime8String() + "/" + "投诉图片"; + String path = checkPath + "/" + fileName; + Files.mkDirectory(checkPath); + + // 对传过来的图片解码并且写入文件 + imgBase64Str = imgBase64Str.replace("data:image/pngbase64,", ""); + byte[] imageBytes = Base64Decoder.decode(imgBase64Str.getBytes("utf-8")); + File file = new File(path); + ImageOutputStream out = new FileImageOutputStream(file); + out.write(imageBytes); + out.flush(); + out.close(); + // 图片上传OSS处理 + String ossUrl = OssFileDao.uploadFile(file, OssFileDao.getUploadFileKey(complainId)); + + Updater updater = new Updater(); + updater.addMust("complainId", complainId); + updater.addField("complainStatus", ComplainConstants.TX_20.value()); + updater.addField("finishImgPath", ossUrl); + updater.addField("complainModifyTime", Sqls.nowTimestamp()); + + ORM.get(ZTable.class).update(DesignComplain.class, updater); + + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/ComplaintOrderPresenter.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/ComplaintOrderPresenter.java new file mode 100644 index 0000000..870042c --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/ComplaintOrderPresenter.java @@ -0,0 +1,189 @@ +package com.zhiqim.yangcai.design.presenter; + +import java.io.FileNotFoundException; +import java.io.IOException; +import java.sql.SQLException; +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.util.Arrays; +import org.zhiqim.kernel.util.Files; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Strings; +import org.zhiqim.kernel.util.codes.Base64; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ORMException; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.design.constants.EventConstants; +import com.zhiqim.yangcai.design.constants.FileTypeConstants; +import com.zhiqim.yangcai.design.dao.OrderLogDao; +import com.zhiqim.yangcai.design.dbo.order.DesignAtta; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; + +/** + * 申诉presenter + * + * @version v1.0.0 @author liuhu 2018-12-8 新建与整理 + */ +@AnAlias("ComplaintOrderPresenter") +public class ComplaintOrderPresenter +{ + + /** + * 保存申诉截图 + * + * @throws SQLException + * @throws ORMException + * @throws IOException + * @throws FileNotFoundException + */ + public static void saveComplaintScreenShots(HttpRequest request) throws Exception + { + long designId = request.getParameterLong("designId"); + int size = request.getParameterInt("size"); + if (size == 0) + { + return; + } + + for (int i = 0; i < size; i++) + { + String rootDir = Strings.trimRight(request.getContext().getAttributeString("upload.large.rootDir"), "/"); + + String path = request.getParameter("url" + i); + int fileLength = request.getParameterInt("fileLength" + i); + path = path.substring("/service/upl/".length()); + String pathName = path.substring(path.indexOf("/") + 1); + path = path.substring(0, path.indexOf("/")); + path = Base64.decodeFileUrlUTF8(path); + path = rootDir + "/" + path + "/" + pathName; + + // 插入订单附属表 + DesignAtta atta = new DesignAtta(); + atta.setAttaId(Ids.longId()); + atta.setAttaModul(FileTypeConstants.FILE_COMPLAINT.value()); + atta.setDesignId(designId); + atta.setFileName(pathName); + atta.setFileType("png"); + atta.setFileSize(fileLength); + atta.setSavePath(path); + atta.setUploadTime(Sqls.nowTimestamp()); + atta.setOperatorCode(request.getSessionName()); + + ORM.get(ZTable.class).insert(atta); + } + + String complaintReason = request.getParameter("complaintReason", ""); + + Updater updater = new Updater(); + updater.addMust("designId", designId); + updater.addField("complaintReason", complaintReason); + updater.addField("complaintFlag", 3); + ORM.get(ZTable.class).update(DesignOrder.class, updater); + + // 插入日志 + OrderLogDao.saveOrderOperateLog(designId, request.getSessionName(), "上传[" + designId + "]申诉截图成功", EventConstants.ORDER_20.value()); + } + + /** + * 保存申诉原因 + * + * @param request + * @throws ORMException + * @throws SQLException + * 已停用 + */ + public static void saveComplaintReason(HttpRequest request) throws ORMException, SQLException + { + long designId = request.getParameterLong("designId"); + String complaintReason = request.getParameter("complaintReason", ""); + + Updater updater = new Updater(); + updater.addMust("designId", designId); + updater.addField("complaintReason", complaintReason); + updater.addField("complaintFlag", 3); + ORM.get(ZTable.class).update(DesignOrder.class, updater); + } + + /** + * 申诉审核通过 + * + * @param request + * @throws ORMException + * @throws SQLException + */ + public static void complaintPass(HttpRequest request) throws ORMException, SQLException, Exception + { + String[] designIds = request.getParameterValues("designIds"); + // if (order == null) + // { + // request.setResponseError("订单不存在"); + // return; + // } + + long[] designId = Arrays.toLongArray(designIds); + Updater updater = new Updater(); + updater.addMustInLong("designId", designId); + updater.addField("complaintFlag", 1); + // updater.addField("complaintBackReason", ""); + ORM.get(ZTable.class).update(DesignOrder.class, updater); + + /* + * for (long oneDesignId : designId) + * { + * DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, oneDesignId); + * if (order != null) + * { + * ScoreDesignerRecordDetail scoreDesignerRecordDetail = new ScoreDesignerRecordDetail(); + * scoreDesignerRecordDetail.setScoreType(Long.valueOf(ScoreConstants.SCORE_TYPE_103.value() + * )); + * scoreDesignerRecordDetail.setOperatorCode(order.getDesigner()); + * scoreDesignerRecordDetail.setOrderId(order.getDesignId()); + * ScoreDesignerRecordDao.addScoreDesignerRecordDetail(scoreDesignerRecordDetail); + * } + * } + */ + } + + /** + * 申诉退回 + * + * @param request + * @throws ORMException + * @throws SQLException + */ + public static void complaintBack(HttpRequest request) throws ORMException, SQLException + { + long designId = request.getParameterLong("designId"); + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, designId); + if (order == null) + { + request.setResponseError("订单不存在"); + return; + } + + String desc = request.getParameter("desc", ""); + Updater updater = new Updater(); + updater.addMust("designId", designId); + updater.addField("complaintBackReason", desc); + updater.addField("complaintFlag", 2); + ORM.get(ZTable.class).update(DesignOrder.class, updater); + + // 申诉退回删除申诉图片 + List attaList = ORM.get(ZTable.class).list(DesignAtta.class, + new Selector("designId", designId).addMust("attaModul", FileTypeConstants.FILE_COMPLAINT.value())); + for (DesignAtta atta : attaList) + { + Files.deleteFile(atta.getSavePath()); + ORM.get(ZTable.class).delete(DesignAtta.class, atta.getAttaId()); + } + OrderLogDao.saveOrderOperateLog(designId, request.getSessionName(), "删除上传的[" + FileTypeConstants.FILE_COMPLAINT.value() + "]文件", + EventConstants.ORDER_20.value()); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/ConsolePresenter.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/ConsolePresenter.java new file mode 100644 index 0000000..559d224 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/ConsolePresenter.java @@ -0,0 +1,694 @@ +/** + * 扬彩印刷设计 + * 文件名 :ConsignCheckPresenter.java + * 创建人 :高佳新 + * 创建时间:2019-7-27 + */ + +package com.zhiqim.yangcai.design.presenter; + +import java.sql.SQLException; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.annotation.AnIntercept; +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.extend.LinkedMapSO; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.Amounts; +import org.zhiqim.kernel.util.Arrays; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.manager.dao.ZmrOrgDao; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ORMException; +import org.zhiqim.orm.ZSQL; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.alibaba.fastjson.JSON; +import com.zhiqim.yangcai.cache.ProductConvertCache; +import com.zhiqim.yangcai.design.constants.DraftConstants; +import com.zhiqim.yangcai.design.constants.StatusConstants; +import com.zhiqim.yangcai.design.dao.StatDao; +import com.zhiqim.yangcai.design.dbo.account.VirtualAccount; +import com.zhiqim.yangcai.design.dbo.after.DesignAfterStatisticDetail; +import com.zhiqim.yangcai.design.dbo.design.DesignerGroupDispatch; +import com.zhiqim.yangcai.design.dbo.dispatch.DesOnline; +import com.zhiqim.yangcai.design.dbo.notice.Notice; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; +import com.zhiqim.yangcai.design.dbo.order.DesignSelfView; +import com.zhiqim.yangcai.design.dbo.score.ScoreDesignerLever; +import com.zhiqim.yangcai.design.dbo.score.ScoreDesignerRecord; +import com.zhiqim.yangcai.design.model.OrderBacklog; +import com.zhiqim.yangcai.design.stat.model.AfterStatisticModule; +import com.zhiqim.yangcai.util.RRxAPIUtils; + +/** + * yixin 工作台相关 + * + * @version 1.0 @author yixin 2020-06-22 新建与整理 + */ +@AnAlias("ConsolePresenter") +@AnIntercept("chkZmrLogin") +public class ConsolePresenter +{ + + /** + * 获取今日的订单信息 + * + * @param request + * @throws Exception + */ + public static void getTodayOrderInfo(HttpRequest request) throws Exception + { + String beginTime = DateTimes.getDateString() + " 00:00:00"; + String endTime = DateTimes.getDateString() + " 23:59:59"; + int[] info = getOrderInfoByDateTime(request, beginTime, endTime); + request.setResponseResult(Jsons.toString(info)); + } + + /** + * 获取当月的订单信息 + * + * @param request + * @throws Exception + */ + public static void getCurrentMonthOrderInfo(HttpRequest request) throws Exception + { + String beginTime = DateTimes.getFirstMonthDay() + " 00:00:00"; + String endTime = DateTimes.getDateString() + " 23:59:59"; + int[] info = getOrderInfoByDateTime(request, beginTime, endTime); + request.setResponseResult(Jsons.toString(info)); + } + + /** + * 获取上个月的订单信息 + * + * @param request + * @throws Exception + */ + public static void getLastMonthOrderInfo(HttpRequest request) throws Exception + { + String beginTime = DateTimes.getPreviousMonthFirstDay() + " 00:00:00"; + String endTime = DateTimes.getPreviousMonthLastDay() + " 23:59:59"; + int[] info = getOrderInfoByDateTime(request, beginTime, endTime); + request.setResponseResult(Jsons.toString(info)); + } + + /** + * 根据时间获取时间段订单信息 + * int[0]订单量 int[1]定稿量 int[2]退款量 + * + * @param request + * @param beginTime + * @param endTime + * @return + * @throws Exception + */ + private static int[] getOrderInfoByDateTime(HttpRequest request, String beginTime, String endTime) throws Exception + { + StringBuilder sqlStr = new StringBuilder( + " SELECT d.designer, COUNT(*) orderNum,(SELECT COUNT(*) FROM design_order WHERE DESIGN_BEGIN_TIME >= 'startDateStr' AND DESIGN_BEGIN_TIME <= 'endDateStr' AND STATUS >= 55 AND designer IS NOT NULL AND designer = d.designer AND designer = d.designer) orderEndNum"); + sqlStr.append( + " FROM design_order d WHERE d.DESIGN_BEGIN_TIME >= 'startDateStr' AND d.DESIGN_BEGIN_TIME <= 'endDateStr' AND d.designer IS NOT NULL AND d.designer = 'designerStr' GROUP BY d.designer"); + + if (Validates.isEmpty(beginTime)) + { + beginTime = DateTimes.getFirstMonthDay() + " 00:00:00"; + } + if (Validates.isEmpty(endTime)) + { + endTime = DateTimes.getDateString() + " 23:59:59"; + } + + String sql = sqlStr.toString().replace("startDateStr", beginTime).replace("endDateStr", endTime); + int authority = hasAuthority(request); + ZmrSessionUser sessionUser = request.getSessionUser(ZmrSessionUser.class); + Selector refundSelector = new Selector(); + + // 总部查询所有人数据 其他只查自己的 + if (authority == 1) + { + sql = sql.replace("AND d.designer = 'designerStr'", ""); + } + else + { + refundSelector.addMust("designer", sessionUser.getOperatorCode()); + sql = sql.replace("designerStr", sessionUser.getOperatorCode()); + } + + int orderNum = 0; + int orderEndNum = 0; + // 订单量和定稿量 + List list = ORM.get(ZSQL.class).executeQuery(sql); + for (LinkedMapSO so : list) + { + orderNum += Integer.valueOf(String.valueOf(so.get("orderNum"))); + orderEndNum += Integer.valueOf(String.valueOf(so.get("orderEndNum"))); + } + + // 查询退款量 + refundSelector.addMustNotEqual("complaintFlag", 1); + refundSelector.addMaybeThenGE("refundTime", beginTime); + refundSelector.addMaybeThenLE("refundTime", endTime); + // 相关子查询(一小时内重新下单不算设计师责任) + refundSelector.addExpressionNotEqual("buyerNick", "all (select BUYER_NICK from design_order as b " + "where b.DESIGN_ID <> design_order.DESIGN_ID " + + "and b.CREATE_TIME >= design_order.REFUND_TIME " + "and DATE_SUB(b.CREATE_TIME,INTERVAL 1 HOUR) <= design_order.REFUND_TIME)"); + int refundResultCount = ORM.get(ZTable.class).count(DesignOrder.class, refundSelector); + + return new int[] + { + orderNum, orderEndNum, refundResultCount + }; + } + + /** + * 根据未完成订单信息 + * int[0]总订单量 int[1]小于24小时 int[2]24-48小时内 int[3]大于48小时 + * + * @param request + * @return + * @throws Exception + */ + public static void getUndoneOrderInfo(HttpRequest request) throws Exception + { + Selector selector = new Selector(); + selector.addMustIn("status", StatusConstants.ORDER_30.value(), StatusConstants.ORDER_36.value(), StatusConstants.ORDER_50.value()); + // 总部查询所有人数据 其他只查自己的 + int authority = hasAuthority(request); + ZmrSessionUser sessionUser = request.getSessionUser(ZmrSessionUser.class); + if (authority != 1) + { + selector.addMust("designer", sessionUser.getOperatorCode()); + } + + String today = DateTimes.getDateString(); + List orderList = ORM.get(ZTable.class).list(DesignOrder.class, selector); + int orderCount = orderList.size(); + int dayCount = 0; + int twoDayCount = 0; + int otherCount = 0; + int money = 0; + for (DesignOrder order : orderList) + { + String createDay = Sqls.toDateString(order.getCreateTime()); + if (DateTimes.compareDay(today, createDay) <= 1) + { + dayCount++; + } + else if (DateTimes.compareDay(today, createDay) <= 2) + { + twoDayCount++; + } + else + { + otherCount++; + } + money += order.getDesignPrice(); + } + + int[] data = new int[] + { + orderCount, dayCount, twoDayCount, otherCount, money / 100 + }; + request.setResponseResult(Jsons.toString(data)); + } + + /** + * 找到所有金额 + * + * @param request + * @return + * @throws Exception + */ + public static void getDesginMoney(HttpRequest request) throws Exception + { + // 总部查询所有人数据 其他只查自己的 + int authority = hasAuthority(request); + ZmrSessionUser sessionUser = request.getSessionUser(ZmrSessionUser.class); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + Calendar calendar = Calendar.getInstance(); + calendar.set(Calendar.HOUR_OF_DAY, 0); + calendar.set(Calendar.MINUTE, 0); + calendar.set(Calendar.SECOND, 0); + calendar.set(Calendar.MILLISECOND, 0); + Date todayStart = calendar.getTime(); + + calendar.set(Calendar.HOUR_OF_DAY, 23); + calendar.set(Calendar.MINUTE, 59); + calendar.set(Calendar.SECOND, 59); + calendar.set(Calendar.MILLISECOND, 999); + Date todayEnd = calendar.getTime(); + Selector selector = new Selector(); + selector.addMustIn("status", StatusConstants.ORDER_70.value()); + selector.addMust("designer", sessionUser.getOperatorCode()); + selector.addMustThenGE("checkTime", Sqls.toTimestamp(sdf.format(todayStart))); + selector.addMustThenLE("checkTime", Sqls.toTimestamp(sdf.format(todayEnd))); + List orderList = ORM.get(ZTable.class).list(DesignOrder.class, selector); + Double today = 0.0; + for (DesignOrder designOrder : orderList) + { + today += designOrder.getDesignPrice(); + } + + // 获取这个月的开始时间和结束时间 + calendar.set(Calendar.DAY_OF_MONTH, 1); + calendar.set(Calendar.HOUR_OF_DAY, 0); + calendar.set(Calendar.MINUTE, 0); + calendar.set(Calendar.SECOND, 0); + calendar.set(Calendar.MILLISECOND, 0); + Date monthStart = calendar.getTime(); + + calendar.add(Calendar.MONTH, 1); + calendar.add(Calendar.DAY_OF_MONTH, -1); + calendar.set(Calendar.HOUR_OF_DAY, 23); + calendar.set(Calendar.MINUTE, 59); + calendar.set(Calendar.SECOND, 59); + calendar.set(Calendar.MILLISECOND, 999); + Date monthEnd = calendar.getTime(); + Selector selector1 = new Selector(); + selector1.addMustIn("status", StatusConstants.ORDER_70.value()); + selector1.addMust("designer", sessionUser.getOperatorCode()); + selector1.addMustThenGE("checkTime", Sqls.toTimestamp(sdf.format(monthStart))); + selector1.addMustThenLE("checkTime", Sqls.toTimestamp(sdf.format(monthEnd))); + List orderList1 = ORM.get(ZTable.class).list(DesignOrder.class, selector1); + Double month = 0.0; + for (DesignOrder designOrder : orderList1) + { + month += designOrder.getDesignPrice(); + } + + // 获取上个月的开始时间和结束时间 + calendar.add(Calendar.MONTH, -1); + calendar.set(Calendar.DAY_OF_MONTH, 1); + calendar.set(Calendar.HOUR_OF_DAY, 0); + calendar.set(Calendar.MINUTE, 0); + calendar.set(Calendar.SECOND, 0); + calendar.set(Calendar.MILLISECOND, 0); + Date lastMonthStart = calendar.getTime(); + + calendar.add(Calendar.MONTH, 1); + calendar.add(Calendar.DAY_OF_MONTH, -1); + calendar.set(Calendar.HOUR_OF_DAY, 23); + calendar.set(Calendar.MINUTE, 59); + calendar.set(Calendar.SECOND, 59); + calendar.set(Calendar.MILLISECOND, 999); + Date lastMonthEnd = calendar.getTime(); + Selector selector12 = new Selector(); + selector12.addMustIn("status", StatusConstants.ORDER_70.value()); + selector12.addMust("designer", sessionUser.getOperatorCode()); + selector12.addMustThenGE("checkTime", Sqls.toTimestamp(sdf.format(lastMonthStart))); + selector12.addMustThenLE("checkTime", Sqls.toTimestamp(sdf.format(lastMonthEnd))); + List orderList12 = ORM.get(ZTable.class).list(DesignOrder.class, selector12); + Double lastmonth = 0.0; + for (DesignOrder designOrder : orderList12) + { + lastmonth += designOrder.getDesignPrice(); + } + + Double[] data = new Double[] + { + today / 100, month / 100, lastmonth / 100 + }; + request.setResponseResult(Jsons.toString(data)); + } + + /** + * 获取设计师信息 + * + * @param request + * @return + * @throws Exception + */ + public static void getDesignerInfo(HttpRequest request) throws Exception + { + ZmrSessionUser sessionUser = request.getSessionUser(ZmrSessionUser.class); + Map infoMap = new HashMap(); + + // 查询整个积分排行 + List list = ORM.get(ZTable.class).list(ScoreDesignerRecord.class, new Selector().addMust("state", 1).addOrderbyDesc("score")); + for (ScoreDesignerRecord scoreDesignerRecord : list) + { + if (scoreDesignerRecord.getOperatorCode().equals(sessionUser.getOperatorCode())) + { + infoMap.put("score", scoreDesignerRecord.getScore()); + infoMap.put("index", list.indexOf(scoreDesignerRecord) + 1); + + // 获取等级 + Selector selector = new Selector(); + selector.addMustThenLE("minScore", scoreDesignerRecord.getScore()); + selector.addMustThenGE("maxScore", scoreDesignerRecord.getScore()); + ScoreDesignerLever lever = ORM.get(ZTable.class).item(ScoreDesignerLever.class, selector); + if (lever != null) + { + infoMap.put("lever", lever.getDesignerLever()); + } + break; + } + } + + request.setResponseResult(Jsons.toString(infoMap)); + } + + /** + * + * [简要描述]: 操作员待办事项
            + * [详细描述]:
            + * + * @author gjx + * @param request + */ + public static void doDesignBacklogAffairNum(HttpRequest request) throws Exception + { + // 待办事项 + // Selector selector = new Selector(); + // selector.addMust("consumerPlatformType", + // MessageThemeConstants.PLATFORM_TYPE_DESIGN.value()); + // selector.addMust("consumerCode", request.getSessionName()); + // selector.addMust("consumerState", 0); + // int count = ORM.get(ZTable.class).count(OrderMessage.class, selector); + + // 正在接单设计师工作状态刷新 + Updater updater = new Updater(); + updater.addMust("operatorCode", request.getSessionName()); + updater.addMust("onlineStatus", 1); + updater.addField("lastUpdateTime", Sqls.nowTimestamp()); + ORM.get(ZTable.class).update(DesOnline.class, updater); + + // request.setResponseResult(String.valueOf(count)); + } + + /** + * + * [简要描述]: 查询设计师当月绩效
            + * [详细描述]:
            + * + * @author gjx + * @param request + * @throws Exception + */ + public static void doDesignerCurrMonthPerformance(HttpRequest request) throws Exception + { + String designer = request.getSessionName(); + String beginDate = DateTimes.getFirstMonthDay(); + String endDate = DateTimes.getLastMonthDay(); + + Selector afsSel = new Selector(); + afsSel.addFields("reDesignSrcId"); + afsSel.addMust("designer", designer); + afsSel.addMustThenG("reDesignSrcId", 0); + + // 查询设计师出售后订单 + List afsOrderList = ORM.get(ZTable.class).list(DesignOrder.class, afsSel); + + Selector selector = new Selector(); + selector.addMustThenGE("designEndTime", Sqls.toTimestampBegin(beginDate)); + selector.addMustThenLE("designEndTime", Sqls.toTimestampEnd(endDate)); + selector.addMust("designer", designer); + selector.addMustThenGE("status", StatusConstants.ORDER_55.value()); + selector.addMustThenGE("draftType", DraftConstants.DRAFT_TEMPLATE.value()); + selector.addMustThenLE("draftType", DraftConstants.DRAFT_PAGE_DESIGN.value()); + selector.addOrderbyAsc("createTime"); + if (!afsOrderList.isEmpty()) + {// 去除售后订单 + List afsIdList = new ArrayList(); + for (DesignOrder ord : afsOrderList) + { + afsIdList.add(ord.getReDesignSrcId()); + } + + selector.addMustNotInLong("designId", Arrays.toArrayLong(afsIdList)); + } + + List orderList = ORM.get(ZView.class).list(DesignSelfView.class, selector); + + // 先更新产品单价缓存,防止数据未同步 + Global.get(ProductConvertCache.class).doRefresh(); + + long designerOrdCost = 0L; + for (DesignSelfView order : orderList) + { + designerOrdCost += StatDao.calculateOrderPerformance(order); + } + + request.setResponseResult(Amounts.toYuan(designerOrdCost)); + } + + /** + * + * [简要描述]: 获取设计师绩效总和
            + * [详细描述]:
            + * + * @author gjx + * @param request + * @throws Exception + */ + public static void doDesignerPerformanceSumStat(HttpRequest request) throws Exception + { + ZmrSessionUser sessionUser = request.getSessionUser(ZmrSessionUser.class); + String designer = request.getSessionName(); + String beginDate = request.getParameter("beginDate", DateTimes.getFirstMonthDay()); + String endDate = request.getParameter("endDate", DateTimes.getLastMonthDay()); + + String divideTime = DateTimes.getFirstMonthDay(); + if (DateTimes.getCurrentDay() < 15) + { + divideTime = DateTimes.getPreviousMonthFirstDay(); + } + long designerPerformanceSum = 0; + if (divideTime.compareTo(beginDate) > 0 && divideTime.compareTo(endDate) > 0) + {// 往月 + StringBuilder builder = new StringBuilder(); + builder.append("select designer,count(*) orderEndCount,sum(order_designer_fee) designPerformance from designer_order_performance_stat"); + builder.append(" where designer = 'DESIGNER' and org_id = orgId and design_end_time >= 'beginDate' and design_end_time <= 'endDate'"); + builder.append(" group by designer order by designPerformance desc"); + String sql = builder.toString().replace("beginDate", beginDate + " 00:00:00").replace("endDate", endDate + " 23:59:59"); + if (Validates.isEmpty(designer)) + { + sql = sql.replace("designer = 'DESIGNER' and", ""); + } + else + { + sql = sql.replace("DESIGNER", designer); + } + + if (ZmrOrgDao.getOrgRootId(request) != sessionUser.getSelectedOrgId()) + {// 非总部 + sql = sql.replace("orgId", String.valueOf(sessionUser.getSelectedOrgId())); + } + else + { + sql = sql.replace("org_id = orgId and", ""); + } + + List queryList = ORM.get(ZSQL.class).executeQuery(sql); + for (LinkedMapSO so : queryList) + { + designerPerformanceSum += Long.valueOf(so.get("designPerformance").toString()); + } + } + else if (divideTime.compareTo(beginDate) <= 0 && divideTime.compareTo(endDate) <= 0) + {// 当月有选设计师才查询 + + Selector afsSel = new Selector(); + afsSel.addFields("reDesignSrcId"); + afsSel.addMust("designer", designer); + afsSel.addMustThenG("reDesignSrcId", 0); + + // 查询设计师出售后订单 + List afsOrderList = ORM.get(ZTable.class).list(DesignOrder.class, afsSel); + + Selector selector = new Selector(); + selector.addMustThenGE("designEndTime", Sqls.toTimestampBegin(beginDate)); + selector.addMustThenLE("designEndTime", Sqls.toTimestampEnd(endDate)); + selector.addMust("designer", designer); + selector.addMustThenGE("status", StatusConstants.ORDER_55.value()); + selector.addMustThenGE("draftType", DraftConstants.DRAFT_TEMPLATE.value()); + selector.addMustThenLE("draftType", DraftConstants.DRAFT_PAGE_DESIGN.value()); + selector.addOrderbyAsc("createTime"); + if (!afsOrderList.isEmpty()) + {// 去除售后订单 + List afsIdList = new ArrayList(); + for (DesignOrder ord : afsOrderList) + { + afsIdList.add(ord.getReDesignSrcId()); + } + + selector.addMustNotInLong("designId", Arrays.toArrayLong(afsIdList)); + } + + List orderList = ORM.get(ZView.class).list(DesignSelfView.class, selector); + + // 先更新产品单价缓存,防止数据未同步 + Global.get(ProductConvertCache.class).doRefresh(); + + for (DesignSelfView order : orderList) + { + designerPerformanceSum += StatDao.calculateOrderPerformance(order); + } + } + request.setResponseResult(Amounts.toYuan(designerPerformanceSum)); + } + + /** + * + * [简要描述]: 查询设计师当月售后金额
            + * [详细描述]:
            + * + * @author gjx + * @param request + * @throws Exception + */ + public static void doDesignerAfterAmountDetail(HttpRequest request) throws Exception + { + String designer = request.getSessionName(); + int afterYear = DateTimes.getCurrentYear(); + int afterMonth = DateTimes.getCurrentMonth(); + + Selector selector = new Selector(); + selector.addMust("afterBlamer", designer); + selector.addMust("startDate", afterYear + "-" + (afterMonth < 10 ? "0" : "") + afterMonth); + + String keyFlag = "afterDetail"; + Map resMap = new HashMap(); + List dataList = ORM.get(ZTable.class).list(DesignAfterStatisticDetail.class, selector); + for (DesignAfterStatisticDetail detail : dataList) + { + AfterStatisticModule module = (AfterStatisticModule) resMap.get(keyFlag); + module = module != null ? module : new AfterStatisticModule(); + module.addAfterDetail(detail); + resMap.put(keyFlag, module); + } + + resMap.put("afterAmount", 0); + if (resMap.containsKey(keyFlag)) + { + AfterStatisticModule module = (AfterStatisticModule) resMap.get(keyFlag); + resMap.put("afterAmount", module.getLostAmount() - module.getLossAmountCanceled()); + } + + request.setResponseResult(Jsons.toString(resMap)); + } + + /** + * 判断是否有权限 + * + * @param request + * @param param + * @return + * @throws SQLException + * @throws ORMException + */ + private static int hasAuthority(HttpRequest request) throws Exception + { + ZmrSessionUser user = (ZmrSessionUser) request.getSessionUser(); + String operatorCode = user.getOperatorCode(); + long orgId = user.getSelectedOrgId(); + // 总部 + if (ZmrOrgDao.getOrgRootId(request) == orgId) + { + return 1; + } + // 总部如果选择了组织 默认组织负责人 + else if (ZmrOrgDao.getOrgRootId(request) == user.getOperatorOrgId()) + { + return 0; + } + // 组织负责人 + else if (ZmrOrgDao.isOrgManager(request, operatorCode)) + { + + return 0; + } + // 设计师 + else + { + + return -1; + } + } + + // 账户中心总金额 + // 账户中心冻结金额 + // 账户中心可用金额 + public static void doQueryVirtualAccountSumMoney(HttpRequest request) throws Exception + { + String operatorCode = request.getSessionName(); + VirtualAccount item = ORM.get(ZTable.class).item(VirtualAccount.class, new Selector().addMaybe("operatorCode", operatorCode)); + Map infoMap = new HashMap(); + + if (item == null) + { + VirtualAccount virtualAccount = new VirtualAccount(); + virtualAccount.setOperatorCode(operatorCode); + virtualAccount.setOperatorStatus(1); + ORM.get(ZTable.class).insert(virtualAccount); + } + else + { + infoMap.put("sumMoney", Amounts.toYuan(item.getSumMoney())); + infoMap.put("freezeMoney", Amounts.toYuan(item.getFreezeMoney())); + infoMap.put("usableMoney", Amounts.toYuan(item.getUsableMoney())); + request.setResponseResult(Jsons.toString(infoMap)); + } + } + + public static void doQueryIsShowCost(HttpRequest request) throws Exception + { + String operatorCode = request.getSessionName(); + DesignerGroupDispatch item = ORM.get(ZTable.class).item(DesignerGroupDispatch.class, new Selector().addMaybe("operatorCode", operatorCode)); + Map infoMap = new HashMap(); + + if (item == null) + { + infoMap.put("isShowCost", 0); + request.setResponseResult(Jsons.toString(infoMap)); + } + else + { + infoMap.put("isShowCost", item.getIsShowCost() == 1 ? 1 : 0); + request.setResponseResult(Jsons.toString(infoMap)); + } + } + + public static void doNoticeQuery(HttpRequest request) throws ORMException, SQLException + { + PageResult pageResult = ORM.get(ZTable.class).page(Notice.class, 1, 5, new Selector().addOrderbyDesc("finshTime").addMaybe("status", 1)); + request.setResponseResult(JSON.toJSONString(pageResult.list())); + + } + + public static void doNoticeBacklog(HttpRequest request) throws ORMException, SQLException + { + PageResult pageResult = ORM.get(ZTable.class).page(OrderBacklog.class, 1, 5, + new Selector().addOrderbyDesc("createTime").addMaybeNotEqual("messageType", 2).addMaybe("consumerCode", request.getSessionName())); + request.setResponseResult(JSON.toJSONString(pageResult.list())); + } + + /** + * [简要描述]:码上传单免登录接口
            + * + * @author caohong + * @param request + * @throws Exception + */ + public static void getH5DesignUrl(HttpRequest request) throws Exception + { + ZmrSessionUser sessionUser = request.getSessionUser(ZmrSessionUser.class); + String url = RRxAPIUtils.loginRRX(sessionUser.getOperatorCode(), sessionUser.getOperatorName()); + request.setResponseResult(url); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/DesignAfterOrderPresenter.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/DesignAfterOrderPresenter.java new file mode 100644 index 0000000..d39c664 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/DesignAfterOrderPresenter.java @@ -0,0 +1,473 @@ +package com.zhiqim.yangcai.design.presenter; + +import java.io.File; +import java.util.List; +import java.util.Map; +import java.util.TreeMap; + +import javax.imageio.stream.FileImageOutputStream; +import javax.imageio.stream.ImageOutputStream; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.annotation.AnIntercept; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnTransaction; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.kernel.util.Amounts; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Files; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Strings; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.kernel.util.codes.Base64; +import org.zhiqim.manager.dao.ZmrOrgDao; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.design.constant.ScoreConstants; +import com.zhiqim.yangcai.design.constants.AfterConstants; +import com.zhiqim.yangcai.design.constants.EventConstants; +import com.zhiqim.yangcai.design.constants.FileTypeConstants; +import com.zhiqim.yangcai.design.dao.OrderCheckDao; +import com.zhiqim.yangcai.design.dao.OrderLogDao; +import com.zhiqim.yangcai.design.dao.OssFileDao; +import com.zhiqim.yangcai.design.dao.ScoreDesignerRecordDao; +import com.zhiqim.yangcai.design.dbo.after.DesignAfterOrder; +import com.zhiqim.yangcai.design.dbo.after.DesignAfterOrderView; +import com.zhiqim.yangcai.design.dbo.design.AfterPicType; +import com.zhiqim.yangcai.design.dbo.design.AfterProblemType; +import com.zhiqim.yangcai.design.dbo.order.DesignAtta; +import com.zhiqim.yangcai.design.dbo.score.ScoreDesignerRecordDetail; + +/**** + * 售后订单相关 + * + * @version v1.0.0 @author longguizhi 2018-12-16 新建与整理 + */ +@AnAlias("DesignAfterOrderPresenter") +@AnIntercept("chkZmrLogin") +public class DesignAfterOrderPresenter +{ + public static void doQueryAfterOrderDataInfo(HttpRequest request) throws Exception + { + long designAfsId = request.getParameterLong("designAfsId"); + designAfsId = designAfsId < 0 ? 0 : designAfsId; + + // 售后信息 + DesignAfterOrderView afterOrder = ORM.get(ZView.class).item(DesignAfterOrderView.class, new Selector("designAfsId", designAfsId)); + if (afterOrder == null) + { + request.setResponseError("售后单不存在"); + return; + } + + String[] attaModuls = new String[] + { + FileTypeConstants.FILE_DESGIN.value(), // 设计文件 + FileTypeConstants.FILE_END.value(), // 成品文件 + FileTypeConstants.FILE_AFTERSALE.value(), // 售后文件 + FileTypeConstants.FILE_AFTE_COMPLAIN_EVIDENCE.value() + // 申诉凭证 + }; + List afterAttaList = ORM.get(ZTable.class).list(DesignAtta.class, + new Selector("designId", afterOrder.getDesignId()).addMustIn("attaModul", attaModuls).addOrderbyAsc("attaModul")); + + Map jsonMap = new TreeMap(); + jsonMap.put("afterAttaList", afterAttaList); + jsonMap.put("afterOrder", afterOrder); + jsonMap.put("problemType", ORM.get(ZTable.class).item(AfterProblemType.class, afterOrder.getProblemType())); + + request.setResponseResult(Jsons.toString(jsonMap)); + } + + /** 查新分配责任信息 **/ + public static void doQueryAppointBlameData(HttpRequest request) throws Exception + { + long designAfsId = request.getParameterLong("designAfsId"); + designAfsId = designAfsId < 0 ? 0 : designAfsId; + + // 售后信息 + DesignAfterOrderView afterOrder = ORM.get(ZView.class).item(DesignAfterOrderView.class, new Selector("designAfsId", designAfsId)); + if (afterOrder == null) + { + request.setResponseError("售后但不存在"); + return; + } + + String[] attaModuls = new String[] + { + FileTypeConstants.FILE_DESGIN.value(), // 设计文件 + FileTypeConstants.FILE_END.value(), // 成品文件 + FileTypeConstants.FILE_AFTERSALE.value(), // 售后文件 + FileTypeConstants.FILE_AFTE_COMPLAIN_EVIDENCE.value() + // 申诉凭证 + + }; + // 附件信息 + List afterAttaList = ORM.get(ZTable.class).list(DesignAtta.class, + new Selector("designId", afterOrder.getDesignId()).addMustIn("attaModul", attaModuls).addOrderbyAsc("attaModul")); + + // 查询责任归属 & 责任问题原因 picStatus + List picList = ORM.get(ZTable.class).list(AfterPicType.class); + List problemList = ORM.get(ZTable.class).list(AfterProblemType.class); + + Map jsonMap = new TreeMap(); + jsonMap.put("afterAttaList", afterAttaList); + jsonMap.put("afterOrder", afterOrder); + jsonMap.put("picList", picList); + jsonMap.put("problemList", problemList); + request.setResponseResult(Jsons.toString(jsonMap)); + } + + /*** 责任分配 **/ + @AnTransaction + public static void doAppointAfterBlame(HttpRequest request) throws Exception + { + long designAfsId = request.getParameterLong("designAfsId"); + designAfsId = designAfsId <= 0 ? 0 : designAfsId; + String afterBlamer = request.getParameter("afterBlamer"); + + long picOrgId = request.getParameterLong("picOrgId"); + picOrgId = picOrgId <= 0 ? 0 : picOrgId; + + long picTypeId = request.getParameterLong("picType"); + picTypeId = picTypeId <= 0 ? 0 : picTypeId; + + long problemType = request.getParameterLong("problemType"); + problemType = problemType <= 0 ? 0 : problemType; + boolean isReAppointBlame = request.getParameterBoolean("isReAppointBlame");// 是否申诉通过重新指派责任 + long lossAmount = request.getParameterAmount2R("lossAmount", 0L); + DesignAfterOrder afterOrder = ORM.get(ZTable.class).item(DesignAfterOrder.class, new Selector("designAfsId", designAfsId)); + if (afterOrder == null) + { + request.setResponseError("售后单不存在"); + return; + } + + if (!isReAppointBlame && afterOrder.getAfterStatus() != AfterConstants.CS_0.value()) + {// 非申诉单 分配责任限制 + request.setResponseError("当前状态不允许操作请检查是否正确"); + return; + } + + if (isReAppointBlame && Validates.isEmptyBlank(afterOrder.getAfterBlamer())) + {// 申诉状态 没有责任人(异常数据) + request.setResponseError("申诉状态,[申诉人]为空,不允许重新指派"); + return; + } + + if (Validates.isEmptyBlank(afterBlamer)) + { + request.setResponseError("请选择正确的责任人"); + return; + } + + if (isReAppointBlame && afterBlamer.equals(afterOrder.getAfterBlamer())) + {// + request.setResponseError("重新指派不能指定同一个人"); + return; + } + + if (ZmrOrgDao.getOrg(request, picOrgId) == null) + { + request.setResponseError("请选择正确的责任组织"); + return; + } + + AfterPicType picType = ORM.get(ZTable.class).item(AfterPicType.class, new Selector("picType", picTypeId)); + if (picType == null) + { + request.setResponseError("请选择正确的责任归属"); + return; + } + + AfterProblemType problem = ORM.get(ZTable.class).item(AfterProblemType.class, new Selector("problemType", problemType)); + if (problem == null) + { + request.setResponseError("请选择正确的售后原因"); + return; + } + + // 删除之前的申诉内容及文件 + List blameAttaList = ORM.get(ZTable.class).list(DesignAtta.class, + new Selector("designId", afterOrder.getDesignId()).addMust("attaModul", FileTypeConstants.FILE_AFTE_COMPLAIN_EVIDENCE.value())); + for (DesignAtta atta : blameAttaList) + { + OrderCheckDao.doDeleteAttaFile(atta); + } + + // 数据保存 + Updater updater = new Updater(); + updater.addMust("designAfsId", designAfsId); + updater.addField("afterStatus", AfterConstants.CS_300.value()); + updater.addField("picOrgId", picOrgId); + updater.addField("picType", picType.getPicType()); + updater.addField("problemType", problemType); + updater.addField("afterBlamer", afterBlamer); + updater.addField("lossAmount", Double.valueOf(Amounts.toYuan(lossAmount))); + updater.addField("afterHandler", request.getSessionName()); + updater.addField("afterHandelTime", Sqls.nowTimestamp()); + updater.addField("afterModifyTime", Sqls.nowTimestamp()); + updater.addField("afterBlameReturnNote", null); + updater.addField("afterBlameReturnTime", null); + ORM.get(ZTable.class).update(DesignAfterOrder.class, updater); + + String itemDesc = "给售后单[" + afterOrder.getOutAfsId() + "]"; + itemDesc += isReAppointBlame ? "[" + afterOrder.getAfterBlamer() + "]异议申诉通过, 重新指派责任给[" + afterBlamer + "]" : "指派责任给[" + afterBlamer + "]"; + OrderLogDao.saveOrderOperateLog(afterOrder.getDesignId(), request.getSessionName(), itemDesc, EventConstants.ORDER_20.value()); + + } + + /*** 售后完成 **/ + @AnTransaction + public static void doFinishAfterOrder(HttpRequest request) throws Exception + { + long designAfsId = request.getParameterLong("designAfsId"); + designAfsId = designAfsId <= 0 ? 0 : designAfsId; + String afterFinishNote = request.getParameter("afterFinishNote"); + + DesignAfterOrder afterOrder = ORM.get(ZTable.class).item(DesignAfterOrder.class, new Selector("designAfsId", designAfsId)); + if (afterOrder == null) + { + request.setResponseError("售后单不存在"); + return; + } + + if (afterOrder.getAfterStatus() == AfterConstants.CS_400.value() || afterOrder.getAfterStatus() == AfterConstants.CS_F100.value() + || afterOrder.getAfterStatus() == AfterConstants.CS_F120.value()) + { + request.setResponseError("此订单状态已无需售后完成"); + return; + } + + if (Validates.isEmptyBlank(afterOrder.getAfterBlamer())) + {// 没有责任人 + request.setResponseError("售后单未知责任人,请检查是否正确!"); + return; + } + + // 申诉文件 上传到OSS + Selector attaSelect = new Selector("designId", afterOrder.getDesignId()); + attaSelect.addMust("attaModul", FileTypeConstants.FILE_AFTE_COMPLAIN_EVIDENCE.value()); + List attaList = ORM.get(ZTable.class).list(DesignAtta.class, attaSelect); + for (DesignAtta afterAtta : attaList) + { + boolean result = OssFileDao.uploadFile(afterAtta); + if (!result) + { + request.setResponseError("申诉文件OSS转储失败"); + return; + } + // 删除文件 + Files.deleteFile(afterAtta.getSavePath()); + } + + Updater updater = new Updater(); + updater.addMust("designAfsId", designAfsId); + updater.addField("afterModifyTime", Sqls.nowTimestamp()); + + updater.addField("afterStatus", AfterConstants.CS_400.value()); + updater.addField("afterFinishNote", afterFinishNote); + updater.addField("afterFinishTime", Sqls.nowTimestamp()); + updater.addField("afterBlameReturnNote", null); + updater.addField("afterBlameReturnTime", null); + ORM.get(ZTable.class).update(DesignAfterOrder.class, updater); + OrderLogDao.saveOrderOperateLog(afterOrder.getDesignId(), request.getSessionName(), "完成售后单[" + afterOrder.getDesignAfsId() + "]", + EventConstants.ORDER_20.value()); + + if (afterOrder.getAfterBlamer() != null) + { + ScoreDesignerRecordDetail scoreDesignerRecordDetail = new ScoreDesignerRecordDetail(); + scoreDesignerRecordDetail.setScoreType(Long.valueOf(ScoreConstants.SCORE_TYPE_104.value())); + scoreDesignerRecordDetail.setOperatorCode(afterOrder.getAfterBlamer()); + scoreDesignerRecordDetail.setOrderId(afterOrder.getDesignId()); + ScoreDesignerRecordDao.addScoreDesignerRecordDetail(scoreDesignerRecordDetail); + } + + } + + /*** 提交申诉 */ + @AnTransaction + public static void doSubmitAfterComplain(HttpRequest request) throws Exception + { + long designAfsId = request.getParameterLong("designAfsId"); + designAfsId = designAfsId <= 0 ? 0 : designAfsId; + int complainEvidenceFileMethod = request.getParameterInt("complainEvidenceFileMethod");// 凭证方式 + // 0 + // 文件1截图 + String afterBlameReturnNote = request.getParameter("afterBlameReturnNote"); + afterBlameReturnNote = Strings.trim(afterBlameReturnNote); + + DesignAfterOrder afterOrder = ORM.get(ZTable.class).item(DesignAfterOrder.class, new Selector("designAfsId", designAfsId)); + if (afterOrder == null) + { + request.setResponseError("售后单不存在"); + return; + } + + if (afterOrder.getAfterStatus() != AfterConstants.CS_300.value()) + { + request.setResponseError("当前状态不允许操作!"); + return; + } + + if (!Validates.isLen(afterBlameReturnNote, 1, 600)) + { + request.setResponseError("申诉原因不能为空!"); + return; + } + + // + DesignAtta imgComplain = null; + if (complainEvidenceFileMethod == 1) + { + String imgData = request.getParameterNoFileterOnCNT("imgData"); + if (Validates.isNotEmptyBlank(imgData)) + { + String rootDir = Strings.trimRight(request.getContext().getAttributeString("upload.large.rootDir"), "/"); + String fileName = afterOrder.getDesignId() + "-售后申诉截图.png"; + String dateDir = DateTimes.getDateTime8String(); + String fileDir = rootDir + "/" + dateDir + "/" + FileTypeConstants.FILE_AFTE_COMPLAIN_EVIDENCE.value(); + if (!Files.exists(fileDir)) + { + Files.mkDirectory(fileDir); + } + + int idx = imgData.indexOf(","); + byte[] imageBytes = Base64.decode(imgData.substring(idx + 1)); + + // imgData = imgData.replace("data:image/pngbase64,", ""); + // byte[] imageBytes = Base64Decoder.decode(imgData.getBytes("utf-8")); + String filePath = fileDir + "/" + fileName; + File file = new File(filePath); + ImageOutputStream out = new FileImageOutputStream(file); + out.write(imageBytes); + out.flush(); + out.close(); + + // 插入订单附属表 + imgComplain = new DesignAtta(); + imgComplain.setAttaId(Ids.longId()); + imgComplain.setDesignId(afterOrder.getDesignId()); + imgComplain.setAttaFlag(0); + imgComplain.setAttaModul(FileTypeConstants.FILE_AFTE_COMPLAIN_EVIDENCE.value()); + imgComplain.setFileName(fileName); + imgComplain.setFileType("png"); + imgComplain.setFileSize(imageBytes.length); + imgComplain.setSavePath(filePath); + imgComplain.setUploadTime(Sqls.nowTimestamp()); + imgComplain.setOperatorCode(request.getSessionName()); + ORM.get(ZTable.class).insert(imgComplain); + } + } + + Updater updater = new Updater(); + updater.addMust("designAfsId", designAfsId); + updater.addField("afterModifyTime", Sqls.nowTimestamp()); + updater.addField("afterStatus", AfterConstants.CS_100.value()); + updater.addField("afterBlameReturnNote", afterBlameReturnNote); + updater.addField("afterBlameReturnTime", Sqls.nowTimestamp()); + ORM.get(ZTable.class).update(DesignAfterOrder.class, updater); + OrderLogDao.saveOrderOperateLog(afterOrder.getDesignId(), request.getSessionName(), "售后单[" + afterOrder.getDesignAfsId() + "]异议申诉", + EventConstants.ORDER_20.value()); + } + + /*** 申诉拒绝 */ + @AnTransaction + public static void doAfterComplainReject(HttpRequest request) throws Exception + { + + long designAfsId = request.getParameterLong("designAfsId"); + designAfsId = designAfsId <= 0 ? 0 : designAfsId; + DesignAfterOrder afterOrder = ORM.get(ZTable.class).item(DesignAfterOrder.class, new Selector("designAfsId", designAfsId)); + if (afterOrder == null) + { + request.setResponseError("售后单不存在"); + return; + } + + if (afterOrder.getAfterStatus() != AfterConstants.CS_100.value() && afterOrder.getAfterStatus() != AfterConstants.CS_200.value()) + { + request.setResponseError("非申诉或待审状态不允许操作"); + return; + } + + Updater updater = new Updater(); + updater.addMust("designAfsId", designAfsId); + updater.addField("afterModifyTime", Sqls.nowTimestamp()); + updater.addField("afterStatus", AfterConstants.CS_500.value()); + + ORM.get(ZTable.class).update(DesignAfterOrder.class, updater); + OrderLogDao.saveOrderOperateLog(afterOrder.getDesignId(), request.getSessionName(), "售后单[" + afterOrder.getDesignAfsId() + "]申诉拒绝", + EventConstants.ORDER_20.value()); + } + + /*** 申诉通过 */ + @AnTransaction + public static void doAfterComplainAccess(HttpRequest request) throws Exception + { + + long designAfsId = request.getParameterLong("designAfsId"); + designAfsId = designAfsId <= 0 ? 0 : designAfsId; + DesignAfterOrder afterOrder = ORM.get(ZTable.class).item(DesignAfterOrder.class, new Selector("designAfsId", designAfsId)); + String checkNote = request.getParameter("checkNote"); + checkNote = Strings.trim(checkNote); + + if (afterOrder == null) + { + request.setResponseError("售后单不存在"); + return; + } + + if (afterOrder.getAfterStatus() != AfterConstants.CS_100.value()) + { + request.setResponseError("非申诉状态不允许操作"); + return; + } + if (Validates.isEmptyBlank(checkNote)) + { + request.setResponseError("审核备注不能为空"); + return; + } + if (checkNote.length() > 400) + { + request.setResponseError("审核备注不能超过 400 字符"); + return; + } + + // 申诉文件 上传到OSS + Selector attaSelect = new Selector("designId", afterOrder.getDesignId()); + attaSelect.addMust("attaModul", FileTypeConstants.FILE_AFTE_COMPLAIN_EVIDENCE.value()); + List attaList = ORM.get(ZTable.class).list(DesignAtta.class, attaSelect); + for (DesignAtta afterAtta : attaList) + { + boolean result = OssFileDao.uploadFile(afterAtta); + if (!result) + { + request.setResponseError("申诉文件OSS转储失败"); + return; + } + // 删除文件 + Files.deleteFile(afterAtta.getSavePath()); + } + + String accessNote = (Validates.isEmptyBlank(checkNote) ? "" : checkNote); + Updater updater = new Updater(); + updater.addMust("designAfsId", designAfsId); + updater.addField("afterModifyTime", Sqls.nowTimestamp()); + updater.addField("afterStatus", AfterConstants.CS_F100.value()); + updater.addField("afterCanceler", request.getSessionName()); + updater.addField("afterCancelNote", accessNote); + updater.addField("afterCancelTime", Sqls.nowTimestamp()); + updater.addField("afterComplainCheckNote", accessNote); + updater.addField("afterFinishTime", Sqls.nowTimestamp()); + + ORM.get(ZTable.class).update(DesignAfterOrder.class, updater); + OrderLogDao.saveOrderOperateLog(afterOrder.getDesignId(), request.getSessionName(), "售后申诉通过:" + accessNote, EventConstants.ORDER_20.value()); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/DesignGroupPresenter.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/DesignGroupPresenter.java new file mode 100644 index 0000000..e83f2f0 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/DesignGroupPresenter.java @@ -0,0 +1,255 @@ +package com.zhiqim.yangcai.design.presenter; + +import java.sql.SQLException; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.ZmlContexts; +import org.zhiqim.httpd.context.annotation.AnIntercept; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnTransaction; +import org.zhiqim.kernel.extend.HashMapSO; +import org.zhiqim.kernel.extend.MapSO; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.manager.dao.ZmrOperatorDao; +import org.zhiqim.manager.dbo.ZmrOperator; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ORMException; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.design.dbo.stat.DesignGroup; +import com.zhiqim.yangcai.design.dbo.stat.GroupMembers; + +/** + * 设计组 presenter + * + * @version v1.0.0 @author liuhu 2019-2-15 新建与整理 + */ +@AnAlias("DesignGroupPresenter") +@AnIntercept("chkZmrLogin") +public class DesignGroupPresenter +{ + + public static void doQueryMembers(HttpRequest request) throws Exception + { + long groupId = request.getParameterLong("groupId"); + String startDate = request.getParameter("startDate", DateTimes.getFirstMonthDay()); + startDate = Validates.isDate(startDate) ? startDate : DateTimes.getFirstMonthDay(); + String endDate = DateTimes.getLastMonthDay(startDate.replaceAll("-", "").substring(0, 6)); + + MapSO attrMap = new HashMapSO(); + if (groupId == -1) + { + String ret = ZmlContexts.parseZmlPath(request, "/zview/sys/presenter/groupMembersInfo.zml", attrMap); + request.setResponseResult(ret); + return; + } + + DesignGroup group = null; + List groupList = ORM.get(ZTable.class).list(DesignGroup.class); + for (DesignGroup designGroup : groupList) + { + if (designGroup.getGroupId() == groupId) + { + group = designGroup; + } + } + + Selector selector = new Selector("groupId", groupId); + selector.addMustThenLE("startDate", startDate); + selector.addOr(new Selector().addMustIsNull("endDate").addMust("endDate", endDate)); + selector.addOrderbyDesc("isGroupLeader"); + selector.addOrderbyAsc("startDate"); + + List memberList = ORM.get(ZTable.class).list(GroupMembers.class, selector); + Map operatorMap = new LinkedHashMap(); + + for (GroupMembers c : memberList) + { + operatorMap.put(c.getUserCode(), null); + } + + for (ZmrOperator o : ZmrOperatorDao.getOperator(request, group.getOrgId())) + { + + if (operatorMap.containsKey(o.getOperatorCode())) + { + operatorMap.put(o.getOperatorCode(), o); + } + } + + attrMap.put("memberList", memberList); + attrMap.put("operatorMap", operatorMap); + attrMap.put("group", group); + attrMap.put("year", Integer.valueOf(startDate.split("-")[0])); + attrMap.put("month", Integer.valueOf(startDate.split("-")[1])); + String ret = ZmlContexts.parseZmlPath(request, "/zview/sys/presenter/groupMembersInfo.zml", attrMap); + + Map jsonMap = new HashMap(); + jsonMap.put("membersHtml", ret); + request.setResponseResult(Jsons.toString(jsonMap)); + + } + + /** + * 增加设计组成员 + * + * @param request + * @throws ORMException + * @throws SQLException + */ + @AnTransaction + public static void doAddGroupMembers(HttpRequest request) throws ORMException, SQLException + { + long groupId = request.getParameterLong("groupId"); + groupId = groupId < 0 ? 0 : groupId; + DesignGroup group = ORM.get(ZTable.class).item(DesignGroup.class, groupId); + if (group == null) + { + request.returnCloseDialog("请先添加设计组"); + return; + } + String currMouthFirstDay = DateTimes.getFirstMonthDay(); + String[] members = request.getParameterValues("members"); + String nextMonthFirstDay = DateTimes.getNextMonthFirstDay(); + for (String userCode : members) + { + + // 1.查询在职是组长 + Selector sel1 = new Selector("userCode", userCode); + sel1.addMust("isGroupLeader", 1); + sel1.addMustIsNull("endDate"); + sel1.addOrderbyDesc("startDate"); + GroupMembers member = ORM.get(ZTable.class).item(GroupMembers.class, sel1); + if (member != null) + { + DesignGroup g = ORM.get(ZTable.class).item(DesignGroup.class, new Selector("groupId", member.getGroupId())); + + String ss = (nextMonthFirstDay.equals(member.getStartDate()) ? nextMonthFirstDay.substring(0, 7) + : DateTimes.getFirstMonthDay().substring(0, 7)); + request.setResponseError("[" + userCode + "]是[" + g.getGroupName() + "][" + ss + "]月分的组长,请先更换组长后在操作"); + return; + } + + // 2.删除未生效的组员数据 + ORM.get(ZTable.class).delete(GroupMembers.class, + new Selector("userCode", userCode).addMustThenG("startDate", DateTimes.getLastMonthDay()).addMust("isGroupLeader", 0)); + + // 3.1 查询该操作员是否为当前组织 + Selector sel2 = new Selector("userCode", userCode); + sel2.addMust("groupId", groupId); + sel2.addMustThenL("startDate", DateTimes.getNextMonthFirstDay()); + sel2.addOrderbyDesc("startDate"); + GroupMembers member2 = ORM.get(ZTable.class).item(GroupMembers.class, sel2); + if (member2 != null) + {// 上月在当前组 + member2.setEndDate(null); + ORM.get(ZTable.class).replace(member2); + return; + } + + // 3.1.修改在其他组 的结束时间 + Updater updater = new Updater(); + updater.addMust("userCode", userCode); + updater.addMustIsNull("endDate"); + updater.addMustNotEqual("groupId", groupId); + updater.addField("endDate", DateTimes.getLastMonthDay()); + ORM.get(ZTable.class).update(GroupMembers.class, updater); + + Selector selel = new Selector(); + selel.addMust("userCode", userCode); + selel.addMust("endDate", DateTimes.getLastMonthDay()); + selel.addMustNotEqual("groupId", groupId); + selel.addOrderbyDesc("endDate"); + GroupMembers om = ORM.get(ZTable.class).item(GroupMembers.class, selel); + + // 4. 插入下月生效组员数据 + GroupMembers nm = new GroupMembers(); + nm.setStartDate(om == null ? currMouthFirstDay : DateTimes.getNextMonthFirstDay()); + nm.setUserCode(userCode); + nm.setGroupId(groupId); + ORM.get(ZTable.class).replace(nm); + } + } + + /** + * 删除设计组成员 + * + * @param request + * @throws ORMException + * @throws SQLException + */ + @AnTransaction + public static void doDeleteGroupMember(HttpRequest request) throws ORMException, SQLException + { + long groupId = request.getParameterLong("groupId"); + String userCode = request.getParameter("userCode"); + + // 查询是否是删除未生效数据 + Selector sel = new Selector("userCode", userCode); + sel.addMust("groupId", groupId); + sel.addMustIsNull("endDate"); + sel.addMustThenG("startDate", DateTimes.getLastMonthDay()); + sel.addOrderbyDesc("startDate"); + GroupMembers members = ORM.get(ZTable.class).item(GroupMembers.class, sel); + if (members != null) + {// + if (members.getIsGroupLeader() == 1) + { + request.setResponseError("不能删除组长数据"); + return; + } + + // 2.删除在改组未生效的组员数据 + ORM.get(ZTable.class).delete(GroupMembers.class, new Selector("userCode", userCode).addMust("groupId", groupId) + .addMustThenG("startDate", DateTimes.getLastMonthDay()).addMust("isGroupLeader", 0)); + + // 3.还原已生效数据 + Selector sel2 = new Selector("userCode", userCode); + sel2.addMustThenL("endDate", DateTimes.getNextMonthFirstDay()); + sel2.addMustNotEqual("groupId", groupId); + sel2.addOrderbyDesc("endDate"); + GroupMembers members2 = ORM.get(ZTable.class).item(GroupMembers.class, sel2); + if (members2 == null) + { + return; + } + + Updater updater = new Updater(); + updater.addMust("userCode", userCode); + updater.addMust("startDate", members2.getStartDate()); + updater.addField("endDate", null); + ORM.get(ZTable.class).update(GroupMembers.class, updater); + + } + else + { + // 查询已生效数据 + Selector sel2 = new Selector("userCode", userCode); + sel2.addOr(new Selector().addMustIsNull("endDate").addMustThenL("startDate", DateTimes.getNextMonthFirstDay())); + sel2.addMust("isGroupLeader", 0); + sel2.addMust("groupId", groupId); + sel2.addOrderbyDesc("startDate"); + GroupMembers members2 = ORM.get(ZTable.class).item(GroupMembers.class, sel2); + if (members2 != null) + { + // 结束已生效数据 + Updater updater = new Updater(); + updater.addMust("groupId", groupId); + updater.addMust("startDate", members2.getStartDate()); + updater.addMust("userCode", userCode); + updater.addField("endDate", DateTimes.getLastMonthDay()); + ORM.get(ZTable.class).update(GroupMembers.class, updater); + } + } + + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/DesignOrderPresenter.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/DesignOrderPresenter.java new file mode 100644 index 0000000..4184caf --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/DesignOrderPresenter.java @@ -0,0 +1,1217 @@ +package com.zhiqim.yangcai.design.presenter; + +import java.io.File; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.imageio.stream.FileImageOutputStream; +import javax.imageio.stream.ImageOutputStream; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.annotation.AnIntercept; +import org.zhiqim.httpd.validate.ones.IsNotEmpty; +import org.zhiqim.httpd.validate.ones.IsSelect; +import org.zhiqim.httpd.validate.onex.IsInteger; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnTransaction; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.kernel.paging.PageBuilder; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Files; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Strings; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.kernel.util.codes.Base64; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.manager.dao.ZmrOperatorDao; +import org.zhiqim.manager.dbo.ZmrOperator; +import org.zhiqim.manager.dbo.ZmrParam; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ORMException; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.aliyun.oss.common.utils.StringUtils; +import com.zhiqim.yangcai.design.constant.VirtualAccountConstants; +import com.zhiqim.yangcai.design.constants.EventConstants; +import com.zhiqim.yangcai.design.constants.FileTypeConstants; +import com.zhiqim.yangcai.design.constants.StatusConstants; +import com.zhiqim.yangcai.design.dao.DesignerDao; +import com.zhiqim.yangcai.design.dao.DispatchDao; +import com.zhiqim.yangcai.design.dao.OrderCheckDao; +import com.zhiqim.yangcai.design.dao.OrderLogDao; +import com.zhiqim.yangcai.design.dao.ScoreDesignerRecordDao; +import com.zhiqim.yangcai.design.dao.VirtualAccountDao; +import com.zhiqim.yangcai.design.dao.WhetherMayLeadToDao; +import com.zhiqim.yangcai.design.dbo.editor.DesignEditorUser; +import com.zhiqim.yangcai.design.dbo.order.DesignAtta; +import com.zhiqim.yangcai.design.dbo.order.DesignAttaView; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; +import com.zhiqim.yangcai.design.dbo.order.DesignOrderRefundReason; +import com.zhiqim.yangcai.design.dbo.order.DesignSelfView; +import com.zhiqim.yangcai.design.dbo.order.OrdProgressNote; +import com.zhiqim.yangcai.design.dbo.order.SelfOrder; +import com.zhiqim.yangcai.design.dbo.template.MediaTemplate; +import com.zhiqim.yangcai.design.messagebox.ZqmMessageProducerHandler; +import com.zhiqim.yangcai.design.rmi.erp.ErpRmiService; +import com.zhiqim.yangcai.util.BusinessTbzBjqUtil; +import com.zhiqim.yangcai.util.ErpClassService; +import com.zhiqim.yangcai.util.ErpClassService.statusEnum; + +import yangcai.messagebox.constant.MessageSysType; +import yangcai.messagebox.constant.MessageTopicType; +import yangcai.messagebox.model.MessageBusi; + +/** + * 设计Presenter + * + * @version v1.0.0 @author Deng 2017-8-15 新建与整理 + */ +@AnAlias("DesignOrderPresenter") +@AnIntercept("chkZmrLogin") +public class DesignOrderPresenter +{ + private static final Log log = LogFactory.getLog(DesignOrderPresenter.class); + + /** + * 开启设计 + * + * @param request + * @param designId + * @throws Exception + */ + @AnTransaction + public static void doDesignOrderStart(HttpRequest request, long designId) throws Exception + { + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, new Selector().addMust("designId", designId)); + if (order == null) + { + request.setResponseError("订单不存在,请重新选择"); + return; + } + + if (order.getStatus() < StatusConstants.ORDER_10.value()) + { + request.setResponseError("订单已被取消"); + return; + } + + Updater exUpdater = new Updater(); + exUpdater.addMust("designId", designId); + exUpdater.addField("designBeginTime", Sqls.nowTimestamp()); + exUpdater.addField("status", StatusConstants.ORDER_30.value()); + ORM.get(ZTable.class).update(DesignOrder.class, exUpdater); + + // 录入操作日志 + OrderLogDao.saveOrderOperateLog(designId, request.getSessionName(), "开启设计", EventConstants.ORDER_3.value()); + } + + @AnTransaction + public static void checkReturn(HttpRequest request, long designId) throws Exception + { + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, new Selector().addMust("designId", designId)); + if (order == null) + { + request.setResponseError("订单不存在,请重新选择"); + return; + } + + if (order.getStatus() < StatusConstants.ORDER_10.value()) + { + request.setResponseError("订单已被取消"); + return; + } + if ("".equals(order.getReturnMsg()) || null == order.getReturnMsg()) + { + request.setResponseError("该订单不是淘宝自动同步退款订单,请联系客服处理"); + return; + } + Updater exUpdater = new Updater(); + exUpdater.addMust("designId", designId); + // exUpdater.addField("designBeginTime", Sqls.nowTimestamp()); + exUpdater.addField("status", StatusConstants.ORDER_F100.value()); + ORM.get(ZTable.class).update(DesignOrder.class, exUpdater); + + // 录入操作日志 + OrderLogDao.saveOrderOperateLog(designId, request.getSessionName(), "设计师点击退款", StatusConstants.ORDER_F100.value()); + } + + @AnTransaction + public static void checkNoReturn(HttpRequest request, long designId) throws Exception + { + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, new Selector().addMust("designId", designId)); + if (order == null) + { + request.setResponseError("订单不存在,请重新选择"); + return; + } + + if (order.getStatus() < StatusConstants.ORDER_10.value()) + { + request.setResponseError("订单已被取消"); + return; + } + if ("".equals(order.getReturnMsg()) || null == order.getReturnMsg()) + { + request.setResponseError("该订单不是淘宝自动同步退款订单,请联系客服处理"); + return; + } + Updater exUpdater = new Updater(); + exUpdater.addMust("designId", designId); + // exUpdater.addField("designBeginTime", Sqls.nowTimestamp()); + exUpdater.addField("status", order.getReturnAfterStatus()); + ORM.get(ZTable.class).update(DesignOrder.class, exUpdater); + + // 录入操作日志 + OrderLogDao.saveOrderOperateLog(designId, request.getSessionName(), "设计师点击拒绝退款", order.getReturnAfterStatus()); + } + + /** + * 暂停设计 + * + * @param request + * @param designId + * @throws Exception + */ + @AnTransaction + public static void doDesignOrderStop(HttpRequest request, long designId, int selectId, String reason) throws Exception + { + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, new Selector("designId", designId)); + + if (order.getStatus() < StatusConstants.ORDER_10.value()) + { + request.setResponseError("订单已被取消"); + return; + } + + if (order.getStatus() >= StatusConstants.ORDER_55.value()) + { + request.setResponseError("订单已定稿"); + return; + } + + if (Validates.isEmptyBlank(reason)) + { + request.setResponseError("暂停原因不能为空"); + return; + } + + String logItem = "暂停设计-补全资料"; + if (1 == selectId) + { + logItem = "暂停设计-联系不上"; + } + + Updater exUpdater = new Updater(); + exUpdater.addMust("designId", designId); + exUpdater.addField("designPauseReason", reason); + exUpdater.addField("designPauseTime", Sqls.nowTimestamp()); + exUpdater.addField("status", selectId == 0 ? StatusConstants.ORDER_36.value() : StatusConstants.ORDER_37.value()); + exUpdater.addField("modifyTime", Sqls.nowTimestamp()); + + OrdProgressNote progressNote = new OrdProgressNote(); + progressNote.setDesignId(designId); + progressNote.setOrdProgressNote(logItem + ":" + reason); + progressNote.setOperateCode(request.getSessionName()); + progressNote.setCreateTime(Sqls.nowTimestamp()); + + ORM.get(ZTable.class).insert(progressNote); + ORM.get(ZTable.class).update(DesignOrder.class, exUpdater); + // 录入操作日志 + OrderLogDao.saveOrderOperateLog(designId, request.getSessionName(), logItem, EventConstants.ORDER_6.value()); + + /* + * if (order.getMerchantId() == 1823193185001L) + * {// ERP同步更新订单进度备注 + * ErpRmiService.doOrdProgressNote(order.getDesignId(), Jsons.toString(progressNote)); + * } + * else + * {// 运营平台同步 + * BusinessPlatformClientUtil.doOrdProgressNote(order.getDesignId(), + * progressNote.getOrdProgressNote()); + * } + */ + } + + /** + * 请求退款 + * + * @param request + * @param designId + * @throws Exception + */ + @AnTransaction + public static void doDesignOrderRefund(HttpRequest request, String data, long designId, long refundReason) throws Exception + { + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, new Selector().addMust("designId", designId)); + if (order == null) + { + request.setResponseError("订单不存在,请重新选择"); + return; + } + if (order.getStatus() < StatusConstants.ORDER_10.value()) + { + request.setResponseError("订单已被取消"); + return; + } + + String dateDir = DateTimes.getDateTime8String(); + String rootDir = Strings.trimRight(request.getContext().getAttributeString("upload.large.rootDir"), "/"); + String operatorCode = request.getSessionName(); + + // 生成初稿缩略图文件路径 + String draftFile = "申请退款"; + String fileName = designId + "-" + "ApplyRefundFile" + ".png"; + String draftPath = rootDir + "/" + dateDir + "/" + draftFile; + + Files.mkDirectory(draftPath);// 创建目录 + int idx = data.indexOf(","); + byte[] imageBytes = Base64.decode(data.substring(idx + 1)); + + // imgData = imgBase64Str.replace("data:image/pngbase64,", ""); + // byte[] imageBytes = Base64Decoder.decode(imgData.getBytes("utf-8")); + File file = new File(draftPath + "/" + fileName); + ImageOutputStream out = new FileImageOutputStream(file); + out.write(imageBytes); + out.flush(); + out.close(); + + // 插入订单附属表 + DesignAtta oa = new DesignAtta(); + oa.setAttaId(Ids.longId()); + oa.setDesignId(designId); + oa.setAttaModul(FileTypeConstants.FILE_REFUND.value()); + oa.setFileName(fileName); + oa.setFileType("png"); + oa.setFileSize(file.length()); + oa.setSavePath(draftPath + "/" + fileName); + oa.setUploadTime(Sqls.nowTimestamp()); + oa.setOperatorCode(operatorCode); + ORM.get(ZTable.class).insert(oa); + + Updater updater = new Updater(); + updater.addMust("designId", designId); + updater.addField("status", StatusConstants.ORDER_34.value()); + updater.addField("refundTime", DateTimes.getDateTimeString()); + updater.addField("complaintFlag", 0); + ORM.get(ZTable.class).update(DesignOrder.class, updater); + + Updater selfOrderUpdater = new Updater(); + selfOrderUpdater.addMust("designId", designId); + selfOrderUpdater.addField("refundReason", refundReason); + ORM.get(ZTable.class).update(SelfOrder.class, selfOrderUpdater); + /* + * if (order.getMerchantId() == 1920862616055L || order.getMerchantId() == 2000922684001L || + * order.getMerchantId() == 2019491431057L) + * { + * boolean flag = BusinessPlatformClientUtil.synStatus(order); + * if (!flag) + * { + * Boolean reTry = BusinessPlatformClientUtil.synStatus(order); + * if (!reTry) + * { + * throw new Exception("请求退款:同步运营平台状态失败"); + * } + * } + * } + * else + * { + * boolean erpFlag = ErpRmiService.doSynOrder(designId, order.getDesigner()); + * if (!erpFlag) + * { + * boolean reTryERPFlag = ErpRmiService.doSynOrder(designId, order.getDesigner()); + * if (!reTryERPFlag) + * { + * throw new Exception("请求退款:同步ERP状态失败"); + * } + * } + * } + */ + + // 录入操作日志 + OrderLogDao.saveOrderOperateLog(designId, request.getSessionName(), "设计师【" + order.getDesigner() + "】申请退款", EventConstants.ORDER_5.value()); + } + + /** + * 状态查询 + * + * @param request + * @param designId + * @throws Exception + */ + @AnTransaction + public static void doQueryStatus(HttpRequest request, long designId, String oprType) throws Exception + { + DesignOrder ord = ORM.get(ZTable.class).item(DesignOrder.class, designId); + if (ord == null) + { + request.setResponseError("订单不存在,请重新选择"); + return; + } + + if ("PAUSE".equals(oprType)) + {// 暂停设计 + if (StatusConstants.ORDER_34.value() == ord.getStatus()) + {// 请求退款 不允许暂停 + request.setResponseError("该订单状态不允许暂停设计"); + return; + } + else if (StatusConstants.ORDER_36.value() == ord.getStatus() || StatusConstants.ORDER_37.value() == ord.getStatus()) + { + request.setResponseError("该订单已暂停中,请不要重复操作"); + return; + } + } + else if ("REFUND".equals(oprType)) + {// 请求对款 + if (StatusConstants.ORDER_34.value() == ord.getStatus()) + { + request.setResponseError("该订单已申请退款,请不要重复操作"); + return; + } + } + else if ("RESUME".equals(oprType)) + { + if (StatusConstants.ORDER_36.value() != ord.getStatus() && StatusConstants.ORDER_37.value() != ord.getStatus()) + { + request.setResponseError("请检查订单状态,再开启设计操作"); + return; + } + } + else if ("SUMBIT".equals(oprType)) + { + if (StatusConstants.ORDER_30.value() != ord.getStatus()) + { + request.setResponseError("请检查订单状态,再完成初稿操作"); + return; + } + } + } + + /** + * 完成初稿并生成初稿缩略图
            + * 新增加审核流程,caohong 2021-9-16 + * + * @param request + * @param imgBase64Str 截图内容 + * @throws Exception + */ + @AnTransaction + public void saveDraftCertificate(HttpRequest request, String imgData, long designId) throws Exception + { + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, new Selector("designId", designId)); + if (order == null) + { + request.setResponseError("操作失败,订单数据异常"); + return; + } + + // 是否有权限提交初稿 + WhetherMayLeadToDao.ergodicOpecoterCode(request, request.getSessionName(), order); + + String dateDir = DateTimes.getDateTime8String(); + String rootDir = Strings.trimRight(request.getContext().getAttributeString("upload.large.rootDir"), "/"); + String operatorCode = request.getSessionName(); + + // 生成初稿缩略图文件路径 + String draftFile = "初稿缩略图"; + String fileName = designId + "-" + "FristThumFile" + ".png"; + String draftPath = rootDir + "/" + dateDir + "/" + draftFile; + + Files.mkDirectory(draftPath);// 创建目录 + int idx = imgData.indexOf(","); + byte[] imageBytes = Base64.decode(imgData.substring(idx + 1)); + + File file = new File(draftPath + "/" + fileName); + ImageOutputStream out = new FileImageOutputStream(file); + out.write(imageBytes); + out.flush(); + out.close(); + + // 插入订单附属表 + DesignAtta oa = new DesignAtta(); + oa.setAttaId(Ids.longId()); + oa.setDesignId(designId); + oa.setAttaModul(FileTypeConstants.FILE_FIRSTTHUMFILE.value()); + oa.setFileName(fileName); + oa.setFileType("png"); + oa.setFileSize(file.length()); + oa.setSavePath(draftPath + "/" + fileName); + oa.setUploadTime(Sqls.nowTimestamp()); + oa.setOperatorCode(operatorCode); + ORM.get(ZTable.class).insert(oa); + + // 更新派单日志状态、计师初稿时间、设计师订单数量 + DispatchDao.setDraftType(request.getSessionName(), order.getTypeId()); // 更新最近一次初稿时间 + + // 判断是否属于免审核规则,反之需要人工审核 + // 加急单必走审核 + // if (DesignerDao.isFreeCheck(operatorCode, order.getTypeId()) && !order.isUrgent()) + // { + // 更新初稿状态 + Updater updater = new Updater(); + updater.addMust("designId", designId); + updater.addField("status", StatusConstants.ORDER_50.value()); + updater.addField("designDraftTime", Sqls.nowTimestamp()); + updater.addField("modifyTime", Sqls.nowTimestamp()); + ORM.get(ZTable.class).update(DesignOrder.class, updater); + OrderLogDao.saveOrderOperateLog(designId, StatusConstants.ORDER_50.value(), order.getDesigner(), request.getSessionName(), "上传文件完成初稿,免审核", + EventConstants.ORDER_7.value()); + // } + /* + * else + * { + * // 更新初稿状态 + * Updater updater = new Updater(); + * updater.addMust("designId", designId); + * updater.addField("status", StatusConstants.ORDER_40.value()); + * updater.addField("designDraftTime", Sqls.nowTimestamp()); + * updater.addField("modifyTime", Sqls.nowTimestamp()); + * ORM.get(ZTable.class).update(DesignOrder.class, updater); + * OrderLogDao.saveOrderOperateLog(designId, StatusConstants.ORDER_40.value(), + * order.getDesigner(), request.getSessionName(), "上传文件提交初稿,等待审核中", + * EventConstants.ORDER_8.value()); + * } + */ + + } + + /** + * + * [简要描述]: 标准自来稿快捷定稿
            + * [详细描述]:
            + * + * @author gjx + * @param request + * @param designId + * @throws Exception + */ + public static void doEasyDraftOrderToComplete(HttpRequest request, long designId) throws Exception + { + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, new Selector("designId", designId)); + if (order == null) + { + request.setResponseError("操作失败,订单数据异常"); + return; + } + if (order.getStatus() < StatusConstants.ORDER_10.value()) + { + request.setResponseError("操作失败,订单已被取消"); + return; + } + + if (order.getStatus() != StatusConstants.ORDER_30.value()) + { + request.setResponseError("该订单状态不是正在设计,不允许定稿操作"); + return; + } + + // 是否有权限提交初稿 + WhetherMayLeadToDao.ergodicOpecoterCode(request, request.getSessionName(), order); + + // 印刷订单需要检查印刷文件是否存在 + if (!order.isOnlyDesign()) + { + Selector selector = new Selector(); + selector.addMust("designId", designId); + selector.addMaybe("attaModul", FileTypeConstants.FILE_END.value()); + if (ORM.get(ZTable.class).count(DesignAtta.class, selector) == 0) + { + request.setResponseError("请先提交印刷文件,再完成定稿"); + return; + } + String msg = ""; + // TODO zzq的文件校验rP + Selector selectorZmrParam = new Selector(); + selectorZmrParam.addMust("paramGroup", "yangcai.design"); + selectorZmrParam.addMaybe("paramKey", "isChekEndFile"); + ZmrParam zmrParam = ORM.get(ZTable.class).item(ZmrParam.class, selectorZmrParam); + if (zmrParam != null && "1".equals(zmrParam.getParamValue()) && order.getTemplateId() > 0) + {// 是否开启定稿的文件校验 + DesignAtta atta = ORM.get(ZTable.class).item(DesignAtta.class, selector); + msg = OrderCheckDao.checkEndFile2(order, atta); + if (!"".equals(msg)) + { + request.setResponseError(msg); + return; + } + } + + // 后工文件检测 --caohong + msg = OrderCheckDao.isAfterFileCheck(order); + if (!"".equals(msg)) + { + request.setResponseError(msg); + return; + } + } + + // 先初稿操作 + OrderLogDao.saveOrderOperateLog(order, request.getSessionName(), "完成初稿", EventConstants.ORDER_7.value()); + DispatchDao.setDraftType(request.getSessionName(), order.getTypeId()); // 更新最近一次初稿时间 + + Updater updater = new Updater(); + updater.addMust("designId", designId); + updater.addField("designDraftTime", Sqls.nowTimestamp()); + updater.addField("designEndTime", Sqls.nowTimestamp()); + updater.addField("status", StatusConstants.ORDER_55.value());// 定稿状态 + updater.addField("modifyTime", Sqls.nowTimestamp()); + ORM.get(ZTable.class).update(DesignOrder.class, updater); + + OrderLogDao.saveOrderOperateLog(designId, StatusConstants.ORDER_55.value(), order.getDesigner(), request.getSessionName(), "上传文件完成定稿(印前待审)", + EventConstants.ORDER_9.value()); + order = ORM.get(ZTable.class).item(DesignOrder.class, new Selector("designId", designId)); + + } + + /** + * 设计订单完成定稿
            + * 增加待审核流程 2021-9-9 16:52:03 caohong + * + * @param request + * @param designId + * @throws Exception + */ + @AnTransaction + public static void doDraftOrderToComplete(HttpRequest request, long designId) throws Exception + { + DesignSelfView order = ORM.get(ZView.class).item(DesignSelfView.class, new Selector("designId", designId)); + if (order == null) + { + request.setResponseError("操作失败,订单数据异常"); + return; + } + if (order.getStatus() != StatusConstants.ORDER_50.value()) + { + request.setResponseError("该订单状态不是初稿状态,请先完成初稿操作"); + return; + } + + // 是否有权限提交初稿 + WhetherMayLeadToDao.ergodicOpecoterCode(request, request.getSessionName(), order); + + Selector designSelector = new Selector(); + designSelector.addMust("designId", designId); + designSelector.addMaybe("attaModul", FileTypeConstants.FILE_DESGIN.value()); + if (ORM.get(ZTable.class).count(DesignAtta.class, designSelector) == 0) + { + DesignOrder designOrder = ORM.get(ZTable.class).item(DesignOrder.class, new Selector("designId", designId)); + if (designOrder.getTemplateId() < 1) + { + request.setResponseError("请先提交设计文件,再完成定稿"); + return; + } + } + + // 印刷订单需要检查印刷文件是否存在 + if (!order.isOnlyDesign()) + { + Selector selector = new Selector(); + selector.addMust("designId", designId); + selector.addMaybe("attaModul", FileTypeConstants.FILE_END.value()); + if (ORM.get(ZTable.class).count(DesignAtta.class, selector) == 0) + { + request.setResponseError("请先提交印刷文件,再完成定稿"); + return; + } + String msg = ""; + // TODO zzq的文件校验 + Selector selectorZmrParam = new Selector(); + selectorZmrParam.addMust("paramGroup", "yangcai.design"); + selectorZmrParam.addMaybe("paramKey", "isChekEndFile"); + ZmrParam zmrParam = ORM.get(ZTable.class).item(ZmrParam.class, selectorZmrParam); + if (zmrParam != null && "1".equals(zmrParam.getParamValue()) && order.getTemplateId() > 0) + {// 是否开启定稿的文件校验 + DesignAtta atta = ORM.get(ZTable.class).item(DesignAtta.class, selector); + msg = OrderCheckDao.checkEndFile2(order, atta); + if (!"".equals(msg)) + { + request.setResponseError(msg + ",请修改后重新同步文件"); + return; + } + } + + // 后工文件检测 --caohong + msg = OrderCheckDao.isAfterFileCheck(order); + if (!"".equals(msg)) + { + request.setResponseError(msg); + return; + } + } + + // 判断是否属于免审核规则,反之需要人工审核 caohong 2021-9-16 + // 加急单必走审核 hc 2021-10-21 + if (DesignerDao.isFreeCheck(request.getSessionName(), order.getTypeId()) && !order.isUrgent()) + { + // 定稿触发设计师佣金 奖励 + boolean finishDesign = VirtualAccountDao.finishDesign(order, order.getDesigner(), + Integer.parseInt(VirtualAccountConstants.TRANSACTION_STATUS_4.value())); + if (!finishDesign) + { + request.setResponseError("完成定稿失败,设计费计算错误"); + log.error(request.getSessionName() + ":【" + order.getDesignId() + "】完成定稿失败,设计费计算错误"); + return; + } + + // 定稿触发设计师积分 奖励 + ScoreDesignerRecordDao.finishDesign(order); + + // 修改定稿状态 + Updater updater = new Updater(); + updater.addMust("designId", designId); + updater.addField("designEndTime", Sqls.nowTimestamp()); + updater.addField("status", StatusConstants.ORDER_55.value()); + updater.addField("modifyTime", Sqls.nowTimestamp()); + ORM.get(ZTable.class).update(DesignOrder.class, updater); + + OrderLogDao.saveOrderOperateLog(designId, StatusConstants.ORDER_55.value(), order.getDesigner(), request.getSessionName(), "上传文件完成定稿,免审核", + EventConstants.ORDER_9.value()); + + } + else + { + // 修改定稿状态 + Updater updater = new Updater(); + updater.addMust("designId", designId); + updater.addField("status", StatusConstants.ORDER_52.value()); + updater.addField("modifyTime", Sqls.nowTimestamp()); + ORM.get(ZTable.class).update(DesignOrder.class, updater); + + OrderLogDao.saveOrderOperateLog(designId, StatusConstants.ORDER_52.value(), order.getDesigner(), request.getSessionName(), "上传文件提交定稿,等待审核中", + EventConstants.ORDER_13.value()); + } + + } + + /** + * 修改行业 + * + * @param request + * @throws Exception + */ + public static void doModifyIndustry(HttpRequest request) throws Exception + { + request.addValidate(new IsNotEmpty("designId", "请选择订单")); + request.addValidate(new IsSelect("industryId", "请选择行业")); + if (!request.chkValidate()) + { + request.setResponseError(request.getAlertMsg()); + return; + } + + long designId = request.getParameterLong("designId"); + long industryId = request.getParameterLong("industryId"); + + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, new Selector("designId", designId)); + if (order == null) + { + request.returnCloseDialog("订单【" + designId + "】不存在,请重新选择!"); + return; + } + + Updater updater = new Updater(); + updater.addMust("designId", designId); + updater.addField("industryId", industryId); + updater.addField("modifyTime", Sqls.nowTimestamp()); + ORM.get(ZTable.class).update(DesignOrder.class, updater); + + OrderLogDao.saveOrderOperateLog(designId, request.getSessionName(), "修改行业", EventConstants.ORDER_20.value()); + } + + /*** + * 查询 设计订单 (客户端调用) + * + * @param request + * @throws Exception + */ + public static void doQueryDesignOrder(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page", 1); + int pageSize = request.getParameterInt("pageSize", 15); + String startDate = request.getParameter("startDate", DateTimes.getPreviousDateStringByMonth(1)); + String endDate = request.getParameter("endDate", DateTimes.getDateString()); + long designId = request.getParameterLong("designId"); + + Selector sel = new Selector(); + if (designId > 0) + { + sel.addOr(new Selector("designId", designId).addMust("outId", designId)); + } + + sel.addMaybeLike("buyerNick", request.getParameter("buyerNick")); + sel.addMaybeLike("tids", request.getParameter("tid")); + sel.addMaybe("draftType", request.getParameterInt("draftType")); + sel.addMaybe("status", request.getParameterInt("status", StatusConstants.ORDER_30.value())); + sel.addMaybe("designer", request.getParameter("designer")); + sel.addMaybe("receiverName", request.getParameter("receiverName")); + sel.addMustThenGE("designReceiveTime", Sqls.toTimestamp(startDate, "00:00:00")); + sel.addMustThenLE("designReceiveTime", Sqls.toTimestamp(endDate, "23:59:59")); + sel.addMustNotEqual("attaModul", FileTypeConstants.FILE_END.value()); + + sel.addOrderbyAsc("designReceiveTime"); + + Map jsonMap = new HashMap(); + List temp = ORM.get(ZView.class).list(DesignAttaView.class, sel); + Map orderMap = new HashMap(); + for (DesignAttaView o : temp) + { + orderMap.put(o.getDesignId(), o); + } + List ssList = new ArrayList(); + for (DesignAttaView DesignOrderAttaView : orderMap.values()) + { + ssList.add(DesignOrderAttaView.getDesignId()); + } + + PageResult pageResult = PageBuilder.pageResult(page, pageSize, orderMap.values()); + jsonMap.put("orderList", pageResult.list()); + jsonMap.put("paramMap", request.getParameterMap()); + jsonMap.put("startDate", startDate); + jsonMap.put("endDate", endDate); + jsonMap.put("page", page); + jsonMap.put("pageSize", pageSize); + jsonMap.put("totalPages", pageResult.totalPages()); + + request.setResponseResult(Jsons.toString(jsonMap)); + } + + /** + * 查询订单是否关联模板 + * + * @param request + * @return =0表示不跳转,=1表示打开新窗口,=2表示不打开新窗口 + * @throws Exception + */ + public static void doDesignerOrderTemplate(HttpRequest request) throws Exception + { + ZmrSessionUser sessionUser = request.getSessionUser(ZmrSessionUser.class); + String url = request.getParameterNoFileterOnCNT("validateUrl"); + sessionUser.setMainUrl(url); + sessionUser.setWelcomeUrl(url); + request.setResponseResult(url); + } + + /** 查询订单信息 */ + public static void doQueryOrderInfo(HttpRequest request) + { + request.addValidate(new IsInteger("mediaId", "模板id不存在")); + if (!request.chkValidate()) + { + return; + } + + long mediaId = request.getParameterLong("mediaId"); + try + { + MediaTemplate template = ORM.get(ZTable.class).item(MediaTemplate.class, mediaId); + if (template == null) + { + return; + } + + long designId = template.getDesignId(); + + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, designId); + if (order == null) + { + return; + } + + request.setResponseResult(Jsons.toString(order)); + } + catch (Exception e) + { + + } + } + + /** + * + * [简要描述]:订单申请退款前验证
            + * [详细描述]:
            + * + * @author gjx + * @param request + * @throws Exception + */ + public static void doDesignOrderRefundValidate(HttpRequest request) throws Exception + { + long designId = request.getParameterLong("designId"); + + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, new Selector("designId", designId)); + if (order == null) + { + request.setResponseError("订单【" + designId + "】不存在,请重新选择!"); + return; + } + + // long merchantId = order.getMerchantId(); + // if (merchantId == 2000922684001L) + // {// 秒绘商城 + // request.setResponseError("该订单不支持申请退款"); + // return; + // } + + // String sellerNick = order.getShopNick(); + // if (BaseConstants.TRANSFER_ACCOUNTS.equals(sellerNick) || + // BaseConstants.TRANSFER_AFS_ACCOUNTS.equals(sellerNick) + // || BaseConstants.CONSIGN_ACCOUNTS.equals(sellerNick) || + // BaseConstants.WEISHANG_ACCOUNTS.equals(sellerNick)) + // {// 寄存单、转账单、售后单等 + // request.setResponseError("该订单暂不支持取消操作,若要取消订单请联系售后"); + // return; + // } + + if (StatusConstants.ORDER_34.value() == order.getStatus()) + { + request.setResponseError("该订单已申请退款,请不要重复操作"); + return; + } + // + // if (merchantId == 1920862616055L || merchantId == 2019491431057L) + // {// 淘印通、秒绘云 + // request.setResponseResult("取消订单需商家审核同意,确认提交?"); + // return; + // } + // if (merchantId == 1823193185001L && Validates.isNotEmpty(order.getTids())) + // {// 扬彩印刷 + // String[] tids = order.getTids().split(","); + // int tidNum = tids.length; + // String[] refunds = new String[tidNum]; + // for (int i = 0; i < tidNum; i++) + // { + // boolean refund = doQueryTaoBaoOrderRefundStatus(sellerNick, tids[i]); + // + // refunds[i] = String.valueOf(refund); + // } + // if (Lists.toList(refunds).contains("false")) + // {// 1、淘宝订单有未关闭情况成功 + // request.setResponseError("该订单暂不支持取消操作,若要取消订单请联系售后"); + // return; + // } + // else + // {// 2、淘宝订单都关闭退款成功 + // request.setResponseResult("确认取消订单?"); + // return; + // } + // } + } + + /** + * 添加退款问题配置 + * + * @author 谢盼 + * @param 问题id + * @return + * @throws Exception + */ + public static void designOrderRefundReasonAdd(HttpRequest request) throws ORMException, SQLException + { + String title = request.getParameter("reason"); + if (StringUtils.isNullOrEmpty(title)) + { + + request.setResponseError("标题不能为空"); + } + DesignOrderRefundReason model = new DesignOrderRefundReason(); + model.setTitle(title); + model.setUpdateTime(Sqls.nowTimestamp()); + ORM.get(ZTable.class).insert(model); + } + + /** + * 删除退款问题配置 + * + * @author 谢盼 + * @param 问题id + * @return + * @throws Exception + */ + public static void designOrderRefundReasonDelete(HttpRequest request, Long id) throws ORMException, SQLException + { + ORM.get(ZTable.class).delete(DesignOrderRefundReason.class, id); + } + + /** + * 修改退款问题配置 + * + * @author 谢盼 + * @param 问题id,问题标题 + * @return + * @throws Exception + */ + public static void designOrderRefundReasonModify(HttpRequest request, String reason, Long id) throws ORMException, SQLException + { + ORM.get(ZTable.class).update(DesignOrderRefundReason.class, new Updater().addField("title", reason).addMust("id", id)); + } + + /** + * 退款订单审核同意退款 + * + * @author 谢盼 + * @param 订单id + * @return 责任人id + * @throws Exception + */ + @AnTransaction + public static void designOrderAgreeRefund(HttpRequest request) throws Exception + { + long designOrderId = Long.valueOf(request.getParameter("designOrderId")); + int responsibility = Integer.valueOf(request.getParameter("responsibility")); + Updater orderUpdater = new Updater(); + if (responsibility != 0) + { + orderUpdater.addField("status", StatusConstants.ORDER_F100.value()); + } + else + { + orderUpdater.addField("status", StatusConstants.ORDER_F110.value()); + } + orderUpdater.addMust("designId", designOrderId); + + ORM.get(ZTable.class).update(DesignOrder.class, orderUpdater); + + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, designOrderId); + if (order.getMerchantId() == 1823193185001L) + { + + Boolean flag = ErpRmiService.doSynOrderCancel(designOrderId); + if (!flag) + { + Boolean reTry = ErpRmiService.doSynOrderCancel(designOrderId); + if (!reTry) + { + throw new Exception("请求退款:同步ERP状态失败"); + } + } + } + try + { + // 订单审核退回消息提醒 + MessageBusi messageBusi = new MessageBusi(); + messageBusi.setId(String.valueOf(Ids.longId13_4())); + messageBusi.setProducerOperateType("1"); + messageBusi.setProducerOperateCode(request.getSessionName()); + messageBusi.setProducerOperateName(request.getSessionName()); + messageBusi.setConsumerPlatformType(MessageSysType.DESIGN_CODE); + messageBusi.setConsumerOperateCode(order.getDesigner()); + messageBusi.setConsumerOperateName(order.getDesigner()); + messageBusi.setConsumerOperateType("1"); + messageBusi.setMessageType(3); + messageBusi.setOrderId(String.valueOf(order.getDesignId())); + messageBusi.setTopic(MessageTopicType.AFTER_ORDER); + messageBusi.setMessageBody("您有一条退款订单(" + order.getDesignId() + ")审核通过,请前往查看。"); + HashMap propertyMap = new HashMap(); + propertyMap.put("designId", String.valueOf(order.getDesignId())); + propertyMap.put("title", "退款订单审核提醒"); + propertyMap.put("sender", request.getSessionName()); + ZqmMessageProducerHandler.sendMessage(messageBusi, propertyMap); + } + catch (Exception e) + { + // 推送消息失败 + log.error(e.getMessage(), e); + } + OrderLogDao.saveOrderOperateLog(designOrderId, request.getSessionName(), "设计师【" + order.getDesigner() + "】申请退款审核通过", EventConstants.ORDER_39.value()); + + } + + /** + * 退款订单审核拒绝退款 + * + * @author 谢盼 + * @param 订单id + * @throws Exception + */ + public static void designOrderDisAgreeRefund(HttpRequest request) throws ORMException, SQLException + { + long designId = Long.valueOf(request.getParameter("designId")); + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, new Selector().addMaybe("designId", designId)); + + // SelfOrder selfOrder = ORM.get(ZTable.class).item(SelfOrder.class, designId); + Updater updater = new Updater(); + updater.addMust("designId", designId); + updater.addField("status", StatusConstants.ORDER_30.value()); + ORM.get(ZTable.class).update(DesignOrder.class, updater); + + if (order != null && !StringUtils.isNullOrEmpty(order.getTids())) + { + new ErpClassService(order.getTids(), order.getDesigner(), statusEnum.TO_BE_DESIGNEDING.getCode()); + } + Selector selector = new Selector(); + selector.addMust("designId", designId); + selector.addMust("attaModul", "ApplyRefundFile"); + DesignAtta designAtta = ORM.get(ZTable.class).item(DesignAtta.class, selector); + try + { + File file = new File(designAtta.getSavePath()); + if (file.exists() && file.isFile()) + { + file.delete(); + // 删除订单附件截图 + Selector deleteSelector = new Selector(); + deleteSelector.addMust("designId", designAtta.getDesignId()); + deleteSelector.addMust("attaModul", "ApplyRefundFile"); + ORM.get(ZTable.class).delete(DesignAtta.class, deleteSelector); + } + } + catch (Exception e) + { + log.error("拒绝退款订单截图删除异常,订单号:{}", designId, e.getMessage(), e); + } + try + { + // 订单审核退回消息提醒 + MessageBusi messageBusi = new MessageBusi(); + messageBusi.setId(String.valueOf(Ids.longId13_4())); + messageBusi.setProducerOperateType("1"); + messageBusi.setProducerOperateCode(request.getSessionName()); + messageBusi.setProducerOperateName(request.getSessionName()); + messageBusi.setConsumerPlatformType(MessageSysType.DESIGN_CODE); + messageBusi.setConsumerOperateCode(order.getDesigner()); + messageBusi.setConsumerOperateName(order.getDesigner()); + messageBusi.setConsumerOperateType("1"); + messageBusi.setMessageType(3); + messageBusi.setOrderId(String.valueOf(order.getDesignId())); + messageBusi.setTopic(MessageTopicType.AFTER_ORDER); + messageBusi.setMessageBody("您有一条退款订单(" + order.getDesignId() + ")审核被驳回,请前往查看。"); + HashMap propertyMap = new HashMap(); + propertyMap.put("designId", String.valueOf(order.getDesignId())); + propertyMap.put("title", "退款订单审核提醒"); + propertyMap.put("sender", request.getSessionName()); + ZqmMessageProducerHandler.sendMessage(messageBusi, propertyMap); + } + catch (Exception e) + { + // 推送消息失败 + log.error("退款订单审核驳回:消息推送失败:订单号【{}】", designId, e.getMessage(), e); + } + OrderLogDao.saveOrderOperateLog(designId, request.getSessionName(), "设计师【" + order.getDesigner() + "】申请退款审核驳回", EventConstants.ORDER_40.value()); + } + + public static void toSyncFile(HttpRequest request) throws Exception + { + String operatorCode = request.getSessionName(); + ZmrOperator zmrOperator = ZmrOperatorDao.getOperator(request, operatorCode); + DesignEditorUser designEditorUser = ORM.get(ZTable.class).item(DesignEditorUser.class, + new Selector().addMust("userName", operatorCode).addMust("mobile", zmrOperator.getOperatorMobile())); + if (null == designEditorUser) + { + designEditorUser = new DesignEditorUser(); + designEditorUser.setUserName(operatorCode); + designEditorUser.setMobile(zmrOperator.getOperatorMobile()); + designEditorUser.setType(1);// 设计师,2为客户 + ORM.get(ZTable.class).insert(designEditorUser); + designEditorUser = ORM.get(ZTable.class).item(DesignEditorUser.class, new Selector().addMust("userName", operatorCode)); + } + long designId = request.getParameterLong("designId"); + DesignOrder designOrder = ORM.get(ZTable.class).item(DesignOrder.class, new Selector().addMust("designId", designId)); + long uid = designEditorUser.getEditorId(); + int template_id = designOrder.getTemplateId(); + String[] typeArr = + { + "jpg", "cmyk", "rgb", "jpg-rgb" + }; + + // 查询系统里面是否已经有了tbz的文件 + List attaList = ORM.get(ZTable.class).list(DesignAtta.class, + new Selector().addMustInLong("designId", designId).addMust("attaModul", FileTypeConstants.FILE_TBZ.value())); + if (attaList.size() >= 1) + {// 不要重复同步了 + return; + } + + for (int i = 0; i < typeArr.length; i++) + { + String type = typeArr[i]; + // String type = "jpg";// cmyk\rgb,cmyk,jpg-rgb + long order_no = designOrder.getDesignId(); + Map map = new HashMap<>(); + map.put("uid", uid); + map.put("template_id", template_id); + map.put("type", type); + map.put("order_no", order_no + "_" + type); + BusinessTbzBjqUtil.toSyncFile(map, Integer.valueOf(String.valueOf(designEditorUser.getEditorId())), designEditorUser.getUserName()); + } + + } + + public static void doUpdateTemplateId(HttpRequest request) throws Exception + { + int templateId = request.getParameterInt("templateId"); + long designId = request.getParameterLong("designId"); + Updater updater = new Updater(); + updater.addMust("designId", designId); + updater.addField("templateId", templateId); + ORM.get(ZTable.class).update(DesignOrder.class, updater); + } + + public static void delEditorFile(HttpRequest request) throws Exception + { + long designId = request.getParameterLong("designId"); + // 删除文件 + List attaList = ORM.get(ZTable.class).list(DesignAtta.class, new Selector().addMustInLong("designId", designId)); + for (int i = 0; i < attaList.size(); i++) + { + DesignAtta designAtta = attaList.get(i); + // 如果是编辑器文件或者印刷文件,则直接删除 + if ("TbzFile".equals(designAtta.getAttaModul()) || "EndFile".equals(designAtta.getAttaModul())) + { + delete(request, designAtta.getAttaId()); + } + + } + } + + public static String delete(HttpRequest request, long attaidArr) throws Exception + { + List attaList = ORM.get(ZTable.class).list(DesignAtta.class, new Selector().addMustInLong("attaId", attaidArr)); + for (DesignAtta atta : attaList) + { + long designId = atta.getDesignId(); + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, designId); + if (order == null) + { + return "订单不存在"; + } + + if (order.getStatus() >= StatusConstants.ORDER_60.value() && !atta.getAttaModul().equals(FileTypeConstants.FILE_AFTE_COMPLAIN_EVIDENCE.value())) + {// 非售后 凭证文件不允许删除 + return "订单已审,不允许删除订单文件"; + } + + OrderCheckDao.doDeleteAttaFile(atta); + OrderLogDao.saveOrderOperateLog(atta.getDesignId(), request.getSessionName(), "删除上传的[" + atta.getAttaModul() + "]文件", + EventConstants.ORDER_20.value()); + + } + return null; + } + + public static String doDesignOrdertoERP(HttpRequest request, long designId) throws Exception + { + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, new Selector().addMust("designId", designId)); + if (order == null) + { + request.setResponseError("订单不存在,请重新选择"); + return "订单不存在,请重新选择"; + } + + if (!order.getTids().equals("")) + + { + return order.getTids(); + } + return "订单不存在,请重新选择"; + } +} \ No newline at end of file diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/DesignerNoticePresenter.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/DesignerNoticePresenter.java new file mode 100644 index 0000000..4e48a49 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/DesignerNoticePresenter.java @@ -0,0 +1,129 @@ +package com.zhiqim.yangcai.design.presenter; + +import java.sql.SQLException; +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.HttpSessionManager; +import org.zhiqim.httpd.HttpSessionUser; +import org.zhiqim.httpd.HttpWebsocketConnection; +import org.zhiqim.httpd.HttpWebsocketManager; +import org.zhiqim.httpd.context.annotation.AnIntercept; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ORMException; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Updater; + +import com.alibaba.fastjson.JSON; +import com.zhiqim.yangcai.design.dbo.notice.Notice; + +/** + * 派单通知Presenter + * + * @version v1.0.0 @author Deng 2017-12-22 新建与整理 + */ +@AnAlias("DesignerNoticePresenter") +@AnIntercept("chkZmrLogin") +public class DesignerNoticePresenter +{ + /** + * 派单消息提醒 + * + * @param operatorCode + * @param operatorPass + * @return + */ + public static void doDispatchNotice(HttpRequest request, String operatorCode, String text) + { + if (Validates.isEmptyBlank(operatorCode) || Validates.isEmptyBlank(text)) + { + return; + } + + HttpWebsocketManager websocketManager = request.getContext().getWebsocketManager(); + HttpSessionManager sessionManager = request.getContext().getSessionManager(); + List sessionUserList = sessionManager.getSessionUserList(); + for (HttpSessionUser sUser : sessionUserList) + { + if (!operatorCode.equals(sUser.getSessionName())) + { + continue; + } + + List connList = websocketManager.get("yangcai_designer", sUser.getSessionId()); + for (HttpWebsocketConnection conn : connList) + { + conn.send(text); + } + } + } + + /** + * 首页公告详情 + * + * @return + * @throws SQLException + * @throws ORMException + */ + public static void getNoticeInfo(HttpRequest request, long id) throws ORMException, SQLException + { + Notice notice = ORM.get(ZTable.class).item(Notice.class, id); + request.setResponseResult(JSON.toJSONString(notice)); + } + + /** + * 启用公告 + * + * @return + * @throws SQLException + * @throws ORMException + */ + public static void doEnable(HttpRequest request, long id) throws ORMException, SQLException + { + Notice notice = ORM.get(ZTable.class).item(Notice.class, id); + int status = notice.getStatus(); + if ((status < 0) || status == 1) + { + request.setResponseError("该公告已发布,请不要重复操作"); + return; + } + Updater updater = new Updater(); + updater.addMust("id", id); + updater.addField("status", 1); + updater.addField("updateTime", Sqls.nowTimestamp()); + updater.addField("updateUser", request.getSessionName()); + updater.addField("finshTime", Sqls.nowTimestamp()); + updater.addField("finshUser", request.getSessionName()); + ORM.get(ZTable.class).update(Notice.class, updater); + } + + /** + * 下线公告 + * + * @return + * @throws SQLException + * @throws ORMException + */ + public static void doBlockUp(HttpRequest request, long id) throws ORMException, SQLException + { + Notice notice = ORM.get(ZTable.class).item(Notice.class, id); + int status = notice.getStatus(); + if (status == 2) + { + request.setResponseError("该公告已下线,请不要重复操作!"); + } + if (status == 0) + { + request.setResponseError("草稿不支持下线!"); + } + Updater updater = new Updater(); + updater.addMust("id", id); + updater.addField("status", 2); + updater.addField("updateTime", Sqls.nowTimestamp()); + updater.addField("updateUser", request.getSessionName()); + ORM.get(ZTable.class).update(Notice.class, updater); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/DesignerPresenter.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/DesignerPresenter.java new file mode 100644 index 0000000..3b32135 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/DesignerPresenter.java @@ -0,0 +1,802 @@ +package com.zhiqim.yangcai.design.presenter; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.ZmlContexts; +import org.zhiqim.httpd.context.annotation.AnIntercept; +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnTransaction; +import org.zhiqim.kernel.extend.HashMapSO; +import org.zhiqim.kernel.extend.MapSO; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.*; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.cache.DesignIndustryCache; +import com.zhiqim.yangcai.design.dao.DesignTypeDao; +import com.zhiqim.yangcai.design.dao.HotWordDao; +import com.zhiqim.yangcai.design.dao.KeywordDao; +import com.zhiqim.yangcai.design.dbo.DesKeywordLog; +import com.zhiqim.yangcai.design.dbo.design.DesignIndustry; +import com.zhiqim.yangcai.design.dbo.design.DesignType; +import com.zhiqim.yangcai.design.dbo.profile.DesignerCourse; +import com.zhiqim.yangcai.design.dbo.template.DesTemplateEventView; +import com.zhiqim.yangcai.design.dbo.template.MediaTemplate; +import com.zhiqim.yangcai.design.dbo.template.MediaTemplateView; +import com.zhiqim.yangcai.design.dbo.works.DesWorksFile; +import com.zhiqim.yangcai.design.model.HeatKeywordModel; + +/** + * 设计Presenter + * + * @version v1.0.0 @author Deng 2017-11-28 新建与整理 + */ +@AnAlias("DesignerPresenter") +@AnIntercept("chkZmrLogin") +public class DesignerPresenter +{ + /** + * 根据输入搜索词查询关键词列表(最近10条) + * + * @param request 请求 + * @param keyword 关键词 + * @return 数组的JSON字符串 + * @throws Exception 异常 + */ + public static String doKeywordList(String keyword) throws Exception + { + if (Validates.isEmptyBlank(keyword)) + { + return "[]"; + } + + String[] word = keyword.split(" "); + Selector selector = new Selector(); + + // 搜热词量增加或新增 + doKeywordHeatSearch(keyword); + + for (int i = 0; i < word.length; i++) + { + if (Validates.isEmptyBlank(word[i])) + { + continue; + } + + selector.addMaybeLike("keywordName", word[i]); + } + selector.addOrderbyDesc("searchCount"); + PageResult pageResult = ORM.get(ZTable.class).page(DesKeywordLog.class, 1, 10, selector); + + List titleList = new ArrayList<>(); + for (DesKeywordLog item : pageResult.list()) + { + titleList.add(item.getKeywordName()); + } + + return Jsons.toString(titleList); + } + + /** + * 关键词搜索统计 + * + * @throws Exception + */ + public static void doKeywordHeatSearch(String keyword) throws Exception + { + List floatList = new ArrayList(); + List logList = ORM.get(ZTable.class).list(DesKeywordLog.class, new Selector().addMustLike("keywordName", keyword)); + if (logList.size() == 0) + { + // 插入搜索日志 + DesKeywordLog log = new DesKeywordLog(); + log.setLogId(Ids.longId()); + log.setKeywordName(keyword); + log.setSearchCount(1); + log.setCreateTime(Sqls.nowTimestamp()); + + ORM.get(ZTable.class).insert(log); + } + else + { + for (DesKeywordLog log : logList) + { + float str = HotWordDao.getSimilarityRatio(keyword, log.getKeywordName()); + + HeatKeywordModel model = new HeatKeywordModel(); + model.setLogId(log.getLogId()); + model.setStr((int) (str * 10000)); + + floatList.add(model); + } + + // 排序,降序 + Collections.sort(floatList, new Comparator() + { + @Override + public int compare(HeatKeywordModel o1, HeatKeywordModel o2) + { + return o2.getStr() - o1.getStr(); + } + }); + + long logId = floatList.get(0).getLogId(); + int maxNum = floatList.get(0).getStr(); + int num = 4000; + // 相似度40%左右,热度+1,否则为新增关键词 + if (maxNum > num) + { + DesKeywordLog log = ORM.get(ZTable.class).item(DesKeywordLog.class, new Selector("logId", logId)); + Updater updater = new Updater(); + updater.addMust("logId", logId); + updater.addField("searchCount", log.getSearchCount() + 1); + + ORM.get(ZTable.class).update(DesKeywordLog.class, updater); + } + else + { + // 插入搜索日志 + DesKeywordLog log = new DesKeywordLog(); + log.setLogId(Ids.longId()); + log.setKeywordName(keyword); + log.setSearchCount(1); + log.setCreateTime(Sqls.nowTimestamp()); + + ORM.get(ZTable.class).insert(log); + } + } + } + + /** + * 关键词查询模板 + * + * @param request + * @throws Exception + */ + public static void doTemplateKeywordSearch(HttpRequest request) throws Exception + { + ZmrSessionUser user = request.getSessionUser(ZmrSessionUser.class); + String[] deptStr = Arrays.toStringArray(user.getOperator().getOperatorDeptAll()); + + int page = request.getParameterInt("page", 1); + int pageSize = 20; + + String keyword = request.getParameter("keyword", ""); + String urlParam = request.getParameter("urlParam"); + long designType = request.getParameterLong("designType"); + long industryId = request.getParameterLong("industryId"); + Selector selector = new Selector(); + if (designType != -1) + { + if (designType == 10086) + { + List prdtypeList = DesignTypeDao.list(); + List prdList = new ArrayList(); + for (DesignType type : prdtypeList) + { + prdList.add(type.getTypeId()); + } + + selector.addMustInLong("designType", Arrays.toArrayLong(prdList)); + } + else + { + selector.addMust("designType", designType); + } + } + + if (industryId != -1) + { + if (industryId == 10087) + { + List indList = Global.get(DesignIndustryCache.class).getIndustryList(); + List inList = new ArrayList(); + for (DesignIndustry ind : indList) + { + inList.add(ind.getIndustryId()); + } + + selector.addMustInLong("industryId", Arrays.toArrayLong(inList)); + } + else + { + selector.addMust("industryId", industryId); + } + } + + if (Validates.isNotEmpty(urlParam) && urlParam.equals("ALL")) + {// 系统模板 + selector.addMustIn("templateType", 100, 110); + } + + if (Validates.isNotEmpty(urlParam) && urlParam.equals("BEST")) + {// 精品模板 + selector.addMust("templateType", 110); + } + + if (Validates.isNotEmpty(urlParam) && urlParam.equals("MY")) + {// 我的模板 + selector.addMust("designer", user.getOperator().getOperatorCode()); + selector.addMustIn("templateType", 10, 20, 80, 100, 110); + } + + if (Validates.isNotEmpty(urlParam) && urlParam.equals("CDR")) + {// CDR转模板 + selector.addMust("templateType", 30); + } + + if (Validates.isNotEmpty(urlParam) && urlParam.equals("COLLECT")) + {// 我收藏的 + selector.addMust("operatorCode", user.getOperatorCode()); + selector.addMust("eventType", 2); + } + + if (Validates.isNotEmpty(urlParam) && urlParam.equals("SHARE")) + {// 分享给我的 + if (Validates.isNotEmpty(user.getOperator().getOperatorDeptAll())) + { + if (deptStr.length == 1) + { + selector.addMustLike("shareDept", deptStr[0]); + } + else if (deptStr.length > 1) + { + Selector sel = new Selector(); + for (String dept : deptStr) + { + sel.addMustLike("shareDept", dept); + } + selector.addOr(sel); + } + } + } + + if (Validates.isNotEmpty(urlParam) && urlParam.equals("DRAFT")) + {// 临时 + selector.addMust("designer", user.getOperator().getOperatorCode()); + selector.addMust("templateType", 0); + selector.addMust("templateStatus", 0); + } + + if (Validates.isNotEmpty(urlParam) && urlParam.equals("ORDER")) + {// 订单 + selector.addMust("designer", user.getOperator().getOperatorCode()); + selector.addMust("templateType", 80); + selector.addMust("templateStatus", 0); + } + + // 关键词查询 + String[] word = keyword.split(" "); + for (int i = 0; i < word.length; i++) + { + if (Validates.isEmptyBlank(word[i])) + { + continue; + } + + selector.addMaybeLike("keywordName", word[i]); + } + + MapSO attrMap = new HashMapSO(); + attrMap.put("designId", request.getParameterLong("designId")); + if (Validates.isNotEmpty(urlParam) && urlParam.equals("COLLECT")) + { + PageResult pageResult = ORM.get(ZView.class).page(DesTemplateEventView.class, page, pageSize, selector); + attrMap.put("pageResult", pageResult); + } + else + { + PageResult pageResult = ORM.get(ZView.class).page(MediaTemplateView.class, page, pageSize, selector); + attrMap.put("pageResult", pageResult); + } + + attrMap.put("keyword", keyword); + attrMap.put("designType", designType); + attrMap.put("industryId", industryId); + attrMap.put("urlParam", urlParam); + String ret = ZmlContexts.parseZmlPath(request, "/zview/template/inner/templateSearchInfo.ftml", attrMap); + request.setResponseResult(ret); + } + + /** + * 添加关键词 + * + * @param request + * @param worksId + * @param keywordName + * @throws Exception + */ + @AnTransaction + public static void doKeywordAdd(HttpRequest request) throws Exception + { + long mediaId = request.getParameterLong("mediaId"); + String keywordName = request.getParameter("keywordName"); + String type = request.getParameter("type"); + + // 关键词是否进行过重塑的标志 + boolean remodelFlag = Boolean.FALSE; + // 重塑被新增的关键词 + if (Validates.isNotEmptyBlank(keywordName)) + { + // 如果被新增的关键词包含" " 或者 "," 或者 "," 则进行重塑 + if (keywordName.contains(" ") || keywordName.contains(",") || keywordName.contains(",") ) + { + remodelFlag = Boolean.TRUE; + keywordName = remodelKeyword(keywordName); + } + } + + if ("template".equals(type)) + { + MediaTemplate media = ORM.get(ZTable.class).item(MediaTemplate.class, mediaId); + if (Validates.isNotEmpty(media.getKeywordName())) + {// 关键词校验 + String[] splitName = media.getKeywordName().split(","); + for (String kName : splitName) + { + if (kName.indexOf(" ") > -1) + { + String[] strName = kName.split(" "); + for (String sName : strName) + { + if (keywordName.equals(sName)) + { + request.setResponseError("关键词已存在,请重新输入"); + return; + } + } + } + else + { + if (keywordName.equals(kName)) + { + request.setResponseError("关键词已存在,请重新输入"); + return; + } + } + } + } + + // 关键词重塑后做新的重复校验 + if (remodelFlag) + { + boolean res = checkKWRepeatAfterRemodel(keywordName, type, mediaId); + if (res) + { + request.setResponseError("关键词已存在,请重新输入"); + return; + } + } + + String name = ""; + if (Validates.isNotEmpty(media.getKeywordName())) + { + name += media.getKeywordName() + "," + keywordName; + } + + // 更新模板表的关键词字段 + Updater updater = new Updater(); + updater.addMust("mediaId", mediaId); + + if (Validates.isNotEmpty(media.getKeywordName())) + { + updater.addField("keywordName", name); + } + else + { + updater.addField("keywordName", keywordName); + } + + ORM.get(ZTable.class).update(MediaTemplate.class, updater); + } + else + { + DesWorksFile works = ORM.get(ZTable.class).item(DesWorksFile.class, mediaId); + if (Validates.isNotEmpty(works.getKeywordName())) + {// 关键词校验 + String[] splitName = works.getKeywordName().split(","); + for (String kName : splitName) + { + if (kName.indexOf(" ") > -1) + { + String[] strName = kName.split(" "); + for (String sName : strName) + { + if (keywordName.equals(sName)) + { + request.setResponseError("关键词已存在,请重新输入"); + return; + } + } + } + else + { + if (keywordName.equals(kName)) + { + request.setResponseError("关键词已存在,请重新输入"); + return; + } + } + } + } + + // 关键词重塑后做新的重复校验 + if (remodelFlag) + { + boolean res = checkKWRepeatAfterRemodel(keywordName, type, mediaId); + if (res) + { + request.setResponseError("关键词已存在,请重新输入"); + return; + } + } + + String name = ""; + if (Validates.isNotEmpty(works.getKeywordName())) + { + name += works.getKeywordName() + "," + keywordName; + } + + // 更新模板表的关键词字段 + Updater updater = new Updater(); + updater.addMust("worksId", mediaId); + + if (Validates.isNotEmpty(works.getKeywordName())) + { + updater.addField("keywordName", name); + } + else + { + updater.addField("keywordName", keywordName); + } + + ORM.get(ZTable.class).update(DesWorksFile.class, updater); + } + + // 插入关键词 + KeywordDao.doKeywordLostofAdd(keywordName, request.getSessionName(), 1); + + request.setResponseResult(keywordName); + } + + /** + * 用于被新增关键词重塑后返回
            + * 关键词存储规则:输入端关键词格式以英文逗号或者单个空格分隔
            + * 后台校验:去除被新增关键词前后全角半角逗号及空格,最后替换空格为英文逗号[考虑连续空格]
            + * + * @param oldKeyWord + * @return java.lang.String + * @author HuangZhiGao + * @date 2020/2/26 9:44 + */ + public static String remodelKeyword(String oldKeyWord) + { + String newKeyWord = ""; + // 使用zhiqim字符串工具类重塑关键词 + if (Validates.isNotEmptyBlank(oldKeyWord)) + { + // 首先替换关键词中所有的"," 和 "," 为 " " + oldKeyWord = oldKeyWord.replace(",", " "); + oldKeyWord = oldKeyWord.replace(",", " "); + + // 去除关键词前后连续的所有空白 + oldKeyWord = Strings.trimLeft(oldKeyWord); + oldKeyWord = Strings.trimRight(oldKeyWord); + // 并去除前后空格 + oldKeyWord = oldKeyWord.trim(); + + // 再格式化关键词内部连续的空格为一个空格 + oldKeyWord = Strings.formatSpace(oldKeyWord); + + // 最后替换关键词内部的" " 为 "," + oldKeyWord = oldKeyWord.replace(" ", ","); + + newKeyWord = oldKeyWord; + } + return newKeyWord; + } + + /** + * 关键词重塑后进行新的校验是否重复
            + * + * @param keyword 关键词 + * @param type 作品或模板 + * @param mediaId 作品id或模板id + * @return boolean + * @author HuangZhiGao + * @date 2020/2/26 11:04 + */ + public static boolean checkKWRepeatAfterRemodel(String keyword, String type, long mediaId) throws Exception + { + // 是否重复 + boolean result = Boolean.FALSE; + String[] keywordArr = keyword.split(","); + + if ("template".equals(type)) + { + // 模板关键词校验 + MediaTemplate media = ORM.get(ZTable.class).item(MediaTemplate.class, mediaId); + if (Validates.isNotEmpty(media.getKeywordName())) + { + String[] splitName = media.getKeywordName().split(","); + for (String kName : splitName) + { + if (kName.indexOf(" ") > -1) + { + String[] strName = kName.split(" "); + for (String sName : strName) + { + for (String keyw : keywordArr) + { + if (keyw.equals(sName)) + { + return Boolean.TRUE; + } + } + } + } + else + { + for (String keyw : keywordArr) + { + if (keyw.equals(kName)) + { + return Boolean.TRUE; + } + } + } + } + } + } + else + { + // 作品关键词校验 + DesWorksFile works = ORM.get(ZTable.class).item(DesWorksFile.class, mediaId); + if (Validates.isNotEmpty(works.getKeywordName())) + { + String[] splitName = works.getKeywordName().split(","); + for (String kName : splitName) + { + if (kName.indexOf(" ") > -1) + { + String[] strName = kName.split(" "); + for (String sName : strName) + { + for (String keyw : keywordArr) + { + if (keyw.equals(sName)) + { + return Boolean.TRUE; + } + } + } + } + else + { + for (String keyw : keywordArr) + { + if (keyw.equals(kName)) + { + return Boolean.TRUE; + } + } + } + } + } + } + + return result; + } + + /** + * 用于前端查看单个模板或作品时修改关键词结构
            + * 并且更新数据库关键词
            + * + * @param keyword 关键词 + * @param type 作品或模板 + * @param mediaId 作品id或模板id + * @param + * @return java.lang.String[] + * @author HuangZhiGao + * @date 2020/2/26 13:51 + */ + public static String[] updateKeywordArr(String keyword, String type, long mediaId) throws Exception + { + // 重塑关键词 + if (Validates.isNotEmptyBlank(keyword)) + { + keyword = remodelKeyword(keyword); + + Updater updater = new Updater(); + updater.addField("keywordName", keyword); + // 更新数据库关键词 + if ("template".equals(type)) + { + // 模板关键词更新 + updater.addMust("mediaId", mediaId); + ORM.get(ZTable.class).update(MediaTemplate.class, updater); + } + else + { + // 作品关键词更新 + updater.addMust("worksId", mediaId); + ORM.get(ZTable.class).update(DesWorksFile.class, updater); + } + } + return Arrays.toStringArray(keyword); + } + + /** + * 删除关键词 + * + * @param worksId + * @param keywordId + * @throws Exception + */ + @AnTransaction + public static void doKeywordDelete(HttpRequest request) throws Exception + { + long mediaId = request.getParameterLong("mediaId"); + String keywordName = request.getParameter("keywordName"); + String type = request.getParameter("type"); + + // 1.更新模板或作品中的关键词字段参数 + boolean falg = KeywordDao.doKeywordNameUpdater(mediaId, keywordName, type); + if (!falg) + { + request.setResponseError("未找到该关键词,请重新选择"); + return; + } + } + + /** + * 模板关联标签 + * + * @param worksId + * @param parIdarr + * @param catIdarr + * @param labIdarr + * @throws Exception + */ + @AnTransaction + public static void doTemplateLabelExec(HttpRequest request, long mediaId, long designType, long industryId, String industrySubIds, String attributeIds) + throws Exception + { + MediaTemplate media = ORM.get(ZTable.class).item(MediaTemplate.class, mediaId); + String oldPrdTypeName = DesignTypeDao.name(media.getTypeId()); + String oldIndustryName = Global.get(DesignIndustryCache.class).getIndustryName(media.getIndustryId()); + String oldIndustrySubName = KeywordDao.doIndustrySubName(media.getIndustrySubIds()); + String oldAttributeName = KeywordDao.doAttributeName(media.getAttributeIds()); + String oldLabelName = oldPrdTypeName + " " + oldIndustryName + " " + oldIndustrySubName + " " + oldAttributeName; + + String prdTypeName = DesignTypeDao.name(designType); + String industryName = Global.get(DesignIndustryCache.class).getIndustryName(industryId); + String industrySubName = KeywordDao.doIndustrySubName(industrySubIds); + String attributeName = KeywordDao.doAttributeName(attributeIds); + String labelName = prdTypeName + " " + industryName + " " + industrySubName + " " + attributeName; + + if (Validates.isEmpty(media.getKeywordName()) || Validates.isEmpty(media.getIndustrySubIds()) && Validates.isEmpty(media.getAttributeIds())) + { + String keywordName = ""; + Updater updater = new Updater(); + updater.addMust("mediaId", mediaId); + updater.addField("industryId", industryId); + updater.addField("industrySubIds", industrySubIds); + updater.addField("industrySubName", industrySubName); + updater.addField("attributeIds", attributeIds); + updater.addField("attributeName", attributeName); + + if (Validates.isNotEmpty(media.getKeywordName())) + { + keywordName = media.getKeywordName() + "," + labelName + "," + media.getDesigner(); + updater.addField("keywordName", keywordName); + } + else + { + keywordName = labelName + "," + media.getDesigner(); + updater.addField("keywordName", keywordName); + } + + ORM.get(ZTable.class).update(MediaTemplate.class, updater); + + // 加入关键词 + KeywordDao.doKeywordLostofAdd(keywordName, request.getSessionName(), 1); + } + else + { + String keywordName = ""; + // 1.关键词中是否包含标签 + if (media.getKeywordName().contains(oldLabelName)) + { + if (!oldLabelName.equals(labelName)) + { + String[] newLabelNameStr = media.getKeywordName().split(","); + for (String newLabelName : newLabelNameStr) + { + if (oldLabelName.contains(newLabelName)) + { + keywordName += labelName + ","; + } + else + { + keywordName += newLabelName + ","; + } + } + + Updater updater = new Updater(); + updater.addMust("mediaId", mediaId); + updater.addField("industryId", industryId); + updater.addField("industrySubIds", industrySubIds); + updater.addField("industrySubName", industrySubName); + updater.addField("attributeIds", attributeIds); + updater.addField("attributeName", attributeName); + updater.addField("keywordName", keywordName.substring(0, keywordName.length() - 1)); + + ORM.get(ZTable.class).update(MediaTemplate.class, updater); + + // 加入关键词 + KeywordDao.doKeywordLostofAdd(keywordName, request.getSessionName(), 1); + } + } + else + { + keywordName += labelName + ","; + String[] newLabelNameStr = media.getKeywordName().split(","); + for (String newLabelName : newLabelNameStr) + { + if (oldLabelName.contains(newLabelName)) + { + continue; + } + + keywordName += newLabelName + ","; + } + + Updater updater = new Updater(); + updater.addMust("mediaId", mediaId); + updater.addField("industryId", industryId); + updater.addField("industrySubIds", industrySubIds); + updater.addField("industrySubName", industrySubName); + updater.addField("attributeIds", attributeIds); + updater.addField("attributeName", attributeName); + updater.addField("keywordName", keywordName.substring(0, keywordName.length() - 1)); + + ORM.get(ZTable.class).update(MediaTemplate.class, updater); + + // 加入关键词 + KeywordDao.doKeywordLostofAdd(keywordName, request.getSessionName(), 1); + } + } + } + + /** + * + * [简要描述]: 设计师备注
            + * [详细描述]:
            + * + * @author gjx + * @param request + * @throws Exception + */ + public static void doUpdateCourseRemark(HttpRequest request)throws Exception{ + String designer = request.getParameter("designer"); + String remark = request.getParameter("remark"); + + Updater updater = new Updater(); + updater.addMust("designer", designer); + updater.addField("designerRemark", remark); + + ORM.get(ZTable.class).update(DesignerCourse.class, updater); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/DesignerProfilePresenter.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/DesignerProfilePresenter.java new file mode 100644 index 0000000..e409bfb --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/DesignerProfilePresenter.java @@ -0,0 +1,339 @@ +package com.zhiqim.yangcai.design.presenter; + +import java.util.Arrays; +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.annotation.AnIntercept; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.extend.LinkedMapSO; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.manager.dbo.ZmrOperator; +import org.zhiqim.manager.dbo.ZmrRole; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZSQL; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.design.dbo.design.DesignerGroupDispatch; +import com.zhiqim.yangcai.design.dbo.design.DesignerGroupView; +import com.zhiqim.yangcai.design.dbo.order.OrderQuestions; +import com.zhiqim.yangcai.design.dbo.order.QuestionsAtta; +import com.zhiqim.yangcai.design.dbo.profile.DesignerCourse; +import com.zhiqim.yangcai.design.dbo.profile.DesignerProfile; + +/** + * 设计师个人中心Presenter + * + * @version v1.0.0 @author yixin 2020-09-10 新建与整理 + */ +@AnAlias("DesignerProfilePresenter") +@AnIntercept("chkZmrLogin") +public class DesignerProfilePresenter +{ + /** + * 添加用户标签 + * + * @param request 请求 + */ + public static void addDesignerLabel(HttpRequest request) throws Exception + { + DesignerProfile profile = ORM.get(ZTable.class).item(DesignerProfile.class, request.getSessionName()); + String label = request.getParameter("label"); + if (Validates.isEmptyBlank(label)) + { + request.setResponseError("标签内容不能为空"); + return; + } + if (profile == null) + { + profile = new DesignerProfile(); + profile.setOperatorCode(request.getSessionName()); + profile.setState(0); + } + String oldLabels = profile.getLabels() == null ? "" : profile.getLabels(); + List labels = Arrays.asList(oldLabels.split(",")); + if (labels.contains(label)) + { + request.setResponseError("已有该标签"); + return; + } + profile.setLabels(oldLabels + label + ","); + ORM.get(ZTable.class).replace(profile); + request.setResponseResult("添加成功"); + } + + /** + * 删除用户标签 + * + * @param request 请求 + */ + public static void doDeleteLabel(HttpRequest request) throws Exception + { + DesignerProfile profile = ORM.get(ZTable.class).item(DesignerProfile.class, request.getSessionName()); + String label = request.getParameter("label"); + if (Validates.isEmptyBlank(label) || profile == null) + { + return; + } + String oldLabels = profile.getLabels() == null ? "" : profile.getLabels(); + oldLabels = oldLabels.replace(label + ",", ""); + profile.setLabels(oldLabels); + ORM.get(ZTable.class).replace(profile); + request.setResponseResult("删除成功"); + } + + /** + * 个人简介提交审核 + * + * @param request 请求 + */ + public static void doSubmitReview(HttpRequest request) throws Exception + { + DesignerProfile profile = ORM.get(ZTable.class).item(DesignerProfile.class, request.getSessionName()); + String personalProfile = request.getParameter("personalProfile"); + if (Validates.isEmptyBlank(personalProfile)) + { + request.setResponseError("个人简介不能为空"); + return; + } + if (profile == null) + { + profile = new DesignerProfile(); + profile.setOperatorCode(request.getSessionName()); + } + profile.setPersonalProfile(personalProfile); + // 提交审核状态 + profile.setState(1); + profile.setAddTime(Sqls.nowTimestamp()); + profile.setPersonalProfile(personalProfile); + ORM.get(ZTable.class).replace(profile); + request.setResponseResult("提交成功"); + } + + /** + * 个人简介审核 + * + * @param request 请求 + */ + public static void doProfileReview(HttpRequest request) throws Exception + { + int state = request.getParameterInt("state"); + String operatorCode = request.getParameter("operatorCode"); + if (state != 2 && state != 3) + { + request.setResponseError("传入的审核状态错误"); + } + else if (Validates.isEmpty(operatorCode)) + { + request.setResponseError("未查询到待审核设计师信息"); + } + else + { + Updater updater = new Updater(); + updater.addMust("operatorCode", operatorCode); + updater.addField("state", state); + ORM.get(ZTable.class).update(DesignerProfile.class, updater); + request.setResponseResult("审核成功"); + } + + } + + /** + * + * [简要描述]: 设计师个人经历信息提交
            + * [详细描述]:
            + * + * @author gjx + * @param request + * @throws Exception + */ + public static void doDesignerCourseSubmit(HttpRequest request) throws Exception + { + String operatorCode = request.getSessionName(); + ZmrSessionUser sessionUser = request.getSessionUser(ZmrSessionUser.class); + DesignerCourse course = ORM.get(ZTable.class).item(DesignerCourse.class, operatorCode); + if (course == null) + {// 增加 + DesignerCourse designerCourse = request.getParameter(DesignerCourse.class); + designerCourse.setDesigner(operatorCode); + designerCourse.setAddOperator(operatorCode); + designerCourse.setAddTime(Sqls.nowTimestamp()); + + ORM.get(ZTable.class).insert(designerCourse); + + Selector selector = new Selector(); + selector.addMust("designer", sessionUser.getOperatorCode()); + OrderQuestions orderQuestions = ORM.get(ZTable.class).item(OrderQuestions.class, selector); + + if (orderQuestions == null) + { + // 随机获取一条考试订单 + String designRequirements = "未获取到考试订单信息,请联系管理员"; + String configQuestionsId = "0L"; + + List configQuestions = ORM.get(ZSQL.class) + .executeQuery("select QUESTIONS_ID,DESIGN_REQUIREMENTS from config_questions ORDER BY RAND() LIMIT 1"); + if (configQuestions != null && configQuestions.size() > 0) + { + for (LinkedMapSO so : configQuestions) + { + designRequirements = so.get("DESIGN_REQUIREMENTS").toString(); + configQuestionsId = so.get("QUESTIONS_ID").toString(); + continue; + } + } + else + { + request.setResponseError("没有找到考试题库信息,请联系管理员"); + return; + } + + orderQuestions = new OrderQuestions(); + orderQuestions.setCreateTime(Sqls.nowTimestamp()); + orderQuestions.setDesigner(sessionUser.getOperatorCode()); + orderQuestions.setQuestionsId(Ids.longId13()); + orderQuestions.setStatus(20); + orderQuestions.setDesignRequirements(designRequirements); + orderQuestions.setMobile(sessionUser.getOperatorMobile()); + ORM.get(ZTable.class).insert(orderQuestions); + + // 复制一份订单附件 + Selector sel = new Selector(); + sel.addMust("questionsId", Long.parseLong(configQuestionsId)); + sel.addMust("attaModul", "MaterialFile"); + List attaList = ORM.get(ZTable.class).list(QuestionsAtta.class, sel); + if (attaList != null && attaList.size() > 0) + { + for (QuestionsAtta config_atta : attaList) + { + // 插入考试订单附属表 + QuestionsAtta atta = new QuestionsAtta(); + atta.setQuestionsId(orderQuestions.getQuestionsId()); + atta.setAttaId(Ids.longId()); + atta.setAttaModul("MaterialFile"); + atta.setFileName(config_atta.getFileName()); + atta.setFileType(config_atta.getFileType()); + atta.setFileSize(config_atta.getFileSize()); + atta.setSavePath(config_atta.getSavePath()); + atta.setFileUrl(config_atta.getFileUrl()); + atta.setOperatorCode(request.getSessionName()); + atta.setUploadTime(Sqls.nowTimestamp()); + ORM.get(ZTable.class).insert(atta); + } + } + } + else + { + Updater updater = new Updater(); + updater.addMust("questionsId", orderQuestions.getQuestionsId()); + updater.addField("status", 20); + updater.addField("designEndTime", Sqls.nowTimestamp()); + ORM.get(ZTable.class).update(OrderQuestions.class, updater); + } + } + else + { + Updater updater = new Updater(); + updater.addMust("designer", operatorCode); + updater.addField("workExperience", request.getParameter("workExperience")); + updater.addField("skillScope", request.getParameter("skillScope")); + updater.addField("designType", request.getParameter("designType")); + updater.addField("workDuration", request.getParameter("workDuration")); + updater.addField("workStatus", request.getParameter("workStatus")); + updater.addField("receiveType", request.getParameter("receiveType")); + updater.addField("receiveAccount", request.getParameter("receiveAccount")); + updater.addField("updateOperator", operatorCode); + updater.addField("updateTime", Sqls.nowTimestamp()); + + ORM.get(ZTable.class).update(DesignerCourse.class, updater); + } + } + + /** + * + * [简要描述]: 修改设计师个人最大同时接单数量
            + * [详细描述]:设计订单列表中正在设计状态的订单数量,超过这个数量则系统不会再派单。
            + * + * @author caohong + * @param request + * @throws Exception + */ + public static void doModifyOrderNum(HttpRequest request) throws Exception + { + String operatorCode = request.getSessionName(); + int orderNum = request.getParameterInt("orderNum"); + + // 获取平台接单规则数量 + Selector sel = new Selector(); + sel.addMust("operatorCode", operatorCode); + sel.addMust("status", 1); + sel.addMust("designerStatus", 1); + DesignerGroupView designerGroup = ORM.get(ZView.class).item(DesignerGroupView.class, sel); + // 判断设计师接单数量 + if (designerGroup != null) + { + int maxOrderNum = designerGroup.getDesignerMaxOrderNum(); + if (maxOrderNum == 0) + { + // 个人没有配置独立规则,则获取对应规则组的数据 + maxOrderNum = designerGroup.getMaxOrderNum(); + } + + // 个人配置数据不能大于平台配置规则数据 + if (orderNum > maxOrderNum) + { + request.setResponseError("最大接单量不能大于平台规则设置,有疑问可以咨询管理员"); + return; + } + } + else + { + request.setResponseError("你还没有接单权限,请联系管理员"); + return; + } + + Updater updater = new Updater(); + updater.addMust("operatorCode", operatorCode); + updater.addField("operatorParam", String.valueOf(orderNum)); + ORM.get(ZTable.class).update(ZmrOperator.class, updater); + } + + /** + * + * [简要描述]: 设计师切换组织
            + * [详细描述]:
            + * + * @author gjx + * @param request + * @throws Exception + */ + public static void doUpdateDesignerOrg(HttpRequest request) throws Exception + { + String designer = request.getParameter("designer"); + long orgId = request.getParameterLong("orgId"); + // 查询组织对接角色 + List role_list = ORM.get(ZTable.class).list(ZmrRole.class, new Selector("orgId", orgId).addOrderbyAsc("roleSeq")); + if (role_list == null || role_list.size() == 0) + { + request.setResponseError("对应组织未配置操作员角色信息"); + return; + } + + Updater updater = new Updater(); + updater.addMust("operatorCode", designer); + updater.addField("orgId", orgId); + updater.addField("operatorRole", String.valueOf(role_list.get(0).getRoleId())); + ORM.get(ZTable.class).update(ZmrOperator.class, updater); + + Updater updater1 = new Updater(); + updater1.addMust("operatorCode", designer); + updater1.addField("orgId", orgId); + ORM.get(ZTable.class).update(DesignerGroupDispatch.class, updater1); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/DesignerSubscribePresenter.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/DesignerSubscribePresenter.java new file mode 100644 index 0000000..a666b91 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/DesignerSubscribePresenter.java @@ -0,0 +1,137 @@ +package com.zhiqim.yangcai.design.presenter; + +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.Date; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.annotation.AnIntercept; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.design.dbo.subscribe.SubscribeDesignerQuotaRecord; +import com.zhiqim.yangcai.design.dbo.subscribe.SubscribeOrgTempQuota; + +@AnAlias( +{ + "DesignerSubscribePresenter" +}) +@AnIntercept( +{ + "chkZmrLogin" +}) +public class DesignerSubscribePresenter +{ + public static void doToggle(HttpRequest request) throws Exception + { + int today = DateTimes.getCurrentDate(); + // Calendar calendar = Calendar.getInstance(); + // int year = calendar.get(Calendar.YEAR); + // int month = calendar.get(Calendar.MONTH) + 1; + // int prevYear = month == 1 ? year - 1 : year; + // int prevMonth = month == 1 ? 12 : month - 1; + + SubscribeDesignerQuotaRecord data = request.getParameter(SubscribeDesignerQuotaRecord.class); + ZmrSessionUser user = request.getSessionUser(ZmrSessionUser.class); + if (today == data.getDutyTime()) + { + if (DateTimes.getCurrentHour() >= 8) + { + request.setResponseError("当天预约需要在八点前之前"); + return; + } + } + else if (getNextDateInt(7) < data.getDutyTime()) + { + request.setResponseError("最大预约未来一周订单"); + return; + } + else if (today > data.getDutyTime()) + { + request.setResponseError("历史时间不允许预约"); + return; + } + + int maxQuota = request.getParameterInt("maxQuota"); + if (data.getSubscribeNum() > maxQuota) + { + request.setResponseError("超出订单预约上限,当前最大预约单量" + maxQuota + "单"); + return; + } + + // // 未完成订单 + // int unCompleteOrder = DispatchDao.getUnCompleteOrderNumber(user.getOperatorCode()); + + String operatorCode = request.getSessionName(); + SubscribeDesignerQuotaRecord subscribeDesignerQuotaRecord = ORM.get(ZTable.class).item(SubscribeDesignerQuotaRecord.class, + new Selector("operatorCode", operatorCode).addMust("dutyTime", data.getDutyTime())); + if (subscribeDesignerQuotaRecord != null) + { + data.setRecordId(subscribeDesignerQuotaRecord.getRecordId()); + } + else + { + data.setRecordId(Ids.longId()); + } + data.setModifyTime(Sqls.nowTimestamp()); + data.setMaxQuota(maxQuota); + data.setCreateTime(Sqls.nowTimestamp()); + data.setOperatorCode(operatorCode); + if (data.getSubscribeNum() == 0) + { + data.setSubscribeState(1); + } + else + { + data.setSubscribeState(2); + } + data.setState(1); + data.setOrgId(user.getOperatorOrgId()); + + // TODO 其他信息补充 + ORM.get(ZTable.class, request).replace(data); + request.setResponseResult("ok"); + } + + /** + * yixin 2020-09-04 修改临时额度状态 + * + * @param request + * @throws Exception + */ + public static void doUpdateSubscribeOrgTempQuotaState(HttpRequest request) throws Exception + { + long orgId = request.getParameterLong("orgId"); + int state = request.getParameterInt("state"); + request.setResponseResult("ok"); + Updater updater = new Updater(); + updater.addMust("orgId", orgId); + updater.addField("state", state); + updater.addField("modifyTime", Sqls.nowTimestamp()); + ORM.get(ZTable.class).update(SubscribeOrgTempQuota.class, updater); + } + + /** + * 获取后几日的值 + * + * @param day + * + * @return yyyyMMdd格式的int型值 + */ + public static int getNextDateInt(int day) + { + Calendar calendar = Calendar.getInstance(); + calendar.add(Calendar.DATE, day); // 得到后几天 + Date date = calendar.getTime(); + DateFormat df = new SimpleDateFormat("yyyyMMdd"); + return Integer.valueOf(df.format(date)); + } +} \ No newline at end of file diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/DesignerTestPresenter.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/DesignerTestPresenter.java new file mode 100644 index 0000000..9267b37 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/DesignerTestPresenter.java @@ -0,0 +1,185 @@ +package com.zhiqim.yangcai.design.presenter; + +import java.io.File; +import java.util.List; + +import javax.imageio.stream.FileImageOutputStream; +import javax.imageio.stream.ImageOutputStream; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.HttpResponse; +import org.zhiqim.httpd.context.annotation.AnIntercept; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Files; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Strings; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.kernel.util.codes.Base64; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; +import org.zhiqim.uploadlarge.dbo.UpllFile; + +import com.zhiqim.yangcai.design.dao.OssFileDao; +import com.zhiqim.yangcai.design.dbo.order.OrderQuestions; +import com.zhiqim.yangcai.design.dbo.order.QuestionsAtta; + +/** + * + * [简要描述]:接单考试流程
            + * + * @version 1.0 @author hc 2021年5月24日 新建与整理 + */ + +@AnAlias("DesignerTestPresenter") +@AnIntercept("chkZmrLogin") +public class DesignerTestPresenter +{ + // 保存考核成绩表 + public void saveGrade(HttpRequest request, String imgData, long questionsId) throws Exception + { + if (questionsId < 0) + { + request.setResponseError("未找到考试订单信息"); + return; + } + String dateDir = DateTimes.getDateTime8String(); + String rootDir = Strings.trimRight(request.getContext().getAttributeString("upload.large.rootDir"), "/"); + String operatorCode = request.getSessionName(); + + String draftFile = "订单考核/考核成绩图"; + String fileName = operatorCode + "-" + "ExamVoucher" + ".png"; + String draftPath = rootDir + "/" + dateDir + "/" + draftFile; + String savePath = draftPath + "/" + fileName; + + Files.mkDirectory(draftPath); + int idx = imgData.indexOf(","); + byte[] imageBytes = Base64.decode(imgData.substring(idx + 1)); + + File file = new File(savePath); + ImageOutputStream out = new FileImageOutputStream(file); + out.write(imageBytes); + out.flush(); + out.close(); + + // 图片上传OSS处理 + String ossUrl = OssFileDao.uploadFile(file, OssFileDao.getUploadFileKey(questionsId, "ExamVoucher")); + + // 插入考试订单附属表 + QuestionsAtta atta = new QuestionsAtta(); + atta.setQuestionsId(questionsId); + atta.setAttaId(Ids.longId()); + atta.setAttaModul("ExamVoucher"); + atta.setFileName(fileName); + atta.setFileType("png"); + atta.setFileSize(file.length()); + atta.setSavePath(savePath); + atta.setFileUrl(ossUrl); + atta.setOperatorCode(request.getSessionName()); + atta.setUploadTime(Sqls.nowTimestamp()); + ORM.get(ZTable.class).insert(atta); + + Updater updater = new Updater(); + updater.addMust("questionsId", questionsId); + updater.addField("status", 10); + ORM.get(ZTable.class).update(OrderQuestions.class, updater); + + } + + // 提交审核 + public void submitAudit(HttpRequest request, HttpResponse response, long questionsId) throws Exception + { + // 判断设计文件+印刷文件 + List list = ORM.get(ZTable.class).list(QuestionsAtta.class, new Selector().addMust("questionsId", questionsId)); + boolean desginFile = false; + boolean endFile = false; + for (QuestionsAtta atta : list) + { + if (atta.getAttaModul().equals("DesginFile")) + { + desginFile = true; + continue; + } + if (atta.getAttaModul().equals("EndFile")) + { + endFile = true; + continue; + } + } + if (desginFile != true && endFile == true) + { + response.sendError(2, "还未上传设计文件哦,请上传!"); + } + else if (desginFile == true && endFile != true) + { + response.sendError(2, "还未上传印刷文件哦,请上传!"); + } + else if (desginFile != true && endFile != true) + { + response.sendError(2, "还未上传文件哦,请上传!"); + } + else + { + Updater updater = new Updater(); + updater.addMust("questionsId", questionsId); + updater.addField("status", 20); + updater.addField("designEndTime", Sqls.nowTimestamp()); + ORM.get(ZTable.class).update(OrderQuestions.class, updater); + } + + } + + // 重新考核 + public void refreshAssess(HttpRequest request, long questionsId) throws Exception + { + // 删除考试订单记录 + Selector oq = new Selector(); + oq.addMust("questionsId", questionsId); + ORM.get(ZTable.class).delete(OrderQuestions.class, oq); + + // 删除附件记录 + List attaList = ORM.get(ZTable.class).list(QuestionsAtta.class, new Selector().addMustInLong("questionsId", questionsId)); + for (QuestionsAtta atta : attaList) + { + // 素材文件需要共用,不能删除 + if (!"MaterialFile".equals(atta.getAttaModul())) + { + File file = new File(atta.getSavePath()); + if (file.exists()) + { + Files.deleteFile(atta.getSavePath()); + } + + if (Validates.isNotEmpty(atta.getFileid())) + { + ORM.get(ZTable.class).delete(UpllFile.class, new Selector("fileId", atta.getFileid()).addReplace("id", null)); + } + } + + // 考试凭证需要删除oss + if ("ExamVoucher".equals(atta.getAttaModul())) + { + String path = atta.getFileUrl().split(OssFileDao.getPrefix_dir())[1]; + OssFileDao.deleteOssFile(OssFileDao.getPrefix_dir() + path); + } + + ORM.get(ZTable.class).delete(QuestionsAtta.class, atta.getAttaId()); + } + } + + // 删除文件 + public void deleteFile(HttpRequest request, long attaId) throws Exception + { + QuestionsAtta item = ORM.get(ZTable.class).item(QuestionsAtta.class, new Selector().addMust("attaId", attaId)); + File file = new File(item.getSavePath()); + if (file.exists()) + { + Files.deleteFile(item.getSavePath()); + } + ORM.get(ZTable.class).delete(QuestionsAtta.class, attaId); + + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/DesignerWorkPresenter.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/DesignerWorkPresenter.java new file mode 100644 index 0000000..34d01b4 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/DesignerWorkPresenter.java @@ -0,0 +1,123 @@ +package com.zhiqim.yangcai.design.presenter; + +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.annotation.AnIntercept; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnTransaction; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.design.constant.ScoreConstants; +import com.zhiqim.yangcai.design.constants.StatusConstants; +import com.zhiqim.yangcai.design.dao.DesignerDao; +import com.zhiqim.yangcai.design.dao.DispatchDao; +import com.zhiqim.yangcai.design.dao.ScoreDesignerRecordDao; +import com.zhiqim.yangcai.design.dbo.design.DesignerGroupDispatch; +import com.zhiqim.yangcai.design.dbo.dispatch.DesOnline; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; +import com.zhiqim.yangcai.design.dbo.profile.DesignerCourse; +import com.zhiqim.yangcai.design.dbo.score.ScoreDesignerRecordDetail; +import com.zhiqim.yangcai.design.dbo.subscribe.SubscribeDesignerQuotaRecord; + +/** + * 设计师接单操作 + * + * @version v1.0.0 @author zouzhigang 2017-12-21 新建与整理 + */ +@AnAlias("DesignerWorkPresenter") +@AnIntercept("chkZmrLogin") +public class DesignerWorkPresenter +{ + /** + * 设计师开始接单 + * + * @param request 请求 + * @throws Exception 异常 + */ + @SuppressWarnings("deprecation") + @AnTransaction + public static void startWork(HttpRequest request) throws Exception + { + ZmrSessionUser user = request.getSessionUser(ZmrSessionUser.class); + DesignerGroupDispatch prop = ORM.get(ZTable.class).item(DesignerGroupDispatch.class, user.getOperatorCode()); + if (prop == null) + { + request.setResponseError("您暂时没有接单权限,请联系管理员处理。"); + return; + } + + if (ORM.get(ZTable.class).item(DesignerCourse.class, user.getOperatorCode()) == null) + { + request.setResponseError("1");// 特殊标记,前台控制跳转 + return; + } + + // 1.插入设计师在线状态表 + DesOnline online = ORM.get(ZTable.class).item(DesOnline.class, user.getOperatorCode()); + online = online != null ? online : new DesOnline(); + + online.setOperatorCode(user.getOperatorCode()); + online.setOnlineStatus(1); + online.setSessionId(user.getSessionId()); + online.setSessionTime(Sqls.nowTimestamp()); + online.setOrderNum(DispatchDao.getUnCompleteOrderNumber(user.getOperatorCode())); + online.setOrgId(user.getOperatorOrgId()); + online.setLastUpdateTime(Sqls.nowTimestamp()); + ORM.get(ZTable.class).replace(online); + + // 2.启用当天订单预约额度 + Updater updater = new Updater(); + updater.addMust("operatorCode", user.getOperatorCode()); + updater.addMust("dutyTime", DateTimes.getCurrentDate()); + updater.addField("state", 1); + ORM.get(ZTable.class).update(SubscribeDesignerQuotaRecord.class, updater); + + // 3.上班操作 + DesignerDao.startWorkExec(user.getOperatorOrgId(), user.getOperatorCode(), Sqls.nowTimestamp(), "点击开始接单"); + + if (Sqls.nowTimestamp().getHours() >= 9 && Sqls.nowTimestamp().getHours() <= 20) + { + // 09:00至20:00常规时间内容开启接单奖励(点击开启接单按钮操作) + ScoreDesignerRecordDetail scoreDesignerRecordDetail = new ScoreDesignerRecordDetail(); + scoreDesignerRecordDetail.setScoreType(Long.valueOf(ScoreConstants.SCORE_TYPE_1.value())); + scoreDesignerRecordDetail.setOperatorCode(user.getOperatorCode()); + ScoreDesignerRecordDao.addScoreDesignerRecordDetail(scoreDesignerRecordDetail); + } + } + + /** + * 设计师停止接单 + * + * @param request 请求 + * @throws Exception 异常 + */ + @AnTransaction + public static void stopWork(HttpRequest request) throws Exception + { + ZmrSessionUser user = request.getSessionUser(ZmrSessionUser.class); + + // 下班操作 + DesignerDao.stopWorkExec(user.getOperatorOrgId(), request.getSessionName(), "点击停止接单"); + } + + /** + * 获取设计师当前单量 + * + * @param request 请求 + * @throws Exception 异常 + */ + public static void getOrderNumber(HttpRequest request) throws Exception + { + List orderList = ORM.get(ZTable.class).list(DesignOrder.class, + new Selector().addMust("designer", request.getSessionName()).addMust("status", StatusConstants.ORDER_30.value())); + int count = orderList.size(); + request.setResponseResult(count == 0 ? "0" : "" + count); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/DesignerWorksPresenter.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/DesignerWorksPresenter.java new file mode 100644 index 0000000..cc014f3 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/DesignerWorksPresenter.java @@ -0,0 +1,140 @@ +package com.zhiqim.yangcai.design.presenter; + +import java.awt.image.BufferedImage; +import java.io.File; + +import javax.imageio.ImageIO; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.annotation.AnIntercept; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; +import org.zhiqim.uploadlarge.dbo.UpllFile; + +import com.zhiqim.yangcai.design.dao.OssFileDao; +import com.zhiqim.yangcai.design.dbo.profile.DesignerWorks; + +/** + * 设计师作品Presenter + * + * @version v1.0.0 @author yixin 2020-09-10 新建与整理 + */ +@AnAlias("DesignerWorksPresenter") +@AnIntercept("chkZmrLogin") +public class DesignerWorksPresenter +{ + /** + * 上传作品 + * + * @param request 请求 + * @param fileId 文件id + */ + public static void doUplaodWorks(HttpRequest request, String fileId) throws Exception + { + UpllFile upllFile = ORM.get(ZTable.class).item(UpllFile.class, new Selector("fileId", fileId)); + String operatorCode = request.getSessionName(); + if (upllFile == null) + { + request.setResponseError("上传异常,请稍后重试"); + return; + } + File file = new File(upllFile.getFilePath()); + if (!file.exists()) + { + request.setResponseError("上传异常,请稍后重试"); + return; + } + int count = ORM.get(ZTable.class).count(DesignerWorks.class, new Selector("operatorCode", operatorCode)); + BufferedImage bi = ImageIO.read(file); + if (count >= 10) + { + request.setResponseError("个人作品最多同时存在10张"); + } + // 限定只能传入1200*800大小的图片 + else if (bi.getWidth() != 1200 && bi.getHeight() != 800) + { + request.setResponseError("仅支持像素为1200*800大小的图片"); + } + else + { + // 上传OSS + long designerWorksId = Ids.longId(); + String fileName = designerWorksId + "." + upllFile.getFileExt(); + String fileKey = "/designerWorks/" + DateTimes.getDateTime8String() + "/" + fileName; + String ossUrl = OssFileDao.uploadFile(file, fileKey); + DesignerWorks works = new DesignerWorks(); + works.setDesignerWorksId(designerWorksId); + works.setOperatorCode(operatorCode); + works.setImgPath(ossUrl); + works.setImgKey(fileKey); + works.setState(0); + works.setAddTime(Sqls.nowTimestamp()); + ORM.get(ZTable.class).insert(works); + request.setResponseResult("添加成功"); + } + // 删除缓存文件和上传记录 + file.delete(); + ORM.get(ZTable.class).delete(UpllFile.class, new Selector("fileId", fileId)); + + } + + /** + * 删除作品 + * + * @param request 请求 + * @param fileId 文件id + */ + public static void doDeletDesignerWorks(HttpRequest request) throws Exception + { + long designerWorksId = request.getParameterLong("designerWorksId", 0); + if (designerWorksId == 0) + { + request.setResponseError("删除作品异常,请稍后重试"); + return; + } + DesignerWorks works = ORM.get(ZTable.class).item(DesignerWorks.class, designerWorksId); + String fileKey = works.getImgKey(); + if (Validates.isNotEmptyBlank(fileKey)) + { + OssFileDao.deleteOssFile(OssFileDao.getPrefix_dir() + fileKey); + } + ORM.get(ZTable.class).delete(DesignerWorks.class, designerWorksId); + request.setResponseResult("删除成功"); + } + + /** + * 个人作品审核 + * + * @param request 请求 + */ + public static void doWorksReview(HttpRequest request) throws Exception + { + int state = request.getParameterInt("state"); + long designerWorksId = request.getParameterLong("designerWorksId", 0); + if (state != 1 && state != 2) + { + request.setResponseError("传入的审核状态错误"); + } + else if (designerWorksId == 0) + { + request.setResponseError("未查询到审核作品"); + } + else + { + Updater updater = new Updater(); + updater.addMust("designerWorksId", designerWorksId); + updater.addField("state", state); + ORM.get(ZTable.class).update(DesignerWorks.class, updater); + request.setResponseResult("审核成功"); + } + + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/DzmpEditorSupportPresenter.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/DzmpEditorSupportPresenter.java new file mode 100644 index 0000000..429fc5f --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/DzmpEditorSupportPresenter.java @@ -0,0 +1,377 @@ +package com.zhiqim.yangcai.design.presenter; + +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.ZmlContexts; +import org.zhiqim.httpd.context.annotation.AnIntercept; +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.extend.HashMapSO; +import org.zhiqim.kernel.extend.MapSO; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.kernel.util.Arrays; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Files; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.kernel.util.Objects; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ORMException; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.media.dbo.dzmp.DzmpImageStorage; +import com.zhiqim.media.dbo.dzmp.DzmpUserCardStorage; +import com.zhiqim.media.manage.presenter.MediaCardPresenter; +import com.zhiqim.media.service.dao.DzmpUserCardStorageDao; +import com.zhiqim.oss.service.oss.OssService; +import com.zhiqim.yangcai.design.constants.StatusConstants; +import com.zhiqim.yangcai.design.dao.OssFileDao; +import com.zhiqim.yangcai.design.dao.TemplateDao; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; + +/** + * 电子名片编辑器相关方法
            + * + * @author HuangZhiGao + * @date 2020年11月16日 下午5:37:42 + */ +@AnAlias("DzmpEditorSupportPresenter") +@AnIntercept("chkZmrLogin") +public class DzmpEditorSupportPresenter +{ + private static final Log log = LogFactory.getLog(DzmpEditorSupportPresenter.class); + private static String bucketName = Global.getString("oss", "yangcai_bucketName"); + + /** + * 在设计平台创建默认名片
            + * + * @param httpRequest + * @return void + * @author HuangZhiGao + * @date 2020年11月16日 下午5:42:11 + */ + public static void createDefaultCard(HttpRequest httpRequest) + { + long designId = httpRequest.getParameterLong("designId"); + long mediaId = httpRequest.getParameterLong("mediaId"); + String cardId = ""; + try + { + if (designId > 0) + { + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, new Selector("designId", designId)); + if (order == null) + { + httpRequest.setResponseError("订单【" + designId + "】不存在,请重新选择!"); + return; + } + + cardId = String.valueOf(DzmpUserCardStorageDao.createDefaultCard(designId, httpRequest.getSessionName())); + if (mediaId > 0 && Validates.isNotEmpty(cardId)) + { + // 修改电子名片 媒体编号信息 + Updater updater = new Updater(); + updater.addMust("id", Long.parseLong(cardId)); + updater.addField("mediaId", mediaId); + ORM.get(ZTable.class).update(DzmpUserCardStorage.class, updater); + } + } + } + catch (Exception e) + { + log.error("订单【" + designId + "】创建电子名片异常," + e.getMessage(), e); + } + + Map jsonMap = new HashMap(1); + jsonMap.put("cardId", cardId); + httpRequest.setResponseResult(Jsons.toString(jsonMap)); + } + + /** + * 根据设计平台订单id查询设计平台名片集合
            + * + * @param httpRequest + * @return void + * @author HuangZhiGao + * @date 2020年11月19日 上午9:33:31 + */ + public static void queryCardList(HttpRequest httpRequest) throws Exception + { + long designId = httpRequest.getParameterLong("designId"); + List cardList = new ArrayList(); + if (designId > 0) + { + cardList = ORM.get(ZTable.class).list(DzmpUserCardStorage.class, new Selector("designId", designId)); + } + + MapSO attrMap = new HashMapSO(); + attrMap.put("cardList", cardList); + String ret = ZmlContexts.parseZmlPath(httpRequest, "/zview/des/presenter/templatePreviewCardListInfo.zml", attrMap); + httpRequest.setResponseResult(ret); + } + + /** + * 根据名片id删除设计平台名片
            + * + * @param httpRequest + * @throws Exception + * @return void + * @author HuangZhiGao + * @date 2020年11月19日 下午1:48:17 + */ + public static void deleteCardById(HttpRequest httpRequest) throws Exception + { + long cardId = httpRequest.getParameterLong("cardId"); + if (cardId > 0) + { + List urlList = new ArrayList(); + DzmpUserCardStorage userCard = ORM.get(ZTable.class).item(DzmpUserCardStorage.class, new Selector("id", cardId)); + if (Validates.isNotEmpty(userCard)) + { + urlList.add(userCard.getCardAvatar()); + if (Validates.isNotEmpty(userCard.getCardBackgroundType())) + { + if (userCard.getCardBackgroundType() == 1) + {// 非系统名片背景图 + urlList.add(userCard.getCardBackground()); + } + } + + // 名片关联的个人相册图片 + List albumList = ORM.get(ZTable.class).list(DzmpImageStorage.class, + new Selector("userCardId", userCard.getId()).addMust("type", 1)); + for (DzmpImageStorage album : albumList) + { + urlList.add(album.getImgUrl()); + } + } + deleteCardOssFiles(urlList); + deleteCardImageInfo(cardId); + ORM.get(ZTable.class).delete(DzmpUserCardStorage.class, cardId); + } + } + + /** + * 删除名片关联的OSS文件[名片头像图片、名片关联的个人相册图片]
            + * + * @param urlList + * @return void + * @author HuangZhiGao + * @throws Exception + * @date 2020年11月21日 上午11:56:43 + */ + private static void deleteCardOssFiles(List urlList) throws Exception + { + if (Validates.isNotEmpty(urlList)) + { + for (String url : urlList) + { + if (Validates.isNotEmpty(url) && Validates.isUrl(url)) + { + // 删除OSS文件 + OssService ossService = Global.get(OssService.class); + ossService.deleteFile(bucketName, url); + } + } + } + } + + /** + * 根据名片id删除名片关联的图片信息
            + * + * @return void + * @author HuangZhiGao + * @throws SQLException + * @throws ORMException + * @date 2020年11月24日 下午5:00:47 + */ + private static void deleteCardImageInfo(long cardId) throws ORMException, SQLException + { + if (cardId > 0) + { + ORM.get(ZTable.class).delete(DzmpImageStorage.class, new Selector("userCardId", cardId)); + } + } + + /** + * + * [简要描述]: 查看客户智能名片历史模板
            + * [详细描述]:
            + * + * @author gjx + * @param buyerNick + * @throws Exception + */ + public static void doHistoryTemplateQuery(HttpRequest request) throws Exception + { + Selector selector = new Selector(); + selector.addFields("designId"); + selector.addMust("buyerNick", request.getParameter("buyerNick")); + selector.addMustThenGE("status", StatusConstants.ORDER_55.value()); + selector.addMust("typeId", 2023207561256L); + + List cardList = new ArrayList(); + + List orderList = ORM.get(ZTable.class).list(DesignOrder.class, selector); + if (orderList.isEmpty()) + { + MapSO attrMap = new HashMapSO(); + attrMap.put("cardList", cardList); + String ret = ZmlContexts.parseZmlPath(request, "/zview/des/presenter/templateCardHistorySelect.zml", attrMap); + request.setResponseResult(ret); + return; + } + + List designIdList = new ArrayList(); + for (DesignOrder order : orderList) + { + designIdList.add(order.getDesignId()); + + } + cardList = ORM.get(ZTable.class).list(DzmpUserCardStorage.class, + new Selector().addMustInLong("designId", Arrays.toArrayLong(designIdList)).addMustIsNotEmpty("cardUrl")); + + MapSO attrMap = new HashMapSO(); + attrMap.put("cardList", cardList); + String ret = ZmlContexts.parseZmlPath(request, "/zview/des/presenter/templateCardHistorySelect.zml", attrMap); + request.setResponseResult(ret); + + } + + /** + * + * [简要描述]: 智能名片客户选择历史模板
            + * [详细描述]:
            + * + * @author gjx + * @param request + * @throws Exception + */ + public static void doSelectHistoryTemplate(HttpRequest request) throws Exception + { + String operatorCode = request.getSessionName(); + long userCardId = request.getParameterLong("id");// 历史模板id + long designId = request.getParameterLong("designId");// 需要复制模板的订单号 + long mediaId = 0L; + long newMediaId = Ids.longId(); + long newUserCardId = Ids.longId13_4(); + try + { + DzmpUserCardStorage userCard = ORM.get(ZTable.class).item(DzmpUserCardStorage.class, new Selector("id", userCardId).addMustThenG("mediaId", 0)); + if (null == userCard) + { + request.setResponseError("选择模板时历史模板不存在或模板无法复制"); + return; + } + + mediaId = userCard.getMediaId(); + + // 复制订单模板 + if (!TemplateDao.doNewOrderTemplate(designId, mediaId, newMediaId, request.getSessionName())) + { + request.setResponseError("复制模板时失败,mediaId=" + mediaId); + return; + } + + DzmpUserCardStorage newUserCard = new DzmpUserCardStorage(); + Objects.copyDeep(userCard, newUserCard); + newUserCard.setId(newUserCardId); + newUserCard.setDesignId(designId); + newUserCard.setMediaId(newMediaId); + newUserCard.setCardUrl(null); + newUserCard.setCardAvatar(null); + newUserCard.setUpdateOperatorCode(null); + newUserCard.setUpdateTime(null); + + String cardUrl = userCard.getCardUrl(); + if (Validates.isNotEmpty(cardUrl)) + {// 复制定稿图 + int matchIndex = cardUrl.indexOf("dzmpImages"); + String cardOssKey = cardUrl.substring(matchIndex); + + String newCardOssKey = "dzmpImages/" + DateTimes.getDateTime7String() + "/" + newUserCardId + ".png"; + + OssFileDao.copyObject(cardOssKey, newCardOssKey); + + newUserCard.setCardUrl(cardUrl.replace(cardOssKey, newCardOssKey)); + } + + String cardAvatar = userCard.getCardAvatar(); + if (Validates.isNotEmpty(cardAvatar)) + {// 复制头像 + int matchIndex = cardAvatar.indexOf("dzmpImages"); + String cardAvatarOssKey = cardAvatar.substring(matchIndex); + + String newCardAvatarOssKey = MediaCardPresenter.getCardOssKey(3, null, "." + Files.getFileExt(cardAvatar)); + + OssFileDao.copyObject(cardAvatarOssKey, newCardAvatarOssKey); + + newUserCard.setCardAvatar(cardAvatar.replace(cardAvatarOssKey, newCardAvatarOssKey)); + } + + String cardBackground = userCard.getCardBackground(); + if (Validates.isNotEmpty(cardBackground) && userCard.getCardBackgroundType() == 1) + {// 复制非系统背景图 + int matchIndex = cardBackground.indexOf("dzmpImages"); + String cardBackgroundOssKey = cardBackground.substring(matchIndex); + String newCardBackgroundOssKey = MediaCardPresenter.getCardOssKey(2, null, "." + Files.getFileExt(cardBackground)); + + OssFileDao.copyObject(cardBackgroundOssKey, newCardBackgroundOssKey); + + newUserCard.setCardBackground(cardBackground.replace(cardBackgroundOssKey, newCardBackgroundOssKey)); + } + else + { + newUserCard.setCardBackground(null); + } + + newUserCard.setAddOperatorCode(operatorCode); + newUserCard.setAddTime(Sqls.nowTimestamp()); + + List newImageStorageList = new ArrayList(); + List imageStorageList = ORM.get(ZTable.class).list(DzmpImageStorage.class, new Selector("userCardId", userCardId)); + for (DzmpImageStorage dzmpImageStorage : imageStorageList) + { + String imgUrl = dzmpImageStorage.getImgUrl(); + int matchIndex = imgUrl.indexOf("dzmpImages"); + String imgOssKey = imgUrl.substring(matchIndex); + String newImgOssKey = MediaCardPresenter.getCardOssKey(1, null, "." + Files.getFileExt(imgUrl)); + + OssFileDao.copyObject(imgOssKey, newImgOssKey); + + dzmpImageStorage.setId(0); + dzmpImageStorage.setImgUrl(imgUrl.replace(imgOssKey, newImgOssKey)); + dzmpImageStorage.setUserCardId(newUserCardId); + dzmpImageStorage.setAddOperatorCode(operatorCode); + dzmpImageStorage.setAddTime(Sqls.nowTimestamp()); + dzmpImageStorage.setUpdateOperatorCode(null); + dzmpImageStorage.setUpdateTime(null); + + newImageStorageList.add(dzmpImageStorage); + } + + ORM.get(ZTable.class).insert(newUserCard); + if (!newImageStorageList.isEmpty()) + { + ORM.get(ZTable.class).insertBatch(newImageStorageList); + } + } + catch (Exception e) + { + log.error("操作员【" + operatorCode + "】复制模板异常,模板id=" + userCardId + ",订单号=" + designId + ",异常原因:" + e.getMessage(), e); + request.setResponseError("复制模板异常:" + e.getMessage()); + return; + } + log.info("操作员【" + operatorCode + "】复制模板成功,模板id=" + userCardId + ",订单号=" + designId); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/DzmpSupportPresenter.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/DzmpSupportPresenter.java new file mode 100644 index 0000000..838928c --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/DzmpSupportPresenter.java @@ -0,0 +1,264 @@ +package com.zhiqim.yangcai.design.presenter; + +import java.util.HashMap; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnTransaction; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.design.dbo.dzmpsupport.DzmpDesignElement; + +/** + * 操作电子名片设计元素
            + * + * @author HuangZhiGao + * @date 2020年7月22日 上午11:35:20 + */ +@AnAlias("DzmpSupportPresenter") +public class DzmpSupportPresenter +{ + private static final Log log = LogFactory.getLog(DzmpSupportPresenter.class); + + /** + * 新增电子名片设计元素json字符串
            + * + * @param request + * @throws Exception + * @return void + * @author HuangZhiGao + * @date 2020年7月22日 上午11:21:32 + */ + @AnTransaction + public static void doSaveDzmpElementJson(HttpRequest request) + { + String id = request.getParameter("id"); + long mediaId = request.getParameterLong("mediaId"); + String jsonStr = request.getParameterNoFileterOnCNT("eleJson"); + if (Validates.isEmpty(id)) + { + request.setResponseError("id不能为空"); + return; + } + if (mediaId == -1) + { + request.setResponseError("模板素材id不能为空"); + return; + } + if (Validates.isEmpty(jsonStr)) + { + request.setResponseError("设计元素json字符串不能为空"); + return; + } + + // long id = Ids.longId13_4(); + DzmpDesignElement dzmpDesignElement = new DzmpDesignElement(id, mediaId, jsonStr, Sqls.nowTimestamp()); + try + { + ORM.get(ZTable.class).insert(dzmpDesignElement); + } + catch (Exception e) + { + request.setResponseError("新增电子名片设计元素json字符串异常"); + log.error("新增电子名片设计元素json字符串异常:" + e.getMessage()); + return; + } + + // 新增后返回id + Map jsonMap = new HashMap(1); + jsonMap.put("id", id); + request.setResponseResult(Jsons.toString(jsonMap)); + return; + } + + /** + * 修改电子名片设计元素json字符串
            + * + * @param request + * @throws Exception + * @return void + * @author HuangZhiGao + * @date 2020年7月22日 上午11:49:10 + */ + @AnTransaction + public static void doUpdateDzmpElementJson(HttpRequest request) + { + String id = request.getParameter("id"); + String jsonStr = request.getParameterNoFileterOnCNT("eleJson"); + if (Validates.isEmpty(id)) + { + request.setResponseError("id不能为空"); + return; + } + if (Validates.isEmpty(jsonStr)) + { + request.setResponseError("设计元素json字符串不能为空"); + return; + } + + try + { + DzmpDesignElement item = ORM.get(ZTable.class).item(DzmpDesignElement.class, new Selector("id", id)); + if (Validates.isEmpty(item)) + { + request.setResponseError("电子名片设计元素json字符串不存在,id为[" + id + "]"); + return; + } + Updater updater = new Updater(); + updater.addMust("id", id); + updater.addField("eleJson", jsonStr); + updater.addField("modifyTime", Sqls.nowTimestamp()); + ORM.get(ZTable.class).update(DzmpDesignElement.class, updater); + + // 返回id + Map jsonMap = new HashMap(1); + jsonMap.put("id", id); + request.setResponseResult(Jsons.toString(jsonMap)); + } + catch (Exception e) + { + request.setResponseError("修改电子名片设计元素json字符串异常"); + log.error("修改电子名片设计元素json字符串异常:" + e.getMessage() + ",参数为[" + Jsons.toString(request.getParameterMap()) + "]"); + return; + } + } + + /** + * 新增或修改电子名片设计元素json字符串
            + * + * @param request + * @return void + * @author HuangZhiGao + * @date 2020年7月22日 下午5:31:23 + */ + @AnTransaction + public static void doSaveOrUpdateDzmpElementJson(HttpRequest request) + { + String id = request.getParameter("id"); + String jsonStr = request.getParameterNoFileterOnCNT("eleJson"); + if (Validates.isEmpty(id)) + { + request.setResponseError("id不能为空"); + return; + } + if (Validates.isEmpty(jsonStr)) + { + request.setResponseError("设计元素json字符串不能为空"); + return; + } + + try + { + DzmpDesignElement item = ORM.get(ZTable.class).item(DzmpDesignElement.class, new Selector("id", id)); + if (Validates.isNotEmpty(item)) + { + doUpdateDzmpElementJson(request); + return; + } + else + { + doSaveDzmpElementJson(request); + return; + } + } + catch (Exception e) + { + request.setResponseError("新增或修改电子名片设计元素json字符串异常"); + log.error("新增或修改电子名片设计元素json字符串异常:" + e.getMessage() + ",参数为[" + Jsons.toString(request.getParameterMap()) + "]"); + return; + } + } + + /** + * 根据id删除电子名片设计元素json字符串
            + * + * @param request + * @throws Exception + * @return void + * @author HuangZhiGao + * @date 2020年7月22日 下午1:57:21 + */ + @AnTransaction + public static void doDelDzmpElementJsonById(HttpRequest request) + { + String id = request.getParameter("id"); + if (Validates.isEmpty(id)) + { + request.setResponseError("id不能为空"); + return; + } + + try + { + Selector selector = new Selector("id", id); + DzmpDesignElement item = ORM.get(ZTable.class).item(DzmpDesignElement.class, selector); + if (Validates.isEmpty(item)) + { + request.setResponseError("电子名片设计元素json字符串不存在,id为[" + id + "]"); + return; + } + ORM.get(ZTable.class).delete(DzmpDesignElement.class, selector); + } + catch (Exception e) + { + request.setResponseError("删除电子名片设计元素json字符串异常"); + log.error("删除电子名片设计元素json字符串异常:" + e.getMessage() + ",id为[" + id + "]"); + return; + } + } + + /** + * 根据id查询电子名片设计元素json字符串
            + * + * @param request + * @throws Exception + * @return void + * @author HuangZhiGao + * @date 2020年7月22日 下午2:01:49 + */ + @AnTransaction + public static void doSelDzmpElementJsonById(HttpRequest request) + { + String id = request.getParameter("id"); + if (Validates.isEmpty(id)) + { + request.setResponseError("id不能为空"); + return; + } + + try + { + Map jsonMap = new HashMap(); + DzmpDesignElement item = ORM.get(ZTable.class).item(DzmpDesignElement.class, new Selector("id", id)); + if (Validates.isNotEmpty(item)) + { + jsonMap.put("error", Boolean.FALSE); + jsonMap.put("id", item.getId()); + jsonMap.put("eleJson", item.getEleJson()); + request.setResponseResult(Jsons.toString(jsonMap)); + } + else + { + jsonMap.put("error", Boolean.TRUE); + jsonMap.put("errorMsg", "未查询到[" + id + "]对应的设计元素json字符串"); + request.setResponseResult(Jsons.toString(jsonMap)); + } + } + catch (Exception e) + { + request.setResponseError("查询电子名片设计元素json字符串异常"); + log.error("查询电子名片设计元素json字符串异常:" + e.getMessage() + ",id为[" + id + "]"); + return; + } + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/IphoneLoginPresenter.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/IphoneLoginPresenter.java new file mode 100644 index 0000000..33f9f87 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/IphoneLoginPresenter.java @@ -0,0 +1,126 @@ +package com.zhiqim.yangcai.design.presenter; + +import org.zhiqim.httpd.HttpContext; +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.validate.ones.IsNotEmpty; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.manager.SmsUtils; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.editor.DesignEditorUser; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; +import com.zhiqim.yangcai.util.BusinessTbzBjqUtil; +import com.zhiqim.yangcai.util.ErpClassService; + +@AnAlias("IphoneLoginPresenter") +public class IphoneLoginPresenter +{ + /** + * [简要描述]:登录短信验证
            + * + * @author caohong + * @param request + * @throws Exception + */ + public static void sendSms(HttpRequest request) throws Exception + { + // 1.判断传入参数 + request.addValidate(new IsNotEmpty("mobile", "手机号码不能为空")); + // 3.验证操作员编码是否存在、是否停用,是否组停用 + /* + * String operatorCode = request.getParameter("operatorCode"); + * ZmrOperator operator = ZmrBootstrap.tableOpr(request).item(ZmrOperator.class, + * operatorCode); + * if (operator == null) + * { + * request.setResponseError("用户名不正确"); + * return; + * } + * if (operator.getOperatorStatus() == 1) + * { + * request.setResponseError("该用户已停用,请联系管理员"); + * return; + * } + */ + String mobile = request.getParameter("mobile"); + DesignEditorUser designEditorUser = ORM.get(ZTable.class).item(DesignEditorUser.class, new Selector().addMust("mobile", mobile)); + if (null == designEditorUser) + {// 如果没有根据手机号查到相关订单信息,就需要去查询订单中的数据,判断用户是否下过单 + DesignOrder designOrder = ORM.get(ZTable.class).item(DesignOrder.class, new Selector().addMust("userMobile", mobile)); + if (null == designOrder) + {// 如果订单数据也为空,则不允许登录 + request.setResponseError("未查到该手机号的用户信息。"); + return; + } + designEditorUser = new DesignEditorUser(); + designEditorUser.setUserName(designOrder.getBuyerNick()); + designEditorUser.setMobile(mobile); + designEditorUser.setType(2);// 设计师,2为客户 + ORM.get(ZTable.class).insert(designEditorUser); + designEditorUser = ORM.get(ZTable.class).item(DesignEditorUser.class, new Selector().addMust("mobile", mobile)); + } + + // 发送短信 + SmsUtils.sendSmsCode(request, mobile, "SMS_174195342"); + } + + public static void doLogin(HttpRequest request) throws Exception + { + HttpContext context = request.getContext(); + + // 1.判断传入参数 + request.addValidate(new IsNotEmpty("mobile", "手机号不能为空")); + request.addValidate(new IsNotEmpty("yzm", "验证码不能为空")); + String mobile = request.getParameter("mobile"); + if (!request.chkValidate()) + { + request.setResponseError(request.getAlertMsg()); + return; + } + DesignEditorUser designEditorUser = ORM.get(ZTable.class).item(DesignEditorUser.class, new Selector().addMust("mobile", mobile)); + if (null == designEditorUser) + { + request.setResponseError("用户不存在"); + return; + } + String smsCode = request.getParameter("yzm"); + if (smsCode.length() != 6) + { + request.setResponseError("短信验证码必须是6位数字"); + return; + } + String sessionSmsCodeSession = request.getSessionAttributeString("_smscode_"); + if (!smsCode.equals(sessionSmsCodeSession)) + { + request.setResponseError("短信验证码不正确或已失效,请新输入!"); + return; + } + + String token = BusinessTbzBjqUtil.getAccessToken(designEditorUser.getUserName(), Integer.valueOf(String.valueOf(designEditorUser.getEditorId())), 0L, + 0L, "", designEditorUser.getMobile()); + request.setRedirect("https://m-diy.lingtao.com?loginCode=" + token);// 跳转url + /* + * if ("true".equals(hasVerificationSms)) + * { + * request.getSessionAttributeString("_smscode_", null); + * Map map = new HashMap(); + * map.put("账号", operatorCode); + * map.put("手机号码", operator.getOperatorMobile()); + * } + * // 8.最后回调登录 + * ZmlBootstrap bootstrap = ((Context) context).getBootstrap(); + * if (bootstrap instanceof ZmrBootstrapApi) + * { + * ((ZmrBootstrapApi) bootstrap).logined(request); + * } + */ + } + + public static void syncAccount(HttpRequest request) + { + String operatorCode = request.getParameter("operatorCode"); + new ErpClassService(operatorCode); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/KeywordPresenter.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/KeywordPresenter.java new file mode 100644 index 0000000..bab6403 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/KeywordPresenter.java @@ -0,0 +1,216 @@ +package com.zhiqim.yangcai.design.presenter; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.ZmlContexts; +import org.zhiqim.httpd.context.annotation.AnIntercept; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.extend.HashMapSO; +import org.zhiqim.kernel.extend.MapSO; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dao.KeywordDao; +import com.zhiqim.yangcai.design.dbo.DesLabelIndustry; +import com.zhiqim.yangcai.design.dbo.keyword.DesKeywordCore; +import com.zhiqim.yangcai.design.dbo.keyword.DesKeywordIndustry; +import com.zhiqim.yangcai.design.dbo.template.MediaTemplateSolrModel; +import com.zhiqim.yangcai.design.dbo.template.MediaTemplateView; +import com.zhiqim.yangcai.util.SolrUtil; + +/** + * + * 关键词Presenter + * + * @version v1.0.0 @author Deng 2018-3-13 新建与整理 + */ +@AnAlias("KeywordPresenter") +@AnIntercept("chkZmrLogin") +public class KeywordPresenter +{ + /** + * 根据输入搜索词查询关键词列表(最近10条) + * + * @param request 请求 + * @param keyword 关键词 + * @return 数组的JSON字符串 + * @throws Exception 异常 + */ + public static String doKeywordList(String keyword) throws Exception + { + if (Validates.isEmptyBlank(keyword)) + { + return "[]"; + } + + String[] word = keyword.split(" "); + Selector selector = new Selector(); + + // 至少两个中文,计算词条的热度 + if (KeywordDao.isChineseLength(keyword, 2)) + { + KeywordDao.doKeywordHotSearch(keyword); + } + + for (int i = 0; i < word.length; i++) + { + if (Validates.isEmptyBlank(word[i])) + { + continue; + } + + selector.addMaybeLike("keywordName", word[i]); + } + selector.addOrderbyDesc("keywordHot"); + PageResult pageResult = ORM.get(ZTable.class).page(DesKeywordCore.class, 1, 10, selector); + + List titleList = new ArrayList<>(); + for (DesKeywordCore item : pageResult.list()) + { + titleList.add(item.getKeywordName()); + } + + return Jsons.toString(titleList); + } + + /** + * 关键词搜索模板 + * + * @param request + * @throws Exception + */ + public static void doKeywordSearch(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page", 1); + int pageSize = 20; + long typeId = request.getParameterLong("designType"); + long industryId = request.getParameterLong("industryId"); + String fileType = request.getParameter("fileType"); + int sort = request.getParameterInt("sort", 0); + String oddEven = request.getParameter("oddEven") == null ? "-1" : request.getParameter("oddEven"); + + // String prdTypeName = ""; + // if (typeId != -1) + // { + // prdTypeName = DesignTypeDao.name(typeId); + // } + // + // String industryName = ""; + // if (industryId != -1) + // { + // industryName = Global.get(DesignIndustryCache.class).getIndustryName(industryId); + // } + + String keyword = request.getParameter("keyword"); + if (Validates.isNotEmpty(keyword)) + { + KeywordDao.doKeywordCoreNumAdd(keyword); // 增加关键词搜索日志 + } + Map param = new HashMap(); + param.put("typeId", String.valueOf(typeId)); + param.put("industryId", String.valueOf(industryId)); + param.put("fileType", fileType); + param.put("sort", String.valueOf(sort)); + param.put("keyword", keyword); + param.put("oddEven", oddEven); + + PageResult pageResult = SolrUtil.queryAllTemplate(page, pageSize, param); + + MapSO attrMap = new HashMapSO(); + attrMap.put("pageResult", pageResult); + attrMap.put("keyword", keyword); + + String ret = ZmlContexts.parseZmlPath(request, "/zview/template/presenter/keywordSearchInfo.zml", attrMap); + request.setResponseResult(ret); + } + + /** + * 根据行业+子行业查询对应的关键字 + * + * @param request + * @throws Exception + */ + public static void doKeywordIndustryTop(HttpRequest request) throws Exception + { + List coreList = new ArrayList(); + long industryId = request.getParameterLong("industryId"); + long industrySubId = request.getParameterLong("industrySubId"); + + if (industryId == -1) + { + return; + } + + // 获取行业下的子行业 + List inSubList = ORM.get(ZTable.class).list(DesLabelIndustry.class, new Selector("industryId", industryId)); + if (inSubList.isEmpty()) + { + return; + } + + // 获取行业和子行业下的关键词 + Selector selector = new Selector(); + selector.addMust("industryId", industryId); + selector.addMustLike("industrySubId", String.valueOf(industrySubId)); + DesKeywordIndustry ki = ORM.get(ZTable.class).item(DesKeywordIndustry.class, selector); + if (ki != null) + { + String keywordName = ki.getIndustryKeyword(); + if (Validates.isNotEmpty(keywordName)) + { + coreList = KeywordDao.doKeywordCoreSort(keywordName); + } + } + + MapSO attrMap = new HashMapSO(); + attrMap.put("inSubList", inSubList); + attrMap.put("industrySubId", industrySubId); + attrMap.put("coreList", coreList); + + String ret = ZmlContexts.parseZmlPath(request, "/zview/keyword/presenter/keywordIndustryTopInfo.zml", attrMap); + request.setResponseResult(ret); + } + + /** + * + * [简要描述] 过滤文件格式:
            + * [详细描述]:
            + * + * @author gjx + * @param mediaList + * @param fileType + * @return + * @throws Exception + */ + public static void doFilterFileType(List mediaList, String fileType) throws Exception + { + if (mediaList.isEmpty() || Validates.isEmpty(fileType)) + { + return; + } + + Iterator it = mediaList.iterator(); + while (it.hasNext()) + { + MediaTemplateView media = it.next(); + if (Validates.isEmpty(media.getFileType())) + { + it.remove(); + break; + } + if (media.getFileType().indexOf(fileType.toLowerCase()) == -1) + {// 模板不包含指定格式移除数据 + it.remove(); + } + } + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/LabelPresenter.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/LabelPresenter.java new file mode 100644 index 0000000..ab7098b --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/LabelPresenter.java @@ -0,0 +1,295 @@ +package com.zhiqim.yangcai.design.presenter; + +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.ZmlContexts; +import org.zhiqim.httpd.context.annotation.AnIntercept; +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnTransaction; +import org.zhiqim.kernel.extend.HashMapSO; +import org.zhiqim.kernel.extend.MapSO; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.kernel.util.Lists; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.cache.DesignIndustryCache; +import com.zhiqim.yangcai.cache.DesignTypeCache; +import com.zhiqim.yangcai.design.dao.DesignTypeDao; +import com.zhiqim.yangcai.design.dao.LabelDao; +import com.zhiqim.yangcai.design.dbo.DesKeyword; +import com.zhiqim.yangcai.design.dbo.DesKeywordCat; +import com.zhiqim.yangcai.design.dbo.DesLabelAttribute; +import com.zhiqim.yangcai.design.dbo.DesLabelAttributeCat; +import com.zhiqim.yangcai.design.dbo.DesLabelIndustry; +import com.zhiqim.yangcai.design.dbo.template.MediaTemplate; +import com.zhiqim.yangcai.design.dbo.works.DesWorksFile; +import com.zhiqim.yangcai.util.SolrUtil; + +/** + * 标签Presenter + * + * @version v1.0.0 @author Deng 2017-6-26 新建与整理 + */ +@AnAlias("LabelPresenter") +@AnIntercept("chkZmrLogin") +public class LabelPresenter +{ + /** + * 查询标签行业下的子行业 + * + * @param request + * @param labelId + * @throws Exception + */ + public static void doIndustrySubQuery(HttpRequest request, long industryId) throws Exception + { + Selector selector = new Selector(); + selector.addMust("industryId", industryId); + List subList = ORM.get(ZTable.class).list(DesLabelIndustry.class, selector); + + MapSO attrMap = new HashMapSO(); + attrMap.put("result", subList); + attrMap.put("industryId", industryId); + + String ret = ZmlContexts.parseZmlPath(request, "/zview/label/presenter/industrySubInfo.zml", attrMap); + request.setResponseResult(ret); + } + + /** + * 获取标签行业下的属性分类 + * + * @param request + * @param labelId + * @return + * @throws Exception + */ + public static String doIndustryCatQuery(HttpRequest request, long industryId) throws Exception + { + List catList = ORM.get(ZTable.class).list(DesLabelAttributeCat.class, new Selector("industryId", industryId)); + return Jsons.toString(catList); + } + + /** + * 获取标签属性分类名称 + * + * @param request + * @param labelId + * @return + * @throws Exception + */ + public static String doAttributeCatName(long attributeCatId) throws Exception + { + DesLabelAttributeCat cat = ORM.get(ZTable.class).item(DesLabelAttributeCat.class, attributeCatId); + + return cat.getAttributeCatName(); + } + + /** + * 获取标签属性名称 + * + * @param request + * @param labelId + * @return + * @throws Exception + */ + public static String doAttributeName(String attributeCatId) throws Exception + { + DesLabelAttribute cat = ORM.get(ZTable.class).item(DesLabelAttribute.class, Long.parseLong(attributeCatId)); + + return cat.getAttributeName(); + } + + /** + * 获取标签子行业名称 + * + * @param request + * @param labelId + * @return + * @throws Exception + */ + public static String doIndustrySubName(String subsId) throws Exception + { + DesLabelIndustry industry = ORM.get(ZTable.class).item(DesLabelIndustry.class, Long.parseLong(subsId)); + + return industry.getIndustrySubName(); + } + + /** + * 获取关键词分类名称 + * + * @param catId + * @return + * @throws Exception + */ + public static String doKeywordCatName(long catId) throws Exception + { + DesKeywordCat cat = ORM.get(ZTable.class).item(DesKeywordCat.class, catId); + if (cat == null) + { + return ""; + } + + return cat.getCatName(); + } + + /** + * 获取关键词名称 + * + * @param keywordId + * @return + * @throws Exception + */ + public static String doKeywordName(long keywordId) throws Exception + { + DesKeyword keyword = ORM.get(ZTable.class).item(DesKeyword.class, keywordId); + if (keyword == null) + { + return ""; + } + + return keyword.getKeywordName(); + } + + /** + * 模板关联标签 + * + * @param request + * @throws Exception + */ + @AnTransaction + public static void doTemplateLabelRelation(HttpRequest request) throws Exception + { + long mediaId = request.getParameterLong("mediaId"); + long industryId = request.getParameterLong("industryId"); + String industrySubIds = request.getParameter("industrySubIds"); + String attributeIds = request.getParameter("attributeIds"); + + MediaTemplate media = ORM.get(ZTable.class).item(MediaTemplate.class, mediaId); + if (media == null) + { + return; + } + + // String prdTypeName = DesignTypeDao.name(media.getTypeId()); + // String industryName = Global.get(DesignIndustryCache.class).getIndustryName(industryId); + String industrySubName = LabelDao.doIndustrySubName(industrySubIds); + String attributeName = LabelDao.doAttributeName(attributeIds); + + Updater updater = new Updater(); + updater.addMust("mediaId", mediaId); + updater.addField("industryId", industryId); + updater.addField("industrySubIds", industrySubIds); + updater.addField("industrySubName", industrySubName); + updater.addField("attributeIds", attributeIds); + updater.addField("attributeName", attributeName); + + ORM.get(ZTable.class).update(MediaTemplate.class, updater); + + // 更新solr数据 + SolrUtil.updateMediaData(mediaId); + } + + /** + * 添加模板自定义标签 + * + * @param request + * @throws Exception + */ + public static void doTemplateCustomLabelAdd(HttpRequest request) throws Exception + { + long mediaId = request.getParameterLong("mediaId"); + String keywordName = request.getParameter("keywordName").trim(); + MediaTemplate media = ORM.get(ZTable.class).item(MediaTemplate.class, mediaId); + + String typeName = DesignTypeDao.name(media.getTypeId()); + + List industryList = Lists.toStringList(media.getIndustrySubName()); + List attrList = Lists.toStringList(media.getAttributeName()); + List definedList = Lists.toStringList(media.getKeywordName()); + + if (typeName.equals(keywordName) || industryList.contains(keywordName) || attrList.contains(keywordName) || definedList.contains(keywordName)) + { + request.setResponseError("该标签词已存在,请重新输入"); + return; + } + + String name = ""; + if (definedList.isEmpty()) + { + name = keywordName; + } + else + { + name = media.getKeywordName() + "," + keywordName; + } + + Updater updater = new Updater(); + updater.addMust("mediaId", mediaId); + updater.addField("keywordName", name); + ORM.get(ZTable.class).update(MediaTemplate.class, updater); + // 更新solr数据 + SolrUtil.updateMediaData(mediaId); + request.setResponseResult(keywordName); + } + + /** + * 删除自定义标签 + * + * @param request + * @throws Exception + */ + public static void doTemplateCustomLabelDelete(HttpRequest request) throws Exception + { + long mediaId = request.getParameterLong("mediaId"); + String keywordName = request.getParameter("keywordName"); + + MediaTemplate media = ORM.get(ZTable.class).item(MediaTemplate.class, mediaId); + + List definedList = Lists.toStringList(media.getKeywordName()); + definedList.remove(keywordName); + String newName = Lists.toString(definedList); + + Updater updater = new Updater(); + updater.addMust("mediaId", mediaId); + updater.addField("keywordName", newName); + + ORM.get(ZTable.class).update(MediaTemplate.class, updater); + + // 更新solr数据 + SolrUtil.updateMediaData(mediaId); + } + + /** + * 作品关联的标签 + * + * @param worksId + * @return + * @throws Exception + */ + public static String doWorksLabelName(long worksId) throws Exception + { + DesWorksFile works = ORM.get(ZTable.class).item(DesWorksFile.class, worksId); + String prdTypeName = Global.get(DesignTypeCache.class).getName(works.getPrdTypeId()); + String industryName = Global.get(DesignIndustryCache.class).getIndustryName(works.getIndustryId()); + + String labelName = prdTypeName + " " + industryName + " "; + + if (Validates.isNotEmpty(works.getIndustrySubName())) + { + labelName += works.getIndustrySubName() + " "; + } + + if (Validates.isNotEmpty(works.getAttributeName())) + { + labelName += works.getAttributeName(); + } + + return labelName; + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/MessagePresenter.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/MessagePresenter.java new file mode 100644 index 0000000..22c9116 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/MessagePresenter.java @@ -0,0 +1,189 @@ +/** + * 扬彩印刷设计 + * 文件名 :MessagePresenter.java + * 创建人 :jiangbin + * 创建时间:2020-5-6 + */ +package com.zhiqim.yangcai.design.presenter; + +import java.util.HashMap; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.annotation.AnIntercept; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.extend.MapSS; +import org.zhiqim.kernel.httpclient.HttpGet; +import org.zhiqim.kernel.httpclient.HttpPost; +import org.zhiqim.kernel.httpclient.HttpResult; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Updater; + +import com.alibaba.fastjson.JSON; +import com.zhiqim.yangcai.design.dbo.order.OrderMessage; +import com.zhiqim.yangcai.design.messagebox.ZqmMessageProducerHandler; +import com.zhiqim.yangcai.util.BusinessPlatformClientUtil; + +import yangcai.messagebox.model.MessageBusi; + +/** + * 消息盒子信息处理 + * + * @version 1.0 @author jiangbin 2020-5-6 新建与整理 + */ +@AnAlias("MessagePresenter") +@AnIntercept("chkZmrLogin") +public class MessagePresenter +{ + private static final Log log = LogFactory.getLog(MessagePresenter.class); + + /** + * + * [简要描述]: 处理待办事项
            + * [详细描述]:
            + * + * @author gjx + * @param request + * @throws Exception + */ + public static void doProcessMessage(HttpRequest request) throws Exception + { + long id = request.getParameterLong("id"); + if (id <= 0) + { + request.setResponseError("请选择待处理事项"); + return; + } + + Updater updater = new Updater(); + updater.addMust("id", id); + updater.addField("consumerState", 1); + updater.addField("consumerTime", Sqls.nowTimestamp()); + + ORM.get(ZTable.class).update(OrderMessage.class, updater); + } + + /** + * + * 消息处理 + * + * @author jiangbin + * @param request + */ + public static void doMessageHandle(HttpRequest request) + { + String id = request.getParameter("id"); + if (Validates.isEmail(id)) + { + request.setResponseError("消息ID为空"); + return; + } + try + { + String token = BusinessPlatformClientUtil.getAccessToken(); + HttpPost httpPost = new HttpPost( + BusinessPlatformClientUtil.GATE_WAY_URL + "api-busi/messageBusi/readMessagesWithTheSameOrderId/" + id + "?access_token=" + token); + httpPost.setReadTimeout(2); + httpPost.setConnectTimeout(1); + httpPost.execute(); + HttpResult result = httpPost.getResult(); + if (result.isSuccess()) + { + request.setResponseResult("true"); + return; + } + else + { + throw new Exception("处理消息【" + id + "】失败:" + result.getResponseText()); + } + } + catch (Exception e) + { + log.error("消息【" + id + "】处理异常," + e.getMessage(), e); + request.setResponseError("消息处理失败"); + return; + } + } + + /** + * + * 消息再次发送 + * + * @author jiangbin + * @param request + */ + public static void sendMessageAgain(HttpRequest request) + { + String id = request.getParameter("id"); + if (Validates.isEmail(id)) + { + request.setResponseError("消息ID为空"); + return; + } + try + { + String token = BusinessPlatformClientUtil.getAccessToken(); + HttpGet httpGet = new HttpGet(BusinessPlatformClientUtil.GATE_WAY_URL + "api-busi/messageBusi/" + id + "?access_token=" + token); + httpGet.setReadTimeout(2); + httpGet.setConnectTimeout(1); + httpGet.execute(); + HttpResult result = httpGet.getResult(); + if (result.isSuccess()) + { + MapSS mapss = Jsons.toMapSS(result.getResponseText()); + if (Validates.isNotEmpty(mapss) && Validates.isNotEmpty(mapss.get("data"))) + { + MessageBusi messageBusi = JSON.parseObject(mapss.get("data"), MessageBusi.class); + if (Validates.isNotEmpty(messageBusi)) + { + final String sessionName = request.getSessionName(); + // 再次发送消息提醒 + MessageBusi newMessageBusi = new MessageBusi(); + newMessageBusi.setId(String.valueOf(Ids.longId13_4())); + newMessageBusi.setProducerOperateType(messageBusi.getProducerOperateType()); + newMessageBusi.setProducerOperateCode(sessionName); + newMessageBusi.setProducerOperateName(sessionName); + newMessageBusi.setConsumerPlatformType(messageBusi.getConsumerPlatformType()); + newMessageBusi.setConsumerOperateCode(messageBusi.getConsumerOperateCode()); + newMessageBusi.setConsumerOperateName(messageBusi.getConsumerOperateName()); + newMessageBusi.setConsumerOperateType(messageBusi.getConsumerOperateType()); + newMessageBusi.setMessageType(messageBusi.getMessageType()); + newMessageBusi.setOrderId(messageBusi.getOrderId()); + newMessageBusi.setTopic(messageBusi.getTopic()); + newMessageBusi.setMessageBody(messageBusi.getMessageBody()); + HashMap propertyMap = new HashMap(); + /* + * propertyMap.put("designId", messageBusi.getOrderId()); + * propertyMap.put("title", "订单审核退回"); + * propertyMap.put("sender", sessionName); + */ + ZqmMessageProducerHandler.sendMessage(newMessageBusi, propertyMap); + request.setResponseResult("true"); + return; + } + } + else + { + throw new Exception("未查询到ID为【" + id + "】的消息数据"); + } + } + else + { + throw new Exception("调用消息查询接口失败:" + result.getResponseText()); + } + } + catch (Exception e) + { + log.error("消息【" + id + "】再次发送异常," + e.getMessage(), e); + request.setResponseError("消息再次发送失败"); + return; + } + + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/MobileTemplatePresenter.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/MobileTemplatePresenter.java new file mode 100644 index 0000000..8766f8f --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/MobileTemplatePresenter.java @@ -0,0 +1,83 @@ +package com.zhiqim.yangcai.design.presenter; + +import java.util.HashMap; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.HttpResponse; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.extend.HashMapSO; +import org.zhiqim.kernel.extend.MapSO; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.Arrays; + +import com.zhiqim.yangcai.design.dbo.template.MediaTemplateSolrModel; +import com.zhiqim.yangcai.util.SolrUtil; + +/** + * 移动端模板库Presenter + * + * @author HuangZhiGao + * @date 2020-02-26 8:52 + */ +@AnAlias("MobileTemplatePresenter") +public class MobileTemplatePresenter +{ + + /** + * 用于移动端模板查询(可根据关键字查询)
            + * + * @param httpRequest + * @throws Exception + */ + public static void doTemplateSearch(HttpRequest httpRequest) throws Exception + { + String keyword = httpRequest.getParameter("keyword", ""); + String industryId = httpRequest.getParameter("industryId"); + String sort = httpRequest.getParameter("sort"); + String typeId = httpRequest.getParameter("typeId"); + + Map param = new HashMap(); + param.put("keyword", keyword); + param.put("industryId", industryId); + param.put("sort", sort); + param.put("typeId", typeId); + param.put("mediaUrl", "*"); + + // 现在默认查询第一页-每页10条 + int page = httpRequest.getParameterInt("page", 1); + int pageSize = 10; + + PageResult modelPageResult = SolrUtil.queryAllTemplate(page, pageSize, param); + MapSO attrMap = new HashMapSO(); + int total = modelPageResult.total(); + if (page * pageSize >= total) + { + attrMap.put("hasNext", false); + } + else + { + attrMap.put("hasNext", true); + } + + attrMap.put("pageResultList", modelPageResult.list()); + + HttpResponse response = httpRequest.getResponse(); + response.print(Jsons.toString(attrMap)); + } + + /** + * 用于移动端单个模板zml页面返回数量
            + * + * @param strs 带英文逗号分隔的字符串 + * @return int + * @author HuangZhiGao + * @date 2020/2/26 11:40 + */ + public static int getTemplateDetailCount(String strs) + { + return Arrays.toStringArray(strs).length; + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/MobileWorksPresenter.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/MobileWorksPresenter.java new file mode 100644 index 0000000..6778869 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/MobileWorksPresenter.java @@ -0,0 +1,289 @@ +package com.zhiqim.yangcai.design.presenter; + +import java.util.ArrayList; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.HttpResponse; +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.constants.SignConstants; +import org.zhiqim.kernel.extend.HashMapSO; +import org.zhiqim.kernel.extend.MapSO; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.kernel.util.Arrays; +import org.zhiqim.kernel.util.Strings; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.cache.DesignIndustryCache; +import com.zhiqim.yangcai.design.dbo.design.DesignIndustry; +import com.zhiqim.yangcai.design.dbo.works.DesWorksEvent; +import com.zhiqim.yangcai.design.dbo.works.DesWorksFile; +import com.zhiqim.yangcai.design.model.DesWorksFileModel; + +/** + * 移动端作品库Presenter + * + * @author HuangZhiGao + * @date 2020-02-24 8:52 + */ +@AnAlias("MobileWorksPresenter") +public class MobileWorksPresenter implements SignConstants +{ + /** + * 用于移动端作品查询(可根据关键字查询)
            + * + * @param httpRequest + * @throws Exception + * @author HuangZhiGao + * @date 2020/2/24 8:56 + */ + public static void doWorksSearch(HttpRequest httpRequest) throws Exception + { + String keyword = httpRequest.getParameter("keyword", ""); + String searchLike = httpRequest.getParameter("searchLike", "false"); + long industryId = httpRequest.getParameterLong("industryId"); + String worksTypeIndex = httpRequest.getParameter("worksTypeIndex"); + String labelStatus = httpRequest.getParameter("labelStatus", ""); + + // 现在默认查询第一页-每页10条 + int page = httpRequest.getParameterInt("page", 1); + int pageSize = 10; + + Selector selector = new Selector(); + selector.addOrderbyDesc("createTime"); + // 过滤掉 缩略图存储路径 为空的情况 + selector.addMustIsNotEmpty("thumbImagePath"); + + // 行业id + if (industryId != -1L) + { + if (industryId == 10087) + { + List indList = Global.get(DesignIndustryCache.class).getIndustryList(); + List inList = new ArrayList(); + for (DesignIndustry ind : indList) + { + inList.add(ind.getIndustryId()); + } + + selector.addMustInLong("industryId", Arrays.toArrayLong(inList)); + } + else + { + selector.addMust("industryId", industryId); + } + } + // 精品作品 + if (Validates.isNotEmpty(worksTypeIndex) && worksTypeIndex.equals("BEST")) + { + selector.addMustIn("worksType", 1, 4); + } + + // 是否是找相似[根据industrySubName行业子名称进行模糊查询] + if (Boolean.parseBoolean(searchLike)) + { + // 重塑后再进行切割-避免首尾带半角逗号的情况 + keyword = DesignerPresenter.remodelKeyword(keyword); + // 找相似默认根据当前作品的第一个行业子名称查询 + if (keyword.contains(",")) + { + keyword = keyword.split(",")[0]; + } + selector.addMaybeLike("industrySubName", keyword); + } + else + { + // 关键词查询=输入全数字则查询worksId + Pattern pattern = Pattern.compile("^\\d+$"); + Matcher isNum = pattern.matcher(Strings.trim(keyword)); + if (isNum.matches()) + { + selector.addMust("worksId", Long.valueOf(Strings.trim(keyword))); + } + else + { + String[] word = keyword.split(" "); + for (int i = 0; i < word.length; i++) + { + if (Validates.isEmptyBlank(word[i])) + { + continue; + } + + selector.addMaybeLike("industrySubName", word[i]); + } + } + } + + MapSO attrMap = new HashMapSO(); + List worksFileList = ORM.get(ZTable.class).list(DesWorksFile.class, page, pageSize, selector); + List desWorksFileModels = makeupDesWorksFileModel(worksFileList); + // 数据总数 + int pageTotal = ORM.get(ZTable.class).count(DesWorksFile.class, selector); + + // 根据热度标签状态labelStatus进行二次筛选 + if (Validates.isNotEmptyBlank(labelStatus)) + { + desWorksFileModels = heatLabelFilter(desWorksFileModels, Integer.parseInt(labelStatus)); + } + attrMap.put("desWorksFileModels", desWorksFileModels); + attrMap.put("pageTotal", pageTotal); + attrMap.put("pageNo", page); + attrMap.put("keyword", keyword); + attrMap.put("industryId", industryId); + attrMap.put("worksTypeIndex", worksTypeIndex); + + HttpResponse response = httpRequest.getResponse(); + response.print(Jsons.toString(attrMap)); + } + + /** + * 用于组装返回DesWorksFileModel集合
            + * + * @param worksFileList + * @return java.util.List + * @author HuangZhiGao + * @date 2020/2/25 9:29 + */ + private static List makeupDesWorksFileModel(List worksFileList) throws Exception + { + List desWorksFileModels = new ArrayList<>(); + if (Validates.isNotEmpty(worksFileList) && worksFileList.size() > 0) + { + DesWorksFileModel worksFileModel; + for (DesWorksFile desWorksFile : worksFileList) + { + worksFileModel = new DesWorksFileModel(); + + worksFileModel.setWorksId(desWorksFile.getWorksId()); + worksFileModel.setIndustryId(desWorksFile.getIndustryId()); + worksFileModel.setPrdTypeId(desWorksFile.getPrdTypeId()); + + worksFileModel.setPrdPageId(desWorksFile.getPrdPageId()); + worksFileModel.setPrdSizeId(desWorksFile.getPrdSizeId()); + worksFileModel.setTemplateId(desWorksFile.getTemplateId()); + + worksFileModel.setIndustrySubIds(desWorksFile.getIndustrySubIds()); + worksFileModel.setKeywordId(desWorksFile.getKeywordId()); + worksFileModel.setAttributeIds(desWorksFile.getAttributeIds()); + + String indSubName = desWorksFile.getIndustrySubName(); + String attrName = desWorksFile.getAttributeName(); + String keywordName = desWorksFile.getKeywordName(); + if (Validates.isEmptyBlank(desWorksFile.getIndustrySubName())) + { + indSubName = ""; + } + if (Validates.isEmptyBlank(desWorksFile.getAttributeName())) + { + attrName = ""; + } + if (Validates.isEmptyBlank(desWorksFile.getKeywordName())) + { + keywordName = ""; + } + worksFileModel.setIndustrySubName(indSubName); + worksFileModel.setAttributeName(attrName); + worksFileModel.setKeywordName(keywordName); + + worksFileModel.setWorksName(desWorksFile.getWorksName()); + worksFileModel.setWorksType(desWorksFile.getWorksType()); + worksFileModel.setCdrFileName(desWorksFile.getCdrFileName()); + + worksFileModel.setPdfFileName(desWorksFile.getPdfFileName()); + worksFileModel.setCdrPath(desWorksFile.getCdrPath()); + worksFileModel.setPdfPath(desWorksFile.getPdfPath()); + + worksFileModel.setDesigner(desWorksFile.getDesigner()); + worksFileModel.setDesignGroupId(desWorksFile.getDesignGroupId()); + worksFileModel.setDeptId(desWorksFile.getDeptId()); + + worksFileModel.setThumbImagePath(desWorksFile.getThumbImagePath()); + worksFileModel.setThumbImageOssUrl(desWorksFile.getThumbImageOssUrl()); + worksFileModel.setThumbImagePhyPath(desWorksFile.getThumbImagePhyPath()); + + worksFileModel.setUploadType(desWorksFile.getUploadType()); + worksFileModel.setCreateTime(desWorksFile.getCreateTime()); + worksFileModel.setOssStatus(desWorksFile.getOssStatus()); + + worksFileModel.setFileType(desWorksFile.getFileType()); + + // 浏览数 + int browseNum = ORM.get(ZTable.class).count(DesWorksEvent.class, + new Selector().addMust("worksId", desWorksFile.getWorksId()).addMust("eventType", 1)); + // 作品热度标签(1无、2精品、3推荐、4热门) + // 根据作品类型判断精品,否则根据浏览次数判断:无(<20)、推荐(>=20 <50)和热门(>=50) + if (browseNum < 20) + { + worksFileModel.setWorksHeatLabel(1); + } + if (desWorksFile.getWorksType() == 1 || desWorksFile.getWorksType() == 2 || desWorksFile.getWorksType() == 3 + || desWorksFile.getWorksType() == 4) + { + worksFileModel.setWorksHeatLabel(2); + } + if (browseNum >= 20 && browseNum < 50) + { + if (desWorksFile.getWorksType() != 1 && desWorksFile.getWorksType() != 2 && desWorksFile.getWorksType() != 3 + && desWorksFile.getWorksType() != 4) + { + worksFileModel.setWorksHeatLabel(3); + } + } + if (browseNum > 50) + { + if (desWorksFile.getWorksType() != 1 && desWorksFile.getWorksType() != 2 && desWorksFile.getWorksType() != 3 + && desWorksFile.getWorksType() != 4) + { + worksFileModel.setWorksHeatLabel(4); + } + } + desWorksFileModels.add(worksFileModel); + } + } + + return desWorksFileModels; + } + + /** + * 根据热度标签状态labelStatus进行二次筛选
            + * + * @param desWorksFileModels + * @param labelStatus + * @return java.util.List + * @author HuangZhiGao + * @date 2020/2/25 16:43 + */ + private static List heatLabelFilter(List desWorksFileModels, int labelStatus) + { + List desWorksFileModelList = new ArrayList<>(); + for (DesWorksFileModel desWorksFileModel : desWorksFileModels) + { + if (desWorksFileModel.getWorksHeatLabel() == labelStatus) + { + desWorksFileModelList.add(desWorksFileModel); + } + } + return desWorksFileModelList; + } + + /** + * 用于移动端单个作品zml页面返回数量
            + * + * @param strs 带英文逗号分隔的字符串 + * @return int + * @author HuangZhiGao + * @date 2020/2/25 11:40 + */ + public static int getWorksDetailCount(String strs) + { + return Arrays.toStringArray(strs).length; + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/OperatorOrderPresenter.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/OperatorOrderPresenter.java new file mode 100644 index 0000000..87bcca7 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/OperatorOrderPresenter.java @@ -0,0 +1,319 @@ +/* + * 版权所有 (C) 2015 知启蒙(WWW.ZHIQIM.COM) 保留所有权利。 + * Download http://www.zhiqim.com/fadfox/ 欢迎加盟[凡狐]兴趣小组。 + * 本文采用《知启蒙许可证》,除非符合许可证,否则不可使该文件! + * 1、您可以免费使用、修改、合并、出版发行和分发,再授权软件、软件副本及衍生软件; + * 2、您用于商业用途时,必须在原作者指定的发行站点进行登记; + * 3、您在使用、修改、合并、出版发行和分发时,必须包含版权声明、许可声明,及保留原作者的著作权、商标等知识产权; + * 4、您在互联网等大众网络下发行和分发再授权软件、软件副本及衍生软件时,必须在原作者指定的发行站点进行发行和分发; + * 5、您可以在以下链接获取一个完整的许可证副本。 + * 许可证链接:http://www.zhiqim.com/licenses/LICENSE + * 发行站点:http://www.zhiqim.com + * 除非法律需要或书面同意,软件由原始码方式提供,无任何明示或暗示的保证和条件。详见完整许可证的权限和限制。 + */ +package com.zhiqim.yangcai.design.presenter; + +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.regex.Pattern; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.annotation.AnIntercept; +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.util.Amounts; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Randoms; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.manager.ZmrBootstrap; +import org.zhiqim.manager.ZmrConstants; +import org.zhiqim.manager.ZmrPassworder; +import org.zhiqim.manager.dao.ZmrOrgDao; +import org.zhiqim.manager.dbo.ZmrOperator; +import org.zhiqim.manager.presenter.WorkWechatPresenter; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ORMException; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.cache.DesignIndustryCache; +import com.zhiqim.yangcai.cache.DesignMerchantCache; +import com.zhiqim.yangcai.design.constants.DraftConstants; +import com.zhiqim.yangcai.design.constants.StatusConstants; +import com.zhiqim.yangcai.design.dbo.design.DesignIndustry; +import com.zhiqim.yangcai.design.dbo.design.DesignerGroupDispatch; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; +import com.zhiqim.yangcai.design.dbo.order.OrdProgressNote; +import com.zhiqim.yangcai.design.dbo.score.ScoreDesignerRecord; +import com.zhiqim.yangcai.util.ExportUtils; +import com.zhiqim.yangcai.util.Report; + +/** + * + * 操作员订单相关 + * + * @version v1.0.0 @author yixin 2020-10-16 新建与整理 + */ +@AnAlias("OperatorOrderPresenter") +@AnIntercept("chkZmrLogin") +public class OperatorOrderPresenter +{ + + /** 修改操作员 */ + public static void operatorUpdate(HttpRequest request) throws Exception + { + String dateTime = DateTimes.getDateTimeString(); + String operatorCode = request.getParameter("operatorCode"); + String operatorName = request.getParameter("operatorName"); + String operatorPass = request.getParameter("operatorPass"); + String operatorMobile = request.getParameter("operatorMobile"); + int operatorStatus = request.getParameterInt("operatorStatus"); + int operatorType = request.getParameterInt("operatorType"); + String operatorWangwang = request.getParameter("operatorWangwang"); + String operatorWxcode = request.getParameter("operatorWxcode"); + + Updater updater = new Updater(); + updater.addMaybe("operatorCode", operatorCode); + updater.addField("operatorName", operatorName); + if (Validates.isNotEmpty(operatorPass)) + { + if (!Validates.isUserPass(operatorPass)) + { + request.setResponseError("请输入6-16位操作员密码(大小写字母数字和特殊字符必须四选三)"); + return; + } + if (operatorPass.toLowerCase().contains("yangcai")) + { + request.setResponseError("密码中不允许包含yangcai"); + return; + } + + ZmrPassworder passworder = request.getContextAttribute(ZmrBootstrap.class).getPassworder(); + String operatorPassSalt = Randoms.lettersDigitsSecure(64); + + operatorPass = passworder.encode(operatorCode, operatorPass, operatorPassSalt); + updater.addField("operatorPass", operatorPass); + updater.addField("operatorPassSalt", operatorPassSalt); + } + + if (Validates.isNotEmpty(operatorMobile)) + { + boolean isMatch = Pattern.matches(ZmrConstants.ZMR_MOBILE, operatorMobile); + if (!isMatch) + { + request.setResponseError("请输入正确的手机号"); + return; + } + } + + if (Validates.isEmpty(operatorWxcode)) + { + request.setResponseError("请输入个人微信账号"); + return; + } + + /* 根据企业成员手机号获取企业微信账号 */ + String accessToken = WorkWechatPresenter.doGetWorkWechatAccessToken(); + String wkwechatAccount = WorkWechatPresenter.getUserIdByPhoneNumber(accessToken, operatorMobile); + + // 停用时添加判断 + if (operatorStatus == 1) + { + int orderCount = getErpOperatorOrderCount(operatorCode); + if (orderCount > 0) + { + request.setResponseError("请注意,该操作员账户存在" + orderCount + "条未处理订单,请处理后停用"); + return; + } + + // 去掉角色 + updater.addField("operatorRole", ""); + // 停用设计师接单规则 + Updater updater2 = new Updater(); + updater2.addMust("operatorCode", operatorCode); + updater2.addField("status", 0); + updater2.addField("modifyOperatorCode", request.getSessionName()); + updater2.addField("modifyTime", Sqls.nowTimestamp()); + ORM.get(ZTable.class).update(DesignerGroupDispatch.class, updater2); + + // 停用设计师积分状态 + Updater updater3 = new Updater(); + updater3.addMust("operatorCode", operatorCode); + updater3.addField("state", 0); + updater3.addField("lastModifyTime", Sqls.nowTimestamp()); + ORM.get(ZTable.class).update(ScoreDesignerRecord.class, updater3); + } + else + { + // 启用设计师接单规则 + Updater updater2 = new Updater(); + updater2.addMust("operatorCode", operatorCode); + updater2.addField("status", 1); + updater2.addField("modifyOperatorCode", request.getSessionName()); + updater2.addField("modifyTime", Sqls.nowTimestamp()); + ORM.get(ZTable.class).update(DesignerGroupDispatch.class, updater2); + + // 启用设计师积分状态 + Updater updater3 = new Updater(); + updater3.addMust("operatorCode", operatorCode); + updater3.addField("state", 1); + updater3.addField("lastModifyTime", Sqls.nowTimestamp()); + ORM.get(ZTable.class).update(ScoreDesignerRecord.class, updater3); + } + + updater.addField("operatorStatus", operatorStatus); + updater.addField("operatorMobile", operatorMobile); + updater.addField("operatorModified", dateTime); + updater.addField("operatorType", operatorType); + updater.addField("operatorWangwang", operatorWangwang); + updater.addField("wkwechatAccount", wkwechatAccount); + updater.addField("operatorWxcode", operatorWxcode); + + ZmrBootstrap.tableOpr(request).update(ZmrOperator.class, updater); + request.setResponseResult("修改成功"); + } + + /** + * 获取操作员未完成的订单数量 + * + * @param operatorCode + * @return + * @throws SQLException + * @throws ORMException + */ + private static int getErpOperatorOrderCount(String operatorCode) throws ORMException, SQLException + { + Selector sel = getDesignOrderSelector(operatorCode); + int count = ORM.get(ZTable.class).count(DesignOrder.class, sel); + return count; + } + + /** + * 下载操作员未完成的订单 + */ + public static void downloadDesignOperatorOrder(HttpRequest request) throws Exception + { + String operatorCode = request.getParameter("operatorCode"); + if (Validates.isEmpty(operatorCode)) + { + request.setResponseError("未查询到操作员信息"); + return; + } + List list = getDesignOperatorOrder(operatorCode, request); + ExportUtils.exportExcel(request, list, operatorCode + "未处理订单.xls"); + } + + /** + * 获取操作员未完成的订单 + * + * @param operatorCode + * @return + * @throws SQLException + * @throws ORMException + */ + private static List getDesignOperatorOrder(String operatorCode, HttpRequest request) throws Exception + { + List list = new ArrayList(); + // 订单列表数据 + Report report = getDesignOrderData(operatorCode, request); + if (report != null) + { + list.add(report); + } + return list; + } + + /** + * 获取操作员设计订单数据 + * + * @return + * @throws Exception + */ + private static Report getDesignOrderData(String operatorCode, HttpRequest request) throws Exception + { + Selector sel = getDesignOrderSelector(operatorCode); + List list = ORM.get(ZTable.class).list(DesignOrder.class, sel); + if (Validates.isNotEmpty(list)) + { + Report report = new Report(); + report.setTitle("订单列表"); + report.setHearder(new String[] + { + "订单号", "商户", "组织", "稿件类型", "旺旺号", "店铺", "状态", "产品", "进度备注", "印刷金额", "设计费份数", "录单时间", "领单时间", "完稿时间", "审稿时间", "审核人", "行业" + }); + report.setWidths(new int[] + { + 25, 25, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20 + }); + report.setFormats(new int[17]); + report.setHeight(700); + report.setExcelPageType(1); + report.setPageSize(1); + + List industryList = Global.get(DesignIndustryCache.class).getIndustryListAll(); + Map progressNoteMap = new HashMap(); + Map industryMap = new HashMap<>(); + for (DesignOrder order : list) + { + // 进度备注 + OrdProgressNote note = ORM.get(ZTable.class).item(OrdProgressNote.class, + new Selector("designId", order.getDesignId()).addOrderbyDesc("createTime")); + progressNoteMap.put(order.getDesignId(), note == null ? "" : note.getOrdProgressNote()); + } + for (DesignIndustry industry : industryList) + { + industryMap.put(industry.getIndustryId(), industry); + } + + for (int i = 0; i < list.size(); i++) + { + DesignOrder item = list.get(i); + String designId = String.valueOf(item.getDesignId()); + String merchantId = Global.get(DesignMerchantCache.class).getName(item.getMerchantId()); + String orgId = ZmrOrgDao.getOrgName(request, item.getOrgId()); + String draftType = DraftConstants.get(item.getDraftType()); + String buyerNick = item.getBuyerNick(); + String shopNick = item.getShopNick(); + String status = StatusConstants.getOrderStatusItem(item.getStatus()).desc(); + String orderText = item.getOrderText(); + String progressNote = progressNoteMap.get(item.getDesignId()); + String amount = Amounts.toYuanMustRadix(item.getAmount()); + String designCopies = String.valueOf(item.getDesignCopies()); + String createTime = Sqls.toDateTimeString(item.getCreateTime()); + String designReceiveTime = Sqls.toDateTimeString(item.getDesignReceiveTime()); + String designEndTime = Sqls.toDateTimeString(item.getDesignEndTime()); + String checkTime = Sqls.toDateTimeString(item.getCheckTime()); + String checker = item.getChecker(); + DesignIndustry industry = industryMap.get(item.getIndustryId()); + String industryName = industry == null ? "" : industry.getIndustryName(); + String[] drow = new String[] + { + designId, merchantId, orgId, draftType, buyerNick, shopNick, status, orderText, progressNote, amount, designCopies, createTime, + designReceiveTime, designEndTime, checkTime, checker, industryName + }; + + report.addData(drow); + } + return report; + } + return null; + } + + /** + * + * @param operatorCode + */ + private static Selector getDesignOrderSelector(String operatorCode) + { + Selector sel = new Selector(); + sel.addMustIn("status", StatusConstants.ORDER_30.value(), StatusConstants.ORDER_36.value(), StatusConstants.ORDER_50.value()); + sel.addMust("designer", operatorCode); + return sel; + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/OrderCheckPresenter.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/OrderCheckPresenter.java new file mode 100644 index 0000000..dc222c7 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/OrderCheckPresenter.java @@ -0,0 +1,179 @@ +/** + * 扬彩印刷设计 + * 文件名 :OrderCheckPresenter.java + * 创建人 :gjx + * 创建时间:2019-9-16 + */ + +package com.zhiqim.yangcai.design.presenter; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.annotation.AnIntercept; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.aliyun.oss.common.utils.StringUtils; +import com.zhiqim.media.dbo.MediaCanvas; +import com.zhiqim.yangcai.design.constant.VirtualAccountConstants; +import com.zhiqim.yangcai.design.constants.DraftConstants; +import com.zhiqim.yangcai.design.constants.EventConstants; +import com.zhiqim.yangcai.design.constants.FileTypeConstants; +import com.zhiqim.yangcai.design.constants.StatusConstants; +import com.zhiqim.yangcai.design.dao.OrderCheckDao; +import com.zhiqim.yangcai.design.dao.OrderLogDao; +import com.zhiqim.yangcai.design.dao.VirtualAccountDao; +import com.zhiqim.yangcai.design.dbo.order.DesignAtta; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; +import com.zhiqim.yangcai.design.dbo.order.DesignSelfView; +import com.zhiqim.yangcai.design.dbo.order.SelfOrder; +import com.zhiqim.yangcai.design.dbo.template.MediaTemplate; +import com.zhiqim.yangcai.util.ErpClassService; +import com.zhiqim.yangcai.util.ErpClassService.statusEnum; + +/** + * 订单审核相关 + * + * @version 1.0 @author gjx 2019-9-16 新建与整理 + */ +@AnAlias("OrderCheckPresenter") +@AnIntercept("chkZmrLogin") +public class OrderCheckPresenter +{ + private static final Log log = LogFactory.getLog(OrderCheckPresenter.class); + + /** + * + * [简要描述]: 设计师定稿后主动退回订单
            + * [详细描述]:
            + * + * @author gjx + * @param request + * @throws Exception + */ + public static void doDesignerOrderReturn(HttpRequest request) throws Exception + { + String sessionName = request.getSessionName(); + + long designId = request.getParameterLong("designId"); + DesignSelfView order = ORM.get(ZView.class).item(DesignSelfView.class, new Selector().addMust("designId", designId)); + if (order == null) + { + request.setResponseError("订单【" + designId + "】不存在"); + return; + } + + if (!sessionName.equals(order.getDesigner())) + { + request.setResponseError("只能退回本人的订单"); + return; + } + + // 印刷订单审核之后就不能主动退回了 + if (!order.isOnlyDesign()) + { + if (order.getStatus() > StatusConstants.ORDER_55.value()) + { + request.setResponseError("印刷订单已审核无法退回"); + return; + } + } + else + { + // 设计类订单12小时之类可以主动退回 + String endTime = Sqls.toDateTimeString(order.getDesignEndTime()); + int hours = DateTimes.compareHour(DateTimes.getDateTimeString(), endTime); + if (hours > 12) + { + request.setResponseError("设计订单定稿超过12小时无法退回"); + return; + } + } + + // 修改订单信息 + Updater updater = new Updater(); + updater.addMust("designId", designId); + updater.addField("status", StatusConstants.ORDER_30.value()); + updater.addField("designDraftTime", null); + updater.addField("designEndTime", null); + + ORM.get(ZTable.class).update(DesignOrder.class, updater); + + if (order != null && !StringUtils.isNullOrEmpty(order.getTids())) + { + new ErpClassService(order.getTids(), order.getDesigner(), statusEnum.TO_BE_DESIGNEDING.getCode()); + } + + // 删除成品文件 + Selector attaSel = new Selector(); + attaSel.addMust("designId", designId); + attaSel.addMust("attaModul", FileTypeConstants.FILE_END.value()); + DesignAtta designAtta = ORM.get(ZTable.class).item(DesignAtta.class, attaSel); + if (designAtta != null) + { + OrderCheckDao.doDeleteEndFile(designAtta); + } + + Selector sel = new Selector(); + sel.addMust("designId", designId); + sel.addMust("templateType", 80); + MediaTemplate template = ORM.get(ZTable.class).item(MediaTemplate.class, sel); + if (template != null) + { + long mediaId = template.getMediaId(); + + // 修改定稿模板为临时模板 + Updater mUpdater = new Updater(); + mUpdater.addMust("mediaId", mediaId); + mUpdater.addField("templateType", 0); + ORM.get(ZTable.class).update(MediaTemplate.class, mUpdater); + + // 更新模板为可编辑状态 + Updater cUpdater = new Updater(); + cUpdater.addMust("mediaId", mediaId); + cUpdater.addField("isEdit", 0); // 可编辑 + cUpdater.addField("updateTime", DateTimes.getDateTimeString()); + ORM.get(ZTable.class).update(MediaCanvas.class, cUpdater); + } + OrderLogDao.saveOrderOperateLog(designId, sessionName, sessionName + "主动退回订单", EventConstants.ORDER_10.value()); + + // 订单退回自动取消加急 + if (order.isUrgent()) + { + ORM.get(ZTable.class).update(DesignOrder.class, new Updater().addMust("designId", order.getDesignId()).addField("isUrgent", false)); + ORM.get(ZTable.class).update(SelfOrder.class, new Updater().addMust("designId", order.getDesignId()).addField("urgentPrice", 0)); + + // 记录日志 + OrderLogDao.saveOrderOperateLog(designId, sessionName, "设计师主动退回订单自动取消加急", EventConstants.ORDER_43.value()); + } + + // 退回触发设计师虚拟账户资金计算 + if (order.getDraftType() < DraftConstants.DRAFT_TEMPLATE.value() || order.getDraftType() > DraftConstants.DRAFT_PAGE_DESIGN.value()) + {// 排除标准自来稿 + return; + } + + boolean finishDesign = true; + // 本月完成的订单退回 直接走退回 + if (order.getDesignEndTime().getTime() >= DateTimes.toCalendar(DateTimes.getFirstMonthDay() + " 00:00:00").getTime().getTime()) + { + finishDesign = VirtualAccountDao.finishDesign(order, order.getDesigner(), Integer.parseInt(VirtualAccountConstants.TRANSACTION_STATUS_6.value())); + } // 订单非本月完成,需扣除完成该单的用户的可用金额并删除历史绩效统计表 + else if (order.getDesignEndTime().getTime() <= DateTimes.toCalendar(DateTimes.getFirstMonthDay() + " 00:00:00").getTime().getTime()) + { + finishDesign = VirtualAccountDao.finishDesign(order, order.getDesigner(), Integer.parseInt(VirtualAccountConstants.TRANSACTION_STATUS_7.value())); + } + if (!finishDesign) + { + request.setResponseError(order.getDesigner() + ":【" + designId + "】订单退回减少账户收入失败"); + log.error(order.getDesigner() + ":【" + designId + "】同步资金账户信息失败" + "【审核退回】"); + } + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/OrderPresenter.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/OrderPresenter.java new file mode 100644 index 0000000..0242e63 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/OrderPresenter.java @@ -0,0 +1,570 @@ +package com.zhiqim.yangcai.design.presenter; + +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.ZmlContexts; +import org.zhiqim.httpd.context.annotation.AnIntercept; +import org.zhiqim.httpd.validate.ones.IsNotEmpty; +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnTransaction; +import org.zhiqim.kernel.extend.HashMapSO; +import org.zhiqim.kernel.extend.MapSO; +import org.zhiqim.kernel.httpclient.HttpGet; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.kernel.util.Arrays; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Strings; +import org.zhiqim.kernel.util.Urls; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.manager.dao.ZmrOperatorDao; +import org.zhiqim.manager.dao.ZmrParamDao; +import org.zhiqim.manager.dbo.ZmrOperator; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.aliyun.oss.common.utils.StringUtils; +import com.zhiqim.yangcai.cache.DesignIndustryCache; +import com.zhiqim.yangcai.design.constants.EventConstants; +import com.zhiqim.yangcai.design.constants.FileTypeConstants; +import com.zhiqim.yangcai.design.constants.StatusConstants; +import com.zhiqim.yangcai.design.dao.OrderLogDao; +import com.zhiqim.yangcai.design.dbo.design.DesignIndustry; +import com.zhiqim.yangcai.design.dbo.order.DesignAtta; +import com.zhiqim.yangcai.design.dbo.order.DesignOrdRetentView; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; +import com.zhiqim.yangcai.design.dbo.order.DesignSelfView; +import com.zhiqim.yangcai.design.dbo.order.OrdProgressNote; +import com.zhiqim.yangcai.design.dbo.retention.RetentionDetails; +import com.zhiqim.yangcai.design.dbo.utils.CalculationUtil; +import com.zhiqim.yangcai.design.rmi.erp.ErpRmiService; +import com.zhiqim.yangcai.util.DesignUtil; +import com.zhiqim.yangcai.util.ErpClassService; +import com.zhiqim.yangcai.util.ErpClassService.statusEnum; + +/** + * 订单 相关 + * + * @version v1.0.0 @author zhouwenbin 2017-8-15 新建与整理 + */ +@AnAlias("OrderPresenter") +@AnIntercept("chkZmrLogin") +public class OrderPresenter +{ + + /** + * 拒绝退款 + * + * @param request + * @throws Exception + */ + @AnTransaction + public static void doRejectRefundOrder(HttpRequest request) throws Exception + { + request.addValidate(new IsNotEmpty("designId", "请选择订单")); + if (!request.chkValidate()) + { + request.setResponseError(request.getAlertMsg()); + return; + } + + long designId = request.getParameterLong("designId"); + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, new Selector("designId", designId)); + if (order == null) + { + request.setResponseError("订单【" + designId + "】不存在!"); + return; + } + + if (StatusConstants.ORDER_34.value() != order.getStatus()) + { + request.setResponseError("该订单不是申请退款状态"); + return; + } + + Updater updater = new Updater(); + updater.addMust("designId", designId); + if (Validates.isEmpty(order.getDesignDraftTime())) + {// 没有初稿 + updater.addField("status", StatusConstants.ORDER_30.value()); + updater.addField("designBeginTime", Sqls.nowTimestamp()); + + if (order != null && !StringUtils.isNullOrEmpty(order.getTids())) + { + new ErpClassService(order.getTids(), order.getDesigner(), statusEnum.TO_BE_DESIGNEDING.getCode()); + } + } + else + { + updater.addField("status", StatusConstants.ORDER_50.value()); + updater.addField("designBeginTime", order.getDesignBeginTime()); + } + + ORM.get(ZTable.class).update(DesignOrder.class, updater); + OrderLogDao.saveOrderOperateLog(designId, request.getSessionName(), "拒绝退款请求", EventConstants.ORDER_5.value()); + } + + /** + * 进度备注 + * + * @param request + * @throws Exception + */ + @AnTransaction + public static void addProgressNote(HttpRequest request) throws Exception + { + long designId = request.getParameterLong("designId"); + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, new Selector("designId", designId)); + if (null == order) + { + request.setResponseError("订单不存在"); + return; + } + String ordProgressNote = request.getParameter("ordProgressNote"); + if (Validates.isEmpty(ordProgressNote)) + { + request.returnHistory("进度备注不能为空"); + return; + } + + OrdProgressNote progressNote = new OrdProgressNote(); + progressNote.setDesignId(designId); + progressNote.setOrdProgressNote(ordProgressNote); + progressNote.setOperateCode(request.getSessionName()); + progressNote.setCreateTime(Sqls.nowTimestamp()); + ORM.get(ZTable.class).insert(progressNote); + + Updater updater = new Updater(); + updater.addMust("designId", designId); + updater.addField("modifyTime", Sqls.nowTimestamp()); + ORM.get(ZTable.class).update(DesignOrder.class, updater); + + OrderLogDao.saveOrderOperateLog(designId, request.getSessionName(), request.getSessionName() + "更新进度备注:" + ordProgressNote, + EventConstants.ORDER_20.value()); + // ERP、设计平台同步更新订单进度备注 + /* + * if (order.getMerchantId() == 1823193185001L) + * { + * ErpRmiService.doOrdProgressNote(designId, Jsons.toString(progressNote)); + * } + * else + * {// 运营平台同步 + * BusinessPlatformClientUtil.doOrdProgressNote(designId, + * progressNote.getOrdProgressNote()); + * } + */ + } + + /** + * 设计份数修改 + * [简要描述]:
            + * [详细描述]:
            + * + * @author Administrator + * @param request + * @throws Exception + */ + public static void upDesignCopiesr(HttpRequest request) throws Exception + { + long designId = request.getParameterLong("designId"); + int copies = request.getParameterInt("copies"); + + if (copies < 0 || copies % 1 != 0) + { + request.setResponseError("输入份数需大于0"); + return; + } + Updater updater = new Updater().addField("designCopies", copies).addMust("designId", designId); + + ORM.get(ZTable.class).update(DesignOrder.class, updater); + OrderLogDao.saveOrderOperateLog(designId, request.getSessionName(), "设计份数修改", EventConstants.ORDER_20.value()); + } + + /** 行业查询 */ + public static void doSearchIndustry(HttpRequest request) throws Exception + { + String industryKeywords = request.getParameter("industryKeywords"); + Selector selector = new Selector(); + + if (Validates.isNotEmpty(industryKeywords)) + { + + Selector or = new Selector(); + or.addMaybeLike("industryName", industryKeywords); + or.addMaybeLike("industryKeywords", industryKeywords); + + for (String string : Arrays.toStringArray(industryKeywords.replace(" ", ","))) + { + if (Validates.isEmptyBlank(string)) + { + continue; + } + + or.addMaybeLike("industryKeywords", Strings.trim(string)); + } + + selector.addOr(or); + } + + List searchIndustryList = Global.get(DesignIndustryCache.class).getIndustryList(); + request.setAttribute("oidIndustryId", request.getParameterLong("oidIndustryId")); + + MapSO jsonMap = new HashMapSO(); + jsonMap.put("searchIndustryList", searchIndustryList); + jsonMap.put("oidIndustryId", request.getParameterLong("oidIndustryId")); + + String ret = ZmlContexts.parseZmlPath(request, "/zview/order/presenter/industryList.zml", jsonMap); + request.setResponseResult(ret); + } + + /** + * [简要描述]:快捷联系人接口 + * + * @param request + * @throws Exception + */ + public static void quickContact(HttpRequest request) throws Exception + { + request.addValidate(new IsNotEmpty("designId", "请选择订单")); + if (!request.chkValidate()) + { + request.setResponseError(request.getAlertMsg()); + return; + } + + long designId = request.getParameterLong("designId"); + DesignSelfView order = ORM.get(ZView.class).item(DesignSelfView.class, new Selector("designId", designId)); + if (order == null) + { + request.setResponseError("订单【" + designId + "】不存在"); + return; + } + + HashMapSO attrMap = new HashMapSO(); + attrMap.put("order", order); + + // 获取客服信息 + ZmrOperator createrDesigner = null; + if (1823193185001L == order.getMerchantId()) + { + // erp渠道 + String paramGroup = "yangcai.erp"; + String paramKey = "quickContact"; + String url = ZmrParamDao.getString(request.getContext(), paramGroup, paramKey); + HttpGet get = new HttpGet(Urls.add(url, "orderId", Strings.toString(designId))); + get.setConnectTimeout(10);// 10秒 连接 + get.setReadTimeout(30);// 30秒读取 + get.execute(); + String response = get.getResponseText(); + if (get.isResponseSuccess() && Validates.isNotEmptyBlank(response)) + { + String tempOperator = Jsons.getString(response, "operator"); + createrDesigner = Jsons.toObject(tempOperator, ZmrOperator.class); + } + } + + attrMap.put("createrDesigner", createrDesigner); + + // 设计师信息 + ZmrOperator designOperator = null; + if (Validates.isNotEmpty(order.getDesigner())) + { + designOperator = ZmrOperatorDao.getOperator(request, order.getDesigner()); + attrMap.put("designOperator", designOperator); + } + + String resultHtml = ZmlContexts.parseZmlPath(request, "/zview/order/presenter/quickContact.zml", attrMap); + + Map jsonMap = new HashMap(); + jsonMap.putAll(attrMap.instance()); + jsonMap.put("resultHtml", resultHtml); + + request.setResponseResult(DesignUtil.removeBlank(Jsons.toString(jsonMap))); + } + + /** + * + * 滞留单自行处理 + * + * @author gjx + * @param request + */ + public static void doSelfRetentDeal(HttpRequest request) throws Exception + { + long designId = request.getParameterLong("designId", -1); + if (designId == -1) + { + request.setResponseError("订单不存在"); + return; + } + RetentionDetails retent = new RetentionDetails(); + retent.setDesignId(designId); + retent.setIsRetentDeal(1); + retent.setRetentDealTime(Sqls.nowTimestamp()); + + ORM.get(ZTable.class).insert(retent); + } + + /** + * + * 是否自行处理过判断 + * + * @author gjx + * @param request + * @throws Exception + */ + public static void doSelfRetentDealBefore(HttpRequest request) throws Exception + { + long designId = request.getParameterLong("designId"); + RetentionDetails retentionDetails = ORM.get(ZTable.class).item(RetentionDetails.class, new Selector().addMust("designId", designId)); + if (retentionDetails != null) + { + if (retentionDetails.getIsRetentDeal() == 1) + { + request.setResponseError("不可二次申请处理"); + return; + } + } + } + + /** + * + * 滞留单处理弹框查询 + * + * @author gjx + * @param request + * @throws Exception + */ + public static void doRetentDealDialog(HttpRequest request) throws Exception + { + long designId = request.getParameterLong("designId"); + DesignOrder designOrder = ORM.get(ZTable.class).item(DesignOrder.class, new Selector().addMust("designId", designId)); + if (designOrder == null) + { + request.setResponseError("订单不存在"); + return; + } + SimpleDateFormat simple = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + int retentDealMinute = DateTimes.compareMinute(simple.format(new Date()), simple.format(designOrder.getCreateTime())); + HashMapSO hashMapSO = new HashMapSO(); + hashMapSO.put("order", designOrder); + hashMapSO.put("retentDealTime", CalculationUtil.dateTimeTran(retentDealMinute)); + String resultHtml = ZmlContexts.parseZmlPath(request, "/zview/order/retentionDealOrderDetails.zml", hashMapSO); + + Map jsonMap = new HashMap(); + jsonMap.putAll(hashMapSO.instance()); + jsonMap.put("resultHtml", resultHtml); + + request.setResponseResult(DesignUtil.removeBlank(Jsons.toString(jsonMap))); + } + + /** + * + * 滞留单处理 + * + * @author gjx + * @throws Exception + */ + @AnTransaction + public static void doRetentionDealTrigger(HttpRequest request) throws Exception + { + long designId = request.getParameterLong("designId"); + int retentDealWay = request.getParameterInt("retentDealWay", -1); + int retentFollowFlag = request.getParameterInt("retentFollowFlag", -1); + String retentRemark = request.getParameter("retentRemark"); + if (retentDealWay == -1) + { + request.setResponseError("请选择滞留单处理方式"); + return; + } + if (retentFollowFlag == -1) + { + request.setResponseError("请选择设计师跟进情况"); + return; + } + if (retentRemark == null || "".equals(retentRemark)) + { + request.setResponseError("滞留单处理备注不能为空"); + return; + } + DesignOrder designOrder = ORM.get(ZTable.class).item(DesignOrder.class, new Selector().addMust("designId", designId)); + if (designOrder == null) + { + request.setResponseError("订单号不存在"); + return; + } + RetentionDetails reDetails = ORM.get(ZTable.class).item(RetentionDetails.class, new Selector().addMust("designId", designId)); + if (reDetails == null) + { + RetentionDetails retention = new RetentionDetails(); + retention.setDesignId(designId); + retention.setRetentDealName(request.getSessionName()); + retention.setRetentDealWay(retentDealWay); + retention.setRetentFollowFlag(retentFollowFlag); + retention.setRetentRemark(retentRemark); + retention.setRetentionEndTime(Sqls.nowTimestamp()); + + ORM.get(ZTable.class).insert(retention); + } + else + { + Updater updater = new Updater(); + updater.addMust("designId", designId); + updater.addField("retentDealName", request.getSessionName()); + updater.addField("retentDealWay", retentDealWay); + updater.addField("retentFollowFlag", retentFollowFlag); + updater.addField("retentRemark", retentRemark); + updater.addField("retentionEndTime", Sqls.nowTimestamp()); + + ORM.get(ZTable.class).update(RetentionDetails.class, updater); + } + Updater up = new Updater(); + up.addMust("designId", designId); + up.addField("status", StatusConstants.ORDER_F130.value()); + + ORM.get(ZTable.class).update(DesignOrder.class, up); + } + + /** + * + * 查看滞留单处理结果 + * + * @author gjx + */ + public static void doSelectRetentDeal(HttpRequest request) throws Exception + { + long designId = request.getParameterLong("designId"); + DesignOrdRetentView designOrder = ORM.get(ZView.class).item(DesignOrdRetentView.class, new Selector().addMust("designId", designId)); + if (designOrder == null) + { + request.setResponseError("订单不存在"); + return; + } + SimpleDateFormat simple = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + int retentDealMinute = DateTimes.compareMinute(simple.format(designOrder.getRetentionEndTime()), simple.format(designOrder.getCreateTime())); + HashMapSO hashMapSO = new HashMapSO(); + hashMapSO.put("order", designOrder); + hashMapSO.put("retentDealTime", CalculationUtil.dateTimeTran(retentDealMinute)); + String resultHtml = ZmlContexts.parseZmlPath(request, "/zview/order/retentionFinishOrderDetails.zml", hashMapSO); + + Map jsonMap = new HashMap(); + jsonMap.putAll(hashMapSO.instance()); + jsonMap.put("resultHtml", resultHtml); + + request.setResponseResult(DesignUtil.removeBlank(Jsons.toString(jsonMap))); + } + + /** + * + * 检测订单是否存在 + * + * @author jiangbin + * @param request + * @throws Exception + */ + public static void checkOrderExist(HttpRequest request) throws Exception + { + long designId = request.getParameterLong("designId"); + if (designId <= 0) + { + request.setResponseError("订单号不正确!请确认信息"); + return; + } + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, new Selector().addMust("designId", designId)); + if (Validates.isEmpty(order)) + { + request.setResponseError("订单不存在"); + return; + } + } + + /** + * + * 添加售后留言单(ERP) + * + * @author jiangbin + * @param request + * @throws Exception + */ + public static void addAfterMessage(HttpRequest request) throws Exception + { + long designId = request.getParameterLong("designId"); + String creater = request.getParameter("creater"); + String createTime = request.getParameter("createTime"); + String complainFlag = request.getParameter("complainFlag"); + String note = request.getParameter("note"); + if (designId <= 0) + { + request.setResponseError("订单号不正确!请确认信息"); + return; + } + ErpRmiService.doAddAfterMessage(designId, creater, createTime, complainFlag, note); + request.setResponseResult(Jsons.toString("添加成功!")); + } + + /** + * 订单列表获取电子名片二维码[仅用于秒绘智能名片]
            + * + * @param request + * @throws Exception + * @return void + * @author HuangZhiGao + * @date 2020年9月29日 + */ + public static void getDzmpQrcode(HttpRequest request) throws Exception + { + // 判断订单是否存在 + long designId = request.getParameterLong("designId"); + if (designId <= 0) + { + request.setResponseError("订单号不正确!请确认信息"); + return; + } + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, new Selector().addMust("designId", designId)); + if (Validates.isEmpty(order)) + { + request.setResponseError("订单不存在"); + return; + } + + // 判断订单状态是否为[设计完成] + if (order.getStatus() != StatusConstants.ORDER_70.value()) + { + request.setResponseError("请选择设计完成的订单"); + return; + } + + // 判断订单设计类型是否为[秒绘智能名片] + if (order.getTypeId() != 2023207561256L) + { + request.setResponseError("请选择设计类型为[秒绘智能名片]的订单"); + return; + } + + String fileUrl = ""; + Selector selector = new Selector(); + selector.addMust("designId", designId); + selector.addMust("attaModul", FileTypeConstants.FILE_END.value()); + DesignAtta atta = ORM.get(ZTable.class).item(DesignAtta.class, selector); + if (atta != null && "png".equals(atta.getFileType())) + { + fileUrl = atta.getOssUrl(); + } + else + { + fileUrl = "pdf"; + } + + request.setResponseResult(fileUrl); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/QcOrderPresenter.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/QcOrderPresenter.java new file mode 100644 index 0000000..a6fc69b --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/QcOrderPresenter.java @@ -0,0 +1,266 @@ +package com.zhiqim.yangcai.design.presenter; + +import java.io.File; +import java.sql.SQLException; + +import javax.imageio.stream.FileImageOutputStream; +import javax.imageio.stream.ImageOutputStream; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.annotation.AnIntercept; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Files; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Strings; +import org.zhiqim.kernel.util.codes.Base64Decoder; +import org.zhiqim.manager.dbo.ZmrOperator; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ORMException; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.design.constants.FileTypeConstants; +import com.zhiqim.yangcai.design.dbo.order.DesignAtta; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; +import com.zhiqim.yangcai.design.dbo.qc.QcApplyScore; +import com.zhiqim.yangcai.design.dbo.qc.QcAwardedType; +import com.zhiqim.yangcai.design.dbo.qc.QcParameter; +import com.zhiqim.yangcai.design.dbo.qc.QcRecord; + +/** + * 订单质检相关 + * + * @version v1.0.0 @author liuhu 2019-1-25 新建与整理 + */ +@AnAlias("QcOrderPresenter") +@AnIntercept("chkZmrLogin") +public class QcOrderPresenter +{ + /** + * 质检违规判定 + * + * @param request + * @throws Exception + */ + public static void saveQcJudge(HttpRequest request) throws Exception + { + long designId = request.getParameterLong("designId"); + long orgId = request.getParameterLong("orgId"); + String designer = request.getParameter("designer"); + String content = request.getParameter("content"); + String description = request.getParameter("description"); + QcParameter parameter = ORM.get(ZTable.class).item(QcParameter.class, new Selector("content", content)); + if (parameter == null) + { + request.setResponseError("请先设置质检参数"); + return; + } + + String rootDir = Strings.trimRight(request.getContext().getAttributeString("upload.rootDir"), "/"); + + String fileName = designId + "-" + "qcJudgeFile" + ".png"; + String checkPath = rootDir + "/" + DateTimes.getDateTime8String() + "/" + "质检违规凭证"; + String path = checkPath + "/" + fileName; + Files.mkDirectory(checkPath); + + // 对传过来的图片解码并且写入文件 + String imgBase64Str = request.getParameter("data"); + imgBase64Str = imgBase64Str.replace("data:image/pngbase64,", ""); + byte[] imageBytes = Base64Decoder.decode(imgBase64Str.getBytes("utf-8")); + File file = new File(path); + ImageOutputStream out = new FileImageOutputStream(file); + out.write(imageBytes); + out.flush(); + out.close(); + + // 插入订单附属表 + DesignAtta atta = new DesignAtta(); + atta.setAttaId(Ids.longId13()); + atta.setAttaModul(FileTypeConstants.FILE_QC_JUDGE.value()); + atta.setDesignId(designId); + atta.setFileName(fileName); + atta.setFileType("png"); + atta.setSavePath(path); + atta.setUploadTime(Sqls.nowTimestamp()); + atta.setOperatorCode(request.getSessionName()); + ORM.get(ZTable.class).insert(atta); + + QcRecord record = new QcRecord(); + record.setDesignId(designId); + record.setDesigner(designer); + record.setOrgId(orgId); + record.setReason(content); + record.setDescription(description); + record.setScore(parameter.getScore()); + record.setImgPath(path); + record.setOperatorCode(request.getSessionName()); + record.setQcTime(Sqls.nowTimestamp()); + record.setQcFlag(2); + ORM.get(ZTable.class).insert(record); + + // 将订单标记为质检违规 + Updater updater = new Updater(); + updater.addMust("designId", designId); + updater.addField("qcFlag", 2); + updater.addField("qcTime", Sqls.nowTimestamp()); + ORM.get(ZTable.class).update(DesignOrder.class, updater); + } + + /** + * 标识订单为质检正常 + * + * @param request + * @throws ORMException + * @throws SQLException + */ + public static void updateQcFlag(HttpRequest request) throws ORMException, SQLException + { + long orgId = request.getParameterLong("orgId"); + long designId = request.getParameterLong("designId"); + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, designId); + if (order == null) + { + request.setResponseError("订单不存在"); + return; + } + + QcRecord record = new QcRecord(); + record.setDesignId(designId); + record.setDesigner(order.getDesigner()); + record.setOrgId(orgId); + record.setOperatorCode(request.getSessionName()); + record.setQcTime(Sqls.nowTimestamp()); + record.setQcFlag(1); + ORM.get(ZTable.class).insert(record); + + Updater updater = new Updater(); + updater.addMust("designId", designId); + updater.addField("qcFlag", 1); + updater.addField("qcTime", Sqls.nowTimestamp()); + ORM.get(ZTable.class).update(DesignOrder.class, updater); + } + + /** + * 质检加分申请 + * + * @param request + * @throws Exception + */ + public static void doApplyScore(HttpRequest request) throws Exception + { + String designer = request.getParameter("designer"); + + ZmrOperator operator = ORM.get(ZTable.class).item(ZmrOperator.class, designer); + if (operator == null) + { + request.returnCloseWindow("操作员不存在"); + return; + } + + String content = request.getParameter("content"); + + Long qcTypeId = request.getParameterLong("qcTypeId"); + + String rootDir = Strings.trimRight(request.getContext().getAttributeString("upload.rootDir"), "/"); + + String fileName = designer + "-" + DateTimes.getDateTime14String() + ".png"; + String checkPath = rootDir + "/" + DateTimes.getDateTime8String() + "/" + "质检加分凭证"; + String path = checkPath + "/" + fileName; + Files.mkDirectory(checkPath); + + // 对传过来的图片解码并且写入文件 + String imgBase64Str = request.getParameter("data"); + imgBase64Str = imgBase64Str.replace("data:image/pngbase64,", ""); + byte[] imageBytes = Base64Decoder.decode(imgBase64Str.getBytes("utf-8")); + File file = new File(path); + ImageOutputStream out = new FileImageOutputStream(file); + out.write(imageBytes); + out.flush(); + out.close(); + + // 插入订单附属表 + DesignAtta atta = new DesignAtta(); + atta.setAttaId(Ids.longId13()); + atta.setAttaModul(FileTypeConstants.FILE_QC_APPLY.value()); + atta.setDesignId(0); + atta.setFileName(fileName); + atta.setFileType("png"); + atta.setSavePath(path); + atta.setUploadTime(Sqls.nowTimestamp()); + atta.setOperatorCode(request.getSessionName()); + ORM.get(ZTable.class).insert(atta); + + QcApplyScore apply = new QcApplyScore(); + + // 图片显示时可以直接拿applyId去查订单附属表 + apply.setApplyId(atta.getAttaId()); + apply.setDesigner(designer); + apply.setOrgId(operator.getOrgId()); + apply.setApplyReason(content); + apply.setDesigner(designer); + apply.setApplyImgPath(path); + apply.setApplyFlag(0); + apply.setApplyTime(Sqls.nowTimestamp()); + apply.setQcTypeId(qcTypeId); + ORM.get(ZTable.class).insert(apply); + } + + /** + * 申请加分通过 + * + * @param request + * @throws ORMException + * @throws SQLException + */ + public static void doApplyPass(HttpRequest request) throws ORMException, SQLException + { + long applyId = request.getParameterLong("applyId"); + long qcTypeId = request.getParameterLong("qcTypeId"); + QcApplyScore qcApplyScore = ORM.get(ZTable.class).item(QcApplyScore.class, new Selector().addMust("applyId", applyId)); + Updater updater = new Updater(); + if (qcApplyScore.getQcTypeId() != 0L) + { + QcAwardedType qcAwardedType = ORM.get(ZTable.class).item(QcAwardedType.class, new Selector().addMust("qcTypeId", qcTypeId)); + updater.addMust("applyId", applyId); + updater.addField("applyFlag", 1); + updater.addField("score", qcAwardedType.getQcScore()); + updater.addField("qcAwardedAuditor", request.getSessionName()); + updater.addField("qcAwardedAuditorTime", Sqls.nowTimestamp()); + } + else + { + updater.addMust("applyId", applyId); + updater.addField("applyFlag", 1); + updater.addField("score", 0.5); + } + ORM.get(ZTable.class).update(QcApplyScore.class, updater); + } + + public static void docancelAwarded(HttpRequest request) throws Exception + { + long applyId = request.getParameterLong("applyId"); + ORM.get(ZTable.class).delete(QcApplyScore.class, applyId); + } + + /** + * 申请加分打回 + * + * @param request + * @throws ORMException + * @throws SQLException + */ + public static void doApplyBack(HttpRequest request) throws ORMException, SQLException + { + long applyId = request.getParameterLong("applyId"); + String desc = request.getParameter("desc"); + + Updater updater = new Updater(); + updater.addMust("applyId", applyId); + updater.addField("applyFlag", 2); + updater.addField("applyBackReason", desc); + ORM.get(ZTable.class).update(QcApplyScore.class, updater); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/QuestionsFilePresenter.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/QuestionsFilePresenter.java new file mode 100644 index 0000000..7d42397 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/QuestionsFilePresenter.java @@ -0,0 +1,195 @@ +package com.zhiqim.yangcai.design.presenter; + +import java.io.File; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.annotation.AnIntercept; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.kernel.util.Arrays; +import org.zhiqim.kernel.util.Files; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.uploadlarge.dbo.UpllFile; + +import com.zhiqim.yangcai.design.dbo.order.ConfigQuestions; +import com.zhiqim.yangcai.design.dbo.order.QuestionsAtta; + +/** + * + * [简要描述]:考试题文件处理
            + * + * @version 1.0 @author hc 2021年5月25日 新建与整理 + */ +@AnAlias("QuestionsFilePresenter") +@AnIntercept("chkZmrLogin") +public class QuestionsFilePresenter +{ + + /** + * + * [简要描述]:订单素材展示
            + * [详细描述]:
            + * + * @author hc + * @param request + * @throws Exception + */ + public static void showMaterialFileList(HttpRequest request) throws Exception + { + long questionsId = request.getParameterLong("questionsId"); + if (questionsId == -1) + { + request.setResponseError("订单【" + questionsId + "】不存在"); + return; + } + + ConfigQuestions order = ORM.get(ZTable.class).item(ConfigQuestions.class, new Selector("questionsId", questionsId)); + if (order == null) + { + request.setResponseError("订单【" + questionsId + "】不存在"); + return; + } + + Selector sel = new Selector(); + sel.addMust("questionsId", questionsId); + sel.addMust("attaModul", "MaterialFile"); + List attaList = ORM.get(ZTable.class).list(QuestionsAtta.class, sel); + + Map jsonMap = new HashMap<>(); + jsonMap.put("attaList", attaList); + request.setResponseResult(Jsons.toString(jsonMap)); + } + + /** + * + * [简要描述]:上传考试订单文件
            + * [详细描述]:
            + * + * @author hc + * @param request + * @param questionsId + * @param fileId + * @param fileType + * @throws Exception + */ + public static void uploadQuestionsFile(HttpRequest request, long questionsId, String fileId, String fileType) throws Exception + { + UpllFile file = ORM.get(ZTable.class).item(UpllFile.class, new Selector("fileId", fileId).addReplace("id", null)); + String fileName = file.getFileName(); + boolean checkFileName = QuestionsFilePresenter.doCheckFileName(request, fileName, fileType); + + if (!checkFileName) + { + request.setResponseError("请上传PDF文件!"); + return; + } + + File saveFile = new File(file.getFilePath()); + if (!saveFile.isFile()) + { + ORM.get(ZTable.class).delete(UpllFile.class, new Selector("fileId", fileId).addReplace("id", null)); + request.setResponseError("未找到上传的文件,请重新上传"); + return; + } + + if (questionsId < 0) + { + request.setResponseError("考试订单未找到,请重新上传"); + return; + } + + // 插入考试订单附属表 + QuestionsAtta atta = new QuestionsAtta(); + atta.setQuestionsId(questionsId); + atta.setAttaId(Ids.longId()); + atta.setAttaModul(fileType); + atta.setFileName(file.getFileName()); + atta.setFileType(file.getFileExt()); + atta.setFileSize(file.getFileLength()); + atta.setSavePath(file.getFilePath()); + atta.setFileUrl(file.getFileUrl()); + atta.setOperatorCode(request.getSessionName()); + atta.setUploadTime(Sqls.nowTimestamp()); + ORM.get(ZTable.class).insert(atta); + + // 页面数据展示 + Selector sel = new Selector(); + sel.addMust("questionsId", questionsId); + sel.addMust("attaModul", fileType); + List attaList = ORM.get(ZTable.class).list(QuestionsAtta.class, sel); + + Map jsonMap = new HashMap(); + jsonMap.put("attaList", attaList); + + request.setResponseResult(Jsons.toString(jsonMap)); + + } + + /** + * 删除文件 + * + * @param str + * @return + * @throws Exception + */ + public static void deleteMaterialFile(HttpRequest request, String strs) throws Exception + { + long[] attaidArr = Arrays.toLongArray(strs); + if (attaidArr.length <= 0) + { + request.setResponseError("删除文件数据不存在"); + return; + } + + List attaList = ORM.get(ZTable.class).list(QuestionsAtta.class, new Selector().addMustInLong("attaId", attaidArr)); + for (QuestionsAtta atta : attaList) + { + File file = new File(atta.getSavePath()); + if (file.exists()) + { + Files.deleteFile(atta.getSavePath()); + } + + if (Validates.isNotEmpty(atta.getFileid())) + { + ORM.get(ZTable.class).delete(UpllFile.class, new Selector("fileId", atta.getFileid()).addReplace("id", null)); + } + + ORM.get(ZTable.class).delete(QuestionsAtta.class, atta.getAttaId()); + } + + request.setResponseResult("删除成功"); + } + + /** + * 文件命名检测 + * + * @param request + * @param questionsId + * @param fileType + * @param fileName + * @throws Exception + */ + public static boolean doCheckFileName(HttpRequest request, String fileName, String fileType) throws Exception + { + + if (fileType.equals("EndFile")) + { + String fileNameTyep = fileName.substring(fileName.lastIndexOf(".") + 1); + if (!fileNameTyep.toLowerCase().equals("pdf")) + { + request.setResponseError("请上传PDF文件!"); + return false; + } + } + return true; + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/ReceiveMerPresenter.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/ReceiveMerPresenter.java new file mode 100644 index 0000000..8aa507c --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/ReceiveMerPresenter.java @@ -0,0 +1,53 @@ +package com.zhiqim.yangcai.design.presenter; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.annotation.AnIntercept; +import org.zhiqim.kernel.annotation.AnAlias; + +/** + * TODO:订单分拣相关 + * + * @version v1.0.0 @author longguizhi 2018-6-6 新建与整理 + */ +@AnAlias("ReceiveMerPresenter") +@AnIntercept("chkZmrLogin") +public class ReceiveMerPresenter +{ + public static void doQueryPolicy(HttpRequest request) throws Exception + { + // boolean enableType = request.getParameterBoolean("enableType", false); + // boolean enablePolicy = request.getParameterBoolean("enablePolicy", false); + // long[] prdTypeIds = Arrays.toLongArray(request.getParameter("prdTypeIds")); + // Map> dataMap = new HashMap>(); + // List typeList = new ArrayList(); + // if (prdTypeIds.length > 0) + // { + // Selector selector = new Selector().addMustInLong("prdTypeId", + // prdTypeIds).addOrderbyAsc("prdTypeId"); + // if (enableType) + // selector.addMust("prdTypeStatus", 0); + // + // typeList = ORM.get(ZTable.class).list(PrdType.class, selector); + // for (PrdType type : typeList) + // { + // long[] policyIds = Arrays.toLongArray(type.getPrdPolicyIds()); + // List tl = new ArrayList(); + // if (policyIds.length > 0) + // { + // Selector selector2 = new Selector(); + // selector2.addMustInLong("policyId", policyIds); + // if (enablePolicy) + // selector.addMust("policyStatus", 0); + // + // tl = ORM.get(ZTable.class).list(PrdPolicy.class, selector2); + // } + // + // dataMap.put(type.getPrdTypeId(), tl); + // } + // } + // Map jsonMap = new HashMap(); + // jsonMap.put("dataMap", dataMap); + // jsonMap.put("typeList", typeList); + // request.setResponseResult(Jsons.toString(jsonMap)); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/ScorePresenter.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/ScorePresenter.java new file mode 100644 index 0000000..f103f26 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/ScorePresenter.java @@ -0,0 +1,75 @@ +package com.zhiqim.yangcai.design.presenter; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.annotation.AnIntercept; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.design.dbo.score.DesScoreParam; +import com.zhiqim.yangcai.design.dbo.score.ScoreType; + +/** + * + * 评分Presenter + * + * @version v1.0.0 @author Deng 2018-3-13 新建与整理 + */ +@AnAlias("ScorePresenter") +@AnIntercept("chkZmrLogin") +public class ScorePresenter +{ + /** + * 修改评分参数值 + * + * @param request + * @throws Exception + */ + public static void doScoreParamUpdate(HttpRequest request) throws Exception + { + long paramId = request.getParameterLong("paramId"); + int paramValue = request.getParameterInt("paramValue"); + + Updater update = new Updater(); + update.addMust("paramId", paramId); + update.addField("paramValue", paramValue); + + ORM.get(ZTable.class).update(DesScoreParam.class, update); + } + + /** + * 删除评分参数 + * + * @param request + * @throws Exception + */ + public static void doScoreParamDelete(HttpRequest request) throws Exception + { + long paramId = request.getParameterLong("paramId"); + + ORM.get(ZTable.class).delete(DesScoreParam.class, paramId); + } + + /** + * 修改评分细则配置 + * + * @param request + * @throws Exception + */ + public static void doScoreTypeUpdate(HttpRequest request) throws Exception + { + long typeId = request.getParameterLong("typeId"); + int value = request.getParameterInt("value"); + int state = request.getParameterInt("state"); + + Updater update = new Updater(); + update.addMust("typeId", typeId); + update.addField("value", value); + update.addField("state", state); + update.addField("modifyTime", Sqls.nowTimestamp()); + update.addField("lastOperatorCode", request.getSessionName()); + ORM.get(ZTable.class).update(ScoreType.class, update); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/SearchPresenter.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/SearchPresenter.java new file mode 100644 index 0000000..f084e01 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/SearchPresenter.java @@ -0,0 +1,71 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.presenter; + +import java.util.ArrayList; +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.YqArticle; + +@AnAlias("SearchPresenter") +public class SearchPresenter +{ + /** + * 根据关键词查询文章标题列表 + * + * @param request 请求 + * @param keyword 关键词 + * @return 数组的JSON字符串 + * @throws Exception 异常 + */ + public static String search(HttpRequest request, String keyword) throws Exception + { + int page = request.getParameterInt("page", 1); + int pageSize = 10; + + if (Validates.isEmptyBlank(keyword)) + { + return "[]"; + } + String[] word = keyword.split(" "); + Selector selector = new Selector("articleTitle"); + for (int i = 0; i < word.length; i++) + { + if (Validates.isEmptyBlank(word[i])) + { + continue; + } + selector.addMaybeLike("articleTitle", word[i]); + } + selector.addOrderbyDesc("articleId"); + selector.addMust("articleStatus", 0); + + PageResult articlePage = ORM.get(ZTable.class).page(YqArticle.class, page, pageSize, selector); + + List titleList = new ArrayList<>(); + for (YqArticle item : articlePage.list()) + { + titleList.add(item.getArticleTitle()); + } + + return Jsons.toString(titleList); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/StatPresenter.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/StatPresenter.java new file mode 100644 index 0000000..be0d1a5 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/StatPresenter.java @@ -0,0 +1,653 @@ +package com.zhiqim.yangcai.design.presenter; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.ZmlContexts; +import org.zhiqim.httpd.context.annotation.AnIntercept; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.extend.HashMapSO; +import org.zhiqim.kernel.extend.LinkedMapSO; +import org.zhiqim.kernel.extend.MapSO; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.kernel.paging.PageBuilder; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.manager.ZmrBootstrap; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.manager.dao.ZmrOrgDao; +import org.zhiqim.manager.dbo.ZmrOrg; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZSQL; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.constants.DraftConstants; +import com.zhiqim.yangcai.design.constants.EventConstants; +import com.zhiqim.yangcai.design.constants.StatusConstants; +import com.zhiqim.yangcai.design.dao.OperatorDao; +import com.zhiqim.yangcai.design.dbo.order.DesignOrdLogView; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; +import com.zhiqim.yangcai.design.dbo.order.DesignSelfView; +import com.zhiqim.yangcai.design.dbo.order.OrdProgressNote; +import com.zhiqim.yangcai.design.dbo.qc.QcOrderView; + +/** + * 统计相关处理方法 + * + * @version v1.0.0 @author zzy 2017-9-7 新建与整理 + */ +@AnAlias("StatPresenter") +@AnIntercept("chkZmrLogin") +public class StatPresenter +{ + private static final Log log = LogFactory.getLog(StatPresenter.class); + + /** + * 初稿订单统计查询明细 + * + * @param request + * @throws Exception + */ + public static void doQueryDraftOrderStatInfo(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page", 1); + int pageSize = request.getContextAttributeInt("page.size", 20); + + String beginDate = request.getParameter("beginDate"); + String endDate = request.getParameter("endDate"); + String designer = request.getParameter("designer"); + int querys = request.getParameterInt("querys"); + PageResult pageResult = PageBuilder.newResult(pageSize); + if (querys == 1) + { + Selector selector = new Selector(); + selector.addMaybeThenGE("status", StatusConstants.ORDER_50.value()); + selector.addMaybeThenGE("designDraftTime", Sqls.toTimestamp(beginDate, "00:00:00")); + selector.addMaybeThenLE("designDraftTime", Sqls.toTimestamp(endDate, "23:59:59")); + // selector.addMustIn("draftType", DraftConstants.DRAFT_TEMPLATE.value(), + // DraftConstants.DRAFT_COMMON_DESIGN.value(), + // DraftConstants.DRAFT_PAGE_DESIGN.value()); + selector.addMaybe("designer", designer); + selector.addOrderbyDesc("designDraftTime"); + OperatorDao.getOrgSelector(request, selector); + pageResult = ORM.get(ZTable.class).page(DesignOrder.class, page, pageSize, selector); + } + + MapSO attrMap = new HashMapSO(); + attrMap.put("result", pageResult); + attrMap.put("beginDate", beginDate); + attrMap.put("endDate", endDate); + attrMap.put("designer", designer); + attrMap.put("page", page); + + String ret = ZmlContexts.parseZmlPath(request, "/zview/stat/design/inner/draftOrderConvertInfo.zml", attrMap); + request.setResponseResult(ret); + } + + /** + * + * [简要描述]: 设计师绩效订单详情
            + * [详细描述]:
            + * + * @author gjx + * @param request + * @throws Exception + */ + public static void doQueryCompleteOrderInfo(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page", 1); + int pageSize = request.getParameterInt("pageSize", 12); + String beginDate = request.getParameter("beginDate", DateTimes.getFirstMonthDay()); + String endDate = request.getParameter("endDate", DateTimes.getLastMonthDay()); + String designer = request.getParameter("designer"); + boolean console = request.getParameterBoolean("console", false); + + String firstMonthDay = DateTimes.getFirstMonthDay(); + if (console && ((firstMonthDay.compareTo(beginDate) > 0 && firstMonthDay.compareTo(endDate) <= 0) + || (firstMonthDay.compareTo(endDate) > 0 && firstMonthDay.compareTo(beginDate) <= 0))) + { + request.setResponseError("不支持当月与往月跨月查询"); + return; + } + + PageResult pageResult = PageBuilder.newResult(0); + if (request.getParameterInt("query") == 1) + { + Selector selector = new Selector(); + selector.addMustThenGE("designEndTime", Sqls.toTimestampBegin(beginDate)); + selector.addMustThenLE("designEndTime", Sqls.toTimestampEnd(endDate)); + selector.addMaybe("designer", designer); + selector.addMustThenGE("status", StatusConstants.ORDER_55.value()); + selector.addMustThenGE("draftType", DraftConstants.DRAFT_TEMPLATE.value()); + selector.addMustThenLE("draftType", DraftConstants.DRAFT_PAGE_DESIGN.value()); + selector.addOrderbyDesc("designEndTime"); + pageResult = ORM.get(ZView.class).page(DesignSelfView.class, page, pageSize, selector); + } + + MapSO attrMap = new HashMapSO(); + attrMap.put("result", pageResult); + attrMap.put("designerPerformanceBeginDate", beginDate); + attrMap.put("designerPerformanceEndDate", endDate); + attrMap.put("designer", designer); + attrMap.put("console", console); + attrMap.put("page", page); + String ret = ZmlContexts.parseZmlPath(request, "/zview/stat/design/inner/designerCompleteOrderInfo.zml", attrMap); + request.setResponseResult(ret); + } + + /** + * + * 查找字符串在数组中出现重复次数 + * + * @author gjx + * @param backId + * @param arrayId + * @return + */ + public static int findArrayRepetit(String backId, String[] arrayId) + { + int backExistCount = 0; + for (int i = 0; i < arrayId.length; i++) + { + if (arrayId[i].equals(backId)) + { + backExistCount++; + } + } + return backExistCount; + } + + /** + * 查询个人退款订单 + * + * @param request + * @throws Exception + */ + public static void doQueryRefundDetail(HttpRequest request) throws Exception + { + long orgId = request.getSessionUser(ZmrSessionUser.class).getSelectedOrgId(); + + int page = request.getParameterInt("page", 1); + int pageSize = request.getContextAttributeInt("page.size", 10); + String designer = request.getParameter("designer"); + String beginDate = request.getParameter("beginDate"); + String endDate = request.getParameter("endDate"); + + Selector selector = new Selector(); + Selector selectorCopy = new Selector(); + selector.addMust("designer", designer); + selectorCopy.addMust("designer", designer); + selector.addMaybeThenGE("designBeginTime", Sqls.toTimestamp(beginDate + " 00:00:00")); + selector.addMaybeThenLE("designBeginTime", Sqls.toTimestamp(endDate + " 23:59:59")); + selector.addMustIn("status", StatusConstants.ORDER_F100.value()); + + // 相关子查询(一小时内重新下单不算设计师责任) + selector.addExpressionNotEqual("buyerNick", "all (select BUYER_NICK from design_order as b " + "where b.DESIGN_ID <> design_order.DESIGN_ID " + + "and b.CREATE_TIME >= design_order.REFUND_TIME " + "and DATE_SUB(b.CREATE_TIME,INTERVAL 1 HOUR) <= design_order.REFUND_TIME)"); + selectorCopy.addMaybeThenGE("designBeginTime", Sqls.toTimestamp(beginDate + " 00:00:00")); + selectorCopy.addMaybeThenLE("designBeginTime", Sqls.toTimestamp(endDate + " 23:59:59")); + selectorCopy.addMustIn("status", StatusConstants.ORDER_F110.value()); + + // 相关子查询(一小时内重新下单不算设计师责任) + selectorCopy.addExpressionNotEqual("buyerNick", "all (select BUYER_NICK from design_order as b " + "where b.DESIGN_ID <> design_order.DESIGN_ID " + + "and b.CREATE_TIME >= design_order.REFUND_TIME " + "and DATE_SUB(b.CREATE_TIME,INTERVAL 1 HOUR) <= design_order.REFUND_TIME)"); + selector.addExpression("designer", "any (select operator_code from zmr_operator as a WHERE a.ORG_ID = $orgId$)"); + selector.addReplace("ORG_ID", orgId + ""); + selectorCopy.addExpression("designer", "any (select operator_code from zmr_operator as a WHERE a.ORG_ID = $orgId$)"); + selectorCopy.addReplace("ORG_ID", orgId + ""); + PageResult noResponsibleRefundResult = ORM.get(ZView.class).page(DesignSelfView.class, page, pageSize, selector); + PageResult responsibleRefundResult = ORM.get(ZView.class).page(DesignSelfView.class, page, pageSize, selectorCopy); + + MapSO attrMap = new HashMapSO(); + attrMap.put("noResponsibleRefundResult", noResponsibleRefundResult); + attrMap.put("responsibleRefundResult", responsibleRefundResult); + attrMap.put("beginDate", beginDate); + attrMap.put("endDate", endDate); + attrMap.put("designer", designer); + attrMap.put("page", page); + String ret = ZmlContexts.parseZmlPath(request, "/zview/stat/refund/inner/designOrderRefundRateStatInfo.zml", attrMap); + request.setResponseResult(ret); + } + + public static void doQueryQcOrder(HttpRequest request) + { + int page = request.getParameterInt("page"); + int pageSize = request.getContextAttributeInt("page.size", 10); + + String year = request.getParameter("year"); + String month = request.getParameter("month"); + String dateTime = year + "-" + month; + int day = DateTimes.getMonthDays(year + month); + + String designer = request.getParameter("designer"); + + StringBuffer sql = new StringBuffer( + "select QC_RECORD.REASON as reason, QC_RECORD.SCORE as score, QC_RECORD.IMG_PATH as imgPath, QC_RECORD.OPERATOR_CODE as operatorCode, DESIGN_ORDER.DESIGN_ID as designId, DESIGN_ORDER.MERCHANT_ID as merchantId, DESIGN_ORDER.OUT_ID as outId, DESIGN_ORDER.STATUS as status, DESIGN_ORDER.ORDER_TEXT as orderText, DESIGN_ORDER.AMOUNT as amount, DESIGN_ORDER.TYPE_ID as typeId, DESIGN_ORDER.INDUSTRY_ID as industryId, DESIGN_ORDER.DRAFT_TYPE as draftType, DESIGN_ORDER.IS_URGENT as isUrgent, DESIGN_ORDER.DESIGN_PAGE as designPage, DESIGN_ORDER.DESIGN_WIDTH as designWidth, DESIGN_ORDER.DESIGN_HEIGHT as designHeight, DESIGN_ORDER.PRINT_WIDTH as printWidth, DESIGN_ORDER.PRINT_HEIGHT as printHeight, DESIGN_ORDER.PRINT_KS as printKs, DESIGN_ORDER.PRINT_MS as printMs, DESIGN_ORDER.USER_CONTACT as userContact, DESIGN_ORDER.USER_MOBILE as userMobile, DESIGN_ORDER.AFTER_NAMES as afterNames, DESIGN_ORDER.PRINT_SPECIAL as printSpecial, DESIGN_ORDER.BUYER_NICK as buyerNick, DESIGN_ORDER.USER_TEXT as userText, DESIGN_ORDER.USER_NOTICE as userNotice, DESIGN_ORDER.USER_QQ as userQq, DESIGN_ORDER.USER_WX as userWx, DESIGN_ORDER.USER_TEXT_REPLACE as userTextReplace, DESIGN_ORDER.REMINDER_NUM as reminderNum, DESIGN_ORDER.SHOP_NICK as shopNick, DESIGN_ORDER.ORG_ID as orgId, DESIGN_ORDER.ORG_RECEIVE_TIME as orgReceiveTime, DESIGN_ORDER.RECEIVE_TYPE as receiveType, DESIGN_ORDER.ORDER_FLAG as orderFlag, DESIGN_ORDER.DESIGNER as designer, DESIGN_ORDER.DESIGN_RECEIVE_TIME as designReceiveTime, DESIGN_ORDER.DESIGN_BEGIN_TIME as designBeginTime, DESIGN_ORDER.DESIGN_DRAFT_TIME as designDraftTime, DESIGN_ORDER.DESIGN_END_TIME as designEndTime, DESIGN_ORDER.DESIGN_PAUSE_REASON as designPauseReason, DESIGN_ORDER.DESIGN_PAUSE_TIME as designPauseTime, DESIGN_ORDER.DESIGN_EXCLUDE as designExclude, DESIGN_ORDER.DESIGN_REQUEST_REASON as designRequestReason, DESIGN_ORDER.REQUEST_TIME as requestTime, DESIGN_ORDER.DESIGN_REJECT_REASON as designRejectReason, DESIGN_ORDER.DESIGN_KEEP_DURATION as designKeepDuration, DESIGN_ORDER.REQUEST_REFOUND_ACCEPT_REASON as requestRefoundAcceptReason, DESIGN_ORDER.REFUND_TIME as refundTime, DESIGN_ORDER.CHECKER as checker, DESIGN_ORDER.CHECK_TIME as checkTime, DESIGN_ORDER.CHECK_BACK_REASON as checkBackReason, DESIGN_ORDER.CHECK_BACK_PICTURE_URL as checkBackPictureUrl, DESIGN_ORDER.PREPRESS_BACK_REASON as prepressBackReason, DESIGN_ORDER.CANCELER as canceler, DESIGN_ORDER.CANCEL_TIME as cancelTime, DESIGN_ORDER.CANCEL_REASON as cancelReason, DESIGN_ORDER.CREATE_TIME as createTime, DESIGN_ORDER.MODIFY_TIME as modifyTime, DESIGN_ORDER.RE_DESIGN_SRC_ID as reDesignSrcId, DESIGN_ORDER.RE_DESIGN_CREATE_NOTE as reDesignCreateNote, DESIGN_ORDER.COMPLAINT_REASON as complaintReason, DESIGN_ORDER.COMPLAINT_FLAG as complaintFlag, DESIGN_ORDER.COMPLAINT_BACK_REASON as complaintBackReason, DESIGN_ORDER.SERVICES_MESSAGE as servicesMessage, DESIGN_ORDER.QC_TIME as qcTime, DESIGN_ORDER.QC_FLAG as qcFlag, DESIGN_ORDER.IS_OLD_USER as isOldUser from QC_RECORD left join DESIGN_ORDER on QC_RECORD.DESIGN_ID = DESIGN_ORDER.DESIGN_ID where QC_RECORD.QC_FLAG = 2"); + + // 过滤时间 + sql.append(" and QC_RECORD.QC_TIME >= "); + sql.append("\'"); + sql.append(Sqls.toTimestamp(dateTime + "-01" + " 00:00:00")); + sql.append("\'"); + sql.append(" and QC_RECORD.QC_TIME <= "); + sql.append("\'"); + sql.append(Sqls.toTimestamp(dateTime + "-" + day + " 23:59:59")); + sql.append("\'"); + // 过滤设计师 + if (designer != null && !"".equals(designer)) + { + sql.append(" and QC_RECORD.DESIGNER = "); + sql.append("\'" + designer + "\'"); + } + + List listUsers = null; + int toal = 0; + try + { + // 过滤组织,如果是总组织则查看所有数据 + ZmrSessionUser sessionUser = request.getSessionUser(ZmrSessionUser.class); + long orgId = sessionUser.getSelectedOrgId(); + ZmrOrg org = ZmrBootstrap.table(request).item(ZmrOrg.class, orgId); + if (org.getOrgLevel() > 0) + { + sql.append(" and QC_RECORD.ORG_ID = "); + sql.append(org.getOrgId()); + } + + // 查询sql条数 + String countSql = "select count(*) count from (" + sql.toString() + ") _p"; + List list = ORM.get(ZSQL.class).executeQuery(countSql); + toal = Integer.valueOf((list.get(0).get("count")).toString()); + // 分页查询数据 + sql.insert(0, "select * from ("); + sql.append(" ) _p"); + sql.append(" limit "); + sql.append((page - 1) * pageSize); + sql.append(","); + sql.append(pageSize); + listUsers = ORM.get(ZSQL.class).executeQuery(sql.toString(), QcOrderView.class); + } + catch (Exception e) + { + log.info("查询【QcOrderView】视图出错", e); + } + + PageResult pageResult = PageBuilder.newResult(toal, page, pageSize, listUsers); + MapSO attrMap = new HashMapSO(); + attrMap.put("pageResult", pageResult); + attrMap.put("designer", designer); + attrMap.put("page", page); + + String ret = ""; + try + { + ret = ZmlContexts.parseZmlPath(request, "/zview/stat/qc/inner/qcViolationsOrderInfo.zml", attrMap); + } + catch (Exception e) + { + log.info("查询【QcOrderView】视图出错", e); + } + + request.setResponseResult(ret); + } + + public static void doQueryQcDispose(HttpRequest request) + { + int page = request.getParameterInt("page"); + int pageSize = request.getContextAttributeInt("page.size", 10); + + String beginDate = request.getParameter("beginDate", DateTimes.getFirstMonthDay()); + String endDate = request.getParameter("endDate", DateTimes.getDateString()); + String operatorCode = request.getParameter("operatorCode"); + + Selector selector = new Selector(); + selector.addMaybe("operatorCode", operatorCode); + selector.addMustThenGE("qcTime", Sqls.toTimestamp(beginDate + " 00:00:00")); + selector.addMustThenLE("qcTime", Sqls.toTimestamp(endDate + " 23:59:59")); + + PageResult pageResult = PageBuilder.newResult(page); + try + { + pageResult = ORM.get(ZView.class).page(QcOrderView.class, page, pageSize, selector); + } + catch (Exception e) + { + log.info("查询【QcOrderView】视图出错", e); + } + + MapSO attrMap = new HashMapSO(); + attrMap.put("pageResult", pageResult); + attrMap.put("operatorCode", operatorCode); + attrMap.put("page", page); + + String ret = ""; + try + { + ret = ZmlContexts.parseZmlPath(request, "/zview/stat/qc/inner/qcDisposeOrderInfo.zml", attrMap); + } + catch (Exception e) + { + log.info("查询【QcOrderView】视图出错", e); + } + + request.setResponseResult(ret); + } + + /** + * 退回时效统计Info + * [简要描述]:
            + * [详细描述]:
            + * + * @author gjx + * @param request + * @throws Exception + */ + public static void doOrderBackEffectStatInfo(HttpRequest request) throws Exception + { + + int page = request.getParameterInt("page", 1); + int pageSize = request.getParameterInt("pageSize", 13); + String designer = request.getParameter("designer"); + + Selector selector = new Selector(); + // selector.addMustThenGE("draftType", DraftConstants.DRAFT_COMMON_DESIGN.value()); + selector.addMaybe("designer", designer); + selector.addMustThenGE("createLogTime", Sqls.toTimestamp(request.getParameter("startDate"), "00:00:00")); + selector.addMustThenLE("createLogTime", Sqls.toTimestamp(request.getParameter("endDate"), "23:59:59")); + selector.addMust("eventType", EventConstants.ORDER_10.value());// 退回 + selector.addMustIsNotEmpty("designer"); + selector.addOrderbyAsc("designId"); + selector.addOrderbyAsc("createLogTime"); + + PageResult infoPageResult = ORM.get(ZView.class).page(DesignOrdLogView.class, page, pageSize, selector); + infoPageResult.addConditionMap(request.getParameterMap()); + + MapSO attrMap = new HashMapSO(); + attrMap.put("infoPageResult", infoPageResult); + attrMap.put("designer", designer); + attrMap.put("page", page); + String ret = ZmlContexts.parseZmlPath(request, "/zview/stat/back/orderBackEffectStatInfo.zml", attrMap); + request.setResponseResult(ret); + } + + /** + * + * [简要描述]: 设计师定稿超时详情
            + * [详细描述]:
            + * + * @author gjx + * @param request + * @throws Exception + */ + public static void doQueryCompleteTimeoutOrderInfo(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page", 1); + int pageSize = 12; + + String startDate = request.getParameter("startDate"); + String endDate = request.getParameter("endDate"); + + Selector selector = new Selector(); + selector.addMustThenGE("createTime", Sqls.toTimestamp(startDate, "00:00:00")); + selector.addMustThenLE("createTime", Sqls.toTimestamp(endDate, "23:59:59")); + selector.addMustThenGE("status", StatusConstants.ORDER_10.value()); + selector.addMustIsNotEmpty("designer"); + selector.addMaybe("designer", request.getParameter("designer")); + // 根据组织显示 + ZmrSessionUser sessionUser = request.getSessionUser(ZmrSessionUser.class); + if (ZmrOrgDao.getOrgRootId(request) != sessionUser.getSelectedOrgId()) + { + selector.addMust("orgId", sessionUser.getSelectedOrgId()); + } + selector.addExpressionThenL("designBeginTime", + "SUBDATE(IF(design_order.`STATUS` >= 55,design_order.DESIGN_END_TIME,now()),INTERVAL (SELECT dt.EFFECTIVE_END_TIME FROM design_type dt WHERE dt.TYPE_ID = DESIGN_ORDER.TYPE_ID) MINUTE)"); + selector.addOrderbyAsc("createTime"); + PageResult pageResult = ORM.get(ZTable.class).page(DesignOrder.class, page, pageSize, selector); + pageResult.addConditionMap(request.getParameterMap()); + Map progressNoteMap = new HashMap(); + for (DesignOrder order : pageResult.list()) + { + // 进度备注 + OrdProgressNote note = ORM.get(ZTable.class).item(OrdProgressNote.class, + new Selector("designId", order.getDesignId()).addOrderbyDesc("createTime")); + progressNoteMap.put(order.getDesignId(), note == null ? "" + : "" + + "

            " + + note.getOrdProgressNote() + "

            " + Sqls.toDateTimeString(note.getCreateTime()) + "
            "); + } + + MapSO attrMap = new HashMapSO(); + attrMap.put("progressNoteMap", progressNoteMap); + attrMap.put("pageResult", pageResult); + + String ret = ZmlContexts.parseZmlPath(request, "/zview/stat/design/inner/timeoutDesignerCompleteInfo.zml", attrMap); + request.setResponseResult(ret); + + } + + /** + * + * [简要描述]: 设计师定稿率统计
            + * [详细描述]:
            + * + * @author gjx + * @param request + * @throws Exception + */ + public static void doQueryDesignNotCompleteOrderInfo(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page", 1); + int pageSize = 12; + + // 查询组织 + long orgId = request.getSessionUser(ZmrSessionUser.class).getSelectedOrgId(); + + String startDate = request.getParameter("startDate"); + String endDate = request.getParameter("endDate"); + + String designer = request.getParameter("designer"); + + Selector selector = new Selector(); + selector.addMustThenGE("designBeginTime", Sqls.toTimestampBegin(startDate)); + selector.addMustThenLE("designBeginTime", Sqls.toTimestampEnd(endDate)); + selector.addMustThenL("status", StatusConstants.ORDER_55.value()); + if (ZmrOrgDao.getOrgRootId(request) != orgId) + { + selector.addMust("orgId", orgId); + } + selector.addMustIsNotEmpty("designer"); + selector.addMaybe("designer", designer); + selector.addOrderbyAsc("designBeginTime"); + + PageResult pageResult = ORM.get(ZTable.class).page(DesignOrder.class, page, pageSize, selector); + pageResult.addConditionMap(request.getParameterMap()); + Map progressNoteMap = new HashMap(); + for (DesignOrder order : pageResult.list()) + { + // 进度备注 + OrdProgressNote note = ORM.get(ZTable.class).item(OrdProgressNote.class, + new Selector("designId", order.getDesignId()).addOrderbyDesc("createTime")); + progressNoteMap.put(order.getDesignId(), note == null ? "" + : "" + + "

            " + + note.getOrdProgressNote() + "

            " + Sqls.toDateTimeString(note.getCreateTime()) + "
            "); + } + + MapSO attrMap = new HashMapSO(); + attrMap.put("pageResult", pageResult); + attrMap.put("progressNoteMap", progressNoteMap); + + String ret = ZmlContexts.parseZmlPath(request, "/zview/stat/design/inner/completeDesignRateStatInfo.zml", attrMap); + request.setResponseResult(ret); + } + + /** + * + * [简要描述]: 设计师定稿订单
            + * [详细描述]:
            + * + * @author gjx + * @param request + * @throws Exception + */ + public static void doQueryToMonthDesignInfo(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page", 1); + int pageSize = 12; + + // 查询组织 + long orgId = request.getSessionUser(ZmrSessionUser.class).getSelectedOrgId(); + + String startDate = request.getParameter("startDate"); + String endDate = request.getParameter("endDate"); + String firstMonthDay = DateTimes.getFirstMonthDay(); + if (((firstMonthDay.compareTo(startDate) > 0 && firstMonthDay.compareTo(endDate) <= 0) + || (firstMonthDay.compareTo(endDate) > 0 && firstMonthDay.compareTo(startDate) <= 0))) + { + request.setResponseError("不支持当月与往月跨月查询"); + return; + } + String designer = request.getParameter("designer"); + + Selector selector = new Selector(); + selector.addMustThenGE("designEndTime", Sqls.toTimestampBegin(startDate)); + selector.addMustThenLE("designEndTime", Sqls.toTimestampEnd(endDate)); + selector.addMustThenG("status", StatusConstants.ORDER_55.value()); + if (ZmrOrgDao.getOrgRootId(request) != orgId) + { + selector.addMust("orgId", orgId); + } + selector.addMustIsNotEmpty("designer"); + selector.addMaybe("designer", designer); + selector.addOrderbyAsc("designEndTime"); + + PageResult pageResult = ORM.get(ZTable.class).page(DesignOrder.class, page, pageSize, selector); + pageResult.addConditionMap(request.getParameterMap()); + Map progressNoteMap = new HashMap(); + for (DesignOrder order : pageResult.list()) + { + // 进度备注 + OrdProgressNote note = ORM.get(ZTable.class).item(OrdProgressNote.class, + new Selector("designId", order.getDesignId()).addOrderbyDesc("createTime")); + progressNoteMap.put(order.getDesignId(), note == null ? "" + : "" + + "

            " + + note.getOrdProgressNote() + "

            " + Sqls.toDateTimeString(note.getCreateTime()) + "
            "); + } + + MapSO attrMap = new HashMapSO(); + attrMap.put("pageResult", pageResult); + attrMap.put("progressNoteMap", progressNoteMap); + + String ret = ZmlContexts.parseZmlPath(request, "/zview/stat/design/inner/toMonthDesignInfo.zml", attrMap); + request.setResponseResult(ret); + } + + /** + * + * [简要描述]: 查询分拣超时订单
            + * [详细描述]:
            + * + * @author gjx + * @param request + * @throws Exception + */ + public static void doQueryTimeoutMerDispatchOrder(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page", 1); + int pageSize = 12; + + String beginDate = request.getParameter("beginDate"); + String endDate = request.getParameter("endDate"); + + Selector selector = new Selector(); + selector.addMaybe("designId", request.getParameterLong("designId")); + selector.addMaybe("buyerNick", request.getParameter("buyerNick")); + selector.addMaybe("typeId", request.getParameterLong("typeId")); + selector.addMaybe("industryId", request.getParameterLong("industryId")); + selector.addMustThenGE("createTime", Sqls.toTimestampBegin(beginDate)); + selector.addMustThenLE("createTime", Sqls.toTimestampEnd(endDate)); + + ZmrSessionUser sessionUser = request.getSessionUser(ZmrSessionUser.class); + long orgId = sessionUser.getSelectedOrgId(); + // 根据组织查询 + ZmrOrg org = ZmrOrgDao.getOrg(request, orgId); + if (org.getOrgLevel() > 0) + { + selector.addMust("orgId", orgId); + } + + selector.addExpressionThenL("createTime", + "SUBDATE(CASE WHEN (ISNULL(DESIGN_ORDER.ORG_RECEIVE_TIME) = 1) || (LENGTH(TRIM(DESIGN_ORDER.ORG_RECEIVE_TIME)) = 0) THEN now() ELSE DESIGN_ORDER.ORG_RECEIVE_TIME END,INTERVAL (SELECT dt.MER_DISPATCH_EFFECTIVE_TIME FROM design_type dt WHERE dt.TYPE_ID = DESIGN_ORDER.TYPE_ID) MINUTE)"); + + PageResult pageResult = ORM.get(ZTable.class).page(DesignOrder.class, page, pageSize, selector); + + MapSO attrMap = new HashMapSO(); + attrMap.put("pageResult", pageResult); + + String ret = ZmlContexts.parseZmlPath(request, "/zview/stat/design/inner/timeoutMerDispatchInfo.zml", attrMap); + request.setResponseResult(ret); + } + + /** + * + * [简要描述]: 初稿超时订单详情
            + * [详细描述]:
            + * + * @author gjx + * @param request + * @throws Exception + */ + public static void doQueryTimeoutDraftOrder(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page", 1); + int pageSize = 12; + + // 查询组织 + long orgId = request.getSessionUser(ZmrSessionUser.class).getSelectedOrgId(); + + String beginDate = request.getParameter("beginDate"); + String endDate = request.getParameter("endDate"); + String designer = request.getParameter("designer"); + + Selector selector = new Selector(); + selector.addMaybe("designer", designer); + selector.addMustThenGE("designBeginTime", Sqls.toTimestampBegin(beginDate)); + selector.addMustThenLE("designBeginTime", Sqls.toTimestampEnd(endDate)); + selector.addExpressionThenL("designBeginTime", + "SUBDATE(CASE WHEN (ISNULL(DESIGN_ORDER.DESIGN_DRAFT_TIME) = 1) || (LENGTH(TRIM(DESIGN_ORDER.DESIGN_DRAFT_TIME)) = 0) THEN now() ELSE DESIGN_ORDER.DESIGN_DRAFT_TIME END,INTERVAL (SELECT dt.EFFECTIVE_TIME FROM design_type dt WHERE dt.TYPE_ID = DESIGN_ORDER.TYPE_ID) MINUTE)"); + if (ZmrOrgDao.getOrgRootId(request) != orgId) + { + selector.addMust("orgId", orgId); + } + selector.addOrderbyAsc("designBeginTime"); + + PageResult pageResult = ORM.get(ZTable.class).page(DesignOrder.class, page, pageSize, selector); + Map progressNoteMap = new HashMap(); + for (DesignOrder order : pageResult.list()) + { + // 进度备注 + OrdProgressNote note = ORM.get(ZTable.class).item(OrdProgressNote.class, + new Selector("designId", order.getDesignId()).addOrderbyDesc("createTime")); + progressNoteMap.put(order.getDesignId(), note == null ? "" + : "" + + "

            " + + note.getOrdProgressNote() + "

            " + Sqls.toDateTimeString(note.getCreateTime()) + "
            "); + } + + MapSO attrMap = new HashMapSO(); + attrMap.put("pageResult", pageResult); + attrMap.put("designer", designer); + attrMap.put("progressNoteMap", progressNoteMap); + + String ret = ZmlContexts.parseZmlPath(request, "/zview/stat/design/inner/timeoutDraftOrderInfo.zml", attrMap); + request.setResponseResult(ret); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/TemplateOrderPresenter.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/TemplateOrderPresenter.java new file mode 100644 index 0000000..3c9c8a6 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/TemplateOrderPresenter.java @@ -0,0 +1,1980 @@ +package com.zhiqim.yangcai.design.presenter; + +import java.awt.image.BufferedImage; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.math.BigDecimal; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import javax.imageio.ImageIO; + +import org.icepdf.core.pobjects.Document; +import org.icepdf.core.pobjects.Page; +import org.icepdf.core.util.GraphicsRenderingHints; +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.ZmlContexts; +import org.zhiqim.httpd.context.annotation.AnIntercept; +import org.zhiqim.httpd.validate.onex.IsInteger; +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnTransaction; +import org.zhiqim.kernel.extend.HashMapSO; +import org.zhiqim.kernel.extend.MapSO; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Files; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.kernel.util.Maths; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Strings; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ORMException; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; +import org.zhiqim.uploadlarge.dbo.UpllFile; + +import com.zhiqim.media.dbo.MediaBg; +import com.zhiqim.media.dbo.MediaCanvas; +import com.zhiqim.media.service.dao.MediaDao; +import com.zhiqim.media.service.dao.MediaPathDao; +import com.zhiqim.media.service.handler.MediaHandlePdfModel; +import com.zhiqim.media.service.util.qrcode.QrcodeUtil; +import com.zhiqim.yangcai.cache.CustomerTypeCache; +import com.zhiqim.yangcai.cache.DesignIndustryCache; +import com.zhiqim.yangcai.cache.IndustryLabelCache; +import com.zhiqim.yangcai.cache.LabelDimensionCache; +import com.zhiqim.yangcai.design.constant.VirtualAccountConstants; +import com.zhiqim.yangcai.design.constants.DraftConstants; +import com.zhiqim.yangcai.design.constants.EventConstants; +import com.zhiqim.yangcai.design.constants.FileTypeConstants; +import com.zhiqim.yangcai.design.constants.StatusConstants; +import com.zhiqim.yangcai.design.dao.DesignerDao; +import com.zhiqim.yangcai.design.dao.DispatchDao; +import com.zhiqim.yangcai.design.dao.OrderCheckDao; +import com.zhiqim.yangcai.design.dao.OrderLogDao; +import com.zhiqim.yangcai.design.dao.ScoreDesignerRecordDao; +import com.zhiqim.yangcai.design.dao.TemplateDao; +import com.zhiqim.yangcai.design.dao.VirtualAccountDao; +import com.zhiqim.yangcai.design.dao.WhetherMayLeadToDao; +import com.zhiqim.yangcai.design.dbo.design.DesignIndustry; +import com.zhiqim.yangcai.design.dbo.order.DesignAtta; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; +import com.zhiqim.yangcai.design.dbo.order.DesignSelfView; +import com.zhiqim.yangcai.design.dbo.order.SelfOrder; +import com.zhiqim.yangcai.design.dbo.template.DesTemplateOrder; +import com.zhiqim.yangcai.design.dbo.template.MediaTemplate; +import com.zhiqim.yangcai.design.dbo.template.MediaTemplateView; +import com.zhiqim.yangcai.design.model.CustomerTypeCacheModel; +import com.zhiqim.yangcai.design.model.IndustryLabelModel; +import com.zhiqim.yangcai.design.model.LabelDimensionModel; +import com.zhiqim.yangcai.design.model.TemplatePreviewModel; +import com.zhiqim.yangcai.util.BusinessPlatformClientUtil; + +/** + * 订单模板Presenter + * + * @version v1.0.0 @author Deng 2018-2-5 新建与整理 + * @version V1.1 @author caohong 2019-5-18 优化模板定稿逻辑,直接使用预览pdf定稿 + */ +@AnAlias("TemplateOrderPresenter") +@AnIntercept("chkZmrLogin") +public class TemplateOrderPresenter +{ + private static final Log log = LogFactory.getLog(TemplateOrderPresenter.class); + + /** + * 判断模板是否显示提交初稿按键 + * + * @param mediaId + * @return + * @throws Exception + */ + public static boolean doCheckIsOrderTemplate(long mediaId) throws Exception + { + MediaTemplate template = ORM.get(ZTable.class).item(MediaTemplate.class, mediaId); + if (template == null) + { + return false; + } + + long designId = template.getDesignId(); + if (designId <= 0) + { + return false; + } + + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, designId); + if (order == null) + { + return false; + } + + float status = order.getStatus(); + if (status >= StatusConstants.ORDER_20.value() && status < StatusConstants.ORDER_60.value()) + { + return true; + } + else + { + return false; + } + } + + /** + * 订单模板信息查询 + * + * @param request + * @throws Exception + */ + public static void doTemplateOrderQuery(HttpRequest request) throws Exception + { + request.addValidate(new IsInteger("mediaId", "模板id不存在")); + if (!request.chkValidate()) + { + return; + } + + long mediaId = request.getParameterLong("mediaId"); + MediaTemplate template = ORM.get(ZTable.class).item(MediaTemplate.class, mediaId); + if (template == null) + { + request.setResponseError("模板不存在,请重新选择"); + return; + } + + long designId = template.getDesignId(); + if (Validates.isEmpty(designId) || designId == 0 || designId == -1) + { + request.setResponseError("订单ID不存在,请重新选择"); + return; + } + + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, designId); + if (order == null) + { + request.setResponseError("订单信息不存在,请重新选择"); + return; + } + + List mediaList = ORM.get(ZView.class).list(MediaTemplateView.class, new Selector("designId", designId)); + if (mediaList.isEmpty()) + { + return; + } + + List idList = new ArrayList(); + for (MediaTemplateView media : mediaList) + { + idList.add(media.getMediaId()); + } + // svg展示图 + Map svgMap = TemplateDao.getTemplatePreview(idList); + + // 订单的客户素材 + Selector attaSel = new Selector(); + attaSel.addMust("designId", designId); + attaSel.addMust("attaModul", FileTypeConstants.FILE_CUSTOM.value()); + List attaList = ORM.get(ZTable.class).list(DesignAtta.class, attaSel); + + MapSO attrMap = new HashMapSO(); + attrMap.put("svgMap", svgMap); + attrMap.put("order", order); + attrMap.put("mediaId", mediaId); + attrMap.put("attaList", attaList); + + DesTemplateOrder desOrder = ORM.get(ZTable.class).item(DesTemplateOrder.class, designId); + if (desOrder != null && Validates.isNotEmpty(desOrder.getParamText())) + { + attrMap.put("paramText", desOrder.getParamText()); + } + + attrMap.put("desOrder", desOrder); + + String ret = ZmlContexts.parseZmlPath(request, "/zview/templateOrder/templateOrder.zml", attrMap); + request.setResponseResult(ret); + } + + /** + * 检测订单模板的版面数 + * + * @param request + * @throws Exception + */ + public static void doCheckTempatePage(HttpRequest request) throws Exception + { + request.addValidate(new IsInteger("mediaId", "未获取模板编号,请重新选择")); + if (!request.chkValidate()) + { + request.setResponseError(request.getAlertMsg()); + return; + } + + long mediaId = request.getParameterLong("mediaId"); + MediaTemplate template = ORM.get(ZTable.class).item(MediaTemplate.class, mediaId); + if (template == null) + { + request.setResponseError("模板文件不存在,请重新选择"); + return; + } + + long designId = template.getDesignId(); + if (designId <= 0) + { + request.setResponseError("未获取订单号,请重新选择"); + return; + } + + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, designId); + if (order == null) + { + request.setResponseError("未获取订单信息"); + return; + } + + // 是否有权限提交初稿 + WhetherMayLeadToDao.ergodicOpecoterCode(request, request.getSessionName(), order); + + // 后工文件检测 --caohong + String msg = OrderCheckDao.isAfterFileCheck(order); + if (!"".equals(msg)) + { + request.setResponseError(msg); + return; + } + + // 透明PVC名片,并且是印白墨后加工的情况,不判断版面数量,因为有白墨版,比较特殊 --caohong + if (order.getTypeId() == 1806070857392601L && order.getAfterNames() != null && order.getAfterNames().contains("印白墨")) + { + return; + } + + int num = ORM.get(ZTable.class).count(MediaBg.class, new Selector("mediaId", mediaId)); + if (num != order.getDesignPage() * order.getPrintKs()) + { + request.setResponseError("订单模板版面数与订单模数不一致"); + return; + } + } + + /** + * 检测订单模板的尺寸 + * + * @param request + * @throws Exception + */ + public static String doCheckTempateSize(DesignOrder order, MediaCanvas canvas) throws Exception + { + double orderWidth = order.getPrintWidth(); + double orderHeight = order.getPrintHeight(); + long typeId = order.getTypeId(); + + // pvc名片不补位特殊流程 + if (typeId == 1806070857392601L) + { + if (order.getDesignWidth() == 90 && order.getDesignHeight() == 53) + { + if (orderWidth == 0) + { + orderWidth = 90; + } + else + { + orderWidth += canvas.getBleedSize(); + } + if (orderHeight == 0) + { + orderHeight = 53; + } + else + { + orderHeight += canvas.getBleedSize(); + } + } + else if (order.getDesignWidth() == 88 && order.getDesignHeight() == 57) + { + if (orderWidth == 0) + { + orderWidth = 88.5; + } + else + { + orderWidth += canvas.getBleedSize(); + } + if (orderHeight == 0) + { + orderHeight = 57; + } + else + { + orderHeight += canvas.getBleedSize(); + } + } + else + { + if (orderWidth == 0) + { + orderWidth = 88.5; + } + else + { + orderWidth += canvas.getBleedSize(); + } + if (orderHeight == 0) + { + orderHeight = 57; + } + else + { + orderHeight += canvas.getBleedSize(); + } + } + } + else + { + if (orderWidth == 0) + { + orderWidth = order.getDesignWidth(); + } + else + { + orderWidth += canvas.getBleedSize(); + } + if (orderHeight == 0) + { + orderHeight = order.getDesignHeight(); + } + else + { + orderHeight += canvas.getBleedSize(); + } + } + + double canvasWidth = canvas.getWidthMm(); + double canvasHeight = canvas.getHeightMm(); + BigDecimal canvasW = new BigDecimal(canvasWidth); + BigDecimal canvasH = new BigDecimal(canvasHeight); + BigDecimal orderW = new BigDecimal(orderWidth); + BigDecimal orderH = new BigDecimal(orderHeight); + + if (orderW.compareTo(canvasW) != 0) + { + if (orderW.compareTo(canvasH) != 0 || orderH.compareTo(canvasW) != 0) + { + return "设计尺寸与订单尺寸不一致"; + } + } + else if (orderH.compareTo(canvasH) != 0) + { + return "设计尺寸与订单尺寸不一致"; + } + + return ""; + } + + /** + * 提交模板初稿订单,并作相应的操作
            + * 2021-9-16 caohong:增加审核流程环节,并根据规则配置是否免检直接通过 + * + * @param request + * @throws Exception + */ + @AnTransaction + public static void doSubmitDraftOrderTempalte(HttpRequest request) throws Exception + { + long mediaId = request.getParameterLong("mediaId"); + String dzmpPreviewUrl = request.getParameter("dzmpPreviewUrl");// 电子名片初稿预览url + if (mediaId == -1) + { + request.setResponseError("未获取模板编号,请重新选择"); + return; + } + + MediaTemplateView media = ORM.get(ZView.class).item(MediaTemplateView.class, new Selector("mediaId", mediaId)); + if (media == null) + { + request.setResponseError("模板文件不存在,请重新选择"); + return; + } + + long designId = media.getDesignId(); + if (designId <= 0) + { + request.setResponseError("未获取订单号,请重新选择"); + return; + } + + // 初稿可提交多次,定稿后不允许再次提交 + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, designId); + if (order == null) + { + request.setResponseError("订单不存在,请重新选择"); + return; + } + + if (order.getStatus() != StatusConstants.ORDER_30.value()) + { + request.setResponseError("请检查订单状态,再完成初稿操作"); + return; + } + + // 是否有权限提交初稿 + WhetherMayLeadToDao.ergodicOpecoterCode(request, request.getSessionName(), order); + MediaCanvas canvas = ORM.get(ZTable.class).item(MediaCanvas.class, mediaId); + // 尺寸检测需要排除电子名片产品 + if (order.getTypeId() != 2023207561256L) + { + String err = doCheckTempateSize(order, canvas); + if (!"".equals(err)) + { + request.setResponseError(err); + return; + } + } + + // 根据素材图提交初稿缩略图 + String dateDir = DateTimes.getDateTime8String(); + String rootDir = Strings.trimRight(request.getContext().getAttributeString("upload.large.rootDir"), "/"); + String draftFile = "初稿缩略图"; + String fileName = designId + "-" + "FristThumFile" + ".png"; + String draftPath = rootDir + "/" + dateDir + "/" + draftFile; + Files.mkDirectory(draftPath);// 创建目录 + + // 非电子名片产品 + if (Validates.isNotEmpty(canvas.getMediaUrl()) && order.getTypeId() != 2023207561256L) + { + File file = new File(draftPath + "/" + fileName); + String mediaUrl = MediaPathDao.parseUplUrl(canvas.getMediaUrl()); + File mediaFile = new File(mediaUrl); + Files.copyFile(mediaFile, file); + + // 插入订单附属表 + DesignAtta oa = new DesignAtta(); + oa.setAttaId(Ids.longId()); + oa.setDesignId(designId); + oa.setAttaModul(FileTypeConstants.FILE_FIRSTTHUMFILE.value()); + oa.setFileName(fileName); + oa.setFileType("png"); + oa.setFileSize(file.length()); + oa.setSavePath(draftPath + "/" + fileName); + oa.setUploadTime(Sqls.nowTimestamp()); + oa.setOperatorCode(request.getSessionName()); + ORM.get(ZTable.class).insert(oa); + } + + // 电子名片初稿生成预览二维码 + if (Validates.isNotEmptyBlank(dzmpPreviewUrl) && order.getTypeId() == 2023207561256L) + { + String previewPdfPath = draftPath + "/" + fileName; + QrcodeUtil.makeQrcode(dzmpPreviewUrl, 320, 320, draftPath, fileName); + File previewFileCard = new File(previewPdfPath); + if (previewFileCard != null) + { + // 插入订单附属表 + DesignAtta atta = new DesignAtta(); + atta.setAttaId(Ids.longId()); + atta.setAttaModul(FileTypeConstants.FILE_FIRSTTHUMFILE.value()); + atta.setDesignId(designId); + atta.setFileName(fileName); + atta.setFileType("png"); + atta.setFileSize(previewFileCard.length()); + atta.setSavePath(previewPdfPath); + atta.setUploadTime(Sqls.nowTimestamp()); + atta.setOperatorCode(request.getSessionName()); + atta.setFileid(Ids.uuid()); + + ORM.get(ZTable.class).insert(atta); + } + } + + // 查询来源模板文件ID + MediaTemplate template = ORM.get(ZTable.class).item(MediaTemplate.class, new Selector("mediaId", media.getTemplateSrc())); + // 订单模板关系表 + DesTemplateOrder tOrder = ORM.get(ZTable.class).item(DesTemplateOrder.class, designId); + if (tOrder == null) + { + DesTemplateOrder ord = new DesTemplateOrder(); + ord.setDesignId(designId); + ord.setOperatorCode(request.getSessionName()); + ord.setTypeId(order.getTypeId()); + ord.setIndustryId(order.getIndustryId()); + ord.setDesignMediaId(mediaId); + + if (template != null) + { + ord.setMediaId(template.getMediaId()); + } + + ORM.get(ZTable.class).insert(ord); + } + else + { + Updater updater = new Updater(); + updater.addMust("designId", designId); + updater.addField("designMediaId", mediaId); // 订单模板id + updater.addField("operatorCode", request.getSessionName()); + + if (template != null) + { + updater.addField("mediaId", template.getMediaId()); // 模板来源id + } + + ORM.get(ZTable.class).update(DesTemplateOrder.class, updater); + } + + // 更新设计师初稿时间、设计师订单数量 + DispatchDao.setDraftType(request.getSessionName(), order.getTypeId()); // 更新最近一次初稿时间 + + // 判断是否属于免审核规则,反之需要人工审核 + if (DesignerDao.isFreeCheck(request.getSessionName(), order.getTypeId())) + { + // 更新初稿状态 + Updater updater = new Updater(); + updater.addMust("designId", designId); + updater.addField("status", StatusConstants.ORDER_50.value()); + updater.addField("designDraftTime", Sqls.nowTimestamp()); + updater.addField("modifyTime", Sqls.nowTimestamp()); + ORM.get(ZTable.class).update(DesignOrder.class, updater); + OrderLogDao.saveOrderOperateLog(designId, StatusConstants.ORDER_50.value(), order.getDesigner(), request.getSessionName(), "完成初稿(模板设计),免审核", + EventConstants.ORDER_7.value()); + } + else + { + // 更新初稿状态 + Updater updater = new Updater(); + updater.addMust("designId", designId); + updater.addField("status", StatusConstants.ORDER_40.value()); + updater.addField("designDraftTime", Sqls.nowTimestamp()); + updater.addField("modifyTime", Sqls.nowTimestamp()); + ORM.get(ZTable.class).update(DesignOrder.class, updater); + OrderLogDao.saveOrderOperateLog(designId, StatusConstants.ORDER_40.value(), order.getDesigner(), request.getSessionName(), "完成初稿(模板设计),等待审核中", + EventConstants.ORDER_8.value()); + } + } + + /** + * 预览定稿设计文件 + * + * @param request + * @throws Exception + */ + public static void doPreviewFinalOrderTempalte(HttpRequest request) throws Exception + { + request.addValidate(new IsInteger("mediaId", "未获取模板编号")); + + if (!request.chkValidate()) + { + request.setResponseError(request.getAlertMsg()); + return; + } + + long mediaId = request.getParameterLong("mediaId"); + MediaTemplateView media = ORM.get(ZView.class).item(MediaTemplateView.class, new Selector("mediaId", mediaId)); + if (media == null) + { + request.setResponseError("模板文件不存在,请重新选择"); + return; + } + + long designId = media.getDesignId(); + if (designId <= 0) + { + request.setResponseError("未获取订单号,请重新选择"); + return; + } + + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, new Selector("designId", designId)); + if (order == null) + { + request.setResponseError("订单不存在"); + return; + } + if (order.getStatus() < StatusConstants.ORDER_10.value()) + { + request.setResponseError("订单已取消"); + return; + } + + // 初稿可提交多次,定稿后不允许再次提交 + if (order.getStatus() != StatusConstants.ORDER_50.value()) + { + request.setResponseError("该订单状态不是初稿状态,请先完成初稿操作"); + return; + } + + MediaCanvas canvas = ORM.get(ZTable.class).item(MediaCanvas.class, mediaId); + if (canvas == null) + { + request.setResponseError("素材文件不存在[mediaCanvas]"); + return; + } + + // 尺寸检测需要排除电子名片产品 + if (order.getTypeId() != 2023207561256L) + { + String err = doCheckTempateSize(order, canvas); + if (!"".equals(err)) + { + request.setResponseError(err); + return; + } + } + + int doHandle = request.getParameterInt("doHandle", 1); + if (0 == doHandle) + { + return; + } + + // 定稿素材生产成品文件,用于预览pdf和最终定稿 + String curDate = DateTimes.getDateTime8String(); + String fileName = order.getDesignId() + Ids.longId13() + ".pdf"; + String pdfPath = MediaPathDao.getTempLocalPre(curDate) + fileName; + MediaHandlePdfModel model = new MediaHandlePdfModel(canvas, -1, false, pdfPath); + MediaDao.doMediaHandleToPdf(model); + } + + /** + * 查询订单总金额 + * + * @param request + * @throws Exception + */ + public static long doQueryOrderAmount(HttpRequest request) throws Exception + { + long mediaId = request.getParameterLong("mediaId"); + MediaTemplateView media = ORM.get(ZView.class).item(MediaTemplateView.class, new Selector("mediaId", mediaId)); + if (media == null) + { + request.setResponseError("素材文件不存在[mediaCanvas]"); + return 0; + } + + long designId = media.getDesignId(); + if (designId <= 0) + { + request.setResponseError("未获取订单号!"); + return 0; + } + + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, new Selector("designId", designId)); + return order.getAmount(); + } + + /** 查询定稿预览进度 */ + public static void doQueryPreviewFinalOrderTempalteProgressing(HttpRequest request) throws Exception + { + + long mediaId = request.getParameterLong("mediaId"); + MediaTemplateView media = ORM.get(ZView.class).item(MediaTemplateView.class, new Selector("mediaId", mediaId)); + if (media == null) + { + request.setResponseError("模板文件不存在,请重新选择"); + return; + } + + long designId = media.getDesignId(); + if (designId <= 0) + { + request.setResponseError("未获取订单号,请重新选择"); + return; + } + + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, new Selector("designId", designId)); + if (order == null) + { + request.setResponseError("订单不存在"); + return; + } + + MediaHandlePdfModel model = MediaDao.doQueryMediaHandlePdfModel(mediaId, false); + String pdfUrl = null; + if (model != null && model.getHandleStatus() == 2)// 处理器处理完成 + { + // 成品文件临时预览pdf + String pdfName = Files.getFileName(model.getPdfSavePath()); + String curDate = DateTimes.getDateTime8String(); + pdfUrl = MediaPathDao.getTempUrlPre(curDate) + pdfName; + } + + long amount = order.getAmount(); + Map jsonMap = new HashMap(); + jsonMap.put("mediaId", mediaId); + jsonMap.put("url", pdfUrl); + jsonMap.put("amount", amount); + jsonMap.put("mediaHandlePdfModel", model); + request.setResponseResult(Jsons.toString(jsonMap)); + + } + + /** + * 生成订单定稿模板,并完成相应操作 + * + * @param request + * @throws Exception + */ + @AnTransaction + public static void doSubmitFinalOrderTempalte(HttpRequest request) throws Exception + { + long mediaId = request.getParameterLong("mediaId"); + if (mediaId == -1) + { + request.setResponseError("未获取模板编号,请重新选择"); + return; + } + + MediaTemplateView media = ORM.get(ZView.class).item(MediaTemplateView.class, new Selector("mediaId", mediaId)); + if (media == null) + { + request.setResponseError("模板文件不存在,请重新选择"); + return; + } + + long designId = media.getDesignId(); + if (designId <= 0) + { + request.setResponseError("未获取订单号,请重新选择"); + return; + } + + // 初稿可提交多次,定稿后不允许再次提交 + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, new Selector("designId", designId)); + if (order.getStatus() != StatusConstants.ORDER_50.value()) + { + if (order.getStatus() == StatusConstants.ORDER_52.value()) + { + request.setResponseError("该订单已定稿待审中,请勿重复操作"); + return; + } + else + { + request.setResponseError("该订单状态不是已初稿状态,请先完成初稿操作"); + return; + } + } + + // 删除之前是否已有的文件和记录 + Selector selector = new Selector(); + selector.addMust("designId", designId); + String[] attaModul = new String[] + { + FileTypeConstants.FILE_FIRSTTHUMFILE.value(), FileTypeConstants.FILE_DESGIN.value(), FileTypeConstants.FILE_END.value() + }; + selector.addMustIn("attaModul", attaModul); + List attaList = ORM.get(ZTable.class).list(DesignAtta.class, selector); + if (attaList.size() > 0) + { + for (DesignAtta atta : attaList) + { + Files.deleteFile(atta.getSavePath());// 不是网络路径 + ORM.get(ZTable.class).delete(DesignAtta.class, atta.getAttaId()); + if (Validates.isNotEmptyBlank(atta.getFileid())) + { + ORM.get(ZTable.class).delete(UpllFile.class, new Selector("fileId", atta.getFileid()).addReplace("id", null)); + } + } + } + + String dateDir = DateTimes.getDateTime8String(); + String rootDir = Strings.trimRight(request.getContext().getAttributeString("upload.large.rootDir"), "/"); + String prePath = rootDir + "/" + dateDir; + + String fileName = order.getDesignId() + "-" + order.getBuyerNick() + ".pdf"; + prePath = prePath + "/" + FileTypeConstants.FILE_END.desc(); + String imgDir = prePath; + // 目录不存在,则创建文件 + if (!Files.isDirectory(prePath)) + { + Files.mkDirectory(prePath); + } + + String pdfPath = prePath + "/" + fileName; + MediaCanvas canvas = ORM.get(ZTable.class).item(MediaCanvas.class, mediaId); + if (canvas == null) + { + request.setResponseError("素材文件不存在[mediaCanvas]"); + return; + } + + // 是否执行异步操作 + int doHandle = request.getParameterInt("doHandle", 1); + if (0 == doHandle) + { + Map dataMap = new HashMap(); + dataMap.put("fileName", fileName); + dataMap.put("rootDir", rootDir); + dataMap.put("uploadPath", dateDir + "/" + FileTypeConstants.FILE_END.desc()); + dataMap.put("pdfPath", pdfPath); + request.setResponseResult(Jsons.toString(dataMap)); + return; + } + + MediaHandlePdfModel modelT = MediaDao.doFinishMediaToPdf(mediaId); + if (modelT != null) + { + String res = afterOrderTempalte(request, modelT, pdfPath); + if (Validates.isNotEmptyBlank(res)) + { + request.setResponseError(res); + return; + } + Map jsonMap = new HashMap(); + jsonMap.put("success", "true"); + request.setResponseResult(Jsons.toString(jsonMap)); + log.info("模板[%s]使用预览PDF文件定稿成功.", modelT.getMediaId()); + } + else + { + MediaHandlePdfModel model = new MediaHandlePdfModel(canvas, -1, false, pdfPath, imgDir); + MediaDao.doMediaHandleToPdf(model); + log.info("模板[%s]重新生成PDF文件定稿.", model.getMediaId()); + } + + } + + /** + * [简要描述]:电子名片定稿
            + * [详细描述]:
            + * + * @author caohong + * @param httpRequest + * @throws SQLException + * @throws ORMException + */ + public static void doSubmitFinalOrderCard(HttpRequest request) throws Exception + { + long designId = request.getParameterLong("designId"); + String operatorCode = request.getSessionName(); + String url = request.getParameter("url"); + // String previewUrl = request.getParameter("previewUrl"); //预览码在初稿环节处理 + // 初稿可提交多次,定稿后不允许再次提交 + DesignSelfView order = ORM.get(ZView.class).item(DesignSelfView.class, new Selector("designId", designId)); + if (order.getStatus() != StatusConstants.ORDER_50.value()) + { + if (order.getStatus() == StatusConstants.ORDER_52.value()) + { + request.setResponseError("该订单已定稿待审中,请勿重复操作"); + return; + } + else + { + request.setResponseError("该订单状态不是已初稿状态,请先完成初稿操作"); + return; + } + } + + Selector sel = new Selector(); + sel.addMust("designId", designId); + sel.addMust("attaModul", FileTypeConstants.FILE_DESGIN.value()); + List des_attaList = ORM.get(ZTable.class).list(DesignAtta.class, sel); + if (des_attaList.size() == 0) + { + request.setResponseError("请在订单列表上传设计文件之后再完成定稿操作"); + return; + + } + + // 删除之前是否已有的文件和记录 + Selector selector = new Selector(); + selector.addMust("designId", designId); + selector.addMust("attaModul", FileTypeConstants.FILE_END.value()); + List attaList = ORM.get(ZTable.class).list(DesignAtta.class, selector); + if (attaList.size() > 0) + { + for (DesignAtta atta : attaList) + { + Files.deleteFile(atta.getSavePath());// 不是网络路径 + ORM.get(ZTable.class).delete(DesignAtta.class, atta.getAttaId()); + } + } + + // 定稿素材生产成品文件,用于预览pdf和最终定稿 + String curDate = DateTimes.getDateTime8String(); + String prePath = MediaPathDao.getTempLocalPre(curDate); + String fileName = order.getDesignId() + "-" + order.getBuyerNick() + "-定稿码.png"; + prePath = prePath + FileTypeConstants.FILE_END.desc(); + // 目录不存在,则创建文件 + if (!Files.isDirectory(prePath)) + { + Files.mkDirectory(prePath); + } + + String pdfPath = prePath + "/" + fileName; + + // 生成二维码成品文件 + QrcodeUtil.makeQrcode(url, 320, 320, prePath, fileName); + File fileCard = new File(pdfPath); + if (fileCard != null) + { + // 插入订单附属表 + DesignAtta atta = new DesignAtta(); + atta.setAttaId(Ids.longId()); + atta.setAttaModul(FileTypeConstants.FILE_END.value()); + atta.setDesignId(designId); + atta.setFileName(fileName); + atta.setFileType("png"); + atta.setFileSize(fileCard.length()); + atta.setSavePath(pdfPath); + atta.setUploadTime(Sqls.nowTimestamp()); + atta.setOperatorCode(operatorCode); + atta.setFileid(Ids.uuid()); + + ORM.get(ZTable.class).insert(atta); + } + + // 更新初稿状态,定稿时间 + // 判断是否属于免审核规则,反之需要人工审核 caohong 2021-9-16 + // 加急单必走审核 hc 2021-10-21 + if (DesignerDao.isFreeCheck(request.getSessionName(), order.getTypeId()) && !order.isUrgent()) + { + Updater desUpdater = new Updater(); + desUpdater.addMust("designId", designId); + desUpdater.addField("status", StatusConstants.ORDER_55.value()); + desUpdater.addField("modifyTime", Sqls.nowTimestamp()); + desUpdater.addField("designEndTime", Sqls.nowTimestamp()); + ORM.get(ZTable.class).update(DesignOrder.class, desUpdater); + + OrderLogDao.saveOrderOperateLog(designId, StatusConstants.ORDER_55.value(), order.getDesigner(), request.getSessionName(), "完成定稿(模板设计),免审核", + EventConstants.ORDER_9.value()); + // 定稿触发设计师积分计算 + ScoreDesignerRecordDao.finishDesign(order); + + // 定稿触发设计师虚拟账户资金计算 + if (order.getDraftType() < DraftConstants.DRAFT_TEMPLATE.value() || order.getDraftType() > DraftConstants.DRAFT_PAGE_DESIGN.value()) + {// 排除标准自来稿 + return; + } + int status = Integer.parseInt(VirtualAccountConstants.TRANSACTION_STATUS_4.value()); + boolean finishDesign = VirtualAccountDao.finishDesign(order, order.getDesigner(), status); + if (!finishDesign) + { + request.setResponseError(operatorCode + ":【" + order.getDesignId() + "】完成定稿计算设计费失败"); + log.error(operatorCode + ":【" + order.getDesignId() + "】完成定稿计算设计费失败"); + return; + } + } + else + { + // 修改定稿状态 + Updater updater = new Updater(); + updater.addMust("designId", designId); + updater.addField("status", StatusConstants.ORDER_52.value()); + updater.addField("modifyTime", Sqls.nowTimestamp()); + ORM.get(ZTable.class).update(DesignOrder.class, updater); + + OrderLogDao.saveOrderOperateLog(designId, StatusConstants.ORDER_52.value(), order.getDesigner(), request.getSessionName(), "完成定稿(模板设计),等待审核中", + EventConstants.ORDER_13.value()); + } + + } + + /** 查询定稿进度 */ + @AnTransaction + public static void doQueryFinalOrderTemplateProgressing(HttpRequest request) throws Exception + { + long mediaId = request.getParameterLong("mediaId"); + + MediaHandlePdfModel model = MediaDao.doQueryMediaHandlePdfModel(mediaId, false); + if (model != null) + { + String res = afterOrderTempalte(request, model, model.getPdfSavePath()); + if (Validates.isNotEmptyBlank(res)) + { + request.setResponseError(res); + return; + } + } + Map jsonMap = new HashMap(); + jsonMap.put("mediaHandlePdfModel", model); + request.setResponseResult(Jsons.toString(jsonMap)); + } + + private static String afterOrderTempalte(HttpRequest request, MediaHandlePdfModel model, String pdfPath) throws Exception + { + if (model == null || model.getHandleStatus() != 2) + { + return null; + } + long mediaId = model.getMediaId(); + MediaTemplateView media = ORM.get(ZView.class).item(MediaTemplateView.class, new Selector("mediaId", mediaId)); + if (media == null) + { + return "模板文件不存在,请重新选择"; + } + + long designId = media.getDesignId(); + // 初稿可提交多次,不是定稿状态 不允许提交 + DesignSelfView order = ORM.get(ZView.class).item(DesignSelfView.class, new Selector("designId", designId)); + if (order.getStatus() != StatusConstants.ORDER_50.value()) + { + if (order.getStatus() == StatusConstants.ORDER_52.value()) + { + return "该订单已定稿待审中,请勿重复操作"; + } + else + { + return "该订单状态不是已初稿状态,请先完成初稿操作"; + } + } + + // 生成文件路径 + String rootDir = Strings.trimRight(request.getContext().getAttributeString("upload.large.rootDir"), "/"); + String dateDir = DateTimes.getDateTime8String(); + String prePath = rootDir + "/" + dateDir; + + String thumFileName = order.getDesignId() + "-" + "ThumFile" + ".png"; + String thumPath = prePath + "/" + FileTypeConstants.FILE_FIRSTTHUMFILE.desc(); + + if (!model.getPdfSavePath().equalsIgnoreCase(pdfPath)) + { + boolean copyFlag = Files.copyFile(model.getPdfSavePath(), pdfPath); + if (!copyFlag) + { + return "生成PDF文件错误,请重新此操作."; + } + } + // 目录不存在,则创建文件 + if (!Files.isDirectory(thumPath)) + { + Files.mkDirectory(thumPath); + } + + thumPath += "/" + thumFileName; + List imgList = model.getImgPathList(); + if (imgList == null || imgList.size() == 0) + { + imgList = new ArrayList<>(); + Document document = new Document(); + document.setFile(pdfPath); + float scale = 2f; + float rotation = 0f; + try + { + BufferedImage image = document.getPageImage(0, GraphicsRenderingHints.SCREEN, Page.BOUNDARY_CROPBOX, rotation, scale); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + ImageIO.write(image, "png", out); + byte[] imgb = out.toByteArray(); + Files.write(thumPath, imgb); + imgList.add(thumPath); + } + catch (Exception e) + { + return "生成初稿缩略图失败,请重新操作"; + } + document.dispose(); + } + if (!thumPath.equalsIgnoreCase(imgList.get(0)) && !Files.copyFile(imgList.get(0), thumPath)) + { + return "生成初稿缩略图失败,请重新操作"; + } + + // 生成设计文件.svg + String designfileName = order.getDesignId() + "-" + order.getBuyerNick() + ".svg"; + String designPath = prePath + "/设计文件"; + // 目录不存在,则创建文件 + if (!Files.isDirectory(designPath)) + { + Files.mkDirectory(designPath); + } + + designPath += "/" + designfileName; + + MediaCanvas canvas = ORM.get(ZTable.class).item(MediaCanvas.class, mediaId); + + double fullWidth = canvas.getFullWidth(); + double fullHeight = canvas.getFullHeight(); + + String content = MediaDao.toSvgFileContent(mediaId, designPath, order.getDesignWidth(), order.getDesignHeight(), fullWidth, fullHeight, null, null, + null, "SVG"); + boolean isSuccess = Files.writeUTF8(designPath, content); + if (!isSuccess) + { + return "生成设计文件失败,请重新选择"; + } + + String pdfName = Files.getFileName(pdfPath); + // 订单定稿相关操作 订单保存初稿、设计、成品文件 + TemplateDao.doSaveTemplateOrderFile(designId, request.getSessionName(), pdfPath, pdfName, designPath, designfileName, thumPath, thumFileName); + + // 文件审核 + String ret = OrderCheckDao.doCheckFile(designId, pdfName, FileTypeConstants.FILE_END.value()); + if (Validates.isNotEmpty(ret)) + {// 审核失败,删除成品文件 + OrderCheckDao.doDeleteEndFile(designId); + OrderLogDao.saveOrderOperateLog(designId, request.getSessionName(), "文件审核失败自动删除", EventConstants.ORDER_16.value()); + return ret; + } + // 查询原模板文件ID + long mediaSrcId = media.getTemplateSrc(); + MediaTemplate templateSrc = ORM.get(ZTable.class).item(MediaTemplate.class, new Selector("mediaId", mediaSrcId)); + + // 订单模板关系表 + DesTemplateOrder tOrder = ORM.get(ZTable.class).item(DesTemplateOrder.class, designId); + if (tOrder == null) + { + tOrder = new DesTemplateOrder(); + tOrder.setDesignId(designId); + tOrder.setOperatorCode(request.getSessionName()); + tOrder.setTypeId(order.getTypeId()); + tOrder.setIndustryId(order.getIndustryId()); + tOrder.setDesignMediaId(mediaId); // 订单模板id + + if (templateSrc != null) + { + tOrder.setMediaId(mediaSrcId); // 模板复制来源ID + } + + ORM.get(ZTable.class).insert(tOrder); + } + else + { + Updater updater = new Updater(); + updater.addMust("designId", designId); + updater.addField("designMediaId", mediaId); + updater.addField("operatorCode", request.getSessionName()); + + if (templateSrc != null) + { + updater.addField("mediaId", mediaSrcId); + } + + ORM.get(ZTable.class).update(DesTemplateOrder.class, updater); + } + + // 定稿不再添加模板分数 + // 模板状态改为订单模板80及修改模板为不可编辑相关操作,电子名片除外 + if (order.getTypeId() != 2023207561256L) + { + TemplateDao.doTemplateOrderCompleteExec(designId, mediaId); + } + + // 判断是否属于免审核规则,反之需要人工审核 caohong 2021-9-16 + if (DesignerDao.isFreeCheck(request.getSessionName(), order.getTypeId())) + { + // 修改定稿状态 + Updater updater = new Updater(); + updater.addMust("designId", designId); + updater.addField("designEndTime", Sqls.nowTimestamp()); + updater.addField("status", StatusConstants.ORDER_55.value()); + updater.addField("modifyTime", Sqls.nowTimestamp()); + ORM.get(ZTable.class).update(DesignOrder.class, updater); + + OrderLogDao.saveOrderOperateLog(designId, StatusConstants.ORDER_55.value(), order.getDesigner(), request.getSessionName(), "完成定稿(模板设计),免审核", + EventConstants.ORDER_9.value()); + + // 定稿触发设计师积分 奖励 + ScoreDesignerRecordDao.finishDesign(order); + + // 定稿触发设计师佣金 奖励 + boolean finishDesign = VirtualAccountDao.finishDesign(order, order.getDesigner(), + Integer.parseInt(VirtualAccountConstants.TRANSACTION_STATUS_4.value())); + if (!finishDesign) + { + request.setResponseError("完成定稿失败,设计费计算错误"); + log.error(request.getSessionName() + ":【" + order.getDesignId() + "】完成定稿失败,设计费计算错误"); + } + } + else + { + // 修改定稿状态 + Updater updater = new Updater(); + updater.addMust("designId", designId); + updater.addField("status", StatusConstants.ORDER_52.value()); + updater.addField("modifyTime", Sqls.nowTimestamp()); + ORM.get(ZTable.class).update(DesignOrder.class, updater); + + OrderLogDao.saveOrderOperateLog(designId, StatusConstants.ORDER_52.value(), order.getDesigner(), request.getSessionName(), "完成定稿(模板设计),等待审核中", + EventConstants.ORDER_13.value()); + } + + return null; + } + + /** 客户端完成定稿上传,回调更新 */ + @AnTransaction + public static void doSubmitFinalLocalSave(HttpRequest request) throws Exception + { + long mediaId = request.getParameterLong("mediaId"); + + MediaTemplateView media = ORM.get(ZView.class).item(MediaTemplateView.class, new Selector("mediaId", mediaId)); + if (media == null) + { + request.setResponseError("模板文件不存在,请重新选择"); + return; + } + + long designId = media.getDesignId(); + // 初稿可提交多次,不是定稿状态 不允许提交 + DesignSelfView order = ORM.get(ZView.class).item(DesignSelfView.class, new Selector("designId", designId)); + if (order.getStatus() != StatusConstants.ORDER_50.value()) + { + request.setResponseError("该订单状态不是初稿状态,请先完成初稿操作"); + return; + } + + // 生成文件路径 + String rootDir = Strings.trimRight(request.getContext().getAttributeString("upload.large.rootDir"), "/"); + String dateDir = DateTimes.getDateTime8String(); + String prePath = rootDir + "/" + dateDir; + + String thumFileName = order.getDesignId() + "-" + "ThumFile" + ".png"; + String thumPath = prePath + "/" + FileTypeConstants.FILE_FIRSTTHUMFILE.desc(); + + // 目录不存在,则创建文件 + if (!Files.isDirectory(thumPath)) + { + Files.mkDirectory(thumPath); + } + + thumPath += "/" + thumFileName; + String imgPath = request.getParameter("mediaUrl"); + if (!Files.copyFile(imgPath, thumPath)) + { + request.setResponseError("生成初稿缩略图失败,请重新选择"); + return; + } + + // 生成设计文件.svg + String designfileName = order.getDesignId() + "-" + order.getBuyerNick() + ".svg"; + String designPath = prePath + "/设计文件"; + // 目录不存在,则创建文件 + if (!Files.isDirectory(designPath)) + { + Files.mkDirectory(designPath); + } + + designPath += "/" + designfileName; + + MediaCanvas canvas = ORM.get(ZTable.class).item(MediaCanvas.class, mediaId); + + double fullWidth = canvas.getFullWidth(); + double fullHeight = canvas.getFullHeight(); + + String content = MediaDao.toSvgFileContent(mediaId, designPath, order.getDesignWidth(), order.getDesignHeight(), fullWidth, fullHeight, null, null, + null, "SVG"); + boolean isSuccess = Files.writeUTF8(designPath, content); + if (!isSuccess) + { + request.setResponseError("生成设计文件失败,请重新选择"); + return; + } + + // 生成 PDF 文件(处理器已生成) + String pdfPath = request.getParameter("pdfPath"); + String pdfName = Files.getFileName(pdfPath); + // 订单定稿相关操作 订单保存初稿、设计、成品文件 + TemplateDao.doSaveTemplateOrderFile(designId, request.getSessionName(), pdfPath, pdfName, designPath, designfileName, thumPath, thumFileName); + + // 文件审核 + String ret = OrderCheckDao.doCheckFile(designId, pdfName, FileTypeConstants.FILE_END.value()); + if (Validates.isNotEmpty(ret)) + {// 审核失败,删除成品文件 + + OrderCheckDao.doDeleteEndFile(designId); + OrderLogDao.saveOrderOperateLog(designId, request.getSessionName(), "文件审核失败自动删除", EventConstants.ORDER_16.value()); + request.setResponseError(ret); + return; + } + // 查询原模板文件ID + long mediaSrcId = media.getTemplateSrc(); + MediaTemplate templateSrc = ORM.get(ZTable.class).item(MediaTemplate.class, new Selector("mediaId", mediaSrcId)); + + // 订单模板关系表 + DesTemplateOrder tOrder = ORM.get(ZTable.class).item(DesTemplateOrder.class, designId); + if (tOrder == null) + { + tOrder = new DesTemplateOrder(); + tOrder.setDesignId(designId); + tOrder.setOperatorCode(request.getSessionName()); + tOrder.setTypeId(order.getTypeId()); + tOrder.setIndustryId(order.getIndustryId()); + tOrder.setDesignMediaId(mediaId); // 订单模板id + + if (templateSrc != null) + { + tOrder.setMediaId(mediaSrcId); // 模板复制来源ID + } + + ORM.get(ZTable.class).insert(tOrder); + } + else + { + Updater updater = new Updater(); + updater.addMust("designId", designId); + updater.addField("designMediaId", mediaId); + updater.addField("operatorCode", request.getSessionName()); + + if (templateSrc != null) + { + updater.addField("mediaId", mediaSrcId); + } + + ORM.get(ZTable.class).update(DesTemplateOrder.class, updater); + } + + // 定稿不再计算模板分数 + // 模板状态改为订单模板80及修改模板为不可编辑相关操作,电子名片除外 + if (order.getTypeId() != 2023207561256L) + { + TemplateDao.doTemplateOrderCompleteExec(designId, mediaId); + } + + // 判断是否属于免审核规则,反之需要人工审核 caohong 2021-9-16 + if (DesignerDao.isFreeCheck(request.getSessionName(), order.getTypeId())) + { + // 修改定稿状态 + Updater updater = new Updater(); + updater.addMust("designId", designId); + updater.addField("designEndTime", Sqls.nowTimestamp()); + updater.addField("status", StatusConstants.ORDER_55.value()); + updater.addField("modifyTime", Sqls.nowTimestamp()); + ORM.get(ZTable.class).update(DesignOrder.class, updater); + + OrderLogDao.saveOrderOperateLog(designId, StatusConstants.ORDER_55.value(), order.getDesigner(), request.getSessionName(), "完成定稿(模板设计),免审核", + EventConstants.ORDER_9.value()); + + // 定稿触发设计师积分 奖励 + ScoreDesignerRecordDao.finishDesign(order); + + // 定稿触发设计师佣金 奖励 + boolean finishDesign = VirtualAccountDao.finishDesign(order, order.getDesigner(), + Integer.parseInt(VirtualAccountConstants.TRANSACTION_STATUS_4.value())); + if (!finishDesign) + { + request.setResponseError("完成定稿失败,设计费计算错误"); + log.error(request.getSessionName() + ":【" + order.getDesignId() + "】完成定稿失败,设计费计算错误"); + } + } + else + { + // 修改定稿状态 + Updater updater = new Updater(); + updater.addMust("designId", designId); + updater.addField("status", StatusConstants.ORDER_52.value()); + updater.addField("modifyTime", Sqls.nowTimestamp()); + ORM.get(ZTable.class).update(DesignOrder.class, updater); + + OrderLogDao.saveOrderOperateLog(designId, StatusConstants.ORDER_52.value(), order.getDesigner(), request.getSessionName(), "上传文件提交定稿,等待审核中", + EventConstants.ORDER_13.value()); + } + + } + + /** + * 订单标签信息查询 + * + * @param request + * @throws Exception + */ + public static void doTemplateOrderLabelQuery(HttpRequest request) throws Exception + { + request.addValidate(new IsInteger("mediaId", "模板id不存在")); + if (!request.chkValidate()) + { + return; + } + + long mediaId = request.getParameterLong("mediaId"); + MediaTemplate template = ORM.get(ZTable.class).item(MediaTemplate.class, mediaId); + if (template == null) + { + request.setResponseError("模板不存在,请重新选择"); + return; + } + + long designId = template.getDesignId(); + if (Validates.isEmpty(designId) || designId == 0 || designId == -1) + { + request.setResponseError("订单ID不存在,请重新选择"); + return; + } + DesignSelfView order = ORM.get(ZView.class).item(DesignSelfView.class, new Selector().addMust("designId", designId)); + if (order == null) + { + request.setResponseError("订单信息不存在,请重新选择"); + return; + } + MapSO attrMap = new HashMapSO(); + attrMap.put("order", order); + attrMap.put("mediaId", mediaId); + String ret = ZmlContexts.parseZmlPath(request, "/zview/templateOrder/templateOrderLabel.zml", attrMap); + request.setResponseResult(ret); + } + + /** + * 根据输入的行业关键字查询主行业 + * + * @param request + * @throws Exception + */ + public void doQueryIndustryByKey(HttpRequest request) throws Exception + { + String industryKey = request.getParameter("industryKey"); + long designId = request.getParameterLong("labelOid"); + String unmatchkey = request.getParameter("unmatchkey", ""); + if (Validates.isEmpty(industryKey)) + { + request.setResponseError("请输入行业关键词"); + return; + } + if (designId < 0) + { + request.setResponseError("订单ID为空"); + return; + } + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, new Selector("designId", designId)); + if (Validates.isEmpty(order)) + { + request.setResponseError("订单不存在"); + return; + } + + List industries = Global.get(DesignIndustryCache.class).getIndustryList(); + List industryList = new ArrayList(); + boolean isQT = false;// 判断是否匹配到了其他行业 + for (DesignIndustry designIndustry : industries) + { + if (Validates.isNotEmpty(designIndustry.getIndustryKeywords())) + { + // 统一转换成大写英文字母进行判断 + if (designIndustry.getIndustryKeywords().toUpperCase().contains(industryKey.toUpperCase())) + { + industryList.add(designIndustry); + } + } + } + if (Validates.isNotEmpty(industryList) && industryList.size() == 1) + { + if ("其它行业".equals(industryList.get(0).getIndustryName())) + { + isQT = true; + } + } + // 如果未匹配到行业则默认使用其他行业 + if (Validates.isEmpty(industryList) || isQT) + { + // 保存未匹配的关键词 + String[] unmatchkeys = unmatchkey.split(","); + boolean isExit = false; + for (String string : unmatchkeys) + { + if (industryKey.equals(string)) + { + isExit = true; + } + } + if (!isExit) + { + if ("".equals(unmatchkey)) + { + unmatchkey = industryKey; + } + else + { + unmatchkey = unmatchkey + "," + industryKey; + } + } + DesignIndustry industry = Global.get(DesignIndustryCache.class).queryIndustryByName("其它行业"); + if (Validates.isNotEmpty(industry) && !isQT) + { + industryList.add(Global.get(DesignIndustryCache.class).getIndustry(industry.getIndustryId())); + } + } + List recommendIndustryList = matchRecommendIndustryList(industryKey); + recommendIndustryList = excludeExist(industryList, recommendIndustryList); + + Map map = new HashMap<>(); + map.put("industrys", industryList); + map.put("recommendIndustryList", recommendIndustryList); + map.put("unmatchkey", unmatchkey); + request.setResponseResult(Jsons.toString(map)); + } + + /** + * 用于连续双字匹配推荐行业并返回DesignIndustry集合 + * + * @param keyword 需要匹配的关键词 + * @return java.util.List + * @author HuangZhiGao + * @date 2020/3/4 16:41 + * @description 截取连续双字匹配成功的追加到返回集合,均未符合追加要求则最后默认返回[其他行业] + */ + public static List matchRecommendIndustryList(String keyword) throws Exception + { + // 获取所有可用行业 + List industries = Global.get(DesignIndustryCache.class).getIndustryList(); + + List recommendIndustryList = new ArrayList(); + Map chkRepeatMap = new HashMap(); + if (Validates.isNotEmptyBlank(keyword)) + { + char[] kwChars = keyword.toCharArray(); + // 关键词长度大于等于2时截取连续双字进行匹配 + if (kwChars.length >= 2) + { + for (int i = 0; i < kwChars.length; i++) + { + String tempPhrase = ""; + if (i < (kwChars.length - 1)) + { + tempPhrase = String.valueOf(kwChars[i]) + String.valueOf(kwChars[i + 1]); + for (DesignIndustry designIndustry : industries) + { + if (Validates.isNotEmpty(designIndustry.getIndustryKeywords())) + { + // 统一转换成大写英文字母进行判断 + if (designIndustry.getIndustryKeywords().toUpperCase().contains(tempPhrase.toUpperCase())) + { + chkRepeatMap.put(designIndustry.getIndustryId(), designIndustry); + } + } + } + } + } + } + + // 关键词长度等于1时进行单字匹配 + if (kwChars.length == 1) + { + for (DesignIndustry designIndustry : industries) + { + if (Validates.isNotEmpty(designIndustry.getIndustryKeywords())) + { + // 统一转换成大写英文字母进行判断 + if (designIndustry.getIndustryKeywords().toUpperCase().contains(String.valueOf(kwChars[0]).toUpperCase())) + { + chkRepeatMap.put(designIndustry.getIndustryId(), designIndustry); + } + } + } + } + recommendIndustryList = new ArrayList(chkRepeatMap.values()); + } + + // 匹配关键字为空或者最后匹配出的推荐行业集合为空则返回其他行业 + if (Validates.isEmptyBlank(keyword) || Validates.isEmpty(recommendIndustryList)) + { + DesignIndustry industry = Global.get(DesignIndustryCache.class).queryIndustryByName("其它行业"); + if (Validates.isNotEmpty(industry)) + { + recommendIndustryList.add(Global.get(DesignIndustryCache.class).getIndustry(industry.getIndustryId())); + } + } + return recommendIndustryList; + } + + /** + * 排除推荐行业中主行业已有的行业 + * + * @param mainIndustryList 主行业集合 + * @param recommendIndustryList 推荐行业集合 + * @return java.util.List + * @author HuangZhiGao + * @date 2020/3/5 11:04 + */ + public static List excludeExist(List mainIndustryList, List recommendIndustryList) + { + for (DesignIndustry mainIndustry : mainIndustryList) + { + // 使用迭代器遍历删除 + Iterator iterator = recommendIndustryList.iterator(); + while (iterator.hasNext()) + { + DesignIndustry industry = iterator.next(); + if (mainIndustry.getIndustryId() == industry.getIndustryId()) + { + iterator.remove(); + } + } + } + return recommendIndustryList; + } + + /** + * 根据输入的行业关查询标签 + * + * @param request + * @throws Exception + */ + public void doQueryIndustryLabel(HttpRequest request) throws Exception + { + long industryId = request.getParameterLong("industryId"); + if (industryId < 0) + { + request.setResponseError("行业不存在"); + return; + } + List labels = Global.get(IndustryLabelCache.class).getIndustryLabelList(); + List labelList = new ArrayList<>(); + for (IndustryLabelModel label : labels) + { + if (label.getIndustryId() == industryId) + { + labelList.add(label); + } + } + Map map = new HashMap<>(); + map.put("labelList", labelList); + map.put("dimensionList", Global.get(LabelDimensionCache.class).getDimensionAll()); + request.setResponseResult(Jsons.toString(map)); + } + + /** + * 保存标签 + * + * @param request + * @throws Exception + */ + @AnTransaction + public void doSaveIndustryLabel(HttpRequest request) throws Exception + { + long labelOid = request.getParameterLong("labelOid");// 订单ID + long industryId = request.getParameterLong("industryId");// 主行业ID + int consumerType = request.getParameterInt("consumerType", 0);// 客户类型ID + long subIndustryId = request.getParameterLong("subIndustryId");// 子行业ID + long applicationScenarioId = request.getParameterLong("applicationScenarioId");// 应用场景ID + long designStyleId = request.getParameterLong("designStyleId");// 设计风格ID + String unmatchkey = request.getParameter("unmatchkey", ""); + int flag = request.getParameterInt("flag", 0); + if (flag == 1) + { + if (consumerType <= 0) + { + request.setResponseError("请选择客户类型"); + return; + } + if (industryId < 0) + { + request.setResponseError("请选择主行业"); + return; + } + if (subIndustryId < 0) + { + request.setResponseError("请选择子行业"); + return; + } + if (applicationScenarioId < 0) + { + request.setResponseError("请选择应用场景"); + return; + } + } + if (labelOid <= 0) + { + request.setResponseError("订单号错误"); + return; + } + DesignSelfView order = ORM.get(ZView.class).item(DesignSelfView.class, new Selector("designId", labelOid)); + if (Validates.isEmpty(order)) + { + request.setResponseError("订单不存在"); + return; + } + long beginTime = System.currentTimeMillis(); + Map labMap = Global.get(IndustryLabelCache.class).mapAll(); + long endTime = System.currentTimeMillis(); + log.info("IndustryLabelModel保存处理器[" + labelOid + "]处理中,共耗时[%s]秒", Maths.division((endTime - beginTime), 1000, 3)); + long beginTime1 = System.currentTimeMillis(); + Map industryMap = Global.get(DesignIndustryCache.class).mapAll(); + long endTime1 = System.currentTimeMillis(); + log.info("DesignIndustry保存处理器[" + labelOid + "]处理中,共耗时[%s]秒", Maths.division((endTime1 - beginTime1), 1000, 3)); + long beginTime2 = System.currentTimeMillis(); + Map ctMap = Global.get(CustomerTypeCache.class).map(); + long endTime2 = System.currentTimeMillis(); + log.info("CustomerTypeCacheModel保存处理器[" + labelOid + "]处理中,共耗时[%s]秒", Maths.division((endTime2 - beginTime2), 1000, 3)); + if (industryId > 0 && !industryMap.containsKey(industryId)) + { + request.setResponseError("该行业已被删除或者已被停用"); + return; + } + if (subIndustryId > 0 && !labMap.containsKey(subIndustryId)) + { + request.setResponseError("该子行业已被删除或者已被停用"); + return; + } + if (applicationScenarioId > 0 && !labMap.containsKey(applicationScenarioId)) + { + request.setResponseError("该应用场景已被删除或者已被停用"); + return; + } + if (designStyleId > 0 && !labMap.containsKey(designStyleId)) + { + request.setResponseError("该设计风格已被删除或者已被停用"); + return; + } + + if (consumerType > 0 && !ctMap.containsKey(consumerType)) + { + request.setResponseError("该客户类型已被删除或者已被停用"); + return; + } + // 修改订单标签 :主行业:美容妆饰,客户类型:渠道商,子行业:理发,应用场景:舞会,设计风格:欧美风 + StringBuffer labelIds = new StringBuffer("");// 拼接标签id + StringBuffer logText = new StringBuffer("修改订单标签 :");// 拼接日志信息 + boolean defaultLabel = order.isDefaultLabel();// 是否选用了原订单行业标签 + + if (industryId > 0 && order.getIndustryId() != industryId) + { + logText.append("主行业:"); + logText.append(Global.get(DesignIndustryCache.class).mapAll().get(industryId).getIndustryName()); + logText.append(","); + ORM.get(ZTable.class).update(DesignOrder.class, new Updater().addMust("designId", labelOid).addField("industryId", industryId)); + defaultLabel = false; + } + else + {// 未选择行业默认原订单行业 + logText.append("主行业:"); + logText.append(Global.get(DesignIndustryCache.class).mapAll().get(order.getIndustryId()).getIndustryName()); + logText.append(","); + } + + Updater updater = new Updater(); + updater.addMust("designId", labelOid); + updater.addField("consumerType", consumerType); + if (consumerType > 0) + { + logText.append("客户类型:"); + logText.append(Global.get(CustomerTypeCache.class).getCustomerTypeName(consumerType)); + logText.append(","); + } + else + { + logText.append("客户类型:,"); + } + + if (subIndustryId > 0) + { + labelIds.append("," + subIndustryId); + logText.append("子行业:"); + logText.append(labMap.get(subIndustryId).getLabelName()); + logText.append(","); + defaultLabel = false; + } + else + { + logText.append("子行业:,"); + } + + if (applicationScenarioId > 0) + { + labelIds.append("," + applicationScenarioId); + logText.append("应用场景:"); + logText.append(labMap.get(applicationScenarioId).getLabelName()); + logText.append(","); + defaultLabel = false; + } + else + { + logText.append("应用场景:,"); + } + + if (designStyleId > 0) + { + labelIds.append("," + designStyleId); + logText.append("设计风格:"); + logText.append(labMap.get(designStyleId).getLabelName()); + logText.append(","); + defaultLabel = false; + } + else + { + logText.append("设计风格:,"); + } + + updater.addField("defaultLabel", defaultLabel); + String labelIdsStr = Strings.trim(labelIds.toString(), ",", ","); + updater.addField("labelIds", labelIdsStr); + + // 更新订单扩展表的标签字段 + ORM.get(ZTable.class).update(SelfOrder.class, updater); + // 增加订单操作日志 + if (!"修改订单标签 :".equals(logText.toString())) + { + logText.append("未匹配的关键词:"); + logText.append(unmatchkey); + OrderLogDao.saveOrderOperateLog(labelOid, request.getSessionName(), logText.toString(), EventConstants.ORDER_31.value()); + if (!BusinessPlatformClientUtil.addUserOrderTag(labelOid, industryId, consumerType, subIndustryId, applicationScenarioId, designStyleId, + request.getSessionName())) + { + throw new Exception("运营平台增加标签失败"); + } + if (!BusinessPlatformClientUtil.addUserOrderTagLog(labelOid, logText.toString(), request.getSessionName())) + { + throw new Exception("运营平台增加标签日志失败"); + } + } + + } + + /** + * 提交定稿时对订单标签进行检查 + * + * @param request + * @throws Exception + */ + public void doPreviewFinalOrderTempalteCheckLabel(HttpRequest request) throws Exception + { + long mediaId = request.getParameterLong("mediaId"); + if (mediaId < 0) + { + request.setResponseError("模板ID不存在"); + return; + } + MediaTemplate template = ORM.get(ZTable.class).item(MediaTemplate.class, new Selector("mediaId", mediaId)); + if (Validates.isEmpty(template)) + { + request.setResponseError("模板不存在"); + return; + } + if (Validates.isEmpty(template.getDesignId())) + { + request.setResponseError("模板无关联的订单"); + return; + } + DesignSelfView order = ORM.get(ZView.class).item(DesignSelfView.class, new Selector("designId", template.getDesignId())); + if (Validates.isEmpty(order)) + { + request.setResponseError("订单不存在"); + return; + } + boolean flag = true; + if (order.getConsumerType() == 0 || order.getLabelIds() == null) + { + flag = false; + } + else + { + Map labelMap = Global.get(IndustryLabelCache.class).mapAll(); + Map ldMap = Global.get(LabelDimensionCache.class).mapAll(); + String subIndustryDimensionId = "";// 子行业维度ID + String applicationScenarioDimensionId = "";// 应用场景维度ID + // String designStyleDimensionId = "";// 设计风格维度ID + for (LabelDimensionModel ldModel : ldMap.values()) + { + if ("子行业".equals(ldModel.getDimensionName())) + { + subIndustryDimensionId = ldModel.getDimensionId(); + } + if ("应用场景".equals(ldModel.getDimensionName())) + { + applicationScenarioDimensionId = ldModel.getDimensionId(); + } + } + String ordSubIndustry = "";// 订单子行业 + String ordApplicationScenario = "";// 订单应用场景 + // String ordDesignStyle = "";// 订单设计风格 + String[] ordLabels = order.getLabelIds().split(","); + for (String labelId : ordLabels) + { + if (Validates.isNotEmpty(labelId)) + { + IndustryLabelModel model = labelMap.get(Long.valueOf(labelId)); + if (Validates.isNotEmpty(model) && Validates.isNotEmpty(subIndustryDimensionId) && subIndustryDimensionId.equals(model.getDimensionId())) + { + ordSubIndustry = model.getLabelName(); + } + if (Validates.isNotEmpty(model) && Validates.isNotEmpty(applicationScenarioDimensionId) + && applicationScenarioDimensionId.equals(model.getDimensionId())) + { + ordApplicationScenario = model.getLabelName(); + } + } + } + if (Validates.isEmpty(ordSubIndustry) || Validates.isEmpty(ordApplicationScenario)) + { + flag = false; + } + } + Map map = new HashMap<>(); + map.put("flag", flag); + map.put("designId", order.getDesignId()); + request.setResponseResult(Jsons.toString(map)); + } + + /** + * 初稿页面提交定稿时对订单标签进行检查 + * + * @param request + * @throws Exception + */ + public void doCheckLabel(HttpRequest request) throws Exception + { + long designId = request.getParameterLong("designId"); + if (designId < 0) + { + request.setResponseError("订单ID不存在"); + return; + } + + DesignSelfView order = ORM.get(ZView.class).item(DesignSelfView.class, new Selector("designId", designId)); + if (Validates.isEmpty(order)) + { + request.setResponseError("订单不存在"); + return; + } + MediaTemplate mediaTemplate = ORM.get(ZTable.class).item(MediaTemplate.class, new Selector("designId", designId)); + + boolean flag = true; + if (order.getConsumerType() == 0 || order.getLabelIds() == null) + { + flag = false; + } + else + { + Map labelMap = Global.get(IndustryLabelCache.class).map(); + Map ldMap = Global.get(LabelDimensionCache.class).map(); + String subIndustryDimensionId = "";// 子行业维度ID + String applicationScenarioDimensionId = "";// 应用场景维度ID + // String designStyleDimensionId = "";// 设计风格维度ID + for (LabelDimensionModel ldModel : ldMap.values()) + { + if ("子行业".equals(ldModel.getDimensionName())) + { + subIndustryDimensionId = ldModel.getDimensionId(); + } + if ("应用场景".equals(ldModel.getDimensionName())) + { + applicationScenarioDimensionId = ldModel.getDimensionId(); + } + } + String ordSubIndustry = "";// 订单子行业 + String ordApplicationScenario = "";// 订单应用场景 + // String ordDesignStyle = "";// 订单设计风格 + String[] ordLabels = order.getLabelIds().split(","); + for (String labelId : ordLabels) + { + if (Validates.isNotEmpty(labelId)) + { + IndustryLabelModel model = labelMap.get(Long.valueOf(labelId)); + if (Validates.isNotEmpty(model) && Validates.isNotEmpty(subIndustryDimensionId) && subIndustryDimensionId.equals(model.getDimensionId())) + { + ordSubIndustry = model.getLabelName(); + } + if (Validates.isNotEmpty(model) && Validates.isNotEmpty(applicationScenarioDimensionId) + && applicationScenarioDimensionId.equals(model.getDimensionId())) + { + ordApplicationScenario = model.getLabelName(); + } + } + } + if (Validates.isEmpty(ordSubIndustry) || Validates.isEmpty(ordApplicationScenario)) + { + flag = false; + } + } + Map map = new HashMap<>(); + map.put("flag", flag); + map.put("mediaId", Validates.isEmpty(mediaTemplate) ? -1 : mediaTemplate.getMediaId()); + map.put("designId", designId); + request.setResponseResult(Jsons.toString(map)); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/TemplatePresenter.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/TemplatePresenter.java new file mode 100644 index 0000000..3e4dc33 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/TemplatePresenter.java @@ -0,0 +1,998 @@ +package com.zhiqim.yangcai.design.presenter; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.ZmlContexts; +import org.zhiqim.httpd.context.annotation.AnIntercept; +import org.zhiqim.httpd.validate.ones.IsNotEmpty; +import org.zhiqim.httpd.validate.onex.IsFloat; +import org.zhiqim.httpd.validate.onex.IsInteger; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnTransaction; +import org.zhiqim.kernel.extend.HashMapSO; +import org.zhiqim.kernel.extend.MapSO; +import org.zhiqim.kernel.paging.PageBuilder; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Files; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.kernel.util.Lists; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.media.dbo.MediaCanvas; +import com.zhiqim.media.service.dao.MediaDao; +import com.zhiqim.media.service.dao.MediaPathDao; +import com.zhiqim.media.service.dao.PdfDao; +import com.zhiqim.media.service.model.MediaModel; +import com.zhiqim.media.service.util.ItextPdfUtil; +import com.zhiqim.yangcai.design.constant.TemplateScoreConstants; +import com.zhiqim.yangcai.design.dao.DesignTypeDao; +import com.zhiqim.yangcai.design.dao.KeywordDao; +import com.zhiqim.yangcai.design.dao.OssFileDao; +import com.zhiqim.yangcai.design.dao.TemplateDao; +import com.zhiqim.yangcai.design.dao.TemplateScoreDao; +import com.zhiqim.yangcai.design.dbo.keyword.DesKeywordIndex; +import com.zhiqim.yangcai.design.dbo.template.DesTemplateEvent; +import com.zhiqim.yangcai.design.dbo.template.DesTemplateEventView; +import com.zhiqim.yangcai.design.dbo.template.DesTemplateLog; +import com.zhiqim.yangcai.design.dbo.template.MediaTemplate; +import com.zhiqim.yangcai.design.dbo.template.MediaTemplateView; +import com.zhiqim.yangcai.design.dbo.works.DesWorksFile; +import com.zhiqim.yangcai.design.model.CopyTemplateModel; +import com.zhiqim.yangcai.util.SolrUtil; + +/** + * 模板Presenter + * + * @version v1.0.0 @author Deng 2017-11-10 新建与整理 + */ +@AnAlias("TemplatePresenter") +@AnIntercept("chkZmrLogin") +public class TemplatePresenter +{ + + /** + * 模板信息查询,包括我的模板、CDR模板,收藏模板、分享模板、精品模板 + * + * @param request + * @throws Exception + */ + public static void doTemplateSearch(HttpRequest request) throws Exception + { + request.addValidate(new IsNotEmpty("urlParam", "查询参数类型不能为空")); + if (!request.chkValidate()) + { + request.setResponseError(request.getAlertMsg()); + return; + } + + String urlParam = request.getParameter("urlParam"); + long typeId = request.getParameterLong("typeId"); + long industryId = request.getParameterLong("industryId"); + String fileType = request.getParameter("fileType"); + int page = request.getParameterInt("page", 1); + int pageSize = 20; + + // 精品模板增加关键字搜索 + String keyword = request.getParameter("keyword"); + if (Validates.isNotEmpty(keyword)) + { + KeywordDao.doKeywordCoreNumAdd(keyword); // 增加关键词搜索日志 + } + + ZmrSessionUser user = request.getSessionUser(ZmrSessionUser.class); + + MapSO attrMap = new HashMapSO(); + if (urlParam.equals("COLLECT")) + { + List mediaList = TemplateDao.doTemplateEventList(urlParam, user, typeId, industryId); + PageResult pageResult = PageBuilder.pageResult(page, pageSize, mediaList); + attrMap.put("pageResult", pageResult); + } + else + { + Selector selector = new Selector(); + selector.addOrderbyDesc("createTime"); + if (typeId != -1) + { + selector.addMust("typeId", typeId); + } + + if (industryId != -1) + { + selector.addMust("industryId", industryId); + } + + PageResult pageResult = PageBuilder.newResult(page, pageSize); + if (urlParam.equals("MY")) + {// 我的模板 + selector.addMust("designer", request.getSessionName()); + selector.addMustIn("templateType", 10, 20, 100, 110); + if (Validates.isNotEmpty(fileType)) + { + List mediaList = ORM.get(ZView.class).list(MediaTemplateView.class, selector); + Iterator it = mediaList.iterator(); + while (it.hasNext()) + { + MediaTemplateView media = it.next(); + if (Validates.isEmpty(media.getFileType())) + { + it.remove(); + break; + } + if (media.getFileType().indexOf(fileType.toLowerCase()) == -1) + {// 模板不包含指定格式移除数据 + it.remove(); + } + } + pageResult = PageBuilder.pageResult(page, pageSize, mediaList); + + } + else + { + pageResult = ORM.get(ZView.class).page(MediaTemplateView.class, page, pageSize, selector); + + } + } + else if (urlParam.equals("CDR")) + {// CDR转模板 + selector.addMust("templateType", 30); + pageResult = ORM.get(ZView.class).page(MediaTemplateView.class, page, pageSize, selector); + } + else if (urlParam.equals("BEST")) + {// 精品模板 + if (Validates.isNumericLen(keyword, 13, 19)) + {// 纯id查询 + selector.addMust("mediaId", Long.parseLong(keyword)); + } + else + { + selector.addMaybeLike("keywordName", keyword); + } + + selector.addMust("templateType", 110); + if (Validates.isNotEmpty(fileType)) + { + List mediaList = ORM.get(ZView.class).list(MediaTemplateView.class, selector); + Iterator it = mediaList.iterator(); + while (it.hasNext()) + { + MediaTemplateView media = it.next(); + if (Validates.isEmpty(media.getFileType())) + { + it.remove(); + break; + } + if (media.getFileType().indexOf(fileType.toLowerCase()) == -1) + {// 模板不包含指定格式移除数据 + it.remove(); + } + } + pageResult = PageBuilder.pageResult(page, pageSize, mediaList); + + } + else + { + pageResult = ORM.get(ZView.class).page(MediaTemplateView.class, page, pageSize, selector); + } + } + else if (urlParam.equals("SHARE")) + {// 分享给我的 + String operatorCode = request.getSessionName(); + selector.addMustLike("shareDept", "," + operatorCode + ","); + List templateList = ORM.get(ZView.class).list(MediaTemplateView.class, selector); + pageResult = PageBuilder.pageResult(page, pageSize, templateList); + } + attrMap.put("urlParam", urlParam); + attrMap.put("pageResult", pageResult); + } + + String ret = ZmlContexts.parseZmlPath(request, "/zview/template/presenter/templateInfo.zml", attrMap); + request.setResponseResult(ret); + } + + /** + * 订单模板查询,包括订单草稿、定稿草稿 + * + * @param request + * @throws Exception + */ + public static void doSearchOrderTemplate(HttpRequest request) throws Exception + { + request.addValidate(new IsNotEmpty("urlParam", "查询参数类型不能为空")); + if (!request.chkValidate()) + { + request.setResponseError(request.getAlertMsg()); + return; + } + + String urlParam = request.getParameter("urlParam"); + long typeId = request.getParameterLong("typeId"); + long industryId = request.getParameterLong("industryId"); + String q = request.getParameter("q"); + int page = request.getParameterInt("page", 1); + int pageSize = 10; + + Selector selector = new Selector(); + selector.addOrderbyDesc("createTime"); + if (typeId != -1) + { + selector.addMust("typeId", typeId); + } + + if (industryId != -1) + { + selector.addMust("industryId", industryId); + } + + PageResult pageResult = PageBuilder.newResult(page, pageSize); + if (urlParam.equals("DRAFT")) + {// 订单草稿 + // 为数字时表示查询草稿模板,否则查询个人草稿模板列表 + if (!Validates.isInteger(q)) + { + selector.addMaybeLike("keywords", q); + selector.addMust("designer", request.getSessionName()); + } + else + { + selector.addMust("designId", Long.parseLong(q)); + } + + selector.addMust("templateType", 0); + selector.addMust("templateStatus", 0); + // 草稿只查询最近7天 + selector.addMustThenGE("createTime", Sqls.toTimestamp(DateTimes.getPreviousDateString(7) + " 00:00:00")); + pageResult = ORM.get(ZView.class).page(MediaTemplateView.class, page, pageSize, selector); + } + else if (urlParam.equals("ORDER")) + {// 订单模板 + // 为数字时表示查询订单模板,否则查询个人订单模板列表 + if (!Validates.isInteger(q)) + { + String selOrderTemplate = request.getParameter("selOrderTemplate"); // 非空时,表示模板设计查询所有模板 + if (Validates.isEmpty(selOrderTemplate)) + { + selector.addMust("designer", request.getSessionName()); + } + selector.addMaybeLike("keywords", q); + } + else + { + selector.addMust("designId", Long.parseLong(q)); + } + + selector.addMust("templateType", 80); + selector.addMust("templateStatus", 0); + + pageResult = ORM.get(ZView.class).page(MediaTemplateView.class, page, pageSize, selector); + } + + MapSO attrMap = new HashMapSO(); + attrMap.put("pageResult", pageResult); + attrMap.put("typeId", typeId); + attrMap.put("industryId", industryId); + attrMap.put("urlParam", urlParam); + attrMap.put("q", q); + + String ret = ZmlContexts.parseZmlPath(request, "/zview/template/presenter/orderTemplateInfo.zml", attrMap); + request.setResponseResult(ret); + } + + /** + * 模板审核查询,包括所有模板、精品审核 + * + * @param request + * @throws Exception + */ + public static void doTemplateAuditSearch(HttpRequest request) throws Exception + { + request.addValidate(new IsNotEmpty("urlParam", "查询参数类型不能为空")); + if (!request.chkValidate()) + { + request.setResponseError(request.getAlertMsg()); + return; + } + + int page = request.getParameterInt("page", 1); + int pageSize = 20; + int templateType = request.getParameterInt("templateType"); + long typeId = request.getParameterLong("typeId"); + long industryId = request.getParameterLong("industryId"); + + Selector selector = new Selector(); + selector.addMaybe("typeId", typeId); + selector.addMaybe("industryId", industryId); + selector.addOrderbyDesc("createTime"); + selector.addMustIn("templateType", 20, 100); + selector.addMust("templateType", templateType); + selector.addMust("templateStatus", 1); + + PageResult pageResult = ORM.get(ZView.class).page(MediaTemplateView.class, page, pageSize, selector); + + MapSO attrMap = new HashMapSO(); + attrMap.put("pageResult", pageResult); + + String ret = ZmlContexts.parseZmlPath(request, "/zview/template/presenter/checkTemplateInfo.zml", attrMap); + request.setResponseResult(ret); + } + + /** + * 浏览事件 + * + * @param worksId + * @throws Exception + */ + @AnTransaction + public static void doTemplateBrowse(HttpRequest request) throws Exception + { + long mediaId = request.getParameterLong("mediaId"); + + DesTemplateEvent event = new DesTemplateEvent(); + event.setEventId(Ids.longId()); + event.setMediaId(mediaId); + event.setEventType(1); + event.setOperatorCode(request.getSessionName()); + event.setCreateTime(Sqls.nowTimestamp()); + + ORM.get(ZTable.class).insert(event); + + TemplateScoreDao.doTemplateFloatScore(mediaId, TemplateScoreConstants.TEMPLATE_BROWSE.value());// 模板分数计算 + } + + /** + * 下载事件 + * + * @param worksId + * @throws Exception + */ + @AnTransaction + public static void doTemplateDownload(HttpRequest request) throws Exception + { + long mediaId = request.getParameterLong("mediaId"); + + DesTemplateEvent event = new DesTemplateEvent(); + event.setEventId(Ids.longId()); + event.setMediaId(mediaId); + event.setEventType(4); + event.setOperatorCode(request.getSessionName()); + event.setCreateTime(Sqls.nowTimestamp()); + + ORM.get(ZTable.class).insert(event); + + TemplateScoreDao.doTemplateFloatScore(mediaId, TemplateScoreConstants.TEMPLATE_DOWN.value());// 模板分数计算 + } + + /** + * 模板分享 + * + * @param worksId + * @param deptId + * @throws Exception + */ + @AnTransaction + public static void doTemplateShare(HttpRequest request) throws Exception + { + long mediaId = request.getParameterLong("mediaId"); + String operatorCode = request.getParameter("operatorCode"); + String seachOperatorCode = "," + operatorCode + ","; + MediaTemplate template = ORM.get(ZTable.class).item(MediaTemplate.class, mediaId); + Updater updater = new Updater(); + updater.addMust("mediaId", mediaId); + + if (Validates.isNotEmpty(template.getShareDept())) + { + if (template.getShareDept().contains(seachOperatorCode)) + { + request.setResponseError("该设计师已被分享"); + return; + } + else + { + String shareDept = template.getShareDept() + operatorCode + ","; + updater.addField("shareDept", shareDept); + } + } + else + { + updater.addField("shareDept", seachOperatorCode); + } + + ORM.get(ZTable.class).update(MediaTemplate.class, updater); + + DesTemplateEvent event = new DesTemplateEvent(); + event.setEventId(Ids.longId()); + event.setMediaId(mediaId); + event.setEventType(3); + event.setCreateTime(Sqls.nowTimestamp()); + event.setOperatorCode(request.getSessionName()); + + ORM.get(ZTable.class).insert(event); + + TemplateScoreDao.doTemplateFloatScore(mediaId, TemplateScoreConstants.TEMPLATE_SHARE.value());// 模板动态分数计算 + } + + /** + * 取消分享 + * + * @param worksId + * @param deptId + * @throws Exception + */ + @AnTransaction + public static void doCancelShare(HttpRequest request) throws Exception + { + long mediaId = request.getParameterLong("mediaId"); + String operatorCode = request.getSessionName(); + MediaTemplate template = ORM.get(ZTable.class).item(MediaTemplate.class, mediaId); + if (template != null) + { + String tmp = "," + operatorCode + ","; + String shareDept = template.getShareDept(); + if (shareDept != null && shareDept.contains(tmp)) + { + tmp = shareDept.replace(tmp, ","); + if (",".equals(tmp)) + { + tmp = null; + } + Updater updater = new Updater(); + updater.addMust("mediaId", mediaId); + updater.addField("shareDept", tmp); + ORM.get(ZTable.class).update(MediaTemplate.class, updater); + + DesTemplateEvent event = new DesTemplateEvent(); + event.setEventId(Ids.longId()); + event.setMediaId(mediaId); + event.setEventType(3); + event.setCreateTime(Sqls.nowTimestamp()); + event.setOperatorCode(request.getSessionName()); + + ORM.get(ZTable.class).insert(event); + TemplateScoreDao.doTemplateFloatScore(mediaId, TemplateScoreConstants.CANCEL_TEMPLATE_SHARE.value());// 模板动态分数计算 + } + else + { + request.setResponseError("分享已被取消"); + return; + } + + } + + } + + /** + * 我收藏的 + * + * @param request + * @param worksId + * @throws Exception + */ + public static String doTemplateCollect(HttpRequest request, long mediaId, String eventId) throws Exception + { + ZmrSessionUser user = request.getSessionUser(ZmrSessionUser.class); + int count = 0; + if (Long.parseLong(eventId) > 0) + { + ORM.get(ZTable.class).delete(DesTemplateEvent.class, Long.parseLong(eventId)); + TemplateScoreDao.doTemplateFloatScore(mediaId, TemplateScoreConstants.TEMPLATE_COLLECT_CANCEL.value());// 模板动态分数计算 + + count = ORM.get(ZTable.class).count(DesTemplateEvent.class, new Selector("mediaId", mediaId).addMust("eventType", 2)); + // 修改后通知solr + SolrUtil.updateMediaData(mediaId); + return String.valueOf(count + ""); + } + else + { + long eventIds = Ids.longId(); + DesTemplateEvent event = new DesTemplateEvent(); + event.setEventId(eventIds); + event.setMediaId(mediaId); + event.setEventType(2); + event.setCreateTime(Sqls.nowTimestamp()); + event.setOperatorCode(user.getOperatorCode()); + + ORM.get(ZTable.class).insert(event); + + TemplateScoreDao.doTemplateFloatScore(mediaId, TemplateScoreConstants.TEMPLATE_COLLECT.value());// 模板动态分数计算 + + count = ORM.get(ZTable.class).count(DesTemplateEvent.class, new Selector("mediaId", mediaId).addMust("eventType", 2)); + // 修改后通知solr + SolrUtil.updateMediaData(mediaId); + return String.valueOf(count + "+" + eventIds); + } + } + + /** + * 删除模板,需提交至solr + * + * @param request + * @throws Exception + */ + @AnTransaction + public static void doTemplateDelete(HttpRequest request) throws Exception + { + request.addValidate(new IsInteger("mediaId", "请选择模板")); + if (!request.chkValidate()) + { + request.setResponseError(request.getAlertMsg()); + return; + } + + long mediaId = request.getParameterLong("mediaId"); + MediaTemplate template = ORM.get(ZTable.class).item(MediaTemplate.class, mediaId); + if (template == null) + { + request.setResponseError("模板不存在"); + return; + } + + MediaDao.deleteMedia(template.getMediaId()); + ORM.get(ZTable.class).delete(MediaTemplate.class, mediaId); + ORM.get(ZTable.class).delete(DesKeywordIndex.class, mediaId); // 移除索引表 + + String prePath = MediaPathDao.getCanvasLocalPre(mediaId); + Files.deleteDirectory(prePath); + + // 提交solr删除索引 + SolrUtil.deleteTemplateById(String.valueOf(mediaId)); + + // 删除作品库附件记录 + List worksFiles = ORM.get(ZTable.class).list(DesWorksFile.class, new Selector("templateId", mediaId)); + for (DesWorksFile desWorksFile : worksFiles) + { + String srcPath = desWorksFile.getCdrPath(); + String thumbPath = desWorksFile.getThumbImagePath(); + if (Validates.isNotEmptyBlank(srcPath)) + { + String path = srcPath.split(OssFileDao.getPrefix_dir())[1]; + OssFileDao.deleteOssFile(OssFileDao.getPrefix_dir() + path); + } + + if (Validates.isNotEmptyBlank(thumbPath)) + { + String thpath = thumbPath.split(OssFileDao.getPrefix_dir())[1]; + OssFileDao.deleteOssFile(OssFileDao.getPrefix_dir() + thpath); + } + } + Selector selector = new Selector(); + selector.addMust("templateId", mediaId); + ORM.get(ZTable.class).delete(DesWorksFile.class, selector); + + // 插入模版日志 + DesTemplateLog log = new DesTemplateLog(); + log.setLogId(Ids.longId()); + log.setMediaId(mediaId); + log.setOperatorCode(request.getSessionName()); + log.setLogDesc("删除模版"); + log.setCreateTime(Sqls.nowTimestamp()); + ORM.get(ZTable.class).insert(log); + } + + /** + * 复制模板 + * + * @param request + * @throws Exception + */ + @AnTransaction + public static void doTemplateCopy(HttpRequest request) throws Exception + { + request.addValidate(new IsInteger("mediaId", "请选择模板")); + if (!request.chkValidate()) + { + request.setResponseError(request.getAlertMsg()); + return; + } + + long mediaId = request.getParameterLong("mediaId"); + CopyTemplateModel media = TemplateDao.copyTemplateAndInsert(mediaId, Ids.longId(), request.getSessionName()); + if (media == null) + { + request.setResponseError("模板复制失败"); + return; + } + + DesTemplateEvent event = new DesTemplateEvent(); + event.setEventId(Ids.longId()); + event.setMediaId(mediaId); + event.setEventType(5); + event.setOperatorCode(request.getSessionName()); + event.setCreateTime(Sqls.nowTimestamp()); + + ORM.get(ZTable.class).insert(event); + + TemplateScoreDao.doTemplateFloatScore(mediaId, TemplateScoreConstants.TEMPLATE_COPY.value());// 模板动态分数计算 + } + + /** + * 模板审核,需提交至solr + * + * @param mediaId + * @param type + * @throws Exception + */ + @AnTransaction + public static void doTemplateAudit(HttpRequest request, long mediaId, String type) throws Exception + { + MediaTemplate template = ORM.get(ZTable.class).item(MediaTemplate.class, mediaId); + if (template == null) + { + request.setResponseError("模板不存在"); + return; + } + + Updater updater = new Updater(); + updater.addMust("mediaId", mediaId); + if ("yes".equals(type)) + { + updater.addField("templateType", 100); + updater.addField("templateStatus", 0); + + TemplateScoreDao.doTempalteBaseScore(mediaId); + + String typeName = DesignTypeDao.name(template.getTypeId()); + List industryList = Lists.toStringList(template.getIndustrySubName()); + List attrList = Lists.toStringList(template.getAttributeName()); + + List templateList = new ArrayList<>(); + templateList.add(typeName); + templateList.addAll(industryList); + templateList.addAll(attrList); + } + else + { + updater.addField("templateStatus", 0); + } + + // 插入模版日志 + DesTemplateLog log = new DesTemplateLog(); + log.setLogId(Ids.longId()); + log.setMediaId(mediaId); + log.setOperatorCode(request.getSessionName()); + log.setCreateTime(Sqls.nowTimestamp()); + if ("yes".equals(type)) + { + log.setLogDesc("同意模版审核"); + } + else + { + log.setLogDesc("拒绝模版审核"); + } + ORM.get(ZTable.class).insert(log); + ORM.get(ZTable.class).update(MediaTemplate.class, updater); + // 更新solr数据 + SolrUtil.updateMediaData(mediaId); + } + + /** + * 精品审核 + * + * @param mediaId + * @param type + * @throws Exception + */ + public static void doTemplateBestAudit(HttpRequest request, long mediaId, String type) throws Exception + { + Updater updater = new Updater(); + updater.addMust("mediaId", mediaId); + if ("yes".equals(type)) + { + updater.addField("templateType", 110); + updater.addField("templateStatus", 0); + + TemplateScoreDao.doTemplateFloatScore(mediaId, TemplateScoreConstants.TEMPLATE_BEST.value());// 模板动态分数计算 + + } + else + { + updater.addField("templateStatus", 0); + } + + // 插入模版日志 + DesTemplateLog log = new DesTemplateLog(); + log.setLogId(Ids.longId()); + log.setMediaId(mediaId); + log.setOperatorCode(request.getSessionName()); + log.setCreateTime(Sqls.nowTimestamp()); + if ("yes".equals(type)) + { + log.setLogDesc("同意精品审核"); + } + else + { + log.setLogDesc("拒绝精品审核"); + } + ORM.get(ZTable.class).insert(log); + + ORM.get(ZTable.class).update(MediaTemplate.class, updater); + // 更新solr数据 + SolrUtil.updateMediaData(mediaId); + } + + /** + * 申请系统模板 + * + * @param request + * @throws Exception + */ + public static void doTemplateToSys(HttpRequest request) throws Exception + { + long mediaId = request.getParameterLong("mediaId"); + if (mediaId == -1) + { + return; + } + + Updater updater = new Updater(); + updater.addMust("mediaId", mediaId); + updater.addField("templateStatus", 1); + + ORM.get(ZTable.class).update(MediaTemplate.class, updater); + } + + /** + * 申请精品模板 + * + * @param request + * @throws Exception + */ + public static void doTemplateToBest(HttpRequest request) throws Exception + { + long mediaId = request.getParameterLong("mediaId"); + if (mediaId == -1) + { + return; + } + + Updater updater = new Updater(); + updater.addMust("mediaId", mediaId); + updater.addField("templateStatus", 1); + + ORM.get(ZTable.class).update(MediaTemplate.class, updater); + // 更新solr数据 + SolrUtil.updateMediaData(mediaId); + } + + /** + * 发布模板 + * + * @param request + * @throws Exception + */ + public static void doTemplateToMy(HttpRequest request) throws Exception + { + long mediaId = request.getParameterLong("mediaId"); + if (mediaId == -1) + { + return; + } + MediaTemplate media = ORM.get(ZTable.class).item(MediaTemplate.class, new Selector("mediaId", mediaId)); + if (media == null) + { + request.setResponseError("模板不存在,无法发布!"); + return; + } + // if (media.getIndustryId() <= 0 || Validates.isEmpty(media.getIndustrySubIds())) + // { + // request.setResponseError("请先填写行业,子行业信息!"); + // return; + // } + + Updater updater = new Updater(); + updater.addMust("mediaId", mediaId); + updater.addField("templateType", 20); + + ORM.get(ZTable.class).update(MediaTemplate.class, updater); + // 更新solr数据 + SolrUtil.updateMediaData(mediaId); + } + + /** + * 取消模板/精品,取消模板需删除solr索引 + * + * @param request + * @throws Exception + */ + public static void doTemplateCancel(HttpRequest request) throws Exception + { + long mediaId = request.getParameterLong("mediaId"); + if (mediaId == -1) + { + return; + } + + int type = request.getParameterInt("type", 0); // 0:取消精品,1:取消模板 + int templateType = 100; + if (type == 1) + {// 取消模板 + templateType = 20; + } + else + { + TemplateScoreDao.doTemplateFloatScore(mediaId, TemplateScoreConstants.TEMPLATE_BEST_CANCEL.value());// 模板动态分数计算 + } + + Updater updater = new Updater(); + updater.addMust("mediaId", mediaId); + updater.addField("templateType", templateType); + + ORM.get(ZTable.class).update(MediaTemplate.class, updater); + // 更新solr数据 + SolrUtil.updateMediaData(mediaId); + + } + + /** + * 新建我的空白模板,并入库 + * + * @param request + * @throws Exception + */ + @AnTransaction + public static void doCreateMyTemplate(HttpRequest request) throws Exception + { + request.addValidate(new IsInteger("typeId", "请选择设计类型")); + request.addValidate(new IsInteger("pageValue", "请选择设计面数")); + request.addValidate(new IsFloat("width", "请输入正确的设计尺寸宽度")); + request.addValidate(new IsFloat("height", "请输入正确的设计尺寸高度")); + if (!request.chkValidate()) + { + request.setResponseError(request.getAlertMsg()); + return; + } + + long typeId = request.getParameterLong("typeId"); + int pageValue = request.getParameterInt("pageValue"); + if (pageValue < 1) + { + request.setResponseError("无效设计单面数"); + return; + } + + String createChannel = request.getParameter("createChannel"); + if (Validates.isEmpty(createChannel)) + { + request.setResponseError("请选择模板类型"); + return; + } + + String bleedSizeStr = request.getParameter("sizeBleed"); + double bleedSize = Double.parseDouble(Validates.isNotEmptyBlank(bleedSizeStr) ? bleedSizeStr : "2"); // 默认出血为2 + int createMode = request.getParameterInt("createMode", 0); // 默认为mm单位 + boolean isModify = request.getParameterBoolean("isModify", false); // 默认不支持修改尺寸 + + // 模基础尺寸 + String baseWidthStr = request.getParameter("baseWidthMm"); + String baseHeightStr = request.getParameter("baseHeightMm"); + double baseWidthMm = Double.parseDouble(baseWidthStr); + double baseHeightMm = Double.parseDouble(baseHeightStr); + + // 设计尺寸 + String widthStr = request.getParameter("width"); + String heightStr = request.getParameter("height"); + double width = Double.parseDouble(widthStr); + double height = Double.parseDouble(heightStr); + String fullWidthStr = request.getParameter("fullWidth"); + String fullHeightStr = request.getParameter("fullHeight"); + double fullWidth = Double.parseDouble(fullWidthStr); + double fullHeight = Double.parseDouble(fullHeightStr); + + long oddEven = request.getParameterLong("oddEven") < 0 ? 0 : request.getParameterLong("oddEven"); + String templateName = Validates.isEmpty(request.getParameter("templateName")) ? "" : request.getParameter("templateName"); + + MediaModel media = MediaDao.createMedia(typeId, baseWidthMm, baseHeightMm, width, height, fullWidth, fullHeight, 300, pageValue, bleedSize, createMode, + isModify, oddEven, templateName); + + // 生成缩略图 + String mediaUrl = MediaDao.createMediaEffect(media.getCanvas().getMediaId()); + media.getCanvas().setMediaUrl(mediaUrl); + media.getCanvas().setCreateTime(DateTimes.getDateTimeString()); + media.getCanvas().setUpdateTime(DateTimes.getDateTimeString()); + + // 模板 + long mediaId = media.getCanvas().getMediaId(); + MediaTemplate template = new MediaTemplate(); + template.setMediaId(mediaId); + template.setTypeId(typeId); + template.setPageValue(pageValue); + template.setCreateChannel(createChannel); + template.setTemplateType(10); // 我的草稿 + template.setTemplateStatus(0); + template.setDesigner(request.getSessionName()); + + ORM.get(ZTable.class).insert(template); + ORM.get(ZTable.class).insert(media.getCanvas()); + ORM.get(ZTable.class).insertBatch(media.getBgList()); + ORM.get(ZTable.class).insertBatch(media.getMediaMaterialList()); + // 添加solr模板数据 + SolrUtil.updateMediaData(mediaId); + request.setResponseResult(String.valueOf(mediaId)); + } + + /** + * 下载订单模板pdf文件 + * + * @param request + * @throws Exception + */ + public static void doDownloadPdf(HttpRequest request) throws Exception + { + request.addValidate(new IsInteger("mediaId", "不能为空")); + if (!request.chkValidate()) + { + request.setResponseError(request.getAlertMsg()); + return; + } + + long mediaId = request.getParameterLong("mediaId"); + + MediaCanvas media = ORM.get(ZTable.class).item(MediaCanvas.class, mediaId); + if (media == null) + { + request.setResponseError("下载的订单模板不存在"); + return; + } + + List pdfList = PdfDao.getPdfList(media, -1, false, null, null, null, "PDF"); + long id = Ids.longId13(); + String curDate = DateTimes.getDateTime8String(); + + // 合成pdf + String savePath = MediaPathDao.getTempLocalPre(curDate) + id + ".pdf"; + ItextPdfUtil.megerPdf(pdfList, savePath); + + String downloadUrl = MediaPathDao.getTempUrlPre(curDate) + id + ".pdf"; + request.setResponseResult(downloadUrl); + } + + /** + * 下载外部稿件 + * + * @param request + * @throws Exception + */ + public static void checkWorksDownload(HttpRequest request) throws Exception + { + request.addValidate(new IsInteger("mediaId", "不能为空")); + if (!request.chkValidate()) + { + request.setResponseError(request.getAlertMsg()); + return; + } + + long mediaId = request.getParameterLong("mediaId"); + + List worksFiles = ORM.get(ZTable.class).list(DesWorksFile.class, new Selector("templateId", mediaId)); + if (Validates.isEmpty(worksFiles)) + { + request.setResponseError("该模板【" + mediaId + "】的外部稿件不存在"); + return; + } + + } + + /** + * 模板更新 + * + * @param worksId + * @throws Exception + */ + @AnTransaction + public static void doTemplateUpdate(HttpRequest request) throws Exception + { + long mediaId = request.getParameterLong("mediaId"); + SolrUtil.updateMediaData(mediaId); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/TemplatePreviewPresenter.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/TemplatePreviewPresenter.java new file mode 100644 index 0000000..57a29bb --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/TemplatePreviewPresenter.java @@ -0,0 +1,1034 @@ +package com.zhiqim.yangcai.design.presenter; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.ZmlContexts; +import org.zhiqim.httpd.context.annotation.AnIntercept; +import org.zhiqim.httpd.validate.ones.IsNotEmpty; +import org.zhiqim.httpd.validate.onex.IsInteger; +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnTransaction; +import org.zhiqim.kernel.extend.HashMapSO; +import org.zhiqim.kernel.extend.MapSO; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.kernel.paging.PageBuilder; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.Arrays; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Files; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.kernel.util.Lists; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.kernel.util.codes.Base64; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.media.dbo.MediaCanvas; +import com.zhiqim.media.dbo.MediaMaterial; +import com.zhiqim.media.dbo.MediaMaterialParamEx; +import com.zhiqim.media.service.dao.BaiduDao; +import com.zhiqim.media.service.dao.MediaDao; +import com.zhiqim.media.service.dao.MediaPathDao; +import com.zhiqim.media.service.model.MediaModel; +import com.zhiqim.yangcai.cache.DesignIndustryCache; +import com.zhiqim.yangcai.design.dao.DesignerOrderDao; +import com.zhiqim.yangcai.design.dao.ParamTypeDao; +import com.zhiqim.yangcai.design.dao.TemplateDao; +import com.zhiqim.yangcai.design.dbo.DesLabelIndustry; +import com.zhiqim.yangcai.design.dbo.design.DesignType; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; +import com.zhiqim.yangcai.design.dbo.template.DesTemplateEventView; +import com.zhiqim.yangcai.design.dbo.template.DesTemplateIndexView; +import com.zhiqim.yangcai.design.dbo.template.DesTemplateOrder; +import com.zhiqim.yangcai.design.dbo.template.MediaTemplate; +import com.zhiqim.yangcai.design.dbo.template.MediaTemplateSolrModel; +import com.zhiqim.yangcai.design.dbo.template.MediaTemplateView; +import com.zhiqim.yangcai.design.model.TemplatePreviewModel; +import com.zhiqim.yangcai.util.SolrUtil; + +/** + * 订单预览presenter + * + * @version v1.0.0 @author Deng 2018-3-24 新建与整理 + */ +@AnAlias("TemplatePreviewPresenter") +@AnIntercept("chkZmrLogin") +public class TemplatePreviewPresenter +{ + + private static final Log log = LogFactory.getLog(TemplatePreviewPresenter.class); + + /** + * 查询已选模板 + * + * @param request + * @throws Exception + */ + public static void doTemplateExistQuery(HttpRequest request) throws Exception + { + request.addValidate(new IsInteger("designId", "订单ID不能为空")); + request.addValidate(new IsInteger("typeId", "设计类型不能为空")); + if (!request.chkValidate()) + { + request.setResponseError(request.getAlertMsg()); + return; + } + + long designId = request.getParameterLong("designId"); + long typeId = request.getParameterLong("typeId"); + if (designId == -1) + { + request.setResponseError("设计订单信息不存在"); + return; + } + + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, designId); + if (order == null) + { + request.setResponseError("订单不存在"); + return; + } + + DesignType type = ORM.get(ZTable.class).item(DesignType.class, order.getTypeId()); + if (type == null) + { + request.setResponseError("无效设计单类型"); + return; + } + List idList = DesignerOrderDao.getOrderTemplate(designId); + + /* 此处数据用于电子名片设计时在设计页面生成二维码 */ + Boolean orderIsCardType = Boolean.FALSE; + if (order.getTypeId() == 2023207561256L) + { + orderIsCardType = Boolean.TRUE; + } + + // svg展示图 + Map svgMap = TemplateDao.getTemplatePreview(idList); + HashMapSO jsonMap = new HashMapSO(); + jsonMap.put("svgMap", svgMap); + jsonMap.put("paramCat", typeId); + jsonMap.put("designOrder", order); + jsonMap.put("type", type); + jsonMap.put("orderIsCardType", orderIsCardType); + + // pvc名片不补位特殊流程 + if (typeId == 1806070857392601L) + { + if (order.getDesignWidth() == 90 && order.getDesignHeight() == 53) + { + type.setSizeMWidth(90); + type.setSizeMHeight(53); + } + else if (order.getDesignWidth() == 88 && order.getDesignHeight() == 57) + { + type.setSizeMWidth(88.5); + type.setSizeMHeight(57); + if (order.getPrintWidth() == 0 && order.getPrintHeight() == 0) + { + order.setPrintHeight(85); + order.setPrintWidth(53.5); + } + } + else + { + type.setSizeMWidth(88.5); + type.setSizeMHeight(57); + } + } + + String ret = ZmlContexts.parseZmlPath(request, "/zview/des/presenter/templatePreviewInfo.zml", jsonMap); + request.setResponseResult(ret); + } + + /** + * 为客户查询已选模板 + * + * @param request + * @throws Exception + */ + public static void doTemplateExistQueryForCustomer(HttpRequest request) throws Exception + { + request.addValidate(new IsInteger("designId", "订单ID不能为空")); + request.addValidate(new IsInteger("typeId", "设计类型不能为空")); + if (!request.chkValidate()) + { + request.setResponseError(request.getAlertMsg()); + return; + } + + long designId = request.getParameterLong("designId"); + long typeId = request.getParameterLong("typeId"); + if (designId == -1) + { + request.setResponseError("设计订单信息不存在"); + return; + } + + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, designId); + if (order == null) + { + request.setResponseError("订单不存在"); + return; + } + + List idList = DesignerOrderDao.getOrderTemplate(designId); + + // svg展示图 + Map svgMap = TemplateDao.getTemplatePreview(idList); + HashMapSO jsonMap = new HashMapSO(); + jsonMap.put("svgMap", svgMap); + jsonMap.put("paramCat", typeId); + jsonMap.put("designOrder", order); + + String ret = ZmlContexts.parseZmlPath(request, "/zview/des/presenter/templateCustomerPreviewInfo.zml", jsonMap); + request.setResponseResult(ret); + } + + /** + * 选择模板预览时增加缓存 + * + * @param request + * @throws Exception + */ + @AnTransaction + public static void doTemplateCacheAdd(HttpRequest request) throws Exception + { + long designId = request.getParameterLong("designId"); + long mediaId = request.getParameterLong("mediaId"); + int templateNum = ORM.get(ZView.class).count(MediaTemplateView.class, new Selector("designId", designId)); + if (templateNum >= 4) + { + request.setResponseError("最多支持添加4个预览模板"); + return; + } + + MediaTemplate template = ORM.get(ZTable.class).item(MediaTemplate.class, new Selector("designId", designId).addMust("templateSrc", mediaId)); + if (template != null) + { + request.setResponseError("订单已复制了该模板"); + return; + } + + // 复制订单模板 + if (!TemplateDao.doNewOrderTemplate(designId, mediaId, request.getSessionName())) + { + request.setResponseError("复制模板时失败,mediaId=" + mediaId); + return; + } + } + + /** + * 选择模板删除缓存 + * + * @param request + * @throws Exception + */ + @AnTransaction + public static void doTemplateCacheDelete(HttpRequest request) throws Exception + { + long designId = request.getParameterLong("designId"); + long mediaId = request.getParameterLong("mediaId"); + + Selector selector = new Selector(); + selector.addMust("designId", designId); + selector.addMust("templateSrc", mediaId); + MediaTemplate template = ORM.get(ZTable.class).item(MediaTemplate.class, selector); + if (template != null) + { + // 画布删除 + MediaDao.deleteMedia(template.getMediaId()); + String prePath = MediaPathDao.getCanvasLocalPre(template.getMediaId()); + Files.deleteDirectory(prePath); + + ORM.get(ZTable.class).delete(MediaTemplate.class, template.getMediaId()); + } + } + + /** + * 新建空白订单模板,并入库 + * + * @param request + * @throws Exception + */ + @AnTransaction + public static void doCreateOrderTemplate(HttpRequest request) throws Exception + { + request.addValidate(new IsNotEmpty("designId", "请选择订单")); + if (!request.chkValidate()) + { + request.setResponseError(request.getAlertMsg()); + return; + } + + String createChannel = request.getParameter("createChannel", "platform_design"); + long designId = request.getParameterLong("designId"); + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, new Selector("designId", designId)); + if (order == null) + { + request.setResponseError("订单【" + designId + "】不存在,请重新选择!"); + return; + } + + int pageValue = order.getDesignPage(); + if (pageValue < 1) + { + request.setResponseError("无效设计单面数"); + return; + } + + long typeId = order.getTypeId(); + double designWidth = order.getDesignWidth(); + double designHeight = order.getDesignHeight(); + double printWidth = order.getPrintWidth(); + double printHeight = order.getPrintHeight(); + + DesignType type = ORM.get(ZTable.class).item(DesignType.class, order.getTypeId()); + if (type == null) + { + request.setResponseError("无效设计单类型"); + return; + } + double bleedSize = type.getBleeding(); + double baseWidthMm = type.getSizeMWidth(); + double baseHeightMm = type.getSizeMHeight(); + + // pvc名片不补位特殊流程 + if (typeId == 1806070857392601L) + { + if (order.getDesignWidth() == 90 && order.getDesignHeight() == 53) + { + designWidth = 90; + designHeight = 53; + baseWidthMm = 90; + baseHeightMm = 53; + bleedSize = 3; + } + else if (order.getDesignWidth() == 88 && order.getDesignHeight() == 57) + { + designWidth = 88.5; + designHeight = 57; + baseWidthMm = 88.5; + baseHeightMm = 57; + bleedSize = 3.5; + } + else + { + designWidth = 88.5; + designHeight = 57; + baseWidthMm = 88.5; + baseHeightMm = 57; + bleedSize = 3.5; + } + } + + if (baseWidthMm <= 0 || baseHeightMm <= 0) + { + request.setResponseError("请先配置产品【" + type.getTypeName() + "】模位尺寸"); + return; + } + + double fullWidth = baseWidthMm * Math.ceil(designWidth / baseWidthMm); + double fullHeight = baseHeightMm * Math.ceil(designHeight / baseHeightMm); + + printWidth = printWidth == 0 ? designWidth : (printWidth + bleedSize); + printHeight = printHeight == 0 ? designHeight : (printHeight + bleedSize); + int createMode = 0; // media 创建模式,0:mm,1:像素 + int dpi = 300; + MediaModel media = MediaDao.createMedia(typeId, designWidth, designHeight, printWidth, printHeight, fullWidth, fullHeight, dpi, pageValue, bleedSize, + createMode, false, 0, ""); + + String designer = order.getDesigner(); + if (Validates.isEmptyBlank(designer)) + { + designer = request.getSessionName(); + } + + // 生成缩略图 + String mediaUrl = MediaDao.createMediaEffect(media.getCanvas().getMediaId()); + media.getCanvas().setMediaUrl(mediaUrl); + media.getCanvas().setCreateTime(DateTimes.getDateTimeString()); + media.getCanvas().setUpdateTime(DateTimes.getDateTimeString()); + + // 模板 + long mediaId = media.getCanvas().getMediaId(); + MediaTemplate template = new MediaTemplate(); + template.setMediaId(mediaId); + template.setTypeId(typeId); + template.setPageValue(pageValue); + template.setTemplateType(0); + template.setTemplateStatus(0); + template.setDesignId(designId); + template.setDesigner(designer); + template.setCreateChannel(createChannel); + + ORM.get(ZTable.class).insert(template); + ORM.get(ZTable.class).insert(media.getCanvas()); + ORM.get(ZTable.class).insertBatch(media.getBgList()); + ORM.get(ZTable.class).insertBatch(media.getMediaMaterialList()); + + /* 此处数据用于电子名片设计时在设计页面生成二维码 */ + Boolean orderIsCardType = Boolean.FALSE; + if (order.getTypeId() == 2023207561256L) + { + orderIsCardType = Boolean.TRUE; + } + + Map jsonMap = new HashMap(); + jsonMap.put("mediaId", mediaId); + jsonMap.put("designWidth", designWidth); + jsonMap.put("designHeight", designHeight); + jsonMap.put("printWidth", printWidth); + jsonMap.put("printHeight", printHeight); + jsonMap.put("printKs", order.getPrintKs()); + jsonMap.put("printMs", order.getPrintMs()); + jsonMap.put("bleedSize", bleedSize); + jsonMap.put("type", type); + jsonMap.put("orderIsCardType", orderIsCardType); + // 添加solr模板数据 + SolrUtil.updateMediaData(mediaId); + request.setResponseResult(Jsons.toString(jsonMap)); + } + + /** + * 模板推荐类型(订单模板推荐,猜你喜欢,我收藏的,热搜排行,老客户模板) + * + * @param request + * @throws Exception + */ + public static void doTemplateTypeQuery(HttpRequest request) throws Exception + { + request.addValidate(new IsInteger("designId", "订单ID不能为空")); + if (!request.chkValidate()) + { + request.setResponseError(request.getAlertMsg()); + return; + } + + long designId = request.getParameterLong("designId"); + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, designId); + if (order == null) + { + request.setResponseError("设计订单信息不存在"); + return; + } + + long typeId = order.getTypeId(); + int page = request.getParameterInt("page", 1); + int pageSize = 4; + String queryType = request.getParameter("queryType"); + String keyword = request.getParameter("keyword"); + ZmrSessionUser sessionUser = request.getSessionUser(ZmrSessionUser.class); + + MapSO attrMap = new HashMapSO(); + attrMap.put("page", page); + attrMap.put("designId", designId); + attrMap.put("queryType", queryType); + attrMap.put("keyword", keyword); + if ("RECOMMEND".equals(queryType)) + { + PageResult pageResult = doTemplateRecommendQuery(page, pageSize, order); + attrMap.put("pageResult", pageResult); + attrMap.put("page", page); + } + else if ("COLLECT".equals(queryType)) + { + PageResult pageResult = doTemplateCollectQuery(typeId, keyword, page, pageSize, sessionUser.getOperatorCode()); + attrMap.put("pageResult", pageResult); + attrMap.put("page", page); + } + else if ("LIKE".equals(queryType)) + { + PageResult pageResult = doTemplateLikeQuery(typeId, page, pageSize, sessionUser.getOperatorCode()); + attrMap.put("pageResult", pageResult); + attrMap.put("page", page); + } + else if ("OLD".equals(queryType)) + {// 老客户模板 + PageResult pageResult = doQueryOldUserTemplate(designId, order.getBuyerNick(), typeId, page, pageSize); + attrMap.put("pageResult", pageResult); + attrMap.put("page", page); + } + else if ("KEYWORD".equals(queryType)) + { + String sort = request.getParameter("sort"); + PageResult pageResult = null; + PageResult solrPageResult = null; + if (Validates.isNumericLen(keyword, 13, 19)) + {// 纯id查询本地 + Selector sel = new Selector(); + sel.addMustThenGE("templateType", 100); + sel.addMust("mediaId", Long.parseLong(keyword)); + sel.addMaybe("typeId", typeId); + pageResult = ORM.get(ZView.class).page(MediaTemplateView.class, page, pageSize, sel); + } + else + {// solr查询 + Map param = new HashMap<>(); + param.put("typeId", String.valueOf(typeId)); + param.put("keyword", keyword); + param.put("sort", sort); + solrPageResult = SolrUtil.queryAllTemplate(page, pageSize, param); + } + + List subIndustryList = ORM.get(ZTable.class).list(DesLabelIndustry.class, new Selector("industryId", order.getIndustryId())); + + attrMap.put("pageResult", pageResult); + if (pageResult == null && solrPageResult != null) + { + attrMap.put("pageResult", solrPageResult); + } + attrMap.put("subIndustryList", subIndustryList); + attrMap.put("page", page); + attrMap.put("sort", sort); + } + + List idList = new ArrayList(); + List mediaList = ORM.get(ZView.class).list(MediaTemplateView.class, new Selector("designId", designId)); + for (MediaTemplateView temp : mediaList) + { + if (temp.getTemplateSrc() > 0) + { + idList.add(temp.getTemplateSrc()); + } + } + attrMap.put("idList", idList); + + String ret = ZmlContexts.parseZmlPath(request, "/zview/des/presenter/templateQueryInfo.zml", attrMap); + request.setResponseResult(ret); + } + + /** + * 订单模板推荐 + * + * @param page + * @param pageSize + * @param order + * @param product + * @return + * @throws Exception + */ + private static PageResult doTemplateRecommendQuery(int page, int pageSize, DesignOrder order) throws Exception + { + + Selector selector = new Selector(); + selector.addMust("typeId", order.getTypeId()); + selector.addMustLike("shareDept", "," + order.getDesigner() + ","); + PageResult pageResult = ORM.get(ZView.class).page(DesTemplateIndexView.class, page, pageSize, selector); + + // 排序,降序 + Collections.sort(pageResult.list(), new Comparator() + { + @Override + public int compare(DesTemplateIndexView o1, DesTemplateIndexView o2) + { + return o2.getMediaScore() - o1.getMediaScore(); + } + }); + + return pageResult; + } + + /** + * 我收藏的模板 + * + * @param typeId + * @param page + * @param operatorCode + * @return + * @throws Exception + */ + private static PageResult doTemplateCollectQuery(long typeId, String keyword, int page, int pageSize, String operatorCode) + throws Exception + { + Selector selector = new Selector(); + // selector.addMustInLong("templateType", 100, 110); + selector.addMust("typeId", typeId); + selector.addMust("operatorCode", operatorCode); + selector.addMust("eventType", 2); + if (Validates.isInteger(keyword) && keyword.length() > 10) + { + selector.addMaybe("mediaId", Long.parseLong(keyword)); + } + else if (Validates.isNotEmpty(keyword)) + { + Selector selector2 = new Selector().addMaybeLike("attributeName", keyword).addMaybeLike("keywordName", keyword); + selector.addOr(selector2); + } + selector.addOrderbyDesc("updateTime"); + PageResult pageResult = ORM.get(ZView.class).page(DesTemplateEventView.class, page, pageSize, selector); + + return pageResult; + } + + /** + * 我喜欢的 + * + * @param operatorCode + * @param typeId + * @return + * @throws Exception + */ + private static PageResult doTemplateLikeQuery(long typeId, int page, int pageSize, String operatorCode) throws Exception + { + List longList = new ArrayList(); + + Selector selector = new Selector(); + selector.addMustInLong("templateType", 100, 110); + selector.addMust("typeId", typeId); + selector.addMust("operatorCode", operatorCode); + List allList = ORM.get(ZView.class).list(DesTemplateEventView.class, selector); + for (DesTemplateEventView event : allList) + { + if (!longList.contains(event.getMediaId())) + { + longList.add(event.getMediaId()); + } + } + + PageResult pageResult = PageBuilder.pageResult(page, pageSize, doLikeList(longList, page, pageSize)); + + return pageResult; + } + + /** + * 查询老客户模板 + * + * @param designId + * @param buyerNick + * @param typeId + * @param page + * @param pageSize + * @return + * @throws Exception + */ + private static PageResult doQueryOldUserTemplate(long designId, String buyerNick, long typeId, int page, int pageSize) throws Exception + { + Selector selector = new Selector(); + selector.addMust("typeId", typeId); + selector.addMust("buyerNick", buyerNick); + selector.addMustIsNotNull("designer"); + selector.addMustNotEqual("designId", designId); // 排除自己 + selector.addOrderbyDesc("createTime"); + PageResult result = ORM.get(ZTable.class).page(DesignOrder.class, 1, 10, selector); + + if (result.isEmpty()) + { + return PageBuilder.newResult(pageSize); + } + + List designIdList = new ArrayList<>(); + for (DesignOrder temp : result.list()) + { + designIdList.add("" + temp.getDesignId()); + } + + Selector sel = new Selector(); + sel.addMust("typeId", typeId); + sel.addMustThenGE("templateType", 80); // 订单模板 + sel.addMustIsNotNull("designId"); + sel.addMustIn("designId", Arrays.toArray(designIdList, String.class)); + PageResult pageResult = ORM.get(ZView.class).page(MediaTemplateView.class, page, pageSize, sel); + + return pageResult; + } + + /** + * 根据模板的关键词,选出相似模板,再计算模板关键词与相似模板关键词向量相似性大于50% + * + * @param allList + * @throws Exception + */ + private static List doLikeList(List allList, int page, int pageSize) throws Exception + { + List mediaList = new ArrayList(); + for (long mediaId : allList) + { + DesTemplateIndexView index = ORM.get(ZView.class).item(DesTemplateIndexView.class, new Selector("mediaId", mediaId)); + if (index == null) + { + continue; + } + + mediaList.add(index); + } + + // 组装新的模板列表,按模板指数降序 + Collections.sort(mediaList, new Comparator() + { + @Override + public int compare(DesTemplateIndexView o1, DesTemplateIndexView o2) + { + return o2.getMediaScore() - o1.getMediaScore(); + } + }); + + return mediaList; + } + + /** + * 客户文本数据分析 + * + * @param request + * @return + * @throws Exception + */ + public static void doParseParamData(HttpRequest request) throws Exception + { + int type = request.getParameterInt("type", 1); // 默认百度分词 + String paramData = request.getParameterNoFilter("paramData"); + if (type == 1) + { + try + {// 百度词法分析,异常调用原处理方法 + paramData = paramData.replace("\r\n", "/"); + paramData = paramData.replace("\n", "/"); + request.setResponseResult(Jsons.toString(BaiduDao.parseText2(paramData))); + return; + } + catch (Exception e) + { + log.error("百度智能分析客户文本数据异常" + e.getMessage(), e); + } + } + + String[] PHASE_FORMAT = + { + "\r\n", "\n" + };// 常用分段分隔字符 + String[] PHASE_SPLIT_FORMAT = + { + "\t", "。", ",", ",", ";", ";" + }; // 段落文本分隔字符 + String[] PHASE_SPLIT_CHAR_FORMAT = + { + ":", ":", " " + };// 文本单字符 + + if (!Validates.isStrContainStrArr(paramData, PHASE_FORMAT) && !Validates.isStrContainStrArr(paramData, PHASE_SPLIT_FORMAT) + && !Validates.isStrContainStrArr(paramData, PHASE_SPLIT_CHAR_FORMAT)) + { + request.setResponseError("不支持单行格式分析"); + return; + } + + List phaseList = new ArrayList(); + List textList = new ArrayList(); + List charList = new ArrayList(); + List dataList = new ArrayList(); + + // 1.在多种分隔符情况下,获取内容值 + if (Validates.isStrContainStrArr(paramData, PHASE_FORMAT)) + { + String[] phaseStr = ParamTypeDao.doContentSplit(paramData, PHASE_FORMAT);// 段落 + if (phaseStr != null) + { + phaseList = ParamTypeDao.doDataStrList(phaseStr); + } + } + else + { + if (Validates.isStrContainStrArr(paramData, PHASE_SPLIT_FORMAT)) + {// 存在 + String[] textStr = ParamTypeDao.doContentSplit(paramData, PHASE_SPLIT_FORMAT);// 段落 + if (textStr != null) + { + textList = ParamTypeDao.doDataStrList(textStr); + } + } + else + {// 不存在 + if (Validates.isStrContainStrArr(paramData, PHASE_SPLIT_CHAR_FORMAT)) + { + String[] characterStr = ParamTypeDao.doContentSplit(paramData, PHASE_SPLIT_CHAR_FORMAT); // 段段文本字节 + if (characterStr != null) + { + charList = ParamTypeDao.doDataStrList(characterStr); + } + } + } + } + + if (phaseList.size() > 0) + { + // 分析每一段落 + for (int i = 0; i < phaseList.size(); i++) + { + String argStr = phaseList.get(i).trim(); + if (Validates.isStrContainStrArr(argStr, PHASE_SPLIT_FORMAT)) + {// 存在段落文本分隔字符 + String[] textStr = ParamTypeDao.doContentSplit(argStr, PHASE_SPLIT_FORMAT); // 段落文本 + if (textStr == null) + { + continue; + } + + List strList = ParamTypeDao.doDataStrList(textStr); + for (String args : strList) + { + // 分析单字符 + dataList.addAll(ParamTypeDao.ChkPhaseChar(args, PHASE_SPLIT_CHAR_FORMAT)); + } + } + else + { + // 分析单字符 + dataList.addAll(ParamTypeDao.ChkPhaseChar(argStr, PHASE_SPLIT_CHAR_FORMAT)); + } + } + } + + if (textList.size() > 0) + { + // 分析每一段落文本 + for (int i = 0; i < textList.size(); i++) + { + String argStr = textList.get(i).trim(); + dataList.addAll(ParamTypeDao.ChkPhaseChar(argStr, PHASE_SPLIT_CHAR_FORMAT)); + } + } + + if (charList.size() > 0) + { + // 分析单字符 + for (int i = 0; i < charList.size(); i++) + { + String argStr = charList.get(i).trim(); + dataList.addAll(ParamTypeDao.ChkPhaseChar(argStr, PHASE_SPLIT_CHAR_FORMAT)); + } + } + + request.setResponseResult(Jsons.toString(dataList)); + } + + /** + * 模板参数替换 + * + * @param request + * @throws Exception + */ + @AnTransaction + public static void doTemplateReplaceParam(HttpRequest request) throws Exception + { + long paramCat = request.getParameterLong("paramCat", 1); + long designId = request.getParameterLong("designId"); + long typeId = request.getParameterLong("typeId"); + long industryId = request.getParameterLong("industryId"); + String paramData = request.getParameter("paramData"); + + // 查询已选模板 + List templateList = ORM.get(ZView.class).list(MediaTemplateView.class, new Selector("designId", designId)); + if (templateList.isEmpty()) + { + request.setResponseError("请选择模板"); + return; + } + + if (templateList.size() > 4) + { + request.setResponseError("已择模板不能超过4个,请根据实际需要选择."); + return; + } + + List mediaIdList = new ArrayList<>(); + for (MediaTemplateView media : templateList) + { + mediaIdList.add(media.getMediaId()); + } + + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, designId); + if (order == null) + { + request.setResponseError("订单不存在"); + return; + } + + // 增加或更新订单模板参数数据,便于保存 + DesTemplateOrder orderTemplate = ORM.get(ZTable.class).item(DesTemplateOrder.class, designId); + if (orderTemplate == null) + { + orderTemplate = new DesTemplateOrder(); + orderTemplate.setDesignId(designId); + orderTemplate.setTypeId(typeId); + orderTemplate.setIndustryId(industryId); + orderTemplate.setParamText(paramData); + + ORM.get(ZTable.class).insert(orderTemplate); + log.info("增加订单[" + designId + "]模板参数成功,参数:" + paramData); + } + else + { + Updater paramUpdater = new Updater(); + paramUpdater.addMust("designId", designId); + paramUpdater.addField("paramText", paramData); + ORM.get(ZTable.class).update(DesTemplateOrder.class, paramUpdater); + log.info("更新订单[" + designId + "]模板参数成功,参数:" + paramData); + } + + Map replaceMap = TemplateDao.doParseReplaceData(paramCat, paramData); + if (replaceMap.isEmpty()) + { + request.setResponseError("未匹配到有效参数"); + return; + } + + log.info("解析订单[" + designId + "]客户文本数据成功,replaceMap:" + replaceMap); + + for (long mediaId : mediaIdList) + { + // 替换素材参数值 + List exList = ORM.get(ZView.class).list(MediaMaterialParamEx.class, new Selector("mediaId", mediaId)); + for (MediaMaterialParamEx ex : exList) + { + MediaMaterialParamEx ext = TemplateDao.replaceMaterialParam(ex, replaceMap); + + Updater updater = new Updater(); + updater.addMust("mediaId", mediaId); + updater.addMust("bid", ext.getBid()); + updater.addMust("mid", ext.getMid()); + updater.addField("source", ext.getSource()); + + ORM.get(ZTable.class).update(MediaMaterial.class, updater); + } + + // 替换效果图 + String mediaUrl = MediaDao.createMediaEffect(mediaId); + Updater mupdater = new Updater(); + mupdater.addMust("mediaId", mediaId); + mupdater.addField("mediaUrl", mediaUrl); + mupdater.addField("updateTime", DateTimes.getDateTimeString()); + ORM.get(ZTable.class).update(MediaCanvas.class, mupdater); + } + + // svg展示图 + Map svgMap = TemplateDao.getTemplatePreview(mediaIdList); + HashMapSO jsonMap = new HashMapSO(); + jsonMap.put("svgMap", svgMap); + jsonMap.put("paramCat", paramCat); + jsonMap.put("designOrder", order); + + String ret = ZmlContexts.parseZmlPath(request, "/zview/des/presenter/templatePreviewInfo.zml", jsonMap); + request.setResponseResult(ret); + } + + /** + * 上传待识别图片 + * + * @param request + * @throws Exception + */ + public static void doUploadOcrImage(HttpRequest request) throws Exception + { + request.addValidate(new IsNotEmpty("data", "请选择图片")); + request.addValidate(new IsNotEmpty("suffix", "扩展名不能为空")); + if (!request.chkValidate()) + { + request.setResponseError(request.getAlertMsg()); + return; + } + + String data = request.getParameter("data"); + String suffix = request.getParameter("suffix"); + + int idx = data.indexOf(","); + byte[] bytes = Base64.decode(data.substring(idx + 1)); + + String curDate = DateTimes.getDateTime8String(); + String filePath = MediaPathDao.getTempLocalPre(curDate) + Ids.longId13() + "." + suffix; + + boolean isSuccess = Files.write(filePath, bytes); + if (!isSuccess) + { + request.setResponseError("图片保存失败,请重新上传"); + return; + } + + List dataList = BaiduDao.generalOcr(filePath); + if (dataList.isEmpty()) + { + request.setResponseError("未识别到有效文字"); + return; + } + + request.setResponseResult(Lists.toString(dataList, "\r\n")); + } + + /** + * 保存识别文本 + * + * @param request + * @throws Exception + */ + public static void doSaveOcrText(HttpRequest request) throws Exception + { + request.addValidate(new IsInteger("designId", "订单ID不能为空")); + if (!request.chkValidate()) + { + request.setResponseError(request.getAlertMsg()); + return; + } + + long designId = request.getParameterLong("designId"); + String ocrText = request.getParameter("ocrText"); + + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, designId); + if (order == null) + { + request.setResponseError("订单不存在"); + return; + } + + DesTemplateOrder desOrder = ORM.get(ZTable.class).item(DesTemplateOrder.class, designId); + if (desOrder == null) + { + desOrder = new DesTemplateOrder(); + desOrder.setDesignId(designId); + desOrder.setOcrText(ocrText); + desOrder.setTypeId(order.getTypeId()); + desOrder.setIndustryId(order.getIndustryId()); + + ORM.get(ZTable.class).insert(desOrder); + } + else + { + Updater paramUpdater = new Updater(); + paramUpdater.addMust("designId", designId); + paramUpdater.addField("ocrText", ocrText); + ORM.get(ZTable.class).update(DesTemplateOrder.class, paramUpdater); + } + } + + /** + * 根据订单id获取行业名称 + * + * @param request + * @throws Exception + */ + public static void doReFreshIndustryInfo(HttpRequest request) throws Exception + { + long designId = request.getParameterLong("designId"); + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, designId); + if (order == null) + { + request.setResponseError("订单不存在"); + return; + } + String industryName = Global.get(DesignIndustryCache.class).getIndustryName(order.getIndustryId()); + request.setResponseResult(Jsons.toString(industryName)); + + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/UploadFilePresenter.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/UploadFilePresenter.java new file mode 100644 index 0000000..e49815d --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/UploadFilePresenter.java @@ -0,0 +1,802 @@ +package com.zhiqim.yangcai.design.presenter; + +import java.awt.image.BufferedImage; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import javax.imageio.ImageIO; + +import org.icepdf.core.pobjects.Document; +import org.icepdf.core.pobjects.Page; +import org.icepdf.core.util.GraphicsRenderingHints; +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.HttpResponse; +import org.zhiqim.httpd.context.annotation.AnIntercept; +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.extend.HashMapSO; +import org.zhiqim.kernel.extend.MapSO; +import org.zhiqim.kernel.httpclient.HttpDownload; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.kernel.schedule.Day; +import org.zhiqim.kernel.schedule.Scheduler; +import org.zhiqim.kernel.util.Arrays; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Files; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.kernel.util.Lists; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Strings; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.kernel.util.consts.Int; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ORMException; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.uploadlarge.ZulConstants; +import org.zhiqim.uploadlarge.dbo.UpllFile; + +import com.itextpdf.text.pdf.PdfReader; +import com.itextpdf.text.pdf.parser.PdfTextExtractor; +import com.zhiqim.yangcai.design.constants.EventConstants; +import com.zhiqim.yangcai.design.constants.FileTypeConstants; +import com.zhiqim.yangcai.design.constants.StatusConstants; +import com.zhiqim.yangcai.design.dao.OrderCheckDao; +import com.zhiqim.yangcai.design.dao.OrderLogDao; +import com.zhiqim.yangcai.design.dbo.design.DesignType; +import com.zhiqim.yangcai.design.dbo.order.DesignAtta; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; +import com.zhiqim.yangcai.design.dbo.utils.BaseUtil; +import com.zhiqim.yangcai.design.task.TempFileDeleteTask; + +/** + * 上传ajax处理 + * + * @author zhouwenbin + * + */ +@AnAlias("UploadFilePresenter") +@AnIntercept("chkZmrLogin") +public class UploadFilePresenter implements ZulConstants +{ + public static final String TEMP_FOLDER = "./temp/"; + private static final Log log = LogFactory.getLog(UploadFilePresenter.class); + private static TempFileDeleteTask deleteTempFileTask = TempFileDeleteTask.getInstance(); + public static float MM = 2.83464579439252f;// pdf尺寸转毫米的系数 + + /** + * 上传处理 + * + * @param request + * @param oid + * @param fileId + * @throws Exception + */ + public static void doUplaodFile(HttpRequest request, long designId, String fileId, String fileType) throws Exception + { + if (!FileTypeConstants.isExist(fileType)) + { + request.setResponseError("不支持上传" + fileType); + return; + } + + UpllFile file = ORM.get(ZTable.class).item(UpllFile.class, new Selector("fileId", fileId).addReplace("id", null)); + String fileName = file.getFileName(); + String fileExt = Files.getFileExt(fileName); + if (Validates.isEmpty(fileExt)) + { + request.setResponseError("请检查文件扩展名是否正确,扩展名:" + fileExt); + return; + } + + long attaId = Ids.longId(); + int count = doFileCount(designId, fileName, fileType); + if (count == 0) + { + // 插入订单附属表 + DesignAtta atta = new DesignAtta(); + atta.setAttaId(attaId); + atta.setAttaModul(fileType); + atta.setDesignId(designId); + atta.setFileName(file.getFileName()); + atta.setFileType(file.getFileExt()); + atta.setFileSize(file.getFileLength()); + atta.setSavePath(file.getFilePath()); + atta.setUploadTime(Sqls.nowTimestamp()); + atta.setOperatorCode(request.getSessionName()); + atta.setFileid(fileId); + + ORM.get(ZTable.class).insert(atta); + + // 插入日志 + OrderLogDao.saveOrderOperateLog(designId, request.getSessionName(), "上传" + FileTypeConstants.getName(fileType), EventConstants.ORDER_16.value()); + if (FileTypeConstants.FILE_END.value().equals(fileType) && "pdf".equals(file.getFileExt())) + {// 成品文件检测 + String ret = OrderCheckDao.doCheckFile(designId, fileName, fileType); + if (Validates.isNotEmpty(ret)) + { + OrderCheckDao.doDeleteEndFile(atta); + OrderLogDao.saveOrderOperateLog(designId, request.getSessionName(), "文件审核失败自动删除", EventConstants.ORDER_16.value()); + + request.setResponseError(ret); + return; + } + } + } + + // 订单客户文件 + Selector selector = new Selector(); + selector.addMust("designId", designId); + selector.addMust("attaModul", fileType); + List tlist = ORM.get(ZTable.class).list(DesignAtta.class, selector); + + Map jsonMap = new HashMap(); + jsonMap.put("attaList", tlist); + jsonMap.put("uploadAttaId", attaId); + + request.setResponseResult(Jsons.toString(jsonMap)); + + } + + /*** + * 下载 + * + * @param request + * @throws Exception + * @editor HuangZhiGao + * @date 2020/3/3 15:18 + * @description 当订单号(designId)和下载文件的类型(fileType)不为空时,下载对应订单对应类型的文件 + */ + public static void doDownloadFile(HttpRequest request) throws Exception + { + long designId = request.getParameterLong("designId"); + String fileType = request.getParameter("fileType", ""); + + if (designId != -1L && Validates.isNotEmptyBlank(fileType)) + { + Selector selector = new Selector("designId", designId); + selector.addMust("attaModul", fileType); + List fileList = ORM.get(ZTable.class).list(DesignAtta.class, selector); + + if (Validates.isEmpty(fileList) || fileList.size() == 0) + { + request.setResponseError("当前订单没有" + FileTypeConstants.get(fileType).desc()); + return; + } + else + { + StringBuffer attaIdsBf = new StringBuffer(""); + for (DesignAtta file : fileList) + { + attaIdsBf.append(file.getAttaId()).append(","); + } + String attaIds = Strings.trimRight(attaIdsBf.toString(), ","); + + MapSO attrMap = new HashMapSO(); + attrMap.put("attaIds", attaIds); + HttpResponse response = request.getResponse(); + response.print(Jsons.toString(attrMap)); + + doDowloadFile(attaIds); + } + } + else + { + doDowloadFile(request.getParameter("attaId")); + } + + // 启动临时文件删除任务 每天早上在 5:29:59 执行 + if (!deleteTempFileTask.isRunning()) + { + Scheduler scheduler = Global.getWithoutNew(Scheduler.class); + scheduler.create(); + scheduler.addTask(new Day(deleteTempFileTask, 5, 29, 59)); + deleteTempFileTask.setRunning(true); + } + } + + private static void doDowloadFile(String attaIds) throws Exception + { + List attaIdList = Lists.toStringList(attaIds); + Iterator iterator = attaIdList.iterator(); + while (iterator.hasNext()) + {// 不是整形 + if (!Validates.isNumeric(iterator.next())) + { + iterator.remove(); + } + } + + if (attaIdList.size() == 0) + { + return; + } + + List attaList = ORM.get(ZTable.class).list(DesignAtta.class, + new Selector().addMustInLong("attaId", Arrays.toLongArray(Lists.toString(attaIdList)))); + for (DesignAtta atta : attaList) + { + // 1.查看临时文件 + String tempFileDir = UploadFilePresenter.getCurrentTempFolder(Strings.addEndsWith(atta.getAttaModul(), "/")); + File tempFile = new File(tempFileDir + atta.getAttaId() + Strings.addStartsWith(atta.getFileType(), ".")); + if (tempFile.exists() && tempFile.isFile()) + { + continue; + } + + // 2.查看本地文件 + if (Validates.isNotEmptyBlank(atta.getSavePath())) + { + File file = new File(atta.getSavePath()); + if (file.exists() && file.isFile()) + { + continue; + } + } + + // 3.查看网络文件 + if (Validates.isUrl(atta.getOssUrl())) + { + HttpDownload download = new HttpDownload(atta.getOssUrl()); + download.setConnectTimeout(30); + download.setReadTimeout(50 * 60); + download.setFileDir(tempFileDir); + download.setFileName(tempFile.getName()); + download.execute(); + } + } + + } + + /** + * 文件是否已上传 + * + * @param request + * @param fileId + * @return + * @throws Exception + */ + public static int doFileCount(long designId, String fileName, String attaModul) throws Exception + { + int status = 0; + + Selector selector = new Selector(); + selector.addMust("designId", designId); + selector.addMust("attaModul", attaModul); + if (!FileTypeConstants.FILE_END.value().equals(attaModul)) + { + selector.addMust("fileName", fileName); + } + if (ORM.get(ZTable.class).count(DesignAtta.class, selector) > 0) + { + status = 1; + } + + return status; + } + + /** + * 删除文件 + * + * @param str + * @return + * @throws Exception + */ + public static void doDeleteFile(HttpRequest request, String strs) throws Exception + { + long[] attaidArr = Arrays.toLongArray(strs); + if (attaidArr.length <= 0) + { + request.setResponseError("删除文件数据不存在"); + return; + } + + List attaList = ORM.get(ZTable.class).list(DesignAtta.class, new Selector().addMustInLong("attaId", attaidArr)); + for (DesignAtta atta : attaList) + { + long designId = atta.getDesignId(); + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, designId); + if (order == null) + { + request.setResponseError("订单不存在"); + return; + } + + if (order.getStatus() >= StatusConstants.ORDER_60.value() && !atta.getAttaModul().equals(FileTypeConstants.FILE_AFTE_COMPLAIN_EVIDENCE.value())) + {// 非售后 凭证文件不允许删除 + request.setResponseError("订单已审,不允许删除订单文件"); + return; + } + + OrderCheckDao.doDeleteAttaFile(atta); + OrderLogDao.saveOrderOperateLog(atta.getDesignId(), request.getSessionName(), "删除上传的[" + atta.getAttaModul() + "]文件", + EventConstants.ORDER_20.value()); + + } + + request.setResponseResult("删除成功"); + } + + /** + * 文件命名检测 + * + * @param request + * @param billId + * @param fileType + * @param fileName + * @throws Exception + */ + public static void doCheckFileName(HttpRequest request, long designId, String fileType, String fileName) throws Exception + { + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, designId); + if (order == null) + { + request.setResponseError("订单不存在-" + designId); + return; + } + + DesignType designType = ORM.get(ZTable.class).item(DesignType.class, new Selector().addMust("typeId", order.getTypeId())); + Int ret = OrderCheckDao.checkFileName(fileName, "" + designId, order.getBuyerNick(), order.getUserContact(), designType.getPrintingFileType()); + if (ret.value() == -1) + { + request.setResponseError(ret.desc()); + return; + } + if (FileTypeConstants.FILE_END.value().equals(fileType)) + { + } + else + {// 非成品文件不允许重复上传 + int count = doFileCount(designId, fileName, fileType); + if (count > 0) + { + request.setResponseError("文件已上传,无需重复上传"); + return; + } + if (FileTypeConstants.FILE_DESGIN.value().equals(fileType)) + { + ret = OrderCheckDao.checkEndFileFormat(order.getTypeId(), Files.getFileExt(fileName), designType.getDesignFileType()); + if (ret.value() == -1) + { + request.setResponseError(ret.desc()); + return; + } + } + } + + } + + /** + * + * [简要描述] 成品文件选择回调校验:
            + * [详细描述]:
            + * + * @author gjx + */ + public static String doEndFileSelectedCheck(DesignOrder order, String path) + { + if (order == null) + { + return "订单不存在"; + } + + long designId = order.getDesignId(); + if (path == null) + { + return "文件审核失败,系统找不到指定的文件"; + } + + File file = new File(path); + if (!file.exists()) + { + return "文件审核失败,系统找不到指定的文件"; + } + + PdfReader readerN = null; + try + { + // 文字转曲判断 + readerN = new PdfReader(path); + int nrPages = readerN.getNumberOfPages(); + for (int i = 1; i < nrPages; i++) + { + String text = PdfTextExtractor.getTextFromPage(readerN, i); + if (text != null && !"".equals(text)) + { + return ("文件审核失败,第" + i + "页有文字未转曲!"); + } + } + } + catch (Exception e) + { + log.error("文件审核异常[" + designId + "]:" + e.getMessage(), e); + return "文件审核失败,有文字未转曲或编码异常!"; + } + catch (Error e) + { + log.error("文件审核异常[" + designId + "]:" + e.getMessage(), e); + return "文件审核失败,有文字未转曲或编码异常!"; + } + finally + { + if (readerN != null) + { + readerN.close(); + } + } + + // 透明PVC名片,并且是印白墨后加工的情况,不判断版面数量,因为有白墨版,比较特殊 --caohong + if (order.getTypeId() == 1806070857392601L && order.getAfterNames() != null && order.getAfterNames().contains("印白墨")) + { + return ""; + } + + int pageValue = order.getDesignPage(); + double stdWidth = order.getDesignWidth(); + double stdHeight = order.getDesignHeight(); + + // 优惠券产品需要特殊处理,由于录单去掉了模位计算操作,审核的时候需要使用名片标准尺寸来检查内容。--caohong 2019-11-12 + if ("1710131129568467".equals(String.valueOf(order.getTypeId()))) + { + stdWidth = 92; + stdHeight = 56; + + double tmpWidth = order.getDesignWidth(); + double tmpHeight = order.getDesignHeight(); + if (order.getPrintWidth() > 0 && order.getPrintHeight() > 0) + { + tmpWidth = order.getPrintWidth(); + tmpHeight = order.getPrintHeight(); + } + // 临时计算模位用于计算检测 + int ms; + try + { + ms = BaseUtil.calcMod("92X56", new Double(tmpWidth).intValue(), new Double(tmpHeight).intValue(), 0); + order.setPrintMs(ms); + } + catch (Exception e) + { + log.error("文件审核异常[" + designId + "]:" + e.getMessage(), e); + return "优惠券产品计算模数失败"; + } + + } + + // 画册产品不需要检查内容,比较复杂 + if (!"3".equals(String.valueOf(order.getTypeId()))) + { + Document document = new Document(); + try + { + document.setFile(path); + int pageTotal = document.getNumberOfPages(); + if (pageTotal < 1) + { + return "文件审核失败,成品文件无页面"; + } + + // 总页数%单或双面 + if (pageTotal % pageValue != 0) + { + return "文件审核失败,成品文件页数错误"; + } + + float firstWidth = 0f, firstHeight = 0f; + + boolean flag = false; + float scale = 1f; + float rotation = 0f; + + // 获取第一条文件尺寸 + BufferedImage oneImage = document.getPageImage(0, GraphicsRenderingHints.SCREEN, Page.BOUNDARY_CROPBOX, rotation, scale); + firstWidth = oneImage.getWidth() / MM; + firstHeight = oneImage.getHeight() / MM; + + for (int i = 1; i < pageTotal; i++) + { + BufferedImage image = document.getPageImage(i, GraphicsRenderingHints.SCREEN, Page.BOUNDARY_CROPBOX, rotation, scale); + if (Math.abs(image.getWidth() / MM - firstWidth) >= 0.1) + { + return "文件审核失败,第" + i + "页,尺寸错误,实际宽:" + firstWidth + ",期望宽:" + stdWidth; + } + + if (Math.abs(image.getHeight() / MM - firstHeight) >= 0.1) + { + return "文件审核失败,第" + i + "页,尺寸错误,实际高:" + firstHeight + ",期望高:" + stdHeight; + } + } + + // 误差不超过0.1,则收为整数 + firstWidth = Math.round(firstWidth); + firstHeight = Math.round(firstHeight); + + // 根据面积判断是否符合规则 92*56 3款2模 92*56*6 + float rate = (float) Math + .abs((firstWidth * firstHeight * pageTotal / pageValue) - (stdWidth * stdHeight * order.getPrintMs() * order.getPrintKs())); + if (rate < 0.1) + { + flag = true; + } + + if (!flag) + { + return "文件审核失败,尺寸或模数错误"; + } + } + catch (Exception e) + { + log.error("[订单" + designId + "]成品文件审核异常," + e.getMessage(), e); + return "文件审核异常,请重新上传."; + } + finally + { + document.dispose(); + } + } + return null; + + } + + /** 获取OSS文件网络路径 */ + public static void doGetOssFileUrl(HttpRequest request) throws Exception + { + long attaid = request.getParameterLong("attaId", 0); + DesignAtta atta = ORM.get(ZTable.class).item(DesignAtta.class, new Selector("attaId", attaid)); + String viewFileUrl = ""; + if (atta != null && Validates.isNotEmptyBlank(atta.getOssUrl())) + { + viewFileUrl = atta.getOssUrl(); + } + + request.setResponseResult(viewFileUrl); + } + + /** + * 获取成品文件pdf页数 + * + * @param request + * @throws Exception + */ + public static void getPdfPages(HttpRequest request) throws Exception + { + long attaId = request.getParameterLong("attaId", 0); + DesignAtta atta = ORM.get(ZTable.class).item(DesignAtta.class, attaId); + if (atta == null) + { + request.setResponseError("文件不存在"); + return; + } + + int pages = getPdfThumbnailPages(atta); + request.setResponseResult("" + pages); + } + + /*** + * 创建成品文件缩略图 + * + * @param atta 附件信息 + * @return 返回缩略图 页数数 + * @throws Exception + */ + public static int getPdfThumbnailPages(DesignAtta atta) throws Exception + { + int page = 0; + if (!"pdf".equalsIgnoreCase(atta.getFileType())) + { + return page; + } + + page = getThumFileNames(atta).size(); + if (page > 0) + { + return page; + } + + // 1.本地存在 临时文件 + String tempFilePath = Strings.addEndsWith(getCurrentTempFolder(Strings.addEndsWith(FileTypeConstants.FILE_END.value(), "/")), "/") + atta.getAttaId() + + Strings.addStartsWith(atta.getFileType(), "."); + File tempFile = new File(tempFilePath); + if (tempFile.exists() && tempFile.isFile()) + { + return crateTempThumbnail(atta.getAttaId(), tempFile); + } + + // 2.本地 存储路径文件 + if (Validates.isNotEmptyBlank(atta.getSavePath())) + { + File file = new File(atta.getSavePath()); + if (file.exists() && file.isFile()) + { + return crateTempThumbnail(atta.getAttaId(), file); + } + } + + // 3.下载一份 + if (Validates.isNotEmptyBlank(atta.getOssUrl())) + { + doDowloadFile("" + atta.getAttaId()); + tempFile = new File(tempFilePath); + if (tempFile.exists() && tempFile.isFile()) + { + return crateTempThumbnail(atta.getAttaId(), tempFile); + } + } + + // 启动临时文件删除任务 每天早上在 5:29:59 执行 + if (!deleteTempFileTask.isRunning()) + { + Scheduler scheduler = Global.getWithoutNew(Scheduler.class); + scheduler.create(); + scheduler.addTask(new Day(deleteTempFileTask, 5, 29, 59)); + deleteTempFileTask.setRunning(true); + } + + return page; + } + + /*** + * 获取缩略图 + * + * @param atta 附件信息 + * @return 返回附件对应的缩略图文件名列表 + * @throws Exception + */ + public static List getThumFileNames(DesignAtta atta) throws Exception + { + File fileFolder = new File(Strings.addEndsWith(getCurrentTempFolder(Strings.addEndsWith(FileTypeConstants.FILE_THUMFILE.value(), "/")), "/")); + + List list = new ArrayList(); + if (!fileFolder.exists()) + { + return list; + } + + if (fileFolder.isDirectory()) + { + File[] files = fileFolder.listFiles(); + if (null != files) + { + for (File tempFile : files) + { + String tempFileName = Files.getFileName(tempFile.getCanonicalPath()); + String prefix = atta.getAttaId() + Strings.addStartsWith(FileTypeConstants.FILE_THUMFILE.value(), "-"); + if (Strings.startsWith(tempFileName, prefix)) + { + list.add(tempFileName); + } + } + } + } + + return list; + } + + /*** + * 生成临时 缩略图 + * + * @param attaId 附件编号 + * @param file pdf文件 + * @return pdf 页数 + * @throws Exception 异常 + */ + private static int crateTempThumbnail(long attaId, File file) throws Exception + { + int page = 0; + if (file == null || !file.exists() || file.isDirectory()) + { + return page; + } + if (!"pdf".equalsIgnoreCase(Files.getFileExt(file.getCanonicalPath()))) + { + return page; + } + + if (file.exists()) + {// 生成缩略图 + Document document = new Document(); + document.setFile(file.getCanonicalPath()); + int totalPage = document.getNumberOfPages(); + + float scale = 2f; + float rotation = 0f; + + String thumFilePath = Strings.addEndsWith(getCurrentTempFolder(FileTypeConstants.FILE_THUMFILE.value()), "/"); + for (int i = 0; i < totalPage; i++) + { + + String thumFileName = thumFilePath + attaId + "-" + FileTypeConstants.FILE_THUMFILE.value() + "-" + (i + 1) + ".png"; + try + { + BufferedImage image = document.getPageImage(i, GraphicsRenderingHints.SCREEN, Page.BOUNDARY_CROPBOX, rotation, scale); + + ByteArrayOutputStream out = new ByteArrayOutputStream(); + ImageIO.write(image, "png", out); + byte[] imgb = out.toByteArray(); + Files.write(thumFileName, imgb); + page++; + } + catch (Exception e) + { + log.error("订单[" + attaId + "]缩略图page=" + i + "生成异常:", e); + } + } + } + + return page; + } + + /*** + * 获取当天临时文件目录 + * + * @return 例:./temp/20180112/ + */ + public static String getCurrentTempFolder(String fileModel) + { + String date = DateTimes.getDateTime8String(); + String folder = Strings.addEndsWith(TEMP_FOLDER, "/") + date; + folder = Strings.addEndsWith(folder, "/"); + if (Validates.isNotEmptyBlank(fileModel)) + { + folder = folder + Strings.addEndsWith(fileModel, "/"); + } + + File folderFile = new File(folder); + if (!folderFile.exists()) + { + Files.mkDirectory(folder); + } + + return folder; + } + + /**** + * 获取未上传到Oss的附件列表 + * + * @param request + * @param startDate 上传开始时间 + * @param endDate 上传结束时间 + * @return 返回Map 的json数据 String error = map.get("error") 不为空字符串则表示有错误,List dataList + * = map.get("dataList")表示 数据列表 + * @throws Exception + */ + public static String getOSSNotExsistsAtta(HttpRequest request, String startDate, String endDate) + { + String error = ""; + Map jsonMap = new HashMap(); + if (!Validates.isDate(startDate) || Validates.isDate(startDate)) + { + error = "参数[]或者[]不是yyyy-MM-dd 格式"; + jsonMap.put("error", error); + return Jsons.toString(jsonMap); + } + List dataList = new ArrayList(); + Selector selector = new Selector(); + selector.addMustIsNull("ossUrl"); + selector.addMustThenGE("uploadTime", Sqls.toTimestamp(startDate, "00:00:00")); + selector.addMustThenLE("uploadTime", Sqls.toTimestamp(endDate, "23:59:59")); + selector.addOrderbyDesc("uploadTime"); + + try + { + dataList.addAll(ORM.get(ZTable.class).list(DesignAtta.class, selector)); + } + catch (ORMException | SQLException e) + { + error = e.getMessage(); + jsonMap.put("error", error); + return Jsons.toString(jsonMap); + } + + return Jsons.toString(jsonMap); + } + +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/UserMaterialPresenter.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/UserMaterialPresenter.java new file mode 100644 index 0000000..8733779 --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/UserMaterialPresenter.java @@ -0,0 +1,164 @@ +package com.zhiqim.yangcai.design.presenter; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.annotation.AnIntercept; +import org.zhiqim.httpd.validate.ones.IsNotEmpty; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnFilterNot; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.media.dbo.MaterialSvg; +import com.zhiqim.media.service.dao.MediaDao; +import com.zhiqim.media.service.dao.MediaPathDao; +import com.zhiqim.media.service.util.SvgUtil; +import com.zhiqim.yangcai.design.dbo.template.UserMaterial; + +/** + * 用户素材管理 + * + * @version v1.0.0 @author zhouwenbin 2018-9-12 新建与整理 + */ +@AnAlias("UserMaterialPresenter") +@AnIntercept("chkZmrLogin") +public class UserMaterialPresenter +{ + /** + * 添加用户素材 + * + * @param request + * @throws Exception + */ + public static void doAddUserMaterial(HttpRequest request) throws Exception + { + request.addValidate(new IsNotEmpty("typeCode", "素材类型不能为空")); + request.addValidate(new IsNotEmpty("catCode", "素材分类不能为空")); + request.addValidate(new IsNotEmpty("svgCode", "素材内容不能为空")); + if (!request.chkValidate()) + { + request.setResponseError(request.getAlertMsg()); + return; + } + + String typeCode = request.getParameter("typeCode"); + String catCode = request.getParameter("catCode"); + String keywords = request.getParameter("keywords"); + String svgCode = request.getParameterNoFilter("svgCode"); + + String designer = request.getSessionName(); + int svgSeq = ORM.get(ZTable.class).count(UserMaterial.class, new Selector().addMust("designer", designer)) + 1; + UserMaterial data = new UserMaterial(); + data.setSvgId(Ids.longId13()); + data.setCatCode(catCode); + data.setTypeCode(typeCode); + data.setSvgCode(svgCode); + data.setSvgSeq(svgSeq); + data.setKeywords(keywords); + data.setDesigner(request.getSessionName()); + + ORM.get(ZTable.class).insert(data); + } + + /** + * 查询用户素材 + * + * @param request + * @throws Exception + */ + public static void doQueryUserMaterial(HttpRequest request) throws Exception + { + int page = request.getParameterInt("page", 1); + String typeCode = request.getParameter("typeCode"); + String catCode = request.getParameter("catCode"); + + String designer = request.getSessionName(); + + Selector sel = new Selector(); + sel.addMust("designer", designer); + sel.addMaybe("typeCode", typeCode); + sel.addMaybe("catCode", catCode); + sel.addOrderbyDesc("svgSeq"); + PageResult result = ORM.get(ZTable.class).page(UserMaterial.class, page, 30, sel); + + request.setResponseResult(Jsons.toString(result.list())); + } + + /** 获取用户素材 */ + @AnFilterNot + public static void getUserMaterialSvg(HttpRequest request, long svgId) throws Exception + { + UserMaterial item = ORM.get(ZTable.class).item(UserMaterial.class, svgId); + request.setResponseResult(item.toString()); + } + + /** 删除用户素材 */ + public static void doDelUserMaterial(HttpRequest request, long svgId) throws Exception + { + ORM.get(ZTable.class).delete(UserMaterial.class, svgId); + } + + /** 用户素材选为系统素材 */ + public static void doApplySysMaterial(HttpRequest request) throws Exception + { + request.addValidate(new IsNotEmpty("svgId", "素材Id不能为空")); + request.addValidate(new IsNotEmpty("typeCode", "素材类型不能为空")); + request.addValidate(new IsNotEmpty("catCode", "素材分类不能为空")); + + if (!request.chkValidate()) + { + request.setResponseError(request.getAlertMsg()); + return; + } + + long svgId = request.getParameterLong("svgId"); + String typeCode = request.getParameter("typeCode"); + String catCode = request.getParameter("catCode"); + String keywords = request.getParameter("keywords"); + int svgSeq = request.getParameterInt("svgSeq", 1); + + if (ORM.get(ZTable.class).count(MaterialSvg.class, new Selector().addMust("svgId", svgId)) > 0) + { + request.setResponseError("该素材已添加,无须重复添加"); + return; + } + + UserMaterial userMaterial = ORM.get(ZTable.class).item(UserMaterial.class, svgId); + + // TODO 暂共享图片,不复制 + String svgCode = userMaterial.getSvgCode(); + + String thumbnailName = svgId + "_thumbnail.png"; + String thumbnailPath = MediaPathDao.getSysMaterialLocalPre(catCode + "/thumbnail") + thumbnailName; + String svgThumbnail = MediaPathDao.getSysMaterialUrlPre(catCode + "/thumbnail") + thumbnailName; + + try + {// 生成缩略图 + String prePath = MediaPathDao.MEDIA_URL_PRE; + String source = MediaDao.addPrePath(svgCode, prePath); // 添加访问前缀 + SvgUtil.svg2Png(source, thumbnailPath, 150, 0); + } + catch (Exception e) + { + request.setResponseError("素材缩略图生成失败," + e.getMessage()); + return; + } + + MaterialSvg item = new MaterialSvg(); + item.setSvgId(svgId); + item.setTypeCode(typeCode); + item.setIsEdit(0); + item.setIsUpload(1);// 上传 + item.setCatCode(catCode); + item.setKeywords(keywords); + item.setSvgStatus(0); + item.setSvgSeq(svgSeq); + item.setSvgThumbnail(svgThumbnail); + item.setSvgCode(svgCode); + + ORM.get(ZTable.class).insert(item); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/WorksPresenter.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/WorksPresenter.java new file mode 100644 index 0000000..ca63b0b --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/WorksPresenter.java @@ -0,0 +1,1468 @@ +package com.zhiqim.yangcai.design.presenter; + +import java.awt.image.BufferedImage; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.util.ArrayList; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import javax.imageio.ImageIO; + +import org.icepdf.core.pobjects.Document; +import org.icepdf.core.pobjects.Page; +import org.icepdf.core.util.GraphicsRenderingHints; +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.ZmlContexts; +import org.zhiqim.httpd.context.annotation.AnIntercept; +import org.zhiqim.httpd.validate.ones.IsNotEmpty; +import org.zhiqim.httpd.validate.ones.IsSelect; +import org.zhiqim.httpd.validate.onex.IsInteger; +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.annotation.AnTransaction; +import org.zhiqim.kernel.constants.SignConstants; +import org.zhiqim.kernel.extend.HashMapSO; +import org.zhiqim.kernel.extend.MapSO; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.Arrays; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Files; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.kernel.util.Lists; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Strings; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.kernel.util.codes.Base64; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; +import org.zhiqim.uploadlarge.dbo.UpllFile; + +import com.zhiqim.media.dbo.MediaCanvas; +import com.zhiqim.yangcai.cache.DesignIndustryCache; +import com.zhiqim.yangcai.cache.DesignTypeCache; +import com.zhiqim.yangcai.design.dao.DesignTypeDao; +import com.zhiqim.yangcai.design.dao.KeywordDao; +import com.zhiqim.yangcai.design.dao.OssFileDao; +import com.zhiqim.yangcai.design.dao.WorksDao; +import com.zhiqim.yangcai.design.dbo.DesLabelAttribute; +import com.zhiqim.yangcai.design.dbo.DesLabelIndustry; +import com.zhiqim.yangcai.design.dbo.design.DesignIndustry; +import com.zhiqim.yangcai.design.dbo.design.DesignType; +import com.zhiqim.yangcai.design.dbo.template.MediaTemplate; +import com.zhiqim.yangcai.design.dbo.template.MediaTemplateView; +import com.zhiqim.yangcai.design.dbo.works.DesMaterialCont; +import com.zhiqim.yangcai.design.dbo.works.DesWorksEvent; +import com.zhiqim.yangcai.design.dbo.works.DesWorksEventView; +import com.zhiqim.yangcai.design.dbo.works.DesWorksFile; +import com.zhiqim.yangcai.util.SolrUtil; + +/** + * 作品库Presenter + * + * @version 1.0 @author caohong 2019-9-5 新建与整理 + */ +@AnAlias("WorksPresenter") +@AnIntercept("chkZmrLogin") +public class WorksPresenter implements SignConstants +{ + private static Log log = LogFactory.getLog(WorksPresenter.class); + + /** + * 作品查询 + * + * @param request + * @param indIdarr + * @param prdIdarr + * @throws Exception + */ + public static void doWorksSearch(HttpRequest request) throws Exception + { + ZmrSessionUser user = request.getSessionUser(ZmrSessionUser.class); + + int page = request.getParameterInt("page", 1); + int pageSize = 20; + + String prdIdarr = request.getParameter("prdIdarr"); + String indIdarr = request.getParameter("indIdarr"); + String urlParam = request.getParameter("urlParam"); + String[] deptStr = Arrays.toStringArray(user.getOperator().getOperatorDeptAll()); + + Selector selector = new Selector(); + selector.addOrderbyDesc("createTime"); + selector.addMustIsNotNull("pdfPath"); + + if (Validates.isNotEmpty(prdIdarr)) + { + selector.addMustInLong("prdTypeId", Arrays.toLongArray(prdIdarr)); + } + + if (Validates.isNotEmpty(indIdarr)) + { + selector.addMustInLong("industryId", Arrays.toLongArray(indIdarr)); + } + + if (Validates.isNotEmpty(urlParam) && urlParam.equals("BEST")) + { + selector.addMustIn("worksType", 1, 4); + } + + if (Validates.isNotEmpty(urlParam) && urlParam.equals("GROUP")) + { + selector.addMaybeLike("designGroupId", user.getOperator().getOperatorDept()); + } + + if (Validates.isNotEmpty(urlParam) && urlParam.equals("MY")) + { + selector.addMust("designer", user.getOperatorCode()); + } + + if (Validates.isNotEmpty(urlParam) && urlParam.equals("COLLECT")) + { + selector.addMust("operatorCode", user.getOperatorCode()); + selector.addMust("eventType", 2); + } + + if (Validates.isNotEmpty(urlParam) && urlParam.equals("MYBEST")) + { + selector.addMust("designer", user.getOperatorCode()); + selector.addMustIn("worksType", 1, 4); + } + + if (Validates.isNotEmpty(urlParam) && urlParam.equals("SHARE")) + { + if (Validates.isNotEmpty(user.getOperator().getOperatorDeptAll())) + { + if (deptStr.length == 1) + { + selector.addMustLike("deptId", deptStr[0]); + } + else if (deptStr.length > 1) + { + Selector sel = new Selector(); + for (String dept : deptStr) + { + sel.addMustLike("deptId", dept); + } + selector.addOr(sel); + } + } + } + + if (Validates.isNotEmpty(urlParam) && urlParam.equals("AUDIT")) + { + selector.addMust("worksType", 2); + } + + MapSO attrMap = new HashMapSO(); + if (Validates.isNotEmpty(urlParam) && urlParam.equals("COLLECT")) + { + PageResult pageResult = ORM.get(ZView.class).page(DesWorksEventView.class, page, pageSize, selector); + attrMap.put("pageResult", pageResult); + } + else + { + PageResult pageResult = ORM.get(ZTable.class).page(DesWorksFile.class, page, pageSize, selector); + attrMap.put("pageResult", pageResult); + } + attrMap.put("prdIdarrs", Lists.toLongList(prdIdarr)); + attrMap.put("prdIdarr", prdIdarr); + attrMap.put("indIdarr", indIdarr); + if (Validates.isNotEmpty(urlParam) && urlParam.equals("AUDIT")) + { + attrMap.put("param", "AUDIT"); + } + + if (Validates.isNotEmpty(urlParam) && urlParam.equals("BEST")) + { + attrMap.put("apple", "BEST"); + } + + String ret = ZmlContexts.parseZmlPath(request, "/zview/works/presenter/worksInfo.zml", attrMap); + request.setResponseResult(ret); + } + + /** + * 删除作品库 + * + * @param worksId + * @throws Exception + */ + public static void doWorksDelete(long worksId) throws Exception + { + DesWorksFile works = ORM.get(ZTable.class).item(DesWorksFile.class, worksId); + if (works != null && works.getUploadType() == 1) + { + // 手动上传作品 + // 1.删除源文件 + String srcPath = works.getCdrPath(); + if (Validates.isUrl(srcPath)) + {// 已经上传到OSS + int ind = srcPath.indexOf("/works/"); + String fileKey = Strings.trim(OssFileDao.getPrefix_dir(), "/", "/") + "/" + srcPath.substring(ind + 1); + log.info("删除cdr:" + OssFileDao.deleteOssFile(fileKey)); + } + // 2.删除pdf文件 + String pdfPath = works.getPdfPath(); + if (Validates.isUrl(pdfPath)) + {// 已经上传到OSS + int ind = pdfPath.indexOf("/works/"); + String fileKey = Strings.trim(OssFileDao.getPrefix_dir(), "/", "/") + "/" + pdfPath.substring(ind + 1); + log.info("删除pdf:" + OssFileDao.deleteOssFile(fileKey)); + } + + // 3.删除缩略图 + List list = Lists.toStringList(works.getThumbImagePath()); + for (String ossUrl : list) + { + int ind = ossUrl.indexOf("/works/"); + String fileKey = Strings.trim(OssFileDao.getPrefix_dir(), "/", "/") + "/" + ossUrl.substring(ind + 1); + log.info("删除缩略图:" + OssFileDao.deleteOssFile(fileKey)); + } + } + + ORM.get(ZTable.class).delete(DesWorksFile.class, worksId); + } + + /** + * 取消精品 + * + * @param worksId + * @throws Exception + */ + public static void doWorksCancel(long worksId) throws Exception + { + Updater updater = new Updater(); + updater.addMust("worksId", worksId); + updater.addField("worksType", 0); + ORM.get(ZTable.class).update(DesWorksFile.class, updater); + } + + /** + * 申请精品 + * + * @param request + * @param worksId + * @throws Exception + */ + public static void doWorksAdd(HttpRequest request, long worksId) throws Exception + { + DesWorksFile works = ORM.get(ZTable.class).item(DesWorksFile.class, worksId); + if (works.getWorksType() == 2) + { + request.setResponseError("该作品正处于精品待审"); + return; + } + + Updater updater = new Updater(); + updater.addMust("worksId", worksId); + updater.addField("worksType", 2); + + ORM.get(ZTable.class).update(DesWorksFile.class, updater); + } + + /** + * 精品审核 + * + * @param worksId + * @throws Exception + */ + public static void doWorksAudit(long worksId, String type) throws Exception + { + Updater updater = new Updater(); + updater.addMust("worksId", worksId); + if ("yes".equals(type)) + { + updater.addField("worksType", 1); + } + else + { + updater.addField("worksType", 0); + } + + ORM.get(ZTable.class).update(DesWorksFile.class, updater); + } + + /** + * 申请模板 + * + * @param works + * @throws Exception + */ + public static void doTemplateAdd(String works) throws Exception + { + String[] worksStr = works.split(","); + for (String worksId : worksStr) + { + Updater updater = new Updater(); + updater.addMust("worksId", Long.parseLong(worksId)); + updater.addField("worksType", 3); + ORM.get(ZTable.class).update(DesWorksFile.class, updater); + } + } + + /** + * 模板审核通过 + * + * @param worksId + * @throws Exception + */ + public static void doTemplateAudit(long worksId, String type) throws Exception + { + Updater updater = new Updater(); + updater.addMust("worksId", worksId); + if ("yes".equals(type)) + { + updater.addField("worksType", 4); + } + else + { + updater.addField("worksType", 1); + } + + ORM.get(ZTable.class).update(DesWorksFile.class, updater); + } + + /** + * 作品库分享 + * + * @param worksId + * @param deptId + * @throws Exception + */ + public static void doWorksShare(long worksId, String deptId) throws Exception + { + DesWorksFile works = ORM.get(ZTable.class).item(DesWorksFile.class, worksId); + Updater updater = new Updater(); + updater.addMust("worksId", worksId); + if (Validates.isNotEmpty(works.getDeptId())) + { + if (works.getDeptId().contains(deptId)) + { + List strList = new ArrayList(); + String[] deptStr = works.getDeptId().split(","); + for (String str : deptStr) + { + if (str.equals(deptId)) + { + continue; + } + + strList.add(str); + } + + updater.addField("deptId", Lists.toString(strList)); + } + else + { + String dept = works.getDeptId() + "," + deptId; + updater.addField("deptId", dept); + } + } + else + { + updater.addField("deptId", deptId); + } + + ORM.get(ZTable.class).update(DesWorksFile.class, updater); + } + + /** + * 获取子行业名称 + * + * @param industrySubIds + * @return + * @throws Exception + */ + public static String doIndustrySubName(String industrySubIds) throws Exception + { + String subsName = ""; + for (String subs : industrySubIds.split(",")) + { + DesLabelIndustry industry = ORM.get(ZTable.class).item(DesLabelIndustry.class, Long.parseLong(subs)); + if (industry == null) + { + continue; + } + + subsName += industry.getIndustrySubName() + " "; + } + + return subsName.substring(0, subsName.length() - 1); + } + + /** + * 获取属性名称 + * + * @param attributeIds + * @return + * @throws Exception + */ + public static String doAttributeName(String attributeIds) throws Exception + { + String attributeName = ""; + for (String subs : attributeIds.split(",")) + { + DesLabelAttribute attr = ORM.get(ZTable.class).item(DesLabelAttribute.class, Long.parseLong(subs)); + if (attr == null) + { + continue; + } + + attributeName += attr.getAttributeName() + " "; + } + + return attributeName.substring(0, attributeName.length() - 1); + } + + /** + * 浏览事件 + * + * @param worksId + * @throws Exception + */ + public static void doWorksBrowse(long worksId) throws Exception + { + DesWorksEvent event = new DesWorksEvent(); + event.setEventId(Ids.longId19()); + event.setWorksId(worksId); + event.setEventType(1); + event.setCreateTime(Sqls.nowTimestamp()); + + ORM.get(ZTable.class).insert(event); + } + + /** + * 我收藏的 + * + * @param request + * @param worksId + * @throws Exception + */ + public static String doWorksCollect(HttpRequest request, long worksId, String eventId) throws Exception + { + ZmrSessionUser user = request.getSessionUser(ZmrSessionUser.class); + int count = 0; + if (Long.parseLong(eventId) > 0) + { + ORM.get(ZTable.class).delete(DesWorksEvent.class, Long.parseLong(eventId)); + + count = ORM.get(ZTable.class).count(DesWorksEvent.class, new Selector("worksId", worksId).addMust("eventType", 2)); + return String.valueOf(count + ""); + } + else + { + long eventIds = Ids.longId19(); + DesWorksEvent event = new DesWorksEvent(); + event.setEventId(eventIds); + event.setWorksId(worksId); + event.setEventType(2); + event.setOperatorCode(user.getOperatorCode()); + event.setCreateTime(Sqls.nowTimestamp()); + ORM.get(ZTable.class).insert(event); + + count = ORM.get(ZTable.class).count(DesWorksEvent.class, new Selector("worksId", worksId).addMust("eventType", 2)); + return String.valueOf(count + "+" + eventIds); + } + } + + /** + * 设计文件上传 + * + * @param request + * @param worksId + * @param prdTypeId + * @return + * @throws Exception + */ + @AnTransaction + public static void doWorksDesignLoad(HttpRequest request, String fileId, long prdTypeId, long industryId, String keywordName, String worksName, + String industrySubIds) throws Exception + { + ZmrSessionUser user = request.getSessionUser(ZmrSessionUser.class); + UpllFile file = ORM.get(ZTable.class).item(UpllFile.class, new Selector("fileId", fileId).addReplace("id", null)); + File designFile = new File(file.getFilePath()); + if (!designFile.exists()) + { + ORM.get(ZTable.class).delete(UpllFile.class, new Selector("filePath", file.getFilePath()).addReplace("id", null)); + request.setResponseError("文件上传失败,请重试"); + return; + } + + // 上传到 OSS + long worksId = Ids.longId(); + String fileName = worksId + Strings.addStartsWith(file.getFileExt(), "."); + String fileKey = WorksDao.getWorksOssFilekey(WorksDao.WORK_DESIGN, fileName); + String ossUrl = null; + if (file.getFileLength() > 20 * MiB) + { + ossUrl = OssFileDao.uploadBreak(designFile, fileKey); + } + else + { + ossUrl = OssFileDao.uploadFile(designFile, fileKey); + } + + if (ossUrl == null) + {// 上传失败 + designFile.delete(); + ORM.get(ZTable.class).delete(UpllFile.class, new Selector("fileId", fileId).addReplace("id", null)); + request.setResponseError("文件OSS转储失败,请稍后重试"); + return; + } + else + { + // 上传成功删除垃圾文件 + designFile.delete(); + ORM.get(ZTable.class).delete(UpllFile.class, new Selector("fileId", fileId).addReplace("id", null)); + } + + String industrySubName = KeywordDao.doIndustrySubName(industrySubIds); + DesWorksFile works = new DesWorksFile(); + works.setWorksId(worksId); + works.setPrdTypeId(prdTypeId); + works.setIndustryId(industryId); + works.setCdrFileName(file.getFileName()); + works.setCdrPath(ossUrl); + works.setWorksType(0); + works.setUploadType(1);// 手工上传 + works.setDesigner(request.getSessionName()); + works.setDesignGroupId(user.getOperator().getOperatorDept()); + works.setCreateTime(Sqls.nowTimestamp()); + works.setOssStatus(1); + works.setWorksName(worksName); + String keyName = keywordName + " " + industrySubName; + works.setKeywordName(keyName.replace(" ", ",")); + works.setIndustrySubIds(industrySubIds); + works.setIndustrySubName(industrySubName); + ORM.get(ZTable.class).insert(works); + + // 响应 + request.setResponseResult(String.valueOf(worksId)); + + } + + /** + * 设计文件上传 + * + * @param request + * @param worksId + * @param prdTypeId + * @return + * @throws Exception + */ + @AnTransaction + public static void dotemplateExternalDesignLoad(HttpRequest request, String fileId, long mediaId) throws Exception + { + ZmrSessionUser user = request.getSessionUser(ZmrSessionUser.class); + UpllFile file = ORM.get(ZTable.class).item(UpllFile.class, new Selector("fileId", fileId).addReplace("id", null)); + File designFile = new File(file.getFilePath()); + if (!designFile.exists()) + { + ORM.get(ZTable.class).delete(UpllFile.class, new Selector("filePath", file.getFilePath()).addReplace("id", null)); + request.setResponseError("文件上传失败,请重试"); + return; + } + // 存在该类型文件则删除重新上传 + DesWorksFile desFile = ORM.get(ZTable.class).item(DesWorksFile.class, new Selector("templateId", mediaId).addMust("fileType", file.getFileExt())); + if (desFile != null) + { + String delFileName = desFile.getWorksId() + Strings.addStartsWith(file.getFileExt(), "."); + String fileKey = WorksDao.getWorksOssFilekey(WorksDao.WORK_DESIGN, delFileName); + OssFileDao.deleteOssFile(OssFileDao.designExternalFilePackageKey(fileKey));// oss文件删除 + + ORM.get(ZTable.class).delete(DesWorksFile.class, desFile.getWorksId());// 删除作品库数据 + } + + // 上传到 OSS + long worksId = Ids.longId(); + String fileName = worksId + Strings.addStartsWith(file.getFileExt(), "."); + String fileKey = WorksDao.getWorksOssFilekey(WorksDao.WORK_DESIGN, fileName); + String ossUrl = null; + if (file.getFileLength() > 20 * MiB) + { + ossUrl = OssFileDao.uploadBreak(designFile, fileKey); + } + else + { + ossUrl = OssFileDao.uploadFile(designFile, fileKey); + } + + if (ossUrl == null) + {// 上传失败 + designFile.delete(); + ORM.get(ZTable.class).delete(UpllFile.class, new Selector("fileId", fileId).addReplace("id", null)); + request.setResponseError("文件OSS转储失败,请稍后重试"); + return; + } + else + { + // 上传成功删除垃圾文件 + designFile.delete(); + ORM.get(ZTable.class).delete(UpllFile.class, new Selector("fileId", fileId).addReplace("id", null)); + } + + MediaTemplateView mediaView = ORM.get(ZView.class).item(MediaTemplateView.class, new Selector("mediaId", mediaId)); + String fileType = file.getFileExt().toLowerCase(); + DesWorksFile works = new DesWorksFile(); + works.setWorksId(worksId); + works.setPrdTypeId(mediaView.getTypeId()); + works.setIndustryId(mediaView.getIndustryId()); + works.setCdrFileName(file.getFileName()); + works.setCdrPath(ossUrl); + works.setWorksType(0); + works.setUploadType(1);// 手工上传 + works.setDesigner(request.getSessionName()); + works.setDesignGroupId(user.getOperator().getOperatorDept()); + works.setCreateTime(Sqls.nowTimestamp()); + works.setOssStatus(1); + StringBuilder keyNameBuilder = new StringBuilder(); + String typeName = DesignTypeDao.name(mediaView.getTypeId()); + keyNameBuilder.append(Validates.isNotEmpty(typeName) ? typeName + " " : ""); + String industryName = Global.get(DesignIndustryCache.class).getIndustryName(mediaView.getIndustryId()); + keyNameBuilder.append(Validates.isNotEmpty(industryName) ? industryName + " " : ""); + String[] subsNames = Arrays.toStringArray(mediaView.getIndustrySubName()); + for (int i = 0; i < subsNames.length; i++) + { + keyNameBuilder.append(subsNames[i] + " "); + } + String[] attributes = Arrays.toStringArray(mediaView.getAttributeName()); + for (int i = 0; i < attributes.length; i++) + { + keyNameBuilder.append(attributes[i] + " "); + } + works.setKeywordId(mediaView.getKeywordId()); + works.setKeywordName(keyNameBuilder.toString()); + works.setIndustrySubIds(mediaView.getIndustrySubIds()); + works.setIndustrySubName(mediaView.getIndustrySubName()); + works.setAttributeIds(mediaView.getAttributeIds()); + works.setAttributeName(mediaView.getAttributeName()); + works.setFileType(fileType); + works.setTemplateId(mediaView.getMediaId()); + if (desFile != null) + { + works.setPdfFileName(desFile.getPdfFileName()); + works.setPdfPath(desFile.getPdfPath()); + works.setThumbImagePath(desFile.getThumbImagePath()); + works.setThumbImagePhyPath(desFile.getThumbImagePhyPath()); + } + + ORM.get(ZTable.class).insert(works); + + Updater upd = new Updater(); + upd.addMust("mediaId", mediaView.getMediaId()); + upd.addField("fileType", Validates.isNotEmpty(mediaView.getFileType()) ? mediaView.getFileType() + "," + fileType : fileType); + ORM.get(ZTable.class).update(MediaTemplate.class, upd); + // 添加solr数据 + SolrUtil.updateWorksData(worksId); + // 响应 + request.setResponseResult(String.valueOf(worksId)); + + } + + /** + * 成品文件上传 + * + * @param worksId + * @throws Exception + */ + public static void doWorksEndLoad(HttpRequest request, String fileId, long worksId, String thumPath) throws Exception + { + DesWorksFile work = ORM.get(ZTable.class).item(DesWorksFile.class, worksId); + if (work == null) + { + request.setResponseError("作品不存在,请先上传设计文件"); + return; + } + + UpllFile file = ORM.get(ZTable.class).item(UpllFile.class, new Selector("fileId", fileId).addReplace("id", null)); + if (!file.getFileExt().equalsIgnoreCase("pdf")) + { + request.setResponseError("印刷文件必须是pdf文件"); + return; + } + + if (!new File(file.getFilePath()).exists()) + { + ORM.get(ZTable.class).delete(UpllFile.class, new Selector("filePath", file.getFilePath()).addReplace("id", null)); + request.setResponseError("文件上传失败,请重试"); + return; + } + + List imgList = new ArrayList<>(); + List urlList = new ArrayList<>(); + String rootDir = Strings.trimRight(request.getContext().getAttributeString("upload.large.rootDir"), "/"); + + String savePath = Strings.addEndsWith(rootDir, "/") + Strings.trimLeft(thumPath, "/"); + String fileName = worksId + ".png"; + String suffix = Files.getFileExt(fileName); + String name = fileName.substring(0, fileName.lastIndexOf(".")); + Document document = new Document(); + document.setFile(file.getFilePath()); + float scale = 1f; + float rotation = 0f; + int pageTotal = document.getNumberOfPages(); + if (pageTotal == 0) + { + document.dispose(); + return; + } + + for (int n = 0; n < pageTotal; n++) + { + String tempName = name + "-" + n + Strings.addStartsWith(suffix, "."); + String filePath = savePath + "/" + tempName; + String thumbUrl = "/service/upl/" + Base64.encodeFileUrlUTF8(thumPath) + "/" + tempName; + try + { + BufferedImage image = document.getPageImage(n, GraphicsRenderingHints.SCREEN, Page.BOUNDARY_CROPBOX, rotation, scale); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + ImageIO.write(image, "png", out); + byte[] imgb = out.toByteArray(); + Files.write(filePath, imgb); + + imgList.add(filePath); + urlList.add(thumbUrl); + } + catch (Exception e) + { + log.error("作品[%s]生成缩略图异常", e); + } + } + document.dispose(); + + List ossList = new ArrayList(); + for (String imgPath : imgList) + { + File imgFile = new File(imgPath); + if (!imgFile.exists()) + { + continue; + } + + String fileKey = WorksDao.getWorksOssFilekey(WorksDao.WORK_THUMB, imgFile.getName()); + String ossUrl = null; + if (file.getFileLength() > 20 * MiB) + { + ossUrl = OssFileDao.uploadBreak(imgFile, fileKey); + } + else + { + ossUrl = OssFileDao.uploadFile(imgFile, fileKey); + } + + imgFile.delete();// 上传成功删除垃圾文件 + if (ossUrl == null) + { + continue; + } + + ossList.add(ossUrl); + } + + String endFilePath = file.getFilePath(); + String fileKey = WorksDao.getWorksOssFilekey(WorksDao.WORK_END, worksId + Strings.addStartsWith(file.getFileExt(), ".")); + String endUrl = null; + if (file.getFileLength() > 20 * MiB) + { + endUrl = OssFileDao.uploadBreak(new File(endFilePath), fileKey); + } + else + { + endUrl = OssFileDao.uploadFile(new File(endFilePath), fileKey); + } + + Files.deleteFile(file.getFilePath()); + ORM.get(ZTable.class).delete(UpllFile.class, new Selector("fileId", fileId).addReplace("id", null)); + + if (endUrl == null) + { + request.setResponseError("文件转储失败,请稍后重试"); + return; + } + + if (ossList.size() != imgList.size()) + { + request.setResponseError("生成作品缩略图异常"); + return; + } + + Updater updater = new Updater(); + updater.addMust("worksId", worksId); + updater.addField("pdfFileName", file.getFileName()); + updater.addField("pdfPath", endUrl); + updater.addField("thumbImagePath", Lists.toString(ossList)); + updater.addField("thumbImagePhyPath", Lists.toString(imgList)); + + ORM.get(ZTable.class).update(DesWorksFile.class, updater); + } + + /** + * 缩略图上传 + * + * @param worksId + * @throws Exception + */ + @AnTransaction + public static void doTemplateExternalEndLoad(HttpRequest request, String fileId, long worksId, String thumPath) throws Exception + { + DesWorksFile work = ORM.get(ZTable.class).item(DesWorksFile.class, worksId); + if (work == null) + { + request.setResponseError("作品不存在,请先上传设计文件"); + return; + } + + String[] fileIds = fileId.split(","); + File thumbFile = null; + String ossThumbUrl = ""; + MediaTemplate template = null; + UpllFile file = null; + String fileIdName = ""; + for (String fileIda : fileIds) + { + fileIdName = fileIda; + file = ORM.get(ZTable.class).item(UpllFile.class, new Selector("fileId", fileIda).addReplace("id", null)); + if (!file.getFileExt().equalsIgnoreCase("jpg") && !file.getFileExt().equalsIgnoreCase("png")) + { + request.setResponseError("缩略图必须是jpg、png文件"); + return; + } + + if (!new File(file.getFilePath()).exists()) + { + ORM.get(ZTable.class).delete(UpllFile.class, new Selector("filePath", file.getFilePath()).addReplace("id", null)); + request.setResponseError("文件上传失败,请重试"); + return; + } + + template = ORM.get(ZTable.class).item(MediaTemplate.class, new Selector("mediaId", work.getTemplateId())); + if (template == null) + { + request.setResponseError("模板订单不存在,无法完成操作!"); + return; + } + + thumbFile = new File(file.getFilePath()); + String fileKey = WorksDao.getWorksOssFilekey(WorksDao.WORK_THUMB, thumbFile.getName()); + if (thumbFile.length() > 20 * MiB) + { + if (fileIds.length > 1) + { + ossThumbUrl += OssFileDao.uploadBreak(thumbFile, fileKey) + ","; + } + else + { + ossThumbUrl = OssFileDao.uploadBreak(thumbFile, fileKey); + } + + } + else + { + if (fileIds.length > 1) + { + ossThumbUrl += OssFileDao.uploadFile(thumbFile, fileKey) + ","; + } + else + { + ossThumbUrl = OssFileDao.uploadFile(thumbFile, fileKey); + } + } + + String dbThumbImagePath = work.getThumbImagePath(); + if (Validates.isNotEmpty(dbThumbImagePath) && Validates.isUrl(dbThumbImagePath) && !dbThumbImagePath.equals(ossThumbUrl)) + {// oss原缩略图删除 + int matchIndex = dbThumbImagePath.indexOf(OssFileDao.ossEndpoint) + OssFileDao.ossEndpoint.length() + 1; + if (matchIndex != -1) + { + OssFileDao.deleteOssFile(dbThumbImagePath.substring(matchIndex)); + } + } + + // 上传成功删除垃圾文件 + thumbFile.delete(); + ORM.get(ZTable.class).delete(UpllFile.class, new Selector("fileId", fileIdName).addReplace("id", null)); + } + + Updater upd = new Updater(); + upd.addMust("mediaId", template.getMediaId()); + upd.addField("fileType", Validates.isNotEmpty(template.getFileType()) ? template.getFileType() + "," + file.getFileExt() : file.getFileExt()); + ORM.get(ZTable.class).update(MediaTemplate.class, upd); + + Updater canvesUp = new Updater(); + canvesUp.addMust("mediaId", template.getMediaId()); + canvesUp.addField("mediaUrl", ossThumbUrl); + canvesUp.addField("updateTime", DateTimes.getDateTimeString()); + ORM.get(ZTable.class).update(MediaCanvas.class, canvesUp); + + Updater updater = new Updater(); + updater.addMust("worksId", worksId); + updater.addField("pdfFileName", file.getFileName()); + // updater.addField("pdfPath", endUrl); + updater.addField("thumbImagePath", ossThumbUrl); + updater.addField("thumbImagePhyPath", file.getFileName()); + + ORM.get(ZTable.class).update(DesWorksFile.class, updater); + // 更新solr数据 + SolrUtil.updateWorksData(worksId); + SolrUtil.updateMediaData(template.getMediaId()); + } + + /** + * 上传作品素材 + * + * @param request + * @throws Exception + */ + public static void doUploadWorksMaterial(HttpRequest request) throws Exception + { + request.addValidate(new IsNotEmpty("fileId", "请选择上传文件")); + request.addValidate(new IsSelect("catId", "请选择素材分类")); + request.addValidate(new IsSelect("materialStatus", "请选择状态")); + if (!request.chkValidate()) + { + request.setResponseError(request.getAlertMsg()); + return; + } + + String fileId = request.getParameter("fileId"); + long catId = request.getParameterLong("catId"); + int materialStatus = request.getParameterInt("materialStatus", 0); + String keywords = request.getParameter("keywords"); + + UpllFile file = ORM.get(ZTable.class).item(UpllFile.class, new Selector("fileId", fileId).addReplace("id", null)); + if (file == null) + { + request.setResponseError("上传的素材不存在,请重新上传"); + return; + } + + if (!Files.exists(file.getFilePath())) + { + request.setResponseError("上传的素材不存在,请重新上传"); + ORM.get(ZTable.class).delete(UpllFile.class, new Selector("filePath", file.getFilePath()).addReplace("id", null)); + return; + } + + // 上传到 OSS + long mid = Ids.longId13(); + String fileKey = WorksDao.getWorksOssFilekey(WorksDao.WORK_MATERIAL, mid + Strings.addStartsWith(file.getFileExt(), ".")); + String ossUrl = null; + if (file.getFileLength() > 20 * MiB) + { + ossUrl = OssFileDao.uploadBreak(new File(file.getFilePath()), fileKey); + } + else + { + ossUrl = OssFileDao.uploadFile(new File(file.getFilePath()), fileKey); + } + + if (ossUrl == null) + {// 上传失败 + new File(file.getFilePath()).delete(); + ORM.get(ZTable.class).delete(UpllFile.class, new Selector("fileId", fileId).addReplace("id", null)); + request.setResponseError("文件OSS转储失败,请稍后重试"); + return; + } + else + { + // 上传成功删除垃圾文件 + new File(file.getFilePath()).delete(); + ORM.get(ZTable.class).delete(UpllFile.class, new Selector("fileId", fileId).addReplace("id", null)); + } + + int num = ORM.get(ZTable.class).count(DesMaterialCont.class); + DesMaterialCont item = new DesMaterialCont(); + item.setMid(mid); + item.setCatId(catId); + item.setMaterialPath(file.getFilePath()); + item.setMaterialUrl(ossUrl); + item.setMaterialStatus(materialStatus); + item.setMaterialSeq(num + 1); + item.setMaterialSuffix(file.getFileExt()); + item.setKeywords(keywords); + item.setUploader(request.getSessionName()); + item.setUploadTime(DateTimes.getDateTimeString()); + item.setOssStatus(1); + + if ("jpg".equalsIgnoreCase(file.getFileExt()) || "png".equalsIgnoreCase(file.getFileExt()) || "jpeg".equalsIgnoreCase(file.getFileExt())) + { + item.setThumbPath(file.getFilePath()); + item.setThumbUrl(ossUrl); + } + + ORM.get(ZTable.class).insert(item); + request.setResponseResult("" + mid); + } + + /** + * 上传作品素材缩略图 + * + * @param request + * @throws Exception + */ + public static void doUploadWorksMaterialThumb(HttpRequest request) throws Exception + { + request.addValidate(new IsInteger("mid", "请选择")); + request.addValidate(new IsNotEmpty("fileId", "请选择上传文件")); + if (!request.chkValidate()) + { + request.setResponseError(request.getAlertMsg()); + return; + } + + long mid = request.getParameterLong("mid"); + String fileId = request.getParameter("fileId"); + + UpllFile file = ORM.get(ZTable.class).item(UpllFile.class, new Selector("fileId", fileId).addReplace("id", null)); + if (file == null) + { + request.setResponseError("上传的素材缩略图不存在,请重新上传"); + return; + } + + if (!Files.exists(file.getFilePath())) + { + request.setResponseError("上传的素材缩略图不存在,请重新上传"); + ORM.get(ZTable.class).delete(UpllFile.class, new Selector("filePath", file.getFilePath()).addReplace("id", null)); + } + + // 上传到 OSS + String fileKey = WorksDao.getWorksOssFilekey(WorksDao.WORK_MATERIAL_THUMB, mid + Strings.addStartsWith(file.getFileExt(), ".")); + String ossUrl = null; + if (file.getFileLength() > 20 * MiB) + { + ossUrl = OssFileDao.uploadBreak(new File(file.getFilePath()), fileKey); + } + else + { + ossUrl = OssFileDao.uploadFile(new File(file.getFilePath()), fileKey); + } + + if (ossUrl == null) + {// 上传失败 + new File(file.getFilePath()).delete(); + ORM.get(ZTable.class).delete(UpllFile.class, new Selector("fileId", fileId).addReplace("id", null)); + request.setResponseError("文件OSS转储失败,请稍后重试"); + return; + } + else + { + // 上传成功删除垃圾文件 + new File(file.getFilePath()).delete(); + ORM.get(ZTable.class).delete(UpllFile.class, new Selector("fileId", fileId).addReplace("id", null)); + } + + Updater updater = new Updater().addMust("mid", mid).addField("thumbPath", file.getFilePath()).addField("thumbUrl", ossUrl).addField("ossStatus", 1); + ORM.get(ZTable.class).update(DesMaterialCont.class, updater); + } + + /** + * 删除作品素材 + * + * @param request + * @throws Exception + */ + public static void doDeleteWorksMaterial(HttpRequest request) throws Exception + { + request.addValidate(new IsInteger("mid", "请选择")); + if (!request.chkValidate()) + { + request.setResponseError(request.getAlertMsg()); + return; + } + + long mid = request.getParameterLong("mid"); + DesMaterialCont item = ORM.get(ZTable.class).item(DesMaterialCont.class, mid); + + Files.deleteFile(item.getMaterialPath()); + if (Validates.isNotEmpty(item.getThumbPath())) + {// 缩略图 + Files.deleteFile(item.getThumbPath()); + ORM.get(ZTable.class).delete(UpllFile.class, new Selector().addMust("filePath", item.getThumbPath()).addReplace("id", null)); + } + + ORM.get(ZTable.class).delete(UpllFile.class, new Selector().addMust("filePath", item.getMaterialPath()).addReplace("id", null)); + ORM.get(ZTable.class).delete(DesMaterialCont.class, mid); + + int ind = item.getMaterialUrl().indexOf("/works/"); + if (ind != -1) + { + String fileKey = Strings.trim(OssFileDao.getPrefix_dir(), "/", "/") + "/" + item.getMaterialUrl().substring(ind + 1); + OssFileDao.deleteOssFile(fileKey); + } + + if (item.getMaterialSuffix().toLowerCase().endsWith("cdr")) + { + int ind2 = item.getThumbUrl().indexOf("/works/"); + if (ind2 != -1) + { + String fileKey = Strings.trim(OssFileDao.getPrefix_dir(), "/", "/") + "/" + item.getThumbUrl().substring(ind2 + 1); + OssFileDao.deleteOssFile(fileKey); + } + } + } + + /** 更新作品素材关键字 */ + public static void doUpdateMaterialKeywords(HttpRequest request) throws Exception + { + request.addValidate(new IsInteger("mid", "请选择")); + if (!request.chkValidate()) + { + request.setResponseError(request.getAlertMsg()); + return; + } + + long mid = request.getParameterLong("mid"); + String keywords = request.getParameter("keywords"); + if (Validates.isEmpty(keywords)) + { + return; + } + + ORM.get(ZTable.class).update(DesMaterialCont.class, new Updater().addMust("mid", mid).addField("keywords", keywords)); + } + + /** 更新作品素材状态 */ + public static void doUpdateMaterialStatus(HttpRequest request) throws Exception + { + request.addValidate(new IsInteger("mid", "请选择")); + if (!request.chkValidate()) + { + request.setResponseError(request.getAlertMsg()); + return; + } + + long mid = request.getParameterLong("mid"); + int materialStatus = request.getParameterInt("materialStatus", 0); + + ORM.get(ZTable.class).update(DesMaterialCont.class, new Updater().addMust("mid", mid).addField("materialStatus", materialStatus)); + } + + /** 更新作品素材序号 */ + public static void doUpdateMaterialSeq(HttpRequest request) throws Exception + { + request.addValidate(new IsInteger("mid", "请选择")); + if (!request.chkValidate()) + { + request.setResponseError(request.getAlertMsg()); + return; + } + + long mid = request.getParameterLong("mid"); + int materialSeq = request.getParameterInt("materialSeq", 0); + + ORM.get(ZTable.class).update(DesMaterialCont.class, new Updater().addMust("mid", mid).addField("materialSeq", materialSeq)); + } + + /** + * 关键词查询作品 + * + * @param request + * @throws Exception + */ + public static void doWorksKeywordSearch(HttpRequest request) throws Exception + { + ZmrSessionUser user = request.getSessionUser(ZmrSessionUser.class); + String[] deptStr = Arrays.toStringArray(user.getOperator().getOperatorDeptAll()); + + int page = request.getParameterInt("page", 1); + int pageSize = 20; + + String keyword = request.getParameter("keyword", ""); + String urlParam = request.getParameter("urlParam"); + long prdTypeId = request.getParameterLong("prdTypeId"); + long industryId = request.getParameterLong("industryId"); + + Selector selector = new Selector(); + selector.addOrderbyDesc("createTime"); + + if (prdTypeId != -1) + { + if (prdTypeId == 10086) + { + List prdtypeList = Global.get(DesignTypeCache.class).getList(); + List prdList = new ArrayList(); + for (DesignType type : prdtypeList) + { + prdList.add(type.getTypeId()); + } + + selector.addMustInLong("prdTypeId", Arrays.toArrayLong(prdList)); + } + else + { + selector.addMust("prdTypeId", prdTypeId); + } + } + + if (industryId != -1) + { + if (industryId == 10087) + { + List indList = Global.get(DesignIndustryCache.class).getIndustryList(); + List inList = new ArrayList(); + for (DesignIndustry ind : indList) + { + inList.add(ind.getIndustryId()); + } + + selector.addMustInLong("industryId", Arrays.toArrayLong(inList)); + } + else + { + selector.addMust("industryId", industryId); + } + } + + if (Validates.isNotEmpty(urlParam) && urlParam.equals("BEST")) + { + selector.addMustIn("worksType", 1, 4); + } + + if (Validates.isNotEmpty(urlParam) && urlParam.equals("GROUP")) + { + selector.addMaybeLike("designGroupId", user.getOperator().getOperatorDept()); + } + + if (Validates.isNotEmpty(urlParam) && urlParam.equals("MY")) + { + selector.addMust("designer", user.getOperatorCode()); + } + + if (Validates.isNotEmpty(urlParam) && urlParam.equals("COLLECT")) + { + selector.addMust("operatorCode", user.getOperatorCode()); + selector.addMust("eventType", 2); + } + + if (Validates.isNotEmpty(urlParam) && urlParam.equals("MYBEST")) + { + selector.addMust("designer", user.getOperatorCode()); + selector.addMustIn("worksType", 1, 4); + } + + if (Validates.isNotEmpty(urlParam) && urlParam.equals("SHARE")) + { + if (Validates.isNotEmpty(user.getOperator().getOperatorDeptAll())) + { + if (deptStr.length == 1) + { + selector.addMustLike("deptId", deptStr[0]); + } + else if (deptStr.length > 1) + { + Selector sel = new Selector(); + for (String dept : deptStr) + { + sel.addMustLike("deptId", dept); + } + selector.addOr(sel); + } + } + } + + // 输入全数字,查询id + Pattern pattern = Pattern.compile("^\\d+$"); + Matcher isNum = pattern.matcher(Strings.trim(keyword)); + if (isNum.matches()) + { + selector.addMust("worksId", Long.valueOf(Strings.trim(keyword))); + } + else + { + String[] word = keyword.split(" "); + for (int i = 0; i < word.length; i++) + { + if (Validates.isEmptyBlank(word[i])) + { + continue; + } + + selector.addMaybeLike("keywordName", word[i]); + } + } + + MapSO attrMap = new HashMapSO(); + if (Validates.isNotEmpty(urlParam) && urlParam.equals("COLLECT")) + { + PageResult pageResult = ORM.get(ZView.class).page(DesWorksEventView.class, page, pageSize, selector); + attrMap.put("pageResult", pageResult); + } + else + { + PageResult pageResult = ORM.get(ZTable.class).page(DesWorksFile.class, page, pageSize, selector); + attrMap.put("pageResult", pageResult); + } + + attrMap.put("keyword", keyword); + attrMap.put("prdTypeId", prdTypeId); + attrMap.put("industryId", industryId); + attrMap.put("urlParam", urlParam); + + String ret = ZmlContexts.parseZmlPath(request, "/zview/works/presenter/worksSearchInfo.zml", attrMap); + request.setResponseResult(ret); + } + + /** + * 作品关联标签 + * + * @param worksId + * @param parIdarr + * @param catIdarr + * @param labIdarr + * @throws Exception + */ + @AnTransaction + public static void doWorksLabelExec(long worksId, long prdTypeId, long industryId, String industrySubIds, String attributeIds) throws Exception + { + DesWorksFile works = ORM.get(ZTable.class).item(DesWorksFile.class, worksId); + String oldPrdTypeName = Global.get(DesignTypeCache.class).getName(works.getPrdTypeId()); + String oldIndustryName = Global.get(DesignIndustryCache.class).getIndustryName(works.getIndustryId()); + String oldIndustrySubName = KeywordDao.doIndustrySubName(works.getIndustrySubIds()); + String oldAttributeName = KeywordDao.doAttributeName(works.getAttributeIds()); + String oldLabelName = oldPrdTypeName + " " + oldIndustryName + " " + oldIndustrySubName + " " + oldAttributeName; + + String prdTypeName = Global.get(DesignTypeCache.class).getName(prdTypeId); + String industryName = Global.get(DesignIndustryCache.class).getIndustryName(industryId); + String industrySubName = KeywordDao.doIndustrySubName(industrySubIds); + String attributeName = KeywordDao.doAttributeName(attributeIds); + String labelName = prdTypeName + " " + industryName + " " + industrySubName + " " + attributeName; + + if (Validates.isEmpty(works.getKeywordName()) || Validates.isEmpty(works.getIndustrySubIds()) && Validates.isEmpty(works.getAttributeIds())) + { + Updater updater = new Updater(); + updater.addMust("worksId", worksId); + updater.addField("industryId", industryId); + updater.addField("industrySubIds", industrySubIds); + updater.addField("industrySubName", industrySubName); + updater.addField("attributeIds", attributeIds); + updater.addField("attributeName", attributeName); + + if (Validates.isNotEmpty(works.getKeywordName())) + { + updater.addField("keywordName", works.getKeywordName() + "," + labelName + "," + works.getDesigner()); + } + else + { + updater.addField("keywordName", labelName + "," + works.getDesigner()); + } + + ORM.get(ZTable.class).update(DesWorksFile.class, updater); + } + else + { + String keywordName = ""; + // 1.关键词中是否包含标签 + if (works.getKeywordName().contains(oldLabelName)) + { + if (!oldLabelName.equals(labelName)) + { + String[] newLabelNameStr = works.getKeywordName().split(","); + for (String newLabelName : newLabelNameStr) + { + if (oldLabelName.contains(newLabelName)) + { + keywordName += labelName + ","; + } + else + { + keywordName += newLabelName + ","; + } + } + + Updater updater = new Updater(); + updater.addMust("worksId", worksId); + updater.addField("industryId", industryId); + updater.addField("industrySubIds", industrySubIds); + updater.addField("industrySubName", industrySubName); + updater.addField("attributeIds", attributeIds); + updater.addField("attributeName", attributeName); + updater.addField("keywordName", keywordName.substring(0, keywordName.length() - 1)); + + ORM.get(ZTable.class).update(DesWorksFile.class, updater); + } + } + else + { + keywordName += labelName + ","; + String[] newLabelNameStr = works.getKeywordName().split(","); + for (String newLabelName : newLabelNameStr) + { + if (oldLabelName.contains(newLabelName)) + { + continue; + } + + keywordName += newLabelName + ","; + } + + Updater updater = new Updater(); + updater.addMust("worksId", worksId); + updater.addField("industryId", industryId); + updater.addField("industrySubIds", industrySubIds); + updater.addField("industrySubName", industrySubName); + updater.addField("attributeIds", attributeIds); + updater.addField("attributeName", attributeName); + updater.addField("keywordName", keywordName.substring(0, keywordName.length() - 1)); + + ORM.get(ZTable.class).update(DesWorksFile.class, updater); + } + } + } + + /** + * + * [简要描述]根据模板id与设计文件后缀查看是否上传 :
            + * [详细描述]:
            + * + * @author gjx + * @param request + * @param templateId + * @param fileType + * @throws Exception + */ + public static void isUploadDesignExternalFile(HttpRequest request, long templateId, String fileType) throws Exception + { + DesWorksFile worksFile = ORM.get(ZTable.class).item(DesWorksFile.class, + new Selector("templateId", templateId).addMust("fileType", Validates.isNotEmpty(fileType) ? fileType.toLowerCase() : fileType)); + if (worksFile == null) + { + request.setResponseResult(Jsons.toString("请先上传【" + fileType + "】类型的设计文件")); + } + else + { + request.setResponseResult(Jsons.toString(worksFile.getWorksId())); + } + + } + + /** + * + * [简要描述] 查看操作员最新模板:
            + * [详细描述]:
            + * + * @author gjx + * @param request + * @throws Exception + */ + public static void doQueryOperatorTemplateDesc(HttpRequest request) throws Exception + { + MediaTemplateView templateView = ORM.get(ZView.class).item(MediaTemplateView.class, + new Selector("designer", request.getSessionName()).addOrderbyDesc("createTime")); + if (templateView == null) + { + request.setResponseResult(Jsons.toString(0)); + return; + } + request.setResponseResult(Jsons.toString(templateView.getMediaId())); + } +} diff --git a/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/WorksPresenterForPC.java b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/WorksPresenterForPC.java new file mode 100644 index 0000000..670626c --- /dev/null +++ b/Yangcai365_design/src/manage/com/zhiqim/yangcai/design/presenter/WorksPresenterForPC.java @@ -0,0 +1,81 @@ +package com.zhiqim.yangcai.design.presenter; + +import java.util.HashMap; +import java.util.Map; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.httpd.context.ZmlContexts; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.constants.SignConstants; +import org.zhiqim.kernel.extend.HashMapSO; +import org.zhiqim.kernel.extend.MapSO; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.kernel.paging.PageResult; + +import com.zhiqim.yangcai.design.dbo.template.MediaTemplateSolrModel; +import com.zhiqim.yangcai.util.SolrUtil; + +/** + * 作品库对外Presenter + * + * @version 1.0 @author caohong 2019-9-5 新建与整理 + */ +@AnAlias("WorksPresenterForPC") +public class WorksPresenterForPC implements SignConstants +{ + private static Log log = LogFactory.getLog(WorksPresenterForPC.class); + + /** + * 外部公共作品查询 + * + * @param request + * @param indIdarr + * @param prdIdarr + * @throws Exception + */ + public static void doWorksSearchForPC(HttpRequest request) + { + int page = request.getParameterInt("page", 1); + int pageSize = 20; + + String keyword = request.getParameter("keyword"); + String prdTypeId = request.getParameter("prdTypeId"); + String industryId = request.getParameter("industryId"); + String sort = request.getParameter("sort"); + String oddEven = request.getParameter("oddEven") == null ? "-1" : request.getParameter("oddEven"); + + Map param = new HashMap<>(); + param.put("keyword", keyword); + param.put("typeId", prdTypeId); + param.put("industryId", industryId); + param.put("sort", sort); + param.put("oddEven", oddEven); + + MapSO attrMap = new HashMapSO(); + try + { + PageResult pageResult = SolrUtil.queryAllTemplate(page, pageSize, param); + attrMap.put("pageResult", pageResult); + String ret = ZmlContexts.parseZmlPath(request, "/zview/works/presenter/pcWorksInfo.zml", attrMap); + request.setResponseResult(ret); + } + catch (Exception e) + { + log.error("对外作品查询异常," + e.getMessage(), e); + } + + } + + /** + * 外部关键词查询作品 + * + * @param request + * @throws Exception + */ + public static void doWorksKeywordSearchForPC(HttpRequest request) + { + doWorksSearchForPC(request); + } + +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/cache/CustomerTypeCache.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/cache/CustomerTypeCache.java new file mode 100644 index 0000000..5351824 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/cache/CustomerTypeCache.java @@ -0,0 +1,139 @@ +/** + * 扬彩印刷设计 + * 文件名 :CustomerTypeCache.java + * 创建人 :gjx + * 创建时间:2019-12-23 + */ + +package com.zhiqim.yangcai.cache; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.extend.HashMapSS; +import org.zhiqim.kernel.extend.MapSO; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.kernel.json.parser.ArrayParser; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.kernel.util.Validates; + +import com.zhiqim.yangcai.design.constants.BaseConstants; +import com.zhiqim.yangcai.design.model.CustomerTypeCacheModel; +import com.zhiqim.yangcai.util.BusinessPlatformClientUtil; + +/** + * [简要描述]客户类型缓存 :
            + * [详细描述]:
            + * + * @version 1.0 @author gjx 2019-12-23 新建与整理 + */ +@AnAlias("CustomerTypeCache") +public class CustomerTypeCache +{ + private static final Log log = LogFactory.getLog(CustomerTypeCache.class); + private List customerTypeAll = new ArrayList<>();// 全部客户类型 + private List customerTypeList = new ArrayList<>();// 可用客户类型 + + /** 获取全部客户类型列表 */ + public List getCustomerTypeCacheAll() + { + return customerTypeAll; + } + + /** 获取可用客户类型列表 */ + public List getCustomerTypeCacheList() + { + return customerTypeList; + } + + /** 获取客户类型名称 */ + public String getCustomerTypeName(int customerTypeId) + { + for (CustomerTypeCacheModel param : customerTypeAll) + { + if (customerTypeId == param.getCustomerTypeId()) + { + return param.getCustomerTypeName(); + } + } + + return ""; + } + + /** 获取客户类型对象 */ + public CustomerTypeCacheModel getCustomerType(int customerTypeId) + { + for (CustomerTypeCacheModel param : customerTypeAll) + { + if (customerTypeId == param.getCustomerTypeId()) + { + return param; + } + } + + return null; + } + + /** 获取客户类型 map格式 */ + public Map map() throws Exception + { + Map map = new LinkedHashMap<>(); + List list = Global.get(CustomerTypeCache.class).getCustomerTypeCacheAll(); + for (CustomerTypeCacheModel customerType : list) + { + map.put(customerType.getCustomerTypeId(), customerType); + } + + return map; + } + + /** + * 刷新缓存数据 + * + * @return + */ + public CustomerTypeCache doRefresh() + { + try + { + String access_token = BusinessPlatformClientUtil.getAccessToken(); + // 获取行业配置数据 + String resultText = BusinessPlatformClientUtil.getDicKeyParamValue(BaseConstants.CUSTOMER_TYPE_KEY_CODE, access_token); + MapSO customerTypeMap = Jsons.toMapSO(resultText); + if (Validates.isNotEmpty(customerTypeMap)) + { + String data = String.valueOf(customerTypeMap.get("data")); + List industrys = ArrayParser.toFieldList(data); + customerTypeList.clear(); + customerTypeAll.clear(); + for (String field : industrys) + { + HashMapSS mapSS = Jsons.toMapSS(field); + boolean isEnabled = "1".equals(mapSS.get("state")) ? true : false; + CustomerTypeCacheModel customerType = new CustomerTypeCacheModel(); + customerType.setCustomerTypeId(Integer.valueOf(mapSS.get("code"))); + customerType.setCustomerTypeName(mapSS.get("name")); + + customerTypeAll.add(customerType); + if (isEnabled) + {// 可用行业 + customerTypeList.add(customerType); + } + } + } + + } + catch (Exception e) + { + log.error("初始化客户类型数据失败", e); + } + + return this; + } + +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/cache/DesMaterialCatCache.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/cache/DesMaterialCatCache.java new file mode 100644 index 0000000..bfc39ab --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/cache/DesMaterialCatCache.java @@ -0,0 +1,75 @@ +package com.zhiqim.yangcai.cache; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.works.DesMaterialCat; + +/** + * [简要描述]:作品素材分类缓存
            + * + * @version 1.0 @author caohong 2019-9-5 新建与整理 + */ +@AnAlias("DesMaterialCatCache") +public class DesMaterialCatCache +{ + private static final Log log = LogFactory.getLog(DesMaterialCatCache.class); + private List materialList = new ArrayList(); + private Map catMap = new HashMap(); + + public List list() + { + return this.materialList; + } + + public DesMaterialCat get(long catId) + { + return catMap.get(catId); + } + + public String name(long catId) + { + if (Validates.isEmpty(catId)) + { + return ""; + } + + return catMap.get(catId).getCatName(); + } + + public synchronized DesMaterialCatCache doRefresh() + { + try + { + materialList.clear(); + catMap.clear(); + + Selector selector = new Selector(); + selector.addOrderbyAsc("catSeq"); + selector.addMust("catStatus", 0); + materialList = ORM.get(ZTable.class).list(DesMaterialCat.class, selector); + + for (DesMaterialCat cat : materialList) + { + + catMap.put(cat.getCatId(), cat); + } + } + catch (Exception e) + { + log.error("刷新作品素材分类缓存异常", e); + } + + return this; + } +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/cache/DesignIndustryCache.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/cache/DesignIndustryCache.java new file mode 100644 index 0000000..b558a50 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/cache/DesignIndustryCache.java @@ -0,0 +1,209 @@ +package com.zhiqim.yangcai.cache; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.extend.HashMapSS; +import org.zhiqim.kernel.extend.MapSO; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.kernel.json.parser.ArrayParser; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.kernel.util.Validates; + +import com.zhiqim.yangcai.design.constants.BaseConstants; +import com.zhiqim.yangcai.design.dbo.design.DesignIndustry; +import com.zhiqim.yangcai.util.BusinessPlatformClientUtil; + +/** + * 行业信息缓存 + * + * @version v1.0.0 @author caohong 2019-9-6 10:24:51 新建与整理 + * @version v1.0.1 @author gjx 2019-9-23 淘印通接口替换行业数据 + */ +@AnAlias("DesignIndustryCache") +public class DesignIndustryCache +{ + private static final Log log = LogFactory.getLog(DesignIndustryCache.class); + private List industrieListAll = new ArrayList<>();// 全部行业 + private List industryList = new ArrayList();// 可用行业 + + /** 获取全部行业列表 */ + public List getIndustryListAll() + { + return industrieListAll; + } + + /** 获取可用行业列表 */ + public List getIndustryList() + { + return industryList; + } + + /** 获取行业名 */ + public String getIndustryName(long industryId) + { + for (DesignIndustry param : industrieListAll) + { + if (industryId == param.getIndustryId()) + { + return param.getIndustryName(); + } + } + + return ""; + } + + /** 获取行业对象 */ + public DesignIndustry getIndustry(long industryId) + { + for (DesignIndustry param : industrieListAll) + { + if (industryId == param.getIndustryId()) + { + return param; + } + } + + return null; + } + + /** 获取行业 map格式 */ + public Map map() throws Exception + { + Map map = new LinkedHashMap<>(); + List list = Global.get(DesignIndustryCache.class).getIndustryList(); + for (DesignIndustry industry : list) + { + map.put(industry.getIndustryId(), industry); + } + + return map; + } + + /** 获取所有行业 map格式 */ + public Map mapAll() throws Exception + { + Map map = new LinkedHashMap<>(); + List list = Global.get(DesignIndustryCache.class).getIndustryListAll(); + for (DesignIndustry industry : list) + { + map.put(industry.getIndustryId(), industry); + } + + return map; + } + + /** 根据行业名查找行业 */ + public DesignIndustry queryIndustryByName(String industryName) throws Exception + { + DesignIndustry designIndustry = new DesignIndustry(); + List list = Global.get(DesignIndustryCache.class).getIndustryListAll(); + for (DesignIndustry industry : list) + { + if (Validates.isNotEmpty(industryName) && industryName.equals(industry.getIndustryName())) + { + designIndustry = industry; + } + } + if (designIndustry != null && designIndustry.getIndustryId() <= 0) + { + return null; + } + return designIndustry; + } + + /** + * 刷新缓存数据 + * + * @return + */ + public static void doRefreshIndustry() + { + // 设计行业分类 + DesignIndustryCache dic = Global.get(DesignIndustryCache.class); + dic = dic != null ? dic : new DesignIndustryCache(); + Global.remove(DesignIndustryCache.class); + Global.add(DesignIndustryCache.class, dic.doRefresh()); + } + + /** + * 刷新缓存数据 + * + * @return + */ + public DesignIndustryCache doRefresh() + { + try + { + String access_token = BusinessPlatformClientUtil.getAccessToken(); + // 获取行业配置数据 + String resultText = BusinessPlatformClientUtil.getDicKeyParamValue(BaseConstants.INDUSTRY_DIC_KEY_CODE, access_token); + MapSO industryMap = Jsons.toMapSO(resultText); + if (Validates.isNotEmpty(industryMap)) + { + String data = String.valueOf(industryMap.get("data")); + List industrys = ArrayParser.toFieldList(data); + industryList.clear(); + industrieListAll.clear(); + for (String field : industrys) + { + HashMapSS mapSS = Jsons.toMapSS(field); + boolean isEnabled = "1".equals(mapSS.get("state")) ? true : false; + + DesignIndustry industry = new DesignIndustry(); + industry.setIndustryId(Long.valueOf(mapSS.get("code"))); + industry.setIndustryName(mapSS.get("name")); + industry.setIndustryKeywords(mapSS.get("remark")); + industry.setEnabled(isEnabled); + industry.setIndustrySeq(Integer.valueOf(mapSS.get("seq"))); + + industrieListAll.add(industry); + if (isEnabled) + {// 可用行业 + industryList.add(industry); + } + } + } + sortList(industrieListAll); + sortList(industryList); + + } + catch (Exception e) + { + log.error("初始化行业类型数据失败", e); + } + + return this; + } + + /** + * + * 排序 + * + * @author gjx + * @param list + */ + public static void sortList(List list) + { + + List sortList = null; + for (int g = 0; g < list.size() - 1; g++) + { // 冒泡按指定条件升序 + for (int d = 0; d < list.size() - 1 - g; d++) + { + if (list.get(d).getIndustrySeq() > list.get(d + 1).getIndustrySeq()) + { + sortList = new ArrayList<>(); + sortList.add(0, list.get(d)); + list.set(d, list.get(d + 1)); + list.set(d + 1, sortList.get(0)); + } + } + } + } +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/cache/DesignMerchantCache.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/cache/DesignMerchantCache.java new file mode 100644 index 0000000..326cb17 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/cache/DesignMerchantCache.java @@ -0,0 +1,79 @@ +package com.zhiqim.yangcai.cache; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; + +import com.zhiqim.yangcai.design.dbo.design.DesignMerchant; + +/*** + * 商户信息缓存 + * + * @version v1.0.0 @author caohong 2019-8-28 新建与整理 + */ +@AnAlias("DesignMerchantCache") +public class DesignMerchantCache +{ + private static final Log log = LogFactory.getLog(DesignMerchantCache.class); + private List listAll = new ArrayList(); + private final List list = new ArrayList(); + private final Map mapAll = new HashMap(); + + public List getList() + { + return list; + } + + public List getListAll() + { + return listAll; + } + + public DesignMerchant get(long merchantId) + { + return mapAll.get(merchantId); + } + + public String getName(long merchantId) + { + DesignMerchant merchant = mapAll.get(merchantId); + + return merchant == null ? "" : merchant.getMerchantName(); + } + + public DesignMerchantCache doRefresh() + { + try + { + mapAll.clear(); + list.clear(); + listAll.clear(); + listAll = ORM.get(ZTable.class).list(DesignMerchant.class); + Iterator iterator = listAll.iterator(); + while (iterator.hasNext()) + { + DesignMerchant merchant = iterator.next(); + this.mapAll.put(merchant.getMerchantId(), merchant); + + if (merchant.isEnabled()) + { + this.list.add(merchant); + } + } + } + catch (Exception e) + { + log.error("商户信息刷新异常", e); + } + + return this; + } +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/cache/DesignOrderRefundReasonCache.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/cache/DesignOrderRefundReasonCache.java new file mode 100644 index 0000000..e2a7523 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/cache/DesignOrderRefundReasonCache.java @@ -0,0 +1,74 @@ +package com.zhiqim.yangcai.cache; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; + +import com.zhiqim.yangcai.design.dbo.order.DesignOrderRefundReason; + +/*** + * 退款问题配置缓存 + * + * @version v1.0.0 @author 谢盼 2021-06-03 新建与整理 + */ +@AnAlias("DesignOrderRefundReasonCache") +public class DesignOrderRefundReasonCache +{ + private static final Log log = LogFactory.getLog(DesignOrderRefundReason.class); + private List listAll = new ArrayList(); + private final List list = new ArrayList(); + private final Map mapAll = new HashMap(); + + public List getList() + { + return list; + } + + public List getListAll() + { + return listAll; + } + + public DesignOrderRefundReason get(long id) + { + return mapAll.get(id); + } + + public String getName(long id) + { + DesignOrderRefundReason reason = mapAll.get(id); + + return reason == null ? "" : reason.getTitle(); + } + + public DesignOrderRefundReasonCache doRefresh() + { + try + { + mapAll.clear(); + list.clear(); + listAll.clear(); + listAll = ORM.get(ZTable.class).list(DesignOrderRefundReason.class); + Iterator iterator = listAll.iterator(); + while (iterator.hasNext()) + { + DesignOrderRefundReason reason = iterator.next(); + this.mapAll.put(reason.getId(), reason); + } + } + catch (Exception e) + { + log.error("退款问题配置刷新异常", e); + } + + return this; + } +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/cache/DesignTypeCache.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/cache/DesignTypeCache.java new file mode 100644 index 0000000..d5c3f3c --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/cache/DesignTypeCache.java @@ -0,0 +1,119 @@ +package com.zhiqim.yangcai.cache; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.design.DesignType; + +/** + * 产品类型缓存 + * + * @author caohong + * + */ +@AnAlias("DesignTypeCache") +public class DesignTypeCache +{ + private static final Log log = LogFactory.getLog(DesignTypeCache.class); + + private List productTypeList = new ArrayList<>();// 可用的 + private Map typeMap = new HashMap();// 可用的 + private List productTypeListAll = new ArrayList<>();// 可用的 + private Map typeMapAll = new HashMap();// 所有的 + + /** + * 获取可用的产品类型列表 + * + * @return + */ + public List getList() + { + return productTypeList; + } + + /** + * 获取可用的产品类型map + * + * @return + */ + public Map getMap() + { + return typeMap; + } + + /** + * 获取所有产品类型列表 + * + * @return + */ + public List getListAll() + { + return productTypeListAll; + } + + public DesignType get(long productTypeId) + { + return typeMapAll.get(productTypeId); + } + + /** + * 获取产品类型名称 + * + * @param productTypeId + * @return + */ + public String getName(long productTypeId) + { + DesignType temp = typeMapAll.get(productTypeId); + if (temp == null) + { + return ""; + } + + return temp.getTypeName(); + } + + /** + * 刷新缓存数据 + * + * @return + */ + public DesignTypeCache doRefresh() + { + try + { + productTypeList.clear(); + typeMap.clear(); + productTypeListAll.clear(); + typeMapAll.clear(); + + productTypeListAll = ORM.get(ZTable.class).list(DesignType.class, new Selector().addOrderbyAsc("typeSeq")); + for (DesignType temp : productTypeListAll) + { + if (temp.isEnabled()) + { + typeMap.put(temp.getTypeId(), temp); + productTypeList.add(temp); + } + + typeMapAll.put(temp.getTypeId(), temp); + } + + } + catch (Exception e) + { + log.error("缓存产品类型列表时异常", e); + } + + return this; + } +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/cache/ExpressCache.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/cache/ExpressCache.java new file mode 100644 index 0000000..737a4f0 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/cache/ExpressCache.java @@ -0,0 +1,138 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.cache; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.extend.HashMapSS; +import org.zhiqim.kernel.httpclient.HttpGet; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.kernel.json.parser.ArrayParser; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.manager.dbo.ZmrParam; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.model.ExpressModel; + +/** + * + * [简要描述]物流缓存:
            + * [详细描述]:
            + * + * @version 1.0 @author gjx 2019-11-5 新建与整理 + */ +@AnAlias("ExpressCache") +public class ExpressCache +{ + private static final Log log = LogFactory.getLog(ExpressCache.class); + private List expressList = new ArrayList(); + private Map expressMap = new HashMap(); + + public List getList() + { + if (expressMap.isEmpty()) + { + doRefresh(); + } + + return expressList; + } + + public ExpressModel get(String expressCode) + { + if (expressMap.isEmpty()) + { + doRefresh(); + } + + return expressMap.get(expressCode); + } + + public String getName(String expressCode) + { + if (expressMap.isEmpty()) + { + doRefresh(); + } + + ExpressModel express = expressMap.get(expressCode); + if (express == null) + { + return ""; + } + + return express.getExpressName(); + } + + /** + * 刷新缓存数据 + * + * @return + */ + public ExpressCache doRefresh() + { + try + { + expressList.clear(); + expressMap.clear(); + + Selector select = new Selector(); + select.addMust("paramGroup", "yangcai.erp"); + select.addMust("paramKey", "expressCacheProvide"); + ZmrParam zparam = ORM.get(ZTable.class).item(ZmrParam.class, select); + if (zparam == null) + { + log.error("物流缓存初始化失败..."); + return new ExpressCache(); + } + HttpGet get = new HttpGet(zparam.getParamValue()); + get.setConnectTimeout(1);// 1秒 连接 + get.setReadTimeout(3);// 3秒读取 + get.execute(); + String responseText = ""; + if (get.isResponseSuccess() && Validates.isNotEmptyBlank(get.getResponseText())) + { + responseText = get.getResponseText(); + } + if (Validates.isNotEmpty(responseText)) + { + List responseList = ArrayParser.toFieldList(responseText); + for (String field : responseList) + { + HashMapSS mapSS = Jsons.toMapSS(field); + ExpressModel model = new ExpressModel(); + model.setExpressCode(mapSS.get("expressCode")); + model.setExpressName(mapSS.get("expressName")); + model.setExpressAliasName(mapSS.get("expressAliasName")); + expressList.add(model); + } + } + for (ExpressModel expressModel : expressList) + { + expressMap.put(expressModel.getExpressCode(), expressModel); + } + } + catch (Exception e) + { + log.error("物流缓存初始化失败..."); + } + return this; + } +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/cache/IndustryLabelCache.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/cache/IndustryLabelCache.java new file mode 100644 index 0000000..fb0a085 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/cache/IndustryLabelCache.java @@ -0,0 +1,189 @@ +/** + * 扬彩印刷设计 + * 文件名 :IndustryLabelCache.java + * 创建人 :jiangbin + * 创建时间:2019-12-16 + */ +package com.zhiqim.yangcai.cache; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.extend.HashMapSS; +import org.zhiqim.kernel.extend.MapSO; +import org.zhiqim.kernel.httpclient.HttpGet; +import org.zhiqim.kernel.httpclient.HttpResult; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.kernel.json.parser.ArrayParser; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.kernel.util.Validates; + +import com.zhiqim.yangcai.design.model.IndustryLabelModel; +import com.zhiqim.yangcai.util.BusinessPlatformClientUtil; + +/** + * [简要描述]:行业标签缓存
            + * [详细描述]:
            + * + * @version 1.0 @author jiangbin 2019-12-16 新建与整理 + */ +@AnAlias("IndustryLabelCache") +public class IndustryLabelCache +{ + private static final Log log = LogFactory.getLog(IndustryLabelCache.class); + private List industryLabelAll = new ArrayList<>();// 全部标签 + private List industryLabelList = new ArrayList();// 可用标签 + + public List getIndustryLabelAll() + { + return industryLabelAll; + } + + public List getIndustryLabelList() + { + return industryLabelList; + } + + /** 获取行业标签名 */ + public String getIndustryLabelName(long industryLabelId) + { + for (IndustryLabelModel param : industryLabelAll) + { + if (industryLabelId == param.getId()) + { + return param.getLabelName(); + } + } + return ""; + } + + /** 获取行业标签对象 */ + public IndustryLabelModel getIndustryLabel(long industryLabelId) + { + for (IndustryLabelModel param : industryLabelAll) + { + if (industryLabelId == param.getId()) + { + return param; + } + } + return null; + } + + /** 获取可用行业标签 map格式 */ + public Map map() throws Exception + { + Map map = new LinkedHashMap<>(); + List list = Global.get(IndustryLabelCache.class).getIndustryLabelList(); + for (IndustryLabelModel label : list) + { + map.put(label.getId(), label); + } + return map; + } + + /** 获取全部行业标签 map格式 */ + public Map mapAll() throws Exception + { + Map map = new LinkedHashMap<>(); + List list = Global.get(IndustryLabelCache.class).getIndustryLabelAll(); + for (IndustryLabelModel label : list) + { + map.put(label.getId(), label); + } + return map; + } + + /** + * 刷新行业标签缓存数据 + * + * @return + */ + public static void doRefreshIndustryLabelCache() + { + IndustryLabelCache ilc = Global.get(IndustryLabelCache.class); + ilc = ilc != null ? ilc : new IndustryLabelCache(); + Global.remove(IndustryLabelCache.class); + Global.add(IndustryLabelCache.class, ilc.doRefresh()); + } + + /** + * 刷新 + * + * @return + */ + public IndustryLabelCache doRefresh() + { + try + { + String access_token = BusinessPlatformClientUtil.getAccessToken(); + // 获取行业标签数据 + String url = Global.getString("businessPlatform", "gatewayUrl"); + StringBuffer buffer = new StringBuffer(url); + buffer.append("api-conf/industrylabel/list?access_token="); + buffer.append(access_token); + HttpGet get = new HttpGet(buffer.toString()); + get.setConnectTimeout(3); + get.setReadTimeout(3); + get.execute(); + HttpResult result = get.getResult(); + if (result.isSuccess()) + { + String resultText = result.getResponseText(); + MapSO industryMap = Jsons.toMapSO(resultText); + if (Validates.isNotEmpty(industryMap)) + { + String data = String.valueOf(industryMap.get("data")); + List industrys = ArrayParser.toFieldList(data); + industryLabelList.clear(); + industryLabelAll.clear(); + for (String string : industrys) + { + HashMapSS mapSS = Jsons.toMapSS(string); + if (Validates.isEmpty(mapSS.get("id")) || Validates.isEmpty(mapSS.get("industryCode")) + || Validates.isEmpty(mapSS.get("state"))) + { + continue; + } + IndustryLabelModel model = new IndustryLabelModel(); + model.setId(Long.valueOf(mapSS.get("id"))); + model.setIndustryId(Long.valueOf(mapSS.get("industryCode"))); + model.setDimensionId(mapSS.get("dimensionCode")); + model.setLabelName(mapSS.get("labelName")); + model.setState(Integer.valueOf(mapSS.get("state"))); + industryLabelAll.add(model); + if ("1".equals(mapSS.get("state"))) + { + industryLabelList.add(model); + } + } + } + } + } + catch (Exception e) + { + log.error("初始化行业标签数据失败", e); + } + + return this; + } + + public static void main(String[] args) + { + String industryCode = null; + if (Validates.isEmpty(industryCode)) + { + System.out.println("空"); + } + else + { + System.out.println(Long.valueOf("industryCode")); + } + } + +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/cache/LabelDimensionCache.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/cache/LabelDimensionCache.java new file mode 100644 index 0000000..7e5b94f --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/cache/LabelDimensionCache.java @@ -0,0 +1,163 @@ +/** + * 扬彩印刷设计 + * 文件名 :LabelDimensionCache.java + * 创建人 :jiangbin + * 创建时间:2019-12-18 + */ +package com.zhiqim.yangcai.cache; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.extend.HashMapSS; +import org.zhiqim.kernel.extend.MapSO; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.kernel.json.parser.ArrayParser; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.kernel.util.Validates; + +import com.zhiqim.yangcai.design.constants.BaseConstants; +import com.zhiqim.yangcai.design.model.LabelDimensionModel; +import com.zhiqim.yangcai.util.BusinessPlatformClientUtil; + +/** + * [简要描述]:标签维度缓存
            + * [详细描述]:
            + * + * @version 1.0 @author jiangbin 2019-12-18 新建与整理 + */ +@AnAlias("LabelDimensionCache") +public class LabelDimensionCache +{ + private static final Log log = LogFactory.getLog(LabelDimensionCache.class); + private List dimensionAll = new ArrayList<>();// 全部维度 + private List dimensionList = new ArrayList();// 可用维度 + + public List getDimensionAll() + { + return dimensionAll; + } + + public List getDimensionList() + { + return dimensionList; + } + + /** 获取维度名 */ + public String getDimensionName(String dimensionId) + { + for (LabelDimensionModel param : dimensionAll) + { + if (dimensionId.equals(param.getDimensionId())) + { + return param.getDimensionName(); + } + } + + return ""; + } + + /** 获取维度对象 */ + public LabelDimensionModel getDimension(String dimensionId) + { + for (LabelDimensionModel param : dimensionAll) + { + if (dimensionId.equals(param.getDimensionId())) + { + return param; + } + } + + return null; + } + + /** 获取标签维度 map格式 */ + public Map map() throws Exception + { + Map map = new LinkedHashMap<>(); + List list = Global.get(LabelDimensionCache.class).getDimensionList(); + for (LabelDimensionModel dimension : list) + { + map.put(dimension.getDimensionId(), dimension); + } + + return map; + } + + /** 获取所有标签维度 map格式 */ + public Map mapAll() throws Exception + { + Map map = new LinkedHashMap<>(); + List list = Global.get(LabelDimensionCache.class).getDimensionAll(); + for (LabelDimensionModel dimension : list) + { + map.put(dimension.getDimensionId(), dimension); + } + + return map; + } + + /** + * 刷新维度缓存数据 + * + * @return + */ + public static void doRefreshLabelDimensionCache() + { + LabelDimensionCache ldc = Global.get(LabelDimensionCache.class); + ldc = ldc != null ? ldc : new LabelDimensionCache(); + Global.remove(LabelDimensionCache.class); + Global.add(LabelDimensionCache.class, ldc.doRefresh()); + } + + /** + * 刷新 + * + * @return + */ + public LabelDimensionCache doRefresh() + { + try + { + String access_token = BusinessPlatformClientUtil.getAccessToken(); + // 获取标签维度数据 + String resultText = BusinessPlatformClientUtil.getDicKeyParamValue(BaseConstants.DIMENSION_DIC_KEY_CODE, access_token); + MapSO industryMap = Jsons.toMapSO(resultText); + if (Validates.isNotEmpty(industryMap)) + { + String data = String.valueOf(industryMap.get("data")); + List industrys = ArrayParser.toFieldList(data); + dimensionAll.clear(); + dimensionList.clear(); + for (String field : industrys) + { + HashMapSS mapSS = Jsons.toMapSS(field); + boolean isEnabled = "1".equals(mapSS.get("state")) ? true : false; + LabelDimensionModel dimension = new LabelDimensionModel(); + dimension.setDimensionId(mapSS.get("code")); + dimension.setDimensionName(mapSS.get("name")); + dimension.setRemark(mapSS.get("remark")); + dimension.setEnabled(isEnabled); + dimension.setDimensionSeq(Integer.valueOf(mapSS.get("seq"))); + + dimensionAll.add(dimension); + if (isEnabled) + {// 可用维度 + dimensionList.add(dimension); + } + } + } + } + catch (Exception e) + { + log.error("初始化标签维度数据失败", e); + } + + return this; + } +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/cache/OrgCache.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/cache/OrgCache.java new file mode 100644 index 0000000..655ba43 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/cache/OrgCache.java @@ -0,0 +1,110 @@ +package com.zhiqim.yangcai.cache; + +import java.util.ArrayList; +import java.util.List; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.manager.dbo.ZmrOrg; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +/** + * 组织缓存 + */ +@AnAlias("OrgCache") +public class OrgCache +{ + private static final Log log = LogFactory.getLog(OrgCache.class); + private List orgList = new ArrayList<>(); + private List orgAllList = new ArrayList<>(); + + /** 获取组织列表 */ + public List list() + { + return orgList; + } + + /** 获取所有组织列表 */ + public List listAll() + { + return orgAllList; + } + + /** 获取组织名 */ + public String name(long orgId) + { + for (ZmrOrg param : orgAllList) + { + if (orgId == param.getOrgId()) + { + return param.getOrgName(); + } + } + + return ""; + } + + /** 获取组织对象 */ + public ZmrOrg get(long orgId) + { + for (ZmrOrg param : orgAllList) + { + if (orgId == param.getOrgId()) + { + return param; + } + } + + return null; + } + + /** + * 获取根组织 + * + * @return + */ + public ZmrOrg getRootOrg() + { + for (ZmrOrg param : orgAllList) + { + if (param.getOrgLevel() == 0) + { + return param; + } + } + + return null; + } + + /** + * 刷新缓存数据 + * + * @return + */ + public OrgCache doRefresh() + { + try + { + orgAllList.clear(); + orgList.clear(); + + orgAllList = ORM.get(ZTable.class).list(ZmrOrg.class, new Selector().addOrderbyAsc("orgLevel,orgSeq")); + for (ZmrOrg temp : orgAllList) + { + if (temp.getOrgStatus() == 0) + { + orgList.add(temp); + } + } + } + catch (Exception e) + { + log.error("查询组织列表时失败", e); + } + + return this; + } +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/cache/ProductConvertCache.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/cache/ProductConvertCache.java new file mode 100644 index 0000000..02e1e77 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/cache/ProductConvertCache.java @@ -0,0 +1,119 @@ +/** + * 扬彩印刷设计 + * 文件名 :ProductConvertCache.java + * 创建人 :gjx + * 创建时间:2021年3月6日 +*/ + +package com.zhiqim.yangcai.cache; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.design.ProductDesignPriceView; + +/** + * + * [简要描述]: 产品单价缓存
            + * [详细描述]:
            + * + * @version 1.0 @author gjx 2021年3月6日 新建与整理 + */ +@AnAlias("ProductConvertCache") +public class ProductConvertCache +{ + private static final Log log = LogFactory.getLog(ProductConvertCache.class); + + private List productConvertList = new ArrayList(); + private Map> prdTypeConvertMap = new HashMap>();// 产品对应的单价计算规则 + + public List getProductConvertList() + { + return productConvertList; + } + + /** + * * + * [简要描述]: 获取产品单价list
            + * [详细描述]:
            + * + * @author gjx + * @param prdTypeId + * @return + */ + public List getProductLeverPriceList(long prdTypeId) + { + + return prdTypeConvertMap.get(Long.valueOf(prdTypeId)); + } + + /** + * + * [简要描述]: 添加产品单价缓存
            + * [详细描述]:
            + * + * @author gjx + * @return + */ + public ProductConvertCache doRefresh() + { + try + { + productConvertList.clear(); + prdTypeConvertMap.clear(); + + productConvertList = ORM.get(ZView.class).list(ProductDesignPriceView.class, new Selector().addOrderbyAsc("prdTypeId").addMust("status", 1)); + for (ProductDesignPriceView prdCvt : productConvertList) + { + long prdTypeId = prdCvt.getPrdTypeId(); + + if (!prdTypeConvertMap.containsKey(Long.valueOf(prdTypeId))) + { + prdTypeConvertMap.put(prdTypeId, new ArrayList()); + } + + List valueList = prdTypeConvertMap.get(Long.valueOf(prdTypeId)); + valueList.add(prdCvt); + + } + + for (Entry> item : prdTypeConvertMap.entrySet()) + { + Collections.sort(item.getValue(), new Comparator() + { + @Override + public int compare(ProductDesignPriceView o1, ProductDesignPriceView o2) + { + int o1Seq = o1.getSeq(); + int o2Seq = o2.getSeq(); + + if (String.valueOf(o1Seq).length() == String.valueOf(o2Seq).length()) + {// 序号长度一样 + return (o1.getPrdSizeWidth() + o1.getPrdSizeHeight()) - (o2.getPrdSizeWidth() + o2.getPrdSizeHeight()); + } + + return o2Seq - o1Seq; + } + }); + } + + } + catch (Exception e) + { + log.error("缓存产品单价规则异常", e); + } + return this; + } +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/cache/Test.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/cache/Test.java new file mode 100644 index 0000000..945449f --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/cache/Test.java @@ -0,0 +1,131 @@ +package com.zhiqim.yangcai.cache; + +import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.List; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZSQL; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.media.dbo.MediaBg; +import com.zhiqim.media.dbo.MediaCanvas; +import com.zhiqim.yangcai.design.dbo.template.MediaTemplate; +import com.zhiqim.yangcai.design.dbo.works.DesWorksFile; + +/** + * 未关联的作品库历史数据添加模板库数据 + * + * @author yixin + * + */ +@AnAlias("Test") +public class Test +{ + private static final Log log = LogFactory.getLog(Test.class); + + public static void test() + { + new Thread(new Runnable() + { + @Override + public void run() + { + Timestamp createTime = Sqls.nowTimestamp(); + String updateTime = Sqls.toDateTimeString(createTime); + try + { + String sql = "SELECT * FROM DES_WORKS_FILE WHERE TEMPLATE_ID NOT IN (SELECT MEDIA_ID FROM media_template) or TEMPLATE_ID = 0 or TEMPLATE_ID is null or TEMPLATE_ID = ''"; + List desWorksFileList = ORM.get(ZSQL.class).executeQuery(sql, DesWorksFile.class); + for (DesWorksFile desWorksFile : desWorksFileList) + { + MediaTemplate mediaTemplate = new MediaTemplate(); + MediaCanvas mediaCanvas = new MediaCanvas(); + long mediaId = Ids.longId(); + mediaTemplate.setMediaId(mediaId); + // 设置模板类型 + switch (desWorksFile.getWorksType()) + { + case 1: + mediaTemplate.setTemplateType(110); + break; + default: + mediaTemplate.setTemplateType(100); + break; + } + mediaTemplate.setDesigner(desWorksFile.getDesigner()); + mediaTemplate.setTypeId(desWorksFile.getPrdTypeId()); + mediaTemplate.setPageValue(2); + mediaTemplate.setIndustryId(desWorksFile.getIndustryId()); + mediaTemplate.setIndustrySubIds(desWorksFile.getIndustrySubIds()); + mediaTemplate.setIndustrySubName(desWorksFile.getIndustrySubName()); + mediaTemplate.setAttributeIds(desWorksFile.getAttributeIds()); + mediaTemplate.setAttributeName(desWorksFile.getAttributeName()); + mediaTemplate.setKeywordId(desWorksFile.getKeywordId()); + mediaTemplate.setKeywordName(desWorksFile.getKeywordName()); + mediaTemplate.setReleaseStatus(1); + mediaTemplate.setReleaseTime(updateTime); + + mediaCanvas.setMediaId(mediaId); + mediaCanvas.setMediaName("未命名"); + mediaCanvas.setStatus(0); + mediaCanvas.setMediaType(desWorksFile.getPrdTypeId()); + mediaCanvas.setIsEdit(0); + mediaCanvas.setWidth(2527.55900000); + mediaCanvas.setHeight(3413.38580000); + mediaCanvas.setWidthMm(214.00000000); + mediaCanvas.setHeightMm(289.00000000); + mediaCanvas.setDpi(300); + mediaCanvas.setBleedSize(2.00); + mediaCanvas.setCreateMode(0); + mediaCanvas.setModify(false); + mediaCanvas.setOddEven(0); + mediaCanvas.setCreateTime(updateTime); + mediaCanvas.setUpdateTime(updateTime); + mediaCanvas.setFullWidth(2527.55900000); + mediaCanvas.setFullHeight(3413.38580000); + mediaCanvas.setFullWidthMm(214.00000000); + mediaCanvas.setFullWidthMm(289.00000000); + mediaCanvas.setBaseWidthMm(214.00000000); + mediaCanvas.setBaseHeightMm(289.00000000); + mediaCanvas.setMediaUrl(desWorksFile.getThumbImagePath()); + + MediaBg bg1 = new MediaBg(); + MediaBg bg2 = new MediaBg(); + bg1.setMediaId(mediaId); + bg2.setMediaId(mediaId); + bg1.setBid(0); + bg2.setBid(1); + bg1.setOddEven(0); + bg2.setOddEven(0); + bg1.setSource( + ""); + bg2.setSource( + ""); + List list = new ArrayList(2); + list.add(bg1); + list.add(bg2); + ORM.get(ZTable.class).insert(mediaTemplate); + ORM.get(ZTable.class).insert(mediaCanvas); + ORM.get(ZTable.class).insertBatch(list); + Updater updater = new Updater(); + updater.addMust("worksId", desWorksFile.getWorksId()); + updater.addField("templateId", mediaId); + updater.addField("fileType", "cdr"); + ORM.get(ZTable.class).update(DesWorksFile.class, updater); + } + } + catch (Exception e) + { + log.error("作品库生成模板库内容失败", e); + } + } + }).start(); + } +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/Main.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/Main.java new file mode 100644 index 0000000..29f884c --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/Main.java @@ -0,0 +1,17 @@ +package com.zhiqim.yangcai.design; + +import org.zhiqim.kernel.Servicer; + +import com.zhiqim.media.manage.MediaEditBootstrap; + +public class Main extends Servicer +{ + @Override + public boolean create() throws Exception + { + MediaEditBootstrap.initCache(); // 素材初始化数据 + MediaDesignBootstrap.initCache(); // 业务公共配置初始化数据 + return true; + } + +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/constants/AfterConstants.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/constants/AfterConstants.java new file mode 100644 index 0000000..cfca253 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/constants/AfterConstants.java @@ -0,0 +1,109 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.constants; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.util.consts.Int; + +/*** + * 售后相关常量 + * + * @version v1.0.0 @author longguizhi 2018-12-16 新建与整理 + */ +@AnAlias("AfterConstants") +public class AfterConstants +{ + /***************************************/ + // 售后状态部分 + /***************************************/ + private static final Map statusMap = new HashMap(); + private static final List statusList = new ArrayList(); + + /** 系统撤销 外部系统撤销 ***/ + public static final Int CS_F120 = new Int(-120, "系统撤销");// 外部系统撤销 + /** 申诉成功 **/ + public static final Int CS_F100 = new Int(-100, "申诉成功");// 申诉成功 + /** 未分配 未分配 责任 **/ + public static final Int CS_0 = new Int(0, "未分配");// 未分配 责任 + + /** 设计师有异议申诉 退回 **/ + public static final Int CS_100 = new Int(100, "异议申诉"); + /** 售后待审 **/ + public static final Int CS_200 = new Int(200, "售后待审"); + /** 售后处理中 **/ + public static final Int CS_300 = new Int(300, "售后处理中"); + /** 售后完结 **/ + public static final Int CS_400 = new Int(400, "售后完结"); + /** 申诉拒绝 **/ + public static final Int CS_500 = new Int(500, "申诉拒绝"); + + public static List getStatusList() + { + return statusList; + } + + /** 获取状态HTML 代码 **/ + public static String statusHtml(int status) + { + return statusMap.containsKey(status) ? statusMap.get(status) : ""; + } + + public static Int statusItem(int status) + { + for (Int item : statusList) + { + if (item.value() == status) + { + return item; + } + } + + return null; + } + + static + { + statusMap.clear(); + statusMap.put(CS_F120.value(), "" + + CS_F120.desc() + ""); + statusMap.put(CS_F100.value(), "" + + CS_F100.desc() + ""); + statusMap.put(CS_0.value(), "" + CS_0.desc() + + ""); + statusMap.put(CS_100.value(), "" + CS_100.desc() + + ""); + statusMap.put(CS_200.value(), "" + CS_200.desc() + + ""); + statusMap.put(CS_300.value(), "" + CS_300.desc() + + ""); + statusMap.put(CS_400.value(), "" + CS_400.desc() + + ""); + statusMap.put(CS_500.value(), "" + CS_500.desc() + + ""); + + statusList.clear(); + statusList.add(CS_F120); + statusList.add(CS_F100); + statusList.add(CS_0); + statusList.add(CS_100); + statusList.add(CS_200); + statusList.add(CS_300); + statusList.add(CS_400); + statusList.add(CS_500); + } + +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/constants/AwardedTypeConstants.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/constants/AwardedTypeConstants.java new file mode 100644 index 0000000..9bf3e0b --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/constants/AwardedTypeConstants.java @@ -0,0 +1,85 @@ +/** + * 扬彩印刷设计 + * 文件名 :AwardedType.java + * 创建人 :高佳新 + * 创建时间:2019-5-20 + */ + +package com.zhiqim.yangcai.design.constants; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.extend.LinkedMapSO; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZSQL; + +import com.zhiqim.yangcai.design.dbo.qc.QcAwardedType; + +/** + * + * 质检加分类型抽象数据提供类 + * + * @version 1.0 @author 高佳新 2019-5-20 新建与整理 + */ +@AnAlias("AwardedTypeConstants") +public class AwardedTypeConstants +{ + /** + * + * 质检加分类型列表 + * + * @author 高佳新 + * @return + * @throws Exception + */ + public static List getAwardedTypeList() throws Exception + { + List awardedTypeList = new ArrayList<>(); + QcAwardedType qcAwardedType; + StringBuffer awardedBuffer = new StringBuffer(); + awardedBuffer.append("select QC_TYPE_ID,QC_AWARDED_NAME,QC_SCORE from QC_AWARDED_TYPE"); + List awardedList; + String sql = awardedBuffer.toString(); + awardedList = ORM.get(ZSQL.class).executeQuery(sql); + for (LinkedMapSO awardedType : awardedList) + { + qcAwardedType = new QcAwardedType(); + qcAwardedType.setQcTypeId((Long) awardedType.get("QC_TYPE_ID")); + qcAwardedType.setQcAwardedName(String.valueOf(awardedType.get("QC_AWARDED_NAME"))); + qcAwardedType.setQcScore(((BigDecimal) awardedType.get("QC_SCORE")).doubleValue()); + awardedTypeList.add(qcAwardedType); + } + return awardedTypeList; + } + + /** + * + * 通过加分类型id获取名称 + * + * @author 高佳新 + * @param qcTypeId + * @return + */ + public static String getAwardedTypeId(long qcTypeId) + { + StringBuffer awardedBuffer = new StringBuffer(); + awardedBuffer.append("select QC_TYPE_ID,QC_AWARDED_NAME,QC_SCORE from QC_AWARDED_TYPE where QC_TYPE_ID = " + qcTypeId); + List awardedList; + try + { + awardedList = ORM.get(ZSQL.class).executeQuery(awardedBuffer.toString()); + for (LinkedMapSO awardedType : awardedList) + { + return String.valueOf(awardedType.get("QC_AWARDED_NAME")); + } + } + catch (Exception e) + { + e.printStackTrace(); + } + return ""; + } +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/constants/BaseConstants.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/constants/BaseConstants.java new file mode 100644 index 0000000..18b29d4 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/constants/BaseConstants.java @@ -0,0 +1,140 @@ +package com.zhiqim.yangcai.design.constants; + +import org.zhiqim.kernel.annotation.AnAlias; + +/** + * 常用常量 + * + * @author zhouwenbin + * + */ +@AnAlias("BaseConstants") +public class BaseConstants +{ + + // 线下付款类型 + /** 线下付款类型 */ + + /** 现金支付 */ + public static int PAYMENT_TYPE_CASH = 1; // 现金支付 + + /** 支付宝转账 */ + public static int PAYMENT_TYPE_ALIPAY = 2; // 支付宝转账 + + /** 微信转账 */ + public static int PAYMENT_TYPE_WECHAT = 3; // 微信转账 + + /** 银行转账 */ + public static int PAYMENT_TYPE_BLANK = 4; // 银行卡转账 + + /** 转账客户账号 */ + public static String TRANSFER_ACCOUNTS = "转账客户"; // 转账客户; + /** 售后客户账号 */ + public static String TRANSFER_AFS_ACCOUNTS = "售后客户"; // 售后客户; + /** 寄存单所属店铺、寄存客户 */ + public static String CONSIGN_ACCOUNTS = "寄存客户"; // 寄存客户; + /** 微商拓展 */ + public static String WEISHANG_ACCOUNTS = "微商拓展"; // 微商拓展; + + /** 售前部门ID */ + public static long DEPT_ID_PRESALE = 1708182010080003L; // 客服部门ID + + /** 设计部门ID */ + public static long DEPT_ID_DESIGN = 1708182010230004L; // 设计部门ID; + + /** 设计助理部门ID */ + public static long DEPT_ID_ASSISTANT = 1709041736040001L; // 设计助理部门ID; + + /** 督导组ID */ + public static long DEPT_ID_SUPERVISION = 1709121557500001L; // 督导组; + + /** 仓库组 */ + public static long DEPT_ID_STORE = 1709051550440002L; // 仓库组; + + /** 印前部 */ + public static long DEPT_ID_BEFORE = 1803011802247667L; // 印前部; + + // -----SYS_FIELD表中的FIELD_CAT字段对应常量 ----------- + public static String ROCS = "rocs"; // 客服等级参数键 + + /** 售后问题类型 */ + public static String FIELD_AFTER_QUESTION = "售后问题类型"; + + /** 售后处理方式 */ + public static String FIELD_AFTER_METHOD = "售后处理方式"; + + /** 责任部门 */ + public static String FIELD_DUTY = "责任部门"; + + /** 售后类型 */ + public static String FIELD_AFTER_TYPE = "售后类型"; + + /** 售后类型组 */ + public static String FIELD_AFTER_TYPE_GROUP = "FIELD_AFTER_TYPE_GROUP"; + + /** 字段公共组 */ + public static String FIELD_COM = "FIELD_COM"; + + /** 处理方案 */ + public static String FIELD_HANDLE = "处理方案"; + + /** 后加工类型 */ + public static String FIELD_POLICY_TYPE = "后加工类型"; + + /** 订单来源,0:原订单 */ + public static int ORDER_SRC_0 = 0; + + /** 订单来源,1:补印单 */ + public static int ORDER_SRC_1 = 1; + + /** 订单来源,2:赠送单 */ + public static int ORDER_SRC_2 = 2; + + /** 订单来源,3:微商订单 */ + public static int ORDER_SRC_3 = 3; + + /** 订单来源,4:免费赠送订单 */ + public static int ORDER_FEE_4 = 4; + + /* 产品类型id */ + /** 名片 */ + public static final long CARD_ID = 1L; + + /** 彩页 */ + public static final long COLOR_PAGE_ID = 2L; + + /** 画册 */ + public static final long ALBUM_ID = 3L; + + public static final long PICTURE_ALBUM = 3; // 产品类型画册id; + + /** 展架 */ + public static final long RACK_ID = 4L; + + /** 不干胶 */ + public static final long STICK_ID = 5245L; + + /** 喷绘 */ + public static final long PENHUI_ID = 13879L; + + /** 联单 */ + public static final long SINGLE_ID = 5244L; + + /** 条幅 */ + public static final long BANNERS_ID = 174928L; + + /** 运营平台配置中心数据字典:行业数据配置keycode */ + public static final String INDUSTRY_DIC_KEY_CODE = "industry_type"; + + /** 运营平台配置中心数据字典:标签维度数据配置keycode */ + public static final String DIMENSION_DIC_KEY_CODE = "industry_dimension"; + + /** 运营平台配置中心数据字典:客户类型数据配置keycode */ + public static final String CUSTOMER_TYPE_KEY_CODE = "customer_type"; + + /** cdn域名 */ + public static final String CDN_URL = "img.xwyin.cn"; + + /** oss原始域名 */ + public static final String OSS_URL = "oss-89-taobao.oss-cn-shenzhen.aliyuncs.com"; +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/constants/ComplainConstants.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/constants/ComplainConstants.java new file mode 100644 index 0000000..79dc771 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/constants/ComplainConstants.java @@ -0,0 +1,96 @@ +/** + * 扬彩印刷设计 + * 文件名 :ComplainConstants.java + * 创建人 :gjx + * 创建时间:2019-8-10 + */ +package com.zhiqim.yangcai.design.constants; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.util.consts.Str; + +/** + * 投诉状态 + * + * @version 1.0 @author gjx 2019-8-10 新建与整理 + */ +@AnAlias("ComplainConstants") +public class ComplainConstants +{ + public static Map statusHtmlMap = new LinkedHashMap<>(); + public static Map statusMap = new LinkedHashMap<>(); + + /** 状态:投诉处理中 */ + public static final Str TX_10 = new Str("10", "处理中"); + /** 状态:投诉待确认 */ + public static final Str TX_20 = new Str("20", "待完结"); + /** 状态:投诉退回 */ + public static final Str TX_30 = new Str("30", "投诉退回"); + /** 状态:投诉完结 */ + public static final Str TX_40 = new Str("40", "投诉完结"); + + static + { + statusMap.clear(); + statusHtmlMap.clear(); + statusHtmlMap.put(TX_10.value(), "" + TX_10.desc() + + ""); + statusHtmlMap.put(TX_20.value(), "" + TX_20.desc() + + ""); + statusHtmlMap.put(TX_30.value(), "" + TX_30.desc() + + ""); + statusHtmlMap.put(TX_40.value(), "" + TX_40.desc() + + ""); + statusMap.put(TX_10.value(), TX_10); + statusMap.put(TX_20.value(), TX_20); + statusMap.put(TX_30.value(), TX_30); + statusMap.put(TX_40.value(), TX_40); + } + + public static List getList() + { + List list = new ArrayList<>(); + for (Str str : statusMap.values()) + { + list.add(str); + } + return list; + + } + + public static String getStatus(String key) + { + if (!statusHtmlMap.containsKey(key)) + { + return ""; + + } + return statusHtmlMap.get(key); + } + + public static String getDesc(String key) + { + if (!statusMap.containsKey(key)) + { + return ""; + + } + return statusMap.get(key).desc(); + } + + public static Str item(String key) + { + + if (!statusMap.containsKey(key)) + { + return null; + + } + return statusMap.get(key); + } +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/constants/DesignerWorkStatus.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/constants/DesignerWorkStatus.java new file mode 100644 index 0000000..0f801e8 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/constants/DesignerWorkStatus.java @@ -0,0 +1,21 @@ +package com.zhiqim.yangcai.design.constants; + +/**** + * 设计师上班状态 + * + * @version v1.0.0 @author longguizhi 2018-12-10 新建与整理 + */ +public class DesignerWorkStatus +{ + /** 已经登录服务器 **/ + public static final int LOGIN_ED = 0;// 已经登录系统 + + /** 正在上班, 接单中 **/ + public static final int ON_DUTY = 1;// 正在上班, 接单中 + + /** 停止接单, 下班 **/ + public static final int OFF_DUTY = 2;// 停止接单, 下班 + + /** 退出浏览器 **/ + public static final int LOGOUT = 3;// 退出浏览器 +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/constants/DraftConstants.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/constants/DraftConstants.java new file mode 100644 index 0000000..bfd10ca --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/constants/DraftConstants.java @@ -0,0 +1,83 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.constants; + +import java.util.ArrayList; +import java.util.List; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.util.consts.Int; + +/** + * 稿件类型常量 + * + * @version v1.0.0 @author zhouwenbin 2017-8-4 新建与整理 + */ +@AnAlias("DraftConstants") +public class DraftConstants +{ + /** 标准自来稿 */ + public static Int DRAFT_STANDARD = new Int(0, "标准自来稿"); + + /** 改稿自来稿 */ + public static Int DRAFT_TEMPLATE = new Int(1, "改稿自来稿"); + + /** 普通设计 */ + public static Int DRAFT_COMMON_DESIGN = new Int(2, "普通设计"); + + /** 资深设计,折页设计 */ + public static Int DRAFT_PAGE_DESIGN = new Int(3, "资深设计"); + + /** 现货 */ + public static Int DRAFT_ACTUALS = new Int(4, "现货"); + + private static List draftList = new ArrayList<>(); + static + { + draftList.add(DRAFT_STANDARD); + draftList.add(DRAFT_TEMPLATE); + draftList.add(DRAFT_COMMON_DESIGN); + draftList.add(DRAFT_PAGE_DESIGN); + draftList.add(DRAFT_ACTUALS); + } + + public static List getList() + { + return draftList; + } + + public static String get(int key) + { + for (Int draft : draftList) + { + if (draft.value() == key) + { + return draft.desc(); + } + } + + return ""; + } + + public static Int getTypeItem(int key) + { + for (Int draft : draftList) + { + if (draft.value() == key) + { + return draft; + } + } + return null; + } + +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/constants/EventConstants.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/constants/EventConstants.java new file mode 100644 index 0000000..3329a0f --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/constants/EventConstants.java @@ -0,0 +1,137 @@ +package com.zhiqim.yangcai.design.constants; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.util.consts.Int; + +/** + * 事件类型常量 + * + * @version v1.0.0 @author Deng 2017-10-11 新建与整理 + */ + +@AnAlias("EventConstants") +public class EventConstants +{ + /** 订单取消 */ + public static final Int ORDER_F10 = new Int(-10, "订单取消"); + + /** 订单状态, 已设计取消(由于设计原因 产生的重新设计单) */ + public static final Int ORDER_F20 = new Int(-20, "已设计取消"); + + /** 印前退回 */ + public static final Int ORDER_F30 = new Int(-30, "印前审核退回"); + + /** 订单未分拣 */ + public static final Int ORDER_1 = new Int(1, "订单未分拣"); + + /** 订单分拣完成 */ + public static final Int ORDER_2 = new Int(2, "等待设计"); + + /** 订单正在设计 */ + public static final Int ORDER_3 = new Int(3, "订单正在设计"); + + /** 请求主管支援 */ + public static final Int ORDER_4 = new Int(4, "主管支援"); + + /** 请求退款 */ + public static final Int ORDER_5 = new Int(5, "请求退款"); + + /** 暂停设计 */ + public static final Int ORDER_6 = new Int(6, "补全资料"); + + /** 订单已初稿 */ + public static final Int ORDER_7 = new Int(7, "订单已初稿"); + + /** 订单初稿待审核 */ + public static final Int ORDER_8 = new Int(8, "订单初稿待审核"); + + /** 订单已定稿 */ + public static final Int ORDER_9 = new Int(9, "订单已定稿"); + + /** 订单审核退回 */ + public static final Int ORDER_10 = new Int(10, "订单审核退回"); + + /** 订单审核通过 */ + public static final Int ORDER_11 = new Int(11, "订单审核通过"); + + /** 订单状态, 已审-文件OSS 上传中 */ + public static final Int ORDER_12 = new Int(12, "正在存储中");// 文件OSS 上传中 + + /** 订单状态, 定稿待审核 */ + public static final Int ORDER_13 = new Int(13, "定稿待审核"); + // + // /**订单状态, 已审-文件OSS 上传失败*/ + // public static final Int ORDER_14 = new Int(14, "OSS上传失败");//文件OSS 上传失败 + + /** 订单状态, 已审-准备印刷(等待下单) */ + public static final Int ORDER_15 = new Int(15, "设计完成");// 等待创建 下单发货 订单及文件下载中(已上传到OSS) + + /** 文件审核 */ + public static final Int ORDER_16 = new Int(16, "文件审核"); + + /** 售后补单 */ + public static final Int ORDER_17 = new Int(17, "售后补单"); + + /** 订单信息修改 */ + public static final Int ORDER_20 = new Int(20, "订单信息修改"); + + /** 提交选版 */ + public static final Int ORDER_21 = new Int(21, "提交选版"); + + /** 提交排版 */ + public static final Int ORDER_22 = new Int(22, "提交排版"); + + /** 退回排版 */ + public static final Int ORDER_23 = new Int(23, "退回排版"); + + /** 创建自来稿订单 */ + public static final Int ORDER_24 = new Int(24, "创建自来稿订单"); + + /** 取消自来稿订单 */ + public static final Int ORDER_25 = new Int(25, "取消自来稿订单"); + + /** 历史取消自来稿订单 */ + public static final Int ORDER_26 = new Int(26, "历史取消自来稿订单"); + + /** 自来稿已领取 */ + public static final Int ORDER_27 = new Int(27, "自来稿已领取"); + + /** 自来稿已定稿 */ + public static final Int ORDER_28 = new Int(28, "自来稿已定稿"); + + /** 自来稿被领取 */ + public static final Int ORDER_29 = new Int(29, "自来稿被领取"); + + /** 创建设计订单 */ + public static final Int ORDER_30 = new Int(30, "创建设计订单"); + + /** 标签修改 */ + public static final Int ORDER_31 = new Int(31, "标签修改"); + + /** 工厂排产退回 */ + public static final Int ORDER_32 = new Int(32, "工厂排产退回"); + + /** 客服手动退回订单 */ + public static final Int ORDER_33 = new Int(33, "客服手动退回订单"); + + /** 订单催稿 */ + public static final Int ORDER_34 = new Int(34, "订单催稿"); + + /** 考核素材上传 */ + public static final Int ORDER_35 = new Int(35, "客户素材上传"); + + /** 设计师考核设计文件上传 */ + public static final Int ORDER_36 = new Int(36, "设计师考核设计文件上传"); + + /** 设计师考核印刷文件上传 */ + public static final Int ORDER_37 = new Int(37, "设计师考核印刷文件上传 "); + + /** 设计师放弃订单 */ + public static final Int ORDER_38 = new Int(38, "设计师放弃订单"); + /** 退款订单审核通过 */ + public static final Int ORDER_39 = new Int(39, "退款订单审核通过"); + /** 退款订单审核驳回 */ + public static final Int ORDER_40 = new Int(40, "退款订单审核驳回"); + /** 订单加急费修改 */ + public static final Int ORDER_43 = new Int(43, "订单加急费修改"); +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/constants/FileTypeConstants.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/constants/FileTypeConstants.java new file mode 100644 index 0000000..df74904 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/constants/FileTypeConstants.java @@ -0,0 +1,143 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.constants; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.util.consts.Str; + +/** + * 文件路径常量类 + * + * @version v1.0.0 @author zhouwenbin 2017-8-8 新建与整理 + */ +@AnAlias("FileTypeConstants") +public class FileTypeConstants +{ + /** 客户素材 */ + public static final Str FILE_CUSTOM = new Str("CustomFile", "客户素材"); + + /** 模板文件 */ + public static final Str FILE_TEMPLATE = new Str("TemplateFile", "模板文件"); + + /** 设计文件 */ + public static final Str FILE_DESGIN = new Str("DesginFile", "设计文件"); + + /** 印刷文件 */ + public static final Str FILE_END = new Str("EndFile", "印刷文件"); + + /** 编辑器文件 */ + public static final Str FILE_TBZ = new Str("TbzFile", "编辑器文件"); + + /** 定稿凭证 */ + public static final Str END_VOUCHER = new Str("EndVoucher", "定稿凭证"); + + /** 初稿缩略图 */ + public static final Str FILE_FIRSTTHUMFILE = new Str("FristThumFile", "初稿缩略图"); + + /** 缩略图 */ + public static final Str FILE_THUMFILE = new Str("ThumFile", "缩略图"); + + /** 后加工文件 */ + public static final Str FILE_WORK = new Str("WorkFile", "后加工文件"); + + /** 退款申诉截图 **/ + public static final Str FILE_COMPLAINT = new Str("ComplaintFile", "退款申诉截图"); + + /** 质检违规凭证 **/ + public static final Str FILE_QC_JUDGE = new Str("QcJudgeFile", "质检违规凭证"); + + /** 质检加分凭证 **/ + public static final Str FILE_QC_APPLY = new Str("QcApplyScoreFile", "质检加分凭证"); + + /** 审核退回图片 */ + public static final Str FILE_CHECK_BACK = new Str("CheckBackFile", "审核退回图"); + + /*******************************/ + // 售后部分 + /*******************************/ + /** 售后文件 */ + public static final Str FILE_AFTERSALE = new Str("AftersaleFile", "售后文件"); + + /** 售后申诉凭证文件 */ + public static final Str FILE_AFTE_COMPLAIN_EVIDENCE = new Str("AfterComplainEvidenceFile", "申诉凭证"); + + /** 申请退款截图 */ + public static final Str FILE_REFUND = new Str("ApplyRefundFile", "申请退款截图"); + + /** 投诉单完结图片 */ + public static final Str FILE_COMPLAIN_END = new Str("ComplainEnd", "投诉单完结图"); + + public static Map fileMap = new LinkedHashMap<>(); + + static + { + fileMap.put(FILE_CUSTOM.value(), FILE_CUSTOM); + fileMap.put(FILE_DESGIN.value(), FILE_DESGIN); + fileMap.put(FILE_END.value(), FILE_END); + fileMap.put(FILE_FIRSTTHUMFILE.value(), FILE_FIRSTTHUMFILE); + fileMap.put(FILE_THUMFILE.value(), FILE_THUMFILE); + fileMap.put(FILE_WORK.value(), FILE_WORK); + fileMap.put(FILE_TBZ.value(), FILE_TBZ); + fileMap.put(FILE_TEMPLATE.value(), FILE_TEMPLATE); + fileMap.put(FILE_COMPLAINT.value(), FILE_COMPLAINT); + + fileMap.put(FILE_QC_JUDGE.value(), FILE_QC_JUDGE); + fileMap.put(FILE_QC_APPLY.value(), FILE_QC_APPLY); + + fileMap.put(FILE_CHECK_BACK.value(), FILE_CHECK_BACK); + fileMap.put(FILE_AFTERSALE.value(), FILE_AFTERSALE); + fileMap.put(FILE_AFTE_COMPLAIN_EVIDENCE.value(), FILE_AFTE_COMPLAIN_EVIDENCE); + fileMap.put(FILE_REFUND.value(), FILE_REFUND); + fileMap.put(FILE_COMPLAIN_END.value(), FILE_COMPLAIN_END); + } + + public static List getFileTypeList() + { + List list = new ArrayList(); + for (Str str : fileMap.values()) + { + list.add(str); + } + + return list; + } + + public static boolean isExist(String fileType) + { + return fileMap.containsKey(fileType); + } + + public static Str get(String fileType) + { + if (fileMap.containsKey(fileType)) + { + return fileMap.get(fileType); + } + + return null; + } + + public static String getName(String fileType) + { + if (fileMap.containsKey(fileType)) + { + return fileMap.get(fileType).desc(); + } + + return ""; + } +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/constants/MessageThemeConstants.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/constants/MessageThemeConstants.java new file mode 100644 index 0000000..d973fcf --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/constants/MessageThemeConstants.java @@ -0,0 +1,70 @@ +/** + * 扬彩印刷设计 + * 文件名 :MessageThemeConstants.java + * 创建人 :gjx + * 创建时间:2020年8月15日 +*/ + +package com.zhiqim.yangcai.design.constants; + +import java.util.ArrayList; +import java.util.List; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.kernel.util.consts.Str; + +/** + * + * [简要描述]: 业务消息主题
            + * [详细描述]:
            + * + * @version 1.0 @author gjx 2020年8月15日 新建与整理 + */ +@AnAlias("MessageThemeConstants") +public class MessageThemeConstants +{ + /** 订单催稿/定稿 */ + public static Str MSG_ORDER_REMINDER = new Str("orderReminder", "订单催稿/定稿"); + + /** 更换/指定设计师/订单加急 */ + public static Str MSG_CHANGE_DESIGNER = new Str("changeDesigner", "更换/指定设计师/订单加急"); + + /** 订单审核/排产退回 */ + public static Str MSG_ORDER_RETURN = new Str("orderReturn", "订单审核/排产退回"); + + public static Str PLATFORM_TYPE_DESIGN = new Str("DESIGN", "设计平台"); + public static Str PLATFORM_TYPE_ERP = new Str("ERP", "ERP"); + public static Str PLATFORM_TYPE_CONSIGNMENT = new Str("CONSIGNMENT", "发货平台"); + + public static final List topicList = new ArrayList(); + static + { + topicList.add(MSG_ORDER_REMINDER); + topicList.add(MSG_CHANGE_DESIGNER); + topicList.add(MSG_ORDER_RETURN); + } + + public static List getTopicList() + { + return topicList; + } + + /** 获取名称 */ + public static String getName(String value) + { + if (Validates.isEmpty(value)) + { + return ""; + } + for (Str str : topicList) + { + if (value.equalsIgnoreCase(str.value())) + { + return str.desc(); + } + } + return ""; + } + +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/constants/StatusConstants.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/constants/StatusConstants.java new file mode 100644 index 0000000..7935778 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/constants/StatusConstants.java @@ -0,0 +1,151 @@ +package com.zhiqim.yangcai.design.constants; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.util.consts.Int; + +@AnAlias("StatusConstants") +public class StatusConstants +{ + private static List statusList = new ArrayList(); + private static Map statusTextMap = new HashMap(); + private static Map statusMap = new HashMap(); + + /** 订单状态, 已完结(滞留单场景) */ + public static final Int ORDER_F130 = new Int(-130, "已完结"); + + /** 订单状态, 已设计取消(由于设计原因产生) */ + public static final Int ORDER_F110 = new Int(-110, "已设计取消"); + + /** 订单状态, 已取消 */ + public static final Int ORDER_F100 = new Int(-100, "已取消"); + + /** 订单状态, 未分拣 (等待分拣到组织) */ + public static final Int ORDER_10 = new Int(10, "未分拣"); + + /** 订单状态, 等待设计(已分拣到组织,等待分派到设计师) */ + public static final Int ORDER_20 = new Int(20, "等待设计"); + + /** 订单状态, 正在设计 */ + public static final Int ORDER_30 = new Int(30, "正在设计"); + + /** 订单状态, 请求退款 */ + public static final Int ORDER_34 = new Int(34, "请求退款"); + + /** 订单状态, 暂停设计 */ + public static final Int ORDER_36 = new Int(36, "补全资料"); + + /** 订单状态, 联系不上 */ + public static final Int ORDER_37 = new Int(37, "联系不上"); + + /** 订单状态, 初稿待审 */ + public static final Int ORDER_40 = new Int(40, "初稿待审"); + + /** 订单状态, 已初稿 */ + public static final Int ORDER_50 = new Int(50, "已初稿"); + + /** 订单状态, 定稿待审 */ + public static final Int ORDER_52 = new Int(52, "定稿待审"); + + /** 订单状态, 已定稿(等待印前审核) */ + public static final Int ORDER_55 = new Int(55, "已定稿"); + + /** 订单状态, 印前已审核(等待成品文件上传oss) */ + public static final Int ORDER_60 = new Int(60, "已审核"); + + /** 订单状态, 成品文件上传OSS中 */ + public static final Int ORDER_62 = new Int(62, "云端存储"); + + /** 订单状态, 设计完成(文件上传oss,准备下单印刷) */ + public static final Int ORDER_70 = new Int(70, "设计完成"); + + static + { + statusList.add(ORDER_10); + statusList.add(ORDER_20); + statusList.add(ORDER_30); + statusList.add(ORDER_34); + statusList.add(ORDER_36); + statusList.add(ORDER_37); + statusList.add(ORDER_40); + statusList.add(ORDER_50); + statusList.add(ORDER_52); + statusList.add(ORDER_55); + statusList.add(ORDER_60); + statusList.add(ORDER_62); + statusList.add(ORDER_70); + statusList.add(ORDER_F110); + statusList.add(ORDER_F100); + + for (Int item : statusList) + { + statusMap.put(item.value(), item); + } + + statusTextMap.put(ORDER_F130.value(), "
            " + ORDER_F130.desc() + "
            "); + statusTextMap.put(ORDER_F110.value(), "
            " + ORDER_F110.desc() + "
            "); + statusTextMap.put(ORDER_F100.value(), "
            " + ORDER_F100.desc() + "
            "); + statusTextMap.put(ORDER_10.value(), "
            " + ORDER_10.desc() + "
            "); + statusTextMap.put(ORDER_20.value(), "
            " + ORDER_20.desc() + "
            "); + statusTextMap.put(ORDER_30.value(), "
            " + ORDER_30.desc() + "
            "); + statusTextMap.put(ORDER_34.value(), "
            " + ORDER_34.desc() + "
            "); + statusTextMap.put(ORDER_36.value(), "
            " + ORDER_36.desc() + "
            "); + statusTextMap.put(ORDER_37.value(), "
            " + ORDER_37.desc() + "
            "); + statusTextMap.put(ORDER_40.value(), "
            " + ORDER_40.desc() + "
            "); + statusTextMap.put(ORDER_50.value(), "
            " + ORDER_50.desc() + "
            "); + statusTextMap.put(ORDER_52.value(), "
            " + ORDER_52.desc() + "
            "); + statusTextMap.put(ORDER_55.value(), "
            " + ORDER_55.desc() + "
            "); + statusTextMap.put(ORDER_60.value(), "
            " + ORDER_60.desc() + "
            "); + statusTextMap.put(ORDER_62.value(), "
            " + ORDER_62.desc() + "
            "); + statusTextMap.put(ORDER_70.value(), "
            " + ORDER_70.desc() + "
            "); + + } + + /** + * 获取订单状态 + * + * @param status + * @return + */ + public static String getStatus(int status) + { + if (statusTextMap.containsKey(status)) + { + return statusTextMap.get(status); + } + else + { + return ""; + } + } + + /** + * 获取订单状列表 + * + * @param status + * @return + */ + public static List getOrderStatusList() + { + return statusList; + } + + /** 获取状态 */ + public static Int getOrderStatusItem(int status) + { + for (Int Int : statusList) + { + if (Int.value() == status) + { + return Int; + } + } + + return new Int(0, ""); + } + +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/dao/BuyerDao.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/dao/BuyerDao.java new file mode 100644 index 0000000..2f89c7a --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/dao/BuyerDao.java @@ -0,0 +1,100 @@ +/* + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ + +package com.zhiqim.yangcai.design.dao; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.design.dbo.user.BuyerUser; + +/*** + * 买家相关 + * + * @version v1.0.0 @author lgz 2019-3-29 新建与整理 + */ +@AnAlias("BuyerDao") +public class BuyerDao +{ + /*** + * 获取买家 购买次数 + * + * @param buyerCode + * @return + */ + public static int getOrderCount(String buyerCode) throws Exception + { + if (Validates.isEmptyBlank(buyerCode)) + { + return 0; + } + + BuyerUser user = getBuyerUser(buyerCode); + return user == null ? 0 : user.getOrderCount(); + } + + /**** + * 获取购买用户 + * + * @param buyerCode + * @return + * @throws Exception + */ + public static BuyerUser getBuyerUser(String buyerCode) throws Exception + { + if (Validates.isEmptyBlank(buyerCode)) + { + return null; + } + + return ORM.get(ZTable.class).item(BuyerUser.class, new Selector("buyerCode", buyerCode)); + } + + /**** + * 添加或者修改买家购买次数 + * + * @param buyerCode + * @return 返回 购买次数 + * @throws Exception + */ + public static int doAddOrUpdateOrderCount(String buyerCode, int orderCount) throws Exception + { + if (Validates.isEmptyBlank(buyerCode)) + { + return orderCount; + } + + BuyerUser user = getBuyerUser(buyerCode); + if (user == null) + {// 添加 + user = new BuyerUser(); + user.setOrderCount(orderCount); + user.setBuyerCode(buyerCode); + ORM.get(ZTable.class).insert(user); + + return orderCount; + } + else + {// 修改 + + int count = orderCount + user.getOrderCount(); + Updater updater = new Updater(); + updater.addMust("buyerCode", buyerCode); + updater.addField("orderCount", count); + + ORM.get(ZTable.class).update(BuyerUser.class, updater); + return count; + } + } +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/dao/DesignSizeDao.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/dao/DesignSizeDao.java new file mode 100644 index 0000000..22503a6 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/dao/DesignSizeDao.java @@ -0,0 +1,132 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.dao; + +import java.util.ArrayList; +import java.util.List; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.design.DesignSize; + +/*** + * + * 设计 尺寸 数据访问dao + * + * @version v1.0.0 @author longguizhi 2018-9-4 新建与整理 + */ +@AnAlias("DesignSizeDao") +public class DesignSizeDao +{ + public static DesignSize get(long sizeId) throws Exception + { + if (sizeId <= 0) + return null; + + return ORM.get(ZTable.class).item(DesignSize.class, sizeId); + } + + public static DesignSize get(long designType, double sizeWidth, double sizeHeight) throws Exception + { + if (designType <= 0 || sizeWidth <= 0 || sizeHeight <= 0) + return null; + + return ORM.get(ZTable.class).item(DesignSize.class, + new Selector("typeId", designType).addMust("sizeWidth", sizeWidth).addMust("sizeHeight", sizeHeight)); + + } + + public static DesignSize get(long designType, double sizeWidth, double sizeHeight, double sizeSide) throws Exception + { + // yixin 2019-06-06 侧边长度为0则走原来流程 + if (sizeSide == 0) + { + return get(designType, sizeWidth, sizeHeight); + } + if (designType <= 0 || sizeWidth <= 0 || sizeHeight <= 0) + return null; + + return ORM.get(ZTable.class).item(DesignSize.class, + new Selector("typeId", designType).addMust("sizeWidth", sizeWidth).addMust("sizeHeight", sizeHeight).addMust("sizeSide", sizeSide)); + + } + + /**** + * 获取行业名称 + * + * @param industryId + * @return + * @throws Exception + */ + public static String name(long sizeId) throws Exception + { + DesignSize item = get(sizeId); + return name(item); + } + + private static String name(DesignSize item) + { + return item == null ? "" : item.getSizeWidth() + "x" + item.getSizeHeight() + "mm"; + } + + /**** + * 获取 尺寸名 + 出血 + * + * 例: 90x54mm 出血: 2.12mm + * + * @param designType + * @param sizeWidth + * @param sizeHeight + * @return + * @throws Exceptio + */ + public static String name_bleed(long designType, double sizeWidth, double sizeHeight) throws Exception + { + DesignSize item = get(designType, sizeWidth, sizeHeight); + if (item == null) + return ""; + + return name(item) + " 出血:" + item.getSizeBleed() + " mm"; + } + + /*** + * 获取所有 类型列表 + * + * @return + * @throws Exception + */ + public static List listAll() throws Exception + { + return ORM.get(ZTable.class).list(DesignSize.class, new Selector().addOrderbyAsc("sizeSeq")); + } + + /*** + * 获取可用 类型列表 + * + * @return + * @throws Exception + */ + public static List list() throws Exception + { + List itemList = new ArrayList(); + + for (DesignSize item : listAll()) + { + if (item.getSizeStatus() == 0) + itemList.add(item); + } + + return itemList; + } + +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/dao/DesignTypeDao.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/dao/DesignTypeDao.java new file mode 100644 index 0000000..1393fba --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/dao/DesignTypeDao.java @@ -0,0 +1,180 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dao; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZSQL; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.design.DesignType; + +/**** + * 设计订单类型 数据访问dao + * + * @version v1.0.0 @author longguizhi 2018-9-4 新建与整理 + */ +@AnAlias("DesignTypeDao") +public class DesignTypeDao +{ + + /**** + * 查询 订单类型 + * + * @param ordTypeId + * @return + * @throws Exception + */ + public static DesignType get(long designType) throws Exception + { + if (designType <= 0) + { + return null; + } + + DesignType item = ORM.get(ZTable.class).item(DesignType.class, designType); + return item; + } + + /**** + * 获取类型名称 + * + * @param industryId + * @return + * @throws Exception + */ + public static String name(long designType) throws Exception + { + DesignType item = get(designType); + + return item == null ? "" : item.getTypeName(); + } + + /*** + * 获取所有 类型列表 + * + * @return + * @throws Exception + */ + public static List listAll() throws Exception + { + return ORM.get(ZTable.class).list(DesignType.class, new Selector().addOrderbyAsc("typeSeq")); + } + + /*** + ** 获取模板产品类型列表 + * + * @return + * @throws Exception + */ + public static List listTemmplate() throws Exception + { + String[] showTypeArr = + { + "普通名片", "彩页", "代金券", "PVC名片", "透明PVC", "特种纸名片", "LOGO设计", "体验券", "售后卡", "积分卡", "外卖卡", "门票", "抽奖券", "合格证", "保修卡", "邀请函", "停车卡" + }; + return ORM.get(ZTable.class).list(DesignType.class, new Selector().addMustIn("typeName", showTypeArr).addOrderbyAsc("typeSeq")); + } + + /*** + * 获取可用 类型列表 + * + * @return + * @throws Exception + */ + public static List list() throws Exception + { + List itemList = new ArrayList(); + + for (DesignType item : listAll()) + { + if (item.isEnabled()) + { + itemList.add(item); + } + } + + return itemList; + } + + /*** + * 获取可用 类型列表 + * + * @return //画册排在第一个 + * @throws Exception + */ + public static List listByPicture() throws Exception + { + List itemList = new ArrayList(); + + StringBuffer stringBuffer = new StringBuffer(); + stringBuffer.append("select * from design_type dt order BY dt.TYPE_ID=3 desc"); + List list = ORM.get(ZSQL.class).executeQuery(stringBuffer.toString(), DesignType.class); + + for (DesignType item : list) + { + if (item.isEnabled()) + { + itemList.add(item); + } + } + + return itemList; + } + + /** 获取类型 map格式 */ + public static Map map() throws Exception + { + Map map = new LinkedHashMap<>(); + List list = list(); + for (DesignType industry : list) + { + map.put(industry.getTypeId(), industry); + } + + return map; + } + + /** 获取所有类型 map格式 */ + public static Map mapAll() throws Exception + { + Map map = new LinkedHashMap<>(); + List list = listAll(); + for (DesignType industry : list) + { + map.put(industry.getTypeId(), industry); + } + + return map; + } + + /*** + * 获取初稿时效统计列表要展示的产品类型列表 + * + * @return + * @throws Exception + */ + public static List listDraftOrderTimelinessShowType() throws Exception + { + String[] showTypeArr = + { + "普通名片", "彩页", "代金券", "PVC名片", "透明PVC", "不干胶", "精品特种纸", "会员卡", "展架" + }; + return ORM.get(ZTable.class).list(DesignType.class, new Selector().addMustIn("typeName", showTypeArr)); + } +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/dao/IndustryDao.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/dao/IndustryDao.java new file mode 100644 index 0000000..357c29f --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/dao/IndustryDao.java @@ -0,0 +1,107 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dao; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.design.DesignIndustry; + +/*** + * + * 设计 行业 数据访问dao + * + * @version v1.0.0 @author longguizhi 2018-9-4 新建与整理 + */ +@AnAlias("IndustryDao") +public class IndustryDao +{ + public static DesignIndustry get(long industryId) throws Exception + { + if (industryId <= 0) + return null; + DesignIndustry item = ORM.get(ZTable.class).item(DesignIndustry.class, industryId); + return item; + } + + /**** + * 获取行业名称 + * + * @param industryId + * @return + * @throws Exception + */ + public static String name(long industryId) throws Exception + { + DesignIndustry item = get(industryId); + + return item == null ? "" : item.getIndustryName(); + } + + + /*** + * 获取所有 类型列表 + * @return + * @throws Exception + */ + public static List listAll() throws Exception + { + return ORM.get(ZTable.class).list(DesignIndustry.class, new Selector().addOrderbyAsc("industrySeq")); + } + + /*** + * 获取可用 类型列表 + * @return + * @throws Exception + */ + public static List list() throws Exception + { + List itemList = new ArrayList(); + + for (DesignIndustry item : listAll()) + { + if (item.isEnabled()) + itemList.add(item); + } + + return itemList; + } + + /**获取行业 map格式*/ + public static Map map() throws Exception + { + Map map = new LinkedHashMap<>(); + List list = list(); + for (DesignIndustry industry : list) + map.put(industry.getIndustryId(), industry); + + return map; + } + + /**获取所有行业 map格式*/ + public static Map mapAll() throws Exception + { + Map map = new LinkedHashMap<>(); + List list = listAll(); + for (DesignIndustry industry : list) + map.put(industry.getIndustryId(), industry); + + return map; + } +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/dao/MerchantDao.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/dao/MerchantDao.java new file mode 100644 index 0000000..8a8b866 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/dao/MerchantDao.java @@ -0,0 +1,38 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dao; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; + +import com.zhiqim.yangcai.design.dbo.design.DesignMerchant; + +/*** + * 订单商户访问 数据 dao + * + * @version v1.0.0 @author longguizhi 2018-12-1 新建与整理 + */ +@AnAlias("MerchantDao") +public class MerchantDao +{ + /*** + * 通过 商户编号 获取商户 + * @param merchantId + * @return + * @throws Exception + */ + public static DesignMerchant get(long merchantId) throws Exception + { + return ORM.get(ZTable.class).item(DesignMerchant.class, merchantId < 0 ? 0 : merchantId); + } +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/dao/OperatorDao.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/dao/OperatorDao.java new file mode 100644 index 0000000..e7bed68 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/dao/OperatorDao.java @@ -0,0 +1,435 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.dao; + +import java.util.ArrayList; +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.util.Arrays; +import org.zhiqim.kernel.util.Asserts; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.manager.ZmrBootstrap; +import org.zhiqim.manager.ZmrSessionUser; +import org.zhiqim.manager.dao.ZmrOrgDao; +import org.zhiqim.manager.dbo.ZmrDept; +import org.zhiqim.manager.dbo.ZmrOperator; +import org.zhiqim.manager.dbo.ZmrOrg; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.constants.BaseConstants; + +/** + * 操作员dao + * + * @version v1.0.0 @author zhouwenbin 2017-8-25 新建与整理 + */ +@AnAlias("OperatorDao") +public class OperatorDao +{ + + /** + * 查询组织selector + * + * @param request + * @param selector + * @param fieldName + * @throws Exception + */ + public static void getOrgSelector(HttpRequest request, Selector selector) throws Exception + { + ZmrSessionUser sessionUser = request.getSessionUser(ZmrSessionUser.class); + long orgId = sessionUser.getSelectedOrgId(); + + ZmrOrg org = ZmrBootstrap.table(request).item(ZmrOrg.class, orgId); + if (org.getOrgLevel() > 0) + { + selector.addMust("orgId", orgId); + return; + } + } + + /** + * 查询组织下有权限查看的所有操作员 + * + * @param orgId + * @param selector + * @param fieldName + * @param operatorCode + * @throws Exception + */ + public static void getOrgOperatorSelector(HttpRequest request, long orgId, Selector selector, String fieldName, String operatorCode) throws Exception + { + if (Validates.isEmpty(fieldName) || Validates.isEmpty(operatorCode)) + { + throw new Exception("fieldName||operatorCode都不能为空"); + } + + ZmrOrg org = ZmrOrgDao.getOrg(request, orgId); + if (org.getOrgLevel() > 0) + { + String tempFieldName = "orgId"; + if ("undertakePerson".equals(fieldName)) + { + tempFieldName = "undertakeOrg"; + } + else if ("afterBlamer".equals(fieldName)) + { + tempFieldName = "picOrgId"; + } + selector.addMust(tempFieldName, orgId); + } + + ZmrOperator operator = ZmrBootstrap.table(request).item(ZmrOperator.class, operatorCode); + if (operator == null) + { + selector.addMaybe(fieldName, operatorCode); + return; + } + // 总组织人员查看所有 + if (ZmrOrgDao.getOrgRootId(request) == operator.getOrgId()) + { + return; + } + + if (operator.getOperatorType() <= 1) + {// 管理员 + return; + } + + List deptList = ZmrBootstrap.table(request).list(ZmrDept.class, + new Selector().addOr(new Selector().addMust("deptManager", operatorCode).addMustLike("deptSubManager", operatorCode))); + if (deptList.isEmpty()) + {// 非部门负责人,查看自己 + selector.addMaybe(fieldName, operatorCode); + return; + } + + // 负责人查询所有负责部门 + List dataList = getDeptOperatorCodeList(request, operatorCode, true); + selector.addMaybeIn(fieldName, Arrays.toArray(dataList, String.class)); + } + + /** + * 查询有权限查看的所有操作员 + * + * @param operatorCode + * @return + */ + public static void getOperatorSelector(HttpRequest request, Selector selector, String fieldName, String operatorCode) throws Exception + { + ZmrOperator operator = ZmrBootstrap.table(request).item(ZmrOperator.class, operatorCode); + if (operator == null) + { + selector.addMaybe(fieldName, operatorCode); + return; + } + + if (operator.getOperatorType() <= 1) + {// 管理员 + return; + } + + ZmrOrg org = ZmrBootstrap.table(request).item(ZmrOrg.class, operator.getOrgId()); + if (org.getOrgLevel() == 0) + {// 总公司 + return; + } + + String operatorDept = operator.getOperatorDeptAll(); + if (Validates.isNotEmpty(operatorDept) && operatorDept.contains("" + BaseConstants.DEPT_ID_SUPERVISION)) + {// 督导组 + return; + } + + List deptList = ZmrBootstrap.table(request).list(ZmrDept.class, + new Selector().addOr(new Selector().addMust("deptManager", operatorCode).addMustLike("deptSubManager", operatorCode))); + if (deptList.isEmpty()) + {// 非部门负责人,查看自己 + selector.addMaybe(fieldName, operatorCode); + return; + } + + // 负责人查询所有负责部门 + List dataList = getDeptOperatorCodeList(request, operatorCode, true); + selector.addMaybeIn(fieldName, Arrays.toArray(dataList, String.class)); + } + + /** + * 获取部门经理下属操作员编码列表 + * + * @param request 请求对象 + * @param operatorCode 部门经理编码 + * @param recursion 是否向在递归 + * @return 下属操作员列表 + * @throws Exception 异常 + */ + public static List getDeptOperatorCodeList(HttpRequest request, String operatorCode, boolean recursion) throws Exception + { + Asserts.assertNotEmpty(operatorCode, "操作员编码不允许为空"); + + List deptList = ZmrBootstrap.table(request).list(ZmrDept.class, + new Selector().addOr(new Selector().addMust("deptManager", operatorCode).addMustLike("deptSubManager", operatorCode))); + if (deptList.isEmpty()) + { + return new ArrayList<>(); + } + + List list = new ArrayList<>(); + List operatorList = ZmrBootstrap.tableOpr(request).list(ZmrOperator.class); + opr: for (ZmrOperator operator : operatorList) + { + String deptAll = recursion ? operator.getOperatorDeptAll() : operator.getOperatorDept(); + for (ZmrDept dept : deptList) + { + if (Validates.isContain(deptAll, ",", dept.getDeptId())) + { + list.add(operator.getOperatorCode()); + continue opr; + } + } + } + + return list; + } + + /** 获取指定部门下的所有员工 */ + public static List getDeptOperatorList(long deptId) throws Exception + { + List operatorList = ORM.get(ZTable.class).list(ZmrOperator.class, new Selector().addMustNotEqual("operatorType", 0)); + + List oplist = new ArrayList<>(); + for (ZmrOperator op : operatorList) + { + if (Validates.isNotEmpty(op.getOperatorDeptAll()) && op.getOperatorDeptAll().contains("" + deptId)) + { + oplist.add(op); + } + } + + return oplist; + } + + /** + * 查询组织权限下的所有操作员 + * + * @param operatorCode + * @return + * @throws Exception + */ + public static List getOrgOperatorList(HttpRequest request, long orgId, String operatorCode) throws Exception + { + List oplist = new ArrayList<>(); + if (Validates.isEmpty(operatorCode)) + { + return oplist; + } + + ZmrOperator operator = ZmrBootstrap.table(request).item(ZmrOperator.class, operatorCode); + if (operator == null) + { + return oplist; + } + + ZmrOrg curOrg = ZmrOrgDao.getOrg(request, orgId); // 当前已选组织 + if (curOrg.getOrgLevel() == 0 || operator.getOperatorType() <= 1) + {// 总公司或管理员 + Selector sel = new Selector("operatorStatus", 0); + if (curOrg.getOrgLevel() > 0) + { + sel.addMust("orgId", orgId); + } + + sel.addMustThenGE("operatorType", 1); + oplist = ZmrBootstrap.table(request).list(ZmrOperator.class, sel); + return oplist; + } + + ZmrOrg org = ZmrBootstrap.table(request).item(ZmrOrg.class, operator.getOrgId());// 操作员所属组织 + if (org.getOrgLevel() == 0) + {// 操作员属于总公司 + return getOrgOperatorAllList(orgId); + } + + List deptList = ZmrBootstrap.table(request).list(ZmrDept.class, + new Selector().addOr(new Selector().addMust("deptManager", operatorCode).addMustLike("deptSubManager", operatorCode))); + if (deptList.isEmpty()) + {// 非部门负责人,查看自己 + oplist.add(operator); + return oplist; + } + + // 负责人查询所有负责部门 + oplist = getDeptOperatorList(request, operatorCode, true); + return oplist; + } + + /** + * 获取部门经理下属操作员列表 + * + * @param request 请求对象 + * @param operatorCode 部门经理编码 + * @param recursion 是否向在递归 + * @return 下属操作员列表 + * @throws Exception 异常 + */ + public static List getDeptOperatorList(HttpRequest request, String operatorCode, boolean recursion) throws Exception + { + Asserts.assertNotEmpty(operatorCode, "操作员编码不允许为空"); + + List deptList = ZmrBootstrap.table(request).list(ZmrDept.class, + new Selector().addOr(new Selector().addMust("deptManager", operatorCode).addMustLike("deptSubManager", operatorCode))); + if (deptList.isEmpty()) + { + return new ArrayList<>(); + } + + List list = new ArrayList<>(); + List operatorList = ZmrBootstrap.tableOpr(request).list(ZmrOperator.class); + opr: for (ZmrOperator operator : operatorList) + { + String deptAll = recursion ? operator.getOperatorDeptAll() : operator.getOperatorDept(); + for (ZmrDept dept : deptList) + { + if (Validates.isContain(deptAll, ",", dept.getDeptId())) + { + list.add(operator); + continue opr; + } + } + } + + return list; + } + + /** + * 查询权限下的所有操作员 + * + * @param operatorCode + * @return + * @throws Exception + */ + public static List getOperatorList(HttpRequest request, String operatorCode) throws Exception + { + List oplist = new ArrayList<>(); + ZmrOperator operator = ZmrBootstrap.table(request).item(ZmrOperator.class, operatorCode); + if (operator == null) + { + return oplist; + } + + if (operator.getOperatorType() <= 1) + {// 管理员 + oplist = ZmrBootstrap.table(request).list(ZmrOperator.class, new Selector("operatorStatus", 0).addMustThenGE("operatorType", 1)); + return oplist; + } + + ZmrOrg org = ZmrBootstrap.table(request).item(ZmrOrg.class, operator.getOrgId()); + if (org.getOrgLevel() == 0) + {// 总公司 + oplist = ZmrBootstrap.table(request).list(ZmrOperator.class, new Selector("operatorStatus", 0).addMustThenGE("operatorType", 1)); + return oplist; + } + + String operatorDept = operator.getOperatorDeptAll(); + if (Validates.isNotEmpty(operatorDept) && operatorDept.contains("" + BaseConstants.DEPT_ID_SUPERVISION)) + {// 督导组 + oplist = ZmrBootstrap.table(request).list(ZmrOperator.class, new Selector("operatorStatus", 0).addMustThenGE("operatorType", 1)); + return oplist; + } + List deptList = ZmrBootstrap.table(request).list(ZmrDept.class, + new Selector().addOr(new Selector().addMust("deptManager", operatorCode).addMustLike("deptSubManager", operatorCode))); + if (deptList.isEmpty()) + {// 非部门负责人,查看自己 + oplist.add(operator); + return oplist; + } + + // 负责人查询所有负责部门 + oplist = getDeptOperatorList(request, operatorCode, true); + return oplist; + } + + /** + * 获取操作员可选组织 + * + * @param operatorCode + * @param isContainRootOrg true包含,false不包含 + * @return + * @throws Exception + */ + public static List getOperatorOrgList(HttpRequest request, String operatorCode, boolean isContainRootOrg) throws Exception + { + ZmrOperator operator = ZmrBootstrap.table(request).item(ZmrOperator.class, operatorCode); + ZmrOrg org = ZmrBootstrap.table(request).item(ZmrOrg.class, operator.getOrgId()); + if (org.getOrgLevel() == 0) + { + if (isContainRootOrg) + { + return ZmrOrgDao.list(request); + } + else + { + return ZmrOrgDao.levelList(request, 1); + } + } + else + { + List orgList = new ArrayList<>(); + orgList.add(org); + + return orgList; + } + } + + /** + * 获取组织下的所有操作员 + * + * @param operatorCode + * @return + * @throws Exception + */ + public static List getOrgOperatorAllList(long orgId) throws Exception + { + ZmrOrg org = ORM.get(ZTable.class).item(ZmrOrg.class, orgId); + if (org.getOrgLevel() == 0) + { + return ORM.get(ZTable.class).list(ZmrOperator.class, new Selector("operatorStatus", 0).addMustThenGE("operatorType", 1)); + } + else + { + return ORM.get(ZTable.class).list(ZmrOperator.class, new Selector("operatorStatus", 0).addMust("orgId", orgId).addMustThenGE("operatorType", 1)); + } + } + + /** 获取组织名 */ + public static String getOrgName(long orgId) throws Exception + { + if (orgId == -1) + { + return ""; + } + + ZmrOrg org = ORM.get(ZTable.class).item(ZmrOrg.class, orgId); + if (org != null) + { + return org.getOrgName(); + } + else + { + return ""; + } + } +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/dao/OrderCheckDao.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/dao/OrderCheckDao.java new file mode 100644 index 0000000..fb3033f --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/dao/OrderCheckDao.java @@ -0,0 +1,788 @@ +package com.zhiqim.yangcai.design.dao; + +import java.awt.image.BufferedImage; +import java.io.File; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.icepdf.core.pobjects.Document; +import org.icepdf.core.pobjects.Page; +import org.icepdf.core.util.GraphicsRenderingHints; +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.kernel.util.Files; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.kernel.util.consts.Int; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.uploadlarge.dbo.UpllFile; + +import com.itextpdf.text.Rectangle; +import com.itextpdf.text.pdf.PdfReader; +import com.itextpdf.text.pdf.parser.PdfTextExtractor; +import com.zhiqim.yangcai.cache.DesignTypeCache; +import com.zhiqim.yangcai.design.constants.FileTypeConstants; +import com.zhiqim.yangcai.design.dbo.order.DesignAtta; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; +import com.zhiqim.yangcai.design.dbo.utils.BaseUtil; + +/** + * 文件审核相关方法 + * + * @version v1.0.0 @author zhouwenbin 2017-9-6 新建与整理 + * @version v1.1.0 @author caohong 2020-8-27 1.增加公共订单审核方法 2.增加后工文件检测方法 + */ +public class OrderCheckDao +{ + private static final Log log = LogFactory.getLog(OrderCheckDao.class); + private static final Map checkingMap = new HashMap();// 正在审核的文件 + public static float MM = 2.83464579439252f;// pdf尺寸转毫米的系数 + + /** + * 检测文件命名是否正确 + * + * @param fileName + * @param designId + * @param wangwang + * @param receiveName + * @return + */ + public static Int checkFileName(String fileName, String designId, String wangwang, String receiveName, String printingFileType) throws Exception + { + if (Validates.isEmpty(fileName)) + { + return new Int(-1, "文件名不能为空"); + } + + String fileExt = Files.getFileExt(fileName); + if (Validates.isEmpty(fileExt)) + { + return new Int(-1, "文件扩展名不正确,扩展名:" + fileExt); + } + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, Long.valueOf(designId)); + if (order == null) + { + return new Int(-1, "订单不存在-" + designId); + } + Int ret = checkEndFileFormat(order.getTypeId(), fileExt, printingFileType);// 成品文件格式判断 + if (ret.value() == -1) + { + return new Int(-1, ret.desc()); + } + + if (!fileName.contains("-")) + { + return new Int(-1, "文件名错误,请以'订单号-旺旺名'定义文件名称"); + } + + if (fileName.indexOf(order.getOrderText()) < 0) + { + return new Int(-1, "文件名与备注名不一致"); + } + + fileName = fileName.substring(0, fileName.lastIndexOf(".")); + + String subOid = fileName.substring(0, fileName.indexOf("-")); + // if (!subOid.equals(designId)) + // {// 第一项必须是订单号 + // return new Int(-1, "文件命名第一项订单号不正确"); + // } + // String subWangwang = fileName.substring(fileName.indexOf("-") + 1, fileName.length()); + // if (Validates.isNotEmptyBlank(subWangwang)) + // { + // subWangwang = Strings.trim(subWangwang); + // } + // if (!subWangwang.equals(wangwang)) + // { + // return new Int(-1, "文件命名第二项不是旺旺号"); + // } + + return new Int("成功"); + } + + /*** + * 判断文件是否正在审核 + * + * @param attaId 附件ID + * @return 返回=true 表示正在审核 + */ + public static boolean isChecking(long attaId) + { + return checkingMap.containsKey(attaId); + } + + /** + * 成品文件审核 + * + * @param oid 订单编号 + * @param fileName 文件名 + * @param attaModul 附件标识 + * @return 错误信息 + * @throws Exception + */ + public static String doCheckFile(long designId, String fileName, String attaModul) throws Exception + { + if (designId == -1) + { + return "订单不存在-" + designId; + } + + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, designId); + if (order == null) + { + return "订单不存在-" + designId; + } + + Selector selector = new Selector("designId", designId); + selector.addMust("fileName", fileName); + selector.addMust("attaModul", attaModul); + selector.addOrderbyDesc("uploadTime"); + DesignAtta atta = ORM.get(ZTable.class).item(DesignAtta.class, selector); + if (atta == null) + { + return "文件审核失败,成品文件不存在"; + } + + File file = new File(atta.getSavePath()); + if (!file.exists()) + { + return "文件审核失败,系统找不到指定的文件"; + } + + if (!"pdf".equalsIgnoreCase(atta.getFileType())) + { + return ""; + } + + String error = ""; + try + { + checkingMap.put(atta.getAttaId(), true);// 标记正在检测文件 + error = checkEndFile(order, atta); + } + catch (Exception e) + { + error = "文件内容检测异常"; + log.error("订单[" + designId + "]文件审核异常:" + e.getMessage(), e); + } + finally + { + checkingMap.remove(atta.getAttaId());// 检测完毕 + } + + return error; + } + + /*** + * 删除删除成品文件 + * + * @param atta + * @throws Exception + */ + public static void doDeleteEndFile(DesignAtta atta) throws Exception + { + doDeleteAttaFile(atta); + } + + /** 删除附件数据 */ + public static void doDeleteAttaFile(DesignAtta atta) throws Exception + { + if (atta == null) + { + return; + } + + if (!Validates.isUrl(atta.getOssUrl())) + { + File file = new File(atta.getSavePath()); + if (file.exists()) + { + Files.deleteFile(atta.getSavePath()); + } + } + + ORM.get(ZTable.class).delete(DesignAtta.class, atta.getAttaId()); + if (Validates.isNotEmpty(atta.getFileid())) + { + ORM.get(ZTable.class).delete(UpllFile.class, new Selector("fileId", atta.getFileid()).addReplace("id", null)); + } + + // 删除OSS文件 + if (Validates.isNotEmptyBlank(atta.getOssUrl()) && Validates.isUrl(atta.getOssUrl())) + { + OssFileDao.deleteOssFile(atta); + } + } + + /** + * 删除成品文件 + * + * @param designId 设计订单Id + * @throws Exception + */ + public static void doDeleteEndFile(long designId) throws Exception + { + if (designId <= 0) + { + return; + } + + DesignAtta atta = ORM.get(ZTable.class).item(DesignAtta.class, + new Selector("designId", designId).addMust("attaModul", FileTypeConstants.FILE_END.value())); + doDeleteEndFile(atta); + } + + /** + * 成品文件审核 + * + * @param order 订单对象 + * @param attaModul 附件标识 + * @return 错误信息 + * @throws Exception + */ + public static String checkEndFile(DesignOrder order, DesignAtta atta) throws Exception + { + if (order == null) + { + return "订单不存在"; + } + + if (atta == null) + { + return "文件审核失败,印刷文件不存在"; + } + + File file = new File(atta.getSavePath()); + if (!file.exists()) + { + return "文件审核失败,系统找不到指定的文件"; + } + + PdfReader readerN = null; + try + { + // 文字转曲判断 --caohong 2020-4-20 + readerN = new PdfReader(atta.getSavePath()); + int nrPages = readerN.getNumberOfPages(); + for (int i = 1; i <= nrPages; i++) + { + String text = PdfTextExtractor.getTextFromPage(readerN, i); + if (text != null && !"".equals(text)) + { + return ("文件审核失败,第" + i + "页有文字未转曲!"); + } + } + } + catch (Exception e) + { + log.error("订单[" + order.getDesignId() + "]文件审核异常:" + e.getMessage(), e); + return "文件审核失败,有文字未转曲或编码异常!"; + } + catch (Error e) + { + log.error("订单[" + order.getDesignId() + "]文件审核异常:" + e.getMessage(), e); + return "文件审核失败,有文字未转曲或编码异常!"; + } + finally + { + if (readerN != null) + { + readerN.close(); + } + } + + // 透明PVC,并且是印白墨后加工的情况,不判断版面数量,因为有白墨版,比较特殊 --caohong + if (order.getTypeId() == 1806070857392601L && order.getAfterNames() != null && order.getAfterNames().contains("印白墨")) + { + return ""; + } + + int pageValue = order.getDesignPage(); + double stdWidth = order.getDesignWidth(); + double stdHeight = order.getDesignHeight(); + + // 优惠券产品需要特殊处理,由于录单去掉了模位计算操作,审核的时候需要使用名片标准尺寸来检查内容。--caohong 2019-11-12 + if ("1710131129568467".equals(String.valueOf(order.getTypeId()))) + { + stdWidth = 92; + stdHeight = 56; + double tmpWidth = order.getDesignWidth(); + double tmpHeight = order.getDesignHeight(); + if (order.getPrintWidth() > 0 && order.getPrintHeight() > 0) + { + tmpWidth = order.getPrintWidth(); + tmpHeight = order.getPrintHeight(); + } + // 临时计算模位用于计算检测 + int ms = BaseUtil.calcMod("92X56", new Double(tmpWidth).intValue(), new Double(tmpHeight).intValue(), 0); + order.setPrintMs(ms); + } + + // 画册产品不需要检查内容,比较复杂 + if (!"3".equals(String.valueOf(order.getTypeId()))) + { + Document document = new Document(); + document.setFile(atta.getSavePath()); + int pageTotal = document.getNumberOfPages(); + if (pageTotal < 1) + { + return "文件审核失败,印刷文件无页面"; + } + + // 总页数%单或双面 + if (pageTotal % pageValue != 0) + { + return "文件审核失败,印刷文件页数错误"; + } + + float firstWidth = 0f, firstHeight = 0f; + try + { + boolean flag = false; + float scale = 1f; + float rotation = 0f; + + // 获取第一条文件尺寸 + BufferedImage oneImage = document.getPageImage(0, GraphicsRenderingHints.SCREEN, Page.BOUNDARY_CROPBOX, rotation, scale); + firstWidth = oneImage.getWidth() / MM; + firstHeight = oneImage.getHeight() / MM; + for (int i = 1; i < pageTotal; i++) + { + BufferedImage image = document.getPageImage(i, GraphicsRenderingHints.SCREEN, Page.BOUNDARY_CROPBOX, rotation, scale); + if (Math.abs(image.getWidth() / MM - firstWidth) >= 0.1) + { + return "文件审核失败,第" + i + "页,尺寸错误,实际宽:" + firstWidth + ",期望宽:" + stdWidth; + } + + if (Math.abs(image.getHeight() / MM - firstHeight) >= 0.1) + { + return "文件审核失败,第" + i + "页,尺寸错误,实际高:" + firstHeight + ",期望高:" + stdHeight; + } + } + + // 误差不超过0.1,则收为整数 + firstWidth = Math.round(firstWidth); + firstHeight = Math.round(firstHeight); + + // 根据面积判断是否符合规则 92*56 3款2模 92*56*6 + float rate = (float) Math + .abs((firstWidth * firstHeight * pageTotal / pageValue) - (stdWidth * stdHeight * order.getPrintMs() * order.getPrintKs())); + if (rate < 0.1) + { + flag = true; + } + + if (!flag) + { + return "文件审核失败,尺寸或模数错误"; + } + } + catch (Exception e) + { + log.error("[订单" + order.getDesignId() + "]印刷文件审核异常," + e.getMessage(), e); + return "文件审核异常,请重新上传."; + } + finally + { + document.dispose(); + } + } + + return ""; + } + + public static String doCheckFile2(long designId, String fileName, String attaModul) throws Exception + { + if (designId == -1) + { + return "订单不存在-" + designId; + } + + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, designId); + if (order == null) + { + return "订单不存在-" + designId; + } + + Selector selector = new Selector("designId", designId); + selector.addMust("fileName", fileName); + selector.addMust("attaModul", attaModul); + selector.addOrderbyDesc("uploadTime"); + DesignAtta atta = ORM.get(ZTable.class).item(DesignAtta.class, selector); + if (atta == null) + { + return "文件审核失败,成品文件不存在"; + } + + File file = new File(atta.getSavePath()); + if (!file.exists()) + { + return "文件审核失败,系统找不到指定的文件"; + } + + if (!"pdf".equalsIgnoreCase(atta.getFileType())) + { + return ""; + } + + String error = ""; + try + { + checkingMap.put(atta.getAttaId(), true);// 标记正在检测文件 + error = checkEndFile2(order, atta); + } + catch (Exception e) + { + error = "文件内容检测异常"; + log.error("订单[" + designId + "]文件审核异常:" + e.getMessage(), e); + } + finally + { + checkingMap.remove(atta.getAttaId());// 检测完毕 + } + + return error; + } + + /** + * 成品文件审核 + * + * @param order 订单对象 + * @param attaModul 附件标识 + * @return 错误信息 + * @throws Exception + */ + public static String checkEndFile2(DesignOrder order, DesignAtta atta) throws Exception + { + if (order == null) + { + return "订单不存在"; + } + + if (atta == null) + { + return "文件审核失败,印刷文件不存在"; + } + + File file = new File(atta.getSavePath()); + if (!file.exists()) + { + return "文件审核失败,系统找不到指定的文件"; + } + + PdfReader readerN = null; + try + { + // 文字转曲判断 --caohong 2020-4-20 + readerN = new PdfReader(atta.getSavePath()); + int nrPages = readerN.getNumberOfPages(); + for (int i = 1; i <= nrPages; i++) + { + String text = PdfTextExtractor.getTextFromPage(readerN, i); + if (text != null && !"".equals(text)) + { + return ("文件审核失败,第" + i + "页有文字未转曲!"); + } + } + } + catch (Exception e) + { + log.error("订单[" + order.getDesignId() + "]文件审核异常:" + e.getMessage(), e); + return "文件审核失败,有文字未转曲或编码异常!"; + } + catch (Error e) + { + log.error("订单[" + order.getDesignId() + "]文件审核异常:" + e.getMessage(), e); + return "文件审核失败,有文字未转曲或编码异常!"; + } + finally + { + if (readerN != null) + { + readerN.close(); + } + } + + // 透明PVC,并且是印白墨后加工的情况,不判断版面数量,因为有白墨版,比较特殊 --caohong + if (order.getTypeId() == 1806070857392601L && order.getAfterNames() != null && order.getAfterNames().contains("印白墨")) + { + return ""; + } + + int pageValue = order.getDesignPage(); + double stdWidth = order.getDesignWidth(); + double stdHeight = order.getDesignHeight(); + + // 优惠券产品需要特殊处理,由于录单去掉了模位计算操作,审核的时候需要使用名片标准尺寸来检查内容。--caohong 2019-11-12 + if ("1710131129568467".equals(String.valueOf(order.getTypeId()))) + { + stdWidth = 92; + stdHeight = 56; + double tmpWidth = order.getDesignWidth(); + double tmpHeight = order.getDesignHeight(); + if (order.getPrintWidth() > 0 && order.getPrintHeight() > 0) + { + tmpWidth = order.getPrintWidth(); + tmpHeight = order.getPrintHeight(); + } + // 临时计算模位用于计算检测 + int ms = BaseUtil.calcMod("92X56", new Double(tmpWidth).intValue(), new Double(tmpHeight).intValue(), 0); + order.setPrintMs(ms); + } + + // 画册产品不需要检查内容,比较复杂 + if (!"3".equals(String.valueOf(order.getTypeId()))) + { + // Document document = new Document(); + // document.setFile(atta.getSavePath()); + // int pageTotal = document.getNumberOfPages(); + + String filename = atta.getSavePath(); + PdfReader reader = new PdfReader(filename); + int pageTotal = reader.getNumberOfPages(); + if (pageTotal < 1) + { + return "文件审核失败,印刷文件无页面"; + } + + // 总页数%单或双面 + if (pageTotal % pageValue != 0) + { + return "文件审核失败,印刷文件页数错误"; + } + + // float firstWidth = 0f, firstHeight = 0f; + try + { + boolean flag = false; + // float scale = 1f; + // float rotation = 0f; + + // 获取第一条文件尺寸 + // BufferedImage oneImage = document.getPageImage(0, GraphicsRenderingHints.SCREEN, + // Page.BOUNDARY_CROPBOX, rotation, scale); + // firstWidth = oneImage.getWidth() / MM; + // firstHeight = oneImage.getHeight() / MM; + Rectangle pageSize = reader.getPageSize(1); + float height1 = pageSize.getHeight() / MM; + float width1 = pageSize.getWidth() / MM; + for (int i = 1; i < pageTotal; i++) + { + Rectangle pageSize2 = reader.getPageSize(i + 1); + if (Math.abs(pageSize2.getWidth() / MM - width1) >= 0.1) + { + return "文件审核失败,第" + i + "页,尺寸错误,实际宽:" + pageSize2.getWidth() / MM + ",期望宽:" + width1; + } + + if (Math.abs(pageSize2.getHeight() / MM - height1) >= 0.1) + { + return "文件审核失败,第" + i + "页,尺寸错误,实际高:" + pageSize2.getHeight() / MM + ",期望高:" + height1; + } + } + + // 误差不超过0.1,则收为整数 + height1 = Math.round(height1) - 2; + width1 = Math.round(width1) - 2; + + // 根据面积判断是否符合规则 92*56 3款2模 92*56*6 + float rate = (float) Math.abs((height1 * width1 * pageTotal / pageValue) - (stdWidth * stdHeight * order.getPrintMs() * order.getPrintKs())); + if (rate < 0.1) + { + flag = true; + } + + if (!flag) + { + return "文件审核失败,尺寸或模数错误"; + } + } + catch (Exception e) + { + log.error("[订单" + order.getDesignId() + "]印刷文件审核异常," + e.getMessage(), e); + return "文件审核异常,请重新上传."; + } + finally + { + reader.close(); + } + } + + return ""; + } + + /*** + * 订单是否自动审核通过 + * + * @author caohong + * @param order + * @return true=自动审单通过,false=需要人工审单 + */ + public static boolean isAutoCheck(DesignOrder order) + { + boolean autoCheckMeet = false; + if (order != null) + { + // 只设计不印刷订单自动审核通过 + if (order.isOnlyDesign()) + { + autoCheckMeet = true; + log.info("订单:" + order.getDesignId() + " 只设计不印刷订单自动审核通过"); + } + // else if ((order.getTypeId() == 1 || order.getTypeId() == 2) && order.getAmount() <= + // 200 * 100 && Validates.isEmpty(order.getAfterNames()) + // && order.getPrintWidth() == 0 && order.getPrintHeight() == 0) + // { + // // 名片、彩页订单,不含后加工,不是特殊尺寸订单,金额小于等于200元订单自动审核通过 + // autoCheckMeet = true; + // log.info("订单:" + order.getDesignId() + " 名片、彩页订单,不含后加工,不是特殊尺寸订单,金额小于等于200元订单自动审核通过"); + // } + } + + return autoCheckMeet; + } + + /** + * [简要描述]:订单后加工文件检测
            + * [详细描述]:
            + * + * @author caohong 2020-8-27 14:16:06 + * @param DesignOrder + * @return false 检查无问题,true 后工文件不合格 + */ + public static String isAfterFileCheck(DesignOrder order) + { + if (null == order) + { + return ""; + } + + // 如果有后加工,需要判断后加工文件,折页都需要后工文件,默认圆角不做检查,不需要后工图 + if ("1804102013509964".equals(String.valueOf(order.getTypeId())) + || (Validates.isNotEmpty(order.getAfterNames()) && !order.getAfterNames().contains("圆角"))) + { + try + { + Selector workSelector = new Selector(); + workSelector.addMust("designId", order.getDesignId()); + String[] attaModul = new String[] + { + FileTypeConstants.FILE_END.value(), FileTypeConstants.FILE_WORK.value() + }; + workSelector.addMustIn("attaModul", attaModul); + List attaList = ORM.get(ZTable.class).list(DesignAtta.class, workSelector); + if (attaList.size() > 0) + { + List endList = new ArrayList(); + List workList = new ArrayList(); + for (DesignAtta atta : attaList) + { + if (FileTypeConstants.FILE_WORK.value().equals(atta.getAttaModul())) + { + workList.add(atta.getFileType()); + } + else + { + endList.add(atta.getFileType()); + } + } + + // 成品文件是pdf格式才需要单独的后工文件 + if (endList.size() > 0 && endList.contains("pdf")) + { + if (workList.size() > 2) + { + return "后加工文件不符合规则,最多一个后工文件+一个后工图。"; + } + + if (workList.size() > 0) + { + // 有压型(定制形状),烫金的后加工必须有1个pdf文件+1个后工图 + if (Validates.isNotEmpty(order.getAfterNames()) && order.getAfterNames().contains("压型") || order.getAfterNames().contains("定制形状") + || order.getAfterNames().contains("烫金")) + { + if (workList.size() == 1) + { + return "后加工文件不符合规则,该后工类型需要一个后工文件+一个后工图。"; + } + + if (!workList.contains("pdf")) + { + return "后加工文件不符合规则,该后工类型至少需要一个pdf后工文件。"; + } + + if (!workList.contains("jpg") && !workList.contains("png")) + { + return "后加工文件不符合规则,该后工类型至少需要一个jpg或者png格式后工图。"; + } + } + else + { + if (workList.size() > 1 || (!workList.contains("jpg") && !workList.contains("png"))) + { + return "后加工文件不符合规则,该后工类型只需要一个jpg或者png格式后工图。"; + } + } + } + else + { + return "后加工文件不符合规则,不能为空"; + } + } + } + } + catch (Exception e) + { + log.error("订单[" + order.getDesignId() + "]后工文件检测异常," + e.getMessage(), e); + } + } + + return ""; + } + + /** + * + * [简要描述]产品类型支持成品文件格式判断:
            + * [详细描述]:
            + * + * @author gjx + * @param prdTypeId 产品id + * @param fileExt 文件后缀 + * @return + */ + public static Int checkEndFileFormat(long prdTypeId, String fileExt, String fileType) + { + String fileSuffixs = fileExt; + Int content = new Int("成功"); + if (Validates.isEmpty(fileType)) + { + return new Int(-1, "产品类型【" + Global.get(DesignTypeCache.class).getName(prdTypeId) + "】暂未配置文件上传类型,请联系管理人员处理"); + } + int indexOf = fileType.toLowerCase().indexOf(fileExt.toLowerCase()); + if (indexOf > -1) + { + return content; + } + return new Int(-1, "产品类型【" + Global.get(DesignTypeCache.class).getName(prdTypeId) + "】不支持上传【" + fileSuffixs + "】格式文件,请传【" + fileType + "】格式文件!"); + + } + + public static void main(String[] args) throws Exception + { + qq(); + doCheckFile2(2347943930001L, "", FileTypeConstants.FILE_END.value()); + /* + * String url = "2347943930001-a.pdf"; + * url = URLEncoder.encode(url, "UTF-8"); + */ + + } + + public static void qq() + { + + } +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/dao/OrderLogDao.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/dao/OrderLogDao.java new file mode 100644 index 0000000..ebe3584 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/dao/OrderLogDao.java @@ -0,0 +1,118 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dao; + +import java.sql.SQLException; + +import org.zhiqim.kernel.util.Ids; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ORMException; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.aliyuncs.utils.StringUtils; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; +import com.zhiqim.yangcai.design.dbo.order.OrdOprLog; +import com.zhiqim.yangcai.util.ErpClassService; +import com.zhiqim.yangcai.util.ErpClassService.statusEnum; + +public class OrderLogDao +{ + + /** + * [简要描述]:记录订单操作日志,调用方完成订单修改时间更新
            + * + * @author caohong + * @param designId 订单id + * @param status 订单操作后的状态 + * @param designer 订单设计师 + * @param operatorCode 操作员 + * @param itemDesc 操作描述 + * @param eventType 操作事件类型 + * @throws ORMException + * @throws SQLException + */ + public static void saveOrderOperateLog(long designId, int status, String designer, String operatorCode, String itemDesc, int eventType) + throws ORMException, SQLException + { + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, new Selector("designId", designId)); + OrdOprLog orderlog = new OrdOprLog(); + orderlog.setLogId(Ids.longId()); + orderlog.setDesignId(designId); + orderlog.setStatus(status); + orderlog.setOperatorCode(operatorCode); + orderlog.setDesigner(designer); + orderlog.setOperateDesc(itemDesc); + orderlog.setEventType(eventType); + orderlog.setCreateTime(Sqls.nowTimestamp()); + + ORM.get(ZTable.class).insert(orderlog); + if (StringUtils.isNotEmpty(order.getTids())) + { + new ErpClassService(order.getTids(), order.getDesigner(), statusEnum.TO_BE_DESIGNEDING.getCode(), itemDesc); + } + } + + public static void saveOrderOperateLog(long designId, String operatorCode, String itemDesc, int eventType) throws ORMException, SQLException + { + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, new Selector("designId", designId)); + if (order == null) + { + return; + } + + ORM.get(ZTable.class).update(DesignOrder.class, new Updater().addMust("designId", designId).addField("modifyTime", Sqls.nowTimestamp())); + OrdOprLog orderlog = new OrdOprLog(); + orderlog.setLogId(Ids.longId()); + orderlog.setDesignId(designId); + orderlog.setStatus(order.getStatus()); + orderlog.setOperatorCode(operatorCode); + orderlog.setDesigner(order.getDesigner()); + orderlog.setOperateDesc(itemDesc); + orderlog.setEventType(eventType); + orderlog.setCreateTime(Sqls.nowTimestamp()); + + ORM.get(ZTable.class).insert(orderlog); + if (StringUtils.isNotEmpty(order.getTids())) + { + new ErpClassService(order.getTids(), order.getDesigner(), statusEnum.TO_BE_DESIGNEDING.getCode(), itemDesc); + } + } + + public static void saveOrderOperateLog(DesignOrder order, String operatorCode, String itemDesc, int eventType) throws ORMException, SQLException + { + if (order == null) + { + return; + } + + ORM.get(ZTable.class).update(DesignOrder.class, new Updater().addMust("designId", order.getDesignId()).addField("modifyTime", Sqls.nowTimestamp())); + OrdOprLog orderlog = new OrdOprLog(); + orderlog.setLogId(Ids.longId()); + orderlog.setDesignId(order.getDesignId()); + orderlog.setStatus(order.getStatus()); + orderlog.setOperatorCode(operatorCode); + orderlog.setDesigner(order.getDesigner()); + orderlog.setOperateDesc(itemDesc); + orderlog.setEventType(eventType); + orderlog.setCreateTime(Sqls.nowTimestamp()); + + ORM.get(ZTable.class).insert(orderlog); + if (StringUtils.isNotEmpty(order.getTids())) + { + new ErpClassService(order.getTids(), order.getDesigner(), statusEnum.TO_BE_DESIGNEDING.getCode(), itemDesc); + } + } + +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/dao/OssFileDao.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/dao/OssFileDao.java new file mode 100644 index 0000000..821bf55 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/dao/OssFileDao.java @@ -0,0 +1,519 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.dao; + +import java.io.File; + +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Maths; +import org.zhiqim.kernel.util.Objects; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Strings; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.oss.service.oss.OssService; +import com.zhiqim.oss.service.oss.OssUploadService; +import com.zhiqim.yangcai.design.constants.FileTypeConstants; +import com.zhiqim.yangcai.design.dbo.order.DesignAtta; +import com.zhiqim.yangcai.design.dbo.order.DesignAttaView; +import com.zhiqim.yangcai.design.dbo.utils.BaseUtil; +import com.zhiqim.yangcai.util.QiyeWechatUtil; + +/*** + * oss文件上传 + * + * @version v1.0.0 @author longguizhi 2018-1-19 新建与整理 + */ +public class OssFileDao +{ + private static final Log log = LogFactory.getLog(OssFileDao.class); + private static String bucketName = Global.getString("oss", "yangcai_bucketName"); + private static String prefix_dir = Global.getString("oss", "prefix_dir"); + private static boolean isInternal = "true".equalsIgnoreCase(Global.getString("oss", "isInternal")) ? true : false; + public static String ossEndpoint = "oss-89-taobao.oss-cn-shenzhen.aliyuncs.com"; + + /** 获取oss前缀目录 **/ + public static String getPrefix_dir() + { + String dir = Strings.trim(prefix_dir); + dir = Strings.trim(dir, "/", "/"); + return Strings.trim(dir); + } + + /*** + * 文件上传到OSS + * + * @param atta 附件对象 + * @return 返回 =true 表示上传成功 + */ + public static boolean uploadFile(DesignAtta atta) + { + if (Validates.isNotEmptyBlank(atta.getOssUrl())) + { + return true; + } + + try + { + String path = atta.getSavePath(); + File file = new File(path); + if (!file.exists() || file.isDirectory()) + {// 文件不存在 + Updater updater = new Updater(); + updater.addMust("attaId", atta.getAttaId()); + updater.addField("ossType", -1); + ORM.get(ZTable.class).update(DesignAtta.class, updater); + + if ("EndFile".equals(atta.getAttaModul())) + { + String msg = "订单[" + atta.getDesignId() + "]附件[" + atta.getAttaModul() + "]路径[" + atta.getSavePath() + "]文件不存在,流程阻塞。"; + log.error(msg); + QiyeWechatUtil.sendMsgToQiyeWechat("设计平台订单文件OSS云端存储失败告警:\n" + msg); + } + + return false; + } + + if (Validates.isEmptyBlank(bucketName)) + { + log.error("订单[" + atta.getDesignId() + "]附件[" + atta.getAttaModul() + "]上传到OSS时,bucketName参数未配置"); + return false; + } + + long statTime = System.currentTimeMillis(); + + String fileKey = getUploadFileKey(atta); + OssUploadService ossUploadService = Global.get(OssUploadService.class); + String ossUrl = ossUploadService.uploadFile(bucketName, fileKey, atta.getSavePath(), isInternal); + + atta.setOssUrl(ossUrl); + atta.setOssType(1); + + Updater updater = new Updater(); + updater.addMust("attaId", atta.getAttaId()); + updater.addField("ossUrl", ossUrl); + updater.addField("ossType", 1); + ORM.get(ZTable.class).update(DesignAtta.class, updater); + + long endTime = System.currentTimeMillis(); + log.info("订单[" + atta.getDesignId() + "]附件[" + atta.getAttaModul() + "]上传到OSS完成,耗时:" + Maths.division(endTime - statTime, 1000, 2) + "秒"); + + } + catch (Exception e) + { + log.error("订单[" + atta.getDesignId() + "]附件[" + atta.getAttaModul() + "]上传到OSS异常," + e.getMessage(), e); + return false; + } + + return true; + } + + /**** + * 上传文件 + * + * @param file + * @param fileKey + * @return 返回 null表示失败,正确返回Oss访问地址 + */ + public static String uploadFile(File file, String fileKey) + { + if (file == null) + { + return null; + } + + if (!file.exists() || file.isDirectory()) + {// 文件不存在 + log.error("OssFileDao 文件[" + file + "]上传到OSS时文件不存在"); + return null; + } + + if (Validates.isEmptyBlank(bucketName)) + { + log.error("OssFileDao 文件[" + file + "]上传到OSS时,bucketName参数未配置"); + return null; + } + + if (Validates.isEmptyBlank(fileKey) || Validates.isEmptyBlank(Strings.trimLeft(fileKey, "/"))) + { + log.error("OssFileDao 文件[" + file + "]上传到OSS时,fileKey不能为空"); + return null; + } + + fileKey = Strings.trimLeft(fileKey, "/"); + if (Validates.isNotEmptyBlank(prefix_dir)) + { + fileKey = Strings.addStartsWith(fileKey, Strings.trim(prefix_dir, "/", "/") + "/"); + } + + long statTime = System.currentTimeMillis(); + OssUploadService ossUploadService = Global.get(OssUploadService.class); + + try + { + String ossUrl = ossUploadService.uploadFile(bucketName, fileKey, file.getPath(), isInternal); + log.info("OssFileDao 附件[" + file + "]文件上传完成,共计[%s]毫秒", System.currentTimeMillis() - statTime); + return ossUrl; + } + catch (Exception e) + { + log.error("OssFileDao 附件[" + file + "]文件上传失败", e); + return null; + } + } + + /*** + * 文件断点续传上传到OSS + * + * @param atta 附件对象 + * @return 返回 =true 表示上传成功 + */ + public static boolean uploadBreak(DesignAtta atta) + { + if (Validates.isNotEmptyBlank(atta.getOssUrl())) + { + return true; + } + + try + { + File file = new File(atta.getSavePath()); + if (!file.exists() || file.isDirectory()) + {// 文件不存在 + Updater updater = new Updater(); + updater.addMust("attaId", atta.getAttaId()); + updater.addField("ossType", -1); + ORM.get(ZTable.class).update(DesignAtta.class, updater); + + if ("EndFile".equals(atta.getAttaModul())) + { + String msg = "订单[" + atta.getDesignId() + "]附件[" + atta.getAttaModul() + "]路径[" + atta.getSavePath() + "]文件不存在,流程阻塞。"; + log.error(msg); + QiyeWechatUtil.sendMsgToQiyeWechat("设计平台订单文件OSS云端存储失败告警:\n" + msg); + } + return false; + } + + if (Validates.isEmptyBlank(bucketName)) + { + log.error("订单[" + atta.getDesignId() + "]附件[" + atta.getAttaModul() + "]上传到OSS时,bucketName参数未配置"); + return false; + } + + long statTime = System.currentTimeMillis(); + + String fileKey = getUploadFileKey(atta); + OssUploadService ossUploadService = Global.get(OssUploadService.class); + String ossUrl = ossUploadService.uploadFileBreak(bucketName, fileKey, atta.getSavePath(), isInternal); + + atta.setOssUrl(ossUrl); + atta.setOssType(1); + Updater updater = new Updater(); + updater.addMust("attaId", atta.getAttaId()); + updater.addField("ossUrl", ossUrl); + updater.addField("ossType", 1); + + ORM.get(ZTable.class).update(DesignAtta.class, updater); + + long endTime = System.currentTimeMillis(); + log.info("订单[" + atta.getDesignId() + "]附件[" + atta.getAttaModul() + "]上传到OSS完成,耗时:" + Maths.division(endTime - statTime, 1000, 2) + "秒"); + } + catch (Exception e) + { + log.error("订单[" + atta.getDesignId() + "]附件[" + atta.getAttaModul() + "]上传到OSS异常," + e.getMessage(), e); + return false; + } + + return true; + } + + /**** + * 断点上传文件 + * + * @param file + * @param fileKey + * @return 返回 null表示失败,正确返回Oss访问地址 + */ + public static String uploadBreak(File file, String fileKey) + { + if (file == null) + { + return null; + } + + if (!file.exists() || file.isDirectory()) + {// 文件不存在 + log.error("OssFileDao 文件[" + file + "]上传到OSS时文件不存在"); + return null; + } + + if (Validates.isEmptyBlank(bucketName)) + { + log.error("OssFileDao 文件[" + file + "]上传到OSS时,bucketName参数未配置"); + return null; + } + + if (Validates.isEmptyBlank(fileKey) || Validates.isEmptyBlank(Strings.trimLeft(fileKey, "/"))) + { + log.error("OssFileDao 文件[" + file + "]上传到OSS时,fileKey不能为空"); + return null; + } + + fileKey = Strings.trimLeft(fileKey, "/"); + if (Validates.isNotEmptyBlank(prefix_dir)) + { + fileKey = Strings.addStartsWith(fileKey, Strings.trim(prefix_dir, "/", "/") + "/"); + } + + long statTime = System.currentTimeMillis(); + log.info("OssFileDao 附件[" + file + "]文件大小[" + BaseUtil.getPrintSize(file.length()) + "]上传到OSS开始..."); + OssUploadService ossUploadService = Global.get(OssUploadService.class); + + try + { + String ossUrl = ossUploadService.uploadFileBreak(bucketName, fileKey, file.getPath(), isInternal); + log.info("OssFileDao 附件[" + file + "]文件上传完成,共计[%s]毫秒", System.currentTimeMillis() - statTime); + return ossUrl; + } + catch (Exception e) + { + log.error("OssFileDao 附件[" + file + "]文件上传失败", e); + return null; + } + } + + /*** + * 删除Oss文件 + * + * @param atta 附件对象 + * @return 返回 =true 表示上传成功 + */ + public static boolean deleteOssFile(DesignAtta atta) + { + if (atta == null || Validates.isEmptyBlank(atta.getOssUrl())) + { + return true; + } + + if (atta.getAttaFlag() == 1) + { + return true;// 接口上传的不删除 + } + + String fileKey = getUploadFileKey(atta); + if (Validates.isEmptyBlank(fileKey)) + { + return false; + } + + try + { + + String bucketName = Global.getString("oss", "yangcai_bucketName"); + + if (Validates.isEmptyBlank(bucketName)) + { + log.error("OssFileDao 附件[" + fileKey + "]从OSS删除,bucketName参数未配置"); + return false; + } + + OssService ossService = Global.get(OssService.class); + ossService.deleteFile(bucketName, fileKey); + + return true; + } + catch (Exception e) + { + log.error("从OSS删除时异常fileKey:[" + fileKey + "]:", e); + return false; + } + } + + /*** + * 删除Oss文件 + * + * @param fileKey + * @return 返回 =true 表示上传成功 + */ + public static boolean deleteOssFile(String fileKey) + { + + if (Validates.isEmptyBlank(fileKey)) + { + return false; + } + + try + { + + String bucketName = Global.getString("oss", "yangcai_bucketName"); + if (Validates.isEmptyBlank(bucketName)) + { + log.error("OssFileDao 附件[" + fileKey + "]从OSS删除,bucketName参数未配置"); + return false; + } + + OssService ossService = Global.get(OssService.class); + ossService.deleteFile(bucketName, fileKey); + return true; + } + catch (Exception e) + { + log.error("从OSS删除时异常fileKey:[" + fileKey + "]:", e); + return false; + } + } + + /** + * + * [简要描述]: 拷贝文件
            + * [详细描述]:
            + * + * @author gjx + * @param sourceKey + * @param destinationKey + */ + public static boolean copyObject(String sourceKey, String destinationKey) + { + // 创建OSSClient实例。 + OssService ossService = Global.get(OssService.class); + try + { + ossService.doCopy(bucketName, sourceKey, bucketName, destinationKey); + return Boolean.TRUE; + } + catch (Exception e) + { + log.error("拷贝文件异常:bucketName:" + bucketName + ",sourceKey:[" + sourceKey + "],destinationKey:[" + destinationKey + "]", e); + } + return Boolean.FALSE; + } + + /*** + * 获取组装文件在OSS上的key + * + * @param atta 附件对象 + * @return 返回 文件的key + */ + public static String getUploadFileKey(DesignAtta atta) + { + // 模拟文件夹 + if (atta == null) + { + return null; + } + + String date = Sqls.toDateString(atta.getUploadTime()).replace("-", ""); + String attaModul = atta.getAttaModul(); + String folder = Strings.addEndsWith(date, "/") + Strings.addEndsWith(attaModul, "/"); + String fileKey = folder + atta.getAttaId() + Strings.addStartsWith(atta.getFileType(), "."); + + if (Validates.isNotEmptyBlank(atta.getOssUrl()) && Validates.isNotEmptyBlank(getPrefix_dir()) && atta.getOssUrl().indexOf(getPrefix_dir()) == -1) + { + return fileKey;// 老数据 已经上传过了 + } + + if (Validates.isNotEmptyBlank(getPrefix_dir())) + { + fileKey = Strings.addEndsWith(getPrefix_dir(), "/") + fileKey; + } + + return fileKey; + } + + /** + * + * 组装图片在OSS上的key + * + * @author gjx + * @param id + * @return 返回 文件的key + */ + public static String getUploadFileKey(long id) + { + if (id <= 0) + { + return null; + } + + String date = DateTimes.getDateString().replace("-", ""); + String fileType = FileTypeConstants.FILE_COMPLAIN_END.value(); + String folder = Strings.addEndsWith(date, "/") + Strings.addEndsWith(fileType, "/"); + + String fileKey = folder + id + Strings.addStartsWith("png", "."); + String prefix = Strings.addEndsWith(Strings.trim(prefix_dir, "/", "/"), "/"); + + return Strings.isEmpty(prefix) ? fileKey : Strings.addStartsWith(fileKey, prefix); + } + + /** + * + * 组装图片在OSS上的key + * + * @author coahong + * @param id + * @param filePathName 目录名称 + * @return 返回 文件的key + */ + public static String getUploadFileKey(long id, String filePathName) + { + if (id <= 0) + { + return null; + } + if (filePathName == null) + { + return null; + } + + String date = DateTimes.getDateString().replace("-", ""); + String fileType = filePathName; + String folder = Strings.addEndsWith(date, "/") + Strings.addEndsWith(fileType, "/"); + + String fileKey = folder + id + Strings.addStartsWith("png", "."); + String prefix = Strings.addEndsWith(Strings.trim(prefix_dir, "/", "/"), "/"); + + return Strings.isEmpty(prefix) ? fileKey : Strings.addStartsWith(fileKey, prefix); + } + + public static boolean uploadBreak(DesignAttaView atta) + { + return uploadBreak(Objects.copyDeep(atta, new DesignAtta())); + } + + public static boolean uploadFile(DesignAttaView atta) + { + return uploadFile(Objects.copyDeep(atta, new DesignAtta())); + } + + public static String designExternalFilePackageKey(String fileKey) + { + if (Validates.isEmptyBlank(fileKey) || Validates.isEmptyBlank(Strings.trimLeft(fileKey, "/"))) + { + return null; + } + + fileKey = Strings.trimLeft(fileKey, "/"); + if (Validates.isNotEmptyBlank(prefix_dir)) + { + fileKey = Strings.addStartsWith(fileKey, Strings.trim(prefix_dir, "/", "/") + "/"); + } + return fileKey; + } + +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/dao/ParamDao.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/dao/ParamDao.java new file mode 100644 index 0000000..14a6a7f --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/dao/ParamDao.java @@ -0,0 +1,166 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.dao; + +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.kernel.constants.SignConstants; +import org.zhiqim.kernel.util.Lists; +import org.zhiqim.kernel.util.Strings; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.manager.dbo.ZmrParam; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ORMException; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.zhiqim.yangcai.util.DesignUtil; + +/** 管理台参数获取dao **/ +@AnAlias("ParamDao") +public class ParamDao implements SignConstants +{ + /** + * 获取后加工参数组成列表 + * + * @throws SQLException + * @throws ORMException + **/ + public static List doGetAfterNameParam() throws Exception + { + ZmrParam paramAfters = ORM.get(ZTable.class).item(ZmrParam.class, + new Selector("paramGroup", "yangcai.design").addMust("paramKey", "designOrgMerAfters")); + List designAfters = new ArrayList(); + if (paramAfters != null) + { + StringBuilder sb = new StringBuilder(); + String v = paramAfters.getParamValue(); + for (int i = 0; i < v.length(); i++) + { + char c = v.charAt(i); + if (c < _SPACE_ || c == _SPACE_ZH_ || c == _SPACE_BOM_) + { + continue; + } + + if (c == ',') + { + sb.append(','); + continue; + } + sb.append(c); + } + + for (String after : Lists.toStringList(sb.toString())) + { + if (Validates.isNotEmptyBlank(after)) + { + designAfters.add(after); + } + } + } + + return designAfters; + } + + /****/ + public static List doGetShopNameParam() throws Exception + { + ZmrParam shopParam = ORM.get(ZTable.class).item(ZmrParam.class, new Selector("paramGroup", "yangcai.design").addMust("paramKey", "orderShop")); + List shopList = new ArrayList<>(); + if (shopParam != null && Validates.isNotEmptyBlank(shopParam.getParamValue())) + { + String shops = shopParam.getParamValue().replaceAll(",", ","); + shops = DesignUtil.removeBlank(shops); + shopList.addAll(Lists.toStringList(shops)); + } + + return shopList; + } + + /**** + * 获取String参数 + * + * @param paramGrpup + * @param paramKey + * @return + * @throws SQLException + * @throws ORMException + */ + public static String getString(String paramGroup, String paramKey) throws Exception + { + if (Validates.isEmptyBlank(paramGroup) || Validates.isEmptyBlank(paramKey)) + { + return null; + } + + ZmrParam param = ORM.get(ZTable.class).item(ZmrParam.class, new Selector("paramGroup", paramGroup).addMust("paramKey", paramKey)); + if (param == null) + { + return null; + } + + String value = param.getParamValue(); + return Validates.isEmptyBlank(value) ? null : Strings.trim(value); + } + + /** + * + * @param paramGrpup + * @param paramKey + * @param paramValue + * @throws Exception + */ + public static void doUpdateParam(String paramGroup, String paramKey, String paramValue) throws Exception + { + Updater updater = new Updater(); + updater.addMust("paramGroup", paramGroup); + updater.addMust("paramKey", paramKey); + updater.addField("paramValue", paramValue); + ORM.get(ZTable.class).update(ZmrParam.class, updater); + } + + /** + * + * [简要描述]: 获取业务参数
            + * [详细描述]:
            + * + * @author gjx + * @return + * @throws Exception + */ + public static LinkedHashMap> doQueryBusinessParam() throws Exception + { + LinkedHashMap> groupMap = new LinkedHashMap<>(); + + List paramList = ORM.get(ZTable.class).list(ZmrParam.class, + new Selector("paramType", "business").addMustNotEqual("paramType", "private").addOrderbyAsc("paramGroup,paramSeq")); + for (ZmrParam param : paramList) + { + LinkedHashMap paramMap = groupMap.get(param.getParamGroup()); + if (paramMap == null) + { + paramMap = new LinkedHashMap(); + groupMap.put(param.getParamGroup(), paramMap); + } + + paramMap.put(param.getParamKey(), param); + } + return groupMap; + } + +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/dao/PerformanceParamDao.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/dao/PerformanceParamDao.java new file mode 100644 index 0000000..0fdee42 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/dao/PerformanceParamDao.java @@ -0,0 +1,123 @@ +/* + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ + +package com.zhiqim.yangcai.design.dao; + +import org.zhiqim.kernel.annotation.AnAlias; + +import com.zhiqim.yangcai.design.dbo.stat.PerformanceParam; + +@AnAlias("PerformanceParamDao") +public class PerformanceParamDao +{ + + public static void getValidPerformanceParam(long orgId) throws Exception + { +// ZmrOrgDao.getOrgName(request, orgId) + + + } + + /**** + * 获取 统计参数价格 + * @param param 价格参数 + * @param count 订单数 + * @return + */ + public static long getValidPerformanceParamPrice(PerformanceParam param, int count) + { + if (param == null) + return 0; + if (count <= 0) + return param.getPriceLevel1(); + + if (count <= param.getLevel1MaxCount()) + return param.getPriceLevel1(); + + else if(count <= param.getLevel2MaxCount()) + return param.getPriceLevel2(); + + else if(count <= param.getLevel3MaxCount()) + return param.getPriceLevel3(); + + else if(count <= param.getLevel4MaxCount()) + return param.getPriceLevel4(); + + else if(count <= param.getLevel5MaxCount()) + return param.getPriceLevel5(); + + else if(count <= param.getLevel6MaxCount()) + return param.getPriceLevel6(); + else + {//大于上限值 则取上限值 + if (param.getLevel6MaxCount() != 0 ) + return param.getPriceLevel6(); + + else if(param.getLevel5MaxCount() != 0 ) + return param.getPriceLevel5(); + + else if(param.getLevel4MaxCount() != 0 ) + return param.getPriceLevel4(); + + else if(param.getLevel3MaxCount() != 0 ) + return param.getPriceLevel3(); + + else if(param.getLevel2MaxCount() != 0 ) + return param.getPriceLevel2(); + + else if(param.getLevel1MaxCount() != 0 ) + return param.getPriceLevel1(); + + else + return 0; + } + + } + +// public static void main(String[] args) +// { +// +// +// int level1MaxCount = 299; +// int level2MaxCount = 399; +// int level3MaxCount = 499; +// int level4MaxCount = 0; +// int level5MaxCount = 0; +// int level6MaxCount = 0; +// +// PerformanceParam parameter = new PerformanceParam(); +// parameter.setValidDate(DateTimes.getFirstMonthDay()); +// parameter.setOrgId(0); +// parameter.setPriceType(0); +// +// +// long priceLevel1 = 299; +// long priceLevel2 = 399; +// long priceLevel3 = 499; +// long priceLevel4 = 599; +// long priceLevel5 = 699; +// long priceLevel6 = 1000000; +// parameter.setPriceLevel1(priceLevel1); +// parameter.setPriceLevel2(priceLevel2); +// parameter.setPriceLevel3(priceLevel3); +// parameter.setPriceLevel4(priceLevel4); +// parameter.setPriceLevel5(priceLevel5); +// parameter.setPriceLevel6(priceLevel6); +// +// parameter.setLevel1MaxCount(level1MaxCount); +// parameter.setLevel2MaxCount(level2MaxCount); +// parameter.setLevel3MaxCount(level3MaxCount); +// parameter.setLevel4MaxCount(level4MaxCount); +// parameter.setLevel5MaxCount(level5MaxCount); +// parameter.setLevel6MaxCount(level6MaxCount); +// +// System.out.println(getValidPerformanceParamPrice(parameter, 600)); +// } +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/dao/ShopDao.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/dao/ShopDao.java new file mode 100644 index 0000000..3648bdd --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/dao/ShopDao.java @@ -0,0 +1,52 @@ +/** + * 扬彩印刷设计 + * 文件名 :ShopDao.java + * 创建人 :高佳新 + * 创建时间:2019-7-17 + */ + +package com.zhiqim.yangcai.design.dao; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import org.zhiqim.kernel.annotation.AnAlias; +import org.zhiqim.manager.dbo.ZmrParam; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +/** + * + * 店铺信息dao + * + * @version 1.0 @author gjx 2019-7-17 新建与整理 + */ +@AnAlias("ShopDao") +public class ShopDao +{ + /** + * + * 得到店铺信息 + * + * @author gjx + * @return + * @throws Exception + */ + public static List getShopList() throws Exception + { + List shopList = ORM.get(ZTable.class).list(ZmrParam.class, new Selector().addMust("paramKey", "orderShop")); + for (ZmrParam zmrParam : shopList) + { + String shopValue = zmrParam.getParamValue(); + if (shopValue != null) + { + String[] shopValueArray = shopValue.split(","); + return new ArrayList<>(Arrays.asList(shopValueArray)); + } + } + return new ArrayList(); + } + +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/model/CopyTemplateModel.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/model/CopyTemplateModel.java new file mode 100644 index 0000000..7b97cd5 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/model/CopyTemplateModel.java @@ -0,0 +1,54 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.model; + +import java.util.List; + +import com.zhiqim.media.dbo.MediaBg; +import com.zhiqim.media.dbo.MediaCanvas; +import com.zhiqim.media.dbo.MediaCoverMaterial; +import com.zhiqim.media.dbo.MediaImageUse; +import com.zhiqim.media.dbo.MediaMaterialParamEx; +import com.zhiqim.media.service.model.MediaModel; +import com.zhiqim.yangcai.design.dbo.template.MediaTemplate; + +/** + * 复制模板model类 + * @version v1.0.0 @author zhouwenbin 2017-12-28 新建与整理 + */ +public class CopyTemplateModel extends MediaModel +{ + public CopyTemplateModel(MediaCanvas canvas, List bgList, List materialList, List coverMaterialList) + { + super(canvas, bgList, materialList, coverMaterialList); + } + + private MediaTemplate template; + private List refList; + + public MediaTemplate getTemplate() + { + return template; + } + public void setTemplate(MediaTemplate template) + { + this.template = template; + } + public List getRefList() + { + return refList; + } + public void setRefList(List refList) + { + this.refList = refList; + } +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/model/PrdNumberModel.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/model/PrdNumberModel.java new file mode 100644 index 0000000..38c1da4 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/model/PrdNumberModel.java @@ -0,0 +1,85 @@ +/** + * 扬彩印刷设计 + * 文件名 :PrdNumberModel.java + * 创建人 :gjx + * 创建时间:2019-11-7 + */ + +package com.zhiqim.yangcai.design.model; + +/** + * [简要描述]产品数量Model:
            + * [详细描述]:
            + * + * @version 1.0 @author gjx 2019-11-7 新建与整理 + */ +public class PrdNumberModel +{ + private long prdNumberId; // 1.数量ID + private long prdTypeId; // 2.产品类型 + private int prdNumberStatus; // 3.状态, 0:正常,1:停用 + private String prdNumberName; // 4.名称 + private int prdNumberValue; // 5.数量值 + private int prdNumberSeq; // 6.序号 + + public long getPrdNumberId() + { + return prdNumberId; + } + + public void setPrdNumberId(long prdNumberId) + { + this.prdNumberId = prdNumberId; + } + + public long getPrdTypeId() + { + return prdTypeId; + } + + public void setPrdTypeId(long prdTypeId) + { + this.prdTypeId = prdTypeId; + } + + public int getPrdNumberStatus() + { + return prdNumberStatus; + } + + public void setPrdNumberStatus(int prdNumberStatus) + { + this.prdNumberStatus = prdNumberStatus; + } + + public String getPrdNumberName() + { + return prdNumberName; + } + + public void setPrdNumberName(String prdNumberName) + { + this.prdNumberName = prdNumberName; + } + + public int getPrdNumberValue() + { + return prdNumberValue; + } + + public void setPrdNumberValue(int prdNumberValue) + { + this.prdNumberValue = prdNumberValue; + } + + public int getPrdNumberSeq() + { + return prdNumberSeq; + } + + public void setPrdNumberSeq(int prdNumberSeq) + { + this.prdNumberSeq = prdNumberSeq; + } + +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/model/PrdProductModel.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/model/PrdProductModel.java new file mode 100644 index 0000000..4a942ca --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/model/PrdProductModel.java @@ -0,0 +1,184 @@ +/** + * 扬彩印刷设计 + * 文件名 :PrdProductModel.java + * 创建人 :gjx + * 创建时间:2019-11-7 + */ + +package com.zhiqim.yangcai.design.model; + +/** + * [简要描述]产品model:
            + * [详细描述]:
            + * + * @version 1.0 @author gjx 2019-11-7 新建与整理 + */ +public class PrdProductModel +{ + private long productId; // 1.产品ID + private String productName; // 2.产品名称 + private long prdTypeId; // 3.产品类型 + private long prdPaperId; // 4.纸张ID + private long prdPageId; // 5.面数ID + private long prdNumberId; // 6.数量ID + private long prdSizeId; // 7.尺寸ID + private int productStatus; // 8.状态, 0:正常,1:停用 + private long productPrice; // 9.产品价格,单位分 + private int productShipTime; // 10.出货时间,单位小时 + private boolean productCheck; // 11.是否审核 + private String productExpress; // 12.默认快递公司 + private long productSupplier; // 13.默认供应商 + private String productPolicyJson; // 14.后加工策略json + private int productSeq; // 15.序号 + + public long getProductId() + { + return productId; + } + + public void setProductId(long productId) + { + this.productId = productId; + } + + public String getProductName() + { + return productName; + } + + public void setProductName(String productName) + { + this.productName = productName; + } + + public long getPrdTypeId() + { + return prdTypeId; + } + + public void setPrdTypeId(long prdTypeId) + { + this.prdTypeId = prdTypeId; + } + + public long getPrdPaperId() + { + return prdPaperId; + } + + public void setPrdPaperId(long prdPaperId) + { + this.prdPaperId = prdPaperId; + } + + public long getPrdPageId() + { + return prdPageId; + } + + public void setPrdPageId(long prdPageId) + { + this.prdPageId = prdPageId; + } + + public long getPrdNumberId() + { + return prdNumberId; + } + + public void setPrdNumberId(long prdNumberId) + { + this.prdNumberId = prdNumberId; + } + + public long getPrdSizeId() + { + return prdSizeId; + } + + public void setPrdSizeId(long prdSizeId) + { + this.prdSizeId = prdSizeId; + } + + public int getProductStatus() + { + return productStatus; + } + + public void setProductStatus(int productStatus) + { + this.productStatus = productStatus; + } + + public long getProductPrice() + { + return productPrice; + } + + public void setProductPrice(long productPrice) + { + this.productPrice = productPrice; + } + + public int getProductShipTime() + { + return productShipTime; + } + + public void setProductShipTime(int productShipTime) + { + this.productShipTime = productShipTime; + } + + public boolean isProductCheck() + { + return productCheck; + } + + public void setProductCheck(boolean productCheck) + { + this.productCheck = productCheck; + } + + public String getProductExpress() + { + return productExpress; + } + + public void setProductExpress(String productExpress) + { + this.productExpress = productExpress; + } + + public long getProductSupplier() + { + return productSupplier; + } + + public void setProductSupplier(long productSupplier) + { + this.productSupplier = productSupplier; + } + + public String getProductPolicyJson() + { + return productPolicyJson; + } + + public void setProductPolicyJson(String productPolicyJson) + { + this.productPolicyJson = productPolicyJson; + } + + public int getProductSeq() + { + return productSeq; + } + + public void setProductSeq(int productSeq) + { + this.productSeq = productSeq; + } + +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/model/PrintMsSize.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/model/PrintMsSize.java new file mode 100644 index 0000000..05dc966 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/model/PrintMsSize.java @@ -0,0 +1,78 @@ +package com.zhiqim.yangcai.design.model; + +import org.zhiqim.kernel.json.Jsons; + +/**** + * 订单 模数 对应尺寸对象 + * + * @version v1.0.0 @author lgz 2019-1-11 新建与整理 + */ +public class PrintMsSize implements Comparable +{ + private int printMs;// 印刷模数 + private double printWidth;// 印刷尺寸宽 + private double printHeight;// 印刷尺寸高 + private double printSide;// 印刷侧边长度 + + /*** 印刷模数 **/ + public int getPrintMs() + { + return printMs; + } + + /** 印刷模数 **/ + public void setPrintMs(int printMs) + { + this.printMs = printMs; + } + + /** 印刷尺寸宽 **/ + public double getPrintWidth() + { + return printWidth; + } + + /** 印刷尺寸宽 **/ + public void setPrintWidth(double printWidth) + { + this.printWidth = printWidth; + } + + /** 印刷尺寸高 **/ + public double getPrintHeight() + { + return printHeight; + } + + /** 印刷尺寸高 */ + public void setPrintHeight(double printHeight) + { + this.printHeight = printHeight; + } + + public double getPrintSide() + { + return printSide; + } + + public void setPrintSide(double printSide) + { + this.printSide = printSide; + } + + @Override + public String toString() + { + return Jsons.toString(this); + } + + @Override + public int compareTo(PrintMsSize o) + { + int res = this.getPrintMs() - o.getPrintMs(); + int r = (int) (this.printWidth * this.printHeight); + int r1 = (int) (o.printWidth * o.printHeight); + + return res != 0 ? res : r - r1; + } +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/model/TemplatePreviewModel.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/model/TemplatePreviewModel.java new file mode 100644 index 0000000..7c7ade0 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/model/TemplatePreviewModel.java @@ -0,0 +1,111 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.model; + +import java.util.ArrayList; +import java.util.List; + +import com.zhiqim.media.service.model.MediaBgModel; + +/** + * 模板预览model + * @version v1.0.0 @author zhouwenbin 2018-1-3 新建与整理 + */ +public class TemplatePreviewModel +{ + private long mediaId; + private int totalPage; + private int mediaScore; + private double width; + private double height; +// private List svgList = new ArrayList<>(); + private List bgList = new ArrayList<>(); //新增字段,处理订单模板需要bid问题 + + public TemplatePreviewModel(long mediaId, int totalPage, int mediaScore, double width, double height) + { + this.mediaId = mediaId; + this.totalPage = totalPage; + this.mediaScore = mediaScore; + this.width = width; + this.height = height; + } + + public int getTotalPage() + { + return totalPage; + } + + public void setTotalPage(int totalPage) + { + this.totalPage = totalPage; + } + + public int getMediaScore() + { + return mediaScore; + } + + public void setMediaScore(int mediaScore) + { + this.mediaScore = mediaScore; + } + + public long getMediaId() + { + return mediaId; + } + + public void setMediaId(long mediaId) + { + this.mediaId = mediaId; + } + + public double getWidth() + { + return width; + } + + public void setWidth(double width) + { + this.width = width; + } + + public double getHeight() + { + return height; + } + + public void setHeight(double height) + { + this.height = height; + } + +// public List getSvgList() +// { +// return svgList; +// } +// +// public void setSvgList(List svgList) +// { +// this.svgList = svgList; +// } + + public List getBgList() + { + return bgList; + } + + public void setBgList(List bgList) + { + this.bgList = bgList; + } +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/model/ZmrOrgModel.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/model/ZmrOrgModel.java new file mode 100644 index 0000000..058273a --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/model/ZmrOrgModel.java @@ -0,0 +1,88 @@ +/** + * 扬彩印刷设计 + * 文件名 :ZmrOrgModel.java + * 创建人 :jiangfan + * 创建时间:2020-09-09 + */ + +package com.zhiqim.yangcai.design.model; + +import org.zhiqim.manager.dbo.ZmrOrg; + +/** + * [简要描述]组织model:
            + * [详细描述]:
            + * + * @version 1.0 @author jiangfan 2020-09-09 新建与整理 + */ +public class ZmrOrgModel extends ZmrOrg +{ + private static final long serialVersionUID = 1L; + private int operatorNum; // 总人数 + private int subscribeOperatorNum; // 预约人数 + private int subscribeSum; // 预约总量 + private int finishSum; // 接单量 + private int dingGaoSum; // 定稿量 + private String finishRate; // 完成率 + + public int getOperatorNum() + { + return operatorNum; + } + + public void setOperatorNum(int operatorNum) + { + this.operatorNum = operatorNum; + } + + public int getSubscribeOperatorNum() + { + return subscribeOperatorNum; + } + + public void setSubscribeOperatorNum(int subscribeOperatorNum) + { + this.subscribeOperatorNum = subscribeOperatorNum; + } + + public int getSubscribeSum() + { + return subscribeSum; + } + + public void setSubscribeSum(int subscribeSum) + { + this.subscribeSum = subscribeSum; + } + + public int getFinishSum() + { + return finishSum; + } + + public void setFinishSum(int finishSum) + { + this.finishSum = finishSum; + } + + public int getDingGaoSum() + { + return dingGaoSum; + } + + public void setDingGaoSum(int dingGaoSum) + { + this.dingGaoSum = dingGaoSum; + } + + public String getFinishRate() + { + return finishRate; + } + + public void setFinishRate(String finishRate) + { + this.finishRate = finishRate; + } + +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/rmi/RmiConstants.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/rmi/RmiConstants.java new file mode 100644 index 0000000..b9dae22 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/rmi/RmiConstants.java @@ -0,0 +1,109 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.rmi; + +import org.zhiqim.kernel.util.Strings; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.kernel.util.consts.Int; + +/*** + * rmi 常量 + * + * @version v1.0.0 @author longguizhi 2018-9-14 新建与整理 + */ +public class RmiConstants +{ + /** 商户参数错误 -商户未开通,或者已停用 **/ + public static Int ERROR_MER = new Int(701, "商户或者秘钥不正确,或者已停用"); + + /** 商户单号错误,单号必须大于0 **/ + public static Int ERROR_OUT_ID = new Int(702, "商户单号错误,单号必须大于0"); + + /** 商户订单信息错误,订单信息不能为空且,不能超过200个字符 **/ + public static Int ERROR_ORD_TEXT = new Int(703, "订单信息错误,订单信息不能为空且,不能超过200个字符"); + + /** 商户 用户手机参数错误 不能为空且不能超过20个字符 **/ + public static Int ERROR_USER_MOBILE = new Int(704, "用户手机参数错误 不能为空且不能超过20个字符"); + + /** 商户 稿件参数错误 不支持的稿件类型 **/ + public static Int ERROR_DRAFT_TYPE = new Int(705, "不支持的稿件类型"); + + /** 商户 设计参数错误 不支持的设计类型 **/ + public static Int ERROR_DESIGN_TYPE = new Int(706, "不支持的设计类型"); + + /** 商户 行业参数错误 不支持的行业 **/ + public static Int ERROR_INDUSTRY = new Int(707, "不支持的行业"); + + /** 商户 尺寸参数错误 不支持的设计尺寸 **/ + public static Int ERROR_SIZE = new Int(708, "不支持的设计尺寸"); + + /** 商户 面数参数错误 面数必须大于0 **/ + public static Int ERROR_PAGE_LE_ZERO = new Int(709, "面数参数错误, 必须大于0"); + + /** 商户 款模参数错误 款数/模数错误, 必须大于0 **/ + public static Int ERROR_KS_MS_LE_ZERO = new Int(710, "款数、模数错误, 必须大于0"); + + public static Int ERROR_TO_LONG = new Int(711, "数据内容过长"); + + /*** 参数内容过长 指定字段 构造内容过长信息 */ + public static Int ERROR_TO_LONG(String fieldName) + { + return ERROR_TO_LONG(fieldName, 0); + } + + /*** 参数内容过长 指定字段 构造内容过长信息和字数信息 */ + public static Int ERROR_TO_LONG(String fieldName, int maxLen) + { + return new Int(ERROR_TO_LONG.value(), (Validates.isEmptyBlank(fieldName) ? "" : "[" + Strings.trim(fieldName) + "]") + ERROR_TO_LONG.desc() + + (maxLen > 0 ? (Validates.isNotEmptyBlank(fieldName) ? ",数据不能超过" + maxLen + "个字符" : "") : "")); + } + + /** 商户 订单已存在 **/ + public static Int ERROR_ORD_EXSISTS = new Int(712, "订单已存在"); + + /** 商户 订单不存在 **/ + public static Int ERROR_ORD_NOT_EXSISTS = new Int(713, "订单不存在"); + + /** 文件URL地址 错误 没有后缀名, **/ + public static Int ERROR_FILE_URL = new Int(714, "文件URL地址错误! "); + + /** 商户 取消原因,设计重印原因,拒绝退款原因 原因不能为空且不能超过200个字符 **/ + public static Int ERROR_REASON = new Int(715, "原因不能为空且不能超过200个字符"); + + /** 商户操作设计订单, 由于状态 原因 被拒绝 **/ + public static Int ERROR_BY_STATUS = new Int(716, "当前订单状态,不允许该项操作"); + + /** 滞留单处理人不能为空 **/ + public static Int RETENTI_DEAL_NAME = new Int(717, "滞留单处理人不能为空"); + + /** 修改信息失败 */ + public static Int ERROR_UPDATE_INFO = new Int(718, "修改信息失败"); + + /** 商户操作订单,由于稿件类型 原因 被拒绝 */ + public static Int ERROR_NONSUPPORT_DRAFT_TYPE = new Int(719, "不支持操作的稿件类型"); + + /** 催稿太频繁 被拒绝 */ + public static Int ERROR_REMINDER_TOO = new Int(720, "催稿太频繁,请稍后操作"); + + /** 设计师不在线 */ + public static Int ERROR_DESIGNER_OFF_LINE = new Int(721, "设计师不在线"); + + /** 订单已分派设计师 */ + public static Int ERROR_ORDER_EXIST_DESIGNER = new Int(722, "订单已分派设计师"); + + /** 印前改稿组织负责人未配置 */ + public static Int ERROR_ORG_MANAGE_IS_NULL = new Int(723, "印前改稿组织负责人未配置"); + + /** 订单状态:请求退款不能强制取消 */ + public static Int ERROR_ORD_STATUS_IS_NOTBE34 = new Int(724, "请求退款状态不允许取消"); + +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/rmi/erp/ErpRmiService.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/rmi/erp/ErpRmiService.java new file mode 100644 index 0000000..51a162b --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/rmi/erp/ErpRmiService.java @@ -0,0 +1,420 @@ +/** + * 扬彩印刷设计 + * 文件名 :ErpRmiService.java + * 创建人 :gjx + * 创建时间:2019-11-7 + */ + +package com.zhiqim.yangcai.design.rmi.erp; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.json.JSONObject; +import org.zhiqim.kernel.httpclient.HttpRMI; +import org.zhiqim.kernel.httpclient.HttpResult; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.kernel.util.Strings; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.manager.dbo.ZmrParam; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.model.StatSelfdraftDayModel; +import com.zhiqim.yangcai.design.model.StatSelfraftListingModel; +import com.zhiqim.yangcai.design.rmi.module.RmiResult; + +/** + * [简要描述]ERP RMI接口类:
            + * [详细描述]:
            + * + * @version 1.0 @author gjx 2019-11-7 新建与整理 + */ +public class ErpRmiService +{ + private static final Log log = LogFactory.getLog(ErpRmiService.class); + + /** + * + * [简要描述]RMI 远程调用参数初始化:
            + * [详细描述]:
            + * + * @author gjx + * @param className 类名 + * @param methodName 方法名 + * @return + * @throws Exception + */ + private static HttpRMI getClient(String className, String methodName) throws Exception + { + + // //接口主机 + ZmrParam designHost = ORM.get(ZTable.class).item(ZmrParam.class, new Selector("paramGroup", "yangcai.erp").addMust("paramKey", "erpHost")); + if (designHost == null) + { + throw new Exception("ERP【主机地址】参数未配置"); + } + + // rmi key + ZmrParam rmiKey = ORM.get(ZTable.class).item(ZmrParam.class, new Selector("paramGroup", "yangcai.erp").addMust("paramKey", "rmiKey")); + ZmrParam rmiSecret = ORM.get(ZTable.class).item(ZmrParam.class, new Selector("paramGroup", "yangcai.erp").addMust("paramKey", "rmiSecret")); + + if (rmiKey == null || rmiSecret == null || Validates.isEmptyBlank(rmiKey.getParamValue()) || Validates.isEmptyBlank(rmiSecret.getParamValue())) + { + throw new Exception("ERP【RMI】参数未配置"); + } + + String url = designHost.getParamValue(); + url = Strings.endsWith(url, "/service/rmi") ? url : Strings.addEndsWith(Strings.trimRight(url, "/"), "/service/rmi"); + HttpRMI client = new HttpRMI(url); + + client.setConnectTimeout(10); + client.setReadTimeout(30 * 60); + client.setKeySecret(rmiKey.getParamValue(), rmiSecret.getParamValue()); + client.setClassName(className); + client.setMethodName(methodName); + return client; + } + + /** + * + * [简要描述]:
            + * [详细描述]:
            + * + * @author gjx + * @param deptId 部门id + * @return + * @throws Exception + */ + public static Map doQueryPrdFeePercentageInfo(long deptId) throws Exception + { + HttpRMI rmi = getClient("ErpRmiServer", "doQueryPrdFeePercentageInfo"); + rmi.addParam("deptId", deptId); + rmi.execute(); + + Map map = new HashMap(); + HttpResult result = rmi.getResult(); + if (!result.isSuccess()) + { + throw new Exception("Rmi 查询部门提成系数信息失败:" + result.getResponseText()); + } + // 非通信问题 + RmiResult rmiResult = Jsons.toObject(result.getResponseText(), RmiResult.class); + if (!rmiResult.isSuccess()) + { + log.error("Rmi 查询部门提成系数信息失败:" + rmiResult); + throw new Exception(rmiResult.toString()); + } + + JSONObject obj = new JSONObject(rmiResult.getResultText()); + map.put("fee", obj.get("fee").toString()); + return map; + } + + /** + * + * [简要描述]根据订单号查询产品信息:
            + * [详细描述]:
            + * + * @author gjx + * @param prdId 产品类型id + * @throws Exception + */ + public static Map doQueryOrderProductInfo(long designId) throws Exception + { + HttpRMI rmi = getClient("ErpRmiServer", "doQueryOrderProductInfo"); + rmi.addParam("designId", designId); + rmi.execute(); + + Map map = new HashMap(); + HttpResult result = rmi.getResult(); + if (!result.isSuccess()) + { + throw new Exception("Rmi 查询产品信息失败:" + result.getResponseText()); + } + // 非通信问题 + RmiResult rmiResult = Jsons.toObject(result.getResponseText(), RmiResult.class); + if (!rmiResult.isSuccess()) + { + log.error("Rmi 查询产品信息失败:" + rmiResult); + throw new Exception(rmiResult.toString()); + } + + JSONObject obj = new JSONObject(rmiResult.getResultText()); + map.put("product", obj.get("product").toString()); + map.put("number", obj.get("number").toString()); + return map; + } + + /** + * + * [简要描述] 修改淘宝订单旗帜:
            + * [详细描述]:
            + * + * @author gjx + * @param sellerNick 店铺名称 + * @param tid 淘宝交易id + * @param flag 旗帜标记 + * @param memo 描述 + * @return + * @throws Exception + */ + public static boolean doUpdateTaobaoOrderFlag(String sellerNick, String tid, int flag, String memo) throws Exception + { + HttpRMI rmi = getClient("ErpRmiServer", "doUpdateTaobaoOrderFlag"); + rmi.addParam("sellerNick", sellerNick); + rmi.addParam("tid", tid); + rmi.addParam("flag", flag); + rmi.addParam("memo", memo); + rmi.execute(); + + HttpResult result = rmi.getResult(); + if (!result.isSuccess()) + { + throw new Exception("Rmi 修改淘宝旗帜失败:" + result.getResponseText()); + } + // 非通信问题 + RmiResult rmiResult = Jsons.toObject(result.getResponseText(), RmiResult.class); + if (!rmiResult.isSuccess()) + { + log.error("Rmi 修改淘宝旗帜失败:" + rmiResult); + throw new Exception(rmiResult.toString()); + } + return true; + } + + /** + * + * [简要描述]审核退回补单直接取消:
            + * [详细描述]:
            + * + * @author gjx + * @param designId 设计订单id + * @param cancelName 取消人 + * @param cancelNote 取消原因 + * @return + * @throws Exception + */ + public static boolean doCheckBackCancelOrder(long designId, String cancelName, String cancelNote) throws Exception + { + HttpRMI rmi = getClient("ErpRmiServer", "doCheckBackCancelOrder"); + rmi.addParam("designId", designId); + rmi.addParam("cancelName", cancelName); + rmi.addParam("cancelNote", cancelNote); + rmi.execute(); + + HttpResult result = rmi.getResult(); + if (!result.isSuccess()) + { + throw new Exception("Rmi 取消订单失败:" + result.getResponseText()); + } + // 非通信问题 + RmiResult rmiResult = Jsons.toObject(result.getResponseText(), RmiResult.class); + if (!rmiResult.isSuccess()) + { + log.error("Rmi 取消订单失败:" + rmiResult); + throw new Exception(rmiResult.toString()); + } + return true; + } + + /** + * + * [简要描述]ERP订单快照日志表增加自来稿操作记录供报表使用:
            + * [详细描述]:
            + * + * @author gjx + * @param designId 订单id + * @param eventType 事件类型 + * @return + */ + public static boolean doOrdLogInsertSelfLogInfo(long designId, String eventType) throws Exception + { + HttpRMI rmi = getClient("ErpRmiServer", "doOrdLogInsertSelfLogInfo"); + rmi.addParam("designId", designId); + rmi.addParam("eventType", eventType); + rmi.execute(); + + HttpResult result = rmi.getResult(); + if (!result.isSuccess()) + { + throw new Exception("Rmi OrdLog日志快照表增加自来稿操作日志信息失败:" + result.getResponseText()); + } + // 非通信问题 + RmiResult rmiResult = Jsons.toObject(result.getResponseText(), RmiResult.class); + if (!rmiResult.isSuccess()) + { + log.error("Rmi OrdLog日志快照表增加自来稿操作日志信息失败:" + rmiResult); + throw new Exception(rmiResult.toString()); + } + return true; + } + + /** + * + * [简要描述]查询自来稿订单详情统计信息:
            + * [详细描述]:
            + * + * @author gjx + * @param dayCode 日期 yyyy-MM-dd + * @return + * @throws Exception + */ + public static List doStatSelfdraftDayInfo(String dayCode) throws Exception + { + HttpRMI rmi = getClient("ErpRmiServer", "doStatSelfdraftDayInfo"); + rmi.addParam("dayCode", dayCode); + rmi.execute(); + + HttpResult result = rmi.getResult(); + if (!result.isSuccess()) + { + throw new Exception("Rmi 查询自来稿订单详情统计信息失败:" + result.getResponseText()); + } + // 非通信问题 + RmiResult rmiResult = Jsons.toObject(result.getResponseText(), RmiResult.class); + if (!rmiResult.isSuccess()) + { + log.error("Rmi 查询自来稿订单详情统计信息失败:" + rmiResult); + throw new Exception(rmiResult.toString()); + } + + JSONObject obj = new JSONObject(rmiResult.getResultText()); + List statList = Jsons.toList(obj.get("selfDay").toString(), StatSelfdraftDayModel.class); + return statList; + } + + /** + * + * [简要描述]RMI 查询自来稿订单详情清单:
            + * [详细描述]:
            + * + * @author gjx + * @param dayCode 日期 yyyy-MM-dd + * @param operatorCode 操作员CODE + * @param statType 统计类型 + * @return + * @throws Exception + */ + public static List doSelfDraftOrderStatDetailInfo(String dayCode, String operatorCode, String statType) throws Exception + { + HttpRMI rmi = getClient("ErpRmiServer", "doSelfDraftOrderStatDetailInfo"); + rmi.addParam("dayCode", dayCode); + rmi.addParam("operatorCode", operatorCode); + rmi.addParam("statType", statType); + rmi.execute(); + + HttpResult result = rmi.getResult(); + if (!result.isSuccess()) + { + throw new Exception("Rmi 查询自来稿订单详情清单:" + result.getResponseText()); + } + // 非通信问题 + RmiResult rmiResult = Jsons.toObject(result.getResponseText(), RmiResult.class); + if (!rmiResult.isSuccess()) + { + log.error("Rmi 查询自来稿订单详情清单:" + rmiResult); + throw new Exception(rmiResult.toString()); + } + + JSONObject obj = new JSONObject(rmiResult.getResultText()); + List statList = Jsons.toList(obj.get("selfDetailDay").toString(), StatSelfraftListingModel.class); + return statList; + } + + /** + * + * [简要描述]添加订单的售后留言:
            + * [详细描述]:
            + * + * @author gjx + * @param designId 设计订单id + * @param cancelName 取消人 + * @param cancelNote 取消原因 + * @return + * @throws Exception + */ + public static boolean doAddAfterMessage(long oid, String creater, String createTime, String complainFlag, String note) throws Exception + { + HttpRMI rmi = getClient("ErpRmiServer", "doAddAfterMessage"); + rmi.addParam("oid", oid); + rmi.addParam("creater", creater); + rmi.addParam("createTime", createTime); + rmi.addParam("complainFlag", complainFlag); + rmi.addParam("note", note); + rmi.execute(); + + HttpResult result = rmi.getResult(); + if (!result.isSuccess()) + { + throw new Exception("Rmi 添加订单的售后留言失败:" + result.getResponseText()); + } + // 非通信问题 + RmiResult rmiResult = Jsons.toObject(result.getResponseText(), RmiResult.class); + if (!rmiResult.isSuccess()) + { + log.error("Rmi 加订单的售后留言失败:" + rmiResult); + throw new Exception(rmiResult.toString()); + } + return true; + } + + /** + * + * [简要描述]: ERP、设计平台同步更新进度备注
            + * [详细描述]:
            + * + * @author gjx + * @param designId + * @param noteJson + * @throws Exception + */ + public static void doOrdProgressNote(long designId, String noteJson) throws Exception + { + HttpRMI client = getClient("ErpRmiServer", "doOrdProgressNote"); + client.addParam("designId", designId); + client.addParam("noteJson", noteJson); + client.execute(); + + HttpResult result = client.getResult(); + if (!result.isSuccess()) + { + log.error("订单[" + designId + "]ERP同步更新进度备注失败"); + } + } + + public static boolean doSynOrder(long designId, String designer) throws Exception + { + HttpRMI client = getClient("ErpRmiServer", "doSynOrder"); + client.addParam("designId", designId); + client.addParam("designer", designer); + client.execute(); + + HttpResult result = client.getResult(); + if (!result.isSuccess()) + { + log.error("订单[" + designId + "]同步ERP状态:[请求退款]失败"); + return false; + } + return true; + } + + public static boolean doSynOrderCancel(long designId) throws Exception + { + HttpRMI client = getClient("ErpRmiServer", "doSynOrderCancel"); + client.addParam("designId", designId); + client.execute(); + + HttpResult result = client.getResult(); + if (!result.isSuccess()) + { + log.error("订单[" + designId + "]同步ERP状态:[已取消]失败"); + return false; + } + return true; + } +} \ No newline at end of file diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/rmi/module/DesignAttaModule.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/rmi/module/DesignAttaModule.java new file mode 100644 index 0000000..3905a09 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/rmi/module/DesignAttaModule.java @@ -0,0 +1,92 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.rmi.module; + +import org.zhiqim.kernel.json.Jsons; + + +/**** + * 文件对象 + * + * @version v1.0.0 @author longguizhi 2018-12-1 新建与整理 + */ +public class DesignAttaModule +{ + private long designId; //设计订单号 + private long attaId; //附件编号 + private String attaModule; //附件类型 + private String fileName; //文件名 + private long fileExt; //文件后缀名 + private long fileSize; //文件大小 + private String downUrl; //下载地址 + public long getDesignId() + { + return designId; + } + public void setDesignId(long designId) + { + this.designId = designId; + } + public long getAttaId() + { + return attaId; + } + public void setAttaId(long attaId) + { + this.attaId = attaId; + } + public String getAttaModule() + { + return attaModule; + } + public void setAttaModule(String attaModule) + { + this.attaModule = attaModule; + } + public String getFileName() + { + return fileName; + } + public void setFileName(String fileName) + { + this.fileName = fileName; + } + public long getFileExt() + { + return fileExt; + } + public void setFileExt(long fileExt) + { + this.fileExt = fileExt; + } + public long getFileSize() + { + return fileSize; + } + public void setFileSize(long fileSize) + { + this.fileSize = fileSize; + } + public String getDownUrl() + { + return downUrl; + } + public void setDownUrl(String downUrl) + { + this.downUrl = downUrl; + } + + public String toString() + { + return Jsons.toString(this); + } +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/rmi/module/OrderDesignerModule.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/rmi/module/OrderDesignerModule.java new file mode 100644 index 0000000..c630b02 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/rmi/module/OrderDesignerModule.java @@ -0,0 +1,69 @@ +package com.zhiqim.yangcai.design.rmi.module; + +import java.io.Serializable; + +/**** + * 订单设计师相关 + * + * @version v1.0.0 @author jiangbin 2020-5-7 新建与整理 + */ +public class OrderDesignerModule implements Serializable +{ + private static final long serialVersionUID = 1L; + + private long orderId;// 订单ID + private String designerCode;// 设计师code + private String designerName;// 设计师名称 + private long designerOrgId;// 设计师所属组织ID + private String designerOrgName;// 设计师所属组织名称 + + public long getOrderId() + { + return orderId; + } + + public void setOrderId(long orderId) + { + this.orderId = orderId; + } + + public String getDesignerCode() + { + return designerCode; + } + + public void setDesignerCode(String designerCode) + { + this.designerCode = designerCode; + } + + public String getDesignerName() + { + return designerName; + } + + public void setDesignerName(String designerName) + { + this.designerName = designerName; + } + + public long getDesignerOrgId() + { + return designerOrgId; + } + + public void setDesignerOrgId(long designerOrgId) + { + this.designerOrgId = designerOrgId; + } + + public String getDesignerOrgName() + { + return designerOrgName; + } + + public void setDesignerOrgName(String designerOrgName) + { + this.designerOrgName = designerOrgName; + } +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/rmi/module/RmiError.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/rmi/module/RmiError.java new file mode 100644 index 0000000..7e12f25 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/rmi/module/RmiError.java @@ -0,0 +1,45 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.rmi.module; + +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.kernel.util.consts.Int; + +public class RmiError +{ + private Int error; + public RmiError(Int error) + { + this.error = error; + } + + public RmiError(int error_code, String error_msg) + { + this.error = new Int(error_code, error_msg); + } + + public int getErrorCode() + { + return error.value(); + } + + public String getErrorMsg() + { + return error.desc(); + } + + public String toString() + { + return Jsons.toString("error_code", error.value(), "error_msg", error.desc()); + } + +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/rmi/module/RmiResult.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/rmi/module/RmiResult.java new file mode 100644 index 0000000..dbede27 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/rmi/module/RmiResult.java @@ -0,0 +1,85 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.rmi.module; + +import org.zhiqim.kernel.json.Jsons; + +/** + * Rmi 结果对象 + * + * @version v1.0.0 @author longguizhi 2018-9-14 新建与整理 + */ +public class RmiResult +{ + private int error_code; + private String error_msg; + private String resultText; + + public RmiResult(){} + + public RmiResult(String resultText) + { + this.resultText = resultText; + } + + public RmiResult(RmiError error) + { + this.error_code = error.getErrorCode(); + this.error_msg = error.getErrorMsg(); + } + + public RmiResult(int error_code, String error_msg) + { + this.error_code = error_code; + this.error_msg = error_msg; + } + + public int getError_code() + { + return error_code; + } + public void setError_code(int error_code) + { + this.error_code = error_code; + } + public String getError_msg() + { + return error_msg; + } + public void setError_msg(String error_msg) + { + this.error_msg = error_msg; + } + public String getResultText() + { + return resultText; + } + public void setResultText(String resultText) + { + this.resultText = resultText; + } + + public boolean isSuccess() + { + return error_code == 0; + } + + + public RmiError getError() + { + return isSuccess() ? null : new RmiError(error_code, error_msg); + } + public String toString() + { + return this.isSuccess() ? Jsons.toString("resultText", this.resultText) : this.getError().toString(); + } +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/service/ContendOrderService.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/service/ContendOrderService.java new file mode 100644 index 0000000..99e3ab6 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/service/ContendOrderService.java @@ -0,0 +1,565 @@ +package com.zhiqim.yangcai.design.service; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.ZView; +import org.zhiqim.orm.dbo.Selector; +import org.zhiqim.orm.dbo.Updater; + +import com.aliyun.oss.common.utils.StringUtils; +import com.zhiqim.yangcai.cache.DesignTypeCache; +import com.zhiqim.yangcai.design.constants.DraftConstants; +import com.zhiqim.yangcai.design.constants.StatusConstants; +import com.zhiqim.yangcai.design.dao.DispatchDao; +import com.zhiqim.yangcai.design.dbo.design.DesignerGroupDispatch; +import com.zhiqim.yangcai.design.dbo.design.DesignerGroupDispatchValue; +import com.zhiqim.yangcai.design.dbo.design.DesignerGroupValue; +import com.zhiqim.yangcai.design.dbo.design.DesignerGroupView; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; +import com.zhiqim.yangcai.design.dbo.profile.DesignerCourse; +import com.zhiqim.yangcai.util.ErpClassService; +import com.zhiqim.yangcai.util.ErpClassService.statusEnum; +import com.zhiqim.yangcai.util.RedisUtils; + +import redis.clients.jedis.Jedis; + +/** + * + * [简要描述]:抢单Service
            + * [详细描述]:
            + * + * @version 1.0 @author hc 2021年6月2日 新建与整理 + */ + +public class ContendOrderService +{ + private static final Log log = LogFactory.getLog(ContendOrderService.class); + + /** + * + * [简要描述]:是否有已完善个人信息
            + * [详细描述]:
            + * + * @author hc + * @param operatorCode + * @return + * @throws Exception + */ + public static boolean isOrderAuthority(String operatorCode) throws Exception + { + DesignerCourse designerCourseResult = ORM.get(ZTable.class).item(DesignerCourse.class, operatorCode); + if (designerCourseResult == null) + { + return false; + } + + return true; + } + + /** + * + * [简要描述]:是否有权限接受此单
            + * [详细描述]:
            + * + * @author hc + * @param designId + * @param operatorCode + * @param designerGroupDispatchResult + * @return + * @throws Exception + */ + public static Map isPassMuster(long designId, String operatorCode, DesignerGroupDispatch designerGroupDispatchResult) throws Exception + { + Map mapResult = new HashMap(); + + DesignerGroupView result = ORM.get(ZView.class).item(DesignerGroupView.class, new Selector().addMaybe("operatorCode", operatorCode)); + DesignOrder designOrderResult = ORM.get(ZTable.class).item(DesignOrder.class, new Selector().addMust("designId", designId)); + + // 是否有设计师组或设计师接单规则 + if (result == null) + { + // mapResult.put("nullError", "抱歉,无设计师组或无设计师接单规则,不能接此订单。"); + mapResult.put("nullError", "抱歉,您的等级暂时不匹配,不能接此订单。"); + log.error("设计师【" + operatorCode + "】抢单【" + designId + "】失败" + ":【无设计师组或无设计师接单规则】"); + return mapResult; + } + + // 订单信息是否为空 + if (designOrderResult == null) + { + // mapResult.put("nullError", "抱歉,无订单信息,不能接此订单。"); + mapResult.put("nullError", "抱歉,您的等级暂时不匹配,不能接此订单。"); + log.error("设计师【" + operatorCode + "】抢单【" + designId + "】失败" + ":【无订单信息】"); + return mapResult; + } + + // 是否有设计师接单规则 + if (designerGroupDispatchResult == null) + { + // mapResult.put("designerGroupError", "抱歉,无设计师接单规则,不能接此订单。"); + mapResult.put("nullError", "抱歉,您的等级暂时不匹配,不能接此订单。"); + log.error("设计师【" + operatorCode + "】抢单【" + designId + "】失败" + ":【无设计师接单规则】"); + return mapResult; + } + + // 是否支持优质订单 + boolean designHighQualityOrder = designOrderResult.isHighQualityOrder(); + if (designHighQualityOrder) + { + boolean groupHighQualityOrder = result.isHighQualityOrder(); + boolean designerHighQualityOrder = result.isDesignerHighQualityOrder(); + if (!groupHighQualityOrder && !designerHighQualityOrder) + { + // mapResult.put("highQualityOrderError", "抱歉,您不能接优质订单,不能接此订单。"); + mapResult.put("nullError", "抱歉,您的等级暂时不匹配,不能接此订单。"); + log.error("设计师【" + operatorCode + "】抢单【" + designId + "】失败" + ":【不能接优质订单】"); + return mapResult; + } + } + + // 是否支持加急订单 + boolean designUrgent = designOrderResult.isUrgent(); + if (designUrgent) + { + boolean groupUrgent = result.isUrgent(); + boolean designerUrgent = result.isDesignerUrgent(); + if (!groupUrgent && !designerUrgent) + { + // mapResult.put("urgentError", "抱歉,您不能接加急订单,不能接此订单。"); + mapResult.put("nullError", "抱歉,您的等级暂时不匹配,不能接此订单。"); + log.error("设计师【" + operatorCode + "】抢单【" + designId + "】失败" + ":【不能接加急订单】"); + return mapResult; + } + } + + // 是否支持大金额订单 + long designAmount = designOrderResult.getAmount(); + if (designAmount > 30000) + { + boolean groupLargeAmount = result.isLargeAmount(); + boolean designerLargeAmount = result.isDesignerLargeAmount(); + if (!groupLargeAmount && !designerLargeAmount) + { + // mapResult.put("amountError", "抱歉,您不能接大金额订单,不能接此订单。"); + mapResult.put("nullError", "抱歉,您的等级暂时不匹配,不能接此订单。"); + log.error("设计师【" + operatorCode + "】抢单【" + designId + "】失败" + ":【不能接大金额订单】"); + return mapResult; + } + } + + // 是否支持 仅设计订单 + boolean designOnlyDesign = designOrderResult.isOnlyDesign(); + if (designOnlyDesign) + { + boolean groupDesign = result.isDesign(); + boolean designerDesign = result.isDesignerDesign(); + if (!groupDesign && !designerDesign) + { + // mapResult.put("designError", "抱歉,您不能接仅设计订单,不能接此订单。"); + mapResult.put("nullError", "抱歉,您的等级暂时不匹配,不能接此订单。"); + log.error("设计师【" + operatorCode + "】抢单【" + designId + "】失败" + ":【不能接仅设计订单】"); + return mapResult; + } + } + + // 是否支持异形单 + if ((designOrderResult.getPrintWidth() > 0 || designOrderResult.getPrintHeight() > 0)) + { + if (!result.isSpecial() && !result.isDesignerSpecial()) + { + // mapResult.put("specialError", "抱歉,您不能接异形订单,不能接此订单。"); + mapResult.put("nullError", "抱歉,您的等级暂时不匹配,不能接此订单。"); + log.error("设计师【" + operatorCode + "】抢单【" + designId + "】失败" + ":【不能接异形订单】"); + return mapResult; + } + } + + // 未完成订单是否已满 + int orderNumber = DispatchDao.getUnCompleteOrderNumber(operatorCode); + if (result != null) + { + int maxOrderNum = result.getDesignerMaxOrderNum(); + if (maxOrderNum == 0) + { + maxOrderNum = result.getMaxOrderNum(); + } + if (orderNumber >= maxOrderNum) + { + mapResult.put("maxOrderNum", "你的未完成订单数量已满,请完成订单后再来抢单哦!"); + return mapResult; + } + } + + // 订单金额是否在接单金额规则内 + if (Validates.isNotEmpty(result) && Validates.isNotEmpty(designOrderResult)) + { + boolean groupFlag = false; + boolean flag = false; + + // 接单组规则 + if (designOrderResult.getAmount() > result.getMaxOrderAmount() || designOrderResult.getAmount() < result.getMinOrderAmount()) + { + groupFlag = true; + } + + // 设计师个人接单规则 + if (designOrderResult.getAmount() > designerGroupDispatchResult.getMaxOrderAmount() + || designOrderResult.getAmount() < designerGroupDispatchResult.getMinOrderAmount()) + { + flag = true; + } + + if (groupFlag && flag) + { + mapResult.put("nullError", "抱歉,您的等级暂时不匹配,不能接此订单。"); + log.error("设计师【" + operatorCode + "】抢单【" + designId + "】失败" + ":【可接订单金额不符合规则】"); + return mapResult; + } + } + + // 是否支持后加工类型 + String groupAfterNames = result.getAfterNames(); + String designAfterNames = designOrderResult.getAfterNames(); + String designerAfterNames = result.getDesignerAfterNames(); + String[] groupSplit = null; + String[] designSplit = null; + String[] designerSplit = null; + List designSplitList = null; + int size = 0; + if (designAfterNames != null) + { + if (groupAfterNames == null && designerAfterNames == null) + { + // mapResult.put("afterNamesError", "抱歉,您不支持此后加工类型,不能接此订单。"); + mapResult.put("nullError", "抱歉,您的等级暂时不匹配,不能接此订单。"); + log.error("设计师【" + operatorCode + "】抢单【" + designId + "】失败" + ":【不支持后加工类型】"); + return mapResult; + } + if (Validates.isNotEmpty(groupAfterNames)) + { + groupSplit = groupAfterNames.split(","); + } + if (Validates.isNotEmpty(designAfterNames)) + { + designSplit = designAfterNames.split(","); + + // Arrays.asList继承的AbstractList + // add,remove会出现java.lang.UnsupportedOperationException异常 + designSplitList = new ArrayList(Arrays.asList(designSplit)); + size = designSplitList.size(); + } + if (Validates.isNotEmpty(designerAfterNames)) + { + designerSplit = designerAfterNames.split(","); + } + int designSplitLength = 0; + int flagDesign = 0; + int flagDesigner = 0; + if (Validates.isNotEmpty(designSplit)) + { + designSplitLength = designSplit.length; + } + // 设计师组 后加工匹配 + if (Validates.isNotEmpty(designSplitList) && Validates.isNotEmpty(groupSplit)) + { + re: for (int i = 0; i <= size - 1; i++) + { + for (String groupAfterName : groupSplit) + { + if (designSplitList.isEmpty()) + { + break; + } + if (designSplitList.get(i).equals(groupAfterName)) + { + flagDesign++; + designSplitList.remove(i); + i--; + size--; + continue re; + } + } + } + } + // 设计师个人 后加工匹配 + if (Validates.isNotEmpty(designSplitList) && Validates.isNotEmpty(designerSplit)) + { + for (String designAfterName : designSplitList) + { + for (String designerAfterName : designerSplit) + { + if (designerAfterName.equals(designAfterName)) + { + flagDesigner++; + } + } + } + } + if (flagDesign != designSplitLength && flagDesigner != designSplitLength && (flagDesign + flagDesigner) != designSplitLength) + { + // mapResult.put("afterNamesError", "抱歉,您不支持此后加工类型,不能接此订单。"); + mapResult.put("nullError", "抱歉,您的等级暂时不匹配,不能接此订单。"); + log.error("设计师【" + operatorCode + "】抢单【" + designId + "】失败" + ":【不支持后加工类型】"); + return mapResult; + } + } + + // 是否支持稿件类型/产品 + // 设计师个人属性 + List designerGroupDispatchValueResult = ORM.get(ZTable.class).list(DesignerGroupDispatchValue.class, + new Selector().addMaybe("operatorCode", operatorCode).addMustNotEqual("relatedType", 5));// 排除免检产品 + // 设规则组属性 + long designerGroupId = designerGroupDispatchResult.getDesignerGroupId(); + List designerGroupValueList = ORM.get(ZTable.class).list(DesignerGroupValue.class, + new Selector().addMust("designerGroupId", designerGroupId)); + if (designerGroupDispatchValueResult == null && designerGroupValueList == null) + { + // mapResult.put("designerGroupError", "抱歉,规则组和设计师个人等级暂时不匹配,不能接此订单。"); + mapResult.put("nullError", "抱歉,您的等级暂时不匹配,不能接此订单。"); + log.error("设计师【" + operatorCode + "】抢单【" + designId + "】失败" + ":【不支持稿件类型/产品类型】"); + return mapResult; + } + + boolean draftTypes = ContendOrderService.isDraftTypes(designId, operatorCode, mapResult, designerGroupDispatchValueResult, designerGroupValueList, + designOrderResult); + if (!draftTypes) + { + // mapResult.put("designerGroupError", "抱歉,规则组和设计师个人等级暂时不匹配,不能接此订单。"); + mapResult.put("nullError", "抱歉,您的等级暂时不匹配,不能接此订单。"); + log.error("设计师【" + operatorCode + "】抢单【" + designId + "】失败" + ":【不支持稿件类型/产品类型】"); + return mapResult; + } + + // 是否支持订单渠道 + boolean ifRelevance = DispatchDao.ifRelevance(designOrderResult, operatorCode); + if (!ifRelevance) + { + mapResult.put("nullError", "抱歉,您的等级暂时不匹配,不能接此订单。"); + log.error("设计师【" + operatorCode + "】抢单【" + designId + "】失败" + ":【不支持该渠道订单】"); + return mapResult; + } + + mapResult.put("true", "通过"); + return mapResult; + + } + + /** + * + * [简要描述]:并发抢单处理
            + * [详细描述]:
            + * + * @author hc + * @param designId + * @param operatorCode + * @param designerGroupDispatchResult + * @return + */ + public static String isContendOrderSuccess(long designId, String operatorCode, DesignerGroupDispatch designerGroupDispatchResult) + { + Jedis jedis = RedisUtils.getConn(); + // 唯一key + String lockKey = "ContendOrder:" + designId + "_lock"; + String designIdString = designId + ""; + try + { + // 无则创建返回1,有则返回0 + Long setnx = jedis.setnx(lockKey, operatorCode); + if (setnx == 1) + { + // 过期时间 单位 秒 + jedis.expire(lockKey, 30); + } + if (setnx == 1) + { + // 模拟队列,左进右出 + jedis.lpush(designIdString, operatorCode); + String rpop = jedis.rpop(designIdString); + // 接受订单 + long orgId = designerGroupDispatchResult.getOrgId(); + Updater updater = new Updater(); + updater.addMust("designId", designId); + updater.addField("designer", rpop); + updater.addField("designReceiveTime", Sqls.nowTimestamp()); + updater.addField("designBeginTime", Sqls.nowTimestamp()); + updater.addField("receiveType", 0); + updater.addField("status", StatusConstants.ORDER_30.value()); + updater.addField("orgId", orgId); + updater.addField("orgReceiveTime", Sqls.nowTimestamp()); + ORM.get(ZTable.class).update(DesignOrder.class, updater); + Selector selelct = new Selector("designId", designId <= 0 ? 0 : designId); + DesignOrder order = ORM.get(ZTable.class).item(DesignOrder.class, selelct); + if (order != null && !StringUtils.isNullOrEmpty(order.getTids())) + { + new ErpClassService(order.getTids(), order.getDesigner(), statusEnum.TO_BE_DESIGNEDING.getCode()); + } + + // 更新未完成接单量 + DispatchDao.doUpdateDesignerOrderNum(rpop); + + return "success"; + } + } + catch (Exception e) + { + log.error("订单【" + designId + "】:抢单出现异常!", e); + return "error"; + } + finally + { + jedis.del(designIdString); + jedis.del(lockKey); + jedis.close(); + } + return "error"; + } + + // [简要描述]:是否支持稿件类型/产品 + public static boolean isDraftTypes(long designId, String operatorCode, Map mapResult, + List designerGroupDispatchValueResult, List designerGroupValueList, DesignOrder designOrderResult) + throws Exception + { + // 设计师组 稿件类型匹配 + boolean typeP = false; + int type = 0; + for (DesignerGroupValue relatedValue : designerGroupValueList) + { + if (Validates.isNotEmpty(relatedValue.getRelatedType())) + { + switch (relatedValue.getRelatedType()) + { + // case: 当前设计平台设计师组合设计师个人类型 0标准自来稿,1普通设计,2资深设计,4改稿自来稿 + // type: 原始ERP平台订单类型 0标准自来稿,1改稿自来稿,2普通设计,3资深设计 + case 0: + type = 0; + if (ContendOrderService.designerGroupDraftTypes(designId, operatorCode, type, designOrderResult, relatedValue)) + { + return true; + } + break; + case 1: + type = 2; + if (ContendOrderService.designerGroupDraftTypes(designId, operatorCode, type, designOrderResult, relatedValue)) + { + return true; + } + break; + case 2: + type = 3; + if (ContendOrderService.designerGroupDraftTypes(designId, operatorCode, type, designOrderResult, relatedValue)) + { + return true; + } + break; + case 4: + type = 1; + if (ContendOrderService.designerGroupDraftTypes(designId, operatorCode, type, designOrderResult, relatedValue)) + { + return true; + } + break; + } + } + typeP = true; + } + // 设计师个人 稿件类型匹配 + for (DesignerGroupDispatchValue relatedValue : designerGroupDispatchValueResult) + { + if (Validates.isNotEmpty(relatedValue.getRelatedType())) + { + switch (relatedValue.getRelatedType()) + { + // case: 当前设计平台设计师组合设计师个人类型 0标准自来稿,1普通设计,2资深设计,4改稿自来稿 + // type: 原始ERP平台订单类型 0标准自来稿,1改稿自来稿,2普通设计,3资深设计 + case 0: + type = 0; + if (ContendOrderService.designerDraftTypes(designId, operatorCode, type, designOrderResult, relatedValue)) + { + return true; + } + continue; + case 1: + type = 2; + if (ContendOrderService.designerDraftTypes(designId, operatorCode, type, designOrderResult, relatedValue)) + { + return true; + } + continue; + case 2: + type = 3; + if (ContendOrderService.designerDraftTypes(designId, operatorCode, type, designOrderResult, relatedValue)) + { + return true; + } + continue; + case 4: + type = 1; + if (ContendOrderService.designerDraftTypes(designId, operatorCode, type, designOrderResult, relatedValue)) + { + return true; + } + continue; + } + } + if (type == designOrderResult.getDraftType()) + { + if (designOrderResult.getTypeId() == relatedValue.getRelatedValue()) + { + return true; + } + } + typeP = true; + } + if (typeP) + { + return false; + } + + return false; + } + + // [简要描述]:是否支持稿件类型/产品 + public static boolean designerGroupDraftTypes(Long designId, String operatorCode, int type, DesignOrder designOrderResult, DesignerGroupValue relatedValue) + throws Exception + { + if (type == designOrderResult.getDraftType()) + { + if (designOrderResult.getTypeId() == relatedValue.getRelatedValue()) + { + return true; + } + log.error("设计师【" + operatorCode + "】抢单【" + designId + "】,设计师组类型:【" + DraftConstants.get(type) + ":" + + Global.get(DesignTypeCache.class).getName(designOrderResult.getTypeId()) + "】,订单稿件类型:【" + + Global.get(DesignTypeCache.class).getName(relatedValue.getRelatedValue()) + "】"); + } + return false; + } + + // [简要描述]:是否支持稿件类型/产品 + public static boolean designerDraftTypes(Long designId, String operatorCode, int type, DesignOrder designOrderResult, + DesignerGroupDispatchValue relatedValue) throws Exception + { + if (type == designOrderResult.getDraftType()) + { + if (designOrderResult.getTypeId() == relatedValue.getRelatedValue()) + { + return true; + } + log.error("设计师【" + operatorCode + "】抢单【" + designId + "】,设计师个人类型:【" + DraftConstants.get(type) + ":" + + Global.get(DesignTypeCache.class).getName(designOrderResult.getTypeId()) + "】,订单稿件类型:【" + + Global.get(DesignTypeCache.class).getName(relatedValue.getRelatedValue()) + "】"); + } + return false; + } +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/service/DesOnliceTimeLogCallable.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/service/DesOnliceTimeLogCallable.java new file mode 100644 index 0000000..87613da --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/service/DesOnliceTimeLogCallable.java @@ -0,0 +1,85 @@ +/** + * 扬彩印刷设计 + * 文件名 :DesOnliceTimeLogCallable.java + * 创建人 :gjx + * 创建时间:2020年9月3日 +*/ + +package com.zhiqim.yangcai.design.service; + +import java.sql.Timestamp; +import java.util.List; +import java.util.concurrent.Callable; + +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Sqls; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +import com.zhiqim.yangcai.design.dbo.dispatch.DesWorkSearchLog; +import com.zhiqim.yangcai.design.model.DesOnliceTimeLogModel; + +/** + * + * [简要描述]: 设计平台在线时长多线程实现方式业务逻辑类
            + * [详细描述]:
            + * + * @version 1.0 @author gjx 2020年9月4日 新建与整理 + */ +public class DesOnliceTimeLogCallable implements Callable +{ + private Selector selector = new Selector(); + + public DesOnliceTimeLogCallable(Selector selector) + { + this.selector = selector; + } + + @Override + public Object call() throws Exception + { + int onlineTime = 0; + List logList = ORM.get(ZTable.class).list(DesWorkSearchLog.class, selector); + DesOnliceTimeLogModel model = null; + Timestamp previousTime = null; + for (int i = 0; i < logList.size(); i++) + {// logType 1=开启接单,2=停止接单/退出浏览器 + DesWorkSearchLog log = logList.get(i); + Timestamp createTime = log.getCreateTime(); + String dayCode1 = DateTimes.toDateString(createTime); + int logType = log.getLogType(); + if (model == null) + { + model = new DesOnliceTimeLogModel(dayCode1, log.getOperatorCode()); + } + if (i == 0 && logType == 2) + {// 第一条日志为停止接单/退出浏览器 接单时间从0点算 + onlineTime += DateTimes.compareMinute(createTime, Sqls.toTimestamp(dayCode1, "00:00:00")); + continue; + } + + if (!DateTimes.getDateString().equals(dayCode1) && i == logList.size() - 1 && logType == 1) + {// 非当天最后一条日志为开启接单,停止接单时间为晚上12点 + onlineTime += DateTimes.compareMinute(Sqls.toTimestamp(dayCode1, "23:59:59"), createTime); + continue; + } + if (logType == 1) + { + previousTime = createTime; + } + if (logType == 2 && previousTime != null) + { + onlineTime += DateTimes.compareMinute(createTime, previousTime); + continue; + } + if (DateTimes.getDateString().equals(dayCode1) && logType == 1 && i == logList.size() - 1) + {// 当天最后一条日志为开启接单,取当前时间 + onlineTime += DateTimes.compareMinute(Sqls.nowTimestamp(), createTime); + continue; + } + } + model.setOnlineTime(onlineTime); + return model; + } +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/service/MediaDesignEmployee.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/service/MediaDesignEmployee.java new file mode 100644 index 0000000..4e698d3 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/service/MediaDesignEmployee.java @@ -0,0 +1,133 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.service; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.kernel.annotation.AnTransaction; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; + +import com.zhiqim.media.dbo.MediaCanvas; +import com.zhiqim.media.service.Employer; +import com.zhiqim.yangcai.design.dbo.template.MediaTemplate; +/** + * 素材保存回调实现类 + * @version v1.0.0 @author zhouwenbin 2017-10-26 新建与整理 + */ +public class MediaDesignEmployee implements Employer +{ + private final Log log = LogFactory.getLog(MediaDesignEmployee.class); + + @Override + @AnTransaction + public void execute(HttpRequest request, long mediaId, String param) + { + try + { + if (mediaId == -1) + { + log.error("回传参数异常:mediaId=" + mediaId + ",param=" + param); + return; + } + + MediaCanvas canvas = ORM.get(ZTable.class).item(MediaCanvas.class, mediaId); + if (canvas == null) + { + log.error("媒体画布查询不存在:mediaId=" + mediaId + ",param=" + param); + return; + } + + MediaTemplate template = ORM.get(ZTable.class).item(MediaTemplate.class, mediaId); + if (template == null) + {//新增 + if (Validates.isEmpty(param)) + { + log.error("新增模板时参数为空:mediaId=" + mediaId + ",param=" + param); + return; + } + +// long prdTypeId = Jsons.getLong(param, "prdTypeId"); +// long designTypeId = Jsons.getLong(param, "designTypeId"); +// int template_page = Jsons.getInt(param, "page"); +// String width_str = Jsons.getString(param, "width"); +// String height_str = Jsons.getString(param, "height"); +// +// if (!Validates.isFloat(width_str) || !Validates.isFloat(height_str)) +// { +// log.error("新增模板时,回传产品尺寸参数属性参数不正确:mediaId=" + mediaId + ",param=" + param); +// return; +// } +// +// double width = Double.valueOf(width_str); +// double height = Double.valueOf(height_str); +// +// if (width <= 0 || height <= 0) +// { +// log.error("新增模板时,回传产品尺寸参数属性参数不正确:mediaId=" + mediaId + ",param=" + param); +// return; +// } +// +// if(designTypeId <=0 || template_page <= 0) +// { +// log.error("新增模板时,回传产品属性参数不正确:mediaId=" + mediaId + ",param=" + param); +// return; +// } +// +// long industryId = Jsons.getLong(param, "industryId"); +// long worksId = Jsons.getLong(param, "worksId"); +// String designer = Jsons.getString(param, "designer"); +// if (Validates.isEmpty(designer)) +// { +// log.error("新增模板时,回传参数中缺少设计师字段:mediaId=" + mediaId + ",param=" + param); +// return; +// } +// +// //查询操作员属性 +// ZmrOperator operator = ORM.get(ZTable.class).item(ZmrOperator.class, new Selector("operatorCode", designer)); +// +// template = new MediaTemplate(); +// template.setMediaId(mediaId); +// template.setDesignTypeId(designTypeId); +// template.setPageValue(template_page); +// template.setMediaTemplateWidth(width); +// template.setMediaTemplateHeight(height); +// template.setTemplateType(10); +// template.setTemplateStatus(0); +// template.setDesigner(designer); +// template.setTemplateGroup(operator.getOperatorDeptAll()); +// +// if (industryId != -1) +// template.setIndustryId(industryId); +// +// +// ORM.get(ZTable.class).insert(template); + } + else + {//修改 +// Updater updater = new Updater(); +// updater.addMust("mediaId", mediaId); +// updater.addField("releaseStatus", 0); +// updater.addField("releaseTime", null); +// ORM.get(ZTable.class).update(MediaTemplate.class, updater); + } + } + catch (Exception e) + { + log.error("模板实现类异常:mediaId=" + mediaId + ",param=" + param, e); + } + + } + +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/stat/model/AfterStatisticModule.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/stat/model/AfterStatisticModule.java new file mode 100644 index 0000000..5a18783 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/stat/model/AfterStatisticModule.java @@ -0,0 +1,174 @@ +/* + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ + +package com.zhiqim.yangcai.design.stat.model; + +import java.util.ArrayList; +import java.util.List; + +import org.zhiqim.kernel.json.Jsons; + +import com.zhiqim.yangcai.design.constants.AfterConstants; +import com.zhiqim.yangcai.design.dbo.after.DesignAfterStatisticDetail; + +/**** + * 售后统计 module + * + * @version v1.0.0 @author lgz 2019-3-13 新建与整理 + */ +public class AfterStatisticModule implements Comparable +{ + private String afterBlamer;// 责任人 + private int afterCount;// 售后单数 + private double lostAmount;// 损失总金额 + private double compensateAmount;// 赔付金额 + private double lossAmountCanceled;// 已经取消&申请售后通过 的订单损失金额 + private long totalOrderAmount;// 订单金额 + private List afterDetail; + private List canceledDetail;// 申诉成功列表 + private String problemReason;// 问题原因 + private int orderEnds;// 定稿数 + private double afterRatio;// 售后率 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public String getAfterBlamer() + { + return afterBlamer; + } + + public void setAfterBlamer(String afterBlamer) + { + this.afterBlamer = afterBlamer; + } + + public int getAfterCount() + { + return afterCount; + } + + public double getLostAmount() + { + return lostAmount; + } + + public void setLostAmount(double lostAmount) + { + this.lostAmount = lostAmount; + } + + public double getLossAmountCanceled() + { + return lossAmountCanceled; + } + + public void setLossAmountCanceled(double lossAmountCanceled) + { + this.lossAmountCanceled = lossAmountCanceled; + } + + public double getTotalOrderAmount() + { + return totalOrderAmount; + } + + public void setTotalOrderAmount(long totalOrderAmount) + { + this.totalOrderAmount = totalOrderAmount; + } + + public List getAfterDetail() + { + return afterDetail; + } + + public List getCanceledDetail() + { + return canceledDetail; + } + + public AfterStatisticModule() + { + this.afterDetail = new ArrayList(); + this.canceledDetail = new ArrayList(); + } + + public void addAfterDetail(DesignAfterStatisticDetail detail) + { + this.afterDetail.add(detail); + if (detail.getAfterStatus() == AfterConstants.CS_F100.value() || detail.getAfterStatus() == AfterConstants.CS_F120.value()) + { + this.canceledDetail.add(detail); + this.lossAmountCanceled += detail.getLossAmount(); + } + + this.setAfterBlamer(detail.getAfterBlamer()); + this.afterCount++; + this.lostAmount += detail.getLossAmount(); + this.compensateAmount += detail.getCompensateAmount(); + this.totalOrderAmount += detail.getAmount(); + } + + public String getProblemReason() + { + return problemReason; + } + + public void setProblemReason(String problemReason) + { + this.problemReason = problemReason; + } + + public void setAfterCount(int afterCount) + { + this.afterCount = afterCount; + } + + public int getOrderEnds() + { + return orderEnds; + } + + public void setOrderEnds(int orderEnds) + { + this.orderEnds = orderEnds; + } + + public double getAfterRatio() + { + return afterRatio; + } + + public void setAfterRatio(double afterRatio) + { + this.afterRatio = afterRatio; + } + + @Override + public int compareTo(AfterStatisticModule o) + { + return this.afterCount - o.getAfterCount(); + } + + public double getCompensateAmount() + { + return compensateAmount; + } + + public void setCompensateAmount(double compensateAmount) + { + this.compensateAmount = compensateAmount; + } + +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/stat/model/DraftDayStatModel.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/stat/model/DraftDayStatModel.java new file mode 100644 index 0000000..8d74cf0 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/stat/model/DraftDayStatModel.java @@ -0,0 +1,100 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.stat.model; + +/** + * 初稿统计DTO + * + * @version v1.0.0 @author Deng 2017-6-16 新建与整理 + */ +public class DraftDayStatModel implements Comparable +{ + private String designName; // 1.设计师名称 + private double draftCount; // 2.初搞折算订单数 + private double draftTemplateCount; // 3.改稿自来稿初搞订单数 + private int draftOrderCount; // 4.初搞订单数 + private int endOrderCount; // 5.定稿订单数 + + public DraftDayStatModel(String designName, double draftCount, int draftOrderCount, int endOrderCount) + { + this.designName = designName; + this.draftCount = draftCount; + this.draftOrderCount = draftOrderCount; + this.endOrderCount = endOrderCount; + } + + public String getDesignName() + { + return designName; + } + + public void setDesignName(String designName) + { + this.designName = designName; + } + + public double getDraftCount() + { + return draftCount; + } + + public void setDraftCount(double draftCount) + { + this.draftCount = draftCount; + } + + public double getDraftTemplateCount() + { + return draftTemplateCount; + } + + public void setDraftTemplateCount(double draftTemplateCount) + { + this.draftTemplateCount = draftTemplateCount; + } + + public int getDraftOrderCount() + { + return draftOrderCount; + } + + public void setDraftOrderCount(int draftOrderCount) + { + this.draftOrderCount = draftOrderCount; + } + + public int getEndOrderCount() + { + return endOrderCount; + } + + public void setEndOrderCount(int endOrderCount) + { + this.endOrderCount = endOrderCount; + } + + @Override + public int compareTo(DraftDayStatModel o1) + { + if (o1.getDraftCount() > this.getDraftCount()) + { + return 1; + } + else if (o1.getDraftCount() < this.getDraftCount()) + { + return -1; + } + else + { + return 0; + } + } + +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/stat/model/DraftOrgTimelinessModel.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/stat/model/DraftOrgTimelinessModel.java new file mode 100644 index 0000000..97e2a63 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/stat/model/DraftOrgTimelinessModel.java @@ -0,0 +1,90 @@ +/** + * 扬彩印刷设计 + * 文件名 :DraftOrgTimelinessModel.java + * 创建人 :jiangbin + * 创建时间:2020-6-19 + */ +package com.zhiqim.yangcai.design.stat.model; + +import java.util.HashMap; + +/** + * 初稿时效统计Model(组织) + * + * @version v1.0.0 @author jiangbin 2020-6-19 新建与整理 + */ +public class DraftOrgTimelinessModel +{ + private long orgId;// 组织ID + private String orgName; // 组织名称 + private int allCount; // 总数量 + private int allTime; // 总耗时 + private HashMap numberMap = new HashMap(); // <产品类型, 数量> + private HashMap timeMap = new HashMap(); // <产品类型, 总耗时(分钟)> + + public DraftOrgTimelinessModel(long orgId, String orgName) + { + this.orgId = orgId; + this.orgName = orgName; + } + + public long getOrgId() + { + return orgId; + } + + public void setOrgId(long orgId) + { + this.orgId = orgId; + } + + public String getOrgName() + { + return orgName; + } + + public void setOrgName(String orgName) + { + this.orgName = orgName; + } + + public int getAllCount() + { + return allCount; + } + + public void setAllCount(int allCount) + { + this.allCount = allCount; + } + + public int getAllTime() + { + return allTime; + } + + public void setAllTime(int allTime) + { + this.allTime = allTime; + } + + public HashMap getNumberMap() + { + return numberMap; + } + + public void setNumberMap(HashMap numberMap) + { + this.numberMap = numberMap; + } + + public HashMap getTimeMap() + { + return timeMap; + } + + public void setTimeMap(HashMap timeMap) + { + this.timeMap = timeMap; + } +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/stat/model/DraftStatusOrderStatModel.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/stat/model/DraftStatusOrderStatModel.java new file mode 100644 index 0000000..7111f02 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/stat/model/DraftStatusOrderStatModel.java @@ -0,0 +1,78 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.stat.model; + +public class DraftStatusOrderStatModel +{ + private String designer; // 设计师 + private int sumCount; // 总初搞订单数 + private int dayCount; // 48小时内 + private int weekCount; // 3-7天内 + private int monthCount; // 8-30天内 + private int otherCount; // 30天以上 + + public DraftStatusOrderStatModel(String designer) + { + this.designer = designer; + this.sumCount = 0; + this.dayCount = 0; + this.weekCount = 0; + this.monthCount = 0; + this.otherCount = 0; + } + + public String getDesigner() + { + return designer; + } + public int getSumCount() + { + return sumCount; + } + public void setSumCount(int sumCount) + { + this.sumCount = sumCount; + } + public int getDayCount() + { + return dayCount; + } + public void setDayCount(int dayCount) + { + this.dayCount = dayCount; + } + public int getWeekCount() + { + return weekCount; + } + public void setWeekCount(int weekCount) + { + this.weekCount = weekCount; + } + public int getMonthCount() + { + return monthCount; + } + public void setMonthCount(int monthCount) + { + this.monthCount = monthCount; + } + public int getOtherCount() + { + return otherCount; + } + public void setOtherCount(int otherCount) + { + this.otherCount = otherCount; + } + +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/stat/model/DraftTimelinessModel.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/stat/model/DraftTimelinessModel.java new file mode 100644 index 0000000..ae8c0c0 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/stat/model/DraftTimelinessModel.java @@ -0,0 +1,73 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.stat.model; + +import java.util.HashMap; + +/** + * 初稿时效统计 + * @version v1.0.0 @author zzy 2017-10-25 新建与整理 + */ +public class DraftTimelinessModel +{ + private String designer; //设计师名称 + private int allCount; //总数量 + private int allTime; //总耗时 + private HashMap numberMap = new HashMap(); //<产品类型, 数量> + private HashMap timeMap = new HashMap(); //<产品类型, 总耗时(分钟)> + + public DraftTimelinessModel(String designer) + { + this.designer = designer; + } + + public String getDesigner() + { + return designer; + } + public void setDesigner(String designer) + { + this.designer = designer; + } + public int getAllCount() + { + return allCount; + } + public void setAllCount(int allCount) + { + this.allCount = allCount; + } + public int getAllTime() + { + return allTime; + } + public void setAllTime(int allTime) + { + this.allTime = allTime; + } + public HashMap getNumberMap() + { + return numberMap; + } + public void setNumberMap(HashMap numberMap) + { + this.numberMap = numberMap; + } + public HashMap getTimeMap() + { + return timeMap; + } + public void setTimeMap(HashMap timeMap) + { + this.timeMap = timeMap; + } +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/stat/model/DraftTypeTimelinessModel.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/stat/model/DraftTypeTimelinessModel.java new file mode 100644 index 0000000..a3f3a68 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/stat/model/DraftTypeTimelinessModel.java @@ -0,0 +1,56 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.stat.model; + + +/** + * 初稿订单类型时效统计 + * @version v1.0.0 @author zzy 2017-10-25 新建与整理 + */ +public class DraftTypeTimelinessModel +{ + private long typeId; //类型编号 + private int count; //数量 + private int time; //耗时 + + public DraftTypeTimelinessModel(long typeId) + { + this.typeId = typeId; + } + + public long getTypeId() + { + return typeId; + } + public void setTypeId(long typeId) + { + this.typeId = typeId; + } + public int getCount() + { + return count; + } + public void setCount(int count) + { + this.count = count; + } + public int getTime() + { + return time; + } + public void setTime(int time) + { + this.time = time; + } + + +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/stat/model/OrderCountStatModel.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/stat/model/OrderCountStatModel.java new file mode 100644 index 0000000..e0e26b3 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/stat/model/OrderCountStatModel.java @@ -0,0 +1,70 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.stat.model; + +import java.util.HashMap; +import java.util.Map; + +/** + * 订单数量统计MODEL + * + * @version v1.0.0 @author zzy 2018-6-29 新建与整理 + */ +public class OrderCountStatModel +{ + private String date; //日期 + private int sumCount; //总订单数 + private int elseCount; //其他订单数 + private Map typeMap; //<类型|数量> + + public OrderCountStatModel(String date) + { + this.date = date; + this.sumCount = 0; + this.elseCount = 0; + this.typeMap = new HashMap(); + } + + public String getDate() + { + return date; + } + public void setDate(String date) + { + this.date = date; + } + public int getSumCount() + { + return sumCount; + } + public void setSumCount(int sumCount) + { + this.sumCount = sumCount; + } + public int getElseCount() + { + return elseCount; + } + public void setElseCount(int elseCount) + { + this.elseCount = elseCount; + } + public Map getTypeMap() + { + return typeMap; + } + public void setTypeMap(Map typeMap) + { + this.typeMap = typeMap; + } + +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/stat/model/PrdFeePercentageModel.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/stat/model/PrdFeePercentageModel.java new file mode 100644 index 0000000..605d466 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/stat/model/PrdFeePercentageModel.java @@ -0,0 +1,127 @@ +/* + * 版权所有 (C) 2015 知启蒙(WWW.ZHIQIM.COM) 保留所有权利。 + * + * Download http://www.zhiqim.com/fadfox/ 欢迎加盟[凡狐]兴趣小组。 + * + * 由数据库字典自动生成的类文件,修改请使用数据库字典编辑器修改。 + */ +package com.zhiqim.yangcai.design.stat.model; + +import java.io.Serializable; + +import org.zhiqim.kernel.json.Jsons; + +/** + * 产品提成系数表 对应erp的表《PRD_FEE_PERCENTAGE》 + */ +public class PrdFeePercentageModel implements Serializable +{ + private static final long serialVersionUID = 1L; + + private long deptId; // 1.部门ID + private long prdTypeId; // 2.产品类型 + private int feeValid; // 3.规定时间,单位分钟 + private int feeHigh; // 4.高提成,单位‰(千分制) + private int feeLow; // 5.低提成,单位‰(千分制) + private int feeDisabled; // 6.失效时间,单位分钟 + private int feeType; // 7.计费类型,0:按单量,1:按比例, + private long feeDiscountAmount; // 8.折算金额,单位分 + private int feeDiscountMethod; // 9.折算方式,0:不启用,1:金额,2:系数 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public long getDeptId() + { + return deptId; + } + + public void setDeptId(long deptId) + { + this.deptId = deptId; + } + + public long getPrdTypeId() + { + return prdTypeId; + } + + public void setPrdTypeId(long prdTypeId) + { + this.prdTypeId = prdTypeId; + } + + public int getFeeValid() + { + return feeValid; + } + + public void setFeeValid(int feeValid) + { + this.feeValid = feeValid; + } + + public int getFeeHigh() + { + return feeHigh; + } + + public void setFeeHigh(int feeHigh) + { + this.feeHigh = feeHigh; + } + + public int getFeeLow() + { + return feeLow; + } + + public void setFeeLow(int feeLow) + { + this.feeLow = feeLow; + } + + public int getFeeDisabled() + { + return feeDisabled; + } + + public void setFeeDisabled(int feeDisabled) + { + this.feeDisabled = feeDisabled; + } + + public int getFeeType() + { + return feeType; + } + + public void setFeeType(int feeType) + { + this.feeType = feeType; + } + + public long getFeeDiscountAmount() + { + return feeDiscountAmount; + } + + public void setFeeDiscountAmount(long feeDiscountAmount) + { + this.feeDiscountAmount = feeDiscountAmount; + } + + public int getFeeDiscountMethod() + { + return feeDiscountMethod; + } + + public void setFeeDiscountMethod(int feeDiscountMethod) + { + this.feeDiscountMethod = feeDiscountMethod; + } + +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/stat/model/PrdTypeModel.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/stat/model/PrdTypeModel.java new file mode 100644 index 0000000..9086dc7 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/stat/model/PrdTypeModel.java @@ -0,0 +1,116 @@ +/* + * 版权所有 (C) 2015 知启蒙(WWW.ZHIQIM.COM) 保留所有权利。 + * + * Download http://www.zhiqim.com/fadfox/ 欢迎加盟[凡狐]兴趣小组。 + * + * 由数据库字典自动生成的类文件,修改请使用数据库字典编辑器修改。 + */ +package com.zhiqim.yangcai.design.stat.model; + +import java.io.Serializable; + +import org.zhiqim.kernel.json.Jsons; + +/** + * 产品类型表 对应erp的表《PRD_TYPE》 + */ +public class PrdTypeModel implements Serializable +{ + private static final long serialVersionUID = 1L; + + private long prdTypeId; // 1.产品类型 + private String prdTypeName; // 2.分类名称 + private long prdTypeUrgentFee; // 3.分类 加急费 + private int prdTypeStatus; // 4.分类状态 0:正常,1:停用 + private String prdPolicyIds; // 5.产品类型支持的后加工策略,多个逗号分隔 + private int prdEffectiveTime; // 6.时效 + private int prdTypeSeq; // 7.序号 + private long designType; // 8.设计类型编号 + + @Override + public String toString() + { + return Jsons.toString(this); + } + + public long getPrdTypeId() + { + return prdTypeId; + } + + public void setPrdTypeId(long prdTypeId) + { + this.prdTypeId = prdTypeId; + } + + public String getPrdTypeName() + { + return prdTypeName; + } + + public void setPrdTypeName(String prdTypeName) + { + this.prdTypeName = prdTypeName; + } + + public long getPrdTypeUrgentFee() + { + return prdTypeUrgentFee; + } + + public void setPrdTypeUrgentFee(long prdTypeUrgentFee) + { + this.prdTypeUrgentFee = prdTypeUrgentFee; + } + + public int getPrdTypeStatus() + { + return prdTypeStatus; + } + + public void setPrdTypeStatus(int prdTypeStatus) + { + this.prdTypeStatus = prdTypeStatus; + } + + public String getPrdPolicyIds() + { + return prdPolicyIds; + } + + public void setPrdPolicyIds(String prdPolicyIds) + { + this.prdPolicyIds = prdPolicyIds; + } + + public int getPrdEffectiveTime() + { + return prdEffectiveTime; + } + + public void setPrdEffectiveTime(int prdEffectiveTime) + { + this.prdEffectiveTime = prdEffectiveTime; + } + + public int getPrdTypeSeq() + { + return prdTypeSeq; + } + + public void setPrdTypeSeq(int prdTypeSeq) + { + this.prdTypeSeq = prdTypeSeq; + } + + public long getDesignType() + { + return designType; + } + + public void setDesignType(long designType) + { + this.designType = designType; + } + +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/stat/model/QcPerformanceStatModel.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/stat/model/QcPerformanceStatModel.java new file mode 100644 index 0000000..e7f4bd1 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/stat/model/QcPerformanceStatModel.java @@ -0,0 +1,49 @@ +package com.zhiqim.yangcai.design.stat.model; + +/** + * 质检统计model + * + * @version v1.0.0 @author liuhu 2019-1-28 新建与整理 + */ +public class QcPerformanceStatModel +{ + private String designer; // 设计师 + private double punishScore; // 扣罚分数 + private double rewardScore; // 奖励分数 + + public QcPerformanceStatModel(String designer) + { + this.designer = designer; + } + + public String getDesigner() + { + return designer; + } + + public void setDesigner(String designer) + { + this.designer = designer; + } + + public double getPunishScore() + { + return punishScore; + } + + public void setPunishScore(double punishScore) + { + this.punishScore = punishScore; + } + + public double getRewardScore() + { + return rewardScore; + } + + public void setRewardScore(double rewardScore) + { + this.rewardScore = rewardScore; + } + +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/stat/model/RefundRateModel.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/stat/model/RefundRateModel.java new file mode 100644 index 0000000..2a23930 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/stat/model/RefundRateModel.java @@ -0,0 +1,135 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.design.stat.model; + +/** + * 退款率MODEL + * + * @version v1.0.0 @author zzy 2018-6-29 新建与整理 + */ +public class RefundRateModel implements Comparable +{ + private String designer; // 设计师 + private long industryId; // 行业编号 + private int refundCount; // 退款单数 + private int sumCount; // 设计单数 + private long finalizeMoneySum; // 设计单金额 + private long refundRate; // 退款率 + private long refundMoneySum; // 退款单金额 + private long amount; // 奖罚金额 + + public RefundRateModel(String designer) + { + this.designer = designer; + this.industryId = 0; + this.refundCount = 0; + this.sumCount = 0; + this.refundMoneySum = 0; + this.finalizeMoneySum = 0; + } + + public RefundRateModel(long industryId) + { + this.industryId = industryId; + this.refundCount = 0; + this.sumCount = 0; + this.refundMoneySum = 0; + this.finalizeMoneySum = 0; + } + + public String getDesigner() + { + return designer; + } + + public void setDesigner(String designer) + { + this.designer = designer; + } + + public long getIndustryId() + { + return industryId; + } + + public void setIndustryId(long industryId) + { + this.industryId = industryId; + } + + public int getRefundCount() + { + return refundCount; + } + + public void setRefundCount(int refundCount) + { + this.refundCount = refundCount; + } + + public int getSumCount() + { + return sumCount; + } + + public void setSumCount(int sumCount) + { + this.sumCount = sumCount; + } + + public long getRefundRate() + { + return refundRate; + } + + public void setRefundRate(long refundRate) + { + this.refundRate = refundRate; + } + + public long getAmount() + { + return amount; + } + + public void setAmount(long amount) + { + this.amount = amount; + } + + @Override + public int compareTo(RefundRateModel o) + { + return -(int) (this.refundRate - o.refundRate); + } + + public long getRefundMoneySum() + { + return refundMoneySum; + } + + public void setRefundMoneySum(long refundMoneySum) + { + this.refundMoneySum = refundMoneySum; + } + + public long getFinalizeMoneySum() + { + return finalizeMoneySum; + } + + public void setFinalizeMoneySum(long finalizeMoneySum) + { + this.finalizeMoneySum = finalizeMoneySum; + } + +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/stat/model/StatDesignModel.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/stat/model/StatDesignModel.java new file mode 100644 index 0000000..84a0e12 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/stat/model/StatDesignModel.java @@ -0,0 +1,126 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.design.stat.model; + +/** + * 设计师提成MODEL + * + * @version v1.0.0 @author Deng 2017-10-10 新建与整理 + */ +public class StatDesignModel +{ + private String operatorCode; // 1.设计师 + private long cardAmount; // 2.名片金额 + private long colorpageAmount; // 3.彩页金额 + private long stickAmount; // 4.不干胶金额 + private long albumAmount; // 5.画册金额 + private long rackAmount; // 6.展架金额 + private long penhuiAmount; // 7.喷会金额 + private long singleAmount; // 8.联单金额 + private long bannersAmount; // 9.条辐金额 + + public StatDesignModel(String operatorCode) + { + this.operatorCode = operatorCode; + } + + public String getOperatorCode() + { + return operatorCode; + } + + public void setOperatorCode(String operatorCode) + { + this.operatorCode = operatorCode; + } + + public long getCardAmount() + { + return cardAmount; + } + + public void setCardAmount(long cardAmount) + { + this.cardAmount = cardAmount; + } + + public long getColorpageAmount() + { + return colorpageAmount; + } + + public void setColorpageAmount(long colorpageAmount) + { + this.colorpageAmount = colorpageAmount; + } + + public long getStickAmount() + { + return stickAmount; + } + + public void setStickAmount(long stickAmount) + { + this.stickAmount = stickAmount; + } + + public long getAlbumAmount() + { + return albumAmount; + } + + public void setAlbumAmount(long albumAmount) + { + this.albumAmount = albumAmount; + } + + public long getRackAmount() + { + return rackAmount; + } + + public void setRackAmount(long rackAmount) + { + this.rackAmount = rackAmount; + } + + public long getPenhuiAmount() + { + return penhuiAmount; + } + + public void setPenhuiAmount(long penhuiAmount) + { + this.penhuiAmount = penhuiAmount; + } + + public long getSingleAmount() + { + return singleAmount; + } + + public void setSingleAmount(long singleAmount) + { + this.singleAmount = singleAmount; + } + + public long getBannersAmount() + { + return bannersAmount; + } + + public void setBannersAmount(long bannersAmount) + { + this.bannersAmount = bannersAmount; + } + +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/design/task/TempFileDeleteTask.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/task/TempFileDeleteTask.java new file mode 100644 index 0000000..c6c4e27 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/design/task/TempFileDeleteTask.java @@ -0,0 +1,117 @@ +package com.zhiqim.yangcai.design.task; + +import java.io.File; + +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.constants.SignConstants; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.kernel.schedule.Task; +import org.zhiqim.kernel.util.DateTimes; +import org.zhiqim.kernel.util.Files; +import org.zhiqim.kernel.util.Ints; +import org.zhiqim.kernel.util.Maths; +import org.zhiqim.kernel.util.Strings; + +import com.zhiqim.yangcai.design.presenter.UploadFilePresenter; + +/*** + * web服务临时文件删除任务,业务场景中触发添加到定时任务池,不需要单独运行 + * + * @version v1.0.0 @author longguizhi 2018-1-15 新建与整理 + */ +public class TempFileDeleteTask implements Task, SignConstants +{ + private static final Log log = LogFactory.getLog(TempFileDeleteTask.class); + + private static TempFileDeleteTask deleteTempFileTask; + private boolean isRunning = false; + + private TempFileDeleteTask() + { + } + + public static TempFileDeleteTask getInstance() + { + synchronized (TempFileDeleteTask.class) + { + if (deleteTempFileTask == null) + { + deleteTempFileTask = new TempFileDeleteTask(); + } + } + return deleteTempFileTask; + } + + public boolean isRunning() + { + return isRunning; + } + + public void setRunning(boolean isRunning) + { + this.isRunning = isRunning; + } + + @Override + public void execute() + { + log.info("临时文件删除任务执行开始..."); + long beginTime = System.currentTimeMillis(); + + int day = Global.getInt("project", "tempFileKeepDay", 0); + int currDate = Ints.toInt(DateTimes.getDateTime8String()); + + File tempRoot = new File(UploadFilePresenter.TEMP_FOLDER); + if (!tempRoot.exists()) + { + return; + } + + try + { + if (tempRoot.isFile()) + { + tempRoot.delete(); + return; + } + + if (tempRoot.isDirectory()) + { + File[] files = tempRoot.listFiles(); + if (null != files) + { + for (File file : files) + { + if (file.isDirectory()) + { + String fileName = file.getName(); + String fileDate = Strings.replace(fileName, UploadFilePresenter.TEMP_FOLDER, ""); + int tempFolderDate = Ints.toInt(fileDate); + if (day == 0) + { + Files.deleteDirectory(file); + } + else if (tempFolderDate < (currDate - day)) + { + Files.deleteDirectory(file); + } + } + else + { + file.delete(); + } + } + } + } + + } + catch (Exception e) + { + log.error("临时文件删除任务执行异常," + e.getMessage(), e); + } + + long endTime = System.currentTimeMillis(); + log.info("临时文件删除任务执行结束,共耗时[%s]秒", Maths.division((endTime - beginTime), 1000, 3)); + } +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/util/BusinessPlatformClientUtil.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/util/BusinessPlatformClientUtil.java new file mode 100644 index 0000000..2c5481b --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/util/BusinessPlatformClientUtil.java @@ -0,0 +1,429 @@ +/** + * 扬彩印刷设计 + * 文件名 :BusinessPlatformClientUtil.java + * 创建人 :caohong + * 创建时间:2019-12-03 + */ + +package com.zhiqim.yangcai.util; + +import java.util.HashMap; +import java.util.Map; +import java.util.TreeMap; + +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.entity.StringEntity; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClients; +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.extend.MapSO; +import org.zhiqim.kernel.extend.MapSS; +import org.zhiqim.kernel.httpclient.HttpGet; +import org.zhiqim.kernel.httpclient.HttpResult; +import org.zhiqim.kernel.json.Jsons; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.kernel.util.Urls; +import org.zhiqim.kernel.util.Validates; + +import com.alibaba.fastjson.JSONObject; +import com.zhiqim.yangcai.design.dbo.order.DesignAtta; +import com.zhiqim.yangcai.design.dbo.order.DesignOrder; + +/** + * + * 运营平台公共接口调用工具类 + * + * @version 1.0 @author caohong 2019-12-03 新建与整理 + */ +public class BusinessPlatformClientUtil +{ + private static final Log log = LogFactory.getLog(BusinessPlatformClientUtil.class); + + /** 运营平台网关URL地址 */ + public static final String GATE_WAY_URL = Global.getString("businessPlatform", "gatewayUrl"); + public static final String YZM_GATE_WAY_URL = Global.getString("businessPlatform", "yzmGatewayUrl"); + + /** + * [简要描述]:运营平台接口调用,POST接口
            + * + * @author caohong + * @param url 接口url + * @param paramMap 请求参数 + * @return {"code":0/1,"msg":"","data":object} + */ + public static String sendPost(String url, TreeMap paramMap) + { + /** + * String queryString = buildQueryString(paramMap); + * HttpPost conn = new HttpPost(url); + * conn.setQueryString(queryString, "UTF-8"); + * conn.setConnectTimeout(3); + * conn.setReadTimeout(6); + * conn.execute(); + * + * HttpResult result = conn.getResult(); + * int responseStatus = conn.getResponseStatus(); + * String responseText = conn.getResponseText(); + * + * if (!result.isSuccess()) + * { + * log.error("运营平台接口调用失败,[Rescode:" + responseStatus + " ][ResText:" + responseText + " ]"); + * log.error("接口调用URL:[" + url + "][Param:" + paramMap.toString() + "]"); + * } + * + * return responseText; + **/ + return ""; + } + + /** + * [简要描述]:请求参数拼接
            + * + * @author caohong + * @param paramMap 接口请求参数 + * @return url请求参数拼接 + */ + private static String buildQueryString(TreeMap paramMap) + { + StringBuffer strb = new StringBuffer(); + for (Map.Entry entry : paramMap.entrySet()) + { + String value = Urls.encodeUTF8(entry.getValue()); + strb.append("&").append(entry.getKey()).append("=").append(value); + } + + return strb.toString(); + } + + /** + * + * [简要描述]:获取运营平台接口设计平台访问token令牌
            + * + * @author caohong + * @return token + */ + public static String getAccessToken() + { + TreeMap paramMap = new TreeMap(); + String url = GATE_WAY_URL + "admin-auth/oauth/token"; + paramMap.put("username", ""); + paramMap.put("password", ""); + paramMap.put("grant_type", ""); + paramMap.put("scope", ""); + paramMap.put("client_id", ""); + paramMap.put("client_secret", ""); + + String access_token = ""; + String resultText = BusinessPlatformClientUtil.sendPost(url, paramMap); + MapSO map = Jsons.toMapSO(resultText); + if (Validates.isNotEmpty(map)) + { + access_token = String.valueOf(map.get("access_token")); + } + return access_token; + + } + + /** + * + * [简要描述]:获取运营平台数据字典配置数据
            + * + * @author gjx + * @param dicKeyCode 数据字典keyCode + * @param access_token token + * @return json + */ + public static String getDicKeyParamValue(String dicKeyCode, String access_token) + { + if (Validates.isEmpty(dicKeyCode) || Validates.isEmpty(Validates.isEmpty(access_token))) + { + throw new IllegalArgumentException("非法请求参数"); + } + + StringBuilder builder = new StringBuilder(BusinessPlatformClientUtil.GATE_WAY_URL + "api-admin-sys/dicvalue/list"); + builder.append("?dicKeyCode=" + dicKeyCode); + builder.append("&access_token=" + access_token); + + HttpGet get = new HttpGet(builder.toString()); + get.setConnectTimeout(3); + get.setReadTimeout(3); + get.execute(); + + HttpResult result = get.getResult(); + int responseStatus = result.getResponseStatus(); + String resultText = result.getResponseText(); + + if (!result.isSuccess()) + { + // log.error("获取运营平台数据字典配置数据失败,HttpCode[ " + responseStatus + " ]resText[" + resultText + // + " ]"); + } + + return resultText; + } + + /** + * + * [简要描述]:添加运营平台打标签的日志
            + * + * @author jiangbin + * @return boolean true:成功 false:失败 + */ + public static boolean addUserOrderTagLog(long designId, String wholeTag, String addUserName) + { + boolean flag = false; + TreeMap paramMap = new TreeMap(); + String access_token = getAccessToken(); + StringBuffer buffer = new StringBuffer(GATE_WAY_URL); + buffer.append("api-busi/userordertaglog/saveFromOthers?access_token="); + buffer.append(access_token); + paramMap.put("userOrderId", String.valueOf(designId)); + paramMap.put("wholeTag", wholeTag); + paramMap.put("operatorCode", addUserName); + String resultText = sendPost(buffer.toString(), paramMap); + log.info("订单[" + designId + "]增加标签日志:" + resultText); + MapSS resultMap = Jsons.toMapSS(resultText); + if (Validates.isNotEmpty(resultMap)) + { + if (resultMap.get("code") != null && "0".equals(resultMap.get("code"))) + { + flag = true; + } + } + return flag; + } + + /** + * + * [简要描述]:添加淘印通订单标签
            + * + * @author jiangbin + * @return boolean true:成功 false:失败 + */ + + public static boolean addUserOrderTag(long designId, long industryId, int consumerType, long subIndustryId, long applicationScenarioId, long designStyleId, + String operatorCode) + { + boolean flag = false; + TreeMap paramMap = new TreeMap(); + String access_token = getAccessToken(); + StringBuffer buffer = new StringBuffer(GATE_WAY_URL); + buffer.append("api-busi/userordertag/saveOrUpdateFromOthers?access_token="); + buffer.append(access_token); + paramMap.put("userOrderId", String.valueOf(designId)); + paramMap.put("industryId", String.valueOf(industryId)); + paramMap.put("consumerType", String.valueOf(consumerType)); + paramMap.put("subIndustryId", String.valueOf(subIndustryId)); + paramMap.put("applicationScenarioId", String.valueOf(applicationScenarioId)); + paramMap.put("designStyleId", String.valueOf(designStyleId)); + paramMap.put("operatorCode", operatorCode); + + String resultText = sendPost(buffer.toString(), paramMap); + log.info("订单[" + designId + "]增加标签:" + resultText); + MapSS resultMap = Jsons.toMapSS(resultText); + if (Validates.isNotEmpty(resultMap)) + { + if (resultMap.get("code") != null && "0".equals(resultMap.get("code"))) + { + flag = true; + } + } + return flag; + } + + /** + * + * [简要描述]: 运营平台同步订单设计进度备注
            + * [详细描述]:
            + * + * @author gjx + * @param designId + * @param reamrk + * @throws Exception + */ + public static void doOrdProgressNote(long designId, String reamrk) throws Exception + { + Map paramMap = new HashMap(); + paramMap.put("id", designId); + paramMap.put("progressNote", reamrk); + + String url = GATE_WAY_URL + "api-busi/order/update?access_token=" + getAccessToken(); + + // 创建默认的httpClient实例. + CloseableHttpClient httpclient = HttpClients.createDefault(); + + org.apache.http.client.methods.HttpPost httpPost = new org.apache.http.client.methods.HttpPost(url); + httpPost.setHeader("Content-Type", "application/json;charset=UTF-8"); + StringEntity s = new StringEntity(Jsons.toString(paramMap), "UTF-8"); + httpPost.setEntity(s); + + httpclient.execute(httpPost); + } + + /** + * + * [简要描述]: 运营平台同步状态
            + * [详细描述]:
            + * + * @author xiepan + * @param order + * @throws Exception + */ + public static boolean synStatus(DesignOrder order) throws Exception + { + String url = GATE_WAY_URL + "api-busi/order/synDesignOrderStatusApi?access_token=" + getAccessToken(); + + // 创建默认的httpClient实例. + CloseableHttpClient httpclient = HttpClients.createDefault(); + + org.apache.http.client.methods.HttpPost httpPost = new org.apache.http.client.methods.HttpPost(url); + httpPost.setHeader("Content-Type", "application/json;charset=UTF-8"); + StringEntity s = new StringEntity(JSONObject.toJSONString(order), "UTF-8"); + httpPost.setEntity(s); + CloseableHttpResponse response = httpclient.execute(httpPost); + int status = response.getStatusLine().getStatusCode(); + if (status != 200) + { + return false; + } + return true; + } + + /** + * + * [简要描述]:获取运营平台接口设计平台访问token令牌
            + * + * @author caohong + * @return token + */ + public static String getYzmAccessToken() + { + TreeMap paramMap = new TreeMap(); + String url = YZM_GATE_WAY_URL + "admin-auth/oauth/token"; + paramMap.put("username", ""); + paramMap.put("password", ""); + paramMap.put("grant_type", ""); + paramMap.put("scope", ""); + paramMap.put("client_id", ""); + paramMap.put("client_secret", ""); + + String access_token = ""; + String resultText = BusinessPlatformClientUtil.sendPost(url, paramMap); + MapSO map = Jsons.toMapSO(resultText); + if (Validates.isNotEmpty(map)) + { + access_token = String.valueOf(map.get("access_token")); + } + return access_token; + + } + + /** + * + * [简要描述]: 运营平台同步状态
            + * [详细描述]:
            + * + * @author zzq + * @param order + * @throws Exception + */ + public static boolean synOrderStatus(DesignOrder order) throws Exception + { + String url = YZM_GATE_WAY_URL + "api-busi/order/syncOrderStatusApi?access_token=" + getYzmAccessToken(); + + // 创建默认的httpClient实例. + CloseableHttpClient httpclient = HttpClients.createDefault(); + + org.apache.http.client.methods.HttpPost httpPost = new org.apache.http.client.methods.HttpPost(url); + httpPost.setHeader("Content-Type", "application/json;charset=UTF-8"); + StringEntity s = new StringEntity(JSONObject.toJSONString(order), "UTF-8"); + httpPost.setEntity(s); + CloseableHttpResponse response = httpclient.execute(httpPost); + int status = response.getStatusLine().getStatusCode(); + if (status != 200) + { + return false; + } + return true; + } + + /** + * + * [简要描述]: 运营平台同步设计师
            + * [详细描述]:
            + * + * @author zzq + * @param order + * @throws Exception + */ + public static boolean synOrderDesigner(DesignOrder order) throws Exception + { + String url = YZM_GATE_WAY_URL + "api-busi/order/syncOrderDesignerApi?access_token=" + getYzmAccessToken(); + + // 创建默认的httpClient实例. + CloseableHttpClient httpclient = HttpClients.createDefault(); + + org.apache.http.client.methods.HttpPost httpPost = new org.apache.http.client.methods.HttpPost(url); + httpPost.setHeader("Content-Type", "application/json;charset=UTF-8"); + StringEntity s = new StringEntity(JSONObject.toJSONString(order), "UTF-8"); + httpPost.setEntity(s); + CloseableHttpResponse response = httpclient.execute(httpPost); + int status = response.getStatusLine().getStatusCode(); + if (status != 200) + { + return false; + } + return true; + } + + /** + * + * [简要描述]: 运营平台同步文件
            + * [详细描述]:
            + * + * @author zzq + * @param order + * @throws Exception + */ + public static boolean synOrderAtta(DesignAtta designAtta) throws Exception + { + String url = YZM_GATE_WAY_URL + "api-busi/order/synOrderAttaApi?access_token=" + getYzmAccessToken(); + + // 创建默认的httpClient实例. + CloseableHttpClient httpclient = HttpClients.createDefault(); + + org.apache.http.client.methods.HttpPost httpPost = new org.apache.http.client.methods.HttpPost(url); + httpPost.setHeader("Content-Type", "application/json;charset=UTF-8"); + StringEntity s = new StringEntity(JSONObject.toJSONString(designAtta), "UTF-8"); + httpPost.setEntity(s); + CloseableHttpResponse response = httpclient.execute(httpPost); + int status = response.getStatusLine().getStatusCode(); + if (status != 200) + { + return false; + } + return true; + } + + public static boolean synDelOrderAtta(DesignAtta atta) throws Exception + { + // TODO Auto-generated method stub + String url = YZM_GATE_WAY_URL + "api-busi/order/synDelOrderAttaApi?access_token=" + getYzmAccessToken(); + + // 创建默认的httpClient实例. + CloseableHttpClient httpclient = HttpClients.createDefault(); + + org.apache.http.client.methods.HttpPost httpPost = new org.apache.http.client.methods.HttpPost(url); + httpPost.setHeader("Content-Type", "application/json;charset=UTF-8"); + StringEntity s = new StringEntity(JSONObject.toJSONString(atta), "UTF-8"); + httpPost.setEntity(s); + CloseableHttpResponse response = httpclient.execute(httpPost); + int status = response.getStatusLine().getStatusCode(); + if (status != 200) + { + return false; + } + return true; + } +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/util/BusinessTbzBjqUtil.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/util/BusinessTbzBjqUtil.java new file mode 100644 index 0000000..382b5e6 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/util/BusinessTbzBjqUtil.java @@ -0,0 +1,264 @@ +package com.zhiqim.yangcai.util; + +import java.net.URLEncoder; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.util.HashMap; +import java.util.Map; + +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; + +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.zhiqim.yangcai.util.http.HttpClientResult; +import com.zhiqim.yangcai.util.http.HttpClientUtils; + +/** + * 编辑器调用 + * + * @author zzqzz + * + */ +public class BusinessTbzBjqUtil +{ + private static final Log log = LogFactory.getLog(BusinessPlatformClientUtil.class); + + private static final String loginUrl = "https://apidiy.lingtao8.com/open/open-login"; + private static final String appid = "126q17817q000i77"; + private static final String appSecret = "Dk3XPGpnrBJr7DmReczFjXCGe3cZtpzm"; + private static final String getPinleiListUrl = "https://apidiy.lingtao8.com/v1/open-api/classify-list"; + private static final String toSyncFileUrl = "https://apidiy.lingtao8.com/v1/open-api-member/download"; + private static final String getBjqUrl = "https://apidiy.lingtao8.com/v1/open-api-member/mobile-create-template"; + + /** + * 获取token + * + * @param username 用户名 + * @param uid 用户id + * @param expireAt pc过期时间戳 + * @param expireAtM 移动过期时间戳 + * @param headImg 用户头像 + * @param mobile 用户手机号码 + * @return + * @throws Exception + */ + public static String getAccessToken(String username, int uid, long expireAt, long expireAtM, String headImg, String mobile) throws Exception + { + Map map = new HashMap<>(); + long timestamp = System.currentTimeMillis(); + map.put("app_id", appid);// + map.put("timestamp", timestamp);// + map.put("uid", "" + uid);// + map.put("username", username);// + String sign = generateSignParam(appid, timestamp, uid, username, appSecret); + map.put("sign", sign);// + if (expireAt != 0L) + { + map.put("expire_at", expireAt); + } + if (expireAtM != 0L) + { + map.put("expire_at_m", expireAtM); + } + map.put("head_img", headImg); + map.put("mobile", mobile); + JSONObject json = new JSONObject(map); + + String result = HttpClientUtils.doPostWithJson(loginUrl, json.toJSONString()); + JSONObject resultJson = JSONObject.parseObject(result); + if (resultJson.getInteger("code") == 200) + { + return resultJson.getString("loginCode"); + } + return ""; + } + + /** + * 同步文件 + * + * @param map + * @param token + * @throws Exception + */ + public static void toSyncFile(Map map, Integer uid, String userName) throws Exception + { + userName = URLEncoder.encode(userName, "UTF-8");// + // TODO Auto-generated method stub + long timestamp = System.currentTimeMillis(); + Map map2 = new HashMap<>(); + map2.put("app_id", appid);// + map2.put("timestamp", timestamp);// + map2.put("uid", uid);// + map2.put("username", userName);// + String sign = generateSignParam(appid, timestamp, uid, userName, appSecret); + map2.put("sign", sign);// + + Map headers = new HashMap<>(); + headers.put("client", "tubangzhu_web"); + headers.put("tubangzhuCooperation", JSONObject.toJSONString(map2)); + + HttpClientResult result = HttpClientUtils.doGetParamsObject(toSyncFileUrl, headers, map); + System.out.print("result:" + result); + } + + /** + * 获取编辑器地址 + * + * @param token + * @param templateId + * @param valueOf + * @throws Exception + */ + public static void getBjqUrl(Map map, Integer uid, String userName) throws Exception + { + userName = URLEncoder.encode(userName, "UTF-8");// + // TODO Auto-generated method stub + long timestamp = System.currentTimeMillis(); + Map map2 = new HashMap<>(); + map2.put("app_id", appid);// + map2.put("timestamp", timestamp);// + map2.put("uid", uid);// + map2.put("username", userName);// + String sign = generateSignParam(appid, timestamp, uid, userName, appSecret); + map2.put("sign", sign);// + + Map headers = new HashMap<>(); + headers.put("client", "tubangzhu_web"); + headers.put("tubangzhuCooperation", JSONObject.toJSONString(map2)); + + HttpClientResult result = HttpClientUtils.doGetParamsObject(getBjqUrl, headers, map); + System.out.print("result:" + result); + } + + public void toEditor(String username, int uid, String headImg, String mobile) + { + // 获取token + // 跳入编辑器 + + } + + /** + * 获取品类列表 + * + * @throws Exception + */ + public static JSONArray getPinleiList() throws Exception + { + // 获取封装sign + int uid = 1004; + String username = "zhangsan";// + Map map = new HashMap<>(); + long timestamp = System.currentTimeMillis(); + map.put("app_id", appid);// + map.put("timestamp", timestamp);// + map.put("uid", uid);// + map.put("username", username);// + String sign = generateSignParam(appid, timestamp, uid, username, appSecret); + map.put("sign", sign);// + + Map headers = new HashMap<>(); + headers.put("client", "tubangzhu_web"); + headers.put("tubangzhuCooperation", JSONObject.toJSONString(map)); + // 获取品类列表数据 + HttpClientResult result = HttpClientUtils.doGet(getPinleiListUrl, headers, null); + if (result.getCode() == 200) + {// 访问成功 + String data = result.getData(); + JSONObject jsonObject = JSONObject.parseObject(data); + JSONArray dataJsonObject = jsonObject.getJSONArray("data"); + System.out.print("result:" + dataJsonObject.toJSONString()); + + return dataJsonObject; + } + return new JSONArray(); + } + + private static String generateSignParam(String appid, long timestamp, int uid, String userName, String appSecret) throws Exception + { + String sign = appSecret + "app_id" + appid + "timestamp" + timestamp + "uid" + uid + "username" + userName + appSecret;// expire_atexpire_at_mhead_imgmobile + return sha1(sign); + } + + /** + */ + private static String sha1(String input) throws NoSuchAlgorithmException + { + MessageDigest mDigest = MessageDigest.getInstance("SHA1"); + byte[] result = mDigest.digest(input.getBytes()); + StringBuffer sb = new StringBuffer(); + for (int i = 0; i < result.length; i++) + { + sb.append(Integer.toString((result[i] & 0xff) + 0x100, 16).substring(1)); + } + + return sb.toString().toUpperCase(); + + } + + public static String sign(int uid, int order_no, long timestamp, String url) throws NoSuchAlgorithmException + { + String sign = appSecret + "uid" + uid + "order_no" + order_no + "timestamp" + timestamp + "url" + url + appSecret; + return sha1(sign); + } + + public static void main(String[] args) throws Exception + { + /* + * int uid = 1005; + * int order_no = 21; + * long timestamp = System.currentTimeMillis(); + * String url = "https://mhdiyfile.oss-cn-shenzhen.aliyuncs.com/muban/201808/04/a.png"; + * String sign = sign(uid, order_no, timestamp, url); + * Map map = new HashMap<>(); + * map.put("uid", uid); + * map.put("order_no", order_no); + * map.put("timestamp", timestamp); + * map.put("url", url); + * map.put("sign", sign); + * JSONObject json2 = new JSONObject(map);// TubangzhuCooperation + * System.out.println("json2:" + json2); + */ + System.out.print(482.76 * 23); + // getPinleiList(); + /** + * String appid = "126q17817q000i77"; + * + * + * + * int uid = 1004; + * String username = "张三";// + * long timestamp = System.currentTimeMillis(); + * long timestamp1 = System.currentTimeMillis(); + * String mobile = "18570412824"; + * String headImg = + * "https://yzmschtoss.shanghaidisanji.com/taoyin/xcx/order/2358102540001/2358102540001-17324177.jpeg"; + * String appSecret = "Dk3XPGpnrBJr7DmReczFjXCGe3cZtpzm"; + * getAccessToken(username, uid, 0L, 0L, headImg, mobile); + * System.out.println("token:" + getAccessToken(username, uid, 0L, 0L, headImg, mobile)); + **/ + /* + * String head_img = ""; String appSecret = ""; String mobile = ""; Timestamp + * timestamp1 = null; + */ + /** + * String sign2 = generateSignParam(appid, timestamp, timestamp1, uid, userName, appSecret, + * mobile, head_img); + * + * Map map = new HashMap<>(); + * map.put("app_id", appid);// + * map.put("timestamp", timestamp);// + * map.put("uid", uid);// + * + * map.put("username", userName);// + * map.put("sign", sign2);// + * map.put("expire_at",timestamp1); + * map.put("expire_at_m",timestamp1); + * map.put("head_img",head_img); + * map.put("mobile",mobile); + * JSONObject json2 = new JSONObject(map);//TubangzhuCooperation + * System.out.println("json2:" + json2); + */ + } + +} \ No newline at end of file diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/util/CdrToPngUtil.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/util/CdrToPngUtil.java new file mode 100644 index 0000000..a02e0de --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/util/CdrToPngUtil.java @@ -0,0 +1,51 @@ +package com.zhiqim.yangcai.util; + +import java.io.File; + +import com.aspose.imaging.Color; +import com.aspose.imaging.Image; +import com.aspose.imaging.SmoothingMode; +import com.aspose.imaging.TextRenderingHint; +import com.aspose.imaging.fileformats.png.PngColorType; +import com.aspose.imaging.imageoptions.PngOptions; +import com.aspose.imaging.imageoptions.VectorRasterizationOptions; +import com.aspose.imaging.internal.Exceptions.Exception; + +public class CdrToPngUtil +{ + + public static String convert(String path) + { + if (path.indexOf(".cdr") > -1) + { + try + { + String outName = path.replace(".cdr", ".png"); + + File file = new File(path); + if (!file.exists()) + { + throw new Exception("文件不存在"); + } + + Image image = Image.load(path); + PngOptions options = new PngOptions(); + options.setColorType(PngColorType.TruecolorWithAlpha); + VectorRasterizationOptions defaultOptions = (VectorRasterizationOptions) image.getDefaultOptions(new Object[] + { + Color.getWhite(), image.getWidth(), image.getHeight() + }); + options.setVectorRasterizationOptions(defaultOptions); + defaultOptions.setTextRenderingHint(TextRenderingHint.SingleBitPerPixel); + defaultOptions.setSmoothingMode(SmoothingMode.None); + image.save(outName, options); + return outName; + } + catch (Exception e) + { + throw new Exception("格式转换出错"); + } + } + throw new Exception("暂不支持转换其他格式"); + } +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/util/CodeEnum.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/util/CodeEnum.java new file mode 100644 index 0000000..4b0f678 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/util/CodeEnum.java @@ -0,0 +1,23 @@ +package com.zhiqim.yangcai.util; + +public enum CodeEnum +{ + SUCCESS(0), ERROR(1); + + private Integer code; + + CodeEnum(Integer code) + { + this.code = code; + } + + public Integer getCode() + { + return code; + } + + public void setCode(Integer code) + { + this.code = code; + } +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/util/DesignUtil.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/util/DesignUtil.java new file mode 100644 index 0000000..3e39651 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/util/DesignUtil.java @@ -0,0 +1,58 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.util; + +import org.zhiqim.kernel.constants.SignConstants; +import org.zhiqim.kernel.util.Validates; + +public class DesignUtil implements SignConstants +{ + /** + * 删除s中空白,多个空格间 只保留一个空格 (包括空格以下(0x00-0x20)之间的所有字符,包括\t,\r,\n,\b等) + * + * 举例: s = " a\tb\rc d ";得到结果是:returnString = "abcd"; + * + * @param s 原字符串 + * @return 删除空白之后的字符串 + */ + public static String removeBlank(String s) + { + if (Validates.isEmpty(s)) + { + return s; + } + + StringBuilder strb = new StringBuilder(); + for (int i = 0; i < s.length(); i++) + { + char c = s.charAt(i); + if (c < _SPACE_ || c == _SPACE_ZH_ || c == _SPACE_BOM_) + { + continue; + } + + if (c == _SPACE_) + { + if (strb.charAt(strb.length() - 1) != _SPACE_) + { + strb.append(c);// 当前是空格,上一个符也不是空格,则保留当前空格 + } + } + else + { + strb.append(c); + } + } + + return strb.toString(); + } +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/util/DingdingUtil.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/util/DingdingUtil.java new file mode 100644 index 0000000..a153d8f --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/util/DingdingUtil.java @@ -0,0 +1,54 @@ +package com.zhiqim.yangcai.util; + +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; + +import com.dingtalk.api.DefaultDingTalkClient; +import com.dingtalk.api.DingTalkClient; +import com.dingtalk.api.request.OapiRobotSendRequest; +import com.taobao.api.ApiException; + +/** + * [简要描述]:钉钉消息通知工具类
            + * + * @version 1.0 @author caohong 2019-11-2 新建与整理 + */ +public class DingdingUtil +{ + private static final Log log = LogFactory.getLog(DingdingUtil.class); + + /** + * 钉钉群机器人消息推送地址,需要再群里面配置 + */ + private static String msgUrl = "https://oapi.dingtalk.com/robot/send?access_token=f7a6388882c013358c89750876c2f23611c7ab94c762b6f896a3092dfb26f89e"; + + /** + * [简要描述]:钉钉群消息推送
            + * 当前推送到研发部门群里面 + * + * @param content 推送消息内容 + * @author caohong + */ + public static void sendMsgToDingding(String content) + { + DingTalkClient client = new DefaultDingTalkClient(msgUrl); + OapiRobotSendRequest request = new OapiRobotSendRequest(); + request.setMsgtype("text"); + OapiRobotSendRequest.Text text = new OapiRobotSendRequest.Text(); + text.setContent(content); + request.setText(text); + // OapiRobotSendRequest.At at = new OapiRobotSendRequest.At(); + // at.setAtMobiles(Arrays.asList("17346884115")); + // request.setAt(at); + + try + { + client.execute(request); + } + catch (ApiException e) + { + log.error("消息推送钉钉异常," + e.getMessage(), e); + } + + } +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/util/ErpClassService.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/util/ErpClassService.java new file mode 100644 index 0000000..29f3080 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/util/ErpClassService.java @@ -0,0 +1,133 @@ +package com.zhiqim.yangcai.util; + +import java.io.IOException; +import java.net.URISyntaxException; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.TreeMap; + +public class ErpClassService +{ + + private static final String BASE_URL = "http://47.114.150.226:88/Handler/apiDesign.ashx"; + // private static final String BASE_URL = "http://localhost:911/Handler/apiDesign.ashx"; + private static final String ADD_LOG_PARAMS = "DesignSys_AddLog"; + private static final String CHANGE_STATUS_PARAMS = "DesignSys_OrderStateChange"; + private static final String CREATE_ACCOUNT = "create_erp_account"; + + public enum statusEnum + { + + TO_BE_DESIGNED(3, "待设计"), TO_BE_DESIGNEDING(4, "设计中"), TO_BE_DESIGNED_COM(5, "设计完成"),; + + Integer code; + String value; + + statusEnum(Integer code, String value) + { + this.code = code; + this.value = value; + } + + public Integer getCode() + { + return code; + } + + public void setCode(Integer code) + { + this.code = code; + } + + public String getValue() + { + return value; + } + + public void setgetValue(String value) + { + this.value = value; + } + + } + + /** + * 改状态 + * + * @param tid + * @param userName + * @param orderState + */ + public ErpClassService(String tid, String userName, Integer orderState) + { + this.changeStatus(tid, userName, orderState); + } + + /** + * 添加日志 + * + * @param tid + * @param userName + * @param orderState + * @param con + */ + public ErpClassService(String tid, String userName, Integer orderState, String con) + { + this.addLog(tid, userName, orderState, con); + } + + public ErpClassService(String name) + { + this.addAccount(name); + } + + public void addAccount(String name) + { + Map bodyParams = new HashMap(); + bodyParams.put("name", name); + bodyParams.put("pwd", "123456"); + + sendUrl(bodyParams, CREATE_ACCOUNT); + } + + public void changeStatus(String tid, String userName, Integer orderState) + { + Map bodyParams = new HashMap(); + bodyParams.put("tid", tid); + bodyParams.put("userName", userName); + bodyParams.put("orderState", orderState); + + sendUrl(bodyParams, CHANGE_STATUS_PARAMS); + } + + public void addLog(String tid, String userName, Integer orderState, String con) + { + Map bodyParams = new HashMap(); + bodyParams.put("tid", tid); + bodyParams.put("userName", userName); + bodyParams.put("orderState", orderState); + bodyParams.put("con", con); + + sendUrl(bodyParams, ADD_LOG_PARAMS); + } + + private static void sendUrl(Map paramMap, String method) + { + TreeMap urlParamsMap = new TreeMap(); + urlParamsMap.put("t", method); + LinkedHashMap bodyParamsMap = new LinkedHashMap(paramMap); + try + { + String result = HttpClientUtilNew.sendErpPost(BASE_URL, urlParamsMap, bodyParamsMap); + System.out.println(result); + } + catch (URISyntaxException | IOException e) + { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + } + +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/util/ExportUtils.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/util/ExportUtils.java new file mode 100644 index 0000000..51a6015 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/util/ExportUtils.java @@ -0,0 +1,329 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 + */ +package com.zhiqim.yangcai.util; + +import java.io.OutputStream; +import java.net.URLEncoder; +import java.util.List; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.kernel.util.Validates; + +import jxl.Workbook; +import jxl.format.Alignment; +import jxl.format.Border; +import jxl.format.BorderLineStyle; +import jxl.format.Colour; +import jxl.format.PageOrientation; +import jxl.format.VerticalAlignment; +import jxl.write.Label; +import jxl.write.Number; +import jxl.write.NumberFormat; +import jxl.write.WritableCellFormat; +import jxl.write.WritableFont; +import jxl.write.WritableSheet; +import jxl.write.WritableWorkbook; + +/** + * 报表导出工具类 + */ +public class ExportUtils +{ + /** + * 导出excel + * + * @param response + * @param report + * @throws Exception + */ + public static void exportExcel(HttpRequest request, Report report) throws Exception + { + if (report.size() > (255 * 255)) + { + throw new Exception("数据太大超过限制,数据总记录不能超过" + (255 * 255)); + } + + request.setCharacterEncoding("UTF-8"); + request.getResponse().setContentType("application/msexcel"); + + String agent = request.getHeader("USER-AGENT").toLowerCase(); + if (agent.indexOf("firefox") != -1) + { + request.getResponse().addHeader("Content-Disposition", "attachment;filename=" + report.getFileName()); + } + else + { + request.getResponse().addHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(report.getFileName(), "UTF-8")); + } + + OutputStream os = request.getResponse().getOutputStream(); + WritableWorkbook wwb = Workbook.createWorkbook(os); + WritableSheet ws = wwb.createSheet(report.getTitle(), 0); + ws.getSettings().setLeftMargin(0.25); + ws.getSettings().setRightMargin(0.25); + ws.getSettings().setTopMargin(0.5); + ws.getSettings().setBottomMargin(0.5); + if (report.getExcelPageType() == 1) + { + ws.setPageSetup(PageOrientation.LANDSCAPE); + } + + // 设置行高 + ws.setRowView(0, 800);// 标题行 + ws.setRowView(1, 400);// 列头行 + for (int i = 0; i < report.size(); i++) + { + ws.setRowView(i + 2, report.getHeight());// 数据行 + } + ws.setRowView(report.size() + 2, 400);// 脚注行 + + // 标题行 + WritableFont titleFont = new WritableFont(WritableFont.TIMES, 16, WritableFont.BOLD); + WritableCellFormat titleFormat = new WritableCellFormat(titleFont); + titleFormat.setBorder(Border.ALL, BorderLineStyle.THIN); + titleFormat.setAlignment(Alignment.CENTRE);// 水平居中 + titleFormat.setVerticalAlignment(VerticalAlignment.CENTRE);// 垂直居中 + Label titleLab = new Label(0, 0, report.getTitle(), titleFormat); + ws.addCell(titleLab); + ws.mergeCells(0, 0, report.length() - 1, 0); + + // 列头行 + WritableFont headerFont = new WritableFont(WritableFont.TIMES, 12, WritableFont.NO_BOLD); + WritableCellFormat headerFormat = new WritableCellFormat(headerFont); + headerFormat.setAlignment(Alignment.LEFT); // 水平对齐 + headerFormat.setVerticalAlignment(VerticalAlignment.CENTRE); // 垂直对齐 + headerFormat.setBorder(Border.ALL, BorderLineStyle.THIN); // 设置边框 + headerFormat.setBackground(Colour.GRAY_25); + headerFormat.setWrap(true); + + for (int i = 0; i < report.length(); i++) + { + ws.setColumnView(i, report.getWidths()[i]); + String hearder[] = report.getHearder(); + Label lable = new Label(i, 1, hearder[i], headerFormat); + ws.addCell(lable); + } + + // 数据行 + if (!report.isEmpty()) + { + WritableFont dataFont = new WritableFont(WritableFont.TIMES, 12, WritableFont.NO_BOLD); + WritableCellFormat dataStringFormat = new WritableCellFormat(dataFont); + dataStringFormat.setAlignment(Alignment.LEFT); // 水平对齐 + dataStringFormat.setVerticalAlignment(VerticalAlignment.CENTRE); // 垂直对齐 + dataStringFormat.setBorder(Border.ALL, BorderLineStyle.THIN); // 设置边框 + dataStringFormat.setWrap(true); + + NumberFormat numberFormat = new NumberFormat("##0"); // 设置数值格式,保留0 + WritableCellFormat dataNumberFormat = new WritableCellFormat(numberFormat); // 设置表单格式 + dataNumberFormat.setAlignment(Alignment.LEFT); // 水平对齐 + dataNumberFormat.setVerticalAlignment(VerticalAlignment.CENTRE); // 垂直对齐 + dataNumberFormat.setBorder(Border.ALL, BorderLineStyle.THIN); // 设置边框 + dataNumberFormat.setWrap(true); + + NumberFormat amountFormat = new NumberFormat("¥#,##0.00;¥-#,##0.00"); // 设置金额格式,保留0.00 + WritableCellFormat dataAmountFormat = new WritableCellFormat(amountFormat); // 设置表单格式 + dataAmountFormat.setAlignment(Alignment.LEFT); // 水平对齐 + dataAmountFormat.setVerticalAlignment(VerticalAlignment.CENTRE); // 垂直对齐 + dataAmountFormat.setBorder(Border.ALL, BorderLineStyle.THIN); // 设置边框 + dataAmountFormat.setWrap(true); + + for (int i = 0; i < report.size(); i++) + { + String[] data = report.get(i); + for (int j = 0; j < report.length(); j++) + { + if (report.isNumber(j)) + { + ws.addCell(new Number(j, i + 2, Long.parseLong(data[j]), dataNumberFormat)); + } + else if (report.isMoney(j)) + { + ws.addCell(new Number(j, i + 2, Double.parseDouble(data[j]), dataAmountFormat)); + } + else + { + ws.addCell(new Label(j, i + 2, data[j], dataStringFormat)); + } + } + } + } + + // 脚注行 + if (report.getFooter() != null) + { + WritableFont footerFont = new WritableFont(WritableFont.TIMES, 12, WritableFont.NO_BOLD); + WritableCellFormat footerFormat = new WritableCellFormat(footerFont); + footerFormat.setAlignment(Alignment.RIGHT); // 水平对齐 + footerFormat.setVerticalAlignment(VerticalAlignment.CENTRE); // 垂直对齐 + footerFormat.setBorder(Border.ALL, BorderLineStyle.THIN); // 设置边框 + footerFormat.setWrap(true); + + Label footerLabel = new Label(0, report.size() + 2, report.getFooter(), footerFormat); + ws.addCell(footerLabel); + ws.mergeCells(0, report.size() + 2, report.length() - 1, report.size() + 2); + } + + // 写入文件 + wwb.write(); + wwb.close(); + os.flush(); + os.close(); + } + + /** + * 导出多工作簿的excel + * + * @param response + * @param report + * @param fileName + * @throws Exception + */ + public static void exportExcel(HttpRequest request, List reports, String fileName) throws Exception + { + if (Validates.isEmpty(reports)) + { + throw new Exception("数据列表为空"); + } + else if (Validates.isEmpty(fileName)) + { + throw new Exception("文件名不能为空"); + } + request.setCharacterEncoding("UTF-8"); + request.getResponse().setContentType("application/msexcel"); + + String agent = request.getHeader("USER-AGENT").toLowerCase(); + if (agent.indexOf("firefox") != -1) + { + request.getResponse().addHeader("Content-Disposition", "attachment;filename=" + fileName); + } + else + { + request.getResponse().addHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8")); + } + + OutputStream os = request.getResponse().getOutputStream(); + WritableWorkbook wwb = Workbook.createWorkbook(os); + for (Report report : reports) + { + WritableSheet ws = wwb.createSheet(report.getTitle(), reports.indexOf(report)); + ws.getSettings().setLeftMargin(0.25); + ws.getSettings().setRightMargin(0.25); + ws.getSettings().setTopMargin(0.5); + ws.getSettings().setBottomMargin(0.5); + if (report.getExcelPageType() == 1) + { + ws.setPageSetup(PageOrientation.LANDSCAPE); + } + + // 设置行高 + ws.setRowView(0, 800);// 标题行 + ws.setRowView(1, 400);// 列头行 + for (int i = 0; i < report.size(); i++) + { + ws.setRowView(i + 2, report.getHeight());// 数据行 + } + ws.setRowView(report.size() + 2, 400);// 脚注行 + + // 标题行 + WritableFont titleFont = new WritableFont(WritableFont.TIMES, 16, WritableFont.BOLD); + WritableCellFormat titleFormat = new WritableCellFormat(titleFont); + titleFormat.setBorder(Border.ALL, BorderLineStyle.THIN); + titleFormat.setAlignment(Alignment.CENTRE);// 水平居中 + titleFormat.setVerticalAlignment(VerticalAlignment.CENTRE);// 垂直居中 + Label titleLab = new Label(0, 0, report.getTitle(), titleFormat); + ws.addCell(titleLab); + ws.mergeCells(0, 0, report.length() - 1, 0); + + // 列头行 + WritableFont headerFont = new WritableFont(WritableFont.TIMES, 12, WritableFont.NO_BOLD); + WritableCellFormat headerFormat = new WritableCellFormat(headerFont); + headerFormat.setAlignment(Alignment.LEFT); // 水平对齐 + headerFormat.setVerticalAlignment(VerticalAlignment.CENTRE); // 垂直对齐 + headerFormat.setBorder(Border.ALL, BorderLineStyle.THIN); // 设置边框 + headerFormat.setBackground(Colour.GRAY_25); + headerFormat.setWrap(true); + + for (int i = 0; i < report.length(); i++) + { + ws.setColumnView(i, report.getWidths()[i]); + String hearder[] = report.getHearder(); + Label lable = new Label(i, 1, hearder[i], headerFormat); + ws.addCell(lable); + } + + // 数据行 + if (!report.isEmpty()) + { + WritableFont dataFont = new WritableFont(WritableFont.TIMES, 12, WritableFont.NO_BOLD); + WritableCellFormat dataStringFormat = new WritableCellFormat(dataFont); + dataStringFormat.setAlignment(Alignment.LEFT); // 水平对齐 + dataStringFormat.setVerticalAlignment(VerticalAlignment.CENTRE); // 垂直对齐 + dataStringFormat.setBorder(Border.ALL, BorderLineStyle.THIN); // 设置边框 + dataStringFormat.setWrap(true); + + NumberFormat numberFormat = new NumberFormat("##0"); // 设置数值格式,保留0 + WritableCellFormat dataNumberFormat = new WritableCellFormat(numberFormat); // 设置表单格式 + dataNumberFormat.setAlignment(Alignment.LEFT); // 水平对齐 + dataNumberFormat.setVerticalAlignment(VerticalAlignment.CENTRE); // 垂直对齐 + dataNumberFormat.setBorder(Border.ALL, BorderLineStyle.THIN); // 设置边框 + dataNumberFormat.setWrap(true); + + NumberFormat amountFormat = new NumberFormat("¥#,##0.00;¥-#,##0.00"); // 设置金额格式,保留0.00 + WritableCellFormat dataAmountFormat = new WritableCellFormat(amountFormat); // 设置表单格式 + dataAmountFormat.setAlignment(Alignment.LEFT); // 水平对齐 + dataAmountFormat.setVerticalAlignment(VerticalAlignment.CENTRE); // 垂直对齐 + dataAmountFormat.setBorder(Border.ALL, BorderLineStyle.THIN); // 设置边框 + dataAmountFormat.setWrap(true); + + for (int i = 0; i < report.size(); i++) + { + String[] data = report.get(i); + for (int j = 0; j < report.length(); j++) + { + if (report.isNumber(j)) + { + ws.addCell(new Number(j, i + 2, Long.parseLong(data[j]), dataNumberFormat)); + } + else if (report.isMoney(j)) + { + ws.addCell(new Number(j, i + 2, Double.parseDouble(data[j]), dataAmountFormat)); + } + else + { + ws.addCell(new Label(j, i + 2, data[j], dataStringFormat)); + } + } + } + } + + // 脚注行 + if (report.getFooter() != null) + { + WritableFont footerFont = new WritableFont(WritableFont.TIMES, 12, WritableFont.NO_BOLD); + WritableCellFormat footerFormat = new WritableCellFormat(footerFont); + footerFormat.setAlignment(Alignment.RIGHT); // 水平对齐 + footerFormat.setVerticalAlignment(VerticalAlignment.CENTRE); // 垂直对齐 + footerFormat.setBorder(Border.ALL, BorderLineStyle.THIN); // 设置边框 + footerFormat.setWrap(true); + + Label footerLabel = new Label(0, report.size() + 2, report.getFooter(), footerFormat); + ws.addCell(footerLabel); + ws.mergeCells(0, report.size() + 2, report.length() - 1, report.size() + 2); + } + } + + // 写入文件 + wwb.write(); + wwb.close(); + os.flush(); + os.close(); + } +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/util/HttpClientUtilNew.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/util/HttpClientUtilNew.java new file mode 100644 index 0000000..40184e5 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/util/HttpClientUtilNew.java @@ -0,0 +1,357 @@ +package com.zhiqim.yangcai.util; + +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URI; +import java.net.URISyntaxException; +import java.nio.charset.Charset; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Set; +import java.util.TreeMap; + +import org.apache.commons.codec.CharEncoding; +import org.apache.http.client.config.RequestConfig; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.client.utils.URIBuilder; +import org.apache.http.entity.StringEntity; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClients; +import org.apache.http.protocol.HTTP; +import org.apache.http.util.EntityUtils; +import org.zhiqim.kernel.util.Urls; +import org.zhiqim.kernel.util.Validates; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; + +/** + * Apache HttpClient工具类
            + * 注:异常统一向上抛出由最终调用方捕获处理
            + * + * @author caohong + * @date 2021-6-30 11:29:13 + */ +public class HttpClientUtilNew { + + /** + * 默认RequestConfig,默认设置连接超时时间10秒 + */ + private static RequestConfig defaultRequestConfig = RequestConfig.custom().setConnectTimeout(10000) + .setConnectionRequestTimeout(10000).setSocketTimeout(10000).build(); + + /** + * 设置地址栏url参数
            + * + * @param uriBuilder + * @param urlParamsMap 地址栏参数map + * @return org.apache.http.client.utils.URIBuilder + */ + @SuppressWarnings("rawtypes") + private static URIBuilder setUriBuilderParameters(URIBuilder uriBuilder, TreeMap urlParamsMap) { + if (Validates.isNotEmpty(urlParamsMap)) { + Set> entrySet = urlParamsMap.entrySet(); + for (Map.Entry entry : entrySet) { + if (entry != null) { + if (entry.getValue() == null) { + continue; + } + String tempKey = (String) entry.getKey(); + String tempValue = (String) entry.getValue(); + uriBuilder.addParameter(tempKey, tempValue); + } + } + } + return uriBuilder; + } + + /** + * 追加设置GET请求 请求头组
            + * + * @param httpGet + * @param headersMap 请求头组map + * @return org.apache.http.client.methods.HttpGet + */ + @SuppressWarnings("rawtypes") + private static HttpGet addAllHeadersOfGet(HttpGet httpGet, TreeMap headersMap) { + if (Validates.isNotEmpty(headersMap)) { + Set> entrySet = headersMap.entrySet(); + for (Map.Entry entry : entrySet) { + if (entry != null) { + if (entry.getValue() == null) { + continue; + } + String tempKey = (String) entry.getKey(); + String tempValue = (String) entry.getValue(); + httpGet.addHeader(tempKey, tempValue); + } + } + } + return httpGet; + } + + /** + * 追加设置POST请求 请求头组
            + * + * @param httpPost + * @param headersMap 请求头组map + * @return org.apache.http.client.methods.HttpGet + */ + @SuppressWarnings("rawtypes") + private static HttpPost addAllHeadersOfPost(HttpPost httpPost, TreeMap headersMap) { + if (Validates.isNotEmpty(headersMap)) { + Set> entrySet = headersMap.entrySet(); + for (Map.Entry entry : entrySet) { + if (entry != null) { + if (entry.getValue() == null) { + continue; + } + String tempKey = (String) entry.getKey(); + String tempValue = (String) entry.getValue(); + httpPost.addHeader(tempKey, tempValue); + } + } + } + return httpPost; + } + + /** + * 设置POST请求body参数
            + * + * @param httpPost + * @param bodyParamsMap 请求体body参数map + * @return org.apache.http.client.methods.HttpPost + */ + private static HttpPost setPostJsonEntity(HttpPost httpPost, LinkedHashMap bodyParamsMap) + throws UnsupportedEncodingException { + if (Validates.isNotEmpty(bodyParamsMap)) { + StringEntity stringEntity = new StringEntity(JSON.toJSONString(bodyParamsMap), + Charset.forName(CharEncoding.UTF_8)); + stringEntity.setContentType("application/json"); + stringEntity.setContentEncoding(CharEncoding.UTF_8); + httpPost.setEntity(stringEntity); + } + return httpPost; + } + + private static HttpPost setPostJsonEntity1(HttpPost httpPost, String bodyParamsMap) + throws UnsupportedEncodingException { + if (Validates.isNotEmpty(bodyParamsMap)) { + StringEntity stringEntity = new StringEntity(bodyParamsMap, Charset.forName(CharEncoding.UTF_8)); + stringEntity.setContentType("application/json"); + stringEntity.setContentEncoding(CharEncoding.UTF_8); + httpPost.setEntity(stringEntity); + } + return httpPost; + } + + /** + * 设置POST请求body参数
            + * + * @param httpPost + * @param bodyParamsMap 请求体body参数map + * @return org.apache.http.client.methods.HttpPost + */ + private static HttpPost setPostErpEntity(HttpPost httpPost, LinkedHashMap bodyParamsMap) + throws UnsupportedEncodingException { + if (Validates.isNotEmpty(bodyParamsMap)) { + StringEntity stringEntity = new StringEntity(buildQueryString(bodyParamsMap), + Charset.forName(CharEncoding.UTF_8)); + httpPost.setEntity(stringEntity); + } + return httpPost; + } + + /** + * 统一关闭CloseableHttpClient和CloseableHttpResponse
            + * + * @param httpClient + * @param httpResponse + * @return void + */ + private static void doClose(CloseableHttpClient httpClient, CloseableHttpResponse httpResponse) throws IOException { + if (httpClient != null) { + httpClient.close(); + } + + if (httpResponse != null) { + httpResponse.close(); + } + } + + /** + * 发起GET请求
            + * + * @param url 请求地址 + * @param urlParamsMap 地址栏参数map + * @param headersMap 请求头组map + * @return java.lang.String + */ + public static String sendGet(String url, TreeMap urlParamsMap, TreeMap headersMap) + throws URISyntaxException, IOException { + CloseableHttpClient httpClient = HttpClients.createDefault(); + CloseableHttpResponse httpResponse = null; + String result = ""; + + URIBuilder uriBuilder = new URIBuilder(url); + if (Validates.isNotEmpty(urlParamsMap)) { + // 设置地址栏请求参数 + uriBuilder = setUriBuilderParameters(uriBuilder, urlParamsMap); + } + URI uri = uriBuilder.build(); + + HttpGet httpGet = new HttpGet(uri); + if (Validates.isNotEmpty(headersMap)) { + // 设置请求头组 + httpGet = addAllHeadersOfGet(httpGet, headersMap); + } + + // 设置RequestConfig + httpGet.setConfig(defaultRequestConfig); + + httpResponse = httpClient.execute(httpGet); + result = EntityUtils.toString(httpResponse.getEntity(), CharEncoding.UTF_8); + doClose(httpClient, httpResponse); + return result; + } + + /** + * 发起POST请求
            + * + * @param url 请求地址 + * @param urlParamsMap 地址栏参数map + * @param bodyParamsMap 请求体参数map + * @return java.lang.String + */ + public static String sendJsonPost(String url, TreeMap urlParamsMap, + LinkedHashMap bodyParamsMap) throws URISyntaxException, IOException { + CloseableHttpClient httpClient = HttpClients.createDefault(); + CloseableHttpResponse httpResponse = null; + String result = ""; + + URIBuilder uriBuilder = new URIBuilder(url); + if (Validates.isNotEmpty(urlParamsMap)) { + // 设置地址栏请求参数 + uriBuilder = setUriBuilderParameters(uriBuilder, urlParamsMap); + } + URI uri = uriBuilder.build(); + + HttpPost httpPost = new HttpPost(uri); + // 设置请求头组 + TreeMap headersMap = new TreeMap<>(); + headersMap.put(HTTP.CONTENT_TYPE, "application/json"); + httpPost = addAllHeadersOfPost(httpPost, headersMap); + + // 设置RequestConfig + httpPost.setConfig(defaultRequestConfig); + + if (Validates.isNotEmpty(bodyParamsMap)) { + // 设置请求体json参数 + httpPost = setPostJsonEntity(httpPost, bodyParamsMap); + } + + httpResponse = httpClient.execute(httpPost); + result = EntityUtils.toString(httpResponse.getEntity(), CharEncoding.UTF_8); + doClose(httpClient, httpResponse); + return result; + } + + public static String sendJsonPost1(String url, TreeMap urlParamsMap, String bodyParamsMap) + throws URISyntaxException, IOException { + CloseableHttpClient httpClient = HttpClients.createDefault(); + CloseableHttpResponse httpResponse = null; + String result = ""; + + URIBuilder uriBuilder = new URIBuilder(url); + if (Validates.isNotEmpty(urlParamsMap)) { + // 设置地址栏请求参数 + uriBuilder = setUriBuilderParameters(uriBuilder, urlParamsMap); + } + URI uri = uriBuilder.build(); + + HttpPost httpPost = new HttpPost(uri); + // 设置请求头组 + TreeMap headersMap = new TreeMap<>(); + headersMap.put(HTTP.CONTENT_TYPE, "application/json"); + httpPost = addAllHeadersOfPost(httpPost, headersMap); + + // 设置RequestConfig + httpPost.setConfig(defaultRequestConfig); + + if (Validates.isNotEmpty(bodyParamsMap)) { + // 设置请求体json参数 + httpPost = setPostJsonEntity1(httpPost, bodyParamsMap); + } + + httpResponse = httpClient.execute(httpPost); + result = EntityUtils.toString(httpResponse.getEntity(), CharEncoding.UTF_8); + doClose(httpClient, httpResponse); + return result; + } + + /** + * 发起POST请求
            + * + * @param url 请求地址 + * @param urlParamsMap 地址栏参数map + * @param bodyParamsMap 请求体参数map + * @return java.lang.String + */ + public static String sendErpPost(String url, TreeMap urlParamsMap, + LinkedHashMap bodyParamsMap) throws URISyntaxException, IOException { + CloseableHttpClient httpClient = HttpClients.createDefault(); + CloseableHttpResponse httpResponse = null; + String result = ""; + + URIBuilder uriBuilder = new URIBuilder(url); + if (Validates.isNotEmpty(urlParamsMap)) { + // 设置地址栏请求参数 + uriBuilder = setUriBuilderParameters(uriBuilder, urlParamsMap); + } + URI uri = uriBuilder.build(); + + HttpPost httpPost = new HttpPost(uri); + // 设置请求头组 + TreeMap headersMap = new TreeMap<>(); + headersMap.put(HTTP.CONTENT_TYPE, "application/x-www-form-urlencoded"); + httpPost = addAllHeadersOfPost(httpPost, headersMap); + + // 设置RequestConfig + httpPost.setConfig(defaultRequestConfig); + + if (Validates.isNotEmpty(bodyParamsMap)) { + // 设置请求体json参数 + httpPost = setPostErpEntity(httpPost, bodyParamsMap); + } + + httpResponse = httpClient.execute(httpPost); + result = EntityUtils.toString(httpResponse.getEntity(), CharEncoding.UTF_8); + doClose(httpClient, httpResponse); + return result; + } + + private static String buildQueryString(Map paramMap) { + StringBuffer strb = new StringBuffer(""); + boolean first = true; + for (Map.Entry entry : paramMap.entrySet()) { + String value = null; + if (entry.getValue() == null) { + value = ""; + } else { + value = Urls.encodeUTF8(String.valueOf(entry.getValue())); + } + if (first) { + strb.append(entry.getKey()).append("=").append(value); + first = false; + } else { + + strb.append("&").append(entry.getKey()).append("=").append(value); + } + } + + return strb.toString(); + } + +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/util/QiyeWechatUtil.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/util/QiyeWechatUtil.java new file mode 100644 index 0000000..1ad9319 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/util/QiyeWechatUtil.java @@ -0,0 +1,271 @@ +/** + * 扬彩印刷设计 + * 文件名 :QiyeWechatUtil.java + * 创建人 :gjx + * 创建时间:2020-1-7 + */ + +package com.zhiqim.yangcai.util; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.OutputStreamWriter; +import java.io.PrintWriter; +import java.net.URL; +import java.net.URLConnection; + +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.manager.dbo.ZmrParam; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZTable; +import org.zhiqim.orm.dbo.Selector; + +/** + * [简要描述] 企业微信消息通知工具类:
            + * [详细描述]:
            + * + * @version 1.0 @author gjx 2020-1-7 新建与整理 + */ +public class QiyeWechatUtil +{ + private static final Log log = LogFactory.getLog(QiyeWechatUtil.class); + + /** 研发告警消息群 */ + private static String msgUrl = "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=b95ba297-c750-46e3-8b12-65676f7124dc"; + + /** 淘印告警消息群 */ + private static String taoyin = "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=d2062e11-ace2-434a-b954-41dafa4384d7"; + + /** 印前告警消息群 */ + private static String yinqian = "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=893a9e99-7446-4106-8c56-11e6a7d8cb7b"; + + /** + * + * [简要描述]: 往研发中心推送告警信息
            + * [详细描述]:
            + * + * @author gjx + * @param content + */ + public static void sendMsgToQiyeWechat(String content) + { + try + { + ZmrParam param = ORM.get(ZTable.class).item(ZmrParam.class, new Selector("paramKey", "openQiyeWechatPush")); + if (param != null && Boolean.valueOf(param.getParamValue())) + { + sendMsgToQiyeWechat(content, Boolean.TRUE); + } + } + catch (Exception e) + { + log.error("消息推送企业微信异常," + e.getMessage(), e); + } + + } + + /** + * + * [简要描述]: 往研发中心推送告警信息
            + * [详细描述]:
            + * + * @author gjx + * @param content + * @param push + */ + public static void sendMsgToQiyeWechat(String content, boolean push) + { + if (content != null) + { + content = content.replace("\"", ""); + } + String jsonData = "{\"msgtype\": \"text\"," + " \"text\": {\"content\": \"" + content + "\"}}"; + try + { + if (push) + { + sendPost(msgUrl, jsonData); + if (content.contains("淘印") || content.contains("淘印通")) + {// 往淘印企业微信群推 + sendPost(taoyin, jsonData); + } + if (content.contains("扬彩") || content.contains("扬彩印刷")) + {// 往印前企业微信群推 + sendPost(yinqian, jsonData); + } + } + } + catch (Exception e) + { + log.error("消息推送企业微信异常," + e.getMessage(), e); + } + + } + + /** + * [简要描述]:淘印通业务告警提醒
            + * + * @author caohong + * @param content + */ + public static void sendErrorMsg2Taoyin(String content) + { + try + { + ZmrParam param = ORM.get(ZTable.class).item(ZmrParam.class, new Selector("paramKey", "openQiyeWechatPush")); + if (param != null && Boolean.valueOf(param.getParamValue())) + { + sendErrorMsg2Taoyin(content, Boolean.TRUE); + } + + } + catch (Exception e) + { + log.error("消息推送企业微信异常," + e.getMessage(), e); + } + } + + /** + * + * [简要描述]: 淘印通业务告警提醒
            + * [详细描述]:
            + * + * @author gjx + * @param content + * @param push + */ + public static void sendErrorMsg2Taoyin(String content, boolean push) + { + if (content != null) + { + content = content.replace("\"", ""); + } + String jsonData = "{\"msgtype\": \"text\"," + " \"text\": {\"content\": \"" + content + "\"}}"; + try + { + if (push) + { + sendPost(taoyin, jsonData); + } + + } + catch (Exception e) + { + log.error("消息推送企业微信异常," + e.getMessage(), e); + } + } + + /** + * [简要描述]:印前业务告警提醒
            + * + * @author caohong + * @param content + */ + public static void sendErrorMsg2yinQian(String content) + { + try + { + ZmrParam param = ORM.get(ZTable.class).item(ZmrParam.class, new Selector("paramKey", "openQiyeWechatPush")); + if (param != null && Boolean.valueOf(param.getParamValue())) + { + sendErrorMsg2yinQian(content, Boolean.TRUE); + } + } + catch (Exception e) + { + log.error("消息推送企业微信异常," + e.getMessage(), e); + } + } + + /** + * + * [简要描述]:印前业务告警提醒
            + * [详细描述]:
            + * + * @author gjx + * @param content + * @param push + */ + public static void sendErrorMsg2yinQian(String content, boolean push) + { + if (content != null) + { + content = content.replace("\"", ""); + } + String jsonData = "{\"msgtype\": \"text\"," + " \"text\": {\"content\": \"" + content + "\"}}"; + try + { + if (push) + { + sendPost(yinqian, jsonData); + } + + } + catch (Exception e) + { + log.error("消息推送企业微信异常," + e.getMessage(), e); + } + } + + /** + * + * [简要描述] 发送Post请求:
            + * [详细描述]:
            + * + * @author gjx + * @param url + * @param param + * @throws Exception + */ + public static void sendPost(String url, String param) throws Exception + { + PrintWriter out = null; + BufferedReader in = null; + try + { + URL realUrl = new URL(url); + // 打开和URL之间的连接 + URLConnection conn = realUrl.openConnection(); + // 发送POST请求必须设置如下两行 + conn.setDoOutput(true); + conn.setDoInput(true); + // conn.addRequestProperty("Cookie", + // "stay_login=1 + // smid=DumpWzWQSaLmKlFY1PgAtURdV_u3W3beoei96zsXkdSABwjVCRrnnNBsnH1wGWI0-VIflgvMaZAfli9H2NGtJg + // id=EtEWf1XZRLIwk1770NZN047804");//设置获取的cookie + // 获取URLConnection对象对应的输出流(设置请求编码为UTF-8) + out = new PrintWriter(new OutputStreamWriter(conn.getOutputStream(), "UTF-8")); + // 发送请求参数 + out.print(param); + // flush输出流的缓冲 + out.flush(); + // 获取请求返回数据(设置返回数据编码为UTF-8) + in = new BufferedReader(new InputStreamReader(conn.getInputStream(), "UTF-8")); + } + catch (IOException e) + { + log.error("消息推送企业微信异常,post请求异常:" + e); + } + finally + { + try + { + if (out != null) + { + out.close(); + } + if (in != null) + { + in.close(); + } + } + catch (IOException ex) + { + log.error("消息推送企业微信异常,post请求关闭流异常:" + ex); + } + } + } + +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/util/RRxAPIUtils.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/util/RRxAPIUtils.java new file mode 100644 index 0000000..242916d --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/util/RRxAPIUtils.java @@ -0,0 +1,262 @@ +package com.zhiqim.yangcai.util; + +import java.security.MessageDigest; +import java.util.Arrays; +import java.util.Map; +import java.util.Set; +import java.util.TreeMap; + +import org.zhiqim.kernel.httpclient.HttpGet; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.kernel.util.Urls; + +/** + * [简要描述]:人人秀平台对接
            + * + * @version 1.0 @author caohong 2020年6月6日 新建与整理 + */ +public class RRxAPIUtils +{ + private static final Log log = LogFactory.getLog(RRxAPIUtils.class); + + public static final String AppKey = "f69eb8fc683c36e0feba86a06909f29a"; + public static final String AppSecret = "b73THgcfcA9Ga5qC73fqF1c4b1lb7RvK"; + + /** + * [简要描述]:http get请求
            + * + * @author caohong + * @param url + * @return + */ + public static String sendGet(String url, TreeMap paramMap) + { + String queryString = buildQueryString(paramMap); + HttpGet conn = new HttpGet(url + queryString); + conn.setConnectTimeout(10); + conn.setReadTimeout(30); + conn.setConnectionClose(); + conn.execute(); + + int responseStatus = conn.getResponseStatus(); + String responseText = conn.getResponseText(); + if (responseStatus != 200) + { + log.error("RRX接口调用失败:" + responseStatus + "," + responseText); + } + return responseText; + } + + /** + * [简要描述]:请求参数拼接
            + * + * @author caohong + * @param paramMap 接口请求参数 + * @return url请求参数拼接 + */ + private static String buildQueryString(TreeMap paramMap) + { + StringBuffer strb = new StringBuffer(); + for (Map.Entry entry : paramMap.entrySet()) + { + String value = Urls.encodeUTF8(entry.getValue()); + if (strb.length() > 0) + { + strb.append("&").append(entry.getKey()).append("=").append(value); + } + else + { + strb.append("?").append(entry.getKey()).append("=").append(value); + } + } + + return strb.toString(); + } + + public static void getH5List() + { + TreeMap paramMap = new TreeMap(); + paramMap.put("app_key", AppKey); + paramMap.put("time_stamp", System.currentTimeMillis() + ""); + paramMap.put("sign", ""); + paramMap.put("page", "1"); + paramMap.put("limit", "20"); + paramMap.put("start_time", "2020-06-03 10:28:19"); + paramMap.put("end_time", "2020-06-06 10:28:19"); + String sign = generateSignature(paramMap, AppSecret); + paramMap.put("sign", sign); + + String url = "https://api.rrx.cn/v1/h5/getList"; + String resultText = RRxAPIUtils.sendGet(url, paramMap); + System.out.println(resultText); + } + + /** + * [简要描述]:活动信息
            + * + */ + public static void getH5Info() + { + TreeMap paramMap = new TreeMap(); + paramMap.put("app_key", AppKey); + paramMap.put("time_stamp", System.currentTimeMillis() + ""); + paramMap.put("sign", ""); + paramMap.put("h5_guid", "0yxzen"); + String sign = generateSignature(paramMap, AppSecret); + paramMap.put("sign", sign); + + String url = "https://api.rrx.cn/v1/h5/get"; + String resultText = RRxAPIUtils.sendGet(url, paramMap); + System.out.println(resultText); + } + + // 参与人记录接口 + public static void getActivityInfo() + { + TreeMap paramMap = new TreeMap(); + paramMap.put("app_key", AppKey); + paramMap.put("time_stamp", System.currentTimeMillis() + ""); + paramMap.put("sign", ""); + paramMap.put("activity_guid", "c616e74d986961537073ba543dc9cf4f"); + paramMap.put("page", "1"); + paramMap.put("limit", "50"); + paramMap.put("start_time", "2020-05-12 10:28:19"); + paramMap.put("end_time", "2020-05-16 12:28:19"); + String sign = generateSignature(paramMap, AppSecret); + paramMap.put("sign", sign); + + String url = "https://api.rrx.cn/v1/player/getList"; + String resultText = RRxAPIUtils.sendGet(url, paramMap); + System.out.println(resultText); + } + + // 活动互动数据接口 + public static void getActivityInfoList() + { + TreeMap paramMap = new TreeMap(); + paramMap.put("app_key", AppKey); + paramMap.put("time_stamp", System.currentTimeMillis() + ""); + paramMap.put("sign", ""); + paramMap.put("activity_guid", "c616e74d986961537073ba543dc9cf4f"); + paramMap.put("page", "1"); + paramMap.put("limit", "50"); + paramMap.put("start_time", "2020-05-12 10:28:19"); + paramMap.put("end_time", "2020-05-16 18:28:19"); + String sign = generateSignature(paramMap, AppSecret); + paramMap.put("sign", sign); + + String url = "https://api.rrx.cn/v2/data/getList"; + String resultText = RRxAPIUtils.sendGet(url, paramMap); + System.out.println(resultText); + } + + /** + * [简要描述]:免登录URL
            + * [详细描述]:通过调用该接口自动登录人人秀
            + * + * @author caohong + * @param account 登录账号 + * @param nickname 昵称 + */ + public static String loginRRX(String account, String nickname) + { + TreeMap paramMap = new TreeMap(); + paramMap.put("app_key", AppKey); + paramMap.put("time_stamp", System.currentTimeMillis() + ""); + paramMap.put("sign", ""); + paramMap.put("account_id", account); + paramMap.put("nickname", nickname); + String sign = generateSignature(paramMap, AppSecret); + paramMap.put("sign", sign); + + String url = "https://api.rrx.cn/v1/user/login"; + String reqParam = buildQueryString(paramMap); + + return url + reqParam; + } + + /** + * 生成签名. 注意,若含有sign_type字段,必须和signType参数保持一致。 + * + * @param data 待签名数据 + * @param key API密钥 + * @return 签名 + */ + public static String generateSignature(final TreeMap data, String key) + { + Set keySet = data.keySet(); + String[] keyArray = keySet.toArray(new String[keySet.size()]); + Arrays.sort(keyArray); + StringBuilder sb = new StringBuilder(); + for (String k : keyArray) + { + if (k.equals("sign")) + { + continue; + } + + if (data.get(k).trim().length() > 0) + { + sb.append(k).append("=").append(data.get(k).trim()).append("&"); + } + } + + sb.append("app_secret=").append(key); + String sgin = MD5(sb.toString()).toUpperCase(); + return sgin; + + } + + /** + * 生成 MD5 + * + * @param data 待处理数据 + * @return MD5结果 + */ + public static String MD5(String data) + { + StringBuilder sb = new StringBuilder(); + try + { + java.security.MessageDigest md = MessageDigest.getInstance("MD5"); + byte[] array = md.digest(data.getBytes("UTF-8")); + + for (byte item : array) + { + sb.append(Integer.toHexString((item & 0xFF) | 0x100).substring(1, 3)); + } + } + catch (Exception e) + { + log.error(e.getMessage(), e); + } + + return sb.toString().toUpperCase(); + } + + public static void main(String[] args) throws Exception + { + // TreeMap paramMap = new TreeMap(); + // paramMap.put("app_key", "96c84928b1dce057d110ea3b3880fc83"); + // paramMap.put("time_stamp", "1543999047492"); + // paramMap.put("openid", "ot1UbuBBzlE6IjEDWfyXQW3dy2S4"); + // paramMap.put("transaction_no", "69201704060281699381"); + // paramMap.put("nonce_str", "ibuaiVcKdpRxkhJA"); + // paramMap.put("order_no", "19201704060281699381"); + // + // RrxAPTRestTest.generateSignature(paramMap, "eRdLi88c6I6L95PFSX1Nq69Y84xLcD3T"); + String url = RRxAPIUtils.loginRRX("小西", "小西"); + System.out.println(url); + // String ascii = + // "#\\u5206\\u4eab\\u4eba\\u6635\\u79f0##\\u5206\\u4eab\\u6570#\\u97e9\\u56fdleim"; + // StringBuffer sbu = new StringBuffer(); + // String[] chars = ascii.split("\\"); + // for (int i = 0; i < chars.length; i++) + // { + // sbu.append((char) Integer.parseInt(chars[i])); + // } + // System.out.println(sbu.toString()); + + } +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/util/RandomUtil.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/util/RandomUtil.java new file mode 100644 index 0000000..413b229 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/util/RandomUtil.java @@ -0,0 +1,34 @@ +/** + * 扬彩印刷设计 + * 文件名 :RandomUtil.java + * 创建人 :gjx + * 创建时间:2021年4月22日 +*/ + +package com.zhiqim.yangcai.util; + +import org.zhiqim.kernel.util.Randoms; + +/** + * + * [简要描述]: 随机数工具类
            + * [详细描述]:
            + * + * @version 1.0 @author gjx 2021年4月22日 新建与整理 + */ +public class RandomUtil +{ + /** + * + * [简要描述]: 生产不包含0 指定长度随机数字
            + * [详细描述]:
            + * + * @author gjx + * @param length + * @return + */ + public static String randomLengthDigit(int length) + { + return Randoms.random(length, "123456789"); + } +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/util/RedisUtils.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/util/RedisUtils.java new file mode 100644 index 0000000..c0e1d86 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/util/RedisUtils.java @@ -0,0 +1,59 @@ +package com.zhiqim.yangcai.util; + +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.kernel.util.Validates; + +import redis.clients.jedis.Jedis; +import redis.clients.jedis.JedisPool; +import redis.clients.jedis.JedisPoolConfig; + +/** + * + * [简要描述]:redis工具类
            + * [详细描述]:
            + * + * @version 1.0 @author hc 2021年6月2日 新建与整理 + */ +public class RedisUtils +{ + private static final Log log = LogFactory.getLog(RedisUtils.class); + + public static final String redisHost = Global.getString("redis", "redisHost"); + public static final int redisPort = Global.getInt("redis", "redisPort"); + public static final String redisPassword = Global.getString("redis", "redisPassword"); + public static JedisPool pool = null; + public static JedisPoolConfig config = new JedisPoolConfig(); + + // 初始化redis连接池 + public static Jedis getConn() + { + try + { + if (pool == null) + { + config = new JedisPoolConfig(); + // 最大连接数 + config.setMaxTotal(20); + // 最大空闲数 + config.setMaxIdle(2); + + if (Validates.isNotEmptyBlank(redisPassword)) + { + pool = new JedisPool(config, redisHost, redisPort, 10000, redisPassword); + } + else + { + pool = new JedisPool(config, redisHost, redisPort, 10000); + } + } + } + catch (Exception e) + { + log.error("redis初始化连接池失败!", e); + } + + return pool.getResource(); + } +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/util/Report.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/util/Report.java new file mode 100644 index 0000000..05cf8be --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/util/Report.java @@ -0,0 +1,172 @@ +/* + * 版权所有 (C) 2018 知启蒙(ZHIQIM) 保留所有权利。 + * + * 欢迎到知启蒙网站(https://www.zhiqim.com)购买正版软件,知启蒙还提供许多开源框架和软件。 + * + * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护,其所有知识产权归湖南知启蒙科技有限公司所有; + * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码,或者基于本软件产品创作衍生作品; + * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码; + * 4、个别授权:如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得知启蒙的书面授权和许可; + * 5、保留权利:本注释未明示授权的其他一切权利仍归知启蒙所有,任何人使用其他权利时必须获得知启蒙的书面同意。 +*/ +package com.zhiqim.yangcai.util; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +public class Report implements Serializable +{ + private static final long serialVersionUID = 1L; + + public static final int A3 = 3; + public static final int A4 = 4; + public static final int Horizontal = 1;// 横向 + public static final int Vertical = 2; + + /** 导出文件名 */ + private String fileName; + + /** 导出标题 */ + private String title; + + private int[] widths;// 列宽度数组,每个数字表示占页面总宽度的百分比 + private int height = 400; + private int[] formats;// 数据格式,0表示字符串,1表示数,2表示金额 + + private String[] hearder;// 导出表格头部定义 + private List dataList = new ArrayList();// 数据列表 + private String footer;// 页脚 + private int pageSize;// PDF页面类型:A3,A4,Horizontal(横向) + private int excelPageType;// EXCEL页面类型,0纵向,1横向 + + public String getFileName() + { + return fileName; + } + + public void setFileName(String fileName) + { + this.fileName = fileName; + } + + public String getTitle() + { + return title; + } + + public void setTitle(String title) + { + this.title = title; + } + + public String[] getHearder() + { + return hearder; + } + + public void setHearder(String[] hearder) + { + this.hearder = hearder; + } + + public List getDataList() + { + return dataList; + } + + public void addData(String[] data) + { + this.dataList.add(data); + } + + public String getFooter() + { + return footer; + } + + public void setFooter(String footer) + { + this.footer = footer; + } + + public int getPageSize() + { + return pageSize; + } + + public void setPageSize(int pageSize) + { + this.pageSize = pageSize; + } + + public int[] getWidths() + { + return widths; + } + + public void setWidths(int[] widths) + { + this.widths = widths; + } + + public int[] getFormats() + { + return formats; + } + + public void setFormats(int[] formats) + { + this.formats = formats; + } + + public int getHeight() + { + return height; + } + + public void setHeight(int height) + { + this.height = height; + } + + public int getExcelPageType() + { + return excelPageType; + } + + public void setExcelPageType(int excelPageType) + { + this.excelPageType = excelPageType; + } + + public boolean isEmpty() + { + return dataList.isEmpty(); + } + + public int size() + { + return dataList.size(); + } + + public int length() + { + return hearder.length; + } + + public String[] get(int i) + { + return dataList.get(i); + } + + public boolean isNumber(int i) + { + return formats[i] == 1; + } + + public boolean isMoney(int i) + { + return formats[i] == 2; + } +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/util/ResponseData.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/util/ResponseData.java new file mode 100644 index 0000000..e2ad3ab --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/util/ResponseData.java @@ -0,0 +1,96 @@ +package com.zhiqim.yangcai.util; + +/** + * [简要描述]:响应数据体
            + * [详细描述]:
            + * + * @version 1.0 @author caohong 2020年6月12日 新建与整理 + * @param + */ +public class ResponseData +{ + /*** 数据 */ + private T data; + private Integer code; + private String msg; + private String totalCount; + + private ResponseData(Integer code, T data) + { + this.code = code; + this.data = data; + this.msg = ""; + this.totalCount = ""; + } + + private ResponseData(Integer code, String msg) + { + this.code = code; + this.msg = msg; + this.totalCount = ""; + } + + private ResponseData(Integer code, T data, String msg) + { + this.code = code; + this.data = data; + this.msg = msg; + + } + + public static ResponseData out(Integer code, String msg) + { + return new ResponseData<>(code, msg); + } + + public static ResponseData out(Integer code, T data) + { + return new ResponseData<>(code, data); + } + + public static ResponseData out(Integer code, T data, String msg) + { + return new ResponseData<>(code, data, msg); + } + + public T getData() + { + return data; + } + + public void setData(T data) + { + this.data = data; + } + + public Integer getCode() + { + return code; + } + + public void setCode(Integer code) + { + this.code = code; + } + + public String getMsg() + { + return msg; + } + + public void setMsg(String msg) + { + this.msg = msg; + } + + public String getTotalCount() + { + return totalCount; + } + + public void setTotalCount(String totalCount) + { + this.totalCount = totalCount; + } + +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/util/SmsUtils.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/util/SmsUtils.java new file mode 100644 index 0000000..ff80b86 --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/util/SmsUtils.java @@ -0,0 +1,165 @@ +package com.zhiqim.yangcai.util; + +import java.net.URI; +import java.net.URISyntaxException; +import java.util.regex.Pattern; + +import org.zhiqim.httpd.HttpRequest; +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.kernel.util.Validates; + +import com.aliyuncs.DefaultAcsClient; +import com.aliyuncs.IAcsClient; +import com.aliyuncs.dysmsapi.model.v20170525.SendSmsRequest; +import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse; +import com.aliyuncs.profile.DefaultProfile; +import com.aliyuncs.profile.IClientProfile; +import com.zhiqim.yangcai.design.constant.DesignConstants; + +/** + * 阿里云短信发送服务 + * + * @version V1.2.0 @author caohong 2020-12-26 增加阿里云短信服务 + */ +public class SmsUtils +{ + private static final Log log = LogFactory.getLog(SmsUtils.class); + + // 产品名称:云通信短信API产品,开发者无需替换 + public static final String product = "Dysmsapi"; + // 产品域名,开发者无需替换 + public static final String domain = "dysmsapi.aliyuncs.com"; + public static final String accessKeyId = Global.getString("aliyun.sms", "accessKeyId"); + public static final String accessKeySecret = Global.getString("aliyun.sms", "accessKeySecret"); + + /** + * [简要描述]:面向前端短信验证码服务
            + * + * @author caohong + * @param request HttpRequest + * @param mobile 手机号 + * @param templateCode 内容模板code
            + * SMS_174195343 身份验证验证码:验证码${code},您正在进行身份验证,打死不要告诉别人哦!
            + * SMS_174195340 用户注册验证码:验证码${code},您正在注册成为新用户,感谢您的支持!
            + * SMS_174195339 修改密码验证码:验证码${code},您正在尝试修改登录密码,请妥善保管账户信息。
            + * @throws Exception + */ + public static void sendSms(HttpRequest request) throws Exception + { + String mobile = request.getParameter("mobile"); + String templateCode = request.getParameter("templateCode"); + if (Validates.isEmpty(mobile)) + { + request.setResponseError("手机号码不能为空"); + return; + } + + if (Validates.isNotEmpty(mobile)) + { + boolean isMatch = Pattern.matches(DesignConstants.ZMR_MOBILE, mobile); + if (!isMatch) + { + request.setResponseError("请输入正确的手机号"); + return; + } + } + + if (Validates.isEmpty(templateCode)) + { + templateCode = "SMS_463645918"; + } + + // 生成短信验证码 + int smsCode = 123456; + if (isProdSystem(request)) + { + smsCode = (int) ((Math.random() * 9 + 1) * 100000); + } + + // 发送短信 + doSendSms(mobile, smsCode, templateCode); + + // 会话中保存手机短信验证码 + request.setSessionAttribute("_smscode_", String.valueOf(smsCode)); + + // 获取验证方式 + // String sessionSmsCodeSession = request.getSessionAttributeString("_smscode_"); + } + + /** + * [简要描述]:阿里云短信验证码接口
            + * + * @author caohong + * @param mobile 手机号 + * @param smsCode 验证码 + * @param templateCode 内容模板code
            + * SMS_174195343 身份验证验证码:验证码${code},您正在进行身份验证,打死不要告诉别人哦!
            + * SMS_174195340 用户注册验证码:验证码${code},您正在注册成为新用户,感谢您的支持!
            + * SMS_174195339 修改密码验证码:验证码${code},您正在尝试修改登录密码,请妥善保管账户信息。
            + * @throws Exception + */ + @SuppressWarnings("deprecation") + private static void doSendSms(String mobile, int smsCode, String templateCode) throws Exception + { + if (Validates.isEmpty(templateCode)) + { + templateCode = "SMS_463645918"; + } + + // 设置超时时间-可自行调整 + System.setProperty("sun.net.client.defaultConnectTimeout", "10000"); + System.setProperty("sun.net.client.defaultReadTimeout", "10000"); + + // 初始化ascClient,暂时不支持多region(请勿修改) + IClientProfile profile = DefaultProfile.getProfile("cn-hangzhou", accessKeyId, accessKeySecret); + DefaultProfile.addEndpoint("cn-hangzhou", "cn-hangzhou", product, domain); + IAcsClient acsClient = new DefaultAcsClient(profile); + // 组装请求对象 + SendSmsRequest request = new SendSmsRequest(); + // 使用post提交 + // 必填:待发送手机号。支持以逗号分隔的形式进行批量调用,批量上限为1000个手机号码,批量调用相对于单条调用及时性稍有延迟,验证码类型的短信推荐使用单条调用的方式; + request.setPhoneNumbers(mobile); + // 必填:短信签名-可在短信控制台中找到 + request.setSignName("秒绘科技"); + // 必填:短信内容模板 + request.setTemplateCode(templateCode); + // 可选:模板中的变量替换JSON串,如模板内容为"亲爱的${name},您的验证码为${code}"时 + request.setTemplateParam("{\"code\":\"" + smsCode + "\"}"); + // 请求失败这里会抛ClientException异常 + SendSmsResponse sendSmsResponse = acsClient.getAcsResponse(request); + if (sendSmsResponse.getCode() != null && sendSmsResponse.getCode().equals("OK")) + { + // log.info("手机号【" + mobile + "】发送短信验证码【" + smsCode + "】成功"); + } + else + { + log.error("手机号【" + mobile + "】发送短信验证码【" + smsCode + "】失败," + sendSmsResponse.getMessage()); + } + } + + /** + * 是否生产环境 + * + * @author caohong + * @param request + * @return + */ + private static boolean isProdSystem(HttpRequest request) + { + try + { + URI uri = new URI(request.getRequestURL().toString()); + if (!uri.getHost().startsWith("localhost") && !uri.getHost().startsWith("127") && !uri.getHost().startsWith("192")) + { + return true; + } + } + catch (URISyntaxException e) + { + log.error(e.getMessage(), e); + } + return false; + } +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/util/SolrUtil.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/util/SolrUtil.java new file mode 100644 index 0000000..cd3490f --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/util/SolrUtil.java @@ -0,0 +1,691 @@ +package com.zhiqim.yangcai.util; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import org.apache.solr.client.solrj.SolrQuery; +import org.apache.solr.client.solrj.impl.HttpSolrClient; +import org.apache.solr.client.solrj.response.QueryResponse; +import org.apache.solr.common.SolrDocumentList; +import org.apache.solr.common.SolrInputDocument; +import org.zhiqim.kernel.Global; +import org.zhiqim.kernel.extend.LinkedMapSO; +import org.zhiqim.kernel.httpclient.HttpGet; +import org.zhiqim.kernel.logging.Log; +import org.zhiqim.kernel.logging.LogFactory; +import org.zhiqim.kernel.paging.PageBuilder; +import org.zhiqim.kernel.paging.PageResult; +import org.zhiqim.kernel.util.Validates; +import org.zhiqim.orm.ORM; +import org.zhiqim.orm.ZSQL; + +import com.zhiqim.yangcai.design.constants.BaseConstants; +import com.zhiqim.yangcai.design.dbo.template.MediaTemplateSolrModel; + +public class SolrUtil +{ + /** + * solr服务器地址 + */ + private static final String SOLR_PATH = Global.getString("solr", "path"); + + private static final Log log = LogFactory.getLog(SolrUtil.class); + + /** + * 查询我的模板 + * + * @param + * + * @param page + * @param pageSize + * @param param + * @return + */ + public static PageResult queryMyTemplate(int page, int pageSize, Map param) + { + HttpSolrClient solrServer = buildMediaCoreServer(); + SolrQuery query = new SolrQuery(); + StringBuffer q = new StringBuffer(); + String typeId = param.get("typeId"); + String industryId = param.get("industryId"); + String designer = param.get("designer"); + String fileType = param.get("fileType"); + // 未传入设计师返回null + if (Validates.isEmpty(designer)) + { + return null; + } + addTypeId(q, typeId); + addIndustryId(q, industryId); + addDesigner(q, designer); + addFileType(q, fileType); + + // 我的模板限定模板类型 + String define = "(templateType:10 and templateType:20 and templateType:100 and templateType:110)"; + + if (q.length() > 0) + { + q.append(define); + query.set("q", q.toString()); + } + else + { + query.set("q", define); + } + query.setStart((page - 1) * pageSize); + query.setRows(pageSize); + + return returnSolrData(solrServer, query, page, pageSize); + } + + /** + * 查询收藏模板 + * + * @param page + * @param pageSize + * @param param + * @return + */ + public static PageResult queryCollectTemplate(int page, int pageSize, Map param) + { + HttpSolrClient solrServer = buildMediaCoreServer(); + SolrQuery query = new SolrQuery(); + StringBuffer q = new StringBuffer(); + String typeId = param.get("typeId"); + String industryId = param.get("industryId"); + String operatorCode = param.get("operatorCode"); + // 未传入操作员code返回null + if (Validates.isEmpty(operatorCode)) + { + return null; + } + addTypeId(q, typeId); + addIndustryId(q, industryId); + + // 收藏模板限定查询模板事件表 + String define = "collector:" + operatorCode; + + if (q.length() > 0) + { + q.append(define); + query.set("q", q.toString()); + } + else + { + query.set("q", define); + } + query.setStart((page - 1) * pageSize); + query.setRows(pageSize); + + return returnSolrData(solrServer, query, page, pageSize); + } + + /** + * 更新模板数据 + * + * @param eventId + */ + public static void updateMediaData(long mediaId) + { + if (mediaId < 0) + { + return; + } + HttpSolrClient solrServer = null; + try + { + final String sql = "SELECT mt.media_id id,mt.media_id mediaId,mt.type_id typeId,mt.designer,mt.industry_id industryId,mt.industry_sub_name industrySubName,mt.attribute_name attributeName,mt.keyword_name keywordName,mt.template_type templateType,mc.ODD_EVEN oddEven,mt.template_status templateStatus,mt.file_type fileType,mt.share_dept shareDept,mt.page_value pageValue,mc.media_url mediaUrl,mc.width,mc.height,mc.width_mm widthMm,mc.height_mm heightMm,mc.bleed_size bleedSize,mc.dpi,mc.create_time createTime, ifnull(dts.FLOAT_SCORE + dts.SALE_SCORE + dts.USER_SCORE, 0 ) score FROM media_template mt LEFT JOIN MEDIA_CANVAS mc ON mt.MEDIA_ID = mc.MEDIA_ID LEFT JOIN DES_TEMPLATE_SCORE dts ON dts.MEDIA_ID = mt.MEDIA_ID WHERE mc.create_time IS NOT NULL AND mc.MEDIA_ID = "; + List modelList = ORM.get(ZSQL.class).executeQuery(sql + mediaId); + if (Validates.isNotEmpty(modelList)) + { + LinkedMapSO mapModel = modelList.get(0); + solrServer = buildMediaCoreServer(); + solrServer.add(getUpdateSolrMediaData(mapModel)); + solrServer.commit(); + } + } + catch (Exception e) + { + log.error("根据模板id[" + mediaId + "]更新solr模板数据失败", e); + } + finally + { + if (solrServer != null) + { + try + { + solrServer.close(); + } + catch (IOException e) + { + log.error("更新solr模板数据后关闭solrServer失败", e); + } + } + } + + } + + /** + * 更新作品数据 + * + * @param eventId + */ + public static void updateWorksData(long worksId) + { + if (worksId < 0) + { + return; + } + HttpSolrClient solrServer = null; + try + { + final String sql = "SELECT works_id id,works_id worksId,template_id templateId,file_type fileType,cdr_file_name cdrFileName,pdf_file_name pdfFileName,cdr_path cdrPath,pdf_path pdfPath,thumb_image_path thumbImagePath,thumb_image_phy_path thumbImagePhyPath,create_time createTime FROM des_works_file WHERE works_id = "; + List modelList = ORM.get(ZSQL.class).executeQuery(sql + worksId); + if (Validates.isNotEmpty(modelList)) + { + LinkedMapSO mapModel = modelList.get(0); + solrServer = buildWorksCoreServer(); + solrServer.add(getUpdateSolrWorksData(mapModel)); + solrServer.commit(); + } + } + catch (Exception e) + { + log.error("根据作品id[" + worksId + "]更新solr作品数据失败", e); + } + finally + { + if (solrServer != null) + { + try + { + solrServer.close(); + } + catch (IOException e) + { + log.error("更新solr作品数据后关闭solrServer失败", e); + } + } + } + + } + + private static SolrInputDocument getUpdateSolrMediaData(LinkedMapSO mapModel) + { + if (mapModel == null) + { + return null; + } + String[] field = + { + "id", "mediaId", "typeId", "industryId", "designer", "industrySubName", "attributeName", "keywordName", "templateType", "templateStatus", + "fileType", "shareDept", "pageValue", "mediaUrl", "width", "height", "widthMm", "heightMm", "bleedSize", "dpi", "createTime", "score" + }; + SolrInputDocument doc = new SolrInputDocument(); + for (int i = 0; i < field.length; i++) + { + if (mapModel.get(field[i]) != null) + { + String value = String.valueOf(mapModel.get(field[i])); + doc.addField(field[i], value); + } + } + + doc.addField("oddEven", Integer.parseInt(mapModel.get("oddEven").toString())); + return doc; + } + + private static SolrInputDocument getUpdateSolrWorksData(LinkedMapSO mapModel) + { + if (mapModel == null) + { + return null; + } + String[] field = + { + "id", "worksId", "templateId", "fileType", "cdrFileName", "pdfFileName", "cdrPath", "pdfPath", "thumbImagePath", "thumbImagePhyPath", + "createTime" + }; + SolrInputDocument doc = new SolrInputDocument(); + for (int i = 0; i < field.length; i++) + { + if (mapModel.get(field[i]) != null) + { + String value = String.valueOf(mapModel.get(field[i])); + doc.addField(field[i], value); + } + } + return doc; + } + + /** + * 查询分享模板 + * + * @param page + * @param pageSize + * @param param + * @return + */ + public static PageResult queryShareTemplate(int page, int pageSize, Map param) + { + HttpSolrClient solrServer = buildMediaCoreServer(); + SolrQuery query = new SolrQuery(); + StringBuffer q = new StringBuffer(); + String typeId = param.get("typeId"); + String industryId = param.get("industryId"); + String operatorCode = param.get("operatorCode"); + // 未传入操作员code返回null + if (Validates.isEmpty(operatorCode)) + { + return null; + } + + addTypeId(q, typeId); + addIndustryId(q, industryId); + + // 分享模板限定为自己 + String define = "shareDept:*," + operatorCode + ",*"; + + if (q.length() > 0) + { + q.append(define); + query.set("q", q.toString()); + } + else + { + query.set("q", define); + } + query.setStart((page - 1) * pageSize); + query.setRows(pageSize); + + return returnSolrData(solrServer, query, page, pageSize); + } + + /** + * 查询全部模板 + * + * @param page + * @param pageSize + * @param param + * @return + */ + public static PageResult queryAllTemplate(int page, int pageSize, Map param) + { + HttpSolrClient solrServer = buildMediaCoreServer(); + SolrQuery query = new SolrQuery(); + StringBuffer q = new StringBuffer(); + String keyword = param.get("keyword"); + String typeId = param.get("typeId"); + String fileType = param.get("fileType"); + String sort = param.get("sort"); + String industryId = param.get("industryId"); + String mediaUrl = param.get("mediaUrl"); + + addTypeId(q, typeId); + addIndustryId(q, industryId); + addFileType(q, fileType); + addKeyword(q, keyword); + addMediaUrl(q, mediaUrl); + + if (typeId.equals("3")) + { + String oddEven = param.get("oddEven"); + if (!oddEven.equals("-1")) + { + addOddEven(q, oddEven); + } + } + + addSort(query, sort); + + // 所有模板选定查询系统模板和精品模板 + String define = "(templateType:110 and templateType:100)"; + + if (q.length() > 0) + { + q.append(define); + query.set("q", q.toString()); + } + else + { + query.set("q", define); + } + query.setStart((page - 1) * pageSize); + query.setRows(pageSize); + query.setSort(new SolrQuery.SortClause("createTime", "desc")); + + return returnSolrData(solrServer, query, page, pageSize); + } + + /** + * 根据id删除模板 + * + * @param mediaId + */ + public static void deleteTemplateById(String mediaId) + { + if (Validates.isNotEmpty(mediaId)) + { + HttpSolrClient solrServer = null; + try + { + solrServer = buildMediaCoreServer(); + solrServer.deleteByQuery("mediaId:" + mediaId); + solrServer.commit(); + } + catch (Exception e) + { + log.error("根据模板id[" + mediaId + "]删除solr模板数据失败", e); + } + finally + { + if (solrServer != null) + { + try + { + solrServer.close(); + } + catch (IOException e) + { + log.error("更新solr模板分数后关闭solrServer失败", e); + } + } + } + } + } + + /** + * 根据id删除作品 + * + * @param mediaId + */ + public static void deleteWorksById(String worksId) + { + if (Validates.isNotEmpty(worksId)) + { + HttpSolrClient solrServer = null; + try + { + solrServer = buildWorksCoreServer(); + solrServer.deleteByQuery("worksId:" + worksId); + solrServer.commit(); + } + catch (Exception e) + { + log.error("根据作品id[" + worksId + "]删除solr作品数据失败", e); + } + finally + { + if (solrServer != null) + { + try + { + solrServer.close(); + } + catch (IOException e) + { + log.error("更新solr模板分数后关闭solrServer失败", e); + } + } + } + } + } + + public static void refreshSolrData() + { + try + { + HttpGet worksGet = new HttpGet( + SOLR_PATH + "works_core/dataimport?command=full-import&clean=true&commit=true&core=works_core&entity=des_works_file&name=dataimport"); + worksGet.execute(); + + HttpGet mediaGet = new HttpGet( + SOLR_PATH + "media_core/dataimport?command=full-import&clean=true&commit=true&core=media_core&entity=media_template&name=dataimport"); + mediaGet.execute(); + } + catch (Exception e) + { + log.error("刷新solr数据失败", e); + } + } + + /** + * 添加设计类型 + * + * @param q + * @param typeId + */ + private static void addTypeId(StringBuffer q, String typeId) + { + if (Validates.isNotEmpty(typeId) && !"-1".equals(typeId)) + { + q.append("typeId:"); + q.append(typeId); + q.append(" && "); + } + } + + /** + * 添加行业 + * + * @param q + * @param industryId + */ + private static void addIndustryId(StringBuffer q, String industryId) + { + if (Validates.isNotEmpty(industryId) && !"-1".equals(industryId)) + { + q.append("industryId:"); + q.append(industryId); + q.append(" && "); + } + } + + /** + * 添加设计师 + * + * @param q + * @param designer + */ + private static void addDesigner(StringBuffer q, String designer) + { + if (Validates.isNotEmpty(designer)) + { + q.append("designer:"); + q.append(designer); + q.append(" && "); + } + } + + /** + * 添加文件类型 + * + * @param q + * @param fileType + */ + private static void addFileType(StringBuffer q, String fileType) + { + if (Validates.isNotEmpty(fileType)) + { + fileType = fileType.toLowerCase(); + if (!"pdf".equals(fileType)) + { + q.append("("); + q.append("{!join fromIndex=works_core toIndex=media_core from=templateId to=mediaId}fileType:"); + q.append(fileType); + q.append(")"); + q.append(" && "); + } + } + } + + /** + * 添加关键字 + * + * @param q + * @param keyword + */ + private static void addKeyword(StringBuffer q, String keyword) + { + if (Validates.isNotEmpty(keyword)) + { + if (Validates.isNumeric(keyword)) + { + q.append("mediaId:"); + q.append(keyword); + } + else + { + q.append("("); + q.append("keywordName:"); + q.append(keyword); + q.append(" & "); + q.append("attributeName:"); + q.append(keyword); + q.append(" & "); + q.append("industrySubName:"); + q.append(keyword); + q.append(")"); + } + q.append(" && "); + } + } + + /** + * 添加图片后缀过滤 + * + * @param q + * @param keyword + */ + private static void addMediaUrl(StringBuffer q, String mediaUrl) + { + if (Validates.isNotEmpty(mediaUrl)) + { + q.append("mediaUrl:"); + q.append(mediaUrl); + q.append(" && "); + } + } + + /** + * 添加排序 + * + * @param query + * @param sort + */ + private static void addSort(SolrQuery query, String sort) + { + if (Validates.isNotEmpty(sort)) + { + switch (sort) + { + case "1":// 时间降序 + query.setSort("createTime", SolrQuery.ORDER.desc); + break; + case "2":// id升序 + query.setSort("id", SolrQuery.ORDER.asc); + break; + case "3":// 评分最高 + query.setSort("product(score,1)", SolrQuery.ORDER.desc); + break; + case "4":// 精品优先 + query.setSort("product(templateType,1)", SolrQuery.ORDER.desc); + break; + default: + break; + } + } + } + + /** + * + * [简要描述]:添加模板
            + * [详细描述]:
            + * + * @author hc + * @param q + * @param oddEven + */ + private static void addOddEven(StringBuffer q, String oddEven) + { + if (Validates.isNotEmpty(oddEven)) + { + q.append("oddEven:"); + q.append(oddEven); + q.append(" && "); + } + } + + /** + * 根据solrServer和查询条件返回查询数据 + * + * @param solrServer + * @param query + * @param page + * @param pageSize + * @return + */ + private static PageResult returnSolrData(HttpSolrClient solrServer, SolrQuery query, int page, int pageSize) + { + try + { + QueryResponse response = solrServer.query(query); + SolrDocumentList solrDocumentList = response.getResults(); + int total = (int) solrDocumentList.getNumFound(); + List newList = new ArrayList(); + List list = response.getBeans(MediaTemplateSolrModel.class); + for (MediaTemplateSolrModel model : list) + { + // 素材图片替换cdn域名 + if (Validates.isNotEmpty(model.getMediaUrl())) + { + String newUrl = model.getMediaUrl().replace(BaseConstants.OSS_URL, BaseConstants.CDN_URL); + model.setMediaUrl(newUrl); + } + + newList.add(model); + } + + PageResult pageResult = PageBuilder.newResult(total, page, pageSize, newList); + return pageResult; + } + catch (Exception e) + { + return null; + } + finally + { + if (solrServer != null) + { + try + { + solrServer.close(); + } + catch (IOException e) + { + log.error("查询后关闭solrServer失败", e); + } + } + } + } + + private static HttpSolrClient buildMediaCoreServer() + { + return new HttpSolrClient.Builder(SOLR_PATH + "media_core/").build(); + } + + private static HttpSolrClient buildWorksCoreServer() + { + return new HttpSolrClient.Builder(SOLR_PATH + "works_core/").build(); + } + + public static void main(String[] args) + { + new ErpClassService("曾志强"); + // new ErpClassService("N_20220822101741", "测试用户", statusEnum.TO_BE_DESIGNED.getCode(), + // "测试"); + } + +} diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/util/http/HttpClientResult.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/util/http/HttpClientResult.java new file mode 100644 index 0000000..976f0df --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/util/http/HttpClientResult.java @@ -0,0 +1,48 @@ +package com.zhiqim.yangcai.util.http; + +import java.io.Serializable; + +public class HttpClientResult implements Serializable { + /** + * 响应状态码 + */ + private int code; + + /** + * 响应数据 + */ + private String data; + + public HttpClientResult() { + } + + public HttpClientResult(int code) { + this.code = code; + } + + public HttpClientResult(int code, String data) { + this.code = code; + this.data = data; + } + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public String getData() { + return data; + } + + public void setData(String data) { + this.data = data; + } + + @Override + public String toString() { + return "HttpClientResult [code=" + code + ", data=" + data + "]"; + } +} \ No newline at end of file diff --git a/Yangcai365_design/src/service/com/zhiqim/yangcai/util/http/HttpClientUtils.java b/Yangcai365_design/src/service/com/zhiqim/yangcai/util/http/HttpClientUtils.java new file mode 100644 index 0000000..81c206d --- /dev/null +++ b/Yangcai365_design/src/service/com/zhiqim/yangcai/util/http/HttpClientUtils.java @@ -0,0 +1,573 @@ +package com.zhiqim.yangcai.util.http; + +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.apache.http.HttpStatus; +import org.apache.http.NameValuePair; +import org.apache.http.client.ResponseHandler; +import org.apache.http.client.config.RequestConfig; +import org.apache.http.client.entity.UrlEncodedFormEntity; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.client.methods.HttpDelete; +import org.apache.http.client.methods.HttpEntityEnclosingRequestBase; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.client.methods.HttpPut; +import org.apache.http.client.methods.HttpRequestBase; +import org.apache.http.client.utils.URIBuilder; +import org.apache.http.entity.StringEntity; +import org.apache.http.impl.client.BasicResponseHandler; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClients; +import org.apache.http.message.BasicNameValuePair; +import org.apache.http.util.EntityUtils; + +public class HttpClientUtils +{ + + // 编码格式。发送编码格式统一用UTF-8 + private static final String ENCODING = "GBK"; + + // 设置连接超时时间,单位毫秒。 + private static final int CONNECT_TIMEOUT = 6000; + + // 请求获取数据的超时时间(即响应时间),单位毫秒。 + private static final int SOCKET_TIMEOUT = 6000; + + /** + * 发送get请求;不带请求头和请求参数 + * + * @param url 请求地址 + * @return + * @throws Exception + */ + public static HttpClientResult doGet(String url) throws Exception + { + return doGet(url, null, null); + } + + /** + * 发送get请求;带请求参数 + * + * @param url 请求地址 + * @param params 请求参数集合 + * @return + * @throws Exception + */ + public static HttpClientResult doGet(String url, Map params) throws Exception + { + return doGet(url, null, params); + } + + /** + * 发送get请求;带请求头和请求参数 + * + * @param url 请求地址 + * @param headers 请求头集合 + * @param params 请求参数集合 + * @return + * @throws Exception + */ + public static HttpClientResult doGet(String url, Map headers, Map params) throws Exception + { + // 创建httpClient对象 + CloseableHttpClient httpClient = HttpClients.createDefault(); + + // 创建访问的地址 + URIBuilder uriBuilder = new URIBuilder(url); + if (params != null) + { + Set> entrySet = params.entrySet(); + for (Map.Entry entry : entrySet) + { + uriBuilder.setParameter(entry.getKey(), entry.getValue()); + } + } + + // 创建http对象 + HttpGet httpGet = new HttpGet(uriBuilder.build()); + /** + * setConnectTimeout:设置连接超时时间,单位毫秒。 + * setConnectionRequestTimeout:设置从connect Manager(连接池)获取Connection + * 超时时间,单位毫秒。这个属性是新加的属性,因为目前版本是可以共享连接池的。 + * setSocketTimeout:请求获取数据的超时时间(即响应时间),单位毫秒。 如果访问一个接口,多少时间内无法返回数据,就直接放弃此次调用。 + */ + RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(CONNECT_TIMEOUT).setSocketTimeout(SOCKET_TIMEOUT).build(); + httpGet.setConfig(requestConfig); + + // 设置请求头 + packageHeader(headers, httpGet); + + // 创建httpResponse对象 + CloseableHttpResponse httpResponse = null; + + try + { + // 执行请求并获得响应结果 + return getHttpClientResult(httpResponse, httpClient, httpGet); + } + finally + { + // 释放资源 + release(httpResponse, httpClient); + } + } + + /** + * 发送get请求;带请求头和请求参数 + * + * @param url 请求地址 + * @param headers 请求头集合 + * @param params 请求参数集合 + * @return + * @throws Exception + */ + public static HttpClientResult doGetParamsObject(String url, Map headers, Map params) throws Exception + { + // 创建httpClient对象 + CloseableHttpClient httpClient = HttpClients.createDefault(); + + // 创建访问的地址 + URIBuilder uriBuilder = new URIBuilder(url); + if (params != null) + { + Set> entrySet = params.entrySet(); + for (Map.Entry entry : entrySet) + { + uriBuilder.setParameter(entry.getKey(), entry.getValue() + ""); + } + } + + // 创建http对象 + HttpGet httpGet = new HttpGet(uriBuilder.build()); + /** + * setConnectTimeout:设置连接超时时间,单位毫秒。 + * setConnectionRequestTimeout:设置从connect Manager(连接池)获取Connection + * 超时时间,单位毫秒。这个属性是新加的属性,因为目前版本是可以共享连接池的。 + * setSocketTimeout:请求获取数据的超时时间(即响应时间),单位毫秒。 如果访问一个接口,多少时间内无法返回数据,就直接放弃此次调用。 + */ + RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(CONNECT_TIMEOUT).setSocketTimeout(SOCKET_TIMEOUT).build(); + httpGet.setConfig(requestConfig); + + // 设置请求头 + packageHeader(headers, httpGet); + + // 创建httpResponse对象 + CloseableHttpResponse httpResponse = null; + + try + { + // 执行请求并获得响应结果 + return getHttpClientResult(httpResponse, httpClient, httpGet); + } + finally + { + // 释放资源 + release(httpResponse, httpClient); + } + } + + /** + * 发送post请求;不带请求头和请求参数 + * + * @param url 请求地址 + * @return + * @throws Exception + */ + public static HttpClientResult doPost(String url) throws Exception + { + return doPost(url, null, null); + } + + /** + * 发送post请求;带请求参数 + * + * @param url 请求地址 + * @param params 参数集合 + * @return + * @throws Exception + */ + public static HttpClientResult doPost(String url, Map params) throws Exception + { + return doPost(url, null, params); + } + + /** + * 发送post请求;带请求头和请求参数 + * + * @param url 请求地址 + * @param headers 请求头集合 + * @param params 请求参数集合 + * @return + * @throws Exception + */ + public static HttpClientResult doPost(String url, Map headers, Map params) throws Exception + { + // 创建httpClient对象 + CloseableHttpClient httpClient = HttpClients.createDefault(); + + // 创建http对象 + HttpPost httpPost = new HttpPost(url); + /** + * setConnectTimeout:设置连接超时时间,单位毫秒。 + * setConnectionRequestTimeout:设置从connect Manager(连接池)获取Connection + * 超时时间,单位毫秒。这个属性是新加的属性,因为目前版本是可以共享连接池的。 + * setSocketTimeout:请求获取数据的超时时间(即响应时间),单位毫秒。 如果访问一个接口,多少时间内无法返回数据,就直接放弃此次调用。 + */ + RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(CONNECT_TIMEOUT).setSocketTimeout(SOCKET_TIMEOUT).build(); + httpPost.setConfig(requestConfig); + // 设置请求头 + /* + * httpPost.setHeader("Cookie", ""); + * httpPost.setHeader("Connection", "keep-alive"); + * httpPost.setHeader("Accept", "application/json"); + * httpPost.setHeader("Accept-Language", "zh-CN,zh;q=0.9"); + * httpPost.setHeader("Accept-Encoding", "gzip, deflate, br"); + * httpPost.setHeader("User-Agent", + * "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36" + * ); + */ + packageHeader(headers, httpPost); + + // 封装请求参数 + packageParam(params, httpPost); + // 创建httpResponse对象 + CloseableHttpResponse httpResponse = null; + + try + { + // 执行请求并获得响应结果 + return getHttpClientResult(httpResponse, httpClient, httpPost); + } + finally + { + // 释放资源 + release(httpResponse, httpClient); + } + } + + /** + * 发送post请求;带请求头和请求参数 + * + * @param url 请求地址 + * @param headers 请求头集合 + * @param params 请求参数集合 + * @return + * @throws Exception + */ + public static HttpClientResult doPostObject(String url, Map headers, Map params) throws Exception + { + // 创建httpClient对象 + CloseableHttpClient httpClient = HttpClients.createDefault(); + + // 创建http对象 + HttpPost httpPost = new HttpPost(url); + /** + * setConnectTimeout:设置连接超时时间,单位毫秒。 + * setConnectionRequestTimeout:设置从connect Manager(连接池)获取Connection + * 超时时间,单位毫秒。这个属性是新加的属性,因为目前版本是可以共享连接池的。 + * setSocketTimeout:请求获取数据的超时时间(即响应时间),单位毫秒。 如果访问一个接口,多少时间内无法返回数据,就直接放弃此次调用。 + */ + RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(CONNECT_TIMEOUT).setSocketTimeout(SOCKET_TIMEOUT).build(); + httpPost.setConfig(requestConfig); + // 设置请求头 + /* + * httpPost.setHeader("Cookie", ""); + * httpPost.setHeader("Connection", "keep-alive"); + * httpPost.setHeader("Accept", "application/json"); + * httpPost.setHeader("Accept-Language", "zh-CN,zh;q=0.9"); + * httpPost.setHeader("Accept-Encoding", "gzip, deflate, br"); + * httpPost.setHeader("User-Agent", + * "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36" + * ); + */ + // packageHeader(headers, httpPost); + httpPost.setHeader("", ""); + // 封装请求参数 + // packageParam(params, httpPost); + // 创建httpResponse对象 + CloseableHttpResponse httpResponse = null; + + try + { + // 执行请求并获得响应结果 + return getHttpClientResult(httpResponse, httpClient, httpPost); + } + finally + { + // 释放资源 + release(httpResponse, httpClient); + } + } + + public static String doPostWithJson(String url, String json) + { + return doPostWithJson(url, null, json); + } + + public static String doPostWithJson(String url, Map headers, String json) + { + String returnValue = ""; + CloseableHttpClient httpClient = HttpClients.createDefault(); + ResponseHandler responseHandler = new BasicResponseHandler(); + try + { + httpClient = HttpClients.createDefault(); + HttpPost httpPost = new HttpPost(url); + + RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(CONNECT_TIMEOUT).setSocketTimeout(SOCKET_TIMEOUT).build(); + httpPost.setConfig(requestConfig); + StringEntity requestEntity = new StringEntity(json, "utf-8"); + requestEntity.setContentEncoding("UTF-8"); + httpPost.setHeader("Content-type", "application/json"); + packageHeader(headers, httpPost); + httpPost.setEntity(requestEntity); + + // 第四步:发送HttpPost请求,获取返回值 + returnValue = httpClient.execute(httpPost, responseHandler); // 调接口获取返回值时,必须用此方法 + + } + catch (Exception e) + { + e.printStackTrace(); + } + + finally + { + try + { + httpClient.close(); + } + catch (IOException e) + { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + // 第五步:处理返回值 + return returnValue; + } + + public static String doPostWithXml(String url, String xml) + { + CloseableHttpClient client = null; + CloseableHttpResponse resp = null; + try + { + HttpPost httpPost = new HttpPost(url); + httpPost.setHeader("Content-Type", "text/xml; charset=UTF-8"); + client = HttpClients.createDefault(); + StringEntity entityParams = new StringEntity(xml, "utf-8"); + httpPost.setEntity(entityParams); + client = HttpClients.createDefault(); + resp = client.execute(httpPost); + String resultMsg = EntityUtils.toString(resp.getEntity(), "utf-8"); + return resultMsg; + } + catch (Exception e) + { + e.printStackTrace(); + } + finally + { + try + { + if (client != null) + { + client.close(); + } + if (resp != null) + { + resp.close(); + } + } + catch (IOException e) + { + e.printStackTrace(); + } + } + return null; + } + + /** + * 发送put请求;不带请求参数 + * + * @param url 请求地址 + * @return + * @throws Exception + */ + public static HttpClientResult doPut(String url) throws Exception + { + return doPut(url); + } + + /** + * 发送put请求;带请求参数 + * + * @param url 请求地址 + * @param params 参数集合 + * @return + * @throws Exception + */ + public static HttpClientResult doPut(String url, Map params) throws Exception + { + CloseableHttpClient httpClient = HttpClients.createDefault(); + HttpPut httpPut = new HttpPut(url); + RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(CONNECT_TIMEOUT).setSocketTimeout(SOCKET_TIMEOUT).build(); + httpPut.setConfig(requestConfig); + + packageParam(params, httpPut); + CloseableHttpResponse httpResponse = null; + + try + { + return getHttpClientResult(httpResponse, httpClient, httpPut); + } + finally + { + release(httpResponse, httpClient); + } + } + + /** + * 发送delete请求;不带请求参数 + * + * @param url 请求地址 + * @return + * @throws Exception + */ + public static HttpClientResult doDelete(String url) throws Exception + { + CloseableHttpClient httpClient = HttpClients.createDefault(); + HttpDelete httpDelete = new HttpDelete(url); + RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(CONNECT_TIMEOUT).setSocketTimeout(SOCKET_TIMEOUT).build(); + httpDelete.setConfig(requestConfig); + + CloseableHttpResponse httpResponse = null; + try + { + return getHttpClientResult(httpResponse, httpClient, httpDelete); + } + finally + { + release(httpResponse, httpClient); + } + } + + /** + * 发送delete请求;带请求参数 + * + * @param url 请求地址 + * @param params 参数集合 + * @return + * @throws Exception + */ + public static HttpClientResult doDelete(String url, Map params) throws Exception + { + if (params == null) + { + params = new HashMap(); + } + + params.put("_method", "delete"); + return doPost(url, params); + } + + /** + * Description: 封装请求头 + * + * @param params + * @param httpMethod + */ + public static void packageHeader(Map params, HttpRequestBase httpMethod) + { + // 封装请求头 + if (params != null) + { + Set> entrySet = params.entrySet(); + for (Map.Entry entry : entrySet) + { + // 设置到请求头到HttpRequestBase对象中 + httpMethod.setHeader(entry.getKey(), entry.getValue()); + } + } + } + + /** + * Description: 封装请求参数 + * + * @param params + * @param httpMethod + * @throws UnsupportedEncodingException + */ + public static void packageParam(Map params, HttpEntityEnclosingRequestBase httpMethod) throws UnsupportedEncodingException + { + // 封装请求参数 + if (params != null) + { + List nvps = new ArrayList(); + Set> entrySet = params.entrySet(); + for (Map.Entry entry : entrySet) + { + nvps.add(new BasicNameValuePair(entry.getKey(), entry.getValue())); + } + + // 设置到请求的http对象中 + httpMethod.setEntity(new UrlEncodedFormEntity(nvps, ENCODING)); + } + } + + /** + * Description: 获得响应结果 + * + * @param httpResponse + * @param httpClient + * @param httpMethod + * @return + * @throws Exception + */ + public static HttpClientResult getHttpClientResult(CloseableHttpResponse httpResponse, CloseableHttpClient httpClient, HttpRequestBase httpMethod) + throws Exception + { + // 执行请求 + httpResponse = httpClient.execute(httpMethod); + + // 获取返回结果 + if (httpResponse != null && httpResponse.getStatusLine() != null) + { + String content = ""; + if (httpResponse.getEntity() != null) + { + content = EntityUtils.toString(httpResponse.getEntity(), ENCODING); + } + return new HttpClientResult(httpResponse.getStatusLine().getStatusCode(), content); + } + return new HttpClientResult(HttpStatus.SC_INTERNAL_SERVER_ERROR); + } + + /** + * Description: 释放资源 + * + * @param httpResponse + * @param httpClient + * @throws IOException + */ + public static void release(CloseableHttpResponse httpResponse, CloseableHttpClient httpClient) throws IOException + { + // 释放资源 + if (httpResponse != null) + { + httpResponse.close(); + } + if (httpClient != null) + { + httpClient.close(); + } + } +} \ No newline at end of file