From 9c39825700c4ce97e95efdf1524c743fb404751d Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期一, 04 九月 2023 17:34:42 +0800
Subject: [PATCH] 代码提交
---
ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceFund.java | 2 +-
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundController.java | 56 ++++++++++++++++++++++++++++++++------------------------
2 files changed, 33 insertions(+), 25 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundController.java
index c42353e..a708d1e 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundController.java
@@ -19,6 +19,7 @@
import com.ruoyi.project.domain.vo.*;
import com.ruoyi.project.mapper.ServiceFunddetailMapper;
import com.ruoyi.project.service.*;
+import com.ruoyi.system.service.ISysPostService;
import freemarker.template.Configuration;
import freemarker.template.Template;
import freemarker.template.TemplateException;
@@ -78,6 +79,9 @@
@Autowired
private IServiceExternalpersonService externalpersonService;
+
+ @Autowired
+ private ISysPostService postService;
public ServiceFundController() {
@@ -563,10 +567,10 @@
/**
- * 淇敼璐圭敤鐢宠
+ * 璐圭敤涓婃姤
*/
- @ApiOperation("淇敼璐圭敤鐢宠")
- @Log(title = "璐圭敤鐢宠涓�", businessType = BusinessType.UPDATE)
+ @ApiOperation("璐圭敤涓婃姤")
+ @Log(title = "璐圭敤涓婃姤", businessType = BusinessType.UPDATE)
@PostMapping("/fundEdit")
@RepeatSubmit
public AjaxResult fundEdit(@RequestBody ServiceFund serviceFund) {
@@ -578,7 +582,7 @@
}
for (ServiceFund sf : infoByInfoIdList) {
//濡傛灉绛変簬100锛岃鏄庡凡缁忚蛋鍒板尰闄㈣储鍔¢偅杈逛簡锛涜储鍔¢偅杈瑰彇鏁版嵁鏄粠鍒嗕韩琛ㄥ彇锛屾墍浠ワ紝杩欓噷鐩存帴寰�鍒嗕韩琛ㄩ噷娣诲姞鏁版嵁灏辫浜�
- if (sf.getBackflowlevel() == 199) {
+ if (sf.getBackflowlevel() != null && sf.getBackflowlevel() == 199) {
//灏唂und琛ㄧ殑瀹℃牳鐘舵�佹敼鎴�100
sf.setBackflowlevel(100);
serviceFundService.updateById(sf);
@@ -588,7 +592,30 @@
return success();
} else {
- serviceFund.setFlowlevel(sf.getBackflowlevel());
+
+ Integer TotalLevel = 0;
+ LoginUser loginUser = getLoginUser();
+ SysUser user = loginUser.getUser();
+ List<Integer> postids = postService.selectPostListByUserId(loginUser.getUserId());
+ if (!postids.contains(2)) {
+ serviceFund.setRecordstatus(2);
+ if (serviceFund.getBackflowlevel() != null) {
+ serviceFund.setFlowlevel(serviceFund.getBackflowlevel());
+ } else {
+ serviceFund.setBackflowlevel(1);
+ serviceFund.setFlowlevel(1);
+ }
+ } else {
+ serviceFund.setRecordstatus(0);
+ if (serviceFund.getBackflowlevel() != null) {
+ serviceFund.setFlowlevel(serviceFund.getBackflowlevel());
+ } else {
+ serviceFund.setFlowlevel(0);
+ serviceFund.setBackflowlevel(0);
+ }
+
+ }
+ // serviceFund.setFlowlevel(sf.getBackflowlevel());
boolean bret = serviceFundService.updateById(serviceFund);
log.info("serviceFundService.updateById杩斿弬:{}", bret);
@@ -1931,24 +1958,5 @@
return AjaxResult.success(serviceFundService.countItem(infoid, itemid));
}
-
-
- /**
- * 鏍规嵁绋庡墠姹傜◣鍚�
- */
- @ApiOperation("鏍规嵁绋庡墠姹傜◣鍚�")
- @GetMapping(value = "/taxAfterByTaxBefore")
- public AjaxResult taxAfterByTaxBefore(@PathVariable BigDecimal taxBefore) {
- log.info("绋庡墠鐨勫�间负锛歿}", taxBefore);
- BigDecimal taxAfter = new BigDecimal(0.0);
- if (taxBefore != null) {
- String taxation = TaxtUtils.getTaxation(taxBefore);
- taxAfter = taxBefore.subtract(new BigDecimal(taxation));
- log.info("绋庡墠鐨勫�间负锛歿}", taxBefore);
- }
- return AjaxResult.success(taxAfter);
-
- }
-
}
diff --git a/ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceFund.java b/ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceFund.java
index 43155dc..5e46739 100644
--- a/ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceFund.java
+++ b/ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceFund.java
@@ -214,7 +214,7 @@
* 澶勪簬鍝釜闃舵 0锛氱敵璇凤紱1锛氫竴绾у鏍革紱2锛氫簩绾у鏍革紱3锛氫笁绾у鏍哥瓑 100锛氬尰闄㈣储鍔� 199:鍖婚櫌椹冲洖
*/
@ApiModelProperty("閫�鍥炲鏍哥骇鍒�")
- private int backflowlevel;
+ private Integer backflowlevel;
/** 绋庡墠閲戦 */
@ApiModelProperty("绋庡墠閲戦")
--
Gitblit v1.9.3