装备租赁统计
This commit is contained in:
parent
f2e848c0e4
commit
cde70380a4
|
|
@ -205,5 +205,9 @@ public interface DevInfoMapper {
|
||||||
Integer getDevQcWarningNum();
|
Integer getDevQcWarningNum();
|
||||||
|
|
||||||
DevInfo getDevUsageRatio();
|
DevInfo getDevUsageRatio();
|
||||||
|
|
||||||
|
int updateTotalDevUpDay();
|
||||||
|
|
||||||
|
int updateTotalDevLeaseDay();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ public class NoticeTask {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private BmMessageMapper bmMessageMapper;
|
private BmMessageMapper bmMessageMapper;
|
||||||
@Scheduled(cron = "0 0 0 * * ?")
|
@Scheduled(cron = "0 10 0 * * ?")
|
||||||
public void setNotice() {
|
public void setNotice() {
|
||||||
List<MaDevQc> qcList = maDevQcMapper.checkQcTime();
|
List<MaDevQc> qcList = maDevQcMapper.checkQcTime();
|
||||||
if (qcList.size() > 0) {
|
if (qcList.size() > 0) {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
package com.bonus.material.task;
|
||||||
|
|
||||||
|
import com.bonus.material.device.mapper.DevInfoMapper;
|
||||||
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class StatisticTask {
|
||||||
|
@Resource
|
||||||
|
private DevInfoMapper devInfoMapper;
|
||||||
|
|
||||||
|
// 每日凌晨1点,累计上架天数,累计租赁天数
|
||||||
|
@Scheduled(cron = "0 30 0 * * ?")
|
||||||
|
public void setDevUpLeaseDays() {
|
||||||
|
devInfoMapper.updateTotalDevUpDay();
|
||||||
|
devInfoMapper.updateTotalDevLeaseDay();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -949,4 +949,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
message_type = '3'
|
message_type = '3'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<update id="updateTotalDevUpDay">
|
||||||
|
update ma_dev_info set total_up_day = total_up_day + 1
|
||||||
|
where is_active = '1' and ma_status = '2'
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="updateTotalDevLeaseDay">
|
||||||
|
update ma_dev_info set total_lease_day = total_lease_day + 1
|
||||||
|
where is_active = '1' and ma_status = '3'
|
||||||
|
</update>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue