bug修改

This commit is contained in:
huangzj
2023-04-11 08:58:39 +08:00
parent 9199a7c763
commit b2646a080d
41 changed files with 416 additions and 88 deletions

View File

@@ -15,9 +15,7 @@ import javax.validation.constraints.NotBlank;
* @version V1.0.0 * @version V1.0.0
*/ */
/**
* app基础信息表
*/
@Data @Data
public class AppBaseInformationAddParm { public class AppBaseInformationAddParm {

View File

@@ -15,9 +15,7 @@ import javax.validation.constraints.NotBlank;
* @version V1.0.0 * @version V1.0.0
*/ */
/**
* 项目拓扑图关系表
*/
@Data @Data
public class AppLineTopologyDiagramAddParm { public class AppLineTopologyDiagramAddParm {
/** /**

View File

@@ -15,9 +15,7 @@ import javax.validation.constraints.NotBlank;
* @version V1.0.0 * @version V1.0.0
*/ */
/**
* 项目拓扑图关系表
*/
@Data @Data
public class AppLineTopologyDiagramAuditParm { public class AppLineTopologyDiagramAuditParm {
/** /**

View File

@@ -15,9 +15,7 @@ import javax.validation.constraints.NotBlank;
* @version V1.0.0 * @version V1.0.0
*/ */
/**
* app个人中心-设置信息
*/
@Data @Data
public class AppPersonSetAddParm { public class AppPersonSetAddParm {

View File

@@ -17,9 +17,7 @@ import javax.validation.constraints.NotNull;
* @version V1.0.0 * @version V1.0.0
*/ */
/**
* 项目拓扑图关系表
*/
@Data @Data
public class AppTopologyDiagramAddParm { public class AppTopologyDiagramAddParm {

View File

@@ -16,9 +16,6 @@ import javax.validation.constraints.NotBlank;
* @version V1.0.0 * @version V1.0.0
*/ */
/**
* 项目拓扑图关系表
*/
@Data @Data
public class AppTopologyDiagramAuditParm { public class AppTopologyDiagramAuditParm {
@ApiModelProperty(value = "拓扑图id") @ApiModelProperty(value = "拓扑图id")

View File

@@ -17,9 +17,7 @@ import java.util.Date;
* @version V1.0.0 * @version V1.0.0
*/ */
/**
* 装置数据模板表
*/
@Data @Data
public class CsDevModelAddParm { public class CsDevModelAddParm {

View File

@@ -18,9 +18,7 @@ import java.util.Date;
* @version V1.0.0 * @version V1.0.0
*/ */
/**
* 装置数据模板表
*/
@Data @Data
public class CsDevModelAuditParm { public class CsDevModelAuditParm {
@NotNull(message="版本id不能为空") @NotNull(message="版本id不能为空")

View File

@@ -15,9 +15,7 @@ import org.springframework.format.annotation.DateTimeFormat;
* @version V1.0.0 * @version V1.0.0
*/ */
/**
* 程序版本表
*/
@Data @Data
public class CsDevModelQueryListParm { public class CsDevModelQueryListParm {

View File

@@ -18,9 +18,7 @@ import javax.validation.constraints.NotNull;
* @version V1.0.0 * @version V1.0.0
*/ */
/**
* 程序版本表
*/
@Data @Data
public class CsDevModelQueryParm { public class CsDevModelQueryParm {

View File

@@ -13,9 +13,7 @@ import lombok.Data;
* @version V1.0.0 * @version V1.0.0
*/ */
/**
* 数据字典表
*/
@Data @Data
public class CsDictAddParm { public class CsDictAddParm {

View File

@@ -20,9 +20,7 @@ import java.util.Date;
* @version V1.0.0 * @version V1.0.0
*/ */
/**
* 程序版本表
*/
@Data @Data
public class CsEdDataAddParm { public class CsEdDataAddParm {

View File

@@ -19,9 +19,7 @@ import java.time.LocalDate;
* @version V1.0.0 * @version V1.0.0
*/ */
/**
* 程序版本表
*/
@Data @Data
public class CsEdDataAuditParm { public class CsEdDataAuditParm {

View File

@@ -18,9 +18,7 @@ import javax.validation.constraints.NotNull;
* @version V1.0.0 * @version V1.0.0
*/ */
/**
* 程序版本表
*/
@Data @Data
public class CsEdDataQueryParm { public class CsEdDataQueryParm {

View File

@@ -0,0 +1,58 @@
package com.njcn.algorithm.pojo.param;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
/**
*
* Description:
* 接口文档访问地址http://serverIP:port/swagger-ui.html
* Date: 2023/4/7 11:04【需求编号】
*
* @author clam
* @version V1.0.0
*/
@Data
public class CsEngineeringAddParm {
/**
* 工程名称
*/
@ApiModelProperty(value = "工程名称")
@NotBlank(message="工程名称不能为空!")
private String name;
/**
* 用户id
*/
@ApiModelProperty(value = "用户id")
@NotBlank(message="用户id不能为空")
private String userId;
/**
* 省
*/
@ApiModelProperty(value = "")
@NotBlank(message="省不能为空!")
private String province;
/**
* 市
*/
@ApiModelProperty(value = "")
@NotBlank(message="市不能为空!")
private String city;
/**
* 描述
*/
@ApiModelProperty(value = "描述")
private String description;
}

View File

@@ -0,0 +1,59 @@
package com.njcn.algorithm.pojo.param;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
/**
*
* Description:
* 接口文档访问地址http://serverIP:port/swagger-ui.html
* Date: 2023/4/7 11:04【需求编号】
*
* @author clam
* @version V1.0.0
*/
@Data
public class CsEngineeringAuditParm {
@NotNull(message="版本id不能为空")
private String id;
/**
* 工程名称
*/
@ApiModelProperty(value = "工程名称")
private String name;
/**
* 用户id
*/
@ApiModelProperty(value = "用户id")
private String userId;
/**
* 省
*/
@ApiModelProperty(value = "")
private String province;
/**
* 市
*/
@ApiModelProperty(value = "")
private String city;
/**
* 描述
*/
@ApiModelProperty(value = "描述")
private String description;
@ApiModelProperty(value="0删除 1正常")
private String status;
}

View File

@@ -0,0 +1,38 @@
package com.njcn.algorithm.pojo.param;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* Description:
* 接口文档访问地址http://serverIP:port/swagger-ui.html
* Date: 2023/4/10 19:47【需求编号】
*
* @author clam
* @version V1.0.0
*/
@Data
public class CsEngineeringQueryParm {
@ApiModelProperty(value = "工程名称")
private String name;
/**
* 用户id
*/
@ApiModelProperty(value = "用户id")
private String userId;
/**
* 省
*/
@ApiModelProperty(value = "")
private String province;
/**
* 市
*/
@ApiModelProperty(value = "")
private String city;
}

View File

@@ -18,9 +18,6 @@ import java.util.Date;
* @version V1.0.0 * @version V1.0.0
*/ */
/**
* 设备出厂表
*/
@Data @Data
public class CsEquipmentDeliveryAddParm{ public class CsEquipmentDeliveryAddParm{

View File

@@ -16,9 +16,6 @@ import java.util.Date;
* @version V1.0.0 * @version V1.0.0
*/ */
/**
* 设备出厂表
*/
@Data @Data
public class CsEquipmentDeliveryQueryParm { public class CsEquipmentDeliveryQueryParm {

View File

@@ -16,9 +16,7 @@ import javax.validation.constraints.NotNull;
* @version V1.0.0 * @version V1.0.0
*/ */
/**
* 信息反馈表
*/
@Data @Data
public class CsFeedbackQueryParm { public class CsFeedbackQueryParm {

View File

@@ -1,6 +1,8 @@
package com.njcn.algorithm.pojo.po; package com.njcn.algorithm.pojo.po;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.github.jeffreyning.mybatisplus.anno.MppMultiId; import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import com.njcn.db.bo.BaseEntity; import com.njcn.db.bo.BaseEntity;
@@ -24,7 +26,7 @@ public class AppLineTopologyDiagramPO extends BaseEntity {
/** /**
* 拓扑图Id * 拓扑图Id
*/ */
@MppMultiId(value = "id") @TableId(value = "id", type = IdType.ASSIGN_UUID)
private String id; private String id;
/** /**

View File

@@ -1,8 +1,9 @@
package com.njcn.algorithm.pojo.po; package com.njcn.algorithm.pojo.po;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import com.njcn.db.bo.BaseEntity; import com.njcn.db.bo.BaseEntity;
import lombok.Data; import lombok.Data;
@@ -24,7 +25,7 @@ public class AppProjectPO extends BaseEntity {
/** /**
* 项目Id * 项目Id
*/ */
@MppMultiId(value = "id") @TableId(value = "id", type = IdType.ASSIGN_UUID)
private String id; private String id;

View File

@@ -1,8 +1,9 @@
package com.njcn.algorithm.pojo.po; package com.njcn.algorithm.pojo.po;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import com.njcn.db.bo.BaseEntity; import com.njcn.db.bo.BaseEntity;
import lombok.Data; import lombok.Data;
@@ -24,7 +25,7 @@ public class AppTopologyDiagramPO extends BaseEntity {
/** /**
* 拓扑图Id * 拓扑图Id
*/ */
@MppMultiId(value = "id") @TableId(value = "id", type = IdType.ASSIGN_UUID)
private String id; private String id;
/** /**

View File

@@ -62,7 +62,7 @@ public class CsEngineeringPO extends BaseEntity {
* 状态(0删除 1正常) * 状态(0删除 1正常)
*/ */
@TableField(value = "status") @TableField(value = "status")
private Boolean status; private String status;
} }

View File

@@ -14,9 +14,7 @@ import lombok.Data;
* @version V1.0.0 * @version V1.0.0
*/ */
/**
* app基础信息表
*/
@Data @Data
public class AppBaseInformationVO extends BaseEntity { public class AppBaseInformationVO extends BaseEntity {
/** /**

View File

@@ -14,9 +14,7 @@ import lombok.Data;
* @version V1.0.0 * @version V1.0.0
*/ */
/**
* 项目拓扑图关系表
*/
@Data @Data
public class AppTopologyDiagramVO extends BaseEntity { public class AppTopologyDiagramVO extends BaseEntity {
/** /**

View File

@@ -17,9 +17,7 @@ import java.time.LocalDate;
* @version V1.0.0 * @version V1.0.0
*/ */
/**
* 装置数据模板表
*/
@Data @Data
public class CsDevModelPageVO extends BaseEntity { public class CsDevModelPageVO extends BaseEntity {
/** /**

View File

@@ -14,9 +14,7 @@ import lombok.Data;
* @version V1.0.0 * @version V1.0.0
*/ */
/**
* 数据字典表
*/
@Data @Data
public class CsDictVO extends BaseEntity { public class CsDictVO extends BaseEntity {
/** /**

View File

@@ -16,9 +16,7 @@ import java.time.LocalDate;
* @version V1.0.0 * @version V1.0.0
*/ */
/**
* 程序版本表
*/
@Data @Data
public class CsEdDataVO extends BaseEntity { public class CsEdDataVO extends BaseEntity {

View File

@@ -0,0 +1,67 @@
package com.njcn.algorithm.pojo.vo;
import com.baomidou.mybatisplus.annotation.TableName;
import com.njcn.db.bo.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
*
* Description:
* 接口文档访问地址http://serverIP:port/swagger-ui.html
* Date: 2023/4/7 11:04【需求编号】
*
* @author clam
* @version V1.0.0
*/
/**
* 工程信息表
*/
@Data
@TableName(value = "cs_engineering")
public class CsEngineeringVO extends BaseEntity {
/**
* id
*/
@ApiModelProperty(value = "id")
private String id;
/**
* 工程名称
*/
@ApiModelProperty(value = "工程名称")
private String name;
/**
* 用户id
*/
@ApiModelProperty(value = "用户id")
private String userId;
/**
* 省
*/
@ApiModelProperty(value = "")
private String province;
/**
* 市
*/
@ApiModelProperty(value = "")
private String city;
/**
* 描述
*/
@ApiModelProperty(value = "描述")
private String description;
/**
* 状态(0删除 1正常)
*/
@ApiModelProperty(value = "状态")
private String status;
}

View File

@@ -18,9 +18,7 @@ import java.util.Date;
* @version V1.0.0 * @version V1.0.0
*/ */
/**
* 设备出厂表
*/
@Data @Data
public class CsEquipmentDeliveryVO extends BaseEntity { public class CsEquipmentDeliveryVO extends BaseEntity {
/** /**

View File

@@ -18,9 +18,7 @@ import java.util.List;
* @version V1.0.0 * @version V1.0.0
*/ */
/**
* 信息反馈列表
*/
@Data @Data
public class CsFeedbackDetailVO { public class CsFeedbackDetailVO {
/** /**

View File

@@ -16,9 +16,7 @@ import java.time.LocalDateTime;
* @version V1.0.0 * @version V1.0.0
*/ */
/**
* 信息反馈列表
*/
@Data @Data
public class CsFeedbackVO { public class CsFeedbackVO {
/** /**

View File

@@ -0,0 +1,77 @@
package com.njcn.algorithm.controller.project;
import com.njcn.algorithm.pojo.param.CsEngineeringAddParm;
import com.njcn.algorithm.pojo.param.CsEngineeringAuditParm;
import com.njcn.algorithm.pojo.param.CsEngineeringQueryParm;
import com.njcn.algorithm.pojo.vo.CsEngineeringVO;
import com.njcn.algorithm.service.CsEngineeringService;
import com.njcn.common.pojo.annotation.OperateInfo;
import com.njcn.common.pojo.enums.common.LogEnum;
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.common.utils.HttpResultUtil;
import com.njcn.web.controller.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* Description:
* 接口文档访问地址http://serverIP:port/swagger-ui.html
* Date: 2023/3/27 10:54【需求编号】
*
* @author clam
* @version V1.0.0
*/
@Slf4j
@RestController
@RequestMapping("/engineering")
@Api(tags = " 工程管理")
@AllArgsConstructor
public class EngineeringController extends BaseController {
private final CsEngineeringService csEngineeringService;
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
@PostMapping("/addEngineering")
@ApiOperation("新增工程")
@ApiImplicitParam(name = "csEngineeringAddParm", value = "新增工程参数", required = true)
public HttpResult<Boolean> addEngineering(@Validated @RequestBody CsEngineeringAddParm csEngineeringAddParm){
String methodDescribe = getMethodDescribe("addEngineering");
Boolean flag = csEngineeringService.addEngineering(csEngineeringAddParm);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);
}
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
@PostMapping("/auditEngineering")
@ApiOperation("修改/删除工程")
@ApiImplicitParam(name = "csEngineeringAuditParm", value = "修改项目参数", required = true)
public HttpResult<Boolean> auditAppProject(@Validated @RequestBody CsEngineeringAuditParm csEngineeringAuditParm){
String methodDescribe = getMethodDescribe("auditEngineering");
Boolean flag = csEngineeringService.auditEngineering(csEngineeringAuditParm);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);
}
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
@PostMapping("/queryEngineering")
@ApiOperation("查询工程列表")
@ApiImplicitParam(name = "csEngineeringQueryParm", value = "修改项目参数", required = true)
public HttpResult<List<CsEngineeringVO>> queryEngineering(@Validated @RequestBody CsEngineeringQueryParm csEngineeringQueryParm){
String methodDescribe = getMethodDescribe("queryEngineering");
List<CsEngineeringVO> csEngineeringVOList = csEngineeringService.queryEngineering(csEngineeringQueryParm);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, csEngineeringVOList, methodDescribe);
}
}

View File

@@ -25,7 +25,7 @@
FROM cs_dev_model a FROM cs_dev_model a
LEFT JOIN sys_dict_data b ON a.dev_type = b.id LEFT JOIN sys_dict_data b ON a.dev_type = b.id
WHERE WHERE
1 = 1 1 = 1 And a.`status`='1'
<if test="csDevModelQueryParm.versionStartDate != null and csDevModelQueryParm.versionStartDate != ''"> <if test="csDevModelQueryParm.versionStartDate != null and csDevModelQueryParm.versionStartDate != ''">
AND a.version_date &gt;= #{csDevModelQueryParm.versionStartDate } AND a.version_date &gt;= #{csDevModelQueryParm.versionStartDate }
</if> </if>
@@ -45,7 +45,7 @@
FROM cs_dev_model a FROM cs_dev_model a
LEFT JOIN sys_dict_data b ON a.dev_type = b.id LEFT JOIN sys_dict_data b ON a.dev_type = b.id
WHERE WHERE
1 = 1 1 = 1 And a.`status`='1'
<if test="csDevModelQueryListParm.versionStartDate != null and csDevModelQueryListParm.versionStartDate != ''"> <if test="csDevModelQueryListParm.versionStartDate != null and csDevModelQueryListParm.versionStartDate != ''">
AND a.version_date &gt;= #{csDevModelQueryListParm.versionStartDate } AND a.version_date &gt;= #{csDevModelQueryListParm.versionStartDate }
</if> </if>

View File

@@ -29,7 +29,7 @@
FROM cs_ed_data a FROM cs_ed_data a
LEFT JOIN sys_dict_data b ON a.dev_type = b.id LEFT JOIN sys_dict_data b ON a.dev_type = b.id
WHERE WHERE
1 = 1 1 = 1 And a.`status`='1'
<if test="csEdDataQueryParm.versionStartDate != null and csEdDataQueryParm.versionStartDate != ''"> <if test="csEdDataQueryParm.versionStartDate != null and csEdDataQueryParm.versionStartDate != ''">
AND a.version_date &gt;= #{csEdDataQueryParm.versionStartDate } AND a.version_date &gt;= #{csEdDataQueryParm.versionStartDate }
</if> </if>

View File

@@ -1,7 +1,14 @@
package com.njcn.algorithm.service; package com.njcn.algorithm.service;
import com.njcn.algorithm.pojo.param.CsEngineeringAddParm;
import com.njcn.algorithm.pojo.param.CsEngineeringAuditParm;
import com.njcn.algorithm.pojo.param.CsEngineeringQueryParm;
import com.njcn.algorithm.pojo.po.CsEngineeringPO; import com.njcn.algorithm.pojo.po.CsEngineeringPO;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.njcn.algorithm.pojo.vo.CsEngineeringVO;
import java.util.List;
/** /**
* *
* Description: * Description:
@@ -13,5 +20,22 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/ */
public interface CsEngineeringService extends IService<CsEngineeringPO>{ public interface CsEngineeringService extends IService<CsEngineeringPO>{
/**
* @Description: 新增工程
* @Param: [csEngineeringAddParm]
* @return: java.lang.Boolean
* @Author: clam
* @Date: 2023/4/10
*/
Boolean addEngineering(CsEngineeringAddParm csEngineeringAddParm);
Boolean auditEngineering(CsEngineeringAuditParm csEngineeringAuditParm);
/**
* @Description: 查询工程
* @Param: [csEngineeringQueryParm]
* @return: java.util.List<com.njcn.algorithm.pojo.vo.CsEngineeringVO>
* @Author: clam
* @Date: 2023/4/10
*/
List<CsEngineeringVO> queryEngineering(CsEngineeringQueryParm csEngineeringQueryParm);
} }

View File

@@ -1,10 +1,23 @@
package com.njcn.algorithm.service.impl; package com.njcn.algorithm.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.njcn.algorithm.mapper.CsEngineeringMapper; import com.njcn.algorithm.mapper.CsEngineeringMapper;
import com.njcn.algorithm.pojo.param.CsEngineeringAddParm;
import com.njcn.algorithm.pojo.param.CsEngineeringAuditParm;
import com.njcn.algorithm.pojo.param.CsEngineeringQueryParm;
import com.njcn.algorithm.pojo.po.CsEngineeringPO; import com.njcn.algorithm.pojo.po.CsEngineeringPO;
import com.njcn.algorithm.pojo.vo.CsEngineeringVO;
import com.njcn.algorithm.service.CsEngineeringService; import com.njcn.algorithm.service.CsEngineeringService;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
/** /**
* *
* Description: * Description:
@@ -17,4 +30,41 @@ import org.springframework.stereotype.Service;
@Service @Service
public class CsEngineeringServiceImpl extends ServiceImpl<CsEngineeringMapper, CsEngineeringPO> implements CsEngineeringService{ public class CsEngineeringServiceImpl extends ServiceImpl<CsEngineeringMapper, CsEngineeringPO> implements CsEngineeringService{
@Override
@Transactional(rollbackFor = {Exception.class})
public Boolean addEngineering(CsEngineeringAddParm csEngineeringAddParm) {
CsEngineeringPO csEngineeringPO = new CsEngineeringPO ();
BeanUtils.copyProperties (csEngineeringAddParm, csEngineeringPO);
csEngineeringPO.setStatus ("1");
boolean save = this.save (csEngineeringPO);
return save;
}
@Override
@Transactional(rollbackFor = {Exception.class})
public Boolean auditEngineering(CsEngineeringAuditParm csEngineeringAuditParm) {
CsEngineeringPO csEngineeringPO = new CsEngineeringPO ();
BeanUtils.copyProperties (csEngineeringAuditParm, csEngineeringPO);
boolean b = this.updateById (csEngineeringPO);
return b;
}
@Override
public List<CsEngineeringVO> queryEngineering(CsEngineeringQueryParm csEngineeringQueryParm) {
List<CsEngineeringVO> csEngineeringVOList = new ArrayList<> ();
QueryWrapper<CsEngineeringPO> queryWrapper = new QueryWrapper<> ();
queryWrapper.eq (StringUtils.isNotBlank (csEngineeringQueryParm.getUserId ()),"user_id",csEngineeringQueryParm.getUserId ()).
eq (StringUtils.isNotBlank (csEngineeringQueryParm.getProvince ()),"province",csEngineeringQueryParm.getProvince ()).
eq (StringUtils.isNotBlank (csEngineeringQueryParm.getCity ()),"city",csEngineeringQueryParm.getCity ()).
eq ("status","1" ).
like (StringUtils.isNotBlank (csEngineeringQueryParm.getName ()),"name",csEngineeringQueryParm.getName ());
List<CsEngineeringPO> csEngineeringPOS = this.getBaseMapper ( ).selectList (queryWrapper);
csEngineeringVOList = csEngineeringPOS.stream ().map (temp->{
CsEngineeringVO vo = new CsEngineeringVO();
BeanUtils.copyProperties (temp, vo);
return vo;
}).collect(Collectors.toList());
return csEngineeringVOList;
}
} }

View File

@@ -16,6 +16,7 @@ import com.njcn.algorithm.service.CsEquipmentDeliveryService;
import com.njcn.common.pojo.exception.BusinessException; import com.njcn.common.pojo.exception.BusinessException;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Objects; import java.util.Objects;
@@ -32,6 +33,7 @@ import java.util.Objects;
public class CsEquipmentDeliveryServiceImpl extends ServiceImpl<CsEquipmentDeliveryMapper, CsEquipmentDeliveryPO> implements CsEquipmentDeliveryService{ public class CsEquipmentDeliveryServiceImpl extends ServiceImpl<CsEquipmentDeliveryMapper, CsEquipmentDeliveryPO> implements CsEquipmentDeliveryService{
@Override @Override
@Transactional(rollbackFor = {Exception.class})
public Boolean save(CsEquipmentDeliveryAddParm csEquipmentDeliveryAddParm) { public Boolean save(CsEquipmentDeliveryAddParm csEquipmentDeliveryAddParm) {
CsEquipmentDeliveryPO po = this.queryEquipmentPOByndid (csEquipmentDeliveryAddParm.getNdid ( )); CsEquipmentDeliveryPO po = this.queryEquipmentPOByndid (csEquipmentDeliveryAddParm.getNdid ( ));
if(!Objects.isNull (po)){ if(!Objects.isNull (po)){
@@ -46,6 +48,7 @@ public class CsEquipmentDeliveryServiceImpl extends ServiceImpl<CsEquipmentDeliv
} }
@Override @Override
@Transactional(rollbackFor = {Exception.class})
public Boolean AuditEquipmentDelivery(String id) { public Boolean AuditEquipmentDelivery(String id) {
UpdateWrapper<CsEquipmentDeliveryPO> wrapper = new UpdateWrapper(); UpdateWrapper<CsEquipmentDeliveryPO> wrapper = new UpdateWrapper();
wrapper.eq ("id", id); wrapper.eq ("id", id);

View File

@@ -35,6 +35,7 @@ public class CsFeedbackChatServiceImpl extends ServiceImpl<CsFeedbackChatMapper,
} }
@Override @Override
@Transactional(rollbackFor = {Exception.class})
public Boolean updateChatStatus(CsFeedbackChatCheckParm csFeedbackChatCheckParm) { public Boolean updateChatStatus(CsFeedbackChatCheckParm csFeedbackChatCheckParm) {
UpdateWrapper<CsFeedbackChatPO> updateWrapper = new UpdateWrapper<> (); UpdateWrapper<CsFeedbackChatPO> updateWrapper = new UpdateWrapper<> ();

View File

@@ -52,7 +52,7 @@ public class CsFeedbackServiceImpl extends ServiceImpl<CsFeedbackMapper, CsFeedb
csFeedbackPO.setStatus ("1"); csFeedbackPO.setStatus ("1");
boolean save = this.save (csFeedbackPO); boolean save = this.save (csFeedbackPO);
boolean flag= true; boolean flag= true;
if(Objects.isNull (csFeedbackAddParm.getFiles ( ))){ if(!Objects.isNull (csFeedbackAddParm.getFiles ( ))){
List<CsFilePathPO> csFilePathPOS= new ArrayList<> (); List<CsFilePathPO> csFilePathPOS= new ArrayList<> ();
for (int i = 0; i < csFeedbackAddParm.getFiles ( ).length; i++) { for (int i = 0; i < csFeedbackAddParm.getFiles ( ).length; i++) {
@@ -90,7 +90,7 @@ public class CsFeedbackServiceImpl extends ServiceImpl<CsFeedbackMapper, CsFeedb
ne ("user_id",temp.getUserId ()). ne ("user_id",temp.getUserId ()).
eq ("chat_status","0"). eq ("chat_status","0").
eq ("status", "1"); eq ("status", "1");
int count = csFeedbackChatService.count ( ); int count = csFeedbackChatService.count (csFeedbackChatPOQueryWrapper );
csFeedbackVO.setChatCount (count); csFeedbackVO.setChatCount (count);
return csFeedbackVO; return csFeedbackVO;
}).collect (Collectors.toList ( )); }).collect (Collectors.toList ( ));