瀏覽代碼

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

trick9191 7 年之前
父節點
當前提交
5f0d51a4f9

+ 15 - 1
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/controller/PrescriptionController.java

@ -6,6 +6,9 @@ import com.yihu.wlyy.service.service.prescription.PrescriptionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
@ -20,6 +23,8 @@ import org.springframework.web.bind.annotation.*;
@Api(description = "长处方接口")
public class PrescriptionController extends BaseController{
	private static Logger logger = LoggerFactory.getLogger(PrescriptionController.class);
	@Autowired
	PrescriptionCAService caService;
@ -183,7 +188,16 @@ public class PrescriptionController extends BaseController{
			return Result.success("挂号开处方接口!",re);
		} catch (Exception ex) {
			ex.printStackTrace();
			return Result.error(ex.getMessage());
			logger.info("智业接口请求失败");
			//异常处理
			String message = ex.getMessage();
			if(StringUtils.isNotBlank(message)){
				if(message.contains("System.Exception:")){
					message = message.substring(message.indexOf("System.Exception:")+18,message.indexOf("\\n"));
					return Result.error(message);
				}
			}
			return Result.error("请求失败");
		}
	}

+ 3 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/statistics/StatisticsService.java

@ -1873,7 +1873,7 @@ public class StatisticsService extends BaseService {
        //1.统计签约数据
        //查找团队签约
        String sign_sql = "SELECT COUNT(1) signCount FROM wlyy_sign_family t WHERE t.admin_team_code =" + id + " AND t.czrq >='" + startDate + "' AND t.czrq<='" + endDate + "' AND t.status >0 AND t.expenses_status ='1'";
        String sign_sql = "SELECT COUNT(1) signCount FROM wlyy_sign_family t WHERE t.admin_team_code =" + id + " AND t.czrq >='" + startDate + "' AND t.czrq<='" + endDate + "' AND t.status >0 AND  t.expenses_status ='1'";
        //查找续签表未转移的记录
        String renew_sql = "SELECT COUNT(1) renewCount FROM wlyy_sign_family_renew t WHERE t.admin_team_code =" + id + " AND t.czrq >='" + startDate + "' AND t.czrq<='" + endDate + "' AND t.status =1 AND t.expenses_status ='1' AND t.is_valid =0";
@ -2044,6 +2044,7 @@ public class StatisticsService extends BaseService {
                "  d.id = p.participant_id " +
                " AND c.consult = t.id " +
                " AND c.patient = s.id " +
                " AND c.type = 2 " +
                " AND p.session_id = t.session_id " +
                " AND c.admin_team_code =" + id +
                " AND t.create_time >= '" + startDate + "' " +
@ -2066,6 +2067,7 @@ public class StatisticsService extends BaseService {
                "  d.id = p.participant_id " +
                " AND c.consult = t.id " +
                " AND c.patient = s.id " +
                " AND c.type = 2 " +
                " AND t. STATUS <> 10 " +
                " AND t.`reply` = 0 " +
                " AND p.session_id = t.session_id " +

+ 6 - 4
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/util/CommonUtil.java

@ -119,7 +119,8 @@ public class CommonUtil {
    }
    /**
     * double*100转int
     * double转字符串,在转int
     * double*100转int 有bug 34.3会会变成3429
     * @param d
     * @return
     */
@ -135,9 +136,10 @@ public class CommonUtil {
            amLong = Integer.valueOf(currency+"00");
        }else if(length - index >= 3){
            amLong = Integer.valueOf((currency.substring(0, index+3)).replace(".", ""));
            Integer i = Integer.valueOf(currency.substring(index+3,index+4));
            if(i>=5){
                amLong++;
            if(length-index>3){
                if(Integer.valueOf(currency.substring(index+3,index+4))>=5){
                    amLong++;
                }
            }
        }else if(length - index == 2){
            amLong = Integer.valueOf((currency.substring(0, index+2)).replace(".", "")+0);

+ 10 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/prescription/PrescriptionInfoController.java

@ -3,6 +3,7 @@ package com.yihu.wlyy.web.doctor.prescription;
import com.alibaba.fastjson.JSONObject;
import com.yihu.wlyy.adapter.PresModeAdapter;
import com.yihu.wlyy.aop.ObserverRequired;
import com.yihu.wlyy.entity.doctor.team.admin.AdminTeam;
import com.yihu.wlyy.entity.patient.prescription.Prescription;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionExpressage;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionInfo;
@ -11,6 +12,7 @@ import com.yihu.wlyy.service.app.prescription.PrescriptionExpressageService;
import com.yihu.wlyy.service.app.prescription.PrescriptionInfoService;
import com.yihu.wlyy.service.app.prescription.PrescriptionPayService;
import com.yihu.wlyy.service.app.prescription.PrescriptionService;
import com.yihu.wlyy.service.app.team.AdminTeamService;
import com.yihu.wlyy.service.third.jw.JwPrescriptionService;
import com.yihu.wlyy.service.third.jw.ZyDictService;
import com.yihu.wlyy.web.BaseController;
@ -44,6 +46,8 @@ public class PrescriptionInfoController extends BaseController {
    private PresModeAdapter adapter;
    @Autowired
    private ZyDictService zyDictService;
    @Autowired
    private AdminTeamService adminTeamService;
    @RequestMapping(value = "/getPrescriptionFilter", method = RequestMethod.GET)
@ -171,9 +175,11 @@ public class PrescriptionInfoController extends BaseController {
    public String prescriptionFollow(
            @RequestParam(required = true) @ApiParam(value = "处方code", name = "prescriptionCode") String prescriptionCode) {
        try {
           JSONObject jo = new JSONObject();
            JSONObject jo = new JSONObject();
            //获取处方信息
            Prescription prescription = prescriptionService.findByCode(prescriptionCode);
            AdminTeam adminTeam = adminTeamService.getTeam(prescription.getAdminTeamId());
            //获取处方药品信息
            List<PrescriptionInfo> prescriptionInfos = prescriptionInfoService.getPrescriptionInfo(prescriptionCode);
            //获取付款信息
@ -183,6 +189,7 @@ public class PrescriptionInfoController extends BaseController {
            jo.put("prescriptionInfos", prescriptionInfos);
            jo.put("prescriptionPay", prescriptionPay);
            jo.put("prescriptionExpressage", prescriptionExpressage);
            jo.put("leadCode", adminTeam.getLeaderCode());//团队长code
            if (prescription != null) {
                jo.put("prescriptionHospital", prescription.getHospitalName());//出药机构
                jo.put("dispensaryDispensaryType", prescription.getDispensaryType());//处方配送方式
@ -331,7 +338,7 @@ public class PrescriptionInfoController extends BaseController {
             @RequestParam(required = true) @ApiParam(value = "健康管理师Code", name = "healthDoctor") String
                     healthDoctor) {
        try {
            return write(200, "操作成功!", "data", prescriptionInfoService.distributionHealthDoctor(codes, healthDoctor,getUID()));
            return write(200, "操作成功!", "data", prescriptionInfoService.distributionHealthDoctor(codes, healthDoctor, getUID()));
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败!");
@ -453,6 +460,7 @@ public class PrescriptionInfoController extends BaseController {
            return error(-1, "查询失败!");
        }
    }
    @RequestMapping(value = "/getPhysicMinDose", method = RequestMethod.GET)
    @ApiOperation(value = "获取药品最小用量")
    public String getPhysicMinDose(String code) {