|
|
@@ -9,109 +9,111 @@ import java.util.Date;
|
|
|
import java.util.List;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
+
|
|
|
/**
|
|
|
-* 检测表-关节式分相
|
|
|
-* @author whh
|
|
|
-* @date 2021/10/19
|
|
|
-*/
|
|
|
+ * 检测表-关节式分相
|
|
|
+ *
|
|
|
+ * @author whh
|
|
|
+ * @date 2021/10/19
|
|
|
+ */
|
|
|
@Service
|
|
|
@Transactional(readOnly = true)
|
|
|
public class BusJcebGjsfxServiceImpl extends BusJcebServiceImpl<BusJcebGjsfx>
|
|
|
- implements IBusJcebGjsfxService{
|
|
|
+ implements IBusJcebGjsfxService {
|
|
|
|
|
|
- private final BusJcebGjsfxMapper busJcebGjsfxMapper;
|
|
|
+ private final BusJcebGjsfxMapper busJcebGjsfxMapper;
|
|
|
|
|
|
- public BusJcebGjsfxServiceImpl(BusJcebGjsfxMapper busJcebGjsfxMapper) {
|
|
|
- super(busJcebGjsfxMapper);
|
|
|
- this.busJcebGjsfxMapper = busJcebGjsfxMapper;
|
|
|
- }
|
|
|
+ public BusJcebGjsfxServiceImpl(BusJcebGjsfxMapper busJcebGjsfxMapper) {
|
|
|
+ super(busJcebGjsfxMapper);
|
|
|
+ this.busJcebGjsfxMapper = busJcebGjsfxMapper;
|
|
|
+ }
|
|
|
|
|
|
- /**
|
|
|
- * 新增
|
|
|
- */
|
|
|
- @Override
|
|
|
- @Transactional(rollbackFor = Exception.class)
|
|
|
- public int create(BusJcebGjsfx busJcebGjsfx) {
|
|
|
- busJcebGjsfx.setCreateTime(new Date());
|
|
|
- busJcebGjsfx.setCreateBy(SecurityUtils.getUsername());
|
|
|
- return busJcebGjsfxMapper.insert(busJcebGjsfx);
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * 新增
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
+ public int create(BusJcebGjsfx busJcebGjsfx) {
|
|
|
+ busJcebGjsfx.setCreateTime(new Date());
|
|
|
+ busJcebGjsfx.setCreateBy(SecurityUtils.getUsername());
|
|
|
+ return busJcebGjsfxMapper.insert(busJcebGjsfx);
|
|
|
+ }
|
|
|
|
|
|
- /**
|
|
|
- * 删除
|
|
|
- */
|
|
|
- @Override
|
|
|
- @Transactional(rollbackFor = Exception.class)
|
|
|
- public int delete(String[] ids) {
|
|
|
- int r =0;
|
|
|
- for (String id : ids) {
|
|
|
- int j= busJcebGjsfxMapper.delete(id);
|
|
|
- r = r + j;
|
|
|
- }
|
|
|
- return r;
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * 删除
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
+ public int delete(String[] ids) {
|
|
|
+ int r = 0;
|
|
|
+ for (String id : ids) {
|
|
|
+ int j = busJcebGjsfxMapper.delete(id);
|
|
|
+ r = r + j;
|
|
|
+ }
|
|
|
+ return r;
|
|
|
+ }
|
|
|
|
|
|
- /**
|
|
|
- * 更新
|
|
|
- */
|
|
|
- @Override
|
|
|
- @Transactional(rollbackFor = Exception.class)
|
|
|
- public int update(BusJcebGjsfx busJcebGjsfx) {
|
|
|
- busJcebGjsfx.setUpdateTime(new Date());
|
|
|
- busJcebGjsfx.setUpdateBy(SecurityUtils.getUsername());
|
|
|
- return busJcebGjsfxMapper.update(busJcebGjsfx);
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * 更新
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
+ public int update(BusJcebGjsfx busJcebGjsfx) {
|
|
|
+ busJcebGjsfx.setUpdateTime(new Date());
|
|
|
+ busJcebGjsfx.setUpdateBy(SecurityUtils.getUsername());
|
|
|
+ return busJcebGjsfxMapper.update(busJcebGjsfx);
|
|
|
+ }
|
|
|
|
|
|
- /**
|
|
|
- * 获取单个
|
|
|
- */
|
|
|
- @Override
|
|
|
- public BusJcebGjsfx getInfo(String id) {
|
|
|
- return busJcebGjsfxMapper.getInfo(id);
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * 获取单个
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public BusJcebGjsfx getInfo(String id) {
|
|
|
+ return busJcebGjsfxMapper.getInfo(id);
|
|
|
+ }
|
|
|
|
|
|
- /**
|
|
|
- * 查询列表
|
|
|
- */
|
|
|
- @Override
|
|
|
- public List<BusJcebGjsfx> getList(BusJcebGjsfx busJcebGjsfx) {
|
|
|
- return busJcebGjsfxMapper.getList(busJcebGjsfx);
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * 查询列表
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public List<BusJcebGjsfx> getList(BusJcebGjsfx busJcebGjsfx) {
|
|
|
+ return busJcebGjsfxMapper.getList(busJcebGjsfx);
|
|
|
+ }
|
|
|
|
|
|
- /**
|
|
|
- * 提交
|
|
|
- *
|
|
|
- * @return 提交结果
|
|
|
- */
|
|
|
- @Override
|
|
|
- public int submit(BusJcebGjsfx busJcebGjsfx) {
|
|
|
- setSubmit(busJcebGjsfx);
|
|
|
- if(StringUtils.isEmpty(busJcebGjsfx.getId())){
|
|
|
- return create(busJcebGjsfx);
|
|
|
- } else {
|
|
|
- return update(busJcebGjsfx);
|
|
|
- }
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * 提交
|
|
|
+ *
|
|
|
+ * @return 提交结果
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public int submit(BusJcebGjsfx busJcebGjsfx) {
|
|
|
+ setSubmit(busJcebGjsfx);
|
|
|
+ if (StringUtils.isEmpty(busJcebGjsfx.getId())) {
|
|
|
+ return create(busJcebGjsfx);
|
|
|
+ } else {
|
|
|
+ return update(busJcebGjsfx);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- /**
|
|
|
- * 退回
|
|
|
- *
|
|
|
- * @return 退回结果
|
|
|
- */
|
|
|
- @Override
|
|
|
- public int reject(BusJcebGjsfx busJcebGjsfx) {
|
|
|
- setReject(busJcebGjsfx);
|
|
|
- return update(busJcebGjsfx);
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * 退回
|
|
|
+ *
|
|
|
+ * @return 退回结果
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public int reject(BusJcebGjsfx busJcebGjsfx) {
|
|
|
+ setReject(busJcebGjsfx);
|
|
|
+ return update(busJcebGjsfx);
|
|
|
+ }
|
|
|
|
|
|
- /**
|
|
|
- * 确认
|
|
|
- *
|
|
|
- * @return 确认结果
|
|
|
- */
|
|
|
- @Override
|
|
|
- public int confirm(BusJcebGjsfx busJcebGjsfx) {
|
|
|
- setConfirm(busJcebGjsfx);
|
|
|
- return update(busJcebGjsfx);
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * 确认
|
|
|
+ *
|
|
|
+ * @return 确认结果
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public int confirm(BusJcebGjsfx busJcebGjsfx) {
|
|
|
+ setConfirm(busJcebGjsfx);
|
|
|
+ return update(busJcebGjsfx);
|
|
|
+ }
|
|
|
}
|