|
@@ -0,0 +1,82 @@
|
|
|
|
+package com.yh.saas.plugin.yiliangyiyun.service.impl;
|
|
|
|
+
|
|
|
|
+import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
|
|
|
+import com.yh.saas.common.support.util.IdGenerator;
|
|
|
|
+import com.yh.saas.plugin.yiliangyiyun.constant.StatusEnum;
|
|
|
|
+import com.yh.saas.plugin.yiliangyiyun.entity.CargoOwnerInfo;
|
|
|
|
+import com.yh.saas.plugin.yiliangyiyun.entity.CommonUser;
|
|
|
|
+import com.yh.saas.plugin.yiliangyiyun.entity.PatformAnagementEgulations;
|
|
|
|
+import com.yh.saas.plugin.yiliangyiyun.entity.PublishTaskInfo;
|
|
|
|
+import com.yh.saas.plugin.yiliangyiyun.mapper.PatformAnagementEgulationsMapper;
|
|
|
|
+import com.yh.saas.plugin.yiliangyiyun.service.IPatformAnagementEgulationsService;
|
|
|
|
+import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
|
+
|
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
|
+import java.util.Date;
|
|
|
|
+import java.util.List;
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * <p>
|
|
|
|
+ * 记录平台管理规定 服务实现类
|
|
|
|
+ * </p>
|
|
|
|
+ *
|
|
|
|
+ * @author Gdc
|
|
|
|
+ * @since 2022-03-25
|
|
|
|
+ */
|
|
|
|
+@Service
|
|
|
|
+public class PatformAnagementEgulationsServiceImpl extends ServiceImpl<PatformAnagementEgulationsMapper, PatformAnagementEgulations> implements IPatformAnagementEgulationsService {
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 新增
|
|
|
|
+ * @param patformAnagementEgulations
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @Override
|
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
|
+ public String add(PatformAnagementEgulations patformAnagementEgulations) {
|
|
|
|
+ //新增主键id
|
|
|
|
+ patformAnagementEgulations.setId(IdGenerator.generateUUID());
|
|
|
|
+
|
|
|
|
+ // 操作主表数据
|
|
|
|
+ boolean one = this.insert(patformAnagementEgulations);
|
|
|
|
+ if (one) {
|
|
|
|
+ return "OK";
|
|
|
|
+ } else {
|
|
|
|
+ return "NG";
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 编辑
|
|
|
|
+ * @param patformAnagementEgulations
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @Override
|
|
|
|
+ public String edit(PatformAnagementEgulations patformAnagementEgulations) {
|
|
|
|
+ //查询发布任务
|
|
|
|
+ PatformAnagementEgulations patformAnagementEgulations1 = this.selectById(patformAnagementEgulations.getId());
|
|
|
|
+ //除审核中状态其余可编辑
|
|
|
|
+ if(patformAnagementEgulations1 != null) {
|
|
|
|
+ this.updateById(patformAnagementEgulations1);
|
|
|
|
+ }
|
|
|
|
+ return "OK";
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 查看
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @Override
|
|
|
|
+ public PatformAnagementEgulations show() {
|
|
|
|
+ //查询发布任务
|
|
|
|
+ PatformAnagementEgulations patformAnagementEgulations = this.selectOne(new EntityWrapper<PatformAnagementEgulations>().eq("delete_flag","0"));
|
|
|
|
+ //查询货主姓名
|
|
|
|
+ return patformAnagementEgulations;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+}
|