mirror of
https://gitee.com/elegant_wings/dbd-meeting.git
synced 2025-06-21 05:39:36 +08:00
初始化项目
This commit is contained in:
parent
5983caf39b
commit
b31c4194c3
36
README.en.md
Normal file
36
README.en.md
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
# SaasICS
|
||||||
|
|
||||||
|
#### Description
|
||||||
|
{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**}
|
||||||
|
|
||||||
|
#### Software Architecture
|
||||||
|
Software architecture description
|
||||||
|
|
||||||
|
#### Installation
|
||||||
|
|
||||||
|
1. xxxx
|
||||||
|
2. xxxx
|
||||||
|
3. xxxx
|
||||||
|
|
||||||
|
#### Instructions
|
||||||
|
|
||||||
|
1. xxxx
|
||||||
|
2. xxxx
|
||||||
|
3. xxxx
|
||||||
|
|
||||||
|
#### Contribution
|
||||||
|
|
||||||
|
1. Fork the repository
|
||||||
|
2. Create Feat_xxx branch
|
||||||
|
3. Commit your code
|
||||||
|
4. Create Pull Request
|
||||||
|
|
||||||
|
|
||||||
|
#### Gitee Feature
|
||||||
|
|
||||||
|
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
|
||||||
|
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
|
||||||
|
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
|
||||||
|
4. The most valuable open source project [GVP](https://gitee.com/gvp)
|
||||||
|
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
|
||||||
|
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
37
README.md
Normal file
37
README.md
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
# SaasICS
|
||||||
|
|
||||||
|
#### 介绍
|
||||||
|
|
||||||
|
#### 软件架构
|
||||||
|
软件架构说明
|
||||||
|
|
||||||
|
|
||||||
|
#### 安装教程
|
||||||
|
|
||||||
|
1. jdk11 centos 环境图形验证码问题
|
||||||
|
yum install -y fontconfig
|
||||||
|
2. xxxx
|
||||||
|
3. xxxx
|
||||||
|
|
||||||
|
#### 使用说明
|
||||||
|
|
||||||
|
1. xxxx
|
||||||
|
2. xxxx
|
||||||
|
3. xxxx
|
||||||
|
|
||||||
|
#### 参与贡献
|
||||||
|
|
||||||
|
1. Fork 本仓库
|
||||||
|
2. 新建 Feat_xxx 分支
|
||||||
|
3. 提交代码
|
||||||
|
4. 新建 Pull Request
|
||||||
|
|
||||||
|
|
||||||
|
#### 特技
|
||||||
|
|
||||||
|
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
|
||||||
|
2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com)
|
||||||
|
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目
|
||||||
|
4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目
|
||||||
|
5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
|
||||||
|
6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
60
ics-admin/pom.xml
Normal file
60
ics-admin/pom.xml
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<parent>
|
||||||
|
<artifactId>saas-ics</artifactId>
|
||||||
|
<groupId>com.ics</groupId>
|
||||||
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<artifactId>ics-admin</artifactId>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<!--velocity代码生成使用模板 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.velocity</groupId>
|
||||||
|
<artifactId>velocity</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 系统模块-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ics</groupId>
|
||||||
|
<artifactId>ics-system</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba</groupId>
|
||||||
|
<artifactId>easyexcel</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jxls</groupId>
|
||||||
|
<artifactId>jxls</artifactId>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>commons-logging</groupId>
|
||||||
|
<artifactId>commons-logging</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jxls</groupId>
|
||||||
|
<artifactId>jxls-poi</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.poi</groupId>
|
||||||
|
<artifactId>poi</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.poi</groupId>
|
||||||
|
<artifactId>poi-ooxml</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.poi</groupId>
|
||||||
|
<artifactId>poi-ooxml-schemas</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</project>
|
@ -0,0 +1,128 @@
|
|||||||
|
package com.ics.admin.controller;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUnit;
|
||||||
|
import com.ics.admin.domain.Activity;
|
||||||
|
import com.ics.admin.domain.ActivityDetail;
|
||||||
|
import com.ics.admin.service.IActivityDetailService;
|
||||||
|
import com.ics.admin.service.IActivityService;
|
||||||
|
import com.ics.common.core.controller.BaseController;
|
||||||
|
import com.ics.common.core.domain.R;
|
||||||
|
import com.ics.common.utils.DateUtils;
|
||||||
|
import com.ics.common.utils.ValidatorUtils;
|
||||||
|
import com.ics.system.domain.User;
|
||||||
|
import com.ics.system.service.ICurrentUserService;
|
||||||
|
import com.ics.system.service.IUserService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动管理 提供者
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2021-03-25
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/admin/activity")
|
||||||
|
public class ActivityController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IActivityService activityService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IActivityDetailService activityDetailService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IUserService userService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ICurrentUserService userOnlineService;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询活动管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:activity:edit")
|
||||||
|
@GetMapping("get/{id}")
|
||||||
|
public Activity get(@PathVariable("id") Long id) {
|
||||||
|
return activityService.selectActivityById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询活动管理列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:activity:list")
|
||||||
|
@GetMapping("list")
|
||||||
|
public R list(Activity activity) {
|
||||||
|
startPage();
|
||||||
|
return result(activityService.selectActivityList(activity));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存活动管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:activity:add")
|
||||||
|
@PostMapping("save")
|
||||||
|
public R addSave(@RequestBody Activity activity) {
|
||||||
|
ValidatorUtils.validateEntity(activity);
|
||||||
|
activity.setTenantId(userOnlineService.getTenantId());
|
||||||
|
activity.setParkId(userOnlineService.getParkId());
|
||||||
|
activity.setCreateBy(userOnlineService.getLoginName());
|
||||||
|
return toAjax(activityService.insertActivity(activity));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存活动管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:activity:edit")
|
||||||
|
@PostMapping("update")
|
||||||
|
public R editSave(@RequestBody Activity activity) {
|
||||||
|
ValidatorUtils.validateEntity(activity);
|
||||||
|
activity.setUpdateBy(userOnlineService.getLoginName());
|
||||||
|
activity.setUpdateTime(new Date());
|
||||||
|
return toAjax(activityService.updateActivity(activity));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除活动管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:activity:remove")
|
||||||
|
@PostMapping("remove")
|
||||||
|
public R remove(String ids) {
|
||||||
|
return toAjax(activityService.deleteActivityByIds(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动报名
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:activity:add")
|
||||||
|
@PostMapping("addSign")
|
||||||
|
public R addSign(@RequestBody ActivityDetail activityDetail) {
|
||||||
|
User user = userService.selectUserById(activityDetail.getUserId());
|
||||||
|
if (user == null) {
|
||||||
|
return R.error("用户不存在");
|
||||||
|
}
|
||||||
|
activityDetail.setSignDate(DateUtils.getNowDate());
|
||||||
|
activityDetail.setPhone(user.getMobile());
|
||||||
|
return toAjax(activityDetailService.insertActivityDetail(activityDetail));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定时任务状态修改
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:activity:edit")
|
||||||
|
@PostMapping("/changeMarketable")
|
||||||
|
public R changeMarketable(@RequestBody Activity activity) {
|
||||||
|
Activity newActivity = activityService.selectActivityById(activity.getId());
|
||||||
|
if (newActivity == null) {
|
||||||
|
return R.error("活动不存在!");
|
||||||
|
}
|
||||||
|
activity.setMarketableTime(DateUtils.getNowDate());
|
||||||
|
return toAjax(activityService.updateActivity(activity));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,38 @@
|
|||||||
|
package com.ics.admin.controller;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.ActivityDetail;
|
||||||
|
import com.ics.admin.service.IActivityDetailService;
|
||||||
|
import com.ics.common.core.controller.BaseController;
|
||||||
|
import com.ics.common.core.domain.R;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动报名详情 提供者
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2021-04-15
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/admin/activityDetail")
|
||||||
|
public class ActivityDetailController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IActivityDetailService activityDetailService;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询活动报名详情列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:activityDetail:list")
|
||||||
|
@GetMapping("list")
|
||||||
|
public R list(ActivityDetail activityDetail) {
|
||||||
|
startPage();
|
||||||
|
return result(activityDetailService.selectActivityDetailList(activityDetail));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,86 @@
|
|||||||
|
package com.ics.admin.controller;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.ApplyMoveIn;
|
||||||
|
import com.ics.admin.domain.ApplySettle;
|
||||||
|
import com.ics.admin.service.IApplyMoveInService;
|
||||||
|
import com.ics.common.core.controller.BaseController;
|
||||||
|
import com.ics.common.core.domain.R;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 注册迁入申请 提供者
|
||||||
|
*
|
||||||
|
* @author zzm
|
||||||
|
* @date 2021-04-14
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/admin/applyMoveIn")
|
||||||
|
public class ApplyMoveInController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IApplyMoveInService applyMoveInService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询注册迁入申请
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:applyMoveIn:view")
|
||||||
|
@GetMapping("get/{id}")
|
||||||
|
public ApplyMoveIn get(@PathVariable("id") Long id) {
|
||||||
|
return applyMoveInService.selectApplyMoveInById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询注册迁入申请列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:applyMoveIn:list")
|
||||||
|
@GetMapping("list")
|
||||||
|
public R list(ApplyMoveIn applyMoveIn) {
|
||||||
|
startPage();
|
||||||
|
return result(applyMoveInService.selectApplyMoveInList(applyMoveIn));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存注册迁入申请
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:applyMoveIn:edit")
|
||||||
|
@PostMapping("update")
|
||||||
|
public R editSave(@RequestBody ApplyMoveIn applyMoveIn) {
|
||||||
|
return toAjax(applyMoveInService.updateApplyMoveIn(applyMoveIn));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除注册迁入申请
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:applyMoveIn:remove")
|
||||||
|
@PostMapping("remove")
|
||||||
|
public R remove(String ids) {
|
||||||
|
return toAjax(applyMoveInService.deleteApplyMoveInByIds(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量审批
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:applyMoveIn:edit")
|
||||||
|
@PostMapping("approve")
|
||||||
|
public R approve(String ids, ApplySettle.Status status, String remark){
|
||||||
|
return toAjax(applyMoveInService.approveApplyMoveInByIds(ids, status, remark));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id取消审批
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:applyMoveIn:edit")
|
||||||
|
@PostMapping("cancelApprove")
|
||||||
|
public R cancelApprove(Long id){
|
||||||
|
return toAjax(applyMoveInService.cancelApprove(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,86 @@
|
|||||||
|
package com.ics.admin.controller;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.ApplyPark;
|
||||||
|
import com.ics.admin.domain.ApplySettle;
|
||||||
|
import com.ics.admin.service.IApplyParkService;
|
||||||
|
import com.ics.common.core.controller.BaseController;
|
||||||
|
import com.ics.common.core.domain.R;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 入园申请 提供者
|
||||||
|
*
|
||||||
|
* @author zzm
|
||||||
|
* @date 2021-04-12
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/admin/applyPark")
|
||||||
|
public class ApplyParkController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IApplyParkService applyParkService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询入园申请
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:applyPark:view")
|
||||||
|
@GetMapping("get/{id}")
|
||||||
|
public ApplyPark get(@PathVariable("id") Long id) {
|
||||||
|
return applyParkService.selectApplyParkById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询入园申请列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:applyPark:list")
|
||||||
|
@GetMapping("list")
|
||||||
|
public R list(ApplyPark applyPark) {
|
||||||
|
startPage();
|
||||||
|
return result(applyParkService.selectApplyParkList(applyPark));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存入园申请
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:applyPark:edit")
|
||||||
|
@PostMapping("update")
|
||||||
|
public R editSave(@RequestBody ApplyPark applyPark) {
|
||||||
|
return toAjax(applyParkService.updateApplyPark(applyPark));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除入园申请
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:applyPark:remove")
|
||||||
|
@PostMapping("remove")
|
||||||
|
public R remove(String ids) {
|
||||||
|
return toAjax(applyParkService.deleteApplyParkByIds(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量审批
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:applyPark:edit")
|
||||||
|
@PostMapping("approve")
|
||||||
|
public R approve(String ids, ApplySettle.Status status, String remark){
|
||||||
|
return toAjax(applyParkService.approveApplyParkByIds(ids, status, remark));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id取消审批
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:applyPark:edit")
|
||||||
|
@PostMapping("cancelApprove")
|
||||||
|
public R cancelApprove(Long id){
|
||||||
|
return toAjax(applyParkService.cancelApprove(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,86 @@
|
|||||||
|
package com.ics.admin.controller;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.ApplySettle;
|
||||||
|
import com.ics.admin.service.IApplySettleService;
|
||||||
|
import com.ics.common.core.controller.BaseController;
|
||||||
|
import com.ics.common.core.domain.R;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 入驻申请 提供者
|
||||||
|
*
|
||||||
|
* @author zzm
|
||||||
|
* @date 2021-04-12
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/admin/settle")
|
||||||
|
public class ApplySettleController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IApplySettleService applySettleService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询入驻申请
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:settle:view")
|
||||||
|
@GetMapping("get/{id}")
|
||||||
|
public ApplySettle get(@PathVariable("id") Long id) {
|
||||||
|
return applySettleService.selectApplySettleById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询入驻申请列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:settle:list")
|
||||||
|
@GetMapping("list")
|
||||||
|
public R list(ApplySettle applySettle) {
|
||||||
|
startPage();
|
||||||
|
return result(applySettleService.selectApplySettleList(applySettle));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存入驻申请
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:settle:edit")
|
||||||
|
@PostMapping("update")
|
||||||
|
public R editSave(@RequestBody ApplySettle applySettle) {
|
||||||
|
return toAjax(applySettleService.updateApplySettle(applySettle));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除入驻申请
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:settle:remove")
|
||||||
|
@PostMapping("remove")
|
||||||
|
public R remove(String ids) {
|
||||||
|
return toAjax(applySettleService.deleteApplySettleByIds(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量审批
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:settle:edit")
|
||||||
|
@PostMapping("approve")
|
||||||
|
public R approve(String ids, ApplySettle.Status status, String remark){
|
||||||
|
return toAjax(applySettleService.approveApplySettleByIds(ids, status, remark));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id取消审批
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:settle:edit")
|
||||||
|
@PostMapping("cancelApprove")
|
||||||
|
public R cancelApprove(Long id){
|
||||||
|
return toAjax(applySettleService.cancelApprove(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,73 @@
|
|||||||
|
package com.ics.admin.controller;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.Building;
|
||||||
|
import com.ics.admin.service.IBuildingService;
|
||||||
|
import com.ics.common.core.controller.BaseController;
|
||||||
|
import com.ics.common.core.domain.R;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 楼宇管理 提供者
|
||||||
|
*
|
||||||
|
* @author zzm
|
||||||
|
* @date 2021-03-24
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("admin/building")
|
||||||
|
public class BuildingController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IBuildingService buildingService;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询楼宇管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:building:view")
|
||||||
|
@GetMapping("get/{id}")
|
||||||
|
public Building get(@PathVariable("id") Long id) {
|
||||||
|
return buildingService.selectBuildingById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询楼宇管理列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:building:list")
|
||||||
|
@GetMapping("list")
|
||||||
|
public R list(Building building) {
|
||||||
|
startPage();
|
||||||
|
building.setDeleteFlag(0);
|
||||||
|
return result(buildingService.selectBuildingList(building));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存楼宇管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:building:add")
|
||||||
|
@PostMapping("save")
|
||||||
|
public R addSave(@RequestBody Building building) {
|
||||||
|
return toAjax(buildingService.insertBuilding(building));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存楼宇管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:building:edit")
|
||||||
|
@PostMapping("update")
|
||||||
|
public R editSave(@RequestBody Building building) {
|
||||||
|
return toAjax(buildingService.updateBuilding(building));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除楼宇管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:building:remove")
|
||||||
|
@PostMapping("remove")
|
||||||
|
public R remove(String ids) {
|
||||||
|
return toAjax(buildingService.deleteBuildingByIds(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,71 @@
|
|||||||
|
package com.ics.admin.controller;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.BuildingDetail;
|
||||||
|
import com.ics.admin.service.IBuildingDetailService;
|
||||||
|
import com.ics.common.core.controller.BaseController;
|
||||||
|
import com.ics.common.core.domain.R;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 楼层管理 提供者
|
||||||
|
*
|
||||||
|
* @author zzm
|
||||||
|
* @date 2021-03-24
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/admin/buildingDetail")
|
||||||
|
public class BuildingDetailController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IBuildingDetailService buildingDetailService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询楼层管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:buildingDetail:view")
|
||||||
|
@GetMapping("get/{id}")
|
||||||
|
public BuildingDetail get(@PathVariable("id") Long id) {
|
||||||
|
return buildingDetailService.selectBuildingDetailById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询楼层管理列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:buildingDetail:list")
|
||||||
|
@GetMapping("list")
|
||||||
|
public R list(BuildingDetail buildingDetail) {
|
||||||
|
startPage();
|
||||||
|
return result(buildingDetailService.selectBuildingDetailList(buildingDetail));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存楼层管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:buildingDetail:add")
|
||||||
|
@PostMapping("save")
|
||||||
|
public R addSave(@RequestBody BuildingDetail buildingDetail) {
|
||||||
|
return toAjax(buildingDetailService.insertBuildingDetail(buildingDetail));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存楼层管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:buildingDetail:edit")
|
||||||
|
@PostMapping("update")
|
||||||
|
public R editSave(@RequestBody BuildingDetail buildingDetail) {
|
||||||
|
return toAjax(buildingDetailService.updateBuildingDetail(buildingDetail));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除楼层管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:buildingDetail:remove")
|
||||||
|
@PostMapping("remove")
|
||||||
|
public R remove(String ids) {
|
||||||
|
return toAjax(buildingDetailService.deleteBuildingDetailByIds(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,134 @@
|
|||||||
|
package com.ics.admin.controller;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.Clue;
|
||||||
|
import com.ics.admin.service.IClueService;
|
||||||
|
import com.ics.admin.utils.ExcelView;
|
||||||
|
import com.ics.common.core.controller.BaseController;
|
||||||
|
import com.ics.common.core.domain.R;
|
||||||
|
import com.ics.common.utils.ValidatorUtils;
|
||||||
|
import org.jxls.common.Context;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 线索管理 提供者
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2021-03-23
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/admin/clue")
|
||||||
|
public class ClueController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IClueService clueService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询线索管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:clue:view")
|
||||||
|
@GetMapping("get/{id}")
|
||||||
|
public Clue get(@PathVariable("id") Long id) {
|
||||||
|
return clueService.selectClueById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询线索管理列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:clue:list")
|
||||||
|
@GetMapping("list")
|
||||||
|
public R list(Clue clue) {
|
||||||
|
startPage();
|
||||||
|
return result(clueService.selectClueList(clue));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询线索分派的已经激活的列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:clue:list")
|
||||||
|
@GetMapping("ClueActivationList")
|
||||||
|
public R ActivationList(Clue clue) {
|
||||||
|
clue.setCustomerStatus("0");
|
||||||
|
startPage();
|
||||||
|
return result(clueService.selectClueList(clue));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分派对接人
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:clue:edit")
|
||||||
|
@PostMapping("/review")
|
||||||
|
public R review(@RequestBody Clue clue) {
|
||||||
|
Clue newClue = clueService.selectClueById(clue.getId());
|
||||||
|
if (newClue == null) {
|
||||||
|
return R.error("分派失败");
|
||||||
|
}
|
||||||
|
clue.setAssignmentStatus("1");
|
||||||
|
clue.setAssignmentTime(new Date());
|
||||||
|
return toAjax(clueService.updateClue(clue));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关闭线索
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:clue:edit")
|
||||||
|
@PostMapping("/closeClue")
|
||||||
|
public R closeClue(@RequestBody Clue clue) {
|
||||||
|
clue.setCustomerStatus("1");
|
||||||
|
return toAjax(clueService.updateClue(clue));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存线索管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:clue:add")
|
||||||
|
@PostMapping("save")
|
||||||
|
public R addSave(@RequestBody Clue clue) {
|
||||||
|
ValidatorUtils.validateEntity(clue);
|
||||||
|
return toAjax(clueService.insertClue(clue));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存线索管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:clue:edit")
|
||||||
|
@PostMapping("update")
|
||||||
|
public R editSave(@RequestBody Clue clue) {
|
||||||
|
return toAjax(clueService.updateClue(clue));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除线索管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:clue:remove")
|
||||||
|
@PostMapping("remove")
|
||||||
|
public R remove(String ids) {
|
||||||
|
return toAjax(clueService.deleteClueByIds(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据条件导出线索报表功能 exportPowerWaterFee
|
||||||
|
*
|
||||||
|
* @param clue
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:clue:view")
|
||||||
|
@GetMapping("/excelClue")
|
||||||
|
public void excelClue(Clue clue) {
|
||||||
|
Context context = new Context();
|
||||||
|
List<Clue> clueList = clueService.selectClueList(clue);
|
||||||
|
|
||||||
|
int i = 1;
|
||||||
|
for (Clue item : clueList) {
|
||||||
|
item.setId(Long.valueOf(i));
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
context.putVar("date", "2031-04-15");
|
||||||
|
context.putVar("clueList", clueList);
|
||||||
|
new ExcelView("excel/招商线索导出模板.xls", "招商线索导出", context);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,84 @@
|
|||||||
|
package com.ics.admin.controller;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.ClueInvestigation;
|
||||||
|
import com.ics.admin.service.IClueInvestigationService;
|
||||||
|
import com.ics.common.core.controller.BaseController;
|
||||||
|
import com.ics.common.core.domain.R;
|
||||||
|
import com.ics.common.utils.ValidatorUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 线索跟进 提供者
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2021-03-23
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/admin/clueInvestigation")
|
||||||
|
public class ClueInvestigationController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IClueInvestigationService clueInvestigationService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询线索跟进
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:investigation:view")
|
||||||
|
@GetMapping("get/{id}")
|
||||||
|
public ClueInvestigation get(@PathVariable("id") Long id) {
|
||||||
|
return clueInvestigationService.selectClueInvestigationById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询线索跟进列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:investigation:list")
|
||||||
|
@GetMapping("list")
|
||||||
|
public R list(ClueInvestigation clueInvestigation) {
|
||||||
|
startPage();
|
||||||
|
return result(clueInvestigationService.selectClueInvestigationList(clueInvestigation));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询我的线索跟进列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:investigation:list")
|
||||||
|
@GetMapping("myList")
|
||||||
|
public R myList(ClueInvestigation clueInvestigation) {
|
||||||
|
startPage();
|
||||||
|
clueInvestigation.setUserId(getCurrentUserId());
|
||||||
|
return result(clueInvestigationService.selectClueInvestigationList(clueInvestigation));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存线索跟进
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:investigation:add")
|
||||||
|
@PostMapping("save")
|
||||||
|
public R addSave(@RequestBody ClueInvestigation clueInvestigation) {
|
||||||
|
ValidatorUtils.validateEntity(clueInvestigation);
|
||||||
|
clueInvestigation.setClueId(clueInvestigation.getId());
|
||||||
|
return toAjax(clueInvestigationService.insertClueInvestigation(clueInvestigation));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存线索跟进
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:investigation:edit")
|
||||||
|
@PostMapping("update")
|
||||||
|
public R editSave(@RequestBody ClueInvestigation clueInvestigation) {
|
||||||
|
return toAjax(clueInvestigationService.updateClueInvestigation(clueInvestigation));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除线索跟进
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:investigation:remove")
|
||||||
|
@PostMapping("remove")
|
||||||
|
public R remove(String ids) {
|
||||||
|
return toAjax(clueInvestigationService.deleteClueInvestigationByIds(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,75 @@
|
|||||||
|
package com.ics.admin.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import com.ics.admin.domain.CustomerAttachments;
|
||||||
|
import com.ics.admin.service.ICustomerAttachmentsService;
|
||||||
|
import com.ics.common.core.controller.BaseController;
|
||||||
|
import com.ics.common.core.domain.R;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户附件 提供者
|
||||||
|
*
|
||||||
|
* @author zzm
|
||||||
|
* @date 2020-10-27
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/admin/attachments")
|
||||||
|
public class CustomerAttachmentsController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ICustomerAttachmentsService customerAttachmentsService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询${tableComment}
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:customer:view")
|
||||||
|
@GetMapping("get/{id}")
|
||||||
|
public CustomerAttachments get(@PathVariable("id") Long id) {
|
||||||
|
return customerAttachmentsService.selectCustomerAttachmentsById(id);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询客户附件列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:customer:view")
|
||||||
|
@GetMapping("list")
|
||||||
|
public R list(CustomerAttachments customerAttachments) {
|
||||||
|
startPage();
|
||||||
|
customerAttachments.setDeleteFlag(0);
|
||||||
|
return result(customerAttachmentsService.selectCustomerAttachmentsList(customerAttachments));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存客户附件
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:customer:add")
|
||||||
|
@PostMapping("save")
|
||||||
|
public R addSave(@RequestBody CustomerAttachments customerAttachments) {
|
||||||
|
return toAjax(customerAttachmentsService.insertCustomerAttachments(customerAttachments));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存客户附件
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:customer:edit")
|
||||||
|
@PostMapping("update")
|
||||||
|
public R editSave(@RequestBody CustomerAttachments customerAttachments) {
|
||||||
|
return toAjax(customerAttachmentsService.updateCustomerAttachments(customerAttachments));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除${tableComment}
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:customer:remove")
|
||||||
|
@PostMapping("remove")
|
||||||
|
public R remove(String ids) {
|
||||||
|
return toAjax(customerAttachmentsService.deleteCustomerAttachmentsByIds(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,79 @@
|
|||||||
|
package com.ics.admin.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import com.ics.admin.domain.CustomerContacts;
|
||||||
|
import com.ics.admin.service.ICustomerContactsService;
|
||||||
|
import com.ics.common.core.controller.BaseController;
|
||||||
|
import com.ics.common.core.domain.R;
|
||||||
|
import com.ics.common.utils.ValidatorUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系人 提供者
|
||||||
|
*
|
||||||
|
* @author zzm
|
||||||
|
* @date 2020-10-26
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("admin/contacts")
|
||||||
|
public class CustomerContactsController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ICustomerContactsService customerContactsService;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询${tableComment}
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:customer:view")
|
||||||
|
@GetMapping("get/{id}")
|
||||||
|
public CustomerContacts get(@PathVariable("id") Long id) {
|
||||||
|
return customerContactsService.selectCustomerContactsById(id);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询联系人列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:customer:list")
|
||||||
|
@GetMapping("list")
|
||||||
|
public R list(CustomerContacts customerContacts) {
|
||||||
|
startPage();
|
||||||
|
customerContacts.setDeleteFlag(0);
|
||||||
|
return result(customerContactsService.selectCustomerContactsList(customerContacts));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存联系人
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:customer:add")
|
||||||
|
@PostMapping("save")
|
||||||
|
public R addSave(@RequestBody CustomerContacts customerContacts) {
|
||||||
|
ValidatorUtils.validateEntity(customerContacts);
|
||||||
|
return toAjax(customerContactsService.insertCustomerContacts(customerContacts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存联系人
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:customer:edit")
|
||||||
|
@PostMapping("update")
|
||||||
|
public R editSave(@RequestBody CustomerContacts customerContacts) {
|
||||||
|
ValidatorUtils.validateEntity(customerContacts);
|
||||||
|
return toAjax(customerContactsService.updateCustomerContacts(customerContacts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除${tableComment}
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:customer:remove")
|
||||||
|
@PostMapping("remove")
|
||||||
|
public R remove(String ids) {
|
||||||
|
return toAjax(customerContactsService.deleteCustomerContactsByIds(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,770 @@
|
|||||||
|
package com.ics.admin.controller;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import com.alibaba.excel.EasyExcel;
|
||||||
|
import com.google.common.collect.Maps;
|
||||||
|
import com.ics.admin.domain.CustomerContract;
|
||||||
|
import com.ics.admin.domain.CustomerContractBill;
|
||||||
|
import com.ics.admin.domain.Room;
|
||||||
|
import com.ics.admin.listener.ImportPowerWaterFeeListener;
|
||||||
|
import com.ics.admin.listener.ImportRentListener;
|
||||||
|
import com.ics.admin.service.ICustomerContractBillService;
|
||||||
|
import com.ics.admin.service.ICustomerContractService;
|
||||||
|
import com.ics.admin.utils.ExcelView;
|
||||||
|
import com.ics.admin.vo.BillFormVO;
|
||||||
|
import com.ics.admin.vo.BillInitQueryFormVO;
|
||||||
|
import com.ics.admin.vo.ImportPowerWaterFeeVO;
|
||||||
|
import com.ics.admin.vo.ImportRentVO;
|
||||||
|
import com.ics.common.core.controller.BaseController;
|
||||||
|
import com.ics.common.core.domain.R;
|
||||||
|
import com.ics.common.enums.PaymentCycle;
|
||||||
|
import com.ics.common.utils.DateUtils;
|
||||||
|
import com.ics.common.utils.GuavaCacheUtil;
|
||||||
|
import com.ics.common.utils.StringUtils;
|
||||||
|
import com.ics.system.service.ICurrentUserService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.compress.utils.Lists;
|
||||||
|
import org.apache.commons.lang3.BooleanUtils;
|
||||||
|
import org.jxls.common.Context;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import java.io.BufferedInputStream;
|
||||||
|
import java.io.FileInputStream;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户合同账单 提供者
|
||||||
|
*
|
||||||
|
* @author zzm
|
||||||
|
* @date 2020-11-26
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("admin/contract/bill")
|
||||||
|
public class CustomerContractBillController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ICustomerContractBillService customerContractBillService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ICurrentUserService currentUserService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ICustomerContractService customerContractService;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* app的密钥值
|
||||||
|
*/
|
||||||
|
@Value("${dfs.path}")
|
||||||
|
private String path;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询客户合同账单
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:bill:view")
|
||||||
|
@GetMapping("get")
|
||||||
|
public CustomerContractBill get(Long billId) {
|
||||||
|
CustomerContractBill customerContractBill = customerContractBillService.selectCustomerContractBillById(billId);
|
||||||
|
return customerContractBill;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 确认客户合同账单查看
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:bill:view")
|
||||||
|
@GetMapping("confirm_detail")
|
||||||
|
public R confirm_detail(Long billId) {
|
||||||
|
CustomerContractBill customerContractBill = customerContractBillService.selectCustomerContractBillById(billId);
|
||||||
|
Map<String, Object> result = Maps.newHashMap();
|
||||||
|
result.put("name", customerContractBill.getName());
|
||||||
|
result.put("billId", customerContractBill.getId());
|
||||||
|
// 应收租金
|
||||||
|
result.put("rent", customerContractBill.getRent());
|
||||||
|
// 已收租金
|
||||||
|
result.put("receiveRent", customerContractBill.getReceiveRent());
|
||||||
|
// 待收租金
|
||||||
|
result.put("waitRent", customerContractBill.getRent().subtract(customerContractBill.getReceiveRent()));
|
||||||
|
// 应收物业管理费
|
||||||
|
result.put("managementTotalFee", customerContractBill.getManagementTotalFee());
|
||||||
|
// 已收物业管理费
|
||||||
|
result.put("receiveManagementTotalFee", customerContractBill.getReceiveManagementTotalFee());
|
||||||
|
// 待收物业管理费
|
||||||
|
result.put("waitManagementTotalFee", customerContractBill.getManagementTotalFee().subtract(customerContractBill.getReceiveManagementTotalFee()));
|
||||||
|
// 应收电费
|
||||||
|
result.put("powerFee", customerContractBill.getPowerFee());
|
||||||
|
// 已收电费
|
||||||
|
result.put("receivePowerFee", customerContractBill.getReceivePowerFee());
|
||||||
|
// 待收电费
|
||||||
|
result.put("waitPowerFee", customerContractBill.getPowerFee().subtract(customerContractBill.getReceivePowerFee()));
|
||||||
|
// 应收水费
|
||||||
|
result.put("waterFee", customerContractBill.getWaterFee());
|
||||||
|
// 已收水费
|
||||||
|
result.put("receiveWaterFee", customerContractBill.getReceiveWaterFee());
|
||||||
|
// 待收水费
|
||||||
|
result.put("waitWaterFee", customerContractBill.getWaterFee().subtract(customerContractBill.getReceiveWaterFee()));
|
||||||
|
// 应收押金
|
||||||
|
result.put("deposit", customerContractBill.getDeposit());
|
||||||
|
|
||||||
|
// 应收其他费用
|
||||||
|
result.put("otherFee", customerContractBill.getOtherFee());
|
||||||
|
|
||||||
|
// 已收其他费用
|
||||||
|
result.put("receiveOtherFee", customerContractBill.getReceiveOtherFee());
|
||||||
|
|
||||||
|
|
||||||
|
// 应退费用
|
||||||
|
result.put("refundFee", customerContractBill.getRefundFee());
|
||||||
|
// 合计应收
|
||||||
|
result.put("totalFee", getTotalFee(customerContractBill));
|
||||||
|
// 备注
|
||||||
|
result.put("remark", customerContractBill.getRemark());
|
||||||
|
|
||||||
|
return R.ok(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应收总金额
|
||||||
|
*/
|
||||||
|
private BigDecimal getTotalFee(CustomerContractBill customerContractBill) {
|
||||||
|
return customerContractBill.getRent()
|
||||||
|
.add(customerContractBill.getManagementTotalFee())
|
||||||
|
.add(customerContractBill.getPowerFee())
|
||||||
|
.add(customerContractBill.getWaterFee())
|
||||||
|
.add(customerContractBill.getDeposit())
|
||||||
|
.add(customerContractBill.getOtherFee())
|
||||||
|
.add(customerContractBill.getRefundFee());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询客户合同账单列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:bill:list")
|
||||||
|
@PostMapping("list")
|
||||||
|
public R list(@RequestBody CustomerContractBill customerContractBill) {
|
||||||
|
startPage();
|
||||||
|
if (customerContractBill == null) {
|
||||||
|
customerContractBill = new CustomerContractBill();
|
||||||
|
customerContractBill.setType(CustomerContract.Type.OFFICIAL);
|
||||||
|
}
|
||||||
|
|
||||||
|
List<CustomerContractBill> customerContractBills = customerContractBillService.selectCustomerContractBillList(customerContractBill);
|
||||||
|
|
||||||
|
for (CustomerContractBill item : customerContractBills) {
|
||||||
|
// 是否逾期
|
||||||
|
setIsOverdue(item);
|
||||||
|
item.setTotalBill(getTotalFee(item));
|
||||||
|
item.setReceiveTotalBill(getReceiveTotalFee(item));
|
||||||
|
item.setWaitPay(item.getTotalBill().subtract(item.getReceiveTotalBill()));
|
||||||
|
}
|
||||||
|
return result(customerContractBills);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存客户合同账单
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:bill:add")
|
||||||
|
@PostMapping("save")
|
||||||
|
public R addSave(@Valid @RequestBody BillFormVO BillFormVO) {
|
||||||
|
BillFormVO.setCreateBy(getLoginName());
|
||||||
|
return toAjax(customerContractBillService.insertCustomerContractBill(BillFormVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存客户合同账单
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:bill:add")
|
||||||
|
@PostMapping("batchSave")
|
||||||
|
public R batchSave(@RequestBody BillFormVO billFormVO) {
|
||||||
|
billFormVO.setCreateBy(getLoginName());
|
||||||
|
return toAjax(customerContractBillService.batchInsertCustomerContractBill(billFormVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存客户合同账单
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:bill:edit")
|
||||||
|
@PostMapping("update")
|
||||||
|
public R editSave(@RequestBody CustomerContractBill customerContractBill) {
|
||||||
|
customerContractBill.setUpdateBy(getLoginName());
|
||||||
|
return toAjax(customerContractBillService.updateCustomerContractBill(customerContractBill));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 确认收到租金
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:bill:edit")
|
||||||
|
@PostMapping("confirm_receive_amount")
|
||||||
|
public R confirm_receive_amount(Long billId, BigDecimal receiveRent, BigDecimal receiveManagementTotalFee, BigDecimal receivePowerFee, BigDecimal receiveWaterFee, String remark) {
|
||||||
|
CustomerContractBill customerContractBill = customerContractBillService.selectCustomerContractBillById(billId);
|
||||||
|
if (receiveRent == null) {
|
||||||
|
return R.error("收到租金不能为空!");
|
||||||
|
}
|
||||||
|
if (receiveManagementTotalFee == null) {
|
||||||
|
return R.error("收到物业管理费不能为空!");
|
||||||
|
}
|
||||||
|
if (customerContractBill == null) {
|
||||||
|
return R.error("账单不存在!");
|
||||||
|
}
|
||||||
|
customerContractBill.setReceiveRent(customerContractBill.getReceiveRent().add(receiveRent));
|
||||||
|
customerContractBill.setReceiveManagementTotalFee(customerContractBill.getReceiveManagementTotalFee().add(receiveManagementTotalFee));
|
||||||
|
customerContractBill.setReceivePowerFee(customerContractBill.getReceivePowerFee().add(receivePowerFee == null ? BigDecimal.ZERO : receivePowerFee));
|
||||||
|
customerContractBill.setReceiveWaterFee(customerContractBill.getWaterFee().add(receiveWaterFee == null ? BigDecimal.ZERO : receiveWaterFee));
|
||||||
|
customerContractBill.setRemark(remark);
|
||||||
|
customerContractBill.setUpdateBy(getLoginName());
|
||||||
|
BigDecimal receiveTotalFee = getReceiveTotalFee(customerContractBill);
|
||||||
|
if (receiveTotalFee.equals(BigDecimal.ZERO)) {
|
||||||
|
customerContractBill.setStatus(CustomerContractBill.Status.UNRECEIVED);
|
||||||
|
} else if (receiveTotalFee.compareTo(getTotalFee(customerContractBill)) == -1) {
|
||||||
|
customerContractBill.setStatus(CustomerContractBill.Status.PART);
|
||||||
|
} else {
|
||||||
|
customerContractBill.setStatus(CustomerContractBill.Status.RECEIVED);
|
||||||
|
}
|
||||||
|
return toAjax(customerContractBillService.updateCustomerContractBill(customerContractBill));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 确认收到其他费用
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:bill:edit")
|
||||||
|
@PostMapping("confirm_receive_other_amount")
|
||||||
|
public R confirm_receive_other_amount(Long billId, BigDecimal otherFee, BigDecimal receiveOtherFee, String remark) {
|
||||||
|
if (receiveOtherFee == null) {
|
||||||
|
return R.error("收到金额不能为空!");
|
||||||
|
}
|
||||||
|
CustomerContractBill customerContractBill = customerContractBillService.selectCustomerContractBillById(billId);
|
||||||
|
if (customerContractBill == null) {
|
||||||
|
return R.error("账单不存在!");
|
||||||
|
}
|
||||||
|
customerContractBill.setReceiveOtherFee(receiveOtherFee.add(customerContractBill.getReceiveOtherFee()));
|
||||||
|
customerContractBill.setRemark(remark);
|
||||||
|
customerContractBill.setUpdateBy(getLoginName());
|
||||||
|
BigDecimal waitPay = otherFee.subtract(customerContractBill.getReceiveOtherFee());
|
||||||
|
if (waitPay.equals(BigDecimal.ZERO)) {
|
||||||
|
customerContractBill.setStatus(CustomerContractBill.Status.UNRECEIVED);
|
||||||
|
} else if (receiveOtherFee.compareTo(waitPay) == -1) {
|
||||||
|
customerContractBill.setStatus(CustomerContractBill.Status.PART);
|
||||||
|
} else if(receiveOtherFee.equals(waitPay)){
|
||||||
|
customerContractBill.setStatus(CustomerContractBill.Status.RECEIVED);
|
||||||
|
}
|
||||||
|
return toAjax(customerContractBillService.updateCustomerContractBill(customerContractBill));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已收金额
|
||||||
|
*/
|
||||||
|
private BigDecimal getReceiveTotalFee(CustomerContractBill customerContractBill) {
|
||||||
|
// 已收租金含押金
|
||||||
|
return customerContractBill.getReceiveRent()
|
||||||
|
.add(customerContractBill.getReceiveManagementTotalFee())
|
||||||
|
.add(customerContractBill.getReceivePowerFee()
|
||||||
|
.add(customerContractBill.getReceiveWaterFee())
|
||||||
|
.add(customerContractBill.getReceiveOtherFee())
|
||||||
|
.add(customerContractBill.getRefundFee()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量确认收到租金
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:bill:edit")
|
||||||
|
@PostMapping("batch_confirm_receive_amount")
|
||||||
|
public R batch_confirm_receive_amount(String billIds) {
|
||||||
|
if (StringUtils.isEmpty(billIds)) {
|
||||||
|
return R.error("请选择行!");
|
||||||
|
}
|
||||||
|
return toAjax(customerContractBillService.batchConfirmReceiveAmount(billIds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量取消确认收到租金
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:bill:edit")
|
||||||
|
@PostMapping("batch_cancel_receive_amount")
|
||||||
|
public R batch_cancel_receive_amount(String billIds) {
|
||||||
|
return toAjax(customerContractBillService.batchCancelReceiveAmount(billIds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 取消确认
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:bill:edit")
|
||||||
|
@PostMapping("cancelConfirm")
|
||||||
|
public R cancelConfirm(Long billId) {
|
||||||
|
CustomerContractBill customerContractBill = customerContractBillService.selectCustomerContractBillById(billId);
|
||||||
|
if (customerContractBill == null) {
|
||||||
|
return R.error("账单不存在!");
|
||||||
|
}
|
||||||
|
customerContractBill.setRemark("--");
|
||||||
|
customerContractBill.setReceiveRent(BigDecimal.ZERO);
|
||||||
|
customerContractBill.setReceiveManagementTotalFee(BigDecimal.ZERO);
|
||||||
|
customerContractBill.setReceivePowerFee(BigDecimal.ZERO);
|
||||||
|
customerContractBill.setReceiveWaterFee(BigDecimal.ZERO);
|
||||||
|
customerContractBill.setUpdateBy(getLoginName());
|
||||||
|
customerContractBill.setStatus(CustomerContractBill.Status.UNRECEIVED);
|
||||||
|
return toAjax(customerContractBillService.updateCustomerContractBill(customerContractBill));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除客户合同账单
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:bill:remove")
|
||||||
|
@PostMapping("remove")
|
||||||
|
public R remove(String ids) {
|
||||||
|
return toAjax(customerContractBillService.deleteCustomerContractBillByIds(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param deposit 押金
|
||||||
|
* @param rentIncreaseMonth 月租金
|
||||||
|
* @param rentIncreaseDay 日租金
|
||||||
|
* @param receiveRentDay 收租固定日
|
||||||
|
* @param startDate 合同开始时间
|
||||||
|
* @param endDate 合同结束时间
|
||||||
|
* @param updateDate 调整账单时间
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:bill:edit")
|
||||||
|
@GetMapping("init_bill")
|
||||||
|
public R init_bill(BigDecimal deposit, BigDecimal rentIncreaseMonth, BigDecimal rentIncreaseDay, Integer receiveRentDay,
|
||||||
|
BigDecimal managementFeeIncreaseMonth, BigDecimal managementFeeIncreaseDay, Integer paymentPeriod,
|
||||||
|
Date startDate, Date endDate, Date updateDate) {
|
||||||
|
//paymentPeriod = PaymentCycle.YEAR.getValue();
|
||||||
|
// 分段账单
|
||||||
|
List<Map> times = Lists.newArrayList();
|
||||||
|
if (updateDate == null) {
|
||||||
|
// 按合同开始时间和结束时间划分每个月的账单日期
|
||||||
|
DateUtils.getDateBetween(startDate, endDate, times, paymentPeriod);
|
||||||
|
} else {
|
||||||
|
// 编辑账单日期
|
||||||
|
DateUtils.getDateBetween(startDate, updateDate, times, paymentPeriod);
|
||||||
|
Calendar calendar = Calendar.getInstance();
|
||||||
|
calendar.setTime(updateDate);
|
||||||
|
calendar.add(Calendar.DATE, 1);
|
||||||
|
DateUtils.getDateBetween(calendar.getTime(), endDate, times, paymentPeriod);
|
||||||
|
}
|
||||||
|
|
||||||
|
return R.data(create_bill(deposit, rentIncreaseMonth, rentIncreaseDay, managementFeeIncreaseMonth, managementFeeIncreaseDay, receiveRentDay, times, endDate, paymentPeriod));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@RequiresPermissions("admin:bill:edit")
|
||||||
|
@PostMapping("init_new_bill")
|
||||||
|
public R init_new_bill(@Valid BillInitQueryFormVO billInitQueryFormVO) {
|
||||||
|
CustomerContract customerContract = customerContractService.selectCustomerContractById(billInitQueryFormVO.getContractId());
|
||||||
|
// 分段账单
|
||||||
|
List<Map> times = Lists.newArrayList();
|
||||||
|
DateUtils.getDateBetween(billInitQueryFormVO.getBillStartDate(), billInitQueryFormVO.getBillEndDate(), times, billInitQueryFormVO.getPaymentCycle().getValue());
|
||||||
|
|
||||||
|
return R.data(create_new_bill(customerContract, times, billInitQueryFormVO.getPaymentCycle()));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化创建账单
|
||||||
|
*
|
||||||
|
* @param times
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private List<CustomerContractBill> create_bill(BigDecimal deposit, BigDecimal rentIncreaseMonth, BigDecimal rentIncreaseDay,
|
||||||
|
BigDecimal managementFeeIncreaseMonth, BigDecimal managementFeeIncreaseDay,
|
||||||
|
Integer receiveRentDay, List<Map> times, Date overDate, Integer paymentPeriod) {
|
||||||
|
List<CustomerContractBill> customerContractBills = Lists.newArrayList();
|
||||||
|
for (Map<String, Object> item : times) {
|
||||||
|
Date startDate = DateUtils.parseDate(item.get("startDate").toString());
|
||||||
|
Date endDate = DateUtils.parseDate(item.get("endDate").toString());
|
||||||
|
if (startDate.getTime() <= endDate.getTime()) {
|
||||||
|
CustomerContractBill customerContractBill = new CustomerContractBill();
|
||||||
|
if ((Boolean) item.get("isDeposit")) {
|
||||||
|
customerContractBill.setDeposit(deposit);
|
||||||
|
}
|
||||||
|
customerContractBill.setBillStartDate(startDate);
|
||||||
|
customerContractBill.setBillEndDate(endDate);
|
||||||
|
customerContractBill.setBillDate(item.get("startDate").toString() + " ~ " + item.get("endDate").toString());
|
||||||
|
// 获取账单的上个月20号作为账单收款日
|
||||||
|
Calendar calendar = Calendar.getInstance();
|
||||||
|
calendar.setTime(DateUtils.parseDate(item.get("startDate")));
|
||||||
|
customerContractBill.setReceiveRentDate(DateUtils.parseDate(calendar.get(Calendar.YEAR) + "-" + calendar.get(Calendar.MONTH) + "-"
|
||||||
|
+ (null == receiveRentDay ? 20 : receiveRentDay)));
|
||||||
|
if ("M".equals(item.get("type").toString())) {
|
||||||
|
if (paymentPeriod != null) {
|
||||||
|
if (paymentPeriod.equals(PaymentCycle.YEAR.getValue())) {
|
||||||
|
customerContractBill.setRent(rentIncreaseMonth.multiply(BigDecimal.valueOf(12)));
|
||||||
|
customerContractBill.setManagementTotalFee(managementFeeIncreaseMonth.multiply(BigDecimal.valueOf(12)));
|
||||||
|
} else if (paymentPeriod.equals(PaymentCycle.MONTH.getValue())) {
|
||||||
|
customerContractBill.setRent(rentIncreaseMonth);
|
||||||
|
customerContractBill.setManagementTotalFee(managementFeeIncreaseMonth);
|
||||||
|
} else if (paymentPeriod.equals(PaymentCycle.HALF_YEAR.getValue())) {
|
||||||
|
customerContractBill.setRent(rentIncreaseMonth.multiply(BigDecimal.valueOf(6)));
|
||||||
|
customerContractBill.setManagementTotalFee(managementFeeIncreaseMonth.multiply(BigDecimal.valueOf(6)));
|
||||||
|
} else if (paymentPeriod.equals(PaymentCycle.SEASON.getValue())) {
|
||||||
|
customerContractBill.setRent(rentIncreaseMonth.multiply(BigDecimal.valueOf(3)));
|
||||||
|
customerContractBill.setManagementTotalFee(managementFeeIncreaseMonth.multiply(BigDecimal.valueOf(3)));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 默认月付
|
||||||
|
customerContractBill.setRent(rentIncreaseMonth);
|
||||||
|
customerContractBill.setManagementTotalFee(managementFeeIncreaseMonth);
|
||||||
|
}
|
||||||
|
} else if ("D".equals(item.get("type").toString())) {
|
||||||
|
// 如果最后租期不满一个月则按日统计租金
|
||||||
|
Calendar calendarStart = Calendar.getInstance();
|
||||||
|
calendarStart.setTime(DateUtils.parseDate(item.get("startDate")));
|
||||||
|
Calendar calendarEnd = Calendar.getInstance();
|
||||||
|
calendarEnd.setTime(DateUtils.parseDate(item.get("endDate")));
|
||||||
|
long day = (calendarEnd.getTimeInMillis() - calendarStart.getTimeInMillis()) / (1000 * 3600 * 24);
|
||||||
|
// 不足一天按一天计算
|
||||||
|
customerContractBill.setRent(rentIncreaseDay.multiply(BigDecimal.valueOf(day + 1)));
|
||||||
|
customerContractBill.setManagementTotalFee(managementFeeIncreaseDay.multiply(BigDecimal.valueOf(day + 1)));
|
||||||
|
}
|
||||||
|
//默认未收
|
||||||
|
customerContractBill.setStatus(CustomerContractBill.Status.UNRECEIVED);
|
||||||
|
customerContractBills.add(customerContractBill);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return customerContractBills;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化创建新账单
|
||||||
|
*
|
||||||
|
* @param times
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private List<CustomerContractBill> create_new_bill(CustomerContract customerContract, List<Map> times, PaymentCycle paymentCycle) {
|
||||||
|
List<CustomerContractBill> customerContractBills = Lists.newArrayList();
|
||||||
|
for (Map<String, Object> item : times) {
|
||||||
|
Date startDate = DateUtils.parseDate(item.get("startDate").toString());
|
||||||
|
Date endDate = DateUtils.parseDate(item.get("endDate").toString());
|
||||||
|
if (startDate.getTime() <= endDate.getTime()) {
|
||||||
|
CustomerContractBill customerContractBill = new CustomerContractBill();
|
||||||
|
if ((Boolean) item.get("isDeposit")) {
|
||||||
|
customerContractBill.setDeposit(customerContract.getDeposit());
|
||||||
|
}
|
||||||
|
customerContractBill.setBillStartDate(startDate);
|
||||||
|
customerContractBill.setBillEndDate(endDate);
|
||||||
|
customerContractBill.setBillDate(item.get("startDate").toString() + " ~ " + item.get("endDate").toString());
|
||||||
|
// 获取账单的上个月20号作为账单收款日
|
||||||
|
Calendar calendar = Calendar.getInstance();
|
||||||
|
calendar.setTime(DateUtils.parseDate(item.get("startDate")));
|
||||||
|
customerContractBill.setReceiveRentDate(DateUtils.parseDate(calendar.get(Calendar.YEAR) + "-" + calendar.get(Calendar.MONTH) + "-"
|
||||||
|
+ (null == customerContract.getReceiveRentDay() ? 20 : customerContract.getReceiveRentDay())));
|
||||||
|
if ("M".equals(item.get("type").toString())) {
|
||||||
|
if(paymentCycle != null){
|
||||||
|
if (paymentCycle.equals(PaymentCycle.YEAR)) {
|
||||||
|
customerContractBill.setRent(customerContract.getRentIncreaseMonth().multiply(BigDecimal.valueOf(12)));
|
||||||
|
customerContractBill.setManagementTotalFee(customerContract.getManagementFeeIncreaseMonth().multiply(BigDecimal.valueOf(12)));
|
||||||
|
}
|
||||||
|
else if(paymentCycle.equals(PaymentCycle.MONTH)){
|
||||||
|
customerContractBill.setRent(customerContract.getRentIncreaseMonth());
|
||||||
|
customerContractBill.setManagementTotalFee(customerContract.getManagementFeeIncreaseMonth());
|
||||||
|
}
|
||||||
|
else if(paymentCycle.equals(PaymentCycle.HALF_YEAR)){
|
||||||
|
customerContractBill.setRent(customerContract.getRentIncreaseMonth().multiply(BigDecimal.valueOf(6)));
|
||||||
|
customerContractBill.setManagementTotalFee(customerContract.getManagementFeeIncreaseMonth().multiply(BigDecimal.valueOf(6)));
|
||||||
|
}
|
||||||
|
else if(paymentCycle.equals(PaymentCycle.SEASON)){
|
||||||
|
customerContractBill.setRent(customerContract.getRentIncreaseMonth().multiply(BigDecimal.valueOf(3)));
|
||||||
|
customerContractBill.setManagementTotalFee(customerContract.getManagementFeeIncreaseMonth().multiply(BigDecimal.valueOf(3)));
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
// 默认月付
|
||||||
|
customerContractBill.setRent(customerContract.getRentIncreaseMonth());
|
||||||
|
customerContractBill.setManagementTotalFee(customerContract.getManagementFeeIncreaseMonth());
|
||||||
|
}
|
||||||
|
} else if ("D".equals(item.get("type").toString())) {
|
||||||
|
// 如果最后租期不满一个月则按日统计租金
|
||||||
|
Calendar calendarStart = Calendar.getInstance();
|
||||||
|
calendarStart.setTime(DateUtils.parseDate(item.get("startDate")));
|
||||||
|
Calendar calendarEnd = Calendar.getInstance();
|
||||||
|
calendarEnd.setTime(DateUtils.parseDate(item.get("endDate")));
|
||||||
|
long day = (calendarEnd.getTimeInMillis() - calendarStart.getTimeInMillis()) / (1000 * 3600 * 24);
|
||||||
|
// 不足一天按一天计算
|
||||||
|
customerContractBill.setRent(customerContract.getRentIncreaseDay().multiply(BigDecimal.valueOf(day + 1)));
|
||||||
|
customerContractBill.setManagementTotalFee(customerContract.getManagementFeeIncreaseDay().multiply(BigDecimal.valueOf(day + 1)));
|
||||||
|
}
|
||||||
|
//默认未收
|
||||||
|
customerContractBill.setStatus(CustomerContractBill.Status.UNRECEIVED);
|
||||||
|
customerContractBills.add(customerContractBill);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return customerContractBills;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据月份导出账单报表功能
|
||||||
|
*
|
||||||
|
* @param customerContractBill
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:bill:view")
|
||||||
|
@GetMapping("/export")
|
||||||
|
public void export(CustomerContractBill customerContractBill) {
|
||||||
|
Context context = new Context();
|
||||||
|
List<CustomerContractBill> customerContractBills = customerContractBillService.selectCustomerContractBillExcelList(customerContractBill);
|
||||||
|
int i = 1;
|
||||||
|
for (CustomerContractBill item : customerContractBills) {
|
||||||
|
item.setId(Long.valueOf(i));
|
||||||
|
// 是否逾期
|
||||||
|
setIsOverdue(item);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
// 合计
|
||||||
|
CustomerContractBill customerContractBillVOTotal = new CustomerContractBill();
|
||||||
|
customerContractBillVOTotal.setName("合计(单位:元)");
|
||||||
|
List<Room> totalRooms = Lists.newArrayList();
|
||||||
|
Room room = new Room();
|
||||||
|
BigDecimal totalRentArea = BigDecimal.ZERO;
|
||||||
|
BigDecimal totalArea = BigDecimal.ZERO;
|
||||||
|
BigDecimal totalCommonArea = BigDecimal.ZERO;
|
||||||
|
BigDecimal totalRent = BigDecimal.ZERO;
|
||||||
|
BigDecimal receiveTotalRent = BigDecimal.ZERO;
|
||||||
|
BigDecimal totalPowerFee = BigDecimal.ZERO;
|
||||||
|
BigDecimal receiveTotalPowerFee = BigDecimal.ZERO;
|
||||||
|
BigDecimal totalWaterFee = BigDecimal.ZERO;
|
||||||
|
BigDecimal receiveTotalWaterFee = BigDecimal.ZERO;
|
||||||
|
BigDecimal totalOtherFee = BigDecimal.ZERO;
|
||||||
|
BigDecimal totalRefundFee = BigDecimal.ZERO;
|
||||||
|
BigDecimal totalManagementFee = BigDecimal.ZERO;
|
||||||
|
BigDecimal receiveTotalManagementFee = BigDecimal.ZERO;
|
||||||
|
BigDecimal allTotalFee = BigDecimal.ZERO;
|
||||||
|
BigDecimal allTotalWaitPay = BigDecimal.ZERO;
|
||||||
|
BigDecimal allReceiveTotalFee = BigDecimal.ZERO;
|
||||||
|
|
||||||
|
customerContractBillVOTotal.setRooms(totalRooms);
|
||||||
|
if (CollectionUtil.isNotEmpty(customerContractBills)) {
|
||||||
|
for (CustomerContractBill item : customerContractBills) {
|
||||||
|
item.setName(item.getCustomerContract().getSn());
|
||||||
|
item.setInvoiceType("0".equals(item.getInvoiceType()) ? "普通发票" : "专用发票");
|
||||||
|
|
||||||
|
item.setTotalBill(getTotalFee(item));
|
||||||
|
item.setReceiveTotalBill(getReceiveTotalFee(item));
|
||||||
|
item.setWaitPay(item.getTotalBill().subtract(item.getReceiveTotalBill()));
|
||||||
|
|
||||||
|
item.setTotalRentMonth(DateUtils.getDifMonth(item.getCustomerContract().getStartDate(), item.getCustomerContract().getEndDate()));
|
||||||
|
item.setRentDate(DateUtils.dateTime(item.getCustomerContract().getStartDate()) + " - " + DateUtils.dateTime(item.getCustomerContract().getEndDate()));
|
||||||
|
for (Room r : item.getRooms()) {
|
||||||
|
totalRentArea = totalRentArea.add(r.getRentArea() == null ? BigDecimal.ZERO : r.getRentArea());
|
||||||
|
totalArea = totalArea.add(r.getArea() == null ? BigDecimal.ZERO : r.getArea());
|
||||||
|
totalCommonArea = totalCommonArea.add(r.getCommonArea() == null ? BigDecimal.ZERO : r.getCommonArea());
|
||||||
|
}
|
||||||
|
totalRent = totalRent.add(item.getRent());
|
||||||
|
receiveTotalRent = receiveTotalRent.add(item.getReceiveRent());
|
||||||
|
totalPowerFee = totalPowerFee.add(item.getPowerFee());
|
||||||
|
receiveTotalPowerFee = receiveTotalPowerFee.add(item.getReceivePowerFee());
|
||||||
|
totalWaterFee = totalWaterFee.add(item.getWaterFee());
|
||||||
|
receiveTotalWaterFee = receiveTotalWaterFee.add(item.getReceiveWaterFee());
|
||||||
|
totalOtherFee = totalOtherFee.add(item.getOtherFee());
|
||||||
|
totalRefundFee = totalRefundFee.add(item.getRefundFee());
|
||||||
|
totalManagementFee = totalManagementFee.add(item.getManagementTotalFee());
|
||||||
|
receiveTotalManagementFee = receiveTotalManagementFee.add(item.getReceiveManagementTotalFee());
|
||||||
|
allTotalWaitPay = allTotalWaitPay.add(item.getWaitPay());
|
||||||
|
allTotalFee = allTotalFee.add(item.getTotalBill());
|
||||||
|
allReceiveTotalFee = allReceiveTotalFee.add(item.getReceiveTotalBill());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
room.setRentArea(totalRentArea);
|
||||||
|
room.setArea(totalArea);
|
||||||
|
room.setCommonArea(totalCommonArea);
|
||||||
|
totalRooms.add(room);
|
||||||
|
customerContractBillVOTotal.setRent(totalRent);
|
||||||
|
customerContractBillVOTotal.setReceiveRent(receiveTotalRent);
|
||||||
|
customerContractBillVOTotal.setPowerFee(totalPowerFee);
|
||||||
|
customerContractBillVOTotal.setReceivePowerFee(receiveTotalPowerFee);
|
||||||
|
customerContractBillVOTotal.setWaterFee(totalWaterFee);
|
||||||
|
customerContractBillVOTotal.setReceiveWaterFee(receiveTotalWaterFee);
|
||||||
|
customerContractBillVOTotal.setOtherFee(totalOtherFee);
|
||||||
|
customerContractBillVOTotal.setRefundFee(totalRefundFee);
|
||||||
|
customerContractBillVOTotal.setTotalBill(allTotalFee);
|
||||||
|
customerContractBillVOTotal.setManagementTotalFee(totalManagementFee);
|
||||||
|
customerContractBillVOTotal.setReceiveManagementTotalFee(receiveTotalManagementFee);
|
||||||
|
customerContractBillVOTotal.setWaitPay(allTotalWaitPay);
|
||||||
|
customerContractBillVOTotal.setReceiveTotalBill(allReceiveTotalFee);
|
||||||
|
customerContractBillVOTotal.setRooms(totalRooms);
|
||||||
|
customerContractBills.add(customerContractBillVOTotal);
|
||||||
|
context.putVar("customerContractBills", customerContractBills);
|
||||||
|
if (StringUtils.isNotEmpty(customerContractBill.getQueryMonth())) {
|
||||||
|
context.putVar("date", DateUtils.parseDateToStr("yyyy年MM月", DateUtils.parseDate(customerContractBill.getQueryMonth())));
|
||||||
|
}
|
||||||
|
new ExcelView("excel/租金报表模版.xls", DateUtils.getNowDate() + "租金报表", context);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据月份下载租金模版功能
|
||||||
|
*
|
||||||
|
* @param customerContractBill
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:bill:view")
|
||||||
|
@GetMapping("/export_rent")
|
||||||
|
public void export_rent(CustomerContractBill customerContractBill) {
|
||||||
|
Context context = new Context();
|
||||||
|
List<CustomerContractBill> customerContractBills = customerContractBillService.selectCustomerContractBillExcelList(customerContractBill);
|
||||||
|
int i = 1;
|
||||||
|
for (CustomerContractBill item : customerContractBills) {
|
||||||
|
item.setId(Long.valueOf(i));
|
||||||
|
// 是否逾期
|
||||||
|
setIsOverdue(item);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
if (CollectionUtil.isNotEmpty(customerContractBills)) {
|
||||||
|
for (CustomerContractBill item : customerContractBills) {
|
||||||
|
item.setName(item.getCustomerContract().getSn());
|
||||||
|
item.setInvoiceType("0".equals(item.getInvoiceType()) ? "普通发票" : "专用发票");
|
||||||
|
item.setTotalRentMonth(DateUtils.getDifMonth(item.getCustomerContract().getStartDate(), item.getCustomerContract().getEndDate()));
|
||||||
|
item.setRentDate(DateUtils.dateTime(item.getCustomerContract().getStartDate()) + " - " + DateUtils.dateTime(item.getCustomerContract().getEndDate()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
context.putVar("customerContractBills", customerContractBills);
|
||||||
|
if (StringUtils.isNotEmpty(customerContractBill.getQueryMonth())) {
|
||||||
|
context.putVar("date", DateUtils.parseDateToStr("yyyy年MM月", DateUtils.parseDate(customerContractBill.getQueryMonth())));
|
||||||
|
}
|
||||||
|
new ExcelView("excel/租金导入模版.xls", DateUtils.getNowDate() + "租金导入模版", context);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据月份导出账单水电报表功能 exportPowerWaterFee
|
||||||
|
*
|
||||||
|
* @param customerContractBill
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:bill:view")
|
||||||
|
@GetMapping("/exportPowerWaterFee")
|
||||||
|
public void exportPowerWaterFee(CustomerContractBill customerContractBill) {
|
||||||
|
Context context = new Context();
|
||||||
|
List<CustomerContractBill> customerContractBills = customerContractBillService.selectCustomerContractBillExcelList(customerContractBill);
|
||||||
|
|
||||||
|
int i = 1;
|
||||||
|
for (CustomerContractBill item : customerContractBills) {
|
||||||
|
item.setId(Long.valueOf(i));
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
if (CollectionUtil.isNotEmpty(customerContractBills)) {
|
||||||
|
for (CustomerContractBill item : customerContractBills) {
|
||||||
|
item.setRentDate(DateUtils.dateTime(item.getCustomerContract().getStartDate()) + " - " + DateUtils.dateTime(item.getCustomerContract().getEndDate()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
context.putVar("customerContractBills", customerContractBills);
|
||||||
|
if (StringUtils.isNotEmpty(customerContractBill.getQueryMonth())) {
|
||||||
|
context.putVar("date", DateUtils.parseDateToStr("yyyy年MM月", DateUtils.parseDate(customerContractBill.getQueryMonth())));
|
||||||
|
}
|
||||||
|
new ExcelView("excel/水电费导入模版.xls", DateUtils.getNowDate() + "水电费导入表格", context);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入水电费
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:bill:edit")
|
||||||
|
@PostMapping("/importPowerWaterFee")
|
||||||
|
public R importPowerWaterFee(String filePath) {
|
||||||
|
if (StringUtils.isEmpty(filePath)) {
|
||||||
|
return R.error("导入数据为空!");
|
||||||
|
}
|
||||||
|
// 用户名+园区ID+时间戳+模块名字
|
||||||
|
String cacheKey = getLoginName() + "_" + currentUserService.getCurrentUser().getTenantId() + "_" + DateUtils.getNowDate().getTime() + "_" + "ImportPowerWaterFee";
|
||||||
|
|
||||||
|
BufferedInputStream bufferedInputStream = getBufferedInputStream(filePath);
|
||||||
|
|
||||||
|
EasyExcel.read(bufferedInputStream, ImportPowerWaterFeeVO.class, new ImportPowerWaterFeeListener(cacheKey)).sheet().headRowNumber(3).doRead();
|
||||||
|
|
||||||
|
List<ImportPowerWaterFeeVO> importPowerWaterFeeVOS = (List<ImportPowerWaterFeeVO>) GuavaCacheUtil.get(cacheKey);
|
||||||
|
// 移除key
|
||||||
|
GuavaCacheUtil.remove(cacheKey);
|
||||||
|
|
||||||
|
for (ImportPowerWaterFeeVO item : importPowerWaterFeeVOS) {
|
||||||
|
customerContractBillService.updatePowerWaterFeeByBillSn(item.getSn(), item.getContractSn(), item.getPowerFee(), item.getWaterFee(), getLoginName());
|
||||||
|
}
|
||||||
|
return R.ok("导入成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入租金
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:bill:edit")
|
||||||
|
@PostMapping("/import_rent")
|
||||||
|
public R import_rent(String filePath) {
|
||||||
|
if (StringUtils.isEmpty(filePath)) {
|
||||||
|
return R.error("导入数据为空!");
|
||||||
|
}
|
||||||
|
// 用户名+园区ID+时间戳+模块名字
|
||||||
|
String cacheKey = getLoginName() + "_" + currentUserService.getCurrentUser().getTenantId() + "_" + DateUtils.getNowDate().getTime() + "_" + "ImportRent";
|
||||||
|
|
||||||
|
BufferedInputStream bufferedInputStream = getBufferedInputStream(filePath);
|
||||||
|
|
||||||
|
EasyExcel.read(bufferedInputStream, ImportRentVO.class, new ImportRentListener(cacheKey)).sheet().headRowNumber(3).doRead();
|
||||||
|
|
||||||
|
List<ImportRentVO> importRentVOS = (List<ImportRentVO>) GuavaCacheUtil.get(cacheKey);
|
||||||
|
// 移除key
|
||||||
|
GuavaCacheUtil.remove(cacheKey);
|
||||||
|
|
||||||
|
for (ImportRentVO item : importRentVOS) {
|
||||||
|
CustomerContractBill customerContractBill = customerContractBillService.findBySn(item.getSn());
|
||||||
|
if (customerContractBill == null) {
|
||||||
|
return R.error("账单号:" + item.getSn() + " - 不存在!");
|
||||||
|
}
|
||||||
|
BigDecimal receiveTotalFee = getReceiveTotalFee(customerContractBill);
|
||||||
|
if (receiveTotalFee.compareTo(BigDecimal.ZERO) == 0) {
|
||||||
|
customerContractBill.setStatus(CustomerContractBill.Status.UNRECEIVED);
|
||||||
|
} else if (receiveTotalFee.compareTo(getTotalFee(customerContractBill)) == -1) {
|
||||||
|
customerContractBill.setStatus(CustomerContractBill.Status.PART);
|
||||||
|
} else {
|
||||||
|
customerContractBill.setStatus(CustomerContractBill.Status.RECEIVED);
|
||||||
|
}
|
||||||
|
customerContractBillService.updateRentByBillSn(item.getSn(), item.getReceiveRent(), item.getReceiveManagementTotalFee(), item.getReceiveWaterFee(), item.getReceivePowerFee(), customerContractBill.getStatus());
|
||||||
|
}
|
||||||
|
return R.ok("导入成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置账单是否逾期
|
||||||
|
*
|
||||||
|
* @param customerContractBill
|
||||||
|
*/
|
||||||
|
private void setIsOverdue(CustomerContractBill customerContractBill) {
|
||||||
|
if (CustomerContractBill.Status.UNRECEIVED.equals(customerContractBill.getStatus())
|
||||||
|
|| CustomerContractBill.Status.PART.equals(customerContractBill.getStatus())) {
|
||||||
|
Long nowTimeStamp = DateUtils.parseDate(DateUtils.getDate()).getTime();
|
||||||
|
if (customerContractBill.getReceiveRentDate() != null && nowTimeStamp > customerContractBill.getReceiveRentDate().getTime()) {
|
||||||
|
customerContractBill.setIsOverdue(BooleanUtils.toInteger(Boolean.TRUE));
|
||||||
|
} else {
|
||||||
|
customerContractBill.setIsOverdue(BooleanUtils.toInteger(Boolean.FALSE));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
customerContractBill.setIsOverdue(BooleanUtils.toInteger(Boolean.FALSE));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param filePath
|
||||||
|
* @return
|
||||||
|
* @throws IOException
|
||||||
|
*/
|
||||||
|
private BufferedInputStream getBufferedInputStream(String filePath) {
|
||||||
|
BufferedInputStream bf = null;
|
||||||
|
try {
|
||||||
|
// 统一资源
|
||||||
|
FileInputStream fs = new FileInputStream(path + filePath.replace("profile", ""));
|
||||||
|
bf = new BufferedInputStream(fs);
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("获取文件失败", e);
|
||||||
|
}
|
||||||
|
return bf;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,132 @@
|
|||||||
|
package com.ics.admin.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import com.ics.admin.mapper.CustomerContractBillReportVOMapper;
|
||||||
|
import com.ics.admin.utils.ExcelView;
|
||||||
|
import com.ics.admin.vo.CustomerContractBillReportVO;
|
||||||
|
import com.ics.common.core.controller.BaseController;
|
||||||
|
import com.ics.common.core.domain.R;
|
||||||
|
import com.ics.common.utils.DateUtils;
|
||||||
|
import com.ics.common.utils.StringUtils;
|
||||||
|
import org.jxls.common.Context;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户合同账单报表 提供者
|
||||||
|
*
|
||||||
|
* @author zzm
|
||||||
|
* @date 2020-12-15
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("admin/contract/bill/report")
|
||||||
|
public class CustomerContractBillReportVOController extends BaseController {
|
||||||
|
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private CustomerContractBillReportVOMapper customerContractBillReportVOMapper;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询客户合同账单列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:billReport:view")
|
||||||
|
@GetMapping("list")
|
||||||
|
public R list(String customerName, String queryStartMonth, String queryEndMonth) {
|
||||||
|
startPage();
|
||||||
|
List<CustomerContractBillReportVO> customerContractBillReportVOS = getReportList(customerName, queryStartMonth, queryEndMonth);
|
||||||
|
return result(customerContractBillReportVOS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出账单报表功能
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:billReport:view")
|
||||||
|
@GetMapping("/export")
|
||||||
|
public void export(String customerName, String queryStartMonth, String queryEndMonth) {
|
||||||
|
Context context = new Context();
|
||||||
|
CustomerContractBillReportVO allAmount = new CustomerContractBillReportVO();
|
||||||
|
allAmount.setName("合计");
|
||||||
|
allAmount.setTotalRent(BigDecimal.ZERO);
|
||||||
|
allAmount.setReceiveTotalRent(BigDecimal.ZERO);
|
||||||
|
allAmount.setManagementTotalFee(BigDecimal.ZERO);
|
||||||
|
allAmount.setReceiveManagementTotalFee(BigDecimal.ZERO);
|
||||||
|
allAmount.setPowerFee(BigDecimal.ZERO);
|
||||||
|
allAmount.setReceivePowerFee(BigDecimal.ZERO);
|
||||||
|
allAmount.setWaterFee(BigDecimal.ZERO);
|
||||||
|
allAmount.setReceiveWaterFee(BigDecimal.ZERO);
|
||||||
|
allAmount.setOtherFee(BigDecimal.ZERO);
|
||||||
|
allAmount.setRefundFee(BigDecimal.ZERO);
|
||||||
|
allAmount.setTotalBill(BigDecimal.ZERO);
|
||||||
|
allAmount.setReceiveTotalBill(BigDecimal.ZERO);
|
||||||
|
allAmount.setWaitPay(BigDecimal.ZERO);
|
||||||
|
List<CustomerContractBillReportVO> customerContractBillReportVOS = getReportList(customerName, queryStartMonth, queryEndMonth);
|
||||||
|
for (CustomerContractBillReportVO customerContractBillReportVO : customerContractBillReportVOS) {
|
||||||
|
allAmount.setTotalRent(allAmount.getTotalRent().add(customerContractBillReportVO.getTotalRent()));
|
||||||
|
allAmount.setPowerFee(allAmount.getPowerFee().add(customerContractBillReportVO.getPowerFee()));
|
||||||
|
allAmount.setWaterFee(allAmount.getWaterFee().add(customerContractBillReportVO.getWaterFee()));
|
||||||
|
allAmount.setOtherFee(allAmount.getOtherFee().add(customerContractBillReportVO.getOtherFee()));
|
||||||
|
allAmount.setRefundFee(allAmount.getRefundFee().add(customerContractBillReportVO.getRefundFee()));
|
||||||
|
allAmount.setTotalBill(allAmount.getTotalBill().add(customerContractBillReportVO.getTotalBill()));
|
||||||
|
allAmount.setWaitPay(allAmount.getWaitPay().add(customerContractBillReportVO.getWaitPay()));
|
||||||
|
}
|
||||||
|
customerContractBillReportVOS.add(allAmount);
|
||||||
|
String date = "";
|
||||||
|
if (StringUtils.isNotEmpty(queryStartMonth)) {
|
||||||
|
date = date + queryStartMonth;
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotEmpty(queryEndMonth)) {
|
||||||
|
if (StringUtils.isNotEmpty(date)) {
|
||||||
|
date = date + " ~ " + queryEndMonth;
|
||||||
|
} else {
|
||||||
|
date = date + queryEndMonth;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
context.putVar("date", date);
|
||||||
|
context.putVar("customerContractBillReportVOS", customerContractBillReportVOS);
|
||||||
|
new ExcelView("excel/账单报表模版.xls", DateUtils.getNowDate() + "账单报表", context);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据客户名称,起止月份进行查询
|
||||||
|
*
|
||||||
|
* @param customerName
|
||||||
|
* @param queryStartMonth
|
||||||
|
* @param queryEndMonth
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private List<CustomerContractBillReportVO> getReportList(String customerName, String queryStartMonth, String queryEndMonth) {
|
||||||
|
if (StringUtils.isNotEmpty(queryStartMonth)) {
|
||||||
|
queryStartMonth = queryStartMonth + "-01";
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotEmpty(queryEndMonth)) {
|
||||||
|
queryEndMonth = queryEndMonth + "-01";
|
||||||
|
}
|
||||||
|
List<CustomerContractBillReportVO> customerContractBillReportVOS = customerContractBillReportVOMapper.selectCustomerContractBillReportVOList(customerName, queryStartMonth, queryEndMonth);
|
||||||
|
for (CustomerContractBillReportVO customerContractBillReportVO : customerContractBillReportVOS) {
|
||||||
|
customerContractBillReportVO.setName(customerContractBillReportVO.getCustomer() == null ? "" : customerContractBillReportVO.getCustomer().getName());
|
||||||
|
customerContractBillReportVO.setTotalBill(customerContractBillReportVO.getTotalRent()
|
||||||
|
.add(customerContractBillReportVO.getManagementTotalFee())
|
||||||
|
.add(customerContractBillReportVO.getPowerFee())
|
||||||
|
.add(customerContractBillReportVO.getWaterFee())
|
||||||
|
.add(customerContractBillReportVO.getDeposit())
|
||||||
|
.add(customerContractBillReportVO.getOtherFee())
|
||||||
|
.add(customerContractBillReportVO.getRefundFee()));
|
||||||
|
customerContractBillReportVO.setReceiveTotalBill(customerContractBillReportVO.getReceiveTotalRent()
|
||||||
|
.add(customerContractBillReportVO.getReceiveManagementTotalFee())
|
||||||
|
.add(customerContractBillReportVO.getReceivePowerFee())
|
||||||
|
.add(customerContractBillReportVO.getReceiveWaterFee())
|
||||||
|
.add(customerContractBillReportVO.getOtherFee())
|
||||||
|
.add(customerContractBillReportVO.getRefundFee()));
|
||||||
|
customerContractBillReportVO.setWaitPay(customerContractBillReportVO.getTotalBill().subtract(customerContractBillReportVO.getReceiveTotalBill()));
|
||||||
|
}
|
||||||
|
return customerContractBillReportVOS;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,190 @@
|
|||||||
|
package com.ics.admin.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import com.ics.admin.domain.CustomerContract;
|
||||||
|
import com.ics.admin.domain.CustomerContractRoom;
|
||||||
|
import com.ics.admin.domain.Room;
|
||||||
|
import com.ics.admin.service.ICustomerContractRoomService;
|
||||||
|
import com.ics.admin.service.ICustomerContractService;
|
||||||
|
import com.ics.admin.service.IRoomService;
|
||||||
|
import com.ics.common.constant.Constants;
|
||||||
|
import com.ics.common.core.controller.BaseController;
|
||||||
|
import com.ics.common.core.domain.R;
|
||||||
|
import com.ics.common.core.text.Convert;
|
||||||
|
import com.ics.common.utils.RandomUtil;
|
||||||
|
import com.ics.common.utils.StringUtils;
|
||||||
|
import com.ics.common.utils.ValidatorUtils;
|
||||||
|
import com.ics.system.service.ICurrentUserService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户合同 提供者
|
||||||
|
*
|
||||||
|
* @author zzm
|
||||||
|
* @date 2020-11-17
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/admin/contract")
|
||||||
|
public class CustomerContractController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ICustomerContractService customerContractService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ICustomerContractRoomService customerContractRoomService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IRoomService roomService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ICurrentUserService currentUserService;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询客户合同
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:contract:view")
|
||||||
|
@GetMapping("get")
|
||||||
|
public CustomerContract get(Long id) {
|
||||||
|
CustomerContract customerContract = customerContractService.selectCustomerContractById(id);
|
||||||
|
return customerContract;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询客户合同列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:contract:list")
|
||||||
|
@PostMapping("list")
|
||||||
|
public R list(@RequestBody CustomerContract customerContract) {
|
||||||
|
startPage();
|
||||||
|
customerContract.setDeleteFlag(0);
|
||||||
|
customerContract.setType(CustomerContract.Type.OFFICIAL);
|
||||||
|
return result(customerContractService.selectCustomerContractList(customerContract));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询客户合同列表(新建账单的搜索栏)
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:contract:list")
|
||||||
|
@GetMapping("searchList")
|
||||||
|
public R searchList(String name) {
|
||||||
|
if (StringUtils.isEmpty(name)) {
|
||||||
|
return R.error("无相关合同!");
|
||||||
|
}
|
||||||
|
CustomerContract searchModel = new CustomerContract();
|
||||||
|
searchModel.setName(name);
|
||||||
|
searchModel.setStatus(CustomerContract.Status.APPROVED);
|
||||||
|
return R.data(customerContractService.selectCustomerContractList(searchModel));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存客户合同
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:contract:add")
|
||||||
|
@PostMapping("save")
|
||||||
|
public R addSave(@RequestBody CustomerContract customerContract) {
|
||||||
|
ValidatorUtils.validateEntity(customerContract);
|
||||||
|
if (customerContractService.exists("name", customerContract.getName())) {
|
||||||
|
return R.error("合同名称重复!");
|
||||||
|
}
|
||||||
|
customerContract.setType(CustomerContract.Type.OFFICIAL);
|
||||||
|
customerContract.setStatus(CustomerContract.Status.DRAFT);
|
||||||
|
customerContract.setManageSn(RandomUtil.generate_sn(Constants.CONTRACT_PREFIX));
|
||||||
|
return toAjax(customerContractService.insertCustomerContract(customerContract));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存客户合同
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:contract:edit")
|
||||||
|
@PostMapping("update")
|
||||||
|
public R editSave(@RequestBody CustomerContract customerContract) {
|
||||||
|
ValidatorUtils.validateEntity(customerContract);
|
||||||
|
if (customerContractService.unique(customerContract.getId(), "name", customerContract.getName())) {
|
||||||
|
return R.error("合同名称重复!");
|
||||||
|
}
|
||||||
|
customerContract.setType(CustomerContract.Type.OFFICIAL);
|
||||||
|
customerContract.setUpdateBy(getLoginName());
|
||||||
|
return toAjax(customerContractService.updateCustomerContract(customerContract));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变更合同
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:contract:edit")
|
||||||
|
@PostMapping("change")
|
||||||
|
public R change(@RequestBody CustomerContract customerContract) {
|
||||||
|
ValidatorUtils.validateEntity(customerContract);
|
||||||
|
customerContract.setType(CustomerContract.Type.OFFICIAL);
|
||||||
|
customerContract.setStatus(CustomerContract.Status.DRAFT);
|
||||||
|
customerContract.setManageSn(RandomUtil.generate_sn(Constants.CONTRACT_PREFIX));
|
||||||
|
return toAjax(customerContractService.insertCustomerContract(customerContract));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提交合同
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:contract:edit")
|
||||||
|
@PostMapping("commit")
|
||||||
|
public R commit(String ids) {
|
||||||
|
String[] idArr = Convert.toStrArray(ids);
|
||||||
|
for (String id : idArr) {
|
||||||
|
CustomerContract customerContract = customerContractService.selectCustomerContractById(Long.valueOf(id));
|
||||||
|
List<CustomerContractRoom> customerContractRooms = customerContractRoomService.findByContractId(Long.valueOf(id));
|
||||||
|
for (CustomerContractRoom ccr : customerContractRooms) {
|
||||||
|
Room room = roomService.selectRoomById(ccr.getRoomId());
|
||||||
|
if (Room.Status.YES.equals(room.getStatus())) {
|
||||||
|
return R.error("合同号:" + customerContract.getSn() + "选择的房间已被出租,无法提交!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return toAjax(customerContractService.commit(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审批合同
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:contract:edit")
|
||||||
|
@PostMapping("approve")
|
||||||
|
public R approve(String ids, CustomerContract.Status status, String remark) {
|
||||||
|
return toAjax(customerContractService.approveContract(ids, status, remark));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 作废合同
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:contract:edit")
|
||||||
|
@PostMapping("cancel")
|
||||||
|
public R cancel(String ids) {
|
||||||
|
return toAjax(customerContractService.voided(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除客户合同
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:contract:remove")
|
||||||
|
@PostMapping("remove")
|
||||||
|
public R remove(String ids) {
|
||||||
|
if (StringUtils.isEmpty(ids)) {
|
||||||
|
return R.error("合同id不能为空!");
|
||||||
|
}
|
||||||
|
String[] idArr = Convert.toStrArray(ids);
|
||||||
|
for (String id : idArr) {
|
||||||
|
CustomerContract customerContract = customerContractService.selectCustomerContractById(Long.valueOf(id));
|
||||||
|
if (!customerContract.getStatus().equals(CustomerContract.Status.DRAFT)) {
|
||||||
|
return R.error("合同号:" + customerContract.getSn() + "已经提交,无法删除!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return toAjax(customerContractService.deleteCustomerContractByIds(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,98 @@
|
|||||||
|
package com.ics.admin.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import com.ics.admin.domain.CustomerContract;
|
||||||
|
import com.ics.admin.service.ICustomerContractService;
|
||||||
|
import com.ics.common.constant.Constants;
|
||||||
|
import com.ics.common.core.controller.BaseController;
|
||||||
|
import com.ics.common.core.domain.R;
|
||||||
|
import com.ics.common.utils.RandomUtil;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户意向信息 提供者
|
||||||
|
*
|
||||||
|
* @author zzm
|
||||||
|
* @date 2020-11-17
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/admin/intentionContract")
|
||||||
|
public class CustomerContractIntentionController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ICustomerContractService customerContractService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询客户意向
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:intentionContract:edit")
|
||||||
|
@GetMapping("get")
|
||||||
|
public CustomerContract get(Long id) {
|
||||||
|
CustomerContract customerContract = customerContractService.selectCustomerContractById(id);
|
||||||
|
return customerContract;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询客户意向列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:intentionContract:list")
|
||||||
|
@PostMapping("list")
|
||||||
|
public R list(@RequestBody CustomerContract customerContract) {
|
||||||
|
startPage();
|
||||||
|
customerContract.setType(CustomerContract.Type.INTENTION);
|
||||||
|
return result(customerContractService.selectCustomerContractList(customerContract));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存客户意向信息
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:intentionContract:add")
|
||||||
|
@PostMapping("save")
|
||||||
|
public R addSave(@RequestBody CustomerContract customerContract) {
|
||||||
|
if (customerContractService.exists("name", customerContract.getName())) {
|
||||||
|
return R.error("意向名称重复!");
|
||||||
|
}
|
||||||
|
customerContract.setType(CustomerContract.Type.INTENTION);
|
||||||
|
customerContract.setStatus(CustomerContract.Status.DRAFT);
|
||||||
|
customerContract.setManageSn(RandomUtil.generate_sn(Constants.CONTRACT_PREFIX));
|
||||||
|
return toAjax(customerContractService.insertCustomerContract(customerContract));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存客户意向信息
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:intentionContract:edit")
|
||||||
|
@PostMapping("update")
|
||||||
|
public R editSave(@RequestBody CustomerContract customerContract) {
|
||||||
|
if (customerContractService.unique(customerContract.getId(), "name", customerContract.getName())) {
|
||||||
|
return R.error("合同名称重复!");
|
||||||
|
}
|
||||||
|
customerContract.setType(CustomerContract.Type.INTENTION);
|
||||||
|
return toAjax(customerContractService.updateCustomerContract(customerContract));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改状态为作废信息
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:intentionContract:edit")
|
||||||
|
@PostMapping("updateStatus")
|
||||||
|
public R updateStatus(@RequestBody CustomerContract customerContract) {
|
||||||
|
customerContract.setStatus(CustomerContract.Status.VOIDED);
|
||||||
|
return toAjax(customerContractService.updateCustomerContract(customerContract));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除客户意向信息
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:intentionContract:remove")
|
||||||
|
@PostMapping("remove")
|
||||||
|
public R remove(String ids) {
|
||||||
|
return toAjax(customerContractService.deleteCustomerContractByIds(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,85 @@
|
|||||||
|
package com.ics.admin.controller;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.CustomerContractRefund;
|
||||||
|
import com.ics.admin.service.ICustomerContractRefundService;
|
||||||
|
import com.ics.common.constant.Constants;
|
||||||
|
import com.ics.common.core.controller.BaseController;
|
||||||
|
import com.ics.common.core.domain.R;
|
||||||
|
import com.ics.common.utils.RandomUtil;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户合同退租 提供者
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2021-03-31
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/admin/customerContractRefund")
|
||||||
|
public class CustomerContractRefundController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ICustomerContractRefundService customerContractRefundService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询退租
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:refund:edit")
|
||||||
|
@GetMapping("/get")
|
||||||
|
public CustomerContractRefund get(Long id) {
|
||||||
|
CustomerContractRefund customerContractRefund = customerContractRefundService.selectCustomerContractRefundById(id);
|
||||||
|
return customerContractRefund;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询客户合同退租列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:refund:list")
|
||||||
|
@GetMapping("list")
|
||||||
|
public R list(CustomerContractRefund customerContractRefund) {
|
||||||
|
startPage();
|
||||||
|
return result(customerContractRefundService.selectCustomerContractRefundList(customerContractRefund));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存客户合同退租
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:refund:add")
|
||||||
|
@PostMapping("save")
|
||||||
|
public R addSave(@RequestBody CustomerContractRefund customerContractRefund) {
|
||||||
|
customerContractRefund.setStatus(false);
|
||||||
|
customerContractRefund.setSn(RandomUtil.generate_sn(Constants.REFUND_PREFIX));
|
||||||
|
return toAjax(customerContractRefundService.insertCustomerContractRefund(customerContractRefund));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 确定退租(改状态)
|
||||||
|
* ids合同id, id退租id
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:refund:edit")
|
||||||
|
@PostMapping("determine")
|
||||||
|
public R determine(String ids, Long id) {
|
||||||
|
return toAjax(customerContractRefundService.voided(ids, id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存客户合同退租
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:refund:edit")
|
||||||
|
@PostMapping("update")
|
||||||
|
public R editSave(@RequestBody CustomerContractRefund customerContractRefund) {
|
||||||
|
return toAjax(customerContractRefundService.updateById(customerContractRefund));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除客户合同退租
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:refund:remove")
|
||||||
|
@PostMapping("remove")
|
||||||
|
public R remove(String ids) {
|
||||||
|
return toAjax(customerContractRefundService.deleteCustomerContractRefundByIds(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,181 @@
|
|||||||
|
package com.ics.admin.controller;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.google.common.collect.Maps;
|
||||||
|
import com.ics.admin.domain.Customer;
|
||||||
|
import com.ics.admin.service.ICustomerService;
|
||||||
|
import com.ics.common.core.controller.BaseController;
|
||||||
|
import com.ics.common.core.domain.R;
|
||||||
|
import com.ics.common.utils.ValidatorUtils;
|
||||||
|
import com.ics.common.utils.http.HttpUtils;
|
||||||
|
import com.ics.system.domain.User;
|
||||||
|
import org.apache.commons.compress.utils.Lists;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户管理 提供者
|
||||||
|
*
|
||||||
|
* @author zzm
|
||||||
|
* @date 2020-10-16
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("admin/customer")
|
||||||
|
public class CustomerController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ICustomerService customerService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* app的key值
|
||||||
|
*/
|
||||||
|
@Value("${qixin.appKey}")
|
||||||
|
private String appKey;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* app的密钥值
|
||||||
|
*/
|
||||||
|
@Value("${qixin.secretKey}")
|
||||||
|
private String secretKey;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* url
|
||||||
|
*/
|
||||||
|
@Value("${qixin.url}")
|
||||||
|
private String url;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 调用启信api获取企业照面
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:customer:view")
|
||||||
|
@PostMapping("getBasicInfo")
|
||||||
|
public R getQiXinBasicInfo(String keyword) {
|
||||||
|
String qiXinBasicInfo = HttpUtils.sendGet(url, "appkey=" + appKey + "&secret_key=" + secretKey + "&keyword=" + keyword);
|
||||||
|
JSONObject result = (JSONObject) JSON.parse(qiXinBasicInfo);
|
||||||
|
// 启信宝的接口返回成功码-200
|
||||||
|
String SUCCESS_CODE = "200";
|
||||||
|
if (result != null) {
|
||||||
|
String status = result.get("status").toString();
|
||||||
|
if (SUCCESS_CODE.equals(status)) {
|
||||||
|
return R.data(result.get("data").toString());
|
||||||
|
} else {
|
||||||
|
return R.error(result.get("message").toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return R.error("无当前企业数据!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询${tableComment}
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:customer:view")
|
||||||
|
@GetMapping("get/{id}")
|
||||||
|
public Customer get(@PathVariable("id") Long id) {
|
||||||
|
return customerService.selectCustomerById(id);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询客户管理列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:customer:list")
|
||||||
|
@GetMapping("list")
|
||||||
|
public R list(Customer customer) {
|
||||||
|
startPage();
|
||||||
|
customer.setDeleteFlag(0);
|
||||||
|
return result(customerService.selectCustomerList(customer));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同查询客户管理列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:customer:list")
|
||||||
|
@GetMapping("allList")
|
||||||
|
public R allList(Customer customer) {
|
||||||
|
List<Customer> customerList = customerService.selectCustomerList(customer);
|
||||||
|
List<Map> customerMaps = Lists.newArrayList();
|
||||||
|
for (Customer item : customerList) {
|
||||||
|
Map<String, Object> customerMap = Maps.newHashMap();
|
||||||
|
getCustomerMap(customerMap, item);
|
||||||
|
customerMaps.add(customerMap);
|
||||||
|
}
|
||||||
|
return R.data(customerMaps);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同根据客户id查询客户部分信息
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:customer:view")
|
||||||
|
@GetMapping("findByCustomerId")
|
||||||
|
public R findByCustomerId(Long customerId) {
|
||||||
|
Map<String, Object> customerMap = Maps.newHashMap();
|
||||||
|
Customer customer = customerService.selectCustomerById(customerId);
|
||||||
|
getCustomerMap(customerMap, customer);
|
||||||
|
return R.data(customerMap);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同获取客户的部分信息
|
||||||
|
*/
|
||||||
|
private void getCustomerMap(Map<String, Object> customerMap, Customer customer) {
|
||||||
|
customerMap.put("id", customer.getId());
|
||||||
|
customerMap.put("name", customer.getName());
|
||||||
|
customerMap.put("sector", customer.getSector());
|
||||||
|
customerMap.put("creditNo", customer.getCreditNo());
|
||||||
|
customerMap.put("mail", customer.getMailAddress());
|
||||||
|
customerMap.put("operName", customer.getOperName());
|
||||||
|
customerMap.put("phone", customer.getPhone());
|
||||||
|
customerMap.put("address", customer.getAddress());
|
||||||
|
customerMap.put("channelName", customer.getChannelName());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存客户管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:customer:add")
|
||||||
|
@PostMapping("save")
|
||||||
|
public R addSave(@RequestBody Customer customer) {
|
||||||
|
if (User.isAdmin(getCurrentUserId())) {
|
||||||
|
return R.error("不允许超级管理员用户新增");
|
||||||
|
}
|
||||||
|
ValidatorUtils.validateEntity(customer);
|
||||||
|
customer.setCreateBy(getLoginName());
|
||||||
|
return toAjax(customerService.insertCustomer(customer));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存客户管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:customer:edit")
|
||||||
|
@PostMapping("update")
|
||||||
|
public R editSave(@RequestBody Customer customer) {
|
||||||
|
if (User.isAdmin(getCurrentUserId())) {
|
||||||
|
return R.error("不允许超级管理员用户修改");
|
||||||
|
}
|
||||||
|
ValidatorUtils.validateEntity(customer);
|
||||||
|
customer.setUpdateBy(getLoginName());
|
||||||
|
return toAjax(customerService.updateCustomer(customer));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除${tableComment}
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:customer:remove")
|
||||||
|
@PostMapping("remove")
|
||||||
|
public R remove(String ids) {
|
||||||
|
return toAjax(customerService.deleteCustomerByIds(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,88 @@
|
|||||||
|
package com.ics.admin.controller;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.DjBanner;
|
||||||
|
import com.ics.admin.service.IDjBannerService;
|
||||||
|
import com.ics.common.core.controller.BaseController;
|
||||||
|
import com.ics.common.core.domain.R;
|
||||||
|
import com.ics.common.utils.ValidatorUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 党建banner 提供者
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2021-03-23
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/admin/djBanner")
|
||||||
|
public class DjBannerController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IDjBannerService djBannerService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询党建banner
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:djBanner:edit")
|
||||||
|
@GetMapping("get/{id}")
|
||||||
|
public DjBanner get(@PathVariable("id") Long id) {
|
||||||
|
return djBannerService.selectDjBannerById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询党建banner列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:djBanner:list")
|
||||||
|
@GetMapping("list")
|
||||||
|
public R list(DjBanner djBanner) {
|
||||||
|
startPage();
|
||||||
|
return result(djBannerService.selectDjBannerList(djBanner));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存党建banner
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:djBanner:add")
|
||||||
|
@PostMapping("save")
|
||||||
|
public R addSave(@RequestBody DjBanner djBanner) {
|
||||||
|
ValidatorUtils.validateEntity(djBanner);
|
||||||
|
return toAjax(djBannerService.insertDjBanner(djBanner));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存党建banner
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:djBanner:edit")
|
||||||
|
@PostMapping("update")
|
||||||
|
public R editSave(@RequestBody DjBanner djBanner) {
|
||||||
|
return toAjax(djBannerService.updateDjBanner(djBanner));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除党建banner
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:djBanner:remove")
|
||||||
|
@PostMapping("remove")
|
||||||
|
public R remove(String ids) {
|
||||||
|
return toAjax(djBannerService.deleteDjBannerByIds(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上架、下架
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:djBanner:edit")
|
||||||
|
@PostMapping("changeMarketable")
|
||||||
|
public R changeMarketable(@RequestBody DjBanner djBanner) {
|
||||||
|
DjBanner newDjBanner = djBannerService.selectDjBannerById(djBanner.getId());
|
||||||
|
if (newDjBanner == null) {
|
||||||
|
return R.error("党建banner不存在!");
|
||||||
|
}
|
||||||
|
djBanner.setMarketableTime(new Date());
|
||||||
|
return toAjax(djBannerService.updateDjBanner(djBanner));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,88 @@
|
|||||||
|
package com.ics.admin.controller;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.Dj;
|
||||||
|
import com.ics.admin.service.IDjService;
|
||||||
|
import com.ics.common.core.controller.BaseController;
|
||||||
|
import com.ics.common.core.domain.R;
|
||||||
|
import com.ics.common.utils.ValidatorUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 党建管理 提供者
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2021-03-23
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/admin/dj")
|
||||||
|
public class DjController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IDjService djService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询党建管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:dj:edit")
|
||||||
|
@GetMapping("get/{id}")
|
||||||
|
public Dj get(@PathVariable("id") Long id) {
|
||||||
|
return djService.selectDjById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询党建管理列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:dj:list")
|
||||||
|
@GetMapping("list")
|
||||||
|
public R list(Dj dj) {
|
||||||
|
startPage();
|
||||||
|
return result(djService.selectDjList(dj));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存党建管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:dj:add")
|
||||||
|
@PostMapping("save")
|
||||||
|
public R addSave(@RequestBody Dj dj) {
|
||||||
|
ValidatorUtils.validateEntity(dj);
|
||||||
|
return toAjax(djService.insertDj(dj));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存党建管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:dj:edit")
|
||||||
|
@PostMapping("update")
|
||||||
|
public R editSave(@RequestBody Dj dj) {
|
||||||
|
return toAjax(djService.updateDj(dj));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除党建管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:dj:remove")
|
||||||
|
@PostMapping("remove")
|
||||||
|
public R remove(String ids) {
|
||||||
|
return toAjax(djService.deleteDjByIds(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上架、下架
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:dj:edit")
|
||||||
|
@PostMapping("changeMarketable")
|
||||||
|
public R changeMarketable(@RequestBody Dj dj) {
|
||||||
|
Dj newDj = djService.selectDjById(dj.getId());
|
||||||
|
if (newDj == null) {
|
||||||
|
return R.error("党建管理不存在!");
|
||||||
|
}
|
||||||
|
dj.setMarketableTime(new Date());
|
||||||
|
return toAjax(djService.updateDj(dj));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,96 @@
|
|||||||
|
package com.ics.admin.controller;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.ExpenseSettings;
|
||||||
|
import com.ics.admin.service.IExpenseSettingsService;
|
||||||
|
import com.ics.common.core.controller.BaseController;
|
||||||
|
import com.ics.common.core.domain.R;
|
||||||
|
import com.ics.common.utils.ValidatorUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 费项配置 提供者
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2021-03-24
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/admin/expenseSettings")
|
||||||
|
public class ExpenseSettingsController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IExpenseSettingsService expenseSettingsService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询费项配置
|
||||||
|
*/
|
||||||
|
@GetMapping("get/{id}")
|
||||||
|
public ExpenseSettings get(@PathVariable("id") Long id) {
|
||||||
|
return expenseSettingsService.selectExpenseSettingsById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询费项配置列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:ExpenseSettings:list")
|
||||||
|
@GetMapping("list")
|
||||||
|
public R list(ExpenseSettings expenseSettings) {
|
||||||
|
startPage();
|
||||||
|
return result(expenseSettingsService.selectExpenseSettingsList(expenseSettings));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询费项配置列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:ExpenseSettings:list")
|
||||||
|
@GetMapping("allList")
|
||||||
|
public R allList(ExpenseSettings expenseSettings) {
|
||||||
|
return result(expenseSettingsService.selectExpenseSettingsList(expenseSettings));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存费项配置
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:ExpenseSettings:add")
|
||||||
|
@PostMapping("save")
|
||||||
|
public R addSave(@RequestBody ExpenseSettings expenseSettings) {
|
||||||
|
ValidatorUtils.validateEntity(expenseSettings);
|
||||||
|
return toAjax(expenseSettingsService.insertExpenseSettings(expenseSettings));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存费项配置
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:ExpenseSettings:edit")
|
||||||
|
@PostMapping("update")
|
||||||
|
public R editSave(@RequestBody ExpenseSettings expenseSettings) {
|
||||||
|
return toAjax(expenseSettingsService.updateExpenseSettings(expenseSettings));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 启动 ,停用
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:ExpenseSettings:edit")
|
||||||
|
@PostMapping("enabled")
|
||||||
|
public R changeMarketable(@RequestBody ExpenseSettings expenseSettings) {
|
||||||
|
ExpenseSettings newExpenseSettings = expenseSettingsService.selectExpenseSettingsById(expenseSettings.getId());
|
||||||
|
if (newExpenseSettings == null) {
|
||||||
|
return R.error("数据不存在!");
|
||||||
|
}
|
||||||
|
return toAjax(expenseSettingsService.updateExpenseSettings(expenseSettings));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除费项配置
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:ExpenseSettings:remove")
|
||||||
|
@PostMapping("remove")
|
||||||
|
public R remove(String ids) {
|
||||||
|
return toAjax(expenseSettingsService.deleteExpenseSettingsByIds(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,70 @@
|
|||||||
|
package com.ics.admin.controller;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.FileManagement;
|
||||||
|
import com.ics.admin.service.IFileManagementService;
|
||||||
|
import com.ics.common.core.controller.BaseController;
|
||||||
|
import com.ics.common.core.domain.R;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件管理 提供者
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2021-05-24
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/admin/fileManagement")
|
||||||
|
public class FileManagementController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IFileManagementService fileManagementService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询文件管理
|
||||||
|
*/
|
||||||
|
@GetMapping("get/{id}")
|
||||||
|
public FileManagement get(@PathVariable("id") Long id) {
|
||||||
|
return fileManagementService.selectFileManagementById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询文件管理列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:fileManagement:list")
|
||||||
|
@GetMapping("list")
|
||||||
|
public R list(FileManagement fileManagement) {
|
||||||
|
startPage();
|
||||||
|
return result(fileManagementService.selectFileManagementList(fileManagement));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存文件管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:fileManagement:add")
|
||||||
|
@PostMapping("save")
|
||||||
|
public R addSave(@RequestBody FileManagement fileManagement) {
|
||||||
|
return toAjax(fileManagementService.insertFileManagement(fileManagement));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存文件管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:fileManagement:edit")
|
||||||
|
@PostMapping("update")
|
||||||
|
public R editSave(@RequestBody FileManagement fileManagement) {
|
||||||
|
return toAjax(fileManagementService.updateFileManagement(fileManagement));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除文件管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:fileManagement:remove")
|
||||||
|
@PostMapping("remove")
|
||||||
|
public R remove(String ids) {
|
||||||
|
return toAjax(fileManagementService.deleteFileManagementByIds(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,125 @@
|
|||||||
|
package com.ics.admin.controller;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.Park;
|
||||||
|
import com.ics.admin.service.IParkService;
|
||||||
|
import com.ics.common.core.controller.BaseController;
|
||||||
|
import com.ics.common.core.domain.R;
|
||||||
|
import com.ics.common.utils.DateUtils;
|
||||||
|
import com.ics.common.utils.ValidatorUtils;
|
||||||
|
import com.ics.system.domain.Dept;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.wf.jwtp.annotation.Logical;
|
||||||
|
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 园区管理 提供者
|
||||||
|
*
|
||||||
|
* @author zzm
|
||||||
|
* @date 2021-03-23
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("admin/park")
|
||||||
|
public class ParkController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IParkService parkService;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询园区管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:park:view")
|
||||||
|
@GetMapping("get/{id}")
|
||||||
|
public Park get(@PathVariable("id") Long id) {
|
||||||
|
return parkService.selectParkById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询当前园区
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:park:setting")
|
||||||
|
@GetMapping("getCurrentPark")
|
||||||
|
public Park getCurrentPark(Park park) {
|
||||||
|
return parkService.selectCurrentParkByDeptId(park);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询园区管理列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions(value = {"admin:park:list", "system:user:list"}, logical = Logical.OR)
|
||||||
|
@GetMapping("list")
|
||||||
|
public R list(Park park) {
|
||||||
|
startPage();
|
||||||
|
return result(parkService.selectParkList(park));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存园区管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:park:add")
|
||||||
|
@PostMapping("save")
|
||||||
|
public R addSave(@RequestBody Park park) {
|
||||||
|
ValidatorUtils.validateEntity(park);
|
||||||
|
if (parkService.exists("name", park.getName())) {
|
||||||
|
return R.error("园区名称重复!");
|
||||||
|
}
|
||||||
|
park.setIsMarketable(false);
|
||||||
|
return toAjax(parkService.insertPark(park));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存园区管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:park:edit")
|
||||||
|
@PostMapping("update")
|
||||||
|
public R editSave(@RequestBody Park park) {
|
||||||
|
ValidatorUtils.validateEntity(park);
|
||||||
|
if (parkService.unique(park.getId(), "name", park.getName())) {
|
||||||
|
return R.error("园区名称重复!");
|
||||||
|
}
|
||||||
|
return toAjax(parkService.updatePark(park));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 园区状态修改
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:park:edit")
|
||||||
|
@PostMapping("/changeMarketable")
|
||||||
|
public R changeMarketable(@RequestBody Park park) {
|
||||||
|
Park newPark = parkService.selectParkById(park.getId());
|
||||||
|
if (newPark == null) {
|
||||||
|
return R.error("园区不存在!");
|
||||||
|
}
|
||||||
|
park.setMarketableTime(DateUtils.getNowDate());
|
||||||
|
return toAjax(parkService.updatePark(park));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除园区管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:park:remove")
|
||||||
|
@PostMapping("remove")
|
||||||
|
public R remove(String ids) {
|
||||||
|
return toAjax(parkService.deleteParkByIds(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化园区信息
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:park:add")
|
||||||
|
@PostMapping("initSavePark")
|
||||||
|
public R initSavePark(@RequestBody Dept dept) {
|
||||||
|
dept.setCreateBy(getLoginName());
|
||||||
|
if (parkService.exists("name", dept.getDeptName())) {
|
||||||
|
return R.error("园区名称重复!");
|
||||||
|
}
|
||||||
|
return toAjax(parkService.initPark(dept));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,88 @@
|
|||||||
|
package com.ics.admin.controller;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.PolicyBanner;
|
||||||
|
import com.ics.admin.service.IPolicyBannerService;
|
||||||
|
import com.ics.common.core.controller.BaseController;
|
||||||
|
import com.ics.common.core.domain.R;
|
||||||
|
import com.ics.common.utils.ValidatorUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 政策banner 提供者
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2021-03-23
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/admin/policyBanner")
|
||||||
|
public class PolicyBannerController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IPolicyBannerService policyBannerService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询政策banner
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:policyBanner:edit")
|
||||||
|
@GetMapping("get/{id}")
|
||||||
|
public PolicyBanner get(@PathVariable("id") Long id) {
|
||||||
|
return policyBannerService.selectPolicyBannerById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询政策banner列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:policyBanner:list")
|
||||||
|
@GetMapping("list")
|
||||||
|
public R list(PolicyBanner policyBanner) {
|
||||||
|
startPage();
|
||||||
|
return result(policyBannerService.selectPolicyBannerList(policyBanner));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存政策banner
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:policyBanner:add")
|
||||||
|
@PostMapping("save")
|
||||||
|
public R addSave(@RequestBody PolicyBanner policyBanner) {
|
||||||
|
ValidatorUtils.validateEntity(policyBanner);
|
||||||
|
return toAjax(policyBannerService.insertPolicyBanner(policyBanner));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存政策banner
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:policyBanner:edit")
|
||||||
|
@PostMapping("update")
|
||||||
|
public R editSave(@RequestBody PolicyBanner policyBanner) {
|
||||||
|
return toAjax(policyBannerService.updatePolicyBanner(policyBanner));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除政策banner
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:policyBanner:remove")
|
||||||
|
@PostMapping("remove")
|
||||||
|
public R remove(String ids) {
|
||||||
|
return toAjax(policyBannerService.deletePolicyBannerByIds(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上架、下架
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:policyBanner:edit")
|
||||||
|
@PostMapping("changeMarketable")
|
||||||
|
public R changeMarketable(@RequestBody PolicyBanner policyBanner) {
|
||||||
|
PolicyBanner newPolicyBanner = policyBannerService.selectPolicyBannerById(policyBanner.getId());
|
||||||
|
if (newPolicyBanner == null) {
|
||||||
|
return R.error("政策banner不存在!");
|
||||||
|
}
|
||||||
|
policyBanner.setMarketableTime(new Date());
|
||||||
|
return toAjax(policyBannerService.updatePolicyBanner(policyBanner));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,88 @@
|
|||||||
|
package com.ics.admin.controller;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.Policy;
|
||||||
|
import com.ics.admin.service.IPolicyService;
|
||||||
|
import com.ics.common.core.controller.BaseController;
|
||||||
|
import com.ics.common.core.domain.R;
|
||||||
|
import com.ics.common.utils.ValidatorUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 政策管理 提供者
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2021-03-23
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/admin/policy")
|
||||||
|
public class PolicyController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IPolicyService policyService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询政策管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:policy:edit")
|
||||||
|
@GetMapping("get/{id}")
|
||||||
|
public Policy get(@PathVariable("id") Long id) {
|
||||||
|
return policyService.selectPolicyById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询政策管理列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:policy:list")
|
||||||
|
@GetMapping("list")
|
||||||
|
public R list(Policy policy) {
|
||||||
|
startPage();
|
||||||
|
return result(policyService.selectPolicyList(policy));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存政策管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:policy:add")
|
||||||
|
@PostMapping("save")
|
||||||
|
public R addSave(@RequestBody Policy policy) {
|
||||||
|
ValidatorUtils.validateEntity(policy);
|
||||||
|
return toAjax(policyService.insertPolicy(policy));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存政策管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:policy:edit")
|
||||||
|
@PostMapping("update")
|
||||||
|
public R editSave(@RequestBody Policy policy) {
|
||||||
|
return toAjax(policyService.updatePolicy(policy));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除政策管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:policy:remove")
|
||||||
|
@PostMapping("remove")
|
||||||
|
public R remove(String ids) {
|
||||||
|
return toAjax(policyService.deletePolicyByIds(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上架、下架
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:policy:edit")
|
||||||
|
@PostMapping("changeMarketable")
|
||||||
|
public R changeMarketable(@RequestBody Policy policy) {
|
||||||
|
Policy newPolicy = policyService.selectPolicyById(policy.getId());
|
||||||
|
if (newPolicy == null) {
|
||||||
|
return R.error("政策不存在!");
|
||||||
|
}
|
||||||
|
policy.setMarketableTime(new Date());
|
||||||
|
return toAjax(policyService.updatePolicy(policy));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,113 @@
|
|||||||
|
package com.ics.admin.controller;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.Repair;
|
||||||
|
import com.ics.admin.domain.RepairLog;
|
||||||
|
import com.ics.admin.service.IRepairLogService;
|
||||||
|
import com.ics.admin.service.IRepairService;
|
||||||
|
import com.ics.admin.vo.ParkVO;
|
||||||
|
import com.ics.admin.vo.RepairVO;
|
||||||
|
import com.ics.common.annotation.LoginUser;
|
||||||
|
import com.ics.common.core.controller.BaseController;
|
||||||
|
import com.ics.common.core.domain.R;
|
||||||
|
import com.ics.common.utils.bean.BeanUtils;
|
||||||
|
import com.ics.system.domain.User;
|
||||||
|
import com.ics.system.domain.vo.UserVO;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单管理 提供者
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2021-03-25
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/admin/repair")
|
||||||
|
public class RepairController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IRepairService repairService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IRepairLogService repairLogService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询工单管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:repair:edit")
|
||||||
|
@GetMapping("get/{id}")
|
||||||
|
public RepairVO get(@PathVariable("id") Long id) {
|
||||||
|
RepairVO repairVO = new RepairVO();
|
||||||
|
Repair repair = repairService.selectRepairById(id);
|
||||||
|
if (repair != null) {
|
||||||
|
BeanUtils.copyBeanProp(repairVO, repair);
|
||||||
|
repairVO.setStatus(repair.getStatus().getValue());
|
||||||
|
repairVO.setStatusName(repair.getStatus().getName());
|
||||||
|
|
||||||
|
ParkVO parkVO = new ParkVO();
|
||||||
|
BeanUtils.copyBeanProp(parkVO, repair.getPark());
|
||||||
|
repairVO.setParkVO(parkVO);
|
||||||
|
|
||||||
|
UserVO userVO = new UserVO();
|
||||||
|
BeanUtils.copyBeanProp(userVO, repair.getUser());
|
||||||
|
repairVO.setUserVO(userVO);
|
||||||
|
|
||||||
|
RepairLog repairLog = new RepairLog();
|
||||||
|
repairLog.setRepairId(id);
|
||||||
|
List<RepairLog> repairLogs = repairLogService.selectRepairLogList(repairLog);
|
||||||
|
repairVO.setRepairLogs(repairLogs);
|
||||||
|
}
|
||||||
|
return repairVO;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询工单管理列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:repair:list")
|
||||||
|
@GetMapping("list")
|
||||||
|
public R list(Repair repair, @LoginUser User user) {
|
||||||
|
startPage();
|
||||||
|
return result(repairService.selectRepairList(repair));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:repair:edit")
|
||||||
|
@PostMapping("/review")
|
||||||
|
public R review(@RequestBody Repair repair) {
|
||||||
|
Repair pRepair = repairService.selectRepairById(repair.getId());
|
||||||
|
if (repair == null || !Repair.Status.PENDING_ASSIGN.equals(pRepair.getStatus())) {
|
||||||
|
return R.error("报修为空或状态不是待分配");
|
||||||
|
}
|
||||||
|
repair.setStatus(Repair.Status.PENDING_PROCESS);
|
||||||
|
return toAjax(repairService.updateRepair(repair));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:repair:edit")
|
||||||
|
@PostMapping("/complete")
|
||||||
|
public R complete(@RequestBody Repair repair) {
|
||||||
|
Repair pRepair = repairService.selectRepairById(repair.getId());
|
||||||
|
if (repair == null || !Repair.Status.PENDING_PROCESS.equals(pRepair.getStatus())) {
|
||||||
|
return R.error("报修为空或状态不是待处理");
|
||||||
|
}
|
||||||
|
repair.setStatus(Repair.Status.COMPLETED);
|
||||||
|
return toAjax(repairService.updateRepair(repair));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除工单管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:repair:remove")
|
||||||
|
@PostMapping("remove")
|
||||||
|
public R remove(String ids) {
|
||||||
|
return toAjax(repairService.deleteRepairByIds(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,109 @@
|
|||||||
|
package com.ics.admin.controller;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.Room;
|
||||||
|
import com.ics.admin.service.IRoomService;
|
||||||
|
import com.ics.admin.vo.RoomMapVO;
|
||||||
|
import com.ics.common.core.controller.BaseController;
|
||||||
|
import com.ics.common.core.domain.R;
|
||||||
|
import com.ics.common.utils.DateUtils;
|
||||||
|
import com.ics.common.utils.ValidatorUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 房间管理 提供者
|
||||||
|
*
|
||||||
|
* @author zzm
|
||||||
|
* @date 2021-03-24
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/admin/room")
|
||||||
|
public class RoomController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IRoomService roomService;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询房间管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:room:view")
|
||||||
|
@GetMapping("get/{id}")
|
||||||
|
public Room get(@PathVariable("id") Long id) {
|
||||||
|
return roomService.selectRoomById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询房间管理列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:room:list")
|
||||||
|
@GetMapping("list")
|
||||||
|
public R list(Room room) {
|
||||||
|
startPage();
|
||||||
|
room.setDeleteFlag(0);
|
||||||
|
return result(roomService.selectRoomList(room));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存房间管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:room:add")
|
||||||
|
@PostMapping("save")
|
||||||
|
public R addSave(@RequestBody Room room) {
|
||||||
|
ValidatorUtils.validateEntity(room);
|
||||||
|
return toAjax(roomService.insertRoom(room));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存房间管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:room:edit")
|
||||||
|
@PostMapping("update")
|
||||||
|
public R editSave(@RequestBody Room room) {
|
||||||
|
ValidatorUtils.validateEntity(room);
|
||||||
|
return toAjax(roomService.updateRoom(room));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除房间管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:room:remove")
|
||||||
|
@PostMapping("remove")
|
||||||
|
public R remove(String ids) {
|
||||||
|
return toAjax(roomService.deleteRoomByIds(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否上架
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:room:edit")
|
||||||
|
@PostMapping("/changeMarketable")
|
||||||
|
public R changeMarketable(@RequestBody Room room) {
|
||||||
|
Room newRoom = roomService.selectRoomById(room.getId());
|
||||||
|
if (newRoom == null) {
|
||||||
|
return R.error("房间不存在!");
|
||||||
|
}
|
||||||
|
newRoom.setIsMarketable(room.getIsMarketable());
|
||||||
|
newRoom.setMarketableTime(DateUtils.getNowDate());
|
||||||
|
return toAjax(roomService.updateRoom(newRoom));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 房态列表数据
|
||||||
|
* @param roomForm
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:room:list")
|
||||||
|
@GetMapping("map")
|
||||||
|
public R map(Room roomForm){
|
||||||
|
roomForm.setDeleteFlag(0);
|
||||||
|
List<RoomMapVO> parkMapVOList = roomService.selectParkMapVOList(roomForm);
|
||||||
|
return R.data(parkMapVOList);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,102 @@
|
|||||||
|
package com.ics.admin.controller;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.ServiceBanner;
|
||||||
|
import com.ics.admin.service.IServiceBannerService;
|
||||||
|
import com.ics.common.core.controller.BaseController;
|
||||||
|
import com.ics.common.core.domain.R;
|
||||||
|
import com.ics.common.utils.DateUtils;
|
||||||
|
import com.ics.common.utils.ValidatorUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业服务-banner管理 提供者
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2021-03-25
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/admin/sBanner")
|
||||||
|
public class ServiceBannerController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IServiceBannerService serviceBannerService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询企业服务-banner管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:ServiceBanner:edit")
|
||||||
|
@GetMapping("get/{id}")
|
||||||
|
public ServiceBanner get(@PathVariable("id") Long id) {
|
||||||
|
return serviceBannerService.selectServiceBannerById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询企业服务-banner管理列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:ServiceBanner:list")
|
||||||
|
@GetMapping("list")
|
||||||
|
public R list(ServiceBanner serviceBanner) {
|
||||||
|
startPage();
|
||||||
|
return result(serviceBannerService.selectServiceBannerList(serviceBanner));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存企业服务-banner管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:ServiceBanner:add")
|
||||||
|
@PostMapping("save")
|
||||||
|
public R addSave(@RequestBody ServiceBanner serviceBanner) {
|
||||||
|
ValidatorUtils.validateEntity(serviceBanner);
|
||||||
|
return toAjax(serviceBannerService.insertServiceBanner(serviceBanner));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存企业服务-banner管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:ServiceBanner:edit")
|
||||||
|
@PostMapping("update")
|
||||||
|
public R editSave(@RequestBody ServiceBanner serviceBanner) {
|
||||||
|
return toAjax(serviceBannerService.updateServiceBanner(serviceBanner));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除企业服务-banner管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:ServiceBanner:remove")
|
||||||
|
@PostMapping("remove")
|
||||||
|
public R remove(String ids) {
|
||||||
|
return toAjax(serviceBannerService.deleteServiceBannerByIds(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上架、下架
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:ServiceBanner:edit")
|
||||||
|
@PostMapping("changeMarketable")
|
||||||
|
public R changeMarketable(@RequestBody ServiceBanner serviceBanner) {
|
||||||
|
ServiceBanner newServiceBanner = serviceBannerService.selectServiceBannerById(serviceBanner.getId());
|
||||||
|
if (newServiceBanner == null) {
|
||||||
|
return R.error("banner不存在!");
|
||||||
|
}
|
||||||
|
serviceBanner.setMarketableTime(DateUtils.getNowDate());
|
||||||
|
return toAjax(serviceBannerService.updateServiceBanner(serviceBanner));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 置顶,取消置顶
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:ServiceBanner:edit")
|
||||||
|
@PostMapping("changeTop")
|
||||||
|
public R changeTop(@RequestBody ServiceBanner serviceBanner) {
|
||||||
|
ServiceBanner newServiceBanner = serviceBannerService.selectServiceBannerById(serviceBanner.getId());
|
||||||
|
if (newServiceBanner == null) {
|
||||||
|
return R.error("banner不存在!");
|
||||||
|
}
|
||||||
|
return toAjax(serviceBannerService.updateServiceBanner(serviceBanner));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,88 @@
|
|||||||
|
package com.ics.admin.controller;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.ServiceManage;
|
||||||
|
import com.ics.admin.service.IServiceManageService;
|
||||||
|
import com.ics.common.core.controller.BaseController;
|
||||||
|
import com.ics.common.core.domain.R;
|
||||||
|
import com.ics.common.utils.DateUtils;
|
||||||
|
import com.ics.common.utils.ValidatorUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务管理 提供者
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2021-03-26
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/admin/manage")
|
||||||
|
public class ServiceManageController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IServiceManageService serviceManageService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询服务管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:ServiceManage:edit")
|
||||||
|
@GetMapping("get/{id}")
|
||||||
|
public ServiceManage get(@PathVariable("id") Long id) {
|
||||||
|
return serviceManageService.selectServiceManageById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询服务管理列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:ServiceManage:list")
|
||||||
|
@GetMapping("list")
|
||||||
|
public R list(ServiceManage serviceManage) {
|
||||||
|
startPage();
|
||||||
|
return result(serviceManageService.selectServiceManageList(serviceManage));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存服务管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:ServiceManage:add")
|
||||||
|
@PostMapping("save")
|
||||||
|
public R addSave(@RequestBody ServiceManage serviceManage) {
|
||||||
|
ValidatorUtils.validateEntity(serviceManage);
|
||||||
|
return toAjax(serviceManageService.insertServiceManage(serviceManage));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存服务管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:ServiceManage:edit")
|
||||||
|
@PostMapping("update")
|
||||||
|
public R editSave(@RequestBody ServiceManage serviceManage) {
|
||||||
|
return toAjax(serviceManageService.updateServiceManage(serviceManage));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除服务管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:ServiceManage:remove")
|
||||||
|
@PostMapping("remove")
|
||||||
|
public R remove(String ids) {
|
||||||
|
return toAjax(serviceManageService.deleteServiceManageByIds(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上架、下架
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:ServiceManage:edit")
|
||||||
|
@PostMapping("changeMarketable")
|
||||||
|
public R changeMarketable(@RequestBody ServiceManage serviceManage) {
|
||||||
|
ServiceManage newServiceManage = serviceManageService.selectServiceManageById(serviceManage.getId());
|
||||||
|
if (newServiceManage == null) {
|
||||||
|
return R.error("服务不存在!");
|
||||||
|
}
|
||||||
|
serviceManage.setMarketableTime(DateUtils.getNowDate());
|
||||||
|
return toAjax(serviceManageService.updateServiceManage(serviceManage));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,87 @@
|
|||||||
|
package com.ics.admin.controller;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.ServiceMenu;
|
||||||
|
import com.ics.admin.service.IServiceMenuService;
|
||||||
|
import com.ics.common.core.controller.BaseController;
|
||||||
|
import com.ics.common.core.domain.R;
|
||||||
|
import com.ics.common.utils.DateUtils;
|
||||||
|
import com.ics.common.utils.ValidatorUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 菜单管理 提供者
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2021-03-25
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/admin/menu")
|
||||||
|
public class ServiceMenuController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IServiceMenuService serviceMenuService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询菜单管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:ServiceMenu:edit")
|
||||||
|
@GetMapping("get/{id}")
|
||||||
|
public ServiceMenu get(@PathVariable("id") Long id) {
|
||||||
|
return serviceMenuService.selectServiceMenuById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询菜单管理列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:ServiceMenu:list")
|
||||||
|
@GetMapping("list")
|
||||||
|
public R list(ServiceMenu serviceMenu) {
|
||||||
|
startPage();
|
||||||
|
return result(serviceMenuService.selectServiceMenuList(serviceMenu));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存菜单管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:ServiceMenu:add")
|
||||||
|
@PostMapping("save")
|
||||||
|
public R addSave(@RequestBody ServiceMenu serviceMenu) {
|
||||||
|
ValidatorUtils.validateEntity(serviceMenu);
|
||||||
|
return toAjax(serviceMenuService.insertServiceMenu(serviceMenu));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存菜单管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:ServiceMenu:edit")
|
||||||
|
@PostMapping("update")
|
||||||
|
public R editSave(@RequestBody ServiceMenu serviceMenu) {
|
||||||
|
return toAjax(serviceMenuService.updateServiceMenu(serviceMenu));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除菜单管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:ServiceMenu:remove")
|
||||||
|
@PostMapping("remove")
|
||||||
|
public R remove(String ids) {
|
||||||
|
return toAjax(serviceMenuService.deleteServiceMenuByIds(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上架、下架
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:ServiceMenu:edit")
|
||||||
|
@PostMapping("changeMarketable")
|
||||||
|
public R changeMarketable(@RequestBody ServiceMenu serviceMenu) {
|
||||||
|
ServiceMenu newServiceMenu = serviceMenuService.selectServiceMenuById(serviceMenu.getId());
|
||||||
|
if (newServiceMenu == null) {
|
||||||
|
return R.error("菜单不存在!");
|
||||||
|
}
|
||||||
|
serviceMenu.setMarketableTime(DateUtils.getNowDate());
|
||||||
|
return toAjax(serviceMenuService.updateServiceMenu(serviceMenu));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,71 @@
|
|||||||
|
package com.ics.admin.controller;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.ServiceOrder;
|
||||||
|
import com.ics.admin.service.IServiceOrderService;
|
||||||
|
import com.ics.common.core.controller.BaseController;
|
||||||
|
import com.ics.common.core.domain.R;
|
||||||
|
import com.ics.common.utils.ValidatorUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务订单 提供者
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2021-03-26
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/admin/order")
|
||||||
|
public class ServiceOrderController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IServiceOrderService serviceOrderService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询服务订单
|
||||||
|
*/
|
||||||
|
@GetMapping("get/{id}")
|
||||||
|
public ServiceOrder get(@PathVariable("id") Long id) {
|
||||||
|
return serviceOrderService.selectServiceOrderById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询服务订单列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:ServiceOrder:list")
|
||||||
|
@GetMapping("list")
|
||||||
|
public R list(ServiceOrder serviceOrder) {
|
||||||
|
startPage();
|
||||||
|
return result(serviceOrderService.selectServiceOrderList(serviceOrder));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存服务订单
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:ServiceOrder:add")
|
||||||
|
@PostMapping("save")
|
||||||
|
public R addSave(@RequestBody ServiceOrder serviceOrder) {
|
||||||
|
ValidatorUtils.validateEntity(serviceOrder);
|
||||||
|
return toAjax(serviceOrderService.insertServiceOrder(serviceOrder));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存服务订单
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:ServiceOrder:edit")
|
||||||
|
@PostMapping("update")
|
||||||
|
public R editSave(@RequestBody ServiceOrder serviceOrder) {
|
||||||
|
return toAjax(serviceOrderService.updateServiceOrder(serviceOrder));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除服务订单
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:ServiceOrder:remove")
|
||||||
|
@PostMapping("remove")
|
||||||
|
public R remove(String ids) {
|
||||||
|
return toAjax(serviceOrderService.deleteServiceOrderByIds(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,82 @@
|
|||||||
|
package com.ics.admin.controller;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.ServiceSupplier;
|
||||||
|
import com.ics.admin.service.IServiceSupplierService;
|
||||||
|
import com.ics.common.core.controller.BaseController;
|
||||||
|
import com.ics.common.core.domain.R;
|
||||||
|
import com.ics.common.utils.ValidatorUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供应商管理 提供者
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2021-03-26
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/admin/supplier")
|
||||||
|
public class ServiceSupplierController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IServiceSupplierService serviceSupplierService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询供应商管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:supplier:edit")
|
||||||
|
@GetMapping("get/{id}")
|
||||||
|
public ServiceSupplier get(@PathVariable("id") Long id) {
|
||||||
|
return serviceSupplierService.selectServiceSupplierById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询供应商管理列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:supplier:list")
|
||||||
|
@GetMapping("list")
|
||||||
|
public R list(ServiceSupplier serviceSupplier) {
|
||||||
|
startPage();
|
||||||
|
return result(serviceSupplierService.selectServiceSupplierList(serviceSupplier));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询供应商管理列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:supplier:list")
|
||||||
|
@GetMapping("allList")
|
||||||
|
public R allList(ServiceSupplier serviceSupplier) {
|
||||||
|
return R.data(serviceSupplierService.selectServiceSupplierList(serviceSupplier));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存供应商管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:supplier:add")
|
||||||
|
@PostMapping("save")
|
||||||
|
public R addSave(@RequestBody ServiceSupplier serviceSupplier) {
|
||||||
|
ValidatorUtils.validateEntity(serviceSupplier);
|
||||||
|
return toAjax(serviceSupplierService.insertServiceSupplier(serviceSupplier));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存供应商管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:supplier:edit")
|
||||||
|
@PostMapping("update")
|
||||||
|
public R editSave(@RequestBody ServiceSupplier serviceSupplier) {
|
||||||
|
ValidatorUtils.validateEntity(serviceSupplier);
|
||||||
|
return toAjax(serviceSupplierService.updateServiceSupplier(serviceSupplier));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除供应商管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:supplier:remove")
|
||||||
|
@PostMapping("remove")
|
||||||
|
public R remove(String ids) {
|
||||||
|
return toAjax(serviceSupplierService.deleteServiceSupplierByIds(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,100 @@
|
|||||||
|
package com.ics.admin.controller;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.Suggestion;
|
||||||
|
import com.ics.admin.service.ISuggestionService;
|
||||||
|
import com.ics.common.core.controller.BaseController;
|
||||||
|
import com.ics.common.core.domain.R;
|
||||||
|
import com.ics.common.utils.DateUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.wf.jwtp.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 投诉建议 提供者
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2021-04-12
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/admin/suggestion")
|
||||||
|
public class SuggestionController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISuggestionService suggestionService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询投诉建议
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:suggestion:edit")
|
||||||
|
@GetMapping("get/{id}")
|
||||||
|
public Suggestion get(@PathVariable("id") Long id) {
|
||||||
|
return suggestionService.selectSuggestionById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询投诉建议列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:suggestion:list")
|
||||||
|
@GetMapping("list")
|
||||||
|
public R list(Suggestion suggestion) {
|
||||||
|
startPage();
|
||||||
|
return result(suggestionService.selectSuggestionList(suggestion));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分派对接人
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:suggestion:edit")
|
||||||
|
@PostMapping("/review")
|
||||||
|
public R review(@RequestBody Suggestion suggestion) {
|
||||||
|
Suggestion newSuggestion = suggestionService.selectSuggestionById(suggestion.getId());
|
||||||
|
if (newSuggestion == null) {
|
||||||
|
return R.error("分派失败");
|
||||||
|
}
|
||||||
|
suggestion.setStatus(2);
|
||||||
|
suggestion.setProcessingTime(DateUtils.getNowDate());
|
||||||
|
return toAjax(suggestionService.updateSuggestion(suggestion));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:suggestion:edit")
|
||||||
|
@PostMapping("/complete")
|
||||||
|
public R complete(@RequestBody Suggestion suggestion) {
|
||||||
|
Suggestion newSuggestion = suggestionService.selectSuggestionById(suggestion.getId());
|
||||||
|
if (newSuggestion == null) {
|
||||||
|
return R.error("信息不存在");
|
||||||
|
}
|
||||||
|
suggestion.setStatus(3);
|
||||||
|
return toAjax(suggestionService.updateSuggestion(suggestion));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存投诉建议
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:suggestion:add")
|
||||||
|
@PostMapping("save")
|
||||||
|
public R addSave(@RequestBody Suggestion suggestion) {
|
||||||
|
return toAjax(suggestionService.insertSuggestion(suggestion));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存投诉建议
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:suggestion:edit")
|
||||||
|
@PostMapping("update")
|
||||||
|
public R editSave(@RequestBody Suggestion suggestion) {
|
||||||
|
return toAjax(suggestionService.updateSuggestion(suggestion));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除投诉建议
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("admin:suggestion:remove")
|
||||||
|
@PostMapping("remove")
|
||||||
|
public R remove(String ids) {
|
||||||
|
return toAjax(suggestionService.deleteSuggestionByIds(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
173
ics-admin/src/main/java/com/ics/admin/domain/Activity.java
Normal file
173
ics-admin/src/main/java/com/ics/admin/domain/Activity.java
Normal file
@ -0,0 +1,173 @@
|
|||||||
|
package com.ics.admin.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IEnum;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.ics.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动管理对象 ics_activity
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2021-03-25
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("ics_activity")
|
||||||
|
public class Activity extends BaseEntity<Activity> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报名开始时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
|
||||||
|
private Date signBegin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报名结止时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
|
||||||
|
private Date signEnd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动开始时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
|
||||||
|
private Date actBegin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动结止时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
|
||||||
|
private Date actEnd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动地点
|
||||||
|
*/
|
||||||
|
private String location;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传活动头图
|
||||||
|
*/
|
||||||
|
private String headImg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传活动小图
|
||||||
|
*/
|
||||||
|
private String smallImg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传详情
|
||||||
|
*/
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系电话
|
||||||
|
*/
|
||||||
|
private String contract;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动金额
|
||||||
|
*/
|
||||||
|
private Long price;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 限制人数
|
||||||
|
*/
|
||||||
|
private Long fullNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
private Status status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
public enum Status implements IEnum<Integer> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报名未开始
|
||||||
|
*/
|
||||||
|
SIGN_NOT_START("报名未开始", 0),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报名中
|
||||||
|
*/
|
||||||
|
SIGNING("报名中", 1),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动未开始
|
||||||
|
*/
|
||||||
|
ACT_NOT_START("活动未开始", 2),
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已满额
|
||||||
|
*/
|
||||||
|
SIGN_END("已满额", 3),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动中
|
||||||
|
*/
|
||||||
|
ACTING("活动中", 4),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动结束
|
||||||
|
*/
|
||||||
|
ACT_END("活动结束", 5);
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
private int value;
|
||||||
|
|
||||||
|
Status(String name, int value) {
|
||||||
|
this.name = name;
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer getValue() {
|
||||||
|
return this.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return this.name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Status parse(Integer value) {
|
||||||
|
for (Status status : values()) {
|
||||||
|
if (status.getValue().equals(value)) {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否上架
|
||||||
|
*/
|
||||||
|
private Boolean isMarketable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上架时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
|
||||||
|
private Date marketableTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
List<ActivityDetail> activityDetailList;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,63 @@
|
|||||||
|
package com.ics.admin.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.ics.common.core.domain.BaseEntity;
|
||||||
|
import com.ics.system.domain.User;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动报名详情对象 ics_activity_detail
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2021-03-25
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("ics_activity_detail")
|
||||||
|
public class ActivityDetail extends BaseEntity<ActivityDetail> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户名
|
||||||
|
*/
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户性别
|
||||||
|
*/
|
||||||
|
private String sex;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 手机号
|
||||||
|
*/
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报名时间
|
||||||
|
*/
|
||||||
|
private Date signDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户表id
|
||||||
|
*/
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动id
|
||||||
|
*/
|
||||||
|
private Long actId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联用户对象
|
||||||
|
*/
|
||||||
|
private User user;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联用户对象
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Activity activity;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,95 @@
|
|||||||
|
package com.ics.admin.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.ics.admin.handler.ApplySettleStatusEnumHandler;
|
||||||
|
import com.ics.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 注册迁入申请对象 ics_apply_move_in
|
||||||
|
*
|
||||||
|
* @author zzm
|
||||||
|
* @date 2021-04-13
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("ics_apply_move_in")
|
||||||
|
public class ApplyMoveIn extends BaseEntity<ApplyMoveIn> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 申请业务 */
|
||||||
|
@NotNull(message = "申请业务不能为空")
|
||||||
|
private Long type;
|
||||||
|
|
||||||
|
/** 申请人 */
|
||||||
|
@NotBlank(message = "申请人不能为空")
|
||||||
|
private String applyName;
|
||||||
|
|
||||||
|
/** 承租物业地址 */
|
||||||
|
@NotBlank(message = "承租物业地址不能为空")
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
/** 租赁物业面积 */
|
||||||
|
@NotNull(message = "租赁物业面积不能为空")
|
||||||
|
private BigDecimal area;
|
||||||
|
|
||||||
|
/** 姓名 */
|
||||||
|
@NotBlank(message = "姓名不能为空")
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
/** 联系电话 */
|
||||||
|
@NotBlank(message = "联系电话不能为空")
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
/** 物业合同编号 */
|
||||||
|
@NotBlank(message = "物业合同编号不能为空")
|
||||||
|
private String contractNo;
|
||||||
|
|
||||||
|
/** 审批状态 */
|
||||||
|
@TableField(typeHandler = ApplySettleStatusEnumHandler.class)
|
||||||
|
private ApplySettle.Status status;
|
||||||
|
|
||||||
|
|
||||||
|
/** 租赁开始时间 */
|
||||||
|
@NotNull(message = "租赁开始时间不能为空")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date rentStartTime;
|
||||||
|
|
||||||
|
/** 租赁结束时间 */
|
||||||
|
@NotNull(message = "租赁结束时间不能为空")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date rentEndTime;
|
||||||
|
|
||||||
|
/** 拟成立/迁入企业名称 */
|
||||||
|
@NotBlank(message = "拟成立/迁入企业名称不能为空")
|
||||||
|
private String companyName;
|
||||||
|
|
||||||
|
/** 与申请人关系:子公司/分公司/其他 */
|
||||||
|
@NotNull(message = "与申请人关系不能为空")
|
||||||
|
private Long relation;
|
||||||
|
|
||||||
|
/** 申请人承诺 */
|
||||||
|
@NotBlank(message = "申请人承诺不能为空")
|
||||||
|
private String promise;
|
||||||
|
|
||||||
|
/** 创建人id */
|
||||||
|
private Long createUserId;
|
||||||
|
|
||||||
|
/** 审批意见 */
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联迁入文件
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<ApplyMoveInFile> applyMoveInFileList;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,39 @@
|
|||||||
|
package com.ics.admin.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 注册迁入申请上传文件对象 ics_apply_move_in_file
|
||||||
|
*
|
||||||
|
* @author zzm
|
||||||
|
* @date 2021-04-13
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("ics_apply_move_in_file")
|
||||||
|
public class ApplyMoveInFile implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 注册迁入id */
|
||||||
|
private Long moveInId;
|
||||||
|
|
||||||
|
/** 文件名称 */
|
||||||
|
private String fileName;
|
||||||
|
|
||||||
|
/** 文件路径 */
|
||||||
|
private String filePath;
|
||||||
|
|
||||||
|
}
|
127
ics-admin/src/main/java/com/ics/admin/domain/ApplyPark.java
Normal file
127
ics-admin/src/main/java/com/ics/admin/domain/ApplyPark.java
Normal file
@ -0,0 +1,127 @@
|
|||||||
|
package com.ics.admin.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.ics.admin.handler.ApplySettleStatusEnumHandler;
|
||||||
|
import com.ics.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 入园申请对象 ics_apply_park
|
||||||
|
*
|
||||||
|
* @author zzm
|
||||||
|
* @date 2021-04-12
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("ics_apply_park")
|
||||||
|
public class ApplyPark extends BaseEntity<ApplyPark> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 入园企业名称 */
|
||||||
|
@NotBlank(message = "入园企业名称不能为空")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@NotNull(message = "公司原办公地址不能为空")
|
||||||
|
/** 公司原办公地址 */
|
||||||
|
private Long type;
|
||||||
|
|
||||||
|
/** 是否注册 */
|
||||||
|
@NotNull(message = "是否注册不能为空")
|
||||||
|
private Boolean isRegister;
|
||||||
|
|
||||||
|
/** 法人代表 */
|
||||||
|
@NotBlank(message = "法人代表不能为空")
|
||||||
|
private String operName;
|
||||||
|
|
||||||
|
/** 注册资本 */
|
||||||
|
@NotBlank(message = "注册资本不能为空")
|
||||||
|
private String registCapi;
|
||||||
|
|
||||||
|
/** 公司类型(企业性质) */
|
||||||
|
private String econKind;
|
||||||
|
|
||||||
|
|
||||||
|
/** 审批状态 */
|
||||||
|
@TableField(typeHandler = ApplySettleStatusEnumHandler.class)
|
||||||
|
private ApplySettle.Status status;
|
||||||
|
|
||||||
|
|
||||||
|
/** 国家 */
|
||||||
|
private String nation;
|
||||||
|
|
||||||
|
/** 姓名 */
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
/** 职务 */
|
||||||
|
private String position;
|
||||||
|
|
||||||
|
/** 联系电话 */
|
||||||
|
@NotBlank(message = "联系电话不能为空")
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
/** 联系QQ */
|
||||||
|
private String qq;
|
||||||
|
|
||||||
|
/** 邮箱 */
|
||||||
|
private String email;
|
||||||
|
|
||||||
|
/** 网址 */
|
||||||
|
private String site;
|
||||||
|
|
||||||
|
/** 公司人数 */
|
||||||
|
private Long persons;
|
||||||
|
|
||||||
|
/** 是否合法合规 */
|
||||||
|
private Boolean isCompliance;
|
||||||
|
|
||||||
|
/** 预估年产值 */
|
||||||
|
private BigDecimal preYearValue;
|
||||||
|
|
||||||
|
/** 期望入驻开始时间 */
|
||||||
|
@NotNull(message = "期望入驻开始时间不能为空")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date startDate;
|
||||||
|
|
||||||
|
/** 期望入驻结束时间 */
|
||||||
|
@NotNull(message = "期望入驻结束时间不能为空")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date endDate;
|
||||||
|
|
||||||
|
/** 申请办公面积 */
|
||||||
|
@NotNull(message = "申请办公面积不能为空")
|
||||||
|
private BigDecimal applyArea;
|
||||||
|
|
||||||
|
/** 简介 */
|
||||||
|
private String profile;
|
||||||
|
|
||||||
|
/** 主要业务范围 */
|
||||||
|
private String scope;
|
||||||
|
|
||||||
|
/** 企业优势 */
|
||||||
|
private String advantage;
|
||||||
|
|
||||||
|
/** 申请入驻原因 */
|
||||||
|
@NotBlank(message = "申请入驻原因不能为空")
|
||||||
|
private String reason;
|
||||||
|
|
||||||
|
/** 备注 */
|
||||||
|
private String memo;
|
||||||
|
|
||||||
|
/** 创建用户id */
|
||||||
|
private Long createUserId;
|
||||||
|
|
||||||
|
/** 审批意见 */
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<ApplyParkFile> applyParkFileList;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,38 @@
|
|||||||
|
package com.ics.admin.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 入园申请相关文件对象 ics_apply_park_files
|
||||||
|
*
|
||||||
|
* @author zzm
|
||||||
|
* @date 2021-04-12
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("ics_apply_park_file")
|
||||||
|
public class ApplyParkFile implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 申请入园id */
|
||||||
|
private Long applyParkId;
|
||||||
|
|
||||||
|
/** 文件名称 */
|
||||||
|
private String fileName;
|
||||||
|
|
||||||
|
/** 文件路径 */
|
||||||
|
private String filePath;
|
||||||
|
|
||||||
|
}
|
29
ics-admin/src/main/java/com/ics/admin/domain/ApplyRoom.java
Normal file
29
ics-admin/src/main/java/com/ics/admin/domain/ApplyRoom.java
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
package com.ics.admin.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请房间关联对象 ics_apply_room
|
||||||
|
*
|
||||||
|
* @author zzm
|
||||||
|
* @date 2021-03-31
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("ics_apply_room")
|
||||||
|
public class ApplyRoom implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 房间id
|
||||||
|
*/
|
||||||
|
private Long roomId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请用户id
|
||||||
|
*/
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
}
|
131
ics-admin/src/main/java/com/ics/admin/domain/ApplySettle.java
Normal file
131
ics-admin/src/main/java/com/ics/admin/domain/ApplySettle.java
Normal file
@ -0,0 +1,131 @@
|
|||||||
|
package com.ics.admin.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IEnum;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.ics.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 入驻申请对象 ics_apply_settle
|
||||||
|
*
|
||||||
|
* @author zzm
|
||||||
|
* @date 2021-04-12
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("ics_apply_settle")
|
||||||
|
public class ApplySettle extends BaseEntity<ApplySettle> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 入驻企业名称 */
|
||||||
|
@NotBlank(message = "入驻企业名称不能为空")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/** 姓名 */
|
||||||
|
@NotBlank(message = "姓名不能为空")
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
/** 法人代表 */
|
||||||
|
@NotBlank(message = "法人代表不能为空")
|
||||||
|
private String operName;
|
||||||
|
|
||||||
|
/** 公司原办公地址 */
|
||||||
|
@NotNull(message = "公司原办公地址不能为空")
|
||||||
|
private Long type;
|
||||||
|
|
||||||
|
/** 所需办公面积 */
|
||||||
|
@NotNull(message = "所需办公面积不能为空")
|
||||||
|
private BigDecimal needArea;
|
||||||
|
|
||||||
|
/** 首批入驻人数 */
|
||||||
|
private Long persons;
|
||||||
|
|
||||||
|
/** 申请入驻日期 */
|
||||||
|
@NotNull(message = "申请入驻日期不能为空")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date startTime;
|
||||||
|
|
||||||
|
/** 联系电话 */
|
||||||
|
@NotBlank(message = "联系电话不能为空")
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
|
||||||
|
/** 邮箱 */
|
||||||
|
private String email;
|
||||||
|
|
||||||
|
/** 审批状态 */
|
||||||
|
private Status status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审批状态
|
||||||
|
*/
|
||||||
|
public enum Status implements IEnum<Integer> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 待审批
|
||||||
|
*/
|
||||||
|
APPROVING("待审批", 0),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审批通过
|
||||||
|
*/
|
||||||
|
PASS("审批通过", 1),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已拒绝
|
||||||
|
*/
|
||||||
|
REFUSE("已拒绝", 2);
|
||||||
|
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
private int value;
|
||||||
|
|
||||||
|
Status(String name, int value) {
|
||||||
|
this.name = name;
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer getValue() {
|
||||||
|
return this.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return this.name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Status parse(Integer value) {
|
||||||
|
for (Status status : values()) {
|
||||||
|
if (status.getValue().equals(value)) {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建用户id
|
||||||
|
*/
|
||||||
|
private Long createUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审批意见
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联上传文件
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<ApplySettleFile> applySettleFileList;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,39 @@
|
|||||||
|
package com.ics.admin.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 入驻申请相关文件对象 ics_apply_settle_files
|
||||||
|
*
|
||||||
|
* @author zzm
|
||||||
|
* @date 2021-04-13
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("ics_apply_settle_file")
|
||||||
|
public class ApplySettleFile implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 申请入驻id */
|
||||||
|
private Long applySettleId;
|
||||||
|
|
||||||
|
/** 文件名称 */
|
||||||
|
private String fileName;
|
||||||
|
|
||||||
|
/** 文件路径 */
|
||||||
|
private String filePath;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,40 @@
|
|||||||
|
package com.ics.admin.domain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import org.apache.commons.lang3.builder.CompareToBuilder;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 园区banner图片
|
||||||
|
*
|
||||||
|
* @author jack
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class BannerImage implements Serializable, Comparable<BannerImage> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图片id
|
||||||
|
*/
|
||||||
|
private Integer uid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图片名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图片地址
|
||||||
|
*/
|
||||||
|
private String url;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int compareTo(BannerImage bannerImage) {
|
||||||
|
if (bannerImage == null) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return new CompareToBuilder().append(getUid(), bannerImage.getUid()).toComparison();
|
||||||
|
}
|
||||||
|
}
|
38
ics-admin/src/main/java/com/ics/admin/domain/Building.java
Normal file
38
ics-admin/src/main/java/com/ics/admin/domain/Building.java
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
package com.ics.admin.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.ics.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 楼宇管理对象 ics_building
|
||||||
|
*
|
||||||
|
* @author zzm
|
||||||
|
* @date 2021-03-24
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("ics_building")
|
||||||
|
public class Building extends BaseEntity<Building> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 楼宇名称
|
||||||
|
*/
|
||||||
|
private String buildingName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 楼宇平面图
|
||||||
|
*/
|
||||||
|
private String buildingPic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联园区
|
||||||
|
*/
|
||||||
|
private Park park;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,38 @@
|
|||||||
|
package com.ics.admin.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.ics.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 楼层管理对象 ics_building_detail
|
||||||
|
*
|
||||||
|
* @author zzm
|
||||||
|
* @date 2021-03-24
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("ics_building_detail")
|
||||||
|
public class BuildingDetail extends BaseEntity<BuildingDetail> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 楼宇id
|
||||||
|
*/
|
||||||
|
private Long buildingId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 楼层编号
|
||||||
|
*/
|
||||||
|
private Long floorNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 楼层名称
|
||||||
|
*/
|
||||||
|
private String floorName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 楼层平面图
|
||||||
|
*/
|
||||||
|
private String floorPic;
|
||||||
|
|
||||||
|
}
|
130
ics-admin/src/main/java/com/ics/admin/domain/Clue.java
Normal file
130
ics-admin/src/main/java/com/ics/admin/domain/Clue.java
Normal file
@ -0,0 +1,130 @@
|
|||||||
|
package com.ics.admin.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.ics.common.core.domain.BaseEntity;
|
||||||
|
import com.ics.system.domain.User;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 线索管理对象 ics_clue
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2021-03-23
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("ics_clue")
|
||||||
|
public class Clue extends BaseEntity<Clue> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主题
|
||||||
|
*/
|
||||||
|
private String clueName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 线索来源:0-现场接待,1-主动电访,2-邮件,3-客户来电,4-短信,5-上门拜访
|
||||||
|
*/
|
||||||
|
private String source;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 渠道分类:0-中价公司,1-广告,2-合作推荐,3-自开发渠道
|
||||||
|
*/
|
||||||
|
private String channelCategory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 渠道名称
|
||||||
|
*/
|
||||||
|
private String channelName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 详细描述
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户名称
|
||||||
|
*/
|
||||||
|
private String customerName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态:0-激活,1-已关闭,2-已转客户
|
||||||
|
*/
|
||||||
|
private String customerStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分派时间
|
||||||
|
*/
|
||||||
|
private Date assignmentTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分派状态:(0-待分配,1-已分派)
|
||||||
|
*/
|
||||||
|
private String assignmentStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对接人id
|
||||||
|
*/
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关闭原因:0-电话打不通,1-客户暂无需求,2—客户需求已经满足,3—重复线索,4-其他
|
||||||
|
*/
|
||||||
|
private String closeReason;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关闭说明
|
||||||
|
*/
|
||||||
|
private String closeExplain;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户类型(0-公司,1-个人)
|
||||||
|
*/
|
||||||
|
private String customerType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 纳税人识别号
|
||||||
|
*/
|
||||||
|
private String creditNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属行业
|
||||||
|
*/
|
||||||
|
private String sector;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系人
|
||||||
|
*/
|
||||||
|
private String contacts;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系电话
|
||||||
|
*/
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邮箱
|
||||||
|
*/
|
||||||
|
private String email;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通讯地址
|
||||||
|
*/
|
||||||
|
private String mailAddress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邮编
|
||||||
|
*/
|
||||||
|
private String postalCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户
|
||||||
|
*/
|
||||||
|
private User user;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private ApplyRoom applyRoom;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,100 @@
|
|||||||
|
package com.ics.admin.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.ics.common.core.domain.BaseEntity;
|
||||||
|
import com.ics.system.domain.User;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.persistence.Transient;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 线索跟进对象 ics_clue_investigation
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2021-03-23
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("ics_clue_investigation")
|
||||||
|
public class ClueInvestigation extends BaseEntity<ClueInvestigation> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 线索id
|
||||||
|
*/
|
||||||
|
private Long clueId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 意向状态(0-强烈,1-一般,2-无,3-未知)
|
||||||
|
*/
|
||||||
|
private String intentionState;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 跟进时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date investigationTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 跟进方式(0-客户上门,1-主动拜访,2-客户来电,3-主动电访,4-短信,5-微信,6-邮件,7-其他)
|
||||||
|
*/
|
||||||
|
private String investigationMode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 跟进记录
|
||||||
|
*/
|
||||||
|
private String investigationRecord;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划跟进时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date planTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划跟进内容
|
||||||
|
*/
|
||||||
|
private String planDetailed;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 线索来源(搜索条件)
|
||||||
|
*/
|
||||||
|
@Transient
|
||||||
|
private String source;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 信息检索(搜索条件)
|
||||||
|
*/
|
||||||
|
@Transient
|
||||||
|
private String retrieval;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户id(搜索条件)
|
||||||
|
*/
|
||||||
|
@Transient
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态(搜索条件)
|
||||||
|
*/
|
||||||
|
@Transient
|
||||||
|
private String customerStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分派状态(搜索条件)
|
||||||
|
*/
|
||||||
|
@Transient
|
||||||
|
private String assignmentStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户表
|
||||||
|
*/
|
||||||
|
private User user;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 线索管理表
|
||||||
|
*/
|
||||||
|
private Clue clue;
|
||||||
|
|
||||||
|
}
|
402
ics-admin/src/main/java/com/ics/admin/domain/Customer.java
Normal file
402
ics-admin/src/main/java/com/ics/admin/domain/Customer.java
Normal file
@ -0,0 +1,402 @@
|
|||||||
|
package com.ics.admin.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IEnum;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.ics.admin.handler.BannerImageHandler;
|
||||||
|
import com.ics.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户管理对象 ics_customer
|
||||||
|
*
|
||||||
|
* @author zzm
|
||||||
|
* @date 2021-03-29
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("ics_customer")
|
||||||
|
public class Customer extends BaseEntity<Customer> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最大Banner图片数量
|
||||||
|
*/
|
||||||
|
public static final int MAX_BANNER_IMAGE_SIZE = 6;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户名称
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "客户名称不能为空")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 简称
|
||||||
|
*/
|
||||||
|
private String shortName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业头像
|
||||||
|
*/
|
||||||
|
private String headImg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 照片墙
|
||||||
|
*/
|
||||||
|
@TableField(typeHandler = BannerImageHandler.class)
|
||||||
|
private List<BannerImage> bannerImages = new ArrayList<>();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户类型
|
||||||
|
*/
|
||||||
|
private Type type;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户类型
|
||||||
|
*/
|
||||||
|
public enum Type implements IEnum<Integer> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公司
|
||||||
|
*/
|
||||||
|
COMPANY("公司", 0),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 个人
|
||||||
|
*/
|
||||||
|
PERSON("个人", 1);
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
private int value;
|
||||||
|
|
||||||
|
Type(String name, int value) {
|
||||||
|
this.name = name;
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer getValue() {
|
||||||
|
return this.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return this.name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Type parse(Integer value) {
|
||||||
|
for (Type type : values()) {
|
||||||
|
if (type.getValue().equals(value)) {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户状态
|
||||||
|
*/
|
||||||
|
private CustomerStatus customerStatus;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户类型
|
||||||
|
*/
|
||||||
|
public enum CustomerStatus implements IEnum<Integer> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 潜在客户
|
||||||
|
*/
|
||||||
|
POTENTIAL("潜在客户", 0),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 意向客户
|
||||||
|
*/
|
||||||
|
PURPOSE("意向客户", 1),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 成交客户
|
||||||
|
*/
|
||||||
|
DEAL("成交客户", 2),
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流失客户
|
||||||
|
*/
|
||||||
|
LOSE("流失客户", 3);
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
private int value;
|
||||||
|
|
||||||
|
CustomerStatus(String name, int value) {
|
||||||
|
this.name = name;
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer getValue() {
|
||||||
|
return this.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return this.name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static CustomerStatus parse(Integer value) {
|
||||||
|
for (CustomerStatus customerStatus : values()) {
|
||||||
|
if (customerStatus.getValue().equals(value)) {
|
||||||
|
return customerStatus;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属行业
|
||||||
|
*/
|
||||||
|
private String sector;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属国家
|
||||||
|
*/
|
||||||
|
private String country;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 过程管理
|
||||||
|
*/
|
||||||
|
private Process process;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 过程管理
|
||||||
|
*/
|
||||||
|
public enum Process implements IEnum<Integer> {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初次拜访
|
||||||
|
*/
|
||||||
|
FIRST_VISIT("初次拜访", 0),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 需求引导分析
|
||||||
|
*/
|
||||||
|
NEED_GUID("需求引导分析", 1),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 竞争阶段
|
||||||
|
*/
|
||||||
|
COMPETE("竞争阶段", 2),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预定阶段
|
||||||
|
*/
|
||||||
|
PREDETERMINE("预定阶段", 3),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同阶段
|
||||||
|
*/
|
||||||
|
CONTRACT("合同阶段", 4);
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
private int value;
|
||||||
|
|
||||||
|
Process(String name, int value) {
|
||||||
|
this.name = name;
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer getValue() {
|
||||||
|
return this.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return this.name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Process parse(Integer value) {
|
||||||
|
for (Process process : values()) {
|
||||||
|
if (process.getValue().equals(value)) {
|
||||||
|
return process;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系人
|
||||||
|
*/
|
||||||
|
private String contacts;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系电话
|
||||||
|
*/
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邮箱
|
||||||
|
*/
|
||||||
|
private String email;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统一信用代码
|
||||||
|
*/
|
||||||
|
private String creditNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通讯地址
|
||||||
|
*/
|
||||||
|
private String mailAddress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邮编
|
||||||
|
*/
|
||||||
|
private String postalCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 渠道分类
|
||||||
|
*/
|
||||||
|
private ChannelType channelType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 渠道分类
|
||||||
|
*/
|
||||||
|
public enum ChannelType implements IEnum<Integer> {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 中介公司
|
||||||
|
*/
|
||||||
|
AGENT("中介公司", 0),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 广告
|
||||||
|
*/
|
||||||
|
AD("广告", 1),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 自开发渠道
|
||||||
|
*/
|
||||||
|
MY_CHANNEL("自开发渠道", 2),
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合作推荐
|
||||||
|
*/
|
||||||
|
COOPERATE("合作推荐", 3);
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
private int value;
|
||||||
|
|
||||||
|
ChannelType(String name, int value) {
|
||||||
|
this.name = name;
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer getValue() {
|
||||||
|
return this.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return this.name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ChannelType parse(Integer value) {
|
||||||
|
for (ChannelType channelType : values()) {
|
||||||
|
if (channelType.getValue().equals(value)) {
|
||||||
|
return channelType;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 渠道名称
|
||||||
|
*/
|
||||||
|
private String channelName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否黑名单(0-否,1-是)
|
||||||
|
*/
|
||||||
|
private Boolean isBlacklist;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工商注册号
|
||||||
|
*/
|
||||||
|
private String regNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 经营状态
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组织机构代码
|
||||||
|
*/
|
||||||
|
private String orgNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 法人名
|
||||||
|
*/
|
||||||
|
private String operName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公司类型(企业性质)
|
||||||
|
*/
|
||||||
|
private String econKind;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 成立日期
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date startDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 登记机关
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "登记机关不能为空")
|
||||||
|
private String belongOrg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 注册资金
|
||||||
|
*/
|
||||||
|
private String registCapi;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 注销日期
|
||||||
|
*/
|
||||||
|
private String endDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 注册地址
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "注册地址不能为空")
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 经营范围
|
||||||
|
*/
|
||||||
|
private String scope;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联园区
|
||||||
|
*/
|
||||||
|
private Park park;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
package com.ics.admin.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.ics.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户附件对象 ics_customer_attachments
|
||||||
|
*
|
||||||
|
* @author zzm
|
||||||
|
* @date 2021-03-29
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("ics_customer_attachments")
|
||||||
|
public class CustomerAttachments extends BaseEntity<CustomerAttachments> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件名
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件地址
|
||||||
|
*/
|
||||||
|
private String url;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户id
|
||||||
|
*/
|
||||||
|
private Long customerId;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,38 @@
|
|||||||
|
package com.ics.admin.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.ics.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系人对象 ics_customer_contacts
|
||||||
|
*
|
||||||
|
* @author zzm
|
||||||
|
* @date 2021-03-29
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("ics_customer_contacts")
|
||||||
|
public class CustomerContacts extends BaseEntity<CustomerContacts> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系人
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系电话
|
||||||
|
*/
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户id
|
||||||
|
*/
|
||||||
|
private Long customerId;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,391 @@
|
|||||||
|
package com.ics.admin.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IEnum;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.ics.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户合同对象 ics_customer_contract
|
||||||
|
*
|
||||||
|
* @author zzm
|
||||||
|
* @date 2021-03-29
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("ics_customer_contract")
|
||||||
|
public class CustomerContract extends BaseEntity<CustomerContract> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户id
|
||||||
|
*/
|
||||||
|
@NotNull(message = "客户id不能为空!")
|
||||||
|
private Long customerId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同名称
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "合同名称不能为空!")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同编号
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "合同编号不能为空!")
|
||||||
|
private String sn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物管合同编号
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "物管合同编号不能为空!")
|
||||||
|
private String pmSn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 管理编号
|
||||||
|
*/
|
||||||
|
private String manageSn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同状态
|
||||||
|
*/
|
||||||
|
private Status status;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同状态
|
||||||
|
*/
|
||||||
|
public enum Status implements IEnum<Integer> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 草稿
|
||||||
|
*/
|
||||||
|
DRAFT("草稿", 0),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 待审批
|
||||||
|
*/
|
||||||
|
APPROVING("待审批", 1),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已审批
|
||||||
|
*/
|
||||||
|
APPROVED("已审批", 2),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已拒绝
|
||||||
|
*/
|
||||||
|
REFUSE("已拒绝", 3),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行中
|
||||||
|
*/
|
||||||
|
EXECUTING("执行中", 4),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已作废
|
||||||
|
*/
|
||||||
|
VOIDED("已作废", 5),
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已到期
|
||||||
|
*/
|
||||||
|
OVERDUE("已到期", 6),
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已结束
|
||||||
|
*/
|
||||||
|
END("已结束", 7);
|
||||||
|
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
private int value;
|
||||||
|
|
||||||
|
Status(String name, int value) {
|
||||||
|
this.name = name;
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer getValue() {
|
||||||
|
return this.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return this.name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Status parse(Integer value) {
|
||||||
|
for (Status status : values()) {
|
||||||
|
if (status.getValue().equals(value)) {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同类型(0-正式合同,1-意向合同)
|
||||||
|
*/
|
||||||
|
private Type type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同类型
|
||||||
|
*/
|
||||||
|
public enum Type implements IEnum<Integer> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 正式合同
|
||||||
|
*/
|
||||||
|
OFFICIAL("正式合同", 0),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 意向合同
|
||||||
|
*/
|
||||||
|
INTENTION("意向合同", 1);
|
||||||
|
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
private int value;
|
||||||
|
|
||||||
|
Type(String name, int value) {
|
||||||
|
this.name = name;
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer getValue() {
|
||||||
|
return this.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return this.name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Type parse(Integer value) {
|
||||||
|
for (Type type : values()) {
|
||||||
|
if (type.getValue().equals(value)) {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 需求开始时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date needStartDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 需求结束时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date needEndDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租赁开始期限
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date startDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租赁结束期限
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date endDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 账单收款日
|
||||||
|
*/
|
||||||
|
private Long receiveRentDay;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租赁共几个月
|
||||||
|
*/
|
||||||
|
private Long totalMonths;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 签订日期
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date signDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租赁方 0:公司租赁 2:个人租赁
|
||||||
|
*/
|
||||||
|
private Long lessorType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户名称(企业名称)
|
||||||
|
*/
|
||||||
|
private String customerName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户类型
|
||||||
|
*/
|
||||||
|
private Long customerType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属行业
|
||||||
|
*/
|
||||||
|
private String sector;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公司邮箱
|
||||||
|
*/
|
||||||
|
private String email;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统一信用代码
|
||||||
|
*/
|
||||||
|
private String creditNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 法人
|
||||||
|
*/
|
||||||
|
private String operName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 渠道名称
|
||||||
|
*/
|
||||||
|
private String channelName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系电话
|
||||||
|
*/
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地址
|
||||||
|
*/
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 意向金
|
||||||
|
*/
|
||||||
|
private BigDecimal intentionMoney;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 管理费单价
|
||||||
|
*/
|
||||||
|
private BigDecimal managementFee;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 管理费单价单位(0-日计算,月计算)
|
||||||
|
*/
|
||||||
|
private String managementFeeUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日管理费
|
||||||
|
*/
|
||||||
|
private BigDecimal managementFeeIncreaseDay;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 月管理费
|
||||||
|
*/
|
||||||
|
private BigDecimal managementFeeIncreaseMonth;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租金单价
|
||||||
|
*/
|
||||||
|
private BigDecimal rentPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租金单价单位(0-日计算,月计算)
|
||||||
|
*/
|
||||||
|
private String rentPriceUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日租金
|
||||||
|
*/
|
||||||
|
private BigDecimal rentIncreaseDay;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 月租金
|
||||||
|
*/
|
||||||
|
private BigDecimal rentIncreaseMonth;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0-按固定租金,1-按实际天数
|
||||||
|
*/
|
||||||
|
private Long rentIncreaseWay;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 付款周期
|
||||||
|
*/
|
||||||
|
private Long paymentPeriod;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 押金
|
||||||
|
*/
|
||||||
|
private BigDecimal deposit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 押几月
|
||||||
|
*/
|
||||||
|
private Long depositPeriod;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 押金滞纳金比例
|
||||||
|
*/
|
||||||
|
private BigDecimal depositOverduePercent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租金滞纳金比例
|
||||||
|
*/
|
||||||
|
private BigDecimal rentOverduePercent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邮编
|
||||||
|
*/
|
||||||
|
private String postCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同关联房间
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<Room> customerContractRooms;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同关联账单
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<CustomerContractBill> customerContractBills;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同关联其他账单
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<CustomerContractBill> customerContractOtherBills;
|
||||||
|
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer pageNum;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer pageSize;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联其他费用
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<CustomerContractOther> customerContractOthers;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,311 @@
|
|||||||
|
package com.ics.admin.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IEnum;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.ics.common.core.domain.BaseEntity;
|
||||||
|
import com.ics.common.enums.BillType;
|
||||||
|
import com.ics.common.enums.PaymentCycle;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户合同账单对象 ics_customer_contract_bill
|
||||||
|
*
|
||||||
|
* @author zzm
|
||||||
|
* @date 2021-03-30
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("ics_customer_contract_bill")
|
||||||
|
public class CustomerContractBill extends BaseEntity<CustomerContractBill> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户id
|
||||||
|
*/
|
||||||
|
private Long customerId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同id
|
||||||
|
*/
|
||||||
|
private Long contractId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 账单名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 账单编号
|
||||||
|
*/
|
||||||
|
private String sn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 管理编号
|
||||||
|
*/
|
||||||
|
private String manageSn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 账单状态
|
||||||
|
*/
|
||||||
|
private Status status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 账单状态
|
||||||
|
*/
|
||||||
|
public enum Status implements IEnum<Integer> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 未收
|
||||||
|
*/
|
||||||
|
UNRECEIVED("未收", 0),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已收
|
||||||
|
*/
|
||||||
|
RECEIVED("已收", 1),
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部分
|
||||||
|
*/
|
||||||
|
PART("部分", 2),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已作废
|
||||||
|
*/
|
||||||
|
VOIDED("已作废", 3);
|
||||||
|
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
private int value;
|
||||||
|
|
||||||
|
Status(String name, int value) {
|
||||||
|
this.name = name;
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer getValue() {
|
||||||
|
return this.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return this.name;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static Status parse(Integer value) {
|
||||||
|
for (Status status : values()) {
|
||||||
|
if (status.getValue().equals(value)) {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 付款周期
|
||||||
|
*/
|
||||||
|
private PaymentCycle paymentCycle;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同类型
|
||||||
|
*/
|
||||||
|
private CustomerContract.Type type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 账单类型
|
||||||
|
*/
|
||||||
|
private BillType billType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收款截止日
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date endDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 账单收款日
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date receiveRentDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 账期
|
||||||
|
*/
|
||||||
|
private String billDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 账单开始日期
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date billStartDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 账单结束日期
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date billEndDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0-按固定租金,1-按实际天数
|
||||||
|
*/
|
||||||
|
private Long rentIncreaseWay;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0-普通发票,1-专用发票
|
||||||
|
*/
|
||||||
|
private String invoiceType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收到金额
|
||||||
|
*/
|
||||||
|
private BigDecimal receiveRent = BigDecimal.ZERO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物业管理费
|
||||||
|
*/
|
||||||
|
private BigDecimal managementTotalFee = BigDecimal.ZERO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租金
|
||||||
|
*/
|
||||||
|
private BigDecimal rent = BigDecimal.ZERO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租金滞纳金
|
||||||
|
*/
|
||||||
|
private BigDecimal rentOverdue = BigDecimal.ZERO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 押金
|
||||||
|
*/
|
||||||
|
private BigDecimal deposit = BigDecimal.ZERO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 押金滞纳金
|
||||||
|
*/
|
||||||
|
private BigDecimal depositOverdue = BigDecimal.ZERO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电费
|
||||||
|
*/
|
||||||
|
private BigDecimal powerFee = BigDecimal.ZERO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已收电费
|
||||||
|
*/
|
||||||
|
private BigDecimal receivePowerFee = BigDecimal.ZERO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 水费
|
||||||
|
*/
|
||||||
|
private BigDecimal waterFee = BigDecimal.ZERO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已收水费
|
||||||
|
*/
|
||||||
|
private BigDecimal receiveWaterFee = BigDecimal.ZERO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已收物业管理费
|
||||||
|
*/
|
||||||
|
private BigDecimal receiveManagementTotalFee = BigDecimal.ZERO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 其他费用
|
||||||
|
*/
|
||||||
|
private BigDecimal otherFee = BigDecimal.ZERO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已收其他费用
|
||||||
|
*/
|
||||||
|
private BigDecimal receiveOtherFee = BigDecimal.ZERO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应退款
|
||||||
|
*/
|
||||||
|
private BigDecimal refundFee = BigDecimal.ZERO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联合同
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private CustomerContract customerContract;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联多个费项
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<CustomerContractExpenses> customerContractExpenses;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联房间
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<Room> rooms;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据客户名称查询
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String queryCustomerName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据年月查询
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String queryMonth;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合计应收
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private BigDecimal totalBill;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 待付款
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private BigDecimal waitPay = BigDecimal.ZERO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合计已收
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private BigDecimal receiveTotalBill = BigDecimal.ZERO;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer pageNum;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer pageSize;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer isOverdue;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租赁合计月份
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer totalRentMonth;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租赁日期
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String rentDate;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,89 @@
|
|||||||
|
package com.ics.admin.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IEnum;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.ics.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户合同费用对象 ics_customer_contract_expenses
|
||||||
|
*
|
||||||
|
* @author zzm
|
||||||
|
* @date 2021-03-30
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("ics_customer_contract_expenses")
|
||||||
|
public class CustomerContractExpenses extends BaseEntity<CustomerContractExpenses> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 账单id
|
||||||
|
*/
|
||||||
|
private Long billId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 费用名称
|
||||||
|
*/
|
||||||
|
private String expenseName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 金额
|
||||||
|
*/
|
||||||
|
private BigDecimal amount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 费用类型(0-收费,1-退费)
|
||||||
|
*/
|
||||||
|
private ExpenseType expenseType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 费项类型
|
||||||
|
*/
|
||||||
|
public enum ExpenseType implements IEnum<Integer> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收费
|
||||||
|
*/
|
||||||
|
IN("收费", 0),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退费
|
||||||
|
*/
|
||||||
|
OUT("退费", 1);
|
||||||
|
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
private int value;
|
||||||
|
|
||||||
|
ExpenseType(String name, int value) {
|
||||||
|
this.name = name;
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer getValue() {
|
||||||
|
return this.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return this.name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ExpenseType parse(Integer value) {
|
||||||
|
for (ExpenseType expenseType : values()) {
|
||||||
|
if (expenseType.getValue().equals(value)) {
|
||||||
|
return expenseType;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,36 @@
|
|||||||
|
package com.ics.admin.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.ics.admin.handler.ContractStatusEnumHandler;
|
||||||
|
import com.ics.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同操作日志对象 ics_customer_contract_log
|
||||||
|
*
|
||||||
|
* @author zzm
|
||||||
|
* @date 2021-03-30
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("ics_customer_contract_log")
|
||||||
|
public class CustomerContractLog extends BaseEntity<CustomerContractLog> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同id
|
||||||
|
*/
|
||||||
|
private Long contractId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同状态
|
||||||
|
*/
|
||||||
|
@TableField(typeHandler = ContractStatusEnumHandler.class)
|
||||||
|
private CustomerContract.Status status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,49 @@
|
|||||||
|
package com.ics.admin.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.ics.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户合同其他费用对象 ics_customer_contract_other
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2021-09-27
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("ics_customer_contract_other")
|
||||||
|
public class CustomerContractOther extends BaseEntity<CustomerContractOther> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 合同id */
|
||||||
|
private Long contractId;
|
||||||
|
|
||||||
|
/** 费项id */
|
||||||
|
private Long expenseSettingsId;
|
||||||
|
|
||||||
|
/** 金额 */
|
||||||
|
private Double otherFee;
|
||||||
|
|
||||||
|
/** 费项类型id */
|
||||||
|
private Long expenseType;
|
||||||
|
|
||||||
|
/** 开始日期 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date startDate;
|
||||||
|
|
||||||
|
/** 结束日期 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date endDate;
|
||||||
|
|
||||||
|
/** 备注 */
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/** 关联其他费用配置 */
|
||||||
|
@TableField(exist = false)
|
||||||
|
private ExpenseSettings expenseSettings;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,153 @@
|
|||||||
|
package com.ics.admin.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IEnum;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.ics.admin.handler.BannerImageHandler;
|
||||||
|
import com.ics.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.persistence.Transient;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户合同退租对象 ics_customer_contract_refund
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2021-03-31
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("ics_customer_contract_refund")
|
||||||
|
public class CustomerContractRefund extends BaseEntity<CustomerContractRefund> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户id
|
||||||
|
*/
|
||||||
|
private Long customerId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同id
|
||||||
|
*/
|
||||||
|
private Long contractId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退租单号
|
||||||
|
*/
|
||||||
|
private String sn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退租时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date refundDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应收费用
|
||||||
|
*/
|
||||||
|
private BigDecimal receiveFee;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应退费用
|
||||||
|
*/
|
||||||
|
private BigDecimal refundFee;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合计费用
|
||||||
|
*/
|
||||||
|
private BigDecimal totalFee;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 信息检索(搜索专用)
|
||||||
|
*/
|
||||||
|
@Transient
|
||||||
|
private String searchValue;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退租状态
|
||||||
|
*/
|
||||||
|
private Boolean status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退款原因
|
||||||
|
*/
|
||||||
|
private RefundReason refundReason;
|
||||||
|
|
||||||
|
public enum RefundReason implements IEnum<Integer> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 正常到租
|
||||||
|
*/
|
||||||
|
NORMAL("正常到租", 0),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 协商提前退租
|
||||||
|
*/
|
||||||
|
CONSULT("协商提前退租", 1),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 违约清退
|
||||||
|
*/
|
||||||
|
VIOLATION("违约清退", 2),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 其他
|
||||||
|
*/
|
||||||
|
OTHER("其他", 3);
|
||||||
|
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
private int value;
|
||||||
|
|
||||||
|
RefundReason(String name, int value) {
|
||||||
|
this.name = name;
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer getValue() {
|
||||||
|
return this.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return this.name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static RefundReason parse(Integer value) {
|
||||||
|
for (RefundReason refundReason : values()) {
|
||||||
|
if (refundReason.getValue().equals(value)) {
|
||||||
|
return refundReason;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 存档图片
|
||||||
|
*/
|
||||||
|
@TableField(typeHandler = BannerImageHandler.class)
|
||||||
|
private List<BannerImage> archiveImageList = new ArrayList<>();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户合同对象
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private CustomerContract customerContract;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同关联房间
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<CustomerContractRefundRoom> customerContractRefundRooms;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
package com.ics.admin.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退租房间关联对象 ics_customer_contract_refund_room
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2021-03-31
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("ics_customer_contract_refund_room")
|
||||||
|
public class CustomerContractRefundRoom implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 退租id */
|
||||||
|
private Long refundId;
|
||||||
|
|
||||||
|
/** 房间id */
|
||||||
|
private Long roomId;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
package com.ics.admin.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 房间合同关联表 ics_customer_contract_room
|
||||||
|
*
|
||||||
|
* @author zzm
|
||||||
|
* @date 2021-03-30
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("ics_customer_contract_room")
|
||||||
|
public class CustomerContractRoom implements Serializable {
|
||||||
|
|
||||||
|
|
||||||
|
/** 关联合同id */
|
||||||
|
private Long contractId;
|
||||||
|
|
||||||
|
/** 关联房间id */
|
||||||
|
private Long roomId;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
40
ics-admin/src/main/java/com/ics/admin/domain/Dj.java
Normal file
40
ics-admin/src/main/java/com/ics/admin/domain/Dj.java
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
package com.ics.admin.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.ics.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 党建管理对象 ics_dj
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2021-03-23
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("ics_dj")
|
||||||
|
public class Dj extends BaseEntity<Dj> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 党建名称
|
||||||
|
*/
|
||||||
|
private String djName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传详情
|
||||||
|
*/
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否上架
|
||||||
|
*/
|
||||||
|
private Boolean isMarketable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上架时间
|
||||||
|
*/
|
||||||
|
private Date marketableTime;
|
||||||
|
|
||||||
|
}
|
60
ics-admin/src/main/java/com/ics/admin/domain/DjBanner.java
Normal file
60
ics-admin/src/main/java/com/ics/admin/domain/DjBanner.java
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
package com.ics.admin.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.ics.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 党建banner对象 ics_dj_banner
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2021-03-23
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("ics_dj_banner")
|
||||||
|
public class DjBanner extends BaseEntity<DjBanner> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* banner名称
|
||||||
|
*/
|
||||||
|
private String bannerName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* banner简介(可选)
|
||||||
|
*/
|
||||||
|
private String bannerDesc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传banner图标
|
||||||
|
*/
|
||||||
|
private String bannerImg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* $column.columnComment
|
||||||
|
*/
|
||||||
|
private String url;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点击次数
|
||||||
|
*/
|
||||||
|
private Long hits;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否上架
|
||||||
|
*/
|
||||||
|
private Boolean isMarketable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上架时间
|
||||||
|
*/
|
||||||
|
private Date marketableTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否置顶
|
||||||
|
*/
|
||||||
|
private Long isTop;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,49 @@
|
|||||||
|
package com.ics.admin.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.ics.common.core.domain.BaseEntity;
|
||||||
|
import com.ics.common.enums.ExpenseType;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 费项配置对象 ics_expense_settings
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2021-03-24
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("ics_expense_settings")
|
||||||
|
public class ExpenseSettings extends BaseEntity<ExpenseSettings> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 费项名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 费项类型(0-系统费项,1-周期性费项,2-一次性费项)
|
||||||
|
*/
|
||||||
|
private ExpenseType type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计量单位(度,平方米,吨,立方米,千克)
|
||||||
|
*/
|
||||||
|
private String unitsCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否启用
|
||||||
|
*/
|
||||||
|
private Boolean isEnabled;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 税率%
|
||||||
|
*/
|
||||||
|
private Double taxFee;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String memo;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
package com.ics.admin.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.ics.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件管理对象 ics_file_management
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2021-05-24
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("ics_file_management")
|
||||||
|
public class FileManagement extends BaseEntity<FileManagement> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件名
|
||||||
|
*/
|
||||||
|
private String fileName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件地址
|
||||||
|
*/
|
||||||
|
private String url;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件备注
|
||||||
|
*/
|
||||||
|
private String fileRemarks;
|
||||||
|
|
||||||
|
}
|
192
ics-admin/src/main/java/com/ics/admin/domain/Park.java
Normal file
192
ics-admin/src/main/java/com/ics/admin/domain/Park.java
Normal file
@ -0,0 +1,192 @@
|
|||||||
|
package com.ics.admin.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.ics.admin.handler.BannerImageHandler;
|
||||||
|
import com.ics.admin.handler.ListIntHandler;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.hibernate.validator.constraints.Length;
|
||||||
|
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 园区管理对象 ics_park
|
||||||
|
*
|
||||||
|
* @author zzm
|
||||||
|
* @date 2021-03-23
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName(value = "ics_park", autoResultMap = true)
|
||||||
|
public class Park {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 版本
|
||||||
|
*/
|
||||||
|
@Version
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
private Integer version;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 逻辑删除
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
// @TableLogic
|
||||||
|
private Integer deleteFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建者
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新者
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.UPDATE)
|
||||||
|
private String updateBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.UPDATE)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租户Id
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Long tenantId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 园区名称
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "园区名称不能为空")
|
||||||
|
@Length(max = 30, message = "名称不能超过30个字符")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 园区总面积
|
||||||
|
*/
|
||||||
|
private Long area;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 纬度
|
||||||
|
*/
|
||||||
|
private BigDecimal lat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 经度
|
||||||
|
*/
|
||||||
|
private BigDecimal lng;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 园区总房间数
|
||||||
|
*/
|
||||||
|
private Long roomNumbers;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传园区小图
|
||||||
|
*/
|
||||||
|
private String smallPic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传园区banner图
|
||||||
|
*/
|
||||||
|
@TableField(typeHandler = BannerImageHandler.class)
|
||||||
|
private List<BannerImage> bannerImages = new ArrayList<>();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 园区简介(可选)
|
||||||
|
*/
|
||||||
|
@Length(max = 500, message = "名称不能超过500个字符")
|
||||||
|
private String briefIntro;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租金范围(起)
|
||||||
|
*/
|
||||||
|
private Long lowRent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租金范围(始)
|
||||||
|
*/
|
||||||
|
private Long highRent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租金类型
|
||||||
|
*/
|
||||||
|
private String rentType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 城市Id 省,市,区
|
||||||
|
*/
|
||||||
|
@TableField(typeHandler = ListIntHandler.class)
|
||||||
|
private List<Integer> city = new ArrayList<>();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 城市名称
|
||||||
|
*/
|
||||||
|
private String cityName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地址
|
||||||
|
*/
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 配套服务(设施)
|
||||||
|
*/
|
||||||
|
private String facilities;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 交通
|
||||||
|
*/
|
||||||
|
@Length(max = 50, message = "名称不能超过50个字符")
|
||||||
|
private String traffic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 停车费(元/小时)
|
||||||
|
*/
|
||||||
|
private Long parkingFee;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 园区图文介绍
|
||||||
|
*/
|
||||||
|
private String introduction;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否上架
|
||||||
|
*/
|
||||||
|
private Boolean isMarketable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上架时间
|
||||||
|
*/
|
||||||
|
private Date marketableTime;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Double distance;
|
||||||
|
|
||||||
|
}
|
40
ics-admin/src/main/java/com/ics/admin/domain/Policy.java
Normal file
40
ics-admin/src/main/java/com/ics/admin/domain/Policy.java
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
package com.ics.admin.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.ics.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 政策管理对象 ics_policy
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2021-03-23
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("ics_policy")
|
||||||
|
public class Policy extends BaseEntity<Policy> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 政策名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传详情
|
||||||
|
*/
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否上架
|
||||||
|
*/
|
||||||
|
private Boolean isMarketable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上架时间
|
||||||
|
*/
|
||||||
|
private Date marketableTime;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,54 @@
|
|||||||
|
package com.ics.admin.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.ics.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 政策banner对象 ics_policy_banner
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2021-03-23
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("ics_policy_banner")
|
||||||
|
public class PolicyBanner extends BaseEntity<PolicyBanner> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* banner名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* banner简介(可选)
|
||||||
|
*/
|
||||||
|
private String bannerDesc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* banner图路径
|
||||||
|
*/
|
||||||
|
private String bannerImg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点击次数
|
||||||
|
*/
|
||||||
|
private Long hits;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否上架
|
||||||
|
*/
|
||||||
|
private Boolean isMarketable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上架时间
|
||||||
|
*/
|
||||||
|
private Date marketableTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 落地页URI
|
||||||
|
*/
|
||||||
|
private String uri;
|
||||||
|
}
|
190
ics-admin/src/main/java/com/ics/admin/domain/Repair.java
Normal file
190
ics-admin/src/main/java/com/ics/admin/domain/Repair.java
Normal file
@ -0,0 +1,190 @@
|
|||||||
|
package com.ics.admin.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IEnum;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.ics.admin.handler.BannerImageHandler;
|
||||||
|
import com.ics.common.core.domain.BaseEntity;
|
||||||
|
import com.ics.system.domain.User;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单管理对象 ics_repair
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2021-03-25
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("ics_repair")
|
||||||
|
public class Repair extends BaseEntity<Repair> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报修单号
|
||||||
|
*/
|
||||||
|
private String sn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报修人
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系电话
|
||||||
|
*/
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报修区域
|
||||||
|
*/
|
||||||
|
private String area;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态:待分配,待评估,处理中,已处理, 已处理,待评价,已评价
|
||||||
|
*/
|
||||||
|
private Status status;
|
||||||
|
|
||||||
|
public enum Status implements IEnum<Integer> {
|
||||||
|
/**
|
||||||
|
* 待分配
|
||||||
|
*/
|
||||||
|
PENDING_ASSIGN("待分配", 0),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 待处理
|
||||||
|
*/
|
||||||
|
PENDING_PROCESS("待处理", 1),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已完成
|
||||||
|
*/
|
||||||
|
COMPLETED("已完成", 2),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已评价
|
||||||
|
*/
|
||||||
|
SCORE("已评价", 3),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已取消
|
||||||
|
*/
|
||||||
|
CANCELED("已取消", 4);
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
private int value;
|
||||||
|
|
||||||
|
Status(String name, int value) {
|
||||||
|
this.name = name;
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer getValue() {
|
||||||
|
return this.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return this.name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Status parse(Integer value) {
|
||||||
|
for (Status status : values()) {
|
||||||
|
if (status.getValue().equals(value)) {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述
|
||||||
|
*/
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报修时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date repairTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报修图片
|
||||||
|
*/
|
||||||
|
@TableField(typeHandler = BannerImageHandler.class)
|
||||||
|
private List<BannerImage> repairImages = new ArrayList<>();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 维修费
|
||||||
|
*/
|
||||||
|
private Long repairFee;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评价
|
||||||
|
*/
|
||||||
|
private Long repairScore;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 维修材料
|
||||||
|
*/
|
||||||
|
private String repairMateriel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开始时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date beginDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结束时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date endDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 意见建议
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评价工人
|
||||||
|
*/
|
||||||
|
private Long workerScore;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 维修工人
|
||||||
|
*/
|
||||||
|
private Long workerId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公司ID
|
||||||
|
*/
|
||||||
|
private Long customerId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公司
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Customer customer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 园区
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Park park;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private User user;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
30
ics-admin/src/main/java/com/ics/admin/domain/RepairLog.java
Normal file
30
ics-admin/src/main/java/com/ics/admin/domain/RepairLog.java
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package com.ics.admin.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.ics.admin.domain.enumHandler.RepairStatusEnumHandler;
|
||||||
|
import com.ics.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报修记录对象 ics_repair_log
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2021-03-25
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("ics_repair_log")
|
||||||
|
public class RepairLog extends BaseEntity<RepairLog> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 类型 */
|
||||||
|
@TableField(typeHandler = RepairStatusEnumHandler.class)
|
||||||
|
private Repair.Status type;
|
||||||
|
|
||||||
|
/** 详情 */
|
||||||
|
private String detail;
|
||||||
|
|
||||||
|
/** 报修单 */
|
||||||
|
private Long repairId;
|
||||||
|
|
||||||
|
}
|
318
ics-admin/src/main/java/com/ics/admin/domain/Room.java
Normal file
318
ics-admin/src/main/java/com/ics/admin/domain/Room.java
Normal file
@ -0,0 +1,318 @@
|
|||||||
|
package com.ics.admin.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IEnum;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.ics.admin.handler.BannerImageHandler;
|
||||||
|
import com.ics.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 房间管理对象 ics_room
|
||||||
|
*
|
||||||
|
* @author zzm
|
||||||
|
* @date 2021-03-24
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName(value = "ics_room", autoResultMap = true)
|
||||||
|
public class Room extends BaseEntity<Room> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 楼宇id
|
||||||
|
*/
|
||||||
|
private Long buildingId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 楼层id
|
||||||
|
*/
|
||||||
|
private Long buildingDetailId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 房间名称
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "房间名称不能为空")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租赁状态
|
||||||
|
*/
|
||||||
|
private Status status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租赁状态
|
||||||
|
*/
|
||||||
|
public enum Status implements IEnum<Integer> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 未租
|
||||||
|
*/
|
||||||
|
NO("未租", 0),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已租
|
||||||
|
*/
|
||||||
|
YES("已租", 1);
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
private int value;
|
||||||
|
|
||||||
|
Status(String name, int value) {
|
||||||
|
this.name = name;
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer getValue() {
|
||||||
|
return this.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return this.name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Status parse(Integer value) {
|
||||||
|
for (Status status : values()) {
|
||||||
|
if (status.getValue().equals(value)) {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新租赁状态时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date updateStatusTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租金
|
||||||
|
*/
|
||||||
|
@NotNull(message = "租金不能为空")
|
||||||
|
private BigDecimal rent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租金类型:元/㎡/天,元/㎡/月,元/天,元/月
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "租金类型不能为空")
|
||||||
|
private String rentType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物业费
|
||||||
|
*/
|
||||||
|
private BigDecimal managementFee;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物业费类型:元/㎡/天,元/㎡/月,元/天,元/月
|
||||||
|
*/
|
||||||
|
private String managementFeeType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 面积(平方米)
|
||||||
|
*/
|
||||||
|
@NotNull(message = "面积不能为空")
|
||||||
|
private BigDecimal area;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收租面积(平方米)
|
||||||
|
*/
|
||||||
|
private BigDecimal rentArea;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公摊面积(平方米)
|
||||||
|
*/
|
||||||
|
private BigDecimal commonArea;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 可分割
|
||||||
|
*/
|
||||||
|
private Boolean canBeDivided;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 房型:loft,平层,商业,其他
|
||||||
|
*/
|
||||||
|
private Layout layout;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 房型
|
||||||
|
*/
|
||||||
|
public enum Layout implements IEnum<Integer> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* loft
|
||||||
|
*/
|
||||||
|
LOFT("loft", 0),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商业配套
|
||||||
|
*/
|
||||||
|
BUSINESS("商业配套", 1),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 办公场所
|
||||||
|
*/
|
||||||
|
OFFICE("办公场所", 2),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 其他
|
||||||
|
*/
|
||||||
|
OTHER("其他", 3);
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
private int value;
|
||||||
|
|
||||||
|
Layout(String name, int value) {
|
||||||
|
this.name = name;
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer getValue() {
|
||||||
|
return this.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return this.name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Layout parse(Integer value) {
|
||||||
|
for (Layout layout : values()) {
|
||||||
|
if (layout.getValue().equals(value)) {
|
||||||
|
return layout;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 层高(米)
|
||||||
|
*/
|
||||||
|
private BigDecimal floorHeight;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 可入住日期
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date availableFrom;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 装修类型:简装,精装,毛坯房
|
||||||
|
*/
|
||||||
|
private DecorationType decorationType;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 装修类型
|
||||||
|
*/
|
||||||
|
public enum DecorationType implements IEnum<Integer> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 简装
|
||||||
|
*/
|
||||||
|
SIMPLE("简装", 0),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 精装
|
||||||
|
*/
|
||||||
|
SPECIAL("精装", 1),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 毛坯房
|
||||||
|
*/
|
||||||
|
ROUGH("毛坯房", 2);
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
private int value;
|
||||||
|
|
||||||
|
DecorationType(String name, int value) {
|
||||||
|
this.name = name;
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer getValue() {
|
||||||
|
return this.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return this.name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static DecorationType parse(Integer value) {
|
||||||
|
for (DecorationType decorationType : values()) {
|
||||||
|
if (decorationType.getValue().equals(value)) {
|
||||||
|
return decorationType;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 奖金
|
||||||
|
*/
|
||||||
|
private BigDecimal bonus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传园区banner图
|
||||||
|
*/
|
||||||
|
@TableField(typeHandler = BannerImageHandler.class)
|
||||||
|
private List<BannerImage> bannerImages = new ArrayList<>();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传房间小图
|
||||||
|
*/
|
||||||
|
private String smallPic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 房间简介(选填)
|
||||||
|
*/
|
||||||
|
private String briefIntro;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否上架
|
||||||
|
*/
|
||||||
|
private Boolean isMarketable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上架时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date marketableTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联园区
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Park park;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联楼宇
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Building building;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联楼层
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private BuildingDetail buildingDetail;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String buildingName;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.ics.admin.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.ics.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业服务-banner管理对象 ics_service_banner
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2021-03-25
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("ics_service_banner")
|
||||||
|
public class ServiceBanner extends BaseEntity<ServiceBanner> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* banner名称
|
||||||
|
*/
|
||||||
|
private String bannerName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* banner简介(可选)
|
||||||
|
*/
|
||||||
|
private String bannerDesc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传banner图标
|
||||||
|
*/
|
||||||
|
private String bannerImg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 落地页URI
|
||||||
|
*/
|
||||||
|
private String uri;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否上架
|
||||||
|
*/
|
||||||
|
private Boolean isMarketable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上架时间
|
||||||
|
*/
|
||||||
|
private Date marketableTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否置顶
|
||||||
|
*/
|
||||||
|
private Boolean isTop;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点击数
|
||||||
|
*/
|
||||||
|
private Long hits;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
132
ics-admin/src/main/java/com/ics/admin/domain/ServiceManage.java
Normal file
132
ics-admin/src/main/java/com/ics/admin/domain/ServiceManage.java
Normal file
@ -0,0 +1,132 @@
|
|||||||
|
package com.ics.admin.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.ics.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.persistence.Transient;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务管理对象 ics_service_manage
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2021-03-26
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("ics_service_manage")
|
||||||
|
public class ServiceManage extends BaseEntity<ServiceManage> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务名称
|
||||||
|
*/
|
||||||
|
private String serviceName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务简介(可选)
|
||||||
|
*/
|
||||||
|
private String serviceDesc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供应商id
|
||||||
|
*/
|
||||||
|
private Long supplierId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供应商名称 (搜索条件)
|
||||||
|
*/
|
||||||
|
@Transient
|
||||||
|
private String supplierName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 菜单选择
|
||||||
|
*/
|
||||||
|
private Long menuId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 价格(元)
|
||||||
|
*/
|
||||||
|
private Long price;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 价格单位
|
||||||
|
*/
|
||||||
|
private String priceUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 咨询电话(可选)
|
||||||
|
*/
|
||||||
|
private String contract;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 咨询电话服务时段(开始)
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "HH:mm")
|
||||||
|
private Date contractTimeStart;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 咨询电话服务时段(结束)
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "HH:mm")
|
||||||
|
private Date contractTimeEnd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否仅限工作日咨询
|
||||||
|
*/
|
||||||
|
private Boolean isWorkDay;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传详情
|
||||||
|
*/
|
||||||
|
private String serviceContent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务协议(可选)
|
||||||
|
*/
|
||||||
|
private Boolean agreementStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务协议名称
|
||||||
|
*/
|
||||||
|
private String agreementName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务协议内容
|
||||||
|
*/
|
||||||
|
private String agreementContent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 一级菜单
|
||||||
|
*/
|
||||||
|
private String levelOneMenu;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 二级菜单
|
||||||
|
*/
|
||||||
|
private String levelTwoMenu;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否上架
|
||||||
|
*/
|
||||||
|
private Boolean isMarketable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上架时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date marketableTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联供应商
|
||||||
|
*/
|
||||||
|
private ServiceSupplier serviceSupplier;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联菜单
|
||||||
|
*/
|
||||||
|
private ServiceMenu serviceMenu;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,56 @@
|
|||||||
|
package com.ics.admin.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.ics.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 菜单管理对象 ics_service_menu
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2021-03-25
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("ics_service_menu")
|
||||||
|
public class ServiceMenu extends BaseEntity<ServiceMenu> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 菜单名称
|
||||||
|
*/
|
||||||
|
private String menuName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 菜单简介(可选)
|
||||||
|
*/
|
||||||
|
private String menuDesc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传菜单图标
|
||||||
|
*/
|
||||||
|
private String menuImg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 菜单级别
|
||||||
|
*/
|
||||||
|
private Long menuLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 父节点
|
||||||
|
*/
|
||||||
|
private Long parentId;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否上架
|
||||||
|
*/
|
||||||
|
private Boolean isMarketable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上架时间
|
||||||
|
*/
|
||||||
|
private Date marketableTime;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,71 @@
|
|||||||
|
package com.ics.admin.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.ics.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.persistence.Transient;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务订单对象 ics_service_order
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2021-03-26
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("ics_service_order")
|
||||||
|
public class ServiceOrder extends BaseEntity<ServiceOrder> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请人
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 手机
|
||||||
|
*/
|
||||||
|
private String mobile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请人
|
||||||
|
*/
|
||||||
|
private Long memberId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供应商Id
|
||||||
|
*/
|
||||||
|
private Long supplierId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务ID
|
||||||
|
*/
|
||||||
|
private Long serviceId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 跟进备注
|
||||||
|
*/
|
||||||
|
private String remarkList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供应商名称 (搜索条件)
|
||||||
|
*/
|
||||||
|
@Transient
|
||||||
|
private String supplierName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务名称 (搜索条件)
|
||||||
|
*/
|
||||||
|
@Transient
|
||||||
|
private String serviceName;
|
||||||
|
|
||||||
|
private ServiceManage serviceManage;
|
||||||
|
|
||||||
|
private ServiceSupplier serviceSupplier;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,69 @@
|
|||||||
|
package com.ics.admin.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.ics.admin.handler.BannerImageHandler;
|
||||||
|
import com.ics.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供应商管理对象 ics_service_supplier
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2021-03-26
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("ics_service_supplier")
|
||||||
|
public class ServiceSupplier extends BaseEntity<ServiceSupplier> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供应商名称
|
||||||
|
*/
|
||||||
|
private String supplierName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供应商简介(选填)
|
||||||
|
*/
|
||||||
|
private String supplierDesc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传供应商图标
|
||||||
|
*/
|
||||||
|
private String supplierImg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供应商地址
|
||||||
|
*/
|
||||||
|
private String supplierAddress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供应商行业(选填)
|
||||||
|
*/
|
||||||
|
private String supplierIndustry;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传详情
|
||||||
|
*/
|
||||||
|
private String supplierContent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传供应商资质(选填)
|
||||||
|
*/
|
||||||
|
@TableField(typeHandler = BannerImageHandler.class)
|
||||||
|
private List<BannerImage> qualificationImg = new ArrayList<>();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务数
|
||||||
|
*/
|
||||||
|
private Long serviceNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请次数
|
||||||
|
*/
|
||||||
|
private Long signNum;
|
||||||
|
|
||||||
|
}
|
80
ics-admin/src/main/java/com/ics/admin/domain/Suggestion.java
Normal file
80
ics-admin/src/main/java/com/ics/admin/domain/Suggestion.java
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
package com.ics.admin.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.ics.admin.handler.BannerImageHandler;
|
||||||
|
import com.ics.common.core.domain.BaseEntity;
|
||||||
|
import com.ics.system.domain.User;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 投诉建议对象 ics_suggestion
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2021-04-12
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("ics_suggestion")
|
||||||
|
public class Suggestion extends BaseEntity<Suggestion> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问题意见描述
|
||||||
|
*/
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 投诉单号
|
||||||
|
*/
|
||||||
|
private String sn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图片(限三张)
|
||||||
|
*/
|
||||||
|
@TableField(typeHandler = BannerImageHandler.class)
|
||||||
|
private List<BannerImage> images = new ArrayList<>();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date processingTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态:指派中 处理中 已经处理
|
||||||
|
*/
|
||||||
|
private int status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否匿名:0-否,1-是
|
||||||
|
*/
|
||||||
|
private Boolean isAnonymous;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 指派人员id
|
||||||
|
*/
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建用户id
|
||||||
|
*/
|
||||||
|
private Long createUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private User user;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 园区
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Park park;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package com.ics.admin.domain.comparator;
|
||||||
|
|
||||||
|
|
||||||
|
import com.ics.admin.domain.Park;
|
||||||
|
|
||||||
|
import java.util.Comparator;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 园区经纬度距离排序
|
||||||
|
*/
|
||||||
|
public class ParkCompare implements Comparator<Park> {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int compare(Park p1, Park p2) {
|
||||||
|
if (p1.getDistance() > p2.getDistance()) {
|
||||||
|
return 1;
|
||||||
|
} else if (p1.getDistance() < p2.getDistance()) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,44 @@
|
|||||||
|
package com.ics.admin.domain.enumHandler;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.Activity;
|
||||||
|
import org.apache.ibatis.type.BaseTypeHandler;
|
||||||
|
import org.apache.ibatis.type.JdbcType;
|
||||||
|
import org.apache.ibatis.type.MappedJdbcTypes;
|
||||||
|
import org.apache.ibatis.type.MappedTypes;
|
||||||
|
|
||||||
|
import java.sql.CallableStatement;
|
||||||
|
import java.sql.PreparedStatement;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 29361
|
||||||
|
*/
|
||||||
|
@MappedJdbcTypes({JdbcType.INTEGER})
|
||||||
|
@MappedTypes({Activity.Status.class})
|
||||||
|
public class ActivityStatusEnumHandler extends BaseTypeHandler<Activity.Status> {
|
||||||
|
@Override
|
||||||
|
public void setNonNullParameter(PreparedStatement preparedStatement, int i, Activity.Status status, JdbcType jdbcType) throws SQLException {
|
||||||
|
preparedStatement.setInt(i,status.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Activity.Status getNullableResult(ResultSet resultSet, String columnName) throws SQLException {
|
||||||
|
int value = resultSet.getInt(columnName);
|
||||||
|
Activity.Status instance = Activity.Status.parse(value);
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Activity.Status getNullableResult(ResultSet resultSet, int columnIndex) throws SQLException {
|
||||||
|
int value = resultSet.getInt(columnIndex);
|
||||||
|
Activity.Status instance = Activity.Status.parse(value);
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Activity.Status getNullableResult(CallableStatement callableStatement, int i) throws SQLException {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,45 @@
|
|||||||
|
package com.ics.admin.domain.enumHandler;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.CustomerContractRefund;
|
||||||
|
import org.apache.ibatis.type.BaseTypeHandler;
|
||||||
|
import org.apache.ibatis.type.JdbcType;
|
||||||
|
import org.apache.ibatis.type.MappedJdbcTypes;
|
||||||
|
import org.apache.ibatis.type.MappedTypes;
|
||||||
|
|
||||||
|
import java.sql.CallableStatement;
|
||||||
|
import java.sql.PreparedStatement;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 29361
|
||||||
|
*/
|
||||||
|
@MappedJdbcTypes({JdbcType.INTEGER})
|
||||||
|
@MappedTypes({CustomerContractRefund.RefundReason.class})
|
||||||
|
public class RefundStatusEnumHandler extends BaseTypeHandler<CustomerContractRefund.RefundReason> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setNonNullParameter(PreparedStatement preparedStatement, int i, CustomerContractRefund.RefundReason refundReason, JdbcType jdbcType) throws SQLException {
|
||||||
|
preparedStatement.setInt(i,refundReason.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CustomerContractRefund.RefundReason getNullableResult(ResultSet resultSet, String s) throws SQLException {
|
||||||
|
int value = resultSet.getInt(s);
|
||||||
|
CustomerContractRefund.RefundReason instance = CustomerContractRefund.RefundReason.parse(value);
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CustomerContractRefund.RefundReason getNullableResult(ResultSet resultSet, int i) throws SQLException {
|
||||||
|
int value = resultSet.getInt(i);
|
||||||
|
CustomerContractRefund.RefundReason instance = CustomerContractRefund.RefundReason.parse(value);
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CustomerContractRefund.RefundReason getNullableResult(CallableStatement callableStatement, int i) throws SQLException {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,44 @@
|
|||||||
|
package com.ics.admin.domain.enumHandler;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.Repair;
|
||||||
|
import org.apache.ibatis.type.BaseTypeHandler;
|
||||||
|
import org.apache.ibatis.type.JdbcType;
|
||||||
|
import org.apache.ibatis.type.MappedJdbcTypes;
|
||||||
|
import org.apache.ibatis.type.MappedTypes;
|
||||||
|
|
||||||
|
import java.sql.CallableStatement;
|
||||||
|
import java.sql.PreparedStatement;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 29361
|
||||||
|
*/
|
||||||
|
@MappedJdbcTypes({JdbcType.INTEGER})
|
||||||
|
@MappedTypes({Repair.Status.class})
|
||||||
|
public class RepairStatusEnumHandler extends BaseTypeHandler<Repair.Status> {
|
||||||
|
@Override
|
||||||
|
public void setNonNullParameter(PreparedStatement preparedStatement, int i, Repair.Status status, JdbcType jdbcType) throws SQLException {
|
||||||
|
preparedStatement.setInt(i,status.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Repair.Status getNullableResult(ResultSet resultSet, String columnName) throws SQLException {
|
||||||
|
int value = resultSet.getInt(columnName);
|
||||||
|
Repair.Status instance = Repair.Status.parse(value);
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Repair.Status getNullableResult(ResultSet resultSet, int columnIndex) throws SQLException {
|
||||||
|
int value = resultSet.getInt(columnIndex);
|
||||||
|
Repair.Status instance = Repair.Status.parse(value);
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Repair.Status getNullableResult(CallableStatement callableStatement, int i) throws SQLException {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,44 @@
|
|||||||
|
package com.ics.admin.handler;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.ApplySettle;
|
||||||
|
import org.apache.ibatis.type.BaseTypeHandler;
|
||||||
|
import org.apache.ibatis.type.JdbcType;
|
||||||
|
import org.apache.ibatis.type.MappedJdbcTypes;
|
||||||
|
import org.apache.ibatis.type.MappedTypes;
|
||||||
|
|
||||||
|
import java.sql.CallableStatement;
|
||||||
|
import java.sql.PreparedStatement;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zzm
|
||||||
|
*/
|
||||||
|
@MappedJdbcTypes({JdbcType.INTEGER})
|
||||||
|
@MappedTypes({ApplySettle.Status.class})
|
||||||
|
public class ApplySettleStatusEnumHandler extends BaseTypeHandler<ApplySettle.Status> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setNonNullParameter(PreparedStatement preparedStatement, int i, ApplySettle.Status instance, JdbcType jdbcType) throws SQLException {
|
||||||
|
preparedStatement.setInt(i,instance.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ApplySettle.Status getNullableResult(ResultSet resultSet, String columnName) throws SQLException {
|
||||||
|
int value = resultSet.getInt(columnName);
|
||||||
|
ApplySettle.Status instance = ApplySettle.Status.parse(value);
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ApplySettle.Status getNullableResult(ResultSet resultSet, int columnIndex) throws SQLException {
|
||||||
|
int value = resultSet.getInt(columnIndex);
|
||||||
|
ApplySettle.Status instance = ApplySettle.Status.parse(value);
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ApplySettle.Status getNullableResult(CallableStatement callableStatement, int i) throws SQLException {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,59 @@
|
|||||||
|
package com.ics.admin.handler;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
|
import com.ics.admin.domain.BannerImage;
|
||||||
|
import com.ics.common.json.JsonUtils;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.apache.ibatis.type.BaseTypeHandler;
|
||||||
|
import org.apache.ibatis.type.JdbcType;
|
||||||
|
import org.apache.ibatis.type.MappedJdbcTypes;
|
||||||
|
|
||||||
|
import java.sql.CallableStatement;
|
||||||
|
import java.sql.PreparedStatement;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 动作示范图
|
||||||
|
*
|
||||||
|
* @author zzm
|
||||||
|
*/
|
||||||
|
@MappedJdbcTypes({JdbcType.LONGVARCHAR})
|
||||||
|
public class BannerImageHandler extends BaseTypeHandler<List<BannerImage>> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setNonNullParameter(PreparedStatement ps, int i, List<BannerImage> parameter, JdbcType jdbcType) throws SQLException {
|
||||||
|
if (parameter != null) {
|
||||||
|
ps.setString(i, JsonUtils.toJson(parameter));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<BannerImage> getNullableResult(ResultSet rs, String columnName) throws SQLException {
|
||||||
|
String dbData = rs.getString(columnName);
|
||||||
|
if (StringUtils.isEmpty(dbData)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return JsonUtils.toObject(dbData, new TypeReference<List<BannerImage>>() { });
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<BannerImage> getNullableResult(ResultSet rs, int columnIndex) throws SQLException {
|
||||||
|
String dbData = rs.getString(columnIndex);
|
||||||
|
if (StringUtils.isEmpty(dbData)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return JsonUtils.toObject(dbData, new TypeReference<List<BannerImage>>() { });
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<BannerImage> getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
|
||||||
|
String dbData = cs.getString(columnIndex);
|
||||||
|
if (StringUtils.isEmpty(dbData)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return JsonUtils.toObject(dbData, new TypeReference<List<BannerImage>>() { });
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,44 @@
|
|||||||
|
package com.ics.admin.handler;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.Customer;
|
||||||
|
import org.apache.ibatis.type.BaseTypeHandler;
|
||||||
|
import org.apache.ibatis.type.JdbcType;
|
||||||
|
import org.apache.ibatis.type.MappedJdbcTypes;
|
||||||
|
import org.apache.ibatis.type.MappedTypes;
|
||||||
|
|
||||||
|
import java.sql.CallableStatement;
|
||||||
|
import java.sql.PreparedStatement;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zzm
|
||||||
|
*/
|
||||||
|
@MappedJdbcTypes({JdbcType.INTEGER})
|
||||||
|
@MappedTypes({Customer.ChannelType.class})
|
||||||
|
public class ChannelTypeEnumHandler extends BaseTypeHandler<Customer.ChannelType> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setNonNullParameter(PreparedStatement preparedStatement, int i, Customer.ChannelType channelType, JdbcType jdbcType) throws SQLException {
|
||||||
|
preparedStatement.setInt(i,channelType.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Customer.ChannelType getNullableResult(ResultSet resultSet, String columnName) throws SQLException {
|
||||||
|
int value = resultSet.getInt(columnName);
|
||||||
|
Customer.ChannelType instance = Customer.ChannelType.parse(value);
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Customer.ChannelType getNullableResult(ResultSet resultSet, int columnIndex) throws SQLException {
|
||||||
|
int value = resultSet.getInt(columnIndex);
|
||||||
|
Customer.ChannelType instance = Customer.ChannelType.parse(value);
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Customer.ChannelType getNullableResult(CallableStatement callableStatement, int i) throws SQLException {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,44 @@
|
|||||||
|
package com.ics.admin.handler;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.CustomerContractBill;
|
||||||
|
import org.apache.ibatis.type.BaseTypeHandler;
|
||||||
|
import org.apache.ibatis.type.JdbcType;
|
||||||
|
import org.apache.ibatis.type.MappedJdbcTypes;
|
||||||
|
import org.apache.ibatis.type.MappedTypes;
|
||||||
|
|
||||||
|
import java.sql.CallableStatement;
|
||||||
|
import java.sql.PreparedStatement;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zzm
|
||||||
|
*/
|
||||||
|
@MappedJdbcTypes({JdbcType.INTEGER})
|
||||||
|
@MappedTypes({CustomerContractBill.Status.class})
|
||||||
|
public class ContractBillStatusEnumHandler extends BaseTypeHandler<CustomerContractBill.Status> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setNonNullParameter(PreparedStatement preparedStatement, int i, CustomerContractBill.Status instance, JdbcType jdbcType) throws SQLException {
|
||||||
|
preparedStatement.setInt(i,instance.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CustomerContractBill.Status getNullableResult(ResultSet resultSet, String columnName) throws SQLException {
|
||||||
|
int value = resultSet.getInt(columnName);
|
||||||
|
CustomerContractBill.Status instance = CustomerContractBill.Status.parse(value);
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CustomerContractBill.Status getNullableResult(ResultSet resultSet, int columnIndex) throws SQLException {
|
||||||
|
int value = resultSet.getInt(columnIndex);
|
||||||
|
CustomerContractBill.Status instance = CustomerContractBill.Status.parse(value);
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CustomerContractBill.Status getNullableResult(CallableStatement callableStatement, int i) throws SQLException {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,44 @@
|
|||||||
|
package com.ics.admin.handler;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.CustomerContract;
|
||||||
|
import org.apache.ibatis.type.BaseTypeHandler;
|
||||||
|
import org.apache.ibatis.type.JdbcType;
|
||||||
|
import org.apache.ibatis.type.MappedJdbcTypes;
|
||||||
|
import org.apache.ibatis.type.MappedTypes;
|
||||||
|
|
||||||
|
import java.sql.CallableStatement;
|
||||||
|
import java.sql.PreparedStatement;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zzm
|
||||||
|
*/
|
||||||
|
@MappedJdbcTypes({JdbcType.INTEGER})
|
||||||
|
@MappedTypes({CustomerContract.Status.class})
|
||||||
|
public class ContractStatusEnumHandler extends BaseTypeHandler<CustomerContract.Status> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setNonNullParameter(PreparedStatement preparedStatement, int i, CustomerContract.Status instance, JdbcType jdbcType) throws SQLException {
|
||||||
|
preparedStatement.setInt(i,instance.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CustomerContract.Status getNullableResult(ResultSet resultSet, String columnName) throws SQLException {
|
||||||
|
int value = resultSet.getInt(columnName);
|
||||||
|
CustomerContract.Status instance = CustomerContract.Status.parse(value);
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CustomerContract.Status getNullableResult(ResultSet resultSet, int columnIndex) throws SQLException {
|
||||||
|
int value = resultSet.getInt(columnIndex);
|
||||||
|
CustomerContract.Status instance = CustomerContract.Status.parse(value);
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CustomerContract.Status getNullableResult(CallableStatement callableStatement, int i) throws SQLException {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,44 @@
|
|||||||
|
package com.ics.admin.handler;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.CustomerContract;
|
||||||
|
import org.apache.ibatis.type.BaseTypeHandler;
|
||||||
|
import org.apache.ibatis.type.JdbcType;
|
||||||
|
import org.apache.ibatis.type.MappedJdbcTypes;
|
||||||
|
import org.apache.ibatis.type.MappedTypes;
|
||||||
|
|
||||||
|
import java.sql.CallableStatement;
|
||||||
|
import java.sql.PreparedStatement;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zzm
|
||||||
|
*/
|
||||||
|
@MappedJdbcTypes({JdbcType.INTEGER})
|
||||||
|
@MappedTypes({CustomerContract.Type.class})
|
||||||
|
public class ContractTypeEnumHandler extends BaseTypeHandler<CustomerContract.Type> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setNonNullParameter(PreparedStatement preparedStatement, int i, CustomerContract.Type instance, JdbcType jdbcType) throws SQLException {
|
||||||
|
preparedStatement.setInt(i,instance.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CustomerContract.Type getNullableResult(ResultSet resultSet, String columnName) throws SQLException {
|
||||||
|
int value = resultSet.getInt(columnName);
|
||||||
|
CustomerContract.Type instance = CustomerContract.Type.parse(value);
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CustomerContract.Type getNullableResult(ResultSet resultSet, int columnIndex) throws SQLException {
|
||||||
|
int value = resultSet.getInt(columnIndex);
|
||||||
|
CustomerContract.Type instance = CustomerContract.Type.parse(value);
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CustomerContract.Type getNullableResult(CallableStatement callableStatement, int i) throws SQLException {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,44 @@
|
|||||||
|
package com.ics.admin.handler;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.Customer;
|
||||||
|
import org.apache.ibatis.type.BaseTypeHandler;
|
||||||
|
import org.apache.ibatis.type.JdbcType;
|
||||||
|
import org.apache.ibatis.type.MappedJdbcTypes;
|
||||||
|
import org.apache.ibatis.type.MappedTypes;
|
||||||
|
|
||||||
|
import java.sql.CallableStatement;
|
||||||
|
import java.sql.PreparedStatement;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zzm
|
||||||
|
*/
|
||||||
|
@MappedJdbcTypes({JdbcType.INTEGER})
|
||||||
|
@MappedTypes({Customer.CustomerStatus.class})
|
||||||
|
public class CustomerStatusEnumHandler extends BaseTypeHandler<Customer.CustomerStatus> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setNonNullParameter(PreparedStatement preparedStatement, int i, Customer.CustomerStatus customerStatus, JdbcType jdbcType) throws SQLException {
|
||||||
|
preparedStatement.setInt(i,customerStatus.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Customer.CustomerStatus getNullableResult(ResultSet resultSet, String columnName) throws SQLException {
|
||||||
|
int value = resultSet.getInt(columnName);
|
||||||
|
Customer.CustomerStatus instance = Customer.CustomerStatus.parse(value);
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Customer.CustomerStatus getNullableResult(ResultSet resultSet, int columnIndex) throws SQLException {
|
||||||
|
int value = resultSet.getInt(columnIndex);
|
||||||
|
Customer.CustomerStatus instance = Customer.CustomerStatus.parse(value);
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Customer.CustomerStatus getNullableResult(CallableStatement callableStatement, int i) throws SQLException {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,44 @@
|
|||||||
|
package com.ics.admin.handler;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.Customer;
|
||||||
|
import org.apache.ibatis.type.BaseTypeHandler;
|
||||||
|
import org.apache.ibatis.type.JdbcType;
|
||||||
|
import org.apache.ibatis.type.MappedJdbcTypes;
|
||||||
|
import org.apache.ibatis.type.MappedTypes;
|
||||||
|
|
||||||
|
import java.sql.CallableStatement;
|
||||||
|
import java.sql.PreparedStatement;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zzm
|
||||||
|
*/
|
||||||
|
@MappedJdbcTypes({JdbcType.INTEGER})
|
||||||
|
@MappedTypes({Customer.Type.class})
|
||||||
|
public class CustomerTypeEnumHandler extends BaseTypeHandler<Customer.Type> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setNonNullParameter(PreparedStatement preparedStatement, int i, Customer.Type type, JdbcType jdbcType) throws SQLException {
|
||||||
|
preparedStatement.setInt(i,type.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Customer.Type getNullableResult(ResultSet resultSet, String columnName) throws SQLException {
|
||||||
|
int value = resultSet.getInt(columnName);
|
||||||
|
Customer.Type instance = Customer.Type.parse(value);
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Customer.Type getNullableResult(ResultSet resultSet, int columnIndex) throws SQLException {
|
||||||
|
int value = resultSet.getInt(columnIndex);
|
||||||
|
Customer.Type instance = Customer.Type.parse(value);
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Customer.Type getNullableResult(CallableStatement callableStatement, int i) throws SQLException {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,44 @@
|
|||||||
|
package com.ics.admin.handler;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.CustomerContractExpenses;
|
||||||
|
import org.apache.ibatis.type.BaseTypeHandler;
|
||||||
|
import org.apache.ibatis.type.JdbcType;
|
||||||
|
import org.apache.ibatis.type.MappedJdbcTypes;
|
||||||
|
import org.apache.ibatis.type.MappedTypes;
|
||||||
|
|
||||||
|
import java.sql.CallableStatement;
|
||||||
|
import java.sql.PreparedStatement;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zzm
|
||||||
|
*/
|
||||||
|
@MappedJdbcTypes({JdbcType.INTEGER})
|
||||||
|
@MappedTypes({CustomerContractExpenses.ExpenseType.class})
|
||||||
|
public class ExpensesTypeEnumHandler extends BaseTypeHandler<CustomerContractExpenses.ExpenseType> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setNonNullParameter(PreparedStatement preparedStatement, int i, CustomerContractExpenses.ExpenseType instance, JdbcType jdbcType) throws SQLException {
|
||||||
|
preparedStatement.setInt(i,instance.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CustomerContractExpenses.ExpenseType getNullableResult(ResultSet resultSet, String columnName) throws SQLException {
|
||||||
|
int value = resultSet.getInt(columnName);
|
||||||
|
CustomerContractExpenses.ExpenseType instance = CustomerContractExpenses.ExpenseType.parse(value);
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CustomerContractExpenses.ExpenseType getNullableResult(ResultSet resultSet, int columnIndex) throws SQLException {
|
||||||
|
int value = resultSet.getInt(columnIndex);
|
||||||
|
CustomerContractExpenses.ExpenseType instance = CustomerContractExpenses.ExpenseType.parse(value);
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CustomerContractExpenses.ExpenseType getNullableResult(CallableStatement callableStatement, int i) throws SQLException {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,58 @@
|
|||||||
|
package com.ics.admin.handler;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
|
import com.ics.common.json.JsonUtils;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.apache.ibatis.type.BaseTypeHandler;
|
||||||
|
import org.apache.ibatis.type.JdbcType;
|
||||||
|
import org.apache.ibatis.type.MappedJdbcTypes;
|
||||||
|
|
||||||
|
import java.sql.CallableStatement;
|
||||||
|
import java.sql.PreparedStatement;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数组与整型转换
|
||||||
|
*
|
||||||
|
* @author jack
|
||||||
|
*/
|
||||||
|
@MappedJdbcTypes({ JdbcType.LONGVARCHAR })
|
||||||
|
public class ListIntHandler extends BaseTypeHandler<List<Integer>> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setNonNullParameter(PreparedStatement ps, int i, List<Integer> parameter, JdbcType jdbcType) throws SQLException {
|
||||||
|
if (parameter != null) {
|
||||||
|
ps.setString(i, JsonUtils.toJson(parameter));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Integer> getNullableResult(ResultSet rs, String columnName) throws SQLException {
|
||||||
|
String dbData = rs.getString(columnName);
|
||||||
|
if (StringUtils.isEmpty(dbData)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return JsonUtils.toObject(dbData, new TypeReference<List<Integer>>() { });
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Integer> getNullableResult(ResultSet rs, int columnIndex) throws SQLException {
|
||||||
|
String dbData = rs.getString(columnIndex);
|
||||||
|
if (StringUtils.isEmpty(dbData)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return JsonUtils.toObject(dbData, new TypeReference<List<Integer>>() { });
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Integer> getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
|
||||||
|
String dbData = cs.getString(columnIndex);
|
||||||
|
if (StringUtils.isEmpty(dbData)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return JsonUtils.toObject(dbData, new TypeReference<List<Integer>>() { });
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,44 @@
|
|||||||
|
package com.ics.admin.handler;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.Customer;
|
||||||
|
import org.apache.ibatis.type.BaseTypeHandler;
|
||||||
|
import org.apache.ibatis.type.JdbcType;
|
||||||
|
import org.apache.ibatis.type.MappedJdbcTypes;
|
||||||
|
import org.apache.ibatis.type.MappedTypes;
|
||||||
|
|
||||||
|
import java.sql.CallableStatement;
|
||||||
|
import java.sql.PreparedStatement;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zzm
|
||||||
|
*/
|
||||||
|
@MappedJdbcTypes({JdbcType.INTEGER})
|
||||||
|
@MappedTypes({Customer.Process.class})
|
||||||
|
public class ProcessEnumHandler extends BaseTypeHandler<Customer.Process> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setNonNullParameter(PreparedStatement preparedStatement, int i, Customer.Process process, JdbcType jdbcType) throws SQLException {
|
||||||
|
preparedStatement.setInt(i,process.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Customer.Process getNullableResult(ResultSet resultSet, String columnName) throws SQLException {
|
||||||
|
int value = resultSet.getInt(columnName);
|
||||||
|
Customer.Process instance = Customer.Process.parse(value);
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Customer.Process getNullableResult(ResultSet resultSet, int columnIndex) throws SQLException {
|
||||||
|
int value = resultSet.getInt(columnIndex);
|
||||||
|
Customer.Process instance = Customer.Process.parse(value);
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Customer.Process getNullableResult(CallableStatement callableStatement, int i) throws SQLException {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,44 @@
|
|||||||
|
package com.ics.admin.handler;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.Room;
|
||||||
|
import org.apache.ibatis.type.BaseTypeHandler;
|
||||||
|
import org.apache.ibatis.type.JdbcType;
|
||||||
|
import org.apache.ibatis.type.MappedJdbcTypes;
|
||||||
|
import org.apache.ibatis.type.MappedTypes;
|
||||||
|
|
||||||
|
import java.sql.CallableStatement;
|
||||||
|
import java.sql.PreparedStatement;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zzm
|
||||||
|
*/
|
||||||
|
@MappedJdbcTypes({JdbcType.INTEGER})
|
||||||
|
@MappedTypes({Room.DecorationType.class})
|
||||||
|
public class RoomDecorationTypeEnumHandler extends BaseTypeHandler<Room.DecorationType> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setNonNullParameter(PreparedStatement preparedStatement, int i, Room.DecorationType decorationType, JdbcType jdbcType) throws SQLException {
|
||||||
|
preparedStatement.setInt(i,decorationType.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Room.DecorationType getNullableResult(ResultSet resultSet, String columnName) throws SQLException {
|
||||||
|
int value = resultSet.getInt(columnName);
|
||||||
|
Room.DecorationType instance = Room.DecorationType.parse(value);
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Room.DecorationType getNullableResult(ResultSet resultSet, int columnIndex) throws SQLException {
|
||||||
|
int value = resultSet.getInt(columnIndex);
|
||||||
|
Room.DecorationType instance = Room.DecorationType.parse(value);
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Room.DecorationType getNullableResult(CallableStatement callableStatement, int i) throws SQLException {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,44 @@
|
|||||||
|
package com.ics.admin.handler;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.Room;
|
||||||
|
import org.apache.ibatis.type.BaseTypeHandler;
|
||||||
|
import org.apache.ibatis.type.JdbcType;
|
||||||
|
import org.apache.ibatis.type.MappedJdbcTypes;
|
||||||
|
import org.apache.ibatis.type.MappedTypes;
|
||||||
|
|
||||||
|
import java.sql.CallableStatement;
|
||||||
|
import java.sql.PreparedStatement;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zzm
|
||||||
|
*/
|
||||||
|
@MappedJdbcTypes({JdbcType.INTEGER})
|
||||||
|
@MappedTypes({Room.Layout.class})
|
||||||
|
public class RoomLayoutEnumHandler extends BaseTypeHandler<Room.Layout> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setNonNullParameter(PreparedStatement preparedStatement, int i, Room.Layout layout, JdbcType jdbcType) throws SQLException {
|
||||||
|
preparedStatement.setInt(i, layout.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Room.Layout getNullableResult(ResultSet resultSet, String columnName) throws SQLException {
|
||||||
|
int value = resultSet.getInt(columnName);
|
||||||
|
Room.Layout instance = Room.Layout.parse(value);
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Room.Layout getNullableResult(ResultSet resultSet, int columnIndex) throws SQLException {
|
||||||
|
int value = resultSet.getInt(columnIndex);
|
||||||
|
Room.Layout instance = Room.Layout.parse(value);
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Room.Layout getNullableResult(CallableStatement callableStatement, int i) throws SQLException {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,44 @@
|
|||||||
|
package com.ics.admin.handler;
|
||||||
|
|
||||||
|
import com.ics.admin.domain.Room;
|
||||||
|
import org.apache.ibatis.type.BaseTypeHandler;
|
||||||
|
import org.apache.ibatis.type.JdbcType;
|
||||||
|
import org.apache.ibatis.type.MappedJdbcTypes;
|
||||||
|
import org.apache.ibatis.type.MappedTypes;
|
||||||
|
|
||||||
|
import java.sql.CallableStatement;
|
||||||
|
import java.sql.PreparedStatement;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zzm
|
||||||
|
*/
|
||||||
|
@MappedJdbcTypes({JdbcType.INTEGER})
|
||||||
|
@MappedTypes({Room.Status.class})
|
||||||
|
public class RoomStatusEnumHandler extends BaseTypeHandler<Room.Status> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setNonNullParameter(PreparedStatement preparedStatement, int i, Room.Status status, JdbcType jdbcType) throws SQLException {
|
||||||
|
preparedStatement.setInt(i,status.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Room.Status getNullableResult(ResultSet resultSet, String columnName) throws SQLException {
|
||||||
|
int value = resultSet.getInt(columnName);
|
||||||
|
Room.Status instance = Room.Status.parse(value);
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Room.Status getNullableResult(ResultSet resultSet, int columnIndex) throws SQLException {
|
||||||
|
int value = resultSet.getInt(columnIndex);
|
||||||
|
Room.Status instance = Room.Status.parse(value);
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Room.Status getNullableResult(CallableStatement callableStatement, int i) throws SQLException {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,58 @@
|
|||||||
|
package com.ics.admin.listener;
|
||||||
|
|
||||||
|
import com.alibaba.excel.context.AnalysisContext;
|
||||||
|
import com.alibaba.excel.event.AnalysisEventListener;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.ics.admin.vo.ImportPowerWaterFeeVO;
|
||||||
|
import com.ics.common.utils.GuavaCacheUtil;
|
||||||
|
import org.apache.commons.compress.utils.Lists;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入验证监听
|
||||||
|
* @author zzm
|
||||||
|
*/
|
||||||
|
public class ImportPowerWaterFeeListener extends AnalysisEventListener<ImportPowerWaterFeeVO> {
|
||||||
|
|
||||||
|
private static final Logger LOGGER = LoggerFactory.getLogger(ImportPowerWaterFeeListener.class);
|
||||||
|
|
||||||
|
private String cacheKey;
|
||||||
|
|
||||||
|
List<ImportPowerWaterFeeVO> importPowerWaterFeeVOS = Lists.newArrayList();
|
||||||
|
|
||||||
|
|
||||||
|
public ImportPowerWaterFeeListener(String cacheKey){
|
||||||
|
this.cacheKey = cacheKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void invoke(ImportPowerWaterFeeVO importPowerWaterFeeVO, AnalysisContext analysisContext) {
|
||||||
|
LOGGER.info("解析到一条数据:{}", JSON.toJSONString(importPowerWaterFeeVO));
|
||||||
|
if (importPowerWaterFeeVO.getPowerFee() == null) {
|
||||||
|
throw new RuntimeException("电费必填!");
|
||||||
|
}
|
||||||
|
if (importPowerWaterFeeVO.getWaterFee() == null) {
|
||||||
|
throw new RuntimeException("水费必填!");
|
||||||
|
}
|
||||||
|
importPowerWaterFeeVOS.add(importPowerWaterFeeVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doAfterAllAnalysed(AnalysisContext analysisContext) {
|
||||||
|
saveDataCache(cacheKey);
|
||||||
|
LOGGER.info("所有数据解析完成!");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 加上存储数据库
|
||||||
|
*/
|
||||||
|
private void saveDataCache(String cacheKey) {
|
||||||
|
LOGGER.info("{}条数据,存储数据数据!", importPowerWaterFeeVOS.size());
|
||||||
|
GuavaCacheUtil.put(cacheKey, importPowerWaterFeeVOS);
|
||||||
|
LOGGER.info("存储数据成功!");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,62 @@
|
|||||||
|
package com.ics.admin.listener;
|
||||||
|
|
||||||
|
import com.alibaba.excel.context.AnalysisContext;
|
||||||
|
import com.alibaba.excel.event.AnalysisEventListener;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.ics.admin.vo.ImportRentVO;
|
||||||
|
import com.ics.common.utils.GuavaCacheUtil;
|
||||||
|
import org.apache.commons.compress.utils.Lists;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入验证监听
|
||||||
|
* @author zzm
|
||||||
|
*/
|
||||||
|
public class ImportRentListener extends AnalysisEventListener<ImportRentVO> {
|
||||||
|
|
||||||
|
private static final Logger LOGGER = LoggerFactory.getLogger(ImportRentListener.class);
|
||||||
|
|
||||||
|
private String cacheKey;
|
||||||
|
|
||||||
|
List<ImportRentVO> importRentVOS = Lists.newArrayList();
|
||||||
|
|
||||||
|
|
||||||
|
public ImportRentListener(String cacheKey){
|
||||||
|
this.cacheKey = cacheKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void invoke(ImportRentVO importRentVO, AnalysisContext analysisContext) {
|
||||||
|
LOGGER.info("解析到一条数据:{}", JSON.toJSONString(importRentVO));
|
||||||
|
if (StringUtils.isEmpty(importRentVO.getSn())) {
|
||||||
|
throw new RuntimeException("账单号必填!");
|
||||||
|
}
|
||||||
|
if (importRentVO.getReceiveRent() == null) {
|
||||||
|
throw new RuntimeException("实收租金必填!");
|
||||||
|
}
|
||||||
|
if (importRentVO.getReceiveManagementTotalFee() == null) {
|
||||||
|
throw new RuntimeException("物业管理费必填!");
|
||||||
|
}
|
||||||
|
importRentVOS.add(importRentVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doAfterAllAnalysed(AnalysisContext analysisContext) {
|
||||||
|
saveDataCache(cacheKey);
|
||||||
|
LOGGER.info("所有数据解析完成!");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 加上存储数据库
|
||||||
|
*/
|
||||||
|
private void saveDataCache(String cacheKey) {
|
||||||
|
LOGGER.info("{}条数据,存储数据数据!", importRentVOS.size());
|
||||||
|
GuavaCacheUtil.put(cacheKey, importRentVOS);
|
||||||
|
LOGGER.info("存储数据成功!");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
package com.ics.admin.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.ics.admin.domain.ActivityDetail;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动报名详情Mapper接口
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2021-03-25
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface ActivityDetailMapper extends BaseMapper<ActivityDetail> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询活动报名详情列表
|
||||||
|
*
|
||||||
|
* @param activityDetail 活动报名详情
|
||||||
|
* @return 活动报名详情集合
|
||||||
|
*/
|
||||||
|
List<ActivityDetail> selectActivityDetailList(ActivityDetail activityDetail);
|
||||||
|
}
|
@ -0,0 +1,76 @@
|
|||||||
|
package com.ics.admin.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.ics.admin.domain.Activity;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动管理Mapper接口
|
||||||
|
*
|
||||||
|
* @author ics
|
||||||
|
* @date 2021-03-25
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface ActivityMapper extends BaseMapper<Activity> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询活动管理
|
||||||
|
*
|
||||||
|
* @param id 活动管理ID
|
||||||
|
* @return 活动管理
|
||||||
|
*/
|
||||||
|
Activity selectActivityById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询活动管理列表
|
||||||
|
*
|
||||||
|
* @param activity 活动管理
|
||||||
|
* @return 活动管理集合
|
||||||
|
*/
|
||||||
|
List<Activity> selectActivityList(Activity activity);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询活动app列表
|
||||||
|
*
|
||||||
|
* @param activity 活动管理
|
||||||
|
* @return 活动管理集合
|
||||||
|
*/
|
||||||
|
List<Activity> selectActivityForAppList(Activity activity);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询活动管理app端
|
||||||
|
*
|
||||||
|
* @param id 活动管理ID
|
||||||
|
* @return 活动管理
|
||||||
|
*/
|
||||||
|
Activity selectActivityByAppId(Long id);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询活动管理列表(app端 个人查询)
|
||||||
|
*
|
||||||
|
* @param userId
|
||||||
|
* @return 活动管理集合
|
||||||
|
*/
|
||||||
|
List<Activity> selectActivityForAppListByUserId(Long userId);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @param status
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int updateStatus(@Param("id") Long id, @Param("status") Activity.Status status);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<Activity> findAll();
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package com.ics.admin.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.ics.admin.domain.ApplyMoveInFile;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 注册迁入申请上传文件Mapper接口
|
||||||
|
*
|
||||||
|
* @author zzm
|
||||||
|
* @date 2021-04-13
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface ApplyMoveInFileMapper extends BaseMapper<ApplyMoveInFile> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据迁入申请id删除
|
||||||
|
* @param moveInId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int deleteByApplyMoveInId(Long moveInId);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
package com.ics.admin.mapper;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.ics.admin.domain.ApplyMoveIn;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 注册迁入申请Mapper接口
|
||||||
|
*
|
||||||
|
* @author zzm
|
||||||
|
* @date 2021-04-13
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface ApplyMoveInMapper extends BaseMapper<ApplyMoveIn> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据用户id查询迁入申请资料
|
||||||
|
* @param createUserId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<ApplyMoveIn> selectApplyMoveInByUserId(Long createUserId);
|
||||||
|
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user