浏览代码

保存实际金额

DLC 1 月之前
父节点
当前提交
dc4a76d057

+ 7 - 1
qcs-common/src/main/java/com/rongwei/bscommon/sys/dao/QcsMainCostDao.java

@@ -15,8 +15,14 @@ public interface QcsMainCostDao extends BaseDao<QcsMainCostDo> {
     @Select("select SUM(AMOUNT) as AMOUNTSUM from qcs_main_detail where DELETED='0' and MAINID=#{costId}")
     Map<String, Object> getAmountSum(@Param("costId") String costId);
 
+    @Select("select SUM(ACTAMOUNT) as ACTAMOUNTSUM from qcs_main_detail where DELETED='0' and MAINID=#{costId}")
+    Map<String, Object> getActAmountSum(@Param("costId") String costId);
+
     @Select("select * from qcs_loss_detail where DELETED='0' and MAINID=#{costId}")
-    List<QcsLossDetailDo> getCostSum(@Param("costId") String costId);
+    List<QcsLossDetailDo> getLossDetails(@Param("costId") String costId);
+
+    @Select("select * from qcs_loss_detail where DELETED='0' and MAINID=#{costId} and SUBMITDATE is not null")
+    List<QcsLossDetailDo> getTjLossDetails(@Param("costId") String costId);
 
     @Select("select * from qcs_main_cost where DELETED='0' and BASEID=#{baseId} and DATE_FORMAT(YEARMONTH, '%Y-%m')=#{yearmonth}")
     List<QcsMainCostDo> getMainCosts(@Param("baseId") String baseId, @Param("yearmonth") String yearmonth);

+ 2 - 0
qcs-common/src/main/java/com/rongwei/bscommon/sys/service/QcsMainCostService.java

@@ -8,4 +8,6 @@ import java.util.Map;
 
 public interface QcsMainCostService extends IService<QcsMainCostDo> {
     R setOtherCost(Map<String, String> params);
+
+    R saveActAmount(Map<String, String> params);
 }

文件差异内容过多而无法显示
+ 83 - 5
qcs-common/src/main/java/com/rongwei/bscommon/sys/service/impl/QcsMainCostServiceImpl.java


+ 13 - 0
qcs-server/src/main/java/com/rongwei/controller/QcsMainCostController.java

@@ -30,4 +30,17 @@ public class QcsMainCostController {
             return R.error();
         }
     }
+
+    //保存实际金额
+    @PostMapping("/saveActAmount")
+    public R saveActAmount(@RequestBody Map<String, String> params) {
+        try {
+            log.info("保存实际金额--" + params);
+            return qcsMainCostService.saveActAmount(params);
+        } catch (Exception e) {
+            e.printStackTrace();
+            log.info("保存实际金额异常..." + e.getMessage());
+            return R.error();
+        }
+    }
 }