入库相关接口开发

This commit is contained in:
2025-05-30 16:13:27 +08:00
parent 8694b17db4
commit 68f96b9872
60 changed files with 3568 additions and 194 deletions

View File

@@ -120,6 +120,10 @@ public class SecurityConfig
"/ws/**", "/ws/**",
"/information/device/**", "/information/device/**",
"/MatchScan/**", "/MatchScan/**",
// "/wisdom/stock/**",
// "/information/materialtype/**",
// "/information/warehousingtype/**",
// "/information/warehouseinfo/**",
"/Visual/**", "/Visual/**",
"/HdInventory/**").permitAll() "/HdInventory/**").permitAll()
// 静态资源,可匿名访问 // 静态资源,可匿名访问

View File

@@ -1,4 +1,4 @@
package com.zg.project.Information.controller; package com.zg.project.information.controller;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
@@ -14,8 +14,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.zg.framework.aspectj.lang.annotation.Log; import com.zg.framework.aspectj.lang.annotation.Log;
import com.zg.framework.aspectj.lang.enums.BusinessType; import com.zg.framework.aspectj.lang.enums.BusinessType;
import com.zg.project.Information.domain.DeviceInfo; import com.zg.project.information.domain.DeviceInfo;
import com.zg.project.Information.service.IDeviceInfoService; import com.zg.project.information.service.IDeviceInfoService;
import com.zg.framework.web.controller.BaseController; import com.zg.framework.web.controller.BaseController;
import com.zg.framework.web.domain.AjaxResult; import com.zg.framework.web.domain.AjaxResult;
import com.zg.common.utils.poi.ExcelUtil; import com.zg.common.utils.poi.ExcelUtil;

View File

@@ -0,0 +1,112 @@
package com.zg.project.information.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zg.framework.aspectj.lang.annotation.Log;
import com.zg.framework.aspectj.lang.enums.BusinessType;
import com.zg.project.information.domain.MaterialType;
import com.zg.project.information.service.IMaterialTypeService;
import com.zg.framework.web.controller.BaseController;
import com.zg.framework.web.domain.AjaxResult;
import com.zg.common.utils.poi.ExcelUtil;
import com.zg.framework.web.page.TableDataInfo;
/**
* 物资类型Controller
*
* @author zg
* @date 2025-05-27
*/
@RestController
@RequestMapping("/information/materialtype")
public class MaterialTypeController extends BaseController
{
@Autowired
private IMaterialTypeService materialTypeService;
/**
* 查询物资类型列表
*/
@PreAuthorize("@ss.hasPermi('information:materialtype:list')")
@GetMapping("/list")
public TableDataInfo list(MaterialType materialType)
{
startPage();
List<MaterialType> list = materialTypeService.selectMaterialTypeList(materialType);
return getDataTable(list);
}
@PreAuthorize("@ss.hasPermi('information:materialtype:list')")
@GetMapping("/getAll")
public AjaxResult getAll()
{
List<MaterialType> list = materialTypeService.selectMaterialTypeList(new MaterialType());
return success(list);
}
/**
* 导出物资类型列表
*/
@PreAuthorize("@ss.hasPermi('information:materialtype:export')")
@Log(title = "物资类型", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, MaterialType materialType)
{
List<MaterialType> list = materialTypeService.selectMaterialTypeList(materialType);
ExcelUtil<MaterialType> util = new ExcelUtil<MaterialType>(MaterialType.class);
util.exportExcel(response, list, "物资类型数据");
}
/**
* 获取物资类型详细信息
*/
@PreAuthorize("@ss.hasPermi('information:materialtype:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(materialTypeService.selectMaterialTypeById(id));
}
/**
* 新增物资类型
*/
@PreAuthorize("@ss.hasPermi('information:materialtype:add')")
@Log(title = "物资类型", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody MaterialType materialType)
{
return toAjax(materialTypeService.insertMaterialType(materialType));
}
/**
* 修改物资类型
*/
@PreAuthorize("@ss.hasPermi('information:materialtype:edit')")
@Log(title = "物资类型", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody MaterialType materialType)
{
return toAjax(materialTypeService.updateMaterialType(materialType));
}
/**
* 删除物资类型
*/
@PreAuthorize("@ss.hasPermi('information:materialtype:remove')")
@Log(title = "物资类型", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(materialTypeService.deleteMaterialTypeByIds(ids));
}
}

View File

@@ -0,0 +1,115 @@
package com.zg.project.information.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.zg.project.wisdom.domain.GysJh;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.zg.framework.aspectj.lang.annotation.Log;
import com.zg.framework.aspectj.lang.enums.BusinessType;
import com.zg.project.information.domain.PcdeDetail;
import com.zg.project.information.service.IPcdeDetailService;
import com.zg.framework.web.controller.BaseController;
import com.zg.framework.web.domain.AjaxResult;
import com.zg.common.utils.poi.ExcelUtil;
import com.zg.framework.web.page.TableDataInfo;
import org.springframework.web.multipart.MultipartFile;
/**
* 库位明细Controller
*
* @author zg
* @date 2025-05-29
*/
@RestController
@RequestMapping("/information/pcdedetail")
public class PcdeDetailController extends BaseController
{
@Autowired
private IPcdeDetailService pcdeDetailService;
/**
* 查询库位明细列表
*/
@PreAuthorize("@ss.hasPermi('information:pcdedetail:list')")
@GetMapping("/list")
public TableDataInfo list(PcdeDetail pcdeDetail)
{
startPage();
List<PcdeDetail> list = pcdeDetailService.selectPcdeDetailList(pcdeDetail);
return getDataTable(list);
}
/**
* 导出库位明细列表
*/
@PreAuthorize("@ss.hasPermi('information:pcdedetail:export')")
@Log(title = "库位明细", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, PcdeDetail pcdeDetail)
{
List<PcdeDetail> list = pcdeDetailService.selectPcdeDetailList(pcdeDetail);
ExcelUtil<PcdeDetail> util = new ExcelUtil<PcdeDetail>(PcdeDetail.class);
util.exportExcel(response, list, "库位明细数据");
}
/**
* 导入供应计划数据(全部新增,不校验重复)
*/
@PreAuthorize("@ss.hasPermi('information:pcdedetail:import')")
@Log(title = "库位明细", businessType = BusinessType.IMPORT)
@PostMapping("/importData")
public AjaxResult importData(@RequestParam("file") MultipartFile file) throws Exception {
ExcelUtil<PcdeDetail> util = new ExcelUtil<>(PcdeDetail.class);
List<PcdeDetail> list = util.importExcel(file.getInputStream());
String operName = getUsername();
String message = pcdeDetailService.importPcdeDetail(list, operName);
return AjaxResult.success(message);
}
/**
* 获取库位明细详细信息
*/
@PreAuthorize("@ss.hasPermi('information:pcdedetail:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(pcdeDetailService.selectPcdeDetailById(id));
}
/**
* 新增库位明细
*/
@PreAuthorize("@ss.hasPermi('information:pcdedetail:add')")
@Log(title = "库位明细", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody PcdeDetail pcdeDetail)
{
return toAjax(pcdeDetailService.insertPcdeDetail(pcdeDetail));
}
/**
* 修改库位明细
*/
@PreAuthorize("@ss.hasPermi('information:pcdedetail:edit')")
@Log(title = "库位明细", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody PcdeDetail pcdeDetail)
{
return toAjax(pcdeDetailService.updatePcdeDetail(pcdeDetail));
}
/**
* 删除库位明细
*/
@PreAuthorize("@ss.hasPermi('information:pcdedetail:remove')")
@Log(title = "库位明细", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(pcdeDetailService.deletePcdeDetailByIds(ids));
}
}

View File

@@ -1,10 +1,10 @@
package com.zg.project.Information.controller; package com.zg.project.information.controller;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.zg.project.Information.domain.SceneMapping; import com.zg.project.information.domain.SceneMapping;
import com.zg.project.Information.service.ISceneMappingService; import com.zg.project.information.service.ISceneMappingService;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@@ -47,6 +47,18 @@ public class SceneMappingController extends BaseController
return getDataTable(list); return getDataTable(list);
} }
/**
* 查询场景编号列表
* @return
*/
@PreAuthorize("@ss.hasPermi('information:scene:list')")
@GetMapping("/getAll")
public AjaxResult getAll()
{
List<SceneMapping> list = sceneMappingService.selectSceneMappingList(new SceneMapping());
return success(list);
}
/** /**
* 导出场景编号列表 * 导出场景编号列表
*/ */

View File

@@ -0,0 +1,115 @@
package com.zg.project.information.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zg.framework.aspectj.lang.annotation.Log;
import com.zg.framework.aspectj.lang.enums.BusinessType;
import com.zg.project.information.domain.StockInType;
import com.zg.project.information.service.IStockInTypeService;
import com.zg.framework.web.controller.BaseController;
import com.zg.framework.web.domain.AjaxResult;
import com.zg.common.utils.poi.ExcelUtil;
import com.zg.framework.web.page.TableDataInfo;
/**
* 入库类型Controller
*
* @author zg
* @date 2025-05-27
*/
@RestController
@RequestMapping("/information/warehousingtype")
public class StockInTypeController extends BaseController
{
@Autowired
private IStockInTypeService stockInTypeService;
/**
* 查询入库类型列表
*/
@PreAuthorize("@ss.hasPermi('information:warehousingtype:list')")
@GetMapping("/list")
public TableDataInfo list(StockInType stockInType)
{
startPage();
List<StockInType> list = stockInTypeService.selectStockInTypeList(stockInType);
return getDataTable(list);
}
/**
* 查询所有入库类型列表
* @return
*/
@PreAuthorize("@ss.hasPermi('information:warehousingtype:list')")
@GetMapping("/getAll")
public AjaxResult getAll()
{
List<StockInType> list = stockInTypeService.selectStockInTypeList(new StockInType());
return AjaxResult.success(list);
}
/**
* 导出入库类型列表
*/
@PreAuthorize("@ss.hasPermi('information:warehousingtype:export')")
@Log(title = "入库类型", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, StockInType stockInType)
{
List<StockInType> list = stockInTypeService.selectStockInTypeList(stockInType);
ExcelUtil<StockInType> util = new ExcelUtil<StockInType>(StockInType.class);
util.exportExcel(response, list, "入库类型数据");
}
/**
* 获取入库类型详细信息
*/
@PreAuthorize("@ss.hasPermi('information:warehousingtype:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(stockInTypeService.selectStockInTypeById(id));
}
/**
* 新增入库类型
*/
@PreAuthorize("@ss.hasPermi('information:warehousingtype:add')")
@Log(title = "入库类型", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody StockInType stockInType)
{
return toAjax(stockInTypeService.insertStockInType(stockInType));
}
/**
* 修改入库类型
*/
@PreAuthorize("@ss.hasPermi('information:warehousingtype:edit')")
@Log(title = "入库类型", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody StockInType stockInType)
{
return toAjax(stockInTypeService.updateStockInType(stockInType));
}
/**
* 删除入库类型
*/
@PreAuthorize("@ss.hasPermi('information:warehousingtype:remove')")
@Log(title = "入库类型", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(stockInTypeService.deleteStockInTypeByIds(ids));
}
}

View File

@@ -0,0 +1,34 @@
package com.zg.project.information.controller;
import com.zg.framework.web.controller.BaseController;
import com.zg.framework.web.domain.AjaxResult;
import com.zg.project.system.domain.SysUser;
import com.zg.project.system.service.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* 用户信息
*
* @author zg
*/
@RestController
@RequestMapping("/information/user")
public class UserController extends BaseController {
@Autowired
private ISysUserService userService;
/**
* 获取用户列表
*/
@GetMapping("/getAll")
public AjaxResult getAll() {
List<SysUser> list = userService.getAll();
return AjaxResult.success(list);
}
}

View File

@@ -0,0 +1,116 @@
package com.zg.project.information.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zg.framework.aspectj.lang.annotation.Log;
import com.zg.framework.aspectj.lang.enums.BusinessType;
import com.zg.project.information.domain.WarehouseInfo;
import com.zg.project.information.service.IWarehouseInfoService;
import com.zg.framework.web.controller.BaseController;
import com.zg.framework.web.domain.AjaxResult;
import com.zg.common.utils.poi.ExcelUtil;
import com.zg.framework.web.page.TableDataInfo;
/**
* 仓库信息Controller
*
* @author zg
* @date 2025-05-27
*/
@RestController
@RequestMapping("/information/warehouseinfo")
public class WarehouseInfoController extends BaseController
{
@Autowired
private IWarehouseInfoService warehouseInfoService;
/**
* 查询仓库信息列表
*/
@PreAuthorize("@ss.hasPermi('information:warehouseinfo:list')")
@GetMapping("/list")
public TableDataInfo list(WarehouseInfo warehouseInfo)
{
startPage();
List<WarehouseInfo> list = warehouseInfoService.selectWarehouseInfoList(warehouseInfo);
return getDataTable(list);
}
/**
* 查询仓库信息列表
* @return
*/
@PreAuthorize("@ss.hasPermi('information:warehouseinfo:list')")
@GetMapping("/getAll")
public AjaxResult getAll()
{
List<WarehouseInfo> list = warehouseInfoService.selectWarehouseInfoList(new WarehouseInfo());
return success(list);
}
/**
* 导出仓库信息列表
*/
@PreAuthorize("@ss.hasPermi('information:warehouseinfo:export')")
@Log(title = "仓库信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, WarehouseInfo warehouseInfo)
{
List<WarehouseInfo> list = warehouseInfoService.selectWarehouseInfoList(warehouseInfo);
ExcelUtil<WarehouseInfo> util = new ExcelUtil<WarehouseInfo>(WarehouseInfo.class);
util.exportExcel(response, list, "仓库信息数据");
}
/**
* 获取仓库信息详细信息
*/
@PreAuthorize("@ss.hasPermi('information:warehouseinfo:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(warehouseInfoService.selectWarehouseInfoById(id));
}
/**
* 新增仓库信息
*/
@PreAuthorize("@ss.hasPermi('information:warehouseinfo:add')")
@Log(title = "仓库信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody WarehouseInfo warehouseInfo)
{
return toAjax(warehouseInfoService.insertWarehouseInfo(warehouseInfo));
}
/**
* 修改仓库信息
*/
@PreAuthorize("@ss.hasPermi('information:warehouseinfo:edit')")
@Log(title = "仓库信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody WarehouseInfo warehouseInfo)
{
return toAjax(warehouseInfoService.updateWarehouseInfo(warehouseInfo));
}
/**
* 删除仓库信息
*/
@PreAuthorize("@ss.hasPermi('information:warehouseinfo:remove')")
@Log(title = "仓库信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(warehouseInfoService.deleteWarehouseInfoByIds(ids));
}
}

View File

@@ -1,4 +1,4 @@
package com.zg.project.Information.domain; package com.zg.project.information.domain;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;

View File

@@ -0,0 +1,132 @@
package com.zg.project.information.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zg.framework.aspectj.lang.annotation.Excel;
import com.zg.framework.web.domain.BaseEntity;
/**
* 物资类型对象 material_type
*
* @author zg
* @date 2025-05-27
*/
public class MaterialType extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键ID */
private Long id;
/** 物资类型编码 */
@Excel(name = "物资类型编码")
private String typeCode;
/** 物资类型名称 */
@Excel(name = "物资类型名称")
private String typeName;
/** 状态1=启用0=禁用) */
@Excel(name = "状态", readConverterExp = "1==启用0=禁用")
private Long status;
/** 排序值 */
@Excel(name = "排序值")
private Long sort;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date createdAt;
/** 更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date updatedAt;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setTypeCode(String typeCode)
{
this.typeCode = typeCode;
}
public String getTypeCode()
{
return typeCode;
}
public void setTypeName(String typeName)
{
this.typeName = typeName;
}
public String getTypeName()
{
return typeName;
}
public void setStatus(Long status)
{
this.status = status;
}
public Long getStatus()
{
return status;
}
public void setSort(Long sort)
{
this.sort = sort;
}
public Long getSort()
{
return sort;
}
public void setCreatedAt(Date createdAt)
{
this.createdAt = createdAt;
}
public Date getCreatedAt()
{
return createdAt;
}
public void setUpdatedAt(Date updatedAt)
{
this.updatedAt = updatedAt;
}
public Date getUpdatedAt()
{
return updatedAt;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("typeCode", getTypeCode())
.append("typeName", getTypeName())
.append("status", getStatus())
.append("sort", getSort())
.append("remark", getRemark())
.append("createdAt", getCreatedAt())
.append("updatedAt", getUpdatedAt())
.toString();
}
}

View File

@@ -0,0 +1,215 @@
package com.zg.project.information.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zg.framework.aspectj.lang.annotation.Excel;
import com.zg.framework.web.domain.BaseEntity;
/**
* 库位明细对象 pcde_detail
*
* @author zg
* @date 2025-05-29
*/
public class PcdeDetail extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键ID */
private Long id;
/** 库位编号 */
@Excel(name = "库位编号")
private String locationCode;
/** 所属场景 */
private String scene;
/** 所属场景名称 */
@Excel(name = "所属场景名称")
private String sceneName;
/** 所属仓库 */
@Excel(name = "所属仓库")
private String warehouse;
/** 编码后ID */
@Excel(name = "编码后ID")
private String encodedId;
/** 标签 */
@Excel(name = "标签")
private String tag;
/** 备注 */
@Excel(name = "备注")
private String remark;
/** 是否删除0 正常1 删除) */
private String isDelete;
/** 创建人 */
private String createdBy;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
private Date createdAt;
/** 修改人 */
private String updatedBy;
/** 修改时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
private Date updatedAt;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setLocationCode(String locationCode)
{
this.locationCode = locationCode;
}
public String getLocationCode()
{
return locationCode;
}
public void setScene(String scene)
{
this.scene = scene;
}
public String getScene()
{
return scene;
}
public void setSceneName(String sceneName)
{
this.sceneName = sceneName;
}
public String getSceneName()
{
return sceneName;
}
public void setWarehouse(String warehouse)
{
this.warehouse = warehouse;
}
public String getWarehouse()
{
return warehouse;
}
public void setEncodedId(String encodedId)
{
this.encodedId = encodedId;
}
public String getEncodedId()
{
return encodedId;
}
public void setTag(String tag)
{
this.tag = tag;
}
public String getTag()
{
return tag;
}
public void setRemark(String remark)
{
this.remark = remark;
}
public String getRemark()
{
return remark;
}
public void setIsDelete(String isDelete)
{
this.isDelete = isDelete;
}
public String getIsDelete()
{
return isDelete;
}
public void setCreatedBy(String createdBy)
{
this.createdBy = createdBy;
}
public String getCreatedBy()
{
return createdBy;
}
public void setCreatedAt(Date createdAt)
{
this.createdAt = createdAt;
}
public Date getCreatedAt()
{
return createdAt;
}
public void setUpdatedBy(String updatedBy)
{
this.updatedBy = updatedBy;
}
public String getUpdatedBy()
{
return updatedBy;
}
public void setUpdatedAt(Date updatedAt)
{
this.updatedAt = updatedAt;
}
public Date getUpdatedAt()
{
return updatedAt;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("locationCode", getLocationCode())
.append("scene", getScene())
.append("sceneName", getSceneName())
.append("warehouse", getWarehouse())
.append("encodedId", getEncodedId())
.append("tag", getTag())
.append("remark", getRemark())
.append("isDelete", getIsDelete())
.append("createdBy", getCreatedBy())
.append("createdAt", getCreatedAt())
.append("updatedBy", getUpdatedBy())
.append("updatedAt", getUpdatedAt())
.toString();
}
}

View File

@@ -1,4 +1,4 @@
package com.zg.project.Information.domain; package com.zg.project.information.domain;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;

View File

@@ -1,4 +1,4 @@
package com.zg.project.Information.domain; package com.zg.project.information.domain;
import java.util.Date; import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;

View File

@@ -1,4 +1,4 @@
package com.zg.project.Information.domain; package com.zg.project.information.domain;
import java.util.Date; import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;

View File

@@ -1,7 +1,7 @@
package com.zg.project.Information.mapper; package com.zg.project.information.mapper;
import java.util.List; import java.util.List;
import com.zg.project.Information.domain.DeviceInfo; import com.zg.project.information.domain.DeviceInfo;
/** /**
* 设备信息Mapper接口 * 设备信息Mapper接口

View File

@@ -0,0 +1,61 @@
package com.zg.project.information.mapper;
import java.util.List;
import com.zg.project.information.domain.MaterialType;
/**
* 物资类型Mapper接口
*
* @author zg
* @date 2025-05-27
*/
public interface MaterialTypeMapper
{
/**
* 查询物资类型
*
* @param id 物资类型主键
* @return 物资类型
*/
public MaterialType selectMaterialTypeById(Long id);
/**
* 查询物资类型列表
*
* @param materialType 物资类型
* @return 物资类型集合
*/
public List<MaterialType> selectMaterialTypeList(MaterialType materialType);
/**
* 新增物资类型
*
* @param materialType 物资类型
* @return 结果
*/
public int insertMaterialType(MaterialType materialType);
/**
* 修改物资类型
*
* @param materialType 物资类型
* @return 结果
*/
public int updateMaterialType(MaterialType materialType);
/**
* 删除物资类型
*
* @param id 物资类型主键
* @return 结果
*/
public int deleteMaterialTypeById(Long id);
/**
* 批量删除物资类型
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteMaterialTypeByIds(Long[] ids);
}

View File

@@ -0,0 +1,69 @@
package com.zg.project.information.mapper;
import java.util.List;
import com.zg.project.information.domain.PcdeDetail;
/**
* 库位明细Mapper接口
*
* @author zg
* @date 2025-05-29
*/
public interface PcdeDetailMapper
{
/**
* 查询库位明细
*
* @param id 库位明细主键
* @return 库位明细
*/
public PcdeDetail selectPcdeDetailById(Long id);
/**
* 查询库位明细列表
*
* @param pcdeDetail 库位明细
* @return 库位明细集合
*/
public List<PcdeDetail> selectPcdeDetailList(PcdeDetail pcdeDetail);
/**
* 新增库位明细
*
* @param pcdeDetail 库位明细
* @return 结果
*/
public int insertPcdeDetail(PcdeDetail pcdeDetail);
/**
* 修改库位明细
*
* @param pcdeDetail 库位明细
* @return 结果
*/
public int updatePcdeDetail(PcdeDetail pcdeDetail);
/**
* 删除库位明细
*
* @param id 库位明细主键
* @return 结果
*/
public int deletePcdeDetailById(Long id);
/**
* 批量删除库位明细
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deletePcdeDetailByIds(Long[] ids);
/**
* 根据库位编码查询库位信息
* @param locationCode
* @return
*/
PcdeDetail selectByLocationCode(String locationCode);
}

View File

@@ -1,6 +1,6 @@
package com.zg.project.Information.mapper; package com.zg.project.information.mapper;
import com.zg.project.Information.domain.SceneMapping; import com.zg.project.information.domain.SceneMapping;
import java.util.List; import java.util.List;

View File

@@ -0,0 +1,61 @@
package com.zg.project.information.mapper;
import java.util.List;
import com.zg.project.information.domain.StockInType;
/**
* 入库类型Mapper接口
*
* @author zg
* @date 2025-05-27
*/
public interface StockInTypeMapper
{
/**
* 查询入库类型
*
* @param id 入库类型主键
* @return 入库类型
*/
public StockInType selectStockInTypeById(Long id);
/**
* 查询入库类型列表
*
* @param stockInType 入库类型
* @return 入库类型集合
*/
public List<StockInType> selectStockInTypeList(StockInType stockInType);
/**
* 新增入库类型
*
* @param stockInType 入库类型
* @return 结果
*/
public int insertStockInType(StockInType stockInType);
/**
* 修改入库类型
*
* @param stockInType 入库类型
* @return 结果
*/
public int updateStockInType(StockInType stockInType);
/**
* 删除入库类型
*
* @param id 入库类型主键
* @return 结果
*/
public int deleteStockInTypeById(Long id);
/**
* 批量删除入库类型
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteStockInTypeByIds(Long[] ids);
}

View File

@@ -0,0 +1,62 @@
package com.zg.project.information.mapper;
import com.zg.project.information.domain.WarehouseInfo;
import java.util.List;
/**
* 仓库信息Mapper接口
*
* @author zg
* @date 2025-05-27
*/
public interface WarehouseInfoMapper
{
/**
* 查询仓库信息
*
* @param id 仓库信息主键
* @return 仓库信息
*/
public WarehouseInfo selectWarehouseInfoById(Long id);
/**
* 查询仓库信息列表
*
* @param warehouseInfo 仓库信息
* @return 仓库信息集合
*/
public List<WarehouseInfo> selectWarehouseInfoList(WarehouseInfo warehouseInfo);
/**
* 新增仓库信息
*
* @param warehouseInfo 仓库信息
* @return 结果
*/
public int insertWarehouseInfo(WarehouseInfo warehouseInfo);
/**
* 修改仓库信息
*
* @param warehouseInfo 仓库信息
* @return 结果
*/
public int updateWarehouseInfo(WarehouseInfo warehouseInfo);
/**
* 删除仓库信息
*
* @param id 仓库信息主键
* @return 结果
*/
public int deleteWarehouseInfoById(Long id);
/**
* 批量删除仓库信息
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteWarehouseInfoByIds(Long[] ids);
}

View File

@@ -1,7 +1,7 @@
package com.zg.project.Information.service; package com.zg.project.information.service;
import java.util.List; import java.util.List;
import com.zg.project.Information.domain.DeviceInfo; import com.zg.project.information.domain.DeviceInfo;
/** /**
* 设备信息Service接口 * 设备信息Service接口

View File

@@ -0,0 +1,61 @@
package com.zg.project.information.service;
import java.util.List;
import com.zg.project.information.domain.MaterialType;
/**
* 物资类型Service接口
*
* @author zg
* @date 2025-05-27
*/
public interface IMaterialTypeService
{
/**
* 查询物资类型
*
* @param id 物资类型主键
* @return 物资类型
*/
public MaterialType selectMaterialTypeById(Long id);
/**
* 查询物资类型列表
*
* @param materialType 物资类型
* @return 物资类型集合
*/
public List<MaterialType> selectMaterialTypeList(MaterialType materialType);
/**
* 新增物资类型
*
* @param materialType 物资类型
* @return 结果
*/
public int insertMaterialType(MaterialType materialType);
/**
* 修改物资类型
*
* @param materialType 物资类型
* @return 结果
*/
public int updateMaterialType(MaterialType materialType);
/**
* 批量删除物资类型
*
* @param ids 需要删除的物资类型主键集合
* @return 结果
*/
public int deleteMaterialTypeByIds(Long[] ids);
/**
* 删除物资类型信息
*
* @param id 物资类型主键
* @return 结果
*/
public int deleteMaterialTypeById(Long id);
}

View File

@@ -0,0 +1,69 @@
package com.zg.project.information.service;
import java.util.List;
import com.zg.project.information.domain.PcdeDetail;
/**
* 库位明细Service接口
*
* @author zg
* @date 2025-05-29
*/
public interface IPcdeDetailService
{
/**
* 查询库位明细
*
* @param id 库位明细主键
* @return 库位明细
*/
public PcdeDetail selectPcdeDetailById(Long id);
/**
* 查询库位明细列表
*
* @param pcdeDetail 库位明细
* @return 库位明细集合
*/
public List<PcdeDetail> selectPcdeDetailList(PcdeDetail pcdeDetail);
/**
* 新增库位明细
*
* @param pcdeDetail 库位明细
* @return 结果
*/
public int insertPcdeDetail(PcdeDetail pcdeDetail);
/**
* 修改库位明细
*
* @param pcdeDetail 库位明细
* @return 结果
*/
public int updatePcdeDetail(PcdeDetail pcdeDetail);
/**
* 批量删除库位明细
*
* @param ids 需要删除的库位明细主键集合
* @return 结果
*/
public int deletePcdeDetailByIds(Long[] ids);
/**
* 删除库位明细信息
*
* @param id 库位明细主键
* @return 结果
*/
public int deletePcdeDetailById(Long id);
/**
* 导入数据
* @param list
* @param operName
* @return
*/
String importPcdeDetail(List<PcdeDetail> list, String operName);
}

View File

@@ -1,6 +1,6 @@
package com.zg.project.Information.service; package com.zg.project.information.service;
import com.zg.project.Information.domain.SceneMapping; import com.zg.project.information.domain.SceneMapping;
import java.util.List; import java.util.List;

View File

@@ -0,0 +1,61 @@
package com.zg.project.information.service;
import java.util.List;
import com.zg.project.information.domain.StockInType;
/**
* 入库类型Service接口
*
* @author zg
* @date 2025-05-27
*/
public interface IStockInTypeService
{
/**
* 查询入库类型
*
* @param id 入库类型主键
* @return 入库类型
*/
public StockInType selectStockInTypeById(Long id);
/**
* 查询入库类型列表
*
* @param stockInType 入库类型
* @return 入库类型集合
*/
public List<StockInType> selectStockInTypeList(StockInType stockInType);
/**
* 新增入库类型
*
* @param stockInType 入库类型
* @return 结果
*/
public int insertStockInType(StockInType stockInType);
/**
* 修改入库类型
*
* @param stockInType 入库类型
* @return 结果
*/
public int updateStockInType(StockInType stockInType);
/**
* 批量删除入库类型
*
* @param ids 需要删除的入库类型主键集合
* @return 结果
*/
public int deleteStockInTypeByIds(Long[] ids);
/**
* 删除入库类型信息
*
* @param id 入库类型主键
* @return 结果
*/
public int deleteStockInTypeById(Long id);
}

View File

@@ -0,0 +1,62 @@
package com.zg.project.information.service;
import com.zg.project.information.domain.WarehouseInfo;
import java.util.List;
/**
* 仓库信息Service接口
*
* @author zg
* @date 2025-05-27
*/
public interface IWarehouseInfoService
{
/**
* 查询仓库信息
*
* @param id 仓库信息主键
* @return 仓库信息
*/
public WarehouseInfo selectWarehouseInfoById(Long id);
/**
* 查询仓库信息列表
*
* @param warehouseInfo 仓库信息
* @return 仓库信息集合
*/
public List<WarehouseInfo> selectWarehouseInfoList(WarehouseInfo warehouseInfo);
/**
* 新增仓库信息
*
* @param warehouseInfo 仓库信息
* @return 结果
*/
public int insertWarehouseInfo(WarehouseInfo warehouseInfo);
/**
* 修改仓库信息
*
* @param warehouseInfo 仓库信息
* @return 结果
*/
public int updateWarehouseInfo(WarehouseInfo warehouseInfo);
/**
* 批量删除仓库信息
*
* @param ids 需要删除的仓库信息主键集合
* @return 结果
*/
public int deleteWarehouseInfoByIds(Long[] ids);
/**
* 删除仓库信息信息
*
* @param id 仓库信息主键
* @return 结果
*/
public int deleteWarehouseInfoById(Long id);
}

View File

@@ -1,12 +1,12 @@
package com.zg.project.Information.service.impl; package com.zg.project.information.service.impl;
import java.util.List; import java.util.List;
import com.zg.common.utils.DateUtils; import com.zg.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.zg.project.Information.mapper.DeviceInfoMapper; import com.zg.project.information.mapper.DeviceInfoMapper;
import com.zg.project.Information.domain.DeviceInfo; import com.zg.project.information.domain.DeviceInfo;
import com.zg.project.Information.service.IDeviceInfoService; import com.zg.project.information.service.IDeviceInfoService;
/** /**
* 设备信息Service业务层处理 * 设备信息Service业务层处理

View File

@@ -0,0 +1,93 @@
package com.zg.project.information.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zg.project.information.mapper.MaterialTypeMapper;
import com.zg.project.information.domain.MaterialType;
import com.zg.project.information.service.IMaterialTypeService;
/**
* 物资类型Service业务层处理
*
* @author zg
* @date 2025-05-27
*/
@Service
public class MaterialTypeServiceImpl implements IMaterialTypeService
{
@Autowired
private MaterialTypeMapper materialTypeMapper;
/**
* 查询物资类型
*
* @param id 物资类型主键
* @return 物资类型
*/
@Override
public MaterialType selectMaterialTypeById(Long id)
{
return materialTypeMapper.selectMaterialTypeById(id);
}
/**
* 查询物资类型列表
*
* @param materialType 物资类型
* @return 物资类型
*/
@Override
public List<MaterialType> selectMaterialTypeList(MaterialType materialType)
{
return materialTypeMapper.selectMaterialTypeList(materialType);
}
/**
* 新增物资类型
*
* @param materialType 物资类型
* @return 结果
*/
@Override
public int insertMaterialType(MaterialType materialType)
{
return materialTypeMapper.insertMaterialType(materialType);
}
/**
* 修改物资类型
*
* @param materialType 物资类型
* @return 结果
*/
@Override
public int updateMaterialType(MaterialType materialType)
{
return materialTypeMapper.updateMaterialType(materialType);
}
/**
* 批量删除物资类型
*
* @param ids 需要删除的物资类型主键
* @return 结果
*/
@Override
public int deleteMaterialTypeByIds(Long[] ids)
{
return materialTypeMapper.deleteMaterialTypeByIds(ids);
}
/**
* 删除物资类型信息
*
* @param id 物资类型主键
* @return 结果
*/
@Override
public int deleteMaterialTypeById(Long id)
{
return materialTypeMapper.deleteMaterialTypeById(id);
}
}

View File

@@ -0,0 +1,146 @@
package com.zg.project.information.service.impl;
import java.util.List;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.zg.common.exception.ServiceException;
import com.zg.common.utils.DateUtils;
import com.zg.project.wisdom.domain.GysJh;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zg.project.information.mapper.PcdeDetailMapper;
import com.zg.project.information.domain.PcdeDetail;
import com.zg.project.information.service.IPcdeDetailService;
/**
* 库位明细Service业务层处理
*
* @author zg
* @date 2025-05-29
*/
@Service
public class PcdeDetailServiceImpl implements IPcdeDetailService
{
@Autowired
private PcdeDetailMapper pcdeDetailMapper;
/**
* 查询库位明细
*
* @param id 库位明细主键
* @return 库位明细
*/
@Override
public PcdeDetail selectPcdeDetailById(Long id)
{
return pcdeDetailMapper.selectPcdeDetailById(id);
}
/**
* 查询库位明细列表
*
* @param pcdeDetail 库位明细
* @return 库位明细
*/
@Override
public List<PcdeDetail> selectPcdeDetailList(PcdeDetail pcdeDetail)
{
return pcdeDetailMapper.selectPcdeDetailList(pcdeDetail);
}
/**
* 新增库位明细
*
* @param pcdeDetail 库位明细
* @return 结果
*/
@Override
public int insertPcdeDetail(PcdeDetail pcdeDetail) {
// 原始 locationCode
String locationCode = pcdeDetail.getLocationCode();
// 将 locationCode 转换为十六进制字符串
StringBuilder hex = new StringBuilder();
for (int i = 0; i < locationCode.length(); i++) {
char c = locationCode.charAt(i);
String hexPart = Integer.toHexString(c).toUpperCase();
hex.append(hexPart);
}
pcdeDetail.setEncodedId( hex.toString());
// 继续插入操作
return pcdeDetailMapper.insertPcdeDetail(pcdeDetail);
}
/**
* 修改库位明细
*
* @param pcdeDetail 库位明细
* @return 结果
*/
@Override
public int updatePcdeDetail(PcdeDetail pcdeDetail)
{
return pcdeDetailMapper.updatePcdeDetail(pcdeDetail);
}
/**
* 批量删除库位明细
*
* @param ids 需要删除的库位明细主键
* @return 结果
*/
@Override
public int deletePcdeDetailByIds(Long[] ids)
{
return pcdeDetailMapper.deletePcdeDetailByIds(ids);
}
/**
* 删除库位明细信息
*
* @param id 库位明细主键
* @return 结果
*/
@Override
public int deletePcdeDetailById(Long id)
{
return pcdeDetailMapper.deletePcdeDetailById(id);
}
@Override
public String importPcdeDetail(List<PcdeDetail> pcdeList, String operName) {
if (CollectionUtils.isEmpty(pcdeList)) {
throw new ServiceException("导入数据不能为空!");
}
int successNum = 0;
int failureNum = 0;
StringBuilder failureMsg = new StringBuilder();
for (PcdeDetail detail : pcdeList) {
try {
PcdeDetail exist = pcdeDetailMapper.selectByLocationCode(detail.getLocationCode());
if (exist == null) {
detail.setCreateBy(operName);
detail.setCreateTime(DateUtils.getNowDate());
pcdeDetailMapper.insertPcdeDetail(detail);
successNum++;
} else {
failureNum++;
failureMsg.append("<br/>库位编号 ").append(detail.getLocationCode()).append(" 已存在");
}
} catch (Exception e) {
failureNum++;
failureMsg.append("<br/>库位编号 ").append(detail.getLocationCode()).append(" 导入失败:").append(e.getMessage());
}
}
if (failureNum > 0) {
failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据有误,错误如下:");
throw new ServiceException(failureMsg.toString());
} else {
return "恭喜您,数据已全部导入成功!共 " + successNum + " 条。";
}
}
}

View File

@@ -1,10 +1,10 @@
package com.zg.project.Information.service.impl; package com.zg.project.information.service.impl;
import java.util.List; import java.util.List;
import com.zg.project.Information.domain.SceneMapping; import com.zg.project.information.domain.SceneMapping;
import com.zg.project.Information.mapper.SceneMappingMapper; import com.zg.project.information.mapper.SceneMappingMapper;
import com.zg.project.Information.service.ISceneMappingService; import com.zg.project.information.service.ISceneMappingService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;

View File

@@ -0,0 +1,93 @@
package com.zg.project.information.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zg.project.information.mapper.StockInTypeMapper;
import com.zg.project.information.domain.StockInType;
import com.zg.project.information.service.IStockInTypeService;
/**
* 入库类型Service业务层处理
*
* @author zg
* @date 2025-05-27
*/
@Service
public class StockInTypeServiceImpl implements IStockInTypeService
{
@Autowired
private StockInTypeMapper stockInTypeMapper;
/**
* 查询入库类型
*
* @param id 入库类型主键
* @return 入库类型
*/
@Override
public StockInType selectStockInTypeById(Long id)
{
return stockInTypeMapper.selectStockInTypeById(id);
}
/**
* 查询入库类型列表
*
* @param stockInType 入库类型
* @return 入库类型
*/
@Override
public List<StockInType> selectStockInTypeList(StockInType stockInType)
{
return stockInTypeMapper.selectStockInTypeList(stockInType);
}
/**
* 新增入库类型
*
* @param stockInType 入库类型
* @return 结果
*/
@Override
public int insertStockInType(StockInType stockInType)
{
return stockInTypeMapper.insertStockInType(stockInType);
}
/**
* 修改入库类型
*
* @param stockInType 入库类型
* @return 结果
*/
@Override
public int updateStockInType(StockInType stockInType)
{
return stockInTypeMapper.updateStockInType(stockInType);
}
/**
* 批量删除入库类型
*
* @param ids 需要删除的入库类型主键
* @return 结果
*/
@Override
public int deleteStockInTypeByIds(Long[] ids)
{
return stockInTypeMapper.deleteStockInTypeByIds(ids);
}
/**
* 删除入库类型信息
*
* @param id 入库类型主键
* @return 结果
*/
@Override
public int deleteStockInTypeById(Long id)
{
return stockInTypeMapper.deleteStockInTypeById(id);
}
}

View File

@@ -0,0 +1,93 @@
package com.zg.project.information.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zg.project.information.mapper.WarehouseInfoMapper;
import com.zg.project.information.domain.WarehouseInfo;
import com.zg.project.information.service.IWarehouseInfoService;
/**
* 仓库信息Service业务层处理
*
* @author zg
* @date 2025-05-27
*/
@Service
public class WarehouseInfoServiceImpl implements IWarehouseInfoService
{
@Autowired
private WarehouseInfoMapper warehouseInfoMapper;
/**
* 查询仓库信息
*
* @param id 仓库信息主键
* @return 仓库信息
*/
@Override
public WarehouseInfo selectWarehouseInfoById(Long id)
{
return warehouseInfoMapper.selectWarehouseInfoById(id);
}
/**
* 查询仓库信息列表
*
* @param warehouseInfo 仓库信息
* @return 仓库信息
*/
@Override
public List<WarehouseInfo> selectWarehouseInfoList(WarehouseInfo warehouseInfo)
{
return warehouseInfoMapper.selectWarehouseInfoList(warehouseInfo);
}
/**
* 新增仓库信息
*
* @param warehouseInfo 仓库信息
* @return 结果
*/
@Override
public int insertWarehouseInfo(WarehouseInfo warehouseInfo)
{
return warehouseInfoMapper.insertWarehouseInfo(warehouseInfo);
}
/**
* 修改仓库信息
*
* @param warehouseInfo 仓库信息
* @return 结果
*/
@Override
public int updateWarehouseInfo(WarehouseInfo warehouseInfo)
{
return warehouseInfoMapper.updateWarehouseInfo(warehouseInfo);
}
/**
* 批量删除仓库信息
*
* @param ids 需要删除的仓库信息主键
* @return 结果
*/
@Override
public int deleteWarehouseInfoByIds(Long[] ids)
{
return warehouseInfoMapper.deleteWarehouseInfoByIds(ids);
}
/**
* 删除仓库信息信息
*
* @param id 仓库信息主键
* @return 结果
*/
@Override
public int deleteWarehouseInfoById(Long id)
{
return warehouseInfoMapper.deleteWarehouseInfoById(id);
}
}

View File

@@ -126,4 +126,11 @@ public interface SysUserMapper
* @return 结果 * @return 结果
*/ */
public SysUser checkEmailUnique(String email); public SysUser checkEmailUnique(String email);
/**
* 获取所有用户
* @return
*/
List<SysUser> getAll();
} }

View File

@@ -203,4 +203,12 @@ public interface ISysUserService
* @return 结果 * @return 结果
*/ */
public String importUser(List<SysUser> userList, Boolean isUpdateSupport, String operName); public String importUser(List<SysUser> userList, Boolean isUpdateSupport, String operName);
/**
* 获取所有用户
* @return
*/
List<SysUser> getAll();
} }

View File

@@ -547,4 +547,9 @@ public class SysUserServiceImpl implements ISysUserService
} }
return successMsg.toString(); return successMsg.toString();
} }
@Override
public List<SysUser> getAll() {
return userMapper.getAll();
}
} }

View File

@@ -1,17 +1,14 @@
package com.zg.project.wisdom.plan.controller; package com.zg.project.wisdom.controller;
import java.io.IOException;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.zg.framework.aspectj.lang.annotation.Log; import com.zg.framework.aspectj.lang.annotation.Log;
import com.zg.framework.aspectj.lang.enums.BusinessType; import com.zg.framework.aspectj.lang.enums.BusinessType;
import io.swagger.annotations.ApiOperation; import com.zg.project.wisdom.domain.GysJh;
import org.springframework.beans.factory.annotation.Autowired; import com.zg.project.wisdom.service.IGysJhService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import com.zg.project.wisdom.plan.domain.GysJh;
import com.zg.project.wisdom.plan.service.IGysJhService;
import com.zg.framework.web.controller.BaseController; import com.zg.framework.web.controller.BaseController;
import com.zg.framework.web.domain.AjaxResult; import com.zg.framework.web.domain.AjaxResult;
import com.zg.common.utils.poi.ExcelUtil; import com.zg.common.utils.poi.ExcelUtil;
@@ -22,103 +19,108 @@ import org.springframework.web.multipart.MultipartFile;
* 供应计划Controller * 供应计划Controller
* *
* @author zg * @author zg
* @date 2025-05-12 * @date 2025-05-28
*/ */
@RestController @RestController
@RequestMapping("/plan/jh") @RequestMapping("/plan/jh")
public class GysJhController extends BaseController { public class GysJhController extends BaseController
{
@Autowired @Autowired
private IGysJhService gysJhService; private IGysJhService gysJhService;
/** /**
* 查询供应计划列表 * 查询供应计划列表
*/ */
@PreAuthorize("@ss.hasPermi('query:jh:list')") @PreAuthorize("@ss.hasPermi('plan:jh:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(GysJh gysJh) { public TableDataInfo list(GysJh gysJh)
{
startPage(); startPage();
List<GysJh> list = gysJhService.selectGysJhList(gysJh); List<GysJh> list = gysJhService.selectGysJhList(gysJh);
return getDataTable(list); return getDataTable(list);
}
/**
* 根据sapNo查询供应计划列表
* @param sapNo
* @return
*/
@PreAuthorize("@ss.hasPermi('plan:jh:list')")
@GetMapping("/getBySapNo")
public AjaxResult getBySapNo(String sapNo)
{
List<GysJh> list = gysJhService.getBySapNo(sapNo);
return success(list);
} }
/** /**
* 导出供应计划列表 * 导出供应计划列表
*/ */
@PreAuthorize("@ss.hasPermi('query:jh:export')") @PreAuthorize("@ss.hasPermi('plan:jh:export')")
@Log(title = "供应计划", businessType = BusinessType.EXPORT) @Log(title = "供应计划", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, GysJh gysJh) { public void export(HttpServletResponse response, GysJh gysJh)
{
List<GysJh> list = gysJhService.selectGysJhList(gysJh); List<GysJh> list = gysJhService.selectGysJhList(gysJh);
ExcelUtil<GysJh> util = new ExcelUtil<GysJh>(GysJh.class); ExcelUtil<GysJh> util = new ExcelUtil<GysJh>(GysJh.class);
util.exportExcel(response, list, "供应计划数据"); util.exportExcel(response, list, "供应计划数据");
}
/**
* 导入供应计划数据全部新增不校验重复
*/
@PreAuthorize("@ss.hasPermi('wisdom:jh:import')")
@Log(title = "供应计划", businessType = BusinessType.IMPORT)
@PostMapping("/importData")
public AjaxResult importData(@RequestParam("file") MultipartFile file) throws Exception {
ExcelUtil<GysJh> util = new ExcelUtil<>(GysJh.class);
List<GysJh> jhList = util.importExcel(file.getInputStream());
String operName = getUsername();
String message = gysJhService.importGysJhList(jhList, operName);
return AjaxResult.success(message);
} }
/** /**
* 获取供应计划详细信息 * 获取供应计划详细信息
*/ */
@PreAuthorize("@ss.hasPermi('query:jh:query')") @PreAuthorize("@ss.hasPermi('plan:jh:query')")
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) { public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(gysJhService.selectGysJhById(id)); return success(gysJhService.selectGysJhById(id));
} }
/** /**
* 新增供应计划 * 新增供应计划
*/ */
@PreAuthorize("@ss.hasPermi('query:jh:add')") @PreAuthorize("@ss.hasPermi('plan:jh:add')")
@Log(title = "供应计划", businessType = BusinessType.INSERT) @Log(title = "供应计划", businessType = BusinessType.INSERT)
@PostMapping("/add") @PostMapping
public AjaxResult add(@RequestBody GysJh gysJh) { public AjaxResult add(@RequestBody GysJh gysJh)
{
return toAjax(gysJhService.insertGysJh(gysJh)); return toAjax(gysJhService.insertGysJh(gysJh));
}
/**
* 供应计划导入
*/
@PreAuthorize("@ss.hasPermi('query:jh:import')")
@Log(title = "供应计划", businessType = BusinessType.IMPORT)
@PostMapping("/import")
public AjaxResult importData(@RequestParam("file") MultipartFile file, boolean updateSupport) throws IOException {
ExcelUtil<GysJh> util = new ExcelUtil<>(GysJh.class);
List<GysJh> list = util.importExcel(file.getInputStream());
String operator = getUsername();
String message = gysJhService.importGysJh(list, updateSupport, "zhangsan");
return AjaxResult.success(message);
} }
/** /**
* 修改供应计划 * 修改供应计划
*/ */
@PreAuthorize("@ss.hasPermi('query:jh:edit')") @PreAuthorize("@ss.hasPermi('plan:jh:edit')")
@Log(title = "供应计划", businessType = BusinessType.UPDATE) @Log(title = "供应计划", businessType = BusinessType.UPDATE)
@PutMapping("/update") @PutMapping
public AjaxResult edit(@RequestBody GysJh gysJh) { public AjaxResult edit(@RequestBody GysJh gysJh)
{
return toAjax(gysJhService.updateGysJh(gysJh)); return toAjax(gysJhService.updateGysJh(gysJh));
} }
/** /**
* 删除供应计划 * 删除供应计划
*/ */
@PreAuthorize("@ss.hasPermi('query:jh:remove')") @PreAuthorize("@ss.hasPermi('plan:jh:remove')")
@Log(title = "供应计划", businessType = BusinessType.DELETE) @Log(title = "供应计划", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) { public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(gysJhService.deleteGysJhByIds(ids)); return toAjax(gysJhService.deleteGysJhByIds(ids));
} }
} }

View File

@@ -1,4 +1,4 @@
package com.zg.project.wisdom.login; package com.zg.project.wisdom.controller;
import com.zg.common.constant.Constants; import com.zg.common.constant.Constants;
import com.zg.framework.security.LoginBody; import com.zg.framework.security.LoginBody;

View File

@@ -0,0 +1,106 @@
package com.zg.project.wisdom.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.zg.project.wisdom.domain.dto.RkInfoBatchDTO;
import com.zg.project.wisdom.service.IGysJhService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zg.framework.aspectj.lang.annotation.Log;
import com.zg.framework.aspectj.lang.enums.BusinessType;
import com.zg.project.wisdom.domain.RkInfo;
import com.zg.project.wisdom.service.IRkInfoService;
import com.zg.framework.web.controller.BaseController;
import com.zg.framework.web.domain.AjaxResult;
import com.zg.common.utils.poi.ExcelUtil;
import com.zg.framework.web.page.TableDataInfo;
/**
* 库存单据主Controller
*
* @author zg
* @date 2025-05-28
*/
@RestController
@RequestMapping("/wisdom/stock")
public class RkInfoController extends BaseController
{
@Autowired
private IRkInfoService rkInfoService;
/**
* 查询库存单据主列表
*/
@PreAuthorize("@ss.hasPermi('wisdom:stock:list')")
@GetMapping("/list")
public TableDataInfo list(RkInfo rkInfo)
{
startPage();
List<RkInfo> list = rkInfoService.selectRkInfoList(rkInfo);
return getDataTable(list);
}
/**
* 导出库存单据主列表
*/
@PreAuthorize("@ss.hasPermi('wisdom:stock:export')")
@Log(title = "库存单据主", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, RkInfo rkInfo)
{
List<RkInfo> list = rkInfoService.selectRkInfoList(rkInfo);
ExcelUtil<RkInfo> util = new ExcelUtil<RkInfo>(RkInfo.class);
util.exportExcel(response, list, "库存单据主数据");
}
/**
* 获取库存单据主详细信息
*/
@PreAuthorize("@ss.hasPermi('wisdom:stock:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(rkInfoService.selectRkInfoById(id));
}
/**
* 新增库存单据主
*/
@PreAuthorize("@ss.hasPermi('wisdom:stock:add')")
@Log(title = "库存单据主", businessType = BusinessType.INSERT)
@PostMapping("/add")
public AjaxResult batchAdd(@RequestBody RkInfoBatchDTO dto) {
return toAjax(rkInfoService.batchInsert(dto));
}
/**
* 修改库存单据主
*/
@PreAuthorize("@ss.hasPermi('wisdom:stock:edit')")
@Log(title = "库存单据主", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody RkInfo rkInfo)
{
return toAjax(rkInfoService.updateRkInfo(rkInfo));
}
/**
* 删除库存单据主
*/
@PreAuthorize("@ss.hasPermi('wisdom:stock:remove')")
@Log(title = "库存单据主", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(rkInfoService.deleteRkInfoByIds(ids));
}
}

View File

@@ -1,4 +1,4 @@
package com.zg.project.wisdom.plan.domain; package com.zg.project.wisdom.domain;
import java.math.BigDecimal; import java.math.BigDecimal;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
@@ -10,7 +10,7 @@ import com.zg.framework.web.domain.BaseEntity;
* 供应计划对象 gys_jh * 供应计划对象 gys_jh
* *
* @author zg * @author zg
* @date 2025-05-12 * @date 2025-05-28
*/ */
public class GysJh extends BaseEntity public class GysJh extends BaseEntity
{ {
@@ -19,6 +19,10 @@ public class GysJh extends BaseEntity
/** 主键ID */ /** 主键ID */
private Long id; private Long id;
/** 序号 */
@Excel(name = "序号")
private Long indexNo;
/** 县局 */ /** 县局 */
@Excel(name = "县局") @Excel(name = "县局")
private String xj; private String xj;
@@ -75,12 +79,8 @@ public class GysJh extends BaseEntity
@Excel(name = "计量单位") @Excel(name = "计量单位")
private String dw; private String dw;
/** 备注 */ /** 0未到货1已入库 */
@Excel(name = "备注") @Excel(name = "0未到货1已入库")
private String remark;
/** 状态0正常 1停用 */
@Excel(name = "状态", readConverterExp = "0未到货1已入库")
private String status; private String status;
/** 是否删除0正常 1删除 */ /** 是否删除0正常 1删除 */
@@ -97,6 +97,16 @@ public class GysJh extends BaseEntity
return id; return id;
} }
public void setIndexNo(Long indexNo)
{
this.indexNo = indexNo;
}
public Long getIndexNo()
{
return indexNo;
}
public void setXj(String xj) public void setXj(String xj)
{ {
this.xj = xj; this.xj = xj;
@@ -237,14 +247,6 @@ public class GysJh extends BaseEntity
return dw; return dw;
} }
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public void setStatus(String status) public void setStatus(String status)
{ {
this.status = status; this.status = status;
@@ -269,6 +271,7 @@ public class GysJh extends BaseEntity
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId()) .append("id", getId())
.append("indexNo", getIndexNo())
.append("xj", getXj()) .append("xj", getXj())
.append("xmNo", getXmNo()) .append("xmNo", getXmNo())
.append("xmMs", getXmMs()) .append("xmMs", getXmMs())
@@ -283,13 +286,13 @@ public class GysJh extends BaseEntity
.append("jhQty", getJhQty()) .append("jhQty", getJhQty())
.append("htQty", getHtQty()) .append("htQty", getHtQty())
.append("dw", getDw()) .append("dw", getDw())
.append("status", getStatus())
.append("remark", getRemark()) .append("remark", getRemark())
.append("createBy", getCreateBy()) .append("createBy", getCreateBy())
.append("createTime", getCreateTime()) .append("createTime", getCreateTime())
.append("updateBy", getUpdateBy()) .append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime()) .append("updateTime", getUpdateTime())
.append("isDelete", getIsDelete()) .append("isDelete", getIsDelete())
.append("status", getStatus())
.toString(); .toString();
} }
} }

View File

@@ -0,0 +1,453 @@
package com.zg.project.wisdom.domain;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zg.framework.aspectj.lang.annotation.Excel;
import com.zg.framework.web.domain.BaseEntity;
/**
* 库存单据主对象 rk_info
*
* @author zg
* @date 2025-05-28
*/
public class RkInfo extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键ID */
private Long id;
/** 入库类型 */
// @Excel(name = "入库类型")
private String rkType;
/** 物资类型 */
// @Excel(name = "物资类型")
private String wlType;
/** 所属仓库 */
// @Excel(name = "所属仓库")
private String cangku;
/** 入库类型名称(联查显示用,导出专用) */
@Excel(name = "入库类型名称")
private String rkTypeName;
/** 物资类型名称(联查显示用,导出专用) */
@Excel(name = "物资类型名称")
private String wlTypeName;
/** 所属仓库名称(联查显示用,导出专用) */
@Excel(name = "所属仓库名称")
private String cangkuName;
/** 入库时间(用户操作入库的日期) */
@Excel(name = "入库时间", readConverterExp = "用=户操作入库的日期")
private Date rkTime;
/** 理货员 */
@Excel(name = "理货员")
private String lihuoY;
/** 是否已出库0未出库1已出库 */
@Excel(name = "是否已出库", readConverterExp = "0=已入库1已出库")
private String isChuku;
/** 县局 */
@Excel(name = "县局")
private String xj;
/** 项目号 */
@Excel(name = "项目号")
private String xmNo;
/** 项目描述 */
@Excel(name = "项目描述")
private String xmMs;
/** 物料号 */
@Excel(name = "物料号")
private String wlNo;
/** 物料描述 */
@Excel(name = "物料描述")
private String wlMs;
/** 供应商编码 */
@Excel(name = "供应商编码")
private String gysNo;
/** 供应商名称 */
@Excel(name = "供应商名称")
private String gysMc;
/** 计划交货金额 */
@Excel(name = "计划交货金额")
private BigDecimal jhAmt;
/** 合同单价 */
@Excel(name = "合同单价")
private BigDecimal htDj;
/** SAP订单编号 */
@Excel(name = "SAP订单编号")
private String sapNo;
/** 行号 */
@Excel(name = "行号")
private String xh;
/** 计划交货数量 */
@Excel(name = "计划交货数量")
private Long jhQty;
/** 合同数量 */
@Excel(name = "合同数量")
private Long htQty;
/** 计量单位 */
@Excel(name = "计量单位")
private String dw;
/** 实际入库数量 */
@Excel(name = "实际入库数量")
private Long realQty;
/** 库位码 */
@Excel(name = "库位码")
private String pcode;
/** 托盘码 */
@Excel(name = "托盘码")
private String trayCode;
/** 实物ID */
@Excel(name = "实物ID")
private String entityId;
/** 是否删除0 表示正常1 表示已删除) */
@Excel(name = "是否删除", readConverterExp = "0=,表=示正常1,表=示已删除")
private String isDelete;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setRkType(String rkType)
{
this.rkType = rkType;
}
public String getRkType()
{
return rkType;
}
public void setWlType(String wlType)
{
this.wlType = wlType;
}
public String getWlType()
{
return wlType;
}
public void setCangku(String cangku)
{
this.cangku = cangku;
}
public String getCangku()
{
return cangku;
}
public String getRkTypeName() {
return rkTypeName;
}
public void setRkTypeName(String rkTypeName) {
this.rkTypeName = rkTypeName;
}
public String getWlTypeName() {
return wlTypeName;
}
public void setWlTypeName(String wlTypeName) {
this.wlTypeName = wlTypeName;
}
public String getCangkuName() {
return cangkuName;
}
public void setCangkuName(String cangkuName) {
this.cangkuName = cangkuName;
}
public void setRkTime(Date rkTime)
{
this.rkTime = rkTime;
}
public Date getRkTime()
{
return rkTime;
}
public void setLihuoY(String lihuoY)
{
this.lihuoY = lihuoY;
}
public String getLihuoY()
{
return lihuoY;
}
public void setIsChuku(String isChuku)
{
this.isChuku = isChuku;
}
public String getIsChuku()
{
return isChuku;
}
public void setXj(String xj)
{
this.xj = xj;
}
public String getXj()
{
return xj;
}
public void setXmNo(String xmNo)
{
this.xmNo = xmNo;
}
public String getXmNo()
{
return xmNo;
}
public void setXmMs(String xmMs)
{
this.xmMs = xmMs;
}
public String getXmMs()
{
return xmMs;
}
public void setWlNo(String wlNo)
{
this.wlNo = wlNo;
}
public String getWlNo()
{
return wlNo;
}
public void setWlMs(String wlMs)
{
this.wlMs = wlMs;
}
public String getWlMs()
{
return wlMs;
}
public void setGysNo(String gysNo)
{
this.gysNo = gysNo;
}
public String getGysNo()
{
return gysNo;
}
public void setGysMc(String gysMc)
{
this.gysMc = gysMc;
}
public String getGysMc()
{
return gysMc;
}
public void setJhAmt(BigDecimal jhAmt)
{
this.jhAmt = jhAmt;
}
public BigDecimal getJhAmt()
{
return jhAmt;
}
public void setHtDj(BigDecimal htDj)
{
this.htDj = htDj;
}
public BigDecimal getHtDj()
{
return htDj;
}
public void setSapNo(String sapNo)
{
this.sapNo = sapNo;
}
public String getSapNo()
{
return sapNo;
}
public void setXh(String xh)
{
this.xh = xh;
}
public String getXh()
{
return xh;
}
public void setJhQty(Long jhQty)
{
this.jhQty = jhQty;
}
public Long getJhQty()
{
return jhQty;
}
public void setHtQty(Long htQty)
{
this.htQty = htQty;
}
public Long getHtQty()
{
return htQty;
}
public void setDw(String dw)
{
this.dw = dw;
}
public String getDw()
{
return dw;
}
public void setRealQty(Long realQty)
{
this.realQty = realQty;
}
public Long getRealQty()
{
return realQty;
}
public void setPcode(String pcode)
{
this.pcode = pcode;
}
public String getPcode()
{
return pcode;
}
public void setTrayCode(String trayCode)
{
this.trayCode = trayCode;
}
public String getTrayCode()
{
return trayCode;
}
public void setEntityId(String entityId)
{
this.entityId = entityId;
}
public String getEntityId()
{
return entityId;
}
public void setIsDelete(String isDelete)
{
this.isDelete = isDelete;
}
public String getIsDelete()
{
return isDelete;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("rkType", getRkType())
.append("wlType", getWlType())
.append("cangku", getCangku())
.append("rkTime", getRkTime())
.append("lihuoY", getLihuoY())
.append("isChuku", getIsChuku())
.append("remark", getRemark())
.append("xj", getXj())
.append("xmNo", getXmNo())
.append("xmMs", getXmMs())
.append("wlNo", getWlNo())
.append("wlMs", getWlMs())
.append("gysNo", getGysNo())
.append("gysMc", getGysMc())
.append("jhAmt", getJhAmt())
.append("htDj", getHtDj())
.append("sapNo", getSapNo())
.append("xh", getXh())
.append("jhQty", getJhQty())
.append("htQty", getHtQty())
.append("dw", getDw())
.append("realQty", getRealQty())
.append("pcode", getPcode())
.append("trayCode", getTrayCode())
.append("entityId", getEntityId())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("isDelete", getIsDelete())
.toString();
}
}

View File

@@ -0,0 +1,62 @@
package com.zg.project.wisdom.domain.dto;
import java.util.List;
public class RkInfoBatchDTO {
/** 入库类型 */
private String rkType;
/** 物资类型 */
private String wlType;
/** 理货员 */
private String lihuoY;
/** 所属仓库 */
private String cangku;
/** 入库物料列表 */
private List<RkInfoItemDTO> rkList;
// Getters and Setters
public String getRkType() {
return rkType;
}
public void setRkType(String rkType) {
this.rkType = rkType;
}
public String getWlType() {
return wlType;
}
public void setWlType(String wlType) {
this.wlType = wlType;
}
public String getLihuoY() {
return lihuoY;
}
public void setLihuoY(String lihuoY) {
this.lihuoY = lihuoY;
}
public String getCangku() {
return cangku;
}
public void setCangku(String cangku) {
this.cangku = cangku;
}
public List<RkInfoItemDTO> getRkList() {
return rkList;
}
public void setRkList(List<RkInfoItemDTO> rkList) {
this.rkList = rkList;
}
}

View File

@@ -0,0 +1,40 @@
package com.zg.project.wisdom.domain.dto;
import java.util.List;
public class RkInfoItemDTO {
/** 物料号 */
private String wlNo;
/** 项目描述 */
private String xmMs;
/** 扫码记录列表 */
private List<RkInfoScanDTO> scanList;
// Getters and Setters
public String getWlNo() {
return wlNo;
}
public void setWlNo(String wlNo) {
this.wlNo = wlNo;
}
public String getXmMs() {
return xmMs;
}
public void setXmMs(String xmMs) {
this.xmMs = xmMs;
}
public List<RkInfoScanDTO> getScanList() {
return scanList;
}
public void setScanList(List<RkInfoScanDTO> scanList) {
this.scanList = scanList;
}
}

View File

@@ -0,0 +1,60 @@
package com.zg.project.wisdom.domain.dto;
public class RkInfoScanDTO {
/** 库位码 */
private String pcode;
/** 托盘码 */
private String trayCode;
/** 实际入库数量 */
private Long realQty;
/** 实物ID */
private String entityId;
/** 备注 */
private String remark;
// Getters and Setters
public String getPcode() {
return pcode;
}
public void setPcode(String pcode) {
this.pcode = pcode;
}
public String getTrayCode() {
return trayCode;
}
public void setTrayCode(String trayCode) {
this.trayCode = trayCode;
}
public Long getRealQty() {
return realQty;
}
public void setRealQty(Long realQty) {
this.realQty = realQty;
}
public String getEntityId() {
return entityId;
}
public void setEntityId(String entityId) {
this.entityId = entityId;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
}

View File

@@ -1,13 +1,13 @@
package com.zg.project.wisdom.plan.mapper; package com.zg.project.wisdom.mapper;
import java.util.List; import java.util.List;
import com.zg.project.wisdom.plan.domain.GysJh; import com.zg.project.wisdom.domain.GysJh;
/** /**
* 供应计划Mapper接口 * 供应计划Mapper接口
* *
* @author zg * @author zg
* @date 2025-05-12 * @date 2025-05-28
*/ */
public interface GysJhMapper public interface GysJhMapper
{ {
@@ -60,10 +60,9 @@ public interface GysJhMapper
public int deleteGysJhByIds(Long[] ids); public int deleteGysJhByIds(Long[] ids);
/** /**
* 根据订单号查询是否已存在 * 根据sapNo查询
* @param sapNo * @param sapNo
* @param xh
* @return * @return
*/ */
GysJh selectExistByKey(String sapNo, String xh); List<GysJh> getBySapNo(String sapNo);
} }

View File

@@ -0,0 +1,61 @@
package com.zg.project.wisdom.mapper;
import java.util.List;
import com.zg.project.wisdom.domain.RkInfo;
/**
* 库存单据主Mapper接口
*
* @author zg
* @date 2025-05-28
*/
public interface RkInfoMapper
{
/**
* 查询库存单据主
*
* @param id 库存单据主主键
* @return 库存单据主
*/
public RkInfo selectRkInfoById(Long id);
/**
* 查询库存单据主列表
*
* @param rkInfo 库存单据主
* @return 库存单据主集合
*/
public List<RkInfo> selectRkInfoList(RkInfo rkInfo);
/**
* 修改库存单据主
*
* @param rkInfo 库存单据主
* @return 结果
*/
public int updateRkInfo(RkInfo rkInfo);
/**
* 删除库存单据主
*
* @param id 库存单据主主键
* @return 结果
*/
public int deleteRkInfoById(Long id);
/**
* 批量删除库存单据主
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteRkInfoByIds(Long[] ids);
/**
* 新增入库单据
* @param saveList
* @return
*/
int batchInsertRkInfo(List<RkInfo> saveList);
}

View File

@@ -1,14 +1,13 @@
package com.zg.project.wisdom.plan.service; package com.zg.project.wisdom.service;
import java.rmi.ServerException;
import java.util.List; import java.util.List;
import com.zg.project.wisdom.plan.domain.GysJh; import com.zg.project.wisdom.domain.GysJh;
/** /**
* 供应计划Service接口 * 供应计划Service接口
* *
* @author zg * @author zg
* @date 2025-05-12 * @date 2025-05-28
*/ */
public interface IGysJhService public interface IGysJhService
{ {
@@ -62,10 +61,16 @@ public interface IGysJhService
/** /**
* 供应计划导入 * 供应计划导入
* @param list * @param jhList
* @param updateSupport * @param operName
* @param operator
* @return * @return
*/ */
String importGysJh(List<GysJh> list, boolean updateSupport, String operator) throws ServerException; String importGysJhList(List<GysJh> jhList, String operName);
/**
* 根据sapNo查询
* @param sapNo
* @return
*/
List<GysJh> getBySapNo(String sapNo);
} }

View File

@@ -0,0 +1,62 @@
package com.zg.project.wisdom.service;
import java.util.List;
import com.zg.project.wisdom.domain.RkInfo;
import com.zg.project.wisdom.domain.dto.RkInfoBatchDTO;
/**
* 库存单据主Service接口
*
* @author zg
* @date 2025-05-28
*/
public interface IRkInfoService
{
/**
* 查询库存单据主
*
* @param id 库存单据主主键
* @return 库存单据主
*/
public RkInfo selectRkInfoById(Long id);
/**
* 查询库存单据主列表
*
* @param rkInfo 库存单据主
* @return 库存单据主集合
*/
public List<RkInfo> selectRkInfoList(RkInfo rkInfo);
/**
* 修改库存单据主
*
* @param rkInfo 库存单据主
* @return 结果
*/
public int updateRkInfo(RkInfo rkInfo);
/**
* 批量删除库存单据主
*
* @param ids 需要删除的库存单据主主键集合
* @return 结果
*/
public int deleteRkInfoByIds(Long[] ids);
/**
* 删除库存单据主信息
*
* @param id 库存单据主主键
* @return 结果
*/
public int deleteRkInfoById(Long id);
/**
* 新增入库单据
* @param dto
* @return
*/
int batchInsert(RkInfoBatchDTO dto);
}

View File

@@ -1,19 +1,20 @@
package com.zg.project.wisdom.plan.service.impl; package com.zg.project.wisdom.service.impl;
import java.rmi.ServerException;
import java.util.List; import java.util.List;
import com.zg.common.exception.ServiceException;
import com.zg.common.utils.DateUtils; import com.zg.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.zg.project.wisdom.plan.mapper.GysJhMapper; import com.zg.project.wisdom.mapper.GysJhMapper;
import com.zg.project.wisdom.plan.domain.GysJh; import com.zg.project.wisdom.domain.GysJh;
import com.zg.project.wisdom.plan.service.IGysJhService; import com.zg.project.wisdom.service.IGysJhService;
/** /**
* 供应计划Service业务层处理 * 供应计划Service业务层处理
* *
* @author zg * @author zg
* @date 2025-05-12 * @date 2025-05-28
*/ */
@Service @Service
public class GysJhServiceImpl implements IGysJhService public class GysJhServiceImpl implements IGysJhService
@@ -54,13 +55,7 @@ public class GysJhServiceImpl implements IGysJhService
@Override @Override
public int insertGysJh(GysJh gysJh) public int insertGysJh(GysJh gysJh)
{ {
if (gysJh.getStatus() == null) {
gysJh.setStatus("0");
}
gysJh.setCreateTime(DateUtils.getNowDate()); gysJh.setCreateTime(DateUtils.getNowDate());
// String operator = getUsername();
gysJh.setCreateBy("张三");
return gysJhMapper.insertGysJh(gysJh); return gysJhMapper.insertGysJh(gysJh);
} }
@@ -74,8 +69,6 @@ public class GysJhServiceImpl implements IGysJhService
public int updateGysJh(GysJh gysJh) public int updateGysJh(GysJh gysJh)
{ {
gysJh.setUpdateTime(DateUtils.getNowDate()); gysJh.setUpdateTime(DateUtils.getNowDate());
// String operator = getUsername();
gysJh.setUpdateBy("张三");
return gysJhMapper.updateGysJh(gysJh); return gysJhMapper.updateGysJh(gysJh);
} }
@@ -103,33 +96,52 @@ public class GysJhServiceImpl implements IGysJhService
return gysJhMapper.deleteGysJhById(id); return gysJhMapper.deleteGysJhById(id);
} }
/**
* 供应计划导入
* @param jhList
* @param operName
* @return
*/
@Override @Override
public String importGysJh(List<GysJh> list, boolean updateSupport, String operator) throws ServerException { public String importGysJhList(List<GysJh> jhList, String operName) {
if (jhList == null || jhList.isEmpty()) {
if (list == null || list.isEmpty()){ throw new ServiceException("导入数据不能为空!");
throw new ServerException("导入数据不能为空");
} }
int insertCount = 0 , updateCount = 0;
for (GysJh jh : list) { int successNum = 0;
if (jh.getStatus() == null) { int failureNum = 0;
StringBuilder failureMsg = new StringBuilder();
for (GysJh jh : jhList) {
try {
jh.setCreateBy(operName);
jh.setStatus("0"); jh.setStatus("0");
jh.setIsDelete("0");
insertGysJh(jh);
successNum++;
} catch (Exception e) {
failureNum++;
failureMsg.append("<br/>项目号:").append(jh.getXmNo())
.append(",物料号:").append(jh.getWlNo())
.append(" 导入失败:").append(e.getMessage());
}
} }
GysJh exist = gysJhMapper.selectExistByKey(jh.getSapNo(), jh.getXh()); if (failureNum > 0) {
failureMsg.insert(0, "导入完成,但有 " + failureNum + " 条记录失败:");
throw new ServiceException(failureMsg.toString());
}
if (exist == null){ return "导入成功,共 " + successNum + " 条数据";
jh.setCreateBy(operator); }
jh.setCreateTime(DateUtils.getNowDate());
gysJhMapper.insertGysJh(jh); /**
insertCount++; * 根据SAP编号查询
}else if (updateSupport){ * @param sapNo
jh.setId(exist.getId()); * @return
jh.setUpdateBy(operator); */
jh.setUpdateTime(DateUtils.getNowDate()); @Override
gysJhMapper.updateGysJh(jh); public List<GysJh> getBySapNo(String sapNo) {
updateCount++; return gysJhMapper.getBySapNo(sapNo);
}
}
return String.format("导入成功:新增 %d 条,更新 %d 条。", insertCount, updateCount);
} }
} }

View File

@@ -0,0 +1,144 @@
package com.zg.project.wisdom.service.impl;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import com.zg.common.utils.DateUtils;
import com.zg.common.utils.SecurityUtils;
import com.zg.project.wisdom.domain.GysJh;
import com.zg.project.wisdom.domain.dto.RkInfoBatchDTO;
import com.zg.project.wisdom.domain.dto.RkInfoItemDTO;
import com.zg.project.wisdom.domain.dto.RkInfoScanDTO;
import com.zg.project.wisdom.service.IGysJhService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zg.project.wisdom.mapper.RkInfoMapper;
import com.zg.project.wisdom.domain.RkInfo;
import com.zg.project.wisdom.service.IRkInfoService;
/**
* 库存单据主Service业务层处理
*
* @author zg
* @date 2025-05-28
*/
@Service
public class RkInfoServiceImpl implements IRkInfoService
{
@Autowired
private IGysJhService gysJhService;
@Autowired
private RkInfoMapper rkInfoMapper;
/**
* 查询库存单据主
*
* @param id 库存单据主主键
* @return 库存单据主
*/
@Override
public RkInfo selectRkInfoById(Long id)
{
return rkInfoMapper.selectRkInfoById(id);
}
/**
* 查询库存单据主列表
*
* @param rkInfo 库存单据主
* @return 库存单据主
*/
@Override
public List<RkInfo> selectRkInfoList(RkInfo rkInfo)
{
return rkInfoMapper.selectRkInfoList(rkInfo);
}
/**
* 修改库存单据主
*
* @param rkInfo 库存单据主
* @return 结果
*/
@Override
public int updateRkInfo(RkInfo rkInfo)
{
rkInfo.setUpdateTime(DateUtils.getNowDate());
return rkInfoMapper.updateRkInfo(rkInfo);
}
/**
* 批量删除库存单据主
*
* @param ids 需要删除的库存单据主主键
* @return 结果
*/
@Override
public int deleteRkInfoByIds(Long[] ids)
{
return rkInfoMapper.deleteRkInfoByIds(ids);
}
/**
* 删除库存单据主信息
*
* @param id 库存单据主主键
* @return 结果
*/
@Override
public int deleteRkInfoById(Long id)
{
return rkInfoMapper.deleteRkInfoById(id);
}
/**
* 新增入库单据
* @param dto
* @return
*/
@Override
public int batchInsert(RkInfoBatchDTO dto) {
List<RkInfo> saveList = new ArrayList<>();
String username = SecurityUtils.getUsername(); // 获取当前登录用户
Date now = DateUtils.getNowDate(); // 当前时间
for (RkInfoItemDTO item : dto.getRkList()) {
for (RkInfoScanDTO scan : item.getScanList()) {
RkInfo entity = new RkInfo();
// ======= 来自最外层 DTO =======
entity.setRkType(dto.getRkType());
entity.setWlType(dto.getWlType());
entity.setCangku(dto.getCangku());
entity.setLihuoY(dto.getLihuoY());
// ======= 中层 DTO =======
entity.setWlNo(item.getWlNo());
entity.setXmMs(item.getXmMs());
// ======= 最内层 DTO =======
entity.setPcode(scan.getPcode());
entity.setTrayCode(scan.getTrayCode());
entity.setRealQty(scan.getRealQty());
entity.setEntityId(scan.getEntityId());
entity.setRemark(scan.getRemark());
// ======= 系统默认字段 =======
entity.setIsChuku("0");
entity.setIsDelete("0");
entity.setRkTime(now);
entity.setCreateBy(username);
entity.setCreateTime(now);
saveList.add(entity);
}
}
// 批量插入到数据库
return rkInfoMapper.batchInsertRkInfo(saveList);
}
}

View File

@@ -7,7 +7,7 @@ spring:
# 主库数据源 # 主库数据源
master: master:
# url: jdbc:mysql://192.168.1.20:3306/wisdom?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 # url: jdbc:mysql://192.168.1.20:3306/wisdom?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
url: jdbc:mysql://localhost:3306/pdxt?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 url: jdbc:mysql://localhost:3306/wisdom?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root username: root
password: shzg password: shzg
# 从库数据源 # 从库数据源

View File

@@ -68,8 +68,8 @@ spring:
# redis 配置 # redis 配置
redis: redis:
# 地址 # 地址
# host: 192.168.1.20 host: 192.168.1.20
host: localhost # host: localhost
# 端口默认为6379 # 端口默认为6379
port: 6379 port: 6379
# 数据库索引 # 数据库索引

View File

@@ -2,7 +2,7 @@
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zg.project.Information.mapper.DeviceInfoMapper"> <mapper namespace="com.zg.project.information.mapper.DeviceInfoMapper">
<resultMap type="DeviceInfo" id="DeviceInfoResult"> <resultMap type="DeviceInfo" id="DeviceInfoResult">
<result property="deviceId" column="device_id" /> <result property="deviceId" column="device_id" />

View File

@@ -0,0 +1,85 @@
<?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.zg.project.information.mapper.MaterialTypeMapper">
<resultMap type="MaterialType" id="MaterialTypeResult">
<result property="id" column="id" />
<result property="typeCode" column="type_code" />
<result property="typeName" column="type_name" />
<result property="status" column="status" />
<result property="sort" column="sort" />
<result property="remark" column="remark" />
<result property="createdAt" column="created_at" />
<result property="updatedAt" column="updated_at" />
</resultMap>
<sql id="selectMaterialTypeVo">
select id, type_code, type_name, status, sort, remark, created_at, updated_at from material_type
</sql>
<select id="selectMaterialTypeList" parameterType="MaterialType" resultMap="MaterialTypeResult">
<include refid="selectMaterialTypeVo"/>
<where>
<if test="typeCode != null and typeCode != ''"> and type_code = #{typeCode}</if>
<if test="typeName != null and typeName != ''"> and type_name like concat('%', #{typeName}, '%')</if>
<if test="status != null "> and status = #{status}</if>
<if test="sort != null "> and sort = #{sort}</if>
<if test="createdAt != null "> and created_at = #{createdAt}</if>
<if test="updatedAt != null "> and updated_at = #{updatedAt}</if>
</where>
</select>
<select id="selectMaterialTypeById" parameterType="Long" resultMap="MaterialTypeResult">
<include refid="selectMaterialTypeVo"/>
where id = #{id}
</select>
<insert id="insertMaterialType" parameterType="MaterialType" useGeneratedKeys="true" keyProperty="id">
insert into material_type
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="typeCode != null and typeCode != ''">type_code,</if>
<if test="typeName != null and typeName != ''">type_name,</if>
<if test="status != null">status,</if>
<if test="sort != null">sort,</if>
<if test="remark != null">remark,</if>
<if test="createdAt != null">created_at,</if>
<if test="updatedAt != null">updated_at,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="typeCode != null and typeCode != ''">#{typeCode},</if>
<if test="typeName != null and typeName != ''">#{typeName},</if>
<if test="status != null">#{status},</if>
<if test="sort != null">#{sort},</if>
<if test="remark != null">#{remark},</if>
<if test="createdAt != null">#{createdAt},</if>
<if test="updatedAt != null">#{updatedAt},</if>
</trim>
</insert>
<update id="updateMaterialType" parameterType="MaterialType">
update material_type
<trim prefix="SET" suffixOverrides=",">
<if test="typeCode != null and typeCode != ''">type_code = #{typeCode},</if>
<if test="typeName != null and typeName != ''">type_name = #{typeName},</if>
<if test="status != null">status = #{status},</if>
<if test="sort != null">sort = #{sort},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createdAt != null">created_at = #{createdAt},</if>
<if test="updatedAt != null">updated_at = #{updatedAt},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteMaterialTypeById" parameterType="Long">
delete from material_type where id = #{id}
</delete>
<delete id="deleteMaterialTypeByIds" parameterType="String">
delete from material_type where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,118 @@
<?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.zg.project.information.mapper.PcdeDetailMapper">
<resultMap type="PcdeDetail" id="PcdeDetailResult">
<result property="id" column="id" />
<result property="locationCode" column="location_code" />
<result property="scene" column="scene" />
<result property="sceneName" column="scene_name" />
<result property="warehouse" column="warehouse" />
<result property="encodedId" column="encoded_id" />
<result property="tag" column="tag" />
<result property="remark" column="remark"/>
<result property="isDelete" column="is_delete" />
<result property="createdBy" column="created_by" />
<result property="createdAt" column="created_at" />
<result property="updatedBy" column="updated_by" />
<result property="updatedAt" column="updated_at" />
</resultMap>
<sql id="selectPcdeDetailVo">
select d.id, d.location_code, d.scene, m.scene_name, d.warehouse,
d.encoded_id, d.tag, d.remark, d.is_delete,
d.created_by, d.created_at, d.updated_by, d.updated_at
from pcde_detail d
left join scene_mapping m on d.scene = m.scene_code
</sql>
<select id="selectPcdeDetailList" parameterType="PcdeDetail" resultMap="PcdeDetailResult">
<include refid="selectPcdeDetailVo"/>
<where>
<if test="locationCode != null and locationCode != ''"> and d.location_code = #{locationCode}</if>
<if test="scene != null and scene != ''"> and d.scene = #{scene}</if>
<if test="warehouse != null and warehouse != ''"> and d.warehouse = #{warehouse}</if>
<if test="encodedId != null and encodedId != ''"> and d.encoded_id = #{encodedId}</if>
<if test="tag != null and tag != ''"> and d.tag = #{tag}</if>
<if test="isDelete != null "> and d.is_delete = #{isDelete}</if>
<if test="createdBy != null and createdBy != ''"> and d.created_by = #{createdBy}</if>
<if test="createdAt != null "> and d.created_at = #{createdAt}</if>
<if test="updatedBy != null and updatedBy != ''"> and d.updated_by = #{updatedBy}</if>
<if test="updatedAt != null "> and d.updated_at = #{updatedAt}</if>
</where>
</select>
<select id="selectPcdeDetailById" parameterType="Long" resultMap="PcdeDetailResult">
<include refid="selectPcdeDetailVo"/>
where d.id = #{id}
</select>
<select id="selectByLocationCode" resultType="com.zg.project.information.domain.PcdeDetail"
parameterType="java.lang.String">
select id, location_code, scene, warehouse, encoded_id, tag, is_delete,
created_by, created_at, updated_by, updated_at, remark
from pcde_detail
where location_code = #{locationCode}
</select>
<insert id="insertPcdeDetail" parameterType="PcdeDetail" useGeneratedKeys="true" keyProperty="id">
insert into pcde_detail
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="locationCode != null and locationCode != ''">location_code,</if>
<if test="scene != null and scene != ''">scene,</if>
<if test="warehouse != null and warehouse != ''">warehouse,</if>
<if test="encodedId != null">encoded_id,</if>
<if test="tag != null">tag,</if>
<if test="remark != null and remark != ''">remark,</if>
<if test="isDelete != null">is_delete,</if>
<if test="createdBy != null">created_by,</if>
<if test="createdAt != null">created_at,</if>
<if test="updatedBy != null">updated_by,</if>
<if test="updatedAt != null">updated_at,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="locationCode != null and locationCode != ''">#{locationCode},</if>
<if test="scene != null and scene != ''">#{scene},</if>
<if test="warehouse != null and warehouse != ''">#{warehouse},</if>
<if test="encodedId != null">#{encodedId},</if>
<if test="tag != null">#{tag},</if>
<if test="remark != null and remark != ''">#{remark},</if>
<if test="isDelete != null">#{isDelete},</if>
<if test="createdBy != null">#{createdBy},</if>
<if test="createdAt != null">#{createdAt},</if>
<if test="updatedBy != null">#{updatedBy},</if>
<if test="updatedAt != null">#{updatedAt},</if>
</trim>
</insert>
<update id="updatePcdeDetail" parameterType="PcdeDetail">
update pcde_detail
<trim prefix="SET" suffixOverrides=",">
<if test="locationCode != null and locationCode != ''">location_code = #{locationCode},</if>
<if test="scene != null and scene != ''">scene = #{scene},</if>
<if test="warehouse != null and warehouse != ''">warehouse = #{warehouse},</if>
<if test="encodedId != null">encoded_id = #{encodedId},</if>
<if test="tag != null">tag = #{tag},</if>
<if test="remark != null and remark != ''">remark = #{remark},</if>
<if test="isDelete != null">is_delete = #{isDelete},</if>
<if test="createdBy != null">created_by = #{createdBy},</if>
<if test="createdAt != null">created_at = #{createdAt},</if>
<if test="updatedBy != null">updated_by = #{updatedBy},</if>
<if test="updatedAt != null">updated_at = #{updatedAt},</if>
</trim>
where id = #{id}
</update>
<delete id="deletePcdeDetailById" parameterType="Long">
delete from pcde_detail where id = #{id}
</delete>
<delete id="deletePcdeDetailByIds" parameterType="String">
delete from pcde_detail where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -2,7 +2,7 @@
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zg.project.Information.mapper.SceneMappingMapper"> <mapper namespace="com.zg.project.information.mapper.SceneMappingMapper">
<resultMap type="SceneMapping" id="SceneMappingResult"> <resultMap type="SceneMapping" id="SceneMappingResult">
<result property="id" column="id" /> <result property="id" column="id" />

View File

@@ -0,0 +1,85 @@
<?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.zg.project.information.mapper.StockInTypeMapper">
<resultMap type="StockInType" id="StockInTypeResult">
<result property="id" column="id" />
<result property="typeCode" column="type_code" />
<result property="typeName" column="type_name" />
<result property="status" column="status" />
<result property="sort" column="sort" />
<result property="remark" column="remark" />
<result property="createdAt" column="created_at" />
<result property="updatedAt" column="updated_at" />
</resultMap>
<sql id="selectStockInTypeVo">
select id, type_code, type_name, status, sort, remark, created_at, updated_at from stock_in_type
</sql>
<select id="selectStockInTypeList" parameterType="StockInType" resultMap="StockInTypeResult">
<include refid="selectStockInTypeVo"/>
<where>
<if test="typeCode != null and typeCode != ''"> and type_code = #{typeCode}</if>
<if test="typeName != null and typeName != ''"> and type_name like concat('%', #{typeName}, '%')</if>
<if test="status != null "> and status = #{status}</if>
<if test="sort != null "> and sort = #{sort}</if>
<if test="createdAt != null "> and created_at = #{createdAt}</if>
<if test="updatedAt != null "> and updated_at = #{updatedAt}</if>
</where>
</select>
<select id="selectStockInTypeById" parameterType="Long" resultMap="StockInTypeResult">
<include refid="selectStockInTypeVo"/>
where id = #{id}
</select>
<insert id="insertStockInType" parameterType="StockInType" useGeneratedKeys="true" keyProperty="id">
insert into stock_in_type
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="typeCode != null and typeCode != ''">type_code,</if>
<if test="typeName != null and typeName != ''">type_name,</if>
<if test="status != null">status,</if>
<if test="sort != null">sort,</if>
<if test="remark != null">remark,</if>
<if test="createdAt != null">created_at,</if>
<if test="updatedAt != null">updated_at,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="typeCode != null and typeCode != ''">#{typeCode},</if>
<if test="typeName != null and typeName != ''">#{typeName},</if>
<if test="status != null">#{status},</if>
<if test="sort != null">#{sort},</if>
<if test="remark != null">#{remark},</if>
<if test="createdAt != null">#{createdAt},</if>
<if test="updatedAt != null">#{updatedAt},</if>
</trim>
</insert>
<update id="updateStockInType" parameterType="StockInType">
update stock_in_type
<trim prefix="SET" suffixOverrides=",">
<if test="typeCode != null and typeCode != ''">type_code = #{typeCode},</if>
<if test="typeName != null and typeName != ''">type_name = #{typeName},</if>
<if test="status != null">status = #{status},</if>
<if test="sort != null">sort = #{sort},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createdAt != null">created_at = #{createdAt},</if>
<if test="updatedAt != null">updated_at = #{updatedAt},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteStockInTypeById" parameterType="Long">
delete from stock_in_type where id = #{id}
</delete>
<delete id="deleteStockInTypeByIds" parameterType="String">
delete from stock_in_type where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,90 @@
<?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.zg.project.information.mapper.WarehouseInfoMapper">
<resultMap type="WarehouseInfo" id="WarehouseInfoResult">
<result property="id" column="id" />
<result property="warehouseCode" column="warehouse_code" />
<result property="warehouseName" column="warehouse_name" />
<result property="address" column="address" />
<result property="status" column="status" />
<result property="sort" column="sort" />
<result property="remark" column="remark" />
<result property="createdAt" column="created_at" />
<result property="updatedAt" column="updated_at" />
</resultMap>
<sql id="selectWarehouseInfoVo">
select id, warehouse_code, warehouse_name, address, status, sort, remark, created_at, updated_at from warehouse_info
</sql>
<select id="selectWarehouseInfoList" parameterType="WarehouseInfo" resultMap="WarehouseInfoResult">
<include refid="selectWarehouseInfoVo"/>
<where>
<if test="warehouseCode != null and warehouseCode != ''"> and warehouse_code = #{warehouseCode}</if>
<if test="warehouseName != null and warehouseName != ''"> and warehouse_name like concat('%', #{warehouseName}, '%')</if>
<if test="address != null and address != ''"> and address = #{address}</if>
<if test="status != null "> and status = #{status}</if>
<if test="sort != null "> and sort = #{sort}</if>
<if test="createdAt != null "> and created_at = #{createdAt}</if>
<if test="updatedAt != null "> and updated_at = #{updatedAt}</if>
</where>
</select>
<select id="selectWarehouseInfoById" parameterType="Long" resultMap="WarehouseInfoResult">
<include refid="selectWarehouseInfoVo"/>
where id = #{id}
</select>
<insert id="insertWarehouseInfo" parameterType="WarehouseInfo" useGeneratedKeys="true" keyProperty="id">
insert into warehouse_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="warehouseCode != null and warehouseCode != ''">warehouse_code,</if>
<if test="warehouseName != null and warehouseName != ''">warehouse_name,</if>
<if test="address != null">address,</if>
<if test="status != null">status,</if>
<if test="sort != null">sort,</if>
<if test="remark != null">remark,</if>
<if test="createdAt != null">created_at,</if>
<if test="updatedAt != null">updated_at,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="warehouseCode != null and warehouseCode != ''">#{warehouseCode},</if>
<if test="warehouseName != null and warehouseName != ''">#{warehouseName},</if>
<if test="address != null">#{address},</if>
<if test="status != null">#{status},</if>
<if test="sort != null">#{sort},</if>
<if test="remark != null">#{remark},</if>
<if test="createdAt != null">#{createdAt},</if>
<if test="updatedAt != null">#{updatedAt},</if>
</trim>
</insert>
<update id="updateWarehouseInfo" parameterType="WarehouseInfo">
update warehouse_info
<trim prefix="SET" suffixOverrides=",">
<if test="warehouseCode != null and warehouseCode != ''">warehouse_code = #{warehouseCode},</if>
<if test="warehouseName != null and warehouseName != ''">warehouse_name = #{warehouseName},</if>
<if test="address != null">address = #{address},</if>
<if test="status != null">status = #{status},</if>
<if test="sort != null">sort = #{sort},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createdAt != null">created_at = #{createdAt},</if>
<if test="updatedAt != null">updated_at = #{updatedAt},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteWarehouseInfoById" parameterType="Long">
delete from warehouse_info where id = #{id}
</delete>
<delete id="deleteWarehouseInfoByIds" parameterType="String">
delete from warehouse_info where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -142,6 +142,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select user_id, email from sys_user where email = #{email} and del_flag = '0' limit 1 select user_id, email from sys_user where email = #{email} and del_flag = '0' limit 1
</select> </select>
<select id="getAll" resultType="com.zg.project.system.domain.SysUser">
select
user_id as userId,
dept_id as deptId,
user_name as userName,
nick_name as nickName,
email,
phonenumber,
sex,
avatar,
password,
status,
del_flag as delFlag,
login_ip as loginIp,
login_date as loginDate,
create_by as createBy,
create_time as createTime,
update_by as updateBy,
update_time as updateTime,
remark
from sys_user
where del_flag = '0'
</select>
<insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId"> <insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
insert into sys_user( insert into sys_user(
<if test="userId != null and userId != 0">user_id,</if> <if test="userId != null and userId != 0">user_id,</if>

View File

@@ -2,10 +2,11 @@
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zg.project.wisdom.plan.mapper.GysJhMapper"> <mapper namespace="com.zg.project.wisdom.mapper.GysJhMapper">
<resultMap type="GysJh" id="GysJhResult"> <resultMap type="GysJh" id="GysJhResult">
<result property="id" column="id" /> <result property="id" column="id" />
<result property="indexNo" column="index_no" />
<result property="xj" column="xj" /> <result property="xj" column="xj" />
<result property="xmNo" column="xm_no" /> <result property="xmNo" column="xm_no" />
<result property="xmMs" column="xm_ms" /> <result property="xmMs" column="xm_ms" />
@@ -20,6 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="jhQty" column="jh_qty" /> <result property="jhQty" column="jh_qty" />
<result property="htQty" column="ht_qty" /> <result property="htQty" column="ht_qty" />
<result property="dw" column="dw" /> <result property="dw" column="dw" />
<result property="status" column="status" />
<result property="remark" column="remark" /> <result property="remark" column="remark" />
<result property="createBy" column="create_by" /> <result property="createBy" column="create_by" />
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time" />
@@ -29,42 +31,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectGysJhVo"> <sql id="selectGysJhVo">
select id, xj, xm_no, xm_ms, wl_no, wl_ms, gys_no, gys_mc, jh_amt, ht_dj, sap_no, xh, jh_qty, ht_qty, dw, remark, create_by, create_time, update_by, update_time, is_delete from gys_jh select id, index_no, xj, xm_no, xm_ms, wl_no, wl_ms, gys_no, gys_mc, jh_amt, ht_dj, sap_no, xh, jh_qty, ht_qty, dw, status, remark, create_by, create_time, update_by, update_time, is_delete from gys_jh
</sql> </sql>
<select id="selectGysJhList" parameterType="GysJh" resultMap="GysJhResult"> <select id="selectGysJhList" parameterType="GysJh" resultMap="GysJhResult">
<include refid="selectGysJhVo"/> <include refid="selectGysJhVo"/>
<where> <where>
<if test="xj != null and xj != ''"> and xj = #{xj}</if> <if test="xmNo != null and xmNo != ''"> and xm_no like concat('%', #{xmNo}, '%')</if>
<if test="xmNo != null and xmNo != ''"> and xm_no = #{xmNo}</if> <if test="wlNo != null and wlNo != ''"> and wl_no like concat('%', #{wlNo}, '%')</if>
<if test="xmMs != null and xmMs != ''"> and xm_ms = #{xmMs}</if> <if test="gysMc != null and gysMc != ''"> and gys_mc like concat('%', #{gysMc}, '%')</if>
<if test="wlNo != null and wlNo != ''"> and wl_no = #{wlNo}</if> <if test="sapNo != null and sapNo != ''"> and sap_no like concat('%', #{sapNo}, '%')</if>
<if test="wlMs != null and wlMs != ''"> and wl_ms = #{wlMs}</if> <if test="status != null and status != ''"> and status = #{status}</if>
<if test="gysNo != null and gysNo != ''"> and gys_no = #{gysNo}</if> <if test="isDelete != null and isDelete != ''"> and is_delete = #{isDelete}</if>
<if test="gysMc != null and gysMc != ''"> and gys_mc = #{gysMc}</if>
<if test="jhAmt != null "> and jh_amt = #{jhAmt}</if>
<if test="htDj != null "> and ht_dj = #{htDj}</if>
<if test="sapNo != null and sapNo != ''"> and sap_no = #{sapNo}</if>
<if test="xh != null and xh != ''"> and xh = #{xh}</if>
<if test="jhQty != null "> and jh_qty = #{jhQty}</if>
<if test="htQty != null "> and ht_qty = #{htQty}</if>
<if test="dw != null and dw != ''"> and dw = #{dw}</if>
<choose>
<when test="isDelete != null and isDelete != ''">
and is_delete = #{isDelete}
</when>
<otherwise>
and is_delete = '0'
</otherwise>
</choose>
</where> </where>
<!-- 排序逻辑 -->
ORDER BY
CASE
WHEN update_time IS NOT NULL THEN update_time
ELSE create_time
END DESC
</select> </select>
<select id="selectGysJhById" parameterType="Long" resultMap="GysJhResult"> <select id="selectGysJhById" parameterType="Long" resultMap="GysJhResult">
@@ -72,13 +51,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id} where id = #{id}
</select> </select>
<select id="selectExistByKey" resultType="com.zg.project.wisdom.plan.domain.GysJh"> <select id="getBySapNo" parameterType="java.lang.String" resultMap="GysJhResult">
select * from gys_jh where sap_no = #{sapNo} and xh = #{xh} <include refid="selectGysJhVo"/>
WHERE sap_no = #{sapNo}
</select> </select>
<insert id="insertGysJh" parameterType="GysJh" useGeneratedKeys="true" keyProperty="id"> <insert id="insertGysJh" parameterType="GysJh" useGeneratedKeys="true" keyProperty="id">
insert into gys_jh insert into gys_jh
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="indexNo != null">index_no,</if>
<if test="xj != null">xj,</if> <if test="xj != null">xj,</if>
<if test="xmNo != null">xm_no,</if> <if test="xmNo != null">xm_no,</if>
<if test="xmMs != null">xm_ms,</if> <if test="xmMs != null">xm_ms,</if>
@@ -93,6 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="jhQty != null">jh_qty,</if> <if test="jhQty != null">jh_qty,</if>
<if test="htQty != null">ht_qty,</if> <if test="htQty != null">ht_qty,</if>
<if test="dw != null">dw,</if> <if test="dw != null">dw,</if>
<if test="status != null">status,</if>
<if test="remark != null">remark,</if> <if test="remark != null">remark,</if>
<if test="createBy != null">create_by,</if> <if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
@@ -101,6 +83,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="isDelete != null">is_delete,</if> <if test="isDelete != null">is_delete,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="indexNo != null">#{indexNo},</if>
<if test="xj != null">#{xj},</if> <if test="xj != null">#{xj},</if>
<if test="xmNo != null">#{xmNo},</if> <if test="xmNo != null">#{xmNo},</if>
<if test="xmMs != null">#{xmMs},</if> <if test="xmMs != null">#{xmMs},</if>
@@ -115,6 +98,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="jhQty != null">#{jhQty},</if> <if test="jhQty != null">#{jhQty},</if>
<if test="htQty != null">#{htQty},</if> <if test="htQty != null">#{htQty},</if>
<if test="dw != null">#{dw},</if> <if test="dw != null">#{dw},</if>
<if test="status != null">#{status},</if>
<if test="remark != null">#{remark},</if> <if test="remark != null">#{remark},</if>
<if test="createBy != null">#{createBy},</if> <if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
@@ -127,6 +111,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="updateGysJh" parameterType="GysJh"> <update id="updateGysJh" parameterType="GysJh">
update gys_jh update gys_jh
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="indexNo != null">index_no = #{indexNo},</if>
<if test="xj != null">xj = #{xj},</if> <if test="xj != null">xj = #{xj},</if>
<if test="xmNo != null">xm_no = #{xmNo},</if> <if test="xmNo != null">xm_no = #{xmNo},</if>
<if test="xmMs != null">xm_ms = #{xmMs},</if> <if test="xmMs != null">xm_ms = #{xmMs},</if>
@@ -141,6 +126,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="jhQty != null">jh_qty = #{jhQty},</if> <if test="jhQty != null">jh_qty = #{jhQty},</if>
<if test="htQty != null">ht_qty = #{htQty},</if> <if test="htQty != null">ht_qty = #{htQty},</if>
<if test="dw != null">dw = #{dw},</if> <if test="dw != null">dw = #{dw},</if>
<if test="status != null">status = #{status},</if>
<if test="remark != null">remark = #{remark},</if> <if test="remark != null">remark = #{remark},</if>
<if test="createBy != null">create_by = #{createBy},</if> <if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if> <if test="createTime != null">create_time = #{createTime},</if>
@@ -156,9 +142,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete> </delete>
<delete id="deleteGysJhByIds" parameterType="String"> <delete id="deleteGysJhByIds" parameterType="String">
update gys_jh delete from gys_jh where id in
set is_delete = '1'
where id in
<foreach item="id" collection="array" open="(" separator="," close=")"> <foreach item="id" collection="array" open="(" separator="," close=")">
#{id} #{id}
</foreach> </foreach>

View File

@@ -0,0 +1,172 @@
<?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.zg.project.wisdom.mapper.RkInfoMapper">
<resultMap type="RkInfo" id="RkInfoResult">
<result property="id" column="id" />
<result property="rkType" column="rk_type" />
<result property="wlType" column="wl_type" />
<result property="cangku" column="cangku" />
<result property="rkTime" column="rk_time" />
<result property="lihuoY" column="lihuo_y" />
<result property="isChuku" column="is_chuku" />
<result property="rkTypeName" column="rk_type_name"/>
<result property="wlTypeName" column="wl_type_name"/>
<result property="cangkuName" column="cangku_name"/>
<result property="remark" column="remark" />
<result property="xj" column="xj" />
<result property="xmNo" column="xm_no" />
<result property="xmMs" column="xm_ms" />
<result property="wlNo" column="wl_no" />
<result property="wlMs" column="wl_ms" />
<result property="gysNo" column="gys_no" />
<result property="gysMc" column="gys_mc" />
<result property="jhAmt" column="jh_amt" />
<result property="htDj" column="ht_dj" />
<result property="sapNo" column="sap_no" />
<result property="xh" column="xh" />
<result property="jhQty" column="jh_qty" />
<result property="htQty" column="ht_qty" />
<result property="dw" column="dw" />
<result property="realQty" column="real_qty" />
<result property="pcode" column="pcode" />
<result property="trayCode" column="tray_code" />
<result property="entityId" column="entity_id" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="isDelete" column="is_delete" />
</resultMap>
<sql id="selectRkInfoVo">
SELECT
ri.id,
ri.rk_type, st.type_name AS rk_type_name,
ri.wl_type, mt.type_name AS wl_type_name,
ri.cangku, wh.warehouse_name AS cangku_name,
ri.rk_time, ri.lihuo_y, ri.is_chuku, ri.remark,
ri.xj, ri.xm_no, ri.xm_ms, ri.wl_no, ri.wl_ms,
ri.gys_no, ri.gys_mc, ri.jh_amt, ri.ht_dj, ri.sap_no, ri.xh,
ri.jh_qty, ri.ht_qty, ri.dw, ri.real_qty,
ri.pcode, ri.tray_code, ri.entity_id,
ri.create_by, ri.create_time, ri.update_by, ri.update_time, ri.is_delete
FROM rk_info ri
LEFT JOIN stock_in_type st ON ri.rk_type = st.type_code
LEFT JOIN material_type mt ON ri.wl_type = mt.type_code
LEFT JOIN warehouse_info wh ON ri.cangku = wh.warehouse_code
</sql>
<insert id="batchInsertRkInfo" parameterType="java.util.List">
insert into rk_info (
rk_type, wl_type, cangku, lihuo_y, rk_time,
wl_no, xm_ms, pcode, tray_code, real_qty, entity_id,
remark, is_chuku, is_delete, create_by, create_time
)
values
<foreach collection="list" item="item" separator=",">
(
#{item.rkType}, #{item.wlType}, #{item.cangku}, #{item.lihuoY}, #{item.rkTime},
#{item.wlNo}, #{item.xmMs}, #{item.pcode}, #{item.trayCode}, #{item.realQty}, #{item.entityId},
#{item.remark}, #{item.isChuku}, #{item.isDelete}, #{item.createBy}, #{item.createTime}
)
</foreach>
</insert>
<select id="selectRkInfoList" parameterType="RkInfo" resultMap="RkInfoResult">
<include refid="selectRkInfoVo"/>
<where>
<if test="rkType != null and rkType != ''"> and rk_type = #{rkType}</if>
<if test="wlType != null and wlType != ''"> and wl_type = #{wlType}</if>
<if test="cangku != null and cangku != ''"> and cangku = #{cangku}</if>
<if test="rkTime != null "> and rk_time = #{rkTime}</if>
<if test="lihuoY != null and lihuoY != ''"> and lihuo_y = #{lihuoY}</if>
<if test="isChuku != null and isChuku != ''"> and is_chuku = #{isChuku}</if>
<if test="xj != null and xj != ''"> and xj = #{xj}</if>
<if test="xmNo != null and xmNo != ''"> and xm_no = #{xmNo}</if>
<if test="xmMs != null and xmMs != ''"> and xm_ms = #{xmMs}</if>
<if test="wlNo != null and wlNo != ''"> and wl_no = #{wlNo}</if>
<if test="wlMs != null and wlMs != ''"> and wl_ms = #{wlMs}</if>
<if test="gysNo != null and gysNo != ''"> and gys_no = #{gysNo}</if>
<if test="gysMc != null and gysMc != ''"> and gys_mc = #{gysMc}</if>
<if test="jhAmt != null "> and jh_amt = #{jhAmt}</if>
<if test="htDj != null "> and ht_dj = #{htDj}</if>
<if test="sapNo != null and sapNo != ''"> and sap_no = #{sapNo}</if>
<if test="xh != null and xh != ''"> and xh = #{xh}</if>
<if test="jhQty != null "> and jh_qty = #{jhQty}</if>
<if test="htQty != null "> and ht_qty = #{htQty}</if>
<if test="dw != null and dw != ''"> and dw = #{dw}</if>
<if test="realQty != null "> and real_qty = #{realQty}</if>
<if test="pcode != null and pcode != ''"> and pcode = #{pcode}</if>
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
<if test="entityId != null and entityId != ''"> and entity_id = #{entityId}</if>
<if test="isDelete != null and isDelete != ''">
and is_delete = #{isDelete}
</if>
<if test="isDelete == null or isDelete == ''">
and is_delete = 0
</if>
</where>
</select>
<select id="selectRkInfoById" parameterType="Long" resultMap="RkInfoResult">
<include refid="selectRkInfoVo"/>
where id = #{id} and is_delete = 0
</select>
<update id="updateRkInfo" parameterType="RkInfo">
update rk_info
<trim prefix="SET" suffixOverrides=",">
<if test="rkType != null">rk_type = #{rkType},</if>
<if test="wlType != null">wl_type = #{wlType},</if>
<if test="cangku != null">cangku = #{cangku},</if>
<if test="rkTime != null">rk_time = #{rkTime},</if>
<if test="lihuoY != null">lihuo_y = #{lihuoY},</if>
<if test="isChuku != null">is_chuku = #{isChuku},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="xj != null">xj = #{xj},</if>
<if test="xmNo != null">xm_no = #{xmNo},</if>
<if test="xmMs != null">xm_ms = #{xmMs},</if>
<if test="wlNo != null">wl_no = #{wlNo},</if>
<if test="wlMs != null">wl_ms = #{wlMs},</if>
<if test="gysNo != null">gys_no = #{gysNo},</if>
<if test="gysMc != null">gys_mc = #{gysMc},</if>
<if test="jhAmt != null">jh_amt = #{jhAmt},</if>
<if test="htDj != null">ht_dj = #{htDj},</if>
<if test="sapNo != null">sap_no = #{sapNo},</if>
<if test="xh != null">xh = #{xh},</if>
<if test="jhQty != null">jh_qty = #{jhQty},</if>
<if test="htQty != null">ht_qty = #{htQty},</if>
<if test="dw != null">dw = #{dw},</if>
<if test="realQty != null">real_qty = #{realQty},</if>
<if test="pcode != null">pcode = #{pcode},</if>
<if test="trayCode != null">tray_code = #{trayCode},</if>
<if test="entityId != null">entity_id = #{entityId},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="isDelete != null">is_delete = #{isDelete},</if>
</trim>
where id = #{id}
</update>
<update id="deleteRkInfoById" parameterType="Long">
update rk_info
set is_delete = 1
where id = #{id}
</update>
<update id="deleteRkInfoByIds" parameterType="String">
update rk_info
set is_delete = 1
where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</update>
</mapper>