ysj 4 лет назад
Родитель
Сommit
73fe0197f1

+ 1 - 0
common/common-request-mapping/src/main/java/com/yihu/jw/rm/health/bank/HealthBankMapping.java

@ -53,6 +53,7 @@ public class HealthBankMapping {
        public static final String updateGoods ="/updateGoods";
        public static final String createCreditsDetail = "/createCreditsDetail";
        public static final String findCreditsLogInfo ="/findCreditsLogInfo";
        public static final String findCreditsLogInfoWithOrder ="/findCreditsLogInfoWithOrder";
        public static final String selectByActivity = "/selectByActivity";
        public static final String selectByRanking = "/selectByRanking";
        public static final String selectByActivityRanking = "/selectByActivityRanking";

+ 1 - 1
readme.MD

@ -19,7 +19,7 @@
     ag-basic 对外的接口网关
     manage-gateway 基卫后台管理系统的接口网关
     .gitignore   项目提交忽略配置文件
     
项目运行
    环境变量配置
        开发环境:  spring_profiles_active jwdev

+ 6 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/methodlog/MethodLogEndpoint.java

@ -7,6 +7,7 @@ import com.yihu.jw.restmodel.base.doctor.BaseDoctorVO;
import com.yihu.jw.restmodel.web.PageEnvelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import com.yihu.jw.rm.base.BaseRequestMapping;
import com.yihu.jw.utils.StringUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
@ -44,6 +45,11 @@ public class MethodLogEndpoint extends EnvelopRestEndpoint {
			@RequestParam(value = "page") int page,
			@ApiParam(name = "size", value = "页码", required = true, defaultValue = "15")
			@RequestParam(value = "size") int size) throws Exception {
				if(StringUtil.isBlank(sorts)){
					sorts = "-createTime";
				}
		List<BaseMethodLogDO> baseDoctors = baseMethodLogService.search(fields, filters, sorts, page, size);
		int count = (int) baseMethodLogService.getCount(filters);
		return success(baseDoctors, count, page, size);

+ 13 - 0
svr/svr-healthy-house/src/main/java/com/yihu/jw/healthyhouse/interceptor/ActivatedInterceptor.java

@ -1,25 +1,38 @@
package com.yihu.jw.healthyhouse.interceptor;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.jw.healthyhouse.constant.LoginInfo;
import com.yihu.jw.healthyhouse.model.user.User;
import com.yihu.jw.healthyhouse.service.user.UserService;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.wlyy.HouseUserContant;
import javassist.*;
import javassist.bytecode.CodeAttribute;
import javassist.bytecode.LocalVariableAttribute;
import javassist.bytecode.MethodInfo;
import net.sf.json.JSON;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestAttributes;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import org.springframework.web.method.HandlerMethod;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;

+ 1 - 1
svr/svr-iot/src/main/java/com/yihu/iot/controller/monitorPlatform/MonitorPlatformController.java

@ -143,7 +143,7 @@ public class MonitorPlatformController extends EnvelopRestEndpoint {
    @RequestMapping(value = "/smartDeviceDistribution",method = RequestMethod.GET)
    @ApiOperation("智能设备发放")
    public MixEnvelop smartDeviceDistribution(@ApiParam(name="startTime",value="开始时间",defaultValue = "")
                                                  @RequestParam(value="startTime",required = false) String startTime,
                                              @RequestParam(value="startTime",required = false) String startTime,
                                              @ApiParam(name="endTime",value="结束时间",defaultValue = "")
                                                  @RequestParam(value="endTime",required = false) String endTime,
                                              @ApiParam(name="deviceType",value="设备类型",defaultValue = "")

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

@ -1,6 +1,6 @@
spring:
  application:
    name:  svr-iot
    name:  svr-iot-lb
  cloud:
    config:
      failFast: true

+ 28 - 1
svr/svr-wlyy-health-bank/src/main/java/com/yihu/jw/controller/CreditsDetailController.java

@ -61,7 +61,34 @@ public class CreditsDetailController extends EnvelopRestEndpoint {
            return MixEnvelop.getError(e.getMessage());
        }
    }
    /**
     * 查看积分记录  带排序
     *
     * @param creditsDetail 积分对象
     * @param OrderType  排序类型:0默认排序;1扣分排序;2加分排序
     * @param page 页码
     * @param size 分页大小
     * @return
     */
    @PostMapping(value = HealthBankMapping.healthBank.findCreditsLogInfoWithOrder)
    @ApiOperation(value = "查看积分记录")
    public MixEnvelop<CreditsDetailDO, CreditsDetailDO> selectCreditsLogInfoWithOeder(@ApiParam(name = "creditsDetail",value = "积分记录JSON")
                                                                             @RequestParam(value = "creditsDetail",required = false)String creditsDetail,
                                                                             @ApiParam(name = "OrderType",defaultValue = "0",value = "排序类型:0默认排序;1扣分排序;2加分排序")
                                                                             @RequestParam(value = "OrderType", required = false)Integer OrderType,
                                                                             @ApiParam(name = "page", value = "第几页,从1开始")
                                                                             @RequestParam(value = "page", defaultValue = "1",required = false)Integer page,
                                                                             @ApiParam(name = "size",defaultValue = "10",value = ",每页分页大小")
                                                                             @RequestParam(value = "size", required = false)Integer size){
        try{
            CreditsDetailDO creditsDetailDO = toEntity(creditsDetail,CreditsDetailDO.class);
            return service.findByConditionWithOrder(creditsDetailDO,OrderType,page,size);
        }catch (Exception e){
            e.printStackTrace();
            tracer.getCurrentSpan().logEvent(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    /**

+ 28 - 1
svr/svr-wlyy-health-bank/src/main/java/com/yihu/jw/service/CreditsDetailService.java

@ -93,7 +93,34 @@ public class CreditsDetailService extends BaseJpaService<CreditsDetailDO,Creditt
        }
        return MixEnvelop.getSuccessListWithPage(HealthBankMapping.api_success, creditsDetailDOS,page,size,count);
    }
    /**
     *  find creditsLogInfo
     *  带排序
     * @return
     * @throws ParseException
     */
    public MixEnvelop<CreditsDetailDO, CreditsDetailDO> findByConditionWithOrder(CreditsDetailDO creditsDetailDO, Integer OrderType, Integer page, Integer size) throws ParseException {
        String sql = new ISqlUtils().getSql(creditsDetailDO,page,size,"*");
        List<CreditsDetailDO> creditsDetailDOS = jdbcTemplate.query(sql,new BeanPropertyRowMapper(CreditsDetailDO.class));
        for (CreditsDetailDO creditsDetailDO1 : creditsDetailDOS){
            if (creditsDetailDO1.getTradeType() != null && creditsDetailDO1.getTradeType().equalsIgnoreCase("ACTIVITY_TASK")){
                TaskDO taskDO = taskDao.findOne(creditsDetailDO1.getTransactionId());
                creditsDetailDO1.setTaskDO(taskDO);
            }else if (creditsDetailDO1.getTradeType()!=null&&creditsDetailDO1.getTradeType().equals("EXCHANGE_GOODS")){
                ExchangeGoodsDO exchangeGoodsDO =exchangeGoodsDao.findOne(creditsDetailDO1.getTransactionId());
                TaskGoodsDO taskGoodsDO = taskGoodsDao.selectById(exchangeGoodsDO.getActivityGoodsId());
                exchangeGoodsDO.setTaskGoodsDO(taskGoodsDO);
                creditsDetailDO1.setExchangeGoodsDO(exchangeGoodsDO);
            }
        }
        String sqlcount = new ISqlUtils().getSql(creditsDetailDO,0,0,"count");
        List<Map<String,Object>> rstotal = jdbcTemplate.queryForList(sqlcount);
        Long count = 0L;
        if(rstotal!=null&&rstotal.size()>0){
            count = (Long) rstotal.get(0).get("total");
        }
        return MixEnvelop.getSuccessListWithPage(HealthBankMapping.api_success, creditsDetailDOS,page,size,count);
    }
    /**
     * 获取账户信息

+ 7 - 1
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/controller/rehabilitation/RehabilitationPlanController.java

@ -139,11 +139,14 @@ public class RehabilitationPlanController extends EnvelopRestEndpoint {
        try {
            JSONObject json = new JSONObject(rehabilitationPlan);
            if(json.has("totalExpense")) {
                json.put("totalExpense", DataUtils.doubleToInt(json.getDouble("totalExpense")));
                json.put("totalExpense", (DataUtils.doubleToInt(json.getDouble("totalExpense")))*100);
            }
            JSONArray array = new JSONArray();
            for(Object planDetail : json.getJSONArray("detail")) {
                JSONObject j = (JSONObject)planDetail;
                if(j.has("expense")){
                    j.put("expense", (DataUtils.doubleToInt(j.getDouble("expense")))*100);
                }
                if(j.has("executeTime")) {
                    String executeTime = j.get("executeTime").toString();
                    String[] result = null;
@ -379,6 +382,9 @@ public class RehabilitationPlanController extends EnvelopRestEndpoint {
            JSONArray array = new JSONArray();
            for(Object planDetail : json.getJSONArray("detail")) {
                JSONObject j = (JSONObject)planDetail;
                if(j.has("expense")){
                    j.put("expense", (DataUtils.doubleToInt(j.getDouble("expense")))*100);
                }
                if(j.has("executeTime")) {
                    String executeTime = j.get("executeTime").toString();
                    String[] result = null;

+ 3 - 3
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/rehabilitation/RehabilitationManageService.java

@ -738,11 +738,11 @@ public class RehabilitationManageService {
//        if(!(one.get("specialistDoctor")+"").equals((one.get("create_user")+""))){
//            executeDoctorList.add(one.get("create_user_name")+"");
//        }
        executeDoctorList.add(one.get("executeDoctorName")+"");
        resultMap.put("remark",one.get("remark"));
        executeDoctorList.add(one.get("executeDoctorName")+"");//
        resultMap.put("remark",one.get("remark"));//备注
        resultMap.put("executeDoctorList",executeDoctorList);//执行医生名称列表
        resultMap.put("executeDoctorCode",one.get("executeDoctor")+"");//执行医生code
        resultMap.put("executeDoctorName",one.get("executeDoctorName")+"");//执行医生code
        resultMap.put("executeDoctorName",one.get("executeDoctorName")+"");//执行医生名称
        resultMap.put("specialistDoctorCode",one.get("createDoctor")+"");//创建人(专科)医生code
        resultMap.put("specialistDoctorName",one.get("createDoctorName")+"");//创建人(专科)医生名字
        resultMap.put("title",one.get("title"));//项目标题