Browse Source

设置Long

ljx 4 years ago
parent
commit
8fa8092185

+ 1 - 1
src/main/java/com/imed/costaccount/model/dto/AccountProductSaveDTO.java

@@ -18,5 +18,5 @@ public class AccountProductSaveDTO {
 
     @ApiModelProperty(name="products",value = "成本项目id列表")
 //    @NotEmpty(message = "成本项目id不能为空")
-    private List<Integer> products;
+    private List<Long> products;
 }

+ 1 - 1
src/main/java/com/imed/costaccount/model/dto/CostAccountShareEditDto.java

@@ -30,7 +30,7 @@ public class CostAccountShareEditDto {
     private String responsibilityName;
 
     @ApiModelProperty(name = "accountingId",value = "成本项目的Id")
-    private Integer accountingId;
+    private Long accountingId;
 
     @ApiModelProperty(name = "accountingName",value = "成本项目名称")
     private String accountingName;

+ 1 - 1
src/main/java/com/imed/costaccount/model/dto/CostShareLevelEditDto.java

@@ -15,7 +15,7 @@ import javax.validation.constraints.NotNull;
 @ApiModel("编辑分摊层级对象")
 public class CostShareLevelEditDto {
     @ApiModelProperty(name = "id",value = "分摊层级的Id")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty(name = "shareName",value = "分摊层级数名称")
     @NotNull(message = "层级名称不能为空")

+ 1 - 1
src/main/java/com/imed/costaccount/model/dto/CostShareParamAccountDto.java

@@ -20,7 +20,7 @@ public class CostShareParamAccountDto {
      * 要修改的成本参数
      */
     @TableField(updateStrategy = FieldStrategy.IGNORED)
-    private Integer costShareParamId;
+    private Long costShareParamId;
     /**
      * 关联的医院的Id
      */

+ 1 - 1
src/main/java/com/imed/costaccount/model/dto/HospitalDto.java

@@ -32,7 +32,7 @@ public class HospitalDto {
     private Integer isHospital;
 
     @ApiModelProperty(name = "parentId",value = "如果是院区医院的名称,默认为")
-    private Integer parentId;
+    private Long parentId;
 
     @ApiModelProperty(name = "parentName",value = "医院唯一标识,院区不存在次内容")
     private String parentName;

+ 1 - 1
src/main/java/com/imed/costaccount/model/dto/HospitalSaveDto.java

@@ -24,7 +24,7 @@ public class HospitalSaveDto {
     private Integer isHospital;
 
     @ApiModelProperty(name = "parentId",value = "如果是医院的id,默认为0,如果是院区id,选择医院id")
-    private Integer parentId;
+    private Long parentId;
 
     @ApiModelProperty(name = "parentName",value = "如果是医院默认为'',如果是院区带上父医院名称")
     private String parentName;

+ 1 - 1
src/main/java/com/imed/costaccount/model/dto/ResponsibilityEditDTO.java

@@ -37,7 +37,7 @@ public class ResponsibilityEditDTO {
 
     @NotNull(message = "分摊级别id不能为空")
     @ApiModelProperty(name = "shareLevelId",value = "分摊级别id")
-    private Integer shareLevelId;
+    private Long shareLevelId;
 
     @NotNull(message = "分摊级别不能为空")
     @ApiModelProperty(name = "shareLevel",value = "分摊级别(分摊接口中获取,暂时可写死)")

+ 1 - 1
src/main/java/com/imed/costaccount/model/dto/ResponsibilitySaveDTO.java

@@ -32,7 +32,7 @@ public class ResponsibilitySaveDTO {
     private Integer responsibilityType;
 
     @ApiModelProperty(name = "shareId",value = "分摊级别的Id")
-    private Integer shareId;
+    private Long shareId;
 
 //    @NotNull(message = "分摊级别不能为空")
     @ApiModelProperty(name = "shareLevel",value = "分摊级别(分摊接口中获取,暂时可写死)")

+ 1 - 1
src/main/java/com/imed/costaccount/model/vo/AccountProductVO.java

@@ -23,7 +23,7 @@ public class AccountProductVO {
 
     @ApiModelProperty(name = "parentId",value = "主键")
     @JsonIgnore
-    private Integer parentId;
+    private Long parentId;
 
     @ApiModelProperty(name = "productVOs",value = "主键")
     private List<ProductVO> productVOs;

+ 1 - 1
src/main/java/com/imed/costaccount/model/vo/AccountVO.java

@@ -17,7 +17,7 @@ public class AccountVO {
     private String accountingCode;
 
     @JsonIgnore
-    private Integer parentId;
+    private Long parentId;
 
     private Integer isBaseCost;
 

+ 2 - 2
src/main/java/com/imed/costaccount/model/vo/CostAccountShareVO.java

@@ -17,7 +17,7 @@ public class CostAccountShareVO {
     private Long id;
 
     @ApiModelProperty(name = "responsibilityId",value = "责任中心的Id")
-    private Integer responsibilityId;
+    private Long responsibilityId;
 
     @ApiModelProperty(name = "shareLevel",value = "责任中心分摊层级")
     private Integer shareLevel;
@@ -29,7 +29,7 @@ public class CostAccountShareVO {
     private String responsibilityName;
 
     @ApiModelProperty(name = "accountingId",value = "成本项目的Id")
-    private Integer accountingId;
+    private Long accountingId;
 
     @ApiModelProperty(name = "accountingName",value = "成本项目名称")
     private String accountingName;

+ 1 - 1
src/main/java/com/imed/costaccount/model/vo/CostResponsibilityLevelVO.java

@@ -24,7 +24,7 @@ public class CostResponsibilityLevelVO {
     private String responsibilityCode;
 
     @ApiModelProperty(name = "shareId",value = "分摊级别的Id")
-    private Integer shareId;
+    private Long shareId;
 
     @ApiModelProperty(name = "shareLevel",value = "分摊级别 如果是顶层默认为0")
     private Integer shareLevel;

+ 1 - 1
src/main/java/com/imed/costaccount/model/vo/CostResponsibilityVO.java

@@ -39,7 +39,7 @@ public class CostResponsibilityVO{
     @ApiModelProperty(name = "shareName",value = "分摊级别名称")
     private String shareName;
 
-    private Integer parentId;
+    private Long parentId;
 
     /**
      * 子责任中心

+ 1 - 1
src/main/java/com/imed/costaccount/model/vo/HospitalVO.java

@@ -30,7 +30,7 @@ public class HospitalVO {
     private String sign;
 
     @ApiModelProperty(name = "parentId",value = "如果是院区医院的名称,默认为")
-    private Integer parentId;
+    private Long parentId;
 
     @ApiModelProperty(name = "parentName",value = "医院唯一标识,院区不存在次内容")
     private String parentName;

+ 2 - 1
src/main/java/com/imed/costaccount/service/impl/AccountingServiceImpl.java

@@ -54,7 +54,8 @@ public class AccountingServiceImpl extends ServiceImpl<AccountingMapper, Account
             return Collections.emptyList();
         }
         // 所有的
-        List<AccountVO> all = list.stream().map(i -> BeanUtil.convertObj(i, AccountVO.class)).collect(Collectors.toList());
+//        List<AccountVO> all = list.stream().map(i -> BeanUtil.con(i, AccountVO.class)).collect(Collectors.toList());
+        List<AccountVO> all = BeanUtil.convertList(list, AccountVO.class);
         // 查询所有的已绑定的
         if (Objects.nonNull(shareParamId)) {
             List<Integer> ids = shareParamService.selectIsSelect(shareParamId);

+ 1 - 1
src/main/java/com/imed/costaccount/service/impl/CostShareParamServiceImpl.java

@@ -174,7 +174,7 @@ public class CostShareParamServiceImpl extends ServiceImpl<CostShareParamMapper,
     public List<Integer> selectIsSelect(Integer shareParamId) {
         CostShareParam byId = this.getById(shareParamId);
         if (Objects.isNull(byId)) {
-            throw new CostException(500, "当前分摊参数已被移除或不存在");
+            return Collections.emptyList();
         }
         String accountingId = byId.getAccountingId();
         if (!StringUtils.isEmpty(accountingId)){

+ 5 - 0
src/main/java/com/imed/costaccount/web/AbstractController.java

@@ -21,4 +21,9 @@ public abstract class AbstractController {
 	protected Long getUserId() {
 		return getUser().getId();
 	}
+
+	protected Long getHospId(){
+		User principal = (User) SecurityUtils.getSubject().getPrincipal();
+		return principal.getHospId();
+	}
 }

+ 1 - 1
src/main/java/com/imed/costaccount/web/AccountingController.java

@@ -27,7 +27,7 @@ import java.util.List;
 @Api(tags = "会计科目")
 @RestController
 @RequestMapping("/costAccount/accounting")
-public class AccountingController {
+public class AccountingController extends AbstractController{
     private final AccountingService accountingService;
 
     public AccountingController(AccountingService accountingService) {