diff --git a/.gitignore b/.gitignore index 77f1bc5..dc08aa2 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,8 @@ target/ *.iml *.ipr .idea/workspace.xml +.idea/compiler.xml + ### NetBeans ### /nbproject/private/ diff --git a/.idea/MyBatisCodeHelperDatasource.xml b/.idea/MyBatisCodeHelperDatasource.xml index c36ebf4..a7a7381 100644 --- a/.idea/MyBatisCodeHelperDatasource.xml +++ b/.idea/MyBatisCodeHelperDatasource.xml @@ -6,9 +6,9 @@ <option name="addSerializeUid" value="true" /> <option name="generateService" value="true" /> <option name="generateServiceInterface" value="true" /> - <option name="javaMapperPackage" value="com.huaheng.pc.system.userWarehousel.mapper" /> + <option name="javaMapperPackage" value="com.huaheng.pc.task.taskPreference.mapper" /> <option name="javaMapperPath" value="$PROJECT_DIR$/src/main/java" /> - <option name="javaModelPackage" value="com.huaheng.pc.system.userWarehousel.domain" /> + <option name="javaModelPackage" value="com.huaheng.pc.task.taskPreference.domain" /> <option name="javaModelPath" value="$PROJECT_DIR$/src/main/java" /> <option name="lastDatabaseCrudChooseModuleName" value="huaheng" /> <option name="moduleNameToPackageAndPathMap"> @@ -30,15 +30,15 @@ <entry key="huaheng"> <value> <UserPackageAndPathInfoByModule> - <option name="javaMapperPackage" value="com.huaheng.pc.system.userWarehousel.mapper" /> + <option name="javaMapperPackage" value="com.huaheng.pc.task.taskPreference.mapper" /> <option name="javaMapperPath" value="$PROJECT_DIR$/src/main/java" /> - <option name="javaModelPacakge" value="com.huaheng.pc.system.userWarehousel.domain" /> + <option name="javaModelPacakge" value="com.huaheng.pc.task.taskPreference.domain" /> <option name="javaModelPath" value="$PROJECT_DIR$/src/main/java" /> - <option name="javaServiceInterfacePackage" value="com.huaheng.pc.system.userWarehousel.service" /> + <option name="javaServiceInterfacePackage" value="com.huaheng.pc.task.taskPreference.service" /> <option name="javaServiceInterfacePath" value="$PROJECT_DIR$/src/main/java" /> - <option name="javaServicePackage" value="com.huaheng.pc.system.userWarehousel.service" /> + <option name="javaServicePackage" value="com.huaheng.pc.task.taskPreference.service" /> <option name="javaServicePath" value="$PROJECT_DIR$/src/main/java" /> - <option name="xmlPackage" value="system" /> + <option name="xmlPackage" value="task" /> <option name="xmlPath" value="E:\code\wms2\src\main\resources\mybatis" /> </UserPackageAndPathInfoByModule> </value> @@ -47,6 +47,16 @@ </option> <option name="tableGenerateConfigs"> <map> + <entry key="wms_v2:bom_detail"> + <value> + <TableGenerateConfig> + <option name="generatedKey" value="id" /> + <option name="javaModelName" value="BomDetail" /> + <option name="moduleName" value="huaheng" /> + <option name="useActualColumnName" value="true" /> + </TableGenerateConfig> + </value> + </entry> <entry key="wms_v2:bom_header"> <value> <TableGenerateConfig> @@ -77,6 +87,16 @@ </TableGenerateConfig> </value> </entry> + <entry key="wms_v2:container_capacity"> + <value> + <TableGenerateConfig> + <option name="generatedKey" value="id" /> + <option name="javaModelName" value="ContainerCapacity" /> + <option name="moduleName" value="huaheng" /> + <option name="useActualColumnName" value="true" /> + </TableGenerateConfig> + </value> + </entry> <entry key="wms_v2:container_type"> <value> <TableGenerateConfig> @@ -267,6 +287,36 @@ </TableGenerateConfig> </value> </entry> + <entry key="wms_v2:task_detail"> + <value> + <TableGenerateConfig> + <option name="generatedKey" value="id" /> + <option name="javaModelName" value="TaskDetail" /> + <option name="moduleName" value="huaheng" /> + <option name="useActualColumnName" value="true" /> + </TableGenerateConfig> + </value> + </entry> + <entry key="wms_v2:task_header"> + <value> + <TableGenerateConfig> + <option name="generatedKey" value="id" /> + <option name="javaModelName" value="TaskHeader" /> + <option name="moduleName" value="huaheng" /> + <option name="useActualColumnName" value="true" /> + </TableGenerateConfig> + </value> + </entry> + <entry key="wms_v2:task_preference"> + <value> + <TableGenerateConfig> + <option name="generatedKey" value="id" /> + <option name="javaModelName" value="TaskPreference" /> + <option name="moduleName" value="huaheng" /> + <option name="useActualColumnName" value="true" /> + </TableGenerateConfig> + </value> + </entry> <entry key="wms_v2:zone_capacity"> <value> <TableGenerateConfig> @@ -283,7 +333,7 @@ <option name="useLomBokOnModel" value="true" /> <option name="useSwagger" value="true" /> <option name="userMybatisPlus" value="true" /> - <option name="xmlMapperPackage" value="system" /> + <option name="xmlMapperPackage" value="task" /> <option name="xmlMapperPath" value="E:\code\wms2\src\main\resources\mybatis" /> </ProjectProfile> </option> diff --git a/.idea/libraries/Maven__com_baomidou_mybatis_plus_3_1_2.xml b/.idea/libraries/Maven__com_baomidou_mybatis_plus_3_1_2.xml deleted file mode 100644 index d41bbbc..0000000 --- a/.idea/libraries/Maven__com_baomidou_mybatis_plus_3_1_2.xml +++ /dev/null @@ -1,13 +0,0 @@ -<component name="libraryTable"> - <library name="Maven: com.baomidou:mybatis-plus:3.1.2"> - <CLASSES> - <root url="jar://$MAVEN_REPOSITORY$/com/baomidou/mybatis-plus/3.1.2/mybatis-plus-3.1.2.jar!/" /> - </CLASSES> - <JAVADOC> - <root url="jar://$MAVEN_REPOSITORY$/com/baomidou/mybatis-plus/3.1.2/mybatis-plus-3.1.2-javadoc.jar!/" /> - </JAVADOC> - <SOURCES> - <root url="jar://$MAVEN_REPOSITORY$/com/baomidou/mybatis-plus/3.1.2/mybatis-plus-3.1.2-sources.jar!/" /> - </SOURCES> - </library> -</component> \ No newline at end of file diff --git a/.idea/libraries/Maven__com_baomidou_mybatis_plus_annotation_3_1_2.xml b/.idea/libraries/Maven__com_baomidou_mybatis_plus_annotation_3_1_2.xml deleted file mode 100644 index 4a46b21..0000000 --- a/.idea/libraries/Maven__com_baomidou_mybatis_plus_annotation_3_1_2.xml +++ /dev/null @@ -1,13 +0,0 @@ -<component name="libraryTable"> - <library name="Maven: com.baomidou:mybatis-plus-annotation:3.1.2"> - <CLASSES> - <root url="jar://$MAVEN_REPOSITORY$/com/baomidou/mybatis-plus-annotation/3.1.2/mybatis-plus-annotation-3.1.2.jar!/" /> - </CLASSES> - <JAVADOC> - <root url="jar://$MAVEN_REPOSITORY$/com/baomidou/mybatis-plus-annotation/3.1.2/mybatis-plus-annotation-3.1.2-javadoc.jar!/" /> - </JAVADOC> - <SOURCES> - <root url="jar://$MAVEN_REPOSITORY$/com/baomidou/mybatis-plus-annotation/3.1.2/mybatis-plus-annotation-3.1.2-sources.jar!/" /> - </SOURCES> - </library> -</component> \ No newline at end of file diff --git a/.idea/libraries/Maven__com_baomidou_mybatis_plus_boot_starter_3_1_2.xml b/.idea/libraries/Maven__com_baomidou_mybatis_plus_boot_starter_3_1_2.xml deleted file mode 100644 index a495bd8..0000000 --- a/.idea/libraries/Maven__com_baomidou_mybatis_plus_boot_starter_3_1_2.xml +++ /dev/null @@ -1,13 +0,0 @@ -<component name="libraryTable"> - <library name="Maven: com.baomidou:mybatis-plus-boot-starter:3.1.2"> - <CLASSES> - <root url="jar://$MAVEN_REPOSITORY$/com/baomidou/mybatis-plus-boot-starter/3.1.2/mybatis-plus-boot-starter-3.1.2.jar!/" /> - </CLASSES> - <JAVADOC> - <root url="jar://$MAVEN_REPOSITORY$/com/baomidou/mybatis-plus-boot-starter/3.1.2/mybatis-plus-boot-starter-3.1.2-javadoc.jar!/" /> - </JAVADOC> - <SOURCES> - <root url="jar://$MAVEN_REPOSITORY$/com/baomidou/mybatis-plus-boot-starter/3.1.2/mybatis-plus-boot-starter-3.1.2-sources.jar!/" /> - </SOURCES> - </library> -</component> \ No newline at end of file diff --git a/.idea/libraries/Maven__com_baomidou_mybatis_plus_core_3_1_2.xml b/.idea/libraries/Maven__com_baomidou_mybatis_plus_core_3_1_2.xml deleted file mode 100644 index 7a6a0bf..0000000 --- a/.idea/libraries/Maven__com_baomidou_mybatis_plus_core_3_1_2.xml +++ /dev/null @@ -1,13 +0,0 @@ -<component name="libraryTable"> - <library name="Maven: com.baomidou:mybatis-plus-core:3.1.2"> - <CLASSES> - <root url="jar://$MAVEN_REPOSITORY$/com/baomidou/mybatis-plus-core/3.1.2/mybatis-plus-core-3.1.2.jar!/" /> - </CLASSES> - <JAVADOC> - <root url="jar://$MAVEN_REPOSITORY$/com/baomidou/mybatis-plus-core/3.1.2/mybatis-plus-core-3.1.2-javadoc.jar!/" /> - </JAVADOC> - <SOURCES> - <root url="jar://$MAVEN_REPOSITORY$/com/baomidou/mybatis-plus-core/3.1.2/mybatis-plus-core-3.1.2-sources.jar!/" /> - </SOURCES> - </library> -</component> \ No newline at end of file diff --git a/.idea/libraries/Maven__com_baomidou_mybatis_plus_extension_3_1_2.xml b/.idea/libraries/Maven__com_baomidou_mybatis_plus_extension_3_1_2.xml deleted file mode 100644 index 4dec47a..0000000 --- a/.idea/libraries/Maven__com_baomidou_mybatis_plus_extension_3_1_2.xml +++ /dev/null @@ -1,13 +0,0 @@ -<component name="libraryTable"> - <library name="Maven: com.baomidou:mybatis-plus-extension:3.1.2"> - <CLASSES> - <root url="jar://$MAVEN_REPOSITORY$/com/baomidou/mybatis-plus-extension/3.1.2/mybatis-plus-extension-3.1.2.jar!/" /> - </CLASSES> - <JAVADOC> - <root url="jar://$MAVEN_REPOSITORY$/com/baomidou/mybatis-plus-extension/3.1.2/mybatis-plus-extension-3.1.2-javadoc.jar!/" /> - </JAVADOC> - <SOURCES> - <root url="jar://$MAVEN_REPOSITORY$/com/baomidou/mybatis-plus-extension/3.1.2/mybatis-plus-extension-3.1.2-sources.jar!/" /> - </SOURCES> - </library> -</component> \ No newline at end of file diff --git a/.idea/libraries/Maven__commons_fileupload_commons_fileupload_1_4.xml b/.idea/libraries/Maven__commons_fileupload_commons_fileupload_1_4.xml deleted file mode 100644 index 3b9dcc0..0000000 --- a/.idea/libraries/Maven__commons_fileupload_commons_fileupload_1_4.xml +++ /dev/null @@ -1,13 +0,0 @@ -<component name="libraryTable"> - <library name="Maven: commons-fileupload:commons-fileupload:1.4"> - <CLASSES> - <root url="jar://$MAVEN_REPOSITORY$/commons-fileupload/commons-fileupload/1.4/commons-fileupload-1.4.jar!/" /> - </CLASSES> - <JAVADOC> - <root url="jar://$MAVEN_REPOSITORY$/commons-fileupload/commons-fileupload/1.4/commons-fileupload-1.4-javadoc.jar!/" /> - </JAVADOC> - <SOURCES> - <root url="jar://$MAVEN_REPOSITORY$/commons-fileupload/commons-fileupload/1.4/commons-fileupload-1.4-sources.jar!/" /> - </SOURCES> - </library> -</component> \ No newline at end of file diff --git a/.idea/libraries/Maven__org_mybatis_mybatis_3_5_1.xml b/.idea/libraries/Maven__org_mybatis_mybatis_3_5_1.xml deleted file mode 100644 index e633f81..0000000 --- a/.idea/libraries/Maven__org_mybatis_mybatis_3_5_1.xml +++ /dev/null @@ -1,13 +0,0 @@ -<component name="libraryTable"> - <library name="Maven: org.mybatis:mybatis:3.5.1"> - <CLASSES> - <root url="jar://$MAVEN_REPOSITORY$/org/mybatis/mybatis/3.5.1/mybatis-3.5.1.jar!/" /> - </CLASSES> - <JAVADOC> - <root url="jar://$MAVEN_REPOSITORY$/org/mybatis/mybatis/3.5.1/mybatis-3.5.1-javadoc.jar!/" /> - </JAVADOC> - <SOURCES> - <root url="jar://$MAVEN_REPOSITORY$/org/mybatis/mybatis/3.5.1/mybatis-3.5.1-sources.jar!/" /> - </SOURCES> - </library> -</component> \ No newline at end of file diff --git a/.idea/libraries/Maven__org_mybatis_mybatis_spring_2_0_1.xml b/.idea/libraries/Maven__org_mybatis_mybatis_spring_2_0_1.xml deleted file mode 100644 index f49fd3a..0000000 --- a/.idea/libraries/Maven__org_mybatis_mybatis_spring_2_0_1.xml +++ /dev/null @@ -1,13 +0,0 @@ -<component name="libraryTable"> - <library name="Maven: org.mybatis:mybatis-spring:2.0.1"> - <CLASSES> - <root url="jar://$MAVEN_REPOSITORY$/org/mybatis/mybatis-spring/2.0.1/mybatis-spring-2.0.1.jar!/" /> - </CLASSES> - <JAVADOC> - <root url="jar://$MAVEN_REPOSITORY$/org/mybatis/mybatis-spring/2.0.1/mybatis-spring-2.0.1-javadoc.jar!/" /> - </JAVADOC> - <SOURCES> - <root url="jar://$MAVEN_REPOSITORY$/org/mybatis/mybatis-spring/2.0.1/mybatis-spring-2.0.1-sources.jar!/" /> - </SOURCES> - </library> -</component> \ No newline at end of file diff --git a/.idea/libraries/Maven__org_projectlombok_lombok_1_18_8.xml b/.idea/libraries/Maven__org_projectlombok_lombok_1_18_8.xml deleted file mode 100644 index 9843fa4..0000000 --- a/.idea/libraries/Maven__org_projectlombok_lombok_1_18_8.xml +++ /dev/null @@ -1,13 +0,0 @@ -<component name="libraryTable"> - <library name="Maven: org.projectlombok:lombok:1.18.8"> - <CLASSES> - <root url="jar://$MAVEN_REPOSITORY$/org/projectlombok/lombok/1.18.8/lombok-1.18.8.jar!/" /> - </CLASSES> - <JAVADOC> - <root url="jar://$MAVEN_REPOSITORY$/org/projectlombok/lombok/1.18.8/lombok-1.18.8-javadoc.jar!/" /> - </JAVADOC> - <SOURCES> - <root url="jar://$MAVEN_REPOSITORY$/org/projectlombok/lombok/1.18.8/lombok-1.18.8-sources.jar!/" /> - </SOURCES> - </library> -</component> \ No newline at end of file diff --git a/src/main/java/com/huaheng/pc/config/containerCapacity/controller/ContainerCapacityController.java b/src/main/java/com/huaheng/pc/config/containerCapacity/controller/ContainerCapacityController.java new file mode 100644 index 0000000..95629c8 --- /dev/null +++ b/src/main/java/com/huaheng/pc/config/containerCapacity/controller/ContainerCapacityController.java @@ -0,0 +1,157 @@ +package com.huaheng.pc.config.containerCapacity.controller; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.huaheng.common.support.Convert; +import com.huaheng.common.utils.StringUtils; +import com.huaheng.common.utils.security.ShiroUtils; +import com.huaheng.framework.aspectj.lang.annotation.Log; +import com.huaheng.framework.aspectj.lang.constant.BusinessType; +import com.huaheng.framework.web.controller.BaseController; +import com.huaheng.framework.web.domain.AjaxResult; +import com.huaheng.framework.web.page.PageDomain; +import com.huaheng.framework.web.page.TableDataInfo; +import com.huaheng.framework.web.page.TableSupport; +import com.huaheng.pc.config.containerCapacity.domain.ContainerCapacity; +import com.huaheng.pc.config.containerCapacity.service.ContainerCapacityService; +import com.huaheng.pc.general.material.domain.Material; +import com.huaheng.pc.general.material.service.MaterialService; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 容器容量值 + * 信息操作处理 + * + * @author ricard + * @date 2019-08-12 + */ +@Controller +@RequestMapping("/config/containerCapacity") +public class ContainerCapacityController extends BaseController { + + private String prefix = "config/containerCapacity"; + + @Autowired + private ContainerCapacityService containerCapacityService; + + @Autowired + private MaterialService materialService; + + @RequiresPermissions("config:containerCapacity:view") + @GetMapping() + public String containerCapacity() + { + return prefix + "/containerCapacity"; + } + + /** + * 查询容器容量列表 + */ + @RequiresPermissions("config:containerCapacity:list") + @Log(title = "配置-容器容量设置", operating = "查看容器容量", action = BusinessType.GRANT) + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(ContainerCapacity containerCapacity,String createdBegin, String createdEnd) + { + LambdaQueryWrapper<ContainerCapacity> lambdaQueryWrapper = Wrappers.lambdaQuery(); + PageDomain pageDomain = TableSupport.buildPageRequest(); + Integer pageNum = pageDomain.getPageNum(); + Integer pageSize = pageDomain.getPageSize(); + + lambdaQueryWrapper.ge(StringUtils.isNotEmpty(createdBegin),ContainerCapacity::getCreated, createdBegin) + .le(StringUtils.isNotEmpty(createdEnd), ContainerCapacity::getCreated, createdEnd) + .eq(ContainerCapacity::getWarehouseCode,ShiroUtils.getWarehouseCode()) + .eq(StringUtils.isNotEmpty(containerCapacity.getMaterialCode()),ContainerCapacity::getMaterialCode,containerCapacity.getMaterialCode()) + .eq(StringUtils.isNotEmpty(containerCapacity.getContainerType()), ContainerCapacity::getContainerType, containerCapacity.getContainerType()) + .like(StringUtils.isNotEmpty(containerCapacity.getMaterialName()), ContainerCapacity::getMaterialName, containerCapacity.getMaterialName()) + .orderByAsc(ContainerCapacity::getId); + + if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){ + /** + * 使用分页查询 + */ + Page<ContainerCapacity> page = new Page<>(pageNum, pageSize); + IPage<ContainerCapacity> iPage = containerCapacityService.page(page, lambdaQueryWrapper); + return getMpDataTable(iPage.getRecords(),iPage.getTotal()); + } else { + List<ContainerCapacity> list = containerCapacityService.list(lambdaQueryWrapper); + return getDataTable(list); + } + } + + + /** + * 新增容器容量数据 + */ + @GetMapping("/add") + public String add() + { + return prefix + "/add"; + } + + /** + * 新增保存容器容量数据 + */ + @RequiresPermissions("config:containerCapacity:add") + @Log(title = "配置-容器容量设置", operating = "新增容器容量", action = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(ContainerCapacity containerCapacity) + { + AjaxResult ajaxResult=containerCapacityService.insertModel(containerCapacity); + return ajaxResult; + } + + /** + * 修改容器容量 + */ + @GetMapping("/edit/{id}") + public String edit(@PathVariable("id") Integer id, ModelMap mmap) + { + ContainerCapacity containerCapacity = containerCapacityService.getById(id); + mmap.put("containerCapacity", containerCapacity); + return prefix + "/edit"; + } + + /** + * 修改保存容器容量 + */ + @RequiresPermissions("config:containerCapacity:edit") + @Log(title = "配置-容器容量设置", operating = "修改容器容量", action = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(ContainerCapacity containerCapacity) + { + containerCapacity.setLastUpdatedBy(ShiroUtils.getLoginName()); + return toAjax(containerCapacityService.saveOrUpdate(containerCapacity)); + } + + /** + * 删除容器类型 + */ + @RequiresPermissions("config:containerCapacity:remove") + @Log(title = "配置-容器容量设置", operating = "删除容器容量", action = BusinessType.DELETE) + @PostMapping( "/remove") + @ResponseBody + public AjaxResult remove(String ids) + { + if (StringUtils.isEmpty(ids)) + return AjaxResult.error("id不能为空"); + for (Integer id : Convert.toIntArray(ids)) + { + + } + return AjaxResult.success("删除成功!"); + } + + + +} diff --git a/src/main/java/com/huaheng/pc/config/containerCapacity/domain/ContainerCapacity.java b/src/main/java/com/huaheng/pc/config/containerCapacity/domain/ContainerCapacity.java new file mode 100644 index 0000000..e921154 --- /dev/null +++ b/src/main/java/com/huaheng/pc/config/containerCapacity/domain/ContainerCapacity.java @@ -0,0 +1,233 @@ +package com.huaheng.pc.config.containerCapacity.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +import lombok.Data; + +@ApiModel(value="com.huaheng.pc.config.containerCapacityl.domain.ContainerCapacity") +@Data +@TableName(value = "container_capacity") +public class ContainerCapacity implements Serializable { + /** + * 内部号 + */ + @TableId(value = "id", type = IdType.AUTO) + @ApiModelProperty(value="内部号") + private Integer id; + + /** + * 容器类型编码 + */ + @TableField(value = "containerType") + @ApiModelProperty(value="容器类型编码") + private String containerType; + + /** + * 仓库编码 + */ + @TableField(value = "warehouseCode") + @ApiModelProperty(value="仓库编码") + private String warehouseCode; + + /** + * 货主编码 + */ + @TableField(value = "companyCode") + @ApiModelProperty(value="货主编码") + private String companyCode; + + /** + * 商品编码 + */ + @TableField(value = "materialCode") + @ApiModelProperty(value="商品编码") + private String materialCode; + + /** + * 商品名称 + */ + @TableField(value = "materialName") + @ApiModelProperty(value="商品名称") + private String materialName; + + /** + * 商品规格 + */ + @TableField(value = "materialSpec") + @ApiModelProperty(value="商品规格") + private String materialSpec; + + /** + * 商品单位 + */ + @TableField(value = "materialUnit") + @ApiModelProperty(value="商品单位") + private String materialUnit; + + /** + * 存放数量 + */ + @TableField(value = "qty") + @ApiModelProperty(value="存放数量") + private BigDecimal qty; + + /** + * 启用;0—禁用状态 + */ + @TableField(value = "enable") + @ApiModelProperty(value="启用;0—禁用状态") + private Boolean enable; + + /** + * 创建时间 + */ + @TableField(value = "created") + @ApiModelProperty(value="创建时间") + private Date created; + + /** + * 创建用户 + */ + @TableField(value = "createdBy") + @ApiModelProperty(value="创建用户") + private String createdBy; + + /** + * 创建时间 + */ + @TableField(value = "lastUpdated") + @ApiModelProperty(value="创建时间") + private Date lastUpdated; + + /** + * 更新用户 + */ + @TableField(value = "lastUpdatedBy") + @ApiModelProperty(value="更新用户") + private String lastUpdatedBy; + + /** + * 数据版本 + */ + @TableField(value = "version") + @ApiModelProperty(value="数据版本") + private Integer version; + + /** + * 自定义字段1-robot交互用字段 + */ + @TableField(value = "userDef1") + @ApiModelProperty(value="自定义字段1-robot交互用字段") + private String userDef1; + + /** + * 自定义字段2 + */ + @TableField(value = "userDef2") + @ApiModelProperty(value="自定义字段2") + private String userDef2; + + /** + * 自定义字段3 + */ + @TableField(value = "userDef3") + @ApiModelProperty(value="自定义字段3") + private String userDef3; + + /** + * 自定义字段4 + */ + @TableField(value = "userDef4") + @ApiModelProperty(value="自定义字段4") + private String userDef4; + + /** + * 自定义字段5 + */ + @TableField(value = "userDef5") + @ApiModelProperty(value="自定义字段5") + private String userDef5; + + /** + * 自定义字段6 + */ + @TableField(value = "userDef6") + @ApiModelProperty(value="自定义字段6") + private String userDef6; + + /** + * 自定义字段7 + */ + @TableField(value = "userDef7") + @ApiModelProperty(value="自定义字段7") + private String userDef7; + + /** + * 自定义字段8 + */ + @TableField(value = "userDef8") + @ApiModelProperty(value="自定义字段8") + private String userDef8; + + /** + * 处理标记 + */ + @TableField(value = "processStamp") + @ApiModelProperty(value="处理标记") + private String processStamp; + + private static final long serialVersionUID = 1L; + + public static final String COL_CONTAINERTYPE = "containerType"; + + public static final String COL_WAREHOUSECODE = "warehouseCode"; + + public static final String COL_COMPANYCODE = "companyCode"; + + public static final String COL_MATERIALCODE = "materialCode"; + + public static final String COL_MATERIALNAME = "materialName"; + + public static final String COL_MATERIALSPEC = "materialSpec"; + + public static final String COL_MATERIALUNIT = "materialUnit"; + + public static final String COL_QTY = "qty"; + + public static final String COL_ENABLE = "enable"; + + public static final String COL_CREATED = "created"; + + public static final String COL_CREATEDBY = "createdBy"; + + public static final String COL_LASTUPDATED = "lastUpdated"; + + public static final String COL_LASTUPDATEDBY = "lastUpdatedBy"; + + public static final String COL_VERSION = "version"; + + public static final String COL_USERDEF1 = "userDef1"; + + public static final String COL_USERDEF2 = "userDef2"; + + public static final String COL_USERDEF3 = "userDef3"; + + public static final String COL_USERDEF4 = "userDef4"; + + public static final String COL_USERDEF5 = "userDef5"; + + public static final String COL_USERDEF6 = "userDef6"; + + public static final String COL_USERDEF7 = "userDef7"; + + public static final String COL_USERDEF8 = "userDef8"; + + public static final String COL_PROCESSSTAMP = "processStamp"; +} \ No newline at end of file diff --git a/src/main/java/com/huaheng/pc/config/containerCapacity/mapper/ContainerCapacityMapper.java b/src/main/java/com/huaheng/pc/config/containerCapacity/mapper/ContainerCapacityMapper.java new file mode 100644 index 0000000..178ec49 --- /dev/null +++ b/src/main/java/com/huaheng/pc/config/containerCapacity/mapper/ContainerCapacityMapper.java @@ -0,0 +1,7 @@ +package com.huaheng.pc.config.containerCapacity.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.huaheng.pc.config.containerCapacity.domain.ContainerCapacity; + +public interface ContainerCapacityMapper extends BaseMapper<ContainerCapacity> { +} \ No newline at end of file diff --git a/src/main/java/com/huaheng/pc/config/containerCapacity/service/ContainerCapacityService.java b/src/main/java/com/huaheng/pc/config/containerCapacity/service/ContainerCapacityService.java new file mode 100644 index 0000000..aae1eca --- /dev/null +++ b/src/main/java/com/huaheng/pc/config/containerCapacity/service/ContainerCapacityService.java @@ -0,0 +1,12 @@ +package com.huaheng.pc.config.containerCapacity.service; + +import com.huaheng.framework.web.domain.AjaxResult; +import com.huaheng.pc.config.containerCapacity.domain.ContainerCapacity; +import com.baomidou.mybatisplus.extension.service.IService; +public interface ContainerCapacityService extends IService<ContainerCapacity>{ + + + //新增容器容量 + AjaxResult insertModel(ContainerCapacity containerCapacity); + +} diff --git a/src/main/java/com/huaheng/pc/config/containerCapacity/service/ContainerCapacityServiceImpl.java b/src/main/java/com/huaheng/pc/config/containerCapacity/service/ContainerCapacityServiceImpl.java new file mode 100644 index 0000000..1bf3feb --- /dev/null +++ b/src/main/java/com/huaheng/pc/config/containerCapacity/service/ContainerCapacityServiceImpl.java @@ -0,0 +1,59 @@ +package com.huaheng.pc.config.containerCapacity.service; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.huaheng.common.utils.StringUtils; +import com.huaheng.common.utils.security.ShiroUtils; +import com.huaheng.framework.web.domain.AjaxResult; +import com.huaheng.pc.config.containerType.domain.ContainerType; +import com.huaheng.pc.config.containerType.service.ContainerTypeService; +import com.huaheng.pc.general.material.domain.Material; +import com.huaheng.pc.general.material.service.MaterialService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.huaheng.pc.config.containerCapacity.mapper.ContainerCapacityMapper; +import com.huaheng.pc.config.containerCapacity.domain.ContainerCapacity; + +@Service +public class ContainerCapacityServiceImpl extends ServiceImpl<ContainerCapacityMapper, ContainerCapacity> implements ContainerCapacityService{ + + @Autowired + private MaterialService materialService; + @Autowired + private ContainerTypeService containerTypeService; + + + //判断容器类别是否存在,添加容器容量时,查找到该物料的具体信息,一并加入到容器容量中 + @Override + public AjaxResult insertModel(ContainerCapacity containerCapacity) { + containerCapacity.setWarehouseCode(ShiroUtils.getWarehouseCode()); + containerCapacity.setCreatedBy(ShiroUtils.getLoginName()); + containerCapacity.setLastUpdatedBy(ShiroUtils.getLoginName()); + + //查找该容器类别信息 + LambdaQueryWrapper<ContainerType> lambdaQueryWrappers = Wrappers.lambdaQuery(); + lambdaQueryWrappers.eq(StringUtils.isNotEmpty(containerCapacity.getContainerType()),ContainerType::getCode, containerCapacity.getContainerType()) + .eq(StringUtils.isNotEmpty(containerCapacity.getWarehouseCode()),ContainerType::getWarehouseCode, containerCapacity.getWarehouseCode()); + ContainerType containerType=containerTypeService.getOne(lambdaQueryWrappers); + if(containerType==null){ + return AjaxResult.error("系统没有该容器类型"); + } + + //查找该物料信息 + LambdaQueryWrapper<Material> lambdaQueryWrapper = Wrappers.lambdaQuery(); + lambdaQueryWrapper.eq(StringUtils.isNotEmpty(containerCapacity.getMaterialCode()),Material::getCode, containerCapacity.getMaterialCode()) + .eq(StringUtils.isNotEmpty(containerCapacity.getWarehouseCode()),Material::getWarehouseCode, containerCapacity.getWarehouseCode()); + Material material=materialService.getOne(lambdaQueryWrapper); + if(material==null){ + return AjaxResult.error("系统没有该物料"); + } + containerCapacity.setMaterialName(material.getName()); + containerCapacity.setMaterialSpec(material.getSpec()); + containerCapacity.setMaterialUnit(material.getUnit()); + if(!this.save(containerCapacity)){ + return AjaxResult.error("新增容器容量失败"); + } + return AjaxResult.success("新增容器容量成功"); + } +} diff --git a/src/main/java/com/huaheng/pc/config/containerType/controller/ContainerTypeController.java b/src/main/java/com/huaheng/pc/config/containerType/controller/ContainerTypeController.java index 77e3ffd..0b206f0 100644 --- a/src/main/java/com/huaheng/pc/config/containerType/controller/ContainerTypeController.java +++ b/src/main/java/com/huaheng/pc/config/containerType/controller/ContainerTypeController.java @@ -27,8 +27,8 @@ import java.util.List; /** * 容器类型 信息操作处理 * - * @author huaheng - * @date 2018-08-19 + * @author ricard + * @date 2019-08-12 */ @Controller @RequestMapping("/config/containerType") diff --git a/src/main/java/com/huaheng/pc/config/containerType/domain/ContainerType.java b/src/main/java/com/huaheng/pc/config/containerType/domain/ContainerType.java index 3316d0b..397cf14 100644 --- a/src/main/java/com/huaheng/pc/config/containerType/domain/ContainerType.java +++ b/src/main/java/com/huaheng/pc/config/containerType/domain/ContainerType.java @@ -53,7 +53,7 @@ public class ContainerType implements Serializable { */ @TableField(value = "enable") @ApiModelProperty(value="启用;0—禁用状态") - private Integer enable; + private Boolean enable; /** * 序号 @@ -116,7 +116,7 @@ public class ContainerType implements Serializable { */ @TableField(value = "useAsDEFAULT") @ApiModelProperty(value="作为默认货箱") - private Integer useAsDEFAULT; + private Boolean useAsDEFAULT; /** * 状态 @@ -373,23 +373,6 @@ public class ContainerType implements Serializable { this.companyCode = companyCode; } - /** - * 获取启用;0—禁用状态 - * - * @return enable - 启用;0—禁用状态 - */ - public Integer getEnable() { - return enable; - } - - /** - * 设置启用;0—禁用状态 - * - * @param enable 启用;0—禁用状态 - */ - public void setEnable(Integer enable) { - this.enable = enable; - } /** * 获取序号 @@ -517,39 +500,33 @@ public class ContainerType implements Serializable { this.maxWeight = maxWeight; } - /** - * 获取装满度 - * - * @return fillPercent - 装满度 - */ public Integer getFillPercent() { return fillPercent; } - /** - * 设置装满度 - * - * @param fillPercent 装满度 - */ public void setFillPercent(Integer fillPercent) { this.fillPercent = fillPercent; } /** - * 获取作为默认货箱 + * 获取装满度 * - * @return useAsDEFAULT - 作为默认货箱 + * @return fillPercent - 装满度 */ - public Integer getUseAsDEFAULT() { + + public Boolean getEnable() { + return enable; + } + + public void setEnable(Boolean enable) { + this.enable = enable; + } + + public Boolean getUseAsDEFAULT() { return useAsDEFAULT; } - /** - * 设置作为默认货箱 - * - * @param useAsDEFAULT 作为默认货箱 - */ - public void setUseAsDEFAULT(Integer useAsDEFAULT) { + public void setUseAsDEFAULT(Boolean useAsDEFAULT) { this.useAsDEFAULT = useAsDEFAULT; } diff --git a/src/main/java/com/huaheng/pc/config/locationType/controller/LocationTypeController.java b/src/main/java/com/huaheng/pc/config/locationType/controller/LocationTypeController.java index cee5eeb..b7acf9e 100644 --- a/src/main/java/com/huaheng/pc/config/locationType/controller/LocationTypeController.java +++ b/src/main/java/com/huaheng/pc/config/locationType/controller/LocationTypeController.java @@ -1,6 +1,5 @@ package com.huaheng.pc.config.locationType.controller; - import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.Wrappers; @@ -17,133 +16,150 @@ import com.huaheng.framework.web.page.TableDataInfo; import com.huaheng.framework.web.page.TableSupport; import com.huaheng.pc.config.locationType.domain.LocationType; import com.huaheng.pc.config.locationType.service.LocationTypeService; -import com.huaheng.pc.general.location.domain.Location; -import com.huaheng.pc.general.location.service.LocationService; +import com.huaheng.pc.config.zone.domain.Zone; +import com.huaheng.pc.config.zone.service.ZoneService; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.*; -import java.util.Arrays; import java.util.List; +/** + * 库位类型 信息操作处理 + * + * @author ricard + * @date 2019-08-12 + */ @Controller @RequestMapping("/config/locationType") -public class LocationTypeController extends BaseController { - +public class LocationTypeController extends BaseController +{ private String prefix = "config/locationType"; - - @Autowired - private LocationTypeService locationTypeService; - @Autowired - private LocationService locationService; - - @RequestMapping("config:locationType:view") - @GetMapping() - public String locationType() - { - return prefix + "/locationType"; - } - - /** - * 查询库位类型列表 - */ - @RequiresPermissions("config:locationType:list") - @Log(title = "通用-库位类型管理", operating = "查看库位类型列表", action = BusinessType.GRANT) - @PostMapping("/list") - @ResponseBody - public TableDataInfo list(LocationType locationType,String createdBegin, String createdEnd) { - LambdaQueryWrapper<LocationType> lambdaQueryWrapper = Wrappers.lambdaQuery(); - PageDomain pageDomain = TableSupport.buildPageRequest(); - Integer pageNum = pageDomain.getPageNum(); - Integer pageSize = pageDomain.getPageSize(); - - lambdaQueryWrapper.ge(StringUtils.isNotEmpty(createdBegin),LocationType::getCreated, createdBegin) - .le(StringUtils.isNotEmpty(createdEnd), LocationType::getCreated, createdEnd) - .eq(LocationType::getWarehouseCode, ShiroUtils.getWarehouseCode()) - .eq(StringUtils.isNotEmpty(locationType.getCode()),LocationType::getCode,locationType.getCode()) - .like(StringUtils.isNotEmpty(locationType.getName()),LocationType::getName,locationType.getName()); - - if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){ - /** - * 使用分页查询 - */ - Page<LocationType> page = new Page<>(pageNum, pageSize); - IPage<LocationType> iPage = locationTypeService.page(page, lambdaQueryWrapper); - return getDataTable(iPage.getRecords()); - } else { - List<LocationType> list = locationTypeService.list(lambdaQueryWrapper); - return getDataTable(list); - } - } - - /** - * 新增库位类型 - */ - @GetMapping("/add") - public String add() { - return prefix + "/add"; - } - - /** - * 新增保存库位类型 - */ - @RequiresPermissions("config:locationType:add") - @Log(title = "通用-库位类型管理", operating = "新增库位类型", action = BusinessType.INSERT) - @PostMapping("/add") - @ResponseBody - public AjaxResult addSave(LocationType locationType) { - Boolean result = locationTypeService.save(locationType); - return toAjax(result); - } - - /** - * 修改库位类型 - */ - @GetMapping("/edit/{id}") - public String edit(@PathVariable("id") Integer id, ModelMap mmap) { - LocationType locationType = locationTypeService.getById(id); - mmap.put("locationType", locationType); - return prefix + "/edit"; - } - - /** - * 修改保存库位类型 - */ - @RequiresPermissions("config:locationType:edit") - @Log(title = "通用-库位类型管理", operating = "修改库位类型", action = BusinessType.UPDATE) - @PostMapping("/edit") - @ResponseBody - public AjaxResult editSave(LocationType locationType) { - locationType.setLastUpdatedBy(ShiroUtils.getLoginName()); - Boolean result = locationTypeService.updateById(locationType); - return toAjax(result); - } - - /** - * 删除库位 - */ - @RequiresPermissions("config:locationType:remove") - @Log(title = "通用-库位类型管理", operating = "删除库位类型", action = BusinessType.DELETE) - @PostMapping( "/remove") - @ResponseBody - public AjaxResult remove(String ids) { - if (StringUtils.isEmpty(ids)){ - return AjaxResult.error("id不能为空"); - } - - for (Integer id : Convert.toIntArray(ids)) { - LambdaQueryWrapper<Location> lambdaQueryWrapper = Wrappers.lambdaQuery(); - lambdaQueryWrapper.eq(Location::getLocationType,id); - - int count = locationService.count(lambdaQueryWrapper); - if (count != 0){ - return AjaxResult.error("库位类型id="+id+",存在库位,不能删除。"); - } - } - List<Integer> list = Arrays.asList(Convert.toIntArray(ids)); - locationTypeService.removeByIds(list); - return AjaxResult.success("删除成功!"); - } + + @Autowired + private LocationTypeService locationTypeService; + @Autowired + private ZoneService zoneService; + + @RequiresPermissions("config:locationType:view") + @GetMapping() + public String locationType() + { + return prefix + "/locationType"; + } + + /** + * 查询库位类型列表 + */ + @RequiresPermissions("config:locationType:list") + @Log(title = "配置-库位类型设置", operating = "查看库位类型", action = BusinessType.GRANT) + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(LocationType locationType,String createdBegin, String createdEnd) + { + LambdaQueryWrapper<LocationType> lambdaQueryWrapper = Wrappers.lambdaQuery(); + PageDomain pageDomain = TableSupport.buildPageRequest(); + Integer pageNum = pageDomain.getPageNum(); + Integer pageSize = pageDomain.getPageSize(); + + lambdaQueryWrapper.ge(StringUtils.isNotEmpty(createdBegin),LocationType::getCreated, createdBegin) + .le(StringUtils.isNotEmpty(createdEnd), LocationType::getCreated, createdEnd) + .eq(LocationType::getWarehouseCode,ShiroUtils.getWarehouseCode()) + .eq(StringUtils.isNotEmpty(locationType.getCode()), LocationType::getCode, locationType.getCode()) + .like(StringUtils.isNotEmpty(locationType.getName()), LocationType::getName, locationType.getName()) + .orderByAsc(LocationType::getId); + + if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){ + /** + * 使用分页查询 + */ + Page<LocationType> page = new Page<>(pageNum, pageSize); + IPage<LocationType> iPage = locationTypeService.page(page, lambdaQueryWrapper); + return getMpDataTable(iPage.getRecords(),iPage.getTotal()); + } else { + List<LocationType> list = locationTypeService.list(lambdaQueryWrapper); + return getDataTable(list); + } + } + + /** + * 新增库位类型 + */ + @GetMapping("/add") + public String add() + { + return prefix + "/add"; + } + + /** + * 新增保存库位类型 + */ + @RequiresPermissions("config:locationType:add") + @Log(title = "配置-库位类型设置", operating = "新增库位类型", action = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(LocationType locationType) + { + if(StringUtils.isEmpty(locationType.getCode())){ + return AjaxResult.error("库位类型为空"); + } + //查找location,是否存在 + Zone zone=new Zone(); + LambdaQueryWrapper<Zone> lambdaQueryWrapper = Wrappers.lambdaQuery(); + lambdaQueryWrapper.eq(Zone::getLocationType,locationType.getCode()) + .eq(Zone::getWarehouseCode,ShiroUtils.getWarehouseCode()); + zone=zoneService.getOne(lambdaQueryWrapper); + if(zone==null){ + return AjaxResult.error("系统没有此库位类型"); + } + locationType.setWarehouseCode(ShiroUtils.getWarehouseCode()); + locationType.setCreatedBy(ShiroUtils.getLoginName()); + locationType.setLastUpdatedBy(ShiroUtils.getLoginName()); + return toAjax(locationTypeService.save(locationType)); + } + + /** + * 修改库位类型 + */ + @GetMapping("/edit/{id}") + public String edit(@PathVariable("id") Integer id, ModelMap mmap) + { + LocationType locationType = locationTypeService.getById(id); + mmap.put("locationType", locationType); + return prefix + "/edit"; + } + + /** + * 修改保存库位类型 + */ + @RequiresPermissions("config:locationType:edit") + @Log(title = "配置-库位类型设置", operating = "修改库位类型", action = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(LocationType locationType) + { + locationType.setLastUpdatedBy(ShiroUtils.getLoginName()); + return toAjax(locationTypeService.saveOrUpdate(locationType)); + } + + /** + * 删除库位类型 + */ + @RequiresPermissions("config:locationType:remove") + @Log(title = "配置-库位类型设置", operating = "删除库位类型", action = BusinessType.DELETE) + @PostMapping( "/remove") + @ResponseBody + public AjaxResult remove(String ids) + { + if (StringUtils.isEmpty(ids)) + return AjaxResult.error("id不能为空"); + for (Integer id : Convert.toIntArray(ids)) + { + locationTypeService.removeById(id); + } + return AjaxResult.success("删除成功!"); + } + } diff --git a/src/main/java/com/huaheng/pc/config/locationType/domain/LocationType.java b/src/main/java/com/huaheng/pc/config/locationType/domain/LocationType.java index 512226b..0c7e42a 100644 --- a/src/main/java/com/huaheng/pc/config/locationType/domain/LocationType.java +++ b/src/main/java/com/huaheng/pc/config/locationType/domain/LocationType.java @@ -93,7 +93,7 @@ public class LocationType implements Serializable { * 有效 */ @TableField(value = "enable") - private Integer enable; + private Boolean enable; /** * 创建时间 diff --git a/src/main/java/com/huaheng/pc/config/locationType/service/LocationTypeService.java b/src/main/java/com/huaheng/pc/config/locationType/service/LocationTypeService.java index 6a8cf47..19cc6e6 100644 --- a/src/main/java/com/huaheng/pc/config/locationType/service/LocationTypeService.java +++ b/src/main/java/com/huaheng/pc/config/locationType/service/LocationTypeService.java @@ -8,5 +8,5 @@ import java.util.Map; public interface LocationTypeService extends IService<LocationType>{ - List<Map<String,Object>> getLocationPrefix(); + public List<Map<String, Object>> getLocationPrefix(); } diff --git a/src/main/java/com/huaheng/pc/config/locationType/service/LocationTypeServiceImpl.java b/src/main/java/com/huaheng/pc/config/locationType/service/LocationTypeServiceImpl.java index a28f5b8..6f5f921 100644 --- a/src/main/java/com/huaheng/pc/config/locationType/service/LocationTypeServiceImpl.java +++ b/src/main/java/com/huaheng/pc/config/locationType/service/LocationTypeServiceImpl.java @@ -2,11 +2,11 @@ package com.huaheng.pc.config.locationType.service; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.huaheng.common.utils.security.ShiroUtils; -import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.huaheng.pc.config.locationType.mapper.LocationTypeMapper; +import com.huaheng.common.utils.security.ShiroUtils; import com.huaheng.pc.config.locationType.domain.LocationType; +import com.huaheng.pc.config.locationType.mapper.LocationTypeMapper; +import org.springframework.stereotype.Service; import java.util.List; import java.util.Map; @@ -14,13 +14,11 @@ import java.util.Map; @Service("locationType") public class LocationTypeServiceImpl extends ServiceImpl<LocationTypeMapper, LocationType> implements LocationTypeService{ - @Override - public List<Map<String, Object>> getLocationPrefix() { - LocationType locationType=new LocationType(); - locationType.setWarehouseCode(ShiroUtils.getWarehouseCode()); - locationType.setEnable(0); - LambdaQueryWrapper<LocationType> lambda = Wrappers.lambdaQuery(locationType); - - return this.listMaps(lambda); + public List<Map<String, Object>> getLocationPrefix(){ + LambdaQueryWrapper<LocationType> lambdaQueryWrapper = Wrappers.lambdaQuery(); + lambdaQueryWrapper.eq(LocationType::getWarehouseCode, ShiroUtils.getWarehouseCode()) + .eq(LocationType::getEnable, false) + .eq(LocationType::getEnable, true); + return this.listMaps(lambdaQueryWrapper); } } diff --git a/src/main/java/com/huaheng/pc/config/zone/controller/ZoneController.java b/src/main/java/com/huaheng/pc/config/zone/controller/ZoneController.java index 6bc594c..d3488dd 100644 --- a/src/main/java/com/huaheng/pc/config/zone/controller/ZoneController.java +++ b/src/main/java/com/huaheng/pc/config/zone/controller/ZoneController.java @@ -24,6 +24,13 @@ import org.springframework.web.bind.annotation.*; import java.util.List; +/** + * 库区 信息操作处理 + * + * @author ricard + * @date 2019-08-12 + */ + @Controller @RequestMapping("/config/zone") public class ZoneController extends BaseController { diff --git a/src/main/java/com/huaheng/pc/config/zoneCapacity/controller/ZoneCapacityController.java b/src/main/java/com/huaheng/pc/config/zoneCapacity/controller/ZoneCapacityController.java index 87b0612..de1126e 100644 --- a/src/main/java/com/huaheng/pc/config/zoneCapacity/controller/ZoneCapacityController.java +++ b/src/main/java/com/huaheng/pc/config/zoneCapacity/controller/ZoneCapacityController.java @@ -29,7 +29,7 @@ import java.util.List; * 库区容量 信息操作处理 * * @author ricard - * @date 2019-08-18 + * @date 2019-08-12 */ @Controller @RequestMapping("/config/zoneCapacity") diff --git a/src/main/java/com/huaheng/pc/general/bom/controller/BomDetailController.java b/src/main/java/com/huaheng/pc/general/bom/controller/BomDetailController.java new file mode 100644 index 0000000..8a28c28 --- /dev/null +++ b/src/main/java/com/huaheng/pc/general/bom/controller/BomDetailController.java @@ -0,0 +1,151 @@ +package com.huaheng.pc.general.bom.controller; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.huaheng.common.support.Convert; +import com.huaheng.common.utils.StringUtils; +import com.huaheng.common.utils.security.ShiroUtils; +import com.huaheng.framework.aspectj.lang.annotation.Log; +import com.huaheng.framework.aspectj.lang.constant.BusinessType; +import com.huaheng.framework.web.controller.BaseController; +import com.huaheng.framework.web.domain.AjaxResult; +import com.huaheng.framework.web.page.PageDomain; +import com.huaheng.framework.web.page.TableDataInfo; +import com.huaheng.framework.web.page.TableSupport; +import com.huaheng.pc.general.bom.domain.BomDetail; +import com.huaheng.pc.general.bom.service.BomDetailService; +import com.huaheng.pc.general.material.domain.Material; +import com.huaheng.pc.general.material.service.MaterialService; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.List; + +@Controller +@RequestMapping("/general/bomDetail") +public class BomDetailController extends BaseController { + + private String prefix = "general/bomDetail"; + + @Resource + private BomDetailService bomDetailService; + @Resource + private MaterialService materialService; + + @RequiresPermissions("general:bomHeader:view") + @Log(title = "管理-推送详情列表", operating = "推送详情列表", action = BusinessType.GRANT) + @GetMapping("/list/{id}") + public String list(@PathVariable("id")Integer id, ModelMap mmap) { + mmap.put("bomHeaderId",id); + return prefix+"/bomDetail"; + } + + /** + * 查询商品详情 + */ + @ApiOperation(value="查看商品列表", notes="根据商品id获取商品详情信息", httpMethod = "POST") + @RequiresPermissions("general:bomHeader:list") + @Log(title = "通用-商品管理", operating = "查看商品列表", action = BusinessType.GRANT) + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(@ApiParam(name="bomId",value="商品ID") Integer bomId) { + LambdaQueryWrapper<BomDetail> lambdaQueryWrapper = Wrappers.lambdaQuery(); + PageDomain pageDomain = TableSupport.buildPageRequest(); + Integer pageNum = pageDomain.getPageNum(); + Integer pageSize = pageDomain.getPageSize(); + lambdaQueryWrapper.eq(BomDetail::getBomId, bomId); + if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){ + /*使用分页查询*/ + Page<BomDetail> page = new Page<>(pageNum, pageSize); + IPage<BomDetail> iPage = bomDetailService.page(page, lambdaQueryWrapper); + return getMpDataTable(iPage.getRecords(), iPage.getTotal()); + } else { + List<BomDetail> list = bomDetailService.list(lambdaQueryWrapper); + return getDataTable(list); + } + } + + /** + * 新增商品详情 + */ + @GetMapping("/add") + public String add() { + return prefix + "/add"; + } + + /** + * 新增保存商品 + */ + @ApiOperation(value="新增商品详情", notes="新增商品详情", httpMethod = "POST") + @RequiresPermissions("general:bomDetail:add") + @Log(title = "通用-商品", operating = "新增商品", action = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(@ApiParam(name = "containerType", value = "商品详情", required = true) + BomDetail bomDetail) { + LambdaQueryWrapper<Material> lamdba = Wrappers.lambdaQuery(); + lamdba.eq(Material::getCode, bomDetail.getMaterialCode()); + Material material = materialService.getOne(lamdba); + if ( material == null){ + return AjaxResult.error("不存在物料编码"+bomDetail.getMaterialCode()); + } else { + bomDetail.setCompanyCode(material.getCompanyCode()); + bomDetail.setWarehouseCode(material.getWarehouseCode()); + bomDetail.setMaterialCode(material.getCode()); + bomDetail.setMaterialName(material.getName()); + bomDetail.setMaterialUnit(material.getUnit()); + bomDetail.setCreatedBy(ShiroUtils.getLoginName()); + bomDetail.setLastUpdatedBy(ShiroUtils.getLoginName()); + } + return toAjax(bomDetailService.save(bomDetail)); + } + + /** + * 修改商品详情 + */ + @GetMapping("/edit/{id}") + public String edit(@PathVariable("id") Integer id, ModelMap mmap) { + mmap.put("bomDetail", bomDetailService.getById(id)); + return prefix + "/edit"; + } + + /** + * 修改保存商品详情 + */ + @ApiOperation(value="修改商品详情", notes="修改商品详情", httpMethod = "POST") + @RequiresPermissions("general:BomDetail:edit") + @Log(title = "通用-商品详情", operating = "修改商品详情", action = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave( + @ApiParam(name = "BomDetail", value = "商品详情实体类", required = true)BomDetail bomDetail) { + return toAjax(bomDetailService.updateById(bomDetail)); + } + + /** + * 删除商品详情 + */ + @ApiOperation(value="删除商品详情", notes="根据id批量删除商品详情,参数示例1,2,3", httpMethod = "POST") + @RequiresPermissions("general:BomDetail:remove") + @Log(title = "通用-商品", operating = "删除商品", action = BusinessType.DELETE) + @PostMapping( "/remove") + @ResponseBody + public AjaxResult remove(String ids) { + if (StringUtils.isEmpty(ids)){ + return AjaxResult.error("id不能为空"); + } + List<Integer> list = new ArrayList<>(); + for (Integer id : Convert.toIntArray(ids)) { + list.add(id); + } + return toAjax(bomDetailService.removeByIds(list)); + } +} diff --git a/src/main/java/com/huaheng/pc/general/bom/controller/BomHeaderController.java b/src/main/java/com/huaheng/pc/general/bom/controller/BomHeaderController.java new file mode 100644 index 0000000..e80fa69 --- /dev/null +++ b/src/main/java/com/huaheng/pc/general/bom/controller/BomHeaderController.java @@ -0,0 +1,174 @@ +package com.huaheng.pc.general.bom.controller; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.huaheng.common.support.Convert; +import com.huaheng.common.utils.StringUtils; +import com.huaheng.common.utils.security.ShiroUtils; +import com.huaheng.framework.aspectj.lang.annotation.Log; +import com.huaheng.framework.aspectj.lang.constant.BusinessType; +import com.huaheng.framework.web.controller.BaseController; +import com.huaheng.framework.web.domain.AjaxResult; +import com.huaheng.framework.web.page.PageDomain; +import com.huaheng.framework.web.page.TableDataInfo; +import com.huaheng.framework.web.page.TableSupport; +import com.huaheng.pc.general.bom.domain.BomDetail; +import com.huaheng.pc.general.bom.domain.BomHeader; +import com.huaheng.pc.general.bom.service.BomDetailService; +import com.huaheng.pc.general.bom.service.BomHeaderService; +import com.huaheng.pc.general.material.domain.Material; +import com.huaheng.pc.general.material.service.MaterialService; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.List; + +@Controller +@RequestMapping("/general/bomHeader") +public class BomHeaderController extends BaseController { + + private String prefix = "general/bomHeader"; + + @Resource + private BomHeaderService bomHeaderService; + + @Resource + private BomDetailService bomDetailService; + + @Resource + private MaterialService materialService; + + @RequiresPermissions("general:bomHeader:view") + @GetMapping() + public String bomHeader() { + System.out.println("商品管理"); + return prefix + "/bomHeader"; + } + + /** + * 查询商品列表 + */ + @ApiOperation(value="查看商品列表", notes="根据物料编码、物料名称、货主编码、创建时间获取商品信息", httpMethod = "POST") + @RequiresPermissions("general:bomHeader:list") + @Log(title = "通用-商品管理", operating = "查看商品列表", action = BusinessType.GRANT) + @PostMapping("/list") + @ResponseBody + public TableDataInfo list( + @ApiParam(name="bomHeader",value="物料编码、物料名称、货主编码") BomHeader bomHeader, + @ApiParam(name = "createdBegin", value = "起止时间") String createdBegin, + @ApiParam(name = "createdEnd", value = "结束时间") String createdEnd) { + LambdaQueryWrapper<BomHeader> lambdaQueryWrapper = Wrappers.lambdaQuery(); + PageDomain pageDomain = TableSupport.buildPageRequest(); + Integer pageNum = pageDomain.getPageNum(); + Integer pageSize = pageDomain.getPageSize(); + lambdaQueryWrapper.gt(StringUtils.isNotEmpty(createdBegin), BomHeader::getCreated, createdBegin) + .lt(StringUtils.isNotEmpty(createdEnd), BomHeader::getCreated, createdEnd) + .eq(StringUtils.isNotEmpty(bomHeader.getMaterialCode()), BomHeader::getMaterialCode, bomHeader.getMaterialCode()) + .eq(StringUtils.isNotEmpty(bomHeader.getMaterialName()), BomHeader::getMaterialName, bomHeader.getMaterialName()) + .eq(StringUtils.isNotEmpty(bomHeader.getCompanyCode()), BomHeader::getCompanyCode, bomHeader.getCompanyCode()); + + if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){ + /*使用分页查询*/ + Page<BomHeader> page = new Page<>(pageNum, pageSize); + IPage<BomHeader> iPage = bomHeaderService.page(page, lambdaQueryWrapper); + return getMpDataTable(iPage.getRecords(), iPage.getTotal()); + } else { + List<BomHeader> list = bomHeaderService.list(lambdaQueryWrapper); + return getDataTable(list); + } + } + + /** + * 新增商品 + */ + @GetMapping("/add") + public String add() { + return prefix + "/add"; + } + + /** + * 新增保存商品 + */ + @ApiOperation(value="新增商品", notes="新增商品", httpMethod = "POST") + @RequiresPermissions("general:bomHeader:add") + @Log(title = "通用-商品", operating = "新增商品", action = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(@ApiParam(name = "containerType", value = "商品类型", required = true) + BomHeader bomHeader) { + + LambdaQueryWrapper<Material> lamdba = Wrappers.lambdaQuery(); + lamdba.eq(Material::getCode, bomHeader.getMaterialCode()); + Material material = materialService.getOne(lamdba); + if ( material == null){ + return AjaxResult.error("不存在物料编码"+bomHeader.getMaterialCode()); + } else { + bomHeader.setCompanyCode(material.getCompanyCode()); + bomHeader.setWarehouseCode(material.getWarehouseCode()); + bomHeader.setMaterialCode(material.getCode()); + bomHeader.setMaterialName(material.getName()); + bomHeader.setMaterialSpec(material.getSpec()); + bomHeader.setMaterialUnit(material.getUnit()); + bomHeader.setCreatedBy(ShiroUtils.getLoginName()); + bomHeader.setLastUpdatedBy(ShiroUtils.getLoginName()); + } + return toAjax(bomHeaderService.save(bomHeader)); + } + + /** + * 修改商品 + */ + @GetMapping("/edit/{id}") + public String edit(@PathVariable("id") Integer id, ModelMap mmap) { + mmap.put("bomHeader", bomHeaderService.getById(id)); + return prefix + "/edit"; + } + + /** + * 修改保存商品 + */ + @ApiOperation(value="修改商品", notes="修改商品", httpMethod = "POST") + @RequiresPermissions("general:bomHeader:edit") + @Log(title = "通用-商品", operating = "修改商品", action = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave( + @ApiParam(name = "bomHeader", value = "商品实体类", required = true)BomHeader bomHeader) { + return toAjax(bomHeaderService.updateById(bomHeader)); + } + + /** + * 删除容器 + */ + @ApiOperation(value="删除商品", notes="根据id批量删除商品,参数示例1,2,3", httpMethod = "POST") + @RequiresPermissions("general:bomHeader:remove") + @Log(title = "通用-商品", operating = "删除商品", action = BusinessType.DELETE) + @PostMapping( "/remove") + @ResponseBody + public AjaxResult remove(String ids) { + if (StringUtils.isEmpty(ids)){ + return AjaxResult.error("id不能为空"); + } + List<Integer> list = new ArrayList<>(); + for (Integer id : Convert.toIntArray(ids)) { + + LambdaQueryWrapper<BomDetail> lambda = Wrappers.lambdaQuery(); + List<BomDetail> bomDetailList = bomDetailService.list(lambda.eq(BomDetail::getBomId, id)); + if (bomDetailList.size() != 0) { + list.add(id); + } else { + return AjaxResult.error("商品编码为(" + id + ")存在商品详情"); + } + } + return toAjax(bomHeaderService.removeByIds(list)); + } + +} diff --git a/src/main/java/com/huaheng/pc/general/bom/domain/BomDetail.java b/src/main/java/com/huaheng/pc/general/bom/domain/BomDetail.java new file mode 100644 index 0000000..3e07239 --- /dev/null +++ b/src/main/java/com/huaheng/pc/general/bom/domain/BomDetail.java @@ -0,0 +1,259 @@ +package com.huaheng.pc.general.bom.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +@ApiModel(value="com.huaheng.pc.general.bom.domain.BomDetail") +@Data +@TableName(value = "bom_detail") +public class BomDetail implements Serializable { + /** + * 内部号 + */ + @TableId(value = "id", type = IdType.AUTO) + @ApiModelProperty(value="内部号") + private Integer id; + + /** + * 仓库代码 + */ + @TableField(value = "warehouseCode") + @ApiModelProperty(value="仓库代码") + private String warehouseCode; + + /** + * 货主 + */ + @TableField(value = "companyCode") + @ApiModelProperty(value="货主") + private String companyCode; + + /** + * 物料清单内部号 + */ + @TableField(value = "bomId") + @ApiModelProperty(value="物料清单内部号") + private Integer bomId; + + /** + * 物料编码 + */ + @TableField(value = "materialCode") + @ApiModelProperty(value="物料编码") + private String materialCode; + + /** + * 物料名称 + */ + @TableField(value = "materialName") + @ApiModelProperty(value="物料名称") + private String materialName; + + /** + * 数量单位 + */ + @TableField(value = "materialUnit") + @ApiModelProperty(value="数量单位") + private String materialUnit; + + /** + * 组套层次 + */ + @TableField(value = "buildLevel") + @ApiModelProperty(value="组套层次") + private Integer buildLevel; + + /** + * 序号 + */ + @TableField(value = "buildSequence") + @ApiModelProperty(value="序号") + private Integer buildSequence; + + /** + * 每成品需要数量 + */ + @TableField(value = "qty") + @ApiModelProperty(value="每成品需要数量") + private Integer qty; + + /** + * 分配规则 + */ + @TableField(value = "allocationRule") + @ApiModelProperty(value="分配规则") + private String allocationRule; + + /** + * 从货位 + */ + @TableField(value = "fromLocation") + @ApiModelProperty(value="从货位") + private String fromLocation; + + /** + * 有效 + */ + @TableField(value = "enable") + @ApiModelProperty(value="有效") + private Boolean enable; + + /** + * 创建时间 + */ + @TableField(value = "created") + @ApiModelProperty(value="创建时间") + private Date created; + + /** + * 创建用户 + */ + @TableField(value = "createdBy") + @ApiModelProperty(value="创建用户") + private String createdBy; + + /** + * 创建时间 + */ + @TableField(value = "lastUpdated") + @ApiModelProperty(value="创建时间") + private Date lastUpdated; + + /** + * 更新用户 + */ + @TableField(value = "lastUpdatedBy") + @ApiModelProperty(value="更新用户") + private String lastUpdatedBy; + + /** + * 数据版本 + */ + @TableField(value = "version") + @ApiModelProperty(value="数据版本") + private Integer version; + + /** + * 自定义字段1 + */ + @TableField(value = "userDef1") + @ApiModelProperty(value="自定义字段1") + private String userDef1; + + /** + * 自定义字段2 + */ + @TableField(value = "userDef2") + @ApiModelProperty(value="自定义字段2") + private String userDef2; + + /** + * 自定义字段3 + */ + @TableField(value = "userDef3") + @ApiModelProperty(value="自定义字段3") + private String userDef3; + + /** + * 自定义字段4 + */ + @TableField(value = "userDef4") + @ApiModelProperty(value="自定义字段4") + private String userDef4; + + /** + * 自定义字段5 + */ + @TableField(value = "userDef5") + @ApiModelProperty(value="自定义字段5") + private String userDef5; + + /** + * 自定义字段6 + */ + @TableField(value = "userDef6") + @ApiModelProperty(value="自定义字段6") + private String userDef6; + + /** + * 自定义字段7 + */ + @TableField(value = "userDef7") + @ApiModelProperty(value="自定义字段7") + private String userDef7; + + /** + * 自定义字段8 + */ + @TableField(value = "userDef8") + @ApiModelProperty(value="自定义字段8") + private String userDef8; + + /** + * 处理标记 + */ + @TableField(value = "processStamp") + @ApiModelProperty(value="处理标记") + private String processStamp; + + private static final long serialVersionUID = 1L; + + public static final String COL_WAREHOUSECODE = "warehouseCode"; + + public static final String COL_COMPANYCODE = "companyCode"; + + public static final String COL_BOMID = "bomId"; + + public static final String COL_MATERIALCODE = "materialCode"; + + public static final String COL_MATERIALNAME = "materialName"; + + public static final String COL_MATERIALUNIT = "materialUnit"; + + public static final String COL_BUILDLEVEL = "buildLevel"; + + public static final String COL_BUILDSEQUENCE = "buildSequence"; + + public static final String COL_QTY = "qty"; + + public static final String COL_ALLOCATIONRULE = "allocationRule"; + + public static final String COL_FROMLOCATION = "fromLocation"; + + public static final String COL_ENABLE = "enable"; + + public static final String COL_CREATED = "created"; + + public static final String COL_CREATEDBY = "createdBy"; + + public static final String COL_LASTUPDATED = "lastUpdated"; + + public static final String COL_LASTUPDATEDBY = "lastUpdatedBy"; + + public static final String COL_VERSION = "version"; + + public static final String COL_USERDEF1 = "userDef1"; + + public static final String COL_USERDEF2 = "userDef2"; + + public static final String COL_USERDEF3 = "userDef3"; + + public static final String COL_USERDEF4 = "userDef4"; + + public static final String COL_USERDEF5 = "userDef5"; + + public static final String COL_USERDEF6 = "userDef6"; + + public static final String COL_USERDEF7 = "userDef7"; + + public static final String COL_USERDEF8 = "userDef8"; + + public static final String COL_PROCESSSTAMP = "processStamp"; +} \ No newline at end of file diff --git a/src/main/java/com/huaheng/pc/general/bom/mapper/BomDetailMapper.java b/src/main/java/com/huaheng/pc/general/bom/mapper/BomDetailMapper.java new file mode 100644 index 0000000..5ac36c5 --- /dev/null +++ b/src/main/java/com/huaheng/pc/general/bom/mapper/BomDetailMapper.java @@ -0,0 +1,7 @@ +package com.huaheng.pc.general.bom.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.huaheng.pc.general.bom.domain.BomDetail; + +public interface BomDetailMapper extends BaseMapper<BomDetail> { +} \ No newline at end of file diff --git a/src/main/java/com/huaheng/pc/general/bom/service/BomDetailService.java b/src/main/java/com/huaheng/pc/general/bom/service/BomDetailService.java new file mode 100644 index 0000000..d1568ed --- /dev/null +++ b/src/main/java/com/huaheng/pc/general/bom/service/BomDetailService.java @@ -0,0 +1,8 @@ +package com.huaheng.pc.general.bom.service; + +import com.huaheng.pc.general.bom.domain.BomDetail; +import com.baomidou.mybatisplus.extension.service.IService; +public interface BomDetailService extends IService<BomDetail>{ + + +} diff --git a/src/main/java/com/huaheng/pc/general/bom/service/BomDetailServiceImpl.java b/src/main/java/com/huaheng/pc/general/bom/service/BomDetailServiceImpl.java new file mode 100644 index 0000000..7368c50 --- /dev/null +++ b/src/main/java/com/huaheng/pc/general/bom/service/BomDetailServiceImpl.java @@ -0,0 +1,11 @@ +package com.huaheng.pc.general.bom.service; + +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.huaheng.pc.general.bom.domain.BomDetail; +import com.huaheng.pc.general.bom.mapper.BomDetailMapper; + +@Service +public class BomDetailServiceImpl extends ServiceImpl<BomDetailMapper, BomDetail> implements BomDetailService{ + +} diff --git a/src/main/java/com/huaheng/pc/general/carrier/domain/Carrier.java b/src/main/java/com/huaheng/pc/general/carrier/domain/Carrier.java index a4b9b3f..64cde2c 100644 --- a/src/main/java/com/huaheng/pc/general/carrier/domain/Carrier.java +++ b/src/main/java/com/huaheng/pc/general/carrier/domain/Carrier.java @@ -10,6 +10,9 @@ import java.io.Serializable; import java.util.Date; import lombok.Data; +/** + * 承运商 + */ @ApiModel(value="com.huaheng.pc.general.carrier.domain.Carrier") @Data @TableName(value = "carrier") diff --git a/src/main/java/com/huaheng/pc/general/company/service/CompanyService.java b/src/main/java/com/huaheng/pc/general/company/service/CompanyService.java index 5b258e2..4af1fd0 100644 --- a/src/main/java/com/huaheng/pc/general/company/service/CompanyService.java +++ b/src/main/java/com/huaheng/pc/general/company/service/CompanyService.java @@ -11,7 +11,7 @@ public interface CompanyService extends IService<Company>{ public List<Company> selectCompanyByCurrentUserId(); - List<Company> selectCompanyByUserId(Integer userId); + public List<Company> selectCompanyByUserId(Integer id); public AjaxResult addCompany(Company company); diff --git a/src/main/java/com/huaheng/pc/general/company/service/CompanyServiceImpl.java b/src/main/java/com/huaheng/pc/general/company/service/CompanyServiceImpl.java index a8748a4..e61447d 100644 --- a/src/main/java/com/huaheng/pc/general/company/service/CompanyServiceImpl.java +++ b/src/main/java/com/huaheng/pc/general/company/service/CompanyServiceImpl.java @@ -35,13 +35,13 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl /** * 查询出仓库所有的货主,并且根据用户id查询对应的货主,包含的就将flag赋为true - * @param userId + * @param * @return */ @Override - public List<Company> selectCompanyByUserId(Integer userId) { + public List<Company> selectCompanyByUserId(Integer id) { UserCompany condition = new UserCompany(); - condition.setUserId(userId); + condition.setUserId(id); List<UserCompany> userCompanys = userCompanyMapper.selectListEntityByEqual(condition); Company company = new Company(); company.setWarehouseCode(ShiroUtils.getWarehouseCode()); diff --git a/src/main/java/com/huaheng/pc/general/location/service/LocationServiceImpl.java b/src/main/java/com/huaheng/pc/general/location/service/LocationServiceImpl.java index 32b3c4a..321a506 100644 --- a/src/main/java/com/huaheng/pc/general/location/service/LocationServiceImpl.java +++ b/src/main/java/com/huaheng/pc/general/location/service/LocationServiceImpl.java @@ -51,7 +51,7 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i throw new ServiceException("库区编码不存在"); } - + String prefix = location.getLocationType().substring(1); List<Location> locations = new ArrayList<>(); for (int i=1; i<=location.getIRow().intValue(); i++) { for (int j=1; j<=location.getIColumn().intValue(); j++) { @@ -70,7 +70,7 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i param.setCreatedBy(ShiroUtils.getLoginName()); param.setLastUpdatedBy(ShiroUtils.getLoginName()); String code = MessageFormat.format("{0}{1}-{2}-{3}-{4}", - location.getLocationType(), + prefix, String.format("%02d", i), String.format("%02d", j), String.format("%02d", k), diff --git a/src/main/java/com/huaheng/pc/general/material/controller/MaterialController.java b/src/main/java/com/huaheng/pc/general/material/controller/MaterialController.java index 86a6215..4ec966b 100644 --- a/src/main/java/com/huaheng/pc/general/material/controller/MaterialController.java +++ b/src/main/java/com/huaheng/pc/general/material/controller/MaterialController.java @@ -18,6 +18,8 @@ import com.huaheng.pc.general.location.domain.Location; import com.huaheng.pc.general.location.service.LocationService; import com.huaheng.pc.general.material.domain.Material; import com.huaheng.pc.general.material.service.MaterialService; +import com.huaheng.pc.general.materialUnit.domain.MaterialUnit; +import com.huaheng.pc.general.materialUnit.service.MaterialUnitService; import com.huaheng.pc.receipt.receiptDetail.domain.ReceiptDetail; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -41,6 +43,9 @@ public class MaterialController extends BaseController { @Resource private MaterialService materialService; + @Resource + private MaterialUnitService materialUnitService; + @RequiresPermissions("general:material:view") @GetMapping() public String material() { @@ -74,7 +79,7 @@ public class MaterialController extends BaseController { .like(StringUtils.isNotEmpty(material.getSpec()), Material::getSpec, material.getSpec()) .eq(Material::getWarehouseCode, ShiroUtils.getWarehouseCode()) .in(Material::getCompanyCode, ShiroUtils.getCompanyCodeList()) - .ne(Material::getDeleted, false); + .eq(Material::getDeleted, false); if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){ /*使用分页查询*/ @@ -113,6 +118,22 @@ public class MaterialController extends BaseController { if (map != null) { return AjaxResult.error("物料已经存在"); } + LambdaQueryWrapper<MaterialUnit> lambdaQueryWrapper = Wrappers.lambdaQuery(); + lambdaQueryWrapper.eq(MaterialUnit::getMaterialCode, material.getCode()) + .eq(MaterialUnit::getUnit, material.getUnit()); + if (materialUnitService.getOne(lambdaQueryWrapper) == null){ + MaterialUnit materialUnit = new MaterialUnit(); + materialUnit.setMaterialCode(material.getCode()); + materialUnit.setMaterialName(material.getName()); + materialUnit.setMaterialSpec(material.getSpec()); + materialUnit.setCompanyCode(material.getCompanyCode()); + materialUnit.setWarehouseCode(ShiroUtils.getWarehouseCode()); + materialUnit.setUnit(material.getUnit()); + materialUnit.setCreatedBy(ShiroUtils.getLoginName()); + materialUnit.setLastUpdatedBy(ShiroUtils.getLoginName()); + + materialUnitService.save(materialUnit); + } material.setWarehouseCode(ShiroUtils.getWarehouseCode()); material.setCreatedBy(ShiroUtils.getLoginName()); diff --git a/src/main/java/com/huaheng/pc/general/material/domain/Material.java b/src/main/java/com/huaheng/pc/general/material/domain/Material.java index bfd72c8..f2d2084 100644 --- a/src/main/java/com/huaheng/pc/general/material/domain/Material.java +++ b/src/main/java/com/huaheng/pc/general/material/domain/Material.java @@ -180,7 +180,7 @@ public class Material implements Serializable { */ @TableField(value = "enable") @ApiModelProperty(value="状态") - private byte[] enable; + private Boolean enable; /** * 创建时间 diff --git a/src/main/java/com/huaheng/pc/general/materialUnit/service/MaterialUnitService.java b/src/main/java/com/huaheng/pc/general/materialUnit/service/MaterialUnitService.java index 85420a0..dc42595 100644 --- a/src/main/java/com/huaheng/pc/general/materialUnit/service/MaterialUnitService.java +++ b/src/main/java/com/huaheng/pc/general/materialUnit/service/MaterialUnitService.java @@ -2,7 +2,12 @@ package com.huaheng.pc.general.materialUnit.service; import com.huaheng.pc.general.materialUnit.domain.MaterialUnit; import com.baomidou.mybatisplus.extension.service.IService; + +import java.util.List; +import java.util.Map; + public interface MaterialUnitService extends IService<MaterialUnit>{ + public List<Map<String, Object>> getUnit(); } diff --git a/src/main/java/com/huaheng/pc/general/materialUnit/service/MaterialUnitServiceImpl.java b/src/main/java/com/huaheng/pc/general/materialUnit/service/MaterialUnitServiceImpl.java index 039615c..9e6966c 100644 --- a/src/main/java/com/huaheng/pc/general/materialUnit/service/MaterialUnitServiceImpl.java +++ b/src/main/java/com/huaheng/pc/general/materialUnit/service/MaterialUnitServiceImpl.java @@ -1,13 +1,22 @@ package com.huaheng.pc.general.materialUnit.service; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.util.List; +import java.util.Map; + import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.huaheng.pc.general.materialUnit.domain.MaterialUnit; import com.huaheng.pc.general.materialUnit.mapper.MaterialUnitMapper; import com.huaheng.pc.general.materialUnit.service.MaterialUnitService; -@Service +@Service("materialUnitService") public class MaterialUnitServiceImpl extends ServiceImpl<MaterialUnitMapper, MaterialUnit> implements MaterialUnitService{ + @Override + public List<Map<String, Object>> getUnit(){ + LambdaQueryWrapper<MaterialUnit> lambda = Wrappers.lambdaQuery(); + return this.listMaps(lambda); + } } diff --git a/src/main/java/com/huaheng/pc/general/warehouse/domain/Warehouse.java b/src/main/java/com/huaheng/pc/general/warehouse/domain/Warehouse.java index ab346da..a18ab3c 100644 --- a/src/main/java/com/huaheng/pc/general/warehouse/domain/Warehouse.java +++ b/src/main/java/com/huaheng/pc/general/warehouse/domain/Warehouse.java @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; +import org.springframework.transaction.annotation.Transactional; import java.io.Serializable; import java.util.Date; @@ -84,6 +85,15 @@ public class Warehouse implements Serializable { @TableField(value = "email") private String email; + public boolean isFlag() { + return flag; + } + + public Warehouse setFlag(boolean flag) { + this.flag = flag; + return this; + } + /** * 上位系统url地址 */ @@ -189,6 +199,10 @@ public class Warehouse implements Serializable { @TableField(value = "deleted") private Boolean deleted; + /** 用户是否存在此仓库标识 默认不存在 */ + @TableField(exist = false) + private boolean flag = false; + private static final long serialVersionUID = 1L; public static final String COL_ADDRESS1 = "address1"; diff --git a/src/main/java/com/huaheng/pc/general/warehouse/mapper/WarehouseMapper.java b/src/main/java/com/huaheng/pc/general/warehouse/mapper/WarehouseMapper.java index e3224cc..7d584af 100644 --- a/src/main/java/com/huaheng/pc/general/warehouse/mapper/WarehouseMapper.java +++ b/src/main/java/com/huaheng/pc/general/warehouse/mapper/WarehouseMapper.java @@ -2,6 +2,16 @@ package com.huaheng.pc.general.warehouse.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.huaheng.pc.general.warehouse.domain.Warehouse; +import com.huaheng.pc.system.role.domain.Role; +import com.huaheng.pc.system.user.domain.SysUserWarehouse; + +import java.util.List; public interface WarehouseMapper extends BaseMapper<Warehouse> { + + public List<SysUserWarehouse> wareHouseAll(); + + public List<Warehouse> selectWarehouseByUserId(Integer userId); + + public List<Warehouse> selectWarehouseAll(); } \ No newline at end of file diff --git a/src/main/java/com/huaheng/pc/general/warehouse/service/WarehouseService.java b/src/main/java/com/huaheng/pc/general/warehouse/service/WarehouseService.java index d377193..08c0538 100644 --- a/src/main/java/com/huaheng/pc/general/warehouse/service/WarehouseService.java +++ b/src/main/java/com/huaheng/pc/general/warehouse/service/WarehouseService.java @@ -2,6 +2,7 @@ package com.huaheng.pc.general.warehouse.service; import com.huaheng.pc.general.warehouse.domain.Warehouse; import com.baomidou.mybatisplus.extension.service.IService; +import com.huaheng.pc.system.user.domain.SysUserWarehouse; import java.util.List; import java.util.Map; @@ -9,4 +10,9 @@ import java.util.Map; public interface WarehouseService extends IService<Warehouse>{ List<Map<String,Object>> getWarehouseList(Integer id); + + public List<Warehouse> selectWarehouseByUserId(Integer userId); + + + } diff --git a/src/main/java/com/huaheng/pc/general/warehouse/service/WarehouseServiceImpl.java b/src/main/java/com/huaheng/pc/general/warehouse/service/WarehouseServiceImpl.java index ebe671a..d3bb5fe 100644 --- a/src/main/java/com/huaheng/pc/general/warehouse/service/WarehouseServiceImpl.java +++ b/src/main/java/com/huaheng/pc/general/warehouse/service/WarehouseServiceImpl.java @@ -2,8 +2,11 @@ package com.huaheng.pc.general.warehouse.service; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.huaheng.common.utils.security.ShiroUtils; import com.huaheng.pc.general.warehouseCopany.domain.WarehouseCompany; import com.huaheng.pc.general.warehouseCopany.service.WarehouseCompanyService; +import com.huaheng.pc.system.role.domain.Role; +import com.huaheng.pc.system.user.domain.SysUserWarehouse; import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.huaheng.pc.general.warehouse.mapper.WarehouseMapper; @@ -47,4 +50,24 @@ public class WarehouseServiceImpl extends ServiceImpl<WarehouseMapper, Warehouse } return warehouseList; } + + @Override + public List<Warehouse> selectWarehouseByUserId(Integer userId) + { + List<Warehouse> userWarhouses = warehouseMapper.selectWarehouseByUserId(userId); + List<Warehouse> warehouses = warehouseMapper.selectWarehouseAll(); + for (Warehouse warehouse : warehouses) + { + for (Warehouse userWarehouse: userWarhouses) + { + if (warehouse.getCode().equals(userWarehouse.getCode())) + { + warehouse.setFlag(true); + break; + } + } + } + return warehouses; + } + } diff --git a/src/main/java/com/huaheng/pc/shipment/shipmentHeader/controller/ShipmentHeaderController.java b/src/main/java/com/huaheng/pc/shipment/shipmentHeader/controller/ShipmentHeaderController.java new file mode 100644 index 0000000..e5c1ff1 --- /dev/null +++ b/src/main/java/com/huaheng/pc/shipment/shipmentHeader/controller/ShipmentHeaderController.java @@ -0,0 +1,214 @@ +package com.huaheng.pc.shipment.shipmentHeader.controller; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.huaheng.common.utils.StringUtils; +import com.huaheng.common.utils.security.ShiroUtils; +import com.huaheng.framework.aspectj.lang.annotation.Log; +import com.huaheng.framework.aspectj.lang.constant.BusinessType; +import com.huaheng.framework.web.controller.BaseController; +import com.huaheng.framework.web.domain.AjaxResult; +import com.huaheng.framework.web.page.PageDomain; +import com.huaheng.framework.web.page.TableDataInfo; +import com.huaheng.framework.web.page.TableSupport; +import com.huaheng.pc.shipment.shipmentHeader.domain.ShipmentHeader; +import com.huaheng.pc.shipment.shipmentHeader.service.ShipmentHeaderService; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + + +/** + * 出库单主 信息操作处理 + * + * @author huaheng + * @date 2018-08-19 + */ +@Controller +@RequestMapping("/shipment/shipmentHeader") +public class ShipmentHeaderController extends BaseController +{ + private String prefix = "shipment/shipmentHeader"; + + @Autowired + private ShipmentHeaderService shipmentHeaderService; + + + @RequiresPermissions("shipment:bill:view") + @GetMapping() + public String shipmentHeader() + { + return prefix + "/shipmentHeader"; + } + + /** + * 查询出库单主列表 + */ + @RequiresPermissions("shipment:bill:list") + @Log(title = "出库-出库单", operating="查看出库主单", action = BusinessType.GRANT) + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(ShipmentHeader shipmentHeader,String createdBegin, String createdEnd) + { + LambdaQueryWrapper<ShipmentHeader> lambdaQueryWrapper = Wrappers.lambdaQuery(); + PageDomain pageDomain = TableSupport.buildPageRequest(); + Integer pageNum = pageDomain.getPageNum(); + Integer pageSize = pageDomain.getPageSize(); + + lambdaQueryWrapper.ge(StringUtils.isNotEmpty(createdBegin),ShipmentHeader::getCreated, createdBegin) + .le(StringUtils.isNotEmpty(createdEnd), ShipmentHeader::getCreated, createdEnd) + .eq(ShipmentHeader::getWarehouseCode,ShiroUtils.getWarehouseCode()) + .eq(StringUtils.isNotEmpty(shipmentHeader.getCode()),ShipmentHeader::getCode,shipmentHeader.getCode()) + .eq(StringUtils.isNotEmpty(shipmentHeader.getShipmentType()),ShipmentHeader::getShipmentType,shipmentHeader.getShipmentType()) + .eq(StringUtils.isNotEmpty(shipmentHeader.getReferCode()), ShipmentHeader::getReferCode, shipmentHeader.getReferCode()) + .eq(StringUtils.isNotEmpty(shipmentHeader.getReferCodeType()), ShipmentHeader::getReferCodeType, shipmentHeader.getReferCodeType()) + .eq(shipmentHeader.getFirstStatus()!=null, ShipmentHeader::getFirstStatus, shipmentHeader.getFirstStatus()) + .eq(shipmentHeader.getLastStatus()!=null, ShipmentHeader::getLastStatus, shipmentHeader.getLastStatus()) + .orderByDesc(ShipmentHeader::getId); + + if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){ + /** + * 使用分页查询 + */ + Page<ShipmentHeader> page = new Page<>(pageNum, pageSize); + IPage<ShipmentHeader> iPage = shipmentHeaderService.page(page, lambdaQueryWrapper); + return getMpDataTable(iPage.getRecords(),iPage.getTotal()); + } else { + List<ShipmentHeader> list = shipmentHeaderService.list(lambdaQueryWrapper); + return getDataTable(list); + } + } + + /** + * 新增出库单主 + */ + @GetMapping("/add") + public String add() + { + return prefix + "/add"; + } + + /** + * 新增保存出库单主 + */ + @RequiresPermissions("shipment:bill:add") + @Log(title = "出库-出库单", operating="新增出库主单", action = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(ShipmentHeader shipmentHeader) + { + AjaxResult ajaxResult=shipmentHeaderService.saveHeader(shipmentHeader); + return ajaxResult; + } + +// /** +// * 修改出库单主 +// */ +// @GetMapping("/edit/{id}") +// public String edit(@PathVariable("id") Integer id, ModelMap mmap) +// { +// ShipmentHeader shipmentHeader = shipmentHeaderService.selectEntityById(id); +// mmap.put("shipmentHeader", shipmentHeader); +// return prefix + "/edit"; +// } +// +// /** +// * 修改保存出库单主 +// */ +// @RequiresPermissions("shipment:bill:edit") +// @Log(title = "出库-出库单", operating="修改出库主单", action = BusinessType.UPDATE) +// @PostMapping("/edit") +// @ResponseBody +// public AjaxResult editSave(ShipmentHeader shipmentHeader) +// { +// ShipmentHeader temp = shipmentHeaderService.selectEntityById(shipmentHeader.getId()); +// if(temp.getFirstStatus()>100){ +// return AjaxResult.error("已经超过订单池状态,不能修改"); +// } +// temp.setCompanyCode(shipmentHeader.getCompanyCode()); +// temp.setCompanyId(shipmentHeader.getCompanyId()); +// temp.setSourceCode(shipmentHeader.getSourceCode()); +// temp.setSourcePlatform(shipmentHeader.getSourcePlatform()); +// temp.setShipTo(shipmentHeader.getShipTo()); +// temp.setPriority(shipmentHeader.getPriority()); +// temp.setStation(shipmentHeader.getStation()); +// temp.setRemark(shipmentHeader.getRemark()); +// temp.setUploadremark(shipmentHeader.getUploadremark()); +// temp.setAppointmentTime(shipmentHeader.getAppointmentTime()); +// temp.setEnable(shipmentHeader.getEnable()); +// temp.setLastUpdatedBy(ShiroUtils.getLoginName()); +// temp.setUserDef1(shipmentHeader.getUserDef1()); +// temp.setUserDef2(shipmentHeader.getUserDef2()); +// temp.setUserDef3(shipmentHeader.getUserDef3()); +// return toAjax(shipmentHeaderService.updateByModel(temp)); +// } +// +// /** +// * 删除出库单主 +// */ +// @RequiresPermissions("shipment:bill:remove") +// @Log(title = "出库-出库单", operating="删除出库主单", action = BusinessType.DELETE) +// @PostMapping( "/remove") +// @ResponseBody +// public AjaxResult remove(String ids) { +// if (StringUtils.isEmpty(ids)) +// return AjaxResult.error("id不能为空"); +// for (Integer id : Convert.toIntArray(ids)) +// { +// AjaxResult result = shipmentHeaderService.deleteHeaderAndDetail(id); +// if (result.code != RetCode.SUCCESS.getValue()) +// return result; +// } +// return AjaxResult.success("删除成功!"); +// } +// +// /** +// * 出库单报表打印 +// * @return +// */ +// @RequiresPermissions("shipment:bill:report") +// @Log(title = "出库-出库单", operating="打印出库单报表", action = BusinessType.OTHER) +// @GetMapping("/report/{id}") +// public String report(@PathVariable("id") Integer id, ModelMap mmap) +// { +// ShipmentHeader shipmentHeader = shipmentHeaderService.selectEntityById(id); +// mmap.put("shipmentHeader", shipmentHeader); +// +// ShipmentDetail shipmentDetail = new ShipmentDetail(); +// shipmentDetail.setShipmentId(id); +// List<ShipmentDetail> details = shipmentDetailService.getShipmentDetailListByLike(shipmentDetail); +// mmap.put("details", details); +// +// return prefix + "/report"; +// } +// +// /** +// * 手动组盘 +// */ +// @RequiresPermissions("shipment:bill:view") +// @Log(title = "出库-出库单", operating = "手动组盘", action = BusinessType.OTHER) +// @PostMapping( "/shipping") +// @ResponseBody +// public AjaxResult receive(String code, String ids) +// { +// AjaxResult ajaxResult=new AjaxResult(); +// if(StringUtils.isEmpty(ids)){ +// ajaxResult = shipmentHeaderService.shippings(code); +// }else { +// ajaxResult = shipmentHeaderService.shipping(code, ids.split(",")); +// } +// return ajaxResult; +// } +// +// @PostMapping("/getShipmentHeader") +// @ResponseBody +// public AjaxResult<ShipmentHeader> getShipmentHeader(int id){ +// return AjaxResult.success(shipmentHeaderService.selectEntityById(id)); +// } +} diff --git a/src/main/java/com/huaheng/pc/shipment/shipmentHeader/domain/ShipmentHeader.java b/src/main/java/com/huaheng/pc/shipment/shipmentHeader/domain/ShipmentHeader.java index 7e62640..fd20a96 100644 --- a/src/main/java/com/huaheng/pc/shipment/shipmentHeader/domain/ShipmentHeader.java +++ b/src/main/java/com/huaheng/pc/shipment/shipmentHeader/domain/ShipmentHeader.java @@ -36,12 +36,7 @@ public class ShipmentHeader implements Serializable { @ApiModelProperty(value = "货主") private String companyCode; - /** - * 装载号 - */ - @TableField(value = "loadId") - @ApiModelProperty(value = "装载号") - private Integer loadId; + /** * 出库单号 @@ -134,12 +129,7 @@ public class ShipmentHeader implements Serializable { @ApiModelProperty(value = "要求到货时间") private Date requestedDeliveryDate; - /** - * 要求到货类型 - */ - @TableField(value = "requestedDeliveryType") - @ApiModelProperty(value = "要求到货类型") - private String requestedDeliveryType; + /** * 计划发车日期 @@ -225,26 +215,7 @@ public class ShipmentHeader implements Serializable { @ApiModelProperty(value = "总行数") private Integer totalLines; - /** - * 总拼箱数 - */ - @TableField(value = "totalContainers") - @ApiModelProperty(value = "总拼箱数") - private Integer totalContainers; - - /** - * 总整箱数 - */ - @TableField(value = "totalCases") - @ApiModelProperty(value = "总整箱数") - private Integer totalCases; - /** - * 总价值 - */ - @TableField(value = "totalValue") - @ApiModelProperty(value = "总价值") - private BigDecimal totalValue; /** * 处理类型 @@ -441,8 +412,6 @@ public class ShipmentHeader implements Serializable { public static final String COL_COMPANYCODE = "companyCode"; - public static final String COL_LOADID = "loadId"; - public static final String COL_CODE = "code"; public static final String COL_REFERCODE = "referCode"; @@ -469,8 +438,6 @@ public class ShipmentHeader implements Serializable { public static final String COL_REQUESTEDDELIVERYDATE = "requestedDeliveryDate"; - public static final String COL_REQUESTEDDELIVERYTYPE = "requestedDeliveryType"; - public static final String COL_SCHEDULEDSHIPDATE = "scheduledShipDate"; public static final String COL_ACTUALSHIPDATETIME = "actualShipDateTime"; @@ -495,12 +462,6 @@ public class ShipmentHeader implements Serializable { public static final String COL_TOTALLINES = "totalLines"; - public static final String COL_TOTALCONTAINERS = "totalContainers"; - - public static final String COL_TOTALCASES = "totalCases"; - - public static final String COL_TOTALVALUE = "totalValue"; - public static final String COL_PROCESSTYPE = "processType"; public static final String COL_LASTWAVEID = "lastWaveId"; diff --git a/src/main/java/com/huaheng/pc/shipment/shipmentHeader/mapper/ShipmentHeaderMapper.java b/src/main/java/com/huaheng/pc/shipment/shipmentHeader/mapper/ShipmentHeaderMapper.java index 3dc5024..5f54714 100644 --- a/src/main/java/com/huaheng/pc/shipment/shipmentHeader/mapper/ShipmentHeaderMapper.java +++ b/src/main/java/com/huaheng/pc/shipment/shipmentHeader/mapper/ShipmentHeaderMapper.java @@ -4,4 +4,11 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.huaheng.pc.shipment.shipmentHeader.domain.ShipmentHeader; public interface ShipmentHeaderMapper extends BaseMapper<ShipmentHeader> { + + /** + * 生成出库单编码 + * @return + */ + String createCode(String shipmentType); + } \ No newline at end of file diff --git a/src/main/java/com/huaheng/pc/shipment/shipmentHeader/service/ShipmentHeaderService.java b/src/main/java/com/huaheng/pc/shipment/shipmentHeader/service/ShipmentHeaderService.java index 62a205a..5b46785 100644 --- a/src/main/java/com/huaheng/pc/shipment/shipmentHeader/service/ShipmentHeaderService.java +++ b/src/main/java/com/huaheng/pc/shipment/shipmentHeader/service/ShipmentHeaderService.java @@ -1,8 +1,15 @@ package com.huaheng.pc.shipment.shipmentHeader.service; +import com.huaheng.framework.web.domain.AjaxResult; import com.huaheng.pc.shipment.shipmentHeader.domain.ShipmentHeader; import com.baomidou.mybatisplus.extension.service.IService; public interface ShipmentHeaderService extends IService<ShipmentHeader>{ + //新增出库主单 + AjaxResult<Boolean> saveHeader(ShipmentHeader shipmentHeader) ; + + + //根据单据类型建单据号 + String createCode(String shipmentType); } diff --git a/src/main/java/com/huaheng/pc/shipment/shipmentHeader/service/ShipmentHeaderServiceImpl.java b/src/main/java/com/huaheng/pc/shipment/shipmentHeader/service/ShipmentHeaderServiceImpl.java index c01b2a2..3e2ef35 100644 --- a/src/main/java/com/huaheng/pc/shipment/shipmentHeader/service/ShipmentHeaderServiceImpl.java +++ b/src/main/java/com/huaheng/pc/shipment/shipmentHeader/service/ShipmentHeaderServiceImpl.java @@ -1,7 +1,13 @@ package com.huaheng.pc.shipment.shipmentHeader.service; +import com.huaheng.common.utils.security.ShiroUtils; +import com.huaheng.framework.web.domain.AjaxResult; +import com.huaheng.pc.system.dict.service.IDictDataService; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import javax.annotation.Resource; +import java.text.SimpleDateFormat; +import java.util.Date; import java.util.List; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.huaheng.pc.shipment.shipmentHeader.domain.ShipmentHeader; @@ -10,4 +16,50 @@ import com.huaheng.pc.shipment.shipmentHeader.service.ShipmentHeaderService; @Service public class ShipmentHeaderServiceImpl extends ServiceImpl<ShipmentHeaderMapper, ShipmentHeader> implements ShipmentHeaderService{ + @Autowired + private IDictDataService dictDataService; + @Resource + private ShipmentHeaderMapper shipmentHeaderMapper; + + + //新增出库主单 + @Override + public AjaxResult<Boolean> saveHeader(ShipmentHeader shipmentHeader) { + if(dictDataService.checkConfig("shipmentType", shipmentHeader.getShipmentType()) == false) + { + return AjaxResult.error("没有对应的出库单类型"); + } + String code = createCode(shipmentHeader.getShipmentType()); + shipmentHeader.setId(null); + shipmentHeader.setFirstStatus(0); + shipmentHeader.setLastStatus(0); + shipmentHeader.setLastUpdated(null); + shipmentHeader.setLastUpdatedBy(ShiroUtils.getLoginName()); + shipmentHeader.setCreated(null); + shipmentHeader.setCreatedBy(ShiroUtils.getLoginName()); + shipmentHeader.setWarehouseCode(ShiroUtils.getWarehouseCode()); + shipmentHeader.setCode(code); + boolean result = this.save(shipmentHeader); + return AjaxResult.toAjax(result); + } + + + //根据单据类型建单据号 + public String createCode(String shipmentType) + { + String code = null; + Date now = new Date(); + SimpleDateFormat df = new SimpleDateFormat("yyyyMMdd"); + String maxCode = shipmentHeaderMapper.createCode(shipmentType); + if (maxCode != null && maxCode.length() > 13 && maxCode.substring(maxCode.length() - 13, maxCode.length() - 5).equals(df.format(now))) + { + Integer Count = Integer.valueOf(maxCode.substring(maxCode.length() - 5, maxCode.length())); + code = shipmentType + df.format(now) + String.format("%05d", Count + 1); + } + else + { + code = shipmentType + df.format(now) + "00001"; + } + return code; + } } diff --git a/src/main/java/com/huaheng/pc/system/role/domain/Role.java b/src/main/java/com/huaheng/pc/system/role/domain/Role.java index d89c173..deb6f49 100644 --- a/src/main/java/com/huaheng/pc/system/role/domain/Role.java +++ b/src/main/java/com/huaheng/pc/system/role/domain/Role.java @@ -60,6 +60,7 @@ public class Role private String warehouseCode; /** 用户是否存在此角色标识 默认不存在 */ + @TableField(exist = false) private boolean flag = false; /** 菜单组 */ @@ -87,7 +88,6 @@ public class Role private Date updateTime; /** 备注 */ -// @TableField(exist=false) @TableField private String remark; diff --git a/src/main/java/com/huaheng/pc/system/user/controller/UserController.java b/src/main/java/com/huaheng/pc/system/user/controller/UserController.java index 9c99fd9..43c125d 100644 --- a/src/main/java/com/huaheng/pc/system/user/controller/UserController.java +++ b/src/main/java/com/huaheng/pc/system/user/controller/UserController.java @@ -2,11 +2,22 @@ package com.huaheng.pc.system.user.controller; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.huaheng.common.constant.Constants; +import com.huaheng.common.utils.MessageUtils; +import com.huaheng.common.utils.SystemLogUtils; import com.huaheng.common.utils.security.ShiroUtils; +import com.huaheng.framework.shiro.web.filter.LogoutFilter; import com.huaheng.pc.general.company.domain.Company; import com.huaheng.pc.general.company.service.CompanyService; +import com.huaheng.pc.general.warehouse.domain.Warehouse; +import com.huaheng.pc.general.warehouse.mapper.WarehouseMapper; +import com.huaheng.pc.general.warehouse.service.WarehouseService; +import com.huaheng.pc.system.user.domain.SysUserWarehouse; import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.apache.shiro.session.SessionException; +import org.apache.shiro.subject.Subject; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.web.servlet.server.Session; import org.springframework.stereotype.Controller; import org.springframework.transaction.annotation.Transactional; import org.springframework.ui.ModelMap; @@ -25,7 +36,14 @@ import com.huaheng.framework.web.page.TableDataInfo; import com.huaheng.pc.system.role.service.IRoleService; import com.huaheng.pc.system.user.domain.User; import com.huaheng.pc.system.user.service.IUserService; + +import javax.annotation.Resource; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; import java.util.List; +import java.util.Map; + +import static javax.security.auth.Subject.getSubject; /** * 用户信息 @@ -47,6 +65,12 @@ public class UserController extends BaseController @Autowired private CompanyService companyService; + @Autowired + private WarehouseService warehouseService; + + @Resource + private WarehouseMapper warehouseMapper; + @RequiresPermissions("system:user:view") @GetMapping() public String user() @@ -94,6 +118,13 @@ public class UserController extends BaseController mmap.put("roles", roleService.selectRoleAll()); LambdaQueryWrapper<Company> lambdaQueryWrapper = Wrappers.lambdaQuery(company); mmap.put("companys", companyService.list(lambdaQueryWrapper)); + LambdaQueryWrapper<Warehouse> warehouse = Wrappers.lambdaQuery(); + warehouse.select(Warehouse::getCode,Warehouse::getName,Warehouse::getEnable); + List<Map<String, Object>> warehouseList = warehouseService.listMaps(warehouse); + for (Map<String, Object> item : warehouseList){ + item.put("value",item.get("code").toString()); + } + mmap.put("warehouseList",warehouseList); return prefix + "/add"; } @@ -124,6 +155,7 @@ public class UserController extends BaseController mmap.put("user", userService.selectUserById(id)); mmap.put("roles", roleService.selectRolesByUserId(id)); mmap.put("companys", companyService.selectCompanyByUserId(id)); + mmap.put("warehouses", warehouseService.selectWarehouseByUserId(id)); return prefix + "/edit"; } @@ -137,11 +169,16 @@ public class UserController extends BaseController @ResponseBody public AjaxResult editSave(User user) { + if (StringUtils.isNotNull(user.getId()) && User.isAdmin(user.getId())) { return error("不允许修改超级管理员用户"); } AjaxResult ajaxResult = toAjax(userService.updateUser(user)); + + if (ShiroUtils.getLoginName().equals(user.getUserName())) + ShiroUtils.logout(); + return ajaxResult; } diff --git a/src/main/java/com/huaheng/pc/system/userWarehouse/domain/SysUserWarehouse.java b/src/main/java/com/huaheng/pc/system/user/domain/SysUserWarehouse.java index a15f21f..ecbf0e6 100644 --- a/src/main/java/com/huaheng/pc/system/userWarehouse/domain/SysUserWarehouse.java +++ b/src/main/java/com/huaheng/pc/system/user/domain/SysUserWarehouse.java @@ -1,4 +1,4 @@ -package com.huaheng.pc.system.userWarehouse.domain; +package com.huaheng.pc.system.user.domain; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; @@ -6,9 +6,10 @@ import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import java.io.Serializable; import lombok.Data; +import java.io.Serializable; + @ApiModel(value="com.huaheng.pc.system.userWarehousel.domain.SysUserWarehouse") @Data @TableName(value = "sys_user_warehouse") diff --git a/src/main/java/com/huaheng/pc/system/user/domain/User.java b/src/main/java/com/huaheng/pc/system/user/domain/User.java index 4dd9fe8..2e79e3f 100644 --- a/src/main/java/com/huaheng/pc/system/user/domain/User.java +++ b/src/main/java/com/huaheng/pc/system/user/domain/User.java @@ -112,6 +112,9 @@ public class User /** 货主编码列表 */ private List<String> companyCodeList; + /** 仓库编码列表 */ + private List<String> warehouseCodeList; + /** 搜索值 */ private String searchValue; diff --git a/src/main/java/com/huaheng/pc/system/user/mapper/SysUserWarehouseMapper.java b/src/main/java/com/huaheng/pc/system/user/mapper/SysUserWarehouseMapper.java new file mode 100644 index 0000000..0569c25 --- /dev/null +++ b/src/main/java/com/huaheng/pc/system/user/mapper/SysUserWarehouseMapper.java @@ -0,0 +1,16 @@ +package com.huaheng.pc.system.user.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.huaheng.pc.system.user.domain.SysUserWarehouse; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + + +public interface SysUserWarehouseMapper extends BaseMapper<SysUserWarehouse> { + + public int batchUserWarehouse(@Param("userWarehouseList") List<SysUserWarehouse> userWarehouseList); + + public int deleteUserWarehouseByUserId(Integer userId); + +} \ No newline at end of file diff --git a/src/main/java/com/huaheng/pc/system/user/mapper/UserMapper.java b/src/main/java/com/huaheng/pc/system/user/mapper/UserMapper.java index 4be2e3e..3be853e 100644 --- a/src/main/java/com/huaheng/pc/system/user/mapper/UserMapper.java +++ b/src/main/java/com/huaheng/pc/system/user/mapper/UserMapper.java @@ -132,6 +132,14 @@ public interface UserMapper */ public List<Map<String, Object>> getWarehouseByUserCode(@Param("loginName")String loginName); + + /** + * 根据用户编码查询该用户所有仓库 + * @param loginName + * @return + */ + public List<Map<String, Object>> getWarehouseByUserName(@Param("loginName")String loginName); + /** * 更新用户维护日期 * @param date diff --git a/src/main/java/com/huaheng/pc/system/user/service/IUserService.java b/src/main/java/com/huaheng/pc/system/user/service/IUserService.java index ea3b9f3..6607160 100644 --- a/src/main/java/com/huaheng/pc/system/user/service/IUserService.java +++ b/src/main/java/com/huaheng/pc/system/user/service/IUserService.java @@ -2,8 +2,10 @@ package com.huaheng.pc.system.user.service; import com.huaheng.framework.web.domain.AjaxResult; import com.huaheng.pc.system.user.domain.ClientType; +import com.huaheng.pc.system.user.domain.SysUserWarehouse; import com.huaheng.pc.system.user.domain.User; import io.swagger.models.auth.In; +import org.apache.ibatis.annotations.Param; import java.util.Date; import java.util.List; @@ -195,6 +197,8 @@ public interface IUserService * @return */ public User selectmen(String loginName); + + public int batchUserWarehouse(@Param("userWarehouseList") List<SysUserWarehouse> userWarehouseList); } diff --git a/src/main/java/com/huaheng/pc/system/user/service/UserServiceImpl.java b/src/main/java/com/huaheng/pc/system/user/service/UserServiceImpl.java index 1efe7d6..99d1863 100644 --- a/src/main/java/com/huaheng/pc/system/user/service/UserServiceImpl.java +++ b/src/main/java/com/huaheng/pc/system/user/service/UserServiceImpl.java @@ -13,8 +13,8 @@ import com.huaheng.pc.general.company.mapper.CompanyMapper; import com.huaheng.pc.general.company.service.CompanyService; import com.huaheng.pc.general.warehouse.service.WarehouseService; import com.huaheng.pc.general.warehouse.domain.Warehouse; -import com.huaheng.pc.system.user.domain.ClientType; -import com.huaheng.pc.system.user.domain.UserCompany; +import com.huaheng.pc.system.user.domain.*; +import com.huaheng.pc.system.user.mapper.SysUserWarehouseMapper; import com.huaheng.pc.system.user.mapper.UserCompanyMapper; import org.apache.shiro.SecurityUtils; import org.apache.shiro.authc.AuthenticationException; @@ -29,8 +29,6 @@ import com.huaheng.common.utils.security.ShiroUtils; import com.huaheng.framework.shiro.service.PasswordService; import com.huaheng.pc.system.role.domain.Role; import com.huaheng.pc.system.role.mapper.RoleMapper; -import com.huaheng.pc.system.user.domain.User; -import com.huaheng.pc.system.user.domain.UserRole; import com.huaheng.pc.system.user.mapper.UserMapper; import com.huaheng.pc.system.user.mapper.UserRoleMapper; @@ -68,11 +66,14 @@ public class UserServiceImpl implements IUserService @Resource private WarehouseService warehouseService; + @Resource + private SysUserWarehouseMapper sysUserWarehouseMapper; + /** * 登陆验证 * @param username 用户名 * @param password 密 码 - * @param warehouseId 仓库id +// * @param warehouseId 仓库id * @param warehouseCode 仓库编码 * @return */ @@ -262,6 +263,8 @@ public class UserServiceImpl implements IUserService insertUserCompany(user); // 新增用户与角色管理 insertUserRole(user); + // 新增用户与仓库管理 + insertUserWarehouse(user); return rows; } @@ -284,6 +287,11 @@ public class UserServiceImpl implements IUserService userCompanyMapper.deleteUserCompanyByUserId(userId); // 新增用户与货主管理 insertUserCompany(user); + // 删除用户与仓库关联 + sysUserWarehouseMapper.deleteUserWarehouseByUserId(userId); + // 新增用户与仓库管理 + insertUserWarehouse(user); + return userMapper.updateUser(user); } @@ -335,6 +343,29 @@ public class UserServiceImpl implements IUserService } } + + /** + * 新增用户仓库信息 + * + * @param user 用户对象 + */ + public void insertUserWarehouse(User user) + { + // 新增用户与仓库管理 + List<SysUserWarehouse> list = new ArrayList<SysUserWarehouse>(); + if (user.getWarehouseCodeList() != null) { + for (String warehouseCode : user.getWarehouseCodeList()) { + SysUserWarehouse warehouse = new SysUserWarehouse(); + warehouse.setUserId(user.getId()); + warehouse.setWarehouseCode(warehouseCode); + list.add(warehouse); + } + if (list.size() > 0) { + sysUserWarehouseMapper.batchUserWarehouse(list); + } + } + } + /** * 新增用户货主信息 * @@ -469,7 +500,11 @@ public class UserServiceImpl implements IUserService } else { - list = userMapper.getWarehouseByUserCode(loginName); + list = userMapper.getWarehouseByUserName(loginName); + if (list.size()==1) + list=userMapper.getWarehouseByUserCode(loginName); + + } return list; } @@ -552,4 +587,9 @@ public class UserServiceImpl implements IUserService return user; } + @Override + public int batchUserWarehouse(List<SysUserWarehouse> userWarehouseList) { + return sysUserWarehouseMapper.batchUserWarehouse(userWarehouseList); + } + } diff --git a/src/main/java/com/huaheng/pc/system/userWarehouse/mapper/SysUserWarehouseMapper.java b/src/main/java/com/huaheng/pc/system/userWarehouse/mapper/SysUserWarehouseMapper.java deleted file mode 100644 index 74a1259..0000000 --- a/src/main/java/com/huaheng/pc/system/userWarehouse/mapper/SysUserWarehouseMapper.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.huaheng.pc.system.userWarehouse.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.huaheng.pc.system.userWarehouse.domain.SysUserWarehouse; - -public interface SysUserWarehouseMapper extends BaseMapper<SysUserWarehouse> { -} \ No newline at end of file diff --git a/src/main/java/com/huaheng/pc/system/userWarehouse/service/SysUserWarehouseService.java b/src/main/java/com/huaheng/pc/system/userWarehouse/service/SysUserWarehouseService.java deleted file mode 100644 index 734afcc..0000000 --- a/src/main/java/com/huaheng/pc/system/userWarehouse/service/SysUserWarehouseService.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.huaheng.pc.system.userWarehouse.service; - -import com.huaheng.pc.system.userWarehouse.domain.SysUserWarehouse; -import com.baomidou.mybatisplus.extension.service.IService; -public interface SysUserWarehouseService extends IService<SysUserWarehouse>{ - - -} diff --git a/src/main/java/com/huaheng/pc/system/userWarehouse/service/SysUserWarehouseServiceImpl.java b/src/main/java/com/huaheng/pc/system/userWarehouse/service/SysUserWarehouseServiceImpl.java deleted file mode 100644 index bf91504..0000000 --- a/src/main/java/com/huaheng/pc/system/userWarehouse/service/SysUserWarehouseServiceImpl.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.huaheng.pc.system.userWarehouse.service; - -import org.springframework.stereotype.Service; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.huaheng.pc.system.userWarehouse.mapper.SysUserWarehouseMapper; -import com.huaheng.pc.system.userWarehouse.domain.SysUserWarehouse; - -@Service -public class SysUserWarehouseServiceImpl extends ServiceImpl<SysUserWarehouseMapper, SysUserWarehouse> implements SysUserWarehouseService{ - -} diff --git a/src/main/java/com/huaheng/pc/task/taskDetail/domain/TaskDetail.java b/src/main/java/com/huaheng/pc/task/taskDetail/domain/TaskDetail.java new file mode 100644 index 0000000..32d5a85 --- /dev/null +++ b/src/main/java/com/huaheng/pc/task/taskDetail/domain/TaskDetail.java @@ -0,0 +1,510 @@ +package com.huaheng.pc.task.taskDetail.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +@ApiModel(value="com.huaheng.pc.task.taskDetail.domain.TaskDetail") +@Data +@TableName(value = "task_detail") +public class TaskDetail implements Serializable { + /** + * ID + */ + @TableId(value = "id", type = IdType.AUTO) + @ApiModelProperty(value="ID") + private Integer id; + + /** + * 任务头内部号 + */ + @TableField(value = "taskId") + @ApiModelProperty(value="任务头内部号") + private Integer taskId; + + /** + * 任务号 + */ + @TableField(value = "taskCode") + @ApiModelProperty(value="任务号") + private String taskCode; + + /** + * 任务类型 + */ + @TableField(value = "taskType") + @ApiModelProperty(value="任务类型") + private String taskType; + + /** + * 任务类型 + */ + @TableField(value = "internalTaskType") + @ApiModelProperty(value="任务类型") + private String internalTaskType; + + /** + * 仓库 + */ + @TableField(value = "warehouseCode") + @ApiModelProperty(value="仓库") + private String warehouseCode; + + /** + * 货主 + */ + @TableField(value = "companyCode") + @ApiModelProperty(value="货主") + private String companyCode; + + /** + * 物料 + */ + @TableField(value = "materialCode") + @ApiModelProperty(value="物料") + private String materialCode; + + /** + * 物料明细 + */ + @TableField(value = "materialName") + @ApiModelProperty(value="物料明细") + private String materialName; + + /** + * 物料 + */ + @TableField(value = "materialSpec") + @ApiModelProperty(value="物料") + private String materialSpec; + + /** + * 物料明细 + */ + @TableField(value = "materialUnit") + @ApiModelProperty(value="物料明细") + private String materialUnit; + + /** + * 数量 + */ + @TableField(value = "qty") + @ApiModelProperty(value="数量") + private Integer qty; + + /** + * 从货位 + */ + @TableField(value = "fromLocation") + @ApiModelProperty(value="从货位") + private String fromLocation; + + /** + * 到货位 + */ + @TableField(value = "toLocation") + @ApiModelProperty(value="到货位") + private String toLocation; + + /** + * 容器编码 + */ + @TableField(value = "containerCode") + @ApiModelProperty(value="容器编码") + private String containerCode; + + /** + * 从区域 + */ + @TableField(value = "fromZone") + @ApiModelProperty(value="从区域") + private String fromZone; + + /** + * 到区域 + */ + @TableField(value = "toZone") + @ApiModelProperty(value="到区域") + private String toZone; + + /** + * 属性号 + */ + @TableField(value = "attributeId") + @ApiModelProperty(value="属性号") + private Integer attributeId; + + /** + * 状态 + */ + @TableField(value = "enable") + @ApiModelProperty(value="状态") + private Integer enable; + + /** + * 参考单号 + */ + @TableField(value = "referenceCode") + @ApiModelProperty(value="参考单号") + private String referenceCode; + + /** + * 参考内部号 + */ + @TableField(value = "referenceId") + @ApiModelProperty(value="参考内部号") + private Integer referenceId; + + /** + * 参考内部行号 + */ + @TableField(value = "referenceLineId") + @ApiModelProperty(value="参考内部行号") + private Integer referenceLineId; + + /** + * 指派用户 + */ + @TableField(value = "assignedUser") + @ApiModelProperty(value="指派用户") + private String assignedUser; + + /** + * 属性1 + */ + @TableField(value = "attribute1") + @ApiModelProperty(value="属性1") + private String attribute1; + + /** + * 属性2 + */ + @TableField(value = "attribute2") + @ApiModelProperty(value="属性2") + private String attribute2; + + /** + * 属性3 + */ + @TableField(value = "attribute3") + @ApiModelProperty(value="属性3") + private String attribute3; + + /** + * 属性4 + */ + @TableField(value = "attribute4") + @ApiModelProperty(value="属性4") + private String attribute4; + + /** + * 批次 + */ + @TableField(value = "batch") + @ApiModelProperty(value="批次") + private String batch; + + /** + * 批号 + */ + @TableField(value = "lot") + @ApiModelProperty(value="批号") + private String lot; + + /** + * 项目号 + */ + @TableField(value = "projectNo") + @ApiModelProperty(value="项目号") + private String projectNo; + + /** + * 质检 + */ + @TableField(value = "qcCheck") + @ApiModelProperty(value="质检") + private String qcCheck; + + /** + * 生产日期 + */ + @TableField(value = "manufactureDate") + @ApiModelProperty(value="生产日期") + private Date manufactureDate; + + /** + * 失效日期 + */ + @TableField(value = "expirationDate") + @ApiModelProperty(value="失效日期") + private Date expirationDate; + + /** + * 入库日期 + */ + @TableField(value = "agingDate") + @ApiModelProperty(value="入库日期") + private Date agingDate; + + /** + * 库存状态 + */ + @TableField(value = "inventorySts") + @ApiModelProperty(value="库存状态") + private String inventorySts; + + /** + * 波次号 + */ + @TableField(value = "waveId") + @ApiModelProperty(value="波次号") + private Integer waveId; + + /** + * 分配的库存ID + */ + @TableField(value = "fromInventoryId") + @ApiModelProperty(value="分配的库存ID") + private Integer fromInventoryId; + + @TableField(value = "toInventoryId") + @ApiModelProperty(value="null") + private Integer toInventoryId; + + /** + * 确认用户 + */ + @TableField(value = "confirmedBy") + @ApiModelProperty(value="确认用户") + private String confirmedBy; + + /** + * 组号 + */ + @TableField(value = "groupNum") + @ApiModelProperty(value="组号") + private Integer groupNum; + + /** + * 序号 + */ + @TableField(value = "groupIndex") + @ApiModelProperty(value="序号") + private Integer groupIndex; + + /** + * 创建时间 + */ + @TableField(value = "created") + @ApiModelProperty(value="创建时间") + private Date created; + + /** + * 创建用户 + */ + @TableField(value = "createdBy") + @ApiModelProperty(value="创建用户") + private String createdBy; + + /** + * 创建时间 + */ + @TableField(value = "lastUpdated") + @ApiModelProperty(value="创建时间") + private Date lastUpdated; + + /** + * 更新用户 + */ + @TableField(value = "lastUpdatedBy") + @ApiModelProperty(value="更新用户") + private String lastUpdatedBy; + + /** + * 数据版本 + */ + @TableField(value = "version") + @ApiModelProperty(value="数据版本") + private Integer version; + + /** + * kitFlag标志 Y/N AGV专用 + */ + @TableField(value = "userDef1") + @ApiModelProperty(value="kitFlag标志 Y/N AGV专用") + private String userDef1; + + /** + * unit 单位 AGV专用 + */ + @TableField(value = "userDef2") + @ApiModelProperty(value="unit 单位 AGV专用") + private String userDef2; + + /** + * 自定义字段3 + */ + @TableField(value = "userDef3") + @ApiModelProperty(value="自定义字段3") + private String userDef3; + + /** + * 自定义字段4 + */ + @TableField(value = "userDef4") + @ApiModelProperty(value="自定义字段4") + private String userDef4; + + /** + * 自定义字段5 + */ + @TableField(value = "userDef5") + @ApiModelProperty(value="自定义字段5") + private String userDef5; + + /** + * 自定义字段6 + */ + @TableField(value = "userDef6") + @ApiModelProperty(value="自定义字段6") + private String userDef6; + + /** + * 自定义字段7 + */ + @TableField(value = "userDef7") + @ApiModelProperty(value="自定义字段7") + private String userDef7; + + /** + * 自定义字段8 + */ + @TableField(value = "userDef8") + @ApiModelProperty(value="自定义字段8") + private String userDef8; + + /** + * 处理标记 + */ + @TableField(value = "processStamp") + @ApiModelProperty(value="处理标记") + private String processStamp; + + private static final long serialVersionUID = 1L; + + public static final String COL_ID = "id"; + + public static final String COL_TASKID = "taskId"; + + public static final String COL_TASKCODE = "taskCode"; + + public static final String COL_TASKTYPE = "taskType"; + + public static final String COL_INTERNALTASKTYPE = "internalTaskType"; + + public static final String COL_WAREHOUSECODE = "warehouseCode"; + + public static final String COL_COMPANYCODE = "companyCode"; + + public static final String COL_MATERIALCODE = "materialCode"; + + public static final String COL_MATERIALNAME = "materialName"; + + public static final String COL_MATERIALSPEC = "materialSpec"; + + public static final String COL_MATERIALUNIT = "materialUnit"; + + public static final String COL_QTY = "qty"; + + public static final String COL_FROMLOCATION = "fromLocation"; + + public static final String COL_TOLOCATION = "toLocation"; + + public static final String COL_CONTAINERCODE = "containerCode"; + + public static final String COL_FROMZONE = "fromZone"; + + public static final String COL_TOZONE = "toZone"; + + public static final String COL_ATTRIBUTEID = "attributeId"; + + public static final String COL_ENABLE = "enable"; + + public static final String COL_REFERENCECODE = "referenceCode"; + + public static final String COL_REFERENCEID = "referenceId"; + + public static final String COL_REFERENCELINEID = "referenceLineId"; + + public static final String COL_ASSIGNEDUSER = "assignedUser"; + + public static final String COL_ATTRIBUTE1 = "attribute1"; + + public static final String COL_ATTRIBUTE2 = "attribute2"; + + public static final String COL_ATTRIBUTE3 = "attribute3"; + + public static final String COL_ATTRIBUTE4 = "attribute4"; + + public static final String COL_BATCH = "batch"; + + public static final String COL_LOT = "lot"; + + public static final String COL_PROJECTNO = "projectNo"; + + public static final String COL_QCCHECK = "qcCheck"; + + public static final String COL_MANUFACTUREDATE = "manufactureDate"; + + public static final String COL_EXPIRATIONDATE = "expirationDate"; + + public static final String COL_AGINGDATE = "agingDate"; + + public static final String COL_INVENTORYSTS = "inventorySts"; + + public static final String COL_WAVEID = "waveId"; + + public static final String COL_FROMINVENTORYID = "fromInventoryId"; + + public static final String COL_TOINVENTORYID = "toInventoryId"; + + public static final String COL_CONFIRMEDBY = "confirmedBy"; + + public static final String COL_GROUPNUM = "groupNum"; + + public static final String COL_GROUPINDEX = "groupIndex"; + + public static final String COL_CREATED = "created"; + + public static final String COL_CREATEDBY = "createdBy"; + + public static final String COL_LASTUPDATED = "lastUpdated"; + + public static final String COL_LASTUPDATEDBY = "lastUpdatedBy"; + + public static final String COL_VERSION = "version"; + + public static final String COL_USERDEF1 = "userDef1"; + + public static final String COL_USERDEF2 = "userDef2"; + + public static final String COL_USERDEF3 = "userDef3"; + + public static final String COL_USERDEF4 = "userDef4"; + + public static final String COL_USERDEF5 = "userDef5"; + + public static final String COL_USERDEF6 = "userDef6"; + + public static final String COL_USERDEF7 = "userDef7"; + + public static final String COL_USERDEF8 = "userDef8"; + + public static final String COL_PROCESSSTAMP = "processStamp"; +} \ No newline at end of file diff --git a/src/main/java/com/huaheng/pc/task/taskDetail/mapper/TaskDetailMapper.java b/src/main/java/com/huaheng/pc/task/taskDetail/mapper/TaskDetailMapper.java new file mode 100644 index 0000000..87e5a0e --- /dev/null +++ b/src/main/java/com/huaheng/pc/task/taskDetail/mapper/TaskDetailMapper.java @@ -0,0 +1,7 @@ +package com.huaheng.pc.task.taskDetail.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.huaheng.pc.task.taskDetail.domain.TaskDetail; + +public interface TaskDetailMapper extends BaseMapper<TaskDetail> { +} \ No newline at end of file diff --git a/src/main/java/com/huaheng/pc/task/taskDetail/service/TaskDetailService.java b/src/main/java/com/huaheng/pc/task/taskDetail/service/TaskDetailService.java new file mode 100644 index 0000000..f5ac425 --- /dev/null +++ b/src/main/java/com/huaheng/pc/task/taskDetail/service/TaskDetailService.java @@ -0,0 +1,8 @@ +package com.huaheng.pc.task.taskDetail.service; + +import com.huaheng.pc.task.taskDetail.domain.TaskDetail; +import com.baomidou.mybatisplus.extension.service.IService; +public interface TaskDetailService extends IService<TaskDetail>{ + + +} diff --git a/src/main/java/com/huaheng/pc/task/taskDetail/service/TaskDetailServiceImpl.java b/src/main/java/com/huaheng/pc/task/taskDetail/service/TaskDetailServiceImpl.java new file mode 100644 index 0000000..2b2343f --- /dev/null +++ b/src/main/java/com/huaheng/pc/task/taskDetail/service/TaskDetailServiceImpl.java @@ -0,0 +1,13 @@ +package com.huaheng.pc.task.taskDetail.service; + +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import java.util.List; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.huaheng.pc.task.taskDetail.mapper.TaskDetailMapper; +import com.huaheng.pc.task.taskDetail.domain.TaskDetail; +import com.huaheng.pc.task.taskDetail.service.TaskDetailService; +@Service +public class TaskDetailServiceImpl extends ServiceImpl<TaskDetailMapper, TaskDetail> implements TaskDetailService{ + +} diff --git a/src/main/java/com/huaheng/pc/task/taskHeader/domain/TaskHeader.java b/src/main/java/com/huaheng/pc/task/taskHeader/domain/TaskHeader.java new file mode 100644 index 0000000..88c539b --- /dev/null +++ b/src/main/java/com/huaheng/pc/task/taskHeader/domain/TaskHeader.java @@ -0,0 +1,405 @@ +package com.huaheng.pc.task.taskHeader.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +@ApiModel(value="com.huaheng.pc.task.taskHeader.domain.TaskHeader") +@Data +@TableName(value = "task_header") +public class TaskHeader implements Serializable { + /** + * ID + */ + @TableId(value = "id", type = IdType.AUTO) + @ApiModelProperty(value="ID") + private Integer id; + + /** + * 任务 + */ + @TableField(value = "code") + @ApiModelProperty(value="任务") + private String code; + + /** + * 仓库 + */ + @TableField(value = "warehouseCode") + @ApiModelProperty(value="仓库") + private String warehouseCode; + + /** + * 货主 + */ + @TableField(value = "companyCode") + @ApiModelProperty(value="货主") + private String companyCode; + + /** + * 任务类型 + */ + @TableField(value = "taskType") + @ApiModelProperty(value="任务类型") + private String taskType; + + /** + * 内部类型 + */ + @TableField(value = "internalTaskType") + @ApiModelProperty(value="内部类型") + private String internalTaskType; + + /** + * 参考单内部号 + */ + @TableField(value = "referenceId") + @ApiModelProperty(value="参考单内部号") + private Integer referenceId; + + /** + * 参考单号 + */ + @TableField(value = "referenceCode") + @ApiModelProperty(value="参考单号") + private String referenceCode; + + /** + * 分配用户 + */ + @TableField(value = "assignedUser") + @ApiModelProperty(value="分配用户") + private String assignedUser; + + /** + * 确认用户 + */ + @TableField(value = "confirmedBy") + @ApiModelProperty(value="确认用户") + private String confirmedBy; + + /** + * 状态 + */ + @TableField(value = "enable") + @ApiModelProperty(value="状态") + private Integer enable; + + /** + * 波次号 + */ + @TableField(value = "waveId") + @ApiModelProperty(value="波次号") + private Integer waveId; + + /** + * 车号 + */ + @TableField(value = "pickingCartCode") + @ApiModelProperty(value="车号") + private String pickingCartCode; + + /** + * 位置号 + */ + @TableField(value = "pickingCartPos") + @ApiModelProperty(value="位置号") + private String pickingCartPos; + + /** + * 容器号 + */ + @TableField(value = "containerCode") + @ApiModelProperty(value="容器号") + private String containerCode; + + /** + * 开始拣货时间 + */ + @TableField(value = "startPickDateTime") + @ApiModelProperty(value="开始拣货时间") + private Date startPickDateTime; + + /** + * 截至拣货时间 + */ + @TableField(value = "endPickDateTime") + @ApiModelProperty(value="截至拣货时间") + private Date endPickDateTime; + + /** + * 合流货位 + */ + @TableField(value = "rebatchLoc") + @ApiModelProperty(value="合流货位") + private String rebatchLoc; + + /** + * 是否完成合流 + */ + @TableField(value = "finishRebatch") + @ApiModelProperty(value="是否完成合流") + private Integer finishRebatch; + + /** + * 合流组唯一号 + */ + @TableField(value = "rebatchGroupCode") + @ApiModelProperty(value="合流组唯一号") + private String rebatchGroupCode; + + /** + * 是否允许合流 + */ + @TableField(value = "allowRebatch") + @ApiModelProperty(value="是否允许合流") + private Integer allowRebatch; + + /** + * 任务处理类型 + */ + @TableField(value = "taskProcessType") + @ApiModelProperty(value="任务处理类型") + private String taskProcessType; + + /** + * 二次分拣工作台 + */ + @TableField(value = "rebinBench") + @ApiModelProperty(value="二次分拣工作台") + private String rebinBench; + + /** + * 二次分拣完成 + */ + @TableField(value = "rebined") + @ApiModelProperty(value="二次分拣完成") + private Integer rebined; + + /** + * 二次分拣开始时间 + */ + @TableField(value = "startRebinDateTime") + @ApiModelProperty(value="二次分拣开始时间") + private Date startRebinDateTime; + + /** + * 二次分拣结束时间 + */ + @TableField(value = "endRebinDateTime") + @ApiModelProperty(value="二次分拣结束时间") + private Date endRebinDateTime; + + /** + * 二次分拣人 + */ + @TableField(value = "rebinedBy") + @ApiModelProperty(value="二次分拣人") + private String rebinedBy; + + /** + * 异常原因 + */ + @TableField(value = "exceptionCode") + @ApiModelProperty(value="异常原因") + private String exceptionCode; + + /** + * 异常处理人 + */ + @TableField(value = "exceptionHandledBy") + @ApiModelProperty(value="异常处理人") + private String exceptionHandledBy; + + /** + * 创建时间 + */ + @TableField(value = "created") + @ApiModelProperty(value="创建时间") + private Date created; + + /** + * 创建用户 + */ + @TableField(value = "createdBy") + @ApiModelProperty(value="创建用户") + private String createdBy; + + /** + * 创建时间 + */ + @TableField(value = "lastUpdated") + @ApiModelProperty(value="创建时间") + private Date lastUpdated; + + /** + * 更新用户 + */ + @TableField(value = "lastUpdatedBy") + @ApiModelProperty(value="更新用户") + private String lastUpdatedBy; + + /** + * 数据版本 + */ + @TableField(value = "version") + @ApiModelProperty(value="数据版本") + private Integer version; + + /** + * AGV区域任务标志 =‘AGV’ + */ + @TableField(value = "userDef1") + @ApiModelProperty(value="AGV区域任务标志 =‘AGV’") + private String userDef1; + + /** + * 自定义字段2 + */ + @TableField(value = "userDef2") + @ApiModelProperty(value="自定义字段2") + private String userDef2; + + /** + * 同步标志 0:需要同步 10:同步成功 20:同步失败 + */ + @TableField(value = "userDef3") + @ApiModelProperty(value="同步标志 0:需要同步 10:同步成功 20:同步失败") + private String userDef3; + + /** + * 自定义字段4 + */ + @TableField(value = "userDef4") + @ApiModelProperty(value="自定义字段4") + private String userDef4; + + /** + * 自定义字段5 + */ + @TableField(value = "userDef5") + @ApiModelProperty(value="自定义字段5") + private String userDef5; + + /** + * 自定义字段6 + */ + @TableField(value = "userDef6") + @ApiModelProperty(value="自定义字段6") + private String userDef6; + + /** + * 自定义字段7 + */ + @TableField(value = "userDef7") + @ApiModelProperty(value="自定义字段7") + private String userDef7; + + /** + * 自定义字段8 + */ + @TableField(value = "userDef8") + @ApiModelProperty(value="自定义字段8") + private String userDef8; + + /** + * 处理标记 + */ + @TableField(value = "processStamp") + @ApiModelProperty(value="处理标记") + private String processStamp; + + private static final long serialVersionUID = 1L; + + public static final String COL_ID = "id"; + + public static final String COL_CODE = "code"; + + public static final String COL_WAREHOUSECODE = "warehouseCode"; + + public static final String COL_COMPANYCODE = "companyCode"; + + public static final String COL_TASKTYPE = "taskType"; + + public static final String COL_INTERNALTASKTYPE = "internalTaskType"; + + public static final String COL_REFERENCEID = "referenceId"; + + public static final String COL_REFERENCECODE = "referenceCode"; + + public static final String COL_ASSIGNEDUSER = "assignedUser"; + + public static final String COL_CONFIRMEDBY = "confirmedBy"; + + public static final String COL_ENABLE = "enable"; + + public static final String COL_WAVEID = "waveId"; + + public static final String COL_PICKINGCARTCODE = "pickingCartCode"; + + public static final String COL_PICKINGCARTPOS = "pickingCartPos"; + + public static final String COL_CONTAINERCODE = "containerCode"; + + public static final String COL_STARTPICKDATETIME = "startPickDateTime"; + + public static final String COL_ENDPICKDATETIME = "endPickDateTime"; + + public static final String COL_REBATCHLOC = "rebatchLoc"; + + public static final String COL_FINISHREBATCH = "finishRebatch"; + + public static final String COL_REBATCHGROUPCODE = "rebatchGroupCode"; + + public static final String COL_ALLOWREBATCH = "allowRebatch"; + + public static final String COL_TASKPROCESSTYPE = "taskProcessType"; + + public static final String COL_REBINBENCH = "rebinBench"; + + public static final String COL_REBINED = "rebined"; + + public static final String COL_STARTREBINDATETIME = "startRebinDateTime"; + + public static final String COL_ENDREBINDATETIME = "endRebinDateTime"; + + public static final String COL_REBINEDBY = "rebinedBy"; + + public static final String COL_EXCEPTIONCODE = "exceptionCode"; + + public static final String COL_EXCEPTIONHANDLEDBY = "exceptionHandledBy"; + + public static final String COL_CREATED = "created"; + + public static final String COL_CREATEDBY = "createdBy"; + + public static final String COL_LASTUPDATED = "lastUpdated"; + + public static final String COL_LASTUPDATEDBY = "lastUpdatedBy"; + + public static final String COL_VERSION = "version"; + + public static final String COL_USERDEF1 = "userDef1"; + + public static final String COL_USERDEF2 = "userDef2"; + + public static final String COL_USERDEF3 = "userDef3"; + + public static final String COL_USERDEF4 = "userDef4"; + + public static final String COL_USERDEF5 = "userDef5"; + + public static final String COL_USERDEF6 = "userDef6"; + + public static final String COL_USERDEF7 = "userDef7"; + + public static final String COL_USERDEF8 = "userDef8"; + + public static final String COL_PROCESSSTAMP = "processStamp"; +} \ No newline at end of file diff --git a/src/main/java/com/huaheng/pc/task/taskHeader/mapper/TaskHeaderMapper.java b/src/main/java/com/huaheng/pc/task/taskHeader/mapper/TaskHeaderMapper.java new file mode 100644 index 0000000..72ef249 --- /dev/null +++ b/src/main/java/com/huaheng/pc/task/taskHeader/mapper/TaskHeaderMapper.java @@ -0,0 +1,7 @@ +package com.huaheng.pc.task.taskHeader.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.huaheng.pc.task.taskHeader.domain.TaskHeader; + +public interface TaskHeaderMapper extends BaseMapper<TaskHeader> { +} \ No newline at end of file diff --git a/src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderService.java b/src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderService.java new file mode 100644 index 0000000..a0bddf4 --- /dev/null +++ b/src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderService.java @@ -0,0 +1,8 @@ +package com.huaheng.pc.task.taskHeader.service; + +import com.huaheng.pc.task.taskHeader.domain.TaskHeader; +import com.baomidou.mybatisplus.extension.service.IService; +public interface TaskHeaderService extends IService<TaskHeader>{ + + +} diff --git a/src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderServiceImpl.java b/src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderServiceImpl.java new file mode 100644 index 0000000..d4c22cc --- /dev/null +++ b/src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderServiceImpl.java @@ -0,0 +1,13 @@ +package com.huaheng.pc.task.taskHeader.service; + +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import java.util.List; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.huaheng.pc.task.taskHeader.domain.TaskHeader; +import com.huaheng.pc.task.taskHeader.mapper.TaskHeaderMapper; +import com.huaheng.pc.task.taskHeader.service.TaskHeaderService; +@Service +public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHeader> implements TaskHeaderService{ + +} diff --git a/src/main/java/com/huaheng/pc/task/taskPreference/domain/TaskPreference.java b/src/main/java/com/huaheng/pc/task/taskPreference/domain/TaskPreference.java new file mode 100644 index 0000000..5e782f7 --- /dev/null +++ b/src/main/java/com/huaheng/pc/task/taskPreference/domain/TaskPreference.java @@ -0,0 +1,324 @@ +package com.huaheng.pc.task.taskPreference.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +@ApiModel(value="com.huaheng.pc.task.taskPreference.domain.TaskPreference") +@Data +@TableName(value = "task_preference") +public class TaskPreference implements Serializable { + /** + * ID + */ + @TableId(value = "id", type = IdType.AUTO) + @ApiModelProperty(value="ID") + private Integer id; + + /** + * 首选项 + */ + @TableField(value = "name") + @ApiModelProperty(value="首选项") + private String name; + + /** + * 仓库编码 + */ + @TableField(value = "warehouseCode") + @ApiModelProperty(value="仓库编码") + private String warehouseCode; + + /** + * 内部任务类型 + */ + @TableField(value = "internalTaskType") + @ApiModelProperty(value="内部任务类型") + private String internalTaskType; + + /** + * 任务类型 + */ + @TableField(value = "taskType") + @ApiModelProperty(value="任务类型") + private String taskType; + + /** + * 区域 + */ + @TableField(value = "zoneCode") + @ApiModelProperty(value="区域") + private String zoneCode; + + /** + * 任务开始方式 + */ + @TableField(value = "taskInitMethod") + @ApiModelProperty(value="任务开始方式") + private String taskInitMethod; + + /** + * 任务方向方式 + */ + @TableField(value = "taskDirectedMethod") + @ApiModelProperty(value="任务方向方式") + private String taskDirectedMethod; + + /** + * 拣货顺序? + */ + @TableField(value = "fromAssignMethod") + @ApiModelProperty(value="拣货顺序?") + private String fromAssignMethod; + + /** + * 上架顺序? + */ + @TableField(value = "toAssignMethod") + @ApiModelProperty(value="上架顺序?") + private String toAssignMethod; + + /** + * PICK方式 + */ + @TableField(value = "pickMethod") + @ApiModelProperty(value="PICK方式") + private String pickMethod; + + /** + * 启动RF操作成功消息 + */ + @TableField(value = "rfSuccessEnabled") + @ApiModelProperty(value="启动RF操作成功消息") + private Integer rfSuccessEnabled; + + /** + * 消息字段 + */ + @TableField(value = "rfSuccessField") + @ApiModelProperty(value="消息字段") + private String rfSuccessField; + + /** + * 消息格式 + */ + @TableField(value = "rfSuccessMessage") + @ApiModelProperty(value="消息格式") + private String rfSuccessMessage; + + /** + * 默认LPN作为出库箱号 + */ + @TableField(value = "DEFAULTLpAsShipCont") + @ApiModelProperty(value="默认LPN作为出库箱号") + private Integer DEFAULTLpAsShipCont; + + /** + * 多人拣选方式 + */ + @TableField(value = "multiPickMethod") + @ApiModelProperty(value="多人拣选方式") + private Integer multiPickMethod; + + /** + * 允许部分拣选 + */ + @TableField(value = "allowPartial") + @ApiModelProperty(value="允许部分拣选") + private String allowPartial; + + /** + * 接力货位 + */ + @TableField(value = "pickDropLoc") + @ApiModelProperty(value="接力货位") + private String pickDropLoc; + + /** + * 显示物料信息 + */ + @TableField(value = "displayItemInfo") + @ApiModelProperty(value="显示物料信息") + private String displayItemInfo; + + /** + * 创建时间 + */ + @TableField(value = "created") + @ApiModelProperty(value="创建时间") + private Date created; + + /** + * 创建用户 + */ + @TableField(value = "createdBy") + @ApiModelProperty(value="创建用户") + private String createdBy; + + /** + * 创建时间 + */ + @TableField(value = "lastUpdated") + @ApiModelProperty(value="创建时间") + private Date lastUpdated; + + /** + * 更新用户 + */ + @TableField(value = "lastUpdatedBy") + @ApiModelProperty(value="更新用户") + private String lastUpdatedBy; + + /** + * 数据版本 + */ + @TableField(value = "version") + @ApiModelProperty(value="数据版本") + private Integer version; + + /** + * 自定义字段1 + */ + @TableField(value = "userDef1") + @ApiModelProperty(value="自定义字段1") + private String userDef1; + + /** + * 自定义字段2 + */ + @TableField(value = "userDef2") + @ApiModelProperty(value="自定义字段2") + private String userDef2; + + /** + * 自定义字段3 + */ + @TableField(value = "userDef3") + @ApiModelProperty(value="自定义字段3") + private String userDef3; + + /** + * 自定义字段4 + */ + @TableField(value = "userDef4") + @ApiModelProperty(value="自定义字段4") + private String userDef4; + + /** + * 自定义字段5 + */ + @TableField(value = "userDef5") + @ApiModelProperty(value="自定义字段5") + private String userDef5; + + /** + * 自定义字段6 + */ + @TableField(value = "userDef6") + @ApiModelProperty(value="自定义字段6") + private String userDef6; + + /** + * 自定义字段7 + */ + @TableField(value = "userDef7") + @ApiModelProperty(value="自定义字段7") + private String userDef7; + + /** + * 自定义字段8 + */ + @TableField(value = "userDef8") + @ApiModelProperty(value="自定义字段8") + private String userDef8; + + /** + * 处理标记 + */ + @TableField(value = "processStamp") + @ApiModelProperty(value="处理标记") + private String processStamp; + + /** + * RF显示待处理任务 + */ + @TableField(value = "showOpenTask") + @ApiModelProperty(value="RF显示待处理任务") + private Integer showOpenTask; + + private static final long serialVersionUID = 1L; + + public static final String COL_ID = "id"; + + public static final String COL_NAME = "name"; + + public static final String COL_WAREHOUSECODE = "warehouseCode"; + + public static final String COL_INTERNALTASKTYPE = "internalTaskType"; + + public static final String COL_TASKTYPE = "taskType"; + + public static final String COL_ZONECODE = "zoneCode"; + + public static final String COL_TASKINITMETHOD = "taskInitMethod"; + + public static final String COL_TASKDIRECTEDMETHOD = "taskDirectedMethod"; + + public static final String COL_FROMASSIGNMETHOD = "fromAssignMethod"; + + public static final String COL_TOASSIGNMETHOD = "toAssignMethod"; + + public static final String COL_PICKMETHOD = "pickMethod"; + + public static final String COL_RFSUCCESSENABLED = "rfSuccessEnabled"; + + public static final String COL_RFSUCCESSFIELD = "rfSuccessField"; + + public static final String COL_RFSUCCESSMESSAGE = "rfSuccessMessage"; + + public static final String COL_DEFAULTLPASSHIPCONT = "DEFAULTLpAsShipCont"; + + public static final String COL_MULTIPICKMETHOD = "multiPickMethod"; + + public static final String COL_ALLOWPARTIAL = "allowPartial"; + + public static final String COL_PICKDROPLOC = "pickDropLoc"; + + public static final String COL_DISPLAYITEMINFO = "displayItemInfo"; + + public static final String COL_CREATED = "created"; + + public static final String COL_CREATEDBY = "createdBy"; + + public static final String COL_LASTUPDATED = "lastUpdated"; + + public static final String COL_LASTUPDATEDBY = "lastUpdatedBy"; + + public static final String COL_VERSION = "version"; + + public static final String COL_USERDEF1 = "userDef1"; + + public static final String COL_USERDEF2 = "userDef2"; + + public static final String COL_USERDEF3 = "userDef3"; + + public static final String COL_USERDEF4 = "userDef4"; + + public static final String COL_USERDEF5 = "userDef5"; + + public static final String COL_USERDEF6 = "userDef6"; + + public static final String COL_USERDEF7 = "userDef7"; + + public static final String COL_USERDEF8 = "userDef8"; + + public static final String COL_PROCESSSTAMP = "processStamp"; + + public static final String COL_SHOWOPENTASK = "showOpenTask"; +} \ No newline at end of file diff --git a/src/main/java/com/huaheng/pc/task/taskPreference/mapper/TaskPreferenceMapper.java b/src/main/java/com/huaheng/pc/task/taskPreference/mapper/TaskPreferenceMapper.java new file mode 100644 index 0000000..3c9d352 --- /dev/null +++ b/src/main/java/com/huaheng/pc/task/taskPreference/mapper/TaskPreferenceMapper.java @@ -0,0 +1,7 @@ +package com.huaheng.pc.task.taskPreference.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.huaheng.pc.task.taskPreference.domain.TaskPreference; + +public interface TaskPreferenceMapper extends BaseMapper<TaskPreference> { +} \ No newline at end of file diff --git a/src/main/java/com/huaheng/pc/task/taskPreference/service/TaskPreferenceService.java b/src/main/java/com/huaheng/pc/task/taskPreference/service/TaskPreferenceService.java new file mode 100644 index 0000000..c175e60 --- /dev/null +++ b/src/main/java/com/huaheng/pc/task/taskPreference/service/TaskPreferenceService.java @@ -0,0 +1,8 @@ +package com.huaheng.pc.task.taskPreference.service; + +import com.huaheng.pc.task.taskPreference.domain.TaskPreference; +import com.baomidou.mybatisplus.extension.service.IService; +public interface TaskPreferenceService extends IService<TaskPreference>{ + + +} diff --git a/src/main/java/com/huaheng/pc/task/taskPreference/service/TaskPreferenceServiceImpl.java b/src/main/java/com/huaheng/pc/task/taskPreference/service/TaskPreferenceServiceImpl.java new file mode 100644 index 0000000..8592201 --- /dev/null +++ b/src/main/java/com/huaheng/pc/task/taskPreference/service/TaskPreferenceServiceImpl.java @@ -0,0 +1,13 @@ +package com.huaheng.pc.task.taskPreference.service; + +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import java.util.List; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.huaheng.pc.task.taskPreference.mapper.TaskPreferenceMapper; +import com.huaheng.pc.task.taskPreference.domain.TaskPreference; +import com.huaheng.pc.task.taskPreference.service.TaskPreferenceService; +@Service +public class TaskPreferenceServiceImpl extends ServiceImpl<TaskPreferenceMapper, TaskPreference> implements TaskPreferenceService{ + +} diff --git a/src/main/resources/mybatis/config/ContainerCapacityMapper.xml b/src/main/resources/mybatis/config/ContainerCapacityMapper.xml new file mode 100644 index 0000000..7f7e8ea --- /dev/null +++ b/src/main/resources/mybatis/config/ContainerCapacityMapper.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> +<mapper namespace="com.huaheng.pc.config.containerCapacity.mapper.ContainerCapacityMapper"> + <resultMap id="BaseResultMap" type="com.huaheng.pc.config.containerCapacity.domain.ContainerCapacity"> + <!--@mbg.generated--> + <id column="id" jdbcType="INTEGER" property="id" /> + <result column="containerType" jdbcType="VARCHAR" property="containerType" /> + <result column="warehouseCode" jdbcType="VARCHAR" property="warehouseCode" /> + <result column="companyCode" jdbcType="VARCHAR" property="companyCode" /> + <result column="materialCode" jdbcType="VARCHAR" property="materialCode" /> + <result column="materialName" jdbcType="VARCHAR" property="materialName" /> + <result column="materialSpec" jdbcType="VARCHAR" property="materialSpec" /> + <result column="materialUnit" jdbcType="VARCHAR" property="materialUnit" /> + <result column="qty" jdbcType="DECIMAL" property="qty" /> + <result column="enable" jdbcType="INTEGER" property="enable" /> + <result column="created" jdbcType="TIMESTAMP" property="created" /> + <result column="createdBy" jdbcType="VARCHAR" property="createdBy" /> + <result column="lastUpdated" jdbcType="TIMESTAMP" property="lastUpdated" /> + <result column="lastUpdatedBy" jdbcType="VARCHAR" property="lastUpdatedBy" /> + <result column="version" jdbcType="INTEGER" property="version" /> + <result column="userDef1" jdbcType="VARCHAR" property="userDef1" /> + <result column="userDef2" jdbcType="VARCHAR" property="userDef2" /> + <result column="userDef3" jdbcType="VARCHAR" property="userDef3" /> + <result column="userDef4" jdbcType="VARCHAR" property="userDef4" /> + <result column="userDef5" jdbcType="VARCHAR" property="userDef5" /> + <result column="userDef6" jdbcType="VARCHAR" property="userDef6" /> + <result column="userDef7" jdbcType="VARCHAR" property="userDef7" /> + <result column="userDef8" jdbcType="VARCHAR" property="userDef8" /> + <result column="processStamp" jdbcType="VARCHAR" property="processStamp" /> + </resultMap> + <sql id="Base_Column_List"> + <!--@mbg.generated--> + id, containerType, warehouseCode, companyCode, materialCode, materialName, materialSpec, + materialUnit, qty, `enable`, created, createdBy, lastUpdated, lastUpdatedBy, version, + userDef1, userDef2, userDef3, userDef4, userDef5, userDef6, userDef7, userDef8, processStamp + </sql> +</mapper> \ No newline at end of file diff --git a/src/main/resources/mybatis/general/WarehouseMapper.xml b/src/main/resources/mybatis/general/WarehouseMapper.xml index 1c94a4c..89db683 100644 --- a/src/main/resources/mybatis/general/WarehouseMapper.xml +++ b/src/main/resources/mybatis/general/WarehouseMapper.xml @@ -34,6 +34,26 @@ <result column="userDef8" jdbcType="VARCHAR" property="userDef8" /> <result column="deleted" jdbcType="BIT" property="deleted" /> </resultMap> + <select id="wareHouseAll" resultType="com.huaheng.pc.system.user.domain.SysUserWarehouse"> + select * from warehouse + </select> + + <select id="selectWarehouseByUserId" + resultType="com.huaheng.pc.general.warehouse.domain.Warehouse"> + SELECT r.`name`, r.code + FROM sys_user u + LEFT JOIN sys_user_warehouse ur ON u.id = ur.userId + LEFT JOIN warehouse r ON ur.warehouseCode = r.code + WHERE ur.userId =#{userId} + </select> + + <select id="selectWarehouseAll" + resultType="com.huaheng.pc.general.warehouse.domain.Warehouse"> + select * from warehouse + </select> + + + <sql id="Base_Column_List"> <!--@mbg.generated--> code, address1, address2, city, `state`, district, country, postalCode, attentionTo, diff --git a/src/main/resources/mybatis/shipment/ShipmentHeaderMapper.xml b/src/main/resources/mybatis/shipment/ShipmentHeaderMapper.xml index f370f6b..1e8433c 100644 --- a/src/main/resources/mybatis/shipment/ShipmentHeaderMapper.xml +++ b/src/main/resources/mybatis/shipment/ShipmentHeaderMapper.xml @@ -1,12 +1,11 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> -<mapper namespace="com.huaheng.pc.general.customer.mapper.ShipmentHeaderMapper"> +<mapper namespace="com.huaheng.pc.shipment.shipmentHeader.mapper.ShipmentHeaderMapper"> <resultMap id="BaseResultMap" type="com.huaheng.pc.shipment.shipmentHeader.domain.ShipmentHeader"> <!--@mbg.generated--> <id column="id" jdbcType="INTEGER" property="id" /> <result column="warehouseCode" jdbcType="VARCHAR" property="warehouseCode" /> <result column="companyCode" jdbcType="VARCHAR" property="companyCode" /> - <result column="loadId" jdbcType="INTEGER" property="loadId" /> <result column="code" jdbcType="VARCHAR" property="code" /> <result column="referCode" jdbcType="VARCHAR" property="referCode" /> <result column="referCodeType" jdbcType="VARCHAR" property="referCodeType" /> @@ -20,7 +19,6 @@ <result column="customerName" jdbcType="VARCHAR" property="customerName" /> <result column="priority" jdbcType="INTEGER" property="priority" /> <result column="requestedDeliveryDate" jdbcType="DATE" property="requestedDeliveryDate" /> - <result column="requestedDeliveryType" jdbcType="VARCHAR" property="requestedDeliveryType" /> <result column="scheduledShipDate" jdbcType="DATE" property="scheduledShipDate" /> <result column="actualShipDateTime" jdbcType="TIMESTAMP" property="actualShipDateTime" /> <result column="actualDeliveryDate" jdbcType="DATE" property="actualDeliveryDate" /> @@ -33,9 +31,6 @@ <result column="totalQty" jdbcType="INTEGER" property="totalQty" /> <result column="totalVolume" jdbcType="DECIMAL" property="totalVolume" /> <result column="totalLines" jdbcType="INTEGER" property="totalLines" /> - <result column="totalContainers" jdbcType="INTEGER" property="totalContainers" /> - <result column="totalCases" jdbcType="INTEGER" property="totalCases" /> - <result column="totalValue" jdbcType="DECIMAL" property="totalValue" /> <result column="processType" jdbcType="VARCHAR" property="processType" /> <result column="lastWaveId" jdbcType="INTEGER" property="lastWaveId" /> <result column="signValue" jdbcType="VARCHAR" property="signValue" /> @@ -66,16 +61,19 @@ </resultMap> <sql id="Base_Column_List"> <!--@mbg.generated--> - id, warehouseCode, companyCode, loadId, code, referCode, referCodeType, referId, + id, warehouseCode, companyCode, code, referCode, referCodeType, referId, referPlatform, firstStatus, lastStatus, shipmentType, route, customerCode, customerName, - priority, requestedDeliveryDate, requestedDeliveryType, scheduledShipDate, actualShipDateTime, + priority, requestedDeliveryDate, scheduledShipDate, actualShipDateTime, actualDeliveryDate, deliveryNote, rejectionNote, waveId, shipDock, allocateComplete, - totalWeight, totalQty, totalVolume, totalLines, totalContainers, totalCases, totalValue, + totalWeight, totalQty, totalVolume, totalLines, processType, lastWaveId, signValue, carrierCode, carrierService, shipmentNote, carrierServer, carrierServerName, plateNumber, carModel, driverName, driverTel, created, createdBy, lastUpdated, lastUpdatedBy, version, userDef1, userDef2, userDef3, userDef4, userDef5, userDef6, userDef7, userDef8, processStamp, deleted </sql> + <select id="createCode" resultType="java.lang.String"> + SELECT code FROM shipment_header WHERE shipmentType = #{shipmentType,jdbcType=VARCHAR} ORDER BY id DESC LIMIT 1 + </select> </mapper> \ No newline at end of file diff --git a/src/main/resources/mybatis/system/SysUserWarehouseMapper.xml b/src/main/resources/mybatis/system/SysUserWarehouseMapper.xml new file mode 100644 index 0000000..aaa15fa --- /dev/null +++ b/src/main/resources/mybatis/system/SysUserWarehouseMapper.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> +<mapper namespace="com.huaheng.pc.system.user.mapper.SysUserWarehouseMapper"> + <resultMap id="BaseResultMap" type="com.huaheng.pc.system.user.domain.SysUserWarehouse"> + <!--@mbg.generated--> + <id column="id" jdbcType="INTEGER" property="id" /> + <result column="userId" jdbcType="INTEGER" property="userId" /> + <result column="warehouseId" jdbcType="INTEGER" property="warehouseId" /> + <result column="warehouseCode" jdbcType="VARCHAR" property="warehouseCode" /> + </resultMap> + + <sql id="Base_Column_List"> + <!--@mbg.generated--> + id, userId, warehouseId, warehouseCode + </sql> + + <insert id="batchUserWarehouse"> + insert into sys_user_warehouse(userId, warehouseCode) values + <foreach item="item" index="index" collection="userWarehouseList" separator=","> + (#{item.userId},#{item.warehouseCode}) + </foreach> + </insert> + + <delete id="deleteUserWarehouseByUserId" parameterType="Integer"> + delete from sys_user_warehouse where userId=#{userId} + </delete> + + +</mapper> + diff --git a/src/main/resources/mybatis/system/UserMapper.xml b/src/main/resources/mybatis/system/UserMapper.xml index e96a88e..88a4010 100644 --- a/src/main/resources/mybatis/system/UserMapper.xml +++ b/src/main/resources/mybatis/system/UserMapper.xml @@ -191,6 +191,14 @@ INNER JOIN sys_role ON sys_user_role.roleId = sys_role.id AND sys_user_role.userId = sys_user.Id AND sys_role.enable = TRUE INNER JOIN warehouse ON sys_role.warehouseCode = warehouse.code AND warehouse.enable = TRUE </select> + + <select id="getWarehouseByUserName" resultType="java.util.HashMap"> + SELECT r.`name`, r.code + FROM sys_user u + LEFT JOIN sys_user_warehouse ur ON u.id = ur.userId + LEFT JOIN warehouse r ON ur.warehouseCode = r.code + WHERE u.loginName=#{loginName,jdbcType=VARCHAR} + </select> <update id="insertupdateTime" > update sys_user set updateTime = #{date} where loginName = #{cPersonCode} diff --git a/src/main/resources/mybatis/task/TaskDetailMapper.xml b/src/main/resources/mybatis/task/TaskDetailMapper.xml new file mode 100644 index 0000000..79c9499 --- /dev/null +++ b/src/main/resources/mybatis/task/TaskDetailMapper.xml @@ -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="com.huaheng.pc.task.taskDetail.mapper.TaskDetailMapper"> + <resultMap id="BaseResultMap" type="com.huaheng.pc.task.taskDetail.domain.TaskDetail"> + <!--@mbg.generated--> + <id column="id" jdbcType="INTEGER" property="id" /> + <result column="taskId" jdbcType="INTEGER" property="taskId" /> + <result column="taskCode" jdbcType="VARCHAR" property="taskCode" /> + <result column="taskType" jdbcType="VARCHAR" property="taskType" /> + <result column="internalTaskType" jdbcType="VARCHAR" property="internalTaskType" /> + <result column="warehouseCode" jdbcType="VARCHAR" property="warehouseCode" /> + <result column="companyCode" jdbcType="VARCHAR" property="companyCode" /> + <result column="materialCode" jdbcType="VARCHAR" property="materialCode" /> + <result column="materialName" jdbcType="VARCHAR" property="materialName" /> + <result column="materialSpec" jdbcType="VARCHAR" property="materialSpec" /> + <result column="materialUnit" jdbcType="VARCHAR" property="materialUnit" /> + <result column="qty" jdbcType="INTEGER" property="qty" /> + <result column="fromLocation" jdbcType="VARCHAR" property="fromLocation" /> + <result column="toLocation" jdbcType="VARCHAR" property="toLocation" /> + <result column="containerCode" jdbcType="VARCHAR" property="containerCode" /> + <result column="fromZone" jdbcType="VARCHAR" property="fromZone" /> + <result column="toZone" jdbcType="VARCHAR" property="toZone" /> + <result column="attributeId" jdbcType="INTEGER" property="attributeId" /> + <result column="enable" jdbcType="INTEGER" property="enable" /> + <result column="referenceCode" jdbcType="VARCHAR" property="referenceCode" /> + <result column="referenceId" jdbcType="INTEGER" property="referenceId" /> + <result column="referenceLineId" jdbcType="INTEGER" property="referenceLineId" /> + <result column="assignedUser" jdbcType="VARCHAR" property="assignedUser" /> + <result column="attribute1" jdbcType="VARCHAR" property="attribute1" /> + <result column="attribute2" jdbcType="VARCHAR" property="attribute2" /> + <result column="attribute3" jdbcType="VARCHAR" property="attribute3" /> + <result column="attribute4" jdbcType="VARCHAR" property="attribute4" /> + <result column="batch" jdbcType="VARCHAR" property="batch" /> + <result column="lot" jdbcType="VARCHAR" property="lot" /> + <result column="projectNo" jdbcType="VARCHAR" property="projectNo" /> + <result column="qcCheck" jdbcType="VARCHAR" property="qcCheck" /> + <result column="manufactureDate" jdbcType="DATE" property="manufactureDate" /> + <result column="expirationDate" jdbcType="DATE" property="expirationDate" /> + <result column="agingDate" jdbcType="DATE" property="agingDate" /> + <result column="inventorySts" jdbcType="VARCHAR" property="inventorySts" /> + <result column="waveId" jdbcType="INTEGER" property="waveId" /> + <result column="fromInventoryId" jdbcType="INTEGER" property="fromInventoryId" /> + <result column="toInventoryId" jdbcType="INTEGER" property="toInventoryId" /> + <result column="confirmedBy" jdbcType="VARCHAR" property="confirmedBy" /> + <result column="groupNum" jdbcType="INTEGER" property="groupNum" /> + <result column="groupIndex" jdbcType="INTEGER" property="groupIndex" /> + <result column="created" jdbcType="TIMESTAMP" property="created" /> + <result column="createdBy" jdbcType="VARCHAR" property="createdBy" /> + <result column="lastUpdated" jdbcType="TIMESTAMP" property="lastUpdated" /> + <result column="lastUpdatedBy" jdbcType="VARCHAR" property="lastUpdatedBy" /> + <result column="version" jdbcType="INTEGER" property="version" /> + <result column="userDef1" jdbcType="VARCHAR" property="userDef1" /> + <result column="userDef2" jdbcType="VARCHAR" property="userDef2" /> + <result column="userDef3" jdbcType="VARCHAR" property="userDef3" /> + <result column="userDef4" jdbcType="VARCHAR" property="userDef4" /> + <result column="userDef5" jdbcType="VARCHAR" property="userDef5" /> + <result column="userDef6" jdbcType="VARCHAR" property="userDef6" /> + <result column="userDef7" jdbcType="VARCHAR" property="userDef7" /> + <result column="userDef8" jdbcType="VARCHAR" property="userDef8" /> + <result column="processStamp" jdbcType="VARCHAR" property="processStamp" /> + </resultMap> + <sql id="Base_Column_List"> + <!--@mbg.generated--> + id, taskId, taskCode, taskType, internalTaskType, warehouseCode, companyCode, materialCode, + materialName, materialSpec, materialUnit, qty, fromLocation, toLocation, containerCode, + fromZone, toZone, attributeId, `enable`, referenceCode, referenceId, referenceLineId, + assignedUser, attribute1, attribute2, attribute3, attribute4, batch, lot, projectNo, + qcCheck, manufactureDate, expirationDate, agingDate, inventorySts, waveId, fromInventoryId, + toInventoryId, confirmedBy, groupNum, groupIndex, created, createdBy, lastUpdated, + lastUpdatedBy, version, userDef1, userDef2, userDef3, userDef4, userDef5, userDef6, + userDef7, userDef8, processStamp + </sql> +</mapper> \ No newline at end of file diff --git a/src/main/resources/mybatis/task/TaskHeaderMapper.xml b/src/main/resources/mybatis/task/TaskHeaderMapper.xml new file mode 100644 index 0000000..9c9819b --- /dev/null +++ b/src/main/resources/mybatis/task/TaskHeaderMapper.xml @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> +<mapper namespace="com.huaheng.pc.task.taskHeader.mapper.TaskHeaderMapper"> + <resultMap id="BaseResultMap" type="com.huaheng.pc.task.taskHeader.domain.TaskHeader"> + <!--@mbg.generated--> + <id column="id" jdbcType="INTEGER" property="id" /> + <result column="code" jdbcType="VARCHAR" property="code" /> + <result column="warehouseCode" jdbcType="VARCHAR" property="warehouseCode" /> + <result column="companyCode" jdbcType="VARCHAR" property="companyCode" /> + <result column="taskType" jdbcType="VARCHAR" property="taskType" /> + <result column="internalTaskType" jdbcType="VARCHAR" property="internalTaskType" /> + <result column="referenceId" jdbcType="INTEGER" property="referenceId" /> + <result column="referenceCode" jdbcType="VARCHAR" property="referenceCode" /> + <result column="assignedUser" jdbcType="VARCHAR" property="assignedUser" /> + <result column="confirmedBy" jdbcType="VARCHAR" property="confirmedBy" /> + <result column="enable" jdbcType="INTEGER" property="enable" /> + <result column="waveId" jdbcType="INTEGER" property="waveId" /> + <result column="pickingCartCode" jdbcType="VARCHAR" property="pickingCartCode" /> + <result column="pickingCartPos" jdbcType="VARCHAR" property="pickingCartPos" /> + <result column="containerCode" jdbcType="VARCHAR" property="containerCode" /> + <result column="startPickDateTime" jdbcType="TIMESTAMP" property="startPickDateTime" /> + <result column="endPickDateTime" jdbcType="TIMESTAMP" property="endPickDateTime" /> + <result column="rebatchLoc" jdbcType="VARCHAR" property="rebatchLoc" /> + <result column="finishRebatch" jdbcType="INTEGER" property="finishRebatch" /> + <result column="rebatchGroupCode" jdbcType="VARCHAR" property="rebatchGroupCode" /> + <result column="allowRebatch" jdbcType="INTEGER" property="allowRebatch" /> + <result column="taskProcessType" jdbcType="VARCHAR" property="taskProcessType" /> + <result column="rebinBench" jdbcType="VARCHAR" property="rebinBench" /> + <result column="rebined" jdbcType="INTEGER" property="rebined" /> + <result column="startRebinDateTime" jdbcType="TIMESTAMP" property="startRebinDateTime" /> + <result column="endRebinDateTime" jdbcType="TIMESTAMP" property="endRebinDateTime" /> + <result column="rebinedBy" jdbcType="VARCHAR" property="rebinedBy" /> + <result column="exceptionCode" jdbcType="VARCHAR" property="exceptionCode" /> + <result column="exceptionHandledBy" jdbcType="VARCHAR" property="exceptionHandledBy" /> + <result column="created" jdbcType="TIMESTAMP" property="created" /> + <result column="createdBy" jdbcType="VARCHAR" property="createdBy" /> + <result column="lastUpdated" jdbcType="TIMESTAMP" property="lastUpdated" /> + <result column="lastUpdatedBy" jdbcType="VARCHAR" property="lastUpdatedBy" /> + <result column="version" jdbcType="INTEGER" property="version" /> + <result column="userDef1" jdbcType="VARCHAR" property="userDef1" /> + <result column="userDef2" jdbcType="VARCHAR" property="userDef2" /> + <result column="userDef3" jdbcType="VARCHAR" property="userDef3" /> + <result column="userDef4" jdbcType="VARCHAR" property="userDef4" /> + <result column="userDef5" jdbcType="VARCHAR" property="userDef5" /> + <result column="userDef6" jdbcType="VARCHAR" property="userDef6" /> + <result column="userDef7" jdbcType="VARCHAR" property="userDef7" /> + <result column="userDef8" jdbcType="VARCHAR" property="userDef8" /> + <result column="processStamp" jdbcType="VARCHAR" property="processStamp" /> + </resultMap> + <sql id="Base_Column_List"> + <!--@mbg.generated--> + id, code, warehouseCode, companyCode, taskType, internalTaskType, referenceId, referenceCode, + assignedUser, confirmedBy, `enable`, waveId, pickingCartCode, pickingCartPos, containerCode, + startPickDateTime, endPickDateTime, rebatchLoc, finishRebatch, rebatchGroupCode, + allowRebatch, taskProcessType, rebinBench, rebined, startRebinDateTime, endRebinDateTime, + rebinedBy, exceptionCode, exceptionHandledBy, created, createdBy, lastUpdated, lastUpdatedBy, + version, userDef1, userDef2, userDef3, userDef4, userDef5, userDef6, userDef7, userDef8, + processStamp + </sql> +</mapper> \ No newline at end of file diff --git a/src/main/resources/mybatis/task/TaskPreferenceMapper.xml b/src/main/resources/mybatis/task/TaskPreferenceMapper.xml new file mode 100644 index 0000000..d82e291 --- /dev/null +++ b/src/main/resources/mybatis/task/TaskPreferenceMapper.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> +<mapper namespace="com.huaheng.pc.task.taskPreference.mapper.TaskPreferenceMapper"> + <resultMap id="BaseResultMap" type="com.huaheng.pc.task.taskPreference.domain.TaskPreference"> + <!--@mbg.generated--> + <id column="id" jdbcType="INTEGER" property="id" /> + <result column="name" jdbcType="VARCHAR" property="name" /> + <result column="warehouseCode" jdbcType="VARCHAR" property="warehouseCode" /> + <result column="internalTaskType" jdbcType="VARCHAR" property="internalTaskType" /> + <result column="taskType" jdbcType="VARCHAR" property="taskType" /> + <result column="zoneCode" jdbcType="VARCHAR" property="zoneCode" /> + <result column="taskInitMethod" jdbcType="VARCHAR" property="taskInitMethod" /> + <result column="taskDirectedMethod" jdbcType="VARCHAR" property="taskDirectedMethod" /> + <result column="fromAssignMethod" jdbcType="VARCHAR" property="fromAssignMethod" /> + <result column="toAssignMethod" jdbcType="VARCHAR" property="toAssignMethod" /> + <result column="pickMethod" jdbcType="VARCHAR" property="pickMethod" /> + <result column="rfSuccessEnabled" jdbcType="INTEGER" property="rfSuccessEnabled" /> + <result column="rfSuccessField" jdbcType="VARCHAR" property="rfSuccessField" /> + <result column="rfSuccessMessage" jdbcType="VARCHAR" property="rfSuccessMessage" /> + <result column="DEFAULTLpAsShipCont" jdbcType="INTEGER" property="DEFAULTLpAsShipCont" /> + <result column="multiPickMethod" jdbcType="INTEGER" property="multiPickMethod" /> + <result column="allowPartial" jdbcType="VARCHAR" property="allowPartial" /> + <result column="pickDropLoc" jdbcType="VARCHAR" property="pickDropLoc" /> + <result column="displayItemInfo" jdbcType="VARCHAR" property="displayItemInfo" /> + <result column="created" jdbcType="TIMESTAMP" property="created" /> + <result column="createdBy" jdbcType="VARCHAR" property="createdBy" /> + <result column="lastUpdated" jdbcType="TIMESTAMP" property="lastUpdated" /> + <result column="lastUpdatedBy" jdbcType="VARCHAR" property="lastUpdatedBy" /> + <result column="version" jdbcType="INTEGER" property="version" /> + <result column="userDef1" jdbcType="VARCHAR" property="userDef1" /> + <result column="userDef2" jdbcType="VARCHAR" property="userDef2" /> + <result column="userDef3" jdbcType="VARCHAR" property="userDef3" /> + <result column="userDef4" jdbcType="VARCHAR" property="userDef4" /> + <result column="userDef5" jdbcType="VARCHAR" property="userDef5" /> + <result column="userDef6" jdbcType="VARCHAR" property="userDef6" /> + <result column="userDef7" jdbcType="VARCHAR" property="userDef7" /> + <result column="userDef8" jdbcType="VARCHAR" property="userDef8" /> + <result column="processStamp" jdbcType="VARCHAR" property="processStamp" /> + <result column="showOpenTask" jdbcType="INTEGER" property="showOpenTask" /> + </resultMap> + <sql id="Base_Column_List"> + <!--@mbg.generated--> + id, `name`, warehouseCode, internalTaskType, taskType, zoneCode, taskInitMethod, + taskDirectedMethod, fromAssignMethod, toAssignMethod, pickMethod, rfSuccessEnabled, + rfSuccessField, rfSuccessMessage, DEFAULTLpAsShipCont, multiPickMethod, allowPartial, + pickDropLoc, displayItemInfo, created, createdBy, lastUpdated, lastUpdatedBy, version, + userDef1, userDef2, userDef3, userDef4, userDef5, userDef6, userDef7, userDef8, processStamp, + showOpenTask + </sql> +</mapper> \ No newline at end of file diff --git a/src/main/resources/templates/config/containerCapacity/add.html b/src/main/resources/templates/config/containerCapacity/add.html index c4b3f20..2e9d8d8 100644 --- a/src/main/resources/templates/config/containerCapacity/add.html +++ b/src/main/resources/templates/config/containerCapacity/add.html @@ -6,23 +6,13 @@ <div class="wrapper wrapper-content animated fadeInRight ibox-content"> <form class="form-horizontal m" id="form-containerCapacity-add"> <div class="form-group"> - <label class="col-sm-3 control-label">库区编码:</label> + <label class="col-sm-3 control-label">容器类型编码:</label> <div class="col-sm-8"> - <select id="zonecode" name="zonecode" class="form-control" th:with="result=${@zone.getZoneCodeList()}"> - <option th:each="item : ${result}" th:text="${item['code']}" th:value="${item['code']}"></option> - </select> + <input id="containerType" name="containerType" class="form-control" type="text"> </div> </div> <div class="form-group"> - <label class="col-sm-3 control-label">容器类型名称:</label> - <div class="col-sm-8"> - <select id="containercapacity" name="containercapacity" class="form-control" th:with="list=${@containerType.getAllContainerType()}"> - <option th:each="item : ${list}" th:text="${item['name']}" th:value="${item['name']}" th:attr = " containerTypeId = ${item['id']}, containerTypeCode = ${item['code']}"></option> - </select> - </div> - </div> - <div class="form-group"> - <label class="col-sm-3 control-label">物料编码:</label> + <label class="col-sm-3 control-label">商品编码:</label> <div class="col-sm-8"> <input id="materialCode" name="materialCode" class="form-control" type="text"> </div> @@ -34,17 +24,12 @@ <!--</div>--> <!--</div>--> <div class="form-group"> - <label class="col-sm-3 control-label">上限值:</label> - <div class="col-sm-8"> - <input id="uph" name="uph" class="form-control" type="text"> - </div> - </div> - <div class="form-group"> - <label class="col-sm-3 control-label">备注:</label> + <label class="col-sm-3 control-label">存放数量:</label> <div class="col-sm-8"> - <input id="remark" name="remark" class="form-control" type="text"> + <input id="qty" name="qty" class="form-control" type="text"> </div> </div> + <!--<div class="form-group"> --> <!--<label class="col-sm-3 control-label">创建时间:</label>--> <!--<div class="col-sm-8">--> @@ -131,7 +116,7 @@ var prefix = ctx + "config/containerCapacity"; $("#form-containerCapacity-add").validate({ rules:{ - uph:{ + qty:{ required:true, digits:true, number:true, @@ -146,12 +131,9 @@ data : { "enable" : $("input[name='enable']").is(':checked'), "materialCode" :$("input[name='materialCode']").val(), - "uph" :$("input[name='uph']").val(), - "remark" :$("input[name='remark']").val(), - "code" : $("#zonecode option:selected").val(), - "containerTypeName" : $("#containercapacity option:selected").val(), - "containerTypeId" : $("#containercapacity option:selected").attr("containerTypeId"), - "containerTypeCode": $("#containercapacity option:selected").attr("containerTypeCode"), + "qty" :$("input[name='qty']").val(), + "containerType" :$("input[name='containerType']").val(), + }, async : false, error : function(request) { diff --git a/src/main/resources/templates/config/containerCapacity/containerCapacity.html b/src/main/resources/templates/config/containerCapacity/containerCapacity.html index 486349c..9d0b347 100644 --- a/src/main/resources/templates/config/containerCapacity/containerCapacity.html +++ b/src/main/resources/templates/config/containerCapacity/containerCapacity.html @@ -10,13 +10,13 @@ <div class="select-list"> <ul> <li> - 库区编码:<input type="text" name="code"/> + 容器类型编码:<input type="text" name="containerType"/> </li> <li> - 物料编码:<input type="text" name="materialCode"/> + 商品编码:<input type="text" name="materialCode"/> </li> <li> - 物料名称:<input type="text" name="materialName"/> + 商品名称:<input type="text" name="materialName"/> </li> <!--<li>--> <!--角色状态:<select name="enable" th:with="type=${@dict.getType('sys_normal_disable')}">--> @@ -75,32 +75,24 @@ title : '标识' }, { - field : 'code', - title : '编码' - }, - { - field : 'containerTypeName', - title : '容器类型名称' - }, - { - field : 'containerTypeCode', + field : 'containerType', title : '容器类型编码' }, { field : 'materialCode', - title : '物料编码' + title : '商品编码' }, { field : 'materialName', - title : '物料名称' + title : '商品名称' }, { - field : 'uph', - title : '上限值' + field : 'materialSpec', + title : '商品单位' }, { - field : 'remark', - title : '备注' + field : 'qty', + title : '存放数量' }, { field : 'created', diff --git a/src/main/resources/templates/config/containerCapacity/edit.html b/src/main/resources/templates/config/containerCapacity/edit.html index 01e137b..2bb4e63 100644 --- a/src/main/resources/templates/config/containerCapacity/edit.html +++ b/src/main/resources/templates/config/containerCapacity/edit.html @@ -6,22 +6,7 @@ <div class="wrapper wrapper-content animated fadeInRight ibox-content"> <form class="form-horizontal m" id="form-containerCapacity-edit" th:object="${containerCapacity}"> <input id="id" name="id" th:field="*{id}" type="hidden"> - <div class="form-group"> - <label class="col-sm-3 control-label">库区编码:</label> - <div class="col-sm-8"> - <select id="zonecode" name="zonecode" class="form-control" th:with="result=${@zone.getZoneCodeList()}" disabled="disabled"> - <option th:each="item : ${result}" th:field="*{code}" th:text="${item['code']}" th:value="${item['code']}"></option> - </select> - </div> - </div> - <div class="form-group"> - <label class="col-sm-3 control-label">容器类型名称:</label> - <div class="col-sm-8"> - <select id="containercapacity" name="containercapacity" class="form-control" th:with="list=${@containerType.getAllContainerType()}" disabled="disabled"> - <option th:each="item : ${list}" th:field="*{containerTypeName}" th:text="${item['name']}" th:value="${item['name']}" th:attr = " containerTypeId = ${item['id']}, containerTypeCode = ${item['code']}"></option> - </select> - </div> - </div> + <!--<div class="form-group"> --> <!--<label class="col-sm-3 control-label">仓库Id:</label>--> <!--<div class="col-sm-8">--> @@ -35,29 +20,36 @@ <!--</div>--> <!--</div>--> <div class="form-group"> - <label class="col-sm-3 control-label">物料编码:</label> + <label class="col-sm-3 control-label">容器类型编码:</label> + <div class="col-sm-8"> + <input id="containerType" name="containerType" th:field="*{containerType}" class="form-control" type="text" readonly="readonly"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">商品编码:</label> <div class="col-sm-8"> - <input id="materialCode" name="materialCode" th:field="*{materialCode}" class="form-control" type="text" disabled="disabled"> + <input id="materialCode" name="materialCode" th:field="*{materialCode}" class="form-control" type="text" readonly="readonly"> </div> </div> <div class="form-group"> - <label class="col-sm-3 control-label">物料名称:</label> + <label class="col-sm-3 control-label">商品名称:</label> <div class="col-sm-8"> - <input id="materialName" name="materialName" th:field="*{materialName}" class="form-control" type="text" disabled="disabled"> + <input id="materialName" name="materialName" th:field="*{materialName}" class="form-control" type="text" readonly="readonly"> </div> </div> <div class="form-group"> - <label class="col-sm-3 control-label">上限值:</label> + <label class="col-sm-3 control-label">商品规格:</label> <div class="col-sm-8"> - <input id="uph" name="uph" th:field="*{uph}" class="form-control" type="text"> + <input id="materialSpec" name="materialSpec" th:field="*{materialSpec}" class="form-control" type="text" readonly="readonly"> </div> </div> <div class="form-group"> - <label class="col-sm-3 control-label">备注:</label> + <label class="col-sm-3 control-label">存放数量:</label> <div class="col-sm-8"> - <input id="remark" name="remark" th:field="*{remark}" class="form-control" type="text"> + <input id="qty" name="qty" th:field="*{qty}" class="form-control" type="text"> </div> </div> + <!--<div class="form-group"> --> <!--<label class="col-sm-3 control-label">创建时间:</label>--> <!--<div class="col-sm-8">--> @@ -175,13 +167,11 @@ "id": $("input[name='id']").val(), "enable" : $("input[name='enable']").is(':checked'), "code" : $("#zonecode option:selected").val(), - "containerTypeName" : $("#containercapacity option:selected").val(), - "containerTypeId" : $("#containercapacity option:selected").attr("containerTypeId"), - "containerTypeCode": $("#containercapacity option:selected").attr("containerTypeCode"), "materialName" :$("input[name='materialName']").val(), "materialCode" :$("input[name='materialCode']").val(), - "uph" :$("input[name='uph']").val(), - "remark" :$("input[name='remark']").val(), + "qty" :$("input[name='qty']").val(), + "containerType" :$("input[name='containerType']").val(), + }, async : false, error : function(request) { diff --git a/src/main/resources/templates/config/containerType/add.html b/src/main/resources/templates/config/containerType/add.html index 3fce751..ce81e17 100644 --- a/src/main/resources/templates/config/containerType/add.html +++ b/src/main/resources/templates/config/containerType/add.html @@ -17,6 +17,12 @@ <input id="name" name="name" class="form-control" type="text"> </div> </div> + <div class="form-group"> + <label class="col-sm-3 control-label">序号:</label> + <div class="col-sm-8"> + <input id="sequence" name="sequence" class="form-control" type="text"> + </div> + </div> <!--<div class="form-group"> --> <!--<label class="col-sm-3 control-label">仓库Id:</label>--> <!--<div class="col-sm-8">--> @@ -30,12 +36,6 @@ <!--</div>--> <!--</div>--> <div class="form-group"> - <label class="col-sm-3 control-label">前缀:</label> - <div class="col-sm-8"> - <input id="prefix" name="prefix" class="form-control" type="text"> - </div> - </div> - <div class="form-group"> <label class="col-sm-3 control-label">空箱重量kg:</label> <div class="col-sm-8"> <input id="emptyWeight" name="emptyWeight" class="form-control" type="text"> @@ -71,6 +71,12 @@ <input id="fillPercent" name="fillPercent" class="form-control" type="text"> </div> </div> + <div class="form-group"> + <label class="col-sm-3 control-label">状态:</label> + <div class="col-sm-8"> + <input id="status" name="status" class="form-control" type="text"> + </div> + </div> <!--<div class="form-group"> --> <!--<label class="col-sm-3 control-label">作为默认货箱:</label>--> <!--<div class="col-sm-8">--> @@ -81,7 +87,7 @@ <label class="col-sm-3 control-label">是否默认容器:</label> <div class="col-sm-8"> <div class="onoffswitch"> - <input type="checkbox" th:checked="false" class="onoffswitch-checkbox" id="useAsDefault" name="useAsDefault"> + <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="useAsDefault" name="useAsDefault"> <label class="onoffswitch-label" for="useAsDefault"> <span class="onoffswitch-inner"></span> <span class="onoffswitch-switch"></span> @@ -90,36 +96,6 @@ </div> </div> <div class="form-group"> - <label class="col-sm-3 control-label">类型描述:</label> - <div class="col-sm-8"> - <input id="remark" name="remark" class="form-control" type="text"> - </div> - </div> - <!--<div class="form-group"> --> - <!--<label class="col-sm-3 control-label">创建时间:</label>--> - <!--<div class="col-sm-8">--> - <!--<input id="created" name="created" class="form-control" type="text">--> - <!--</div>--> - <!--</div>--> - <!--<div class="form-group"> --> - <!--<label class="col-sm-3 control-label">创建用户:</label>--> - <!--<div class="col-sm-8">--> - <!--<input id="createdBy" name="createdBy" class="form-control" type="text">--> - <!--</div>--> - <!--</div>--> - <!--<div class="form-group"> --> - <!--<label class="col-sm-3 control-label">创建时间:</label>--> - <!--<div class="col-sm-8">--> - <!--<input id="lastUpdated" name="lastUpdated" class="form-control" type="text">--> - <!--</div>--> - <!--</div>--> - <!--<div class="form-group"> --> - <!--<label class="col-sm-3 control-label">更新用户:</label>--> - <!--<div class="col-sm-8">--> - <!--<input id="lastUpdatedBy" name="lastUpdatedBy" class="form-control" type="text">--> - <!--</div>--> - <!--</div>--> - <div class="form-group"> <label class="col-sm-3 control-label">是否有效:</label> <div class="col-sm-8"> <!--<input id="enable" name="enable" class="form-control" type="text">--> @@ -205,14 +181,14 @@ "useAsDefault" : $("input[name='useAsDefault']").is(':checked'), "code" :$("input[name='code']").val(), "name" :$("input[name='name']").val(), - "prefix" :$("input[name='prefix']").val(), + "sequence" :$("input[name='sequence']").val(), "emptyWeight" :$("input[name='emptyWeight']").val(), "length" :$("input[name='length']").val(), "width" :$("input[name='width']").val(), "height" :$("input[name='height']").val(), "maxWeight" :$("input[name='maxWeight']").val(), "fillPercent" :$("input[name='fillPercent']").val(), - "remark" :$("input[name='remark']").val() + "status" :$("input[name='status']").val(), }, async : false, error : function(request) { diff --git a/src/main/resources/templates/config/containerType/containerType.html b/src/main/resources/templates/config/containerType/containerType.html index 5f9e8a2..adc2d2a 100644 --- a/src/main/resources/templates/config/containerType/containerType.html +++ b/src/main/resources/templates/config/containerType/containerType.html @@ -87,6 +87,10 @@ field : 'companyCode', title : '货主编码' }, + { + field : 'sequence', + title : '序号' + }, { field : 'emptyWeight', title : '空箱重量kg' @@ -124,10 +128,6 @@ } }, { - field : 'remark', - title : '类型描述' - }, - { field : 'created', title : '创建时间' }, diff --git a/src/main/resources/templates/config/containerType/edit.html b/src/main/resources/templates/config/containerType/edit.html index 363d3d0..0eb7258 100644 --- a/src/main/resources/templates/config/containerType/edit.html +++ b/src/main/resources/templates/config/containerType/edit.html @@ -30,12 +30,7 @@ <!--<input id="warehouseCode" name="warehouseCode" th:field="*{warehouseCode}" class="form-control" type="text">--> <!--</div>--> <!--</div>--> - <div class="form-group"> - <label class="col-sm-3 control-label">前缀:</label> - <div class="col-sm-8"> - <input id="prefix" name="prefix" th:field="*{prefix}" class="form-control" type="text"> - </div> - </div> + <div class="form-group"> <label class="col-sm-3 control-label">空箱重量kg:</label> <div class="col-sm-8"> @@ -78,24 +73,24 @@ <input id="useAsDefault" name="useAsDefault" th:field="*{ }" class="form-control" type="text"> </div> </div>--> - <div class="form-group"> - <label class="col-sm-3 control-label">是否默认容器:</label> - <div class="col-sm-8"> - <div class="onoffswitch"> - <input type="checkbox" th:checked="${containerType.useAsDefault}" class="onoffswitch-checkbox" id="useAsDefault" name="useAsDefault"> - <label class="onoffswitch-label" for="useAsDefault"> - <span class="onoffswitch-inner"></span> - <span class="onoffswitch-switch"></span> - </label> - </div> - </div> - </div> - <div class="form-group"> - <label class="col-sm-3 control-label">类型描述:</label> - <div class="col-sm-8"> - <input id="remark" name="remark" th:field="*{remark}" class="form-control" type="text"> - </div> - </div> + <!--<div class="form-group">--> + <!--<label class="col-sm-3 control-label">是否默认容器:</label>--> + <!--<div class="col-sm-8">--> + <!--<div class="onoffswitch">--> + <!--<input type="checkbox" th:checked="${containerType.useAsDefault}" class="onoffswitch-checkbox" id="useAsDefault" name="useAsDefault">--> + <!--<label class="onoffswitch-label" for="useAsDefault">--> + <!--<span class="onoffswitch-inner"></span>--> + <!--<span class="onoffswitch-switch"></span>--> + <!--</label>--> + <!--</div>--> + <!--</div>--> + <!--</div>--> + <!--<div class="form-group"> --> + <!--<label class="col-sm-3 control-label">类型描述:</label>--> + <!--<div class="col-sm-8">--> + <!--<input id="remark" name="remark" th:field="*{remark}" class="form-control" type="text">--> + <!--</div>--> + <!--</div>--> <!--<div class="form-group"> --> <!--<label class="col-sm-3 control-label">创建时间:</label>--> <!--<div class="col-sm-8">--> diff --git a/src/main/resources/templates/config/locationType/add.html b/src/main/resources/templates/config/locationType/add.html index 7686be5..6abd859 100644 --- a/src/main/resources/templates/config/locationType/add.html +++ b/src/main/resources/templates/config/locationType/add.html @@ -17,12 +17,6 @@ <input id="name" name="name" class="form-control" type="text"> </div> </div> - <div class="form-group"> - <label class="col-sm-3 control-label">前缀:</label> - <div class="col-sm-8"> - <input id="prefix" name="prefix" class="form-control" type="text"> - </div> - </div> <!--<div class="form-group"> --> <!--<label class="col-sm-3 control-label">仓库Id:</label>--> <!--<div class="col-sm-8">--> @@ -60,9 +54,33 @@ </div> </div> <div class="form-group"> - <label class="col-sm-3 control-label">描述:</label> + <label class="col-sm-3 control-label">最小允许单位:</label> + <div class="col-sm-8"> + <input id="minQtyUm" name="minQtyUm" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">校验位:</label> + <div class="col-sm-8"> + <input id="checkDigit" name="checkDigit" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">最多混放物料数:</label> + <div class="col-sm-8"> + <input id="maxMaterials" name="maxMaterials" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">最大批号数量:</label> <div class="col-sm-8"> - <input id="remark" name="remark" class="form-control" type="text"> + <input id="maxLots" name="maxLots" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">最大允许托盘数:</label> + <div class="col-sm-8"> + <input id="maxContainers" name="maxContainers" class="form-control" type="text"> </div> </div> <!--<div class="form-group"> --> @@ -89,19 +107,19 @@ <!--<input id="lastUpdatedBy" name="lastUpdatedBy" class="form-control" type="text">--> <!--</div>--> <!--</div>--> - <div class="form-group"> - <label class="col-sm-3 control-label">是否有效:</label> - <div class="col-sm-8"> - <!--<input id="enable" name="enable" class="form-control" type="text">--> - <div class="onoffswitch"> - <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="enable" name="enable"> - <label class="onoffswitch-label" for="enable"> - <span class="onoffswitch-inner"></span> - <span class="onoffswitch-switch"></span> - </label> - </div> - </div> - </div> + <!--<div class="form-group"> --> + <!--<label class="col-sm-3 control-label">是否有效:</label>--> + <!--<div class="col-sm-8">--> + <!--<!–<input id="enable" name="enable" class="form-control" type="text">–>--> + <!--<div class="onoffswitch">--> + <!--<input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="enable" name="enable">--> + <!--<label class="onoffswitch-label" for="enable">--> + <!--<span class="onoffswitch-inner"></span>--> + <!--<span class="onoffswitch-switch"></span>--> + <!--</label>--> + <!--</div>--> + <!--</div>--> + <!--</div>--> <!--<div class="form-group"> --> <!--<label class="col-sm-3 control-label">是否删除:</label>--> <!--<div class="col-sm-8">--> diff --git a/src/main/resources/templates/config/locationType/edit.html b/src/main/resources/templates/config/locationType/edit.html index 5f0e93c..5bc3128 100644 --- a/src/main/resources/templates/config/locationType/edit.html +++ b/src/main/resources/templates/config/locationType/edit.html @@ -19,12 +19,6 @@ </div> </div> <div class="form-group"> - <label class="col-sm-3 control-label">前缀:</label> - <div class="col-sm-8"> - <input id="prefix" name="prefix" th:field="*{prefix}" class="form-control" type="text"> - </div> - </div> - <div class="form-group"> <label class="col-sm-3 control-label">长m:</label> <div class="col-sm-8"> <input id="length" name="length" th:field="*{length}" class="form-control" type="text"> @@ -49,9 +43,33 @@ </div> </div> <div class="form-group"> - <label class="col-sm-3 control-label">描述:</label> + <label class="col-sm-3 control-label">最小允许单位:</label> + <div class="col-sm-8"> + <input id="minQtyUm" name="minQtyUm" th:field="*{minQtyUm}" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">校验位:</label> + <div class="col-sm-8"> + <input id="checkDigit" name="checkDigit" th:field="*{checkDigit}" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">最多混放物料数:</label> + <div class="col-sm-8"> + <input id="maxMaterials" name="maxMaterials" th:field="*{maxMaterials}" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">最大批号数量:</label> + <div class="col-sm-8"> + <input id="maxLots" name="maxLots" th:field="*{maxLots}" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">最大允许托盘数:</label> <div class="col-sm-8"> - <input id="remark" name="remark" th:field="*{remark}" class="form-control" type="text"> + <input id="maxContainers" name="maxContainers" th:field="*{maxContainers}" class="form-control" type="text"> </div> </div> <!--<div class="form-group"> --> diff --git a/src/main/resources/templates/config/locationType/locationType.html b/src/main/resources/templates/config/locationType/locationType.html index 35ce1e1..f8fcd17 100644 --- a/src/main/resources/templates/config/locationType/locationType.html +++ b/src/main/resources/templates/config/locationType/locationType.html @@ -71,20 +71,12 @@ title : '库位类型Id' }, { - field : 'prefix', - title : '前缀' + field : 'code', + title : '货位类型' }, { - field : 'name', - title : '库位名称' - }, - { - field : 'code', - title : '编码' - }, - { - field : 'warehouseId', - title : '仓库Id' + field : 'name', + title : '名称' }, { field : 'warehouseCode', @@ -107,9 +99,25 @@ title : '最大重量kg' }, { - field : 'remark', - title : '描述' - }, + field : 'minQtyUm', + title : '最小允许单位' + }, + { + field : 'checkDigit', + title : '校验位' + }, + { + field : 'checkDigit', + title : '校验位' + }, + { + field : 'maxMaterials', + title : '最多混放物料数' + }, + { + field : 'maxContainers', + title : '最大允许托盘数' + }, { field : 'created', title : '创建时间' diff --git a/src/main/resources/templates/config/zoneCapacity/add.html b/src/main/resources/templates/config/zoneCapacity/add.html index 16d736e..0afb24c 100644 --- a/src/main/resources/templates/config/zoneCapacity/add.html +++ b/src/main/resources/templates/config/zoneCapacity/add.html @@ -12,17 +12,11 @@ <input id="materialId" name="materialId" type="hidden"> </div> </div> - <div class="form-group"> - <label class="col-sm-3 control-label">仓库:</label> - <div class="col-sm-8"> - <input id="warehouseCode" name="warehouseCode" class="form-control" type="text"> - </div> - </div> <div class="form-group"> <label class="col-sm-3 control-label">货位过滤条件:</label> <div class="col-sm-8"> - <select id="zoneId" name="zoneId" class="form-control" th:with="zones=${@zone.list()}"> - <option th:each="zone: ${zones}" th:text="${zone['name']}" th:value="${zone['id']}"></option> + <select id="filterCode" name="filterCode" class="form-control" th:with="zones=${@zone.list()}"> + <option th:each="zone: ${zones}" th:text="${zone['name']}" th:value="${zone['code']}"></option> </select> </div> </div> @@ -54,7 +48,7 @@ materialCode:{ required:true, }, - warehouseCode:{ + filterCode:{ required:true, }, materialCode:{ diff --git a/src/main/resources/templates/config/zoneCapacity/edit.html b/src/main/resources/templates/config/zoneCapacity/edit.html index dcfa032..186afc5 100644 --- a/src/main/resources/templates/config/zoneCapacity/edit.html +++ b/src/main/resources/templates/config/zoneCapacity/edit.html @@ -7,98 +7,39 @@ <form class="form-horizontal m" id="form-zoneCapacity-edit" th:object="${zoneCapacity}"> <input id="id" name="id" th:field="*{id}" type="hidden"> <div class="form-group"> - <label class="col-sm-3 control-label">编码:</label> + <label class="col-sm-3 control-label">货位过滤条件:</label> <div class="col-sm-8"> - <input id="code" name="code" th:field="*{code}" class="form-control" type="text"> - </div> - </div> - <div class="form-group"> - <label class="col-sm-3 control-label">名称:</label> - <div class="col-sm-8"> - <input id="name" name="name" th:field="*{name}" class="form-control" type="text"> + <input id="filterCode" name="filterCode" th:field="*{filterCode}" class="form-control" type="text" readonly="readonly"> </div> </div> <div class="form-group"> - <label class="col-sm-3 control-label">物料:</label> + <label class="col-sm-3 control-label">商品编码:</label> <div class="col-sm-8"> - <input id="materialCode" name="materialCode" th:field="*{materialCode}" class="form-control" type="text"> - <input id="materialId" name="materialId" th:field="*{materialId}" type="hidden"> + <input id="materialCode" name="materialCode" th:field="*{materialCode}" class="form-control" type="text" readonly="readonly"> </div> </div> <div class="form-group"> - <label class="col-sm-3 control-label">物料类别:</label> + <label class="col-sm-3 control-label">商品名称:</label> <div class="col-sm-8"> - <select id="materialType" name="materialType" th:field="*{materialType}" th:with="type=${@dict.getType('materialType')}" class="form-control"> - <option th:each="e : ${type}" th:text="${e['dictLabel']}" th:value="${e['dictValue']}"></option> - </select> + <input id="materialName" name="materialName" th:field="*{materialName}" class="form-control" type="text" readonly="readonly"> </div> </div> <div class="form-group"> - <label class="col-sm-3 control-label">仓库区域:</label> + <label class="col-sm-3 control-label">商品规格:</label> <div class="col-sm-8"> - <select id="zoneId" name="zoneId" class="form-control" th:field="*{zoneId}" th:with="zones=${@zone.getZoneCodeList()}"> - <option th:each="zone: ${zones}" th:text="${zone['name']}" th:value="${zone['id']}"></option> - </select> + <input id="materialSpec" name="materialSpec" th:field="*{materialSpec}" class="form-control" type="text" readonly="readonly"> </div> </div> <div class="form-group"> - <label class="col-sm-3 control-label">上限预警值:</label> + <label class="col-sm-3 control-label">最大数量:</label> <div class="col-sm-8"> - <input id="uphAlarm" name="uphAlarm" th:field="*{uphAlarm}" class="form-control" type="text"> + <input id="maxQty" name="maxQty" th:field="*{maxQty}" class="form-control" type="text"> </div> </div> <div class="form-group"> - <label class="col-sm-3 control-label">上限值:</label> - <div class="col-sm-8"> - <input id="uph" name="uph" th:field="*{uph}" class="form-control" type="text"> - </div> - </div> - <div class="form-group"> - <label class="col-sm-3 control-label">下限预警值:</label> - <div class="col-sm-8"> - <input id="lphAlarm" name="lphAlarm" th:field="*{lphAlarm}" class="form-control" type="text"> - </div> - </div> - <div class="form-group"> - <label class="col-sm-3 control-label">下限值:</label> - <div class="col-sm-8"> - <input id="lph" name="lph" th:field="*{lph}" class="form-control" type="text"> - </div> - </div> - <div class="form-group"> - <label class="col-sm-3 control-label">是否有效:</label> - <div class="col-sm-8"> - <div class="onoffswitch"> - <input type="checkbox" th:checked="*{enable}" class="onoffswitch-checkbox" id="enable" name="enable"> - <label class="onoffswitch-label" for="enable"> - <span class="onoffswitch-inner"></span> - <span class="onoffswitch-switch"></span> - </label> - </div> - </div> - </div> - <div class="form-group"> - <label class="col-sm-3 control-label">创建时间:</label> + <label class="col-sm-3 control-label">最小数量:</label> <div class="col-sm-8"> - <input id="created" name="created" th:field="*{created}" class="form-control" type="text" readonly="readonly"> - </div> - </div> - <div class="form-group"> - <label class="col-sm-3 control-label">创建用户:</label> - <div class="col-sm-8"> - <input id="createdBy" name="createdBy" th:field="*{createdBy}" class="form-control" type="text" readonly="readonly"> - </div> - </div> - <div class="form-group"> - <label class="col-sm-3 control-label">创建时间:</label> - <div class="col-sm-8"> - <input id="lastUpdated" name="lastUpdated" th:field="*{lastUpdated}" class="form-control" type="text" readonly="readonly"> - </div> - </div> - <div class="form-group"> - <label class="col-sm-3 control-label">更新用户:</label> - <div class="col-sm-8"> - <input id="lastUpdatedBy" name="lastUpdatedBy" th:field="*{lastUpdatedBy}" class="form-control" type="text" readonly="readonly"> + <input id="minQty" name="minQty" th:field="*{minQty}" class="form-control" type="text"> </div> </div> <div class="form-group"> @@ -114,30 +55,23 @@ var prefix = ctx + "config/zoneCapacity" $("#form-zoneCapacity-edit").validate({ rules:{ - code:{ - required:true, - }, - name:{ + filterCode:{ required:true, }, materialCode:{ required:true, }, - uphAlarm:{ + materialName:{ required:true, - range:[0, 100] }, - uph:{ + materialSpec:{ required:true, - range:[0, 100] }, - lphAlarm:{ + maxQty:{ required:true, - range:[0, 100] }, - lph:{ + minQty:{ required:true, - range:[0, 100] }, }, submitHandler: function(form) { diff --git a/src/main/resources/templates/general/bomDetail/add.html b/src/main/resources/templates/general/bomDetail/add.html new file mode 100644 index 0000000..f588507 --- /dev/null +++ b/src/main/resources/templates/general/bomDetail/add.html @@ -0,0 +1,68 @@ +<!DOCTYPE HTML> +<html lang="zh" xmlns:th="http://www.thymeleaf.org"> +<meta charset="utf-8"> +<head th:include="include :: header"></head> +<body class="white-bg"> +<div class="wrapper wrapper-content animated fadeInRight ibox-content"> + <form class="form-horizontal m" id="form-bomDetail-add"> + <div class="form-group"> + <label class="col-sm-3 control-label"> 物料编码:</label> + <div class="col-sm-8"> + <input id="materialCode" name="materialCode" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">数量:</label> + <div class="col-sm-8"> + <input id="qty" name="qty" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">组套层次:</label> + <div class="col-sm-8"> + <input id="buildLevel" name="buildLevel" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">序号:</label> + <div class="col-sm-8"> + <input id="buildSequence" name="buildSequence" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">分配规则:</label> + <div class="col-sm-8"> + <input id="allocationRule" name="allocationRule" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">从货位:</label> + <div class="col-sm-8"> + <input id="fromLocation" name="fromLocation" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <div class="form-control-static col-sm-offset-9"> + <button type="submit" class="btn btn-primary">提交</button> + <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button> + </div> + </div> + </form> +</div> +<div th:include="include::footer"></div> +<script type="text/javascript"> + var prefix = ctx + "general/bomDetail"; + $("#form-bomDetail-add").validate({ + rules:{ + materialCode:{ + required:true + }, + }, + submitHandler: function(form) { + var tableValue = $("#form-bomDetail-add").serialize(); + $.operate.save(prefix + "/add", tableValue); + } + }); +</script> +</body> +</html> diff --git a/src/main/resources/templates/general/bomDetail/bomDetail.html b/src/main/resources/templates/general/bomDetail/bomDetail.html new file mode 100644 index 0000000..e7de231 --- /dev/null +++ b/src/main/resources/templates/general/bomDetail/bomDetail.html @@ -0,0 +1,139 @@ +<!DOCTYPE HTML> +<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> +<meta charset="utf-8"> +<head th:include="include :: header"></head> +<body> + +<div class="btn-group hidden-xs" id="toolbar" role="group"> + <a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()" shiro:hasPermission="general:bomDetail:add"> + <i class="fa fa-plus"></i> 新增 + </a> + <a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()" shiro:hasPermission="general:bomDetail:remove"> + <i class="fa fa-trash-o"></i> 删除 + </a> +</div> +<div class="col-sm-12"> + <table id="bootstrap-table" data-mobile-responsive="true" class="table table-bordered table-hover"></table> +</div> + + +<div th:include="include :: footer"></div> +<script th:inline="javascript"> + var prefix = ctx + "general/bomDetail"; + var editFlag = [[${@permission.hasPermi('general:bomDetail:edit')}]]; + var removeFlag = [[${@permission.hasPermi('general:bomDetail:remove')}]]; + var datas = [[${@dict.getType('sys_normal_disable')}]]; + $(function() { + var options = { + url: prefix + "/list", + createUrl: prefix + "/add", + updateUrl: prefix + "/edit/{id}", + removeUrl: prefix + "/remove", + modalName: "商品详情", + queryParams:"bomId="+[[${bomHeaderId}]], + search: false, + sortName: "id", + sortOrder: "desc", + columns: [{ + checkbox: true + }, + { + field : 'id', + title : 'id' + }, + { + field : 'warehouseCode', + title : '仓库代码' + }, + { + field : 'companyCode', + title : '货主' + }, + { + field : 'bomId', + title : '物料清单内部号' , + visible:false + }, + { + field : 'materialName', + title : '物料名称' + }, + { + field : 'materialUnit', + title : '物料单位' + }, + { + field : 'buildLevel', + title : '组套层次' + }, + { + field : 'buildSequence', + title : '序号' + }, + { + field : 'qty', + title : '数量' + }, + { + field : 'allocationRule', + title : '分配规则' + }, + { + field : 'fromLocation', + title : '分配规则' + }, + { + field : 'enable', + title : '是否有效', + align: 'center', + formatter: function(value, row, index) { + return $.table.selectDictLabel(datas, value); + } + }, + { + field : 'created', + title : '创建时间' + }, + { + field : 'createdBy', + title : '创建用户' + }, + { + field : 'lastUpdated', + title : '更新时间' + }, + { + field : 'lastUpdatedBy', + title : '更新用户' + }, + { + field : 'userDef1', + title : '自定义字段1' , + visible:false + }, + { + field : 'userDef2', + title : '自定义字段2' , + visible:false + }, + { + field : 'userDef3', + title : '自定义字段3' , + visible:false + }, + { + title: '操作', + align: 'center', + formatter: function(value, row, index) { + var actions = []; + actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); + actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a>'); + return actions.join(''); + } + }] + }; + $.table.init(options); + }); +</script> +</body> +</html> \ No newline at end of file diff --git a/src/main/resources/templates/general/bomDetail/edit.html b/src/main/resources/templates/general/bomDetail/edit.html new file mode 100644 index 0000000..527b312 --- /dev/null +++ b/src/main/resources/templates/general/bomDetail/edit.html @@ -0,0 +1,68 @@ +<!DOCTYPE HTML> +<html lang="zh" xmlns:th="http://www.thymeleaf.org"> +<meta charset="utf-8"> +<head th:include="include :: header"></head> +<body class="white-bg"> +<div class="wrapper wrapper-content animated fadeInRight ibox-content"> + <form class="form-horizontal m" id="form-bomDetail-add" th:object="${bomDetail}"> + <div class="form-group"> + <label class="col-sm-3 control-label"> 物料编码:</label> + <div class="col-sm-8"> + <input id="materialCode" name="materialCode" class="form-control" type="text" th:field="*{materialCode}"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">数量:</label> + <div class="col-sm-8"> + <input id="qty" name="qty" class="form-control" type="text" th:field="*{qty}"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">组套层次:</label> + <div class="col-sm-8"> + <input id="buildLevel" name="buildLevel" class="form-control" type="text" th:field="*{buildLevel}"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">序号:</label> + <div class="col-sm-8"> + <input id="buildSequence" name="buildSequence" class="form-control" type="text" th:field="*{buildSequence}"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">分配规则:</label> + <div class="col-sm-8"> + <input id="allocationRule" name="allocationRule" class="form-control" type="text" th:field="*{allocationRule}"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">从货位:</label> + <div class="col-sm-8"> + <input id="fromLocation" name="fromLocation" class="form-control" type="text" th:field="*{fromLocation}" > + </div> + </div> + <div class="form-group"> + <div class="form-control-static col-sm-offset-9"> + <button type="submit" class="btn btn-primary">提交</button> + <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button> + </div> + </div> + </form> +</div> +<div th:include="include::footer"></div> +<script type="text/javascript"> + var prefix = ctx + "general/bomDetail"; + $("#form-bomDetail-add").validate({ + rules:{ + materialCode:{ + required:true + }, + }, + submitHandler: function(form) { + var tableValue = $("#form-bomDetail-add").serialize(); + $.operate.save(prefix + "/add", tableValue); + } + }); +</script> +</body> +</html> diff --git a/src/main/resources/templates/general/bomHeader/add.html b/src/main/resources/templates/general/bomHeader/add.html new file mode 100644 index 0000000..b9faeae --- /dev/null +++ b/src/main/resources/templates/general/bomHeader/add.html @@ -0,0 +1,107 @@ +<!DOCTYPE HTML> +<html lang="zh" xmlns:th="http://www.thymeleaf.org"> +<meta charset="utf-8"> +<head th:include="include :: header"></head> +<body class="white-bg"> +<div class="wrapper wrapper-content animated fadeInRight ibox-content"> + <form class="form-horizontal m" id="form-bomHeader-add"> + <div class="form-group"> + <label class="col-sm-3 control-label"> 物料编码:</label> + <div class="col-sm-8"> + <input id="materialCode" name="materialCode" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">数量:</label> + <div class="col-sm-8"> + <input id="qty" name="qty" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">修正号码:</label> + <div class="col-sm-8"> + <input id="revisionNum" name="revisionNum" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">加工说明:</label> + <div class="col-sm-8"> + <input id="buildInstructions" name="buildInstructions" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">加工货位:</label> + <div class="col-sm-8"> + <input id="buildLoc" name="buildLoc" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">有效起始日期:</label> + <div class="col-sm-8"> + <input id="validFromDate" name="validFromDate" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">有效结束日期:</label> + <div class="col-sm-8"> + <input id="validEndDate" name="validEndDate" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">优先级:</label> + <div class="col-sm-8"> + <input id="priority" name="priority" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">是否有效:</label> + <div class="col-sm-8"> + <select id="enable" name="enable" class="form-control" > + <option value="0">有效</option> + <option value="1">无效</option> + </select> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">是否虚拟商品:</label> + <div class="col-sm-8"> + <select id="isVirtualBom" name="isVirtualBom" class="form-control"> + <option value="0">不是</option> + <option value="1">是</option> + </select> + </div> + </div> + <div class="form-group"> + <div class="form-control-static col-sm-offset-9"> + <button type="submit" class="btn btn-primary">提交</button> + <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button> + </div> + </div> + </form> +</div> +<div th:include="include::footer"></div> +<script type="text/javascript"> + var prefix = ctx + "general/bomHeader"; + $("#form-bomHeader-add").validate({ + rules:{ + materialCode:{ + required:true + }, + }, + submitHandler: function(form) { + var tableValue = $("#form-bomHeader-add").serialize(); + tableValue = formValueReplace(tableValue, "enable", $("#enable option:selected").val()); + tableValue = formValueReplace(tableValue, "isVirtualBom", $("#isVirtualBom option:selected").val()); + $.operate.save(prefix + "/add", tableValue); + } + }); + $(function () { + layui.use('laydate', function() { + var laydate = layui.laydate; + laydate.render({ elem: '#validFromDate', theme: 'molv', format: 'yyyy-MM-dd' }); + laydate.render({ elem: '#validEndDate', theme: 'molv', format: 'yyyy-MM-dd' }); + }); + }); +</script> +</body> +</html> diff --git a/src/main/resources/templates/general/bomHeader/bomHeader.html b/src/main/resources/templates/general/bomHeader/bomHeader.html new file mode 100644 index 0000000..3ab8fc4 --- /dev/null +++ b/src/main/resources/templates/general/bomHeader/bomHeader.html @@ -0,0 +1,220 @@ +<!DOCTYPE HTML> +<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> +<meta charset="utf-8"> +<head th:include="include :: header"></head> +<body class="gray-bg"> + +<div class="container-div"> + <div class="row"> + <div class="col-sm-12 select-info"> + <ul id="myTab" class="nav nav-tabs"> + <li class="active"><a href="#tabHeader" data-toggle="tab">主表</a></li> + <li><a href="#tabDetail" data-toggle="tab">明细</a></li> + </ul> + <div id="myTabContent" class="tab-content"> + <div class="tab-pane fade in active" id="tabHeader"> + <div class="col-sm-12 select-info"> + <form id="alarmFlow-form"> + <div class="select-list"> + <ul> + <li> + 物料名称:<input type="text" name="materialName"/> + </li> + <li> + 物料编码:<input type="text" name="materialCode"/> + </li> + <li class="time"> + <label>创建时间: </label> + <input type="text" class="time-input" id="startTime" placeholder="开始时间" + name="params[createdBegin]"/> + <span>-</span> + <input type="text" class="time-input" id="endTime" placeholder="结束时间" + name="params[createdEnd]"/> + </li> + <li> + <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i + class="fa fa-search"></i> 搜索</a> + <!--<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="system:role:export"><i class="fa fa-download"></i> 导出</a>--> + </li> + </ul> + </div> + </form> + </div> + + + <div class="btn-group hidden-xs" id="toolbar" role="group"> + <a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()" + shiro:hasPermission="general:bomHeader:add"> + <i class="fa fa-plus"></i> 新增 + </a> + <a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()" + shiro:hasPermission="general:bomHeader:remove"> + <i class="fa fa-trash-o"></i> 删除 + </a> + </div> + + <table id="bootstrap-table" data-mobile-responsive="true" class="table table-bordered table-hover"></table> + </div> + + <div class="tab-pane fade" id="tabDetail"> + <table id="bootstrap-table1" data-mobile-responsive="true" + class="table table-bordered table-hover"></table> + </div> + </div> + </div> + </div> +</div> +<div th:include="include :: footer"></div> +<script th:inline="javascript"> + var prefix = ctx + "general/bomHeader"; + var prefix1 = ctx + "general/bomDetail"; + var editFlag = [[${@permission.hasPermi('general:bomHeader:edit')}]]; + var removeFlag = [[${@permission.hasPermi('general:bomHeader:remove')}]]; + $(function() { + var options = { + url: prefix + "/list", + createUrl: prefix + "/add", + updateUrl: prefix + "/edit/{id}", + removeUrl: prefix + "/remove", + modalName: "商品", + search: false, + sortName: "id", + sortOrder: "desc", + columns: [{ + checkbox: true + }, + { + field : 'id', + title : 'id' + }, + { + field : 'materialCode', + title : '物料编码' + }, + { + field : 'materialName', + title : '物料名称' + }, + { + field : 'warehouseCode', + title : '仓库代码' + }, + { + field : 'companyCode', + title : '货主编码' + }, + { + field : 'materialSpec', + title : '物料规格' + }, + { + field : 'materialUnit', + title : ' 物料单位' + }, + { + field : 'qty', + title : '数量' + }, + { + field : 'revisionNum', + title : '修正号码' + }, + { + field : 'buildInstructions', + title : '加工说明' + }, + { + field : 'buildLoc', + title : '加工货位' + }, + { + field : 'validFromDate', + title : '有效起止日期' + }, + { + field : 'validEndDate', + title : '有效结束日期' + }, + { + field : 'priority', + title : '优先级' + }, + { + field : 'version', + title : '数据版本', + visible : false + }, + { + field : 'isVirtualBom', + title : '是否为虚拟商品', + visible : false + }, + { + field : 'created', + title : '创建时间', + visible : false + }, + { + field : 'createdBy', + title : '创建用户', + visible : false + }, + { + field : 'lastUpdated', + title : '更新时间', + visible : false + }, + { + field : 'lastUpdatedBy', + title : '更新用户', + visible : false + }, + { + field : 'userDef1', + title : '自定义字段1' , + visible:false + }, + { + field : 'userDef2', + title : '自定义字段2' , + visible:false + }, + { + field : 'userDef3', + title : '自定义字段3' , + visible:false + }, + { + title: '操作', + align: 'center', + formatter: function(value, row, index) { + var actions = []; + actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); + actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a>'); + return actions.join(''); + } + }] + }; + $.table.init(options); + }); + + function detail(id, code) { + // console.log(id); + // dictid=id; + var url = prefix1+"/list/" + id; + createtable(url); + } + + function createtable(url) { + $("#tabDetail").children().remove(); + $("#myTab li").removeClass("active"); + var height = $(document).height()-100 + 'px'; + var str = '<iframe class="huaheng_iframe" name="iframe" width="100%" height="' + height + '" src="' + url + '" frameborder="0" data-id="' + url + '" seamless></iframe>'; + $("#tabDetail").append(str); + $(".tab-pane").removeClass("in active"); + $("#myTab li:eq(1)").addClass("active"); + $("#tabDetail").addClass("in active"); + } +</script> +</body> +</html> \ No newline at end of file diff --git a/src/main/resources/templates/general/bomHeader/edit.html b/src/main/resources/templates/general/bomHeader/edit.html new file mode 100644 index 0000000..4769548 --- /dev/null +++ b/src/main/resources/templates/general/bomHeader/edit.html @@ -0,0 +1,126 @@ +<!DOCTYPE HTML> +<html lang="zh" xmlns:th="http://www.thymeleaf.org"> +<meta charset="utf-8"> +<head th:include="include :: header"></head> +<body class="white-bg"> +<div class="wrapper wrapper-content animated fadeInRight ibox-content"> + <form class="form-horizontal m" id="form-bomHeader-edit" th:object="${bomHeader}"> + <div class="form-group"> + <label class="col-sm-3 control-label"> 物料编码:</label> + <div class="col-sm-8"> + <input id="materialCode" name="materialCode" class="form-control" type="text" th:field="*{materialCode}"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">数量:</label> + <div class="col-sm-8"> + <input id="qty" name="qty" class="form-control" type="text" th:field="*{qty}"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">修正号码:</label> + <div class="col-sm-8"> + <input id="revisionNum" name="revisionNum" class="form-control" type="text" th:field="*{revisionNum}"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">加工说明:</label> + <div class="col-sm-8"> + <input id="buildInstructions" name="buildInstructions" class="form-control" type="text" th:field="*{buildInstructions}"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">加工货位:</label> + <div class="col-sm-8"> + <input id="buildLoc" name="buildLoc" class="form-control" type="text" th:field="*{buildLoc}"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">有效起始日期:</label> + <div class="col-sm-8"> + <input id="validFromDate" name="validFromDate" class="time-input" type="text" th:field="*{validFromDate}"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">有效结束日期:</label> + <div class="col-sm-8"> + <input id="validEndDate" name="validEndDate" class="time-input" type="text" th:field="*{validEndDate}"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">优先级:</label> + <div class="col-sm-8"> + <input id="priority" name="priority" class="form-control" type="text" th:field="*{priority}"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">是否有效:</label> + <div class="col-sm-8"> + <select id="enable" name="enable" class="form-control" th:field="*{enable}"> + <option value="0">有效</option> + <option value="1">无效</option> + </select> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">是否虚拟商品:</label> + <div class="col-sm-8"> + <select id="isVirtualBom" name="isVirtualBom" class="form-control" th:field="*{isVirtualBom}" > + <option value="0">不是</option> + <option value="1">是</option> + </select> + </div> + </div> + <!--<div class="form-group"> --> + <!--<label class="col-sm-3 control-label">自定义字段1:</label>--> + <!--<div class="col-sm-8">--> + <!--<input id="userDef1" name="userDef1" class="form-control" type="text">--> + <!--</div>--> + <!--</div>--> + <!--<div class="form-group"> --> + <!--<label class="col-sm-3 control-label">自定义字段2:</label>--> + <!--<div class="col-sm-8">--> + <!--<input id="userDef2" name="userDef2" class="form-control" type="text">--> + <!--</div>--> + <!--</div>--> + <!--<div class="form-group"> --> + <!--<label class="col-sm-3 control-label">自定义字段3:</label>--> + <!--<div class="col-sm-8">--> + <!--<input id="userDef3" name="userDef3" class="form-control" type="text">--> + <!--</div>--> + <!--</div>--> + <div class="form-group"> + <div class="form-control-static col-sm-offset-9"> + <button type="submit" class="btn btn-primary">提交</button> + <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button> + </div> + </div> + </form> +</div> +<div th:include="include::footer"></div> +<script type="text/javascript"> + var prefix = ctx + "general/bomHeader"; + $("#form-bomHeader-add").validate({ + rules:{ + materialCode:{ + required:true + }, + }, + submitHandler: function(form) { + var tableValue = $("#form-bomHeader-add").serialize(); + tableValue = formValueReplace(tableValue, "enable", $("#enable option:selected").val()); + tableValue = formValueReplace(tableValue, "isVirtualBom", $("#isVirtualBom option:selected").val()); + $.operate.save(prefix + "/add", tableValue); + } + }); + + $(function () { + layui.use('laydate', function() { + var laydate = layui.laydate; + laydate.render({ elem: '#validFromDate', theme: 'molv', format: 'yyyy-MM-dd' }); + laydate.render({ elem: '#validEndDate', theme: 'molv', format: 'yyyy-MM-dd' }); + }); + }); +</script> +</body> +</html> diff --git a/src/main/resources/templates/general/company/add.html b/src/main/resources/templates/general/company/add.html index d7a7620..bb1b69e 100644 --- a/src/main/resources/templates/general/company/add.html +++ b/src/main/resources/templates/general/company/add.html @@ -91,6 +91,8 @@ <input id="email" name="email" class="form-control" type="text"> </div> </div> + + <input id="filePath" name="filePath" class="form-control" type="file"> <!--<div class="form-group"> --> <!--<label class="col-sm-3 control-label">自定义字段1:</label>--> <!--<div class="col-sm-8">--> diff --git a/src/main/resources/templates/general/material/add.html b/src/main/resources/templates/general/material/add.html index 9f4528b..27f8fc0 100644 --- a/src/main/resources/templates/general/material/add.html +++ b/src/main/resources/templates/general/material/add.html @@ -6,17 +6,37 @@ <div class="wrapper wrapper-content animated fadeInRight ibox-content"> <form class="form-horizontal m" id="form-material-add"> <div class="form-group"> - <label class="col-sm-3 control-label">存货编码:</label> + <label class="col-sm-3 control-label">编码:</label> <div class="col-sm-8"> <input id="code" name="code" class="form-control" type="text"> </div> </div> <div class="form-group"> + <label class="col-sm-3 control-label">货主编码:</label> + <div class="col-sm-8"> + <select id="companyCode" name="companyCode" class="form-control" th:with="companyList=${@companyService.selectCompanyByCurrentUserId()}"> + <option th:each="company : ${companyList}" th:text="${company['name']}" th:value="${company['code']}"></option> + </select> + </div> + </div> + <div class="form-group"> <label class="col-sm-3 control-label">名称:</label> <div class="col-sm-8"> <input id="name" name="name" class="form-control" type="text"> </div> </div> + <div class="form-group"> + <label class="col-sm-3 control-label">规格:</label> + <div class="col-sm-8"> + <input id="spec" name="spec" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">单位:</label> + <div class="col-sm-8"> + <input id="unit" name="unit" class="form-control" type="text"> + </div> + </div> <div class="form-group"> <label class="col-sm-3 control-label">物料类别:</label> <div class="col-sm-8"> @@ -26,140 +46,101 @@ </div> </div> <div class="form-group"> - <label class="col-sm-3 control-label">库区编码:</label> + <label class="col-sm-3 control-label">ABC分类:</label> <div class="col-sm-8"> - <input id="zoneCode" name="zoneCode" class="form-control" type="text" placeholder="指定该货物只能放在规定库区时填写,否则不填!"/> + <input id="abcClass" name="abcClass" class="form-control" type="text"> </div> </div> <div class="form-group"> - <label class="col-sm-3 control-label">货主:</label> + <label class="col-sm-3 control-label">保质期(天)</label> <div class="col-sm-8"> - <select id="company" name="company" class="form-control" th:with="list=${@company.selectCompanyByCurrentUserId()}"> - <option value ="" code="">全部货主</option> - <option th:each="item : ${list}" th:text="${item['name']}" th:value="${item['id']}" th:attr = " code = ${item['code']}"></option> - </select> + <input id="daysToExpire" name="daysToExpire" class="form-control" type="text"/> </div> </div> <div class="form-group"> - <label class="col-sm-3 control-label">条码:</label> + <label class="col-sm-3 control-label">定位规则:</label> <div class="col-sm-8"> - <input id="barcode" name="barcode" class="form-control" type="text"> + <input id="locatingRule" name="locatingRule" class="form-control" type="text"> </div> </div> - <!--<div class="form-group"> --> - <!--<label class="col-sm-3 control-label">条码2:</label>--> - <!--<div class="col-sm-8">--> - <!--<input id="barcode2" name="barcode2" class="form-control" type="text">--> - <!--</div>--> - <!--</div>--> - <!--<div class="form-group"> --> - <!--<label class="col-sm-3 control-label">条码3:</label>--> - <!--<div class="col-sm-8">--> - <!--<input id="barcode3" name="barcode3" class="form-control" type="text">--> - <!--</div>--> - <!--</div>--> - <!--<div class="form-group"> --> - <!--<label class="col-sm-3 control-label">条码4:</label>--> - <!--<div class="col-sm-8">--> - <!--<input id="barcode4" name="barcode4" class="form-control" type="text">--> - <!--</div>--> - <!--</div>--> - <!--<div class="form-group"> --> - <!--<label class="col-sm-3 control-label">类别A:</label>--> - <!--<div class="col-sm-8">--> - <!--<input id="classA" name="classA" class="form-control" type="text">--> - <!--</div>--> - <!--</div>--> - <!--<div class="form-group"> --> - <!--<label class="col-sm-3 control-label">类别B:</label>--> - <!--<div class="col-sm-8">--> - <!--<input id="classB" name="classB" class="form-control" type="text">--> - <!--</div>--> - <!--</div>--> - <!--<div class="form-group"> --> - <!--<label class="col-sm-3 control-label">类别C:</label>--> - <!--<div class="col-sm-8">--> - <!--<input id="classC" name="classC" class="form-control" type="text">--> - <!--</div>--> - <!--</div>--> <div class="form-group"> - <label class="col-sm-3 control-label">规格:</label> + <label class="col-sm-3 control-label">分配规则:</label> <div class="col-sm-8"> - <input id="specification" name="specification" class="form-control" type="text"> + <input id="allocationRule" name="allocationRule" class="form-control" type="text"> </div> </div> <div class="form-group"> - <label class="col-sm-3 control-label">品牌:</label> + <label class="col-sm-3 control-label">补货规则:</label> <div class="col-sm-8"> - <input id="brand" name="brand" class="form-control" type="text"> + <input id="replenishmentRule" name="replenishmentRule" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">空货位规则:</label> + <div class="col-sm-8"> + <input id="emptyLocRule" name="emptyLocRule" class="form-control" type="text"> </div> </div> - <!--<div class="form-group"> --> - <!--<label class="col-sm-3 control-label">尺码:</label>--> - <!--<div class="col-sm-8">--> - <!--<input id="size" name="size" class="form-control" type="text">--> - <!--</div>--> - <!--</div>--> - <!--<div class="form-group"> --> - <!--<label class="col-sm-3 control-label">颜色:</label>--> - <!--<div class="col-sm-8">--> - <!--<input id="color" name="color" class="form-control" type="text">--> - <!--</div>--> - <!--</div>--> - <!--<div class="form-group"> --> - <!--<label class="col-sm-3 control-label">产地:</label>--> - <!--<div class="col-sm-8">--> - <!--<input id="placeOfOrigin" name="placeOfOrigin" class="form-control" type="text">--> - <!--</div>--> - <!--</div>--> <div class="form-group"> - <label class="col-sm-3 control-label">保质期(天):</label> + <label class="col-sm-3 control-label">入库规则</label> <div class="col-sm-8"> - <input id="daysToExpire" name="daysToExpire" class="form-control" type="text"> + <input id="receivingFlow" name="receivingFlow" class="form-control" type="text"> </div> </div> <div class="form-group"> - <label class="col-sm-3 control-label">临期预警天数:</label> + <label class="col-sm-3 control-label">出库流程:</label> <div class="col-sm-8"> - <input id="expiringDays" name="expiringDays" class="form-control" type="text"> + <input id="shippingFlow" name="shippingFlow" class="form-control" type="text"> </div> </div> <div class="form-group"> - <label class="col-sm-3 control-label">收货预警天数:</label> + <label class="col-sm-3 control-label">属性模板:</label> <div class="col-sm-8"> - <input id="minShelfLifeDays" name="minShelfLifeDays" class="form-control" type="text"> + <input id="attributeTemplateCode" name="attributeTemplateCode" class="form-control" type="text"> </div> </div> <div class="form-group"> - <label class="col-sm-3 control-label">成本:</label> + <label class="col-sm-3 control-label">记录序列号:</label> <div class="col-sm-8"> - <input id="costPrice" name="costPrice" class="form-control" type="text"> + <input id="trackSerialNum" name="trackSerialNum" class="form-control" type="text"> </div> </div> <div class="form-group"> - <label class="col-sm-3 control-label">标价:</label> + <label class="col-sm-3 control-label">自动生成序列号:</label> <div class="col-sm-8"> - <input id="listPrice" name="listPrice" class="form-control" type="text"> + <input id="autoGenSerialNum" name="autoGenSerialNum" class="form-control" type="text"> </div> </div> <div class="form-group"> - <label class="col-sm-3 control-label">净价:</label> + <label class="col-sm-3 control-label">自动生成序列号表达式:</label> <div class="col-sm-8"> - <input id="netPrice" name="netPrice" class="form-control" type="text"> + <input id="autoGenSerialNumFormat" name="autoGenSerialNumFormat" class="form-control" type="text"> </div> </div> - <!--<div class="form-group"> --> - <!--<label class="col-sm-3 control-label">出入库是否按照 生产日期 来匹配:</label>--> - <!--<div class="col-sm-8">--> - <!--<input id="manufactureDate" name="manufactureDate" class="form-control" type="text">--> - <!--</div>--> - <!--</div>--> - <!--<div class="form-group"> --> - <!--<label class="col-sm-3 control-label">出入库是否按照 入库时间 来匹配:</label>--> - <!--<div class="col-sm-8">--> - <!--<input id="receiptDate" name="receiptDate" class="form-control" type="text">--> - <!--</div>--> - <!--</div>--> + <div class="form-group"> + <label class="col-sm-3 control-label">序列号模板:</label> + <div class="col-sm-8"> + <input id="snTemplateCode" name="snTemplateCode" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">临期预警天数:</label> + <div class="col-sm-8"> + <input id="expiringDays" name="expiringDays" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">收货预警天数:</label> + <div class="col-sm-8"> + <input id="minShelfLifeDays" name="minShelfLifeDays" class="form-control" type="text"> + </div> + </div> + <!--<div class="form-group"> + <label class="col-sm-3 control-label">数据版本:</label> + <div class="col-sm-8"> + <input id="version" name="version" class="form-control" type="text"> + </div> + </div>--> <!--<div class="form-group"> --> <!--<label class="col-sm-3 control-label">创建时间:</label>--> <!--<div class="col-sm-8">--> @@ -184,8 +165,9 @@ <!--<input id="lastUpdatedBy" name="lastUpdatedBy" class="form-control" type="text">--> <!--</div>--> <!--</div>--> + <div class="form-group"> - <label class="col-sm-3 control-label">是否有效:</label> + <label class="col-sm-3 control-label">状态:</label> <div class="col-sm-8"> <div class="onoffswitch"> <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="enable" name="enable"> @@ -268,22 +250,15 @@ }, name:{ required:true, - }, - /*zoneCode:{ - required:true, - },*/ - barcode:{ - required:true, - }, + } }, submitHandler: function(form) { // $.operate.save(prefix + "/add", $('#form-material-add').serialize()); // var tableValue = $.common.getTableValue("#form-material-add"); // $.operate.save(prefix + "/add", tableValue); var tableValue = $("#form-material-add").serialize(); + tableValue = formValueReplace(tableValue, "companyCode", $("#companyCode option:selected").val()) tableValue = formValueReplace(tableValue, "enable", $("input[name='enable']").is(':checked')); - tableValue = formValueReplace(tableValue, "companyId", $("#company option:selected").val()); - tableValue = formValueReplace(tableValue, "companyCode", $("#company option:selected").attr("code")); $.operate.save(prefix + "/add", tableValue); } }); diff --git a/src/main/resources/templates/general/material/edit.html b/src/main/resources/templates/general/material/edit.html index 43c8063..e46011b 100644 --- a/src/main/resources/templates/general/material/edit.html +++ b/src/main/resources/templates/general/material/edit.html @@ -3,282 +3,260 @@ <meta charset="utf-8"> <head th:include="include :: header"></head> <body class="white-bg"> - <div class="wrapper wrapper-content animated fadeInRight ibox-content"> - <form class="form-horizontal m" id="form-material-edit" th:object="${material}"> - <input id="id" name="id" th:field="*{id}" type="hidden"> - <div class="form-group"> - <label class="col-sm-3 control-label">存货编码:</label> - <div class="col-sm-8"> - <input id="code" name="code" th:field="*{code}" class="form-control" type="text" readonly="readonly"> - </div> +<div class="wrapper wrapper-content animated fadeInRight ibox-content"> + <form class="form-horizontal m" id="form-material-add" th:object="${material}"> + <div class="form-group"> + <label class="col-sm-3 control-label">编码:</label> + <div class="col-sm-8"> + <input id="code" name="code" class="form-control" type="text" th:field="*{code}"> </div> - <div class="form-group"> - <label class="col-sm-3 control-label">物料类别:</label> - <div class="col-sm-8"> - <select id="type" name="type" class="form-control" th:with="locationType=${@dict.getType('materialType')}"> - <option th:each="item : ${locationType}" th:text="${item['dictLabel']}" th:value="${item['dictValue']}" th:field="*{type}"></option> - </select> - </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">名称:</label> + <div class="col-sm-8"> + <input id="name" name="name" class="form-control" type="text" th:field="*{name}"> </div> - <div class="form-group"> - <label class="col-sm-3 control-label">货主:</label> - <div class="col-sm-8"> - <select id="company" name="company" class="form-control" th:with="list=${@company.selectCompanyByCurrentUserId()}" th:field="*{companyId}" disabled="disabled"> - <option value ="" code="">全部货主</option> - <option th:each="item : ${list}" th:text="${item['name']}" th:value="${item['id']}" th:attr = " code = ${item['code']}"></option> - </select> - </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">规格:</label> + <div class="col-sm-8"> + <input id="spec" name="spec" class="form-control" type="text" th:field="*{spec}"> </div> - <div class="form-group"> - <label class="col-sm-3 control-label">名称:</label> - <div class="col-sm-8"> - <input id="name" name="name" th:field="*{name}" class="form-control" type="text"> - </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">单位:</label> + <div class="col-sm-8"> + <select id="unit" name="unit" class="form-control" th:with="materialType=${@dict.getType('materialType')}"> + <option th:each="item : ${materialType}" th:text="${item['dictLabel']}" th:value="${item['dictValue']}" + th:field="*{unit}" ></option> + </select> </div> - <div class="form-group"> - <label class="col-sm-3 control-label">条码:</label> - <div class="col-sm-8"> - <input id="barcode" name="barcode" th:field="*{barcode}" class="form-control" type="text"> - </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">物料类别:</label> + <div class="col-sm-8"> + <select id="type" name="type" class="form-control" th:with="materialType=${@dict.getType('materialType')}"> + <option th:each="item : ${materialType}" th:text="${item['dictLabel']}" th:value="${item['dictValue']}" + th:field="*{type}"></option> + </select> </div> - <!--<div class="form-group"> --> - <!--<label class="col-sm-3 control-label">条码2:</label>--> - <!--<div class="col-sm-8">--> - <!--<input id="barcode2" name="barcode2" th:field="*{barcode2}" class="form-control" type="text">--> - <!--</div>--> - <!--</div>--> - <!--<div class="form-group"> --> - <!--<label class="col-sm-3 control-label">条码3:</label>--> - <!--<div class="col-sm-8">--> - <!--<input id="barcode3" name="barcode3" th:field="*{barcode3}" class="form-control" type="text">--> - <!--</div>--> - <!--</div>--> - <!--<div class="form-group"> --> - <!--<label class="col-sm-3 control-label">条码4:</label>--> - <!--<div class="col-sm-8">--> - <!--<input id="barcode4" name="barcode4" th:field="*{barcode4}" class="form-control" type="text">--> - <!--</div>--> - <!--</div>--> - <!--<div class="form-group"> --> - <!--<label class="col-sm-3 control-label">类别A:</label>--> - <!--<div class="col-sm-8">--> - <!--<input id="classA" name="classA" th:field="*{classA}" class="form-control" type="text">--> - <!--</div>--> - <!--</div>--> - <!--<div class="form-group"> --> - <!--<label class="col-sm-3 control-label">类别B:</label>--> - <!--<div class="col-sm-8">--> - <!--<input id="classB" name="classB" th:field="*{classB}" class="form-control" type="text">--> - <!--</div>--> - <!--</div>--> - <!--<div class="form-group"> --> - <!--<label class="col-sm-3 control-label">类别C:</label>--> - <!--<div class="col-sm-8">--> - <!--<input id="classC" name="classC" th:field="*{classC}" class="form-control" type="text">--> - <!--</div>--> - <!--</div>--> - <div class="form-group"> - <label class="col-sm-3 control-label">规格:</label> - <div class="col-sm-8"> - <input id="specification" name="specification" th:field="*{specification}" class="form-control" type="text"> - </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">ABC分类:</label> + <div class="col-sdm-8"> + <input id="abcClass" name="abcClass" class="form-control" type="text" th:field="*{abcClass}"/> </div> - <div class="form-group"> - <label class="col-sm-3 control-label">品牌:</label> - <div class="col-sm-8"> - <input id="brand" name="brand" th:field="*{brand}" class="form-control" type="text"> - </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">保质期(天)</label> + <div class="col-sm-8"> + <input id="daysToExpire" name="daysToExpire" class="form-control" type="text" th:field="*{daysToExpire}"/> </div> - <!--<div class="form-group"> --> - <!--<label class="col-sm-3 control-label">尺码:</label>--> - <!--<div class="col-sm-8">--> - <!--<input id="size" name="size" th:field="*{size}" class="form-control" type="text">--> - <!--</div>--> - <!--</div>--> - <!--<div class="form-group"> --> - <!--<label class="col-sm-3 control-label">颜色:</label>--> - <!--<div class="col-sm-8">--> - <!--<input id="color" name="color" th:field="*{color}" class="form-control" type="text">--> - <!--</div>--> - <!--</div>--> - <!--<div class="form-group"> --> - <!--<label class="col-sm-3 control-label">产地:</label>--> - <!--<div class="col-sm-8">--> - <!--<input id="placeOfOrigin" name="placeOfOrigin" th:field="*{placeOfOrigin}" class="form-control" type="text">--> - <!--</div>--> - <!--</div>--> - <div class="form-group"> - <label class="col-sm-3 control-label">保质期(天):</label> - <div class="col-sm-8"> - <input id="daysToExpire" name="daysToExpire" th:field="*{daysToExpire}" class="form-control" type="text"> - </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">定位规则:</label> + <div class="col-sm-8"> + <input id="locatingRule" name="locatingRule" class="form-control" type="text" th:field="*{locatingRule}"> </div> - <div class="form-group"> - <label class="col-sm-3 control-label">临期预警天数:</label> - <div class="col-sm-8"> - <input id="expiringDays" name="expiringDays" th:field="*{expiringDays}" class="form-control" type="text"> - </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">分配规则:</label> + <div class="col-sm-8"> + <input id="allocationRule" name="allocationRule" class="form-control" type="text" th:field="*{allocationRule}"> </div> - <div class="form-group"> - <label class="col-sm-3 control-label">收货预警天数:</label> - <div class="col-sm-8"> - <input id="minShelfLifeDays" name="minShelfLifeDays" th:field="*{minShelfLifeDays}" class="form-control" type="text"> - </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">补货规则:</label> + <div class="col-sm-8"> + <input id="replenishmentRule" name="replenishmentRule" class="form-control" type="text" th:field="*{replenishmentRule}"> </div> - <div class="form-group"> - <label class="col-sm-3 control-label">成本:</label> - <div class="col-sm-8"> - <input id="costPrice" name="costPrice" th:field="*{costPrice}" class="form-control" type="text"> - </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">空货位规则:</label> + <div class="col-sm-8"> + <input id="emptyLocRule" name="emptyLocRule" class="form-control" type="text" th:field="*{emptyLocRule}"> </div> - <div class="form-group"> - <label class="col-sm-3 control-label">标价:</label> - <div class="col-sm-8"> - <input id="listPrice" name="listPrice" th:field="*{listPrice}" class="form-control" type="text"> - </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">入库规则</label> + <div class="col-sm-8"> + <input id="receivingFlow" name="receivingFlow" class="form-control" type="text" th:field="*{receivingFlow}"> </div> - <div class="form-group"> - <label class="col-sm-3 control-label">净价:</label> - <div class="col-sm-8"> - <input id="netPrice" name="netPrice" th:field="*{netPrice}" class="form-control" type="text"> - </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">出库流程:</label> + <div class="col-sm-8"> + <input id="shippingFlow" name="shippingFlow" class="form-control" type="text" th:field="*{shippingFlow}"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">属性模板:</label> + <div class="col-sm-8"> + <input id="attributeTemplateCode" name="attributeTemplateCode" class="form-control" type="text" th:field="*{attributeTemplateCode}"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">记录序列号:</label> + <div class="col-sm-8"> + <input id="trackSerialNum" name="trackSerialNum" class="form-control" type="text" th:field="*{trackSerialNum}"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">自动生成序列号:</label> + <div class="col-sm-8"> + <input id="autoGenSerialNum" name="autoGenSerialNum" class="form-control" type="text" th:field="*{autoGenSerialNum}"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">自动生成序列号表达式:</label> + <div class="col-sm-8"> + <input id="autoGenSerialNumFormat" name="autoGenSerialNumFormat" class="form-control" type="text" th:field="*{autoGenSerialNumFormat}"> </div> - <!--<div class="form-group"> --> - <!--<label class="col-sm-3 control-label">出入库是否按照 生产日期 来匹配:</label>--> - <!--<div class="col-sm-8">--> - <!--<input id="manufactureDate" name="manufactureDate" th:field="*{manufactureDate}" class="form-control" type="text">--> - <!--</div>--> - <!--</div>--> - <!--<div class="form-group"> --> - <!--<label class="col-sm-3 control-label">出入库是否按照 入库时间 来匹配:</label>--> - <!--<div class="col-sm-8">--> - <!--<input id="receiptDate" name="receiptDate" th:field="*{receiptDate}" class="form-control" type="text">--> - <!--</div>--> - <!--</div>--> - <!--<div class="form-group"> --> - <!--<label class="col-sm-3 control-label">创建时间:</label>--> - <!--<div class="col-sm-8">--> - <!--<input id="created" name="created" th:field="*{created}" class="form-control" type="text">--> - <!--</div>--> - <!--</div>--> - <!--<div class="form-group"> --> - <!--<label class="col-sm-3 control-label">创建用户:</label>--> - <!--<div class="col-sm-8">--> - <!--<input id="createdBy" name="createdBy" th:field="*{createdBy}" class="form-control" type="text">--> - <!--</div>--> - <!--</div>--> - <!--<div class="form-group"> --> - <!--<label class="col-sm-3 control-label">最后修改间:</label>--> - <!--<div class="col-sm-8">--> - <!--<input id="lastUpdated" name="lastUpdated" th:field="*{lastUpdated}" class="form-control" type="text">--> - <!--</div>--> - <!--</div>--> - <!--<div class="form-group"> --> - <!--<label class="col-sm-3 control-label">更新用户:</label>--> - <!--<div class="col-sm-8">--> - <!--<input id="lastUpdatedBy" name="lastUpdatedBy" th:field="*{lastUpdatedBy}" class="form-control" type="text">--> - <!--</div>--> - <!--</div>--> - <div class="form-group"> - <label class="col-sm-3 control-label">是否有效:</label> - <div class="col-sm-8"> - <div class="onoffswitch"> - <input type="checkbox" th:checked="${material.enable}" class="onoffswitch-checkbox" id="enable" name="enable"> - <label class="onoffswitch-label" for="enable"> - <span class="onoffswitch-inner"></span> - <span class="onoffswitch-switch"></span> - </label> - </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">序列号模板:</label> + <div class="col-sm-8"> + <input id="snTemplateCode" name="snTemplateCode" class="form-control" type="text" th:field="*{snTemplateCode}"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">临期预警天数:</label> + <div class="col-sm-8"> + <input id="expiringDays" name="expiringDays" class="form-control" type="text" th:field="*{expiringDays}"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">收货预警天数:</label> + <div class="col-sm-8"> + <input id="minShelfLifeDays" name="minShelfLifeDays" class="form-control" type="text" th:field="*{minShelfLifeDays}"> + </div> + </div> + <!--<div class="form-group"> + <label class="col-sm-3 control-label">数据版本:</label> + <div class="col-sm-8"> + <input id="version" name="version" class="form-control" type="text"> + </div> + </div>--> + <!--<div class="form-group"> --> + <!--<label class="col-sm-3 control-label">创建时间:</label>--> + <!--<div class="col-sm-8">--> + <!--<input id="created" name="created" class="form-control" type="text">--> + <!--</div>--> + <!--</div>--> + <!--<div class="form-group"> --> + <!--<label class="col-sm-3 control-label">创建用户:</label>--> + <!--<div class="col-sm-8">--> + <!--<input id="createdBy" name="createdBy" class="form-control" type="text">--> + <!--</div>--> + <!--</div>--> + <!--<div class="form-group"> --> + <!--<label class="col-sm-3 control-label">最后修改间:</label>--> + <!--<div class="col-sm-8">--> + <!--<input id="lastUpdated" name="lastUpdated" class="form-control" type="text">--> + <!--</div>--> + <!--</div>--> + <!--<div class="form-group"> --> + <!--<label class="col-sm-3 control-label">更新用户:</label>--> + <!--<div class="col-sm-8">--> + <!--<input id="lastUpdatedBy" name="lastUpdatedBy" class="form-control" type="text">--> + <!--</div>--> + <!--</div>--> + + <div class="form-group"> + <label class="col-sm-3 control-label">状态:</label> + <div class="col-sm-8"> + <div class="onoffswitch"> + <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="enable" name="enable" th:field="*{enable}"> + <label class="onoffswitch-label" for="enable"> + <span class="onoffswitch-inner"></span> + <span class="onoffswitch-switch"></span> + </label> </div> </div> - <!--<div class="form-group"> --> - <!--<label class="col-sm-3 control-label">是否删除:</label>--> - <!--<div class="col-sm-8">--> - <!--<input id="deleted" name="deleted" th:field="*{deleted}" class="form-control" type="text">--> - <!--</div>--> - <!--</div>--> - <!--<div class="form-group"> --> - <!--<label class="col-sm-3 control-label">自定义字段1:</label>--> - <!--<div class="col-sm-8">--> - <!--<input id="userDef1" name="userDef1" th:field="*{userDef1}" class="form-control" type="text">--> - <!--</div>--> - <!--</div>--> - <!--<div class="form-group"> --> - <!--<label class="col-sm-3 control-label">自定义字段2:</label>--> - <!--<div class="col-sm-8">--> - <!--<input id="userDef2" name="userDef2" th:field="*{userDef2}" class="form-control" type="text">--> - <!--</div>--> - <!--</div>--> - <!--<div class="form-group"> --> - <!--<label class="col-sm-3 control-label">自定义字段3:</label>--> - <!--<div class="col-sm-8">--> - <!--<input id="userDef3" name="userDef3" th:field="*{userDef3}" class="form-control" type="text">--> - <!--</div>--> - <!--</div>--> - <!--<div class="form-group"> --> - <!--<label class="col-sm-3 control-label">自定义字段4:</label>--> - <!--<div class="col-sm-8">--> - <!--<input id="userDef4" name="userDef4" th:field="*{userDef4}" class="form-control" type="text">--> - <!--</div>--> - <!--</div>--> - <!--<div class="form-group"> --> - <!--<label class="col-sm-3 control-label">自定义字段5:</label>--> - <!--<div class="col-sm-8">--> - <!--<input id="userDef5" name="userDef5" th:field="*{userDef5}" class="form-control" type="text">--> - <!--</div>--> - <!--</div>--> - <!--<div class="form-group"> --> - <!--<label class="col-sm-3 control-label">自定义字段6:</label>--> - <!--<div class="col-sm-8">--> - <!--<input id="userDef6" name="userDef6" th:field="*{userDef6}" class="form-control" type="text">--> - <!--</div>--> - <!--</div>--> - <!--<div class="form-group"> --> - <!--<label class="col-sm-3 control-label">自定义字段7:</label>--> - <!--<div class="col-sm-8">--> - <!--<input id="userDef7" name="userDef7" th:field="*{userDef7}" class="form-control" type="text">--> - <!--</div>--> - <!--</div>--> - <!--<div class="form-group"> --> - <!--<label class="col-sm-3 control-label">自定义字段8:</label>--> - <!--<div class="col-sm-8">--> - <!--<input id="userDef8" name="userDef8" th:field="*{userDef8}" class="form-control" type="text">--> - <!--</div>--> - <!--</div>--> - <div class="form-group"> - <div class="form-control-static col-sm-offset-9"> - <button type="submit" class="btn btn-primary">提交</button> - <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button> - </div> - </div> - </form> - </div> - <div th:include="include::footer"></div> - <script type="text/javascript"> - var prefix = ctx + "general/material"; - $("#form-material-edit").validate({ - rules:{ - code:{ - required:true - }, - name:{ - required:true - }, - barcode:{ - required:true - } + </div> + <!--<div class="form-group"> --> + <!--<label class="col-sm-3 control-label">是否删除:</label>--> + <!--<div class="col-sm-8">--> + <!--<input id="deleted" name="deleted" class="form-control" type="text">--> + <!--</div>--> + <!--</div>--> + <!--<div class="form-group"> --> + <!--<label class="col-sm-3 control-label">自定义字段1:</label>--> + <!--<div class="col-sm-8">--> + <!--<input id="userDef1" name="userDef1" class="form-control" type="text">--> + <!--</div>--> + <!--</div>--> + <!--<div class="form-group"> --> + <!--<label class="col-sm-3 control-label">自定义字段2:</label>--> + <!--<div class="col-sm-8">--> + <!--<input id="userDef2" name="userDef2" class="form-control" type="text">--> + <!--</div>--> + <!--</div>--> + <!--<div class="form-group"> --> + <!--<label class="col-sm-3 control-label">自定义字段3:</label>--> + <!--<div class="col-sm-8">--> + <!--<input id="userDef3" name="userDef3" class="form-control" type="text">--> + <!--</div>--> + <!--</div>--> + <!--<div class="form-group"> --> + <!--<label class="col-sm-3 control-label">自定义字段4:</label>--> + <!--<div class="col-sm-8">--> + <!--<input id="userDef4" name="userDef4" class="form-control" type="text">--> + <!--</div>--> + <!--</div>--> + <!--<div class="form-group"> --> + <!--<label class="col-sm-3 control-label">自定义字段5:</label>--> + <!--<div class="col-sm-8">--> + <!--<input id="userDef5" name="userDef5" class="form-control" type="text">--> + <!--</div>--> + <!--</div>--> + <!--<div class="form-group"> --> + <!--<label class="col-sm-3 control-label">自定义字段6:</label>--> + <!--<div class="col-sm-8">--> + <!--<input id="userDef6" name="userDef6" class="form-control" type="text">--> + <!--</div>--> + <!--</div>--> + <!--<div class="form-group"> --> + <!--<label class="col-sm-3 control-label">自定义字段7:</label>--> + <!--<div class="col-sm-8">--> + <!--<input id="userDef7" name="userDef7" class="form-control" type="text">--> + <!--</div>--> + <!--</div>--> + <!--<div class="form-group"> --> + <!--<label class="col-sm-3 control-label">自定义字段8:</label>--> + <!--<div class="col-sm-8">--> + <!--<input id="userDef8" name="userDef8" class="form-control" type="text">--> + <!--</div>--> + <!--</div>--> + <div class="form-group"> + <div class="form-control-static col-sm-offset-9"> + <button type="submit" class="btn btn-primary">提交</button> + <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button> + </div> + </div> + </form> +</div> +<div th:include="include::footer"></div> +<script type="text/javascript"> + var prefix = ctx + "general/material"; + $("#form-material-add").validate({ + rules:{ + code:{ + required:true, }, - submitHandler: function(form) { - // $.operate.save(prefix + "/edit", $('#form-material-edit').serialize()); - // var tableValue = $.common.getTableValue("#form-material-edit"); - // $.operate.save(prefix + "/edit", tableValue); - var tableValue = $("#form-material-edit").serialize(); - tableValue = formValueReplace(tableValue, "enable", $("input[name='enable']").is(':checked')); - tableValue = formValueReplace(tableValue, "companyId", $("#company option:selected").val()); - tableValue = formValueReplace(tableValue, "companyCode", $("#company option:selected").attr("code")); - $.operate.save(prefix + "/edit", tableValue); - } - }); - </script> + name:{ + required:true, + } + }, + submitHandler: function(form) { + // $.operate.save(prefix + "/add", $('#form-material-add').serialize()); + // var tableValue = $.common.getTableValue("#form-material-add"); + // $.operate.save(prefix + "/add", tableValue); + var tableValue = $("#form-material-add").serialize(); + tableValue = formValueReplace(tableValue, "enable", $("input[name='enable']").is(':checked')); + $.operate.save(prefix + "/add", tableValue); + } + }); +</script> </body> </html> diff --git a/src/main/resources/templates/general/material/material.html b/src/main/resources/templates/general/material/material.html index bddea99..9c73976 100644 --- a/src/main/resources/templates/general/material/material.html +++ b/src/main/resources/templates/general/material/material.html @@ -80,23 +80,10 @@ field : 'id', title : 'id' }, - // { - // field : 'warehouseCode', - // title : '仓库编码' - // }, { field : 'code', title : '物料编码' }, - { - field : 'barcode', - title : '条码', - visible:false - }, - { - field : 'userDef1', - title : '存货代码', - }, { field : 'type', title : '物料类别' , @@ -105,10 +92,11 @@ return $.table.selectDictLabel(mType, value); } }, - { - field : 'zoneCode', - title : '库区编码' - }, + { + field : 'abcClass', + title : 'ABC分类' , + align: 'center', + }, { field : 'name', title : '名称' @@ -123,77 +111,87 @@ visible:false }, { - field : 'size', - title : '尺码' , + field : 'daysToExpire', + title : '保质期(天)' , visible:false }, { - field : 'color', - title : '颜色', - visible:false + field : 'locatingRule', + title : '定位规则', }, { - field : 'placeOfOrigin', - title : '产地' , - visible:false + field : 'allocationRule', + title : '分配规则' , }, { - field : 'daysToExpire', - title : '保质期(天)' , - visible:false + field : 'replenishmentRule', + title : '补货规则' , }, { - field : 'expiringDays', - title : '临期预警天数' , - visible:false + field : 'emptyLocRule', + title : '空货位规则' , }, { - field : 'minShelfLifeDays', - title : '收货预警天数' , - visible:false + field : 'receivingFlow', + title : '入库流程' , }, { - field : 'costPrice', - title : '成本', - visible:false + field : 'shippingFlow', + title : '出库流程' , }, { - field : 'listPrice', - title : '标价' , - visible:false + field : 'attributeTemplateCode', + title : '属性模板' , }, { - field : 'netPrice', - title : '净价', - visible:false + field : 'trackSerialNum', + title : '记录序列号' , }, - // { - // field : 'manufactureDate', - // title : '出入库是否按照 生产日期 来匹配' - // }, - // { - // field : 'receiptDate', - // title : '出入库是否按照 入库时间 来匹配' - // }, { - field : 'created', - title : '创建时间' + field : 'autoGenSerialNum', + title : '自动生成序列号' , }, { - field : 'createdBy', - title : '创建用户' + field : 'autoGenSerialNumFormat', + title : '自动生成序列号表达式' , }, { - field : 'lastUpdated', - title : '更新时间' + field : 'snTemplateCode', + title : '序列号模板' , + }, + { + field : 'expiringDays', + title : '临期预警天数' , + visible:false }, { - field : 'lastUpdatedBy', - title : '更新用户' + field : 'minShelfLifeDays', + title : '收货预警天数' , + visible:false }, + // { + // field : "version", + // title: "数据版本" + // }, + // { + // field : 'created', + // title : '创建时间' + // }, + // { + // field : 'createdBy', + // title : '创建用户' + // }, + // { + // field : 'lastUpdated', + // title : '更新时间' + // }, + // { + // field : 'lastUpdatedBy', + // title : '更新用户' + // }, { field : 'enable', - title : '是否有效' , + title : '状态' , align: 'center', formatter: function(value, row, index) { return $.table.selectDictLabel(datas, value); @@ -204,8 +202,8 @@ align: 'center', formatter: function(value, row, index) { var actions = []; - /*actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); - */actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a>'); + actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); + actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a>'); return actions.join(''); } }] diff --git a/src/main/resources/templates/shipment/shipmentHeader/add.html b/src/main/resources/templates/shipment/shipmentHeader/add.html index 3732bd5..97cc0f5 100644 --- a/src/main/resources/templates/shipment/shipmentHeader/add.html +++ b/src/main/resources/templates/shipment/shipmentHeader/add.html @@ -8,7 +8,7 @@ <div class="form-group"> <label class="col-sm-3 control-label">出库单类型:</label> <div class="col-sm-8"> - <select id="type" class="form-control" th:with="shipmentType=${@dict.getType('shipmentType')}"> + <select id="shipmentType" class="form-control" th:with="shipmentType=${@dict.getType('shipmentType')}"> <option th:each="dict : ${shipmentType}" th:text="${dict['dictLabel']}" th:value="${dict['dictValue']}"></option> </select> </div> @@ -16,27 +16,27 @@ <div class="form-group"> <label class="col-sm-3 control-label">货主:</label> <div class="col-sm-8"> - <select id = "company" name="company" class="form-control" th:with="list=${@company.selectCompanyByCurrentUserId()}"> + <select id = "companyCode" name="companyCode" class="form-control" th:with="list=${@companyService.selectCompanyByCurrentUserId()}"> <option th:each="item : ${list}" th:text="${item['name']}" th:value="${item['id']}" th:attr = " code = ${item['code']}"></option> </select> </div> </div> <div class="form-group"> - <label class="col-sm-3 control-label">上游系统单号:</label> + <label class="col-sm-3 control-label">erp订单号:</label> <div class="col-sm-8"> - <input id="sourceCode" name="sourceCode" class="form-control" type="text"> + <input id="referCode" name="referCode" class="form-control" type="text"> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">上游平台:</label> <div class="col-sm-8"> - <input id="sourcePlatform" name="sourcePlatform" class="form-control" type="text"> + <input id="referPlatform" name="referPlatform" class="form-control" type="text"> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">客户编码:</label> <div class="col-sm-8"> - <input id="shipTo" name="shipTo" class="form-control" type="text"> + <input id="customerCode" name="customerCode" class="form-control" type="text"> <!--<select id="shipTo" class="form-control m-b" th:with="shipmentType=${@dict.getType('shipmentType')}">--> <!--<option th:each="dict : ${shipmentType}" th:text="${dict['dictLabel']}" th:value="${dict['dictValue']}"></option>--> <!--</select>--> @@ -49,15 +49,6 @@ </div> </div> <div class="form-group"> - <label class="col-sm-3 control-label">发货站台:</label> - <div class="col-sm-8"> - <!--<input id="station" name="station" class="form-control" type="text">--> - <select id="station" name="station" class="form-control" th:with="station=${@dict.getType('station')}"> - <option th:each="dict : ${station}" th:text="${dict['dictLabel']}" th:value="${dict['dictValue']}"></option> - </select> - </div> - </div> - <div class="form-group"> <label class="col-sm-3 control-label">总数量:</label> <div class="col-sm-8"> <input id="totalQty" name="totalQty" class="form-control" type="text"> @@ -69,30 +60,24 @@ <input id="totalLines" name="totalLines" class="form-control" type="text"> </div> </div> - <div class="form-group"> - <label class="col-sm-3 control-label">备注:</label> - <div class="col-sm-8"> - <input id="remark" name="remark" class="form-control" type="text"> - </div> - </div> - <div class="form-group"> - <label class="col-sm-3 control-label">发货预约时间:</label> - <div class="col-sm-8"> - <input id="appointmentTime" name="appointmentTime" class="form-control" type="text"> - </div> - </div> <div class="form-group"> - <label class="col-sm-3 control-label">是否有效:</label> + <label class="col-sm-3 control-label">要求到货时间:</label> <div class="col-sm-8"> - <div class="onoffswitch"> - <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="enable" name="enable"> - <label class="onoffswitch-label" for="enable"> - <span class="onoffswitch-inner"></span> - <span class="onoffswitch-switch"></span> - </label> - </div> + <input id="requestedDeliveryDate" name="requestedDeliveryDate" class="form-control" type="text"> </div> </div> + <!--<div class="form-group">--> + <!--<label class="col-sm-3 control-label">是否有效:</label>--> + <!--<div class="col-sm-8">--> + <!--<div class="onoffswitch">--> + <!--<input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="enable" name="enable">--> + <!--<label class="onoffswitch-label" for="enable">--> + <!--<span class="onoffswitch-inner"></span>--> + <!--<span class="onoffswitch-switch"></span>--> + <!--</label>--> + <!--</div>--> + <!--</div>--> + <!--</div>--> <!--<div class="form-group"> --> <!--<label class="col-sm-3 control-label">自定义字段1:</label>--> <!--<div class="col-sm-8">--> @@ -149,22 +134,15 @@ type: "POST", url: prefix + "/add", data: { - "type": $("#type option:selected").val(), - "companyId": $("#company option:selected").val(), - "companyCode": $("#company option:selected").attr("code"), - "sourceCode": $("input[name='sourceCode']").val(), - "sourcePlatform": $("input[name='sourcePlatform']").val(), - "shipTo": $("input[name='shipTo']").val(), + "shipmentType": $("#shipmentType option:selected").val(), + "companyCode": $("#companyCode option:selected").attr("code"), + "referCode": $("input[name='referCode']").val(), + "referPlatform": $("input[name='referPlatform']").val(), + "customerCode": $("input[name='customerCode']").val(), "priority": $("input[name='priority']").val(), - "station": $("#station option:selected").val(), "totalQty": $("input[name='totalQty']").val(), "totalLines": $("input[name='totalLines']").val(), - "remark": $("input[name='remark']").val(), - "appointmentTime": $("input[name='appointmentTime']").val(), - "enable": $("input[name='enable']").is(':checked'), - "userDef1": $("input[name='userDef1']").val(), - "userDef2": $("input[name='userDef2']").val(), - "userDef3": $("input[name='userDef3']").val(), + "requestedDeliveryDate": $("input[name='requestedDeliveryDate']").val(), }, async: false, error: function (request) { diff --git a/src/main/resources/templates/shipment/shipmentHeader/edit.html b/src/main/resources/templates/shipment/shipmentHeader/edit.html index 059abe0..3fcd864 100644 --- a/src/main/resources/templates/shipment/shipmentHeader/edit.html +++ b/src/main/resources/templates/shipment/shipmentHeader/edit.html @@ -15,27 +15,27 @@ <div class="form-group"> <label class="col-sm-3 control-label">货主:</label> <div class="col-sm-8"> - <select id="company" name="company" class="form-control" th:with="list=${@company.selectCompanyByCurrentUserId()}" th:field="*{companyId}" readonly="readonly" disabled="disabled"> + <select id="companyCode" name="companyCode" class="form-control" th:with="list=${@companyService.selectCompanyByCurrentUserId()}" th:field="*{companyId}" readonly="readonly" disabled="disabled"> <option th:each="item : ${list}" th:text="${item['name']}" th:value="${item['id']}" th:attr="code = ${item['code']}"></option> </select> </div> </div> <div class="form-group"> - <label class="col-sm-3 control-label">上游系统单号:</label> + <label class="col-sm-3 control-label">erp订单号:</label> <div class="col-sm-8"> - <input id="sourceCode" name="sourceCode" th:field="*{sourceCode}" class="form-control" type="text" readonly="readonly"> + <input id="referCode" name="referCode" th:field="*{referCode}" class="form-control" type="text" readonly="readonly"> </div> </div> <div class="form-group"> - <label class="col-sm-3 control-label">上游平台:</label> + <label class="col-sm-3 control-label">订单平台:</label> <div class="col-sm-8"> - <input id="sourcePlatform" name="sourcePlatform" th:field="*{sourcePlatform}" class="form-control" type="text" readonly="readonly"> + <input id="referPlatform" name="referPlatform" th:field="*{referPlatform}" class="form-control" type="text" readonly="readonly"> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">出库单类型:</label> <div class="col-sm-8"> - <select id="type" class="form-control" th:with="shipmentType=${@dict.getType('shipmentType')}" th:field="*{type}" readonly="readonly" disabled="disabled"> + <select id="shipmentType" class="form-control" th:with="shipmentType=${@dict.getType('shipmentType')}" th:field="*{type}" readonly="readonly" disabled="disabled"> <option th:each="dict : ${shipmentType}" th:text="${dict['dictLabel']}" th:value="${dict['dictValue']}" ></option> </select> </div> @@ -43,7 +43,7 @@ <div class="form-group"> <label class="col-sm-3 control-label">客户编码:</label> <div class="col-sm-8"> - <input id="shipTo" name="shipTo" th:field="*{shipTo}" class="form-control" type="text"> + <input id="customerCode" name="customerCode" th:field="*{customerCode}" class="form-control" type="text"> </div> </div> <div class="form-group"> @@ -53,12 +53,6 @@ </div> </div> <div class="form-group"> - <label class="col-sm-3 control-label">发货站台:</label> - <div class="col-sm-8"> - <input id="station" name="station" th:field="*{station}" class="form-control" type="text"> - </div> - </div> - <div class="form-group"> <label class="col-sm-3 control-label">总数量:</label> <div class="col-sm-8"> <input id="totalQty" name="totalQty" th:field="*{totalQty}" class="form-control" type="text" readonly="readonly"> @@ -70,12 +64,6 @@ <input id="totalLines" name="totalLines" th:field="*{totalLines}" class="form-control" type="text" readonly="readonly"> </div> </div> - <div class="form-group"> - <label class="col-sm-3 control-label">备注:</label> - <div class="col-sm-8"> - <input id="remark" name="remark" th:field="*{remark}" class="form-control" type="text"> - </div> - </div> <!--<div class="form-group"> <label class="col-sm-3 control-label">上传备注:</label> <div class="col-sm-8"> @@ -83,15 +71,9 @@ </div> </div>--> <div class="form-group"> - <label class="col-sm-3 control-label">上传时间:</label> + <label class="col-sm-3 control-label">要求到货时间:</label> <div class="col-sm-8"> - <input id="uploadTime" name="uploadTime" th:field="*{uploadTime}" class="form-control" type="text" readonly="readonly"> - </div> - </div> - <div class="form-group"> - <label class="col-sm-3 control-label">发货预约时间:</label> - <div class="col-sm-8"> - <input id="appointmentTime" name="appointmentTime" th:field="*{appointmentTime}" class="form-control" type="text"> + <input id="requestedDeliveryDate" name="requestedDeliveryDate" th:field="*{requestedDeliveryDate}" class="form-control" type="text"> </div> </div> <div class="form-group"> @@ -110,16 +92,16 @@ </select> </div> </div> - <div class="form-group"> - <label class="col-sm-3 control-label">上传状态:</label> - <div class="col-sm-8"> - <!--<input id="uploadStatus" name="uploadStatus" th:field="*{uploadStatus}" class="form-control" type="text" readonly="readonly">--> + <!--<div class="form-group">--> + <!--<label class="col-sm-3 control-label">上传状态:</label>--> + <!--<div class="col-sm-8">--> + <!--<!–<input id="uploadStatus" name="uploadStatus" th:field="*{uploadStatus}" class="form-control" type="text" readonly="readonly">–>--> - <select id="uploadStatus" class="form-control" th:with="uploadStatus=${@dict.getType('uploadStatus')}" th:field="*{uploadStatus}" disabled="disabled"> - <option th:each="dict : ${uploadStatus}" th:text="${dict['dictLabel']}" th:value="${dict['dictValue']}" ></option> - </select> - </div> - </div> + <!--<select id="uploadStatus" class="form-control" th:with="uploadStatus=${@dict.getType('uploadStatus')}" th:field="*{uploadStatus}" disabled="disabled">--> + <!--<option th:each="dict : ${uploadStatus}" th:text="${dict['dictLabel']}" th:value="${dict['dictValue']}" ></option>--> + <!--</select>--> + <!--</div>--> + <!--</div>--> <!--<div class="form-group"> --> <!--<label class="col-sm-3 control-label">创建时间:</label>--> <!--<div class="col-sm-8">--> @@ -144,24 +126,24 @@ <!--<input id="lastUpdatedBy" name="lastUpdatedBy" th:field="*{lastUpdatedBy}" class="form-control" type="text" readonly="readonly">--> <!--</div>--> <!--</div>--> - <div class="form-group"> + <!--<div class="form-group"> --> + <!--<!–<label class="col-sm-3 control-label">是否有效:</label>–>--> + <!--<!–<div class="col-sm-8">–>--> + <!--<!–<!–<input id="enable" name="enable" th:field="*{enable}" class="form-control" type="text">–>–>--> + <!--<!–<input type="radio" name="enable" value="true" th:checked="*{enable}" >是–>--> + <!--<!–<input type="radio" name="enable" value="false" th:checked="*{enable}">否–>--> + <!--<!–</div>–>--> <!--<label class="col-sm-3 control-label">是否有效:</label>--> <!--<div class="col-sm-8">--> - <!--<!–<input id="enable" name="enable" th:field="*{enable}" class="form-control" type="text">–>--> - <!--<input type="radio" name="enable" value="true" th:checked="*{enable}" >是--> - <!--<input type="radio" name="enable" value="false" th:checked="*{enable}">否--> + <!--<div class="onoffswitch">--> + <!--<input type="checkbox" th:checked="${shipmentHeader.enable}" class="onoffswitch-checkbox" id="enable" name="enable">--> + <!--<label class="onoffswitch-label" for="enable">--> + <!--<span class="onoffswitch-inner"></span>--> + <!--<span class="onoffswitch-switch"></span>--> + <!--</label>--> + <!--</div>--> <!--</div>--> - <label class="col-sm-3 control-label">是否有效:</label> - <div class="col-sm-8"> - <div class="onoffswitch"> - <input type="checkbox" th:checked="${shipmentHeader.enable}" class="onoffswitch-checkbox" id="enable" name="enable"> - <label class="onoffswitch-label" for="enable"> - <span class="onoffswitch-inner"></span> - <span class="onoffswitch-switch"></span> - </label> - </div> - </div> - </div> + <!--</div>--> <!--<div class="form-group">--> <!--<label class="col-sm-3 control-label">扩展属性1:</label>--> <!--<div class="col-sm-8">--> @@ -196,9 +178,7 @@ submitHandler: function(form) { // var tableValue = $.common.getTableValue("#form-shipmentHeader-edit"); var tableValue = $("#form-shipmentHeader-edit").serialize(); - tableValue = formValueReplace(tableValue, "enable", $("input[name='enable']").is(':checked')); - tableValue = formValueReplace(tableValue, "companyId", $("#company option:selected").val()); - tableValue = formValueReplace(tableValue, "companyCode", $("#company option:selected").attr("code")); + tableValue = formValueReplace(tableValue, "companyCode", $("#companyCode option:selected").attr("code")); $.operate.save(prefix + "/edit", tableValue); } }); diff --git a/src/main/resources/templates/shipment/shipmentHeader/shipmentHeader.html b/src/main/resources/templates/shipment/shipmentHeader/shipmentHeader.html index d05c4b3..446287f 100644 --- a/src/main/resources/templates/shipment/shipmentHeader/shipmentHeader.html +++ b/src/main/resources/templates/shipment/shipmentHeader/shipmentHeader.html @@ -28,13 +28,19 @@ </li> <li> <!--入库类型:<input type="text" name="sourceCode"/>--> - 出库类型:<select name="type" th:with="type=${@dict.getType('shipmentType')}"> + 出库类型:<select name="shipmentType" th:with="shipmentType=${@dict.getType('shipmentType')}"> <option value="">所有</option> - <option th:each="e : ${type}" th:text="${e['dictLabel']}" + <option th:each="e : ${shipmentType}" th:text="${e['dictLabel']}" th:value="${e['dictValue']}"></option> </select> </li> <li> + erp单号:<input type="text" name="referCode"/> + </li> + <li> + erp订单类型:<input type="text" name="referCodeType"/> + </li> + <li> 客户编码:<input type="text" name="sourceCode"/> </li> <li> @@ -55,24 +61,13 @@ th:value="${e['dictValue']}"></option> </select> </li> - <li> - 上游单号:<input type="text" name="sourceCode"/> - </li> - <li> - u8仓库:<select name="uWarehouseCode" th:with="warehouse=${@warehouse.selectList()}"> - <option value="">所有</option> - <option th:each="e : ${warehouse}" th:text="${e['uWarehouseName']}" th:value="${e['uWarehouseCode']}"></option></select> - </li> - <li> - 上游平台:<input type="text" name="sourcePlatform"/> - </li> <li class="time"> <label>创建时间: </label> <input type="text" class="time-input" id="startTime" placeholder="开始时间" - name="params[createdBegin]"/> + name="createdBegin"/> <span>-</span> <input type="text" class="time-input" id="endTime" placeholder="结束时间" - name="params[createdEnd]"/> + name="createdEnd"/> </li> <li> <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i @@ -248,33 +243,23 @@ sortable:true }, { - field: 'companyId', - title: '货主标识', - visible:false - }, - { field: 'companyCode', title: '货主', sortable:true }, { - field: 'sourceCode', - title: '上游单号', + field: 'referCode', + title: 'erp订单号', sortable:true }, { - field: 'sourcePlatform', - title: '上游平台', + field: 'referCodeType', + title: 'erp订单内部号', sortable:true, visible:false }, { - field : 'uWarehouseCode', - title : 'U8仓库', - sortable:true - }, - { - field: 'type', + field: 'shipmentType', title: '类型', align: 'center', formatter: function(value, row, index) { @@ -284,7 +269,7 @@ }, { - field: 'shipTo', + field: 'customerCode', title: '客户编码', sortable:true }, @@ -293,12 +278,8 @@ title: '优先级' }, { - field: 'station', - title: '发货站台', - align: 'center', - formatter: function(value, row, index) { - return $.table.selectDictLabel(stations, value); - }, + field: 'route', + title: '路线', sortable:true }, { @@ -310,25 +291,6 @@ title: '总行数' }, { - field: 'remark', - title: '备注' - }, - { - field: 'uploadremark', - title: '上传备注', - visible:false - }, - { - field: 'uploadTime', - title: '上传时间', - visible:false - }, - { - field: 'appointmentTime', - title: '发货预约时间', - visible:false - }, - { field: 'firstStatus', title: '头状态', formatter: function(value, row, index) { @@ -345,11 +307,6 @@ sortable:true }, { - field: 'uploadStatus', - title: '上传状态', - visible:false - }, - { field: 'created', title: '创建时间', sortable: true @@ -369,13 +326,6 @@ visible:false }, { - field: 'enable', - title: '是否有效', - formatter: function(value, row, index) { - return $.table.selectDictLabel(datas, value); - } - }, - { title: '操作', align: 'center', formatter: function (value, row, index) { diff --git a/src/main/resources/templates/system/user/add.html b/src/main/resources/templates/system/user/add.html index b8df4b5..c83fd84 100644 --- a/src/main/resources/templates/system/user/add.html +++ b/src/main/resources/templates/system/user/add.html @@ -71,6 +71,16 @@ </label> </div> </div> + + <div class="form-group"> + <label class="col-sm-3 control-label">仓库:</label> + <div class="col-sm-8"> + <label th:each="warehouse:${warehouseList}" class="checkbox-inline i-checks"> + <input name="warehouseCode" type="checkbox" th:value="${warehouse.value}" th:text=" ${warehouse.name}" th:disabled="${warehouse.enable == false} "> + </label> + </div> + </div> + <div class="form-group"> <label class="col-sm-3 control-label">角色:</label> <div class="col-sm-8"> @@ -188,6 +198,7 @@ var sex = $("#sex option:selected").val(); var enable = $("input[name='enable']").is(':checked') == true ? 1 : 0; var roleIds = $.form.selectCheckeds("role"); + var warehouseCodeList = $.form.selectCheckeds("warehouseCode"); var companyIdList = $.form.selectCheckeds("company"); $.ajax({ cache : true, @@ -204,6 +215,7 @@ "sex": sex, "enable": enable, "roleIds": roleIds, + "warehouseCodeList": warehouseCodeList, "companyIdList": companyIdList }, async : false, diff --git a/src/main/resources/templates/system/user/edit.html b/src/main/resources/templates/system/user/edit.html index 2fb57a9..3c52036 100644 --- a/src/main/resources/templates/system/user/edit.html +++ b/src/main/resources/templates/system/user/edit.html @@ -66,6 +66,16 @@ </label> </div> </div> + + <div class="form-group"> + <label class="col-sm-3 control-label">仓库:</label> + <div class="col-sm-8"> + <label th:each="warehouse:${warehouses}" class="checkbox-inline i-checks"> + <input name="warehouse" type="checkbox" th:value="${warehouse.code}" th:text="${warehouse.name}" th:checked="${warehouse.flag}" th:disabled="${warehouse.enable == false}"> + </label> + </div> + </div> + <div class="form-group"> <label class="col-sm-3 control-label">角色:</label> <div class="col-sm-8"> @@ -160,6 +170,7 @@ var sex = $("#sex option:selected").val(); var enable = $("input[name='enable']").is(':checked') == true ? 1 : 0; var roleIds = $.form.selectCheckeds("role"); + var warehouseCodeList = $.form.selectCheckeds("warehouse"); var companyIdList = $.form.selectCheckeds("company"); $.ajax({ cache : true, @@ -174,6 +185,7 @@ "sex": sex, "enable": enable, "roleIds": roleIds, + "warehouseCodeList": warehouseCodeList, "companyIdList": companyIdList }, async : false,