Browse Source

服务项目详情

feature/teamB_zz_wgh
zxc 3 years ago
parent
commit
600097ae28
  1. 6
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectListFormDTO.java
  2. 13
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectController.java
  3. 9
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceProjectService.java
  4. 15
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceProjectServiceImpl.java
  5. 7
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceProjectDao.xml

6
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectListFormDTO.java

@ -3,6 +3,7 @@ package com.epmet.dto.form;
import com.epmet.commons.tools.dto.form.PageFormDTO; import com.epmet.commons.tools.dto.form.PageFormDTO;
import lombok.Data; import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable; import java.io.Serializable;
/** /**
@ -15,6 +16,8 @@ public class ServiceProjectListFormDTO extends PageFormDTO implements Serializab
private static final long serialVersionUID = -6508966695564469253L; private static final long serialVersionUID = -6508966695564469253L;
public interface ServiceProjectDetail{}
private String serviceCategoryKey; private String serviceCategoryKey;
private String serviceName; private String serviceName;
private String serviceContent; private String serviceContent;
@ -23,4 +26,7 @@ public class ServiceProjectListFormDTO extends PageFormDTO implements Serializab
private String userId; private String userId;
private String agencyId; private String agencyId;
@NotBlank(message = "serviceProjectId不能为空",groups = ServiceProjectDetail.class)
private String serviceProjectId;
} }

13
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectController.java

@ -15,6 +15,7 @@ import com.epmet.dto.form.IcServiceEditFormDTO;
import com.epmet.dto.form.ServiceProjectFormDTO; import com.epmet.dto.form.ServiceProjectFormDTO;
import com.epmet.dto.form.ServiceProjectListFormDTO; import com.epmet.dto.form.ServiceProjectListFormDTO;
import com.epmet.dto.result.IcServiceRecDetailRes; import com.epmet.dto.result.IcServiceRecDetailRes;
import com.epmet.dto.result.ServiceProjectListResultDTO;
import com.epmet.service.IcServiceProjectService; import com.epmet.service.IcServiceProjectService;
import com.epmet.service.IcServiceRecordService; import com.epmet.service.IcServiceRecordService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -107,6 +108,18 @@ public class IcServiceProjectController {
return new Result<PageData>().ok(icServiceProjectService.serviceProjectList(formDTO)); return new Result<PageData>().ok(icServiceProjectService.serviceProjectList(formDTO));
} }
/**
* Desc: 服务项目详情
* @param formDTO
* @author zxc
* @date 2022/5/30 15:46
*/
@PostMapping("serviceProjectDetail")
public Result<ServiceProjectListResultDTO> serviceProjectDetail(@RequestBody ServiceProjectListFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO, ServiceProjectListFormDTO.ServiceProjectDetail.class);
return new Result<ServiceProjectListResultDTO>().ok(icServiceProjectService.serviceProjectDetail(formDTO));
}
/** /**
* Desc: 修改服务项目 * Desc: 修改服务项目
* @param formDTO * @param formDTO

9
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceProjectService.java

@ -5,6 +5,7 @@ import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.IcServiceProjectDTO; import com.epmet.dto.IcServiceProjectDTO;
import com.epmet.dto.form.ServiceProjectFormDTO; import com.epmet.dto.form.ServiceProjectFormDTO;
import com.epmet.dto.form.ServiceProjectListFormDTO; import com.epmet.dto.form.ServiceProjectListFormDTO;
import com.epmet.dto.result.ServiceProjectListResultDTO;
import com.epmet.entity.IcServiceProjectEntity; import com.epmet.entity.IcServiceProjectEntity;
import java.util.List; import java.util.List;
@ -94,6 +95,14 @@ public interface IcServiceProjectService extends BaseService<IcServiceProjectEnt
*/ */
PageData serviceProjectList(ServiceProjectListFormDTO formDTO); PageData serviceProjectList(ServiceProjectListFormDTO formDTO);
/**
* Desc: 服务项目详情
* @param formDTO
* @author zxc
* @date 2022/5/30 15:46
*/
ServiceProjectListResultDTO serviceProjectDetail(ServiceProjectListFormDTO formDTO);
/** /**
* Desc: 修改服务项目 * Desc: 修改服务项目
* @param formDTO * @param formDTO

15
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceProjectServiceImpl.java

@ -168,6 +168,21 @@ public class IcServiceProjectServiceImpl extends BaseServiceImpl<IcServiceProjec
return result; return result;
} }
/**
* Desc: 服务项目详情
* @param formDTO
* @author zxc
* @date 2022/5/30 15:46
*/
@Override
public ServiceProjectListResultDTO serviceProjectDetail(ServiceProjectListFormDTO formDTO) {
List<ServiceProjectListResultDTO> serviceProjectList = baseDao.getServiceProjectList(formDTO);
if (CollectionUtils.isNotEmpty(serviceProjectList)){
return serviceProjectList.get(NumConstant.ZERO);
}
return new ServiceProjectListResultDTO();
}
/** /**
* Desc: 修改服务项目 * Desc: 修改服务项目
* @param formDTO * @param formDTO

7
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceProjectDao.xml

@ -37,7 +37,12 @@
FROM ic_service_project FROM ic_service_project
WHERE DEL_FLAG = 0 WHERE DEL_FLAG = 0
AND ENABLED = 0 AND ENABLED = 0
AND AGENCY_ID = #{agencyId} <if test='null != serviceProjectId and serviceProjectId != "" '>
AND ID = #{serviceProjectId}
</if>
<if test='null != agencyId and agencyId != "" '>
AND AGENCY_ID = #{agencyId}
</if>
<if test='null != serviceCategoryKey and serviceCategoryKey != "" '> <if test='null != serviceCategoryKey and serviceCategoryKey != "" '>
AND SERVICE_CATEGORY_KEY = #{serviceCategoryKey} AND SERVICE_CATEGORY_KEY = #{serviceCategoryKey}
</if> </if>

Loading…
Cancel
Save