无关风月
2025-01-09 60b54488de7872350ba97939f3bd3406642f115d
bug修改
2个文件已修改
20 ■■■■■ 已修改文件
manage/src/main/resources/mapping/TFrameWarehousingDetailMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
optometrist/src/main/java/com/jilongda/optometrist/controller/TOptometristController.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manage/src/main/resources/mapping/TFrameWarehousingDetailMapper.xml
@@ -27,7 +27,7 @@
    </sql>
    <select id="pageList" resultType="com.jilongda.manage.vo.TFrameWarehousingDetailVO">
        select tfwd.id, tfwd.warehousingId, tfwd.brand, tfwd.supplier, tfwd.material, tfwd.total, tfwd.color, tfwd.model, tfwd.code, tfwd.createTime,
               tfwd.updateTime, tfwd.createBy, tfwd.updateBy, tfwd.isDelete, tfwd.modelId,tw.storeId,tw.status
               tfwd.updateTime, tfwd.createBy, tfwd.updateBy, tfwd.isDelete, tfwd.modelId,tw.storeId,tw.status,tfwd.orderId
        from t_frame_warehousing_detail tfwd
        left join t_warehousing tw on tfwd.warehousingId = tw.id
        <where>
optometrist/src/main/java/com/jilongda/optometrist/controller/TOptometristController.java
@@ -2,6 +2,7 @@
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.jilongda.common.basic.ApiResult;
import com.jilongda.common.basic.PageInfo;
import com.jilongda.optometrist.authority.model.SecUser;
@@ -178,6 +179,23 @@
                .eq(TLineUp::getOptometristId, userId).list();
        if (!list.isEmpty())return ApiResult.failed("当前还有未结束的验光单");
        TLineUp lineUp = tLineUpService.getById(id);
        // 获取今天凌晨00:00:00和今日23:59:59
        Date start = new Date();
        start.setHours(0);
        start.setMinutes(0);
        start.setSeconds(0);
        Date end = new Date();
        end.setHours(23);
        end.setMinutes(59);
        end.setSeconds(59);
        List<TLineUp> lineUps = tLineUpService.lambdaQuery().eq(TLineUp::getStoreId, lineUp.getStoreId())
                .between(TLineUp::getCreateTime, start, end).list();
        for (TLineUp up : lineUps) {
            if (Integer.parseInt(up.getCode())<Integer.parseInt(lineUp.getCode())){
                up.setStatus(4);
            }
        }
        tLineUpService.updateBatchById(lineUps);
        lineUp.setStatus(2);
        tLineUpService.updateById(lineUp);
        return ApiResult.success();