diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/app/controller/IwsProjectController.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/app/controller/IwsProjectController.java new file mode 100644 index 00000000..93d5cd1f --- /dev/null +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/app/controller/IwsProjectController.java @@ -0,0 +1,55 @@ +package com.bonus.material.app.controller; + +import com.bonus.common.core.web.controller.BaseController; +import com.bonus.common.core.web.domain.AjaxResult; +import com.bonus.common.log.annotation.SysLog; +import com.bonus.common.log.enums.BusinessType; +import com.bonus.material.app.domain.IwsProjectBean; +import com.bonus.material.app.domain.IwsProjectVo; +import com.bonus.material.app.service.IwsProjectService; +import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.util.CollectionUtils; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import javax.validation.constraints.NotBlank; +import java.util.Collections; +import java.util.List; +import java.util.Objects; + +/** + * @author : 阮世耀 + * @version : 1.0 + * @PackagePath: com.bonus.material.app.controller + * @CreateTime: 2025-06-11 16:39 + * @Description: i皖送分公司工程信息控制器 + */ +@RestController +@RequestMapping("/app/iwsProject") +@Tag(name = "i皖送分公司工程信息控制器") +@Validated +public class IwsProjectController extends BaseController { + + @Resource + private IwsProjectService iwsProjectService; + + @GetMapping("/selectIwsProjectVoByProjectId") + @Operation(summary = "根据工程ID获取工程信息", description = "根据工程id查询工程信息") + public AjaxResult selectIwsProjectVoByProjectId(@RequestParam(value = "projectId") @NotBlank(message = "工程ID不能为空") String projectId){ + IwsProjectBean iwsProjectBean = iwsProjectService.selectIwsProjectVoByProjectId(projectId); + return Objects.nonNull(iwsProjectBean) ? success(iwsProjectBean) : warn("未查询到信息"); + } + + @GetMapping("/selectIwsAuditConfigPersonByOrgCode") + @Operation(summary = "根据分公司编码查询审核人员配置", description = "根据分公司编码查询审核人员配置") + public AjaxResult selectIwsAuditConfigPersonByOrgCode(@RequestParam(value = "orgCode") @NotBlank(message = "分公司编码不能为空") String orgCode){ + List configList = iwsProjectService.selectIwsAuditConfigPersonByOrgCode(orgCode); + return !CollectionUtils.isEmpty(configList) ? success(configList) : warn("配置信息为空"); + } +} diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/app/controller/IwsTeamUserController.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/app/controller/IwsTeamUserController.java index 1482224d..29e33525 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/app/controller/IwsTeamUserController.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/app/controller/IwsTeamUserController.java @@ -2,6 +2,7 @@ package com.bonus.material.app.controller; import com.bonus.common.core.web.domain.AjaxResult; import com.bonus.material.app.service.IwsTeamUserService; +import io.swagger.annotations.ApiModelProperty; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -13,7 +14,7 @@ import javax.annotation.Resource; * @version : 1.0 * @PackagePath: com.bonus.material.app.controller * @CreateTime: 2025-06-10 15:23 - * @Description: 描述 + * @Description: i皖送查询班组信息接口 */ @RestController @RequestMapping("/app/iwsTeamUser") @@ -22,6 +23,7 @@ public class IwsTeamUserController { @Resource private IwsTeamUserService iwsTeamUserService; + @ApiModelProperty(value = "根据用户名查询班组信息", notes = "根据用户名查询班组信息") @GetMapping("/selectUserInfoByUserName") public AjaxResult selectUserInfoByUserName(String userName) { if (userName == null || userName.isEmpty()) { @@ -30,6 +32,7 @@ public class IwsTeamUserController { return AjaxResult.success(iwsTeamUserService.selectUserInfoByUserName(userName)); } + @ApiModelProperty(value = "根据身份证号码查询班组信息", notes = "根据身份证号码查询班组信息") @GetMapping("/selectProjectTeamInfoByIdCard") public AjaxResult selectProjectTeamInfoByIdCard(String idCard, String projectIds) { if (idCard == null || idCard.isEmpty()) { diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/app/domain/IwsProjectBean.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/app/domain/IwsProjectBean.java new file mode 100644 index 00000000..a6c3b11a --- /dev/null +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/app/domain/IwsProjectBean.java @@ -0,0 +1,49 @@ +package com.bonus.material.app.domain; + +import lombok.Data; + +/** + * @author : 阮世耀 + * @version : 1.0 + * @PackagePath: com.bonus.material.app.domain + * @CreateTime: 2025-06-11 15:51 + * @Description: i皖送分公司工程信息 + */ +@Data +public class IwsProjectBean { + + /** + * 工程id + */ + private String projectId; + + /** + * 工程编码 + */ + private String projectNo; + + /** + * 工程名称 + */ + private String projectName; + + /** + * 工程状态 + */ + private String projectStatus; + + /** + * 分公司id + */ + private String orgId; + + /** + * 分公司编码 + */ + private String orgCode; + + /** + * 分公司名称 + */ + private String orgName; +} diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/app/domain/IwsProjectVo.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/app/domain/IwsProjectVo.java new file mode 100644 index 00000000..982f6100 --- /dev/null +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/app/domain/IwsProjectVo.java @@ -0,0 +1,24 @@ +package com.bonus.material.app.domain; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * @author : 阮世耀 + * @version : 1.0 + * @PackagePath: com.bonus.material.app.domain + * @CreateTime: 2025-06-11 16:28 + * @Description: i皖送工程审批人员VO + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class IwsProjectVo extends IwsUserBean{ + + private String id; + + private String orgCode; +} diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/app/domain/IwsTeamUserVo.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/app/domain/IwsTeamUserVo.java index d59ad92a..faa6a582 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/app/domain/IwsTeamUserVo.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/app/domain/IwsTeamUserVo.java @@ -1,6 +1,9 @@ package com.bonus.material.app.domain; +import lombok.AllArgsConstructor; import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; /** * @author : 阮世耀 @@ -10,7 +13,10 @@ import lombok.Data; * @Description: 班组人员信息vo---i皖送平台 */ @Data -public class IwsTeamUserVo { +@NoArgsConstructor +@AllArgsConstructor +@EqualsAndHashCode(callSuper = true) // 继承父类字段 +public class IwsTeamUserVo extends IwsUserBean{ /** * 主键 @@ -47,31 +53,6 @@ public class IwsTeamUserVo { */ private String projectName; - /** - * 用户id - */ - private String userId; - - /** - * 用户手机号 - */ - private String userPhone; - - /** - * 真实姓名 - */ - private String name; - - /** - * i皖送登陆用户名 - */ - private String userName; - - /** - * 身份证号码 - */ - private String idCard; - /** * 备注 */ diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/app/domain/IwsUserBean.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/app/domain/IwsUserBean.java new file mode 100644 index 00000000..4738777a --- /dev/null +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/app/domain/IwsUserBean.java @@ -0,0 +1,49 @@ +package com.bonus.material.app.domain; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @author : 阮世耀 + * @version : 1.0 + * @PackagePath: com.bonus.material.app.domain + * @CreateTime: 2025-06-11 16:16 + * @Description: i皖送人员基础pojo + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class IwsUserBean { + + /** + * i皖送登陆用户名 + */ + private String userName; + + /** + * 人员真实姓名 + */ + private String name; + + /** + * 人员身份证号码 + */ + private String idCard; + + /** + * 人员id + */ + private String userId; + + /** + * 人员手机号 + */ + private String userPhone; + + /** + * 人员角色名称 + */ + private String roleName; + +} diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/app/mapper/IwsProjectMapper.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/app/mapper/IwsProjectMapper.java new file mode 100644 index 00000000..6ae84881 --- /dev/null +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/app/mapper/IwsProjectMapper.java @@ -0,0 +1,34 @@ +package com.bonus.material.app.mapper; + +import com.bonus.material.app.domain.IwsProjectBean; +import com.bonus.material.app.domain.IwsProjectVo; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * @author : 阮世耀 + * @version : 1.0 + * @PackagePath: com.bonus.material.app.mapper + * @CreateTime: 2025-06-11 15:54 + * @Description: i皖送工程Dao层 + */ +@Mapper +public interface IwsProjectMapper { + + /** + * 根据工程id查询工程信息及所属分公司 + * @param projectId 工程id(示例:8f2e5317231949be98a3ec21967645a9) + * @return 工程信息、所属分公司 + */ + IwsProjectBean selectIwsProjectVoByProjectId(@Param("projectId") String projectId); + + /** + * 根据分公司code查询审核人员配置信息 + * @param orgCode 分公司code(示例:503190604000001) + * @return 审核配置人员角色 + */ + List selectIwsAuditConfigPersonByOrgCode(@Param("orgCode") String orgCode); + +} diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/app/service/IwsProjectService.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/app/service/IwsProjectService.java new file mode 100644 index 00000000..244b57bc --- /dev/null +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/app/service/IwsProjectService.java @@ -0,0 +1,31 @@ +package com.bonus.material.app.service; + +import com.bonus.material.app.domain.IwsProjectBean; +import com.bonus.material.app.domain.IwsProjectVo; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * @author : 阮世耀 + * @version : 1.0 + * @PackagePath: com.bonus.material.app.service + * @CreateTime: 2025-06-11 16:37 + * @Description: i皖送工程Service层 + */ +public interface IwsProjectService { + + /** + * 根据工程id查询工程信息及所属分公司 + * @param projectId 工程id(示例:8f2e5317231949be98a3ec21967645a9) + * @return 工程信息、所属分公司 + */ + IwsProjectBean selectIwsProjectVoByProjectId(@Param("projectId") String projectId); + + /** + * 根据分公司code查询审核人员配置信息 + * @param orgCode 分公司code(示例:503190604000001) + * @return 审核配置人员角色 + */ + List selectIwsAuditConfigPersonByOrgCode(@Param("orgCode") String orgCode); +} diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/app/service/impl/IwsProjectServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/app/service/impl/IwsProjectServiceImpl.java new file mode 100644 index 00000000..8c864e9a --- /dev/null +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/app/service/impl/IwsProjectServiceImpl.java @@ -0,0 +1,47 @@ +package com.bonus.material.app.service.impl; + +import com.bonus.material.app.domain.IwsProjectBean; +import com.bonus.material.app.domain.IwsProjectVo; +import com.bonus.material.app.mapper.IwsProjectMapper; +import com.bonus.material.app.service.IwsProjectService; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; + +/** + * @author : 阮世耀 + * @version : 1.0 + * @PackagePath: com.bonus.material.app.service.impl + * @CreateTime: 2025-06-11 16:37 + * @Description: i皖送工程服务类 + */ +@Service +public class IwsProjectServiceImpl implements IwsProjectService { + + @Resource + private IwsProjectMapper iwsProjectMapper; + + + /** + * 根据工程id查询工程信息及所属分公司 + * + * @param projectId 工程id(示例:8f2e5317231949be98a3ec21967645a9) + * @return 工程信息、所属分公司 + */ + @Override + public IwsProjectBean selectIwsProjectVoByProjectId(String projectId) { + return iwsProjectMapper.selectIwsProjectVoByProjectId(projectId); + } + + /** + * 根据分公司code查询审核人员配置信息 + * + * @param orgCode 分公司code(示例:503190604000001) + * @return 审核配置人员角色 + */ + @Override + public List selectIwsAuditConfigPersonByOrgCode(String orgCode) { + return iwsProjectMapper.selectIwsAuditConfigPersonByOrgCode(orgCode); + } +} diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/app/IwsProjectMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/app/IwsProjectMapper.xml new file mode 100644 index 00000000..40f56d93 --- /dev/null +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/app/IwsProjectMapper.xml @@ -0,0 +1,39 @@ + + + + + + + + + + \ No newline at end of file