Просмотр исходного кода

汉字转拼音,多音字bug解决,帮助中心-小鹿助手接口

LiTaohong 6 лет назад
Родитель
Сommit
5098fc42c7
37 измененных файлов с 437 добавлено и 153 удалено
  1. 1 1
      app/public-health-server/src/main/resources/application.yml
  2. 10 10
      app/public-health-server/src/main/webapp/front/js/lib/plugins/dataTables/jquery.dataTables.js
  3. 2 2
      app/public-health-server/src/main/webapp/front/js/lib/plugins/datapicker/bootstrap-datepicker.js
  4. 1 1
      app/public-health-server/src/main/webapp/front/js/lib/plugins/flot/jquery.flot.js
  5. 1 1
      app/public-health-server/src/main/webapp/front/js/lib/plugins/treeview/bootstrap-treeview.js
  6. 5 5
      app/public-health-server/src/main/webapp/front/js/lib/plugins/vue/vue.js
  7. 1 1
      business/base-service/src/main/java/com/yihu/jw/patient/dao/BasePatientMedicareCardDao.java
  8. 6 6
      common/common-entity/src/main/java/com/yihu/jw/entity/base/patient/HelpCenterDO.java
  9. 9 8
      common/common-entity/src/main/java/com/yihu/jw/entity/base/patient/PatientMedicareCardDO.java
  10. 4 0
      common/common-request-mapping/src/main/java/com/yihu/jw/rm/base/BaseRequestMapping.java
  11. 8 7
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/patient/PatientMedicareCardVO.java
  12. 1 1
      gateway/ag-basic/src/main/resources/application.yml
  13. 1 1
      server/svr-authentication/src/main/resources/application.yml
  14. 1 1
      svr/svr-manage/src/main/resources/application.yml
  15. 1 1
      svr/svr-manage/src/main/resources/webapp/common/js/jquery/jquery.form.3.51.0.js
  16. 10 10
      svr/svr-manage/src/main/resources/webapp/common/js/plugins/dataTables/jquery.dataTables.js
  17. 2 2
      svr/svr-manage/src/main/resources/webapp/common/js/plugins/datapicker/bootstrap-datepicker.js
  18. 1 1
      svr/svr-manage/src/main/resources/webapp/common/js/plugins/flot/jquery.flot.js
  19. 1 1
      svr/svr-manage/src/main/resources/webapp/common/js/plugins/treeview/bootstrap-treeview.js
  20. 4 4
      svr/svr-manage/src/main/resources/webapp/common/js/vue.js
  21. 4 4
      svr/svr-manage/src/main/resources/webapp/common/js/vue/vue.js
  22. 10 10
      svr/svr-manage/src/main/resources/webapp/hplus/js/plugins/dataTables/jquery.dataTables.js
  23. 2 2
      svr/svr-manage/src/main/resources/webapp/hplus/js/plugins/datapicker/bootstrap-datepicker.js
  24. 1 1
      svr/svr-manage/src/main/resources/webapp/hplus/js/plugins/flot/jquery.flot.js
  25. 1 1
      svr/svr-manage/src/main/resources/webapp/hplus/js/plugins/treeview/bootstrap-treeview.js
  26. 7 0
      svr/svr-patient/src/main/java/com/yihu/jw/patient/dao/settings/HelpCenterDao.java
  27. 24 7
      svr/svr-patient/src/main/java/com/yihu/jw/patient/endpoint/personal_info/PatientMedicareCardEndpoint.java
  28. 65 46
      svr/svr-patient/src/main/java/com/yihu/jw/patient/endpoint/settings/HelpCenterEndpoint.java
  29. 11 0
      svr/svr-patient/src/main/java/com/yihu/jw/patient/exception/settings/HelpCenterQesNotFoundException.java
  30. 62 10
      svr/svr-patient/src/main/java/com/yihu/jw/patient/service/personal_Info/PatientMedicareCardService.java
  31. 2 2
      svr/svr-patient/src/main/java/com/yihu/jw/patient/service/personal_Info/PatientService.java
  32. 79 0
      svr/svr-patient/src/main/java/com/yihu/jw/patient/service/settings/HelpCenterService.java
  33. 49 3
      svr/svr-patient/src/main/java/com/yihu/jw/patient/util/PinYinUtil.java
  34. 1 1
      svr/svr-patient/src/main/resources/bootstrap.yml
  35. 47 0
      svr/svr-patient/src/main/resources/multitone.properties
  36. 1 1
      svr/svr-statistics/src/main/java/com/yihu/wlyy/Application.java
  37. 1 1
      svr/svr-statistics/src/main/resources/application.yml

+ 1 - 1
app/public-health-server/src/main/resources/application.yml

@ -16,7 +16,7 @@ spring:
      max-active: 8 # Max number of connections that can be allocated by the pool at a given time. Use a negative value for no limit.
      max-idle: 8 # Max number of "idle" connections in the pool. Use a negative value to indicate an unlimited number of idle connections.
      max-wait: -1 # Maximum amount of time (in milliseconds) a connection allocation should block before throwing an exception when the pool is exhausted. Use a negative value to block indefinitely.
      min-idle: 1  # Target for the minimum number of idle connections to maintain in the pool. This setting only has an effect if it is positive.
      min-idle: 1  # Target for the minimum number of idle connections to maintain in the pool. This settings only has an effect if it is positive.
  application:
    name: app-health-server
    message: App IOT Server

+ 10 - 10
app/public-health-server/src/main/webapp/front/js/lib/plugins/dataTables/jquery.dataTables.js

@ -1178,7 +1178,7 @@
		if ( $.isPlainObject( mSource ) )
		{
			/* Unlike get, only the underscore (global) option is used for for
			 * setting data since we don't know the type here. This is why an object
			 * settings data since we don't know the type here. This is why an object
			 * option is not documented for `mData` (which is read/write), but it is
			 * for `mRender` which is read only.
			 */
@ -1220,7 +1220,7 @@
						b.splice( 0, i+1 );
						innerSrc = b.join('.');
						// Traverse each entry in the array setting the properties requested
						// Traverse each entry in the array settings the properties requested
						for ( var j=0, jLen=val.length ; j<jLen ; j++ )
						{
							o = {};
@ -7220,7 +7220,7 @@
				settings.ajax = url;
			}
			// No need to consider sAjaxSource here since DataTables gives priority
			// to `ajax` over `sAjaxSource`. So setting `ajax` here, renders any
			// to `ajax` over `sAjaxSource`. So settings `ajax` here, renders any
			// value of `sAjaxSource` redundant.
		} );
	} );
@ -7230,7 +7230,7 @@
	 * Load data from the newly set Ajax URL. Note that this method is only
	 * available when `ajax.url()` is used to set a URL. Additionally, this method
	 * has the same effect as calling `ajax.reload()` but is provided for
	 * convenience when setting a new URL. Like `ajax.reload()` it will
	 * convenience when settings a new URL. Like `ajax.reload()` it will
	 * automatically redraw the table once the remote data has been loaded.
	 *
	 * @returns {DataTables.Api} this
@ -9589,7 +9589,7 @@
		 * table has already been initialised, this parameter will cause DataTables
		 * to simply return the object that has already been set up - it will not take
		 * account of any changes you might have made to the initialisation object
		 * passed to DataTables (setting this parameter to true is an acknowledgement
		 * passed to DataTables (settings this parameter to true is an acknowledgement
		 * that you understand this). `destroy` can be used to reinitialise a table if
		 * you need.
		 *  @type boolean
@ -9999,7 +9999,7 @@
		/**
		 * This function allows you to 'post process' each row after it have been
		 * generated for each table draw, but before it is rendered on screen. This
		 * function might be used for setting the row class name etc.
		 * function might be used for settings the row class name etc.
		 *  @type function
		 *  @param {node} row "TR" element for the current row
		 *  @param {array} data Raw data array for this row
@ -10317,7 +10317,7 @@
		/**
		 * Number of rows to display on a single page when using pagination. If
		 * feature enabled (`lengthChange`) then the end user will be able to override
		 * this to a custom setting using a pop-up menu.
		 * this to a custom settings using a pop-up menu.
		 *  @type int
		 *  @default 10
		 *
@ -11396,7 +11396,7 @@
		 *    * Parameters:
		 *      * `{array|object}` The data source for the row
		 *      * `{string}` The type call data requested - this will be 'set' when
		 *        setting data or 'filter', 'display', 'type', 'sort' or undefined
		 *        settings data or 'filter', 'display', 'type', 'sort' or undefined
		 *        when gathering data. Note that when `undefined` is given for the
		 *        type DataTables expects to get the raw data for the object back<
		 *      * `{*}` Data to set when the second parameter is 'set'.
@ -12675,7 +12675,7 @@
		 * Server-side processing - number of records in the result set
		 * (i.e. before filtering), Use fnRecordsTotal rather than
		 * this property to get the value of the number of records, regardless of
		 * the server-side processing setting.
		 * the server-side processing settings.
		 *  @type int
		 *  @default 0
		 *  @private
@ -12686,7 +12686,7 @@
		 * Server-side processing - number of records in the current display set
		 * (i.e. after filtering). Use fnRecordsDisplay rather than
		 * this property to get the value of the number of records, regardless of
		 * the server-side processing setting.
		 * the server-side processing settings.
		 *  @type boolean
		 *  @default 0
		 *  @private

+ 2 - 2
app/public-health-server/src/main/webapp/front/js/lib/plugins/datapicker/bootstrap-datepicker.js

@ -649,11 +649,11 @@
				this.viewDate = new Date(this.o.endDate);
			if (fromArgs){
				// setting date by clicking
				// settings date by clicking
				this.setValue();
			}
			else if (dates.length){
				// setting date by typing
				// settings date by typing
				if (String(oldDates) !== String(this.dates))
					this._trigger('changeDate');
			}

+ 1 - 1
app/public-health-server/src/main/webapp/front/js/lib/plugins/flot/jquery.flot.js

@ -63,7 +63,7 @@
                    inverseTransform: null, // if transform is set, this should be the inverse function
                    min: null, // min. value to show, null means set automatically
                    max: null, // max. value to show, null means set automatically
                    autoscaleMargin: null, // margin in % to add if auto-setting min/max
                    autoscaleMargin: null, // margin in % to add if auto-settings min/max
                    ticks: null, // either [1, 3] or [[1, "a"], 3] or (fn: axis info -> ticks) or app. number of ticks for auto-ticks
                    tickFormatter: null, // fn: number -> string
                    labelWidth: null, // size of tick labels in pixels

+ 1 - 1
app/public-health-server/src/main/webapp/front/js/lib/plugins/treeview/bootstrap-treeview.js

@ -178,7 +178,7 @@
		},
		// On initialization recurses the entire tree structure
		// setting expanded / collapsed states based on initial levels
		// settings expanded / collapsed states based on initial levels
		_setInitialLevels: function(nodes, level) {
			if (!nodes) { return; }

+ 5 - 5
app/public-health-server/src/main/webapp/front/js/lib/plugins/vue/vue.js

@ -2897,7 +2897,7 @@ function callUpdatedHooks (queue) {
 * The queue will be processed after the entire tree has been patched.
 */
function queueActivatedComponent (vm) {
  // setting _inactive to false here so that a render function can
  // settings _inactive to false here so that a render function can
  // rely on checking whether it's in an inactive tree (e.g. router-view)
  vm._inactive = false;
  activatedChildren.push(vm);
@ -6070,8 +6070,8 @@ function updateAttrs (oldVnode, vnode) {
      setAttr(elm, key, cur);
    }
  }
  // #4391: in IE9, setting type can reset value for input[type=radio]
  // #6666: IE/Edge forces progress value down to 1 before setting a max
  // #4391: in IE9, settings type can reset value for input[type=radio]
  // #6666: IE/Edge forces progress value down to 1 before settings a max
  /* istanbul ignore if */
  if ((isIE9 || isEdge) && attrs.value !== oldAttrs.value) {
    setAttr(elm, 'value', attrs.value);
@ -6559,7 +6559,7 @@ function model (
  var type = el.attrsMap.type;
  {
    // inputs with type="file" are read only and setting the input's
    // inputs with type="file" are read only and settings the input's
    // value will throw an error.
    if (tag === 'input' && type === 'file') {
      warn$1(
@ -7008,7 +7008,7 @@ function updateStyle (oldVnode, vnode) {
  for (name in newStyle) {
    cur = newStyle[name];
    if (cur !== oldStyle[name]) {
      // ie9 setting to null has no effect, must use empty string
      // ie9 settings to null has no effect, must use empty string
      setProp(el, name, cur == null ? '' : cur);
    }
  }

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/patient/dao/BasePatientMedicareCardDao.java

@ -11,7 +11,7 @@ import java.util.Set;
/**
 * Created by Trick on 2018/8/31.
 */
public interface BasePatientMedicareCardDao extends PagingAndSortingRepository<PatientMedicareCardDO, String>, JpaSpecificationExecutor<PatientMedicareCardDO> {
public interface BasePatientMedicareCardDao extends PagingAndSortingRepository<PatientMedicareCardDO, Integer>, JpaSpecificationExecutor<PatientMedicareCardDO> {
    List<PatientMedicareCardDO> findByPatientCode(String patientCode);

+ 6 - 6
common/common-entity/src/main/java/com/yihu/jw/entity/base/patient/HelpCenterDO.java

@ -39,12 +39,12 @@ public class HelpCenterDO extends IntegerIdentityEntity {
    /**
	 * 有用次数
	 */
	private String usefulCount;
	private Integer usefulCount;
    /**
	 * 无用次数
	 */
	private String unusefulCount;
	private Integer unusefulCount;
	@Column(name = "parent_type")
@ -80,18 +80,18 @@ public class HelpCenterDO extends IntegerIdentityEntity {
    }
	@Column(name = "useful_count")
    public String getUsefulCount() {
    public Integer getUsefulCount() {
        return usefulCount;
    }
    public void setUsefulCount(String usefulCount) {
    public void setUsefulCount(Integer usefulCount) {
        this.usefulCount = usefulCount;
    }
	@Column(name = "unuseful_count")
    public String getUnusefulCount() {
    public Integer getUnusefulCount() {
        return unusefulCount;
    }
    public void setUnusefulCount(String unusefulCount) {
    public void setUnusefulCount(Integer unusefulCount) {
        this.unusefulCount = unusefulCount;
    }

+ 9 - 8
common/common-entity/src/main/java/com/yihu/jw/entity/base/patient/PatientMedicareCardDO.java

@ -98,9 +98,9 @@ public class PatientMedicareCardDO extends IntegerIdentityEntity {
	private String patientCode;
    /**
	 * 绑定密码
	 * 医社保卡缴交的城市
	 */
	private String password;
	private String cityCode;
    /**
	 * 微信openid,有些卡会绑定微信
@ -155,15 +155,16 @@ public class PatientMedicareCardDO extends IntegerIdentityEntity {
        this.patientCode = patientCode;
    }
	@Column(name = "password")
    public String getPassword() {
        return password;
    @Column(name = "city_code")
    public String getCityCode() {
        return cityCode;
    }
    public void setPassword(String password) {
        this.password = password;
    public void setCityCode(String cityCode) {
        this.cityCode = cityCode;
    }
	@Column(name = "wx_openid")
    @Column(name = "wx_openid")
    public String getWxOpenid() {
        return wxOpenid;
    }

+ 4 - 0
common/common-request-mapping/src/main/java/com/yihu/jw/rm/base/BaseRequestMapping.java

@ -490,6 +490,8 @@ public class BaseRequestMapping {
        public static final String unBindCard  = "/unBindCard";
        public static final String cardList  = "/cardList";
        public static final String cardOrgList  = "/cardOrgList";
        public static final String sortProList  = "/sortProList";
        public static final String sortCityList  = "/sortCityList";
    }
@ -512,6 +514,8 @@ public class BaseRequestMapping {
     */
    public static class HelpCenter extends Basic {
        public static final String PREFIX  = "/helpCenter";
        public static final String getAnswerByType  = "/getAnswerByType";
        public static final String commentAnswer  = "/commentAnswer";
    }

+ 8 - 7
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/patient/PatientMedicareCardVO.java

@ -46,10 +46,10 @@ public class PatientMedicareCardVO extends IntegerIdentityVO{
    private String patientCode;
    /**
	 * 绑定密码
	 * 医社保卡缴交的城市
	 */
	@ApiModelProperty(value = "绑定密码", example = "模块1")
    private String password;
	@ApiModelProperty(value = "医社保卡缴交的城市", example = "模块1")
    private String cityCode;
    /**
	 * 微信openid,有些卡会绑定微信
@ -105,11 +105,12 @@ public class PatientMedicareCardVO extends IntegerIdentityVO{
        this.patientCode = patientCode;
    }
    public String getPassword() {
        return password;
    public String getCityCode() {
        return cityCode;
    }
    public void setPassword(String password) {
        this.password = password;
    public void setCityCode(String cityCode) {
        this.cityCode = cityCode;
    }
    public String getWxOpenid() {

+ 1 - 1
gateway/ag-basic/src/main/resources/application.yml

@ -26,7 +26,7 @@ spring:
      max-active: 8 # Max number of connections that can be allocated by the pool at a given time. Use a negative value for no limit.
      max-idle: 8 # Max number of "idle" connections in the pool. Use a negative value to indicate an unlimited number of idle connections.
      max-wait: -1 # Maximum amount of time (in milliseconds) a connection allocation should block before throwing an exception when the pool is exhausted. Use a negative value to block indefinitely.
      min-idle: 1 # Target for the minimum number of idle connections to maintain in the pool. This setting only has an effect if it is positive.
      min-idle: 1 # Target for the minimum number of idle connections to maintain in the pool. This settings only has an effect if it is positive.
#  sleuth:
#    sampler:

+ 1 - 1
server/svr-authentication/src/main/resources/application.yml

@ -16,7 +16,7 @@ spring:
      max-active: 8 # Max number of connections that can be allocated by the pool at a given time. Use a negative value for no limit.
      max-idle: 8 # Max number of "idle" connections in the pool. Use a negative value to indicate an unlimited number of idle connections.
      max-wait: -1 # Maximum amount of time (in milliseconds) a connection allocation should block before throwing an exception when the pool is exhausted. Use a negative value to block indefinitely.
      min-idle: 1 # Target for the minimum number of idle connections to maintain in the pool. This setting only has an effect if it is positive.
      min-idle: 1 # Target for the minimum number of idle connections to maintain in the pool. This settings only has an effect if it is positive.
#logging:
#  level:

+ 1 - 1
svr/svr-manage/src/main/resources/application.yml

@ -36,7 +36,7 @@ spring:
      max-active: 8 # Max number of connections that can be allocated by the pool at a given time. Use a negative value for no limit.
      max-idle: 8 # Max number of "idle" connections in the pool. Use a negative value to indicate an unlimited number of idle connections.
      max-wait: -1 # Maximum amount of time (in milliseconds) a connection allocation should block before throwing an exception when the pool is exhausted. Use a negative value to block indefinitely.
      min-idle: 1 # Target for the minimum number of idle connections to maintain in the pool. This setting only has an effect if it is positive.
      min-idle: 1 # Target for the minimum number of idle connections to maintain in the pool. This settings only has an effect if it is positive.
cache: 2

+ 1 - 1
svr/svr-manage/src/main/resources/webapp/common/js/jquery/jquery.form.3.51.0.js

@ -521,7 +521,7 @@
                    form.setAttribute('action', s.url);
                }
                // ie borks in some cases when setting encoding
                // ie borks in some cases when settings encoding
                if (! s.skipEncodingOverride && (!method || /post/i.test(method))) {
                    $form.attr({
                        encoding: 'multipart/form-data',

+ 10 - 10
svr/svr-manage/src/main/resources/webapp/common/js/plugins/dataTables/jquery.dataTables.js

@ -1178,7 +1178,7 @@
		if ( $.isPlainObject( mSource ) )
		{
			/* Unlike get, only the underscore (global) option is used for for
			 * setting data since we don't know the type here. This is why an object
			 * settings data since we don't know the type here. This is why an object
			 * option is not documented for `mData` (which is read/write), but it is
			 * for `mRender` which is read only.
			 */
@ -1220,7 +1220,7 @@
						b.splice( 0, i+1 );
						innerSrc = b.join('.');
	
						// Traverse each entry in the array setting the properties requested
						// Traverse each entry in the array settings the properties requested
						for ( var j=0, jLen=val.length ; j<jLen ; j++ )
						{
							o = {};
@ -7227,7 +7227,7 @@
				settings.ajax = url;
			}
			// No need to consider sAjaxSource here since DataTables gives priority
			// to `ajax` over `sAjaxSource`. So setting `ajax` here, renders any
			// to `ajax` over `sAjaxSource`. So settings `ajax` here, renders any
			// value of `sAjaxSource` redundant.
		} );
	} );
@ -7237,7 +7237,7 @@
	 * Load data from the newly set Ajax URL. Note that this method is only
	 * available when `ajax.url()` is used to set a URL. Additionally, this method
	 * has the same effect as calling `ajax.reload()` but is provided for
	 * convenience when setting a new URL. Like `ajax.reload()` it will
	 * convenience when settings a new URL. Like `ajax.reload()` it will
	 * automatically redraw the table once the remote data has been loaded.
	 *
	 * @returns {DataTables.Api} this
@ -9596,7 +9596,7 @@
		 * table has already been initialised, this parameter will cause DataTables
		 * to simply return the object that has already been set up - it will not take
		 * account of any changes you might have made to the initialisation object
		 * passed to DataTables (setting this parameter to true is an acknowledgement
		 * passed to DataTables (settings this parameter to true is an acknowledgement
		 * that you understand this). `destroy` can be used to reinitialise a table if
		 * you need.
		 *  @type boolean
@ -10006,7 +10006,7 @@
		/**
		 * This function allows you to 'post process' each row after it have been
		 * generated for each table draw, but before it is rendered on screen. This
		 * function might be used for setting the row class name etc.
		 * function might be used for settings the row class name etc.
		 *  @type function
		 *  @param {node} row "TR" element for the current row
		 *  @param {array} data Raw data array for this row
@ -10324,7 +10324,7 @@
		/**
		 * Number of rows to display on a single page when using pagination. If
		 * feature enabled (`lengthChange`) then the end user will be able to override
		 * this to a custom setting using a pop-up menu.
		 * this to a custom settings using a pop-up menu.
		 *  @type int
		 *  @default 10
		 *
@ -11403,7 +11403,7 @@
		 *    * Parameters:
		 *      * `{array|object}` The data source for the row
		 *      * `{string}` The type call data requested - this will be 'set' when
		 *        setting data or 'filter', 'display', 'type', 'sort' or undefined
		 *        settings data or 'filter', 'display', 'type', 'sort' or undefined
		 *        when gathering data. Note that when `undefined` is given for the
		 *        type DataTables expects to get the raw data for the object back<
		 *      * `{*}` Data to set when the second parameter is 'set'.
@ -12682,7 +12682,7 @@
		 * Server-side processing - number of records in the result set
		 * (i.e. before filtering), Use fnRecordsTotal rather than
		 * this property to get the value of the number of records, regardless of
		 * the server-side processing setting.
		 * the server-side processing settings.
		 *  @type int
		 *  @default 0
		 *  @private
@ -12693,7 +12693,7 @@
		 * Server-side processing - number of records in the current display set
		 * (i.e. after filtering). Use fnRecordsDisplay rather than
		 * this property to get the value of the number of records, regardless of
		 * the server-side processing setting.
		 * the server-side processing settings.
		 *  @type boolean
		 *  @default 0
		 *  @private

+ 2 - 2
svr/svr-manage/src/main/resources/webapp/common/js/plugins/datapicker/bootstrap-datepicker.js

@ -649,11 +649,11 @@
				this.viewDate = new Date(this.o.endDate);
			if (fromArgs){
				// setting date by clicking
				// settings date by clicking
				this.setValue();
			}
			else if (dates.length){
				// setting date by typing
				// settings date by typing
				if (String(oldDates) !== String(this.dates))
					this._trigger('changeDate');
			}

+ 1 - 1
svr/svr-manage/src/main/resources/webapp/common/js/plugins/flot/jquery.flot.js

@ -63,7 +63,7 @@
                    inverseTransform: null, // if transform is set, this should be the inverse function
                    min: null, // min. value to show, null means set automatically
                    max: null, // max. value to show, null means set automatically
                    autoscaleMargin: null, // margin in % to add if auto-setting min/max
                    autoscaleMargin: null, // margin in % to add if auto-settings min/max
                    ticks: null, // either [1, 3] or [[1, "a"], 3] or (fn: axis info -> ticks) or app. number of ticks for auto-ticks
                    tickFormatter: null, // fn: number -> string
                    labelWidth: null, // size of tick labels in pixels

+ 1 - 1
svr/svr-manage/src/main/resources/webapp/common/js/plugins/treeview/bootstrap-treeview.js

@ -178,7 +178,7 @@
		},
		// On initialization recurses the entire tree structure 
		// setting expanded / collapsed states based on initial levels
		// settings expanded / collapsed states based on initial levels
		_setInitialLevels: function(nodes, level) {
			if (!nodes) { return; }

+ 4 - 4
svr/svr-manage/src/main/resources/webapp/common/js/vue.js

@ -280,7 +280,7 @@ return /******/ (function(modules) { // webpackBootstrap
	/**
	 * Check and convert possible numeric strings to numbers
	 * before setting back to data
	 * before settings back to data
	 *
	 * @param {*} value
	 * @return {*|Number}
@ -3386,7 +3386,7 @@ return /******/ (function(modules) { // webpackBootstrap
	/**
	 * 1. Deal with Safari cloning nested <template> bug by
	 *    manually cloning all template instances.
	 * 2. Deal with IE10/11 textarea placeholder bug by setting
	 * 2. Deal with IE10/11 textarea placeholder bug by settings
	 *    the correct value after cloning.
	 *
	 * @param {Element|DocumentFragment} node
@ -6819,14 +6819,14 @@ return /******/ (function(modules) { // webpackBootstrap
	}
	/**
	 * Warn against setting non-existent root path on a vm.
	 * Warn against settings non-existent root path on a vm.
	 */
	var warnNonExistent
	if (true) {
	  warnNonExistent = function (path) {
	    _.warn(
	      'You are setting a non-existent path "' + path.raw + '" ' +
	      'You are settings a non-existent path "' + path.raw + '" ' +
	      'on a vm instance. Consider pre-initializing the property ' +
	      'with the "data" option for more reliable reactivity ' +
	      'and better performance.'

+ 4 - 4
svr/svr-manage/src/main/resources/webapp/common/js/vue/vue.js

@ -2667,7 +2667,7 @@ function callUpdateHooks (queue) {
 * The queue will be processed after the entire tree has been patched.
 */
function queueActivatedComponent (vm) {
  // setting _inactive to false here so that a render function can
  // settings _inactive to false here so that a render function can
  // rely on checking whether it's in an inactive tree (e.g. router-view)
  vm._inactive = false;
  activatedChildren.push(vm);
@ -5511,7 +5511,7 @@ function updateAttrs (oldVnode, vnode) {
      setAttr(elm, key, cur);
    }
  }
  // #4391: in IE9, setting type can reset value for input[type=radio]
  // #4391: in IE9, settings type can reset value for input[type=radio]
  /* istanbul ignore if */
  if (isIE9 && attrs.value !== oldAttrs.value) {
    setAttr(elm, 'value', attrs.value);
@ -5981,7 +5981,7 @@ function model (
        "v-model does not support dynamic input types. Use v-if branches instead."
      );
    }
    // inputs with type="file" are read only and setting the input's
    // inputs with type="file" are read only and settings the input's
    // value will throw an error.
    if (tag === 'input' && type === 'file') {
      warn$1(
@ -6420,7 +6420,7 @@ function updateStyle (oldVnode, vnode) {
  for (name in newStyle) {
    cur = newStyle[name];
    if (cur !== oldStyle[name]) {
      // ie9 setting to null has no effect, must use empty string
      // ie9 settings to null has no effect, must use empty string
      setProp(el, name, cur == null ? '' : cur);
    }
  }

+ 10 - 10
svr/svr-manage/src/main/resources/webapp/hplus/js/plugins/dataTables/jquery.dataTables.js

@ -1178,7 +1178,7 @@
		if ( $.isPlainObject( mSource ) )
		{
			/* Unlike get, only the underscore (global) option is used for for
			 * setting data since we don't know the type here. This is why an object
			 * settings data since we don't know the type here. This is why an object
			 * option is not documented for `mData` (which is read/write), but it is
			 * for `mRender` which is read only.
			 */
@ -1220,7 +1220,7 @@
						b.splice( 0, i+1 );
						innerSrc = b.join('.');
	
						// Traverse each entry in the array setting the properties requested
						// Traverse each entry in the array settings the properties requested
						for ( var j=0, jLen=val.length ; j<jLen ; j++ )
						{
							o = {};
@ -7220,7 +7220,7 @@
				settings.ajax = url;
			}
			// No need to consider sAjaxSource here since DataTables gives priority
			// to `ajax` over `sAjaxSource`. So setting `ajax` here, renders any
			// to `ajax` over `sAjaxSource`. So settings `ajax` here, renders any
			// value of `sAjaxSource` redundant.
		} );
	} );
@ -7230,7 +7230,7 @@
	 * Load data from the newly set Ajax URL. Note that this method is only
	 * available when `ajax.url()` is used to set a URL. Additionally, this method
	 * has the same effect as calling `ajax.reload()` but is provided for
	 * convenience when setting a new URL. Like `ajax.reload()` it will
	 * convenience when settings a new URL. Like `ajax.reload()` it will
	 * automatically redraw the table once the remote data has been loaded.
	 *
	 * @returns {DataTables.Api} this
@ -9589,7 +9589,7 @@
		 * table has already been initialised, this parameter will cause DataTables
		 * to simply return the object that has already been set up - it will not take
		 * account of any changes you might have made to the initialisation object
		 * passed to DataTables (setting this parameter to true is an acknowledgement
		 * passed to DataTables (settings this parameter to true is an acknowledgement
		 * that you understand this). `destroy` can be used to reinitialise a table if
		 * you need.
		 *  @type boolean
@ -9999,7 +9999,7 @@
		/**
		 * This function allows you to 'post process' each row after it have been
		 * generated for each table draw, but before it is rendered on screen. This
		 * function might be used for setting the row class name etc.
		 * function might be used for settings the row class name etc.
		 *  @type function
		 *  @param {node} row "TR" element for the current row
		 *  @param {array} data Raw data array for this row
@ -10317,7 +10317,7 @@
		/**
		 * Number of rows to display on a single page when using pagination. If
		 * feature enabled (`lengthChange`) then the end user will be able to override
		 * this to a custom setting using a pop-up menu.
		 * this to a custom settings using a pop-up menu.
		 *  @type int
		 *  @default 10
		 *
@ -11396,7 +11396,7 @@
		 *    * Parameters:
		 *      * `{array|object}` The data source for the row
		 *      * `{string}` The type call data requested - this will be 'set' when
		 *        setting data or 'filter', 'display', 'type', 'sort' or undefined
		 *        settings data or 'filter', 'display', 'type', 'sort' or undefined
		 *        when gathering data. Note that when `undefined` is given for the
		 *        type DataTables expects to get the raw data for the object back<
		 *      * `{*}` Data to set when the second parameter is 'set'.
@ -12675,7 +12675,7 @@
		 * Server-side processing - number of records in the result set
		 * (i.e. before filtering), Use fnRecordsTotal rather than
		 * this property to get the value of the number of records, regardless of
		 * the server-side processing setting.
		 * the server-side processing settings.
		 *  @type int
		 *  @default 0
		 *  @private
@ -12686,7 +12686,7 @@
		 * Server-side processing - number of records in the current display set
		 * (i.e. after filtering). Use fnRecordsDisplay rather than
		 * this property to get the value of the number of records, regardless of
		 * the server-side processing setting.
		 * the server-side processing settings.
		 *  @type boolean
		 *  @default 0
		 *  @private

+ 2 - 2
svr/svr-manage/src/main/resources/webapp/hplus/js/plugins/datapicker/bootstrap-datepicker.js

@ -649,11 +649,11 @@
				this.viewDate = new Date(this.o.endDate);
			if (fromArgs){
				// setting date by clicking
				// settings date by clicking
				this.setValue();
			}
			else if (dates.length){
				// setting date by typing
				// settings date by typing
				if (String(oldDates) !== String(this.dates))
					this._trigger('changeDate');
			}

+ 1 - 1
svr/svr-manage/src/main/resources/webapp/hplus/js/plugins/flot/jquery.flot.js

@ -63,7 +63,7 @@
                    inverseTransform: null, // if transform is set, this should be the inverse function
                    min: null, // min. value to show, null means set automatically
                    max: null, // max. value to show, null means set automatically
                    autoscaleMargin: null, // margin in % to add if auto-setting min/max
                    autoscaleMargin: null, // margin in % to add if auto-settings min/max
                    ticks: null, // either [1, 3] or [[1, "a"], 3] or (fn: axis info -> ticks) or app. number of ticks for auto-ticks
                    tickFormatter: null, // fn: number -> string
                    labelWidth: null, // size of tick labels in pixels

+ 1 - 1
svr/svr-manage/src/main/resources/webapp/hplus/js/plugins/treeview/bootstrap-treeview.js

@ -178,7 +178,7 @@
		},
		// On initialization recurses the entire tree structure 
		// setting expanded / collapsed states based on initial levels
		// settings expanded / collapsed states based on initial levels
		_setInitialLevels: function(nodes, level) {
			if (!nodes) { return; }

+ 7 - 0
svr/svr-patient/src/main/java/com/yihu/jw/patient/dao/settings/HelpCenterDao.java

@ -4,6 +4,8 @@ import com.yihu.jw.entity.base.patient.HelpCenterDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
/**
 * 
@ -18,4 +20,9 @@ import org.springframework.data.repository.PagingAndSortingRepository;
 * @since 1.
 */
public interface HelpCenterDao extends PagingAndSortingRepository<HelpCenterDO, Integer>, JpaSpecificationExecutor<HelpCenterDO>  {
    List<HelpCenterDO> findByParentType(String parentType);
    HelpCenterDO findByParentTypeAndType(String parentType,String type);
}

+ 24 - 7
svr/svr-patient/src/main/java/com/yihu/jw/patient/endpoint/personal_info/PatientMedicareCardEndpoint.java

@ -1,6 +1,7 @@
package com.yihu.jw.patient.endpoint.personal_info;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.entity.base.patient.PatientMedicareCardDO;
import com.yihu.jw.patient.service.personal_Info.PatientMedicareCardService;
import com.yihu.jw.restmodel.base.patient.PatientMedicareCardVO;
@ -42,8 +43,9 @@ public class PatientMedicareCardEndpoint extends EnvelopRestEndpoint {
    public Envelop bindMedicareCard(
            @ApiParam(name = "id", value = "居民id", required = true) @RequestParam String id,
            @ApiParam(name = "idcard", value = "居民身份证号", required = true) @RequestParam String idcard,
            @ApiParam(name = "cardNumber", value = "医保卡号", required = true) @RequestParam String cardNumber) throws Exception {
        patientMedicareCardService.bindMedicareCard(id,idcard,cardNumber);
            @ApiParam(name = "cardNumber", value = "医保卡号", required = true) @RequestParam String cardNumber,
            @ApiParam(name = "cityCode", value = "城市code", required = true) @RequestParam String cityCode) throws Exception {
        patientMedicareCardService.bindMedicareCard(id,idcard,cardNumber,cityCode);
        return success("success");
    }
@ -71,7 +73,7 @@ public class PatientMedicareCardEndpoint extends EnvelopRestEndpoint {
    @PostMapping(value = BaseRequestMapping.PatientMedicareCard.unBindCard)
    @ApiOperation(value = "解除绑定卡")
    public Envelop unBindCard(
            @ApiParam(name = "cardId", value = "卡片id", required = true) @RequestParam String cardId) throws Exception {
            @ApiParam(name = "cardId", value = "卡片id", required = true) @RequestParam Integer cardId) throws Exception {
        patientMedicareCardService.unBindCard(cardId);
        return success("success");
    }
@ -128,10 +130,25 @@ public class PatientMedicareCardEndpoint extends EnvelopRestEndpoint {
    @GetMapping(value = BaseRequestMapping.PatientMedicareCard.cardOrgList)
    @ApiOperation(value = "获取可绑定卡的医院字母A-Z排序")
    public ListEnvelop cardOrglist(@ApiParam(name = "id", value = "居民id")
                                   @RequestParam(value = "id", required = false) String saasid) throws Exception {
        List cards = patientMedicareCardService.queryCardOrgSortedList(saasid);
        return success(cards);
    public Envelop cardOrglist(@ApiParam(name = "saasid", value = "租户id")
                                   @RequestParam(value = "saasid", required = false) String saasid) throws Exception {
        JSONObject orgObj = patientMedicareCardService.queryOrgSortedList(saasid);
        return success(orgObj);
    }
    @GetMapping(value = BaseRequestMapping.PatientMedicareCard.sortProList)
    @ApiOperation(value = "获取省份字母A-Z排序")
    public Envelop sortProvincelist() throws Exception {
        JSONObject orgObj = patientMedicareCardService.queryProvinceSortedList();
        return success(orgObj);
    }
    @GetMapping(value = BaseRequestMapping.PatientMedicareCard.sortCityList)
    @ApiOperation(value = "获取(某省份下)城市字母A-Z排序,不传省份取所有城市")
    public Envelop sortCitylist(@ApiParam(name = "provinceCode", value = "省份代码")
                                   @RequestParam(value = "provinceCode", required = false) String provinceCode) throws Exception {
        JSONObject orgObj = patientMedicareCardService.queryCitySortedList(provinceCode);
        return success(orgObj);
    }
}

+ 65 - 46
svr/svr-patient/src/main/java/com/yihu/jw/patient/endpoint/settings/HelpCenterEndpoint.java

@ -14,64 +14,63 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
*
* 帮助中心控制器
*
* @version
* <pre>
 * 帮助中心控制器
 *
 * @version <pre>
 * Author	Version		Date		Changes
 * Administrator 	1.0  		2018年11月27日 	Created
 *
 * </pre>
* @since 1.
*/
 * @since 1.
 */
@RestController
@RequestMapping(value = BaseRequestMapping.HelpCenter.PREFIX)
@Api(value = "帮助中心管理", description = "帮助中心管理服务接口", tags = {"帮助中心管理服务接口"})
public class HelpCenterEndpoint extends EnvelopRestEndpoint {
@Autowired
private HelpCenterService helpCenterService;
    @Autowired
    private HelpCenterService helpCenterService;
@PostMapping(value = BaseRequestMapping.HelpCenter.CREATE)
@ApiOperation(value = "创建")
public ObjEnvelop<HelpCenterVO> create (
    @ApiParam(name = "jsonData", value = "Json数据", required = true)
    @RequestParam String jsonData) throws Exception {
    HelpCenterDO helpCenter = toEntity(jsonData, HelpCenterDO.class);
    helpCenter = helpCenterService.save(helpCenter);
    return success(helpCenter, HelpCenterVO.class);
    @PostMapping(value = BaseRequestMapping.HelpCenter.CREATE)
    @ApiOperation(value = "创建")
    public ObjEnvelop<HelpCenterVO> create(
            @ApiParam(name = "jsonData", value = "Json数据", required = true)
            @RequestParam String jsonData) throws Exception {
        HelpCenterDO helpCenter = toEntity(jsonData, HelpCenterDO.class);
        helpCenter = helpCenterService.save(helpCenter);
        return success(helpCenter, HelpCenterVO.class);
    }
    @PostMapping(value = BaseRequestMapping.HelpCenter.DELETE)
    @ApiOperation(value = "删除")
    public Envelop delete(
    @ApiParam(name = "ids", value = "id串,中间用,分隔", required = true)
    @RequestParam(value = "ids") String ids) {
    helpCenterService.delete(ids.split(","));
    return success("删除成功");
            @ApiParam(name = "ids", value = "id串,中间用,分隔", required = true)
            @RequestParam(value = "ids") String ids) {
        helpCenterService.delete(ids.split(","));
        return success("删除成功");
    }
    @PostMapping(value = BaseRequestMapping.HelpCenter.UPDATE)
    @ApiOperation(value = "更新")
    public ObjEnvelop<HelpCenterVO> update (
        @ApiParam(name = "jsonData", value = "Json数据", required = true)
        @RequestParam String jsonData) throws Exception {
    public ObjEnvelop<HelpCenterVO> update(
            @ApiParam(name = "jsonData", value = "Json数据", required = true)
            @RequestParam String jsonData) throws Exception {
        HelpCenterDO helpCenter = toEntity(jsonData, HelpCenterDO.class);
        if (null == helpCenter.getId()) {
        return failed("ID不能为空", ObjEnvelop.class);
            return failed("ID不能为空", ObjEnvelop.class);
        }
        helpCenter = helpCenterService.save(helpCenter);
        return success(helpCenter, HelpCenterVO.class);
        }
    }
        @GetMapping(value = BaseRequestMapping.HelpCenter.PAGE)
        @ApiOperation(value = "获取分页")
        public PageEnvelop<HelpCenterVO> page (
    @GetMapping(value = BaseRequestMapping.HelpCenter.PAGE)
    @ApiOperation(value = "获取分页")
    public PageEnvelop<HelpCenterVO> page(
            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段")
            @RequestParam(value = "fields", required = false) String fields,
            @ApiParam(name = "filters", value = "过滤器,为空检索所有条件")
@ -82,22 +81,42 @@ public ObjEnvelop<HelpCenterVO> create (
            @RequestParam(value = "page") int page,
            @ApiParam(name = "size", value = "页码", required = true, defaultValue = "15")
            @RequestParam(value = "size") int size) throws Exception {
            List<HelpCenterDO> helpCenters = helpCenterService.search(fields, filters, sorts, page, size);
                int count = (int)helpCenterService.getCount(filters);
                return success(helpCenters, count, page, size, HelpCenterVO.class);
         }
        List<HelpCenterDO> helpCenters = helpCenterService.search(fields, filters, sorts, page, size);
        int count = (int) helpCenterService.getCount(filters);
        return success(helpCenters, count, page, size, HelpCenterVO.class);
    }
    @GetMapping(value = BaseRequestMapping.HelpCenter.LIST)
    @ApiOperation(value = "获取列表")
    public ListEnvelop<HelpCenterVO> list(
            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段")
            @RequestParam(value = "fields", required = false) String fields,
            @ApiParam(name = "filters", value = "过滤器,为空检索所有条件")
            @RequestParam(value = "filters", required = false) String filters,
            @ApiParam(name = "sorts", value = "排序,规则参见说明文档")
            @RequestParam(value = "sorts", required = false) String sorts) throws Exception {
        List<HelpCenterDO> helpCenters = helpCenterService.search(fields, filters, sorts);
        return success(helpCenters, HelpCenterVO.class);
    }
    @GetMapping(value = BaseRequestMapping.HelpCenter.getAnswerByType)
    @ApiOperation(value = "获取答案")
    public ListEnvelop getAnswerByType(
            @ApiParam(name = "parentType", value = "问题大类,(大类小类均为空取默认所有大类问题描述列表)")
            @RequestParam(value = "parentType", required = false) String parentType,
            @ApiParam(name = "type", value = "问题小类")
            @RequestParam(value = "type", required = false) String type) throws Exception {
        return success(helpCenterService.getAnswerByType(parentType, type));
    }
         @GetMapping(value = BaseRequestMapping.HelpCenter.LIST)
         @ApiOperation(value = "获取列表")
         public ListEnvelop<HelpCenterVO> list (
             @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段")
             @RequestParam(value = "fields", required = false) String fields,
             @ApiParam(name = "filters", value = "过滤器,为空检索所有条件")
             @RequestParam(value = "filters", required = false) String filters,
             @ApiParam(name = "sorts", value = "排序,规则参见说明文档")
             @RequestParam(value = "sorts", required = false) String sorts) throws Exception {
             List<HelpCenterDO> helpCenters = helpCenterService.search(fields, filters, sorts);
                  return success(helpCenters, HelpCenterVO.class);
         }
    @GetMapping(value = BaseRequestMapping.HelpCenter.commentAnswer)
    @ApiOperation(value = "反馈问题答案")
    public Envelop commentAnswer(
            @ApiParam(name = "questionId", value = "问题id")
            @RequestParam(value = "questionId", required = true) int questionId,
            @ApiParam(name = "usefulOrNot", value = "是否有用,true-有用,false-无用")
            @RequestParam(value = "usefulOrNot", required = true) boolean usefulOrNot) throws Exception {
        return success(helpCenterService.commentAnswer(questionId, usefulOrNot));
    }
 }
}

+ 11 - 0
svr/svr-patient/src/main/java/com/yihu/jw/patient/exception/settings/HelpCenterQesNotFoundException.java

@ -0,0 +1,11 @@
package com.yihu.jw.patient.exception.settings;
/**
 * 帮助中心-《找不到问题》异常
 */
public class HelpCenterQesNotFoundException extends RuntimeException{
    public HelpCenterQesNotFoundException(String msg){
        super(msg);
    }
}

+ 62 - 10
svr/svr-patient/src/main/java/com/yihu/jw/patient/service/personal_Info/PatientMedicareCardService.java

@ -1,5 +1,7 @@
package com.yihu.jw.patient.service.personal_Info;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.entity.base.patient.PatientMedicareCardDO;
import com.yihu.jw.exception.business.patient.PatientCardNotFoundException;
import com.yihu.jw.exception.business.patient.PatientNotFoundException;
@ -7,15 +9,18 @@ import com.yihu.jw.patient.dao.BasePatientMedicareCardDao;
import com.yihu.jw.patient.service.BasePatientMedicardCardService;
import com.yihu.jw.patient.util.JavaBeanUtils;
import com.yihu.jw.patient.util.PinYinUtil;
import netscape.javascript.JSObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -45,13 +50,15 @@ public class PatientMedicareCardService extends BasePatientMedicardCardService<P
     * @param medicareCardNumber
     */
    @Transactional(rollbackFor = Exception.class)
    public void bindMedicareCard(String patientCode, String idcard,String medicareCardNumber) {
    public void bindMedicareCard(String patientCode, String idcard,String medicareCardNumber,String cityCode) {
        Assert.notNull(patientCode,"居民code不可为空!");
        Assert.notNull(idcard,"身份证号不可为空!");
        Assert.notNull(medicareCardNumber,"医(社)保卡号不可为空!");
        Assert.notNull(medicareCardNumber,"城市code不可为空!");
        PatientMedicareCardDO card = makeCardInfo(patientCode,idcard,medicareCardNumber);
        card.setParentType(PatientMedicareCardDO.ParentType.CareCard.getType());
        card.setType(PatientMedicareCardDO.Type.MedicareCard.getType());
        card.setCityCode(cityCode);
        this.save(card);
    }
@ -93,7 +100,7 @@ public class PatientMedicareCardService extends BasePatientMedicardCardService<P
     * @param id
     */
    @Transactional(rollbackFor = Exception.class)
    public void unBindCard(@NotNull String id) {
    public void unBindCard(@NotNull Integer id) {
        Assert.notNull(id,"id不存在");
        PatientMedicareCardDO card = basePatientMedicareCardDao.findOne(id);
        if(null == card){
@ -122,7 +129,8 @@ public class PatientMedicareCardService extends BasePatientMedicardCardService<P
                "LEFT JOIN base_patient patient ON card.patient_code = patient.id " +
                "WHERE " +
                " card.patient_code = '"+ patientCode +"' " +
                "AND card.type = " + type ;
                "AND card.type = " + type +
                "AND card.del = '1'";
        List<Map<String,Object>> cards = jdbcTemplate.queryForList(sql);
        if(CollectionUtils.isEmpty(cards)){
            throw new PatientCardNotFoundException("卡片不存在!");
@ -147,7 +155,8 @@ public class PatientMedicareCardService extends BasePatientMedicardCardService<P
                " patient_medicare_card card " +
                " LEFT JOIN base_org org ON card.org_code = org.`code` " +
                " WHERE" +
                " card.patient_code = '"+ patientCode + "'";
                " card.patient_code = '"+ patientCode + "'" +
                " and card.del = '1'";
        List<Map<String,Object>> cardlist = jdbcTemplate.queryForList(sql);
        try {
            result = JavaBeanUtils.getInstance().mapListJson(cardlist);
@ -157,9 +166,15 @@ public class PatientMedicareCardService extends BasePatientMedicardCardService<P
        return result;
    }
    public List queryCardOrgSortedList(String saasid) throws Exception {
    /**
     * 获取医院拼音首字母A-Z排序
     * @param saasid
     * @return
     * @throws Exception
     */
    public JSONObject queryOrgSortedList(String saasid) throws Exception {
        Assert.notNull(saasid,"租户id不可为空!");
        List result = new ArrayList();
        JSONObject result = new JSONObject();
        String sql = "SELECT " +
                " org.code, " +
                " org.name " +
@ -169,10 +184,47 @@ public class PatientMedicareCardService extends BasePatientMedicardCardService<P
                " WHERE " +
                " bos.saasid = '"+ saasid + "'";
        List<Map<String,Object>> orglist = jdbcTemplate.queryForList(sql);
        Map<String,Object> map = PinYinUtil.pingYinSort(orglist);
        List tempList = new ArrayList();
        tempList.add(map);
        result = JavaBeanUtils.getInstance().mapListJson(tempList);
        result.put("sorted",PinYinUtil.pingYinSortReturnJSON(orglist));
        result.put("unsorted",orglist);
        return result;
    }
    /**
     * 获取省份拼音首字母A-Z排序
     * @return
     * @throws Exception
     */
    public JSONObject queryProvinceSortedList() throws Exception {
        JSONObject result = new JSONObject();
        String sql = "SELECT code,name from base_province";
        List<Map<String,Object>> orglist = jdbcTemplate.queryForList(sql);
        result.put("unsorted",orglist);
        result.put("sorted",PinYinUtil.pingYinSortReturnJSON(orglist));
        return result;
    }
    /**
     * 获取城市拼音首字母A-Z排序
     * @param provinceCode
     * @return
     * @throws Exception
     */
    public JSONObject queryCitySortedList(String provinceCode) throws Exception {
        JSONObject result = new JSONObject();
        String sql = "select  " +
                " city.code, " +
                " city.name, " +
                " getFirstHanZiCode(city.name) as FirstLetter " +
                " from  " +
                " base_city city  " +
                " GROUP BY city.name,FirstLetter;";
        List<Map<String, Object>> citylist = jdbcTemplate.queryForList(sql);
        for(Map<String, Object> city : citylist){
            Map<String,Map<String, Object>> oneLetterMap = new HashMap<>();
            oneLetterMap.put(city.get("FirstLetter").toString(),city);
        }
        result.put("unsorted", citylist);
        result.put("sorted", PinYinUtil.pingYinSortReturnJSON(citylist));
        return result;
    }
}

+ 2 - 2
svr/svr-patient/src/main/java/com/yihu/jw/patient/service/personal_Info/PatientService.java

@ -259,14 +259,14 @@ public class PatientService extends BasePatientService<BasePatientDO, BasePatien
        patientBrief.setLiveProvinceName(patientDetail.getLiveProvinceName());
        patientBrief.setLiveCityCode(patientDetail.getLiveCityCode());
        patientBrief.setLiveCityName(patientDetail.getLiveCityName());
        patientBrief.setLiveTownCode(patientDetail.getLiveTownName());
        patientBrief.setLiveTownCode(patientDetail.getLiveTownCode());
        patientBrief.setLiveStreetCode(patientDetail.getLiveStreetCode());
        patientBrief.setLiveStreetName(patientDetail.getLiveStreetName());
        patientBrief.setAddress(patientDetail.getAddress());
        patientBrief.setCommitteeCode(patientDetail.getCommitteeCode());
        patientBrief.setCommitteeName(patientDetail.getCommitteeName());
        this.save(patientBrief);
        return patientDetail;
        return patientBrief;
    }

+ 79 - 0
svr/svr-patient/src/main/java/com/yihu/jw/patient/service/settings/HelpCenterService.java

@ -1,9 +1,21 @@
package com.yihu.jw.patient.service.settings;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.netflix.discovery.converters.Auto;
import com.yihu.jw.entity.base.patient.HelpCenterDO;
import com.yihu.jw.patient.dao.settings.HelpCenterDao;
import com.yihu.jw.patient.exception.settings.HelpCenterQesNotFoundException;
import com.yihu.jw.patient.util.ConstantUtils;
import com.yihu.mysql.query.BaseJpaService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.Assert;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
 * 
@ -19,4 +31,71 @@ import org.springframework.stereotype.Service;
 */
@Service
public class HelpCenterService extends BaseJpaService<HelpCenterDO, HelpCenterDao> {
    @Autowired
    private HelpCenterDao helpCenterDao;
    /**
     * 根据问题的类型寻找答案
     * @param parentType
     * @param type
     * @return
     */
    public JSONArray getAnswerByType(String parentType, String type){
        JSONArray resultArray = new JSONArray();
        // 查找大类的时候,先展示大类下的问题列表
        if(!StringUtils.isEmpty(parentType) && StringUtils.isEmpty(type)) {
            List<HelpCenterDO> parentQuestionList = new ArrayList<>();
            parentQuestionList = helpCenterDao.findByParentType(parentType);
            for(HelpCenterDO answerForParentquestion : parentQuestionList){
                JSONObject answer = new JSONObject();
                answer.put("id",answerForParentquestion.getId());
                answer.put("parentType",answerForParentquestion.getParentType());
                answer.put("type",answerForParentquestion.getType());
                answer.put("answer",answerForParentquestion.getQuestion());
                resultArray.add(answer);
            }
            return resultArray;
        }else if(!StringUtils.isEmpty(parentType) && !StringUtils.isEmpty(type)){
            HelpCenterDO concreteAnswer = new HelpCenterDO();
            concreteAnswer = helpCenterDao.findByParentTypeAndType(parentType,type);
            JSONObject answer = new JSONObject();
            answer.put("id",concreteAnswer.getId());
            answer.put("parentType",concreteAnswer.getParentType());
            answer.put("type",concreteAnswer.getType());
            answer.put("answer",concreteAnswer.getAnswer());
            resultArray.add(answer);
            return resultArray;
        }else{
            // 所有问题大类描述展示
            HelpCenterDO questionBrief = new HelpCenterDO();
            questionBrief = helpCenterDao.findByParentTypeAndType("0","0");
            JSONObject answer = new JSONObject();
            answer.put("id",questionBrief.getId());
            answer.put("parentType",questionBrief.getParentType());
            answer.put("type",questionBrief.getType());
            answer.put("answer",questionBrief.getQuestion());
            resultArray.add(answer);
            return resultArray;
        }
    }
    /**
     * 反馈问题是否有用
     * @param questionId
     * @param usefulOrNot
     */
    public String commentAnswer(int questionId,boolean usefulOrNot){
        HelpCenterDO question = helpCenterDao.findOne(questionId);
        if(null == question){
            throw new HelpCenterQesNotFoundException("该问题不存在!");
        }
        if(usefulOrNot){
            question.setUsefulCount(question.getUsefulCount()+1);
        }else{
            question.setUnusefulCount(question.getUnusefulCount()+1);
        }
        this.save(question);
        return ConstantUtils.SUCCESS;
    }
}

+ 49 - 3
svr/svr-patient/src/main/java/com/yihu/jw/patient/util/PinYinUtil.java

@ -1,5 +1,7 @@
package com.yihu.jw.patient.util;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.google.common.collect.Lists;
import net.sourceforge.pinyin4j.PinyinHelper;
import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType;
@ -26,8 +28,9 @@ public class PinYinUtil {
        try {
            br = new BufferedReader(new InputStreamReader(resource.getInputStream(), "GBK"));
            String line = null;
            // 读取的文件末尾如果没有内容,不要留空行,空行也会被读
            while (null != (line = br.readLine())) {
                if (!StringUtils.startsWith(line, "#")) {
                if (!StringUtils.isEmpty(line) && !StringUtils.startsWith(line, "#")) {
                    String oneLine = line;
                    String[] lineArr = oneLine.split("=");
                    for (String key : lineArr[1].split("/")) {
@ -63,8 +66,18 @@ public class PinYinUtil {
            try {
                String[] temp = PinyinHelper.toHanyuPinyinStringArray(arr[0], defaultFormat);
                // 长度大于1,表明是多音字,往后多取一个字或两个字,取词组,取匹配多音字属性文件确定最终读音
                if (temp != null && temp.length > 1) {
                    pybf.append(getOrgNameMultiTone(chinese).charAt(0));
                if (temp != null && temp.length > 1 && !temp[0].equalsIgnoreCase(temp[1])) {
                    String finalLetter = getOrgNameMultiTone(chinese);
                    if(StringUtils.isEmpty(finalLetter)){
                        System.out.print(arr[0]);
                        System.out.print(arr[1]+":[");
                        for(int i=0; i< temp.length-1; i++)
                            System.out.print(temp[i]+", ");
                        System.out.println(temp[temp.length-1]+"]");
                        pybf.append(temp[0].charAt(0));
                    }else{
                        pybf.append(finalLetter.charAt(0));
                    }
                } else {
                    pybf.append(temp[0].charAt(0));
                }
@ -159,6 +172,39 @@ public class PinYinUtil {
        return map;
    }
    /**
     * 字符串按拼音排序,返回JSONObject,适合前端插件需要的格式
     *
     * @param
     * @return
     */
    public static JSONArray pingYinSortReturnJSON(List<Map<String, Object>> waitForSortingList) {
        JSONArray resultArray = new JSONArray();
        String[] alphatables = {"A", "B", "C", "D", "E", "F", "G", "H", "I",
                "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"};
        if (waitForSortingList.size() > 0) {
            for (String alpha : alphatables) {
                List<Map<String,Object>> resultList = new ArrayList<>();
                JSONObject oneLetterJson = new JSONObject();
                for (Map<String, Object> one : waitForSortingList) {
                    String name = String.valueOf(one.get("name"));
                    String firstSpell = getFirstSpell(name).substring(0, 1);
                    if (alpha.equals(firstSpell)) {
                        oneLetterJson.put("title",firstSpell);
                        resultList.add(one);
                        oneLetterJson.put("items", resultList);
                    }
                }
                if(!oneLetterJson.isEmpty()){
                    resultArray.add(oneLetterJson);
                }
            }
            return resultArray;
        }
        return resultArray;
    }
    /**
     * 获取医院多音字的读音,取词组,最多取三个
     *

+ 1 - 1
svr/svr-patient/src/main/resources/bootstrap.yml

@ -1,6 +1,6 @@
spring:
  application:
    name: svr-patient
    name: svr-patient-lith
  cloud:
    config:
      failFast: true

+ 47 - 0
svr/svr-patient/src/main/resources/multitone.properties

@ -0,0 +1,47 @@
###此属性文件,只放一些医院名称可能会用到的多音字的词组,其他的不存,后期如果有新的多音字发现,需手动添加到此文件并维护
######### A ##########
A=阿/阿克/阿拉
######### B ##########
BANG=蚌埠
BAI=百
######### C ##########
CHAO=朝阳/长
CHONG=重庆
CHANG=长治/长春
######### D ##########
DA=大/大同
######### F ##########
F=佛
######### G ##########
GUANG=广/广东/广西
######### H ##########
HONG=红河
HE=合肥
######### J ##########
J=景
######### K ##########
KA=喀什
######### L ##########
L=漯/六/乐
######### M ##########
######### N ##########
NA=那/那曲
NAN=南
######### P ##########
######### Q ##########
QI=齐齐
######### R ##########
######### S ##########
SHENG=省/省人民/省政府
SHI=石/石嘴山
SHEN=沈阳
SU=宿
######### T ##########
T=塔城
######### W ##########
WU=无锡
######### X ##########
XIA=厦门/厦大
X=信
######### Y ##########
Y=烟

+ 1 - 1
svr/svr-statistics/src/main/java/com/yihu/wlyy/Application.java

@ -38,7 +38,7 @@ public class Application {
     * request [/strategy/list/] as the response has already been committed. As a
     * result, the response may have the wrong status code. If your application is
     * running on WebSphere Application Server you may be able to resolve this
     * problem by setting com.ibm.ws.webcontainer.invokeFlushAfterService to false
     * problem by settings com.ibm.ws.webcontainer.invokeFlushAfterService to false
     */
    @Bean
    public ErrorPageFilter errorPageFilter() {

+ 1 - 1
svr/svr-statistics/src/main/resources/application.yml

@ -43,7 +43,7 @@ spring:
      max-active: 8 # Max number of connections that can be allocated by the pool at a given time. Use a negative value for no limit.
      max-idle: 8 # Max number of "idle" connections in the pool. Use a negative value to indicate an unlimited number of idle connections.
      max-wait: -1 # Maximum amount of time (in milliseconds) a connection allocation should block before throwing an exception when the pool is exhausted. Use a negative value to block indefinitely.
      min-idle: 1 # Target for the minimum number of idle connections to maintain in the pool. This setting only has an effect if it is positive.
      min-idle: 1 # Target for the minimum number of idle connections to maintain in the pool. This settings only has an effect if it is positive.
multipart: