37 changed files with 1577 additions and 0 deletions
@ -0,0 +1,90 @@ |
|||||
|
package com.yxt.anrui.oa.api; |
||||
|
|
||||
|
import com.yxt.anrui.oa.biz.adcompanyapply.*; |
||||
|
import com.yxt.anrui.oa.biz.oaform.flowable.CompleteDto; |
||||
|
import com.yxt.anrui.oa.biz.oaform.flowable.NodeQuery; |
||||
|
import com.yxt.anrui.oa.biz.oaform.flowable.TaskDto; |
||||
|
import com.yxt.common.core.query.PagerQuery; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.common.core.vo.PagerVo; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.cloud.openfeign.SpringQueryMap; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import javax.validation.Valid; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2025/2/18 15:44 |
||||
|
*/ |
||||
|
@Api(tags = "公司审批主表") |
||||
|
@RestController |
||||
|
@RequestMapping("v1/adcompanyapply") |
||||
|
public class AdCompanyApplyRest { |
||||
|
@Autowired |
||||
|
AdCompanyApplyService adCompanyApplyService; |
||||
|
@ApiOperation("根据条件分页查询数据的列表") |
||||
|
@PostMapping("/listPage") |
||||
|
public ResultBean<PagerVo<AdCompanyApplyVo>> listPage(@RequestBody PagerQuery<AdCompanyApplyQuery> pq) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
PagerVo<AdCompanyApplyVo> pv = adCompanyApplyService.listPageVo(pq); |
||||
|
return rb.success().setData(pv); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation("新增或修改") |
||||
|
@PostMapping("/save") |
||||
|
public ResultBean<String> saveOrUpdate(@RequestBody AdCompanyApplyDto dto) { |
||||
|
return adCompanyApplyService.saveOrUpdateDto(dto); |
||||
|
} |
||||
|
@ApiOperation("初始化(新增或修改)") |
||||
|
@GetMapping({"/getInit", "/getInit/{sid}"}) |
||||
|
public ResultBean<AdCompanyApplyVo> getInit( |
||||
|
@PathVariable(value = "sid", required = false) String sid, |
||||
|
@RequestParam(value = "userSid", required = false) String userSid, |
||||
|
@RequestParam(value = "orgPath", required = false) String orgPath) { |
||||
|
ResultBean<AdCompanyApplyVo> rb = ResultBean.fireFail(); |
||||
|
if (sid == null || sid.isEmpty()) { |
||||
|
// 执行新增初始化
|
||||
|
if (userSid == null || orgPath == null) { |
||||
|
return rb.setMsg("userSid和orgPath不能为空"); |
||||
|
} |
||||
|
return adCompanyApplyService.getSaveInit(userSid, orgPath); |
||||
|
} else { |
||||
|
// 执行修改初始化
|
||||
|
return adCompanyApplyService.getUpdateInit(sid); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@ApiOperation("详情") |
||||
|
@GetMapping("/details/{sid}") |
||||
|
ResultBean<AdCompanyApplyDetailVo> details(@PathVariable("sid") String sid |
||||
|
, @RequestParam(value = "application", required = false) String application) { |
||||
|
return adCompanyApplyService.details(sid,application); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation("提交审批流程") |
||||
|
@PostMapping("/submit") |
||||
|
public ResultBean submit(@RequestBody AdCompanyApplyDto dto) { |
||||
|
return adCompanyApplyService.submit(dto); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation(value = "驳回任务") |
||||
|
@PutMapping(value = "/reject") |
||||
|
public ResultBean reject(@Valid @RequestBody TaskDto dto) { |
||||
|
return adCompanyApplyService.reject(dto); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation(value = "办理(同意)") |
||||
|
@PutMapping("/complete") |
||||
|
public ResultBean complete(@Valid @RequestBody CompleteDto dto) { |
||||
|
return adCompanyApplyService.complete(dto); |
||||
|
} |
||||
|
@ApiOperation("获取流程操作标题") |
||||
|
@GetMapping("/getFlowOperateTitle") |
||||
|
@ResponseBody |
||||
|
ResultBean<String> getFlowOperateTitle(@SpringQueryMap NodeQuery query) { |
||||
|
return adCompanyApplyService.getFlowOperateTitle(query); |
||||
|
} |
||||
|
} |
@ -0,0 +1,31 @@ |
|||||
|
package com.yxt.anrui.oa.biz.adcompanyapply; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.yxt.common.core.domain.BaseEntity; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2025/2/7 15:30 |
||||
|
*/ |
||||
|
@Data |
||||
|
@ApiModel(value = "集团制度会签审批", description = "集团制度会签审批") |
||||
|
@TableName("ad_group_system_apply") |
||||
|
public class AdCompanyApply extends BaseEntity { |
||||
|
@ApiModelProperty("经办人") |
||||
|
private String operator; |
||||
|
@ApiModelProperty("申请类别key") |
||||
|
private String applyTypeKey; |
||||
|
@ApiModelProperty("value") |
||||
|
private String applyTypeValue; |
||||
|
@ApiModelProperty("是否需要个人配合签字key 0否 1是") |
||||
|
private String isSignKey; |
||||
|
@ApiModelProperty("是否需要个人配合签字") |
||||
|
private String isSignValue; |
||||
|
@ApiModelProperty("关联审批sid列表,英文逗号分隔") |
||||
|
private String linkFormSids; |
||||
|
@ApiModelProperty("基础表单sid") |
||||
|
private String formSid; |
||||
|
} |
@ -0,0 +1,51 @@ |
|||||
|
package com.yxt.anrui.oa.biz.adcompanyapply; |
||||
|
|
||||
|
import com.yxt.anrui.oa.biz.adcompanychangedetail.AdCompanyChangeListDetailVo; |
||||
|
import com.yxt.anrui.oa.biz.adcompanylogoffdetail.AdCompanyLogoffListDetailVo; |
||||
|
import com.yxt.anrui.oa.biz.adcompanyregistrationdetail.AdCompanyRegistrationListDetailVo; |
||||
|
import com.yxt.anrui.oa.biz.adcompanytransferdetail.AdCompanyTransferListDetailVo; |
||||
|
import com.yxt.anrui.oa.biz.hrhiredetails.HrHireListDetailVo; |
||||
|
import com.yxt.anrui.oa.biz.oaform.FormCommon; |
||||
|
import com.yxt.anrui.oa.biz.oaform.OaFormCommonVo; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2025/1/21 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class AdCompanyApplyDetailVo extends OaFormCommonVo { |
||||
|
|
||||
|
private String sid; |
||||
|
@ApiModelProperty("经办人") |
||||
|
private String operator; |
||||
|
@ApiModelProperty("申请类别key") |
||||
|
private String applyTypeKey; |
||||
|
@ApiModelProperty("value") |
||||
|
private String applyTypeValue; |
||||
|
private FormCommon applyType; |
||||
|
@ApiModelProperty("是否需要个人配合签字key 0否 1是") |
||||
|
private String isSignKey; |
||||
|
@ApiModelProperty("是否需要个人配合签字") |
||||
|
private String isSignValue; |
||||
|
@ApiModelProperty("关联审批sid列表,英文逗号分隔") |
||||
|
private String linkFormSids; |
||||
|
@ApiModelProperty("基础表单sid") |
||||
|
private String formSid; |
||||
|
@ApiModelProperty("图片") |
||||
|
private List<String> files = new ArrayList<>(); |
||||
|
@ApiModelProperty("附件") |
||||
|
private List<String> appes = new ArrayList<>(); |
||||
|
|
||||
|
private List<AdCompanyRegistrationListDetailVo> regisList = new ArrayList<>(); |
||||
|
private List<AdCompanyChangeListDetailVo> changeList = new ArrayList<>(); |
||||
|
private List<AdCompanyLogoffListDetailVo> logoffList = new ArrayList<>(); |
||||
|
private List<AdCompanyTransferListDetailVo> transferList = new ArrayList<>(); |
||||
|
|
||||
|
// private String testPage;
|
||||
|
} |
@ -0,0 +1,43 @@ |
|||||
|
package com.yxt.anrui.oa.biz.adcompanyapply; |
||||
|
|
||||
|
import com.yxt.anrui.oa.biz.adcompanychangedetail.AdCompanyChangeDetailDto; |
||||
|
import com.yxt.anrui.oa.biz.adcompanylogoffdetail.AdCompanyLogoffDetailDto; |
||||
|
import com.yxt.anrui.oa.biz.adcompanyregistrationdetail.AdCompanyRegistrationDetailDto; |
||||
|
import com.yxt.anrui.oa.biz.adcompanytransferdetail.AdCompanyTransferDetailDto; |
||||
|
import com.yxt.anrui.oa.biz.oaform.OaFormDto; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2025/2/7 15:30 |
||||
|
*/ |
||||
|
@Data |
||||
|
@ApiModel(value = "集团制度会签审批 数据传输对象", description = "集团制度会签审批 数据传输对象") |
||||
|
public class AdCompanyApplyDto extends OaFormDto { |
||||
|
private String sid; |
||||
|
@ApiModelProperty("经办人") |
||||
|
private String operator; |
||||
|
@ApiModelProperty("申请类别key") |
||||
|
private String applyTypeKey; |
||||
|
@ApiModelProperty("value") |
||||
|
private String applyTypeValue; |
||||
|
@ApiModelProperty("是否需要个人配合签字") |
||||
|
private String isSign; |
||||
|
@ApiModelProperty("关联审批sid列表,英文逗号分隔") |
||||
|
private String linkFormSids; |
||||
|
@ApiModelProperty("基础表单sid") |
||||
|
private String formSid; |
||||
|
@ApiModelProperty("图片") |
||||
|
private List<String> files = new ArrayList<>(); |
||||
|
@ApiModelProperty("文件") |
||||
|
private List<String> appes = new ArrayList<>(); |
||||
|
private List<AdCompanyRegistrationDetailDto> RegisList=new ArrayList<>(); |
||||
|
private List<AdCompanyChangeDetailDto> changeList=new ArrayList<>(); |
||||
|
private List<AdCompanyLogoffDetailDto> logoffList=new ArrayList<>(); |
||||
|
private List<AdCompanyTransferDetailDto> transferList=new ArrayList<>(); |
||||
|
} |
@ -0,0 +1,19 @@ |
|||||
|
package com.yxt.anrui.oa.biz.adcompanyapply; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.baomidou.mybatisplus.core.toolkit.Constants; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2025/2/7 15:32 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface AdCompanyApplyMapper extends BaseMapper<AdCompanyApply> { |
||||
|
AdCompanyApplyDetailVo details(String sid); |
||||
|
IPage<AdCompanyApplyVo> selectPageVo(IPage<AdCompanyApply> page, @Param(Constants.WRAPPER) Wrapper<AdCompanyApply> qw); |
||||
|
|
||||
|
} |
@ -0,0 +1,18 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.yxt.anrui.oa.biz.adcompanyapply.AdCompanyApplyMapper"> |
||||
|
<!-- <where> ${ew.sqlSegment} </where>--> |
||||
|
<!-- ${ew.customSqlSegment} --> |
||||
|
<select id="selectPageVo" resultType="com.yxt.anrui.oa.biz.adcompanyapply.AdCompanyApplyVo"> |
||||
|
SELECT * from ad_company_apply |
||||
|
<where> |
||||
|
${ew.sqlSegment} |
||||
|
</where> |
||||
|
</select> |
||||
|
<select id="details" resultType="com.yxt.anrui.oa.biz.adcompanyapply.AdCompanyApplyDetailVo"> |
||||
|
select * |
||||
|
from ad_company_apply |
||||
|
where sid = #{sid} |
||||
|
</select> |
||||
|
|
||||
|
</mapper> |
@ -0,0 +1,14 @@ |
|||||
|
package com.yxt.anrui.oa.biz.adcompanyapply; |
||||
|
|
||||
|
import com.yxt.common.core.query.Query; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2025/2/7 15:31 |
||||
|
*/ |
||||
|
@Data |
||||
|
@ApiModel(value = "集团制度会签审批 查询条件", description = "集团制度会签审批 查询条件") |
||||
|
public class AdCompanyApplyQuery implements Query { |
||||
|
} |
@ -0,0 +1,392 @@ |
|||||
|
package com.yxt.anrui.oa.biz.adcompanyapply; |
||||
|
|
||||
|
import cn.hutool.core.bean.BeanUtil; |
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.yxt.anrui.oa.biz.adcompanychangedetail.AdCompanyChangeDetailDto; |
||||
|
import com.yxt.anrui.oa.biz.adcompanychangedetail.AdCompanyChangeDetailService; |
||||
|
import com.yxt.anrui.oa.biz.adcompanychangedetail.AdCompanyChangeDetailVo; |
||||
|
import com.yxt.anrui.oa.biz.adcompanychangedetail.AdCompanyChangeListDetailVo; |
||||
|
import com.yxt.anrui.oa.biz.adcompanylogoffdetail.AdCompanyLogoffDetailDto; |
||||
|
import com.yxt.anrui.oa.biz.adcompanylogoffdetail.AdCompanyLogoffDetailService; |
||||
|
import com.yxt.anrui.oa.biz.adcompanylogoffdetail.AdCompanyLogoffDetailVo; |
||||
|
import com.yxt.anrui.oa.biz.adcompanylogoffdetail.AdCompanyLogoffListDetailVo; |
||||
|
import com.yxt.anrui.oa.biz.adcompanyregistrationdetail.AdCompanyRegistrationDetailDto; |
||||
|
import com.yxt.anrui.oa.biz.adcompanyregistrationdetail.AdCompanyRegistrationDetailService; |
||||
|
import com.yxt.anrui.oa.biz.adcompanyregistrationdetail.AdCompanyRegistrationDetailVo; |
||||
|
import com.yxt.anrui.oa.biz.adcompanyregistrationdetail.AdCompanyRegistrationListDetailVo; |
||||
|
import com.yxt.anrui.oa.biz.adcompanytransferdetail.AdCompanyTransferDetailDto; |
||||
|
import com.yxt.anrui.oa.biz.adcompanytransferdetail.AdCompanyTransferDetailService; |
||||
|
import com.yxt.anrui.oa.biz.adcompanytransferdetail.AdCompanyTransferDetailVo; |
||||
|
import com.yxt.anrui.oa.biz.adcompanytransferdetail.AdCompanyTransferListDetailVo; |
||||
|
import com.yxt.anrui.oa.biz.hrhiredetails.HrHireDetailsDto; |
||||
|
import com.yxt.anrui.oa.biz.hrhiredetails.HrHireDetailsVo; |
||||
|
import com.yxt.anrui.oa.biz.oaappendix.OaAppendixService; |
||||
|
import com.yxt.anrui.oa.biz.oaform.*; |
||||
|
import com.yxt.anrui.oa.biz.oaform.flowable.*; |
||||
|
import com.yxt.anrui.oa.feign.file.OaFileEnum; |
||||
|
import com.yxt.anrui.oa.feign.flowable.flow.ProcDefEnum; |
||||
|
import com.yxt.anrui.oa.feign.portal.sysorganization.SysOrganizationFeign; |
||||
|
import com.yxt.anrui.oa.feign.portal.sysorganization.SysOrganizationVo; |
||||
|
import com.yxt.common.base.service.MybatisBaseService; |
||||
|
import com.yxt.common.base.utils.PagerUtil; |
||||
|
import com.yxt.common.core.query.PagerQuery; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.common.core.vo.PagerVo; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.*; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2025/2/7 15:31 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class AdCompanyApplyService extends MybatisBaseService<AdCompanyApplyMapper, AdCompanyApply> { |
||||
|
@Autowired |
||||
|
OaFormService oaFormService; |
||||
|
@Autowired |
||||
|
SysOrganizationFeign sysOrganizationFeign; |
||||
|
@Autowired |
||||
|
OaAppendixService oaAppendixService; |
||||
|
@Autowired |
||||
|
AdCompanyRegistrationDetailService adCompanyRegistrationDetailService; |
||||
|
@Autowired |
||||
|
AdCompanyChangeDetailService adCompanyChangeDetailService; |
||||
|
@Autowired |
||||
|
AdCompanyLogoffDetailService adCompanyLogoffDetailService; |
||||
|
@Autowired |
||||
|
AdCompanyTransferDetailService adCompanyTransferDetailService; |
||||
|
|
||||
|
|
||||
|
public PagerVo<AdCompanyApplyVo> listPageVo(PagerQuery<AdCompanyApplyQuery> pq) { |
||||
|
AdCompanyApplyQuery query = pq.getParams(); |
||||
|
QueryWrapper<AdCompanyApply> qw = new QueryWrapper<>(); |
||||
|
if (query != null) { |
||||
|
} |
||||
|
IPage<AdCompanyApply> page = PagerUtil.queryToPage(pq); |
||||
|
IPage<AdCompanyApplyVo> pagging = baseMapper.selectPageVo(page, qw); |
||||
|
for (AdCompanyApplyVo record : pagging.getRecords()) { |
||||
|
List<String> files = oaAppendixService.selectByLinkSid(record.getSid()); |
||||
|
record.setFiles(files); |
||||
|
} |
||||
|
PagerVo<AdCompanyApplyVo> p = PagerUtil.pageToVo(pagging, null); |
||||
|
return p; |
||||
|
} |
||||
|
|
||||
|
public ResultBean<String> saveOrUpdateDto(AdCompanyApplyDto dto) { |
||||
|
ResultBean<String> rb = ResultBean.fireFail(); |
||||
|
String sid = dto.getSid(); |
||||
|
List<String> files = dto.getFiles(); |
||||
|
List<String> appes = dto.getAppes(); |
||||
|
|
||||
|
if (StringUtils.isBlank(sid)) { |
||||
|
// 新建操作
|
||||
|
AdCompanyApply entity = new AdCompanyApply(); |
||||
|
BeanUtil.copyProperties(dto, entity, "sid"); |
||||
|
if(dto.getApplyTypeValue().equals("公司注册")){ |
||||
|
dto.setBillNo("GSZC"); |
||||
|
} else if (dto.getApplyTypeValue().equals("公司变更")) { |
||||
|
dto.setBillNo("GSBG"); |
||||
|
} else if ( dto.getApplyTypeValue().equals("公司注销")) { |
||||
|
dto.setBillNo("GSZX"); |
||||
|
}else if ( dto.getApplyTypeValue().equals("公司转让")) { |
||||
|
dto.setBillNo("GSZR"); |
||||
|
} |
||||
|
dto.setSid(entity.getSid()); |
||||
|
dto.setCreateBySid(dto.getCreateBySid()); |
||||
|
ResultBean<String> resultBean = oaFormService.saveOaForm(dto); |
||||
|
if (!resultBean.getSuccess()) { |
||||
|
return rb; |
||||
|
} |
||||
|
entity.setFormSid(resultBean.getData()); |
||||
|
entity.setCreateBySid(dto.getCreateBySid()); |
||||
|
baseMapper.insert(entity); |
||||
|
sid = entity.getSid(); |
||||
|
} else { |
||||
|
// 更新操作
|
||||
|
AdCompanyApply entity = fetchBySid(sid); |
||||
|
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
||||
|
baseMapper.updateById(entity); |
||||
|
} |
||||
|
saveFiles(sid, files, "", "图片"); |
||||
|
saveFiles(sid, appes, "", "文件"); |
||||
|
if(dto.getApplyTypeValue().equals("公司注册")){ |
||||
|
List<AdCompanyRegistrationDetailDto> list = dto.getRegisList(); |
||||
|
adCompanyRegistrationDetailService.saveDetails(list, sid); |
||||
|
} else if (dto.getApplyTypeValue().equals("公司变更")) { |
||||
|
List<AdCompanyChangeDetailDto> list = dto.getChangeList(); |
||||
|
adCompanyChangeDetailService.saveDetails(list, sid); |
||||
|
} else if (dto.getApplyTypeValue().equals("公司注销")) { |
||||
|
List<AdCompanyLogoffDetailDto> list = dto.getLogoffList(); |
||||
|
adCompanyLogoffDetailService.saveDetails(list, sid); |
||||
|
}else if (dto.getApplyTypeValue().equals("公司转让")){ |
||||
|
List<AdCompanyTransferDetailDto> list = dto.getTransferList(); |
||||
|
adCompanyTransferDetailService.saveDetails(list, sid); |
||||
|
} |
||||
|
|
||||
|
return rb.success().setData(sid); |
||||
|
} |
||||
|
public ResultBean<AdCompanyApplyVo> getSaveInit(String userSid, String orgPath) { |
||||
|
ResultBean<AdCompanyApplyVo> rb = ResultBean.fireFail(); |
||||
|
AdCompanyApplyVo AdGroupSystemApplyVo = new AdCompanyApplyVo(); |
||||
|
AdGroupSystemApplyVo.setCreateBySid(userSid); |
||||
|
AdGroupSystemApplyVo.setOrgSidPath(orgPath); |
||||
|
return rb.success().setData(AdGroupSystemApplyVo); |
||||
|
} |
||||
|
|
||||
|
public ResultBean<AdCompanyApplyVo> getUpdateInit(String sid) { |
||||
|
ResultBean<AdCompanyApplyVo> rb = ResultBean.fireFail(); |
||||
|
AdCompanyApplyVo adCompanyApplyVo = new AdCompanyApplyVo(); |
||||
|
AdCompanyApply adCompanyApply = fetchBySid(sid); |
||||
|
if (adCompanyApply == null) { |
||||
|
return rb.setMsg("该申请不存在"); |
||||
|
} |
||||
|
// hrHireApplyVo.setTestPage(hrHireApply.getTestPage());
|
||||
|
OaForm oaForm = oaFormService.fetchBySid(sid); |
||||
|
adCompanyApplyVo.setTaskId(oaForm.getTaskId()); |
||||
|
adCompanyApplyVo.setProcInsId(oaForm.getProcInstId()); |
||||
|
//根据部门sid获取orgPath并赋值
|
||||
|
SysOrganizationVo organizationVo = sysOrganizationFeign.fetchBySid(oaForm.getDeptSid()).getData(); |
||||
|
String orgSidPath = organizationVo.getOrgSidPath(); |
||||
|
adCompanyApplyVo.setOrgSidPath(orgSidPath); |
||||
|
adCompanyApplyVo.setCreateBySid(oaForm.getCreateBySid()); |
||||
|
BeanUtil.copyProperties(adCompanyApply, adCompanyApplyVo); |
||||
|
FormCommon isFinanceObj = FormCommon.of(adCompanyApply.getApplyTypeKey(), adCompanyApply.getApplyTypeValue()); |
||||
|
adCompanyApplyVo.setApplyType(isFinanceObj); |
||||
|
if(adCompanyApply.getApplyTypeValue().equals("公司注册")){ |
||||
|
List<AdCompanyRegistrationDetailVo> list = adCompanyRegistrationDetailService.getUpdateInit(sid); |
||||
|
list.removeAll(Collections.singleton(null)); |
||||
|
adCompanyApplyVo.setRegisList(list); |
||||
|
} else if (adCompanyApply.getApplyTypeValue().equals("公司变更")) { |
||||
|
List<AdCompanyChangeDetailVo> list = adCompanyChangeDetailService.getUpdateInit(sid); |
||||
|
list.removeAll(Collections.singleton(null)); |
||||
|
adCompanyApplyVo.setChangeList(list); |
||||
|
} else if (adCompanyApply.getApplyTypeValue().equals("公司注销")) { |
||||
|
List<AdCompanyLogoffDetailVo> list = adCompanyLogoffDetailService.getUpdateInit(sid); |
||||
|
list.removeAll(Collections.singleton(null)); |
||||
|
adCompanyApplyVo.setLogoffList(list); |
||||
|
}else if (adCompanyApply.getApplyTypeValue().equals("公司转让")){ |
||||
|
List<AdCompanyTransferDetailVo> list = adCompanyTransferDetailService.getUpdateInit(sid); |
||||
|
list.removeAll(Collections.singleton(null)); |
||||
|
adCompanyApplyVo.setTransferList(list); |
||||
|
} |
||||
|
|
||||
|
List<String> files = oaAppendixService.selectByLinkSid(sid, "图片"); |
||||
|
List<String> appes= oaAppendixService.selectByLinkSid(sid, "文件"); |
||||
|
adCompanyApplyVo.setFiles(files); |
||||
|
adCompanyApplyVo.setAppes(appes); |
||||
|
adCompanyApplyVo.setSid(sid); |
||||
|
return rb.success().setData(adCompanyApplyVo); |
||||
|
} |
||||
|
// 保存文件
|
||||
|
private void saveFiles(String sid, List<String> files, String attachType, String fileType) { |
||||
|
files.removeAll(Collections.singleton(null)); |
||||
|
oaAppendixService.saveFile(sid, files, attachType, fileType); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 详情 |
||||
|
* |
||||
|
* @param sid |
||||
|
* @return |
||||
|
*/ |
||||
|
public ResultBean<AdCompanyApplyDetailVo> details(String sid, String application) { |
||||
|
ResultBean<AdCompanyApplyDetailVo> rb = ResultBean.fireFail(); |
||||
|
AdCompanyApplyDetailVo adCompanyApplyDetailVo = baseMapper.details(sid); |
||||
|
if(adCompanyApplyDetailVo.getApplyTypeValue().equals("公司注册")){ |
||||
|
List<AdCompanyRegistrationListDetailVo> data = adCompanyRegistrationDetailService.getDetailByMainSid(adCompanyApplyDetailVo.getSid()).getData(); |
||||
|
adCompanyApplyDetailVo.setRegisList(data); |
||||
|
} else if (adCompanyApplyDetailVo.getApplyTypeValue().equals("公司变更")) { |
||||
|
List<AdCompanyChangeListDetailVo> data = adCompanyChangeDetailService.getDetailByMainSid(adCompanyApplyDetailVo.getSid()).getData(); |
||||
|
adCompanyApplyDetailVo.setChangeList(data); |
||||
|
} else if (adCompanyApplyDetailVo.getApplyTypeValue().equals("公司注销")) { |
||||
|
List<AdCompanyLogoffListDetailVo> data = adCompanyLogoffDetailService.getDetailByMainSid(adCompanyApplyDetailVo.getSid()).getData(); |
||||
|
adCompanyApplyDetailVo.setLogoffList(data); |
||||
|
}else if (adCompanyApplyDetailVo.getApplyTypeValue().equals("公司转让")){ |
||||
|
List<AdCompanyTransferListDetailVo> data = adCompanyTransferDetailService.getDetailByMainSid(adCompanyApplyDetailVo.getSid()).getData(); |
||||
|
adCompanyApplyDetailVo.setTransferList(data); |
||||
|
} |
||||
|
if (adCompanyApplyDetailVo == null) { |
||||
|
return rb.setMsg("该申请不存在"); |
||||
|
} |
||||
|
List<String> files = oaAppendixService.selectByLinkSid(adCompanyApplyDetailVo.getSid(), "图片"); |
||||
|
List<String> appes= oaAppendixService.selectByLinkSid(adCompanyApplyDetailVo.getSid(), "文件"); |
||||
|
adCompanyApplyDetailVo.setFiles(files); |
||||
|
adCompanyApplyDetailVo.setAppes(appes); |
||||
|
//基础字段赋值
|
||||
|
BeanUtil.copyProperties(oaFormService.getDetails(sid), adCompanyApplyDetailVo); |
||||
|
return rb.success().setData(adCompanyApplyDetailVo); |
||||
|
} |
||||
|
/** |
||||
|
* 提交 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return |
||||
|
*/ |
||||
|
public ResultBean submit(AdCompanyApplyDto dto) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
ResultBean<String> stringResultBean = saveOrUpdateDto(dto); |
||||
|
if (!stringResultBean.getSuccess()) { |
||||
|
return rb.setMsg(stringResultBean.getData()); |
||||
|
} |
||||
|
String businessSid = stringResultBean.getData(); |
||||
|
|
||||
|
SubmitDto submitDto = new SubmitDto(); |
||||
|
submitDto.setUserSid(dto.getCreateBySid()); |
||||
|
submitDto.setBusinessSid(businessSid); |
||||
|
|
||||
|
Map<String, Object> formVariables = new HashMap<>(); |
||||
|
Map<String, Object> appMap = new HashMap<>(); |
||||
|
formVariables = getMap(formVariables, businessSid); |
||||
|
submitDto.setFormVariables(formVariables); |
||||
|
if(dto.getApplyTypeValue().equals("公司注册")){ |
||||
|
// appMap.put("sid", businessSid);
|
||||
|
submitDto.setProcDefId(""); |
||||
|
} else if (dto.getApplyTypeValue().equals("公司变更")) { |
||||
|
submitDto.setProcDefId(""); |
||||
|
} else if (dto.getApplyTypeValue().equals("公司注销")) { |
||||
|
submitDto.setProcDefId(""); |
||||
|
}else if (dto.getApplyTypeValue().equals("公司转让")){ |
||||
|
submitDto.setProcDefId(""); |
||||
|
} |
||||
|
submitDto.setNextTaskId(dto.getTaskId()); |
||||
|
submitDto.setRule(OaFormRuleEnum.DIRECTLY_UNDER.getRule()); |
||||
|
return oaFormService.submit(submitDto); |
||||
|
} |
||||
|
/** |
||||
|
* 驳回 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return |
||||
|
*/ |
||||
|
public ResultBean reject(TaskDto dto) { |
||||
|
Map<String, Object> formVariables = dto.getFormVariables(); |
||||
|
formVariables = getMap(formVariables, dto.getBusinessSid()); |
||||
|
dto.setFormVariables(formVariables); |
||||
|
|
||||
|
return oaFormService.reject(dto); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 办理(同意) |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return |
||||
|
*/ |
||||
|
public ResultBean complete(CompleteDto dto) { |
||||
|
Map<String, Object> formVariables = dto.getFormVariables(); |
||||
|
formVariables = getMap(formVariables, dto.getBusinessSid()); |
||||
|
dto.setFormVariables(formVariables); |
||||
|
BusinessVariablesDto businessVariablesDto = new BusinessVariablesDto(); |
||||
|
BeanUtil.copyProperties(dto, businessVariablesDto); |
||||
|
return oaFormService.complete(businessVariablesDto); |
||||
|
} |
||||
|
|
||||
|
public ResultBean<String> getFlowOperateTitle(NodeQuery query) { |
||||
|
// 默认失败返回
|
||||
|
ResultBean<String> rb = ResultBean.fireFail(); |
||||
|
|
||||
|
// 获取next值和formVariables
|
||||
|
int next = query.getNext(); |
||||
|
|
||||
|
// 获取并更新formVariables
|
||||
|
Map<String, Object> formVariables = getMap(query.getFormVariables(), query.getBusinessSid()); |
||||
|
query.setFormVariables(formVariables); |
||||
|
|
||||
|
// 校验next参数是否有效(只允许0或1)
|
||||
|
if (next != 0 && next != 1) { |
||||
|
return rb.setMsg("参数错误:next"); // 如果next不是0或1,返回错误信息
|
||||
|
} |
||||
|
|
||||
|
// 获取节点名称
|
||||
|
String data = oaFormService.getNodeName(query, next); |
||||
|
|
||||
|
// 如果data为null,表示未获取到有效的节点信息
|
||||
|
if (data == null) { |
||||
|
return rb.setMsg("没有获取到节点信息"); // 返回错误消息
|
||||
|
} |
||||
|
|
||||
|
// 返回成功的结果和获取到的节点名称
|
||||
|
return rb.success().setData(data); |
||||
|
} |
||||
|
public Map<String, Object> getMap(Map<String, Object> formVariables, String sid) { |
||||
|
Map<String, Object> appMap = new HashMap<>(); |
||||
|
appMap.put("sid", sid); |
||||
|
AdCompanyApply adCompanyApply = baseMapper.selectOne(new QueryWrapper<AdCompanyApply>().eq("formSid", sid)); |
||||
|
if(adCompanyApply.getApplyTypeValue().equals("公司注册")){ |
||||
|
appMap.put(OaFormUrlEnum.GROUPSYSTEM_EDIT.getType(), OaFormUrlEnum.GROUPSYSTEM_EDIT.getUrl() + sid); |
||||
|
appMap.put(OaFormUrlEnum.GROUPSYSTEM_DETAIL.getType(), OaFormUrlEnum.GROUPSYSTEM_DETAIL.getUrl() + sid); |
||||
|
appMap.put(OaFormUrlEnum.GROUPSYSTEM_FLOWOPERATEURL.getType(), OaFormUrlEnum.GROUPSYSTEM_FLOWOPERATEURL.getUrl()); |
||||
|
appMap.put(OaFormUrlEnum.GROUPSYSTEM_AGREEURL.getType(), OaFormUrlEnum.GROUPSYSTEM_AGREEURL.getUrl()); |
||||
|
appMap.put(OaFormUrlEnum.STOPURL.getType(), OaFormUrlEnum.STOPURL.getUrl()); |
||||
|
appMap.put(OaFormUrlEnum.GROUPSYSTEM_REJECTURL.getType(), OaFormUrlEnum.GROUPSYSTEM_REJECTURL.getUrl()); |
||||
|
appMap.put(OaFormUrlEnum.RECALLURL.getType(), OaFormUrlEnum.RECALLURL.getUrl()); |
||||
|
appMap.put(OaFormUrlEnum.SIGNURL.getType(), OaFormUrlEnum.SIGNURL.getUrl()); |
||||
|
appMap.put(OaFormUrlEnum.TRANSFERURL.getType(), OaFormUrlEnum.TRANSFERURL.getUrl()); |
||||
|
formVariables.put("app", appMap); |
||||
|
// //根据组织查询是否是分公司
|
||||
|
OaForm oaForm = oaFormService.fetchBySid(sid); |
||||
|
|
||||
|
//是否是分公司
|
||||
|
// formVariables.put("isTrue", sysOrganization.getIsDept() == 0);
|
||||
|
}else if(adCompanyApply.getApplyTypeValue().equals("公司变更")){ |
||||
|
appMap.put(OaFormUrlEnum.GROUPSYSTEM_EDIT.getType(), OaFormUrlEnum.GROUPSYSTEM_EDIT.getUrl() + sid); |
||||
|
appMap.put(OaFormUrlEnum.GROUPSYSTEM_DETAIL.getType(), OaFormUrlEnum.GROUPSYSTEM_DETAIL.getUrl() + sid); |
||||
|
appMap.put(OaFormUrlEnum.GROUPSYSTEM_FLOWOPERATEURL.getType(), OaFormUrlEnum.GROUPSYSTEM_FLOWOPERATEURL.getUrl()); |
||||
|
appMap.put(OaFormUrlEnum.GROUPSYSTEM_AGREEURL.getType(), OaFormUrlEnum.GROUPSYSTEM_AGREEURL.getUrl()); |
||||
|
appMap.put(OaFormUrlEnum.STOPURL.getType(), OaFormUrlEnum.STOPURL.getUrl()); |
||||
|
appMap.put(OaFormUrlEnum.GROUPSYSTEM_REJECTURL.getType(), OaFormUrlEnum.GROUPSYSTEM_REJECTURL.getUrl()); |
||||
|
appMap.put(OaFormUrlEnum.RECALLURL.getType(), OaFormUrlEnum.RECALLURL.getUrl()); |
||||
|
appMap.put(OaFormUrlEnum.SIGNURL.getType(), OaFormUrlEnum.SIGNURL.getUrl()); |
||||
|
appMap.put(OaFormUrlEnum.TRANSFERURL.getType(), OaFormUrlEnum.TRANSFERURL.getUrl()); |
||||
|
formVariables.put("app", appMap); |
||||
|
// //根据组织查询是否是分公司
|
||||
|
OaForm oaForm = oaFormService.fetchBySid(sid); |
||||
|
AdCompanyApply adPermissionApply = fetchBySid(sid); |
||||
|
SysOrganizationVo sysOrganization = sysOrganizationFeign.fetchBySid(oaForm.getUseOrgSid()).getData(); |
||||
|
//是否是分公司
|
||||
|
// formVariables.put("isTrue", sysOrganization.getIsDept() == 0);
|
||||
|
} else if (adCompanyApply.getApplyTypeValue().equals("公司注销")) { |
||||
|
appMap.put(OaFormUrlEnum.GROUPSYSTEM_EDIT.getType(), OaFormUrlEnum.GROUPSYSTEM_EDIT.getUrl() + sid); |
||||
|
appMap.put(OaFormUrlEnum.GROUPSYSTEM_DETAIL.getType(), OaFormUrlEnum.GROUPSYSTEM_DETAIL.getUrl() + sid); |
||||
|
appMap.put(OaFormUrlEnum.GROUPSYSTEM_FLOWOPERATEURL.getType(), OaFormUrlEnum.GROUPSYSTEM_FLOWOPERATEURL.getUrl()); |
||||
|
appMap.put(OaFormUrlEnum.GROUPSYSTEM_AGREEURL.getType(), OaFormUrlEnum.GROUPSYSTEM_AGREEURL.getUrl()); |
||||
|
appMap.put(OaFormUrlEnum.STOPURL.getType(), OaFormUrlEnum.STOPURL.getUrl()); |
||||
|
appMap.put(OaFormUrlEnum.GROUPSYSTEM_REJECTURL.getType(), OaFormUrlEnum.GROUPSYSTEM_REJECTURL.getUrl()); |
||||
|
appMap.put(OaFormUrlEnum.RECALLURL.getType(), OaFormUrlEnum.RECALLURL.getUrl()); |
||||
|
appMap.put(OaFormUrlEnum.SIGNURL.getType(), OaFormUrlEnum.SIGNURL.getUrl()); |
||||
|
appMap.put(OaFormUrlEnum.TRANSFERURL.getType(), OaFormUrlEnum.TRANSFERURL.getUrl()); |
||||
|
formVariables.put("app", appMap); |
||||
|
// //根据组织查询是否是分公司
|
||||
|
OaForm oaForm = oaFormService.fetchBySid(sid); |
||||
|
AdCompanyApply adPermissionApply = fetchBySid(sid); |
||||
|
SysOrganizationVo sysOrganization = sysOrganizationFeign.fetchBySid(oaForm.getUseOrgSid()).getData(); |
||||
|
//是否是分公司
|
||||
|
// formVariables.put("isTrue", sysOrganization.getIsDept() == 0);
|
||||
|
} else if (adCompanyApply.getApplyTypeValue().equals("公司转让")) { |
||||
|
appMap.put(OaFormUrlEnum.GROUPSYSTEM_EDIT.getType(), OaFormUrlEnum.GROUPSYSTEM_EDIT.getUrl() + sid); |
||||
|
appMap.put(OaFormUrlEnum.GROUPSYSTEM_DETAIL.getType(), OaFormUrlEnum.GROUPSYSTEM_DETAIL.getUrl() + sid); |
||||
|
appMap.put(OaFormUrlEnum.GROUPSYSTEM_FLOWOPERATEURL.getType(), OaFormUrlEnum.GROUPSYSTEM_FLOWOPERATEURL.getUrl()); |
||||
|
appMap.put(OaFormUrlEnum.GROUPSYSTEM_AGREEURL.getType(), OaFormUrlEnum.GROUPSYSTEM_AGREEURL.getUrl()); |
||||
|
appMap.put(OaFormUrlEnum.STOPURL.getType(), OaFormUrlEnum.STOPURL.getUrl()); |
||||
|
appMap.put(OaFormUrlEnum.GROUPSYSTEM_REJECTURL.getType(), OaFormUrlEnum.GROUPSYSTEM_REJECTURL.getUrl()); |
||||
|
appMap.put(OaFormUrlEnum.RECALLURL.getType(), OaFormUrlEnum.RECALLURL.getUrl()); |
||||
|
appMap.put(OaFormUrlEnum.SIGNURL.getType(), OaFormUrlEnum.SIGNURL.getUrl()); |
||||
|
appMap.put(OaFormUrlEnum.TRANSFERURL.getType(), OaFormUrlEnum.TRANSFERURL.getUrl()); |
||||
|
formVariables.put("app", appMap); |
||||
|
// //根据组织查询是否是分公司
|
||||
|
OaForm oaForm = oaFormService.fetchBySid(sid); |
||||
|
AdCompanyApply adPermissionApply = fetchBySid(sid); |
||||
|
SysOrganizationVo sysOrganization = sysOrganizationFeign.fetchBySid(oaForm.getUseOrgSid()).getData(); |
||||
|
//是否是分公司
|
||||
|
// formVariables.put("isTrue", sysOrganization.getIsDept() == 0);
|
||||
|
} |
||||
|
|
||||
|
|
||||
|
return formVariables; |
||||
|
} |
||||
|
} |
@ -0,0 +1,54 @@ |
|||||
|
package com.yxt.anrui.oa.biz.adcompanyapply; |
||||
|
|
||||
|
import com.yxt.anrui.oa.biz.adcompanychangedetail.AdCompanyChangeDetailVo; |
||||
|
import com.yxt.anrui.oa.biz.adcompanychangedetail.AdCompanyChangeListDetailVo; |
||||
|
import com.yxt.anrui.oa.biz.adcompanylogoffdetail.AdCompanyLogoffDetailVo; |
||||
|
import com.yxt.anrui.oa.biz.adcompanyregistrationdetail.AdCompanyRegistrationDetailVo; |
||||
|
import com.yxt.anrui.oa.biz.adcompanyregistrationdetail.AdCompanyRegistrationListDetailVo; |
||||
|
import com.yxt.anrui.oa.biz.adcompanytransferdetail.AdCompanyTransferDetailVo; |
||||
|
import com.yxt.anrui.oa.biz.oaform.FormCommon; |
||||
|
import com.yxt.anrui.oa.biz.oaform.OaFormCommonVo; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2025/2/7 15:31 |
||||
|
*/ |
||||
|
@Data |
||||
|
@ApiModel(value = "集团制度会签审批 视图数据对象", description = "集团制度会签审批 视图数据对象") |
||||
|
public class AdCompanyApplyVo extends OaFormCommonVo { |
||||
|
private String sid; |
||||
|
@ApiModelProperty("经办人") |
||||
|
private String operator; |
||||
|
@ApiModelProperty("申请类别key") |
||||
|
private String applyTypeKey; |
||||
|
@ApiModelProperty("value") |
||||
|
private String applyTypeValue; |
||||
|
private FormCommon applyType; |
||||
|
@ApiModelProperty("是否需要个人配合签字key 0否 1是") |
||||
|
private String isSignKey; |
||||
|
@ApiModelProperty("是否需要个人配合签字") |
||||
|
private String isSignValue; |
||||
|
@ApiModelProperty("关联审批sid列表,英文逗号分隔") |
||||
|
private String linkFormSids; |
||||
|
@ApiModelProperty("基础表单sid") |
||||
|
private String formSid; |
||||
|
@ApiModelProperty("图片") |
||||
|
private List<String> files = new ArrayList<>(); |
||||
|
@ApiModelProperty("附件") |
||||
|
private List<String> appes = new ArrayList<>(); |
||||
|
private String orgSidPath; |
||||
|
private String createBySid; |
||||
|
private String taskId; |
||||
|
@ApiModelProperty("流程实例id") |
||||
|
private String procInsId; |
||||
|
List<AdCompanyRegistrationDetailVo> regisList=new ArrayList<>(); |
||||
|
List<AdCompanyChangeDetailVo> changeList=new ArrayList<>(); |
||||
|
List<AdCompanyLogoffDetailVo> logoffList=new ArrayList<>(); |
||||
|
List<AdCompanyTransferDetailVo> transferList=new ArrayList<>(); |
||||
|
} |
@ -0,0 +1,30 @@ |
|||||
|
package com.yxt.anrui.oa.biz.adcompanychangedetail; |
||||
|
|
||||
|
import com.yxt.common.core.domain.BaseEntity; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: wangpengfei |
||||
|
* @date: 2025/1/16 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class AdCompanyChangeDetail extends BaseEntity { |
||||
|
private static final long serialVersionUID = 4980172913356706485L; |
||||
|
@ApiModelProperty("主表sid") |
||||
|
private String mainSid; |
||||
|
@ApiModelProperty("公司名称") |
||||
|
private String name; |
||||
|
@ApiModelProperty("变更事项") |
||||
|
private String alteration; |
||||
|
@ApiModelProperty("是否更换印章 0否1是") |
||||
|
private String isReplaceKey; |
||||
|
@ApiModelProperty("value 0否1是") |
||||
|
private String isReplaceValue; |
||||
|
@ApiModelProperty("需要更换的印章") |
||||
|
private Integer seal; |
||||
|
@ApiModelProperty("变更后详情") |
||||
|
private String details; |
||||
|
|
||||
|
} |
@ -0,0 +1,29 @@ |
|||||
|
package com.yxt.anrui.oa.biz.adcompanychangedetail; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: wangpengfei |
||||
|
* @date: 2025/1/17 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class AdCompanyChangeDetailDto { |
||||
|
private String sid; |
||||
|
@ApiModelProperty("主表sid") |
||||
|
private String mainSid; |
||||
|
@ApiModelProperty("公司名称") |
||||
|
private String name; |
||||
|
@ApiModelProperty("变更事项") |
||||
|
private String alteration; |
||||
|
@ApiModelProperty("是否更换印章 0否1是") |
||||
|
private String isReplaceKey; |
||||
|
@ApiModelProperty("value 0否1是") |
||||
|
private String isReplaceValue; |
||||
|
@ApiModelProperty("需要更换的印章") |
||||
|
private Integer seal; |
||||
|
@ApiModelProperty("变更后详情") |
||||
|
private String details; |
||||
|
|
||||
|
} |
@ -0,0 +1,19 @@ |
|||||
|
package com.yxt.anrui.oa.biz.adcompanychangedetail; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: wangpengfei |
||||
|
* @date: 2025/1/17 |
||||
|
**/ |
||||
|
@Mapper |
||||
|
public interface AdCompanyChangeDetailMapper extends BaseMapper<AdCompanyChangeDetail> { |
||||
|
List<AdCompanyChangeDetailVo> getUpdateInit(String sid); |
||||
|
|
||||
|
List<AdCompanyChangeDetail> selectByMainSid(String sid); |
||||
|
List<AdCompanyChangeListDetailVo> getDetailByMainSid(String sid); |
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.yxt.anrui.oa.biz.adcompanychangedetail.AdCompanyChangeDetailMapper"> |
||||
|
<select id="getUpdateInit" resultType="com.yxt.anrui.oa.biz.adcompanyregistrationdetail.AdCompanyRegistrationDetailVo"> |
||||
|
select d* |
||||
|
from ad_company_change_detail |
||||
|
where mainSid = #{sid} |
||||
|
</select> |
||||
|
|
||||
|
<select id="selectByMainSid" resultType="com.yxt.anrui.oa.biz.adcompanyregistrationdetail.AdCompanyRegistrationDetail"> |
||||
|
select * |
||||
|
from ad_company_change_detail |
||||
|
where mainSid = #{sid} |
||||
|
</select> |
||||
|
<select id="getDetailByMainSid" resultType="com.yxt.anrui.oa.biz.adcompanyregistrationdetail.AdCompanyRegistrationListDetailVo"> |
||||
|
select * |
||||
|
from ad_company_change_detail |
||||
|
where mainSid = #{sid} |
||||
|
</select> |
||||
|
</mapper> |
@ -0,0 +1,63 @@ |
|||||
|
package com.yxt.anrui.oa.biz.adcompanychangedetail; |
||||
|
|
||||
|
import cn.hutool.core.bean.BeanUtil; |
||||
|
import com.yxt.anrui.oa.biz.oaappendix.OaAppendixMapper; |
||||
|
import com.yxt.anrui.oa.biz.oaappendix.OaAppendixService; |
||||
|
import com.yxt.common.base.service.MybatisBaseService; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.Collections; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: wangpengfei |
||||
|
* @date: 2025/1/17 |
||||
|
**/ |
||||
|
@Service |
||||
|
public class AdCompanyChangeDetailService extends MybatisBaseService<AdCompanyChangeDetailMapper, AdCompanyChangeDetail> { |
||||
|
|
||||
|
@Autowired |
||||
|
private OaAppendixMapper oaAppendixMapper; |
||||
|
@Autowired |
||||
|
private OaAppendixService oaAppendixService; |
||||
|
|
||||
|
public List<AdCompanyChangeDetailVo> getUpdateInit(String sid) { |
||||
|
return baseMapper.getUpdateInit(sid); |
||||
|
} |
||||
|
|
||||
|
public void saveDetails(List<AdCompanyChangeDetailDto> list, String sid) { |
||||
|
//根据sid查询明细并删除
|
||||
|
List<AdCompanyChangeDetail> list2 = baseMapper.selectByMainSid(sid); |
||||
|
list2.removeAll(Collections.singleton(null)); |
||||
|
if (!list2.isEmpty()) { |
||||
|
list2.stream().forEach(v -> { |
||||
|
oaAppendixMapper.deleteByLinkSid(v.getSid(), "文件"); |
||||
|
deleteBySid(v.getSid()); |
||||
|
}); |
||||
|
} |
||||
|
list.removeAll(Collections.singleton(null)); |
||||
|
if (!list.isEmpty()) { |
||||
|
list.stream().forEach(details -> { |
||||
|
AdCompanyChangeDetail adCompanyRegistrationDetail = new AdCompanyChangeDetail(); |
||||
|
BeanUtil.copyProperties(details, adCompanyRegistrationDetail); |
||||
|
adCompanyRegistrationDetail.setMainSid(sid); |
||||
|
baseMapper.insert(adCompanyRegistrationDetail); |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
// 保存文件
|
||||
|
private void saveFiles(String sid, List<String> files, String attachType, String fileType) { |
||||
|
files.removeAll(Collections.singleton(null)); |
||||
|
oaAppendixService.saveFile(sid, files, attachType, fileType); |
||||
|
} |
||||
|
public ResultBean<List<AdCompanyChangeListDetailVo>> getDetailByMainSid(String sid) { |
||||
|
ResultBean<List<AdCompanyChangeListDetailVo>> rb = ResultBean.fireFail(); |
||||
|
List<AdCompanyChangeListDetailVo> list = baseMapper.getDetailByMainSid(sid); |
||||
|
return rb.success().setData(list); |
||||
|
} |
||||
|
} |
@ -0,0 +1,31 @@ |
|||||
|
package com.yxt.anrui.oa.biz.adcompanychangedetail; |
||||
|
|
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: wangpengfei |
||||
|
* @date: 2025/1/16 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class AdCompanyChangeDetailVo implements Vo { |
||||
|
private static final long serialVersionUID = -3330232160961910852L; |
||||
|
private String sid; |
||||
|
@ApiModelProperty("主表sid") |
||||
|
private String mainSid; |
||||
|
@ApiModelProperty("公司名称") |
||||
|
private String name; |
||||
|
@ApiModelProperty("变更事项") |
||||
|
private String alteration; |
||||
|
@ApiModelProperty("是否更换印章 0否1是") |
||||
|
private String isReplaceKey; |
||||
|
@ApiModelProperty("value 0否1是") |
||||
|
private String isReplaceValue; |
||||
|
@ApiModelProperty("需要更换的印章") |
||||
|
private Integer seal; |
||||
|
@ApiModelProperty("变更后详情") |
||||
|
private String details; |
||||
|
|
||||
|
} |
@ -0,0 +1,29 @@ |
|||||
|
package com.yxt.anrui.oa.biz.adcompanychangedetail; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: wangpengfei |
||||
|
* @date: 2025/1/21 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class AdCompanyChangeListDetailVo { |
||||
|
|
||||
|
private String sid; |
||||
|
@ApiModelProperty("公司名称") |
||||
|
private String name; |
||||
|
@ApiModelProperty("变更事项") |
||||
|
private String alteration; |
||||
|
@ApiModelProperty("是否更换印章 0否1是") |
||||
|
private String isReplaceKey; |
||||
|
@ApiModelProperty("value 0否1是") |
||||
|
private String isReplaceValue; |
||||
|
@ApiModelProperty("需要更换的印章") |
||||
|
private Integer seal; |
||||
|
@ApiModelProperty("变更后详情") |
||||
|
private String details; |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,23 @@ |
|||||
|
package com.yxt.anrui.oa.biz.adcompanylogoffdetail; |
||||
|
|
||||
|
import com.yxt.common.core.domain.BaseEntity; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: wangpengfei |
||||
|
* @date: 2025/1/16 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class AdCompanyLogoffDetail extends BaseEntity { |
||||
|
private static final long serialVersionUID = 4980172913356706485L; |
||||
|
@ApiModelProperty("主表sid") |
||||
|
private String mainSid; |
||||
|
@ApiModelProperty("公司名称") |
||||
|
private String name; |
||||
|
@ApiModelProperty("法定代表人") |
||||
|
private String reason; |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,21 @@ |
|||||
|
package com.yxt.anrui.oa.biz.adcompanylogoffdetail; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: wangpengfei |
||||
|
* @date: 2025/1/17 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class AdCompanyLogoffDetailDto { |
||||
|
private String sid; |
||||
|
@ApiModelProperty("主表sid") |
||||
|
private String mainSid; |
||||
|
@ApiModelProperty("公司名称") |
||||
|
private String name; |
||||
|
@ApiModelProperty("法定代表人") |
||||
|
private String reason; |
||||
|
|
||||
|
} |
@ -0,0 +1,19 @@ |
|||||
|
package com.yxt.anrui.oa.biz.adcompanylogoffdetail; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: wangpengfei |
||||
|
* @date: 2025/1/17 |
||||
|
**/ |
||||
|
@Mapper |
||||
|
public interface AdCompanyLogoffDetailMapper extends BaseMapper<AdCompanyLogoffDetail> { |
||||
|
List<AdCompanyLogoffDetailVo> getUpdateInit(String sid); |
||||
|
|
||||
|
List<AdCompanyLogoffDetail> selectByMainSid(String sid); |
||||
|
List<AdCompanyLogoffListDetailVo> getDetailByMainSid(String sid); |
||||
|
} |
@ -0,0 +1,33 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.yxt.anrui.oa.biz.adcompanylogoffdetail.AdCompanyLogoffDetailMapper"> |
||||
|
<select id="getUpdateInit" resultType="com.yxt.anrui.oa.biz.adcompanylogoffdetail.AdCompanyLogoffListDetailVo"> |
||||
|
select deptSid deptKey, |
||||
|
deptName deptValue, |
||||
|
postSid jobKey, |
||||
|
postName jobValue, |
||||
|
memberCount, |
||||
|
educationKey, |
||||
|
educationValue, |
||||
|
formalWages, |
||||
|
benefits, |
||||
|
describes, |
||||
|
demand, |
||||
|
address, |
||||
|
sid, |
||||
|
remarks |
||||
|
from ad_company_logoff_detail |
||||
|
where mainSid = #{sid} |
||||
|
</select> |
||||
|
|
||||
|
<select id="selectByMainSid" resultType="com.yxt.anrui.oa.biz.adcompanylogoffdetail.AdCompanyLogoffDetail"> |
||||
|
select * |
||||
|
from ad_company_logoff_detail |
||||
|
where mainSid = #{sid} |
||||
|
</select> |
||||
|
<select id="getDetailByMainSid" resultType="com.yxt.anrui.oa.biz.adcompanylogoffdetail.AdCompanyLogoffListDetailVo"> |
||||
|
select * |
||||
|
from ad_company_logoff_detail |
||||
|
where mainSid = #{sid} |
||||
|
</select> |
||||
|
</mapper> |
@ -0,0 +1,62 @@ |
|||||
|
package com.yxt.anrui.oa.biz.adcompanylogoffdetail; |
||||
|
|
||||
|
import cn.hutool.core.bean.BeanUtil; |
||||
|
import com.yxt.anrui.oa.biz.oaappendix.OaAppendixMapper; |
||||
|
import com.yxt.anrui.oa.biz.oaappendix.OaAppendixService; |
||||
|
import com.yxt.common.base.service.MybatisBaseService; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.Collections; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: wangpengfei |
||||
|
* @date: 2025/1/17 |
||||
|
**/ |
||||
|
@Service |
||||
|
public class AdCompanyLogoffDetailService extends MybatisBaseService<AdCompanyLogoffDetailMapper, AdCompanyLogoffDetail> { |
||||
|
|
||||
|
@Autowired |
||||
|
private OaAppendixMapper oaAppendixMapper; |
||||
|
@Autowired |
||||
|
private OaAppendixService oaAppendixService; |
||||
|
|
||||
|
public List<AdCompanyLogoffDetailVo> getUpdateInit(String sid) { |
||||
|
return baseMapper.getUpdateInit(sid); |
||||
|
} |
||||
|
|
||||
|
public void saveDetails(List<AdCompanyLogoffDetailDto> list, String sid) { |
||||
|
//根据sid查询明细并删除
|
||||
|
List<AdCompanyLogoffDetail> list2 = baseMapper.selectByMainSid(sid); |
||||
|
list2.removeAll(Collections.singleton(null)); |
||||
|
if (!list2.isEmpty()) { |
||||
|
list2.stream().forEach(v -> { |
||||
|
deleteBySid(v.getSid()); |
||||
|
}); |
||||
|
} |
||||
|
list.removeAll(Collections.singleton(null)); |
||||
|
if (!list.isEmpty()) { |
||||
|
list.stream().forEach(details -> { |
||||
|
AdCompanyLogoffDetail adCompanyRegistrationDetail = new AdCompanyLogoffDetail(); |
||||
|
BeanUtil.copyProperties(details, adCompanyRegistrationDetail); |
||||
|
adCompanyRegistrationDetail.setMainSid(sid); |
||||
|
baseMapper.insert(adCompanyRegistrationDetail); |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
// 保存文件
|
||||
|
private void saveFiles(String sid, List<String> files, String attachType, String fileType) { |
||||
|
files.removeAll(Collections.singleton(null)); |
||||
|
oaAppendixService.saveFile(sid, files, attachType, fileType); |
||||
|
} |
||||
|
public ResultBean<List<AdCompanyLogoffListDetailVo>> getDetailByMainSid(String sid) { |
||||
|
ResultBean<List<AdCompanyLogoffListDetailVo>> rb = ResultBean.fireFail(); |
||||
|
List<AdCompanyLogoffListDetailVo> list = baseMapper.getDetailByMainSid(sid); |
||||
|
return rb.success().setData(list); |
||||
|
} |
||||
|
} |
@ -0,0 +1,23 @@ |
|||||
|
package com.yxt.anrui.oa.biz.adcompanylogoffdetail; |
||||
|
|
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: wangpengfei |
||||
|
* @date: 2025/1/16 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class AdCompanyLogoffDetailVo implements Vo { |
||||
|
private static final long serialVersionUID = -3330232160961910852L; |
||||
|
private String sid; |
||||
|
@ApiModelProperty("主表sid") |
||||
|
private String mainSid; |
||||
|
@ApiModelProperty("公司名称") |
||||
|
private String name; |
||||
|
@ApiModelProperty("法定代表人") |
||||
|
private String reason; |
||||
|
|
||||
|
} |
@ -0,0 +1,23 @@ |
|||||
|
package com.yxt.anrui.oa.biz.adcompanylogoffdetail; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: wangpengfei |
||||
|
* @date: 2025/1/21 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class AdCompanyLogoffListDetailVo { |
||||
|
|
||||
|
private String sid; |
||||
|
@ApiModelProperty("主表sid") |
||||
|
private String mainSid; |
||||
|
@ApiModelProperty("公司名称") |
||||
|
private String name; |
||||
|
@ApiModelProperty("法定代表人") |
||||
|
private String reason; |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,34 @@ |
|||||
|
package com.yxt.anrui.oa.biz.adcompanyregistrationdetail; |
||||
|
|
||||
|
import com.yxt.common.core.domain.BaseEntity; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: wangpengfei |
||||
|
* @date: 2025/1/16 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class AdCompanyRegistrationDetail extends BaseEntity { |
||||
|
private static final long serialVersionUID = 4980172913356706485L; |
||||
|
@ApiModelProperty("主表sid") |
||||
|
private String mainSid; |
||||
|
@ApiModelProperty("公司名称") |
||||
|
private String name; |
||||
|
@ApiModelProperty("法定代表人") |
||||
|
private String legalRepresentative; |
||||
|
@ApiModelProperty("注册资金") |
||||
|
private String registeredCapital; |
||||
|
@ApiModelProperty("股东及占股比例") |
||||
|
private String shareholder; |
||||
|
@ApiModelProperty("监事") |
||||
|
private Integer supervisor; |
||||
|
@ApiModelProperty("地址") |
||||
|
private String address; |
||||
|
@ApiModelProperty("经营范围") |
||||
|
private String businessScope; |
||||
|
@ApiModelProperty("印章") |
||||
|
private String seal; |
||||
|
|
||||
|
} |
@ -0,0 +1,37 @@ |
|||||
|
package com.yxt.anrui.oa.biz.adcompanyregistrationdetail; |
||||
|
|
||||
|
import com.yxt.anrui.oa.biz.oaform.FormCommon; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: wangpengfei |
||||
|
* @date: 2025/1/17 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class AdCompanyRegistrationDetailDto { |
||||
|
private String sid; |
||||
|
@ApiModelProperty("主表sid") |
||||
|
private String mainSid; |
||||
|
@ApiModelProperty("公司名称") |
||||
|
private String name; |
||||
|
@ApiModelProperty("法定代表人") |
||||
|
private String legalRepresentative; |
||||
|
@ApiModelProperty("注册资金") |
||||
|
private String registeredCapital; |
||||
|
@ApiModelProperty("股东及占股比例") |
||||
|
private String shareholder; |
||||
|
@ApiModelProperty("监事") |
||||
|
private Integer supervisor; |
||||
|
@ApiModelProperty("地址") |
||||
|
private String address; |
||||
|
@ApiModelProperty("经营范围") |
||||
|
private String businessScope; |
||||
|
@ApiModelProperty("印章") |
||||
|
private String seal; |
||||
|
|
||||
|
} |
@ -0,0 +1,19 @@ |
|||||
|
package com.yxt.anrui.oa.biz.adcompanyregistrationdetail; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: wangpengfei |
||||
|
* @date: 2025/1/17 |
||||
|
**/ |
||||
|
@Mapper |
||||
|
public interface AdCompanyRegistrationDetailMapper extends BaseMapper<AdCompanyRegistrationDetail> { |
||||
|
List<AdCompanyRegistrationDetailVo> getUpdateInit(String sid); |
||||
|
|
||||
|
List<AdCompanyRegistrationDetail> selectByMainSid(String sid); |
||||
|
List<AdCompanyRegistrationListDetailVo> getDetailByMainSid(String sid); |
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.yxt.anrui.oa.biz.adcompanyregistrationdetail.AdCompanyRegistrationDetailMapper"> |
||||
|
<select id="getUpdateInit" resultType="com.yxt.anrui.oa.biz.adcompanyregistrationdetail.AdCompanyRegistrationDetailVo"> |
||||
|
select * |
||||
|
from ad_company_registration_detail |
||||
|
where mainSid = #{sid} |
||||
|
</select> |
||||
|
|
||||
|
<select id="selectByMainSid" resultType="com.yxt.anrui.oa.biz.adcompanyregistrationdetail.AdCompanyRegistrationDetail"> |
||||
|
select * |
||||
|
from ad_company_registration_detail |
||||
|
where mainSid = #{sid} |
||||
|
</select> |
||||
|
<select id="getDetailByMainSid" resultType="com.yxt.anrui.oa.biz.adcompanyregistrationdetail.AdCompanyRegistrationListDetailVo"> |
||||
|
select * |
||||
|
from ad_company_registration_detail |
||||
|
where mainSid = #{sid} |
||||
|
</select> |
||||
|
</mapper> |
@ -0,0 +1,64 @@ |
|||||
|
package com.yxt.anrui.oa.biz.adcompanyregistrationdetail; |
||||
|
|
||||
|
import cn.hutool.core.bean.BeanUtil; |
||||
|
import com.yxt.anrui.oa.biz.adcompanyapply.AdCompanyApplyVo; |
||||
|
import com.yxt.anrui.oa.biz.oaappendix.OaAppendixMapper; |
||||
|
import com.yxt.anrui.oa.biz.oaappendix.OaAppendixService; |
||||
|
import com.yxt.anrui.oa.feign.file.OaFileEnum; |
||||
|
import com.yxt.common.base.service.MybatisBaseService; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.Collections; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: wangpengfei |
||||
|
* @date: 2025/1/17 |
||||
|
**/ |
||||
|
@Service |
||||
|
public class AdCompanyRegistrationDetailService extends MybatisBaseService<AdCompanyRegistrationDetailMapper, AdCompanyRegistrationDetail> { |
||||
|
|
||||
|
@Autowired |
||||
|
private OaAppendixMapper oaAppendixMapper; |
||||
|
@Autowired |
||||
|
private OaAppendixService oaAppendixService; |
||||
|
|
||||
|
public List<AdCompanyRegistrationDetailVo> getUpdateInit(String sid) { |
||||
|
return baseMapper.getUpdateInit(sid); |
||||
|
} |
||||
|
|
||||
|
public void saveDetails(List<AdCompanyRegistrationDetailDto> list, String sid) { |
||||
|
//根据sid查询明细并删除
|
||||
|
List<AdCompanyRegistrationDetail> list2 = baseMapper.selectByMainSid(sid); |
||||
|
list2.removeAll(Collections.singleton(null)); |
||||
|
if (!list2.isEmpty()) { |
||||
|
list2.stream().forEach(v -> { |
||||
|
deleteBySid(v.getSid()); |
||||
|
}); |
||||
|
} |
||||
|
list.removeAll(Collections.singleton(null)); |
||||
|
if (!list.isEmpty()) { |
||||
|
list.stream().forEach(details -> { |
||||
|
AdCompanyRegistrationDetail adCompanyRegistrationDetail = new AdCompanyRegistrationDetail(); |
||||
|
BeanUtil.copyProperties(details, adCompanyRegistrationDetail); |
||||
|
adCompanyRegistrationDetail.setMainSid(sid); |
||||
|
baseMapper.insert(adCompanyRegistrationDetail); |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
// 保存文件
|
||||
|
private void saveFiles(String sid, List<String> files, String attachType, String fileType) { |
||||
|
files.removeAll(Collections.singleton(null)); |
||||
|
oaAppendixService.saveFile(sid, files, attachType, fileType); |
||||
|
} |
||||
|
public ResultBean<List<AdCompanyRegistrationListDetailVo>> getDetailByMainSid(String sid) { |
||||
|
ResultBean<List<AdCompanyRegistrationListDetailVo>> rb = ResultBean.fireFail(); |
||||
|
List<AdCompanyRegistrationListDetailVo> list = baseMapper.getDetailByMainSid(sid); |
||||
|
return rb.success().setData(list); |
||||
|
} |
||||
|
} |
@ -0,0 +1,39 @@ |
|||||
|
package com.yxt.anrui.oa.biz.adcompanyregistrationdetail; |
||||
|
|
||||
|
import com.yxt.anrui.oa.biz.oaform.FormCommon; |
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: wangpengfei |
||||
|
* @date: 2025/1/16 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class AdCompanyRegistrationDetailVo implements Vo { |
||||
|
private static final long serialVersionUID = -3330232160961910852L; |
||||
|
private String sid; |
||||
|
@ApiModelProperty("主表sid") |
||||
|
private String mainSid; |
||||
|
@ApiModelProperty("公司名称") |
||||
|
private String name; |
||||
|
@ApiModelProperty("法定代表人") |
||||
|
private String legalRepresentative; |
||||
|
@ApiModelProperty("注册资金") |
||||
|
private String registeredCapital; |
||||
|
@ApiModelProperty("股东及占股比例") |
||||
|
private String shareholder; |
||||
|
@ApiModelProperty("监事") |
||||
|
private Integer supervisor; |
||||
|
@ApiModelProperty("地址") |
||||
|
private String address; |
||||
|
@ApiModelProperty("经营范围") |
||||
|
private String businessScope; |
||||
|
@ApiModelProperty("印章") |
||||
|
private String seal; |
||||
|
|
||||
|
} |
@ -0,0 +1,36 @@ |
|||||
|
package com.yxt.anrui.oa.biz.adcompanyregistrationdetail; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: wangpengfei |
||||
|
* @date: 2025/1/21 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class AdCompanyRegistrationListDetailVo { |
||||
|
|
||||
|
private String sid; |
||||
|
@ApiModelProperty("公司名称") |
||||
|
private String name; |
||||
|
@ApiModelProperty("法定代表人") |
||||
|
private String legalRepresentative; |
||||
|
@ApiModelProperty("注册资金") |
||||
|
private String registeredCapital; |
||||
|
@ApiModelProperty("股东及占股比例") |
||||
|
private String shareholder; |
||||
|
@ApiModelProperty("监事") |
||||
|
private Integer supervisor; |
||||
|
@ApiModelProperty("地址") |
||||
|
private String address; |
||||
|
@ApiModelProperty("经营范围") |
||||
|
private String businessScope; |
||||
|
@ApiModelProperty("印章") |
||||
|
private String seal; |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,23 @@ |
|||||
|
package com.yxt.anrui.oa.biz.adcompanytransferdetail; |
||||
|
|
||||
|
import com.yxt.common.core.domain.BaseEntity; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: wangpengfei |
||||
|
* @date: 2025/1/16 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class AdCompanyTransferDetail extends BaseEntity { |
||||
|
private static final long serialVersionUID = 4980172913356706485L; |
||||
|
@ApiModelProperty("主表sid") |
||||
|
private String mainSid; |
||||
|
@ApiModelProperty("公司名称") |
||||
|
private String name; |
||||
|
@ApiModelProperty("公司转让情况") |
||||
|
private String situation; |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,21 @@ |
|||||
|
package com.yxt.anrui.oa.biz.adcompanytransferdetail; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: wangpengfei |
||||
|
* @date: 2025/1/17 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class AdCompanyTransferDetailDto { |
||||
|
private String sid; |
||||
|
@ApiModelProperty("主表sid") |
||||
|
private String mainSid; |
||||
|
@ApiModelProperty("公司名称") |
||||
|
private String name; |
||||
|
@ApiModelProperty("公司转让情况") |
||||
|
private String situation; |
||||
|
|
||||
|
} |
@ -0,0 +1,19 @@ |
|||||
|
package com.yxt.anrui.oa.biz.adcompanytransferdetail; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: wangpengfei |
||||
|
* @date: 2025/1/17 |
||||
|
**/ |
||||
|
@Mapper |
||||
|
public interface AdCompanyTransferDetailMapper extends BaseMapper<AdCompanyTransferDetail> { |
||||
|
List<AdCompanyTransferDetailVo> getUpdateInit(String sid); |
||||
|
|
||||
|
List<AdCompanyTransferDetail> selectByMainSid(String sid); |
||||
|
List<AdCompanyTransferListDetailVo> getDetailByMainSid(String sid); |
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.yxt.anrui.oa.biz.adcompanytransferdetail.AdCompanyTransferDetailMapper"> |
||||
|
<select id="getUpdateInit" resultType="com.yxt.anrui.oa.biz.adcompanytransferdetail.AdCompanyTransferDetailVo"> |
||||
|
select * |
||||
|
from ad_company_transger_detail |
||||
|
where mainSid = #{sid} |
||||
|
</select> |
||||
|
|
||||
|
<select id="selectByMainSid" resultType="com.yxt.anrui.oa.biz.adcompanytransferdetail.AdCompanyTransferDetail"> |
||||
|
select * |
||||
|
from ad_company_transger_detail |
||||
|
where mainSid = #{sid} |
||||
|
</select> |
||||
|
<select id="getDetailByMainSid" resultType="com.yxt.anrui.oa.biz.adcompanytransferdetail.AdCompanyTransferListDetailVo"> |
||||
|
select * |
||||
|
from ad_company_transger_detail |
||||
|
where mainSid = #{sid} |
||||
|
</select> |
||||
|
</mapper> |
@ -0,0 +1,62 @@ |
|||||
|
package com.yxt.anrui.oa.biz.adcompanytransferdetail; |
||||
|
|
||||
|
import cn.hutool.core.bean.BeanUtil; |
||||
|
import com.yxt.anrui.oa.biz.oaappendix.OaAppendixMapper; |
||||
|
import com.yxt.anrui.oa.biz.oaappendix.OaAppendixService; |
||||
|
import com.yxt.common.base.service.MybatisBaseService; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.Collections; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: wangpengfei |
||||
|
* @date: 2025/1/17 |
||||
|
**/ |
||||
|
@Service |
||||
|
public class AdCompanyTransferDetailService extends MybatisBaseService<AdCompanyTransferDetailMapper, AdCompanyTransferDetail> { |
||||
|
|
||||
|
@Autowired |
||||
|
private OaAppendixMapper oaAppendixMapper; |
||||
|
@Autowired |
||||
|
private OaAppendixService oaAppendixService; |
||||
|
|
||||
|
public List<AdCompanyTransferDetailVo> getUpdateInit(String sid) { |
||||
|
return baseMapper.getUpdateInit(sid); |
||||
|
} |
||||
|
|
||||
|
public void saveDetails(List<AdCompanyTransferDetailDto> list, String sid) { |
||||
|
//根据sid查询明细并删除
|
||||
|
List<AdCompanyTransferDetail> list2 = baseMapper.selectByMainSid(sid); |
||||
|
list2.removeAll(Collections.singleton(null)); |
||||
|
if (!list2.isEmpty()) { |
||||
|
list2.stream().forEach(v -> { |
||||
|
deleteBySid(v.getSid()); |
||||
|
}); |
||||
|
} |
||||
|
list.removeAll(Collections.singleton(null)); |
||||
|
if (!list.isEmpty()) { |
||||
|
list.stream().forEach(details -> { |
||||
|
AdCompanyTransferDetail adCompanyRegistrationDetail = new AdCompanyTransferDetail(); |
||||
|
BeanUtil.copyProperties(details, adCompanyRegistrationDetail); |
||||
|
adCompanyRegistrationDetail.setMainSid(sid); |
||||
|
baseMapper.insert(adCompanyRegistrationDetail); |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
// 保存文件
|
||||
|
private void saveFiles(String sid, List<String> files, String attachType, String fileType) { |
||||
|
files.removeAll(Collections.singleton(null)); |
||||
|
oaAppendixService.saveFile(sid, files, attachType, fileType); |
||||
|
} |
||||
|
public ResultBean<List<AdCompanyTransferListDetailVo>> getDetailByMainSid(String sid) { |
||||
|
ResultBean<List<AdCompanyTransferListDetailVo>> rb = ResultBean.fireFail(); |
||||
|
List<AdCompanyTransferListDetailVo> list = baseMapper.getDetailByMainSid(sid); |
||||
|
return rb.success().setData(list); |
||||
|
} |
||||
|
} |
@ -0,0 +1,23 @@ |
|||||
|
package com.yxt.anrui.oa.biz.adcompanytransferdetail; |
||||
|
|
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: wangpengfei |
||||
|
* @date: 2025/1/16 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class AdCompanyTransferDetailVo implements Vo { |
||||
|
private static final long serialVersionUID = -3330232160961910852L; |
||||
|
private String sid; |
||||
|
@ApiModelProperty("主表sid") |
||||
|
private String mainSid; |
||||
|
@ApiModelProperty("公司名称") |
||||
|
private String name; |
||||
|
@ApiModelProperty("公司转让情况") |
||||
|
private String situation; |
||||
|
|
||||
|
} |
@ -0,0 +1,23 @@ |
|||||
|
package com.yxt.anrui.oa.biz.adcompanytransferdetail; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: wangpengfei |
||||
|
* @date: 2025/1/21 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class AdCompanyTransferListDetailVo { |
||||
|
|
||||
|
private String sid; |
||||
|
@ApiModelProperty("主表sid") |
||||
|
private String mainSid; |
||||
|
@ApiModelProperty("公司名称") |
||||
|
private String name; |
||||
|
@ApiModelProperty("公司转让情况") |
||||
|
private String situation; |
||||
|
|
||||
|
|
||||
|
} |
Loading…
Reference in new issue