问题修改

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; private String phone;
@ApiModelProperty(value = "排序") @ApiModelProperty(value = "排序")
private Integer sort; private String sort;
/** /**
* 创建人 * 创建人
@ -79,4 +79,6 @@ public class HandlingOrder implements Serializable {
private String endTime; private String endTime;
private String signUrl;
} }

View File

@ -1724,7 +1724,15 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
@Override @Override
public List<HandlingOrder> getHandlingOrderList(HandlingOrder bean) { 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 @Override
@ -1736,6 +1744,8 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
if (re > 0) { if (re > 0) {
return AjaxResult.error("今日该号已存在"); return AjaxResult.error("今日该号已存在");
} }
Long userId = SecurityUtils.getLoginUser().getUserid();
bean.setUpdateBy(userId.toString());
int res = backApplyInfoMapper.uploadSort(bean); int res = backApplyInfoMapper.uploadSort(bean);
if (res > 0) { if (res > 0) {
return AjaxResult.success("排号成功"); return AjaxResult.success("排号成功");
@ -1841,23 +1851,23 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
HandlingOrder beans = new HandlingOrder(); HandlingOrder beans = new HandlingOrder();
String timeTypes = ""; String timeTypes = "";
try { try {
//判断现在是上午还是下午上午为A下午为B // //判断现在是上午还是下午上午为A下午为B
Calendar calendar = Calendar.getInstance(); // Calendar calendar = Calendar.getInstance();
int hour = calendar.get(Calendar.HOUR_OF_DAY); // int hour = calendar.get(Calendar.HOUR_OF_DAY);
String timeType = (hour < 12) ? "A" : "B"; // String timeType = (hour < 12) ? "A" : "B";
timeTypes = timeType; // timeTypes = timeType;
bean.setTimeType(timeType); // bean.setTimeType(timeType);
bean.setReserveDate(DateUtils.getDate()); // bean.setReserveDate(DateUtils.getDate());
//查询当前的排号 // //查询当前的排号
HandlingOrder bean1 = backApplyInfoMapper.getSort(bean); // HandlingOrder bean1 = backApplyInfoMapper.getSort(bean);
if (bean1 != null && bean1.getSort() != null) { // if (bean1 != null && bean1.getSort() != null) {
Integer sort = bean1.getSort() + 1; // Integer sort = bean1.getSort() + 1;
beans.setSort(sort); // beans.setSort(sort);
beans.setTimeType(timeType); // beans.setTimeType(timeType);
} else { // } else {
beans.setTimeType(timeType); // beans.setTimeType(timeType);
beans.setSort(1); // beans.setSort(1);
} // }
return AjaxResult.success(beans); return AjaxResult.success(beans);
} catch (Exception e) { } catch (Exception e) {
log.error("获取排号失败", e); log.error("获取排号失败", e);

View File

@ -822,7 +822,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="uploadSort"> <update id="uploadSort">
update bm_handling_order 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} where id = #{id}
</update> </update>
@ -1068,9 +1068,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
bho.time_type as timeType, bho.time_type as timeType,
bho.sort, bho.sort,
bho.type, bho.type,
bho.reserve_date as reserveDate bho.reserve_date as reserveDate,
su.sign_url as signUrl
FROM bm_handling_order bho FROM bm_handling_order bho
LEFT JOIN bm_project bp on bp.pro_id = bho.pro_id 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' WHERE bho.is_active = '1'
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''"> <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
and bho.reserve_date BETWEEN #{startTime} 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},'%') bho.type like concat('%',#{keyWord},'%')
) )
</if> </if>
ORDER BY bho.update_time desc,bho.sort desc
</select> </select>
<select id="selectSort" resultType="java.lang.Integer"> <select id="selectSort" resultType="java.lang.Integer">
SELECT count(*) SELECT count(*)
FROM bm_handling_order FROM bm_handling_order
WHERE sort = #{sort} WHERE sort = #{sort}
and time_type=#{timeType}
and queue_date=#{reserveDate} and queue_date=#{reserveDate}
and is_active = '1' and is_active = '1'
</select> </select>