소스 검색

监理服务费计量支付报表

yangyj 1 년 전
부모
커밋
8b5578e3a8

+ 6 - 19
blade-service/blade-manager/src/main/java/com/mixsmart/utils/FormulaUtils.java

@@ -356,25 +356,6 @@ public class FormulaUtils {
 /*把模型类转换成共识配置选项*/
     public static List<WbsFormElementVO> toElementVos(Class<?> clazz)  {
         return DataModel.toElementVos(clazz);
-       /* List<WbsFormElementVO> vos =new ArrayList<>();
-        try {
-            Field tbnField = clazz.getField(TBN_FN);
-            String TBN = (String) tbnField.get(null);
-            for (Field field : clazz.getDeclaredFields()) {
-                JSONField jf = field.getAnnotation(JSONField.class);
-                if (jf != null) {
-                    WbsFormElementVO vo = new WbsFormElementVO();
-                    vo.setEName(jf.label());
-                    vo.setTableElementKey(TBN+ StringPool.COLON +jf.name());
-                    vo.setInitTableName(TBN);
-                    vo.setId(BaseUtils.str2Long(vo.getTableElementKey()));
-                    vos.add(vo);
-                }
-            }
-        }catch (Exception e){
-            e.printStackTrace();
-        }
-        return vos;*/
     }
 
     public static String getEleKey(Class<?> clazz, String fieldName){
@@ -882,6 +863,12 @@ public class FormulaUtils {
         }
     }
 
+    public static void main(String[] args) {
+        String uri="C:\\www\\wwwroot\\Users\\hongchuangyanfa\\Desktop\\privateUrl\\1661661730033369088.html";
+        getElementExcelCoords(uri,"",null);
+        System.out.println();
+    }
+
     /*解析html里的电签关键字*/
     public static Map<String,String> getESignMap(Document document){
         Map<String,String> result = new HashMap<>();

+ 20 - 7
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/FormulaDaoImpl.java

@@ -41,12 +41,7 @@ public class FormulaDaoImpl implements IFormulaDao {
             BaseInfo baseInfo= new BaseInfo();
             ContractInfo info=  this.contractInfoService.getById(contractId);
             ProjectInfo projectInfo= projectInfoService.getById(info.getPId());
-            List<ContractInfo> list=getEntityList("select b.* from m_contract_relation_jlyz a join m_contract_info b on a.contract_id_jlyz=b.id   where contract_id_sg ="+info.getId(),ContractInfo.class);
-            if(list!=null&&list.size()>0){
-                ContractInfo infoJL=list.get(0);
-                baseInfo.setSupervision(infoJL.getContractName());
-                baseInfo.setSupervisionNumber(infoJL.getContractNumber());
-            }
+            BeanUtils.copyProperties(info,baseInfo);
             if(info.getPlanStartTime()!=null) {
                 baseInfo.setStartDatePlan(info.getPlanStartTime().format(chineseDateFm));
             }
@@ -72,8 +67,26 @@ public class FormulaDaoImpl implements IFormulaDao {
                 baseInfo.setBankAccount(StringUtils.handleNull(map.getOrDefault("bank_account_number","")));
                 baseInfo.setBankName(StringUtils.handleNull(map.getOrDefault("bank_of_deposit","")));
             }
-            BeanUtils.copyProperties(info,baseInfo);
             baseInfo.setProjectName(projectInfo.getProjectName());
+            if(info.getContractType()==2){
+                /**监理的合同信息不全,需要从施工的查找*/
+                List<ContractInfo> list=getEntityList("select b.* from m_contract_relation_jlyz a join m_contract_info b on a.contract_id_sg=b.id   where contract_id_jlyz ="+info.getId(),ContractInfo.class);
+                if(list!=null&&list.size()>0){
+                    ContractInfo relation=list.get(0);
+                    baseInfo.setContractorUnitName(relation.getContractorUnitName());
+                    baseInfo.setSupervisionUnitName(relation.getSupervisionUnitName());
+                    baseInfo.setSupervision(relation.getContractName());
+                    baseInfo.setSupervisionNumber(relation.getContractNumber());
+                    baseInfo.setConstructionUnitName(relation.getConstructionUnitName());
+                }
+            }else if(info.getContractType()==1){
+                List<ContractInfo> list=getEntityList("select b.* from m_contract_relation_jlyz a join m_contract_info b on a.contract_id_jlyz=b.id   where contract_id_sg ="+info.getId(),ContractInfo.class);
+                if(list!=null&&list.size()>0){
+                    ContractInfo relation=list.get(0);
+                    baseInfo.setSupervisionUnitName(relation.getSupervisionUnitName());
+                    baseInfo.setSupervision(relation.getContractName());
+                }
+            }
             return baseInfo;
         };
     }