diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/domain/HandlingOrder.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/domain/HandlingOrder.java index 9d8e5233..b345c3ca 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/domain/HandlingOrder.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/domain/HandlingOrder.java @@ -39,7 +39,7 @@ public class HandlingOrder implements Serializable { private String phone; @ApiModelProperty(value = "排序") - private Integer sort; + private String sort; /** * 创建人 @@ -79,4 +79,6 @@ public class HandlingOrder implements Serializable { private String endTime; + private String signUrl; + } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/service/impl/BackApplyInfoServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/service/impl/BackApplyInfoServiceImpl.java index 779a1cc9..91dea426 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/service/impl/BackApplyInfoServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/service/impl/BackApplyInfoServiceImpl.java @@ -1724,7 +1724,15 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService { @Override public List getHandlingOrderList(HandlingOrder bean) { - return backApplyInfoMapper.getHandlingOrderList(bean); + List list = backApplyInfoMapper.getHandlingOrderList(bean); + if (list.size()>0){ + for (HandlingOrder handlingOrder : list){ + if (StringUtils.isNotBlank(handlingOrder.getSignUrl())) { + handlingOrder.setSignUrl("data:image/png;base64," + handlingOrder.getSignUrl()); + } + } + } + return list; } @Override @@ -1736,6 +1744,8 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService { if (re > 0) { return AjaxResult.error("今日该号已存在"); } + Long userId = SecurityUtils.getLoginUser().getUserid(); + bean.setUpdateBy(userId.toString()); int res = backApplyInfoMapper.uploadSort(bean); if (res > 0) { return AjaxResult.success("排号成功"); @@ -1841,23 +1851,23 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService { HandlingOrder beans = new HandlingOrder(); String timeTypes = ""; try { - //判断现在是上午还是下午,上午为A,下午为B - Calendar calendar = Calendar.getInstance(); - int hour = calendar.get(Calendar.HOUR_OF_DAY); - String timeType = (hour < 12) ? "A" : "B"; - timeTypes = timeType; - bean.setTimeType(timeType); - bean.setReserveDate(DateUtils.getDate()); - //查询当前的排号 - HandlingOrder bean1 = backApplyInfoMapper.getSort(bean); - if (bean1 != null && bean1.getSort() != null) { - Integer sort = bean1.getSort() + 1; - beans.setSort(sort); - beans.setTimeType(timeType); - } else { - beans.setTimeType(timeType); - beans.setSort(1); - } +// //判断现在是上午还是下午,上午为A,下午为B +// Calendar calendar = Calendar.getInstance(); +// int hour = calendar.get(Calendar.HOUR_OF_DAY); +// String timeType = (hour < 12) ? "A" : "B"; +// timeTypes = timeType; +// bean.setTimeType(timeType); +// bean.setReserveDate(DateUtils.getDate()); +// //查询当前的排号 +// HandlingOrder bean1 = backApplyInfoMapper.getSort(bean); +// if (bean1 != null && bean1.getSort() != null) { +// Integer sort = bean1.getSort() + 1; +// beans.setSort(sort); +// beans.setTimeType(timeType); +// } else { +// beans.setTimeType(timeType); +// beans.setSort(1); +// } return AjaxResult.success(beans); } catch (Exception e) { log.error("获取排号失败", e); diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/back/BackApplyInfoMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/back/BackApplyInfoMapper.xml index d8337ec8..eb12a8f3 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/back/BackApplyInfoMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/back/BackApplyInfoMapper.xml @@ -822,7 +822,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update bm_handling_order - set sort = #{sort},time_type = #{timeType},queue_date=#{reserveDate} + set sort = #{sort},time_type = #{timeType},queue_date=#{reserveDate},update_time = now(),update_by = #{updateBy} where id = #{id} @@ -1068,9 +1068,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" bho.time_type as timeType, bho.sort, bho.type, - bho.reserve_date as reserveDate + bho.reserve_date as reserveDate, + su.sign_url as signUrl FROM bm_handling_order bho LEFT JOIN bm_project bp on bp.pro_id = bho.pro_id + LEFT JOIN sys_user su on su.user_id=bho.update_by WHERE bho.is_active = '1' and bho.reserve_date BETWEEN #{startTime} AND #{endTime} @@ -1083,13 +1085,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" bho.type like concat('%',#{keyWord},'%') ) - + ORDER BY bho.update_time desc,bho.sort desc