Sfoglia il codice sorgente

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

esb 8 anni fa
parent
commit
9b8bd9712e

+ 1 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/health/PatientHealthGuidanceService.java

@ -48,6 +48,7 @@ public class PatientHealthGuidanceService extends BaseService {
			obj.put("doctorName",doc.getName());
			obj.put("patientName",p.getName());
			obj.put("czrq",guidance.getCzrq()!= null ? DateUtil.dateToStr(guidance.getCzrq(),DateUtil.YYYY_MM_DD_HH_MM) :"");
			return obj;
		}else{
			return null;

+ 8 - 8
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/label/SignPatientLabelInfoService.java

@ -342,16 +342,16 @@ public class SignPatientLabelInfoService extends BaseService {
                            week = 6;
                        }
                        startDate.add(Calendar.DATE, -week);
                        sql += " and apply_date >= '" + (df.format(startDate.getTime()) + " 00:00:00")
                                + "' and apply_date <= '" + (df.format(today.getTime()) + " 23:59:59'");
                        sql += " and apply_date between '" + (df.format(startDate.getTime()) + " 00:00:00")
                                + "' and '" + (df.format(today.getTime()) + " 23:59:59'");
                    } else if (label.getLabelCode().equals("2")) {
                        startDate.set(Calendar.DATE, 1);
                        sql += " and apply_date >= '" + (df.format(startDate.getTime()) + " 00:00:00")
                                + "' and apply_date <= '" + (df.format(today.getTime()) + " 23:59:59'");
                        sql += " and apply_date between '" + (df.format(startDate.getTime()) + " 00:00:00")
                                + "' and '" + (df.format(today.getTime()) + " 23:59:59'");
                    } else if (label.getLabelCode().equals("3")) {
                        startDate.add(Calendar.DATE, 29);
                        sql += " and apply_date >= '" + (df.format(today.getTime()) + " 00:00:00")
                                + "' and apply_date <= '" + (df.format(startDate.getTime()) + " 23:59:59'");
                        sql += " and end between '" + (df.format(today.getTime()) + " 00:00:00")
                                + "' and '" + (df.format(startDate.getTime()) + " 23:59:59'");
                    } else {
                        throw new Exception("label is not exist");
                    }
@ -635,9 +635,9 @@ public class SignPatientLabelInfoService extends BaseService {
                " WHERE " +
                "    t1." + (doc.getLevel() == 2 ? "doctor" : "doctor_health") + " = ? " +
                "    AND t1.status > 0 " +
                (teamCode > 0 ? (" AND admin_team_code = " + teamCode) : "") +
                "    AND (t1.name like ? OR t2.label_name like ?) " +
                (teamCode > 0 ? (" AND admin_team_code = " + teamCode) : "")
                + " limit " + page + "," + pagesize;
                " limit " + page + "," + pagesize;
        if (StringUtils.isNotEmpty(labelCode)) {
            args = new Object[]{labelCode, labelType, doctor, "%" + filter + "%", "%" + filter + "%"};

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

@ -1494,6 +1494,13 @@ public class StatisticsService extends BaseService {
                    if (code.equals("1") || code.equals("2") || code.equals("3")) {
                        total += (long) map.get("amount");
                    }
                } else if (index.equals("16")) {
                    // 分组指标总数算法
                    String code = map.get("code") != null ? String.valueOf(map.get("code")) : "";
                    if (!code.equals("2")) {
                        total += (long) map.get("amount");
                    }
                } else {
                    total += (long) map.get("amount");
                }

+ 16 - 22
patient-co-wlyy/src/main/java/com/yihu/wlyy/util/DateUtil.java

@ -675,30 +675,24 @@ public class DateUtil {
	 */
	public static int getAgeByBirthday(Date birthday) {
		try {
			Calendar cal = Calendar.getInstance();
			if (cal.before(birthday)) {
				return 0;
			int age = 0;
			if (birthday == null) {
				return age;
			}
			int yearNow = cal.get(Calendar.YEAR);
			int monthNow = cal.get(Calendar.MONTH) + 1;
			int dayOfMonthNow = cal.get(Calendar.DAY_OF_MONTH);
			cal.setTime(birthday);
			int yearBirth = cal.get(Calendar.YEAR);
			int monthBirth = cal.get(Calendar.MONTH) + 1;
			int dayOfMonthBirth = cal.get(Calendar.DAY_OF_MONTH);
			int age = yearNow - yearBirth;
			if (monthNow <= monthBirth) {
				if (monthNow == monthBirth) {
					if (dayOfMonthNow < dayOfMonthBirth) {
						age--;
					}
				} else {
					age--;
				}
			String birth = new SimpleDateFormat("yyyyMMdd").format(birthday);
			int year = Integer.valueOf(birth.substring(0, 4));
			int month = Integer.valueOf(birth.substring(4, 6));
			int day = Integer.valueOf(birth.substring(6));
			Calendar cal = Calendar.getInstance();
			age = cal.get(Calendar.YEAR) - year;
			//周岁计算
			if (cal.get(Calendar.MONTH) < (month - 1) || (cal.get(Calendar.MONTH) == (month - 1) && cal.get(Calendar.DATE) < day)) {
				age--;
			}
			return age;
		} catch (Exception e) {
			return 0;

+ 1 - 1
patient-co-wlyy/src/main/java/com/yihu/wlyy/util/IdCardUtil.java

@ -85,7 +85,7 @@ public class IdCardUtil {
        Calendar cal = Calendar.getInstance();
        age = cal.get(Calendar.YEAR) - year;
        //周岁计算
        if (cal.get(Calendar.MONTH) > (month - 1) || (cal.get(Calendar.MONTH) == (month - 1) && cal.get(Calendar.DATE) > day)) {
        if (cal.get(Calendar.MONTH) < (month - 1) || (cal.get(Calendar.MONTH) == (month - 1) && cal.get(Calendar.DATE) < day)) {
            age--;
        }

+ 3 - 3
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/device/DeviceController.java

@ -24,7 +24,7 @@ public class DeviceController extends BaseController {
	@ApiOperation("获取设备分类")
	@RequestMapping(value = "DeviceCategory",method = RequestMethod.GET)
	@RequestMapping(value = "DeviceCategory")
	@ResponseBody
	public String getDeviceCategory() {
		try {
@ -37,7 +37,7 @@ public class DeviceController extends BaseController {
	}
	@ApiOperation("获取设备列表")
	@RequestMapping(value = "DeviceList",method = RequestMethod.GET)
	@RequestMapping(value = "DeviceList")
	@ResponseBody
	public String getDeviceList(@ApiParam(name="category_code",value="设备类型代码",defaultValue = "1")
								 @RequestParam(value="category_code",required = true) String categoryCode) {
@ -51,7 +51,7 @@ public class DeviceController extends BaseController {
	}
	@ApiOperation("获取设备信息")
	@RequestMapping(value = "DeviceInfo",method = RequestMethod.GET)
	@RequestMapping(value = "DeviceInfo")
	@ResponseBody
	public String getDeviceInfo(@ApiParam(name="id",value="设备ID",defaultValue = "19")
									   @RequestParam(value="id",required = true) String id) {

+ 1 - 1
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/sign/DoctorFamilyContractController.java

@ -278,7 +278,7 @@ public class DoctorFamilyContractController extends WeixinBaseController {
            String healthDoctor,
            String healthLabel,
            @RequestParam(required = false, defaultValue = "") String customLabel,
            @RequestParam(required = false, defaultValue = "1") String disease,
            @RequestParam(required = false, defaultValue = "") String disease,
            String healthDoctorName,
            @RequestParam(required = false) String majorDoctor,
            @RequestParam(required = false) String majorDoctorName,

+ 5 - 5
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/consult/ConsultCommunicationController.java

@ -43,7 +43,7 @@ public class ConsultCommunicationController extends WeixinBaseController {
	 * @param diseaseName 疾病
	 * @return
	 */
	@RequestMapping(value = "add", method = RequestMethod.GET)
	@RequestMapping(value = "add")
	@ResponseBody
	public String add(String question, String content, @RequestParam(required = false) String images, @RequestParam(required = false) String disease, @RequestParam(required = false) String diseaseName) {
		try {
@ -89,7 +89,7 @@ public class ConsultCommunicationController extends WeixinBaseController {
	 * @param pagesize 分页大小
	 * @return
	 */
	@RequestMapping(value = "list", method = RequestMethod.GET)
	@RequestMapping(value = "list")
	@ResponseBody
	public String list(int type, @RequestParam(required = false) String disease, long id, int pagesize) {
		try {
@ -139,7 +139,7 @@ public class ConsultCommunicationController extends WeixinBaseController {
	 * @param images 回复图片,多图以逗号分隔
	 * @return
	 */
	@RequestMapping(value = "reply", method = RequestMethod.GET)
	@RequestMapping(value = "reply")
	@ResponseBody
	public String reply(String consult, String content, @RequestParam(required = false) String images) {
		try {
@ -175,7 +175,7 @@ public class ConsultCommunicationController extends WeixinBaseController {
	 * @param pagesize 分页大小
	 * @return
	 */
	@RequestMapping(value = "reply_list", method = RequestMethod.GET)
	@RequestMapping(value = "reply_list")
	@ResponseBody
	public String replyList(String consult, long id, int pagesize) {
		try {
@ -223,7 +223,7 @@ public class ConsultCommunicationController extends WeixinBaseController {
	 * @param consult
	 * @return
	 */
	@RequestMapping(value = "info", method = RequestMethod.GET)
	@RequestMapping(value = "info")
	@ResponseBody
	public String info(String consult) {
		try {

+ 3 - 3
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/consult/ConsultMoviController.java

@ -37,7 +37,7 @@ public class ConsultMoviController extends WeixinBaseController {
	 * 视频咨询三师医生查询接口
	 * @return
	 */
	@RequestMapping(value = "doctors", method = RequestMethod.GET)
	@RequestMapping(value = "doctors")
	@ResponseBody
	public String doctors() {
		try {
@ -64,7 +64,7 @@ public class ConsultMoviController extends WeixinBaseController {
	 * @param imageUrls 图片URL,多图逗号分隔
	 * @return
	 */
	@RequestMapping(value = "add", method = RequestMethod.GET)
	@RequestMapping(value = "add")
	@ResponseBody
	public String add(@RequestParam(required = false) Integer target, @RequestParam(required = false) Integer type, @RequestParam(required = false) String family, @RequestParam(required = false) String doctor, String scheduling, String appo_date, int appo_week, String hour_begin, String hour_end, String content, @RequestParam(required = false) String images) {
		try {
@ -82,7 +82,7 @@ public class ConsultMoviController extends WeixinBaseController {
	 * @param star 星级
	 * @return 操作结果
	 */
	@RequestMapping(value = "comment", method = RequestMethod.GET)
	@RequestMapping(value = "comment")
	@ResponseBody
	public String comment(String consult, String content, int star) {
		try {

+ 5 - 5
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/consult/ConsultPublicController.java

@ -53,7 +53,7 @@ public class ConsultPublicController extends WeixinBaseController {
	 * @param diseaseName 疾病类型名称
	 * @return
	 */
	@RequestMapping(value = "add", method = RequestMethod.GET)
	@RequestMapping(value = "add")
	@ResponseBody
	public String add(
			String question,
@ -108,7 +108,7 @@ public class ConsultPublicController extends WeixinBaseController {
	 * @param pagesize 分页大小
	 * @return
	 */
	@RequestMapping(value = "list", method = RequestMethod.GET)
	@RequestMapping(value = "list")
	@ResponseBody
	public String list(long id, int pagesize, @RequestParam(required = false) String disease) {
		try {
@ -163,7 +163,7 @@ public class ConsultPublicController extends WeixinBaseController {
	 * @param images 回复图片,多图以逗号分隔
	 * @return
	 */
	@RequestMapping(value = "reply", method = RequestMethod.GET)
	@RequestMapping(value = "reply")
	@ResponseBody
	public String reply(String consult, String content, @RequestParam(required = false) String images) {
		try {
@ -203,7 +203,7 @@ public class ConsultPublicController extends WeixinBaseController {
	 *            分页大小
	 * @return
	 */
	@RequestMapping(value = "reply_list", method = RequestMethod.GET)
	@RequestMapping(value = "reply_list")
	@ResponseBody
	public String replyList(String consult, long id, int pagesize) {
		try {
@ -250,7 +250,7 @@ public class ConsultPublicController extends WeixinBaseController {
	 * @param consult
	 * @return
	 */
	@RequestMapping(value = "info", method = RequestMethod.GET)
	@RequestMapping(value = "info")
	@ResponseBody
	public String info(String consult) {
		try {

+ 1 - 0
patient-co-wlyy/src/main/resources/applicationContext.xml

@ -104,6 +104,7 @@
	<bean id="objectMapper" class="com.fasterxml.jackson.databind.ObjectMapper" />
    <!--quartz任务调度器名称,调度器只能加载与名称相同的任务-->
	<bean id="quartzScheduler" class="org.springframework.scheduling.quartz.SchedulerFactoryBean" scope="singleton">
		<property name="dataSource" ref="dataSource"/>
		<property name="configLocation" value="classpath:/quartz.properties" />