订单收益信息代码提交
This commit is contained in:
parent
8fbac0aa4c
commit
a55b216eb6
@ -0,0 +1,39 @@
|
|||||||
|
package com.xinelu.manage.controller.nursestationpersonrevenue;
|
||||||
|
|
||||||
|
|
||||||
|
import com.xinelu.common.core.controller.BaseController;
|
||||||
|
import com.xinelu.common.core.page.TableDataInfo;
|
||||||
|
import com.xinelu.manage.service.nursestationpersonrevenue.INurseStationPersonRevenueService;
|
||||||
|
import com.xinelu.manage.vo.nursestationpersonrevenue.PersonRevenueCountVO;
|
||||||
|
import com.xinelu.manage.vo.nursestationpersonrevenue.RevenueTimeDTO;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 护理员订单佣金收益信息Controller
|
||||||
|
*
|
||||||
|
* @author xinyilu
|
||||||
|
* @date 2023-03-30
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/system/revenue")
|
||||||
|
public class NurseStationPersonRevenueController extends BaseController {
|
||||||
|
@Resource
|
||||||
|
private INurseStationPersonRevenueService nurseStationPersonRevenueService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询护理员订单佣金收益信息列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:revenue:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(RevenueTimeDTO revenueTime) {
|
||||||
|
startPage();
|
||||||
|
List<PersonRevenueCountVO> list = nurseStationPersonRevenueService.selectNurseStationPersonRevenueList(revenueTime);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,66 @@
|
|||||||
|
package com.xinelu.manage.service.nursestationpersonrevenue;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import com.xinelu.manage.domain.nursestationpersonrevenue.NurseStationPersonRevenue;
|
||||||
|
import com.xinelu.manage.vo.nursestationpersonrevenue.PersonRevenueCountVO;
|
||||||
|
import com.xinelu.manage.vo.nursestationpersonrevenue.RevenueTimeDTO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 护理员订单佣金收益信息Service接口
|
||||||
|
*
|
||||||
|
* @author xinyilu
|
||||||
|
* @date 2023-03-29
|
||||||
|
*/
|
||||||
|
public interface INurseStationPersonRevenueService {
|
||||||
|
/**
|
||||||
|
* 查询护理员订单佣金收益信息
|
||||||
|
*
|
||||||
|
* @param id 护理员订单佣金收益信息主键
|
||||||
|
* @return 护理员订单佣金收益信息
|
||||||
|
*/
|
||||||
|
NurseStationPersonRevenue selectNurseStationPersonRevenueById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询护理员订单佣金收益信息列表
|
||||||
|
*
|
||||||
|
* @param revenueTime 护理员信息及时间
|
||||||
|
* @return 护理员订单佣金收益信息集合
|
||||||
|
*/
|
||||||
|
List<PersonRevenueCountVO> selectNurseStationPersonRevenueList(RevenueTimeDTO revenueTime);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增护理员订单佣金收益信息
|
||||||
|
*
|
||||||
|
* @param nurseStationPersonRevenue 护理员订单佣金收益信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int insertNurseStationPersonRevenue(NurseStationPersonRevenue nurseStationPersonRevenue);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改护理员订单佣金收益信息
|
||||||
|
*
|
||||||
|
* @param nurseStationPersonRevenue 护理员订单佣金收益信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int updateNurseStationPersonRevenue(NurseStationPersonRevenue nurseStationPersonRevenue);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除护理员订单佣金收益信息
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的护理员订单佣金收益信息主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteNurseStationPersonRevenueByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除护理员订单佣金收益信息信息
|
||||||
|
*
|
||||||
|
* @param id 护理员订单佣金收益信息主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteNurseStationPersonRevenueById(Long id);
|
||||||
|
}
|
||||||
@ -0,0 +1,110 @@
|
|||||||
|
package com.xinelu.manage.service.nursestationpersonrevenue.Impl;
|
||||||
|
|
||||||
|
import com.xinelu.manage.domain.nursestationpersonrevenue.NurseStationPersonRevenue;
|
||||||
|
import com.xinelu.manage.mapper.nursestationpersonrevenue.NurseStationPersonRevenueMapper;
|
||||||
|
import com.xinelu.manage.service.nursestationpersonrevenue.INurseStationPersonRevenueService;
|
||||||
|
import com.xinelu.manage.vo.nursestationpersonrevenue.PersonRevenueCountVO;
|
||||||
|
import com.xinelu.manage.vo.nursestationpersonrevenue.RevenueTimeDTO;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.temporal.TemporalAdjusters;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 护理员订单佣金收益信息Service业务层处理
|
||||||
|
*
|
||||||
|
* @author xinyilu
|
||||||
|
* @date 2023-03-29
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class NurseStationPersonRevenueServiceImpl implements INurseStationPersonRevenueService {
|
||||||
|
@Resource
|
||||||
|
private NurseStationPersonRevenueMapper nurseStationPersonRevenueMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询护理员订单佣金收益信息
|
||||||
|
*
|
||||||
|
* @param id 护理员订单佣金收益信息主键
|
||||||
|
* @return 护理员订单佣金收益信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public NurseStationPersonRevenue selectNurseStationPersonRevenueById(Long id) {
|
||||||
|
return nurseStationPersonRevenueMapper.selectNurseStationPersonRevenueById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询护理员订单佣金收益信息列表
|
||||||
|
*
|
||||||
|
* @param revenueTime 护理员订单佣金收益信息
|
||||||
|
* @return 护理员订单佣金收益信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<PersonRevenueCountVO> selectNurseStationPersonRevenueList(RevenueTimeDTO revenueTime) {
|
||||||
|
revenueTime.setStartTime(LocalDate.now().atTime(0, 0, 0));
|
||||||
|
revenueTime.setNowTime(LocalDateTime.now());
|
||||||
|
if (Objects.nonNull(revenueTime.getMonthTime())) {
|
||||||
|
revenueTime.setMonthStartDateTime(revenueTime.getMonthTime().with(TemporalAdjusters.firstDayOfMonth()).atTime(0, 0, 0));
|
||||||
|
revenueTime.setMonthEndDateTime(revenueTime.getMonthTime().with(TemporalAdjusters.lastDayOfMonth()).atTime(23, 59, 59));
|
||||||
|
return nurseStationPersonRevenueMapper.selectCount(revenueTime);
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(revenueTime.getMonthStartTime()) && Objects.nonNull(revenueTime.getMonthEndTime())) {
|
||||||
|
revenueTime.setMonthStartDateTime(revenueTime.getMonthStartTime().atTime(0, 0, 0));
|
||||||
|
revenueTime.setMonthEndDateTime(revenueTime.getMonthEndTime().atTime(23, 59, 59));
|
||||||
|
return nurseStationPersonRevenueMapper.selectCount(revenueTime);
|
||||||
|
}
|
||||||
|
revenueTime.setMonthStartDateTime(LocalDate.now().with(TemporalAdjusters.firstDayOfMonth()).atTime(0, 0, 0));
|
||||||
|
revenueTime.setMonthEndDateTime(LocalDate.now().with(TemporalAdjusters.lastDayOfMonth()).atTime(23, 59, 59));
|
||||||
|
return nurseStationPersonRevenueMapper.selectCount(revenueTime);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增护理员订单佣金收益信息
|
||||||
|
*
|
||||||
|
* @param nurseStationPersonRevenue 护理员订单佣金收益信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertNurseStationPersonRevenue(NurseStationPersonRevenue nurseStationPersonRevenue) {
|
||||||
|
nurseStationPersonRevenue.setCreateTime(LocalDateTime.now());
|
||||||
|
return nurseStationPersonRevenueMapper.insertNurseStationPersonRevenue(nurseStationPersonRevenue);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改护理员订单佣金收益信息
|
||||||
|
*
|
||||||
|
* @param nurseStationPersonRevenue 护理员订单佣金收益信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateNurseStationPersonRevenue(NurseStationPersonRevenue nurseStationPersonRevenue) {
|
||||||
|
nurseStationPersonRevenue.setUpdateTime(LocalDateTime.now());
|
||||||
|
return nurseStationPersonRevenueMapper.updateNurseStationPersonRevenue(nurseStationPersonRevenue);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除护理员订单佣金收益信息
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的护理员订单佣金收益信息主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteNurseStationPersonRevenueByIds(Long[] ids) {
|
||||||
|
return nurseStationPersonRevenueMapper.deleteNurseStationPersonRevenueByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除护理员订单佣金收益信息信息
|
||||||
|
*
|
||||||
|
* @param id 护理员订单佣金收益信息主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteNurseStationPersonRevenueById(Long id) {
|
||||||
|
return nurseStationPersonRevenueMapper.deleteNurseStationPersonRevenueById(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user