Forráskód Böngészése

Merge branch 'dev' of http://192.168.1.220:10080/Amoy/patient-co-management into dev

# Conflicts:
#	patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/synergy/customer/CustomerSynergyManageController.java
liuwenbin 6 éve
szülő
commit
55407a66e0

+ 1 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/config/SpringSecurityConfig.java

@ -31,6 +31,7 @@ public class SpringSecurityConfig extends WebSecurityConfigurerAdapter {
                "/yueren/**",
                "/svr-iot/**",
                "/customer/**",
                "/doctor/**",
                "/third/**",
                "/admin/hos/doctor/importFromExcel",
                "/admin/hos/doctor/importData",

+ 10 - 11
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/synergy/customer/CustomerQuestionnaireController.java

@ -28,15 +28,14 @@ public class CustomerQuestionnaireController extends BaseController {
    @RequestMapping(value = "saveAnswer", method = RequestMethod.POST)
    @ApiOperation(value = "保存用户答案")
    public String saveAnswer( @ApiParam(value = "问卷题目及选项")@RequestParam String jsonData,
                              @ApiParam(value = "客服code")@RequestParam(value = "customerCode")String customerCode,
                              @ApiParam(value = "居民code")@RequestParam(value = "patientCode")String patientCode,
                              @ApiParam(value = "问卷标签")@RequestParam(value = "labelType")Integer labelType,
                              @ApiParam(value = "筛查入口(labelType=5时要填),0是第一次筛查 1是再次评估", defaultValue = "1")@RequestParam(value = "isAgain")int isAgain,
                              @ApiParam(value = "来源(1医生发放 2居民自我评估)")@RequestParam(value = "source")int source,
                              @ApiParam(value = "协同工单服务对象表code")@RequestParam(value = "serviceCode")String serviceCode) {
    public String saveAnswer( @ApiParam(value = "问卷题目及选项", required = true)@RequestParam String jsonData,
                              @ApiParam(value = "客服code", required = true)@RequestParam(value = "customerCode")String customerCode,
                              @ApiParam(value = "居民code", required = true)@RequestParam(value = "patientCode")String patientCode,
                              @ApiParam(value = "问卷标签", required = false)@RequestParam(value = "labelType")Integer labelType,
                              @ApiParam(value = "来源(1医生发放 2居民自我评估)", required = false, defaultValue = "1")@RequestParam(value = "source")Integer source,
                              @ApiParam(value = "协同工单服务对象表code", required = true)@RequestParam(value = "serviceCode")String serviceCode) {
        try {
            return  write(200, "保存成功!", "data", questionnaireService.saveResultAndAnswer(patientCode, labelType, customerCode, isAgain, source,jsonData, serviceCode));
            return  write(200, "保存成功!", "data", questionnaireService.saveResultAndAnswer(patientCode, labelType, customerCode, source,jsonData, serviceCode));
        } catch (Exception e) {
            e.printStackTrace();
            return write(-1, "保存失败!");
@ -45,7 +44,7 @@ public class CustomerQuestionnaireController extends BaseController {
    @RequestMapping(value = "getAnswers", method = RequestMethod.GET)
    @ApiOperation(value = "查看调查统计结果")
    public String getAnswers(@ApiParam(value = "问卷code") @RequestParam String templateCode) {
    public String getAnswers(@ApiParam(value = "问卷code", required = true) @RequestParam String templateCode) {
        try {
            return write(200, "查询成功!", "data", questionnaireService.getAnswers(templateCode));
        } catch (Exception e) {
@ -90,8 +89,8 @@ public class CustomerQuestionnaireController extends BaseController {
        }
    }
    @RequestMapping(value = "loadingInfo", method = RequestMethod.POST)
    @ApiOperation(value = "载入未完成信息")
    @RequestMapping(value = "loadingInfo", method = RequestMethod.GET)
    @ApiOperation(value = "载入异常工单信息")
    public String loadingInfo(@ApiParam(value = "协同服务工单code") @RequestParam String workorderCode,
                                 @ApiParam(value = "客服code") @RequestParam String customerCode) {
        try {

+ 3 - 3
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/synergy/customer/CustomerSynergyManageController.java

@ -21,8 +21,8 @@ import java.util.Map;
 * Created by 刘文彬 on 2018/9/27.
 */
@Controller
@RequestMapping(value = "/customer/synergy")
@Api(description = "客服端-协同服务")
@RequestMapping(value = "/customer")
@Api(description = "集美客服系统")
public class CustomerSynergyManageController extends BaseController {
    @Autowired
@ -32,7 +32,7 @@ public class CustomerSynergyManageController extends BaseController {
    @RequestMapping(value = "/getWorkOrderInfo", method = {RequestMethod.GET, RequestMethod.POST})
    @ApiOperation(value = "获取协同服务工单信息")
    public String addCallRecord(@ApiParam(name="workorderCode",value="协同服务工单code")
    public String getWorkOrderInfo(@ApiParam(name="workorderCode",value="协同服务工单code")
                                @RequestParam(required = true)String workorderCode,
                                @ApiParam(name="patient",value="居民code")
                                @RequestParam(required = false)String patient,

+ 5 - 2
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/synergy/doctor/DoctorQuestionnaireController.java

@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import java.text.SimpleDateFormat;
import java.util.List;
/**
@ -41,8 +42,10 @@ public class DoctorQuestionnaireController extends BaseController {
                                @ApiParam(name="patientInfo",value="居民信息json字符串")
                                    @RequestParam(required = true)String patientInfo){
        try {
            ManageSynergyWorkorderDO manageSynergyWorkorderDO = objectMapper.readValue(jsonData, ManageSynergyWorkorderDO.class);
            List<ManageSynergyWorkorderServicerDO>  manageSynergyWorkorderServicerDOS = objectMapper.readValue(patientInfo, new TypeReference<List<ManageSynergyWorkorderServicerDO>>(){});
            ObjectMapper object = new ObjectMapper();
            object.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm"));
            ManageSynergyWorkorderDO manageSynergyWorkorderDO = object.readValue(jsonData, ManageSynergyWorkorderDO.class);
            List<ManageSynergyWorkorderServicerDO>  manageSynergyWorkorderServicerDOS = object.readValue(patientInfo, new TypeReference<List<ManageSynergyWorkorderServicerDO>>(){});
            return write(200,"保存成功","data",questionnaireService.createWorkOrder(manageSynergyWorkorderDO, manageSynergyWorkorderServicerDOS));
        }catch (Exception e){
            error(e);

+ 2 - 3
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/synergy/QuestionnaireManageService.java

@ -50,7 +50,7 @@ public class QuestionnaireManageService extends BaseJpaService {
     * @return
     */
    public boolean createWorkOrder(ManageSynergyWorkorderDO workorderDO, List<ManageSynergyWorkorderServicerDO> workorderServicerDOS) {
        String servicer = null;
        String servicer = "";
        int size = workorderServicerDOS.size();
        int len = 0;
        if(size > 5){
@ -91,12 +91,11 @@ public class QuestionnaireManageService extends BaseJpaService {
     * @param patientCode
     * @param labelType
     * @param customerCode
     * @param isAgain
     * @param source
     * @param jsonData
     * @param serviceCode
     */
    public String saveResultAndAnswer(String patientCode, Integer labelType, String customerCode, int isAgain, int source, String jsonData, String serviceCode) {
    public String saveResultAndAnswer(String patientCode, Integer labelType, String customerCode, Integer source, String jsonData, String serviceCode) {
        String url = wlyyUrl + "doctor/questionnaire/saveResultAndAnswer";
        String response = "";
        Map<String, Object> params = new HashMap<>();

+ 2 - 2
patient-co-manage/wlyy-manage/src/main/resources/application.yml

@ -106,7 +106,7 @@ healthbank:
#  url: http://192.168.131.133:10051/svr-health-bank/
#i健康1.0接口
wlyy:
  url: http://localhost:8080/wlyy/
  url: http://localhost:8080/
wechat:
  appId: wxd03f859efdf0873d
  appSecret: 2935b54b53a957d9516c920a544f2537
@ -221,7 +221,7 @@ healthbank:
  url: http://172.19.103.33:8660/svr-wlyy-health-bank/svr-health-bank/
#i健康1.0接口
wlyy:
  url: http://localhost:8080/wlyy/
  url: http://localhost:8080/
wechat:
  appId: wx1f129f7b51701428
  appSecret: 988f005d8309ed1795939e0f042431fb

+ 8 - 4
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/survey/SurveyScreenResultService.java

@ -1100,13 +1100,16 @@ public class SurveyScreenResultService extends BaseService {
    //获取筛查居民信息
    public List<Map<String, Object>> initPatient(String doctor, String labelType, String serverType, Long teamCode) {
        String sql = "SELECT DISTINCT p.`code` as service_patient_code, p.`name` as service_patient_name, t1.ssc,t1.idcard,t1.mobile,t1.hospital,t1.hospital_name,h.town,h.town_name " +
        String sql = "SELECT DISTINCT p.`code` as servicePatientCode, p.`name` as servicePatientName, t1.ssc,t1.idcard,t1.mobile,t1.hospital,t1.hospital_name as hospitalName, h.town,h.town_name as townName " +
                "FROM  wlyy_sign_family t1  LEFT JOIN wlyy_patient p on p. CODE = t1.patient   " +
                "LEFT JOIN wlyy_sign_patient_label_info t2 on t2.patient = t1.patient and t2.label_type = " + labelType + " and t2.status=1 " +
                "RIGHT JOIN wlyy_sign_family_server s on s.sign_code = t1.code and s.server_type in (" + serverType + ") " +
                "RIGHT JOIN wlyy_sign_family_server s on s.sign_code = t1.code" +
                "LEFT JOIN dm_hospital h on t1.hospital = h.`code` " +
                "WHERE ( t1.doctor = ? OR t1.doctor_health = ?) AND t1. STATUS > 0  and t1.expenses_status = 1 AND t1.admin_team_code = ? " +
                "AND p.openid IS NOT NULL AND p.openid <>'' ";
        if(StringUtils.isNotBlank(serverType)){
            sql = sql.replace("on s.sign_code = t1.code", "on s.sign_code = t1.code and s.server_type in (" + serverType + ") ");
        }
        Object[] args = new Object[]{doctor, doctor, teamCode};
        List<Map<String, Object>> patientInfo = jdbcTemplate.queryForList(sql, args);
        return patientInfo;
@ -1123,6 +1126,7 @@ public class SurveyScreenResultService extends BaseService {
     */
    public String createWorkOrder(String jsonData, List<Map<String, Object>> patientInfo, String doctor) throws Exception {
        JSONObject object = new JSONObject(jsonData);
        JSONArray patientInfos = new JSONArray(patientInfo);
        //获取关联业务名称
        if(object.getInt("type") == 4){
            Survey survey = surveyDao.findById(object.getString("relationCode"));
@ -1138,10 +1142,10 @@ public class SurveyScreenResultService extends BaseService {
        object.put("createUserName", d.getName());
        object.put("createUserType", 1);
        Map<String, Object> param = new HashedMap();
        param.put("patientInfo", patientInfo.toString());
        param.put("patientInfo", patientInfos.toString());
        param.put("jsonData", object.toString());
        HttpResponse response = null;
        response = HttpUtils.doPost(customerUrl + "wlyy-manage/createWorkOrder", param);
        response = HttpUtils.doPost(customerUrl + "doctor/createWorkOrder", param);
        JSONObject rs = new JSONObject(response.getContent());
        return rs.getString("message");
    }

+ 2 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/survey/ManagerQuestionnaireService.java

@ -1831,7 +1831,7 @@ public class ManagerQuestionnaireService extends BaseService {
    //查询出推送居民
    public List<Map<String, Object>> initPatient(String labelUnitType, String labelSexType, String labelServerType, String labelDiseaseType, String labelHealthType, String currentUserRole, String currentUserRoleLevel) {
        String tableSql = " select p.code as service_patient_code ,w.`name` as service_patient_name,w.ssc,w.idcard,w.mobile,w.hospital,w.hospital_name,h.town,h.town_name from wlyy_sign_family w ,wlyy_admin_team t, dm_hospital h  ";
        String tableSql = " select p.code as servicePatientCode ,w.`name` as servicePatientName,w.ssc,w.idcard,w.mobile,w.hospital,w.hospital_name as hospitalName, h.town,h.town_name as townName from wlyy_sign_family w ,wlyy_admin_team t, dm_hospital h  ";
        String whereSql = " where w.status>0 and w.expenses_status=1 and w.admin_team_code=t.id and t.org_code=h.code ";
        //通过登录的角色区域权限 限制所属患者条件
@ -1928,7 +1928,7 @@ public class ManagerQuestionnaireService extends BaseService {
        param.put("patientInfo", patientInfo.toString());
        param.put("jsonData", object.toString());
        HttpResponse response = null;
        response = HttpUtils.doPost(customerUrl + "wlyy-manage/createWorkOrder", param);
        response = HttpUtils.doPost(customerUrl + "doctor/createWorkOrder", param);
        JSONObject rs = new JSONObject(response.getContent());
        return rs.getString("message");
    }

+ 3 - 3
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/survey/DoctorSurveyScreenResultController.java

@ -235,9 +235,9 @@ public class DoctorSurveyScreenResultController extends WeixinBaseController {
    public String getAllQuestions(@ApiParam(name = "jsonData",value = "协同服务json字符串")
                                  @RequestParam(value = "jsonData",required = true)String jsonData,
                                  @ApiParam(name = "labelType", value = "疾病类型", defaultValue = "3")
                                  @RequestParam(value = "labelType", required = true) String labelType,
                                  @ApiParam(name = "serverType",value = "多个条件以逗号分割")
                                  @RequestParam(value = "serverType", required = true) String serverType,
                                  @RequestParam(value = "labelType", required = false) String labelType,
                                  @ApiParam(name = "serverType",value = "服务类型,多个条件以逗号分割")
                                  @RequestParam(value = "serverType", required = false) String serverType,
                                  @ApiParam(name = "teamCode",value = "行政团队id")
                                  @RequestParam(value = "teamCode", required = true) Long teamCode){
        try {

+ 1 - 1
patient-co/patient-co-wlyy/src/main/resources/application-devtest.yml

@ -52,7 +52,7 @@ rehabilitation:
  url: http://localhost:10055/svr-wlyy-rehabilitation/
#集美客服配置
customerService:
  url: http://172.19.103.72:8080/customer-service/
  url: http://localhost:8180/
#小程序
applets: