This commit is contained in:
ludj
2024-05-23 16:43:27 +08:00
36 changed files with 2725 additions and 126 deletions

View File

@@ -1,9 +0,0 @@
Q
java:S3740#"/Provide the parametrized type for this generic.(ُ<><D98F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><38><C890><EFBFBD>1
L
java:S3740-"/Provide the parametrized type for this generic.(<28><><EFBFBD><EFBFBD><38><C990><EFBFBD>1
Q
java:S37404"/Provide the parametrized type for this generic.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><38><C990><EFBFBD>1
k java:S117#"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ُ<><D98F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
e java:S117;"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(<28><><EFBFBD>h

View File

@@ -1,24 +0,0 @@
v java:S116!"\Rename this field "storagevehicle_id" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
r java:S116&"^Rename this field "storagevehicle_code" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(<28><><EFBFBD>@
s java:S116+"^Rename this field "storagevehicle_name" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ƀ<><C680>
h java:S1160"SRename this field "one_code" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(<28><>ѩ
m java:S1165"SRename this field "two_code" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
i java:S116:"TRename this field "rfid_code" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(Ӎ<><D38D>
i java:S116?"TRename this field "create_id" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(<28><><EFBFBD><EFBFBD>
p java:S116D"VRename this field "create_name" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
p java:S116I"VRename this field "create_time" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ه<><D987><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
n java:S116N"TRename this field "update_id" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
p java:S116S"VRename this field "update_name" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
k java:S116X"VRename this field "update_time" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(<28><><EFBFBD><EFBFBD>
l java:S116^"RRename this field "is_used" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
s java:S116c"^Rename this field "storagevehicle_type" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(<28><><EFBFBD><EFBFBD>
l java:S116h"XRename this field "vehicle_width" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(<28><><EFBFBD>d
m java:S116n"YRename this field "vehicle_weight" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(<28><><EFBFBD>j
q java:S116t"WRename this field "vehicle_long" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
m java:S116y"YRename this field "vehicle_height" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(<28><><EFBFBD>I
t java:S116~"ZRename this field "overstruct_type" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ћ<><D19B><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
q java:S116<18>"[Rename this field "occupystruct_qty" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(پׅ
g java:S116<18>"QRename this field "ext_id" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(񐽕
A
java:S1128"+Remove this unused import 'java.util.Date'.(<28><><EFBFBD><EFBFBD>

View File

@@ -1,4 +0,0 @@
Q
java:S3740"/Provide the parametrized type for this generic.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>8<><38><EFBFBD><EFBFBD><EFBFBD>1
k java:S117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>

View File

@@ -1,4 +0,0 @@
y java:S116"dRename this field "storagevehicle_code_begin" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(<28><><EFBFBD><EFBFBD>
| java:S116"bRename this field "storagevehicle_code_end" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
s java:S116"^Rename this field "storagevehicle_type" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(<28><><EFBFBD><EFBFBD>

View File

@@ -1,32 +0,0 @@
E
java:S37400"/Provide the parametrized type for this generic.(<28><><EFBFBD><EFBFBD>
o
java:S11927"TDefine a constant instead of duplicating this literal "storagevehicle_code" 3 times.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
k java:S117."QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(<28>۟<EFBFBD><DB9F><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
g java:S117<18>"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(<28><><EFBFBD><EFBFBD>
x
java:S1488<18>"\Immediately return this expression instead of assigning it to the temporary variable "list".(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>

java:S1488<18>"\Immediately return this expression instead of assigning it to the temporary variable "json".(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>8<><38><EFBFBD><EFBFBD><EFBFBD>1
] java:S125("<This block of commented-out lines of code should be removed.(ެ<><DEAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>8<><38><EFBFBD><EFBFBD><EFBFBD>1
Z
java:S1854>"8Remove this useless assignment to local variable "code".(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>8<><38><EFBFBD><EFBFBD><EFBFBD>1
Z
java:S1854A"8Remove this useless assignment to local variable "code".(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>8<><38><EFBFBD><EFBFBD><EFBFBD>1
Z
java:S1854D"8Remove this useless assignment to local variable "code".(<28>ܽ<EFBFBD><DCBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>8<><38><EFBFBD><EFBFBD><EFBFBD>1
U
java:S1854G"8Remove this useless assignment to local variable "code".(Ç<><C387>8<><38><EFBFBD><EFBFBD><EFBFBD>1
U
java:S1854J"8Remove this useless assignment to local variable "code".(<28><><EFBFBD><EFBFBD>8<><38><EFBFBD><EFBFBD><EFBFBD>1
Z
java:S1854M"8Remove this useless assignment to local variable "code".(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>8<><38><EFBFBD><EFBFBD><EFBFBD>1
F
java:S1481;")Remove this unused "code" local variable.(<28><><EFBFBD><EFBFBD>8<><38><EFBFBD><EFBFBD><EFBFBD>1
< java:S131<""Add a default case to this switch.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
X java:S125U"<This block of commented-out lines of code should be removed.(<28><><EFBFBD><EFBFBD>8<><38><EFBFBD><EFBFBD><EFBFBD>1
X java:S125e"<This block of commented-out lines of code should be removed.(<28><><EFBFBD><EFBFBD>8<><38><EFBFBD><EFBFBD><EFBFBD>1
= java:S131<18>""Add a default case to this switch.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Y java:S125<18>"<This block of commented-out lines of code should be removed.(<28><><EFBFBD><EFBFBD>8<><38><EFBFBD><EFBFBD><EFBFBD>1
^ java:S125<18>"<This block of commented-out lines of code should be removed.(Ĵה<C4B4><D794><EFBFBD><EFBFBD><EFBFBD>8<><38><EFBFBD><EFBFBD><EFBFBD>1

View File

@@ -1,2 +0,0 @@
k java:S117""QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>

View File

@@ -73,22 +73,8 @@ Znladmin-system/src/main/java/org/nl/wms/base_manage/measure/service/dao/BmMeasu
fnladmin-system/src/main/java/org/nl/wms/base_manage/measure/service/impl/BmMeasureUnitServiceImpl.java,e/7/e70f0441bebe61574c00213f32c632aa2897c910
<EFBFBD>
cnladmin-system/src/main/java/org/nl/wms/base_manage/measure/controller/BmMeasureunitController.java,0/f/0f9efa8480b10f9adaa49898a79423f2ab0f6c1f
<EFBFBD>
fnladmin-system/src/main/java/org/nl/wms/base_manage/vehicle/service/impl/BmVehicleInfoServiceImpl.java,6/0/600228c110448d16e5738c74733e1807e77f1b53
<EFBFBD>
^nladmin-system/src/main/java/org/nl/wms/base_manage/vehicle/service/IBmVehicleInfoService.java,0/9/094339bed4ba4403f9b0c60c75ade3f6aa5e96bd
<EFBFBD>
gnladmin-system/src/main/java/org/nl/wms/base_manage/vehicle/service/dao/mapper/BmVehicleInfoMapper.java,2/a/2ad3fe4ba54e76946b9064e2e10aa26f43f04b61
<EFBFBD>
Znladmin-system/src/main/java/org/nl/wms/base_manage/vehicle/service/dao/BmVehicleInfo.java,1/b/1bd0fad6108c13d02e39735b623b7af835725dc9
<EFBFBD>
Ynladmin-system/src/main/java/org/nl/wms/base_manage/vehicle/service/dto/VehicleQuery.java,3/9/393731eb48daaa1a5f73e039a1985a2f2e7261dd
<EFBFBD>
jnladmin-system/src/main/java/org/nl/wms/base_manage/vehicle/service/dao/mapper/xml/BmVehicleInfoMapper.xml,4/c/4c8cfb9f6e3870061053a6e1c2ed8f7913178d04
<EFBFBD>
dnladmin-system/src/main/java/org/nl/wms/base_manage/supplier/service/impl/BmSupplierServiceImpl.java,4/f/4fc9e6b89767bdae6bb64ea2eb8bdc73585e739c
<EFBFBD>
cnladmin-system/src/main/java/org/nl/wms/base_manage/vehicle/controller/BmVehicleInfoController.java,7/9/796d922b8f48974be99c1f691627d6ead93d3114
<EFBFBD>
pnladmin-system/src/main/java/org/nl/wms/base_manage/class_standard/service/dao/mapper/BmClassStandardMapper.java,b/8/b8c90222b0fbaa1656cc1a615e04b9241ec81824
<EFBFBD>
@@ -125,14 +111,10 @@ Xnladmin-system/src/main/java/org/nl/wms/flow_manage/flow/service/enums/TaskType
Znladmin-system/src/main/java/org/nl/wms/flow_manage/flow/service/model/dto/ModelQuery.java,9/1/91fd50fd8729292d9e298d85ba01a6b5af8593fa
<EFBFBD>
enladmin-system/src/main/java/org/nl/wms/flow_manage/flow/service/deployment/IActReProcdefService.java,c/b/cbcdb312056e097d6f706d22c125cde37089b39f
p
@nladmin-system/src/main/java/org/nl/common/enums/StatusEnum.java,d/a/da2cfc661b6ccefab91ec1ba98461be21c19e65a
<EFBFBD>
bnladmin-system/src/main/java/org/nl/wms/flow_manage/flow/service/execution/dao/ActRuExecution.java,1/d/1d97c53dde4069e95a2a9b5e87f1839ef118d3b2
m
=nladmin-system/src/main/java/org/nl/common/TableDataInfo.java,a/8/a85494925056ae5a2edbd2ec7eee55976b36080f
<EFBFBD>
cnladmin-system/src/main/java/org/nl/wms/flow_manage/flow/controller/model/ActDeModelController.java,f/6/f6b31b91b229f78f8ac36ece953db50bf6d81854
<EFBFBD>
bnladmin-system/src/main/java/org/nl/wms/flow_manage/flow/service/execution/dto/ExecutionQuery.java,a/4/a44b52a4bc649baab711c5bd57004aa22cc2206b
p
@@ -141,8 +123,6 @@ t
Dnladmin-system/src/main/java/org/nl/common/domain/entity/QParam.java,c/8/c81fda2ed02b5dc9c21d70a813552d849bd642d8
<EFBFBD>
`nladmin-system/src/main/java/org/nl/wms/config_manage/form_struc/service/dto/FormStrucQuery.java,2/8/28bd56139ae8c49fb8b946a5db641cec587fe696
w
Gnladmin-system/src/main/java/org/nl/common/domain/entity/BaseQuery.java,f/0/f062b578de11e2952654784226f11bae7019cd76
<EFBFBD>
jnladmin-system/src/main/java/org/nl/wms/sync_manage/controller/form_mapping/SyncFormMappingController.java,1/7/17ecbef3e2c19e65dfe2e8c69c7b2fba4fcda5eb
<EFBFBD>
@@ -158,12 +138,64 @@ unladmin-system/src/main/java/org/nl/wms/flow_manage/flow/framework/process/node
<EFBFBD>
Xnladmin-system/src/main/java/org/nl/wms/external_system/acs/service/WmsToAcsService.java,2/0/20d3f5ca66f748f0a2bada36023b0308d4d552c0
<EFBFBD>
fnladmin-system/src/main/java/org/nl/wms/flow_manage/flow/controller/execution/ExecutionController.java,0/e/0e30069a5751c50d7cf828ec3c27e091f8565818
<EFBFBD>
fnladmin-system/src/main/java/org/nl/wms/flow_manage/flow/service/execution/IActRuExecutionService.java,6/c/6cccbeca1a92061e0584fff09e8c598223b372a6
<EFBFBD>
nnladmin-system/src/main/java/org/nl/wms/flow_manage/flow/service/execution/impl/ActRuExecutionServiceImpl.java,9/6/96baf0e9c082471a9e3e86559513272d2680fb09
<EFBFBD>
onladmin-system/src/main/java/org/nl/wms/base_manage/class_standard/service/impl/BmClassStandardServiceImpl.java,b/1/b140d08f0cb476ebc6fa39caddd1c7f4819af4c3
<EFBFBD>
]nladmin-system/src/main/java/org/nl/wms/config_manage/form_struc/service/dao/BmFormStruc.java,0/3/03deb92a49c3f6457dfffe6f76373226a7d40537
]nladmin-system/src/main/java/org/nl/wms/config_manage/form_struc/service/dao/BmFormStruc.java,0/3/03deb92a49c3f6457dfffe6f76373226a7d40537
<EFBFBD>
inladmin-system/src/main/java/org/nl/wms/md_manage/group_dick/service/dao/mapper/xml/MdGruopDickMapper.xml,9/b/9bde1f384edfc1c2eff393277b85a9af8acc73f8
w
Gnladmin-system/src/main/java/org/nl/common/domain/entity/PageQuery.java,4/c/4c2e7c33185348f635f5a9dbcc6943e1266cd690
<EFBFBD>
fnladmin-system/src/main/java/org/nl/wms/md_manage/group_dick/service/dao/mapper/MdGruopDickMapper.java,9/4/947b18c9ba0a550a79685e0bbb0c2e008a78ecf4
<EFBFBD>
]nladmin-system/src/main/java/org/nl/wms/md_manage/group_dick/service/IMdGruopDickService.java,2/1/21151f545e109906fa59e7b7b0154d60b7c5a908
<EFBFBD>
\nladmin-system/src/main/java/org/nl/wms/md_manage/group_dick/service/dto/GroupDickQuery.java,4/9/496d3ff8da16d905d8db54d3a8b7f523ee06f40f
<EFBFBD>
bnladmin-system/src/main/java/org/nl/wms/md_manage/group_dick/controller/MdGruopDickController.java,2/b/2bf79ab59317d0d6b177fe4f01b5d69517e7c0bd
<EFBFBD>
enladmin-system/src/main/java/org/nl/wms/md_manage/group_dick/service/impl/MdGruopDickServiceImpl.java,d/5/d5175090d4638102781aaeb7ed369c4622e8f70e
<EFBFBD>
[nladmin-system/src/main/java/org/nl/wms/pm_manage/form_data/service/IPmFormDataService.java,0/e/0e3d3e1c71243632b0cf4d4ce5d42bab41cbcbe2
<EFBFBD>
cnladmin-system/src/main/java/org/nl/wms/pm_manage/form_data/service/impl/PmFormDataServiceImpl.java,d/2/d20e36ad1812a5acaa116fa022508a7ca0cc28fa
<EFBFBD>
`nladmin-system/src/main/java/org/nl/wms/pm_manage/form_data/controller/PmFormDataController.java,c/4/c4b778bf4651d57a395e7eb2a9bcc835c076436d
<EFBFBD>
rnladmin-system/src/main/java/org/nl/wms/sync_manage/controller/field_mapping/BmExternalFieldMappingController.java,a/6/a62df3e5474a7acae99ed74773f4535db36a3580
<EFBFBD>
mnladmin-system/src/main/java/org/nl/wms/sync_manage/service/field_mapping/IBmExternalFieldMappingService.java,4/f/4fe5f0433cb3b03dbc94bbfa46bd64884cbcb475
<EFBFBD>
unladmin-system/src/main/java/org/nl/wms/sync_manage/service/field_mapping/impl/BmExternalFieldMappingServiceImpl.java,f/e/fe262f89e2718544e540e3b2ca63fb65f61f49dd
<EFBFBD>
fnladmin-system/src/main/java/org/nl/wms/config_manage/form_struc/controller/BmFormStrucController.java,0/4/04a9b66d50a0df59977636c2584c0b33c3c80690
<EFBFBD>
anladmin-system/src/main/java/org/nl/wms/config_manage/form_struc/service/IBmFormStrucService.java,5/6/56960b82d5e3cd8674859d178ac78e8156e56eff
<EFBFBD>
inladmin-system/src/main/java/org/nl/wms/config_manage/form_struc/service/impl/BmFormStrucServiceImpl.java,1/7/1734a0b319cf43162c6b2ef4cf7dc9cd2e838740
<EFBFBD>
dnladmin-system/src/main/java/org/nl/wms/pm_manage/form_data/service/dao/mapper/PmFormDataMapper.java,b/9/b91c99205a3139e42424e60dd5731332487e0667
<EFBFBD>
Znladmin-system/src/main/java/org/nl/wms/pm_manage/form_data/service/dto/FormDataQuery.java,9/0/90cde14dd61225ba9c416f9d10269bab669cd1ad
<EFBFBD>
gnladmin-system/src/main/java/org/nl/wms/pm_manage/form_data/service/dao/mapper/xml/PmFormDataMapper.xml,2/7/27ddde88021914d58fc637c1e790357ee86616ab
<EFBFBD>
Wnladmin-system/src/main/java/org/nl/wms/pm_manage/form_data/service/dao/PmFormData.java,6/b/6b1cc623ef87736e8a936dc1ca0c0b2c653fb82a
p
@nladmin-system/src/main/java/org/nl/common/enums/StatusEnum.java,d/a/da2cfc661b6ccefab91ec1ba98461be21c19e65a
<EFBFBD>
Pnladmin-system/src/main/java/org/nl/wms/flow_manage/event/FlowEventListener.java,0/0/000351c2d94d83aca2e1c6a17142cfc94473a457
}
Mnladmin-system/src/main/java/org/nl/wms/flow_manage/event/FlowStartEvent.java,e/e/ee0b7099ff5ea0631858c5b7767b9b3c39d157bd
<EFBFBD>
fnladmin-system/src/main/java/org/nl/wms/flow_manage/flow/controller/execution/ExecutionController.java,0/e/0e30069a5751c50d7cf828ec3c27e091f8565818
<EFBFBD>
cnladmin-system/src/main/java/org/nl/wms/flow_manage/flow/controller/model/ActDeModelController.java,f/6/f6b31b91b229f78f8ac36ece953db50bf6d81854
<EFBFBD>
]nladmin-system/src/main/java/org/nl/wms/flow_manage/flow/framework/config/InitFlowConfig.java,7/5/758c32dcd4ffc4e615e513ba6feb54def23e084a
<EFBFBD>
mnladmin-system/src/main/java/org/nl/wms/flow_manage/flow/framework/converter/node/impl/EndEventConverter.java,6/e/6eba45c7f4a86406f18cf8599c9e330f4b23040f

View File

@@ -0,0 +1,68 @@
package org.nl.wms.base_manage.bsrealstorattr.controller;
import org.nl.common.domain.entity.PageQuery;
import org.nl.wms.base_manage.bsrealstorattr.service.IStIvtBsrealstorattrService;
import org.nl.wms.base_manage.bsrealstorattr.service.dao.StIvtBsrealstorattr;
import org.nl.wms.base_manage.bsrealstorattr.service.dto.StorQuery;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* <p>
* 实物库属性表 前端控制器
* </p>
*
* @author author
* @since 2024-01-16
*/
@RestController
@RequestMapping("/api/stIvtBsrealstorattr")
public class StIvtBsrealstorattrController {
/**
* 仓库服务
*/
@Autowired
private IStIvtBsrealstorattrService iStIvtBsrealstorattrService;
@GetMapping
public ResponseEntity<Object> query(StorQuery query, PageQuery page){
return new ResponseEntity<>(iStIvtBsrealstorattrService.pageQuery(query,page), HttpStatus.OK);
}
@GetMapping("/getStor")
public ResponseEntity<Object> queryStor(@RequestParam Map whereJson) {
return new ResponseEntity<>(iStIvtBsrealstorattrService.getStor(whereJson), HttpStatus.OK);
}
@PostMapping
public ResponseEntity<Object> create(@Validated @RequestBody StIvtBsrealstorattr whereJson) {
iStIvtBsrealstorattrService.create(whereJson);
return new ResponseEntity<>(HttpStatus.OK);
}
@PutMapping
public ResponseEntity<Object> update(@Validated @RequestBody StIvtBsrealstorattr dao) {
iStIvtBsrealstorattrService.update(dao);
return new ResponseEntity<>(HttpStatus.OK);
}
@DeleteMapping
public ResponseEntity<Object> delete(@RequestBody Long[] ids) {
iStIvtBsrealstorattrService.deleteAll(ids);
return new ResponseEntity<>(HttpStatus.OK);
}
@PutMapping("/changeActive")
public ResponseEntity<Object> changeActive(@Validated @RequestBody StIvtBsrealstorattr dao) {
iStIvtBsrealstorattrService.changeActive(dao);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
}

View File

@@ -0,0 +1,68 @@
package org.nl.wms.base_manage.bsrealstorattr.service;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.IService;
import org.nl.common.domain.entity.PageQuery;
import org.nl.wms.base_manage.bsrealstorattr.service.dao.StIvtBsrealstorattr;
import org.nl.wms.base_manage.bsrealstorattr.service.dto.StorQuery;
import java.util.List;
import java.util.Map;
/**
* <p>
* 实物库属性表 服务类
* </p>
*
* @author author
* @since 2024-01-16
*/
public interface IStIvtBsrealstorattrService extends IService<StIvtBsrealstorattr> {
/**
* 根据仓库id搜索
* @param storId /
* @return StIvtBsrealstorattr 实体类对象
*/
StIvtBsrealstorattr getById(Long storId);
/**
* 分页查询
* @param query 查询条件
* @param page 分页查询
* @return Object
*/
Object pageQuery(StorQuery query, PageQuery page);
/**
* 获取仓库下拉框
* @param whereJson 查询条件
* @return JSONObject
*/
List<JSONObject> getStor(Map whereJson);
/**
* 新增仓库
* @param dao: 仓库实体类
*
*/
void create(StIvtBsrealstorattr dao);
/**
* 修改仓库
* @param dao仓库实体类
*/
void update(StIvtBsrealstorattr dao);
/**
* 删除仓库
* @param ids标识
*/
void deleteAll(Long[] ids);
/**
* 修改状态
* @param dao 仓库实体类
*/
void changeActive(StIvtBsrealstorattr dao);
}

View File

@@ -0,0 +1,189 @@
package org.nl.wms.base_manage.bsrealstorattr.service.dao;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* <p>
* 实物库属性表
* </p>
*
* @author author
* @since 2024-01-16
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("st_ivt_bsrealstorattr")
public class StIvtBsrealstorattr implements Serializable {
private static final Long serialVersionUID = 1L;
/**
* 仓库标识
*/
@TableId
private String stor_id;
/**
* 仓库编码
*/
private String stor_code;
/**
* 仓库名称
*/
private String stor_name;
/**
* 仓库简称
*/
private String simple_name;
/**
* 仓库容量
*/
private BigDecimal stor_capacity;
/**
* 总面积
*/
private BigDecimal total_area;
/**
* 仓库性质
*/
private String stor_type_scode;
/**
* 是否允许红冲
*/
private Boolean is_reversed;
/**
* 是否移出业务自动确认
*/
private Boolean is_mvout_auto_cfm;
/**
* 是否移入业务自动确认
*/
private Boolean is_mvin_auto_cfm;
/**
* 地区
*/
private String area;
/**
* 仓库地址
*/
private String storea_ddress;
/**
* 负责人
*/
private String principal;
/**
* 办公电话
*/
private String office_phone;
/**
* 负责人手机
*/
private String mobile_no;
/**
* 备注
*/
private String remark;
/**
* 显示顺序
*/
private BigDecimal order_index;
/**
* 状态
*/
private String whstate_scode;
/**
* 是否启用
*/
private Boolean is_used;
/**
* 物料基本分类
*/
private String base_class_id;
/**
* 创建人
*/
private String create_id;
/**
* 创建人姓名
*/
private String create_name;
/**
* 创建时间
*/
private String create_time;
/**
* 修改人
*/
private String update_id;
/**
* 修改人姓名
*/
private String update_name;
/**
* 修改时间
*/
private String update_time;
/**
* 拥有者ID
*/
private String sysownerid;
/**
* 部门ID
*/
private String sysdeptid;
/**
* 公司ID
*/
private String syscompanyid;
/**
* 外部标识
*/
private String ext_id;
/**
* 部门名称
*/
private String depart_name;
/**
* 公司名称
*/
private String company_name;
}

View File

@@ -0,0 +1,37 @@
package org.nl.wms.base_manage.bsrealstorattr.service.dao.mapper;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.nl.common.domain.entity.PageQuery;
import org.nl.wms.base_manage.bsrealstorattr.service.dao.StIvtBsrealstorattr;
import org.nl.wms.base_manage.bsrealstorattr.service.dto.StorQuery;
import java.util.List;
import java.util.Map;
/**
* <p>
* 实物库属性表 Mapper 接口
* </p>
*
* @author author
* @since 2024-01-16
*/
public interface StIvtBsrealstorattrMapper extends BaseMapper<StIvtBsrealstorattr> {
/**
* 分页查询
* @param query查询条件
* @param pageQuery 分页
* @return List<Map>
*/
List<Map> getPageQuery(@Param("query") StorQuery query, @Param("pageQuery") PageQuery pageQuery);
/**
* 获取仓库下拉框
* @param whereJson查询条件
* @return List<JSONObject>
*/
List<JSONObject> getStor(Map whereJson);
}

View File

@@ -0,0 +1,56 @@
<?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="org.nl.wms.base_manage.bsrealstorattr.service.dao.mapper.StIvtBsrealstorattrMapper">
<select id="getPageQuery" resultType="java.util.Map">
SELECT
*
FROM
st_ivt_bsrealstorattr
<where>
<if test="query.stor_code != null and query.stor_code != ''">
and (stor_code LIKE '%${query.stor_code}%'
or stor_name LIKE '%${query.stor_code}%')
</if>
</where>
</select>
<select id="getStor" resultType="com.alibaba.fastjson.JSONObject">
SELECT
CONVERT(stor_id , CHAR ) AS stor_id,
stor_name
FROM
st_ivt_bsrealstorattr
<where>
is_used = '1'
<if test="is_materialstore != null and is_materialstore != ''">
and is_materialstore = #{is_materialstore}
</if>
<if test="is_virtualstore != null and is_virtualstore != ''">
and is_virtualstore = #{is_virtualstore}
</if>
<if test="is_semi_finished != null and is_semi_finished != ''">
and is_semi_finished = #{is_semi_finished}
</if>
<if test="is_productstore != null and is_productstore != ''">
and is_productstore = #{is_productstore}
</if>
<if test="is_attachment != null and is_attachment != ''">
and is_attachment = #{is_attachment}
</if>
<if test="is_reversed != null and is_reversed != ''">
and is_reversed = #{is_reversed}
</if>
</where>
</select>
</mapper>

View File

@@ -0,0 +1,26 @@
package org.nl.wms.base_manage.bsrealstorattr.service.dto;
import lombok.Data;
import org.nl.common.domain.entity.BaseQuery;
import org.nl.common.domain.entity.QParam;
import org.nl.common.enums.QueryTEnum;
import org.nl.wms.base_manage.bsrealstorattr.service.dao.StIvtBsrealstorattr;
/**
* 仓库查询条件
* @author LXY
* @Date 2023/11/10 14:49
*/
@Data
public class StorQuery extends BaseQuery<StIvtBsrealstorattr> {
/**
* 仓库编码
*/
private String stor_code;
@Override
public void paramMapping() {
super.doP.put("stor_code", QParam.builder().k(new String[]{"stor_code"}).type(QueryTEnum.LK).build());
}
}

View File

@@ -0,0 +1,122 @@
package org.nl.wms.base_manage.bsrealstorattr.service.impl;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import org.nl.common.TableDataInfo;
import org.nl.common.domain.entity.PageQuery;
import org.nl.common.domain.exception.BadRequestException;
import org.nl.common.utils.IdUtil;
import org.nl.common.utils.SecurityUtils;
import org.nl.wms.base_manage.bsrealstorattr.service.IStIvtBsrealstorattrService;
import org.nl.wms.base_manage.bsrealstorattr.service.dao.StIvtBsrealstorattr;
import org.nl.wms.base_manage.bsrealstorattr.service.dao.mapper.StIvtBsrealstorattrMapper;
import org.nl.wms.base_manage.bsrealstorattr.service.dto.StorQuery;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Map;
/**
* <p>
* 实物库属性表 服务实现类
* </p>
*
* @author author
* @since 2024-01-16
*/
@Service
public class StIvtBsrealstorattrServiceImpl extends ServiceImpl<StIvtBsrealstorattrMapper, StIvtBsrealstorattr> implements IStIvtBsrealstorattrService {
@Override
public StIvtBsrealstorattr getById(Long storId) {
if (ObjectUtil.isEmpty(this.baseMapper.selectById(storId))) {
throw new BadRequestException("仓库不存在,请检查!");
}
return this.baseMapper.selectById(storId);
}
@Override
public Object pageQuery(StorQuery query, PageQuery pageQuery) {
Page<Object> page = PageHelper.startPage(pageQuery.getPage() + 1, pageQuery.getSize());
page.setOrderBy("create_time DESC");
List<Map> mst_detail = this.baseMapper.getPageQuery(query, pageQuery);
TableDataInfo<Map> build = TableDataInfo.build(mst_detail);
build.setTotalElements(page.getTotal());
return build;
}
@Override
public List<JSONObject> getStor(Map whereJson) {
return this.baseMapper.getStor(whereJson);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void create(StIvtBsrealstorattr dao) {
StIvtBsrealstorattr isDao = this.getOne(
new QueryWrapper<StIvtBsrealstorattr>().lambda()
.eq(StIvtBsrealstorattr::getStor_code, dao.getStor_code())
);
if (ObjectUtil.isNotEmpty(isDao)) {
throw new BadRequestException("已存在相同编码的仓库【" + dao.getStor_code() + "");
}
dao.setStor_id(IdUtil.getStringId());
dao.setCreate_id(SecurityUtils.getCurrentUserId());
dao.setCreate_name(SecurityUtils.getCurrentNickName());
dao.setUpdate_id(SecurityUtils.getCurrentUserId());
dao.setUpdate_name(SecurityUtils.getCurrentNickName());
dao.setUpdate_time(DateUtil.now());
dao.setCreate_time(DateUtil.now());
dao.setSyscompanyid("0");
dao.setSysdeptid("0");
dao.setSysownerid("0");
this.save(dao);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(StIvtBsrealstorattr dao) {
StIvtBsrealstorattr isDao = this.getById(dao.getStor_id());
if (isDao == null) {
throw new BadRequestException("被删除或无权限,操作失败!");
}
dao.setUpdate_time(DateUtil.now());
dao.setUpdate_id(SecurityUtils.getCurrentUserId());
dao.setUpdate_name(SecurityUtils.getCurrentNickName());
this.updateById(dao);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void deleteAll(Long[] ids) {
for (Long storId : ids) {
this.removeById(storId);
}
}
@Override
@Transactional(rollbackFor = Exception.class)
public void changeActive(StIvtBsrealstorattr dao) {
dao.setIs_used(dao.getIs_used());
dao.setUpdate_time(DateUtil.now());
dao.setUpdate_id(SecurityUtils.getCurrentUserId());
dao.setUpdate_name(SecurityUtils.getCurrentNickName());
this.updateById(dao);
}
}

View File

@@ -0,0 +1,75 @@
package org.nl.wms.base_manage.sect.controller;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.nl.common.TableDataInfo;
import org.nl.common.anno.Log;
import org.nl.common.domain.entity.PageQuery;
import org.nl.wms.base_manage.sect.service.IStIvtSectattrService;
import org.nl.wms.base_manage.sect.service.dao.StIvtSectattr;
import org.nl.wms.base_manage.sect.service.dto.SectQuery;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
/**
* <p>
* 库区属性表 前端控制器
* </p>
*
* @author author
* @since 2024-01-16
*/
@RestController
@RequestMapping("/api/stIvtSectattr")
public class StIvtSectattrController {
/**
* 库区服务
*/
@Autowired
private IStIvtSectattrService iStIvtSectattrService;
@GetMapping
public ResponseEntity<Object> query(SectQuery query, PageQuery page) {
return new ResponseEntity<>(iStIvtSectattrService.pageQuery(query, page), HttpStatus.OK);
}
@PostMapping
public ResponseEntity<Object> create(@Validated @RequestBody StIvtSectattr dao) {
iStIvtSectattrService.create(dao);
return new ResponseEntity<>(HttpStatus.OK);
}
@PutMapping
public ResponseEntity<Object> update(@Validated @RequestBody StIvtSectattr dao) {
iStIvtSectattrService.update(dao);
return new ResponseEntity<>(HttpStatus.OK);
}
@DeleteMapping
public ResponseEntity<Object> delete(@RequestBody Long[] ids) {
iStIvtSectattrService.deleteAll(ids);
return new ResponseEntity<>(HttpStatus.OK);
}
@PutMapping("/changeActive")
public ResponseEntity<Object> changeActive(@Validated @RequestBody StIvtSectattr dao) {
iStIvtSectattrService.changeActive(dao);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@GetMapping("/getSect")
//("查询库区下拉框")
public ResponseEntity<Object> querySect() {
List<Map> list = iStIvtSectattrService.getSect(new JSONObject());
return new ResponseEntity<>(TableDataInfo.build(list), HttpStatus.OK);
}
}

View File

@@ -0,0 +1,60 @@
package org.nl.wms.base_manage.sect.service;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.IService;
import org.nl.common.domain.entity.PageQuery;
import org.nl.wms.base_manage.sect.service.dao.StIvtSectattr;
import org.nl.wms.base_manage.sect.service.dto.SectQuery;
import java.util.List;
import java.util.Map;
/**
* <p>
* 库区属性表 服务类
* </p>
*
* @author author
* @since 2024-01-16
*/
public interface IStIvtSectattrService extends IService<StIvtSectattr> {
/**
* 查询库区
* @param query 查询条件
* @param page 分页查询
* @return Object
*/
Object pageQuery(SectQuery query, PageQuery page);
/**
* 新增库区
* @param dao库区实体
*/
void create(StIvtSectattr dao);
/**
* 修改库区
* @param dao 库区实体
*/
void update(StIvtSectattr dao);
/**
* 删除库区
* @param ids
*/
void deleteAll(Long[] ids);
/**
* 修改状态
* @param dao
*/
void changeActive(StIvtSectattr dao);
/**
* 查询库区下拉选
* @param json
* @return
*/
List<Map> getSect(JSONObject json);
}

View File

@@ -0,0 +1,185 @@
package org.nl.wms.base_manage.sect.service.dao;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* <p>
* 库区属性表
* </p>
*
* @author author
* @since 2024-01-16
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("st_ivt_sectattr")
public class StIvtSectattr implements Serializable {
private static final Long serialVersionUID = 1L;
/**
* 库区标识
*/
@TableId
private String sect_id;
/**
* 库区编码
*/
private String sect_code;
/**
* 库区名称
*/
private String sect_name;
/**
* 库区简称
*/
private String simple_name;
/**
* 库区类型
*/
private String sect_type_attr;
/**
* 仓库标识
*/
private String stor_id;
/**
* 仓库类型
*/
private String stor_type;
/**
* 容量
*/
private BigDecimal capacity;
/**
* 宽度
*/
private BigDecimal width;
/**
* 高度
*/
private BigDecimal height;
/**
* 深度
*/
private BigDecimal zdepth;
/**
* 起始X坐标
*/
private BigDecimal xqty;
/**
* 起始Y坐标
*/
private BigDecimal yqty;
/**
* 起始Z坐标
*/
private BigDecimal zqty;
/**
* 负责人
*/
private String sect_manager_name;
/**
* 负责人电话
*/
private String mobile_no;
/**
* 备注
*/
private String remark;
/**
* 创建人
*/
private String create_id;
/**
* 创建人姓名
*/
private String create_name;
/**
* 创建时间
*/
private String create_time;
/**
* 修改人
*/
private String update_id;
/**
* 修改人姓名
*/
private String update_name;
/**
* 修改时间
*/
private String update_time;
/**
* 是否删除
*/
private String is_delete;
/**
* 背景色
*/
private String back_ground_color;
/**
* 前景色
*/
private String front_ground_color;
/**
* 背景图片
*/
private String back_ground_pic;
/**
* 字体显示方向
*/
private String font_direction_scode;
/**
* 所在楼层
*/
private BigDecimal floor_no;
/**
* 是否启用
*/
private String is_used;
/**
* 外部标识
*/
private String ext_id;
}

View File

@@ -0,0 +1,32 @@
package org.nl.wms.base_manage.sect.service.dao.mapper;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.nl.common.domain.entity.PageQuery;
import org.nl.wms.base_manage.sect.service.dao.StIvtSectattr;
import org.nl.wms.base_manage.sect.service.dto.SectQuery;
import java.util.List;
import java.util.Map;
/**
* <p>
* 库区属性表 Mapper 接口
* </p>
*
* @author author
* @since 2024-01-16
*/
public interface StIvtSectattrMapper extends BaseMapper<StIvtSectattr> {
/**
* 分页查询
* @param query查询条件
* @param pageQuery 分页
* @return List<Map>
*/
List<Map> getPageQuery(@Param("query") SectQuery query, @Param("pageQuery") PageQuery pageQuery);
List<Map<String, String>> getSectByStorQuery(Map<String,Object> query);
}

View File

@@ -0,0 +1,73 @@
<?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="org.nl.wms.base_manage.sect.service.dao.mapper.StIvtSectattrMapper">
<select id="getPageQuery" resultType="java.util.Map">
SELECT
sect.*,
attr.stor_name
FROM
st_ivt_sectattr sect
LEFT JOIN st_ivt_bsrealstorattr attr ON sect.stor_id = attr.stor_id
<where>
sect.is_delete = '0'
<if test="query.stor_id != null and query.stor_id != ''">
and sect.stor_id = #{query.stor_id}
</if>
<if test="query.search != null and query.search != ''">
and (sect.sect_code LIKE '%${query.search}%'
or sect.sect_name LIKE '%${query.search}%')
</if>
</where>
</select>
<select id="getSectByStorQuery" resultType="java.util.Map">
SELECT
sect.sect_name,
sect.sect_id,
sect.sect_code,
stor.stor_name,
stor.stor_id,
stor.stor_code
FROM
st_ivt_sectattr sect
LEFT JOIN st_ivt_bsrealstorattr stor ON sect.stor_id = stor.stor_id
WHERE
stor.is_used = '1'
<if test="is_virtualstore != null and is_virtualstore != ''">
and stor.is_virtualstore = #{is_virtualstore}
</if>
<if test="is_semi_finished != null and is_semi_finished != ''">
and stor.is_semi_finished = #{is_semi_finished}
</if>
<if test="is_productstore != null and is_productstore != ''">
and stor.is_productstore = #{is_productstore}
</if>
<if test="is_attachment != null and is_attachment != ''">
and stor.is_attachment = #{is_attachment}
</if>
<if test="is_reversed != null and is_reversed != ''">
and stor.is_reversed = #{is_reversed}
</if>
<if test="stor_id != null and stor_id != ''">
and stor.stor_id = #{stor_id}
</if>
<if test="stor_id != null and stor_id != ''">
and stor.stor_id = #{stor_id}
</if>
<if test="stor_id != null and stor_id != ''">
and stor.stor_id = #{stor_id}
</if>
<if test="sect_type_attr != null and stor_id != ''">
and st_ivt_sectattr.sect_type_attr = #{sect_type_attr}
</if>
<if test="stor_type != null and stor_type != ''">
and stor.stor_type = #{stor_type}
</if>
</select>
</mapper>

View File

@@ -0,0 +1,38 @@
package org.nl.wms.base_manage.sect.service.dto;
import lombok.Data;
import org.nl.common.domain.entity.BaseQuery;
import org.nl.common.domain.entity.QParam;
import org.nl.common.enums.QueryTEnum;
import org.nl.wms.base_manage.bsrealstorattr.service.dao.StIvtBsrealstorattr;
/**
* 仓库查询条件
* @author LXY
* @Date 2023/11/10 14:49
*/
@Data
public class SectQuery extends BaseQuery<StIvtBsrealstorattr> {
/**
* 仓库编码
*/
private String stor_code;
/**
* 仓库id
*/
private String stor_id;
/**
* 库区编码
*/
private String sect_code;
private String search;
@Override
public void paramMapping() {
super.doP.put("stor_code", QParam.builder().k(new String[]{"stor_code"}).type(QueryTEnum.LK).build());
}
}

View File

@@ -0,0 +1,162 @@
package org.nl.wms.base_manage.sect.service.impl;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import org.nl.common.TableDataInfo;
import org.nl.common.domain.entity.PageQuery;
import org.nl.common.domain.exception.BadRequestException;
import org.nl.common.utils.IdUtil;
import org.nl.common.utils.SecurityUtils;
import org.nl.wms.base_manage.bsrealstorattr.service.IStIvtBsrealstorattrService;
import org.nl.wms.base_manage.bsrealstorattr.service.dao.StIvtBsrealstorattr;
import org.nl.wms.base_manage.sect.service.IStIvtSectattrService;
import org.nl.wms.base_manage.sect.service.dao.StIvtSectattr;
import org.nl.wms.base_manage.sect.service.dao.mapper.StIvtSectattrMapper;
import org.nl.wms.base_manage.sect.service.dto.SectQuery;
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.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* <p>
* 库区属性表 服务实现类
* </p>
*
* @author author
* @since 2024-01-16
*/
@Service
public class StIvtSectattrServiceImpl extends ServiceImpl<StIvtSectattrMapper, StIvtSectattr> implements IStIvtSectattrService {
/**
* 仓库服务
*/
@Autowired
private IStIvtBsrealstorattrService iStIvtBsrealstorattrService;
@Override
public Object pageQuery(SectQuery query, PageQuery pageQuery) {
Page<Object> page = PageHelper.startPage(pageQuery.getPage() + 1, pageQuery.getSize());
page.setOrderBy("create_time DESC");
List<Map> mst_detail = this.baseMapper.getPageQuery(query, pageQuery);
TableDataInfo<Map> build = TableDataInfo.build(mst_detail);
build.setTotalElements(page.getTotal());
return build;
}
@Override
@Transactional(rollbackFor = Exception.class)
public void create(StIvtSectattr dao) {
StIvtSectattr isDao = this.getOne(
new QueryWrapper<StIvtSectattr>().lambda()
.eq(StIvtSectattr::getSect_code, dao.getSect_code())
.eq(StIvtSectattr::getIs_delete, "0")
);
if (ObjectUtil.isNotEmpty(isDao)) {
throw new BadRequestException("已存在相同编码的仓库【"+dao.getSect_code()+"");
}
dao.setSect_id(IdUtil.getStringId());
dao.setCreate_id(SecurityUtils.getCurrentUserId());
dao.setCreate_name(SecurityUtils.getCurrentNickName());
dao.setUpdate_id(SecurityUtils.getCurrentUserId());
dao.setUpdate_name(SecurityUtils.getCurrentNickName());
dao.setUpdate_time(DateUtil.now());
dao.setCreate_time(DateUtil.now());
StIvtBsrealstorattr attrDao = iStIvtBsrealstorattrService.getById(dao.getStor_id());
dao.setStor_type(attrDao.getStor_type_scode());
this.save(dao);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(StIvtSectattr dao) {
StIvtSectattr isDao = this.getById(dao.getSect_id());
if (isDao == null) {
throw new BadRequestException("被删除或无权限,操作失败!");
}
dao.setUpdate_id(SecurityUtils.getCurrentUserId());
dao.setUpdate_name(SecurityUtils.getCurrentNickName());
dao.setUpdate_time(DateUtil.now());
StIvtBsrealstorattr attrDao = iStIvtBsrealstorattrService.getById(dao.getStor_id());
dao.setStor_type(attrDao.getStor_type_scode());
this.updateById(dao);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void deleteAll(Long[] ids) {
for (Long sectId : ids) {
this.update(
new UpdateWrapper<StIvtSectattr>().lambda()
.set(StIvtSectattr::getIs_delete, "1")
.set(StIvtSectattr::getUpdate_id, SecurityUtils.getCurrentUserId())
.set(StIvtSectattr::getUpdate_name, SecurityUtils.getCurrentNickName())
.set(StIvtSectattr::getUpdate_time, DateUtil.now())
.eq(StIvtSectattr::getSect_id, sectId)
);
}
}
@Override
@Transactional(rollbackFor = Exception.class)
public void changeActive(StIvtSectattr dao) {
String isUsed = "1";
if (StrUtil.equals("1", dao.getIs_used())) {
isUsed = "0";
}
dao.setIs_used(isUsed);
dao.setUpdate_time(DateUtil.now());
dao.setUpdate_id(SecurityUtils.getCurrentUserId());
dao.setUpdate_name(SecurityUtils.getCurrentNickName());
this.updateById(dao);
}
@Override
public List<Map> getSect(JSONObject json) {
List<Map<String, String>> sects = this.baseMapper.getSectByStorQuery(json);
Map<String, List<Map<String, String>>> groupBy_stor_id = sects.stream().collect(Collectors.groupingBy(a -> (String)((Map)a).get("stor_id")));
List stor_ja = new ArrayList<>();
for (Map.Entry<String, List<Map<String, String>>> entry : groupBy_stor_id.entrySet()) {
Map stor_cas = new HashMap<>();
List<Map<String, String>> sectList = entry.getValue();
stor_cas.put("value", entry.getKey());
stor_cas.put("label", sectList.get(0).get("stor_name"));
List sect_ja = new ArrayList<>();
for (Map<String, String> map : sectList) {
Map sect_cas = new HashMap<>();
sect_cas.put("value", String.valueOf(map.get("sect_id")));
sect_cas.put("label", map.get("sect_name"));
sect_ja.add(sect_cas);
}
stor_cas.put("children", sect_ja);
stor_ja.add(stor_cas);
}
return stor_ja;
}
}

View File

@@ -1,21 +1,64 @@
package org.nl.wms.stor_manage.struct.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 仓位属性表 前端控制器
* </p>
*
* @author generator
* @since 2024-04-08
*/
@RestController
@RequestMapping("/stIvtStructattr")
public class StIvtStructattrController {
}
package org.nl.wms.stor_manage.struct.controller;
import cn.hutool.core.date.DateUtil;
import org.nl.common.domain.entity.PageQuery;
import org.nl.common.utils.IdUtil;
import org.nl.common.utils.SecurityUtils;
import org.nl.wms.stor_manage.struct.service.IStIvtStructattrService;
import org.nl.wms.stor_manage.struct.service.dao.StIvtStructattr;
import org.nl.wms.stor_manage.struct.service.dto.StructattrQuery;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
/**
* <p>
* 仓位属性表 前端控制器
* </p>
*
* @author generator
* @since 2024-04-08
*/
@RestController
@RequestMapping("/api/structattr")
public class StIvtStructattrController {
@Autowired
private IStIvtStructattrService structattrService;
@GetMapping
public ResponseEntity<Object> query(StructattrQuery query, PageQuery page) {
return new ResponseEntity<>(structattrService.pageQuery(query,page), HttpStatus.OK);
}
@PostMapping
public ResponseEntity<Object> create(@Validated @RequestBody StIvtStructattr dto) {
dto.setId(IdUtil.getStringId());
dto.setCreate_id(SecurityUtils.getCurrentUserId());
dto.setCreate_name(SecurityUtils.getCurrentNickName());
dto.setCreate_time(DateUtil.now());
structattrService.save(dto);
return new ResponseEntity<>(HttpStatus.CREATED);
}
@PutMapping
public ResponseEntity<Object> update(@Validated @RequestBody StIvtStructattr dto) {
structattrService.updateById(dto);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@DeleteMapping
public ResponseEntity<Object> delete(@RequestBody Long[] ids) {
structattrService.deleteAll(ids);
return new ResponseEntity<>(HttpStatus.OK);
}
@PutMapping("/changeActive")
public ResponseEntity<Object> changeActive(@RequestBody StIvtStructattr dto) {
structattrService.changeActive(dto);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
}

View File

@@ -1,6 +1,7 @@
package org.nl.wms.stor_manage.struct.service;
import org.nl.wms.stor_manage.struct.service.dao.StIvtStructattr;
import org.nl.common.domain.entity.PageQuery;
import com.baomidou.mybatisplus.extension.service.IService;
import org.nl.wms.stor_manage.struct.service.dto.StructattrQuery;
@@ -25,4 +26,9 @@ public interface IStIvtStructattrService extends IService<StIvtStructattr> {
List<Map<String, Object>> getByQuery(StructattrQuery query);
void changeStruct(String struct_code,String vehicle_code,String task_type);
void deleteAll(Long[] ids);
Object pageQuery(StructattrQuery query, PageQuery page);
void changeActive(StIvtStructattr dto);
}

View File

@@ -1,6 +1,8 @@
package org.nl.wms.stor_manage.struct.service.dao;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

View File

@@ -1,7 +1,13 @@
package org.nl.wms.stor_manage.struct.service.dao.mapper;
import org.nl.wms.stor_manage.struct.service.dao.StIvtStructattr;
import org.apache.ibatis.annotations.Param;
import org.nl.common.domain.entity.PageQuery;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.nl.wms.stor_manage.struct.service.dto.StructattrQuery;
import java.util.List;
import java.util.Map;
/**
* <p>
@@ -13,4 +19,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public interface StIvtStructattrMapper extends BaseMapper<StIvtStructattr> {
List<Map> getPageQuery(@Param("query") StructattrQuery query, PageQuery pageQuery);
}

View File

@@ -2,4 +2,38 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.nl.wms.stor_manage.struct.service.dao.mapper.StIvtStructattrMapper">
<select id="getPageQuery" resultType="java.util.Map">
SELECT
struct.*,
sect.sect_name,
stor.stor_name
FROM
st_ivt_structattr struct
left join st_ivt_sectattr sect on sect.sect_id = struct.sect_code
left join st_ivt_bsrealstorattr stor on sect.stor_id = stor.stor_id
<where>
<if test="query.is_used == true">
and struct.is_used = '0'
</if>
<if test="query.is_used == false">
and struct.is_used = '1'
</if>
<if test="query.is_used == null and query.is_used == ''">
and struct.is_used = #{query.is_used}
</if>
<if test="query.stor_code != null and query.stor_code != ''">
and struct.stor_code = #{query.stor_code}
</if>
<if test="query.sect_code != null and query.sect_code != ''">
and struct.sect_code = #{query.sect_code}
</if>
<if test="query.lock_type != null and query.lock_type != ''">
and struct.lock_type = #{query.lock_type}
</if>
<if test="query.search != null and query.search != ''">
and (struct.struct_code LIKE '%${query.search}%'
or struct.struct_name LIKE '%${query.search}%')
</if>
</where>
</select>
</mapper>

View File

@@ -14,9 +14,13 @@ import org.nl.wms.stor_manage.struct.service.dao.StIvtStructattr;
public class StructattrQuery extends BaseQuery<StIvtStructattr> {
private String search;
private String stor_code;
private String sect_code;
private String lock_type;
private Boolean is_used;
@Override
public void paramMapping() {
super.doP.put("search", QParam.builder().k(new String[]{"unit_name"}).type(QueryTEnum.LK).build());
super.doP.put("search", QParam.builder().k(new String[]{"struct_code"}).type(QueryTEnum.LK).build());
}

View File

@@ -3,6 +3,10 @@ package org.nl.wms.stor_manage.struct.service.impl;
import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import org.nl.common.TableDataInfo;
import org.nl.common.domain.entity.PageQuery;
import org.nl.common.enums.StatusEnum;
import org.nl.common.utils.IdUtil;
import org.nl.wms.base_manage.vehicle.vehicleMater.service.IMdPbVehicleMaterService;
@@ -37,11 +41,6 @@ public class StIvtStructattrServiceImpl extends ServiceImpl<StIvtStructattrMappe
@Autowired
private IStIvtStructivtflowService structivtflowService;
@Override
public List<Map<String, Object>> getByQuery(StructattrQuery query) {
List<Map<String, Object>> maps = this.listMaps(query.build());
return maps;
}
public static void main(String[] args) {
Boolean in = StatusEnum.TASK_TYPE_IN.check("10");
@@ -78,4 +77,33 @@ public class StIvtStructattrServiceImpl extends ServiceImpl<StIvtStructattrMappe
structivtflowService.saveBatch(records);
}
@Override
public List<Map<String, Object>> getByQuery(StructattrQuery query) {
List<Map<String, Object>> maps = this.listMaps(query.build());
return maps;
}
@Override
public void deleteAll(Long[] ids) {
for (Long id : ids) {
this.removeById(id);
}
}
@Override
public Object pageQuery(StructattrQuery query, PageQuery pageQuery) {
Page<Object> page = PageHelper.startPage(pageQuery.getPage() + 1, pageQuery.getSize());
page.setOrderBy("create_time DESC");
List<Map> mst_detail = this.baseMapper.getPageQuery(query, pageQuery);
TableDataInfo<Map> build = TableDataInfo.build(mst_detail);
build.setTotalElements(page.getTotal());
return build;
}
@Override
public void changeActive(StIvtStructattr dto) {
dto.setIs_used(dto.getIs_used());
this.updateById(dto);
}
}

View File

@@ -0,0 +1,336 @@
<template>
<div class="app-container">
<!--工具栏-->
<div class="head-container">
<div v-if="crud.props.searchToggle">
<el-form
:inline="true"
class="demo-form-inline"
label-position="right"
label-width="80px"
label-suffix=":"
>
<el-form-item label="所属仓库">
<el-select
v-model="query.stor_id"
clearable
class="filter-item"
placeholder="所属仓库"
@change="crud.toQuery"
>
<el-option
v-for="item in stors"
:key="item.stor_id"
:label="item.stor_name"
:value="item.stor_id"
/>
</el-select>
</el-form-item>
<el-form-item label="库区信息">
<el-input
v-model="query.search"
clearable
class="filter-item"
style="width: 200px"
size="mini"
placeholder="输入库区编码或名称"
prefix-icon="el-icon-search"
@keyup.enter.native="crud.toQuery"
/>
<rrOperation />
</el-form-item>
</el-form>
</div>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation :permission="permission" />
<!--表单组件-->
<el-dialog
:close-on-click-modal="false"
:before-close="crud.cancelCU"
:visible.sync="crud.status.cu > 0"
:title="crud.status.title"
width="700px"
>
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="80px">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="库区编码" prop="sect_code">
<el-input v-model="form.sect_code" style="width: 200px;" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="库区名称" prop="sect_name">
<el-input v-model="form.sect_name" style="width: 200px;" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="库区简称">
<el-input v-model="form.simple_name" style="width: 200px;" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="归属仓库" prop="stor_id">
<el-select
v-model="form.stor_id"
placeholder=""
style="width: 200px"
>
<el-option
v-for="item in stors"
:key="item.stor_id"
:label="item.stor_name"
:value="item.stor_id"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="库区容量" prop="capacity">
<el-input v-model="form.capacity" style="width: 200px;" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="库区类型" prop="sect_type_attr">
<el-select
v-model="form.sect_type_attr"
placeholder=""
style="width: 200px"
>
<el-option
v-for="item in dict.st_sect_type"
:key="item.id"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="负责人">
<el-input v-model="form.sect_manager_name" style="width: 200px;" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="联系电话" prop="mobile_no">
<el-input v-model="form.mobile_no" style="width: 200px;" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="备注">
<label slot="label">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注</label>
<el-input v-model="form.remark" :rows="3" type="textarea" style="width: 550px;" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="crud.cancelCU">取消</el-button>
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
</div>
</el-dialog>
<!--表格渲染-->
<el-table
ref="table"
v-loading="crud.loading"
:data="crud.data"
size="mini"
style="width: 100%;"
@selection-change="crud.selectionChangeHandler"
>
<el-table-column prop="sect_code" sortable label="库区编码" />
<el-table-column prop="sect_name" label="库区名称" width="150" />
<el-table-column prop="simple_name" label="库区简称" width="150" />
<el-table-column prop="stor_name" label="仓库名称" width="150" />
<el-table-column prop="capacity" label="容量" />
<el-table-column prop="sect_manager_name" label="负责人" />
<el-table-column prop="mobile_no" label="联系电话" width="100px" />
<el-table-column label="是否启用" align="center" prop="is_used">
<template slot-scope="scope">
<el-switch
:value="format_is_used(scope.row.is_used)"
active-color="#409EFF"
inactive-color="#F56C6C"
@change="changeEnabled(scope.row, scope.row.is_used)"
/>
</template>
</el-table-column>
<el-table-column prop="ext_id" label="外部标识" />
<el-table-column prop="remark" label="备注" />
<el-table-column
v-permission="['admin','sectattr:edit','sectattr:del']"
label="操作"
width="120px"
fixed="right"
align="center"
>
<template slot-scope="scope">
<udOperation
:data="scope.row"
:permission="permission"
/>
</template>
</el-table-column>
</el-table>
<!--分页组件-->
<pagination />
</div>
</div>
</template>
<script>
import crudSectattr from './sectattr'
import CRUD, { crud, form, header, presenter } from '@crud/crud'
import rrOperation from '@crud/RR.operation'
import crudOperation from '@crud/CRUD.operation'
import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination'
import crudStorattr, { getStor } from '../stor/storattr'
import { isvalidPhone } from '@/utils/validate'
const defaultForm = {
sect_id: null,
sect_code: null,
sect_name: null,
simple_name: null,
sect_type_attr: null,
stor_id: null,
stor_type: null,
capacity: null,
width: null,
height: null,
zdepth: null,
xqty: null,
yqty: null,
zqty: null,
sect_manager_name: null,
mobile_no: null,
remark: null,
create_id: null,
create_name: null,
create_time: null,
update_optid: null,
update_optname: null,
update_time: null,
is_delete: null,
back_ground_color: null,
front_ground_color: null,
back_ground_pic: null,
font_direction_scode: null,
floor_no: null,
is_used: '',
ext_id: null
}
export default {
name: 'Sectattr',
dicts: ['st_sect_type', 'is_used'],
components: { pagination, crudOperation, rrOperation, udOperation },
mixins: [presenter(), header(), form(defaultForm), crud()],
cruds() {
return CRUD({
title: '库区',
optShow: { add: true, reset: true },
url: 'api/stIvtSectattr',
idField: 'sect_id',
sort: 'sect_id,desc',
crudMethod: { ...crudSectattr }
})
},
data() {
const validPhone = (rule, value, callback) => {
if (value && !isvalidPhone(value)) {
callback(new Error('请输入正确的11位手机号码'))
} else {
callback()
}
}
const numberOne = (rule, value, callback) => {
const numReg = /^[+]{0,1}(\d+)$|^[+]{0,1}(\d+\.\d+)$/
const numRe = new RegExp(numReg)
if (value) {
if (!numRe.test(value)) {
callback(new Error('只能输入数字'))
} else {
callback()
}
} else {
callback()
}
}
return {
stors: [],
permission: {
add: ['admin', 'user:add'],
edit: ['admin', 'user:edit'],
del: ['admin', 'user:del']
},
rules: {
sect_code: [
{ required: true, message: '库区编码不能为空', trigger: 'blur' }
],
sect_name: [
{ required: true, message: '库区名称不能为空', trigger: 'blur' }
],
sect_type_attr: [
{ required: true, message: '库区类型不能为空', trigger: 'blur' }
],
stor_id: [
{ required: true, message: '仓库标识不能为空', trigger: 'blur' }
],
capacity: [
{ required: false, message: '不能为空', trigger: 'blur' },
{ validator: numberOne }
],
mobile_no: [
{ required: false, trigger: 'blur', validator: validPhone }
]
}
}
},
created() {
crudStorattr.getStor({}).then(res => {
this.stors = res
})
},
methods: {
// 钩子在获取表格数据之前执行false 则代表不获取数据
[CRUD.HOOK.beforeRefresh]() {
return true
},
// 改变状态
format_is_used(is_used) {
return is_used === '1'
},
changeEnabled(data, val) {
let msg = '此操作将停用,是否继续!'
if (val !== '1') {
msg = '此操作将启用,是否继续!'
}
this.$confirm(msg, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
crudSectattr.changeActive(data).then(res => {
this.crud.toQuery()
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
}).catch(() => {
data.is_used = !data.is_used
})
}).catch(() => {
})
}
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,43 @@
import request from '@/utils/request'
export function add(data) {
return request({
url: 'api/stIvtSectattr',
method: 'post',
data
})
}
export function del(ids) {
return request({
url: 'api/stIvtSectattr/',
method: 'delete',
data: ids
})
}
export function edit(data) {
return request({
url: 'api/stIvtSectattr',
method: 'put',
data
})
}
export function getSect() {
return request({
url: 'api/stIvtSectattr/getSect',
method: 'get'
})
}
export function changeActive(data) {
return request({
url: 'api/stIvtSectattr/changeActive',
method: 'put',
data
})
}
export default { add, edit, del, getSect, changeActive }

View File

@@ -0,0 +1,368 @@
<template>
<div class="app-container">
<!--工具栏-->
<div class="head-container">
<el-form
:inline="true"
class="demo-form-inline"
label-position="right"
label-width="80px"
label-suffix=":"
>
<el-form-item label="仓库信息">
<el-input
v-model="query.stor_code"
clearable
style="width: 300px"
size="mini"
placeholder="输入仓库编码或名称"
prefix-icon="el-icon-search"
class="filter-item"
/>
<rrOperation />
</el-form-item>
</el-form>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation :permission="permission" />
<!--表单组件-->
<el-dialog
:close-on-click-modal="false"
:before-close="crud.cancelCU"
:visible.sync="crud.status.cu > 0"
:title="crud.status.title"
width="700px"
>
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="100px">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="仓库编码" prop="stor_code">
<el-input v-model="form.stor_code" style="width: 200px;" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="仓库名称" prop="stor_name">
<el-input v-model="form.stor_name" style="width: 200px;" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="仓库简称">
<el-input v-model="form.simple_name" style="width: 200px;" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="外部标识">
<el-input v-model="form.ext_id" style="width: 200px;" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="仓库容量" prop="stor_capacity">
<el-input v-model="form.stor_capacity" style="width: 200px;" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="总面积()" prop="total_area">
<el-input v-model="form.total_area" style="width: 200px;" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="仓库性质" prop="stor_type_scode">
<el-select
v-model="form.stor_type_scode"
placeholder=""
style="width: 200px"
>
<el-option
v-for="item in dict.st_stor_type"
:key="item.id"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="仓库地址">
<el-input v-model="form.storea_ddress" style="width: 200px;" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="负责人">
<el-input v-model="form.principal" style="width: 200px;" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="联系电话" prop="office_phone">
<el-input v-model="form.office_phone" style="width: 200px;" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="备注">
<label slot="label">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注</label>
<el-input v-model="form.remark" :rows="3" type="textarea" style="width: 550px;" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="crud.cancelCU">取消</el-button>
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
</div>
</el-dialog>
<!--表格渲染-->
<el-table
ref="table"
v-loading="crud.loading"
:data="crud.data"
size="mini"
style="width: 100%;"
@selection-change="crud.selectionChangeHandler"
>
<el-table-column prop="stor_code" label="仓库编码" />
<el-table-column prop="stor_name" label="仓库名称" width="150" />
<el-table-column prop="simple_name" label="简称" width="130" />
<el-table-column prop="stor_capacity" label="容量" />
<el-table-column prop="total_area" width="100px" label="总面积()" />
<el-table-column prop="label" label="仓库性质" />
<el-table-column prop="storea_ddress" label="地址" />
<el-table-column prop="principal" label="负责人" />
<el-table-column prop="office_phone" label="联系电话" width="130" />
<el-table-column prop="ext_id" label="外部标识" width="130" />
<el-table-column label="是否启用" align="center" prop="is_used">
<template slot-scope="scope">
<el-switch
v-model="scope.row.is_used"
active-color="#13ce66"
:active-value=true
:inactive-value=false
@change="changeEnabled(scope.row, scope.row.is_used)"
inactive-color="#ff4949">
</el-switch>
</template>
</el-table-column>
<el-table-column prop="remark" label="备注" />
<el-table-column
v-permission="['admin','stIvtBsrealstorattr:edit','stIvtBsrealstorattr:del']"
label="操作"
fixed="right"
width="120px"
align="center"
>
<template slot-scope="scope">
<udOperation
:data="scope.row"
:permission="permission"
/>
</template>
</el-table-column>
</el-table>
<!--分页组件-->
<pagination />
</div>
</div>
</template>
<script>
import crudStorattr from './storattr'
import CRUD, { crud, form, header, presenter } from '@crud/crud'
import rrOperation from '@crud/RR.operation'
import crudOperation from '@crud/CRUD.operation'
import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination'
import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import { getDepts, getDeptSuperior } from '@/views/system/dept/dept'
import { isvalidPhone } from '@/utils/validate'
const defaultForm = {
stor_id: null,
stor_code: null,
stor_name: null,
simple_name: null,
stor_capacity: null,
total_area: null,
stor_type_scode: null,
is_reversed: null,
is_mvout_auto_cfm: null,
is_mvin_auto_cfm: null,
area: null,
storea_ddress: null,
principal: null,
office_phone: null,
mobile_no: null,
remark: null,
order_index: null,
whstate_scode: null,
is_used: true,
base_class_id: null,
create_id: null,
create_name: null,
create_time: null,
update_optid: null,
update_optname: null,
update_time: null,
sysownerid: null,
sysdeptid: null,
syscompanyid: null,
is_delete: null,
ext_id: null,
depart_name: null,
company_name: null,
is_attachment: null
}
export default {
name: 'StIvtBsrealstorattr',
dicts: ['st_stor_type', 'is_used'],
components: { pagination, crudOperation, rrOperation, udOperation, Treeselect },
mixins: [presenter(), header(), form(defaultForm), crud()],
cruds() {
return CRUD({
title: '仓库',
optShow: { add: true, reset: true },
url: 'api/stIvtBsrealstorattr',
idField: 'stor_id',
sort: 'stor_id,desc',
crudMethod: { ...crudStorattr }
})
},
data() {
const validPhone = (rule, value, callback) => {
if (value && !isvalidPhone(value)) {
callback(new Error('请输入正确的11位手机号码'))
} else {
callback()
}
}
const numberOne = (rule, value, callback) => {
const numReg = /^[+]{0,1}(\d+)$|^[+]{0,1}(\d+\.\d+)$/
const numRe = new RegExp(numReg)
if (value) {
if (!numRe.test(value)) {
callback(new Error('只能输入数字'))
} else {
callback()
}
} else {
callback()
}
}
return {
depts: [],
permission: {},
rules: {
stor_code: [
{ required: true, message: '仓库编码不能为空', trigger: 'blur' }
],
stor_name: [
{ required: true, message: '仓库名称不能为空', trigger: 'blur' }
],
stor_capacity: [
{ required: false, message: '不能为空', trigger: 'blur' },
{ validator: numberOne }
],
total_area: [
{ required: false, message: '不能为空', trigger: 'blur' },
{ validator: numberOne }
],
office_phone: [
{ required: false, trigger: 'blur', validator: validPhone }
]
}
}
},
methods: {
// 新增与编辑前做的操作
[CRUD.HOOK.afterToCU](crud, form) {
if (form.id == null) {
this.getDepts()
} else {
this.getSupDepts(form.dept.id)
}
},
getDepts() {
getDepts({ enabled: true }).then(res => {
this.depts = res.content.map(function(obj) {
if (obj.hasChildren) {
obj.children = null
}
return obj
})
})
},
// 改变状态
format_is_used(is_used) {
return is_used === '1'
},
changeEnabled(data, val) {
let msg = '此操作将停用,是否继续!'
if (val) {
msg = '此操作将启用,是否继续!'
}
this.$confirm(msg, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
crudStorattr.changeActive(data).then(res => {
this.crud.toQuery()
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
}).catch(() => {
data.is_used = !data.is_used
})
}).catch(() => {
})
},
getSupDepts(deptId) {
getDeptSuperior(deptId).then(res => {
const date = res.content
this.buildDepts(date)
this.depts = date
})
},
buildDepts(depts) {
depts.forEach(data => {
if (data.children) {
this.buildDepts(data.children)
}
if (data.hasChildren && !data.children) {
data.children = null
}
})
},
loadDepts({ action, parentNode, callback }) {
if (action === LOAD_CHILDREN_OPTIONS) {
getDepts({ enabled: true, pid: parentNode.id }).then(res => {
parentNode.children = res.content.map(function(obj) {
if (obj.hasChildren) {
obj.children = null
}
return obj
})
setTimeout(() => {
callback()
}, 200)
})
}
},
// 钩子在获取表格数据之前执行false 则代表不获取数据
[CRUD.HOOK.beforeRefresh]() {
return true
}
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,43 @@
import request from '@/utils/request'
export function add(data) {
return request({
url: 'api/stIvtBsrealstorattr',
method: 'post',
data
})
}
export function del(ids) {
return request({
url: 'api/stIvtBsrealstorattr/',
method: 'delete',
data: ids
})
}
export function edit(data) {
return request({
url: 'api/stIvtBsrealstorattr',
method: 'put',
data
})
}
export function getStor(params) {
return request({
url: 'api/stIvtBsrealstorattr/getStor',
method: 'get',
params
})
}
export function changeActive(data) {
return request({
url: 'api/stIvtBsrealstorattr/changeActive',
method: 'put',
data
})
}
export default { add, edit, del, getStor, changeActive }

View File

@@ -0,0 +1,482 @@
<template>
<div class="app-container">
<div class="head-container">
<div v-if="crud.props.searchToggle">
<el-form
:inline="true"
class="demo-form-inline"
label-position="right"
label-width="80px"
label-suffix=":"
>
<el-form-item label="所属库区">
<el-cascader
placeholder="所属库区"
:options="sects"
:props="{ checkStrictly: true }"
clearable
class="filter-item"
@change="sectQueryChange"
/>
</el-form-item>
<el-form-item label="锁定类型">
<el-select
v-model="query.lock_type"
clearable
size="mini"
placeholder="锁定类型"
class="filter-item"
@change="crud.toQuery"
>
<el-option
v-for="item in dict.d_lock_type"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="模糊搜索">
<el-input
v-model="query.search"
clearable
size="mini"
placeholder="仓位编码、名称"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<el-form-item label="是否启用">
<el-switch
v-model="query.is_used"
:active-value=false
:inactive-value=true
active-color="#13ce66"
inactive-color="#ff4949"
@change="hand"
/>
</el-form-item>
<rrOperation />
</el-form>
</div>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation :permission="permission">
</crudOperation>
<!--表单组件-->
<el-dialog
:close-on-click-modal="false"
:before-close="crud.cancelCU"
:visible.sync="crud.status.cu > 0"
:title="crud.status.title"
width="700px"
>
<el-form ref="form" :model="form" :rules="rules" size="mini" label-suffix=":" label-width="90px">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="仓位编码" prop="struct_code">
<el-input v-model="form.struct_code" style="width: 200px;" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="仓位名称" prop="struct_name">
<el-input v-model="form.struct_name" style="width: 200px;" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="归属库区" prop="sect_id">
<el-cascader
v-model="form.cascader"
style="width: 200px;"
:options="sects"
clearable
@change="sectChange"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否临时" prop="is_tempstruct">
<el-radio v-model="form.is_tempstruct" label="1">是</el-radio>
<el-radio v-model="form.is_tempstruct" label="0">否</el-radio>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="载具号">
<label slot="label">载&nbsp;&nbsp;具&nbsp;号:</label>
<el-input v-model="form.storagevehicle_code" style="width: 200px;" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="锁定类型" prop="lock_type">
<el-select
v-model="form.lock_type"
style="width: 200px;"
placeholder=""
>
<el-option
v-for="item in dict.d_lock_type"
:key="item.id"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="容量" prop="capacity">
<label slot="label">容&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;量:</label>
<el-input v-model="form.capacity" style="width: 200px;" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="承受重量" prop="weight">
<el-input v-model="form.weight" style="width: 200px;" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="宽度" prop="width">
<label slot="label">宽&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;度:</label>
<el-input v-model="form.width" style="width: 200px;" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="深度" prop="zdepth">
<label slot="label">深&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;度:</label>
<el-input v-model="form.zdepth" style="width: 200px;" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="高度" prop="height">
<label slot="label">高&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;度:</label>
<el-input v-model="form.height" style="width: 200px;" />
</el-form-item>
</el-col>
<el-col :span="12">
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="备注">
<label slot="label">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注:</label>
<el-input v-model="form.remark" style="width: 550px;" rows="2" type="textarea" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="crud.cancelCU">取消</el-button>
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
</div>
</el-dialog>
<!--表格渲染-->
<el-table
ref="table"
v-loading="crud.loading"
:data="crud.data"
size="mini"
style="width: 100%;"
@selection-change="crud.selectionChangeHandler"
>
<!--
<el-table-column type="selection" width="55" />
-->
<el-table-column prop="struct_code" label="仓位编码" :min-width="flexWidth('struct_code',crud.data,'仓位编码')" />
<el-table-column prop="struct_name" label="仓位名称" :min-width="flexWidth('struct_name',crud.data,'仓位名称')" />
<el-table-column prop="sect_name" label="所属库区" width="150" />
<el-table-column prop="stor_name" label="所属仓库" width="150" />
<el-table-column prop="storagevehicle_code" label="载具号" :min-width="flexWidth('storagevehicle_code',crud.data,'载具号')" />
<el-table-column prop="is_temp" label="是否临时" width="150" >
<template slot-scope="scope">
{{ scope.row.is_temp ? '是' : '否' }}
</template>
</el-table-column>
<el-table-column prop="lock_type" label="锁定类型" min-width="120" show-overflow-tooltip>
<template slot-scope="scope">
{{ dict.label.d_lock_type[scope.row.lock_type] }}
</template>
</el-table-column>
<el-table-column label="是否启用" align="center" prop="is_used">
<template slot-scope="scope">
<el-switch
v-model="scope.row.is_used"
active-color="#13ce66"
:active-value=true
:inactive-value=false
inactive-color="#ff4949"
@change="changeEnabled(scope.row, scope.row.is_used)">
</el-switch>
</template>
</el-table-column>
<el-table-column prop="capacity" label="容量" show-overflow-tooltip />
<el-table-column prop="w" label="宽度" show-overflow-tooltip />
<el-table-column prop="h" label="高度" show-overflow-tooltip />
<el-table-column prop="l" label="深度" show-overflow-tooltip />
<el-table-column prop="remark" label="承受重量" show-overflow-tooltip />
<el-table-column prop="remark" label="备注" show-overflow-tooltip />
<el-table-column
v-permission="['admin','structattr:edit','structattr:del']"
label="操作"
fixed="right"
width="120px"
align="center"
>
<template slot-scope="scope">
<udOperation
:data="scope.row"
:permission="permission"
/>
</template>
</el-table-column>
</el-table>
<!--分页组件-->
<pagination />
</div>
</div>
</template>
<script>
import crudStructattr from './structattr'
import CRUD, { crud, form, header, presenter } from '@crud/crud'
import rrOperation from '@crud/RR.operation'
import crudOperation from '@crud/CRUD.operation'
import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination'
import crudSectattr from '../sect/sectattr'
import crudStorattr from "../stor/storattr";
// import crudUserStor, { getSect } from '@/views/wms/basedata/st/userStor/userStor'
/* import checkoutbill from "@/api/wms/st/core/outbill/checkoutbill";*/
const defaultForm = {
struct_id: null,
cascader: null,
struct_code: null,
struct_name: null,
simple_name: null,
sect_id: null,
sect_code: null,
sect_name: null,
stor_id: null,
stor_code: null,
stor_name: null,
stor_type: null,
capacity: null,
width: null,
height: null,
zdepth: null,
weight: null,
xqty: null,
yqty: null,
zqty: null,
is_tempstruct: '0',
create_id: null,
create_name: null,
create_time: null,
update_optid: null,
update_optname: null,
update_time: null,
is_delete: null,
back_ground_color: null,
front_ground_color: null,
back_ground_pic: null,
font_direction_scode: null,
is_used: null,
is_zdepth: null,
storagevehicle_id: null,
storagevehicle_code: null,
storagevehicle_type: null,
is_emptyvehicle: null,
storagevehicle_qty: null,
lock_type: null,
material_height_type: null,
ext_id: null,
remark: null
}
export default {
name: 'Structattr',
dicts: ['ST_HEIGHT_TYPE', 'is_used', 'd_lock_type', 'SCH_TASK_TYPE_DTL', 'placement_type'],
components: { pagination, crudOperation, rrOperation, udOperation },
mixins: [presenter(), header(), form(defaultForm), crud()],
cruds() {
return CRUD({
title: '仓位',
optShow: { add: true, reset: true },
url: 'api/structattr',
idField: 'struct_id',
crudMethod: { ...crudStructattr }
})
},
data() {
const numberOne = (rule, value, callback) => {
const numReg = /^[+]{0,1}(\d+)$|^[+]{0,1}(\d+\.\d+)$/
const numRe = new RegExp(numReg)
if (value) {
if (!numRe.test(value)) {
callback(new Error('只能输入数字'))
} else {
callback()
}
} else {
callback()
}
}
return {
openOneCreateDialog: false,
sects: [],
invtypelist: [],
permission: {},
layerList: [
{ 'label': '1层', 'value': '1' },
{ 'label': '2层', 'value': '2' },
{ 'label': '3层', 'value': '3' }
],
isHaveList: [
{ 'label': '空位', 'value': '1' },
{ 'label': '有货', 'value': '2' }
],
rules: {
struct_id: [
{ required: true, message: '仓位标识不能为空', trigger: 'blur' }
],
struct_code: [
{ required: true, message: '仓位编码不能为空', trigger: 'blur' }
],
struct_name: [
{ required: true, message: '仓位名称不能为空', trigger: 'blur' }
],
sect_id: [
{ required: true, message: '库区标识不能为空', trigger: 'blur' }
],
stor_id: [
{ required: true, message: '仓库标识不能为空', trigger: 'blur' }
],
capacity: [
{ required: false, message: '不能为空', trigger: 'blur' },
{ validator: numberOne }
],
weight: [
{ required: false, message: '不能为空', trigger: 'blur' },
{ validator: numberOne }
],
width: [
{ required: false, message: '不能为空', trigger: 'blur' },
{ validator: numberOne }
],
height: [
{ required: false, message: '不能为空', trigger: 'blur' },
{ validator: numberOne }
],
zdepth: [
{ required: false, message: '不能为空', trigger: 'blur' },
{ validator: numberOne }
],
material_height_type: [
{ required: true, message: '物料高度类型不能为空', trigger: 'blur' }
]
}
}
},
created() {
crudSectattr.getSect().then(res => {
this.sects = res.content
})
},
methods: {
// 钩子在获取表格数据之前执行false 则代表不获取数据
[CRUD.HOOK.beforeRefresh]() {
return true
},
[CRUD.HOOK.beforeToEdit](crud, form) {
const val = []
console.log(form)
val[0] = form.stor_code
val[1] = form.sect_code
form.cascader = val
},
[CRUD.HOOK.afterToEdit](crud, form) {
const val = []
val[0] = form.stor_code
val[1] = form.sect_code
form.cascader = val
},
sectChange(val) {
this.form.stor_code = val[0]
this.form.sect_code = val[1]
},
openOneCreate() {
this.openOneCreateDialog = true
},
invtypeFormat(row) {
for (const item of this.invtypelist) {
if (item.code === row.inv_type) {
return item.name
}
}
},
taskdtl_typeFormat(row) {
return this.dict.label.SCH_TASK_TYPE_DTL[row.taskdtl_type]
},
sectQueryChange(val) {
if (val.length === 1) {
this.query.stor_code = val[0]
this.query.sect_code = ''
}
if (val.length === 0) {
this.query.sect_code = ''
this.query.stor_code = ''
}
if (val.length === 2) {
this.query.stor_code = val[0]
this.query.sect_code = val[1]
}
this.crud.toQuery()
},
// 改变状态
format_is_used(is_used) {
return is_used === '1'
},
changeEnabled(data, val) {
let msg = '此操作将停用,是否继续!'
if (val) {
msg = '此操作将启用,是否继续!'
}
this.$confirm(msg, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
crudStructattr.changeActive(data).then(res => {
this.crud.toQuery()
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
}).catch(() => {
data.is_used = !data.is_used
})
}).catch(() => {
})
},
hand(){
this.crud.toQuery()
}
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,51 @@
import request from '@/utils/request'
export function add(data) {
return request({
url: 'api/structattr',
method: 'post',
data
})
}
export function del(ids) {
return request({
url: 'api/structattr/',
method: 'delete',
data: ids
})
}
export function edit(data) {
return request({
url: 'api/structattr',
method: 'put',
data
})
}
export function changeActive(data) {
return request({
url: 'api/structattr/changeActive',
method: 'put',
data
})
}
export function oneCreate(data) {
return request({
url: 'api/structattr/oneCreate',
method: 'post',
data
})
}
export function blurQuery(data) {
return request({
url: 'api/structattr/blurQuery',
method: 'post',
data
})
}
export default { add, edit, del, changeActive, oneCreate, blurQuery }

View File

@@ -50,6 +50,9 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="数据来源" prop="sourceData">
<el-input v-model="formData.sourceData"></el-input>
</el-form-item>
<el-form-item label="描述" prop="documentation">
<el-input v-model="formData.documentation"></el-input>
</el-form-item>
@@ -99,7 +102,8 @@ export default {
skipExpression: '',
form_type: '',
passNode: true,
documentation: ''
documentation: '',
sourceData: ''
},
rules: {
id: [