From 4809db01709fd66fe3a25452ef41a6378b6ac6c8 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期六, 10 一月 2026 11:18:21 +0800
Subject: [PATCH] Merge branch 'dev_tide' into dev_tide_cbsglxt
---
src/main/java/com/ruoyi/procurementrecord/mapper/ProcurementRecordOutMapper.java | 8
src/main/java/com/ruoyi/production/dto/SalesLedgerSchedulingDto.java | 3
src/main/java/com/ruoyi/project/system/service/ISysPostService.java | 2
src/main/java/com/ruoyi/vehicleInformationCollectionReview/service/impl/VehicleInformationCollectionReviewServiceImpl.java | 34
src/main/java/com/ruoyi/procurementrecord/pojo/ProcurementRecordOut.java | 16
src/main/resources/mapper/purchase/PurchaseLedgerMapper.xml | 3
src/main/resources/application-xtbgxt.yml | 222 +++
src/main/java/com/ruoyi/procurementrecord/dto/ProcurementPageDto.java | 43
src/main/java/com/ruoyi/production/service/ProductionOrderService.java | 20
src/main/java/com/ruoyi/purchase/dto/TicketRegistrationDto.java | 2
src/main/java/com/ruoyi/production/controller/ProductionOrderController.java | 90 +
src/main/java/com/ruoyi/purchase/service/impl/ProductRecordServiceImpl.java | 3
src/main/resources/mapper/production/SalesLedgerWorkMapper.xml | 29
src/main/java/com/ruoyi/procurementrecord/dto/ProcurementPageDtoCopy.java | 33
src/main/java/com/ruoyi/production/dto/DaiDto.java | 85
src/main/java/com/ruoyi/project/system/service/impl/SysPostServiceImpl.java | 10
src/main/java/com/ruoyi/project/system/mapper/SysPostMapper.java | 3
src/main/resources/mapper/system/SysPostMapper.xml | 16
src/main/java/com/ruoyi/production/pojo/SalesLedgerWork.java | 22
src/main/java/com/ruoyi/framework/aspectj/lang/annotation/DataScope.java | 6
src/main/resources/mapper/procurementrecord/ProcurementRecordMapper.xml | 209 +++
src/main/java/com/ruoyi/tide/utils/TideUtils.java | 4
src/main/resources/application-scgkxt.yml | 222 +++
src/main/java/com/ruoyi/common/QueryWrappers.java | 68 +
src/main/java/com/ruoyi/production/dto/ProcessSchedulingDto.java | 21
src/main/java/com/ruoyi/procurementrecord/controller/ProcurementRecordController.java | 136 ++
src/main/java/com/ruoyi/procurementrecord/service/ProcurementRecordOutService.java | 4
src/main/java/com/ruoyi/procurementrecord/pojo/InboundManagement.java | 1
src/main/java/com/ruoyi/production/service/impl/SalesLedgerWorkServiceImpl.java | 2
src/main/java/com/ruoyi/project/system/service/ISysDeptService.java | 8
src/main/java/com/ruoyi/project/system/controller/SysRoleController.java | 35
src/main/java/com/ruoyi/procurementrecord/service/impl/ProcurementRecordServiceImpl.java | 364 +++++
src/main/java/com/ruoyi/procurementrecord/service/impl/ProcurementPriceManagementServiceImpl.java | 2
src/main/java/com/ruoyi/production/controller/SalesLedgerWorkController.java | 4
src/main/java/com/ruoyi/vehicleInformationCollectionReview/controller/VehicleInformationCollectionController.java | 51
src/main/java/com/ruoyi/procurementrecord/pojo/ReturnManagement.java | 1
src/main/java/com/ruoyi/project/system/service/impl/SysDeptServiceImpl.java | 9
src/main/java/com/ruoyi/project/system/mapper/SysDeptMapper.java | 2
src/main/resources/mapper/system/SysUserMapper.xml | 2
src/main/java/com/ruoyi/project/system/domain/SysPost.java | 10
src/main/java/com/ruoyi/vehicleInformationCollectionReview/pojo/VehicleInformationCollectionReview.java | 116 +
src/main/resources/application.yml | 11
src/main/java/com/ruoyi/procurementrecord/dto/Details.java | 9
src/main/java/com/ruoyi/production/service/impl/SalesLedgerSchedulingServiceImpl.java | 33
src/main/java/com/ruoyi/project/system/service/impl/SysUserServiceImpl.java | 2
src/main/resources/mapper/production/SalesLedgerProductionAccountingMapper.xml | 21
src/main/java/com/ruoyi/procurementrecord/service/impl/ProcurementPlanServiceImpl.java | 1
src/main/java/com/ruoyi/purchase/service/impl/PurchaseLedgerServiceImpl.java | 5
src/main/java/com/ruoyi/project/system/controller/SysDeptController.java | 3
src/main/java/com/ruoyi/project/system/domain/SysDept.java | 12
src/main/java/com/ruoyi/procurementrecord/pojo/ProcurementRecordStorage.java | 19
src/main/java/com/ruoyi/project/system/domain/SysRole.java | 14
src/main/java/com/ruoyi/procurementrecord/dto/ProcurementRecordOutAdd.java | 5
src/main/resources/application-yxglxt.yml | 222 +++
src/main/java/com/ruoyi/project/system/controller/SysUserController.java | 8
src/main/java/com/ruoyi/tide/controller/TideController.java | 35
src/main/java/com/ruoyi/vehicleInformationCollectionReview/mapper/VehicleInformationCollectionReviewMapper.java | 20
src/main/java/com/ruoyi/production/service/impl/ProductionOrderServiceImpl.java | 147 ++
src/main/java/com/ruoyi/production/dto/ProductionDispatchAddDto.java | 2
src/main/java/com/ruoyi/production/dto/SalesLedgerProductDto.java | 52
src/main/java/com/ruoyi/procurementrecord/controller/ProcurementRecordOutController.java | 51
src/main/resources/application-sbglxt.yml | 222 +++
src/main/java/com/ruoyi/procurementrecord/dto/ProcurementManagementUpdateDto.java | 19
src/main/resources/mybatis/mybatis-config.xml | 4
src/main/resources/mapper/procurementrecord/CustomStorageMapper.xml | 50
src/main/resources/mapper/vehicleInformationCollectionReview/VehicleInformationCollectionReviewMapper.xml | 38
src/main/java/com/ruoyi/production/mapper/ProductionOrderMapper.java | 11
src/main/java/com/ruoyi/production/service/SalesLedgerWorkService.java | 1
src/main/java/com/ruoyi/purchase/service/impl/TicketRegistrationServiceImpl.java | 2
src/main/java/com/ruoyi/procurementrecord/service/impl/GasTankWarningServiceImpl.java | 2
src/main/java/com/ruoyi/procurementrecord/service/ProcurementRecordService.java | 27
src/main/java/com/ruoyi/procurementrecord/service/impl/ProcurementRecordOutServiceImpl.java | 29
src/main/java/com/ruoyi/procurementrecord/dto/ProcurementAddDto.java | 7
src/main/resources/mapper/purchase/ProductRecordMapper.xml | 10
src/main/java/com/ruoyi/procurementrecord/dto/ProcurementDto.java | 2
src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java | 7
src/main/resources/application-cgglxt.yml | 0
src/main/java/com/ruoyi/purchase/service/impl/PaymentRegistrationServiceImpl.java | 1
src/main/resources/mapper/procurementrecord/ProcurementRecordOutMapper.xml | 126 +
src/main/java/com/ruoyi/procurementrecord/pojo/CustomStorage.java | 128 ++
src/main/java/com/ruoyi/production/controller/SalesLedgerSchedulingController.java | 43
src/main/resources/mapper/production/SalesLedgerSchedulingMapper.xml | 26
src/main/java/com/ruoyi/production/controller/SalesLedgerProductionAccountingController.java | 1
src/main/java/com/ruoyi/procurementrecord/dto/ProcurementRecordOutPageDto.java | 40
src/main/java/com/ruoyi/production/service/SalesLedgerSchedulingService.java | 2
src/main/java/com/ruoyi/project/system/controller/SysPostController.java | 3
src/main/java/com/ruoyi/production/pojo/SalesLedgerScheduling.java | 2
src/main/java/com/ruoyi/vehicleInformationCollectionReview/service/VehicleInformationCollectionReviewService.java | 18
src/main/resources/mapper/production/ProductionOrderMapper.xml | 5
src/main/java/com/ruoyi/production/dto/SalesLedgerSchedulingProcessDto.java | 36
src/main/java/com/ruoyi/vehicleInformationCollectionReview/dto/VehicleInformationCollectionReviewDTO.java | 9
src/main/java/com/ruoyi/procurementrecord/mapper/ProcurementRecordMapper.java | 8
src/main/java/com/ruoyi/production/dto/SalesLedgerWorkDto.java | 25
src/main/java/com/ruoyi/production/pojo/ProductionOrder.java | 139 ++
src/main/java/com/ruoyi/procurementrecord/mapper/CustomStorageMapper.java | 17
src/main/resources/mapper/system/SysDeptMapper.xml | 8
src/main/resources/mapper/system/SysRoleMapper.xml | 3
src/main/java/com/ruoyi/procurementrecord/dto/ProcurementUpdateDto.java | 11
src/main/java/com/ruoyi/project/system/service/impl/SysRoleServiceImpl.java | 2
99 files changed, 3,314 insertions(+), 363 deletions(-)
diff --git a/src/main/java/com/ruoyi/common/QueryWrappers.java b/src/main/java/com/ruoyi/common/QueryWrappers.java
new file mode 100644
index 0000000..4f98173
--- /dev/null
+++ b/src/main/java/com/ruoyi/common/QueryWrappers.java
@@ -0,0 +1,68 @@
+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;
+ }
+}
diff --git a/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java b/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java
index 2cf52c3..0cb4cee 100644
--- a/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java
+++ b/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java
@@ -74,7 +74,7 @@
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);
}
}
}
@@ -86,9 +86,10 @@
* @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>();
@@ -138,6 +139,8 @@
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
{
diff --git a/src/main/java/com/ruoyi/framework/aspectj/lang/annotation/DataScope.java b/src/main/java/com/ruoyi/framework/aspectj/lang/annotation/DataScope.java
index f36896e..715ef0c 100644
--- a/src/main/java/com/ruoyi/framework/aspectj/lang/annotation/DataScope.java
+++ b/src/main/java/com/ruoyi/framework/aspectj/lang/annotation/DataScope.java
@@ -27,6 +27,12 @@
public String userAlias() default "";
/**
+ * 绉熸埛id瀛楁鍚�
+ * @return
+ */
+ public String tenantIdFelid() default "";
+
+ /**
* 鏉冮檺瀛楃锛堢敤浜庡涓鑹插尮閰嶇鍚堣姹傜殑鏉冮檺锛夐粯璁ゆ牴鎹潈闄愭敞瑙ss鑾峰彇锛屽涓潈闄愮敤閫楀彿鍒嗛殧寮�鏉�
*/
public String permission() default "";
diff --git a/src/main/java/com/ruoyi/procurementrecord/controller/ProcurementRecordController.java b/src/main/java/com/ruoyi/procurementrecord/controller/ProcurementRecordController.java
index 7fb7b44..a0761e8 100644
--- a/src/main/java/com/ruoyi/procurementrecord/controller/ProcurementRecordController.java
+++ b/src/main/java/com/ruoyi/procurementrecord/controller/ProcurementRecordController.java
@@ -2,11 +2,14 @@
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;
@@ -30,10 +33,23 @@
@Autowired
private ProcurementRecordService procurementRecordService;
+
+ /**
+ * 閫氳繃閿�鍞骇鍝乮d鑾峰彇鍏ュ簱鏁伴噺
+ * @param salesProductId
+ * @return
+ */
+ @GetMapping("/getProcurementAmount")
+ @ApiOperation(value = "閫氳繃閿�鍞骇鍝乮d鑾峰彇鍏ュ簱鏁伴噺")
+ 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);
}
@@ -41,7 +57,30 @@
@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")
@@ -52,10 +91,17 @@
}
@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")
@@ -69,16 +115,47 @@
@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) {
@@ -86,21 +163,62 @@
}
/**
- * 瀵煎嚭
+ * 搴撳瓨绠$悊閲囪喘瀵煎嚭
* @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, "鍏ュ簱鍙拌处");
}
diff --git a/src/main/java/com/ruoyi/procurementrecord/controller/ProcurementRecordOutController.java b/src/main/java/com/ruoyi/procurementrecord/controller/ProcurementRecordOutController.java
index 1a656be..d7f1a84 100644
--- a/src/main/java/com/ruoyi/procurementrecord/controller/ProcurementRecordOutController.java
+++ b/src/main/java/com/ruoyi/procurementrecord/controller/ProcurementRecordOutController.java
@@ -2,20 +2,22 @@
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
@@ -30,26 +32,40 @@
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")
@@ -57,4 +73,29 @@
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, "鐢熶骇鍑哄簱鍙拌处");
+ }
+
}
diff --git a/src/main/java/com/ruoyi/procurementrecord/dto/Details.java b/src/main/java/com/ruoyi/procurementrecord/dto/Details.java
index b2e5a21..3f3ed35 100644
--- a/src/main/java/com/ruoyi/procurementrecord/dto/Details.java
+++ b/src/main/java/com/ruoyi/procurementrecord/dto/Details.java
@@ -10,7 +10,10 @@
*/
@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;
}
diff --git a/src/main/java/com/ruoyi/procurementrecord/dto/ProcurementAddDto.java b/src/main/java/com/ruoyi/procurementrecord/dto/ProcurementAddDto.java
index 73d9895..d3f35a1 100644
--- a/src/main/java/com/ruoyi/procurementrecord/dto/ProcurementAddDto.java
+++ b/src/main/java/com/ruoyi/procurementrecord/dto/ProcurementAddDto.java
@@ -15,4 +15,11 @@
private String nickName;
+ /**
+ * 鍏ュ簱绫诲瀷 1-閲囪喘 2-鐢熶骇 3-鑷畾涔�
+ */
+ private Integer type;
+
+ private String typeName;
+
}
diff --git a/src/main/java/com/ruoyi/procurementrecord/dto/ProcurementDto.java b/src/main/java/com/ruoyi/procurementrecord/dto/ProcurementDto.java
index d8004b4..4b4392d 100644
--- a/src/main/java/com/ruoyi/procurementrecord/dto/ProcurementDto.java
+++ b/src/main/java/com/ruoyi/procurementrecord/dto/ProcurementDto.java
@@ -1,11 +1,9 @@
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
diff --git a/src/main/java/com/ruoyi/procurementrecord/dto/ProcurementManagementUpdateDto.java b/src/main/java/com/ruoyi/procurementrecord/dto/ProcurementManagementUpdateDto.java
index 0356de7..0d97384 100644
--- a/src/main/java/com/ruoyi/procurementrecord/dto/ProcurementManagementUpdateDto.java
+++ b/src/main/java/com/ruoyi/procurementrecord/dto/ProcurementManagementUpdateDto.java
@@ -1,11 +1,8 @@
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
@@ -17,6 +14,22 @@
private String createBy;
private BigDecimal minStock;
+
+ /**
+ * 鍗曚环
+ */
+ private BigDecimal unitPrice;
+
+ /**
+ * 鎬讳环
+ */
+ private BigDecimal totalPrice;
+
+ // 鍗曚环
+ private BigDecimal taxInclusiveUnitPrice;
+ // 鎬讳环
+ private BigDecimal taxInclusiveTotalPrice;
+
private Long createUser;
private String createTime;
diff --git a/src/main/java/com/ruoyi/procurementrecord/dto/ProcurementPageDto.java b/src/main/java/com/ruoyi/procurementrecord/dto/ProcurementPageDto.java
index 4f3f260..27ac770 100644
--- a/src/main/java/com/ruoyi/procurementrecord/dto/ProcurementPageDto.java
+++ b/src/main/java/com/ruoyi/procurementrecord/dto/ProcurementPageDto.java
@@ -3,6 +3,7 @@
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;
@@ -22,15 +23,41 @@
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;
@@ -40,6 +67,20 @@
@Excel(name = "鍏ュ簱鏁伴噺")
private BigDecimal inboundNum;
+ /**
+ * 鍏ュ簱鍗曚环
+ */
+ @ApiModelProperty(value = "鍏ュ簱鍗曚环")
+ @Excel(name = "鍏ュ簱鍗曚环")
+ private BigDecimal unitPrice;
+
+ /**
+ * 鍏ュ簱鎬讳环
+ */
+ @ApiModelProperty(value = "鍏ュ簱鎬讳环")
+ @Excel(name = "鍏ュ簱鎬讳环")
+ private BigDecimal totalPrice;
+
@Excel(name = "棰勮鏁伴噺")
private BigDecimal warnNum;
diff --git a/src/main/java/com/ruoyi/procurementrecord/dto/ProcurementPageDtoCopy.java b/src/main/java/com/ruoyi/procurementrecord/dto/ProcurementPageDtoCopy.java
index 9592ad1..b5dcb70 100644
--- a/src/main/java/com/ruoyi/procurementrecord/dto/ProcurementPageDtoCopy.java
+++ b/src/main/java/com/ruoyi/procurementrecord/dto/ProcurementPageDtoCopy.java
@@ -2,6 +2,7 @@
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;
@@ -32,6 +33,22 @@
*/
private String purchaseContractNumber;
+
+ /**
+ * 閿�鍞悎鍚屽彿
+ */
+ private String salesContractNo;
+
+ /**
+ * 瀹㈡埛鍚堝悓鍙�
+ */
+ private String customerContractNo;
+
+ /**
+ * 瀹㈡埛鍚嶇О
+ */
+ private String customerName;
+
private String salesLedgerProductId;
/**
@@ -39,6 +56,20 @@
*/
@Excel(name = "鍏ュ簱鏁伴噺")
private BigDecimal inboundNum;
+
+ /**
+ * 鍏ュ簱鍗曚环
+ */
+ @ApiModelProperty(value = "鍏ュ簱鍗曚环")
+ @Excel(name = "鍏ュ簱鍗曚环")
+ private BigDecimal unitPrice;
+
+ /**
+ * 鍏ュ簱鎬讳环
+ */
+ @ApiModelProperty(value = "鍏ュ簱鎬讳环")
+ @Excel(name = "鍏ュ簱鎬讳环")
+ private BigDecimal totalPrice;
/**
* 寰呭嚭搴撴暟閲�
@@ -49,7 +80,7 @@
* 鍑哄簱鏁伴噺
*/
@Excel(name = "鍑哄簱鏁伴噺")
- private BigDecimal totalInboundNum;
+ private BigDecimal totalInboundNum = BigDecimal.ZERO;
/**
* 鏈�浣庡簱瀛樻暟閲�
diff --git a/src/main/java/com/ruoyi/procurementrecord/dto/ProcurementRecordOutAdd.java b/src/main/java/com/ruoyi/procurementrecord/dto/ProcurementRecordOutAdd.java
index 6c76cdd..9124e75 100644
--- a/src/main/java/com/ruoyi/procurementrecord/dto/ProcurementRecordOutAdd.java
+++ b/src/main/java/com/ruoyi/procurementrecord/dto/ProcurementRecordOutAdd.java
@@ -19,4 +19,9 @@
private Integer salesLedgerProductId;
+ /**
+ * 鍑哄簱绫诲瀷 1-閲囪喘鍑哄簱 2-閿�鍞嚭搴� 3-鑷畾涔�
+ */
+ private Integer type;
+
}
diff --git a/src/main/java/com/ruoyi/procurementrecord/dto/ProcurementRecordOutPageDto.java b/src/main/java/com/ruoyi/procurementrecord/dto/ProcurementRecordOutPageDto.java
index 55ceb9c..a2be0d6 100644
--- a/src/main/java/com/ruoyi/procurementrecord/dto/ProcurementRecordOutPageDto.java
+++ b/src/main/java/com/ruoyi/procurementrecord/dto/ProcurementRecordOutPageDto.java
@@ -20,6 +20,26 @@
private Integer id;
private BigDecimal warnNum;
+ /**
+ * 閲囪喘鍚堝悓鍙�
+ */
+ private String purchaseContractNumber;
+ /**
+ * 閿�鍞悎鍚屽彿
+ */
+ private String salesContractNo;
+
+ /**
+ * 瀹㈡埛鍚堝悓鍙�
+ */
+ private String customerContractNo;
+
+ /**
+ * 瀹㈡埛鍚嶇О
+ */
+ @Excel(name = "瀹㈡埛鍚嶇О")
+ private String customerName;
+
/**
* 鍑哄叆搴撴暟閲�
@@ -28,10 +48,22 @@
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;
@@ -50,6 +82,8 @@
*/
@Excel(name = "渚涘簲鍟嗗悕绉�")
private String supplierName;
+
+
/**
@@ -94,4 +128,8 @@
@Excel(name = "涓嶅惈绋庢�讳环")
private BigDecimal taxExclusiveTotalPrice;
+ /**
+ * 鐗╁搧绫诲瀷
+ */
+ private String itemType;
}
diff --git a/src/main/java/com/ruoyi/procurementrecord/dto/ProcurementUpdateDto.java b/src/main/java/com/ruoyi/procurementrecord/dto/ProcurementUpdateDto.java
index 82e02f1..bb23e64 100644
--- a/src/main/java/com/ruoyi/procurementrecord/dto/ProcurementUpdateDto.java
+++ b/src/main/java/com/ruoyi/procurementrecord/dto/ProcurementUpdateDto.java
@@ -12,12 +12,23 @@
@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;
+
}
diff --git a/src/main/java/com/ruoyi/procurementrecord/mapper/CustomStorageMapper.java b/src/main/java/com/ruoyi/procurementrecord/mapper/CustomStorageMapper.java
new file mode 100644
index 0000000..6ccbb4a
--- /dev/null
+++ b/src/main/java/com/ruoyi/procurementrecord/mapper/CustomStorageMapper.java
@@ -0,0 +1,17 @@
+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);
+}
diff --git a/src/main/java/com/ruoyi/procurementrecord/mapper/ProcurementRecordMapper.java b/src/main/java/com/ruoyi/procurementrecord/mapper/ProcurementRecordMapper.java
index 1336f39..183d62c 100644
--- a/src/main/java/com/ruoyi/procurementrecord/mapper/ProcurementRecordMapper.java
+++ b/src/main/java/com/ruoyi/procurementrecord/mapper/ProcurementRecordMapper.java
@@ -30,5 +30,13 @@
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);
}
diff --git a/src/main/java/com/ruoyi/procurementrecord/mapper/ProcurementRecordOutMapper.java b/src/main/java/com/ruoyi/procurementrecord/mapper/ProcurementRecordOutMapper.java
index 4a9390b..6cd9dab 100644
--- a/src/main/java/com/ruoyi/procurementrecord/mapper/ProcurementRecordOutMapper.java
+++ b/src/main/java/com/ruoyi/procurementrecord/mapper/ProcurementRecordOutMapper.java
@@ -18,4 +18,12 @@
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);
}
diff --git a/src/main/java/com/ruoyi/procurementrecord/pojo/CustomStorage.java b/src/main/java/com/ruoyi/procurementrecord/pojo/CustomStorage.java
new file mode 100644
index 0000000..5599500
--- /dev/null
+++ b/src/main/java/com/ruoyi/procurementrecord/pojo/CustomStorage.java
@@ -0,0 +1,128 @@
+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;
+
+}
diff --git a/src/main/java/com/ruoyi/procurementrecord/pojo/InboundManagement.java b/src/main/java/com/ruoyi/procurementrecord/pojo/InboundManagement.java
index 56f322e..d6708ca 100644
--- a/src/main/java/com/ruoyi/procurementrecord/pojo/InboundManagement.java
+++ b/src/main/java/com/ruoyi/procurementrecord/pojo/InboundManagement.java
@@ -7,7 +7,6 @@
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
-import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
diff --git a/src/main/java/com/ruoyi/procurementrecord/pojo/ProcurementRecordOut.java b/src/main/java/com/ruoyi/procurementrecord/pojo/ProcurementRecordOut.java
index b09b0f3..aa85a3d 100644
--- a/src/main/java/com/ruoyi/procurementrecord/pojo/ProcurementRecordOut.java
+++ b/src/main/java/com/ruoyi/procurementrecord/pojo/ProcurementRecordOut.java
@@ -22,7 +22,7 @@
private Integer id;
/**
- * 浜у搧淇℃伅琛╥d
+ * 浜у搧淇℃伅琛╥d锛堣嚜瀹氫箟鍏ュ簱鏃朵负0锛�
*/
private Integer salesLedgerProductId;
@@ -43,32 +43,42 @@
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;
/**
diff --git a/src/main/java/com/ruoyi/procurementrecord/pojo/ProcurementRecordStorage.java b/src/main/java/com/ruoyi/procurementrecord/pojo/ProcurementRecordStorage.java
index 28cee3c..5240715 100644
--- a/src/main/java/com/ruoyi/procurementrecord/pojo/ProcurementRecordStorage.java
+++ b/src/main/java/com/ruoyi/procurementrecord/pojo/ProcurementRecordStorage.java
@@ -37,9 +37,24 @@
private BigDecimal inboundNum;
/**
+ * 鍗曚环
+ */
+ private BigDecimal unitPrice;
+
+ /**
+ * 鎬讳环
+ */
+ private BigDecimal totalPrice;
+
+ /**
* 棰勮鏁伴噺
*/
private BigDecimal warnNum;
+
+ /**
+ * 鍏ュ簱绫诲瀷 1-閲囪喘鍏ュ簱 2-鐢熶骇鍏ュ簱
+ */
+ private Integer type;
// /**
// * 鏈�浣庡簱瀛樻暟閲�
// */
@@ -54,21 +69,25 @@
/**
* 鍏ュ簱鐢ㄦ埛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;
/**
diff --git a/src/main/java/com/ruoyi/procurementrecord/pojo/ReturnManagement.java b/src/main/java/com/ruoyi/procurementrecord/pojo/ReturnManagement.java
index 54091ab..e3cdb06 100644
--- a/src/main/java/com/ruoyi/procurementrecord/pojo/ReturnManagement.java
+++ b/src/main/java/com/ruoyi/procurementrecord/pojo/ReturnManagement.java
@@ -8,7 +8,6 @@
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
-import java.util.Date;
/**
* @author :yys
diff --git a/src/main/java/com/ruoyi/procurementrecord/service/ProcurementRecordOutService.java b/src/main/java/com/ruoyi/procurementrecord/service/ProcurementRecordOutService.java
index 785efc4..a8fb7eb 100644
--- a/src/main/java/com/ruoyi/procurementrecord/service/ProcurementRecordOutService.java
+++ b/src/main/java/com/ruoyi/procurementrecord/service/ProcurementRecordOutService.java
@@ -23,4 +23,8 @@
int deletePro(ProcurementUpdateDto procurementDto);
void export(HttpServletResponse response);
+
+ IPage<ProcurementRecordOutPageDto> listPageByProduct(Page page, ProcurementRecordOutPageDto procurementDto);
+
+ IPage<ProcurementRecordOutPageDto> listPageByCustom(Page page, ProcurementRecordOutPageDto procurementDto);
}
diff --git a/src/main/java/com/ruoyi/procurementrecord/service/ProcurementRecordService.java b/src/main/java/com/ruoyi/procurementrecord/service/ProcurementRecordService.java
index 79603ae..1b699ef 100644
--- a/src/main/java/com/ruoyi/procurementrecord/service/ProcurementRecordService.java
+++ b/src/main/java/com/ruoyi/procurementrecord/service/ProcurementRecordService.java
@@ -3,10 +3,13 @@
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;
@@ -27,11 +30,31 @@
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);
}
diff --git a/src/main/java/com/ruoyi/procurementrecord/service/impl/GasTankWarningServiceImpl.java b/src/main/java/com/ruoyi/procurementrecord/service/impl/GasTankWarningServiceImpl.java
index 772869b..204ad17 100644
--- a/src/main/java/com/ruoyi/procurementrecord/service/impl/GasTankWarningServiceImpl.java
+++ b/src/main/java/com/ruoyi/procurementrecord/service/impl/GasTankWarningServiceImpl.java
@@ -4,9 +4,7 @@
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;
diff --git a/src/main/java/com/ruoyi/procurementrecord/service/impl/ProcurementPlanServiceImpl.java b/src/main/java/com/ruoyi/procurementrecord/service/impl/ProcurementPlanServiceImpl.java
index 81216db..3226e8c 100644
--- a/src/main/java/com/ruoyi/procurementrecord/service/impl/ProcurementPlanServiceImpl.java
+++ b/src/main/java/com/ruoyi/procurementrecord/service/impl/ProcurementPlanServiceImpl.java
@@ -6,7 +6,6 @@
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;
diff --git a/src/main/java/com/ruoyi/procurementrecord/service/impl/ProcurementPriceManagementServiceImpl.java b/src/main/java/com/ruoyi/procurementrecord/service/impl/ProcurementPriceManagementServiceImpl.java
index e90a7a2..2321b7e 100644
--- a/src/main/java/com/ruoyi/procurementrecord/service/impl/ProcurementPriceManagementServiceImpl.java
+++ b/src/main/java/com/ruoyi/procurementrecord/service/impl/ProcurementPriceManagementServiceImpl.java
@@ -3,9 +3,7 @@
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;
diff --git a/src/main/java/com/ruoyi/procurementrecord/service/impl/ProcurementRecordOutServiceImpl.java b/src/main/java/com/ruoyi/procurementrecord/service/impl/ProcurementRecordOutServiceImpl.java
index 29cba69..c8fedc3 100644
--- a/src/main/java/com/ruoyi/procurementrecord/service/impl/ProcurementRecordOutServiceImpl.java
+++ b/src/main/java/com/ruoyi/procurementrecord/service/impl/ProcurementRecordOutServiceImpl.java
@@ -10,20 +10,20 @@
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;
@@ -54,7 +54,15 @@
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. 杞崲锛歋tring 鈫� 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());
@@ -65,7 +73,8 @@
.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()))
@@ -95,8 +104,18 @@
@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);
+ }
}
diff --git a/src/main/java/com/ruoyi/procurementrecord/service/impl/ProcurementRecordServiceImpl.java b/src/main/java/com/ruoyi/procurementrecord/service/impl/ProcurementRecordServiceImpl.java
index 1675069..f653427 100644
--- a/src/main/java/com/ruoyi/procurementrecord/service/impl/ProcurementRecordServiceImpl.java
+++ b/src/main/java/com/ruoyi/procurementrecord/service/impl/ProcurementRecordServiceImpl.java
@@ -4,14 +4,18 @@
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;
@@ -26,8 +30,12 @@
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;
/**
@@ -102,10 +110,13 @@
@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);
}
@@ -115,7 +126,8 @@
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()));
@@ -124,8 +136,13 @@
}
@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());
@@ -136,6 +153,7 @@
}
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);
@@ -182,21 +200,39 @@
if(salesLedgerProduct == null){
throw new RuntimeException("閿�鍞彴璐︿骇鍝佷笉瀛樺湪");
}
+ // 鏍规嵁澶х被锛岃鏍兼煡璇㈡墍鏈変骇鍝乮d
+ 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());
@@ -207,6 +243,7 @@
}
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);
@@ -234,6 +271,53 @@
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, "搴撳瓨绠$悊");
}
@@ -336,20 +420,257 @@
}
@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())
@@ -380,7 +701,8 @@
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;
@@ -420,6 +742,7 @@
}
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;
@@ -427,12 +750,13 @@
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;
}
@@ -444,6 +768,10 @@
dto.setTotalInboundNum(totalInboundNum);
// 寰呭嚭搴撴暟閲� = 鎬绘暟閲� - 宸插嚭搴撴暟閲�
dto.setInboundNum0(dto.getInboundNum().subtract(totalInboundNum));
+ // 搴撳瓨浠峰��
+ if(dto.getUnitPrice() != null){
+ dto.setTotalPrice(dto.getInboundNum0().multiply(dto.getUnitPrice()));
+ }
}
return procurementPageDtoCopyIPage;
}
diff --git a/src/main/java/com/ruoyi/production/controller/ProductionOrderController.java b/src/main/java/com/ruoyi/production/controller/ProductionOrderController.java
new file mode 100644
index 0000000..f006e07
--- /dev/null
+++ b/src/main/java/com/ruoyi/production/controller/ProductionOrderController.java
@@ -0,0 +1,90 @@
+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("璇蜂紶鍏ヨ鍒犻櫎鐨処D");
+ 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);
+ }
+
+}
diff --git a/src/main/java/com/ruoyi/production/controller/SalesLedgerProductionAccountingController.java b/src/main/java/com/ruoyi/production/controller/SalesLedgerProductionAccountingController.java
index ed7ac26..a16a910 100644
--- a/src/main/java/com/ruoyi/production/controller/SalesLedgerProductionAccountingController.java
+++ b/src/main/java/com/ruoyi/production/controller/SalesLedgerProductionAccountingController.java
@@ -7,7 +7,6 @@
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;
diff --git a/src/main/java/com/ruoyi/production/controller/SalesLedgerSchedulingController.java b/src/main/java/com/ruoyi/production/controller/SalesLedgerSchedulingController.java
index 5ca3bc2..e11c3f9 100644
--- a/src/main/java/com/ruoyi/production/controller/SalesLedgerSchedulingController.java
+++ b/src/main/java/com/ruoyi/production/controller/SalesLedgerSchedulingController.java
@@ -7,10 +7,8 @@
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;
@@ -35,34 +33,25 @@
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)
diff --git a/src/main/java/com/ruoyi/production/controller/SalesLedgerWorkController.java b/src/main/java/com/ruoyi/production/controller/SalesLedgerWorkController.java
index 4051ecf..38d57df 100644
--- a/src/main/java/com/ruoyi/production/controller/SalesLedgerWorkController.java
+++ b/src/main/java/com/ruoyi/production/controller/SalesLedgerWorkController.java
@@ -7,12 +7,8 @@
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;
diff --git a/src/main/java/com/ruoyi/production/dto/DaiDto.java b/src/main/java/com/ruoyi/production/dto/DaiDto.java
index 86853cb..c6c4e38 100644
--- a/src/main/java/com/ruoyi/production/dto/DaiDto.java
+++ b/src/main/java/com/ruoyi/production/dto/DaiDto.java
@@ -1,13 +1,13 @@
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
@@ -19,92 +19,59 @@
@Excel(name = "寰呮帓鏁伴噺")
private BigDecimal daiNum;
- @ApiModelProperty(value = "閿�鍞骇鍝両D")
- private Long salesLedgerProductId;
-
- @ApiModelProperty(value = "閿�鍞彴璐D")
- 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;
}
diff --git a/src/main/java/com/ruoyi/production/dto/ProcessSchedulingDto.java b/src/main/java/com/ruoyi/production/dto/ProcessSchedulingDto.java
index 6cf971e..7222d0f 100644
--- a/src/main/java/com/ruoyi/production/dto/ProcessSchedulingDto.java
+++ b/src/main/java/com/ruoyi/production/dto/ProcessSchedulingDto.java
@@ -5,7 +5,6 @@
import lombok.Data;
import java.math.BigDecimal;
-import java.time.LocalDateTime;
/**
* @author :yys
@@ -15,6 +14,26 @@
@ApiModel
public class ProcessSchedulingDto {
+ /**
+ * 鍙e懗鍒嗙被
+ */
+ private String type;
+
+ /**
+ * 澶囨敞
+ */
+ private String remark;
+
+ /**
+ * 鎹熻��
+ */
+ private String loss;
+
+ /**
+ * 棰嗙敤
+ */
+ private String receive;
+
private Long id;
/**
diff --git a/src/main/java/com/ruoyi/production/dto/ProductionDispatchAddDto.java b/src/main/java/com/ruoyi/production/dto/ProductionDispatchAddDto.java
index e78d868..7729e8e 100644
--- a/src/main/java/com/ruoyi/production/dto/ProductionDispatchAddDto.java
+++ b/src/main/java/com/ruoyi/production/dto/ProductionDispatchAddDto.java
@@ -17,7 +17,7 @@
@ApiModelProperty(value = "閿�鍞彴璐D")
private Long salesLedgerId;
- @ApiModelProperty(value = "閿�鍞骇鍝両D")
+ @ApiModelProperty(value = "鐢熶骇璁㈠崟ID")
private Long salesLedgerProductId;
/**
diff --git a/src/main/java/com/ruoyi/production/dto/SalesLedgerProductDto.java b/src/main/java/com/ruoyi/production/dto/SalesLedgerProductDto.java
index 33e758d..fa17bc6 100644
--- a/src/main/java/com/ruoyi/production/dto/SalesLedgerProductDto.java
+++ b/src/main/java/com/ruoyi/production/dto/SalesLedgerProductDto.java
@@ -1,13 +1,9 @@
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
@@ -17,34 +13,34 @@
@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;
/**
diff --git a/src/main/java/com/ruoyi/production/dto/SalesLedgerSchedulingDto.java b/src/main/java/com/ruoyi/production/dto/SalesLedgerSchedulingDto.java
index 4e606a1..f8432c7 100644
--- a/src/main/java/com/ruoyi/production/dto/SalesLedgerSchedulingDto.java
+++ b/src/main/java/com/ruoyi/production/dto/SalesLedgerSchedulingDto.java
@@ -1,7 +1,5 @@
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;
@@ -10,7 +8,6 @@
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
-import java.time.LocalDate;
import java.util.Date;
/**
diff --git a/src/main/java/com/ruoyi/production/dto/SalesLedgerSchedulingProcessDto.java b/src/main/java/com/ruoyi/production/dto/SalesLedgerSchedulingProcessDto.java
index 8952455..308b506 100644
--- a/src/main/java/com/ruoyi/production/dto/SalesLedgerSchedulingProcessDto.java
+++ b/src/main/java/com/ruoyi/production/dto/SalesLedgerSchedulingProcessDto.java
@@ -1,7 +1,5 @@
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;
@@ -20,11 +18,8 @@
@ApiModel
public class SalesLedgerSchedulingProcessDto {
- @ApiModelProperty(value = "閿�鍞骇鍝両D")
+ @ApiModelProperty(value = "鐢熶骇璁㈠崟ID")
private Long salesLedgerProductId;
-
- @ApiModelProperty(value = "閿�鍞彴璐D")
- private Long salesLedgerId;
@ApiModelProperty(value = "寮�濮嬫椂闂�")
private String entryDateStart;
@@ -38,38 +33,17 @@
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;
/**
diff --git a/src/main/java/com/ruoyi/production/dto/SalesLedgerWorkDto.java b/src/main/java/com/ruoyi/production/dto/SalesLedgerWorkDto.java
index 055f2a8..5b5fae8 100644
--- a/src/main/java/com/ruoyi/production/dto/SalesLedgerWorkDto.java
+++ b/src/main/java/com/ruoyi/production/dto/SalesLedgerWorkDto.java
@@ -6,7 +6,6 @@
import lombok.Data;
import java.math.BigDecimal;
-import java.time.LocalDate;
/**
* @author :yys
@@ -86,5 +85,29 @@
@Excel(name = "鐘舵��", readConverterExp = "1=寰呯敓浜�,2=鐢熶骇涓�,3=宸叉姤宸�")
private String statusName;
+ /**
+ * 鍙e懗鍒嗙被
+ */
+ @ApiModelProperty(value = "鍙e懗鍒嗙被")
+ private String type;
+
+ /**
+ * 澶囨敞
+ */
+ @ApiModelProperty(value = "澶囨敞")
+ private String remark;
+
+ /**
+ * 鎹熻��
+ */
+ @ApiModelProperty(value = "鎹熻��")
+ private String loss;
+
+ /**
+ * 棰嗙敤
+ */
+ @ApiModelProperty(value = "棰嗙敤")
+ private String receive;
+
}
diff --git a/src/main/java/com/ruoyi/production/mapper/ProductionOrderMapper.java b/src/main/java/com/ruoyi/production/mapper/ProductionOrderMapper.java
new file mode 100644
index 0000000..e65f550
--- /dev/null
+++ b/src/main/java/com/ruoyi/production/mapper/ProductionOrderMapper.java
@@ -0,0 +1,11 @@
+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> {
+}
diff --git a/src/main/java/com/ruoyi/production/pojo/ProductionOrder.java b/src/main/java/com/ruoyi/production/pojo/ProductionOrder.java
new file mode 100644
index 0000000..a58754b
--- /dev/null
+++ b/src/main/java/com/ruoyi/production/pojo/ProductionOrder.java
@@ -0,0 +1,139 @@
+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;
+
+}
diff --git a/src/main/java/com/ruoyi/production/pojo/SalesLedgerScheduling.java b/src/main/java/com/ruoyi/production/pojo/SalesLedgerScheduling.java
index 937ff7f..e3e6dde 100644
--- a/src/main/java/com/ruoyi/production/pojo/SalesLedgerScheduling.java
+++ b/src/main/java/com/ruoyi/production/pojo/SalesLedgerScheduling.java
@@ -28,7 +28,7 @@
private Long salesLedgerId;
/**
- * 閿�鍞骇鍝乮d
+ * 鐢熶骇璁㈠崟id
*/
private Long salesLedgerProductId;
diff --git a/src/main/java/com/ruoyi/production/pojo/SalesLedgerWork.java b/src/main/java/com/ruoyi/production/pojo/SalesLedgerWork.java
index b722105..a64e579 100644
--- a/src/main/java/com/ruoyi/production/pojo/SalesLedgerWork.java
+++ b/src/main/java/com/ruoyi/production/pojo/SalesLedgerWork.java
@@ -33,7 +33,7 @@
private Long salesLedgerId;
/**
- * 閿�鍞骇鍝乮d
+ * 鐢熶骇璁㈠崟id
*/
private Long salesLedgerProductId;
@@ -67,6 +67,26 @@
* 宸ュ簭
*/
private String process;
+
+ /**
+ * 鍙e懗鍒嗙被
+ */
+ private String type;
+
+ /**
+ * 澶囨敞
+ */
+ private String remark;
+
+ /**
+ * 鎹熻��
+ */
+ private String loss;
+
+ /**
+ * 棰嗙敤
+ */
+ private String receive;
/**
* 鎺掍骇鏃ユ湡
*/
diff --git a/src/main/java/com/ruoyi/production/service/ProductionOrderService.java b/src/main/java/com/ruoyi/production/service/ProductionOrderService.java
new file mode 100644
index 0000000..b2ab5e8
--- /dev/null
+++ b/src/main/java/com/ruoyi/production/service/ProductionOrderService.java
@@ -0,0 +1,20 @@
+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);
+}
diff --git a/src/main/java/com/ruoyi/production/service/SalesLedgerSchedulingService.java b/src/main/java/com/ruoyi/production/service/SalesLedgerSchedulingService.java
index 2387e87..484bd23 100644
--- a/src/main/java/com/ruoyi/production/service/SalesLedgerSchedulingService.java
+++ b/src/main/java/com/ruoyi/production/service/SalesLedgerSchedulingService.java
@@ -29,6 +29,4 @@
int productionDispatchDelete(List<Long> ids);
int processScheduling(List<ProcessSchedulingDto> processSchedulingDto);
-
- void exportOne(HttpServletResponse response);
}
diff --git a/src/main/java/com/ruoyi/production/service/SalesLedgerWorkService.java b/src/main/java/com/ruoyi/production/service/SalesLedgerWorkService.java
index b219515..b99855f 100644
--- a/src/main/java/com/ruoyi/production/service/SalesLedgerWorkService.java
+++ b/src/main/java/com/ruoyi/production/service/SalesLedgerWorkService.java
@@ -3,7 +3,6 @@
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;
diff --git a/src/main/java/com/ruoyi/production/service/impl/ProductionOrderServiceImpl.java b/src/main/java/com/ruoyi/production/service/impl/ProductionOrderServiceImpl.java
new file mode 100644
index 0000000..3faf934
--- /dev/null
+++ b/src/main/java/com/ruoyi/production/service/impl/ProductionOrderServiceImpl.java
@@ -0,0 +1,147 @@
+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, "鐢熶骇娲惧伐");
+ }
+}
diff --git a/src/main/java/com/ruoyi/production/service/impl/SalesLedgerSchedulingServiceImpl.java b/src/main/java/com/ruoyi/production/service/impl/SalesLedgerSchedulingServiceImpl.java
index 4f60b7e..4814c79 100644
--- a/src/main/java/com/ruoyi/production/service/impl/SalesLedgerSchedulingServiceImpl.java
+++ b/src/main/java/com/ruoyi/production/service/impl/SalesLedgerSchedulingServiceImpl.java
@@ -5,8 +5,10 @@
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;
@@ -16,7 +18,6 @@
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;
@@ -24,7 +25,6 @@
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;
@@ -152,10 +152,6 @@
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("褰撳墠鎺掍骇鏁伴噺澶т簬寰呮帓浜ф暟閲忥紝璇蜂粩缁嗘牳瀵癸紒");
}
@@ -171,6 +167,10 @@
.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())
@@ -181,21 +181,4 @@
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, "鐢熶骇娲惧伐");
- }
}
diff --git a/src/main/java/com/ruoyi/production/service/impl/SalesLedgerWorkServiceImpl.java b/src/main/java/com/ruoyi/production/service/impl/SalesLedgerWorkServiceImpl.java
index bf35f8a..ddbee03 100644
--- a/src/main/java/com/ruoyi/production/service/impl/SalesLedgerWorkServiceImpl.java
+++ b/src/main/java/com/ruoyi/production/service/impl/SalesLedgerWorkServiceImpl.java
@@ -4,14 +4,12 @@
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;
diff --git a/src/main/java/com/ruoyi/project/system/controller/SysDeptController.java b/src/main/java/com/ruoyi/project/system/controller/SysDeptController.java
index 0a48efe..a33563d 100644
--- a/src/main/java/com/ruoyi/project/system/controller/SysDeptController.java
+++ b/src/main/java/com/ruoyi/project/system/controller/SysDeptController.java
@@ -1,6 +1,8 @@
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;
@@ -81,6 +83,7 @@
return error("鏂板閮ㄩ棬'" + dept.getDeptName() + "'澶辫触锛岄儴闂ㄥ悕绉板凡瀛樺湪");
}
dept.setCreateBy(getUsername());
+ dept.setTenantId(SecurityUtils.getLoginUser().getTenantId());
return toAjax(deptService.insertDept(dept));
}
diff --git a/src/main/java/com/ruoyi/project/system/controller/SysPostController.java b/src/main/java/com/ruoyi/project/system/controller/SysPostController.java
index a49692c..b159a27 100644
--- a/src/main/java/com/ruoyi/project/system/controller/SysPostController.java
+++ b/src/main/java/com/ruoyi/project/system/controller/SysPostController.java
@@ -2,6 +2,8 @@
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;
@@ -86,6 +88,7 @@
return error("鏂板宀椾綅'" + post.getPostName() + "'澶辫触锛屽矖浣嶇紪鐮佸凡瀛樺湪");
}
post.setCreateBy(getUsername());
+ post.setTenantId(SecurityUtils.getLoginUser().getTenantId());
return toAjax(postService.insertPost(post));
}
diff --git a/src/main/java/com/ruoyi/project/system/controller/SysRoleController.java b/src/main/java/com/ruoyi/project/system/controller/SysRoleController.java
index c3766bf..10acb62 100644
--- a/src/main/java/com/ruoyi/project/system/controller/SysRoleController.java
+++ b/src/main/java/com/ruoyi/project/system/controller/SysRoleController.java
@@ -2,6 +2,8 @@
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;
@@ -93,15 +95,16 @@
@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));
}
@@ -116,14 +119,14 @@
{
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)
diff --git a/src/main/java/com/ruoyi/project/system/controller/SysUserController.java b/src/main/java/com/ruoyi/project/system/controller/SysUserController.java
index 14618a9..b2f5725 100644
--- a/src/main/java/com/ruoyi/project/system/controller/SysUserController.java
+++ b/src/main/java/com/ruoyi/project/system/controller/SysUserController.java
@@ -114,7 +114,8 @@
}
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);
@@ -144,6 +145,7 @@
return error("鏂板鐢ㄦ埛'" + user.getUserName() + "'澶辫触锛岄偖绠辫处鍙峰凡瀛樺湪");
}
user.setCreateBy(getUsername());
+ user.setTenantId(SecurityUtils.getLoginUser().getTenantId());
user.setPassword(SecurityUtils.encryptPassword(user.getPassword()));
return toAjax(userService.insertUser(user));
}
@@ -278,8 +280,8 @@
@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);
}
diff --git a/src/main/java/com/ruoyi/project/system/domain/SysDept.java b/src/main/java/com/ruoyi/project/system/domain/SysDept.java
index e2c6b2b..cdd1924 100644
--- a/src/main/java/com/ruoyi/project/system/domain/SysDept.java
+++ b/src/main/java/com/ruoyi/project/system/domain/SysDept.java
@@ -54,7 +54,17 @@
/** 閮ㄩ棬缂栧彿 */
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>();
diff --git a/src/main/java/com/ruoyi/project/system/domain/SysPost.java b/src/main/java/com/ruoyi/project/system/domain/SysPost.java
index e9b7ecd..787df98 100644
--- a/src/main/java/com/ruoyi/project/system/domain/SysPost.java
+++ b/src/main/java/com/ruoyi/project/system/domain/SysPost.java
@@ -38,6 +38,16 @@
@Excel(name = "鐘舵��", readConverterExp = "0=姝e父,1=鍋滅敤")
private String status;
+ private Long tenantId;
+
+ public Long getTenantId() {
+ return tenantId;
+ }
+
+ public void setTenantId(Long tenantId) {
+ this.tenantId = tenantId;
+ }
+
/** 鐢ㄦ埛鏄惁瀛樺湪姝ゅ矖浣嶆爣璇� 榛樿涓嶅瓨鍦� */
private boolean flag = false;
diff --git a/src/main/java/com/ruoyi/project/system/domain/SysRole.java b/src/main/java/com/ruoyi/project/system/domain/SysRole.java
index 67941af..b6ad698 100644
--- a/src/main/java/com/ruoyi/project/system/domain/SysRole.java
+++ b/src/main/java/com/ruoyi/project/system/domain/SysRole.java
@@ -4,6 +4,9 @@
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;
@@ -64,6 +67,17 @@
/** 瑙掕壊鑿滃崟鏉冮檺 */
private Set<String> permissions;
+ /**绉熸埛id*/
+ private Long tenantId;
+
+ public Long getTenantId() {
+ return tenantId;
+ }
+
+ public void setTenantId(Long tenantId) {
+ this.tenantId = tenantId;
+ }
+
public SysRole()
{
diff --git a/src/main/java/com/ruoyi/project/system/mapper/SysDeptMapper.java b/src/main/java/com/ruoyi/project/system/mapper/SysDeptMapper.java
index 0b4dae4..b263c14 100644
--- a/src/main/java/com/ruoyi/project/system/mapper/SysDeptMapper.java
+++ b/src/main/java/com/ruoyi/project/system/mapper/SysDeptMapper.java
@@ -122,4 +122,6 @@
* @return
*/
Long maxLevelDeptId(Long deptId);
+
+ SysDept selectDeptByDeptName(@Param("deptName") String deptName);
}
diff --git a/src/main/java/com/ruoyi/project/system/mapper/SysPostMapper.java b/src/main/java/com/ruoyi/project/system/mapper/SysPostMapper.java
index abc50a2..cffa929 100644
--- a/src/main/java/com/ruoyi/project/system/mapper/SysPostMapper.java
+++ b/src/main/java/com/ruoyi/project/system/mapper/SysPostMapper.java
@@ -2,6 +2,7 @@
import java.util.List;
import com.ruoyi.project.system.domain.SysPost;
+import org.apache.ibatis.annotations.Param;
/**
* 宀椾綅淇℃伅 鏁版嵁灞�
@@ -96,4 +97,6 @@
* @return 缁撴灉
*/
public SysPost checkPostCodeUnique(String postCode);
+
+ List<SysPost> selectPostByTenantId(@Param("tenantId") Long tenantId);
}
diff --git a/src/main/java/com/ruoyi/project/system/service/ISysDeptService.java b/src/main/java/com/ruoyi/project/system/service/ISysDeptService.java
index 77eda76..11e6726 100644
--- a/src/main/java/com/ruoyi/project/system/service/ISysDeptService.java
+++ b/src/main/java/com/ruoyi/project/system/service/ISysDeptService.java
@@ -20,6 +20,14 @@
public List<SysDept> selectDeptList(SysDept dept);
/**
+ * 鏍规嵁閮ㄩ棬鍚嶇О鏌ヨ閮ㄩ棬淇℃伅
+ *
+ * @param deptName 閮ㄩ棬鍚嶇О
+ * @return 閮ㄩ棬淇℃伅闆嗗悎
+ */
+ public SysDept selectDeptByDeptName(String deptName);
+
+ /**
* 鏌ヨ閮ㄩ棬鏍戠粨鏋勪俊鎭�
*
* @param dept 閮ㄩ棬淇℃伅
diff --git a/src/main/java/com/ruoyi/project/system/service/ISysPostService.java b/src/main/java/com/ruoyi/project/system/service/ISysPostService.java
index 042f687..9f062f8 100644
--- a/src/main/java/com/ruoyi/project/system/service/ISysPostService.java
+++ b/src/main/java/com/ruoyi/project/system/service/ISysPostService.java
@@ -96,4 +96,6 @@
* @return 缁撴灉
*/
public int updatePost(SysPost post);
+
+ public List<SysPost> selectPostByTenantId(Long tenantId);
}
diff --git a/src/main/java/com/ruoyi/project/system/service/impl/SysDeptServiceImpl.java b/src/main/java/com/ruoyi/project/system/service/impl/SysDeptServiceImpl.java
index eae688f..08d97f8 100644
--- a/src/main/java/com/ruoyi/project/system/service/impl/SysDeptServiceImpl.java
+++ b/src/main/java/com/ruoyi/project/system/service/impl/SysDeptServiceImpl.java
@@ -42,12 +42,17 @@
* @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);
+ }
+
/**
* 鏌ヨ閮ㄩ棬鏍戠粨鏋勪俊鎭�
*
diff --git a/src/main/java/com/ruoyi/project/system/service/impl/SysPostServiceImpl.java b/src/main/java/com/ruoyi/project/system/service/impl/SysPostServiceImpl.java
index 5501e27..4deddb1 100644
--- a/src/main/java/com/ruoyi/project/system/service/impl/SysPostServiceImpl.java
+++ b/src/main/java/com/ruoyi/project/system/service/impl/SysPostServiceImpl.java
@@ -1,6 +1,9 @@
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;
@@ -32,6 +35,7 @@
* @return 宀椾綅淇℃伅闆嗗悎
*/
@Override
+ @DataScope(tenantIdFelid = "p")
public List<SysPost> selectPostList(SysPost post)
{
return postMapper.selectPostList(post);
@@ -175,4 +179,10 @@
{
return postMapper.updatePost(post);
}
+
+ @Override
+ @DataScope(tenantIdFelid = "p")
+ public List<SysPost> selectPostByTenantId(Long tenantId) {
+ return postMapper.selectPostByTenantId(tenantId);
+ }
}
diff --git a/src/main/java/com/ruoyi/project/system/service/impl/SysRoleServiceImpl.java b/src/main/java/com/ruoyi/project/system/service/impl/SysRoleServiceImpl.java
index 1fe2055..9cf549f 100644
--- a/src/main/java/com/ruoyi/project/system/service/impl/SysRoleServiceImpl.java
+++ b/src/main/java/com/ruoyi/project/system/service/impl/SysRoleServiceImpl.java
@@ -52,7 +52,7 @@
* @return 瑙掕壊鏁版嵁闆嗗悎淇℃伅
*/
@Override
- @DataScope(deptAlias = "d")
+ @DataScope(tenantIdFelid = "r")
public List<SysRole> selectRoleList(SysRole role)
{
return roleMapper.selectRoleList(role);
diff --git a/src/main/java/com/ruoyi/project/system/service/impl/SysUserServiceImpl.java b/src/main/java/com/ruoyi/project/system/service/impl/SysUserServiceImpl.java
index 6bb8927..f547d54 100644
--- a/src/main/java/com/ruoyi/project/system/service/impl/SysUserServiceImpl.java
+++ b/src/main/java/com/ruoyi/project/system/service/impl/SysUserServiceImpl.java
@@ -72,7 +72,7 @@
* @return 鐢ㄦ埛淇℃伅闆嗗悎淇℃伅
*/
@Override
- @DataScope(deptAlias = "d", userAlias = "u")
+ @DataScope(tenantIdFelid = "u")
public List<SysUser> selectUserList(SysUser user)
{
return userMapper.selectUserList(user);
diff --git a/src/main/java/com/ruoyi/purchase/dto/TicketRegistrationDto.java b/src/main/java/com/ruoyi/purchase/dto/TicketRegistrationDto.java
index 33de871..98fe48e 100644
--- a/src/main/java/com/ruoyi/purchase/dto/TicketRegistrationDto.java
+++ b/src/main/java/com/ruoyi/purchase/dto/TicketRegistrationDto.java
@@ -19,6 +19,8 @@
@Data
@TableName("ticket_registration")
public class TicketRegistrationDto extends TicketRegistration {
+ @TableField(exist = false)
+ private Long userId;
/**
* 涓婚敭ID
diff --git a/src/main/java/com/ruoyi/purchase/service/impl/PaymentRegistrationServiceImpl.java b/src/main/java/com/ruoyi/purchase/service/impl/PaymentRegistrationServiceImpl.java
index 30e838f..87224c7 100644
--- a/src/main/java/com/ruoyi/purchase/service/impl/PaymentRegistrationServiceImpl.java
+++ b/src/main/java/com/ruoyi/purchase/service/impl/PaymentRegistrationServiceImpl.java
@@ -10,6 +10,7 @@
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;
diff --git a/src/main/java/com/ruoyi/purchase/service/impl/ProductRecordServiceImpl.java b/src/main/java/com/ruoyi/purchase/service/impl/ProductRecordServiceImpl.java
index 16eef79..045be00 100644
--- a/src/main/java/com/ruoyi/purchase/service/impl/ProductRecordServiceImpl.java
+++ b/src/main/java/com/ruoyi/purchase/service/impl/ProductRecordServiceImpl.java
@@ -5,6 +5,7 @@
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;
@@ -60,6 +61,8 @@
@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);
diff --git a/src/main/java/com/ruoyi/purchase/service/impl/PurchaseLedgerServiceImpl.java b/src/main/java/com/ruoyi/purchase/service/impl/PurchaseLedgerServiceImpl.java
index e5a64fd..70762b9 100644
--- a/src/main/java/com/ruoyi/purchase/service/impl/PurchaseLedgerServiceImpl.java
+++ b/src/main/java/com/ruoyi/purchase/service/impl/PurchaseLedgerServiceImpl.java
@@ -114,7 +114,6 @@
@Transactional(rollbackFor = Exception.class)
public int addOrEditPurchase(PurchaseLedgerDto purchaseLedgerDto) throws IOException {
- SalesLedger salesLedger = salesLedgerMapper.selectById(purchaseLedgerDto.getSalesLedgerId());
//褰曞叆浜�
SysUser sysUser = userMapper.selectUserById(purchaseLedgerDto.getRecorderId());
@@ -127,7 +126,7 @@
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());
@@ -473,6 +472,8 @@
@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()));
diff --git a/src/main/java/com/ruoyi/purchase/service/impl/TicketRegistrationServiceImpl.java b/src/main/java/com/ruoyi/purchase/service/impl/TicketRegistrationServiceImpl.java
index f696be7..418397e 100644
--- a/src/main/java/com/ruoyi/purchase/service/impl/TicketRegistrationServiceImpl.java
+++ b/src/main/java/com/ruoyi/purchase/service/impl/TicketRegistrationServiceImpl.java
@@ -10,6 +10,7 @@
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;
@@ -343,6 +344,7 @@
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())) {
diff --git a/src/main/java/com/ruoyi/tide/controller/TideController.java b/src/main/java/com/ruoyi/tide/controller/TideController.java
index 695b17d..ec7716d 100644
--- a/src/main/java/com/ruoyi/tide/controller/TideController.java
+++ b/src/main/java/com/ruoyi/tide/controller/TideController.java
@@ -1,5 +1,6 @@
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;
@@ -7,20 +8,28 @@
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;
@@ -37,6 +46,9 @@
@Autowired
private ISysUserService userService;
+ @Autowired
+ private ISysDeptService deptService;
+
@ApiOperation(value = "鐧诲綍")
@PostMapping("/tideLogin")
public AjaxResult login(@RequestBody TidePojo tidePojo) {
@@ -52,12 +64,28 @@
}
@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);//鐖跺叕鍙竔d
+ 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);
@@ -67,8 +95,9 @@
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<>();
diff --git a/src/main/java/com/ruoyi/tide/utils/TideUtils.java b/src/main/java/com/ruoyi/tide/utils/TideUtils.java
index cd5d093..2c63466 100644
--- a/src/main/java/com/ruoyi/tide/utils/TideUtils.java
+++ b/src/main/java/com/ruoyi/tide/utils/TideUtils.java
@@ -26,7 +26,7 @@
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) {
@@ -104,7 +104,7 @@
/**
* 浜斿垎閽熶竴娆$殑蹇冭烦
*/
- @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";
diff --git a/src/main/java/com/ruoyi/vehicleInformationCollectionReview/controller/VehicleInformationCollectionController.java b/src/main/java/com/ruoyi/vehicleInformationCollectionReview/controller/VehicleInformationCollectionController.java
new file mode 100644
index 0000000..f67804d
--- /dev/null
+++ b/src/main/java/com/ruoyi/vehicleInformationCollectionReview/controller/VehicleInformationCollectionController.java
@@ -0,0 +1,51 @@
+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())));
+ }
+
+}
diff --git a/src/main/java/com/ruoyi/vehicleInformationCollectionReview/dto/VehicleInformationCollectionReviewDTO.java b/src/main/java/com/ruoyi/vehicleInformationCollectionReview/dto/VehicleInformationCollectionReviewDTO.java
new file mode 100644
index 0000000..233dc10
--- /dev/null
+++ b/src/main/java/com/ruoyi/vehicleInformationCollectionReview/dto/VehicleInformationCollectionReviewDTO.java
@@ -0,0 +1,9 @@
+package com.ruoyi.vehicleInformationCollectionReview.dto;
+
+import com.ruoyi.vehicleInformationCollectionReview.pojo.VehicleInformationCollectionReview;
+import lombok.Data;
+
+@Data
+public class VehicleInformationCollectionReviewDTO extends VehicleInformationCollectionReview {
+
+}
diff --git a/src/main/java/com/ruoyi/vehicleInformationCollectionReview/mapper/VehicleInformationCollectionReviewMapper.java b/src/main/java/com/ruoyi/vehicleInformationCollectionReview/mapper/VehicleInformationCollectionReviewMapper.java
new file mode 100644
index 0000000..e1b9a5a
--- /dev/null
+++ b/src/main/java/com/ruoyi/vehicleInformationCollectionReview/mapper/VehicleInformationCollectionReviewMapper.java
@@ -0,0 +1,20 @@
+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 閽堝琛ㄣ�恦ehicle_information_collection_review銆戠殑鏁版嵁搴撴搷浣淢apper
+* @createDate 2026-01-06 19:50:48
+* @Entity com.ruoyi.pojo.VehicleInformationCollectionReview
+*/
+@Mapper
+public interface VehicleInformationCollectionReviewMapper extends BaseMapper<VehicleInformationCollectionReview> {
+
+}
+
+
+
+
diff --git a/src/main/java/com/ruoyi/vehicleInformationCollectionReview/pojo/VehicleInformationCollectionReview.java b/src/main/java/com/ruoyi/vehicleInformationCollectionReview/pojo/VehicleInformationCollectionReview.java
new file mode 100644
index 0000000..e319a5c
--- /dev/null
+++ b/src/main/java/com/ruoyi/vehicleInformationCollectionReview/pojo/VehicleInformationCollectionReview.java
@@ -0,0 +1,116 @@
+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;
+
+ /**
+ * 杞﹁締璇嗗埆浠g爜((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;
+}
\ No newline at end of file
diff --git a/src/main/java/com/ruoyi/vehicleInformationCollectionReview/service/VehicleInformationCollectionReviewService.java b/src/main/java/com/ruoyi/vehicleInformationCollectionReview/service/VehicleInformationCollectionReviewService.java
new file mode 100644
index 0000000..d85fea2
--- /dev/null
+++ b/src/main/java/com/ruoyi/vehicleInformationCollectionReview/service/VehicleInformationCollectionReviewService.java
@@ -0,0 +1,18 @@
+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 閽堝琛ㄣ�恦ehicle_information_collection_review銆戠殑鏁版嵁搴撴搷浣淪ervice
+* @createDate 2026-01-06 19:50:48
+*/
+public interface VehicleInformationCollectionReviewService extends IService<VehicleInformationCollectionReview> {
+
+ IPage<VehicleInformationCollectionReview> listPage(Page page, VehicleInformationCollectionReview vehicleInformationCollectionReview);
+
+ long insert(VehicleInformationCollectionReview vehicleInformationCollectionReview);
+}
diff --git a/src/main/java/com/ruoyi/vehicleInformationCollectionReview/service/impl/VehicleInformationCollectionReviewServiceImpl.java b/src/main/java/com/ruoyi/vehicleInformationCollectionReview/service/impl/VehicleInformationCollectionReviewServiceImpl.java
new file mode 100644
index 0000000..46caf29
--- /dev/null
+++ b/src/main/java/com/ruoyi/vehicleInformationCollectionReview/service/impl/VehicleInformationCollectionReviewServiceImpl.java
@@ -0,0 +1,34 @@
+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 閽堝琛ㄣ�恦ehicle_information_collection_review銆戠殑鏁版嵁搴撴搷浣淪ervice瀹炵幇
+* @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);
+ }
+}
+
+
+
+
diff --git a/src/main/resources/application-tide.yml b/src/main/resources/application-cgglxt.yml
similarity index 100%
rename from src/main/resources/application-tide.yml
rename to src/main/resources/application-cgglxt.yml
diff --git a/src/main/resources/application-sbglxt.yml b/src/main/resources/application-sbglxt.yml
new file mode 100644
index 0000000..1e2b107
--- /dev/null
+++ b/src/main/resources/application-sbglxt.yml
@@ -0,0 +1,222 @@
+# 鑺-璁惧绠$悊绯荤粺椤圭洰鐩稿叧閰嶇疆
+inspur:
+ appId: 1205969741508771840
+ appSecret: rnAvMDYwMTIwMjYxNzM0MTc4NDEIxC
+ruoyi:
+ # 鍚嶇О
+ name: RuoYi
+ # 鐗堟湰
+ version: 3.8.9
+ # 鐗堟潈骞翠唤
+ copyrightYear: 2025
+ # 鏂囦欢璺緞 绀轰緥锛� Windows閰嶇疆D:/ruoyi/uploadPath锛孡inux閰嶇疆 /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鐨刄RI缂栫爜
+ 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
+ # 鎱QL璁板綍
+ 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:
+ # 鏄惁寮�鍚痵wagger
+ enabled: false
+ # 璇锋眰鍓嶇紑
+ pathMapping: /dev-api
+
+# 闃叉XSS鏀诲嚮
+xss:
+ # 杩囨护寮�鍏�
+ enabled: true
+ # 鎺掗櫎閾炬帴锛堝涓敤閫楀彿鍒嗛殧锛�
+ excludes: /system/notice
+ # 鍖归厤閾炬帴
+ urlPatterns: /system/*,/monitor/*,/tool/*
+
+# 浠g爜鐢熸垚
+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
\ No newline at end of file
diff --git a/src/main/resources/application-scgkxt.yml b/src/main/resources/application-scgkxt.yml
new file mode 100644
index 0000000..cbec68d
--- /dev/null
+++ b/src/main/resources/application-scgkxt.yml
@@ -0,0 +1,222 @@
+# 鑺-鐢熶骇绠℃帶绯荤粺椤圭洰鐩稿叧閰嶇疆
+inspur:
+ appId: 1205970458172719104
+ appSecret: GFHKMDYwMTIwMjYxNzM3MDg3MDc0g1
+ruoyi:
+ # 鍚嶇О
+ name: RuoYi
+ # 鐗堟湰
+ version: 3.8.9
+ # 鐗堟潈骞翠唤
+ copyrightYear: 2025
+ # 鏂囦欢璺緞 绀轰緥锛� Windows閰嶇疆D:/ruoyi/uploadPath锛孡inux閰嶇疆 /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鐨刄RI缂栫爜
+ 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
+ # 鎱QL璁板綍
+ 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:
+ # 鏄惁寮�鍚痵wagger
+ enabled: false
+ # 璇锋眰鍓嶇紑
+ pathMapping: /dev-api
+
+# 闃叉XSS鏀诲嚮
+xss:
+ # 杩囨护寮�鍏�
+ enabled: true
+ # 鎺掗櫎閾炬帴锛堝涓敤閫楀彿鍒嗛殧锛�
+ excludes: /system/notice
+ # 鍖归厤閾炬帴
+ urlPatterns: /system/*,/monitor/*,/tool/*
+
+# 浠g爜鐢熸垚
+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
\ No newline at end of file
diff --git a/src/main/resources/application-xtbgxt.yml b/src/main/resources/application-xtbgxt.yml
new file mode 100644
index 0000000..ba24749
--- /dev/null
+++ b/src/main/resources/application-xtbgxt.yml
@@ -0,0 +1,222 @@
+# 鑺-鍗忓悓鍔炲叕绯荤粺椤圭洰鐩稿叧閰嶇疆
+inspur:
+ appId: 1205970862683979776
+ appSecret: 9UR1MDYwMTIwMjYxNzM4NDUxNTARkN
+ruoyi:
+ # 鍚嶇О
+ name: RuoYi
+ # 鐗堟湰
+ version: 3.8.9
+ # 鐗堟潈骞翠唤
+ copyrightYear: 2025
+ # 鏂囦欢璺緞 绀轰緥锛� Windows閰嶇疆D:/ruoyi/uploadPath锛孡inux閰嶇疆 /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鐨刄RI缂栫爜
+ 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
+ # 鎱QL璁板綍
+ 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:
+ # 鏄惁寮�鍚痵wagger
+ enabled: false
+ # 璇锋眰鍓嶇紑
+ pathMapping: /dev-api
+
+# 闃叉XSS鏀诲嚮
+xss:
+ # 杩囨护寮�鍏�
+ enabled: true
+ # 鎺掗櫎閾炬帴锛堝涓敤閫楀彿鍒嗛殧锛�
+ excludes: /system/notice
+ # 鍖归厤閾炬帴
+ urlPatterns: /system/*,/monitor/*,/tool/*
+
+# 浠g爜鐢熸垚
+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
\ No newline at end of file
diff --git a/src/main/resources/application-yxglxt.yml b/src/main/resources/application-yxglxt.yml
new file mode 100644
index 0000000..26564ca
--- /dev/null
+++ b/src/main/resources/application-yxglxt.yml
@@ -0,0 +1,222 @@
+# 鑺-钀ラ攢绠$悊绯荤粺椤圭洰鐩稿叧閰嶇疆
+inspur:
+ appId: 1205972006802030592
+ appSecret: BgpqMDYwMTIwMjYxNzQzMTc5MjkKou
+ruoyi:
+ # 鍚嶇О
+ name: RuoYi
+ # 鐗堟湰
+ version: 3.8.9
+ # 鐗堟潈骞翠唤
+ copyrightYear: 2025
+ # 鏂囦欢璺緞 绀轰緥锛� Windows閰嶇疆D:/ruoyi/uploadPath锛孡inux閰嶇疆 /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鐨刄RI缂栫爜
+ 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
+ # 鎱QL璁板綍
+ 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:
+ # 鏄惁寮�鍚痵wagger
+ enabled: false
+ # 璇锋眰鍓嶇紑
+ pathMapping: /dev-api
+
+# 闃叉XSS鏀诲嚮
+xss:
+ # 杩囨护寮�鍏�
+ enabled: true
+ # 鎺掗櫎閾炬帴锛堝涓敤閫楀彿鍒嗛殧锛�
+ excludes: /system/notice
+ # 鍖归厤閾炬帴
+ urlPatterns: /system/*,/monitor/*,/tool/*
+
+# 浠g爜鐢熸垚
+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
\ No newline at end of file
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index 9e740c8..2b5d0d9 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -1,4 +1,13 @@
# Spring閰嶇疆
spring:
profiles:
- active: tide
\ No newline at end of file
+ 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
\ No newline at end of file
diff --git a/src/main/resources/mapper/procurementrecord/CustomStorageMapper.xml b/src/main/resources/mapper/procurementrecord/CustomStorageMapper.xml
new file mode 100644
index 0000000..ffce0ba
--- /dev/null
+++ b/src/main/resources/mapper/procurementrecord/CustomStorageMapper.xml
@@ -0,0 +1,50 @@
+<?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>
\ No newline at end of file
diff --git a/src/main/resources/mapper/procurementrecord/ProcurementRecordMapper.xml b/src/main/resources/mapper/procurementrecord/ProcurementRecordMapper.xml
index c378c6a..dd03d4d 100644
--- a/src/main/resources/mapper/procurementrecord/ProcurementRecordMapper.xml
+++ b/src/main/resources/mapper/procurementrecord/ProcurementRecordMapper.xml
@@ -20,7 +20,7 @@
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 != ''">
@@ -42,25 +42,37 @@
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
@@ -84,6 +96,32 @@
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
@@ -101,20 +139,26 @@
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},'%')
@@ -135,7 +179,9 @@
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
@@ -160,7 +206,146 @@
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>
\ No newline at end of file
diff --git a/src/main/resources/mapper/procurementrecord/ProcurementRecordOutMapper.xml b/src/main/resources/mapper/procurementrecord/ProcurementRecordOutMapper.xml
index ec91c53..21117a3 100644
--- a/src/main/resources/mapper/procurementrecord/ProcurementRecordOutMapper.xml
+++ b/src/main/resources/mapper/procurementrecord/ProcurementRecordOutMapper.xml
@@ -17,19 +17,27 @@
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
@@ -49,5 +57,117 @@
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>
\ No newline at end of file
diff --git a/src/main/resources/mapper/production/ProductionOrderMapper.xml b/src/main/resources/mapper/production/ProductionOrderMapper.xml
new file mode 100644
index 0000000..4410077
--- /dev/null
+++ b/src/main/resources/mapper/production/ProductionOrderMapper.xml
@@ -0,0 +1,5 @@
+<?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>
\ No newline at end of file
diff --git a/src/main/resources/mapper/production/SalesLedgerProductionAccountingMapper.xml b/src/main/resources/mapper/production/SalesLedgerProductionAccountingMapper.xml
index 29b88f2..8017590 100644
--- a/src/main/resources/mapper/production/SalesLedgerProductionAccountingMapper.xml
+++ b/src/main/resources/mapper/production/SalesLedgerProductionAccountingMapper.xml
@@ -12,33 +12,18 @@
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')
diff --git a/src/main/resources/mapper/production/SalesLedgerSchedulingMapper.xml b/src/main/resources/mapper/production/SalesLedgerSchedulingMapper.xml
index e7e882c..a2aaa11 100644
--- a/src/main/resources/mapper/production/SalesLedgerSchedulingMapper.xml
+++ b/src/main/resources/mapper/production/SalesLedgerSchedulingMapper.xml
@@ -66,7 +66,6 @@
<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,
@@ -74,33 +73,22 @@
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')
diff --git a/src/main/resources/mapper/production/SalesLedgerWorkMapper.xml b/src/main/resources/mapper/production/SalesLedgerWorkMapper.xml
index 41cbe07..5c2d51e 100644
--- a/src/main/resources/mapper/production/SalesLedgerWorkMapper.xml
+++ b/src/main/resources/mapper/production/SalesLedgerWorkMapper.xml
@@ -13,33 +13,26 @@
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')
diff --git a/src/main/resources/mapper/purchase/ProductRecordMapper.xml b/src/main/resources/mapper/purchase/ProductRecordMapper.xml
index 5c338d7..5fadd64 100644
--- a/src/main/resources/mapper/purchase/ProductRecordMapper.xml
+++ b/src/main/resources/mapper/purchase/ProductRecordMapper.xml
@@ -7,9 +7,7 @@
<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,
@@ -23,12 +21,11 @@
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}
@@ -42,6 +39,9 @@
<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
diff --git a/src/main/resources/mapper/purchase/PurchaseLedgerMapper.xml b/src/main/resources/mapper/purchase/PurchaseLedgerMapper.xml
index bc6c38a..9abb583 100644
--- a/src/main/resources/mapper/purchase/PurchaseLedgerMapper.xml
+++ b/src/main/resources/mapper/purchase/PurchaseLedgerMapper.xml
@@ -44,6 +44,9 @@
<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,
diff --git a/src/main/resources/mapper/system/SysDeptMapper.xml b/src/main/resources/mapper/system/SysDeptMapper.xml
index 5c6310a..aedb633 100644
--- a/src/main/resources/mapper/system/SysDeptMapper.xml
+++ b/src/main/resources/mapper/system/SysDeptMapper.xml
@@ -99,6 +99,7 @@
<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
@@ -112,6 +113,7 @@
<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()
@@ -130,6 +132,7 @@
<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>
@@ -178,5 +181,10 @@
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>
\ No newline at end of file
diff --git a/src/main/resources/mapper/system/SysPostMapper.xml b/src/main/resources/mapper/system/SysPostMapper.xml
index 177f74d..59fff7a 100644
--- a/src/main/resources/mapper/system/SysPostMapper.xml
+++ b/src/main/resources/mapper/system/SysPostMapper.xml
@@ -19,7 +19,7 @@
<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">
@@ -34,6 +34,8 @@
<if test="postName != null and postName != ''">
AND post_name like concat('%', #{postName}, '%')
</if>
+ <!-- 鏁版嵁鑼冨洿杩囨护 -->
+ ${params.dataScope}
</where>
</select>
@@ -71,8 +73,14 @@
<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>
@@ -95,6 +103,7 @@
<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>
@@ -104,6 +113,7 @@
<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>
diff --git a/src/main/resources/mapper/system/SysRoleMapper.xml b/src/main/resources/mapper/system/SysRoleMapper.xml
index 92ab684..cf731b5 100644
--- a/src/main/resources/mapper/system/SysRoleMapper.xml
+++ b/src/main/resources/mapper/system/SysRoleMapper.xml
@@ -27,6 +27,7 @@
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">
@@ -103,6 +104,7 @@
<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(
@@ -115,6 +117,7 @@
<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()
)
diff --git a/src/main/resources/mapper/system/SysUserMapper.xml b/src/main/resources/mapper/system/SysUserMapper.xml
index f77e62c..f457611 100644
--- a/src/main/resources/mapper/system/SysUserMapper.xml
+++ b/src/main/resources/mapper/system/SysUserMapper.xml
@@ -57,7 +57,7 @@
<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
diff --git a/src/main/resources/mapper/vehicleInformationCollectionReview/VehicleInformationCollectionReviewMapper.xml b/src/main/resources/mapper/vehicleInformationCollectionReview/VehicleInformationCollectionReviewMapper.xml
new file mode 100644
index 0000000..7478146
--- /dev/null
+++ b/src/main/resources/mapper/vehicleInformationCollectionReview/VehicleInformationCollectionReviewMapper.xml
@@ -0,0 +1,38 @@
+<?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>
diff --git a/src/main/resources/mybatis/mybatis-config.xml b/src/main/resources/mybatis/mybatis-config.xml
index ee4d2a1..ec5fa1a 100644
--- a/src/main/resources/mybatis/mybatis-config.xml
+++ b/src/main/resources/mybatis/mybatis-config.xml
@@ -12,8 +12,8 @@
<!-- 閰嶇疆榛樿鐨勬墽琛屽櫒.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>
--
Gitblit v1.9.3