From a551af86dd9544836663dc88b6510e1e54f2f040 Mon Sep 17 00:00:00 2001 From: jiang Date: Wed, 17 Dec 2025 16:16:45 +0800 Subject: [PATCH] =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/EquipmentTypeController.java | 6 +-- .../devConfig/mapper/EquipmentTypeMapper.java | 4 ++ .../service/EquipmentTypeService.java | 5 +- .../impl/EquipmentTypeServiceImpl.java | 23 ++++++---- .../devchange/domain/CsDeviceDetails.java | 4 +- .../material/devchange/domain/MaDevInfo.java | 4 +- .../service/DevChangeServiceImpl.java | 1 + .../material/device/domain/vo/DevInfoVo.java | 3 ++ .../home/controller/MaTypeInfoController.java | 13 ++++++ .../home/mapper/MaTypeInfoMapper.java | 2 + .../home/service/MaTypeInfoSevice.java | 1 + .../service/impl/MaTypeInfoServiceImpl.java | 14 ++++-- .../devConfig/EquipmentTypeMapper.xml | 15 ++++++ .../material/devchange/DevChangeMapper.xml | 45 ++++++++++++------ .../mapper/material/device/DevInfoMapper.xml | 17 +++++-- .../mapper/material/device/DevMergeMapper.xml | 46 +++++++++++++------ .../mapper/material/home/MaTypeInfoMapper.xml | 11 +++++ .../mapper/material/order/OrderInfoMapper.xml | 2 +- .../material/toolLedger/ToolLedgerMapper.xml | 3 +- 19 files changed, 161 insertions(+), 58 deletions(-) diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/devConfig/controller/EquipmentTypeController.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/devConfig/controller/EquipmentTypeController.java index 7a641de..43405e8 100644 --- a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/devConfig/controller/EquipmentTypeController.java +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/devConfig/controller/EquipmentTypeController.java @@ -62,15 +62,13 @@ public class EquipmentTypeController { //添加 @PostMapping("/add") public AjaxResult addEquipmentType(@Validated @RequestBody EquipmentType equipmentType) { - equipmentTypeService.addEquipmentType(equipmentType); - return AjaxResult.success(); + return equipmentTypeService.addEquipmentType(equipmentType); } //更新 @PutMapping("/update") public AjaxResult updateEquipmentType(@Validated @RequestBody EquipmentType equipmentType) { - equipmentTypeService.updateEquipmentType(equipmentType); - return AjaxResult.success(); + return equipmentTypeService.updateEquipmentType(equipmentType); } //删除 diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/devConfig/mapper/EquipmentTypeMapper.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/devConfig/mapper/EquipmentTypeMapper.java index 7fc4b0f..6cc0464 100644 --- a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/devConfig/mapper/EquipmentTypeMapper.java +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/devConfig/mapper/EquipmentTypeMapper.java @@ -61,4 +61,8 @@ public interface EquipmentTypeMapper { Long countChildrenByParentId(@Param("parentId") Long parentId); void deleteTypePropertiesByTypeId(@Param("typeId") Long typeId); + + int getToolByTypeIdAndTypeName(EquipmentType equipmentType); + + int countSameNameInSameLevel(EquipmentType equipmentType); } diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/devConfig/service/EquipmentTypeService.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/devConfig/service/EquipmentTypeService.java index da03f38..351430b 100644 --- a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/devConfig/service/EquipmentTypeService.java +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/devConfig/service/EquipmentTypeService.java @@ -3,6 +3,7 @@ package com.bonus.material.devConfig.service; // EquipmentTypeService.java +import com.bonus.common.core.web.domain.AjaxResult; import com.bonus.material.devConfig.domain.PageResult; import com.bonus.material.devConfig.domain.EquipmentTypeDTO; import com.bonus.material.devConfig.domain.EquipmentType; @@ -23,9 +24,9 @@ public interface EquipmentTypeService { EquipmentType getEquipmentTypeDetail(Long id); - void addEquipmentType(EquipmentType equipmentType); + AjaxResult addEquipmentType(EquipmentType equipmentType); - void updateEquipmentType(EquipmentType equipmentType); + AjaxResult updateEquipmentType(EquipmentType equipmentType); void deleteEquipmentType(Long id); } \ No newline at end of file diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/devConfig/service/impl/EquipmentTypeServiceImpl.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/devConfig/service/impl/EquipmentTypeServiceImpl.java index b8fef3d..8d354c0 100644 --- a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/devConfig/service/impl/EquipmentTypeServiceImpl.java +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/devConfig/service/impl/EquipmentTypeServiceImpl.java @@ -1,6 +1,7 @@ package com.bonus.material.devConfig.service.impl; import com.bonus.common.core.utils.StringUtils; +import com.bonus.common.core.web.domain.AjaxResult; import com.bonus.material.devConfig.domain.PageResult; import com.bonus.material.devConfig.domain.EquipmentTypeDTO; import com.bonus.material.devConfig.domain.EquipmentType; @@ -56,35 +57,39 @@ public class EquipmentTypeServiceImpl implements EquipmentTypeService { @Override @Transactional - public void addEquipmentType(EquipmentType equipmentType) { + public AjaxResult addEquipmentType(EquipmentType equipmentType) { // 设置默认值 - - - // 设置层级,如果没有设置则默认为1 if (equipmentType.getLevel() == null) { equipmentType.setLevel(1); } - equipmentType.setCreateTime(new Date()); equipmentType.setUpdateTime(new Date()); - + // 4. 校验同层级下名称是否重复(避免重复新增) + int sameNameCount = equipmentTypeMapper.getToolByTypeIdAndTypeName(equipmentType); + if (sameNameCount > 0) { + return AjaxResult.error("当前分类下已存在同名类型,新增失败"); + } equipmentTypeMapper.insertEquipmentType(equipmentType); + return AjaxResult.success(); } @Override @Transactional - public void updateEquipmentType(EquipmentType equipmentType) { + public AjaxResult updateEquipmentType(EquipmentType equipmentType) { // 1. 校验父ID是否与自身ID相同 if (equipmentType.getParentId() != null && equipmentType.getParentId().equals(equipmentType.getTypeId())) { // 抛出异常,阻止更新并回滚事务 throw new IllegalArgumentException("父分类ID不能与自身ID相同,更新失败。"); } - - + int sameNameCount = equipmentTypeMapper.countSameNameInSameLevel(equipmentType); + if (sameNameCount > 0) { + return AjaxResult.error("当前分类下已存在同名类型,修改失败"); + } // 4. 执行正常的更新逻辑 equipmentType.setUpdateTime(new Date()); equipmentTypeMapper.updateEquipmentType(equipmentType); + return AjaxResult.success(); } @Override diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/devchange/domain/CsDeviceDetails.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/devchange/domain/CsDeviceDetails.java index a217e61..4ac7277 100644 --- a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/devchange/domain/CsDeviceDetails.java +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/devchange/domain/CsDeviceDetails.java @@ -103,8 +103,6 @@ public class CsDeviceDetails { @ApiModelProperty(value = "下次维保日期(yyyy-MM-dd)") private Date nextMaintenanceDate; - - @Excel(name = "剩余使用年限", width = 25, sort = 9) - private Integer remainingYears; + private String remainingYears; } diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/devchange/domain/MaDevInfo.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/devchange/domain/MaDevInfo.java index de5c5e6..cb47f76 100644 --- a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/devchange/domain/MaDevInfo.java +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/devchange/domain/MaDevInfo.java @@ -239,14 +239,14 @@ public class MaDevInfo { * 最小资产原值(元) * 说明:装备的原始采购价值,以元为单位 */ - private BigDecimal minBuyPrice; + private BigDecimal minOriginalValue; /** * 最大资产原值(元) * 说明:装备的原始采购价值,以元为单位 */ - private BigDecimal maxBuyPrice; + private BigDecimal maxOriginalValue; /** * 最大使用年限(年) diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/devchange/service/DevChangeServiceImpl.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/devchange/service/DevChangeServiceImpl.java index 3119332..91cb9ba 100644 --- a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/devchange/service/DevChangeServiceImpl.java +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/devchange/service/DevChangeServiceImpl.java @@ -450,6 +450,7 @@ public class DevChangeServiceImpl implements DevChangeService { csDeviceDetails.setManageType(StringUtils.isNotBlank(devDetails.getManageType()) ? devDetails.getManageType() : ""); csDeviceDetails.setDevCode(StringUtils.isNotBlank(devDetails.getDevCode()) ? devDetails.getDevCode() : ""); csDeviceDetails.setStorageNum(devDetails.getStorageNum()); + csDeviceDetails.setRemainingYears(StringUtils.isNotBlank(devDetails.getRemainingYears()) ? devDetails.getRemainingYears() : "-"); // 用于编辑显示数据是否选中(前端根据typeId和id结合判断) csDeviceDetails.setId(devDetails.getId()); } diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/domain/vo/DevInfoVo.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/domain/vo/DevInfoVo.java index efcbc9d..c5a8468 100644 --- a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/domain/vo/DevInfoVo.java +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/domain/vo/DevInfoVo.java @@ -199,4 +199,7 @@ public class DevInfoVo extends DevInfo { private String manageMode; + private String maType; + private String toolType; + } diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/home/controller/MaTypeInfoController.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/home/controller/MaTypeInfoController.java index 965baf3..5191c65 100644 --- a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/home/controller/MaTypeInfoController.java +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/home/controller/MaTypeInfoController.java @@ -49,6 +49,19 @@ public class MaTypeInfoController extends BaseController { return AjaxResult.success(list); } + + /** + * 装备共享页面之一级设备类型 + * @param typeInfo + * @return + */ + @ApiOperation("装备共享页面之一级设备类型") + @GetMapping("/getToolTypeList") + public AjaxResult getToolTypeList(TypeInfo typeInfo) { + List list = maTypeInfoSevice.getToolTypeList(typeInfo); + return AjaxResult.success(list); + } + /** * 首页搜索热搜装备 * @param devInfoVo diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/home/mapper/MaTypeInfoMapper.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/home/mapper/MaTypeInfoMapper.java index b2f2457..b929d22 100644 --- a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/home/mapper/MaTypeInfoMapper.java +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/home/mapper/MaTypeInfoMapper.java @@ -50,4 +50,6 @@ public interface MaTypeInfoMapper { * @return */ TypeInfo getTypeId(TypeInfo typeInfo); + + List getToolTypeList(TypeInfo typeInfo); } diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/home/service/MaTypeInfoSevice.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/home/service/MaTypeInfoSevice.java index 3361395..e0883a2 100644 --- a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/home/service/MaTypeInfoSevice.java +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/home/service/MaTypeInfoSevice.java @@ -38,4 +38,5 @@ public interface MaTypeInfoSevice { */ List getArea(AreaVo areaVo); + List getToolTypeList(TypeInfo typeInfo); } diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/home/service/impl/MaTypeInfoServiceImpl.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/home/service/impl/MaTypeInfoServiceImpl.java index 89b8488..13f9369 100644 --- a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/home/service/impl/MaTypeInfoServiceImpl.java +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/home/service/impl/MaTypeInfoServiceImpl.java @@ -17,10 +17,7 @@ import org.apache.commons.collections4.CollectionUtils; import org.springframework.stereotype.Service; import javax.annotation.Resource; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.stream.Collectors; @Service @@ -138,4 +135,13 @@ public class MaTypeInfoServiceImpl implements MaTypeInfoSevice { return maTypeInfoMapper.getArea(areaVo); } + /** + * @param typeInfo + * @return + */ + @Override + public List getToolTypeList(TypeInfo typeInfo) { + return maTypeInfoMapper.getToolTypeList(typeInfo); + } + } diff --git a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/devConfig/EquipmentTypeMapper.xml b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/devConfig/EquipmentTypeMapper.xml index 3685c70..711ea4a 100644 --- a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/devConfig/EquipmentTypeMapper.xml +++ b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/devConfig/EquipmentTypeMapper.xml @@ -103,4 +103,19 @@ SELECT COUNT(*) FROM ma_type WHERE parent_id = #{parentId} and level != '7' + + + \ No newline at end of file diff --git a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/devchange/DevChangeMapper.xml b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/devchange/DevChangeMapper.xml index aa4d8f0..9bfe789 100644 --- a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/devchange/DevChangeMapper.xml +++ b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/devchange/DevChangeMapper.xml @@ -291,7 +291,6 @@ SELECT t.type_id FROM tool_type t INNER JOIN tool_category_tree tct ON t.parent_id = tct.type_id ) - -- 装备表查询(原有逻辑不变) SELECT CASE @@ -314,10 +313,18 @@ mdi.type_id AS typeId, mdi.ma_id AS id, mdq.next_check_time AS nextMaintenanceDate, + IF(DATEDIFF(STR_TO_DATE(DATE_ADD(mdi.production_date, INTERVAL mdi.max_working_hours YEAR), '%Y-%m-%d'), + CURDATE()) < 0,'已超过最大使用年限',CONCAT(IF(STR_TO_DATE(DATE_ADD(mdi.production_date, INTERVAL + mdi.max_working_hours YEAR), '%Y-%m-%d') IS NOT + NULL + AND STR_TO_DATE(DATE_ADD(mdi.production_date, INTERVAL mdi.max_working_hours YEAR), '%Y-%m-%d') >= CURDATE(), + DATEDIFF(STR_TO_DATE(DATE_ADD(mdi.production_date, INTERVAL mdi.max_working_hours YEAR), '%Y-%m-%d'), + CURDATE()), 0), '天(', IF(STR_TO_DATE(DATE_ADD(mdi.production_date, INTERVAL mdi.max_working_hours YEAR), '%Y-%m-%d') IS NOT NULL AND STR_TO_DATE(DATE_ADD(mdi.production_date, INTERVAL mdi.max_working_hours YEAR), '%Y-%m-%d') >= CURDATE(), TIMESTAMPDIFF(YEAR, CURDATE(), - STR_TO_DATE(DATE_ADD(mdi.production_date, INTERVAL mdi.max_working_hours YEAR), '%Y-%m-%d')), 0) AS + STR_TO_DATE(DATE_ADD(mdi.production_date, INTERVAL mdi.max_working_hours YEAR), '%Y-%m-%d')), 0), '年)' + )) AS remainingYears FROM ma_dev_info mdi LEFT JOIN (SELECT max( next_check_time) next_check_time,ma_id from ma_dev_qc GROUP BY ma_id ) mdq on @@ -365,10 +372,9 @@ 2 AS devType, tl.type_id AS typeId, tl.id AS id, - '-' AS nextMaintenanceDate, + null AS nextMaintenanceDate, '-' AS remainingYears FROM tool_ledger tl - LEFT JOIN tool_type tt ON tl.type_id = tt.type_id LEFT JOIN tool_type tt1 ON tt.parent_id = tt1.type_id LEFT JOIN tool_type tt2 ON tt1.parent_id = tt2.type_id @@ -540,15 +546,28 @@ WHEN mt.level = 6 THEN CONCAT(mt5.type_name, '>', mt4.type_name, '>', mt3.type_name, '>', mt2.type_name,'>', mt1.type_name, '>', mt.type_name) ELSE mt.type_name - END AS category, - mdi.device_name AS typeName, + END AS category, + mdi.device_name AS typeName, mdi.item_type_model AS typeModelName, - mdi.manage_type AS manageType, - mdi.code AS devCode, - SUM(CASE WHEN mdi.ma_status = 1 THEN 1 ELSE 0 END) AS storageNum, - 1 AS devType, - mdi.type_id AS typeId, - mdi.ma_id AS id + mdi.manage_type AS manageType, + mdi.code AS devCode, + SUM(CASE WHEN mdi.ma_status = 1 THEN 1 ELSE 0 END) AS storageNum, + 1 AS devType, + mdi.type_id AS typeId, + mdi.ma_id AS id, + IF(DATEDIFF(STR_TO_DATE(DATE_ADD(mdi.production_date, INTERVAL mdi.max_working_hours YEAR), '%Y-%m-%d'), + CURDATE()) < 0,'已超过最大使用年限',CONCAT(IF(STR_TO_DATE(DATE_ADD(mdi.production_date, INTERVAL + mdi.max_working_hours YEAR), '%Y-%m-%d') IS NOT + NULL + AND STR_TO_DATE(DATE_ADD(mdi.production_date, INTERVAL mdi.max_working_hours YEAR), '%Y-%m-%d') >= CURDATE(), + DATEDIFF(STR_TO_DATE(DATE_ADD(mdi.production_date, INTERVAL mdi.max_working_hours YEAR), '%Y-%m-%d'), + CURDATE()), 0), '天(', + IF(STR_TO_DATE(DATE_ADD(mdi.production_date, INTERVAL mdi.max_working_hours YEAR), '%Y-%m-%d') IS NOT NULL + AND STR_TO_DATE(DATE_ADD(mdi.production_date, INTERVAL mdi.max_working_hours YEAR), '%Y-%m-%d') >= CURDATE(), + TIMESTAMPDIFF(YEAR, CURDATE(), + STR_TO_DATE(DATE_ADD(mdi.production_date, INTERVAL mdi.max_working_hours YEAR), '%Y-%m-%d')), 0), '年)' + )) AS + remainingYears FROM ma_dev_info mdi LEFT JOIN ma_type mt ON mdi.type_id = mt.type_id LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id @@ -557,7 +576,7 @@ LEFT JOIN ma_type mt4 ON mt3.parent_id = mt4.type_id LEFT JOIN ma_type mt5 ON mt4.parent_id = mt5.type_id where - mdi.is_active = '1' and mdi.type_id = #{typeId} + mdi.is_active = '1' and mdi.type_id = #{typeId} and mdi.code = #{devCode} diff --git a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/device/DevInfoMapper.xml b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/device/DevInfoMapper.xml index ec7e725..ae835b1 100644 --- a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/device/DevInfoMapper.xml +++ b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/device/DevInfoMapper.xml @@ -71,8 +71,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" d.brand AS brand, -- 第17列 d.production_date AS productionDate, -- 第18列 d.working_hours AS workingHours, -- 第19列 - d.person AS person, -- 第20列 - d.person_phone AS personPhone, -- 第21列 + sd.leader AS person, -- 20. 对应 person + sd.phone AS personPhone, -- 21. 对应 personPhone d.create_time AS createTime, -- 第22列 d.update_time AS updateTime, -- 第23列 d.on_company AS companyId, -- 第24列 @@ -131,6 +131,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" or locate(#{keyWord},d.identify_code) > 0 ) + + and mtv.maxTypeId = #{maType} + and d.is_active='1' and d.up_down_status ='1' @@ -180,6 +183,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" LEFT JOIN sys_dept sd ON tl.company_id = sd.dept_id INNER JOIN tool_type tt ON tt.type_id = tl.type_id INNER JOIN tool_type tt1 ON tt.parent_id = tt1.type_id -- 确保 tt 有 parent_id,否则可能查不到数据 + INNER JOIN tool_type tt2 ON tt1.parent_id = tt2.type_id -- 确保 tt 有 parent_id,否则可能查不到数据 + INNER JOIN tool_type tt3 ON tt2.parent_id = tt3.type_id -- 确保 tt 有 parent_id,否则可能查不到数据 + INNER JOIN tool_type tt4 ON tt3.parent_id = tt4.type_id -- 确保 tt 有 parent_id,否则可能查不到数据 LEFT JOIN bm_company_info c ON sd.dept_id = c.company_id WHERE tl.up_down_status = '1' @@ -195,6 +201,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" or locate(#{keyWord}, sd.dept_name) > 0 ) + + and tt4.type_id = #{toolType} + -- 子查询加 limit 避免 order by 问题(如果工具表也需要排序,可在这里加) LIMIT 1000000 ) @@ -271,8 +280,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" d.brand as brand, d.production_date as productionDate, d.max_working_hours as workingHours, - d.person as person, - d.person_phone as personPhone, + sd.leader as person, + sd.phone as personPhone, d.on_company as companyId, sd.dept_name as companyName, c.operate_address as operateAddress, diff --git a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/device/DevMergeMapper.xml b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/device/DevMergeMapper.xml index 1ed1643..13aabd5 100644 --- a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/device/DevMergeMapper.xml +++ b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/device/DevMergeMapper.xml @@ -26,7 +26,8 @@ and aaa.create_user like concat('%', #{createUser}, '%') - and aaa.create_time between #{startCreateTime} and #{endCreateTime} + and aaa.create_time >= #{startCreateTime} + and aaa.create_time < DATE_ADD(#{endCreateTime}, INTERVAL 1 DAY) and mdi.on_company = #{companyId} @@ -477,18 +478,25 @@ and mdi.buy_price >= #{minOriginalValue} and mdi.buy_price <= #{maxOriginalValue} - - and DATE_FORMAT(mdi.production_date,'%Y-%m-%d') between #{startProductionDate} and #{endProductionDate} + + + and mdi.production_date >= #{startProductionDate} + and mdi.production_date < DATE_ADD(#{endProductionDate}, INTERVAL 1 DAY) - - and DATE_FORMAT(mdi.purchase_date,'%Y-%m-%d') between #{startPurchaseDate} and #{endPurchaseDate} + + + and mdi.purchase_date >= #{startPurchaseDate} + and mdi.purchase_date < DATE_ADD(#{endPurchaseDate}, INTERVAL 1 DAY) + + + + and cds.create_time >= #{startOrderCreateTime} + and cds.create_time < DATE_ADD(#{endOrderCreateTime}, INTERVAL 1 DAY) and cds.create_user like concat('%', #{orderCreateUser}, '%') - - and DATE_FORMAT( cds.create_time,'%Y-%m-%d') between #{startOrderCreateTime} and #{endOrderCreateTime} - + diff --git a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/home/MaTypeInfoMapper.xml b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/home/MaTypeInfoMapper.xml index 946a18f..3485830 100644 --- a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/home/MaTypeInfoMapper.xml +++ b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/home/MaTypeInfoMapper.xml @@ -104,5 +104,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and type_id = #{typeId} + \ No newline at end of file diff --git a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/order/OrderInfoMapper.xml b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/order/OrderInfoMapper.xml index c2a59e7..b566211 100644 --- a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/order/OrderInfoMapper.xml +++ b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/order/OrderInfoMapper.xml @@ -152,7 +152,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" up.dept_name AS czcompanyName, mdi.person AS person, sd.phone AS personPhone, - su.phonenumber AS phoneNumber, + dept.phone AS phoneNumber, su.nick_name as buyerName, sd.dept_name as sellerName, moi.address, diff --git a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/toolLedger/ToolLedgerMapper.xml b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/toolLedger/ToolLedgerMapper.xml index b8a0cad..304c85c 100644 --- a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/toolLedger/ToolLedgerMapper.xml +++ b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/toolLedger/ToolLedgerMapper.xml @@ -62,7 +62,6 @@