From 89cd54f5065f18b9e08983cec812a3c44060742d Mon Sep 17 00:00:00 2001 From: wujianwei <wjw@11.com> Date: 星期三, 27 八月 2025 14:57:36 +0800 Subject: [PATCH] 新增前后端 --- service/src/main/java/com/ruoyi/cwgl/service/impl/KeyCollectionInfoServiceImpl.java | 179 +++++ service/src/main/resources/mapper/cwgl/RequestLogMapper.xml | 137 ++++ service/src/main/java/com/ruoyi/cwgl/service/IKeyCollectionInfoService.java | 102 +++ service/src/main/java/com/ruoyi/cwgl/domain/KeyCollectionInfo.java | 165 ++++ service/src/main/java/com/ruoyi/cwgl/controller/KeyCollectionInfoController.java | 108 +++ service/src/main/java/com/ruoyi/cwgl/domain/RequestLog.java | 77 ++ service/src/main/resources/mapper/cwgl/KeyCollectionInfoMapper.xml | 216 ++++++ ui/admin-ui3/src/api/cwgl/requestLog.ts | 67 + service/src/main/java/com/ruoyi/cwgl/controller/RequestLogController.java | 108 +++ ui/admin-ui3/src/api/cwgl/keyCollectionInfo.ts | 67 + service/src/main/java/com/ruoyi/cwgl/mapper/KeyCollectionInfoMapper.java | 87 ++ service/src/main/java/com/ruoyi/cwgl/mapper/RequestLogMapper.java | 87 ++ ui/admin-ui3/src/views/cwgl/keyCollectionInfo/index.vue | 181 +++++ service/src/main/java/com/ruoyi/cwgl/service/impl/RequestLogServiceImpl.java | 181 +++++ service/src/main/java/com/ruoyi/cwgl/service/IRequestLogService.java | 102 +++ ui/admin-ui3/src/views/cwgl/requestLog/index.vue | 139 ++++ 16 files changed, 2,003 insertions(+), 0 deletions(-) diff --git a/service/src/main/java/com/ruoyi/cwgl/controller/KeyCollectionInfoController.java b/service/src/main/java/com/ruoyi/cwgl/controller/KeyCollectionInfoController.java new file mode 100644 index 0000000..613940b --- /dev/null +++ b/service/src/main/java/com/ruoyi/cwgl/controller/KeyCollectionInfoController.java @@ -0,0 +1,108 @@ +package com.ruoyi.cwgl.controller; + +import java.util.List; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.utils.file.DownloadExportUtil; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.cwgl.domain.KeyCollectionInfo; +import com.ruoyi.cwgl.service.IKeyCollectionInfoService; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 閽ュ寵棰嗗彇淇℃伅Controller + * + * @author ruoyi + * @date 2025-08-27 + */ +@RestController +@RequestMapping("/cwgl/keyCollectionInfo") +public class KeyCollectionInfoController extends BaseController +{ + @Autowired + private IKeyCollectionInfoService keyCollectionInfoService; + + + + /** + * 鏌ヨ閽ュ寵棰嗗彇淇℃伅鍒楄〃 + */ + @PreAuthorize("@ss.hasPermi('cwgl:keyCollectionInfo:list')") + @GetMapping("/list") + public TableDataInfo list(KeyCollectionInfo keyCollectionInfo) + { + startPage(); + List<KeyCollectionInfo> list = keyCollectionInfoService.selectKeyCollectionInfoList(keyCollectionInfo); + return getDataTable(list); + } + + /** + * 瀵煎嚭閽ュ寵棰嗗彇淇℃伅鍒楄〃 + * @param keyCollectionInfo 鏌ヨ鏉′欢瀵硅薄 + */ + @PreAuthorize("@ss.hasPermi('cwgl:keyCollectionInfo:export')") + @Log(title = "閽ュ寵棰嗗彇淇℃伅", businessType = BusinessType.EXPORT) + @GetMapping("/export") + public AjaxResult export(KeyCollectionInfo keyCollectionInfo,String exportKey) + { + keyCollectionInfoService.export(keyCollectionInfo,exportKey); + return AjaxResult.success("瀵煎嚭璇锋眰鎴愬姛锛岃绋嶅悗鐐瑰嚮涓嬭浇...!"); + } + + + + /** + * 鑾峰彇閽ュ寵棰嗗彇淇℃伅璇︾粏淇℃伅 + */ + @PreAuthorize("@ss.hasPermi('cwgl:keyCollectionInfo:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Integer id) + { + return AjaxResult.success(keyCollectionInfoService.selectKeyCollectionInfoById(id)); + } + + /** + * 鏂板閽ュ寵棰嗗彇淇℃伅 + */ + @PreAuthorize("@ss.hasPermi('cwgl:keyCollectionInfo:add')") + @Log(title = "閽ュ寵棰嗗彇淇℃伅", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody KeyCollectionInfo keyCollectionInfo) + { + return toAjax(keyCollectionInfoService.insertKeyCollectionInfo(keyCollectionInfo)); + } + + /** + * 淇敼閽ュ寵棰嗗彇淇℃伅 + */ + @PreAuthorize("@ss.hasPermi('cwgl:keyCollectionInfo:edit')") + @Log(title = "閽ュ寵棰嗗彇淇℃伅", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody KeyCollectionInfo keyCollectionInfo) + { + return toAjax(keyCollectionInfoService.updateKeyCollectionInfo(keyCollectionInfo)); + } + + /** + * 鍒犻櫎閽ュ寵棰嗗彇淇℃伅 + */ + @PreAuthorize("@ss.hasPermi('cwgl:keyCollectionInfo:remove')") + @Log(title = "閽ュ寵棰嗗彇淇℃伅", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Integer[] ids) + { + return toAjax(keyCollectionInfoService.deleteKeyCollectionInfoByIds(ids)); + } +} diff --git a/service/src/main/java/com/ruoyi/cwgl/controller/RequestLogController.java b/service/src/main/java/com/ruoyi/cwgl/controller/RequestLogController.java new file mode 100644 index 0000000..3a213d7 --- /dev/null +++ b/service/src/main/java/com/ruoyi/cwgl/controller/RequestLogController.java @@ -0,0 +1,108 @@ +package com.ruoyi.cwgl.controller; + +import java.util.List; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.utils.file.DownloadExportUtil; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.cwgl.domain.RequestLog; +import com.ruoyi.cwgl.service.IRequestLogService; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 璇锋眰鏃ュ織Controller + * + * @author ruoyi + * @date 2025-08-27 + */ +@RestController +@RequestMapping("/cwgl/requestLog") +public class RequestLogController extends BaseController +{ + @Autowired + private IRequestLogService requestLogService; + + + + /** + * 鏌ヨ璇锋眰鏃ュ織鍒楄〃 + */ + @PreAuthorize("@ss.hasPermi('cwgl:requestLog:list')") + @GetMapping("/list") + public TableDataInfo list(RequestLog requestLog) + { + startPage(); + List<RequestLog> list = requestLogService.selectRequestLogList(requestLog); + return getDataTable(list); + } + + /** + * 瀵煎嚭璇锋眰鏃ュ織鍒楄〃 + * @param requestLog 鏌ヨ鏉′欢瀵硅薄 + */ + @PreAuthorize("@ss.hasPermi('cwgl:requestLog:export')") + @Log(title = "璇锋眰鏃ュ織", businessType = BusinessType.EXPORT) + @GetMapping("/export") + public AjaxResult export(RequestLog requestLog,String exportKey) + { + requestLogService.export(requestLog,exportKey); + return AjaxResult.success("瀵煎嚭璇锋眰鎴愬姛锛岃绋嶅悗鐐瑰嚮涓嬭浇...!"); + } + + + + /** + * 鑾峰彇璇锋眰鏃ュ織璇︾粏淇℃伅 + */ + @PreAuthorize("@ss.hasPermi('cwgl:requestLog:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Integer id) + { + return AjaxResult.success(requestLogService.selectRequestLogById(id)); + } + + /** + * 鏂板璇锋眰鏃ュ織 + */ + @PreAuthorize("@ss.hasPermi('cwgl:requestLog:add')") + @Log(title = "璇锋眰鏃ュ織", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody RequestLog requestLog) + { + return toAjax(requestLogService.insertRequestLog(requestLog)); + } + + /** + * 淇敼璇锋眰鏃ュ織 + */ + @PreAuthorize("@ss.hasPermi('cwgl:requestLog:edit')") + @Log(title = "璇锋眰鏃ュ織", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody RequestLog requestLog) + { + return toAjax(requestLogService.updateRequestLog(requestLog)); + } + + /** + * 鍒犻櫎璇锋眰鏃ュ織 + */ + @PreAuthorize("@ss.hasPermi('cwgl:requestLog:remove')") + @Log(title = "璇锋眰鏃ュ織", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Integer[] ids) + { + return toAjax(requestLogService.deleteRequestLogByIds(ids)); + } +} diff --git a/service/src/main/java/com/ruoyi/cwgl/domain/KeyCollectionInfo.java b/service/src/main/java/com/ruoyi/cwgl/domain/KeyCollectionInfo.java new file mode 100644 index 0000000..79fb6d4 --- /dev/null +++ b/service/src/main/java/com/ruoyi/cwgl/domain/KeyCollectionInfo.java @@ -0,0 +1,165 @@ +package com.ruoyi.cwgl.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.ruoyi.common.annotation.Excel; +import com.baomidou.mybatisplus.annotation.TableField; +import java.util.Date; +import lombok.Data; +/** + * 閽ュ寵棰嗗彇淇℃伅瀵硅薄 key_collection_info + * + * @author ruoyi + * @date 2025-08-27 + */ +@Data +public class KeyCollectionInfo{ + + + /** ID */ + @TableField("id") + private Integer id; + + + /** 瀹㈡埛鍚嶇О */ + @Excel(name = "瀹㈡埛鍚嶇О") + + @TableField("customer_name") + private String customerName; + + + /** 鎵胯繍鍟� */ + @Excel(name = "鎵胯繍鍟�") + + @TableField("carrier") + private String carrier; + + + /** 璋冨害鍗曞彿 */ + @Excel(name = "璋冨害鍗曞彿") + + @TableField("dispatch_no") + private String dispatchNo; + + + /** 鍙告満鍚嶇О */ + @Excel(name = "鍙告満鍚嶇О") + + @TableField("driver_name") + private String driverName; + + + /** 鍙告満鎵嬫満鍙� */ + @Excel(name = "鍙告満鎵嬫満鍙�") + @TableField("driver_mobile") + private String driverMobile; + + + /** 杞︾墝鍙� */ + @Excel(name = "杞︾墝鍙�") + @TableField("license_plate_number") + private String licensePlateNumber; + + + /** 璁㈠崟涓嬪崟鏃堕棿 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "璁㈠崟涓嬪崟鏃堕棿", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + @TableField("order_time") + private Date orderTime; + + + /** 璁㈠崟鍒涘缓鏃堕棿 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "璁㈠崟鍒涘缓鏃堕棿", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + @TableField("order_created_time") + private Date orderCreatedTime; + + + /** 璋冨害鍗曞垱寤烘椂闂� */ + @Excel(name = "璋冨害鍗曞垱寤烘椂闂�", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @TableField("dispatch_created_time") + private Date dispatchCreatedTime; + + + /** 閽ュ寵棰嗗彇鏃堕棿锛堣姹傛煡璇㈡椂闂达級 */ + @Excel(name = "閽ュ寵棰嗗彇鏃堕棿", readConverterExp = "璇�=姹傛煡璇㈡椂闂�") + + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @TableField("key_collection_time") + private Date keyCollectionTime; + + + /** 棰勮鍑哄彂鏃堕棿 */ + @Excel(name = "棰勮鍑哄彂鏃堕棿", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @TableField("estimated_departure_time") + private Date estimatedDepartureTime; + + + /** 瑕佹眰鍒拌揪鏃堕棿 */ + @Excel(name = "瑕佹眰鍒拌揪鏃堕棿", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @TableField("required_arrival_time") + private Date requiredArrivalTime; + + + /** 鍑哄彂鍦板湴鍧� */ + @Excel(name = "鍑哄彂鍦板湴鍧�") + + @TableField("consignor_address") + private String consignorAddress; + + + /** 鐩殑鍦板湴鍧� */ + @Excel(name = "鐩殑鍦板湴鍧�") + + @TableField("consignee_address") + private String consigneeAddress; + + + /** 涓婚┚椹跺憳 */ + @Excel(name = "涓婚┚椹跺憳") + + @TableField("main_driver") + private String mainDriver; + + + /** 鎻愰�佽揣鐐规暟 */ + @Excel(name = "鎻愰�佽揣鐐规暟") + + @TableField("point_num") + private Integer pointNum; + + + /** 杩愯緭鏂瑰紡 */ + @Excel(name = "杩愯緭鏂瑰紡") + @TableField("transport_mode") + private String transportMode; + + + /** 鍓┚椹跺憳 */ + @Excel(name = "鍓┚椹跺憳") + @TableField("assistant_driver") + private String assistantDriver; + + + /** 浠舵暟 */ + @Excel(name = "浠舵暟") + @TableField("quantity") + private Integer quantity; + + + /** 瀹炲彂浠舵暟 */ + @Excel(name = "瀹炲彂浠舵暟") + @TableField("dispatch_quantity") + private Integer dispatchQuantity; + + + /** 澶囨敞 */ + @Excel(name = "澶囨敞") + @TableField("remark") + private String remark; + + +} diff --git a/service/src/main/java/com/ruoyi/cwgl/domain/RequestLog.java b/service/src/main/java/com/ruoyi/cwgl/domain/RequestLog.java new file mode 100644 index 0000000..b3fee56 --- /dev/null +++ b/service/src/main/java/com/ruoyi/cwgl/domain/RequestLog.java @@ -0,0 +1,77 @@ +package com.ruoyi.cwgl.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.ruoyi.common.annotation.Excel; +import com.baomidou.mybatisplus.annotation.TableField; +import java.util.Date; +import lombok.Data; +/** + * 璇锋眰鏃ュ織瀵硅薄 request_log + * + * @author ruoyi + * @date 2025-08-27 + */ +@Data +public class RequestLog{ + + + /** 涓婚敭 */ + @TableField("id") + private Integer id; + + + /** 鍙告満鍞竴缂栧彿 */ + @Excel(name = "鍙告満鍞竴缂栧彿") + + @TableField("driver_code") + private String driverCode; + + + /** 鍙告満濮撳悕 */ + @Excel(name = "鍙告満濮撳悕") + + @TableField("driver_name") + private String driverName; + + + /** 鏌滈棬缂栧彿 */ + @Excel(name = "鏌滈棬缂栧彿") + + @TableField("box_num") + private String boxNum; + + + /** 鍒涘缓鑰� */ + @TableField("create_by") + private String createBy; + + + /** 鍒涘缓鏃堕棿 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @TableField("create_time") + private Date createTime; + + + /** 璇锋眰鏃堕棿 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "璇锋眰鏃堕棿", width = 30, dateFormat = "yyyy-MM-dd") + @TableField("req_time") + private Date reqTime; + + + /** 0涓婃姤鍙栧嚭1褰掕繕涓婃姤 */ + @Excel(name = "0涓婃姤鍙栧嚭1褰掕繕涓婃姤") + + @TableField("type") + private Integer type; + + + /** 鎿嶄綔璇存槑 */ + @Excel(name = "鎿嶄綔璇存槑") + + @TableField("operation") + private String operation; + + +} diff --git a/service/src/main/java/com/ruoyi/cwgl/mapper/KeyCollectionInfoMapper.java b/service/src/main/java/com/ruoyi/cwgl/mapper/KeyCollectionInfoMapper.java new file mode 100644 index 0000000..eb2196b --- /dev/null +++ b/service/src/main/java/com/ruoyi/cwgl/mapper/KeyCollectionInfoMapper.java @@ -0,0 +1,87 @@ +package com.ruoyi.cwgl.mapper; + +import java.util.List; +import com.ruoyi.cwgl.domain.KeyCollectionInfo; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + + +/** + * 閽ュ寵棰嗗彇淇℃伅Mapper鎺ュ彛 + * + * @author ruoyi + * @date 2025-08-27 + */ +public interface KeyCollectionInfoMapper extends BaseMapper<KeyCollectionInfo> +{ + /** + * 鏌ヨ閽ュ寵棰嗗彇淇℃伅 + * + * @param id 閽ュ寵棰嗗彇淇℃伅ID + * @return 閽ュ寵棰嗗彇淇℃伅 + */ + public KeyCollectionInfo selectKeyCollectionInfoById(Integer id); + + /** + * 鏌ヨ閽ュ寵棰嗗彇淇℃伅 璁板綍鏁� + * + * @param keyCollectionInfo 閽ュ寵棰嗗彇淇℃伅 + * @return 閽ュ寵棰嗗彇淇℃伅闆嗗悎 + */ + public int selectKeyCollectionInfoCount(KeyCollectionInfo keyCollectionInfo); + + /** + * 鏌ヨ閽ュ寵棰嗗彇淇℃伅鍒楄〃 + * + * @param keyCollectionInfo 閽ュ寵棰嗗彇淇℃伅 + * @return 閽ュ寵棰嗗彇淇℃伅闆嗗悎 + */ + public List<KeyCollectionInfo> selectKeyCollectionInfoList(KeyCollectionInfo keyCollectionInfo); + + /** + * 鏂板閽ュ寵棰嗗彇淇℃伅 + * + * @param keyCollectionInfo 閽ュ寵棰嗗彇淇℃伅 + * @return 缁撴灉 + */ + public int insertKeyCollectionInfo(KeyCollectionInfo keyCollectionInfo); + + /** + * 鏂板閽ュ寵棰嗗彇淇℃伅[鎵归噺] + * + * @param keyCollectionInfos 閽ュ寵棰嗗彇淇℃伅 + * @return 缁撴灉 + */ + public int insertKeyCollectionInfoBatch(List<KeyCollectionInfo> keyCollectionInfos); + + /** + * 淇敼閽ュ寵棰嗗彇淇℃伅 + * + * @param keyCollectionInfo 閽ュ寵棰嗗彇淇℃伅 + * @return 缁撴灉 + */ + public int updateKeyCollectionInfo(KeyCollectionInfo keyCollectionInfo); + + /** + * 淇敼閽ュ寵棰嗗彇淇℃伅[鎵归噺] + * + * @param keyCollectionInfos 閽ュ寵棰嗗彇淇℃伅 + * @return 缁撴灉 + */ + public int updateKeyCollectionInfoBatch(List<KeyCollectionInfo> keyCollectionInfos); + + /** + * 鍒犻櫎閽ュ寵棰嗗彇淇℃伅 + * + * @param id 閽ュ寵棰嗗彇淇℃伅ID + * @return 缁撴灉 + */ + public int deleteKeyCollectionInfoById(Integer id); + + /** + * 鎵归噺鍒犻櫎閽ュ寵棰嗗彇淇℃伅 + * + * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁ID + * @return 缁撴灉 + */ + public int deleteKeyCollectionInfoByIds(Integer[] ids); +} diff --git a/service/src/main/java/com/ruoyi/cwgl/mapper/RequestLogMapper.java b/service/src/main/java/com/ruoyi/cwgl/mapper/RequestLogMapper.java new file mode 100644 index 0000000..dd76967 --- /dev/null +++ b/service/src/main/java/com/ruoyi/cwgl/mapper/RequestLogMapper.java @@ -0,0 +1,87 @@ +package com.ruoyi.cwgl.mapper; + +import java.util.List; +import com.ruoyi.cwgl.domain.RequestLog; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + + +/** + * 璇锋眰鏃ュ織Mapper鎺ュ彛 + * + * @author ruoyi + * @date 2025-08-27 + */ +public interface RequestLogMapper extends BaseMapper<RequestLog> +{ + /** + * 鏌ヨ璇锋眰鏃ュ織 + * + * @param id 璇锋眰鏃ュ織ID + * @return 璇锋眰鏃ュ織 + */ + public RequestLog selectRequestLogById(Integer id); + + /** + * 鏌ヨ璇锋眰鏃ュ織 璁板綍鏁� + * + * @param requestLog 璇锋眰鏃ュ織 + * @return 璇锋眰鏃ュ織闆嗗悎 + */ + public int selectRequestLogCount(RequestLog requestLog); + + /** + * 鏌ヨ璇锋眰鏃ュ織鍒楄〃 + * + * @param requestLog 璇锋眰鏃ュ織 + * @return 璇锋眰鏃ュ織闆嗗悎 + */ + public List<RequestLog> selectRequestLogList(RequestLog requestLog); + + /** + * 鏂板璇锋眰鏃ュ織 + * + * @param requestLog 璇锋眰鏃ュ織 + * @return 缁撴灉 + */ + public int insertRequestLog(RequestLog requestLog); + + /** + * 鏂板璇锋眰鏃ュ織[鎵归噺] + * + * @param requestLogs 璇锋眰鏃ュ織 + * @return 缁撴灉 + */ + public int insertRequestLogBatch(List<RequestLog> requestLogs); + + /** + * 淇敼璇锋眰鏃ュ織 + * + * @param requestLog 璇锋眰鏃ュ織 + * @return 缁撴灉 + */ + public int updateRequestLog(RequestLog requestLog); + + /** + * 淇敼璇锋眰鏃ュ織[鎵归噺] + * + * @param requestLogs 璇锋眰鏃ュ織 + * @return 缁撴灉 + */ + public int updateRequestLogBatch(List<RequestLog> requestLogs); + + /** + * 鍒犻櫎璇锋眰鏃ュ織 + * + * @param id 璇锋眰鏃ュ織ID + * @return 缁撴灉 + */ + public int deleteRequestLogById(Integer id); + + /** + * 鎵归噺鍒犻櫎璇锋眰鏃ュ織 + * + * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁ID + * @return 缁撴灉 + */ + public int deleteRequestLogByIds(Integer[] ids); +} diff --git a/service/src/main/java/com/ruoyi/cwgl/service/IKeyCollectionInfoService.java b/service/src/main/java/com/ruoyi/cwgl/service/IKeyCollectionInfoService.java new file mode 100644 index 0000000..6659561 --- /dev/null +++ b/service/src/main/java/com/ruoyi/cwgl/service/IKeyCollectionInfoService.java @@ -0,0 +1,102 @@ +package com.ruoyi.cwgl.service; + +import java.util.List; +import com.ruoyi.cwgl.domain.KeyCollectionInfo; +import com.baomidou.mybatisplus.extension.service.IService; +/** + * 閽ュ寵棰嗗彇淇℃伅Service鎺ュ彛 + * + * @author ruoyi + * @date 2025-08-27 + */ +public interface IKeyCollectionInfoService extends IService<KeyCollectionInfo> +{ + /** + * 鏌ヨ閽ュ寵棰嗗彇淇℃伅 + * + * @param id 閽ュ寵棰嗗彇淇℃伅ID + * @return 閽ュ寵棰嗗彇淇℃伅 + */ + public KeyCollectionInfo selectKeyCollectionInfoById(Integer id); + + /** + * 鏌ヨ閽ュ寵棰嗗彇淇℃伅 璁板綍鏁� + * + * @param keyCollectionInfo 閽ュ寵棰嗗彇淇℃伅 + * @return 閽ュ寵棰嗗彇淇℃伅闆嗗悎 + */ + public int selectKeyCollectionInfoCount(KeyCollectionInfo keyCollectionInfo); + + /** + * 鏌ヨ閽ュ寵棰嗗彇淇℃伅鍒楄〃 + * + * @param keyCollectionInfo 閽ュ寵棰嗗彇淇℃伅 + * @return 閽ュ寵棰嗗彇淇℃伅闆嗗悎 + */ + public List<KeyCollectionInfo> selectKeyCollectionInfoList(KeyCollectionInfo keyCollectionInfo); + + /** + * 鏌ヨ閽ュ寵棰嗗彇淇℃伅鍒楄〃 寮傛 瀵煎嚭 + * + * @param keyCollectionInfo 閽ュ寵棰嗗彇淇℃伅 + * @param exportKey 瀵煎嚭鍔熻兘鐨勫敮涓�鏍囪瘑 + * @return 閽ュ寵棰嗗彇淇℃伅闆嗗悎 + */ + public void export(KeyCollectionInfo keyCollectionInfo, String exportKey) ; + + + /** + * 鏂板閽ュ寵棰嗗彇淇℃伅 + * + * @param keyCollectionInfo 閽ュ寵棰嗗彇淇℃伅 + * @return 缁撴灉 + */ + public int insertKeyCollectionInfo(KeyCollectionInfo keyCollectionInfo); + + /** + * 鏂板閽ュ寵棰嗗彇淇℃伅[鎵归噺] + * + * @param keyCollectionInfos 閽ュ寵棰嗗彇淇℃伅 + * @return 缁撴灉 + */ + public int insertKeyCollectionInfoBatch(List<KeyCollectionInfo> keyCollectionInfos); + + /** + * 淇敼閽ュ寵棰嗗彇淇℃伅 + * + * @param keyCollectionInfo 閽ュ寵棰嗗彇淇℃伅 + * @return 缁撴灉 + */ + public int updateKeyCollectionInfo(KeyCollectionInfo keyCollectionInfo); + + /** + * 淇敼閽ュ寵棰嗗彇淇℃伅[鎵归噺] + * + * @param keyCollectionInfos 閽ュ寵棰嗗彇淇℃伅 + * @return 缁撴灉 + */ + public int updateKeyCollectionInfoBatch(List<KeyCollectionInfo> keyCollectionInfos); + /** + * 鎵归噺鍒犻櫎閽ュ寵棰嗗彇淇℃伅 + * + * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁ID + * @return 缁撴灉 + */ + public int deleteKeyCollectionInfoByIds(String ids); + + /** + * 鎵归噺鍒犻櫎閽ュ寵棰嗗彇淇℃伅 + * + * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁ID + * @return 缁撴灉 + */ + public int deleteKeyCollectionInfoByIds(Integer[] ids); + + /** + * 鍒犻櫎閽ュ寵棰嗗彇淇℃伅淇℃伅 + * + * @param id 閽ュ寵棰嗗彇淇℃伅ID + * @return 缁撴灉 + */ + public int deleteKeyCollectionInfoById(Integer id); +} diff --git a/service/src/main/java/com/ruoyi/cwgl/service/IRequestLogService.java b/service/src/main/java/com/ruoyi/cwgl/service/IRequestLogService.java new file mode 100644 index 0000000..3e60661 --- /dev/null +++ b/service/src/main/java/com/ruoyi/cwgl/service/IRequestLogService.java @@ -0,0 +1,102 @@ +package com.ruoyi.cwgl.service; + +import java.util.List; +import com.ruoyi.cwgl.domain.RequestLog; +import com.baomidou.mybatisplus.extension.service.IService; +/** + * 璇锋眰鏃ュ織Service鎺ュ彛 + * + * @author ruoyi + * @date 2025-08-27 + */ +public interface IRequestLogService extends IService<RequestLog> +{ + /** + * 鏌ヨ璇锋眰鏃ュ織 + * + * @param id 璇锋眰鏃ュ織ID + * @return 璇锋眰鏃ュ織 + */ + public RequestLog selectRequestLogById(Integer id); + + /** + * 鏌ヨ璇锋眰鏃ュ織 璁板綍鏁� + * + * @param requestLog 璇锋眰鏃ュ織 + * @return 璇锋眰鏃ュ織闆嗗悎 + */ + public int selectRequestLogCount(RequestLog requestLog); + + /** + * 鏌ヨ璇锋眰鏃ュ織鍒楄〃 + * + * @param requestLog 璇锋眰鏃ュ織 + * @return 璇锋眰鏃ュ織闆嗗悎 + */ + public List<RequestLog> selectRequestLogList(RequestLog requestLog); + + /** + * 鏌ヨ璇锋眰鏃ュ織鍒楄〃 寮傛 瀵煎嚭 + * + * @param requestLog 璇锋眰鏃ュ織 + * @param exportKey 瀵煎嚭鍔熻兘鐨勫敮涓�鏍囪瘑 + * @return 璇锋眰鏃ュ織闆嗗悎 + */ + public void export(RequestLog requestLog, String exportKey) ; + + + /** + * 鏂板璇锋眰鏃ュ織 + * + * @param requestLog 璇锋眰鏃ュ織 + * @return 缁撴灉 + */ + public int insertRequestLog(RequestLog requestLog); + + /** + * 鏂板璇锋眰鏃ュ織[鎵归噺] + * + * @param requestLogs 璇锋眰鏃ュ織 + * @return 缁撴灉 + */ + public int insertRequestLogBatch(List<RequestLog> requestLogs); + + /** + * 淇敼璇锋眰鏃ュ織 + * + * @param requestLog 璇锋眰鏃ュ織 + * @return 缁撴灉 + */ + public int updateRequestLog(RequestLog requestLog); + + /** + * 淇敼璇锋眰鏃ュ織[鎵归噺] + * + * @param requestLogs 璇锋眰鏃ュ織 + * @return 缁撴灉 + */ + public int updateRequestLogBatch(List<RequestLog> requestLogs); + /** + * 鎵归噺鍒犻櫎璇锋眰鏃ュ織 + * + * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁ID + * @return 缁撴灉 + */ + public int deleteRequestLogByIds(String ids); + + /** + * 鎵归噺鍒犻櫎璇锋眰鏃ュ織 + * + * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁ID + * @return 缁撴灉 + */ + public int deleteRequestLogByIds(Integer[] ids); + + /** + * 鍒犻櫎璇锋眰鏃ュ織淇℃伅 + * + * @param id 璇锋眰鏃ュ織ID + * @return 缁撴灉 + */ + public int deleteRequestLogById(Integer id); +} diff --git a/service/src/main/java/com/ruoyi/cwgl/service/impl/KeyCollectionInfoServiceImpl.java b/service/src/main/java/com/ruoyi/cwgl/service/impl/KeyCollectionInfoServiceImpl.java new file mode 100644 index 0000000..8d2ea1a --- /dev/null +++ b/service/src/main/java/com/ruoyi/cwgl/service/impl/KeyCollectionInfoServiceImpl.java @@ -0,0 +1,179 @@ +package com.ruoyi.cwgl.service.impl; + +import java.util.List; + +import javax.annotation.Resource; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.stereotype.Service; +import org.springframework.scheduling.annotation.Async; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import com.ruoyi.common.utils.PageUtils; +import com.ruoyi.common.constant.Constants; +import com.ruoyi.common.annotation.DataSource; +import com.ruoyi.common.enums.DataSourceType; +import com.ruoyi.common.core.service.BaseService; + +import com.ruoyi.cwgl.mapper.KeyCollectionInfoMapper; +import com.ruoyi.cwgl.domain.KeyCollectionInfo; +import com.ruoyi.cwgl.service.IKeyCollectionInfoService; +import com.ruoyi.common.core.text.Convert; + +/** + * 閽ュ寵棰嗗彇淇℃伅Service涓氬姟灞傚鐞� + * + * @author ruoyi + * @date 2025-08-27 + */ +@Service +@Transactional(rollbackFor = Exception.class) +public class KeyCollectionInfoServiceImpl extends BaseService<KeyCollectionInfoMapper, KeyCollectionInfo> implements IKeyCollectionInfoService +{ + protected final Logger logger = LoggerFactory.getLogger(getClass()); + @Resource + private KeyCollectionInfoMapper keyCollectionInfoMapper; + + + /** + * 鏌ヨ閽ュ寵棰嗗彇淇℃伅 + * + * @param id 閽ュ寵棰嗗彇淇℃伅ID + * @return 閽ュ寵棰嗗彇淇℃伅 + */ + @DataSource(DataSourceType.SLAVE) + @Override + public KeyCollectionInfo selectKeyCollectionInfoById(Integer id) + { + return keyCollectionInfoMapper.selectKeyCollectionInfoById(id); + } + + /** + * 鏌ヨ閽ュ寵棰嗗彇淇℃伅 璁板綍鏁� + * + * @param keyCollectionInfo 閽ュ寵棰嗗彇淇℃伅 + * @return 閽ュ寵棰嗗彇淇℃伅闆嗗悎 + */ + @DataSource(DataSourceType.SLAVE) + @Override + public int selectKeyCollectionInfoCount(KeyCollectionInfo keyCollectionInfo) + { + return keyCollectionInfoMapper.selectKeyCollectionInfoCount(keyCollectionInfo); + } + + /** + * 鏌ヨ閽ュ寵棰嗗彇淇℃伅鍒楄〃 + * + * @param keyCollectionInfo 閽ュ寵棰嗗彇淇℃伅 + * @return 閽ュ寵棰嗗彇淇℃伅 + */ + @DataSource(DataSourceType.SLAVE) + @Override + public List<KeyCollectionInfo> selectKeyCollectionInfoList(KeyCollectionInfo keyCollectionInfo) + { + return keyCollectionInfoMapper.selectKeyCollectionInfoList(keyCollectionInfo); + } + + /** + * 鏌ヨ閽ュ寵棰嗗彇淇℃伅鍒楄〃 寮傛 瀵煎嚭 + * + * @param keyCollectionInfo 閽ュ寵棰嗗彇淇℃伅 + * @param exportKey 瀵煎嚭鍔熻兘鐨勫敮涓�鏍囪瘑 + * @return 閽ュ寵棰嗗彇淇℃伅闆嗗悎 + */ + @DataSource(DataSourceType.SLAVE) + @Async + @Override + public void export(KeyCollectionInfo keyCollectionInfo,String exportKey) { + + super.export(KeyCollectionInfo.class,exportKey,"keyCollectionInfoData",(pageNum)->{ + PageUtils.startPage(pageNum, Constants.EXPORT_PATE_SIZE); + return selectKeyCollectionInfoList(keyCollectionInfo); + }); + } + + + /** + * 鏂板閽ュ寵棰嗗彇淇℃伅 + * + * @param keyCollectionInfo 閽ュ寵棰嗗彇淇℃伅 + * @return 缁撴灉 + */ + @Override + public int insertKeyCollectionInfo(KeyCollectionInfo keyCollectionInfo) + { + return keyCollectionInfoMapper.insertKeyCollectionInfo(keyCollectionInfo); + } + + /** + * 鏂板閽ュ寵棰嗗彇淇℃伅[鎵归噺] + * + * @param keyCollectionInfos 閽ュ寵棰嗗彇淇℃伅 + * @return 缁撴灉 + */ + @Override + public int insertKeyCollectionInfoBatch(List<KeyCollectionInfo> keyCollectionInfos) + { + int rows = keyCollectionInfoMapper.insertKeyCollectionInfoBatch(keyCollectionInfos); + return rows; + } + + /** + * 淇敼閽ュ寵棰嗗彇淇℃伅 + * + * @param keyCollectionInfo 閽ュ寵棰嗗彇淇℃伅 + * @return 缁撴灉 + */ + @Override + public int updateKeyCollectionInfo(KeyCollectionInfo keyCollectionInfo) + { + return keyCollectionInfoMapper.updateKeyCollectionInfo(keyCollectionInfo); + } + + /** + * 淇敼閽ュ寵棰嗗彇淇℃伅[鎵归噺] + * + * @param keyCollectionInfos 閽ュ寵棰嗗彇淇℃伅 + * @return 缁撴灉 + */ + @Override + public int updateKeyCollectionInfoBatch(List<KeyCollectionInfo> keyCollectionInfos){ + return keyCollectionInfoMapper.updateKeyCollectionInfoBatch(keyCollectionInfos); + } + + /** + * 鍒犻櫎閽ュ寵棰嗗彇淇℃伅瀵硅薄 + * + * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁ID + * @return 缁撴灉 + */ + @Override + public int deleteKeyCollectionInfoByIds(String ids) + { + return deleteKeyCollectionInfoByIds(Convert.toIntArray(ids)); + } + + /** + * 鍒犻櫎閽ュ寵棰嗗彇淇℃伅瀵硅薄 + * + * + * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁ID + * @return 缁撴灉 + */ + @Override + public int deleteKeyCollectionInfoByIds(Integer[] ids) + { + return keyCollectionInfoMapper.deleteKeyCollectionInfoByIds(ids); + } + + /** + * 鍒犻櫎閽ュ寵棰嗗彇淇℃伅淇℃伅 + * + * @param id 閽ュ寵棰嗗彇淇℃伅ID + * @return 缁撴灉 + */ + @Override + public int deleteKeyCollectionInfoById(Integer id) + { + return keyCollectionInfoMapper.deleteKeyCollectionInfoById(id); + } +} diff --git a/service/src/main/java/com/ruoyi/cwgl/service/impl/RequestLogServiceImpl.java b/service/src/main/java/com/ruoyi/cwgl/service/impl/RequestLogServiceImpl.java new file mode 100644 index 0000000..0f53480 --- /dev/null +++ b/service/src/main/java/com/ruoyi/cwgl/service/impl/RequestLogServiceImpl.java @@ -0,0 +1,181 @@ +package com.ruoyi.cwgl.service.impl; + +import java.util.List; + +import com.ruoyi.common.utils.DateUtils; +import javax.annotation.Resource; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.stereotype.Service; +import org.springframework.scheduling.annotation.Async; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import com.ruoyi.common.utils.PageUtils; +import com.ruoyi.common.constant.Constants; +import com.ruoyi.common.annotation.DataSource; +import com.ruoyi.common.enums.DataSourceType; +import com.ruoyi.common.core.service.BaseService; + +import com.ruoyi.cwgl.mapper.RequestLogMapper; +import com.ruoyi.cwgl.domain.RequestLog; +import com.ruoyi.cwgl.service.IRequestLogService; +import com.ruoyi.common.core.text.Convert; + +/** + * 璇锋眰鏃ュ織Service涓氬姟灞傚鐞� + * + * @author ruoyi + * @date 2025-08-27 + */ +@Service +@Transactional(rollbackFor = Exception.class) +public class RequestLogServiceImpl extends BaseService<RequestLogMapper, RequestLog> implements IRequestLogService +{ + protected final Logger logger = LoggerFactory.getLogger(getClass()); + @Resource + private RequestLogMapper requestLogMapper; + + + /** + * 鏌ヨ璇锋眰鏃ュ織 + * + * @param id 璇锋眰鏃ュ織ID + * @return 璇锋眰鏃ュ織 + */ + @DataSource(DataSourceType.SLAVE) + @Override + public RequestLog selectRequestLogById(Integer id) + { + return requestLogMapper.selectRequestLogById(id); + } + + /** + * 鏌ヨ璇锋眰鏃ュ織 璁板綍鏁� + * + * @param requestLog 璇锋眰鏃ュ織 + * @return 璇锋眰鏃ュ織闆嗗悎 + */ + @DataSource(DataSourceType.SLAVE) + @Override + public int selectRequestLogCount(RequestLog requestLog) + { + return requestLogMapper.selectRequestLogCount(requestLog); + } + + /** + * 鏌ヨ璇锋眰鏃ュ織鍒楄〃 + * + * @param requestLog 璇锋眰鏃ュ織 + * @return 璇锋眰鏃ュ織 + */ + @DataSource(DataSourceType.SLAVE) + @Override + public List<RequestLog> selectRequestLogList(RequestLog requestLog) + { + return requestLogMapper.selectRequestLogList(requestLog); + } + + /** + * 鏌ヨ璇锋眰鏃ュ織鍒楄〃 寮傛 瀵煎嚭 + * + * @param requestLog 璇锋眰鏃ュ織 + * @param exportKey 瀵煎嚭鍔熻兘鐨勫敮涓�鏍囪瘑 + * @return 璇锋眰鏃ュ織闆嗗悎 + */ + @DataSource(DataSourceType.SLAVE) + @Async + @Override + public void export(RequestLog requestLog,String exportKey) { + + super.export(RequestLog.class,exportKey,"requestLogData",(pageNum)->{ + PageUtils.startPage(pageNum, Constants.EXPORT_PATE_SIZE); + return selectRequestLogList(requestLog); + }); + } + + + /** + * 鏂板璇锋眰鏃ュ織 + * + * @param requestLog 璇锋眰鏃ュ織 + * @return 缁撴灉 + */ + @Override + public int insertRequestLog(RequestLog requestLog) + { + requestLog.setCreateTime(DateUtils.getNowDate()); + return requestLogMapper.insertRequestLog(requestLog); + } + + /** + * 鏂板璇锋眰鏃ュ織[鎵归噺] + * + * @param requestLogs 璇锋眰鏃ュ織 + * @return 缁撴灉 + */ + @Override + public int insertRequestLogBatch(List<RequestLog> requestLogs) + { + int rows = requestLogMapper.insertRequestLogBatch(requestLogs); + return rows; + } + + /** + * 淇敼璇锋眰鏃ュ織 + * + * @param requestLog 璇锋眰鏃ュ織 + * @return 缁撴灉 + */ + @Override + public int updateRequestLog(RequestLog requestLog) + { + return requestLogMapper.updateRequestLog(requestLog); + } + + /** + * 淇敼璇锋眰鏃ュ織[鎵归噺] + * + * @param requestLogs 璇锋眰鏃ュ織 + * @return 缁撴灉 + */ + @Override + public int updateRequestLogBatch(List<RequestLog> requestLogs){ + return requestLogMapper.updateRequestLogBatch(requestLogs); + } + + /** + * 鍒犻櫎璇锋眰鏃ュ織瀵硅薄 + * + * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁ID + * @return 缁撴灉 + */ + @Override + public int deleteRequestLogByIds(String ids) + { + return deleteRequestLogByIds(Convert.toIntArray(ids)); + } + + /** + * 鍒犻櫎璇锋眰鏃ュ織瀵硅薄 + * + * + * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁ID + * @return 缁撴灉 + */ + @Override + public int deleteRequestLogByIds(Integer[] ids) + { + return requestLogMapper.deleteRequestLogByIds(ids); + } + + /** + * 鍒犻櫎璇锋眰鏃ュ織淇℃伅 + * + * @param id 璇锋眰鏃ュ織ID + * @return 缁撴灉 + */ + @Override + public int deleteRequestLogById(Integer id) + { + return requestLogMapper.deleteRequestLogById(id); + } +} diff --git a/service/src/main/resources/mapper/cwgl/KeyCollectionInfoMapper.xml b/service/src/main/resources/mapper/cwgl/KeyCollectionInfoMapper.xml new file mode 100644 index 0000000..4255608 --- /dev/null +++ b/service/src/main/resources/mapper/cwgl/KeyCollectionInfoMapper.xml @@ -0,0 +1,216 @@ +<?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.cwgl.mapper.KeyCollectionInfoMapper"> + + <resultMap type="com.ruoyi.cwgl.domain.KeyCollectionInfo" id="KeyCollectionInfoResult"> + <result property="id" column="id" /> + <result property="customerName" column="customer_name" /> + <result property="carrier" column="carrier" /> + <result property="dispatchNo" column="dispatch_no" /> + <result property="driverName" column="driver_name" /> + <result property="driverMobile" column="driver_mobile" /> + <result property="licensePlateNumber" column="license_plate_number" /> + <result property="orderTime" column="order_time" /> + <result property="orderCreatedTime" column="order_created_time" /> + <result property="dispatchCreatedTime" column="dispatch_created_time" /> + <result property="keyCollectionTime" column="key_collection_time" /> + <result property="estimatedDepartureTime" column="estimated_departure_time" /> + <result property="requiredArrivalTime" column="required_arrival_time" /> + <result property="consignorAddress" column="consignor_address" /> + <result property="consigneeAddress" column="consignee_address" /> + <result property="mainDriver" column="main_driver" /> + <result property="pointNum" column="point_num" /> + <result property="transportMode" column="transport_mode" /> + <result property="assistantDriver" column="assistant_driver" /> + <result property="quantity" column="quantity" /> + <result property="dispatchQuantity" column="dispatch_quantity" /> + <result property="remark" column="remark" /> + </resultMap> + + <sql id="selectKeyCollectionInfoVo"> + select thisTab.id, thisTab.customer_name, thisTab.carrier, thisTab.dispatch_no, thisTab.driver_name, thisTab.driver_mobile, thisTab.license_plate_number, thisTab.order_time, thisTab.order_created_time, thisTab.dispatch_created_time, thisTab.key_collection_time, thisTab.estimated_departure_time, thisTab.required_arrival_time, thisTab.consignor_address, thisTab.consignee_address, thisTab.main_driver, thisTab.point_num, thisTab.transport_mode, thisTab.assistant_driver, thisTab.quantity, thisTab.dispatch_quantity, thisTab.remark from key_collection_info AS thisTab + </sql> + <sql id="selectKeyCollectionInfoVoCount"> + select count(0) from key_collection_info as thisTab + </sql> + + <sql id="whereCondition"> + <if test="customerName != null and customerName != ''"> and thisTab.customer_name like concat('%', #{customerName}, '%')</if> + <if test="carrier != null and carrier != ''"> and thisTab.carrier = #{carrier}</if> + <if test="dispatchNo != null and dispatchNo != ''"> and thisTab.dispatch_no = #{dispatchNo}</if> + <if test="driverName != null and driverName != ''"> and thisTab.driver_name like concat('%', #{driverName}, '%')</if> + <if test="driverMobile != null and driverMobile != ''"> and thisTab.driver_mobile = #{driverMobile}</if> + <if test="licensePlateNumber != null and licensePlateNumber != ''"> and thisTab.license_plate_number = #{licensePlateNumber}</if> + <if test="orderTime != null "> and thisTab.order_time = #{orderTime}</if> + <if test="orderCreatedTime != null "> and thisTab.order_created_time = #{orderCreatedTime}</if> + <if test="dispatchCreatedTime != null "> and thisTab.dispatch_created_time = #{dispatchCreatedTime}</if> + <if test="keyCollectionTime != null "> and thisTab.key_collection_time = #{keyCollectionTime}</if> + <if test="estimatedDepartureTime != null "> and thisTab.estimated_departure_time = #{estimatedDepartureTime}</if> + <if test="requiredArrivalTime != null "> and thisTab.required_arrival_time = #{requiredArrivalTime}</if> + <if test="consignorAddress != null and consignorAddress != ''"> and thisTab.consignor_address = #{consignorAddress}</if> + <if test="consigneeAddress != null and consigneeAddress != ''"> and thisTab.consignee_address = #{consigneeAddress}</if> + <if test="mainDriver != null and mainDriver != ''"> and thisTab.main_driver = #{mainDriver}</if> + <if test="pointNum != null "> and thisTab.point_num = #{pointNum}</if> + <if test="transportMode != null and transportMode != ''"> and thisTab.transport_mode = #{transportMode}</if> + <if test="assistantDriver != null and assistantDriver != ''"> and thisTab.assistant_driver = #{assistantDriver}</if> + <if test="quantity != null "> and thisTab.quantity = #{quantity}</if> + <if test="dispatchQuantity != null "> and thisTab.dispatch_quantity = #{dispatchQuantity}</if> + </sql> + + <!--鏌ヨ--> + <select id="selectKeyCollectionInfoById" parameterType="Integer" resultMap="KeyCollectionInfoResult"> + <include refid="selectKeyCollectionInfoVo"/> + where id = #{id} + </select> + + <select id="selectKeyCollectionInfoCount" parameterType="com.ruoyi.cwgl.domain.KeyCollectionInfo" resultType="int"> + <include refid="selectKeyCollectionInfoVoCount"/> + <where> + <include refid="whereCondition"/> + </where> + </select> + + <select id="selectKeyCollectionInfoList" parameterType="com.ruoyi.cwgl.domain.KeyCollectionInfo" resultMap="KeyCollectionInfoResult"> + <include refid="selectKeyCollectionInfoVo"/> + <where> + <include refid="whereCondition"/> + </where> + order by thisTab.id desc + </select> + + <!-- 鏂板 --> + <insert id="insertKeyCollectionInfo" parameterType="com.ruoyi.cwgl.domain.KeyCollectionInfo" useGeneratedKeys="true" keyProperty="id"> + insert into key_collection_info + <trim prefix="(" suffix=")" suffixOverrides=","> + <if test="customerName != null">customer_name,</if> + <if test="carrier != null">carrier,</if> + <if test="dispatchNo != null">dispatch_no,</if> + <if test="driverName != null">driver_name,</if> + <if test="driverMobile != null">driver_mobile,</if> + <if test="licensePlateNumber != null">license_plate_number,</if> + <if test="orderTime != null">order_time,</if> + <if test="orderCreatedTime != null">order_created_time,</if> + <if test="dispatchCreatedTime != null">dispatch_created_time,</if> + <if test="keyCollectionTime != null">key_collection_time,</if> + <if test="estimatedDepartureTime != null">estimated_departure_time,</if> + <if test="requiredArrivalTime != null">required_arrival_time,</if> + <if test="consignorAddress != null">consignor_address,</if> + <if test="consigneeAddress != null">consignee_address,</if> + <if test="mainDriver != null">main_driver,</if> + <if test="pointNum != null">point_num,</if> + <if test="transportMode != null">transport_mode,</if> + <if test="assistantDriver != null">assistant_driver,</if> + <if test="quantity != null">quantity,</if> + <if test="dispatchQuantity != null">dispatch_quantity,</if> + <if test="remark != null">remark,</if> + </trim> + <trim prefix="values (" suffix=")" suffixOverrides=","> + <if test="customerName != null">#{customerName},</if> + <if test="carrier != null">#{carrier},</if> + <if test="dispatchNo != null">#{dispatchNo},</if> + <if test="driverName != null">#{driverName},</if> + <if test="driverMobile != null">#{driverMobile},</if> + <if test="licensePlateNumber != null">#{licensePlateNumber},</if> + <if test="orderTime != null">#{orderTime},</if> + <if test="orderCreatedTime != null">#{orderCreatedTime},</if> + <if test="dispatchCreatedTime != null">#{dispatchCreatedTime},</if> + <if test="keyCollectionTime != null">#{keyCollectionTime},</if> + <if test="estimatedDepartureTime != null">#{estimatedDepartureTime},</if> + <if test="requiredArrivalTime != null">#{requiredArrivalTime},</if> + <if test="consignorAddress != null">#{consignorAddress},</if> + <if test="consigneeAddress != null">#{consigneeAddress},</if> + <if test="mainDriver != null">#{mainDriver},</if> + <if test="pointNum != null">#{pointNum},</if> + <if test="transportMode != null">#{transportMode},</if> + <if test="assistantDriver != null">#{assistantDriver},</if> + <if test="quantity != null">#{quantity},</if> + <if test="dispatchQuantity != null">#{dispatchQuantity},</if> + <if test="remark != null">#{remark},</if> + </trim> + </insert> + + <insert id="insertKeyCollectionInfoBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id"> + insert into key_collection_info + <trim prefix="(" suffix=") values" suffixOverrides=","> + id,customer_name,carrier,dispatch_no,driver_name,driver_mobile,license_plate_number,order_time,order_created_time,dispatch_created_time,key_collection_time,estimated_departure_time,required_arrival_time,consignor_address,consignee_address,main_driver,point_num,transport_mode,assistant_driver,quantity,dispatch_quantity,remark, + </trim> + <foreach item="item" index="index" collection="list" separator=","> + <trim prefix="(" suffix=") " suffixOverrides=","> + #{item.id},#{item.customerName},#{item.carrier},#{item.dispatchNo},#{item.driverName},#{item.driverMobile},#{item.licensePlateNumber},#{item.orderTime},#{item.orderCreatedTime},#{item.dispatchCreatedTime},#{item.keyCollectionTime},#{item.estimatedDepartureTime},#{item.requiredArrivalTime},#{item.consignorAddress},#{item.consigneeAddress},#{item.mainDriver},#{item.pointNum},#{item.transportMode},#{item.assistantDriver},#{item.quantity},#{item.dispatchQuantity},#{item.remark}, + </trim> + </foreach> + </insert> + + <!-- 淇敼 --> + <update id="updateKeyCollectionInfo" parameterType="com.ruoyi.cwgl.domain.KeyCollectionInfo"> + update key_collection_info + <trim prefix="SET" suffixOverrides=","> + <if test="customerName != null">customer_name = #{customerName},</if> + <if test="carrier != null">carrier = #{carrier},</if> + <if test="dispatchNo != null">dispatch_no = #{dispatchNo},</if> + <if test="driverName != null">driver_name = #{driverName},</if> + <if test="driverMobile != null">driver_mobile = #{driverMobile},</if> + <if test="licensePlateNumber != null">license_plate_number = #{licensePlateNumber},</if> + <if test="orderTime != null">order_time = #{orderTime},</if> + <if test="orderCreatedTime != null">order_created_time = #{orderCreatedTime},</if> + <if test="dispatchCreatedTime != null">dispatch_created_time = #{dispatchCreatedTime},</if> + <if test="keyCollectionTime != null">key_collection_time = #{keyCollectionTime},</if> + <if test="estimatedDepartureTime != null">estimated_departure_time = #{estimatedDepartureTime},</if> + <if test="requiredArrivalTime != null">required_arrival_time = #{requiredArrivalTime},</if> + <if test="consignorAddress != null">consignor_address = #{consignorAddress},</if> + <if test="consigneeAddress != null">consignee_address = #{consigneeAddress},</if> + <if test="mainDriver != null">main_driver = #{mainDriver},</if> + <if test="pointNum != null">point_num = #{pointNum},</if> + <if test="transportMode != null">transport_mode = #{transportMode},</if> + <if test="assistantDriver != null">assistant_driver = #{assistantDriver},</if> + <if test="quantity != null">quantity = #{quantity},</if> + <if test="dispatchQuantity != null">dispatch_quantity = #{dispatchQuantity},</if> + <if test="remark != null">remark = #{remark},</if> + </trim> + where id = #{id} + </update> + <!-- 淇敼 --> + <update id="updateKeyCollectionInfoBatch" parameterType="java.util.List"> + <foreach collection="list" item="item" index="index" separator=";"> + update key_collection_info + <trim prefix="SET" suffixOverrides=","> + <if test="item.customerName != null">customer_name = #{item.customerName},</if> + <if test="item.carrier != null">carrier = #{item.carrier},</if> + <if test="item.dispatchNo != null">dispatch_no = #{item.dispatchNo},</if> + <if test="item.driverName != null">driver_name = #{item.driverName},</if> + <if test="item.driverMobile != null">driver_mobile = #{item.driverMobile},</if> + <if test="item.licensePlateNumber != null">license_plate_number = #{item.licensePlateNumber},</if> + <if test="item.orderTime != null">order_time = #{item.orderTime},</if> + <if test="item.orderCreatedTime != null">order_created_time = #{item.orderCreatedTime},</if> + <if test="item.dispatchCreatedTime != null">dispatch_created_time = #{item.dispatchCreatedTime},</if> + <if test="item.keyCollectionTime != null">key_collection_time = #{item.keyCollectionTime},</if> + <if test="item.estimatedDepartureTime != null">estimated_departure_time = #{item.estimatedDepartureTime},</if> + <if test="item.requiredArrivalTime != null">required_arrival_time = #{item.requiredArrivalTime},</if> + <if test="item.consignorAddress != null">consignor_address = #{item.consignorAddress},</if> + <if test="item.consigneeAddress != null">consignee_address = #{item.consigneeAddress},</if> + <if test="item.mainDriver != null">main_driver = #{item.mainDriver},</if> + <if test="item.pointNum != null">point_num = #{item.pointNum},</if> + <if test="item.transportMode != null">transport_mode = #{item.transportMode},</if> + <if test="item.assistantDriver != null">assistant_driver = #{item.assistantDriver},</if> + <if test="item.quantity != null">quantity = #{item.quantity},</if> + <if test="item.dispatchQuantity != null">dispatch_quantity = #{item.dispatchQuantity},</if> + <if test="item.remark != null">remark = #{item.remark},</if> + </trim> + where id = #{item.id} + </foreach> + </update> + + <!--鍒犻櫎--> + <delete id="deleteKeyCollectionInfoById" parameterType="Integer"> + delete from key_collection_info where id = #{id} + </delete> + <delete id="deleteKeyCollectionInfoByIds" parameterType="Integer"> + delete from key_collection_info where id in + <foreach item="id" collection="array" open="(" separator="," close=")"> + #{id} + </foreach> + </delete> + +</mapper> \ No newline at end of file diff --git a/service/src/main/resources/mapper/cwgl/RequestLogMapper.xml b/service/src/main/resources/mapper/cwgl/RequestLogMapper.xml new file mode 100644 index 0000000..83062d9 --- /dev/null +++ b/service/src/main/resources/mapper/cwgl/RequestLogMapper.xml @@ -0,0 +1,137 @@ +<?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.cwgl.mapper.RequestLogMapper"> + + <resultMap type="com.ruoyi.cwgl.domain.RequestLog" id="RequestLogResult"> + <result property="id" column="id" /> + <result property="driverCode" column="driver_code" /> + <result property="driverName" column="driver_name" /> + <result property="boxNum" column="box_num" /> + <result property="createBy" column="create_by" /> + <result property="createTime" column="create_time" /> + <result property="reqTime" column="req_time" /> + <result property="type" column="type" /> + <result property="operation" column="operation" /> + </resultMap> + + <sql id="selectRequestLogVo"> + select thisTab.id, thisTab.driver_code, thisTab.driver_name, thisTab.box_num, thisTab.create_by, thisTab.create_time, thisTab.req_time, thisTab.type, thisTab.operation from request_log AS thisTab + </sql> + <sql id="selectRequestLogVoCount"> + select count(0) from request_log as thisTab + </sql> + + <sql id="whereCondition"> + <if test="driverCode != null and driverCode != ''"> and thisTab.driver_code = #{driverCode}</if> + <if test="driverName != null and driverName != ''"> and thisTab.driver_name like concat('%', #{driverName}, '%')</if> + <if test="boxNum != null and boxNum != ''"> and thisTab.box_num = #{boxNum}</if> + <if test="reqTime != null "> and thisTab.req_time = #{reqTime}</if> + <if test="type != null "> and thisTab.type = #{type}</if> + <if test="operation != null and operation != ''"> and thisTab.operation = #{operation}</if> + </sql> + + <!--鏌ヨ--> + <select id="selectRequestLogById" parameterType="Integer" resultMap="RequestLogResult"> + <include refid="selectRequestLogVo"/> + where id = #{id} + </select> + + <select id="selectRequestLogCount" parameterType="com.ruoyi.cwgl.domain.RequestLog" resultType="int"> + <include refid="selectRequestLogVoCount"/> + <where> + <include refid="whereCondition"/> + </where> + </select> + + <select id="selectRequestLogList" parameterType="com.ruoyi.cwgl.domain.RequestLog" resultMap="RequestLogResult"> + <include refid="selectRequestLogVo"/> + <where> + <include refid="whereCondition"/> + </where> + order by thisTab.id desc + </select> + + <!-- 鏂板 --> + <insert id="insertRequestLog" parameterType="com.ruoyi.cwgl.domain.RequestLog" useGeneratedKeys="true" keyProperty="id"> + insert into request_log + <trim prefix="(" suffix=")" suffixOverrides=","> + <if test="driverCode != null">driver_code,</if> + <if test="driverName != null">driver_name,</if> + <if test="boxNum != null">box_num,</if> + <if test="createBy != null">create_by,</if> + <if test="createTime != null">create_time,</if> + <if test="reqTime != null">req_time,</if> + <if test="type != null">type,</if> + <if test="operation != null">operation,</if> + </trim> + <trim prefix="values (" suffix=")" suffixOverrides=","> + <if test="driverCode != null">#{driverCode},</if> + <if test="driverName != null">#{driverName},</if> + <if test="boxNum != null">#{boxNum},</if> + <if test="createBy != null">#{createBy},</if> + <if test="createTime != null">#{createTime},</if> + <if test="reqTime != null">#{reqTime},</if> + <if test="type != null">#{type},</if> + <if test="operation != null">#{operation},</if> + </trim> + </insert> + + <insert id="insertRequestLogBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id"> + insert into request_log + <trim prefix="(" suffix=") values" suffixOverrides=","> + id,driver_code,driver_name,box_num,create_by,create_time,req_time,type,operation, + </trim> + <foreach item="item" index="index" collection="list" separator=","> + <trim prefix="(" suffix=") " suffixOverrides=","> + #{item.id},#{item.driverCode},#{item.driverName},#{item.boxNum},#{item.createBy},#{item.createTime},#{item.reqTime},#{item.type},#{item.operation}, + </trim> + </foreach> + </insert> + + <!-- 淇敼 --> + <update id="updateRequestLog" parameterType="com.ruoyi.cwgl.domain.RequestLog"> + update request_log + <trim prefix="SET" suffixOverrides=","> + <if test="driverCode != null">driver_code = #{driverCode},</if> + <if test="driverName != null">driver_name = #{driverName},</if> + <if test="boxNum != null">box_num = #{boxNum},</if> + <if test="createBy != null">create_by = #{createBy},</if> + <if test="createTime != null">create_time = #{createTime},</if> + <if test="reqTime != null">req_time = #{reqTime},</if> + <if test="type != null">type = #{type},</if> + <if test="operation != null">operation = #{operation},</if> + </trim> + where id = #{id} + </update> + <!-- 淇敼 --> + <update id="updateRequestLogBatch" parameterType="java.util.List"> + <foreach collection="list" item="item" index="index" separator=";"> + update request_log + <trim prefix="SET" suffixOverrides=","> + <if test="item.driverCode != null">driver_code = #{item.driverCode},</if> + <if test="item.driverName != null">driver_name = #{item.driverName},</if> + <if test="item.boxNum != null">box_num = #{item.boxNum},</if> + <if test="item.createBy != null">create_by = #{item.createBy},</if> + <if test="item.createTime != null">create_time = #{item.createTime},</if> + <if test="item.reqTime != null">req_time = #{item.reqTime},</if> + <if test="item.type != null">type = #{item.type},</if> + <if test="item.operation != null">operation = #{item.operation},</if> + </trim> + where id = #{item.id} + </foreach> + </update> + + <!--鍒犻櫎--> + <delete id="deleteRequestLogById" parameterType="Integer"> + delete from request_log where id = #{id} + </delete> + <delete id="deleteRequestLogByIds" parameterType="Integer"> + delete from request_log where id in + <foreach item="id" collection="array" open="(" separator="," close=")"> + #{id} + </foreach> + </delete> + +</mapper> \ No newline at end of file diff --git a/ui/admin-ui3/src/api/cwgl/keyCollectionInfo.ts b/ui/admin-ui3/src/api/cwgl/keyCollectionInfo.ts new file mode 100644 index 0000000..7e61e6e --- /dev/null +++ b/ui/admin-ui3/src/api/cwgl/keyCollectionInfo.ts @@ -0,0 +1,67 @@ +import request,{download,requestType} from "@/utils/request"; +import {BaseEntityInterface} from "@/utils/globalInterface"; +export interface KeyCollectionInfoI extends BaseEntityInterface{ + id ?: number , customerName ?: string , carrier ?: string , dispatchNo ?: string , driverName ?: string , driverMobile ?: string , licensePlateNumber ?: string , orderTime ?: string , orderCreatedTime ?: string , dispatchCreatedTime ?: string , keyCollectionTime ?: string , estimatedDepartureTime ?: string , requiredArrivalTime ?: string , consignorAddress ?: string , consigneeAddress ?: string , mainDriver ?: string , pointNum ?: number , transportMode ?: string , assistantDriver ?: string , quantity ?: number , dispatchQuantity ?: number , remark ?: string } + + +/** + * 鏌ヨ閽ュ寵棰嗗彇淇℃伅鍒楄〃 + */ +export const listKeyCollectionInfo:requestType = (query) => { + return request({ + url: '/cwgl/keyCollectionInfo/list', + method:'get', + params:query + }) +} +/** + * 鏌ヨ閽ュ寵棰嗗彇淇℃伅璇︾粏 + */ +export const getKeyCollectionInfo:requestType = (id) => { + return request({ + url: '/cwgl/keyCollectionInfo/' + id, + method:'get' + }) +} + +/** + * 鏂板閽ュ寵棰嗗彇淇℃伅 + */ +export const addKeyCollectionInfo:requestType = (data) => { + return request({ + url: '/cwgl/keyCollectionInfo', + method: 'post', + data + }) +} + +/** + * 淇敼閽ュ寵棰嗗彇淇℃伅 + */ +export const updateKeyCollectionInfo:requestType = (data) => { + return request({ + url: '/cwgl/keyCollectionInfo', + method: 'put', + data + }) +} + +/** + * 鍒犻櫎閽ュ寵棰嗗彇淇℃伅 + */ +export const delKeyCollectionInfo:requestType = (id) => { + return request({ + url: '/cwgl/keyCollectionInfo/' + id, + method: 'delete' + }) +} + + +/** + * 瀵煎嚭閽ュ寵棰嗗彇淇℃伅 + */ +export const exportKeyCollectionInfo:requestType = (query) => { + return new Promise<any>(()=>{ + download('/cwgl/keyCollectionInfo/export',query); + }) +} diff --git a/ui/admin-ui3/src/api/cwgl/requestLog.ts b/ui/admin-ui3/src/api/cwgl/requestLog.ts new file mode 100644 index 0000000..5dcbbcd --- /dev/null +++ b/ui/admin-ui3/src/api/cwgl/requestLog.ts @@ -0,0 +1,67 @@ +import request,{download,requestType} from "@/utils/request"; +import {BaseEntityInterface} from "@/utils/globalInterface"; +export interface RequestLogI extends BaseEntityInterface{ + id ?: number , driverCode ?: string , driverName ?: string , boxNum ?: string , createBy ?: string , createTime ?: string , reqTime ?: string , type ?: number , operation ?: string } + + +/** + * 鏌ヨ璇锋眰鏃ュ織鍒楄〃 + */ +export const listRequestLog:requestType = (query) => { + return request({ + url: '/cwgl/requestLog/list', + method:'get', + params:query + }) +} +/** + * 鏌ヨ璇锋眰鏃ュ織璇︾粏 + */ +export const getRequestLog:requestType = (id) => { + return request({ + url: '/cwgl/requestLog/' + id, + method:'get' + }) +} + +/** + * 鏂板璇锋眰鏃ュ織 + */ +export const addRequestLog:requestType = (data) => { + return request({ + url: '/cwgl/requestLog', + method: 'post', + data + }) +} + +/** + * 淇敼璇锋眰鏃ュ織 + */ +export const updateRequestLog:requestType = (data) => { + return request({ + url: '/cwgl/requestLog', + method: 'put', + data + }) +} + +/** + * 鍒犻櫎璇锋眰鏃ュ織 + */ +export const delRequestLog:requestType = (id) => { + return request({ + url: '/cwgl/requestLog/' + id, + method: 'delete' + }) +} + + +/** + * 瀵煎嚭璇锋眰鏃ュ織 + */ +export const exportRequestLog:requestType = (query) => { + return new Promise<any>(()=>{ + download('/cwgl/requestLog/export',query); + }) +} diff --git a/ui/admin-ui3/src/views/cwgl/keyCollectionInfo/index.vue b/ui/admin-ui3/src/views/cwgl/keyCollectionInfo/index.vue new file mode 100644 index 0000000..aca7e9f --- /dev/null +++ b/ui/admin-ui3/src/views/cwgl/keyCollectionInfo/index.vue @@ -0,0 +1,181 @@ +<template> + <basicContainer > + <avue-crud + :option="option" + :table-loading="pageF.loading" + :data="tableData" + :page="page" + :permission="permissionList" + :before-open="beforeOpen" + v-model="form" + ref="crudRef" + @row-update="rowUpdate" + @row-save="rowSave" + @refresh-change="refreshChange" + @row-del="rowDel" + @search-change="searchChange" + @search-reset="searchReset" + @selection-change="selectionChange" + @current-change="currentChange" + @size-change="sizeChange" + @on-load="onLoad" + > + <template #menu-left> + <el-button + type="success" + icon="Edit" + :disabled="pageF.single" + v-hasPermi="['cwgl:keyCollectionInfo:edit']" + @click="handleUpdate">淇敼 + </el-button> + <el-button + type="danger" + icon="Delete" + :disabled="pageF.multiple" + @click="handleDelete" + v-hasPermi="['cwgl:keyCollectionInfo:remove']" + >鍒犻櫎 + </el-button> + <el-button + type="warning" + plain + icon="Download" + @click="handleExport" + v-hasPermi="['cwgl:keyCollectionInfo:export']" + >瀵煎嚭 + </el-button> + </template> + </avue-crud> + </basicContainer> +</template> + +<script setup name="keyCollectionInfo" lang="ts"> + import {KeyCollectionInfoI,addKeyCollectionInfo, delKeyCollectionInfo, exportKeyCollectionInfo, getKeyCollectionInfo, listKeyCollectionInfo, updateKeyCollectionInfo} from "@/api/cwgl/keyCollectionInfo"; + import useCurrentInstance from "@/utils/useCurrentInstance"; + import {computed,reactive, ref, toRefs} from "vue"; + import {PagesInterface, PageQueryInterface} from "@/utils/globalInterface"; + import {usePagePlus} from "@/hooks/usePagePlus"; + import {hasPermission} from "@/utils/permissionUtils"; + + const { proxy } = useCurrentInstance(); + const crudRef = ref(); + + const permissionList = computed(()=>{ + return { + addBtn: hasPermission(["cwgl:keyCollectionInfo:add"]), + delBtn: hasPermission(["cwgl:keyCollectionInfo:remove"]), + editBtn: hasPermission(["cwgl:keyCollectionInfo:edit"]), + viewBtn: hasPermission(["cwgl:keyCollectionInfo:query"]), + } + }) + + const data = reactive({ + form:<KeyCollectionInfoI>{}, + queryParams:<KeyCollectionInfoI&PageQueryInterface>{}, + page: <PagesInterface>{ + pageSize: 10, + total: 0, + currentPage: 1, + }, + selectionList:[], + }) + const {queryParams,form,page,selectionList} = toRefs(data); + const option = ref({ + pageKey: 'KeyCollectionInfo', + rowKey: 'id', + column: { + id: { + label: 'ID', + }, + customerName: { + label: '瀹㈡埛鍚嶇О', + }, + carrier: { + label: '鎵胯繍鍟�', + }, + dispatchNo: { + label: '璋冨害鍗曞彿', + }, + driverName: { + label: '鍙告満鍚嶇О', + }, + driverMobile: { + label: '鍙告満鎵嬫満鍙�', + }, + licensePlateNumber: { + label: '杞︾墝鍙�', + }, + orderTime: { + label: '璁㈠崟涓嬪崟鏃堕棿', + }, + orderCreatedTime: { + label: '璁㈠崟鍒涘缓鏃堕棿', + }, + dispatchCreatedTime: { + label: '璋冨害鍗曞垱寤烘椂闂�', + }, + keyCollectionTime: { + label: '閽ュ寵棰嗗彇鏃堕棿', + }, + estimatedDepartureTime: { + label: '棰勮鍑哄彂鏃堕棿', + }, + requiredArrivalTime: { + label: '瑕佹眰鍒拌揪鏃堕棿', + }, + consignorAddress: { + label: '鍑哄彂鍦板湴鍧�', + type: 'textarea', minRows: 3, maxRows: 5, + }, + consigneeAddress: { + label: '鐩殑鍦板湴鍧�', + type: 'textarea', minRows: 3, maxRows: 5, + }, + mainDriver: { + label: '涓婚┚椹跺憳', + }, + pointNum: { + label: '鎻愰�佽揣鐐规暟', + }, + transportMode: { + label: '杩愯緭鏂瑰紡', + }, + assistantDriver: { + label: '鍓┚椹跺憳', + }, + quantity: { + label: '浠舵暟', + }, + dispatchQuantity: { + label: '瀹炲彂浠舵暟', + }, + remark: { + label: '澶囨敞', + type: 'textarea', minRows: 3, maxRows: 5, + }, + } + }) + + const { tableData,pageF,rowSave,rowUpdate,rowDel,beforeOpen,searchChange, + searchReset,selectionChange,onLoad,currentChange,sizeChange,handleDelete,handleExport,handleUpdate,refreshChange} = usePagePlus({ + form:form, + option:option, + queryParams:queryParams, + idKey:'id', + page:page.value, + getListApi:listKeyCollectionInfo, + getDetailApi:getKeyCollectionInfo, + exportApi:exportKeyCollectionInfo, + deleteApi:delKeyCollectionInfo, + addApi:addKeyCollectionInfo, + updateApi:updateKeyCollectionInfo, + handleUpdateFunc:()=>{ + crudRef.value.rowEdit(selectionList.value[0]); + }, + handleSelectionChangeFunc:(selection:any)=>{ + selectionList.value = selection; + } + }) + + +</script> diff --git a/ui/admin-ui3/src/views/cwgl/requestLog/index.vue b/ui/admin-ui3/src/views/cwgl/requestLog/index.vue new file mode 100644 index 0000000..26942fe --- /dev/null +++ b/ui/admin-ui3/src/views/cwgl/requestLog/index.vue @@ -0,0 +1,139 @@ +<template> + <basicContainer > + <avue-crud + :option="option" + :table-loading="pageF.loading" + :data="tableData" + :page="page" + :permission="permissionList" + :before-open="beforeOpen" + v-model="form" + ref="crudRef" + @row-update="rowUpdate" + @row-save="rowSave" + @refresh-change="refreshChange" + @row-del="rowDel" + @search-change="searchChange" + @search-reset="searchReset" + @selection-change="selectionChange" + @current-change="currentChange" + @size-change="sizeChange" + @on-load="onLoad" + > + <template #menu-left> + <el-button + type="success" + icon="Edit" + :disabled="pageF.single" + v-hasPermi="['cwgl:requestLog:edit']" + @click="handleUpdate">淇敼 + </el-button> + <el-button + type="danger" + icon="Delete" + :disabled="pageF.multiple" + @click="handleDelete" + v-hasPermi="['cwgl:requestLog:remove']" + >鍒犻櫎 + </el-button> + <el-button + type="warning" + plain + icon="Download" + @click="handleExport" + v-hasPermi="['cwgl:requestLog:export']" + >瀵煎嚭 + </el-button> + </template> + </avue-crud> + </basicContainer> +</template> + +<script setup name="requestLog" lang="ts"> + import {RequestLogI,addRequestLog, delRequestLog, exportRequestLog, getRequestLog, listRequestLog, updateRequestLog} from "@/api/cwgl/requestLog"; + import useCurrentInstance from "@/utils/useCurrentInstance"; + import {computed,reactive, ref, toRefs} from "vue"; + import {PagesInterface, PageQueryInterface} from "@/utils/globalInterface"; + import {usePagePlus} from "@/hooks/usePagePlus"; + import {hasPermission} from "@/utils/permissionUtils"; + + const { proxy } = useCurrentInstance(); + const crudRef = ref(); + + const permissionList = computed(()=>{ + return { + addBtn: hasPermission(["cwgl:requestLog:add"]), + delBtn: hasPermission(["cwgl:requestLog:remove"]), + editBtn: hasPermission(["cwgl:requestLog:edit"]), + viewBtn: hasPermission(["cwgl:requestLog:query"]), + } + }) + + const data = reactive({ + form:<RequestLogI>{}, + queryParams:<RequestLogI&PageQueryInterface>{}, + page: <PagesInterface>{ + pageSize: 10, + total: 0, + currentPage: 1, + }, + selectionList:[], + }) + const {queryParams,form,page,selectionList} = toRefs(data); + const option = ref({ + pageKey: 'RequestLog', + rowKey: 'id', + column: { + id: { + label: '涓婚敭', + }, + driverCode: { + label: '鍙告満鍞竴缂栧彿', + }, + driverName: { + label: '鍙告満濮撳悕', + }, + boxNum: { + label: '鏌滈棬缂栧彿', + }, + createBy: { + label: '鍒涘缓鑰�', + }, + createTime: { + label: '鍒涘缓鏃堕棿', + }, + reqTime: { + label: '璇锋眰鏃堕棿', + }, + type: { + label: '0涓婃姤鍙栧嚭1褰掕繕涓婃姤', + }, + operation: { + label: '鎿嶄綔璇存槑', + }, + } + }) + + const { tableData,pageF,rowSave,rowUpdate,rowDel,beforeOpen,searchChange, + searchReset,selectionChange,onLoad,currentChange,sizeChange,handleDelete,handleExport,handleUpdate,refreshChange} = usePagePlus({ + form:form, + option:option, + queryParams:queryParams, + idKey:'id', + page:page.value, + getListApi:listRequestLog, + getDetailApi:getRequestLog, + exportApi:exportRequestLog, + deleteApi:delRequestLog, + addApi:addRequestLog, + updateApi:updateRequestLog, + handleUpdateFunc:()=>{ + crudRef.value.rowEdit(selectionList.value[0]); + }, + handleSelectionChangeFunc:(selection:any)=>{ + selectionList.value = selection; + } + }) + + +</script> -- Gitblit v1.8.0