Commit 1943d6f0 by zhouhaibao

[+]sop流程画布service增加

1 parent e66c14be
package cn.com.glsx.process.modules.service;
import cn.com.glsx.process.modules.entity.SopInst;
import cn.com.glsx.process.modules.entity.SopInstBatch;
import cn.com.glsx.process.modules.mapper.SopInstBatchMapper;
import cn.com.glsx.process.modules.mapper.SopInstMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class SopInstBatchService {
@Autowired
private SopInstBatchMapper sopInstBatchMapper;
/**
* 根据id查询
*
* @param batchNo
* @return
*/
private SopInstBatch findById(String batchNo) {
return sopInstBatchMapper.selectByPrimaryKey(batchNo);
}
/**
* 保存
*
* @param sopInstBatch
* @return
*/
public int insert(SopInstBatch sopInstBatch) {
return sopInstBatchMapper.insertUseGeneratedKeys(sopInstBatch);
}
/**
* 更新
*
* @param sopInstBatch
* @return
*/
public boolean update(SopInstBatch sopInstBatch) {
int i = sopInstBatchMapper.updateByPrimaryKeySelective(sopInstBatch);
if (i > 0) {
return true;
}
return false;
}
/**
* 根据id删除
*
* @param batchNo
* @return
*/
public boolean delete(String batchNo) {
int i = sopInstBatchMapper.deleteByPrimaryKey(batchNo);
if (i > 0) {
return true;
}
return false;
}
}
package cn.com.glsx.process.modules.service;
import cn.com.glsx.process.modules.entity.SopInstLink;
import cn.com.glsx.process.modules.mapper.SopInstLinkMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class SopInstLinkService {
@Autowired
private SopInstLinkMapper sopInstMapper;
/**
* 根据id查询
*
* @param linkId
* @return
*/
private SopInstLink findById(Integer linkId) {
return sopInstMapper.selectByPrimaryKey(linkId);
}
/**
* 保存
*
* @param sopInstLink
* @return
*/
public int insert(SopInstLink sopInstLink) {
return sopInstMapper.insertUseGeneratedKeys(sopInstLink);
}
/**
* 更新
*
* @param sopInstLink
* @return
*/
public boolean update(SopInstLink sopInstLink) {
int i = sopInstMapper.updateByPrimaryKeySelective(sopInstLink);
if (i > 0) {
return true;
}
return false;
}
/**
* 根据id删除
*
* @param linkId
* @return
*/
public boolean delete(Integer linkId) {
int i = sopInstMapper.deleteByPrimaryKey(linkId);
if (i > 0) {
return true;
}
return false;
}
}
package cn.com.glsx.process.modules.service;
import cn.com.glsx.process.modules.entity.SopInstNode;
import cn.com.glsx.process.modules.entity.SopInstNodeBatch;
import cn.com.glsx.process.modules.mapper.SopInstNodeBatchMapper;
import cn.com.glsx.process.modules.mapper.SopInstNodeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class SopInstNodeBatchService {
@Autowired
private SopInstNodeBatchMapper sopInstNodeBatchMapper;
/**
* 根据id查询
*
* @param nodeBatchNo
* @return
*/
private SopInstNodeBatch findById(String nodeBatchNo) {
return sopInstNodeBatchMapper.selectByPrimaryKey(nodeBatchNo);
}
/**
* 保存
*
* @param sopInstNodeBatch
* @return
*/
public int insert(SopInstNodeBatch sopInstNodeBatch) {
return sopInstNodeBatchMapper.insertUseGeneratedKeys(sopInstNodeBatch);
}
/**
* 更新
*
* @param sopInstNodeBatch
* @return
*/
public boolean update(SopInstNodeBatch sopInstNodeBatch) {
int i = sopInstNodeBatchMapper.updateByPrimaryKeySelective(sopInstNodeBatch);
if (i > 0) {
return true;
}
return false;
}
/**
* 根据id删除
*
* @param nodeBatchNo
* @return
*/
public boolean delete(String nodeBatchNo) {
int i = sopInstNodeBatchMapper.deleteByPrimaryKey(nodeBatchNo);
if (i > 0) {
return true;
}
return false;
}
}
package cn.com.glsx.process.modules.service;
import cn.com.glsx.process.modules.entity.SopInstNode;
import cn.com.glsx.process.modules.mapper.SopInstNodeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class SopInstNodeService {
@Autowired
private SopInstNodeMapper sopInstNodeMapper;
/**
* 根据id查询
*
* @param instNodeId
* @return
*/
private SopInstNode findById(Integer instNodeId) {
return sopInstNodeMapper.selectByPrimaryKey(instNodeId);
}
/**
* 保存
*
* @param sopInstNode
* @return
*/
public int insert(SopInstNode sopInstNode) {
return sopInstNodeMapper.insertUseGeneratedKeys(sopInstNode);
}
/**
* 更新
*
* @param sopInstNode
* @return
*/
public boolean update(SopInstNode sopInstNode) {
int i = sopInstNodeMapper.updateByPrimaryKeySelective(sopInstNode);
if (i > 0) {
return true;
}
return false;
}
/**
* 根据id删除
*
* @param instNodeId
* @return
*/
public boolean delete(Integer instNodeId) {
int i = sopInstNodeMapper.deleteByPrimaryKey(instNodeId);
if (i > 0) {
return true;
}
return false;
}
}
package cn.com.glsx.process.modules.service;
import cn.com.glsx.process.modules.entity.SopInst;
import cn.com.glsx.process.modules.mapper.SopInstMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class SopInstService {
@Autowired
private SopInstMapper sopInstMapper;
/**
* 根据id查询
*
* @param instId
* @return
*/
private SopInst findById(Integer instId) {
return sopInstMapper.selectByPrimaryKey(instId);
}
/**
* 保存
*
* @param sopInst
* @return
*/
public int insert(SopInst sopInst) {
return sopInstMapper.insertUseGeneratedKeys(sopInst);
}
/**
* 更新
*
* @param sopInst
* @return
*/
public boolean update(SopInst sopInst) {
int i = sopInstMapper.updateByPrimaryKeySelective(sopInst);
if (i > 0) {
return true;
}
return false;
}
/**
* 根据id删除
*
* @param instId
* @return
*/
public boolean delete(Integer instId) {
int i = sopInstMapper.deleteByPrimaryKey(instId);
if (i > 0) {
return true;
}
return false;
}
}
......@@ -18,7 +18,7 @@ public class SopTplLinkService {
* @return
*/
private SopTplLink findById(Integer linkId) {
return this.sopTplLinkMapper.selectByPrimaryKey(linkId);
return sopTplLinkMapper.selectByPrimaryKey(linkId);
}
/**
......@@ -28,7 +28,7 @@ public class SopTplLinkService {
* @return
*/
public int insert(SopTplLink sopTplLink) {
return this.sopTplLinkMapper.insertUseGeneratedKeys(sopTplLink);
return sopTplLinkMapper.insertUseGeneratedKeys(sopTplLink);
}
/**
......@@ -38,7 +38,7 @@ public class SopTplLinkService {
* @return
*/
public boolean update(SopTplLink sopTplLink) {
int i = this.sopTplLinkMapper.updateByPrimaryKeySelective(sopTplLink);
int i = sopTplLinkMapper.updateByPrimaryKeySelective(sopTplLink);
if (i > 0) {
return true;
}
......@@ -52,7 +52,7 @@ public class SopTplLinkService {
* @return
*/
public boolean delete(Integer id) {
int i = this.sopTplLinkMapper.deleteByPrimaryKey(id);
int i = sopTplLinkMapper.deleteByPrimaryKey(id);
if (i > 0) {
return true;
}
......
package cn.com.glsx.process.modules.service;
import cn.com.glsx.process.modules.entity.SopTplLink;
import cn.com.glsx.process.modules.entity.SopTplNode;
import cn.com.glsx.process.modules.mapper.SopTplNodeMapper;
import org.springframework.beans.factory.annotation.Autowired;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!