| | |
| | | import com.ruoyi.cwgl.domain.EstimatedReceivable; |
| | | import com.ruoyi.cwgl.domain.PendingSettlementBusiness; |
| | | import com.ruoyi.cwgl.domain.ReceivableLineTruckPriceRule; |
| | | import com.ruoyi.cwgl.mapper.SmartLockerApplicationMapper; |
| | | import com.ruoyi.cwgl.service.IEstimatedReceivableService; |
| | | import com.ruoyi.cwgl.service.IPendingSettlementBusinessService; |
| | | import com.ruoyi.cwgl.service.ISmartLockerApplicationService; |
| | | import com.ruoyi.cwgl.service.impl.ExactPricingRuleMatcher; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | private IPendingSettlementBusinessService pendingSettlementBusinessService; |
| | | @Autowired |
| | | private IEstimatedReceivableService estimatedReceivableService; |
| | | @Autowired |
| | | private ISmartLockerApplicationService smartLockerApplicationService; |
| | | |
| | | public void insertPendingSettlement() |
| | | { |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | public void checkExpiredApplications() { |
| | | smartLockerApplicationService.updateExpiredStatus(); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField("create_time") |
| | | private Date createTime; |
| | | /** 截止日期 */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField("deadline_time") |
| | | private Date deadlineTime; |
| | | |
| | | |
| | | /** 更新时间 */ |
| | |
| | | |
| | | Integer selectCwByLicensePlateNumber(String licensePlateNumber); |
| | | |
| | | int updateExpiredStatus(); |
| | | |
| | | } |
| | |
| | | int invalid(Integer id); |
| | | |
| | | Integer selectCwByLicensePlateNumber(String licensePlateNumber); |
| | | |
| | | /** |
| | | * 查询是否过期 |
| | | */ |
| | | void updateExpiredStatus(); |
| | | |
| | | } |
| | |
| | | } |
| | | return integer; |
| | | } |
| | | |
| | | @Override |
| | | public void updateExpiredStatus() { |
| | | |
| | | int i = smartLockerApplicationMapper.updateExpiredStatus(); |
| | | logger.info("更新{}条数据过期状态成功",i); |
| | | |
| | | } |
| | | } |
| | |
| | | <result property="createBy" column="create_by" /> |
| | | <result property="updateBy" column="update_by" /> |
| | | <result property="deleted" column="deleted" /> |
| | | <result property="deadlineTime" column="deadline_time" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectSmartLockerApplicationVo"> |
| | | select thisTab.id, thisTab.command_type, thisTab.applicant_code, thisTab.applicant_name, thisTab.item_type, thisTab.item_name, thisTab.locker_no, thisTab.locker_port, thisTab.status, thisTab.cancel_time, thisTab.receive_time, thisTab.create_time, thisTab.update_time, thisTab.remark, thisTab.create_by, thisTab.update_by, thisTab.deleted from smart_locker_application AS thisTab |
| | | select thisTab.id, thisTab.command_type, thisTab.applicant_code, thisTab.applicant_name, thisTab.item_type, thisTab.item_name, thisTab.locker_no, thisTab.locker_port, thisTab.status, thisTab.cancel_time, thisTab.receive_time, thisTab.create_time, thisTab.update_time, thisTab.remark, thisTab.create_by, thisTab.update_by, thisTab.deleted, thisTab.deadline_time from smart_locker_application AS thisTab |
| | | </sql> |
| | | <sql id="selectSmartLockerApplicationVoCount"> |
| | | select count(0) from smart_locker_application as thisTab |
| | |
| | | <if test="createBy != null">create_by,</if> |
| | | <if test="updateBy != null">update_by,</if> |
| | | <if test="deleted != null">deleted,</if> |
| | | <if test="deadlineTime != null">deadline_time,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="commandType != null">#{commandType},</if> |
| | |
| | | <if test="createBy != null">#{createBy},</if> |
| | | <if test="updateBy != null">#{updateBy},</if> |
| | | <if test="deleted != null">#{deleted},</if> |
| | | <if test="deadlineTime != null">#{deadlineTime},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <insert id="insertSmartLockerApplicationBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id"> |
| | | insert into smart_locker_application |
| | | <trim prefix="(" suffix=") values" suffixOverrides=","> |
| | | id,command_type,applicant_code,applicant_name,item_type,item_name,locker_no,locker_port,status,cancel_time,receive_time,create_time,update_time,remark,create_by,update_by,deleted, |
| | | id,command_type,applicant_code,applicant_name,item_type,item_name,locker_no,locker_port,status,cancel_time,receive_time,create_time,update_time,remark,create_by,update_by,deleted,deadline_time, |
| | | </trim> |
| | | <foreach item="item" index="index" collection="list" separator=","> |
| | | <trim prefix="(" suffix=") " suffixOverrides=","> |
| | | #{item.id},#{item.commandType},#{item.applicantCode},#{item.applicantName},#{item.itemType},#{item.itemName},#{item.lockerNo},#{item.lockerPort},#{item.status},#{item.cancelTime},#{item.receiveTime},#{item.createTime},#{item.updateTime},#{item.remark},#{item.createBy},#{item.updateBy},#{item.deleted}, |
| | | #{item.id},#{item.commandType},#{item.applicantCode},#{item.applicantName},#{item.itemType},#{item.itemName},#{item.lockerNo},#{item.lockerPort},#{item.status},#{item.cancelTime},#{item.receiveTime},#{item.createTime},#{item.updateTime},#{item.remark},#{item.createBy},#{item.updateBy},#{item.deleted},#{item.deadlineTime}, |
| | | </trim> |
| | | </foreach> |
| | | </insert> |
| | |
| | | <if test="createBy != null">create_by = #{createBy},</if> |
| | | <if test="updateBy != null">update_by = #{updateBy},</if> |
| | | <if test="deleted != null">deleted = #{deleted},</if> |
| | | <if test="deadlineTime != null">deadline_time = #{deadlineTime},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | <if test="item.createBy != null">create_by = #{item.createBy},</if> |
| | | <if test="item.updateBy != null">update_by = #{item.updateBy},</if> |
| | | <if test="item.deleted != null">deleted = #{item.deleted},</if> |
| | | <if test="item.deadlineTime != null">deadline_time = #{item.deadlineTime},</if> |
| | | </trim> |
| | | where id = #{item.id} |
| | | </foreach> |
| | | </update> |
| | | <update id="updateExpiredStatus"> |
| | | |
| | | UPDATE smart_locker_application |
| | | SET status = 3, update_time = NOW() |
| | | WHERE status = 0 |
| | | AND deadline_time < NOW() |
| | | |
| | | </update> |
| | | |
| | | <!--删除--> |
| | | <delete id="deleteSmartLockerApplicationById" parameterType="Integer"> |