package cn.stylefeng.guns.workflow.modular.service.impl;
import cn.stylefeng.guns.base.pojo.page.LayuiPageFactory;
import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo;
import cn.stylefeng.guns.workflow.modular.entity.Procinst;
import cn.stylefeng.guns.workflow.modular.mapper.HistoryProcessMapper;
import cn.stylefeng.guns.workflow.modular.model.params.ProcinstParam;
import cn.stylefeng.guns.workflow.modular.model.params.TaskParam;
import cn.stylefeng.guns.workflow.modular.model.result.ProcinstResult;
import cn.stylefeng.guns.workflow.modular.service.HistoryProcessService;
import cn.stylefeng.roses.core.util.ToolUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
*
* 服务实现类
*
*
* @author fengshuonan
* @since 2019-08-19
*/
@Service
public class HistoryProcessServiceImpl extends ServiceImpl implements HistoryProcessService {
@Autowired
private HistoryProcessMapper historyProcessMapper;
@Override
public void add(ProcinstParam param) {
Procinst entity = getEntity(param);
this.save(entity);
}
@Override
public void update(ProcinstParam param) {
Procinst oldEntity = getOldEntity(param);
Procinst newEntity = getEntity(param);
ToolUtil.copyProperties(newEntity, oldEntity);
this.updateById(newEntity);
}
@Override
public ProcinstResult findBySpec(ProcinstParam param) {
return null;
}
@Override
public List findListBySpec(ProcinstParam param) {
return null;
}
@Override
public LayuiPageInfo findPageBySpec(TaskParam param) {
HashMap paramMap = new HashMap<>();
paramMap.put("keywords", param.getKeywords());
paramMap.put("lastStart", param.getLastStart());
paramMap.put("lastEnd", param.getLastEnd());
Page pageContext = getPageContext();
List