diff --git a/.idea/workspace.xml b/.idea/workspace.xml index ff81471..b5a3cb3 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,14 +2,23 @@ - - + + + + + + - + + + + + + @@ -18,30 +27,25 @@ - + + - - - + - - - - + + + @@ -78,7 +89,7 @@ - + @@ -91,18 +102,18 @@ + + + - - - + - @@ -140,24 +151,35 @@ - + + + + + - + - - + + @@ -168,51 +190,56 @@ + + + + + - + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + @@ -253,10 +280,10 @@ - - + + - + @@ -272,10 +299,10 @@ - + - + diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/expenses/ExpensesController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/expenses/ExpensesController.java index f56a9fd..9e19969 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/expenses/ExpensesController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/expenses/ExpensesController.java @@ -3,27 +3,31 @@ package com.ruoyi.web.controller.expenses; import java.util.List; import javax.servlet.http.HttpServletResponse; -import com.ruoyi.authorize.domain.Authorize; -import com.ruoyi.authorize.domain.SysOaAuthorize; +import com.ruoyi.common.annotation.DataSource; +import com.ruoyi.common.constant.CacheConstants; import com.ruoyi.common.core.domain.entity.SysDept; +import com.ruoyi.common.core.redis.RedisCache; +import com.ruoyi.common.enums.DataSourceType; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.StringUtils; +import com.ruoyi.common.utils.file.FileUploadUtils; +import com.ruoyi.common.utils.file.MinioUtil; import com.ruoyi.common.utils.uuid.UUID; +import com.ruoyi.expenses.domain.ExpensesFile; +import com.ruoyi.expenses.domain.OaOfficeStaff; import com.ruoyi.expenses.domain.SysOaExpenses; +import com.ruoyi.expenses.service.IExpensesFileService; import com.ruoyi.framework.changeRecord.ChangeRecordLog; +import com.ruoyi.redBook.domain.OAQuot; +import com.ruoyi.redBook.domain.RbVersionDateResult; +import com.ruoyi.system.service.ISysConfigService; import com.ruoyi.system.service.ISysDeptService; import com.ruoyi.system.service.ISysUserService; +import org.apache.commons.collections.CollectionUtils; 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 org.springframework.web.bind.annotation.*; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; @@ -32,6 +36,7 @@ import com.ruoyi.expenses.domain.Expenses; import com.ruoyi.expenses.service.IExpensesService; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.core.page.TableDataInfo; +import org.springframework.web.multipart.MultipartFile; /** * 费用支出Controller @@ -43,9 +48,18 @@ import com.ruoyi.common.core.page.TableDataInfo; @RequestMapping("/expenses/expenses") public class ExpensesController extends BaseController { + @Autowired + private RedisCache redisCache; + + @Autowired + private ISysConfigService configService; + @Autowired private IExpensesService expensesService; + @Autowired + private IExpensesFileService expensesFileService; + @Autowired private ISysUserService userService; @@ -192,6 +206,13 @@ public class ExpensesController extends BaseController public AjaxResult commitExp(@RequestBody Expenses expenses) { try{ + //驳回再次提交不生成新编号 + String expApprovalStatus = expenses.getExpApprovalStatus(); + if(!"3".equals(expApprovalStatus)){ + String doaNumber = expensesService.getCodeExp("FZ"); + expenses.setExpNumber(doaNumber); + } + expenses.setExpApprovalStatus("1"); Long deptId = getLoginUser().getUser().getDeptId(); // 获取用户角色 --判断是否有新建权限 @@ -202,9 +223,6 @@ public class ExpensesController extends BaseController SysDept sysDept = deptService.selectDeptById(deptId); String doa_id = expenses.getExpId(); - String doaNumber = expensesService.getCodeExp("FZ"); - expenses.setExpNumber(doaNumber); - if(StringUtils.isEmpty(doa_id)){ expenses.setExpId(UUID.fastUUID().toString()); String doaCode = expensesService.getCode("TBFYZC"); @@ -258,9 +276,9 @@ public class ExpensesController extends BaseController return error("已提交OA审批中,请勿重复操作"); } - // 投标提交OA,插入中间表 sys_oa_authorize + // 投标提交OA,插入中间表 sys_oa_expenses SysOaExpenses sysOaExpenses = new SysOaExpenses(); - SysOaAuthorize oauser = expensesService.selectOAUserByUserName(getUsername());// 查询OA用户 + SysOaExpenses oauser = expensesService.selectOAUserByUserName(getUsername());// 查询OA用户 if(oauser==null){ return error("该账户:"+getUsername()+"在OA中不存在"); } @@ -301,6 +319,77 @@ public class ExpensesController extends BaseController return success(); } + /** + * 上传费用支出附件 + * @param file 文件对象 + * @param relation_id 关联业务表Id + * @param file_type 文件类别 + * @return + * @throws Exception + */ + @PreAuthorize("@ss.hasAnyPermi('expenses:expenses:expensesYwyFile')") + @Log(title = "上传费用支出附件", businessType = BusinessType.INSERT) + @PostMapping("/expFile") + public AjaxResult expFile(@RequestParam("expensesFile") MultipartFile file, @RequestParam("relation_id") String relation_id, @RequestParam("file_type") String file_type) throws Exception + { + if(!StringUtils.isEmpty(relation_id)){ + if (!file.isEmpty()) + { + ExpensesFile expensesFile= new ExpensesFile(); + expensesFile.setFileId(UUID.fastUUID().toString()); + + String url = FileUploadUtils.uploadMinio(file,"expenses-manage", "expenses/"+relation_id); + int index = url.lastIndexOf("/")+1; + String fileName = url.substring(index);//获取文件名 + + int index2 = url.indexOf("/expenses/"); + String fileBucketName = url.substring(index2);//获取文件对应文件服务器中地址-供后面删除功能用 + + expensesFile.setFileName(fileName); + expensesFile.setFileBucketName(fileBucketName); + expensesFile.setFileUrl(url); + expensesFile.setFileSize(file.getSize()); + expensesFile.setFileTime(DateUtils.getTime()); + expensesFile.setFileType(file_type); + expensesFile.setRelationId(relation_id); + expensesFileService.insertExpensesFile(expensesFile); + } + }else{ + return error("系统异常,投标单号为空!"); + } + return success("上传成功!"); + } + + /** + * 查询附件列表 + */ + @PreAuthorize("@ss.hasAnyPermi('expenses:expenses:list')") + @GetMapping("/expensesFileList") + public TableDataInfo expensesFileList(ExpensesFile expensesFile) + { + startPage(); + List list = expensesFileService.selectExpensesFileList(expensesFile); + return getDataTable(list); + } + + /** + * 删除附件列表 + */ + @PreAuthorize("@ss.hasAnyPermi('expenses:expenses:expensesYwyFile')") + @Log(title = "删除费用支出附件列表", businessType = BusinessType.DELETE) + @PostMapping("/expensesFileDelete") + public AjaxResult expensesFileDelete(ExpensesFile expensesFile) { + String fileId = expensesFile.getFileId(); + try { + ExpensesFile expensesfile = expensesFileService.selectExpensesFileByFileId(fileId); + expensesFileService.deleteExpensesFileByFileId(fileId);//删除文件记录 + MinioUtil.removeObject("expenses-manage", expensesfile.getFileBucketName());//删除文件服务器对应文件 + }catch(Exception e){ + return error("系统异常!"); + } + return success(); + } + /** * 删除费用支出 */ @@ -321,4 +410,34 @@ public class ExpensesController extends BaseController } return toAjax(expensesService.deleteExpensesByExpIds(expIds)); } + + + /** + * 获取OA内勤人员 + * @param oaOfficeStaff + * @return + */ + @GetMapping("/oaOfficeStaff") + public AjaxResult oaOfficeStaff(OaOfficeStaff oaOfficeStaff) + { + AjaxResult ajax = AjaxResult.success(); + + List resCache = redisCache.getCacheObject(getCacheKey("officeStaff")); + if(CollectionUtils.isEmpty(resCache)){ + resCache = expensesService.oaOfficeStaff(); + redisCache.setCacheObject(getCacheKey("officeStaff"),resCache); + } + ajax.put("officeStaff", resCache); + return ajax; + } + + /** + * 获取redis OA内勤人员 + * @param type + * @return + */ + private String getCacheKey(String type) + { + return CacheConstants.OA_OFFICE_STAFF + type; + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/CacheController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/CacheController.java index 21c3a56..44c39d8 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/CacheController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/CacheController.java @@ -42,6 +42,7 @@ public class CacheController caches.add(new SysCache(CacheConstants.SAP_COMMON, "SAP公共数据")); caches.add(new SysCache(CacheConstants.RB_VERSION_DATE, "调价版本")); + caches.add(new SysCache(CacheConstants.OA_OFFICE_STAFF, "OA内勤人员")); caches.add(new SysCache(CacheConstants.QCC_CUS, "企查查客户查询次数")); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zgys/ZgysController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zgys/ZgysController.java index f3cfca8..e0fd4d4 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zgys/ZgysController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zgys/ZgysController.java @@ -164,6 +164,13 @@ public class ZgysController extends BaseController public AjaxResult commitZgys(@RequestBody Zgys zgys) { try{ + //驳回再次提交不生成新编号 + String pqApprovalStatus = zgys.getPqApprovalStatus(); + if(!"3".equals(pqApprovalStatus)){ + String pqNumber = zgysService.getCodePQ("Z"); + zgys.setPqNumber(pqNumber); + } + zgys.setPqApprovalStatus("1"); Long deptId = getLoginUser().getUser().getDeptId(); // 获取用户角色 --判断是否有新建权限 @@ -174,9 +181,6 @@ public class ZgysController extends BaseController SysDept sysDept = deptService.selectDeptById(deptId); String pq_id = zgys.getPqId(); - String pqNumber = zgysService.getCodePQ("Z"); - zgys.setPqNumber(pqNumber); - if(StringUtils.isEmpty(pq_id)){ zgys.setPqId(UUID.fastUUID().toString()); String pqCode = zgysService.getCode("ZGYS"); diff --git a/ruoyi-admin/target/classes/com/ruoyi/web/controller/expenses/ExpensesController.class b/ruoyi-admin/target/classes/com/ruoyi/web/controller/expenses/ExpensesController.class index efb56a9..5a65c20 100644 Binary files a/ruoyi-admin/target/classes/com/ruoyi/web/controller/expenses/ExpensesController.class and b/ruoyi-admin/target/classes/com/ruoyi/web/controller/expenses/ExpensesController.class differ diff --git a/ruoyi-admin/target/classes/com/ruoyi/web/controller/monitor/CacheController.class b/ruoyi-admin/target/classes/com/ruoyi/web/controller/monitor/CacheController.class index b0c5d47..187e567 100644 Binary files a/ruoyi-admin/target/classes/com/ruoyi/web/controller/monitor/CacheController.class and b/ruoyi-admin/target/classes/com/ruoyi/web/controller/monitor/CacheController.class differ diff --git a/ruoyi-admin/target/classes/com/ruoyi/web/controller/zgys/ZgysController.class b/ruoyi-admin/target/classes/com/ruoyi/web/controller/zgys/ZgysController.class index effab13..3493ddb 100644 Binary files a/ruoyi-admin/target/classes/com/ruoyi/web/controller/zgys/ZgysController.class and b/ruoyi-admin/target/classes/com/ruoyi/web/controller/zgys/ZgysController.class differ diff --git a/ruoyi-admin/target/maven-archiver/pom.properties b/ruoyi-admin/target/maven-archiver/pom.properties index a6dc633..12cc1f6 100644 --- a/ruoyi-admin/target/maven-archiver/pom.properties +++ b/ruoyi-admin/target/maven-archiver/pom.properties @@ -1,5 +1,5 @@ #Generated by Maven -#Mon Aug 12 16:20:22 CST 2024 +#Tue Aug 13 10:48:11 CST 2024 version=3.8.7 groupId=com.ruoyi artifactId=ruoyi-admin diff --git a/ruoyi-admin/target/ruoyi-admin.jar b/ruoyi-admin/target/ruoyi-admin.jar index 90377cc..5d5345c 100644 Binary files a/ruoyi-admin/target/ruoyi-admin.jar and b/ruoyi-admin/target/ruoyi-admin.jar differ diff --git a/ruoyi-admin/target/ruoyi-admin.jar.original b/ruoyi-admin/target/ruoyi-admin.jar.original index 8ca95aa..b2aaac6 100644 Binary files a/ruoyi-admin/target/ruoyi-admin.jar.original and b/ruoyi-admin/target/ruoyi-admin.jar.original differ diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/constant/CacheConstants.java b/ruoyi-common/src/main/java/com/ruoyi/common/constant/CacheConstants.java index 36fbaad..121e8f1 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/constant/CacheConstants.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/constant/CacheConstants.java @@ -71,4 +71,9 @@ public class CacheConstants * 企查查客户查询次数 */ public static final String QCC_CUS = "qcc_cus:"; + + /** + * OA内勤人员 + */ + public static final String OA_OFFICE_STAFF = "oa_office_staff:"; } diff --git a/ruoyi-common/target/classes/com/ruoyi/common/constant/CacheConstants.class b/ruoyi-common/target/classes/com/ruoyi/common/constant/CacheConstants.class index ee81279..622d462 100644 Binary files a/ruoyi-common/target/classes/com/ruoyi/common/constant/CacheConstants.class and b/ruoyi-common/target/classes/com/ruoyi/common/constant/CacheConstants.class differ diff --git a/ruoyi-common/target/maven-archiver/pom.properties b/ruoyi-common/target/maven-archiver/pom.properties index 6be1847..4a8f934 100644 --- a/ruoyi-common/target/maven-archiver/pom.properties +++ b/ruoyi-common/target/maven-archiver/pom.properties @@ -1,5 +1,5 @@ #Generated by Maven -#Mon Aug 12 16:20:04 CST 2024 +#Tue Aug 13 10:47:54 CST 2024 version=3.8.7 groupId=com.ruoyi artifactId=ruoyi-common diff --git a/ruoyi-common/target/ruoyi-common-3.8.7.jar b/ruoyi-common/target/ruoyi-common-3.8.7.jar index 4dd8af8..7df350e 100644 Binary files a/ruoyi-common/target/ruoyi-common-3.8.7.jar and b/ruoyi-common/target/ruoyi-common-3.8.7.jar differ diff --git a/ruoyi-framework/target/maven-archiver/pom.properties b/ruoyi-framework/target/maven-archiver/pom.properties index aa15b9c..b9172e1 100644 --- a/ruoyi-framework/target/maven-archiver/pom.properties +++ b/ruoyi-framework/target/maven-archiver/pom.properties @@ -1,5 +1,5 @@ #Generated by Maven -#Mon Aug 12 16:20:14 CST 2024 +#Tue Aug 13 10:48:03 CST 2024 version=3.8.7 groupId=com.ruoyi artifactId=ruoyi-framework diff --git a/ruoyi-framework/target/ruoyi-framework-3.8.7.jar b/ruoyi-framework/target/ruoyi-framework-3.8.7.jar index be9f045..ad74196 100644 Binary files a/ruoyi-framework/target/ruoyi-framework-3.8.7.jar and b/ruoyi-framework/target/ruoyi-framework-3.8.7.jar differ diff --git a/ruoyi-generator/target/maven-archiver/pom.properties b/ruoyi-generator/target/maven-archiver/pom.properties index 4d5bc1a..3081d1a 100644 --- a/ruoyi-generator/target/maven-archiver/pom.properties +++ b/ruoyi-generator/target/maven-archiver/pom.properties @@ -1,5 +1,5 @@ #Generated by Maven -#Mon Aug 12 16:20:16 CST 2024 +#Tue Aug 13 10:48:05 CST 2024 version=3.8.7 groupId=com.ruoyi artifactId=ruoyi-generator diff --git a/ruoyi-generator/target/ruoyi-generator-3.8.7.jar b/ruoyi-generator/target/ruoyi-generator-3.8.7.jar index 0d4a015..48ce098 100644 Binary files a/ruoyi-generator/target/ruoyi-generator-3.8.7.jar and b/ruoyi-generator/target/ruoyi-generator-3.8.7.jar differ diff --git a/ruoyi-quartz/target/maven-archiver/pom.properties b/ruoyi-quartz/target/maven-archiver/pom.properties index 84795a4..5110d00 100644 --- a/ruoyi-quartz/target/maven-archiver/pom.properties +++ b/ruoyi-quartz/target/maven-archiver/pom.properties @@ -1,5 +1,5 @@ #Generated by Maven -#Mon Aug 12 16:20:15 CST 2024 +#Tue Aug 13 10:48:04 CST 2024 version=3.8.7 groupId=com.ruoyi artifactId=ruoyi-quartz diff --git a/ruoyi-quartz/target/ruoyi-quartz-3.8.7.jar b/ruoyi-quartz/target/ruoyi-quartz-3.8.7.jar index 1caf64f..fff3ad1 100644 Binary files a/ruoyi-quartz/target/ruoyi-quartz-3.8.7.jar and b/ruoyi-quartz/target/ruoyi-quartz-3.8.7.jar differ diff --git a/ruoyi-system/src/main/java/com/ruoyi/authorize/domain/AuthorizeFile.java b/ruoyi-system/src/main/java/com/ruoyi/authorize/domain/AuthorizeFile.java index c109f56..6d7683e 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/authorize/domain/AuthorizeFile.java +++ b/ruoyi-system/src/main/java/com/ruoyi/authorize/domain/AuthorizeFile.java @@ -5,7 +5,7 @@ import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; /** - * 授权备案信息-文件对象 bid_file + * 授权备案信息-文件对象 authorize_file * * @author ruoyi * @date 2024-04-01 diff --git a/ruoyi-system/src/main/java/com/ruoyi/expenses/domain/Expenses.java b/ruoyi-system/src/main/java/com/ruoyi/expenses/domain/Expenses.java index b4042e6..d0b42ac 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/expenses/domain/Expenses.java +++ b/ruoyi-system/src/main/java/com/ruoyi/expenses/domain/Expenses.java @@ -96,6 +96,8 @@ public class Expenses extends BaseEntity /** 选择内勤 */ @DataName(name = "选择内勤") private String expBackOffice; + /** 选择内勤ID */ + private String expBackOfficeId; /** 业务员账号 */ private String expSalesmanCode; @@ -325,6 +327,9 @@ public class Expenses extends BaseEntity { return expBackOffice; } + public String getExpBackOfficeId() { return expBackOfficeId; } + + public void setExpBackOfficeId(String expBackOfficeId) { this.expBackOfficeId = expBackOfficeId; } public void setExpSalesmanCode(String expSalesmanCode) { this.expSalesmanCode = expSalesmanCode; diff --git a/ruoyi-system/src/main/java/com/ruoyi/expenses/domain/ExpensesFile.java b/ruoyi-system/src/main/java/com/ruoyi/expenses/domain/ExpensesFile.java new file mode 100644 index 0000000..9eebcf4 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/expenses/domain/ExpensesFile.java @@ -0,0 +1,113 @@ +package com.ruoyi.expenses.domain; + +import com.ruoyi.common.core.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 费用支出信息-文件对象 expenses_file + * + * @author ruoyi + * @date 2024-04-01 + */ +public class ExpensesFile extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** */ + private String fileId; + + /** 文件名称 */ + private String fileName; + + /** MINIO文件名称 */ + private String fileBucketName; + + /** 文件地址 */ + private String fileUrl; + + /** 文件大小 */ + private Long fileSize; + + /** 上传时间 */ + private String fileTime; + + /** 类别 */ + private String fileType; + + /** */ + private String relationId; + + public void setFileId(String fileId) + { + this.fileId = fileId; + } + + public String getFileId() + { + return fileId; + } + public void setFileName(String fileName) + { + this.fileName = fileName; + } + + public String getFileName() + { + return fileName; + } + public String getFileBucketName() {return fileBucketName;} + + public void setFileBucketName(String fileBucketName) {this.fileBucketName = fileBucketName;} + public void setFileUrl(String fileUrl) + { + this.fileUrl = fileUrl; + } + + public String getFileUrl() + { + return fileUrl; + } + public void setFileSize(Long fileSize) + { + this.fileSize = fileSize; + } + + public Long getFileSize() + { + return fileSize; + } + public void setFileTime(String fileTime) + { + this.fileTime = fileTime; + } + + public String getFileTime() + { + return fileTime; + } + public String getFileType() {return fileType;} + + public void setFileType(String fileType) {this.fileType = fileType;} + public void setRelationId(String relationId) + { + this.relationId = relationId; + } + + public String getRelationId() + { + return relationId; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("fileId", getFileId()) + .append("fileName", getFileName()) + .append("fileUrl", getFileUrl()) + .append("fileSize", getFileSize()) + .append("fileTime", getFileTime()) + .append("relationId", getRelationId()) + .toString(); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/expenses/domain/OaOfficeStaff.java b/ruoyi-system/src/main/java/com/ruoyi/expenses/domain/OaOfficeStaff.java new file mode 100644 index 0000000..d48547c --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/expenses/domain/OaOfficeStaff.java @@ -0,0 +1,28 @@ +package com.ruoyi.expenses.domain; + +/** + * OA内勤人员对象 oaOfficeStaff + * + * @author ruoyi + * @date 2024-07-30 + */ +public class OaOfficeStaff { + private String expBackOfficeId;//OA员工id + private String expBackOffice;//OA员工名字 + + public String getExpBackOfficeId() { + return expBackOfficeId; + } + + public void setExpBackOfficeId(String expBackOfficeId) { + this.expBackOfficeId = expBackOfficeId; + } + + public String getExpBackOffice() { + return expBackOffice; + } + + public void setExpBackOffice(String expBackOffice) { + this.expBackOffice = expBackOffice; + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/expenses/mapper/ExpensesFileMapper.java b/ruoyi-system/src/main/java/com/ruoyi/expenses/mapper/ExpensesFileMapper.java new file mode 100644 index 0000000..c4d8151 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/expenses/mapper/ExpensesFileMapper.java @@ -0,0 +1,46 @@ +package com.ruoyi.expenses.mapper; + +import com.ruoyi.expenses.domain.ExpensesFile; + +import java.util.List; + +/** + * 费用支出信息-文件Mapper接口 + * + * @author ruoyi + * @date 2024-04-01 + */ +public interface ExpensesFileMapper +{ + /** + * 查询费用支出信息-文件 + * + * @param fileId 费用支出信息-文件主键 + * @return 费用支出信息-文件 + */ + public ExpensesFile selectExpensesFileByFileId(String fileId); + + /** + * 查询费用支出信息-文件列表 + * + * @param expensesFile 费用支出信息-文件 + * @return 费用支出信息-文件集合 + */ + public List selectExpensesFileList(ExpensesFile expensesFile); + + /** + * 新增费用支出信息-文件 + * + * @param expensesFile 费用支出信息-文件 + * @return 结果 + */ + public int insertExpensesFile(ExpensesFile expensesFile); + + /** + * 删除费用支出信息-文件 + * + * @param fileId 费用支出信息-文件主键 + * @return 结果 + */ + public int deleteExpensesFileByFileId(String fileId); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/expenses/mapper/ExpensesMapper.java b/ruoyi-system/src/main/java/com/ruoyi/expenses/mapper/ExpensesMapper.java index 15db696..b23ae2f 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/expenses/mapper/ExpensesMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/expenses/mapper/ExpensesMapper.java @@ -1,10 +1,9 @@ package com.ruoyi.expenses.mapper; import java.util.List; - -import com.ruoyi.authorize.domain.SysOaAuthorize; -import com.ruoyi.common.core.domain.entity.SysDept; import com.ruoyi.expenses.domain.Expenses; +import com.ruoyi.expenses.domain.OaOfficeStaff; +import com.ruoyi.expenses.domain.SysOaExpenses; /** * 费用支出Mapper接口 @@ -80,5 +79,11 @@ public interface ExpensesMapper * 查询OA用户 * @return */ - SysOaAuthorize selectOAUserByUserName(String loginid); + SysOaExpenses selectOAUserByUserName(String loginid); + + /** + * 获取 OA内勤人员 + * @return + */ + List oaOfficeStaff(); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/expenses/service/IExpensesFileService.java b/ruoyi-system/src/main/java/com/ruoyi/expenses/service/IExpensesFileService.java new file mode 100644 index 0000000..804164e --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/expenses/service/IExpensesFileService.java @@ -0,0 +1,47 @@ +package com.ruoyi.expenses.service; + +import com.ruoyi.expenses.domain.ExpensesFile; + +import java.util.List; + +/** + * 费用支出信息-文件Service接口 + * + * @author ruoyi + * @date 2024-04-01 + */ +public interface IExpensesFileService +{ + + /** + * 查询费用支出单-文件 + * + * @param fileId 费用支出单-文件主键 + * @return 费用支出单-文件 + */ + public ExpensesFile selectExpensesFileByFileId(String fileId); + + /** + * 查询费用支出单-文件列表 + * + * @param bidFile 费用支出单-文件 + * @return 费用支出单-文件集合 + */ + public List selectExpensesFileList(ExpensesFile bidFile); + + /** + * 新增费用支出单-文件 + * + * @param expensesFile 费用支出单-文件 + * @return 结果 + */ + public int insertExpensesFile(ExpensesFile expensesFile); + + /** + * 删除费用支出单-文件信息 + * + * @param fileId 费用支出单-文件主键 + * @return 结果 + */ + public int deleteExpensesFileByFileId(String fileId); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/expenses/service/IExpensesService.java b/ruoyi-system/src/main/java/com/ruoyi/expenses/service/IExpensesService.java index e08820a..fc7c832 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/expenses/service/IExpensesService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/expenses/service/IExpensesService.java @@ -1,10 +1,9 @@ package com.ruoyi.expenses.service; import java.util.List; - -import com.ruoyi.authorize.domain.SysOaAuthorize; -import com.ruoyi.common.core.domain.entity.SysDept; import com.ruoyi.expenses.domain.Expenses; +import com.ruoyi.expenses.domain.OaOfficeStaff; +import com.ruoyi.expenses.domain.SysOaExpenses; /** * 费用支出Service接口 @@ -80,5 +79,11 @@ public interface IExpensesService * 查询OA用户 * @return */ - SysOaAuthorize selectOAUserByUserName(String username); + SysOaExpenses selectOAUserByUserName(String username); + + /** + * 获取 OA内勤人员 + * @return + */ + List oaOfficeStaff(); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/expenses/service/impl/ExpensesFileServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/expenses/service/impl/ExpensesFileServiceImpl.java new file mode 100644 index 0000000..2cbb083 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/expenses/service/impl/ExpensesFileServiceImpl.java @@ -0,0 +1,74 @@ +package com.ruoyi.expenses.service.impl; + +import com.ruoyi.expenses.domain.ExpensesFile; +import com.ruoyi.expenses.mapper.ExpensesFileMapper; +import com.ruoyi.expenses.service.IExpensesFileService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; + +/** + * 费用支出信息-文件Service业务层处理 + * + * @author ruoyi + * @date 2024-04-01 + */ +@Service +public class ExpensesFileServiceImpl implements IExpensesFileService +{ + @Autowired + private ExpensesFileMapper expensesFileMapper; + + /** + * 查询费用支出单-文件 + * + * @param fileId 费用支出单-文件主键 + * @return 费用支出单-文件 + */ + @Override + public ExpensesFile selectExpensesFileByFileId(String fileId) + { + return expensesFileMapper.selectExpensesFileByFileId(fileId); + } + + + /** + * 查询费用支出单-文件列表 + * + * @param expensesFile 费用支出单-文件 + * @return 费用支出单-文件 + */ + @Override + public List selectExpensesFileList(ExpensesFile expensesFile) + { + return expensesFileMapper.selectExpensesFileList(expensesFile); + } + + /** + * 新增费用支出单-文件 + * + * @param expensesFile 费用支出单-文件 + * @return 结果 + */ + @Override + @Transactional + public int insertExpensesFile(ExpensesFile expensesFile) + { + return expensesFileMapper.insertExpensesFile(expensesFile); + } + + /** + * 删除费用支出单-文件信息 + * + * @param fileId 费用支出单-文件主键 + * @return 结果 + */ + @Override + @Transactional + public int deleteExpensesFileByFileId(String fileId) + { + return expensesFileMapper.deleteExpensesFileByFileId(fileId); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/expenses/service/impl/ExpensesServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/expenses/service/impl/ExpensesServiceImpl.java index 572d338..fff1240 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/expenses/service/impl/ExpensesServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/expenses/service/impl/ExpensesServiceImpl.java @@ -1,13 +1,12 @@ package com.ruoyi.expenses.service.impl; import java.util.List; - -import com.ruoyi.authorize.domain.SysOaAuthorize; import com.ruoyi.common.annotation.DataScope; import com.ruoyi.common.annotation.DataSource; -import com.ruoyi.common.core.domain.entity.SysDept; import com.ruoyi.common.enums.DataSourceType; import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.expenses.domain.OaOfficeStaff; +import com.ruoyi.expenses.domain.SysOaExpenses; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.expenses.mapper.ExpensesMapper; @@ -130,7 +129,17 @@ public class ExpensesServiceImpl implements IExpensesService */ @DataSource(DataSourceType.OA) @Override - public SysOaAuthorize selectOAUserByUserName(String loginid) { + public SysOaExpenses selectOAUserByUserName(String loginid) { return expensesMapper.selectOAUserByUserName(loginid); } + + /** + * 获取 OA内勤人员 + * @return + */ + @DataSource(DataSourceType.OA) + @Override + public List oaOfficeStaff() { + return expensesMapper.oaOfficeStaff(); + } } diff --git a/ruoyi-system/src/main/resources/mapper/expenses/ExpensesFileMapper.xml b/ruoyi-system/src/main/resources/mapper/expenses/ExpensesFileMapper.xml new file mode 100644 index 0000000..2afa7ff --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/expenses/ExpensesFileMapper.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + select file_id, file_name, file_bucket_name, file_url, file_size, file_time, file_type, relation_id from expenses_file + + + + + + + + insert into expenses_file + + file_id, + file_name, + file_bucket_name, + file_url, + file_size, + file_time, + file_type, + relation_id, + + + #{fileId}, + #{fileName}, + #{fileBucketName}, + #{fileUrl}, + #{fileSize}, + #{fileTime}, + #{fileType}, + #{relationId}, + + + + + delete from expenses_file where file_id = #{fileId} + + diff --git a/ruoyi-system/src/main/resources/mapper/expenses/ExpensesMapper.xml b/ruoyi-system/src/main/resources/mapper/expenses/ExpensesMapper.xml index f52a993..7c8b199 100644 --- a/ruoyi-system/src/main/resources/mapper/expenses/ExpensesMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/expenses/ExpensesMapper.xml @@ -23,6 +23,7 @@ + @@ -57,7 +58,7 @@ select a.exp_id, a.exp_code, a.exp_pq_code, a.exp_number, a.exp_bid_code, a.exp_expenditure_mode, a.exp_customer_bm, a.exp_customer_name, a.exp_expenditure_people, a.exp_project, a.exp_return_date, a.exp_expenditure_type, a.exp_expenditure_amount, a.exp_bid_area, a.exp_expenditure_date, - a.exp_expenditure_amount_uppercase, a.exp_staff_tureorfales, a.exp_back_office, + a.exp_expenditure_amount_uppercase, a.exp_staff_tureorfales, a.exp_back_office,a.exp_back_office_id, a.exp_salesman_code, a.exp_salesman_bm, a.exp_salesman_name, a.exp_salesman_dept_id, a.exp_salesman_dept_name, a.exp_dispatch_status, a.exp_account_name, a.exp_account_number, a.exp_deposit_bank, a.exp_line_number_and_othres, a.exp_request_remark, a.exp_return_remark, @@ -114,6 +115,7 @@ exp_expenditure_amount_uppercase, exp_staff_tureorfales, exp_back_office, + exp_back_office_id, exp_salesman_code, exp_salesman_bm, exp_salesman_name, @@ -156,6 +158,7 @@ #{expExpenditureAmountUppercase}, #{expStaffTureorfales}, #{expBackOffice}, + #{expBackOfficeId}, #{expSalesmanCode}, #{expSalesmanBm}, #{expSalesmanName}, @@ -201,6 +204,7 @@ exp_expenditure_amount_uppercase = #{expExpenditureAmountUppercase}, exp_staff_tureorfales = #{expStaffTureorfales}, exp_back_office = #{expBackOffice}, + exp_back_office_id = #{expBackOfficeId}, exp_salesman_code = #{expSalesmanCode}, exp_salesman_bm = #{expSalesmanBm}, exp_salesman_name = #{expSalesmanName}, @@ -245,7 +249,15 @@ {call GetSerialNo_Business(#{type,mode=IN,jdbcType=VARCHAR})} - select top 1 id as userId,departmentid as departmentId from HrmResource where loginid = #{loginid} + + + diff --git a/ruoyi-system/target/classes/com/ruoyi/expenses/domain/Expenses.class b/ruoyi-system/target/classes/com/ruoyi/expenses/domain/Expenses.class index 676e371..19a3b08 100644 Binary files a/ruoyi-system/target/classes/com/ruoyi/expenses/domain/Expenses.class and b/ruoyi-system/target/classes/com/ruoyi/expenses/domain/Expenses.class differ diff --git a/ruoyi-system/target/classes/com/ruoyi/expenses/domain/ExpensesFile.class b/ruoyi-system/target/classes/com/ruoyi/expenses/domain/ExpensesFile.class new file mode 100644 index 0000000..13518aa Binary files /dev/null and b/ruoyi-system/target/classes/com/ruoyi/expenses/domain/ExpensesFile.class differ diff --git a/ruoyi-system/target/classes/com/ruoyi/expenses/domain/OaOfficeStaff.class b/ruoyi-system/target/classes/com/ruoyi/expenses/domain/OaOfficeStaff.class new file mode 100644 index 0000000..9f3743d Binary files /dev/null and b/ruoyi-system/target/classes/com/ruoyi/expenses/domain/OaOfficeStaff.class differ diff --git a/ruoyi-system/target/classes/com/ruoyi/expenses/mapper/ExpensesFileMapper.class b/ruoyi-system/target/classes/com/ruoyi/expenses/mapper/ExpensesFileMapper.class new file mode 100644 index 0000000..ba8cc7b Binary files /dev/null and b/ruoyi-system/target/classes/com/ruoyi/expenses/mapper/ExpensesFileMapper.class differ diff --git a/ruoyi-system/target/classes/com/ruoyi/expenses/mapper/ExpensesMapper.class b/ruoyi-system/target/classes/com/ruoyi/expenses/mapper/ExpensesMapper.class index ece0066..89c956b 100644 Binary files a/ruoyi-system/target/classes/com/ruoyi/expenses/mapper/ExpensesMapper.class and b/ruoyi-system/target/classes/com/ruoyi/expenses/mapper/ExpensesMapper.class differ diff --git a/ruoyi-system/target/classes/com/ruoyi/expenses/service/IExpensesFileService.class b/ruoyi-system/target/classes/com/ruoyi/expenses/service/IExpensesFileService.class new file mode 100644 index 0000000..a09e995 Binary files /dev/null and b/ruoyi-system/target/classes/com/ruoyi/expenses/service/IExpensesFileService.class differ diff --git a/ruoyi-system/target/classes/com/ruoyi/expenses/service/IExpensesService.class b/ruoyi-system/target/classes/com/ruoyi/expenses/service/IExpensesService.class index 51fa5df..afb2727 100644 Binary files a/ruoyi-system/target/classes/com/ruoyi/expenses/service/IExpensesService.class and b/ruoyi-system/target/classes/com/ruoyi/expenses/service/IExpensesService.class differ diff --git a/ruoyi-system/target/classes/com/ruoyi/expenses/service/impl/ExpensesFileServiceImpl.class b/ruoyi-system/target/classes/com/ruoyi/expenses/service/impl/ExpensesFileServiceImpl.class new file mode 100644 index 0000000..8e3611f Binary files /dev/null and b/ruoyi-system/target/classes/com/ruoyi/expenses/service/impl/ExpensesFileServiceImpl.class differ diff --git a/ruoyi-system/target/classes/com/ruoyi/expenses/service/impl/ExpensesServiceImpl.class b/ruoyi-system/target/classes/com/ruoyi/expenses/service/impl/ExpensesServiceImpl.class index f109428..ab59a85 100644 Binary files a/ruoyi-system/target/classes/com/ruoyi/expenses/service/impl/ExpensesServiceImpl.class and b/ruoyi-system/target/classes/com/ruoyi/expenses/service/impl/ExpensesServiceImpl.class differ diff --git a/ruoyi-system/target/classes/mapper/expenses/ExpensesFileMapper.xml b/ruoyi-system/target/classes/mapper/expenses/ExpensesFileMapper.xml new file mode 100644 index 0000000..2afa7ff --- /dev/null +++ b/ruoyi-system/target/classes/mapper/expenses/ExpensesFileMapper.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + select file_id, file_name, file_bucket_name, file_url, file_size, file_time, file_type, relation_id from expenses_file + + + + + + + + insert into expenses_file + + file_id, + file_name, + file_bucket_name, + file_url, + file_size, + file_time, + file_type, + relation_id, + + + #{fileId}, + #{fileName}, + #{fileBucketName}, + #{fileUrl}, + #{fileSize}, + #{fileTime}, + #{fileType}, + #{relationId}, + + + + + delete from expenses_file where file_id = #{fileId} + + diff --git a/ruoyi-system/target/classes/mapper/expenses/ExpensesMapper.xml b/ruoyi-system/target/classes/mapper/expenses/ExpensesMapper.xml index f52a993..7c8b199 100644 --- a/ruoyi-system/target/classes/mapper/expenses/ExpensesMapper.xml +++ b/ruoyi-system/target/classes/mapper/expenses/ExpensesMapper.xml @@ -23,6 +23,7 @@ + @@ -57,7 +58,7 @@ select a.exp_id, a.exp_code, a.exp_pq_code, a.exp_number, a.exp_bid_code, a.exp_expenditure_mode, a.exp_customer_bm, a.exp_customer_name, a.exp_expenditure_people, a.exp_project, a.exp_return_date, a.exp_expenditure_type, a.exp_expenditure_amount, a.exp_bid_area, a.exp_expenditure_date, - a.exp_expenditure_amount_uppercase, a.exp_staff_tureorfales, a.exp_back_office, + a.exp_expenditure_amount_uppercase, a.exp_staff_tureorfales, a.exp_back_office,a.exp_back_office_id, a.exp_salesman_code, a.exp_salesman_bm, a.exp_salesman_name, a.exp_salesman_dept_id, a.exp_salesman_dept_name, a.exp_dispatch_status, a.exp_account_name, a.exp_account_number, a.exp_deposit_bank, a.exp_line_number_and_othres, a.exp_request_remark, a.exp_return_remark, @@ -114,6 +115,7 @@ exp_expenditure_amount_uppercase, exp_staff_tureorfales, exp_back_office, + exp_back_office_id, exp_salesman_code, exp_salesman_bm, exp_salesman_name, @@ -156,6 +158,7 @@ #{expExpenditureAmountUppercase}, #{expStaffTureorfales}, #{expBackOffice}, + #{expBackOfficeId}, #{expSalesmanCode}, #{expSalesmanBm}, #{expSalesmanName}, @@ -201,6 +204,7 @@ exp_expenditure_amount_uppercase = #{expExpenditureAmountUppercase}, exp_staff_tureorfales = #{expStaffTureorfales}, exp_back_office = #{expBackOffice}, + exp_back_office_id = #{expBackOfficeId}, exp_salesman_code = #{expSalesmanCode}, exp_salesman_bm = #{expSalesmanBm}, exp_salesman_name = #{expSalesmanName}, @@ -245,7 +249,15 @@ {call GetSerialNo_Business(#{type,mode=IN,jdbcType=VARCHAR})} - select top 1 id as userId,departmentid as departmentId from HrmResource where loginid = #{loginid} + + + diff --git a/ruoyi-system/target/maven-archiver/pom.properties b/ruoyi-system/target/maven-archiver/pom.properties index 9db00e2..0224c74 100644 --- a/ruoyi-system/target/maven-archiver/pom.properties +++ b/ruoyi-system/target/maven-archiver/pom.properties @@ -1,5 +1,5 @@ #Generated by Maven -#Mon Aug 12 16:20:08 CST 2024 +#Tue Aug 13 10:47:58 CST 2024 version=3.8.7 groupId=com.ruoyi artifactId=ruoyi-system diff --git a/ruoyi-system/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/ruoyi-system/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst index 1385f5c..8882699 100644 --- a/ruoyi-system/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst +++ b/ruoyi-system/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst @@ -20,6 +20,7 @@ com\ruoyi\mobile\quoteMobile\service\QuoteMobileService.class com\ruoyi\registeredCompany\mapper\RegisteredCompanyMapper.class com\ruoyi\hainanOrder\service\HaiNanOrderService.class com\ruoyi\system\domain\SysRoleMenu.class +com\ruoyi\expenses\service\IExpensesFileService.class com\ruoyi\authorize\domain\SysOaAuthorize.class com\ruoyi\factory\service\impl\CFactoryServiceImpl.class com\ruoyi\authorize\service\impl\AuthorizeFileServiceImpl.class @@ -123,6 +124,7 @@ com\ruoyi\bid\domain\BidTbHistory.class com\ruoyi\system\mapper\SysConfigMapper.class com\ruoyi\technicalConfirm\domain\QuotJsqrXzDetail.class com\ruoyi\quot\domain\Quot.class +com\ruoyi\expenses\mapper\ExpensesFileMapper.class com\ruoyi\redBook\domain\OAQuotProduct.class com\ruoyi\technicalConfirm\domain\BidJsqrXzRemark.class com\ruoyi\material\domain\CMaterial.class @@ -145,6 +147,7 @@ com\ruoyi\technicalConfirm\service\impl\BidJsqrServiceImpl.class com\ruoyi\bid\service\impl\BidFileServiceImpl.class com\ruoyi\quot\domain\QuotZb.class com\ruoyi\system\service\impl\SysConfigServiceImpl.class +com\ruoyi\expenses\domain\OaOfficeStaff.class com\ruoyi\system\service\impl\SysLogininforServiceImpl.class com\ruoyi\quote\domain\MaterialDto.class com\ruoyi\hainanOrder\domain\HaiNanOrder.class @@ -188,11 +191,13 @@ com\ruoyi\bid\mapper\BidFileMapper.class com\ruoyi\customer\domain\qcc\QccECIIndustryVerifyJsonResult.class com\ruoyi\registeredCompany\service\IRegisteredCompanyService.class com\ruoyi\sysSapUser\service\ISysSapUserService.class +com\ruoyi\expenses\service\impl\ExpensesFileServiceImpl.class com\ruoyi\registeredCompany\domain\RegisteredCompany.class com\ruoyi\storageLocation\service\impl\StorageLocationServiceImpl.class com\ruoyi\authorize\mapper\AuthorizeFileMapper.class com\ruoyi\customer\domain\qcc\QccFuzzySearchJsonResult.class com\ruoyi\priceVerification\domain\BidHj.class +com\ruoyi\expenses\domain\ExpensesFile.class com\ruoyi\technicalConfirm\service\impl\QuotJsqrServiceImpl.class com\ruoyi\zgys\service\impl\ZgysFileServiceImpl.class com\ruoyi\system\domain\SysUserOnline.class diff --git a/ruoyi-system/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/ruoyi-system/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst index 5be6edd..698ea32 100644 --- a/ruoyi-system/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst +++ b/ruoyi-system/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst @@ -53,6 +53,7 @@ E:\myproject\JNBusinessTest\ruoyi-system\src\main\java\com\ruoyi\customer\domain E:\myproject\JNBusinessTest\ruoyi-system\src\main\java\com\ruoyi\authorize\domain\AuthorizeFile.java E:\myproject\JNBusinessTest\ruoyi-system\src\main\java\com\ruoyi\priceVerification\mapper\BidHjMapper.java E:\myproject\JNBusinessTest\ruoyi-system\src\main\java\com\ruoyi\technicalConfirm\domain\BidJsqrXzDetail.java +E:\myproject\JNBusinessTest\ruoyi-system\src\main\java\com\ruoyi\expenses\mapper\ExpensesFileMapper.java E:\myproject\JNBusinessTest\ruoyi-system\src\main\java\com\ruoyi\bid\mapper\BidFileMapper.java E:\myproject\JNBusinessTest\ruoyi-system\src\main\java\com\ruoyi\redBook\domain\OAQuotProductTemplate2.java E:\myproject\JNBusinessTest\ruoyi-system\src\main\java\com\ruoyi\mobile\quoteMobile\domain\MQuote.java @@ -158,6 +159,7 @@ E:\myproject\JNBusinessTest\ruoyi-system\src\main\java\com\ruoyi\technicalConfir E:\myproject\JNBusinessTest\ruoyi-system\src\main\java\com\ruoyi\clMaterial\domain\CYlMaterial.java E:\myproject\JNBusinessTest\ruoyi-system\src\main\java\com\ruoyi\factory\service\ICFactoryService.java E:\myproject\JNBusinessTest\ruoyi-system\src\main\java\com\ruoyi\system\service\ISysDictDataService.java +E:\myproject\JNBusinessTest\ruoyi-system\src\main\java\com\ruoyi\expenses\domain\ExpensesFile.java E:\myproject\JNBusinessTest\ruoyi-system\src\main\java\com\ruoyi\factory\mapper\CFactoryMapper.java E:\myproject\JNBusinessTest\ruoyi-system\src\main\java\com\ruoyi\mobile\quoteMobile\service\impl\QuoteMobileServiceImpl.java E:\myproject\JNBusinessTest\ruoyi-system\src\main\java\com\ruoyi\clMaterial\mapper\CYlMaterialMapper.java @@ -174,6 +176,8 @@ E:\myproject\JNBusinessTest\ruoyi-system\src\main\java\com\ruoyi\customer\domain E:\myproject\JNBusinessTest\ruoyi-system\src\main\java\com\ruoyi\system\mapper\SysLogininforMapper.java E:\myproject\JNBusinessTest\ruoyi-system\src\main\java\com\ruoyi\technicalConfirm\domain\BidJsqrXzRemark.java E:\myproject\JNBusinessTest\ruoyi-system\src\main\java\com\ruoyi\system\domain\SysNoticeUser.java +E:\myproject\JNBusinessTest\ruoyi-system\src\main\java\com\ruoyi\expenses\service\IExpensesFileService.java +E:\myproject\JNBusinessTest\ruoyi-system\src\main\java\com\ruoyi\expenses\domain\OaOfficeStaff.java E:\myproject\JNBusinessTest\ruoyi-system\src\main\java\com\ruoyi\technicalConfirm\domain\BidJsqr.java E:\myproject\JNBusinessTest\ruoyi-system\src\main\java\com\ruoyi\customer\domain\qcc\VerifyResultData.java E:\myproject\JNBusinessTest\ruoyi-system\src\main\java\com\ruoyi\system\domain\vo\MetaVo.java @@ -204,6 +208,7 @@ E:\myproject\JNBusinessTest\ruoyi-system\src\main\java\com\ruoyi\zgys\mapper\Zgy E:\myproject\JNBusinessTest\ruoyi-system\src\main\java\com\ruoyi\system\domain\SysPost.java E:\myproject\JNBusinessTest\ruoyi-system\src\main\java\com\ruoyi\redBook\domain\OAQuot.java E:\myproject\JNBusinessTest\ruoyi-system\src\main\java\com\ruoyi\storageLocation\service\StorageLocationService.java +E:\myproject\JNBusinessTest\ruoyi-system\src\main\java\com\ruoyi\expenses\service\impl\ExpensesFileServiceImpl.java E:\myproject\JNBusinessTest\ruoyi-system\src\main\java\com\ruoyi\zgys\domain\ZgysFile.java E:\myproject\JNBusinessTest\ruoyi-system\src\main\java\com\ruoyi\customer\service\ICustomerService.java E:\myproject\JNBusinessTest\ruoyi-system\src\main\java\com\ruoyi\quot\domain\QuotFile.java diff --git a/ruoyi-system/target/ruoyi-system-3.8.7.jar b/ruoyi-system/target/ruoyi-system-3.8.7.jar index ca668c8..39ad94b 100644 Binary files a/ruoyi-system/target/ruoyi-system-3.8.7.jar and b/ruoyi-system/target/ruoyi-system-3.8.7.jar differ diff --git a/ruoyi-ui/src/api/expenses/expenses.js b/ruoyi-ui/src/api/expenses/expenses.js index 29cbe54..a7e964b 100644 --- a/ruoyi-ui/src/api/expenses/expenses.js +++ b/ruoyi-ui/src/api/expenses/expenses.js @@ -78,3 +78,30 @@ export function rejectExp(data) { data: data }) } + +// 查询附件列表 +export function expensesFileList(query) { + return request({ + url: '/expenses/expenses/expensesFileList', + method: 'get', + params: query + }) +} + +//删除附件 +export function expensesFileDelete(fileId) { + return request({ + url: '/expenses/expenses/expensesFileDelete', + method: 'post', + params: {fileId:fileId} + }) +} + +//获取OA内勤人员 +export function oaOfficeStaff(query) { + return request({ + url: '/expenses/expenses/oaOfficeStaff', + method: 'get', + params: query + }) +} diff --git a/ruoyi-ui/src/views/authorize/authorize/index.vue b/ruoyi-ui/src/views/authorize/authorize/index.vue index 25ad356..2afeb58 100644 --- a/ruoyi-ui/src/views/authorize/authorize/index.vue +++ b/ruoyi-ui/src/views/authorize/authorize/index.vue @@ -379,7 +379,7 @@ :on-success="handleAvatarSuccess" :show-file-list="false" :limit="1" - v-if="this.form.doaApprovalStatus == '0'"> + v-if="this.form.doaApprovalStatus == '0'||this.form.doaApprovalStatus == '3'"> 上传文件 diff --git a/ruoyi-ui/src/views/bid/bid/index.vue b/ruoyi-ui/src/views/bid/bid/index.vue index 4eac1e7..8325fd2 100644 --- a/ruoyi-ui/src/views/bid/bid/index.vue +++ b/ruoyi-ui/src/views/bid/bid/index.vue @@ -521,7 +521,7 @@ :on-success="handleAvatarSuccess" :show-file-list="false" :limit="1" - v-if="this.form.bidApprovalStatus == '0'"> + v-if="this.form.bidApprovalStatus == '0'||this.form.bidApprovalStatus == '3'"> 上传文件 @@ -539,7 +539,7 @@ 下载 - + 删除 @@ -1624,7 +1624,6 @@ export default { const bidId = row.bidId || this.ids getBid(bidId).then(response => { this.form = response.data; - this.bidHasRegistrationChange(this.form.bidHasRegistration);//原报名编号动态设置必填校验 this.open = true; this.title = "投标信息"; @@ -1810,20 +1809,22 @@ export default { /** 是否报名事件 */ bidHasRegistrationChange(val) { - this.form.bidRegistrationNumber = (val != '0'?'':this.form.bidRegistrationNumber) + this.form.bidRegistrationNumber = ''; if (val == '0') { this.rules = { ...this.rules, bidRegistrationNumber: this.bidOtherRule.bidRegistrationNumber }; } else { + this.$refs["form"].clearValidate(["bidRegistrationNumber"]); this.$delete(this.rules, 'bidRegistrationNumber'); } }, /** 是否价格联动事件 */ bidCopperPriceLinkageChange(val) { - this.form.bidPriceLinkageMethod = (val != '0'?'':this.form.bidPriceLinkageMethod) + this.form.bidPriceLinkageMethod = ''; if (val == '0') { this.rules = { ...this.rules, bidPriceLinkageMethod: this.bidOtherRule.bidPriceLinkageMethod }; } else { + this.$refs["form"].clearValidate(["bidPriceLinkageMethod"]); this.$delete(this.rules, 'bidPriceLinkageMethod'); } }, diff --git a/ruoyi-ui/src/views/expenses/expenses/index.vue b/ruoyi-ui/src/views/expenses/expenses/index.vue index 56d25cf..b1917a0 100644 --- a/ruoyi-ui/src/views/expenses/expenses/index.vue +++ b/ruoyi-ui/src/views/expenses/expenses/index.vue @@ -395,11 +395,57 @@ - + + + + + + 财务凭证 +
+ + 上传文件 + +
+ + + + + + + + + + + 账户信息 @@ -599,7 +645,7 @@ import { listBid } from "@/api/bid/bid"; import { numberToChinese } from "@/utils/number-cn"; import { checkPermi,checkRole } from '@/utils/permission';// 权限判断函数 -import { listExpenses, getExpenses, delExpenses, addExpenses, updateExpenses, commitExp, rejectExp, commitExpOA, expAssign } from "@/api/expenses/expenses"; +import { listExpenses, getExpenses, delExpenses, addExpenses, updateExpenses, commitExp, rejectExp, commitExpOA, expAssign, expensesFileList, expensesFileDelete, oaOfficeStaff } from "@/api/expenses/expenses"; /** 弹窗放大、拖拽 */ import elDragDialog from "@/directive/dialog/dragDialog"; /** 导入变更记录组件 */ @@ -644,6 +690,15 @@ export default { customerOpen: false, // OA审批状态时间范围 daterangeExpExpenditureDate: [], + // 费用支出-附件上传地址 + uploadUrl: process.env.VUE_APP_BASE_API + "/expenses/expenses/expFile", + // 费用支出-附件请求头 + headers: {Authorization: "Bearer " + getToken()}, + // 费用支出-业务员附件列表数据 + activeName: '', + expensesYwyFileLoading: false, + expensesYwyFileList: [], + // 查询参数 queryParams: { pageNum: 1, @@ -754,6 +809,8 @@ export default { bidSingle: true, bidMultiple: true, + //OA内勤人员 + oaOfficeStaff: [], // OA内勤人员数据列表 }; }, @@ -814,6 +871,7 @@ export default { expExpenditureAmountUppercase: null, expStaffTureorfales: null, expBackOffice: null, + expBackOfficeId: null, expSalesmanCode: null, expSalesmanBm: null, expSalesmanName: null, @@ -871,19 +929,22 @@ export default { this.form.expSalesmanDeptId = this.$store.state.user.deptId; this.form.expSalesmanDeptName = this.$store.state.user.deptName; }, + /** 修改按钮操作 */ handleUpdate(row) { this.reset(); + + this.oaOfficeStaffs();//获取OA内勤人员数据 + const expId = row.expId || this.ids getExpenses(expId).then(response => { this.form = response.data; - this.expStaffTureorfalesChange(this.form.expStaffTureorfales); this.open = true; this.title = "费用支出"; const expApprovalStatus = this.form.expApprovalStatus; const expOaApprovalStatus = this.form.expOaApprovalStatus; - //业务员角色 并且是协助中或者已完成、店长、部门领导审批中 时 不可编辑 + //业务员角色 并且是协助中或者已完成 时 不可编辑 if(checkRole(['SALES_MAN'])&&("1"==expApprovalStatus||"2"==expApprovalStatus)){ this.ywyDis = true; } @@ -891,8 +952,18 @@ export default { if(checkRole(['BID','BID_BSZZY','BID_ZHGLY'])&&"1"==expOaApprovalStatus){ this.tbDis = true; } + + this.getExpYwyFileList(); }); }, + + //获取OA内勤人员 + async oaOfficeStaffs(){ + await oaOfficeStaff().then(response => { + this.oaOfficeStaff = response.officeStaff; + }); + }, + /** 保存修改按钮 */ saveForm() { this.$refs["form"].validate(valid => { @@ -917,6 +988,14 @@ export default { commitForm() { this.$refs["form"].validate(valid => { if (valid) { + /*const expStaffTureorfales = this.form.expStaffTureorfales; + if(expStaffTureorfales=='0'){ + if(!this.from.expBackOfficeId){ + this.$modal.msgError("如有内勤,请选择内勤"); + return; + } + }*/ + commitExp(this.form).then(response => { this.$modal.msgSuccess("提交成功"); this.open = false; @@ -973,14 +1052,20 @@ export default { /** 是否选择内勤事件 */ expStaffTureorfalesChange(val) { - this.form.expBackOffice = (val != '0'?'':this.form.expBackOffice) + this.form.expBackOffice = ''; if (val == '0') { this.rules = { ...this.rules, expBackOffice: this.expOtherRule.expBackOffice }; } else { + this.$refs['form'].clearValidate(['expBackOffice']); this.$delete(this.rules, 'expBackOffice'); } }, + /** 选择OA内勤人员 */ + expBackOfficeChange(val) { + this.form.expBackOffice = val; + }, + /** 分派按钮 */ handleAssign() { this.openPeopleSelect(); @@ -1115,6 +1200,62 @@ export default { } }, /*********************************打开投标信息列表选择*****************************************/ + /*********************************附件上传操作*****************************************/ + //点击上传附件按钮触发事件 + uploadFile(activeName){ + this.activeName = activeName + }, + //上传前校验-业务员附件 + beforeAvatarUploadExpYwyFile(file){ + this.expensesYwyFileLoading = true; + const maxSize = 100 * 1024 * 1024; // 100MB,根据你的需求设置最大文件大小 + if (file.size > maxSize) { + this.$modal.msgError("文件大小超过了"+maxSize / (1024 * 1024)+"MB的限制"); + this.expensesYwyFileLoading = false; + return false; + } + }, + //成功回调 + handleAvatarSuccess(res) { + let activeName = this.activeName; + // 如果上传成功 + if (res.code == 200) { + this.$modal.msgSuccess(res.msg); + if(activeName=='expensesYwyFile'){ + this.getExpYwyFileList(); + this.expensesYwyFileLoading = false; + this.$refs.expensesYwyFileUpload.clearFiles(); //上传成功之后清除历史记录**加粗样式** + } + }else { + this.$modal.msgError(res.msg); + if(activeName=='expensesYwyFile'){ + this.expensesYwyFileLoading = false; + this.$refs.expensesYwyFileUpload.clearFiles(); //上传成功之后清除历史记录**加粗样式** + } + } + }, + //获取费用支出-业务员附件列表 + getExpYwyFileList(){ + const param = {relationId:this.form.expId,fileType:'expensesYwyFile'} + expensesFileList(param).then(response => { + this.expensesYwyFileList = response.rows; + }); + }, + //下载附件 + downloadFile(fileUrl){ + window.open(fileUrl, "_blank"); + }, + //删除附件 + deleteFile(fileId,activeName){ + if(activeName=='expensesYwyFile'){ + this.expensesYwyFileLoading = true; + expensesFileDelete(fileId).then(response => { + this.getExpYwyFileList(); + this.expensesYwyFileLoading = false; + }) + } + }, + /*********************************附件上传操作*****************************************/ } }; diff --git a/ruoyi-ui/src/views/zgys/zgys/index.vue b/ruoyi-ui/src/views/zgys/zgys/index.vue index 3eaa400..664770f 100644 --- a/ruoyi-ui/src/views/zgys/zgys/index.vue +++ b/ruoyi-ui/src/views/zgys/zgys/index.vue @@ -354,7 +354,7 @@ :on-success="handleAvatarSuccess" :show-file-list="false" :limit="1" - v-if="this.form.pqApprovalStatus == '0'"> + v-if="this.form.pqApprovalStatus == '0'||this.form.pqApprovalStatus == '3'"> 上传文件 @@ -372,7 +372,7 @@ 下载 - + 删除