| | |
| | | spring: |
| | | profiles: |
| | | active: dev |
| | | active: pro |
| | | application: |
| | | name: system_gateway |
| | | # å®å
¨é
ç½® |
| | | security: |
| | | # éªç¾å
¬é¥å°å |
| | | security: |
| | | oauth2: |
| | | authorizationserver: |
| | | token-uri: https:// |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.system.dto; |
| | | |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * @author Eva.Caesar Liu |
| | | * @date 2023/05/04 18:21 |
| | | */ |
| | | @Data |
| | | @ApiModel("导å
¥ç©æä¿¡æ¯") |
| | | public class ImportMaterialDTO { |
| | | |
| | | @ApiModelProperty(value = "ç©æç¼å·") |
| | | @ExcelColumn(name="ç©æç¼å·",index = 0,width = 10) |
| | | private String code; |
| | | |
| | | @ApiModelProperty(value = "ç©æåç§°") |
| | | @ExcelColumn(name="ç©æåç§°",index = 1,width = 10) |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "ç©æåç±»") |
| | | @ExcelColumn(name="ç©æåç±»",index = 2,width = 10) |
| | | private String categoryName; |
| | | |
| | | @ApiModelProperty(value = "ç©æååç±»") |
| | | @ExcelColumn(name="ç©æååç±»",index = 3,width = 10) |
| | | private String categoryChildName; |
| | | |
| | | @ApiModelProperty(value = "æ¡ç ") |
| | | @ExcelColumn(name="æ¡ç ",index = 4,width = 10) |
| | | private String qrcode; |
| | | |
| | | @ApiModelProperty(value = "åç") |
| | | @ExcelColumn(name="åç",index = 5,width = 10) |
| | | private String brand; |
| | | |
| | | @ApiModelProperty(value = "è§æ ¼åå·") |
| | | @ExcelColumn(name="è§æ ¼åå·",index = 6,width = 10) |
| | | private String attr; |
| | | |
| | | @ApiModelProperty(value = "åä½") |
| | | @ExcelColumn(name="åä½",index = 7,width = 10) |
| | | private String unitName; |
| | | |
| | | @ApiModelProperty(value = "å®å
¨åºåï¼ä¸éï¼", example = "1") |
| | | @ExcelColumn(name="å®å
¨åºåï¼ä¸éï¼",index = 8,width = 16) |
| | | private BigDecimal minStock; |
| | | |
| | | @ApiModelProperty(value = "å®å
¨åºåï¼ä¸éï¼", example = "1") |
| | | @ExcelColumn(name="å®å
¨åºåï¼ä¸éï¼",index = 9,width = 16) |
| | | private BigDecimal maxStock; |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | @GetMapping("/timer/yw/ywPatrolSchemeTaskTimer") |
| | | ApiResponse ywPatrolSchemeTaskTimer(); |
| | | |
| | | @ApiOperation("ãéå®è¿ç»´ã宿¶æ´æ°æ¿æºç§èµç¶æ") |
| | | @GetMapping("/timer/yw/ywRoomStatusTimer") |
| | | ApiResponse ywRoomStatusTimer(); |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation("宿¶æ´æ°æ¿æºç§èµç¶æ") |
| | | @GetMapping("/ywRoomStatusTimer") |
| | | public ApiResponse ywRoomStatusTimer() { |
| | | ywContractService.updRentContractStatus(); |
| | | ywContractService.updRoomLeaseNowStatus(); |
| | | return ApiResponse.success("宿¶æ´æ°æ¿æºç§èµç¶æä»»å¡æ§è¡ä¸"); |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation("宿¶æ´æ°redisæ°æ®") |
| | | @GetMapping("/ywUpdRedisDataTimer") |
| | | public ApiResponse ywUpdRedisDataTimer() { |
| | |
| | | import com.doumee.dao.business.vo.YwContractBillCallDataVO; |
| | | import com.doumee.dao.business.vo.YwContractBillDataVO; |
| | | import com.doumee.service.business.YwContractBillService; |
| | | import com.doumee.service.business.YwContractService; |
| | | import com.doumee.service.business.impl.SmsEmailServiceImpl; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | |
| | | @Autowired |
| | | private SmsEmailServiceImpl smsEmailService; |
| | | |
| | | @Autowired |
| | | private YwContractService ywContractService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | |
| | | return ApiResponse.success("çææå"); |
| | | } |
| | | |
| | | @LoginNoRequired |
| | | @ApiOperation("æ´æ°æ¿æºç§èµç¶æ") |
| | | @GetMapping("/dealRoomStatus") |
| | | public ApiResponse dealRoomStatus() { |
| | | ywContractService.updRentContractStatus(); |
| | | ywContractService.updRoomLeaseNowStatus(); |
| | | return ApiResponse.success("æä½æå"); |
| | | } |
| | | |
| | | @ApiOperation("è·åå¾
å¤çè´¦å") |
| | | @GetMapping("/getWaitDealList") |
| | | @CloudRequiredPermission("business:ywcontractbill:query") |
| | |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.YwMaterial; |
| | | import com.doumee.service.business.YwMaterialService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import io.swagger.annotations.*; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import java.io.File; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | |
| | | @PostMapping("/exportExcel") |
| | | @CloudRequiredPermission("business:ywmaterial:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<YwMaterial> pageWrap, HttpServletResponse response,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ExcelExporter.build(YwMaterial.class).export(ywMaterialService.findPage(pageWrap).getRecords(), "è¿ç»´èµäº§ä¿¡æ¯è¡¨", response); |
| | | ExcelExporter.build(YwMaterial.class).export(ywMaterialService.findPage(pageWrap).getRecords(), "ç©æä¿¡æ¯è¡¨", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | |
| | | public ApiResponse findById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(ywMaterialService.getDetail(id)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("ç©æä¿¡æ¯å¯¼å
¥") |
| | | @PostMapping("/importMaterialBatch") |
| | | @CloudRequiredPermission("business:ywmaterial:query") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "file", value = "file", required = true, paramType = "query", dataType = "file", dataTypeClass = File.class), |
| | | }) |
| | | public ApiResponse importMaterialBatch(@ApiParam(value = "file") MultipartFile file,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | return ApiResponse.success(ywMaterialService.importMaterialBatch(file,getLoginUser(token))); |
| | | } |
| | | } |
| | |
| | | spring: |
| | | profiles: |
| | | active: dev |
| | | active: pro |
| | | application: |
| | | name: visitsAdmin |
| | | # å®å
¨é
ç½® |
| | |
| | | IContext context = report.createContext(); |
| | | for (YwTempConfig ywTempConfig:ywTempConfigList) { |
| | | if(StringUtils.isBlank(ywTempConfig.getUrl())){ |
| | | ywTempConfig.setUrl("-"); |
| | | ywTempConfig.setUrl(" - "); |
| | | } |
| | | context.put(ywTempConfig.getTitle().replace("${","").replace("}",""), ywTempConfig.getUrl()); |
| | | } |
| | |
| | | @ExcelColumn(name="ç©ä¸è´¹æ»éé¢") |
| | | private BigDecimal wyTotalFee; |
| | | |
| | | @ApiModelProperty(value = "ååç¶æéå") |
| | | @TableField(exist = false) |
| | | private List<Integer> statusList; |
| | | |
| | | @ApiModelProperty(value = "æ¿é´ä¸»é® æ¥è¯¢ä½¿ç¨") |
| | | @TableField(exist = false) |
| | | private Integer roomId; |
| | |
| | | @TableField(exist = false) |
| | | private Integer customerId; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦åéé®ä»¶ï¼0=å¦ï¼1=æ¯", example = "1") |
| | | @ApiModelProperty(value = "æ¯å¦åéé®ä»¶ï¼0=å¦ï¼1=åéæåï¼2=åé失败", example = "1") |
| | | @TableField(exist = false) |
| | | private Integer isSendEmail; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦åéçä¿¡ï¼0=å¦ï¼1=æ¯", example = "1") |
| | | @ApiModelProperty(value = "æ¯å¦åéçä¿¡ï¼0=å¦ï¼1=åéæåï¼2=åé失败", example = "1") |
| | | @TableField(exist = false) |
| | | private Integer isSendSms; |
| | | |
| | |
| | | @ExcelColumn(name="ååç¼å·",index = 2,width = 10) |
| | | @TableField(exist = false) |
| | | private String contractCode; |
| | | |
| | | @ApiModelProperty(value = "ååç¶æ", example = "1") |
| | | @TableField(exist = false) |
| | | private Integer contractStatus; |
| | |
| | | |
| | | @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 = "åç§°") |
| | | @ExcelColumn(name="åç§°") |
| | | @ExcelColumn(name="ç©æåç§°",index = 1,width = 10) |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "ç¶æ 0å¯ç¨ 1ç¦ç¨", example = "1") |
| | | @ExcelColumn(name="ç¶æ 0å¯ç¨ 1ç¦ç¨") |
| | | @ExcelColumn(name="ç¶æ",index = 8,width = 8,valueMapping = "0=å¯ç¨;1=ç¦ç¨;") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "ç¼å·") |
| | | @ExcelColumn(name="ç¼å·") |
| | | @ExcelColumn(name="ç©æç¼å·",index = 0,width = 10) |
| | | private String code; |
| | | |
| | | @ApiModelProperty(value = "æå±ä¸çº§åç±»ç¼ç ï¼å
³ècategory)", example = "1") |
| | | @ExcelColumn(name="æå±ä¸çº§åç±»ç¼ç ï¼å
³ècategory)") |
| | | private Integer parentCateId; |
| | | |
| | | @ApiModelProperty(value = "æå±äºçº§åç±»ç¼ç (å
³ècategoryï¼", example = "1") |
| | | @ExcelColumn(name="æå±äºçº§åç±»ç¼ç (å
³ècategoryï¼") |
| | | private Integer cateId; |
| | | |
| | | @ApiModelProperty(value = "æ¡ç ") |
| | | @ExcelColumn(name="æ¡ç ") |
| | | @ExcelColumn(name="æ¡ç ",index = 2,width = 10) |
| | | private String qrcode; |
| | | |
| | | @ApiModelProperty(value = "æåºç ", example = "1") |
| | | @ExcelColumn(name="æåºç ") |
| | | private Integer sortnum; |
| | | |
| | | @ApiModelProperty(value = "åç") |
| | | @ExcelColumn(name="åç") |
| | | @ExcelColumn(name="åç",index = 3,width = 10) |
| | | private String brand; |
| | | |
| | | @ApiModelProperty(value = "è§æ ¼åå·") |
| | | @ExcelColumn(name="è§æ ¼åå·") |
| | | @ExcelColumn(name="è§æ ¼åå·",index = 4,width = 10) |
| | | private String attr; |
| | | |
| | | @ApiModelProperty(value = "å®å
¨åºåï¼ä¸éï¼", example = "1") |
| | | @ExcelColumn(name="å®å
¨åºåï¼ä¸éï¼") |
| | | @ExcelColumn(name="å®å
¨åºåï¼ä¸éï¼",index = 6,width = 16) |
| | | private BigDecimal minStock; |
| | | |
| | | @ApiModelProperty(value = "å®å
¨åºåï¼ä¸éï¼", example = "1") |
| | | @ExcelColumn(name="å®å
¨åºåï¼ä¸éï¼") |
| | | @ExcelColumn(name="å®å
¨åºåï¼ä¸éï¼",index = 7,width = 16) |
| | | private BigDecimal maxStock; |
| | | |
| | | @ApiModelProperty(value = "åä½") |
| | | @ExcelColumn(name="åä½") |
| | | @ExcelColumn(name="åä½",index = 5,width = 10) |
| | | private String unitName; |
| | | |
| | | @ApiModelProperty(value = "æå±æ¿æºç¼ç (å
³èyw_room)", example = "1") |
| | | @ExcelColumn(name="æå±æ¿æºç¼ç (å
³èyw_room)") |
| | | private Integer roomId; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦èªå¨ç¼ç ï¼0=å¦ï¼1=æ¯ï¼", example = "1") |
| | | @ExcelColumn(name="æ¯å¦èªå¨ç¼ç ï¼0=å¦ï¼1=æ¯ï¼") |
| | | private Integer autoCode; |
| | | |
| | | @ApiModelProperty(value = "éä»¶ä¿¡æ¯", example = "1") |
| | |
| | | @ExcelColumn(name="åæ®ç¼å·") |
| | | private String code; |
| | | |
| | | @ApiModelProperty(value = "é¢ç¨äºº", example = "1") |
| | | private Integer outUserId; |
| | | |
| | | @ApiModelProperty(value = "åºå
¥åºæ°æ®æç»", example = "1") |
| | | @TableField(exist = false) |
| | | private List<YwOutinboundRecord> recordList; |
| | |
| | | @ApiModelProperty(value = "æä½äººåç§°", example = "1") |
| | | @TableField(exist = false) |
| | | private String createUserName; |
| | | |
| | | @ApiModelProperty(value = "é¢ç¨äººåç§°", example = "1") |
| | | @TableField(exist = false) |
| | | private String outUserName; |
| | | } |
| | |
| | | |
| | | @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 HH:mm:ss") |
| | | @ExcelColumn(name="å建æ¶é´",width = 10,index = 11,dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | | 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 = "åºå
¥åºè®°å½ä¸»é®", example = "1") |
| | | @ExcelColumn(name="åºå
¥åºè®°å½ä¸»é®") |
| | | private Integer outInBoundId; |
| | | |
| | | @ApiModelProperty(value = "ç©èµç¼ç ï¼å
³èyw_material)", example = "1") |
| | | @ExcelColumn(name="ç©èµç¼ç ï¼å
³èyw_material)") |
| | | private Integer materialId; |
| | | |
| | | @ApiModelProperty(value = "æ°é", example = "1") |
| | | @ExcelColumn(name="æ°é") |
| | | @ExcelColumn(name="æ°é",width = 10,index = 5) |
| | | private BigDecimal stock; |
| | | |
| | | @ApiModelProperty(value = "èµäº§ç¼ç ") |
| | | @TableField(exist = false) |
| | | @ExcelColumn(name="ç©æç¼ç ",width = 10,index = 1) |
| | | private String materialCode; |
| | | |
| | | @ApiModelProperty(value = "èµäº§åç§°") |
| | | @TableField(exist = false) |
| | | @ExcelColumn(name="ç©æåç§°",width = 10,index = 2) |
| | | private String materialName; |
| | | |
| | | @ApiModelProperty(value = "èµäº§æ¡å½¢ç ") |
| | |
| | | |
| | | @ApiModelProperty(value = "èµäº§åä½") |
| | | @TableField(exist = false) |
| | | @ExcelColumn(name="åä½",width = 10,index = 6) |
| | | private String materialUnitName; |
| | | |
| | | @ApiModelProperty(value = "æä½ç±»åï¼1=åºåºï¼0=å
¥åºï¼å页å表æ¥è¯¢ä½¿ç¨ï¼", example = "1") |
| | |
| | | |
| | | @ApiModelProperty(value = "ä»åºåç§°") |
| | | @TableField(exist = false) |
| | | @ExcelColumn(name="ä»åº",width = 10,index = 8) |
| | | private String warehouseName; |
| | | |
| | | @ApiModelProperty(value = "åæ®æ¥æ") |
| | | @TableField(exist = false) |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @ExcelColumn(name="åæ®æ¥æ",width = 10,index = 0,dateFormat = "yyyy-MM-dd") |
| | | private Date doneDate; |
| | | |
| | | @ApiModelProperty(value = "ä¸çº§åç±»åç§°") |
| | | @TableField(exist = false) |
| | | @ExcelColumn(name="ç©æåç±»",width = 10,index = 3) |
| | | private String categoryParentName; |
| | | |
| | | @ApiModelProperty(value = "äºçº§åç±»åç§°") |
| | | @TableField(exist = false) |
| | | @ExcelColumn(name="ç©æååç±»",width = 10,index = 4) |
| | | private String categoryName; |
| | | |
| | | @ApiModelProperty(value = "æä½äººåç§°", example = "1") |
| | | @TableField(exist = false) |
| | | @ExcelColumn(name="å建人",width = 10,index = 10) |
| | | private String createUserName; |
| | | |
| | | @ApiModelProperty(value = "åæ®ç¼å·", example = "1") |
| | | @TableField(exist = false) |
| | | @ExcelColumn(name="åæ®ç¼å·",width = 10,index = 9) |
| | | private String code; |
| | | |
| | | @ApiModelProperty(value = "ç±»å 0éè´å
¥åº 1é¢ç¨éå 2è°æ´å
¥åº 3å
¶ä»å
¥åº 4ççå
¥åº 5é¢ç¨åºåº 6ä»åºåºåº 7è°æ´åºåº 8éè´åºåº 9å
¶ä»åºåº 10çäºåºåº", example = "1") |
| | | @TableField(exist = false) |
| | | @ExcelColumn(name="ç±»å",width = 10,index = 7,valueMapping = "0=éè´å
¥åº;1=é¢ç¨éå;2=è°æ´å
¥åº;3=å
¶ä»å
¥åº;4=ççå
¥åº;5=é¢ç¨åºåº;6=ä»åºåºåº;7=è°æ´åºåº;8=éè´åºåº;9=å
¶ä»åºåº;10=çäºåºåº;") |
| | | private Integer type; |
| | | |
| | | |
| | |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "ç¶æ 0å¾
å¼å§ 1è¿è¡ä¸ 2å·²è¶
æ 3已宿 4已忶", example = "1") |
| | | @ExcelColumn(name="æ§è¡ç»æ",index = 7,width = 6,valueMapping = "0=å¾
å¼å§;1=è¿è¡ä¸;2=å·²è¶
æ;3=已宿;") |
| | | @ExcelColumn(name="æ§è¡ç»æ",index = 7,width = 6,valueMapping = "0=å¾
å¼å§;1=è¿è¡ä¸;2=å·²è¶
æ;3=已宿;4=已忶;") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "æåºç ", example = "1") |
| | |
| | | @TableField(exist = false) |
| | | private String userName; |
| | | |
| | | @ApiModelProperty(value = "å¯å¤ç人ï¼å¤ä¸ªä»¥,åå²ï¼") |
| | | @TableField(exist = false) |
| | | private String userIds; |
| | | |
| | | @ApiModelProperty(value = "ä»»å¡ç¶æï¼å¤ä¸ªä»¥,åå² 0å¾
å¼å§ 1è¿è¡ä¸ 2å·²è¶
æ 3已宿 4已忶") |
| | | @TableField(exist = false) |
| | |
| | | @ExcelColumn(name="æå±æ¥¼å®ç¼ç ï¼å
³èyw_building)") |
| | | private Integer buildingId; |
| | | |
| | | @ApiModelProperty(value = "å½åç§èµç¶æï¼0=æªç§èµï¼1=å·²ç§èµ") |
| | | private Integer leaseNowStatus; |
| | | |
| | | @ApiModelProperty(value = "éç§å°ææ¥æï¼éç§ä½¿ç¨") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date leaseRentDate; |
| | | |
| | | @ApiModelProperty(value = "ç§èµç¶æï¼0=å¾
ç§èµï¼1=å·²ç§èµ ;2=æªå¼å¯ç§èµ", example = "1") |
| | | @TableField(exist = false) |
| | | private Integer leaseStatus; |
| | |
| | | @ExcelColumn(name="æ°é",index = 6,width = 10) |
| | | private BigDecimal stock; |
| | | |
| | | |
| | | @ApiModelProperty(value = "ç©æç¼ç ") |
| | | @ExcelColumn(name="ç©æç¼ç ",index = 0,width = 10) |
| | | @TableField(exist = false) |
| | |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @ExcelColumn(name="å建æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createDate; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°äººç¼ç ", example = "1") |
| | |
| | | |
| | | @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="夿³¨") |
| | | @ExcelColumn(name="夿³¨",index = 9,width = 30) |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "ç¶æ 0æªå¼å§ 1å·²çç¹", example = "1") |
| | | @ExcelColumn(name="ç¶æ 0æªå¼å§ 1å·²çç¹") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "çç¹åç¼ç (å
³èsystem_user)") |
| | | @ExcelColumn(name="çç¹åç¼ç (å
³èsystem_user)") |
| | | private String userId; |
| | | |
| | | @ApiModelProperty(value = "çç¹æ¶é´") |
| | | @ExcelColumn(name="çç¹æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date planDate; |
| | | |
| | | @ApiModelProperty(value = "ç¼å·") |
| | | @ExcelColumn(name="ç¼å·") |
| | | private String code; |
| | | |
| | | @ApiModelProperty(value = "ç©èµç¼ç ï¼å
³èyw_material)", example = "1") |
| | | @ExcelColumn(name="ç©èµç¼ç ï¼å
³èyw_material)") |
| | | private Integer materialId; |
| | | |
| | | @ApiModelProperty(value = "è´¦é¢æ°é", example = "1") |
| | | @ExcelColumn(name="è´¦é¢æ°é") |
| | | @ExcelColumn(name="è´¦é¢æ°é",index = 7,width = 10) |
| | | private BigDecimal stock; |
| | | |
| | | @ApiModelProperty(value = "å®é
çç¹åºåé", example = "1") |
| | | @ExcelColumn(name="å®é
çç¹åºåé") |
| | | @ExcelColumn(name="çç¹æ°é",index = 8,width = 10) |
| | | private BigDecimal actStock; |
| | | |
| | | @ApiModelProperty(value = "çç¹ 0è´¦å®ç¸ç¬¦ 1çäº 2çç", example = "1") |
| | | @ExcelColumn(name="çç¹ 0è´¦å®ç¸ç¬¦ 1çäº 2çç") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "çç¹è®¡åç¼ç (å
³èyw_stocktaking)", example = "1") |
| | | @ExcelColumn(name="çç¹è®¡åç¼ç (å
³èyw_stocktaking)") |
| | | private Integer stocktakingId; |
| | | |
| | | @ApiModelProperty(value = "èµäº§ç¼ç ") |
| | | @TableField(exist = false) |
| | | @ExcelColumn(name="ç©æç¼ç ",index = 0,width = 10) |
| | | private String materialCode; |
| | | |
| | | @ApiModelProperty(value = "èµäº§åç§°") |
| | | @TableField(exist = false) |
| | | @ExcelColumn(name="ç©æåç§°",index = 1,width = 10) |
| | | private String materialName; |
| | | |
| | | @ApiModelProperty(value = "èµäº§æ¡å½¢ç ") |
| | | @TableField(exist = false) |
| | | @ExcelColumn(name="æ¡ç ",index = 2,width = 10) |
| | | private String materialQrcode; |
| | | |
| | | @ApiModelProperty(value = "èµäº§åç") |
| | | @TableField(exist = false) |
| | | @ExcelColumn(name="åç",index = 3,width = 10) |
| | | private String materialBrand; |
| | | |
| | | @ApiModelProperty(value = "èµäº§è§æ ¼åå·") |
| | | @TableField(exist = false) |
| | | @ExcelColumn(name="è§æ ¼åå·",index = 4,width = 10) |
| | | private String materialAttr; |
| | | |
| | | @ApiModelProperty(value = "èµäº§åä½") |
| | | @TableField(exist = false) |
| | | @ExcelColumn(name="åä½",index = 5,width = 10) |
| | | private String materialUnitName; |
| | | |
| | | @ApiModelProperty(value = "ä»åºåç§°") |
| | | @ExcelColumn(name="ä»åº",index = 6,width = 10) |
| | | @TableField(exist = false) |
| | | private String warehouseName; |
| | | |
| | |
| | | private String code; |
| | | |
| | | @ApiModelProperty(value = "å¤çç¶æ 0å¾
å¤ç 1已忴¾ 2å·²å¤ç", example = "1") |
| | | @ExcelColumn(name="å·¥åç¶æ",index = 7,width = 10,valueMapping = "0=å¾
å¤ç;1=已忴¾;2=å·²å¤ç;") |
| | | @ExcelColumn(name="å·¥åç¶æ",index = 7,width = 10,valueMapping = "0=å¾
ææ´¾;1=å·²ææ´¾;2=å·²å¤ç;") |
| | | private Integer dealStatus; |
| | | |
| | | @ApiModelProperty(value = "åæ´¾äººç¼ç (å
³èsystem_user)", example = "1") |
| | |
| | | @ExcelColumn(name="åºåºæ°é",index = 4,width = 16) |
| | | private String outMaterialNum; |
| | | |
| | | @ApiModelProperty(value = "æä½äººåç§°", example = "1") |
| | | @ApiModelProperty(value = "é¢ç¨äºº", example = "1") |
| | | @ExcelColumn(name="é¢ç¨äºº",index = 5,width = 16) |
| | | private String createUserName; |
| | | private String outUserName; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @ExcelColumn(name="æä½æ¶é´",index = 6,width = 16,dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createDate; |
| | | |
| | | @ApiModelProperty(value = "é¢ç¨äºº", example = "1") |
| | | @ExcelColumn(name="æä½äººåç§°",index = 7,width = 16) |
| | | private String createUserName; |
| | | |
| | | } |
| | |
| | | |
| | | void dealTimeOut(); |
| | | |
| | | /** |
| | | * å°æåå æªåèµ·éç§çè¿è¡æ°æ®è°æ´ æååä¸çæ¿æºéæ¾ å®æ¶æ¶é´éè¦å¨æ¯å¤©æä¸12ç¹å |
| | | */ |
| | | void updRoomLeaseNowStatus(); |
| | | |
| | | |
| | | /** |
| | | * éç§ä¸/å·²éç§åå æå°äºéç§æ¥ææ¶é´çæ°æ® è¿è¡æ¿æºéæ¾ å®æ¶æ¶é´éè¦å¨æ¯å¤©æä¸12ç¹å |
| | | */ |
| | | void updRentContractStatus(); |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | package com.doumee.service.business; |
| | | |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.YwMaterial; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | long count(YwMaterial ywMaterial); |
| | | |
| | | YwMaterial getDetail(Integer id); |
| | | |
| | | Integer importMaterialBatch(MultipartFile file, LoginUserInfo loginUserInfo); |
| | | } |
| | |
| | | throw new BusinessException(ResponseStatus.DATA_EXISTS.getCode(), "身份è¯å·ã"+member.getIdcardNo()+"ã已被使ç¨ï¼ä¸è½éå¤"); |
| | | } |
| | | } |
| | | if(memberMapper.selectCount(new QueryWrapper<Member>().lambda() |
| | | .ne(Objects.nonNull(member.getId()),Member::getId,member.getId()) |
| | | .eq(Member::getPhone, member.getPhone()) |
| | | .eq(Member::getIsdeleted,Constants.ZERO) ) >0){ |
| | | throw new BusinessException(ResponseStatus.DATA_EXISTS.getCode(), "ææºå·ã"+member.getPhone()+"ã已被使ç¨ï¼ä¸è½éå¤"); |
| | | } |
| | | // if(memberMapper.selectCount(new QueryWrapper<Member>().lambda() |
| | | // .ne(Objects.nonNull(member.getId()),Member::getId,member.getId()) |
| | | // .eq(Member::getPhone, member.getPhone()) |
| | | // .eq(Member::getIsdeleted,Constants.ZERO) ) >0){ |
| | | // throw new BusinessException(ResponseStatus.DATA_EXISTS.getCode(), "ææºå·ã"+member.getPhone()+"ã已被使ç¨ï¼ä¸è½éå¤"); |
| | | // } |
| | | } |
| | | |
| | | |
| | |
| | | SmsEmail smsEmail = new SmsEmail(); |
| | | smsEmail.setIsdeleted(Constants.ZERO); |
| | | smsEmail.setCreateDate(new Date()); |
| | | smsEmail.setStatus(result?Constants.ZERO:Constants.ONE); |
| | | smsEmail.setStatus(result?Constants.ONE:Constants.TWO); |
| | | smsEmail.setType(Constants.ZERO); |
| | | smsEmail.setRemark(result?"çä¿¡åéæå":"çä¿¡åé失败"); |
| | | smsEmail.setTitle("è´¦åå¬è´¹"); |
| | |
| | | if(result){ |
| | | result= emailService.sendEmail(email,"è´¦åå¬è´¹",content,null); |
| | | } |
| | | content = systemDictDataBiz.queryByCode(Constants.SMS,Constants.SMS_COMNAME).getCode() + content; |
| | | SmsEmail smsEmail = new SmsEmail(); |
| | | smsEmail.setRemark(result?"é®ä»¶åéæå":"é®ä»¶åé失败"); |
| | | smsEmail.setIsdeleted(Constants.ZERO); |
| | | smsEmail.setTitle("è´¦åå¬è´¹"); |
| | | smsEmail.setCreateDate(new Date()); |
| | | smsEmail.setStatus(result?Constants.ZERO:Constants.ONE); |
| | | smsEmail.setType(Constants.TWO); |
| | | smsEmail.setStatus(result?Constants.ONE:Constants.TWO); |
| | | smsEmail.setType(Constants.ONE); |
| | | smsEmail.setObjId(billId); |
| | | smsEmail.setObjType(Constants.TWO+""); |
| | | smsEmail.setContent(content); |
| | |
| | | ywContractBill.getReceivableFee().subtract(ywContractBill.getActReceivableFee()) |
| | | ); |
| | | |
| | | if(Constants.equalsInteger(ywContractBill.getStatus(),Constants.ZERO) |
| | | && (Constants.equalsInteger(ywContractBill.getPayStatus(),Constants.ZERO) |
| | | || Constants.equalsInteger(ywContractBill.getPayStatus(),Constants.TWO) |
| | | || Constants.equalsInteger(ywContractBill.getPayStatus(),Constants.THREE) |
| | | || Constants.equalsInteger(ywContractBill.getPayStatus(),Constants.FOUR)) |
| | | && Utils.Date.getEnd(ywContractBill.getPlanPayDate()).getTime() < System.currentTimeMillis()){ |
| | | ywContractBill.setIsOverdue(Constants.ONE); |
| | | }else{ |
| | | ywContractBill.setIsOverdue(Constants.ZERO); |
| | | } |
| | | |
| | | //æ¿æºæ°æ® |
| | | ywContractBill.setYwContractRoomList( |
| | | ywContractRoomMapper.selectJoinList(YwContractRoom.class,new MPJLambdaWrapper<YwContractRoom>() |
| | |
| | | .selectAs(YwProject::getName,YwRoom::getProjectName) |
| | | .selectAs(YwFloor::getName,YwRoom::getFloorName) |
| | | .selectAs(YwBuilding::getName,YwRoom::getBuildingName) |
| | | .selectAs(YwRoom::getCode,YwContractRoom::getRoomName) |
| | | .selectAs(YwRoom::getArea,YwContractRoom::getArea) |
| | | .selectAs(YwRoom::getRoomNum,YwContractRoom::getRoomName) |
| | | .selectAs(YwRoom::getRentArea,YwContractRoom::getArea) |
| | | .leftJoin(YwRoom.class,YwRoom::getId,YwContractRoom::getRoomId) |
| | | .leftJoin(YwFloor.class,YwFloor::getId,YwRoom::getFloor) |
| | | .leftJoin(YwProject.class,YwProject::getId,YwRoom::getProjectId) |
| | |
| | | || Constants.equalsInteger(ywContractBill.getPayStatus(),Constants.TWO) |
| | | || Constants.equalsInteger(ywContractBill.getPayStatus(),Constants.THREE) |
| | | || Constants.equalsInteger(ywContractBill.getPayStatus(),Constants.FOUR)) |
| | | && ywContractBill.getPlanPayDate().getTime() < System.currentTimeMillis()){ |
| | | && Utils.Date.getEnd(ywContractBill.getPlanPayDate()).getTime() < System.currentTimeMillis()){ |
| | | ywContractBill.setIsOverdue(Constants.ONE); |
| | | }else{ |
| | | ywContractBill.setIsOverdue(Constants.ZERO); |
| | |
| | | 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 ") |
| | | .select(" ifnull((select s.status from sms_email s where s.OBJ_ID = t.id and s.OBJ_TYPE = 2 order by s.CREATE_DATE desc limit 1 ),0) ",YwContractBill::getIsSendEmail) |
| | | .select(" ifnull((select s.status from sms_email s where s.OBJ_ID = t.id and s.OBJ_TYPE = 1 order by s.CREATE_DATE desc limit 1 ),0) ",YwContractBill::getIsSendSms) |
| | | .selectAs(YwContract::getCode,YwContractBill::getContractCode) |
| | | .selectAs(YwCustomer::getName,YwContractBill::getCustomerName) |
| | | .leftJoin(YwContract.class,YwContract::getId,YwContractBill::getContractId) |
| | |
| | | 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) |
| | | .in(YwContractBill::getPayStatus,Constants.ZERO,Constants.TWO,Constants.THREE) |
| | | .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()) |
| | | .lt(YwContractBill::getPlanPayDate, DateUtil.getDate(new Date(),"yyyy-MM-dd")) |
| | | .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())) |
| | |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(ywContractBillList)){ |
| | | //è·åæææ°æ® |
| | | List<Integer> billIdList = ywContractBillList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.ONE)).map(i->i.getId()).collect(Collectors.toList()); |
| | | List<Integer> contractIdList = ywContractBillList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.ZERO)).map(i->i.getContractId()).collect(Collectors.toList()); |
| | | List<Integer> contractIdList = ywContractBillList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.ZERO)||Constants.equalsInteger(i.getType(),Constants.TWO)).map(i->i.getContractId()).collect(Collectors.toList()); |
| | | List<YwContractRoom> ywContractRoomList = new ArrayList<>(); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(billIdList)){ |
| | | ywContractRoomList.addAll( ywContractRoomMapper.selectJoinList(YwContractRoom.class,new MPJLambdaWrapper<YwContractRoom>() |
| | |
| | | .selectAs(YwProject::getName,YwRoom::getProjectName) |
| | | .selectAs(YwFloor::getName,YwRoom::getFloorName) |
| | | .selectAs(YwBuilding::getName,YwRoom::getBuildingName) |
| | | .selectAs(YwRoom::getCode,YwContractRoom::getRoomName) |
| | | .selectAs(YwRoom::getRoomNum,YwContractRoom::getRoomName) |
| | | .leftJoin(YwRoom.class,YwRoom::getId,YwContractRoom::getRoomId) |
| | | .leftJoin(YwFloor.class,YwFloor::getId,YwRoom::getFloor) |
| | | .leftJoin(YwProject.class,YwProject::getId,YwRoom::getProjectId) |
| | |
| | | .selectAs(YwProject::getName,YwRoom::getProjectName) |
| | | .selectAs(YwFloor::getName,YwRoom::getFloorName) |
| | | .selectAs(YwBuilding::getName,YwRoom::getBuildingName) |
| | | .selectAs(YwRoom::getCode,YwContractRoom::getRoomName) |
| | | .selectAs(YwRoom::getRoomNum,YwContractRoom::getRoomName) |
| | | .leftJoin(YwRoom.class,YwRoom::getId,YwContractRoom::getRoomId) |
| | | .leftJoin(YwFloor.class,YwFloor::getId,YwRoom::getFloor) |
| | | .leftJoin(YwProject.class,YwProject::getId,YwRoom::getProjectId) |
| | |
| | | .selectAs(YwContractDetail::getType,YwContractBill::getDetailType) |
| | | .selectAs(YwContract::getZlPayType,YwContractBill::getZlPayType) |
| | | .selectAs(YwContract::getWyPayType,YwContractBill::getWyPayType) |
| | | .select(" ( select ifnull(sum(y.rent_area),0) from yw_room y left join yw_contract_room yr on y.id = yr.room_id where yr.contract_id = t.contract_id and y.IS_INVESTMENT = 0 and yr.type = 0 ) " , YwContractBill::getTotalArea) |
| | | .select(" ( select ifnull(sum(y.rent_area),0) from yw_room y left join yw_contract_room yr on y.id = yr.room_id where yr.contract_id = t.contract_id and y.IS_INVESTMENT = 1 and yr.type = 0 ) " , YwContractBill::getTotalArea) |
| | | .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 ") |
| | | .leftJoin(YwContract.class,YwContract::getId,YwContractBill::getContractId) |
| | | .leftJoin(YwCustomer.class,YwCustomer::getId,YwContract::getRenterId) |
| | | .leftJoin(YwContractDetail.class,YwContractDetail::getId,YwContractBill::getDetailId) |
| | |
| | | }else if(y.getTitle().equals("${åºæ¶æ¥æ}")&&Objects.nonNull(ywContractBill.getPlanPayDate())){ |
| | | y.setUrl(DateUtil.formatDate(ywContractBill.getPlanPayDate(),"yyyy-MM-dd")); |
| | | }else if(y.getTitle().equals("${åºæ¶éé¢}")&&Objects.nonNull(ywContractBill.getReceivableFee())){ |
| | | y.setUrl(ywContractBill.getReceivableFee().toString()); |
| | | y.setUrl((ywContractBill.getReceivableFee().subtract(ywContractBill.getActReceivableFee())).setScale(2).toString()); |
| | | }else if(y.getTitle().equals("${è´¦å夿³¨}")){ |
| | | if(StringUtils.isNotBlank(ywContractBill.getRemark())){ |
| | | y.setUrl(ywContractBill.getRemark()); |
| | |
| | | .selectAs(YwContractDetail::getType,YwContractBill::getDetailType) |
| | | .selectAs(YwContract::getZlPayType,YwContractBill::getZlPayType) |
| | | .selectAs(YwContract::getWyPayType,YwContractBill::getWyPayType) |
| | | .select(" ( select ifnull(sum(r.rent_area),0) from yw_room y left join yw_contract_room yr on y.id = yr.room_id where yr.contract_id = t.contract_id and y.IS_INVESTMENT = 0 and yr.type = 0 ) " , YwContractBill::getTotalArea) |
| | | .select(" ( select ifnull(sum(y.rent_area),0) from yw_room y left join yw_contract_room yr on y.id = yr.room_id where yr.contract_id = t.contract_id and y.IS_INVESTMENT = 1 and yr.type = 0 ) " , YwContractBill::getTotalArea) |
| | | .leftJoin(YwContract.class,YwContract::getId,YwContractBill::getContractId) |
| | | .leftJoin(YwCustomer.class,YwCustomer::getId,YwContract::getRenterId) |
| | | .leftJoin(YwContractDetail.class,YwContractDetail::getId,YwContractBill::getDetailId) |
| | | .eq(YwContractBill::getId,ywSmsEmailBillCallDTO.getBillId()) |
| | | .last( "limit 1" ) |
| | | ); |
| | | this.dealTempData(tempList,ywContractBill,loginUserInfo); |
| | | |
| | | List<YwContractBill> ywContractBillList = new ArrayList<>(); |
| | | ywContractBillList.add(ywContractBill); |
| | | this.dealRoomDetail(ywContractBillList); |
| | | |
| | | // this.dealTempData(tempList,ywContractBill,loginUserInfo); |
| | | Member member = memberMapper.selectById(ywSmsEmailBillCallDTO.getUserId()); |
| | | if(Objects.isNull(member)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"å卿ªæ¥è¯¢å°ç人åä¿¡æ¯"); |
| | |
| | | if(Constants.equalsInteger(ywSmsEmailBillCallDTO.getSendEmail(),Constants.ONE) && StringUtils.isNotBlank(member.getEmail()) |
| | | && emailTempConfigOptional.isPresent()){ |
| | | String content = this.dealTempSmsEmailData(emailTempConfigOptional.get().getTitle(),tempList,ywContractBill,loginUserInfo); |
| | | smsEmailService.sendEmail(content,member.getEmail(),ywContractBill.getId()); |
| | | smsEmailService.sendEmail(member.getEmail(),content,ywContractBill.getId()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | for (YwTempConfig y:ywTempConfigList) { |
| | | if(y.getTitle().equals("${è´¹ç¨åç§°}")&&Objects.nonNull(ywContractBill.getCostType())){ |
| | | //è´¹ç¨ç±»åï¼0=ç§èµè´¹ï¼1=ç©ä¸è´¹ï¼2=ç§èµæ¼éï¼3=ç©ä¸æ¼éï¼4=æ°´çµè´¹ï¼5=æé¡¹è´¹ï¼6=å
¶ä»; 7=ä¿è¯é |
| | | if(Constants.equalsInteger(ywContractBill.getCostType(),Constants.ZERO)){ |
| | | tempStr.replace("${è´¹ç¨åç§°}","ç§èµè´¹"); |
| | | if(Constants.equalsInteger(ywContractBill.getCostType(),Constants.ZERO)){ |
| | | tempStr = tempStr.replace("${è´¹ç¨åç§°}","ç§èµè´¹"); |
| | | }else if(Constants.equalsInteger(ywContractBill.getCostType(),Constants.ONE)){ |
| | | tempStr.replace("${è´¹ç¨åç§°}","ç©ä¸è´¹"); |
| | | tempStr = tempStr.replace("${è´¹ç¨åç§°}","ç©ä¸è´¹"); |
| | | }else if(Constants.equalsInteger(ywContractBill.getCostType(),Constants.TWO)){ |
| | | tempStr.replace("${è´¹ç¨åç§°}","ç§èµæ¼é"); |
| | | tempStr = tempStr.replace("${è´¹ç¨åç§°}","ç§èµæ¼é"); |
| | | }else if(Constants.equalsInteger(ywContractBill.getCostType(),Constants.THREE)){ |
| | | tempStr.replace("${è´¹ç¨åç§°}","ç©ä¸æ¼é"); |
| | | tempStr = tempStr.replace("${è´¹ç¨åç§°}","ç©ä¸æ¼é"); |
| | | }else if(Constants.equalsInteger(ywContractBill.getCostType(),Constants.FOUR)){ |
| | | tempStr.replace("${è´¹ç¨åç§°}","æ°´çµè´¹"); |
| | | tempStr = tempStr.replace("${è´¹ç¨åç§°}","æ°´çµè´¹"); |
| | | }else if(Constants.equalsInteger(ywContractBill.getCostType(),Constants.FIVE)){ |
| | | tempStr.replace("${è´¹ç¨åç§°}","æé¡¹è´¹"); |
| | | tempStr = tempStr.replace("${è´¹ç¨åç§°}","æé¡¹è´¹"); |
| | | }else if(Constants.equalsInteger(ywContractBill.getCostType(),Constants.SIX)){ |
| | | tempStr.replace("${è´¹ç¨åç§°}","å
¶ä»"); |
| | | tempStr = tempStr.replace("${è´¹ç¨åç§°}","å
¶ä»"); |
| | | }else if(Constants.equalsInteger(ywContractBill.getCostType(),Constants.SEVEN)){ |
| | | tempStr.replace("${è´¹ç¨åç§°}","ä¿è¯é"); |
| | | tempStr = tempStr.replace("${è´¹ç¨åç§°}","ä¿è¯é"); |
| | | } |
| | | }else if(y.getTitle().equals("${è®¡è´¹å¨æ}")&&Objects.nonNull(ywContractBill.getDetailType())){ |
| | | if(Constants.equalsInteger(ywContractBill.getDetailType(),Constants.ZERO)){ |
| | | //ç§èµæ¯ä»æ¹å¼ 0=䏿¬¡æ§ä»æ¬¾ï¼1=æ¯ä¸ä¸ªæä¸ä»ï¼2=å
个æä¸ä»ï¼3=ä¸å¹´ä¸ä» |
| | | if(Objects.nonNull(ywContractBill.getZlPayType())){ |
| | | if(Constants.equalsInteger(ywContractBill.getZlPayType(),Constants.ZERO)){ |
| | | tempStr.replace("${è®¡è´¹å¨æ}","䏿¬¡æ§ä»æ¬¾"); |
| | | }else if(Constants.equalsInteger(ywContractBill.getZlPayType(),Constants.ONE)){ |
| | | tempStr.replace("${è®¡è´¹å¨æ}","æ¯ä¸ä¸ªæä¸ä»"); |
| | | }else if(Constants.equalsInteger(ywContractBill.getZlPayType(),Constants.TWO)){ |
| | | tempStr.replace("${è®¡è´¹å¨æ}","å
个æä¸ä»"); |
| | | }else if(Constants.equalsInteger(ywContractBill.getZlPayType(),Constants.THREE)){ |
| | | tempStr.replace("${è®¡è´¹å¨æ}","ä¸å¹´ä¸ä»"); |
| | | }else if(y.getTitle().equals("${è®¡è´¹å¨æ}")){ |
| | | if(Objects.nonNull(ywContractBill.getDetailType())){ |
| | | if(Constants.equalsInteger(ywContractBill.getDetailType(),Constants.ZERO)){ |
| | | //ç§èµæ¯ä»æ¹å¼ 0=䏿¬¡æ§ä»æ¬¾ï¼1=æ¯ä¸ä¸ªæä¸ä»ï¼2=å
个æä¸ä»ï¼3=ä¸å¹´ä¸ä» |
| | | if(Objects.nonNull(ywContractBill.getZlPayType())){ |
| | | if(Constants.equalsInteger(ywContractBill.getZlPayType(),Constants.ZERO)){ |
| | | tempStr = tempStr.replace("${è®¡è´¹å¨æ}","䏿¬¡æ§ä»æ¬¾"); |
| | | }else if(Constants.equalsInteger(ywContractBill.getZlPayType(),Constants.ONE)){ |
| | | tempStr = tempStr.replace("${è®¡è´¹å¨æ}","æ¯ä¸ä¸ªæä¸ä»"); |
| | | }else if(Constants.equalsInteger(ywContractBill.getZlPayType(),Constants.TWO)){ |
| | | tempStr = tempStr.replace("${è®¡è´¹å¨æ}","å
个æä¸ä»"); |
| | | }else if(Constants.equalsInteger(ywContractBill.getZlPayType(),Constants.THREE)){ |
| | | tempStr = tempStr.replace("${è®¡è´¹å¨æ}","ä¸å¹´ä¸ä»"); |
| | | } |
| | | } |
| | | }else{ |
| | | //ç©ä¸æ¯ä»æ¹å¼ 0=䏿¬¡æ§ä»æ¬¾ï¼1=æ¯ä¸ä¸ªæä¸ä»ï¼2=å
个æä¸ä»ï¼3=ä¸å¹´ä¸ä» |
| | | if(Objects.nonNull(ywContractBill.getWyPayType())){ |
| | | if(Constants.equalsInteger(ywContractBill.getWyPayType(),Constants.ZERO)){ |
| | | tempStr = tempStr.replace("${è®¡è´¹å¨æ}","䏿¬¡æ§ä»æ¬¾"); |
| | | }else if(Constants.equalsInteger(ywContractBill.getWyPayType(),Constants.ONE)){ |
| | | tempStr = tempStr.replace("${è®¡è´¹å¨æ}","æ¯ä¸ä¸ªæä¸ä»"); |
| | | }else if(Constants.equalsInteger(ywContractBill.getWyPayType(),Constants.TWO)){ |
| | | tempStr = tempStr.replace("${è®¡è´¹å¨æ}","å
个æä¸ä»"); |
| | | }else if(Constants.equalsInteger(ywContractBill.getWyPayType(),Constants.THREE)){ |
| | | tempStr.replace("${è®¡è´¹å¨æ}","ä¸å¹´ä¸ä»"); |
| | | } |
| | | } |
| | | } |
| | | }else{ |
| | | //ç©ä¸æ¯ä»æ¹å¼ 0=䏿¬¡æ§ä»æ¬¾ï¼1=æ¯ä¸ä¸ªæä¸ä»ï¼2=å
个æä¸ä»ï¼3=ä¸å¹´ä¸ä» |
| | | if(Objects.nonNull(ywContractBill.getWyPayType())){ |
| | | if(Constants.equalsInteger(ywContractBill.getWyPayType(),Constants.ZERO)){ |
| | | tempStr.replace("${è®¡è´¹å¨æ}","䏿¬¡æ§ä»æ¬¾"); |
| | | }else if(Constants.equalsInteger(ywContractBill.getWyPayType(),Constants.ONE)){ |
| | | tempStr.replace("${è®¡è´¹å¨æ}","æ¯ä¸ä¸ªæä¸ä»"); |
| | | }else if(Constants.equalsInteger(ywContractBill.getWyPayType(),Constants.TWO)){ |
| | | tempStr.replace("${è®¡è´¹å¨æ}","å
个æä¸ä»"); |
| | | }else if(Constants.equalsInteger(ywContractBill.getWyPayType(),Constants.THREE)){ |
| | | tempStr.replace("${è®¡è´¹å¨æ}","ä¸å¹´ä¸ä»"); |
| | | } |
| | | } |
| | | tempStr = tempStr.replace("${è®¡è´¹å¨æ}",""); |
| | | } |
| | | |
| | | }else if(y.getTitle().equals("${åä»·}")&&Objects.nonNull(ywContractBill.getPrice())){ |
| | | tempStr.replace("${åä»·}",ywContractBill.getPrice().toString()); |
| | | tempStr = tempStr.replace("${åä»·}",ywContractBill.getPrice().setScale(2).toString()); |
| | | }else if(y.getTitle().equals("${åä½}")&&Objects.nonNull(ywContractBill.getCircleType())){ |
| | | //仿¬¾å¨æç±»å 0=å
æ¯å¹³ç±³å¤©;1=å
æ¯å¹³ç±³æ;2=å
æ¯å¹³ç±³å¹´;3=å
æ¯å¤©;4=å
æ¯æ;5=å
æ¯å¹´;6=å
æ¯åº; |
| | | if(Constants.equalsInteger(ywContractBill.getCircleType(),Constants.ZERO)){ |
| | | tempStr.replace("${åä½}","å
æ¯å¹³ç±³å¤©"); |
| | | tempStr = tempStr.replace("${åä½}","å
æ¯å¹³ç±³å¤©"); |
| | | }else if(Constants.equalsInteger(ywContractBill.getCircleType(),Constants.ONE)){ |
| | | tempStr.replace("${åä½}","å
æ¯å¹³ç±³æ"); |
| | | tempStr = tempStr.replace("${åä½}","å
æ¯å¹³ç±³æ"); |
| | | }else if(Constants.equalsInteger(ywContractBill.getCircleType(),Constants.TWO)){ |
| | | tempStr.replace("${åä½}","å
æ¯å¹³ç±³å¹´"); |
| | | tempStr = tempStr.replace("${åä½}","å
æ¯å¹³ç±³å¹´"); |
| | | } else if(Constants.equalsInteger(ywContractBill.getCircleType(),Constants.THREE)){ |
| | | tempStr.replace("${åä½}","å
æ¯å¤©"); |
| | | tempStr = tempStr.replace("${åä½}","å
æ¯å¤©"); |
| | | } else if(Constants.equalsInteger(ywContractBill.getCircleType(),Constants.FOUR)){ |
| | | tempStr.replace("${åä½}","å
æ¯æ"); |
| | | tempStr = tempStr.replace("${åä½}","å
æ¯æ"); |
| | | } else if(Constants.equalsInteger(ywContractBill.getCircleType(),Constants.FIVE)){ |
| | | tempStr.replace("${åä½}","å
æ¯å¹´"); |
| | | tempStr = tempStr.replace("${åä½}","å
æ¯å¹´"); |
| | | } else if(Constants.equalsInteger(ywContractBill.getCircleType(),Constants.SIX)){ |
| | | tempStr.replace("${åä½}","å
æ¯åº"); |
| | | tempStr = tempStr.replace("${åä½}","å
æ¯åº"); |
| | | } |
| | | }else if(y.getTitle().equals("${åºæ¶æ¥æ}")&&Objects.nonNull(ywContractBill.getPlanPayDate())){ |
| | | tempStr.replace("${åºæ¶æ¥æ}",DateUtil.formatDate(ywContractBill.getPlanPayDate(),"yyyy-MM-dd")); |
| | | tempStr = tempStr.replace("${åºæ¶æ¥æ}",DateUtil.formatDate(ywContractBill.getPlanPayDate(),"yyyy-MM-dd")); |
| | | }else if(y.getTitle().equals("${åºæ¶éé¢}")&&Objects.nonNull(ywContractBill.getReceivableFee())){ |
| | | tempStr.replace("${åºæ¶éé¢}",ywContractBill.getReceivableFee().toString()); |
| | | tempStr = tempStr.replace("${åºæ¶éé¢}",(ywContractBill.getReceivableFee().subtract(ywContractBill.getActReceivableFee())).setScale(2).toString()); |
| | | }else if(y.getTitle().equals("${è´¦å夿³¨}")){ |
| | | if(StringUtils.isNotBlank(ywContractBill.getRemark())){ |
| | | tempStr.replace("${è´¦å夿³¨}",ywContractBill.getRemark()); |
| | | tempStr = tempStr.replace("${è´¦å夿³¨}",ywContractBill.getRemark()); |
| | | }else{ |
| | | tempStr.replace("${è´¦å夿³¨}",""); |
| | | tempStr = tempStr.replace("${è´¦å夿³¨}",""); |
| | | } |
| | | }else if(y.getTitle().equals("${ç§å®¢åç§°}")&&StringUtils.isNotBlank(ywContractBill.getCustomerName())){ |
| | | tempStr.replace("${ç§å®¢åç§°}",ywContractBill.getCustomerName()); |
| | | tempStr = tempStr.replace("${ç§å®¢åç§°}",ywContractBill.getCustomerName()); |
| | | }else if(y.getTitle().equals("${æ¿é´ä¿¡æ¯}")){ |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(ywContractBill.getYwContractRoomList())){ |
| | | StringBuilder roomPathName = new StringBuilder(); |
| | |
| | | roomPathName.append(";"); |
| | | } |
| | | } |
| | | tempStr.replace("${æ¿é´ä¿¡æ¯}",roomPathName.toString()); |
| | | tempStr = tempStr.replace("${æ¿é´ä¿¡æ¯}",roomPathName.toString()); |
| | | } |
| | | }else if(y.getTitle().equals("${ç§èµé¢ç§¯}")&&Objects.nonNull(ywContractBill.getTotalArea())){ |
| | | tempStr.replace("${ç§èµé¢ç§¯}",ywContractBill.getTotalArea().toString()); |
| | | }else if(y.getTitle().equals("${æå±å
¬å¸è´¦æ·åç§°}")){ |
| | | if(Objects.nonNull(ywAccount)&&StringUtils.isNotBlank(ywAccount.getName())){ |
| | | tempStr.replace("${æå±å
¬å¸è´¦æ·åç§°}",ywAccount.getName()); |
| | | tempStr = tempStr.replace("${æå±å
¬å¸è´¦æ·åç§°}",ywAccount.getName()); |
| | | }else{ |
| | | tempStr.replace("${æå±å
¬å¸è´¦æ·åç§°}","-"); |
| | | tempStr = tempStr.replace("${æå±å
¬å¸è´¦æ·åç§°}","-"); |
| | | } |
| | | }else if(y.getTitle().equals("${æå±å
¬å¸é¶è¡è´¦å·}")){ |
| | | if(Objects.nonNull(ywAccount)&&StringUtils.isNotBlank(ywAccount.getName())){ |
| | | tempStr.replace("${æå±å
¬å¸é¶è¡è´¦å·}",ywAccount.getName()); |
| | | tempStr = tempStr.replace("${æå±å
¬å¸é¶è¡è´¦å·}",ywAccount.getName()); |
| | | }else{ |
| | | tempStr.replace("${æå±å
¬å¸é¶è¡è´¦å·}","-"); |
| | | tempStr = tempStr.replace("${æå±å
¬å¸é¶è¡è´¦å·}","-"); |
| | | } |
| | | }else if(y.getTitle().equals("${æå±å
¬å¸å¼æ·é¶è¡}")){ |
| | | if(Objects.nonNull(ywAccount)&&StringUtils.isNotBlank(ywAccount.getBankNo())){ |
| | | tempStr.replace("${æå±å
¬å¸å¼æ·é¶è¡}",ywAccount.getBankNo()); |
| | | tempStr = tempStr.replace("${æå±å
¬å¸å¼æ·é¶è¡}",ywAccount.getBankNo()); |
| | | }else{ |
| | | tempStr.replace("${æå±å
¬å¸å¼æ·é¶è¡}","-"); |
| | | tempStr = tempStr.replace("${æå±å
¬å¸å¼æ·é¶è¡}","-"); |
| | | } |
| | | }else if(y.getTitle().equals("${éç¥åçææ¥æ}")){ |
| | | tempStr.replace("${éç¥åçææ¥æ}",DateUtil.formatDate(new Date(),"yyyy-MM-dd")); |
| | | tempStr = tempStr.replace("${éç¥åçææ¥æ}",DateUtil.formatDate(new Date(),"yyyy-MM-dd")); |
| | | }else if(y.getTitle().equals("${å¶è¡¨äººåç§°}")){ |
| | | tempStr.replace("${å¶è¡¨äººåç§°}",loginUserInfo.getRealname()); |
| | | tempStr = tempStr.replace("${å¶è¡¨äººåç§°}",loginUserInfo.getRealname()); |
| | | } |
| | | } |
| | | return tempStr; |
| | |
| | | model.setEditor(model.getCreator()); |
| | | if(model.getStartDate().getTime() > System.currentTimeMillis()){ |
| | | model.setStatus(Constants.ZERO); |
| | | }else if(model.getStartDate().getTime() <= System.currentTimeMillis() && model.getEndDate().getTime() > System.currentTimeMillis()){ |
| | | }else if(model.getStartDate().getTime() <= System.currentTimeMillis() && Utils.Date.getEnd(model.getEndDate()).getTime() > System.currentTimeMillis()){ |
| | | model.setStatus(Constants.ONE); |
| | | }else{ |
| | | model.setStatus(Constants.TWO); |
| | |
| | | t.setEditor(model.getCreator()); |
| | | t.setType(Constants.ZERO); |
| | | list.add(t); |
| | | } |
| | | if(Constants.equalsInteger(model.getStatus(),Constants.ONE)){ |
| | | //æ´æ°æ¿æºæ°æ®ä¸ºç§èµä¸ |
| | | roomMapper.update(new UpdateWrapper<YwRoom>().lambda().set(YwRoom::getLeaseNowStatus,Constants.ONE) |
| | | .in(YwRoom::getId,model.getRoomList().stream().map(i->i.getId()).collect(Collectors.toList())) |
| | | ); |
| | | } |
| | | ywContractRoomMapper.insert(list); |
| | | } |
| | |
| | | @Transactional(rollbackFor = {BusinessException.class,Exception.class}) |
| | | public Integer backRent(YwContract param){ |
| | | isParamValidBackRent(param); |
| | | YwContract model = ywContractMapper.selectById(param.getId()); |
| | | if(Objects.isNull(model)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(!(model.getStartDate().getTime()<=param.getBtDate().getTime()&&model.getEndDate().getTime()>=param.getBtDate().getTime())){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"éç§æ¥æé误ï¼è¯·æ£æ¥éç§æ¥æéå¨å忥æå
ï¼"); |
| | | } |
| | | param.setEditDate(new Date()); |
| | | param.setEditor(param.getLoginUserInfo().getId()); |
| | | //å¤ç |
| | |
| | | update.setBtRemark(getbackRentRemarkByParam(param)); |
| | | ywContractMapper.updateById(update); |
| | | dealLogBiz(param,Constants.YwLogType.CONTRACT_BACK, param.getLoginUserInfo().getRealname(),getbackRentLogByParam(param)); |
| | | //妿éç§æ¥æå°äºå½åæ¥æ åç´æ¥éæ¾æ¿æºä¿¡æ¯ æªç§èµ |
| | | if(Utils.Date.getEnd(param.getBtDate()).getTime()<System.currentTimeMillis()){ |
| | | List<YwContractRoom> contractRoomList = ywContractRoomMapper.selectList(new QueryWrapper<YwContractRoom>().lambda() |
| | | .eq(YwContractRoom::getContractId, param.getId())); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(contractRoomList)){ |
| | | //æ´æ°æ¿æºæ°æ®ä¸ºæªç§èµ |
| | | roomMapper.update(new UpdateWrapper<YwRoom>().lambda().set(YwRoom::getLeaseNowStatus,Constants.ZERO) |
| | | .in(YwRoom::getId,contractRoomList.stream().map(i->i.getRoomId()).collect(Collectors.toList())) |
| | | ); |
| | | } |
| | | } |
| | | return param.getId(); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void dealTimeOut(){ |
| | | //宿¶å¤çååæ§è¡ä¸ |
| | | ywContractMapper.update(new UpdateWrapper<YwContract>() |
| | | .lambda() |
| | | .set(YwContract::getStatus,Constants.ONE) |
| | | .set(YwContract::getEditDate,DateUtil.getCurrDateTime()) |
| | | |
| | | List<YwContract> listA = ywContractMapper.selectList(new QueryWrapper<YwContract>().lambda() |
| | | .eq(YwContract::getIsdeleted,Constants.ZERO) |
| | | .in(YwContract::getStatus,Constants.ZERO) |
| | | .apply(" START_DATE < NOW() AND END_DATE > NOW() ") |
| | | ); |
| | | //宿¶å¤çååå·²è¿æ |
| | | ywContractMapper.update(new UpdateWrapper<YwContract>() |
| | | .lambda() |
| | | .set(YwContract::getStatus,Constants.TWO) |
| | | .set(YwContract::getEditDate,DateUtil.getCurrDateTime()) |
| | | .eq(YwContract::getIsdeleted,Constants.ZERO) |
| | | .in(YwContract::getStatus,Constants.ONE,Constants.ZERO) |
| | | .apply(" END_DATE < CURRENT_DATE ") |
| | | ); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(listA)){ |
| | | //宿¶å¤çååæ§è¡ä¸ |
| | | ywContractMapper.update(new UpdateWrapper<YwContract>() |
| | | .lambda() |
| | | .set(YwContract::getStatus,Constants.ONE) |
| | | .set(YwContract::getEditDate,DateUtil.getCurrDateTime()) |
| | | .in(YwContract::getId,listA.stream().map(i->i.getId()).collect(Collectors.toList())) |
| | | ); |
| | | |
| | | List<YwContractRoom> contractRoomList = ywContractRoomMapper.selectList(new QueryWrapper<YwContractRoom>().lambda().in(YwContractRoom::getContractId, |
| | | listA.stream().map(i->i.getId()).collect(Collectors.toList()))); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(contractRoomList)){ |
| | | //æ´æ°æ¿æºæ°æ®ä¸ºç§èµä¸ |
| | | roomMapper.update(new UpdateWrapper<YwRoom>().lambda().set(YwRoom::getLeaseNowStatus,Constants.ONE) |
| | | .in(YwRoom::getId,contractRoomList.stream().map(i->i.getRoomId()).collect(Collectors.toList())) |
| | | ); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | ||Constants.equalsInteger(bill.getPayStatus(),Constants.THREE)){ |
| | | if(bill.getStartDate().getTime()<=param.getBtDate().getTime()){ |
| | | canBills.add(bill); |
| | | canBillCount = canBillCount ++; |
| | | canBillCount = canBillCount + 1 ; |
| | | }else{ |
| | | //å¦æè¿æ²¡å¼å§ï¼è´¦åç´æ¥å
³é |
| | | closeBills.add(bill); |
| | |
| | | noBills.add(bill); |
| | | }else{ |
| | | canBills.add(bill); |
| | | canBillCount = canBillCount ++; |
| | | canBillCount = canBillCount + 1 ; |
| | | } |
| | | }else if(Constants.equalsInteger(bill.getPayStatus(),Constants.TWO) ){ |
| | | canBills.add(bill); |
| | | canBillCount = canBillCount ++; |
| | | canBillCount = canBillCount + 1 ; |
| | | } |
| | | } |
| | | } |
| | |
| | | if(fee.compareTo(new BigDecimal(0))== 0){ |
| | | //å¦æè´¹ç¨æ£å¥½ï¼åä¿®æ¹è´¦åä¿¡æ¯ä¸ºå·²ç»æ¸
|
| | | b.setPayStatus(Constants.ONE); |
| | | canBillCount = canBillCount --; |
| | | }else if(fee.compareTo(new BigDecimal(0))> 0){ |
| | | canBillCount = canBillCount - 1 ; |
| | | }else if(fee.compareTo(new BigDecimal(0))< 0){ |
| | | //妿éè¦è¿è¡éæ¬¾ï¼æ´æ°è´¦åä¿¡æ¯ä¸ºå¾
鿬¾ |
| | | b.setPayStatus(Constants.FOUR); |
| | | }else if(fee.compareTo(new BigDecimal(0)) < 0){ |
| | | //å¦æè´¦åè¿ææ¬¾å¾
æ¶ï¼åä¿æç¶æä¸å |
| | | }else if(fee.compareTo(new BigDecimal(0)) > 0){ |
| | | //å¦æè´¦åè¿ææ¬¾å¾
æ¶ï¼åæ´æ°è´¦å为å¾
æ¶æ¬¾ |
| | | if(b.getPayStatus()==Constants.ZERO){ |
| | | b.setPayStatus(Constants.ZERO); |
| | | }else if(b.getPayStatus()!=Constants.TWO){ |
| | | b.setPayStatus(Constants.TWO); |
| | | } |
| | | } |
| | | b.setReceivableFee(editBill.getReceivableFee()); |
| | | } |
| | |
| | | //2025-1-23 13:56:53 å å
¥ å端å
¥åè°æ´åçè´¦åä¿¡æ¯ |
| | | List<YwContractBill> ywContractBillList = new ArrayList<>(); |
| | | //æ¥è¯¢ç§èµæ¡æ¬¾ |
| | | if(Constants.equalsInteger(model.getType(),Constants.ZERO ) |
| | | || Constants.equalsInteger(model.getType(),Constants.TWO)&& com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(details1)){ |
| | | if((Constants.equalsInteger(model.getType(),Constants.ZERO ) |
| | | || Constants.equalsInteger(model.getType(),Constants.TWO))&& com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(details1)){ |
| | | YwContractDetail ywContractDetail = details1.get(Constants.ZERO); |
| | | YwContractBill zlBill = new YwContractBill(); |
| | | BeanUtils.copyProperties(model.getZlBillDTO(),zlBill); |
| | |
| | | } |
| | | } |
| | | //æ¥è¯¢ç©ä¸è´¦å |
| | | if(Constants.equalsInteger(model.getType(),Constants.ZERO ) |
| | | || Constants.equalsInteger(model.getType(),Constants.TWO)&& com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(details2)){ |
| | | if((Constants.equalsInteger(model.getType(),Constants.ZERO ) |
| | | || Constants.equalsInteger(model.getType(),Constants.ONE))&& com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(details2)){ |
| | | YwContractDetail ywContractDetail = details2.get(Constants.ZERO); |
| | | YwContractBill wyBill = new YwContractBill(); |
| | | BeanUtils.copyProperties(model.getWyBillDTO(),wyBill); |
| | |
| | | .selectAs(YwCustomer::getName, YwContract::getRenterName) |
| | | .selectAs(YwProject::getName, YwContract::getProjectName) |
| | | .select("t3.realname", YwContract::getCreatorName) |
| | | .select("(select sum(r.area) from yw_contract_room cr left join yw_room r on r.id = cr.room_id where r.isdeleted=0 and cr.contract_id =t.id)", YwContract::getTotalArea) |
| | | .select("(select sum(r.RENT_AREA) from yw_contract_room cr left join yw_room r on r.id = cr.room_id where r.isdeleted=0 and cr.contract_id =t.id)", YwContract::getTotalArea) |
| | | .leftJoin(Company.class, Company::getId, YwContract::getCompanyId) |
| | | .leftJoin(SystemUser.class, SystemUser::getId, YwContract::getUserId) |
| | | .leftJoin(SystemUser.class, SystemUser::getId, YwContract::getCreator) |
| | |
| | | //æ¥è¯¢è´¦åéå |
| | | model.setBillList(ywContractBillMapper.selectJoinList(YwContractBill.class,new MPJLambdaWrapper<YwContractBill>() |
| | | .selectAll(YwContractBill.class ) |
| | | //.select(" ( select ifnull(sum(case when 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 ") |
| | | .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 ") |
| | | .eq( YwContractBill::getContractId,model.getId()) |
| | | .eq(YwContractBill::getIsdeleted,Constants.ZERO) |
| | | .orderByAsc(YwContractBill::getSortnum,YwContractBill::getCreateDate))); |
| | | for (YwContractBill ywContractBill:model.getBillList()) { |
| | | ywContractBill.setNeedReceivableFee(ywContractBill.getReceivableFee()); |
| | | // ywContractBill.setNeedReceivableFee(ywContractBill.getReceivableFee().subtract(ywContractBill.getActReceivableFee())); |
| | | } |
| | | model.setCanBackRentBills(new ArrayList<>()); |
| | | long nowStart = Utils.Date.getStart(date).getTime(); |
| | |
| | | if (pageWrap.getModel().getCreateDate() != null) { |
| | | queryWrapper.ge(YwContract::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getCreateDate())); |
| | | queryWrapper.le(YwContract::getCreateDate, Utils.Date.getEnd(pageWrap.getModel().getCreateDate())); |
| | | } |
| | | if (pageWrap.getModel().getStatusList() != null) { |
| | | queryWrapper.in(YwContract::getStatus, pageWrap.getModel().getStatusList()); |
| | | } |
| | | if (pageWrap.getModel().getEditor() != null) { |
| | | queryWrapper.eq(YwContract::getEditor, pageWrap.getModel().getEditor()); |
| | |
| | | QueryWrapper<YwContract> wrapper = new QueryWrapper<>(ywContract); |
| | | return ywContractMapper.selectCount(wrapper); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * å°æåå æªåèµ·éç§çè¿è¡æ°æ®è°æ´ æååä¸çæ¿æºéæ¾ å®æ¶æ¶é´éè¦å¨æ¯å¤©æä¸12ç¹å |
| | | */ |
| | | @Override |
| | | public void updRoomLeaseNowStatus(){ |
| | | |
| | | //宿¶å¤çååå·²è¿æ |
| | | List<YwContract> ywContractList = ywContractMapper.selectList(new QueryWrapper<YwContract>().lambda() |
| | | .eq(YwContract::getIsdeleted,Constants.ZERO) |
| | | .in(YwContract::getStatus,Constants.ONE,Constants.ZERO) |
| | | .apply(" DATE(END_DATE) = CURRENT_DATE ") |
| | | ); |
| | | |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(ywContractList)){ |
| | | ywContractMapper.update(new UpdateWrapper<YwContract>() |
| | | .lambda() |
| | | .set(YwContract::getStatus,Constants.TWO) |
| | | .set(YwContract::getEditDate,DateUtil.getCurrDateTime()) |
| | | .in(YwContract::getId,ywContractList.stream().map(i->i.getId()).collect(Collectors.toList())) |
| | | ); |
| | | |
| | | |
| | | List<YwContractRoom> contractRoomList = ywContractRoomMapper.selectList(new QueryWrapper<YwContractRoom>().lambda().in(YwContractRoom::getContractId, |
| | | ywContractList.stream().map(i->i.getId()).collect(Collectors.toList()))); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(contractRoomList)){ |
| | | //æ´æ°æ¿æºæ°æ®ä¸ºç§èµä¸ |
| | | roomMapper.update(new UpdateWrapper<YwRoom>().lambda().set(YwRoom::getLeaseNowStatus,Constants.ZERO) |
| | | .in(YwRoom::getId,contractRoomList.stream().map(i->i.getRoomId()).collect(Collectors.toList())) |
| | | ); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * éç§ä¸/å·²éç§åå æå°äºéç§æ¥ææ¶é´çæ°æ® è¿è¡æ¿æºéæ¾ å®æ¶æ¶é´éè¦å¨æ¯å¤©æä¸12ç¹å |
| | | */ |
| | | @Override |
| | | public void updRentContractStatus(){ |
| | | List<YwContract> ywContractList = ywContractMapper.selectList(new QueryWrapper<YwContract>().lambda() |
| | | .eq(YwContract::getIsdeleted,Constants.ZERO) |
| | | .in(YwContract::getStatus,Constants.THREE,Constants.FOUR) |
| | | .eq(YwContract::getBtDate,DateUtil.getCurrDate()) |
| | | ); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(ywContractList)){ |
| | | List<YwContractRoom> contractRoomList = ywContractRoomMapper.selectList(new QueryWrapper<YwContractRoom>().lambda().in(YwContractRoom::getContractId, |
| | | ywContractList.stream().map(i->i.getId()).collect(Collectors.toList()))); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(contractRoomList)){ |
| | | //æ´æ°æ¿æºæ°æ®ä¸ºå¾
ç§èµ |
| | | roomMapper.update(new UpdateWrapper<YwRoom>().lambda().set(YwRoom::getLeaseNowStatus,Constants.ZERO) |
| | | .in(YwRoom::getId,contractRoomList.stream().map(i->i.getRoomId()).collect(Collectors.toList())) |
| | | ); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | ywDeviceStatusDataVO.setAmount(ywDeviceList.size()); |
| | | ywDeviceStatusDataVO.setWorkAmount(ywDeviceList.stream().filter(i->Objects.nonNull(i.getStatus())&&Constants.equalsInteger(i.getStatus(),Constants.ZERO)).collect(Collectors.toList()).size()); |
| | | ywDeviceStatusDataVO.setExceptionAmount(ywDeviceList.stream().filter(i->Objects.nonNull(i.getStatus())&&Constants.equalsInteger(i.getStatus(),Constants.ONE)).collect(Collectors.toList()).size()); |
| | | ywDeviceStatusDataVO.setErrAmount(ywDeviceList.stream().filter(i->Objects.nonNull(i.getStatus())&&Constants.equalsInteger(i.getStatus(),Constants.THREE)).collect(Collectors.toList()).size()); |
| | | ywDeviceStatusDataVO.setErrAmount(ywDeviceList.stream().filter(i->Objects.nonNull(i.getStatus())&&Constants.equalsInteger(i.getStatus(),Constants.TWO)).collect(Collectors.toList()).size()); |
| | | return ywDeviceStatusDataVO; |
| | | |
| | | } |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.alibaba.nacos.shaded.org.checkerframework.checker.units.qual.A; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.annotation.excel.ExcelImporter; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.CategoryMapper; |
| | | import com.doumee.dao.business.YwMaterialMapper; |
| | | import com.doumee.dao.business.YwOutinboundMapper; |
| | | import com.doumee.dao.business.YwOutinboundRecordMapper; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.system.MultifileMapper; |
| | | import com.doumee.dao.system.dto.ImportMaterialDTO; |
| | | import com.doumee.dao.system.dto.ImportSystemUserDTO; |
| | | import com.doumee.dao.system.model.Multifile; |
| | | import com.doumee.service.business.YwMaterialService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import javafx.scene.paint.Material; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.checkerframework.checker.units.qual.A; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * è¿ç»´èµäº§ä¿¡æ¯è¡¨Serviceå®ç° |
| | |
| | | private YwOutinboundRecordMapper ywOutinboundRecordMapper; |
| | | |
| | | @Autowired |
| | | private CategoryMapper categoryMapper; |
| | | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | @Override |
| | |
| | | ywMaterial.setId(null); |
| | | if(StringUtils.isBlank(ywMaterial.getCode())){ |
| | | //èªå¨çæ TODO åå¨é®é¢ |
| | | Long countCode = ywMaterialMapper.selectCount(new QueryWrapper<YwMaterial>().lambda().eq(YwMaterial::getAutoCode, Constants.ONE)); |
| | | String nextCode = StringUtils.leftPad(Long.toString(countCode + 1),4,"0"); |
| | | YwMaterial lastAutoMaterial = ywMaterialMapper.selectOne(new QueryWrapper<YwMaterial>().lambda().eq(YwMaterial::getAutoCode,Constants.ONE).last("limit 1 ")); |
| | | Long countCode = 0L; |
| | | String nextCode = StringUtils.leftPad(Long.toString(countCode + 1 ),4,"0"); |
| | | if(Objects.nonNull(lastAutoMaterial)){ |
| | | Long maxCode = Long.valueOf(lastAutoMaterial.getCode().replace("P","")); |
| | | nextCode = StringUtils.leftPad(Long.toString(maxCode + 1),4,"0"); |
| | | while (ywMaterialMapper.selectCount(new QueryWrapper<YwMaterial>().lambda().eq(YwMaterial::getCode, "P"+nextCode))>Constants.ZERO){ |
| | | countCode = countCode + 1 ; |
| | | nextCode = StringUtils.leftPad(Long.toString(countCode),4,"0"); |
| | | } |
| | | } |
| | | ywMaterial.setCode("P"+nextCode); |
| | | ywMaterial.setAutoCode(Constants.ONE); |
| | | }else{ |
| | |
| | | QueryWrapper<YwMaterial> wrapper = new QueryWrapper<>(ywMaterial); |
| | | return ywMaterialMapper.selectCount(wrapper); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public Integer importMaterialBatch(MultipartFile file,LoginUserInfo loginUserInfo) { |
| | | try { |
| | | ExcelImporter ie = new ExcelImporter(file, 0, 0); |
| | | List<ImportMaterialDTO> dataList = ie.getDataList(ImportMaterialDTO.class, null); |
| | | if (CollectionUtils.isEmpty(dataList)) { |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对ä¸èµ·ï¼å½å
¥æ°æ®ä¸ºç©ºï¼"); |
| | | } |
| | | |
| | | List<Category> allCategory = categoryMapper.selectList(new QueryWrapper<Category>().lambda() |
| | | .eq(Category::getIsdeleted,Constants.ZERO).eq(Category::getIsdeleted,Constants.ZERO) |
| | | .eq(Category::getType,Constants.SEVEN) |
| | | ); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isEmpty(allCategory)){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对ä¸èµ·ï¼æ åç±»åºç¡æ°æ®ï¼"); |
| | | } |
| | | List<Category> categoryList = allCategory.stream().filter(i->Objects.isNull(i.getParentId())).collect(Collectors.toList()); |
| | | for (Category category: categoryList) { |
| | | category.setChildCategoryList( |
| | | allCategory.stream().filter(i->Objects.nonNull(i.getParentId())&&Constants.equalsInteger(i.getParentId(),category.getId())).collect(Collectors.toList()) |
| | | ); |
| | | } |
| | | List<YwMaterial> ywMaterialList = new ArrayList<>(); |
| | | for (int i = 0; i < dataList.size(); i++) { |
| | | ImportMaterialDTO importMaterialDTO = dataList.get(i); |
| | | if(Objects.isNull(importMaterialDTO) |
| | | || StringUtils.isBlank(importMaterialDTO.getName()) |
| | | || StringUtils.isBlank(importMaterialDTO.getCategoryName()) |
| | | || StringUtils.isBlank(importMaterialDTO.getCategoryChildName()) |
| | | || StringUtils.isBlank(importMaterialDTO.getQrcode()) |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对ä¸èµ·ï¼ç¬¬"+(i+1)+"è¡å¿
填项缺失ï¼"); |
| | | } |
| | | YwMaterial ywMaterial = new YwMaterial(); |
| | | BeanUtils.copyProperties(importMaterialDTO,ywMaterial); |
| | | Optional<Category> categoryOptional = categoryList.stream().filter(j->j.getName().equals(importMaterialDTO.getCategoryName())).findAny(); |
| | | if(categoryOptional.isPresent()){ |
| | | Category category = categoryOptional.get(); |
| | | ywMaterial.setParentCateId(category.getId()); |
| | | Optional<Category> childCategoryOptional = category.getChildCategoryList().stream().filter(j->j.getName().equals(importMaterialDTO.getCategoryChildName())).findAny(); |
| | | if(childCategoryOptional.isPresent()){ |
| | | ywMaterial.setCateId(childCategoryOptional.get().getId()); |
| | | }else{ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对ä¸èµ·ï¼ç¬¬"+(i+1)+"è¡ç©æååç±»æªæ¥è¯¢å°ï¼"); |
| | | } |
| | | }else{ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对ä¸èµ·ï¼ç¬¬"+(i+1)+"è¡ç©æåç±»æªæ¥è¯¢å°ï¼"); |
| | | } |
| | | ywMaterialList.add(ywMaterial); |
| | | } |
| | | |
| | | for (YwMaterial ywMaterial:ywMaterialList) { |
| | | ywMaterial.setLoginUserInfo(loginUserInfo); |
| | | this.create(ywMaterial); |
| | | } |
| | | } catch (Exception e) { |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),e.getMessage()); |
| | | |
| | | } |
| | | return null; |
| | | } |
| | | } |
| | |
| | | public List<YwOutinboundRecord> verifyData(YwOutinbound ywOutinbound){ |
| | | if(Objects.isNull(ywOutinbound) |
| | | || Objects.isNull(ywOutinbound.getType()) |
| | | // || (Objects.nonNull(ywOutinbound.getType()) && (!(ywOutinbound.getType() == Constants.ZERO || ywOutinbound.getType() == Constants.ONE))) |
| | | || ((ywOutinbound.getType() >= 5 && ywOutinbound.getType() <= 9 ) && Objects.isNull(ywOutinbound.getOutUserId()) ) |
| | | || Objects.isNull(ywOutinbound.getWarehouseId()) |
| | | || Objects.isNull(ywOutinbound.getDoneDate()) |
| | | || com.github.xiaoymin.knife4j.core.util.CollectionUtils.isEmpty(ywOutinbound.getRecordList()) |
| | |
| | | //åºåº |
| | | if(Objects.isNull(ywStock) || ywStock.getStock().compareTo(ywOutinboundRecord.getStock()) < Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), ywMaterial.getName() + "åºåä¸è¶³ï¼è¯·å·æ°éè¯"); |
| | | }else if(ywStock.getStock().compareTo(ywOutinboundRecord.getStock()) == Constants.ZERO){ |
| | | }/*else if(ywStock.getStock().compareTo(ywOutinboundRecord.getStock()) == Constants.ZERO){ |
| | | ywStockMapper.deleteById(ywStock.getId()); |
| | | }else{ |
| | | }*/else{ |
| | | ywStockMapper.update(new UpdateWrapper<YwStock>().lambda() |
| | | .setSql(" stock = ( stock - "+ywOutinboundRecord.getStock()+") ") |
| | | .set(YwStock::getEditDate, DateUtil.getCurrDateTime()) |
| | |
| | | } |
| | | List<Integer> typeList = Constants.ywOutInType.getAllTypeKey(model.getInOut()); |
| | | queryWrapper.selectAll(YwOutinbound.class) |
| | | .selectAs(SystemUser::getRealname,YwOutinbound::getCreateUserName) |
| | | .select(" s1.realname ",YwOutinbound::getCreateUserName) |
| | | .select(" s2.realname ",YwOutinbound::getOutUserName) |
| | | .selectAs(YwWarehouse::getName,YwOutinbound::getWarehouseName) |
| | | .leftJoin(SystemUser.class,SystemUser::getId,YwOutinbound::getCreator) |
| | | .leftJoin(YwWarehouse.class,YwWarehouse::getId,YwOutinbound::getWarehouseId) |
| | | .leftJoin("system_user s1 on t.creator = s1.id") |
| | | .leftJoin("system_user s2 on t.out_user_id = s2.id") |
| | | .like(StringUtils.isNotBlank(model.getCode()),YwOutinbound::getCode,model.getCode()) |
| | | .eq(Objects.nonNull(model.getType()),YwOutinbound::getType,model.getType()) |
| | | .eq(Objects.nonNull(model.getWarehouseId()),YwOutinbound::getWarehouseId,model.getWarehouseId()) |
| | | .in(Objects.nonNull(model.getInOut()),YwOutinbound::getType,typeList) |
| | | ; |
| | | for(PageWrap.SortData sortData: pageWrap.getSorts()) { |
| | | if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) { |
| | | queryWrapper.orderByDesc(sortData.getProperty()); |
| | | } else { |
| | | queryWrapper.orderByAsc(sortData.getProperty()); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(pageWrap.getSorts())){ |
| | | for(PageWrap.SortData sortData: pageWrap.getSorts()) { |
| | | if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) { |
| | | queryWrapper.orderByDesc(sortData.getProperty()); |
| | | } else { |
| | | queryWrapper.orderByAsc(sortData.getProperty()); |
| | | } |
| | | } |
| | | }else{ |
| | | queryWrapper.orderByDesc(YwOutinbound::getCode); |
| | | } |
| | | |
| | | IPage iPage = ywOutinboundMapper.selectJoinPage(page,YwOutinbound.class,queryWrapper); |
| | | if(Objects.nonNull(iPage.getRecords())){ |
| | | iPage.setRecords(this.getDetailData(iPage.getRecords())); |
| | |
| | | ); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(ywPatrolSchemeList)){ |
| | | for (YwPatrolScheme ywPatrolScheme:ywPatrolSchemeList) { |
| | | this.createTask(new Date(),ywPatrolScheme); |
| | | this.createTask(DateUtil.getXDayAfterDate(new Date(),2),ywPatrolScheme); |
| | | } |
| | | } |
| | | } |
| | |
| | | ywPatrolScheme.setEditDate(new Date()); |
| | | ywPatrolScheme.setEditor(loginUserInfo.getId()); |
| | | ywPatrolSchemeMapper.updateById(ywPatrolScheme); |
| | | this.createThreeDaysData(ywPatrolScheme); |
| | | } |
| | | |
| | | @Override |
| | |
| | | YwPatrolScheme model = pageWrap.getModel(); |
| | | queryWrapper.selectAll(YwPatrolScheme.class) |
| | | .select(" t2.realName as createUserName ") |
| | | // .select(" t1.realName as userName ") |
| | | // .leftJoin(SystemUser.class,SystemUser::getId,YwPatrolScheme::getUserIds) |
| | | .leftJoin(" system_user t2 on t.creator = t2.id ") |
| | | .eq(YwPatrolScheme::getIsdeleted,Constants.ZERO) |
| | | .like(StringUtils.isNotBlank(model.getTitle()),YwPatrolScheme::getTitle,model.getTitle()) |
| | | //æ¥è¯¢ææ¶æ®µäº¤éçæ°æ® |
| | | /* .apply(Objects.nonNull(model.getStartDate())&&Objects.nonNull(model.getEndDate()), |
| | | " t.START_DATE <= '"+pageWrap.getModel().getEndDate()+"' or t.END_DATE >= '"+pageWrap.getModel().getStartDate()+"' " |
| | | )*/ |
| | | .ge( model.getStartDate()!=null,YwPatrolScheme::getStartDate, Utils.Date.getStart(pageWrap.getModel().getStartDate())) |
| | | .le(Objects.nonNull(model.getEndDate()),YwPatrolScheme::getStartDate, Utils.Date.getStart(pageWrap.getModel().getEndDate())) |
| | | .ge(Objects.nonNull(model.getStartDateSec()),YwPatrolScheme::getEndDate, Utils.Date.getStart(pageWrap.getModel().getStartDateSec())) |
| | |
| | | ywPatrolScheme.setTimeOutTaskNum(Constants.ZERO); |
| | | return; |
| | | } |
| | | |
| | | //è¿æ»¤æ°æ®æ¯ä¸æ¯å
¨é¨æªå¼å§ |
| | | if(Constants.equalsInteger(ywPatrolTaskList.stream().filter(i->Constants.equalsInteger(i.getStatus(),Constants.ZERO)) |
| | | .collect(Collectors.toList()).size(),ywPatrolTaskList.size())){ |
| | | ywPatrolScheme.setSchemeStatus(Constants.ZERO); |
| | | ywPatrolScheme.setTimeOutTaskNum(ywPatrolTaskList.stream().filter(i->i.getEndDate().getTime()>System.currentTimeMillis()) |
| | | .collect(Collectors.toList()).size()); |
| | | return; |
| | | } |
| | | |
| | | //è¿æ»¤æ°æ®æ¯å¦åå¨è¿è¡ä¸ç |
| | | if(ywPatrolTaskList.stream().filter(i->Constants.equalsInteger(i.getStatus(),Constants.ONE)).collect(Collectors.toList()).size()>Constants.ZERO){ |
| | | if(ywPatrolTaskList.stream().filter(i->Constants.equalsInteger(i.getStatus(),Constants.ONE)||Constants.equalsInteger(i.getStatus(),Constants.ZERO)).collect(Collectors.toList()).size()>Constants.ZERO){ |
| | | ywPatrolScheme.setSchemeStatus(Constants.ONE); |
| | | ywPatrolScheme.setTimeOutTaskNum(ywPatrolTaskList.stream().filter(i->i.getEndDate().getTime()>System.currentTimeMillis()) |
| | | .collect(Collectors.toList()).size()); |
| | | return; |
| | | } |
| | | |
| | | //è¿æ»¤æ°æ®æ¯ä¸æ¯å
¨é¨æªå¼å§ |
| | | if(Constants.equalsInteger(ywPatrolTaskList.stream().filter(i->Constants.equalsInteger(i.getStatus(),Constants.ZERO)).collect(Collectors.toList()).size(),ywPatrolTaskList.size())){ |
| | | ywPatrolScheme.setSchemeStatus(Constants.ZERO); |
| | | ywPatrolScheme.setTimeOutTaskNum(ywPatrolTaskList.stream().filter(i->i.getEndDate().getTime()>System.currentTimeMillis()) |
| | | .collect(Collectors.toList()).size()); |
| | | return; |
| | | } |
| | | //è¿æ»¤æ°æ®æ¯ä¸æ¯å
¨é¨å·²å®æ |
| | | if(Constants.equalsInteger(ywPatrolTaskList.stream().filter(i->Constants.equalsInteger(i.getStatus(),Constants.THREE)).collect(Collectors.toList()).size() |
| | | ,ywPatrolTaskList.size())){ |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * è¿ç»´å·¡æ£ä»»å¡ - å·¡æ£ç¹ä¿¡æ¯è¡¨Serviceå®ç° |
| | |
| | | .selectAs(SystemUser::getRealname,YwPatrolTaskRecord::getRealname) |
| | | |
| | | .selectAs(YwPatrolScheme::getTitle,YwPatrolTaskRecord::getSchemeTitle) |
| | | .selectAs(YwPatrolTask::getTitle,YwPatrolTaskRecord::getTaskCode) |
| | | .selectAs(YwPatrolTask::getCode,YwPatrolTaskRecord::getTaskCode) |
| | | .selectAs(YwPatrolTask::getStartDate,YwPatrolTaskRecord::getStartDate) |
| | | .selectAs(YwPatrolTask::getEndDate,YwPatrolTaskRecord::getEndDate) |
| | | |
| | |
| | | if(Objects.isNull(ywPatrolScheme)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢å°å·¡æ£è®¡åä¿¡æ¯"); |
| | | } |
| | | if(!ywPatrolScheme.getUserIds().equals(loginUserInfo.getId().toString())){ |
| | | List<String> userIdList = Arrays.asList(ywPatrolScheme.getUserIds().split(",")); |
| | | if(userIdList.stream().filter(i->Constants.equalsInteger(Integer.valueOf(i),loginUserInfo.getId())).collect(Collectors.toList()).size()<=0){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"鿍çå·¡æ£ä»»å¡æ æ³è¿è¡å¤ç"); |
| | | } |
| | | YwPatrolTask ywPatrolTask = ywPatrolTaskMapper.selectById(model.getTaskId()); |
| | |
| | | .selectAll(YwPatrolTask.class) |
| | | .selectAs(YwPatrolScheme::getCode,YwPatrolTask::getPlanCode) |
| | | .selectAs(YwPatrolScheme::getTitle,YwPatrolTask::getPlanTitle) |
| | | .selectAs(YwPatrolScheme::getUserIds,YwPatrolTask::getUserIds) |
| | | .selectAs(SystemUser::getRealname,YwPatrolTask::getUserName) |
| | | .select(" ( select count(1) from yw_patrol_task_record ytr where ytr.TASK_ID = t.id and ytr.ISDELETED = 0 ) ",YwPatrolTask::getPatrolNum) |
| | | .select(" ( select count(1) from yw_patrol_task_record ytr where ytr.TASK_ID = t.id and ytr.STATUS = 1 and ytr.ISDELETED = 0) ",YwPatrolTask::getFinishNum) |
| | |
| | | queryWrapper.selectAll(YwPatrolTask.class) |
| | | .selectAs(YwPatrolScheme::getCode,YwPatrolTask::getPlanCode) |
| | | .selectAs(YwPatrolScheme::getTitle,YwPatrolTask::getPlanTitle) |
| | | .selectAs(YwPatrolScheme::getUserIds,YwPatrolTask::getUserIds) |
| | | .selectAs(SystemUser::getRealname,YwPatrolTask::getUserName) |
| | | .select(" ( select count(1) from yw_patrol_task_record ytr where ytr.TASK_ID = t.id and ytr.ISDELETED = 0 ) ",YwPatrolTask::getPatrolNum) |
| | | .select(" ( select count(1) from yw_patrol_task_record ytr where ytr.TASK_ID = t.id and ytr.STATUS = 1 and ytr.ISDELETED = 0) ",YwPatrolTask::getFinishNum) |
| | |
| | | .leftJoin(YwPatrolScheme.class,YwPatrolScheme::getId,YwPatrolTask::getSchemeId) |
| | | .eq(YwPatrolTask::getIsdeleted, Constants.ZERO) |
| | | .eq(Objects.nonNull(model.getStatus()) && !Constants.equalsInteger(model.getStatus(),Constants.TWO),YwPatrolTask::getStatus, model.getStatus()) |
| | | .eq(Objects.nonNull(model.getDealUserId()),YwPatrolScheme::getUserIds, model.getDealUserId()) |
| | | .apply(Objects.nonNull(model.getDealUserId())," find_in_set("+model.getDealUserId()+",t2.USER_IDS) ") |
| | | .apply(Objects.nonNull(model.getStatus()) && Constants.equalsInteger(model.getStatus(),Constants.TWO)," t.status = 1 and t.END_DATE > now() ") |
| | | .apply(StringUtils.isNotBlank(model.getQueryStatus())," find_in_set(t.status ,'"+model.getQueryStatus()+"') ") |
| | | .like(StringUtils.isNotBlank(model.getPlanTitle()),YwPatrolScheme::getTitle,model.getPlanTitle()) |
| | |
| | | |
| | | List<YwRoom> ywRoomList = ywRoomMapper.selectJoinList(YwRoom.class,new MPJLambdaWrapper<YwRoom>() |
| | | .selectAll(YwRoom.class) |
| | | // .select(" ( SELECT count(1) FROM yw_contract y1 " + |
| | | // " left join yw_contract_room y2 on y1.id = y2.contract_id " + |
| | | // " where 1 = 1 and y2.type = 0 and y1.`STATUS` in( 0,1,2) " + |
| | | // " and y1.START_DATE < now() and y1.END_DATE > now() and y2.ROOM_ID = yw_room.id ) as investmentStatus ") |
| | | .select(" ifnull( ( select case when y1.status = 3 then now() BETWEEN y1.START_DATE and y1.BT_DATE else now() BETWEEN y1.START_DATE and y1.END_DATE END " + |
| | | "from yw_contract y1 left join yw_contract_room y2 on y1.id = y2.CONTRACT_ID and y2.TYPE = 0 " + |
| | | "where y1.`STATUS` <> 4 and y2.room_id = t.id order by y1.create_date desc limit 1 ) ,0) ",YwRoom::getLeaseStatus) |
| | | .select(" ifnull( ( case when t.IS_INVESTMENT = 0 then 2 else t.LEASE_NOW_STATUS end ) ,0) ",YwRoom::getLeaseStatus) |
| | | .eq(YwRoom::getIsdeleted,Constants.ZERO) |
| | | .eq(YwRoom::getStatus,Constants.ZERO) |
| | | .eq(YwRoom::getIsInvestment,Constants.ONE) |
| | |
| | | " ) ") |
| | | .apply(Objects.nonNull(dataDTO)&&Objects.nonNull(dataDTO.getStartDate())&&Objects.nonNull(dataDTO.getEndDate())," id not in (" + |
| | | " SELECT y2.room_id FROM yw_contract y1 left join yw_contract_room y2 on y1.id = y2.contract_id where 1 = 1 and y1.`STATUS` = 3 " + |
| | | " and y1.START_DATE < '"+dataDTO.getEndDate()+" 00:00:00' and y1.BT_DATE > '"+ dataDTO.getStartDate() +" 00:00:00' " + |
| | | " and y1.START_DATE < '"+dataDTO.getEndDate()+" 00:00:00' and y1.BT_DATE >= '"+ dataDTO.getStartDate() +" 00:00:00' " + |
| | | " ) ") |
| | | .orderByAsc(YwRoom::getRoomNum) |
| | | ); |
| | |
| | | model.setStatus(Constants.ZERO); |
| | | model.setEditDate(model.getCreateDate()); |
| | | model.setEditor(model.getCreator()); |
| | | model.setLeaseNowStatus(Constants.ZERO); |
| | | ywRoomMapper.insert(model); |
| | | return model.getId(); |
| | | } |
| | |
| | | queryWrapper.selectAll(YwRoom.class ) |
| | | .selectAs(YwProject::getName,YwRoom::getProjectName) |
| | | .selectAs(YwFloor::getName,YwRoom::getFloorName) |
| | | .select(" ifnull( ( select case when y1.status = 3 then now() BETWEEN y1.START_DATE and y1.BT_DATE else now() BETWEEN y1.START_DATE and y1.END_DATE END " + |
| | | "from yw_contract y1 left join yw_contract_room y2 on y1.id = y2.CONTRACT_ID and y2.TYPE = 0 " + |
| | | "where y1.`STATUS` <> 4 and y2.room_id = t.id order by y1.create_date desc limit 1 ) ,0) ",YwRoom::getLeaseStatus) |
| | | // .select(" ifnull( ( select case when y1.status = 3 then now() BETWEEN y1.START_DATE and y1.BT_DATE else now() BETWEEN y1.START_DATE and y1.END_DATE END " + |
| | | // "from yw_contract y1 left join yw_contract_room y2 on y1.id = y2.CONTRACT_ID and y2.TYPE = 0 " + |
| | | // "where y1.`STATUS` <> 4 and y2.room_id = t.id order by y1.create_date desc limit 1 ) ,0) ",YwRoom::getLeaseStatus) |
| | | .select(" ifnull( ( case when t.IS_INVESTMENT = 0 then 2 else t.LEASE_NOW_STATUS end ) ,0) ",YwRoom::getLeaseStatus) |
| | | .selectAs(YwBuilding::getName,YwRoom::getBuildingName) |
| | | .leftJoin(YwProject.class,YwProject::getId,YwRoom::getProjectId) |
| | | .leftJoin(YwBuilding.class,YwBuilding::getId,YwRoom::getBuildingId) |
| | |
| | | .selectAs(YwProject::getName,YwRoom::getProjectName) |
| | | .selectAs(YwFloor::getName,YwRoom::getFloorName) |
| | | .selectAs(YwBuilding::getName,YwRoom::getBuildingName) |
| | | .select(" ifnull( ( select case when y1.status = 3 then now() BETWEEN y1.START_DATE and y1.BT_DATE else now() BETWEEN y1.START_DATE and y1.END_DATE END " + |
| | | "from yw_contract y1 left join yw_contract_room y2 on y1.id = y2.CONTRACT_ID and y2.TYPE = 0 " + |
| | | "where y1.`STATUS` <> 4 and y2.room_id = t.id order by y1.create_date desc limit 1 ) ,0) ",YwRoom::getLeaseStatus) |
| | | // .select(" ifnull( ( select case when y1.status = 3 then now() BETWEEN y1.START_DATE and y1.BT_DATE else now() BETWEEN y1.START_DATE and y1.END_DATE END " + |
| | | // "from yw_contract y1 left join yw_contract_room y2 on y1.id = y2.CONTRACT_ID and y2.TYPE = 0 " + |
| | | // "where y1.`STATUS` <> 4 and y2.room_id = t.id order by y1.create_date desc limit 1 ) ,0) ",YwRoom::getLeaseStatus) |
| | | .select(" ifnull( ( case when t.IS_INVESTMENT = 0 then 2 else t.LEASE_NOW_STATUS end ) ,0) ",YwRoom::getLeaseStatus) |
| | | .leftJoin(YwProject.class,YwProject::getId,YwRoom::getProjectId) |
| | | .leftJoin(YwBuilding.class,YwBuilding::getId,YwRoom::getBuildingId) |
| | | .leftJoin(YwFloor.class,YwFloor::getId,YwRoom::getFloor); |
| | |
| | | } |
| | | queryWrapper.orderByAsc(YwRoom::getRoomNum); |
| | | IPage<YwRoom> iPage = ywRoomMapper.selectJoinPage(page,YwRoom.class, queryWrapper); |
| | | for (YwRoom ywRoom:iPage.getRecords()) { |
| | | if(Constants.equalsInteger(ywRoom.getIsInvestment(),Constants.ZERO)){ |
| | | ywRoom.setLeaseStatus(Constants.TWO); |
| | | } |
| | | } |
| | | // for (YwRoom ywRoom:iPage.getRecords()) { |
| | | // if(Constants.equalsInteger(ywRoom.getIsInvestment(),Constants.ZERO)){ |
| | | // ywRoom.setLeaseStatus(Constants.TWO); |
| | | // } |
| | | // } |
| | | return PageData.from(iPage); |
| | | } |
| | | |
| | |
| | | .eq(YwContractRoom::getType,Constants.ZERO) |
| | | .eq(YwContractRoom::getRoomId,ywRoom.getId()) |
| | | .orderByDesc(YwContract::getStartDate) |
| | | .orderByDesc(YwContract::getId) |
| | | ); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isEmpty(roomContractList)){ |
| | | roomStatusDataVO.setRoomStatus(Constants.ZERO); |
| | | roomStatusDataVO.setFreeDayAmount(Constants.ZERO); |
| | | //æ¥è¯¢æ¯å¦æå·²éç§åå |
| | | List<YwContract> roomRentContractList = ywContractMapper.selectJoinList(YwContract.class,new MPJLambdaWrapper<YwContract>() |
| | | .selectAll(YwContract.class) |
| | | .selectAs(YwCustomer::getName,YwContract::getRenterName) |
| | | .leftJoin(YwContractRoom.class,YwContractRoom::getContractId,YwContract::getId) |
| | | .leftJoin(YwCustomer.class,YwCustomer::getId,YwContract::getRenterId) |
| | | .eq(YwContract::getIsdeleted,Constants.ZERO) |
| | | .eq(YwContract::getStatus,Constants.FOUR) |
| | | .eq(YwContractRoom::getType,Constants.ZERO) |
| | | .eq(YwContractRoom::getRoomId,ywRoom.getId()) |
| | | .orderByDesc(YwContract::getStartDate) |
| | | .orderByDesc(YwContract::getId) |
| | | ); |
| | | if(CollectionUtils.isEmpty(roomRentContractList)){ |
| | | roomStatusDataVO.setFreeDayAmount(Constants.ZERO); |
| | | }else{ |
| | | YwContract ywContract = roomRentContractList.get(Constants.ZERO); |
| | | //æ¥è¯¢éç§æ¥æåå½åæ¥æç¸å·®å¤©æ° |
| | | Integer btDays = DateUtil.daysBetweenDates(new Date(),ywContract.getBtDate()); |
| | | if(btDays>=Constants.ZERO){ |
| | | roomStatusDataVO.setFreeDayAmount(btDays); |
| | | } |
| | | } |
| | | |
| | | }else{ |
| | | YwContract ywContract = roomContractList.get(Constants.ZERO); |
| | | //ååç¶æ 0å¾
æ§è¡ 1æ§è¡ä¸ 2已尿 3éç§ä¸ 4å·²éç§ |
| | |
| | | .select(" ( select ifnull(sum(yr.RENT_AREA),0) from yw_contract_room y left join yw_room yr on y.room_id = yr.id where y.type = 0 and y.CONTRACT_ID = t.id ) " , YwContract::getTotalArea) |
| | | .select(" ( select ifnull(sum(y.TOTLE_FEE),0) from yw_contract_bill y where y.CONTRACT_ID = t.id and y.type = 0 and y.COST_TYPE=0 and y.BILL_TYPE = 0 ) " , YwContract::getTotalFee) |
| | | .eq(YwContract::getIsdeleted,Constants.ZERO) |
| | | .in(YwContract::getStatus,Constants.ONE,Constants.TWO,Constants.THREE) |
| | | .in(YwContract::getStatus,Constants.ZERO,Constants.ONE,Constants.TWO,Constants.THREE) |
| | | .apply(Objects.nonNull(model.getBuildingId()), |
| | | " t.id in ( select y.CONTRACT_ID from yw_contract_room y left join yw_room yr on y.room_id = yr.id where y.type = 0 and yr.BUILDING_ID = "+model.getBuildingId()+" ) ") |
| | | .apply(Objects.nonNull(model.getProjectId()), |
| | |
| | | .eq(Objects.nonNull(model.getBuildingId()),YwRoom::getBuildingId,model.getBuildingId()) |
| | | .eq(Objects.nonNull(model.getProjectId()),YwRoom::getProjectId,model.getProjectId()) |
| | | .in(YwContractRoom::getContractId,contractId) |
| | | .orderByAsc(YwRoom::getSortnum) |
| | | .last(" group by t.id " + |
| | | "ORDER BY t.sortnum ASC ") |
| | | ); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(ywLeaseRoomList)){ |
| | | ywRoomContractDataVO.setLeaseArea( |
| | |
| | | .set(YwStocktakingRecord::getActStock,ywStocktakingRecord.getActStock()) |
| | | .set(YwStocktakingRecord::getUserId,loginUserInfo.getId()) |
| | | .set(YwStocktakingRecord::getPlanDate, DateUtil.getCurrDateTime()) |
| | | .set(StringUtils.isNotBlank(ywStocktakingRecord.getRemark()),YwStocktakingRecord::getRemark, ywStocktakingRecord.getRemark()) |
| | | .eq(YwStocktakingRecord::getId,ywStocktakingRecord.getId()) |
| | | ); |
| | | |
| | |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(recordList)){ |
| | | //å计çç¹æ°æ® |
| | | ywStocktaking.setFinishAmount(recordList.stream().filter(i->Constants.equalsInteger(i.getStatus(),Constants.ONE)).collect(Collectors.toList()).size()); |
| | | ywStocktaking.setUnFinishAmount(recordList.stream().filter(i->Constants.equalsInteger(i.getStatus(),Constants.ZERO)).collect(Collectors.toList()).size()); |
| | | ywStocktaking.setUnFinishAmount(recordList.stream().filter(i->Constants.equalsInteger(i.getStatus(),Constants.TWO)).collect(Collectors.toList()).size()); |
| | | ywStocktaking.setEqualAmount(recordList.stream().filter(i->Constants.equalsInteger(i.getStatus(),Constants.ONE)&&Constants.equalsInteger(i.getType(),Constants.ZERO)).collect(Collectors.toList()).size()); |
| | | ywStocktaking.setLossAmount(recordList.stream().filter(i->Constants.equalsInteger(i.getStatus(),Constants.ONE)&&Constants.equalsInteger(i.getType(),Constants.ONE)).collect(Collectors.toList()).size()); |
| | | ywStocktaking.setProfitAmount(recordList.stream().filter(i->Constants.equalsInteger(i.getStatus(),Constants.ONE)&&Constants.equalsInteger(i.getType(),Constants.TWO)).collect(Collectors.toList()).size()); |
| | |
| | | .set(YwTempConfig::getUrl,leasesTemp.getUrl()) |
| | | .eq(YwTempConfig::getId,leasesTemp.getId()) |
| | | ); |
| | | |
| | | |
| | | YwTempConfig otherTemp = ywCallTempDataDTO.getOtherTemp(); |
| | | if(Objects.isNull(otherTemp.getId()) |
| | | || Objects.isNull(otherTemp.getTitle()) |
| | |
| | | if(ywStockMapper.selectCount(new QueryWrapper<YwStock>().lambda().eq(YwStock::getIsdeleted,Constants.ZERO) |
| | | .gt(YwStock::getStock,Constants.ZERO) |
| | | .eq(YwStock::getWarehouseId,ywWarehouse.getId()))>Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"å½åä»åºå
æåºåçç©æï¼ä¸å¯å é¤"); |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"å½åä»åºå
æåºåçç©æï¼ä¸å¯ç¦ç¨"); |
| | | }; |
| | | ywWarehouseMapper.update(new UpdateWrapper<YwWarehouse>().lambda().eq(YwWarehouse::getId,ywWarehouse.getId()).set(YwWarehouse::getStatus,ywWarehouse.getStatus())); |
| | | } |
| | |
| | | debug_model: true |
| | | |
| | | ########################å缩å
æä»¶ä½ç½® ######################## |
| | | zip_file_path: d:// |
| | | zip_file_path: /usr/local/static_resources/fn/ |
| | | ########################åæ¥æ°æ®æ¨¡å¼ ######################## |
| | | data-sync: |
| | | org-user-data-origin: 0 #ç»ç»æ°æ® 0èªå»º 2以海康为主 1åæERPç³»ç» |