Prechádzať zdrojové kódy

1.新增人员费用归集

WoNiu 5 rokov pred
rodič
commit
3b19c8d6e0

+ 14 - 0
src/main/java/com/galaxis/manatee/controller/GetController.java

@@ -1,12 +1,16 @@
 package com.galaxis.manatee.controller;
 
+import com.galaxis.manatee.entity.chuanyun.data.object.ChuanyunCostCollectionDO;
 import com.galaxis.manatee.service.ChuanyunService;
 import com.galaxis.manatee.task.ChuanyunBasicDataScheduledTask;
 import com.galaxis.manatee.task.ChuanyunHumanResourceScheduledTask;
+import org.springframework.http.ResponseEntity;
 import org.springframework.scheduling.annotation.Async;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RestController;
 
+import java.util.List;
+
 /**
  * 提供手工触发更新氚云数据的接口
  * @author zcj
@@ -89,5 +93,15 @@ public class GetController {
         chuanyunBasicDataScheduledTask.getGroupProjectManually();
     }
 
+    /**
+     * 获取人员费用归集
+     * @return
+     */
+    @GetMapping("/test/getAllCostCollection")
+    public ResponseEntity getAllCostCollection() {
+        List<ChuanyunCostCollectionDO> list = chuanyunService.getAllCostCollection();
+        return ResponseEntity.ok(list);
+    }
+
 
 }

+ 11 - 0
src/main/java/com/galaxis/manatee/dao/ChuanyunCostCollectionDao.java

@@ -0,0 +1,11 @@
+package com.galaxis.manatee.dao;
+
+import com.galaxis.capsule.util.GalaxisRepository;
+import com.galaxis.manatee.entity.chuanyun.data.object.ChuanyunCompanyDO;
+import com.galaxis.manatee.entity.chuanyun.data.object.ChuanyunCostCollectionDO;
+import org.springframework.stereotype.Repository;
+
+
+@Repository
+public interface ChuanyunCostCollectionDao extends GalaxisRepository<ChuanyunCostCollectionDO,String> {
+}

+ 77 - 0
src/main/java/com/galaxis/manatee/entity/chuanyun/data/object/ChuanyunCostCollectionDO.java

@@ -0,0 +1,77 @@
+package com.galaxis.manatee.entity.chuanyun.data.object;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.extern.slf4j.Slf4j;
+
+import javax.persistence.Entity;
+import java.math.BigDecimal;
+
+@Slf4j
+@EqualsAndHashCode(callSuper = true)
+@Data
+@Entity(name = "CHUANYUN_COST_COLLECTION")
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ChuanyunCostCollectionDO extends BasicDO{
+
+    /**
+     * 表名
+     */
+    public static final String SCHEMA_CODE ="D001789ac8de4abffcc48cba8f7ce172e551ace";
+
+    /**
+     * 工号
+     */
+    @JsonProperty("F0000001")
+    public String employCode;
+
+    /**
+     * 姓名
+     */
+    @JsonProperty("F0000003")
+    public String employName;
+
+    /**
+     *是否报工
+     */
+    @JsonProperty("F0000004")
+    public String isTrue;
+
+    /**
+     * 项目所属ID
+     */
+    @JsonProperty("F0000005")
+    private String projectId;
+
+    /**
+     * 项目号
+     */
+    @JsonProperty("F0000006")
+    public String projectCode;
+
+    /**
+     * 项目名称
+     */
+    @JsonProperty("F0000007")
+    public String projectName;
+
+    /**
+     * 项目类别
+     */
+    @JsonProperty("F0000010")
+    public String projectType;
+
+    /**
+     * 外部项目名称
+     */
+    @JsonProperty("F0000008")
+    public String outProjectName;
+
+    /**
+     * 分摊比例
+     */
+    @JsonProperty("F0000009")
+    public BigDecimal rate;
+}

+ 5 - 0
src/main/java/com/galaxis/manatee/service/ChuanyunService.java

@@ -1,7 +1,10 @@
 package com.galaxis.manatee.service;
 
+import com.galaxis.manatee.entity.chuanyun.data.object.ChuanyunCostCollectionDO;
 import org.springframework.scheduling.annotation.Async;
 
+import java.util.List;
+
 /**
  * 氚云服务调用
  */
@@ -11,4 +14,6 @@ public interface ChuanyunService {
      * 更新项目组成员
      */
     void updateProjectMember();
+
+    List<ChuanyunCostCollectionDO> getAllCostCollection();
 }

+ 10 - 1
src/main/java/com/galaxis/manatee/service/impl/ChuanyunServiceImpl.java

@@ -7,6 +7,8 @@ import com.fasterxml.jackson.databind.ObjectMapper;
 import com.galaxis.capsule.bo.ChuanyunObject;
 import com.galaxis.manatee.constant.ChuanYunConstant;
 import com.galaxis.manatee.constant.StringConstant;
+import com.galaxis.manatee.dao.ChuanyunCostCollectionDao;
+import com.galaxis.manatee.entity.chuanyun.data.object.ChuanyunCostCollectionDO;
 import com.galaxis.manatee.entity.chuanyun.data.object.ChuanyunGroupProjectDO;
 import com.galaxis.manatee.entity.chuanyun.dto.ChuanyunSaveDTO;
 import com.galaxis.manatee.entity.chuanyun.dto.Filter;
@@ -29,9 +31,11 @@ public class ChuanyunServiceImpl implements ChuanyunService {
 
     private final Integer pageSize=20;
     private final ChuanYunManager chuanYunManager;
+    private final ChuanyunCostCollectionDao chuanyunCostCollectionDao;
 
-    public ChuanyunServiceImpl(ChuanYunManager chuanYunManager) {
+    public ChuanyunServiceImpl(ChuanYunManager chuanYunManager, ChuanyunCostCollectionDao chuanyunCostCollectionDao) {
         this.chuanYunManager = chuanYunManager;
+        this.chuanyunCostCollectionDao = chuanyunCostCollectionDao;
     }
 
     @Override
@@ -89,6 +93,11 @@ public class ChuanyunServiceImpl implements ChuanyunService {
         }
     }
 
+    @Override
+    public List<ChuanyunCostCollectionDO> getAllCostCollection() {
+        return chuanyunCostCollectionDao.findAll();
+    }
+
     /**
      * 如果有项目组成员,将项目组成员projectMember替换为主键
      * 如果没有项目组成员,判断是否是EBG的实施、研发二开、售后维保项目,如果是,则添加EBG全体成员

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 41 - 1
src/main/java/com/galaxis/manatee/task/ChuanyunBasicDataScheduledTask.java