Compare commits
284
Commits
a2e3f23798
..
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4a0ac011b9 | ||
|
|
0363e6fdc5 | ||
|
|
ee873473fb | ||
|
|
b7233d4052 | ||
|
|
afc47230df | ||
|
|
4917dcb154 | ||
|
|
144a5f625a | ||
|
|
b136e6a55e | ||
|
|
1eb2f4c816 | ||
|
|
8ca0b289fa | ||
|
|
457fceb0b1 | ||
|
|
7ab77cfbf7 | ||
|
|
4f16713c03 | ||
|
|
5d89fdc0a6 | ||
|
|
9cdb5a8896 | ||
|
|
bea406051f | ||
|
|
af540c67f9 | ||
|
|
598a8b89e3 | ||
|
|
f149b7322d | ||
|
|
cbe6283009 | ||
|
|
ea8739d178 | ||
|
|
d40556c0be | ||
|
|
244b8d7e6e | ||
|
|
e7162e1877 | ||
|
|
cad9445ec8 | ||
|
|
67d9da9c5d | ||
|
|
de7c40e6ce | ||
|
|
ea4b53b041 | ||
|
|
fed9d449af | ||
|
|
848c92576d | ||
|
|
c652ccd087 | ||
|
|
52a34779ec | ||
|
|
d1135022c8 | ||
|
|
48a2a28025 | ||
|
|
33532bb92d | ||
|
|
5b85d5c3e1 | ||
|
|
ad063713a4 | ||
|
|
d3dbeb5858 | ||
|
|
44d295f702 | ||
|
|
fe1aadd8ac | ||
|
|
98c4c08a8f | ||
|
|
5170a2d96f | ||
|
|
fa68e9dc0e | ||
|
|
93099ce1c0 | ||
|
|
7974fefd96 | ||
|
|
0322b325f6 | ||
|
|
f62eed296f | ||
|
|
a25e56f9b6 | ||
|
|
102fec9ccd | ||
|
|
10c071d17b | ||
|
|
1de84cfedb | ||
|
|
4327b83c82 | ||
|
|
f9b2d212b2 | ||
|
|
f404ef7516 | ||
|
|
78c10abe4f | ||
|
|
5e50398687 | ||
|
|
d1e982b9d4 | ||
|
|
73e7811b13 | ||
|
|
c0c75e2db0 | ||
|
|
8f8bda4a87 | ||
|
|
55a41408b3 | ||
|
|
42ec30eb42 | ||
|
|
cac5c16d3b | ||
|
|
3d3c978c1d | ||
|
|
2f1e6dff42 | ||
|
|
e4e953fb59 | ||
|
|
3cbaec35df | ||
|
|
31acfe0aa9 | ||
|
|
fc1ddec2ba | ||
|
|
5acc1059c1 | ||
|
|
d9e5d5187e | ||
|
|
44916f5460 | ||
|
|
8114bf79e2 | ||
|
|
1e6173c74f | ||
|
|
3e178a53ff | ||
|
|
28afb0b8dc | ||
|
|
df6c9ae6e0 | ||
|
|
532d163f7a | ||
|
|
14dcecb5d4 | ||
|
|
46f53855f9 | ||
|
|
5e16ca2436 | ||
|
|
669583d20a | ||
|
|
f4ff722b96 | ||
|
|
ab4067dd74 | ||
|
|
37dd75622a | ||
|
|
459ac0a809 | ||
|
|
da439c9127 | ||
|
|
147856b289 | ||
|
|
33657ae3c7 | ||
|
|
675799100d | ||
|
|
2ff7b8fd6a | ||
|
|
54510f73cd | ||
|
|
d3428a7b57 | ||
|
|
5f230d03ea | ||
|
|
e6244b94fe | ||
|
|
c1cf09c6c4 | ||
|
|
ae8bfcafcb | ||
|
|
d58411eef9 | ||
|
|
62c42b3aaa | ||
|
|
f2fb43432e | ||
|
|
99e5258017 | ||
|
|
07df495135 | ||
|
|
16b99eb43f | ||
|
|
4149e4b15a | ||
|
|
a55ac20f0e | ||
|
|
b5c29925a8 | ||
|
|
02b64d8f96 | ||
|
|
06830c2fc1 | ||
|
|
9e63ca1e8d | ||
|
|
5189806635 | ||
|
|
a7e0a00d88 | ||
|
|
8cfd6d435a | ||
|
|
296f9a2818 | ||
|
|
09c612bbd9 | ||
|
|
eb015c79d3 | ||
|
|
eb46fb1cc3 | ||
|
|
4cbb338425 | ||
|
|
b8e61e097b | ||
|
|
0ce069af7b | ||
|
|
d436601507 | ||
|
|
10fc266705 | ||
|
|
db313639db | ||
|
|
939d15b521 | ||
|
|
910e1bac83 | ||
|
|
0194adc794 | ||
|
|
0e87b0d4b1 | ||
|
|
54631a0101 | ||
|
|
e495aae1a1 | ||
|
|
a655870fbe | ||
|
|
99602b3782 | ||
|
|
3d24f32c9d | ||
|
|
a2780dc9dc | ||
|
|
2b0a582a5a | ||
|
|
2c27ce7031 | ||
|
|
2ee208c50e | ||
|
|
d4f6965fb5 | ||
|
|
b34b7d8792 | ||
|
|
3c3f6a2bc8 | ||
|
|
0fd00ed65d | ||
|
|
60825ebe9d | ||
|
|
9b9ea1c0a5 | ||
|
|
38e7606a71 | ||
|
|
20422aeb83 | ||
|
|
558fdde064 | ||
|
|
56db83a80d | ||
|
|
6af1bd8aa0 | ||
|
|
99d0e2593d | ||
|
|
821f1bf956 | ||
|
|
29aa101654 | ||
|
|
2190fcf623 | ||
|
|
e439b71467 | ||
|
|
d91779cf5c | ||
|
|
2b70f25fae | ||
|
|
440129373c | ||
|
|
7f6d04e122 | ||
|
|
ef698c2fa1 | ||
|
|
caf926f503 | ||
|
|
7644dc8fc5 | ||
|
|
4363235bfb | ||
|
|
089b7535b5 | ||
|
|
81633720e3 | ||
|
|
fe096a498f | ||
|
|
9aa72e44d7 | ||
|
|
d914f48ef0 | ||
|
|
32dbc85026 | ||
|
|
fe5880890e | ||
|
|
43b3773e3e | ||
|
|
480d50f9da | ||
|
|
cd79abeb32 | ||
|
|
43aec4ac0d | ||
|
|
2a9f715406 | ||
|
|
52779f0196 | ||
|
|
db86df135a | ||
|
|
e0d3e40847 | ||
|
|
6787c17b00 | ||
|
|
49cdce7b9c | ||
|
|
5786521755 | ||
|
|
6bea09744f | ||
|
|
62b779d1f0 | ||
|
|
58f2e70f21 | ||
|
|
9dd3be3507 | ||
|
|
6adcc406b9 | ||
|
|
5b2d4569a7 | ||
|
|
126a826513 | ||
|
|
373600aba2 | ||
|
|
d143ca2840 | ||
|
|
0652ccecf4 | ||
|
|
e5476beb07 | ||
|
|
04ed2148a7 | ||
|
|
dc09743357 | ||
|
|
347767ffc2 | ||
|
|
7926235114 | ||
|
|
2710c97f42 | ||
|
|
4b9c2978ae | ||
|
|
ff682a47f4 | ||
|
|
b72134a936 | ||
|
|
7c6745bdd1 | ||
|
|
17e1937be4 | ||
|
|
8dbbaa54b9 | ||
|
|
addb2fd96e | ||
|
|
db34025a4b | ||
|
|
59df615137 | ||
|
|
d9ec7cd352 | ||
|
|
e26dc853d5 | ||
|
|
8a3af8a13e | ||
|
|
7dde79c61f | ||
|
|
1c83d70437 | ||
|
|
c88d22c185 | ||
|
|
115eb3f791 | ||
|
|
d7e5699410 | ||
|
|
00dacdae19 | ||
|
|
bbbb0b835d | ||
|
|
3b9983c68f | ||
|
|
277dc19988 | ||
|
|
76fff6437d | ||
|
|
0738c939ae | ||
|
|
da34a284d2 | ||
|
|
15b5c5443d | ||
|
|
a52984b103 | ||
|
|
79ca006214 | ||
|
|
d25a957f13 | ||
|
|
714bb1cce4 | ||
|
|
2afe2061af | ||
|
|
18d479b55e | ||
|
|
d9faab242a | ||
|
|
7f35e4b375 | ||
|
|
0512713541 | ||
|
|
04a7dedbca | ||
|
|
797f2db7c1 | ||
|
|
1f8f89264b | ||
|
|
93a4afbacc | ||
|
|
bc4e60a408 | ||
|
|
5b86965586 | ||
|
|
b62a8eb7cf | ||
|
|
1fadbbdec5 | ||
|
|
df671374b3 | ||
|
|
985effdaa3 | ||
|
|
cf19750fe0 | ||
|
|
5c83fd1559 | ||
|
|
732bfa1f5a | ||
|
|
1997aa2e8d | ||
|
|
574bd553e7 | ||
|
|
31dae7ecf6 | ||
|
|
12a5cc6129 | ||
|
|
5bde552f18 | ||
|
|
03860eb30a | ||
|
|
276138394e | ||
|
|
fea66b5e28 | ||
|
|
d641a757f6 | ||
|
|
2fc8fa8331 | ||
|
|
b3eb3f9963 | ||
|
|
254fa94512 | ||
|
|
02736c16f2 | ||
|
|
186c5d1b94 | ||
|
|
b2d0602a6b | ||
|
|
16c46565f5 | ||
|
|
3196c3416a | ||
|
|
a51e6e3f3d | ||
|
|
6255279979 | ||
|
|
7802b28143 | ||
|
|
ca4b1ce2a3 | ||
|
|
581421da33 | ||
|
|
bf4b1d9568 | ||
|
|
805740f78c | ||
|
|
fa650c7ef7 | ||
|
|
e1411e1fe7 | ||
|
|
65a3d4d5c9 | ||
|
|
d9d75bd0cf | ||
|
|
4dfa961a58 | ||
|
|
5cae9b8fa7 | ||
|
|
55b6554216 | ||
|
|
9e8f0f195a | ||
|
|
f3f10d10db | ||
|
|
db28bab895 | ||
|
|
fe174b45ef | ||
|
|
2cf42f6e06 | ||
|
|
bd9cfe50f8 | ||
|
|
a52049eab3 | ||
|
|
f283c66278 | ||
|
|
23964e5e6d | ||
|
|
1655d57057 | ||
|
|
aab59723f9 | ||
|
|
7f8732dd02 | ||
|
|
56356839bf |
@@ -275,6 +275,12 @@ public interface SystemServiceFeign {
|
||||
@GetMapping("/associationWarehouseApi/setWarehouseInfo")
|
||||
public AjaxResult setWarehouseInfo(@RequestBody AssociationWarehouseFeign associationWarehouseFeign);
|
||||
|
||||
/**
|
||||
* 查询仓库关联的用户ID集合
|
||||
*/
|
||||
@GetMapping("/associationWarehouseApi/queryListCorrelationId")
|
||||
public AjaxResult queryListCorrelationId(@RequestParam(value = "warehouseId", required = false) Long warehouseId);
|
||||
|
||||
|
||||
/**
|
||||
* 根据code编码查询费用科目
|
||||
|
||||
@@ -109,6 +109,13 @@ public interface UserServiceFeign {
|
||||
@GetMapping("/userApi/getInfo/{userId}")
|
||||
public AjaxResult getInfo(@PathVariable("userId") Long userId);
|
||||
|
||||
/**
|
||||
* 根据用户ID查询用户详细信息
|
||||
*/
|
||||
@ApiOperation("根据用户ID查询用户详细信息")
|
||||
@GetMapping("/userApi/getInfoByName/{userName}")
|
||||
public AjaxResult getInfoByName(@PathVariable("userName") String userName);
|
||||
|
||||
|
||||
/**
|
||||
* 查询车辆绑定的承运人列表
|
||||
@@ -180,4 +187,8 @@ public interface UserServiceFeign {
|
||||
@ApiOperation("查询承运人汇总数据")
|
||||
@GetMapping("/userShipperApi/getShipperSummaryData/{userId}")
|
||||
public AjaxResult<?> getShipperSummaryData(@PathVariable("userId") Long userId);
|
||||
}
|
||||
|
||||
@ApiOperation("根据用户ID查询货主信息")
|
||||
@GetMapping("/userShipperApi/getShipperByUserId/{userId}")
|
||||
public AjaxResult<?> getShipperByUserId(@PathVariable("userId") Long userId);
|
||||
}
|
||||
@@ -518,4 +518,15 @@ public interface WlhyServiceFeign {
|
||||
|
||||
@GetMapping(value = "/ntocc/tmsSettlementExchangeRate/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id);
|
||||
|
||||
/**
|
||||
* 数字物流同步网货订单
|
||||
* @param tmsOrderAddDTO
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/feign/order/add")
|
||||
public AjaxResult add(@RequestBody TmsOrderAddDTO tmsOrderAddDTO);
|
||||
|
||||
@GetMapping("/feign/order/cancelIssueDocuments")
|
||||
public AjaxResult cancelIssueDocuments(@RequestParam(name="executeOrderId") String executeOrderId);
|
||||
}
|
||||
|
||||
@@ -3,12 +3,15 @@ package com.mhd.system.api;
|
||||
import com.mhd.common.core.constant.ServiceNameConstants;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.system.api.domain.MaterialBaseInfoFeign;
|
||||
import com.mhd.system.api.domain.MaterialInventoryDTO;
|
||||
import com.mhd.system.api.domain.NoticeOrderDTO;
|
||||
import com.mhd.system.api.factory.RemoteTicketFeignFallbackFactory;
|
||||
import com.mhd.system.api.feign.FeignAutoConfiguration;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author ZhouGY
|
||||
* @title WmsServiceFeign
|
||||
@@ -57,4 +60,9 @@ public interface WmsServiceFeign {
|
||||
@PostMapping("/noticeOrderApi/insert")
|
||||
public AjaxResult stockOutOrInInsert(@RequestBody NoticeOrderDTO noticeOrderDTO);
|
||||
|
||||
/**
|
||||
* 查询物料库存列表不分页
|
||||
*/
|
||||
@GetMapping("/materialInventoryApi/listAll")
|
||||
public AjaxResult materialInventoryApiListAll(MaterialInventoryDTO materialInventoryDTO);
|
||||
}
|
||||
|
||||
@@ -44,6 +44,10 @@ public class BatchDetailFeignPO extends BaseVOEntity{
|
||||
@Excel(name = "批次标签")
|
||||
private String batchLabels;
|
||||
|
||||
@ApiModelProperty("字段名称")
|
||||
@Excel(name = "字段名称")
|
||||
private String fieldName;
|
||||
|
||||
@ApiModelProperty("输入控制: 1-必填 2-可选")
|
||||
@Excel(name = "输入控制: 1-必填 2-可选")
|
||||
private String inputControl;
|
||||
@@ -56,6 +60,10 @@ public class BatchDetailFeignPO extends BaseVOEntity{
|
||||
@Excel(name = "属性选项")
|
||||
private String attributeOption;
|
||||
|
||||
@ApiModelProperty("是否显示: 0-不显示 1-显示")
|
||||
@Excel(name = "是否显示: 0-不显示 1-显示")
|
||||
private Integer isDisplay;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
+30
@@ -181,5 +181,35 @@ public class MaterialBaseInfoFeign extends BaseVOEntity{
|
||||
@ApiModelProperty("是否公用: 1-是 2-否")
|
||||
@Excel(name = "是否公用: 1-是 2-否")
|
||||
private Integer common;
|
||||
|
||||
@ApiModelProperty("SKU码")
|
||||
private String skuCode;
|
||||
|
||||
@ApiModelProperty("单价")
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
@ApiModelProperty("原产国")
|
||||
private String originCountry;
|
||||
|
||||
@ApiModelProperty("HS码")
|
||||
private String hsCode;
|
||||
|
||||
@ApiModelProperty("申报单位")
|
||||
private String declarationUnit;
|
||||
|
||||
@ApiModelProperty("法定单位")
|
||||
private String statutoryUnit;
|
||||
|
||||
@ApiModelProperty("法定第二单位")
|
||||
private String statutorySecondUnit;
|
||||
/**
|
||||
* 规格型号
|
||||
*/
|
||||
@ApiModelProperty("规格型号")
|
||||
@Excel(name = "规格型号")
|
||||
private String specificationModel;
|
||||
|
||||
@ApiModelProperty("币制")
|
||||
private String currency;
|
||||
}
|
||||
|
||||
|
||||
+149
@@ -0,0 +1,149 @@
|
||||
package com.mhd.system.api.domain;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 物料库存对象 material_inventory
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-29
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class MaterialInventoryDTO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("物料库存id")
|
||||
private Long materialInventoryId;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("物料基础信息id")
|
||||
@Excel(name = "物料基础信息id")
|
||||
private Long materialBaseInfoId;
|
||||
|
||||
@ApiModelProperty("上架单物料明细id")
|
||||
@Excel(name = "上架单物料明细id")
|
||||
private Long materialDetailId;
|
||||
|
||||
@ApiModelProperty("仓库id")
|
||||
@Excel(name = "仓库id")
|
||||
private Long warehouseId;
|
||||
|
||||
@ApiModelProperty("仓库编码")
|
||||
@Excel(name = "仓库编码")
|
||||
private String warehouseCode;
|
||||
|
||||
@ApiModelProperty("仓库名称")
|
||||
@Excel(name = "仓库名称")
|
||||
private String warehouseName;
|
||||
|
||||
@ApiModelProperty("库区id")
|
||||
@Excel(name = "库区id")
|
||||
private Long storageSectionId;
|
||||
|
||||
@ApiModelProperty("库区编码")
|
||||
@Excel(name = "库区编码")
|
||||
private String storageCode;
|
||||
|
||||
@ApiModelProperty("库区名称")
|
||||
@Excel(name = "库区名称")
|
||||
private String storageName;
|
||||
|
||||
@ApiModelProperty("库位id")
|
||||
@Excel(name = "库位id")
|
||||
private Long storageLocationId;
|
||||
|
||||
@ApiModelProperty("库位编码")
|
||||
@Excel(name = "库位编码")
|
||||
private String storageLocationCode;
|
||||
|
||||
@ApiModelProperty("库位名称")
|
||||
@Excel(name = "库位名称")
|
||||
private String storageLocationName;
|
||||
|
||||
@ApiModelProperty("批次号")
|
||||
@Excel(name = "批次号")
|
||||
private String batchNumber;
|
||||
|
||||
@ApiModelProperty("物料状态编码")
|
||||
@Excel(name = "物料状态编码")
|
||||
private String materialStatusCode;
|
||||
|
||||
@ApiModelProperty("物料状态名称")
|
||||
@Excel(name = "物料状态名称")
|
||||
private String materialStatusName;
|
||||
|
||||
@ApiModelProperty("容器id")
|
||||
@Excel(name = "容器id")
|
||||
private Long containerId;
|
||||
|
||||
@ApiModelProperty("容器编码")
|
||||
@Excel(name = "容器编码")
|
||||
private String containerCode;
|
||||
|
||||
@ApiModelProperty("容器类型 数据字典")
|
||||
@Excel(name = "容器类型 数据字典")
|
||||
private String containerType;
|
||||
|
||||
@ApiModelProperty("容器类型名称 数据字典")
|
||||
@Excel(name = "容器类型名称 数据字典")
|
||||
private String containerTypeName;
|
||||
|
||||
@ApiModelProperty("库存数量")
|
||||
@Excel(name = "库存数量")
|
||||
private BigDecimal inventoryQuantity;
|
||||
|
||||
@ApiModelProperty("可用数量")
|
||||
@Excel(name = "可用数量")
|
||||
private BigDecimal allocationQuantity;
|
||||
|
||||
@ApiModelProperty("冻结数量")
|
||||
@Excel(name = "冻结数量")
|
||||
private BigDecimal freezeQuantity;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
|
||||
@ApiModelProperty("盘点是否可用:0-禁用 1-可用")
|
||||
@Excel(name = "盘点是否可用:0-禁用 1-可用")
|
||||
private Integer isAble;
|
||||
|
||||
@ApiModelProperty("货主信息")
|
||||
@Excel(name = "货主信息")
|
||||
private String shipperInfo;
|
||||
|
||||
@ApiModelProperty("物料信息")
|
||||
@Excel(name = "物料信息")
|
||||
private String materialInfo;
|
||||
|
||||
@ApiModelProperty("物料/库位信息")
|
||||
@Excel(name = "物料/库位信息")
|
||||
private String storageInfo;
|
||||
|
||||
@ApiModelProperty("货主id")
|
||||
private Long shipperId;
|
||||
}
|
||||
@@ -37,5 +37,7 @@ public class UserDTO extends BaseVOEntity {
|
||||
private Integer userStatus;
|
||||
@ApiModelProperty(name = "业务类型:0.无状态,1.托运业务,2.承运业务,3.托运、承运业务,4.无业务,5.不确定业务默认为托运业务")
|
||||
private Integer businessType;
|
||||
@ApiModelProperty(name = "用户角色")
|
||||
private String userRole;
|
||||
|
||||
}
|
||||
|
||||
+5
@@ -219,6 +219,11 @@ public class RemoteSystemFeignFallbackFactory implements FallbackFactory<SystemS
|
||||
return AjaxResult.error("查询关联仓库列表根据关联id查询失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult queryListCorrelationId(Long warehouseId) {
|
||||
return AjaxResult.error("查询仓库关联的用户ID集合失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult getSubInfoByCode(String subjectCode) {
|
||||
return AjaxResult.error("获取科目信息失败" + throwable.getMessage());
|
||||
|
||||
+13
-1
@@ -14,6 +14,7 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
@@ -78,11 +79,17 @@ public class RemoteUserFeignFallbackFactory implements FallbackFactory<UserServi
|
||||
return AjaxResult.error("根据车辆id查询司机失败:" + throwable.getMessage());
|
||||
}
|
||||
|
||||
@GetMapping("/userApi/getInfo/{userId}")
|
||||
@Override
|
||||
public AjaxResult getInfo(Long userId) {
|
||||
return AjaxResult.error("根据用户ID查询用户详细信息失败:" + throwable.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult getInfoByName(String userName) {
|
||||
return AjaxResult.error("根据用户userName查询用户详细信息失败:" + throwable.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult bindDriverShipList(Long vehicleId) {
|
||||
return AjaxResult.error("查询车辆绑定的承运人列表信息失败:" + throwable.getMessage());
|
||||
@@ -169,6 +176,11 @@ public class RemoteUserFeignFallbackFactory implements FallbackFactory<UserServi
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult<?> getShipperByUserId(Long userId) {
|
||||
return AjaxResult.error("查询失败" + throwable.getMessage());
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
+10
@@ -523,6 +523,16 @@ public class RemoteWlhyFallbackFactory implements FallbackFactory<WlhyServiceFei
|
||||
public Result<?> queryById(String id) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult add(TmsOrderAddDTO tmsOrderAddDTO) {
|
||||
return AjaxResult.error(cause.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult cancelIssueDocuments(String executeOrderId) {
|
||||
return AjaxResult.error(cause.getMessage());
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
+8
@@ -5,6 +5,7 @@ import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.system.api.WlhyServiceFeign;
|
||||
import com.mhd.system.api.WmsServiceFeign;
|
||||
import com.mhd.system.api.domain.MaterialBaseInfoFeign;
|
||||
import com.mhd.system.api.domain.MaterialInventoryDTO;
|
||||
import com.mhd.system.api.domain.NoticeOrderDTO;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -12,6 +13,8 @@ import org.springframework.cloud.openfeign.FallbackFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author ZhouGY
|
||||
* @title RemoteWmsFallbackFactory
|
||||
@@ -46,6 +49,11 @@ public class RemoteWmsFallbackFactory implements FallbackFactory<WmsServiceFeign
|
||||
public AjaxResult stockOutOrInInsert(NoticeOrderDTO noticeOrderDTO) {
|
||||
return AjaxResult.error(cause.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult materialInventoryApiListAll(MaterialInventoryDTO materialInventoryDTO) {
|
||||
return AjaxResult.error(cause.getMessage());
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,17 +12,11 @@ spring:
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
# server-addr: 127.0.0.1:8848
|
||||
# 线上测试环境配置 容器名+端口号
|
||||
#线上正式环境
|
||||
server-addr: 10.102.192.5:6848
|
||||
username: nacos
|
||||
password: manhuoda@2023
|
||||
#线上正式环境
|
||||
# server-addr: 10.102.192.5:6848
|
||||
# username: nacos
|
||||
# password: manhuoda@2023
|
||||
config:
|
||||
# server-addr: 127.0.0.1:8848
|
||||
# 线上测试环境配置 容器名+端口号
|
||||
server-addr: 10.102.192.5:6848
|
||||
username: nacos
|
||||
@@ -32,4 +26,4 @@ spring:
|
||||
file-extension: yml #默认properties
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
+5
@@ -22,6 +22,11 @@ import java.util.List;
|
||||
public class ReconciliationDTO extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty("对账单表id")
|
||||
private Long reconciliationId;
|
||||
|
||||
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
package com.mhd.common.core.domain.dto.wlhy;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* TODO 多装多卸地址DTO
|
||||
*
|
||||
* @author LianZhijian
|
||||
* @version 1.0
|
||||
* @date 2022-12-16 14:23:22
|
||||
*/
|
||||
@Data
|
||||
public class TmsAddressMultiDTO {
|
||||
|
||||
@ApiModelProperty(value = "装卸货地县区编码")
|
||||
private String areaCode;
|
||||
@ApiModelProperty(value = "装卸货地名称")
|
||||
private String areaName;
|
||||
@ApiModelProperty(value = "装卸货详细地址")
|
||||
private String address;
|
||||
@ApiModelProperty(value = "装卸货地经度")
|
||||
private String longitude;
|
||||
@ApiModelProperty(value = "装货地纬度")
|
||||
private String latitude;
|
||||
@ApiModelProperty(value = "装卸货联系人")
|
||||
private String contactName;
|
||||
@ApiModelProperty(value = "装卸货联系人电话")
|
||||
private String contactPhone;
|
||||
@ApiModelProperty(value = "装卸货日期(年月日)")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date layDate;
|
||||
@ApiModelProperty(value = "装卸货时间(上午、下午、24小时)")
|
||||
private String layTime;
|
||||
@ApiModelProperty(value = "装卸货时间id")
|
||||
private String layTimeId;
|
||||
@ApiModelProperty(value = "装卸货类型:0无状态1装货地址2卸货地址")
|
||||
private Integer layType;
|
||||
@ApiModelProperty(value = "序号")
|
||||
private Integer sort;
|
||||
@ApiModelProperty(value = "简称")
|
||||
private String shortName;
|
||||
|
||||
}
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
package com.mhd.common.core.domain.dto.wlhy;
|
||||
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 货源表
|
||||
* @Author: lfs
|
||||
* @Date: 2020-02-14 09:49:27
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class TmsCargoInfoDTO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "货单号")
|
||||
private String orderId;
|
||||
@ApiModelProperty(value = "物料ID 库存ID 货物类型ID")
|
||||
private String goodsTypeId;
|
||||
@ApiModelProperty(value = "货物类型")
|
||||
private String goodsType;
|
||||
@ApiModelProperty(value = "货物名称ID")
|
||||
private String goodsNameId;
|
||||
@ApiModelProperty(value = "货物名称")
|
||||
private String goodsName;
|
||||
@ApiModelProperty(value = "货物数量")
|
||||
private BigDecimal cargoNum;
|
||||
@ApiModelProperty(value = "货物重量")
|
||||
private BigDecimal cargoWeight;
|
||||
private BigDecimal weight;
|
||||
@ApiModelProperty(value = "重量单位ID")
|
||||
private String weightUnitId;
|
||||
@ApiModelProperty(value = "重量单位名称")
|
||||
private String weightUnit;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "数量单位ID")
|
||||
private String quantityUnitId;
|
||||
@ApiModelProperty(value = "数量单位名称")
|
||||
private String quantityUnit;
|
||||
|
||||
@ApiModelProperty("货物名称")
|
||||
private String cargoName;
|
||||
|
||||
@ApiModelProperty("货物单位ID")
|
||||
private String cargoUnitId;
|
||||
|
||||
@ApiModelProperty("货物单位名字")
|
||||
private String cargoUnitName;
|
||||
|
||||
@ApiModelProperty("整机表编号")
|
||||
private String machineCode;
|
||||
|
||||
@ApiModelProperty("")
|
||||
private String materialCode;
|
||||
|
||||
@ApiModelProperty("体积")
|
||||
private BigDecimal materialVolume;
|
||||
|
||||
@ApiModelProperty("内容")
|
||||
private String materialContent;
|
||||
|
||||
@ApiModelProperty("是否为库存")
|
||||
private boolean stockFlag;
|
||||
|
||||
@ApiModelProperty("货物重量 罐车运输专有字段")
|
||||
private BigDecimal cargoTonnage;
|
||||
|
||||
@ApiModelProperty("价格")
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
@ApiModelProperty("货物类型标识:STOCK-库存,MATERIAL-物料,MANUAL-手动输入")
|
||||
private String cargoType;
|
||||
|
||||
@ApiModelProperty("货物备注")
|
||||
private String remark;
|
||||
}
|
||||
+476
@@ -0,0 +1,476 @@
|
||||
package com.mhd.common.core.domain.dto.wlhy;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 货源表
|
||||
* @Author: lfs
|
||||
* @Date: 2020-02-14 09:49:27
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class
|
||||
|
||||
TmsOrderAddDTO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@TableId(type = IdType.ID_WORKER_STR)
|
||||
private String id;
|
||||
// @ApiModelProperty(value = "线路名称ID")
|
||||
// private java.lang.String lineNameId="";
|
||||
// @ApiModelProperty(value = "线路名称")
|
||||
// private java.lang.String lineName="";
|
||||
//
|
||||
// @ApiModelProperty(value = "运距(千米)")
|
||||
// private BigDecimal haulDistance;
|
||||
@ApiModelProperty(value = "装货地县区编码",required = true)
|
||||
private String loadingAreaId="";
|
||||
@ApiModelProperty(value = "装货地详细地址")
|
||||
private String loadingAddress="";
|
||||
|
||||
@ApiModelProperty(value = "发货人姓名")
|
||||
private String freighterName="";
|
||||
@ApiModelProperty(value = "装货电话")
|
||||
private String loadingPhone="";
|
||||
@ApiModelProperty(value = "装货时间日期(年月日)",required = true)
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private java.util.Date loadingDate;
|
||||
// @ApiModelProperty(value = "装货时间(上午、下午、24小时)")
|
||||
// private String loadingTime="";
|
||||
@ApiModelProperty(value = "卸货地县区编码",required = true)
|
||||
private String unloadAreaId="";
|
||||
@ApiModelProperty(value = "卸货地详细地址")
|
||||
private String unloadAddress="";
|
||||
@ApiModelProperty(value = "收货人姓名")
|
||||
private String dischargerName="";
|
||||
@ApiModelProperty(value = "卸货电话")
|
||||
private String unloadPhone="";
|
||||
@ApiModelProperty(value = "卸货时间日期(年月日)",required = true)
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private java.util.Date unloadingData;
|
||||
|
||||
// @ApiModelProperty(value = "装货时间id",required = true)
|
||||
// private String loadingTimeId;
|
||||
// @ApiModelProperty(value = "卸货时间id",required = true)
|
||||
// private String unloadingTimeId;
|
||||
// @ApiModelProperty(value = "卸货时间(上午、下午、24小时)")
|
||||
// private java.lang.String unloadingTime;
|
||||
@ApiModelProperty(value = "货物名称ID")
|
||||
private String goodsNameId;
|
||||
@ApiModelProperty(value = "货物名称")
|
||||
private String goodsName;
|
||||
@ApiModelProperty(value = "货物名称ID",required = true)
|
||||
private String goodsTypeId;
|
||||
@ApiModelProperty(value = "货物大类型")
|
||||
private String goodsType="";
|
||||
@ApiModelProperty(value = "重量小(吨)",required = true)
|
||||
private BigDecimal weightMin;
|
||||
@ApiModelProperty(value = "重量大(吨)",required = true)
|
||||
private BigDecimal weightMax;
|
||||
|
||||
@ApiModelProperty(value = "货物数量单位(吨/方/件)id",required = true)
|
||||
private String goodsUntisId;
|
||||
@ApiModelProperty(value = "配载方式ID(0-数量,1-车次)",required = true)
|
||||
private Integer transportationModeId = 1;
|
||||
@ApiModelProperty(value = "车型车长ID")
|
||||
private String carType;
|
||||
// @ApiModelProperty(value = "指定司机ID")
|
||||
// private String appointDriverId;
|
||||
// @ApiModelProperty(value = "司机姓名")
|
||||
// private String appointDriver;
|
||||
// @ApiModelProperty(value = "司机手机号")
|
||||
// private String appointDriverPhone;
|
||||
// @ApiModelProperty(value = "司机车牌号")
|
||||
// private String appointDriverLicense;
|
||||
@ApiModelProperty(value = "服务要求ID")
|
||||
private String serviceRequireId;
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remarks;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String orderRemark;
|
||||
// @ApiModelProperty(value = "运单类型(0-企业普货、1-企业批量货、2-撮合货(普通货源)、3-客服运单,4-线下运单)")
|
||||
// private Integer waybillType ;
|
||||
@ApiModelProperty(value = "运单类型:0-pc端发货,1-pc端导入,2-货主端app发货")
|
||||
private Integer waybillFrom = 2 ;
|
||||
// @ApiModelProperty(value = "期望运费")
|
||||
// private java.math.BigDecimal freightHope;
|
||||
// @ApiModelProperty(value = "占用车长")
|
||||
// private String occupyConductor;
|
||||
@ApiModelProperty(value = "运单模式(0-普通模式,1-竞价模式)")
|
||||
private Integer waybillMode = 0;
|
||||
@ApiModelProperty(value = "竞价截止时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private java.util.Date latestBiddingTime;
|
||||
@ApiModelProperty(value = "发货运费")
|
||||
private BigDecimal deliveryFreight;
|
||||
@ApiModelProperty(value = "运费单价(元/吨)")
|
||||
private BigDecimal transportationUnitPrice;
|
||||
@ApiModelProperty(value = "结算方式,1-按趟结算,2-按数量结算")
|
||||
private Integer radioValue;
|
||||
@ApiModelProperty(value = "合同物流导入(0-默认,1-合同,2-普通导入)")
|
||||
private Integer isContract = 0;
|
||||
|
||||
// @ApiModelProperty(value = "是否长期货源:0-否,1-是")
|
||||
// private Integer isLongOrder=0;
|
||||
|
||||
// @ApiModelProperty(value = "卸货单位")
|
||||
// private java.lang.String unloadUnit;
|
||||
// @ApiModelProperty(value = "收货人身份证号")
|
||||
// private String unloadIdentificationNumber;
|
||||
// @ApiModelProperty(value = "代运营人员用户ID")
|
||||
// private String orderAgentUserId;
|
||||
|
||||
@ApiModelProperty(value = "指定货主编号")
|
||||
private String appointShipperId;
|
||||
@ApiModelProperty(value = "指定货主")
|
||||
private String appointShipper;
|
||||
// @ApiModelProperty(value = "指定平台公司")
|
||||
// private String appointCompanyId;
|
||||
// @ApiModelProperty(value = "指定平台公司名称")
|
||||
// private String appointCompanyName;
|
||||
// @ApiModelProperty(value = "指定车辆ID")
|
||||
// private String appointVehicleId;
|
||||
// @ApiModelProperty(value = "指定车辆设备号")
|
||||
// private String appointVehicleDevice;
|
||||
|
||||
|
||||
/**是否开启路耗(0-否 1-是)*/
|
||||
// @ApiModelProperty(value = "是否开启路耗(0-否 1-是)")
|
||||
// @Excel(name = "是否开启路耗(0-否 1-是)", width = 15)
|
||||
// private Integer isRoadLoss=0;
|
||||
/**货物价值(元/吨)*/
|
||||
// @ApiModelProperty(value = "货物价值(元/吨)")
|
||||
// @Excel(name = "货物价值(元/吨)", width = 15)
|
||||
// private BigDecimal goodsValue=BigDecimal.ZERO;
|
||||
/**路耗模式( 0-按比例% 1-按数量(吨))*/
|
||||
// @ApiModelProperty(value = "路耗模式( 0-按比例% 1-按数量(吨))")
|
||||
// @Excel(name = "路耗模式( 0-按比例% 1-按数量(吨))", width = 15)
|
||||
// private Integer roadLossMode;
|
||||
// /**路耗结算方式( 1-取装货重量 2-取卸货重量 3-装卸货取大 4-装卸货取小)*/
|
||||
// @ApiModelProperty(value = "路耗结算方式(0-无 1-取装货重量 2-取卸货重量 3-装卸货取大 4-装卸货取小)")
|
||||
// @Excel(name = "路耗结算方式( 1-取装货重量 2-取卸货重量 3-装卸货取大 4-装卸货取小)", width = 15)
|
||||
// private Integer roadLossSettlementMethod;
|
||||
/**允许货物亏损*/
|
||||
// @ApiModelProperty(value = "允许货物亏损(吨或%)")
|
||||
// @Excel(name = "允许货物亏损(吨或%)", width = 15)
|
||||
// private BigDecimal allowableLoss=BigDecimal.ZERO;
|
||||
|
||||
/**超出亏损扣除金额(元/吨)*/
|
||||
// @ApiModelProperty(value = "超出亏损扣除金额(元/吨)")
|
||||
// @Excel(name = "超出亏损扣除金额(元/吨)", width = 15)
|
||||
// private BigDecimal lossDeductionAmount=BigDecimal.ZERO;
|
||||
|
||||
// @ApiModelProperty(value = "上游客户id")
|
||||
// @Excel(name = "上游客户id", width = 15)
|
||||
// private String upClientId;
|
||||
|
||||
// @ApiModelProperty(value = "运费抹零 0-不抹零 ,1-抹零小数位,2-抹零个位,3-抹零十位")
|
||||
// private Integer isFreightNullification ;
|
||||
|
||||
@ApiModelProperty(value = "加油宝计算模式 0-按比例 1-按数值")
|
||||
private Integer oilValue ;
|
||||
|
||||
// @ApiModelProperty(value = "是否允许接多单:0否 1是")
|
||||
// private Integer isMultipleOrdersAllowed;
|
||||
|
||||
@ApiModelProperty(value = "发货备注")
|
||||
private String shippingNote;
|
||||
|
||||
// @ApiModelProperty(value = "涨吨是否计算费用 0-否 1-是 ")
|
||||
// private Integer isTonnageIncreaseCharge;
|
||||
@ApiModelProperty(value = "装货地经度")
|
||||
private String loadingLongitude;
|
||||
@ApiModelProperty(value = "装货地纬度")
|
||||
private String loadingLatitude;
|
||||
|
||||
@ApiModelProperty(value = "卸货地经度")
|
||||
private String unloadLongitude;
|
||||
@ApiModelProperty(value = "卸货地纬度")
|
||||
private String unloadLatitude;
|
||||
|
||||
@ApiModelProperty(value = "预设竞标价")
|
||||
@Excel(name = "预设竞标价", width = 15)
|
||||
private BigDecimal highestPrice;
|
||||
|
||||
@ApiModelProperty(value = "预设竞标价")
|
||||
private BigDecimal presetPrice;
|
||||
|
||||
@ApiModelProperty(value = "竞价单位(元/车,元/吨)")
|
||||
private String biddingUnit;
|
||||
|
||||
@ApiModelProperty(value = "竞价最高可输入价格")
|
||||
@Excel(name = "竞价最高可输入价格", width = 15)
|
||||
private BigDecimal maximumBidPrice;
|
||||
|
||||
@ApiModelProperty(value = "评标类型(0-自动评标,1-手动评标)")
|
||||
private Integer bidEvaluationType = 1;
|
||||
|
||||
@ApiModelProperty("应收结算类型:1-月结,2-现结")
|
||||
private Integer receivableType;
|
||||
|
||||
@ApiModelProperty(value = "货物数量")
|
||||
private String goodsQuantity;
|
||||
@ApiModelProperty(value = "货物数量单位code")
|
||||
private String goodsQuantityUnitId;
|
||||
@ApiModelProperty(value = "货物数量单位")
|
||||
private String goodsQuantityUnit;
|
||||
|
||||
// @ApiModelProperty("项目表ID")
|
||||
// private Long projectManagementId;
|
||||
|
||||
// @ApiModelProperty(value = "服务费率")
|
||||
// private BigDecimal serviceRate;
|
||||
|
||||
@ApiModelProperty("是否自动生成协议 0-否 1-是")
|
||||
@Excel(name = "是否自动生成协议 0-否 1-是")
|
||||
private Integer isAutoGenerateProtocol;
|
||||
|
||||
// @ApiModelProperty(value = "单车总费用")
|
||||
// @Excel(name = "单车总费用", width = 15)
|
||||
// private BigDecimal freightGross = BigDecimal.ZERO;
|
||||
|
||||
// @ApiModelProperty(value = "协议费用:回单付金额")
|
||||
// @Excel(name = "协议费用:回单付金额", width = 15)
|
||||
// private BigDecimal receiptPaymentAmount = BigDecimal.ZERO;
|
||||
//
|
||||
// @ApiModelProperty(value = "协议费用:预付现金金额")
|
||||
// @Excel(name = "协议费用:预付现金金额", width = 15)
|
||||
// private BigDecimal cashAdvance = BigDecimal.ZERO;
|
||||
//
|
||||
// @ApiModelProperty(value = "协议费用:到付运费金额")
|
||||
// @Excel(name = "协议费用:到付运费金额", width = 15)
|
||||
// private BigDecimal freightAmount = BigDecimal.ZERO;
|
||||
//
|
||||
// @ApiModelProperty(value = "协议费用:预付平台油卡金额")
|
||||
// @Excel(name = "协议费用:预付平台油卡金额", width = 15)
|
||||
// private BigDecimal oilCardOnline = BigDecimal.ZERO;
|
||||
|
||||
// @ApiModelProperty(value = "单车重量", required = true)
|
||||
// private BigDecimal singleVehicleWeight;
|
||||
|
||||
|
||||
|
||||
//=================批量货派单相关=============================
|
||||
// @ApiModelProperty(value = "需求车次")
|
||||
// private Integer demandTrainNumber;
|
||||
// @ApiModelProperty(value = "承运车次默认0")
|
||||
// private Integer carriageNumber;
|
||||
// @ApiModelProperty(value = "剩余需求车次")
|
||||
// private Integer remainingDemandTrainNumber;
|
||||
|
||||
/**货物重量*/
|
||||
// @ApiModelProperty(value = "货物重量")
|
||||
// private BigDecimal goodsWeight;
|
||||
// @ApiModelProperty(value = "货源剩余货物数量")
|
||||
// private BigDecimal residueGoodsWeight;
|
||||
// @ApiModelProperty(value = "承运货物数量")
|
||||
// private BigDecimal transportGoodsWeight;
|
||||
|
||||
@ApiModelProperty(value = "货物信息表")
|
||||
private List<TmsCargoInfoDTO> cargoInfoList;
|
||||
@ApiModelProperty(value = "装货地址集合")
|
||||
private List<TmsAddressMultiDTO> loadingAddressList;
|
||||
@ApiModelProperty(value = "卸货地址集合")
|
||||
private List<TmsAddressMultiDTO> unloadAddressList;
|
||||
|
||||
|
||||
|
||||
|
||||
// @ApiModelProperty(value = "来源系统")
|
||||
// private String orderSource;
|
||||
|
||||
//========================================新增字段==========================================
|
||||
@ApiModelProperty(value = "付款方类型(0-委托方,1-收货方)")
|
||||
@Excel(name = "付款方类型(0-委托方,1-收货方)", width = 15)
|
||||
private Integer payerType;
|
||||
|
||||
@ApiModelProperty(value = "收货方编码")
|
||||
private String recipientId;
|
||||
@ApiModelProperty(value = "收货方")
|
||||
private String recipientName;
|
||||
|
||||
@ApiModelProperty(value = "整机编号")
|
||||
private String machineNumber;
|
||||
|
||||
@ApiModelProperty(value = "是否库存(0-是,1-否)")
|
||||
@Excel(name = "是否库存(0-是,1-否)", width = 15)
|
||||
private Integer stockFlag;
|
||||
|
||||
@ApiModelProperty(value = "信息费")
|
||||
private BigDecimal infoFee;
|
||||
|
||||
@ApiModelProperty(value = "订单类型(1-普货运输,2-危化运输,3-罐车运输,4-济南专线,5-江西专线)")
|
||||
private Integer orderShippingType;
|
||||
|
||||
@ApiModelProperty(value = "单号")
|
||||
private String thirdPartyOrderNumber;
|
||||
|
||||
@ApiModelProperty(value = "车辆类型Id")
|
||||
private String vehicleTypeId;
|
||||
|
||||
@ApiModelProperty(value = "车辆类型名称")
|
||||
private String vehicleTypeName;
|
||||
|
||||
@ApiModelProperty(value = "承运人Id(订单为济南专线使用)")
|
||||
private String carrier;
|
||||
|
||||
@ApiModelProperty(value = "承运人姓名(订单为济南专线使用)")
|
||||
private String carrierName;
|
||||
|
||||
@ApiModelProperty("运费单价")
|
||||
private BigDecimal freightUnitPrice;
|
||||
|
||||
@ApiModelProperty("数字物流平台用户id")
|
||||
private Long szwlUserId;
|
||||
|
||||
@ApiModelProperty(value = "信息费收款方")
|
||||
private String infoFeePayee;
|
||||
|
||||
@ApiModelProperty(value = "信息费收款方方式(0-委托方,1-收货方,2-第三方)")
|
||||
private Integer infoFeePayeeType;
|
||||
|
||||
@ApiModelProperty("业务员ID")
|
||||
private String salesmanId;
|
||||
|
||||
@ApiModelProperty("业务员ID")
|
||||
private String salesmanName;
|
||||
|
||||
@ApiModelProperty("是否报关(0:否,1:是)")
|
||||
private Integer isDeclare;
|
||||
|
||||
@ApiModelProperty("线路")
|
||||
private String route;
|
||||
|
||||
@ApiModelProperty("柜类型")
|
||||
private String containerType;
|
||||
|
||||
@ApiModelProperty("柜类型名称")
|
||||
private String containerTypeName;
|
||||
|
||||
@ApiModelProperty("卡类型")
|
||||
private String cardType;
|
||||
|
||||
@ApiModelProperty("卡类型名称")
|
||||
private String cardTypeName;
|
||||
|
||||
@ApiModelProperty("外来柜号")
|
||||
private String externalContainerNo;
|
||||
|
||||
@ApiModelProperty("中转地")
|
||||
private String transitPlace;
|
||||
|
||||
@ApiModelProperty("托运人ID")
|
||||
private String shipper;
|
||||
|
||||
@ApiModelProperty("托运人ID")
|
||||
private String customsShipper;
|
||||
|
||||
@ApiModelProperty("托运人电话")
|
||||
private String customsShipperTel;
|
||||
|
||||
@ApiModelProperty("卸货单位")
|
||||
private String unloadingCompany;
|
||||
|
||||
@ApiModelProperty("合同编号")
|
||||
private String contractNo;
|
||||
|
||||
@ApiModelProperty("运费")
|
||||
private BigDecimal freightFee;
|
||||
|
||||
@ApiModelProperty("卸货费")
|
||||
private BigDecimal unloadingFee;
|
||||
|
||||
@ApiModelProperty("报关费")
|
||||
private BigDecimal customsFee;
|
||||
|
||||
@ApiModelProperty("差货费")
|
||||
private BigDecimal shortageFee;
|
||||
|
||||
@ApiModelProperty("杂费")
|
||||
private BigDecimal miscellaneousFee;
|
||||
|
||||
@ApiModelProperty("其他费用")
|
||||
private BigDecimal otherFee;
|
||||
|
||||
@ApiModelProperty("滞车费")
|
||||
private BigDecimal detentionFee;
|
||||
|
||||
@ApiModelProperty("税率")
|
||||
private BigDecimal taxRate;
|
||||
|
||||
@ApiModelProperty("结算币种")
|
||||
private String settlementCurrency;
|
||||
|
||||
@ApiModelProperty("体积")
|
||||
private BigDecimal volume;
|
||||
|
||||
@ApiModelProperty("内容详情")
|
||||
private String detailContent;
|
||||
|
||||
@ApiModelProperty("报关线路")
|
||||
private String customsRoute;
|
||||
|
||||
@ApiModelProperty("报关关口")
|
||||
private String customsPort;
|
||||
|
||||
@ApiModelProperty("报关联系人")
|
||||
private String customsContact;
|
||||
|
||||
@ApiModelProperty("报关联系人电话")
|
||||
private String customsContactPhone;
|
||||
|
||||
@ApiModelProperty("报关备注")
|
||||
private String customsRemark;
|
||||
|
||||
@ApiModelProperty(value = "组织ID")
|
||||
private String orgId;
|
||||
|
||||
@ApiModelProperty(value = "所属组织")
|
||||
@Excel(name = "所属组织", width = 15)
|
||||
private String orgName;
|
||||
|
||||
@ApiModelProperty(value = "组织ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty(value = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty(value = "上级组织ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("客户编码nc")
|
||||
private String customerCodeNc;
|
||||
|
||||
@ApiModelProperty("制单人编码nc")
|
||||
private String makerCodeNc;
|
||||
|
||||
@ApiModelProperty("业务员编码nc")
|
||||
private String salesmanCodeNc;
|
||||
|
||||
@ApiModelProperty(value = "单据日期")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private java.util.Date documentDate;
|
||||
|
||||
|
||||
|
||||
|
||||
@ApiModelProperty("执行单id")
|
||||
private String executeOrderId;
|
||||
|
||||
@ApiModelProperty("执行单号")
|
||||
private String executeOrderNumber;
|
||||
}
|
||||
@@ -220,4 +220,34 @@ public class UserPo {
|
||||
|
||||
@ApiModelProperty(name = "制单员nc编码")
|
||||
private String documentPreparerNcCode;
|
||||
|
||||
@ApiModelProperty("法人代表")
|
||||
private String legalRepresentative;
|
||||
|
||||
@ApiModelProperty("统一编码")
|
||||
private String unifiedCode;
|
||||
|
||||
@ApiModelProperty("注册电话")
|
||||
private String registeredPhone;
|
||||
|
||||
@ApiModelProperty("注册地址")
|
||||
private String registeredAddress;
|
||||
|
||||
@ApiModelProperty("传真")
|
||||
private String fax;
|
||||
|
||||
@ApiModelProperty("付款银行")
|
||||
private String paymentBank;
|
||||
|
||||
@ApiModelProperty("付款账户")
|
||||
private String paymentAccount;
|
||||
|
||||
@ApiModelProperty("发票抬头")
|
||||
private String invoiceTitle;
|
||||
|
||||
@ApiModelProperty("税号")
|
||||
private String taxNumber;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
}
|
||||
|
||||
@@ -13,19 +13,12 @@ spring:
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
# server-addr: 127.0.0.1:8848
|
||||
# 线上测试环境配置 容器名+端口号
|
||||
# server-addr: 10.102.192.5:6848
|
||||
# server-addr: 10.33.0.129:6010
|
||||
#线上正式环境
|
||||
server-addr: 10.102.192.5:6848
|
||||
username: nacos
|
||||
password: manhuoda@2023
|
||||
config:
|
||||
# server-addr: 127.0.0.1:8848
|
||||
# 线上测试环境配置 容器名+端口号
|
||||
# server-addr: 10.33.0.129:6010
|
||||
#线上正式环境
|
||||
server-addr: 10.102.192.5:6848
|
||||
username: nacos
|
||||
password: manhuoda@2023
|
||||
@@ -33,4 +26,4 @@ spring:
|
||||
file-extension: yml #默认properties
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
@@ -14,10 +14,14 @@ spring:
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: 127.0.0.1:8848
|
||||
username: nacos
|
||||
password: manhuoda@2023
|
||||
# 线上测试环境配置 容器名+端口号
|
||||
#server-addr: mhd-nacos:8848
|
||||
config:
|
||||
server-addr: 127.0.0.1:8848
|
||||
username: nacos
|
||||
password: manhuoda@2023
|
||||
# 线上测试环境配置 容器名+端口号
|
||||
#server-addr: mhd-nacos:8848
|
||||
group: DEFAULT_GROUP # 默认分组就是DEFAULT_GROUP,如果使用默认分组可以不配置
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.mhd.common.security.annotation.EnableCustomConfig;
|
||||
import com.mhd.common.security.annotation.EnableRyFeignClients;
|
||||
import com.mhd.common.swagger.annotation.EnableCustomSwagger2;
|
||||
import org.springframework.scheduling.annotation.EnableAsync;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
|
||||
/**
|
||||
* 系统模块
|
||||
@@ -17,6 +18,7 @@ import org.springframework.scheduling.annotation.EnableAsync;
|
||||
@EnableRyFeignClients
|
||||
@SpringBootApplication
|
||||
@EnableAsync
|
||||
@EnableScheduling
|
||||
public class MhdSystemApplication
|
||||
{
|
||||
public static void main(String[] args)
|
||||
|
||||
+318
@@ -0,0 +1,318 @@
|
||||
package com.mhd.basic.application.service.Lease;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.mhd.basic.application.service.storageSection.StorageSectionApplicationService;
|
||||
import com.mhd.basic.domain.lease.entity.Lease;
|
||||
import com.mhd.basic.domain.lease.repository.facade.ILeaseService;
|
||||
import com.mhd.basic.domain.lease.repository.po.LeasePO;
|
||||
import com.mhd.basic.domain.lease.repository.todo.LeaseDO;
|
||||
import com.mhd.basic.domain.lease.service.LeaseDomainService;
|
||||
import com.mhd.basic.domain.shipperLeaseDetails.entity.ShipperLeaseDetails;
|
||||
import com.mhd.basic.domain.shipperLeaseDetails.entity.WarehouseOccupancyRate;
|
||||
import com.mhd.basic.domain.shipperLeaseDetails.repository.facade.IShipperLeaseDetailsService;
|
||||
import com.mhd.basic.domain.shipperLeaseDetails.repository.po.ShipperLeaseDetailsPO;
|
||||
import com.mhd.basic.domain.shipperLeaseDetails.repository.todo.ShipperLeaseDetailsDO;
|
||||
import com.mhd.basic.domain.storageSection.repository.po.StorageSectionPO;
|
||||
import com.mhd.basic.domain.storageSection.repository.todo.StorageSectionDO;
|
||||
import com.mhd.basic.interfaces.dto.lease.LeaseDTO;
|
||||
import com.mhd.basic.interfaces.dto.shipperLeaseDetailsApi.ShipperLeaseDetailsDTO;
|
||||
import com.mhd.common.core.exception.ServiceException;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.SystemServiceFeign;
|
||||
import com.mhd.system.api.WmsServiceFeign;
|
||||
import com.mhd.system.api.domain.MaterialInventoryDTO;
|
||||
import com.mhd.system.api.domain.WarehouseFeignPO;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import com.mhd.system.service.ISysDictTypeService;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 租赁管理ApplicationService
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-07
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class LeaseApplicationService {
|
||||
|
||||
@Autowired
|
||||
private LeaseDomainService leaseDomainService;
|
||||
|
||||
@Autowired
|
||||
private ILeaseService leaseService;
|
||||
|
||||
@Autowired
|
||||
private ISysDictTypeService dictTypeService;
|
||||
|
||||
@Autowired
|
||||
private WmsServiceFeign wmsServiceFeign;
|
||||
|
||||
@Autowired
|
||||
private StorageSectionApplicationService storageSectionApplicationService;
|
||||
|
||||
@Autowired
|
||||
private IShipperLeaseDetailsService shipperLeaseDetailsService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询租赁管理列表
|
||||
*/
|
||||
|
||||
public List<LeasePO> queryList(LeaseDO leaseDO) {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (loginUser != null && loginUser.getUserPo() != null){
|
||||
Long loginUserOrganizationId = loginUser.getUserPo().getOrganizationId();
|
||||
Long topOrganizationId = loginUser.getUserPo().getTopOrganizationId();
|
||||
|
||||
// 数据权限:根据organizationId来设置查询权限
|
||||
// organizationId等于2827时查询全部,其他仅查询各自组织的信息
|
||||
if (loginUserOrganizationId != null && loginUserOrganizationId.equals(2827L)) {
|
||||
// 南光组织(organizationId=2827):可以查询所有组织的数据
|
||||
// 如果前端传递了 organizationId,使用前端传递的值进行过滤
|
||||
// 如果前端没有传递 organizationId,清空组织过滤条件,查询所有组织的数据
|
||||
if (leaseDO.getOrganizationId() == null) {
|
||||
leaseDO.setOrganizationId(null);
|
||||
leaseDO.setTopOrganizationId(null);
|
||||
}
|
||||
} else {
|
||||
// 其他组织:设置organizationId,只查询当前组织的数据
|
||||
if (topOrganizationId != null && topOrganizationId != 1){
|
||||
leaseDO.setTopOrganizationId(topOrganizationId);
|
||||
}
|
||||
// 如果前端传递了organizationId,验证是否与当前登录用户的组织ID一致
|
||||
if (leaseDO.getOrganizationId() != null && !leaseDO.getOrganizationId().equals(loginUserOrganizationId)) {
|
||||
// 前端传递了其他组织的organizationId,强制使用当前登录用户的组织ID,防止越权查询
|
||||
leaseDO.setOrganizationId(loginUserOrganizationId);
|
||||
}
|
||||
}
|
||||
}
|
||||
return leaseDomainService.queryList(leaseDO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增租赁管理
|
||||
*/
|
||||
public Boolean insert(LeaseDO leaseDO) {
|
||||
// 设置当前登录用户的组织信息
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (loginUser != null && loginUser.getUserPo() != null) {
|
||||
leaseDO.setOrganizationId(loginUser.getUserPo().getOrganizationId());
|
||||
leaseDO.setOrganizationName(loginUser.getUserPo().getOrganizationName());
|
||||
leaseDO.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
|
||||
}
|
||||
List<Lease> timeOverlapSimple = isTimeOverlapSimple(leaseDO.getCargoOwnerName(), leaseDO.getStartDate(), leaseDO.getEndDate(), null);
|
||||
if (ObjectUtil.isNotEmpty(timeOverlapSimple)) {
|
||||
throw new ServiceException("同一货主租赁信息时间不能重叠");
|
||||
}
|
||||
setWarehouseInfo(leaseDO);
|
||||
return leaseDomainService.insert(leaseDO);
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private SystemServiceFeign systemServiceFeign;
|
||||
|
||||
private void setWarehouseInfo(LeaseDO leaseDO) {
|
||||
AjaxResult ajaxResult = systemServiceFeign.getWarehouseInfoByWarehouseId(leaseDO.getWarehouseId());
|
||||
if(!"200".equals(String.valueOf(ajaxResult.get("code")))){
|
||||
throw new ServiceException("获取仓库信息失败");
|
||||
}
|
||||
WarehouseFeignPO warehouseFeignPO = com.alibaba.fastjson.JSON.parseObject(com.alibaba.fastjson2.JSONObject.toJSONString(ajaxResult.get("data")), WarehouseFeignPO.class);
|
||||
leaseDO.setWarehouseName(warehouseFeignPO.getWarehouseName());
|
||||
}
|
||||
|
||||
private List<Lease> isTimeOverlapSimple(String cargoOwnerName, Date startDate, Date endDate, Long excludeId) {
|
||||
LambdaQueryWrapper<Lease> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(Lease::getCargoOwnerName, cargoOwnerName)
|
||||
.eq(Lease::getDelFlag, 1) // 只查询正常状态
|
||||
.le(Lease::getStartDate, endDate)
|
||||
.ge(Lease::getEndDate, startDate);
|
||||
if (excludeId != null) {
|
||||
wrapper.ne(Lease::getId, excludeId);
|
||||
}
|
||||
return leaseService.list(wrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改租赁管理
|
||||
*/
|
||||
public Boolean update(LeaseDO leaseDO) {
|
||||
List<Lease> timeOverlapSimple = isTimeOverlapSimple(leaseDO.getCargoOwnerName(), leaseDO.getStartDate(), leaseDO.getEndDate(), leaseDO.getId());
|
||||
if (ObjectUtil.isNotEmpty(timeOverlapSimple)) {
|
||||
throw new ServiceException("同一货主租赁信息时间不能重叠");
|
||||
}
|
||||
return leaseDomainService.update(leaseDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除租赁管理
|
||||
*/
|
||||
public boolean delete(Long[] leaseIds) {
|
||||
return leaseDomainService.delete(leaseIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取租赁管理详细信息
|
||||
*/
|
||||
public LeasePO getInfo(Long leaseId)
|
||||
{
|
||||
return leaseDomainService.getInfo(leaseId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 批量作废租赁
|
||||
* @author ZhouGY
|
||||
* @date 2024/5/13 9:46
|
||||
* @param leaseIds
|
||||
* @return Boolean
|
||||
*/
|
||||
public Boolean nullifyByIds(List<Long> leaseIds){
|
||||
return leaseDomainService.nullifyByIds(leaseIds);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 货主租赁明细
|
||||
*/
|
||||
@Scheduled(cron = "0 0 1 * * ?")
|
||||
public void shipperLeaseDetails() {
|
||||
LeaseDO leaseDO = new LeaseDO();
|
||||
leaseDO.setTime(new Date());
|
||||
//查询租赁
|
||||
List<LeasePO> leasePOS = queryList(leaseDO);
|
||||
// List<LeasePO> leasePOS = leaseDomainService.queryList(leaseDO);
|
||||
List<LeasePO> entireUnit = leasePOS.stream()
|
||||
.filter(lease -> lease.getLeaseType().equals("整租"))
|
||||
.collect(Collectors.toList());
|
||||
List<LeasePO> casualRental = leasePOS.stream()
|
||||
.filter(lease -> lease.getLeaseType().equals("散租"))
|
||||
.collect(Collectors.toList());
|
||||
List<ShipperLeaseDetails> shipperLeaseDetailsList = new ArrayList<>(); //建表后保存
|
||||
for (LeasePO en : entireUnit) {//整租
|
||||
ShipperLeaseDetails shipperLeaseDetails = new ShipperLeaseDetails();
|
||||
BeanUtils.copyProperties(en, shipperLeaseDetails);
|
||||
shipperLeaseDetails.setBusinessDate(new Date());
|
||||
shipperLeaseDetailsList.add(shipperLeaseDetails);
|
||||
}
|
||||
//当前货主当前仓库,库存查询页面所有面积加起来就是散租面积
|
||||
for (LeasePO ca : casualRental) {//散租
|
||||
ShipperLeaseDetails shipperLeaseDetails = new ShipperLeaseDetails();
|
||||
BeanUtils.copyProperties(ca, shipperLeaseDetails);
|
||||
shipperLeaseDetails.setBusinessDate(new Date());
|
||||
//物料库存
|
||||
MaterialInventoryDTO materialInventoryDTO = new MaterialInventoryDTO();
|
||||
materialInventoryDTO.setShipperId(ca.getShipperId());
|
||||
materialInventoryDTO.setWarehouseId(ca.getWarehouseId());
|
||||
AjaxResult ajaxResult = wmsServiceFeign.materialInventoryApiListAll(materialInventoryDTO);
|
||||
BigDecimal area = BigDecimal.ZERO;
|
||||
if(String.valueOf(ajaxResult.get("code")).equals("200")) {
|
||||
JSONArray data = JSONObject.parseArray(JSON.toJSONString(ajaxResult.get("data")));
|
||||
for (Object datum : data) {
|
||||
JSONObject json = (JSONObject) datum;
|
||||
BigDecimal area1 = json.getBigDecimal("area");
|
||||
if (area1 == null) {
|
||||
area1 = BigDecimal.ZERO;
|
||||
}
|
||||
area = area.add(area1);
|
||||
}
|
||||
}
|
||||
shipperLeaseDetails.setLeaseArea(area);
|
||||
shipperLeaseDetailsList.add(shipperLeaseDetails);
|
||||
}
|
||||
// 保存货主租赁明细(新建表)
|
||||
if (shipperLeaseDetailsList.size() > 0) {
|
||||
shipperLeaseDetailsService.saveBatch(shipperLeaseDetailsList);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算仓库出租率
|
||||
* warehouseId 仓库id
|
||||
* businessDateStart 业务开始时间
|
||||
* businessDateEnd 业务结束时间
|
||||
*/
|
||||
public List<WarehouseOccupancyRate> warehouseOccupancyRate(ShipperLeaseDetailsDO shipperLeaseDetailsDO) {
|
||||
//仓库id 和 开始结束时间作为查询条件 查数据库 差出来当前仓库所有的
|
||||
List<ShipperLeaseDetailsPO> shipperLeaseDetailsList = shipperLeaseDetailsService.queryList(shipperLeaseDetailsDO);
|
||||
ShipperLeaseDetailsPO shipperLeaseDetailsPO = shipperLeaseDetailsList.get(0);
|
||||
//按业务日期分组,并按日期排序
|
||||
TreeMap<Date, List<ShipperLeaseDetailsPO>> groupedByDate = shipperLeaseDetailsList.stream().collect(
|
||||
Collectors.groupingBy(
|
||||
ShipperLeaseDetailsPO::getBusinessDate,
|
||||
TreeMap::new,
|
||||
Collectors.toList()
|
||||
)
|
||||
);
|
||||
//获取总面积
|
||||
BigDecimal totalArea = BigDecimal.ZERO;
|
||||
StorageSectionDO storageSectionDO = new StorageSectionDO();
|
||||
storageSectionDO.setWarehouseId(shipperLeaseDetailsDO.getWarehouseId());
|
||||
storageSectionDO.setOpeningUp(1);
|
||||
List<StorageSectionPO> storageSectionPOS = storageSectionApplicationService.queryList(storageSectionDO);
|
||||
for (StorageSectionPO storageSectionPO : storageSectionPOS) {
|
||||
totalArea = totalArea.add(storageSectionPO.getStorageRegion());
|
||||
}
|
||||
|
||||
List<WarehouseOccupancyRate> warehouseOccupancyRatesList = new ArrayList<>();
|
||||
//组装仓库返回数据
|
||||
BigDecimal finalTotalArea = totalArea;
|
||||
groupedByDate.forEach((date, shipperLeaseDetails) -> {
|
||||
WarehouseOccupancyRate warehouseOccupancyRate = new WarehouseOccupancyRate();
|
||||
warehouseOccupancyRate.setBusinessDate(date);
|
||||
BigDecimal entireLeaseArea = BigDecimal.ZERO;
|
||||
BigDecimal fractionalLeaseArea = BigDecimal.ZERO;
|
||||
//计算整租和散租
|
||||
for (ShipperLeaseDetailsPO shipperLeaseDetail : shipperLeaseDetails) {
|
||||
if (shipperLeaseDetail.getLeaseType().equals("整租")){
|
||||
entireLeaseArea = entireLeaseArea.add(shipperLeaseDetail.getLeaseArea());
|
||||
}else {
|
||||
fractionalLeaseArea = fractionalLeaseArea.add(shipperLeaseDetail.getLeaseArea());
|
||||
}
|
||||
warehouseOccupancyRate.setWarehouseName(shipperLeaseDetail.getWarehouseName());
|
||||
warehouseOccupancyRate.setBusinessDate(date);
|
||||
warehouseOccupancyRate.setWarehouseId(shipperLeaseDetail.getWarehouseId());
|
||||
}
|
||||
warehouseOccupancyRate.setEntireLeaseArea(entireLeaseArea);
|
||||
warehouseOccupancyRate.setFractionalLeaseArea(fractionalLeaseArea);
|
||||
warehouseOccupancyRate.setTotalArea(finalTotalArea);
|
||||
BigDecimal dailyRentalRate = entireLeaseArea.add(fractionalLeaseArea).divide(finalTotalArea, 2, BigDecimal.ROUND_HALF_UP);
|
||||
warehouseOccupancyRate.setDailyRentalRate(dailyRentalRate);
|
||||
warehouseOccupancyRatesList.add(warehouseOccupancyRate);
|
||||
});
|
||||
return warehouseOccupancyRatesList;
|
||||
}
|
||||
|
||||
// /**
|
||||
// * @description 设置数据字典键值
|
||||
// * @author ZhouGY
|
||||
// * @date 2024/4/7 14:33
|
||||
// * @param containerDO
|
||||
// */
|
||||
// private void setDataDict(LeaseDO leaseDO){
|
||||
// //翻译租赁类型
|
||||
// List<SysDictData> storageTypeDictDataList = dictTypeService.selectDictDataByType(DictCode.CONTAINER_TYPE.getCode());
|
||||
// if (null == storageTypeDictDataList) {
|
||||
// throw new ServiceException("租赁类型数据字典不存在 请联系管理员");
|
||||
// }
|
||||
// SysDictData storageTypeDictData = storageTypeDictDataList.stream().filter(info -> ObjectUtil.equal(info.getDictValue(), containerDO.getContainerType())).findAny().orElse(null);
|
||||
// if (null == storageTypeDictData) {
|
||||
// throw new ServiceException("租赁类型【" + leaseDO.getContainerType() + "】数据字典不存在 请联系管理员");
|
||||
// }
|
||||
// leaseDO.setContainerTypeName(storageTypeDictData.getDictLabel());
|
||||
// }
|
||||
}
|
||||
+24
-1
@@ -1,15 +1,22 @@
|
||||
package com.mhd.basic.application.service.batch;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.mhd.basic.domain.batch.repository.po.BatchPO;
|
||||
import com.mhd.basic.domain.batch.repository.todo.BatchDO;
|
||||
import com.mhd.basic.domain.batch.service.BatchDomainService;
|
||||
import com.mhd.basic.domain.batchDetail.entity.BatchDetail;
|
||||
import com.mhd.basic.domain.batchDetail.repository.facade.IBatchDetailService;
|
||||
import com.mhd.basic.domain.batchDetail.repository.po.BatchDetailPO;
|
||||
import com.mhd.basic.domain.pack.repository.todo.PackDO;
|
||||
import com.mhd.common.core.domain.po.UserPo;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
/**
|
||||
* 批次管理ApplicationService
|
||||
@@ -22,6 +29,8 @@ import java.util.List;
|
||||
public class BatchApplicationService {
|
||||
@Autowired
|
||||
private BatchDomainService batchDomainService;
|
||||
@Autowired
|
||||
private IBatchDetailService batchDetailService;
|
||||
|
||||
|
||||
/**
|
||||
@@ -36,7 +45,21 @@ public class BatchApplicationService {
|
||||
batchDO.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
|
||||
}
|
||||
}
|
||||
return batchDomainService.queryList(batchDO);
|
||||
List<BatchPO> batchPOS = batchDomainService.queryList(batchDO);
|
||||
for (BatchPO batchPO : batchPOS) {
|
||||
List<BatchDetail> batchDetailList = batchDetailService.list(new LambdaQueryWrapper<BatchDetail>()
|
||||
.eq(BatchDetail::getBatchId, batchPO.getBatchId())
|
||||
.eq(BatchDetail::getDelFlag, "1"));
|
||||
List<BatchDetailPO> batchDetailPOS = new ArrayList<>();
|
||||
// 逐个对象拷贝
|
||||
for (BatchDetail detail : batchDetailList) {
|
||||
BatchDetailPO detailPO = new BatchDetailPO();
|
||||
BeanUtils.copyProperties(detail, detailPO);
|
||||
batchDetailPOS.add(detailPO);
|
||||
}
|
||||
batchPO.setBatchDetailList(batchDetailPOS);
|
||||
}
|
||||
return batchPOS;
|
||||
}
|
||||
|
||||
|
||||
|
||||
+4
@@ -45,6 +45,10 @@ public class BatchDetailApplicationService {
|
||||
batchDetailDO.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
|
||||
}
|
||||
}
|
||||
// 如果未指定isDisplay,默认只查询显示的数据(isDisplay=1)
|
||||
if (batchDetailDO.getIsDisplay() == null) {
|
||||
batchDetailDO.setIsDisplay(1);
|
||||
}
|
||||
return batchDetailDomainService.queryList(batchDetailDO);
|
||||
}
|
||||
|
||||
|
||||
-20
@@ -79,8 +79,6 @@ public class ContainerApplicationService {
|
||||
containerDO.setOrganizationName(loginUser.getUserPo().getOrganizationName());
|
||||
containerDO.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
|
||||
}
|
||||
//翻译库区类型
|
||||
setDataDict(containerDO);
|
||||
return containerDomainService.insert(containerDO);
|
||||
}
|
||||
|
||||
@@ -117,22 +115,4 @@ public class ContainerApplicationService {
|
||||
return containerDomainService.nullifyByIds(containerIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 设置数据字典键值
|
||||
* @author ZhouGY
|
||||
* @date 2024/4/7 14:33
|
||||
* @param containerDO
|
||||
*/
|
||||
private void setDataDict(ContainerDO containerDO){
|
||||
//翻译容器类型
|
||||
List<SysDictData> storageTypeDictDataList = dictTypeService.selectDictDataByType(DictCode.CONTAINER_TYPE.getCode());
|
||||
if (null == storageTypeDictDataList) {
|
||||
throw new ServiceException("容器类型数据字典不存在 请联系管理员");
|
||||
}
|
||||
SysDictData storageTypeDictData = storageTypeDictDataList.stream().filter(info -> ObjectUtil.equal(info.getDictValue(), containerDO.getContainerType())).findAny().orElse(null);
|
||||
if (null == storageTypeDictData) {
|
||||
throw new ServiceException("容器类型【" + containerDO.getContainerType() + "】数据字典不存在 请联系管理员");
|
||||
}
|
||||
containerDO.setContainerTypeName(storageTypeDictData.getDictLabel());
|
||||
}
|
||||
}
|
||||
|
||||
+5
-1
@@ -120,7 +120,11 @@ public class MaterialBaseInfoApplicationService {
|
||||
throw new ServiceException("获取货主信息失败");
|
||||
}
|
||||
UserPo userPo = JSON.parseObject(JSONObject.toJSONString(ajaxResult.get("data")), UserPo.class);
|
||||
materialBaseInfoDO.setShipperName(userPo.getUserName());
|
||||
// 如果原始shipperName不为空,保留原始值(导入或手动输入时应该保留完整名称)
|
||||
// 只有在原始shipperName为空时,才使用查询到的userName
|
||||
if (materialBaseInfoDO.getShipperName() == null || materialBaseInfoDO.getShipperName().trim().isEmpty()) {
|
||||
materialBaseInfoDO.setShipperName(userPo.getUserName());
|
||||
}
|
||||
}
|
||||
|
||||
public List<MaterialStockInfoVo> getMaterialStockList(String shipperName, String materialName,
|
||||
|
||||
+160
@@ -0,0 +1,160 @@
|
||||
package com.mhd.basic.application.service.shipperLeaseDetails;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.mhd.basic.application.service.storageSection.StorageSectionApplicationService;
|
||||
import com.mhd.basic.domain.lease.entity.Lease;
|
||||
import com.mhd.basic.domain.lease.repository.facade.ILeaseService;
|
||||
import com.mhd.basic.domain.lease.repository.po.LeasePO;
|
||||
import com.mhd.basic.domain.lease.repository.todo.LeaseDO;
|
||||
import com.mhd.basic.domain.lease.service.LeaseDomainService;
|
||||
import com.mhd.basic.domain.shipperLeaseDetails.entity.ShipperLeaseDetails;
|
||||
import com.mhd.basic.domain.shipperLeaseDetails.entity.WarehouseOccupancyRate;
|
||||
import com.mhd.basic.domain.shipperLeaseDetails.repository.facade.IShipperLeaseDetailsService;
|
||||
import com.mhd.basic.domain.shipperLeaseDetails.repository.po.ShipperLeaseDetailsPO;
|
||||
import com.mhd.basic.domain.shipperLeaseDetails.repository.todo.ShipperLeaseDetailsDO;
|
||||
import com.mhd.basic.domain.shipperLeaseDetails.service.ShipperLeaseDetailsDomainService;
|
||||
import com.mhd.basic.domain.storageSection.repository.po.StorageSectionPO;
|
||||
import com.mhd.basic.domain.storageSection.repository.todo.StorageSectionDO;
|
||||
import com.mhd.basic.interfaces.dto.lease.LeaseDTO;
|
||||
import com.mhd.common.core.exception.ServiceException;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.WmsServiceFeign;
|
||||
import com.mhd.system.api.domain.MaterialInventoryDTO;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import com.mhd.system.service.ISysDictTypeService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.TreeMap;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 货主租赁明细ApplicationService
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-07
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class ShipperLeaseDetailsApplicationService {
|
||||
|
||||
@Autowired
|
||||
private ShipperLeaseDetailsDomainService shipperLeaseDetailsDomainService;
|
||||
|
||||
@Autowired
|
||||
private ISysDictTypeService dictTypeService;
|
||||
|
||||
/**
|
||||
* 分页查询货主租赁明细列表
|
||||
*/
|
||||
|
||||
public List<ShipperLeaseDetailsPO> queryList(ShipperLeaseDetailsDO shipperLeaseDetailsDO) {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (loginUser != null && loginUser.getUserPo() != null){
|
||||
Long loginUserOrganizationId = loginUser.getUserPo().getOrganizationId();
|
||||
Long topOrganizationId = loginUser.getUserPo().getTopOrganizationId();
|
||||
|
||||
// 数据权限:根据organizationId来设置查询权限
|
||||
// organizationId等于2827时查询全部,其他仅查询各自组织的信息
|
||||
if (loginUserOrganizationId != null && loginUserOrganizationId.equals(2827L)) {
|
||||
// 南光组织(organizationId=2827):可以查询所有组织的数据
|
||||
// 如果前端传递了 organizationId,使用前端传递的值进行过滤
|
||||
// 如果前端没有传递 organizationId,清空组织过滤条件,查询所有组织的数据
|
||||
if (shipperLeaseDetailsDO.getOrganizationId() == null) {
|
||||
shipperLeaseDetailsDO.setOrganizationId(null);
|
||||
shipperLeaseDetailsDO.setTopOrganizationId(null);
|
||||
}
|
||||
} else {
|
||||
// 其他组织:设置organizationId,只查询当前组织的数据
|
||||
if (topOrganizationId != null && topOrganizationId != 1){
|
||||
shipperLeaseDetailsDO.setTopOrganizationId(topOrganizationId);
|
||||
}
|
||||
// 如果前端传递了organizationId,验证是否与当前登录用户的组织ID一致
|
||||
if (shipperLeaseDetailsDO.getOrganizationId() != null && !shipperLeaseDetailsDO.getOrganizationId().equals(loginUserOrganizationId)) {
|
||||
// 前端传递了其他组织的organizationId,强制使用当前登录用户的组织ID,防止越权查询
|
||||
shipperLeaseDetailsDO.setOrganizationId(loginUserOrganizationId);
|
||||
}
|
||||
}
|
||||
}
|
||||
return shipperLeaseDetailsDomainService.queryList(shipperLeaseDetailsDO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增货主租赁明细
|
||||
*/
|
||||
public Boolean insert(ShipperLeaseDetailsDO shipperLeaseDetailsDO) {
|
||||
// 设置当前登录用户的组织信息
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (loginUser != null && loginUser.getUserPo() != null) {
|
||||
shipperLeaseDetailsDO.setOrganizationId(loginUser.getUserPo().getOrganizationId());
|
||||
shipperLeaseDetailsDO.setOrganizationName(loginUser.getUserPo().getOrganizationName());
|
||||
shipperLeaseDetailsDO.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
|
||||
}
|
||||
return shipperLeaseDetailsDomainService.insert(shipperLeaseDetailsDO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改货主租赁明细
|
||||
*/
|
||||
public Boolean update(ShipperLeaseDetailsDO shipperLeaseDetailsDO) {
|
||||
return shipperLeaseDetailsDomainService.update(shipperLeaseDetailsDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除货主租赁明细
|
||||
*/
|
||||
public boolean delete(Long[] shipperLeaseDetailsIds) {
|
||||
return shipperLeaseDetailsDomainService.delete(shipperLeaseDetailsIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取货主租赁明细详细信息
|
||||
*/
|
||||
public ShipperLeaseDetailsPO getInfo(Long shipperLeaseDetailsId)
|
||||
{
|
||||
return shipperLeaseDetailsDomainService.getInfo(shipperLeaseDetailsId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 批量作废租赁
|
||||
* @author ZhouGY
|
||||
* @date 2024/5/13 9:46
|
||||
* @return Boolean
|
||||
*/
|
||||
public Boolean nullifyByIds(List<Long> shipperLeaseDetailsIds){
|
||||
return shipperLeaseDetailsDomainService.nullifyByIds(shipperLeaseDetailsIds);
|
||||
}
|
||||
|
||||
|
||||
// /**
|
||||
// * @description 设置数据字典键值
|
||||
// * @author ZhouGY
|
||||
// * @date 2024/4/7 14:33
|
||||
// * @param containerDO
|
||||
// */
|
||||
// private void setDataDict(LeaseDO leaseDO){
|
||||
// //翻译租赁类型
|
||||
// List<SysDictData> storageTypeDictDataList = dictTypeService.selectDictDataByType(DictCode.CONTAINER_TYPE.getCode());
|
||||
// if (null == storageTypeDictDataList) {
|
||||
// throw new ServiceException("租赁类型数据字典不存在 请联系管理员");
|
||||
// }
|
||||
// SysDictData storageTypeDictData = storageTypeDictDataList.stream().filter(info -> ObjectUtil.equal(info.getDictValue(), containerDO.getContainerType())).findAny().orElse(null);
|
||||
// if (null == storageTypeDictData) {
|
||||
// throw new ServiceException("租赁类型【" + leaseDO.getContainerType() + "】数据字典不存在 请联系管理员");
|
||||
// }
|
||||
// leaseDO.setContainerTypeName(storageTypeDictData.getDictLabel());
|
||||
// }
|
||||
}
|
||||
+24
-2
@@ -49,8 +49,30 @@ public class StorageLocationApplicationService {
|
||||
if (topOrganizationId != null && topOrganizationId != 1){
|
||||
storageLocationDO.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
|
||||
}
|
||||
AssociationWarehouseCacheDO associationWarehouseCacheDO = SystemServiceCacheUtil.getAssociationWarehouseCache(loginUser.getUserid());
|
||||
storageLocationDO.setWarehouseId(associationWarehouseCacheDO.getWarehouseId());
|
||||
// 只有当前端没有明确传仓库条件时,才使用用户关联仓库缓存进行过滤;
|
||||
// 避免出现“单据仓库=常温仓,但库位列表仍显示保税仓”的错配问题。
|
||||
boolean hasWarehouseFilter = storageLocationDO.getWarehouseId() != null
|
||||
|| (storageLocationDO.getWarehouseCode() != null && !storageLocationDO.getWarehouseCode().trim().isEmpty())
|
||||
|| (storageLocationDO.getWarehouseName() != null && !storageLocationDO.getWarehouseName().trim().isEmpty());
|
||||
if (!hasWarehouseFilter) {
|
||||
try {
|
||||
AssociationWarehouseCacheDO associationWarehouseCacheDO = SystemServiceCacheUtil.getAssociationWarehouseCache(loginUser.getUserid());
|
||||
if (associationWarehouseCacheDO != null) {
|
||||
if (associationWarehouseCacheDO.getWarehouseId() != null) {
|
||||
storageLocationDO.setWarehouseId(associationWarehouseCacheDO.getWarehouseId());
|
||||
}
|
||||
if (associationWarehouseCacheDO.getWarehouseCode() != null && !associationWarehouseCacheDO.getWarehouseCode().trim().isEmpty()) {
|
||||
storageLocationDO.setWarehouseCode(associationWarehouseCacheDO.getWarehouseCode());
|
||||
}
|
||||
if (associationWarehouseCacheDO.getWarehouseName() != null && !associationWarehouseCacheDO.getWarehouseName().trim().isEmpty()) {
|
||||
storageLocationDO.setWarehouseName(associationWarehouseCacheDO.getWarehouseName());
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// 获取失败不影响查询(允许查询所有仓库,或由前端传参控制)
|
||||
log.warn("获取用户关联仓库信息失败,将按前端条件查询库位数据,用户ID:{},错误:{}", loginUser.getUserid(), e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
return storageLocationDomainService.queryList(storageLocationDO);
|
||||
}
|
||||
|
||||
+3
-3
@@ -43,9 +43,9 @@ public class WarehouseApplicationService {
|
||||
public List<WarehousePO> queryList(WarehouseDO warehouseDO) {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (loginUser != null){
|
||||
Long topOrganizationId = loginUser.getUserPo().getTopOrganizationId();
|
||||
if (topOrganizationId != null && topOrganizationId != 1){
|
||||
warehouseDO.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
|
||||
Long organizationId = loginUser.getUserPo().getOrganizationId();
|
||||
if (organizationId != null && organizationId != 1){
|
||||
warehouseDO.setOrganizationId(loginUser.getUserPo().getOrganizationId());
|
||||
}
|
||||
}
|
||||
return warehouseDomainService.queryList(warehouseDO);
|
||||
|
||||
+8
@@ -46,6 +46,10 @@ public class BatchDetail extends BaseVOEntity{
|
||||
@Excel(name = "批次标签")
|
||||
private String batchLabels;
|
||||
|
||||
@ApiModelProperty("字段名称")
|
||||
@Excel(name = "字段名称")
|
||||
private String fieldName;
|
||||
|
||||
@ApiModelProperty("输入控制: 1-必填 2-可选")
|
||||
@Excel(name = "输入控制: 1-必填 2-可选")
|
||||
private String inputControl;
|
||||
@@ -58,6 +62,10 @@ public class BatchDetail extends BaseVOEntity{
|
||||
@Excel(name = "属性选项")
|
||||
private String attributeOption;
|
||||
|
||||
@ApiModelProperty("是否显示: 0-不显示 1-显示")
|
||||
@Excel(name = "是否显示: 0-不显示 1-显示")
|
||||
private Integer isDisplay;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
+35
-3
@@ -62,24 +62,40 @@ public class BatchDetailImpl extends ServiceImpl<BatchDetailMapper, BatchDetail>
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
UserPo userPo = loginUser.getUserPo();
|
||||
List<BatchDetailDO> batchDetailDOList = batchDO.getBatchDetailList();
|
||||
//验证提交的数据是否存在重复
|
||||
// 验证本次提交的数据是否存在重复(同一批次内不允许重复标签)
|
||||
long count = batchDetailDOList.stream().map(BatchDetailDO::getBatchLabels).distinct().count();
|
||||
if (batchDetailDOList.size() != count){
|
||||
throw new ServiceException("批次标签不允许重复,请检查提交的数据");
|
||||
}
|
||||
|
||||
// 查询当前批次原有的标签明细
|
||||
List<BatchDetail> batchDetailDbList = batchDetailMapper.selectList(new QueryWrapper<BatchDetail>().lambda()
|
||||
.eq(BatchDetail::getBatchId, batchDO.getBatchId()));
|
||||
|
||||
// 如果数据库里已经有明细,并且这次前端传过来的所有明细都没有明细ID,
|
||||
// 说明前端没有带回原来的主键,这种情况我们视为“完全替换”:
|
||||
// 先物理删除当前批次下所有旧的明细,再按本次数据重新插入,避免命中数据库唯一索引冲突。
|
||||
boolean allNewWithoutId = CollectionUtil.isNotEmpty(batchDetailDOList)
|
||||
&& batchDetailDOList.stream().allMatch(detail -> detail.getBatchDetailId() == null);
|
||||
if (CollectionUtil.isNotEmpty(batchDetailDbList) && allNewWithoutId) {
|
||||
batchDetailMapper.delete(new QueryWrapper<BatchDetail>().lambda()
|
||||
.eq(BatchDetail::getBatchId, batchDO.getBatchId()));
|
||||
batchDetailDbList = new ArrayList<>();
|
||||
}
|
||||
List<BatchDetail> batchDetailListSave = new ArrayList<>();
|
||||
List<BatchDetail> batchDetailListSave2 = new ArrayList<>();
|
||||
List<BatchDetail> batchDetailListUpdates = new ArrayList<>();
|
||||
if (CollectionUtil.isNotEmpty(batchDetailDbList)){
|
||||
Map<String, BatchDetail> batchDetailMap = batchDetailDbList.stream().collect(Collectors.toMap(BatchDetail::getBatchLabels, Function.identity()));
|
||||
Map<Long, BatchDetail> batchDetailMap = batchDetailDbList.stream().collect(Collectors.toMap(BatchDetail::getBatchDetailId, Function.identity()));
|
||||
for (BatchDetailDO batchDetailDO : batchDetailDOList){
|
||||
BatchDetail batchDetailDb = batchDetailMap.get(batchDetailDO.getBatchLabels());
|
||||
BatchDetail batchDetailDb = batchDetailMap.get(batchDetailDO.getBatchDetailId());
|
||||
if (batchDetailDb != null){
|
||||
batchDetailDb.setBatchLabels(batchDetailDO.getBatchLabels());
|
||||
batchDetailDb.setFieldName(batchDetailDO.getFieldName());
|
||||
batchDetailDb.setInputControl(batchDetailDO.getInputControl());
|
||||
batchDetailDb.setAttributeFormat(batchDetailDO.getAttributeFormat());
|
||||
batchDetailDb.setAttributeOption(batchDetailDO.getAttributeOption());
|
||||
batchDetailDb.setIsDisplay(batchDetailDO.getIsDisplay());
|
||||
batchDetailDb.setRemark(batchDetailDO.getRemark());
|
||||
batchDetailDb.setDelFlag(1);
|
||||
batchDetailListUpdates.add(batchDetailDb);
|
||||
@@ -96,6 +112,20 @@ public class BatchDetailImpl extends ServiceImpl<BatchDetailMapper, BatchDetail>
|
||||
batchDetailListSave.add(batchDetail);
|
||||
}
|
||||
}
|
||||
}else {
|
||||
//是空没有详情 新增
|
||||
for (BatchDetailDO batchDetailDO : batchDetailDOList) {
|
||||
BatchDetail batchDetail = new BatchDetail();
|
||||
BeanUtils.copyProperties(batchDetailDO, batchDetail);
|
||||
batchDetail.setBatchId(batchDO.getBatchId());
|
||||
batchDetail.setOrganizationId(batchDO.getOrganizationId());
|
||||
batchDetail.setOrganizationName(batchDO.getOrganizationName());
|
||||
batchDetail.setTopOrganizationId(batchDO.getTopOrganizationId());
|
||||
batchDetail.setCreateBy(userPo.getUserId());
|
||||
batchDetail.setCreateByName(userPo.getUserName());
|
||||
batchDetail.setCreateTime(new Date());
|
||||
batchDetailListSave2.add(batchDetail);
|
||||
}
|
||||
}
|
||||
//删除 之前存在 现在没有的
|
||||
List<Long> batchDetailIds = batchDetailDbList.stream().map(BatchDetail::getBatchDetailId).collect(Collectors.toList());
|
||||
@@ -113,6 +143,8 @@ public class BatchDetailImpl extends ServiceImpl<BatchDetailMapper, BatchDetail>
|
||||
//新增
|
||||
if (CollectionUtil.isNotEmpty(batchDetailListSave)){
|
||||
saveBatch(batchDetailListSave);
|
||||
}else if (CollectionUtil.isNotEmpty(batchDetailListSave2)){
|
||||
saveBatch(batchDetailListSave2);
|
||||
}
|
||||
//修改
|
||||
if (CollectionUtil.isNotEmpty(batchDetailListUpdates)){
|
||||
|
||||
+8
@@ -45,6 +45,10 @@ public class BatchDetailPO extends BaseVOEntity{
|
||||
@Excel(name = "批次标签")
|
||||
private String batchLabels;
|
||||
|
||||
@ApiModelProperty("字段名称")
|
||||
@Excel(name = "字段名称")
|
||||
private String fieldName;
|
||||
|
||||
@ApiModelProperty("输入控制: 1-必填 2-可选")
|
||||
@Excel(name = "输入控制: 1-必填 2-可选")
|
||||
private String inputControl;
|
||||
@@ -57,6 +61,10 @@ public class BatchDetailPO extends BaseVOEntity{
|
||||
@Excel(name = "属性选项")
|
||||
private String attributeOption;
|
||||
|
||||
@ApiModelProperty("是否显示: 0-不显示 1-显示")
|
||||
@Excel(name = "是否显示: 0-不显示 1-显示")
|
||||
private Integer isDisplay;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
+13
@@ -1,5 +1,7 @@
|
||||
package com.mhd.basic.domain.batchDetail.repository.todo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
@@ -23,6 +25,7 @@ public class BatchDetailDO extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("批次管理详情id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long batchDetailId;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@@ -45,6 +48,14 @@ public class BatchDetailDO extends BaseVOEntity{
|
||||
@Excel(name = "批次标签")
|
||||
private String batchLabels;
|
||||
|
||||
@ApiModelProperty("字段名称")
|
||||
@Excel(name = "字段名称")
|
||||
private String fieldName;
|
||||
|
||||
@ApiModelProperty("是否显示: 0-不显示 1-显示")
|
||||
@Excel(name = "是否显示: 0-不显示 1-显示")
|
||||
private Integer isDisplay;
|
||||
|
||||
@ApiModelProperty("输入控制: 1-必填 2-可选")
|
||||
@Excel(name = "输入控制: 1-必填 2-可选")
|
||||
private String inputControl;
|
||||
@@ -57,6 +68,8 @@ public class BatchDetailDO extends BaseVOEntity{
|
||||
@Excel(name = "属性选项")
|
||||
private String attributeOption;
|
||||
|
||||
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.mhd.basic.domain.lease.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 租赁管理对象 container
|
||||
*
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class Lease extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("仓库ID")
|
||||
private Long warehouseId;
|
||||
|
||||
@ApiModelProperty("仓库名字")
|
||||
private String warehouseName;
|
||||
|
||||
@ApiModelProperty("货主id")
|
||||
private Long shipperId;
|
||||
|
||||
@ApiModelProperty("货主名称")
|
||||
private String cargoOwnerName;
|
||||
|
||||
@ApiModelProperty(value = "租赁方式(整租/散租)")
|
||||
private String leaseType;
|
||||
|
||||
@ApiModelProperty("租赁面积(m²)")
|
||||
private BigDecimal leaseArea;
|
||||
|
||||
@ApiModelProperty("开始日期")
|
||||
private Date startDate;
|
||||
|
||||
@ApiModelProperty("结束日期")
|
||||
private Date endDate;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
package com.mhd.basic.domain.lease.repository.facade;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.mhd.basic.domain.lease.entity.Lease;
|
||||
import com.mhd.basic.domain.lease.repository.po.LeasePO;
|
||||
import com.mhd.basic.domain.lease.repository.todo.LeaseDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 租赁管理Service接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-07
|
||||
*/
|
||||
public interface ILeaseService extends IService<Lease>
|
||||
{
|
||||
/**
|
||||
* 分页查询租赁管理列表
|
||||
*/
|
||||
public List<LeasePO> queryList(LeaseDO leaseDO);
|
||||
|
||||
/**
|
||||
* 新增租赁管理
|
||||
*/
|
||||
public Boolean insert(LeaseDO leaseDO);
|
||||
|
||||
/**
|
||||
* 修改租赁管理
|
||||
*/
|
||||
public Boolean update(LeaseDO leaseDO);
|
||||
|
||||
/**
|
||||
* 批量删除租赁管理
|
||||
*/
|
||||
public Boolean delete(Long[] leaseIds);
|
||||
|
||||
|
||||
/**
|
||||
* 查询租赁管理
|
||||
*/
|
||||
public LeasePO getInfo(Long leaseId);
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package com.mhd.basic.domain.lease.repository.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mhd.basic.domain.lease.entity.Lease;
|
||||
import com.mhd.basic.domain.lease.repository.po.LeasePO;
|
||||
import com.mhd.basic.domain.lease.repository.todo.LeaseDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 租赁管理Mapper接口
|
||||
*
|
||||
*/
|
||||
public interface LeaseMapper extends BaseMapper<Lease>
|
||||
{
|
||||
/**
|
||||
* 查询租赁管理列表
|
||||
*/
|
||||
public List<LeasePO> queryList(LeaseDO leaseDO);
|
||||
|
||||
}
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
package com.mhd.basic.domain.lease.repository.persistence;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mhd.basic.domain.lease.entity.Lease;
|
||||
import com.mhd.basic.domain.lease.repository.facade.ILeaseService;
|
||||
import com.mhd.basic.domain.lease.repository.mapper.LeaseMapper;
|
||||
import com.mhd.basic.domain.lease.repository.po.LeasePO;
|
||||
import com.mhd.basic.domain.lease.repository.todo.LeaseDO;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 容器管理Service业务层处理
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-07
|
||||
*/
|
||||
@Service
|
||||
public class LeaseImpl extends ServiceImpl<LeaseMapper, Lease> implements ILeaseService {
|
||||
@Autowired
|
||||
private LeaseMapper leaseMapper;
|
||||
|
||||
/**
|
||||
* 查询容器管理列表
|
||||
*/
|
||||
@Override
|
||||
public List<LeasePO> queryList(LeaseDO leaseDO)
|
||||
{
|
||||
return leaseMapper.queryList(leaseDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增容器管理
|
||||
*/
|
||||
@Override
|
||||
public Boolean insert(LeaseDO leaseDO) {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
Lease lease = new Lease();
|
||||
BeanUtils.copyProperties(leaseDO,lease);
|
||||
return this.save(lease);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改容器管理
|
||||
*/
|
||||
@Override
|
||||
public Boolean update(LeaseDO leaseDO) {
|
||||
Lease lease = new Lease();
|
||||
BeanUtils.copyProperties(leaseDO,lease);
|
||||
return this.updateById(lease);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除容器管理
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean delete(Long[] leaseIds ) {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
List<Lease> list = new ArrayList<>();
|
||||
for (Long id : leaseIds) {
|
||||
Lease lease = new Lease();
|
||||
lease.setId(id);
|
||||
lease.setDelFlag(2);
|
||||
lease.setUpdateBy(loginUser.getUserid());
|
||||
lease.setUpdateByName(loginUser.getUsername());
|
||||
lease.setUpdateTime(new Date());
|
||||
list.add(lease);
|
||||
}
|
||||
return this.updateBatchById(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改容器管理
|
||||
*/
|
||||
@Override
|
||||
public LeasePO getInfo(Long leaseId) {
|
||||
Lease lease = this.getById(leaseId);
|
||||
LeasePO leasePO = new LeasePO();
|
||||
BeanUtils.copyProperties(lease,leasePO);
|
||||
return leasePO;
|
||||
}
|
||||
|
||||
// /**
|
||||
// * @description 校验唯一
|
||||
// * @author ZhouGY
|
||||
// * @date 2024/5/9 21:10
|
||||
// * @param containerDO
|
||||
// */
|
||||
// private void verifyUniqueness(ContainerDO containerDO){
|
||||
// LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
// Long topOrganizationId = loginUser.getUserPo().getTopOrganizationId();
|
||||
// if (topOrganizationId == null || topOrganizationId == 0 ){
|
||||
// throw new ServiceException("获取当前登陆人组织失败!");
|
||||
// }
|
||||
// int count = leaseMapper.selectCount(new QueryWrapper<Container>().lambda()
|
||||
// .eq(Container::getTopOrganizationId, topOrganizationId)
|
||||
// .eq(Container::getContainerCode,containerDO.getContainerCode())
|
||||
// .eq(Container::getOrganizationId, containerDO.getOrganizationId())
|
||||
// .ne(containerDO.getContainerId() != null, Container::getContainerId, containerDO.getContainerId() )
|
||||
// .eq(Container::getDelFlag,1));
|
||||
// if (count > 0){
|
||||
// throw new ServiceException("容器编码【" + containerDO.getContainerCode() + "】已存在");
|
||||
// }
|
||||
// }
|
||||
}
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
package com.mhd.basic.domain.lease.repository.po;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 租赁管理对象 container
|
||||
*
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class LeasePO extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("id")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("仓库ID")
|
||||
private Long warehouseId;
|
||||
|
||||
@ApiModelProperty("仓库名字")
|
||||
private String warehouseName;
|
||||
|
||||
@ApiModelProperty("货主id")
|
||||
private Long shipperId;
|
||||
|
||||
@ApiModelProperty("货主名称")
|
||||
private String cargoOwnerName;
|
||||
|
||||
@ApiModelProperty(value = "租赁方式(整租/散租)")
|
||||
private String leaseType;
|
||||
|
||||
@ApiModelProperty("租赁面积(m²)")
|
||||
private BigDecimal leaseArea;
|
||||
|
||||
@ApiModelProperty("开始日期")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date startDate;
|
||||
|
||||
@ApiModelProperty("结束日期")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date endDate;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
}
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
package com.mhd.basic.domain.lease.repository.todo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 租赁管理对象 container
|
||||
*
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class LeaseDO extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("id")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("仓库ID")
|
||||
private Long warehouseId;
|
||||
|
||||
@ApiModelProperty("仓库名字")
|
||||
private String warehouseName;
|
||||
|
||||
@ApiModelProperty("货主id")
|
||||
private Long shipperId;
|
||||
|
||||
@ApiModelProperty("货主名称")
|
||||
private String cargoOwnerName;
|
||||
|
||||
@ApiModelProperty(value = "租赁方式(整租/散租)")
|
||||
private String leaseType;
|
||||
|
||||
@ApiModelProperty("租赁面积(m²)")
|
||||
private BigDecimal leaseArea;
|
||||
|
||||
@ApiModelProperty("开始日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date startDate;
|
||||
|
||||
@ApiModelProperty("结束日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date endDate;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("当前时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date time;
|
||||
|
||||
@ApiModelProperty(name = "创建时间查询条件开始日期")
|
||||
private String createTimeStart;
|
||||
|
||||
@ApiModelProperty(name = "创建时间查询条件结束日期")
|
||||
private String createTimeEnd;
|
||||
|
||||
@ApiModelProperty(name = "修改时间查询条件开始日期")
|
||||
private String updateTimeStart;
|
||||
|
||||
@ApiModelProperty(name = "修改时间查询条件结束日期")
|
||||
private String updateTimeEnd;
|
||||
}
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
package com.mhd.basic.domain.lease.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.mhd.basic.domain.container.entity.Container;
|
||||
import com.mhd.basic.domain.container.repository.facade.IContainerService;
|
||||
import com.mhd.basic.domain.container.repository.po.ContainerPO;
|
||||
import com.mhd.basic.domain.container.repository.todo.ContainerDO;
|
||||
import com.mhd.basic.domain.lease.entity.Lease;
|
||||
import com.mhd.basic.domain.lease.repository.facade.ILeaseService;
|
||||
import com.mhd.basic.domain.lease.repository.po.LeasePO;
|
||||
import com.mhd.basic.domain.lease.repository.todo.LeaseDO;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 租赁管理
|
||||
*
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class LeaseDomainService {
|
||||
|
||||
@Autowired
|
||||
private ILeaseService leaseService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询租赁管理列表
|
||||
*/
|
||||
public List<LeasePO> queryList(LeaseDO leaseDO) {
|
||||
return leaseService.queryList(leaseDO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增租赁管理
|
||||
*/
|
||||
public Boolean insert(LeaseDO leaseDO) {
|
||||
|
||||
return leaseService.insert(leaseDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改租赁管理
|
||||
*/
|
||||
public Boolean update(LeaseDO leaseDO) {
|
||||
return leaseService.update(leaseDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除租赁管理
|
||||
*/
|
||||
public Boolean delete(Long[] leaseIds) {
|
||||
return leaseService.delete(leaseIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取租赁管理详细信息
|
||||
*/
|
||||
public LeasePO getInfo(Long leaseId)
|
||||
{
|
||||
return leaseService.getInfo(leaseId);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description 批量作废租赁
|
||||
* @author ZhouGY
|
||||
* @date 2024/5/13 9:46
|
||||
* @param leaseIds
|
||||
* @return Boolean
|
||||
*/
|
||||
public Boolean nullifyByIds(List<Long> leaseIds) {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
return leaseService.update(new UpdateWrapper<Lease>().lambda()
|
||||
.set(Lease::getUpdateBy, loginUser.getUserid())
|
||||
.set(Lease::getUpdateTime, new Date())
|
||||
.in(Lease::getId, leaseIds)
|
||||
.eq(Lease::getDelFlag, 1));
|
||||
}
|
||||
}
|
||||
+202
-1
@@ -158,6 +158,7 @@ public class MaterialBaseInfo extends BaseVOEntity{
|
||||
|
||||
@ApiModelProperty("单位数量")
|
||||
@Excel(name = "单位数量")
|
||||
@TableField(exist = false)
|
||||
private BigDecimal unitNumber;
|
||||
|
||||
@ApiModelProperty("是否公用: 1-是 2-否")
|
||||
@@ -184,4 +185,204 @@ public class MaterialBaseInfo extends BaseVOEntity{
|
||||
@ApiModelProperty("整机编码")
|
||||
@Excel(name = "整机编号")
|
||||
private String machineCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
@ApiModelProperty("商品名称")
|
||||
@Excel(name = "商品名称")
|
||||
@TableField(exist = false)
|
||||
private String commodityName;
|
||||
/**
|
||||
* 商品编码
|
||||
*/
|
||||
@ApiModelProperty("商品编码")
|
||||
@Excel(name = "商品编码")
|
||||
@TableField(exist = false)
|
||||
private String commodityNo;
|
||||
/**
|
||||
* 料号
|
||||
*/
|
||||
@ApiModelProperty("料号")
|
||||
@Excel(name = "料号")
|
||||
@TableField(exist = false)
|
||||
private String materialNo;
|
||||
/**
|
||||
* 规格型号
|
||||
*/
|
||||
@ApiModelProperty("规格型号")
|
||||
@Excel(name = "规格型号")
|
||||
@TableField(exist = false)
|
||||
private String specificationModel;
|
||||
/**
|
||||
* Invoice No
|
||||
*/
|
||||
@ApiModelProperty("Invoice No")
|
||||
@Excel(name = "Invoice No")
|
||||
@TableField(exist = false)
|
||||
private String invoiceNo;
|
||||
/**
|
||||
* 升
|
||||
*/
|
||||
@ApiModelProperty("升")
|
||||
@Excel(name = "升")
|
||||
@TableField(exist = false)
|
||||
private String liter;
|
||||
|
||||
/**
|
||||
* 尺寸
|
||||
*/
|
||||
@ApiModelProperty("尺寸")
|
||||
@Excel(name = "尺寸")
|
||||
@TableField(exist = false)
|
||||
private String size;
|
||||
|
||||
/**
|
||||
* 申报单位
|
||||
*/
|
||||
@ApiModelProperty("申报单位")
|
||||
@Excel(name = "申报单位")
|
||||
@TableField(exist = false)
|
||||
private String declareUnit;
|
||||
|
||||
/**
|
||||
* Batch Ref NO's
|
||||
*/
|
||||
@ApiModelProperty("Batch Ref NO's")
|
||||
@Excel(name = "Batch Ref NO's")
|
||||
@TableField(exist = false)
|
||||
private String batchRefNo;
|
||||
|
||||
/**
|
||||
* Sheet Ref NO's
|
||||
*/
|
||||
@ApiModelProperty("Sheet Ref NO's")
|
||||
@Excel(name = "Sheet Ref NO's")
|
||||
@TableField(exist = false)
|
||||
private String sheetRefNo;
|
||||
|
||||
/**
|
||||
* 原产国
|
||||
*/
|
||||
@ApiModelProperty("原产国")
|
||||
@Excel(name = "原产国")
|
||||
@TableField(exist = false)
|
||||
private String countryOfOrigin;
|
||||
|
||||
/**
|
||||
* 箱号/卡板号
|
||||
*/
|
||||
@ApiModelProperty("箱号/卡板号")
|
||||
@Excel(name = "箱号/卡板号")
|
||||
@TableField(exist = false)
|
||||
private String casePalletNo;
|
||||
|
||||
/**
|
||||
* 币制
|
||||
*/
|
||||
@ApiModelProperty("币制")
|
||||
@Excel(name = "币制")
|
||||
private String currency;
|
||||
|
||||
/**
|
||||
* 申报数量
|
||||
*/
|
||||
@ApiModelProperty("申报数量")
|
||||
@Excel(name = "申报数量")
|
||||
@TableField(exist = false)
|
||||
private Double declareQuantity;
|
||||
|
||||
/**
|
||||
* 箱数
|
||||
*/
|
||||
@ApiModelProperty("箱数")
|
||||
@Excel(name = "箱数")
|
||||
@TableField(exist = false)
|
||||
private Double caseCount;
|
||||
|
||||
/**
|
||||
* 件数
|
||||
*/
|
||||
@ApiModelProperty("件数")
|
||||
@Excel(name = "件数")
|
||||
@TableField(exist = false)
|
||||
private Double pieceCount;
|
||||
|
||||
/**
|
||||
* 出库数量
|
||||
*/
|
||||
@ApiModelProperty("出库数量")
|
||||
@Excel(name = "出库数量")
|
||||
@TableField(exist = false)
|
||||
private Double outboundQuantity;
|
||||
|
||||
/**
|
||||
* 总净重(KG)
|
||||
*/
|
||||
@ApiModelProperty("总净重(KG)")
|
||||
@Excel(name = "总净重(KG)")
|
||||
@TableField(exist = false)
|
||||
private Double totalNetWeight;
|
||||
|
||||
/**
|
||||
* 总毛重(KG)
|
||||
*/
|
||||
@ApiModelProperty("总毛重(KG)")
|
||||
@Excel(name = "总毛重(KG)")
|
||||
@TableField(exist = false)
|
||||
private Double totalGrossWeight;
|
||||
|
||||
/**
|
||||
* 总体积(CBM)
|
||||
*/
|
||||
@ApiModelProperty("总体积(CBM)")
|
||||
@Excel(name = "总体积(CBM)")
|
||||
@TableField(exist = false)
|
||||
private Double totalVolume;
|
||||
|
||||
/**
|
||||
* 总面积(SQM)
|
||||
*/
|
||||
@ApiModelProperty("总面积(SQM)")
|
||||
@Excel(name = "总面积(SQM)")
|
||||
@TableField(exist = false)
|
||||
private Double totalArea;
|
||||
/**
|
||||
* 总价
|
||||
*/
|
||||
@ApiModelProperty("总价")
|
||||
@Excel(name = "总价")
|
||||
@TableField(exist = false)
|
||||
private Double totalAmount;
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
@ApiModelProperty("单位")
|
||||
@Excel(name = "单位")
|
||||
@TableField(exist = false)
|
||||
private String unit;
|
||||
|
||||
|
||||
@ApiModelProperty("SKU码")
|
||||
private String skuCode;
|
||||
|
||||
@ApiModelProperty("单价")
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
|
||||
@ApiModelProperty("原产国")
|
||||
private String originCountry;
|
||||
|
||||
@ApiModelProperty("HS码")
|
||||
private String hsCode;
|
||||
|
||||
@ApiModelProperty("申报单位")
|
||||
private String declarationUnit;
|
||||
|
||||
@ApiModelProperty("法定单位")
|
||||
private String statutoryUnit;
|
||||
|
||||
@ApiModelProperty("法定第二单位")
|
||||
private String statutorySecondUnit;
|
||||
}
|
||||
+195
-1
@@ -5,6 +5,7 @@ import com.mhd.basic.domain.batch.repository.po.BatchPO;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.handler.ListTypeHandler;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import com.mhd.system.api.domain.*;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@@ -182,4 +183,197 @@ public class MaterialBaseInfoPO extends BaseVOEntity{
|
||||
@Excel(name = "整机编号")
|
||||
private String machineCode;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
@ApiModelProperty("商品名称")
|
||||
@Excel(name = "商品名称")
|
||||
private String commodityName;
|
||||
/**
|
||||
* 商品编码
|
||||
*/
|
||||
@ApiModelProperty("商品编码")
|
||||
@Excel(name = "商品编码")
|
||||
private String commodityNo;
|
||||
/**
|
||||
* 料号
|
||||
*/
|
||||
@ApiModelProperty("料号")
|
||||
@Excel(name = "料号")
|
||||
private String materialNo;
|
||||
/**
|
||||
* 规格型号
|
||||
*/
|
||||
@ApiModelProperty("规格型号")
|
||||
@Excel(name = "规格型号")
|
||||
private String specificationModel;
|
||||
/**
|
||||
* Invoice No
|
||||
*/
|
||||
@ApiModelProperty("Invoice No")
|
||||
@Excel(name = "Invoice No")
|
||||
private String invoiceNo;
|
||||
/**
|
||||
* 升
|
||||
*/
|
||||
@ApiModelProperty("升")
|
||||
@Excel(name = "升")
|
||||
private String liter;
|
||||
|
||||
/**
|
||||
* 尺寸
|
||||
*/
|
||||
@ApiModelProperty("尺寸")
|
||||
@Excel(name = "尺寸")
|
||||
private String size;
|
||||
|
||||
/**
|
||||
* 申报单位
|
||||
*/
|
||||
@ApiModelProperty("申报单位")
|
||||
@Excel(name = "申报单位")
|
||||
private String declareUnit;
|
||||
|
||||
/**
|
||||
* Batch Ref NO’s
|
||||
*/
|
||||
@ApiModelProperty("Batch Ref NO’s")
|
||||
@Excel(name = "Batch Ref NO’s")
|
||||
private String batchRefNo;
|
||||
|
||||
/**
|
||||
* Sheet Ref NO’s
|
||||
*/
|
||||
@ApiModelProperty("Sheet Ref NO’s")
|
||||
@Excel(name = "Sheet Ref NO’s")
|
||||
private String sheetRefNo;
|
||||
|
||||
/**
|
||||
* 原产国
|
||||
*/
|
||||
@ApiModelProperty("原产国")
|
||||
@Excel(name = "原产国")
|
||||
private String countryOfOrigin;
|
||||
|
||||
/**
|
||||
* 箱号/卡板号
|
||||
*/
|
||||
@ApiModelProperty("箱号/卡板号")
|
||||
@Excel(name = "箱号/卡板号")
|
||||
private String casePalletNo;
|
||||
|
||||
/**
|
||||
* 币制
|
||||
*/
|
||||
@ApiModelProperty("币制")
|
||||
@Excel(name = "币制")
|
||||
private String currency;
|
||||
|
||||
/**
|
||||
* 申报数量
|
||||
*/
|
||||
@ApiModelProperty("申报数量")
|
||||
@Excel(name = "申报数量")
|
||||
private Double declareQuantity;
|
||||
|
||||
/**
|
||||
* 箱数
|
||||
*/
|
||||
@ApiModelProperty("箱数")
|
||||
@Excel(name = "箱数")
|
||||
private Double caseCount;
|
||||
|
||||
/**
|
||||
* 件数
|
||||
*/
|
||||
@ApiModelProperty("件数")
|
||||
@Excel(name = "件数")
|
||||
private Double pieceCount;
|
||||
|
||||
/**
|
||||
* 出库数量
|
||||
*/
|
||||
@ApiModelProperty("出库数量")
|
||||
@Excel(name = "出库数量")
|
||||
private Double outboundQuantity;
|
||||
|
||||
/**
|
||||
* 总净重(KG)
|
||||
*/
|
||||
@ApiModelProperty("总净重(KG)")
|
||||
@Excel(name = "总净重(KG)")
|
||||
private Double totalNetWeight;
|
||||
|
||||
/**
|
||||
* 总毛重(KG)
|
||||
*/
|
||||
@ApiModelProperty("总毛重(KG)")
|
||||
@Excel(name = "总毛重(KG)")
|
||||
private Double totalGrossWeight;
|
||||
|
||||
/**
|
||||
* 总体积(CBM)
|
||||
*/
|
||||
@ApiModelProperty("总体积(CBM)")
|
||||
@Excel(name = "总体积(CBM)")
|
||||
private Double totalVolume;
|
||||
|
||||
/**
|
||||
* 总面积(SQM)
|
||||
*/
|
||||
@ApiModelProperty("总面积(SQM)")
|
||||
@Excel(name = "总面积(SQM)")
|
||||
private Double totalArea;
|
||||
/**
|
||||
* 总价
|
||||
*/
|
||||
@ApiModelProperty("总价")
|
||||
@Excel(name = "总价")
|
||||
private Double totalAmount;
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
@ApiModelProperty("单位")
|
||||
@Excel(name = "单位")
|
||||
private String unit;
|
||||
|
||||
|
||||
@ApiModelProperty("SKU码")
|
||||
private String skuCode;
|
||||
|
||||
@ApiModelProperty("单价")
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
@ApiModelProperty("原产国")
|
||||
private String originCountry;
|
||||
|
||||
@ApiModelProperty("HS码")
|
||||
private String hsCode;
|
||||
|
||||
@ApiModelProperty("申报单位")
|
||||
private String declarationUnit;
|
||||
|
||||
@ApiModelProperty("法定单位")
|
||||
private String statutoryUnit;
|
||||
|
||||
@ApiModelProperty("法定第二单位")
|
||||
private String statutorySecondUnit;
|
||||
|
||||
@ApiModelProperty("商品规则")
|
||||
private MaterialGoodsRuleFeign materialGoodsRule;
|
||||
|
||||
@ApiModelProperty("公共信息")
|
||||
private MaterialCommonFeign materialCommon;
|
||||
|
||||
@ApiModelProperty("仓库控制信息")
|
||||
private MaterialWarehouseControlFeign materialWarehouseControl;
|
||||
|
||||
@ApiModelProperty("库存预警信息")
|
||||
private List<MaterialInventoryWarningFeign> materialInventoryWarningList;
|
||||
|
||||
@ApiModelProperty("条码信息")
|
||||
private List<MaterialBarCodeFeign> materialBarCodeList;
|
||||
|
||||
}
|
||||
+179
-1
@@ -203,4 +203,182 @@ public class MaterialBaseInfoDO extends BaseVOEntity{
|
||||
@ApiModelProperty("整机编码")
|
||||
@Excel(name = "整机编号")
|
||||
private String machineCode;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
@ApiModelProperty("商品名称")
|
||||
@Excel(name = "商品名称")
|
||||
private String commodityName;
|
||||
/**
|
||||
* 商品编码
|
||||
*/
|
||||
@ApiModelProperty("商品编码")
|
||||
@Excel(name = "商品编码")
|
||||
private String commodityNo;
|
||||
/**
|
||||
* 料号
|
||||
*/
|
||||
@ApiModelProperty("料号")
|
||||
@Excel(name = "料号")
|
||||
private String materialNo;
|
||||
/**
|
||||
* 规格型号
|
||||
*/
|
||||
@ApiModelProperty("规格型号")
|
||||
@Excel(name = "规格型号")
|
||||
private String specificationModel;
|
||||
/**
|
||||
* Invoice No
|
||||
*/
|
||||
@ApiModelProperty("Invoice No")
|
||||
@Excel(name = "Invoice No")
|
||||
private String invoiceNo;
|
||||
/**
|
||||
* 升
|
||||
*/
|
||||
@ApiModelProperty("升")
|
||||
@Excel(name = "升")
|
||||
private String liter;
|
||||
|
||||
/**
|
||||
* 尺寸
|
||||
*/
|
||||
@ApiModelProperty("尺寸")
|
||||
@Excel(name = "尺寸")
|
||||
private String size;
|
||||
|
||||
/**
|
||||
* 申报单位
|
||||
*/
|
||||
@ApiModelProperty("申报单位")
|
||||
@Excel(name = "申报单位")
|
||||
private String declareUnit;
|
||||
|
||||
/**
|
||||
* Batch Ref NO’s
|
||||
*/
|
||||
@ApiModelProperty("Batch Ref NO’s")
|
||||
@Excel(name = "Batch Ref NO’s")
|
||||
private String batchRefNo;
|
||||
|
||||
/**
|
||||
* Sheet Ref NO’s
|
||||
*/
|
||||
@ApiModelProperty("Sheet Ref NO’s")
|
||||
@Excel(name = "Sheet Ref NO’s")
|
||||
private String sheetRefNo;
|
||||
|
||||
/**
|
||||
* 原产国
|
||||
*/
|
||||
@ApiModelProperty("原产国")
|
||||
@Excel(name = "原产国")
|
||||
private String countryOfOrigin;
|
||||
|
||||
/**
|
||||
* 箱号/卡板号
|
||||
*/
|
||||
@ApiModelProperty("箱号/卡板号")
|
||||
@Excel(name = "箱号/卡板号")
|
||||
private String casePalletNo;
|
||||
|
||||
/**
|
||||
* 币制
|
||||
*/
|
||||
@ApiModelProperty("币制")
|
||||
@Excel(name = "币制")
|
||||
private String currency;
|
||||
|
||||
/**
|
||||
* 申报数量
|
||||
*/
|
||||
@ApiModelProperty("申报数量")
|
||||
@Excel(name = "申报数量")
|
||||
private Double declareQuantity;
|
||||
|
||||
/**
|
||||
* 箱数
|
||||
*/
|
||||
@ApiModelProperty("箱数")
|
||||
@Excel(name = "箱数")
|
||||
private Double caseCount;
|
||||
|
||||
/**
|
||||
* 件数
|
||||
*/
|
||||
@ApiModelProperty("件数")
|
||||
@Excel(name = "件数")
|
||||
private Double pieceCount;
|
||||
|
||||
/**
|
||||
* 出库数量
|
||||
*/
|
||||
@ApiModelProperty("出库数量")
|
||||
@Excel(name = "出库数量")
|
||||
private Double outboundQuantity;
|
||||
|
||||
/**
|
||||
* 总净重(KG)
|
||||
*/
|
||||
@ApiModelProperty("总净重(KG)")
|
||||
@Excel(name = "总净重(KG)")
|
||||
private Double totalNetWeight;
|
||||
|
||||
/**
|
||||
* 总毛重(KG)
|
||||
*/
|
||||
@ApiModelProperty("总毛重(KG)")
|
||||
@Excel(name = "总毛重(KG)")
|
||||
private Double totalGrossWeight;
|
||||
|
||||
/**
|
||||
* 总体积(CBM)
|
||||
*/
|
||||
@ApiModelProperty("总体积(CBM)")
|
||||
@Excel(name = "总体积(CBM)")
|
||||
private Double totalVolume;
|
||||
|
||||
/**
|
||||
* 总面积(SQM)
|
||||
*/
|
||||
@ApiModelProperty("总面积(SQM)")
|
||||
@Excel(name = "总面积(SQM)")
|
||||
private Double totalArea;
|
||||
/**
|
||||
* 总价
|
||||
*/
|
||||
@ApiModelProperty("总价")
|
||||
@Excel(name = "总价")
|
||||
private Double totalAmount;
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
@ApiModelProperty("单位")
|
||||
@Excel(name = "单位")
|
||||
private String unit;
|
||||
|
||||
|
||||
@ApiModelProperty("SKU码")
|
||||
private String skuCode;
|
||||
|
||||
@ApiModelProperty("单价")
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
@ApiModelProperty("原产国")
|
||||
private String originCountry;
|
||||
|
||||
@ApiModelProperty("HS码")
|
||||
private String hsCode;
|
||||
|
||||
@ApiModelProperty("申报单位")
|
||||
private String declarationUnit;
|
||||
|
||||
@ApiModelProperty("法定单位")
|
||||
private String statutoryUnit;
|
||||
|
||||
@ApiModelProperty("法定第二单位")
|
||||
private String statutorySecondUnit;
|
||||
}
|
||||
+4
@@ -68,6 +68,10 @@ public class PackPO extends BaseVOEntity{
|
||||
@Excel(name = "是否作废: 1-否 2-是")
|
||||
private Integer nullify;
|
||||
|
||||
@ApiModelProperty("包装单位(取第一条包装详情的单位名称)")
|
||||
@Excel(name = "包装单位")
|
||||
private String unitName;
|
||||
|
||||
@ApiModelProperty("包装明细")
|
||||
private List<PackDetailPO> packDetailList;
|
||||
|
||||
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
package com.mhd.basic.domain.shipperLeaseDetails.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 货主租赁明细
|
||||
*
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class ShipperLeaseDetails extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("仓库ID")
|
||||
private Long warehouseId;
|
||||
|
||||
@ApiModelProperty("仓库名字")
|
||||
private String warehouseName;
|
||||
|
||||
@ApiModelProperty("货主id")
|
||||
private Long shipperId;
|
||||
|
||||
@ApiModelProperty("货主名称")
|
||||
private String cargoOwnerName;
|
||||
|
||||
@ApiModelProperty(value = "租赁方式(整租/散租)")
|
||||
private String leaseType;
|
||||
|
||||
@ApiModelProperty("租赁面积(m²)")
|
||||
private BigDecimal leaseArea;
|
||||
|
||||
@ApiModelProperty("业务日期")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date businessDate;
|
||||
|
||||
|
||||
|
||||
}
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
package com.mhd.basic.domain.shipperLeaseDetails.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 仓库出租率返回类 没有表
|
||||
*
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class WarehouseOccupancyRate extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("仓库ID")
|
||||
private Long warehouseId;
|
||||
|
||||
@ApiModelProperty("仓库名字")
|
||||
private String warehouseName;
|
||||
|
||||
@ApiModelProperty("业务日期")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date businessDate;
|
||||
|
||||
@ApiModelProperty("整租面积(m²)")
|
||||
private BigDecimal entireLeaseArea;
|
||||
|
||||
@ApiModelProperty("散租面积(m²)")
|
||||
private BigDecimal fractionalLeaseArea;
|
||||
|
||||
@ApiModelProperty("总面积(m²)")
|
||||
private BigDecimal totalArea;
|
||||
|
||||
@ApiModelProperty("日租率(%)")
|
||||
private BigDecimal dailyRentalRate;
|
||||
|
||||
}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
package com.mhd.basic.domain.shipperLeaseDetails.repository.facade;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.mhd.basic.domain.shipperLeaseDetails.entity.ShipperLeaseDetails;
|
||||
import com.mhd.basic.domain.shipperLeaseDetails.repository.po.ShipperLeaseDetailsPO;
|
||||
import com.mhd.basic.domain.shipperLeaseDetails.repository.todo.ShipperLeaseDetailsDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 货主租赁明细Service接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-07
|
||||
*/
|
||||
public interface IShipperLeaseDetailsService extends IService<ShipperLeaseDetails>
|
||||
{
|
||||
/**
|
||||
* 分页查询货主租赁明细列表
|
||||
*/
|
||||
public List<ShipperLeaseDetailsPO> queryList(ShipperLeaseDetailsDO shipperLeaseDetailsDO);
|
||||
|
||||
/**
|
||||
* 新增货主租赁明细
|
||||
*/
|
||||
public Boolean insert(ShipperLeaseDetailsDO shipperLeaseDetailsDO);
|
||||
|
||||
/**
|
||||
* 修改货主租赁明细
|
||||
*/
|
||||
public Boolean update(ShipperLeaseDetailsDO shipperLeaseDetailsDO);
|
||||
|
||||
/**
|
||||
* 批量删除货主租赁明细
|
||||
*/
|
||||
public Boolean delete(Long[] leaseIds);
|
||||
|
||||
|
||||
/**
|
||||
* 查询货主租赁明细
|
||||
*/
|
||||
public ShipperLeaseDetailsPO getInfo(Long leaseId);
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package com.mhd.basic.domain.shipperLeaseDetails.repository.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mhd.basic.domain.shipperLeaseDetails.entity.ShipperLeaseDetails;
|
||||
import com.mhd.basic.domain.shipperLeaseDetails.repository.po.ShipperLeaseDetailsPO;
|
||||
import com.mhd.basic.domain.shipperLeaseDetails.repository.todo.ShipperLeaseDetailsDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 货主租赁明细Mapper接口
|
||||
*
|
||||
*/
|
||||
public interface ShipperLeaseDetailsMapper extends BaseMapper<ShipperLeaseDetails>
|
||||
{
|
||||
/**
|
||||
* 查询货主租赁明细列表
|
||||
*/
|
||||
public List<ShipperLeaseDetailsPO> queryList(ShipperLeaseDetailsDO shipperLeaseDetailsDO);
|
||||
|
||||
}
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
package com.mhd.basic.domain.shipperLeaseDetails.repository.persistence;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mhd.basic.domain.shipperLeaseDetails.entity.ShipperLeaseDetails;
|
||||
import com.mhd.basic.domain.shipperLeaseDetails.repository.facade.IShipperLeaseDetailsService;
|
||||
import com.mhd.basic.domain.shipperLeaseDetails.repository.mapper.ShipperLeaseDetailsMapper;
|
||||
import com.mhd.basic.domain.shipperLeaseDetails.repository.po.ShipperLeaseDetailsPO;
|
||||
import com.mhd.basic.domain.shipperLeaseDetails.repository.todo.ShipperLeaseDetailsDO;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 货主租赁明细Service业务层处理
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-07
|
||||
*/
|
||||
@Service
|
||||
public class ShipperLeaseDetailsImpl extends ServiceImpl<ShipperLeaseDetailsMapper, ShipperLeaseDetails> implements IShipperLeaseDetailsService {
|
||||
@Autowired
|
||||
private ShipperLeaseDetailsMapper shipperLeaseDetailsMapper;
|
||||
|
||||
/**
|
||||
* 查询货主租赁明细列表
|
||||
*/
|
||||
@Override
|
||||
public List<ShipperLeaseDetailsPO> queryList(ShipperLeaseDetailsDO shipperLeaseDetailsDO)
|
||||
{
|
||||
return shipperLeaseDetailsMapper.queryList(shipperLeaseDetailsDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增货主租赁明细
|
||||
*/
|
||||
@Override
|
||||
public Boolean insert(ShipperLeaseDetailsDO shipperLeaseDetailsDO) {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
ShipperLeaseDetails shipperLeaseDetails = new ShipperLeaseDetails();
|
||||
BeanUtils.copyProperties(shipperLeaseDetailsDO,shipperLeaseDetails);
|
||||
return this.save(shipperLeaseDetails);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改货主租赁明细
|
||||
*/
|
||||
@Override
|
||||
public Boolean update(ShipperLeaseDetailsDO shipperLeaseDetailsDO) {
|
||||
ShipperLeaseDetails shipperLeaseDetails = new ShipperLeaseDetails();
|
||||
BeanUtils.copyProperties(shipperLeaseDetailsDO,shipperLeaseDetails);
|
||||
return this.updateById(shipperLeaseDetails);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除货主租赁明细
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean delete(Long[] leaseIds ) {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
List<ShipperLeaseDetails> list = new ArrayList<>();
|
||||
for (Long id : leaseIds) {
|
||||
ShipperLeaseDetails shipperLeaseDetails = new ShipperLeaseDetails();
|
||||
shipperLeaseDetails.setId(id);
|
||||
shipperLeaseDetails.setDelFlag(2);
|
||||
shipperLeaseDetails.setUpdateBy(loginUser.getUserid());
|
||||
shipperLeaseDetails.setUpdateByName(loginUser.getUsername());
|
||||
shipperLeaseDetails.setUpdateTime(new Date());
|
||||
list.add(shipperLeaseDetails);
|
||||
}
|
||||
return this.updateBatchById(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改货主租赁明细
|
||||
*/
|
||||
@Override
|
||||
public ShipperLeaseDetailsPO getInfo(Long ShipperLeaseDetailsId) {
|
||||
ShipperLeaseDetails shipperLeaseDetails = this.getById(ShipperLeaseDetailsId);
|
||||
ShipperLeaseDetailsPO shipperLeaseDetailsPO = new ShipperLeaseDetailsPO();
|
||||
BeanUtils.copyProperties(shipperLeaseDetails,shipperLeaseDetailsPO);
|
||||
return shipperLeaseDetailsPO;
|
||||
}
|
||||
|
||||
// /**
|
||||
// * @description 校验唯一
|
||||
// * @author ZhouGY
|
||||
// * @date 2024/5/9 21:10
|
||||
// * @param containerDO
|
||||
// */
|
||||
// private void verifyUniqueness(ContainerDO containerDO){
|
||||
// LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
// Long topOrganizationId = loginUser.getUserPo().getTopOrganizationId();
|
||||
// if (topOrganizationId == null || topOrganizationId == 0 ){
|
||||
// throw new ServiceException("获取当前登陆人组织失败!");
|
||||
// }
|
||||
// int count = leaseMapper.selectCount(new QueryWrapper<Container>().lambda()
|
||||
// .eq(Container::getTopOrganizationId, topOrganizationId)
|
||||
// .eq(Container::getContainerCode,containerDO.getContainerCode())
|
||||
// .eq(Container::getOrganizationId, containerDO.getOrganizationId())
|
||||
// .ne(containerDO.getContainerId() != null, Container::getContainerId, containerDO.getContainerId() )
|
||||
// .eq(Container::getDelFlag,1));
|
||||
// if (count > 0){
|
||||
// throw new ServiceException("容器编码【" + containerDO.getContainerCode() + "】已存在");
|
||||
// }
|
||||
// }
|
||||
}
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
package com.mhd.basic.domain.shipperLeaseDetails.repository.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 货主租赁明细
|
||||
*
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class ShipperLeaseDetailsPO extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("仓库ID")
|
||||
private Long warehouseId;
|
||||
|
||||
@ApiModelProperty("仓库名字")
|
||||
private String warehouseName;
|
||||
|
||||
@ApiModelProperty("货主id")
|
||||
private Long shipperId;
|
||||
|
||||
@ApiModelProperty("货主名称")
|
||||
private String cargoOwnerName;
|
||||
|
||||
@ApiModelProperty(value = "租赁方式(整租/散租)")
|
||||
private String leaseType;
|
||||
|
||||
@ApiModelProperty("租赁面积(m²)")
|
||||
private BigDecimal leaseArea;
|
||||
|
||||
@ApiModelProperty("业务日期")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date businessDate;
|
||||
|
||||
|
||||
|
||||
}
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
package com.mhd.basic.domain.shipperLeaseDetails.repository.todo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 货主租赁明细
|
||||
*
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class ShipperLeaseDetailsDO extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("仓库ID")
|
||||
private Long warehouseId;
|
||||
|
||||
@ApiModelProperty("仓库名字")
|
||||
private String warehouseName;
|
||||
|
||||
@ApiModelProperty("货主id")
|
||||
private Long shipperId;
|
||||
|
||||
@ApiModelProperty("货主名称")
|
||||
private String cargoOwnerName;
|
||||
|
||||
@ApiModelProperty(value = "租赁方式(整租/散租)")
|
||||
private String leaseType;
|
||||
|
||||
@ApiModelProperty("租赁面积(m²)")
|
||||
private BigDecimal leaseArea;
|
||||
|
||||
@ApiModelProperty("业务日期")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date businessDate;
|
||||
|
||||
@ApiModelProperty("业务日期开始时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date businessDateStart;
|
||||
|
||||
@ApiModelProperty("业务日期结束时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date businessDateEnd;
|
||||
|
||||
}
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
package com.mhd.basic.domain.shipperLeaseDetails.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.mhd.basic.domain.lease.entity.Lease;
|
||||
import com.mhd.basic.domain.lease.repository.facade.ILeaseService;
|
||||
import com.mhd.basic.domain.lease.repository.po.LeasePO;
|
||||
import com.mhd.basic.domain.lease.repository.todo.LeaseDO;
|
||||
import com.mhd.basic.domain.shipperLeaseDetails.entity.ShipperLeaseDetails;
|
||||
import com.mhd.basic.domain.shipperLeaseDetails.repository.facade.IShipperLeaseDetailsService;
|
||||
import com.mhd.basic.domain.shipperLeaseDetails.repository.po.ShipperLeaseDetailsPO;
|
||||
import com.mhd.basic.domain.shipperLeaseDetails.repository.todo.ShipperLeaseDetailsDO;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 租赁管理
|
||||
*
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class ShipperLeaseDetailsDomainService {
|
||||
|
||||
@Autowired
|
||||
private IShipperLeaseDetailsService shipperLeaseDetailsService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询租赁管理列表
|
||||
*/
|
||||
public List<ShipperLeaseDetailsPO> queryList(ShipperLeaseDetailsDO shipperLeaseDetailsDO) {
|
||||
return shipperLeaseDetailsService.queryList(shipperLeaseDetailsDO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增租赁管理
|
||||
*/
|
||||
public Boolean insert(ShipperLeaseDetailsDO shipperLeaseDetailsDO) {
|
||||
|
||||
return shipperLeaseDetailsService.insert(shipperLeaseDetailsDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改租赁管理
|
||||
*/
|
||||
public Boolean update(ShipperLeaseDetailsDO shipperLeaseDetailsDO) {
|
||||
return shipperLeaseDetailsService.update(shipperLeaseDetailsDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除租赁管理
|
||||
*/
|
||||
public Boolean delete(Long[] shipperLeaseDetailsIds) {
|
||||
return shipperLeaseDetailsService.delete(shipperLeaseDetailsIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取租赁管理详细信息
|
||||
*/
|
||||
public ShipperLeaseDetailsPO getInfo(Long shipperLeaseDetailsId)
|
||||
{
|
||||
return shipperLeaseDetailsService.getInfo(shipperLeaseDetailsId);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description 批量作废租赁
|
||||
* @author ZhouGY
|
||||
* @date 2024/5/13 9:46
|
||||
* @param leaseIds
|
||||
* @return Boolean
|
||||
*/
|
||||
public Boolean nullifyByIds(List<Long> leaseIds) {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
return shipperLeaseDetailsService.update(new UpdateWrapper<ShipperLeaseDetails>().lambda()
|
||||
.set(ShipperLeaseDetails::getUpdateBy, loginUser.getUserid())
|
||||
.set(ShipperLeaseDetails::getUpdateTime, new Date())
|
||||
.in(ShipperLeaseDetails::getId, leaseIds)
|
||||
.eq(ShipperLeaseDetails::getDelFlag, 1));
|
||||
}
|
||||
}
|
||||
+116
@@ -0,0 +1,116 @@
|
||||
package com.mhd.basic.interfaces.assember.lease;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.mhd.basic.domain.container.repository.todo.ContainerDO;
|
||||
import com.mhd.basic.domain.lease.repository.todo.LeaseDO;
|
||||
import com.mhd.basic.interfaces.dto.container.ContainerDTO;
|
||||
import com.mhd.basic.interfaces.dto.lease.LeaseDTO;
|
||||
import com.mhd.common.core.exception.ServiceException;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.DigitalLogisticsException;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.UserError;
|
||||
import com.mhd.common.core.utils.IgnoreNullUtil;
|
||||
import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.SystemServiceFeign;
|
||||
import com.mhd.system.api.domain.WarehouseFeignPO;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 容器管理Assembler
|
||||
*
|
||||
*/
|
||||
@Component
|
||||
public class LeaseAssembler {
|
||||
|
||||
@Autowired
|
||||
private SystemServiceFeign systemServiceFeign;
|
||||
|
||||
/**
|
||||
* 转换实体
|
||||
*/
|
||||
public LeaseDO toDO(LeaseDTO leaseDTO) {
|
||||
LeaseDO leaseDO = new LeaseDO();
|
||||
// 拷贝
|
||||
BeanUtils.copyProperties(leaseDTO, leaseDO, IgnoreNullUtil.getNullPropertyNames(leaseDTO));
|
||||
// 确保查询条件字段被正确传递(查询条件字段需要明确传递,避免被IgnoreNullUtil忽略)
|
||||
leaseDO.setCreateTimeStart(leaseDTO.getCreateTimeStart());
|
||||
leaseDO.setCreateTimeEnd(leaseDTO.getCreateTimeEnd());
|
||||
leaseDO.setUpdateTimeStart(leaseDTO.getUpdateTimeStart());
|
||||
leaseDO.setUpdateTimeEnd(leaseDTO.getUpdateTimeEnd());
|
||||
return leaseDO;
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换实体
|
||||
*/
|
||||
public LeaseDO toDOByEdit(LeaseDTO leaseDTO) {
|
||||
LeaseDO leaseDO = new LeaseDO();
|
||||
// 拷贝
|
||||
BeanUtils.copyProperties(leaseDTO, leaseDO, IgnoreNullUtil.getNullPropertyNames(leaseDTO));
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (ObjectUtil.isNull(loginUser)) {
|
||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||
}
|
||||
if(leaseDTO.getId() != null){
|
||||
leaseDO.setUpdateBy(loginUser.getUserid());
|
||||
leaseDO.setUpdateByName(loginUser.getUsername());
|
||||
leaseDO.setUpdateTime(new Date());
|
||||
}else {
|
||||
leaseDO.setOrganizationId(loginUser.getUserPo().getOrganizationId());
|
||||
leaseDO.setOrganizationName(loginUser.getUserPo().getOrganizationName());
|
||||
leaseDO.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
|
||||
leaseDO.setCreateBy(loginUser.getUserid());
|
||||
leaseDO.setCreateByName(loginUser.getUsername());
|
||||
leaseDO.setCreateTime(new Date());
|
||||
// 新增时根据仓库ID查询仓库名字
|
||||
if (leaseDO.getWarehouseId() != null) {
|
||||
setWarehouseInfo(leaseDO);
|
||||
}
|
||||
}
|
||||
return leaseDO;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置仓库信息
|
||||
*/
|
||||
private void setWarehouseInfo(LeaseDO leaseDO) {
|
||||
if (leaseDO.getWarehouseId() == null) {
|
||||
return;
|
||||
}
|
||||
AjaxResult ajaxResult = systemServiceFeign.getWarehouseInfoByWarehouseId(leaseDO.getWarehouseId());
|
||||
if (ajaxResult == null) {
|
||||
throw new ServiceException("获取仓库信息失败:返回结果为空,仓库ID:" + leaseDO.getWarehouseId());
|
||||
}
|
||||
Object codeObj = ajaxResult.get("code");
|
||||
if (codeObj == null || !"200".equals(String.valueOf(codeObj))) {
|
||||
String errorMsg = ajaxResult.get("msg") != null ? String.valueOf(ajaxResult.get("msg")) : "未知错误";
|
||||
throw new ServiceException("获取仓库信息失败,仓库ID:" + leaseDO.getWarehouseId() + ",错误信息:" + errorMsg);
|
||||
}
|
||||
Object dataObj = ajaxResult.get("data");
|
||||
if (dataObj == null) {
|
||||
throw new ServiceException("获取仓库信息失败:返回数据为空,仓库ID:" + leaseDO.getWarehouseId());
|
||||
}
|
||||
String dataJsonString = JSONObject.toJSONString(dataObj);
|
||||
if (dataJsonString == null || dataJsonString.isEmpty() || "null".equals(dataJsonString)) {
|
||||
throw new ServiceException("获取仓库信息失败:返回数据为空或格式不正确,仓库ID:" + leaseDO.getWarehouseId());
|
||||
}
|
||||
WarehouseFeignPO warehouseFeignPO;
|
||||
try {
|
||||
warehouseFeignPO = JSON.parseObject(dataJsonString, WarehouseFeignPO.class);
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException("获取仓库信息失败:数据解析异常,仓库ID:" + leaseDO.getWarehouseId() + ",错误信息:" + e.getMessage());
|
||||
}
|
||||
if (warehouseFeignPO == null) {
|
||||
throw new ServiceException("获取仓库信息失败:数据解析失败,仓库ID:" + leaseDO.getWarehouseId());
|
||||
}
|
||||
leaseDO.setWarehouseName(warehouseFeignPO.getWarehouseName());
|
||||
}
|
||||
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.mhd.basic.interfaces.assember.shipperLeaseDetails;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.mhd.basic.domain.lease.repository.todo.LeaseDO;
|
||||
import com.mhd.basic.domain.shipperLeaseDetails.repository.todo.ShipperLeaseDetailsDO;
|
||||
import com.mhd.basic.interfaces.dto.lease.LeaseDTO;
|
||||
import com.mhd.basic.interfaces.dto.shipperLeaseDetailsApi.ShipperLeaseDetailsDTO;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.DigitalLogisticsException;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.UserError;
|
||||
import com.mhd.common.core.utils.IgnoreNullUtil;
|
||||
import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 货主租赁明细Assembler
|
||||
*
|
||||
*/
|
||||
@Component
|
||||
public class ShipperLeaseDetailsAssembler {
|
||||
|
||||
/**
|
||||
* 转换实体
|
||||
*/
|
||||
public ShipperLeaseDetailsDO toDO(ShipperLeaseDetailsDTO shipperLeaseDetailsDTO) {
|
||||
ShipperLeaseDetailsDO shipperLeaseDetailsDO = new ShipperLeaseDetailsDO();
|
||||
// 拷贝
|
||||
BeanUtils.copyProperties(shipperLeaseDetailsDTO, shipperLeaseDetailsDO, IgnoreNullUtil.getNullPropertyNames(shipperLeaseDetailsDTO));
|
||||
return shipperLeaseDetailsDO;
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换实体
|
||||
*/
|
||||
public ShipperLeaseDetailsDO toDOByEdit(ShipperLeaseDetailsDTO shipperLeaseDetailsDTO) {
|
||||
ShipperLeaseDetailsDO shipperLeaseDetailsDO = new ShipperLeaseDetailsDO();
|
||||
// 拷贝
|
||||
BeanUtils.copyProperties(shipperLeaseDetailsDTO, shipperLeaseDetailsDO, IgnoreNullUtil.getNullPropertyNames(shipperLeaseDetailsDTO));
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (ObjectUtil.isNull(loginUser)) {
|
||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||
}
|
||||
if(shipperLeaseDetailsDTO.getId() != null){
|
||||
shipperLeaseDetailsDO.setUpdateBy(loginUser.getUserid());
|
||||
shipperLeaseDetailsDO.setUpdateByName(loginUser.getUsername());
|
||||
shipperLeaseDetailsDO.setUpdateTime(new Date());
|
||||
}else {
|
||||
shipperLeaseDetailsDO.setOrganizationId(loginUser.getUserPo().getOrganizationId());
|
||||
shipperLeaseDetailsDO.setOrganizationName(loginUser.getUserPo().getOrganizationName());
|
||||
shipperLeaseDetailsDO.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
|
||||
shipperLeaseDetailsDO.setCreateBy(loginUser.getUserid());
|
||||
shipperLeaseDetailsDO.setCreateByName(loginUser.getUsername());
|
||||
shipperLeaseDetailsDO.setCreateTime(new Date());
|
||||
}
|
||||
return shipperLeaseDetailsDO;
|
||||
}
|
||||
|
||||
}
|
||||
+8
@@ -44,6 +44,10 @@ public class BatchDetailDTO extends BaseVOEntity{
|
||||
@Excel(name = "批次标签")
|
||||
private String batchLabels;
|
||||
|
||||
@ApiModelProperty("字段名称")
|
||||
@Excel(name = "字段名称")
|
||||
private String fieldName;
|
||||
|
||||
@ApiModelProperty("输入控制: 1-必填 2-可选")
|
||||
@Excel(name = "输入控制: 1-必填 2-可选")
|
||||
private String inputControl;
|
||||
@@ -56,6 +60,10 @@ public class BatchDetailDTO extends BaseVOEntity{
|
||||
@Excel(name = "属性选项")
|
||||
private String attributeOption;
|
||||
|
||||
@ApiModelProperty("是否显示: 0-不显示 1-显示")
|
||||
@Excel(name = "是否显示: 0-不显示 1-显示")
|
||||
private Integer isDisplay;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
package com.mhd.basic.interfaces.dto.lease;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 租赁管理对象 container
|
||||
*
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class LeaseDTO extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("id")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("仓库ID")
|
||||
private Long warehouseId;
|
||||
|
||||
@ApiModelProperty("仓库名字")
|
||||
private String warehouseName;
|
||||
|
||||
@ApiModelProperty("货主id")
|
||||
private Long shipperId;
|
||||
|
||||
@ApiModelProperty("货主名称")
|
||||
private String cargoOwnerName;
|
||||
|
||||
@ApiModelProperty(value = "租赁方式(整租/散租)")
|
||||
private String leaseType;
|
||||
|
||||
@ApiModelProperty("租赁面积(m²)")
|
||||
private BigDecimal leaseArea;
|
||||
|
||||
@ApiModelProperty("开始日期")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date startDate;
|
||||
|
||||
@ApiModelProperty("结束日期")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date endDate;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty(name = "创建时间查询条件开始日期")
|
||||
private String createTimeStart;
|
||||
|
||||
@ApiModelProperty(name = "创建时间查询条件结束日期")
|
||||
private String createTimeEnd;
|
||||
|
||||
@ApiModelProperty(name = "修改时间查询条件开始日期")
|
||||
private String updateTimeStart;
|
||||
|
||||
@ApiModelProperty(name = "修改时间查询条件结束日期")
|
||||
private String updateTimeEnd;
|
||||
}
|
||||
+180
-1
@@ -181,4 +181,183 @@ public class MaterialBaseInfoDTO extends BaseVOEntity{
|
||||
@ApiModelProperty("是否公用: 1-是 2-否")
|
||||
@Excel(name = "是否公用: 1-是 2-否")
|
||||
private Integer common;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
@ApiModelProperty("商品名称")
|
||||
@Excel(name = "商品名称")
|
||||
private String commodityName;
|
||||
/**
|
||||
* 商品编码
|
||||
*/
|
||||
@ApiModelProperty("商品编码")
|
||||
@Excel(name = "商品编码")
|
||||
private String commodityNo;
|
||||
/**
|
||||
* 料号
|
||||
*/
|
||||
@ApiModelProperty("料号")
|
||||
@Excel(name = "料号")
|
||||
private String materialNo;
|
||||
/**
|
||||
* 规格型号
|
||||
*/
|
||||
@ApiModelProperty("规格型号")
|
||||
@Excel(name = "规格型号")
|
||||
private String specificationModel;
|
||||
|
||||
/**
|
||||
* Invoice No
|
||||
*/
|
||||
@ApiModelProperty("Invoice No")
|
||||
@Excel(name = "Invoice No")
|
||||
private String invoiceNo;
|
||||
/**
|
||||
* 升
|
||||
*/
|
||||
@ApiModelProperty("升")
|
||||
@Excel(name = "升")
|
||||
private String liter;
|
||||
|
||||
/**
|
||||
* 尺寸
|
||||
*/
|
||||
@ApiModelProperty("尺寸")
|
||||
@Excel(name = "尺寸")
|
||||
private String size;
|
||||
|
||||
/**
|
||||
* 申报单位
|
||||
*/
|
||||
@ApiModelProperty("申报单位")
|
||||
@Excel(name = "申报单位")
|
||||
private String declareUnit;
|
||||
|
||||
/**
|
||||
* Batch Ref NO’s
|
||||
*/
|
||||
@ApiModelProperty("Batch Ref NO’s")
|
||||
@Excel(name = "Batch Ref NO’s")
|
||||
private String batchRefNo;
|
||||
|
||||
/**
|
||||
* Sheet Ref NO’s
|
||||
*/
|
||||
@ApiModelProperty("Sheet Ref NO’s")
|
||||
@Excel(name = "Sheet Ref NO’s")
|
||||
private String sheetRefNo;
|
||||
|
||||
/**
|
||||
* 原产国
|
||||
*/
|
||||
@ApiModelProperty("原产国")
|
||||
@Excel(name = "原产国")
|
||||
private String countryOfOrigin;
|
||||
|
||||
/**
|
||||
* 箱号/卡板号
|
||||
*/
|
||||
@ApiModelProperty("箱号/卡板号")
|
||||
@Excel(name = "箱号/卡板号")
|
||||
private String casePalletNo;
|
||||
|
||||
/**
|
||||
* 币制
|
||||
*/
|
||||
@ApiModelProperty("币制")
|
||||
@Excel(name = "币制")
|
||||
private String currency;
|
||||
|
||||
/**
|
||||
* 申报数量
|
||||
*/
|
||||
@ApiModelProperty("申报数量")
|
||||
@Excel(name = "申报数量")
|
||||
private Double declareQuantity;
|
||||
|
||||
/**
|
||||
* 箱数
|
||||
*/
|
||||
@ApiModelProperty("箱数")
|
||||
@Excel(name = "箱数")
|
||||
private Double caseCount;
|
||||
|
||||
/**
|
||||
* 件数
|
||||
*/
|
||||
@ApiModelProperty("件数")
|
||||
@Excel(name = "件数")
|
||||
private Double pieceCount;
|
||||
|
||||
/**
|
||||
* 出库数量
|
||||
*/
|
||||
@ApiModelProperty("出库数量")
|
||||
@Excel(name = "出库数量")
|
||||
private Double outboundQuantity;
|
||||
|
||||
/**
|
||||
* 总净重(KG)
|
||||
*/
|
||||
@ApiModelProperty("总净重(KG)")
|
||||
@Excel(name = "总净重(KG)")
|
||||
private Double totalNetWeight;
|
||||
|
||||
/**
|
||||
* 总毛重(KG)
|
||||
*/
|
||||
@ApiModelProperty("总毛重(KG)")
|
||||
@Excel(name = "总毛重(KG)")
|
||||
private Double totalGrossWeight;
|
||||
|
||||
/**
|
||||
* 总体积(CBM)
|
||||
*/
|
||||
@ApiModelProperty("总体积(CBM)")
|
||||
@Excel(name = "总体积(CBM)")
|
||||
private Double totalVolume;
|
||||
|
||||
/**
|
||||
* 总面积(SQM)
|
||||
*/
|
||||
@ApiModelProperty("总面积(SQM)")
|
||||
@Excel(name = "总面积(SQM)")
|
||||
private Double totalArea;
|
||||
/**
|
||||
* 总价
|
||||
*/
|
||||
@ApiModelProperty("总价")
|
||||
@Excel(name = "总价")
|
||||
private Double totalAmount;
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
@ApiModelProperty("单位")
|
||||
@Excel(name = "单位")
|
||||
private String unit;
|
||||
|
||||
|
||||
@ApiModelProperty("SKU码")
|
||||
private String skuCode;
|
||||
|
||||
@ApiModelProperty("单价")
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
@ApiModelProperty("原产国")
|
||||
private String originCountry;
|
||||
|
||||
@ApiModelProperty("HS码")
|
||||
private String hsCode;
|
||||
|
||||
@ApiModelProperty("申报单位")
|
||||
private String declarationUnit;
|
||||
|
||||
@ApiModelProperty("法定单位")
|
||||
private String statutoryUnit;
|
||||
|
||||
@ApiModelProperty("法定第二单位")
|
||||
private String statutorySecondUnit;
|
||||
}
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
package com.mhd.basic.interfaces.dto.shipperLeaseDetailsApi;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 货主租赁明细
|
||||
*
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class ShipperLeaseDetailsDTO extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("仓库ID")
|
||||
private Long warehouseId;
|
||||
|
||||
@ApiModelProperty("仓库名字")
|
||||
private String warehouseName;
|
||||
|
||||
@ApiModelProperty("货主id")
|
||||
private Long shipperId;
|
||||
|
||||
@ApiModelProperty("货主名称")
|
||||
private String cargoOwnerName;
|
||||
|
||||
@ApiModelProperty(value = "租赁方式(整租/散租)")
|
||||
private String leaseType;
|
||||
|
||||
@ApiModelProperty("租赁面积(m²)")
|
||||
private BigDecimal leaseArea;
|
||||
|
||||
@ApiModelProperty("业务日期")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date businessDate;
|
||||
|
||||
@ApiModelProperty("业务日期开始时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date businessDateStart;
|
||||
|
||||
@ApiModelProperty("业务日期结束时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date businessDateEnd;
|
||||
|
||||
|
||||
}
|
||||
+112
@@ -0,0 +1,112 @@
|
||||
package com.mhd.basic.interfaces.facadeApi.lease;
|
||||
|
||||
import com.mhd.basic.application.service.Lease.LeaseApplicationService;
|
||||
import com.mhd.basic.application.service.container.ContainerApplicationService;
|
||||
import com.mhd.basic.domain.container.repository.po.ContainerPO;
|
||||
import com.mhd.basic.domain.container.repository.todo.ContainerDO;
|
||||
import com.mhd.basic.domain.lease.repository.po.LeasePO;
|
||||
import com.mhd.basic.domain.lease.repository.todo.LeaseDO;
|
||||
import com.mhd.basic.domain.shipperLeaseDetails.entity.WarehouseOccupancyRate;
|
||||
import com.mhd.basic.interfaces.assember.container.ContainerAssembler;
|
||||
import com.mhd.basic.interfaces.assember.lease.LeaseAssembler;
|
||||
import com.mhd.basic.interfaces.dto.container.ContainerDTO;
|
||||
import com.mhd.basic.interfaces.dto.lease.LeaseDTO;
|
||||
import com.mhd.common.core.web.controller.BaseController;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.common.core.web.page.TableDataInfo;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 租赁管理Api
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/LeaseApi")
|
||||
public class LeaseApi extends BaseController{
|
||||
|
||||
@Autowired
|
||||
private LeaseApplicationService leaseApplicationService;
|
||||
|
||||
@Resource
|
||||
private LeaseAssembler leaseAssembler;
|
||||
|
||||
/**
|
||||
* 分页查询租赁管理列表
|
||||
*/
|
||||
@ApiOperation("查询租赁管理列表")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(LeaseDTO leaseDTO)
|
||||
{
|
||||
//转换实体
|
||||
LeaseDO leaseDO = leaseAssembler.toDO(leaseDTO);
|
||||
startPage();
|
||||
List<LeasePO> list = leaseApplicationService.queryList(leaseDO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询租赁管理列表
|
||||
*/
|
||||
@ApiOperation("查询租赁管理列表")
|
||||
@GetMapping("/listByApp")
|
||||
public AjaxResult listByApp(LeaseDTO leaseDTO)
|
||||
{
|
||||
//转换实体
|
||||
LeaseDO leaseDO = leaseAssembler.toDO(leaseDTO);
|
||||
List<LeasePO> list = leaseApplicationService.queryList(leaseDO);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑租赁管理
|
||||
*/
|
||||
@ApiOperation("编辑租赁管理")
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody LeaseDTO leaseDTO)
|
||||
{
|
||||
//转换实体
|
||||
LeaseDO leaseDO = leaseAssembler.toDOByEdit(leaseDTO);
|
||||
if(leaseDTO.getId() != null){
|
||||
return toAjax(leaseApplicationService.update(leaseDO));
|
||||
}else {
|
||||
return toAjax(leaseApplicationService.insert(leaseDO));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除租赁管理
|
||||
*/
|
||||
@ApiOperation("批量删除租赁管理")
|
||||
@DeleteMapping("/deleteByIds/{leaseIds}")
|
||||
public AjaxResult delete(@PathVariable Long[] leaseIds)
|
||||
{
|
||||
return toAjax(leaseApplicationService.delete(leaseIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取租赁管理详细信息
|
||||
*/
|
||||
@ApiOperation("获取租赁管理")
|
||||
@GetMapping(value = "/getInfo/{leaseId}")
|
||||
public AjaxResult getInfo(@PathVariable("leaseId") Long leaseId)
|
||||
{
|
||||
return AjaxResult.success(leaseApplicationService.getInfo(leaseId));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 批量作废租赁
|
||||
*/
|
||||
@ApiOperation("批量作废租赁")
|
||||
@GetMapping("/nullifyByIds/{leaseIds}")
|
||||
public AjaxResult nullifyByIds(@PathVariable("leaseIds") List<Long> leaseIds)
|
||||
{
|
||||
return toAjax(leaseApplicationService.nullifyByIds(leaseIds));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+161
@@ -0,0 +1,161 @@
|
||||
package com.mhd.basic.interfaces.facadeApi.shipperLeaseDetails;
|
||||
|
||||
import com.mhd.basic.application.service.Lease.LeaseApplicationService;
|
||||
import com.mhd.basic.application.service.shipperLeaseDetails.ShipperLeaseDetailsApplicationService;
|
||||
import com.mhd.basic.domain.lease.repository.po.LeasePO;
|
||||
import com.mhd.basic.domain.lease.repository.todo.LeaseDO;
|
||||
import com.mhd.basic.domain.shipperLeaseDetails.entity.ShipperLeaseDetails;
|
||||
import com.mhd.basic.domain.shipperLeaseDetails.entity.WarehouseOccupancyRate;
|
||||
import com.mhd.basic.domain.shipperLeaseDetails.repository.po.ShipperLeaseDetailsPO;
|
||||
import com.mhd.basic.domain.shipperLeaseDetails.repository.todo.ShipperLeaseDetailsDO;
|
||||
import com.mhd.basic.interfaces.assember.lease.LeaseAssembler;
|
||||
import com.mhd.basic.interfaces.assember.shipperLeaseDetails.ShipperLeaseDetailsAssembler;
|
||||
import com.mhd.basic.interfaces.dto.lease.LeaseDTO;
|
||||
import com.mhd.basic.interfaces.dto.shipperLeaseDetailsApi.ShipperLeaseDetailsDTO;
|
||||
import com.mhd.common.core.web.controller.BaseController;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.common.core.web.page.TableDataInfo;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 货主租赁明细Api
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/ShipperLeaseDetailsApi")
|
||||
public class ShipperLeaseDetailsApi extends BaseController{
|
||||
|
||||
@Autowired
|
||||
private LeaseApplicationService leaseApplicationService;
|
||||
|
||||
@Autowired
|
||||
private ShipperLeaseDetailsApplicationService shipperLeaseDetailsApplicationService;
|
||||
|
||||
@Resource
|
||||
private ShipperLeaseDetailsAssembler shipperLeaseDetailsAssembler;
|
||||
|
||||
/**
|
||||
* 分页查询货主租赁明细列表
|
||||
*/
|
||||
@ApiOperation("查询货主租赁明细列表")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ShipperLeaseDetailsDTO shipperLeaseDetailsDTO)
|
||||
{
|
||||
//转换实体
|
||||
ShipperLeaseDetailsDO shipperLeaseDetailsDO = shipperLeaseDetailsAssembler.toDO(shipperLeaseDetailsDTO);
|
||||
startPage();
|
||||
List<ShipperLeaseDetailsPO> list = shipperLeaseDetailsApplicationService.queryList(shipperLeaseDetailsDO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询货主租赁明细列表
|
||||
*/
|
||||
@ApiOperation("查询货主租赁明细列表")
|
||||
@GetMapping("/listByApp")
|
||||
public AjaxResult listByApp(ShipperLeaseDetailsDTO shipperLeaseDetailsDTO)
|
||||
{
|
||||
//转换实体
|
||||
ShipperLeaseDetailsDO shipperLeaseDetailsDO = shipperLeaseDetailsAssembler.toDO(shipperLeaseDetailsDTO);
|
||||
List<ShipperLeaseDetailsPO> list = shipperLeaseDetailsApplicationService.queryList(shipperLeaseDetailsDO);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑货主租赁明细
|
||||
*/
|
||||
@ApiOperation("编辑货主租赁明细")
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody ShipperLeaseDetailsDTO shipperLeaseDetailsDTO)
|
||||
{
|
||||
//转换实体
|
||||
ShipperLeaseDetailsDO shipperLeaseDetailsDO = shipperLeaseDetailsAssembler.toDOByEdit(shipperLeaseDetailsDTO);
|
||||
if(shipperLeaseDetailsDTO.getId() != null){
|
||||
return toAjax(shipperLeaseDetailsApplicationService.update(shipperLeaseDetailsDO));
|
||||
}else {
|
||||
return toAjax(shipperLeaseDetailsApplicationService.insert(shipperLeaseDetailsDO));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑货主租赁明细
|
||||
*/
|
||||
@ApiOperation("编辑货主租赁明细")
|
||||
@PostMapping("/editList")
|
||||
public AjaxResult edit(@RequestBody List<ShipperLeaseDetailsDTO> shipperLeaseDetailsDTO)
|
||||
{
|
||||
for (ShipperLeaseDetailsDTO leaseDetailsDTO : shipperLeaseDetailsDTO) {
|
||||
//转换实体
|
||||
ShipperLeaseDetailsDO shipperLeaseDetailsDO = shipperLeaseDetailsAssembler.toDOByEdit(leaseDetailsDTO);
|
||||
shipperLeaseDetailsApplicationService.update(shipperLeaseDetailsDO);
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除货主租赁明细
|
||||
*/
|
||||
@ApiOperation("批量删除货主租赁明细")
|
||||
@DeleteMapping("/deleteByIds/{shipperLeaseDetailsIds}")
|
||||
public AjaxResult delete(@PathVariable Long[] shipperLeaseDetailsIds)
|
||||
{
|
||||
return toAjax(shipperLeaseDetailsApplicationService.delete(shipperLeaseDetailsIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取货主租赁明细详细信息
|
||||
*/
|
||||
@ApiOperation("获取货主租赁明细")
|
||||
@GetMapping(value = "/getInfo/{shipperLeaseDetailsId}")
|
||||
public AjaxResult getInfo(@PathVariable("shipperLeaseDetailsId") Long shipperLeaseDetailsId)
|
||||
{
|
||||
return AjaxResult.success(shipperLeaseDetailsApplicationService.getInfo(shipperLeaseDetailsId));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 批量作废租赁
|
||||
*/
|
||||
@ApiOperation("批量作废租赁")
|
||||
@GetMapping("/nullifyByIds/{shipperLeaseDetailsIds}")
|
||||
public AjaxResult nullifyByIds(@PathVariable("shipperLeaseDetailsIds") List<Long> shipperLeaseDetailsIds)
|
||||
{
|
||||
return toAjax(shipperLeaseDetailsApplicationService.nullifyByIds(shipperLeaseDetailsIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算货主租赁明细
|
||||
*/
|
||||
@ApiOperation("货主租赁明细")
|
||||
@PostMapping("/shipperLeaseDetails")
|
||||
public AjaxResult shipperLeaseDetails()
|
||||
{
|
||||
leaseApplicationService.shipperLeaseDetails();
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算仓库出租率
|
||||
* warehouseId 仓库id
|
||||
*/
|
||||
@ApiOperation("仓库出租率")
|
||||
@PostMapping("/warehouseOccupancyRate")
|
||||
public TableDataInfo warehouseOccupancyRate(@RequestBody ShipperLeaseDetailsDTO shipperLeaseDetailsDTO)
|
||||
{
|
||||
ShipperLeaseDetailsDO shipperLeaseDetailsDO = shipperLeaseDetailsAssembler.toDO(shipperLeaseDetailsDTO);
|
||||
List<WarehouseOccupancyRate> warehouseOccupancyRates = leaseApplicationService.warehouseOccupancyRate(shipperLeaseDetailsDO);
|
||||
// 按照businessDate倒序排序
|
||||
warehouseOccupancyRates = warehouseOccupancyRates.stream()
|
||||
.sorted(Comparator.comparing(WarehouseOccupancyRate::getBusinessDate, Comparator.nullsLast(Comparator.reverseOrder())))
|
||||
.collect(Collectors.toList());
|
||||
return getDataTable(warehouseOccupancyRates);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -13,25 +13,17 @@ spring:
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
# server-addr: 127.0.0.1:8848
|
||||
# server-addr: 10.33.0.129:6010
|
||||
# 线上测试环境配置 容器名+端口号
|
||||
#线上正式环境
|
||||
server-addr: 10.102.192.5:6848
|
||||
username: nacos
|
||||
password: manhuoda@2023
|
||||
#线上正式环境
|
||||
# server-addr: 10.102.192.105:6848
|
||||
config:
|
||||
# server-addr: 127.0.0.1:8848
|
||||
# server-addr: 10.33.0.129:6010
|
||||
# 线上测试环境配置 容器名+端口号
|
||||
server-addr: 10.102.192.5:6848
|
||||
username: nacos
|
||||
password: manhuoda@2023
|
||||
#线上正式环境
|
||||
# server-addr: 10.102.192.105:6848
|
||||
group: DEFAULT_GROUP # 默认分组就是DEFAULT_GROUP,如果使用默认分组可以不配置
|
||||
file-extension: yml #默认properties
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
@@ -196,16 +196,16 @@
|
||||
<if test="expenseAccountDO.organizationId != null">
|
||||
<!-- 如果设置了 organizationId,添加 organization_id 条件 -->
|
||||
and a.organization_id = #{expenseAccountDO.organizationId}
|
||||
and a.organization_name IS NOT NULL
|
||||
and a.organization_name != ''
|
||||
and LENGTH(TRIM(a.organization_name)) > 0
|
||||
-- and a.organization_name IS NOT NULL
|
||||
-- and a.organization_name != ''
|
||||
-- and LENGTH(TRIM(a.organization_name)) > 0
|
||||
</if>
|
||||
<if test="expenseAccountDO.topOrganizationId != null and expenseAccountDO.organizationId == null">
|
||||
<!-- 如果设置了 topOrganizationId 但没有设置 organizationId,添加 top_organization_id 条件 -->
|
||||
and a.top_organization_id = #{expenseAccountDO.topOrganizationId}
|
||||
and a.organization_name IS NOT NULL
|
||||
and a.organization_name != ''
|
||||
and LENGTH(TRIM(a.organization_name)) > 0
|
||||
-- and a.organization_name IS NOT NULL
|
||||
-- and a.organization_name != ''
|
||||
-- and LENGTH(TRIM(a.organization_name)) > 0
|
||||
</if>
|
||||
<if test="expenseAccountDO.organizationName != null and expenseAccountDO.organizationName != ''">
|
||||
and a.organization_name like concat('%', #{expenseAccountDO.organizationName}, '%')
|
||||
|
||||
+21
-21
@@ -8,36 +8,36 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<sql id="selectServiceItemsManagePo1">
|
||||
<where>
|
||||
<!-- 删除标记:0-无状态,1-正常,2-已删除,查询时只查询正常的数据 -->
|
||||
<choose>
|
||||
<when test="delFlag != null">
|
||||
and del_flag = #{delFlag}
|
||||
</when>
|
||||
<otherwise>
|
||||
and del_flag = 1
|
||||
</otherwise>
|
||||
</choose>
|
||||
<if test="createByName != null and createByName != ''">
|
||||
and create_by_name like concat('%', #{createByName}, '%')
|
||||
</if>
|
||||
<if test="updateByName != null and updateByName != ''">
|
||||
and update_by_name like concat('%', #{updateByName}, '%')
|
||||
</if>
|
||||
<!-- <!– 删除标记:0-无状态,1-正常,2-已删除,查询时只查询正常的数据 –>-->
|
||||
<!-- <choose>-->
|
||||
<!-- <when test="delFlag != null">-->
|
||||
<!-- and del_flag = #{delFlag}-->
|
||||
<!-- </when>-->
|
||||
<!-- <otherwise>-->
|
||||
<!-- and del_flag = 1-->
|
||||
<!-- </otherwise>-->
|
||||
<!-- </choose>-->
|
||||
<!-- <if test="createByName != null and createByName != ''">-->
|
||||
<!-- and create_by_name like concat('%', #{createByName}, '%')-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="updateByName != null and updateByName != ''">-->
|
||||
<!-- and update_by_name like concat('%', #{updateByName}, '%')-->
|
||||
<!-- </if>-->
|
||||
<!-- 数据权限:南光组织(organizationId=2827)查全部,其他组织查自己 -->
|
||||
<!-- 如果 organizationId 和 topOrganizationId 都为 null,表示查询所有组织的数据(不添加组织过滤条件) -->
|
||||
<if test="organizationId != null">
|
||||
<!-- 如果设置了 organizationId,添加 organization_id 条件 -->
|
||||
and organization_id = #{organizationId}
|
||||
and organization_name IS NOT NULL
|
||||
and organization_name != ''
|
||||
and LENGTH(TRIM(organization_name)) > 0
|
||||
-- and organization_name IS NOT NULL
|
||||
-- and organization_name != ''
|
||||
-- and LENGTH(TRIM(organization_name)) > 0
|
||||
</if>
|
||||
<if test="topOrganizationId != null and organizationId == null">
|
||||
<!-- 如果设置了 topOrganizationId 但没有设置 organizationId,添加 top_organization_id 条件 -->
|
||||
and top_organization_id = #{topOrganizationId}
|
||||
and organization_name IS NOT NULL
|
||||
and organization_name != ''
|
||||
and LENGTH(TRIM(organization_name)) > 0
|
||||
-- and organization_name IS NOT NULL
|
||||
-- and organization_name != ''
|
||||
-- and LENGTH(TRIM(organization_name)) > 0
|
||||
</if>
|
||||
<if test="organizationName != null and organizationName != ''">
|
||||
and organization_name like concat('%', #{organizationName}, '%')
|
||||
|
||||
+9
-1
@@ -11,9 +11,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="topOrganizationId" column="top_organization_id" />
|
||||
<result property="batchId" column="batch_id" />
|
||||
<result property="batchLabels" column="batch_labels" />
|
||||
<result property="fieldName" column="field_name" />
|
||||
<result property="inputControl" column="input_control" />
|
||||
<result property="attributeFormat" column="attribute_format" />
|
||||
<result property="attributeOption" column="attribute_option" />
|
||||
<result property="isDisplay" column="is_display" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
@@ -26,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
|
||||
<sql id="selectBatchDetailPo">
|
||||
select batch_detail_id, organization_id, organization_name, top_organization_id, batch_id, batch_labels, input_control, attribute_format, attribute_option, remark, create_time, create_by, create_by_name, update_time, update_by, update_by_name, del_flag from batch_detail
|
||||
select batch_detail_id, organization_id, organization_name, top_organization_id, batch_id, batch_labels, field_name, input_control, attribute_format, attribute_option, is_display, remark, create_time, create_by, create_by_name, update_time, update_by, update_by_name, del_flag from batch_detail
|
||||
</sql>
|
||||
|
||||
<sql id="selectBatchDetailPo1">
|
||||
@@ -46,6 +48,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="batchLabels != null and batchLabels != ''">
|
||||
and batch_labels = #{batchLabels}
|
||||
</if>
|
||||
<if test="fieldName != null and fieldName != ''">
|
||||
and field_name = #{fieldName}
|
||||
</if>
|
||||
<if test="inputControl != null ">
|
||||
and input_control = #{inputControl}
|
||||
</if>
|
||||
@@ -55,6 +60,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="attributeOption != null and attributeOption != ''">
|
||||
and attribute_option = #{attributeOption}
|
||||
</if>
|
||||
<if test="isDisplay != null ">
|
||||
and is_display = #{isDisplay}
|
||||
</if>
|
||||
<if test="createByName != null and createByName != ''">
|
||||
and create_by_name like concat('%', #{createByName}, '%')
|
||||
</if>
|
||||
|
||||
@@ -0,0 +1,129 @@
|
||||
<?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.mhd.basic.domain.lease.repository.mapper.LeaseMapper">
|
||||
|
||||
<resultMap type="com.mhd.basic.domain.lease.repository.po.LeasePO" id="LeaseResult">
|
||||
<!-- 租赁相关字段 -->
|
||||
<result property="id" column="id" />
|
||||
<result property="organizationId" column="organization_id" />
|
||||
<result property="organizationName" column="organization_name" />
|
||||
<result property="topOrganizationId" column="top_organization_id" />
|
||||
<result property="cargoOwnerName" column="cargo_owner_name" />
|
||||
<result property="leaseType" column="lease_type" />
|
||||
<result property="leaseArea" column="lease_area" />
|
||||
<result property="startDate" column="start_date" />
|
||||
<result property="endDate" column="end_date" />
|
||||
<result property="remark" column="remark" />
|
||||
<!-- 继承自BaseVOEntity的字段 -->
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createByName" column="create_by_name" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateByName" column="update_by_name" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectLeasePo">
|
||||
select
|
||||
a.id,
|
||||
a.organization_id,
|
||||
a.organization_name,
|
||||
a.top_organization_id,
|
||||
a.warehouse_id,
|
||||
COALESCE(w.warehouse_name, a.warehouse_name) as warehouse_name,
|
||||
a.shipper_id,
|
||||
a.cargo_owner_name,
|
||||
a.lease_type,
|
||||
a.lease_area,
|
||||
a.start_date,
|
||||
a.end_date,
|
||||
a.remark,
|
||||
a.create_time,
|
||||
a.create_by,
|
||||
a.create_by_name,
|
||||
a.update_time,
|
||||
a.update_by,
|
||||
a.update_by_name,
|
||||
a.del_flag
|
||||
from lease a
|
||||
LEFT JOIN warehouse w ON a.warehouse_id = w.warehouse_id AND w.del_flag = 1
|
||||
</sql>
|
||||
|
||||
<sql id="selectLeasePo1">
|
||||
<where>
|
||||
<!-- 租赁查询条件 -->
|
||||
<if test="organizationId != null ">
|
||||
and a.organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="topOrganizationId != null ">
|
||||
and a.top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="organizationName != null and organizationName != ''">
|
||||
and a.organization_name like concat('%', #{organizationName}, '%')
|
||||
</if>
|
||||
<if test="warehouseId != null ">
|
||||
and a.warehouse_id = #{warehouseId}
|
||||
</if>
|
||||
<if test="warehouseName != null and warehouseName != ''">
|
||||
and (w.warehouse_name like concat('%', #{warehouseName}, '%') or a.warehouse_name like concat('%', #{warehouseName}, '%'))
|
||||
</if>
|
||||
<if test="cargoOwnerName != null and cargoOwnerName != ''">
|
||||
and a.cargo_owner_name like concat('%', #{cargoOwnerName}, '%')
|
||||
</if>
|
||||
<if test="leaseType != null and leaseType != ''">
|
||||
and a.lease_type = #{leaseType}
|
||||
</if>
|
||||
<if test="createTime != null ">
|
||||
and a.create_time = #{createTime}
|
||||
</if>
|
||||
<if test="leaseArea != null ">
|
||||
and a.lease_area = #{leaseArea}
|
||||
</if>
|
||||
<if test="remark != null and remark != ''">
|
||||
and a.remark like concat('%', #{remark}, '%')
|
||||
</if>
|
||||
<!-- 创建和更新相关条件 -->
|
||||
<if test="createByName != null and createByName != ''">
|
||||
and a.create_by_name like concat('%', #{createByName}, '%')
|
||||
</if>
|
||||
<if test="updateByName != null and updateByName != ''">
|
||||
and a.update_by_name like concat('%', #{updateByName}, '%')
|
||||
</if>
|
||||
<if test="createTimeStart != null and createTimeStart != ''">
|
||||
and date_format(a.create_time,'%Y-%m-%d') >= #{createTimeStart}
|
||||
</if>
|
||||
<if test="createTimeEnd != null and createTimeEnd != ''">
|
||||
and date_format(a.create_time,'%Y-%m-%d') <= #{createTimeEnd}
|
||||
</if>
|
||||
<if test="updateTimeStart != null and updateTimeStart != ''">
|
||||
and date_format(a.update_time,'%Y-%m-%d') >= #{updateTimeStart}
|
||||
</if>
|
||||
<if test="updateTimeEnd != null and updateTimeEnd != ''">
|
||||
and date_format(a.update_time,'%Y-%m-%d') <= #{updateTimeEnd}
|
||||
</if>
|
||||
<!-- 时间范围查询(如果需要) -->
|
||||
<if test="startDate != null and endDate != null">
|
||||
and a.start_date >= #{startDate} and a.start_date <= #{endDate}
|
||||
</if>
|
||||
<if test="time != null">
|
||||
AND a.start_date <= #{time}
|
||||
AND a.end_date >= #{time}
|
||||
</if>
|
||||
<!-- 删除标记 -->
|
||||
<choose>
|
||||
<when test="delFlag != null"> and a.del_flag = #{delFlag} </when>
|
||||
<otherwise> and a.del_flag = 1 </otherwise>
|
||||
</choose>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<select id="queryList" parameterType="com.mhd.basic.domain.lease.repository.po.LeasePO" resultMap="LeaseResult">
|
||||
<include refid="selectLeasePo"/>
|
||||
<include refid="selectLeasePo1"/>
|
||||
ORDER BY a.create_time DESC
|
||||
</select>
|
||||
</mapper>
|
||||
+116
-4
@@ -54,7 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
select material_base_info_id, organization_id, organization_name, top_organization_id, shipper_id, shipper_name, material_code, material_name, bar_code, material_classify_code,
|
||||
material_classify_name, material_type, material_type_name, pack_id, pack_code, pack_name, unit_code, unit_name, brand_id, brand_code, brand_name, shelf_life, weight_limit,
|
||||
volume_limit, material_shape, material_shape_name, material_size, material_length, material_width, material_height, remark, nullify, create_time, create_by, create_by_name,
|
||||
update_time, update_by, update_by_name, del_flag, common,material_model,material_unit,machine_code
|
||||
update_time, update_by, update_by_name, del_flag, common,material_model,material_unit,machine_code,sku_code, unit_price, currency, origin_country, hs_code, declaration_unit, statutory_unit, statutory_second_unit
|
||||
from material_base_info
|
||||
</sql>
|
||||
|
||||
@@ -82,7 +82,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
and material_name like concat('%', #{materialName}, '%')
|
||||
</if>
|
||||
<if test="barCode != null and barCode != ''">
|
||||
and bar_code = #{barCode}
|
||||
and bar_code like concat('%',#{barCode},'%')
|
||||
</if>
|
||||
<if test="materialClassifyCode != null and materialClassifyCode != ''">
|
||||
and material_classify_code = #{materialClassifyCode}
|
||||
@@ -170,7 +170,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</where>
|
||||
and material_base_info_id in (SELECT
|
||||
DISTINCT material_base_info_id
|
||||
FROM test_szwl_wms.material_inventory
|
||||
FROM ngwl_test_wms.material_inventory
|
||||
WHERE
|
||||
allocation_quantity > 0
|
||||
AND del_flag = 1)
|
||||
@@ -178,6 +178,118 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<select id="queryList" parameterType="com.mhd.basic.domain.materialBaseInfo.repository.todo.MaterialBaseInfoDO" resultMap="MaterialBaseInfoResult">
|
||||
<include refid="selectMaterialBaseInfoPo"/>
|
||||
<include refid="selectMaterialBaseInfoPo1"/>
|
||||
<include refid="selectMaterialBaseInfoPo2"/>
|
||||
</select>
|
||||
|
||||
<sql id="selectMaterialBaseInfoPo2">
|
||||
<where>
|
||||
<if test="organizationId != null ">
|
||||
and organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="organizationName != null and organizationName != ''">
|
||||
and organization_name like concat('%', #{organizationName}, '%')
|
||||
</if>
|
||||
<if test="topOrganizationId != null ">
|
||||
and top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="shipperId != null ">
|
||||
and shipper_id = #{shipperId}
|
||||
</if>
|
||||
<if test="shipperName != null and shipperName != ''">
|
||||
and shipper_name like concat('%', #{shipperName}, '%')
|
||||
</if>
|
||||
<if test="materialCode != null and materialCode != ''">
|
||||
and material_code = #{materialCode}
|
||||
</if>
|
||||
<if test="materialName != null and materialName != ''">
|
||||
and material_name like concat('%', #{materialName}, '%')
|
||||
</if>
|
||||
<if test="barCode != null and barCode != ''">
|
||||
and bar_code like concat('%',#{barCode},'%')
|
||||
</if>
|
||||
<if test="materialClassifyCode != null and materialClassifyCode != ''">
|
||||
and material_classify_code = #{materialClassifyCode}
|
||||
</if>
|
||||
<if test="materialClassifyName != null and materialClassifyName != ''">
|
||||
and material_classify_name like concat('%', #{materialClassifyName}, '%')
|
||||
</if>
|
||||
<if test="materialType != null and materialType != ''">
|
||||
and material_type = #{materialType}
|
||||
</if>
|
||||
<if test="materialTypeName != null and materialTypeName != ''">
|
||||
and material_type_name like concat('%', #{materialTypeName}, '%')
|
||||
</if>
|
||||
<if test="unitCode != null and unitCode != ''">
|
||||
and unit_code = #{unitCode}
|
||||
</if>
|
||||
<if test="unitName != null and unitName != ''">
|
||||
and unit_name like concat('%', #{unitName}, '%')
|
||||
</if>
|
||||
<if test="packId != null ">
|
||||
and pack_id = #{packId}
|
||||
</if>
|
||||
<if test="packCode != null and packCode != ''">
|
||||
and pack_code = #{packCode}
|
||||
</if>
|
||||
<if test="packName != null and packName != ''">
|
||||
and pack_name like concat('%', #{packName}, '%')
|
||||
</if>
|
||||
<if test="brandId != null ">
|
||||
and brand_id = #{brandId}
|
||||
</if>
|
||||
<if test="brandCode != null and brandCode != ''">
|
||||
and brand_code = #{brandCode}
|
||||
</if>
|
||||
<if test="brandName != null and brandName != ''">
|
||||
and brand_name like concat('%', #{brandName}, '%')
|
||||
</if>
|
||||
<if test="shelfLife != null ">
|
||||
and shelf_life = #{shelfLife}
|
||||
</if>
|
||||
<if test="weightLimit != null ">
|
||||
and weight_limit = #{weightLimit}
|
||||
</if>
|
||||
<if test="volumeLimit != null ">
|
||||
and volume_limit = #{volumeLimit}
|
||||
</if>
|
||||
<if test="materialShape != null and materialShape != ''">
|
||||
and material_shape = #{materialShape}
|
||||
</if>
|
||||
<if test="materialShapeName != null and materialShapeName != ''">
|
||||
and material_shape_name like concat('%', #{materialShapeName}, '%')
|
||||
</if>
|
||||
<if test="materialSize != null and materialSize != ''">
|
||||
and material_size = #{materialSize}
|
||||
</if>
|
||||
<if test="materialLength != null ">
|
||||
and material_length = #{materialLength}
|
||||
</if>
|
||||
<if test="materialWidth != null ">
|
||||
and material_width = #{materialWidth}
|
||||
</if>
|
||||
<if test="materialHeight != null ">
|
||||
and material_height = #{materialHeight}
|
||||
</if>
|
||||
<if test="nullify != null ">
|
||||
and nullify = #{nullify}
|
||||
</if>
|
||||
<if test="createByName != null and createByName != ''">
|
||||
and create_by_name like concat('%', #{createByName}, '%')
|
||||
</if>
|
||||
<if test="updateByName != null and updateByName != ''">
|
||||
and update_by_name like concat('%', #{updateByName}, '%')
|
||||
</if>
|
||||
<!-- 传 1:只查公共 , 2:只查自己的 ,3:公共的和自己的 -->
|
||||
<choose>
|
||||
<when test="common != null and (common == 1 or common == 2) "> and common = #{common} </when>
|
||||
<otherwise> and (
|
||||
1 = 1
|
||||
or common = 1 )</otherwise>
|
||||
</choose>
|
||||
<choose>
|
||||
<when test="delFlag != null"> and del_flag = #{delFlag} </when>
|
||||
<otherwise> and del_flag = 1 </otherwise>
|
||||
</choose>
|
||||
</where>
|
||||
</sql>
|
||||
</mapper>
|
||||
|
||||
@@ -16,6 +16,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="remark" column="remark" />
|
||||
<result property="openingUp" column="opening_up" />
|
||||
<result property="nullify" column="nullify" />
|
||||
<result property="unitName" column="unit_name" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createByName" column="create_by_name" />
|
||||
@@ -27,7 +28,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
|
||||
<sql id="selectPackPo">
|
||||
select pack_id, organization_id, organization_name, top_organization_id, shipper_id, shipper_name, pack_code, pack_name, remark, opening_up, nullify, create_time, create_by, create_by_name, update_time, update_by, update_by_name, del_flag from pack
|
||||
select a.pack_id, a.organization_id, a.organization_name, a.top_organization_id, a.shipper_id, a.shipper_name, a.pack_code, a.pack_name, a.remark, a.opening_up, a.nullify, a.create_time, a.create_by, a.create_by_name, a.update_time, a.update_by, a.update_by_name, a.del_flag,
|
||||
(SELECT b.name FROM (SELECT name, pack_id FROM pack_detail WHERE pack_id = a.pack_id AND del_flag = 1 ORDER BY pack_detail_id) b WHERE ROWNUM = 1) as unit_name
|
||||
from pack a
|
||||
</sql>
|
||||
|
||||
<sql id="selectPackPo1">
|
||||
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
<?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.mhd.basic.domain.shipperLeaseDetails.repository.mapper.ShipperLeaseDetailsMapper">
|
||||
|
||||
<resultMap type="com.mhd.basic.domain.shipperLeaseDetails.repository.po.ShipperLeaseDetailsPO" id="ShipperLeaseDetailsResult">
|
||||
<!-- 货主租赁明细字段 -->
|
||||
<result property="id" column="id" />
|
||||
<result property="organizationId" column="organization_id" />
|
||||
<result property="organizationName" column="organization_name" />
|
||||
<result property="topOrganizationId" column="top_organization_id" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="warehouseName" column="warehouse_name" />
|
||||
<result property="shipperId" column="shipper_id" />
|
||||
<result property="cargoOwnerName" column="cargo_owner_name" />
|
||||
<result property="leaseType" column="lease_type" />
|
||||
<result property="leaseArea" column="lease_area" />
|
||||
<result property="businessDate" column="business_date" />
|
||||
|
||||
<!-- 继承自BaseVOEntity的字段 -->
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createByName" column="create_by_name" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateByName" column="update_by_name" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectShipperLeaseDetailsVo">
|
||||
select
|
||||
id,
|
||||
organization_id,
|
||||
organization_name,
|
||||
top_organization_id,
|
||||
warehouse_id,
|
||||
warehouse_name,
|
||||
shipper_id,
|
||||
cargo_owner_name,
|
||||
lease_type,
|
||||
lease_area,
|
||||
business_date,
|
||||
create_by,
|
||||
create_by_name,
|
||||
create_time,
|
||||
update_by,
|
||||
update_by_name,
|
||||
update_time,
|
||||
del_flag
|
||||
from shipper_lease_details
|
||||
</sql>
|
||||
|
||||
<sql id="selectShipperLeaseDetailsWhere">
|
||||
<where>
|
||||
<!-- 组织相关条件 -->
|
||||
<if test="organizationId != null">
|
||||
and organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="topOrganizationId != null">
|
||||
and top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="organizationName != null and organizationName != ''">
|
||||
and organization_name like concat('%', #{organizationName}, '%')
|
||||
</if>
|
||||
|
||||
<!-- 仓库相关条件 -->
|
||||
<if test="warehouseId != null">
|
||||
and warehouse_id = #{warehouseId}
|
||||
</if>
|
||||
|
||||
<!-- 业务日期时间范围 -->
|
||||
<if test="businessDateStart != null">
|
||||
and business_date >= #{businessDateStart}
|
||||
</if>
|
||||
<if test="businessDateEnd != null">
|
||||
and business_date <= #{businessDateEnd}
|
||||
</if>
|
||||
|
||||
<if test="warehouseName != null and warehouseName != ''">
|
||||
and warehouse_name like concat('%', #{warehouseName}, '%')
|
||||
</if>
|
||||
|
||||
<!-- 货主相关条件 -->
|
||||
<if test="shipperId != null">
|
||||
and shipper_id = #{shipperId}
|
||||
</if>
|
||||
<if test="cargoOwnerName != null and cargoOwnerName != ''">
|
||||
and cargo_owner_name like concat('%', #{cargoOwnerName}, '%')
|
||||
</if>
|
||||
|
||||
<!-- 租赁相关条件 -->
|
||||
<if test="leaseType != null and leaseType != ''">
|
||||
and lease_type = #{leaseType}
|
||||
</if>
|
||||
<if test="leaseArea != null">
|
||||
and lease_area = #{leaseArea}
|
||||
</if>
|
||||
|
||||
<!-- 业务日期条件 -->
|
||||
<if test="businessDate != null">
|
||||
and business_date = #{businessDate}
|
||||
</if>
|
||||
|
||||
<!-- 创建和更新相关条件 -->
|
||||
<if test="createByName != null and createByName != ''">
|
||||
and create_by_name like concat('%', #{createByName}, '%')
|
||||
</if>
|
||||
<if test="updateByName != null and updateByName != ''">
|
||||
and update_by_name like concat('%', #{updateByName}, '%')
|
||||
</if>
|
||||
|
||||
<!-- 删除标记 -->
|
||||
<choose>
|
||||
<when test="delFlag != null"> and del_flag = #{delFlag} </when>
|
||||
<otherwise> and del_flag = 1 </otherwise>
|
||||
</choose>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<select id="queryList" parameterType="com.mhd.basic.domain.shipperLeaseDetails.repository.po.ShipperLeaseDetailsPO" resultMap="ShipperLeaseDetailsResult">
|
||||
<include refid="selectShipperLeaseDetailsVo"/>
|
||||
<include refid="selectShipperLeaseDetailsWhere"/>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
</mapper>
|
||||
+56
-39
@@ -51,130 +51,147 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
|
||||
<sql id="selectStorageLocationPo">
|
||||
select storage_location_id, organization_id, organization_name, top_organization_id, warehouse_id, warehouse_code, warehouse_name, storage_section_id, storage_code, storage_name, storage_location_code, storage_location_name, storage_location_classify, storage_location_classify_name, storage_location_type, storage_location_type_name, mixing_strategy, mixing_strategy_name, storage_location_group_id, storage_location_group_code, storage_location_group_name, weight_limit, volume_limit, location_size, location_length, location_width, location_height, coordinate, coordinate_area, coordinate_column, coordinate_row, coordinate_layer, remark, opening_up, nullify, status, create_time, create_by, create_by_name, update_time, update_by, update_by_name, del_flag from storage_location
|
||||
select a.storage_location_id, a.organization_id, a.organization_name, a.top_organization_id, a.warehouse_id,
|
||||
COALESCE(w.warehouse_code, a.warehouse_code) as warehouse_code,
|
||||
COALESCE(w.warehouse_name, a.warehouse_name) as warehouse_name,
|
||||
a.storage_section_id, a.storage_code, a.storage_name, a.storage_location_code, a.storage_location_name,
|
||||
a.storage_location_classify, a.storage_location_classify_name, a.storage_location_type, a.storage_location_type_name,
|
||||
a.mixing_strategy, a.mixing_strategy_name, a.storage_location_group_id, a.storage_location_group_code, a.storage_location_group_name,
|
||||
a.weight_limit, a.volume_limit, a.location_size, a.location_length, a.location_width, a.location_height,
|
||||
a.coordinate, a.coordinate_area, a.coordinate_column, a.coordinate_row, a.coordinate_layer, a.remark,
|
||||
a.opening_up, a.nullify, a.status, a.create_time, a.create_by, a.create_by_name, a.update_time, a.update_by, a.update_by_name, a.del_flag
|
||||
from storage_location a
|
||||
LEFT JOIN warehouse w ON a.warehouse_id = w.warehouse_id AND w.del_flag = 1
|
||||
</sql>
|
||||
|
||||
<sql id="selectStorageLocationPo1">
|
||||
<where>
|
||||
<if test="organizationId != null ">
|
||||
and organization_id = #{organizationId}
|
||||
and a.organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="organizationName != null and organizationName != ''">
|
||||
and organization_name like concat('%', #{organizationName}, '%')
|
||||
and a.organization_name like concat('%', #{organizationName}, '%')
|
||||
</if>
|
||||
<if test="topOrganizationId != null ">
|
||||
and top_organization_id = #{topOrganizationId}
|
||||
and a.top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="warehouseId != null ">
|
||||
and warehouse_id = #{warehouseId}
|
||||
and a.warehouse_id = #{warehouseId}
|
||||
</if>
|
||||
<if test="warehouseCode != null and warehouseCode != ''">
|
||||
and warehouse_code = #{warehouseCode}
|
||||
and (w.warehouse_code like concat('%', #{warehouseCode}, '%') or a.warehouse_code like concat('%', #{warehouseCode}, '%'))
|
||||
</if>
|
||||
<if test="warehouseName != null and warehouseName != ''">
|
||||
and warehouse_name like concat('%', #{warehouseName}, '%')
|
||||
and (w.warehouse_name like concat('%', #{warehouseName}, '%') or a.warehouse_name like concat('%', #{warehouseName}, '%'))
|
||||
</if>
|
||||
<if test="storageSectionId != null ">
|
||||
and storage_section_id = #{storageSectionId}
|
||||
and a.storage_section_id = #{storageSectionId}
|
||||
</if>
|
||||
<if test="storageCode != null and storageCode != ''">
|
||||
and storage_code = #{storageCode}
|
||||
and a.storage_code = #{storageCode}
|
||||
</if>
|
||||
<if test="storageName != null and storageName != ''">
|
||||
and storage_name like concat('%', #{storageName}, '%')
|
||||
and a.storage_name like concat('%', #{storageName}, '%')
|
||||
</if>
|
||||
<if test="storageLocationCode != null and storageLocationCode != ''">
|
||||
and storage_location_code = #{storageLocationCode}
|
||||
and a.storage_location_code = #{storageLocationCode}
|
||||
</if>
|
||||
<if test="storageLocationName != null and storageLocationName != ''">
|
||||
and storage_location_name like concat('%', #{storageLocationName}, '%')
|
||||
and a.storage_location_name like concat('%', #{storageLocationName}, '%')
|
||||
</if>
|
||||
<if test="storageLocationClassify != null and storageLocationClassify != ''">
|
||||
and storage_location_classify = #{storageLocationClassify}
|
||||
and a.storage_location_classify = #{storageLocationClassify}
|
||||
</if>
|
||||
<if test="storageLocationClassifyName != null and storageLocationClassifyName != ''">
|
||||
and storage_location_classify_name like concat('%', #{storageLocationClassifyName}, '%')
|
||||
and a.storage_location_classify_name like concat('%', #{storageLocationClassifyName}, '%')
|
||||
</if>
|
||||
<if test="storageLocationType != null and storageLocationType != ''">
|
||||
and storage_location_type = #{storageLocationType}
|
||||
and a.storage_location_type = #{storageLocationType}
|
||||
</if>
|
||||
<if test="storageLocationTypeName != null and storageLocationTypeName != ''">
|
||||
and storage_location_type_name like concat('%', #{storageLocationTypeName}, '%')
|
||||
and a.storage_location_type_name like concat('%', #{storageLocationTypeName}, '%')
|
||||
</if>
|
||||
<if test="mixingStrategy != null and mixingStrategy != ''">
|
||||
and mixing_strategy = #{mixingStrategy}
|
||||
and a.mixing_strategy = #{mixingStrategy}
|
||||
</if>
|
||||
<if test="mixingStrategyName != null and mixingStrategyName != ''">
|
||||
and mixing_strategy_name like concat('%', #{mixingStrategyName}, '%')
|
||||
and a.mixing_strategy_name like concat('%', #{mixingStrategyName}, '%')
|
||||
</if>
|
||||
<if test="storageLocationGroupId != null ">
|
||||
and storage_location_group_id = #{storageLocationGroupId}
|
||||
and a.storage_location_group_id = #{storageLocationGroupId}
|
||||
</if>
|
||||
<if test="storageLocationGroupCode != null and storageLocationGroupCode != ''">
|
||||
and storage_location_group_code = #{storageLocationGroupCode}
|
||||
and a.storage_location_group_code = #{storageLocationGroupCode}
|
||||
</if>
|
||||
<if test="storageLocationGroupName != null and storageLocationGroupName != ''">
|
||||
and storage_location_group_name like concat('%', #{storageLocationGroupName}, '%')
|
||||
and a.storage_location_group_name like concat('%', #{storageLocationGroupName}, '%')
|
||||
</if>
|
||||
<if test="weightLimit != null ">
|
||||
and weight_limit = #{weightLimit}
|
||||
and a.weight_limit = #{weightLimit}
|
||||
</if>
|
||||
<if test="volumeLimit != null ">
|
||||
and volume_limit = #{volumeLimit}
|
||||
and a.volume_limit = #{volumeLimit}
|
||||
</if>
|
||||
<if test="locationSize != null and locationSize != ''">
|
||||
and location_size = #{locationSize}
|
||||
and a.location_size = #{locationSize}
|
||||
</if>
|
||||
<if test="locationLength != null ">
|
||||
and location_length = #{locationLength}
|
||||
and a.location_length = #{locationLength}
|
||||
</if>
|
||||
<if test="locationWidth != null ">
|
||||
and location_width = #{locationWidth}
|
||||
and a.location_width = #{locationWidth}
|
||||
</if>
|
||||
<if test="locationHeight != null ">
|
||||
and location_height = #{locationHeight}
|
||||
and a.location_height = #{locationHeight}
|
||||
</if>
|
||||
<if test="coordinate != null and coordinate != ''">
|
||||
and coordinate = #{coordinate}
|
||||
and a.coordinate = #{coordinate}
|
||||
</if>
|
||||
<if test="coordinateArea != null and coordinateArea != ''">
|
||||
and coordinate_area = #{coordinateArea}
|
||||
and a.coordinate_area = #{coordinateArea}
|
||||
</if>
|
||||
<if test="coordinateColumn != null and coordinateColumn != ''">
|
||||
and coordinate_column = #{coordinateColumn}
|
||||
and a.coordinate_column = #{coordinateColumn}
|
||||
</if>
|
||||
<if test="coordinateRow != null and coordinateRow != ''">
|
||||
and coordinate_row = #{coordinateRow}
|
||||
and a.coordinate_row = #{coordinateRow}
|
||||
</if>
|
||||
<if test="coordinateLayer != null and coordinateLayer != ''">
|
||||
and coordinate_layer = #{coordinateLayer}
|
||||
and a.coordinate_layer = #{coordinateLayer}
|
||||
</if>
|
||||
<if test="openingUp != null ">
|
||||
and opening_up = #{openingUp}
|
||||
and a.opening_up = #{openingUp}
|
||||
</if>
|
||||
<if test="nullify != null ">
|
||||
and nullify = #{nullify}
|
||||
and a.nullify = #{nullify}
|
||||
</if>
|
||||
<if test="createByName != null and createByName != ''">
|
||||
and create_by_name like concat('%', #{createByName}, '%')
|
||||
and a.create_by_name like concat('%', #{createByName}, '%')
|
||||
</if>
|
||||
<if test="updateByName != null and updateByName != ''">
|
||||
and update_by_name like concat('%', #{updateByName}, '%')
|
||||
and a.update_by_name like concat('%', #{updateByName}, '%')
|
||||
</if>
|
||||
<if test="remark != null and remark != ''">
|
||||
and remark like concat('%',#{remark},'%')
|
||||
and a.remark like concat('%',#{remark},'%')
|
||||
</if>
|
||||
<choose>
|
||||
<when test="delFlag != null"> and a.del_flag = #{delFlag} </when>
|
||||
<otherwise> and a.del_flag = 1 </otherwise>
|
||||
</choose>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<select id="queryList" parameterType="com.mhd.basic.domain.storageLocation.repository.todo.StorageLocationDO" resultMap="StorageLocationResult">
|
||||
<include refid="selectStorageLocationPo"/>
|
||||
<include refid="selectStorageLocationPo1"/>
|
||||
-- 按照创建时间倒序排序
|
||||
order by a.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="getStorageLocationCount" parameterType="com.mhd.basic.domain.storageLocation.repository.todo.StorageLocationDO" resultMap="StorageLocationResult">
|
||||
<select id="getStorageLocationCount" parameterType="com.mhd.basic.domain.storageLocation.repository.todo.StorageLocationDO" resultType="java.lang.Long">
|
||||
SELECT count(1)
|
||||
from storage_locationfrom
|
||||
from storage_location a
|
||||
LEFT JOIN warehouse w ON a.warehouse_id = w.warehouse_id AND w.del_flag = 1
|
||||
<include refid="selectStorageLocationPo1"/>
|
||||
</select>
|
||||
</mapper>
|
||||
+29
-18
@@ -31,67 +31,78 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
|
||||
<sql id="selectStorageLocationGroupPo">
|
||||
select storage_location_group_id, organization_id, organization_name, top_organization_id, warehouse_id, warehouse_code, warehouse_name, storage_section_id, storage_code, storage_name, storage_location_group_code, storage_location_group_name, remark, number, opening_up, nullify, create_time, create_by, create_by_name, update_time, update_by, update_by_name, del_flag from storage_location_group
|
||||
select a.storage_location_group_id, a.organization_id, a.organization_name, a.top_organization_id, a.warehouse_id,
|
||||
COALESCE(w.warehouse_code, a.warehouse_code) as warehouse_code,
|
||||
COALESCE(w.warehouse_name, a.warehouse_name) as warehouse_name,
|
||||
a.storage_section_id, a.storage_code, a.storage_name, a.storage_location_group_code, a.storage_location_group_name,
|
||||
a.remark, a.number, a.opening_up, a.nullify, a.create_time, a.create_by, a.create_by_name, a.update_time, a.update_by, a.update_by_name, a.del_flag
|
||||
from storage_location_group a
|
||||
LEFT JOIN warehouse w ON a.warehouse_id = w.warehouse_id AND w.del_flag = 1
|
||||
</sql>
|
||||
|
||||
<sql id="selectStorageLocationGroupPo1">
|
||||
<where>
|
||||
<if test="organizationId != null ">
|
||||
and organization_id = #{organizationId}
|
||||
and a.organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="organizationName != null and organizationName != ''">
|
||||
and organization_name like concat('%', #{organizationName}, '%')
|
||||
and a.organization_name like concat('%', #{organizationName}, '%')
|
||||
</if>
|
||||
<if test="topOrganizationId != null ">
|
||||
and top_organization_id = #{topOrganizationId}
|
||||
and a.top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="warehouseId != null ">
|
||||
and warehouse_id = #{warehouseId}
|
||||
and a.warehouse_id = #{warehouseId}
|
||||
</if>
|
||||
<if test="warehouseCode != null and warehouseCode != ''">
|
||||
and warehouse_code = #{warehouseCode}
|
||||
and (w.warehouse_code like concat('%', #{warehouseCode}, '%') or a.warehouse_code like concat('%', #{warehouseCode}, '%'))
|
||||
</if>
|
||||
<if test="warehouseName != null and warehouseName != ''">
|
||||
and warehouse_name like concat('%', #{warehouseName}, '%')
|
||||
and (w.warehouse_name like concat('%', #{warehouseName}, '%') or a.warehouse_name like concat('%', #{warehouseName}, '%'))
|
||||
</if>
|
||||
<if test="storageSectionId != null ">
|
||||
and storage_section_id = #{storageSectionId}
|
||||
and a.storage_section_id = #{storageSectionId}
|
||||
</if>
|
||||
<if test="storageCode != null and storageCode != ''">
|
||||
and storage_code = #{storageCode}
|
||||
and a.storage_code = #{storageCode}
|
||||
</if>
|
||||
<if test="storageName != null and storageName != ''">
|
||||
and storage_name like concat('%', #{storageName}, '%')
|
||||
and a.storage_name like concat('%', #{storageName}, '%')
|
||||
</if>
|
||||
<if test="storageLocationGroupCode != null and storageLocationGroupCode != ''">
|
||||
and storage_location_group_code = #{storageLocationGroupCode}
|
||||
and a.storage_location_group_code = #{storageLocationGroupCode}
|
||||
</if>
|
||||
<if test="storageLocationGroupName != null and storageLocationGroupName != ''">
|
||||
and storage_location_group_name like concat('%', #{storageLocationGroupName}, '%')
|
||||
and a.storage_location_group_name like concat('%', #{storageLocationGroupName}, '%')
|
||||
</if>
|
||||
<if test="openingUp != null ">
|
||||
and opening_up = #{openingUp}
|
||||
and a.opening_up = #{openingUp}
|
||||
</if>
|
||||
<if test="nullify != null ">
|
||||
and nullify = #{nullify}
|
||||
and a.nullify = #{nullify}
|
||||
</if>
|
||||
<if test="createByName != null and createByName != ''">
|
||||
and create_by_name like concat('%', #{createByName}, '%')
|
||||
and a.create_by_name like concat('%', #{createByName}, '%')
|
||||
</if>
|
||||
<if test="updateByName != null and updateByName != ''">
|
||||
and update_by_name like concat('%', #{updateByName}, '%')
|
||||
and a.update_by_name like concat('%', #{updateByName}, '%')
|
||||
</if>
|
||||
<if test="number != null">
|
||||
and number = #{number}
|
||||
and a.number = #{number}
|
||||
</if>
|
||||
<if test="remark != null and remark != ''">
|
||||
and remark like concat('%',#{remark},'%')
|
||||
and a.remark like concat('%',#{remark},'%')
|
||||
</if>
|
||||
<choose>
|
||||
<when test="delFlag != null"> and a.del_flag = #{delFlag} </when>
|
||||
<otherwise> and a.del_flag = 1 </otherwise>
|
||||
</choose>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<select id="queryList" parameterType="com.mhd.basic.domain.storageLocationGroup.repository.todo.StorageLocationGroupDO" resultMap="StorageLocationGroupResult">
|
||||
<include refid="selectStorageLocationGroupPo"/>
|
||||
<include refid="selectStorageLocationGroupPo1"/>
|
||||
order by a.create_time desc
|
||||
</select>
|
||||
</mapper>
|
||||
+28
-17
@@ -31,64 +31,75 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
|
||||
<sql id="selectStorageSectionPo">
|
||||
select storage_section_id, organization_id, organization_name, top_organization_id, warehouse_id, warehouse_code, warehouse_name, storage_code, storage_name, storage_type, storage_type_name, storage_region, remark, opening_up, nullify, create_time, create_by, create_by_name, update_time, update_by, update_by_name, del_flag from storage_section
|
||||
select a.storage_section_id, a.organization_id, a.organization_name, a.top_organization_id, a.warehouse_id,
|
||||
COALESCE(w.warehouse_code, a.warehouse_code) as warehouse_code,
|
||||
COALESCE(w.warehouse_name, a.warehouse_name) as warehouse_name,
|
||||
a.storage_code, a.storage_name, a.storage_type, a.storage_type_name, a.storage_region, a.remark, a.opening_up, a.nullify,
|
||||
a.create_time, a.create_by, a.create_by_name, a.update_time, a.update_by, a.update_by_name, a.del_flag
|
||||
from storage_section a
|
||||
LEFT JOIN warehouse w ON a.warehouse_id = w.warehouse_id AND w.del_flag = 1
|
||||
</sql>
|
||||
|
||||
<sql id="selectStorageSectionPo1">
|
||||
<where>
|
||||
<if test="organizationId != null ">
|
||||
and organization_id = #{organizationId}
|
||||
and a.organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="organizationName != null and organizationName != ''">
|
||||
and organization_name like concat('%', #{organizationName}, '%')
|
||||
and a.organization_name like concat('%', #{organizationName}, '%')
|
||||
</if>
|
||||
<if test="topOrganizationId != null ">
|
||||
and top_organization_id = #{topOrganizationId}
|
||||
and a.top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="warehouseId != null ">
|
||||
and warehouse_id = #{warehouseId}
|
||||
and a.warehouse_id = #{warehouseId}
|
||||
</if>
|
||||
<if test="warehouseCode != null and warehouseCode != ''">
|
||||
and warehouse_code = #{warehouseCode}
|
||||
and (w.warehouse_code like concat('%', #{warehouseCode}, '%') or a.warehouse_code like concat('%', #{warehouseCode}, '%'))
|
||||
</if>
|
||||
<if test="warehouseName != null and warehouseName != ''">
|
||||
and warehouse_name like concat('%', #{warehouseName}, '%')
|
||||
and (w.warehouse_name like concat('%', #{warehouseName}, '%') or a.warehouse_name like concat('%', #{warehouseName}, '%'))
|
||||
</if>
|
||||
<if test="storageCode != null and storageCode != ''">
|
||||
and storage_code = #{storageCode}
|
||||
and a.storage_code = #{storageCode}
|
||||
</if>
|
||||
<if test="storageName != null and storageName != ''">
|
||||
and storage_name like concat('%', #{storageName}, '%')
|
||||
and a.storage_name like concat('%', #{storageName}, '%')
|
||||
</if>
|
||||
<if test="storageType != null and storageType != ''">
|
||||
and storage_type = #{storageType}
|
||||
and a.storage_type = #{storageType}
|
||||
</if>
|
||||
<if test="storageTypeName != null and storageTypeName != ''">
|
||||
and storage_type_name like concat('%', #{storageTypeName}, '%')
|
||||
and a.storage_type_name like concat('%', #{storageTypeName}, '%')
|
||||
</if>
|
||||
<if test="storageRegion != null ">
|
||||
and storage_region = #{storageRegion}
|
||||
and a.storage_region = #{storageRegion}
|
||||
</if>
|
||||
<if test="openingUp != null ">
|
||||
and opening_up = #{openingUp}
|
||||
and a.opening_up = #{openingUp}
|
||||
</if>
|
||||
<if test="nullify != null ">
|
||||
and nullify = #{nullify}
|
||||
and a.nullify = #{nullify}
|
||||
</if>
|
||||
<if test="createByName != null and createByName != ''">
|
||||
and create_by_name like concat('%', #{createByName}, '%')
|
||||
and a.create_by_name like concat('%', #{createByName}, '%')
|
||||
</if>
|
||||
<if test="updateByName != null and updateByName != ''">
|
||||
and update_by_name like concat('%', #{updateByName}, '%')
|
||||
and a.update_by_name like concat('%', #{updateByName}, '%')
|
||||
</if>
|
||||
<if test="remark != null and remark != ''">
|
||||
and remark like concat('%',#{remark},'%')
|
||||
and a.remark like concat('%',#{remark},'%')
|
||||
</if>
|
||||
<choose>
|
||||
<when test="delFlag != null"> and a.del_flag = #{delFlag} </when>
|
||||
<otherwise> and a.del_flag = 1 </otherwise>
|
||||
</choose>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<select id="queryList" parameterType="com.mhd.basic.domain.storageSection.repository.todo.StorageSectionDO" resultMap="StorageSectionResult">
|
||||
<include refid="selectStorageSectionPo"/>
|
||||
<include refid="selectStorageSectionPo1"/>
|
||||
order by a.create_time desc
|
||||
</select>
|
||||
</mapper>
|
||||
+2
-1
@@ -58,7 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
and top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="warehouseCode != null and warehouseCode != ''">
|
||||
and warehouse_code = #{warehouseCode}
|
||||
and warehouse_code like concat('%', #{warehouseCode}, '%')
|
||||
</if>
|
||||
<if test="warehouseName != null and warehouseName != ''">
|
||||
and warehouse_name like concat('%', #{warehouseName}, '%')
|
||||
@@ -139,5 +139,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<select id="queryList" parameterType="com.mhd.basic.domain.warehouse.repository.todo.WarehouseDO" resultMap="WarehouseResult">
|
||||
<include refid="selectWarehousePo"/>
|
||||
<include refid="selectWarehousePo1"/>
|
||||
order by create_time desc
|
||||
</select>
|
||||
</mapper>
|
||||
+8
@@ -157,6 +157,10 @@ public class CommonApplicationService {
|
||||
UserDO queryAccount = new UserDO();
|
||||
queryAccount.setTopOrganizationId(topOrganizationId);
|
||||
queryAccount.setUserAccount(userDO.getUserAccount());
|
||||
// 如果指定了角色,只检查相同角色的用户
|
||||
if (StrUtil.isNotEmpty(userDO.getRoleCode())) {
|
||||
queryAccount.setRoleCode(userDO.getRoleCode());
|
||||
}
|
||||
userPo = userDomainService.findByTopOrganizationIdAndUserAccount(queryAccount);
|
||||
}
|
||||
//根据手机号查询
|
||||
@@ -165,6 +169,10 @@ public class CommonApplicationService {
|
||||
UserDO queryPhone = new UserDO();
|
||||
queryPhone.setTopOrganizationId(topOrganizationId);
|
||||
queryPhone.setUserPhone(userDO.getUserPhone());
|
||||
// 如果指定了角色,只检查相同角色的用户
|
||||
if (StrUtil.isNotEmpty(userDO.getRoleCode())) {
|
||||
queryPhone.setRoleCode(userDO.getRoleCode());
|
||||
}
|
||||
userPoTwo = userDomainService.findByTopOrganizationIdAndUserPhone(queryPhone);
|
||||
}
|
||||
//根据身份证号查询
|
||||
|
||||
+62
-51
@@ -86,6 +86,7 @@ public class RoleApplicationService {
|
||||
|
||||
// 先保存前端传递的 organizationId(如果存在)
|
||||
Long frontendOrganizationId = roleDo.getOrganizationId();
|
||||
log.info("角色查询 - 初始 roleDo.getOrganizationId(): {}", frontendOrganizationId);
|
||||
|
||||
// 获取登录用户信息
|
||||
Long loginUserOrganizationId = null;
|
||||
@@ -94,6 +95,12 @@ public class RoleApplicationService {
|
||||
loginUserOrganizationId = userPo.getOrganizationId();
|
||||
topOrganizationId = userPo.getTopOrganizationId();
|
||||
}
|
||||
log.info("角色查询 - 当前登录用户组织ID: {}", loginUserOrganizationId);
|
||||
|
||||
// 先保存前端传递的 organizationId(如果存在)
|
||||
// 因为后续的 BeanUtils.copyProperties 可能会覆盖掉前端传递的值
|
||||
Long savedFrontendOrganizationId = frontendOrganizationId;
|
||||
log.info("角色查询 - 保存的前端 organizationId: {}", savedFrontendOrganizationId);
|
||||
|
||||
if (userPo.getUserAccountType() != null && userPo.getUserAccountType() == 5){
|
||||
roleDo.setCreateBy(userPo.getCreateBy());
|
||||
@@ -102,60 +109,62 @@ public class RoleApplicationService {
|
||||
userDataPermissionQueryDTO.setPermissionMenuId(roleDo.getPermissionMenuId());
|
||||
userDataPermissionQueryDTO = userDataPermissionApplicationService.getUserDataPermissionQueryDTO(userDataPermissionQueryDTO);
|
||||
|
||||
// 在复制属性之前,先保存前端传递的 organizationId(如果存在)
|
||||
// 因为 BeanUtils.copyProperties 可能会覆盖掉前端传递的值
|
||||
Long savedFrontendOrganizationId = frontendOrganizationId;
|
||||
|
||||
BeanUtils.copyProperties(userDataPermissionQueryDTO, roleDo, IgnoreNullUtil.getNullPropertyNames(userDataPermissionQueryDTO));
|
||||
UserPo loginUserPo = loginUser.getUserPo();
|
||||
|
||||
// 重新获取前端传递的 organizationId(优先使用前端传递的值)
|
||||
// 对于南光组织,如果前端传递了 organizationId,必须使用前端传递的值
|
||||
Long currentFrontendOrganizationId = savedFrontendOrganizationId != null ? savedFrontendOrganizationId : roleDo.getOrganizationId();
|
||||
|
||||
// 数据权限:查询权限根据 organizationId 来设置,与其他模块保持一致
|
||||
// organizationId等于2827时,为南光组织,查所有;其他组织查自己
|
||||
if (loginUserOrganizationId != null && loginUserOrganizationId.equals(2827L)) {
|
||||
// 南光组织(organizationId=2827):可以查询所有组织的数据
|
||||
// 如果前端传递了 organizationId(包括2827),使用前端传递的值进行过滤
|
||||
// 如果前端没有传递 organizationId,清空组织过滤条件,查询所有组织的数据
|
||||
if (currentFrontendOrganizationId != null) {
|
||||
// 前端传递了 organizationId(包括2827或其他组织),使用前端传递的值进行过滤
|
||||
roleDo.setOrganizationId(currentFrontendOrganizationId);
|
||||
roleDo.setTopOrganizationId(null);
|
||||
} else {
|
||||
// 前端没有传递 organizationId,清空组织过滤条件,查询所有组织的数据
|
||||
roleDo.setOrganizationId(null);
|
||||
roleDo.setTopOrganizationId(null);
|
||||
}
|
||||
if (!Strings.isNullOrEmpty(loginUserPo.getRoleCode()) && RoleEnum.SUPER_ADMIN.getCode().equals(loginUserPo.getRoleCode())) {
|
||||
//角色等级:0-无状态,1-内置角色,2-组织角色
|
||||
//roleDo.setRoleGrade(1);
|
||||
} else {
|
||||
//roleDo.setRoleGrade(2);
|
||||
}
|
||||
log.info("角色查询 - BeanUtils.copyProperties 后 roleDo.getOrganizationId(): {}", roleDo.getOrganizationId());
|
||||
}
|
||||
|
||||
UserPo loginUserPo = loginUser.getUserPo();
|
||||
|
||||
// 数据权限:查询权限根据 organizationId 来设置,与其他模块保持一致
|
||||
// organizationId等于2827时,为南光组织,查所有;其他组织查自己
|
||||
if (loginUserOrganizationId != null && loginUserOrganizationId.equals(2827L)) {
|
||||
// 南光组织(organizationId=2827):可以查询所有组织的数据
|
||||
// 如果前端传递了 organizationId 且不等于当前登录用户的组织ID,使用前端传递的值进行过滤
|
||||
// 如果前端没有传递 organizationId,或者传递的值等于当前登录用户的组织ID,清空组织过滤条件,查询所有组织的数据
|
||||
log.info("角色查询 - 南光组织,savedFrontendOrganizationId: {}", savedFrontendOrganizationId);
|
||||
if (savedFrontendOrganizationId != null && !savedFrontendOrganizationId.equals(loginUserOrganizationId)) {
|
||||
// 前端传递了其他组织的 organizationId(不等于2827),使用前端传递的值进行过滤
|
||||
log.info("角色查询 - 南光组织:使用前端传递的其他组织 organizationId: {}", savedFrontendOrganizationId);
|
||||
roleDo.setOrganizationId(savedFrontendOrganizationId);
|
||||
roleDo.setTopOrganizationId(null);
|
||||
} else {
|
||||
// 前端没有传递 organizationId,或者传递的值等于当前登录用户的组织ID(2827),
|
||||
// 清空组织过滤条件,查询所有组织的数据
|
||||
// 注意:这里必须清空 organizationId,不能使用 roleDo.getOrganizationId(),
|
||||
// 因为 roleDo.getOrganizationId() 可能被 BeanUtils.copyProperties 从其他地方复制过来
|
||||
log.info("角色查询 - 南光组织:前端未传递 organizationId 或传递的值等于当前登录用户组织ID,清空组织过滤条件,查询所有组织的数据");
|
||||
roleDo.setOrganizationId(null);
|
||||
roleDo.setTopOrganizationId(null);
|
||||
}
|
||||
if (!Strings.isNullOrEmpty(loginUserPo.getRoleCode()) && RoleEnum.SUPER_ADMIN.getCode().equals(loginUserPo.getRoleCode())) {
|
||||
//角色等级:0-无状态,1-内置角色,2-组织角色
|
||||
//roleDo.setRoleGrade(1);
|
||||
} else {
|
||||
// 其他组织:设置organizationId,只查询当前组织的数据
|
||||
// 其他组织只能查询自己组织的数据,不能查询其他组织的数据
|
||||
if (currentFrontendOrganizationId != null) {
|
||||
// 前端传递了 organizationId,验证是否与当前登录用户的组织ID一致
|
||||
if (!currentFrontendOrganizationId.equals(loginUserOrganizationId)) {
|
||||
// 前端传递了其他组织的 organizationId,强制使用当前登录用户的组织ID,防止越权查询
|
||||
log.warn("角色查询 - 前端传递的组织ID {} 与当前登录用户的组织ID {} 不一致,使用当前登录用户的组织ID进行过滤",
|
||||
currentFrontendOrganizationId, loginUserOrganizationId);
|
||||
roleDo.setOrganizationId(loginUserOrganizationId);
|
||||
} else {
|
||||
// 前端传递的 organizationId 与当前登录用户的组织ID一致,使用前端传递的值
|
||||
roleDo.setOrganizationId(currentFrontendOrganizationId);
|
||||
}
|
||||
roleDo.setTopOrganizationId(topOrganizationId);
|
||||
} else {
|
||||
// 前端没有传递 organizationId,使用当前登录用户的组织ID
|
||||
roleDo.setOrganizationId(loginUserOrganizationId);
|
||||
roleDo.setTopOrganizationId(topOrganizationId);
|
||||
}
|
||||
//roleDo.setRoleGrade(2);
|
||||
}
|
||||
} else {
|
||||
// 其他组织:设置organizationId,只查询当前组织的数据
|
||||
// 其他组织只能查询自己组织的数据,不能查询其他组织的数据
|
||||
// 重新获取前端传递的 organizationId(优先使用前端传递的值)
|
||||
Long currentFrontendOrganizationId = savedFrontendOrganizationId != null ? savedFrontendOrganizationId : roleDo.getOrganizationId();
|
||||
if (currentFrontendOrganizationId != null) {
|
||||
// 前端传递了 organizationId,验证是否与当前登录用户的组织ID一致
|
||||
if (!currentFrontendOrganizationId.equals(loginUserOrganizationId)) {
|
||||
// 前端传递了其他组织的 organizationId,强制使用当前登录用户的组织ID,防止越权查询
|
||||
log.warn("角色查询 - 前端传递的组织ID {} 与当前登录用户的组织ID {} 不一致,使用当前登录用户的组织ID进行过滤",
|
||||
currentFrontendOrganizationId, loginUserOrganizationId);
|
||||
roleDo.setOrganizationId(loginUserOrganizationId);
|
||||
} else {
|
||||
// 前端传递的 organizationId 与当前登录用户的组织ID一致,使用前端传递的值
|
||||
roleDo.setOrganizationId(currentFrontendOrganizationId);
|
||||
}
|
||||
roleDo.setTopOrganizationId(topOrganizationId);
|
||||
} else {
|
||||
// 前端没有传递 organizationId,使用当前登录用户的组织ID
|
||||
roleDo.setOrganizationId(loginUserOrganizationId);
|
||||
roleDo.setTopOrganizationId(topOrganizationId);
|
||||
}
|
||||
//roleDo.setRoleGrade(2);
|
||||
}
|
||||
return roleDomainService.selecRolePoList(roleDo);
|
||||
}
|
||||
@@ -167,7 +176,9 @@ public class RoleApplicationService {
|
||||
*/
|
||||
@DataPermissions(cacheName = "wlhyRole_createBy")
|
||||
public List<RolePO> getUserRolelist(RoleDo roleDo) {//获取登录人信息
|
||||
return roleDomainService.selecRolePoList(roleDo);
|
||||
// 调用应用服务层的方法,包含数据权限控制逻辑
|
||||
// 当前登录用户组织ID为2827时查询全部组织信息,其他组织只查自己
|
||||
return selecRolePoList(roleDo);
|
||||
}
|
||||
|
||||
public List<RolePO> queryList(RoleDo roleDo) {
|
||||
|
||||
+38
-7
@@ -113,6 +113,7 @@ import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.mhd.common.core.utils.AESUtil.decrypt;
|
||||
import static com.mhd.common.core.utils.PageUtils.startPage;
|
||||
|
||||
@Service
|
||||
@@ -440,6 +441,32 @@ public class UserApplicationService {
|
||||
return userPo;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 根据用户ID获取用户信息
|
||||
* @Author Alex
|
||||
* @Date 2022/12/20 17:12
|
||||
*/
|
||||
public UserPo selectByUserName(String userName) {
|
||||
if (StringUtils.isEmpty(userName)) {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
userName = loginUser.getUsername();
|
||||
}
|
||||
UserPo userPo = userDomainService.selectByUserName(userName);
|
||||
if (userPo != null){
|
||||
userPo.setPrincipalAccount(userPo.getUserAccount());
|
||||
}
|
||||
if (StringUtils.isNotEmpty(userPo.getRoleCode())){
|
||||
String[] split = userPo.getRoleCode().split(";");
|
||||
List<String> list = CollectionUtil.toList(split);
|
||||
userPo.setRoleCodeList(list);
|
||||
}
|
||||
UserShipperPo userShipperPo = userShipperDomainService.selectByUserId(userPo.getUserId());
|
||||
if(null != userShipperPo){
|
||||
userPo.setEsignEnterpriseStatus(userShipperPo.getEsignEnterpriseStatus());
|
||||
}
|
||||
return userPo;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 分配用户默认普通用户角色
|
||||
* @Author Alex
|
||||
@@ -1195,7 +1222,7 @@ public class UserApplicationService {
|
||||
(userDO.getUserAccountType() == null || userDO.getUserAccountType() < 4)) {
|
||||
//给用户分配默认普通角色权限
|
||||
RoleDo roleDo = new RoleDo();
|
||||
roleDo.setRoleCode(RoleEnum.MUST.getCode());
|
||||
roleDo.setRoleCode(RoleEnum.OWNER_CARGO.getCode());
|
||||
roleDo.setOrganizationId(userEntity.getOrganizationId());
|
||||
RoleEntity roleEntity = roleDomainService.selectByOrganizationIdAndRoleCode(roleDo);
|
||||
if (roleEntity != null) {
|
||||
@@ -1205,8 +1232,8 @@ public class UserApplicationService {
|
||||
userDO.setRoleId(roleEntity.getRoleId());
|
||||
userRoleDomainService.addUserRole(userRoleDo);
|
||||
}
|
||||
userDO.setRoleCode(RoleEnum.MUST.getCode());
|
||||
userDO.setRoleName(RoleEnum.MUST.getName());
|
||||
userDO.setRoleCode(RoleEnum.OWNER_CARGO.getCode());
|
||||
userDO.setRoleName(RoleEnum.OWNER_CARGO.getName());
|
||||
userDO.setUserId(userEntity.getUserId());
|
||||
userDomainService.updateUser(userDO);
|
||||
}else{
|
||||
@@ -1794,14 +1821,18 @@ public class UserApplicationService {
|
||||
userDO.setUserAccountType(userPo.getUserAccountType());
|
||||
CheckDO checkDO = userFactory.getCheckDo(userDO);
|
||||
checkDO.setDataSources(userPo.getDataSources());
|
||||
if (StringUtils.isNotEmpty(userDO.getUserPassword()) && userDO.getUserPassword().equals(userPo.getUserPassword())){
|
||||
userDO.setUserPassword(null);
|
||||
}
|
||||
//用户密码传值
|
||||
if (StringUtils.isNotEmpty(userDO.getUserPassword())) {
|
||||
String userPassword = userDO.getUserPassword();
|
||||
checkDO.setUserPassword(userPassword);
|
||||
String decrypt = decrypt(userPassword);//解密
|
||||
checkDO.setUserPassword(decrypt);
|
||||
// 生成随机8位数盐
|
||||
String salt = userPo.getUserSalt();
|
||||
//加密算法,PBEWithMD5AndDES,
|
||||
String passwordEncode = PasswordUtil.encrypt(userDO.getUserAccount(), userPassword, salt);
|
||||
String passwordEncode = PasswordUtil.encrypt(userDO.getUserAccount(), decrypt, salt);
|
||||
userDO.setUserPassword(passwordEncode);
|
||||
}
|
||||
if (ObjectUtil.isNotNull(userDO.getUserAreaCountyId()) && !"0".equals(userDO.getUserAreaCountyId())) {
|
||||
@@ -4908,7 +4939,7 @@ public class UserApplicationService {
|
||||
Map<String, SysDepartInterfaceInfoPo> sysDepartInterfaceInfoPoMap = sysDepartInterfaceInfoPos.stream().collect(Collectors.toMap(SysDepartInterfaceInfoPo::getInterfaceTypeKey, Function.identity()));
|
||||
SysDepartInterfaceInfoPo sysDepartInterfaceInfoPo = sysDepartInterfaceInfoPoMap.get("isWT");
|
||||
//是否开启
|
||||
if ("1".equals(sysDepartInterfaceInfoPo.getInterfaceTypeValue())) {
|
||||
if (sysDepartInterfaceInfoPo != null && "1".equals(sysDepartInterfaceInfoPo.getInterfaceTypeValue())) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -4964,4 +4995,4 @@ public class UserApplicationService {
|
||||
public UserPo selectUserTableByUserId(Long userId){
|
||||
return userDomainService.selectByUserId(userId);
|
||||
}
|
||||
}
|
||||
}
|
||||
+16
@@ -1161,4 +1161,20 @@ public class UserShipperApplicationService {
|
||||
public com.mhd.common.core.domain.po.UserShipperPo getShipperSummaryData(Long userId) {
|
||||
return userShipperDomainService.getShipperSummaryData(userId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据用户ID查询货主信息
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @return 货主信息
|
||||
*/
|
||||
public UserShipperPo getShipperByUserId(Long userId) {
|
||||
// 参数校验
|
||||
if (userId == null || userId <= 0) {
|
||||
throw new IllegalArgumentException("用户ID不能为空");
|
||||
}
|
||||
|
||||
// 根据userId查询货主信息
|
||||
return userShipperDomainService.selectByUserId(userId);
|
||||
}
|
||||
}
|
||||
|
||||
+27
@@ -165,4 +165,31 @@ public class UserEntity extends BaseVOEntity {
|
||||
|
||||
@ApiModelProperty(name = "制单员nc编码")
|
||||
private String documentPreparerNcCode;
|
||||
|
||||
@ApiModelProperty("法人代表")
|
||||
private String legalRepresentative;
|
||||
|
||||
@ApiModelProperty("统一编码")
|
||||
private String unifiedCode;
|
||||
|
||||
@ApiModelProperty("注册电话")
|
||||
private String registeredPhone;
|
||||
|
||||
@ApiModelProperty("注册地址")
|
||||
private String registeredAddress;
|
||||
|
||||
@ApiModelProperty("传真")
|
||||
private String fax;
|
||||
|
||||
@ApiModelProperty("付款银行")
|
||||
private String paymentBank;
|
||||
|
||||
@ApiModelProperty("付款账户")
|
||||
private String paymentAccount;
|
||||
|
||||
@ApiModelProperty("发票抬头")
|
||||
private String invoiceTitle;
|
||||
|
||||
@ApiModelProperty("税号")
|
||||
private String taxNumber;
|
||||
}
|
||||
|
||||
+3
-2
@@ -27,6 +27,8 @@ public interface UserRepositoryInterface extends IService<UserEntity> {
|
||||
UserPo findAdminUserByOrganizationId(UserDO userDO);
|
||||
|
||||
UserPo findByUserId(Long userId);
|
||||
UserPo selectByUserName(String userName);
|
||||
|
||||
|
||||
UserPo findByTopOrganizationIdAndUserAccount(UserDO userDO);
|
||||
UserPo getUserByDingUserId(String dingUserId);
|
||||
@@ -73,5 +75,4 @@ public interface UserRepositoryInterface extends IService<UserEntity> {
|
||||
|
||||
|
||||
String finShipperEnterpriseNamedByUserId(Long userId);
|
||||
}
|
||||
|
||||
}
|
||||
+1
-1
@@ -60,4 +60,4 @@ public interface UserShipperRepositoryInterface extends IService<UserShipperEnti
|
||||
SettlementInfoQueryVo getSettlementInfoByUserId(Long userId);
|
||||
|
||||
public com.mhd.common.core.domain.po.UserShipperPo getShipperSummaryData(Long userId);
|
||||
}
|
||||
}
|
||||
+3
-1
@@ -24,6 +24,8 @@ public interface UserMapper extends BaseMapper<UserEntity> {
|
||||
|
||||
UserPo selectByUserId(Long userId);
|
||||
|
||||
UserPo selectByUserName(String userName);
|
||||
|
||||
UserPo selectUserShipperList(UserPo userPo);
|
||||
|
||||
List<UserPo> selectUserShipperListWaybill(UserPo userPo);
|
||||
@@ -72,4 +74,4 @@ public interface UserMapper extends BaseMapper<UserEntity> {
|
||||
|
||||
|
||||
String finShipperEnterpriseNamedByUserId(@Param("userId") Long userId);
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -28,4 +28,4 @@ public interface UserShipperMapper extends BaseMapper<UserShipperEntity> {
|
||||
List<UserShipperEntity> selectBySealId(@Param("userShipperEntity") UserShipperEntity userShipperEntity);
|
||||
|
||||
public com.mhd.common.core.domain.po.UserShipperPo getShipperSummaryData(Long userId);
|
||||
}
|
||||
}
|
||||
+6
-1
@@ -64,6 +64,11 @@ public class UserRepositoryImpl extends ServiceImpl<UserMapper,UserEntity> imple
|
||||
return userMapper.selectByUserId(userId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserPo selectByUserName(String userName) {
|
||||
return userMapper.selectByUserName(userName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserEntity selectById(Long userId) {
|
||||
return userMapper.selectById(userId);
|
||||
@@ -168,4 +173,4 @@ public class UserRepositoryImpl extends ServiceImpl<UserMapper,UserEntity> imple
|
||||
public String finShipperEnterpriseNamedByUserId(Long userId) {
|
||||
return userMapper.finShipperEnterpriseNamedByUserId(userId);
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -166,4 +166,4 @@ public class UserShipperRepositoryImpl extends ServiceImpl<UserShipperMapper, Us
|
||||
public com.mhd.common.core.domain.po.UserShipperPo getShipperSummaryData(Long userId) {
|
||||
return shipperMapper.getShipperSummaryData(userId);
|
||||
}
|
||||
}
|
||||
}
|
||||
+33
@@ -45,4 +45,37 @@ public class CustomerDO extends BaseVOEntity {
|
||||
|
||||
@ApiModelProperty(name = "用户ID集合")
|
||||
private List<Long> userIds;
|
||||
|
||||
@ApiModelProperty("法人代表")
|
||||
private String legalRepresentative;
|
||||
|
||||
@ApiModelProperty("统一编码")
|
||||
private String unifiedCode;
|
||||
|
||||
@ApiModelProperty("注册电话")
|
||||
private String registeredPhone;
|
||||
|
||||
@ApiModelProperty("注册地址")
|
||||
private String registeredAddress;
|
||||
|
||||
@ApiModelProperty("传真")
|
||||
private String fax;
|
||||
|
||||
@ApiModelProperty("付款银行")
|
||||
private String paymentBank;
|
||||
|
||||
@ApiModelProperty("付款账户")
|
||||
private String paymentAccount;
|
||||
|
||||
@ApiModelProperty("发票抬头")
|
||||
private String invoiceTitle;
|
||||
|
||||
@ApiModelProperty("税号")
|
||||
private String taxNumber;
|
||||
|
||||
@ApiModelProperty(name = "邮箱")
|
||||
private String userEmail;
|
||||
|
||||
@ApiModelProperty(name = "备注")
|
||||
private String userRemark;
|
||||
}
|
||||
|
||||
+27
@@ -254,4 +254,31 @@ public class UserDO extends BaseVOEntity {
|
||||
|
||||
@ApiModelProperty(name = "制单员nc编码")
|
||||
private String documentPreparerNcCode;
|
||||
|
||||
@ApiModelProperty("法人代表")
|
||||
private String legalRepresentative;
|
||||
|
||||
@ApiModelProperty("统一编码")
|
||||
private String unifiedCode;
|
||||
|
||||
@ApiModelProperty("注册电话")
|
||||
private String registeredPhone;
|
||||
|
||||
@ApiModelProperty("注册地址")
|
||||
private String registeredAddress;
|
||||
|
||||
@ApiModelProperty("传真")
|
||||
private String fax;
|
||||
|
||||
@ApiModelProperty("付款银行")
|
||||
private String paymentBank;
|
||||
|
||||
@ApiModelProperty("付款账户")
|
||||
private String paymentAccount;
|
||||
|
||||
@ApiModelProperty("发票抬头")
|
||||
private String invoiceTitle;
|
||||
|
||||
@ApiModelProperty("税号")
|
||||
private String taxNumber;
|
||||
}
|
||||
|
||||
+5
-1
@@ -125,6 +125,10 @@ public class UserDomainService {
|
||||
return userRepositoryInterface.findByUserId(userId);
|
||||
}
|
||||
|
||||
public UserPo selectByUserName(String userName) {
|
||||
return userRepositoryInterface.selectByUserName(userName);
|
||||
}
|
||||
|
||||
public void updateWhenLogin(UserDO userDO) {
|
||||
userRepositoryInterface.update(new UpdateWrapper<UserEntity>().lambda()
|
||||
.set(UserEntity::getLastLoginIp,userDO.getLastLoginIp()).set(UserEntity::getLastLoginTime,userDO.getLastLoginTime())
|
||||
@@ -259,4 +263,4 @@ public class UserDomainService {
|
||||
.set(UserEntity::getHasDefaultAddress, dto.getHasDefaultAddress())
|
||||
.eq(UserEntity::getUserId, dto.getUserId()));
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -236,4 +236,4 @@ public class UserShipperDomainService {
|
||||
public com.mhd.common.core.domain.po.UserShipperPo getShipperSummaryData(Long userId) {
|
||||
return userShipperRepositoryInterface.getShipperSummaryData(userId);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -47,4 +47,36 @@ public class CustomerDTO extends BaseVOEntity {
|
||||
@ApiModelProperty("详细地址")
|
||||
private String userAreaAddress;
|
||||
|
||||
@ApiModelProperty("法人代表")
|
||||
private String legalRepresentative;
|
||||
|
||||
@ApiModelProperty("统一编码")
|
||||
private String unifiedCode;
|
||||
|
||||
@ApiModelProperty("注册电话")
|
||||
private String registeredPhone;
|
||||
|
||||
@ApiModelProperty("注册地址")
|
||||
private String registeredAddress;
|
||||
|
||||
@ApiModelProperty("传真")
|
||||
private String fax;
|
||||
|
||||
@ApiModelProperty("付款银行")
|
||||
private String paymentBank;
|
||||
|
||||
@ApiModelProperty("付款账户")
|
||||
private String paymentAccount;
|
||||
|
||||
@ApiModelProperty("发票抬头")
|
||||
private String invoiceTitle;
|
||||
|
||||
@ApiModelProperty("税号")
|
||||
private String taxNumber;
|
||||
|
||||
@ApiModelProperty(name = "邮箱")
|
||||
private String userEmail;
|
||||
|
||||
@ApiModelProperty(name = "备注")
|
||||
private String userRemark;
|
||||
}
|
||||
|
||||
@@ -241,4 +241,10 @@ public class UserDTO extends BaseVOEntity {
|
||||
|
||||
@ApiModelProperty( "制单员nc编码")
|
||||
private String documentPreparerNcCode;
|
||||
|
||||
@ApiModelProperty(value = "紧急联系人姓名")
|
||||
private String emergencyContactName;
|
||||
|
||||
@ApiModelProperty(value = "紧急联系电话")
|
||||
private String emergencyContactPhone;
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@@ -57,9 +58,20 @@ public class RoleAPI extends BaseController {
|
||||
@Log(title = "职务/角色管理-查询", description ="查询角色列表",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("查询角色列表-分页")
|
||||
@GetMapping("/getUserRolelist")
|
||||
public TableDataInfo getUserRolelist(RoleDTO roleDTO) {
|
||||
public TableDataInfo getUserRolelist(RoleDTO roleDTO, HttpServletRequest request) {
|
||||
// 检查前端是否明确传递了 organizationId 参数
|
||||
// 如果前端没有传递,清空 roleDTO 中的 organizationId,避免从其他地方自动设置的值影响查询
|
||||
String organizationIdParam = request.getParameter("organizationId");
|
||||
log.info("角色查询接口 - 前端传递的 organizationId 参数: {}", organizationIdParam);
|
||||
if (organizationIdParam == null || organizationIdParam.isEmpty()) {
|
||||
log.info("角色查询接口 - 前端未传递 organizationId,清空 roleDTO.organizationId");
|
||||
roleDTO.setOrganizationId(null);
|
||||
} else {
|
||||
log.info("角色查询接口 - 前端传递了 organizationId: {}", organizationIdParam);
|
||||
}
|
||||
//转换实体
|
||||
RoleDo roleDo = roleAssember.toRoleDo(roleDTO);
|
||||
log.info("角色查询接口 - 转换后 roleDo.getOrganizationId(): {}", roleDo.getOrganizationId());
|
||||
startPage();
|
||||
List<RolePO> list = roleApplicationService.getUserRolelist(roleDo);
|
||||
return getDataTable(list);
|
||||
|
||||
@@ -201,6 +201,14 @@ public class UserAPI extends BaseController {
|
||||
return AjaxResult.success(userPo);
|
||||
}
|
||||
|
||||
@Log(title = "用户中台管理-查询", description ="根据用户ID查询用户详细信息",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("根据用户ID查询用户详细信息")
|
||||
@GetMapping("/getInfoByName/{userName}")
|
||||
public AjaxResult getInfoByName(@PathVariable("userName") String userName) {
|
||||
UserPo userPo = userApplicationService.selectByUserName(userName);
|
||||
return AjaxResult.success(userPo);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 新增租户,新增货主,新增司机,新增员工,用户注册等
|
||||
* @Author Alex
|
||||
@@ -946,4 +954,4 @@ public class UserAPI extends BaseController {
|
||||
public R<String> finShipperEnterpriseNamedByUserId(@PathVariable("userId") Long userId) {
|
||||
return R.ok(userApplicationService.finShipperEnterpriseNamedByUserId(userId));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -205,4 +205,34 @@ public class UserShipperAPI extends BaseController {
|
||||
public AjaxResult<?> getShipperSummaryData(@PathVariable Long userId) {
|
||||
return AjaxResult.success(userShipperApplicationService.getShipperSummaryData(userId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据用户ID查询货主信息
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @return 货主信息
|
||||
*/
|
||||
@ApiOperation("根据用户ID查询货主信息")
|
||||
@GetMapping("/getShipperByUserId/{userId}")
|
||||
public AjaxResult<?> getShipperByUserId(@PathVariable("userId") Long userId) {
|
||||
try {
|
||||
// 参数校验
|
||||
if (userId == null || userId <= 0) {
|
||||
return AjaxResult.error("用户ID不能为空");
|
||||
}
|
||||
|
||||
// 调用服务层方法查询货主信息
|
||||
UserShipperPo userShipperPo = userShipperApplicationService.getShipperByUserId(userId);
|
||||
|
||||
if (userShipperPo != null) {
|
||||
return AjaxResult.success(userShipperPo);
|
||||
} else {
|
||||
return AjaxResult.error("未找到对应的货主信息");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("根据用户ID查询货主信息异常,userId:{}", userId, e);
|
||||
return AjaxResult.error("查询货主信息失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -17,4 +17,10 @@ public class NonePagingListVO {
|
||||
@ApiModelProperty(value = "车队名称")
|
||||
private String motorcadeName;
|
||||
|
||||
@ApiModelProperty(value = "组织ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty(value = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
}
|
||||
|
||||
@@ -18,16 +18,12 @@ spring:
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
# server-addr: 127.0.0.1:8848
|
||||
# 线上测试环境配置 容器名+端口号
|
||||
# server-addr: 10.33.0.129:6010
|
||||
#线上正式环境
|
||||
server-addr: 10.102.192.5:6848
|
||||
username: nacos
|
||||
password: manhuoda@2023
|
||||
config:
|
||||
# server-addr: 127.0.0.1:8848
|
||||
# 线上测试环境配置 容器名+端口号
|
||||
# server-addr: 10.33.0.129:6010
|
||||
server-addr: 10.102.192.5:6848
|
||||
username: nacos
|
||||
password: manhuoda@2023
|
||||
|
||||
@@ -380,31 +380,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
group by u.user_id
|
||||
</select>
|
||||
<select id="queryNonePagingList" resultType="com.mhd.user.domain.motorcade.repository.po.MotorcadePo">
|
||||
SELECT
|
||||
SELECT DISTINCT
|
||||
m.motorcade_id,
|
||||
m.motorcade_name
|
||||
m.motorcade_name,
|
||||
m.organization_id,
|
||||
m.organization_name
|
||||
FROM
|
||||
motorcade m
|
||||
LEFT JOIN
|
||||
INNER JOIN
|
||||
motorcade_driver d
|
||||
ON m.motorcade_id = d.motorcade_id and d.del_flag = 1
|
||||
INNER JOIN
|
||||
user_driver ud
|
||||
ON d.user_id = ud.user_id and ud.del_flag = 1
|
||||
LEFT JOIN
|
||||
user_driver_enterprise ude
|
||||
ON ud.user_id = ude.user_id and ude.del_flag = 1
|
||||
<where>
|
||||
m.del_flag = 1
|
||||
<!-- 数据权限:南光组织(organizationId=2827)查全部,其他组织查自己 -->
|
||||
<if test="organizationId != null">
|
||||
<!-- 如果设置了 organizationId,添加 organization_id 条件 -->
|
||||
and m.organization_id = #{organizationId}
|
||||
and m.organization_name IS NOT NULL
|
||||
</if>
|
||||
<if test="topOrganizationId != null">
|
||||
<!-- 如果设置了 topOrganizationId,添加 top_organization_id 条件 -->
|
||||
and m.top_organization_id = #{topOrganizationId}
|
||||
<if test="organizationId == null">
|
||||
<!-- 如果没有设置 organizationId,添加 organization_name IS NOT NULL 条件 -->
|
||||
and m.organization_name IS NOT NULL
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY m.motorcade_id
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -122,13 +122,13 @@
|
||||
</if>
|
||||
<if test="organizationId !=null">
|
||||
and a.organization_id = #{organizationId}
|
||||
and a.organization_name IS NOT NULL
|
||||
-- and a.organization_name IS NOT NULL
|
||||
</if>
|
||||
<if test="topOrganizationId !=null">
|
||||
and a.top_organization_id = #{topOrganizationId}
|
||||
<if test="organizationId == null">
|
||||
and a.organization_name IS NOT NULL
|
||||
</if>
|
||||
<!-- <if test="organizationId == null">-->
|
||||
<!-- and a.organization_name IS NOT NULL-->
|
||||
<!-- </if>-->
|
||||
</if>
|
||||
<if test="organizationName != null and organizationName != ''">
|
||||
and a.organization_name like concat('%' , #{organizationName} , '%')
|
||||
|
||||
@@ -185,27 +185,13 @@
|
||||
ude.driver_corp_legal_name,
|
||||
ude.driver_corp_name,
|
||||
ude.driver_corp_idcard_number,
|
||||
r.roleName,
|
||||
b.role_name AS roleName,
|
||||
dvb.vehicle_id,
|
||||
wlhydriver.id as wlhydriverId,
|
||||
WM_CONCAT(DISTINCT dvb.vehicle_license_plate_number ) AS vehicleLicensePlateNumber,
|
||||
WM_CONCAT(DISTINCT m.motorcade_name ) AS driverTeamName
|
||||
FROM
|
||||
"USER" b
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
user_id,
|
||||
LISTAGG(DISTINCT r.role_name, '&') WITHIN GROUP(ORDER BY r.role_name) AS roleName
|
||||
FROM
|
||||
role r
|
||||
LEFT JOIN user_role ur ON r.role_id = ur.role_id
|
||||
AND ur.del_flag = 1
|
||||
WHERE
|
||||
r.del_flag = 1
|
||||
AND role_code IN ( 'driver', 'carrier', 'captain' )
|
||||
GROUP BY
|
||||
user_id
|
||||
) r ON r.user_id = b.user_id
|
||||
LEFT JOIN user_driver a ON a.user_id = b.user_id
|
||||
LEFT JOIN NGWL_TEST_WLHY.sys_user wlhyuser ON wlhyuser.szwl_user_id = b.user_id
|
||||
LEFT JOIN NGWL_TEST_WLHY.tms_driver wlhydriver ON wlhydriver.driver_id = wlhyuser.id
|
||||
@@ -220,7 +206,7 @@
|
||||
left join motorcade m on md.motorcade_id = m.motorcade_id and m.del_flag = 1
|
||||
|
||||
LEFT JOIN motorcade mo ON a.driver_id = mo.motorcade_header_id
|
||||
AND m.del_flag = 1
|
||||
AND mo.del_flag = 1
|
||||
left join motorcade_driver mdr on mo.motorcade_id = mdr.motorcade_id and mdr.del_flag = 1
|
||||
WHERE
|
||||
b.del_flag = 1
|
||||
@@ -353,12 +339,6 @@
|
||||
select count(1)
|
||||
from ( select b.user_id
|
||||
from "USER" b
|
||||
left join (select user_id, WM_CONCAT(r.role_name separator '&') roleName
|
||||
from role r
|
||||
left join user_role ur on r.role_id = ur.role_id and ur.del_flag = 1
|
||||
where r.del_flag = 1
|
||||
and role_code in ('driver', 'carrier', 'captain', 'must')
|
||||
group by user_id) r on r.user_id = b.user_id
|
||||
left join user_driver a on a.user_id = b.user_id
|
||||
left join user_driver_enterprise ude on b.user_id = ude.user_id and ude.driver_type = 1
|
||||
left join user_driver_enterprise ud on b.user_id = ud.user_id and ud.driver_type = 2
|
||||
@@ -558,7 +538,7 @@
|
||||
</if>
|
||||
/*角色*/
|
||||
<if test="userDriverDO.roleName != null and userDriverDO.roleName != ''">
|
||||
AND r.roleName like concat('%', #{userDriverDO.roleName}, '%')
|
||||
AND b.role_name like concat('%', #{userDriverDO.roleName}, '%')
|
||||
</if>
|
||||
/*车牌号*/
|
||||
<if test="userDriverDO.vehicleLicensePlateNumber != null and userDriverDO.vehicleLicensePlateNumber != ''">
|
||||
|
||||
@@ -70,7 +70,16 @@
|
||||
a.department_id,
|
||||
a.ding_user_id,
|
||||
a.ding_dept_id,
|
||||
a.validity_period_management,a.salesperson_nc_code,a.document_preparer_nc_code
|
||||
a.validity_period_management,a.salesperson_nc_code,a.document_preparer_nc_code,
|
||||
a.legal_representative,
|
||||
a.unified_code,
|
||||
a.registered_phone,
|
||||
a.registered_address,
|
||||
a.fax,
|
||||
a.payment_bank,
|
||||
a.payment_account,
|
||||
a.invoice_title,
|
||||
a.tax_number
|
||||
FROM "USER" a
|
||||
where a.del_flag = 1
|
||||
</sql>
|
||||
@@ -131,6 +140,9 @@
|
||||
<include refid="selectUserVo"/>
|
||||
and a.top_organization_id = #{topOrganizationId}
|
||||
and a.user_account = #{userAccount}
|
||||
<if test="roleCode != null and roleCode != ''">
|
||||
and a.role_code = #{roleCode}
|
||||
</if>
|
||||
<if test="userId !=null and userId !='' ">
|
||||
and a.user_id != #{userId}
|
||||
</if>
|
||||
@@ -159,6 +171,10 @@
|
||||
and a.user_id = #{value}
|
||||
</select>
|
||||
|
||||
<select id="selectByUserName" parameterType="java.lang.String" resultType="com.mhd.common.core.domain.po.UserPo">
|
||||
<include refid="selectUserVo"/>
|
||||
and a.user_name = #{value}</select>
|
||||
|
||||
|
||||
<!-- 根据用户手机号查询自己以外的用户 -->
|
||||
<select id="findByTopOrganizationIdAndUserPhone"
|
||||
@@ -170,6 +186,9 @@
|
||||
</if>
|
||||
and a.user_phone = #{userPhone}
|
||||
and a.top_organization_id = #{topOrganizationId}
|
||||
<if test="roleCode != null and roleCode != ''">
|
||||
and a.role_code = #{roleCode}
|
||||
</if>
|
||||
<if test="userId !=null and userId !='' ">
|
||||
and a.user_id != #{userId}
|
||||
</if>
|
||||
@@ -213,6 +232,13 @@
|
||||
OR a.create_by = #{createBy})
|
||||
</if>
|
||||
|
||||
<if test="userIds !=null and userIds.size() > 0 ">
|
||||
and a.user_id in
|
||||
<foreach item="id" collection="userIds" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="userId !=null and userId !='' ">
|
||||
and a.user_id = #{userId}
|
||||
</if>
|
||||
@@ -386,14 +412,6 @@
|
||||
<if test="userMemberCode != null and userMemberCode != ''">
|
||||
and a.user_member_code = #{userMemberCode}
|
||||
</if>
|
||||
/*联系人*/
|
||||
<if test="emergencyContactName != null and emergencyContactName != ''">
|
||||
and a.emergency_contact_name = #{emergencyContactName}
|
||||
</if>
|
||||
/*联系电话*/
|
||||
<if test="emergencyContactPhone != null and emergencyContactPhone != ''">
|
||||
and a.emergency_contact_phone = #{emergencyContactPhone}
|
||||
</if>
|
||||
/*详细地址*/
|
||||
<if test="userAreaAddress != null and userAreaAddress != ''">
|
||||
and a.user_area_address like concat('%' , #{userAreaAddress} , '%')
|
||||
@@ -406,6 +424,9 @@
|
||||
<if test="emergencyContactPhone != null and emergencyContactPhone != ''">
|
||||
and a.emergency_contact_phone like concat('%' , #{emergencyContactPhone} , '%')
|
||||
</if>
|
||||
<if test="userAreaCountyId != null and userAreaCountyId != ''">
|
||||
and a.user_area_county_id = #{userAreaCountyId}
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="selectAppUserList" resultType="com.mhd.common.core.domain.po.app.UserAppPo" parameterType="com.mhd.user.domain.userAggregate.repository.todo.UserDO">
|
||||
|
||||
@@ -42,6 +42,8 @@
|
||||
a.shipper_enterprise_fill_time,
|
||||
a.shipper_fill_remark,
|
||||
a.shipper_enterprise_fill_remark,
|
||||
a.monthly_settlement_flag,
|
||||
a.is_auto_audit_order,
|
||||
b.user_phone,
|
||||
b.user_name,
|
||||
b.role_name,
|
||||
@@ -379,4 +381,4 @@
|
||||
and esign_enterprise_status = #{userShipperEntity.esignEnterpriseStatus}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
@@ -0,0 +1,17 @@
|
||||
# 基础镜像
|
||||
FROM arm64v8/openjdk:8
|
||||
# author
|
||||
MAINTAINER manhuoda
|
||||
#指定东八区时区
|
||||
ENV TZ Asia/Shanghai
|
||||
#指定utf-8编码格
|
||||
ENV JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF-8"
|
||||
# VOLUME 指定了临时文件目录为/tmp。
|
||||
# 其效果是在主机 /var/lib/docker 目录下创建了一个临时文件,并链接到容器的/tmp
|
||||
VOLUME /tmp
|
||||
#将当前jar 复制到容器根目录下
|
||||
ADD target/mhd_bms.jar mhd_bms.jar
|
||||
#暴露容器端口 Docker镜像告知Docker宿主机应用监听了端口
|
||||
EXPOSE 8019
|
||||
# 运行jar包
|
||||
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-Xms1000m", "-Xmx1500m","-jar","/mhd_bms.jar"]
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user