Переглянути джерело

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

chenyongxing 6 роки тому
батько
коміт
caec961424
18 змінених файлів з 436 додано та 48 видалено
  1. 14 1
      common/common-entity/src/main/java/com/yihu/jw/entity/base/org/BaseOrgDO.java
  2. 0 13
      common/common-entity/src/main/java/com/yihu/jw/entity/base/patient/FeedbackDO.java
  3. 9 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/servicePackage/ServicePackageDO.java
  4. 9 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/servicePackage/ServicePackageSignRecordDO.java
  5. 1 0
      common/common-request-mapping/src/main/java/com/yihu/jw/rm/patient/PatientRequestMapping.java
  6. 16 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/org/BaseOrgVO.java
  7. 0 13
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/patient/FeedbackVO.java
  8. 209 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/patient/signPackage/ServicePackageRecordVO.java
  9. 9 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/patient/signPackage/ServicePackageVO.java
  10. 3 6
      server/svr-authentication/src/main/resources/application.yml
  11. 1 1
      server/svr-authentication/src/main/resources/bootstrap.yml
  12. BIN
      svr/svr-base/src/main/template/基础人口信息导入模板.xls
  13. 14 0
      svr/svr-patient/src/main/java/com/yihu/jw/patient/endpoint/servicepackage/PackageServiceEndpoint.java
  14. 2 2
      svr/svr-patient/src/main/java/com/yihu/jw/patient/endpoint/settings/AccountAppealEndpoint.java
  15. 2 2
      svr/svr-patient/src/main/java/com/yihu/jw/patient/endpoint/settings/FeedbackEndpoint.java
  16. 131 4
      svr/svr-patient/src/main/java/com/yihu/jw/patient/service/servicepackage/PackageService.java
  17. 8 3
      svr/svr-patient/src/main/java/com/yihu/jw/patient/service/settings/AccountAppealService.java
  18. 8 3
      svr/svr-patient/src/main/java/com/yihu/jw/patient/service/settings/FeedbackService.java

+ 14 - 1
common/common-entity/src/main/java/com/yihu/jw/entity/base/org/BaseOrgDO.java

@ -145,6 +145,13 @@ public class BaseOrgDO extends UuidIdentityEntityWithOperator {
	 */
	private String del;
    /**
     * 11一级甲等 12一级乙等 13一级丙等
     * 21二级甲等 22二级乙等 23二级丙等
     * 31三级特等 32三级甲等 33三级乙等 34三级丙级
     */
    private Integer level;
    public BaseOrgDO() {
    }
@ -360,6 +367,12 @@ public class BaseOrgDO extends UuidIdentityEntityWithOperator {
        this.del = del;
    }
    @Column(name = "level")
    public Integer getLevel() {
        return level;
    }
    public void setLevel(Integer level) {
        this.level = level;
    }
}

+ 0 - 13
common/common-entity/src/main/java/com/yihu/jw/entity/base/patient/FeedbackDO.java

@ -50,11 +50,6 @@ public class FeedbackDO extends IntegerIdentityEntity {
	 */
	private String feedbackContent;
    /**
	 * 问题回答
	 */
	private String answer;
    /**
	 * 图片,存图片地址,逗号分割
	 */
@ -81,14 +76,6 @@ public class FeedbackDO extends IntegerIdentityEntity {
        this.feedbackContent = feedbackContent;
    }
	@Column(name = "answer")
    public String getAnswer() {
        return answer;
    }
    public void setAnswer(String answer) {
        this.answer = answer;
    }
	@Column(name = "img")
    public String getImg() {
        return img;

+ 9 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/servicePackage/ServicePackageDO.java

@ -92,6 +92,7 @@ public class ServicePackageDO extends UuidIdentityEntity implements Serializable
    private String introduce;//服务介绍
    private String endIntroduce;//过期时间说明
    private String status;//审核状态(预留字段0待审核,1审核通过,2审核不通过)
    private Date endTime;//结束时间
    private Integer del;//是否有效(1有效,0失效)
    private Integer sort;//排序
@ -240,4 +241,12 @@ public class ServicePackageDO extends UuidIdentityEntity implements Serializable
    public void setOrganizationName(String organizationName) {
        this.organizationName = organizationName;
    }
    public Date getEndTime() {
        return endTime;
    }
    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }
}

+ 9 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/servicePackage/ServicePackageSignRecordDO.java

@ -35,6 +35,7 @@ public class ServicePackageSignRecordDO extends UuidIdentityEntity implements Se
    private String doctorTeamCode;//医生服务团队code
    private String operator;//签约申请人处理人
    private Date createTime;//创建时间
    private Integer sort;//排序:0 待支付,1未通过,2未通过,3待审核,4.生效
    @Column(name = "saas_id")
    public String getSaasId() {
@ -198,4 +199,12 @@ public class ServicePackageSignRecordDO extends UuidIdentityEntity implements Se
    public void setOperator(String operator) {
        this.operator = operator;
    }
    public Integer getSort() {
        return sort;
    }
    public void setSort(Integer sort) {
        this.sort = sort;
    }
}

+ 1 - 0
common/common-request-mapping/src/main/java/com/yihu/jw/rm/patient/PatientRequestMapping.java

@ -41,6 +41,7 @@ public class PatientRequestMapping {
        public static final String findDoctorById  = "/findDoctorById";
        public static final String findOrgByCode  = "/findOrgByCode";
        public static final String findPatientSignExist  = "/findPatientSignExist";
        public static final String findPatientSignPackage  = "/findPatientSignPackage";
    }
    /**
     * myFamily

+ 16 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/org/BaseOrgVO.java

@ -144,6 +144,14 @@ public class BaseOrgVO extends UuidIdentityVOWithOperator {
	@ApiModelProperty(value = "作废标识,1正常,0作废", example = "1")
    private String del;
    /**
     * 11一级甲等 12一级乙等 13一级丙等
     * 21二级甲等 22二级乙等 23二级丙等
     * 31三级特等 32三级甲等 33三级乙等 34三级丙级
     */
    @ApiModelProperty(value = "11一级甲等 12一级乙等 13一级丙等二级甲等 22二级乙等 23二级丙等31三级特等 32三级甲等 33三级乙等 34三级丙级", example = "1")
    private Integer level;
    private List<DictHospitalDeptVO> depts;
    public String getCode() {
@ -291,6 +299,14 @@ public class BaseOrgVO extends UuidIdentityVOWithOperator {
        return depts;
    }
    public Integer getLevel() {
        return level;
    }
    public void setLevel(Integer level) {
        this.level = level;
    }
    public void setDepts(List<DictHospitalDeptVO> depts) {
        this.depts = depts;
    }

+ 0 - 13
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/patient/FeedbackVO.java

@ -33,12 +33,6 @@ public class FeedbackVO extends IntegerIdentityVO{
	@ApiModelProperty(value = "反馈内容,问题和建议", example = "模块1")
    private String feedbackContent;
    /**
	 * 问题回答
	 */
	@ApiModelProperty(value = "问题回答", example = "模块1")
    private String answer;
    /**
	 * 图片,存图片地址,逗号分割
	 */
@ -65,13 +59,6 @@ public class FeedbackVO extends IntegerIdentityVO{
        this.feedbackContent = feedbackContent;
    }
    public String getAnswer() {
        return answer;
    }
    public void setAnswer(String answer) {
        this.answer = answer;
    }
    public String getImg() {
        return img;
    }

+ 209 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/patient/signPackage/ServicePackageRecordVO.java

@ -0,0 +1,209 @@
package com.yihu.jw.restmodel.patient.signPackage;
import java.util.Date;
/**
 * Created by Trick on 2018/12/6.
 */
public class ServicePackageRecordVO {
    private String saasId;
    private String servicePackageId;//服务包id
    private String servicePackageName;//服务包名称
    private String patient;//居民code
    private String name;//居民姓名
    private String idcard;//居民身份证
    private String ssc;//社保卡号
    private String signDoctor;//签约医生code
    private String signDoctorName;//签约医生名称
    private String hospital;//医院code
    private String hospitalName;//医院名称
    private Long adminTeamCode;//行政团队id
    private Long price;//服务总价
    private Date startTime;//服务开始时间
    private Date endTime;//服务结束时间
    private Integer status;//状态(0待审核,1已同意,待支付,2.支付成功,已生效,-1未通过,-2已取消,-3已过期)
    private String doctorTeamCode;//医生服务团队code
    private String operator;//签约申请人处理人
    private Date createTime;//创建时间
    private Integer sort;//排序:0 待支付,1未通过,2未通过,3待审核,4.生效
    private String introduce;//服务介绍
    private String endIntroduce;//过期时间说明
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    public String getServicePackageId() {
        return servicePackageId;
    }
    public void setServicePackageId(String servicePackageId) {
        this.servicePackageId = servicePackageId;
    }
    public String getServicePackageName() {
        return servicePackageName;
    }
    public void setServicePackageName(String servicePackageName) {
        this.servicePackageName = servicePackageName;
    }
    public String getPatient() {
        return patient;
    }
    public void setPatient(String patient) {
        this.patient = patient;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getIdcard() {
        return idcard;
    }
    public void setIdcard(String idcard) {
        this.idcard = idcard;
    }
    public String getSsc() {
        return ssc;
    }
    public void setSsc(String ssc) {
        this.ssc = ssc;
    }
    public String getSignDoctor() {
        return signDoctor;
    }
    public void setSignDoctor(String signDoctor) {
        this.signDoctor = signDoctor;
    }
    public String getSignDoctorName() {
        return signDoctorName;
    }
    public void setSignDoctorName(String signDoctorName) {
        this.signDoctorName = signDoctorName;
    }
    public String getHospital() {
        return hospital;
    }
    public void setHospital(String hospital) {
        this.hospital = hospital;
    }
    public String getHospitalName() {
        return hospitalName;
    }
    public void setHospitalName(String hospitalName) {
        this.hospitalName = hospitalName;
    }
    public Long getAdminTeamCode() {
        return adminTeamCode;
    }
    public void setAdminTeamCode(Long adminTeamCode) {
        this.adminTeamCode = adminTeamCode;
    }
    public Long getPrice() {
        return price;
    }
    public void setPrice(Long price) {
        this.price = price;
    }
    public Date getStartTime() {
        return startTime;
    }
    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }
    public Date getEndTime() {
        return endTime;
    }
    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }
    public Integer getStatus() {
        return status;
    }
    public void setStatus(Integer status) {
        this.status = status;
    }
    public String getDoctorTeamCode() {
        return doctorTeamCode;
    }
    public void setDoctorTeamCode(String doctorTeamCode) {
        this.doctorTeamCode = doctorTeamCode;
    }
    public String getOperator() {
        return operator;
    }
    public void setOperator(String operator) {
        this.operator = operator;
    }
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public Integer getSort() {
        return sort;
    }
    public void setSort(Integer sort) {
        this.sort = sort;
    }
    public String getIntroduce() {
        return introduce;
    }
    public void setIntroduce(String introduce) {
        this.introduce = introduce;
    }
    public String getEndIntroduce() {
        return endIntroduce;
    }
    public void setEndIntroduce(String endIntroduce) {
        this.endIntroduce = endIntroduce;
    }
}

+ 9 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/patient/signPackage/ServicePackageVO.java

@ -28,6 +28,7 @@ public class ServicePackageVO {
    private String endIntroduce;//过期描述
    private String status;//审核状态(预留字段0待审核,1审核通过,2审核不通过)
    private Integer del;//是否有效(1有效,0失效)
    private Date endTime;
    private List<SerivePackageItemVO> items;//服务项描述
@ -182,4 +183,12 @@ public class ServicePackageVO {
    public void setOrganizationName(String organizationName) {
        this.organizationName = organizationName;
    }
    public Date getEndTime() {
        return endTime;
    }
    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }
}

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

@ -39,12 +39,9 @@ spring:
spring:
  profiles: jwtest
  datasource:
#    url: jdbc:mysql://172.17.110.160/base?useUnicode:true&amp;characterEncoding=utf-8&amp;autoReconnect=true
#    username: ssgg
#    password: ssgg
    url: jdbc:mysql://172.19.103.77/base?useUnicode:true&characterEncoding=utf-8&autoReconnect=true
    username: root
    password: 123456
    url: jdbc:mysql://172.17.110.160/base?useUnicode:true&amp;characterEncoding=utf-8&amp;autoReconnect=true
    username: ssgg
    password: ssgg
  redis:
    host: 172.19.103.88 # Redis server host.
    port: 6379 # Redis server port.

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

@ -1,6 +1,6 @@
spring:
  application:
    name: svr-authentication
    name: svr-authentication-lyx
  cloud:
    config:
      failFast: true

BIN
svr/svr-base/src/main/template/基础人口信息导入模板.xls


+ 14 - 0
svr/svr-patient/src/main/java/com/yihu/jw/patient/endpoint/servicepackage/PackageServiceEndpoint.java

@ -132,5 +132,19 @@ public class PackageServiceEndpoint extends EnvelopRestEndpoint {
        return success(PatientRequestMapping.SignPackage.api_success,packageService.findPatientSignExist(patient,packageId));
    }
    @GetMapping(value = PatientRequestMapping.SignPackage.findPatientSignPackage)
    @ApiOperation(value = "签约记录", notes = "签约记录")
    public MixEnvelop findPatientSignPackage(@ApiParam(name = "label", value = "标签code") @RequestParam(value = "label", required = false)String label,
                                             @ApiParam(name = "labelType", value = "标签类型") @RequestParam(value = "labelType", required = false)String labelType,
                                             @ApiParam(name = "patient", value = "签约人") @RequestParam(value = "patient", required = false)String patient,
                                             @ApiParam(name = "operator", value = "创建人") @RequestParam(value = "operator", required = false)String operator,
                                             @ApiParam(name = "familyModel", value = "关系模式,1:查询自己;2:查询家人(未经授权);3:查询家人且授权") @RequestParam(value = "familyModel", required = true)String familyModel,
                                             @ApiParam(name = "status", value = "状态:0待审核,1已同意,待支付,2.支付成功,已生效,-1未通过,-2已取消,-3已过期") @RequestParam(value = "status", required = false)Integer status,
                                             @ApiParam(name = "isHos", value = "是否查询历史记录,1为查询历史,不传为当前记录") @RequestParam(value = "isHos", required = false)String isHos,
                                             @ApiParam(name = "page", value = "第几页") @RequestParam(value = "page", required = true)Integer page,
                                             @ApiParam(name = "size", value = "每页大小") @RequestParam(value = "size", required = true)Integer size) {
        return packageService.findPatientSignPackage( label, labelType, patient, operator, familyModel, status, isHos,  page, size);
    }
//=================================
}

+ 2 - 2
svr/svr-patient/src/main/java/com/yihu/jw/patient/endpoint/settings/AccountAppealEndpoint.java

@ -42,8 +42,8 @@ public class AccountAppealEndpoint extends EnvelopRestEndpoint {
    public ObjEnvelop<AccountAppealVO> create(
            @ApiParam(name = "type", value = "申诉类型", required = true)
            @RequestParam AccountAppealDO.Type type,
            @ApiParam(name = "images", value = "申诉证件照", required = true)
            @RequestParam List<MultipartFile> images,
            @ApiParam(name = "images", value = "申诉证件照", required = false)
            @RequestParam(required = false) List<MultipartFile> images,
            @ApiParam(name = "mobile", value = "申诉手机号", required = true)
            @RequestParam String mobile,
            @ApiParam(name = "name", value = "申诉人姓名", required = true)

+ 2 - 2
svr/svr-patient/src/main/java/com/yihu/jw/patient/endpoint/settings/FeedbackEndpoint.java

@ -44,8 +44,8 @@ public class FeedbackEndpoint extends EnvelopRestEndpoint {
    public ObjEnvelop<FeedbackVO> create(
            @ApiParam(name = "type", value = "反馈类型", required = true)
            @RequestParam FeedbackDO.Type type,
            @ApiParam(name = "images", value = "反馈图片", required = true)
            @RequestParam List<MultipartFile> images,
            @ApiParam(name = "images", value = "反馈图片", required = false)
            @RequestParam(required = false) List<MultipartFile> images,
            @ApiParam(name = "mobile", value = "反馈手机号", required = true)
            @RequestParam String mobile,
            @ApiParam(name = "content", value = "反馈内容", required = true)

+ 131 - 4
svr/svr-patient/src/main/java/com/yihu/jw/patient/service/servicepackage/PackageService.java

@ -12,9 +12,11 @@ import com.yihu.jw.org.dao.BaseOrgDao;
import com.yihu.jw.patient.dao.servicepackage.ServicePackageDao;
import com.yihu.jw.patient.dao.servicepackage.ServicePackageItemDao;
import com.yihu.jw.patient.dao.servicepackage.ServicePackageSignRecordDao;
import com.yihu.jw.patient.service.myFamily.MyFamilyService;
import com.yihu.jw.patient.useragent.UserAgent;
import com.yihu.jw.restmodel.base.doctor.BaseDoctorOrgVO;
import com.yihu.jw.restmodel.base.org.OrgDistanceVO;
import com.yihu.jw.restmodel.patient.signPackage.ServicePackageRecordVO;
import com.yihu.jw.restmodel.patient.signPackage.ServicePackageVO;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
@ -25,6 +27,7 @@ import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;
@ -58,6 +61,9 @@ public class PackageService {
    @Autowired
    private DictHospitalDeptDao dictHospitalDeptDao;
    @Autowired
    private MyFamilyService myFamilyService;
    public MixEnvelop findPackageService(String city,String labelCode,String labelType,Integer page,Integer size){
        String totalSql ="SELECT " +
@ -218,8 +224,10 @@ public class PackageService {
        return MixEnvelop.getSuccessListWithPage(PatientRequestMapping.SignPackage.api_success, list, page, size, count);
    }
    public Envelop signPackage(ServicePackageSignRecordDO recordDO){
    public Envelop signPackage(ServicePackageSignRecordDO recordDO) throws Exception{
        servicePackageSignRecordDao.save(recordDO);
        return Envelop.getSuccess(PatientRequestMapping.SignPackage.api_success);
    }
@ -244,7 +252,126 @@ public class PackageService {
        }
    }
//    public MixEnvelop findSignPackage(){
//
//    }
    public MixEnvelop findPatientSignPackage(String label,String labelType,String patient,String operator,String familyModel,Integer status,String isHos, Integer page,Integer size){
        String totalSql="SELECT DISTINCT " +
                " r.id " +
                " FROM " +
                " base_service_package_sign_record r  " +
                " JOIN base_service_package p ON r.service_package_id = p.id ";
        if(StringUtils.isNotBlank(label)&&StringUtils.isNotBlank(labelType)){
            totalSql += " JOIN base_package_label_info l ON r.service_package_id = l.service_package_id ";
        }
        totalSql +=" WHERE 1=1 ";
        if("1".equals(familyModel)){
            //自己
            if(StringUtils.isNotBlank(patient)){
                totalSql +=" AND r.patient = '"+patient+"'";
            }
        }else if("2".equals(familyModel)){
            //未经授权查询家人,只查自己创建的
            if(StringUtils.isNotBlank(patient)&&StringUtils.isNotBlank(operator)){
                totalSql +=" AND r.operator = '"+operator+"' " +
                        " AND r.patient = '"+patient+"' ";
            }
        }else if("3".equals(familyModel)){
            //查询已经授权,自己创建和家人相关记录
            if(StringUtils.isNotBlank(patient)&&StringUtils.isNotBlank(operator)){
                totalSql +=" AND (r.operator = '"+operator+"' " +
                        " OR r.patient = '"+patient+"' )";
            }
        }
        if(status != null){
            totalSql +=" AND r.`status` ="+status;
        }
        if(StringUtils.isNotBlank(isHos)){
            totalSql +=" AND r.`status` < 0 ";
        }else{
            totalSql +=" AND r.`status` >= 0 ";
        }
        if(StringUtils.isNotBlank(label)&&StringUtils.isNotBlank(labelType)){
            totalSql +=" AND l.label ='"+label+"'" +
                    " AND l.label_type ='"+labelType+"'";
        }
        List<Map<String, Object>> rstotal = jdbcTemplate.queryForList(totalSql);
        Long count = 0L;
        if (rstotal != null && rstotal.size() > 0) {
            count =(long)rstotal.size();
        }
        String sql="SELECT DISTINCT " +
                " r.id, " +
                " r.saas_id AS saasId," +
                " p.id AS servicePackageId, " +
                " p.name AS servicePackageName, " +
                " r.patient," +
                " r.name," +
                " r.idcard," +
                " r.sign_doctor AS signDoctor, " +
                " r.sign_doctor_name AS signDoctorName, " +
                " r.ssc," +
                " r.hospital," +
                " r.hospital_name AS hospitalName," +
                " r.admin_team_code AS adminTeamCode," +
                " r.price," +
                " r.start_time AS startTime," +
                " r.end_time AS endTime," +
                " r.status," +
                " r.doctor_team_code AS doctorTeamCode," +
                " r.operator," +
                " r.create_time AS createTime," +
                " r.sort," +
                " p.introduce, " +
                " p.end_introduce AS endIntroduce " +
                " FROM " +
                " base_service_package_sign_record r  " +
                " JOIN base_service_package p ON r.service_package_id = p.id ";
                if(StringUtils.isNotBlank(label)&&StringUtils.isNotBlank(labelType)){
                    sql += " JOIN base_package_label_info l ON r.service_package_id = l.service_package_id ";
                }
                sql +=" WHERE 1=1 ";
                if("1".equals(familyModel)){
                    //自己
                    if(StringUtils.isNotBlank(patient)){
                        sql +=" AND r.patient = '"+patient+"'";
                    }
                }else if("2".equals(familyModel)){
                    //未经授权查询家人,只查自己创建的
                    if(StringUtils.isNotBlank(patient)&&StringUtils.isNotBlank(operator)){
                        sql +=" AND r.operator = '"+operator+"' " +
                              " AND r.patient = '"+patient+"' ";
                    }
                }else if("3".equals(familyModel)){
                    //查询已经授权,自己创建和家人相关记录
                    if(StringUtils.isNotBlank(patient)&&StringUtils.isNotBlank(operator)){
                        sql +=" AND (r.operator = '"+operator+"' " +
                                " OR r.patient = '"+patient+"' )";
                    }
                }
                if(status != null){
                    sql +=" AND r.`status` ="+status;
                }
                if(StringUtils.isNotBlank(isHos)){
                    sql +=" AND r.`status` < 0 ";
                }else{
                    sql +=" AND r.`status` >= 0 ";
                }
                if(StringUtils.isNotBlank(label)&&StringUtils.isNotBlank(labelType)){
                    sql +=" AND l.label ='"+label+"'" +
                          " AND l.label_type ='"+labelType+"'";
                }
                sql +=" ORDER BY r.sort ASC  "+
                      " LIMIT " + (page - 1) * size + "," + size + "";
        List<ServicePackageRecordVO> list = jdbcTemplate.query(sql, new BeanPropertyRowMapper(ServicePackageRecordVO.class));
        return MixEnvelop.getSuccessListWithPage(PatientRequestMapping.SignPackage.api_success, list, page, size, count);
    }
}

+ 8 - 3
svr/svr-patient/src/main/java/com/yihu/jw/patient/service/settings/AccountAppealService.java

@ -6,6 +6,7 @@ import com.yihu.jw.exception.business.file_upload.FailedUploadFileException;
import com.yihu.jw.file_upload.FileUploadService;
import com.yihu.jw.patient.dao.settings.AccountAppealDao;
import com.yihu.jw.restmodel.base.patient.AccountAppealVO;
import com.yihu.jw.restmodel.iot.common.UploadVO;
import com.yihu.mysql.query.BaseJpaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
@ -35,7 +36,7 @@ public class AccountAppealService extends BaseJpaService<AccountAppealDO, Accoun
    @Autowired
    private FileUploadService fileUploadService;
    @Value("fastDFS.fastdfs_file_url")
    @Value("${fastDFS.fastdfs_file_url}")
    private String fastdfsUrl;
    @Transactional(rollbackFor = Exception.class)
@ -44,7 +45,9 @@ public class AccountAppealService extends BaseJpaService<AccountAppealDO, Accoun
        Assert.notNull(mobile, "申诉手机号不可为空");
        Assert.notNull(name, "申诉姓名不可为空");
        Assert.notNull(idcard, "申诉证件号不可为空");
        AccountAppealDO accoutAppeal = new AccountAppealDO();
        if (!CollectionUtils.isEmpty(images)) {
            StringBuilder img = new StringBuilder();
            images.forEach(one -> {
                InputStream inputStream = null;
                try {
@ -54,18 +57,20 @@ public class AccountAppealService extends BaseJpaService<AccountAppealDO, Accoun
                }
                String fileName = one.getOriginalFilename();
                try {
                    fileUploadService.uploadStream(inputStream, fileName, fastdfsUrl);
                  UploadVO uploadVO = fileUploadService.uploadStream(inputStream, fileName, fastdfsUrl);
                    img.append(uploadVO.getFullUrl()).append(",");
                } catch (Exception e) {
                    throw new FailedUploadFileException("账号申诉证件图片上传失败");
                }
            });
            accoutAppeal.setImg(img.toString());
        }
        AccountAppealDO accoutAppeal = new AccountAppealDO();
        accoutAppeal.setType(type.getValue());
        accoutAppeal.setName(name);
        accoutAppeal.setIdcard(idcard);
        accoutAppeal.setContent(content);
        accoutAppeal.setMobile(mobile);
        this.save(accoutAppeal);
        return accoutAppeal;
    }
}

+ 8 - 3
svr/svr-patient/src/main/java/com/yihu/jw/patient/service/settings/FeedbackService.java

@ -5,6 +5,7 @@ import com.yihu.jw.entity.base.patient.FeedbackDO;
import com.yihu.jw.exception.business.file_upload.FailedUploadFileException;
import com.yihu.jw.file_upload.FileUploadService;
import com.yihu.jw.patient.dao.settings.FeedbackDao;
import com.yihu.jw.restmodel.iot.common.UploadVO;
import com.yihu.mysql.query.BaseJpaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
@ -36,7 +37,7 @@ public class FeedbackService extends BaseJpaService<FeedbackDO, FeedbackDao> {
    @Autowired
    private FileUploadService fileUploadService;
    @Value("fastDFS.fastdfs_file_url")
    @Value("${fastDFS.fastdfs_file_url}")
    private String fastdfsUrl;
    /**
@ -51,7 +52,9 @@ public class FeedbackService extends BaseJpaService<FeedbackDO, FeedbackDao> {
        Assert.notNull(type,"反馈类型不可为空");
        Assert.notNull(feedbackContent,"反馈类型不可为空");
        Assert.notNull(mobile,"手机号不可为空");
        FeedbackDO feedback = new FeedbackDO();
        if(!CollectionUtils.isEmpty(images)){
            StringBuilder img = new StringBuilder();
            images.forEach( one -> {
                InputStream inputStream = null;
                try {
@ -61,16 +64,18 @@ public class FeedbackService extends BaseJpaService<FeedbackDO, FeedbackDao> {
                }
                String fileName = one.getOriginalFilename();
                try {
                    fileUploadService.uploadStream(inputStream,fileName,fastdfsUrl);
                    UploadVO uploadVO = fileUploadService.uploadStream(inputStream, fileName, fastdfsUrl);
                    img.append(uploadVO.getFullUrl()).append(",");
                } catch (Exception e) {
                    throw new FailedUploadFileException("上传反馈图片失败");
                }
            });
            feedback.setImg(img.toString());
        }
        FeedbackDO feedback = new FeedbackDO();
        feedback.setType(type.getValue());
        feedback.setFeedbackContent(feedbackContent);
        feedback.setMobile(mobile);
        this.save(feedback);
        return feedback;
    }
}