Browse Source

修改添加成员

master
zy_Java 5 years ago
parent
commit
9000ea869d
  1. 60
      cloudutil/src/main/java/com/ccsens/cloudutil/bean/tall/dto/WpsDto.java
  2. 15
      cloudutil/src/main/java/com/ccsens/cloudutil/bean/tall/vo/WpsVo.java
  3. 48
      cloudutil/src/main/java/com/ccsens/cloudutil/feign/TallFeignClient.java
  4. 2
      ht/src/main/java/com/ccsens/ht/service/DoctorService.java
  5. 2
      pims/pom.xml
  6. 15
      pims/src/main/java/com/ccsens/pims/api/DebugController.java
  7. 19
      pims/src/main/java/com/ccsens/pims/api/ProductController.java
  8. 46
      pims/src/main/java/com/ccsens/pims/api/ReadController.java
  9. 10
      pims/src/main/java/com/ccsens/pims/api/ReportController.java
  10. 23
      pims/src/main/java/com/ccsens/pims/bean/dto/CompanyDto.java
  11. 4
      pims/src/main/java/com/ccsens/pims/bean/dto/ProductDto.java
  12. 249
      pims/src/main/java/com/ccsens/pims/bean/po/CompanyCost.java
  13. 1471
      pims/src/main/java/com/ccsens/pims/bean/po/CompanyCostExample.java
  14. 128
      pims/src/main/java/com/ccsens/pims/bean/po/CostLog.java
  15. 801
      pims/src/main/java/com/ccsens/pims/bean/po/CostLogExample.java
  16. 117
      pims/src/main/java/com/ccsens/pims/bean/po/CostType.java
  17. 751
      pims/src/main/java/com/ccsens/pims/bean/po/CostTypeExample.java
  18. 19
      pims/src/main/java/com/ccsens/pims/bean/po/IncomeStatementsLog.java
  19. 90
      pims/src/main/java/com/ccsens/pims/bean/po/IncomeStatementsLogExample.java
  20. 19
      pims/src/main/java/com/ccsens/pims/bean/po/MoneyFlowLog.java
  21. 90
      pims/src/main/java/com/ccsens/pims/bean/po/MoneyFlowLogExample.java
  22. 14
      pims/src/main/java/com/ccsens/pims/bean/po/Product.java
  23. 50
      pims/src/main/java/com/ccsens/pims/bean/po/ProductExample.java
  24. 19
      pims/src/main/java/com/ccsens/pims/bean/po/ProductIncome.java
  25. 90
      pims/src/main/java/com/ccsens/pims/bean/po/ProductIncomeExample.java
  26. 179
      pims/src/main/java/com/ccsens/pims/bean/vo/CompanyVo.java
  27. 11
      pims/src/main/java/com/ccsens/pims/bean/vo/ProductDto.java
  28. 119
      pims/src/main/java/com/ccsens/pims/bean/vo/ProductVo.java
  29. 91
      pims/src/main/java/com/ccsens/pims/persist/dao/ProductDao.java
  30. 6
      pims/src/main/java/com/ccsens/pims/persist/dao/ProductIncomeDao.java
  31. 11
      pims/src/main/java/com/ccsens/pims/persist/dao/ProductTypeDao.java
  32. 30
      pims/src/main/java/com/ccsens/pims/persist/mapper/CompanyCostMapper.java
  33. 30
      pims/src/main/java/com/ccsens/pims/persist/mapper/CostLogMapper.java
  34. 30
      pims/src/main/java/com/ccsens/pims/persist/mapper/CostTypeMapper.java
  35. 9
      pims/src/main/java/com/ccsens/pims/service/IProductService.java
  36. 17
      pims/src/main/java/com/ccsens/pims/service/IRealExcelService.java
  37. 10
      pims/src/main/java/com/ccsens/pims/service/IReportService.java
  38. 48
      pims/src/main/java/com/ccsens/pims/service/ProductService.java
  39. 234
      pims/src/main/java/com/ccsens/pims/service/RealExcelService.java
  40. 668
      pims/src/main/java/com/ccsens/pims/service/ReportService.java
  41. 6
      pims/src/main/resources/application-test.yml
  42. 4
      pims/src/main/resources/application.yml
  43. 374
      pims/src/main/resources/mapper_dao/ProducrDao.xml
  44. 466
      pims/src/main/resources/mapper_raw/CompanyCostMapper.xml
  45. 291
      pims/src/main/resources/mapper_raw/CostLogMapper.xml
  46. 275
      pims/src/main/resources/mapper_raw/CostTypeMapper.xml
  47. 43
      pims/src/main/resources/mapper_raw/IncomeStatementsLogMapper.xml
  48. 43
      pims/src/main/resources/mapper_raw/MoneyFlowLogMapper.xml
  49. 45
      pims/src/main/resources/mapper_raw/ProductIncomeMapper.xml
  50. 28
      pims/src/main/resources/mapper_raw/ProductMapper.xml
  51. 19
      tall/src/main/java/com/ccsens/tall/bean/dto/ChartDto.java
  52. 33
      tall/src/main/java/com/ccsens/tall/bean/dto/DomainDto.java
  53. 15
      tall/src/main/java/com/ccsens/tall/bean/dto/MemberDto.java
  54. 2
      tall/src/main/java/com/ccsens/tall/bean/dto/ProjectDto.java
  55. 59
      tall/src/main/java/com/ccsens/tall/bean/dto/TaskDto.java
  56. 19
      tall/src/main/java/com/ccsens/tall/bean/dto/WpsDto.java
  57. 11
      tall/src/main/java/com/ccsens/tall/bean/po/ProShow.java
  58. 60
      tall/src/main/java/com/ccsens/tall/bean/po/ProShowExample.java
  59. 15
      tall/src/main/java/com/ccsens/tall/bean/vo/ProjectVo.java
  60. 9
      tall/src/main/java/com/ccsens/tall/bean/vo/WpsVo.java
  61. 2
      tall/src/main/java/com/ccsens/tall/persist/dao/ProMemberDao.java
  62. 4
      tall/src/main/java/com/ccsens/tall/persist/dao/SysProjectDao.java
  63. 8
      tall/src/main/java/com/ccsens/tall/service/ChartService.java
  64. 12
      tall/src/main/java/com/ccsens/tall/service/ExcelService.java
  65. 2
      tall/src/main/java/com/ccsens/tall/service/IChartService.java
  66. 10
      tall/src/main/java/com/ccsens/tall/service/IProMemberService.java
  67. 3
      tall/src/main/java/com/ccsens/tall/service/IProTaskDetailService.java
  68. 7
      tall/src/main/java/com/ccsens/tall/service/ISysDomainService.java
  69. 7
      tall/src/main/java/com/ccsens/tall/service/IWpsService.java
  70. 92
      tall/src/main/java/com/ccsens/tall/service/ProMemberService.java
  71. 132
      tall/src/main/java/com/ccsens/tall/service/ProTaskDetailService.java
  72. 55
      tall/src/main/java/com/ccsens/tall/service/ProjectService.java
  73. 33
      tall/src/main/java/com/ccsens/tall/service/SysDomainService.java
  74. 93
      tall/src/main/java/com/ccsens/tall/service/TaskPluginService.java
  75. 11
      tall/src/main/java/com/ccsens/tall/service/TaskSubTimeService.java
  76. 1
      tall/src/main/java/com/ccsens/tall/service/UserService.java
  77. 19
      tall/src/main/java/com/ccsens/tall/service/WpsService.java
  78. 16
      tall/src/main/java/com/ccsens/tall/web/ChartController.java
  79. 15
      tall/src/main/java/com/ccsens/tall/web/DomainController.java
  80. 27
      tall/src/main/java/com/ccsens/tall/web/MemberController.java
  81. 64
      tall/src/main/java/com/ccsens/tall/web/PimsController.java
  82. 47
      tall/src/main/java/com/ccsens/tall/web/TaskController.java
  83. 15
      tall/src/main/java/com/ccsens/tall/web/UserController.java
  84. 34
      tall/src/main/resources/mapper_dao/ProMemberDao.xml
  85. 22
      tall/src/main/resources/mapper_dao/SysProjectDao.xml
  86. 27
      tall/src/main/resources/mapper_raw/ProShowMapper.xml
  87. 2
      util/src/main/java/com/ccsens/util/CodeEnum.java
  88. 98
      util/src/main/java/com/ccsens/util/PoiUtil.java
  89. 3
      util/src/main/java/com/ccsens/util/WebConstant.java
  90. 16
      util/src/test/java/com/ccsens/util/Base64Test.java

60
cloudutil/src/main/java/com/ccsens/cloudutil/bean/tall/dto/WpsDto.java

@ -0,0 +1,60 @@
package com.ccsens.cloudutil.bean.tall.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.util.Map;
@Data
public class WpsDto {
@Data
@ApiModel("业务和WPS")
public static class Business{
@ApiModelProperty("业务ID")
private Long businessId;
@ApiModelProperty("wps文件ID")
private Long wpsFileId;
@ApiModelProperty("业务类型 0项目WBS 1交付物 2会议记录。后面是pims内的表:3产品依据表,4产品收入表,5成本表,6损益表,7现金流表")
private Byte businessType;
@ApiModelProperty("用户ID")
private Long userId;
@ApiModelProperty("文件名")
private String fileName;
@ApiModelProperty("文件路径,默认在WebConstant.UPLOAD_PATH_BASE下")
private String filePath;
@ApiModelProperty("文件大小")
private Long fileSize;
@ApiModelProperty("操作类型 值:WebConstant Wps USER_OPERATION... ")
private byte operation;
@ApiModelProperty("操作权限 WebConstant Wps PROJECT_PRIVILEGE...")
private byte privilege;
@ApiModelProperty("操作权限查询路径")
private String privilegeQueryUrl;
}
@Data
@ApiModel("查找wps文件路径")
public static class VisitWpsUrl{
@NotNull
@ApiModelProperty("业务ID")
private Long businessId;
@NotNull
@ApiModelProperty("业务类型")
private byte businessType;
@NotNull
@ApiModelProperty("userId")
private Long userId;
@ApiModelProperty("访问路径")
private Map<String, String> params;
}
@Data
@ApiModel("异步通知")
public static class Async{
@ApiModelProperty("文件ID")
private Long fileId;
}
}

15
cloudutil/src/main/java/com/ccsens/cloudutil/bean/tall/vo/WpsVo.java

@ -0,0 +1,15 @@
package com.ccsens.cloudutil.bean.tall.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class WpsVo {
@Data
public static class BusinessFileIdAndPath{
@ApiModelProperty("业务id")
private Long businessId;
@ApiModelProperty("文件路径")
private String filePath;
}
}

48
cloudutil/src/main/java/com/ccsens/cloudutil/feign/TallFeignClient.java

@ -4,23 +4,20 @@ import com.ccsens.cloudutil.bean.QueryParam;
import com.ccsens.cloudutil.bean.tall.dto.LogDto;
import com.ccsens.cloudutil.bean.tall.dto.MemberRoleDto;
import com.ccsens.cloudutil.bean.tall.dto.UserDto;
import com.ccsens.cloudutil.bean.tall.vo.MemberVo;
import com.ccsens.cloudutil.bean.tall.vo.PluginVo;
import com.ccsens.cloudutil.bean.tall.vo.TaskVo;
import com.ccsens.cloudutil.bean.tall.vo.UserVo;
import com.ccsens.cloudutil.bean.tall.dto.WpsDto;
import com.ccsens.cloudutil.bean.tall.vo.*;
import com.ccsens.util.JsonResponse;
import feign.Param;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.configurationprocessor.json.JSONObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
import java.util.Map;
/**
* @description:
@ -156,6 +153,24 @@ public interface TallFeignClient {
@GetMapping("/plugins/task")
Long getTaskIdByTaskPluginId(@RequestParam(name = "taskPluginId") Long taskPluginId);
/**
* 保存WPS业务和文件记录
*/
@RequestMapping("/wps/saveWps")
JsonResponse saveWpsFile(WpsDto.Business business);
/**
* 保存WPS业务和文件记录
*/
@RequestMapping("/wps/visitUrls")
List<String> queryVisitUrls(WpsDto.VisitWpsUrl visitWpsUrl);
/**
* 根据wpsId查询wps文件路径
*/
@GetMapping("/wps/wpsId")
JsonResponse<WpsVo.BusinessFileIdAndPath> getPathByWpsId(@RequestParam(name = "wpsId")Long wpsId);
}
@Slf4j
@ -243,6 +258,21 @@ class TallFeignClientFallBack implements FallbackFactory<TallFeignClient> {
public Long getTaskIdByTaskPluginId(Long taskPluginId) {
return null;
}
@Override
public JsonResponse saveWpsFile(WpsDto.Business business) {
return JsonResponse.newInstance().fail();
}
@Override
public List<String> queryVisitUrls(WpsDto.VisitWpsUrl visitWpsUrl) {
return null;
}
@Override
public JsonResponse<WpsVo.BusinessFileIdAndPath> getPathByWpsId(Long async) {
return JsonResponse.newInstance().fail();
}
};
}

2
ht/src/main/java/com/ccsens/ht/service/DoctorService.java

@ -16,13 +16,11 @@ import com.ccsens.util.*;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import org.springframework.validation.annotation.Validated;
import java.util.ArrayList;
import java.util.Date;

2
pims/pom.xml

@ -54,7 +54,7 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<mainClass>com.ccsens.health.HealthApplication</mainClass>
<mainClass>com.ccsens.pims.PimsApplication</mainClass>
<!--<skip>true</skip>-->
</configuration>
<executions>

15
pims/src/main/java/com/ccsens/pims/api/DebugController.java

@ -1,15 +1,19 @@
package com.ccsens.pims.api;
import com.ccsens.pims.bean.dto.CompanyDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
@Slf4j
@Api(tags = "DEBUG" , description = "DebugController | ")
@RestController
@RequestMapping("/debug")
@ -18,11 +22,12 @@ public class DebugController {
@ApiOperation(value = "/测试",notes = "")
@ApiImplicitParams({
})
@RequestMapping(value="",method = RequestMethod.GET,produces = {"application/json;charset=UTF-8"})
public String getSmsCode(HttpServletRequest request) throws Exception {
return "测试";
@RequestMapping(value="",method = RequestMethod.POST,produces = {"application/json;charset=UTF-8"})
public String getSmsCode(HttpServletRequest request, @Validated @RequestBody CompanyDto.Async async) throws Exception {
log.info("pims测试:{}",async.toString());
return "pims测试";
}
}

19
pims/src/main/java/com/ccsens/pims/api/ProductController.java

@ -3,6 +3,7 @@ package com.ccsens.pims.api;
import com.ccsens.cloudutil.annotation.MustLogin;
import com.ccsens.pims.bean.dto.CompanyDto;
import com.ccsens.pims.bean.vo.CompanyVo;
import com.ccsens.pims.bean.vo.ProductVo;
import com.ccsens.pims.service.IProductService;
import com.ccsens.util.JsonResponse;
import com.ccsens.util.bean.dto.QueryDto;
@ -51,9 +52,9 @@ public class ProductController {
@MustLogin
@ApiOperation(value = "查看所有产品销售收入", notes = "")
@RequestMapping(value = "/product/all", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<List<CompanyVo.ProductIncomeAll>> queryProductIncome(@ApiParam @Validated @RequestBody QueryDto<CompanyDto.Project> params) {
public JsonResponse<List<ProductVo.ProductInfo>> queryProductIncome(@ApiParam @Validated @RequestBody QueryDto<CompanyDto.Project> params) {
log.info("查看所有产品销售收入:{}",params);
List<CompanyVo.ProductIncomeAll> productIncomeList = productService.queryProductIncome(params);
List<ProductVo.ProductInfo> productIncomeList = productService.queryProductIncome(params);
return JsonResponse.newInstance().ok(productIncomeList);
}
@ -69,27 +70,27 @@ public class ProductController {
@MustLogin
@ApiOperation(value = "总成本费用估算表", notes = "")
@RequestMapping(value = "/cost", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<List<CompanyVo.TotalCost>> getTotalCost(@ApiParam @Validated @RequestBody QueryDto<CompanyDto.Project> params) {
public JsonResponse<List<ProductVo.ProductCost>> getTotalCost(@ApiParam @Validated @RequestBody QueryDto<CompanyDto.Project> params) {
log.info("总成本费用估算表:{}",params);
List<CompanyVo.TotalCost> totalCostList = productService.getTotalCost(params);
return JsonResponse.newInstance().ok(totalCostList);
List<ProductVo.ProductCost> monthCosts = productService.getTotalCost(params);
return JsonResponse.newInstance().ok(monthCosts);
}
@MustLogin
@ApiOperation(value = "损益表", notes = "")
@RequestMapping(value = "/income", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<List<CompanyVo.IncomeType>> getIncome(@ApiParam @Validated @RequestBody QueryDto<CompanyDto.Project> params) {
public JsonResponse<List<ProductVo.IncomeType>> getIncome(@ApiParam @Validated @RequestBody QueryDto<CompanyDto.Project> params) {
log.info("损益表:{}",params);
List<CompanyVo.IncomeType> incomeList = productService.getIncome(params);
List<ProductVo.IncomeType> incomeList = productService.queryIncome(params);
return JsonResponse.newInstance().ok(incomeList);
}
@MustLogin
@ApiOperation(value = "现金流表", notes = "")
@RequestMapping(value = "/money", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<List<CompanyVo.MoneyFlowType>> getMonth(@ApiParam @Validated @RequestBody QueryDto<CompanyDto.Project> params) {
public JsonResponse<List<ProductVo.MoneyFlowType>> getMonth(@ApiParam @Validated @RequestBody QueryDto<CompanyDto.Project> params) {
log.info("现金流表:{}",params);
List<CompanyVo.MoneyFlowType> moneyFlowTypes = productService.getMonthFlow(params);
List<ProductVo.MoneyFlowType> moneyFlowTypes = productService.getMonthFlow(params);
return JsonResponse.newInstance().ok(moneyFlowTypes);
}
}

46
pims/src/main/java/com/ccsens/pims/api/ReadController.java

@ -0,0 +1,46 @@
package com.ccsens.pims.api;
import com.ccsens.pims.bean.dto.CompanyDto;
import com.ccsens.pims.service.IRealExcelService;
import com.ccsens.util.JsonResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* @author
*/
@Slf4j
@Api(tags = "报表相关api")
@RestController
@RequestMapping("/read")
public class ReadController {
@Resource
private IRealExcelService realExcelService;
@ApiOperation(value = "读取产品价格依据表", notes = "")
@RequestMapping(value = "/product", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse realProduct(@Validated @RequestBody CompanyDto.Async async) throws Exception {
log.info("读取产品价格依据表:{}",async.toString());
realExcelService.realProduct(async);
return JsonResponse.newInstance().ok();
}
@ApiOperation(value = "读取产品价格依据表", notes = "")
@RequestMapping(value = "/production", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse realProduction(@Validated @RequestBody CompanyDto.Async async) throws Exception {
log.info("读取产品价格依据表:{}",async.toString());
realExcelService.realProduction(async);
return JsonResponse.newInstance().ok();
}
}

10
pims/src/main/java/com/ccsens/pims/api/ReportController.java

@ -32,7 +32,7 @@ public class ReportController {
@MustLogin
@ApiOperation(value = "查看产品价格使用依据表", notes = "")
@RequestMapping(value = "/product", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<List<String>> getProduct(@ApiParam @Validated @RequestBody QueryDto<CompanyDto.Project> params) {
public JsonResponse<List<String>> getProduct(@ApiParam @Validated @RequestBody QueryDto<CompanyDto.Project> params) throws Exception {
log.info("查看产品价格使用依据表:{}",params);
List<String> wpsFilePath = reportService.getProduct(params);
return JsonResponse.newInstance().ok(wpsFilePath);
@ -41,7 +41,7 @@ public class ReportController {
@MustLogin
@ApiOperation(value = "查看产值及附加估算表", notes = "")
@RequestMapping(value = "/production", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<List<String>> getProduction(@ApiParam @Validated @RequestBody QueryDto<CompanyDto.Project> params) {
public JsonResponse<List<String>> getProduction(@ApiParam @Validated @RequestBody QueryDto<CompanyDto.Project> params) throws Exception {
log.info("查看产值及附加估算表:{}",params);
List<String> wpsFilePath = reportService.getProduction(params);
return JsonResponse.newInstance().ok(wpsFilePath);
@ -50,7 +50,7 @@ public class ReportController {
@MustLogin
@ApiOperation(value = "查看总成本费用估算表", notes = "")
@RequestMapping(value = "/cost", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<List<String>> getCost(@ApiParam @Validated @RequestBody QueryDto<CompanyDto.Project> params) {
public JsonResponse<List<String>> getCost(@ApiParam @Validated @RequestBody QueryDto<CompanyDto.Project> params) throws Exception {
log.info("查看总成本费用估算表:{}",params);
List<String> wpsFilePath = reportService.getCost(params);
return JsonResponse.newInstance().ok(wpsFilePath);
@ -59,7 +59,7 @@ public class ReportController {
@MustLogin
@ApiOperation(value = "查看损益表表", notes = "")
@RequestMapping(value = "/income", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<List<String>> getIncome(@ApiParam @Validated @RequestBody QueryDto<CompanyDto.Project> params) {
public JsonResponse<List<String>> getIncome(@ApiParam @Validated @RequestBody QueryDto<CompanyDto.Project> params) throws Exception {
log.info("查看损益表表:{}",params);
List<String> wpsFilePath = reportService.getIncome(params);
return JsonResponse.newInstance().ok(wpsFilePath);
@ -68,7 +68,7 @@ public class ReportController {
@MustLogin
@ApiOperation(value = "查看现金流表", notes = "")
@RequestMapping(value = "/money", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<List<String>> getMoney(@ApiParam @Validated @RequestBody QueryDto<CompanyDto.Project> params) {
public JsonResponse<List<String>> getMoney(@ApiParam @Validated @RequestBody QueryDto<CompanyDto.Project> params) throws Exception {
log.info("查看现金流表:{}",params);
List<String> wpsFilePath = reportService.getMoney(params);
return JsonResponse.newInstance().ok(wpsFilePath);

23
pims/src/main/java/com/ccsens/pims/bean/dto/CompanyDto.java

@ -4,6 +4,8 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
/**
* @author
*/
@ -13,14 +15,35 @@ public class CompanyDto {
@Data
@ApiModel("项目id")
public static class Project{
@NotNull
@ApiModelProperty("项目id")
private Long projectId;
// @NotNull
// @ApiModelProperty("任务id")
// private Long taskId;
}
@Data
@ApiModel("产品id")
public static class Product{
@NotNull
@ApiModelProperty("产品id")
private Long productId;
}
@Data
@ApiModel("读取的excel文件的路径")
public static class FilePath{
@NotNull
@ApiModelProperty("文件路径")
private String path;
}
@Data
@ApiModel("异步通知")
public static class Async{
@NotNull
@ApiModelProperty("文件ID")
private Long fileId;
}
}

4
pims/src/main/java/com/ccsens/pims/bean/dto/ProductDto.java

@ -0,0 +1,4 @@
package com.ccsens.pims.bean.dto;
public class ProductDto {
}

249
pims/src/main/java/com/ccsens/pims/bean/po/CompanyCost.java

@ -1,249 +0,0 @@
package com.ccsens.pims.bean.po;
import java.io.Serializable;
import java.util.Date;
public class CompanyCost implements Serializable {
private Long id;
private Long companyId;
private Long projectId;
private String monthTime;
private Long businessCommission;
private Long commission;
private Long adminExpense;
private Long salary;
private Long insurance;
private Long officeRent;
private Long officeOtherRent;
private Long depreciation;
private Long travelOnBusiness;
private Long market;
private Long onlinePromotion;
private Long offlinePromotion;
private Long businessExpand;
private Long financialAffairs;
private Date createdAt;
private Date updatedAt;
private Byte recStatus;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getCompanyId() {
return companyId;
}
public void setCompanyId(Long companyId) {
this.companyId = companyId;
}
public Long getProjectId() {
return projectId;
}
public void setProjectId(Long projectId) {
this.projectId = projectId;
}
public String getMonthTime() {
return monthTime;
}
public void setMonthTime(String monthTime) {
this.monthTime = monthTime == null ? null : monthTime.trim();
}
public Long getBusinessCommission() {
return businessCommission;
}
public void setBusinessCommission(Long businessCommission) {
this.businessCommission = businessCommission;
}
public Long getCommission() {
return commission;
}
public void setCommission(Long commission) {
this.commission = commission;
}
public Long getAdminExpense() {
return adminExpense;
}
public void setAdminExpense(Long adminExpense) {
this.adminExpense = adminExpense;
}
public Long getSalary() {
return salary;
}
public void setSalary(Long salary) {
this.salary = salary;
}
public Long getInsurance() {
return insurance;
}
public void setInsurance(Long insurance) {
this.insurance = insurance;
}
public Long getOfficeRent() {
return officeRent;
}
public void setOfficeRent(Long officeRent) {
this.officeRent = officeRent;
}
public Long getOfficeOtherRent() {
return officeOtherRent;
}
public void setOfficeOtherRent(Long officeOtherRent) {
this.officeOtherRent = officeOtherRent;
}
public Long getDepreciation() {
return depreciation;
}
public void setDepreciation(Long depreciation) {
this.depreciation = depreciation;
}
public Long getTravelOnBusiness() {
return travelOnBusiness;
}
public void setTravelOnBusiness(Long travelOnBusiness) {
this.travelOnBusiness = travelOnBusiness;
}
public Long getMarket() {
return market;
}
public void setMarket(Long market) {
this.market = market;
}
public Long getOnlinePromotion() {
return onlinePromotion;
}
public void setOnlinePromotion(Long onlinePromotion) {
this.onlinePromotion = onlinePromotion;
}
public Long getOfflinePromotion() {
return offlinePromotion;
}
public void setOfflinePromotion(Long offlinePromotion) {
this.offlinePromotion = offlinePromotion;
}
public Long getBusinessExpand() {
return businessExpand;
}
public void setBusinessExpand(Long businessExpand) {
this.businessExpand = businessExpand;
}
public Long getFinancialAffairs() {
return financialAffairs;
}
public void setFinancialAffairs(Long financialAffairs) {
this.financialAffairs = financialAffairs;
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
public Byte getRecStatus() {
return recStatus;
}
public void setRecStatus(Byte recStatus) {
this.recStatus = recStatus;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", companyId=").append(companyId);
sb.append(", projectId=").append(projectId);
sb.append(", monthTime=").append(monthTime);
sb.append(", businessCommission=").append(businessCommission);
sb.append(", commission=").append(commission);
sb.append(", adminExpense=").append(adminExpense);
sb.append(", salary=").append(salary);
sb.append(", insurance=").append(insurance);
sb.append(", officeRent=").append(officeRent);
sb.append(", officeOtherRent=").append(officeOtherRent);
sb.append(", depreciation=").append(depreciation);
sb.append(", travelOnBusiness=").append(travelOnBusiness);
sb.append(", market=").append(market);
sb.append(", onlinePromotion=").append(onlinePromotion);
sb.append(", offlinePromotion=").append(offlinePromotion);
sb.append(", businessExpand=").append(businessExpand);
sb.append(", financialAffairs=").append(financialAffairs);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append("]");
return sb.toString();
}
}

1471
pims/src/main/java/com/ccsens/pims/bean/po/CompanyCostExample.java

File diff suppressed because it is too large

128
pims/src/main/java/com/ccsens/pims/bean/po/CostLog.java

@ -0,0 +1,128 @@
package com.ccsens.pims.bean.po;
import java.io.Serializable;
import java.util.Date;
public class CostLog implements Serializable {
private Long id;
private Long costTypeId;
private Byte productCost;
private Integer yearTime;
private Integer monthTime;
private Long predictCost;
private Long realCost;
private Date createdAt;
private Date updatedAt;
private Byte recStatus;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getCostTypeId() {
return costTypeId;
}
public void setCostTypeId(Long costTypeId) {
this.costTypeId = costTypeId;
}
public Byte getProductCost() {
return productCost;
}
public void setProductCost(Byte productCost) {
this.productCost = productCost;
}
public Integer getYearTime() {
return yearTime;
}
public void setYearTime(Integer yearTime) {
this.yearTime = yearTime;
}
public Integer getMonthTime() {
return monthTime;
}
public void setMonthTime(Integer monthTime) {
this.monthTime = monthTime;
}
public Long getPredictCost() {
return predictCost;
}
public void setPredictCost(Long predictCost) {
this.predictCost = predictCost;
}
public Long getRealCost() {
return realCost;
}
public void setRealCost(Long realCost) {
this.realCost = realCost;
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
public Byte getRecStatus() {
return recStatus;
}
public void setRecStatus(Byte recStatus) {
this.recStatus = recStatus;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", costTypeId=").append(costTypeId);
sb.append(", productCost=").append(productCost);
sb.append(", yearTime=").append(yearTime);
sb.append(", monthTime=").append(monthTime);
sb.append(", predictCost=").append(predictCost);
sb.append(", realCost=").append(realCost);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append("]");
return sb.toString();
}
}

801
pims/src/main/java/com/ccsens/pims/bean/po/CostLogExample.java

@ -0,0 +1,801 @@
package com.ccsens.pims.bean.po;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class CostLogExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public CostLogExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andCostTypeIdIsNull() {
addCriterion("cost_type_id is null");
return (Criteria) this;
}
public Criteria andCostTypeIdIsNotNull() {
addCriterion("cost_type_id is not null");
return (Criteria) this;
}
public Criteria andCostTypeIdEqualTo(Long value) {
addCriterion("cost_type_id =", value, "costTypeId");
return (Criteria) this;
}
public Criteria andCostTypeIdNotEqualTo(Long value) {
addCriterion("cost_type_id <>", value, "costTypeId");
return (Criteria) this;
}
public Criteria andCostTypeIdGreaterThan(Long value) {
addCriterion("cost_type_id >", value, "costTypeId");
return (Criteria) this;
}
public Criteria andCostTypeIdGreaterThanOrEqualTo(Long value) {
addCriterion("cost_type_id >=", value, "costTypeId");
return (Criteria) this;
}
public Criteria andCostTypeIdLessThan(Long value) {
addCriterion("cost_type_id <", value, "costTypeId");
return (Criteria) this;
}
public Criteria andCostTypeIdLessThanOrEqualTo(Long value) {
addCriterion("cost_type_id <=", value, "costTypeId");
return (Criteria) this;
}
public Criteria andCostTypeIdIn(List<Long> values) {
addCriterion("cost_type_id in", values, "costTypeId");
return (Criteria) this;
}
public Criteria andCostTypeIdNotIn(List<Long> values) {
addCriterion("cost_type_id not in", values, "costTypeId");
return (Criteria) this;
}
public Criteria andCostTypeIdBetween(Long value1, Long value2) {
addCriterion("cost_type_id between", value1, value2, "costTypeId");
return (Criteria) this;
}
public Criteria andCostTypeIdNotBetween(Long value1, Long value2) {
addCriterion("cost_type_id not between", value1, value2, "costTypeId");
return (Criteria) this;
}
public Criteria andProductCostIsNull() {
addCriterion("product_cost is null");
return (Criteria) this;
}
public Criteria andProductCostIsNotNull() {
addCriterion("product_cost is not null");
return (Criteria) this;
}
public Criteria andProductCostEqualTo(Byte value) {
addCriterion("product_cost =", value, "productCost");
return (Criteria) this;
}
public Criteria andProductCostNotEqualTo(Byte value) {
addCriterion("product_cost <>", value, "productCost");
return (Criteria) this;
}
public Criteria andProductCostGreaterThan(Byte value) {
addCriterion("product_cost >", value, "productCost");
return (Criteria) this;
}
public Criteria andProductCostGreaterThanOrEqualTo(Byte value) {
addCriterion("product_cost >=", value, "productCost");
return (Criteria) this;
}
public Criteria andProductCostLessThan(Byte value) {
addCriterion("product_cost <", value, "productCost");
return (Criteria) this;
}
public Criteria andProductCostLessThanOrEqualTo(Byte value) {
addCriterion("product_cost <=", value, "productCost");
return (Criteria) this;
}
public Criteria andProductCostIn(List<Byte> values) {
addCriterion("product_cost in", values, "productCost");
return (Criteria) this;
}
public Criteria andProductCostNotIn(List<Byte> values) {
addCriterion("product_cost not in", values, "productCost");
return (Criteria) this;
}
public Criteria andProductCostBetween(Byte value1, Byte value2) {
addCriterion("product_cost between", value1, value2, "productCost");
return (Criteria) this;
}
public Criteria andProductCostNotBetween(Byte value1, Byte value2) {
addCriterion("product_cost not between", value1, value2, "productCost");
return (Criteria) this;
}
public Criteria andYearTimeIsNull() {
addCriterion("year_time is null");
return (Criteria) this;
}
public Criteria andYearTimeIsNotNull() {
addCriterion("year_time is not null");
return (Criteria) this;
}
public Criteria andYearTimeEqualTo(Integer value) {
addCriterion("year_time =", value, "yearTime");
return (Criteria) this;
}
public Criteria andYearTimeNotEqualTo(Integer value) {
addCriterion("year_time <>", value, "yearTime");
return (Criteria) this;
}
public Criteria andYearTimeGreaterThan(Integer value) {
addCriterion("year_time >", value, "yearTime");
return (Criteria) this;
}
public Criteria andYearTimeGreaterThanOrEqualTo(Integer value) {
addCriterion("year_time >=", value, "yearTime");
return (Criteria) this;
}
public Criteria andYearTimeLessThan(Integer value) {
addCriterion("year_time <", value, "yearTime");
return (Criteria) this;
}
public Criteria andYearTimeLessThanOrEqualTo(Integer value) {
addCriterion("year_time <=", value, "yearTime");
return (Criteria) this;
}
public Criteria andYearTimeIn(List<Integer> values) {
addCriterion("year_time in", values, "yearTime");
return (Criteria) this;
}
public Criteria andYearTimeNotIn(List<Integer> values) {
addCriterion("year_time not in", values, "yearTime");
return (Criteria) this;
}
public Criteria andYearTimeBetween(Integer value1, Integer value2) {
addCriterion("year_time between", value1, value2, "yearTime");
return (Criteria) this;
}
public Criteria andYearTimeNotBetween(Integer value1, Integer value2) {
addCriterion("year_time not between", value1, value2, "yearTime");
return (Criteria) this;
}
public Criteria andMonthTimeIsNull() {
addCriterion("month_time is null");
return (Criteria) this;
}
public Criteria andMonthTimeIsNotNull() {
addCriterion("month_time is not null");
return (Criteria) this;
}
public Criteria andMonthTimeEqualTo(Integer value) {
addCriterion("month_time =", value, "monthTime");
return (Criteria) this;
}
public Criteria andMonthTimeNotEqualTo(Integer value) {
addCriterion("month_time <>", value, "monthTime");
return (Criteria) this;
}
public Criteria andMonthTimeGreaterThan(Integer value) {
addCriterion("month_time >", value, "monthTime");
return (Criteria) this;
}
public Criteria andMonthTimeGreaterThanOrEqualTo(Integer value) {
addCriterion("month_time >=", value, "monthTime");
return (Criteria) this;
}
public Criteria andMonthTimeLessThan(Integer value) {
addCriterion("month_time <", value, "monthTime");
return (Criteria) this;
}
public Criteria andMonthTimeLessThanOrEqualTo(Integer value) {
addCriterion("month_time <=", value, "monthTime");
return (Criteria) this;
}
public Criteria andMonthTimeIn(List<Integer> values) {
addCriterion("month_time in", values, "monthTime");
return (Criteria) this;
}
public Criteria andMonthTimeNotIn(List<Integer> values) {
addCriterion("month_time not in", values, "monthTime");
return (Criteria) this;
}
public Criteria andMonthTimeBetween(Integer value1, Integer value2) {
addCriterion("month_time between", value1, value2, "monthTime");
return (Criteria) this;
}
public Criteria andMonthTimeNotBetween(Integer value1, Integer value2) {
addCriterion("month_time not between", value1, value2, "monthTime");
return (Criteria) this;
}
public Criteria andPredictCostIsNull() {
addCriterion("predict_cost is null");
return (Criteria) this;
}
public Criteria andPredictCostIsNotNull() {
addCriterion("predict_cost is not null");
return (Criteria) this;
}
public Criteria andPredictCostEqualTo(Long value) {
addCriterion("predict_cost =", value, "predictCost");
return (Criteria) this;
}
public Criteria andPredictCostNotEqualTo(Long value) {
addCriterion("predict_cost <>", value, "predictCost");
return (Criteria) this;
}
public Criteria andPredictCostGreaterThan(Long value) {
addCriterion("predict_cost >", value, "predictCost");
return (Criteria) this;
}
public Criteria andPredictCostGreaterThanOrEqualTo(Long value) {
addCriterion("predict_cost >=", value, "predictCost");
return (Criteria) this;
}
public Criteria andPredictCostLessThan(Long value) {
addCriterion("predict_cost <", value, "predictCost");
return (Criteria) this;
}
public Criteria andPredictCostLessThanOrEqualTo(Long value) {
addCriterion("predict_cost <=", value, "predictCost");
return (Criteria) this;
}
public Criteria andPredictCostIn(List<Long> values) {
addCriterion("predict_cost in", values, "predictCost");
return (Criteria) this;
}
public Criteria andPredictCostNotIn(List<Long> values) {
addCriterion("predict_cost not in", values, "predictCost");
return (Criteria) this;
}
public Criteria andPredictCostBetween(Long value1, Long value2) {
addCriterion("predict_cost between", value1, value2, "predictCost");
return (Criteria) this;
}
public Criteria andPredictCostNotBetween(Long value1, Long value2) {
addCriterion("predict_cost not between", value1, value2, "predictCost");
return (Criteria) this;
}
public Criteria andRealCostIsNull() {
addCriterion("real_cost is null");
return (Criteria) this;
}
public Criteria andRealCostIsNotNull() {
addCriterion("real_cost is not null");
return (Criteria) this;
}
public Criteria andRealCostEqualTo(Long value) {
addCriterion("real_cost =", value, "realCost");
return (Criteria) this;
}
public Criteria andRealCostNotEqualTo(Long value) {
addCriterion("real_cost <>", value, "realCost");
return (Criteria) this;
}
public Criteria andRealCostGreaterThan(Long value) {
addCriterion("real_cost >", value, "realCost");
return (Criteria) this;
}
public Criteria andRealCostGreaterThanOrEqualTo(Long value) {
addCriterion("real_cost >=", value, "realCost");
return (Criteria) this;
}
public Criteria andRealCostLessThan(Long value) {
addCriterion("real_cost <", value, "realCost");
return (Criteria) this;
}
public Criteria andRealCostLessThanOrEqualTo(Long value) {
addCriterion("real_cost <=", value, "realCost");
return (Criteria) this;
}
public Criteria andRealCostIn(List<Long> values) {
addCriterion("real_cost in", values, "realCost");
return (Criteria) this;
}
public Criteria andRealCostNotIn(List<Long> values) {
addCriterion("real_cost not in", values, "realCost");
return (Criteria) this;
}
public Criteria andRealCostBetween(Long value1, Long value2) {
addCriterion("real_cost between", value1, value2, "realCost");
return (Criteria) this;
}
public Criteria andRealCostNotBetween(Long value1, Long value2) {
addCriterion("real_cost not between", value1, value2, "realCost");
return (Criteria) this;
}
public Criteria andCreatedAtIsNull() {
addCriterion("created_at is null");
return (Criteria) this;
}
public Criteria andCreatedAtIsNotNull() {
addCriterion("created_at is not null");
return (Criteria) this;
}
public Criteria andCreatedAtEqualTo(Date value) {
addCriterion("created_at =", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotEqualTo(Date value) {
addCriterion("created_at <>", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThan(Date value) {
addCriterion("created_at >", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("created_at >=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThan(Date value) {
addCriterion("created_at <", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThanOrEqualTo(Date value) {
addCriterion("created_at <=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtIn(List<Date> values) {
addCriterion("created_at in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotIn(List<Date> values) {
addCriterion("created_at not in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtBetween(Date value1, Date value2) {
addCriterion("created_at between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotBetween(Date value1, Date value2) {
addCriterion("created_at not between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNull() {
addCriterion("updated_at is null");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNotNull() {
addCriterion("updated_at is not null");
return (Criteria) this;
}
public Criteria andUpdatedAtEqualTo(Date value) {
addCriterion("updated_at =", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotEqualTo(Date value) {
addCriterion("updated_at <>", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThan(Date value) {
addCriterion("updated_at >", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("updated_at >=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThan(Date value) {
addCriterion("updated_at <", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThanOrEqualTo(Date value) {
addCriterion("updated_at <=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIn(List<Date> values) {
addCriterion("updated_at in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotIn(List<Date> values) {
addCriterion("updated_at not in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtBetween(Date value1, Date value2) {
addCriterion("updated_at between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotBetween(Date value1, Date value2) {
addCriterion("updated_at not between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andRecStatusIsNull() {
addCriterion("rec_status is null");
return (Criteria) this;
}
public Criteria andRecStatusIsNotNull() {
addCriterion("rec_status is not null");
return (Criteria) this;
}
public Criteria andRecStatusEqualTo(Byte value) {
addCriterion("rec_status =", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotEqualTo(Byte value) {
addCriterion("rec_status <>", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusGreaterThan(Byte value) {
addCriterion("rec_status >", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) {
addCriterion("rec_status >=", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusLessThan(Byte value) {
addCriterion("rec_status <", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusLessThanOrEqualTo(Byte value) {
addCriterion("rec_status <=", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusIn(List<Byte> values) {
addCriterion("rec_status in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotIn(List<Byte> values) {
addCriterion("rec_status not in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusBetween(Byte value1, Byte value2) {
addCriterion("rec_status between", value1, value2, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotBetween(Byte value1, Byte value2) {
addCriterion("rec_status not between", value1, value2, "recStatus");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

117
pims/src/main/java/com/ccsens/pims/bean/po/CostType.java

@ -0,0 +1,117 @@
package com.ccsens.pims.bean.po;
import java.io.Serializable;
import java.util.Date;
public class CostType implements Serializable {
private Long id;
private Long companyId;
private Long projectId;
private String name;
private Byte level;
private Long parentId;
private Date createdAt;
private Date updatedAt;
private Byte recStatus;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getCompanyId() {
return companyId;
}
public void setCompanyId(Long companyId) {
this.companyId = companyId;
}
public Long getProjectId() {
return projectId;
}
public void setProjectId(Long projectId) {
this.projectId = projectId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
public Byte getLevel() {
return level;
}
public void setLevel(Byte level) {
this.level = level;
}
public Long getParentId() {
return parentId;
}
public void setParentId(Long parentId) {
this.parentId = parentId;
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
public Byte getRecStatus() {
return recStatus;
}
public void setRecStatus(Byte recStatus) {
this.recStatus = recStatus;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", companyId=").append(companyId);
sb.append(", projectId=").append(projectId);
sb.append(", name=").append(name);
sb.append(", level=").append(level);
sb.append(", parentId=").append(parentId);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append("]");
return sb.toString();
}
}

751
pims/src/main/java/com/ccsens/pims/bean/po/CostTypeExample.java

@ -0,0 +1,751 @@
package com.ccsens.pims.bean.po;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class CostTypeExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public CostTypeExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andCompanyIdIsNull() {
addCriterion("company_id is null");
return (Criteria) this;
}
public Criteria andCompanyIdIsNotNull() {
addCriterion("company_id is not null");
return (Criteria) this;
}
public Criteria andCompanyIdEqualTo(Long value) {
addCriterion("company_id =", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdNotEqualTo(Long value) {
addCriterion("company_id <>", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdGreaterThan(Long value) {
addCriterion("company_id >", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdGreaterThanOrEqualTo(Long value) {
addCriterion("company_id >=", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdLessThan(Long value) {
addCriterion("company_id <", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdLessThanOrEqualTo(Long value) {
addCriterion("company_id <=", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdIn(List<Long> values) {
addCriterion("company_id in", values, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdNotIn(List<Long> values) {
addCriterion("company_id not in", values, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdBetween(Long value1, Long value2) {
addCriterion("company_id between", value1, value2, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdNotBetween(Long value1, Long value2) {
addCriterion("company_id not between", value1, value2, "companyId");
return (Criteria) this;
}
public Criteria andProjectIdIsNull() {
addCriterion("project_id is null");
return (Criteria) this;
}
public Criteria andProjectIdIsNotNull() {
addCriterion("project_id is not null");
return (Criteria) this;
}
public Criteria andProjectIdEqualTo(Long value) {
addCriterion("project_id =", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdNotEqualTo(Long value) {
addCriterion("project_id <>", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdGreaterThan(Long value) {
addCriterion("project_id >", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdGreaterThanOrEqualTo(Long value) {
addCriterion("project_id >=", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdLessThan(Long value) {
addCriterion("project_id <", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdLessThanOrEqualTo(Long value) {
addCriterion("project_id <=", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdIn(List<Long> values) {
addCriterion("project_id in", values, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdNotIn(List<Long> values) {
addCriterion("project_id not in", values, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdBetween(Long value1, Long value2) {
addCriterion("project_id between", value1, value2, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdNotBetween(Long value1, Long value2) {
addCriterion("project_id not between", value1, value2, "projectId");
return (Criteria) this;
}
public Criteria andNameIsNull() {
addCriterion("name is null");
return (Criteria) this;
}
public Criteria andNameIsNotNull() {
addCriterion("name is not null");
return (Criteria) this;
}
public Criteria andNameEqualTo(String value) {
addCriterion("name =", value, "name");
return (Criteria) this;
}
public Criteria andNameNotEqualTo(String value) {
addCriterion("name <>", value, "name");
return (Criteria) this;
}
public Criteria andNameGreaterThan(String value) {
addCriterion("name >", value, "name");
return (Criteria) this;
}
public Criteria andNameGreaterThanOrEqualTo(String value) {
addCriterion("name >=", value, "name");
return (Criteria) this;
}
public Criteria andNameLessThan(String value) {
addCriterion("name <", value, "name");
return (Criteria) this;
}
public Criteria andNameLessThanOrEqualTo(String value) {
addCriterion("name <=", value, "name");
return (Criteria) this;
}
public Criteria andNameLike(String value) {
addCriterion("name like", value, "name");
return (Criteria) this;
}
public Criteria andNameNotLike(String value) {
addCriterion("name not like", value, "name");
return (Criteria) this;
}
public Criteria andNameIn(List<String> values) {
addCriterion("name in", values, "name");
return (Criteria) this;
}
public Criteria andNameNotIn(List<String> values) {
addCriterion("name not in", values, "name");
return (Criteria) this;
}
public Criteria andNameBetween(String value1, String value2) {
addCriterion("name between", value1, value2, "name");
return (Criteria) this;
}
public Criteria andNameNotBetween(String value1, String value2) {
addCriterion("name not between", value1, value2, "name");
return (Criteria) this;
}
public Criteria andLevelIsNull() {
addCriterion("level is null");
return (Criteria) this;
}
public Criteria andLevelIsNotNull() {
addCriterion("level is not null");
return (Criteria) this;
}
public Criteria andLevelEqualTo(Byte value) {
addCriterion("level =", value, "level");
return (Criteria) this;
}
public Criteria andLevelNotEqualTo(Byte value) {
addCriterion("level <>", value, "level");
return (Criteria) this;
}
public Criteria andLevelGreaterThan(Byte value) {
addCriterion("level >", value, "level");
return (Criteria) this;
}
public Criteria andLevelGreaterThanOrEqualTo(Byte value) {
addCriterion("level >=", value, "level");
return (Criteria) this;
}
public Criteria andLevelLessThan(Byte value) {
addCriterion("level <", value, "level");
return (Criteria) this;
}
public Criteria andLevelLessThanOrEqualTo(Byte value) {
addCriterion("level <=", value, "level");
return (Criteria) this;
}
public Criteria andLevelIn(List<Byte> values) {
addCriterion("level in", values, "level");
return (Criteria) this;
}
public Criteria andLevelNotIn(List<Byte> values) {
addCriterion("level not in", values, "level");
return (Criteria) this;
}
public Criteria andLevelBetween(Byte value1, Byte value2) {
addCriterion("level between", value1, value2, "level");
return (Criteria) this;
}
public Criteria andLevelNotBetween(Byte value1, Byte value2) {
addCriterion("level not between", value1, value2, "level");
return (Criteria) this;
}
public Criteria andParentIdIsNull() {
addCriterion("parent_id is null");
return (Criteria) this;
}
public Criteria andParentIdIsNotNull() {
addCriterion("parent_id is not null");
return (Criteria) this;
}
public Criteria andParentIdEqualTo(Long value) {
addCriterion("parent_id =", value, "parentId");
return (Criteria) this;
}
public Criteria andParentIdNotEqualTo(Long value) {
addCriterion("parent_id <>", value, "parentId");
return (Criteria) this;
}
public Criteria andParentIdGreaterThan(Long value) {
addCriterion("parent_id >", value, "parentId");
return (Criteria) this;
}
public Criteria andParentIdGreaterThanOrEqualTo(Long value) {
addCriterion("parent_id >=", value, "parentId");
return (Criteria) this;
}
public Criteria andParentIdLessThan(Long value) {
addCriterion("parent_id <", value, "parentId");
return (Criteria) this;
}
public Criteria andParentIdLessThanOrEqualTo(Long value) {
addCriterion("parent_id <=", value, "parentId");
return (Criteria) this;
}
public Criteria andParentIdIn(List<Long> values) {
addCriterion("parent_id in", values, "parentId");
return (Criteria) this;
}
public Criteria andParentIdNotIn(List<Long> values) {
addCriterion("parent_id not in", values, "parentId");
return (Criteria) this;
}
public Criteria andParentIdBetween(Long value1, Long value2) {
addCriterion("parent_id between", value1, value2, "parentId");
return (Criteria) this;
}
public Criteria andParentIdNotBetween(Long value1, Long value2) {
addCriterion("parent_id not between", value1, value2, "parentId");
return (Criteria) this;
}
public Criteria andCreatedAtIsNull() {
addCriterion("created_at is null");
return (Criteria) this;
}
public Criteria andCreatedAtIsNotNull() {
addCriterion("created_at is not null");
return (Criteria) this;
}
public Criteria andCreatedAtEqualTo(Date value) {
addCriterion("created_at =", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotEqualTo(Date value) {
addCriterion("created_at <>", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThan(Date value) {
addCriterion("created_at >", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("created_at >=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThan(Date value) {
addCriterion("created_at <", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThanOrEqualTo(Date value) {
addCriterion("created_at <=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtIn(List<Date> values) {
addCriterion("created_at in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotIn(List<Date> values) {
addCriterion("created_at not in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtBetween(Date value1, Date value2) {
addCriterion("created_at between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotBetween(Date value1, Date value2) {
addCriterion("created_at not between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNull() {
addCriterion("updated_at is null");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNotNull() {
addCriterion("updated_at is not null");
return (Criteria) this;
}
public Criteria andUpdatedAtEqualTo(Date value) {
addCriterion("updated_at =", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotEqualTo(Date value) {
addCriterion("updated_at <>", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThan(Date value) {
addCriterion("updated_at >", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("updated_at >=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThan(Date value) {
addCriterion("updated_at <", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThanOrEqualTo(Date value) {
addCriterion("updated_at <=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIn(List<Date> values) {
addCriterion("updated_at in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotIn(List<Date> values) {
addCriterion("updated_at not in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtBetween(Date value1, Date value2) {
addCriterion("updated_at between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotBetween(Date value1, Date value2) {
addCriterion("updated_at not between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andRecStatusIsNull() {
addCriterion("rec_status is null");
return (Criteria) this;
}
public Criteria andRecStatusIsNotNull() {
addCriterion("rec_status is not null");
return (Criteria) this;
}
public Criteria andRecStatusEqualTo(Byte value) {
addCriterion("rec_status =", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotEqualTo(Byte value) {
addCriterion("rec_status <>", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusGreaterThan(Byte value) {
addCriterion("rec_status >", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) {
addCriterion("rec_status >=", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusLessThan(Byte value) {
addCriterion("rec_status <", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusLessThanOrEqualTo(Byte value) {
addCriterion("rec_status <=", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusIn(List<Byte> values) {
addCriterion("rec_status in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotIn(List<Byte> values) {
addCriterion("rec_status not in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusBetween(Byte value1, Byte value2) {
addCriterion("rec_status between", value1, value2, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotBetween(Byte value1, Byte value2) {
addCriterion("rec_status not between", value1, value2, "recStatus");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

19
pims/src/main/java/com/ccsens/pims/bean/po/IncomeStatementsLog.java

@ -12,7 +12,9 @@ public class IncomeStatementsLog implements Serializable {
private Long incomeStatementsId;
private String monthTime;
private Integer yearIncome;
private Integer monthTime;
private Long predictMoney;
@ -58,12 +60,20 @@ public class IncomeStatementsLog implements Serializable {
this.incomeStatementsId = incomeStatementsId;
}
public String getMonthTime() {
public Integer getYearIncome() {
return yearIncome;
}
public void setYearIncome(Integer yearIncome) {
this.yearIncome = yearIncome;
}
public Integer getMonthTime() {
return monthTime;
}
public void setMonthTime(String monthTime) {
this.monthTime = monthTime == null ? null : monthTime.trim();
public void setMonthTime(Integer monthTime) {
this.monthTime = monthTime;
}
public Long getPredictMoney() {
@ -116,6 +126,7 @@ public class IncomeStatementsLog implements Serializable {
sb.append(", companyId=").append(companyId);
sb.append(", projectId=").append(projectId);
sb.append(", incomeStatementsId=").append(incomeStatementsId);
sb.append(", yearIncome=").append(yearIncome);
sb.append(", monthTime=").append(monthTime);
sb.append(", predictMoney=").append(predictMoney);
sb.append(", realMoney=").append(realMoney);

90
pims/src/main/java/com/ccsens/pims/bean/po/IncomeStatementsLogExample.java

@ -345,6 +345,66 @@ public class IncomeStatementsLogExample {
return (Criteria) this;
}
public Criteria andYearIncomeIsNull() {
addCriterion("year_income is null");
return (Criteria) this;
}
public Criteria andYearIncomeIsNotNull() {
addCriterion("year_income is not null");
return (Criteria) this;
}
public Criteria andYearIncomeEqualTo(Integer value) {
addCriterion("year_income =", value, "yearIncome");
return (Criteria) this;
}
public Criteria andYearIncomeNotEqualTo(Integer value) {
addCriterion("year_income <>", value, "yearIncome");
return (Criteria) this;
}
public Criteria andYearIncomeGreaterThan(Integer value) {
addCriterion("year_income >", value, "yearIncome");
return (Criteria) this;
}
public Criteria andYearIncomeGreaterThanOrEqualTo(Integer value) {
addCriterion("year_income >=", value, "yearIncome");
return (Criteria) this;
}
public Criteria andYearIncomeLessThan(Integer value) {
addCriterion("year_income <", value, "yearIncome");
return (Criteria) this;
}
public Criteria andYearIncomeLessThanOrEqualTo(Integer value) {
addCriterion("year_income <=", value, "yearIncome");
return (Criteria) this;
}
public Criteria andYearIncomeIn(List<Integer> values) {
addCriterion("year_income in", values, "yearIncome");
return (Criteria) this;
}
public Criteria andYearIncomeNotIn(List<Integer> values) {
addCriterion("year_income not in", values, "yearIncome");
return (Criteria) this;
}
public Criteria andYearIncomeBetween(Integer value1, Integer value2) {
addCriterion("year_income between", value1, value2, "yearIncome");
return (Criteria) this;
}
public Criteria andYearIncomeNotBetween(Integer value1, Integer value2) {
addCriterion("year_income not between", value1, value2, "yearIncome");
return (Criteria) this;
}
public Criteria andMonthTimeIsNull() {
addCriterion("month_time is null");
return (Criteria) this;
@ -355,62 +415,52 @@ public class IncomeStatementsLogExample {
return (Criteria) this;
}
public Criteria andMonthTimeEqualTo(String value) {
public Criteria andMonthTimeEqualTo(Integer value) {
addCriterion("month_time =", value, "monthTime");
return (Criteria) this;
}
public Criteria andMonthTimeNotEqualTo(String value) {
public Criteria andMonthTimeNotEqualTo(Integer value) {
addCriterion("month_time <>", value, "monthTime");
return (Criteria) this;
}
public Criteria andMonthTimeGreaterThan(String value) {
public Criteria andMonthTimeGreaterThan(Integer value) {
addCriterion("month_time >", value, "monthTime");
return (Criteria) this;
}
public Criteria andMonthTimeGreaterThanOrEqualTo(String value) {
public Criteria andMonthTimeGreaterThanOrEqualTo(Integer value) {
addCriterion("month_time >=", value, "monthTime");
return (Criteria) this;
}
public Criteria andMonthTimeLessThan(String value) {
public Criteria andMonthTimeLessThan(Integer value) {
addCriterion("month_time <", value, "monthTime");
return (Criteria) this;
}
public Criteria andMonthTimeLessThanOrEqualTo(String value) {
public Criteria andMonthTimeLessThanOrEqualTo(Integer value) {
addCriterion("month_time <=", value, "monthTime");
return (Criteria) this;
}
public Criteria andMonthTimeLike(String value) {
addCriterion("month_time like", value, "monthTime");
return (Criteria) this;
}
public Criteria andMonthTimeNotLike(String value) {
addCriterion("month_time not like", value, "monthTime");
return (Criteria) this;
}
public Criteria andMonthTimeIn(List<String> values) {
public Criteria andMonthTimeIn(List<Integer> values) {
addCriterion("month_time in", values, "monthTime");
return (Criteria) this;
}
public Criteria andMonthTimeNotIn(List<String> values) {
public Criteria andMonthTimeNotIn(List<Integer> values) {
addCriterion("month_time not in", values, "monthTime");
return (Criteria) this;
}
public Criteria andMonthTimeBetween(String value1, String value2) {
public Criteria andMonthTimeBetween(Integer value1, Integer value2) {
addCriterion("month_time between", value1, value2, "monthTime");
return (Criteria) this;
}
public Criteria andMonthTimeNotBetween(String value1, String value2) {
public Criteria andMonthTimeNotBetween(Integer value1, Integer value2) {
addCriterion("month_time not between", value1, value2, "monthTime");
return (Criteria) this;
}

19
pims/src/main/java/com/ccsens/pims/bean/po/MoneyFlowLog.java

@ -12,7 +12,9 @@ public class MoneyFlowLog implements Serializable {
private Long moneyFlowId;
private String monthTime;
private Integer yearIncome;
private Integer monthTime;
private Long predictMoney;
@ -58,12 +60,20 @@ public class MoneyFlowLog implements Serializable {
this.moneyFlowId = moneyFlowId;
}
public String getMonthTime() {
public Integer getYearIncome() {
return yearIncome;
}
public void setYearIncome(Integer yearIncome) {
this.yearIncome = yearIncome;
}
public Integer getMonthTime() {
return monthTime;
}
public void setMonthTime(String monthTime) {
this.monthTime = monthTime == null ? null : monthTime.trim();
public void setMonthTime(Integer monthTime) {
this.monthTime = monthTime;
}
public Long getPredictMoney() {
@ -116,6 +126,7 @@ public class MoneyFlowLog implements Serializable {
sb.append(", companyId=").append(companyId);
sb.append(", projectId=").append(projectId);
sb.append(", moneyFlowId=").append(moneyFlowId);
sb.append(", yearIncome=").append(yearIncome);
sb.append(", monthTime=").append(monthTime);
sb.append(", predictMoney=").append(predictMoney);
sb.append(", realMoney=").append(realMoney);

90
pims/src/main/java/com/ccsens/pims/bean/po/MoneyFlowLogExample.java

@ -345,6 +345,66 @@ public class MoneyFlowLogExample {
return (Criteria) this;
}
public Criteria andYearIncomeIsNull() {
addCriterion("year_income is null");
return (Criteria) this;
}
public Criteria andYearIncomeIsNotNull() {
addCriterion("year_income is not null");
return (Criteria) this;
}
public Criteria andYearIncomeEqualTo(Integer value) {
addCriterion("year_income =", value, "yearIncome");
return (Criteria) this;
}
public Criteria andYearIncomeNotEqualTo(Integer value) {
addCriterion("year_income <>", value, "yearIncome");
return (Criteria) this;
}
public Criteria andYearIncomeGreaterThan(Integer value) {
addCriterion("year_income >", value, "yearIncome");
return (Criteria) this;
}
public Criteria andYearIncomeGreaterThanOrEqualTo(Integer value) {
addCriterion("year_income >=", value, "yearIncome");
return (Criteria) this;
}
public Criteria andYearIncomeLessThan(Integer value) {
addCriterion("year_income <", value, "yearIncome");
return (Criteria) this;
}
public Criteria andYearIncomeLessThanOrEqualTo(Integer value) {
addCriterion("year_income <=", value, "yearIncome");
return (Criteria) this;
}
public Criteria andYearIncomeIn(List<Integer> values) {
addCriterion("year_income in", values, "yearIncome");
return (Criteria) this;
}
public Criteria andYearIncomeNotIn(List<Integer> values) {
addCriterion("year_income not in", values, "yearIncome");
return (Criteria) this;
}
public Criteria andYearIncomeBetween(Integer value1, Integer value2) {
addCriterion("year_income between", value1, value2, "yearIncome");
return (Criteria) this;
}
public Criteria andYearIncomeNotBetween(Integer value1, Integer value2) {
addCriterion("year_income not between", value1, value2, "yearIncome");
return (Criteria) this;
}
public Criteria andMonthTimeIsNull() {
addCriterion("month_time is null");
return (Criteria) this;
@ -355,62 +415,52 @@ public class MoneyFlowLogExample {
return (Criteria) this;
}
public Criteria andMonthTimeEqualTo(String value) {
public Criteria andMonthTimeEqualTo(Integer value) {
addCriterion("month_time =", value, "monthTime");
return (Criteria) this;
}
public Criteria andMonthTimeNotEqualTo(String value) {
public Criteria andMonthTimeNotEqualTo(Integer value) {
addCriterion("month_time <>", value, "monthTime");
return (Criteria) this;
}
public Criteria andMonthTimeGreaterThan(String value) {
public Criteria andMonthTimeGreaterThan(Integer value) {
addCriterion("month_time >", value, "monthTime");
return (Criteria) this;
}
public Criteria andMonthTimeGreaterThanOrEqualTo(String value) {
public Criteria andMonthTimeGreaterThanOrEqualTo(Integer value) {
addCriterion("month_time >=", value, "monthTime");
return (Criteria) this;
}
public Criteria andMonthTimeLessThan(String value) {
public Criteria andMonthTimeLessThan(Integer value) {
addCriterion("month_time <", value, "monthTime");
return (Criteria) this;
}
public Criteria andMonthTimeLessThanOrEqualTo(String value) {
public Criteria andMonthTimeLessThanOrEqualTo(Integer value) {
addCriterion("month_time <=", value, "monthTime");
return (Criteria) this;
}
public Criteria andMonthTimeLike(String value) {
addCriterion("month_time like", value, "monthTime");
return (Criteria) this;
}
public Criteria andMonthTimeNotLike(String value) {
addCriterion("month_time not like", value, "monthTime");
return (Criteria) this;
}
public Criteria andMonthTimeIn(List<String> values) {
public Criteria andMonthTimeIn(List<Integer> values) {
addCriterion("month_time in", values, "monthTime");
return (Criteria) this;
}
public Criteria andMonthTimeNotIn(List<String> values) {
public Criteria andMonthTimeNotIn(List<Integer> values) {
addCriterion("month_time not in", values, "monthTime");
return (Criteria) this;
}
public Criteria andMonthTimeBetween(String value1, String value2) {
public Criteria andMonthTimeBetween(Integer value1, Integer value2) {
addCriterion("month_time between", value1, value2, "monthTime");
return (Criteria) this;
}
public Criteria andMonthTimeNotBetween(String value1, String value2) {
public Criteria andMonthTimeNotBetween(Integer value1, Integer value2) {
addCriterion("month_time not between", value1, value2, "monthTime");
return (Criteria) this;
}

14
pims/src/main/java/com/ccsens/pims/bean/po/Product.java

@ -14,13 +14,13 @@ public class Product implements Serializable {
private String description;
private Byte productTypeId;
private Long productTypeId;
private Long pricing;
private Long priceUnits;
private Integer grossMargin;
private String grossMargin;
private Byte significanceSort;
@ -72,11 +72,11 @@ public class Product implements Serializable {
this.description = description == null ? null : description.trim();
}
public Byte getProductTypeId() {
public Long getProductTypeId() {
return productTypeId;
}
public void setProductTypeId(Byte productTypeId) {
public void setProductTypeId(Long productTypeId) {
this.productTypeId = productTypeId;
}
@ -96,12 +96,12 @@ public class Product implements Serializable {
this.priceUnits = priceUnits;
}
public Integer getGrossMargin() {
public String getGrossMargin() {
return grossMargin;
}
public void setGrossMargin(Integer grossMargin) {
this.grossMargin = grossMargin;
public void setGrossMargin(String grossMargin) {
this.grossMargin = grossMargin == null ? null : grossMargin.trim();
}
public Byte getSignificanceSort() {

50
pims/src/main/java/com/ccsens/pims/bean/po/ProductExample.java

@ -435,52 +435,52 @@ public class ProductExample {
return (Criteria) this;
}
public Criteria andProductTypeIdEqualTo(Byte value) {
public Criteria andProductTypeIdEqualTo(Long value) {
addCriterion("product_type_id =", value, "productTypeId");
return (Criteria) this;
}
public Criteria andProductTypeIdNotEqualTo(Byte value) {
public Criteria andProductTypeIdNotEqualTo(Long value) {
addCriterion("product_type_id <>", value, "productTypeId");
return (Criteria) this;
}
public Criteria andProductTypeIdGreaterThan(Byte value) {
public Criteria andProductTypeIdGreaterThan(Long value) {
addCriterion("product_type_id >", value, "productTypeId");
return (Criteria) this;
}
public Criteria andProductTypeIdGreaterThanOrEqualTo(Byte value) {
public Criteria andProductTypeIdGreaterThanOrEqualTo(Long value) {
addCriterion("product_type_id >=", value, "productTypeId");
return (Criteria) this;
}
public Criteria andProductTypeIdLessThan(Byte value) {
public Criteria andProductTypeIdLessThan(Long value) {
addCriterion("product_type_id <", value, "productTypeId");
return (Criteria) this;
}
public Criteria andProductTypeIdLessThanOrEqualTo(Byte value) {
public Criteria andProductTypeIdLessThanOrEqualTo(Long value) {
addCriterion("product_type_id <=", value, "productTypeId");
return (Criteria) this;
}
public Criteria andProductTypeIdIn(List<Byte> values) {
public Criteria andProductTypeIdIn(List<Long> values) {
addCriterion("product_type_id in", values, "productTypeId");
return (Criteria) this;
}
public Criteria andProductTypeIdNotIn(List<Byte> values) {
public Criteria andProductTypeIdNotIn(List<Long> values) {
addCriterion("product_type_id not in", values, "productTypeId");
return (Criteria) this;
}
public Criteria andProductTypeIdBetween(Byte value1, Byte value2) {
public Criteria andProductTypeIdBetween(Long value1, Long value2) {
addCriterion("product_type_id between", value1, value2, "productTypeId");
return (Criteria) this;
}
public Criteria andProductTypeIdNotBetween(Byte value1, Byte value2) {
public Criteria andProductTypeIdNotBetween(Long value1, Long value2) {
addCriterion("product_type_id not between", value1, value2, "productTypeId");
return (Criteria) this;
}
@ -615,52 +615,62 @@ public class ProductExample {
return (Criteria) this;
}
public Criteria andGrossMarginEqualTo(Integer value) {
public Criteria andGrossMarginEqualTo(String value) {
addCriterion("gross_margin =", value, "grossMargin");
return (Criteria) this;
}
public Criteria andGrossMarginNotEqualTo(Integer value) {
public Criteria andGrossMarginNotEqualTo(String value) {
addCriterion("gross_margin <>", value, "grossMargin");
return (Criteria) this;
}
public Criteria andGrossMarginGreaterThan(Integer value) {
public Criteria andGrossMarginGreaterThan(String value) {
addCriterion("gross_margin >", value, "grossMargin");
return (Criteria) this;
}
public Criteria andGrossMarginGreaterThanOrEqualTo(Integer value) {
public Criteria andGrossMarginGreaterThanOrEqualTo(String value) {
addCriterion("gross_margin >=", value, "grossMargin");
return (Criteria) this;
}
public Criteria andGrossMarginLessThan(Integer value) {
public Criteria andGrossMarginLessThan(String value) {
addCriterion("gross_margin <", value, "grossMargin");
return (Criteria) this;
}
public Criteria andGrossMarginLessThanOrEqualTo(Integer value) {
public Criteria andGrossMarginLessThanOrEqualTo(String value) {
addCriterion("gross_margin <=", value, "grossMargin");
return (Criteria) this;
}
public Criteria andGrossMarginIn(List<Integer> values) {
public Criteria andGrossMarginLike(String value) {
addCriterion("gross_margin like", value, "grossMargin");
return (Criteria) this;
}
public Criteria andGrossMarginNotLike(String value) {
addCriterion("gross_margin not like", value, "grossMargin");
return (Criteria) this;
}
public Criteria andGrossMarginIn(List<String> values) {
addCriterion("gross_margin in", values, "grossMargin");
return (Criteria) this;
}
public Criteria andGrossMarginNotIn(List<Integer> values) {
public Criteria andGrossMarginNotIn(List<String> values) {
addCriterion("gross_margin not in", values, "grossMargin");
return (Criteria) this;
}
public Criteria andGrossMarginBetween(Integer value1, Integer value2) {
public Criteria andGrossMarginBetween(String value1, String value2) {
addCriterion("gross_margin between", value1, value2, "grossMargin");
return (Criteria) this;
}
public Criteria andGrossMarginNotBetween(Integer value1, Integer value2) {
public Criteria andGrossMarginNotBetween(String value1, String value2) {
addCriterion("gross_margin not between", value1, value2, "grossMargin");
return (Criteria) this;
}

19
pims/src/main/java/com/ccsens/pims/bean/po/ProductIncome.java

@ -8,7 +8,9 @@ public class ProductIncome implements Serializable {
private Long productId;
private String monthTime;
private Integer yearIncome;
private Integer monthTime;
private Long predictIncome;
@ -38,12 +40,20 @@ public class ProductIncome implements Serializable {
this.productId = productId;
}
public String getMonthTime() {
public Integer getYearIncome() {
return yearIncome;
}
public void setYearIncome(Integer yearIncome) {
this.yearIncome = yearIncome;
}
public Integer getMonthTime() {
return monthTime;
}
public void setMonthTime(String monthTime) {
this.monthTime = monthTime == null ? null : monthTime.trim();
public void setMonthTime(Integer monthTime) {
this.monthTime = monthTime;
}
public Long getPredictIncome() {
@ -94,6 +104,7 @@ public class ProductIncome implements Serializable {
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", productId=").append(productId);
sb.append(", yearIncome=").append(yearIncome);
sb.append(", monthTime=").append(monthTime);
sb.append(", predictIncome=").append(predictIncome);
sb.append(", realIncome=").append(realIncome);

90
pims/src/main/java/com/ccsens/pims/bean/po/ProductIncomeExample.java

@ -225,6 +225,66 @@ public class ProductIncomeExample {
return (Criteria) this;
}
public Criteria andYearIncomeIsNull() {
addCriterion("year_income is null");
return (Criteria) this;
}
public Criteria andYearIncomeIsNotNull() {
addCriterion("year_income is not null");
return (Criteria) this;
}
public Criteria andYearIncomeEqualTo(Integer value) {
addCriterion("year_income =", value, "yearIncome");
return (Criteria) this;
}
public Criteria andYearIncomeNotEqualTo(Integer value) {
addCriterion("year_income <>", value, "yearIncome");
return (Criteria) this;
}
public Criteria andYearIncomeGreaterThan(Integer value) {
addCriterion("year_income >", value, "yearIncome");
return (Criteria) this;
}
public Criteria andYearIncomeGreaterThanOrEqualTo(Integer value) {
addCriterion("year_income >=", value, "yearIncome");
return (Criteria) this;
}
public Criteria andYearIncomeLessThan(Integer value) {
addCriterion("year_income <", value, "yearIncome");
return (Criteria) this;
}
public Criteria andYearIncomeLessThanOrEqualTo(Integer value) {
addCriterion("year_income <=", value, "yearIncome");
return (Criteria) this;
}
public Criteria andYearIncomeIn(List<Integer> values) {
addCriterion("year_income in", values, "yearIncome");
return (Criteria) this;
}
public Criteria andYearIncomeNotIn(List<Integer> values) {
addCriterion("year_income not in", values, "yearIncome");
return (Criteria) this;
}
public Criteria andYearIncomeBetween(Integer value1, Integer value2) {
addCriterion("year_income between", value1, value2, "yearIncome");
return (Criteria) this;
}
public Criteria andYearIncomeNotBetween(Integer value1, Integer value2) {
addCriterion("year_income not between", value1, value2, "yearIncome");
return (Criteria) this;
}
public Criteria andMonthTimeIsNull() {
addCriterion("month_time is null");
return (Criteria) this;
@ -235,62 +295,52 @@ public class ProductIncomeExample {
return (Criteria) this;
}
public Criteria andMonthTimeEqualTo(String value) {
public Criteria andMonthTimeEqualTo(Integer value) {
addCriterion("month_time =", value, "monthTime");
return (Criteria) this;
}
public Criteria andMonthTimeNotEqualTo(String value) {
public Criteria andMonthTimeNotEqualTo(Integer value) {
addCriterion("month_time <>", value, "monthTime");
return (Criteria) this;
}
public Criteria andMonthTimeGreaterThan(String value) {
public Criteria andMonthTimeGreaterThan(Integer value) {
addCriterion("month_time >", value, "monthTime");
return (Criteria) this;
}
public Criteria andMonthTimeGreaterThanOrEqualTo(String value) {
public Criteria andMonthTimeGreaterThanOrEqualTo(Integer value) {
addCriterion("month_time >=", value, "monthTime");
return (Criteria) this;
}
public Criteria andMonthTimeLessThan(String value) {
public Criteria andMonthTimeLessThan(Integer value) {
addCriterion("month_time <", value, "monthTime");
return (Criteria) this;
}
public Criteria andMonthTimeLessThanOrEqualTo(String value) {
public Criteria andMonthTimeLessThanOrEqualTo(Integer value) {
addCriterion("month_time <=", value, "monthTime");
return (Criteria) this;
}
public Criteria andMonthTimeLike(String value) {
addCriterion("month_time like", value, "monthTime");
return (Criteria) this;
}
public Criteria andMonthTimeNotLike(String value) {
addCriterion("month_time not like", value, "monthTime");
return (Criteria) this;
}
public Criteria andMonthTimeIn(List<String> values) {
public Criteria andMonthTimeIn(List<Integer> values) {
addCriterion("month_time in", values, "monthTime");
return (Criteria) this;
}
public Criteria andMonthTimeNotIn(List<String> values) {
public Criteria andMonthTimeNotIn(List<Integer> values) {
addCriterion("month_time not in", values, "monthTime");
return (Criteria) this;
}
public Criteria andMonthTimeBetween(String value1, String value2) {
public Criteria andMonthTimeBetween(Integer value1, Integer value2) {
addCriterion("month_time between", value1, value2, "monthTime");
return (Criteria) this;
}
public Criteria andMonthTimeNotBetween(String value1, String value2) {
public Criteria andMonthTimeNotBetween(Integer value1, Integer value2) {
addCriterion("month_time not between", value1, value2, "monthTime");
return (Criteria) this;
}

179
pims/src/main/java/com/ccsens/pims/bean/vo/CompanyVo.java

@ -1,9 +1,12 @@
package com.ccsens.pims.bean.vo;
import cn.hutool.core.util.ObjectUtil;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
/**
@ -30,29 +33,82 @@ public class CompanyVo {
private Long productId;
@ApiModelProperty("产品名称")
private String productName;
// @JsonIgnore
// private Long pricingLong;
@ApiModelProperty("产品定价")
private Long pricing;
private BigDecimal pricing;
@ApiModelProperty("价格单温(元)")
private Long priceUnits;
// @JsonIgnore
// private String grossMarginStr;
@ApiModelProperty("毛利")
private String grossMargin;
@ApiModelProperty("重要性 越高代表越重要")
private int significanceSort;
@ApiModelProperty("备注/详情")
private String description;
// public BigDecimal getPricing(){
// BigDecimal pr = BigDecimal.valueOf(0);
// if(ObjectUtil.isNotNull(pricingLong)){
// pr = BigDecimal.valueOf(pricingLong).divide(BigDecimal.valueOf(100),2,BigDecimal.ROUND_HALF_UP);
// }
// return pr;
// }
// public String getGrossMargin(){
// String str = "";
// if(StrUtil.isNotEmpty(grossMarginStr)){
// str = grossMarginStr + "%";
// }
// return str;
// }
}
@Data
@ApiModel("查询产品收入时分类")
public static class ProductIncomeType{
@ApiModelProperty("产品分类id")
private Long productType;
@ApiModelProperty("产品分类名称")
private String productTypeName;
@ApiModelProperty("产品信息")
private List<ProductIncomeAll> productIncomeAllList;
}
@Data
@ApiModel("查看单个产品的销售收入")
public static class ProductIncome{
@JsonIgnore
private Long incomeId;
@ApiModelProperty("月份")
private String month;
@JsonIgnore
private Long predictIncomeLong;
@ApiModelProperty("预计收入")
private BigDecimal predictIncome;
@JsonIgnore
private Long realIncomeLong;
@ApiModelProperty("预计收入")
private Long predictIncome;
@ApiModelProperty("实际收入")
private Long realIncome;
private BigDecimal realIncome;
public BigDecimal getPredictIncome(){
BigDecimal pr = BigDecimal.valueOf(0);
if(ObjectUtil.isNotNull(predictIncomeLong)){
pr = BigDecimal.valueOf(predictIncomeLong).divide(BigDecimal.valueOf(100),2,BigDecimal.ROUND_HALF_UP);
}
return pr;
}
public BigDecimal getRealIncome(){
BigDecimal pr = BigDecimal.valueOf(0);
if(ObjectUtil.isNotNull(realIncomeLong)){
pr = BigDecimal.valueOf(realIncomeLong).divide(BigDecimal.valueOf(100),2,BigDecimal.ROUND_HALF_UP);
}
return pr;
}
}
@Data
@ApiModel("查看所有产品的销售收入")
@ApiModel
public static class ProductIncomeAll{
@ApiModelProperty("产品id")
private Long productId;
@ -67,26 +123,52 @@ public class CompanyVo {
public static class ProductIncomeProportion{
@ApiModelProperty("月份")
private String month;
@JsonIgnore//每月预计收入
private Long predictTotal;
@JsonIgnore//每月实际收入
private Long realTotal;
@ApiModelProperty("预计占比")
private Long predictProportion;
private int predictProportion;
@ApiModelProperty("实际占比")
private Long realProportion;
private int realProportion;
}
@Data
@ApiModel("不同类型的成本")
public static class FirstCostType{
@ApiModelProperty("一级成本类型Id/产品分类id")
private Long fCostId;
@ApiModelProperty("成本类型名/产品名")
private String fCostName;
@ApiModelProperty("二级分类或者产品")
private List<CostType> costTypeList;
}
@Data
@ApiModel("总成本费用估算表")
public static class TotalCost{
@ApiModel("不同类型的成本")
public static class CostType{
@ApiModelProperty("成本类型Id/产品id")
private Long costId;
@ApiModelProperty("成本类型名/产品名")
private String costName;
@ApiModelProperty("每个月的成本")
private List<CostMonth> costMonthList;
}
@Data
@ApiModel("不同类型的成本")
public static class CostMonth{
@ApiModelProperty("月份")
private String month;
@ApiModelProperty("预计成本")
private Long predictCost;
private BigDecimal predictCost;
@ApiModelProperty("实际成本")
private Long realCost;
private BigDecimal realCost;
}
@Data
@ApiModel("损益类型")
@ApiModel()
public static class IncomeType{
@ApiModelProperty("损益类型")
private Long incomeType;
@ -98,28 +180,85 @@ public class CompanyVo {
@Data
@ApiModel("损益")
public static class IncomeMonth{
@JsonIgnore
private Long incomeId;
@ApiModelProperty("月份")
private String month;
@ApiModelProperty("损益数额")
private Long income;
// @JsonIgnore
// private Long predictIncomeLong;
@ApiModelProperty("预计损益数额")
private BigDecimal predictIncome;
// @JsonIgnore
// private Long realIncomeLong;
@ApiModelProperty("实际损益数额")
private BigDecimal realIncome;
// public BigDecimal getPredictIncome(){
// BigDecimal pr = BigDecimal.valueOf(0);
// if(ObjectUtil.isNotNull(predictIncomeLong)){
// pr = BigDecimal.valueOf(predictIncomeLong).divide(BigDecimal.valueOf(100),2,BigDecimal.ROUND_HALF_UP);
// }
// return pr;
// }
// public BigDecimal getRealIncome(){
// BigDecimal pr = BigDecimal.valueOf(0);
// if(ObjectUtil.isNotNull(realIncomeLong)){
// pr = BigDecimal.valueOf(realIncomeLong).divide(BigDecimal.valueOf(100),2,BigDecimal.ROUND_HALF_UP);
// }
// return pr;
// }
}
@Data
@ApiModel("现金流变动类型")
@ApiModel
public static class MoneyFlowType{
@ApiModelProperty("现金流变动类型")
@ApiModelProperty("现金流变动类型id")
private Long moneyFlowType;
@ApiModelProperty("现金流变动类型名字")
private String moneyFlowName;
@ApiModelProperty("现金流变动类型 0收入 1支出")
private int moneyType;
@ApiModelProperty("每月现金流变动")
private List<IncomeMonth> incomeMonthList;
private List<MoneyFlow> moneyFlowList;
}
@Data
@ApiModel("现金流变动")
public static class MoneyFlow{
@JsonIgnore
private Long moneyFlowLogId;
@ApiModelProperty("月份")
private String month;
@ApiModelProperty("现金流变动(收入是正数,支出为负数)")
private Long moneyFlow;
// @JsonIgnore
// private Long predictFlowLong;
// @JsonIgnore
// private Long realFlowLong;
@ApiModelProperty("预计现金流变动(收入是正数,支出为负数)")
private BigDecimal predictMoneyFlow;
@ApiModelProperty("实际现金流变动(收入是正数,支出为负数)")
private BigDecimal realMoneyFlow;
// public BigDecimal getPredictMoneyFlow(){
// BigDecimal pr = BigDecimal.valueOf(0);
// if(ObjectUtil.isNotNull(predictFlowLong)){
// pr = BigDecimal.valueOf(predictFlowLong).divide(BigDecimal.valueOf(100),2,BigDecimal.ROUND_HALF_UP);
// }
// return pr;
// }
// public BigDecimal getRealMoneyFlow(){
// BigDecimal pr = BigDecimal.valueOf(0);
// if(ObjectUtil.isNotNull(realFlowLong)){
// pr = BigDecimal.valueOf(realFlowLong).divide(BigDecimal.valueOf(100),2,BigDecimal.ROUND_HALF_UP);
// }
// return pr;
// }
}
@Data
public static class TotalIncome {
//"预计总收入"
private Long predictTotal;
//"实际总收入"
private Long realTotal;
}
}

11
pims/src/main/java/com/ccsens/pims/bean/vo/ProductDto.java

@ -1,11 +0,0 @@
package com.ccsens.pims.bean.vo;
import lombok.Data;
/**
* @author
*/
@Data
public class ProductDto {
}

119
pims/src/main/java/com/ccsens/pims/bean/vo/ProductVo.java

@ -0,0 +1,119 @@
package com.ccsens.pims.bean.vo;
import cn.hutool.core.util.ObjectUtil;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
/**
* @author
*/
@Data
public class ProductVo {
@Data
@ApiModel("查看所有产品的销售收入")
public static class ProductIncomeMonth{
@ApiModelProperty("月份")
private String month;
@ApiModelProperty("每个月的销售收入")
private List<ProductIncomeInfo> productIncomeList;
}
@Data
@ApiModel("产品收入详情")
public static class ProductIncomeInfo{
@ApiModelProperty("产品id")
private Long productId;
@ApiModelProperty("产品名")
private String productName;
@JsonIgnore
private Long predictIncomeLong;
@ApiModelProperty("预计收入")
private BigDecimal predictIncome;
@JsonIgnore
private Long realIncomeLong;
@ApiModelProperty("预计收入")
private BigDecimal realIncome;
public BigDecimal getPredictIncome(){
BigDecimal pr = BigDecimal.valueOf(0);
if(ObjectUtil.isNotNull(predictIncomeLong)){
pr = BigDecimal.valueOf(predictIncomeLong).divide(BigDecimal.valueOf(100),2,BigDecimal.ROUND_HALF_UP);
}
return pr;
}
public BigDecimal getRealIncome(){
BigDecimal pr = BigDecimal.valueOf(0);
if(ObjectUtil.isNotNull(realIncomeLong)){
pr = BigDecimal.valueOf(realIncomeLong).divide(BigDecimal.valueOf(100),2,BigDecimal.ROUND_HALF_UP);
}
return pr;
}
}
@Data
@ApiModel("查看所有产品的销售收入")
public static class ProductInfo{
@ApiModelProperty("产品Id")
private Long productId;
@ApiModelProperty("产品名")
private String productName;
@ApiModelProperty("预计收入")
private List<MonthNum> predictIncome;
@ApiModelProperty("实际收入")
private List<MonthNum> realIncome;
}
@Data
@ApiModel("总成本费用估算表")
public static class ProductCost{
@ApiModelProperty("成本类型名")
private String costTypeName;
@ApiModelProperty("预计成本")
private List<MonthNum> predictCost;
@ApiModelProperty("实际成本")
private List<MonthNum> realCost;
}
@Data
@ApiModel("损益类型")
public static class IncomeType{
@ApiModelProperty("损益类型")
private Long incomeType;
@ApiModelProperty("损益类型名字")
private String incomeName;
@ApiModelProperty("每月预计损益")
private List<MonthNum> predictIncome;
@ApiModelProperty("每月实际损益")
private List<MonthNum> realIncome;
}
@Data
@ApiModel("现金流变动类型")
public static class MoneyFlowType{
@ApiModelProperty("现金流变动类型id")
private Long moneyFlowType;
@ApiModelProperty("现金流变动类型名字")
private String moneyFlowName;
@ApiModelProperty("现金流变动类型 0收入 1支出")
private int moneyType;
@ApiModelProperty("每月预计现金流变动")
private List<MonthNum> predictMoneyFlow;
@ApiModelProperty("每月实际现金流变动")
private List<MonthNum> realMoneyFlow;
}
@Data
@ApiModel("总成本费用估算表")
public static class MonthNum{
@ApiModelProperty("预计成本")
private int month;
@ApiModelProperty("数额")
private BigDecimal num;
}
}

91
pims/src/main/java/com/ccsens/pims/persist/dao/ProductDao.java

@ -1,6 +1,7 @@
package com.ccsens.pims.persist.dao;
import com.ccsens.pims.bean.vo.CompanyVo;
import com.ccsens.pims.bean.vo.ProductVo;
import com.ccsens.pims.persist.mapper.ProductMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
@ -18,4 +19,94 @@ public interface ProductDao extends ProductMapper {
* @return 返回产品信息
*/
List<CompanyVo.ProductType> queryProductInfo(@Param("projectId") Long projectId);
/**
* 查看所有产品的收入信息excel表格时用
* @param projectId 产品id
* @return 返回产品的收入信息
*/
List<CompanyVo.ProductIncomeType> queryProductIncome(@Param("projectId")Long projectId);
/**
* 查看现金流变动
* @param projectId 项目id
* @return 返回现金流变动信息
*/
List<CompanyVo.MoneyFlowType> queryMoneyFlowExcel(@Param("projectId")Long projectId);
/**
* 查看损益表内容
* @param projectId 项目id
* @return 损益
*/
List<CompanyVo.IncomeType> queryIncomeExcel(@Param("projectId")Long projectId);
/**
* 获取产品的成本信息
* @param projectId 项目id
* @return 每个产品的成本信息
*/
List<CompanyVo.FirstCostType> getCostProductExcel(Long projectId);
/**
* 获取其他成本信息
* @param projectId 项目id
* @return 其他成本信息
*/
List<CompanyVo.FirstCostType> getCostOtherExcel(Long projectId);
/*-------------------------------------------------------------------------------------------------*/
/**
* 查看所有产品的收入信息图表时用
* @param projectId 项目id
* @return 返回产品的收入信息
*/
List<ProductVo.ProductInfo> queryProductIncomeMonth(@Param("projectId")Long projectId);
/**
* 查找单个产品的收入信息
* @param productId 产品id
* @return 返回产品的收入信息
*/
List<CompanyVo.ProductIncome> getProductIncome(@Param("productId")Long productId);
/**
* 查看现金流变动图表时用
* @param projectId 项目id
* @return 返回现金流变动信息
*/
List<ProductVo.MoneyFlowType> queryMonthFlow(@Param("projectId")Long projectId);
/**
* 查看损益表内容图表时用
* @param projectId 项目id
* @return 损益
*/
List<ProductVo.IncomeType> queryIncome(@Param("projectId")Long projectId);
/**
* 查询所有产品全年总收入
* @param projectId 项目id
* @param year 年份
* @return 返回总收入
*/
CompanyVo.TotalIncome getTotalIncome(@Param("projectId")Long projectId,@Param("year")String year);
/**
* 查找每个月份产品的收入信息
* @param projectId 项目id
* @param year 年份
* @return 返回每个月的收入
*/
List<CompanyVo.ProductIncomeProportion> queryProductIncomeProportion(@Param("projectId")Long projectId,@Param("year")String year);
/**
* 获取不同类型的成本(图表用)
* @param projectId 项目id
* @return
*/
List<ProductVo.ProductCost> getTotalCost(Long projectId);
}

6
pims/src/main/java/com/ccsens/pims/persist/dao/ProductIncomeDao.java

@ -0,0 +1,6 @@
package com.ccsens.pims.persist.dao;
import com.ccsens.pims.persist.mapper.ProductIncomeMapper;
public interface ProductIncomeDao extends ProductIncomeMapper {
}

11
pims/src/main/java/com/ccsens/pims/persist/dao/ProductTypeDao.java

@ -0,0 +1,11 @@
package com.ccsens.pims.persist.dao;
import com.ccsens.pims.persist.mapper.ProductTypeMapper;
import org.springframework.stereotype.Repository;
/**
* @author
*/
@Repository
public interface ProductTypeDao extends ProductTypeMapper {
}

30
pims/src/main/java/com/ccsens/pims/persist/mapper/CompanyCostMapper.java

@ -1,30 +0,0 @@
package com.ccsens.pims.persist.mapper;
import com.ccsens.pims.bean.po.CompanyCost;
import com.ccsens.pims.bean.po.CompanyCostExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface CompanyCostMapper {
long countByExample(CompanyCostExample example);
int deleteByExample(CompanyCostExample example);
int deleteByPrimaryKey(Long id);
int insert(CompanyCost record);
int insertSelective(CompanyCost record);
List<CompanyCost> selectByExample(CompanyCostExample example);
CompanyCost selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") CompanyCost record, @Param("example") CompanyCostExample example);
int updateByExample(@Param("record") CompanyCost record, @Param("example") CompanyCostExample example);
int updateByPrimaryKeySelective(CompanyCost record);
int updateByPrimaryKey(CompanyCost record);
}

30
pims/src/main/java/com/ccsens/pims/persist/mapper/CostLogMapper.java

@ -0,0 +1,30 @@
package com.ccsens.pims.persist.mapper;
import com.ccsens.pims.bean.po.CostLog;
import com.ccsens.pims.bean.po.CostLogExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface CostLogMapper {
long countByExample(CostLogExample example);
int deleteByExample(CostLogExample example);
int deleteByPrimaryKey(Long id);
int insert(CostLog record);
int insertSelective(CostLog record);
List<CostLog> selectByExample(CostLogExample example);
CostLog selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") CostLog record, @Param("example") CostLogExample example);
int updateByExample(@Param("record") CostLog record, @Param("example") CostLogExample example);
int updateByPrimaryKeySelective(CostLog record);
int updateByPrimaryKey(CostLog record);
}

30
pims/src/main/java/com/ccsens/pims/persist/mapper/CostTypeMapper.java

@ -0,0 +1,30 @@
package com.ccsens.pims.persist.mapper;
import com.ccsens.pims.bean.po.CostType;
import com.ccsens.pims.bean.po.CostTypeExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface CostTypeMapper {
long countByExample(CostTypeExample example);
int deleteByExample(CostTypeExample example);
int deleteByPrimaryKey(Long id);
int insert(CostType record);
int insertSelective(CostType record);
List<CostType> selectByExample(CostTypeExample example);
CostType selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") CostType record, @Param("example") CostTypeExample example);
int updateByExample(@Param("record") CostType record, @Param("example") CostTypeExample example);
int updateByPrimaryKeySelective(CostType record);
int updateByPrimaryKey(CostType record);
}

9
pims/src/main/java/com/ccsens/pims/service/IProductService.java

@ -2,6 +2,7 @@ package com.ccsens.pims.service;
import com.ccsens.pims.bean.dto.CompanyDto;
import com.ccsens.pims.bean.vo.CompanyVo;
import com.ccsens.pims.bean.vo.ProductVo;
import com.ccsens.util.bean.dto.QueryDto;
import java.util.List;
@ -30,7 +31,7 @@ public interface IProductService {
* @param params 项目id
* @return 返回所有产品的销售收入
*/
List<CompanyVo.ProductIncomeAll> queryProductIncome(QueryDto<CompanyDto.Project> params);
List<ProductVo.ProductInfo> queryProductIncome(QueryDto<CompanyDto.Project> params);
/**
* 查看产品总收入占比图
@ -44,19 +45,19 @@ public interface IProductService {
* @param params 项目id
* @return 返回每个与的预计成本与实际成本
*/
List<CompanyVo.TotalCost> getTotalCost(QueryDto<CompanyDto.Project> params);
List<ProductVo.ProductCost> getTotalCost(QueryDto<CompanyDto.Project> params);
/**
* 损益表
* @param params 项目id
* @return 返回损益类型和每个月的损益
*/
List<CompanyVo.IncomeType> getIncome(QueryDto<CompanyDto.Project> params);
List<ProductVo.IncomeType> queryIncome(QueryDto<CompanyDto.Project> params);
/**
* 现金流变动表
* @param params 项目id
* @return 返回现金流变动类型和每个与变动的数额
*/
List<CompanyVo.MoneyFlowType> getMonthFlow(QueryDto<CompanyDto.Project> params);
List<ProductVo.MoneyFlowType> getMonthFlow(QueryDto<CompanyDto.Project> params);
}

17
pims/src/main/java/com/ccsens/pims/service/IRealExcelService.java

@ -0,0 +1,17 @@
package com.ccsens.pims.service;
import com.ccsens.pims.bean.dto.CompanyDto;
public interface IRealExcelService {
/**
* 读取价格依据表
* @param params wps文件id
*/
void realProduct(CompanyDto.Async params) throws Exception;
/**
* 读取产值及附加估算表
* @param async wps文件id
*/
void realProduction(CompanyDto.Async async)throws Exception ;
}

10
pims/src/main/java/com/ccsens/pims/service/IReportService.java

@ -14,33 +14,33 @@ public interface IReportService {
* @param params 项目id
* @return 返回wps表格文件的路径
*/
List<String> getProduct(QueryDto<CompanyDto.Project> params);
List<String> getProduct(QueryDto<CompanyDto.Project> params) throws Exception;
/**
* 根据项目id查找产值及附加估算表
* @param params 项目id
* @return 返回wps表格文件的路径
*/
List<String> getProduction(QueryDto<CompanyDto.Project> params);
List<String> getProduction(QueryDto<CompanyDto.Project> params)throws Exception;
/**
* 根据项目id查找总成本费用估算表
* @param params 项目id
* @return 返回wps 表格文件的路径
*/
List<String> getCost(QueryDto<CompanyDto.Project> params);
List<String> getCost(QueryDto<CompanyDto.Project> params)throws Exception;
/**
* 查看损益表
* @param params 项目id
* @return 返回wps表格文件的路径
*/
List<String> getIncome(QueryDto<CompanyDto.Project> params);
List<String> getIncome(QueryDto<CompanyDto.Project> params)throws Exception;
/**
* 查看现金流表
* @param params 项目id
* @return 返回wps表格文件的路径
*/
List<String> getMoney(QueryDto<CompanyDto.Project> params);
List<String> getMoney(QueryDto<CompanyDto.Project> params)throws Exception;
}

48
pims/src/main/java/com/ccsens/pims/service/ProductService.java

@ -1,18 +1,27 @@
package com.ccsens.pims.service;
import cn.hutool.core.date.DateUtil;
import com.ccsens.pims.bean.dto.CompanyDto;
import com.ccsens.pims.bean.vo.CompanyVo;
import com.ccsens.pims.bean.vo.ProductVo;
import com.ccsens.pims.persist.dao.ProductDao;
import com.ccsens.util.bean.dto.QueryDto;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
* @author
*/
@Slf4j
@Service
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
public class ProductService implements IProductService{
@Resource
@ -27,31 +36,50 @@ public class ProductService implements IProductService{
@Override
public List<CompanyVo.ProductIncome> getProductIncome(QueryDto<CompanyDto.Product> params) {
return null;
CompanyDto.Product product = params.getParam();
return productDao.getProductIncome(product.getProductId());
}
@Override
public List<CompanyVo.ProductIncomeAll> queryProductIncome(QueryDto<CompanyDto.Project> params) {
return null;
public List<ProductVo.ProductInfo> queryProductIncome(QueryDto<CompanyDto.Project> params) {
CompanyDto.Project project = params.getParam();
List<ProductVo.ProductInfo> productIncomeMonthList = productDao.queryProductIncomeMonth(project.getProjectId());
return productIncomeMonthList;
}
@Override
public List<CompanyVo.ProductIncomeProportion> queryProductIncomeProportion(QueryDto<CompanyDto.Project> params) {
return null;
CompanyDto.Project project = params.getParam();
//获取当前年份
String year = DateUtil.format(new Date(),"yyyy");
//先查所有产品出全年总收入
CompanyVo.TotalIncome totalIncome = productDao.getTotalIncome(project.getProjectId(),year);
List<CompanyVo.ProductIncomeProportion> proportionList = productDao.queryProductIncomeProportion(project.getProjectId(),year);
for(CompanyVo.ProductIncomeProportion proportion : proportionList){
BigDecimal predictProportion = BigDecimal.valueOf(proportion.getPredictTotal()).divide(BigDecimal.valueOf(totalIncome.getPredictTotal()), 2, BigDecimal.ROUND_HALF_UP);
proportion.setPredictProportion(predictProportion.multiply(BigDecimal.valueOf(100)).intValue());
BigDecimal realProportion = BigDecimal.valueOf(proportion.getRealTotal()).divide(BigDecimal.valueOf(totalIncome.getRealTotal()), 2, BigDecimal.ROUND_HALF_UP);
proportion.setPredictProportion(realProportion.multiply(BigDecimal.valueOf(100)).intValue());
}
return proportionList;
}
@Override
public List<CompanyVo.TotalCost> getTotalCost(QueryDto<CompanyDto.Project> params) {
return null;
public List<ProductVo.ProductCost> getTotalCost(QueryDto<CompanyDto.Project> params) {
CompanyDto.Project project = params.getParam();
List<ProductVo.ProductCost> productCosts = productDao.getTotalCost(project.getProjectId());
return productCosts;
}
@Override
public List<CompanyVo.IncomeType> getIncome(QueryDto<CompanyDto.Project> params) {
return null;
public List<ProductVo.IncomeType> queryIncome(QueryDto<CompanyDto.Project> params) {
CompanyDto.Project project = params.getParam();
return productDao.queryIncome(project.getProjectId());
}
@Override
public List<CompanyVo.MoneyFlowType> getMonthFlow(QueryDto<CompanyDto.Project> params) {
return null;
public List<ProductVo.MoneyFlowType> getMonthFlow(QueryDto<CompanyDto.Project> params) {
CompanyDto.Project project = params.getParam();
return productDao.queryMonthFlow(project.getProjectId());
}
}

234
pims/src/main/java/com/ccsens/pims/service/RealExcelService.java

@ -0,0 +1,234 @@
package com.ccsens.pims.service;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.ccsens.cloudutil.bean.tall.vo.WpsVo;
import com.ccsens.cloudutil.feign.TallFeignClient;
import com.ccsens.pims.bean.dto.CompanyDto;
import com.ccsens.pims.bean.po.*;
import com.ccsens.pims.persist.dao.ProductDao;
import com.ccsens.pims.persist.dao.ProductIncomeDao;
import com.ccsens.pims.persist.dao.ProductTypeDao;
import com.ccsens.util.ExcelUtil;
import com.ccsens.util.JsonResponse;
import com.ccsens.util.exception.BaseException;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.xssf.usermodel.XSSFRow;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.io.FileInputStream;
import java.io.InputStream;
import java.math.BigDecimal;
import java.util.List;
/**
* @author
*/
@Slf4j
@Service
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
public class RealExcelService implements IRealExcelService {
@Resource
private TallFeignClient tallFeignClient;
@Resource
private ProductTypeDao productTypeDao;
@Resource
private Snowflake snowflake;
@Resource
private ProductDao productDao;
@Resource
private ProductIncomeDao productIncomeDao;
@Override
public void realProduct(CompanyDto.Async params) throws Exception {
log.info("wps文件id:{}", params.toString());
Long wpsId = params.getFileId();
JsonResponse<WpsVo.BusinessFileIdAndPath> businessFileIdAndPath = tallFeignClient.getPathByWpsId(wpsId);
log.info("获取文件路径和项目id:{}", businessFileIdAndPath.toString());
if (ObjectUtil.isNull(businessFileIdAndPath)) {return;}
WpsVo.BusinessFileIdAndPath fileIdAndPath = businessFileIdAndPath.getData();
if (ObjectUtil.isNull(fileIdAndPath)) {return;}
//项目id
long projectId = fileIdAndPath.getBusinessId();
//文件路径
String path = fileIdAndPath.getFilePath();
//获取excel文件
InputStream is = new FileInputStream(path);
XSSFWorkbook wb = new XSSFWorkbook(is);
if (ObjectUtil.isNull(wb)) {return;}
XSSFSheet sheet = wb.getSheetAt(0);
if (ObjectUtil.isNull(sheet)) { return; }
//产品类型id
Long productTypeId = null;
for (int i = 2; i <= sheet.getLastRowNum(); i++){
XSSFRow row = sheet.getRow(i);
if (ObjectUtil.isNull(row)) { continue; }
String productTypeCell = ExcelUtil.getCellValue(row.getCell(0));
String productNameCell = ExcelUtil.getCellValue(row.getCell(1));
String pricingCell = ExcelUtil.getCellValue(row.getCell(2));
String priceUnitsCell = ExcelUtil.getCellValue(row.getCell(3));
String grossMarginCell = ExcelUtil.getCellValue(row.getCell(4));
String significanceSortCell = ExcelUtil.getCellValue(row.getCell( 5));
String descriptionCell = ExcelUtil.getCellValue(row.getCell(6));
//产品类型
if(StrUtil.isNotEmpty(productTypeCell)){
ProductTypeExample productTypeExample = new ProductTypeExample();
productTypeExample.createCriteria().andProjectIdEqualTo(projectId).andNameEqualTo(productTypeCell);
List<ProductType> productTypeList = productTypeDao.selectByExample(productTypeExample);
if(CollectionUtil.isNotEmpty(productTypeList)){
productTypeId = productTypeList.get(0).getId();
}else {
ProductType productType = new ProductType();
productType.setId(snowflake.nextId());
productType.setProjectId(projectId);
productType.setName(productTypeCell);
productTypeDao.insertSelective(productType);
productTypeId = productType.getId();
}
}
//产品
if(ObjectUtil.isNull(productTypeId)){
throw new BaseException("产品类型不存在");
}
if(StrUtil.isNotEmpty(productNameCell)){
//查找产品
ProductExample productExample = new ProductExample();
productExample.createCriteria().andProjectIdEqualTo(projectId)
.andProductTypeIdEqualTo(productTypeId).andNameEqualTo(productNameCell);
List<Product> productList = productDao.selectByExample(productExample);
if(CollectionUtil.isNotEmpty(productList)){
Product product = productList.get(0);
//详情
if(StrUtil.isNotEmpty(descriptionCell)){
product.setDescription(descriptionCell);
}
//定价
if(StrUtil.isNotEmpty(pricingCell)){
product.setPricing(Long.valueOf(pricingCell));
}
//单位
if(StrUtil.isNotEmpty(priceUnitsCell)){
product.setPriceUnits(Long.valueOf(priceUnitsCell));
}
//TODO 重要性排序
//毛利
if(StrUtil.isNotEmpty(grossMarginCell)){
product.setGrossMargin(grossMarginCell);
}
productDao.updateByPrimaryKeySelective(product);
}else {
Product product = new Product();
product.setId(snowflake.nextId());
product.setName(productNameCell);
product.setProjectId(projectId);
product.setProductTypeId(productTypeId);
//详情
if(StrUtil.isNotEmpty(descriptionCell)){
product.setDescription(descriptionCell);
}
//定价
if(StrUtil.isNotEmpty(pricingCell)){
product.setPricing(Long.valueOf(pricingCell));
}
//单位
if(StrUtil.isNotEmpty(priceUnitsCell)) {
product.setPriceUnits(Long.valueOf(priceUnitsCell));
}
//TODO 重要性排序
//毛利
if(StrUtil.isNotEmpty(grossMarginCell)){
product.setGrossMargin(grossMarginCell);
}
productDao.insertSelective(product);
}
}
}
}
@Override
public void realProduction(CompanyDto.Async params)throws Exception {
log.info("wps文件id:{}", params.toString());
Long wpsId = params.getFileId();
JsonResponse<WpsVo.BusinessFileIdAndPath> businessFileIdAndPath = tallFeignClient.getPathByWpsId(wpsId);
log.info("获取文件路径和项目id:{}", businessFileIdAndPath.toString());
if (ObjectUtil.isNull(businessFileIdAndPath)) {return;}
WpsVo.BusinessFileIdAndPath fileIdAndPath = businessFileIdAndPath.getData();
if (ObjectUtil.isNull(fileIdAndPath)) {return;}
//项目id
long projectId = fileIdAndPath.getBusinessId();
//文件路径
String path = fileIdAndPath.getFilePath();
//获取excel文件
InputStream is = new FileInputStream(path);
XSSFWorkbook wb = new XSSFWorkbook(is);
if (ObjectUtil.isNull(wb)) {return;}
XSSFSheet sheet = wb.getSheetAt(0);
if (ObjectUtil.isNull(sheet)) { return; }
for (int i = 2; i <= sheet.getLastRowNum(); i+=2){
XSSFRow row = sheet.getRow(i);
if (ObjectUtil.isNull(row)) { continue; }
String productTypeCell = ExcelUtil.getCellValue(row.getCell(0));
String productNameCell = ExcelUtil.getCellValue(row.getCell(1));
//产品类型
Long productTypeId = null;
if(StrUtil.isNotEmpty(productTypeCell)){
if("收入".equalsIgnoreCase(productTypeCell)){ return; }
ProductTypeExample productTypeExample = new ProductTypeExample();
productTypeExample.createCriteria().andProjectIdEqualTo(projectId).andNameEqualTo(productTypeCell);
List<ProductType> productTypeList = productTypeDao.selectByExample(productTypeExample);
if(CollectionUtil.isNotEmpty(productTypeList)){
productTypeId = productTypeList.get(0).getId();
}else{
throw new BaseException("产品类型不存在");
}
}
//查找产品
ProductExample productExample = new ProductExample();
productExample.createCriteria().andProjectIdEqualTo(projectId)
.andProductTypeIdEqualTo(productTypeId).andNameEqualTo(productNameCell);
List<Product> productList = productDao.selectByExample(productExample);
if(CollectionUtil.isNotEmpty(productList)){
Long productId = productList.get(0).getId();
//查找以前的收入,删除后重新添加
ProductIncomeExample incomeExample = new ProductIncomeExample();
incomeExample.createCriteria().andProductIdEqualTo(productId);
List<ProductIncome> incomeList = productIncomeDao.selectByExample(incomeExample);
if(CollectionUtil.isNotEmpty(incomeList)){
incomeList.forEach(income -> {
income.setRecStatus((byte) 2);
productIncomeDao.updateByPrimaryKeySelective(income);
});
}
int month = 1;
for(int a = 3; a < 15; a++){
Long predictIncome = new BigDecimal(ExcelUtil.getCellValue(row.getCell(a))).multiply(BigDecimal.valueOf(100)).longValue();
Long realIncome = null;
XSSFRow realRow = sheet.getRow(i);
if(ObjectUtil.isNotNull(realRow)){
realIncome = new BigDecimal(ExcelUtil.getCellValue(realRow.getCell(a))).multiply(BigDecimal.valueOf(100)).longValue();
}
//添加产品收入
ProductIncome productIncome = new ProductIncome();
productIncome.setId(snowflake.nextId());
productIncome.setProductId(productId);
productIncome.setMonthTime(month);
productIncome.setPredictIncome(predictIncome);
productIncome.setRealIncome(realIncome);
productIncomeDao.insertSelective(productIncome);
month++;
}
}
}
}
}

668
pims/src/main/java/com/ccsens/pims/service/ReportService.java

@ -1,38 +1,684 @@
package com.ccsens.pims.service;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DateUtil;
import com.ccsens.cloudutil.bean.tall.dto.WpsDto;
import com.ccsens.cloudutil.feign.TallFeignClient;
import com.ccsens.pims.bean.dto.CompanyDto;
import com.ccsens.pims.bean.vo.CompanyVo;
import com.ccsens.pims.persist.dao.ProductDao;
import com.ccsens.util.PoiUtil;
import com.ccsens.util.PropUtil;
import com.ccsens.util.WebConstant;
import com.ccsens.util.bean.dto.QueryDto;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.io.File;
import java.io.FileOutputStream;
import java.io.OutputStream;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author
*/
@Slf4j
@Service
public class ReportService implements IReportService{
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
public class ReportService implements IReportService {
@Resource
private ProductDao productDao;
@Resource
private TallFeignClient tallFeignClient;
@Override
public List<String> getProduct(QueryDto<CompanyDto.Project> params) {
return null;
public List<String> getProduct(QueryDto<CompanyDto.Project> params) throws Exception {
CompanyDto.Project project = params.getParam();
//查询此任务的报表,有则直接返回
List<String> wpsPath;
Map<String,String> paramsUrl = new HashMap<>();
paramsUrl.put(WebConstant.Wps._W_URL, PropUtil.domain + "read/product");
WpsDto.VisitWpsUrl visitWpsUrl = new WpsDto.VisitWpsUrl();
visitWpsUrl.setBusinessId(project.getProjectId());
visitWpsUrl.setBusinessType((byte) 3);
visitWpsUrl.setUserId(params.getUserId());
visitWpsUrl.setParams(paramsUrl);
wpsPath = tallFeignClient.queryVisitUrls(visitWpsUrl);
if (CollectionUtil.isNotEmpty(wpsPath)) {
return wpsPath;
}
//查询产品信息
List<CompanyVo.ProductType> productTypeList = productDao.queryProductInfo(project.getProjectId());
//生成excel写入的数据
List<List<PoiUtil.PoiUtilCell>> product = generateProduct(productTypeList);
//写入WBS
generateExcelWithWps(project.getProjectId(),(byte)3, params.getUserId(), "价格依据表", product);
//获取wps文件的路径并返回
wpsPath = tallFeignClient.queryVisitUrls(visitWpsUrl);
//添加wps关联信息
return wpsPath;
}
@Override
public List<String> getProduction(QueryDto<CompanyDto.Project> params) {
return null;
public List<String> getProduction(QueryDto<CompanyDto.Project> params) throws Exception {
CompanyDto.Project project = params.getParam();
//查询此任务的报表,有则直接返回
List<String> wpsPath;
Map<String,String> paramsUrl = new HashMap<>();
paramsUrl.put(WebConstant.Wps._W_URL, PropUtil.domain + "read/production");
WpsDto.VisitWpsUrl visitWpsUrl = new WpsDto.VisitWpsUrl();
visitWpsUrl.setBusinessId(project.getProjectId());
visitWpsUrl.setBusinessType((byte) 4);
visitWpsUrl.setUserId(params.getUserId());
visitWpsUrl.setParams(paramsUrl);
wpsPath = tallFeignClient.queryVisitUrls(visitWpsUrl);
if (CollectionUtil.isNotEmpty(wpsPath)) {
return wpsPath;
}
//从数据库查找产品收入信息
List<CompanyVo.ProductIncomeType> productIncomeTypeList = productDao.queryProductIncome(project.getProjectId());
//生成excel写入的数据
List<List<PoiUtil.PoiUtilCell>> product = generateProduction(productIncomeTypeList);
//写入WBS
generateExcelWithWps(project.getProjectId(),(byte)4, params.getUserId(), "产值及附加估算表", product);
//获取wps文件的路径并返回
wpsPath = tallFeignClient.queryVisitUrls(visitWpsUrl);
//添加wps关联信息
return wpsPath;
}
@Override
public List<String> getCost(QueryDto<CompanyDto.Project> params) {
return null;
public List<String> getCost(QueryDto<CompanyDto.Project> params)throws Exception {
CompanyDto.Project project = params.getParam();
//查询此任务的报表,有则直接返回
List<String> wpsPath;
WpsDto.VisitWpsUrl visitWpsUrl = new WpsDto.VisitWpsUrl();
visitWpsUrl.setBusinessId(project.getProjectId());
visitWpsUrl.setBusinessType((byte) 5);
visitWpsUrl.setUserId(params.getUserId());
visitWpsUrl.setParams(null);
wpsPath = tallFeignClient.queryVisitUrls(visitWpsUrl);
if (CollectionUtil.isNotEmpty(wpsPath)) {
return wpsPath;
}
//获取产品的成本
List<CompanyVo.FirstCostType> costProductTypeList = productDao.getCostProductExcel(project.getProjectId());
//获取其他的成本
List<CompanyVo.FirstCostType> costOtherTypeList = productDao.getCostOtherExcel(project.getProjectId());
//生成写入的数据
List<List<PoiUtil.PoiUtilCell>> cost = generateCost(costProductTypeList,costOtherTypeList);
//写入WBS
generateExcelWithWps(project.getProjectId(), (byte)5, params.getUserId(), "产品成本费用估算表", cost);
//获取wps文件的路径并返回
wpsPath = tallFeignClient.queryVisitUrls(visitWpsUrl);
//添加wps关联信息
return wpsPath;
}
@Override
public List<String> getIncome(QueryDto<CompanyDto.Project> params) {
return null;
public List<String> getIncome(QueryDto<CompanyDto.Project> params) throws Exception {
CompanyDto.Project project = params.getParam();
//查询此任务的报表,有则直接返回
List<String> wpsPath;
WpsDto.VisitWpsUrl visitWpsUrl = new WpsDto.VisitWpsUrl();
visitWpsUrl.setBusinessId(project.getProjectId());
visitWpsUrl.setBusinessType((byte)6);
visitWpsUrl.setUserId(params.getUserId());
visitWpsUrl.setParams(null);
wpsPath = tallFeignClient.queryVisitUrls(visitWpsUrl);
if (CollectionUtil.isNotEmpty(wpsPath)) {
return wpsPath;
}
List<CompanyVo.IncomeType> incomeTypeList = productDao.queryIncomeExcel(project.getProjectId());
//生成excel写入的数据
List<List<PoiUtil.PoiUtilCell>> product = generateIncome(incomeTypeList);
//写入WBS
generateExcelWithWps(project.getProjectId(),(byte)6, params.getUserId(), "损益表", product);
//获取wps文件的路径并返回
wpsPath = tallFeignClient.queryVisitUrls(visitWpsUrl);
//添加wps关联信息
return wpsPath;
}
@Override
public List<String> getMoney(QueryDto<CompanyDto.Project> params) {
return null;
public List<String> getMoney(QueryDto<CompanyDto.Project> params) throws Exception {
CompanyDto.Project project = params.getParam();
//查询此任务的报表,有则直接返回
List<String> wpsPath;
WpsDto.VisitWpsUrl visitWpsUrl = new WpsDto.VisitWpsUrl();
visitWpsUrl.setBusinessId(project.getProjectId());
visitWpsUrl.setBusinessType((byte) 7);
visitWpsUrl.setUserId(params.getUserId());
visitWpsUrl.setParams(null);
wpsPath = tallFeignClient.queryVisitUrls(visitWpsUrl);
if (CollectionUtil.isNotEmpty(wpsPath)) {
return wpsPath;
}
List<CompanyVo.MoneyFlowType> moneyFlowTypes = productDao.queryMoneyFlowExcel(project.getProjectId());
//生成excel写入的数据
List<List<PoiUtil.PoiUtilCell>> product = generateMoneyFlow(moneyFlowTypes);
//写入WBS
generateExcelWithWps(project.getProjectId(),(byte) 7, params.getUserId(), "现金流表", product);
//获取wps文件的路径并返回
wpsPath = tallFeignClient.queryVisitUrls(visitWpsUrl);
//添加wps关联信息
return wpsPath;
}
/**
* 生成excel文件并关联wps
*
* @param businessId 业务类型id任务id
* @param userId userId
* @param sheetName 生成的excel文件的名字和sheet名字
* @param list 需要写入的数据
* @throws Exception 文件异常
*/
private void generateExcelWithWps(Long businessId, Byte businessType,Long userId, String sheetName, List<List<PoiUtil.PoiUtilCell>> list) throws Exception {
Workbook wb = new XSSFWorkbook();
PoiUtil.exportWB(sheetName, list, wb);
//生成文件
String name = sheetName + ".xlsx";
String fileName = "pims/" + DateUtil.today() + "/" + System.currentTimeMillis() + ".xlsx";
String path = WebConstant.UPLOAD_PATH_BASE + File.separator + fileName;
File tmpFile = new File(path);
if (!tmpFile.getParentFile().exists()) {
tmpFile.getParentFile().mkdirs();
}
OutputStream stream = new FileOutputStream(tmpFile);
wb.write(stream);
stream.close();
//关联wps
WpsDto.Business business = new WpsDto.Business();
business.setBusinessId(businessId);
business.setBusinessType(businessType);
business.setUserId(userId);
business.setFileName(name);
business.setFilePath(fileName);
business.setFileSize(tmpFile.length());
business.setOperation(WebConstant.Wps.USER_OPERATION_NEW);
business.setPrivilege(WebConstant.Wps.PROJECT_PRIVILEGE_WRITE);
tallFeignClient.saveWpsFile(business);
}
/**
* 价格依据表的写入数据
*
* @param productTypeList 价格依据数据
* @return 返回写入数据
*/
private List<List<PoiUtil.PoiUtilCell>> generateProduct(List<CompanyVo.ProductType> productTypeList) {
List<List<PoiUtil.PoiUtilCell>> list = new ArrayList<>();
List<PoiUtil.PoiUtilCell> title = new ArrayList<>();
title.add(new PoiUtil.PoiUtilCell("产品或服务价格使用依据表", 7, 1));
list.add(title);
List<PoiUtil.PoiUtilCell> header = new ArrayList<>();
header.add(new PoiUtil.PoiUtilCell("产品或服务", 2, 1));
header.add(new PoiUtil.PoiUtilCell());
header.add(new PoiUtil.PoiUtilCell("定价"));
header.add(new PoiUtil.PoiUtilCell("单位(元)"));
header.add(new PoiUtil.PoiUtilCell("毛利"));
header.add(new PoiUtil.PoiUtilCell("重要性排序"));
header.add(new PoiUtil.PoiUtilCell("备注"));
list.add(header);
if (CollectionUtil.isNotEmpty(productTypeList)) {
productTypeList.forEach(productType -> {
if (CollectionUtil.isEmpty(productType.getProductList())) {
List<PoiUtil.PoiUtilCell> product = new ArrayList<>();
product.add(new PoiUtil.PoiUtilCell(productType.getProductTypeName()));
list.add(product);
} else {
for (int i = 0; i < productType.getProductList().size(); i++) {
CompanyVo.ProductInfo productInfo = productType.getProductList().get(i);
List<PoiUtil.PoiUtilCell> product = new ArrayList<>();
if (i == 0) {
product.add(new PoiUtil.PoiUtilCell(productType.getProductTypeName(), 1, productType.getProductList().size()));
} else {
product.add(new PoiUtil.PoiUtilCell());
}
product.add(new PoiUtil.PoiUtilCell(productInfo.getProductName()));
product.add(new PoiUtil.PoiUtilCell(productInfo.getPricing().toString()));
product.add(new PoiUtil.PoiUtilCell(productInfo.getPriceUnits().toString()));
product.add(new PoiUtil.PoiUtilCell(productInfo.getGrossMargin()));
product.add(new PoiUtil.PoiUtilCell());
product.add(new PoiUtil.PoiUtilCell(productInfo.getDescription()));
list.add(product);
}
}
});
}
return list;
}
/**
* 产值及附加估算表
*
* @param productIncomeTypeList 收入数据
* @return 返回需写入的数据
*/
private List<List<PoiUtil.PoiUtilCell>> generateProduction(List<CompanyVo.ProductIncomeType> productIncomeTypeList) {
//标题
List<List<PoiUtil.PoiUtilCell>> list = new ArrayList<>();
List<PoiUtil.PoiUtilCell> title = new ArrayList<>();
title.add(new PoiUtil.PoiUtilCell("产值及附加估算表", 17, 1));
list.add(title);
//表头
List<PoiUtil.PoiUtilCell> header = new ArrayList<>();
header.add(new PoiUtil.PoiUtilCell("产品", 2, 1));
header.add(new PoiUtil.PoiUtilCell());
header.add(new PoiUtil.PoiUtilCell());
for (int i = 1; i < 13; i++) {
header.add(new PoiUtil.PoiUtilCell(i + "月"));
}
header.add(new PoiUtil.PoiUtilCell("合计"));
header.add(new PoiUtil.PoiUtilCell("权重分析"));
list.add(header);
//产品信息
if (CollectionUtil.isNotEmpty(productIncomeTypeList)) {
//循环产品类型
productIncomeTypeList.forEach(productIncome -> {
if (CollectionUtil.isEmpty(productIncome.getProductIncomeAllList())) {
List<PoiUtil.PoiUtilCell> product = new ArrayList<>();
product.add(new PoiUtil.PoiUtilCell(productIncome.getProductTypeName()));
list.add(product);
} else {
//循环产品信息
for (int i = 0; i < productIncome.getProductIncomeAllList().size(); i++) {
//生成每个产品信息需要的三行
CompanyVo.ProductIncomeAll productIncomeAll = productIncome.getProductIncomeAllList().get(0);
List<PoiUtil.PoiUtilCell> product1 = new ArrayList<>();
List<PoiUtil.PoiUtilCell> product2 = new ArrayList<>();
List<PoiUtil.PoiUtilCell> product3 = new ArrayList<>();
if (i == 0) {
//每个类型的第一行有内容,其他的为空
product1.add(new PoiUtil.PoiUtilCell(productIncomeAll.getProductName(), 1, productIncome.getProductIncomeAllList().size() * 3));
product2.add(new PoiUtil.PoiUtilCell());
product3.add(new PoiUtil.PoiUtilCell());
} else {
product1.add(new PoiUtil.PoiUtilCell());
product2.add(new PoiUtil.PoiUtilCell());
product3.add(new PoiUtil.PoiUtilCell());
}
//产品名称,第一行有,剩下两行为空
product1.add(new PoiUtil.PoiUtilCell(productIncomeAll.getProductName(),1,3));
product2.add(new PoiUtil.PoiUtilCell());
product3.add(new PoiUtil.PoiUtilCell());
product1.add(new PoiUtil.PoiUtilCell("预计收入"));
product2.add(new PoiUtil.PoiUtilCell("实际收入"));
product3.add(new PoiUtil.PoiUtilCell("偏差率"));
//循环每月的收入
BigDecimal totalProductIncome = BigDecimal.valueOf(0);
BigDecimal totalRealIncome = BigDecimal.valueOf(0);
if (CollectionUtil.isNotEmpty(productIncomeAll.getProductIncomeList())) {
for (CompanyVo.ProductIncome income : productIncomeAll.getProductIncomeList()) {
product1.add(new PoiUtil.PoiUtilCell(income.getPredictIncome().toString()));
product2.add(new PoiUtil.PoiUtilCell(income.getRealIncome().toString()));
BigDecimal bias = income.getRealIncome().subtract(income.getPredictIncome()).
divide(income.getPredictIncome(), 2, BigDecimal.ROUND_HALF_UP).multiply(BigDecimal.valueOf(100));
product3.add(new PoiUtil.PoiUtilCell(bias.toString() + "%"));
totalProductIncome = totalProductIncome.add(income.getPredictIncome());
totalRealIncome = totalRealIncome.add(income.getRealIncome());
}
}
product1.add(new PoiUtil.PoiUtilCell(totalProductIncome.toString()));
product2.add(new PoiUtil.PoiUtilCell(totalRealIncome.toString()));
BigDecimal bias = totalRealIncome.subtract(totalProductIncome).
divide(totalProductIncome, 2, BigDecimal.ROUND_HALF_UP).multiply(BigDecimal.valueOf(100));
product3.add(new PoiUtil.PoiUtilCell(bias.toString() + "%"));
product1.add(new PoiUtil.PoiUtilCell());
product2.add(new PoiUtil.PoiUtilCell());
product3.add(new PoiUtil.PoiUtilCell());
list.add(product1);
list.add(product2);
list.add(product3);
}
}
});
}
return list;
}
/**
* 生成现金流表的写入数据
*
* @param moneyFlowTypes 现金流表信息
* @return 返回写入数据
*/
private List<List<PoiUtil.PoiUtilCell>> generateMoneyFlow(List<CompanyVo.MoneyFlowType> moneyFlowTypes) {
//标题
List<List<PoiUtil.PoiUtilCell>> list = new ArrayList<>();
List<PoiUtil.PoiUtilCell> title = new ArrayList<>();
title.add(new PoiUtil.PoiUtilCell("现金流表(全部定投)", 16, 1));
list.add(title);
//表头
List<PoiUtil.PoiUtilCell> header = new ArrayList<>();
header.add(new PoiUtil.PoiUtilCell());
header.add(new PoiUtil.PoiUtilCell());
header.add(new PoiUtil.PoiUtilCell("初期"));
for (int i = 1; i < 13; i++) {
header.add(new PoiUtil.PoiUtilCell(i + "月"));
}
header.add(new PoiUtil.PoiUtilCell("合计"));
list.add(header);
if (CollectionUtil.isNotEmpty(moneyFlowTypes)) {
for (int i = 0; i < moneyFlowTypes.size(); i++) {
CompanyVo.MoneyFlowType moneyFlowType = moneyFlowTypes.get(i);
if (moneyFlowType.getMoneyType() == 0) {
List<PoiUtil.PoiUtilCell> income1 = new ArrayList<>();
List<PoiUtil.PoiUtilCell> income2 = new ArrayList<>();
List<PoiUtil.PoiUtilCell> income3 = new ArrayList<>();
income1.add(new PoiUtil.PoiUtilCell(moneyFlowType.getMoneyFlowName(), 1, 3));
income2.add(new PoiUtil.PoiUtilCell());
income3.add(new PoiUtil.PoiUtilCell());
income1.add(new PoiUtil.PoiUtilCell("预计收入"));
income2.add(new PoiUtil.PoiUtilCell("实际收入"));
income3.add(new PoiUtil.PoiUtilCell("偏差率"));
income1.add(new PoiUtil.PoiUtilCell());
income2.add(new PoiUtil.PoiUtilCell());
income3.add(new PoiUtil.PoiUtilCell());
//循环每月的收入
BigDecimal totalProductIncome = BigDecimal.valueOf(0);
BigDecimal totalRealIncome = BigDecimal.valueOf(0);
if (CollectionUtil.isNotEmpty(moneyFlowType.getMoneyFlowList())) {
for (CompanyVo.MoneyFlow moneyFlow : moneyFlowType.getMoneyFlowList()) {
income1.add(new PoiUtil.PoiUtilCell(moneyFlow.getPredictMoneyFlow().toString()));
income2.add(new PoiUtil.PoiUtilCell(moneyFlow.getRealMoneyFlow().toString()));
BigDecimal bias = moneyFlow.getRealMoneyFlow().subtract(moneyFlow.getPredictMoneyFlow()).
divide(moneyFlow.getRealMoneyFlow(), 2, BigDecimal.ROUND_HALF_UP).multiply(BigDecimal.valueOf(100));
income3.add(new PoiUtil.PoiUtilCell(bias.toString() + "%"));
totalProductIncome = totalProductIncome.add(moneyFlow.getPredictMoneyFlow());
totalRealIncome = totalRealIncome.add(moneyFlow.getRealMoneyFlow());
}
}
income1.add(new PoiUtil.PoiUtilCell(totalProductIncome.toString()));
income2.add(new PoiUtil.PoiUtilCell(totalRealIncome.toString()));
BigDecimal bias = totalRealIncome.subtract(totalProductIncome).
divide(totalProductIncome, 2, BigDecimal.ROUND_HALF_UP).multiply(BigDecimal.valueOf(100));
income3.add(new PoiUtil.PoiUtilCell(bias.toString() + "%"));
list.add(income1);
list.add(income2);
list.add(income3);
}
}
//现金流入总计
List<PoiUtil.PoiUtilCell> totalMoneyIncome1 = new ArrayList<>();
List<PoiUtil.PoiUtilCell> totalMoneyIncome2 = new ArrayList<>();
List<PoiUtil.PoiUtilCell> totalMoneyIncome3 = new ArrayList<>();
totalMoneyIncome1.add(new PoiUtil.PoiUtilCell("现金流入", 1, 3));
totalMoneyIncome2.add(new PoiUtil.PoiUtilCell());
totalMoneyIncome3.add(new PoiUtil.PoiUtilCell());
totalMoneyIncome1.add(new PoiUtil.PoiUtilCell("预计收入"));
totalMoneyIncome2.add(new PoiUtil.PoiUtilCell("实际收入"));
totalMoneyIncome3.add(new PoiUtil.PoiUtilCell("偏差率"));
//TODO 现金流入
list.add(totalMoneyIncome1);
list.add(totalMoneyIncome2);
list.add(totalMoneyIncome3);
for (int i = 0; i < moneyFlowTypes.size(); i++) {
CompanyVo.MoneyFlowType moneyFlowType = moneyFlowTypes.get(i);
if (moneyFlowType.getMoneyType() == 1) {
List<PoiUtil.PoiUtilCell> income1 = new ArrayList<>();
List<PoiUtil.PoiUtilCell> income2 = new ArrayList<>();
List<PoiUtil.PoiUtilCell> income3 = new ArrayList<>();
income1.add(new PoiUtil.PoiUtilCell(moneyFlowType.getMoneyFlowName(), 1, 3));
income2.add(new PoiUtil.PoiUtilCell());
income3.add(new PoiUtil.PoiUtilCell());
income1.add(new PoiUtil.PoiUtilCell("预计支出"));
income2.add(new PoiUtil.PoiUtilCell("实际支出"));
income3.add(new PoiUtil.PoiUtilCell("偏差率"));
income1.add(new PoiUtil.PoiUtilCell());
income2.add(new PoiUtil.PoiUtilCell());
income3.add(new PoiUtil.PoiUtilCell());
//循环每月的收入
BigDecimal totalProductIncome = BigDecimal.valueOf(0);
BigDecimal totalRealIncome = BigDecimal.valueOf(0);
if (CollectionUtil.isNotEmpty(moneyFlowType.getMoneyFlowList())) {
for (CompanyVo.MoneyFlow moneyFlow : moneyFlowType.getMoneyFlowList()) {
income1.add(new PoiUtil.PoiUtilCell(moneyFlow.getPredictMoneyFlow().toString()));
income2.add(new PoiUtil.PoiUtilCell(moneyFlow.getRealMoneyFlow().toString()));
BigDecimal bias = moneyFlow.getRealMoneyFlow().subtract(moneyFlow.getPredictMoneyFlow()).
divide(moneyFlow.getRealMoneyFlow(), 2, BigDecimal.ROUND_HALF_UP).multiply(BigDecimal.valueOf(100));
income3.add(new PoiUtil.PoiUtilCell(bias.toString() + "%"));
totalProductIncome = totalProductIncome.add(moneyFlow.getPredictMoneyFlow());
totalRealIncome = totalRealIncome.add(moneyFlow.getRealMoneyFlow());
}
}
income1.add(new PoiUtil.PoiUtilCell(totalProductIncome.toString()));
income2.add(new PoiUtil.PoiUtilCell(totalRealIncome.toString()));
BigDecimal bias = totalRealIncome.subtract(totalProductIncome).
divide(totalProductIncome, 2, BigDecimal.ROUND_HALF_UP).multiply(BigDecimal.valueOf(100));
income3.add(new PoiUtil.PoiUtilCell(bias.toString() + "%"));
list.add(income1);
list.add(income2);
list.add(income3);
}
}
//现金流入总计
List<PoiUtil.PoiUtilCell> totalMoneyExpend1 = new ArrayList<>();
List<PoiUtil.PoiUtilCell> totalMoneyExpend2 = new ArrayList<>();
List<PoiUtil.PoiUtilCell> totalMoneyExpend3 = new ArrayList<>();
totalMoneyExpend1.add(new PoiUtil.PoiUtilCell("现金支出", 1, 3));
totalMoneyExpend2.add(new PoiUtil.PoiUtilCell());
totalMoneyExpend3.add(new PoiUtil.PoiUtilCell());
totalMoneyExpend1.add(new PoiUtil.PoiUtilCell("预计支出"));
totalMoneyExpend2.add(new PoiUtil.PoiUtilCell("实际支出"));
totalMoneyExpend3.add(new PoiUtil.PoiUtilCell("偏差率"));
//TODO 现金流入
list.add(totalMoneyExpend1);
list.add(totalMoneyExpend2);
list.add(totalMoneyExpend3);
}
return list;
}
/**
* 生成损益表的写入数据
*
* @param incomeTypeList 损益表数据
* @return 返回写入数据
*/
private List<List<PoiUtil.PoiUtilCell>> generateIncome(List<CompanyVo.IncomeType> incomeTypeList) {
//标题
List<List<PoiUtil.PoiUtilCell>> list = new ArrayList<>();
List<PoiUtil.PoiUtilCell> title = new ArrayList<>();
title.add(new PoiUtil.PoiUtilCell("损益表", 15, 1));
list.add(title);
//表头
List<PoiUtil.PoiUtilCell> header = new ArrayList<>();
header.add(new PoiUtil.PoiUtilCell("", 2, 1));
for (int i = 1; i < 13; i++) {
header.add(new PoiUtil.PoiUtilCell(i + "月"));
}
header.add(new PoiUtil.PoiUtilCell("合计"));
list.add(header);
if (CollectionUtil.isNotEmpty(incomeTypeList)) {
for (int i = 0; i < incomeTypeList.size(); i++) {
CompanyVo.IncomeType incomeType = incomeTypeList.get(i);
List<PoiUtil.PoiUtilCell> income1 = new ArrayList<>();
List<PoiUtil.PoiUtilCell> income2 = new ArrayList<>();
List<PoiUtil.PoiUtilCell> income3 = new ArrayList<>();
income1.add(new PoiUtil.PoiUtilCell(incomeType.getIncomeName(), 1, 3));
income2.add(new PoiUtil.PoiUtilCell());
income3.add(new PoiUtil.PoiUtilCell());
income1.add(new PoiUtil.PoiUtilCell("预计收入"));
income2.add(new PoiUtil.PoiUtilCell("实际收入"));
income3.add(new PoiUtil.PoiUtilCell("偏差率"));
//循环每月的收入
BigDecimal totalProductIncome = BigDecimal.valueOf(0);
BigDecimal totalRealIncome = BigDecimal.valueOf(0);
if (CollectionUtil.isNotEmpty(incomeType.getIncomeMonthList())) {
for (CompanyVo.IncomeMonth incomeMonth : incomeType.getIncomeMonthList()) {
income1.add(new PoiUtil.PoiUtilCell(incomeMonth.getPredictIncome().toString()));
income2.add(new PoiUtil.PoiUtilCell(incomeMonth.getRealIncome().toString()));
BigDecimal bias = incomeMonth.getRealIncome().subtract(incomeMonth.getPredictIncome()).
divide(incomeMonth.getRealIncome(), 2, BigDecimal.ROUND_HALF_UP).multiply(BigDecimal.valueOf(100));
income3.add(new PoiUtil.PoiUtilCell(bias.toString() + "%"));
totalProductIncome = totalProductIncome.add(incomeMonth.getPredictIncome());
totalRealIncome = totalRealIncome.add(incomeMonth.getRealIncome());
}
}
income1.add(new PoiUtil.PoiUtilCell(totalProductIncome.toString()));
income2.add(new PoiUtil.PoiUtilCell(totalRealIncome.toString()));
BigDecimal bias = totalRealIncome.subtract(totalProductIncome).
divide(totalProductIncome, 2, BigDecimal.ROUND_HALF_UP).multiply(BigDecimal.valueOf(100));
income3.add(new PoiUtil.PoiUtilCell(bias.toString() + "%"));
list.add(income1);
list.add(income2);
list.add(income3);
}
}
return list;
}
/**
* 生成成本表的写入数据
* @param costProductTypeList 产品成本信息
* @param costOtherTypeList 其他成本信息
* @return 返回写入的数据
*/
private List<List<PoiUtil.PoiUtilCell>> generateCost(List<CompanyVo.FirstCostType> costProductTypeList, List<CompanyVo.FirstCostType> costOtherTypeList) {
//标题
List<List<PoiUtil.PoiUtilCell>> list = new ArrayList<>();
List<PoiUtil.PoiUtilCell> title = new ArrayList<>();
title.add(new PoiUtil.PoiUtilCell("总成本费用估算表", 15, 1));
list.add(title);
//表头
List<PoiUtil.PoiUtilCell> header = new ArrayList<>();
header.add(new PoiUtil.PoiUtilCell(""));
header.add(new PoiUtil.PoiUtilCell(""));
for (int i = 1; i < 13; i++) {
header.add(new PoiUtil.PoiUtilCell(i + "月"));
}
header.add(new PoiUtil.PoiUtilCell("合计"));
list.add(header);
//TODO 产品成本
List<PoiUtil.PoiUtilCell> productTotalCost = new ArrayList<>();
productTotalCost.add(new PoiUtil.PoiUtilCell("产品成本"));
list.add(productTotalCost);
if(CollectionUtil.isNotEmpty(costProductTypeList)){
for(CompanyVo.FirstCostType firstCostType : costProductTypeList) {
if(CollectionUtil.isNotEmpty(firstCostType.getCostTypeList())) {
for (CompanyVo.CostType costType : firstCostType.getCostTypeList()) {
List<PoiUtil.PoiUtilCell> cost1 = new ArrayList<>();
List<PoiUtil.PoiUtilCell> cost2 = new ArrayList<>();
List<PoiUtil.PoiUtilCell> cost3 = new ArrayList<>();
cost1.add(new PoiUtil.PoiUtilCell(costType.getCostName(), 1, 3));
cost2.add(new PoiUtil.PoiUtilCell());
cost3.add(new PoiUtil.PoiUtilCell());
cost1.add(new PoiUtil.PoiUtilCell("预计收入"));
cost2.add(new PoiUtil.PoiUtilCell("实际收入"));
cost3.add(new PoiUtil.PoiUtilCell("偏差率"));
BigDecimal totalProductIncome = BigDecimal.valueOf(0);
BigDecimal totalRealIncome = BigDecimal.valueOf(0);
if (CollectionUtil.isNotEmpty(costType.getCostMonthList())) {
for (CompanyVo.CostMonth costMonth : costType.getCostMonthList()) {
cost1.add(new PoiUtil.PoiUtilCell(costMonth.getPredictCost().toString()));
cost2.add(new PoiUtil.PoiUtilCell(costMonth.getRealCost().toString()));
BigDecimal bias = costMonth.getRealCost().subtract(costMonth.getPredictCost()).
divide(costMonth.getRealCost(), 2, BigDecimal.ROUND_HALF_UP).multiply(BigDecimal.valueOf(100));
cost3.add(new PoiUtil.PoiUtilCell(bias.toString() + "%"));
totalProductIncome = totalProductIncome.add(costMonth.getPredictCost());
totalRealIncome = totalRealIncome.add(costMonth.getRealCost());
}
}
cost1.add(new PoiUtil.PoiUtilCell(totalProductIncome.toString()));
cost2.add(new PoiUtil.PoiUtilCell(totalRealIncome.toString()));
BigDecimal bias = totalRealIncome.subtract(totalProductIncome).
divide(totalProductIncome, 2, BigDecimal.ROUND_HALF_UP).multiply(BigDecimal.valueOf(100));
cost3.add(new PoiUtil.PoiUtilCell(bias.toString() + "%"));
list.add(cost1);
list.add(cost2);
list.add(cost3);
}
}
List<PoiUtil.PoiUtilCell> productCostType = new ArrayList<>();
productCostType.add(new PoiUtil.PoiUtilCell(firstCostType.getFCostName()));
list.add(productCostType);
}
}
if(CollectionUtil.isNotEmpty(costOtherTypeList)){
for(CompanyVo.FirstCostType firstCostType : costOtherTypeList) {
if(CollectionUtil.isNotEmpty(firstCostType.getCostTypeList())) {
for (CompanyVo.CostType costType : firstCostType.getCostTypeList()) {
List<PoiUtil.PoiUtilCell> cost1 = new ArrayList<>();
List<PoiUtil.PoiUtilCell> cost2 = new ArrayList<>();
List<PoiUtil.PoiUtilCell> cost3 = new ArrayList<>();
cost1.add(new PoiUtil.PoiUtilCell(costType.getCostName(), 1, 3));
cost2.add(new PoiUtil.PoiUtilCell());
cost3.add(new PoiUtil.PoiUtilCell());
cost1.add(new PoiUtil.PoiUtilCell("预计收入"));
cost2.add(new PoiUtil.PoiUtilCell("实际收入"));
cost3.add(new PoiUtil.PoiUtilCell("偏差率"));
BigDecimal totalProductIncome = BigDecimal.valueOf(0);
BigDecimal totalRealIncome = BigDecimal.valueOf(0);
if (CollectionUtil.isNotEmpty(costType.getCostMonthList())) {
for (CompanyVo.CostMonth costMonth : costType.getCostMonthList()) {
cost1.add(new PoiUtil.PoiUtilCell(costMonth.getPredictCost().toString()));
cost2.add(new PoiUtil.PoiUtilCell(costMonth.getRealCost().toString()));
BigDecimal bias = costMonth.getRealCost().subtract(costMonth.getPredictCost()).
divide(costMonth.getRealCost(), 2, BigDecimal.ROUND_HALF_UP).multiply(BigDecimal.valueOf(100));
cost3.add(new PoiUtil.PoiUtilCell(bias.toString() + "%"));
totalProductIncome = totalProductIncome.add(costMonth.getPredictCost());
totalRealIncome = totalRealIncome.add(costMonth.getRealCost());
}
}
cost1.add(new PoiUtil.PoiUtilCell(totalProductIncome.toString()));
cost2.add(new PoiUtil.PoiUtilCell(totalRealIncome.toString()));
BigDecimal bias = totalRealIncome.subtract(totalProductIncome).
divide(totalProductIncome, 2, BigDecimal.ROUND_HALF_UP).multiply(BigDecimal.valueOf(100));
cost3.add(new PoiUtil.PoiUtilCell(bias.toString() + "%"));
list.add(cost1);
list.add(cost2);
list.add(cost3);
}
}
List<PoiUtil.PoiUtilCell> costType = new ArrayList<>();
costType.add(new PoiUtil.PoiUtilCell(firstCostType.getFCostName()));
list.add(costType);
}
}
return list;
}
}

6
pims/src/main/resources/application-test.yml

@ -4,7 +4,7 @@ server:
context-path:
spring:
application:
name: ct
name: pims
datasource:
type: com.alibaba.druid.pool.DruidDataSource
rabbitmq:
@ -29,4 +29,6 @@ swagger:
enable: true
eureka:
instance:
ip-address: 192.168.0.99
ip-address: 192.168.0.99
file:
domain: https://test.tall.wiki/gateway/pims/

4
pims/src/main/resources/application.yml

@ -1,4 +1,4 @@
spring:
profiles:
active: dev
include: common, util-dev
active: test
include: common, util-test

374
pims/src/main/resources/mapper_dao/ProducrDao.xml

@ -2,16 +2,265 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ccsens.pims.persist.dao.ProductDao">
<select id="queryProductInfo" parameterType="java.util.Map" resultType="com.ccsens.pims.bean.vo.CompanyVo$ProductType">
<resultMap id="productInfo" type="com.ccsens.pims.bean.vo.CompanyVo$ProductType">
<id column="productType" property="productType"/>
<result column="productTypeName" property="productTypeName"/>
<collection property="productList" ofType="com.ccsens.pims.bean.vo.CompanyVo$ProductInfo">
<id column="productId" property="productId"/>
<result column="productName" property="productName"/>
<result column="pricing" property="pricing"/>
<result column="priceUnits" property="priceUnits"/>
<result column="grossMargin" property="grossMargin"/>
<result column="significanceSort" property="significanceSort"/>
<result column="description" property="description"/>
</collection>
</resultMap>
<resultMap id="productIncomeAll" type="com.ccsens.pims.bean.vo.CompanyVo$ProductIncomeType">
<id column="productType" property="productType"/>
<result column="productTypeName" property="productTypeName"/>
<collection property="productIncomeAllList" ofType="com.ccsens.pims.bean.vo.CompanyVo$ProductIncomeAll">
<id column="productId" property="productId"/>
<result column="productName" property="productName"/>
<collection property="productIncomeList" ofType="com.ccsens.pims.bean.vo.CompanyVo$ProductIncome">
<id column="incomeId" property="incomeId"/>
<result column="month" property="month"/>
<result column="predictIncome" property="predictIncomeLong"/>
<result column="realIncome" property="realIncomeLong"/>
</collection>
</collection>
</resultMap>
<resultMap id="queryMonthFlow" type="com.ccsens.pims.bean.vo.ProductVo$MoneyFlowType">
<id column="moneyFlowType" property="moneyFlowType"/>
<result column="moneyFlowName" property="moneyFlowName"/>
<result column="moneyType" property="moneyType"/>
<collection property="predictMoneyFlow" ofType="com.ccsens.pims.bean.vo.ProductVo$MonthNum">
<id column="month" property="month"/>
<result column="predictFlowLong" property="num"/>
</collection>
<collection property="realMoneyFlow" ofType="com.ccsens.pims.bean.vo.ProductVo$MonthNum">
<id column="month" property="month"/>
<result column="realFlowLong" property="num"/>
</collection>
</resultMap>
<resultMap id="queryIncome" type="com.ccsens.pims.bean.vo.ProductVo$IncomeType">
<id column="incomeType" property="incomeType"/>
<result column="incomeName" property="incomeName"/>
<collection property="predictIncome" ofType="com.ccsens.pims.bean.vo.ProductVo$MonthNum">
<id column="month" property="month"/>
<result column="predictIncome" property="num"/>
</collection>
<collection property="realIncome" ofType="com.ccsens.pims.bean.vo.ProductVo$MonthNum">
<id column="month" property="month"/>
<result column="realIncome" property="num"/>
</collection>
</resultMap>
<resultMap id="queryProductIncomeMonth" type="com.ccsens.pims.bean.vo.ProductVo$ProductInfo">
<id column="productId" property="productId"/>
<result column="productName" property="productName"/>
<collection property="predictIncome" ofType="com.ccsens.pims.bean.vo.ProductVo$MonthNum">
<id column="monthTime" property="month"/>
<result column="predictIncome" property="num"/>
</collection>
<collection property="realIncome" ofType="com.ccsens.pims.bean.vo.ProductVo$MonthNum">
<id column="monthTime" property="month"/>
<result column="realIncome" property="num"/>
</collection>
</resultMap>
<resultMap id="getTotalCost" type="com.ccsens.pims.bean.vo.ProductVo$ProductCost">
<id column="costTypeName" property="costTypeName"/>
<collection property="predictCost" ofType="com.ccsens.pims.bean.vo.ProductVo$MonthNum">
<id column="monthTime" property="month"/>
<result column="predictCost" property="num"/>
</collection>
<collection property="realCost" ofType="com.ccsens.pims.bean.vo.ProductVo$MonthNum">
<id column="monthTime" property="month"/>
<result column="realCost" property="num"/>
</collection>
</resultMap>
<resultMap id="queryMoneyFlowExcel" type="com.ccsens.pims.bean.vo.CompanyVo$MoneyFlowType">
<id column="moneyFlowType" property="moneyFlowType"/>
<result column="moneyFlowName" property="moneyFlowName"/>
<result column="moneyType" property="moneyType"/>
<collection property="moneyFlowList" ofType="com.ccsens.pims.bean.vo.CompanyVo$MoneyFlow">
<id column="moneyFlowLogId" property="moneyFlowLogId"/>
<result column="month" property="month"/>
<result column="predictMoneyFlow" property="predictMoneyFlow"/>
<result column="realMoneyFlow" property="realMoneyFlow"/>
</collection>
</resultMap>
<resultMap id="queryIncomeExcel" type="com.ccsens.pims.bean.vo.CompanyVo$IncomeType">
<id column="incomeType" property="incomeType"/>
<result column="incomeName" property="incomeName"/>
<collection property="incomeMonthList" ofType="com.ccsens.pims.bean.vo.CompanyVo$IncomeMonth">
<id column="incomeId" property="incomeId"/>
<result column="month" property="month"/>
<result column="predictIncome" property="predictIncome"/>
<result column="realIncome" property="realIncome"/>
</collection>
</resultMap>
<resultMap id="getCostProductExcel" type="com.ccsens.pims.bean.vo.CompanyVo$FirstCostType">
<id column="fCostId" property="fCostId"/>
<result column="fCostName" property="fCostName"/>
<collection property="costTypeList" ofType="com.ccsens.pims.bean.vo.CompanyVo$CostType">
<id column="costId" property="costId"/>
<result column="costName" property="costName"/>
<collection property="costMonthList" ofType="com.ccsens.pims.bean.vo.CompanyVo$CostMonth">
<id column="month" property="month"/>
<result column="predictCost" property="predictCost"/>
<result column="realCost" property="realCost"/>
</collection>
</collection>
</resultMap>
<select id="getCostOtherExcel" parameterType="java.util.Map" resultMap="getCostProductExcel">
SELECT
t.id as fCostId,
t.`name` as fCostName,
a.tId as costId,
a.tName as costName,
a.`month` as `month`,
a.predictCost/100 as predictCost,
a.realCost/100 as realCost
FROM
t_cost_type t
LEFT JOIN
(
SELECT
ct.parent_id as parentId,
ct.id as tId,
ct.`name` as tName,
l.month_time as `month`,
l.predict_cost as predictCost,
l.real_cost as realCost
FROM
t_cost_type ct LEFT JOIN t_cost_log l on ct.id = l.cost_type_id
WHERE
ct.rec_status = 0
AND
ct.parent_id != 0
AND
l.product_cost = 0
)a on t.id = a.parentId
WHERE
t.rec_status = 0
and
t.`level` = 0
AND
t.project_id = #{projectId}
</select>
<select id="getCostProductExcel" parameterType="java.util.Map" resultMap="getCostProductExcel">
SELECT
t.id as fCostId,
t.`name` as fCostName,
p.id as costId,
p.`name` as costName,
l.month_time as `month`,
l.product_cost/100 as predictCost,
l.real_cost/100 as realCost
FROM
t_product_type t LEFT JOIN t_product p on p.product_type_id = t.id
LEFT JOIN t_cost_log l on l.cost_type_id = p.id
WHERE
t.rec_status = 0
AND
p.rec_status = 0
AND
l.product_cost = 1
AND
t.project_id = #{projectId}
</select>
<select id="queryIncomeExcel" parameterType="java.util.Map" resultMap="queryIncomeExcel">
SELECT
s.id as incomeType,
s.`name` as incomeName,
l.id as incomeId,
l.month_time as `month`,
l.predict_money/100 as predictIncome,
l.real_money/100 as realIncome
FROM
t_income_statements s LEFT JOIN t_income_statements_log l on l.income_statements_id = s.id
WHERE
s.rec_status = 0
AND
l.rec_status = 0
AND
s.project_id = #{projectId}
</select>
<select id="queryMoneyFlowExcel" parameterType="java.util.Map" resultMap="queryMoneyFlowExcel">
SELECT
f.id as moneyFlowType,
f.`name` as moneyFlowName,
f.money_type as moneyType,
l.id as moneyFlowLogId,
l.month_time as `month`,
l.predict_money/100 as predictMoneyFlow,
l.real_money/100 as realMoneyFlow
FROM
t_money_flow f LEFT JOIN t_money_flow_log l on l.money_flow_id = f.id
WHERE
f.rec_status = 0
AND
l.rec_status = 0
AND
f.project_id = #{projectId}
</select>
<select id="getTotalCost" parameterType="java.util.Map" resultMap="getTotalCost">
SELECT
t.`name` as costTypeName,
a.predict_cost/100 as predictCost,
a.real_cost/100 as realCost,
a.month_time as monthTime
FROM
t_cost_type t LEFT JOIN
(
SELECT
ct.parent_id as parent_id,
cl.month_time as month_time,
sum(cl.real_cost) as real_cost,
sum(cl.predict_cost) as predict_cost
FROM
`t_cost_type` ct LEFT JOIN t_cost_log cl on ct.id = cl.cost_type_id
WHERE
ct.rec_status = 0
and
cl.rec_status = 0
and
cl.product_cost = 0
GROUP BY ct.parent_id,cl.month_time
)a on t.id = a.parent_id
WHERE
t.parent_id = 0
and
t.project_id = #{projectId}
and
t.rec_status = 0
ORDER BY a.month_time
</select>
<select id="queryProductInfo" parameterType="java.util.Map" resultMap="productInfo">
SELECT
pt.id as productType,
pt.`name` as productTypeName,
p.id as productId,
p.`name` as productName,
p.pricing as productName,
p.pricing/100 as pricing,
p.price_units as priceUnits,
p.gross_margin as grossMargin,
p.significance_sort as significanceSort
p.significance_sort as significanceSort,
p.description as description
FROM
t_product_type pt LEFT JOIN t_product p on pt.id = p.product_type_id
WHERE
@ -22,5 +271,124 @@
pt.project_id = #{projectId}
</select>
<select id="getProductIncome" parameterType="java.util.Map" resultType="com.ccsens.pims.bean.vo.CompanyVo$ProductIncome">
select
month_time as `month`,
predict_income as predictIncomeLong,
real_income as realIncomeLong
from
t_product_income
where
product_id = #{productId}
</select>
<select id="queryProductIncome" parameterType="java.util.Map" resultMap="productIncomeAll">
select
pt.id as productType,
pt.`name` as productTypeName,
p.id as productId,
p.`name` as productName,
pi.id as incomeId,
pi.month_time as `month`,
pi.predict_income as predictIncome,
pi.real_income as realIncome
from
t_product_type pt LEFT JOIN t_product p on pt.id = p.product_type_id Left join t_product_income pi on p.id = pi.product_id
where
pt.rec_status = 0
and
pi.rec_status = 0
AND
p.rec_status = 0
and
pt.project_id = #{projectId}
</select>
<select id="getTotalIncome" parameterType="java.util.Map" resultType="com.ccsens.pims.bean.vo.CompanyVo$TotalIncome">
select
sum(pt.predict_income) as predictTotal,
sum(pt.real_income) as realTotal
from
t_product p Left join t_product_income pt on p.id = pt.product_id
where
pt.rec_status = 0
AND
p.rec_status = 0
and
p.project_id = #{projectId}
</select>
<select id="queryProductIncomeProportion" parameterType="java.util.Map" resultType="com.ccsens.pims.bean.vo.CompanyVo$ProductIncomeProportion">
select
pt.month_time as `month`,
sum(pt.predict_income) as predictTotal,
sum(pt.real_income) as realTotal
from
t_product p Left join t_product_income pt on p.id = pt.product_id
where
pt.rec_status = 0
AND
p.rec_status = 0
and
p.project_id = #{projectId}
and
pt.year_income = #{year}
group by pt.month_time
</select>
<select id="queryMonthFlow" parameterType="java.util.Map" resultMap="queryMonthFlow">
SELECT
mf.id as moneyFlowType,
mf.`name` as moneyFlowName,
mf.money_type as moneyType,
l.id as MoneyFlowLogId,
l.month_time as `month`,
if(mf.money_type = 0,l.predict_money/100,(0-l.predict_money)/100) as predictFlowLong,
if(mf.money_type = 0,l.real_money/100,(0-l.real_money)/100) as realFlowLong
from
t_money_flow mf LEFT JOIN t_money_flow_log l on mf.id = l.money_flow_id
WHERE
mf.rec_status = 0
and
l.rec_status = 0
and
mf.project_id = #{projectId}
</select>
<select id="queryIncome" parameterType="java.util.Map" resultMap="queryIncome">
SELECT
s.id as incomeType,
s.`name` as incomeName,
l.id as incomeId,
l.month_time as `month`,
l.predict_money/100 as `predictIncome`,
l.real_money/100 as `realIncome`
from
t_income_statements s LEFT JOIN t_income_statements_log l on s.id = l.income_statements_id
WHERE
s.rec_status = 0
and
l.rec_status = 0
and
s.project_id = #{projectId}
</select>
<select id="queryProductIncomeMonth" parameterType="java.util.Map" resultMap="queryProductIncomeMonth">
SELECT
p.id as productId,
p.`name` as productName,
i.predict_income/100 as predictIncome,
i.real_income/100 as realIncome,
i.month_time as monthTime
FROM
t_product p LEFT JOIN t_product_income i on i.product_id = p.id
WHERE
i.rec_status = 0
AND
p.rec_status = 0
AND
p.project_id = #{projectId}
</select>
</mapper>

466
pims/src/main/resources/mapper_raw/CompanyCostMapper.xml

@ -1,466 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ccsens.pims.persist.mapper.CompanyCostMapper">
<resultMap id="BaseResultMap" type="com.ccsens.pims.bean.po.CompanyCost">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="company_id" jdbcType="BIGINT" property="companyId" />
<result column="project_id" jdbcType="BIGINT" property="projectId" />
<result column="month_time" jdbcType="VARCHAR" property="monthTime" />
<result column="business_commission" jdbcType="BIGINT" property="businessCommission" />
<result column="commission" jdbcType="BIGINT" property="commission" />
<result column="admin_expense" jdbcType="BIGINT" property="adminExpense" />
<result column="salary" jdbcType="BIGINT" property="salary" />
<result column="insurance" jdbcType="BIGINT" property="insurance" />
<result column="office_rent" jdbcType="BIGINT" property="officeRent" />
<result column="office_other_rent" jdbcType="BIGINT" property="officeOtherRent" />
<result column="depreciation" jdbcType="BIGINT" property="depreciation" />
<result column="travel_on_business" jdbcType="BIGINT" property="travelOnBusiness" />
<result column="market" jdbcType="BIGINT" property="market" />
<result column="online_promotion" jdbcType="BIGINT" property="onlinePromotion" />
<result column="offline_promotion" jdbcType="BIGINT" property="offlinePromotion" />
<result column="business_expand" jdbcType="BIGINT" property="businessExpand" />
<result column="financial_affairs" jdbcType="BIGINT" property="financialAffairs" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="rec_status" jdbcType="TINYINT" property="recStatus" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, company_id, project_id, month_time, business_commission, commission, admin_expense,
salary, insurance, office_rent, office_other_rent, depreciation, travel_on_business,
market, online_promotion, offline_promotion, business_expand, financial_affairs,
created_at, updated_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.pims.bean.po.CompanyCostExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_company_cost
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_company_cost
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_company_cost
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.pims.bean.po.CompanyCostExample">
delete from t_company_cost
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.pims.bean.po.CompanyCost">
insert into t_company_cost (id, company_id, project_id,
month_time, business_commission, commission,
admin_expense, salary, insurance,
office_rent, office_other_rent, depreciation,
travel_on_business, market, online_promotion,
offline_promotion, business_expand, financial_affairs,
created_at, updated_at, rec_status
)
values (#{id,jdbcType=BIGINT}, #{companyId,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT},
#{monthTime,jdbcType=VARCHAR}, #{businessCommission,jdbcType=BIGINT}, #{commission,jdbcType=BIGINT},
#{adminExpense,jdbcType=BIGINT}, #{salary,jdbcType=BIGINT}, #{insurance,jdbcType=BIGINT},
#{officeRent,jdbcType=BIGINT}, #{officeOtherRent,jdbcType=BIGINT}, #{depreciation,jdbcType=BIGINT},
#{travelOnBusiness,jdbcType=BIGINT}, #{market,jdbcType=BIGINT}, #{onlinePromotion,jdbcType=BIGINT},
#{offlinePromotion,jdbcType=BIGINT}, #{businessExpand,jdbcType=BIGINT}, #{financialAffairs,jdbcType=BIGINT},
#{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}
)
</insert>
<insert id="insertSelective" parameterType="com.ccsens.pims.bean.po.CompanyCost">
insert into t_company_cost
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="companyId != null">
company_id,
</if>
<if test="projectId != null">
project_id,
</if>
<if test="monthTime != null">
month_time,
</if>
<if test="businessCommission != null">
business_commission,
</if>
<if test="commission != null">
commission,
</if>
<if test="adminExpense != null">
admin_expense,
</if>
<if test="salary != null">
salary,
</if>
<if test="insurance != null">
insurance,
</if>
<if test="officeRent != null">
office_rent,
</if>
<if test="officeOtherRent != null">
office_other_rent,
</if>
<if test="depreciation != null">
depreciation,
</if>
<if test="travelOnBusiness != null">
travel_on_business,
</if>
<if test="market != null">
market,
</if>
<if test="onlinePromotion != null">
online_promotion,
</if>
<if test="offlinePromotion != null">
offline_promotion,
</if>
<if test="businessExpand != null">
business_expand,
</if>
<if test="financialAffairs != null">
financial_affairs,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="recStatus != null">
rec_status,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="companyId != null">
#{companyId,jdbcType=BIGINT},
</if>
<if test="projectId != null">
#{projectId,jdbcType=BIGINT},
</if>
<if test="monthTime != null">
#{monthTime,jdbcType=VARCHAR},
</if>
<if test="businessCommission != null">
#{businessCommission,jdbcType=BIGINT},
</if>
<if test="commission != null">
#{commission,jdbcType=BIGINT},
</if>
<if test="adminExpense != null">
#{adminExpense,jdbcType=BIGINT},
</if>
<if test="salary != null">
#{salary,jdbcType=BIGINT},
</if>
<if test="insurance != null">
#{insurance,jdbcType=BIGINT},
</if>
<if test="officeRent != null">
#{officeRent,jdbcType=BIGINT},
</if>
<if test="officeOtherRent != null">
#{officeOtherRent,jdbcType=BIGINT},
</if>
<if test="depreciation != null">
#{depreciation,jdbcType=BIGINT},
</if>
<if test="travelOnBusiness != null">
#{travelOnBusiness,jdbcType=BIGINT},
</if>
<if test="market != null">
#{market,jdbcType=BIGINT},
</if>
<if test="onlinePromotion != null">
#{onlinePromotion,jdbcType=BIGINT},
</if>
<if test="offlinePromotion != null">
#{offlinePromotion,jdbcType=BIGINT},
</if>
<if test="businessExpand != null">
#{businessExpand,jdbcType=BIGINT},
</if>
<if test="financialAffairs != null">
#{financialAffairs,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
#{recStatus,jdbcType=TINYINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.pims.bean.po.CompanyCostExample" resultType="java.lang.Long">
select count(*) from t_company_cost
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_company_cost
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.companyId != null">
company_id = #{record.companyId,jdbcType=BIGINT},
</if>
<if test="record.projectId != null">
project_id = #{record.projectId,jdbcType=BIGINT},
</if>
<if test="record.monthTime != null">
month_time = #{record.monthTime,jdbcType=VARCHAR},
</if>
<if test="record.businessCommission != null">
business_commission = #{record.businessCommission,jdbcType=BIGINT},
</if>
<if test="record.commission != null">
commission = #{record.commission,jdbcType=BIGINT},
</if>
<if test="record.adminExpense != null">
admin_expense = #{record.adminExpense,jdbcType=BIGINT},
</if>
<if test="record.salary != null">
salary = #{record.salary,jdbcType=BIGINT},
</if>
<if test="record.insurance != null">
insurance = #{record.insurance,jdbcType=BIGINT},
</if>
<if test="record.officeRent != null">
office_rent = #{record.officeRent,jdbcType=BIGINT},
</if>
<if test="record.officeOtherRent != null">
office_other_rent = #{record.officeOtherRent,jdbcType=BIGINT},
</if>
<if test="record.depreciation != null">
depreciation = #{record.depreciation,jdbcType=BIGINT},
</if>
<if test="record.travelOnBusiness != null">
travel_on_business = #{record.travelOnBusiness,jdbcType=BIGINT},
</if>
<if test="record.market != null">
market = #{record.market,jdbcType=BIGINT},
</if>
<if test="record.onlinePromotion != null">
online_promotion = #{record.onlinePromotion,jdbcType=BIGINT},
</if>
<if test="record.offlinePromotion != null">
offline_promotion = #{record.offlinePromotion,jdbcType=BIGINT},
</if>
<if test="record.businessExpand != null">
business_expand = #{record.businessExpand,jdbcType=BIGINT},
</if>
<if test="record.financialAffairs != null">
financial_affairs = #{record.financialAffairs,jdbcType=BIGINT},
</if>
<if test="record.createdAt != null">
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
</if>
<if test="record.updatedAt != null">
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="record.recStatus != null">
rec_status = #{record.recStatus,jdbcType=TINYINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update t_company_cost
set id = #{record.id,jdbcType=BIGINT},
company_id = #{record.companyId,jdbcType=BIGINT},
project_id = #{record.projectId,jdbcType=BIGINT},
month_time = #{record.monthTime,jdbcType=VARCHAR},
business_commission = #{record.businessCommission,jdbcType=BIGINT},
commission = #{record.commission,jdbcType=BIGINT},
admin_expense = #{record.adminExpense,jdbcType=BIGINT},
salary = #{record.salary,jdbcType=BIGINT},
insurance = #{record.insurance,jdbcType=BIGINT},
office_rent = #{record.officeRent,jdbcType=BIGINT},
office_other_rent = #{record.officeOtherRent,jdbcType=BIGINT},
depreciation = #{record.depreciation,jdbcType=BIGINT},
travel_on_business = #{record.travelOnBusiness,jdbcType=BIGINT},
market = #{record.market,jdbcType=BIGINT},
online_promotion = #{record.onlinePromotion,jdbcType=BIGINT},
offline_promotion = #{record.offlinePromotion,jdbcType=BIGINT},
business_expand = #{record.businessExpand,jdbcType=BIGINT},
financial_affairs = #{record.financialAffairs,jdbcType=BIGINT},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
rec_status = #{record.recStatus,jdbcType=TINYINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.pims.bean.po.CompanyCost">
update t_company_cost
<set>
<if test="companyId != null">
company_id = #{companyId,jdbcType=BIGINT},
</if>
<if test="projectId != null">
project_id = #{projectId,jdbcType=BIGINT},
</if>
<if test="monthTime != null">
month_time = #{monthTime,jdbcType=VARCHAR},
</if>
<if test="businessCommission != null">
business_commission = #{businessCommission,jdbcType=BIGINT},
</if>
<if test="commission != null">
commission = #{commission,jdbcType=BIGINT},
</if>
<if test="adminExpense != null">
admin_expense = #{adminExpense,jdbcType=BIGINT},
</if>
<if test="salary != null">
salary = #{salary,jdbcType=BIGINT},
</if>
<if test="insurance != null">
insurance = #{insurance,jdbcType=BIGINT},
</if>
<if test="officeRent != null">
office_rent = #{officeRent,jdbcType=BIGINT},
</if>
<if test="officeOtherRent != null">
office_other_rent = #{officeOtherRent,jdbcType=BIGINT},
</if>
<if test="depreciation != null">
depreciation = #{depreciation,jdbcType=BIGINT},
</if>
<if test="travelOnBusiness != null">
travel_on_business = #{travelOnBusiness,jdbcType=BIGINT},
</if>
<if test="market != null">
market = #{market,jdbcType=BIGINT},
</if>
<if test="onlinePromotion != null">
online_promotion = #{onlinePromotion,jdbcType=BIGINT},
</if>
<if test="offlinePromotion != null">
offline_promotion = #{offlinePromotion,jdbcType=BIGINT},
</if>
<if test="businessExpand != null">
business_expand = #{businessExpand,jdbcType=BIGINT},
</if>
<if test="financialAffairs != null">
financial_affairs = #{financialAffairs,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
rec_status = #{recStatus,jdbcType=TINYINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.pims.bean.po.CompanyCost">
update t_company_cost
set company_id = #{companyId,jdbcType=BIGINT},
project_id = #{projectId,jdbcType=BIGINT},
month_time = #{monthTime,jdbcType=VARCHAR},
business_commission = #{businessCommission,jdbcType=BIGINT},
commission = #{commission,jdbcType=BIGINT},
admin_expense = #{adminExpense,jdbcType=BIGINT},
salary = #{salary,jdbcType=BIGINT},
insurance = #{insurance,jdbcType=BIGINT},
office_rent = #{officeRent,jdbcType=BIGINT},
office_other_rent = #{officeOtherRent,jdbcType=BIGINT},
depreciation = #{depreciation,jdbcType=BIGINT},
travel_on_business = #{travelOnBusiness,jdbcType=BIGINT},
market = #{market,jdbcType=BIGINT},
online_promotion = #{onlinePromotion,jdbcType=BIGINT},
offline_promotion = #{offlinePromotion,jdbcType=BIGINT},
business_expand = #{businessExpand,jdbcType=BIGINT},
financial_affairs = #{financialAffairs,jdbcType=BIGINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
rec_status = #{recStatus,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

291
pims/src/main/resources/mapper_raw/CostLogMapper.xml

@ -0,0 +1,291 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ccsens.pims.persist.mapper.CostLogMapper">
<resultMap id="BaseResultMap" type="com.ccsens.pims.bean.po.CostLog">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="cost_type_id" jdbcType="BIGINT" property="costTypeId" />
<result column="product_cost" jdbcType="TINYINT" property="productCost" />
<result column="year_time" jdbcType="INTEGER" property="yearTime" />
<result column="month_time" jdbcType="INTEGER" property="monthTime" />
<result column="predict_cost" jdbcType="BIGINT" property="predictCost" />
<result column="real_cost" jdbcType="BIGINT" property="realCost" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="rec_status" jdbcType="TINYINT" property="recStatus" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, cost_type_id, product_cost, year_time, month_time, predict_cost, real_cost, created_at,
updated_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.pims.bean.po.CostLogExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_cost_log
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_cost_log
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_cost_log
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.pims.bean.po.CostLogExample">
delete from t_cost_log
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.pims.bean.po.CostLog">
insert into t_cost_log (id, cost_type_id, product_cost,
year_time, month_time, predict_cost,
real_cost, created_at, updated_at,
rec_status)
values (#{id,jdbcType=BIGINT}, #{costTypeId,jdbcType=BIGINT}, #{productCost,jdbcType=TINYINT},
#{yearTime,jdbcType=INTEGER}, #{monthTime,jdbcType=INTEGER}, #{predictCost,jdbcType=BIGINT},
#{realCost,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP},
#{recStatus,jdbcType=TINYINT})
</insert>
<insert id="insertSelective" parameterType="com.ccsens.pims.bean.po.CostLog">
insert into t_cost_log
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="costTypeId != null">
cost_type_id,
</if>
<if test="productCost != null">
product_cost,
</if>
<if test="yearTime != null">
year_time,
</if>
<if test="monthTime != null">
month_time,
</if>
<if test="predictCost != null">
predict_cost,
</if>
<if test="realCost != null">
real_cost,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="recStatus != null">
rec_status,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="costTypeId != null">
#{costTypeId,jdbcType=BIGINT},
</if>
<if test="productCost != null">
#{productCost,jdbcType=TINYINT},
</if>
<if test="yearTime != null">
#{yearTime,jdbcType=INTEGER},
</if>
<if test="monthTime != null">
#{monthTime,jdbcType=INTEGER},
</if>
<if test="predictCost != null">
#{predictCost,jdbcType=BIGINT},
</if>
<if test="realCost != null">
#{realCost,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
#{recStatus,jdbcType=TINYINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.pims.bean.po.CostLogExample" resultType="java.lang.Long">
select count(*) from t_cost_log
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_cost_log
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.costTypeId != null">
cost_type_id = #{record.costTypeId,jdbcType=BIGINT},
</if>
<if test="record.productCost != null">
product_cost = #{record.productCost,jdbcType=TINYINT},
</if>
<if test="record.yearTime != null">
year_time = #{record.yearTime,jdbcType=INTEGER},
</if>
<if test="record.monthTime != null">
month_time = #{record.monthTime,jdbcType=INTEGER},
</if>
<if test="record.predictCost != null">
predict_cost = #{record.predictCost,jdbcType=BIGINT},
</if>
<if test="record.realCost != null">
real_cost = #{record.realCost,jdbcType=BIGINT},
</if>
<if test="record.createdAt != null">
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
</if>
<if test="record.updatedAt != null">
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="record.recStatus != null">
rec_status = #{record.recStatus,jdbcType=TINYINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update t_cost_log
set id = #{record.id,jdbcType=BIGINT},
cost_type_id = #{record.costTypeId,jdbcType=BIGINT},
product_cost = #{record.productCost,jdbcType=TINYINT},
year_time = #{record.yearTime,jdbcType=INTEGER},
month_time = #{record.monthTime,jdbcType=INTEGER},
predict_cost = #{record.predictCost,jdbcType=BIGINT},
real_cost = #{record.realCost,jdbcType=BIGINT},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
rec_status = #{record.recStatus,jdbcType=TINYINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.pims.bean.po.CostLog">
update t_cost_log
<set>
<if test="costTypeId != null">
cost_type_id = #{costTypeId,jdbcType=BIGINT},
</if>
<if test="productCost != null">
product_cost = #{productCost,jdbcType=TINYINT},
</if>
<if test="yearTime != null">
year_time = #{yearTime,jdbcType=INTEGER},
</if>
<if test="monthTime != null">
month_time = #{monthTime,jdbcType=INTEGER},
</if>
<if test="predictCost != null">
predict_cost = #{predictCost,jdbcType=BIGINT},
</if>
<if test="realCost != null">
real_cost = #{realCost,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
rec_status = #{recStatus,jdbcType=TINYINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.pims.bean.po.CostLog">
update t_cost_log
set cost_type_id = #{costTypeId,jdbcType=BIGINT},
product_cost = #{productCost,jdbcType=TINYINT},
year_time = #{yearTime,jdbcType=INTEGER},
month_time = #{monthTime,jdbcType=INTEGER},
predict_cost = #{predictCost,jdbcType=BIGINT},
real_cost = #{realCost,jdbcType=BIGINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
rec_status = #{recStatus,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

275
pims/src/main/resources/mapper_raw/CostTypeMapper.xml

@ -0,0 +1,275 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ccsens.pims.persist.mapper.CostTypeMapper">
<resultMap id="BaseResultMap" type="com.ccsens.pims.bean.po.CostType">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="company_id" jdbcType="BIGINT" property="companyId" />
<result column="project_id" jdbcType="BIGINT" property="projectId" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="level" jdbcType="TINYINT" property="level" />
<result column="parent_id" jdbcType="BIGINT" property="parentId" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="rec_status" jdbcType="TINYINT" property="recStatus" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, company_id, project_id, name, level, parent_id, created_at, updated_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.pims.bean.po.CostTypeExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_cost_type
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_cost_type
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_cost_type
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.pims.bean.po.CostTypeExample">
delete from t_cost_type
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.pims.bean.po.CostType">
insert into t_cost_type (id, company_id, project_id,
name, level, parent_id,
created_at, updated_at, rec_status
)
values (#{id,jdbcType=BIGINT}, #{companyId,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT},
#{name,jdbcType=VARCHAR}, #{level,jdbcType=TINYINT}, #{parentId,jdbcType=BIGINT},
#{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}
)
</insert>
<insert id="insertSelective" parameterType="com.ccsens.pims.bean.po.CostType">
insert into t_cost_type
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="companyId != null">
company_id,
</if>
<if test="projectId != null">
project_id,
</if>
<if test="name != null">
name,
</if>
<if test="level != null">
level,
</if>
<if test="parentId != null">
parent_id,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="recStatus != null">
rec_status,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="companyId != null">
#{companyId,jdbcType=BIGINT},
</if>
<if test="projectId != null">
#{projectId,jdbcType=BIGINT},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="level != null">
#{level,jdbcType=TINYINT},
</if>
<if test="parentId != null">
#{parentId,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
#{recStatus,jdbcType=TINYINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.pims.bean.po.CostTypeExample" resultType="java.lang.Long">
select count(*) from t_cost_type
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_cost_type
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.companyId != null">
company_id = #{record.companyId,jdbcType=BIGINT},
</if>
<if test="record.projectId != null">
project_id = #{record.projectId,jdbcType=BIGINT},
</if>
<if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.level != null">
level = #{record.level,jdbcType=TINYINT},
</if>
<if test="record.parentId != null">
parent_id = #{record.parentId,jdbcType=BIGINT},
</if>
<if test="record.createdAt != null">
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
</if>
<if test="record.updatedAt != null">
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="record.recStatus != null">
rec_status = #{record.recStatus,jdbcType=TINYINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update t_cost_type
set id = #{record.id,jdbcType=BIGINT},
company_id = #{record.companyId,jdbcType=BIGINT},
project_id = #{record.projectId,jdbcType=BIGINT},
name = #{record.name,jdbcType=VARCHAR},
level = #{record.level,jdbcType=TINYINT},
parent_id = #{record.parentId,jdbcType=BIGINT},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
rec_status = #{record.recStatus,jdbcType=TINYINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.pims.bean.po.CostType">
update t_cost_type
<set>
<if test="companyId != null">
company_id = #{companyId,jdbcType=BIGINT},
</if>
<if test="projectId != null">
project_id = #{projectId,jdbcType=BIGINT},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="level != null">
level = #{level,jdbcType=TINYINT},
</if>
<if test="parentId != null">
parent_id = #{parentId,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
rec_status = #{recStatus,jdbcType=TINYINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.pims.bean.po.CostType">
update t_cost_type
set company_id = #{companyId,jdbcType=BIGINT},
project_id = #{projectId,jdbcType=BIGINT},
name = #{name,jdbcType=VARCHAR},
level = #{level,jdbcType=TINYINT},
parent_id = #{parentId,jdbcType=BIGINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
rec_status = #{recStatus,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

43
pims/src/main/resources/mapper_raw/IncomeStatementsLogMapper.xml

@ -6,7 +6,8 @@
<result column="company_id" jdbcType="BIGINT" property="companyId" />
<result column="project_id" jdbcType="BIGINT" property="projectId" />
<result column="income_statements_id" jdbcType="BIGINT" property="incomeStatementsId" />
<result column="month_time" jdbcType="VARCHAR" property="monthTime" />
<result column="year_income" jdbcType="INTEGER" property="yearIncome" />
<result column="month_time" jdbcType="INTEGER" property="monthTime" />
<result column="predict_money" jdbcType="BIGINT" property="predictMoney" />
<result column="real_money" jdbcType="BIGINT" property="realMoney" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
@ -72,8 +73,8 @@
</where>
</sql>
<sql id="Base_Column_List">
id, company_id, project_id, income_statements_id, month_time, predict_money, real_money,
created_at, updated_at, rec_status
id, company_id, project_id, income_statements_id, year_income, month_time, predict_money,
real_money, created_at, updated_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.pims.bean.po.IncomeStatementsLogExample" resultMap="BaseResultMap">
select
@ -107,13 +108,13 @@
</delete>
<insert id="insert" parameterType="com.ccsens.pims.bean.po.IncomeStatementsLog">
insert into t_income_statements_log (id, company_id, project_id,
income_statements_id, month_time, predict_money,
real_money, created_at, updated_at,
rec_status)
income_statements_id, year_income, month_time,
predict_money, real_money, created_at,
updated_at, rec_status)
values (#{id,jdbcType=BIGINT}, #{companyId,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT},
#{incomeStatementsId,jdbcType=BIGINT}, #{monthTime,jdbcType=VARCHAR}, #{predictMoney,jdbcType=BIGINT},
#{realMoney,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP},
#{recStatus,jdbcType=TINYINT})
#{incomeStatementsId,jdbcType=BIGINT}, #{yearIncome,jdbcType=INTEGER}, #{monthTime,jdbcType=INTEGER},
#{predictMoney,jdbcType=BIGINT}, #{realMoney,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP},
#{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT})
</insert>
<insert id="insertSelective" parameterType="com.ccsens.pims.bean.po.IncomeStatementsLog">
insert into t_income_statements_log
@ -130,6 +131,9 @@
<if test="incomeStatementsId != null">
income_statements_id,
</if>
<if test="yearIncome != null">
year_income,
</if>
<if test="monthTime != null">
month_time,
</if>
@ -162,8 +166,11 @@
<if test="incomeStatementsId != null">
#{incomeStatementsId,jdbcType=BIGINT},
</if>
<if test="yearIncome != null">
#{yearIncome,jdbcType=INTEGER},
</if>
<if test="monthTime != null">
#{monthTime,jdbcType=VARCHAR},
#{monthTime,jdbcType=INTEGER},
</if>
<if test="predictMoney != null">
#{predictMoney,jdbcType=BIGINT},
@ -203,8 +210,11 @@
<if test="record.incomeStatementsId != null">
income_statements_id = #{record.incomeStatementsId,jdbcType=BIGINT},
</if>
<if test="record.yearIncome != null">
year_income = #{record.yearIncome,jdbcType=INTEGER},
</if>
<if test="record.monthTime != null">
month_time = #{record.monthTime,jdbcType=VARCHAR},
month_time = #{record.monthTime,jdbcType=INTEGER},
</if>
<if test="record.predictMoney != null">
predict_money = #{record.predictMoney,jdbcType=BIGINT},
@ -232,7 +242,8 @@
company_id = #{record.companyId,jdbcType=BIGINT},
project_id = #{record.projectId,jdbcType=BIGINT},
income_statements_id = #{record.incomeStatementsId,jdbcType=BIGINT},
month_time = #{record.monthTime,jdbcType=VARCHAR},
year_income = #{record.yearIncome,jdbcType=INTEGER},
month_time = #{record.monthTime,jdbcType=INTEGER},
predict_money = #{record.predictMoney,jdbcType=BIGINT},
real_money = #{record.realMoney,jdbcType=BIGINT},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
@ -254,8 +265,11 @@
<if test="incomeStatementsId != null">
income_statements_id = #{incomeStatementsId,jdbcType=BIGINT},
</if>
<if test="yearIncome != null">
year_income = #{yearIncome,jdbcType=INTEGER},
</if>
<if test="monthTime != null">
month_time = #{monthTime,jdbcType=VARCHAR},
month_time = #{monthTime,jdbcType=INTEGER},
</if>
<if test="predictMoney != null">
predict_money = #{predictMoney,jdbcType=BIGINT},
@ -280,7 +294,8 @@
set company_id = #{companyId,jdbcType=BIGINT},
project_id = #{projectId,jdbcType=BIGINT},
income_statements_id = #{incomeStatementsId,jdbcType=BIGINT},
month_time = #{monthTime,jdbcType=VARCHAR},
year_income = #{yearIncome,jdbcType=INTEGER},
month_time = #{monthTime,jdbcType=INTEGER},
predict_money = #{predictMoney,jdbcType=BIGINT},
real_money = #{realMoney,jdbcType=BIGINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},

43
pims/src/main/resources/mapper_raw/MoneyFlowLogMapper.xml

@ -6,7 +6,8 @@
<result column="company_id" jdbcType="BIGINT" property="companyId" />
<result column="project_id" jdbcType="BIGINT" property="projectId" />
<result column="money_flow_id" jdbcType="BIGINT" property="moneyFlowId" />
<result column="month_time" jdbcType="VARCHAR" property="monthTime" />
<result column="year_income" jdbcType="INTEGER" property="yearIncome" />
<result column="month_time" jdbcType="INTEGER" property="monthTime" />
<result column="predict_money" jdbcType="BIGINT" property="predictMoney" />
<result column="real_money" jdbcType="BIGINT" property="realMoney" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
@ -72,8 +73,8 @@
</where>
</sql>
<sql id="Base_Column_List">
id, company_id, project_id, money_flow_id, month_time, predict_money, real_money,
created_at, updated_at, rec_status
id, company_id, project_id, money_flow_id, year_income, month_time, predict_money,
real_money, created_at, updated_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.pims.bean.po.MoneyFlowLogExample" resultMap="BaseResultMap">
select
@ -107,13 +108,13 @@
</delete>
<insert id="insert" parameterType="com.ccsens.pims.bean.po.MoneyFlowLog">
insert into t_money_flow_log (id, company_id, project_id,
money_flow_id, month_time, predict_money,
real_money, created_at, updated_at,
rec_status)
money_flow_id, year_income, month_time,
predict_money, real_money, created_at,
updated_at, rec_status)
values (#{id,jdbcType=BIGINT}, #{companyId,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT},
#{moneyFlowId,jdbcType=BIGINT}, #{monthTime,jdbcType=VARCHAR}, #{predictMoney,jdbcType=BIGINT},
#{realMoney,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP},
#{recStatus,jdbcType=TINYINT})
#{moneyFlowId,jdbcType=BIGINT}, #{yearIncome,jdbcType=INTEGER}, #{monthTime,jdbcType=INTEGER},
#{predictMoney,jdbcType=BIGINT}, #{realMoney,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP},
#{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT})
</insert>
<insert id="insertSelective" parameterType="com.ccsens.pims.bean.po.MoneyFlowLog">
insert into t_money_flow_log
@ -130,6 +131,9 @@
<if test="moneyFlowId != null">
money_flow_id,
</if>
<if test="yearIncome != null">
year_income,
</if>
<if test="monthTime != null">
month_time,
</if>
@ -162,8 +166,11 @@
<if test="moneyFlowId != null">
#{moneyFlowId,jdbcType=BIGINT},
</if>
<if test="yearIncome != null">
#{yearIncome,jdbcType=INTEGER},
</if>
<if test="monthTime != null">
#{monthTime,jdbcType=VARCHAR},
#{monthTime,jdbcType=INTEGER},
</if>
<if test="predictMoney != null">
#{predictMoney,jdbcType=BIGINT},
@ -203,8 +210,11 @@
<if test="record.moneyFlowId != null">
money_flow_id = #{record.moneyFlowId,jdbcType=BIGINT},
</if>
<if test="record.yearIncome != null">
year_income = #{record.yearIncome,jdbcType=INTEGER},
</if>
<if test="record.monthTime != null">
month_time = #{record.monthTime,jdbcType=VARCHAR},
month_time = #{record.monthTime,jdbcType=INTEGER},
</if>
<if test="record.predictMoney != null">
predict_money = #{record.predictMoney,jdbcType=BIGINT},
@ -232,7 +242,8 @@
company_id = #{record.companyId,jdbcType=BIGINT},
project_id = #{record.projectId,jdbcType=BIGINT},
money_flow_id = #{record.moneyFlowId,jdbcType=BIGINT},
month_time = #{record.monthTime,jdbcType=VARCHAR},
year_income = #{record.yearIncome,jdbcType=INTEGER},
month_time = #{record.monthTime,jdbcType=INTEGER},
predict_money = #{record.predictMoney,jdbcType=BIGINT},
real_money = #{record.realMoney,jdbcType=BIGINT},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
@ -254,8 +265,11 @@
<if test="moneyFlowId != null">
money_flow_id = #{moneyFlowId,jdbcType=BIGINT},
</if>
<if test="yearIncome != null">
year_income = #{yearIncome,jdbcType=INTEGER},
</if>
<if test="monthTime != null">
month_time = #{monthTime,jdbcType=VARCHAR},
month_time = #{monthTime,jdbcType=INTEGER},
</if>
<if test="predictMoney != null">
predict_money = #{predictMoney,jdbcType=BIGINT},
@ -280,7 +294,8 @@
set company_id = #{companyId,jdbcType=BIGINT},
project_id = #{projectId,jdbcType=BIGINT},
money_flow_id = #{moneyFlowId,jdbcType=BIGINT},
month_time = #{monthTime,jdbcType=VARCHAR},
year_income = #{yearIncome,jdbcType=INTEGER},
month_time = #{monthTime,jdbcType=INTEGER},
predict_money = #{predictMoney,jdbcType=BIGINT},
real_money = #{realMoney,jdbcType=BIGINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},

45
pims/src/main/resources/mapper_raw/ProductIncomeMapper.xml

@ -4,7 +4,8 @@
<resultMap id="BaseResultMap" type="com.ccsens.pims.bean.po.ProductIncome">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="product_id" jdbcType="BIGINT" property="productId" />
<result column="month_time" jdbcType="VARCHAR" property="monthTime" />
<result column="year_income" jdbcType="INTEGER" property="yearIncome" />
<result column="month_time" jdbcType="INTEGER" property="monthTime" />
<result column="predict_income" jdbcType="BIGINT" property="predictIncome" />
<result column="real_income" jdbcType="BIGINT" property="realIncome" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
@ -70,8 +71,8 @@
</where>
</sql>
<sql id="Base_Column_List">
id, product_id, month_time, predict_income, real_income, created_at, updated_at,
rec_status
id, product_id, year_income, month_time, predict_income, real_income, created_at,
updated_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.pims.bean.po.ProductIncomeExample" resultMap="BaseResultMap">
select
@ -104,12 +105,14 @@
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.pims.bean.po.ProductIncome">
insert into t_product_income (id, product_id, month_time,
predict_income, real_income, created_at,
updated_at, rec_status)
values (#{id,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT}, #{monthTime,jdbcType=VARCHAR},
#{predictIncome,jdbcType=BIGINT}, #{realIncome,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP},
#{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT})
insert into t_product_income (id, product_id, year_income,
month_time, predict_income, real_income,
created_at, updated_at, rec_status
)
values (#{id,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT}, #{yearIncome,jdbcType=INTEGER},
#{monthTime,jdbcType=INTEGER}, #{predictIncome,jdbcType=BIGINT}, #{realIncome,jdbcType=BIGINT},
#{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}
)
</insert>
<insert id="insertSelective" parameterType="com.ccsens.pims.bean.po.ProductIncome">
insert into t_product_income
@ -120,6 +123,9 @@
<if test="productId != null">
product_id,
</if>
<if test="yearIncome != null">
year_income,
</if>
<if test="monthTime != null">
month_time,
</if>
@ -146,8 +152,11 @@
<if test="productId != null">
#{productId,jdbcType=BIGINT},
</if>
<if test="yearIncome != null">
#{yearIncome,jdbcType=INTEGER},
</if>
<if test="monthTime != null">
#{monthTime,jdbcType=VARCHAR},
#{monthTime,jdbcType=INTEGER},
</if>
<if test="predictIncome != null">
#{predictIncome,jdbcType=BIGINT},
@ -181,8 +190,11 @@
<if test="record.productId != null">
product_id = #{record.productId,jdbcType=BIGINT},
</if>
<if test="record.yearIncome != null">
year_income = #{record.yearIncome,jdbcType=INTEGER},
</if>
<if test="record.monthTime != null">
month_time = #{record.monthTime,jdbcType=VARCHAR},
month_time = #{record.monthTime,jdbcType=INTEGER},
</if>
<if test="record.predictIncome != null">
predict_income = #{record.predictIncome,jdbcType=BIGINT},
@ -208,7 +220,8 @@
update t_product_income
set id = #{record.id,jdbcType=BIGINT},
product_id = #{record.productId,jdbcType=BIGINT},
month_time = #{record.monthTime,jdbcType=VARCHAR},
year_income = #{record.yearIncome,jdbcType=INTEGER},
month_time = #{record.monthTime,jdbcType=INTEGER},
predict_income = #{record.predictIncome,jdbcType=BIGINT},
real_income = #{record.realIncome,jdbcType=BIGINT},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
@ -224,8 +237,11 @@
<if test="productId != null">
product_id = #{productId,jdbcType=BIGINT},
</if>
<if test="yearIncome != null">
year_income = #{yearIncome,jdbcType=INTEGER},
</if>
<if test="monthTime != null">
month_time = #{monthTime,jdbcType=VARCHAR},
month_time = #{monthTime,jdbcType=INTEGER},
</if>
<if test="predictIncome != null">
predict_income = #{predictIncome,jdbcType=BIGINT},
@ -248,7 +264,8 @@
<update id="updateByPrimaryKey" parameterType="com.ccsens.pims.bean.po.ProductIncome">
update t_product_income
set product_id = #{productId,jdbcType=BIGINT},
month_time = #{monthTime,jdbcType=VARCHAR},
year_income = #{yearIncome,jdbcType=INTEGER},
month_time = #{monthTime,jdbcType=INTEGER},
predict_income = #{predictIncome,jdbcType=BIGINT},
real_income = #{realIncome,jdbcType=BIGINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},

28
pims/src/main/resources/mapper_raw/ProductMapper.xml

@ -7,10 +7,10 @@
<result column="project_id" jdbcType="BIGINT" property="projectId" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="description" jdbcType="VARCHAR" property="description" />
<result column="product_type_id" jdbcType="TINYINT" property="productTypeId" />
<result column="product_type_id" jdbcType="BIGINT" property="productTypeId" />
<result column="pricing" jdbcType="BIGINT" property="pricing" />
<result column="price_units" jdbcType="BIGINT" property="priceUnits" />
<result column="gross_margin" jdbcType="INTEGER" property="grossMargin" />
<result column="gross_margin" jdbcType="VARCHAR" property="grossMargin" />
<result column="significance_sort" jdbcType="TINYINT" property="significanceSort" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
@ -115,8 +115,8 @@
significance_sort, created_at, updated_at,
rec_status)
values (#{id,jdbcType=BIGINT}, #{companyId,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT},
#{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{productTypeId,jdbcType=TINYINT},
#{pricing,jdbcType=BIGINT}, #{priceUnits,jdbcType=BIGINT}, #{grossMargin,jdbcType=INTEGER},
#{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{productTypeId,jdbcType=BIGINT},
#{pricing,jdbcType=BIGINT}, #{priceUnits,jdbcType=BIGINT}, #{grossMargin,jdbcType=VARCHAR},
#{significanceSort,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP},
#{recStatus,jdbcType=TINYINT})
</insert>
@ -180,7 +180,7 @@
#{description,jdbcType=VARCHAR},
</if>
<if test="productTypeId != null">
#{productTypeId,jdbcType=TINYINT},
#{productTypeId,jdbcType=BIGINT},
</if>
<if test="pricing != null">
#{pricing,jdbcType=BIGINT},
@ -189,7 +189,7 @@
#{priceUnits,jdbcType=BIGINT},
</if>
<if test="grossMargin != null">
#{grossMargin,jdbcType=INTEGER},
#{grossMargin,jdbcType=VARCHAR},
</if>
<if test="significanceSort != null">
#{significanceSort,jdbcType=TINYINT},
@ -230,7 +230,7 @@
description = #{record.description,jdbcType=VARCHAR},
</if>
<if test="record.productTypeId != null">
product_type_id = #{record.productTypeId,jdbcType=TINYINT},
product_type_id = #{record.productTypeId,jdbcType=BIGINT},
</if>
<if test="record.pricing != null">
pricing = #{record.pricing,jdbcType=BIGINT},
@ -239,7 +239,7 @@
price_units = #{record.priceUnits,jdbcType=BIGINT},
</if>
<if test="record.grossMargin != null">
gross_margin = #{record.grossMargin,jdbcType=INTEGER},
gross_margin = #{record.grossMargin,jdbcType=VARCHAR},
</if>
<if test="record.significanceSort != null">
significance_sort = #{record.significanceSort,jdbcType=TINYINT},
@ -265,10 +265,10 @@
project_id = #{record.projectId,jdbcType=BIGINT},
name = #{record.name,jdbcType=VARCHAR},
description = #{record.description,jdbcType=VARCHAR},
product_type_id = #{record.productTypeId,jdbcType=TINYINT},
product_type_id = #{record.productTypeId,jdbcType=BIGINT},
pricing = #{record.pricing,jdbcType=BIGINT},
price_units = #{record.priceUnits,jdbcType=BIGINT},
gross_margin = #{record.grossMargin,jdbcType=INTEGER},
gross_margin = #{record.grossMargin,jdbcType=VARCHAR},
significance_sort = #{record.significanceSort,jdbcType=TINYINT},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
@ -293,7 +293,7 @@
description = #{description,jdbcType=VARCHAR},
</if>
<if test="productTypeId != null">
product_type_id = #{productTypeId,jdbcType=TINYINT},
product_type_id = #{productTypeId,jdbcType=BIGINT},
</if>
<if test="pricing != null">
pricing = #{pricing,jdbcType=BIGINT},
@ -302,7 +302,7 @@
price_units = #{priceUnits,jdbcType=BIGINT},
</if>
<if test="grossMargin != null">
gross_margin = #{grossMargin,jdbcType=INTEGER},
gross_margin = #{grossMargin,jdbcType=VARCHAR},
</if>
<if test="significanceSort != null">
significance_sort = #{significanceSort,jdbcType=TINYINT},
@ -325,10 +325,10 @@
project_id = #{projectId,jdbcType=BIGINT},
name = #{name,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR},
product_type_id = #{productTypeId,jdbcType=TINYINT},
product_type_id = #{productTypeId,jdbcType=BIGINT},
pricing = #{pricing,jdbcType=BIGINT},
price_units = #{priceUnits,jdbcType=BIGINT},
gross_margin = #{grossMargin,jdbcType=INTEGER},
gross_margin = #{grossMargin,jdbcType=VARCHAR},
significance_sort = #{significanceSort,jdbcType=TINYINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},

19
tall/src/main/java/com/ccsens/tall/bean/dto/ChartDto.java

@ -1,5 +1,6 @@
package com.ccsens.tall.bean.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ -9,7 +10,7 @@ import java.util.List;
@Data
public class ChartDto {
@ApiModel
@Data
public static class ProjectTrendDto{
@NotNull
@ -24,7 +25,7 @@ public class ChartDto {
@ApiModelProperty("角色id")
private Long roleId;
}
@ApiModel
@Data
public static class ChartsExecutorDto{
@NotNull
@ -41,6 +42,7 @@ public class ChartDto {
@ApiModelProperty("角色id")
private List<Long> roleList;
}
@ApiModel
@Data
public static class ChartsCompleteDto{
@NotNull
@ -53,4 +55,17 @@ public class ChartDto {
@ApiModelProperty("角色id")
private List<Long> roleList;
}
@ApiModel
@Data
public static class ChartsOverviewDto{
@NotNull
@ApiModelProperty("项目id")
private Long projectId;
@ApiModelProperty("开始时间")
private Long beginTime;
@ApiModelProperty("结束时间")
private Long endTime;
@ApiModelProperty("角色id")
private List<Long> roleList;
}
}

33
tall/src/main/java/com/ccsens/tall/bean/dto/DomainDto.java

@ -62,4 +62,37 @@ public class DomainDto {
@ApiModelProperty("0 -> 左侧/上 1 -> 右侧/下")
private Integer position;
}
@ApiModel("添加域配置信息")
@Data
public static class UpdateDomainInfo{
@NotNull
@ApiModelProperty("id")
private Long id;
@ApiModelProperty("域名")
private String domainName;
@ApiModelProperty("Logo")
private String logo;
@ApiModelProperty("公司名")
private String companyName;
@ApiModelProperty("系统名")
private String systemName;
@ApiModelProperty("登陆背景图路径")
private String backdropUrl;
@ApiModelProperty("标题")
private String caption;
@ApiModelProperty("栏外标题")
private String headline;
@ApiModelProperty("是否显示日历 0不显示 1显示")
private Byte showCalendar;
@ApiModelProperty("不展示日历时。显示的项目的id")
private Long showProjectId;
@ApiModelProperty("常驻项目的id")
private Long foreverProjectId;
@ApiModelProperty("是否展示导航")
private Byte domainNav;
@ApiModelProperty("域特有导航信息")
private List<DomainVo.DomainNavInfo> domainNavInfoList;
}
}

15
tall/src/main/java/com/ccsens/tall/bean/dto/MemberDto.java

@ -6,7 +6,6 @@ import lombok.Data;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;
/**
@ -17,16 +16,20 @@ public class MemberDto {
@Data
@ApiModel("添加成员")
public static class SaveMember{
@NotNull
@ApiModelProperty("项目id")
private Long projectId;
@ApiModelProperty("成员名")
private String memberName;
@NotEmpty
@ApiModelProperty("成员手机号")
private String phone;
@ApiModelProperty("所属角色的id")
private List<Long> roleId;
@ApiModelProperty("奖惩干系人id")
private Long stakeholderId;
@ApiModelProperty("奖惩干系人手机号")
private String stakeholderPhone;
@ApiModelProperty("奖惩干系人姓名")
private String stakeholderName;
}
@ -47,7 +50,9 @@ public class MemberDto {
private String memberName;
@ApiModelProperty("成员手机号")
private String phone;
@ApiModelProperty("奖惩干系人id")
private Long stakeholderId;
@ApiModelProperty("奖惩干系人手机号")
private String stakeholderPhone;
@ApiModelProperty("奖惩干系人姓名")
private String stakeholderName;
}
}

2
tall/src/main/java/com/ccsens/tall/bean/dto/ProjectDto.java

@ -94,6 +94,8 @@ public class ProjectDto {
private String selectType;
@ApiModelProperty("第三列展示页面的路径")
private String detailPath;
@ApiModelProperty("项目关联pims域内的导航栏信息 0无关联 1例会系统 2财务系统 3课程")
private Integer pimsNavType;
public Integer getSelectTaskType(){
if(ObjectUtil.isNull(selectType)) {

59
tall/src/main/java/com/ccsens/tall/bean/dto/TaskDto.java

@ -1,13 +1,10 @@
package com.ccsens.tall.bean.dto;
import cn.hutool.core.util.ObjectUtil;
import com.ccsens.tall.util.TallConstant;
import com.ccsens.util.exception.BaseException;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
@ -41,8 +38,40 @@ public class TaskDto {
private String taskDeliver;
@ApiModelProperty("插件")
private List<Long> pluginList;
@ApiModelProperty("优先级 3,紧急重要 2,紧急不重要 1,重要不紧急 0,不重要不紧急 默认0")
private Byte priority;
@ApiModelProperty("任务提醒消息")
private TaskRemind taskRemind;
private TaskRemindByAdd taskRemind;
}
@Data
@ApiModel("设置任务提醒")
public static class TaskRemindByAdd{
@ApiModelProperty("提醒时机 0不提醒 1开始前,2开始时,3开始后,4结束前,5结束时,6结束后,7自定义时间")
private Byte remindTiming;
@ApiModelProperty("时长 提醒时机是“开始时”或“结束时”可以为空")
private Long duration = 0L;
@ApiModelProperty("时间单位 0分钟 1小时 2天")
private Byte unit;
public Long getDuration(){
if(ObjectUtil.isNull(unit)) {
throw new BaseException("时间单位不能为空");
}
if(remindTiming == 7){
return duration;
}
switch (unit) {
case 0:
return duration * 60 * 1000L;
case 1:
return duration * 60 * 60 * 1000L;
case 2:
return duration * 24 * 60 * 60 * 1000L;
default:
return duration;
}
}
}
@ApiModel
@ -263,7 +292,7 @@ public class TaskDto {
@ApiModel("设置任务提醒")
public static class UpdateTaskRemind{
@NotNull
@ApiModelProperty("任务日期id(subTimeId)")
@ApiModelProperty("提醒信息的id")
private Long remindId;
@ApiModelProperty("提醒时机 0不提醒 1开始前,2开始时,3开始后,4结束前,5结束时,6结束后,7自定义时间")
private Byte remindTiming;
@ -291,4 +320,24 @@ public class TaskDto {
}
}
}
@Data
@ApiModel("查看项目内的任务清单")
public static class SelectListByProject{
@NotNull
@ApiModelProperty("项目id")
private Long projectId;
@ApiModelProperty("任务关键字")
private String key;
@ApiModelProperty("开始时间")
private String start;
@ApiModelProperty("结束时间")
private String end;
@ApiModelProperty("页码")
private Integer page = 0;
@ApiModelProperty("每页数量 默认10")
private Integer pageSize = 10;
@ApiModelProperty("角色id")
private List<Long> roleList;
}
}

19
tall/src/main/java/com/ccsens/tall/bean/dto/WpsDto.java

@ -1,13 +1,12 @@
package com.ccsens.tall.bean.dto;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.servlet.http.Part;
import javax.validation.constraints.NotNull;
import java.util.Map;
/**
* @description:
@ -192,4 +191,20 @@ public class WpsDto {
private Long fileId;
}
@Data
@ApiModel("查找wps文件路径")
public static class VisitWpsUrl{
@NotNull
@ApiModelProperty("业务ID")
private Long businessId;
@NotNull
@ApiModelProperty("业务类型")
private Byte businessType;
@NotNull
@ApiModelProperty("userId")
private Long userId;
@ApiModelProperty("访问路径")
private Map<String, String> params;
}
}

11
tall/src/main/java/com/ccsens/tall/bean/po/ProShow.java

@ -32,6 +32,8 @@ public class ProShow implements Serializable {
private String detailPath;
private Byte pimsNavType;
private static final long serialVersionUID = 1L;
public Long getId() {
@ -146,6 +148,14 @@ public class ProShow implements Serializable {
this.detailPath = detailPath == null ? null : detailPath.trim();
}
public Byte getPimsNavType() {
return pimsNavType;
}
public void setPimsNavType(Byte pimsNavType) {
this.pimsNavType = pimsNavType;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -166,6 +176,7 @@ public class ProShow implements Serializable {
sb.append(", showShortcuts=").append(showShortcuts);
sb.append(", selectTaskType=").append(selectTaskType);
sb.append(", detailPath=").append(detailPath);
sb.append(", pimsNavType=").append(pimsNavType);
sb.append("]");
return sb.toString();
}

60
tall/src/main/java/com/ccsens/tall/bean/po/ProShowExample.java

@ -964,6 +964,66 @@ public class ProShowExample {
addCriterion("detail_path not between", value1, value2, "detailPath");
return (Criteria) this;
}
public Criteria andPimsNavTypeIsNull() {
addCriterion("pims_nav_type is null");
return (Criteria) this;
}
public Criteria andPimsNavTypeIsNotNull() {
addCriterion("pims_nav_type is not null");
return (Criteria) this;
}
public Criteria andPimsNavTypeEqualTo(Byte value) {
addCriterion("pims_nav_type =", value, "pimsNavType");
return (Criteria) this;
}
public Criteria andPimsNavTypeNotEqualTo(Byte value) {
addCriterion("pims_nav_type <>", value, "pimsNavType");
return (Criteria) this;
}
public Criteria andPimsNavTypeGreaterThan(Byte value) {
addCriterion("pims_nav_type >", value, "pimsNavType");
return (Criteria) this;
}
public Criteria andPimsNavTypeGreaterThanOrEqualTo(Byte value) {
addCriterion("pims_nav_type >=", value, "pimsNavType");
return (Criteria) this;
}
public Criteria andPimsNavTypeLessThan(Byte value) {
addCriterion("pims_nav_type <", value, "pimsNavType");
return (Criteria) this;
}
public Criteria andPimsNavTypeLessThanOrEqualTo(Byte value) {
addCriterion("pims_nav_type <=", value, "pimsNavType");
return (Criteria) this;
}
public Criteria andPimsNavTypeIn(List<Byte> values) {
addCriterion("pims_nav_type in", values, "pimsNavType");
return (Criteria) this;
}
public Criteria andPimsNavTypeNotIn(List<Byte> values) {
addCriterion("pims_nav_type not in", values, "pimsNavType");
return (Criteria) this;
}
public Criteria andPimsNavTypeBetween(Byte value1, Byte value2) {
addCriterion("pims_nav_type between", value1, value2, "pimsNavType");
return (Criteria) this;
}
public Criteria andPimsNavTypeNotBetween(Byte value1, Byte value2) {
addCriterion("pims_nav_type not between", value1, value2, "pimsNavType");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {

15
tall/src/main/java/com/ccsens/tall/bean/vo/ProjectVo.java

@ -131,6 +131,8 @@ public class ProjectVo {
private String selectType;
@ApiModelProperty("第三列展示页面的路径")
private String detailPath = "/project";
@ApiModelProperty("项目关联pims域内的导航栏信息 0无关联 1例会系统 2财务系统 3课程")
private int pimsNavType = 0;
public String getSelectType(){
if(ObjectUtil.isNull(selectTaskType)) {
@ -327,4 +329,17 @@ public class ProjectVo {
}
}
@Data
@ApiModel("关注者的信息")
public static class AttentionInfo{
@ApiModelProperty("关注者id")
private Long attentionId;
@ApiModelProperty("关注者的姓名")
private String attentionName;
@ApiModelProperty("关注者头像")
private String avatarUrl;
@ApiModelProperty("关注者手机号")
private String phone;
}
}

9
tall/src/main/java/com/ccsens/tall/bean/vo/WpsVo.java

@ -273,4 +273,13 @@ public class WpsVo {
@ApiModelProperty("文件名字")
private String fileName;
}
@Data
public static class BusinessFileIdAndPath{
@ApiModelProperty("业务id")
private Long businessId;
@ApiModelProperty("文件路径")
private String filePath;
}
}

2
tall/src/main/java/com/ccsens/tall/persist/dao/ProMemberDao.java

@ -31,4 +31,6 @@ public interface ProMemberDao extends ProMemberMapper{
List<ProjectVo.MembersByProject> selectMembersByProjectId(@Param("projectId")Long projectId);
ProjectVo.MembersByProject getMemberInfoByMemberId(@Param("memberId")Long memberId);
List<ProjectVo.AttentionInfo> queryAttention(@Param("projectId")Long projectId);
}

4
tall/src/main/java/com/ccsens/tall/persist/dao/SysProjectDao.java

@ -34,7 +34,7 @@ public interface SysProjectDao extends SysProjectMapper{
List<ChartVo.ProjectTrendVo> getProjectTrend(@Param("projectId")Long projectId, @Param("start")Long start, @Param("end")Long end,
@Param("roleId")Long roleId,@Param("allMemberId")Long allMemberId);
ChartVo.ProjectOverview getOverview(@Param("projectId")Long projectId);
ChartVo.ProjectOverview getOverview(@Param("projectId")Long projectId, @Param("beginTime")Long beginTime,@Param("endTime")Long endTime,@Param("roleIdList")List<Long> roleIdList);
List<ChartVo.BurnoutFigure> getBurnoutFigure(@Param("projectId")Long projectId,
@Param("start")Long start, @Param("end")Long end,
@ -42,5 +42,5 @@ public interface SysProjectDao extends SysProjectMapper{
Integer getTaskTotalByProjectId(@Param("projectId")Long projectId, @Param("start")Long start, @Param("end")Long end, @Param("roleId")Long roleId);
ChartVo.ProjectOverview getOverviewByToDay(@Param("projectId")Long projectId, @Param("startTime")Long startTime, @Param("endTime")Long endTime);
ChartVo.ProjectOverview getOverviewByToDay(@Param("projectId")Long projectId, @Param("startTime")Long startTime, @Param("endTime")Long endTime,@Param("roleIdList")List<Long> roleIdList);
}

8
tall/src/main/java/com/ccsens/tall/service/ChartService.java

@ -83,18 +83,18 @@ public class ChartService implements IChartService{
/**
* 概览报表
* @param currentUserId
* @param projectId
* @param overview 项目id 时间范围 角色id
* @return
*/
@Override
public ChartVo.ProjectOverview getOverview(Long currentUserId, Long projectId) throws Exception {
public ChartVo.ProjectOverview getOverview(Long currentUserId, ChartDto.ChartsOverviewDto overview) throws Exception {
//获取全部的数据
ChartVo.ProjectOverview projectOverview = sysProjectDao.getOverview(projectId);
ChartVo.ProjectOverview projectOverview = sysProjectDao.getOverview(overview.getProjectId(),overview.getBeginTime(),overview.getEndTime(),overview.getRoleList());
//获取当天零点和二十四点的时间
Long startTime = DateUtil.beginOfDay(new Date()).getTime();
Long endTime = DateUtil.endOfDay(new Date()).getTime();
//获取当天的数据
ChartVo.ProjectOverview projectOverview1 = sysProjectDao.getOverviewByToDay(projectId,startTime,endTime);
ChartVo.ProjectOverview projectOverview1 = sysProjectDao.getOverviewByToDay(overview.getProjectId(),startTime,endTime,overview.getRoleList());
//将数据整合在一起
projectOverview.setTodayCompleted(projectOverview1.getTodayCompleted() == null ? 0 : projectOverview1.getTodayCompleted());
projectOverview.setToday(projectOverview1.getToday());

12
tall/src/main/java/com/ccsens/tall/service/ExcelService.java

@ -226,8 +226,8 @@ public class ExcelService implements IExcelService {
proRoles.add(stakeholderRole);
//添加奖惩干系人角色(二级角色)
ProRole stakeholderProRole = new ProRole();
stakeholderProRole.setName(WebConstant.ROLE_NAME.MoneyStakeholder.value);
stakeholderProRole.setDescription(WebConstant.ROLE_NAME.MoneyStakeholder.phase);
stakeholderProRole.setName(WebConstant.ROLE_NAME.MoneyStakeholder.phase);
stakeholderProRole.setDescription(WebConstant.ROLE_NAME.MoneyStakeholder.value);
stakeholderProRole.setParentId(stakeholderRole.getId());
stakeholderProRole.setProjectId(sysProject.getId());
stakeholderProRole.setId(snowflake.nextId());
@ -244,8 +244,8 @@ public class ExcelService implements IExcelService {
proRoles.add(creator);
//添加创建者角色(二级角色)
ProRole creatorRole = new ProRole();
creatorRole.setName(WebConstant.ROLE_NAME.Creator.value);
creatorRole.setDescription(WebConstant.ROLE_NAME.Creator.phase);
creatorRole.setName(WebConstant.ROLE_NAME.Creator.phase);
creatorRole.setDescription(WebConstant.ROLE_NAME.Creator.value);
creatorRole.setParentId(creator.getId());
creatorRole.setProjectId(sysProject.getId());
creatorRole.setId(snowflake.nextId());
@ -862,8 +862,8 @@ public class ExcelService implements IExcelService {
}
}
}
// 添加默认例会任务
saveMeeting(taskDetails,pmRoleId,sysProject,proRoles);
// // 添加默认例会任务
// saveMeeting(taskDetails,pmRoleId,sysProject,proRoles);
//添加一个结束虚拟节点
ProTaskDetail endTask = new ProTaskDetail();
endTask.setId(snowflake.nextId());

2
tall/src/main/java/com/ccsens/tall/service/IChartService.java

@ -12,7 +12,7 @@ public interface IChartService {
List<ChartVo.ProjectTrendVo> getProjectTrend(Long currentUserId, ChartDto.ProjectTrendDto projectTrendDto);
ChartVo.ProjectOverview getOverview(Long currentUserId, Long projectId) throws Exception;
ChartVo.ProjectOverview getOverview(Long currentUserId, ChartDto.ChartsOverviewDto chartsOverviewDto) throws Exception;
List<ChartVo.BurnoutFigure> getBurnoutFigure(Long currentUserId, ChartDto.ProjectTrendDto projectTrendDto);

10
tall/src/main/java/com/ccsens/tall/service/IProMemberService.java

@ -1,6 +1,7 @@
package com.ccsens.tall.service;
import com.ccsens.tall.bean.dto.MemberDto;
import com.ccsens.tall.bean.dto.ProjectDto;
import com.ccsens.tall.bean.po.ProMember;
import com.ccsens.tall.bean.po.ProRole;
import com.ccsens.tall.bean.vo.MemberVo;
@ -52,5 +53,12 @@ public interface IProMemberService {
* @param updateMemberInfo 需要修改的信息
* @return 返回修改后的成员信息
*/
ProjectVo.MembersByProject updateMemberInfo(Long currentUserId, MemberDto.UpdateMemberInfo updateMemberInfo);
ProjectVo.MembersByProject updateMemberInfo(Long currentUserId, MemberDto.UpdateMemberInfo updateMemberInfo) throws Exception;
/**
* 获取项目的关注者不包含成员
* @param projectDto 项目id
* @return 返回关注者的信息
*/
List<ProjectVo.AttentionInfo> queryAttention(ProjectDto.ProjectIdDto projectDto);
}

3
tall/src/main/java/com/ccsens/tall/service/IProTaskDetailService.java

@ -4,7 +4,6 @@ import com.ccsens.tall.bean.dto.TaskDto;
import com.ccsens.tall.bean.po.ProSubTimeMember;
import com.ccsens.tall.bean.po.ProTaskDetail;
import com.ccsens.tall.bean.vo.TaskVo;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
@ -20,7 +19,7 @@ public interface IProTaskDetailService {
TaskVo.TaskCheckList selectTaskList(Long currentUserId, String key, String start, String end, String role, Integer page, Integer pageSize) throws Exception;
TaskVo.TaskCheckList selectTaskListByProject(Long projectId, Long currentUserId, Integer page, Integer pageSize, String key, String start, String end, Long roleId) throws Exception;
TaskVo.TaskCheckList selectTaskListByProject(Long currentUserId,TaskDto.SelectListByProject selectListByProject) throws Exception;
List<TaskVo.TaskDetailByKey> getTaskDetailByKey(Long currentUserId, Long projectId, String key);

7
tall/src/main/java/com/ccsens/tall/service/ISysDomainService.java

@ -20,4 +20,11 @@ public interface ISysDomainService {
* @return 返回域配置信息
*/
DomainVo.DomainInfo saveDomain(DomainDto.DomainInfo domainInfo);
/**
* 修改数组
* @param domainInfo 需要修改的信息
* @return 返回域信息
*/
DomainVo.DomainInfo updateDomain(DomainDto.UpdateDomainInfo domainInfo);
}

7
tall/src/main/java/com/ccsens/tall/service/IWpsService.java

@ -95,4 +95,11 @@ public interface IWpsService {
* @return WPS访问路径
*/
List<String> queryVisitUrls(long businessId, byte businessType, String token, Map<String, String> params);
/**
* 通过wpsId查找wps文件的路径
* @param fileId 文件id
* @return 返回问价路径
*/
WpsVo.BusinessFileIdAndPath getPathById(Long fileId);
}

92
tall/src/main/java/com/ccsens/tall/service/ProMemberService.java

@ -7,6 +7,7 @@ import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.ccsens.tall.bean.dto.MemberDto;
import com.ccsens.tall.bean.dto.MemberRoleDto;
import com.ccsens.tall.bean.dto.ProjectDto;
import com.ccsens.tall.bean.po.*;
import com.ccsens.tall.bean.vo.MemberVo;
import com.ccsens.tall.bean.vo.ProjectVo;
@ -235,6 +236,13 @@ public class ProMemberService implements IProMemberService {
public void saveProMember(Long currentUserId, MemberDto.SaveMember saveMember) throws Exception {
int power = proRoleService.selectPowerByRoleName(currentUserId, saveMember.getProjectId());
if (power > 1) {
//用项目id和手机号判断用户是否存在
ProMemberExample memberExample = new ProMemberExample();
memberExample.createCriteria().andProjectIdEqualTo(saveMember.getProjectId()).andPhoneEqualTo(saveMember.getPhone());
List<ProMember> memberList = proMemberDao.selectByExample(memberExample);
if(CollectionUtil.isNotEmpty(memberList)){
throw new BaseException(CodeEnum.WBS_REPEAT_MEMBER_PHONE);
}
//通过手机号查找用户
Long userId = userService.selectUserIdByPhone(saveMember.getPhone());
//添加成员
@ -242,8 +250,44 @@ public class ProMemberService implements IProMemberService {
proMember.setId(snowflake.nextId());
proMember.setProjectId(saveMember.getProjectId());
proMember.setNickname(saveMember.getMemberName());
proMember.setPhone(saveMember.getPhone());
proMember.setUserId(userId);
proMember.setStakeholderId(saveMember.getStakeholderId());
//获取奖惩干系人
Long stakeholderId = null;
if(ObjectUtil.isNotNull(saveMember.getStakeholderPhone())){
ProMemberExample stakeholderExample = new ProMemberExample();
stakeholderExample.createCriteria().andProjectIdEqualTo(saveMember.getProjectId()).andPhoneEqualTo(saveMember.getStakeholderPhone());
List<ProMember> stakeholderList = proMemberDao.selectByExample(stakeholderExample);
if(CollectionUtil.isNotEmpty(stakeholderList)){
stakeholderId = stakeholderList.get(0).getId();
}else {
//添加奖惩干系人
Long stakeholderUserId = userService.selectUserIdByPhone(saveMember.getPhone());
ProMember stakeholder = new ProMember();
stakeholder.setId(snowflake.nextId());
stakeholder.setProjectId(saveMember.getProjectId());
stakeholder.setNickname(saveMember.getStakeholderName());
stakeholder.setPhone(saveMember.getStakeholderPhone());
stakeholder.setUserId(stakeholderUserId);
proMemberDao.insertSelective(stakeholder);
stakeholderId = stakeholder.getId();
//添加奖惩干系人与角色的关联
//1.先查找项目内的奖惩干系人角色
ProRoleExample proRoleExample = new ProRoleExample();
proRoleExample.createCriteria().andProjectIdEqualTo(saveMember.getProjectId())
.andNameEqualTo(WebConstant.ROLE_NAME.MoneyStakeholder.phase).andParentIdNotEqualTo(0L);
List<ProRole> roleList = proRoleDao.selectByExample(proRoleExample);
if(CollectionUtil.isNotEmpty(roleList)){
//2.然后添加关联信息
ProMemberRole proMemberRole = new MemberRoleDto();
proMemberRole.setId(snowflake.nextId());
proMemberRole.setRoleId(roleList.get(0).getId());
proMemberRole.setMemberId(stakeholder.getId());
proMemberRoleDao.insertSelective(proMemberRole);
}
}
}
proMember.setStakeholderId(stakeholderId);
proMemberDao.insertSelective(proMember);
//添加成员与角色的关联
if(CollectionUtil.isNotEmpty(saveMember.getRoleId())){
@ -306,7 +350,7 @@ public class ProMemberService implements IProMemberService {
}
@Override
public ProjectVo.MembersByProject updateMemberInfo(Long currentUserId, MemberDto.UpdateMemberInfo updateMemberInfo) {
public ProjectVo.MembersByProject updateMemberInfo(Long currentUserId, MemberDto.UpdateMemberInfo updateMemberInfo) throws Exception {
//查找要修改的成员
ProMember proMember = proMemberDao.selectByPrimaryKey(updateMemberInfo.getMemberId());
if(ObjectUtil.isNull(proMember)){
@ -323,13 +367,51 @@ public class ProMemberService implements IProMemberService {
if(StrUtil.isNotEmpty(updateMemberInfo.getPhone())){
proMember.setPhone(updateMemberInfo.getPhone());
}
if(ObjectUtil.isNotNull(updateMemberInfo.getStakeholderId())){
proMember.setStakeholderId(updateMemberInfo.getStakeholderId());
//修改奖惩干系人
Long stakeholderId = null;
if(ObjectUtil.isNotNull(updateMemberInfo.getStakeholderPhone())){
ProMemberExample stakeholderExample = new ProMemberExample();
stakeholderExample.createCriteria().andProjectIdEqualTo(proMember.getProjectId()).andPhoneEqualTo(updateMemberInfo.getStakeholderPhone());
List<ProMember> stakeholderList = proMemberDao.selectByExample(stakeholderExample);
if(CollectionUtil.isNotEmpty(stakeholderList)){
stakeholderId = stakeholderList.get(0).getId();
}else {
//添加奖惩干系人
Long stakeholderUserId = userService.selectUserIdByPhone(updateMemberInfo.getPhone());
ProMember stakeholder = new ProMember();
stakeholder.setId(snowflake.nextId());
stakeholder.setProjectId(proMember.getProjectId());
stakeholder.setNickname(updateMemberInfo.getStakeholderName());
stakeholder.setPhone(updateMemberInfo.getStakeholderPhone());
stakeholder.setUserId(stakeholderUserId);
proMemberDao.insertSelective(stakeholder);
stakeholderId = stakeholder.getId();
//添加奖惩干系人与角色的关联
//1.先查找项目内的奖惩干系人角色
ProRoleExample proRoleExample = new ProRoleExample();
proRoleExample.createCriteria().andProjectIdEqualTo(proMember.getProjectId())
.andNameEqualTo(WebConstant.ROLE_NAME.MoneyStakeholder.phase).andParentIdNotEqualTo(0L);
List<ProRole> roleList = proRoleDao.selectByExample(proRoleExample);
if(CollectionUtil.isNotEmpty(roleList)){
//2.然后添加关联信息
ProMemberRole proMemberRole = new MemberRoleDto();
proMemberRole.setId(snowflake.nextId());
proMemberRole.setRoleId(roleList.get(0).getId());
proMemberRole.setMemberId(stakeholder.getId());
proMemberRoleDao.insertSelective(proMemberRole);
}
}
}
// if(ObjectUtil.isNotNull(updateMemberInfo.getStakeholderId())){
proMember.setStakeholderId(stakeholderId);
// }
proMemberDao.updateByPrimaryKeySelective(proMember);
//查找被修改的成员的信息并返回
return proMemberDao.getMemberInfoByMemberId(updateMemberInfo.getMemberId());
}
@Override
public List<ProjectVo.AttentionInfo> queryAttention(ProjectDto.ProjectIdDto projectDto) {
return proMemberDao.queryAttention(projectDto.getProjectId());
}
}

132
tall/src/main/java/com/ccsens/tall/service/ProTaskDetailService.java

@ -544,8 +544,8 @@ public class ProTaskDetailService implements IProTaskDetailService {
ProTaskDetail task = taskDetailDao.selectByPrimaryKey(subTime.getTaskDetailId());
taskDetail = taskDetailDao.selectTaskByTaskId(subTime.getId(), subTime.getTaskDetailId(),task.getExecutorRole());
if(ObjectUtil.isNotNull(taskDetail)) {
// //处理查询到的任务的插件
// managePlugin(currentUserId,task.getExecutorRole(),taskDetail);
//处理查询到的任务的插件
managePlugin(currentUserId,task.getExecutorRole(),taskDetail);
//任务的完成状态
if(taskDetail.getProcess() != 2) {
ProSubTimeMember subTimeMember = getProcessByUserIdAndTask(currentUserId, taskDetail.getId());
@ -560,8 +560,9 @@ public class ProTaskDetailService implements IProTaskDetailService {
//任务配置
taskDetail.setProTaskConfig(getProTaskShow(taskDetail.getDetailId()));
//添加项目信息和插件信息
//添加项目信息
normalTaskAddPlugin(currentUserId, subTime.getTaskDetailId(), taskDetail);
List<TaskVo.NormalTask> groupTaskList = new ArrayList<>();
//提醒信息
taskDetail.setRemindInfoList(proRemindDao.queryRemindByTask(taskDetail.getId()));
@ -576,8 +577,8 @@ public class ProTaskDetailService implements IProTaskDetailService {
if(ObjectUtil.isNotNull(subTimeId)){
groupTask = taskDetailDao.selectTaskByTaskId(subTimeId, detail.getId(),detail.getExecutorRole());
if(ObjectUtil.isNotNull(groupTask)){
// //处理查询到的任务的插件
// managePlugin(currentUserId,task.getExecutorRole(),taskDetail);
//处理查询到的任务的插件
managePlugin(currentUserId,task.getExecutorRole(),taskDetail);
//任务的完成状态
if(taskDetail.getProcess() != 2) {
ProSubTimeMember proSubTimeMember = getProcessByUserIdAndTask(currentUserId, groupTask.getId());
@ -622,9 +623,9 @@ public class ProTaskDetailService implements IProTaskDetailService {
normalTask.setExecutorRoleName(role.getName());
}
//添加插件
List<TaskVo.PluginVo> pluginVoList = pluginService.getPluginByTask(task.getId(), userId);
normalTask.setPlugins(new ArrayList<>());
normalTask.getPlugins().addAll(pluginVoList);
// List<TaskVo.PluginVo> pluginVoList = pluginService.getPluginByTask(task.getId(), userId);
// normalTask.setPlugins(new ArrayList<>());
// normalTask.getPlugins().addAll(pluginVoList);
}
/**
@ -760,25 +761,27 @@ public class ProTaskDetailService implements IProTaskDetailService {
}
private List<TaskVo.NormalTask> getTaskInfoByProjectIdAndUserId(SysProject project, Long userId,
Long startTime, Long endTime,List<ProRole> roleList) throws Exception {
Long startTime, Long endTime,Set<Long> roleList) throws Exception {
List<TaskVo.NormalTask> normalTaskList = new ArrayList<>();
//获取用户的角色
if(CollectionUtil.isEmpty(roleList)){
//查询此用户在项目中的的所有角色的任务
roleList = proMemberService.selectRolesByUserIdAndProjectId(userId, project.getId());
List<ProRole> roles = proMemberService.selectRolesByUserIdAndProjectId(userId, project.getId());
roles.forEach(role->{
roleList.add(role.getId());
});
}
// List<ProRole> roleList = proMemberService.selectRolesByUserIdAndProjectId(userId, project.getId());
//获取“全体成员”角色
ProRole allMember = proRoleService.getAllMember(project.getId());
if (ObjectUtil.isNotNull(allMember)) {
roleList.add(allMember);
roleList.add(allMember.getId());
}
if (CollectionUtil.isNotEmpty(roleList)) {
for (ProRole role : roleList) {
SysProject sysProject = sysProjectDao.selectByPrimaryKey(role.getProjectId());
for (Long roleId : roleList) {
// SysProject sysProject = sysProjectDao.selectByPrimaryKey(role.getProjectId());
List<TaskVo.NormalTask> taskList =
taskDetailDao.selectTaskByRoleAndAllMembers(project.getId(), role.getId(), null,startTime, endTime,0);
taskDetailDao.selectTaskByRoleAndAllMembers(project.getId(), roleId, null,startTime, endTime,0);
if (CollectionUtil.isNotEmpty(taskList)) {
for (TaskVo.NormalTask normalTask : taskList) {
//任务的完成状态
@ -793,9 +796,9 @@ public class ProTaskDetailService implements IProTaskDetailService {
}
}
ProRole proRole = proRoleDao.selectByPrimaryKey(normalTask.getExecutorRole());
if (ObjectUtil.isNotNull(sysProject)) {
normalTask.setProjectId(sysProject.getId());
normalTask.setProjectName(sysProject.getName());
if (ObjectUtil.isNotNull(project)) {
normalTask.setProjectId(project.getId());
normalTask.setProjectName(project.getName());
}
if (ObjectUtil.isNotNull(proRole)) {
normalTask.setExecutorRoleName(proRole.getName());
@ -812,8 +815,7 @@ public class ProTaskDetailService implements IProTaskDetailService {
* 项目内的任务清单
*/
@Override
public TaskVo.TaskCheckList selectTaskListByProject(Long projectId, Long currentUserId, Integer page, Integer pageSize,
String key, String start, String end, Long roleId) throws Exception {
public TaskVo.TaskCheckList selectTaskListByProject(Long currentUserId, TaskDto.SelectListByProject list) throws Exception {
TaskVo.TaskCheckList taskCheckList = new TaskVo.TaskCheckList();
List<TaskVo.NormalTask> normalTaskList = new ArrayList<>();
TaskVo.PageInfo pageInfo = new TaskVo.PageInfo();
@ -822,45 +824,69 @@ public class ProTaskDetailService implements IProTaskDetailService {
Long startMillisTime = null;
Long endMillisTime = null;
Map<String, Long> timeMap;
if (StrUtil.isNotEmpty(start)) {
timeMap = DateUtil.projectFormatDateTime(start);
if (StrUtil.isNotEmpty(list.getStart())) {
timeMap = DateUtil.projectFormatDateTime(list.getStart());
startMillisTime = timeMap.get("startMillisTime");
}
if (StrUtil.isNotEmpty(end)) {
timeMap = DateUtil.projectFormatDateTime(end);
if (StrUtil.isNotEmpty(list.getEnd())) {
timeMap = DateUtil.projectFormatDateTime(list.getEnd());
endMillisTime = timeMap.get("endMillisTime");
}
//获取需查询的角色
List<ProRole> roleList = new ArrayList<>();
if(ObjectUtil.isNotNull(roleId)){
//获取指定的角色
ProRole role = proRoleDao.selectByPrimaryKey(roleId);
if(ObjectUtil.isNotNull(role)){
ProRole parentRole = proRoleDao.selectByPrimaryKey(role.getParentId());
if(ObjectUtil.isNotNull(parentRole)){
//若角色为项目经理或MVP,则查询全部角色
if (role.getName().equalsIgnoreCase(WebConstant.ROLE_NAME.MVP.value) ||
parentRole.getName().equalsIgnoreCase(WebConstant.ROLE_NAME.PM.value)) {
//查询项目下所有角色的任务
List<ProjectVo.RoleInfo> roleInfoList = proRoleService.getRealMemberRolesByProjectId(projectId);
if(CollectionUtil.isNotEmpty(roleInfoList)) {
for (ProjectVo.RoleInfo roleInfo : roleInfoList) {
ProRole proRole = proRoleDao.selectByPrimaryKey(roleInfo.getId());
roleList.add(proRole);
Set<Long> roleList = new HashSet<>();
if(ObjectUtil.isNotNull(list.getRoleList())){
list.getRoleList().forEach(roleId -> {
ProRole role = proRoleDao.selectByPrimaryKey(roleId);
if(ObjectUtil.isNotNull(role)){
ProRole parentRole = proRoleDao.selectByPrimaryKey(role.getParentId());
if(ObjectUtil.isNotNull(parentRole)){
//若角色为项目经理或MVP,则查询全部角色
if (role.getName().equalsIgnoreCase(WebConstant.ROLE_NAME.MVP.value) ||
parentRole.getName().equalsIgnoreCase(WebConstant.ROLE_NAME.PM.value)) {
//查询项目下所有角色
List<ProjectVo.RoleInfo> roleInfoList = proRoleService.getRealMemberRolesByProjectId(list.getProjectId());
if(CollectionUtil.isNotEmpty(roleInfoList)) {
for (ProjectVo.RoleInfo roleInfo : roleInfoList) {
// ProRole proRole = proRoleDao.selectByPrimaryKey(roleInfo.getId());
roleList.add(roleInfo.getId());
}
}
}
}else {
//否则只查询指定角色的任务清单
roleList.add(role);
}
}
}else{
throw new BaseException(CodeEnum.NOT_ROLE);
});
if(CollectionUtil.isEmpty(roleList)){
roleList.addAll(list.getRoleList());
}
// //获取指定的角色
// ProRole role = proRoleDao.selectByPrimaryKey(roleId);
// if(ObjectUtil.isNotNull(role)){
// ProRole parentRole = proRoleDao.selectByPrimaryKey(role.getParentId());
// if(ObjectUtil.isNotNull(parentRole)){
// //若角色为项目经理或MVP,则查询全部角色
// if (role.getName().equalsIgnoreCase(WebConstant.ROLE_NAME.MVP.value) ||
// parentRole.getName().equalsIgnoreCase(WebConstant.ROLE_NAME.PM.value)) {
// //查询项目下所有角色的任务
// List<ProjectVo.RoleInfo> roleInfoList = proRoleService.getRealMemberRolesByProjectId(projectId);
// if(CollectionUtil.isNotEmpty(roleInfoList)) {
// for (ProjectVo.RoleInfo roleInfo : roleInfoList) {
// ProRole proRole = proRoleDao.selectByPrimaryKey(roleInfo.getId());
// roleList.add(proRole);
// }
// }
// }else {
// //否则只查询指定角色的任务清单
// roleList.add(role);
// }
// }
// }else{
// throw new BaseException(CodeEnum.NOT_ROLE);
// }
}
//获取项目
SysProject sysProject = sysProjectDao.selectByPrimaryKey(projectId);
SysProject sysProject = sysProjectDao.selectByPrimaryKey(list.getProjectId());
if (ObjectUtil.isNotNull(sysProject)) {
List<TaskVo.NormalTask> taskList = getTaskInfoByProjectIdAndUserId(sysProject, currentUserId, startMillisTime, endMillisTime,roleList);
if (CollectionUtil.isNotEmpty(taskList)) {
@ -868,9 +894,9 @@ public class ProTaskDetailService implements IProTaskDetailService {
}
}
//关键词模糊搜索
if (StrUtil.isNotEmpty(key)) {
if (StrUtil.isNotEmpty(list.getKey())) {
if (CollectionUtil.isNotEmpty(normalTaskList)) {
normalTaskList.removeIf(normalTask -> !normalTask.getName().contains(key));
normalTaskList.removeIf(normalTask -> !normalTask.getName().contains(list.getKey()));
// Iterator<TaskVo.NormalTask> it = normalTaskList.iterator();
// while (it.hasNext()) {
// TaskVo.NormalTask normalTask = it.next();
@ -885,11 +911,11 @@ public class ProTaskDetailService implements IProTaskDetailService {
int totalPages = 1;
if (CollectionUtil.isNotEmpty(normalTaskList)) {
//1.计算分页条件
if (page > 0) {
if (list.getPage() > 0) {
int size = normalTaskList.size();
totalPages = size / pageSize + 1;
int num = pageSize;
int startIndex = pageSize * (page - 1);
totalPages = size / list.getPageSize() + 1;
int num = list.getPageSize();
int startIndex = list.getPageSize() * (list.getPage() - 1);
if (startIndex >= size) {
startIndex = -1;
} else {
@ -908,7 +934,7 @@ public class ProTaskDetailService implements IProTaskDetailService {
theNormalList = CollectionUtil.newArrayList(normalTaskList);
}
}
pageInfo.setCurrentPage(page);
pageInfo.setCurrentPage(list.getPage());
pageInfo.setTotalPage(totalPages);
taskCheckList.setNormalTaskList(theNormalList);

55
tall/src/main/java/com/ccsens/tall/service/ProjectService.java

@ -61,6 +61,8 @@ public class ProjectService implements IProjectService {
private SysRingMsgDao sysRingMsgDao;
@Resource
private IWpsService wpsService;
@Resource
private ProTaskShowDao proTaskShowDao;
@Override
public void saveProject(SysProject sysProject) {
@ -188,6 +190,7 @@ public class ProjectService implements IProjectService {
projectConfig.setShowMvp(proShowList.get(0).getIsShowMvp());
projectConfig.setSelectTaskType(proShowList.get(0).getSelectTaskType());
projectConfig.setDetailPath(proShowList.get(0).getDetailPath());
projectConfig.setPimsNavType(proShowList.get(0).getPimsNavType());
projectInfo.setProjectConfig(projectConfig);
} else {
ProjectVo.ProjectConfig projectConfig = new ProjectVo.ProjectConfig();
@ -256,6 +259,8 @@ public class ProjectService implements IProjectService {
projectConfig.setFilter(proShowList.get(0).getFilter());
projectConfig.setShowMvp(proShowList.get(0).getIsShowMvp());
projectConfig.setSelectTaskType(proShowList.get(0).getSelectTaskType());
projectConfig.setDetailPath(proShowList.get(0).getDetailPath());
projectConfig.setPimsNavType(proShowList.get(0).getPimsNavType());
projectInfo.setProjectConfig(projectConfig);
} else {
ProjectVo.ProjectConfig projectConfig = new ProjectVo.ProjectConfig();
@ -322,6 +327,7 @@ public class ProjectService implements IProjectService {
projectConfig.setShowMvp(proShowList.get(0).getIsShowMvp());
projectConfig.setSelectTaskType(proShowList.get(0).getSelectTaskType());
projectConfig.setDetailPath(proShowList.get(0).getDetailPath());
projectConfig.setPimsNavType(proShowList.get(0).getPimsNavType());
projectInfo.setProjectConfig(projectConfig);
} else {
ProjectVo.ProjectConfig projectConfig = new ProjectVo.ProjectConfig();
@ -531,9 +537,11 @@ public class ProjectService implements IProjectService {
SysProject oldProject = sysProjectDao.selectByPrimaryKey(projectDto.getProjectId());
SysProject newProject = new SysProject();
if (ObjectUtil.isNotNull(oldProject)) {
BeanUtil.copyProperties(oldProject, newProject);
newProject.setId(snowflake.nextId());
newProject.setCreatorId(userId);
newProject.setTemplate((byte) 0);
saveProject(newProject);
//该用户关注新项目
UserAttention userAttention = new UserAttention();
@ -543,6 +551,8 @@ public class ProjectService implements IProjectService {
attentionDao.insertSelective(userAttention);
//添加角色
copyRole(oldProject.getId(), newProject.getId());
//复制项目配置信息
copyProjectConfig(oldProject.getId(), newProject.getId());
} else {
throw new BaseException(CodeEnum.NOT_PROJECT);
}
@ -560,6 +570,26 @@ public class ProjectService implements IProjectService {
return getProjectInfoById(userId, newProject.getId(),token);
}
/**
* 复制项目配置信息
* @param oldId 被复制的项目的id
* @param newId 新建的项目的id
*/
private void copyProjectConfig(Long oldId, Long newId) {
ProShowExample showExample = new ProShowExample();
showExample.createCriteria().andProjectIdEqualTo(oldId);
List<ProShow> shows = proShowDao.selectByExample(showExample);
if(CollectionUtil.isNotEmpty(shows)){
shows.forEach(show -> {
ProShow newShow = new ProShow();
BeanUtil.copyProperties(show,newShow);
newShow.setId(snowflake.nextId());
newShow.setProjectId(newId);
proShowDao.insertSelective(newShow);
});
}
}
/**
* 复制角色
*/
@ -676,13 +706,38 @@ public class ProjectService implements IProjectService {
}
}
copyPluginAndDeliver(oldDetail.getId(), newDetail.getId(), oldRoleMap, newRoleMap);
copyTaskConfig(oldDetail.getId(),newDetail.getId(),oldProjectId,newProjectId);
}
}
copyPluginAndDeliver(oldDetail.getId(), newDetail.getId(), oldRoleMap, newRoleMap);
copyTaskConfig(oldDetail.getId(),newDetail.getId(),oldProjectId,newProjectId);
}
}
}
/**
* 复制任务配置信息
* @param oldDetailId 旧任务id
* @param newDetailId 新任务id
* @param oldProjectId 旧项目id
* @param newProjectId 新项目id
*/
private void copyTaskConfig(Long oldDetailId, Long newDetailId, Long oldProjectId, Long newProjectId) {
ProTaskShowExample taskShowExample = new ProTaskShowExample();
taskShowExample.createCriteria().andTaskDetailIdEqualTo(oldDetailId).andProjectIdEqualTo(oldProjectId);
List<ProTaskShow> taskShowList = proTaskShowDao.selectByExample(taskShowExample);
if(CollectionUtil.isNotEmpty(taskShowList)){
taskShowList.forEach(taskShow -> {
ProTaskShow newTaskShow = new ProTaskShow();
BeanUtil.copyProperties(taskShow,newTaskShow);
newTaskShow.setId(snowflake.nextId());
newTaskShow.setProjectId(newProjectId);
newTaskShow.setTaskDetailId(newDetailId);
proTaskShowDao.insertSelective(newTaskShow);
});
}
}
/**
* 根据时间分解任务
*/

33
tall/src/main/java/com/ccsens/tall/service/SysDomainService.java

@ -7,6 +7,7 @@ import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.ccsens.tall.bean.dto.DomainDto;
import com.ccsens.tall.bean.po.DomainNav;
import com.ccsens.tall.bean.po.DomainNavExample;
import com.ccsens.tall.bean.po.SysDomain;
import com.ccsens.tall.bean.po.SysDomainExample;
import com.ccsens.tall.bean.vo.DomainVo;
@ -62,7 +63,7 @@ public class SysDomainService implements ISysDomainService{
if(ObjectUtil.isNull(domainInfo)){
domainInfo = new DomainVo.DomainInfo();
domainInfo.setDomainName(PropUtil.notGatewayUrl + "gateway/tall/v1.0");
domainInfo.setLogo("");
domainInfo.setLogo("https://test.tall.wiki/staticrec/logo.png");
domainInfo.setCompanyName("传控电子科技有限公司");
domainInfo.setSystemName("TALL时物链条");
domainInfo.setBackdropUrl("");
@ -93,4 +94,34 @@ public class SysDomainService implements ISysDomainService{
}
return getDomainByName(domainInfo.getDomainName());
}
@Override
public DomainVo.DomainInfo updateDomain(DomainDto.UpdateDomainInfo domainInfo) {
SysDomain domain = sysDomainDao.selectByPrimaryKey(domainInfo.getId());
String domainName = domain.getDomainName();
BeanUtil.copyProperties(domainInfo, domain);
domain.setNavigationBar(domainInfo.getDomainNav());
sysDomainDao.updateByPrimaryKeySelective(domain);
if(CollectionUtil.isNotEmpty(domainInfo.getDomainNavInfoList())){
//如果之前有导航,删掉,重新添加新导航
DomainNavExample domainNavExample = new DomainNavExample();
domainNavExample.createCriteria().andDomainIdEqualTo(domain.getId());
List<DomainNav> domainNavList = domainNavDao.selectByExample(domainNavExample);
if(CollectionUtil.isNotEmpty(domainNavList)){
domainNavList.forEach(domainNav -> {
domainNav.setRecStatus((byte) 2);
domainNavDao.updateByPrimaryKeySelective(domainNav);
});
}
//添加新的导航信息
domainInfo.getDomainNavInfoList().forEach(domainNavInfo -> {
DomainNav domainNav = new DomainNav();
BeanUtil.copyProperties(domainNavInfo, domainNav);
domainNav.setId(snowflake.nextId());
domainNav.setDomainId(domain.getId());
domainNavDao.insertSelective(domainNav);
});
}
return getDomainByName(domainName);
}
}

93
tall/src/main/java/com/ccsens/tall/service/TaskPluginService.java

@ -17,9 +17,8 @@ import com.ccsens.util.PropUtil;
import com.ccsens.util.WebConstant;
import com.ccsens.util.exception.BaseException;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.core.io.DefaultResourceLoader;
import org.springframework.core.io.ResourceLoader;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
@ -27,7 +26,6 @@ import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.*;
import java.util.concurrent.atomic.AtomicReference;
@ -277,6 +275,7 @@ public class TaskPluginService implements ITaskPluginService{
@Override
public List<String> saveMinutes(Long currentUserId, Long projectId, Long taskId,String token) throws Exception {
Map<String,String> params = new HashMap<>();
params.put(WebConstant.Wps._W_URL,PropUtil.domain + "debug");
List<String> wpsPath = wpsService.queryVisitUrls(taskId,(byte) 2,token,params);
@ -298,14 +297,14 @@ public class TaskPluginService implements ITaskPluginService{
//查找本周任务
List<TaskVo.TaskMinutesWps> thisWeekTask = taskSubTimeDao.queryMinutesTaskByTime(projectId,thisWeekStartTime,thisWeekEndTime);
//生成excel写入的数据
List<List<PoiUtil.PoiUtilCell>> minutes = writeMinutes(lastWeekTask,thisWeekTask);
List<List<PoiUtil.PoiUtilCell>> minutes = writeMinutes(lastWeekTask,thisWeekTask,sysProject.getName());
//写入WBS
ResourceLoader resourceLoader = new DefaultResourceLoader();
InputStream is = resourceLoader.getResource("classpath:template/regularMeetingTemplate.xlsx").getInputStream();
XSSFWorkbook wb = new XSSFWorkbook(is);
// Workbook wb = new XSSFWorkbook();
// PoiUtil.exportWB("会议记录", minutes, wb);
// ResourceLoader resourceLoader = new DefaultResourceLoader();
// InputStream is = resourceLoader.getResource("classpath:template/regularMeetingTemplate.xlsx").getInputStream();
// XSSFWorkbook wb = new XSSFWorkbook(is);
Workbook wb = new XSSFWorkbook();
PoiUtil.exportWB("会议记录", minutes, wb);
PoiUtil.setImg(wb,"会议记录","/home/staticrec/pimsLogo.png",0,1,0,1);
//生成文件
String name = sysProject.getName() + "会议记录.xlsx";
String fileName = "minutes/" + DateUtil.today() + "/" + System.currentTimeMillis() + ".xlsx";
@ -339,52 +338,54 @@ public class TaskPluginService implements ITaskPluginService{
* @param thisWeekTaskList 本周的任务
* @return 返回写入excel的数据
*/
private List<List<PoiUtil.PoiUtilCell>> writeMinutes(List<TaskVo.TaskMinutesWps> lastWeekTaskList, List<TaskVo.TaskMinutesWps> thisWeekTaskList) {
private List<List<PoiUtil.PoiUtilCell>> writeMinutes(List<TaskVo.TaskMinutesWps> lastWeekTaskList, List<TaskVo.TaskMinutesWps> thisWeekTaskList,String name) {
List<List<PoiUtil.PoiUtilCell>> sheet = new ArrayList<>();
// //logo 和标题
// List<PoiUtil.PoiUtilCell> headerTitle = new ArrayList<>();
// headerTitle.add(new PoiUtil.PoiUtilCell("logo",1,1));
// headerTitle.add(new PoiUtil.PoiUtilCell("深孵公司周例会",7,1));
// sheet.add(headerTitle);
// //会议时间和主持人
// List<PoiUtil.PoiUtilCell> header1 = new ArrayList<>();
// header1.add(new PoiUtil.PoiUtilCell("会议时间"));
// header1.add(new PoiUtil.PoiUtilCell("",3,1));
// header1.add(new PoiUtil.PoiUtilCell());
// header1.add(new PoiUtil.PoiUtilCell());
// header1.add(new PoiUtil.PoiUtilCell("主持人"));
// header1.add(new PoiUtil.PoiUtilCell("",3,1));
// sheet.add(header1);
// //参会人员
// List<PoiUtil.PoiUtilCell> header2 = new ArrayList<>();
// header2.add(new PoiUtil.PoiUtilCell("参会人员",1,1));
// header2.add(new PoiUtil.PoiUtilCell("",7,1));
// sheet.add(header2);
// //主题议题
// List<PoiUtil.PoiUtilCell> header3 = new ArrayList<>();
// header3.add(new PoiUtil.PoiUtilCell("主题议题",1,1));
// header3.add(new PoiUtil.PoiUtilCell("",7,1));
// sheet.add(header3);
// //再空一行
// List<PoiUtil.PoiUtilCell> header4 = new ArrayList<>();
// header4.add(new PoiUtil.PoiUtilCell("",8,1));
// sheet.add(header4);
// //会议记录内容
// List<PoiUtil.PoiUtilCell> minutesValue = new ArrayList<>();
// minutesValue.add(new PoiUtil.PoiUtilCell("会议记录内容",8,1));
// sheet.add(minutesValue);
//logo 和标题
List<PoiUtil.PoiUtilCell> headerTitle = new ArrayList<>();
headerTitle.add(new PoiUtil.PoiUtilCell("",1,1,1650,18));
headerTitle.add(new PoiUtil.PoiUtilCell(name+"周例会",7,1));
sheet.add(headerTitle);
//会议时间和主持人
List<PoiUtil.PoiUtilCell> header1 = new ArrayList<>();
header1.add(new PoiUtil.PoiUtilCell("会议时间"));
header1.add(new PoiUtil.PoiUtilCell("",3,1));
header1.add(new PoiUtil.PoiUtilCell());
header1.add(new PoiUtil.PoiUtilCell());
header1.add(new PoiUtil.PoiUtilCell("主持人"));
header1.add(new PoiUtil.PoiUtilCell("",3,1));
sheet.add(header1);
//参会人员
List<PoiUtil.PoiUtilCell> header2 = new ArrayList<>();
header2.add(new PoiUtil.PoiUtilCell("参会人员",1,1));
header2.add(new PoiUtil.PoiUtilCell("",7,1));
sheet.add(header2);
//主题议题
List<PoiUtil.PoiUtilCell> header3 = new ArrayList<>();
header3.add(new PoiUtil.PoiUtilCell("主题议题",1,1));
header3.add(new PoiUtil.PoiUtilCell("",7,1));
sheet.add(header3);
//再空一行
List<PoiUtil.PoiUtilCell> header4 = new ArrayList<>();
header4.add(new PoiUtil.PoiUtilCell("",8,1));
sheet.add(header4);
List<PoiUtil.PoiUtilCell> header5 = new ArrayList<>();
sheet.add(header5);
List<PoiUtil.PoiUtilCell> header6 = new ArrayList<>();
sheet.add(header6);
//会议记录内容
List<PoiUtil.PoiUtilCell> minutesValue = new ArrayList<>();
minutesValue.add(new PoiUtil.PoiUtilCell("会议记录内容",8,1));
sheet.add(minutesValue);
// List<PoiUtil.PoiUtilCell> header1 = new ArrayList<>();
// sheet.add(header1);
// List<PoiUtil.PoiUtilCell> header2 = new ArrayList<>();
// sheet.add(header2);
// List<PoiUtil.PoiUtilCell> header3 = new ArrayList<>();
// sheet.add(header3);
// List<PoiUtil.PoiUtilCell> header4 = new ArrayList<>();
// sheet.add(header4);
// List<PoiUtil.PoiUtilCell> header5 = new ArrayList<>();
// sheet.add(header5);
// List<PoiUtil.PoiUtilCell> header6 = new ArrayList<>();
// sheet.add(header6);
//上周任务
List<PoiUtil.PoiUtilCell> lastWeek = new ArrayList<>();
lastWeek.add(new PoiUtil.PoiUtilCell("上周任务",8,1));

11
tall/src/main/java/com/ccsens/tall/service/TaskSubTimeService.java

@ -1,5 +1,6 @@
package com.ccsens.tall.service;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.lang.Snowflake;
@ -315,7 +316,10 @@ public class TaskSubTimeService implements ITaskSubTimeService {
detail.setCycle(addTask.getCycle());
detail.setParentId(addTask.getParentTaskId());
detail.setExecutorRole(addTask.getExecutorId());
//添加任务优先级
if(ObjectUtil.isNotNull(addTask.getPriority())){
detail.setPriority(addTask.getPriority());
}
SysProject project;
if (ObjectUtil.isNotNull(addTask.getProjectId())) {
project = sysProjectDao.selectByPrimaryKey(addTask.getProjectId());
@ -424,7 +428,10 @@ public class TaskSubTimeService implements ITaskSubTimeService {
//添加任务提醒
List<TaskVo.RemindInfo> remindInfoList = new ArrayList<>();
if(ObjectUtil.isNotNull(addTask.getTaskRemind())){
remindInfoList = saveRemind(currentUserId,addTask.getTaskRemind());
TaskDto.TaskRemind taskRemind = new TaskDto.TaskRemind();
BeanUtil.copyProperties(addTask.getTaskRemind(),taskRemind);
taskRemind.setTaskId(subTimeId);
remindInfoList = saveRemind(currentUserId,taskRemind);
}
//返回

1
tall/src/main/java/com/ccsens/tall/service/UserService.java

@ -1166,7 +1166,6 @@ public class UserService implements IUserService {
tokenBean.setPhone(phone);
tokenBean.setAccount(account);
tokenBean.setWxInfo(wxInfo);
return tokenBean;
}

19
tall/src/main/java/com/ccsens/tall/service/WpsService.java

@ -3,6 +3,7 @@ package com.ccsens.tall.service;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject;
import com.ccsens.tall.bean.dto.WpsDto;
@ -426,4 +427,22 @@ public class WpsService implements IWpsService {
}
return userId;
}
@Override
public WpsVo.BusinessFileIdAndPath getPathById(Long fileId) {
WpsVo.BusinessFileIdAndPath fileIdAndPath = new WpsVo.BusinessFileIdAndPath();
if(fileId != null) {
WpsFile wpsFile = wpsFileDao.selectByPrimaryKey(fileId);
if (ObjectUtil.isNotNull(wpsFile)) {
fileIdAndPath.setFilePath(wpsFile.getSaveUrl());
}
ProProjectFileExample proProjectFileExample = new ProProjectFileExample();
proProjectFileExample.createCriteria().andWpsFileIdEqualTo(fileId);
List<ProProjectFile> projectFileList = proProjectFileMapper.selectByExample(proProjectFileExample);
if(CollectionUtil.isNotEmpty(projectFileList)){
fileIdAndPath.setBusinessId(projectFileList.get(0).getBusinessId());
}
}
return fileIdAndPath;
}
}

16
tall/src/main/java/com/ccsens/tall/web/ChartController.java

@ -92,13 +92,23 @@ public class ChartController {
@ApiOperation(value = "概览报表",notes = "")
@ApiImplicitParams({
})
@RequestMapping(value = "/overview", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"})
@RequestMapping(value = "/overview", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<ChartVo.ProjectOverview> getOverview(HttpServletRequest request,
@RequestParam(required = true)Long projectId) throws Exception{
@Validated @RequestBody ChartDto.ChartsOverviewDto chartsOverviewDto) throws Exception{
Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject());
ChartVo.ProjectOverview projectOverview = chartService.getOverview(currentUserId,projectId);
ChartVo.ProjectOverview projectOverview = chartService.getOverview(currentUserId,chartsOverviewDto);
return JsonResponse.newInstance().ok(projectOverview);
}
// @ApiOperation(value = "概览报表",notes = "")
// @ApiImplicitParams({
// })
// @RequestMapping(value = "/overview", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"})
// public JsonResponse<ChartVo.ProjectOverview> getOverview(HttpServletRequest request,
// @RequestParam(required = true)Long projectId) throws Exception{
// Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject());
// ChartVo.ProjectOverview projectOverview = chartService.getOverview(currentUserId,projectId);
// return JsonResponse.newInstance().ok(projectOverview);
// }
@ApiOperation(value = "燃尽图",notes = "")
@ApiImplicitParams({

15
tall/src/main/java/com/ccsens/tall/web/DomainController.java

@ -1,13 +1,9 @@
package com.ccsens.tall.web;
import com.ccsens.tall.bean.dto.DomainDto;
import com.ccsens.tall.bean.dto.TaskDto;
import com.ccsens.tall.bean.vo.DomainVo;
import com.ccsens.tall.bean.vo.ProjectVo;
import com.ccsens.tall.service.ISysDomainService;
import com.ccsens.util.JsonResponse;
import com.ccsens.util.WebConstant;
import io.jsonwebtoken.Claims;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
@ -17,7 +13,6 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
@Api(tags = "域相关API", description = "")
@RestController
@ -46,4 +41,14 @@ public class DomainController {
DomainVo.DomainInfo domain = domainService.saveDomain(domainInfo);
return JsonResponse.newInstance().ok(domain);
}
@ApiOperation(value = "修改域配置",notes = "")
@ApiImplicitParams({
})
@RequestMapping(value = "updateDomain", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<DomainVo.DomainInfo> updateDomain(HttpServletRequest request,
@Validated @RequestBody DomainDto.UpdateDomainInfo domainInfo) throws Exception {
DomainVo.DomainInfo domain = domainService.updateDomain(domainInfo);
return JsonResponse.newInstance().ok(domain);
}
}

27
tall/src/main/java/com/ccsens/tall/web/MemberController.java

@ -1,21 +1,31 @@
package com.ccsens.tall.web;
import com.ccsens.tall.bean.dto.MemberDto;
import com.ccsens.tall.bean.dto.ProjectDto;
import com.ccsens.tall.bean.vo.ProjectVo;
import com.ccsens.tall.service.IProMemberService;
import com.ccsens.util.JsonResponse;
import com.ccsens.util.WebConstant;
import io.jsonwebtoken.Claims;
import io.swagger.annotations.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/**
* @author
*/
@Slf4j
@Api(tags = "成员操作相关api" )
@RestController
@RequestMapping("/members")
@ -31,6 +41,7 @@ public class MemberController {
public JsonResponse saveMember(HttpServletRequest request,
@ApiParam @Validated @RequestBody MemberDto.SaveMember saveMember) throws Exception {
Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject());
log.info("添加成员:{}",saveMember.toString());
proMemberService.saveProMember(currentUserId,saveMember);
return JsonResponse.newInstance().ok();
}
@ -56,4 +67,16 @@ public class MemberController {
ProjectVo.MembersByProject membersInfo = proMemberService.updateMemberInfo(currentUserId,updateMemberInfo);
return JsonResponse.newInstance().ok(membersInfo);
}
@ApiOperation(value = "查找项目内的关注者(不包括成员)",notes = "")
@ApiImplicitParams({
})
@RequestMapping(value = "/attention", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<ProjectVo.AttentionInfo> queryAttention(HttpServletRequest request,
@ApiParam @Validated @RequestBody ProjectDto.ProjectIdDto projectDto) throws Exception {
// Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject());
List<ProjectVo.AttentionInfo> attentionInfo = proMemberService.queryAttention(projectDto);
return JsonResponse.newInstance().ok(attentionInfo);
}
}

64
tall/src/main/java/com/ccsens/tall/web/PimsController.java

@ -0,0 +1,64 @@
package com.ccsens.tall.web;
import com.ccsens.tall.bean.dto.WpsDto;
import com.ccsens.tall.bean.vo.UserVo;
import com.ccsens.tall.bean.vo.WpsVo;
import com.ccsens.tall.service.IUserService;
import com.ccsens.tall.service.IWpsService;
import com.ccsens.util.JsonResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/**
* @author
*/
@Slf4j
@Api(tags = "图表相关API", description = "")
@RestController
@RequestMapping("/wps")
public class PimsController {
@Resource
private IWpsService wpsService;
@Resource
private IUserService userService;
@ApiOperation(value = "保存WPS业务和文件记录",notes = "")
@ApiImplicitParams({
})
@RequestMapping(value = "/saveWps", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse saveFile(HttpServletRequest request,
@Validated @RequestBody WpsDto.Business business) throws Exception{
wpsService.saveFile(business);
return JsonResponse.newInstance().ok();
}
@ApiOperation(value = "根据业务ID和类型返回文件预览",notes = "")
@ApiImplicitParams({
})
@RequestMapping(value = "/visitUrls", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public List<String> queryVisitUrls(HttpServletRequest request,
@Validated @RequestBody WpsDto.VisitWpsUrl visitWpsUrl) throws Exception{
UserVo.TokenBean tokenBean = userService.getTokenByUserId(visitWpsUrl.getUserId());
List<String> wpsPaths = wpsService.queryVisitUrls(visitWpsUrl.getBusinessId(),visitWpsUrl.getBusinessType(),tokenBean.getToken(),visitWpsUrl.getParams());
return wpsPaths;
}
@ApiOperation(value = "通过wps文件id获取文件路径",notes = "")
@ApiImplicitParams({
})
@RequestMapping(value = "/wpsId", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"})
public JsonResponse<WpsVo.BusinessFileIdAndPath> getPathById(HttpServletRequest request,
@RequestParam(required = true) Long wpsId) throws Exception{
WpsVo.BusinessFileIdAndPath wpsPath = wpsService.getPathById(wpsId);
return JsonResponse.newInstance().ok(wpsPath);
}
}

47
tall/src/main/java/com/ccsens/tall/web/TaskController.java

@ -8,7 +8,6 @@ import com.ccsens.tall.service.ITaskSubTimeService;
import com.ccsens.util.JsonResponse;
import com.ccsens.util.WebConstant;
import com.ccsens.util.annotation.OperateType;
import com.github.pagehelper.PageInfo;
import io.jsonwebtoken.Claims;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
@ -83,28 +82,42 @@ public class TaskController {
return JsonResponse.newInstance().ok(taskCheckList);
}
// @ApiOperation(value = "项目内任务清单", notes = "")
// @ApiImplicitParams({
// @ApiImplicitParam(name = "id", value = "项目Id", required = true, paramType = "path"),
// @ApiImplicitParam(name = "page", value = "页数", required = true, paramType = "query"),
// @ApiImplicitParam(name = "key", value = "关键词", required = true, paramType = "query"),
// @ApiImplicitParam(name = "start", value = "开始时间", required = true, paramType = "query"),
// @ApiImplicitParam(name = "end", value = "结束时间", required = true, paramType = "query"),
// @ApiImplicitParam(name = "roleId", value = "角色Id", required = true, paramType = "query")
// })
// @RequestMapping(value = "/{id}/list", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"})
// public JsonResponse<TaskVo.TaskCheckList> getTask(HttpServletRequest request,
// @PathVariable("id") Long id,
// @RequestParam(required = false) Integer page,
// @RequestParam(required = false) String key,
// @RequestParam(required = false) String start,
// @RequestParam(required = false) String end,
// @RequestParam(required = false) Long roleId) throws Exception {
// Integer pageSize = 10;
// page = page == null ? 1 : page;
// Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject());
// TaskVo.TaskCheckList taskCheckList
// = taskDetailService.selectTaskListByProject(id,currentUserId,page,pageSize,key,start,end,roleId);
// return JsonResponse.newInstance().ok(taskCheckList);
// }
@ApiOperation(value = "项目内任务清单", notes = "")
@ApiImplicitParams({
@ApiImplicitParam(name = "id", value = "项目Id", required = true, paramType = "path"),
@ApiImplicitParam(name = "page", value = "页数", required = true, paramType = "query"),
@ApiImplicitParam(name = "key", value = "关键词", required = true, paramType = "query"),
@ApiImplicitParam(name = "start", value = "开始时间", required = true, paramType = "query"),
@ApiImplicitParam(name = "end", value = "结束时间", required = true, paramType = "query"),
@ApiImplicitParam(name = "roleId", value = "角色Id", required = true, paramType = "query")
})
@RequestMapping(value = "/{id}/list", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"})
@RequestMapping(value = "/project/list", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<TaskVo.TaskCheckList> getTask(HttpServletRequest request,
@PathVariable("id") Long id,
@RequestParam(required = false) Integer page,
@RequestParam(required = false) String key,
@RequestParam(required = false) String start,
@RequestParam(required = false) String end,
@RequestParam(required = false) Long roleId) throws Exception {
Integer pageSize = 10;
page = page == null ? 1 : page;
// @PathVariable("id") Long id,
@Validated @RequestBody TaskDto.SelectListByProject selectListByProject) throws Exception {
Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject());
TaskVo.TaskCheckList taskCheckList
= taskDetailService.selectTaskListByProject(id,currentUserId,page,pageSize,key,start,end,roleId);
= taskDetailService.selectTaskListByProject(currentUserId,selectListByProject);
return JsonResponse.newInstance().ok(taskCheckList);
}

15
tall/src/main/java/com/ccsens/tall/web/UserController.java

@ -6,13 +6,15 @@ import cn.hutool.core.util.StrUtil;
import cn.hutool.extra.servlet.ServletUtil;
import com.ccsens.tall.bean.dto.ProjectDto;
import com.ccsens.tall.bean.dto.UserDto;
import com.ccsens.tall.bean.po.SysUser;
import com.ccsens.tall.bean.vo.MemberVo;
import com.ccsens.tall.bean.vo.UserVo;
import com.ccsens.tall.exception.UserLoginException;
import com.ccsens.tall.service.IProMemberService;
import com.ccsens.tall.service.IUserService;
import com.ccsens.util.*;
import com.ccsens.util.CodeEnum;
import com.ccsens.util.JsonResponse;
import com.ccsens.util.JwtUtil;
import com.ccsens.util.WebConstant;
import io.jsonwebtoken.Claims;
import io.jsonwebtoken.ExpiredJwtException;
import io.jsonwebtoken.SignatureException;
@ -24,7 +26,6 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.FileOutputStream;
import java.util.List;
import java.util.Map;
@ -399,10 +400,10 @@ public class UserController {
}catch(Exception e){
return JsonResponse.newInstance().ok(CodeEnum.NOT_LOGIN);
}
// //验证用户存根
// if(userService.tokenNotExistInCache(Long.valueOf(claims.getSubject()))){
// return JsonResponse.newInstance().ok(CodeEnum.NOT_LOGIN);
// }
//验证用户存根
if(userService.tokenNotExistInCache(Long.valueOf(claims.getSubject()))){
return JsonResponse.newInstance().ok(CodeEnum.NOT_LOGIN);
}
// //验证用户是否禁用
// SysUser user = userService.getUserById(Long.valueOf(claims.getSubject()));
// if(user.getRecStatus() == WebConstant.REC_STATUS.Disabled.value){

34
tall/src/main/resources/mapper_dao/ProMemberDao.xml

@ -190,12 +190,12 @@
and
r.rec_status = 0
and
r.name = 'MoneyStakeholder'
r.name = '奖惩干系人'
) t on t.sId = m.stakeholder_id
WHERE
m.rec_status = 0
and
r.rec_status = 0
(r.rec_status = 0 or r.rec_status is null)
and
m.project_id = #{projectId}
</select>
@ -243,4 +243,34 @@
m.id = #{memberId}
</select>
<select id="queryAttention" parameterType="java.util.Map" resultType="com.ccsens.tall.bean.vo.ProjectVo$AttentionInfo">
SELECT
a.id as attentionId,
u.nickname as attentionName,
u.avatar_url as avatarUrl,
sa.identifier as phone
FROM
t_sys_user_attention a LEFT JOIN t_sys_user u on a.user_id = u.id
LEFT JOIN t_sys_auth sa on u.id = sa.user_id and sa.identify_type = 1
LEFT JOIN
(
SELECT
id as mId,
user_id as userId,
nickname as mName
FROM
t_pro_member
WHERE
project_id = #{projectId}
AND
rec_status = 0
) t on t.userId = u.id
WHERE
a.project_id = #{projectId}
AND
a.rec_status = 0
and t.mId is null
GROUP BY a.id
</select>
</mapper>

22
tall/src/main/resources/mapper_dao/SysProjectDao.xml

@ -450,7 +450,20 @@
WHERE
td.project_id = #{projectId}
and
td.`level` in (2,3)
td.`level` in (1,2,3)
<if test="beginTime != null and beginTime != 0">
<if test="endTime != null and endTime != 0">
AND td.end_time > #{beginTime}
AND td.begin_time &lt;= #{endTime}
</if>
</if>
<if test="roleIdList != null and roleIdList.size() > 0">
and
td.executor_role in
<foreach collection="roleIdList" item="roleId" open="(" close=")" separator=",">
#{roleId}
</foreach>
</if>
</select>
<select id="getOverviewByToDay" parameterType="java.util.Map" resultType="com.ccsens.tall.bean.vo.ChartVo$ProjectOverview">
@ -483,6 +496,13 @@
td.begin_time &lt; #{endTime}
and
td.end_time &gt; #{startTime}
<if test="roleIdList != null and roleIdList.size() > 0">
and
td.executor_role in
<foreach collection="roleIdList" item="roleId" open="(" close=")" separator=",">
#{roleId}
</foreach>
</if>
</select>

27
tall/src/main/resources/mapper_raw/ProShowMapper.xml

@ -16,6 +16,7 @@
<result column="show_shortcuts" jdbcType="TINYINT" property="showShortcuts" />
<result column="select_task_type" jdbcType="TINYINT" property="selectTaskType" />
<result column="detail_path" jdbcType="VARCHAR" property="detailPath" />
<result column="pims_nav_type" jdbcType="TINYINT" property="pimsNavType" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
@ -77,7 +78,7 @@
</sql>
<sql id="Base_Column_List">
id, project_id, slide, filter, is_show_mvp, create_task, created_at, updated_at,
rec_status, time_show, duration, show_shortcuts, select_task_type, detail_path
rec_status, time_show, duration, show_shortcuts, select_task_type, detail_path, pims_nav_type
</sql>
<select id="selectByExample" parameterType="com.ccsens.tall.bean.po.ProShowExample" resultMap="BaseResultMap">
select
@ -114,12 +115,14 @@
filter, is_show_mvp, create_task,
created_at, updated_at, rec_status,
time_show, duration, show_shortcuts,
select_task_type, detail_path)
select_task_type, detail_path, pims_nav_type
)
values (#{id,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT}, #{slide,jdbcType=TINYINT},
#{filter,jdbcType=TINYINT}, #{isShowMvp,jdbcType=TINYINT}, #{createTask,jdbcType=TINYINT},
#{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT},
#{timeShow,jdbcType=VARCHAR}, #{duration,jdbcType=TINYINT}, #{showShortcuts,jdbcType=TINYINT},
#{selectTaskType,jdbcType=TINYINT}, #{detailPath,jdbcType=VARCHAR})
#{selectTaskType,jdbcType=TINYINT}, #{detailPath,jdbcType=VARCHAR}, #{pimsNavType,jdbcType=TINYINT}
)
</insert>
<insert id="insertSelective" parameterType="com.ccsens.tall.bean.po.ProShow">
insert into t_pro_show
@ -166,6 +169,9 @@
<if test="detailPath != null">
detail_path,
</if>
<if test="pimsNavType != null">
pims_nav_type,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
@ -210,6 +216,9 @@
<if test="detailPath != null">
#{detailPath,jdbcType=VARCHAR},
</if>
<if test="pimsNavType != null">
#{pimsNavType,jdbcType=TINYINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.tall.bean.po.ProShowExample" resultType="java.lang.Long">
@ -263,6 +272,9 @@
<if test="record.detailPath != null">
detail_path = #{record.detailPath,jdbcType=VARCHAR},
</if>
<if test="record.pimsNavType != null">
pims_nav_type = #{record.pimsNavType,jdbcType=TINYINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
@ -283,7 +295,8 @@
duration = #{record.duration,jdbcType=TINYINT},
show_shortcuts = #{record.showShortcuts,jdbcType=TINYINT},
select_task_type = #{record.selectTaskType,jdbcType=TINYINT},
detail_path = #{record.detailPath,jdbcType=VARCHAR}
detail_path = #{record.detailPath,jdbcType=VARCHAR},
pims_nav_type = #{record.pimsNavType,jdbcType=TINYINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
@ -330,6 +343,9 @@
<if test="detailPath != null">
detail_path = #{detailPath,jdbcType=VARCHAR},
</if>
<if test="pimsNavType != null">
pims_nav_type = #{pimsNavType,jdbcType=TINYINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
@ -347,7 +363,8 @@
duration = #{duration,jdbcType=TINYINT},
show_shortcuts = #{showShortcuts,jdbcType=TINYINT},
select_task_type = #{selectTaskType,jdbcType=TINYINT},
detail_path = #{detailPath,jdbcType=VARCHAR}
detail_path = #{detailPath,jdbcType=VARCHAR},
pims_nav_type = #{pimsNavType,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

2
util/src/main/java/com/ccsens/util/CodeEnum.java

@ -30,7 +30,7 @@ public enum CodeEnum {
WBS_NOT_MEMBER_SHEET(18,"未找到项目成员表",true),
WBS_NOT_PHONE(19,"手机号为空",true),
WBS_STAKEHOLDER_PHONE(20,"奖惩干系人和手机号不匹配",true),
WBS_REPEAT_MEMBER_PHONE(21,"成员或手机号重复",true),
WBS_REPEAT_MEMBER_PHONE(21,"成员已存在",true),
WBS_NOT_FIRST_ROLE(22,"系统角色名称错误",true),
WBS_REPEAT_ROLE_NAME(23,"角色名称重复",true),
WSB_NOT_MEMBER(24,"未找到对应成员,请检查成员姓名是否正确", true),

98
util/src/main/java/com/ccsens/util/PoiUtil.java

@ -5,21 +5,17 @@ import cn.hutool.core.util.StrUtil;
import com.ccsens.util.exception.BaseException;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.POIXMLDocumentPart;
import org.apache.poi.common.usermodel.HyperlinkType;
import org.apache.poi.hssf.usermodel.*;
import org.apache.poi.hssf.util.HSSFColor;
import org.apache.poi.ss.usermodel.DateUtil;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.poi.util.IOUtils;
import org.apache.poi.xssf.usermodel.*;
import org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTMarker;
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTColor;
import org.springframework.stereotype.Component;
import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.*;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
@ -392,41 +388,6 @@ public class PoiUtil {
return map;
}
public static void setPicture(File file){
FileOutputStream fileOut = null;
BufferedImage bufferImg = null;
//先把读进来的图片放到一个ByteArrayOutputStream中,以便产生ByteArray
try {
ByteArrayOutputStream byteArrayOut = new ByteArrayOutputStream();
bufferImg = ImageIO.read(file);
ImageIO.write(bufferImg, "jpg", byteArrayOut);
XSSFWorkbook wb = new XSSFWorkbook();
XSSFSheet sheet1 = wb.createSheet("test picture");
//画图的顶级管理器,一个sheet只能获取一个(一定要注意这点)
XSSFDrawing patriarch = sheet1.createDrawingPatriarch();
//anchor主要用于设置图片的属性
XSSFClientAnchor anchor = new XSSFClientAnchor(0, 0, 255, 255,(short) 1, 1, (short) 5, 8);
//注意:这个方法在新版本的POI中参数类型改成了(AnchorType anchorType) 
anchor.setAnchorType(ClientAnchor.AnchorType.byId(3));
//插入图片
patriarch.createPicture(anchor, wb.addPicture(byteArrayOut.toByteArray(), HSSFWorkbook.PICTURE_TYPE_JPEG));
fileOut = new FileOutputStream("D:/测试Excel.xlsx");
// 写入excel文件
wb.write(fileOut);
System.out.println("----Excle文件已生成------");
} catch (Exception e) {
e.printStackTrace();
}finally{
if(fileOut != null){
try {
fileOut.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
/**
* 获取当前行
@ -474,6 +435,60 @@ public class PoiUtil {
return workbook.getSheetAt(index);
}
/**
* 插入图片
*/
private static void insertImage(){
}
/**
*
* @param ImgPath:图片路径
* @param row1起始行
* @param row2终止行
* @param col1起始列
* @param col2终止列
* @throws IOException
*/
public static Workbook setImg(Workbook wb,String sheetName,String ImgPath,int row1,int row2,int col1,int col2) throws IOException {
// 第一步,创建一个XSSFWorkbook,对应一个Excel文件
if (wb == null) {
wb = new XSSFWorkbook();
}
// 第二步,在workbook中添加一个sheet,对应Excel文件中的sheet
Sheet sheet = wb.getSheet(sheetName);
if (ObjectUtil.isNull(sheet)) {
sheet = wb.createSheet(sheetName);
}
// 插入 PNG 图片至 Excel
InputStream is = new FileInputStream(ImgPath);
byte[] bytes = IOUtils.toByteArray(is);
int pictureIdx = wb.addPicture(bytes, Workbook.PICTURE_TYPE_PNG);
CreationHelper helper = wb.getCreationHelper();
Drawing drawing = sheet.createDrawingPatriarch();
ClientAnchor anchor = helper.createClientAnchor();
// 图片插入坐标
anchor.setDx1(0);
anchor.setDy1(0);
anchor.setDx2(0);
anchor.setDy2(0);
anchor.setRow1(row1);
anchor.setRow2(row2);
anchor.setCol1(col1);
anchor.setCol2(col2);
// 插入图片
Picture pict = drawing.createPicture(anchor, pictureIdx);
// FileOutputStream fileOut = null;
// fileOut = new FileOutputStream("D:/测试Excel.xlsx");
// // 写入excel文件
// wb.write(fileOut);
// System.out.println("----Excle文件已生成------");
return wb;
}
public static void main(String[] args) throws Exception {
// List<List<PoiUtilCell>> list = new ArrayList<>();
@ -504,7 +519,8 @@ public class PoiUtil {
// OutputStream stream = new FileOutputStream(new File("D:\\1.xlsx"));
// wbs.write(stream);
// stream.close();
setPicture(new File("C:\\Users\\逗\\Desktop\\0cf3ffd8f0001c4310b02f706753721.png"));
// setImg("C:\\Users\\逗\\Desktop\\0cf3ffd8f0001c4310b02f706753721.png",1,2,1,2);
}

3
util/src/main/java/com/ccsens/util/WebConstant.java

@ -3,7 +3,6 @@ package com.ccsens.util;
import cn.hutool.core.codec.Base64;
import java.io.File;
import java.util.Arrays;
public class WebConstant {
@ -164,13 +163,13 @@ public class WebConstant {
public static final String DEFAULT_NICKNAME = "普通用户";
public static final String DEFAULT_DESCRIPTION = "这个人很懒,什么都没有留下";
public static final String DEFAULT_AVATAR = "";
public static final String DEFAULT_AVATAR_LOGO = "/home/cloud/tall/uploads";
public static final String KEY_WEBSOCKET_GROUPID = "WebScoket_groupId";
public static final String PREFIX_WEBSOCKET_GROUPID = "groupId=";
public static final String UPLOAD_PATH_BASE = "/home/cloud/tall/uploads";
public static final String UPLOAD_PATH_BASE_HEALTH = "/home/cloud/health/uploads";
public static final String UPLOAD_PATH_BASE_PIMS = "/home/cloud/pims/uploads";
public static final String UPLOAD_PATH_BASE_MT_JUDGE = "mt";
public static final String UPLOAD_PATH_BASE_WBS = "wbs";

16
util/src/test/java/com/ccsens/util/Base64Test.java

@ -1,22 +1,17 @@
package com.ccsens.util;
import cn.hutool.core.codec.Base64;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.lang.UUID;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.ZipUtil;
import com.ccsens.util.wx.WxXcxUtil;
import cn.hutool.core.util.StrUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import javax.servlet.ServletOutputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.*;
import java.math.BigDecimal;
/**
* @description:
@ -26,6 +21,7 @@ import java.util.*;
@Slf4j
public class Base64Test {
@Test
public void test01() throws Exception {
File file = new File("d:"+File.separator+"1.png");

Loading…
Cancel
Save