renkang
2025-02-07 6ad07bc0ea2f00bc676fd6a724de630760544a50
客户资料 巡检任务业务
已添加3个文件
已修改19个文件
421 ■■■■ 文件已修改
server/system_gateway/src/main/resources/application.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/MemberCloudController.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/SmsEmailColudController.java 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/YwOutinboundController.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/YwStockController.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/Member.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwDeviceRecord.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwPatrolTaskRecord.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwStock.java 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/vo/MemberExcelVO.java 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/vo/YwOutinboundExcelInVO.java 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/vo/YwOutinboundExcelOutVO.java 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/CategoryServiceImpl.java 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/SmsEmailServiceImpl.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractBillServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwPatrolTaskRecordServiceImpl.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwProblemServiceImpl.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwRoomServiceImpl.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwWorkorderServiceImpl.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/resources/application-dev.yml 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/resources/application-pro.yml 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/resources/application-test.yml 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/system_gateway/src/main/resources/application.yml
@@ -1,6 +1,6 @@
# é¡¹ç›®ä¿¡æ¯é…ç½®
project:
  name: å®‰æ³°ç‰©æµè®¿å®¢ç³»ç»Ÿ
  name: é˜œå®åœºé¦†è¿ç»´
  version: 1.0.0
  env: development
#  env: production
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/MemberCloudController.java
@@ -20,6 +20,7 @@
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;
@@ -27,6 +28,7 @@
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.*;
@@ -412,4 +414,18 @@
        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);
    }
}
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/SmsEmailColudController.java
@@ -49,11 +49,30 @@
    @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("操作成功");
    }
}
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/YwOutinboundController.java
@@ -1,5 +1,6 @@
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;
@@ -9,10 +10,13 @@
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;
@@ -82,7 +86,37 @@
    @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查询")
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/YwStockController.java
@@ -8,7 +8,9 @@
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;
@@ -80,9 +82,10 @@
    @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")
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/Member.java
@@ -222,7 +222,6 @@
    private String email;
    @ApiModelProperty(value = "最后操作人")
    @TableField(exist = false)
    private String editorName;
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwDeviceRecord.java
@@ -32,7 +32,7 @@
    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;
@@ -50,7 +50,7 @@
    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")
@@ -67,7 +67,7 @@
    private Date company;
    @ApiModelProperty(value = "情况说明")
    @ExcelColumn(name="运维备注",index = 4)
    @ExcelColumn(name="运维备注",index = 4,width = 30)
    private String content;
    @ApiModelProperty(value = "运维时间")
@@ -75,17 +75,17 @@
    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;
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwPatrolTaskRecord.java
@@ -75,15 +75,15 @@
    @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 = "处理备注")
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwStock.java
@@ -2,6 +2,7 @@
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;
@@ -20,65 +21,60 @@
@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;
@@ -86,11 +82,13 @@
    @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;
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/vo/MemberExcelVO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,45 @@
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;
}
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/vo/YwOutinboundExcelInVO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,50 @@
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;
}
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/vo/YwOutinboundExcelOutVO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,52 @@
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;
}
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/CategoryServiceImpl.java
@@ -7,8 +7,9 @@
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;
@@ -37,6 +38,22 @@
    @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);
@@ -61,8 +78,32 @@
        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)
        );
@@ -195,6 +236,8 @@
        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());
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/SmsEmailServiceImpl.java
@@ -106,10 +106,11 @@
        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);
@@ -617,6 +618,7 @@
        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);
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractBillServiceImpl.java
@@ -600,6 +600,7 @@
            .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);
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwPatrolTaskRecordServiceImpl.java
@@ -249,19 +249,6 @@
                    .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)
@@ -279,14 +266,6 @@
                        .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)
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwProblemServiceImpl.java
@@ -263,7 +263,26 @@
                .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);
    }
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwRoomServiceImpl.java
@@ -138,6 +138,9 @@
        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)
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwWorkorderServiceImpl.java
@@ -503,6 +503,9 @@
        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());
        }
server/visits/dmvisit_service/src/main/resources/application-dev.yml
@@ -15,7 +15,15 @@
  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
@@ -26,6 +34,8 @@
  need-deal-img: true #是否需要处理图片数据
########################压缩包文件位置  ########################
zip_file_path: d://
# Swagger配置
swagger:
  host: 127.0.0.1
server/visits/dmvisit_service/src/main/resources/application-pro.yml
@@ -15,10 +15,21 @@
  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系统
server/visits/dmvisit_service/src/main/resources/application-test.yml
@@ -15,10 +15,20 @@
  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系统