Merge branch '2.0.1' of http://139.186.142.91:10010/r/productDev/funingyunwei into 2.0.1
¶Ô±ÈÐÂÎļþ |
| | |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywtempconfig:create', 'æ°å»ºå¬ç¼´ä¿¡æ¯é
ç½®', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywtempconfig:delete', 'å é¤å¬ç¼´ä¿¡æ¯é
ç½®', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywtempconfig:update', 'ä¿®æ¹å¬ç¼´ä¿¡æ¯é
ç½®', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywtempconfig:query', 'æ¥è¯¢å¬ç¼´ä¿¡æ¯é
ç½®', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywtempconfig:exportExcel', '导åºå¬ç¼´ä¿¡æ¯é
ç½®(Excel)', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | |
| | |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.YwContractBill; |
| | | import com.doumee.dao.business.vo.YwContractBillCallDataVO; |
| | | import com.doumee.dao.business.vo.YwContractBillDataVO; |
| | | import com.doumee.service.business.YwContractBillService; |
| | | import io.swagger.annotations.Api; |
| | |
| | | return ApiResponse.success(ywContractBillService.findPage(pageWrap)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("é¾æè´¦å") |
| | | @PostMapping("/findPageForOverdue") |
| | | @CloudRequiredPermission("business:ywcontractbill:query") |
| | | public ApiResponse<PageData<YwContractBill>> findPageForOverdue (@RequestBody PageWrap<YwContractBill> pageWrap,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | pageWrap.getModel().setLoginUserInfo(this.getLoginUser(token)); |
| | | return ApiResponse.success(ywContractBillService.findPageForOverdue(pageWrap)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("å¯é款账å") |
| | | @PostMapping("/getCanBackBill") |
| | | @CloudRequiredPermission("business:ywcontractbill:query") |
| | |
| | | return ApiResponse.success(ywContractBillService.getWaitDealList(contractId)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("è·åæ¹éå¬ç¼´æ°æ®") |
| | | @PostMapping("/getNoticeCustomerData") |
| | | @CloudRequiredPermission("business:ywcontractbill:query") |
| | | public ApiResponse<List<YwContractBillCallDataVO>> getNoticeCustomerData(@RequestBody List<Integer> billIds,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(ywContractBillService.getNoticeCustomerData(billIds)); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.cloud.admin; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.YwTempConfig; |
| | | import com.doumee.dao.business.vo.YwCallTempDataVO; |
| | | import com.doumee.service.business.YwTempConfigService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/10 09:43 |
| | | */ |
| | | @Api(tags = "å¬ç¼´ä¿¡æ¯é
ç½®") |
| | | @RestController |
| | | @RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX+"/business/ywTempConfig") |
| | | public class YwTempConfigCloudController extends BaseController { |
| | | |
| | | @Autowired |
| | | private YwTempConfigService ywTempConfigService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:ywtempconfig:create") |
| | | public ApiResponse create(@RequestBody YwTempConfig ywTempConfig) { |
| | | return ApiResponse.success(ywTempConfigService.create(ywTempConfig)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:ywtempconfig:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | ywTempConfigService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:ywtempconfig:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | ywTempConfigService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:ywtempconfig:update") |
| | | public ApiResponse updateById(@RequestBody YwTempConfig ywTempConfig) { |
| | | ywTempConfigService.updateById(ywTempConfig); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:ywtempconfig:query") |
| | | public ApiResponse<PageData<YwTempConfig>> findPage (@RequestBody PageWrap<YwTempConfig> pageWrap) { |
| | | return ApiResponse.success(ywTempConfigService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:ywtempconfig:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<YwTempConfig> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(YwTempConfig.class).export(ywTempConfigService.findPage(pageWrap).getRecords(), "å¬ç¼´ä¿¡æ¯é
ç½®", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:ywtempconfig:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(ywTempConfigService.findById(id)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/getCallTemp") |
| | | @RequiresPermissions("business:ywtempconfig:query") |
| | | public ApiResponse<YwCallTempDataVO> getCallTemp() { |
| | | return ApiResponse.success(ywTempConfigService.getCallTemp()); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.doumee.dao.business.model.YwTempConfig; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/10 09:43 |
| | | */ |
| | | public interface YwTempConfigMapper extends MPJBaseMapper<YwTempConfig> { |
| | | |
| | | } |
| | |
| | | @TableField(exist = false) |
| | | private String customerName; |
| | | |
| | | @ApiModelProperty(value = "客æ·é»è®¤è系人", example = "1") |
| | | @TableField(exist = false) |
| | | private Integer customerUserId; |
| | | |
| | | @ApiModelProperty(value = "客æ·ä¸»é®", example = "1") |
| | | @TableField(exist = false) |
| | | private Integer customerId; |
| | | |
| | | |
| | | @ApiModelProperty(value = "å
¬å¸åç§°", example = "1") |
| | | @TableField(exist = false) |
| | | private String companyName; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * å¬ç¼´ä¿¡æ¯é
ç½® |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/10 09:43 |
| | | */ |
| | | @Data |
| | | @ApiModel("å¬ç¼´ä¿¡æ¯é
ç½®") |
| | | @TableName("`yw_temp_config`") |
| | | public class YwTempConfig extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | | @ExcelColumn(name="主é®") |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "å建人ç¼ç ", example = "1") |
| | | @ExcelColumn(name="å建人ç¼ç ") |
| | | private Integer creator; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @ExcelColumn(name="å建æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date createDate; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°äººç¼ç ", example = "1") |
| | | @ExcelColumn(name="æ´æ°äººç¼ç ") |
| | | private Integer editor; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | @ExcelColumn(name="æ´æ°æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date editDate; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å é¤0å¦ 1æ¯", example = "1") |
| | | @ExcelColumn(name="æ¯å¦å é¤0å¦ 1æ¯") |
| | | private Integer isdeleted; |
| | | |
| | | @ApiModelProperty(value = "夿³¨") |
| | | @ExcelColumn(name="夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "ç±»åï¼0=çæ¯æ¨¡æ¿ï¼1=é®ä»¶æ¨¡æ¿ï¼2=ç§èµéç¥éä»¶ï¼3=å
¶ä»éç¥éä»¶ï¼4=è´¦åå
³é®åï¼5=ååå
³é®åï¼6=å
¶ä»ä¿¡æ¯ï¼", example = "1") |
| | | @ExcelColumn(name="ç±»åï¼0=çæ¯æ¨¡æ¿ï¼1=é®ä»¶æ¨¡æ¿ï¼2=ç§èµéç¥éä»¶ï¼3=å
¶ä»éç¥éä»¶ï¼4=è´¦åå
³é®åï¼5=ååå
³é®åï¼6=å
¶ä»ä¿¡æ¯ï¼") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "æ é¢") |
| | | @ExcelColumn(name="æ é¢") |
| | | private String title; |
| | | |
| | | @ApiModelProperty(value = "æä»¶å°å type = 2/3使ç¨") |
| | | @ExcelColumn(name="æä»¶å°å type = 2/3使ç¨") |
| | | private String url; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.vo; |
| | | |
| | | import com.doumee.dao.business.model.YwTempConfig; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | | * |
| | | * @Author : Rk |
| | | * @create 2025/1/8 15:32 |
| | | */ |
| | | @Data |
| | | public class YwCallTempDataVO { |
| | | |
| | | @ApiModelProperty(value = "çæ¯æ¨¡æ¿", example = "1") |
| | | private YwTempConfig smsTemp; |
| | | |
| | | @ApiModelProperty(value = "é®ä»¶ä¿¡æ¯æ¨¡æ¿", example = "1") |
| | | private YwTempConfig emailTemp; |
| | | |
| | | @ApiModelProperty(value = "ç§èµéç¥å模æ¿", example = "1") |
| | | private YwTempConfig leaseTemp; |
| | | |
| | | @ApiModelProperty(value = "å
¶ä»éç¥å模æ¿", example = "1") |
| | | private YwTempConfig otherTemp; |
| | | |
| | | @ApiModelProperty(value = "模æ¿å
³é®å - è´¦å", example = "1") |
| | | private List<YwTempConfig> billTempList; |
| | | |
| | | @ApiModelProperty(value = "模æ¿å
³é®å - åå", example = "1") |
| | | private List<YwTempConfig> contractTempList; |
| | | |
| | | @ApiModelProperty(value = "模æ¿å
³é®å - å
¶ä»", example = "1") |
| | | private List<YwTempConfig> otherTempList; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.vo; |
| | | |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.business.model.YwContractBill; |
| | | import com.doumee.dao.business.model.YwCustomer; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | | * |
| | | * @Author : Rk |
| | | * @create 2025/1/8 15:32 |
| | | */ |
| | | @Data |
| | | public class YwContractBillCallDataVO { |
| | | |
| | | @ApiModelProperty(value = "è´¦å主é®", example = "1") |
| | | private Integer billId; |
| | | |
| | | @ApiModelProperty(value = "客æ·åç§°", example = "1") |
| | | private String customerName; |
| | | |
| | | @ApiModelProperty(value = "é»è®¤è系人主é®", example = "1") |
| | | private Integer userId; |
| | | |
| | | @ApiModelProperty(value = "è系人å表", example = "1") |
| | | private List<Member> memberList; |
| | | |
| | | } |
| | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.YwContractBill; |
| | | import com.doumee.dao.business.vo.YwContractBillCallDataVO; |
| | | import com.doumee.dao.business.vo.YwContractBillDataVO; |
| | | |
| | | import java.util.List; |
| | |
| | | PageData<YwContractBill> findPage(PageWrap<YwContractBill> pageWrap); |
| | | |
| | | /** |
| | | * é¾æè´¦åå页 |
| | | * @param pageWrap |
| | | * @return |
| | | */ |
| | | PageData<YwContractBill> findPageForOverdue(PageWrap<YwContractBill> pageWrap); |
| | | |
| | | /** |
| | | * æ¡ä»¶ç»è®¡ |
| | | * |
| | | * @param ywContractBill å®ä½å¯¹è±¡ |
| | |
| | | |
| | | List<YwContractBill> getCanBackBill(YwContractBill model); |
| | | |
| | | |
| | | YwContractBillDataVO getWaitDealList(Integer contractId); |
| | | |
| | | List<YwContractBillCallDataVO> getNoticeCustomerData(List<Integer> billIds); |
| | | |
| | | |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business; |
| | | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.YwTempConfig; |
| | | import com.doumee.dao.business.vo.YwCallTempDataVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * å¬ç¼´ä¿¡æ¯é
ç½®Serviceå®ä¹ |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/10 09:43 |
| | | */ |
| | | public interface YwTempConfigService { |
| | | |
| | | /** |
| | | * å建 |
| | | * |
| | | * @param ywTempConfig å®ä½å¯¹è±¡ |
| | | * @return Integer |
| | | */ |
| | | Integer create(YwTempConfig ywTempConfig); |
| | | |
| | | /** |
| | | * 主é®å é¤ |
| | | * |
| | | * @param id ä¸»é® |
| | | */ |
| | | void deleteById(Integer id); |
| | | |
| | | /** |
| | | * å é¤ |
| | | * |
| | | * @param ywTempConfig å®ä½å¯¹è±¡ |
| | | */ |
| | | void delete(YwTempConfig ywTempConfig); |
| | | |
| | | /** |
| | | * æ¹é主é®å é¤ |
| | | * |
| | | * @param ids 主é®é |
| | | */ |
| | | void deleteByIdInBatch(List<Integer> ids); |
| | | |
| | | /** |
| | | * 䏻鮿´æ° |
| | | * |
| | | * @param ywTempConfig å®ä½å¯¹è±¡ |
| | | */ |
| | | void updateById(YwTempConfig ywTempConfig); |
| | | |
| | | /** |
| | | * æ¹é䏻鮿´æ° |
| | | * |
| | | * @param ywTempConfigs å®ä½é |
| | | */ |
| | | void updateByIdInBatch(List<YwTempConfig> ywTempConfigs); |
| | | |
| | | /** |
| | | * 䏻鮿¥è¯¢ |
| | | * |
| | | * @param id ä¸»é® |
| | | * @return YwTempConfig |
| | | */ |
| | | YwTempConfig findById(Integer id); |
| | | |
| | | /** |
| | | * æ¡ä»¶æ¥è¯¢åæ¡è®°å½ |
| | | * |
| | | * @param ywTempConfig å®ä½å¯¹è±¡ |
| | | * @return YwTempConfig |
| | | */ |
| | | YwTempConfig findOne(YwTempConfig ywTempConfig); |
| | | |
| | | /** |
| | | * æ¡ä»¶æ¥è¯¢ |
| | | * |
| | | * @param ywTempConfig å®ä½å¯¹è±¡ |
| | | * @return List<YwTempConfig> |
| | | */ |
| | | List<YwTempConfig> findList(YwTempConfig ywTempConfig); |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * |
| | | * @param pageWrap å页对象 |
| | | * @return PageData<YwTempConfig> |
| | | */ |
| | | PageData<YwTempConfig> findPage(PageWrap<YwTempConfig> pageWrap); |
| | | |
| | | /** |
| | | * æ¡ä»¶ç»è®¡ |
| | | * |
| | | * @param ywTempConfig å®ä½å¯¹è±¡ |
| | | * @return long |
| | | */ |
| | | long count(YwTempConfig ywTempConfig); |
| | | |
| | | YwCallTempDataVO getCallTemp(); |
| | | } |
| | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.business.vo.YwContractBillCallDataVO; |
| | | import com.doumee.dao.business.vo.YwContractBillDataVO; |
| | | import com.doumee.dao.system.MultifileMapper; |
| | | import com.doumee.dao.system.model.Multifile; |
| | |
| | | |
| | | @Autowired |
| | | private YwContractMapper ywContractMapper; |
| | | |
| | | @Autowired |
| | | private MemberMapper memberMapper; |
| | | |
| | | |
| | | |
| | |
| | | YwContractBill::getPayStatus,model.getPayStatus()) |
| | | .eq(Objects.nonNull(model)&&Objects.nonNull(model.getType()), |
| | | YwContractBill::getType,model.getType()) |
| | | .le(Objects.nonNull(model)&&Objects.nonNull(model.getIsOverdue())&&Constants.equalsInteger(model.getIsOverdue(),Constants.ONE), |
| | | YwContractBill::getPlanPayDate, DateUtil.getCurrDateTime()) |
| | | .eq(Objects.nonNull(model)&&Objects.nonNull(model.getIsOverdue())&&Constants.equalsInteger(model.getIsOverdue(),Constants.ONE), |
| | | YwContractBill::getStatus, Constants.ZERO) |
| | | .eq(Objects.nonNull(model)&&Objects.nonNull(model.getContractId()), |
| | | YwContractBill::getContractId,model.getContractId()) |
| | | .like(Objects.nonNull(model)&&StringUtils.isNotBlank(model.getContractCode()), |
| | |
| | | }else{ |
| | | ywContractBill.setIsOverdue(Constants.ZERO); |
| | | } |
| | | //楼å®åç§° |
| | | List<YwContractRoom> ywContractRoomList = ywContractBill.getYwContractRoomList(); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(ywContractRoomList)){ |
| | | StringBuilder roomPathName = new StringBuilder(); |
| | | for (YwContractRoom ywContractRoom:ywContractRoomList) { |
| | | if(StringUtils.isNotBlank(ywContractRoom.getProjectName())){ |
| | | roomPathName.append(ywContractRoom.getProjectName()+"/"); |
| | | } |
| | | if(StringUtils.isNotBlank(ywContractRoom.getBuildingName())){ |
| | | roomPathName.append(ywContractRoom.getBuildingName()+"/"); |
| | | } |
| | | if(StringUtils.isNotBlank(ywContractRoom.getFloorName())){ |
| | | roomPathName.append(ywContractRoom.getFloorName()+"/"); |
| | | } |
| | | if(StringUtils.isNotBlank(ywContractRoom.getRoomName())){ |
| | | roomPathName.append(ywContractRoom.getRoomName()); |
| | | } |
| | | if(StringUtils.isNotBlank(roomPathName)){ |
| | | roomPathName.append(";"); |
| | | } |
| | | } |
| | | ywContractBill.setRoomPathName(roomPathName.toString()); |
| | | } |
| | | } |
| | | |
| | | return PageData.from(iPage); |
| | | } |
| | | |
| | | /** |
| | | * é¾æè´¦å |
| | | * @param pageWrap |
| | | * @return |
| | | */ |
| | | @Override |
| | | public PageData<YwContractBill> findPageForOverdue(PageWrap<YwContractBill> pageWrap) { |
| | | IPage<YwContractBill> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | MPJLambdaWrapper<YwContractBill> queryWrapper = new MPJLambdaWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | YwContractBill model = pageWrap.getModel(); |
| | | IPage<YwContractBill> iPage = ywContractBillMapper.selectJoinPage(page,YwContractBill.class, |
| | | queryWrapper.selectAll(YwContractBill.class) |
| | | .select(" ( select ifnull( sum( CASE WHEN t.bill_type = 0 and yw.REVENUE_TYPE = 0 THEN yw.ACT_RECEIVABLE_FEE when t.bill_type = 0 and yw.REVENUE_TYPE = 1 then -yw.ACT_RECEIVABLE_FEE when t.bill_type = 1 and yw.REVENUE_TYPE = 0 then -yw.ACT_RECEIVABLE_FEE else yw.ACT_RECEIVABLE_FEE END),0) from yw_contract_revenue yw where yw.bill_id = t.id and yw.status = 0 and yw.isdeleted = 0 ) as actReceivableFee ") |
| | | .selectAs(YwContract::getCode,YwContractBill::getContractCode) |
| | | .selectAs(YwCustomer::getName,YwContractBill::getCustomerName) |
| | | .leftJoin(YwContract.class,YwContract::getId,YwContractBill::getContractId) |
| | | .leftJoin(YwCustomer.class,YwCustomer::getId,YwContract::getRenterId) |
| | | .eq(YwContractBill::getIsdeleted,Constants.ZERO) |
| | | .like(Objects.nonNull(model)&&StringUtils.isNotBlank(model.getCustomerName()), |
| | | YwCustomer::getName,model.getCustomerName()) |
| | | .eq(Objects.nonNull(model)&&Objects.nonNull(model.getStatus()), |
| | | YwContractBill::getStatus,model.getStatus()) |
| | | .eq(Objects.nonNull(model)&&Objects.nonNull(model.getBillType()), |
| | | YwContractBill::getBillType,model.getBillType()) |
| | | .eq(Objects.nonNull(model)&&Objects.nonNull(model.getPayStatus()), |
| | | YwContractBill::getPayStatus,model.getPayStatus()) |
| | | .in(Objects.nonNull(model)&&Objects.nonNull(model.getPayStatus()), |
| | | YwContractBill::getPayStatus,Constants.ZERO,Constants.THREE,Constants.TWO,Constants.FOUR) |
| | | .eq(Objects.nonNull(model)&&Objects.nonNull(model.getType()), |
| | | YwContractBill::getType,model.getType()) |
| | | .le(Objects.nonNull(model)&&Objects.nonNull(model.getIsOverdue())&&Constants.equalsInteger(model.getIsOverdue(),Constants.ONE), |
| | | YwContractBill::getPlanPayDate, DateUtil.getCurrDateTime()) |
| | | .eq(Objects.nonNull(model)&&Objects.nonNull(model.getIsOverdue())&&Constants.equalsInteger(model.getIsOverdue(),Constants.ONE), |
| | | YwContractBill::getStatus, Constants.ZERO) |
| | | .ge(Objects.nonNull(model)&&Objects.nonNull(model.getPlanPayDateStart()),YwContractBill::getPlanPayDate, Utils.Date.getStart(model.getPlanPayDateStart())) |
| | | .le(Objects.nonNull(model)&&Objects.nonNull(model.getPlanPayDateEnd()),YwContractBill::getPlanPayDate, Utils.Date.getEnd(model.getPlanPayDateEnd())) |
| | | .orderByDesc(YwContractBill::getId)); |
| | | this.dealRoomDetail(iPage.getRecords()); |
| | | for (YwContractBill ywContractBill:iPage.getRecords()) { |
| | | //éæ¶éé¢ |
| | | ywContractBill.setNeedReceivableFee( |
| | | ywContractBill.getReceivableFee().subtract(ywContractBill.getActReceivableFee()) |
| | | ); |
| | | //楼å®åç§° |
| | | List<YwContractRoom> ywContractRoomList = ywContractBill.getYwContractRoomList(); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(ywContractRoomList)){ |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public List<YwContractBillCallDataVO> getNoticeCustomerData(List<Integer> billIds){ |
| | | List<YwContractBillCallDataVO> ywContractBillCallDataVOList = new ArrayList<>(); |
| | | List<YwContractBill> ywContractBillList = ywContractBillMapper.selectJoinList(YwContractBill.class,new MPJLambdaWrapper<YwContractBill>() |
| | | .selectAll(YwContractBill.class) |
| | | .selectAs(YwCustomer::getName,YwContractBill::getCustomerName) |
| | | .selectAs(YwCustomer::getUserId,YwContractBill::getCustomerUserId) |
| | | .selectAs(YwCustomer::getId,YwContractBill::getCustomerId) |
| | | .leftJoin(YwContract.class,YwContract::getId,YwContractBill::getContractId) |
| | | .leftJoin(YwCustomer.class,YwCustomer::getId,YwContract::getRenterId) |
| | | .in(YwContractBill::getId,billIds) |
| | | ); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isEmpty(ywContractBillList) || |
| | | !Constants.equalsInteger(billIds.size(),ywContractBillList.size()) |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"è´¦åæ°æ®é误ï¼è¯·å·æ°éè¯"); |
| | | } |
| | | for (YwContractBill ywContractBill:ywContractBillList) { |
| | | YwContractBillCallDataVO ywContractBillCallDataVO = new YwContractBillCallDataVO(); |
| | | ywContractBillCallDataVO.setBillId(ywContractBill.getId()); |
| | | ywContractBillCallDataVO.setCustomerName(ywContractBill.getCustomerName()); |
| | | ywContractBillCallDataVO.setUserId(ywContractBill.getCustomerUserId()); |
| | | //æ¥è¯¢å®¢æ·ä¸çææäººå |
| | | ywContractBillCallDataVO.setMemberList( |
| | | memberMapper.selectList(new QueryWrapper<Member>().lambda().eq(Member::getCustomerId,ywContractBill.getCustomerId()) |
| | | .eq(Member::getIsdeleted,Constants.ZERO)) |
| | | ); |
| | | ywContractBillCallDataVOList.add(ywContractBillCallDataVO); |
| | | } |
| | | return ywContractBillCallDataVOList; |
| | | } |
| | | |
| | | |
| | | public void downloadCallFeeDoc(List<Integer> billIds){ |
| | | List<YwContractBill> ywContractBillList = ywContractBillMapper.selectJoinList(YwContractBill.class,new MPJLambdaWrapper<YwContractBill>() |
| | | .selectAll(YwContractBill.class) |
| | | .selectAs(YwCustomer::getName,YwContractBill::getCustomerName) |
| | | .selectAs(YwCustomer::getUserId,YwContractBill::getCustomerUserId) |
| | | .selectAs(YwCustomer::getId,YwContractBill::getCustomerId) |
| | | .leftJoin(YwContract.class,YwContract::getId,YwContractBill::getContractId) |
| | | .leftJoin(YwCustomer.class,YwCustomer::getId,YwContract::getRenterId) |
| | | .in(YwContractBill::getId,billIds) |
| | | ); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.YwTempConfigMapper; |
| | | import com.doumee.dao.business.model.YwTempConfig; |
| | | import com.doumee.dao.business.vo.YwCallTempDataVO; |
| | | import com.doumee.service.business.YwTempConfigService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.List; |
| | | import java.util.Optional; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * å¬ç¼´ä¿¡æ¯é
ç½®Serviceå®ç° |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/10 09:43 |
| | | */ |
| | | @Service |
| | | public class YwTempConfigServiceImpl implements YwTempConfigService { |
| | | |
| | | @Autowired |
| | | private YwTempConfigMapper ywTempConfigMapper; |
| | | |
| | | @Override |
| | | public Integer create(YwTempConfig ywTempConfig) { |
| | | ywTempConfigMapper.insert(ywTempConfig); |
| | | return ywTempConfig.getId(); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteById(Integer id) { |
| | | ywTempConfigMapper.deleteById(id); |
| | | } |
| | | |
| | | @Override |
| | | public void delete(YwTempConfig ywTempConfig) { |
| | | UpdateWrapper<YwTempConfig> deleteWrapper = new UpdateWrapper<>(ywTempConfig); |
| | | ywTempConfigMapper.delete(deleteWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteByIdInBatch(List<Integer> ids) { |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | return; |
| | | } |
| | | ywTempConfigMapper.deleteBatchIds(ids); |
| | | } |
| | | |
| | | @Override |
| | | public void updateById(YwTempConfig ywTempConfig) { |
| | | ywTempConfigMapper.updateById(ywTempConfig); |
| | | } |
| | | |
| | | @Override |
| | | public void updateByIdInBatch(List<YwTempConfig> ywTempConfigs) { |
| | | if (CollectionUtils.isEmpty(ywTempConfigs)) { |
| | | return; |
| | | } |
| | | for (YwTempConfig ywTempConfig: ywTempConfigs) { |
| | | this.updateById(ywTempConfig); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public YwTempConfig findById(Integer id) { |
| | | return ywTempConfigMapper.selectById(id); |
| | | } |
| | | |
| | | @Override |
| | | public YwTempConfig findOne(YwTempConfig ywTempConfig) { |
| | | QueryWrapper<YwTempConfig> wrapper = new QueryWrapper<>(ywTempConfig); |
| | | return ywTempConfigMapper.selectOne(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public List<YwTempConfig> findList(YwTempConfig ywTempConfig) { |
| | | QueryWrapper<YwTempConfig> wrapper = new QueryWrapper<>(ywTempConfig); |
| | | return ywTempConfigMapper.selectList(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public PageData<YwTempConfig> findPage(PageWrap<YwTempConfig> pageWrap) { |
| | | IPage<YwTempConfig> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | QueryWrapper<YwTempConfig> queryWrapper = new QueryWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | if (pageWrap.getModel().getId() != null) { |
| | | queryWrapper.lambda().eq(YwTempConfig::getId, pageWrap.getModel().getId()); |
| | | } |
| | | if (pageWrap.getModel().getCreator() != null) { |
| | | queryWrapper.lambda().eq(YwTempConfig::getCreator, pageWrap.getModel().getCreator()); |
| | | } |
| | | if (pageWrap.getModel().getCreateDate() != null) { |
| | | queryWrapper.lambda().ge(YwTempConfig::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getCreateDate())); |
| | | queryWrapper.lambda().le(YwTempConfig::getCreateDate, Utils.Date.getEnd(pageWrap.getModel().getCreateDate())); |
| | | } |
| | | if (pageWrap.getModel().getEditor() != null) { |
| | | queryWrapper.lambda().eq(YwTempConfig::getEditor, pageWrap.getModel().getEditor()); |
| | | } |
| | | if (pageWrap.getModel().getEditDate() != null) { |
| | | queryWrapper.lambda().ge(YwTempConfig::getEditDate, Utils.Date.getStart(pageWrap.getModel().getEditDate())); |
| | | queryWrapper.lambda().le(YwTempConfig::getEditDate, Utils.Date.getEnd(pageWrap.getModel().getEditDate())); |
| | | } |
| | | if (pageWrap.getModel().getIsdeleted() != null) { |
| | | queryWrapper.lambda().eq(YwTempConfig::getIsdeleted, pageWrap.getModel().getIsdeleted()); |
| | | } |
| | | if (pageWrap.getModel().getRemark() != null) { |
| | | queryWrapper.lambda().eq(YwTempConfig::getRemark, pageWrap.getModel().getRemark()); |
| | | } |
| | | if (pageWrap.getModel().getType() != null) { |
| | | queryWrapper.lambda().eq(YwTempConfig::getType, pageWrap.getModel().getType()); |
| | | } |
| | | if (pageWrap.getModel().getTitle() != null) { |
| | | queryWrapper.lambda().eq(YwTempConfig::getTitle, pageWrap.getModel().getTitle()); |
| | | } |
| | | if (pageWrap.getModel().getUrl() != null) { |
| | | queryWrapper.lambda().eq(YwTempConfig::getUrl, pageWrap.getModel().getUrl()); |
| | | } |
| | | for(PageWrap.SortData sortData: pageWrap.getSorts()) { |
| | | if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) { |
| | | queryWrapper.orderByDesc(sortData.getProperty()); |
| | | } else { |
| | | queryWrapper.orderByAsc(sortData.getProperty()); |
| | | } |
| | | } |
| | | return PageData.from(ywTempConfigMapper.selectPage(page, queryWrapper)); |
| | | } |
| | | |
| | | @Override |
| | | public long count(YwTempConfig ywTempConfig) { |
| | | QueryWrapper<YwTempConfig> wrapper = new QueryWrapper<>(ywTempConfig); |
| | | return ywTempConfigMapper.selectCount(wrapper); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public YwCallTempDataVO getCallTemp(){ |
| | | YwCallTempDataVO ywCallTempDataVO = new YwCallTempDataVO(); |
| | | List<YwTempConfig> ywTempConfigList = ywTempConfigMapper.selectList(new QueryWrapper<YwTempConfig>().lambda() |
| | | .eq(YwTempConfig::getIsdeleted, Constants.ZERO)); |
| | | Optional<YwTempConfig> smsOptional = ywTempConfigList.stream().filter(i->Constants.equalsInteger(i.getType(), |
| | | Constants.ZERO)).findAny(); |
| | | if (smsOptional.isPresent()) { |
| | | ywCallTempDataVO.setSmsTemp(smsOptional.get()); |
| | | } |
| | | Optional<YwTempConfig> emailOptional = ywTempConfigList.stream().filter(i->Constants.equalsInteger(i.getType(), |
| | | Constants.ONE)).findAny(); |
| | | if (emailOptional.isPresent()) { |
| | | ywCallTempDataVO.setEmailTemp(emailOptional.get()); |
| | | } |
| | | Optional<YwTempConfig> leaseOptional = ywTempConfigList.stream().filter(i->Constants.equalsInteger(i.getType(), |
| | | Constants.TWO)).findAny(); |
| | | if (leaseOptional.isPresent()) { |
| | | ywCallTempDataVO.setLeaseTemp(leaseOptional.get()); |
| | | } |
| | | Optional<YwTempConfig> otherOptional = ywTempConfigList.stream().filter(i->Constants.equalsInteger(i.getType(), |
| | | Constants.THREE)).findAny(); |
| | | if (otherOptional.isPresent()) { |
| | | ywCallTempDataVO.setOtherTemp(otherOptional.get()); |
| | | } |
| | | ywCallTempDataVO.setContractTempList( |
| | | ywTempConfigList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.FIVE)).collect(Collectors.toList()) |
| | | ); |
| | | ywCallTempDataVO.setBillTempList( |
| | | ywTempConfigList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.FOUR)).collect(Collectors.toList()) |
| | | ); |
| | | ywCallTempDataVO.setOtherTempList( |
| | | ywTempConfigList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.SIX)).collect(Collectors.toList()) |
| | | ); |
| | | return ywCallTempDataVO; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |