Commit f0272acb754d77855a78ad4da33e75288002e085
Merge remote-tracking branch 'origin/develop' into develop
Showing
20 changed files
with
921 additions
and
13 deletions
.idea/MyBatisCodeHelperDatasource.xml
@@ -6,9 +6,9 @@ | @@ -6,9 +6,9 @@ | ||
6 | <option name="addSerializeUid" value="true" /> | 6 | <option name="addSerializeUid" value="true" /> |
7 | <option name="generateService" value="true" /> | 7 | <option name="generateService" value="true" /> |
8 | <option name="generateServiceInterface" value="true" /> | 8 | <option name="generateServiceInterface" value="true" /> |
9 | - <option name="javaMapperPackage" value="com.huaheng.pc.config.excelTempate.mapper" /> | 9 | + <option name="javaMapperPackage" value="com.huaheng.pc.config.warehouseConfig.mapper" /> |
10 | <option name="javaMapperPath" value="$PROJECT_DIR$/src/main/java" /> | 10 | <option name="javaMapperPath" value="$PROJECT_DIR$/src/main/java" /> |
11 | - <option name="javaModelPackage" value="com.huaheng.pc.config.excelTempate.domain" /> | 11 | + <option name="javaModelPackage" value="com.huaheng.pc.config.warehouseConfig.domain" /> |
12 | <option name="javaModelPath" value="$PROJECT_DIR$/src/main/java" /> | 12 | <option name="javaModelPath" value="$PROJECT_DIR$/src/main/java" /> |
13 | <option name="lastDatabaseCrudChooseModuleName" value="huaheng" /> | 13 | <option name="lastDatabaseCrudChooseModuleName" value="huaheng" /> |
14 | <option name="moduleNameToPackageAndPathMap"> | 14 | <option name="moduleNameToPackageAndPathMap"> |
@@ -30,13 +30,13 @@ | @@ -30,13 +30,13 @@ | ||
30 | <entry key="huaheng"> | 30 | <entry key="huaheng"> |
31 | <value> | 31 | <value> |
32 | <UserPackageAndPathInfoByModule> | 32 | <UserPackageAndPathInfoByModule> |
33 | - <option name="javaMapperPackage" value="com.huaheng.pc.config.excelTempate.mapper" /> | 33 | + <option name="javaMapperPackage" value="com.huaheng.pc.config.warehouseConfig.mapper" /> |
34 | <option name="javaMapperPath" value="$PROJECT_DIR$/src/main/java" /> | 34 | <option name="javaMapperPath" value="$PROJECT_DIR$/src/main/java" /> |
35 | - <option name="javaModelPacakge" value="com.huaheng.pc.config.excelTempate.domain" /> | 35 | + <option name="javaModelPacakge" value="com.huaheng.pc.config.warehouseConfig.domain" /> |
36 | <option name="javaModelPath" value="$PROJECT_DIR$/src/main/java" /> | 36 | <option name="javaModelPath" value="$PROJECT_DIR$/src/main/java" /> |
37 | - <option name="javaServiceInterfacePackage" value="com.huaheng.pc.config.excelTempate.service" /> | 37 | + <option name="javaServiceInterfacePackage" value="com.huaheng.pc.config.warehouseConfig.service" /> |
38 | <option name="javaServiceInterfacePath" value="$PROJECT_DIR$/src/main/java" /> | 38 | <option name="javaServiceInterfacePath" value="$PROJECT_DIR$/src/main/java" /> |
39 | - <option name="javaServicePackage" value="com.huaheng.pc.config.excelTempate.service" /> | 39 | + <option name="javaServicePackage" value="com.huaheng.pc.config.warehouseConfig.service" /> |
40 | <option name="javaServicePath" value="$PROJECT_DIR$/src/main/java" /> | 40 | <option name="javaServicePath" value="$PROJECT_DIR$/src/main/java" /> |
41 | <option name="xmlPackage" value="config" /> | 41 | <option name="xmlPackage" value="config" /> |
42 | <option name="xmlPath" value="E:\code\wms2\src\main\resources\mybatis" /> | 42 | <option name="xmlPath" value="E:\code\wms2\src\main\resources\mybatis" /> |
@@ -158,6 +158,16 @@ | @@ -158,6 +158,16 @@ | ||
158 | </TableGenerateConfig> | 158 | </TableGenerateConfig> |
159 | </value> | 159 | </value> |
160 | </entry> | 160 | </entry> |
161 | + <entry key="wms_v2:log_execption"> | ||
162 | + <value> | ||
163 | + <TableGenerateConfig> | ||
164 | + <option name="generatedKey" value="" /> | ||
165 | + <option name="javaModelName" value="LogExecption" /> | ||
166 | + <option name="moduleName" value="huaheng" /> | ||
167 | + <option name="useActualColumnName" value="true" /> | ||
168 | + </TableGenerateConfig> | ||
169 | + </value> | ||
170 | + </entry> | ||
161 | <entry key="wms_v2:material"> | 171 | <entry key="wms_v2:material"> |
162 | <value> | 172 | <value> |
163 | <TableGenerateConfig> | 173 | <TableGenerateConfig> |
@@ -338,6 +348,16 @@ | @@ -338,6 +348,16 @@ | ||
338 | </TableGenerateConfig> | 348 | </TableGenerateConfig> |
339 | </value> | 349 | </value> |
340 | </entry> | 350 | </entry> |
351 | + <entry key="wms_v2:warehouse_config"> | ||
352 | + <value> | ||
353 | + <TableGenerateConfig> | ||
354 | + <option name="generatedKey" value="" /> | ||
355 | + <option name="javaModelName" value="WarehouseConfig" /> | ||
356 | + <option name="moduleName" value="huaheng" /> | ||
357 | + <option name="useActualColumnName" value="true" /> | ||
358 | + </TableGenerateConfig> | ||
359 | + </value> | ||
360 | + </entry> | ||
341 | <entry key="wms_v2:zone_capacity"> | 361 | <entry key="wms_v2:zone_capacity"> |
342 | <value> | 362 | <value> |
343 | <TableGenerateConfig> | 363 | <TableGenerateConfig> |
.idea/compiler.xml
@@ -6,8 +6,8 @@ | @@ -6,8 +6,8 @@ | ||
6 | <sourceOutputDir name="target/generated-sources/annotations" /> | 6 | <sourceOutputDir name="target/generated-sources/annotations" /> |
7 | <sourceTestOutputDir name="target/generated-test-sources/test-annotations" /> | 7 | <sourceTestOutputDir name="target/generated-test-sources/test-annotations" /> |
8 | <outputRelativeToContentRoot value="true" /> | 8 | <outputRelativeToContentRoot value="true" /> |
9 | - <module name="wms2" /> | ||
10 | <module name="huaheng" /> | 9 | <module name="huaheng" /> |
10 | + <module name="wms2" /> | ||
11 | </profile> | 11 | </profile> |
12 | </annotationProcessing> | 12 | </annotationProcessing> |
13 | </component> | 13 | </component> |
src/main/java/com/huaheng/pc/config/receiptType/controller/receiptTypeController.java
@@ -51,7 +51,7 @@ public class receiptTypeController extends BaseController { | @@ -51,7 +51,7 @@ public class receiptTypeController extends BaseController { | ||
51 | */ | 51 | */ |
52 | @ApiOperation(value="查看入库类型列表", notes="根据编码、类型、创建时间获取入库类型", httpMethod = "POST") | 52 | @ApiOperation(value="查看入库类型列表", notes="根据编码、类型、创建时间获取入库类型", httpMethod = "POST") |
53 | @RequiresPermissions("config:receiptType:list") | 53 | @RequiresPermissions("config:receiptType:list") |
54 | - @Log(title = "入库-入库类型",operating = "入库类型列表", action = BusinessType.GRANT) | 54 | + @Log(title = "配置-入库类型",operating = "入库类型列表", action = BusinessType.GRANT) |
55 | @PostMapping("/list") | 55 | @PostMapping("/list") |
56 | @ResponseBody | 56 | @ResponseBody |
57 | public TableDataInfo list(@ApiParam(name="receiptType",value="编码、类型") ReceiptType receiptType, | 57 | public TableDataInfo list(@ApiParam(name="receiptType",value="编码、类型") ReceiptType receiptType, |
@@ -92,7 +92,7 @@ public class receiptTypeController extends BaseController { | @@ -92,7 +92,7 @@ public class receiptTypeController extends BaseController { | ||
92 | */ | 92 | */ |
93 | @ApiOperation(value="新增入库类型", notes="新增入库类型", httpMethod = "POST") | 93 | @ApiOperation(value="新增入库类型", notes="新增入库类型", httpMethod = "POST") |
94 | @RequiresPermissions("config:receiptType:add") | 94 | @RequiresPermissions("config:receiptType:add") |
95 | - @Log(title = "入库-入库类型",operating = "新增入库类型", action = BusinessType.INSERT) | 95 | + @Log(title = "配置-入库类型",operating = "新增入库类型", action = BusinessType.INSERT) |
96 | @PostMapping("/add") | 96 | @PostMapping("/add") |
97 | @ResponseBody | 97 | @ResponseBody |
98 | public AjaxResult addSave(ReceiptType receiptType) { | 98 | public AjaxResult addSave(ReceiptType receiptType) { |
@@ -117,7 +117,7 @@ public class receiptTypeController extends BaseController { | @@ -117,7 +117,7 @@ public class receiptTypeController extends BaseController { | ||
117 | */ | 117 | */ |
118 | @ApiOperation(value="修改入库类型信息", notes="修改入库类型信息", httpMethod = "POST") | 118 | @ApiOperation(value="修改入库类型信息", notes="修改入库类型信息", httpMethod = "POST") |
119 | @RequiresPermissions("config:receiptType:edit") | 119 | @RequiresPermissions("config:receiptType:edit") |
120 | - @Log(title = "入库-入库类型",operating = "修改入库类型", action = BusinessType.UPDATE) | 120 | + @Log(title = "配置-入库类型",operating = "修改入库类型", action = BusinessType.UPDATE) |
121 | @PostMapping("/edit") | 121 | @PostMapping("/edit") |
122 | @ResponseBody | 122 | @ResponseBody |
123 | public AjaxResult editSave(ReceiptType receiptType) { | 123 | public AjaxResult editSave(ReceiptType receiptType) { |
@@ -130,7 +130,7 @@ public class receiptTypeController extends BaseController { | @@ -130,7 +130,7 @@ public class receiptTypeController extends BaseController { | ||
130 | */ | 130 | */ |
131 | @ApiOperation(value="删除入库信息", notes="单条删除或批量删除入库信息,示例1或1,2,3", httpMethod = "POST") | 131 | @ApiOperation(value="删除入库信息", notes="单条删除或批量删除入库信息,示例1或1,2,3", httpMethod = "POST") |
132 | @RequiresPermissions("config:receiptType:remove") | 132 | @RequiresPermissions("config:receiptType:remove") |
133 | - @Log(title = "入库-入库管理",operating = "修改入库", action = BusinessType.DELETE) | 133 | + @Log(title = "配置-入库管理",operating = "修改入库", action = BusinessType.DELETE) |
134 | @PostMapping( "/remove") | 134 | @PostMapping( "/remove") |
135 | @ResponseBody | 135 | @ResponseBody |
136 | public AjaxResult remove(String ids) { | 136 | public AjaxResult remove(String ids) { |
src/main/java/com/huaheng/pc/config/warehouseConfig/controller/WarehouseConfigController.java
0 → 100644
1 | +package com.huaheng.pc.config.warehouseConfig.controller; | ||
2 | + | ||
3 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||
4 | +import com.baomidou.mybatisplus.core.metadata.IPage; | ||
5 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||
6 | +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
7 | +import com.huaheng.common.utils.StringUtils; | ||
8 | +import com.huaheng.common.utils.security.ShiroUtils; | ||
9 | +import com.huaheng.framework.aspectj.lang.annotation.Log; | ||
10 | +import com.huaheng.framework.aspectj.lang.constant.BusinessType; | ||
11 | +import com.huaheng.framework.web.controller.BaseController; | ||
12 | +import com.huaheng.framework.web.domain.AjaxResult; | ||
13 | +import com.huaheng.framework.web.page.PageDomain; | ||
14 | +import com.huaheng.framework.web.page.TableDataInfo; | ||
15 | +import com.huaheng.framework.web.page.TableSupport; | ||
16 | +import com.huaheng.pc.config.warehouseConfig.domain.WarehouseConfig; | ||
17 | +import com.huaheng.pc.config.warehouseConfig.service.WarehouseConfigService; | ||
18 | +import io.swagger.annotations.ApiOperation; | ||
19 | +import io.swagger.annotations.ApiParam; | ||
20 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | ||
21 | +import org.springframework.stereotype.Controller; | ||
22 | +import org.springframework.ui.ModelMap; | ||
23 | +import org.springframework.web.bind.annotation.*; | ||
24 | + | ||
25 | +import javax.annotation.Resource; | ||
26 | +import java.util.List; | ||
27 | + | ||
28 | +@Controller | ||
29 | +@RequestMapping("/config/warehouse") | ||
30 | +public class WarehouseConfigController extends BaseController { | ||
31 | + | ||
32 | + private String prefix = "config/warehouse"; | ||
33 | + | ||
34 | + @Resource | ||
35 | + private WarehouseConfigService warehouseConfigService; | ||
36 | + | ||
37 | + @RequiresPermissions("config:warehouse:view") | ||
38 | + @GetMapping() | ||
39 | + public String receiptDetailHistory() { | ||
40 | + return prefix + "/warehouse"; | ||
41 | + } | ||
42 | + | ||
43 | + /** | ||
44 | + * 查询仓库配置 | ||
45 | + */ | ||
46 | + @ApiOperation(value="查看仓库配置", notes="根据编码获取仓库配置", httpMethod = "POST") | ||
47 | + @RequiresPermissions("config:warehouse:list") | ||
48 | + @Log(title = "配置-仓库配置",operating = "仓库配置列表", action = BusinessType.GRANT) | ||
49 | + @PostMapping("/list") | ||
50 | + @ResponseBody | ||
51 | + public TableDataInfo list(@ApiParam(name="WarehouseConfig",value="编码") WarehouseConfig warehouseConfig) { | ||
52 | + LambdaQueryWrapper<WarehouseConfig> lambda = Wrappers.lambdaQuery(); | ||
53 | + PageDomain pageDomain = TableSupport.buildPageRequest(); | ||
54 | + Integer pageNum = pageDomain.getPageNum(); | ||
55 | + Integer pageSize = pageDomain.getPageSize(); | ||
56 | + lambda.eq(StringUtils.isNotEmpty(warehouseConfig.getWarehouseCode()), WarehouseConfig::getWarehouseCode | ||
57 | + , warehouseConfig.getWarehouseCode()); | ||
58 | + | ||
59 | + if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){ | ||
60 | + /*使用分页查询*/ | ||
61 | + Page<WarehouseConfig> page = new Page<>(pageNum, pageSize); | ||
62 | + IPage<WarehouseConfig> iPage = warehouseConfigService.page(page, lambda); | ||
63 | + return getMpDataTable(iPage.getRecords(), iPage.getTotal()); | ||
64 | + } else { | ||
65 | + List<WarehouseConfig> list = warehouseConfigService.list(lambda); | ||
66 | + return getDataTable(list); | ||
67 | + } | ||
68 | + } | ||
69 | + | ||
70 | + /** | ||
71 | + * 新增仓库配置 | ||
72 | + */ | ||
73 | + @GetMapping("/add") | ||
74 | + public String add() { | ||
75 | + return prefix + "/add"; | ||
76 | + } | ||
77 | + | ||
78 | + /** | ||
79 | + * 新增保存仓库配置 | ||
80 | + */ | ||
81 | + @ApiOperation(value="新增仓库配置", notes="新增仓库配置", httpMethod = "POST") | ||
82 | + @RequiresPermissions("config:warehouse:add") | ||
83 | + @Log(title = "配置-仓库配置",operating = "新增仓库配置", action = BusinessType.INSERT) | ||
84 | + @PostMapping("/add") | ||
85 | + @ResponseBody | ||
86 | + public AjaxResult addSave(WarehouseConfig warehouseConfig) { | ||
87 | + LambdaQueryWrapper<WarehouseConfig> lambda = Wrappers.lambdaQuery(); | ||
88 | + lambda.eq(WarehouseConfig::getWarehouseCode, warehouseConfig.getWarehouseCode()); | ||
89 | + if (warehouseConfigService.getOne(lambda) != null){ | ||
90 | + return AjaxResult.error("当前仓库已存在配置"); | ||
91 | + } | ||
92 | + warehouseConfig.setCreatedBy(ShiroUtils.getLoginName()); | ||
93 | + warehouseConfig.setLastUpdatedBy(ShiroUtils.getLoginName()); | ||
94 | + return toAjax(warehouseConfigService.save(warehouseConfig)); | ||
95 | + } | ||
96 | + | ||
97 | + /** | ||
98 | + * 修改仓库配置 | ||
99 | + */ | ||
100 | + @GetMapping("/edit/{id}") | ||
101 | + public String edit(@PathVariable("id") Integer id, ModelMap mmap) { | ||
102 | + WarehouseConfig warehouseConfig = warehouseConfigService.getById(id); | ||
103 | + mmap.put("warehouseConfig", warehouseConfig); | ||
104 | + return prefix + "/edit"; | ||
105 | + } | ||
106 | + | ||
107 | + /** | ||
108 | + * 修改保存仓库配置 | ||
109 | + */ | ||
110 | + @ApiOperation(value="修改仓库配置信息", notes="修改仓库配置信息", httpMethod = "POST") | ||
111 | + @RequiresPermissions("config:warehouse:edit") | ||
112 | + @Log(title = "配置-仓库配置",operating = "修改仓库配置", action = BusinessType.UPDATE) | ||
113 | + @PostMapping("/edit") | ||
114 | + @ResponseBody | ||
115 | + public AjaxResult editSave(WarehouseConfig warehouseConfig) { | ||
116 | + warehouseConfig.setLastUpdatedBy(ShiroUtils.getLoginName()); | ||
117 | + return toAjax(warehouseConfigService.updateById(warehouseConfig)); | ||
118 | + } | ||
119 | + | ||
120 | +} |
src/main/java/com/huaheng/pc/config/warehouseConfig/domain/WarehouseConfig.java
0 → 100644
1 | +package com.huaheng.pc.config.warehouseConfig.domain; | ||
2 | + | ||
3 | +import com.baomidou.mybatisplus.annotation.IdType; | ||
4 | +import com.baomidou.mybatisplus.annotation.TableField; | ||
5 | +import com.baomidou.mybatisplus.annotation.TableId; | ||
6 | +import com.baomidou.mybatisplus.annotation.TableName; | ||
7 | +import io.swagger.annotations.ApiModel; | ||
8 | +import io.swagger.annotations.ApiModelProperty; | ||
9 | +import java.io.Serializable; | ||
10 | +import java.util.Date; | ||
11 | +import lombok.Data; | ||
12 | + | ||
13 | +@ApiModel(value="com.huaheng.pc.config.warehouseConfig.domain.WarehouseConfig") | ||
14 | +@Data | ||
15 | +@TableName(value = "warehouse_config") | ||
16 | +public class WarehouseConfig implements Serializable { | ||
17 | + /** | ||
18 | + * 编码 | ||
19 | + */ | ||
20 | + @TableId(value = "code", type = IdType.INPUT) | ||
21 | + @ApiModelProperty(value="编码") | ||
22 | + private String code; | ||
23 | + | ||
24 | + /** | ||
25 | + * 仓库编码 | ||
26 | + */ | ||
27 | + @TableField(value = "warehouseCode") | ||
28 | + @ApiModelProperty(value="仓库编码") | ||
29 | + private String warehouseCode; | ||
30 | + | ||
31 | + /** | ||
32 | + * 名称 | ||
33 | + */ | ||
34 | + @TableField(value = "name") | ||
35 | + @ApiModelProperty(value="名称") | ||
36 | + private String name; | ||
37 | + | ||
38 | + /** | ||
39 | + * ABC分类 | ||
40 | + */ | ||
41 | + @TableField(value = "abcClass") | ||
42 | + @ApiModelProperty(value="ABC分类") | ||
43 | + private String abcClass; | ||
44 | + | ||
45 | + /** | ||
46 | + * 保质期(天) | ||
47 | + */ | ||
48 | + @TableField(value = "daysToExpire") | ||
49 | + @ApiModelProperty(value="保质期(天)") | ||
50 | + private Integer daysToExpire; | ||
51 | + | ||
52 | + /** | ||
53 | + * 定位规则 | ||
54 | + */ | ||
55 | + @TableField(value = "locatingRule") | ||
56 | + @ApiModelProperty(value="定位规则") | ||
57 | + private String locatingRule; | ||
58 | + | ||
59 | + /** | ||
60 | + * 分配规则 | ||
61 | + */ | ||
62 | + @TableField(value = "allocationRule") | ||
63 | + @ApiModelProperty(value="分配规则") | ||
64 | + private String allocationRule; | ||
65 | + | ||
66 | + /** | ||
67 | + * 补货规则 | ||
68 | + */ | ||
69 | + @TableField(value = "replenishmentRule") | ||
70 | + @ApiModelProperty(value="补货规则") | ||
71 | + private String replenishmentRule; | ||
72 | + | ||
73 | + /** | ||
74 | + * 空货位规则 | ||
75 | + */ | ||
76 | + @TableField(value = "emptyLocRule") | ||
77 | + @ApiModelProperty(value="空货位规则") | ||
78 | + private String emptyLocRule; | ||
79 | + | ||
80 | + /** | ||
81 | + * 入库流程 | ||
82 | + */ | ||
83 | + @TableField(value = "receivingFlow") | ||
84 | + @ApiModelProperty(value="入库流程") | ||
85 | + private String receivingFlow; | ||
86 | + | ||
87 | + /** | ||
88 | + * 出库流程 | ||
89 | + */ | ||
90 | + @TableField(value = "shippingFlow") | ||
91 | + @ApiModelProperty(value="出库流程") | ||
92 | + private String shippingFlow; | ||
93 | + | ||
94 | + /** | ||
95 | + * 属性模版 | ||
96 | + */ | ||
97 | + @TableField(value = "attributeTemplateCode") | ||
98 | + @ApiModelProperty(value="属性模版") | ||
99 | + private String attributeTemplateCode; | ||
100 | + | ||
101 | + /** | ||
102 | + * 记录序列号 | ||
103 | + */ | ||
104 | + @TableField(value = "trackSerialNum") | ||
105 | + @ApiModelProperty(value="记录序列号") | ||
106 | + private Integer trackSerialNum; | ||
107 | + | ||
108 | + /** | ||
109 | + * 自动生成序列号 | ||
110 | + */ | ||
111 | + @TableField(value = "autoGenSerialNum") | ||
112 | + @ApiModelProperty(value="自动生成序列号") | ||
113 | + private Integer autoGenSerialNum; | ||
114 | + | ||
115 | + /** | ||
116 | + * 自动生成序列号表达式 | ||
117 | + */ | ||
118 | + @TableField(value = "autoGenSerialNumFormat") | ||
119 | + @ApiModelProperty(value="自动生成序列号表达式") | ||
120 | + private String autoGenSerialNumFormat; | ||
121 | + | ||
122 | + /** | ||
123 | + * 序列号模版 | ||
124 | + */ | ||
125 | + @TableField(value = "snTemplateCode") | ||
126 | + @ApiModelProperty(value="序列号模版") | ||
127 | + private String snTemplateCode; | ||
128 | + | ||
129 | + /** | ||
130 | + * 临期预警天数 | ||
131 | + */ | ||
132 | + @TableField(value = "expiringDays") | ||
133 | + @ApiModelProperty(value="临期预警天数") | ||
134 | + private Integer expiringDays; | ||
135 | + | ||
136 | + /** | ||
137 | + * 收货预警天数 | ||
138 | + */ | ||
139 | + @TableField(value = "minShelfLifeDays") | ||
140 | + @ApiModelProperty(value="收货预警天数") | ||
141 | + private Integer minShelfLifeDays; | ||
142 | + | ||
143 | + /** | ||
144 | + * 状态 | ||
145 | + */ | ||
146 | + @TableField(value = "enable") | ||
147 | + @ApiModelProperty(value="状态") | ||
148 | + private Integer enable; | ||
149 | + | ||
150 | + /** | ||
151 | + * 创建时间 | ||
152 | + */ | ||
153 | + @TableField(value = "created") | ||
154 | + @ApiModelProperty(value="创建时间") | ||
155 | + private Date created; | ||
156 | + | ||
157 | + /** | ||
158 | + * 创建用户 | ||
159 | + */ | ||
160 | + @TableField(value = "createdBy") | ||
161 | + @ApiModelProperty(value="创建用户") | ||
162 | + private String createdBy; | ||
163 | + | ||
164 | + /** | ||
165 | + * 创建时间 | ||
166 | + */ | ||
167 | + @TableField(value = "lastUpdated") | ||
168 | + @ApiModelProperty(value="创建时间") | ||
169 | + private Date lastUpdated; | ||
170 | + | ||
171 | + /** | ||
172 | + * 更新用户 | ||
173 | + */ | ||
174 | + @TableField(value = "lastUpdatedBy") | ||
175 | + @ApiModelProperty(value="更新用户") | ||
176 | + private String lastUpdatedBy; | ||
177 | + | ||
178 | + /** | ||
179 | + * 数据版本 | ||
180 | + */ | ||
181 | + @TableField(value = "version") | ||
182 | + @ApiModelProperty(value="数据版本") | ||
183 | + private Integer version; | ||
184 | + | ||
185 | + /** | ||
186 | + * 自定义字段1 | ||
187 | + */ | ||
188 | + @TableField(value = "userDef1") | ||
189 | + @ApiModelProperty(value="自定义字段1") | ||
190 | + private String userDef1; | ||
191 | + | ||
192 | + /** | ||
193 | + * 自定义字段2 | ||
194 | + */ | ||
195 | + @TableField(value = "userDef2") | ||
196 | + @ApiModelProperty(value="自定义字段2") | ||
197 | + private String userDef2; | ||
198 | + | ||
199 | + /** | ||
200 | + * 自定义字段3 | ||
201 | + */ | ||
202 | + @TableField(value = "userDef3") | ||
203 | + @ApiModelProperty(value="自定义字段3") | ||
204 | + private String userDef3; | ||
205 | + | ||
206 | + /** | ||
207 | + * 自定义字段4 | ||
208 | + */ | ||
209 | + @TableField(value = "userDef4") | ||
210 | + @ApiModelProperty(value="自定义字段4") | ||
211 | + private String userDef4; | ||
212 | + | ||
213 | + /** | ||
214 | + * 自定义字段5 | ||
215 | + */ | ||
216 | + @TableField(value = "userDef5") | ||
217 | + @ApiModelProperty(value="自定义字段5") | ||
218 | + private String userDef5; | ||
219 | + | ||
220 | + /** | ||
221 | + * 自定义字段6 | ||
222 | + */ | ||
223 | + @TableField(value = "userDef6") | ||
224 | + @ApiModelProperty(value="自定义字段6") | ||
225 | + private String userDef6; | ||
226 | + | ||
227 | + /** | ||
228 | + * 自定义字段7 | ||
229 | + */ | ||
230 | + @TableField(value = "userDef7") | ||
231 | + @ApiModelProperty(value="自定义字段7") | ||
232 | + private String userDef7; | ||
233 | + | ||
234 | + /** | ||
235 | + * 自定义字段8 | ||
236 | + */ | ||
237 | + @TableField(value = "userDef8") | ||
238 | + @ApiModelProperty(value="自定义字段8") | ||
239 | + private String userDef8; | ||
240 | + | ||
241 | + private static final long serialVersionUID = 1L; | ||
242 | +} | ||
0 | \ No newline at end of file | 243 | \ No newline at end of file |
src/main/java/com/huaheng/pc/config/warehouseConfig/mapper/WarehouseConfigMapper.java
0 → 100644
1 | +package com.huaheng.pc.config.warehouseConfig.mapper; | ||
2 | + | ||
3 | +import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||
4 | +import com.huaheng.pc.config.warehouseConfig.domain.WarehouseConfig; | ||
5 | + | ||
6 | +public interface WarehouseConfigMapper extends BaseMapper<WarehouseConfig> { | ||
7 | +} | ||
0 | \ No newline at end of file | 8 | \ No newline at end of file |
src/main/java/com/huaheng/pc/config/warehouseConfig/service/WarehouseConfigService.java
0 → 100644
src/main/java/com/huaheng/pc/config/warehouseConfig/service/WarehouseConfigServiceImpl.java
0 → 100644
1 | +package com.huaheng.pc.config.warehouseConfig.service; | ||
2 | + | ||
3 | +import org.springframework.stereotype.Service; | ||
4 | +import javax.annotation.Resource; | ||
5 | +import java.util.List; | ||
6 | +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||
7 | +import com.huaheng.pc.config.warehouseConfig.domain.WarehouseConfig; | ||
8 | +import com.huaheng.pc.config.warehouseConfig.mapper.WarehouseConfigMapper; | ||
9 | +import com.huaheng.pc.config.warehouseConfig.service.WarehouseConfigService; | ||
10 | +@Service | ||
11 | +public class WarehouseConfigServiceImpl extends ServiceImpl<WarehouseConfigMapper, WarehouseConfig> implements WarehouseConfigService{ | ||
12 | + | ||
13 | +} |
src/main/java/com/huaheng/pc/general/container/controller/ContainerController.java
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers; | @@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||
6 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 6 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
7 | import com.huaheng.common.support.Convert; | 7 | import com.huaheng.common.support.Convert; |
8 | import com.huaheng.common.utils.StringUtils; | 8 | import com.huaheng.common.utils.StringUtils; |
9 | +import com.huaheng.common.utils.poi.ExcelUtil; | ||
9 | import com.huaheng.common.utils.security.ShiroUtils; | 10 | import com.huaheng.common.utils.security.ShiroUtils; |
10 | import com.huaheng.framework.aspectj.lang.annotation.Log; | 11 | import com.huaheng.framework.aspectj.lang.annotation.Log; |
11 | import com.huaheng.framework.aspectj.lang.constant.BusinessType; | 12 | import com.huaheng.framework.aspectj.lang.constant.BusinessType; |
@@ -16,6 +17,7 @@ import com.huaheng.framework.web.page.TableDataInfo; | @@ -16,6 +17,7 @@ import com.huaheng.framework.web.page.TableDataInfo; | ||
16 | import com.huaheng.framework.web.page.TableSupport; | 17 | import com.huaheng.framework.web.page.TableSupport; |
17 | import com.huaheng.pc.general.container.domain.Container; | 18 | import com.huaheng.pc.general.container.domain.Container; |
18 | import com.huaheng.pc.general.container.service.ContainerService; | 19 | import com.huaheng.pc.general.container.service.ContainerService; |
20 | +import com.huaheng.pc.general.material.domain.Material; | ||
19 | import io.swagger.annotations.Api; | 21 | import io.swagger.annotations.Api; |
20 | import io.swagger.annotations.ApiOperation; | 22 | import io.swagger.annotations.ApiOperation; |
21 | import io.swagger.annotations.ApiParam; | 23 | import io.swagger.annotations.ApiParam; |
@@ -23,6 +25,7 @@ import org.apache.shiro.authz.annotation.RequiresPermissions; | @@ -23,6 +25,7 @@ import org.apache.shiro.authz.annotation.RequiresPermissions; | ||
23 | import org.springframework.stereotype.Controller; | 25 | import org.springframework.stereotype.Controller; |
24 | import org.springframework.ui.ModelMap; | 26 | import org.springframework.ui.ModelMap; |
25 | import org.springframework.web.bind.annotation.*; | 27 | import org.springframework.web.bind.annotation.*; |
28 | +import org.springframework.web.multipart.MultipartFile; | ||
26 | 29 | ||
27 | import javax.annotation.Resource; | 30 | import javax.annotation.Resource; |
28 | import java.util.List; | 31 | import java.util.List; |
@@ -155,4 +158,22 @@ public class ContainerController extends BaseController { | @@ -155,4 +158,22 @@ public class ContainerController extends BaseController { | ||
155 | } | 158 | } |
156 | return AjaxResult.success("删除成功!"); | 159 | return AjaxResult.success("删除成功!"); |
157 | } | 160 | } |
161 | + | ||
162 | + @PostMapping("/importData") | ||
163 | + @ResponseBody | ||
164 | + public AjaxResult importData(MultipartFile file) throws Exception { | ||
165 | + ExcelUtil<Container> util = new ExcelUtil<>(Container.class); | ||
166 | + List<Container> containerList = util.importExcel(file.getInputStream()); | ||
167 | + String operName = ShiroUtils.getLoginName(); | ||
168 | + Boolean updateSupport = false; | ||
169 | + String message = containerService.importMaterial(containerList, updateSupport, operName); | ||
170 | + return AjaxResult.success(message); | ||
171 | + } | ||
172 | + | ||
173 | + @GetMapping("/importTemplate") | ||
174 | + @ResponseBody | ||
175 | + public AjaxResult importTemplate() { | ||
176 | + ExcelUtil<Container> util = new ExcelUtil<>(Container.class); | ||
177 | + return util.importTemplateExcel("容器"); | ||
178 | + } | ||
158 | } | 179 | } |
src/main/java/com/huaheng/pc/general/container/domain/Container.java
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.IdType; | @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.IdType; | ||
4 | import com.baomidou.mybatisplus.annotation.TableField; | 4 | import com.baomidou.mybatisplus.annotation.TableField; |
5 | import com.baomidou.mybatisplus.annotation.TableId; | 5 | import com.baomidou.mybatisplus.annotation.TableId; |
6 | import com.baomidou.mybatisplus.annotation.TableName; | 6 | import com.baomidou.mybatisplus.annotation.TableName; |
7 | +import com.huaheng.framework.aspectj.lang.annotation.Excel; | ||
7 | import io.swagger.annotations.ApiModel; | 8 | import io.swagger.annotations.ApiModel; |
8 | import io.swagger.annotations.ApiModelProperty; | 9 | import io.swagger.annotations.ApiModelProperty; |
9 | import lombok.Data; | 10 | import lombok.Data; |
@@ -20,6 +21,7 @@ public class Container implements Serializable { | @@ -20,6 +21,7 @@ public class Container implements Serializable { | ||
20 | */ | 21 | */ |
21 | @TableId(value = "id", type = IdType.AUTO) | 22 | @TableId(value = "id", type = IdType.AUTO) |
22 | @ApiModelProperty(value="内部号") | 23 | @ApiModelProperty(value="内部号") |
24 | + @Excel(name = "内部号", type = Excel.Type.EXPORT) | ||
23 | private Integer id; | 25 | private Integer id; |
24 | 26 | ||
25 | /** | 27 | /** |
@@ -27,6 +29,7 @@ public class Container implements Serializable { | @@ -27,6 +29,7 @@ public class Container implements Serializable { | ||
27 | */ | 29 | */ |
28 | @TableField(value = "name") | 30 | @TableField(value = "name") |
29 | @ApiModelProperty(value="容器名字") | 31 | @ApiModelProperty(value="容器名字") |
32 | + @Excel(name = "容器名字") | ||
30 | private String name; | 33 | private String name; |
31 | 34 | ||
32 | /** | 35 | /** |
@@ -34,6 +37,7 @@ public class Container implements Serializable { | @@ -34,6 +37,7 @@ public class Container implements Serializable { | ||
34 | */ | 37 | */ |
35 | @TableField(value = "code") | 38 | @TableField(value = "code") |
36 | @ApiModelProperty(value="容器编码") | 39 | @ApiModelProperty(value="容器编码") |
40 | + @Excel(name = "容器编码") | ||
37 | private String code; | 41 | private String code; |
38 | 42 | ||
39 | /** | 43 | /** |
@@ -41,6 +45,7 @@ public class Container implements Serializable { | @@ -41,6 +45,7 @@ public class Container implements Serializable { | ||
41 | */ | 45 | */ |
42 | @TableField(value = "warehouseCode") | 46 | @TableField(value = "warehouseCode") |
43 | @ApiModelProperty(value="仓库代码") | 47 | @ApiModelProperty(value="仓库代码") |
48 | + @Excel(name = "仓库编码") | ||
44 | private String warehouseCode; | 49 | private String warehouseCode; |
45 | 50 | ||
46 | /** | 51 | /** |
@@ -48,6 +53,7 @@ public class Container implements Serializable { | @@ -48,6 +53,7 @@ public class Container implements Serializable { | ||
48 | */ | 53 | */ |
49 | @TableField(value = "companyCode") | 54 | @TableField(value = "companyCode") |
50 | @ApiModelProperty(value="货主编码") | 55 | @ApiModelProperty(value="货主编码") |
56 | + @Excel(name = "货主编码") | ||
51 | private String companyCode; | 57 | private String companyCode; |
52 | 58 | ||
53 | @TableField(value = "locationCode") | 59 | @TableField(value = "locationCode") |
@@ -59,6 +65,7 @@ public class Container implements Serializable { | @@ -59,6 +65,7 @@ public class Container implements Serializable { | ||
59 | */ | 65 | */ |
60 | @TableField(value = "containerType") | 66 | @TableField(value = "containerType") |
61 | @ApiModelProperty(value="容器类型") | 67 | @ApiModelProperty(value="容器类型") |
68 | + @Excel(name = "容器类型") | ||
62 | private String containerType; | 69 | private String containerType; |
63 | 70 | ||
64 | /** | 71 | /** |
@@ -101,6 +108,7 @@ public class Container implements Serializable { | @@ -101,6 +108,7 @@ public class Container implements Serializable { | ||
101 | */ | 108 | */ |
102 | @TableField(value = "enable") | 109 | @TableField(value = "enable") |
103 | @ApiModelProperty(value="启用;0—禁用") | 110 | @ApiModelProperty(value="启用;0—禁用") |
111 | + @Excel(name = "是否启用", prompt = "启用;0 禁用:1") | ||
104 | private Integer enable; | 112 | private Integer enable; |
105 | 113 | ||
106 | /** | 114 | /** |
src/main/java/com/huaheng/pc/general/container/service/ContainerService.java
@@ -3,10 +3,13 @@ package com.huaheng.pc.general.container.service; | @@ -3,10 +3,13 @@ package com.huaheng.pc.general.container.service; | ||
3 | import com.huaheng.framework.web.domain.AjaxResult; | 3 | import com.huaheng.framework.web.domain.AjaxResult; |
4 | import com.huaheng.pc.general.container.domain.Container; | 4 | import com.huaheng.pc.general.container.domain.Container; |
5 | import com.baomidou.mybatisplus.extension.service.IService; | 5 | import com.baomidou.mybatisplus.extension.service.IService; |
6 | +import com.huaheng.pc.general.material.domain.Material; | ||
6 | 7 | ||
7 | import java.util.List; | 8 | import java.util.List; |
8 | 9 | ||
9 | public interface ContainerService extends IService<Container>{ | 10 | public interface ContainerService extends IService<Container>{ |
10 | 11 | ||
11 | - public AjaxResult<List<Container>> insertContainer(String type, Integer quantity); | 12 | + AjaxResult<List<Container>> insertContainer(String type, Integer quantity); |
13 | + | ||
14 | + String importMaterial(List<Container> containerList, Boolean updateSupport, String operName); | ||
12 | } | 15 | } |
src/main/java/com/huaheng/pc/general/container/service/ContainerServiceImpl.java
@@ -2,12 +2,15 @@ package com.huaheng.pc.general.container.service; | @@ -2,12 +2,15 @@ package com.huaheng.pc.general.container.service; | ||
2 | 2 | ||
3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
4 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | 4 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
5 | +import com.huaheng.common.exception.BusinessException; | ||
5 | import com.huaheng.common.exception.service.ServiceException; | 6 | import com.huaheng.common.exception.service.ServiceException; |
7 | +import com.huaheng.common.utils.StringUtils; | ||
6 | import com.huaheng.common.utils.security.ShiroUtils; | 8 | import com.huaheng.common.utils.security.ShiroUtils; |
7 | import com.huaheng.framework.web.domain.AjaxResult; | 9 | import com.huaheng.framework.web.domain.AjaxResult; |
8 | import com.huaheng.pc.config.containerType.domain.ContainerType; | 10 | import com.huaheng.pc.config.containerType.domain.ContainerType; |
9 | import com.huaheng.pc.config.containerType.service.ContainerTypeService; | 11 | import com.huaheng.pc.config.containerType.service.ContainerTypeService; |
10 | import com.huaheng.pc.general.container.domain.ContainerStatus; | 12 | import com.huaheng.pc.general.container.domain.ContainerStatus; |
13 | +import com.huaheng.pc.general.material.domain.Material; | ||
11 | import org.apache.commons.collections.functors.ConstantFactory; | 14 | import org.apache.commons.collections.functors.ConstantFactory; |
12 | import org.springframework.stereotype.Service; | 15 | import org.springframework.stereotype.Service; |
13 | import javax.annotation.Resource; | 16 | import javax.annotation.Resource; |
@@ -65,4 +68,47 @@ public class ContainerServiceImpl extends ServiceImpl<ContainerMapper, Container | @@ -65,4 +68,47 @@ public class ContainerServiceImpl extends ServiceImpl<ContainerMapper, Container | ||
65 | return 0; | 68 | return 0; |
66 | } | 69 | } |
67 | } | 70 | } |
71 | + | ||
72 | + public String importMaterial(List<Container> containerList, Boolean updateSupport, String operName){ | ||
73 | + if (StringUtils.isNull(containerList) || containerList.size() == 0) { | ||
74 | + throw new BusinessException("导入数据不能为空!"); | ||
75 | + } | ||
76 | + int successNum = 0; | ||
77 | + int failureNum = 0; | ||
78 | + StringBuilder successMsg = new StringBuilder(); | ||
79 | + StringBuilder failureMsg = new StringBuilder(); | ||
80 | + for (Container container : containerList) { | ||
81 | + try { | ||
82 | + LambdaQueryWrapper<Container> lambdaQueryWrapper = Wrappers.lambdaQuery(); | ||
83 | + lambdaQueryWrapper.eq(Container::getCode, container.getCode()); | ||
84 | + // 验证是否存在这个容器 | ||
85 | + Container m = this.getOne(lambdaQueryWrapper); | ||
86 | + | ||
87 | + if (StringUtils.isNull(m)) { | ||
88 | + System.out.println(ShiroUtils.getLoginName()); | ||
89 | + container.setCreatedBy(ShiroUtils.getUser().getLoginName()); | ||
90 | + container.setLastUpdatedBy(ShiroUtils.getLoginName()); | ||
91 | + this.save(container); | ||
92 | + successNum++; | ||
93 | + successMsg.append("<br/>" + successNum + "、编码 " + container.getCode() + " 导入成功"); | ||
94 | + } else { | ||
95 | + String msg = "<br/>" + failureNum + "、编码" + container.getCode() + " 已存在:"; | ||
96 | + failureMsg.append(msg); | ||
97 | + log.error(msg); | ||
98 | + } | ||
99 | + } catch (Exception e) { | ||
100 | + failureNum++; | ||
101 | + String msg = "<br/>" + failureNum + "、编码" + container.getCode() + " 导入失败:"; | ||
102 | + failureMsg.append(msg + e.getMessage()); | ||
103 | + log.error(msg, e); | ||
104 | + } | ||
105 | + } | ||
106 | + if (failureNum > 0) { | ||
107 | + failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:"); | ||
108 | + throw new BusinessException(failureMsg.toString()); | ||
109 | + } else { | ||
110 | + successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:"); | ||
111 | + } | ||
112 | + return successMsg.toString(); | ||
113 | + } | ||
68 | } | 114 | } |
src/main/java/com/huaheng/pc/general/material/service/MaterialService.java
@@ -11,7 +11,7 @@ public interface MaterialService extends IService<Material>{ | @@ -11,7 +11,7 @@ public interface MaterialService extends IService<Material>{ | ||
11 | AjaxResult removeByIds(String ids); | 11 | AjaxResult removeByIds(String ids); |
12 | 12 | ||
13 | 13 | ||
14 | - public String importMaterial(List<Material> materialList, Boolean updateSupport,String operName); | 14 | + String importMaterial(List<Material> materialList, Boolean updateSupport,String operName); |
15 | 15 | ||
16 | 16 | ||
17 | } | 17 | } |
src/main/java/com/huaheng/pc/monitor/logExecption/domain/LogExecption.java
0 → 100644
1 | +package com.huaheng.pc.monitor.logExecption.domain; | ||
2 | + | ||
3 | +import com.baomidou.mybatisplus.annotation.IdType; | ||
4 | +import com.baomidou.mybatisplus.annotation.TableField; | ||
5 | +import com.baomidou.mybatisplus.annotation.TableId; | ||
6 | +import com.baomidou.mybatisplus.annotation.TableName; | ||
7 | +import io.swagger.annotations.ApiModel; | ||
8 | +import io.swagger.annotations.ApiModelProperty; | ||
9 | +import java.io.Serializable; | ||
10 | +import java.util.Date; | ||
11 | +import lombok.Data; | ||
12 | + | ||
13 | +@ApiModel(value="com.huaheng.pc.monitor.logExecption.domain.LogExecption") | ||
14 | +@Data | ||
15 | +@TableName(value = "log_execption") | ||
16 | +public class LogExecption extends RuntimeException implements Serializable { | ||
17 | + /** | ||
18 | + * 主键,自增字段 | ||
19 | + */ | ||
20 | + @TableId(value = "id", type = IdType.INPUT) | ||
21 | + @ApiModelProperty(value="主键,自增字段") | ||
22 | + private Integer id; | ||
23 | + | ||
24 | + /** | ||
25 | + * 模块标题 | ||
26 | + */ | ||
27 | + @TableField(value = "title") | ||
28 | + @ApiModelProperty(value="模块标题") | ||
29 | + private String title; | ||
30 | + | ||
31 | + /** | ||
32 | + * 功能请求 | ||
33 | + */ | ||
34 | + @TableField(value = "action") | ||
35 | + @ApiModelProperty(value="功能请求") | ||
36 | + private String action; | ||
37 | + | ||
38 | + /** | ||
39 | + * 方法名称 | ||
40 | + */ | ||
41 | + @TableField(value = "method") | ||
42 | + @ApiModelProperty(value="方法名称") | ||
43 | + private String method; | ||
44 | + | ||
45 | + /** | ||
46 | + * 来源渠道(manage后台用户 mobile手机端用户 other其它 | ||
47 | + */ | ||
48 | + @TableField(value = "` channel`") | ||
49 | + @ApiModelProperty(value="来源渠道(manage后台用户 mobile手机端用户 other其它") | ||
50 | + private String channel; | ||
51 | + | ||
52 | + /** | ||
53 | + * 操作人员 | ||
54 | + */ | ||
55 | + @TableField(value = "operName") | ||
56 | + @ApiModelProperty(value="操作人员") | ||
57 | + private String operName; | ||
58 | + | ||
59 | + /** | ||
60 | + * 部门名称 | ||
61 | + */ | ||
62 | + @TableField(value = "deptName") | ||
63 | + @ApiModelProperty(value="部门名称") | ||
64 | + private String deptName; | ||
65 | + | ||
66 | + /** | ||
67 | + * 请求地址 | ||
68 | + */ | ||
69 | + @TableField(value = "operUrl") | ||
70 | + @ApiModelProperty(value="请求地址") | ||
71 | + private String operUrl; | ||
72 | + | ||
73 | + /** | ||
74 | + * 请求主机地址 | ||
75 | + */ | ||
76 | + @TableField(value = "operIp") | ||
77 | + @ApiModelProperty(value="请求主机地址") | ||
78 | + private String operIp; | ||
79 | + | ||
80 | + /** | ||
81 | + * 操作地点 | ||
82 | + */ | ||
83 | + @TableField(value = "operLocation") | ||
84 | + @ApiModelProperty(value="操作地点") | ||
85 | + private String operLocation; | ||
86 | + | ||
87 | + /** | ||
88 | + * 请求参数 | ||
89 | + */ | ||
90 | + @TableField(value = "operParam") | ||
91 | + @ApiModelProperty(value="请求参数") | ||
92 | + private String operParam; | ||
93 | + | ||
94 | + /** | ||
95 | + * 异常信息 | ||
96 | + */ | ||
97 | + @TableField(value = "execeptionMsg") | ||
98 | + @ApiModelProperty(value="异常信息") | ||
99 | + private String execeptionMsg; | ||
100 | + | ||
101 | + /** | ||
102 | + * 操作状态 | ||
103 | + */ | ||
104 | + @TableField(value = "status") | ||
105 | + @ApiModelProperty(value="操作状态") | ||
106 | + private String status; | ||
107 | + | ||
108 | + /** | ||
109 | + * 操作时间 | ||
110 | + */ | ||
111 | + @TableField(value = "operTime") | ||
112 | + @ApiModelProperty(value="操作时间") | ||
113 | + private Date operTime; | ||
114 | + | ||
115 | + private static final long serialVersionUID = 1L; | ||
116 | +} | ||
0 | \ No newline at end of file | 117 | \ No newline at end of file |
src/main/java/com/huaheng/pc/monitor/logExecption/mapper/LogExecptionMapper.java
0 → 100644
1 | +package com.huaheng.pc.monitor.logExecption.mapper; | ||
2 | + | ||
3 | +import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||
4 | +import com.huaheng.pc.monitor.logExecption.domain.LogExecption; | ||
5 | + | ||
6 | +public interface LogExecptionMapper extends BaseMapper<LogExecption> { | ||
7 | +} | ||
0 | \ No newline at end of file | 8 | \ No newline at end of file |
src/main/java/com/huaheng/pc/monitor/logExecption/service/LogExecptionService.java
0 → 100644
src/main/java/com/huaheng/pc/monitor/logExecption/service/LogExecptionServiceImpl.java
0 → 100644
1 | +package com.huaheng.pc.monitor.logExecption.service; | ||
2 | + | ||
3 | +import org.springframework.stereotype.Service; | ||
4 | +import javax.annotation.Resource; | ||
5 | +import java.util.List; | ||
6 | +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||
7 | +import com.huaheng.pc.monitor.logExecption.mapper.LogExecptionMapper; | ||
8 | +import com.huaheng.pc.monitor.logExecption.domain.LogExecption; | ||
9 | +import com.huaheng.pc.monitor.logExecption.service.LogExecptionService; | ||
10 | +@Service | ||
11 | +public class LogExecptionServiceImpl extends ServiceImpl<LogExecptionMapper, LogExecption> implements LogExecptionService{ | ||
12 | + | ||
13 | +} |
src/main/resources/mybatis/config/WarehouseConfigMapper.xml
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
3 | +<mapper namespace="com.huaheng.pc.config.warehouseConfig.mapper.WarehouseConfigMapper"> | ||
4 | + <resultMap id="BaseResultMap" type="com.huaheng.pc.config.warehouseConfig.domain.WarehouseConfig"> | ||
5 | + <!--@mbg.generated--> | ||
6 | + <id column="code" jdbcType="VARCHAR" property="code" /> | ||
7 | + <result column="warehouseCode" jdbcType="VARCHAR" property="warehouseCode" /> | ||
8 | + <result column="name" jdbcType="VARCHAR" property="name" /> | ||
9 | + <result column="abcClass" jdbcType="VARCHAR" property="abcClass" /> | ||
10 | + <result column="daysToExpire" jdbcType="INTEGER" property="daysToExpire" /> | ||
11 | + <result column="locatingRule" jdbcType="VARCHAR" property="locatingRule" /> | ||
12 | + <result column="allocationRule" jdbcType="VARCHAR" property="allocationRule" /> | ||
13 | + <result column="replenishmentRule" jdbcType="VARCHAR" property="replenishmentRule" /> | ||
14 | + <result column="emptyLocRule" jdbcType="VARCHAR" property="emptyLocRule" /> | ||
15 | + <result column="receivingFlow" jdbcType="VARCHAR" property="receivingFlow" /> | ||
16 | + <result column="shippingFlow" jdbcType="VARCHAR" property="shippingFlow" /> | ||
17 | + <result column="attributeTemplateCode" jdbcType="VARCHAR" property="attributeTemplateCode" /> | ||
18 | + <result column="trackSerialNum" jdbcType="INTEGER" property="trackSerialNum" /> | ||
19 | + <result column="autoGenSerialNum" jdbcType="INTEGER" property="autoGenSerialNum" /> | ||
20 | + <result column="autoGenSerialNumFormat" jdbcType="VARCHAR" property="autoGenSerialNumFormat" /> | ||
21 | + <result column="snTemplateCode" jdbcType="VARCHAR" property="snTemplateCode" /> | ||
22 | + <result column="expiringDays" jdbcType="INTEGER" property="expiringDays" /> | ||
23 | + <result column="minShelfLifeDays" jdbcType="INTEGER" property="minShelfLifeDays" /> | ||
24 | + <result column="enable" jdbcType="INTEGER" property="enable" /> | ||
25 | + <result column="created" jdbcType="TIMESTAMP" property="created" /> | ||
26 | + <result column="createdBy" jdbcType="VARCHAR" property="createdBy" /> | ||
27 | + <result column="lastUpdated" jdbcType="TIMESTAMP" property="lastUpdated" /> | ||
28 | + <result column="lastUpdatedBy" jdbcType="VARCHAR" property="lastUpdatedBy" /> | ||
29 | + <result column="version" jdbcType="INTEGER" property="version" /> | ||
30 | + <result column="userDef1" jdbcType="VARCHAR" property="userDef1" /> | ||
31 | + <result column="userDef2" jdbcType="VARCHAR" property="userDef2" /> | ||
32 | + <result column="userDef3" jdbcType="VARCHAR" property="userDef3" /> | ||
33 | + <result column="userDef4" jdbcType="VARCHAR" property="userDef4" /> | ||
34 | + <result column="userDef5" jdbcType="VARCHAR" property="userDef5" /> | ||
35 | + <result column="userDef6" jdbcType="VARCHAR" property="userDef6" /> | ||
36 | + <result column="userDef7" jdbcType="VARCHAR" property="userDef7" /> | ||
37 | + <result column="userDef8" jdbcType="VARCHAR" property="userDef8" /> | ||
38 | + </resultMap> | ||
39 | + <sql id="Base_Column_List"> | ||
40 | + <!--@mbg.generated--> | ||
41 | + code, warehouseCode, `name`, abcClass, daysToExpire, locatingRule, allocationRule, | ||
42 | + replenishmentRule, emptyLocRule, receivingFlow, shippingFlow, attributeTemplateCode, | ||
43 | + trackSerialNum, autoGenSerialNum, autoGenSerialNumFormat, snTemplateCode, expiringDays, | ||
44 | + minShelfLifeDays, `enable`, created, createdBy, lastUpdated, lastUpdatedBy, version, | ||
45 | + userDef1, userDef2, userDef3, userDef4, userDef5, userDef6, userDef7, userDef8 | ||
46 | + </sql> | ||
47 | +</mapper> | ||
0 | \ No newline at end of file | 48 | \ No newline at end of file |
src/main/resources/templates/config/warehouse/add.html
0 → 100644
src/main/resources/templates/config/warehouse/warehouse.html
0 → 100644
1 | +<!DOCTYPE HTML> | ||
2 | +<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> | ||
3 | +<meta charset="utf-8"> | ||
4 | +<head th:include="include :: header"></head> | ||
5 | +<body class="gray-bg"> | ||
6 | +<div class="container-div"> | ||
7 | + <div class="row"> | ||
8 | + <div class="col-sm-12 select-info"> | ||
9 | + <form id="company-form"> | ||
10 | + <div class="select-list"> | ||
11 | + <ul> | ||
12 | + <li> | ||
13 | + 仓库编码:<input type="text" name="code"/> | ||
14 | + </li> | ||
15 | + <li> | ||
16 | + <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> | ||
17 | + </li> | ||
18 | + </ul> | ||
19 | + </div> | ||
20 | + </form> | ||
21 | + </div> | ||
22 | + <div class="btn-group hidden-xs" id="toolbar" role="group"> | ||
23 | + <a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()" shiro:hasPermission="config:warehouse:add"> | ||
24 | + <i class="fa fa-plus"></i> 新增 | ||
25 | + </a> | ||
26 | + </div> | ||
27 | + | ||
28 | + <div class="col-sm-12 select-info"> | ||
29 | + <table id="bootstrap-table" data-mobile-responsive="true" class="table table-bordered table-hover"></table> | ||
30 | + </div> | ||
31 | + </div> | ||
32 | +</div> | ||
33 | +<div th:include="include :: footer"></div> | ||
34 | +<script th:inline="javascript"> | ||
35 | + var editFlag = [[${@permission.hasPermi('config:warehouse:edit')}]]; | ||
36 | + var removeFlag = [[${@permission.hasPermi('config:warehouse:remove')}]]; | ||
37 | + var prefix = ctx + "config/warehouse"; | ||
38 | + var datas = [[${@dict.getType('sys_normal_disable')}]]; | ||
39 | + $(function() { | ||
40 | + var options = { | ||
41 | + url: prefix + "/list", | ||
42 | + createUrl: prefix + "/add", | ||
43 | + updateUrl: prefix + "/edit/{code}", | ||
44 | + removeUrl: prefix + "/remove", | ||
45 | + modalName: "仓库配置", | ||
46 | + search: false, | ||
47 | + columns: [{ | ||
48 | + checkbox: true | ||
49 | + }, | ||
50 | + { | ||
51 | + field : 'code', | ||
52 | + title : '编码', | ||
53 | + visible : false | ||
54 | + }, | ||
55 | + { | ||
56 | + field : 'warehouseCode', | ||
57 | + title : '仓库编码' | ||
58 | + }, | ||
59 | + { | ||
60 | + field : 'name', | ||
61 | + title : '名称' | ||
62 | + }, | ||
63 | + { | ||
64 | + field : 'abcClass', | ||
65 | + title : 'ABC分类' | ||
66 | + }, | ||
67 | + { | ||
68 | + field : 'daysToExpire', | ||
69 | + title : '保质期(天)' | ||
70 | + }, | ||
71 | + { | ||
72 | + field : 'locatingRule', | ||
73 | + title : '定位规则' | ||
74 | + }, | ||
75 | + { | ||
76 | + field : 'allocationRule', | ||
77 | + title : '分配规则' , | ||
78 | + }, | ||
79 | + { | ||
80 | + field : 'replenishmentRule', | ||
81 | + title : '补货规则' | ||
82 | + }, | ||
83 | + { | ||
84 | + field : 'emptyLocRule', | ||
85 | + title : '空货位规则' | ||
86 | + }, | ||
87 | + { | ||
88 | + field : 'receivingFlow', | ||
89 | + title : '入库流程' | ||
90 | + }, | ||
91 | + { | ||
92 | + field : 'shippingFlow', | ||
93 | + title : '出库流程' | ||
94 | + }, | ||
95 | + { | ||
96 | + field : 'attributeTemplateCode', | ||
97 | + title : '属性模版' | ||
98 | + }, | ||
99 | + { | ||
100 | + field : 'trackSerialNum', | ||
101 | + title : '记录序列号' | ||
102 | + }, | ||
103 | + { | ||
104 | + field : 'autoGenSerialNum', | ||
105 | + title : '自动生成序列号' | ||
106 | + }, | ||
107 | + { | ||
108 | + field : 'autoGenSerialNumFormat', | ||
109 | + title : '自动生成序列号表达式' | ||
110 | + }, | ||
111 | + { | ||
112 | + field : 'snTemplateCode', | ||
113 | + title : '序列号模版' | ||
114 | + }, | ||
115 | + { | ||
116 | + field : 'expiringDays', | ||
117 | + title : '临期预警天数' | ||
118 | + }, | ||
119 | + { | ||
120 | + field : 'minShelfLifeDays', | ||
121 | + title : '收货预警天数' | ||
122 | + }, | ||
123 | + { | ||
124 | + field : 'created', | ||
125 | + title : '创建时间', | ||
126 | + visible : false | ||
127 | + }, | ||
128 | + { | ||
129 | + field : 'createdBy', | ||
130 | + title : '创建用户', | ||
131 | + visible : false | ||
132 | + }, | ||
133 | + { | ||
134 | + field : 'lastUpdated', | ||
135 | + title : '更新时间', | ||
136 | + visible : false | ||
137 | + }, | ||
138 | + { | ||
139 | + field : 'lastUpdatedBy', | ||
140 | + title : '更新用户', | ||
141 | + visible : false | ||
142 | + }, | ||
143 | + { | ||
144 | + field : 'enable', | ||
145 | + title : '状态' , | ||
146 | + align: 'center', | ||
147 | + formatter: function(value, row, index) { | ||
148 | + return $.table.selectDictLabel(datas, value); | ||
149 | + } | ||
150 | + }, | ||
151 | + // { | ||
152 | + // field : 'deleted', | ||
153 | + // title : '是否删除' | ||
154 | + // }, | ||
155 | + { | ||
156 | + field : 'userDef1', | ||
157 | + title : '自定义字段1', | ||
158 | + visible:false | ||
159 | + }, | ||
160 | + { | ||
161 | + field : 'userDef2', | ||
162 | + title : '自定义字段2' , | ||
163 | + visible:false | ||
164 | + }, | ||
165 | + { | ||
166 | + field : 'userDef3', | ||
167 | + title : '自定义字段3', | ||
168 | + visible:false | ||
169 | + }, | ||
170 | + { | ||
171 | + field : 'userDef4', | ||
172 | + title : '自定义字段4', | ||
173 | + visible:false | ||
174 | + }, | ||
175 | + { | ||
176 | + field : 'userDef5', | ||
177 | + title : '自定义字段5', | ||
178 | + visible:false | ||
179 | + }, | ||
180 | + { | ||
181 | + field : 'userDef6', | ||
182 | + title : '自定义字段7', | ||
183 | + visible:false | ||
184 | + }, | ||
185 | + { | ||
186 | + field : 'userDef7', | ||
187 | + title : '自定义字段7', | ||
188 | + visible:false | ||
189 | + }, | ||
190 | + { | ||
191 | + field : 'userDef8', | ||
192 | + title : '自定义字段8', | ||
193 | + visible:false | ||
194 | + }, | ||
195 | + { | ||
196 | + field : 'version', | ||
197 | + title : '数据版本', | ||
198 | + visible:false | ||
199 | + }, | ||
200 | + { | ||
201 | + title: '操作', | ||
202 | + align: 'center', | ||
203 | + formatter: function(value, row, index) { | ||
204 | + var actions = []; | ||
205 | + actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick= edit(\''+row.code+'\')><i class="fa fa-edit"></i>编辑</a> '); | ||
206 | + return actions.join(''); | ||
207 | + } | ||
208 | + }] | ||
209 | + }; | ||
210 | + $.table.init(options); | ||
211 | + }); | ||
212 | + | ||
213 | + function edit(code) { | ||
214 | + var url = prefix + "/edit/"+code; | ||
215 | + $.modal.open("修改" + $.table._option.modalName, url); | ||
216 | + } | ||
217 | +</script> | ||
218 | +</body> | ||
219 | +</html> | ||
0 | \ No newline at end of file | 220 | \ No newline at end of file |