Merge branch 'dev_tide' into dev_tide_cbsglxt
# Conflicts:
# pom.xml
# src/main/java/com/ruoyi/tide/controller/TideController.java
# src/main/java/com/ruoyi/tide/utils/TideUtils.java
# src/main/resources/application-ccwlxt.yml
# src/main/resources/application-cgglxt.yml
# src/main/resources/application-cwglxt.yml
# src/main/resources/application-hbmjxt.yml
# src/main/resources/application-rlzyxt.yml
已添加21个文件
已重命名1个文件
已修改77个文件
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.common; |
| | | |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.lang.reflect.Field; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /* |
| | | * ææ |
| | | * çæSQLè¯å¥*/ |
| | | |
| | | @Component |
| | | @AllArgsConstructor |
| | | public class QueryWrappers<T> { |
| | | |
| | | public static <T> QueryWrapper<T> queryWrappers(T entity) { |
| | | if (ObjectUtil.isEmpty(entity)) return null; |
| | | Class<?> aClass = entity.getClass(); |
| | | QueryWrapper<T> wrapper = Wrappers.<T>query(); |
| | | List<Field> fieldList = new ArrayList<>(); |
| | | while (aClass != null) { |
| | | fieldList.addAll(new ArrayList<>(Arrays.asList(aClass.getDeclaredFields()))); |
| | | aClass = aClass.getSuperclass(); |
| | | } |
| | | for (Field field : fieldList) { |
| | | field.setAccessible(true); |
| | | Object value; |
| | | try { |
| | | value = field.get(entity); |
| | | } catch (IllegalAccessException e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("æ¥è¯¢æ¡ä»¶çæé误"); |
| | | } |
| | | if(value == null || value.equals("")){ |
| | | continue; |
| | | } |
| | | /*boolean bool = field.isAnnotationPresent(TableField.class); |
| | | if (bool){ |
| | | if(field.getAnnotation(TableField.class).exist()==false)continue; |
| | | }*/ |
| | | if (!field.getName().equals("orderBy")) { |
| | | if(value.getClass()== LocalDateTime.class){ |
| | | wrapper.like(StrUtil.toUnderlineCase(field.getName()), ((LocalDateTime) value).format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); |
| | | }else if(value.getClass()== String.class){ |
| | | wrapper.like(StrUtil.toUnderlineCase(field.getName()), value); |
| | | }else{ |
| | | wrapper.eq(StrUtil.toUnderlineCase(field.getName()), value); |
| | | } |
| | | } else { |
| | | Map<String, String> map = (Map<String, String>) value; |
| | | if(map.get("order")!=null){ |
| | | wrapper.orderBy(true, map.get("order").equals("asc"), StrUtil.toUnderlineCase(map.get("field"))); |
| | | } |
| | | } |
| | | } |
| | | return wrapper; |
| | | } |
| | | } |
| | |
| | | if (StringUtils.isNotNull(currentUser) && !currentUser.isAdmin())
|
| | | {
|
| | | String permission = StringUtils.defaultIfEmpty(controllerDataScope.permission(), PermissionContextHolder.getContext());
|
| | | dataScopeFilter(joinPoint, currentUser, controllerDataScope.deptAlias(), controllerDataScope.userAlias(), permission);
|
| | | dataScopeFilter(joinPoint, currentUser, controllerDataScope.deptAlias(), controllerDataScope.userAlias(), controllerDataScope.tenantIdFelid(), permission);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | * @param user ç¨æ·
|
| | | * @param deptAlias é¨é¨å«å
|
| | | * @param userAlias ç¨æ·å«å
|
| | | * @param tenantIdFelid ç§æ·idåæ®µå
|
| | | * @param permission æéå符
|
| | | */
|
| | | public static void dataScopeFilter(JoinPoint joinPoint, SysUser user, String deptAlias, String userAlias, String permission)
|
| | | public static void dataScopeFilter(JoinPoint joinPoint, SysUser user, String deptAlias, String userAlias,String tenantIdFelid, String permission)
|
| | | {
|
| | | StringBuilder sqlString = new StringBuilder();
|
| | | List<String> conditions = new ArrayList<String>();
|
| | |
| | | if (StringUtils.isNotBlank(userAlias))
|
| | | {
|
| | | sqlString.append(StringUtils.format(" OR {}.user_id = {} ", userAlias, user.getUserId()));
|
| | | }else if(StringUtils.isNotBlank(tenantIdFelid)){
|
| | | sqlString.append(StringUtils.format(" OR {}.tenant_id = {} ", tenantIdFelid, user.getTenantId()));
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | public String userAlias() default "";
|
| | |
|
| | | /**
|
| | | * ç§æ·idåæ®µå
|
| | | * @return
|
| | | */
|
| | | public String tenantIdFelid() default "";
|
| | |
|
| | | /**
|
| | | * æéå符ï¼ç¨äºå¤ä¸ªè§è²å¹é
符åè¦æ±çæéï¼é»è®¤æ ¹æ®æé注解@ssè·åï¼å¤ä¸ªæéç¨éå·åé弿¥
|
| | | */
|
| | | public String permission() default "";
|
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | 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.procurementrecord.dto.*; |
| | | import com.ruoyi.procurementrecord.mapper.CustomStorageMapper; |
| | | import com.ruoyi.procurementrecord.pojo.CustomStorage; |
| | | import com.ruoyi.procurementrecord.service.ProcurementRecordService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | @Autowired |
| | | private ProcurementRecordService procurementRecordService; |
| | | |
| | | |
| | | /** |
| | | * éè¿éå®äº§åidè·åå
¥åºæ°é |
| | | * @param salesProductId |
| | | * @return |
| | | */ |
| | | @GetMapping("/getProcurementAmount") |
| | | @ApiOperation(value = "éè¿éå®äº§åidè·åå
¥åºæ°é") |
| | | public AjaxResult getProcurementAmount(@RequestParam("salesProductId") Long salesProductId) { |
| | | return AjaxResult.success(procurementRecordService.getProcurementAmount(salesProductId)); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/productlist") |
| | | @Log(title = "éè´å
¥åº-å
¥åºç®¡ç-æ°å¢å
¥åºæ¥è¯¢", businessType = BusinessType.OTHER) |
| | | public AjaxResult list(ProcurementDto procurementDto) { |
| | | List<ProcurementDto> result =procurementRecordService.listProcurementBySalesLedgerId(procurementDto); |
| | | List<ProcurementDto> result = procurementRecordService.listProcurementBySalesLedgerId(procurementDto); |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | |
| | | @Log(title = "éè´å
¥åº-å
¥åºç®¡ç-æ°å¢å
¥åº", businessType = BusinessType.INSERT) |
| | | @Transactional |
| | | public AjaxResult add(@RequestBody ProcurementAddDto procurementDto) { |
| | | procurementDto.setType(1); |
| | | procurementDto.setTypeName("éè´å
¥åº"); |
| | | return AjaxResult.success(procurementRecordService.add(procurementDto)); |
| | | } |
| | | |
| | | @PostMapping("/addCustom") |
| | | @Log(title = "èªå®ä¹å
¥åº-å
¥åºç®¡ç-æ°å¢å
¥åº", businessType = BusinessType.INSERT) |
| | | @Transactional |
| | | public AjaxResult addCustom(@RequestBody List<CustomStorage> customStorage) { |
| | | return procurementRecordService.addCustom(customStorage); |
| | | } |
| | | |
| | | @PostMapping("/updateCustom") |
| | | @Log(title = "èªå®ä¹å
¥åº-å
¥åºç®¡ç-ä¿®æ¹å
¥åº", businessType = BusinessType.UPDATE) |
| | | @Transactional |
| | | public AjaxResult updateCustom(@RequestBody CustomStorage customStorage) { |
| | | return procurementRecordService.updateCustom(customStorage); |
| | | } |
| | | |
| | | @PostMapping("/delteCustom") |
| | | @Log(title = "èªå®ä¹å
¥åº-å
¥åºç®¡ç-å é¤å
¥åº", businessType = BusinessType.DELETE) |
| | | @Transactional |
| | | public AjaxResult deleteCustom(@RequestBody List<Long> ids) { |
| | | return procurementRecordService.deleteCustom(ids); |
| | | } |
| | | |
| | | @PostMapping("/update") |
| | |
| | | } |
| | | |
| | | @PostMapping("/updateManagement") |
| | | @Log(title = "éè´å
¥åº-åºåå°è´¦-ä¿®æ¹", businessType = BusinessType.UPDATE) |
| | | @Log(title = "æåå
¥åº-åºåå°è´¦-ä¿®æ¹", businessType = BusinessType.UPDATE) |
| | | @Transactional |
| | | public AjaxResult updateManagement(@RequestBody ProcurementManagementUpdateDto procurementDto) { |
| | | return AjaxResult.success(procurementRecordService.updateManagement(procurementDto)); |
| | | } |
| | | |
| | | @PostMapping("/updateManagementByCustom") |
| | | @Log(title = "èªå®ä¹å
¥åº-åºåå°è´¦-ä¿®æ¹", businessType = BusinessType.UPDATE) |
| | | @Transactional |
| | | public AjaxResult updateManagementByCustom(@RequestBody ProcurementManagementUpdateDto procurementDto) { |
| | | return AjaxResult.success(procurementRecordService.updateManagementByCustom(procurementDto)); |
| | | } |
| | | |
| | | @PostMapping("/del") |
| | |
| | | @Log(title = "éè´å
¥åº-å
¥åºç®¡ç-å
¥åºæ¥è¯¢", businessType = BusinessType.OTHER) |
| | | @ApiOperation(value = "å
¥åºæ¥è¯¢") |
| | | public AjaxResult listPage(Page page, ProcurementPageDto procurementDto) { |
| | | IPage<ProcurementPageDto> result =procurementRecordService.listPage(page, procurementDto); |
| | | IPage<ProcurementPageDto> result = procurementRecordService.listPage(page, procurementDto); |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | @GetMapping("/listPageByProduction") |
| | | @Log(title = "ç产å
¥åº-å
¥åºç®¡ç-å
¥åºæ¥è¯¢", businessType = BusinessType.OTHER) |
| | | @ApiOperation(value = "å
¥åºæ¥è¯¢") |
| | | public AjaxResult listPageByProduction(Page page, ProcurementPageDto procurementDto) { |
| | | IPage<ProcurementPageDto> result = procurementRecordService.listPageByProduction(page, procurementDto); |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | @GetMapping("/listPageByCustom") |
| | | @Log(title = "èªå®ä¹å
¥åº-å
¥åºç®¡ç-å
¥åºæ¥è¯¢", businessType = BusinessType.OTHER) |
| | | @ApiOperation(value = "å
¥åºæ¥è¯¢") |
| | | public AjaxResult listPageByCustom(Page page, CustomStorage customStorage) { |
| | | IPage<CustomStorage> result = procurementRecordService.listPageByCustom(page, customStorage); |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | @GetMapping("/listPageCopy") |
| | | @Log(title = "éè´å
¥åº-å
¥åºç®¡ç-å
¥åºæ¥è¯¢", businessType = BusinessType.OTHER) |
| | | @Log(title = "éè´å
¥åº-åºå管ç-å页æ¥è¯¢", businessType = BusinessType.OTHER) |
| | | public AjaxResult listPageCopy(Page page, ProcurementPageDto procurementDto) { |
| | | IPage<ProcurementPageDtoCopy> result =procurementRecordService.listPageCopy(page, procurementDto); |
| | | IPage<ProcurementPageDtoCopy> result = procurementRecordService.listPageCopy(page, procurementDto); |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | @GetMapping("/listPageCopyByProduction") |
| | | @Log(title = "ç产å
¥åº-åºå管ç-å页æ¥è¯¢", businessType = BusinessType.OTHER) |
| | | public AjaxResult listPageCopyByProduction(Page page, ProcurementPageDto procurementDto) { |
| | | IPage<ProcurementPageDtoCopy> result = procurementRecordService.listPageCopyByProduction(page, procurementDto); |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | @GetMapping("/listPageCopyByCustom") |
| | | @Log(title = "èªå®ä¹å
¥åº-åºå管ç-å页æ¥è¯¢", businessType = BusinessType.OTHER) |
| | | public AjaxResult listPageCopyByCustom(Page page, CustomStorage customStorage) { |
| | | IPage<CustomStorage> result = procurementRecordService.listPageCopyByCustom(page, customStorage); |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | @GetMapping("/getReportList") |
| | | @Log(title = "åºåæ¥è¡¨æ¥è¯¢", businessType = BusinessType.OTHER) |
| | | public AjaxResult getReportList(Page page, ProcurementPageDto procurementDto) { |
| | |
| | | } |
| | | |
| | | /** |
| | | * å¯¼åº |
| | | * åºå管çéè´å¯¼åº |
| | | * @param response |
| | | */ |
| | | @PostMapping("/exportCopy") |
| | | public void exportCopy(HttpServletResponse response) { |
| | | procurementRecordService.exportCopy(response); |
| | | procurementRecordService.exportCopy(response,1); |
| | | } |
| | | |
| | | /** |
| | | * å¯¼åº |
| | | * åºå管ççäº§å¯¼åº |
| | | * @param response |
| | | */ |
| | | @PostMapping("/exportCopyOne") |
| | | public void exportCopyOne(HttpServletResponse response) { |
| | | procurementRecordService.exportCopy(response,2); |
| | | } |
| | | |
| | | /** |
| | | * åºå管çèªå®ä¹å¯¼åº |
| | | * @param response |
| | | */ |
| | | @PostMapping("/exportCopyTwo") |
| | | public void exportCopyTwo(HttpServletResponse response) { |
| | | procurementRecordService.exportCopyTwo(response,3); |
| | | } |
| | | |
| | | /** |
| | | * å
¥åºï¼åºåºç®¡çéè´å¯¼åº |
| | | * @param response |
| | | */ |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response) { |
| | | procurementRecordService.export(response); |
| | | procurementRecordService.export(response,1); |
| | | } |
| | | |
| | | /** |
| | | * å
¥åºï¼åºåºç®¡ççäº§å¯¼åº |
| | | * @param response |
| | | */ |
| | | @PostMapping("/exportOne") |
| | | public void exportOne(HttpServletResponse response) { |
| | | procurementRecordService.export(response,2); |
| | | } |
| | | |
| | | @Autowired |
| | | private CustomStorageMapper customStorageMapper; |
| | | |
| | | /** |
| | | * å
¥åºï¼åºåºç®¡çèªå®ä¹å¯¼åº |
| | | * @param response |
| | | */ |
| | | @PostMapping("/exportTwo") |
| | | public void exportTwo(HttpServletResponse response) { |
| | | List<CustomStorage> customStorages = customStorageMapper.selectList(null); |
| | | ExcelUtil<CustomStorage> util = new ExcelUtil<CustomStorage>(CustomStorage.class); |
| | | util.exportExcel(response, customStorages, "å
¥åºå°è´¦"); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | 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.procurementrecord.dto.ProcurementPageDto; |
| | | import com.ruoyi.procurementrecord.dto.ProcurementRecordOutAdd; |
| | | import com.ruoyi.procurementrecord.dto.ProcurementRecordOutPageDto; |
| | | import com.ruoyi.procurementrecord.dto.ProcurementUpdateDto; |
| | | import com.ruoyi.procurementrecord.mapper.ProcurementRecordOutMapper; |
| | | import com.ruoyi.procurementrecord.service.ProcurementRecordOutService; |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author :yys |
| | |
| | | private ProcurementRecordOutService procurementRecordOutService; |
| | | |
| | | @PostMapping("/stockout") |
| | | @Log(title = "éè´å
¥åº-åºåºç®¡ç-åºåº", businessType = BusinessType.INSERT) |
| | | @Log(title = "éè´åºåº-åºåºç®¡ç-åºåº", businessType = BusinessType.INSERT) |
| | | public AjaxResult stockout(@RequestBody ProcurementRecordOutAdd procurementRecordOutAdd) { |
| | | return AjaxResult.success(procurementRecordOutService.stockout(procurementRecordOutAdd)); |
| | | } |
| | | |
| | | @GetMapping("/listPage") |
| | | @Log(title = "éè´å
¥åº-åºåºç®¡ç-åºåºæ¥è¯¢", businessType = BusinessType.OTHER) |
| | | @Log(title = "éè´åºåº-åºåºå°è´¦-åºåºæ¥è¯¢", businessType = BusinessType.OTHER) |
| | | public AjaxResult listPage(Page page, ProcurementRecordOutPageDto procurementDto) { |
| | | IPage<ProcurementRecordOutPageDto> result = procurementRecordOutService.listPage(page, procurementDto); |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | @GetMapping("/listPageByProduct") |
| | | @Log(title = "ç产åºåº-åºåºå°è´¦-åºåºæ¥è¯¢", businessType = BusinessType.OTHER) |
| | | public AjaxResult listPageByProduct(Page page, ProcurementRecordOutPageDto procurementDto) { |
| | | IPage<ProcurementRecordOutPageDto> result = procurementRecordOutService.listPageByProduct(page, procurementDto); |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | @GetMapping("/listPageByCustom") |
| | | @Log(title = "èªå®ä¹åºåº-åºåºå°è´¦-åºåºæ¥è¯¢", businessType = BusinessType.OTHER) |
| | | public AjaxResult listPageByCustom(Page page, ProcurementRecordOutPageDto procurementDto) { |
| | | IPage<ProcurementRecordOutPageDto> result = procurementRecordOutService.listPageByCustom(page, procurementDto); |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | @PostMapping("/del") |
| | | @Log(title = "éè´å
¥åº-åºåºç®¡ç-å é¤åºåº", businessType = BusinessType.DELETE) |
| | | @Log(title = "éè´åºåº-åºåºå°è´¦-å é¤åºåº", businessType = BusinessType.DELETE) |
| | | public AjaxResult deletePro(@RequestBody ProcurementUpdateDto procurementDto) { |
| | | return AjaxResult.success(procurementRecordOutService.deletePro(procurementDto)); |
| | | } |
| | | |
| | | /** |
| | | * å¯¼åº |
| | | * éè´åºåºå¯¼åº |
| | | * @param response |
| | | */ |
| | | @PostMapping("/export") |
| | |
| | | procurementRecordOutService.export(response); |
| | | } |
| | | |
| | | |
| | | @Autowired |
| | | public ProcurementRecordOutMapper procurementRecordOutMapper; |
| | | /** |
| | | * ç产åºåºå¯¼åº |
| | | * @param response |
| | | */ |
| | | @PostMapping("/exportOne") |
| | | public void exportOne(HttpServletResponse response) { |
| | | List<ProcurementRecordOutPageDto> list = procurementRecordOutMapper.listOne(); |
| | | ExcelUtil<ProcurementRecordOutPageDto> util = new ExcelUtil<>(ProcurementRecordOutPageDto.class); |
| | | util.exportExcel(response, list, "ç产åºåºå°è´¦"); |
| | | } |
| | | |
| | | /** |
| | | * èªå®ä¹åºåºå¯¼åº |
| | | * @param response |
| | | */ |
| | | @PostMapping("/exportTwo") |
| | | public void exportTwo(HttpServletResponse response) { |
| | | List<ProcurementRecordOutPageDto> list = procurementRecordOutMapper.listTwo(); |
| | | ExcelUtil<ProcurementRecordOutPageDto> util = new ExcelUtil<>(ProcurementRecordOutPageDto.class); |
| | | util.exportExcel(response, list, "ç产åºåºå°è´¦"); |
| | | } |
| | | |
| | | } |
| | |
| | | */ |
| | | @Data |
| | | public class Details { |
| | | private Integer id; |
| | | private BigDecimal inboundQuantity; |
| | | private BigDecimal warnNum; |
| | | private Integer id; // 产åid |
| | | private BigDecimal inboundQuantity; // å
¥åºæ°é |
| | | private BigDecimal warnNum; // é¢è¦æ°éï¼éè´å
¥åºææï¼ |
| | | //åä»· |
| | | private BigDecimal taxInclusiveUnitPrice; |
| | | private BigDecimal totalPrice; |
| | | } |
| | |
| | | |
| | | private String nickName; |
| | | |
| | | /** |
| | | * å
¥åºç±»å 1-éè´ 2-ç产 3-èªå®ä¹ |
| | | */ |
| | | private Integer type; |
| | | |
| | | private String typeName; |
| | | |
| | | } |
| | |
| | | package com.ruoyi.procurementrecord.dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * @author :yys |
| | |
| | | package com.ruoyi.procurementrecord.dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * @author :yys |
| | |
| | | private String createBy; |
| | | private BigDecimal minStock; |
| | | |
| | | |
| | | /** |
| | | * åä»· |
| | | */ |
| | | private BigDecimal unitPrice; |
| | | |
| | | /** |
| | | * æ»ä»· |
| | | */ |
| | | private BigDecimal totalPrice; |
| | | |
| | | // åä»· |
| | | private BigDecimal taxInclusiveUnitPrice; |
| | | // æ»ä»· |
| | | private BigDecimal taxInclusiveTotalPrice; |
| | | |
| | | private Long createUser; |
| | | |
| | | private String createTime; |
| | |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | |
| | | private Long createUser; |
| | | |
| | | /** |
| | | * true:廿å©ä½åºå为0 |
| | | */ |
| | | private Boolean flag; |
| | | |
| | | /** |
| | | * å
¥åºç±»å 1-éè´ 2-ç产 |
| | | */ |
| | | private Integer type; |
| | | |
| | | /** |
| | | * å
¥åºæ¹æ¬¡ |
| | | */ |
| | | @Excel(name = "å
¥åºæ¹æ¬¡") |
| | | private String inboundBatches; |
| | | |
| | | /** |
| | | * ååå· |
| | | * éè´ååå· |
| | | */ |
| | | private String purchaseContractNumber; |
| | | |
| | | /** |
| | | * éå®ååå· |
| | | */ |
| | | private String salesContractNo; |
| | | |
| | | /** |
| | | * 客æ·ååå· |
| | | */ |
| | | private String customerContractNo; |
| | | |
| | | /** |
| | | * 客æ·åç§° |
| | | */ |
| | | @Excel(name = "客æ·åç§°") |
| | | private String customerName; |
| | | |
| | | private String salesLedgerProductId; |
| | | |
| | |
| | | @Excel(name = "å
¥åºæ°é") |
| | | private BigDecimal inboundNum; |
| | | |
| | | /** |
| | | * å
¥åºåä»· |
| | | */ |
| | | @ApiModelProperty(value = "å
¥åºåä»·") |
| | | @Excel(name = "å
¥åºåä»·") |
| | | private BigDecimal unitPrice; |
| | | |
| | | /** |
| | | * å
¥åºæ»ä»· |
| | | */ |
| | | @ApiModelProperty(value = "å
¥åºæ»ä»·") |
| | | @Excel(name = "å
¥åºæ»ä»·") |
| | | private BigDecimal totalPrice; |
| | | |
| | | @Excel(name = "é¢è¦æ°é") |
| | | private BigDecimal warnNum; |
| | | |
| | |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | |
| | | */ |
| | | private String purchaseContractNumber; |
| | | |
| | | |
| | | /** |
| | | * éå®ååå· |
| | | */ |
| | | private String salesContractNo; |
| | | |
| | | /** |
| | | * 客æ·ååå· |
| | | */ |
| | | private String customerContractNo; |
| | | |
| | | /** |
| | | * 客æ·åç§° |
| | | */ |
| | | private String customerName; |
| | | |
| | | private String salesLedgerProductId; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Excel(name = "å
¥åºæ°é") |
| | | private BigDecimal inboundNum; |
| | | |
| | | /** |
| | | * å
¥åºåä»· |
| | | */ |
| | | @ApiModelProperty(value = "å
¥åºåä»·") |
| | | @Excel(name = "å
¥åºåä»·") |
| | | private BigDecimal unitPrice; |
| | | |
| | | /** |
| | | * å
¥åºæ»ä»· |
| | | */ |
| | | @ApiModelProperty(value = "å
¥åºæ»ä»·") |
| | | @Excel(name = "å
¥åºæ»ä»·") |
| | | private BigDecimal totalPrice; |
| | | |
| | | /** |
| | | * å¾
åºåºæ°é |
| | |
| | | * åºåºæ°é |
| | | */ |
| | | @Excel(name = "åºåºæ°é") |
| | | private BigDecimal totalInboundNum; |
| | | private BigDecimal totalInboundNum = BigDecimal.ZERO; |
| | | |
| | | /** |
| | | * æä½åºåæ°é |
| | |
| | | |
| | | private Integer salesLedgerProductId; |
| | | |
| | | /** |
| | | * åºåºç±»å 1-éè´åºåº 2-éå®åºåº 3-èªå®ä¹ |
| | | */ |
| | | private Integer type; |
| | | |
| | | } |
| | |
| | | private Integer id; |
| | | |
| | | private BigDecimal warnNum; |
| | | /** |
| | | * éè´ååå· |
| | | */ |
| | | private String purchaseContractNumber; |
| | | /** |
| | | * éå®ååå· |
| | | */ |
| | | private String salesContractNo; |
| | | |
| | | /** |
| | | * 客æ·ååå· |
| | | */ |
| | | private String customerContractNo; |
| | | |
| | | /** |
| | | * 客æ·åç§° |
| | | */ |
| | | @Excel(name = "客æ·åç§°") |
| | | private String customerName; |
| | | |
| | | |
| | | /** |
| | | * åºå
¥åºæ°é |
| | |
| | | private BigDecimal inboundNum; |
| | | |
| | | /** |
| | | * åä»· |
| | | */ |
| | | @Excel(name = "åä»·") |
| | | private BigDecimal unitPrice; |
| | | |
| | | /** |
| | | * æ»ä»· |
| | | */ |
| | | @Excel(name = "æ»ä»·") |
| | | private BigDecimal totalPrice; |
| | | |
| | | /** |
| | | * åºå
¥åºæ¶é´ |
| | | */ |
| | | // @Excel(name = "åºåºæ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private LocalDateTime createTime; |
| | | |
| | | private String timeStr; |
| | |
| | | */ |
| | | @Excel(name = "ä¾åºååç§°") |
| | | private String supplierName; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | @Excel(name = "ä¸å«ç¨æ»ä»·") |
| | | private BigDecimal taxExclusiveTotalPrice; |
| | | |
| | | /** |
| | | * ç©åç±»å |
| | | */ |
| | | private String itemType; |
| | | } |
| | |
| | | @Data |
| | | public class ProcurementUpdateDto { |
| | | |
| | | private String inboundDate; |
| | | |
| | | private Integer id; |
| | | |
| | | private BigDecimal warnNum; |
| | | |
| | | private BigDecimal quantityStock; |
| | | |
| | | private BigDecimal unitPrice; |
| | | |
| | | private BigDecimal totalPrice; |
| | | |
| | | private List<Integer> ids; |
| | | |
| | | /** |
| | | * åºåºç±»å 1-éè´ 2-éå® 3-èªå®ä¹ |
| | | */ |
| | | private Integer type; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.procurementrecord.mapper; |
| | | |
| | | 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.pojo.CustomStorage; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * @author :yys |
| | | * @date : 2025/11/10 13:11 |
| | | */ |
| | | public interface CustomStorageMapper extends BaseMapper<CustomStorage> { |
| | | IPage<CustomStorage> listPageCopyByCustom(Page page,@Param("req") CustomStorage customStorageLambdaQueryWrapper); |
| | | |
| | | IPage<CustomStorage> listPageByCustom(Page page,@Param("req") CustomStorage customStorage); |
| | | } |
| | |
| | | |
| | | List<ProcurementPageDtoCopy> listCopy(); |
| | | |
| | | List<ProcurementPageDtoCopy> listCopyOne(); |
| | | |
| | | List<ProcurementPageDto> list(); |
| | | |
| | | List<ProcurementPageDto> listOne(); |
| | | |
| | | IPage<ProcurementPageDto> listPageByProduction(Page page, @Param("req") ProcurementPageDto procurementDto); |
| | | |
| | | IPage<ProcurementPageDtoCopy> listPageCopyByProduction(Page page, @Param("req") ProcurementPageDto procurementDto); |
| | | } |
| | |
| | | IPage<ProcurementRecordOutPageDto> listPage(Page page,@Param("req") ProcurementRecordOutPageDto procurementDto); |
| | | |
| | | List<ProcurementRecordOutPageDto> list(); |
| | | |
| | | List<ProcurementRecordOutPageDto> listOne(); |
| | | |
| | | List<ProcurementRecordOutPageDto> listTwo(); |
| | | |
| | | IPage<ProcurementRecordOutPageDto> listPageByProduct(Page page,@Param("req") ProcurementRecordOutPageDto procurementDto); |
| | | |
| | | IPage<ProcurementRecordOutPageDto> listPageByCustom(Page page,@Param("req") ProcurementRecordOutPageDto procurementDto); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.procurementrecord.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author :yys |
| | | * @date : 2025/11/10 11:51 |
| | | */ |
| | | @TableName("custom_storage") |
| | | @Data |
| | | public class CustomStorage { |
| | | |
| | | @TableField(exist = false) |
| | | private Boolean flag; |
| | | |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | // å
¥åºæ¶é´ |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "å
¥åºæ¶é´", width = 30, dateFormat = "yyyy-MM-dd") |
| | | private Date inboundDate; |
| | | |
| | | /** |
| | | * ç¼å· |
| | | */ |
| | | @Excel(name = "ç¼å·") |
| | | private String code; |
| | | |
| | | @TableField(exist = false) |
| | | private String timeStr; |
| | | |
| | | /** |
| | | * å¾
åºåºæ°é |
| | | */ |
| | | @Excel(name = "å¾
åºåºæ°é") |
| | | @TableField(exist = false) |
| | | private BigDecimal inboundNum0; |
| | | /** |
| | | * åºåºæ°é |
| | | */ |
| | | @Excel(name = "åºåºæ°é") |
| | | @TableField(exist = false) |
| | | private BigDecimal totalInboundNum = BigDecimal.ZERO; |
| | | // ç©åç±»å |
| | | @Excel(name = "ç©åç±»å") |
| | | private String itemType; |
| | | // å
¥åºæ¹æ¬¡ |
| | | @Excel(name = "å
¥åºæ¹æ¬¡") |
| | | private String inboundBatches; |
| | | // å
¥åºæ°é |
| | | @Excel(name = "å
¥åºæ°é") |
| | | private BigDecimal inboundNum; |
| | | // ä¾åºååç§° |
| | | @Excel(name = "ä¾åºååç§°") |
| | | private String supplierName; |
| | | // 产å大类 |
| | | @Excel(name = "产å大类") |
| | | private String productCategory; |
| | | // è§æ ¼åå· |
| | | @Excel(name = "è§æ ¼åå·") |
| | | private String specificationModel; |
| | | // åä½ |
| | | @Excel(name = "åä½") |
| | | private String unit; |
| | | // å«ç¨åä»· |
| | | @Excel(name = "å«ç¨åä»·") |
| | | private BigDecimal taxInclusiveUnitPrice; |
| | | // å«ç¨æ»ä»· |
| | | @Excel(name = "å«ç¨æ»ä»·") |
| | | private BigDecimal taxInclusiveTotalPrice; |
| | | // ç¨ç(%) |
| | | @Excel(name = "ç¨ç(%)") |
| | | private BigDecimal taxRate; |
| | | // ä¸å«ç¨æ»ä»· |
| | | @Excel(name = "ä¸å«ç¨æ»ä»·") |
| | | private BigDecimal taxExclusiveTotalPrice; |
| | | /** |
| | | * å
¥åºç¨æ· |
| | | */ |
| | | @Excel(name = "å
¥åºç¨æ·") |
| | | private String createBy; |
| | | /** |
| | | * å
¥åºç¨æ·id |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | /** |
| | | * å
¥åºæ¶é´ |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDateTime createTime; |
| | | |
| | | /** |
| | | * ä¿®æ¹è
|
| | | */ |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | /** |
| | | * ä¿®æ¹æ¶é´ |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | /** |
| | | * ç§æ·ID |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long tenantId; |
| | | |
| | | } |
| | |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | |
| | |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 产åä¿¡æ¯è¡¨id |
| | | * 产åä¿¡æ¯è¡¨idï¼èªå®ä¹å
¥åºæ¶ä¸º0ï¼ |
| | | */ |
| | | private Integer salesLedgerProductId; |
| | | |
| | |
| | | private String inboundBatches; |
| | | |
| | | /** |
| | | * åºåºåºæ°é |
| | | * åºåºæ°é |
| | | */ |
| | | private BigDecimal inboundNum; |
| | | |
| | | |
| | | /** |
| | | * åºåºåºç¨æ· |
| | | * åºåºç±»å 1-éè´ 2-éå® 3-èªå®ä¹ |
| | | */ |
| | | private Integer type; |
| | | |
| | | /** |
| | | * åºåºç¨æ· |
| | | */ |
| | | private String createBy; |
| | | /** |
| | | * å
¥åºç¨æ·id |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long createUser; |
| | | |
| | | /** |
| | | * å
¥åºæ¶é´ |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | /** |
| | | * ä¿®æ¹è
|
| | | */ |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Long updateUser; |
| | | |
| | | /** |
| | | * ä¿®æ¹æ¶é´ |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | /** |
| | |
| | | private BigDecimal inboundNum; |
| | | |
| | | /** |
| | | * åä»· |
| | | */ |
| | | private BigDecimal unitPrice; |
| | | |
| | | /** |
| | | * æ»ä»· |
| | | */ |
| | | private BigDecimal totalPrice; |
| | | |
| | | /** |
| | | * é¢è¦æ°é |
| | | */ |
| | | private BigDecimal warnNum; |
| | | |
| | | /** |
| | | * å
¥åºç±»å 1-éè´å
¥åº 2-ç产å
¥åº |
| | | */ |
| | | private Integer type; |
| | | // /** |
| | | // * æä½åºåæ°é |
| | | // */ |
| | |
| | | /** |
| | | * å
¥åºç¨æ·id |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long createUser; |
| | | |
| | | /** |
| | | * å
¥åºæ¶é´ |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | /** |
| | | * ä¿®æ¹è
|
| | | */ |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Long updateUser; |
| | | |
| | | /** |
| | | * ä¿®æ¹æ¶é´ |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | /** |
| | |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author :yys |
| | |
| | | int deletePro(ProcurementUpdateDto procurementDto); |
| | | |
| | | void export(HttpServletResponse response); |
| | | |
| | | IPage<ProcurementRecordOutPageDto> listPageByProduct(Page page, ProcurementRecordOutPageDto procurementDto); |
| | | |
| | | IPage<ProcurementRecordOutPageDto> listPageByCustom(Page page, ProcurementRecordOutPageDto procurementDto); |
| | | } |
| | |
| | | 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.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.procurementrecord.dto.*; |
| | | import com.ruoyi.procurementrecord.pojo.CustomStorage; |
| | | import com.ruoyi.procurementrecord.pojo.ProcurementRecordStorage; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | |
| | | int deletePro(ProcurementUpdateDto procurementDto); |
| | | |
| | | void export(HttpServletResponse response); |
| | | void export(HttpServletResponse response,Integer type); |
| | | |
| | | int updateManagement(ProcurementManagementUpdateDto procurementDto); |
| | | |
| | | void exportCopy(HttpServletResponse response); |
| | | void exportCopy(HttpServletResponse response,Integer type); |
| | | |
| | | void exportCopyTwo(HttpServletResponse response,Integer type); |
| | | |
| | | Map<String, Object> getReportList(Page page, ProcurementPageDto procurementDto); |
| | | |
| | | IPage<ProcurementPageDto> listPageByProduction(Page page, ProcurementPageDto procurementDto); |
| | | |
| | | AjaxResult addCustom(List<CustomStorage> customStorage); |
| | | |
| | | IPage<CustomStorage> listPageByCustom(Page page, CustomStorage customStorage); |
| | | |
| | | IPage<ProcurementPageDtoCopy> listPageCopyByProduction(Page page, ProcurementPageDto procurementDto); |
| | | |
| | | IPage<CustomStorage> listPageCopyByCustom(Page page, CustomStorage customStorage); |
| | | |
| | | AjaxResult updateCustom(CustomStorage customStorage); |
| | | |
| | | AjaxResult deleteCustom(List<Long> ids); |
| | | |
| | | int updateManagementByCustom(ProcurementManagementUpdateDto procurementDto); |
| | | |
| | | BigDecimal getProcurementAmount(Long salesProductId); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.procurementrecord.dto.ProcurementPageDto; |
| | | import com.ruoyi.procurementrecord.mapper.GasTankWarningMapper; |
| | | import com.ruoyi.procurementrecord.pojo.GasTankWarning; |
| | | import com.ruoyi.procurementrecord.service.GasTankWarningService; |
| | |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.procurementrecord.mapper.ProcurementPlanMapper; |
| | | import com.ruoyi.procurementrecord.pojo.ProcurementPlan; |
| | | import com.ruoyi.procurementrecord.pojo.ProcurementPriceManagement; |
| | | import com.ruoyi.procurementrecord.service.ProcurementPlanService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | 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.excel.ExcelUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.procurementrecord.dto.ProcurementPageDto; |
| | | import com.ruoyi.procurementrecord.mapper.ProcurementPriceManagementMapper; |
| | | import com.ruoyi.procurementrecord.pojo.ProcurementPriceManagement; |
| | | import com.ruoyi.procurementrecord.service.ProcurementPriceManagementService; |
| | |
| | | import com.ruoyi.procurementrecord.dto.ProcurementUpdateDto; |
| | | import com.ruoyi.procurementrecord.mapper.ProcurementRecordOutMapper; |
| | | import com.ruoyi.procurementrecord.pojo.ProcurementRecordOut; |
| | | import com.ruoyi.procurementrecord.pojo.ProcurementRecordStorage; |
| | | import com.ruoyi.procurementrecord.service.ProcurementRecordOutService; |
| | | import com.ruoyi.project.system.domain.SysUser; |
| | | import com.ruoyi.project.system.mapper.SysUserMapper; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.math.BigDecimal; |
| | | import java.text.DateFormat; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.LocalTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | |
| | | procurementRecordOutLambdaQueryWrapper.ge(ProcurementRecordOut::getCreateTime, now) // 大äºçäºå½å¤© |
| | | .lt(ProcurementRecordOut::getCreateTime, now.plusDays(1)); // å°äºæå¤© |
| | | Long aLong1 = procurementRecordOutMapper.selectCount(procurementRecordOutLambdaQueryWrapper); |
| | | |
| | | // 2. å®ä¹æ¥ææ ¼å¼ï¼å¿
é¡»ä¸åç¬¦ä¸²æ ¼å¼å®å
¨å¹é
ï¼ |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | LocalDateTime localDateTime = null; |
| | | // 3. 转æ¢ï¼String â LocalDate â LocalDateTimeï¼è¡¥å
0ç¹æ¶é´ï¼ |
| | | if(StringUtils.isNotEmpty(procurementRecordOutAdd.getTime())){ |
| | | LocalDate localDate = LocalDate.parse(procurementRecordOutAdd.getTime(), formatter); |
| | | // è·åå½åæ¶åç§ |
| | | LocalTime localTime = LocalTime.now(); |
| | | localDateTime = localDate.atTime(localTime);} |
| | | // æ¥è¯¢éè´åºåºæ°é |
| | | LambdaQueryWrapper<ProcurementRecordOut> procurementRecordLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | procurementRecordLambdaQueryWrapper.eq(ProcurementRecordOut::getProcurementRecordStorageId, procurementRecordOutAdd.getId()); |
| | |
| | | .salesLedgerProductId(procurementRecordOutAdd.getSalesLedgerProductId()) |
| | | .inboundBatches(aLong.equals(0L) ? "第1æ¹æ¬¡" : "第"+ (aLong + 1) + "æ¹æ¬¡") |
| | | .inboundNum(new BigDecimal(procurementRecordOutAdd.getQuantity())) |
| | | .createTime(LocalDateTime.now()) |
| | | .type(procurementRecordOutAdd.getType()) |
| | | .createTime(localDateTime == null ? LocalDateTime.now() : localDateTime) |
| | | .createUser(Long.valueOf(procurementRecordOutAdd.getUserId())) |
| | | .createBy(sysUser.getNickName()) |
| | | .updateUser(Long.valueOf(procurementRecordOutAdd.getUserId())) |
| | |
| | | |
| | | @Override |
| | | public void export(HttpServletResponse response) { |
| | | List<ProcurementRecordOutPageDto> list =procurementRecordOutMapper.list(); |
| | | List<ProcurementRecordOutPageDto> list = procurementRecordOutMapper.list(); |
| | | ExcelUtil<ProcurementRecordOutPageDto> util = new ExcelUtil<>(ProcurementRecordOutPageDto.class); |
| | | util.exportExcel(response, list, "åºåºå°è´¦"); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<ProcurementRecordOutPageDto> listPageByProduct(Page page, ProcurementRecordOutPageDto procurementDto) { |
| | | return procurementRecordOutMapper.listPageByProduct(page, procurementDto); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<ProcurementRecordOutPageDto> listPageByCustom(Page page, ProcurementRecordOutPageDto procurementDto) { |
| | | return procurementRecordOutMapper.listPageByCustom(page, procurementDto); |
| | | } |
| | | } |
| | |
| | | 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.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.security.LoginUser; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.procurementrecord.dto.*; |
| | | import com.ruoyi.procurementrecord.mapper.CustomStorageMapper; |
| | | import com.ruoyi.procurementrecord.mapper.ProcurementRecordMapper; |
| | | import com.ruoyi.procurementrecord.mapper.ProcurementRecordOutMapper; |
| | | import com.ruoyi.procurementrecord.pojo.ProcurementRecordStorage; |
| | | import com.ruoyi.procurementrecord.pojo.CustomStorage; |
| | | import com.ruoyi.procurementrecord.pojo.ProcurementRecordOut; |
| | | import com.ruoyi.procurementrecord.pojo.ProcurementRecordStorage; |
| | | import com.ruoyi.procurementrecord.service.ProcurementRecordService; |
| | | import com.ruoyi.project.system.domain.SysUser; |
| | | import com.ruoyi.project.system.mapper.SysUserMapper; |
| | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.LocalTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.*; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public int updatePro(ProcurementUpdateDto procurementDto) { |
| | | ProcurementRecordStorage procurementRecordStorageById = getProcurementRecordById(procurementDto.getId()); |
| | | procurementRecordStorageById.setCreateTime(LocalDate.parse(procurementDto.getInboundDate(), DateTimeFormatter.ofPattern("yyyy-MM-dd")).atTime(LocalTime.MIDNIGHT)); |
| | | procurementRecordStorageById.setInboundNum(procurementDto.getQuantityStock()); |
| | | procurementRecordStorageById.setWarnNum(procurementDto.getWarnNum()); |
| | | procurementRecordStorageById.setUpdateUser(SecurityUtils.getLoginUser().getUserId()); |
| | | procurementRecordStorageById.setUpdateTime(LocalDateTime.now()); |
| | | procurementRecordStorageById.setUnitPrice(procurementDto.getUnitPrice()); |
| | | procurementRecordStorageById.setTotalPrice(procurementDto.getTotalPrice()); |
| | | return procurementRecordMapper.updateById(procurementRecordStorageById); |
| | | } |
| | | |
| | |
| | | procurementRecordMapper.deleteBatchIds(procurementRecordStorageById.stream().map(ProcurementRecordStorage::getId).collect(Collectors.toList())); |
| | | // å 餿æå¯¹åºçåºåºè®°å½ |
| | | LambdaQueryWrapper<ProcurementRecordOut> procurementRecordOutLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | procurementRecordOutLambdaQueryWrapper.in(ProcurementRecordOut::getProcurementRecordStorageId, procurementDto.getIds()); |
| | | procurementRecordOutLambdaQueryWrapper.in(ProcurementRecordOut::getProcurementRecordStorageId, procurementDto.getIds()) |
| | | .eq(ProcurementRecordOut::getType,procurementDto.getType()); |
| | | List<ProcurementRecordOut> procurementRecordOuts = procurementRecordOutMapper.selectList(procurementRecordOutLambdaQueryWrapper); |
| | | if(!CollectionUtils.isEmpty(procurementRecordOuts)){ |
| | | procurementRecordOutMapper.deleteBatchIds(procurementRecordOuts.stream().map(ProcurementRecordOut::getId).collect(Collectors.toList())); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void export(HttpServletResponse response) { |
| | | List<ProcurementPageDto> list =procurementRecordMapper.list(); |
| | | public void export(HttpServletResponse response,Integer type) { |
| | | List<ProcurementPageDto> list = new ArrayList<>(); |
| | | if(type == 1){ |
| | | list = procurementRecordMapper.list(); |
| | | }else{ |
| | | list = procurementRecordMapper.listOne(); |
| | | } |
| | | // 计ç®å¾
å
¥åºæ°é |
| | | // æ¥è¯¢éè´è®°å½å·²å
¥åºæ°é |
| | | List<Integer> collect = list.stream().map(ProcurementPageDto::getId).collect(Collectors.toList()); |
| | |
| | | } |
| | | LambdaQueryWrapper<ProcurementRecordOut> procurementRecordLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | procurementRecordLambdaQueryWrapper.in(ProcurementRecordOut::getProcurementRecordStorageId, collect); |
| | | procurementRecordLambdaQueryWrapper.eq(ProcurementRecordOut::getType, type); |
| | | List<ProcurementRecordOut> procurementRecords = procurementRecordOutMapper.selectList(procurementRecordLambdaQueryWrapper); |
| | | if(CollectionUtils.isEmpty( procurementRecords)){ |
| | | ExcelUtil<ProcurementPageDto> util = new ExcelUtil<ProcurementPageDto>(ProcurementPageDto.class); |
| | |
| | | if(salesLedgerProduct == null){ |
| | | throw new RuntimeException("éå®å°è´¦äº§åä¸åå¨"); |
| | | } |
| | | // æ ¹æ®å¤§ç±»ï¼è§æ ¼æ¥è¯¢ææäº§åid |
| | | LambdaQueryWrapper<SalesLedgerProduct> salesLedgerProductLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | salesLedgerProductLambdaQueryWrapper.eq(SalesLedgerProduct::getProductCategory, salesLedgerProduct.getProductCategory()) |
| | | .eq(SalesLedgerProduct::getSpecificationModel, salesLedgerProduct.getSpecificationModel()) |
| | | .eq(SalesLedgerProduct::getType, 1); |
| | | List<SalesLedgerProduct> salesLedgerProducts = salesLedgerProductMapper.selectList(salesLedgerProductLambdaQueryWrapper); |
| | | if(CollectionUtils.isEmpty(salesLedgerProducts)){ |
| | | throw new RuntimeException("æ²¡ææ¾å°å¯¹åºç产å"); |
| | | } |
| | | salesLedgerProduct.setMinStock(procurementDto.getMinStock()); |
| | | salesLedgerProductMapper.updateById(salesLedgerProduct); |
| | | ProcurementRecordStorage procurementRecordStorageById = getProcurementRecordById(procurementDto.getId()); |
| | | procurementRecordStorageById.setCreateBy(sysUser.getNickName()); |
| | | procurementRecordStorageById.setCreateUser(sysUser.getUserId()); |
| | | procurementRecordStorageById.setUpdateTime(LocalDateTime.parse(entryDateStr,df)); |
| | | procurementRecordStorageById.setUpdateUser(loginUser.getUserId()); |
| | | procurementRecordStorageById.setCreateTime(LocalDateTime.parse(createTimeStr,df)); |
| | | procurementRecordMapper.updateById(procurementRecordStorageById); |
| | | LambdaQueryWrapper<ProcurementRecordStorage> procurementRecordStorageLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | procurementRecordStorageLambdaQueryWrapper.in(ProcurementRecordStorage::getSalesLedgerProductId, salesLedgerProducts.stream().map(SalesLedgerProduct::getId).collect(Collectors.toList())); |
| | | ProcurementRecordStorage procurementRecordStorage = ProcurementRecordStorage.builder().build(); |
| | | procurementRecordStorage.setUnitPrice(procurementDto.getUnitPrice()); |
| | | procurementRecordStorage.setTotalPrice(procurementDto.getTotalPrice()); |
| | | procurementRecordStorage.setCreateBy(sysUser.getNickName()); |
| | | procurementRecordStorage.setCreateUser(sysUser.getUserId()); |
| | | procurementRecordStorage.setUpdateTime(LocalDateTime.parse(entryDateStr,df)); |
| | | procurementRecordStorage.setUpdateUser(loginUser.getUserId()); |
| | | procurementRecordStorage.setCreateTime(LocalDateTime.parse(createTimeStr,df)); |
| | | procurementRecordMapper.update(procurementRecordStorage,procurementRecordStorageLambdaQueryWrapper); |
| | | return 0; |
| | | } |
| | | |
| | | @Override |
| | | public void exportCopy(HttpServletResponse response) { |
| | | List<ProcurementPageDtoCopy> list =procurementRecordMapper.listCopy(); |
| | | public void exportCopy(HttpServletResponse response,Integer type) { |
| | | List<ProcurementPageDtoCopy> list = new ArrayList<>(); |
| | | if(type == 1){ |
| | | list = procurementRecordMapper.listCopy(); |
| | | }else{ |
| | | list = procurementRecordMapper.listCopyOne(); |
| | | } |
| | | // 计ç®å¾
å
¥åºæ°é |
| | | // æ¥è¯¢éè´è®°å½å·²å
¥åºæ°é |
| | | List<Integer> collect = list.stream().map(ProcurementPageDtoCopy::getId).collect(Collectors.toList()); |
| | |
| | | } |
| | | LambdaQueryWrapper<ProcurementRecordOut> procurementRecordLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | procurementRecordLambdaQueryWrapper.in(ProcurementRecordOut::getProcurementRecordStorageId, collect); |
| | | procurementRecordLambdaQueryWrapper.eq(ProcurementRecordOut::getType, type); |
| | | List<ProcurementRecordOut> procurementRecords = procurementRecordOutMapper.selectList(procurementRecordLambdaQueryWrapper); |
| | | if(CollectionUtils.isEmpty( procurementRecords)){ |
| | | ExcelUtil<ProcurementPageDtoCopy> util = new ExcelUtil<ProcurementPageDtoCopy>(ProcurementPageDtoCopy.class); |
| | |
| | | dto.setInboundNum0(dto.getInboundNum().subtract(totalInboundNum)); |
| | | } |
| | | ExcelUtil<ProcurementPageDtoCopy> util = new ExcelUtil<ProcurementPageDtoCopy>(ProcurementPageDtoCopy.class); |
| | | util.exportExcel(response, list, "åºå管ç"); |
| | | } |
| | | |
| | | @Override |
| | | public void exportCopyTwo(HttpServletResponse response,Integer type) { |
| | | LambdaQueryWrapper<CustomStorage> customStorageLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | customStorageLambdaQueryWrapper.groupBy(CustomStorage::getSupplierName, CustomStorage::getProductCategory, CustomStorage::getSpecificationModel); |
| | | List<CustomStorage> list = customStorageMapper.selectList(customStorageLambdaQueryWrapper); |
| | | // 计ç®å¾
å
¥åºæ°é |
| | | // æ¥è¯¢éè´è®°å½å·²å
¥åºæ°é |
| | | List<Integer> collect = list.stream().map(CustomStorage::getId).collect(Collectors.toList()); |
| | | if(CollectionUtils.isEmpty( collect)){ |
| | | ExcelUtil<CustomStorage> util = new ExcelUtil<CustomStorage>(CustomStorage.class); |
| | | util.exportExcel(response, list, "åºå管ç"); |
| | | return; |
| | | } |
| | | LambdaQueryWrapper<ProcurementRecordOut> procurementRecordLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | procurementRecordLambdaQueryWrapper.in(ProcurementRecordOut::getProcurementRecordStorageId, collect); |
| | | procurementRecordLambdaQueryWrapper.eq(ProcurementRecordOut::getType, type); |
| | | procurementRecordLambdaQueryWrapper.eq(ProcurementRecordOut::getType, type); |
| | | List<ProcurementRecordOut> procurementRecords = procurementRecordOutMapper.selectList(procurementRecordLambdaQueryWrapper); |
| | | if(CollectionUtils.isEmpty( procurementRecords)){ |
| | | ExcelUtil<CustomStorage> util = new ExcelUtil<CustomStorage>(CustomStorage.class); |
| | | util.exportExcel(response, list, "åºå管ç"); |
| | | return; |
| | | } |
| | | for (CustomStorage dto : list) { |
| | | // æ ¹æ®éè´å°è´¦IDçé对åºçåºåºè®°å½ |
| | | List<ProcurementRecordOut> collect1 = procurementRecords.stream() |
| | | .filter(ProcurementRecordOut -> ProcurementRecordOut.getProcurementRecordStorageId().equals(dto.getId())) |
| | | .collect(Collectors.toList()); |
| | | |
| | | // å¦ææ²¡æç¸å
³çåºåºè®°å½ï¼è·³è¿è¯¥æ¡æ°æ® |
| | | if(CollectionUtils.isEmpty(collect1)){ |
| | | dto.setInboundNum0(dto.getInboundNum()); |
| | | continue; |
| | | } |
| | | |
| | | // 计ç®å·²åºåºæ°éæ»åï¼å¹¶è®¾ç½®å¾
åºåºæ°é |
| | | BigDecimal totalInboundNum = collect1.stream() |
| | | .map(ProcurementRecordOut::getInboundNum) |
| | | .reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | |
| | | // å¾
åºåºæ°é = æ»æ°é - å·²åºåºæ°é |
| | | dto.setInboundNum0(dto.getInboundNum().subtract(totalInboundNum)); |
| | | } |
| | | ExcelUtil<CustomStorage> util = new ExcelUtil<CustomStorage>(CustomStorage.class); |
| | | util.exportExcel(response, list, "åºå管ç"); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public IPage<ProcurementPageDto> listPageByProduction(Page page, ProcurementPageDto procurementDto) { |
| | | IPage<ProcurementPageDto> procurementPageDtoIPage = procurementRecordMapper.listPageByProduction(page, procurementDto); |
| | | List<ProcurementPageDto> procurementPageDtos = procurementPageDtoIPage.getRecords(); |
| | | // 计ç®å¾
å
¥åºæ°é |
| | | // æ¥è¯¢éè´è®°å½å·²å
¥åºæ°é |
| | | List<Integer> collect = procurementPageDtos.stream().map(ProcurementPageDto::getId).collect(Collectors.toList()); |
| | | if(CollectionUtils.isEmpty( collect)){ |
| | | return procurementPageDtoIPage; |
| | | } |
| | | LambdaQueryWrapper<ProcurementRecordOut> procurementRecordLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | procurementRecordLambdaQueryWrapper.in(ProcurementRecordOut::getProcurementRecordStorageId, collect) |
| | | .eq(ProcurementRecordOut::getType,2); |
| | | List<ProcurementRecordOut> procurementRecords = procurementRecordOutMapper.selectList(procurementRecordLambdaQueryWrapper); |
| | | if(CollectionUtils.isEmpty( procurementRecords)){ |
| | | return procurementPageDtoIPage; |
| | | } |
| | | for (ProcurementPageDto dto : procurementPageDtos) { |
| | | // æ ¹æ®éè´å°è´¦IDçé对åºçåºåºè®°å½ |
| | | List<ProcurementRecordOut> collect1 = procurementRecords.stream() |
| | | .filter(ProcurementRecordOut -> ProcurementRecordOut.getProcurementRecordStorageId().equals(dto.getId())) |
| | | .collect(Collectors.toList()); |
| | | |
| | | // å¦ææ²¡æç¸å
³çåºåºè®°å½ï¼è·³è¿è¯¥æ¡æ°æ® |
| | | if(CollectionUtils.isEmpty(collect1)){ |
| | | dto.setInboundNum0(dto.getInboundNum()); |
| | | continue; |
| | | } |
| | | |
| | | // 计ç®å·²åºåºæ°éæ»åï¼å¹¶è®¾ç½®å¾
åºåºæ°é |
| | | BigDecimal totalInboundNum = collect1.stream() |
| | | .map(ProcurementRecordOut::getInboundNum) |
| | | .reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | |
| | | // å¾
åºåºæ°é = æ»æ°é - å·²åºåºæ°é |
| | | dto.setInboundNum0(dto.getInboundNum().subtract(totalInboundNum)); |
| | | } |
| | | return procurementPageDtoIPage; |
| | | } |
| | | |
| | | private final CustomStorageMapper customStorageMapper; |
| | | |
| | | @Override |
| | | public AjaxResult addCustom(List<CustomStorage> customStorage) { |
| | | LoginUser loginUser = SecurityUtils.getLoginUser(); |
| | | if(CollectionUtils.isEmpty(customStorage)){ |
| | | return AjaxResult.error("æ°æ®ä¸è½ä¸ºç©º"); |
| | | } |
| | | customStorage.forEach(item -> { |
| | | // æ¥è¯¢éè´å
¥åºæ°é |
| | | Long aLong = customStorageMapper.selectCount(null); |
| | | item.setInboundBatches(aLong.equals(0L) ? "第1æ¹æ¬¡(èªå®ä¹å
¥åº)" : "第"+ (aLong + 1) + "æ¹æ¬¡(èªå®ä¹å
¥åº)" ); |
| | | item.setCreateBy(loginUser.getNickName()); |
| | | item.setCode(OrderUtils.countTodayByCreateTime(customStorageMapper, "")); |
| | | customStorageMapper.insert(item); |
| | | }); |
| | | return AjaxResult.success("èªå®ä¹å
¥åºæå"); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<CustomStorage> listPageByCustom(Page page, CustomStorage customStorage) { |
| | | IPage<CustomStorage> procurementPageDtoIPage = customStorageMapper.listPageByCustom(page, customStorage); |
| | | procurementPageDtoIPage.getRecords().forEach(item -> item.setInboundNum0(item.getInboundNum())); |
| | | List<CustomStorage> procurementPageDtos = procurementPageDtoIPage.getRecords(); |
| | | // 计ç®å¾
å
¥åºæ°é |
| | | // æ¥è¯¢éè´è®°å½å·²å
¥åºæ°é |
| | | List<Integer> collect = procurementPageDtos.stream().map(CustomStorage::getId).collect(Collectors.toList()); |
| | | if(CollectionUtils.isEmpty( collect)){ |
| | | return procurementPageDtoIPage; |
| | | } |
| | | LambdaQueryWrapper<ProcurementRecordOut> procurementRecordLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | procurementRecordLambdaQueryWrapper.in(ProcurementRecordOut::getProcurementRecordStorageId, collect) |
| | | .eq(ProcurementRecordOut::getType, 3); |
| | | List<ProcurementRecordOut> procurementRecords = procurementRecordOutMapper.selectList(procurementRecordLambdaQueryWrapper); |
| | | if(CollectionUtils.isEmpty( procurementRecords)){ |
| | | return procurementPageDtoIPage; |
| | | } |
| | | for (CustomStorage dto : procurementPageDtos) { |
| | | // æ ¹æ®éè´å°è´¦IDçé对åºçåºåºè®°å½ |
| | | List<ProcurementRecordOut> collect1 = procurementRecords.stream() |
| | | .filter(ProcurementRecordOut -> ProcurementRecordOut.getProcurementRecordStorageId().equals(dto.getId())) |
| | | .collect(Collectors.toList()); |
| | | |
| | | // å¦ææ²¡æç¸å
³çåºåºè®°å½ï¼è·³è¿è¯¥æ¡æ°æ® |
| | | if(CollectionUtils.isEmpty(collect1)){ |
| | | dto.setInboundNum0(dto.getInboundNum()); |
| | | continue; |
| | | } |
| | | |
| | | // 计ç®å·²åºåºæ°éæ»åï¼å¹¶è®¾ç½®å¾
åºåºæ°é |
| | | BigDecimal totalInboundNum = collect1.stream() |
| | | .map(ProcurementRecordOut::getInboundNum) |
| | | .reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | |
| | | // å¾
åºåºæ°é = æ»æ°é - å·²åºåºæ°é |
| | | dto.setInboundNum0(dto.getInboundNum().subtract(totalInboundNum)); |
| | | } |
| | | return procurementPageDtoIPage; |
| | | } |
| | | |
| | | @Override |
| | | public IPage<ProcurementPageDtoCopy> listPageCopyByProduction(Page page, ProcurementPageDto procurementDto) { |
| | | IPage<ProcurementPageDtoCopy> procurementPageDtoCopyIPage = procurementRecordMapper.listPageCopyByProduction(page, procurementDto); |
| | | List<ProcurementPageDtoCopy> procurementPageDtoCopyList = procurementPageDtoCopyIPage.getRecords(); |
| | | // 计ç®å¾
å
¥åºæ°é |
| | | // æ¥è¯¢éè´è®°å½å·²å
¥åºæ°é |
| | | List<Integer> collect = procurementPageDtoCopyList.stream().map(ProcurementPageDtoCopy::getId).collect(Collectors.toList()); |
| | | if(CollectionUtils.isEmpty( collect)){ |
| | | return procurementPageDtoCopyIPage; |
| | | } |
| | | LambdaQueryWrapper<ProcurementRecordOut> procurementRecordLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | procurementRecordLambdaQueryWrapper.in(ProcurementRecordOut::getProcurementRecordStorageId, collect); |
| | | procurementRecordLambdaQueryWrapper.eq(ProcurementRecordOut::getType, 2); |
| | | List<ProcurementRecordOut> procurementRecords = procurementRecordOutMapper.selectList(procurementRecordLambdaQueryWrapper); |
| | | if(CollectionUtils.isEmpty( procurementRecords)){ |
| | | return procurementPageDtoCopyIPage; |
| | | } |
| | | for (ProcurementPageDtoCopy dto : procurementPageDtoCopyList) { |
| | | // æ ¹æ®éè´å°è´¦IDçé对åºçåºåºè®°å½ |
| | | List<ProcurementRecordOut> collect1 = procurementRecords.stream() |
| | | .filter(ProcurementRecordOut -> ProcurementRecordOut.getProcurementRecordStorageId().equals(dto.getId())) |
| | | .collect(Collectors.toList()); |
| | | |
| | | // å¦ææ²¡æç¸å
³çåºåºè®°å½ï¼è·³è¿è¯¥æ¡æ°æ® |
| | | if(CollectionUtils.isEmpty(collect1)){ |
| | | dto.setInboundNum0(dto.getInboundNum()); |
| | | dto.setTotalInboundNum(BigDecimal.ZERO); |
| | | continue; |
| | | } |
| | | |
| | | // 计ç®å·²åºåºæ°éæ»åï¼å¹¶è®¾ç½®å¾
åºåºæ°é |
| | | BigDecimal totalInboundNum = collect1.stream() |
| | | .map(ProcurementRecordOut::getInboundNum) |
| | | .reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | // åºåºæ°é = æ»æ°é - å¾
åºåºæ°é |
| | | dto.setTotalInboundNum(totalInboundNum); |
| | | // å¾
åºåºæ°é = æ»æ°é - å·²åºåºæ°é |
| | | dto.setInboundNum0(dto.getInboundNum().subtract(totalInboundNum)); |
| | | // åºåä»·å¼ |
| | | if(dto.getUnitPrice() != null){ |
| | | dto.setTotalPrice(dto.getTotalInboundNum().multiply(dto.getUnitPrice())); |
| | | } |
| | | } |
| | | return procurementPageDtoCopyIPage; |
| | | } |
| | | |
| | | @Override |
| | | public IPage<CustomStorage> listPageCopyByCustom(Page page, CustomStorage customStorage) { |
| | | IPage<CustomStorage> pageList = customStorageMapper.listPageCopyByCustom(page, customStorage); |
| | | |
| | | List<CustomStorage> procurementPageDtoCopyList = pageList.getRecords(); |
| | | // 计ç®å¾
å
¥åºæ°é |
| | | // æ¥è¯¢éè´è®°å½å·²å
¥åºæ°é |
| | | List<Integer> collect = procurementPageDtoCopyList.stream().map(CustomStorage::getId).collect(Collectors.toList()); |
| | | if(CollectionUtils.isEmpty( collect)){ |
| | | return pageList; |
| | | } |
| | | LambdaQueryWrapper<ProcurementRecordOut> procurementRecordLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | procurementRecordLambdaQueryWrapper.in(ProcurementRecordOut::getProcurementRecordStorageId, collect); |
| | | procurementRecordLambdaQueryWrapper.eq(ProcurementRecordOut::getType, 3); |
| | | List<ProcurementRecordOut> procurementRecords = procurementRecordOutMapper.selectList(procurementRecordLambdaQueryWrapper); |
| | | if(CollectionUtils.isEmpty( procurementRecords)){ |
| | | return pageList; |
| | | } |
| | | for (CustomStorage dto : procurementPageDtoCopyList) { |
| | | // æ ¹æ®éè´å°è´¦IDçé对åºçåºåºè®°å½ |
| | | List<ProcurementRecordOut> collect1 = procurementRecords.stream() |
| | | .filter(ProcurementRecordOut -> ProcurementRecordOut.getProcurementRecordStorageId().equals(dto.getId())) |
| | | .collect(Collectors.toList()); |
| | | |
| | | // å¦ææ²¡æç¸å
³çåºåºè®°å½ï¼è·³è¿è¯¥æ¡æ°æ® |
| | | if(CollectionUtils.isEmpty(collect1)){ |
| | | dto.setInboundNum0(dto.getInboundNum()); |
| | | dto.setTotalInboundNum(BigDecimal.ZERO); |
| | | continue; |
| | | } |
| | | |
| | | // 计ç®å·²åºåºæ°éæ»åï¼å¹¶è®¾ç½®å¾
åºåºæ°é |
| | | BigDecimal totalInboundNum = collect1.stream() |
| | | .map(ProcurementRecordOut::getInboundNum) |
| | | .reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | // åºåºæ°é = æ»æ°é - å¾
åºåºæ°é |
| | | dto.setTotalInboundNum(totalInboundNum); |
| | | // å¾
åºåºæ°é = æ»æ°é - å·²åºåºæ°é |
| | | dto.setInboundNum0(dto.getInboundNum().subtract(totalInboundNum)); |
| | | // åºåä»·å¼ |
| | | if(dto.getTaxInclusiveUnitPrice() != null){ |
| | | dto.setTaxInclusiveTotalPrice(dto.getInboundNum0().multiply(dto.getTaxInclusiveUnitPrice())); |
| | | } |
| | | } |
| | | pageList.setRecords(procurementPageDtoCopyList); |
| | | return pageList; |
| | | } |
| | | |
| | | @Override |
| | | public AjaxResult updateCustom(CustomStorage customStorage) { |
| | | return AjaxResult.success(customStorageMapper.updateById(customStorage)); |
| | | } |
| | | |
| | | @Override |
| | | public AjaxResult deleteCustom(List<Long> ids) { |
| | | return AjaxResult.success(customStorageMapper.deleteBatchIds(ids)); |
| | | } |
| | | |
| | | @Override |
| | | public int updateManagementByCustom(ProcurementManagementUpdateDto procurementDto) { |
| | | CustomStorage customStorage = customStorageMapper.selectById(procurementDto.getId()); |
| | | if(customStorage == null){ |
| | | throw new RuntimeException("ææåºåä¸åå¨"); |
| | | } |
| | | LambdaQueryWrapper<CustomStorage> customStorageLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | customStorageLambdaQueryWrapper.eq(CustomStorage::getProductCategory, customStorage.getProductCategory()) |
| | | .eq(CustomStorage::getSpecificationModel, customStorage.getSpecificationModel()); |
| | | CustomStorage one = new CustomStorage(); |
| | | one.setTaxInclusiveUnitPrice(procurementDto.getTaxInclusiveUnitPrice()); |
| | | one.setTaxInclusiveTotalPrice(procurementDto.getTaxInclusiveTotalPrice()); |
| | | return customStorageMapper.update(one,customStorageLambdaQueryWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public BigDecimal getProcurementAmount(Long salesProductId) { |
| | | LambdaQueryWrapper<ProcurementRecordStorage> procurementRecordStorageLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | procurementRecordStorageLambdaQueryWrapper.eq(ProcurementRecordStorage::getSalesLedgerProductId, salesProductId) |
| | | .eq(ProcurementRecordStorage::getType, 2); |
| | | List<ProcurementRecordStorage> procurementRecordStorages = procurementRecordMapper.selectList(procurementRecordStorageLambdaQueryWrapper); |
| | | if(CollectionUtils.isEmpty( procurementRecordStorages)){ |
| | | return BigDecimal.ZERO; |
| | | } |
| | | return procurementRecordStorages.stream() |
| | | .map(ProcurementRecordStorage::getInboundNum) |
| | | .reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | } |
| | | |
| | | @Override |
| | | public int add(ProcurementAddDto procurementDto) { |
| | | LoginUser loginUser = SecurityUtils.getLoginUser(); |
| | | // æ¹éæ°å¢ |
| | | for (Details detail : procurementDto.getDetails()) { |
| | | // æ¥è¯¢éè´å
¥åºæ°é |
| | | LambdaQueryWrapper<ProcurementRecordStorage> procurementRecordLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | procurementRecordLambdaQueryWrapper.eq(ProcurementRecordStorage::getSalesLedgerProductId, detail.getId()); |
| | | procurementRecordLambdaQueryWrapper.eq(ProcurementRecordStorage::getSalesLedgerProductId, detail.getId()) |
| | | .eq(ProcurementRecordStorage::getType, procurementDto.getType()); |
| | | Long aLong = procurementRecordMapper.selectCount(procurementRecordLambdaQueryWrapper); |
| | | |
| | | ProcurementRecordStorage.ProcurementRecordStorageBuilder procurementRecordBuilder = ProcurementRecordStorage.builder() |
| | | .salesLedgerProductId(detail.getId()) |
| | | .inboundBatches(aLong.equals(0L) ? "第1æ¹æ¬¡" : "第"+ (aLong + 1) + "æ¹æ¬¡") |
| | | .inboundBatches(aLong.equals(0L) ? "第1æ¹æ¬¡("+ procurementDto.getTypeName() +")" : "第"+ (aLong + 1) + "æ¹æ¬¡(" + procurementDto.getTypeName() + ")" ) |
| | | .inboundNum(detail.getInboundQuantity()) |
| | | .type(procurementDto.getType()) |
| | | .warnNum(detail.getWarnNum()) |
| | | .unitPrice(detail.getTaxInclusiveUnitPrice()) |
| | | .totalPrice(detail.getInboundQuantity().multiply(detail.getTaxInclusiveUnitPrice())) |
| | | .createTime(LocalDateTime.now()) |
| | | .createUser(loginUser.getUserId()) |
| | | .updateTime(LocalDateTime.now()) |
| | |
| | | return procurementPageDtoIPage; |
| | | } |
| | | LambdaQueryWrapper<ProcurementRecordOut> procurementRecordLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | procurementRecordLambdaQueryWrapper.in(ProcurementRecordOut::getProcurementRecordStorageId, collect); |
| | | procurementRecordLambdaQueryWrapper.in(ProcurementRecordOut::getProcurementRecordStorageId, collect) |
| | | .eq(ProcurementRecordOut::getType, 1); |
| | | List<ProcurementRecordOut> procurementRecords = procurementRecordOutMapper.selectList(procurementRecordLambdaQueryWrapper); |
| | | if(CollectionUtils.isEmpty( procurementRecords)){ |
| | | return procurementPageDtoIPage; |
| | |
| | | } |
| | | LambdaQueryWrapper<ProcurementRecordOut> procurementRecordLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | procurementRecordLambdaQueryWrapper.in(ProcurementRecordOut::getProcurementRecordStorageId, collect); |
| | | procurementRecordLambdaQueryWrapper.eq(ProcurementRecordOut::getType,1); |
| | | List<ProcurementRecordOut> procurementRecords = procurementRecordOutMapper.selectList(procurementRecordLambdaQueryWrapper); |
| | | if(CollectionUtils.isEmpty( procurementRecords)){ |
| | | return procurementPageDtoCopyIPage; |
| | |
| | | for (ProcurementPageDtoCopy dto : procurementPageDtoCopyList) { |
| | | // æ ¹æ®éè´å°è´¦IDçé对åºçåºåºè®°å½ |
| | | List<ProcurementRecordOut> collect1 = procurementRecords.stream() |
| | | .filter(ProcurementRecordOut -> ProcurementRecordOut.getProcurementRecordStorageId().equals(dto.getId())) |
| | | .filter(ProcurementRecordOut -> ProcurementRecordOut.getProcurementRecordStorageId().equals(dto.getId()) && ProcurementRecordOut.getType().equals(1)) |
| | | .collect(Collectors.toList()); |
| | | |
| | | // å¦ææ²¡æç¸å
³çåºåºè®°å½ï¼è·³è¿è¯¥æ¡æ°æ® |
| | | if(CollectionUtils.isEmpty(collect1)){ |
| | | dto.setInboundNum0(dto.getInboundNum()); |
| | | dto.setTotalInboundNum(BigDecimal.ZERO); |
| | | continue; |
| | | } |
| | | |
| | |
| | | dto.setTotalInboundNum(totalInboundNum); |
| | | // å¾
åºåºæ°é = æ»æ°é - å·²åºåºæ°é |
| | | dto.setInboundNum0(dto.getInboundNum().subtract(totalInboundNum)); |
| | | // åºåä»·å¼ |
| | | if(dto.getUnitPrice() != null){ |
| | | dto.setTotalPrice(dto.getInboundNum0().multiply(dto.getUnitPrice())); |
| | | } |
| | | } |
| | | return procurementPageDtoCopyIPage; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.production.controller; |
| | | |
| | | 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.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.production.mapper.ProductionOrderMapper; |
| | | import com.ruoyi.production.pojo.ProductionOrder; |
| | | import com.ruoyi.production.service.ProductionOrderService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author :yys |
| | | * @date : 2025/11/26 14:21 |
| | | */ |
| | | @RestController |
| | | @Api(tags = "ç产订å") |
| | | @RequestMapping("/productionOrder") |
| | | public class ProductionOrderController extends BaseController { |
| | | |
| | | @Autowired |
| | | private ProductionOrderService productionOrderService; |
| | | |
| | | @Autowired |
| | | private ProductionOrderMapper productionOrderMapper; |
| | | |
| | | @GetMapping("/listPage") |
| | | @Log(title = "ç产订å-å页æ¥è¯¢", businessType = BusinessType.OTHER) |
| | | @ApiOperation("ç产订å-å页æ¥è¯¢") |
| | | public AjaxResult listPage(Page page, ProductionOrder productionOrder) { |
| | | return productionOrderService.listPage(page, productionOrder); |
| | | } |
| | | |
| | | @PostMapping("/addProductionOrder") |
| | | @Log(title = "ç产订å-æ°å¢", businessType = BusinessType.INSERT) |
| | | @ApiOperation("ç产订å-æ°å¢") |
| | | public AjaxResult addProductionOrder(@RequestBody ProductionOrder productionOrder) { |
| | | String scdd = OrderUtils.countTodayByCreateTime(productionOrderMapper, "SCDD"); |
| | | productionOrder.setOrderNo(scdd); |
| | | return AjaxResult.success(productionOrderService.save(productionOrder)); |
| | | } |
| | | |
| | | @PostMapping("/updateProductionOrder") |
| | | @Log(title = "ç产订å-ä¿®æ¹", businessType = BusinessType.UPDATE) |
| | | @ApiOperation("ç产订å-ä¿®æ¹") |
| | | public AjaxResult updateProductionOrder(@RequestBody ProductionOrder productionOrder) { |
| | | return AjaxResult.success(productionOrderService.updateById(productionOrder)); |
| | | } |
| | | |
| | | @DeleteMapping("/deleteProductionOrder") |
| | | @Log(title = "ç产订å-å é¤", businessType = BusinessType.DELETE) |
| | | @ApiOperation("ç产订å-å é¤") |
| | | public AjaxResult deleteProductionOrder(@RequestBody List<Long> ids) { |
| | | if (CollectionUtils.isEmpty(ids)) return AjaxResult.error("è¯·ä¼ å
¥è¦å é¤çID"); |
| | | return AjaxResult.success(productionOrderService.removeBatchByIds(ids)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * å¯¼åº |
| | | * @param response |
| | | */ |
| | | @PostMapping("/export") |
| | | @ApiOperation("ç产管ç-ç产订å-导åº") |
| | | @Log(title = "ç产订å-导åº", businessType = BusinessType.EXPORT) |
| | | public void export(HttpServletResponse response) { |
| | | productionOrderService.export(response); |
| | | } |
| | | |
| | | /** |
| | | * å¯¼åº |
| | | * @param response |
| | | */ |
| | | @PostMapping("/exportOne") |
| | | @ApiOperation("ç产管ç-ç产派工-导åº") |
| | | @Log(title = "ç产订å-导åº", businessType = BusinessType.EXPORT) |
| | | public void exportOne(HttpServletResponse response) { |
| | | productionOrderService.exportOne(response); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.production.dto.SalesLedgerProductionAccountingDto; |
| | | import com.ruoyi.production.pojo.SalesLedgerProductionAccounting; |
| | | import com.ruoyi.production.service.impl.SalesLedgerProductionAccountingServiceImpl; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | 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.procurementrecord.dto.ProcurementDto; |
| | | import com.ruoyi.production.dto.ProcessSchedulingDto; |
| | | import com.ruoyi.production.dto.ProductionDispatchAddDto; |
| | | import com.ruoyi.production.dto.SalesLedgerSchedulingDto; |
| | | import com.ruoyi.production.dto.SalesLedgerSchedulingProcessDto; |
| | | import com.ruoyi.production.service.impl.SalesLedgerSchedulingServiceImpl; |
| | | import io.swagger.annotations.Api; |
| | |
| | | private SalesLedgerSchedulingServiceImpl salesLedgerSchedulingService; |
| | | |
| | | |
| | | @GetMapping("/listPage") |
| | | @Log(title = "ç产管ç-ç产订å-å页æ¥è¯¢", businessType = BusinessType.OTHER) |
| | | @ApiOperation("ç产管ç-ç产订å-å页æ¥è¯¢") |
| | | public AjaxResult listPage(Page page, SalesLedgerSchedulingDto salesLedgerSchedulingDto) { |
| | | IPage<SalesLedgerSchedulingDto> result = salesLedgerSchedulingService.listPage(page,salesLedgerSchedulingDto); |
| | | return AjaxResult.success(result); |
| | | } |
| | | // @GetMapping("/listPage") |
| | | // @Log(title = "ç产管ç-ç产订å-å页æ¥è¯¢", businessType = BusinessType.OTHER) |
| | | // @ApiOperation("ç产管ç-ç产订å-å页æ¥è¯¢") |
| | | // public AjaxResult listPage(Page page, SalesLedgerSchedulingDto salesLedgerSchedulingDto) { |
| | | // IPage<SalesLedgerSchedulingDto> result = salesLedgerSchedulingService.listPage(page,salesLedgerSchedulingDto); |
| | | // return AjaxResult.success(result); |
| | | // } |
| | | |
| | | /** |
| | | * å¯¼åº |
| | | * @param response |
| | | */ |
| | | @PostMapping("/export") |
| | | @ApiOperation("ç产管ç-ç产订å-导åº") |
| | | public void export(HttpServletResponse response) { |
| | | salesLedgerSchedulingService.export(response); |
| | | } |
| | | // /** |
| | | // * å¯¼åº |
| | | // * @param response |
| | | // */ |
| | | // @PostMapping("/export") |
| | | // @ApiOperation("ç产管ç-ç产订å-导åº") |
| | | // public void export(HttpServletResponse response) { |
| | | // salesLedgerSchedulingService.export(response); |
| | | // } |
| | | |
| | | |
| | | /** |
| | | * å¯¼åº |
| | | * @param response |
| | | */ |
| | | @PostMapping("/exportOne") |
| | | @ApiOperation("ç产管ç-ç产派工-导åº") |
| | | public void exportOne(HttpServletResponse response) { |
| | | salesLedgerSchedulingService.exportOne(response); |
| | | } |
| | | |
| | | @PostMapping("/productionDispatch") |
| | | @Log(title = "ç产管ç-ç产订å-ç产派工", businessType = BusinessType.INSERT) |
| | |
| | | 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.production.dto.ProcessSchedulingDto; |
| | | import com.ruoyi.production.dto.ProductionReportDto; |
| | | import com.ruoyi.production.dto.SalesLedgerSchedulingProcessDto; |
| | | import com.ruoyi.production.dto.SalesLedgerWorkDto; |
| | | import com.ruoyi.production.pojo.SalesLedgerWork; |
| | | import com.ruoyi.production.service.SalesLedgerWorkService; |
| | | import com.ruoyi.production.service.impl.SalesLedgerWorkServiceImpl; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | package com.ruoyi.production.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.time.LocalDate; |
| | | |
| | | /** |
| | | * @author :yys |
| | |
| | | @Excel(name = "å¾
ææ°é") |
| | | private BigDecimal daiNum; |
| | | |
| | | @ApiModelProperty(value = "éå®äº§åID") |
| | | private Long salesLedgerProductId; |
| | | |
| | | @ApiModelProperty(value = "éå®å°è´¦ID") |
| | | private Long salesLedgerId; |
| | | |
| | | /** |
| | | * éå®ååå· |
| | | * ç产订åå· |
| | | */ |
| | | @Excel(name = "éå®ååå·") |
| | | @ApiModelProperty(value = "éå®ååå·") |
| | | private String salesContractNo; |
| | | |
| | | /** |
| | | * 客æ·ååå· |
| | | */ |
| | | @Excel(name = "客æ·ååå·") |
| | | @ApiModelProperty(value = "客æ·ååå·") |
| | | private String customerContractNo; |
| | | |
| | | /** |
| | | * 项ç®åç§° |
| | | */ |
| | | @Excel(name = "项ç®åç§°") |
| | | @ApiModelProperty(value = "项ç®åç§°") |
| | | private String projectName; |
| | | |
| | | /** |
| | | * å½å
¥æ¥æ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "å½å
¥æ¥æ", width = 30, dateFormat = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @ApiModelProperty(value = "å½å
¥æ¥æ") |
| | | private Date entryDate; |
| | | |
| | | @ApiModelProperty(value = "å½å
¥æ¥æå¼å§") |
| | | private String entryDateStart; |
| | | |
| | | @ApiModelProperty(value = "å½å
¥æ¥æç»æ") |
| | | private String entryDateEnd; |
| | | |
| | | /** |
| | | * 客æ·åç§° |
| | | */ |
| | | @Excel(name = "客æ·åç§°") |
| | | @ApiModelProperty(value = "客æ·åç§°") |
| | | private String customerName; |
| | | |
| | | @Excel(name = "ç产订åå·") |
| | | private String orderNo; |
| | | |
| | | /** |
| | | * 产å大类 |
| | | */ |
| | | @Excel(name = "产å大类") |
| | | @ApiModelProperty(value = "产å大类") |
| | | private String productCategory; |
| | | |
| | | /** |
| | | * è§æ ¼åå· |
| | | */ |
| | | @Excel(name = "è§æ ¼åå·") |
| | | @ApiModelProperty(value = "è§æ ¼åå·") |
| | | private String specificationModel; |
| | | |
| | | /** |
| | | * åä½ |
| | | */ |
| | | @Excel(name = "åä½") |
| | | @ApiModelProperty(value = "åä½") |
| | | private String unit; |
| | | |
| | | |
| | | /** |
| | | * æ°é |
| | | */ |
| | | @Excel(name = "æ°é") |
| | | @ApiModelProperty(value = "æ°é") |
| | | private BigDecimal quantity; |
| | | |
| | | /** |
| | | * æäº§æ°é |
| | | * 订åç¶æ |
| | | */ |
| | | @Excel(name = "æäº§æ°é") |
| | | @ApiModelProperty(value = "æäº§æ°é") |
| | | private BigDecimal schedulingNum; |
| | | @Excel(name = "订åç¶æ") |
| | | @TableField(exist = false) |
| | | private String status; |
| | | |
| | | @ApiModelProperty(value = "ç§æ·ID") |
| | | private Long tenantId; |
| | | @ApiModelProperty(value = "å®å·¥æ°é") |
| | | @TableField(exist = false) |
| | | private BigDecimal successNum; |
| | | |
| | | /** |
| | | * å½å
¥æ¥æ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | @Excel(name = "å½å
¥æ¥æ", width = 30, dateFormat = "yyyy-MM-dd") |
| | | private LocalDate registerDate; |
| | | |
| | | /** |
| | | * å½å
¥äºº |
| | | */ |
| | | @Excel(name = "å½å
¥äºº") |
| | | private String createBy; |
| | | |
| | | } |
| | |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * @author :yys |
| | |
| | | @ApiModel |
| | | public class ProcessSchedulingDto { |
| | | |
| | | /** |
| | | * å£å³åç±» |
| | | */ |
| | | private String type; |
| | | |
| | | /** |
| | | * 夿³¨ |
| | | */ |
| | | private String remark; |
| | | |
| | | /** |
| | | * æè |
| | | */ |
| | | private String loss; |
| | | |
| | | /** |
| | | * é¢ç¨ |
| | | */ |
| | | private String receive; |
| | | |
| | | private Long id; |
| | | |
| | | /** |
| | |
| | | @ApiModelProperty(value = "éå®å°è´¦ID") |
| | | private Long salesLedgerId; |
| | | |
| | | @ApiModelProperty(value = "éå®äº§åID") |
| | | @ApiModelProperty(value = "ç产订åID") |
| | | private Long salesLedgerProductId; |
| | | |
| | | /** |
| | |
| | | package com.ruoyi.production.dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author :yys |
| | |
| | | @ApiModel |
| | | public class SalesLedgerProductDto { |
| | | |
| | | /** |
| | | * éå®ååå· |
| | | */ |
| | | @Excel(name = "éå®ååå·") |
| | | @ApiModelProperty(value = "éå®ååå·") |
| | | private String salesContractNo; |
| | | |
| | | /** |
| | | * 客æ·ååå· |
| | | */ |
| | | @Excel(name = "客æ·ååå·") |
| | | @ApiModelProperty(value = "客æ·ååå·") |
| | | private String customerContractNo; |
| | | |
| | | /** |
| | | * 项ç®åç§° |
| | | */ |
| | | @Excel(name = "项ç®åç§°") |
| | | @ApiModelProperty(value = "项ç®åç§°") |
| | | private String projectName; |
| | | // /** |
| | | // * éå®ååå· |
| | | // */ |
| | | // @Excel(name = "éå®ååå·") |
| | | // @ApiModelProperty(value = "éå®ååå·") |
| | | // private String salesContractNo; |
| | | // |
| | | // /** |
| | | // * 客æ·ååå· |
| | | // */ |
| | | // @Excel(name = "客æ·ååå·") |
| | | // @ApiModelProperty(value = "客æ·ååå·") |
| | | // private String customerContractNo; |
| | | // |
| | | // /** |
| | | // * 项ç®åç§° |
| | | // */ |
| | | // @Excel(name = "项ç®åç§°") |
| | | // @ApiModelProperty(value = "项ç®åç§°") |
| | | // private String projectName; |
| | | |
| | | |
| | | /** |
| | | * 客æ·åç§° |
| | | * ç产订åå· |
| | | */ |
| | | @Excel(name = "客æ·åç§°") |
| | | @ApiModelProperty(value = "客æ·åç§°") |
| | | private String customerName; |
| | | @Excel(name = "ç产订åå·") |
| | | @ApiModelProperty(value = "ç产订åå·") |
| | | private String orderNo; |
| | | |
| | | |
| | | /** |
| | |
| | | package com.ruoyi.production.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel; |
| | | import io.swagger.annotations.ApiModel; |
| | |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDate; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | |
| | | package com.ruoyi.production.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel; |
| | | import io.swagger.annotations.ApiModel; |
| | |
| | | @ApiModel |
| | | public class SalesLedgerSchedulingProcessDto { |
| | | |
| | | @ApiModelProperty(value = "éå®äº§åID") |
| | | @ApiModelProperty(value = "ç产订åID") |
| | | private Long salesLedgerProductId; |
| | | |
| | | @ApiModelProperty(value = "éå®å°è´¦ID") |
| | | private Long salesLedgerId; |
| | | |
| | | @ApiModelProperty(value = "å¼å§æ¶é´") |
| | | private String entryDateStart; |
| | |
| | | private Long id; |
| | | |
| | | /** |
| | | * éå®ååå· |
| | | * ç产订åå· |
| | | */ |
| | | @Excel(name = "éå®ååå·") |
| | | @ApiModelProperty(value = "éå®ååå·") |
| | | private String salesContractNo; |
| | | |
| | | /** |
| | | * 客æ·ååå· |
| | | */ |
| | | @Excel(name = "客æ·ååå·") |
| | | @ApiModelProperty(value = "客æ·ååå·") |
| | | private String customerContractNo; |
| | | |
| | | /** |
| | | * 项ç®åç§° |
| | | */ |
| | | @Excel(name = "项ç®åç§°") |
| | | @ApiModelProperty(value = "项ç®åç§°") |
| | | private String projectName; |
| | | @Excel(name = "ç产订åå·") |
| | | @ApiModelProperty(value = "ç产订åå·") |
| | | private String orderNo; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "æ´¾å·¥æ¥æ", width = 30, dateFormat = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @ApiModelProperty(value = "æ´¾å·¥æ¥æ") |
| | | private Date schedulingDate; |
| | | |
| | | /** |
| | | * 客æ·åç§° |
| | | */ |
| | | @Excel(name = "客æ·åç§°") |
| | | @ApiModelProperty(value = "客æ·åç§°") |
| | | private String customerName; |
| | | |
| | | |
| | | /** |
| | |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDate; |
| | | |
| | | /** |
| | | * @author :yys |
| | |
| | | @Excel(name = "ç¶æ", readConverterExp = "1=å¾
ç产,2=ç产ä¸,3=å·²æ¥å·¥") |
| | | private String statusName; |
| | | |
| | | /** |
| | | * å£å³åç±» |
| | | */ |
| | | @ApiModelProperty(value = "å£å³åç±»") |
| | | private String type; |
| | | |
| | | /** |
| | | * 夿³¨ |
| | | */ |
| | | @ApiModelProperty(value = "夿³¨") |
| | | private String remark; |
| | | |
| | | /** |
| | | * æè |
| | | */ |
| | | @ApiModelProperty(value = "æè") |
| | | private String loss; |
| | | |
| | | /** |
| | | * é¢ç¨ |
| | | */ |
| | | @ApiModelProperty(value = "é¢ç¨") |
| | | private String receive; |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.production.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.production.pojo.ProductionOrder; |
| | | |
| | | /** |
| | | * @author :yys |
| | | * @date : 2025/11/26 14:18 |
| | | */ |
| | | public interface ProductionOrderMapper extends BaseMapper<ProductionOrder> { |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.production.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * @author :yys |
| | | * @date : 2025/11/26 14:15 |
| | | */ |
| | | @Data |
| | | @TableName("production_order") |
| | | public class ProductionOrder { |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "å½å
¥æ¥æå¼å§") |
| | | @TableField(exist = false) |
| | | private String entryDateStart; |
| | | |
| | | @ApiModelProperty(value = "å½å
¥æ¥æç»æ") |
| | | @TableField(exist = false) |
| | | private String entryDateEnd; |
| | | |
| | | /** |
| | | * ç产订åå· |
| | | */ |
| | | @Excel(name = "ç产订åå·") |
| | | @ApiModelProperty(value = "ç产订åå·") |
| | | private String orderNo; |
| | | |
| | | /** |
| | | * 产å大类 |
| | | */ |
| | | @Excel(name = "产å大类") |
| | | @ApiModelProperty(value = "产å大类") |
| | | private String productCategory; |
| | | |
| | | /** |
| | | * è§æ ¼åå· |
| | | */ |
| | | @Excel(name = "è§æ ¼åå·") |
| | | @ApiModelProperty(value = "è§æ ¼åå·") |
| | | private String specificationModel; |
| | | |
| | | /** |
| | | * åä½ |
| | | */ |
| | | @Excel(name = "åä½") |
| | | @ApiModelProperty(value = "åä½") |
| | | private String unit; |
| | | |
| | | |
| | | /** |
| | | * æ°é |
| | | */ |
| | | @Excel(name = "æ°é") |
| | | @ApiModelProperty(value = "æ°é") |
| | | private BigDecimal quantity; |
| | | |
| | | /** |
| | | * 订åç¶æ |
| | | */ |
| | | @Excel(name = "订åç¶æ") |
| | | @TableField(exist = false) |
| | | private String status = "æªå®æ"; |
| | | |
| | | /** |
| | | * æäº§æ°é |
| | | */ |
| | | @Excel(name = "æäº§æ°é") |
| | | @ApiModelProperty(value = "æäº§æ°é") |
| | | @TableField(exist = false) |
| | | private BigDecimal schedulingNum; |
| | | |
| | | |
| | | /** |
| | | * å®å·¥æ°é |
| | | */ |
| | | @Excel(name = "å®å·¥æ°é") |
| | | @ApiModelProperty(value = "å®å·¥æ°é") |
| | | @TableField(exist = false) |
| | | private BigDecimal successNum = BigDecimal.ZERO; |
| | | |
| | | /** |
| | | * å½å
¥æ¥æ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | @Excel(name = "å½å
¥æ¥æ", width = 30, dateFormat = "yyyy-MM-dd") |
| | | @ApiModelProperty(value = "å½å
¥æ¥æ") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate registerDate; |
| | | |
| | | /** |
| | | * å½å
¥äºº |
| | | */ |
| | | @Excel(name = "å½å
¥äºº") |
| | | @ApiModelProperty(value = "å½å
¥äºº") |
| | | private String createBy; |
| | | |
| | | /** |
| | | * å建è
|
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | /** |
| | | * å建æ¶é´ |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | /** |
| | | * ä¿®æ¹è
|
| | | */ |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | /** |
| | | * ä¿®æ¹æ¶é´ |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | /** |
| | | * ç§æ·ID |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long tenantId; |
| | | |
| | | } |
| | |
| | | private Long salesLedgerId; |
| | | |
| | | /** |
| | | * éå®äº§åid |
| | | * ç产订åid |
| | | */ |
| | | private Long salesLedgerProductId; |
| | | |
| | |
| | | private Long salesLedgerId; |
| | | |
| | | /** |
| | | * éå®äº§åid |
| | | * ç产订åid |
| | | */ |
| | | private Long salesLedgerProductId; |
| | | |
| | |
| | | * å·¥åº |
| | | */ |
| | | private String process; |
| | | |
| | | /** |
| | | * å£å³åç±» |
| | | */ |
| | | private String type; |
| | | |
| | | /** |
| | | * 夿³¨ |
| | | */ |
| | | private String remark; |
| | | |
| | | /** |
| | | * æè |
| | | */ |
| | | private String loss; |
| | | |
| | | /** |
| | | * é¢ç¨ |
| | | */ |
| | | private String receive; |
| | | /** |
| | | * æäº§æ¥æ |
| | | */ |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.production.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.production.pojo.ProductionOrder; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * @author :yys |
| | | * @date : 2025/11/26 14:19 |
| | | */ |
| | | public interface ProductionOrderService extends IService<ProductionOrder> { |
| | | AjaxResult listPage(Page page, ProductionOrder productionOrder); |
| | | |
| | | void export(HttpServletResponse response); |
| | | |
| | | void exportOne(HttpServletResponse response); |
| | | } |
| | |
| | | int productionDispatchDelete(List<Long> ids); |
| | | |
| | | int processScheduling(List<ProcessSchedulingDto> processSchedulingDto); |
| | | |
| | | void exportOne(HttpServletResponse response); |
| | | } |
| | |
| | | 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.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.production.dto.ProductionReportDto; |
| | | import com.ruoyi.production.dto.SalesLedgerWorkDto; |
| | | import com.ruoyi.production.pojo.SalesLedgerWork; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.production.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.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.production.dto.DaiDto; |
| | | import com.ruoyi.production.mapper.ProductionOrderMapper; |
| | | import com.ruoyi.production.mapper.SalesLedgerSchedulingMapper; |
| | | import com.ruoyi.production.mapper.SalesLedgerWorkMapper; |
| | | import com.ruoyi.production.pojo.ProductionOrder; |
| | | import com.ruoyi.production.pojo.SalesLedgerScheduling; |
| | | import com.ruoyi.production.pojo.SalesLedgerWork; |
| | | import com.ruoyi.production.service.ProductionOrderService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @author :yys |
| | | * @date : 2025/11/26 14:20 |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class ProductionOrderServiceImpl extends ServiceImpl<ProductionOrderMapper, ProductionOrder> implements ProductionOrderService { |
| | | |
| | | @Autowired |
| | | private ProductionOrderMapper productionOrderMapper; |
| | | |
| | | @Autowired |
| | | private SalesLedgerWorkMapper salesLedgerWorkMapper; |
| | | |
| | | @Autowired |
| | | private SalesLedgerSchedulingMapper salesLedgerSchedulingMapper; |
| | | |
| | | @Override |
| | | public AjaxResult listPage(Page page, ProductionOrder productionOrder) { |
| | | LambdaQueryWrapper<ProductionOrder> productionOrderLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | if(productionOrder != null){ |
| | | if(StringUtils.isNotEmpty(productionOrder.getOrderNo())){ |
| | | productionOrderLambdaQueryWrapper.like(ProductionOrder::getOrderNo, productionOrder.getOrderNo()); |
| | | } |
| | | if(StringUtils.isNotEmpty(productionOrder.getProductCategory())){ |
| | | productionOrderLambdaQueryWrapper.like(ProductionOrder::getProductCategory, productionOrder.getProductCategory()); |
| | | } |
| | | if(StringUtils.isNotEmpty(productionOrder.getEntryDateStart()) && StringUtils.isNotEmpty(productionOrder.getEntryDateEnd())){ |
| | | productionOrderLambdaQueryWrapper.ge(ProductionOrder::getRegisterDate, productionOrder.getEntryDateStart()) |
| | | .le(ProductionOrder::getRegisterDate, productionOrder.getEntryDateEnd()); |
| | | } |
| | | |
| | | } |
| | | IPage<ProductionOrder> list = productionOrderMapper.selectPage(page,productionOrderLambdaQueryWrapper); |
| | | if(CollectionUtils.isEmpty(list.getRecords())){ |
| | | return AjaxResult.success(list); |
| | | } |
| | | Set<Long> collect = list.getRecords().stream().map(ProductionOrder::getId).collect(Collectors.toSet()); |
| | | // è·åæäº§æ°é |
| | | LambdaQueryWrapper<SalesLedgerScheduling> salesLedgerSchedulingLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | salesLedgerSchedulingLambdaQueryWrapper.in(SalesLedgerScheduling::getSalesLedgerProductId, collect); |
| | | List<SalesLedgerScheduling> salesLedgerSchedulings = salesLedgerSchedulingMapper.selectList(salesLedgerSchedulingLambdaQueryWrapper); |
| | | // 计ç®å®å·¥æ°é |
| | | LambdaQueryWrapper<SalesLedgerWork> salesLedgerWorkLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | salesLedgerWorkLambdaQueryWrapper.in(SalesLedgerWork::getSalesLedgerProductId, collect) |
| | | .ne(SalesLedgerWork::getStatus, 1); |
| | | List<SalesLedgerWork> salesLedgerWorks = salesLedgerWorkMapper.selectList(salesLedgerWorkLambdaQueryWrapper); |
| | | list.getRecords().forEach(i -> { |
| | | // è·åæäº§æ°é |
| | | i.setSchedulingNum(salesLedgerSchedulings |
| | | .stream() |
| | | .filter(j -> j.getSalesLedgerProductId().equals(i.getId())) |
| | | .map(SalesLedgerScheduling::getSchedulingNum) |
| | | .reduce(BigDecimal.ZERO, BigDecimal::add)); |
| | | // è·å宿æ°é |
| | | i.setSuccessNum(salesLedgerWorks |
| | | .stream() |
| | | .filter(j -> j.getSalesLedgerProductId().equals(i.getId())) |
| | | .map(SalesLedgerWork::getFinishedNum) |
| | | .reduce(BigDecimal.ZERO, BigDecimal::add)); |
| | | // ç¶æ = æ°éåå®å·¥æ°éæ¯è¾ |
| | | if(i.getSchedulingNum().compareTo(i.getSuccessNum()) == 0){ |
| | | i.setStatus("已宿"); |
| | | }else{ |
| | | i.setStatus("æªå®æ"); |
| | | } |
| | | }); |
| | | return AjaxResult.success(list); |
| | | } |
| | | |
| | | @Override |
| | | public void export(HttpServletResponse response) { |
| | | List<ProductionOrder> list = this.list(); |
| | | if(CollectionUtils.isEmpty(list)){ |
| | | throw new RuntimeException("æ å¯¼åºæ°æ®"); |
| | | } |
| | | Set<Long> collect = list.stream().map(ProductionOrder::getId).collect(Collectors.toSet()); |
| | | LambdaQueryWrapper<SalesLedgerWork> salesLedgerWorkLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | salesLedgerWorkLambdaQueryWrapper.in(SalesLedgerWork::getSalesLedgerProductId, collect) |
| | | .ne(SalesLedgerWork::getStatus, 1); |
| | | List<SalesLedgerWork> salesLedgerWorks = salesLedgerWorkMapper.selectList(salesLedgerWorkLambdaQueryWrapper); |
| | | list.forEach(i -> { |
| | | // è·å宿æ°é |
| | | i.setSuccessNum(salesLedgerWorks |
| | | .stream() |
| | | .filter(j -> j.getSalesLedgerProductId().equals(i.getId())) |
| | | .map(SalesLedgerWork::getFinishedNum) |
| | | .reduce(BigDecimal.ZERO, BigDecimal::add)); |
| | | // ç¶æ = æ°éåå®å·¥æ°éæ¯è¾ |
| | | if(i.getQuantity().compareTo(i.getSuccessNum()) == 0){ |
| | | i.setStatus("已宿"); |
| | | }else{ |
| | | i.setStatus("æªå®æ"); |
| | | } |
| | | }); |
| | | ExcelUtil<ProductionOrder> util = new ExcelUtil<>(ProductionOrder.class); |
| | | util.exportExcel(response, list, "ç产订å"); |
| | | } |
| | | |
| | | @Override |
| | | public void exportOne(HttpServletResponse response) { |
| | | List<ProductionOrder> list = this.list(); |
| | | if(CollectionUtils.isEmpty(list)){ |
| | | throw new RuntimeException("æ å¯¼åºæ°æ®"); |
| | | } |
| | | List<DaiDto> dais = new ArrayList<>(); |
| | | list.forEach(i -> { |
| | | DaiDto daiDto = new DaiDto(); |
| | | BeanUtils.copyProperties(i, daiDto); |
| | | // è·åå¾
æäº§æ°é |
| | | daiDto.setDaiNum(daiDto.getQuantity().subtract(i.getSuccessNum())); |
| | | dais.add(daiDto); |
| | | }); |
| | | ExcelUtil<DaiDto> util = new ExcelUtil<>(DaiDto.class); |
| | | util.exportExcel(response, dais, "ç产派工"); |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.procurementrecord.dto.ProcurementRecordOutPageDto; |
| | | import com.ruoyi.production.dto.*; |
| | | import com.ruoyi.production.dto.ProcessSchedulingDto; |
| | | import com.ruoyi.production.dto.ProductionDispatchAddDto; |
| | | import com.ruoyi.production.dto.SalesLedgerSchedulingDto; |
| | | import com.ruoyi.production.dto.SalesLedgerSchedulingProcessDto; |
| | | import com.ruoyi.production.mapper.SalesLedgerSchedulingMapper; |
| | | import com.ruoyi.production.mapper.SalesLedgerWorkMapper; |
| | | import com.ruoyi.production.pojo.SalesLedgerScheduling; |
| | |
| | | import com.ruoyi.project.system.mapper.SysUserMapper; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDate; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | import java.util.stream.Collectors; |
| | |
| | | SysUser sysUser = sysUserMapper.selectUserById(processSchedulingDto.getSchedulingUserId()); |
| | | if(sysUser == null) throw new RuntimeException("æäº§äººä¸åå¨"); |
| | | salesLedgerScheduling.setFinishedNum(salesLedgerScheduling.getFinishedNum().add(processSchedulingDto.getSchedulingNum())); |
| | | LambdaQueryWrapper<SalesLedgerWork> salesLedgerWorkLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | salesLedgerWorkLambdaQueryWrapper.eq(SalesLedgerWork::getSalesLedgerSchedulingId, salesLedgerScheduling.getId()) |
| | | .ne(SalesLedgerWork::getStatus, 1); |
| | | List<SalesLedgerWork> salesLedgerWorks = salesLedgerWorkMapper.selectList(salesLedgerWorkLambdaQueryWrapper); |
| | | if(salesLedgerScheduling.getSchedulingNum().compareTo(salesLedgerScheduling.getFinishedNum()) < 0){ |
| | | throw new RuntimeException("å½åæäº§æ°é大äºå¾
æäº§æ°éï¼è¯·ä»ç»æ ¸å¯¹ï¼"); |
| | | } |
| | |
| | | .salesLedgerProductId(salesLedgerScheduling.getSalesLedgerProductId()) |
| | | .schedulingUserId(salesLedgerScheduling.getSchedulingUserId()) |
| | | .schedulingUserName(sysUser.getNickName()) |
| | | .type(processSchedulingDto.getType()) |
| | | .remark(processSchedulingDto.getRemark()) |
| | | .loss(processSchedulingDto.getLoss()) |
| | | .receive(processSchedulingDto.getReceive()) |
| | | .schedulingNum(processSchedulingDto.getSchedulingNum()) |
| | | .workHours(processSchedulingDto.getWorkHours()) |
| | | .process(processSchedulingDto.getProcess()) |
| | |
| | | return 0; |
| | | } |
| | | |
| | | @Override |
| | | public void exportOne(HttpServletResponse response) { |
| | | List<SalesLedgerSchedulingDto> list = salesLedgerSchedulingMapper.list(); |
| | | if(CollectionUtils.isEmpty(list)){ |
| | | throw new RuntimeException("æ å¯¼åºæ°æ®"); |
| | | } |
| | | List<DaiDto> dais = new ArrayList<>(); |
| | | list.forEach(i -> { |
| | | DaiDto daiDto = new DaiDto(); |
| | | BeanUtils.copyProperties(i, daiDto); |
| | | // è·åå¾
æäº§æ°é |
| | | daiDto.setDaiNum(daiDto.getQuantity().subtract(i.getSchedulingNum())); |
| | | dais.add(daiDto); |
| | | }); |
| | | ExcelUtil<DaiDto> util = new ExcelUtil<>(DaiDto.class); |
| | | util.exportExcel(response, dais, "ç产派工"); |
| | | } |
| | | } |
| | |
| | | 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.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.production.dto.ProductionReportDto; |
| | | import com.ruoyi.production.dto.SalesLedgerWorkDto; |
| | | import com.ruoyi.production.mapper.SalesLedgerProductionAccountingMapper; |
| | | import com.ruoyi.production.mapper.SalesLedgerWorkMapper; |
| | | import com.ruoyi.production.pojo.SalesLedgerProductionAccounting; |
| | | import com.ruoyi.production.pojo.SalesLedgerWork; |
| | | import com.ruoyi.production.service.SalesLedgerProductionAccountingService; |
| | | import com.ruoyi.production.service.SalesLedgerWorkService; |
| | | import com.ruoyi.project.system.domain.SysUser; |
| | | import com.ruoyi.project.system.mapper.SysUserMapper; |
| | |
| | | package com.ruoyi.project.system.controller;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import com.ruoyi.common.utils.SecurityUtils;
|
| | | import org.apache.commons.lang3.ArrayUtils;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.security.access.prepost.PreAuthorize;
|
| | |
| | | return error("æ°å¢é¨é¨'" + dept.getDeptName() + "'失败ï¼é¨é¨åç§°å·²åå¨");
|
| | | }
|
| | | dept.setCreateBy(getUsername());
|
| | | dept.setTenantId(SecurityUtils.getLoginUser().getTenantId());
|
| | | return toAjax(deptService.insertDept(dept));
|
| | | }
|
| | |
|
| | |
| | |
|
| | | import java.util.List;
|
| | | import javax.servlet.http.HttpServletResponse;
|
| | |
|
| | | import com.ruoyi.common.utils.SecurityUtils;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.security.access.prepost.PreAuthorize;
|
| | | import org.springframework.validation.annotation.Validated;
|
| | |
| | | return error("æ°å¢å²ä½'" + post.getPostName() + "'失败ï¼å²ä½ç¼ç å·²åå¨");
|
| | | }
|
| | | post.setCreateBy(getUsername());
|
| | | post.setTenantId(SecurityUtils.getLoginUser().getTenantId());
|
| | | return toAjax(postService.insertPost(post));
|
| | | }
|
| | |
|
| | |
| | |
|
| | | import java.util.List;
|
| | | import javax.servlet.http.HttpServletResponse;
|
| | |
|
| | | import com.ruoyi.common.utils.SecurityUtils;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.security.access.prepost.PreAuthorize;
|
| | | import org.springframework.validation.annotation.Validated;
|
| | |
| | | @PostMapping
|
| | | public AjaxResult add(@Validated @RequestBody SysRole role)
|
| | | {
|
| | | if (!roleService.checkRoleNameUnique(role))
|
| | | {
|
| | | return error("æ°å¢è§è²'" + role.getRoleName() + "'失败ï¼è§è²åç§°å·²åå¨");
|
| | | }
|
| | | else if (!roleService.checkRoleKeyUnique(role))
|
| | | {
|
| | | return error("æ°å¢è§è²'" + role.getRoleName() + "'失败ï¼è§è²æéå·²åå¨");
|
| | | }
|
| | | // if (!roleService.checkRoleNameUnique(role))
|
| | | // {
|
| | | // return error("æ°å¢è§è²'" + role.getRoleName() + "'失败ï¼è§è²åç§°å·²åå¨");
|
| | | // }
|
| | | // else if (!roleService.checkRoleKeyUnique(role))
|
| | | // {
|
| | | // return error("æ°å¢è§è²'" + role.getRoleName() + "'失败ï¼è§è²æéå·²åå¨");
|
| | | // }
|
| | | role.setCreateBy(getUsername());
|
| | | role.setTenantId(SecurityUtils.getLoginUser().getTenantId());
|
| | | return toAjax(roleService.insertRole(role));
|
| | |
|
| | | }
|
| | |
| | | {
|
| | | roleService.checkRoleAllowed(role);
|
| | | roleService.checkRoleDataScope(role.getRoleId());
|
| | | if (!roleService.checkRoleNameUnique(role))
|
| | | {
|
| | | return error("ä¿®æ¹è§è²'" + role.getRoleName() + "'失败ï¼è§è²åç§°å·²åå¨");
|
| | | }
|
| | | else if (!roleService.checkRoleKeyUnique(role))
|
| | | {
|
| | | return error("ä¿®æ¹è§è²'" + role.getRoleName() + "'失败ï¼è§è²æéå·²åå¨");
|
| | | }
|
| | | // if (!roleService.checkRoleNameUnique(role))
|
| | | // {
|
| | | // return error("ä¿®æ¹è§è²'" + role.getRoleName() + "'失败ï¼è§è²åç§°å·²åå¨");
|
| | | // }
|
| | | // else if (!roleService.checkRoleKeyUnique(role))
|
| | | // {
|
| | | // return error("ä¿®æ¹è§è²'" + role.getRoleName() + "'失败ï¼è§è²æéå·²åå¨");
|
| | | // }
|
| | | role.setUpdateBy(getUsername());
|
| | |
|
| | | if (roleService.updateRole(role) > 0)
|
| | |
| | | }
|
| | | List<SysRole> roles = roleService.selectRoleAll();
|
| | | ajax.put("roles", SysUser.isAdmin(userId) ? roles : roles.stream().filter(r -> !r.isAdmin()).collect(Collectors.toList()));
|
| | | ajax.put("posts", postService.selectPostAll());
|
| | | // ajax.put("posts", postService.selectPostAll());
|
| | | ajax.put("posts", postService.selectPostByTenantId(SecurityUtils.getLoginUser().getTenantId()));
|
| | | SysUserDeptVo sysUserDeptVo = new SysUserDeptVo();
|
| | | sysUserDeptVo.setUserId(userId);
|
| | | List<SysUserDeptVo> sysUserDeptVos = userDeptService.userLoginFacotryList(sysUserDeptVo);
|
| | |
| | | return error("æ°å¢ç¨æ·'" + user.getUserName() + "'失败ï¼é®ç®±è´¦å·å·²åå¨");
|
| | | }
|
| | | user.setCreateBy(getUsername());
|
| | | user.setTenantId(SecurityUtils.getLoginUser().getTenantId());
|
| | | user.setPassword(SecurityUtils.encryptPassword(user.getPassword()));
|
| | | return toAjax(userService.insertUser(user));
|
| | | }
|
| | |
| | | @GetMapping("/userListNoPageByTenantId")
|
| | | public AjaxResult userListNoPageByTenantId(SysUser user){
|
| | | //è·åç»å½ç¨æ·ä¿¡æ¯
|
| | | SysUser loginUser = SecurityUtils.getLoginUser().getUser();
|
| | | user.setTenantId(loginUser.getTenantId());
|
| | | // SysUser loginUser = SecurityUtils.getLoginUser().getUser();
|
| | | user.setTenantId(SecurityUtils.getLoginUser().getTenantId());
|
| | | List<SysUser> sysUserList = userService.userListNoPage(user);
|
| | | return AjaxResult.success(sysUserList);
|
| | | }
|
| | |
| | |
|
| | | /** é¨é¨ç¼å· */
|
| | | private String deptNick;
|
| | | |
| | |
|
| | | private Long tenantId;
|
| | |
|
| | | public Long getTenantId() {
|
| | | return tenantId;
|
| | | }
|
| | |
|
| | | public void setTenantId(Long tenantId) {
|
| | | this.tenantId = tenantId;
|
| | | }
|
| | |
|
| | | /** åé¨é¨ */
|
| | | private List<SysDept> children = new ArrayList<SysDept>();
|
| | |
|
| | |
| | | @Excel(name = "ç¶æ", readConverterExp = "0=æ£å¸¸,1=åç¨")
|
| | | private String status;
|
| | |
|
| | | private Long tenantId;
|
| | |
|
| | | public Long getTenantId() {
|
| | | return tenantId;
|
| | | }
|
| | |
|
| | | public void setTenantId(Long tenantId) {
|
| | | this.tenantId = tenantId;
|
| | | }
|
| | |
|
| | | /** ç¨æ·æ¯å¦å卿¤å²ä½æ è¯ é»è®¤ä¸åå¨ */
|
| | | private boolean flag = false;
|
| | |
|
| | |
| | | import javax.validation.constraints.NotBlank;
|
| | | import javax.validation.constraints.NotNull;
|
| | | import javax.validation.constraints.Size;
|
| | |
|
| | | import com.baomidou.mybatisplus.annotation.FieldFill;
|
| | | import com.baomidou.mybatisplus.annotation.TableField;
|
| | | import org.apache.commons.lang3.builder.ToStringBuilder;
|
| | | import org.apache.commons.lang3.builder.ToStringStyle;
|
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel;
|
| | |
| | | /** è§è²èåæé */
|
| | | private Set<String> permissions;
|
| | |
|
| | | /**ç§æ·id*/
|
| | | private Long tenantId;
|
| | |
|
| | | public Long getTenantId() {
|
| | | return tenantId;
|
| | | }
|
| | |
|
| | | public void setTenantId(Long tenantId) {
|
| | | this.tenantId = tenantId;
|
| | | }
|
| | |
|
| | | public SysRole()
|
| | | {
|
| | |
|
| | |
| | | * @return
|
| | | */
|
| | | Long maxLevelDeptId(Long deptId);
|
| | |
|
| | | SysDept selectDeptByDeptName(@Param("deptName") String deptName);
|
| | | }
|
| | |
| | |
|
| | | import java.util.List;
|
| | | import com.ruoyi.project.system.domain.SysPost;
|
| | | import org.apache.ibatis.annotations.Param;
|
| | |
|
| | | /**
|
| | | * å²ä½ä¿¡æ¯ æ°æ®å±
|
| | |
| | | * @return ç»æ
|
| | | */
|
| | | public SysPost checkPostCodeUnique(String postCode);
|
| | |
|
| | | List<SysPost> selectPostByTenantId(@Param("tenantId") Long tenantId);
|
| | | }
|
| | |
| | | public List<SysDept> selectDeptList(SysDept dept);
|
| | |
|
| | | /**
|
| | | * æ ¹æ®é¨é¨åç§°æ¥è¯¢é¨é¨ä¿¡æ¯
|
| | | *
|
| | | * @param deptName é¨é¨åç§°
|
| | | * @return é¨é¨ä¿¡æ¯éå
|
| | | */
|
| | | public SysDept selectDeptByDeptName(String deptName);
|
| | |
|
| | | /**
|
| | | * æ¥è¯¢é¨é¨æ ç»æä¿¡æ¯
|
| | | *
|
| | | * @param dept é¨é¨ä¿¡æ¯
|
| | |
| | | * @return ç»æ
|
| | | */
|
| | | public int updatePost(SysPost post);
|
| | |
|
| | | public List<SysPost> selectPostByTenantId(Long tenantId);
|
| | | }
|
| | |
| | | * @return é¨é¨ä¿¡æ¯éå
|
| | | */
|
| | | @Override
|
| | | @DataScope(deptAlias = "d")
|
| | | @DataScope(tenantIdFelid = "d")
|
| | | public List<SysDept> selectDeptList(SysDept dept)
|
| | | {
|
| | | return deptMapper.selectDeptList(dept);
|
| | | }
|
| | | |
| | |
|
| | | @Override
|
| | | public SysDept selectDeptByDeptName(String deptName) {
|
| | | return deptMapper.selectDeptByDeptName(deptName);
|
| | | }
|
| | |
|
| | | /**
|
| | | * æ¥è¯¢é¨é¨æ ç»æä¿¡æ¯
|
| | | *
|
| | |
| | | package com.ruoyi.project.system.service.impl;
|
| | |
|
| | | import java.util.Collections;
|
| | | import java.util.List;
|
| | |
|
| | | import com.ruoyi.framework.aspectj.lang.annotation.DataScope;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.stereotype.Service;
|
| | | import com.ruoyi.common.constant.UserConstants;
|
| | |
| | | * @return å²ä½ä¿¡æ¯éå
|
| | | */
|
| | | @Override
|
| | | @DataScope(tenantIdFelid = "p")
|
| | | public List<SysPost> selectPostList(SysPost post)
|
| | | {
|
| | | return postMapper.selectPostList(post);
|
| | |
| | | {
|
| | | return postMapper.updatePost(post);
|
| | | }
|
| | |
|
| | | @Override
|
| | | @DataScope(tenantIdFelid = "p")
|
| | | public List<SysPost> selectPostByTenantId(Long tenantId) {
|
| | | return postMapper.selectPostByTenantId(tenantId);
|
| | | }
|
| | | }
|
| | |
| | | * @return è§è²æ°æ®éåä¿¡æ¯
|
| | | */
|
| | | @Override
|
| | | @DataScope(deptAlias = "d")
|
| | | @DataScope(tenantIdFelid = "r")
|
| | | public List<SysRole> selectRoleList(SysRole role)
|
| | | {
|
| | | return roleMapper.selectRoleList(role);
|
| | |
| | | * @return ç¨æ·ä¿¡æ¯éåä¿¡æ¯
|
| | | */
|
| | | @Override
|
| | | @DataScope(deptAlias = "d", userAlias = "u")
|
| | | @DataScope(tenantIdFelid = "u")
|
| | | public List<SysUser> selectUserList(SysUser user)
|
| | | {
|
| | | return userMapper.selectUserList(user);
|
| | |
| | | @Data |
| | | @TableName("ticket_registration") |
| | | public class TicketRegistrationDto extends TicketRegistration { |
| | | @TableField(exist = false) |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 主é®ID |
| | |
| | | import com.ruoyi.basic.pojo.SupplierManage; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.DataScope; |
| | | import com.ruoyi.framework.security.LoginUser; |
| | | import com.ruoyi.purchase.dto.PaymentHistoryRecordVo; |
| | | import com.ruoyi.purchase.dto.PaymentLedgerDto; |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.enums.FileNameType; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.purchase.dto.ProductRecordDto; |
| | | import com.ruoyi.purchase.dto.TicketRegistrationDto; |
| | |
| | | |
| | | @Override |
| | | public IPage<ProductRecordDto> productRecordPage(Page page, TicketRegistrationDto ticketRegistrationDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | ticketRegistrationDto.setUserId(userId); |
| | | IPage<ProductRecordDto> productRecordDtoIPage1 = productRecordMapper.productRecordPage(page, ticketRegistrationDto); |
| | | page.setSize(productRecordDtoIPage1.getTotal()); |
| | | IPage<ProductRecordDto> productRecordDtoIPage = productRecordMapper.productRecordPage(page, ticketRegistrationDto); |
| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int addOrEditPurchase(PurchaseLedgerDto purchaseLedgerDto) throws IOException { |
| | | |
| | | SalesLedger salesLedger = salesLedgerMapper.selectById(purchaseLedgerDto.getSalesLedgerId()); |
| | | //å½å
¥äºº |
| | | SysUser sysUser = userMapper.selectUserById(purchaseLedgerDto.getRecorderId()); |
| | | |
| | |
| | | if(ObjectUtils.isNotEmpty(loginUser) && null != loginUser.getTenantId()) { |
| | | purchaseLedger.setTenantId(loginUser.getTenantId()); |
| | | } |
| | | purchaseLedger.setSalesContractNo(ObjectUtils.isNotEmpty(salesLedger) ? salesLedger.getSalesContractNo() : null); |
| | | purchaseLedger.setSalesContractNo(purchaseLedgerDto.getSalesContractNo()); |
| | | purchaseLedger.setSupplierName(supplierManage.getSupplierName()); |
| | | purchaseLedger.setRecorderId(purchaseLedgerDto.getRecorderId()); |
| | | purchaseLedger.setRecorderName(sysUser.getNickName()); |
| | |
| | | |
| | | @Override |
| | | public IPage<PurchaseLedgerDto> selectPurchaseLedgerListPage(IPage ipage, PurchaseLedgerDto purchaseLedger) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | purchaseLedger.setRecorderId(userId); |
| | | IPage<PurchaseLedgerDto> purchaseLedgerDtoIPage = purchaseLedgerMapper.selectPurchaseLedgerListPage(ipage, purchaseLedger); |
| | | purchaseLedgerDtoIPage.getRecords().forEach(purchaseLedgerDto -> { |
| | | List<CommonFile> commonFiles = commonFileMapper.selectList(new LambdaQueryWrapper<CommonFile>().eq(CommonFile::getCommonId, purchaseLedgerDto.getId()).eq(CommonFile::getType, FileNameType.PURCHASELEDGER.getValue())); |
| | |
| | | import com.ruoyi.common.enums.SalesLedgerType; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.bean.BeanUtils; |
| | | import com.ruoyi.other.mapper.TempFileMapper; |
| | |
| | | if (!ObjectUtils.isEmpty(ticketRegistration.getIssueDateStart()) && !ObjectUtils.isEmpty(ticketRegistration.getIssueDateEnd())) { |
| | | queryWrapper.between(TicketRegistration::getIssueDate, LocalDate.parse(ticketRegistration.getIssueDateStart(), DateTimeFormatter.ofPattern("yyyy-MM-dd")), LocalDate.parse(ticketRegistration.getIssueDateEnd(), DateTimeFormatter.ofPattern("yyyy-MM-dd"))); |
| | | } |
| | | queryWrapper.eq(TicketRegistration::getIssUerId, SecurityUtils.getUserId()); |
| | | IPage<TicketRegistration> ticketRegistrationIPage = ticketRegistrationMapper.selectPage(page, queryWrapper); |
| | | // 计ç®å·²ä»æ¬¾éé¢ |
| | | if (CollectionUtils.isNotEmpty(ticketRegistrationIPage.getRecords())) { |
| | |
| | | package com.ruoyi.tide.controller; |
| | | |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.baomidou.mybatisplus.core.toolkit.IdWorker; |
| | | import com.ruoyi.common.constant.Constants; |
| | |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Anonymous; |
| | | import com.ruoyi.framework.security.service.SysLoginService; |
| | | 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.service.ISysDeptService; |
| | | import com.ruoyi.project.system.service.ISysUserService; |
| | | import com.ruoyi.tide.pojo.TidePojo; |
| | | import com.ruoyi.tide.utils.TideUtils; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Isolation; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.PreDestroy; |
| | | import javax.annotation.security.PermitAll; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | |
| | |
| | | @Autowired |
| | | private ISysUserService userService; |
| | | |
| | | @Autowired |
| | | private ISysDeptService deptService; |
| | | |
| | | @ApiOperation(value = "ç»å½") |
| | | @PostMapping("/tideLogin") |
| | | public AjaxResult login(@RequestBody TidePojo tidePojo) { |
| | |
| | | } |
| | | |
| | | @PostMapping("/applicationOrdering") |
| | | @Transactional(rollbackFor = Exception.class,isolation = Isolation.READ_COMMITTED) |
| | | public JSONObject order (@RequestBody TidePojo tidePojo) { |
| | | SysUser user = userService.selectUserByUserName(tidePojo.getPltAccountLogin()); |
| | | String defaultPwd = "I73Kj+Mn$+SI";//é»è®¤å¼éå¯ç åºå®åæ» |
| | | // String randomString = TideUtils.getRandomString(12); |
| | | //è´¦å·ä¸åå¨ï¼æ§è¡æ°å¢æä½ |
| | | if(Objects.isNull(user)){ |
| | | if(ObjectUtils.isEmpty(user)){ |
| | | //1.å
æ°å¢ç¨æ·å¯¹åºçå
¬å¸ |
| | | SysDept dept = new SysDept(); |
| | | dept.setParentId(100L);//ç¶å
¬å¸id |
| | | dept.setDeptName(tidePojo.getEnterpriseName()); |
| | | dept.setDeptNick(tidePojo.getEnterpriseName()); |
| | | dept.setOrderNum(0); |
| | | boolean deptNameUnique = deptService.checkDeptNameUnique(dept); |
| | | if (deptNameUnique){ |
| | | deptService.insertDept(dept); |
| | | } |
| | | //æ¥è¯¢å
¬å¸ |
| | | SysDept newSysDept = deptService.selectDeptByDeptName(dept.getDeptName()); |
| | | dept.setDeptId(ObjectUtils.isEmpty(newSysDept)?100L:newSysDept.getDeptId()); |
| | | dept.setTenantId(dept.getDeptId()); |
| | | deptService.updateDept(dept); |
| | | user = new SysUser(); |
| | | String password = SecurityUtils.encryptPassword(defaultPwd); |
| | | user.setPassword(password); |
| | |
| | | user.setDelFlag("0"); |
| | | user.setPostIds(new Long[]{1L}); |
| | | user.setRoleId(1L); |
| | | user.setRoleIds(new Long[]{2L}); |
| | | user.setDeptIds(new Long[]{100L}); |
| | | user.setRoleIds(new Long[]{2L});//é»è®¤æ®éè§è² |
| | | user.setDeptIds(new Long[]{dept.getDeptId()});//ç»å®å
¬å¸ |
| | | user.setTenantId(dept.getDeptId()); |
| | | userService.insertUser(user); |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | private final static String appSecret = "6g3GMjkxMjIwMjUxNDUzMDY4NzE2aH"; |
| | | |
| | | // å
ç½å°å |
| | | private final static String ip = "http://10.136.0.8:8083"; |
| | | private final static String ip = "http://58.56.84.138:8083"; |
| | | |
| | | // MD5å å¯å¹¶è½¬æ¢ä¸º16è¿å¶ |
| | | public static String md5Encryption(String input) { |
| | |
| | | /** |
| | | * äºåé䏿¬¡çå¿è·³ |
| | | */ |
| | | @Scheduled(cron = "0 0/5 * * * ?") |
| | | // @Scheduled(cron = "0 0/5 * * * ?") |
| | | public static void heartbeat(){ |
| | | HashMap<String, String> header = getGetHeader(null); |
| | | String url = ip + "/cpn/api/extra/v1/application/heartbeat"; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.vehicleInformationCollectionReview.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.vehicleInformationCollectionReview.dto.VehicleInformationCollectionReviewDTO; |
| | | import com.ruoyi.vehicleInformationCollectionReview.pojo.VehicleInformationCollectionReview; |
| | | import com.ruoyi.vehicleInformationCollectionReview.service.VehicleInformationCollectionReviewService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/environmentAccess") |
| | | public class VehicleInformationCollectionController { |
| | | |
| | | @Autowired |
| | | private VehicleInformationCollectionReviewService vehicleInformationCollectionReviewService; |
| | | |
| | | // æ¥è¯¢è½¦è¾ä¿¡æ¯å页å表 |
| | | @GetMapping("/vehicleInfoPage") |
| | | public AjaxResult vehicleInfoPage(Page page, VehicleInformationCollectionReview vehicleInformationCollectionReview){ |
| | | return AjaxResult.success(vehicleInformationCollectionReviewService.listPage(page,vehicleInformationCollectionReview)); |
| | | } |
| | | // æ°å¢è½¦è¾ä¿¡æ¯ |
| | | @PostMapping("/vehicleInfoAdd") |
| | | public AjaxResult vehicleInfoAdd(@RequestBody VehicleInformationCollectionReview vehicleInformationCollectionReview){ |
| | | return AjaxResult.success(vehicleInformationCollectionReviewService.insert(vehicleInformationCollectionReview)); |
| | | } |
| | | // ä¿®æ¹è½¦è¾ä¿¡æ¯ |
| | | @PutMapping("/vehicleInfoUpdate") |
| | | public AjaxResult updateRecord(VehicleInformationCollectionReview vehicleInformationCollectionReview){ |
| | | return AjaxResult.success(vehicleInformationCollectionReviewService.updateById(vehicleInformationCollectionReview)); |
| | | } |
| | | // å é¤è½¦è¾ä¿¡æ¯ï¼æ¯ææ¹éï¼ |
| | | @DeleteMapping("/vehicleInfoDelete") |
| | | public AjaxResult removeRecords(@RequestBody List<Long> ids){ |
| | | return AjaxResult.success(vehicleInformationCollectionReviewService.removeBatchByIds(ids)); |
| | | } |
| | | // å®¡æ ¸è½¦è¾ä¿¡æ¯ |
| | | @PostMapping("/vehicleInfoReview") |
| | | public AjaxResult vehicleInfoReview(@RequestBody VehicleInformationCollectionReviewDTO vehicleInformationCollectionReviewDTO){ |
| | | return AjaxResult.success(vehicleInformationCollectionReviewService.update(Wrappers.<VehicleInformationCollectionReview>lambdaUpdate() |
| | | .set(VehicleInformationCollectionReview::getReviewStatus,vehicleInformationCollectionReviewDTO.getReviewStatus()) |
| | | .eq(VehicleInformationCollectionReview::getId,vehicleInformationCollectionReviewDTO.getId()))); |
| | | } |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.vehicleInformationCollectionReview.dto; |
| | | |
| | | import com.ruoyi.vehicleInformationCollectionReview.pojo.VehicleInformationCollectionReview; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class VehicleInformationCollectionReviewDTO extends VehicleInformationCollectionReview { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.vehicleInformationCollectionReview.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.vehicleInformationCollectionReview.pojo.VehicleInformationCollectionReview; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * @author 27233 |
| | | * @description é对表ãvehicle_information_collection_reviewãçæ°æ®åºæä½Mapper |
| | | * @createDate 2026-01-06 19:50:48 |
| | | * @Entity com.ruoyi.pojo.VehicleInformationCollectionReview |
| | | */ |
| | | @Mapper |
| | | public interface VehicleInformationCollectionReviewMapper extends BaseMapper<VehicleInformationCollectionReview> { |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.vehicleInformationCollectionReview.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * |
| | | * @TableName vehicle_information_collection_review |
| | | */ |
| | | @TableName(value ="vehicle_information_collection_review") |
| | | @Data |
| | | public class VehicleInformationCollectionReview { |
| | | /** |
| | | * 主é®id |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 车çå·ç |
| | | */ |
| | | private String plateNo; |
| | | |
| | | /** |
| | | * å·çé¢è² |
| | | */ |
| | | private String plateColor; |
| | | |
| | | /** |
| | | * 车è¾ç±»å |
| | | */ |
| | | private String carType; |
| | | |
| | | /** |
| | | * 车è¾è¯å«ä»£ç ((vin) |
| | | */ |
| | | private String carVin; |
| | | |
| | | /** |
| | | * 车è¾åå· |
| | | */ |
| | | private String carModel; |
| | | |
| | | /** |
| | | * å卿ºåå· |
| | | */ |
| | | private String engineModel; |
| | | |
| | | /** |
| | | * å卿ºç产å |
| | | */ |
| | | private String engineProductFactory; |
| | | |
| | | /** |
| | | * å卿ºç¼å· |
| | | */ |
| | | private String engineNo; |
| | | |
| | | /** |
| | | * ææ¾æ å |
| | | */ |
| | | private String emissionStandard; |
| | | |
| | | /** |
| | | * 注åç»è®°æ¶é´ |
| | | */ |
| | | private Date registeDate; |
| | | |
| | | /** |
| | | * ä½¿ç¨æ§è´¨ |
| | | */ |
| | | private String natureOfUse; |
| | | |
| | | /** |
| | | * çæ²¹ç±»å |
| | | */ |
| | | private String fuelType; |
| | | |
| | | /** |
| | | * å®¡æ ¸ç¶æ |
| | | */ |
| | | private String reviewStatus; |
| | | |
| | | /** |
| | | * ç§æ·id |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long tenantId; |
| | | |
| | | /** |
| | | * å建人 |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | /** |
| | | * å建æ¶é´ |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | /** |
| | | * æ´æ°äºº |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | /** |
| | | * æ´æ°æ¶é´ |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.vehicleInformationCollectionReview.service; |
| | | |
| | | 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.vehicleInformationCollectionReview.pojo.VehicleInformationCollectionReview; |
| | | |
| | | /** |
| | | * @author 27233 |
| | | * @description é对表ãvehicle_information_collection_reviewãçæ°æ®åºæä½Service |
| | | * @createDate 2026-01-06 19:50:48 |
| | | */ |
| | | public interface VehicleInformationCollectionReviewService extends IService<VehicleInformationCollectionReview> { |
| | | |
| | | IPage<VehicleInformationCollectionReview> listPage(Page page, VehicleInformationCollectionReview vehicleInformationCollectionReview); |
| | | |
| | | long insert(VehicleInformationCollectionReview vehicleInformationCollectionReview); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.vehicleInformationCollectionReview.service.impl; |
| | | |
| | | 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.QueryWrappers; |
| | | import com.ruoyi.vehicleInformationCollectionReview.mapper.VehicleInformationCollectionReviewMapper; |
| | | import com.ruoyi.vehicleInformationCollectionReview.pojo.VehicleInformationCollectionReview; |
| | | import com.ruoyi.vehicleInformationCollectionReview.service.VehicleInformationCollectionReviewService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @author 27233 |
| | | * @description é对表ãvehicle_information_collection_reviewãçæ°æ®åºæä½Serviceå®ç° |
| | | * @createDate 2026-01-06 19:50:48 |
| | | */ |
| | | @Service |
| | | public class VehicleInformationCollectionReviewServiceImpl extends ServiceImpl<VehicleInformationCollectionReviewMapper, VehicleInformationCollectionReview> |
| | | implements VehicleInformationCollectionReviewService{ |
| | | |
| | | @Override |
| | | public IPage<VehicleInformationCollectionReview> listPage(Page page, VehicleInformationCollectionReview vehicleInformationCollectionReview) { |
| | | return baseMapper.selectPage(page, QueryWrappers.queryWrappers(vehicleInformationCollectionReview)); |
| | | } |
| | | |
| | | @Override |
| | | public long insert(VehicleInformationCollectionReview vehicleInformationCollectionReview) { |
| | | return baseMapper.insert(vehicleInformationCollectionReview); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | # è¯å¯¼-设å¤ç®¡çç³»ç»é¡¹ç®ç¸å
³é
ç½® |
| | | inspur: |
| | | appId: 1205969741508771840 |
| | | appSecret: rnAvMDYwMTIwMjYxNzM0MTc4NDEIxC |
| | | ruoyi: |
| | | # åç§° |
| | | name: RuoYi |
| | | # çæ¬ |
| | | version: 3.8.9 |
| | | # çæå¹´ä»½ |
| | | copyrightYear: 2025 |
| | | # æä»¶è·¯å¾ 示ä¾ï¼ Windowsé
ç½®D:/ruoyi/uploadPathï¼Linuxé
ç½® /home/ruoyi/uploadPathï¼ |
| | | profile: /center-lims/mis/file |
| | | |
| | | # è·åipå°åå¼å
³ |
| | | addressEnabled: false |
| | | # éªè¯ç ç±»å math æ°åè®¡ç® char å符éªè¯ |
| | | captchaType: math |
| | | |
| | | # å¼åç¯å¢é
ç½® |
| | | server: |
| | | # æå¡å¨çHTTP端å£ï¼é»è®¤ä¸º8080 |
| | | port: 7003 |
| | | servlet: |
| | | # åºç¨ç访é®è·¯å¾ |
| | | context-path: / |
| | | tomcat: |
| | | # tomcatçURIç¼ç |
| | | uri-encoding: UTF-8 |
| | | # è¿æ¥æ°æ»¡åçæéæ°ï¼é»è®¤ä¸º100 |
| | | accept-count: 1000 |
| | | threads: |
| | | # tomcatæå¤§çº¿ç¨æ°ï¼é»è®¤ä¸º200 |
| | | max: 800 |
| | | # Tomcatå¯å¨åå§åççº¿ç¨æ°ï¼é»è®¤å¼10 |
| | | min-spare: 100 |
| | | |
| | | # æ¥å¿é
ç½® |
| | | logging: |
| | | level: |
| | | com.ruoyi: warn |
| | | org.springframework: warn |
| | | |
| | | minio: |
| | | endpoint: http://114.132.189.42/ |
| | | port: 7019 |
| | | secure: false |
| | | accessKey: admin |
| | | secretKey: 12345678 |
| | | preview-expiry: 24 # é¢è§å°åé»è®¤24å°æ¶ |
| | | default-bucket: uploadPath |
| | | # ç¨æ·é
ç½® |
| | | user: |
| | | password: |
| | | # å¯ç æå¤§éè¯¯æ¬¡æ° |
| | | maxRetryCount: 5 |
| | | # å¯ç é宿¶é´ï¼é»è®¤10åéï¼ |
| | | lockTime: 10 |
| | | |
| | | # Springé
ç½® |
| | | spring: |
| | | datasource: |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | driverClassName: com.mysql.cj.jdbc.Driver |
| | | druid: |
| | | # ä¸»åºæ°æ®æº |
| | | master: |
| | | url: jdbc:mysql://127.0.0.1:3306/mis-ruoyi?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | username: root |
| | | password: zttZTT123! |
| | | # ä»åºæ°æ®æº |
| | | slave: |
| | | # 仿°æ®æºå¼å
³/é»è®¤å
³é |
| | | enabled: false |
| | | url: |
| | | username: |
| | | password: |
| | | # åå§è¿æ¥æ° |
| | | initialSize: 5 |
| | | # æå°è¿æ¥æ± æ°é |
| | | minIdle: 10 |
| | | # æå¤§è¿æ¥æ± æ°é |
| | | maxActive: 20 |
| | | # é
ç½®è·åè¿æ¥çå¾
è¶
æ¶çæ¶é´ |
| | | maxWait: 60000 |
| | | # é
ç½®è¿æ¥è¶
æ¶æ¶é´ |
| | | connectTimeout: 30000 |
| | | # é
ç½®ç½ç»è¶
æ¶æ¶é´ |
| | | socketTimeout: 60000 |
| | | # é
ç½®é´éå¤ä¹
æè¿è¡ä¸æ¬¡æ£æµï¼æ£æµéè¦å
³éç空é²è¿æ¥ï¼å使¯æ¯«ç§ |
| | | timeBetweenEvictionRunsMillis: 60000 |
| | | # é
ç½®ä¸ä¸ªè¿æ¥å¨æ± 䏿å°çåçæ¶é´ï¼å使¯æ¯«ç§ |
| | | minEvictableIdleTimeMillis: 300000 |
| | | # é
ç½®ä¸ä¸ªè¿æ¥å¨æ± 䏿大çåçæ¶é´ï¼å使¯æ¯«ç§ |
| | | maxEvictableIdleTimeMillis: 900000 |
| | | # é
ç½®æ£æµè¿æ¥æ¯å¦ææ |
| | | validationQuery: SELECT 1 FROM DUAL |
| | | testWhileIdle: true |
| | | testOnBorrow: false |
| | | testOnReturn: false |
| | | webStatFilter: |
| | | enabled: true |
| | | statViewServlet: |
| | | enabled: true |
| | | # 设置ç½ååï¼ä¸å¡«åå
许ææè®¿é® |
| | | allow: |
| | | url-pattern: /druid/* |
| | | # æ§å¶å°ç®¡çç¨æ·ååå¯ç |
| | | login-username: ruoyi |
| | | login-password: 123456 |
| | | filter: |
| | | stat: |
| | | enabled: true |
| | | # æ
¢SQLè®°å½ |
| | | log-slow-sql: true |
| | | slow-sql-millis: 1000 |
| | | merge-sql: true |
| | | wall: |
| | | config: |
| | | multi-statement-allow: true |
| | | # èµæºä¿¡æ¯ |
| | | messages: |
| | | # å½é
åèµæºæä»¶è·¯å¾ |
| | | basename: i18n/messages |
| | | # æä»¶ä¸ä¼ |
| | | servlet: |
| | | multipart: |
| | | # å个æä»¶å¤§å° |
| | | max-file-size: 1GB |
| | | # 设置æ»ä¸ä¼ çæä»¶å¤§å° |
| | | max-request-size: 2GB |
| | | # æå¡æ¨¡å |
| | | devtools: |
| | | restart: |
| | | # çé¨ç½²å¼å
³ |
| | | enabled: false |
| | | # redis é
ç½® |
| | | redis: |
| | | # å°å |
| | | host: 127.0.0.1 |
| | | # host: 172.17.0.1 |
| | | # 端å£ï¼é»è®¤ä¸º6379 |
| | | port: 6379 |
| | | # æ°æ®åºç´¢å¼ |
| | | database: 0 |
| | | # å¯ç |
| | | password: zttZTT123! |
| | | # password: 123456 |
| | | |
| | | # è¿æ¥è¶
æ¶æ¶é´ |
| | | timeout: 10s |
| | | lettuce: |
| | | pool: |
| | | # è¿æ¥æ± ä¸çæå°ç©ºé²è¿æ¥ |
| | | min-idle: 0 |
| | | # è¿æ¥æ± ä¸çæå¤§ç©ºé²è¿æ¥ |
| | | max-idle: 8 |
| | | # è¿æ¥æ± çæå¤§æ°æ®åºè¿æ¥æ° |
| | | max-active: 8 |
| | | # #è¿æ¥æ± æå¤§é»å¡çå¾
æ¶é´ï¼ä½¿ç¨è´å¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-wait: -1ms |
| | | |
| | | # tokené
ç½® |
| | | token: |
| | | # 令çèªå®ä¹æ è¯ |
| | | header: Authorization |
| | | # 令çå¯é¥ |
| | | secret: abcdefghijklmnopqrstuvwxyz |
| | | # ä»¤çæææï¼é»è®¤30åéï¼ |
| | | expireTime: 450 |
| | | |
| | | # MyBatis Plusé
ç½® |
| | | mybatis-plus: |
| | | # æç´¢æå®å
å«å æ ¹æ®èªå·±çé¡¹ç®æ¥ |
| | | typeAliasesPackage: com.ruoyi.**.pojo |
| | | # é
ç½®mapperçæ«æï¼æ¾å°ææçmapper.xmlæ å°æä»¶ |
| | | mapperLocations: classpath*:mapper/**/*Mapper.xml |
| | | # å è½½å
¨å±çé
ç½®æä»¶ |
| | | configLocation: classpath:mybatis/mybatis-config.xml |
| | | global-config: |
| | | enable-sql-runner: true |
| | | db-config: |
| | | id-type: auto |
| | | |
| | | # PageHelperå页æä»¶ |
| | | pagehelper: |
| | | helperDialect: mysql |
| | | supportMethodsArguments: true |
| | | params: count=countSql |
| | | |
| | | # Swaggeré
ç½® |
| | | swagger: |
| | | # æ¯å¦å¼å¯swagger |
| | | enabled: false |
| | | # 请æ±åç¼ |
| | | pathMapping: /dev-api |
| | | |
| | | # 鲿¢XSSæ»å» |
| | | xss: |
| | | # è¿æ»¤å¼å
³ |
| | | enabled: true |
| | | # æé¤é¾æ¥ï¼å¤ä¸ªç¨éå·åéï¼ |
| | | excludes: /system/notice |
| | | # å¹é
龿¥ |
| | | urlPatterns: /system/*,/monitor/*,/tool/* |
| | | |
| | | # 代ç çæ |
| | | gen: |
| | | # ä½è
|
| | | author: ruoyi |
| | | # é»è®¤çæå
è·¯å¾ system éæ¹æèªå·±ç模ååç§° å¦ system monitor tool |
| | | packageName: com.ruoyi.project.system |
| | | # èªå¨å»é¤è¡¨åç¼ï¼é»è®¤æ¯true |
| | | autoRemovePre: false |
| | | # 表åç¼ï¼çæç±»åä¸ä¼å
å«è¡¨åç¼ï¼å¤ä¸ªç¨éå·åéï¼ |
| | | tablePrefix: sys_ |
| | | # æ¯å¦å
è®¸çææä»¶è¦çå°æ¬å°ï¼èªå®ä¹è·¯å¾ï¼ï¼é»è®¤ä¸å
许 |
| | | allowOverwrite: false |
| | | |
| | | file: |
| | | temp-dir: /center-lims/mis/file/temp/uploads |
| | | upload-dir: /center-lims/mis/file/prod/uploads |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | # è¯å¯¼-ç产管æ§ç³»ç»é¡¹ç®ç¸å
³é
ç½® |
| | | inspur: |
| | | appId: 1205970458172719104 |
| | | appSecret: GFHKMDYwMTIwMjYxNzM3MDg3MDc0g1 |
| | | ruoyi: |
| | | # åç§° |
| | | name: RuoYi |
| | | # çæ¬ |
| | | version: 3.8.9 |
| | | # çæå¹´ä»½ |
| | | copyrightYear: 2025 |
| | | # æä»¶è·¯å¾ 示ä¾ï¼ Windowsé
ç½®D:/ruoyi/uploadPathï¼Linuxé
ç½® /home/ruoyi/uploadPathï¼ |
| | | profile: /center-lims/mis/file |
| | | |
| | | # è·åipå°åå¼å
³ |
| | | addressEnabled: false |
| | | # éªè¯ç ç±»å math æ°åè®¡ç® char å符éªè¯ |
| | | captchaType: math |
| | | |
| | | # å¼åç¯å¢é
ç½® |
| | | server: |
| | | # æå¡å¨çHTTP端å£ï¼é»è®¤ä¸º8080 |
| | | port: 7003 |
| | | servlet: |
| | | # åºç¨ç访é®è·¯å¾ |
| | | context-path: / |
| | | tomcat: |
| | | # tomcatçURIç¼ç |
| | | uri-encoding: UTF-8 |
| | | # è¿æ¥æ°æ»¡åçæéæ°ï¼é»è®¤ä¸º100 |
| | | accept-count: 1000 |
| | | threads: |
| | | # tomcatæå¤§çº¿ç¨æ°ï¼é»è®¤ä¸º200 |
| | | max: 800 |
| | | # Tomcatå¯å¨åå§åççº¿ç¨æ°ï¼é»è®¤å¼10 |
| | | min-spare: 100 |
| | | |
| | | # æ¥å¿é
ç½® |
| | | logging: |
| | | level: |
| | | com.ruoyi: warn |
| | | org.springframework: warn |
| | | |
| | | minio: |
| | | endpoint: http://114.132.189.42/ |
| | | port: 7019 |
| | | secure: false |
| | | accessKey: admin |
| | | secretKey: 12345678 |
| | | preview-expiry: 24 # é¢è§å°åé»è®¤24å°æ¶ |
| | | default-bucket: uploadPath |
| | | # ç¨æ·é
ç½® |
| | | user: |
| | | password: |
| | | # å¯ç æå¤§éè¯¯æ¬¡æ° |
| | | maxRetryCount: 5 |
| | | # å¯ç é宿¶é´ï¼é»è®¤10åéï¼ |
| | | lockTime: 10 |
| | | |
| | | # Springé
ç½® |
| | | spring: |
| | | datasource: |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | driverClassName: com.mysql.cj.jdbc.Driver |
| | | druid: |
| | | # ä¸»åºæ°æ®æº |
| | | master: |
| | | url: jdbc:mysql://127.0.0.1:3306/mis-ruoyi?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | username: root |
| | | password: zttZTT123! |
| | | # ä»åºæ°æ®æº |
| | | slave: |
| | | # 仿°æ®æºå¼å
³/é»è®¤å
³é |
| | | enabled: false |
| | | url: |
| | | username: |
| | | password: |
| | | # åå§è¿æ¥æ° |
| | | initialSize: 5 |
| | | # æå°è¿æ¥æ± æ°é |
| | | minIdle: 10 |
| | | # æå¤§è¿æ¥æ± æ°é |
| | | maxActive: 20 |
| | | # é
ç½®è·åè¿æ¥çå¾
è¶
æ¶çæ¶é´ |
| | | maxWait: 60000 |
| | | # é
ç½®è¿æ¥è¶
æ¶æ¶é´ |
| | | connectTimeout: 30000 |
| | | # é
ç½®ç½ç»è¶
æ¶æ¶é´ |
| | | socketTimeout: 60000 |
| | | # é
ç½®é´éå¤ä¹
æè¿è¡ä¸æ¬¡æ£æµï¼æ£æµéè¦å
³éç空é²è¿æ¥ï¼å使¯æ¯«ç§ |
| | | timeBetweenEvictionRunsMillis: 60000 |
| | | # é
ç½®ä¸ä¸ªè¿æ¥å¨æ± 䏿å°çåçæ¶é´ï¼å使¯æ¯«ç§ |
| | | minEvictableIdleTimeMillis: 300000 |
| | | # é
ç½®ä¸ä¸ªè¿æ¥å¨æ± 䏿大çåçæ¶é´ï¼å使¯æ¯«ç§ |
| | | maxEvictableIdleTimeMillis: 900000 |
| | | # é
ç½®æ£æµè¿æ¥æ¯å¦ææ |
| | | validationQuery: SELECT 1 FROM DUAL |
| | | testWhileIdle: true |
| | | testOnBorrow: false |
| | | testOnReturn: false |
| | | webStatFilter: |
| | | enabled: true |
| | | statViewServlet: |
| | | enabled: true |
| | | # 设置ç½ååï¼ä¸å¡«åå
许ææè®¿é® |
| | | allow: |
| | | url-pattern: /druid/* |
| | | # æ§å¶å°ç®¡çç¨æ·ååå¯ç |
| | | login-username: ruoyi |
| | | login-password: 123456 |
| | | filter: |
| | | stat: |
| | | enabled: true |
| | | # æ
¢SQLè®°å½ |
| | | log-slow-sql: true |
| | | slow-sql-millis: 1000 |
| | | merge-sql: true |
| | | wall: |
| | | config: |
| | | multi-statement-allow: true |
| | | # èµæºä¿¡æ¯ |
| | | messages: |
| | | # å½é
åèµæºæä»¶è·¯å¾ |
| | | basename: i18n/messages |
| | | # æä»¶ä¸ä¼ |
| | | servlet: |
| | | multipart: |
| | | # å个æä»¶å¤§å° |
| | | max-file-size: 1GB |
| | | # 设置æ»ä¸ä¼ çæä»¶å¤§å° |
| | | max-request-size: 2GB |
| | | # æå¡æ¨¡å |
| | | devtools: |
| | | restart: |
| | | # çé¨ç½²å¼å
³ |
| | | enabled: false |
| | | # redis é
ç½® |
| | | redis: |
| | | # å°å |
| | | host: 127.0.0.1 |
| | | # host: 172.17.0.1 |
| | | # 端å£ï¼é»è®¤ä¸º6379 |
| | | port: 6379 |
| | | # æ°æ®åºç´¢å¼ |
| | | database: 0 |
| | | # å¯ç |
| | | password: zttZTT123! |
| | | # password: 123456 |
| | | |
| | | # è¿æ¥è¶
æ¶æ¶é´ |
| | | timeout: 10s |
| | | lettuce: |
| | | pool: |
| | | # è¿æ¥æ± ä¸çæå°ç©ºé²è¿æ¥ |
| | | min-idle: 0 |
| | | # è¿æ¥æ± ä¸çæå¤§ç©ºé²è¿æ¥ |
| | | max-idle: 8 |
| | | # è¿æ¥æ± çæå¤§æ°æ®åºè¿æ¥æ° |
| | | max-active: 8 |
| | | # #è¿æ¥æ± æå¤§é»å¡çå¾
æ¶é´ï¼ä½¿ç¨è´å¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-wait: -1ms |
| | | |
| | | # tokené
ç½® |
| | | token: |
| | | # 令çèªå®ä¹æ è¯ |
| | | header: Authorization |
| | | # 令çå¯é¥ |
| | | secret: abcdefghijklmnopqrstuvwxyz |
| | | # ä»¤çæææï¼é»è®¤30åéï¼ |
| | | expireTime: 450 |
| | | |
| | | # MyBatis Plusé
ç½® |
| | | mybatis-plus: |
| | | # æç´¢æå®å
å«å æ ¹æ®èªå·±çé¡¹ç®æ¥ |
| | | typeAliasesPackage: com.ruoyi.**.pojo |
| | | # é
ç½®mapperçæ«æï¼æ¾å°ææçmapper.xmlæ å°æä»¶ |
| | | mapperLocations: classpath*:mapper/**/*Mapper.xml |
| | | # å è½½å
¨å±çé
ç½®æä»¶ |
| | | configLocation: classpath:mybatis/mybatis-config.xml |
| | | global-config: |
| | | enable-sql-runner: true |
| | | db-config: |
| | | id-type: auto |
| | | |
| | | # PageHelperå页æä»¶ |
| | | pagehelper: |
| | | helperDialect: mysql |
| | | supportMethodsArguments: true |
| | | params: count=countSql |
| | | |
| | | # Swaggeré
ç½® |
| | | swagger: |
| | | # æ¯å¦å¼å¯swagger |
| | | enabled: false |
| | | # 请æ±åç¼ |
| | | pathMapping: /dev-api |
| | | |
| | | # 鲿¢XSSæ»å» |
| | | xss: |
| | | # è¿æ»¤å¼å
³ |
| | | enabled: true |
| | | # æé¤é¾æ¥ï¼å¤ä¸ªç¨éå·åéï¼ |
| | | excludes: /system/notice |
| | | # å¹é
龿¥ |
| | | urlPatterns: /system/*,/monitor/*,/tool/* |
| | | |
| | | # 代ç çæ |
| | | gen: |
| | | # ä½è
|
| | | author: ruoyi |
| | | # é»è®¤çæå
è·¯å¾ system éæ¹æèªå·±ç模ååç§° å¦ system monitor tool |
| | | packageName: com.ruoyi.project.system |
| | | # èªå¨å»é¤è¡¨åç¼ï¼é»è®¤æ¯true |
| | | autoRemovePre: false |
| | | # 表åç¼ï¼çæç±»åä¸ä¼å
å«è¡¨åç¼ï¼å¤ä¸ªç¨éå·åéï¼ |
| | | tablePrefix: sys_ |
| | | # æ¯å¦å
è®¸çææä»¶è¦çå°æ¬å°ï¼èªå®ä¹è·¯å¾ï¼ï¼é»è®¤ä¸å
许 |
| | | allowOverwrite: false |
| | | |
| | | file: |
| | | temp-dir: /center-lims/mis/file/temp/uploads |
| | | upload-dir: /center-lims/mis/file/prod/uploads |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | # è¯å¯¼-åååå
¬ç³»ç»é¡¹ç®ç¸å
³é
ç½® |
| | | inspur: |
| | | appId: 1205970862683979776 |
| | | appSecret: 9UR1MDYwMTIwMjYxNzM4NDUxNTARkN |
| | | ruoyi: |
| | | # åç§° |
| | | name: RuoYi |
| | | # çæ¬ |
| | | version: 3.8.9 |
| | | # çæå¹´ä»½ |
| | | copyrightYear: 2025 |
| | | # æä»¶è·¯å¾ 示ä¾ï¼ Windowsé
ç½®D:/ruoyi/uploadPathï¼Linuxé
ç½® /home/ruoyi/uploadPathï¼ |
| | | profile: /center-lims/mis/file |
| | | |
| | | # è·åipå°åå¼å
³ |
| | | addressEnabled: false |
| | | # éªè¯ç ç±»å math æ°åè®¡ç® char å符éªè¯ |
| | | captchaType: math |
| | | |
| | | # å¼åç¯å¢é
ç½® |
| | | server: |
| | | # æå¡å¨çHTTP端å£ï¼é»è®¤ä¸º8080 |
| | | port: 7003 |
| | | servlet: |
| | | # åºç¨ç访é®è·¯å¾ |
| | | context-path: / |
| | | tomcat: |
| | | # tomcatçURIç¼ç |
| | | uri-encoding: UTF-8 |
| | | # è¿æ¥æ°æ»¡åçæéæ°ï¼é»è®¤ä¸º100 |
| | | accept-count: 1000 |
| | | threads: |
| | | # tomcatæå¤§çº¿ç¨æ°ï¼é»è®¤ä¸º200 |
| | | max: 800 |
| | | # Tomcatå¯å¨åå§åççº¿ç¨æ°ï¼é»è®¤å¼10 |
| | | min-spare: 100 |
| | | |
| | | # æ¥å¿é
ç½® |
| | | logging: |
| | | level: |
| | | com.ruoyi: warn |
| | | org.springframework: warn |
| | | |
| | | minio: |
| | | endpoint: http://114.132.189.42/ |
| | | port: 7019 |
| | | secure: false |
| | | accessKey: admin |
| | | secretKey: 12345678 |
| | | preview-expiry: 24 # é¢è§å°åé»è®¤24å°æ¶ |
| | | default-bucket: uploadPath |
| | | # ç¨æ·é
ç½® |
| | | user: |
| | | password: |
| | | # å¯ç æå¤§éè¯¯æ¬¡æ° |
| | | maxRetryCount: 5 |
| | | # å¯ç é宿¶é´ï¼é»è®¤10åéï¼ |
| | | lockTime: 10 |
| | | |
| | | # Springé
ç½® |
| | | spring: |
| | | datasource: |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | driverClassName: com.mysql.cj.jdbc.Driver |
| | | druid: |
| | | # ä¸»åºæ°æ®æº |
| | | master: |
| | | url: jdbc:mysql://127.0.0.1:3306/mis-ruoyi?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | username: root |
| | | password: zttZTT123! |
| | | # ä»åºæ°æ®æº |
| | | slave: |
| | | # 仿°æ®æºå¼å
³/é»è®¤å
³é |
| | | enabled: false |
| | | url: |
| | | username: |
| | | password: |
| | | # åå§è¿æ¥æ° |
| | | initialSize: 5 |
| | | # æå°è¿æ¥æ± æ°é |
| | | minIdle: 10 |
| | | # æå¤§è¿æ¥æ± æ°é |
| | | maxActive: 20 |
| | | # é
ç½®è·åè¿æ¥çå¾
è¶
æ¶çæ¶é´ |
| | | maxWait: 60000 |
| | | # é
ç½®è¿æ¥è¶
æ¶æ¶é´ |
| | | connectTimeout: 30000 |
| | | # é
ç½®ç½ç»è¶
æ¶æ¶é´ |
| | | socketTimeout: 60000 |
| | | # é
ç½®é´éå¤ä¹
æè¿è¡ä¸æ¬¡æ£æµï¼æ£æµéè¦å
³éç空é²è¿æ¥ï¼å使¯æ¯«ç§ |
| | | timeBetweenEvictionRunsMillis: 60000 |
| | | # é
ç½®ä¸ä¸ªè¿æ¥å¨æ± 䏿å°çåçæ¶é´ï¼å使¯æ¯«ç§ |
| | | minEvictableIdleTimeMillis: 300000 |
| | | # é
ç½®ä¸ä¸ªè¿æ¥å¨æ± 䏿大çåçæ¶é´ï¼å使¯æ¯«ç§ |
| | | maxEvictableIdleTimeMillis: 900000 |
| | | # é
ç½®æ£æµè¿æ¥æ¯å¦ææ |
| | | validationQuery: SELECT 1 FROM DUAL |
| | | testWhileIdle: true |
| | | testOnBorrow: false |
| | | testOnReturn: false |
| | | webStatFilter: |
| | | enabled: true |
| | | statViewServlet: |
| | | enabled: true |
| | | # 设置ç½ååï¼ä¸å¡«åå
许ææè®¿é® |
| | | allow: |
| | | url-pattern: /druid/* |
| | | # æ§å¶å°ç®¡çç¨æ·ååå¯ç |
| | | login-username: ruoyi |
| | | login-password: 123456 |
| | | filter: |
| | | stat: |
| | | enabled: true |
| | | # æ
¢SQLè®°å½ |
| | | log-slow-sql: true |
| | | slow-sql-millis: 1000 |
| | | merge-sql: true |
| | | wall: |
| | | config: |
| | | multi-statement-allow: true |
| | | # èµæºä¿¡æ¯ |
| | | messages: |
| | | # å½é
åèµæºæä»¶è·¯å¾ |
| | | basename: i18n/messages |
| | | # æä»¶ä¸ä¼ |
| | | servlet: |
| | | multipart: |
| | | # å个æä»¶å¤§å° |
| | | max-file-size: 1GB |
| | | # 设置æ»ä¸ä¼ çæä»¶å¤§å° |
| | | max-request-size: 2GB |
| | | # æå¡æ¨¡å |
| | | devtools: |
| | | restart: |
| | | # çé¨ç½²å¼å
³ |
| | | enabled: false |
| | | # redis é
ç½® |
| | | redis: |
| | | # å°å |
| | | host: 127.0.0.1 |
| | | # host: 172.17.0.1 |
| | | # 端å£ï¼é»è®¤ä¸º6379 |
| | | port: 6379 |
| | | # æ°æ®åºç´¢å¼ |
| | | database: 0 |
| | | # å¯ç |
| | | password: zttZTT123! |
| | | # password: 123456 |
| | | |
| | | # è¿æ¥è¶
æ¶æ¶é´ |
| | | timeout: 10s |
| | | lettuce: |
| | | pool: |
| | | # è¿æ¥æ± ä¸çæå°ç©ºé²è¿æ¥ |
| | | min-idle: 0 |
| | | # è¿æ¥æ± ä¸çæå¤§ç©ºé²è¿æ¥ |
| | | max-idle: 8 |
| | | # è¿æ¥æ± çæå¤§æ°æ®åºè¿æ¥æ° |
| | | max-active: 8 |
| | | # #è¿æ¥æ± æå¤§é»å¡çå¾
æ¶é´ï¼ä½¿ç¨è´å¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-wait: -1ms |
| | | |
| | | # tokené
ç½® |
| | | token: |
| | | # 令çèªå®ä¹æ è¯ |
| | | header: Authorization |
| | | # 令çå¯é¥ |
| | | secret: abcdefghijklmnopqrstuvwxyz |
| | | # ä»¤çæææï¼é»è®¤30åéï¼ |
| | | expireTime: 450 |
| | | |
| | | # MyBatis Plusé
ç½® |
| | | mybatis-plus: |
| | | # æç´¢æå®å
å«å æ ¹æ®èªå·±çé¡¹ç®æ¥ |
| | | typeAliasesPackage: com.ruoyi.**.pojo |
| | | # é
ç½®mapperçæ«æï¼æ¾å°ææçmapper.xmlæ å°æä»¶ |
| | | mapperLocations: classpath*:mapper/**/*Mapper.xml |
| | | # å è½½å
¨å±çé
ç½®æä»¶ |
| | | configLocation: classpath:mybatis/mybatis-config.xml |
| | | global-config: |
| | | enable-sql-runner: true |
| | | db-config: |
| | | id-type: auto |
| | | |
| | | # PageHelperå页æä»¶ |
| | | pagehelper: |
| | | helperDialect: mysql |
| | | supportMethodsArguments: true |
| | | params: count=countSql |
| | | |
| | | # Swaggeré
ç½® |
| | | swagger: |
| | | # æ¯å¦å¼å¯swagger |
| | | enabled: false |
| | | # 请æ±åç¼ |
| | | pathMapping: /dev-api |
| | | |
| | | # 鲿¢XSSæ»å» |
| | | xss: |
| | | # è¿æ»¤å¼å
³ |
| | | enabled: true |
| | | # æé¤é¾æ¥ï¼å¤ä¸ªç¨éå·åéï¼ |
| | | excludes: /system/notice |
| | | # å¹é
龿¥ |
| | | urlPatterns: /system/*,/monitor/*,/tool/* |
| | | |
| | | # 代ç çæ |
| | | gen: |
| | | # ä½è
|
| | | author: ruoyi |
| | | # é»è®¤çæå
è·¯å¾ system éæ¹æèªå·±ç模ååç§° å¦ system monitor tool |
| | | packageName: com.ruoyi.project.system |
| | | # èªå¨å»é¤è¡¨åç¼ï¼é»è®¤æ¯true |
| | | autoRemovePre: false |
| | | # 表åç¼ï¼çæç±»åä¸ä¼å
å«è¡¨åç¼ï¼å¤ä¸ªç¨éå·åéï¼ |
| | | tablePrefix: sys_ |
| | | # æ¯å¦å
è®¸çææä»¶è¦çå°æ¬å°ï¼èªå®ä¹è·¯å¾ï¼ï¼é»è®¤ä¸å
许 |
| | | allowOverwrite: false |
| | | |
| | | file: |
| | | temp-dir: /center-lims/mis/file/temp/uploads |
| | | upload-dir: /center-lims/mis/file/prod/uploads |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | # è¯å¯¼-è¥é管çç³»ç»é¡¹ç®ç¸å
³é
ç½® |
| | | inspur: |
| | | appId: 1205972006802030592 |
| | | appSecret: BgpqMDYwMTIwMjYxNzQzMTc5MjkKou |
| | | ruoyi: |
| | | # åç§° |
| | | name: RuoYi |
| | | # çæ¬ |
| | | version: 3.8.9 |
| | | # çæå¹´ä»½ |
| | | copyrightYear: 2025 |
| | | # æä»¶è·¯å¾ 示ä¾ï¼ Windowsé
ç½®D:/ruoyi/uploadPathï¼Linuxé
ç½® /home/ruoyi/uploadPathï¼ |
| | | profile: /center-lims/mis/file |
| | | |
| | | # è·åipå°åå¼å
³ |
| | | addressEnabled: false |
| | | # éªè¯ç ç±»å math æ°åè®¡ç® char å符éªè¯ |
| | | captchaType: math |
| | | |
| | | # å¼åç¯å¢é
ç½® |
| | | server: |
| | | # æå¡å¨çHTTP端å£ï¼é»è®¤ä¸º8080 |
| | | port: 7003 |
| | | servlet: |
| | | # åºç¨ç访é®è·¯å¾ |
| | | context-path: / |
| | | tomcat: |
| | | # tomcatçURIç¼ç |
| | | uri-encoding: UTF-8 |
| | | # è¿æ¥æ°æ»¡åçæéæ°ï¼é»è®¤ä¸º100 |
| | | accept-count: 1000 |
| | | threads: |
| | | # tomcatæå¤§çº¿ç¨æ°ï¼é»è®¤ä¸º200 |
| | | max: 800 |
| | | # Tomcatå¯å¨åå§åççº¿ç¨æ°ï¼é»è®¤å¼10 |
| | | min-spare: 100 |
| | | |
| | | # æ¥å¿é
ç½® |
| | | logging: |
| | | level: |
| | | com.ruoyi: warn |
| | | org.springframework: warn |
| | | |
| | | minio: |
| | | endpoint: http://114.132.189.42/ |
| | | port: 7019 |
| | | secure: false |
| | | accessKey: admin |
| | | secretKey: 12345678 |
| | | preview-expiry: 24 # é¢è§å°åé»è®¤24å°æ¶ |
| | | default-bucket: uploadPath |
| | | # ç¨æ·é
ç½® |
| | | user: |
| | | password: |
| | | # å¯ç æå¤§éè¯¯æ¬¡æ° |
| | | maxRetryCount: 5 |
| | | # å¯ç é宿¶é´ï¼é»è®¤10åéï¼ |
| | | lockTime: 10 |
| | | |
| | | # Springé
ç½® |
| | | spring: |
| | | datasource: |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | driverClassName: com.mysql.cj.jdbc.Driver |
| | | druid: |
| | | # ä¸»åºæ°æ®æº |
| | | master: |
| | | url: jdbc:mysql://172.17.0.1:3306/mis-ruoyi?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | username: root |
| | | password: zttZTT123! |
| | | # ä»åºæ°æ®æº |
| | | slave: |
| | | # 仿°æ®æºå¼å
³/é»è®¤å
³é |
| | | enabled: false |
| | | url: |
| | | username: |
| | | password: |
| | | # åå§è¿æ¥æ° |
| | | initialSize: 5 |
| | | # æå°è¿æ¥æ± æ°é |
| | | minIdle: 10 |
| | | # æå¤§è¿æ¥æ± æ°é |
| | | maxActive: 20 |
| | | # é
ç½®è·åè¿æ¥çå¾
è¶
æ¶çæ¶é´ |
| | | maxWait: 60000 |
| | | # é
ç½®è¿æ¥è¶
æ¶æ¶é´ |
| | | connectTimeout: 30000 |
| | | # é
ç½®ç½ç»è¶
æ¶æ¶é´ |
| | | socketTimeout: 60000 |
| | | # é
ç½®é´éå¤ä¹
æè¿è¡ä¸æ¬¡æ£æµï¼æ£æµéè¦å
³éç空é²è¿æ¥ï¼å使¯æ¯«ç§ |
| | | timeBetweenEvictionRunsMillis: 60000 |
| | | # é
ç½®ä¸ä¸ªè¿æ¥å¨æ± 䏿å°çåçæ¶é´ï¼å使¯æ¯«ç§ |
| | | minEvictableIdleTimeMillis: 300000 |
| | | # é
ç½®ä¸ä¸ªè¿æ¥å¨æ± 䏿大çåçæ¶é´ï¼å使¯æ¯«ç§ |
| | | maxEvictableIdleTimeMillis: 900000 |
| | | # é
ç½®æ£æµè¿æ¥æ¯å¦ææ |
| | | validationQuery: SELECT 1 FROM DUAL |
| | | testWhileIdle: true |
| | | testOnBorrow: false |
| | | testOnReturn: false |
| | | webStatFilter: |
| | | enabled: true |
| | | statViewServlet: |
| | | enabled: true |
| | | # 设置ç½ååï¼ä¸å¡«åå
许ææè®¿é® |
| | | allow: |
| | | url-pattern: /druid/* |
| | | # æ§å¶å°ç®¡çç¨æ·ååå¯ç |
| | | login-username: ruoyi |
| | | login-password: 123456 |
| | | filter: |
| | | stat: |
| | | enabled: true |
| | | # æ
¢SQLè®°å½ |
| | | log-slow-sql: true |
| | | slow-sql-millis: 1000 |
| | | merge-sql: true |
| | | wall: |
| | | config: |
| | | multi-statement-allow: true |
| | | # èµæºä¿¡æ¯ |
| | | messages: |
| | | # å½é
åèµæºæä»¶è·¯å¾ |
| | | basename: i18n/messages |
| | | # æä»¶ä¸ä¼ |
| | | servlet: |
| | | multipart: |
| | | # å个æä»¶å¤§å° |
| | | max-file-size: 1GB |
| | | # 设置æ»ä¸ä¼ çæä»¶å¤§å° |
| | | max-request-size: 2GB |
| | | # æå¡æ¨¡å |
| | | devtools: |
| | | restart: |
| | | # çé¨ç½²å¼å
³ |
| | | enabled: false |
| | | # redis é
ç½® |
| | | redis: |
| | | # å°å |
| | | # host: 127.0.0.1 |
| | | host: 172.17.0.1 |
| | | # 端å£ï¼é»è®¤ä¸º6379 |
| | | port: 6379 |
| | | # æ°æ®åºç´¢å¼ |
| | | database: 0 |
| | | # å¯ç |
| | | password: zttZTT123! |
| | | # password: 123456 |
| | | |
| | | # è¿æ¥è¶
æ¶æ¶é´ |
| | | timeout: 10s |
| | | lettuce: |
| | | pool: |
| | | # è¿æ¥æ± ä¸çæå°ç©ºé²è¿æ¥ |
| | | min-idle: 0 |
| | | # è¿æ¥æ± ä¸çæå¤§ç©ºé²è¿æ¥ |
| | | max-idle: 8 |
| | | # è¿æ¥æ± çæå¤§æ°æ®åºè¿æ¥æ° |
| | | max-active: 8 |
| | | # #è¿æ¥æ± æå¤§é»å¡çå¾
æ¶é´ï¼ä½¿ç¨è´å¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-wait: -1ms |
| | | |
| | | # tokené
ç½® |
| | | token: |
| | | # 令çèªå®ä¹æ è¯ |
| | | header: Authorization |
| | | # 令çå¯é¥ |
| | | secret: abcdefghijklmnopqrstuvwxyz |
| | | # ä»¤çæææï¼é»è®¤30åéï¼ |
| | | expireTime: 450 |
| | | |
| | | # MyBatis Plusé
ç½® |
| | | mybatis-plus: |
| | | # æç´¢æå®å
å«å æ ¹æ®èªå·±çé¡¹ç®æ¥ |
| | | typeAliasesPackage: com.ruoyi.**.pojo |
| | | # é
ç½®mapperçæ«æï¼æ¾å°ææçmapper.xmlæ å°æä»¶ |
| | | mapperLocations: classpath*:mapper/**/*Mapper.xml |
| | | # å è½½å
¨å±çé
ç½®æä»¶ |
| | | configLocation: classpath:mybatis/mybatis-config.xml |
| | | global-config: |
| | | enable-sql-runner: true |
| | | db-config: |
| | | id-type: auto |
| | | |
| | | # PageHelperå页æä»¶ |
| | | pagehelper: |
| | | helperDialect: mysql |
| | | supportMethodsArguments: true |
| | | params: count=countSql |
| | | |
| | | # Swaggeré
ç½® |
| | | swagger: |
| | | # æ¯å¦å¼å¯swagger |
| | | enabled: false |
| | | # 请æ±åç¼ |
| | | pathMapping: /dev-api |
| | | |
| | | # 鲿¢XSSæ»å» |
| | | xss: |
| | | # è¿æ»¤å¼å
³ |
| | | enabled: true |
| | | # æé¤é¾æ¥ï¼å¤ä¸ªç¨éå·åéï¼ |
| | | excludes: /system/notice |
| | | # å¹é
龿¥ |
| | | urlPatterns: /system/*,/monitor/*,/tool/* |
| | | |
| | | # 代ç çæ |
| | | gen: |
| | | # ä½è
|
| | | author: ruoyi |
| | | # é»è®¤çæå
è·¯å¾ system éæ¹æèªå·±ç模ååç§° å¦ system monitor tool |
| | | packageName: com.ruoyi.project.system |
| | | # èªå¨å»é¤è¡¨åç¼ï¼é»è®¤æ¯true |
| | | autoRemovePre: false |
| | | # 表åç¼ï¼çæç±»åä¸ä¼å
å«è¡¨åç¼ï¼å¤ä¸ªç¨éå·åéï¼ |
| | | tablePrefix: sys_ |
| | | # æ¯å¦å
è®¸çææä»¶è¦çå°æ¬å°ï¼èªå®ä¹è·¯å¾ï¼ï¼é»è®¤ä¸å
许 |
| | | allowOverwrite: false |
| | | |
| | | file: |
| | | temp-dir: /center-lims/mis/file/temp/uploads |
| | | upload-dir: /center-lims/mis/file/prod/uploads |
| | |
| | | # Springé
ç½® |
| | | spring: |
| | | profiles: |
| | | active: tide |
| | | active: yxglxt |
| | | #10.136.58.65 è´¢å¡ç®¡çç³»ç» cwglxt |
| | | #10.136.58.66 设å¤ç®¡çç³»ç» sbglxt |
| | | #10.136.58.67 ç产管æ§ç³»ç» scgkxt |
| | | #10.136.58.68 åååå
¬ç³»ç» xtbgxt |
| | | #10.136.58.69 éè´ç®¡çç³»ç» cgglxt |
| | | #10.136.58.70 ä»å¨ç©æµç³»ç» ccwlxt |
| | | #10.136.58.71 è¥é管çç³»ç» yxglxt |
| | | #10.136.58.72 人åèµæºç³»ç» rlzyxt |
| | | #10.136.58.73 ç¯ä¿é¨ç¦ç³»ç» hbmjxt |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.CustomStorageMapper"> |
| | | |
| | | <select id="listPageCopyByCustom" resultType="com.ruoyi.procurementrecord.pojo.CustomStorage"> |
| | | select t1.*, |
| | | sum(t1.tax_inclusive_total_price) as totalPrice, |
| | | sum(t1.inbound_num) as inboundNum, |
| | | sum(t1.inbound_num) as inboundNum0, |
| | | SUM(t1.inbound_num) - COALESCE(SUM(t2.inbound_num), 0) AS availableStock |
| | | from custom_storage t1 |
| | | left join procurement_record_out t2 on t1.id = t2.procurement_record_storage_id and t2.type = 3 |
| | | <where> |
| | | t2.type = 3 |
| | | <if test="req.productCategory != null and req.productCategory != ''"> |
| | | and t1.product_category like concat('%',#{req.productCategory},'%') |
| | | </if> |
| | | <if test="req.supplierName !=null and req.supplierName != ''"> |
| | | and t1.supplier_name like concat('%',#{req.supplierName},'%') |
| | | </if> |
| | | <if test="req.timeStr != null and req.timeStr != ''"> |
| | | and t1.inbound_date like concat('%',#{req.timeStr},'%') |
| | | </if> |
| | | </where> |
| | | group by t1.product_category, t1.specification_model, t1.tax_inclusive_unit_price |
| | | order by t1.inbound_date desc |
| | | </select> |
| | | <select id="listPageByCustom" resultType="com.ruoyi.procurementrecord.pojo.CustomStorage"> |
| | | select t1.*, |
| | | sum(t1.inbound_num) as inboundNum, |
| | | sum(t1.inbound_num) as inboundNum0, |
| | | sum(t1.tax_inclusive_total_price) as taxInclusiveTotalPrice, |
| | | (t1.inbound_num - COALESCE(SUM(t2.inbound_num), 0)) AS availableStock |
| | | from custom_storage t1 |
| | | left join procurement_record_out t2 on t1.id = t2.procurement_record_storage_id |
| | | <where> |
| | | <if test="req.productCategory != null and req.productCategory != ''"> |
| | | and t1.product_category like concat('%',#{req.productCategory},'%') |
| | | </if> |
| | | <if test="req.supplierName !=null and req.supplierName != ''"> |
| | | and t1.supplier_name like concat('%',#{req.supplierName},'%') |
| | | </if> |
| | | <if test="req.timeStr != null and req.timeStr != ''"> |
| | | and t1.inbound_date like concat('%',#{req.timeStr},'%') |
| | | </if> |
| | | </where> |
| | | group by t1.id |
| | | order by t1.inbound_date desc |
| | | </select> |
| | | </mapper> |
| | |
| | | t2.tax_exclusive_total_price, |
| | | t3.inbound_num as quantityStock |
| | | from purchase_ledger t1 |
| | | left join sales_ledger_product t2 on t1.id = t2.sales_ledger_id |
| | | left join sales_ledger_product t2 on t1.id = t2.sales_ledger_id and t2.type = 2 |
| | | left join procurement_record_storage t3 on t2.id = t3.sales_ledger_product_id |
| | | where t1.purchase_contract_number = #{req.purchaseContractNumber} |
| | | <if test="req.id != null and req.id != ''"> |
| | |
| | | t2.tax_inclusive_unit_price, |
| | | (t1.inbound_num * t2.tax_inclusive_unit_price) as taxInclusiveTotalPrice, |
| | | (t1.inbound_num * t2.tax_inclusive_unit_price - t1.inbound_num * t2.tax_inclusive_unit_price * t2.tax_rate / 100) as taxExclusiveTotalPrice, |
| | | t1.unit_price, |
| | | t1.total_price, |
| | | t1.inbound_batches, |
| | | t1.inbound_num, |
| | | t1.inbound_num as inboundNum0, |
| | | t1.create_time, |
| | | t1.update_time, |
| | | t1.create_by, |
| | | t2.warn_num |
| | | t2.warn_num, |
| | | (t1.inbound_num - COALESCE(SUM(t4.inbound_num), 0)) / count(1) AS availableStock |
| | | from procurement_record_storage t1 |
| | | left join sales_ledger_product t2 on t2.id = t1.sales_ledger_product_id |
| | | left join sales_ledger_product t2 on t2.id = t1.sales_ledger_product_id and t2.type = 2 |
| | | left join purchase_ledger t3 on t3.id = t2.sales_ledger_id |
| | | left join procurement_record_out t4 on t1.id = t4.procurement_record_storage_id and t4.type = 1 |
| | | <where> |
| | | 1 = 1 |
| | | t1.type = 1 |
| | | <if test="req.supplierName != null and req.supplierName != ''"> |
| | | and t3.supplier_name like concat('%',#{req.supplierName},'%') |
| | | </if> |
| | | <if test="req.productCategory != null and req.productCategory != ''"> |
| | | and t2.product_category like concat('%',#{req.productCategory},'%') |
| | | </if> |
| | | <if test="req.timeStr != null and req.timeStr != ''"> |
| | | and t1.create_time like concat('%',#{req.timeStr},'%') |
| | | </if> |
| | | </where> |
| | | group by t1.id |
| | | <if test="req.flag != null and req.flag"> |
| | | having availableStock > 0 |
| | | </if> |
| | | order by t1.create_time desc |
| | | </select> |
| | | <select id="list" resultType="com.ruoyi.procurementrecord.dto.ProcurementPageDto"> |
| | | select |
| | |
| | | from procurement_record_storage t1 |
| | | left join sales_ledger_product t2 on t2.id = t1.sales_ledger_product_id |
| | | left join purchase_ledger t3 on t3.id = t2.sales_ledger_id |
| | | where t1.type = 1 |
| | | </select> |
| | | <select id="listOne" resultType="com.ruoyi.procurementrecord.dto.ProcurementPageDto"> |
| | | select |
| | | t3.customer_contract_no, |
| | | t3.sales_contract_no, |
| | | t3.customer_name, |
| | | t2.product_category, |
| | | t1.id, |
| | | t2.specification_model, |
| | | t2.unit, |
| | | t2.quantity, |
| | | t2.quantity as quantity0, |
| | | t2.tax_rate, |
| | | t2.tax_inclusive_unit_price, |
| | | t2.tax_inclusive_total_price, |
| | | t2.tax_exclusive_total_price, |
| | | t1.inbound_batches, |
| | | t1.inbound_num, |
| | | t1.create_time, |
| | | t1.create_time as time, |
| | | t1.create_by |
| | | from procurement_record_storage t1 |
| | | left join sales_ledger_product t2 on t2.id = t1.sales_ledger_product_id |
| | | left join sales_ledger t3 on t3.id = t2.sales_ledger_id |
| | | where t1.type = 2 |
| | | </select> |
| | | <select id="listPageCopy" resultType="com.ruoyi.procurementrecord.dto.ProcurementPageDtoCopy"> |
| | | select |
| | |
| | | t2.tax_inclusive_total_price, |
| | | t2.tax_exclusive_total_price, |
| | | t1.inbound_batches, |
| | | sum(t1.inbound_num) as inboundNum, |
| | | sum(t1.inbound_num) as inboundNum0, |
| | | t1.inbound_num as totalInboundNum, |
| | | t1.unit_price as unitPrice, |
| | | sum(t1.total_price) as totalPrice, |
| | | sum(t1.inbound_num) / COALESCE(count(1), 1) as inboundNum, |
| | | sum(t1.inbound_num) / COALESCE(count(1), 1) as inboundNum0, |
| | | t1.create_time, |
| | | t1.update_time, |
| | | t1.create_by, |
| | | t2.warn_num |
| | | t2.warn_num, |
| | | (SUM(t1.inbound_num) - COALESCE(SUM(t4.inbound_num), 0)) / COALESCE(count(1), 1) AS availableStock |
| | | from procurement_record_storage t1 |
| | | left join sales_ledger_product t2 on t2.id = t1.sales_ledger_product_id |
| | | left join sales_ledger_product t2 on t2.id = t1.sales_ledger_product_id and t2.type = 2 |
| | | left join purchase_ledger t3 on t3.id = t2.sales_ledger_id |
| | | left join procurement_record_out t4 on t1.id = t4.procurement_record_storage_id and t4.type = 1 |
| | | <where> |
| | | 1 = 1 |
| | | t1.type = 1 and t4.type = 1 |
| | | <if test="req.supplierName != null and req.supplierName != ''"> |
| | | and t3.supplier_name like concat('%',#{req.supplierName},'%') |
| | | </if> |
| | | <if test="req.productCategory != null and req.productCategory != ''"> |
| | | and t2.product_category like concat('%',#{req.productCategory},'%') |
| | | </if> |
| | | <if test="req.timeStr != null and req.timeStr != ''"> |
| | | and t1.create_time like concat('%',#{req.timeStr},'%') |
| | |
| | | and t1.create_time <= #{req.endDate} |
| | | </if> |
| | | </where> |
| | | group by t3.supplier_name,t2.product_category,t2.specification_model |
| | | group by t2.product_category,t2.specification_model,t1.unit_price |
| | | having availableStock > 0 |
| | | order by t1.create_time desc |
| | | </select> |
| | | <select id="listCopy" resultType="com.ruoyi.procurementrecord.dto.ProcurementPageDtoCopy"> |
| | | select |
| | |
| | | t1.update_time as uTime, |
| | | t1.create_by |
| | | from procurement_record_storage t1 |
| | | left join sales_ledger_product t2 on t2.id = t1.sales_ledger_product_id |
| | | left join sales_ledger_product t2 on t2.id = t1.sales_ledger_product_id and t2.type = 2 |
| | | left join purchase_ledger t3 on t3.id = t2.sales_ledger_id |
| | | where t1.type = 1 |
| | | group by t3.supplier_name,t2.product_category,t2.specification_model |
| | | </select> |
| | | <select id="listCopyOne" resultType="com.ruoyi.procurementrecord.dto.ProcurementPageDtoCopy"> |
| | | select |
| | | t3.customer_contract_no, |
| | | t3.sales_contract_no, |
| | | t3.customer_name, |
| | | t2.product_category, |
| | | t1.id, |
| | | t1.sales_ledger_product_id, |
| | | t1.create_user, |
| | | t2.specification_model, |
| | | t2.unit, |
| | | t2.tax_rate, |
| | | t2.tax_inclusive_unit_price, |
| | | t2.tax_inclusive_total_price, |
| | | t2.tax_exclusive_total_price, |
| | | t1.inbound_batches, |
| | | t1.inbound_num, |
| | | t1.inbound_num as inboundNum0, |
| | | t1.create_time, |
| | | t1.update_time, |
| | | t1.create_time as cTime, |
| | | t1.update_time as uTime, |
| | | t1.create_by |
| | | from procurement_record_storage t1 |
| | | left join sales_ledger_product t2 on t2.id = t1.sales_ledger_product_id and t2.type = 1 |
| | | left join sales_ledger t3 on t3.id = t2.sales_ledger_id |
| | | where t1.type = 2 |
| | | group by t3.customer_name,t2.product_category,t2.specification_model |
| | | </select> |
| | | <select id="listPageByProduction" resultType="com.ruoyi.procurementrecord.dto.ProcurementPageDto"> |
| | | select |
| | | t3.customer_contract_no, |
| | | t3.sales_contract_no, |
| | | t3.customer_name, |
| | | t2.product_category, |
| | | t1.id, |
| | | t1.sales_ledger_product_id, |
| | | t1.create_user, |
| | | t2.specification_model, |
| | | t2.unit, |
| | | t2.tax_rate, |
| | | t2.tax_inclusive_unit_price, |
| | | (t1.inbound_num * t2.tax_inclusive_unit_price) as taxInclusiveTotalPrice, |
| | | (t1.inbound_num * t2.tax_inclusive_unit_price - t1.inbound_num * t2.tax_inclusive_unit_price * t2.tax_rate / 100) as taxExclusiveTotalPrice, |
| | | t1.unit_price, |
| | | t1.total_price, |
| | | t1.inbound_batches, |
| | | t1.inbound_num, |
| | | t1.inbound_num as inboundNum0, |
| | | t1.create_time, |
| | | t1.update_time, |
| | | t1.create_by, |
| | | t2.warn_num, |
| | | (t1.inbound_num - COALESCE(SUM(t4.inbound_num), 0)) / count(1) AS availableStock |
| | | from procurement_record_storage t1 |
| | | left join sales_ledger_product t2 on t2.id = t1.sales_ledger_product_id and t2.type = 1 |
| | | left join sales_ledger t3 on t3.id = t2.sales_ledger_id |
| | | left join procurement_record_out t4 on t4.procurement_record_storage_id = t1.id and t1.type = 2 |
| | | <where> |
| | | t1.type = 2 |
| | | <if test="req.customerName != null and req.customerName != ''"> |
| | | and t3.customer_name like concat('%',#{req.customerName},'%') |
| | | </if> |
| | | <if test="req.productCategory != null and req.productCategory != ''"> |
| | | and t2.product_category like concat('%',#{req.productCategory},'%') |
| | | </if> |
| | | <if test="req.timeStr != null and req.timeStr != ''"> |
| | | and t1.create_time like concat('%',#{req.timeStr},'%') |
| | | </if> |
| | | </where> |
| | | group by t1.id |
| | | <if test="req.flag != null and req.flag"> |
| | | having availableStock > 0 |
| | | </if> |
| | | order by t1.create_time desc |
| | | </select> |
| | | <select id="listPageCopyByProduction" resultType="com.ruoyi.procurementrecord.dto.ProcurementPageDtoCopy"> |
| | | select |
| | | t3.customer_contract_no, |
| | | t3.sales_contract_no, |
| | | t3.customer_name, |
| | | t2.product_category, |
| | | t1.id, |
| | | t1.sales_ledger_product_id, |
| | | t1.create_user, |
| | | t2.specification_model, |
| | | t2.unit, |
| | | t2.min_stock, |
| | | t2.tax_rate, |
| | | t2.tax_inclusive_unit_price, |
| | | t2.tax_inclusive_total_price, |
| | | t2.tax_exclusive_total_price, |
| | | t1.inbound_batches, |
| | | sum(t1.total_price) as totalPrice, |
| | | t1.unit_price, |
| | | sum(t1.inbound_num) as inboundNum, |
| | | sum(t1.inbound_num) as inboundNum0, |
| | | t1.create_time, |
| | | t1.update_time, |
| | | t1.create_by, |
| | | t2.warn_num, |
| | | SUM(t1.inbound_num) - COALESCE(SUM(t4.inbound_num), 0) / COALESCE(count(1), 1) AS availableStock |
| | | from procurement_record_storage t1 |
| | | left join sales_ledger_product t2 on t2.id = t1.sales_ledger_product_id and t2.type = 1 |
| | | left join sales_ledger t3 on t3.id = t2.sales_ledger_id |
| | | left join procurement_record_out t4 on t1.id = t4.procurement_record_storage_id and t4.type = 2 |
| | | <where> |
| | | t4.type = 2 and t1.type = 2 |
| | | <if test="req.customerName != null and req.customerName != ''"> |
| | | and t3.customer_name like concat('%',#{req.customerName},'%') |
| | | </if> |
| | | <if test="req.productCategory != null and req.productCategory != ''"> |
| | | and t2.product_category like concat('%',#{req.productCategory},'%') |
| | | </if> |
| | | <if test="req.timeStr != null and req.timeStr != ''"> |
| | | and t1.create_time like concat('%',#{req.timeStr},'%') |
| | | </if> |
| | | <if test="req.reportDate != null"> |
| | | and t1.create_time >= #{req.reportDate} and t1.create_time < DATE_ADD(#{req.reportDate}, INTERVAL 1 DAY) |
| | | </if> |
| | | <if test="req.startMonth != null"> |
| | | and t1.create_time >= #{req.startMonth} |
| | | </if> |
| | | <if test="req.endMonth != null"> |
| | | and t1.create_time <= #{req.endMonth} |
| | | </if> |
| | | <if test="req.startDate != null"> |
| | | and t1.create_time >= #{req.startDate} |
| | | </if> |
| | | <if test="req.endDate != null"> |
| | | and t1.create_time <= #{req.endDate} |
| | | </if> |
| | | </where> |
| | | group by t2.product_category,t2.specification_model,t1.unit_price |
| | | HAVING availableStock > 0 |
| | | order by t1.create_time desc |
| | | </select> |
| | | </mapper> |
| | |
| | | t1.inbound_num, |
| | | t1.create_time, |
| | | t1.create_by, |
| | | t2.warn_num |
| | | t2.warn_num, |
| | | t4.unit_price, |
| | | t4.unit_price * t1.inbound_num as totalPrice, |
| | | t3.purchase_contract_number |
| | | from procurement_record_out t1 |
| | | left join sales_ledger_product t2 on t2.id = t1.sales_ledger_product_id |
| | | left join procurement_record_storage t4 on t4.id = t1.procurement_record_storage_id |
| | | left join sales_ledger_product t2 on t2.id = t4.sales_ledger_product_id and t2.type = 2 |
| | | left join purchase_ledger t3 on t3.id = t2.sales_ledger_id |
| | | <where> |
| | | 1 = 1 |
| | | and t1.type = 1 |
| | | <if test="req.supplierName != null and req.supplierName != ''"> |
| | | and t3.supplier_name like concat('%',#{req.supplierName},'%') |
| | | </if> |
| | | <if test="req.productCategory != null and req.productCategory != ''"> |
| | | and t2.product_category like concat('%',#{req.productCategory},'%') |
| | | </if> |
| | | <if test="req.timeStr != null and req.timeStr != ''"> |
| | | and t1.create_time like concat('%',#{req.timeStr},'%') |
| | | </if> |
| | | </where> |
| | | order by t1.create_time desc |
| | | </select> |
| | | <select id="list" resultType="com.ruoyi.procurementrecord.dto.ProcurementRecordOutPageDto"> |
| | | select |
| | |
| | | from procurement_record_out t1 |
| | | left join sales_ledger_product t2 on t2.id = t1.sales_ledger_product_id |
| | | left join purchase_ledger t3 on t3.id = t2.sales_ledger_id |
| | | where t1.type = 1 |
| | | </select> |
| | | |
| | | <select id="listOne" resultType="com.ruoyi.procurementrecord.dto.ProcurementRecordOutPageDto"> |
| | | select |
| | | t3.customer_contract_no, |
| | | t3.sales_contract_no, |
| | | t3.customer_name, |
| | | t2.product_category, |
| | | t1.id, |
| | | t2.specification_model, |
| | | t2.unit, |
| | | t2.tax_rate, |
| | | t2.tax_inclusive_unit_price, |
| | | t2.tax_inclusive_total_price, |
| | | t2.tax_exclusive_total_price, |
| | | t1.inbound_num, |
| | | t1.create_time, |
| | | t1.create_time as time, |
| | | t1.create_by |
| | | from procurement_record_out t1 |
| | | left join sales_ledger_product t2 on t2.id = t1.sales_ledger_product_id |
| | | left join sales_ledger t3 on t3.id = t2.sales_ledger_id |
| | | where t1.type = 2 |
| | | </select> |
| | | |
| | | <select id="listTwo" resultType="com.ruoyi.procurementrecord.dto.ProcurementRecordOutPageDto"> |
| | | select |
| | | t1.supplier_name, |
| | | t1.product_category, |
| | | t1.id, |
| | | t1.specification_model, |
| | | t1.unit, |
| | | t1.tax_rate, |
| | | t1.tax_inclusive_unit_price, |
| | | t1.tax_inclusive_total_price, |
| | | t1.tax_exclusive_total_price, |
| | | t1.inbound_num, |
| | | t1.create_time, |
| | | t1.create_time as time, |
| | | t1.create_by |
| | | from procurement_record_out t1 |
| | | where t1.type = 3 |
| | | </select> |
| | | <select id="listPageByProduct" resultType="com.ruoyi.procurementrecord.dto.ProcurementRecordOutPageDto"> |
| | | select |
| | | t3.customer_contract_no, |
| | | t3.sales_contract_no, |
| | | t3.customer_name, |
| | | t2.product_category, |
| | | t1.id, |
| | | t1.code, |
| | | t2.specification_model, |
| | | t2.unit, |
| | | t2.tax_rate, |
| | | t2.tax_inclusive_unit_price, |
| | | t2.tax_inclusive_total_price, |
| | | t2.tax_exclusive_total_price, |
| | | t1.inbound_num, |
| | | t1.create_time, |
| | | t1.create_by, |
| | | t4.unit_price, |
| | | t4.unit_price * t1.inbound_num as totalPrice |
| | | from procurement_record_out t1 |
| | | left join procurement_record_storage t4 on t4.id = t1.procurement_record_storage_id |
| | | left join sales_ledger_product t2 on t2.id = t4.sales_ledger_product_id and t2.type = 1 |
| | | left join sales_ledger t3 on t3.id = t2.sales_ledger_id |
| | | <where> |
| | | and t1.type = 2 |
| | | <if test="req.customerName != null and req.customerName != ''"> |
| | | and t3.customer_name like concat('%',#{req.customerName},'%') |
| | | </if> |
| | | <if test="req.productCategory != null and req.productCategory != ''"> |
| | | and t2.product_category like concat('%',#{req.productCategory},'%') |
| | | </if> |
| | | <if test="req.timeStr != null and req.timeStr != ''"> |
| | | and t1.create_time like concat('%',#{req.timeStr},'%') |
| | | </if> |
| | | </where> |
| | | order by t1.create_time desc |
| | | </select> |
| | | <select id="listPageByCustom" resultType="com.ruoyi.procurementrecord.dto.ProcurementRecordOutPageDto"> |
| | | select |
| | | t2.supplier_name, |
| | | t2.product_category, |
| | | t1.id, |
| | | t2.specification_model, |
| | | t2.unit, |
| | | t2.tax_rate, |
| | | t2.tax_inclusive_unit_price, |
| | | t2.tax_inclusive_unit_price * t1.inbound_num as totalPrice, |
| | | t2.tax_exclusive_total_price, |
| | | t1.inbound_num, |
| | | t1.create_time, |
| | | t1.create_by, |
| | | t2.item_type, |
| | | t2.code |
| | | from procurement_record_out t1 |
| | | left join custom_storage t2 on t2.id = t1.procurement_record_storage_id |
| | | <where> |
| | | t1.type = 3 |
| | | <if test="req.supplierName != null and req.supplierName != ''"> |
| | | and t2.supplier_name like concat('%',#{req.supplierName},'%') |
| | | </if> |
| | | <if test="req.productCategory != null and req.productCategory != ''"> |
| | | and t2.product_category like concat('%',#{req.productCategory},'%') |
| | | </if> |
| | | <if test="req.timeStr != null and req.timeStr != ''"> |
| | | and t1.create_time like concat('%',#{req.timeStr},'%') |
| | | </if> |
| | | </where> |
| | | 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.production.mapper.ProductionOrderMapper"> |
| | | |
| | | </mapper> |
| | |
| | | t4.finished_num, |
| | | t4.work_hours, |
| | | t4.process, |
| | | T1.sales_contract_no, |
| | | T1.customer_contract_no, |
| | | T1.project_name, |
| | | T1.customer_name, |
| | | t3.product_category, |
| | | t3.specification_model, |
| | | t3.unit |
| | | FROM |
| | | sales_ledger_production_accounting t4 |
| | | LEFT JOIN sales_ledger T1 ON T1.id = t4.sales_ledger_id |
| | | left join sales_ledger_product t3 on t4.sales_ledger_product_id = t3.id |
| | | LEFT JOIN production_order t3 on t3.id = t4.sales_ledger_product_id |
| | | <where> |
| | | t3.type = 1 |
| | | <if test="salesLedgerDto.schedulingUserName != null and salesLedgerDto.schedulingUserName != '' "> |
| | | AND t4.scheduling_user_name LIKE CONCAT('%',#{salesLedgerDto.schedulingUserName},'%') |
| | | </if> |
| | | <if test="salesLedgerDto.customerName != null and salesLedgerDto.customerName != '' "> |
| | | AND T1.customer_name LIKE CONCAT('%',#{salesLedgerDto.customerName},'%') |
| | | </if> |
| | | <if test="salesLedgerDto.customerContractNo != null and salesLedgerDto.customerContractNo !='' "> |
| | | AND T1.customer_contract_no LIKE CONCAT('%',#{salesLedgerDto.customerContractNo},'%') |
| | | </if> |
| | | <if test="salesLedgerDto.salesContractNo != null and salesLedgerDto.salesContractNo != '' "> |
| | | AND T1.sales_contract_no LIKE CONCAT('%',#{salesLedgerDto.salesContractNo},'%') |
| | | </if> |
| | | <if test="salesLedgerDto.projectName != null and salesLedgerDto.projectName != '' "> |
| | | AND T1.project_name LIKE CONCAT('%',#{salesLedgerDto.projectName},'%') |
| | | <if test="salesLedgerDto.productCategory != null and salesLedgerDto.productCategory != '' "> |
| | | AND t3.product_category LIKE CONCAT('%',#{salesLedgerDto.productCategory},'%') |
| | | </if> |
| | | <if test="salesLedgerDto.entryDateStart != null and salesLedgerDto.entryDateStart != '' "> |
| | | AND t4.scheduling_date >= DATE_FORMAT(#{salesLedgerDto.entryDateStart},'%Y-%m-%d') |
| | |
| | | <select id="listPageProcess" resultType="com.ruoyi.production.dto.SalesLedgerSchedulingProcessDto"> |
| | | SELECT |
| | | t3.id as salesLedgerProductId, |
| | | T1.id as salesLedgerId, |
| | | T2.id, |
| | | T2.status, |
| | | T2.scheduling_user_id, |
| | |
| | | T2.scheduling_date, |
| | | ifNull(T2.scheduling_num,0) AS schedulingNum, |
| | | ifNull(T2.finished_num,0) AS successNum, |
| | | T1.sales_contract_no, |
| | | T1.customer_contract_no, |
| | | T1.project_name, |
| | | T1.customer_name, |
| | | t3.product_category, |
| | | t3.specification_model, |
| | | t3.unit |
| | | t3.unit, |
| | | t3.order_no |
| | | FROM |
| | | sales_ledger_scheduling T2 |
| | | LEFT JOIN sales_ledger T1 ON T1.id = T2.sales_ledger_id |
| | | left join sales_ledger_product t3 on T2.sales_ledger_product_id = t3.id |
| | | LEFT JOIN production_order t3 on t3.id = T2.sales_ledger_product_id |
| | | <where> |
| | | t3.type = 1 |
| | | <if test="salesLedgerDto.status != null and salesLedgerDto.status != '' "> |
| | | AND T2.status = #{salesLedgerDto.status} |
| | | </if> |
| | | <if test="salesLedgerDto.customerName != null and salesLedgerDto.customerName != '' "> |
| | | AND T1.customer_name LIKE CONCAT('%',#{salesLedgerDto.customerName},'%') |
| | | <if test="salesLedgerDto.orderNo != null and salesLedgerDto.orderNo != '' "> |
| | | AND T1.order_no LIKE CONCAT('%',#{salesLedgerDto.orderNo},'%') |
| | | </if> |
| | | <if test="salesLedgerDto.customerContractNo != null and salesLedgerDto.customerContractNo !='' "> |
| | | AND T1.customer_contract_no LIKE CONCAT('%',#{salesLedgerDto.customerContractNo},'%') |
| | | </if> |
| | | <if test="salesLedgerDto.salesContractNo != null and salesLedgerDto.salesContractNo != '' "> |
| | | AND T1.sales_contract_no LIKE CONCAT('%',#{salesLedgerDto.salesContractNo},'%') |
| | | </if> |
| | | <if test="salesLedgerDto.projectName != null and salesLedgerDto.projectName != '' "> |
| | | AND T1.project_name LIKE CONCAT('%',#{salesLedgerDto.projectName},'%') |
| | | <if test="salesLedgerDto.productCategory != null and salesLedgerDto.productCategory !='' "> |
| | | AND t3.productCategory LIKE CONCAT('%',#{salesLedgerDto.productCategory},'%') |
| | | </if> |
| | | <if test="salesLedgerDto.entryDateStart != null and salesLedgerDto.entryDateStart != '' "> |
| | | AND T2.scheduling_date >= DATE_FORMAT(#{salesLedgerDto.entryDateStart},'%Y-%m-%d') |
| | |
| | | t4.finished_num, |
| | | t4.work_hours, |
| | | t4.process, |
| | | T1.sales_contract_no, |
| | | T1.customer_contract_no, |
| | | T1.project_name, |
| | | T1.customer_name, |
| | | t4.type, |
| | | t4.receive, |
| | | t4.loss, |
| | | t4.remark, |
| | | t3.product_category, |
| | | t3.specification_model, |
| | | t3.unit |
| | | t3.unit, |
| | | t3.order_no |
| | | FROM |
| | | sales_ledger_work t4 |
| | | LEFT JOIN sales_ledger T1 ON T1.id = t4.sales_ledger_id |
| | | left join sales_ledger_product t3 on t4.sales_ledger_product_id = t3.id |
| | | LEFT JOIN production_order t3 on t3.id = t4.sales_ledger_product_id |
| | | <where> |
| | | t3.type = 1 |
| | | <if test="salesLedgerDto.status != null and salesLedgerDto.status != '' "> |
| | | AND t4.status = #{salesLedgerDto.status} |
| | | </if> |
| | | <if test="salesLedgerDto.customerName != null and salesLedgerDto.customerName != '' "> |
| | | AND T1.customer_name LIKE CONCAT('%',#{salesLedgerDto.customerName},'%') |
| | | <if test="salesLedgerDto.orderNo != null and salesLedgerDto.orderNo != '' "> |
| | | AND t3.order_no LIKE CONCAT('%',#{salesLedgerDto.orderNo},'%') |
| | | </if> |
| | | <if test="salesLedgerDto.customerContractNo != null and salesLedgerDto.customerContractNo !='' "> |
| | | AND T1.customer_contract_no LIKE CONCAT('%',#{salesLedgerDto.customerContractNo},'%') |
| | | </if> |
| | | <if test="salesLedgerDto.salesContractNo != null and salesLedgerDto.salesContractNo != '' "> |
| | | AND T1.sales_contract_no LIKE CONCAT('%',#{salesLedgerDto.salesContractNo},'%') |
| | | </if> |
| | | <if test="salesLedgerDto.projectName != null and salesLedgerDto.projectName != '' "> |
| | | AND T1.project_name LIKE CONCAT('%',#{salesLedgerDto.projectName},'%') |
| | | <if test="salesLedgerDto.productCategory != null and salesLedgerDto.productCategory !='' "> |
| | | AND t3.productCategory LIKE CONCAT('%',#{salesLedgerDto.productCategory},'%') |
| | | </if> |
| | | <if test="salesLedgerDto.entryDateStart != null and salesLedgerDto.entryDateStart != '' "> |
| | | AND t4.scheduling_date >= DATE_FORMAT(#{salesLedgerDto.entryDateStart},'%Y-%m-%d') |
| | |
| | | |
| | | <select id="productRecordPage" resultType="com.ruoyi.purchase.dto.ProductRecordDto"> |
| | | SELECT |
| | | sl.sales_contract_no, |
| | | sl.customer_contract_no, |
| | | sl.customer_name, |
| | | pl.sales_contract_no, |
| | | pm.model AS product_model, |
| | | pl.purchase_contract_number, |
| | | pl.supplier_name, |
| | |
| | | ROUND(pr.tickets_amount-pr.tickets_amount/(1+pr.tax_rate/100),2 )as invoice_amount |
| | | FROM product_record pr |
| | | left join purchase_ledger pl on pl.id = pr.purchase_ledger_id |
| | | left join sales_ledger sl on sl.id = pl.sales_ledger_id |
| | | left join ticket_registration tr on tr.id = pr.ticket_registration_id |
| | | left join product_model pm on pm.id = pr.product_model_id |
| | | WHERE type = 2 |
| | | <if test="c.salesContractNo != null and c.salesContractNo != ''"> |
| | | and sl.sales_contract_no = #{c.salesContractNo} |
| | | and pl.sales_contract_no = #{c.salesContractNo} |
| | | </if> |
| | | <if test="c.supplierName != null and c.supplierName != ''"> |
| | | and pl.supplier_name = #{c.supplierName} |
| | |
| | | <if test="c.purchaseContractNumber != null and c.purchaseContractNumber != ''"> |
| | | and tr.purchase_contract_number like concat('%',#{c.purchaseContractNumber},'%') |
| | | </if> |
| | | <if test="c.userId != null and c.userId != '' "> |
| | | AND pl.recorder_id = #{c.userId} |
| | | </if> |
| | | </select> |
| | | <select id="getProductRecordById" resultType="com.ruoyi.purchase.dto.ProductRecordDto"> |
| | | SELECT |
| | |
| | | <if test="c.entryDateEnd != null and c.entryDateEnd != '' "> |
| | | AND pl.entry_date <= DATE_FORMAT(#{c.entryDateEnd},'%Y-%m-%d') |
| | | </if> |
| | | <if test="c.recorderId != null and c.recorderId != '' "> |
| | | AND pl.recorder_id = #{c.recorderId} |
| | | </if> |
| | | </where> |
| | | group by pl.id, pl.purchase_contract_number, pl.sales_contract_no, pl.supplier_name, |
| | | pl.project_name,pl.entry_date, |
| | |
| | | <if test="phone != null and phone != ''">phone,</if> |
| | | <if test="email != null and email != ''">email,</if> |
| | | <if test="deptNick != null and deptNick != ''">dept_nick,</if> |
| | | <if test="tenantId != null and tenantId != ''">tenant_id,</if> |
| | | <if test="status != null">status,</if> |
| | | <if test="createBy != null and createBy != ''">create_by,</if> |
| | | create_time |
| | |
| | | <if test="phone != null and phone != ''">#{phone},</if> |
| | | <if test="email != null and email != ''">#{email},</if> |
| | | <if test="deptNick != null and deptNick != '' ">#{deptNick},</if> |
| | | <if test="tenantId != null and tenantId != '' ">#{tenantId},</if> |
| | | <if test="status != null">#{status},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | sysdate() |
| | |
| | | <if test="email != null">email = #{email},</if> |
| | | <if test="deptNick != null and deptNick != '' ">dept_nick = #{deptNick},</if> |
| | | <if test="status != null and status != ''">status = #{status},</if> |
| | | <if test="tenantId != null and tenantId != ''">tenant_id = #{tenantId},</if> |
| | | <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
| | | update_time = sysdate() |
| | | </set> |
| | |
| | | FROM DepartmentHierarchy |
| | | WHERE parent_id = 100; |
| | | </select> |
| | | <select id="selectDeptByDeptName" resultType="com.ruoyi.project.system.domain.SysDept"> |
| | | <include refid="selectDeptVo"/> |
| | | WHERE d.dept_name = #{deptName} |
| | | LIMIT 1 |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | |
| | | <sql id="selectPostVo"> |
| | | select post_id, post_code, post_name, post_sort, status, create_by, create_time, remark |
| | | from sys_post |
| | | from sys_post p |
| | | </sql> |
| | | |
| | | <select id="selectPostList" parameterType="com.ruoyi.project.system.domain.SysPost" resultMap="SysPostResult"> |
| | |
| | | <if test="postName != null and postName != ''"> |
| | | AND post_name like concat('%', #{postName}, '%') |
| | | </if> |
| | | <!-- æ°æ®èå´è¿æ»¤ --> |
| | | ${params.dataScope} |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | <include refid="selectPostVo"/> |
| | | where post_code=#{postCode} limit 1 |
| | | </select> |
| | | |
| | | <update id="updatePost" parameterType="com.ruoyi.project.system.domain.SysPost"> |
| | | <select id="selectPostByTenantId" resultType="com.ruoyi.project.system.domain.SysPost"> |
| | | <include refid="selectPostVo"/> |
| | | <where> |
| | | AND p.tenant_id = #{tenantId} |
| | | </where> |
| | | </select> |
| | | |
| | | <update id="updatePost" parameterType="com.ruoyi.project.system.domain.SysPost"> |
| | | update sys_post |
| | | <set> |
| | | <if test="postCode != null and postCode != ''">post_code = #{postCode},</if> |
| | |
| | | <if test="status != null and status != ''">status,</if> |
| | | <if test="remark != null and remark != ''">remark,</if> |
| | | <if test="createBy != null and createBy != ''">create_by,</if> |
| | | <if test="tenantId != null and tenantId != ''">tenant_id,</if> |
| | | create_time |
| | | )values( |
| | | <if test="postId != null and postId != 0">#{postId},</if> |
| | |
| | | <if test="status != null and status != ''">#{status},</if> |
| | | <if test="remark != null and remark != ''">#{remark},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | <if test="tenantId != null and tenantId != ''">#{tenantId},</if> |
| | | sysdate() |
| | | ) |
| | | </insert> |
| | |
| | | from sys_role r |
| | | left join sys_user_role ur on ur.role_id = r.role_id |
| | | left join sys_user u on u.user_id = ur.user_id |
| | | left join sys_user_dept d on u.user_id = d.user_id |
| | | </sql> |
| | | |
| | | <select id="selectRoleList" parameterType="com.ruoyi.project.system.domain.SysRole" resultMap="SysRoleResult"> |
| | |
| | | <if test="deptCheckStrictly != null">dept_check_strictly,</if> |
| | | <if test="status != null and status != ''">status,</if> |
| | | <if test="remark != null and remark != ''">remark,</if> |
| | | <if test="tenantId != null and tenantId != ''">tenant_id,</if> |
| | | <if test="createBy != null and createBy != ''">create_by,</if> |
| | | create_time |
| | | )values( |
| | |
| | | <if test="deptCheckStrictly != null">#{deptCheckStrictly},</if> |
| | | <if test="status != null and status != ''">#{status},</if> |
| | | <if test="remark != null and remark != ''">#{remark},</if> |
| | | <if test="tenantId != null and tenantId != ''">#{tenantId},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | sysdate() |
| | | ) |
| | |
| | | |
| | | <select id="selectUserList" parameterType="com.ruoyi.project.system.domain.SysUser" resultMap="SysUserResult"> |
| | | select u.user_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,T2.dept_names from sys_user u |
| | | left join |
| | | inner join |
| | | ( SELECT T1.user_id,GROUP_CONCAT(T2.dept_name SEPARATOR ', ') AS dept_names |
| | | FROM |
| | | sys_user_dept T1 |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.vehicleInformationCollectionReview.mapper.VehicleInformationCollectionReviewMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.vehicleInformationCollectionReview.pojo.VehicleInformationCollectionReview"> |
| | | <id property="id" column="id" jdbcType="BIGINT"/> |
| | | <result property="plateNo" column="plate_no" jdbcType="VARCHAR"/> |
| | | <result property="plateColor" column="plate_color" jdbcType="VARCHAR"/> |
| | | <result property="carType" column="car_type" jdbcType="VARCHAR"/> |
| | | <result property="carVin" column="car_vin" jdbcType="VARCHAR"/> |
| | | <result property="carModel" column="car_model" jdbcType="VARCHAR"/> |
| | | <result property="engineModel" column="engine_model" jdbcType="VARCHAR"/> |
| | | <result property="engineProductFactory" column="engine_product_factory" jdbcType="VARCHAR"/> |
| | | <result property="engineNo" column="engine_no" jdbcType="VARCHAR"/> |
| | | <result property="emissionStandard" column="emission_standard" jdbcType="VARCHAR"/> |
| | | <result property="registeDate" column="registe_date" jdbcType="TIMESTAMP"/> |
| | | <result property="natureOfUse" column="nature_of_use" jdbcType="VARCHAR"/> |
| | | <result property="fuelType" column="fuel_type" jdbcType="VARCHAR"/> |
| | | <result property="reviewStatus" column="review_status" jdbcType="VARCHAR"/> |
| | | <result property="tenantId" column="tenant_id" jdbcType="INTEGER"/> |
| | | <result property="createUser" column="create_user" jdbcType="VARCHAR"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateUser" column="update_user" jdbcType="VARCHAR"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | id,plate_no,plate_color, |
| | | car_type,car_vin,car_model, |
| | | engine_model,engine_product_factory,engine_no, |
| | | emission_standard,registe_date,nature_of_use, |
| | | fuel_type,review_status,tenant_id, |
| | | create_user,create_time,update_user, |
| | | update_time |
| | | </sql> |
| | | </mapper> |
| | |
| | | <!-- é
ç½®é»è®¤çæ§è¡å¨.SIMPLEå°±æ¯æ®éæ§è¡å¨;REUSEæ§è¡å¨ä¼éç¨é¢å¤çè¯å¥(prepared statements);BATCHæ§è¡å¨å°éç¨è¯å¥å¹¶æ§è¡æ¹éæ´æ° -->
|
| | | <setting name="defaultExecutorType" value="SIMPLE" />
|
| | | <!-- æå® MyBatis æç¨æ¥å¿çå
·ä½å®ç° -->
|
| | | <setting name="logImpl" value="SLF4J" />
|
| | | <!-- <setting name="logImpl" value="org.apache.ibatis.logging.stdout.StdOutImpl" />-->
|
| | | <!-- <setting name="logImpl" value="SLF4J" />-->
|
| | | <setting name="logImpl" value="org.apache.ibatis.logging.stdout.StdOutImpl" />
|
| | | <!-- 使ç¨é©¼å³°å½åæ³è½¬æ¢å段 -->
|
| | | <!-- <setting name="mapUnderscoreToCamelCase" value="true"/> -->
|
| | | </settings>
|