From b3e1d3cc68497198ac3cc98377c96cf2478b9022 Mon Sep 17 00:00:00 2001
From: jinlin <jinlin>
Date: 星期一, 04 三月 2024 08:43:24 +0800
Subject: [PATCH] 修改
---
web/src/views/modules/basicInfo/ProductModelTree.vue | 75 ++
zt/core/src/main/java/com/zt/modules/sys/model/SysDictData.java | 3
modules/mainPart/src/main/java/com/zt/life/modules/sysPictureBase/model/SysPictureBase.java | 51 +
modules/mainPart/src/main/java/com/zt/life/modules/sysPictureBase/controller/SysPictureBaseController.java | 106 +++
modules/mainPart/src/main/resources/mapper/basicInfo/TyProductModelDao.xml | 39 +
web/packages/i18n/zh-CN.js | 1
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/TyProductModelController.java | 142 ++++
web/packages/views/modules/sys/dict-data.vue | 4
web/packages/views/modules/sys/dict-data-add-or-update.vue | 4
web/packages/components/zt-table-wraper/src/zt-table-wraper.vue | 2
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/TyProductModelService.java | 60 ++
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/XhProductModelController.java | 140 ++++
web/src/views/modules/basicInfo/XhProductModel-AddOrUpdate.vue | 129 ++++
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/model/XhProductModel.java | 52 +
web/src/views/modules/basicInfo/TyProductModel-AddOrUpdate.vue | 136 ++++
web/src/views/modules/basicInfo/SelectPicture.vue | 57 +
web/src/views/modules/basicInfo/XhProductModel.vue | 118 +++
web/src/views/modules/sys/user-add-or-update.vue | 2
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/dao/TyProductModelDao.java | 25
web/src/App.vue | 2
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/dao/XhProductModelDao.java | 27
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/model/TyProductModel.java | 62 ++
/dev/null | 36 -
modules/mainPart/src/main/java/com/zt/life/modules/sysPictureBase/dao/SysPictureBaseDao.java | 24
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/XhProductModelService.java | 61 ++
web/src/views/modules/sysPictureBase/SysPictureBase.vue | 71 ++
modules/mainPart/src/main/resources/mapper/sysPictureBase/SysPictureBaseDao.xml | 25
web/src/views/modules/sysPictureBase/SysPictureBase-AddOrUpdate.vue | 81 ++
web/src/views/modules/basicInfo/TyProductModel.vue | 90 +++
web/src/views/modules/basicInfo/SelectTyModel.vue | 56 +
modules/mainPart/src/main/java/com/zt/life/modules/sysPictureBase/service/SysPictureBaseService.java | 54 +
modules/mainPart/src/main/resources/mapper/basicInfo/XhProductModelDao.xml | 44 +
32 files changed, 1,739 insertions(+), 40 deletions(-)
diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/TyProductModelController.java b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/TyProductModelController.java
new file mode 100644
index 0000000..3bf2c60
--- /dev/null
+++ b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/TyProductModelController.java
@@ -0,0 +1,142 @@
+package com.zt.life.modules.mainPart.basicInfo.controller;
+
+
+import com.zt.common.annotation.LogOperation;
+import com.zt.common.constant.Constant;
+import com.zt.common.annotation.QueryParam;
+import com.zt.common.db.query.QueryFilter;
+import com.zt.common.servlet.Result;
+import com.zt.common.servlet.PageResult;
+import com.zt.common.validator.AssertUtils;
+import com.zt.common.validator.ValidatorUtils;
+import com.zt.common.validator.group.AddGroup;
+import com.zt.common.validator.group.DefaultGroup;
+import com.zt.common.validator.group.UpdateGroup;
+import com.zt.life.modules.mainPart.basicInfo.model.TyProductModel;
+import com.zt.life.modules.mainPart.basicInfo.service.TyProductModelService;
+import com.zt.life.modules.sysPictureBase.service.SysPictureBaseService;
+import com.zt.modules.oss.service.SysOssService;
+import com.zt.modules.sys.model.SysMenu;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang.StringUtils;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import springfox.documentation.annotations.ApiIgnore;
+
+import java.util.List;
+import java.util.Objects;
+
+
+/**
+ * ty_product_model
+ *
+ * @author zt generator
+ * @since 1.0.0 2024-02-28
+ */
+@RestController
+@RequestMapping("/basicInfo/TyProductModel/")
+@Api(tags="ty_product_model")
+public class TyProductModelController {
+ @Autowired
+ private TyProductModelService tyProductModelService;
+
+ @Autowired
+ private SysOssService sysOssService;
+ @Autowired
+ private SysPictureBaseService sysPictureBaseService;
+
+
+ @GetMapping("page")
+ @ApiOperation("鍒嗛〉")
+ @ApiImplicitParams({
+ @ApiImplicitParam(name = Constant.Q.PAGE, value = Constant.QV.PAGE, required = true, dataType = Constant.QT.INT),
+ @ApiImplicitParam(name = Constant.Q.LIMIT, value = Constant.QV.LIMIT, required = true, dataType = Constant.QT.INT),
+ @ApiImplicitParam(name = Constant.Q.ORDER_FIELD, value = Constant.QV.ORDER_FIELD, dataType = Constant.QT.STRING),
+ @ApiImplicitParam(name = Constant.Q.ORDER, value = Constant.QV.ORDER, dataType = Constant.QT.STRING),
+ @ApiImplicitParam(name = "nodeType", value = "鑺傜偣绫诲瀷", dataType = Constant.QT.STRING),
+ @ApiImplicitParam(name = "reliabDistrib", value = "鍙潬鎬у垎甯�", dataType = Constant.QT.STRING, format = "reliab_distrib^EQ"),
+ @ApiImplicitParam(name = "repairDistrib", value = "缁翠慨鍒嗗竷", dataType = Constant.QT.STRING, format = "repair_distrib^EQ") })
+ public PageResult<TyProductModel> page(@ApiIgnore @QueryParam QueryFilter queryFilter){
+
+ return PageResult.ok(tyProductModelService.page(queryFilter));
+ }
+
+ @GetMapping("tree")
+ public Result<List<TyProductModel>> getTreeList() {
+ List<TyProductModel> list = tyProductModelService.getAllTree();
+
+ return Result.ok(list);
+ }
+
+ @GetMapping("{id}")
+ @ApiOperation("淇℃伅")
+ public Result<TyProductModel> get(@PathVariable("id") Long id){
+ TyProductModel data = tyProductModelService.get(id);
+ Long busid = null;
+ String fileName = "";
+ if (StringUtils.isNotBlank(data.getOperationalStatus())&&sysOssService.get(Long.parseLong(data.getOperationalStatus()))!=null){
+ busid =sysOssService.get(Long.parseLong(data.getOperationalStatus())).getBusiId();
+ fileName =sysPictureBaseService.get(busid).getName();
+ data.setOperationalStatus(fileName);
+ }
+ if (StringUtils.isNotBlank(data.getStandbyState())&&sysOssService.get(Long.parseLong(data.getStandbyState()))!=null){
+ busid =sysOssService.get(Long.parseLong(data.getStandbyState())).getBusiId();
+ fileName =sysPictureBaseService.get(busid).getName();
+ data.setStandbyState(fileName);
+ }
+ if (StringUtils.isNotBlank(data.getFaultState())&&sysOssService.get(Long.parseLong(data.getFaultState()))!=null){
+ busid =sysOssService.get(Long.parseLong(data.getFaultState())).getBusiId();
+ fileName =sysPictureBaseService.get(busid).getName();
+ data.setFaultState(fileName);
+ }
+ return Result.ok(data);
+ }
+
+ @GetMapping("getProductList")
+ public Result<List<TyProductModel>> getProductList() {
+ List<TyProductModel> list = tyProductModelService.getProductList();
+ return Result.ok(list);
+ }
+
+ @PostMapping
+ @ApiOperation("鏂板")
+ @LogOperation("鏂板")
+ public Result insert(@RequestBody TyProductModel tyProductModel){
+ //鏁堥獙鏁版嵁
+ ValidatorUtils.validateEntity(tyProductModel, AddGroup.class, DefaultGroup.class);
+ Integer no = tyProductModelService.getNo(tyProductModel.getPid());
+ tyProductModel.setSort(no + 1);
+ tyProductModelService.insert(tyProductModel);
+
+ return Result.ok();
+ }
+
+
+
+ @PutMapping
+ @ApiOperation("淇敼")
+ @LogOperation("淇敼")
+ public Result update(@RequestBody TyProductModel tyProductModel){
+ //鏁堥獙鏁版嵁
+ ValidatorUtils.validateEntity(tyProductModel, UpdateGroup.class, DefaultGroup.class);
+ tyProductModelService.update(tyProductModel);
+
+ return Result.ok();
+ }
+
+ @DeleteMapping
+ @ApiOperation("鍒犻櫎")
+ @LogOperation("鍒犻櫎")
+ public Result delete(@RequestBody Long[] ids){
+ //鏁堥獙鏁版嵁
+ AssertUtils.isArrayEmpty(ids, "id");
+ tyProductModelService.delete(ids);
+
+ return Result.ok();
+ }
+
+}
diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/XhProductModelController.java b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/XhProductModelController.java
new file mode 100644
index 0000000..8b4b488
--- /dev/null
+++ b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/XhProductModelController.java
@@ -0,0 +1,140 @@
+package com.zt.life.modules.mainPart.basicInfo.controller;
+
+
+import com.zt.common.annotation.LogOperation;
+import com.zt.common.constant.Constant;
+import com.zt.common.annotation.QueryParam;
+import com.zt.common.db.query.QueryFilter;
+import com.zt.common.servlet.Result;
+import com.zt.common.servlet.PageResult;
+import com.zt.common.validator.AssertUtils;
+import com.zt.common.validator.ValidatorUtils;
+import com.zt.common.validator.group.AddGroup;
+import com.zt.common.validator.group.DefaultGroup;
+import com.zt.common.validator.group.UpdateGroup;
+import com.zt.life.modules.mainPart.basicInfo.model.TyProductModel;
+import com.zt.life.modules.mainPart.basicInfo.model.XhProductModel;
+import com.zt.life.modules.mainPart.basicInfo.service.XhProductModelService;
+import com.zt.life.modules.sysPictureBase.service.SysPictureBaseService;
+import com.zt.modules.oss.service.SysOssService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import springfox.documentation.annotations.ApiIgnore;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+
+/**
+ * xh_product_model
+ *
+ * @author zt generator
+ * @since 1.0.0 2024-02-29
+ */
+@RestController
+@RequestMapping("/basicInfo/XhProductModel/")
+@Api(tags="xh_product_model")
+public class XhProductModelController {
+ @Autowired
+ private XhProductModelService xhProductModelService;
+
+
+ @Autowired
+ private SysOssService sysOssService;
+ @Autowired
+ private SysPictureBaseService sysPictureBaseService;
+
+ @GetMapping("page")
+ @ApiOperation("鍒嗛〉")
+ @ApiImplicitParams({
+ @ApiImplicitParam(name = Constant.Q.PAGE, value = Constant.QV.PAGE, required = true, dataType = Constant.QT.INT),
+ @ApiImplicitParam(name = Constant.Q.LIMIT, value = Constant.QV.LIMIT, required = true, dataType = Constant.QT.INT),
+ @ApiImplicitParam(name = Constant.Q.ORDER_FIELD, value = Constant.QV.ORDER_FIELD, dataType = Constant.QT.STRING),
+ @ApiImplicitParam(name = Constant.Q.ORDER, value = Constant.QV.ORDER, dataType = Constant.QT.STRING),
+ @ApiImplicitParam(name = "name", value = "鍚嶇О", dataType = Constant.QT.STRING, format = "NAME^LK"),
+ @ApiImplicitParam(name = "nodeType", value = "鑺傜偣绫诲瀷", dataType = Constant.QT.STRING, format = "node_type^EQ"),
+ @ApiImplicitParam(name = "id", value = "涓婄骇ID", dataType = Constant.QT.STRING)
+ })
+ public PageResult<XhProductModel> page(@ApiIgnore @QueryParam QueryFilter queryFilter){
+ return PageResult.ok(xhProductModelService.page(queryFilter));
+ }
+
+ @GetMapping("tree")
+ public Result<List<XhProductModel>> getTreeList() {
+ List<XhProductModel> list = xhProductModelService.getAllTree();
+
+ return Result.ok(list);
+ }
+
+ @GetMapping("{id}")
+ @ApiOperation("淇℃伅")
+ public Result<XhProductModel> get(@PathVariable("id") Long id){
+ XhProductModel data = xhProductModelService.get(id);
+ Long busid = null;
+ String fileName = "";
+ if (StringUtils.isNotBlank(data.getOperationalStatus())&&sysOssService.get(Long.parseLong(data.getOperationalStatus()))!=null){
+ busid =sysOssService.get(Long.parseLong(data.getOperationalStatus())).getBusiId();
+ fileName =sysPictureBaseService.get(busid).getName();
+ data.setOperationalStatus(fileName);
+ }
+ if (StringUtils.isNotBlank(data.getStandbyState())&&sysOssService.get(Long.parseLong(data.getStandbyState()))!=null){
+ busid =sysOssService.get(Long.parseLong(data.getStandbyState())).getBusiId();
+ fileName =sysPictureBaseService.get(busid).getName();
+ data.setStandbyState(fileName);
+ }
+ if (StringUtils.isNotBlank(data.getFaultState())&&sysOssService.get(Long.parseLong(data.getFaultState()))!=null){
+ busid =sysOssService.get(Long.parseLong(data.getFaultState())).getBusiId();
+ fileName =sysPictureBaseService.get(busid).getName();
+ data.setFaultState(fileName);
+ }
+ return Result.ok(data);
+ }
+
+ @GetMapping("getProductList")
+ public Result<List<XhProductModel>> getProductList() {
+ List<XhProductModel> list = xhProductModelService.getProductList();
+ return Result.ok(list);
+ }
+
+ @PostMapping
+ @ApiOperation("鏂板")
+ @LogOperation("鏂板")
+ public Result insert(@RequestBody XhProductModel xhProductModel){
+ //鏁堥獙鏁版嵁
+ ValidatorUtils.validateEntity(xhProductModel, AddGroup.class, DefaultGroup.class);
+ Integer no = xhProductModelService.getNo(xhProductModel.getPid());
+ xhProductModel.setSort(no + 1);
+
+ xhProductModelService.insert(xhProductModel);
+
+ return Result.ok();
+ }
+
+ @PutMapping
+ @ApiOperation("淇敼")
+ @LogOperation("淇敼")
+ public Result update(@RequestBody XhProductModel xhProductModel){
+ //鏁堥獙鏁版嵁
+ ValidatorUtils.validateEntity(xhProductModel, UpdateGroup.class, DefaultGroup.class);
+ xhProductModelService.update(xhProductModel);
+
+ return Result.ok();
+ }
+
+ @DeleteMapping
+ @ApiOperation("鍒犻櫎")
+ @LogOperation("鍒犻櫎")
+ public Result delete(@RequestBody Long[] ids){
+ //鏁堥獙鏁版嵁
+ AssertUtils.isArrayEmpty(ids, "id");
+ xhProductModelService.delete(ids);
+
+ return Result.ok();
+ }
+
+}
diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/dao/TyProductModelDao.java b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/dao/TyProductModelDao.java
new file mode 100644
index 0000000..de44506
--- /dev/null
+++ b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/dao/TyProductModelDao.java
@@ -0,0 +1,25 @@
+package com.zt.life.modules.mainPart.basicInfo.dao;
+
+import com.zt.common.dao.BaseDao;
+import com.zt.life.modules.mainPart.basicInfo.model.TyProductModel;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * ty_product_model
+ *
+ * @author zt generator
+ * @since 1.0.0 2024-02-28
+ */
+@Mapper
+public interface TyProductModelDao extends BaseDao<TyProductModel> {
+
+ List<TyProductModel> getList(Map<String, Object> params);
+
+ List<TyProductModel> getProductList();
+
+ Integer getNo(Long pid);
+}
diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/dao/XhProductModelDao.java b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/dao/XhProductModelDao.java
new file mode 100644
index 0000000..b8c107f
--- /dev/null
+++ b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/dao/XhProductModelDao.java
@@ -0,0 +1,27 @@
+package com.zt.life.modules.mainPart.basicInfo.dao;
+
+import com.zt.common.dao.BaseDao;
+import com.zt.life.modules.mainPart.basicInfo.model.XhProductModel;
+import org.apache.ibatis.annotations.Mapper;
+
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * xh_product_model
+ *
+ * @author zt generator
+ * @since 1.0.0 2024-02-29
+ */
+@Mapper
+public interface XhProductModelDao extends BaseDao<XhProductModel> {
+
+ List<XhProductModel> getList(Map<String, Object> params);
+
+
+ Integer getNo(Long pid);
+
+ List<XhProductModel> getProductList();
+}
diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/model/TyProductModel.java b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/model/TyProductModel.java
new file mode 100644
index 0000000..06114bd
--- /dev/null
+++ b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/model/TyProductModel.java
@@ -0,0 +1,62 @@
+package com.zt.life.modules.mainPart.basicInfo.model;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.zt.common.entity.BusiEntity;
+import com.zt.common.entity.TreeNode;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * ty_product_model
+ *
+ * @author zt generator
+ * @since 1.0.0 2024-02-28
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("ty_product_model")
+public class TyProductModel extends BusiEntity implements TreeNode<TyProductModel> {
+ private static final long serialVersionUID = 1L;
+
+ @ApiModelProperty(value = "涓婄骇ID")
+ private Long pid;
+
+ @ApiModelProperty(value = "鍚嶇О")
+ private String name;
+
+ @ApiModelProperty(value = "鑺傜偣绫诲瀷")
+ private String nodeType;
+
+ @ApiModelProperty(value = "鍩烘湰璁$畻")
+ private Integer baseCompute;
+
+ @ApiModelProperty(value = "浠诲姟璁$畻")
+ private Integer taskCompute;
+
+ @ApiModelProperty(value = "鍙潬鎬у垎甯�")
+ private Integer reliabDistrib;
+
+ @ApiModelProperty(value = "缁翠慨鍒嗗竷")
+ private Integer repairDistrib;
+
+ @ApiModelProperty(value = "杩愯鐘舵�佸浘鐗嘔D")
+ private String operationalStatus;
+
+ @ApiModelProperty(value = "寰呮満鐘舵�佸浘鐗嘔D")
+ private String standbyState;
+
+ @ApiModelProperty(value = "鏁呴殰鐘舵�佸浘鐗嘔D")
+ private String faultState;
+
+ @ApiModelProperty(value = "鎺掑簭")
+ private Integer sort;
+
+ @ApiModelProperty(value = "瀛愯妭鐐�")
+ @TableField(exist = false)
+ private List<TyProductModel> children = new ArrayList<>();
+}
diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/model/XhProductModel.java b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/model/XhProductModel.java
new file mode 100644
index 0000000..0faecf3
--- /dev/null
+++ b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/model/XhProductModel.java
@@ -0,0 +1,52 @@
+package com.zt.life.modules.mainPart.basicInfo.model;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.zt.common.entity.BusiEntity;
+import com.zt.common.entity.TreeNode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * xh_product_model
+ *
+ * @author zt generator
+ * @since 1.0.0 2024-02-29
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("xh_product_model")
+public class XhProductModel extends BusiEntity implements TreeNode<XhProductModel> {
+ private static final long serialVersionUID = 1L;
+
+ @ApiModelProperty(value = "涓婄骇ID")
+ private Long pid;
+
+ @ApiModelProperty(value = "鍚嶇О")
+ private String name;
+
+ @ApiModelProperty(value = "鑺傜偣绫诲瀷")
+ private String nodeType;
+
+ @ApiModelProperty(value = "杩愯鐘舵�佸浘鐗�")
+ private String operationalStatus;
+
+ @ApiModelProperty(value = "寰呮満鐘舵�佸浘鐗�")
+ private String standbyState;
+
+ @ApiModelProperty(value = "鏁呴殰鐘舵�佸浘鐗�")
+ private String faultState;
+
+ @ApiModelProperty(value = "鎺掑簭")
+ private Integer sort;
+
+ @ApiModelProperty(value = "瀛愯妭鐐�")
+ @TableField(exist = false)
+ private List<XhProductModel> children = new ArrayList<>();
+}
diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/TyProductModelService.java b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/TyProductModelService.java
new file mode 100644
index 0000000..a61252c
--- /dev/null
+++ b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/TyProductModelService.java
@@ -0,0 +1,60 @@
+package com.zt.life.modules.mainPart.basicInfo.service;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.zt.common.constant.Constant;
+import com.zt.common.service.BaseService;
+import com.zt.common.utils.TreeUtils;
+import com.zt.life.modules.mainPart.basicInfo.dao.TyProductModelDao;
+import com.zt.life.modules.mainPart.basicInfo.model.TyProductModel;
+import org.springframework.stereotype.Service;
+import com.zt.common.db.query.QueryFilter;
+
+import java.util.List;
+
+
+/**
+ * ty_product_model
+ *
+ * @author zt generator
+ * @since 1.0.0 2024-02-28
+ */
+@Service
+public class TyProductModelService extends BaseService<TyProductModelDao, TyProductModel> {
+
+ /**
+ * 鍒嗛〉鏌ヨ
+ *
+ * @param queryFilter
+ * @return
+ */
+ public List<TyProductModel> page(QueryFilter queryFilter) {
+ return baseDao.getList(queryFilter.getQueryParams());
+ }
+
+ /**
+ * 鍒犻櫎
+ *
+ * @param ids
+ */
+ public void delete(Long[] ids) {
+ super.deleteLogic(ids);
+ }
+
+ public List<TyProductModel> getProductList() {
+ List<TyProductModel> ProductList = baseDao.getProductList();
+ return ProductList;
+ }
+
+ public List<TyProductModel> getAllTree() {
+ List<TyProductModel> productList = baseDao.selectList(new QueryWrapper<TyProductModel>().eq(Constant.TableColumn.IS_DELETE,
+ Constant.Bool.NO).orderByAsc(Constant.TableColumn.SORT));
+ return TreeUtils.build(productList);
+ }
+
+ public Integer getNo(Long pid) {
+ if (baseDao.getNo(pid) == null){
+ return 0;
+ }
+ return baseDao.getNo(pid);
+ }
+}
diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/XhProductModelService.java b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/XhProductModelService.java
new file mode 100644
index 0000000..4f5143d
--- /dev/null
+++ b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/XhProductModelService.java
@@ -0,0 +1,61 @@
+package com.zt.life.modules.mainPart.basicInfo.service;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.zt.common.constant.Constant;
+import com.zt.common.service.BaseService;
+import com.zt.common.utils.TreeUtils;
+import com.zt.life.modules.mainPart.basicInfo.dao.XhProductModelDao;
+import com.zt.life.modules.mainPart.basicInfo.model.TyProductModel;
+import com.zt.life.modules.mainPart.basicInfo.model.XhProductModel;
+import com.zt.modules.sys.model.SysMenu;
+import org.springframework.stereotype.Service;
+import com.zt.common.db.query.QueryFilter;
+import javax.annotation.Resource;
+import java.util.List;
+
+
+/**
+ * xh_product_model
+ *
+ * @author zt generator
+ * @since 1.0.0 2024-02-29
+ */
+@Service
+public class XhProductModelService extends BaseService<XhProductModelDao, XhProductModel> {
+
+ /**
+ * 鍒嗛〉鏌ヨ
+ *
+ * @param queryFilter
+ * @return
+ */
+ public List<XhProductModel> page(QueryFilter queryFilter) {
+ return baseDao.getList(queryFilter.getQueryParams());
+ }
+
+ /**
+ * 鍒犻櫎
+ *
+ * @param ids
+ */
+ public void delete(Long[] ids) {
+ super.deleteLogic(ids);
+ }
+
+ public List<XhProductModel> getAllTree() {
+ List<XhProductModel> productList = baseDao.selectList(new QueryWrapper<XhProductModel>().eq(Constant.TableColumn.IS_DELETE,
+ Constant.Bool.NO) .gt("node_type", 1).orderByAsc(Constant.TableColumn.SORT));
+ return TreeUtils.build(productList);
+ }
+
+ public Integer getNo(Long pid) {
+ if (baseDao.getNo(pid) == null){
+ return 0;
+ }
+ return baseDao.getNo(pid);
+ }
+ public List<XhProductModel> getProductList() {
+ List<XhProductModel> ProductList = baseDao.getProductList();
+ return TreeUtils.build(ProductList);
+ }
+}
diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/sysPictureBase/controller/SysPictureBaseController.java b/modules/mainPart/src/main/java/com/zt/life/modules/sysPictureBase/controller/SysPictureBaseController.java
new file mode 100644
index 0000000..36701f5
--- /dev/null
+++ b/modules/mainPart/src/main/java/com/zt/life/modules/sysPictureBase/controller/SysPictureBaseController.java
@@ -0,0 +1,106 @@
+package com.zt.life.modules.sysPictureBase.controller;
+
+
+import com.zt.common.annotation.LogOperation;
+import com.zt.common.constant.Constant;
+import com.zt.common.annotation.QueryParam;
+import com.zt.common.db.query.QueryFilter;
+import com.zt.common.servlet.Result;
+import com.zt.common.servlet.PageResult;
+import com.zt.common.validator.AssertUtils;
+import com.zt.common.validator.ValidatorUtils;
+import com.zt.common.validator.group.AddGroup;
+import com.zt.common.validator.group.DefaultGroup;
+import com.zt.common.validator.group.UpdateGroup;
+import com.zt.life.modules.sysPictureBase.model.SysPictureBase;
+import com.zt.life.modules.sysPictureBase.service.SysPictureBaseService;
+import com.zt.life.sys.dto.OssDto;
+import com.zt.life.sys.service.SysOssConfigService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import springfox.documentation.annotations.ApiIgnore;
+
+
+/**
+ * sys_picture_base
+ *
+ * @author zt generator
+ * @since 1.0.0 2024-02-27
+ */
+@RestController
+@RequestMapping("/sysPictureBase/SysPictureBase/")
+@Api(tags = "sys_picture_base")
+public class SysPictureBaseController {
+ @Autowired
+ private SysPictureBaseService sysPictureBaseService;
+
+ @Autowired
+ private SysOssConfigService sysOssConfigService;
+
+ @GetMapping("page")
+ @ApiOperation("鍒嗛〉")
+ @ApiImplicitParams({
+ @ApiImplicitParam(name = Constant.Q.PAGE, value = Constant.QV.PAGE, required = true, dataType = Constant.QT.INT),
+ @ApiImplicitParam(name = Constant.Q.LIMIT, value = Constant.QV.LIMIT, required = true, dataType = Constant.QT.INT),
+ @ApiImplicitParam(name = Constant.Q.ORDER_FIELD, value = Constant.QV.ORDER_FIELD, dataType = Constant.QT.STRING),
+ @ApiImplicitParam(name = Constant.Q.ORDER, value = Constant.QV.ORDER, dataType = Constant.QT.STRING),
+ @ApiImplicitParam(name = "contentType", value = "妫�绱㈠叧閿瓧", dataType = Constant.QT.STRING, format = "CONTENT_TYPE^LK"), @ApiImplicitParam(name = "systemMark", value = "绯荤粺鏍囪瘑", dataType = Constant.QT.STRING, format = "SYSTEM_MARK^LK")})
+ public PageResult<SysPictureBase> page(@ApiIgnore @QueryParam QueryFilter queryFilter) {
+
+ return PageResult.ok(sysPictureBaseService.page(queryFilter));
+ }
+
+ @GetMapping("{id}")
+ @ApiOperation("淇℃伅")
+ public Result<SysPictureBase> get(@PathVariable("id") Long id) {
+ SysPictureBase data = sysPictureBaseService.get(id);
+ if (id != null) {
+ OssDto ossDto = sysOssConfigService.getOssByBusiType(id, "sys_picture");
+ if (ossDto != null) {
+ data.setFiles(ossDto);
+ }
+ }
+ return Result.ok(data);
+ }
+
+ @PostMapping
+ @ApiOperation("鏂板")
+ @LogOperation("鏂板")
+ public Result insert(@RequestBody SysPictureBase sysPictureBase) {
+ //鏁堥獙鏁版嵁
+ ValidatorUtils.validateEntity(sysPictureBase, AddGroup.class, DefaultGroup.class);
+ Integer no = sysPictureBaseService.getNo();
+ sysPictureBase.setSortNo(no + 1);
+ sysPictureBaseService.insert(sysPictureBase);
+ sysOssConfigService.updateOss(sysPictureBase.getId(), sysPictureBase.getFiles());// 淇濆瓨闄勪欢
+ return Result.ok();
+ }
+
+ @PutMapping
+ @ApiOperation("淇敼")
+ @LogOperation("淇敼")
+ public Result update(@RequestBody SysPictureBase sysPictureBase) {
+ //鏁堥獙鏁版嵁
+ ValidatorUtils.validateEntity(sysPictureBase, UpdateGroup.class, DefaultGroup.class);
+ sysPictureBaseService.update(sysPictureBase);
+ sysOssConfigService.updateOss(sysPictureBase.getId(), sysPictureBase.getFiles());// 淇濆瓨闄勪欢
+
+ return Result.ok();
+ }
+
+ @DeleteMapping
+ @ApiOperation("鍒犻櫎")
+ @LogOperation("鍒犻櫎")
+ public Result delete(@RequestBody Long[] ids) {
+ //鏁堥獙鏁版嵁
+ AssertUtils.isArrayEmpty(ids, "id");
+ sysPictureBaseService.delete(ids);
+
+ return Result.ok();
+ }
+
+}
diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/sysPictureBase/dao/SysPictureBaseDao.java b/modules/mainPart/src/main/java/com/zt/life/modules/sysPictureBase/dao/SysPictureBaseDao.java
new file mode 100644
index 0000000..6acefce
--- /dev/null
+++ b/modules/mainPart/src/main/java/com/zt/life/modules/sysPictureBase/dao/SysPictureBaseDao.java
@@ -0,0 +1,24 @@
+package com.zt.life.modules.sysPictureBase.dao;
+
+import com.zt.common.dao.BaseDao;
+import com.zt.life.modules.sysPictureBase.model.SysPictureBase;
+import org.apache.ibatis.annotations.Mapper;
+
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * sys_picture_base
+ *
+ * @author zt generator
+ * @since 1.0.0 2024-02-27
+ */
+@Mapper
+public interface SysPictureBaseDao extends BaseDao<SysPictureBase> {
+
+ List<SysPictureBase> getList(Map<String, Object> params);
+
+ Integer getNo();
+}
diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/sysPictureBase/model/SysPictureBase.java b/modules/mainPart/src/main/java/com/zt/life/modules/sysPictureBase/model/SysPictureBase.java
new file mode 100644
index 0000000..b546c03
--- /dev/null
+++ b/modules/mainPart/src/main/java/com/zt/life/modules/sysPictureBase/model/SysPictureBase.java
@@ -0,0 +1,51 @@
+package com.zt.life.modules.sysPictureBase.model;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.zt.common.entity.BusiEntity;
+import com.zt.life.sys.dto.OssDto;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+/**
+ * sys_picture_base
+ *
+ * @author zt generator
+ * @since 1.0.0 2024-02-27
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("sys_picture_base")
+public class SysPictureBase extends BusiEntity {
+ private static final long serialVersionUID = 1L;
+
+ @ApiModelProperty(value = "绫诲瀷")
+ private String type;
+
+ @ApiModelProperty(value = "瀛愮被鍨�")
+ private String subType;
+
+ @ApiModelProperty(value = "鍥剧墖鍚嶇О")
+ private String name;
+
+ @ApiModelProperty(value = "妫�绱㈠叧閿瓧")
+ private String contentType;
+
+ @ApiModelProperty(value = "绯荤粺鏍囪瘑")
+ private String systemMark;
+
+ @ApiModelProperty(value = "鎺掑簭")
+ private Integer sortNo;
+
+ @ApiModelProperty(value = "")
+ private String remark;
+
+ @TableField(exist = false)
+ @ApiModelProperty(value = "闄勪欢")
+ private OssDto files;
+
+}
diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/sysPictureBase/service/SysPictureBaseService.java b/modules/mainPart/src/main/java/com/zt/life/modules/sysPictureBase/service/SysPictureBaseService.java
new file mode 100644
index 0000000..aa249bb
--- /dev/null
+++ b/modules/mainPart/src/main/java/com/zt/life/modules/sysPictureBase/service/SysPictureBaseService.java
@@ -0,0 +1,54 @@
+package com.zt.life.modules.sysPictureBase.service;
+
+import com.zt.common.service.BaseService;
+import com.zt.life.modules.sysPictureBase.dao.SysPictureBaseDao;
+import com.zt.life.modules.sysPictureBase.model.SysPictureBase;
+import com.zt.modules.oss.service.SysOssService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.zt.common.db.query.QueryFilter;
+
+import java.util.List;
+
+
+/**
+ * sys_picture_base
+ *
+ * @author zt generator
+ * @since 1.0.0 2024-02-27
+ */
+@Service
+public class SysPictureBaseService extends BaseService<SysPictureBaseDao, SysPictureBase> {
+
+ @Autowired
+ private SysOssService sysOssService;
+ /**
+ * 鍒嗛〉鏌ヨ
+ *
+ * @param queryFilter
+ * @return
+ */
+ public List<SysPictureBase> page(QueryFilter queryFilter) {
+ List<SysPictureBase> list = baseDao.getList(queryFilter.getQueryParams());
+ if (list != null && list.size() > 0) {
+ sysOssService.setListOsses(list, "sys_picture");
+ }
+ return list;
+ }
+
+ /**
+ * 鍒犻櫎
+ *
+ * @param ids
+ */
+ public void delete(Long[] ids) {
+ super.deleteLogic(ids);
+ }
+
+ public Integer getNo() {
+ if (baseDao.getNo() == null){
+ return 0;
+ }
+ return baseDao.getNo();
+ }
+}
diff --git a/modules/mainPart/src/main/resources/mapper/basicInfo/TyProductModelDao.xml b/modules/mainPart/src/main/resources/mapper/basicInfo/TyProductModelDao.xml
new file mode 100644
index 0000000..c728ca0
--- /dev/null
+++ b/modules/mainPart/src/main/resources/mapper/basicInfo/TyProductModelDao.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.zt.life.modules.mainPart.basicInfo.dao.TyProductModelDao">
+
+ <select id="getList" resultType="com.zt.life.modules.mainPart.basicInfo.model.TyProductModel">
+ select a.*
+ from ty_product_model a
+ <where>
+ a.is_delete = 0
+ <if test="nodeType!=null and nodeType!=''">
+ and a.node_type = ${nodeType}
+ </if>
+ </where>
+ <if test="orderBySql!=null">
+ ORDER BY ${orderBySql}
+ </if>
+ </select>
+ <select id="getProductList" resultType="com.zt.life.modules.mainPart.basicInfo.model.TyProductModel">
+ select a.name,a.id
+ from ty_product_model a
+ where a.is_delete =0 and a.node_type != 1
+ </select>
+ <select id="getNo" resultType="java.lang.Integer">
+ SELECT COUNT(*)
+ FROM ty_product_model
+ <where>
+ is_delete = 0
+ <if test="pid!=null">
+ and pid = ${pid}
+ </if>
+ <if test="pid==null">
+ and pid is null
+ </if>
+ </where>
+ Group by node_type
+ </select>
+
+</mapper>
diff --git a/modules/mainPart/src/main/resources/mapper/basicInfo/XhProductModelDao.xml b/modules/mainPart/src/main/resources/mapper/basicInfo/XhProductModelDao.xml
new file mode 100644
index 0000000..19b8e44
--- /dev/null
+++ b/modules/mainPart/src/main/resources/mapper/basicInfo/XhProductModelDao.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.zt.life.modules.mainPart.basicInfo.dao.XhProductModelDao">
+
+ <select id="getList" resultType="com.zt.life.modules.mainPart.basicInfo.model.XhProductModel">
+ select a.*
+ from xh_product_model a
+ <where>
+ a.is_delete = 0
+ <if test="id!=null">
+ and pid =${id}
+ </if>
+ <if test="id==null">
+ and pid is null
+ </if>
+ <if test="whereSql!=null">
+ and ${whereSql}
+ </if>
+ </where>
+ <if test="orderBySql!=null">
+ ORDER BY ${orderBySql}
+ </if>
+ </select>
+ <select id="getNo" resultType="java.lang.Integer">
+ SELECT COUNT(*)
+ FROM xh_product_model
+ <where>
+ is_delete = 0
+ <if test="pid!=null">
+ and pid = ${pid}
+ </if>
+ <if test="pid==null">
+ and pid is null
+ </if>
+ </where>
+ Group by node_type
+ </select>
+ <select id="getProductList" resultType="com.zt.life.modules.mainPart.basicInfo.model.XhProductModel">
+ select a.name,a.id
+ from xh_product_model a
+ where a.is_delete =0 and a.node_type = 5
+ </select>
+</mapper>
diff --git a/modules/mainPart/src/main/resources/mapper/sysPictureBase/SysPictureBaseDao.xml b/modules/mainPart/src/main/resources/mapper/sysPictureBase/SysPictureBaseDao.xml
new file mode 100644
index 0000000..1c0969c
--- /dev/null
+++ b/modules/mainPart/src/main/resources/mapper/sysPictureBase/SysPictureBaseDao.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.zt.life.modules.sysPictureBase.dao.SysPictureBaseDao">
+
+ <select id="getList" resultType="com.zt.life.modules.sysPictureBase.model.SysPictureBase">
+ select a.*
+ from sys_picture_base a
+ <where>
+ a.is_delete = 0
+ <if test="whereSql!=null">
+ and ${whereSql}
+ </if>
+ </where>
+ <if test="orderBySql!=null">
+ ORDER BY ${orderBySql}
+ </if>
+ </select>
+ <select id="getNo" resultType="java.lang.Integer">
+ SELECT COUNT(*)
+ FROM sys_picture_base
+ WHERE is_delete = 0;
+ </select>
+
+</mapper>
diff --git a/web/packages/components/zt-table-wraper/src/zt-table-wraper.vue b/web/packages/components/zt-table-wraper/src/zt-table-wraper.vue
index 28a7964..1420e67 100644
--- a/web/packages/components/zt-table-wraper/src/zt-table-wraper.vue
+++ b/web/packages/components/zt-table-wraper/src/zt-table-wraper.vue
@@ -220,7 +220,7 @@
this.editLimit = ''
this.editPage = ''
}
- console.log(this.dataList,'this.dataList')
+
this.$emit('dataLoaded', this.dataList)
this.$emit('fatherMethod')
}
diff --git a/web/packages/i18n/zh-CN.js b/web/packages/i18n/zh-CN.js
index 8b9ed6a..1b20cd9 100644
--- a/web/packages/i18n/zh-CN.js
+++ b/web/packages/i18n/zh-CN.js
@@ -224,6 +224,7 @@
t.dict.dictName = '瀛楀吀鍚嶇О'
t.dict.dictType = '瀛楀吀绫诲瀷'
t.dict.dictLabel = '瀛楀吀鏍囩'
+t.dict.dictCode = '瀛楀吀缂栫爜'
t.dict.dictValue = '瀛楀吀鍊�'
t.dict.canView = '绉熸埛鍙'
t.dict.canOverload = '鍏佽閲嶈浇'
diff --git a/web/packages/views/modules/sys/dict-data-add-or-update.vue b/web/packages/views/modules/sys/dict-data-add-or-update.vue
index 8f027d8..3447465 100644
--- a/web/packages/views/modules/sys/dict-data-add-or-update.vue
+++ b/web/packages/views/modules/sys/dict-data-add-or-update.vue
@@ -7,6 +7,9 @@
<zt-form-item prop="dictLabel" :label="$t('dict.dictLabel')" rules="required">
<el-input v-model="dataForm.dictLabel" :placeholder="$t('dict.dictLabel')"></el-input>
</zt-form-item>
+ <zt-form-item prop="dictCode" :label="$t('dict.dictCode')" rules="required">
+ <el-input v-model="dataForm.dictCode" :placeholder="$t('dict.dictCode')"></el-input>
+ </zt-form-item>
<zt-form-item prop="dictValue" label="瀛楀吀鍊�" rules="required">
<el-input v-model="dataForm.dictValue" placeholder="瀛楀吀鍊�"></el-input>
</zt-form-item>
@@ -41,6 +44,7 @@
dictLabel: '',
dictValue: '',
sort: 0,
+ dictCode:'',
remark: ''
}
}
diff --git a/web/packages/views/modules/sys/dict-data.vue b/web/packages/views/modules/sys/dict-data.vue
index c9706ae..96b8086 100644
--- a/web/packages/views/modules/sys/dict-data.vue
+++ b/web/packages/views/modules/sys/dict-data.vue
@@ -19,6 +19,7 @@
<el-table-column :label="$t('dict.dictLabel')" prop="dictLabel"/>
<el-table-column :label="$t('dict.sort')" align="center" prop="sort" width="60"/>
<el-table-column :label="$t('dict.remark')" prop="remark"/>
+ <el-table-column :label="$t('dict.dictCode')" prop="dictCode"/>
<zt-table-column-handle :has-delete="isCanDelete" :has-edit="isCanUpdate" :table="table"
delete-perm="sys:dict:delete" edit-perm="sys:dict:update"/>
</el-table>
@@ -40,7 +41,8 @@
dictTypeId: '',
dictTypeName: '',
dictLabel: '',
- dictValue: ''
+ dictValue: '',
+ dictCode:''
}
}
},
diff --git a/web/src/App.vue b/web/src/App.vue
index c8ceda9..a38f7e2 100644
--- a/web/src/App.vue
+++ b/web/src/App.vue
@@ -25,7 +25,7 @@
document.querySelector('html').setAttribute('lang', val)
// 鍙互鍦ㄨ繖閲屼慨鏀瑰浗闄呭寲鏄剧ず鍚嶇О
- messages[val].brand.lg = '杞欢娴嬭瘯椤圭洰绠$悊宸ュ叿'
+ messages[val].brand.lg = '鍙潬鎬т豢鐪熷缓妯�'
messages[val].company.name = '鍗曚綅鍚嶇О'
messages[val].company.code = '鍗曚綅浠g爜'
messages[val].company.shortName = '鍗曚綅绠�绉�'
diff --git a/web/src/views/modules/basicInfo/ProductModelTree.vue b/web/src/views/modules/basicInfo/ProductModelTree.vue
new file mode 100644
index 0000000..a2ec468
--- /dev/null
+++ b/web/src/views/modules/basicInfo/ProductModelTree.vue
@@ -0,0 +1,75 @@
+<template>
+ <div class="product-tree-container " :style="'height:' + tree_Hei +'px'">
+ <el-input
+ placeholder="杈撳叆鍚嶇О杩涜杩囨护"
+ style="width: 80%"
+ v-model="filterText"
+ size="small"
+ clearable
+ ></el-input>
+ <el-button type="primary" @click="add()" style="margin-top: 10px">鏂板</el-button>
+ <el-divider></el-divider>
+ <el-tree
+ style="height: 90%;overflow: auto"
+ class="filter-tree"
+ :data="productList"
+ :props="defaultProps"
+ default-expand-all
+ :expand-on-click-node="false"
+ :highlight-current="true"
+ @node-click="handleNodeClick"
+ :filter-node-method="filterNode"
+ ref="tree"
+ ></el-tree>
+ <!-- 寮圭獥, 鏂板 / 淇敼 -->
+ <add-or-update @refreshDataList="getProductList()" ref="AddOrUpdate"/>
+ </div>
+</template>
+<script>
+ import AddOrUpdate from './XhProductModel-AddOrUpdate'
+
+ export default {
+ name: 'ProductModelTree',
+ props: {},
+
+ data() {
+ return {
+ filterText: '',
+ productList: [],
+ tree_Hei: document.documentElement.clientHeight - 200,
+ defaultProps: {
+ children: 'children',
+ label: 'name'
+ }
+ }
+ },
+ watch: {
+ filterText(val) {
+ this.$refs.tree.filter(val)
+ }
+ },
+ components: {
+ AddOrUpdate
+ },
+ mounted() {
+ this.getProductList()
+ },
+ methods: {
+ // 鑾峰彇绯荤粺鍒楄〃
+ async getProductList() {
+ let res = await this.$http.get('/basicInfo/XhProductModel/tree')
+ this.productList = res.data
+ },
+ add() {
+ this.$refs.AddOrUpdate.$refs.dialog.init(null,{id: null, type: 'tree'})
+ },
+ filterNode(value, data) {
+ if (!value) return true
+ return data.name.indexOf(value) !== -1
+ },
+ handleNodeClick(data) {
+ this.$emit('on-selected', data)
+ }
+ }
+ }
+</script>
diff --git a/web/src/views/modules/basicInfo/SelectPicture.vue b/web/src/views/modules/basicInfo/SelectPicture.vue
new file mode 100644
index 0000000..c608b6b
--- /dev/null
+++ b/web/src/views/modules/basicInfo/SelectPicture.vue
@@ -0,0 +1,57 @@
+<template>
+ <zt-dialog ref="dialog" column="2" title="閫夋嫨鍥剧墖" append-to-body :editAble="false" :hasConfirm="false">
+ <el-card shadow="never" class="aui-card--fill">
+ <div class="mod-sysPictureBase-sysPictureBase}">
+ <zt-table-wraper query-url="/sysPictureBase/SysPictureBase/page"
+ v-slot="{ table }">
+ <el-table v-loading="table.dataLoading" :data="table.dataList" height="100px" v-adaptive="{bottomOffset:70}"
+ border
+ @row-dblclick="selectedPicture"
+ @selection-change="table.selectionChangeHandle">
+ <el-table-column prop="name" label="鍥剧墖鍚嶇О"/>
+ <el-table-column label="鍥剧墖" align="center">
+ <template v-slot="{ row }">
+ <el-image v-if="row.accessoryMap" :src="getPath(row)" style="height: 50px;width: 50px"></el-image>
+ </template>
+ </el-table-column>
+ </el-table>
+ </zt-table-wraper>
+ </div>
+ </el-card>
+ </zt-dialog>
+</template>
+
+<script>
+
+ export default {
+ data() {
+ return {
+ name: 'SelectPicture',
+ type: '',
+ dataForm: {
+ contentType: '',
+ systemMark: '',
+ sortNo: ''
+ },
+ }
+ },
+ components: {},
+ methods: {
+ init(type) {
+ this.type = type
+ },
+ getPath(row) {
+ if (row.accessoryMap) {
+ for (let key in row.accessoryMap) {
+ return key
+ }
+ }
+ },
+ async selectedPicture(row) {
+ await this.$tip.success()
+ this.$refs.dialog.close()
+ this.$emit('setPicture', row, this.type)
+ }
+ }
+ }
+</script>
diff --git a/web/src/views/modules/basicInfo/SelectTyModel.vue b/web/src/views/modules/basicInfo/SelectTyModel.vue
new file mode 100644
index 0000000..fba603c
--- /dev/null
+++ b/web/src/views/modules/basicInfo/SelectTyModel.vue
@@ -0,0 +1,56 @@
+<template>
+ <zt-dialog ref="dialog" column="2" title="閫夋嫨閫氱敤妯″瀷" append-to-body :editAble="false" :hasConfirm="true"
+ @confirm="formSubmit">
+ <el-card shadow="never" class="aui-card--fill">
+ <div class="mod-tyProductModel-tyProductModel}">
+ <zt-table-wraper query-url="/basicInfo/TyProductModel/page"
+ v-slot="{ table }">
+ <el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()">
+ </el-form>
+ <el-table v-loading="table.dataLoading" :data="table.dataList" height="100px" v-adaptive="{bottomOffset:70}"
+ border
+ @selection-change="table.selectionChangeHandle"
+ @selected="onSelected">
+ <el-table-column type="selection" width="40" align="center"/>
+ <el-table-column prop="name" label="鍚嶇О"/>
+ </el-table>
+ </zt-table-wraper>
+ </div>
+ </el-card>
+ </zt-dialog>
+</template>
+
+<script>
+ export default {
+ name: 'SelectTyModel',
+ data() {
+ return {
+ dataForm: {
+ type:'noTree',
+ nodeType: '',
+ pid: '',
+ name: '',
+ operationalStatus: '',
+ standbyState: '',
+ faultState: '',
+ }
+ }
+ },
+ components: {},
+ methods: {
+ init(type) {
+ this.dataForm.nodeType = type
+ console.log(this.dataForm.nodeType, 'init()')
+ },
+ async onSelected() {
+ let res = await this.$http[!this.dataForm.id ? 'post' : 'put']('/basicInfo/XhProductModel/', this.dataForm)
+ if (res.success) {
+ await this.$tip.success()
+ this.$refs.dialog.close()
+ this.$emit('refreshDataList')
+ this.map.clear()
+ }
+ }
+ }
+ }
+</script>
diff --git a/web/src/views/modules/basicInfo/TyProductModel-AddOrUpdate.vue b/web/src/views/modules/basicInfo/TyProductModel-AddOrUpdate.vue
new file mode 100644
index 0000000..8904e43
--- /dev/null
+++ b/web/src/views/modules/basicInfo/TyProductModel-AddOrUpdate.vue
@@ -0,0 +1,136 @@
+<template>
+ <zt-dialog ref="dialog" @confirm="formSubmit" append-to-body>
+ <el-form :model="dataForm" ref="dataForm" :disabled="dataForm.disabled" label-width="120px">
+ <zt-form-item label="涓婄骇绯荤粺" prop="pid" >
+ <zt-select v-model="dataForm.pid" placeholder=" " :datas="productList"/>
+ </zt-form-item>
+ <zt-form-item label="鍚嶇О" prop="name" rules="required">
+ <el-input v-model="dataForm.name"></el-input>
+ </zt-form-item>
+ <zt-form-item label="鑺傜偣绫诲瀷" prop="nodeType" rules="required">
+ <zt-dict v-model="dataForm.nodeType" dict="product"></zt-dict>
+ </zt-form-item>
+ <zt-form-item label="鍩烘湰璁$畻" prop="baseCompute">
+ <zt-dict v-model="dataForm.baseCompute" dict="is_or_not" placeholder="鍩烘湰璁$畻"></zt-dict>
+ </zt-form-item>
+ <zt-form-item label="浠诲姟璁$畻" prop="taskCompute">
+ <zt-dict v-model="dataForm.taskCompute" dict="is_or_not" placeholder="浠诲姟璁$畻"></zt-dict>
+ </zt-form-item>
+ <zt-form-item label="鍙潬鎬у垎甯�" prop="reliabDistrib">
+ <zt-dict v-model="dataForm.reliabDistrib" dict="ReliabDistribType" placeholder="璇烽�夋嫨鍙潬鎬у垎甯冪被鍨�"></zt-dict>
+ </zt-form-item>
+ <zt-form-item label="缁翠慨鍒嗗竷" prop="repairDistrib">
+ <zt-dict v-model="dataForm.repairDistrib" dict="RepairDistribType" placeholder="璇烽�夋嫨缁翠慨鍒嗗竷绫诲瀷"></zt-dict>
+ </zt-form-item>
+ <zt-form-item label="杩愯鐘舵�佸浘" prop="operationalStatus">
+ <el-input v-model="dataForm.operationalStatus" @focus="selectPicture('operational')" :readonly="readonly"></el-input>
+ </zt-form-item>
+ <zt-form-item label="寰呮満鐘舵�佸浘" prop="standbyState">
+ <el-input v-model="dataForm.standbyState" @focus="selectPicture('standby')" :readonly="readonly"></el-input>
+ </zt-form-item>
+ <zt-form-item label="鏁呴殰鐘舵�佸浘" prop="faultState">
+ <el-input v-model="dataForm.faultState" @focus="selectPicture('fault')" :readonly="readonly"></el-input>
+ </zt-form-item>
+ <zt-form-item label="鎺掑簭" prop="sort">
+ <el-input v-model="dataForm.sort" :readonly="readonly"></el-input>
+ </zt-form-item>
+ </el-form>
+ <PictureSelect ref="pictureSelect" @setPicture="openAddWin">
+ </PictureSelect>
+ </zt-dialog>
+</template>
+
+<script>
+ import PictureSelect from "@/views/modules/basicInfo/SelectPicture";
+
+ export default {
+ data() {
+ return {
+ map: new Map(),
+ fileId:'',
+ productList:[],
+ dataForm: {
+ id: '',
+ pid: '',
+ name: '',
+ nodeType: '',
+ baseCompute: '',
+ taskCompute: '',
+ reliabDistrib: '',
+ repairDistrib: '',
+ operationalStatus:'',
+ standbyState:'',
+ faultState:'',
+ sort: '',
+ }
+ }
+ },
+ components:{
+ PictureSelect
+ },
+ methods: {
+ init() {
+ this.getProductList()
+ },
+ // 鑾峰彇绯荤粺鍒楄〃
+ async getProductList() {
+ let res = await this.$http.get('/basicInfo/TyProductModel/getProductList')
+ this.productList = res.data
+ console.log(this.productList,'getProductList')
+ },
+ selectPicture(type){
+ this.$refs.pictureSelect.$refs.dialog.init(type)
+ },
+ openAddWin(row,type){
+ console.log(type,'openAddWin(row)')
+ if (type==='operational'){
+ this.dataForm.operationalStatus = row.name
+ for (let key in row.accessoryMap) {
+ let id = /_zt_oss_id=(\d+)/.exec(key)
+ this.fileId = id ? id[1] : ''
+ }
+ this.map.set(this.dataForm.operationalStatus,this.fileId);
+ console.log(this.map,'openAddWin(row)')
+ }else if(type==='standby'){
+ this.dataForm.standbyState = row.name
+ for (let key in row.accessoryMap) {
+ let id = /_zt_oss_id=(\d+)/.exec(key)
+ this.fileId = id ? id[1] : ''
+ }
+ this.map.set(this.dataForm.standbyState,this.fileId);
+ console.log(this.map,'openAddWin(row)')
+ }else if(type==='fault'){
+ this.dataForm.faultState = row.name
+ for (let key in row.accessoryMap) {
+ let id = /_zt_oss_id=(\d+)/.exec(key)
+ this.fileId = id ? id[1] : ''
+ }
+ this.map.set(this.dataForm.faultState,this.fileId);
+ console.log(this.map,'openAddWin(row)')
+ }
+ },
+ // 鑾峰彇淇℃伅
+ async getInfo() {
+ let res = await this.$http.get(`/basicInfo/TyProductModel/${this.dataForm.id}`)
+ this.dataForm = {
+ ...this.dataForm,
+ ...res.data
+ }
+ console.log(this.map,'getInfo')
+ },
+ // 琛ㄥ崟鎻愪氦
+ async formSubmit() {
+ this.dataForm.operationalStatus = this.map.get(this.dataForm.operationalStatus)
+ this.dataForm.standbyState = this.map.get(this.dataForm.standbyState)
+ this.dataForm.faultState = this.map.get(this.dataForm.faultState)
+ let res = await this.$http[!this.dataForm.id ? 'post' : 'put']('/basicInfo/TyProductModel/', this.dataForm)
+ if (res.success) {
+ await this.$tip.success()
+ this.$refs.dialog.close()
+ this.$emit('refreshDataList')
+ this.map.clear()
+ }
+ }
+ }
+ }
+</script>
diff --git a/web/src/views/modules/basicInfo/TyProductModel.vue b/web/src/views/modules/basicInfo/TyProductModel.vue
new file mode 100644
index 0000000..c362169
--- /dev/null
+++ b/web/src/views/modules/basicInfo/TyProductModel.vue
@@ -0,0 +1,90 @@
+<template>
+
+ <el-card shadow="never" class="aui-card--fill">
+ <div class="mod-tyProductModel-tyProductModel}">
+ <zt-table-wraper query-url="/basicInfo/TyProductModel/tree" delete-url="/basicInfo/TyProductModel/" v-bind:paging='false'
+ v-slot="{ table }">
+ <el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()">
+ <el-form-item>
+ <zt-dict v-model="dataForm.nodeType" dict="product" placeholder="璇烽�夋嫨鑺傜偣绫诲瀷" clearable></zt-dict>
+ </el-form-item>
+ <el-form-item>
+ <zt-dict v-model="dataForm.reliabDistrib" dict="ReliabDistribType" placeholder="璇烽�夋嫨鍙潬鎬у垎甯冪被鍨�" clearable></zt-dict>
+ </el-form-item>
+ <el-form-item>
+ <zt-dict v-model="dataForm.repairDistrib" dict="RepairDistribType" placeholder="璇烽�夋嫨缁翠慨鍒嗗竷绫诲瀷" clearable></zt-dict>
+ </el-form-item>
+ <el-form-item>
+ <zt-button type="query" @click="table.query()"/>
+ <zt-button type="add" @click="table.editHandle()"/>
+ <zt-button type="delete" @click="table.deleteHandle()"/>
+ </el-form-item>
+ </el-form>
+ <el-table v-loading="table.dataLoading" :data="table.dataList" height="100px" v-adaptive="{bottomOffset:70}"
+ border row-key="id"
+ @selection-change="table.selectionChangeHandle"
+ :cell-style="cellStyle"
+ :tree-props="{children: 'children', hasChildren: 'hasChildren'}">
+ <el-table-column prop="name" label="鍚嶇О"/>
+ <zt-table-column-dict prop="nodeType" label="鑺傜偣绫诲瀷" dict="product"/>
+ <zt-table-column-dict prop="baseCompute" label="鍩烘湰璁$畻" dict="is_or_not"/>
+ <zt-table-column-dict prop="taskCompute" label="浠诲姟璁$畻" dict="is_or_not"/>
+ <zt-table-column-dict prop="reliabDistrib" label="鍙潬鎬у垎甯�" dict="ReliabDistribType"/>
+ <zt-table-column-dict prop="repairDistrib" label="缁翠慨鍒嗗竷" dict="RepairDistribType"/>
+ <el-table-column prop="operationalStatus" label="杩愯鐘舵�佸浘" align="center">
+ <template v-slot="{ row }">
+ <el-image v-if="row.operationalStatus" :src="getPath(row.operationalStatus)" style="height: 50px;width: 50px"></el-image>
+ </template >
+ </el-table-column>
+ <el-table-column prop="standbyState" label="寰呮満鐘舵�佸浘" align="center">
+ <template v-slot="{ row }">
+ <el-image v-if="row.standbyState" :src="getPath(row.standbyState)" style="height: 50px;width: 50px"></el-image>
+ </template >
+ </el-table-column>
+ <el-table-column prop="faultState" label="鏁呴殰鐘舵�佸浘" align="center">
+ <template v-slot="{ row }">
+ <el-image v-if="row.faultState" :src="getPath(row.faultState)" style="height: 50px;width: 50px"></el-image>
+ </template >
+ </el-table-column>
+ <el-table-column prop="sort" label="鎺掑簭"/>
+ <zt-table-column-handle :table="table"/>
+ </el-table>
+ <!-- 寮圭獥, 鏂板 / 淇敼 -->
+ <add-or-update @refreshDataList="table.query"/>
+ </zt-table-wraper>
+ </div>
+ </el-card>
+</template>
+
+<script>
+ import AddOrUpdate from './TyProductModel-AddOrUpdate'
+
+ export default {
+ data() {
+ return {
+ dataForm: {
+ operationalStatus:'',
+ standbyState:'',
+ faultState:'',
+ nodeType: '',
+ reliabDistrib: '',
+ repairDistrib: '',
+ }
+ }
+ },
+ components: {
+ AddOrUpdate
+ },
+ methods:{
+ cellStyle({column}) {
+ if (column.label === '鍚嶇О') {
+ return 'text-align: left !important;'
+ }
+ },
+ getPath(id){
+ console.log(id,'path')
+ return `${window.SITE_CONFIG['apiURL']}/sys/oss/content2?fileId=${id}`
+ }
+ }
+ }
+</script>
diff --git a/web/src/views/modules/basicInfo/XhProductModel-AddOrUpdate.vue b/web/src/views/modules/basicInfo/XhProductModel-AddOrUpdate.vue
new file mode 100644
index 0000000..f6357b2
--- /dev/null
+++ b/web/src/views/modules/basicInfo/XhProductModel-AddOrUpdate.vue
@@ -0,0 +1,129 @@
+<template>
+ <zt-dialog ref="dialog" @confirm="formSubmit">
+ <el-form :model="dataForm" ref="dataForm" :disabled="dataForm.disabled" label-width="120px">
+ <zt-form-item label="涓婄骇绯荤粺" prop="pid" v-if="isTree">
+ <zt-combo-tree v-model="dataForm.pid" :datas="productList"/>
+ </zt-form-item>
+ <zt-form-item label="鍚嶇О" prop="name" rules="required">
+ <el-input v-model="dataForm.name"></el-input>
+ </zt-form-item>
+ <zt-form-item label="鑺傜偣绫诲瀷" prop="nodeType" rules="required">
+ <zt-dict v-model="dataForm.nodeType" dict="product"></zt-dict>
+ </zt-form-item>
+ <zt-form-item label="杩愯鐘舵�佸浘" prop="operationalStatus" v-if="isShow">
+ <el-input v-model="dataForm.operationalStatus" @focus="selectPicture('operational')"
+ :readonly="readonly"></el-input>
+ </zt-form-item>
+ <zt-form-item label="寰呮満鐘舵�佸浘" prop="standbyState" v-if="isShow">
+ <el-input v-model="dataForm.standbyState" @focus="selectPicture('standby')" :readonly="readonly"></el-input>
+ </zt-form-item>
+ <zt-form-item label="鏁呴殰鐘舵�佸浘" prop="faultState" v-if="isShow">
+ <el-input v-model="dataForm.faultState" @focus="selectPicture('fault')" :readonly="readonly"></el-input>
+ </zt-form-item>
+ <zt-form-item label="鎺掑簭" prop="sort">
+ <el-input v-model="dataForm.sort" :readonly="readonly"></el-input>
+ </zt-form-item>
+ </el-form>
+ <PictureSelect ref="pictureSelect" @setPicture="openAddWin">
+ </PictureSelect>
+ </zt-dialog>
+</template>
+
+<script>
+ import PictureSelect from "@/views/modules/basicInfo/SelectPicture";
+
+ export default {
+ data() {
+ return {
+ isTree: false,
+ isShow: true,
+ map: new Map(),
+ fileId: '',
+ productList: [],
+ dataForm: {
+ id: '',
+ pid: '',
+ name: '',
+ nodeType: '',
+ operationalStatus: '',
+ standbyState: '',
+ faultState: '',
+ sort: '',
+ status: ''
+ }
+ }
+ },
+ components: {
+ PictureSelect
+ },
+ methods: {
+ init(id,params) {
+ if (params.type == 'tree') {
+ this.isTree = true
+ this.isShow = false
+ this.getProductList()
+ } else {
+ this.dataForm.pid = params.pid
+ }
+ },
+ // 鑾峰彇绯荤粺鍒楄〃
+ async getProductList() {
+ let res = await this.$http.get('/basicInfo/XhProductModel/getProductList')
+ this.productList = res.data
+ console.log(this.productList, 'getProductList')
+ },
+ selectPicture(type) {
+ this.$refs.pictureSelect.$refs.dialog.init(type)
+ },
+ openAddWin(row, type) {
+ console.log(type, 'openAddWin(row)')
+ if (type === 'operational') {
+ this.dataForm.operationalStatus = row.name
+ for (let key in row.accessoryMap) {
+ let id = /_zt_oss_id=(\d+)/.exec(key)
+ this.fileId = id ? id[1] : ''
+ }
+ this.map.set(this.dataForm.operationalStatus, this.fileId);
+ console.log(this.map, 'openAddWin(row)')
+ } else if (type === 'standby') {
+ this.dataForm.standbyState = row.name
+ for (let key in row.accessoryMap) {
+ let id = /_zt_oss_id=(\d+)/.exec(key)
+ this.fileId = id ? id[1] : ''
+ }
+ this.map.set(this.dataForm.standbyState, this.fileId);
+ console.log(this.map, 'openAddWin(row)')
+ } else if (type === 'fault') {
+ this.dataForm.faultState = row.name
+ for (let key in row.accessoryMap) {
+ let id = /_zt_oss_id=(\d+)/.exec(key)
+ this.fileId = id ? id[1] : ''
+ }
+ this.map.set(this.dataForm.faultState, this.fileId);
+ console.log(this.map, 'openAddWin(row)')
+ }
+ },
+ // 鑾峰彇淇℃伅
+ async getInfo() {
+ let res = await this.$http.get(`/basicInfo/XhProductModel/${this.dataForm.id}`)
+ this.dataForm = {
+ ...this.dataForm,
+ ...res.data
+ }
+ },
+ // 琛ㄥ崟鎻愪氦
+ async formSubmit() {
+ this.dataForm.operationalStatus = this.map.get(this.dataForm.operationalStatus)
+ this.dataForm.standbyState = this.map.get(this.dataForm.standbyState)
+ this.dataForm.faultState = this.map.get(this.dataForm.faultState)
+ let res = await this.$http[!this.dataForm.id ? 'post' : 'put']('/basicInfo/XhProductModel/', this.dataForm)
+ if (res.success) {
+ await this.$tip.success()
+ this.$refs.dialog.close()
+ this.$emit('refreshDataList')
+ this.map.clear()
+ }
+ }
+ }
+ }
+</script>
diff --git a/web/src/views/modules/basicInfo/XhProductModel.vue b/web/src/views/modules/basicInfo/XhProductModel.vue
new file mode 100644
index 0000000..001de71
--- /dev/null
+++ b/web/src/views/modules/basicInfo/XhProductModel.vue
@@ -0,0 +1,118 @@
+<template xmlns="">
+ <div>
+ <el-row :gutter="20">
+ <el-col :span="5">
+ <div class="fa-card-a">
+ <product-model-tree @on-selected="onProductSelected"/>
+ </div>
+ </el-col>
+ <el-col :span="19">
+ <div class="mod-basicInfo-xhProductModel}">
+ <zt-table-wraper ref="tableObj" query-url="/basicInfo/XhProductModel/page"
+ delete-url="/basicInfo/XhProductModel "
+ v-slot="{ table }">
+ <el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()">
+ <el-form-item>
+ <el-input v-model="dataForm.name" placeholder="璇疯緭鍏ュ悕绉�" clearable></el-input>
+ </el-form-item>
+ <el-form-item>
+ <zt-dict v-model="dataForm.nodeType" dict="product" clearable></zt-dict>
+ </el-form-item>
+ <el-form-item>
+ <zt-button type="query" @click="table.query()"/>
+ <zt-button type="add" @click="add()"/>
+ <zt-button type="delete" @click="table.deleteHandle()"/>
+ </el-form-item>
+ </el-form>
+ <el-table v-loading="table.dataLoading" :data="table.dataList" height="100px" v-adaptive="{bottomOffset:70}"
+ border row-key="id"
+ @selection-change="table.selectionChangeHandle"
+ >
+ <el-table-column prop="name" label="鍚嶇О"/>
+ <zt-table-column-dict prop="nodeType" label="鑺傜偣绫诲瀷" dict="product"/>
+ <el-table-column prop="operationalStatus" label="杩愯鐘舵�佸浘" align="center">
+ <template v-slot="{ row }">
+ <el-image v-if="row.operationalStatus" :src="getPath(row.operationalStatus)"
+ style="height: 50px;width: 50px"></el-image>
+ </template>
+ </el-table-column>
+ <el-table-column prop="standbyState" label="寰呮満鐘舵�佸浘" align="center">
+ <template v-slot="{ row }">
+ <el-image v-if="row.standbyState" :src="getPath(row.standbyState)"
+ style="height: 50px;width: 50px"></el-image>
+ </template>
+ </el-table-column>
+ <el-table-column prop="faultState" label="鏁呴殰鐘舵�佸浘" align="center">
+ <template v-slot="{ row }">
+ <el-image v-if="row.faultState" :src="getPath(row.faultState)"
+ style="height: 50px;width: 50px"></el-image>
+ </template>
+ </el-table-column>
+ <el-table-column prop="sort" label="鎺掑簭"/>
+ <zt-table-column-handle :table="table"/>
+ </el-table>
+ <!-- 寮圭獥, 鏂板 / 淇敼 -->
+ <add-or-update @refreshDataList="table.query"/>
+ <select-ty-model @refreshDataList="table.query" ref="SelectTyModel"/>
+ </zt-table-wraper>
+ </div>
+ </el-col>
+ </el-row>
+ </div>
+</template>
+
+<script>
+ import AddOrUpdate from './XhProductModel-AddOrUpdate'
+ import SelectTyModel from './SelectTyModel'
+ import ProductModelTree from "./ProductModelTree";
+
+ export default {
+ data() {
+ return {
+ dataForm: {
+ name: '',
+ nodeType: '',
+ type:'',
+ id: ''
+ }
+ }
+ },
+ components: {
+ ProductModelTree,
+ AddOrUpdate,
+ SelectTyModel
+ },
+ methods: {
+ add() {
+ if (this.dataForm.type !== '4') {
+ console.log(1111)
+ console.log(this.dataForm.type,'add() {')
+ this.dataForm.type = this.dataForm.type - 1
+ } else if (this.dataForm.type === '4') {
+ console.log(2222)
+ console.log(this.dataForm.type,'add() {')
+ this.dataForm.type = this.dataForm.type - 2
+ }else if (this.dataForm.type === '0'){
+ console.log(this.dataForm.type,'add() {')
+ this.$alert("褰撳墠鑺傜偣涓嶅彲鏂板瀛愯妭鐐癸紝璇烽噸鏂拌缃�")
+ return
+ }
+ this.$refs.SelectTyModel.$refs.dialog.init(this.dataForm.type )
+ },
+ cellStyle({column}) {
+ if (column.label === '鍚嶇О') {
+ return 'text-align: left !important;'
+ }
+ },
+ getPath(id) {
+ console.log(id, 'path')
+ return `${window.SITE_CONFIG['apiURL']}/sys/oss/content2?fileId=${id}`
+ },
+ onProductSelected(data) {
+ this.dataForm.id = data.id
+ this.dataForm.type = data.nodeType
+ this.$refs.tableObj.query()
+ }
+ }
+ }
+</script>
diff --git a/web/src/views/modules/sys/codeRule/SysCodeRule-AddOrUpdate.vue b/web/src/views/modules/sys/codeRule/SysCodeRule-AddOrUpdate.vue
deleted file mode 100644
index 5d7f79e..0000000
--- a/web/src/views/modules/sys/codeRule/SysCodeRule-AddOrUpdate.vue
+++ /dev/null
@@ -1,65 +0,0 @@
-<template>
- <zt-dialog ref="dialog" @confirm="formSubmit">
- <el-form :model="dataForm" ref="dataForm" :disabled="dataForm.disabled" label-width="120px">
- <zt-form-item label="鍔熻兘缂栫爜" prop="funCode" rules="required">
- <el-input v-model="dataForm.funCode"></el-input>
- </zt-form-item>
- <zt-form-item label="鍔熻兘鍚嶇О" prop="name" rules="required">
- <el-input v-model="dataForm.name"></el-input>
- </zt-form-item>
- <zt-form-item label="缂栧彿瑙勫垯" prop="codeRule" rules="required">
- <el-input v-model="dataForm.codeRule"></el-input>
- </zt-form-item>
- <zt-form-item label="鏁版嵁琛ㄥ悕绉�" prop="tableName" rules="required">
- <el-input v-model="dataForm.tableName"></el-input>
- </zt-form-item>
- <zt-form-item label="缂栧彿瀛楁鍚嶇О" prop="tableName" rules="required">
- <el-input v-model="dataForm.codeFieldName"></el-input>
- </zt-form-item>
- <zt-form-item label="搴忓彿浣嶆暟" prop="noByteNum" rules="required">
- <el-input v-model="dataForm.noByteNum"></el-input>
- </zt-form-item>
- <zt-form-item label="澶囨敞" prop="remark" rules="required">
- <el-input v-model="dataForm.remark"></el-input>
- </zt-form-item>
- </el-form>
- </zt-dialog>
-</template>
-
-<script>
- export default {
- data() {
- return {
- dataForm: {
- id: '',
- funCode: '',
- name: '',
- codeRule: '',
- tableName: '',
- codeFieldName:'',
- noByteNum: '',
- remark: ''
- }
- }
- },
- methods: {
- // 鑾峰彇淇℃伅
- async getInfo() {
- let res = await this.$http.get(`/coderule/SysCodeRule/${this.dataForm.id}`)
- this.dataForm = {
- ...this.dataForm,
- ...res.data
- }
- },
- // 琛ㄥ崟鎻愪氦
- async formSubmit() {
- let res = await this.$http[!this.dataForm.id ? 'post' : 'put']('/coderule/SysCodeRule/', this.dataForm)
- if (res.success) {
- await this.$tip.success()
- this.$refs.dialog.close()
- this.$emit('refreshDataList')
- }
- }
- }
- }
-</script>
diff --git a/web/src/views/modules/sys/codeRule/SysCodeRule.vue b/web/src/views/modules/sys/codeRule/SysCodeRule.vue
deleted file mode 100644
index f3fd61a..0000000
--- a/web/src/views/modules/sys/codeRule/SysCodeRule.vue
+++ /dev/null
@@ -1,43 +0,0 @@
-<template>
- <el-card shadow="never" class="aui-card--fill">
- <div class="mod-coderule-sysCodeRule}">
- <zt-table-wraper query-url="/coderule/SysCodeRule/page" delete-url="/coderule/SysCodeRule" v-slot="{ table }">
- <el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()">
- <el-form-item>
- <zt-button type="query" @click="table.query()"/>
- <zt-button type="add" perm="coderule:add" @click="table.editHandle()"/>
- <zt-button type="delete" perm="coderule:delete" @click="table.deleteHandle()"/>
- </el-form-item>
- </el-form>
- <el-table v-loading="table.dataLoading" :data="table.dataList" height="100px" v-adaptive="{bottomOffset:70}" border @selection-change="table.selectionChangeHandle">
- <el-table-column type="selection" width="40"/>
- <el-table-column prop="funCode" label="鍔熻兘缂栫爜"/>
- <el-table-column prop="name" label="鍔熻兘鍚嶇О"/>
- <el-table-column prop="codeRule" label="缂栧彿瑙勫垯"/>
- <el-table-column prop="tableName" label="鏁版嵁琛ㄥ悕绉�"/>
- <el-table-column prop="codeFieldName" label="缂栧彿瀛楁鍚嶇О"/>
- <el-table-column prop="noByteNum" label="搴忓彿浣嶆暟"/>
- <el-table-column prop="remark" label="澶囨敞"/>
- <zt-table-column-handle :table="table" edit-perm="coderule:update" delete-perm="coderule::delete"/>
- </el-table>
- <!-- 寮圭獥, 鏂板 / 淇敼 -->
- <add-or-update @refreshDataList="table.query"/>
- </zt-table-wraper>
- </div>
- </el-card>
-</template>
-
-<script>
- import AddOrUpdate from './SysCodeRule-AddOrUpdate'
- export default {
- data() {
- return {
- dataForm: {
- }
- }
- },
- components: {
- AddOrUpdate
- }
- }
-</script>
diff --git a/web/src/views/modules/sys/user-add-or-update.vue b/web/src/views/modules/sys/user-add-or-update.vue
index 849ccde..064df33 100644
--- a/web/src/views/modules/sys/user-add-or-update.vue
+++ b/web/src/views/modules/sys/user-add-or-update.vue
@@ -32,7 +32,7 @@
<el-input v-model="dataForm.nickName" :placeholder="$t('user.nickName')"></el-input>
</zt-form-item>
<zt-form-item prop="secretClass" :label="$t('user.secretClass')" rules="required">
- <zt-dict v-model="dataForm.secretClass" dict="secret_class" :placeholder="$t('user.secretClass') "></zt-dict>
+ <zt-dict v-model="dataForm.secretClass" dict="SecretClass" :placeholder="$t('user.secretClass') "></zt-dict>
</zt-form-item>
<zt-form-item prop="simpleSpelling" :label="$t('user.simpleSpelling')">
<el-input v-model="dataForm.simpleSpelling" :placeholder="$t('user.simpleSpelling')"></el-input>
diff --git a/web/src/views/modules/sysPictureBase/SysPictureBase-AddOrUpdate.vue b/web/src/views/modules/sysPictureBase/SysPictureBase-AddOrUpdate.vue
new file mode 100644
index 0000000..09ca888
--- /dev/null
+++ b/web/src/views/modules/sysPictureBase/SysPictureBase-AddOrUpdate.vue
@@ -0,0 +1,81 @@
+<template>
+ <zt-dialog ref="dialog" @confirm="formSubmit">
+ <el-form :model="dataForm" ref="dataForm" :disabled="dataForm.disabled" label-width="120px">
+ <zt-form-item label="绫诲瀷" prop="type">
+ <el-input v-model="dataForm.type"></el-input>
+ </zt-form-item>
+ <zt-form-item label="瀛愮被鍨�" prop="subType">
+ <el-input v-model="dataForm.subType"></el-input>
+ </zt-form-item>
+ <zt-form-item label="鍥剧墖鍚嶇О" prop="name" rules="required">
+ <el-input v-model="dataForm.name"></el-input>
+ </zt-form-item>
+ <zt-form-item label="妫�绱㈠叧閿瓧" prop="contentType" >
+ <el-input v-model="dataForm.contentType"></el-input>
+ </zt-form-item>
+ <zt-form-item label="绯荤粺鏍囪瘑" prop="systemMark" rules="required">
+ <zt-dict v-model="dataForm.systemMark" dict="product"></zt-dict>
+ </zt-form-item>
+ <zt-form-item label="鎺掑簭" prop="sortNo">
+ <el-input v-model="dataForm.sortNo" :readonly="readonly" @input=""></el-input>
+ </zt-form-item>
+ <div class="el-flex img-src" style="height: 20px">
+ <el-form-item class="marginTopAndMarginBottom" style="width: 100%">
+ <config-uploader :lineHeight="true" busi-type="sys_picture" model-name="dataForm" :dataForm="dataForm"
+ v-model="dataForm.files"/>
+ </el-form-item>
+ </div>
+ </el-form>
+ </zt-dialog>
+</template>
+
+<script>
+ export default {
+ data() {
+ return {
+ dataForm: {
+ id: '',
+ type: '',
+ subType: '',
+ name: '',
+ contentType: '',
+ systemMark: '',
+ sortNo: '',
+ remark: ''
+ },
+ readonly:{
+ type: Boolean,
+ default: false
+ },
+ }
+ },
+ methods: {
+ // 鑾峰彇淇℃伅
+ async getInfo() {
+ let res = await this.$http.get(`/sysPictureBase/SysPictureBase/${this.dataForm.id}`)
+ this.dataForm = {
+ ...this.dataForm,
+ ...res.data
+ }
+ },
+ // 琛ㄥ崟鎻愪氦
+ async formSubmit() {
+ let res = await this.$http[!this.dataForm.id ? 'post' : 'put']('/sysPictureBase/SysPictureBase/', this.dataForm)
+ if (res.success) {
+ await this.$tip.success()
+ this.$refs.dialog.close()
+ this.$emit('refreshDataList')
+ }
+ }
+ }
+ }
+</script>
+<style>
+ .img-sc > .el-form-item > .el-form-item__content {
+ width: 100%;
+ }
+ .marginTopAndMarginBottom {
+ margin-top: 10px !important;
+ margin-bottom: 0 !important;
+ }
+</style>
diff --git a/web/src/views/modules/sysPictureBase/SysPictureBase.vue b/web/src/views/modules/sysPictureBase/SysPictureBase.vue
new file mode 100644
index 0000000..7c8195e
--- /dev/null
+++ b/web/src/views/modules/sysPictureBase/SysPictureBase.vue
@@ -0,0 +1,71 @@
+<template>
+ <el-card shadow="never" class="aui-card--fill">
+ <div class="mod-sysPictureBase-sysPictureBase}">
+ <zt-table-wraper query-url="/sysPictureBase/SysPictureBase/page" delete-url="/sysPictureBase/SysPictureBase/"
+ v-slot="{ table }">
+ <el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()">
+ <el-form-item>
+ <el-input v-model="dataForm.contentType" placeholder="璇疯緭鍏ユ绱㈠叧閿瓧" clearable></el-input>
+
+ </el-form-item>
+ <el-form-item>
+ <zt-dict v-model="dataForm.systemMark" dict="product" placeholder="璇烽�夋嫨绯荤粺鏍囪瘑" clearable></zt-dict>
+ </el-form-item>
+ <el-form-item>
+ <zt-button type="query" @click="table.query()"/>
+ <zt-button type="add" @click="table.editHandle()"/>
+ <zt-button type="delete" @click="table.deleteHandle()"/>
+ </el-form-item>
+ </el-form>
+ <el-table v-loading="table.dataLoading" :data="table.dataList" height="100px" v-adaptive="{bottomOffset:70}"
+ border @selection-change="table.selectionChangeHandle">
+ <el-table-column type="selection" width="40" align="center"/>
+ <el-table-column prop="sortNo" label="鎺掑簭"/>
+ <el-table-column prop="name" label="鍥剧墖鍚嶇О"/>
+ <el-table-column label="鍥剧墖" align="center">
+ <template v-slot="{ row }">
+ <el-image v-if="row.accessoryMap" :src="getPath(row)" style="height: 50px;width: 50px"></el-image>
+ </template >
+ </el-table-column>
+ <el-table-column prop="contentType" label="妫�绱㈠叧閿瓧"/>
+ <zt-table-column-dict prop="systemMark" label="绯荤粺鏍囪瘑" dict="product"/>
+ <zt-table-column-handle :table="table"
+ delete-perm="sysPictureBase::delete"/>
+ </el-table>
+ <!-- 寮圭獥, 鏂板 / 淇敼 -->
+ <add-or-update @refreshDataList="table.query"/>
+ </zt-table-wraper>
+ </div>
+ </el-card>
+</template>
+
+<script>
+ import AddOrUpdate from './SysPictureBase-AddOrUpdate'
+
+ export default {
+ data() {
+ return {
+ dataForm: {
+ contentType: '',
+ systemMark: '',
+ sortNo:''
+ },
+ }
+ },
+ components: {
+ AddOrUpdate
+ },
+ methods: {
+ getPath(row) {
+ if (row.accessoryMap){
+ for (let key in row.accessoryMap) {
+ return key
+ }
+ }
+ },
+ indexFormat(index) {
+ return index += 1
+ },
+ }
+ }
+</script>
diff --git a/zt/core/src/main/java/com/zt/modules/coderule/controller/SysCodeRuleController.java b/zt/core/src/main/java/com/zt/modules/coderule/controller/SysCodeRuleController.java
deleted file mode 100644
index c2776fb..0000000
--- a/zt/core/src/main/java/com/zt/modules/coderule/controller/SysCodeRuleController.java
+++ /dev/null
@@ -1,104 +0,0 @@
-package com.zt.modules.coderule.controller;
-
-
-import com.zt.common.annotation.LogOperation;
-import com.zt.common.constant.Constant;
-import com.zt.common.annotation.QueryParam;
-import com.zt.common.db.query.QueryFilter;
-import com.zt.common.servlet.Result;
-import com.zt.common.servlet.PageResult;
-import com.zt.common.validator.AssertUtils;
-import com.zt.common.validator.ValidatorUtils;
-import com.zt.common.validator.group.AddGroup;
-import com.zt.common.validator.group.DefaultGroup;
-import com.zt.common.validator.group.UpdateGroup;
-import com.zt.modules.coderule.model.SysCodeRule;
-import com.zt.modules.coderule.service.SysCodeRuleService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-import springfox.documentation.annotations.ApiIgnore;
-
-import javax.servlet.http.HttpServletResponse;
-import java.util.List;
-import java.util.Map;
-
-
-/**
- * sys_code_rule
- *
- * @author zt generator
- * @since 1.0.0 2023-11-09
- */
-@RestController
-@RequestMapping("/coderule/SysCodeRule/")
-@Api(tags="sys_code_rule")
-public class SysCodeRuleController {
- @Autowired
- private SysCodeRuleService sysCodeRuleService;
-
- @GetMapping("page")
- @ApiOperation("鍒嗛〉")
- @ApiImplicitParams({
- @ApiImplicitParam(name = Constant.Q.PAGE, value = Constant.QV.PAGE, required = true, dataType = Constant.QT.INT),
- @ApiImplicitParam(name = Constant.Q.LIMIT, value = Constant.QV.LIMIT, required = true, dataType = Constant.QT.INT),
- @ApiImplicitParam(name = Constant.Q.ORDER_FIELD, value = Constant.QV.ORDER_FIELD, dataType = Constant.QT.STRING),
- @ApiImplicitParam(name = Constant.Q.ORDER, value = Constant.QV.ORDER, dataType = Constant.QT.STRING),
- })
- public PageResult<SysCodeRule> page(@ApiIgnore @QueryParam QueryFilter queryFilter){
-
- return PageResult.ok(sysCodeRuleService.page(queryFilter));
- }
-
- @GetMapping("getNewCode")
- @ApiOperation("淇℃伅")
- public Result<String> getNewCode(Map<String,String> map){
- String data = sysCodeRuleService.getNewCode(map);
- return Result.ok(data);
- }
-
- @GetMapping("{id}")
- @ApiOperation("淇℃伅")
- public Result<SysCodeRule> get(@PathVariable("id") Long id){
- SysCodeRule data = sysCodeRuleService.get(id);
-
- return Result.ok(data);
- }
-
- @PostMapping
- @ApiOperation("鏂板")
- @LogOperation("鏂板")
- public Result insert(@RequestBody SysCodeRule sysCodeRule){
- //鏁堥獙鏁版嵁
- ValidatorUtils.validateEntity(sysCodeRule, AddGroup.class, DefaultGroup.class);
- sysCodeRuleService.insert(sysCodeRule);
-
- return Result.ok();
- }
-
- @PutMapping
- @ApiOperation("淇敼")
- @LogOperation("淇敼")
- public Result update(@RequestBody SysCodeRule sysCodeRule){
- //鏁堥獙鏁版嵁
- ValidatorUtils.validateEntity(sysCodeRule, UpdateGroup.class, DefaultGroup.class);
- sysCodeRuleService.update(sysCodeRule);
-
- return Result.ok();
- }
-
- @DeleteMapping
- @ApiOperation("鍒犻櫎")
- @LogOperation("鍒犻櫎")
- public Result delete(@RequestBody Long[] ids){
- //鏁堥獙鏁版嵁
- AssertUtils.isArrayEmpty(ids, "id");
- sysCodeRuleService.delete(ids);
-
- return Result.ok();
- }
-
-}
diff --git a/zt/core/src/main/java/com/zt/modules/coderule/dao/SysCodeRuleDao.java b/zt/core/src/main/java/com/zt/modules/coderule/dao/SysCodeRuleDao.java
deleted file mode 100644
index dd26c67..0000000
--- a/zt/core/src/main/java/com/zt/modules/coderule/dao/SysCodeRuleDao.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package com.zt.modules.coderule.dao;
-
-import com.zt.common.dao.BaseDao;
-import com.zt.modules.coderule.model.SysCodeRule;
-import org.apache.ibatis.annotations.MapKey;
-import org.apache.ibatis.annotations.Mapper;
-
-
-import java.util.List;
-import java.util.Map;
-
-
-/**
- * sys_code_rule
- *
- * @author zt generator
- * @since 1.0.0 2023-11-09
- */
-@Mapper
-public interface SysCodeRuleDao extends BaseDao<SysCodeRule> {
-
- List<SysCodeRule> getList(Map<String, Object> params);
-
- SysCodeRule getCodeRule(Map<String, String> map);
-
- String getProjectIdentity(String projectId);
-
- String getMaxCode(String tableName, String CodeFieldName, String newCodeTemplet);
-
- String getProjectYear(Map<String, String> map);
-
- Map<String, String> getMapProjectIdentity(String projectId);
-}
diff --git a/zt/core/src/main/java/com/zt/modules/coderule/model/SysCodeRule.java b/zt/core/src/main/java/com/zt/modules/coderule/model/SysCodeRule.java
deleted file mode 100644
index c61eee1..0000000
--- a/zt/core/src/main/java/com/zt/modules/coderule/model/SysCodeRule.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package com.zt.modules.coderule.model;
-
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.zt.common.entity.BusiEntity;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.util.Date;
-
-/**
- * sys_code_rule
- *
- * @author zt generator
- * @since 1.0.0 2023-11-09
- */
-@Data
-@EqualsAndHashCode(callSuper=false)
-@TableName("sys_code_rule")
-public class SysCodeRule extends BusiEntity {
- private static final long serialVersionUID = 1L;
-
- @ApiModelProperty(value = "")
- private String funCode;
-
- @ApiModelProperty(value = "")
- private String name;
-
- @ApiModelProperty(value = "")
- private String codeRule;
-
- @ApiModelProperty(value = "")
- private String tableName;
-
- @ApiModelProperty(value = "")
- private String codeFieldName;
-
- @ApiModelProperty(value = "")
- private Integer noByteNum;
-
- @ApiModelProperty(value = "")
- private String remark;
-
-}
diff --git a/zt/core/src/main/java/com/zt/modules/coderule/service/SysCodeRuleService.java b/zt/core/src/main/java/com/zt/modules/coderule/service/SysCodeRuleService.java
deleted file mode 100644
index d317ee6..0000000
--- a/zt/core/src/main/java/com/zt/modules/coderule/service/SysCodeRuleService.java
+++ /dev/null
@@ -1,74 +0,0 @@
-package com.zt.modules.coderule.service;
-
-import cn.hutool.core.convert.Convert;
-import com.zt.common.service.BaseService;
-import com.zt.modules.coderule.dao.SysCodeRuleDao;
-import com.zt.modules.coderule.model.SysCodeRule;
-import com.zt.modules.workflowconfig.dao.WfDefDao;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.zt.common.db.query.QueryFilter;
-import javax.annotation.Resource;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-
-
-/**
- * sys_code_rule
- *
- * @author zt generator
- * @since 1.0.0 2023-11-09
- */
-@Service
-public class SysCodeRuleService extends BaseService<SysCodeRuleDao, SysCodeRule> {
- /**
- * 鍒嗛〉鏌ヨ
- *
- * @param queryFilter
- * @return
- */
- public List<SysCodeRule> page(QueryFilter queryFilter) {
- return baseDao.getList(queryFilter.getQueryParams());
- }
-
- /**
- * 鍒犻櫎
- *
- * @param ids
- */
- public void delete(Long[] ids) {
- super.deleteLogic(ids);
- }
-
- public String getNewCode(Map<String, String> map) {
- SysCodeRule codeRule = baseDao.getCodeRule(map);
- String newCodeTemplet = codeRule.getCodeRule();
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy");
- String year = sdf.format(new Date());
- if (map.get("year")!=null){
- year = map.get("year");
- }
- if (map.get("projectId")!=null){
- Map<String, String> mapProject = baseDao.getMapProjectIdentity(map.get("projectId"));
- newCodeTemplet = newCodeTemplet.replace("[椤圭洰缂栧彿]",mapProject.get("software_identity"));
- year = mapProject.get("year");
- }
- newCodeTemplet = newCodeTemplet.replace("[骞翠唤]",year);
-
- String xhTemplet = StringUtils.substring("__________",0,codeRule.getNoByteNum());
- newCodeTemplet = newCodeTemplet.replace("[搴忓彿]",xhTemplet);
- int xhStartPosition = newCodeTemplet.indexOf(xhTemplet);
-
- String maxCode = baseDao.getMaxCode(codeRule.getTableName(),codeRule.getCodeFieldName(),newCodeTemplet);
- String maxCodeXh = "0";
- if (StringUtils.isNotBlank(maxCode))
- maxCodeXh = StringUtils.substring(maxCode,xhStartPosition,xhStartPosition+codeRule.getNoByteNum());
- Integer a = Convert.toInt(maxCodeXh)+1;
- String newCodeXh = String.format("%0"+codeRule.getNoByteNum()+"d", a);
- String newCode = newCodeTemplet.replace(xhTemplet,newCodeXh);
- return newCode;
- }
-}
diff --git a/zt/core/src/main/java/com/zt/modules/sys/model/SysDictData.java b/zt/core/src/main/java/com/zt/modules/sys/model/SysDictData.java
index 3894c64..c2ba399 100644
--- a/zt/core/src/main/java/com/zt/modules/sys/model/SysDictData.java
+++ b/zt/core/src/main/java/com/zt/modules/sys/model/SysDictData.java
@@ -47,6 +47,9 @@
@ApiModelProperty(value = "澶囨敞")
private String remark;
+ @ApiModelProperty(value = "瀛楀吀缂栫爜")
+ private String dictCode;
+
@ApiModelProperty(value = "鎺掑簭")
@Min(value = 0, message = "鎺掑簭鍊间笉鑳藉皬浜�0", groups = DefaultGroup.class)
private Integer sort;
diff --git a/zt/core/src/main/resources/mapper/coderule/SysCodeRuleDao.xml b/zt/core/src/main/resources/mapper/coderule/SysCodeRuleDao.xml
deleted file mode 100644
index b931486..0000000
--- a/zt/core/src/main/resources/mapper/coderule/SysCodeRuleDao.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="com.zt.modules.coderule.dao.SysCodeRuleDao">
-
- <select id="getList" resultType="com.zt.modules.coderule.model.SysCodeRule">
- select a.*
- from sys_code_rule a
- <where>
- a.is_delete = 0
- <if test="whereSql!=null">
- and ${whereSql}
- </if>
- </where>
- <if test="orderBySql!=null">
- ORDER BY ${orderBySql}
- </if>
- </select>
- <select id="getCodeRule" resultType="com.zt.modules.coderule.model.SysCodeRule">
- select * from sys_code_rule where fun_code = #{funCode}
- </select>
- <select id="getProjectIdentity" resultType="java.lang.String">
- select software_identity from project where id = ${projectId}
- </select>
- <select id="getMaxCode" resultType="java.lang.String">
- select max(${CodeFieldName}) from ${tableName} where ${CodeFieldName} like '${newCodeTemplet}'
- </select>
- <select id="getProjectYear" resultType="java.lang.String">
-
- </select>
- <select id="getMapProjectIdentity" resultType="java.util.Map">
- select software_identity,year from project where id = ${projectId}
- </select>
-
-
-</mapper>
--
Gitblit v1.9.1