diff --git a/cloudutil/src/main/java/com/ccsens/cloudutil/bean/tall/dto/WpsDto.java b/cloudutil/src/main/java/com/ccsens/cloudutil/bean/tall/dto/WpsDto.java new file mode 100644 index 00000000..7656dfc4 --- /dev/null +++ b/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 params; + } + + @Data + @ApiModel("异步通知") + public static class Async{ + @ApiModelProperty("文件ID") + private Long fileId; + } + +} diff --git a/cloudutil/src/main/java/com/ccsens/cloudutil/bean/tall/vo/WpsVo.java b/cloudutil/src/main/java/com/ccsens/cloudutil/bean/tall/vo/WpsVo.java new file mode 100644 index 00000000..297387e8 --- /dev/null +++ b/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; + } +} diff --git a/cloudutil/src/main/java/com/ccsens/cloudutil/feign/TallFeignClient.java b/cloudutil/src/main/java/com/ccsens/cloudutil/feign/TallFeignClient.java index 2617b86a..cbca56a2 100644 --- a/cloudutil/src/main/java/com/ccsens/cloudutil/feign/TallFeignClient.java +++ b/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 queryVisitUrls(WpsDto.VisitWpsUrl visitWpsUrl); + + /** + * 根据wpsId查询wps文件路径 + */ + @GetMapping("/wps/wpsId") + JsonResponse getPathByWpsId(@RequestParam(name = "wpsId")Long wpsId); + } @Slf4j @@ -243,6 +258,21 @@ class TallFeignClientFallBack implements FallbackFactory { public Long getTaskIdByTaskPluginId(Long taskPluginId) { return null; } + + @Override + public JsonResponse saveWpsFile(WpsDto.Business business) { + return JsonResponse.newInstance().fail(); + } + + @Override + public List queryVisitUrls(WpsDto.VisitWpsUrl visitWpsUrl) { + return null; + } + + @Override + public JsonResponse getPathByWpsId(Long async) { + return JsonResponse.newInstance().fail(); + } }; } diff --git a/ht/src/main/java/com/ccsens/ht/service/DoctorService.java b/ht/src/main/java/com/ccsens/ht/service/DoctorService.java index 3b8afa29..391c6980 100644 --- a/ht/src/main/java/com/ccsens/ht/service/DoctorService.java +++ b/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; diff --git a/pims/pom.xml b/pims/pom.xml index 9e55baf9..8e3314f4 100644 --- a/pims/pom.xml +++ b/pims/pom.xml @@ -54,7 +54,7 @@ org.springframework.boot spring-boot-maven-plugin - com.ccsens.health.HealthApplication + com.ccsens.pims.PimsApplication diff --git a/pims/src/main/java/com/ccsens/pims/api/DebugController.java b/pims/src/main/java/com/ccsens/pims/api/DebugController.java index ce1e6151..9705260e 100644 --- a/pims/src/main/java/com/ccsens/pims/api/DebugController.java +++ b/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测试"; } + } diff --git a/pims/src/main/java/com/ccsens/pims/api/ProductController.java b/pims/src/main/java/com/ccsens/pims/api/ProductController.java index 78c07071..91155008 100644 --- a/pims/src/main/java/com/ccsens/pims/api/ProductController.java +++ b/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> queryProductIncome(@ApiParam @Validated @RequestBody QueryDto params) { + public JsonResponse> queryProductIncome(@ApiParam @Validated @RequestBody QueryDto params) { log.info("查看所有产品销售收入:{}",params); - List productIncomeList = productService.queryProductIncome(params); + List 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> getTotalCost(@ApiParam @Validated @RequestBody QueryDto params) { + public JsonResponse> getTotalCost(@ApiParam @Validated @RequestBody QueryDto params) { log.info("总成本费用估算表:{}",params); - List totalCostList = productService.getTotalCost(params); - return JsonResponse.newInstance().ok(totalCostList); + List 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> getIncome(@ApiParam @Validated @RequestBody QueryDto params) { + public JsonResponse> getIncome(@ApiParam @Validated @RequestBody QueryDto params) { log.info("损益表:{}",params); - List incomeList = productService.getIncome(params); + List 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> getMonth(@ApiParam @Validated @RequestBody QueryDto params) { + public JsonResponse> getMonth(@ApiParam @Validated @RequestBody QueryDto params) { log.info("现金流表:{}",params); - List moneyFlowTypes = productService.getMonthFlow(params); + List moneyFlowTypes = productService.getMonthFlow(params); return JsonResponse.newInstance().ok(moneyFlowTypes); } } diff --git a/pims/src/main/java/com/ccsens/pims/api/ReadController.java b/pims/src/main/java/com/ccsens/pims/api/ReadController.java new file mode 100644 index 00000000..6c60ef5d --- /dev/null +++ b/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(); + } + +} diff --git a/pims/src/main/java/com/ccsens/pims/api/ReportController.java b/pims/src/main/java/com/ccsens/pims/api/ReportController.java index 9d10dfb6..dc065cde 100644 --- a/pims/src/main/java/com/ccsens/pims/api/ReportController.java +++ b/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> getProduct(@ApiParam @Validated @RequestBody QueryDto params) { + public JsonResponse> getProduct(@ApiParam @Validated @RequestBody QueryDto params) throws Exception { log.info("查看产品价格使用依据表:{}",params); List 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> getProduction(@ApiParam @Validated @RequestBody QueryDto params) { + public JsonResponse> getProduction(@ApiParam @Validated @RequestBody QueryDto params) throws Exception { log.info("查看产值及附加估算表:{}",params); List 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> getCost(@ApiParam @Validated @RequestBody QueryDto params) { + public JsonResponse> getCost(@ApiParam @Validated @RequestBody QueryDto params) throws Exception { log.info("查看总成本费用估算表:{}",params); List 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> getIncome(@ApiParam @Validated @RequestBody QueryDto params) { + public JsonResponse> getIncome(@ApiParam @Validated @RequestBody QueryDto params) throws Exception { log.info("查看损益表表:{}",params); List 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> getMoney(@ApiParam @Validated @RequestBody QueryDto params) { + public JsonResponse> getMoney(@ApiParam @Validated @RequestBody QueryDto params) throws Exception { log.info("查看现金流表:{}",params); List wpsFilePath = reportService.getMoney(params); return JsonResponse.newInstance().ok(wpsFilePath); diff --git a/pims/src/main/java/com/ccsens/pims/bean/dto/CompanyDto.java b/pims/src/main/java/com/ccsens/pims/bean/dto/CompanyDto.java index f8e797c5..9a218a31 100644 --- a/pims/src/main/java/com/ccsens/pims/bean/dto/CompanyDto.java +++ b/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; + } } diff --git a/pims/src/main/java/com/ccsens/pims/bean/dto/ProductDto.java b/pims/src/main/java/com/ccsens/pims/bean/dto/ProductDto.java new file mode 100644 index 00000000..4edaa77b --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/bean/dto/ProductDto.java @@ -0,0 +1,4 @@ +package com.ccsens.pims.bean.dto; + +public class ProductDto { +} diff --git a/pims/src/main/java/com/ccsens/pims/bean/po/CompanyCost.java b/pims/src/main/java/com/ccsens/pims/bean/po/CompanyCost.java deleted file mode 100644 index f49f5d61..00000000 --- a/pims/src/main/java/com/ccsens/pims/bean/po/CompanyCost.java +++ /dev/null @@ -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(); - } -} \ No newline at end of file diff --git a/pims/src/main/java/com/ccsens/pims/bean/po/CompanyCostExample.java b/pims/src/main/java/com/ccsens/pims/bean/po/CompanyCostExample.java deleted file mode 100644 index 9477afa2..00000000 --- a/pims/src/main/java/com/ccsens/pims/bean/po/CompanyCostExample.java +++ /dev/null @@ -1,1471 +0,0 @@ -package com.ccsens.pims.bean.po; - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -public class CompanyCostExample { - protected String orderByClause; - - protected boolean distinct; - - protected List oredCriteria; - - public CompanyCostExample() { - oredCriteria = new ArrayList(); - } - - 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 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 criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List 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 values) { - addCriterion("id in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdNotIn(List 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 values) { - addCriterion("company_id in", values, "companyId"); - return (Criteria) this; - } - - public Criteria andCompanyIdNotIn(List 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 values) { - addCriterion("project_id in", values, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdNotIn(List 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 andMonthTimeIsNull() { - addCriterion("month_time is null"); - return (Criteria) this; - } - - public Criteria andMonthTimeIsNotNull() { - addCriterion("month_time is not null"); - return (Criteria) this; - } - - public Criteria andMonthTimeEqualTo(String value) { - addCriterion("month_time =", value, "monthTime"); - return (Criteria) this; - } - - public Criteria andMonthTimeNotEqualTo(String value) { - addCriterion("month_time <>", value, "monthTime"); - return (Criteria) this; - } - - public Criteria andMonthTimeGreaterThan(String value) { - addCriterion("month_time >", value, "monthTime"); - return (Criteria) this; - } - - public Criteria andMonthTimeGreaterThanOrEqualTo(String value) { - addCriterion("month_time >=", value, "monthTime"); - return (Criteria) this; - } - - public Criteria andMonthTimeLessThan(String value) { - addCriterion("month_time <", value, "monthTime"); - return (Criteria) this; - } - - public Criteria andMonthTimeLessThanOrEqualTo(String 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 values) { - addCriterion("month_time in", values, "monthTime"); - return (Criteria) this; - } - - public Criteria andMonthTimeNotIn(List values) { - addCriterion("month_time not in", values, "monthTime"); - return (Criteria) this; - } - - public Criteria andMonthTimeBetween(String value1, String value2) { - addCriterion("month_time between", value1, value2, "monthTime"); - return (Criteria) this; - } - - public Criteria andMonthTimeNotBetween(String value1, String value2) { - addCriterion("month_time not between", value1, value2, "monthTime"); - return (Criteria) this; - } - - public Criteria andBusinessCommissionIsNull() { - addCriterion("business_commission is null"); - return (Criteria) this; - } - - public Criteria andBusinessCommissionIsNotNull() { - addCriterion("business_commission is not null"); - return (Criteria) this; - } - - public Criteria andBusinessCommissionEqualTo(Long value) { - addCriterion("business_commission =", value, "businessCommission"); - return (Criteria) this; - } - - public Criteria andBusinessCommissionNotEqualTo(Long value) { - addCriterion("business_commission <>", value, "businessCommission"); - return (Criteria) this; - } - - public Criteria andBusinessCommissionGreaterThan(Long value) { - addCriterion("business_commission >", value, "businessCommission"); - return (Criteria) this; - } - - public Criteria andBusinessCommissionGreaterThanOrEqualTo(Long value) { - addCriterion("business_commission >=", value, "businessCommission"); - return (Criteria) this; - } - - public Criteria andBusinessCommissionLessThan(Long value) { - addCriterion("business_commission <", value, "businessCommission"); - return (Criteria) this; - } - - public Criteria andBusinessCommissionLessThanOrEqualTo(Long value) { - addCriterion("business_commission <=", value, "businessCommission"); - return (Criteria) this; - } - - public Criteria andBusinessCommissionIn(List values) { - addCriterion("business_commission in", values, "businessCommission"); - return (Criteria) this; - } - - public Criteria andBusinessCommissionNotIn(List values) { - addCriterion("business_commission not in", values, "businessCommission"); - return (Criteria) this; - } - - public Criteria andBusinessCommissionBetween(Long value1, Long value2) { - addCriterion("business_commission between", value1, value2, "businessCommission"); - return (Criteria) this; - } - - public Criteria andBusinessCommissionNotBetween(Long value1, Long value2) { - addCriterion("business_commission not between", value1, value2, "businessCommission"); - return (Criteria) this; - } - - public Criteria andCommissionIsNull() { - addCriterion("commission is null"); - return (Criteria) this; - } - - public Criteria andCommissionIsNotNull() { - addCriterion("commission is not null"); - return (Criteria) this; - } - - public Criteria andCommissionEqualTo(Long value) { - addCriterion("commission =", value, "commission"); - return (Criteria) this; - } - - public Criteria andCommissionNotEqualTo(Long value) { - addCriterion("commission <>", value, "commission"); - return (Criteria) this; - } - - public Criteria andCommissionGreaterThan(Long value) { - addCriterion("commission >", value, "commission"); - return (Criteria) this; - } - - public Criteria andCommissionGreaterThanOrEqualTo(Long value) { - addCriterion("commission >=", value, "commission"); - return (Criteria) this; - } - - public Criteria andCommissionLessThan(Long value) { - addCriterion("commission <", value, "commission"); - return (Criteria) this; - } - - public Criteria andCommissionLessThanOrEqualTo(Long value) { - addCriterion("commission <=", value, "commission"); - return (Criteria) this; - } - - public Criteria andCommissionIn(List values) { - addCriterion("commission in", values, "commission"); - return (Criteria) this; - } - - public Criteria andCommissionNotIn(List values) { - addCriterion("commission not in", values, "commission"); - return (Criteria) this; - } - - public Criteria andCommissionBetween(Long value1, Long value2) { - addCriterion("commission between", value1, value2, "commission"); - return (Criteria) this; - } - - public Criteria andCommissionNotBetween(Long value1, Long value2) { - addCriterion("commission not between", value1, value2, "commission"); - return (Criteria) this; - } - - public Criteria andAdminExpenseIsNull() { - addCriterion("admin_expense is null"); - return (Criteria) this; - } - - public Criteria andAdminExpenseIsNotNull() { - addCriterion("admin_expense is not null"); - return (Criteria) this; - } - - public Criteria andAdminExpenseEqualTo(Long value) { - addCriterion("admin_expense =", value, "adminExpense"); - return (Criteria) this; - } - - public Criteria andAdminExpenseNotEqualTo(Long value) { - addCriterion("admin_expense <>", value, "adminExpense"); - return (Criteria) this; - } - - public Criteria andAdminExpenseGreaterThan(Long value) { - addCriterion("admin_expense >", value, "adminExpense"); - return (Criteria) this; - } - - public Criteria andAdminExpenseGreaterThanOrEqualTo(Long value) { - addCriterion("admin_expense >=", value, "adminExpense"); - return (Criteria) this; - } - - public Criteria andAdminExpenseLessThan(Long value) { - addCriterion("admin_expense <", value, "adminExpense"); - return (Criteria) this; - } - - public Criteria andAdminExpenseLessThanOrEqualTo(Long value) { - addCriterion("admin_expense <=", value, "adminExpense"); - return (Criteria) this; - } - - public Criteria andAdminExpenseIn(List values) { - addCriterion("admin_expense in", values, "adminExpense"); - return (Criteria) this; - } - - public Criteria andAdminExpenseNotIn(List values) { - addCriterion("admin_expense not in", values, "adminExpense"); - return (Criteria) this; - } - - public Criteria andAdminExpenseBetween(Long value1, Long value2) { - addCriterion("admin_expense between", value1, value2, "adminExpense"); - return (Criteria) this; - } - - public Criteria andAdminExpenseNotBetween(Long value1, Long value2) { - addCriterion("admin_expense not between", value1, value2, "adminExpense"); - return (Criteria) this; - } - - public Criteria andSalaryIsNull() { - addCriterion("salary is null"); - return (Criteria) this; - } - - public Criteria andSalaryIsNotNull() { - addCriterion("salary is not null"); - return (Criteria) this; - } - - public Criteria andSalaryEqualTo(Long value) { - addCriterion("salary =", value, "salary"); - return (Criteria) this; - } - - public Criteria andSalaryNotEqualTo(Long value) { - addCriterion("salary <>", value, "salary"); - return (Criteria) this; - } - - public Criteria andSalaryGreaterThan(Long value) { - addCriterion("salary >", value, "salary"); - return (Criteria) this; - } - - public Criteria andSalaryGreaterThanOrEqualTo(Long value) { - addCriterion("salary >=", value, "salary"); - return (Criteria) this; - } - - public Criteria andSalaryLessThan(Long value) { - addCriterion("salary <", value, "salary"); - return (Criteria) this; - } - - public Criteria andSalaryLessThanOrEqualTo(Long value) { - addCriterion("salary <=", value, "salary"); - return (Criteria) this; - } - - public Criteria andSalaryIn(List values) { - addCriterion("salary in", values, "salary"); - return (Criteria) this; - } - - public Criteria andSalaryNotIn(List values) { - addCriterion("salary not in", values, "salary"); - return (Criteria) this; - } - - public Criteria andSalaryBetween(Long value1, Long value2) { - addCriterion("salary between", value1, value2, "salary"); - return (Criteria) this; - } - - public Criteria andSalaryNotBetween(Long value1, Long value2) { - addCriterion("salary not between", value1, value2, "salary"); - return (Criteria) this; - } - - public Criteria andInsuranceIsNull() { - addCriterion("insurance is null"); - return (Criteria) this; - } - - public Criteria andInsuranceIsNotNull() { - addCriterion("insurance is not null"); - return (Criteria) this; - } - - public Criteria andInsuranceEqualTo(Long value) { - addCriterion("insurance =", value, "insurance"); - return (Criteria) this; - } - - public Criteria andInsuranceNotEqualTo(Long value) { - addCriterion("insurance <>", value, "insurance"); - return (Criteria) this; - } - - public Criteria andInsuranceGreaterThan(Long value) { - addCriterion("insurance >", value, "insurance"); - return (Criteria) this; - } - - public Criteria andInsuranceGreaterThanOrEqualTo(Long value) { - addCriterion("insurance >=", value, "insurance"); - return (Criteria) this; - } - - public Criteria andInsuranceLessThan(Long value) { - addCriterion("insurance <", value, "insurance"); - return (Criteria) this; - } - - public Criteria andInsuranceLessThanOrEqualTo(Long value) { - addCriterion("insurance <=", value, "insurance"); - return (Criteria) this; - } - - public Criteria andInsuranceIn(List values) { - addCriterion("insurance in", values, "insurance"); - return (Criteria) this; - } - - public Criteria andInsuranceNotIn(List values) { - addCriterion("insurance not in", values, "insurance"); - return (Criteria) this; - } - - public Criteria andInsuranceBetween(Long value1, Long value2) { - addCriterion("insurance between", value1, value2, "insurance"); - return (Criteria) this; - } - - public Criteria andInsuranceNotBetween(Long value1, Long value2) { - addCriterion("insurance not between", value1, value2, "insurance"); - return (Criteria) this; - } - - public Criteria andOfficeRentIsNull() { - addCriterion("office_rent is null"); - return (Criteria) this; - } - - public Criteria andOfficeRentIsNotNull() { - addCriterion("office_rent is not null"); - return (Criteria) this; - } - - public Criteria andOfficeRentEqualTo(Long value) { - addCriterion("office_rent =", value, "officeRent"); - return (Criteria) this; - } - - public Criteria andOfficeRentNotEqualTo(Long value) { - addCriterion("office_rent <>", value, "officeRent"); - return (Criteria) this; - } - - public Criteria andOfficeRentGreaterThan(Long value) { - addCriterion("office_rent >", value, "officeRent"); - return (Criteria) this; - } - - public Criteria andOfficeRentGreaterThanOrEqualTo(Long value) { - addCriterion("office_rent >=", value, "officeRent"); - return (Criteria) this; - } - - public Criteria andOfficeRentLessThan(Long value) { - addCriterion("office_rent <", value, "officeRent"); - return (Criteria) this; - } - - public Criteria andOfficeRentLessThanOrEqualTo(Long value) { - addCriterion("office_rent <=", value, "officeRent"); - return (Criteria) this; - } - - public Criteria andOfficeRentIn(List values) { - addCriterion("office_rent in", values, "officeRent"); - return (Criteria) this; - } - - public Criteria andOfficeRentNotIn(List values) { - addCriterion("office_rent not in", values, "officeRent"); - return (Criteria) this; - } - - public Criteria andOfficeRentBetween(Long value1, Long value2) { - addCriterion("office_rent between", value1, value2, "officeRent"); - return (Criteria) this; - } - - public Criteria andOfficeRentNotBetween(Long value1, Long value2) { - addCriterion("office_rent not between", value1, value2, "officeRent"); - return (Criteria) this; - } - - public Criteria andOfficeOtherRentIsNull() { - addCriterion("office_other_rent is null"); - return (Criteria) this; - } - - public Criteria andOfficeOtherRentIsNotNull() { - addCriterion("office_other_rent is not null"); - return (Criteria) this; - } - - public Criteria andOfficeOtherRentEqualTo(Long value) { - addCriterion("office_other_rent =", value, "officeOtherRent"); - return (Criteria) this; - } - - public Criteria andOfficeOtherRentNotEqualTo(Long value) { - addCriterion("office_other_rent <>", value, "officeOtherRent"); - return (Criteria) this; - } - - public Criteria andOfficeOtherRentGreaterThan(Long value) { - addCriterion("office_other_rent >", value, "officeOtherRent"); - return (Criteria) this; - } - - public Criteria andOfficeOtherRentGreaterThanOrEqualTo(Long value) { - addCriterion("office_other_rent >=", value, "officeOtherRent"); - return (Criteria) this; - } - - public Criteria andOfficeOtherRentLessThan(Long value) { - addCriterion("office_other_rent <", value, "officeOtherRent"); - return (Criteria) this; - } - - public Criteria andOfficeOtherRentLessThanOrEqualTo(Long value) { - addCriterion("office_other_rent <=", value, "officeOtherRent"); - return (Criteria) this; - } - - public Criteria andOfficeOtherRentIn(List values) { - addCriterion("office_other_rent in", values, "officeOtherRent"); - return (Criteria) this; - } - - public Criteria andOfficeOtherRentNotIn(List values) { - addCriterion("office_other_rent not in", values, "officeOtherRent"); - return (Criteria) this; - } - - public Criteria andOfficeOtherRentBetween(Long value1, Long value2) { - addCriterion("office_other_rent between", value1, value2, "officeOtherRent"); - return (Criteria) this; - } - - public Criteria andOfficeOtherRentNotBetween(Long value1, Long value2) { - addCriterion("office_other_rent not between", value1, value2, "officeOtherRent"); - return (Criteria) this; - } - - public Criteria andDepreciationIsNull() { - addCriterion("depreciation is null"); - return (Criteria) this; - } - - public Criteria andDepreciationIsNotNull() { - addCriterion("depreciation is not null"); - return (Criteria) this; - } - - public Criteria andDepreciationEqualTo(Long value) { - addCriterion("depreciation =", value, "depreciation"); - return (Criteria) this; - } - - public Criteria andDepreciationNotEqualTo(Long value) { - addCriterion("depreciation <>", value, "depreciation"); - return (Criteria) this; - } - - public Criteria andDepreciationGreaterThan(Long value) { - addCriterion("depreciation >", value, "depreciation"); - return (Criteria) this; - } - - public Criteria andDepreciationGreaterThanOrEqualTo(Long value) { - addCriterion("depreciation >=", value, "depreciation"); - return (Criteria) this; - } - - public Criteria andDepreciationLessThan(Long value) { - addCriterion("depreciation <", value, "depreciation"); - return (Criteria) this; - } - - public Criteria andDepreciationLessThanOrEqualTo(Long value) { - addCriterion("depreciation <=", value, "depreciation"); - return (Criteria) this; - } - - public Criteria andDepreciationIn(List values) { - addCriterion("depreciation in", values, "depreciation"); - return (Criteria) this; - } - - public Criteria andDepreciationNotIn(List values) { - addCriterion("depreciation not in", values, "depreciation"); - return (Criteria) this; - } - - public Criteria andDepreciationBetween(Long value1, Long value2) { - addCriterion("depreciation between", value1, value2, "depreciation"); - return (Criteria) this; - } - - public Criteria andDepreciationNotBetween(Long value1, Long value2) { - addCriterion("depreciation not between", value1, value2, "depreciation"); - return (Criteria) this; - } - - public Criteria andTravelOnBusinessIsNull() { - addCriterion("travel_on_business is null"); - return (Criteria) this; - } - - public Criteria andTravelOnBusinessIsNotNull() { - addCriterion("travel_on_business is not null"); - return (Criteria) this; - } - - public Criteria andTravelOnBusinessEqualTo(Long value) { - addCriterion("travel_on_business =", value, "travelOnBusiness"); - return (Criteria) this; - } - - public Criteria andTravelOnBusinessNotEqualTo(Long value) { - addCriterion("travel_on_business <>", value, "travelOnBusiness"); - return (Criteria) this; - } - - public Criteria andTravelOnBusinessGreaterThan(Long value) { - addCriterion("travel_on_business >", value, "travelOnBusiness"); - return (Criteria) this; - } - - public Criteria andTravelOnBusinessGreaterThanOrEqualTo(Long value) { - addCriterion("travel_on_business >=", value, "travelOnBusiness"); - return (Criteria) this; - } - - public Criteria andTravelOnBusinessLessThan(Long value) { - addCriterion("travel_on_business <", value, "travelOnBusiness"); - return (Criteria) this; - } - - public Criteria andTravelOnBusinessLessThanOrEqualTo(Long value) { - addCriterion("travel_on_business <=", value, "travelOnBusiness"); - return (Criteria) this; - } - - public Criteria andTravelOnBusinessIn(List values) { - addCriterion("travel_on_business in", values, "travelOnBusiness"); - return (Criteria) this; - } - - public Criteria andTravelOnBusinessNotIn(List values) { - addCriterion("travel_on_business not in", values, "travelOnBusiness"); - return (Criteria) this; - } - - public Criteria andTravelOnBusinessBetween(Long value1, Long value2) { - addCriterion("travel_on_business between", value1, value2, "travelOnBusiness"); - return (Criteria) this; - } - - public Criteria andTravelOnBusinessNotBetween(Long value1, Long value2) { - addCriterion("travel_on_business not between", value1, value2, "travelOnBusiness"); - return (Criteria) this; - } - - public Criteria andMarketIsNull() { - addCriterion("market is null"); - return (Criteria) this; - } - - public Criteria andMarketIsNotNull() { - addCriterion("market is not null"); - return (Criteria) this; - } - - public Criteria andMarketEqualTo(Long value) { - addCriterion("market =", value, "market"); - return (Criteria) this; - } - - public Criteria andMarketNotEqualTo(Long value) { - addCriterion("market <>", value, "market"); - return (Criteria) this; - } - - public Criteria andMarketGreaterThan(Long value) { - addCriterion("market >", value, "market"); - return (Criteria) this; - } - - public Criteria andMarketGreaterThanOrEqualTo(Long value) { - addCriterion("market >=", value, "market"); - return (Criteria) this; - } - - public Criteria andMarketLessThan(Long value) { - addCriterion("market <", value, "market"); - return (Criteria) this; - } - - public Criteria andMarketLessThanOrEqualTo(Long value) { - addCriterion("market <=", value, "market"); - return (Criteria) this; - } - - public Criteria andMarketIn(List values) { - addCriterion("market in", values, "market"); - return (Criteria) this; - } - - public Criteria andMarketNotIn(List values) { - addCriterion("market not in", values, "market"); - return (Criteria) this; - } - - public Criteria andMarketBetween(Long value1, Long value2) { - addCriterion("market between", value1, value2, "market"); - return (Criteria) this; - } - - public Criteria andMarketNotBetween(Long value1, Long value2) { - addCriterion("market not between", value1, value2, "market"); - return (Criteria) this; - } - - public Criteria andOnlinePromotionIsNull() { - addCriterion("online_promotion is null"); - return (Criteria) this; - } - - public Criteria andOnlinePromotionIsNotNull() { - addCriterion("online_promotion is not null"); - return (Criteria) this; - } - - public Criteria andOnlinePromotionEqualTo(Long value) { - addCriterion("online_promotion =", value, "onlinePromotion"); - return (Criteria) this; - } - - public Criteria andOnlinePromotionNotEqualTo(Long value) { - addCriterion("online_promotion <>", value, "onlinePromotion"); - return (Criteria) this; - } - - public Criteria andOnlinePromotionGreaterThan(Long value) { - addCriterion("online_promotion >", value, "onlinePromotion"); - return (Criteria) this; - } - - public Criteria andOnlinePromotionGreaterThanOrEqualTo(Long value) { - addCriterion("online_promotion >=", value, "onlinePromotion"); - return (Criteria) this; - } - - public Criteria andOnlinePromotionLessThan(Long value) { - addCriterion("online_promotion <", value, "onlinePromotion"); - return (Criteria) this; - } - - public Criteria andOnlinePromotionLessThanOrEqualTo(Long value) { - addCriterion("online_promotion <=", value, "onlinePromotion"); - return (Criteria) this; - } - - public Criteria andOnlinePromotionIn(List values) { - addCriterion("online_promotion in", values, "onlinePromotion"); - return (Criteria) this; - } - - public Criteria andOnlinePromotionNotIn(List values) { - addCriterion("online_promotion not in", values, "onlinePromotion"); - return (Criteria) this; - } - - public Criteria andOnlinePromotionBetween(Long value1, Long value2) { - addCriterion("online_promotion between", value1, value2, "onlinePromotion"); - return (Criteria) this; - } - - public Criteria andOnlinePromotionNotBetween(Long value1, Long value2) { - addCriterion("online_promotion not between", value1, value2, "onlinePromotion"); - return (Criteria) this; - } - - public Criteria andOfflinePromotionIsNull() { - addCriterion("offline_promotion is null"); - return (Criteria) this; - } - - public Criteria andOfflinePromotionIsNotNull() { - addCriterion("offline_promotion is not null"); - return (Criteria) this; - } - - public Criteria andOfflinePromotionEqualTo(Long value) { - addCriterion("offline_promotion =", value, "offlinePromotion"); - return (Criteria) this; - } - - public Criteria andOfflinePromotionNotEqualTo(Long value) { - addCriterion("offline_promotion <>", value, "offlinePromotion"); - return (Criteria) this; - } - - public Criteria andOfflinePromotionGreaterThan(Long value) { - addCriterion("offline_promotion >", value, "offlinePromotion"); - return (Criteria) this; - } - - public Criteria andOfflinePromotionGreaterThanOrEqualTo(Long value) { - addCriterion("offline_promotion >=", value, "offlinePromotion"); - return (Criteria) this; - } - - public Criteria andOfflinePromotionLessThan(Long value) { - addCriterion("offline_promotion <", value, "offlinePromotion"); - return (Criteria) this; - } - - public Criteria andOfflinePromotionLessThanOrEqualTo(Long value) { - addCriterion("offline_promotion <=", value, "offlinePromotion"); - return (Criteria) this; - } - - public Criteria andOfflinePromotionIn(List values) { - addCriterion("offline_promotion in", values, "offlinePromotion"); - return (Criteria) this; - } - - public Criteria andOfflinePromotionNotIn(List values) { - addCriterion("offline_promotion not in", values, "offlinePromotion"); - return (Criteria) this; - } - - public Criteria andOfflinePromotionBetween(Long value1, Long value2) { - addCriterion("offline_promotion between", value1, value2, "offlinePromotion"); - return (Criteria) this; - } - - public Criteria andOfflinePromotionNotBetween(Long value1, Long value2) { - addCriterion("offline_promotion not between", value1, value2, "offlinePromotion"); - return (Criteria) this; - } - - public Criteria andBusinessExpandIsNull() { - addCriterion("business_expand is null"); - return (Criteria) this; - } - - public Criteria andBusinessExpandIsNotNull() { - addCriterion("business_expand is not null"); - return (Criteria) this; - } - - public Criteria andBusinessExpandEqualTo(Long value) { - addCriterion("business_expand =", value, "businessExpand"); - return (Criteria) this; - } - - public Criteria andBusinessExpandNotEqualTo(Long value) { - addCriterion("business_expand <>", value, "businessExpand"); - return (Criteria) this; - } - - public Criteria andBusinessExpandGreaterThan(Long value) { - addCriterion("business_expand >", value, "businessExpand"); - return (Criteria) this; - } - - public Criteria andBusinessExpandGreaterThanOrEqualTo(Long value) { - addCriterion("business_expand >=", value, "businessExpand"); - return (Criteria) this; - } - - public Criteria andBusinessExpandLessThan(Long value) { - addCriterion("business_expand <", value, "businessExpand"); - return (Criteria) this; - } - - public Criteria andBusinessExpandLessThanOrEqualTo(Long value) { - addCriterion("business_expand <=", value, "businessExpand"); - return (Criteria) this; - } - - public Criteria andBusinessExpandIn(List values) { - addCriterion("business_expand in", values, "businessExpand"); - return (Criteria) this; - } - - public Criteria andBusinessExpandNotIn(List values) { - addCriterion("business_expand not in", values, "businessExpand"); - return (Criteria) this; - } - - public Criteria andBusinessExpandBetween(Long value1, Long value2) { - addCriterion("business_expand between", value1, value2, "businessExpand"); - return (Criteria) this; - } - - public Criteria andBusinessExpandNotBetween(Long value1, Long value2) { - addCriterion("business_expand not between", value1, value2, "businessExpand"); - return (Criteria) this; - } - - public Criteria andFinancialAffairsIsNull() { - addCriterion("financial_affairs is null"); - return (Criteria) this; - } - - public Criteria andFinancialAffairsIsNotNull() { - addCriterion("financial_affairs is not null"); - return (Criteria) this; - } - - public Criteria andFinancialAffairsEqualTo(Long value) { - addCriterion("financial_affairs =", value, "financialAffairs"); - return (Criteria) this; - } - - public Criteria andFinancialAffairsNotEqualTo(Long value) { - addCriterion("financial_affairs <>", value, "financialAffairs"); - return (Criteria) this; - } - - public Criteria andFinancialAffairsGreaterThan(Long value) { - addCriterion("financial_affairs >", value, "financialAffairs"); - return (Criteria) this; - } - - public Criteria andFinancialAffairsGreaterThanOrEqualTo(Long value) { - addCriterion("financial_affairs >=", value, "financialAffairs"); - return (Criteria) this; - } - - public Criteria andFinancialAffairsLessThan(Long value) { - addCriterion("financial_affairs <", value, "financialAffairs"); - return (Criteria) this; - } - - public Criteria andFinancialAffairsLessThanOrEqualTo(Long value) { - addCriterion("financial_affairs <=", value, "financialAffairs"); - return (Criteria) this; - } - - public Criteria andFinancialAffairsIn(List values) { - addCriterion("financial_affairs in", values, "financialAffairs"); - return (Criteria) this; - } - - public Criteria andFinancialAffairsNotIn(List values) { - addCriterion("financial_affairs not in", values, "financialAffairs"); - return (Criteria) this; - } - - public Criteria andFinancialAffairsBetween(Long value1, Long value2) { - addCriterion("financial_affairs between", value1, value2, "financialAffairs"); - return (Criteria) this; - } - - public Criteria andFinancialAffairsNotBetween(Long value1, Long value2) { - addCriterion("financial_affairs not between", value1, value2, "financialAffairs"); - 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 values) { - addCriterion("created_at in", values, "createdAt"); - return (Criteria) this; - } - - public Criteria andCreatedAtNotIn(List 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 values) { - addCriterion("updated_at in", values, "updatedAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtNotIn(List 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 values) { - addCriterion("rec_status in", values, "recStatus"); - return (Criteria) this; - } - - public Criteria andRecStatusNotIn(List 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); - } - } -} \ No newline at end of file diff --git a/pims/src/main/java/com/ccsens/pims/bean/po/CostLog.java b/pims/src/main/java/com/ccsens/pims/bean/po/CostLog.java new file mode 100644 index 00000000..5fcf2f8f --- /dev/null +++ b/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(); + } +} \ No newline at end of file diff --git a/pims/src/main/java/com/ccsens/pims/bean/po/CostLogExample.java b/pims/src/main/java/com/ccsens/pims/bean/po/CostLogExample.java new file mode 100644 index 00000000..8c71384f --- /dev/null +++ b/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 oredCriteria; + + public CostLogExample() { + oredCriteria = new ArrayList(); + } + + 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 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 criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List 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 values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List 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 values) { + addCriterion("cost_type_id in", values, "costTypeId"); + return (Criteria) this; + } + + public Criteria andCostTypeIdNotIn(List 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 values) { + addCriterion("product_cost in", values, "productCost"); + return (Criteria) this; + } + + public Criteria andProductCostNotIn(List 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 values) { + addCriterion("year_time in", values, "yearTime"); + return (Criteria) this; + } + + public Criteria andYearTimeNotIn(List 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 values) { + addCriterion("month_time in", values, "monthTime"); + return (Criteria) this; + } + + public Criteria andMonthTimeNotIn(List 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 values) { + addCriterion("predict_cost in", values, "predictCost"); + return (Criteria) this; + } + + public Criteria andPredictCostNotIn(List 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 values) { + addCriterion("real_cost in", values, "realCost"); + return (Criteria) this; + } + + public Criteria andRealCostNotIn(List 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 values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List 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 values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List 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 values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List 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); + } + } +} \ No newline at end of file diff --git a/pims/src/main/java/com/ccsens/pims/bean/po/CostType.java b/pims/src/main/java/com/ccsens/pims/bean/po/CostType.java new file mode 100644 index 00000000..c9c6347f --- /dev/null +++ b/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(); + } +} \ No newline at end of file diff --git a/pims/src/main/java/com/ccsens/pims/bean/po/CostTypeExample.java b/pims/src/main/java/com/ccsens/pims/bean/po/CostTypeExample.java new file mode 100644 index 00000000..7336fe4f --- /dev/null +++ b/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 oredCriteria; + + public CostTypeExample() { + oredCriteria = new ArrayList(); + } + + 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 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 criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List 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 values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List 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 values) { + addCriterion("company_id in", values, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotIn(List 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 values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List 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 values) { + addCriterion("name in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List 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 values) { + addCriterion("level in", values, "level"); + return (Criteria) this; + } + + public Criteria andLevelNotIn(List 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 values) { + addCriterion("parent_id in", values, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotIn(List 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 values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List 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 values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List 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 values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List 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); + } + } +} \ No newline at end of file diff --git a/pims/src/main/java/com/ccsens/pims/bean/po/IncomeStatementsLog.java b/pims/src/main/java/com/ccsens/pims/bean/po/IncomeStatementsLog.java index 674cb1f7..776c5769 100644 --- a/pims/src/main/java/com/ccsens/pims/bean/po/IncomeStatementsLog.java +++ b/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); diff --git a/pims/src/main/java/com/ccsens/pims/bean/po/IncomeStatementsLogExample.java b/pims/src/main/java/com/ccsens/pims/bean/po/IncomeStatementsLogExample.java index df218ac6..162b09ce 100644 --- a/pims/src/main/java/com/ccsens/pims/bean/po/IncomeStatementsLogExample.java +++ b/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 values) { + addCriterion("year_income in", values, "yearIncome"); + return (Criteria) this; + } + + public Criteria andYearIncomeNotIn(List 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 values) { + public Criteria andMonthTimeIn(List values) { addCriterion("month_time in", values, "monthTime"); return (Criteria) this; } - public Criteria andMonthTimeNotIn(List values) { + public Criteria andMonthTimeNotIn(List 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; } diff --git a/pims/src/main/java/com/ccsens/pims/bean/po/MoneyFlowLog.java b/pims/src/main/java/com/ccsens/pims/bean/po/MoneyFlowLog.java index 2e123200..6862b79f 100644 --- a/pims/src/main/java/com/ccsens/pims/bean/po/MoneyFlowLog.java +++ b/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); diff --git a/pims/src/main/java/com/ccsens/pims/bean/po/MoneyFlowLogExample.java b/pims/src/main/java/com/ccsens/pims/bean/po/MoneyFlowLogExample.java index bcc899a0..e3fd1150 100644 --- a/pims/src/main/java/com/ccsens/pims/bean/po/MoneyFlowLogExample.java +++ b/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 values) { + addCriterion("year_income in", values, "yearIncome"); + return (Criteria) this; + } + + public Criteria andYearIncomeNotIn(List 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 values) { + public Criteria andMonthTimeIn(List values) { addCriterion("month_time in", values, "monthTime"); return (Criteria) this; } - public Criteria andMonthTimeNotIn(List values) { + public Criteria andMonthTimeNotIn(List 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; } diff --git a/pims/src/main/java/com/ccsens/pims/bean/po/Product.java b/pims/src/main/java/com/ccsens/pims/bean/po/Product.java index 67f40efb..ae2cc99d 100644 --- a/pims/src/main/java/com/ccsens/pims/bean/po/Product.java +++ b/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() { diff --git a/pims/src/main/java/com/ccsens/pims/bean/po/ProductExample.java b/pims/src/main/java/com/ccsens/pims/bean/po/ProductExample.java index e8af2016..a5b5016c 100644 --- a/pims/src/main/java/com/ccsens/pims/bean/po/ProductExample.java +++ b/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 values) { + public Criteria andProductTypeIdIn(List values) { addCriterion("product_type_id in", values, "productTypeId"); return (Criteria) this; } - public Criteria andProductTypeIdNotIn(List values) { + public Criteria andProductTypeIdNotIn(List 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 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 values) { addCriterion("gross_margin in", values, "grossMargin"); return (Criteria) this; } - public Criteria andGrossMarginNotIn(List values) { + public Criteria andGrossMarginNotIn(List 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; } diff --git a/pims/src/main/java/com/ccsens/pims/bean/po/ProductIncome.java b/pims/src/main/java/com/ccsens/pims/bean/po/ProductIncome.java index 7ce9279b..a4b5e43b 100644 --- a/pims/src/main/java/com/ccsens/pims/bean/po/ProductIncome.java +++ b/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); diff --git a/pims/src/main/java/com/ccsens/pims/bean/po/ProductIncomeExample.java b/pims/src/main/java/com/ccsens/pims/bean/po/ProductIncomeExample.java index 0fbe9816..c9e96481 100644 --- a/pims/src/main/java/com/ccsens/pims/bean/po/ProductIncomeExample.java +++ b/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 values) { + addCriterion("year_income in", values, "yearIncome"); + return (Criteria) this; + } + + public Criteria andYearIncomeNotIn(List 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 values) { + public Criteria andMonthTimeIn(List values) { addCriterion("month_time in", values, "monthTime"); return (Criteria) this; } - public Criteria andMonthTimeNotIn(List values) { + public Criteria andMonthTimeNotIn(List 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; } diff --git a/pims/src/main/java/com/ccsens/pims/bean/vo/CompanyVo.java b/pims/src/main/java/com/ccsens/pims/bean/vo/CompanyVo.java index a8990872..619eaadd 100644 --- a/pims/src/main/java/com/ccsens/pims/bean/vo/CompanyVo.java +++ b/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 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 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 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 incomeMonthList; + private List 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; } } diff --git a/pims/src/main/java/com/ccsens/pims/bean/vo/ProductDto.java b/pims/src/main/java/com/ccsens/pims/bean/vo/ProductDto.java deleted file mode 100644 index ee9215f9..00000000 --- a/pims/src/main/java/com/ccsens/pims/bean/vo/ProductDto.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.ccsens.pims.bean.vo; - -import lombok.Data; - -/** - * @author 逗 - */ -@Data -public class ProductDto { - -} diff --git a/pims/src/main/java/com/ccsens/pims/bean/vo/ProductVo.java b/pims/src/main/java/com/ccsens/pims/bean/vo/ProductVo.java new file mode 100644 index 00000000..5b6e553f --- /dev/null +++ b/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 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 predictIncome; + @ApiModelProperty("实际收入") + private List realIncome; + } + @Data + @ApiModel("总成本费用估算表") + public static class ProductCost{ + @ApiModelProperty("成本类型名") + private String costTypeName; + @ApiModelProperty("预计成本") + private List predictCost; + @ApiModelProperty("实际成本") + private List realCost; + } + + @Data + @ApiModel("损益类型") + public static class IncomeType{ + @ApiModelProperty("损益类型") + private Long incomeType; + @ApiModelProperty("损益类型名字") + private String incomeName; + @ApiModelProperty("每月预计损益") + private List predictIncome; + @ApiModelProperty("每月实际损益") + private List 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 predictMoneyFlow; + @ApiModelProperty("每月实际现金流变动") + private List realMoneyFlow; + + } + + @Data + @ApiModel("总成本费用估算表") + public static class MonthNum{ + @ApiModelProperty("预计成本") + private int month; + @ApiModelProperty("数额") + private BigDecimal num; + } +} diff --git a/pims/src/main/java/com/ccsens/pims/persist/dao/ProductDao.java b/pims/src/main/java/com/ccsens/pims/persist/dao/ProductDao.java index 1b4fabf9..a97c36a1 100644 --- a/pims/src/main/java/com/ccsens/pims/persist/dao/ProductDao.java +++ b/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 queryProductInfo(@Param("projectId") Long projectId); + + /** + * 查看所有产品的收入信息(excel表格时用) + * @param projectId 产品id + * @return 返回产品的收入信息 + */ + List queryProductIncome(@Param("projectId")Long projectId); + + /** + * 查看现金流变动 + * @param projectId 项目id + * @return 返回现金流变动信息 + */ + List queryMoneyFlowExcel(@Param("projectId")Long projectId); + + /** + * 查看损益表内容 + * @param projectId 项目id + * @return 损益 + */ + List queryIncomeExcel(@Param("projectId")Long projectId); + + /** + * 获取产品的成本信息 + * @param projectId 项目id + * @return 每个产品的成本信息 + */ + List getCostProductExcel(Long projectId); + + /** + * 获取其他成本信息 + * @param projectId 项目id + * @return 其他成本信息 + */ + List getCostOtherExcel(Long projectId); + + /*-------------------------------------------------------------------------------------------------*/ + + /** + * 查看所有产品的收入信息(图表时用) + * @param projectId 项目id + * @return 返回产品的收入信息 + */ + List queryProductIncomeMonth(@Param("projectId")Long projectId); + + /** + * 查找单个产品的收入信息 + * @param productId 产品id + * @return 返回产品的收入信息 + */ + List getProductIncome(@Param("productId")Long productId); + + /** + * 查看现金流变动(图表时用) + * @param projectId 项目id + * @return 返回现金流变动信息 + */ + List queryMonthFlow(@Param("projectId")Long projectId); + + /** + * 查看损益表内容(图表时用) + * @param projectId 项目id + * @return 损益 + */ + List 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 queryProductIncomeProportion(@Param("projectId")Long projectId,@Param("year")String year); + + + /** + * 获取不同类型的成本(图表用) + * @param projectId 项目id + * @return + */ + List getTotalCost(Long projectId); + } diff --git a/pims/src/main/java/com/ccsens/pims/persist/dao/ProductIncomeDao.java b/pims/src/main/java/com/ccsens/pims/persist/dao/ProductIncomeDao.java new file mode 100644 index 00000000..7c325553 --- /dev/null +++ b/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 { +} diff --git a/pims/src/main/java/com/ccsens/pims/persist/dao/ProductTypeDao.java b/pims/src/main/java/com/ccsens/pims/persist/dao/ProductTypeDao.java new file mode 100644 index 00000000..f80a18a1 --- /dev/null +++ b/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 { +} diff --git a/pims/src/main/java/com/ccsens/pims/persist/mapper/CompanyCostMapper.java b/pims/src/main/java/com/ccsens/pims/persist/mapper/CompanyCostMapper.java deleted file mode 100644 index 1992d7c4..00000000 --- a/pims/src/main/java/com/ccsens/pims/persist/mapper/CompanyCostMapper.java +++ /dev/null @@ -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 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); -} \ No newline at end of file diff --git a/pims/src/main/java/com/ccsens/pims/persist/mapper/CostLogMapper.java b/pims/src/main/java/com/ccsens/pims/persist/mapper/CostLogMapper.java new file mode 100644 index 00000000..ca494089 --- /dev/null +++ b/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 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); +} \ No newline at end of file diff --git a/pims/src/main/java/com/ccsens/pims/persist/mapper/CostTypeMapper.java b/pims/src/main/java/com/ccsens/pims/persist/mapper/CostTypeMapper.java new file mode 100644 index 00000000..a864cc3a --- /dev/null +++ b/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 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); +} \ No newline at end of file diff --git a/pims/src/main/java/com/ccsens/pims/service/IProductService.java b/pims/src/main/java/com/ccsens/pims/service/IProductService.java index 1ff2ab43..1bee630c 100644 --- a/pims/src/main/java/com/ccsens/pims/service/IProductService.java +++ b/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 queryProductIncome(QueryDto params); + List queryProductIncome(QueryDto params); /** * 查看产品总收入占比图 @@ -44,19 +45,19 @@ public interface IProductService { * @param params 项目id * @return 返回每个与的预计成本与实际成本 */ - List getTotalCost(QueryDto params); + List getTotalCost(QueryDto params); /** * 损益表 * @param params 项目id * @return 返回损益类型和每个月的损益 */ - List getIncome(QueryDto params); + List queryIncome(QueryDto params); /** * 现金流变动表 * @param params 项目id * @return 返回现金流变动类型和每个与变动的数额 */ - List getMonthFlow(QueryDto params); + List getMonthFlow(QueryDto params); } diff --git a/pims/src/main/java/com/ccsens/pims/service/IRealExcelService.java b/pims/src/main/java/com/ccsens/pims/service/IRealExcelService.java new file mode 100644 index 00000000..ae157fad --- /dev/null +++ b/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 ; +} diff --git a/pims/src/main/java/com/ccsens/pims/service/IReportService.java b/pims/src/main/java/com/ccsens/pims/service/IReportService.java index 9ad61513..e0cee89f 100644 --- a/pims/src/main/java/com/ccsens/pims/service/IReportService.java +++ b/pims/src/main/java/com/ccsens/pims/service/IReportService.java @@ -14,33 +14,33 @@ public interface IReportService { * @param params 项目id * @return 返回wps表格文件的路径 */ - List getProduct(QueryDto params); + List getProduct(QueryDto params) throws Exception; /** * 根据项目id查找产值及附加估算表 * @param params 项目id * @return 返回wps表格文件的路径 */ - List getProduction(QueryDto params); + List getProduction(QueryDto params)throws Exception; /** * 根据项目id查找总成本费用估算表 * @param params 项目id * @return 返回wps 表格文件的路径 */ - List getCost(QueryDto params); + List getCost(QueryDto params)throws Exception; /** * 查看损益表 * @param params 项目id * @return 返回wps表格文件的路径 */ - List getIncome(QueryDto params); + List getIncome(QueryDto params)throws Exception; /** * 查看现金流表 * @param params 项目id * @return 返回wps表格文件的路径 */ - List getMoney(QueryDto params); + List getMoney(QueryDto params)throws Exception; } diff --git a/pims/src/main/java/com/ccsens/pims/service/ProductService.java b/pims/src/main/java/com/ccsens/pims/service/ProductService.java index 4e6c1cf1..5c69c46b 100644 --- a/pims/src/main/java/com/ccsens/pims/service/ProductService.java +++ b/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 getProductIncome(QueryDto params) { - return null; + CompanyDto.Product product = params.getParam(); + return productDao.getProductIncome(product.getProductId()); } @Override - public List queryProductIncome(QueryDto params) { - return null; + public List queryProductIncome(QueryDto params) { + CompanyDto.Project project = params.getParam(); + List productIncomeMonthList = productDao.queryProductIncomeMonth(project.getProjectId()); + return productIncomeMonthList; } @Override public List queryProductIncomeProportion(QueryDto params) { - return null; + CompanyDto.Project project = params.getParam(); + //获取当前年份 + String year = DateUtil.format(new Date(),"yyyy"); + //先查所有产品出全年总收入 + CompanyVo.TotalIncome totalIncome = productDao.getTotalIncome(project.getProjectId(),year); + List 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 getTotalCost(QueryDto params) { - return null; + public List getTotalCost(QueryDto params) { + CompanyDto.Project project = params.getParam(); + List productCosts = productDao.getTotalCost(project.getProjectId()); + return productCosts; } @Override - public List getIncome(QueryDto params) { - return null; + public List queryIncome(QueryDto params) { + CompanyDto.Project project = params.getParam(); + return productDao.queryIncome(project.getProjectId()); } @Override - public List getMonthFlow(QueryDto params) { - return null; + public List getMonthFlow(QueryDto params) { + CompanyDto.Project project = params.getParam(); + return productDao.queryMonthFlow(project.getProjectId()); } } diff --git a/pims/src/main/java/com/ccsens/pims/service/RealExcelService.java b/pims/src/main/java/com/ccsens/pims/service/RealExcelService.java new file mode 100644 index 00000000..58b9c758 --- /dev/null +++ b/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 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 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 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 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 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 productList = productDao.selectByExample(productExample); + if(CollectionUtil.isNotEmpty(productList)){ + Long productId = productList.get(0).getId(); + //查找以前的收入,删除后重新添加 + ProductIncomeExample incomeExample = new ProductIncomeExample(); + incomeExample.createCriteria().andProductIdEqualTo(productId); + List 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++; + } + } + + } + } + +} diff --git a/pims/src/main/java/com/ccsens/pims/service/ReportService.java b/pims/src/main/java/com/ccsens/pims/service/ReportService.java index dad5db86..79c2d148 100644 --- a/pims/src/main/java/com/ccsens/pims/service/ReportService.java +++ b/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 getProduct(QueryDto params) { - return null; + public List getProduct(QueryDto params) throws Exception { + CompanyDto.Project project = params.getParam(); + //查询此任务的报表,有则直接返回 + List wpsPath; + Map 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 productTypeList = productDao.queryProductInfo(project.getProjectId()); + + //生成excel写入的数据 + List> product = generateProduct(productTypeList); + //写入WBS + generateExcelWithWps(project.getProjectId(),(byte)3, params.getUserId(), "价格依据表", product); + //获取wps文件的路径并返回 + wpsPath = tallFeignClient.queryVisitUrls(visitWpsUrl); + //添加wps关联信息 + return wpsPath; } @Override - public List getProduction(QueryDto params) { - return null; + public List getProduction(QueryDto params) throws Exception { + CompanyDto.Project project = params.getParam(); + //查询此任务的报表,有则直接返回 + List wpsPath; + Map 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 productIncomeTypeList = productDao.queryProductIncome(project.getProjectId()); + //生成excel写入的数据 + List> product = generateProduction(productIncomeTypeList); + //写入WBS + generateExcelWithWps(project.getProjectId(),(byte)4, params.getUserId(), "产值及附加估算表", product); + //获取wps文件的路径并返回 + wpsPath = tallFeignClient.queryVisitUrls(visitWpsUrl); + //添加wps关联信息 + return wpsPath; } + @Override - public List getCost(QueryDto params) { - return null; + public List getCost(QueryDto params)throws Exception { + CompanyDto.Project project = params.getParam(); + //查询此任务的报表,有则直接返回 + List 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 costProductTypeList = productDao.getCostProductExcel(project.getProjectId()); + //获取其他的成本 + List costOtherTypeList = productDao.getCostOtherExcel(project.getProjectId()); + //生成写入的数据 + List> cost = generateCost(costProductTypeList,costOtherTypeList); + //写入WBS + generateExcelWithWps(project.getProjectId(), (byte)5, params.getUserId(), "产品成本费用估算表", cost); + //获取wps文件的路径并返回 + wpsPath = tallFeignClient.queryVisitUrls(visitWpsUrl); + //添加wps关联信息 + return wpsPath; } + @Override - public List getIncome(QueryDto params) { - return null; + public List getIncome(QueryDto params) throws Exception { + CompanyDto.Project project = params.getParam(); + //查询此任务的报表,有则直接返回 + List 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 incomeTypeList = productDao.queryIncomeExcel(project.getProjectId()); + //生成excel写入的数据 + List> product = generateIncome(incomeTypeList); + //写入WBS + generateExcelWithWps(project.getProjectId(),(byte)6, params.getUserId(), "损益表", product); + //获取wps文件的路径并返回 + wpsPath = tallFeignClient.queryVisitUrls(visitWpsUrl); + //添加wps关联信息 + return wpsPath; } + @Override - public List getMoney(QueryDto params) { - return null; + public List getMoney(QueryDto params) throws Exception { + CompanyDto.Project project = params.getParam(); + //查询此任务的报表,有则直接返回 + List 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 moneyFlowTypes = productDao.queryMoneyFlowExcel(project.getProjectId()); + //生成excel写入的数据 + List> 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) 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> generateProduct(List productTypeList) { + List> list = new ArrayList<>(); + List title = new ArrayList<>(); + title.add(new PoiUtil.PoiUtilCell("产品或服务价格使用依据表", 7, 1)); + list.add(title); + List 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 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 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> generateProduction(List productIncomeTypeList) { + //标题 + List> list = new ArrayList<>(); + List title = new ArrayList<>(); + title.add(new PoiUtil.PoiUtilCell("产值及附加估算表", 17, 1)); + list.add(title); + //表头 + List 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 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 product1 = new ArrayList<>(); + List product2 = new ArrayList<>(); + List 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> generateMoneyFlow(List moneyFlowTypes) { + //标题 + List> list = new ArrayList<>(); + List title = new ArrayList<>(); + title.add(new PoiUtil.PoiUtilCell("现金流表(全部定投)", 16, 1)); + list.add(title); + //表头 + List 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 income1 = new ArrayList<>(); + List income2 = new ArrayList<>(); + List 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 totalMoneyIncome1 = new ArrayList<>(); + List totalMoneyIncome2 = new ArrayList<>(); + List 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 income1 = new ArrayList<>(); + List income2 = new ArrayList<>(); + List 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 totalMoneyExpend1 = new ArrayList<>(); + List totalMoneyExpend2 = new ArrayList<>(); + List 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> generateIncome(List incomeTypeList) { + //标题 + List> list = new ArrayList<>(); + List title = new ArrayList<>(); + title.add(new PoiUtil.PoiUtilCell("损益表", 15, 1)); + list.add(title); + //表头 + List 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 income1 = new ArrayList<>(); + List income2 = new ArrayList<>(); + List 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> generateCost(List costProductTypeList, List costOtherTypeList) { + //标题 + List> list = new ArrayList<>(); + List title = new ArrayList<>(); + title.add(new PoiUtil.PoiUtilCell("总成本费用估算表", 15, 1)); + list.add(title); + //表头 + List 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 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 cost1 = new ArrayList<>(); + List cost2 = new ArrayList<>(); + List 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 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 cost1 = new ArrayList<>(); + List cost2 = new ArrayList<>(); + List 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 costType = new ArrayList<>(); + costType.add(new PoiUtil.PoiUtilCell(firstCostType.getFCostName())); + list.add(costType); + } + } + return list; } } diff --git a/pims/src/main/resources/application-test.yml b/pims/src/main/resources/application-test.yml index 15d8f9d0..bd3f5208 100644 --- a/pims/src/main/resources/application-test.yml +++ b/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 \ No newline at end of file + ip-address: 192.168.0.99 +file: + domain: https://test.tall.wiki/gateway/pims/ \ No newline at end of file diff --git a/pims/src/main/resources/application.yml b/pims/src/main/resources/application.yml index 5c2cd5c4..5889ff7f 100644 --- a/pims/src/main/resources/application.yml +++ b/pims/src/main/resources/application.yml @@ -1,4 +1,4 @@ spring: profiles: - active: dev - include: common, util-dev \ No newline at end of file + active: test + include: common, util-test \ No newline at end of file diff --git a/pims/src/main/resources/mapper_dao/ProducrDao.xml b/pims/src/main/resources/mapper_dao/ProducrDao.xml index fa2e1a4c..c2dac1fd 100644 --- a/pims/src/main/resources/mapper_dao/ProducrDao.xml +++ b/pims/src/main/resources/mapper_dao/ProducrDao.xml @@ -2,16 +2,265 @@ - + 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} + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pims/src/main/resources/mapper_raw/CompanyCostMapper.xml b/pims/src/main/resources/mapper_raw/CompanyCostMapper.xml deleted file mode 100644 index fcf85577..00000000 --- a/pims/src/main/resources/mapper_raw/CompanyCostMapper.xml +++ /dev/null @@ -1,466 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - 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 - - - - - delete from t_company_cost - where id = #{id,jdbcType=BIGINT} - - - delete from t_company_cost - - - - - - 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 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, - - - - - #{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}, - - - - - - update t_company_cost - - - 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}, - - - - - - - - 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} - - - - - - update t_company_cost - - - 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 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} - - \ No newline at end of file diff --git a/pims/src/main/resources/mapper_raw/CostLogMapper.xml b/pims/src/main/resources/mapper_raw/CostLogMapper.xml new file mode 100644 index 00000000..23000add --- /dev/null +++ b/pims/src/main/resources/mapper_raw/CostLogMapper.xml @@ -0,0 +1,291 @@ + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, cost_type_id, product_cost, year_time, month_time, predict_cost, real_cost, created_at, + updated_at, rec_status + + + + + delete from t_cost_log + where id = #{id,jdbcType=BIGINT} + + + delete from t_cost_log + + + + + + 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 into t_cost_log + + + id, + + + cost_type_id, + + + product_cost, + + + year_time, + + + month_time, + + + predict_cost, + + + real_cost, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{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}, + + + + + + update t_cost_log + + + 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}, + + + + + + + + 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} + + + + + + update t_cost_log + + + 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 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} + + \ No newline at end of file diff --git a/pims/src/main/resources/mapper_raw/CostTypeMapper.xml b/pims/src/main/resources/mapper_raw/CostTypeMapper.xml new file mode 100644 index 00000000..6bf1031f --- /dev/null +++ b/pims/src/main/resources/mapper_raw/CostTypeMapper.xml @@ -0,0 +1,275 @@ + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, company_id, project_id, name, level, parent_id, created_at, updated_at, rec_status + + + + + delete from t_cost_type + where id = #{id,jdbcType=BIGINT} + + + delete from t_cost_type + + + + + + 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 into t_cost_type + + + id, + + + company_id, + + + project_id, + + + name, + + + level, + + + parent_id, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{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}, + + + + + + update t_cost_type + + + 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}, + + + + + + + + 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} + + + + + + update t_cost_type + + + 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 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} + + \ No newline at end of file diff --git a/pims/src/main/resources/mapper_raw/IncomeStatementsLogMapper.xml b/pims/src/main/resources/mapper_raw/IncomeStatementsLogMapper.xml index 5503353b..efc22951 100644 --- a/pims/src/main/resources/mapper_raw/IncomeStatementsLogMapper.xml +++ b/pims/src/main/resources/mapper_raw/IncomeStatementsLogMapper.xml @@ -6,7 +6,8 @@ - + + @@ -72,8 +73,8 @@ - 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 select @@ -107,13 +108,13 @@ 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 into t_money_flow_log @@ -130,6 +131,9 @@ money_flow_id, + + year_income, + month_time, @@ -162,8 +166,11 @@ #{moneyFlowId,jdbcType=BIGINT}, + + #{yearIncome,jdbcType=INTEGER}, + - #{monthTime,jdbcType=VARCHAR}, + #{monthTime,jdbcType=INTEGER}, #{predictMoney,jdbcType=BIGINT}, @@ -203,8 +210,11 @@ money_flow_id = #{record.moneyFlowId,jdbcType=BIGINT}, + + year_income = #{record.yearIncome,jdbcType=INTEGER}, + - month_time = #{record.monthTime,jdbcType=VARCHAR}, + month_time = #{record.monthTime,jdbcType=INTEGER}, 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 @@ money_flow_id = #{moneyFlowId,jdbcType=BIGINT}, + + year_income = #{yearIncome,jdbcType=INTEGER}, + - month_time = #{monthTime,jdbcType=VARCHAR}, + month_time = #{monthTime,jdbcType=INTEGER}, 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}, diff --git a/pims/src/main/resources/mapper_raw/ProductIncomeMapper.xml b/pims/src/main/resources/mapper_raw/ProductIncomeMapper.xml index 7d0df885..7e8942aa 100644 --- a/pims/src/main/resources/mapper_raw/ProductIncomeMapper.xml +++ b/pims/src/main/resources/mapper_raw/ProductIncomeMapper.xml @@ -4,7 +4,8 @@ - + + @@ -70,8 +71,8 @@ - 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 @@ -243,4 +243,34 @@ m.id = #{memberId} + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_dao/SysProjectDao.xml b/tall/src/main/resources/mapper_dao/SysProjectDao.xml index 3a73d7e8..b271a3aa 100644 --- a/tall/src/main/resources/mapper_dao/SysProjectDao.xml +++ b/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) + + + AND td.end_time > #{beginTime} + AND td.begin_time <= #{endTime} + + + + and + td.executor_role in + + #{roleId} + + diff --git a/tall/src/main/resources/mapper_raw/ProShowMapper.xml b/tall/src/main/resources/mapper_raw/ProShowMapper.xml index b9b652e7..ec0d9933 100644 --- a/tall/src/main/resources/mapper_raw/ProShowMapper.xml +++ b/tall/src/main/resources/mapper_raw/ProShowMapper.xml @@ -16,6 +16,7 @@ + @@ -77,7 +78,7 @@ 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 @@ -263,6 +272,9 @@ detail_path = #{record.detailPath,jdbcType=VARCHAR}, + + pims_nav_type = #{record.pimsNavType,jdbcType=TINYINT}, + @@ -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} @@ -330,6 +343,9 @@ detail_path = #{detailPath,jdbcType=VARCHAR}, + + pims_nav_type = #{pimsNavType,jdbcType=TINYINT}, + where id = #{id,jdbcType=BIGINT} @@ -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} \ No newline at end of file diff --git a/util/src/main/java/com/ccsens/util/CodeEnum.java b/util/src/main/java/com/ccsens/util/CodeEnum.java index 1ffd7ed8..a881a98b 100644 --- a/util/src/main/java/com/ccsens/util/CodeEnum.java +++ b/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), diff --git a/util/src/main/java/com/ccsens/util/PoiUtil.java b/util/src/main/java/com/ccsens/util/PoiUtil.java index f74bf9c4..72889f30 100644 --- a/util/src/main/java/com/ccsens/util/PoiUtil.java +++ b/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 = 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); } diff --git a/util/src/main/java/com/ccsens/util/WebConstant.java b/util/src/main/java/com/ccsens/util/WebConstant.java index 08ad4e83..fd262b70 100644 --- a/util/src/main/java/com/ccsens/util/WebConstant.java +++ b/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"; diff --git a/util/src/test/java/com/ccsens/util/Base64Test.java b/util/src/test/java/com/ccsens/util/Base64Test.java index e7929875..34b3191d 100644 --- a/util/src/test/java/com/ccsens/util/Base64Test.java +++ b/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");