Merge remote-tracking branch 'origin/dev_New' into dev_New
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | #产åéè´§å表 |
| | | drop table if exists purchase_return_orders; |
| | | create table purchase_return_orders |
| | | ( |
| | | id bigint auto_increment primary key, |
| | | no varchar(255) null comment 'éè´§åç¼å·', |
| | | return_type tinyint not null default 0 comment 'éè´§æ¹å¼ 0éè´§éæ¬¾ 1ææ¶', |
| | | supplier_id bigint not null default 0 comment 'ä¾åºåid', |
| | | project_id bigint not null default 0 comment '项ç®id', |
| | | project_phase tinyint not null default 0 comment '项ç®é¶æ®µ', |
| | | prepared_at datetime null comment 'å¶åæ¥æ', |
| | | prepared_user_id bigint not null default 0 comment 'å¶å人id', |
| | | return_user_id bigint not null default 0 comment 'éæäººid', |
| | | purchase_ledger_id bigint not null default 0 comment 'éè´è®¢åid', |
| | | remark text null comment '夿³¨', |
| | | create_time datetime null comment 'å½å
¥æ¶é´', |
| | | update_time datetime null comment 'æ´æ°æ¶é´', |
| | | index idx_purchase_ledger_id (purchase_ledger_id), |
| | | index idx_project_id (project_id) |
| | | ); |
| | | |
| | | #产åéè´§åä¸éè´äº§åå
³è表 |
| | | drop table if exists purchase_return_order_products; |
| | | create table purchase_return_order_products |
| | | ( |
| | | id bigint auto_increment primary key, |
| | | purchase_return_order_id bigint not null default 0 comment 'éè´§åid', |
| | | sales_ledger_product_id bigint not null default 0 comment 'éè´äº§åid', |
| | | create_time datetime null comment 'å½å
¥æ¶é´', |
| | | update_time datetime null comment 'æ´æ°æ¶é´', |
| | | index idx_purchase_return_order_id (purchase_return_order_id), |
| | | index idx_sales_ledger_product_id (sales_ledger_product_id) |
| | | ); |
| | |
| | | <version>${hutool.version}</version>
|
| | | </dependency>
|
| | |
|
| | | <dependency>
|
| | | <groupId>cn.hutool</groupId>
|
| | | <artifactId>hutool-all</artifactId>
|
| | | <version>5.8.43</version>
|
| | | </dependency>
|
| | |
|
| | |
|
| | | </dependencies>
|
| | |
|
| | | <build>
|
| | |
| | | @GetMapping("/listPage") |
| | | @ApiOperation("å®åæå¡-å页æ¥è¯¢") |
| | | @Log(title = "å®åæå¡-å页æ¥è¯¢", businessType = BusinessType.OTHER) |
| | | public AjaxResult listPage(Page page, AfterSalesService afterSalesService) { |
| | | IPage<AfterSalesService> listPage = afterSalesServiceService.listPage(page, afterSalesService); |
| | | public AjaxResult listPage(Page page, AfterSalesServiceNewDto afterSalesService) { |
| | | IPage<AfterSalesServiceNewDto> listPage = afterSalesServiceService.listPage(page, afterSalesService); |
| | | return AjaxResult.success(listPage); |
| | | } |
| | | |
| | |
| | | @ApiOperation("å®åæå¡-åé¦ç»è®°") |
| | | public void export(HttpServletResponse response) { |
| | | Page page = new Page(-1,-1); |
| | | AfterSalesService afterSalesService = new AfterSalesService(); |
| | | IPage<AfterSalesService> listPage = afterSalesServiceService.listPage(page, afterSalesService); |
| | | AfterSalesServiceNewDto afterSalesService = new AfterSalesServiceNewDto(); |
| | | IPage<AfterSalesServiceNewDto> listPage = afterSalesServiceService.listPage(page, afterSalesService); |
| | | List<AfterSalesServiceExeclDto> list = new ArrayList<>(); |
| | | listPage.getRecords().forEach(item -> { |
| | | AfterSalesServiceExeclDto dto = new AfterSalesServiceExeclDto(); |
| | |
| | | @ApiOperation("å®åæå¡-å®åå¤ç") |
| | | public void exportTwo(HttpServletResponse response) { |
| | | Page page = new Page(-1,-1); |
| | | AfterSalesService afterSalesService = new AfterSalesService(); |
| | | IPage<AfterSalesService> listPage = afterSalesServiceService.listPage(page, afterSalesService); |
| | | AfterSalesServiceNewDto afterSalesService = new AfterSalesServiceNewDto(); |
| | | IPage<AfterSalesServiceNewDto> listPage = afterSalesServiceService.listPage(page, afterSalesService); |
| | | listPage.getRecords().forEach(item -> { |
| | | item.setStatusName(item.getStatus().toString()); |
| | | }); |
| | | ExcelUtil<AfterSalesService> util = new ExcelUtil<AfterSalesService>(AfterSalesService.class); |
| | | ExcelUtil<AfterSalesServiceNewDto> util = new ExcelUtil<AfterSalesServiceNewDto>(AfterSalesServiceNewDto.class); |
| | | util.exportExcel(response, listPage.getRecords() , "å®åå¤ç"); |
| | | } |
| | | |
| | |
| | | return AjaxResult.success(afterSalesServiceService.getAfterSalesServiceNewDtoById(id)); |
| | | } |
| | | |
| | | @ApiOperation("å®åæå¡-ç»è®¡å·¥åæ
åµ") |
| | | @GetMapping("count") |
| | | public AjaxResult count() { |
| | | return AjaxResult.success(afterSalesServiceService.countAfterSalesService()); |
| | | } |
| | | |
| | | } |
| | |
| | | private List<Long> productModelIdList; |
| | | |
| | | private SalesLedgerDto salesLedgerDto; |
| | | |
| | | private String salesContractNo; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.aftersalesservice.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class CountDto { |
| | | |
| | | private Integer status ; |
| | | |
| | | private Integer count ; |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.aftersalesservice.dto.AfterSalesServiceNewDto; |
| | | import com.ruoyi.aftersalesservice.dto.CountDto; |
| | | import com.ruoyi.aftersalesservice.pojo.AfterSalesService; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author :yys |
| | |
| | | * @param afterSalesService |
| | | * @return |
| | | */ |
| | | IPage<AfterSalesService> listPage(Page page,@Param("req") AfterSalesService afterSalesService); |
| | | IPage<AfterSalesServiceNewDto> listPage(Page page, @Param("req") AfterSalesServiceNewDto afterSalesService); |
| | | |
| | | List<CountDto> countAfterSalesService(); |
| | | } |
| | |
| | | @ApiModelProperty("ç¶æ 1-å¾
å¤ç 2-å·²å¤ç") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("å®ååå·") |
| | | private String afterSalesServiceNo; |
| | | |
| | | |
| | | @Excel(name = "ç¶æ", readConverterExp = "1=å¾
å¤ç,2=å·²å¤ç") |
| | | @TableField(exist = false) |
| | | private String statusName; |
| | | |
| | | /** |
| | |
| | | private String deptName; |
| | | |
| | | |
| | | @TableField("å®åç±»å") |
| | | @ApiModelProperty("å®åç±»å") |
| | | private String serviceType; |
| | | |
| | | @TableField("ç´§æ¥ç¨åº¦") |
| | | @ApiModelProperty("ç´§æ¥ç¨åº¦") |
| | | private String urgency; |
| | | |
| | | @TableField("éå®å°è´¦ID") |
| | | @ApiModelProperty("éå®å°è´¦ID") |
| | | private Long salesLedgerId; |
| | | |
| | | @TableField("åé
人ID") |
| | | @ApiModelProperty("åé
人ID") |
| | | private Long distributionUserId; |
| | | |
| | | |
| | | @TableField("产ååå·IDs") |
| | | @ApiModelProperty("产ååå·IDs") |
| | | private String productModelIds; |
| | | |
| | | |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.aftersalesservice.dto.AfterSalesServiceNewDto; |
| | | import com.ruoyi.aftersalesservice.dto.CountDto; |
| | | import com.ruoyi.aftersalesservice.pojo.AfterSalesService; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author :yys |
| | |
| | | * @param afterSalesService |
| | | * @return |
| | | */ |
| | | IPage<AfterSalesService> listPage(Page page, AfterSalesService afterSalesService); |
| | | IPage<AfterSalesServiceNewDto> listPage(Page page, AfterSalesServiceNewDto afterSalesService); |
| | | |
| | | boolean addAfterSalesServiceDto(AfterSalesServiceNewDto afterSalesServiceNewDto); |
| | | |
| | | AfterSalesServiceNewDto getAfterSalesServiceNewDtoById(Long id); |
| | | |
| | | List<CountDto> countAfterSalesService(); |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.aftersalesservice.dto.AfterSalesServiceNewDto; |
| | | import com.ruoyi.aftersalesservice.dto.CountDto; |
| | | import com.ruoyi.aftersalesservice.mapper.AfterSalesServiceMapper; |
| | | import com.ruoyi.aftersalesservice.pojo.AfterSalesService; |
| | | import com.ruoyi.aftersalesservice.service.AfterSalesServiceService; |
| | | import com.ruoyi.common.utils.OrderUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.project.system.domain.SysDept; |
| | |
| | | import com.ruoyi.sales.pojo.SalesLedgerProduct; |
| | | import com.ruoyi.sales.service.ISalesLedgerProductService; |
| | | import com.ruoyi.sales.service.ISalesLedgerService; |
| | | import com.ruoyi.sales.service.impl.SalesLedgerProductServiceImpl; |
| | | import com.ruoyi.sales.service.impl.SalesLedgerServiceImpl; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | private ISalesLedgerService salesLedgerService; |
| | | |
| | | @Override |
| | | public IPage<AfterSalesService> listPage(Page page, AfterSalesService afterSalesService) { |
| | | public IPage<AfterSalesServiceNewDto> listPage(Page page, AfterSalesServiceNewDto afterSalesService) { |
| | | Long tenantId = SecurityUtils.getLoginUser().getTenantId(); |
| | | SysDept sysDept = sysDeptMapper.selectDeptById(tenantId); |
| | | IPage<AfterSalesService> afterSalesServiceIPage = afterSalesServiceMapper.listPage(page, afterSalesService); |
| | | IPage<AfterSalesServiceNewDto> afterSalesServiceIPage = afterSalesServiceMapper.listPage(page, afterSalesService); |
| | | afterSalesServiceIPage.getRecords().forEach(item -> { |
| | | item.setDeptName(sysDept.getDeptName()); |
| | | }); |
| | |
| | | SysUser sysUser = sysUserMapper.selectUserById(afterSalesServiceNewDto.getCheckUserId()); |
| | | if(sysUser == null) throw new RuntimeException("å®¡æ ¸äººä¸åå¨"); |
| | | afterSalesServiceNewDto.setCheckNickName(sysUser.getNickName()); |
| | | if (StringUtils.isEmpty(afterSalesServiceNewDto.getAfterSalesServiceNo())) { |
| | | String string = OrderUtils.countAfterServiceTodayByCreateTime(afterSalesServiceMapper, "SH_"); |
| | | afterSalesServiceNewDto.setAfterSalesServiceNo(string); |
| | | } |
| | | return this.save(afterSalesServiceNewDto); |
| | | } |
| | | |
| | |
| | | AfterSalesService afterSalesService = afterSalesServiceMapper.selectById(id); |
| | | SalesLedger byId = salesLedgerService.getById(afterSalesService.getSalesLedgerId()); |
| | | List<Long> collect = Arrays.stream(afterSalesService.getProductModelIds().split(",")).map(Long::valueOf).collect(Collectors.toList()); |
| | | List<SalesLedgerProduct> list = salesLedgerProductService.list(new QueryWrapper<SalesLedgerProduct>().lambda().in(SalesLedgerProduct::getProductModelId, collect)); |
| | | List<SalesLedgerProduct> list = salesLedgerProductService.list(new QueryWrapper<SalesLedgerProduct>().lambda().in(SalesLedgerProduct::getId, collect)); |
| | | AfterSalesServiceNewDto afterSalesServiceNewDto = new AfterSalesServiceNewDto(); |
| | | BeanUtils.copyProperties(afterSalesService, afterSalesServiceNewDto); |
| | | SalesLedgerDto salesLedgerDto = new SalesLedgerDto(); |
| | |
| | | afterSalesServiceNewDto.setSalesLedgerDto(salesLedgerDto); |
| | | return afterSalesServiceNewDto; |
| | | } |
| | | |
| | | @Override |
| | | public List<CountDto> countAfterSalesService() { |
| | | List<CountDto> stringIntegerHashMap = afterSalesServiceMapper.countAfterSalesService(); |
| | | Integer total = 0; |
| | | for (CountDto countDto : stringIntegerHashMap) { |
| | | total += countDto.getCount(); |
| | | } |
| | | CountDto countDto = new CountDto(); |
| | | countDto.setStatus(3); |
| | | countDto.setCount(total); |
| | | stringIntegerHashMap.add(countDto); |
| | | |
| | | return stringIntegerHashMap; |
| | | |
| | | } |
| | | } |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import com.ruoyi.basic.dto.CustomerFollowUpFileDto; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | @PostMapping("/upload/{followUpId}") |
| | | @Log(title = "客æ·è·è¿-ä¸ä¼ éä»¶", businessType = BusinessType.INSERT) |
| | | public AjaxResult uploadFiles(@RequestParam("files") List<MultipartFile> files, @PathVariable Integer followUpId) { |
| | | customerFollowUpService.addFollowUpFiles(files, followUpId); |
| | | return AjaxResult.success(); |
| | | return AjaxResult.success(customerFollowUpService.addFollowUpFiles(files, followUpId)); |
| | | } |
| | | |
| | | /** |
| | | * ä¸ä¼ è·è¿éä»¶ï¼å¤ç¨ï¼æ IDï¼ |
| | | */ |
| | | @ApiOperation("ä¸ä¼ éä»¶(å¤ç¨)") |
| | | @PostMapping("/upload") |
| | | @Log(title = "ä¸ä¼ éä»¶(å¤ç¨)", businessType = BusinessType.INSERT) |
| | | public AjaxResult uploadFiles(@RequestParam("files") List<MultipartFile> files, @RequestParam(required = false) String name) { |
| | | List<CustomerFollowUpFileDto> uploadedFiles = customerFollowUpService.addFollowUpFiles(files, null); |
| | | return AjaxResult.success(uploadedFiles); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éæ¥è¯¢éä»¶å表 |
| | | */ |
| | | @ApiOperation("æ¹éæ¥è¯¢éä»¶å表") |
| | | @PostMapping("/file/list") |
| | | public AjaxResult getFileList(@RequestBody List<Long> ids) { |
| | | return AjaxResult.success(customerFollowUpService.getFollowUpFilesByIds(ids)); |
| | | } |
| | | |
| | | /** |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.dto; |
| | | |
| | | import com.ruoyi.basic.pojo.CustomerFollowUpFile; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * 客æ·è·è¿éä»¶DTO |
| | | * |
| | | * @author deslrey |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class CustomerFollowUpFileDto extends CustomerFollowUpFile { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ä¸ä¼ è
å§å |
| | | */ |
| | | private String createUserName; |
| | | |
| | | /** |
| | | * ä¿®æ¹è
å§å |
| | | */ |
| | | private String updateUserName; |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.basic.pojo.CustomerFollowUpFile; |
| | | import com.ruoyi.common.vo.SimpleFileVo; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | import javax.validation.constraints.Null; |
| | | import java.util.List; |
| | | import java.util.function.BiConsumer; |
| | | import java.util.function.Function; |
| | | |
| | | /** |
| | | * <br> |
| | |
| | | * @since 2026/03/04 14:52 |
| | | */ |
| | | public interface CustomerFollowUpFileService extends IService<CustomerFollowUpFile> { |
| | | |
| | | /** |
| | | * æ ¹æ® xx,xxx,xxæ¹éæ¥è¯¢å¹¶ä¸åºæå
¥SimpleFileVoè¿å
¥ |
| | | * @param list |
| | | * @param getAttachmentIds |
| | | * @param setAttachmentList |
| | | * @param <T> |
| | | */ |
| | | <T> void fillAttachment( |
| | | @Null List<T> list, |
| | | @NotNull Function<T, String> getAttachmentIds, |
| | | @NotNull BiConsumer<T, List<SimpleFileVo>> setAttachmentList |
| | | ); |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.basic.dto.CustomerFollowUpDto; |
| | | import com.ruoyi.basic.pojo.CustomerFollowUp; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import com.ruoyi.basic.dto.CustomerFollowUpFileDto; |
| | | import com.ruoyi.basic.pojo.CustomerFollowUpFile; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | /** |
| | | * æ·»å è·è¿éä»¶ |
| | | */ |
| | | void addFollowUpFiles(List<MultipartFile> files, Integer followUpId); |
| | | List<CustomerFollowUpFileDto> addFollowUpFiles(List<MultipartFile> files, Integer followUpId); |
| | | |
| | | /** |
| | | * å é¤è·è¿éä»¶ |
| | |
| | | void deleteFollowUpFile(Integer fileId); |
| | | |
| | | /** |
| | | * æ ¹æ®éä»¶IDéåè·åéä»¶å表 |
| | | */ |
| | | List<CustomerFollowUpFile> getFollowUpFilesByIds(Collection<Long> fileIds); |
| | | |
| | | /** |
| | | * è·åè·è¿è¯¦æ
|
| | | */ |
| | | CustomerFollowUpDto getFollowUpWithFiles(Integer id); |
| | |
| | | package com.ruoyi.basic.service.impl; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.stream.CollectorUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.basic.mapper.CustomerFollowUpFileMapper; |
| | | import com.ruoyi.basic.pojo.CustomerFollowUpFile; |
| | | import com.ruoyi.basic.service.CustomerFollowUpFileService; |
| | | import com.ruoyi.basic.service.CustomerFollowUpService; |
| | | import com.ruoyi.common.vo.SimpleFileVo; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.*; |
| | | import java.util.function.BiConsumer; |
| | | import java.util.function.Function; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <br> |
| | |
| | | * @since 2026/03/04 14:53 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class CustomerFollowUpFileServiceImpl extends ServiceImpl<CustomerFollowUpFileMapper, CustomerFollowUpFile> implements CustomerFollowUpFileService { |
| | | |
| | | private final CustomerFollowUpService customerFollowUpService; |
| | | |
| | | |
| | | @Override |
| | | public <T> void fillAttachment(List<T> list, Function<T, String> getAttachmentIds, BiConsumer<T, List<SimpleFileVo>> setAttachmentList) { |
| | | if (CollUtil.isEmpty(list)) { |
| | | return; |
| | | } |
| | | // æ¶éæææä»¶ID |
| | | Set<Long> ids = list.stream() |
| | | .map(getAttachmentIds) |
| | | .filter(StrUtil::isNotBlank) |
| | | .flatMap(s -> Arrays.stream(s.split(","))) |
| | | .map(Long::valueOf) |
| | | .collect(Collectors.toSet()); |
| | | |
| | | List<CustomerFollowUpFile> followUpFilesByIds = customerFollowUpService.getFollowUpFilesByIds(ids); |
| | | if (CollUtil.isEmpty(followUpFilesByIds)) { |
| | | return; |
| | | } |
| | | Map<Long, SimpleFileVo> collectMap = followUpFilesByIds.stream().map(SimpleFileVo::convert).collect(Collectors.toMap( |
| | | SimpleFileVo::getId, |
| | | Function.identity() |
| | | )); |
| | | list.forEach(t -> { |
| | | String attachmentIds = getAttachmentIds.apply(t); |
| | | if (StrUtil.isNotBlank(attachmentIds)) { |
| | | List<SimpleFileVo> fileVos = Arrays.stream(attachmentIds.split(",")) |
| | | .map(Long::valueOf) |
| | | .map(it->collectMap.getOrDefault(it, (SimpleFileVo) Collections.emptyList())) |
| | | .collect(Collectors.toList()); |
| | | setAttachmentList.accept(t, fileVos); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | |
| | | import com.ruoyi.basic.pojo.CustomerFollowUpFile; |
| | | import com.ruoyi.basic.service.CustomerFollowUpFileService; |
| | | import com.ruoyi.basic.service.CustomerFollowUpService; |
| | | import com.ruoyi.basic.service.ICustomerService; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.basic.dto.CustomerFollowUpFileDto; |
| | | import com.ruoyi.project.system.domain.SysUser; |
| | | import com.ruoyi.project.system.service.ISysUserService; |
| | | |
| | | import org.apache.commons.io.FilenameUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | import java.util.UUID; |
| | | |
| | |
| | | |
| | | @Value("${file.upload-dir}") |
| | | private String uploadDir; |
| | | |
| | | @Autowired |
| | | private ISysUserService sysUserService; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void addFollowUpFiles(List<MultipartFile> files, Integer followUpId) { |
| | | handleFollowUpFiles(files, followUpId); |
| | | public List<CustomerFollowUpFileDto> addFollowUpFiles(List<MultipartFile> files, Integer followUpId) { |
| | | return handleFollowUpFiles(files, followUpId); |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | } |
| | | |
| | | private void handleFollowUpFiles(List<MultipartFile> multipartFiles, Integer followUpId) { |
| | | @Override |
| | | public List<CustomerFollowUpFile> getFollowUpFilesByIds(Collection<Long> fileIds) { |
| | | if (fileIds == null || fileIds.isEmpty()) { |
| | | return new ArrayList<>(0); |
| | | } |
| | | |
| | | LambdaQueryWrapper<CustomerFollowUpFile> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.in(CustomerFollowUpFile::getId, fileIds) |
| | | .select(CustomerFollowUpFile::getId, CustomerFollowUpFile::getFileUrl, CustomerFollowUpFile::getFileName); |
| | | return customerFollowUpFileService.list(queryWrapper); |
| | | } |
| | | |
| | | private List<CustomerFollowUpFileDto> handleFollowUpFiles(List<MultipartFile> multipartFiles, Integer followUpId) { |
| | | List<CustomerFollowUpFile> fileList = new ArrayList<>(); |
| | | List<CustomerFollowUpFileDto> dtoList = new ArrayList<>(); |
| | | if (multipartFiles == null || multipartFiles.isEmpty()) { |
| | | return; |
| | | return dtoList; |
| | | } |
| | | |
| | | Long currentUserId = SecurityUtils.getUserId(); |
| | | Long currentTenantId = SecurityUtils.getLoginUser().getTenantId(); |
| | | List<CustomerFollowUpFile> fileList = new ArrayList<>(); |
| | | |
| | | for (MultipartFile file : multipartFiles) { |
| | | if (file == null || file.isEmpty()) { |
| | |
| | | |
| | | String originalFilename = file.getOriginalFilename(); |
| | | String fileExtension = FilenameUtils.getExtension(originalFilename); |
| | | String formalFilename = followUpId + "_" + |
| | | String prefix = (followUpId != null) ? followUpId.toString() : "temp"; |
| | | String formalFilename = prefix + "_" + |
| | | System.currentTimeMillis() + "_" + |
| | | UUID.randomUUID().toString().substring(0, 8) + |
| | | (StringUtils.hasText(fileExtension) ? "." + fileExtension : ""); |
| | |
| | | } |
| | | if (!fileList.isEmpty()) { |
| | | customerFollowUpFileService.saveBatch(fileList); |
| | | return convertToDtoList(fileList); |
| | | } |
| | | return dtoList; |
| | | } |
| | | |
| | | private List<CustomerFollowUpFileDto> convertToDtoList(List<CustomerFollowUpFile> fileList) { |
| | | List<CustomerFollowUpFileDto> dtoList = new ArrayList<>(); |
| | | if (fileList == null || fileList.isEmpty()) { |
| | | return dtoList; |
| | | } |
| | | for (CustomerFollowUpFile entity : fileList) { |
| | | CustomerFollowUpFileDto dto = new CustomerFollowUpFileDto(); |
| | | BeanUtils.copyProperties(entity, dto); |
| | | |
| | | if (entity.getCreateUser() != null) { |
| | | SysUser createUser = sysUserService.selectUserById(entity.getCreateUser()); |
| | | if (createUser != null) { |
| | | dto.setCreateUserName(createUser.getNickName()); |
| | | } |
| | | } |
| | | if (entity.getUpdateUser() != null) { |
| | | SysUser updateUser = sysUserService.selectUserById(entity.getUpdateUser()); |
| | | if (updateUser != null) { |
| | | dto.setUpdateUserName(updateUser.getNickName()); |
| | | } |
| | | } |
| | | dtoList.add(dto); |
| | | } |
| | | return dtoList; |
| | | } |
| | | |
| | | private void validateFollowUp(CustomerFollowUp followUp) { |
| | |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | * @date : 2025/9/15 15:31 |
| | | */ |
| | | public class OrderUtils { |
| | | |
| | | /** |
| | | * List<Integer> 转æ¢ä¸º Long[] æ°ç» |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | public static Long[] listIntegerToLongArray(List<Integer> ids) { |
| | | return ids.stream() |
| | | // å¤çnullå¼ï¼å¦æå
ç´ ä¸ºnullï¼è½¬æ¢ä¸º0Lï¼å¯æ ¹æ®ä¸å¡è°æ´ï¼æ¯å¦æå¼å¸¸ï¼ |
| | | .map(id -> id != null ? id.longValue() : -1L) |
| | | // å°Stream<Long>转æ¢ä¸ºLong[]æ°ç» |
| | | .toArray(Long[]::new); |
| | | } |
| | | |
| | | /** |
| | | * å¤æç®æ idæ¯å¦å¨éå·åéçåç¬¦ä¸²ä¸ |
| | | * @param targetId |
| | | * @param str |
| | | * @return |
| | | */ |
| | | public boolean isStaffIdExist(Object targetId,String str) { |
| | | // ç©ºå¼æ ¡éªï¼é¿å
空æé |
| | | if (str == null || str.trim().isEmpty() || targetId == null) { |
| | | return false; |
| | | } |
| | | // æéå·å岿æ°ç» |
| | | String[] idArray = str.split(","); |
| | | // éåæ°ç»å¤ææ¯å¦å
å«ç®æ id |
| | | for (String id : idArray) { |
| | | // å»é¤ç©ºæ ¼ï¼é²æ¢åç¬¦ä¸²ä¸æå¤ä½ç©ºæ ¼ï¼å¦"1, 121"ï¼ |
| | | String cleanId = id.trim(); |
| | | // 转æ¢ä¸ºæ°åå¹¶æ¯è¾ |
| | | try { |
| | | if (cleanId.equals(String.valueOf(targetId))) { |
| | | return true; |
| | | } |
| | | } catch (NumberFormatException e) { |
| | | // è¥åå¨éæ°åIDï¼ç´æ¥è¿åfalse |
| | | return false; |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | // æ¼æ¥è®¢åç¼å· preFix + æ¶é´ï¼yyyyMMddï¼ + è®¢åæ°é(001) |
| | | return preFix + LocalDate.now().format(DateTimeFormatter.ISO_LOCAL_DATE).replaceAll("-", "") + String.format("%03d", (aLong + 1)) + "-" + new Date().getTime(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ¥è¯¢å½å¤©ï¼åºäºcreateTimeåæ®µï¼çè®°å½æ°é |
| | | * @param mapper å®ä½ç±»å¯¹åºçBaseMapper |
| | | * @param <T> å®ä½ç±»æ³å |
| | | * @return å½å¤©è®°å½æ°é |
| | | */ |
| | | public static <T> String countAfterServiceTodayByCreateTime(BaseMapper<T> mapper,String preFix) { |
| | | // è·åå½å¤©å¼å§æ¶é´ï¼00:00:00ï¼ |
| | | LocalDateTime todayStart = LocalDateTime.of( |
| | | LocalDateTime.now().toLocalDate(), |
| | | LocalTime.MIN |
| | | ); |
| | | // è·åå½å¤©ç»ææ¶é´ï¼23:59:59.999ï¼ |
| | | LocalDateTime todayEnd = LocalDateTime.of( |
| | | LocalDateTime.now().toLocalDate(), |
| | | LocalTime.MAX |
| | | ); |
| | | |
| | | // 转æ¢ä¸ºDateç±»åï¼å¦æå®ä½ç±»ä¸createTimeæ¯LocalDateTimeå¯ç´æ¥ä½¿ç¨ï¼ |
| | | Date startDate = Date.from(todayStart.atZone(ZoneId.systemDefault()).toInstant()); |
| | | Date endDate = Date.from(todayEnd.atZone(ZoneId.systemDefault()).toInstant()); |
| | | |
| | | // æå»ºæ¥è¯¢æ¡ä»¶ |
| | | QueryWrapper<T> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.ge("create_time", startDate) // 大äºçäºå½å¤©å¼å§ |
| | | .lt("create_time", endDate); // å°äºå½å¤©ç»æï¼é¿å
毫ç§ç²¾åº¦é®é¢ï¼ |
| | | |
| | | // æ§è¡æ¥è¯¢ |
| | | Long aLong = mapper.selectCount(queryWrapper); |
| | | // æ¼æ¥è®¢åç¼å· preFix + æ¶é´ï¼yyyyMMddï¼ + è®¢åæ°é(001) |
| | | return preFix + LocalDate.now().format(DateTimeFormatter.ISO_LOCAL_DATE).replaceAll("-", "") + String.format("%03d", (aLong + 1)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.common.vo; |
| | | |
| | | import com.ruoyi.basic.pojo.CustomerFollowUpFile; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * @author buhuazhen |
| | | * @date 2026/3/6 |
| | | * @email 3038525872@qq.com |
| | | */ |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class SimpleFileVo implements Serializable { |
| | | private Long id; |
| | | private String fileName; |
| | | private String fileUrl; |
| | | |
| | | public static SimpleFileVo convert(@NotNull CustomerFollowUpFile file){ |
| | | return new SimpleFileVo(file.getId(), file.getFileName(), file.getFileUrl()); |
| | | } |
| | | |
| | | } |
| | |
| | | private Date updateTime;
|
| | |
|
| | | /** 夿³¨ */
|
| | | @TableField(exist = false)
|
| | | private String remark;
|
| | |
|
| | | /** 请æ±åæ° */
|
| | |
| | | package com.ruoyi.procurementrecord.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.utils.OrderUtils; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.procurementrecord.dto.ReturnManagementDto; |
| | | import com.ruoyi.procurementrecord.mapper.ReturnManagementMapper; |
| | | import com.ruoyi.procurementrecord.pojo.ReturnManagement; |
| | | import com.ruoyi.procurementrecord.pojo.ReturnSaleProduct; |
| | | import com.ruoyi.procurementrecord.service.ReturnManagementService; |
| | | import com.ruoyi.procurementrecord.service.ReturnSaleProductService; |
| | | import com.ruoyi.procurementrecord.service.impl.ReturnSaleProductServiceImpl; |
| | | import com.ruoyi.sales.dto.SalesLedgerDto; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | * @date : 2025/9/17 10:34 |
| | | */ |
| | | @RestController |
| | | @Api(tags = "å°è´§ç®¡ç") |
| | | @Api(tags = "éå®éè´§") |
| | | @RequestMapping("/returnManagement") |
| | | public class ReturnManagementController extends BaseController { |
| | | |
| | | @Autowired |
| | | private ReturnManagementService returnManagementService; |
| | | |
| | | @Autowired |
| | | private ReturnManagementMapper returnManagementMapper; |
| | | private ReturnSaleProductService returnSaleProductService; |
| | | |
| | | @GetMapping("/listPage") |
| | | @ApiOperation("å°è´§ç®¡ç-æ¥è¯¢") |
| | | public AjaxResult listPage(Page page, ReturnManagement returnManagement) { |
| | | IPage<ReturnManagement> result = returnManagementService.listPage(page, returnManagement); |
| | | @ApiOperation("éå®éè´§-æ¥è¯¢") |
| | | public AjaxResult listPage(Page page, ReturnManagementDto returnManagement) { |
| | | IPage<ReturnManagementDto> result = returnManagementService.listPage(page, returnManagement); |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | @PostMapping("/add") |
| | | @ApiOperation("å°è´§ç®¡ç-æ·»å ") |
| | | @ApiOperation("éå®éè´§-æ·»å ") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult add(@RequestBody ReturnManagement returnManagement) { |
| | | String rt = OrderUtils.countTodayByCreateTime(returnManagementMapper, "RT"); |
| | | returnManagement.setReturnNo(rt); |
| | | boolean result = returnManagementService.save(returnManagement); |
| | | return result ? success() : error(); |
| | | public AjaxResult add(@RequestBody ReturnManagementDto returnManagementDto) { |
| | | return returnManagementService.addReturnManagementDto(returnManagementDto) ? success() : error(); |
| | | } |
| | | |
| | | @PostMapping("/update") |
| | | @ApiOperation("å°è´§ç®¡ç-ä¿®æ¹") |
| | | @ApiOperation("éå®éè´§-ä¿®æ¹") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult update(@RequestBody ReturnManagement returnManagement) { |
| | | boolean result = returnManagementService.updateById(returnManagement); |
| | | return result ? success() : error(); |
| | | public AjaxResult update(@RequestBody ReturnManagementDto returnManagementDto) { |
| | | return returnManagementService.updateReturnManagementDto(returnManagementDto) ? success() : error(); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("éå®éè´§-å¤çéè´§å") |
| | | @GetMapping("/handle") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult handle(Long returnManagementId) { |
| | | return returnManagementService.handle(returnManagementId) ? success() : error(); |
| | | } |
| | | |
| | | |
| | | @DeleteMapping("/del") |
| | | @ApiOperation("å°è´§ç®¡ç-å é¤") |
| | | @ApiOperation("éå®éè´§-å é¤") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult del(@RequestBody List<Long> ids) { |
| | | if (CollectionUtils.isEmpty(ids)) return error("è¯·éæ©è³å°ä¸æ¡æ°æ®"); |
| | | returnSaleProductService.remove(new QueryWrapper<ReturnSaleProduct>() |
| | | .lambda() |
| | | .in(ReturnSaleProduct::getReturnManagementId, ids)); |
| | | boolean result = returnManagementService.removeByIds(ids); |
| | | return result ? success() : error(); |
| | | } |
| | | |
| | | @GetMapping("/getById") |
| | | @ApiOperation("éå®éè´§-æ ¹æ®idæ¥è¯¢") |
| | | public AjaxResult getById(Long returnManagementId) { |
| | | ReturnManagementDto returnManagementDto = returnManagementService.getReturnManagementDtoById(returnManagementId); |
| | | return success(returnManagementDto); |
| | | } |
| | | |
| | | @GetMapping("/getByShippingId") |
| | | @ApiOperation("éå®éè´§-æ ¹æ®åºåºåæ¥è¯¢éå®è®¢å以å产åä¿¡æ¯") |
| | | public AjaxResult getByShippingId(Long shippingId) { |
| | | SalesLedgerDto salesLedgerDto = returnManagementService.getReturnManagementDtoByShippingIdId(shippingId); |
| | | return success(salesLedgerDto); |
| | | } |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.procurementrecord.controller; |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * <p> |
| | | * é货产å表 å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-05 03:57:42 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/returnSaleProduct") |
| | | public class ReturnSaleProductController { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.procurementrecord.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.procurementrecord.pojo.ReturnManagement; |
| | | import com.ruoyi.procurementrecord.pojo.ReturnSaleProduct; |
| | | import com.ruoyi.sales.pojo.SalesLedgerProduct; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author :yys |
| | | * @date : 2025/9/17 10:28 |
| | | */ |
| | | @Data |
| | | public class ReturnManagementDto extends ReturnManagement { |
| | | |
| | | |
| | | @ApiModelProperty(value = "客æ·åç§°") |
| | | private String customerName; |
| | | |
| | | @ApiModelProperty(value = "éå®åå·") |
| | | private String salesContractNo; |
| | | |
| | | @ApiModelProperty(value = "ä¸å¡å") |
| | | private String salesman; |
| | | |
| | | |
| | | @ApiModelProperty("å
³èåºåºåå·") |
| | | private String shippingNo; |
| | | |
| | | @ApiModelProperty(value = "项ç®åç§°") |
| | | private String projectName; |
| | | |
| | | @ApiModelProperty(value = "éå®å°è´¦id") |
| | | private Long salesLedgerId; |
| | | |
| | | @ApiModelProperty(value = "éå®äº§å对象æ°ç»") |
| | | private List<ReturnSaleProductDto> returnSaleProducts; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.procurementrecord.dto; |
| | | |
| | | import com.ruoyi.procurementrecord.pojo.ReturnSaleProduct; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | @Data |
| | | public class ReturnSaleProductDto extends ReturnSaleProduct { |
| | | |
| | | private String productName; |
| | | |
| | | private String model; |
| | | |
| | | private String unit; |
| | | |
| | | //æªéè´§æ°é |
| | | private BigDecimal unReturn; |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.procurementrecord.dto.ReturnManagementDto; |
| | | import com.ruoyi.procurementrecord.pojo.ReturnManagement; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | |
| | | * @param page |
| | | * @return |
| | | */ |
| | | IPage<ReturnManagement> listPage(Page page,@Param("req") ReturnManagement returnManagement); |
| | | IPage<ReturnManagementDto> listPage(Page page, @Param("req") ReturnManagementDto returnManagement); |
| | | |
| | | ReturnManagementDto getReturnManagementDtoById(Long id); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.procurementrecord.mapper; |
| | | |
| | | import com.ruoyi.procurementrecord.dto.ReturnSaleProductDto; |
| | | import com.ruoyi.procurementrecord.pojo.ReturnSaleProduct; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * é货产å表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-05 03:57:42 |
| | | */ |
| | | @Mapper |
| | | public interface ReturnSaleProductMapper extends BaseMapper<ReturnSaleProduct> { |
| | | |
| | | List<ReturnSaleProductDto> listReturnSaleProductDto(@Param("returnManagementId") Long returnManagementId); |
| | | } |
| | |
| | | @ApiModelProperty(value = "éè´§åå·") |
| | | private String returnNo; |
| | | |
| | | @ApiModelProperty(value = "å
³èåå·") |
| | | private String relatedNo; |
| | | @ApiModelProperty("客æ·id") |
| | | private Long customerId; |
| | | |
| | | @ApiModelProperty(value = "éè´§ç±»å") |
| | | private String returnType; |
| | | @ApiModelProperty("å
³èåºåºåå·Id") |
| | | private Long shippingId; |
| | | |
| | | @ApiModelProperty(value = "ä¾åºååç§°") |
| | | private String supplierName; |
| | | @ApiModelProperty("项ç®id") |
| | | private Long projectId; |
| | | |
| | | @ApiModelProperty(value = "éè´§åå ") |
| | | private String returnReason; |
| | | @ApiModelProperty("项ç®é¶æ®µ") |
| | | private String projectStage; |
| | | |
| | | @ApiModelProperty(value = "éè´§ç¶æ") |
| | | private String status; |
| | | @ApiModelProperty("å¶å人") |
| | | private String maker; |
| | | |
| | | @ApiModelProperty(value = "夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty("å¶åæ¶é´") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private LocalDateTime makeTime; |
| | | |
| | | @ApiModelProperty("ç»ç®äºº") |
| | | private String settler; |
| | | |
| | | @ApiModelProperty("ç¶æ") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "åå»ºç¨æ·") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty(value = "ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @ApiModelProperty("æ´æ°æ¶é´") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty(value = "ä¿®æ¹ç¨æ·") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty(value = "ç§æ·ID") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long tenantId; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.procurementrecord.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | /** |
| | | * <p> |
| | | * é货产å表 |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-05 03:57:42 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("return_sale_product") |
| | | @ApiModel(value = "ReturnSaleProduct对象", description = "é货产å表") |
| | | public class ReturnSaleProduct implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("主é®id") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("éè´§åid") |
| | | private Long returnManagementId; |
| | | |
| | | @ApiModelProperty("é货产åid") |
| | | private Long returnSaleLedgerProductId; |
| | | |
| | | @ApiModelProperty("éè´§äº§åæ°é") |
| | | private BigDecimal num; |
| | | |
| | | @ApiModelProperty("éè´§ç¶æ 0 æªéå 1å·²éè´§") |
| | | private Integer status; |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.procurementrecord.dto.ReturnManagementDto; |
| | | import com.ruoyi.procurementrecord.pojo.ReturnManagement; |
| | | import com.ruoyi.sales.dto.SalesLedgerDto; |
| | | |
| | | /** |
| | | * @author :yys |
| | |
| | | * @param returnManagement |
| | | * @return |
| | | */ |
| | | IPage<ReturnManagement> listPage(Page page, ReturnManagement returnManagement); |
| | | IPage<ReturnManagementDto> listPage(Page page, ReturnManagementDto returnManagement); |
| | | |
| | | boolean addReturnManagementDto(ReturnManagementDto returnManagementDto); |
| | | |
| | | boolean updateReturnManagementDto(ReturnManagementDto returnManagementDto); |
| | | |
| | | SalesLedgerDto getReturnManagementDtoByShippingIdId(Long shippingId); |
| | | |
| | | boolean handle(Long returnManagementId); |
| | | |
| | | ReturnManagementDto getReturnManagementDtoById(Long returnManagementId); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.procurementrecord.service; |
| | | |
| | | import com.ruoyi.procurementrecord.dto.ReturnSaleProductDto; |
| | | import com.ruoyi.procurementrecord.pojo.ReturnSaleProduct; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * é货产å表 æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-05 03:57:42 |
| | | */ |
| | | public interface ReturnSaleProductService extends IService<ReturnSaleProduct> { |
| | | |
| | | List<ReturnSaleProductDto> listReturnSaleProductDto(Long returnManagementId); |
| | | } |
| | |
| | | package com.ruoyi.procurementrecord.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.utils.OrderUtils; |
| | | import com.ruoyi.procurementrecord.dto.ReturnManagementDto; |
| | | import com.ruoyi.procurementrecord.dto.ReturnSaleProductDto; |
| | | import com.ruoyi.procurementrecord.mapper.ReturnManagementMapper; |
| | | import com.ruoyi.procurementrecord.mapper.ReturnSaleProductMapper; |
| | | import com.ruoyi.procurementrecord.pojo.ReturnManagement; |
| | | import com.ruoyi.procurementrecord.pojo.ReturnSaleProduct; |
| | | import com.ruoyi.procurementrecord.service.ReturnManagementService; |
| | | import com.ruoyi.procurementrecord.service.ReturnSaleProductService; |
| | | import com.ruoyi.sales.dto.SalesLedgerDto; |
| | | import com.ruoyi.sales.dto.SalesLedgerProductDto; |
| | | import com.ruoyi.sales.mapper.SalesLedgerMapper; |
| | | import com.ruoyi.sales.pojo.SalesLedger; |
| | | import com.ruoyi.sales.pojo.SalesLedgerProduct; |
| | | import com.ruoyi.sales.pojo.ShippingInfo; |
| | | import com.ruoyi.sales.service.ISalesLedgerProductService; |
| | | import com.ruoyi.sales.service.ShippingInfoService; |
| | | import com.ruoyi.sales.service.impl.ShippingInfoServiceImpl; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @author :yys |
| | |
| | | @Autowired |
| | | private ReturnManagementMapper returnManagementMapper; |
| | | |
| | | @Autowired |
| | | private ReturnSaleProductService returnSaleProductService; |
| | | @Autowired |
| | | private ShippingInfoService shippingInfoService; |
| | | @Autowired |
| | | private SalesLedgerMapper salesLedgerMapper; |
| | | |
| | | @Override |
| | | public IPage<ReturnManagement> listPage(Page page, ReturnManagement returnManagement) { |
| | | IPage<ReturnManagement> returnManagementIPage = returnManagementMapper.listPage(page, returnManagement); |
| | | public IPage<ReturnManagementDto> listPage(Page page, ReturnManagementDto returnManagement) { |
| | | IPage<ReturnManagementDto> returnManagementIPage = returnManagementMapper.listPage(page, returnManagement); |
| | | for (ReturnManagementDto returnManagementDto : returnManagementIPage.getRecords()) { |
| | | List<ReturnSaleProductDto> returnSaleProducts = returnSaleProductService.listReturnSaleProductDto(returnManagementDto.getId()); |
| | | returnManagementDto.setReturnSaleProducts(returnSaleProducts); |
| | | } |
| | | return returnManagementIPage; |
| | | } |
| | | |
| | | @Override |
| | | public boolean addReturnManagementDto(ReturnManagementDto returnManagementDto) { |
| | | String rt = OrderUtils.countTodayByCreateTime(returnManagementMapper, "RT"); |
| | | returnManagementDto.setReturnNo(rt); |
| | | save(returnManagementDto); |
| | | for (ReturnSaleProduct returnSaleProduct : returnManagementDto.getReturnSaleProducts()) { |
| | | returnSaleProduct.setReturnManagementId(returnManagementDto.getId()); |
| | | returnSaleProduct.setStatus(0); |
| | | returnSaleProductService.save(returnSaleProduct); |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | public boolean updateReturnManagementDto(ReturnManagementDto returnManagementDto) { |
| | | List<ReturnSaleProduct> returnSaleProducts = new ArrayList<>(); |
| | | if (!CollectionUtils.isEmpty(returnManagementDto.getReturnSaleProducts())) { |
| | | returnManagementDto.getReturnSaleProducts().stream().forEach(returnSaleProductDto -> { |
| | | ReturnSaleProduct returnSaleProduct = new ReturnSaleProduct(); |
| | | BeanUtils.copyProperties(returnSaleProductDto, returnSaleProduct); |
| | | returnSaleProducts.add(returnSaleProduct); |
| | | }); |
| | | } |
| | | returnSaleProductService.updateBatchById(returnSaleProducts); |
| | | return updateById(returnManagementDto); |
| | | } |
| | | |
| | | @Override |
| | | public SalesLedgerDto getReturnManagementDtoByShippingIdId(Long shippingId) { |
| | | ShippingInfo byId = shippingInfoService.getById(shippingId); |
| | | SalesLedger salesLedger = salesLedgerMapper.selectById(byId.getSalesLedgerId()); |
| | | SalesLedgerDto salesLedgerDto = new SalesLedgerDto(); |
| | | BeanUtils.copyProperties(salesLedger, salesLedgerDto); |
| | | |
| | | List<SalesLedgerProductDto> salesLedgerProductDtos = shippingInfoService.getReturnManagementDtoById(shippingId); |
| | | salesLedgerDto.setProductDtoData(salesLedgerProductDtos); |
| | | return salesLedgerDto; |
| | | } |
| | | |
| | | @Override |
| | | public boolean handle(Long returnManagementId) { |
| | | ReturnManagement byId = this.getById(returnManagementId); |
| | | byId.setStatus(1); |
| | | return false; |
| | | } |
| | | |
| | | @Override |
| | | public ReturnManagementDto getReturnManagementDtoById(Long returnManagementId) { |
| | | ReturnManagementDto returnManagementDtoById = returnManagementMapper.getReturnManagementDtoById(returnManagementId); |
| | | returnManagementDtoById.setReturnSaleProducts(returnSaleProductService.listReturnSaleProductDto(returnManagementId)); |
| | | return returnManagementDtoById; |
| | | } |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.procurementrecord.service.impl; |
| | | |
| | | import com.ruoyi.procurementrecord.dto.ReturnSaleProductDto; |
| | | import com.ruoyi.procurementrecord.pojo.ReturnSaleProduct; |
| | | import com.ruoyi.procurementrecord.mapper.ReturnSaleProductMapper; |
| | | import com.ruoyi.procurementrecord.service.ReturnSaleProductService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * é货产å表 æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-05 03:57:42 |
| | | */ |
| | | @Service |
| | | public class ReturnSaleProductServiceImpl extends ServiceImpl<ReturnSaleProductMapper, ReturnSaleProduct> implements ReturnSaleProductService { |
| | | |
| | | @Autowired |
| | | private ReturnSaleProductMapper returnSaleProductMapper; |
| | | @Override |
| | | public List<ReturnSaleProductDto> listReturnSaleProductDto(Long returnManagementId) { |
| | | |
| | | return returnSaleProductMapper.listReturnSaleProductDto(returnManagementId); |
| | | } |
| | | } |
| | |
| | | import javax.validation.constraints.NotBlank;
|
| | | import javax.validation.constraints.NotNull;
|
| | | import javax.validation.constraints.Size;
|
| | |
|
| | | import com.baomidou.mybatisplus.annotation.TableField;
|
| | | import org.apache.commons.lang3.builder.ToStringBuilder;
|
| | | import org.apache.commons.lang3.builder.ToStringStyle;
|
| | | import com.ruoyi.framework.web.domain.BaseEntity;
|
| | |
| | | private String delFlag;
|
| | |
|
| | | /** ç¶é¨é¨åç§° */
|
| | | @TableField(exist = false)
|
| | | private String parentName;
|
| | |
|
| | | /** é¨é¨ç¼å· */
|
| | | private String deptNick;
|
| | |
|
| | | /** åå·¥æ°é */
|
| | | @TableField(exist = false)
|
| | | private Integer staffCount;
|
| | |
|
| | | /** åé¨é¨ */
|
| | | @TableField(exist = false)
|
| | | private List<SysDept> children = new ArrayList<SysDept>();
|
| | |
|
| | | public Long getDeptId()
|
| | |
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
| | | import org.apache.ibatis.annotations.Mapper;
|
| | | import org.apache.ibatis.annotations.Param;
|
| | | import com.ruoyi.project.system.domain.SysDept;
|
| | |
| | | * @author ruoyi
|
| | | */
|
| | | @Mapper
|
| | | public interface SysDeptMapper
|
| | | public interface SysDeptMapper extends BaseMapper<SysDept>
|
| | | {
|
| | | /**
|
| | | * æ¥è¯¢é¨é¨ç®¡çæ°æ®
|
| | |
| | |
|
| | | /**
|
| | | * æ¹éå é¤ç¨æ·ä¿¡æ¯
|
| | | * |
| | | *
|
| | | * @param userIds éè¦å é¤çç¨æ·ID
|
| | | * @return ç»æ
|
| | | */
|
| | |
| | | userRoleMapper.deleteUserRole(userIds);
|
| | | // å é¤ç¨æ·ä¸å²ä½å
³è
|
| | | userPostMapper.deleteUserPost(userIds);
|
| | | // å é¤ç¨æ·ä¸é¨é¨æ°æ®
|
| | | sysUserDeptMapper.delete(new LambdaQueryWrapper<SysUserDept>()
|
| | | .in(SysUserDept::getUserId, userIds));
|
| | | return userMapper.deleteUserByIds(userIds);
|
| | | }
|
| | |
|
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.utils.OrderUtils; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.projectManagement.dto.RoleDto; |
| | | import com.ruoyi.projectManagement.mapper.RolesMapper; |
| | | import com.ruoyi.projectManagement.pojo.Roles; |
| | | import com.ruoyi.projectManagement.service.RolesService; |
| | |
| | | |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("/roles") |
| | | @RequestMapping("/projectManagement/roles") |
| | | @Api(value = "Roles", tags = "") |
| | | public class RolesController { |
| | | |
| | |
| | | |
| | | @PostMapping("/add") |
| | | @ApiOperation("æ°å¢") |
| | | public AjaxResult add(@RequestBody Roles role) { |
| | | role.setNo(OrderUtils.countTodayByCreateTime(rolesMapper, "XMJS")); |
| | | return AjaxResult.success(rolesservice.save(role)); |
| | | public AjaxResult add(@RequestBody RoleDto roleDto) { |
| | | if (roleDto.getIsDefaultNo()) { |
| | | roleDto.setNo(OrderUtils.countTodayByCreateTime(rolesMapper, "XMJS")); |
| | | } |
| | | return AjaxResult.success(rolesservice.save(roleDto)); |
| | | } |
| | | |
| | | @PostMapping("/update") |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.projectManagement.dto; |
| | | |
| | | import com.ruoyi.projectManagement.pojo.Roles; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class RoleDto extends Roles { |
| | | // æ¯å¦ä½¿ç¨ç³»ç»ç¼å· |
| | | @ApiModelProperty("æ¯å¦ä½¿ç¨ç³»ç»ç¼å·") |
| | | private Boolean isDefaultNo; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.projectManagement.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.ruoyi.projectManagement.pojo.Plan; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.projectManagement.vo.SearchPlanVo; |
| | | |
| | | /** |
| | | * @author buhuazhen |
| | | * @description é对表ãproject_management_plan(项ç®ç®¡ç计å表(项ç®ç®¡çç±»å))ãçæ°æ®åºæä½Mapper |
| | | * @createDate 2026-03-06 15:29:26 |
| | | * @Entity generator.domain.ProjectManagementPlan |
| | | */ |
| | | public interface PlanMapper extends BaseMapper<Plan> { |
| | | |
| | | IPage<Plan> selectPlanPage(SearchPlanVo searchPlanVo); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.projectManagement.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.time.LocalDateTime; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 项ç®ç®¡ç计å表(项ç®ç®¡çç±»å) |
| | | * @TableName project_management_plan |
| | | */ |
| | | @TableName(value ="project_management_plan") |
| | | @Data |
| | | @ApiModel(description="项ç®ç®¡ç计å表(项ç®ç®¡çç±»å)") |
| | | public class Plan { |
| | | /** |
| | | * |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @ApiModelProperty(value="主é®ID") |
| | | private Long id; |
| | | |
| | | /** |
| | | * 计ååç§° |
| | | */ |
| | | @TableField(value = "name") |
| | | @ApiModelProperty(value="计ååç§°") |
| | | private String name; |
| | | |
| | | /** |
| | | * 计åæè¿° |
| | | */ |
| | | @TableField(value = "describe") |
| | | @ApiModelProperty(value="计åæè¿°") |
| | | private String describe; |
| | | |
| | | /** |
| | | * éä»¶ ,è¿è¡åå² |
| | | */ |
| | | @TableField(value = "attachment") |
| | | @ApiModelProperty(value="éä»¶") |
| | | private String attachment; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @TableField(value = "is_delete") |
| | | @ApiModelProperty(value="æ¯å¦å é¤") |
| | | private Integer isDelete; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @TableField(value = "create_time",fill = FieldFill.INSERT) |
| | | @ApiModelProperty(value="å建æ¶é´") |
| | | private LocalDateTime createTime; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE) |
| | | @ApiModelProperty(value="æ´æ°æ¶é´") |
| | | private LocalDateTime updateTime; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @TableField(value = "create_user",fill = FieldFill.INSERT) |
| | | @ApiModelProperty(value="å建人") |
| | | private String createUser; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @TableField(value = "update_user",fill = FieldFill.INSERT_UPDATE) |
| | | @ApiModelProperty(value="æ´æ°äºº") |
| | | private String updateUser; |
| | | } |
| | |
| | | @ApiModelProperty(value="ç¶æ(1:å¯ç¨, 0:ç¦ç¨)") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "ç§æ·ID") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long tenantId; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.projectManagement.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.ruoyi.projectManagement.pojo.Plan; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.projectManagement.vo.PlanVo; |
| | | import com.ruoyi.projectManagement.vo.SavePlanVo; |
| | | import com.ruoyi.projectManagement.vo.SearchPlanVo; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author buhuazhen |
| | | * @description é对表ãproject_management_plan(项ç®ç®¡ç计å表(项ç®ç®¡çç±»å))ãçæ°æ®åºæä½Service |
| | | * @createDate 2026-03-06 15:29:26 |
| | | */ |
| | | public interface PlanService{ |
| | | |
| | | /** |
| | | * ä¿å项ç®ç®¡ç计å |
| | | * @param savePlanVo |
| | | */ |
| | | void savePlan(@NotNull SavePlanVo savePlanVo); |
| | | |
| | | /** |
| | | * å é¤é¡¹ç®ç®¡ç计å |
| | | * @param id |
| | | */ |
| | | void deletePlan(@NotNull Long id); |
| | | |
| | | |
| | | IPage<PlanVo> searchPlan(@NotNull SearchPlanVo searchPlanVo); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.projectManagement.service.impl; |
| | | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.ruoyi.basic.service.CustomerFollowUpFileService; |
| | | import com.ruoyi.projectManagement.mapper.PlanMapper; |
| | | import com.ruoyi.projectManagement.pojo.Plan; |
| | | import com.ruoyi.projectManagement.service.PlanService; |
| | | import com.ruoyi.projectManagement.vo.PlanVo; |
| | | import com.ruoyi.projectManagement.vo.SavePlanVo; |
| | | import com.ruoyi.projectManagement.vo.SearchPlanVo; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.Collections; |
| | | import java.util.Optional; |
| | | |
| | | /** |
| | | * @author buhuazhen |
| | | * @description 项ç®ç®¡ç计åçå®ç° |
| | | * @createDate 2026-03-06 15:29:26 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | @Transactional(readOnly = true) |
| | | public class PlanServiceImpl implements PlanService { |
| | | |
| | | private final PlanMapper planMapper; |
| | | |
| | | private final CustomerFollowUpFileService customerFollowUpFileService; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void savePlan(SavePlanVo savePlanVo) { |
| | | Plan plan = BeanUtil.copyProperties(savePlanVo, Plan.class); |
| | | // éä»¶å¤ç , æ¼æ¥ |
| | | String attachments = String.join(",", Optional.ofNullable(savePlanVo.getAttachmentIds()).orElse(Collections.emptyList())); |
| | | plan.setAttachment(attachments); |
| | | |
| | | |
| | | if (savePlanVo.getId() == null) { |
| | | planMapper.insert(plan); |
| | | } else { |
| | | planMapper.updateById(plan); |
| | | } |
| | | |
| | | // todo@ èç¹ä¿å |
| | | |
| | | |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void deletePlan(Long id) { |
| | | planMapper.update(null, |
| | | new LambdaUpdateWrapper<Plan>() |
| | | .eq(Plan::getId, id) |
| | | .set(Plan::getIsDelete, 1)); |
| | | // todo@ 对åºèç¹å
¨é¨å é¤ |
| | | |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public IPage<PlanVo> searchPlan(SearchPlanVo searchPlanVo) { |
| | | IPage<Plan> planIPage = planMapper.selectPlanPage(searchPlanVo); |
| | | IPage<PlanVo> resultPage = planIPage.convert(plan -> BeanUtil.copyProperties(plan, PlanVo.class)); |
| | | // æä»¶è·å |
| | | customerFollowUpFileService.fillAttachment(resultPage.getRecords(), PlanVo::getAttachment, PlanVo::setAttachmentList); |
| | | // todo@ node èç¹è·å |
| | | |
| | | return resultPage; |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | package com.ruoyi.projectManagement.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.projectManagement.mapper.RolesMapper; |
| | | import com.ruoyi.projectManagement.pojo.Roles; |
| | | import com.ruoyi.projectManagement.service.RolesService; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | @AllArgsConstructor |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class RolesServiceImpl extends ServiceImpl<RolesMapper, Roles> implements RolesService { |
| | | |
| | | private final RolesMapper rolesmapper; |
| | | |
| | | @Override |
| | | public IPage<Roles> listPage(Page<Roles> page, Roles roles) { |
| | | return rolesmapper.selectPage(page, null); |
| | | LambdaQueryWrapper<Roles> queryWrapper = new LambdaQueryWrapper<>(); |
| | | if (roles.getName() != null) { |
| | | queryWrapper.like(Roles::getName, roles.getName()); |
| | | } |
| | | if (roles.getStatus() != null) { |
| | | queryWrapper.eq(Roles::getStatus, roles.getStatus()); |
| | | } |
| | | return rolesmapper.selectPage(page, queryWrapper); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.projectManagement.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonIgnore; |
| | | import com.ruoyi.common.vo.SimpleFileVo; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 计åVO |
| | | * @author buhuazhen |
| | | * @date 2026/3/6 |
| | | * @email 3038525872@qq.com |
| | | */ |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class PlanVo implements Serializable { |
| | | |
| | | private Long id; |
| | | |
| | | private String name; |
| | | |
| | | private String describe; |
| | | |
| | | // éä»¶ |
| | | private List<SimpleFileVo> attachmentList; |
| | | |
| | | @JsonIgnore |
| | | private String attachment; |
| | | |
| | | private LocalDateTime createTime; |
| | | |
| | | private LocalDateTime updateTime; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.projectManagement.vo; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author buhuazhen |
| | | * @date 2026/3/6 |
| | | * @email 3038525872@qq.com |
| | | */ |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class SavePlanVo implements Serializable { |
| | | |
| | | private Long id; |
| | | @NotBlank |
| | | private String name; |
| | | @NotBlank |
| | | private String describe; |
| | | |
| | | private List<String> attachmentIds; |
| | | |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.projectManagement.vo; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * @author buhuazhen |
| | | * @date 2026/3/6 |
| | | * @email 3038525872@qq.com |
| | | */ |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class SearchPlanVo extends Page implements Serializable { |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.purchase.controller; |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * <p> |
| | | * å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-06 11:44:38 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/purchaseReturnOrders") |
| | | public class PurchaseReturnOrdersController { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.purchase.mapper; |
| | | |
| | | import com.ruoyi.purchase.pojo.PurchaseReturnOrders; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-06 11:44:38 |
| | | */ |
| | | @Mapper |
| | | public interface PurchaseReturnOrdersMapper extends BaseMapper<PurchaseReturnOrders> { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.purchase.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-06 11:44:38 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("purchase_return_orders") |
| | | @ApiModel(value = "PurchaseReturnOrders对象", description = "éè´éè´§å") |
| | | public class PurchaseReturnOrders implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("éè´§åç¼å·") |
| | | private String no; |
| | | |
| | | @ApiModelProperty("éè´§æ¹å¼ 0éè´§éæ¬¾ 1ææ¶") |
| | | private Integer returnType; |
| | | |
| | | @ApiModelProperty("ä¾åºåid") |
| | | private Long supplierId; |
| | | |
| | | @ApiModelProperty("项ç®id") |
| | | private Long projectId; |
| | | |
| | | @ApiModelProperty("项ç®é¶æ®µ") |
| | | private Integer projectPhase; |
| | | |
| | | @ApiModelProperty("å¶åæ¥æ") |
| | | private LocalDateTime preparedAt; |
| | | |
| | | @ApiModelProperty("å¶å人id") |
| | | private Long preparedUserId; |
| | | |
| | | @ApiModelProperty("éæäººid") |
| | | private Long returnUserId; |
| | | |
| | | @ApiModelProperty("éè´è®¢åid") |
| | | private Long purchaseLedgerId; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("å½å
¥æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("æ´æ°æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.purchase.service; |
| | | |
| | | import com.ruoyi.purchase.pojo.PurchaseReturnOrders; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-06 11:44:38 |
| | | */ |
| | | public interface PurchaseReturnOrdersService extends IService<PurchaseReturnOrders> { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.purchase.service.impl; |
| | | |
| | | import com.ruoyi.purchase.pojo.PurchaseReturnOrders; |
| | | import com.ruoyi.purchase.mapper.PurchaseReturnOrdersMapper; |
| | | import com.ruoyi.purchase.service.PurchaseReturnOrdersService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-06 11:44:38 |
| | | */ |
| | | @Service |
| | | public class PurchaseReturnOrdersServiceImpl extends ServiceImpl<PurchaseReturnOrdersMapper, PurchaseReturnOrders> implements PurchaseReturnOrdersService { |
| | | |
| | | } |
| | |
| | | util.exportExcel(response, list, "åè´§ä¿¡æ¯"); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/getByCustomerName") |
| | | @ApiOperation("éè¿å®¢æ·åç§°æ¥è¯¢") |
| | | public AjaxResult getByCustomerName(String customerName) { |
| | | return AjaxResult.success(shippingInfoService.getShippingInfoByCustomerName(customerName)); |
| | | } |
| | | } |
| | |
| | | |
| | | private Boolean hasChildren = false; |
| | | private List<SalesLedgerProduct> productData; |
| | | private List<SalesLedgerProductDto> productDtoData; |
| | | private List<String> tempFileIds; |
| | | private List<CommonFile> SalesLedgerFiles; |
| | | |
| | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel; |
| | | import com.ruoyi.sales.pojo.SalesLedgerProduct; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | |
| | |
| | | |
| | | private Integer approvalStatus; |
| | | |
| | | |
| | | @ApiModelProperty(value = "æªéè´§æ°") |
| | | private BigDecimal unQuantity; |
| | | |
| | | @ApiModelProperty(value = "éè´§æ»æ°") |
| | | private BigDecimal totalReturnNum; |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.procurementrecord.dto.ReturnSaleProductDto; |
| | | import com.ruoyi.sales.dto.SalesLedgerProductDto; |
| | | import com.ruoyi.sales.dto.ShippingInfoDto; |
| | | import com.ruoyi.sales.pojo.SalesLedgerProduct; |
| | | import com.ruoyi.sales.pojo.ShippingInfo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | |
| | | IPage<ShippingInfoDto> listPage(Page page, @Param("req") ShippingInfo req); |
| | | |
| | | List<ShippingInfo> listAll(); |
| | | |
| | | List<SalesLedgerProductDto> getReturnManagementDtoById(Long shippingId); |
| | | |
| | | List<ShippingInfo> getShippingInfoByCustomerName(String customerName); |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.procurementrecord.dto.ReturnSaleProductDto; |
| | | import com.ruoyi.sales.dto.SalesLedgerProductDto; |
| | | import com.ruoyi.sales.dto.ShippingInfoDto; |
| | | import com.ruoyi.sales.pojo.ShippingInfo; |
| | | |
| | |
| | | boolean deductStock(ShippingInfoDto req) throws IOException; |
| | | |
| | | boolean delete(List<Long> ids); |
| | | |
| | | List<SalesLedgerProductDto> getReturnManagementDtoById(Long shippingId); |
| | | |
| | | List<ShippingInfo> getShippingInfoByCustomerName(String customerName); |
| | | } |
| | |
| | | import com.ruoyi.common.enums.FileNameType; |
| | | import com.ruoyi.common.enums.StockOutQualifiedRecordTypeEnum; |
| | | import com.ruoyi.other.service.impl.TempFileServiceImpl; |
| | | import com.ruoyi.procurementrecord.dto.ReturnSaleProductDto; |
| | | import com.ruoyi.procurementrecord.utils.StockUtils; |
| | | import com.ruoyi.sales.dto.SalesLedgerProductDto; |
| | | import com.ruoyi.sales.dto.ShippingInfoDto; |
| | | import com.ruoyi.sales.mapper.SalesLedgerProductMapper; |
| | | import com.ruoyi.sales.mapper.ShippingInfoMapper; |
| | |
| | | |
| | | return this.removeBatchByIds(ids); |
| | | } |
| | | |
| | | @Override |
| | | public List<SalesLedgerProductDto> getReturnManagementDtoById(Long shippingId) { |
| | | return shippingInfoMapper.getReturnManagementDtoById(shippingId); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public List<ShippingInfo> getShippingInfoByCustomerName(String customerName) { |
| | | return shippingInfoMapper.getShippingInfoByCustomerName(customerName); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.staff.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.utils.OrderUtils; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.staff.pojo.SchemeApplicableStaff; |
| | | import com.ruoyi.staff.service.SchemeApplicableStaffService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * ç¤¾ä¿æ¹æ¡éç¨äººå表 å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-05 11:50:17 |
| | | */ |
| | | @Api(tags = "ç¤¾ä¿æ¹æ¡éç¨äººå表") |
| | | @RestController |
| | | @RequestMapping("/schemeApplicableStaff") |
| | | public class SchemeApplicableStaffController extends BaseController { |
| | | |
| | | |
| | | @Autowired |
| | | private SchemeApplicableStaffService schemeApplicableStaffService; |
| | | |
| | | |
| | | @GetMapping("/listPage") |
| | | @ApiOperation(value = "å页æ¥è¯¢") |
| | | public AjaxResult listPage(Page page, SchemeApplicableStaff schemeApplicableStaff) { |
| | | return schemeApplicableStaffService.listPage(page,schemeApplicableStaff); |
| | | } |
| | | |
| | | @PostMapping("/add") |
| | | @ApiOperation(value = "æ·»å ") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Log(title = "ç¤¾ä¿æ¹æ¡éç¨äººå表", businessType = BusinessType.INSERT) |
| | | public AjaxResult add(@RequestBody SchemeApplicableStaff schemeApplicableStaff) { |
| | | return schemeApplicableStaffService.add(schemeApplicableStaff); |
| | | } |
| | | |
| | | @PostMapping("/updateSchemeApplicableStaff") |
| | | @ApiOperation(value = "ä¿®æ¹") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Log(title = "ç¤¾ä¿æ¹æ¡éç¨äººå表", businessType = BusinessType.UPDATE) |
| | | public AjaxResult updateSchemeApplicableStaff(@RequestBody SchemeApplicableStaff schemeApplicableStaff) { |
| | | return schemeApplicableStaffService.updateSchemeApplicableStaff(schemeApplicableStaff); |
| | | } |
| | | |
| | | @DeleteMapping("/delete") |
| | | @ApiOperation(value = "å é¤") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Log(title = "ç¤¾ä¿æ¹æ¡éç¨äººå表", businessType = BusinessType.DELETE) |
| | | public AjaxResult delete(@RequestBody List<Long> ids) { |
| | | return schemeApplicableStaffService.delete(ids); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.staff.controller; |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * <p> |
| | | * ç¤¾ä¿æ¹æ¡ä¿é©ç¦å©æç»è¡¨ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-05 11:52:23 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/schemeInsuranceDetail") |
| | | public class SchemeInsuranceDetailController { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.staff.controller; |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * <p> |
| | | * åå·¥æè²ç»å表 å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-05 04:33:08 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/staffEducation") |
| | | public class StaffEducationController { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.staff.controller; |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * <p> |
| | | * å工紧æ¥è系人表 å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-05 04:34:17 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/staffEmergencyContact") |
| | | public class StaffEmergencyContactController { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.staff.controller; |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * <p> |
| | | * å工工ä½ç»å表 å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-05 04:33:36 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/staffWorkExperience") |
| | | public class StaffWorkExperienceController { |
| | | |
| | | } |
| | |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel; |
| | | import com.ruoyi.staff.pojo.StaffOnJob; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.util.Date; |
| | | |
| | |
| | | private String contractTerm; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private Date contractStartTime; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private Date contractEndTime; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.staff.mapper; |
| | | |
| | | import com.ruoyi.staff.pojo.SchemeApplicableStaff; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * ç¤¾ä¿æ¹æ¡éç¨äººå表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-05 11:50:17 |
| | | */ |
| | | @Mapper |
| | | public interface SchemeApplicableStaffMapper extends BaseMapper<SchemeApplicableStaff> { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.staff.mapper; |
| | | |
| | | import com.ruoyi.staff.pojo.SchemeInsuranceDetail; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * ç¤¾ä¿æ¹æ¡ä¿é©ç¦å©æç»è¡¨ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-05 11:52:23 |
| | | */ |
| | | @Mapper |
| | | public interface SchemeInsuranceDetailMapper extends BaseMapper<SchemeInsuranceDetail> { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.staff.mapper; |
| | | |
| | | import com.ruoyi.staff.pojo.StaffEducation; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * åå·¥æè²ç»å表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-05 04:33:08 |
| | | */ |
| | | @Mapper |
| | | public interface StaffEducationMapper extends BaseMapper<StaffEducation> { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.staff.mapper; |
| | | |
| | | import com.ruoyi.staff.pojo.StaffEmergencyContact; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * å工紧æ¥è系人表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-05 04:34:17 |
| | | */ |
| | | @Mapper |
| | | public interface StaffEmergencyContactMapper extends BaseMapper<StaffEmergencyContact> { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.staff.mapper; |
| | | |
| | | import com.ruoyi.staff.pojo.StaffWorkExperience; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * å工工ä½ç»å表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-05 04:33:36 |
| | | */ |
| | | @Mapper |
| | | public interface StaffWorkExperienceMapper extends BaseMapper<StaffWorkExperience> { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.staff.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | /** |
| | | * <p> |
| | | * ç¤¾ä¿æ¹æ¡éç¨äººå表 |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-05 11:50:17 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("scheme_applicable_staff") |
| | | @ApiModel(value = "SchemeApplicableStaff对象", description = "ç¤¾ä¿æ¹æ¡éç¨äººå表") |
| | | public class SchemeApplicableStaff implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("ç¤¾ä¿æ¹æ¡ä¿é©ç¦å©æç»") |
| | | @TableField(exist = false) |
| | | private List<SchemeInsuranceDetail> schemeInsuranceDetailList; |
| | | |
| | | @ApiModelProperty("主é®ID") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("æ é¢") |
| | | private String title; |
| | | |
| | | @ApiModelProperty("é¨é¨ids,å¤ä¸ªä½¿ç¨,éå¼") |
| | | private String deptIds; |
| | | |
| | | @ApiModelProperty("é¨é¨åç§°,å¤ä¸ªä½¿ç¨,éå¼") |
| | | @TableField(exist = false) |
| | | private String deptNames; |
| | | |
| | | @ApiModelProperty("人ååç§°,å¤ä¸ªä½¿ç¨,éå¼") |
| | | private String staffNames; |
| | | |
| | | @ApiModelProperty("人åid,å¤ä¸ªä½¿ç¨,éå¼") |
| | | private String staffIds; |
| | | |
| | | @ApiModelProperty("ä¿é©ç±»ååç§°å¤ä¸ªä½¿ç¨,éå¼") |
| | | private String insuranceTypes; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | private String remark; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty("å建人åç§°") |
| | | private String createUserName; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8", shape = JsonFormat.Shape.STRING) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("æ´æ°æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("å建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("æ´æ°äºº") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.staff.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | /** |
| | | * <p> |
| | | * ç¤¾ä¿æ¹æ¡ä¿é©ç¦å©æç»è¡¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-05 11:52:23 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("scheme_insurance_detail") |
| | | @ApiModel(value = "SchemeInsuranceDetail对象", description = "ç¤¾ä¿æ¹æ¡ä¿é©ç¦å©æç»è¡¨") |
| | | public class SchemeInsuranceDetail implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("æç»IDï¼ä¸»é®ï¼") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("å
³èçç¤¾ä¿æ¹æ¡ID") |
| | | private Long schemeId; |
| | | |
| | | @ApiModelProperty("ä¿é©ç±»åï¼å¦å»çä¿é©ãå
»èä¿é©çï¼") |
| | | private String insuranceType; |
| | | |
| | | @ApiModelProperty("ç¼´è´¹åºæ°") |
| | | private BigDecimal paymentBase; |
| | | |
| | | @ApiModelProperty("æ¯å¦è°ç¨åºæ¬å·¥èµï¼1-å¦ï¼2-æ¯") |
| | | private Integer useBasicSalary; |
| | | |
| | | @ApiModelProperty("个人缴费æ¯ä¾ï¼%ï¼") |
| | | private BigDecimal personalRatio; |
| | | |
| | | @ApiModelProperty("个人åºå®ç¼´è´¹éé¢") |
| | | private BigDecimal personalFixed; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("æ´æ°æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("å建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty("æ´æ°äºº") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.staff.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | /** |
| | | * <p> |
| | | * åå·¥æè²ç»å表 |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-05 04:33:08 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("staff_education") |
| | | @ApiModel(value = "StaffEducation对象", description = "åå·¥æè²ç»å表") |
| | | public class StaffEducation implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("主é®ID") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("å
³èstaff_on_job表主é®ID") |
| | | private Long staffOnJobId; |
| | | |
| | | @ApiModelProperty("å¦å") |
| | | private String education; |
| | | |
| | | @ApiModelProperty("æ¯ä¸é¢æ ¡") |
| | | private String schoolName; |
| | | |
| | | @ApiModelProperty("å
¥å¦æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate enrollTime; |
| | | |
| | | @ApiModelProperty("æ¯ä¸æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate graduateTime; |
| | | |
| | | @ApiModelProperty("ä¸ä¸") |
| | | private String major; |
| | | |
| | | @ApiModelProperty("å¦ä½") |
| | | private String degree; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("åå»ºç¨æ·") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long createUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹ç¨æ·") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Long updateUser; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.staff.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | /** |
| | | * <p> |
| | | * å工紧æ¥è系人表 |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-05 04:34:17 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("staff_emergency_contact") |
| | | @ApiModel(value = "StaffEmergencyContact对象", description = "å工紧æ¥è系人表") |
| | | public class StaffEmergencyContact implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("主é®ID") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("å
³èstaff_on_job表主é®ID") |
| | | private Long staffOnJobId; |
| | | |
| | | @ApiModelProperty("ç´§æ¥è系人å§å") |
| | | private String contactName; |
| | | |
| | | @ApiModelProperty("ç´§æ¥è系人å
³ç³»") |
| | | private String contactRelation; |
| | | |
| | | @ApiModelProperty("ç´§æ¥èç³»äººææº") |
| | | private String contactPhone; |
| | | |
| | | @ApiModelProperty("ç´§æ¥è系人ä½å") |
| | | private String contactAddress; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("åå»ºç¨æ·") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long createUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹ç¨æ·") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Long updateUser; |
| | | } |
| | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 人å管ç--åå·¥å°è´¦/åå管ç |
| | |
| | | * é¨é¨ |
| | | */ |
| | | private Long sysDeptId; |
| | | |
| | | /** |
| | | * è§è² |
| | | */ |
| | | private Long roleId; |
| | | |
| | | /** |
| | | * å®¶åºä½å |
| | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long tenantId; |
| | | |
| | | @ApiModelProperty(value = "å«å") |
| | | private String alias; |
| | | |
| | | @ApiModelProperty(value = "åºçæ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private Date birthDate; |
| | | |
| | | @ApiModelProperty(value = "æ°æ") |
| | | private String nation; |
| | | |
| | | @ApiModelProperty(value = "å©å§»ç¶åµ") |
| | | private String maritalStatus; |
| | | |
| | | @ApiModelProperty(value = "è¯ç¨æï¼æï¼") |
| | | private Integer proTerm; |
| | | |
| | | @ApiModelProperty(value = "è½¬æ£æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private Date positiveDate; |
| | | |
| | | @ApiModelProperty(value = "åºæ¬å·¥èµ") |
| | | private BigDecimal basicSalary; |
| | | |
| | | @ApiModelProperty(value = "åå·¥æè²ç»åéå") |
| | | @TableField(exist = false) |
| | | private List<StaffEducation> staffEducationList; |
| | | |
| | | @ApiModelProperty(value = "å工工ä½ç»åéå") |
| | | @TableField(exist = false) |
| | | private List<StaffWorkExperience> staffWorkExperienceList; |
| | | |
| | | @ApiModelProperty(value = "å工紧æ¥è系人éå") |
| | | @TableField(exist = false) |
| | | private List<StaffEmergencyContact> staffEmergencyContactList; |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.staff.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | /** |
| | | * <p> |
| | | * å工工ä½ç»å表 |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-05 04:33:36 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("staff_work_experience") |
| | | @ApiModel(value = "StaffWorkExperience对象", description = "å工工ä½ç»å表") |
| | | public class StaffWorkExperience implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("主é®ID") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("å
³èstaff_on_job表主é®ID") |
| | | private Long staffOnJobId; |
| | | |
| | | @ApiModelProperty("åå
¬å¸") |
| | | private String formerCompany; |
| | | |
| | | @ApiModelProperty("åå
¬å¸é¨é¨") |
| | | private String formerDept; |
| | | |
| | | @ApiModelProperty("åå
¬å¸èä½") |
| | | private String formerPosition; |
| | | |
| | | @ApiModelProperty("å¼å§æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate startDate; |
| | | |
| | | @ApiModelProperty("ç»ææ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate endDate; |
| | | |
| | | @ApiModelProperty("å·¥ä½æè¿°") |
| | | private String workDesc; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("åå»ºç¨æ·") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long createUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹ç¨æ·") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Long updateUser; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.staff.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.staff.pojo.SchemeApplicableStaff; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * ç¤¾ä¿æ¹æ¡éç¨äººå表 æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-05 11:50:17 |
| | | */ |
| | | public interface SchemeApplicableStaffService extends IService<SchemeApplicableStaff> { |
| | | |
| | | AjaxResult listPage(Page page, SchemeApplicableStaff schemeApplicableStaff); |
| | | |
| | | AjaxResult add(SchemeApplicableStaff schemeApplicableStaff); |
| | | |
| | | AjaxResult updateSchemeApplicableStaff(SchemeApplicableStaff schemeApplicableStaff); |
| | | |
| | | AjaxResult delete(List<Long> ids); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.staff.service; |
| | | |
| | | import com.ruoyi.staff.pojo.SchemeInsuranceDetail; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * ç¤¾ä¿æ¹æ¡ä¿é©ç¦å©æç»è¡¨ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-05 11:52:23 |
| | | */ |
| | | public interface SchemeInsuranceDetailService extends IService<SchemeInsuranceDetail> { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.staff.service; |
| | | |
| | | import com.ruoyi.staff.pojo.StaffEducation; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * åå·¥æè²ç»å表 æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-05 04:33:08 |
| | | */ |
| | | public interface StaffEducationService extends IService<StaffEducation> { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.staff.service; |
| | | |
| | | import com.ruoyi.staff.pojo.StaffEmergencyContact; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * å工紧æ¥è系人表 æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-05 04:34:17 |
| | | */ |
| | | public interface StaffEmergencyContactService extends IService<StaffEmergencyContact> { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.staff.service; |
| | | |
| | | import com.ruoyi.staff.pojo.StaffWorkExperience; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * å工工ä½ç»å表 æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-05 04:33:36 |
| | | */ |
| | | public interface StaffWorkExperienceService extends IService<StaffWorkExperience> { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.staff.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.project.system.domain.SysDept; |
| | | import com.ruoyi.project.system.domain.SysUser; |
| | | import com.ruoyi.project.system.domain.SysUserDept; |
| | | import com.ruoyi.project.system.mapper.SysDeptMapper; |
| | | import com.ruoyi.project.system.mapper.SysUserDeptMapper; |
| | | import com.ruoyi.project.system.mapper.SysUserMapper; |
| | | import com.ruoyi.staff.mapper.SchemeInsuranceDetailMapper; |
| | | import com.ruoyi.staff.pojo.SchemeApplicableStaff; |
| | | import com.ruoyi.staff.mapper.SchemeApplicableStaffMapper; |
| | | import com.ruoyi.staff.pojo.SchemeInsuranceDetail; |
| | | import com.ruoyi.staff.service.SchemeApplicableStaffService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | | * ç¤¾ä¿æ¹æ¡éç¨äººå表 æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-05 11:50:17 |
| | | */ |
| | | @Service |
| | | public class SchemeApplicableStaffServiceImpl extends ServiceImpl<SchemeApplicableStaffMapper, SchemeApplicableStaff> implements SchemeApplicableStaffService { |
| | | |
| | | @Autowired |
| | | private SchemeApplicableStaffMapper schemeApplicableStaffMapper; |
| | | |
| | | @Autowired |
| | | private SchemeInsuranceDetailMapper schemeInsuranceDetailMapper; |
| | | |
| | | @Autowired |
| | | private SysUserDeptMapper sysUserDeptMapper; |
| | | |
| | | @Autowired |
| | | private SysUserMapper sysUserMapper; |
| | | |
| | | @Autowired |
| | | private SysDeptMapper sysDeptMapper; |
| | | |
| | | |
| | | @Override |
| | | public AjaxResult listPage(Page page, SchemeApplicableStaff schemeApplicableStaff) { |
| | | LambdaQueryWrapper<SchemeApplicableStaff> schemeApplicableStaffLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | if(schemeApplicableStaff != null){ |
| | | if(StringUtils.isNotEmpty(schemeApplicableStaff.getTitle())){ |
| | | schemeApplicableStaffLambdaQueryWrapper.like(SchemeApplicableStaff::getTitle, schemeApplicableStaff.getTitle()); |
| | | } |
| | | } |
| | | Page<SchemeApplicableStaff> page1 = schemeApplicableStaffMapper.selectPage(page, schemeApplicableStaffLambdaQueryWrapper); |
| | | List<Long> collect = page1.getRecords().stream().map(SchemeApplicableStaff::getId).collect(Collectors.toList()); |
| | | if(CollectionUtils.isEmpty(collect)){ |
| | | return AjaxResult.success(page1); |
| | | } |
| | | List<SchemeInsuranceDetail> schemeInsuranceDetails = schemeInsuranceDetailMapper |
| | | .selectList(new LambdaQueryWrapper<SchemeInsuranceDetail>() |
| | | .in(SchemeInsuranceDetail::getSchemeId, collect)); |
| | | page1.getRecords().forEach(item -> { |
| | | item.setSchemeInsuranceDetailList(schemeInsuranceDetails |
| | | .stream() |
| | | .filter(detail -> detail.getSchemeId().equals(item.getId())) |
| | | .collect(Collectors.toList())); |
| | | SysUser sysUser = sysUserMapper.selectUserById(item.getCreateUser().longValue()); |
| | | item.setCreateUserName(sysUser == null ? "æªç¥" : sysUser.getNickName()); |
| | | // è·åé¨é¨ä¿¡æ¯ |
| | | String[] split = item.getDeptIds().split(","); |
| | | List<SysDept> sysDepts = sysDeptMapper.selectList(new LambdaQueryWrapper<SysDept>() |
| | | .in(SysDept::getDeptId, Arrays.stream(split).map(Long::valueOf).collect(Collectors.toList()))); |
| | | if(!CollectionUtils.isEmpty(sysDepts)){ |
| | | item.setDeptNames(sysDepts.stream().map(SysDept::getDeptName).collect(Collectors.joining(","))); |
| | | } |
| | | }); |
| | | return AjaxResult.success(page1); |
| | | } |
| | | |
| | | public void setSchemeApplicableStaffUserInfo(SchemeApplicableStaff schemeApplicableStaff) { |
| | | // éè¿é¨é¨è·å人åid |
| | | List<SysUserDept> sysUserDepts = sysUserDeptMapper.selectList(new LambdaQueryWrapper<SysUserDept>() |
| | | .in(SysUserDept::getDeptId, schemeApplicableStaff.getDeptIds())); |
| | | if(CollectionUtils.isEmpty(sysUserDepts)){ |
| | | throw new IllegalArgumentException("é¨é¨ä¸æ åå·¥"); |
| | | } |
| | | List<SysUser> sysUsers = sysUserMapper.selectUserByIds(sysUserDepts.stream().map(SysUserDept::getUserId).collect(Collectors.toList())); |
| | | if(CollectionUtils.isEmpty(sysUsers)){ |
| | | throw new IllegalArgumentException("é¨é¨ä¸æ åå·¥"); |
| | | } |
| | | schemeApplicableStaff.setStaffIds(sysUsers |
| | | .stream() |
| | | .map(SysUser::getUserId) |
| | | .filter(Objects::nonNull) // è¿æ»¤æ null å¼ |
| | | .map(String::valueOf) |
| | | .collect(Collectors.joining( ","))); |
| | | schemeApplicableStaff.setStaffNames(sysUsers.stream().map(SysUser::getNickName).collect(Collectors.joining(","))); |
| | | } |
| | | |
| | | @Override |
| | | public AjaxResult add(SchemeApplicableStaff schemeApplicableStaff) { |
| | | if(schemeApplicableStaff == null){ |
| | | return AjaxResult.error("åæ°é误"); |
| | | } |
| | | if(CollectionUtils.isEmpty(schemeApplicableStaff.getSchemeInsuranceDetailList())){ |
| | | return AjaxResult.error("è¯·éæ©æ¹æ¡æç»"); |
| | | } |
| | | setSchemeApplicableStaffUserInfo(schemeApplicableStaff); //æ ¹æ®é¨é¨è®¾ç½®ç¨æ·ä¿¡æ¯ |
| | | int insert = schemeApplicableStaffMapper.insert(schemeApplicableStaff); |
| | | schemeApplicableStaff.getSchemeInsuranceDetailList().forEach(item -> { |
| | | item.setSchemeId(schemeApplicableStaff.getId()); |
| | | schemeInsuranceDetailMapper.insert(item); |
| | | }); |
| | | return AjaxResult.success(insert); |
| | | } |
| | | |
| | | @Override |
| | | public AjaxResult updateSchemeApplicableStaff(SchemeApplicableStaff schemeApplicableStaff) { |
| | | if(schemeApplicableStaff == null){ |
| | | return AjaxResult.error("åæ°é误"); |
| | | } |
| | | setSchemeApplicableStaffUserInfo(schemeApplicableStaff); //æ ¹æ®é¨é¨è®¾ç½®ç¨æ·ä¿¡æ¯ |
| | | int update = schemeApplicableStaffMapper.updateById(schemeApplicableStaff); |
| | | // å
å ï¼éæ°ç»å® |
| | | schemeInsuranceDetailMapper.delete(new LambdaQueryWrapper<SchemeInsuranceDetail>() |
| | | .eq(SchemeInsuranceDetail::getSchemeId, schemeApplicableStaff.getId())); |
| | | schemeApplicableStaff.getSchemeInsuranceDetailList().forEach(item -> { |
| | | item.setSchemeId(schemeApplicableStaff.getId()); |
| | | schemeInsuranceDetailMapper.insert(item); |
| | | }); |
| | | return AjaxResult.success(update); |
| | | } |
| | | |
| | | @Override |
| | | public AjaxResult delete(List<Long> ids) { |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | return AjaxResult.error("åæ°é误"); |
| | | } |
| | | int delete = schemeApplicableStaffMapper.deleteBatchIds(ids); |
| | | schemeInsuranceDetailMapper.delete(new LambdaQueryWrapper<SchemeInsuranceDetail>() |
| | | .in(SchemeInsuranceDetail::getSchemeId, ids)); |
| | | return AjaxResult.success(delete); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.staff.service.impl; |
| | | |
| | | import com.ruoyi.staff.pojo.SchemeInsuranceDetail; |
| | | import com.ruoyi.staff.mapper.SchemeInsuranceDetailMapper; |
| | | import com.ruoyi.staff.service.SchemeInsuranceDetailService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * ç¤¾ä¿æ¹æ¡ä¿é©ç¦å©æç»è¡¨ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-05 11:52:23 |
| | | */ |
| | | @Service |
| | | public class SchemeInsuranceDetailServiceImpl extends ServiceImpl<SchemeInsuranceDetailMapper, SchemeInsuranceDetail> implements SchemeInsuranceDetailService { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.staff.service.impl; |
| | | |
| | | import com.ruoyi.staff.pojo.StaffEducation; |
| | | import com.ruoyi.staff.mapper.StaffEducationMapper; |
| | | import com.ruoyi.staff.service.StaffEducationService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * åå·¥æè²ç»å表 æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-05 04:33:08 |
| | | */ |
| | | @Service |
| | | public class StaffEducationServiceImpl extends ServiceImpl<StaffEducationMapper, StaffEducation> implements StaffEducationService { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.staff.service.impl; |
| | | |
| | | import com.ruoyi.staff.pojo.StaffEmergencyContact; |
| | | import com.ruoyi.staff.mapper.StaffEmergencyContactMapper; |
| | | import com.ruoyi.staff.service.StaffEmergencyContactService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * å工紧æ¥è系人表 æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-05 04:34:17 |
| | | */ |
| | | @Service |
| | | public class StaffEmergencyContactServiceImpl extends ServiceImpl<StaffEmergencyContactMapper, StaffEmergencyContact> implements StaffEmergencyContactService { |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.OrderUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.dto.WordDateDto; |
| | | import com.ruoyi.project.system.domain.SysPost; |
| | | import com.ruoyi.project.system.domain.SysUser; |
| | | import com.ruoyi.project.system.mapper.SysPostMapper; |
| | | import com.ruoyi.project.system.mapper.SysUserMapper; |
| | | import com.ruoyi.project.system.service.impl.SysUserServiceImpl; |
| | | import com.ruoyi.staff.dto.StaffOnJobDto; |
| | | import com.ruoyi.staff.mapper.StaffContractMapper; |
| | | import com.ruoyi.staff.mapper.StaffLeaveMapper; |
| | | import com.ruoyi.staff.mapper.StaffOnJobMapper; |
| | | import com.ruoyi.staff.pojo.StaffContract; |
| | | import com.ruoyi.staff.pojo.StaffLeave; |
| | | import com.ruoyi.staff.pojo.StaffOnJob; |
| | | import com.ruoyi.staff.mapper.*; |
| | | import com.ruoyi.staff.pojo.*; |
| | | import com.ruoyi.staff.service.IStaffOnJobService; |
| | | import freemarker.template.Configuration; |
| | | import freemarker.template.Template; |
| | | import lombok.AllArgsConstructor; |
| | | |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.apache.commons.collections4.ListUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | import java.time.LocalDate; |
| | | import java.time.ZoneId; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @AllArgsConstructor |
| | | @Service |
| | |
| | | @Autowired |
| | | private StaffLeaveMapper staffLeaveMapper; |
| | | |
| | | @Autowired |
| | | private SysUserServiceImpl sysUserService; |
| | | |
| | | @Autowired |
| | | private SysUserMapper sysUserMapper; |
| | | |
| | | @Autowired |
| | | private StaffEducationServiceImpl staffEducationService; |
| | | |
| | | @Autowired |
| | | private StaffEducationMapper staffEducationMapper; |
| | | |
| | | @Autowired |
| | | private StaffWorkExperienceMapper staffWorkExperienceMapper; |
| | | |
| | | @Autowired |
| | | private StaffWorkExperienceServiceImpl staffWorkExperienceServiceImpl; |
| | | |
| | | @Autowired |
| | | private StaffEmergencyContactMapper staffEmergencyContactMapper; |
| | | |
| | | @Autowired |
| | | private StaffEmergencyContactServiceImpl staffEmergencyContactServiceImpl; |
| | | |
| | | |
| | | //å¨èåå·¥å°è´¦å页æ¥è¯¢ |
| | | @Override |
| | |
| | | String[] ignoreProperties = {"id"};//æé¤id屿§ |
| | | // 夿ç¼å·æ¯å¦åå¨ |
| | | List<StaffOnJob> staffOnJobs = staffOnJobMapper.selectList(Wrappers.<StaffOnJob>lambdaQuery().eq(StaffOnJob::getStaffNo, staffOnJobPrams.getStaffNo())); |
| | | if (staffOnJobs.size()>0){ |
| | | if (staffOnJobs != null && !staffOnJobs.isEmpty()){ |
| | | throw new BaseException("ç¼å·ä¸º"+staffOnJobPrams.getStaffNo()+"çå工已ç»åå¨,æ æ³æ°å¢!!!"); |
| | | } |
| | | |
| | | // å建å
¥èæ°æ® |
| | | staffOnJobPrams.setContractExpireTime(staffOnJobPrams.getContractEndTime()); |
| | | staffOnJobPrams.setStaffState(1); |
| | | staffOnJobMapper.insert(staffOnJobPrams); |
| | | |
| | | // æ¥è¯¢ç¨æ·æ¯å¦å·²ç»æ°å¢ |
| | | SysUser sysUser = sysUserService.selectUserById(staffOnJobPrams.getId()); |
| | | if(sysUser == null){ |
| | | SysUser sysUser1 = new SysUser(); |
| | | sysUser1.setUserName(staffOnJobPrams.getStaffNo()); |
| | | sysUser1.setNickName(staffOnJobPrams.getStaffName()); |
| | | String s = SecurityUtils.encryptPassword("123456"); |
| | | sysUser1.setPassword(s); |
| | | if(staffOnJobPrams.getSysPostId() != null){ |
| | | Long[] posts = new Long[]{staffOnJobPrams.getSysPostId().longValue()}; |
| | | sysUser1.setPostIds(posts); |
| | | } |
| | | sysUser1.setRoleIds(new Long[]{staffOnJobPrams.getRoleId()}); |
| | | sysUser1.setDeptIds(new Long[]{staffOnJobPrams.getSysDeptId()}); |
| | | sysUser1.setStatus("0"); |
| | | sysUserService.insertUser(sysUser1); |
| | | } |
| | | // ç»å®åè¡¨æ°æ® |
| | | bingingStaffOnJobExtra(staffOnJobPrams.getId(),staffOnJobPrams); |
| | | // å建ååè®°å½ |
| | | StaffContract staffContract = new StaffContract(); |
| | | staffContract.setStaffOnJobId(staffOnJobPrams.getId()); |
| | |
| | | staffContractMapper.updateById(contract); |
| | | } |
| | | |
| | | // å 餿æåè¡¨æ°æ® |
| | | delStaffOnJobExtra(Arrays.asList(id)); |
| | | // ç»å®åè¡¨æ°æ® |
| | | bingingStaffOnJobExtra(id,staffOnJobParams); |
| | | // æ´æ°åå·¥æ°æ® |
| | | staffOnJobParams.setContractExpireTime(staffOnJobParams.getContractEndTime()); |
| | | return staffOnJobMapper.updateById(staffOnJobParams); |
| | | } |
| | | |
| | | /** |
| | | * ç»å®åå·¥åè¡¨æ°æ® |
| | | * @param staffOnJobPrams |
| | | * @param id |
| | | */ |
| | | public void bingingStaffOnJobExtra(Long id,StaffOnJob staffOnJobPrams) { |
| | | // æ°å¢æè²ç»å |
| | | if(CollectionUtils.isNotEmpty(staffOnJobPrams.getStaffEducationList())){ |
| | | staffOnJobPrams.getStaffEducationList().stream() |
| | | .filter(Objects::nonNull) // è¿æ»¤null对象ï¼é¿å
空æé |
| | | .forEach(staff -> staff.setStaffOnJobId(id)); // èµå¼ |
| | | staffEducationService.saveBatch(staffOnJobPrams.getStaffEducationList()); |
| | | } |
| | | // æ°å¢å·¥ä½ç»å |
| | | if(CollectionUtils.isNotEmpty(staffOnJobPrams.getStaffWorkExperienceList())){ |
| | | staffOnJobPrams.getStaffWorkExperienceList().stream() |
| | | .filter(Objects::nonNull) // è¿æ»¤null对象ï¼é¿å
空æé |
| | | .forEach(staff -> staff.setStaffOnJobId(id)); // èµå¼ |
| | | staffWorkExperienceServiceImpl.saveBatch(staffOnJobPrams.getStaffWorkExperienceList()); |
| | | } |
| | | // æ°å¢ç´§æ¥è系人 |
| | | if(CollectionUtils.isNotEmpty(staffOnJobPrams.getStaffEmergencyContactList())){ |
| | | staffOnJobPrams.getStaffEmergencyContactList().stream() |
| | | .filter(Objects::nonNull) // è¿æ»¤null对象ï¼é¿å
空æé |
| | | .forEach(staff -> staff.setStaffOnJobId(id)); // èµå¼ |
| | | staffEmergencyContactServiceImpl.saveBatch(staffOnJobPrams.getStaffEmergencyContactList()); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * éè¿åå·¥idå 餿è²ç»åï¼å·¥ä½ç»åï¼ç´§æ¥è系人 |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | public void delStaffOnJobExtra(List<Long> ids) { |
| | | // å 餿è²ç»å |
| | | staffEducationService.remove(Wrappers.<StaffEducation>lambdaQuery().in(StaffEducation::getStaffOnJobId,ids)); |
| | | // å é¤å·¥ä½ç»å |
| | | staffWorkExperienceServiceImpl.remove(Wrappers.<StaffWorkExperience>lambdaQuery().in(StaffWorkExperience::getStaffOnJobId,ids)); |
| | | // å é¤ç´§æ¥è系人 |
| | | staffEmergencyContactServiceImpl.remove(Wrappers.<StaffEmergencyContact>lambdaQuery().in(StaffEmergencyContact::getStaffOnJobId,ids)); |
| | | } |
| | | |
| | | //å é¤å
¥è |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int delStaffOnJobs(List<Integer> ids) { |
| | | List<StaffOnJob> staffOnJobs = staffOnJobMapper.selectList(Wrappers.<StaffOnJob>lambdaQuery().in(StaffOnJob::getId, ids)); |
| | | if(CollectionUtils.isEmpty(staffOnJobs)){ |
| | | throw new BaseException("该åå·¥ä¸åå¨,æ æ³å é¤!!!"); |
| | | } |
| | | // å é¤å
¥èæ°æ® |
| | | staffOnJobMapper.deleteBatchIds(ids); |
| | | // å é¤ç¦»èæ°æ® |
| | | staffLeaveMapper.delete(Wrappers.<StaffLeave>lambdaQuery().in(StaffLeave::getStaffOnJobId, ids)); |
| | | // å é¤ç¨æ·æ°æ® |
| | | List<SysUser> sysUsers = sysUserMapper.selectList(Wrappers.<SysUser>lambdaQuery() |
| | | .in(SysUser::getUserName, staffOnJobs.stream().map(StaffOnJob::getStaffNo).collect(Collectors.toList()))); |
| | | if(CollectionUtils.isNotEmpty(sysUsers)){ |
| | | Long[] longs = sysUsers.stream().map(SysUser::getUserId).toArray(Long[]::new); |
| | | sysUserService.deleteUserByIds(longs); |
| | | } |
| | | // å é¤åè¡¨æ°æ® |
| | | delStaffOnJobExtra(ids.stream().map(Integer::longValue).collect(Collectors.toList())); |
| | | |
| | | // å é¤ååæ°æ® |
| | | return staffContractMapper.delete(Wrappers.<StaffContract>lambdaQuery().in(StaffContract::getStaffOnJobId, ids)); |
| | | } |
| | |
| | | staffOnJobDto.setContractStartTime(contract.getContractStartTime()); |
| | | staffOnJobDto.setContractEndTime(contract.getContractEndTime()); |
| | | } |
| | | // è·ååè¡¨æ°æ® |
| | | staffOnJobDto.setStaffEducationList(staffEducationMapper.selectList(Wrappers.<StaffEducation>lambdaQuery() |
| | | .eq(StaffEducation::getStaffOnJobId, staffOnJob.getId()))); |
| | | staffOnJobDto.setStaffWorkExperienceList(staffWorkExperienceMapper.selectList(Wrappers.<StaffWorkExperience>lambdaQuery() |
| | | .eq(StaffWorkExperience::getStaffOnJobId, staffOnJob.getId()))); |
| | | staffOnJobDto.setStaffEmergencyContactList(staffEmergencyContactMapper.selectList(Wrappers.<StaffEmergencyContact>lambdaQuery() |
| | | .eq(StaffEmergencyContact::getStaffOnJobId, staffOnJob.getId()))); |
| | | return staffOnJobDto; |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.staff.service.impl; |
| | | |
| | | import com.ruoyi.staff.pojo.StaffWorkExperience; |
| | | import com.ruoyi.staff.mapper.StaffWorkExperienceMapper; |
| | | import com.ruoyi.staff.service.StaffWorkExperienceService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * å工工ä½ç»å表 æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-03-05 04:33:36 |
| | | */ |
| | | @Service |
| | | public class StaffWorkExperienceServiceImpl extends ServiceImpl<StaffWorkExperienceMapper, StaffWorkExperience> implements StaffWorkExperienceService { |
| | | |
| | | } |
| | |
| | | druid: |
| | | # ä¸»åºæ°æ®æº |
| | | master: |
| | | url: jdbc:mysql://localhost:3306/product-inventory-management-new?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | url: jdbc:mysql://1.15.17.182:9999/product-inventory-management-new?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | username: root |
| | | password: 123456 |
| | | password: xd@123456.. |
| | | # ä»åºæ°æ®æº |
| | | slave: |
| | | # 仿°æ®æºå¼å
³/é»è®¤å
³é |
| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.aftersalesservice.mapper.AfterSalesServiceMapper"> |
| | | |
| | | <select id="listPage" resultType="com.ruoyi.aftersalesservice.pojo.AfterSalesService"> |
| | | select * from after_sales_service |
| | | <select id="listPage" resultType="com.ruoyi.aftersalesservice.dto.AfterSalesServiceNewDto"> |
| | | select ass.*, |
| | | sl.sales_contract_no |
| | | from after_sales_service ass |
| | | left join sales_ledger sl on ass.sales_ledger_id = sl.id |
| | | where 1 = 1 |
| | | <if test="req.feedbackDate != null"> |
| | | AND feedback_date BETWEEN #{req.feedbackDate} AND #{req.feedbackDate} |
| | |
| | | <if test="req.status != null and req.status != ''"> |
| | | and status = #{req.status} |
| | | </if> |
| | | <if test="req.urgency != null"> |
| | | and urgency = #{req.urgency} |
| | | </if> |
| | | <if test="req.serviceType != null"> |
| | | and service_type = #{req.serviceType} |
| | | </if> |
| | | order by update_time desc |
| | | </select> |
| | | <select id="countAfterSalesService" resultType="com.ruoyi.aftersalesservice.dto.CountDto"> |
| | | select |
| | | status, |
| | | count(1) as count |
| | | from after_sales_service |
| | | group by status |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.procurementrecord.mapper.ReturnManagementMapper"> |
| | | |
| | | <select id="listPage" resultType="com.ruoyi.procurementrecord.pojo.ReturnManagement"> |
| | | select * from return_management |
| | | <select id="listPage" resultType="com.ruoyi.procurementrecord.dto.ReturnManagementDto"> |
| | | select rm.*, |
| | | c.customer_name, |
| | | si.shipping_no, |
| | | sl.project_name, |
| | | sl.sales_contract_no, |
| | | sl.salesman |
| | | from return_management rm |
| | | left join shipping_info si on rm.shipping_id = si.id |
| | | left join customer c on rm.customer_id = c.id |
| | | left join sales_ledger sl on si.sales_ledger_id = sl.id |
| | | <where> |
| | | <if test="req.returnNo != null and req.returnNo != ''"> |
| | | and return_no like concat('%',#{req.returnNo},'%') |
| | | and rm.return_no like concat('%',#{req.returnNo},'%') |
| | | </if> |
| | | <if test="req.returnType != null and req.returnType != ''"> |
| | | and return_type = #{req.returnType} |
| | | <if test="req.customerName != null and req.customerName != ''"> |
| | | and c.customer_name like concat('%',#{req.customerName},'%') |
| | | </if> |
| | | <if test="req.projectName != null and req.projectName != ''"> |
| | | and sl.project_name like concat('%',#{req.projectName},'%') |
| | | </if> |
| | | <if test="req.salesman != null and req.salesman != ''"> |
| | | and sl.salesman like concat('%',#{req.salesman},'%') |
| | | </if> |
| | | <if test="req.shippingNo != null and req.shippingNo != ''"> |
| | | and rm.shipping_no like concat('%',#{req.shippingNo},'%') |
| | | </if> |
| | | <if test="req.projectStage != null and req.projectStage != ''"> |
| | | and rm.project_stage like concat('%',#{req.projectStage},'%') |
| | | </if> |
| | | <if test="req.maker != null and req.maker != ''"> |
| | | and rm.maker like concat('%',#{req.maker},'%') |
| | | </if> |
| | | <if test="req.salesContractNo != null and req.salesContractNo != ''"> |
| | | and sl.sales_contract_no like concat('%',#{req.salesContractNo},'%') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | <select id="getReturnManagementDtoById" resultType="com.ruoyi.procurementrecord.dto.ReturnManagementDto"> |
| | | select rm.*, |
| | | c.customer_name, |
| | | si.shipping_no, |
| | | sl.project_name, |
| | | sl.sales_contract_no, |
| | | sl.salesman |
| | | from return_management rm |
| | | left join shipping_info si on rm.shipping_id = si.id |
| | | left join customer c on rm.customer_id = c.id |
| | | left join sales_ledger sl on si.sales_ledger_id = sl.id |
| | | where rm.id = #{id} |
| | | </select> |
| | | </mapper> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.ruoyi.procurementrecord.mapper.ReturnSaleProductMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.procurementrecord.pojo.ReturnSaleProduct"> |
| | | <id column="id" property="id" /> |
| | | <result column="return_management_id" property="returnManagementId" /> |
| | | <result column="return_sale_ledger_product_id" property="returnSaleLedgerProductId" /> |
| | | <result column="num" property="num" /> |
| | | <result column="status" property="status" /> |
| | | </resultMap> |
| | | <select id="listReturnSaleProductDto" resultType="com.ruoyi.procurementrecord.dto.ReturnSaleProductDto"> |
| | | select rsp.*, |
| | | slp.product_category as product_name, |
| | | slp.specification_model as model |
| | | from return_sale_product rsp |
| | | left join sales_ledger_product slp on rsp.return_sale_ledger_product_id = slp.id |
| | | where rsp.return_management_id = #{returnManagementId} |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.ruoyi.projectManagement.mapper.PlanMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.projectManagement.pojo.Plan"> |
| | | <id property="id" column="id" jdbcType="BIGINT"/> |
| | | <result property="name" column="name" jdbcType="VARCHAR"/> |
| | | <result property="describe" column="describe" jdbcType="VARCHAR"/> |
| | | <result property="attachment" column="attachment" jdbcType="VARCHAR"/> |
| | | <result property="is_delete" column="is_delete" jdbcType="INTEGER"/> |
| | | <result property="create_time" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="update_time" column="update_time" jdbcType="TIMESTAMP"/> |
| | | <result property="create_user" column="create_user" jdbcType="VARCHAR"/> |
| | | <result property="update_user" column="update_user" jdbcType="VARCHAR"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | id,name,describe, |
| | | attachment,is_delete,create_time, |
| | | update_time,create_user,update_user |
| | | </sql> |
| | | |
| | | <select id="selectPlanPage" resultMap="BaseResultMap"> |
| | | select t1.* |
| | | from project_management_plan as t1 |
| | | order by t1.create_time desc |
| | | </select> |
| | | </mapper> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.ruoyi.purchase.mapper.PurchaseReturnOrdersMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.purchase.pojo.PurchaseReturnOrders"> |
| | | <id column="id" property="id" /> |
| | | <result column="no" property="no" /> |
| | | <result column="return_type" property="returnType" /> |
| | | <result column="supplier_id" property="supplierId" /> |
| | | <result column="project_id" property="projectId" /> |
| | | <result column="project_phase" property="projectPhase" /> |
| | | <result column="prepared_at" property="preparedAt" /> |
| | | <result column="prepared_user_id" property="preparedUserId" /> |
| | | <result column="return_user_id" property="returnUserId" /> |
| | | <result column="purchase_ledger_id" property="purchaseLedgerId" /> |
| | | <result column="remark" property="remark" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | </resultMap> |
| | | |
| | | </mapper> |
| | |
| | | FROM shipping_info s |
| | | LEFT JOIN sales_ledger sl ON s.sales_ledger_id = sl.id |
| | | </select> |
| | | <select id="getReturnManagementDtoById" resultType="com.ruoyi.sales.dto.SalesLedgerProductDto"> |
| | | SELECT |
| | | slp.*, |
| | | slp.quantity - COALESCE(rs.total_return_num, 0) AS un_quantity, |
| | | COALESCE(rs.total_return_num, 0) AS total_return_num |
| | | FROM shipping_info si |
| | | LEFT JOIN sales_ledger_product slp ON si.sales_ledger_product_id = slp.id |
| | | LEFT JOIN ( |
| | | SELECT |
| | | return_sale_ledger_product_id, |
| | | SUM(num) AS total_return_num |
| | | FROM return_sale_product |
| | | <where> |
| | | <if test="productId != null"> |
| | | AND return_sale_ledger_product_id = #{productId} |
| | | </if> |
| | | </where> |
| | | GROUP BY return_sale_ledger_product_id |
| | | ) rs ON rs.return_sale_ledger_product_id = slp.id |
| | | </select> |
| | | <select id="getShippingInfoByCustomerName" resultType="com.ruoyi.sales.pojo.ShippingInfo"> |
| | | select * from shipping_info si |
| | | left join sales_ledger sl on si.sales_ledger_id = sl.id |
| | | where sl.customer_name = #{customerName} |
| | | </select> |
| | | </mapper> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.ruoyi.staff.mapper.SchemeApplicableStaffMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.staff.pojo.SchemeApplicableStaff"> |
| | | <id column="id" property="id" /> |
| | | <result column="title" property="title" /> |
| | | <result column="dept_ids" property="deptIds" /> |
| | | <result column="staff_names" property="staffNames" /> |
| | | <result column="staff_ids" property="staffIds" /> |
| | | <result column="insurance_types" property="insuranceTypes" /> |
| | | <result column="remark" property="remark" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="create_user" property="createUser" /> |
| | | <result column="update_user" property="updateUser" /> |
| | | </resultMap> |
| | | |
| | | </mapper> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.ruoyi.staff.mapper.SchemeInsuranceDetailMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.staff.pojo.SchemeInsuranceDetail"> |
| | | <id column="id" property="id" /> |
| | | <result column="scheme_id" property="schemeId" /> |
| | | <result column="insurance_type" property="insuranceType" /> |
| | | <result column="payment_base" property="paymentBase" /> |
| | | <result column="use_basic_salary" property="useBasicSalary" /> |
| | | <result column="personal_ratio" property="personalRatio" /> |
| | | <result column="personal_fixed" property="personalFixed" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="create_user" property="createUser" /> |
| | | <result column="update_user" property="updateUser" /> |
| | | </resultMap> |
| | | |
| | | </mapper> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.ruoyi.staff.mapper.StaffEducationMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.staff.pojo.StaffEducation"> |
| | | <id column="id" property="id" /> |
| | | <result column="staff_on_job_id" property="staffOnJobId" /> |
| | | <result column="education" property="education" /> |
| | | <result column="school_name" property="schoolName" /> |
| | | <result column="enroll_time" property="enrollTime" /> |
| | | <result column="graduate_time" property="graduateTime" /> |
| | | <result column="major" property="major" /> |
| | | <result column="degree" property="degree" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="create_user" property="createUser" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="update_user" property="updateUser" /> |
| | | </resultMap> |
| | | |
| | | </mapper> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.ruoyi.staff.mapper.StaffEmergencyContactMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.staff.pojo.StaffEmergencyContact"> |
| | | <id column="id" property="id" /> |
| | | <result column="staff_on_job_id" property="staffOnJobId" /> |
| | | <result column="contact_name" property="contactName" /> |
| | | <result column="contact_relation" property="contactRelation" /> |
| | | <result column="contact_phone" property="contactPhone" /> |
| | | <result column="contact_address" property="contactAddress" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="create_user" property="createUser" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="update_user" property="updateUser" /> |
| | | </resultMap> |
| | | |
| | | </mapper> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.ruoyi.staff.mapper.StaffWorkExperienceMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.staff.pojo.StaffWorkExperience"> |
| | | <id column="id" property="id" /> |
| | | <result column="staff_on_job_id" property="staffOnJobId" /> |
| | | <result column="former_company" property="formerCompany" /> |
| | | <result column="former_dept" property="formerDept" /> |
| | | <result column="former_position" property="formerPosition" /> |
| | | <result column="start_date" property="startDate" /> |
| | | <result column="end_date" property="endDate" /> |
| | | <result column="work_desc" property="workDesc" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="create_user" property="createUser" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="update_user" property="updateUser" /> |
| | | </resultMap> |
| | | |
| | | </mapper> |
| | |
| | | order by d.parent_id, d.order_num |
| | | </select> |
| | | |
| | | <select id="selectDeptListByRoleId" resultType="Long"> |
| | | <select id="selectDeptListByRoleId" resultType="java.lang.Long"> |
| | | select d.dept_id |
| | | from sys_dept d |
| | | left join sys_role_dept rd on d.dept_id = rd.dept_id |
| | |
| | | update sys_dept set del_flag = '2' where dept_id = #{deptId} |
| | | </delete> |
| | | |
| | | <select id="maxLevelDeptId"> |
| | | <select id="maxLevelDeptId" resultType="java.lang.Long"> |
| | | WITH RECURSIVE DepartmentHierarchy AS ( |
| | | SELECT dept_id, parent_id |
| | | FROM sys_dept |
| | |
| | | <select id="selectUserById" parameterType="Long" resultMap="SysUserResult"> |
| | | <include refid="selectUserVo"/> |
| | | where u.user_id = #{userId} |
| | | and u.del_flag = '0' |
| | | </select> |
| | | |
| | | <select id="checkUserNameUnique" parameterType="String" resultMap="SysUserResult"> |
| | |
| | | where u.user_id in <foreach collection="userIds" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | and u.del_flag = '0' |
| | | </select> |
| | | <select id="selectRegistrantIds" resultType="com.ruoyi.project.system.domain.SysUser"> |
| | | SELECT user_id, nick_name FROM sys_user |
| | |
| | | <foreach collection="userIds" item="id" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | and del_flag = '0' |
| | | </select> |
| | | <select id="selectUserByNickName" resultType="com.ruoyi.project.system.domain.SysUser" |
| | | parameterType="java.lang.String"> |