| | |
| | | # 项ç®ä¿¡æ¯é
ç½® |
| | | project: |
| | | name: 宿³°ç©æµè®¿å®¢ç³»ç» |
| | | name: éå®åºé¦è¿ç»´ |
| | | version: 1.0.0 |
| | | env: development |
| | | # env: production |
| | |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.business.model.MemberCard; |
| | | import com.doumee.dao.business.model.MemberRole; |
| | | import com.doumee.dao.business.vo.MemberExcelVO; |
| | | import com.doumee.dao.system.dto.UpdatePwdDto; |
| | | import com.doumee.service.business.MemberService; |
| | | import com.doumee.service.business.ext.ERPSyncService; |
| | |
| | | import com.doumee.service.business.impl.hksync.fhk.HkSyncOrgUserFromSelfServiceImpl; |
| | | import io.swagger.annotations.*; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | return ApiResponse.success(memberService.ywFindPage(pageWrap)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("éå® - 导åºExcel") |
| | | @PostMapping("/ywExportExcel") |
| | | @CloudRequiredPermission("business:member:exportExcel") |
| | | public void ywExportExcel (@RequestBody PageWrap<Member> pageWrap, HttpServletResponse response, @RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | List<Member> memberList = memberService.ywFindPage(pageWrap).getRecords(); |
| | | List<MemberExcelVO> memberExcelVOList = new ArrayList<MemberExcelVO>(); |
| | | for (Member member:memberList) { |
| | | MemberExcelVO memberExcelVO = new MemberExcelVO(); |
| | | BeanUtils.copyProperties(member,memberExcelVO); |
| | | memberExcelVOList.add(memberExcelVO); |
| | | } |
| | | ExcelExporter.build(MemberExcelVO.class).export(memberExcelVOList, "人åä¿¡æ¯è¡¨", response); |
| | | } |
| | | } |
| | |
| | | |
| | | @LoginNoRequired |
| | | @PreventRepeat |
| | | @ApiOperation("èªå®ä¹çä¿¡å
容") |
| | | @PostMapping("/testSendSms") |
| | | public ApiResponse testSendSms(@RequestBody SmsEmail smsEmail) { |
| | | @ApiOperation("èªå®ä¹çä¿¡å
容hk") |
| | | @PostMapping("/testSendSmsHk") |
| | | public ApiResponse testSendSmsHk(@RequestBody SmsEmail smsEmail) { |
| | | emayService.sendSmsByHk(smsEmail.getPhone(),smsEmail.getContent()); |
| | | return ApiResponse.success("æä½æå"); |
| | | } |
| | | |
| | | |
| | | |
| | | @LoginNoRequired |
| | | @PreventRepeat |
| | | @ApiOperation("èªå®ä¹çä¿¡å
容") |
| | | @PostMapping("/testSendSms") |
| | | public ApiResponse testSendSms(@RequestBody SmsEmail smsEmail) { |
| | | smsEmailService.sendBillSms(smsEmail.getContent(),smsEmail.getPhone(),null); |
| | | return ApiResponse.success("æä½æå"); |
| | | } |
| | | |
| | | @LoginNoRequired |
| | | @PreventRepeat |
| | | @ApiOperation("èªå®ä¹é®ä»¶å
容") |
| | | @PostMapping("/testSendEmail") |
| | | public ApiResponse testSendEmail(@RequestBody SmsEmail smsEmail) { |
| | | smsEmailService.sendEmail(smsEmail.getEmail(),smsEmail.getContent(),null); |
| | | return ApiResponse.success("æä½æå"); |
| | | } |
| | | } |
| | |
| | | package com.doumee.cloud.admin; |
| | | |
| | | import cn.emay.sdk.util.StringUtil; |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.config.annotation.CloudRequiredPermission; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.YwOutinbound; |
| | | import com.doumee.dao.business.model.YwOutinboundRecord; |
| | | import com.doumee.dao.business.vo.YwOutinboundExcelInVO; |
| | | import com.doumee.dao.business.vo.YwOutinboundExcelOutVO; |
| | | import com.doumee.service.business.YwOutinboundService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import javax.servlet.http.HttpServletResponse; |
| | |
| | | @PostMapping("/exportExcel") |
| | | @CloudRequiredPermission("business:ywoutinbound:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<YwOutinbound> pageWrap, HttpServletResponse response,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ExcelExporter.build(YwOutinbound.class).export(ywOutinboundService.findPage(pageWrap).getRecords(), "è¿ç»´åºå
¥åºä¿¡æ¯è¡¨", response); |
| | | List<YwOutinbound> ywOutinboundList = ywOutinboundService.findPage(pageWrap).getRecords(); |
| | | Integer inOut = pageWrap.getModel().getInOut(); |
| | | if(Constants.equalsInteger(inOut,Constants.ZERO)){ |
| | | List<YwOutinboundExcelInVO> inList = new ArrayList<>(); |
| | | for (YwOutinbound ywOutinbound:ywOutinboundList) { |
| | | YwOutinboundExcelInVO inVO = new YwOutinboundExcelInVO(); |
| | | BeanUtils.copyProperties(ywOutinbound,inVO); |
| | | List<YwOutinboundRecord> ywOutinboundRecordList = ywOutinbound.getRecordList(); |
| | | StringBuffer stringBuffer = new StringBuffer(); |
| | | for (YwOutinboundRecord ywOutinboundRecord:ywOutinboundRecordList) { |
| | | stringBuffer.append(ywOutinboundRecord.getMaterialName()+"["+ywOutinboundRecord.getMaterialCode()+"]*"+ywOutinboundRecord.getStock()+ywOutinboundRecord.getMaterialUnitName()+";"); |
| | | } |
| | | inVO.setOutMaterialNum(stringBuffer.toString()); |
| | | inList.add(inVO); |
| | | } |
| | | ExcelExporter.build(YwOutinboundExcelInVO.class).export(inList, "å
¥åºä¿¡æ¯è¡¨", response); |
| | | }else{ |
| | | List<YwOutinboundExcelOutVO> outList = new ArrayList<>(); |
| | | for (YwOutinbound ywOutinbound:ywOutinboundList) { |
| | | YwOutinboundExcelOutVO ywOutinboundExcelOutVO = new YwOutinboundExcelOutVO(); |
| | | BeanUtils.copyProperties(ywOutinbound,ywOutinboundExcelOutVO); |
| | | List<YwOutinboundRecord> ywOutinboundRecordList = ywOutinbound.getRecordList(); |
| | | StringBuffer stringBuffer = new StringBuffer(); |
| | | for (YwOutinboundRecord ywOutinboundRecord:ywOutinboundRecordList) { |
| | | stringBuffer.append(ywOutinboundRecord.getMaterialName()+"["+ywOutinboundRecord.getMaterialCode()+"]*"+ywOutinboundRecord.getStock()+ywOutinboundRecord.getMaterialUnitName()+";"); |
| | | } |
| | | ywOutinboundExcelOutVO.setOutMaterialNum(stringBuffer.toString()); |
| | | outList.add(ywOutinboundExcelOutVO); |
| | | } |
| | | ExcelExporter.build(YwOutinboundExcelOutVO.class).export(outList, "åºåºä¿¡æ¯è¡¨", response); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.YwPatrolTask; |
| | | import com.doumee.dao.business.model.YwStock; |
| | | import com.doumee.dao.business.model.YwWorkorder; |
| | | import com.doumee.service.business.YwStockService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | @PostMapping("/exportExcel") |
| | | @CloudRequiredPermission("business:ywstock:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<YwStock> pageWrap, HttpServletResponse response,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ExcelExporter.build(YwStock.class).export(ywStockService.findPage(pageWrap).getRecords(), "è¿ç»´åºåä¿¡æ¯è¡¨", response); |
| | | ExcelExporter.build(YwStock.class).export(ywStockService.findPage(pageWrap).getRecords(), "åºåä¿¡æ¯è¡¨_"+System.currentTimeMillis(), response); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @CloudRequiredPermission("business:ywstock:query") |
| | |
| | | private String email; |
| | | |
| | | |
| | | |
| | | @ApiModelProperty(value = "æåæä½äºº") |
| | | @TableField(exist = false) |
| | | private String editorName; |
| | |
| | | private Integer creator; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @ExcelColumn(name="å建æ¶é´",index = 5, dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | | @ExcelColumn(name="å建æ¶é´",index = 5, dateFormat = "yyyy-MM-dd HH:mm:ss",width = 16) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createDate; |
| | | |
| | |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "ç¶æ 0æ£å¸¸ 1æå 2æ¥åº", example = "1") |
| | | @ExcelColumn(name="设å¤ç¶æ",index = 3, valueMapping = "0=æ£å¸¸;1=æå;2=æ¥åº;") |
| | | @ExcelColumn(name="设å¤ç¶æ",index = 3, valueMapping = "0=æ£å¸¸;1=æå;2=æ¥åº;",width = 10) |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "设å¤åå·", example = "1") |
| | |
| | | private Date company; |
| | | |
| | | @ApiModelProperty(value = "æ
åµè¯´æ") |
| | | @ExcelColumn(name="è¿ç»´å¤æ³¨",index = 4) |
| | | @ExcelColumn(name="è¿ç»´å¤æ³¨",index = 4,width = 30) |
| | | private String content; |
| | | |
| | | @ApiModelProperty(value = "è¿ç»´æ¶é´") |
| | |
| | | private Date dealDate; |
| | | |
| | | @ApiModelProperty(value = "设å¤åç§°") |
| | | @ExcelColumn(name="设å¤åç§°",index = 2) |
| | | @ExcelColumn(name="设å¤åç§°",index = 2,width = 20) |
| | | @TableField(exist = false) |
| | | private String deviceName; |
| | | |
| | | @ApiModelProperty(value = "设å¤ç¼å·") |
| | | @ExcelColumn(name="设å¤ç¼å·",index = 1) |
| | | @ExcelColumn(name="设å¤ç¼å·",index = 1,width = 10) |
| | | @TableField(exist = false) |
| | | private String deviceCode; |
| | | |
| | | @ApiModelProperty(value = "è¿ç»´äººåç§°") |
| | | @ExcelColumn(name="è¿ç»´äºº",index = 0) |
| | | @ExcelColumn(name="è¿ç»´äºº",index = 0,width = 10) |
| | | @TableField(exist = false) |
| | | private String realName; |
| | | |
| | |
| | | |
| | | @ApiModelProperty(value = "å¤çæ¶é´") |
| | | @ExcelColumn(name="å¤çæ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date dealDate; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å·¡æ£ 0=å¾
å¼å§ï¼1=已巡æ£ï¼", example = "1") |
| | | @ExcelColumn(name="æ¯å¦å·¡æ£ 0=å¾
å¼å§ï¼1=已巡æ£") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "å·¡æ£ç»æ 0=æ£å¸¸ï¼1=å¼å¸¸", example = "1") |
| | | @ExcelColumn(name="å·¡æ£ç»æ 0=æ£å¸¸ï¼1=å¼å¸¸") |
| | | @ApiModelProperty(value = "å·¡æ£ç»æ 0=æ£å¸¸ï¼1=å¼å¸¸;2=è·³è¿ï¼", example = "1") |
| | | @ExcelColumn(name="å·¡æ£ç»æ 0=æ£å¸¸ï¼1=å¼å¸¸ï¼2=è·³è¿ï¼") |
| | | private Integer dealStatus; |
| | | |
| | | @ApiModelProperty(value = "å¤ç夿³¨") |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | @Data |
| | | @ApiModel("è¿ç»´åºåä¿¡æ¯è¡¨") |
| | | @TableName("`yw_stock`") |
| | | public class YwStock { |
| | | public class YwStock extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | | @ExcelColumn(name="主é®") |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "å建人ç¼ç ", example = "1") |
| | | @ExcelColumn(name="å建人ç¼ç ") |
| | | private Integer creator; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @ExcelColumn(name="å建æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date createDate; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°äººç¼ç ", example = "1") |
| | | @ExcelColumn(name="æ´æ°äººç¼ç ") |
| | | private Integer editor; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | @ExcelColumn(name="æ´æ°æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date editDate; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å é¤0å¦ 1æ¯", example = "1") |
| | | @ExcelColumn(name="æ¯å¦å é¤0å¦ 1æ¯") |
| | | private Integer isdeleted; |
| | | |
| | | @ApiModelProperty(value = "夿³¨") |
| | | @ExcelColumn(name="夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "ä»åºç¼ç (å
³èyw_warehouse)") |
| | | @ExcelColumn(name="ä»åºç¼ç (å
³èyw_warehouse)") |
| | | private Integer warehouseId; |
| | | |
| | | @ApiModelProperty(value = "ç©èµç¼ç ï¼å
³èyw_material)", example = "1") |
| | | @ExcelColumn(name="ç©èµç¼ç ï¼å
³èyw_material)") |
| | | private Integer materialId; |
| | | |
| | | @ApiModelProperty(value = "æ°é", example = "1") |
| | | @ExcelColumn(name="æ°é") |
| | | @ExcelColumn(name="æ°é",index = 6,width = 10) |
| | | private BigDecimal stock; |
| | | |
| | | |
| | | @ApiModelProperty(value = "èµäº§ç¼ç ") |
| | | @ApiModelProperty(value = "ç©æç¼ç ") |
| | | @ExcelColumn(name="ç©æç¼ç ",index = 0,width = 10) |
| | | @TableField(exist = false) |
| | | private String materialCode; |
| | | |
| | | @ApiModelProperty(value = "èµäº§åç§°") |
| | | @ApiModelProperty(value = "ç©æåç§°") |
| | | @ExcelColumn(name="ç©æåç§°",index = 1,width = 10) |
| | | @TableField(exist = false) |
| | | private String materialName; |
| | | |
| | | @ApiModelProperty(value = "èµäº§æ¡å½¢ç ") |
| | | @ApiModelProperty(value = "æ¡ç ") |
| | | @ExcelColumn(name="æ¡ç ",index = 2,width = 10) |
| | | @TableField(exist = false) |
| | | private String materialQrcode; |
| | | |
| | | @ApiModelProperty(value = "èµäº§åç") |
| | | @ApiModelProperty(value = "åç") |
| | | @ExcelColumn(name="åç",index = 3,width = 10) |
| | | @TableField(exist = false) |
| | | private String materialBrand; |
| | | |
| | |
| | | @TableField(exist = false) |
| | | private String materialUnitName; |
| | | |
| | | @ApiModelProperty(value = "èµäº§è§æ ¼åå·") |
| | | @ApiModelProperty(value = "è§æ ¼åå·") |
| | | @ExcelColumn(name="è§æ ¼åå·",index = 4,width = 10) |
| | | @TableField(exist = false) |
| | | private String materialAttr; |
| | | |
| | | @ApiModelProperty(value = "ä»åºåç§°") |
| | | @ApiModelProperty(value = "æå¨ä»åº") |
| | | @ExcelColumn(name="æå¨ä»åº",index = 5,width = 10) |
| | | @TableField(exist = false) |
| | | private String warehouseName; |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.vo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 人åä¿¡æ¯è¡¨ |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/11/30 15:33 |
| | | */ |
| | | @Data |
| | | public class MemberExcelVO { |
| | | |
| | | @ApiModelProperty(value = "客æ·åç§°", example = "1") |
| | | @ExcelColumn(name="客æ·åç§°",width = 10,index = 1) |
| | | private String customerName; |
| | | |
| | | @ApiModelProperty(value = "è系人", example = "1") |
| | | @ExcelColumn(name="è系人",width = 10,index = 2) |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "èç³»çµè¯", example = "1") |
| | | @ExcelColumn(name="èç³»çµè¯",width = 10,index = 3) |
| | | private String phone; |
| | | |
| | | @ApiModelProperty(value = "身份 0èæ¿/è¶
级管çå 1人äº/管çå 2åå·¥/æ®éåå·¥", example = "1") |
| | | @ExcelColumn(name="身份",width = 10,index = 4,valueMapping = "0=èæ¿/è¶
级管çå;1=人äº/管çå;2=åå·¥/æ®éåå·¥;") |
| | | private Integer highCheckor; |
| | | |
| | | @ApiModelProperty(value = "ç¶æ 0æ£å¸¸ 1ç¦ç¨ 2æé»/å»ç»", example = "1") |
| | | @ExcelColumn(name="身份",width = 10,index = 5,valueMapping = "0=æ£å¸¸;1=ç¦ç¨;") |
| | | private Integer status; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.vo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * è¿ç»´åºå
¥åºä¿¡æ¯è¡¨ |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/06 11:05 |
| | | */ |
| | | @Data |
| | | public class YwOutinboundExcelInVO { |
| | | |
| | | @ApiModelProperty(value = "åæ®ç¼å·") |
| | | @ExcelColumn(name="å
¥åºåå·",index = 0,width = 16) |
| | | private String code; |
| | | |
| | | @ApiModelProperty(value = "ä»åºåç§°", example = "1") |
| | | @ExcelColumn(name="å
¥åºä»åº",index = 1,width = 16) |
| | | private String warehouseName; |
| | | |
| | | @ApiModelProperty(value = "ç±»å 0éè´å
¥åº 1é¢ç¨éå 2è°æ´å
¥åº 3å
¶ä»å
¥åº 4ççå
¥åº 5é¢ç¨åºåº 6ä»åºåºåº 7è°æ´åºåº 8éè´åºåº 9å
¶ä»åºåº 10çäºåºåº", example = "1") |
| | | @ExcelColumn(name="å
¥åºç±»å",index = 2,width = 10,valueMapping = "0=éè´å
¥åº;1=é¢ç¨éå;2=è°æ´å
¥åº;3=å
¶ä»å
¥åº;4=ççå
¥åº;5=é¢ç¨åºåº;6=ä»åºåºåº;7=è°æ´åºåº;8=éè´åºåº;9=å
¶ä»åºåº;10=çäºåºåº;") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "åºåºæ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @ExcelColumn(name="å
¥åºæ¥æ",index = 3,width = 16,dateFormat = "yyyy-MM-dd") |
| | | private Date doneDate; |
| | | |
| | | @ApiModelProperty(value = "åºåºæ°é") |
| | | @ExcelColumn(name="å
¥åºæ°é",index = 4,width = 16) |
| | | private String outMaterialNum; |
| | | |
| | | @ApiModelProperty(value = "æä½äººåç§°", example = "1") |
| | | @ExcelColumn(name="æä½äºº",index = 5,width = 16) |
| | | private String createUserName; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ExcelColumn(name="æä½æ¶é´",index = 6,width = 16,dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createDate; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.vo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.dao.business.model.YwOutinboundRecord; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * è¿ç»´åºå
¥åºä¿¡æ¯è¡¨ |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/06 11:05 |
| | | */ |
| | | @Data |
| | | public class YwOutinboundExcelOutVO { |
| | | |
| | | @ApiModelProperty(value = "åæ®ç¼å·") |
| | | @ExcelColumn(name="åºåºåå·",index = 0,width = 16) |
| | | private String code; |
| | | |
| | | @ApiModelProperty(value = "ä»åºåç§°", example = "1") |
| | | @ExcelColumn(name="åºåºä»åº",index = 1,width = 16) |
| | | private String warehouseName; |
| | | |
| | | @ApiModelProperty(value = "ç±»å 0éè´å
¥åº 1é¢ç¨éå 2è°æ´å
¥åº 3å
¶ä»å
¥åº 4ççå
¥åº 5é¢ç¨åºåº 6ä»åºåºåº 7è°æ´åºåº 8éè´åºåº 9å
¶ä»åºåº 10çäºåºåº", example = "1") |
| | | @ExcelColumn(name="åºåºç±»å",index = 2,width = 10,valueMapping = "0=éè´å
¥åº;1=é¢ç¨éå;2=è°æ´å
¥åº;3=å
¶ä»å
¥åº;4=ççå
¥åº;5=é¢ç¨åºåº;6=ä»åºåºåº;7=è°æ´åºåº;8=éè´åºåº;9=å
¶ä»åºåº;10=çäºåºåº;") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "åºåºæ¥æ") |
| | | @ExcelColumn(name="åºåºæ¥æ",index = 3,width = 16,dateFormat = "yyyy-MM-dd") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date doneDate; |
| | | |
| | | @ApiModelProperty(value = "åºåºæ°é") |
| | | @ExcelColumn(name="åºåºæ°é",index = 4,width = 16) |
| | | private String outMaterialNum; |
| | | |
| | | @ApiModelProperty(value = "æä½äººåç§°", example = "1") |
| | | @ExcelColumn(name="é¢ç¨äºº",index = 5,width = 16) |
| | | private String createUserName; |
| | | |
| | | @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; |
| | | |
| | | |
| | | } |
| | |
| | | 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.model.Category; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.dao.CompanyMapper; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.service.business.CategoryService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | |
| | | @Autowired |
| | | private CategoryMapper categoryMapper; |
| | | |
| | | @Autowired |
| | | private YwCustomerMapper ywCustomerMapper; |
| | | |
| | | @Autowired |
| | | private YwWorkorderMapper ywWorkorderMapper; |
| | | |
| | | @Autowired |
| | | private YwPatrolPointMapper ywPatrolPointMapper; |
| | | |
| | | @Autowired |
| | | private YwDeviceMapper ywDeviceMapper; |
| | | |
| | | @Autowired |
| | | private YwMaterialMapper ywMaterialMapper; |
| | | |
| | | |
| | | @Override |
| | | public Integer create(Category category) { |
| | | checkUnique(category); |
| | |
| | | return insert.getId(); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void deleteById(Integer id) { |
| | | Category category = categoryMapper.selectById(id); |
| | | if(Objects.isNull(category)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | |
| | | if(categoryMapper.selectCount(new QueryWrapper<Category>().lambda() |
| | | .eq(Category::getIsdeleted,Constants.ZERO) |
| | | .eq(Category::getParentId,id) |
| | | )>Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"åå¨åéæ°æ®,æ æ³è¿è¡å é¤"); |
| | | } |
| | | //æ¥è¯¢æ°æ®æ¯å¦å·²ä½¿ç¨ 3è¿ç»´-å·¥ååç±» 4è¿ç»´-å·¡æ£åºå 5è¿ç»´-设å¤åç±» 6=客æ·è¡ä¸ 7=èµäº§åç±» |
| | | if(Constants.equalsInteger(category.getType(),Constants.THREE)){ |
| | | if(ywWorkorderMapper.selectCount(new QueryWrapper<YwWorkorder>().lambda().eq(YwWorkorder::getIsdeleted,Constants.ZERO).eq(YwWorkorder::getCateId,id))>Constants.ZERO) throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"å类已被使ç¨,æ æ³è¿è¡å é¤"); |
| | | }else if (Constants.equalsInteger(category.getType(),Constants.FOUR)){ |
| | | if(ywPatrolPointMapper.selectCount(new QueryWrapper<YwPatrolPoint>().lambda().eq(YwPatrolPoint::getIsdeleted,Constants.ZERO).eq(YwPatrolPoint::getAreaId,id))>Constants.ZERO) throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"å类已被使ç¨,æ æ³è¿è¡å é¤"); |
| | | }else if (Constants.equalsInteger(category.getType(),Constants.FIVE)){ |
| | | if(ywDeviceMapper.selectCount(new QueryWrapper<YwDevice>().lambda().eq(YwDevice::getIsdeleted,Constants.ZERO).eq(YwDevice::getCateId,id))>Constants.ZERO) throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"å类已被使ç¨,æ æ³è¿è¡å é¤"); |
| | | }else if (Constants.equalsInteger(category.getType(),Constants.SIX)){ |
| | | if(ywCustomerMapper.selectCount(new QueryWrapper<YwCustomer>().lambda().eq(YwCustomer::getIsdeleted,Constants.ZERO).eq(YwCustomer::getIndustryId,id))>Constants.ZERO) throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"å类已被使ç¨,æ æ³è¿è¡å é¤"); |
| | | }else if (Constants.equalsInteger(category.getType(),Constants.SEVEN)){ |
| | | if(ywMaterialMapper.selectCount(new QueryWrapper<YwMaterial>().lambda().eq(YwMaterial::getIsdeleted,Constants.ZERO).eq(YwMaterial::getCateId,id))>Constants.ZERO) throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"å类已被使ç¨,æ æ³è¿è¡å é¤"); |
| | | } |
| | | categoryMapper.update(null,new UpdateWrapper<Category>().lambda().set(Category::getIsdeleted,Constants.ONE) |
| | | .eq(Category::getId,id) |
| | | ); |
| | |
| | | wrapper.lambda() |
| | | .ne(Objects.nonNull(category.getId()),Category::getId,category.getId()) |
| | | .eq(Category::getIsdeleted,Constants.ZERO) |
| | | .eq(Objects.nonNull(category.getParentId()),Category::getParentId,category.getParentId()) |
| | | .isNull(Objects.isNull(category.getParentId()),Category::getParentId) |
| | | .eq(Category::getType,category.getType()) |
| | | .eq(Category::getName,category.getName()); |
| | | |
| | |
| | | String code = Constants.getRandom6Num(); |
| | | SmsConfig smsConfig = smsConfigMapper.selectOne(new QueryWrapper<SmsConfig>().lambda().eq(SmsConfig::getObjType, |
| | | SmsConstants.inventCode).last(" limit 1 ")); |
| | | String comName = systemDictDataBiz.queryByCode(Constants.SMS,Constants.SMS_COMNAME).getCode(); |
| | | //å¼å¯çä¿¡éç¥ |
| | | if(Objects.nonNull(smsConfig) || Constants.equalsInteger(smsConfig.getStatus(),Constants.ZERO)){ |
| | | if(StringUtils.isNotBlank(smsConfig.getContent())){ |
| | | String content = smsConfig.getContent().replace("{éªè¯ç }",code); |
| | | String content = comName + smsConfig.getContent().replace("{éªè¯ç }",code); |
| | | emayService.sendSingleSms(smsEmail.getPhone(),content); |
| | | smsEmail.setRemark(code); |
| | | smsEmail.setIsdeleted(Constants.ZERO); |
| | |
| | | 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); |
| | |
| | | .leftJoin(YwContract.class,YwContract::getId,YwContractBill::getContractId) |
| | | .leftJoin(YwCustomer.class,YwCustomer::getId,YwContract::getRenterId) |
| | | .eq(YwContractBill::getIsdeleted,Constants.ZERO) |
| | | .eq(YwContractBill::getStatus,Constants.ZERO) |
| | | .in(YwContractBill::getPayStatus,Constants.ZERO,Constants.TWO,Constants.THREE,Constants.FOUR) |
| | | .eq(YwContractBill::getContractId,contractId) |
| | | .orderByDesc(YwContractBill::getId); |
| | |
| | | .set(YwPatrolTask::getEditor,loginUserInfo.getId()) |
| | | ); |
| | | |
| | | // if(ywPatrolTaskMapper.selectCount(new QueryWrapper<YwPatrolTask>().lambda() |
| | | // .eq(YwPatrolTask::getSchemeId,ywPatrolTask.getSchemeId()) |
| | | // .in(YwPatrolTask::getStatus,Constants.ZERO,Constants.ONE) |
| | | // .ne(YwPatrolTask::getId,ywPatrolTask.getId()) |
| | | // )==Constants.ZERO){ |
| | | // ywPatrolSchemeMapper.update(null,new UpdateWrapper<YwPatrolScheme>().lambda() |
| | | // .eq(YwPatrolScheme::getId,ywPatrolScheme.getId()) |
| | | // .set(YwPatrolScheme::getStatus,Constants.TWO) |
| | | // .set(YwPatrolScheme::getEditDate,DateUtil.getCurrDateTime()) |
| | | // .set(YwPatrolScheme::getEditor,loginUserInfo.getId()) |
| | | // ); |
| | | // } |
| | | |
| | | //æ è®°å¾
åå·²å¤ç |
| | | noticesJoinMapper.update(null,new UpdateWrapper<Notices>().lambda() |
| | | .set(Notices::getStatus,Constants.ONE) |
| | |
| | | .set(YwPatrolTask::getEditor,loginUserInfo.getId()) |
| | | ); |
| | | } |
| | | // if(Constants.equalsInteger(ywPatrolScheme.getStatus(),Constants.ZERO)){ |
| | | // ywPatrolSchemeMapper.update(null,new UpdateWrapper<YwPatrolScheme>().lambda() |
| | | // .eq(YwPatrolScheme::getId,ywPatrolScheme.getId()) |
| | | // .set(YwPatrolScheme::getStatus,Constants.ONE) |
| | | // .set(YwPatrolScheme::getEditDate,DateUtil.getCurrDateTime()) |
| | | // .set(YwPatrolScheme::getEditor,loginUserInfo.getId()) |
| | | // ); |
| | | // } |
| | | //æ è®°å¾
åå·²å¤ç |
| | | noticesJoinMapper.update(null,new UpdateWrapper<Notices>().lambda() |
| | | .set(Notices::getParam3,Constants.ONE) |
| | |
| | | .le(Objects.nonNull(model.getDealDateEnd()),YwProblem::getDealDate, Utils.Date.getEnd(model.getDealDateEnd())) |
| | | .eq(Objects.nonNull(model.getDealStatus()),YwProblem::getDealStatus,model.getDealStatus()) |
| | | ; |
| | | IPage iPage = ywProblemMapper.selectJoinPage(page,YwProblem.class,queryWrapper); |
| | | IPage<YwProblem> iPage = ywProblemMapper.selectJoinPage(page,YwProblem.class,queryWrapper); |
| | | for (YwProblem ywProblem:iPage.getRecords()) { |
| | | List<Multifile> multifiles = multifileMapper.selectList(new QueryWrapper<Multifile>().lambda() |
| | | .eq(Multifile::getObjId, ywProblem.getId() ) |
| | | .in(Multifile::getObjType, Arrays.asList(new Integer[]{Constants.MultiFile.PROBLEM_FILE.getKey() })) |
| | | .eq(Multifile::getIsdeleted,Constants.ZERO)); |
| | | if(multifiles!=null){ |
| | | String path = systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_RESOURCE_PATH).getCode() |
| | | +systemDictDataBiz.queryByCode(Constants.FTP,Constants.YW_WORKORDER_FILE).getCode(); |
| | | for(Multifile f : multifiles){ |
| | | if(StringUtils.isBlank(f.getFileurl())){ |
| | | continue; |
| | | } |
| | | f.setFileurlFull(path+f.getFileurl()); |
| | | } |
| | | ywProblem.setFileList(multifiles); |
| | | } |
| | | } |
| | | |
| | | |
| | | return PageData.from(iPage); |
| | | } |
| | | |
| | |
| | | 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) |
| | | .selectAs(YwBuilding::getName,YwRoom::getBuildingName) |
| | | .leftJoin(YwProject.class,YwProject::getId,YwRoom::getProjectId) |
| | | .leftJoin(YwBuilding.class,YwBuilding::getId,YwRoom::getBuildingId) |
| | |
| | | if (pageWrap.getModel().getRoomId() != null) { |
| | | queryWrapper.eq(YwWorkorder::getRoomId, pageWrap.getModel().getRoomId()); |
| | | } |
| | | if (pageWrap.getModel().getFloorId() != null) { |
| | | queryWrapper.eq(YwWorkorder::getFloorId, pageWrap.getModel().getFloorId()); |
| | | } |
| | | if (pageWrap.getModel().getUserId() != null) { |
| | | queryWrapper.eq(YwWorkorder::getUserId, pageWrap.getModel().getUserId()); |
| | | } |
| | |
| | | jackson: |
| | | time-zone: GMT+8 |
| | | date-format: yyyy-MM-dd HH:mm:ss |
| | | |
| | | mail: |
| | | default-encoding: UTF-8 |
| | | host: smtp.exmail.qq.com |
| | | username: jp@doumee.com |
| | | password: p7iKUE8VvQQpY58S |
| | | properties: |
| | | mail: |
| | | smtp: |
| | | auth: true |
| | | |
| | | debug_model: true |
| | | |
| | |
| | | need-deal-img: true #æ¯å¦éè¦å¤çå¾çæ°æ® |
| | | |
| | | |
| | | ########################å缩å
æä»¶ä½ç½® ######################## |
| | | zip_file_path: d:// |
| | | # Swaggeré
ç½® |
| | | swagger: |
| | | host: 127.0.0.1 |
| | |
| | | jackson: |
| | | time-zone: GMT+8 |
| | | date-format: yyyy-MM-dd HH:mm:ss |
| | | |
| | | mail: |
| | | default-encoding: UTF-8 |
| | | host: smtp.exmail.qq.com |
| | | username: jp@doumee.com |
| | | password: p7iKUE8VvQQpY58S |
| | | properties: |
| | | mail: |
| | | smtp: |
| | | auth: true |
| | | |
| | | debug_model: true |
| | | |
| | | ########################å缩å
æä»¶ä½ç½® ######################## |
| | | zip_file_path: d:// |
| | | |
| | | ########################åæ¥æ°æ®æ¨¡å¼ ######################## |
| | | data-sync: |
| | | org-user-data-origin: 0 #ç»ç»æ°æ® 0èªå»º 2以海康为主 1åæERPç³»ç» |
| | |
| | | jackson: |
| | | time-zone: GMT+8 |
| | | date-format: yyyy-MM-dd HH:mm:ss |
| | | |
| | | mail: |
| | | default-encoding: UTF-8 |
| | | host: smtp.exmail.qq.com |
| | | username: jp@doumee.com |
| | | password: p7iKUE8VvQQpY58S |
| | | properties: |
| | | mail: |
| | | smtp: |
| | | auth: true |
| | | |
| | | debug_model: true |
| | | |
| | | ########################å缩å
æä»¶ä½ç½® ######################## |
| | | zip_file_path: d:// |
| | | ########################åæ¥æ°æ®æ¨¡å¼ ######################## |
| | | data-sync: |
| | | org-user-data-origin: 0 #ç»ç»æ°æ® 0èªå»º 2以海康为主 1åæERPç³»ç» |