修改包名从NewCitizen变为newcitizen。
This commit is contained in:
		
							
								
								
									
										87
									
								
								code/backend/NewCitizenIdentify/.vscode/fileheader.template.js
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										87
									
								
								code/backend/NewCitizenIdentify/.vscode/fileheader.template.js
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,87 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * @Author: Kane
 | 
				
			||||||
 | 
					 * @Date: 2025-03-16 00:35:09
 | 
				
			||||||
 | 
					 * @LastEditors: Kane
 | 
				
			||||||
 | 
					 * @FilePath: /cpicxim-huixiabao/.vscode/fileheader.template.js
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					 * 
 | 
				
			||||||
 | 
					 * Copyright (c) ${2023} by Kane, All Rights Reserved. 
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * This file is generated by VSCode extension: Fileheader Pro
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * These comments can help you write your own template with type hint
 | 
				
			||||||
 | 
					 * @typedef {Object} FileheaderVariable  Fileheader variables
 | 
				
			||||||
 | 
					 * @property {string} birthtime file birth time. will get it from VCS or fallback to filesystem when it is not available
 | 
				
			||||||
 | 
					 * @property {string} mtime file modification time. will get it from VCS or fallback to filesystem when it is not available
 | 
				
			||||||
 | 
					 * @property {string} authorName if the file is tracked by VCS, it will get the author name from VCS. else it will get it from current user name
 | 
				
			||||||
 | 
					 * @property {string} authorEmail if the file is tracked by VCS, it will get the author email from VCS. else it will get it from current user email
 | 
				
			||||||
 | 
					 * @property {string} userName else it will get it from current user name
 | 
				
			||||||
 | 
					 * @property {string} userEmail  user email is from VSCode config, and fallback to VCS config
 | 
				
			||||||
 | 
					 * @property {string} companyName
 | 
				
			||||||
 | 
					 * @property {string} projectName name of current project
 | 
				
			||||||
 | 
					 * @property {string} filePath the file path, relative to project root with POSIX path separator
 | 
				
			||||||
 | 
					 * @property {string} dirPath the directory path, relative to project root with POSIX path separator
 | 
				
			||||||
 | 
					 * @property {string} fileName filename with extension
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					 /**
 | 
				
			||||||
 | 
					 * @typedef {string | number | null | undefined | Template | boolean} TemplateInterpolation NOTE: boolean or falsy value will render empty string
 | 
				
			||||||
 | 
					 * 
 | 
				
			||||||
 | 
					 * @typedef {{ strings: TemplateStringsArray; interpolations: TemplateInterpolation[]; }} Template
 | 
				
			||||||
 | 
					 * @typedef {(strings: TemplateStringsArray, ...values: any[]) => string} ITemplateFunction
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * Please confirm your provider extends from globalThis.FileheaderLanguageProvider
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					class CustomLanguageProvider extends globalThis.FileheaderLanguageProvider {
 | 
				
			||||||
 | 
					  /**
 | 
				
			||||||
 | 
					   * @type {string[]}
 | 
				
			||||||
 | 
					   */
 | 
				
			||||||
 | 
					  languages = [
 | 
				
			||||||
 | 
					    "java",
 | 
				
			||||||
 | 
					    "javascript",
 | 
				
			||||||
 | 
					    "typescript",
 | 
				
			||||||
 | 
					    "javascriptreact",
 | 
				
			||||||
 | 
					    "typescriptreact",
 | 
				
			||||||
 | 
					  ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  /**
 | 
				
			||||||
 | 
					   * @type {string=} the language block comment start string.
 | 
				
			||||||
 | 
					   * this is for future feature: support detect old custom template when custom template changes
 | 
				
			||||||
 | 
					   */
 | 
				
			||||||
 | 
					  blockCommentStart = "/**";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  /**
 | 
				
			||||||
 | 
					   * @type {string=}
 | 
				
			||||||
 | 
					   */
 | 
				
			||||||
 | 
					  blockCommentEnd = "*/";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  /**
 | 
				
			||||||
 | 
					   * get your template when document language matched
 | 
				
			||||||
 | 
					   * @param {ITemplateFunction} tpl template function, it is a tagged function, support nested interpolation
 | 
				
			||||||
 | 
					   * @param {FileheaderVariable} variables template variables
 | 
				
			||||||
 | 
					   * @returns {Template}
 | 
				
			||||||
 | 
					   */
 | 
				
			||||||
 | 
					  getTemplate(tpl, variables) {
 | 
				
			||||||
 | 
					    // prettier-ignore
 | 
				
			||||||
 | 
					    return tpl
 | 
				
			||||||
 | 
					`/**
 | 
				
			||||||
 | 
					 * @Author: ${variables.authorName} <${variables.authorEmail}>
 | 
				
			||||||
 | 
					 * @Date: ${variables.birthtime}
 | 
				
			||||||
 | 
					 * @LastEditors: ${variables.userName}
 | 
				
			||||||
 | 
					 * @LastModified: ${variables.mtime}
 | 
				
			||||||
 | 
					 * @FilePath: ${variables.filePath}
 | 
				
			||||||
 | 
					 * @Description:
 | 
				
			||||||
 | 
					 * 
 | 
				
			||||||
 | 
					 *               Copyright (c) ${2025} by Kane All rights reserved
 | 
				
			||||||
 | 
					 */`;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// export your provider classes
 | 
				
			||||||
 | 
					module.exports = [CustomLanguageProvider];
 | 
				
			||||||
@@ -1,19 +1,22 @@
 | 
				
			|||||||
/*
 | 
					/**
 | 
				
			||||||
 * @Author: Kane
 | 
					 * @Author: Kane Wang <wangkane@qq.com>
 | 
				
			||||||
 * @Date: 2023-05-25 15:17:49
 | 
					 * @Date: 2023-05-26 18:40:36
 | 
				
			||||||
 * @LastEditors: Kane
 | 
					 * @LastEditors: Kane Wang
 | 
				
			||||||
 * @FilePath: /NewCitizenQueryResult/src/main/java/com/cpic/xim/web/controllers/NewCitizen/IdentifyNewCitizenRequest.java
 | 
					 * @LastModified: 2025-05-07 14:59:15
 | 
				
			||||||
 | 
					 * @FilePath: src/main/java/com/cpic/xim/web/controllers/NewCitizen/IdentifyNewCitizenRequest.java
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
 * 
 | 
					 * 
 | 
				
			||||||
 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
					 *               Copyright (c) 2025 by Kane All rights reserved
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
package com.cpic.xim.web.controllers.NewCitizen;
 | 
					package com.cpic.xim.web.controllers.newcitizen;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import com.fasterxml.jackson.annotation.JsonProperty;
 | 
					import com.fasterxml.jackson.annotation.JsonProperty;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public class IdentifyNewCitizenRequest
 | 
					public class IdentifyNewCitizenRequest
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    public IdentifyNewCitizenRequest() {}
 | 
					    public IdentifyNewCitizenRequest()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					    }  
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public String getIdCardNo()  
 | 
					    public String getIdCardNo()  
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
@@ -35,9 +38,9 @@ public class IdentifyNewCitizenRequest
 | 
				
			|||||||
        this.name = name;
 | 
					        this.name = name;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @JsonProperty("idcard_no")
 | 
					    @JsonProperty( "idcard_no" )
 | 
				
			||||||
    private String idCardNo;
 | 
					    private String idCardNo;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @JsonProperty("name")
 | 
					    @JsonProperty( "name" )
 | 
				
			||||||
    private String name;
 | 
					    private String name;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -7,7 +7,7 @@
 | 
				
			|||||||
 * 
 | 
					 * 
 | 
				
			||||||
 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
					 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
package com.cpic.xim.web.controllers.NewCitizen;
 | 
					package com.cpic.xim.web.controllers.newcitizen;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import com.fasterxml.jackson.annotation.JsonProperty;
 | 
					import com.fasterxml.jackson.annotation.JsonProperty;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,14 +1,14 @@
 | 
				
			|||||||
/*
 | 
					/**
 | 
				
			||||||
 * @Author: Kane
 | 
					 * @Author: Kane
 | 
				
			||||||
 * @Date: 2023-05-25 12:09:27
 | 
					 * @Date: 2023-05-25 12:09:27
 | 
				
			||||||
 * @LastEditors: Kane
 | 
					* @LastEditors: Kane
 | 
				
			||||||
 * @FilePath: /NewCitizenQueryResult/src/main/java/com/cpic/xim/web/controllers/NewCitizen/QueryResultController.java
 | 
					* @FilePath: /NewCitizenIdentify/src/main/java/com/cpic/xim/web/controllers/NewCitizen/QueryResultController.java
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
 * 
 | 
					 * @
 | 
				
			||||||
 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
					 *   @Copyright (c) ${2023} by Kane, All Rights Reserved.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
package com.cpic.xim.web.controllers.NewCitizen;
 | 
					package com.cpic.xim.web.controllers.newcitizen;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import jakarta.servlet.http.HttpServletResponse;
 | 
					import jakarta.servlet.http.HttpServletResponse;
 | 
				
			||||||
import org.springframework.stereotype.Controller;
 | 
					import org.springframework.stereotype.Controller;
 | 
				
			||||||
@@ -23,37 +23,37 @@ import com.cpic.xim.utils.newcitizen.*;
 | 
				
			|||||||
@Controller
 | 
					@Controller
 | 
				
			||||||
public class QueryResultController
 | 
					public class QueryResultController
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    @RequestMapping("/save_score.do")
 | 
					    @RequestMapping( "/save_score.do" )
 | 
				
			||||||
    public void saveQueryResult(HttpServletResponse response, @RequestBody QueryResultRequest result )
 | 
					    public void saveQueryResult( HttpServletResponse response, @RequestBody QueryResultRequest result )
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        response.setStatus(HttpServletResponse.SC_OK);
 | 
					        response.setStatus( HttpServletResponse.SC_OK );
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @RequestMapping("/identify.do")
 | 
					    @RequestMapping( "/identify.do" )
 | 
				
			||||||
    @ResponseBody
 | 
					    @ResponseBody
 | 
				
			||||||
    public IdentifyNewCitizenResponse identifyNewCitizen(@RequestBody IdentifyNewCitizenRequest request )
 | 
					    public IdentifyNewCitizenResponse identifyNewCitizen( @RequestBody IdentifyNewCitizenRequest request )
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        String idCardNo = request.getIdCardNo();
 | 
					        String                     idCardNo = request.getIdCardNo();
 | 
				
			||||||
        String name = request.getName();
 | 
					        String                     name     = request.getName();
 | 
				
			||||||
        IdentifyResult result = null;
 | 
					        IdentifyResult             result   = null;
 | 
				
			||||||
        IdentifyNewCitizenResponse response = new IdentifyNewCitizenResponse();
 | 
					        IdentifyNewCitizenResponse response = new IdentifyNewCitizenResponse();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        try
 | 
					        try
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            result = NewCitizenUitls.identifyNewCitizen(idCardNo, name);
 | 
					            result = NewCitizenUitls.identifyNewCitizen( idCardNo, name );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            response.setSuccess(true);
 | 
					            response.setSuccess( true );
 | 
				
			||||||
            response.setMessage("调用成功");
 | 
					            response.setMessage( "调用成功" );
 | 
				
			||||||
            response.setCitizenType(result.getCitizenType());
 | 
					            response.setCitizenType( result.getCitizenType() );
 | 
				
			||||||
            response.setScore(result.getScore());
 | 
					            response.setScore( result.getScore() );
 | 
				
			||||||
            response.setExpireDate(result.getExpireDate());
 | 
					            response.setExpireDate( result.getExpireDate() );
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        catch ( Exception error )
 | 
					        catch ( Exception error )
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            System.out.println( error.getMessage() );
 | 
					            System.out.println( error.getMessage() );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            response.setSuccess(false);
 | 
					            response.setSuccess( false );
 | 
				
			||||||
            response.setMessage(error.getMessage());
 | 
					            response.setMessage( error.getMessage() );
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return response;
 | 
					        return response;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
package com.cpic.xim.web.controllers.NewCitizen;
 | 
					package com.cpic.xim.web.controllers.newcitizen;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import com.fasterxml.jackson.annotation.JsonProperty;
 | 
					import com.fasterxml.jackson.annotation.JsonProperty;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user