Browse Source

增加获取变更令

huangtf 7 tháng trước cách đây
mục cha
commit
bbf8f5a05f

+ 52 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/ChangeToken.java

@@ -0,0 +1,52 @@
+package org.springblade.manager.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.time.LocalDate;
+
+@Data
+public class ChangeToken {
+
+    /**
+     * 变更令编号
+     */
+    @ApiModelProperty(value = "变更清单id")
+    private Long id;
+
+    /**
+     * 清单编号
+     */
+    @ApiModelProperty(value = "清单编号")
+    private String formNumber;
+
+    @ApiModelProperty(value = "变更令id")
+    private Long changeTokenId;
+
+    /**
+     * 变更申请金额
+     */
+    @ApiModelProperty(value = "变更清单申请金额")
+    private BigDecimal changeMoney;
+
+    @ApiModelProperty(value = "业务日期")
+    private LocalDate businessDate;
+
+
+    @ApiModelProperty(value = "变更批复日期")
+    private LocalDate changeApprovalDate;
+
+    /**
+     * 变更令编号
+     */
+    @ApiModelProperty(value = "变更令编号")
+    private String changeNumber;
+
+    /**
+     * 变更申请金额
+     */
+    @ApiModelProperty(value = "变更令申请金额")
+    private BigDecimal totalChangeMoney;
+
+}

+ 4 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/service/IFormulaDao.java

@@ -2,6 +2,8 @@ package org.springblade.manager.service;
 
 import org.springblade.manager.formula.impl.ExecutorMeter;
 import org.springblade.manager.vo.*;
+import org.springblade.meter.entity.ChangeTokenForm;
+
 import java.util.List;
 import java.util.Map;
 import java.util.function.Function;
@@ -32,5 +34,7 @@ public interface IFormulaDao {
     /**获取清表映射地址*/
     Function<List<String>, List<Map<String,Object>>>  getTableExcelInfoFc();
 
+    Function<Long, List<ChangeTokenForm>> getChangeTokenFormFc();
 
+    Function<Long, List<ChangeToken>> getChangeTokenFc();
 }

+ 19 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/FormulaDaoImpl.java

@@ -13,6 +13,7 @@ import org.springblade.manager.service.IContractInfoService;
 import org.springblade.manager.service.IFormulaDao;
 import org.springblade.manager.service.IProjectInfoService;
 import org.springblade.manager.vo.*;
+import org.springblade.meter.entity.ChangeTokenForm;
 import org.springblade.meter.entity.MeterContractInfo;
 import org.springframework.beans.BeanUtils;
 import org.springframework.jdbc.core.BeanPropertyRowMapper;
@@ -172,6 +173,24 @@ public class FormulaDaoImpl implements IFormulaDao {
         };
     }
 
+    @Override
+    public Function<Long, List<ChangeTokenForm>> getChangeTokenFormFc() {
+        return  contractId->{
+            String sql="select id,change_number,business_date,change_money,change_approval_date from  s_change_token_form where   is_deleted=0 and approve_status  = 2 and contract_id ="+contractId;
+            return getEntityList(sql,ChangeTokenForm.class);
+        };
+    }
+
+
+    @Override
+    public Function<Long, List<ChangeToken>> getChangeTokenFc() {
+        return  contractId->{
+            String sql="SELECT sctf.change_number, sctf.business_date, sctf.change_money as total_change_money, sctf.change_approval_date, scti.id, scti.change_token_id, scti.form_number, scti.change_money FROM s_change_token_form sctf " +
+                    "INNER JOIN s_change_token_inventory scti ON sctf.id = scti.change_token_id WHERE sctf.is_deleted = 0 AND sctf.approve_status = 2 AND scti.is_deleted = 0 AND sctf.contract_id =  "+contractId;
+            return getEntityList(sql,ChangeToken.class);
+        };
+    }
+
     public <T> List<T> getEntityList(String sql, Class<T> entityClass) {
         return  jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(entityClass));
     }