|
@@ -0,0 +1,65 @@
|
|
|
+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.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.springframework.stereotype.Service;
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
+
|
|
|
+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
|
|
|
+ @Override
|
|
|
+ public void add(ProductionWorkmanshipVo productionWorkmanshipVo) {
|
|
|
+ save(productionWorkmanshipVo);
|
|
|
+ FileClientUtil.bindingFile(productionWorkmanshipVo.getId(), productionWorkmanshipVo.getFileInfoParam());
|
|
|
+ }
|
|
|
+
|
|
|
+ @Transactional
|
|
|
+ @Override
|
|
|
+ public void edit(ProductionWorkmanshipVo productionWorkmanshipVo) {
|
|
|
+ updateById(productionWorkmanshipVo);
|
|
|
+ FileClientUtil.againBindingFile(productionWorkmanshipVo.getId(), productionWorkmanshipVo.getFileInfoParam());
|
|
|
+ }
|
|
|
+
|
|
|
+ @Transactional
|
|
|
+ @Override
|
|
|
+ public void delete(ProductionWorkmanshipVo productionWorkmanshipVo) {
|
|
|
+ Long id = productionWorkmanshipVo.getId();
|
|
|
+ removeById(id);
|
|
|
+ FileClientUtil.relieveBindingFile(id);
|
|
|
+ }
|
|
|
+
|
|
|
+}
|