Browse Source

1、工单详情接口补充是否被收藏标识

master
Aug 3 months ago
parent
commit
6c64d293fb
4 changed files with 27 additions and 19 deletions
  1. +4
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/workorderTemplate/entity/WorkorderTemplate.java
  2. +3
    -2
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/workorderController/TemplateController.java
  3. +1
    -1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiService/TemplateService.java
  4. +19
    -16
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiService/impl/TemplateServiceImpl.java

+ 4
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/workorderTemplate/entity/WorkorderTemplate.java View File

@ -86,6 +86,10 @@ public class WorkorderTemplate implements Serializable {
@ApiModelProperty(value = "关联状态id")
private java.lang.String statusId;
//工单是否被收藏标识
@TableField(exist = false)
private boolean collectonFlag;
//工单状态描述
@TableField(exist = false)
private java.lang.String statusDescribe;


+ 3
- 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/workorderController/TemplateController.java View File

@ -22,6 +22,7 @@ import org.jeecg.modules.workorderStepone.entity.WorkorderStepone;
import org.jeecg.modules.workorderStepthree.entity.WorkorderStepthree;
import org.jeecg.modules.workorderSteptwo.entity.WorkorderSteptwo;
import org.jeecg.modules.workorderTemplate.entity.WorkorderTemplate;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
@ -49,8 +50,8 @@ public class TemplateController {
@ApiOperation(value="工单信息-根据id查询工单详情", notes="工单信息-根据id查询工单详情")
@RequestMapping(value = "/queryTemplateById", method = {RequestMethod.GET})
public Result<?> queryTemplateById(String templateId){
return templateService.queryTemplateById(templateId);
public Result<?> queryTemplateById(@RequestHeader("X-Access-Token") String userId, String templateId){
return templateService.queryTemplateById(userId, templateId);
}
@ApiOperation(value="工单信息-修改工单", notes="工单信息-修改工单")


+ 1
- 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiService/TemplateService.java View File

@ -31,7 +31,7 @@ public interface TemplateService {
* @param templateId
* @return
*/
public Result<?> queryTemplateById(String templateId);
public Result<?> queryTemplateById(String userId, String templateId);
/**
* 工单信息-修改工单


+ 19
- 16
jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiService/impl/TemplateServiceImpl.java View File

@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.apiBean.*;
import org.jeecg.modules.apiService.TemplateService;
import org.jeecg.modules.workorderCollection.entity.WorkorderCollection;
import org.jeecg.modules.workorderCollection.service.IWorkorderCollectionService;
import org.jeecg.modules.workorderGeneralStepfour.entity.WorkorderGeneralStepfour;
import org.jeecg.modules.workorderGeneralStepfour.service.IWorkorderGeneralStepfourService;
import org.jeecg.modules.workorderGeneralStepone.entity.WorkorderGeneralStepone;
@ -48,6 +50,10 @@ import java.util.List;
@Service
public class TemplateServiceImpl implements TemplateService {
//收藏信息
@Resource
private IWorkorderCollectionService workorderCollectionService;
//工单状态
@Resource
private IWorkorderStatusService workorderStatusService;
@ -88,21 +94,6 @@ public class TemplateServiceImpl implements TemplateService {
@Resource
private IWorkorderParamStepfourService workorderParamStepfourService;
//工序卡1
@Resource
private IWorkorderSteponeService workorderSteponeService;
//工序卡2
@Resource
private IWorkorderSteptwoService workorderSteptwoService;
//工序卡3
@Resource
private IWorkorderStepthreeService workorderStepthreeService;
//工序卡4
@Resource
private IWorkorderStepfourService workorderStepfourService;
/*************************************************************************************/
//工单信息-查询工单列表
@ -356,7 +347,7 @@ public class TemplateServiceImpl implements TemplateService {
/*********************************************************************************************************/
//工单信息-查询工单详情
@Override
public Result<?> queryTemplateById(String templateId){
public Result<?> queryTemplateById(String userId, String templateId){
//查询工单信息
WorkorderTemplate workorderTemplate = workorderTemplateService
@ -364,6 +355,18 @@ public class TemplateServiceImpl implements TemplateService {
.eq(WorkorderTemplate::getId, templateId)
.one();
//查看工单是否被收藏
WorkorderCollection collection = workorderCollectionService
.lambdaQuery()
.eq(WorkorderCollection::getUserId, userId)
.eq(WorkorderCollection::getTemplateId, templateId)
.one();
if(null != collection){
workorderTemplate.setCollectonFlag(true);
}else {
workorderTemplate.setCollectonFlag(false);
}
//查询工序卡信息
List<WorkorderStep> stepList = workorderStepService
.lambdaQuery()


Loading…
Cancel
Save