Browse Source

费用详情修改

gao.qiang 5 months ago
parent
commit
4c07da9433

+ 23 - 1
application-webadmin/src/main/java/com/ankaibei/workFlow/webadmin/ankaibei/mapper/CostInfoMapper.java

@@ -33,7 +33,29 @@ public interface CostInfoMapper extends JpaRepository<CostInfoEntity, Integer>,
      * @param costType
      * @return
      */
-    CostInfoEntity findByApplyCostIdAndCostType(Integer applyCostId, String costType);
+    @Transactional
+    @Query(value = "SELECT\n" +
+            "\tcostinfoen0_.cost_id,\n" +
+            "\tcostinfoen0_.apply_cost_id ,\n" +
+            "\tcostinfoen0_.cost_status  ,\n" +
+            "\tcostinfoen0_.cost_type  ,\n" +
+            "\tcostinfoen0_.create_date  ,\n" +
+            "\tcostinfoen0_.flow_task_status  ,\n" +
+            "\tcostinfoen0_.happen_date  ,\n" +
+            "\tcostinfoen0_.payment_date  ,\n" +
+            "\tcostinfoen0_.perform_amount ,\n" +
+            "\tcostinfoen0_.process_definition_id  ,\n" +
+            "\tcostinfoen0_.process_instance_id  ,\n" +
+            "\tcostinfoen0_.project_name ,\n" +
+            "\tcostinfoen0_.proposer  ,\n" +
+            "\tcostinfoen0_.relevance_user  \n" +
+            "FROM\n" +
+            "\tcost_info costinfoen0_\n" +
+            "WHERE\n" +
+            "\tcostinfoen0_.cost_id =?1 \n" +
+            "\tAND costinfoen0_.cost_type =?2"
+            , nativeQuery = true)
+    CostInfoEntity findByApplyCostIdAndCostType(Integer costId, String costType);
 
     @Transactional
     @Modifying

+ 1 - 1
application-webadmin/src/main/java/com/ankaibei/workFlow/webadmin/ankaibei/service/impl/CostInfoServiceImpl.java

@@ -123,7 +123,7 @@ public class CostInfoServiceImpl implements CostInfoService {
 
     @Override
     public ResMsg findCostInfoDetails(CostInfoEntity costInfoEntity) {
-        CostInfoEntity costInfo = costInfoMapper.findByApplyCostIdAndCostType(costInfoEntity.getApplyCostId(), costInfoEntity.getCostType());
+        CostInfoEntity costInfo = costInfoMapper.findByApplyCostIdAndCostType(costInfoEntity.getCostId(), costInfoEntity.getCostType());
         if (ObjectUtils.isEmpty(costInfo)) {
             return new ResMsg(CodeEnum.NO_DATA);
         }