123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145 |
- package com.idea.oa.flow2.service;
- import com.github.pagehelper.PageHelper;
- import com.github.pagehelper.PageInfo;
- import com.idea.oa.flow2.mapper.FlowMainPushExtendMapper;
- import com.idea.oa.flow2.mapper.FlowMainPushMapper;
- import com.idea.oa.flow2.model.FlowMainPush;
- import com.idea.oa.flow2.model.FlowMainPushExample;
- import com.idea.oa.flow2.model.out.FlowMainPushOut;
- import com.rockstar.common.base.BaseService;
- import com.rockstar.common.support.Convert;
- import com.rockstar.frame.model.extend.DateTrans;
- import com.rockstar.frame.model.extend.Tablepar;
- import com.rockstar.util.UUIDUtils;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.stereotype.Service;
- import java.util.Date;
- import java.util.List;
- @Service
- public class FlowMainPushService implements BaseService<FlowMainPush, FlowMainPushExample> {
- //文件mapper
- @Autowired
- private FlowMainPushMapper modelMapper;
- @Autowired
- private FlowMainPushExtendMapper flowMainPushExtendMapper;
- /**
- * 分页查询
- *
- * @return
- */
- public PageInfo<FlowMainPush> list(Tablepar tablepar, FlowMainPush model, DateTrans dt) {
- PageHelper.startPage(tablepar.getPageNum(), tablepar.getPageSize());
- List<FlowMainPush> list = null;//modelMapper.selectByExample(getCondition(model,dt));
- PageInfo<FlowMainPush> pageInfo = new PageInfo<>(list);
- return pageInfo;
- }
- public Object listAll(FlowMainPush model, DateTrans dt) {
- List<FlowMainPush> list = null;//modelMapper.selectByExample(getCondition(model,dt));
- return list;
- }
- @Override
- public int deleteByPrimaryKey(String ids) {
- List<String> lista = Convert.toListStrArray(ids);
- FlowMainPushExample example = new FlowMainPushExample();
- example.createCriteria().andIdIn(lista);
- return modelMapper.deleteByExample(example);
- }
- @Override
- public FlowMainPush selectByPrimaryKey(String id) {
- return modelMapper.selectByPrimaryKey(id);
- }
- @Override
- public int updateByPrimaryKeySelective(FlowMainPush record) {
- return modelMapper.updateByPrimaryKeySelective(record);
- }
- @Override
- public int updateByExampleSelective(FlowMainPush record, FlowMainPushExample example) {
- return modelMapper.updateByExampleSelective(record, example);
- }
- @Override
- public int updateByExample(FlowMainPush record, FlowMainPushExample example) {
- return modelMapper.updateByExample(record, example);
- }
- @Override
- public List<FlowMainPush> selectByExample(FlowMainPushExample example) {
- return modelMapper.selectByExample(example);
- }
- @Override
- public long countByExample(FlowMainPushExample example) {
- return modelMapper.countByExample(example);
- }
- @Override
- public int deleteByExample(FlowMainPushExample example) {
- return modelMapper.deleteByExample(example);
- }
- public int insert(FlowMainPush record){
- record.setId(UUIDUtils.middleUUID());
- return insertWithoutId(record);
- }
- public int insertWithoutId(FlowMainPush record){
- record.setCreatedAt(new Date());
- return modelMapper.insert(record);
- }
- @Override
- public int insertSelective(FlowMainPush record) {
- record.setId(UUIDUtils.middleUUID());
- record.setCreatedAt(new Date());
- return modelMapper.insertSelective(record);
- }
- /**
- * 将推送人改成 ,2他人已完成审核本审核人进行隐藏
- * @param userId
- * @param upMainLogId
- * @param flowMainPushId
- */
- public void updateStatusTwoByUpMainLogId(String userId,String upMainLogId,String flowMainPushId) {
- flowMainPushExtendMapper.updateStatusTwoByUpMainLogId(userId,upMainLogId,flowMainPushId);
- }
- /**
- * 将推送人改成 ,3申请人撤回申请进行隐藏
- * @param userId
- * @param flowMainId
- */
- public void updateStatusThreeByFlowMainId(String userId, String flowMainId) {
- flowMainPushExtendMapper.updateStatusThreeByFlowMainId(userId, flowMainId);
- }
- public List<FlowMainPushOut> findPushInfoByFlowMainId(String flowMainid) {
- return flowMainPushExtendMapper.findPushInfoByFlowMainId(flowMainid);
- }
- /**
- * 根据主表id获取推送表信息
- * @param flowMainid
- * @return
- */
- public List<FlowMainPush> findPushByFlowMainId(String flowMainid) {
- return flowMainPushExtendMapper.findPushByFlowMainId(flowMainid);
- }
- }
|