|
@@ -1,77 +0,0 @@
|
|
-package com.fjhx.production.service.impl;
|
|
|
|
-
|
|
|
|
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
|
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
|
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
-import com.fjhx.base.BaseEntity;
|
|
|
|
-import com.fjhx.entity.production.ProductionWorkmanship;
|
|
|
|
-import com.fjhx.params.production.ProductionWorkmanshipVo;
|
|
|
|
-import com.fjhx.production.mapper.ProductionWorkmanshipMapper;
|
|
|
|
-import com.fjhx.production.service.ProductionWorkmanshipService;
|
|
|
|
-import com.fjhx.utils.FileClientUtil;
|
|
|
|
-import com.fjhx.utils.WrapperUtil;
|
|
|
|
-import org.springblade.core.secure.utils.AuthUtil;
|
|
|
|
-import org.springframework.stereotype.Service;
|
|
|
|
-import org.springframework.transaction.annotation.Transactional;
|
|
|
|
-
|
|
|
|
-import java.util.List;
|
|
|
|
-import java.util.Map;
|
|
|
|
-
|
|
|
|
-/**
|
|
|
|
- * <p>
|
|
|
|
- * 生产工艺 服务实现类
|
|
|
|
- * </p>
|
|
|
|
- *
|
|
|
|
- * @author ${author}
|
|
|
|
- * @since 2022-07-13
|
|
|
|
- */
|
|
|
|
-@Service
|
|
|
|
-public class ProductionWorkmanshipServiceImpl extends ServiceImpl<ProductionWorkmanshipMapper, ProductionWorkmanship> implements ProductionWorkmanshipService {
|
|
|
|
-
|
|
|
|
- @Override
|
|
|
|
- public Page<ProductionWorkmanship> getPage(Map<String, String> condition) {
|
|
|
|
-
|
|
|
|
- QueryWrapper<ProductionWorkmanship> wrapper = Wrappers.query();
|
|
|
|
-
|
|
|
|
- WrapperUtil.init(condition, wrapper)
|
|
|
|
- .eqTenantId()
|
|
|
|
- .keyword("name", "name")
|
|
|
|
- .eq("whether_packing", "whetherPacking")
|
|
|
|
- .createTimeDesc();
|
|
|
|
-
|
|
|
|
- return page(condition, wrapper);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @Transactional(rollbackFor = Exception.class)
|
|
|
|
- @Override
|
|
|
|
- public void add(ProductionWorkmanshipVo productionWorkmanshipVo) {
|
|
|
|
- save(productionWorkmanshipVo);
|
|
|
|
- FileClientUtil.bindingFile(productionWorkmanshipVo.getId(), productionWorkmanshipVo.getFileInfoParam());
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @Transactional(rollbackFor = Exception.class)
|
|
|
|
- @Override
|
|
|
|
- public void edit(ProductionWorkmanshipVo productionWorkmanshipVo) {
|
|
|
|
- updateById(productionWorkmanshipVo);
|
|
|
|
- FileClientUtil.againBindingFile(productionWorkmanshipVo.getId(), productionWorkmanshipVo.getFileInfoParam());
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @Transactional(rollbackFor = Exception.class)
|
|
|
|
- @Override
|
|
|
|
- public void delete(ProductionWorkmanshipVo productionWorkmanshipVo) {
|
|
|
|
- Long id = productionWorkmanshipVo.getId();
|
|
|
|
- removeById(id);
|
|
|
|
- FileClientUtil.relieveBindingFile(id);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @Override
|
|
|
|
- public List<ProductionWorkmanship> getList() {
|
|
|
|
- return lambdaQuery()
|
|
|
|
- .select(BaseEntity::getId, ProductionWorkmanship::getName, ProductionWorkmanship::getWhetherPacking)
|
|
|
|
- .eq(BaseEntity::getTenantId, AuthUtil.getTenantId())
|
|
|
|
- .orderByDesc(BaseEntity::getId)
|
|
|
|
- .list();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-}
|
|
|