| | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.cwgl.domain.EstimatedReceivableBill; |
| | | import com.ruoyi.cwgl.mapper.EstimatedReceivableLogMapper; |
| | | import com.ruoyi.cwgl.service.IEstimatedReceivableLogService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | @Override |
| | | public int updateEstimatedReceivable(EstimatedReceivable estimatedReceivable) |
| | | { |
| | | Integer id = estimatedReceivable.getId(); |
| | | EstimatedReceivable estimatedReceivable1 = estimatedReceivableMapper.selectEstimatedReceivableById(id); |
| | | if (estimatedReceivable1.getRelatedBillStatus().equals(2)||estimatedReceivable1.getRelatedBillStatus().equals(3)){ |
| | | throw new ServiceException("结算中或已结算无法修改"); |
| | | } |
| | | estimatedReceivable.setUpdateTime(DateUtils.getNowDate()); |
| | | String username = SecurityUtils.getUsername(); |
| | | logService.insertEstimatedReceivableLog("修改应收",estimatedReceivable.getId(),username); |