zhou zhou
2 天以前 691bee4229856f8bf81c2720092ecee1c9f21509
rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/Task.java
@@ -176,6 +176,9 @@
    @ApiModelProperty(value= "添加人员")
    private Long createBy;
    @TableField(exist = false)
    private String createBy$;
    /**
     * 添加时间
     */
@@ -189,6 +192,9 @@
     */
    @ApiModelProperty(value= "修改人员")
    private Long updateBy;
    @TableField(exist = false)
    private String updateBy$;
    /**
     * 修改时间
@@ -231,6 +237,19 @@
    private String targLocArea;
    private String targSiteAreaNow;
    @TableField(exist = false)
    private String taskStatus$;
    @TableField(exist = false)
    private String warehType$;
    @TableField(exist = false)
    private String orgSite$;
    @TableField(exist = false)
    private String targSite$;
    public Task() {}
@@ -282,40 +301,14 @@
//            null    // 备注
//    );
//    public String getParentId$() {
//        if (Cools.isEmpty(this.parentId)) {
//            return null;
//        }
//        TaskService taskService = SpringUtils.getBean(TaskService.class);
//        Task task = taskService.getById(this.parentId);
//        return task.getTaskCode();
//    }
    public String getTaskStatus$(){
        if (Cools.isEmpty(this.taskStatus)) {
            return null;
        }
        DictDataService dictDataService = SpringUtils.getBean(DictDataService.class);
        DictData dictDatas = dictDataService.getOne(new LambdaQueryWrapper<DictData>()
                .eq(DictData::getDictTypeCode, DictTypeCode.DICT_SYS_TASK_STATUS)
                .eq(DictData::getValue, this.taskStatus));
        if (Objects.isNull(dictDatas) || Objects.isNull(dictDatas.getLabel())) {
            return null;
        }
        return dictDatas.getValue() + "." + dictDatas.getLabel();
        return this.taskStatus$;
    }
    public String getWarehType$(){
        if (null == this.warehType){ return null; }
        DictDataService dictDataService = SpringUtils.getBean(DictDataService.class);
        DictData dictDatas = dictDataService.getOne(new LambdaQueryWrapper<DictData>()
                .eq(DictData::getDictTypeCode, DictTypeCode.DICT_SYS_DEVICE_TYPE)
                .eq(DictData::getValue, warehType));
        if (Objects.isNull(dictDatas)) {
            return null;
        }
        return dictDatas.getLabel();
        return this.warehType$;
    }
    public String getTaskType$() {
@@ -348,29 +341,11 @@
        }
    }
    public String getCreateBy$(){
        UserService service = SpringUtils.getBean(UserService.class);
        User user = service.getById(this.createBy);
        if (!Cools.isEmpty(user)){
            return String.valueOf(user.getNickname());
        }
        return null;
    }
    public String getCreateTime$(){
        if (Cools.isEmpty(this.createTime)){
            return "";
        }
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime);
    }
    public String getUpdateBy$(){
        UserService service = SpringUtils.getBean(UserService.class);
        User user = service.getById(this.updateBy);
        if (!Cools.isEmpty(user)){
            return String.valueOf(user.getNickname());
        }
        return null;
    }
    public String getUpdateTime$(){
@@ -397,32 +372,14 @@
     * 获取源站点名称(站点编号 + 站点名称)
     */
    public String getOrgSite$(){
        if (Cools.isEmpty(this.orgSite)) {
            return this.orgSite;
        }
        BasStationService basStationService = SpringUtils.getBean(BasStationService.class);
        BasStation station = basStationService.getOne(new LambdaQueryWrapper<BasStation>()
                .eq(BasStation::getStationName, this.orgSite));
        if (!Cools.isEmpty(station) && !Cools.isEmpty(station.getStationId())) {
            return this.orgSite + "(" + station.getStationId() + ")";
        }
        return this.orgSite;
        return this.orgSite$;
    }
    /**
     * 获取目标站点名称(站点编号 + 站点名称)
     */
    public String getTargSite$(){
        if (Cools.isEmpty(this.targSite)) {
            return this.targSite;
        }
        BasStationService basStationService = SpringUtils.getBean(BasStationService.class);
        BasStation station = basStationService.getOne(new LambdaQueryWrapper<BasStation>()
                .eq(BasStation::getStationName, this.targSite));
        if (!Cools.isEmpty(station) && !Cools.isEmpty(station.getStationId())) {
            return this.targSite + "(" + station.getStationId() + ")";
        }
        return this.targSite;
        return this.targSite$;
    }
}