问题修改

This commit is contained in:
hayu 2025-07-30 18:12:00 +08:00
parent 3be946db4c
commit 81c964be5a
3 changed files with 36 additions and 23 deletions

View File

@ -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;
}

View File

@ -1724,7 +1724,15 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
@Override
public List<HandlingOrder> getHandlingOrderList(HandlingOrder bean) {
return backApplyInfoMapper.getHandlingOrderList(bean);
List<HandlingOrder> 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);

View File

@ -822,7 +822,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="uploadSort">
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}
</update>
@ -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'
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
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},'%')
)
</if>
ORDER BY bho.update_time desc,bho.sort desc
</select>
<select id="selectSort" resultType="java.lang.Integer">
SELECT count(*)
FROM bm_handling_order
WHERE sort = #{sort}
and time_type=#{timeType}
and queue_date=#{reserveDate}
and is_active = '1'
</select>