Jelajahi Sumber

[cmd]修改bug

wangzhinan 7 tahun lalu
induk
melakukan
62fc3489a4

+ 3 - 3
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/health/bank/CreditLogService.java

@ -270,7 +270,7 @@ public class CreditLogService {
            }
        }
        String response = null;
        String url ="http://localhost:10051/svr-health-bank/" + "findAccount";
        String url =getBaseUrl() + "findAccount";
        object.put("patientIds",patientIds.toArray());
        Map<String,String> params = new HashMap<>();
        params.put("account",object.toJSONString());
@ -305,7 +305,7 @@ public class CreditLogService {
     */
    public JSONObject selectByActivityRanking1(String activityId,String patientId,Integer page,Integer size){
        String response = null;
        String url ="http://localhost:10051/svr-health-bank/" + "selectByActivityRanking1";
        String url =getBaseUrl() + "selectByActivityRanking1";
        Map<String,String> params = new HashMap<>();
        params.put("activityId",activityId);
        params.put("patientId",patientId);
@ -566,7 +566,7 @@ public class CreditLogService {
        object.put("idCard",patient.getIdcard());
        object.put("openId",patient.getOpenid());
        object.put("unionId",patient.getUnionid());
        String url ="http://localhost:10051/svr-health-bank/" + "addStepIntegrate";
        String url =getBaseUrl() + "addStepIntegrate";
        Map<String,String> params = new HashMap<>();
        params.put("creditsDetail",object.toJSONString());
        try {

+ 24 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/health/bank/TaskService.java

@ -178,4 +178,28 @@ public class TaskService {
        }
        return object;
    }
    /**
     * 创建记录
     *
     * @param object{"patientId":"","taskCode":"","originalStatus","currentStatus":""}
     * @return
     * @throws Exception
     */
    public JSONObject createActiveRecord(JSONObject object) throws Exception {
        String response = null;
        Patient patient = patientDao.findByCode(object.getString("patientId"));
        object.put("unionId",patient.getUnionid());
        object.put("patientIdcard",patient.getIdcard());
        object.put("patientOpenid",patient.getOpenid());
        String url =getBaseUrl() + "createActiveRecord";
        try {
            response = httpClientUtil.iotPostBody(url,object.toString());
        }catch (Exception e){
            e.printStackTrace();
            logger.error(e.getMessage());
        }
        return JSONObject.parseObject(response);
    }
}

+ 22 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/health/bank/AccountController.java

@ -5,6 +5,7 @@ package com.yihu.wlyy.web.third.health.bank;
import com.alibaba.fastjson.JSONObject;
import com.yihu.wlyy.service.app.health.bank.CreditLogService;
import com.yihu.wlyy.service.app.health.bank.TaskService;
import com.yihu.wlyy.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -31,6 +32,8 @@ public class AccountController extends BaseController {
    @Autowired
    private CreditLogService service;
    @Autowired
    private TaskService taskService;
@ -102,4 +105,23 @@ public class AccountController extends BaseController {
    }
    /**
     *  添加历史记录
     *
     * @param activeRecord {"patientId":"","taskCode":"","originalStatus","currentStatus":""}
     * @return
     */
    @RequestMapping(value = "/createActiveRecord",method = RequestMethod.POST)
    @ApiOperation("添加记录")
    public String createActiveRecord(@ApiParam(name = "activeRecord",value = "对象JSON")
                                   @RequestParam(name = "activeRecord") String activeRecord){
        try {
            JSONObject object = JSONObject.parseObject(activeRecord);
            JSONObject result = taskService.createActiveRecord(object);
            return write(200,"获取成功","data",result);
        }catch (Exception e){
            error(e);
            return error(-1,e.getMessage());
        }
    }
}