From 9948083d9bebfe517eae630716a963547a74296b Mon Sep 17 00:00:00 2001 From: xd <844539747@qq.com> Date: Wed, 3 Apr 2024 08:33:34 +0800 Subject: [PATCH] '123' --- .../web/controller/quot/QuotController.java | 18 +- .../sysSapUser/SysSapUserController.java | 107 ++++++ .../controller/system/SysLoginController.java | 15 +- .../main/java/com/ruoyi/quot/domain/Quot.java | 6 + .../java/com/ruoyi/quot/domain/QuotFile.java | 24 +- .../quot/service/impl/QuotServiceImpl.java | 23 +- .../ruoyi/sysSapUser/domain/SysSapUser.java | 93 ++++++ .../sysSapUser/mapper/SysSapUserMapper.java | 61 ++++ .../service/ISysSapUserService.java | 61 ++++ .../service/impl/SysSapUserServiceImpl.java | 93 ++++++ .../mapper/customer/CustomerMapper.xml | 2 +- .../resources/mapper/quot/QuotFileMapper.xml | 18 +- .../main/resources/mapper/quot/QuotMapper.xml | 21 +- .../mapper/sysSapUser/SysSapUserMapper.xml | 73 ++++ ruoyi-ui/src/api/quot/quot.js | 4 +- ruoyi-ui/src/api/sysSapUser/sysSapUser.js | 44 +++ ruoyi-ui/src/store/modules/user.js | 5 +- .../src/views/customer/customer/index.vue | 2 +- ruoyi-ui/src/views/quot/quot/index.vue | 153 +++++---- .../src/views/sysSapUser/sysSapUser/index.vue | 311 ++++++++++++++++++ 20 files changed, 1038 insertions(+), 96 deletions(-) create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/web/controller/sysSapUser/SysSapUserController.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/sysSapUser/domain/SysSapUser.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/sysSapUser/mapper/SysSapUserMapper.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/sysSapUser/service/ISysSapUserService.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/sysSapUser/service/impl/SysSapUserServiceImpl.java create mode 100644 ruoyi-system/src/main/resources/mapper/sysSapUser/SysSapUserMapper.xml create mode 100644 ruoyi-ui/src/api/sysSapUser/sysSapUser.js create mode 100644 ruoyi-ui/src/views/sysSapUser/sysSapUser/index.vue diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/quot/QuotController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/quot/QuotController.java index 0a546fc..9cb71f4 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/quot/QuotController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/quot/QuotController.java @@ -3,7 +3,6 @@ package com.ruoyi.web.controller.quot; import java.util.List; import javax.servlet.http.HttpServletResponse; -import com.ruoyi.common.core.domain.model.LoginUser; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.file.FileUploadUtils; @@ -98,6 +97,7 @@ public class QuotController extends BaseController @PutMapping public AjaxResult edit(@RequestBody Quot quot) { + quot.setUpdateBy(getUsername()); return toAjax(quotService.updateQuot(quot)); } @@ -117,22 +117,28 @@ public class QuotController extends BaseController */ @Log(title = "上传报价附件", businessType = BusinessType.INSERT) @PostMapping("/quotFile") - public AjaxResult quotFile(@RequestParam("quotFile") MultipartFile file,@RequestParam("quotId") String quotId) throws Exception + public AjaxResult quotFile(@RequestParam("quotFile") MultipartFile file,@RequestParam("relation_id") String relation_id,@RequestParam("file_type") String file_type) throws Exception { - if(!StringUtils.isEmpty(quotId)){ + if(!StringUtils.isEmpty(relation_id)){ if (!file.isEmpty()) { QuotFile quotFile= new QuotFile(); quotFile.setFileId(UUID.fastUUID().toString()); - String url = FileUploadUtils.uploadMinio(file,"quot-manage", "quot/"+quotId); + String url = FileUploadUtils.uploadMinio(file,"quot-manage", "quot/"+relation_id); int index = url.lastIndexOf("/")+1; String fileName = url.substring(index); + + int index2 = url.indexOf("/quot/"); + String fileBucketName = url.substring(index2); + quotFile.setFileName(fileName); + quotFile.setFileBucketName(fileBucketName); quotFile.setFileUrl(url); quotFile.setFileSize(file.getSize()); quotFile.setFileTime(DateUtils.getTime()); - quotFile.setQuotId(quotId); + quotFile.setFileType(file_type); + quotFile.setRelationId(relation_id); quotFileService.insertQuotFile(quotFile); } }else{ @@ -163,7 +169,7 @@ public class QuotController extends BaseController try { QuotFile quotfile = quotFileService.selectQuotFileByFileId(fileId); quotFileService.deleteQuotFileByFileId(fileId); - MinioUtil.removeObject("quot-manage", quotfile.getFileName()); + MinioUtil.removeObject("quot-manage", quotfile.getFileBucketName()); }catch(Exception e){ return error("系统异常!"); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/sysSapUser/SysSapUserController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/sysSapUser/SysSapUserController.java new file mode 100644 index 0000000..d89b048 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/sysSapUser/SysSapUserController.java @@ -0,0 +1,107 @@ +package com.ruoyi.web.controller.sysSapUser; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +import com.ruoyi.common.utils.uuid.UUID; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.sysSapUser.domain.SysSapUser; +import com.ruoyi.sysSapUser.service.ISysSapUserService; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * SAP账户Controller + * + * @author ruoyi + * @date 2024-04-02 + */ +@RestController +@RequestMapping("/sysSapUser/sysSapUser") +public class SysSapUserController extends BaseController +{ + @Autowired + private ISysSapUserService sysSapUserService; + + /** + * 查询SAP账户列表 + */ + @PreAuthorize("@ss.hasPermi('sysSapUser:sysSapUser:list')") + @GetMapping("/list") + public TableDataInfo list(SysSapUser sysSapUser) + { + startPage(); + List list = sysSapUserService.selectSysSapUserList(sysSapUser); + return getDataTable(list); + } + + /** + * 导出SAP账户列表 + */ + @PreAuthorize("@ss.hasPermi('sysSapUser:sysSapUser:export')") + @Log(title = "SAP账户", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, SysSapUser sysSapUser) + { + List list = sysSapUserService.selectSysSapUserList(sysSapUser); + ExcelUtil util = new ExcelUtil(SysSapUser.class); + util.exportExcel(response, list, "SAP账户数据"); + } + + /** + * 获取SAP账户详细信息 + */ + @PreAuthorize("@ss.hasPermi('sysSapUser:sysSapUser:query')") + @GetMapping(value = "/{sapUserId}") + public AjaxResult getInfo(@PathVariable("sapUserId") String sapUserId) + { + return success(sysSapUserService.selectSysSapUserBySapUserId(sapUserId)); + } + + /** + * 新增SAP账户 + */ + @PreAuthorize("@ss.hasPermi('sysSapUser:sysSapUser:add')") + @Log(title = "SAP账户", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody SysSapUser sysSapUser) + { + sysSapUser.setSapUserId(UUID.fastUUID().toString()); + return toAjax(sysSapUserService.insertSysSapUser(sysSapUser)); + } + + /** + * 修改SAP账户 + */ + @PreAuthorize("@ss.hasPermi('sysSapUser:sysSapUser:edit')") + @Log(title = "SAP账户", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody SysSapUser sysSapUser) + { + return toAjax(sysSapUserService.updateSysSapUser(sysSapUser)); + } + + /** + * 删除SAP账户 + */ + @PreAuthorize("@ss.hasPermi('sysSapUser:sysSapUser:remove')") + @Log(title = "SAP账户", businessType = BusinessType.DELETE) + @DeleteMapping("/{sapUserIds}") + public AjaxResult remove(@PathVariable String[] sapUserIds) + { + return toAjax(sysSapUserService.deleteSysSapUserBySapUserIds(sapUserIds)); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java index cf7c306..73c12c5 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java @@ -2,6 +2,9 @@ package com.ruoyi.web.controller.system; import java.util.List; import java.util.Set; + +import com.ruoyi.sysSapUser.domain.SysSapUser; +import com.ruoyi.sysSapUser.service.ISysSapUserService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; @@ -34,6 +37,9 @@ public class SysLoginController @Autowired private SysPermissionService permissionService; + @Autowired + private ISysSapUserService sysSapUserService; + /** * 登录方法 * @@ -69,7 +75,14 @@ public class SysLoginController ajax.put("roles", roles); ajax.put("permissions", permissions); - //获取SAP编码 和 名称 TODO + //获取SAP编码 和 名称 + SysSapUser su = new SysSapUser(); + su.setSysUserName(user.getUserName()); + List list = sysSapUserService.selectSysSapUserList(su); + if(list!=null && list.size()>0){ + su = list.get(0); + } + ajax.put("sapUser", su); return ajax; } diff --git a/ruoyi-system/src/main/java/com/ruoyi/quot/domain/Quot.java b/ruoyi-system/src/main/java/com/ruoyi/quot/domain/Quot.java index 68e6140..9f47524 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/quot/domain/Quot.java +++ b/ruoyi-system/src/main/java/com/ruoyi/quot/domain/Quot.java @@ -90,6 +90,10 @@ public class Quot extends BaseEntity @Excel(name = "提交状态") private String quotApprovalStatus; + /** 创建人 */ + @Excel(name = "创建人") + private String createName; + /** 报价单-产品信息 */ private List quotMaterialList; @@ -276,7 +280,9 @@ public class Quot extends BaseEntity { return quotApprovalStatus; } + public String getCreateName() {return createName;} + public void setCreateName(String createName) {this.createName = createName;} public List getQuotMaterialList() { return quotMaterialList; diff --git a/ruoyi-system/src/main/java/com/ruoyi/quot/domain/QuotFile.java b/ruoyi-system/src/main/java/com/ruoyi/quot/domain/QuotFile.java index c660aae..3b3c2c4 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/quot/domain/QuotFile.java +++ b/ruoyi-system/src/main/java/com/ruoyi/quot/domain/QuotFile.java @@ -21,6 +21,9 @@ public class QuotFile extends BaseEntity /** 文件名称 */ private String fileName; + /** MINIO文件名称 */ + private String fileBucketName; + /** 文件地址 */ private String fileUrl; @@ -30,8 +33,11 @@ public class QuotFile extends BaseEntity /** 上传时间 */ private String fileTime; + /** 类别 */ + private String fileType; + /** */ - private String quotId; + private String relationId; public void setFileId(String fileId) { @@ -51,6 +57,9 @@ public class QuotFile extends BaseEntity { return fileName; } + public String getFileBucketName() {return fileBucketName;} + + public void setFileBucketName(String fileBucketName) {this.fileBucketName = fileBucketName;} public void setFileUrl(String fileUrl) { this.fileUrl = fileUrl; @@ -78,14 +87,17 @@ public class QuotFile extends BaseEntity { return fileTime; } - public void setQuotId(String quotId) + public String getFileType() {return fileType;} + + public void setFileType(String fileType) {this.fileType = fileType;} + public void setRelationId(String relationId) { - this.quotId = quotId; + this.relationId = relationId; } - public String getQuotId() + public String getRelationId() { - return quotId; + return relationId; } @Override @@ -96,7 +108,7 @@ public class QuotFile extends BaseEntity .append("fileUrl", getFileUrl()) .append("fileSize", getFileSize()) .append("fileTime", getFileTime()) - .append("quotId", getQuotId()) + .append("relationId", getRelationId()) .toString(); } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/quot/service/impl/QuotServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/quot/service/impl/QuotServiceImpl.java index 5308353..1b05d05 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/quot/service/impl/QuotServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/quot/service/impl/QuotServiceImpl.java @@ -1,7 +1,10 @@ package com.ruoyi.quot.service.impl; import java.util.List; + +import com.ruoyi.common.annotation.DataScope; import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.common.utils.uuid.UUID; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.ArrayList; @@ -14,19 +17,19 @@ import com.ruoyi.quot.service.IQuotService; /** * 报价Service业务层处理 - * + * * @author ruoyi * @date 2024-04-01 */ @Service -public class QuotServiceImpl implements IQuotService +public class QuotServiceImpl implements IQuotService { @Autowired private QuotMapper quotMapper; /** * 查询报价 - * + * * @param quotId 报价主键 * @return 报价 */ @@ -38,11 +41,12 @@ public class QuotServiceImpl implements IQuotService /** * 查询报价列表 - * + * * @param quot 报价 * @return 报价 */ @Override + @DataScope(deptAlias = "d", userAlias = "u") public List selectQuotList(Quot quot) { return quotMapper.selectQuotList(quot); @@ -50,7 +54,7 @@ public class QuotServiceImpl implements IQuotService /** * 新增报价 - * + * * @param quot 报价 * @return 结果 */ @@ -66,7 +70,7 @@ public class QuotServiceImpl implements IQuotService /** * 修改报价 - * + * * @param quot 报价 * @return 结果 */ @@ -82,7 +86,7 @@ public class QuotServiceImpl implements IQuotService /** * 批量删除报价 - * + * * @param quotIds 需要删除的报价主键 * @return 结果 */ @@ -96,7 +100,7 @@ public class QuotServiceImpl implements IQuotService /** * 删除报价信息 - * + * * @param quotId 报价主键 * @return 结果 */ @@ -110,7 +114,7 @@ public class QuotServiceImpl implements IQuotService /** * 新增报价单-产品信息 - * + * * @param quot 报价对象 */ public void insertQuotMaterial(Quot quot) @@ -122,6 +126,7 @@ public class QuotServiceImpl implements IQuotService List list = new ArrayList(); for (QuotMaterial quotMaterial : quotMaterialList) { + quotMaterial.setMatId(UUID.fastUUID().toString()); quotMaterial.setQuotId(quotId); list.add(quotMaterial); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/sysSapUser/domain/SysSapUser.java b/ruoyi-system/src/main/java/com/ruoyi/sysSapUser/domain/SysSapUser.java new file mode 100644 index 0000000..0c9bcab --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/sysSapUser/domain/SysSapUser.java @@ -0,0 +1,93 @@ +package com.ruoyi.sysSapUser.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * SAP账户对象 sys_sap_user + * + * @author ruoyi + * @date 2024-04-02 + */ +public class SysSapUser extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** ID */ + private String sapUserId; + + /** SAP账户 */ + @Excel(name = "SAP账户") + private String sapUserBm; + + /** SAP账户名称 */ + @Excel(name = "SAP账户名称") + private String sapUserName; + + /** 系统账户 */ + @Excel(name = "系统账户") + private String sysUserName; + + /** 系统账户名称 */ + @Excel(name = "系统账户名称") + private String sysUserNickName; + + public void setSapUserId(String sapUserId) + { + this.sapUserId = sapUserId; + } + + public String getSapUserId() + { + return sapUserId; + } + public void setSapUserBm(String sapUserBm) + { + this.sapUserBm = sapUserBm; + } + + public String getSapUserBm() + { + return sapUserBm; + } + public void setSapUserName(String sapUserName) + { + this.sapUserName = sapUserName; + } + + public String getSapUserName() + { + return sapUserName; + } + public void setSysUserName(String sysUserName) + { + this.sysUserName = sysUserName; + } + + public String getSysUserName() + { + return sysUserName; + } + public void setSysUserNickName(String sysUserNickName) + { + this.sysUserNickName = sysUserNickName; + } + + public String getSysUserNickName() + { + return sysUserNickName; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("sapUserId", getSapUserId()) + .append("sapUserBm", getSapUserBm()) + .append("sapUserName", getSapUserName()) + .append("sysUserName", getSysUserName()) + .append("sysUserNickName", getSysUserNickName()) + .toString(); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/sysSapUser/mapper/SysSapUserMapper.java b/ruoyi-system/src/main/java/com/ruoyi/sysSapUser/mapper/SysSapUserMapper.java new file mode 100644 index 0000000..1f6b281 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/sysSapUser/mapper/SysSapUserMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.sysSapUser.mapper; + +import java.util.List; +import com.ruoyi.sysSapUser.domain.SysSapUser; + +/** + * SAP账户Mapper接口 + * + * @author ruoyi + * @date 2024-04-02 + */ +public interface SysSapUserMapper +{ + /** + * 查询SAP账户 + * + * @param sapUserId SAP账户主键 + * @return SAP账户 + */ + public SysSapUser selectSysSapUserBySapUserId(String sapUserId); + + /** + * 查询SAP账户列表 + * + * @param sysSapUser SAP账户 + * @return SAP账户集合 + */ + public List selectSysSapUserList(SysSapUser sysSapUser); + + /** + * 新增SAP账户 + * + * @param sysSapUser SAP账户 + * @return 结果 + */ + public int insertSysSapUser(SysSapUser sysSapUser); + + /** + * 修改SAP账户 + * + * @param sysSapUser SAP账户 + * @return 结果 + */ + public int updateSysSapUser(SysSapUser sysSapUser); + + /** + * 删除SAP账户 + * + * @param sapUserId SAP账户主键 + * @return 结果 + */ + public int deleteSysSapUserBySapUserId(String sapUserId); + + /** + * 批量删除SAP账户 + * + * @param sapUserIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteSysSapUserBySapUserIds(String[] sapUserIds); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/sysSapUser/service/ISysSapUserService.java b/ruoyi-system/src/main/java/com/ruoyi/sysSapUser/service/ISysSapUserService.java new file mode 100644 index 0000000..b57f0bb --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/sysSapUser/service/ISysSapUserService.java @@ -0,0 +1,61 @@ +package com.ruoyi.sysSapUser.service; + +import java.util.List; +import com.ruoyi.sysSapUser.domain.SysSapUser; + +/** + * SAP账户Service接口 + * + * @author ruoyi + * @date 2024-04-02 + */ +public interface ISysSapUserService +{ + /** + * 查询SAP账户 + * + * @param sapUserId SAP账户主键 + * @return SAP账户 + */ + public SysSapUser selectSysSapUserBySapUserId(String sapUserId); + + /** + * 查询SAP账户列表 + * + * @param sysSapUser SAP账户 + * @return SAP账户集合 + */ + public List selectSysSapUserList(SysSapUser sysSapUser); + + /** + * 新增SAP账户 + * + * @param sysSapUser SAP账户 + * @return 结果 + */ + public int insertSysSapUser(SysSapUser sysSapUser); + + /** + * 修改SAP账户 + * + * @param sysSapUser SAP账户 + * @return 结果 + */ + public int updateSysSapUser(SysSapUser sysSapUser); + + /** + * 批量删除SAP账户 + * + * @param sapUserIds 需要删除的SAP账户主键集合 + * @return 结果 + */ + public int deleteSysSapUserBySapUserIds(String[] sapUserIds); + + /** + * 删除SAP账户信息 + * + * @param sapUserId SAP账户主键 + * @return 结果 + */ + public int deleteSysSapUserBySapUserId(String sapUserId); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/sysSapUser/service/impl/SysSapUserServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/sysSapUser/service/impl/SysSapUserServiceImpl.java new file mode 100644 index 0000000..5bd5ec2 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/sysSapUser/service/impl/SysSapUserServiceImpl.java @@ -0,0 +1,93 @@ +package com.ruoyi.sysSapUser.service.impl; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.sysSapUser.mapper.SysSapUserMapper; +import com.ruoyi.sysSapUser.domain.SysSapUser; +import com.ruoyi.sysSapUser.service.ISysSapUserService; + +/** + * SAP账户Service业务层处理 + * + * @author ruoyi + * @date 2024-04-02 + */ +@Service +public class SysSapUserServiceImpl implements ISysSapUserService +{ + @Autowired + private SysSapUserMapper sysSapUserMapper; + + /** + * 查询SAP账户 + * + * @param sapUserId SAP账户主键 + * @return SAP账户 + */ + @Override + public SysSapUser selectSysSapUserBySapUserId(String sapUserId) + { + return sysSapUserMapper.selectSysSapUserBySapUserId(sapUserId); + } + + /** + * 查询SAP账户列表 + * + * @param sysSapUser SAP账户 + * @return SAP账户 + */ + @Override + public List selectSysSapUserList(SysSapUser sysSapUser) + { + return sysSapUserMapper.selectSysSapUserList(sysSapUser); + } + + /** + * 新增SAP账户 + * + * @param sysSapUser SAP账户 + * @return 结果 + */ + @Override + public int insertSysSapUser(SysSapUser sysSapUser) + { + return sysSapUserMapper.insertSysSapUser(sysSapUser); + } + + /** + * 修改SAP账户 + * + * @param sysSapUser SAP账户 + * @return 结果 + */ + @Override + public int updateSysSapUser(SysSapUser sysSapUser) + { + return sysSapUserMapper.updateSysSapUser(sysSapUser); + } + + /** + * 批量删除SAP账户 + * + * @param sapUserIds 需要删除的SAP账户主键 + * @return 结果 + */ + @Override + public int deleteSysSapUserBySapUserIds(String[] sapUserIds) + { + return sysSapUserMapper.deleteSysSapUserBySapUserIds(sapUserIds); + } + + /** + * 删除SAP账户信息 + * + * @param sapUserId SAP账户主键 + * @return 结果 + */ + @Override + public int deleteSysSapUserBySapUserId(String sapUserId) + { + return sysSapUserMapper.deleteSysSapUserBySapUserId(sapUserId); + } +} diff --git a/ruoyi-system/src/main/resources/mapper/customer/CustomerMapper.xml b/ruoyi-system/src/main/resources/mapper/customer/CustomerMapper.xml index 4a13247..bde2603 100644 --- a/ruoyi-system/src/main/resources/mapper/customer/CustomerMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/customer/CustomerMapper.xml @@ -67,7 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and cus_approval_status = #{cusApprovalStatus} ${params.dataScope} - + - and quot_id = #{quotId} + and relation_id = #{relationId} + and file_type = #{fileType} + order by file_time desc @@ -62,6 +69,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and quot_customer_name like concat('%', #{quotCustomerName}, '%') and quot_project like concat('%', #{quotProject}, '%') and quot_approval_status = #{quotApprovalStatus} + + ${params.dataScope} diff --git a/ruoyi-system/src/main/resources/mapper/sysSapUser/SysSapUserMapper.xml b/ruoyi-system/src/main/resources/mapper/sysSapUser/SysSapUserMapper.xml new file mode 100644 index 0000000..2763bc3 --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/sysSapUser/SysSapUserMapper.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + select sap_user_id, sap_user_bm, sap_user_name, sys_user_name, sys_user_nick_name from sys_sap_user + + + + + + + + insert into sys_sap_user + + sap_user_id, + sap_user_bm, + sap_user_name, + sys_user_name, + sys_user_nick_name, + + + #{sapUserId}, + #{sapUserBm}, + #{sapUserName}, + #{sysUserName}, + #{sysUserNickName}, + + + + + update sys_sap_user + + sap_user_bm = #{sapUserBm}, + sap_user_name = #{sapUserName}, + sys_user_name = #{sysUserName}, + sys_user_nick_name = #{sysUserNickName}, + + where sap_user_id = #{sapUserId} + + + + delete from sys_sap_user where sap_user_id = #{sapUserId} + + + + delete from sys_sap_user where sap_user_id in + + #{sapUserId} + + + \ No newline at end of file diff --git a/ruoyi-ui/src/api/quot/quot.js b/ruoyi-ui/src/api/quot/quot.js index df0564d..aaa211c 100644 --- a/ruoyi-ui/src/api/quot/quot.js +++ b/ruoyi-ui/src/api/quot/quot.js @@ -44,11 +44,11 @@ export function delQuot(quotId) { } // 查询附件列表 -export function quotFileList(query) { +export function quotFileList(data) { return request({ url: '/quot/quot/quotFileList', method: 'get', - params: query + data: data }) } diff --git a/ruoyi-ui/src/api/sysSapUser/sysSapUser.js b/ruoyi-ui/src/api/sysSapUser/sysSapUser.js new file mode 100644 index 0000000..1680a64 --- /dev/null +++ b/ruoyi-ui/src/api/sysSapUser/sysSapUser.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询SAP账户列表 +export function listSysSapUser(query) { + return request({ + url: '/sysSapUser/sysSapUser/list', + method: 'get', + params: query + }) +} + +// 查询SAP账户详细 +export function getSysSapUser(sapUserId) { + return request({ + url: '/sysSapUser/sysSapUser/' + sapUserId, + method: 'get' + }) +} + +// 新增SAP账户 +export function addSysSapUser(data) { + return request({ + url: '/sysSapUser/sysSapUser', + method: 'post', + data: data + }) +} + +// 修改SAP账户 +export function updateSysSapUser(data) { + return request({ + url: '/sysSapUser/sysSapUser', + method: 'put', + data: data + }) +} + +// 删除SAP账户 +export function delSysSapUser(sapUserId) { + return request({ + url: '/sysSapUser/sysSapUser/' + sapUserId, + method: 'delete' + }) +} diff --git a/ruoyi-ui/src/store/modules/user.js b/ruoyi-ui/src/store/modules/user.js index 2f13767..8bb4819 100644 --- a/ruoyi-ui/src/store/modules/user.js +++ b/ruoyi-ui/src/store/modules/user.js @@ -87,6 +87,7 @@ const user = { return new Promise((resolve, reject) => { getInfo().then(res => { const user = res.user + const sapUser = res.sapUser //const avatar = (user.avatar == "" || user.avatar == null) ? require("@/assets/images/profile.jpg") : process.env.VUE_APP_BASE_API + user.avatar; const avatar = (user.avatar == "" || user.avatar == null) ? require("@/assets/images/profile.jpg") : user.avatar; if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组 @@ -99,8 +100,8 @@ const user = { commit('SET_NAME', user.userName) commit('SET_AVATAR', avatar) - commit('SET_SAPBM', '4100000058') - commit('SET_SAPUSERNAME', '薛建梅') + commit('SET_SAPBM', sapUser.sapUserBm) + commit('SET_SAPUSERNAME', sapUser.sapUserName) commit('SET_DEPTID', user.dept.deptId) commit('SET_DEPTNAME', user.dept.deptName) resolve(res) diff --git a/ruoyi-ui/src/views/customer/customer/index.vue b/ruoyi-ui/src/views/customer/customer/index.vue index 8afe8be..07db6b5 100644 --- a/ruoyi-ui/src/views/customer/customer/index.vue +++ b/ruoyi-ui/src/views/customer/customer/index.vue @@ -105,7 +105,7 @@ - + diff --git a/ruoyi-ui/src/views/quot/quot/index.vue b/ruoyi-ui/src/views/quot/quot/index.vue index 942abb7..ef27ce7 100644 --- a/ruoyi-ui/src/views/quot/quot/index.vue +++ b/ruoyi-ui/src/views/quot/quot/index.vue @@ -89,21 +89,22 @@ - - + + - - - - - - - - - + + + + + + + +