| | |
| | | // generator.username="sa"; |
| | | // generator.password="Zoneyung@zy56$"; |
| | | |
| | | generator.table = "man_loc_revise"; |
| | | generator.tableDesc = "库存调整单"; |
| | | generator.table = "man_revise_log_item"; |
| | | generator.tableDesc = "库位调整历史"; |
| | | generator.packagePath = "com.vincent.rsf.server.manager"; |
| | | |
| | | generator.build(); |
| | |
| | | import com.vincent.rsf.server.common.domain.KeyValVo; |
| | | import com.vincent.rsf.server.common.domain.PageParam; |
| | | import com.vincent.rsf.server.manager.entity.LocRevise; |
| | | import com.vincent.rsf.server.manager.entity.WarehouseAreas; |
| | | import com.vincent.rsf.server.manager.service.LocReviseService; |
| | | import com.vincent.rsf.server.manager.service.WarehouseAreasService; |
| | | import com.vincent.rsf.server.manager.service.impl.WarehouseAreasServiceImpl; |
| | | import com.vincent.rsf.server.system.constant.SerialRuleCode; |
| | | import com.vincent.rsf.server.system.controller.BaseController; |
| | | import com.vincent.rsf.server.system.utils.SerialRuleUtils; |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | |
| | | |
| | | @Autowired |
| | | private LocReviseService locReviseService; |
| | | @Autowired |
| | | private WarehouseAreasService warehouseAreasService; |
| | | |
| | | @PreAuthorize("hasAuthority('manager:locRevise:list')") |
| | | @PostMapping("/locRevise/page") |
| | |
| | | locRevise.setCreateTime(new Date()); |
| | | locRevise.setUpdateBy(getLoginUserId()); |
| | | locRevise.setUpdateTime(new Date()); |
| | | |
| | | if (Objects.isNull(locRevise.getId())) { |
| | | String ruleCode = SerialRuleUtils.generateRuleCode(SerialRuleCode.SYS_LOC_REVISE_CODE, null); |
| | | locRevise.setCode(ruleCode); |
| | | } |
| | | |
| | | WarehouseAreas areas = warehouseAreasService.getById(locRevise.getAreaId()); |
| | | if (!Objects.isNull(areas)) { |
| | | locRevise.setAreaId(areas.getId()) |
| | | .setAreaName(areas.getName()); |
| | | } |
| | | |
| | | if (!locReviseService.save(locRevise)) { |
| | | return R.error("Save Fail"); |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.vincent.rsf.framework.common.Cools; |
| | | import com.vincent.rsf.framework.common.R; |
| | | import com.vincent.rsf.server.common.utils.ExcelUtil; |
| | | import com.vincent.rsf.server.common.annotation.OperationLog; |
| | | import com.vincent.rsf.server.common.domain.BaseParam; |
| | | import com.vincent.rsf.server.common.domain.KeyValVo; |
| | | import com.vincent.rsf.server.common.domain.PageParam; |
| | | import com.vincent.rsf.server.manager.entity.ReviseLog; |
| | | import com.vincent.rsf.server.manager.service.ReviseLogService; |
| | | import com.vincent.rsf.server.system.controller.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | | public class ReviseLogController extends BaseController { |
| | | |
| | | @Autowired |
| | | private ReviseLogService reviseLogService; |
| | | |
| | | @PreAuthorize("hasAuthority('manager:reviseLog:list')") |
| | | @PostMapping("/reviseLog/page") |
| | | public R page(@RequestBody Map<String, Object> map) { |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<ReviseLog, BaseParam> pageParam = new PageParam<>(baseParam, ReviseLog.class); |
| | | return R.ok().add(reviseLogService.page(pageParam, pageParam.buildWrapper(true))); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:reviseLog:list')") |
| | | @PostMapping("/reviseLog/list") |
| | | public R list(@RequestBody Map<String, Object> map) { |
| | | return R.ok().add(reviseLogService.list()); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:reviseLog:list')") |
| | | @PostMapping({"/reviseLog/many/{ids}", "/reviseLogs/many/{ids}"}) |
| | | public R many(@PathVariable Long[] ids) { |
| | | return R.ok().add(reviseLogService.listByIds(Arrays.asList(ids))); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:reviseLog:list')") |
| | | @GetMapping("/reviseLog/{id}") |
| | | public R get(@PathVariable("id") Long id) { |
| | | return R.ok().add(reviseLogService.getById(id)); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:reviseLog:save')") |
| | | @OperationLog("Create 库位调整历史") |
| | | @PostMapping("/reviseLog/save") |
| | | public R save(@RequestBody ReviseLog reviseLog) { |
| | | reviseLog.setCreateBy(getLoginUserId()); |
| | | reviseLog.setCreateTime(new Date()); |
| | | reviseLog.setUpdateBy(getLoginUserId()); |
| | | reviseLog.setUpdateTime(new Date()); |
| | | if (!reviseLogService.save(reviseLog)) { |
| | | return R.error("Save Fail"); |
| | | } |
| | | return R.ok("Save Success").add(reviseLog); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:reviseLog:update')") |
| | | @OperationLog("Update 库位调整历史") |
| | | @PostMapping("/reviseLog/update") |
| | | public R update(@RequestBody ReviseLog reviseLog) { |
| | | reviseLog.setUpdateBy(getLoginUserId()); |
| | | reviseLog.setUpdateTime(new Date()); |
| | | if (!reviseLogService.updateById(reviseLog)) { |
| | | return R.error("Update Fail"); |
| | | } |
| | | return R.ok("Update Success").add(reviseLog); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:reviseLog:remove')") |
| | | @OperationLog("Delete 库位调整历史") |
| | | @PostMapping("/reviseLog/remove/{ids}") |
| | | public R remove(@PathVariable Long[] ids) { |
| | | if (!reviseLogService.removeByIds(Arrays.asList(ids))) { |
| | | return R.error("Delete Fail"); |
| | | } |
| | | return R.ok("Delete Success").add(ids); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:reviseLog:list')") |
| | | @PostMapping("/reviseLog/query") |
| | | public R query(@RequestParam(required = false) String condition) { |
| | | List<KeyValVo> vos = new ArrayList<>(); |
| | | LambdaQueryWrapper<ReviseLog> wrapper = new LambdaQueryWrapper<>(); |
| | | if (!Cools.isEmpty(condition)) { |
| | | wrapper.like(ReviseLog::getId, condition); |
| | | } |
| | | reviseLogService.page(new Page<>(1, 30), wrapper).getRecords().forEach( |
| | | item -> vos.add(new KeyValVo(item.getId(), item.getId())) |
| | | ); |
| | | return R.ok().add(vos); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:reviseLog:list')") |
| | | @PostMapping("/reviseLog/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | ExcelUtil.build(ExcelUtil.create(reviseLogService.list(), ReviseLog.class), response); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.vincent.rsf.framework.common.Cools; |
| | | import com.vincent.rsf.framework.common.R; |
| | | import com.vincent.rsf.server.common.utils.ExcelUtil; |
| | | import com.vincent.rsf.server.common.annotation.OperationLog; |
| | | import com.vincent.rsf.server.common.domain.BaseParam; |
| | | import com.vincent.rsf.server.common.domain.KeyValVo; |
| | | import com.vincent.rsf.server.common.domain.PageParam; |
| | | import com.vincent.rsf.server.manager.entity.ReviseLogItem; |
| | | import com.vincent.rsf.server.manager.service.ReviseLogItemService; |
| | | import com.vincent.rsf.server.system.controller.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | | public class ReviseLogItemController extends BaseController { |
| | | |
| | | @Autowired |
| | | private ReviseLogItemService reviseLogItemService; |
| | | |
| | | @PreAuthorize("hasAuthority('manager:reviseLogItem:list')") |
| | | @PostMapping("/reviseLogItem/page") |
| | | public R page(@RequestBody Map<String, Object> map) { |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<ReviseLogItem, BaseParam> pageParam = new PageParam<>(baseParam, ReviseLogItem.class); |
| | | return R.ok().add(reviseLogItemService.page(pageParam, pageParam.buildWrapper(true))); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:reviseLogItem:list')") |
| | | @PostMapping("/reviseLogItem/list") |
| | | public R list(@RequestBody Map<String, Object> map) { |
| | | return R.ok().add(reviseLogItemService.list()); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:reviseLogItem:list')") |
| | | @PostMapping({"/reviseLogItem/many/{ids}", "/reviseLogItems/many/{ids}"}) |
| | | public R many(@PathVariable Long[] ids) { |
| | | return R.ok().add(reviseLogItemService.listByIds(Arrays.asList(ids))); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:reviseLogItem:list')") |
| | | @GetMapping("/reviseLogItem/{id}") |
| | | public R get(@PathVariable("id") Long id) { |
| | | return R.ok().add(reviseLogItemService.getById(id)); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:reviseLogItem:save')") |
| | | @OperationLog("Create 库位调整历史") |
| | | @PostMapping("/reviseLogItem/save") |
| | | public R save(@RequestBody ReviseLogItem reviseLogItem) { |
| | | reviseLogItem.setCreateBy(getLoginUserId()); |
| | | reviseLogItem.setCreateTime(new Date()); |
| | | reviseLogItem.setUpdateBy(getLoginUserId()); |
| | | reviseLogItem.setUpdateTime(new Date()); |
| | | if (!reviseLogItemService.save(reviseLogItem)) { |
| | | return R.error("Save Fail"); |
| | | } |
| | | return R.ok("Save Success").add(reviseLogItem); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:reviseLogItem:update')") |
| | | @OperationLog("Update 库位调整历史") |
| | | @PostMapping("/reviseLogItem/update") |
| | | public R update(@RequestBody ReviseLogItem reviseLogItem) { |
| | | reviseLogItem.setUpdateBy(getLoginUserId()); |
| | | reviseLogItem.setUpdateTime(new Date()); |
| | | if (!reviseLogItemService.updateById(reviseLogItem)) { |
| | | return R.error("Update Fail"); |
| | | } |
| | | return R.ok("Update Success").add(reviseLogItem); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:reviseLogItem:remove')") |
| | | @OperationLog("Delete 库位调整历史") |
| | | @PostMapping("/reviseLogItem/remove/{ids}") |
| | | public R remove(@PathVariable Long[] ids) { |
| | | if (!reviseLogItemService.removeByIds(Arrays.asList(ids))) { |
| | | return R.error("Delete Fail"); |
| | | } |
| | | return R.ok("Delete Success").add(ids); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:reviseLogItem:list')") |
| | | @PostMapping("/reviseLogItem/query") |
| | | public R query(@RequestParam(required = false) String condition) { |
| | | List<KeyValVo> vos = new ArrayList<>(); |
| | | LambdaQueryWrapper<ReviseLogItem> wrapper = new LambdaQueryWrapper<>(); |
| | | if (!Cools.isEmpty(condition)) { |
| | | wrapper.like(ReviseLogItem::getId, condition); |
| | | } |
| | | reviseLogItemService.page(new Page<>(1, 30), wrapper).getRecords().forEach( |
| | | item -> vos.add(new KeyValVo(item.getId(), item.getId())) |
| | | ); |
| | | return R.ok().add(vos); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:reviseLogItem:list')") |
| | | @PostMapping("/reviseLogItem/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | ExcelUtil.build(ExcelUtil.create(reviseLogItemService.list(), ReviseLogItem.class), response); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.experimental.Accessors; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @Accessors(chain = true) |
| | | @TableName("man_loc_revise") |
| | | public class LocRevise implements Serializable { |
| | | |
| | |
| | | * 源库区ID |
| | | */ |
| | | @ApiModelProperty(value= "源库区ID") |
| | | private Long orgAreaId; |
| | | private Long areaId; |
| | | |
| | | /** |
| | | * 原库区名称 |
| | | */ |
| | | @ApiModelProperty(value= "原库区名称") |
| | | private String orgAreaName; |
| | | private String areaName; |
| | | |
| | | @ApiModelProperty("调整时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd") |
| | | private Date exceTime; |
| | | |
| | | /** |
| | | * 状态 1: 正常 0: 冻结 |
| | |
| | | this.anfme = anfme; |
| | | this.reviseQty = reviseQty; |
| | | this.exceStatus = exceStatus; |
| | | this.orgAreaId = orgAreaId; |
| | | this.orgAreaName = orgAreaName; |
| | | this.areaId = orgAreaId; |
| | | this.areaName = orgAreaName; |
| | | this.status = status; |
| | | this.deleted = deleted; |
| | | this.tenantId = tenantId; |
| | |
| | | this.updateTime = updateTime; |
| | | this.memo = memo; |
| | | } |
| | | |
| | | // LocRevise locRevise = new LocRevise( |
| | | // null, // 调整单 |
| | | // null, // 单据类型 |
| | | // null, // 单据数量 |
| | | // null, // 实际数量 |
| | | // null, // 执行状态: |
| | | // null, // 源库区ID |
| | | // null, // 原库区名称 |
| | | // null, // 状态[非空] |
| | | // null, // 是否删除[非空] |
| | | // null, // 租户 |
| | | // null, // 添加人员 |
| | | // null, // 添加时间[非空] |
| | | // null, // 修改人员 |
| | | // null, // 修改时间[非空] |
| | | // null // 备注 |
| | | // ); |
| | | |
| | | public String getType$(){ |
| | | if (null == this.type){ return null; } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.vincent.rsf.framework.common.Cools; |
| | | import com.vincent.rsf.framework.common.SpringUtils; |
| | | import com.vincent.rsf.server.system.service.UserService; |
| | | import com.vincent.rsf.server.system.entity.User; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("man_revise_log") |
| | | public class ReviseLog implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ID |
| | | */ |
| | | @ApiModelProperty(value= "ID") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 调整单ID |
| | | */ |
| | | @ApiModelProperty(value= "调整单ID") |
| | | private Long reviseId; |
| | | |
| | | /** |
| | | * 调整单编码 |
| | | */ |
| | | @ApiModelProperty(value= "调整单编码") |
| | | private String reviseCode; |
| | | |
| | | /** |
| | | * 仓库ID |
| | | */ |
| | | @ApiModelProperty(value= "仓库ID") |
| | | private Long warehouseId; |
| | | |
| | | /** |
| | | * 库区ID |
| | | */ |
| | | @ApiModelProperty(value= "库区ID") |
| | | private Long areaId; |
| | | |
| | | /** |
| | | * 类型 |
| | | */ |
| | | @ApiModelProperty(value= "类型") |
| | | private Integer type; |
| | | |
| | | /** |
| | | * 容器码 |
| | | */ |
| | | @ApiModelProperty(value= "容器码") |
| | | private String barcode; |
| | | |
| | | /** |
| | | * 库位状态 |
| | | */ |
| | | @ApiModelProperty(value= "库位状态") |
| | | private String useStatus; |
| | | |
| | | /** |
| | | * 巷道 |
| | | */ |
| | | @ApiModelProperty(value= "巷道") |
| | | private Integer channel; |
| | | |
| | | /** |
| | | * 排 |
| | | */ |
| | | @ApiModelProperty(value= "排") |
| | | private Integer row; |
| | | |
| | | /** |
| | | * 列 |
| | | */ |
| | | @ApiModelProperty(value= "列") |
| | | private Integer col; |
| | | |
| | | /** |
| | | * 层 |
| | | */ |
| | | @ApiModelProperty(value= "层") |
| | | private Integer lev; |
| | | |
| | | /** |
| | | * 状态 1: 正常 0: 冻结 |
| | | */ |
| | | @ApiModelProperty(value= "状态 1: 正常 0: 冻结 ") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | | * 租户 |
| | | */ |
| | | @ApiModelProperty(value= "租户") |
| | | private Integer tenantId; |
| | | |
| | | /** |
| | | * 添加人员 |
| | | */ |
| | | @ApiModelProperty(value= "添加人员") |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | public ReviseLog() {} |
| | | |
| | | public ReviseLog(Long reviseId,String reviseCode,Long warehouseId,Long areaId,Integer type,String barcode,String useStatus,Integer channel,Integer row,Integer col,Integer lev,Integer status,Integer deleted,Integer tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { |
| | | this.reviseId = reviseId; |
| | | this.reviseCode = reviseCode; |
| | | this.warehouseId = warehouseId; |
| | | this.areaId = areaId; |
| | | this.type = type; |
| | | this.barcode = barcode; |
| | | this.useStatus = useStatus; |
| | | this.channel = channel; |
| | | this.row = row; |
| | | this.col = col; |
| | | this.lev = lev; |
| | | this.status = status; |
| | | this.deleted = deleted; |
| | | this.tenantId = tenantId; |
| | | this.createBy = createBy; |
| | | this.createTime = createTime; |
| | | this.updateBy = updateBy; |
| | | this.updateTime = updateTime; |
| | | this.memo = memo; |
| | | } |
| | | |
| | | // ReviseLog reviseLog = new ReviseLog( |
| | | // null, // 调整单ID |
| | | // null, // 调整单编码 |
| | | // null, // 仓库ID |
| | | // null, // 库区ID |
| | | // null, // 类型 |
| | | // null, // 容器码 |
| | | // null, // 库位状态 |
| | | // null, // 巷道 |
| | | // null, // 排 |
| | | // null, // 列 |
| | | // null, // 层 |
| | | // null, // 状态[非空] |
| | | // null, // 是否删除[非空] |
| | | // null, // 租户 |
| | | // null, // 添加人员 |
| | | // null, // 添加时间[非空] |
| | | // null, // 修改人员 |
| | | // null, // 修改时间[非空] |
| | | // null // 备注 |
| | | // ); |
| | | |
| | | public String getStatus$(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | | case 1: |
| | | return "正常"; |
| | | case 0: |
| | | return "冻结"; |
| | | default: |
| | | return String.valueOf(this.status); |
| | | } |
| | | } |
| | | |
| | | public String getCreateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.getById(this.createBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getCreateTime$(){ |
| | | if (Cools.isEmpty(this.createTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); |
| | | } |
| | | |
| | | public String getUpdateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.getById(this.updateBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getUpdateTime$(){ |
| | | if (Cools.isEmpty(this.updateTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); |
| | | } |
| | | |
| | | |
| | | |
| | | public Boolean getStatusBool(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | | case 1: |
| | | return true; |
| | | case 0: |
| | | return false; |
| | | default: |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.vincent.rsf.framework.common.Cools; |
| | | import com.vincent.rsf.framework.common.SpringUtils; |
| | | import com.vincent.rsf.server.system.service.UserService; |
| | | import com.vincent.rsf.server.system.entity.User; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("man_revise_log_item") |
| | | public class ReviseLogItem implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ID |
| | | */ |
| | | @ApiModelProperty(value= "ID") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 调整单ID |
| | | */ |
| | | @ApiModelProperty(value= "调整单ID") |
| | | private Long reviseLogId; |
| | | |
| | | /** |
| | | * 库位ID |
| | | */ |
| | | @ApiModelProperty(value= "库位ID") |
| | | private Long locId; |
| | | |
| | | /** |
| | | * 库位 |
| | | */ |
| | | @ApiModelProperty(value= "库位") |
| | | private String locCode; |
| | | |
| | | /** |
| | | * 物料ID |
| | | */ |
| | | @ApiModelProperty(value= "物料ID") |
| | | private Long matnrId; |
| | | |
| | | /** |
| | | * 物料名称 |
| | | */ |
| | | @ApiModelProperty(value= "物料名称") |
| | | private String maktx; |
| | | |
| | | /** |
| | | * 物料编码 |
| | | */ |
| | | @ApiModelProperty(value= "物料编码") |
| | | private String matnrCode; |
| | | |
| | | /** |
| | | * 单位 |
| | | */ |
| | | @ApiModelProperty(value= "单位") |
| | | private String unit; |
| | | |
| | | /** |
| | | * 数量 |
| | | */ |
| | | @ApiModelProperty(value= "数量") |
| | | private Double anfme; |
| | | |
| | | /** |
| | | * 调整数量 |
| | | */ |
| | | @ApiModelProperty(value= "调整数量") |
| | | private Double reviseQty; |
| | | |
| | | /** |
| | | * 批次 |
| | | */ |
| | | @ApiModelProperty(value= "批次") |
| | | private String batch; |
| | | |
| | | /** |
| | | * 规格 |
| | | */ |
| | | @ApiModelProperty(value= "规格") |
| | | private String spec; |
| | | |
| | | /** |
| | | * 型号 |
| | | */ |
| | | @ApiModelProperty(value= "型号") |
| | | private String model; |
| | | |
| | | /** |
| | | * 扩展字段 |
| | | */ |
| | | @ApiModelProperty(value= "扩展字段") |
| | | private String fieldsIndex; |
| | | |
| | | /** |
| | | * 状态 1: 正常 0: 冻结 |
| | | */ |
| | | @ApiModelProperty(value= "状态 1: 正常 0: 冻结 ") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | | * 租户 |
| | | */ |
| | | @ApiModelProperty(value= "租户") |
| | | private Integer tenantId; |
| | | |
| | | /** |
| | | * 添加人员 |
| | | */ |
| | | @ApiModelProperty(value= "添加人员") |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | public ReviseLogItem() {} |
| | | |
| | | public ReviseLogItem(Long reviseLogId,Long locId,String locCode,Long matnrId,String maktx,String matnrCode,String unit,Double anfme,Double reviseQty,String batch,String spec,String model,String fieldsIndex,Integer status,Integer deleted,Integer tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { |
| | | this.reviseLogId = reviseLogId; |
| | | this.locId = locId; |
| | | this.locCode = locCode; |
| | | this.matnrId = matnrId; |
| | | this.maktx = maktx; |
| | | this.matnrCode = matnrCode; |
| | | this.unit = unit; |
| | | this.anfme = anfme; |
| | | this.reviseQty = reviseQty; |
| | | this.batch = batch; |
| | | this.spec = spec; |
| | | this.model = model; |
| | | this.fieldsIndex = fieldsIndex; |
| | | this.status = status; |
| | | this.deleted = deleted; |
| | | this.tenantId = tenantId; |
| | | this.createBy = createBy; |
| | | this.createTime = createTime; |
| | | this.updateBy = updateBy; |
| | | this.updateTime = updateTime; |
| | | this.memo = memo; |
| | | } |
| | | |
| | | // ReviseLogItem reviseLogItem = new ReviseLogItem( |
| | | // null, // 调整单ID |
| | | // null, // 库位ID |
| | | // null, // 库位 |
| | | // null, // 物料ID |
| | | // null, // 物料名称 |
| | | // null, // 物料编码 |
| | | // null, // 单位 |
| | | // null, // 数量 |
| | | // null, // 调整数量 |
| | | // null, // 批次 |
| | | // null, // 规格 |
| | | // null, // 型号 |
| | | // null, // 扩展字段 |
| | | // null, // 状态[非空] |
| | | // null, // 是否删除[非空] |
| | | // null, // 租户 |
| | | // null, // 添加人员 |
| | | // null, // 添加时间[非空] |
| | | // null, // 修改人员 |
| | | // null, // 修改时间[非空] |
| | | // null // 备注 |
| | | // ); |
| | | |
| | | public String getStatus$(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | | case 1: |
| | | return "正常"; |
| | | case 0: |
| | | return "冻结"; |
| | | default: |
| | | return String.valueOf(this.status); |
| | | } |
| | | } |
| | | |
| | | public String getCreateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.getById(this.createBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getCreateTime$(){ |
| | | if (Cools.isEmpty(this.createTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); |
| | | } |
| | | |
| | | public String getUpdateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.getById(this.updateBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getUpdateTime$(){ |
| | | if (Cools.isEmpty(this.updateTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); |
| | | } |
| | | |
| | | |
| | | |
| | | public Boolean getStatusBool(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | | case 1: |
| | | return true; |
| | | case 0: |
| | | return false; |
| | | default: |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.mapper; |
| | | |
| | | import com.vincent.rsf.server.manager.entity.ReviseLogItem; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface ReviseLogItemMapper extends BaseMapper<ReviseLogItem> { |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.mapper; |
| | | |
| | | import com.vincent.rsf.server.manager.entity.ReviseLog; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface ReviseLogMapper extends BaseMapper<ReviseLog> { |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.vincent.rsf.server.manager.entity.ReviseLogItem; |
| | | |
| | | public interface ReviseLogItemService extends IService<ReviseLogItem> { |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.vincent.rsf.server.manager.entity.ReviseLog; |
| | | |
| | | public interface ReviseLogService extends IService<ReviseLog> { |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.service.impl; |
| | | |
| | | import com.vincent.rsf.server.manager.mapper.ReviseLogItemMapper; |
| | | import com.vincent.rsf.server.manager.entity.ReviseLogItem; |
| | | import com.vincent.rsf.server.manager.service.ReviseLogItemService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("reviseLogItemService") |
| | | public class ReviseLogItemServiceImpl extends ServiceImpl<ReviseLogItemMapper, ReviseLogItem> implements ReviseLogItemService { |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.service.impl; |
| | | |
| | | import com.vincent.rsf.server.manager.mapper.ReviseLogMapper; |
| | | import com.vincent.rsf.server.manager.entity.ReviseLog; |
| | | import com.vincent.rsf.server.manager.service.ReviseLogService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("reviseLogService") |
| | | public class ReviseLogServiceImpl extends ServiceImpl<ReviseLogMapper, ReviseLog> implements ReviseLogService { |
| | | |
| | | } |
| | |
| | | /**调拔单编码规则*/ |
| | | public final static String SYS_TRANSFER_ORDER_CODE = "sys_transfer_order_code"; |
| | | |
| | | /**库存调整单mfk*/ |
| | | public final static String SYS_LOC_REVISE_CODE = "sys_loc_revise_code"; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | <?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.vincent.rsf.server.manager.mapper.ReviseLogItemMapper"> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?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.vincent.rsf.server.manager.mapper.ReviseLogMapper"> |
| | | |
| | | </mapper> |