feat:货物绑定和查询
parent
c7bfefec14
commit
309e2ed1fc
@ -0,0 +1,128 @@
|
||||
package com.ruoyi.manager.controller;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.manager.domain.RecordBasketCheckContent;
|
||||
import com.ruoyi.manager.service.IRecordBasketCheckContentService;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 资产盘点内容Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-04-07
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/manager/basketCheckContent")
|
||||
public class RecordBasketCheckContentController extends BaseController
|
||||
{
|
||||
private String prefix = "manager/basketCheckContent";
|
||||
|
||||
@Autowired
|
||||
private IRecordBasketCheckContentService recordBasketCheckContentService;
|
||||
|
||||
@RequiresPermissions("manager:basketCheckContent:view")
|
||||
@GetMapping()
|
||||
public String basketCheckContent()
|
||||
{
|
||||
return prefix + "/basketCheckContent";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询资产盘点内容列表
|
||||
*/
|
||||
@RequiresPermissions("manager:basketCheckContent:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(RecordBasketCheckContent recordBasketCheckContent)
|
||||
{
|
||||
startPage();
|
||||
List<RecordBasketCheckContent> list = recordBasketCheckContentService.selectRecordBasketCheckContentList(recordBasketCheckContent);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出资产盘点内容列表
|
||||
*/
|
||||
@RequiresPermissions("manager:basketCheckContent:export")
|
||||
@Log(title = "资产盘点内容", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(RecordBasketCheckContent recordBasketCheckContent)
|
||||
{
|
||||
List<RecordBasketCheckContent> list = recordBasketCheckContentService.selectRecordBasketCheckContentList(recordBasketCheckContent);
|
||||
ExcelUtil<RecordBasketCheckContent> util = new ExcelUtil<RecordBasketCheckContent>(RecordBasketCheckContent.class);
|
||||
return util.exportExcel(list, "资产盘点内容数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增资产盘点内容
|
||||
*/
|
||||
@RequiresPermissions("manager:basketCheckContent:add")
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存资产盘点内容
|
||||
*/
|
||||
@RequiresPermissions("manager:basketCheckContent:add")
|
||||
@Log(title = "资产盘点内容", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(RecordBasketCheckContent recordBasketCheckContent)
|
||||
{
|
||||
return toAjax(recordBasketCheckContentService.insertRecordBasketCheckContent(recordBasketCheckContent));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改资产盘点内容
|
||||
*/
|
||||
@RequiresPermissions("manager:basketCheckContent:edit")
|
||||
@GetMapping("/edit/{objId}")
|
||||
public String edit(@PathVariable("objId") Long objId, ModelMap mmap)
|
||||
{
|
||||
RecordBasketCheckContent recordBasketCheckContent = recordBasketCheckContentService.selectRecordBasketCheckContentByObjId(objId);
|
||||
mmap.put("recordBasketCheckContent", recordBasketCheckContent);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存资产盘点内容
|
||||
*/
|
||||
@RequiresPermissions("manager:basketCheckContent:edit")
|
||||
@Log(title = "资产盘点内容", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(RecordBasketCheckContent recordBasketCheckContent)
|
||||
{
|
||||
return toAjax(recordBasketCheckContentService.updateRecordBasketCheckContent(recordBasketCheckContent));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除资产盘点内容
|
||||
*/
|
||||
@RequiresPermissions("manager:basketCheckContent:remove")
|
||||
@Log(title = "资产盘点内容", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(recordBasketCheckContentService.deleteRecordBasketCheckContentByObjIds(ids));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,128 @@
|
||||
package com.ruoyi.manager.controller;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.manager.domain.RecordBasketCheckTask;
|
||||
import com.ruoyi.manager.service.IRecordBasketCheckTaskService;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 资产盘点任务列Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-04-07
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/manager/basketCheckTask")
|
||||
public class RecordBasketCheckTaskController extends BaseController
|
||||
{
|
||||
private String prefix = "manager/basketCheckTask";
|
||||
|
||||
@Autowired
|
||||
private IRecordBasketCheckTaskService recordBasketCheckTaskService;
|
||||
|
||||
@RequiresPermissions("manager:basketCheckTask:view")
|
||||
@GetMapping()
|
||||
public String basketCheckTask()
|
||||
{
|
||||
return prefix + "/basketCheckTask";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询资产盘点任务列列表
|
||||
*/
|
||||
@RequiresPermissions("manager:basketCheckTask:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(RecordBasketCheckTask recordBasketCheckTask)
|
||||
{
|
||||
startPage();
|
||||
List<RecordBasketCheckTask> list = recordBasketCheckTaskService.selectRecordBasketCheckTaskList(recordBasketCheckTask);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出资产盘点任务列列表
|
||||
*/
|
||||
@RequiresPermissions("manager:basketCheckTask:export")
|
||||
@Log(title = "资产盘点任务列", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(RecordBasketCheckTask recordBasketCheckTask)
|
||||
{
|
||||
List<RecordBasketCheckTask> list = recordBasketCheckTaskService.selectRecordBasketCheckTaskList(recordBasketCheckTask);
|
||||
ExcelUtil<RecordBasketCheckTask> util = new ExcelUtil<RecordBasketCheckTask>(RecordBasketCheckTask.class);
|
||||
return util.exportExcel(list, "资产盘点任务列数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增资产盘点任务列
|
||||
*/
|
||||
@RequiresPermissions("manager:basketCheckTask:add")
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存资产盘点任务列
|
||||
*/
|
||||
@RequiresPermissions("manager:basketCheckTask:add")
|
||||
@Log(title = "资产盘点任务列", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(RecordBasketCheckTask recordBasketCheckTask)
|
||||
{
|
||||
return toAjax(recordBasketCheckTaskService.insertRecordBasketCheckTask(recordBasketCheckTask));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改资产盘点任务列
|
||||
*/
|
||||
@RequiresPermissions("manager:basketCheckTask:edit")
|
||||
@GetMapping("/edit/{taskId}")
|
||||
public String edit(@PathVariable("taskId") Long taskId, ModelMap mmap)
|
||||
{
|
||||
RecordBasketCheckTask recordBasketCheckTask = recordBasketCheckTaskService.selectRecordBasketCheckTaskByTaskId(taskId);
|
||||
mmap.put("recordBasketCheckTask", recordBasketCheckTask);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存资产盘点任务列
|
||||
*/
|
||||
@RequiresPermissions("manager:basketCheckTask:edit")
|
||||
@Log(title = "资产盘点任务列", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(RecordBasketCheckTask recordBasketCheckTask)
|
||||
{
|
||||
return toAjax(recordBasketCheckTaskService.updateRecordBasketCheckTask(recordBasketCheckTask));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除资产盘点任务列
|
||||
*/
|
||||
@RequiresPermissions("manager:basketCheckTask:remove")
|
||||
@Log(title = "资产盘点任务列", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(recordBasketCheckTaskService.deleteRecordBasketCheckTaskByTaskIds(ids));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,123 @@
|
||||
package com.ruoyi.manager.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 资产盘点内容对象 record_basket_check_content
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-04-07
|
||||
*/
|
||||
public class RecordBasketCheckContent extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 自增主键 */
|
||||
private Long objId;
|
||||
|
||||
/** 任务编码 */
|
||||
@Excel(name = "任务编码")
|
||||
private String taskCode;
|
||||
|
||||
/** 资产ID */
|
||||
@Excel(name = "资产ID")
|
||||
private Long basketId;
|
||||
|
||||
/** 盘点状态 */
|
||||
@Excel(name = "盘点状态")
|
||||
private String checkState;
|
||||
|
||||
/** 资产状态说明 */
|
||||
@Excel(name = "资产状态说明")
|
||||
private String taskDescription;
|
||||
|
||||
/** 作业状态 */
|
||||
@Excel(name = "作业状态")
|
||||
private String checkType;
|
||||
private BaseBasketInfo basketInfo;
|
||||
|
||||
public BaseBasketInfo getBasketInfo() {
|
||||
return basketInfo;
|
||||
}
|
||||
|
||||
public void setBasketInfo(BaseBasketInfo basketInfo) {
|
||||
this.basketInfo = basketInfo;
|
||||
}
|
||||
|
||||
public void setObjId(Long objId)
|
||||
{
|
||||
this.objId = objId;
|
||||
}
|
||||
|
||||
public Long getObjId()
|
||||
{
|
||||
return objId;
|
||||
}
|
||||
|
||||
public void setTaskCode(String taskCode)
|
||||
{
|
||||
this.taskCode = taskCode;
|
||||
}
|
||||
|
||||
public String getTaskCode()
|
||||
{
|
||||
return taskCode;
|
||||
}
|
||||
|
||||
public void setBasketId(Long basketId)
|
||||
{
|
||||
this.basketId = basketId;
|
||||
}
|
||||
|
||||
public Long getBasketId()
|
||||
{
|
||||
return basketId;
|
||||
}
|
||||
|
||||
public void setCheckState(String checkState)
|
||||
{
|
||||
this.checkState = checkState;
|
||||
}
|
||||
|
||||
public String getCheckState()
|
||||
{
|
||||
return checkState;
|
||||
}
|
||||
|
||||
public void setTaskDescription(String taskDescription)
|
||||
{
|
||||
this.taskDescription = taskDescription;
|
||||
}
|
||||
|
||||
public String getTaskDescription()
|
||||
{
|
||||
return taskDescription;
|
||||
}
|
||||
|
||||
public void setCheckType(String checkType)
|
||||
{
|
||||
this.checkType = checkType;
|
||||
}
|
||||
|
||||
public String getCheckType()
|
||||
{
|
||||
return checkType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("objId", getObjId())
|
||||
.append("taskCode", getTaskCode())
|
||||
.append("basketId", getBasketId())
|
||||
.append("checkState", getCheckState())
|
||||
.append("taskDescription", getTaskDescription())
|
||||
.append("checkType", getCheckType())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,103 @@
|
||||
package com.ruoyi.manager.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 资产盘点任务列对象 record_basket_check_task
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-04-07
|
||||
*/
|
||||
public class RecordBasketCheckTask extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 自增主键
|
||||
*/
|
||||
private Long taskId;
|
||||
|
||||
/**
|
||||
* 任务编码
|
||||
*/
|
||||
@Excel(name = "任务编码")
|
||||
private String taskCode;
|
||||
|
||||
/**
|
||||
* 任务状态
|
||||
*/
|
||||
@Excel(name = "任务状态")
|
||||
private String taskState;
|
||||
|
||||
/**
|
||||
* 任务说明
|
||||
*/
|
||||
@Excel(name = "任务说明")
|
||||
private String taskDescription;
|
||||
private int type0Count;
|
||||
private int type1Count;
|
||||
|
||||
public int getType0Count() {
|
||||
return type0Count;
|
||||
}
|
||||
|
||||
public void setType0Count(int type0Count) {
|
||||
this.type0Count = type0Count;
|
||||
}
|
||||
|
||||
public int getType1Count() {
|
||||
return type1Count;
|
||||
}
|
||||
|
||||
public void setType1Count(int type1Count) {
|
||||
this.type1Count = type1Count;
|
||||
}
|
||||
|
||||
public Long getTaskId() {
|
||||
return taskId;
|
||||
}
|
||||
|
||||
public void setTaskId(Long taskId) {
|
||||
this.taskId = taskId;
|
||||
}
|
||||
|
||||
public String getTaskCode() {
|
||||
return taskCode;
|
||||
}
|
||||
|
||||
public void setTaskCode(String taskCode) {
|
||||
this.taskCode = taskCode;
|
||||
}
|
||||
|
||||
public String getTaskState() {
|
||||
return taskState;
|
||||
}
|
||||
|
||||
public void setTaskState(String taskState) {
|
||||
this.taskState = taskState;
|
||||
}
|
||||
|
||||
public String getTaskDescription() {
|
||||
return taskDescription;
|
||||
}
|
||||
|
||||
public void setTaskDescription(String taskDescription) {
|
||||
this.taskDescription = taskDescription;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("taskId", getTaskId())
|
||||
.append("taskCode", getTaskCode())
|
||||
.append("taskState", getTaskState())
|
||||
.append("taskDescription", getTaskDescription())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,64 @@
|
||||
package com.ruoyi.manager.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.manager.domain.RecordBasketCheckContent;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 资产盘点内容Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-04-07
|
||||
*/
|
||||
public interface RecordBasketCheckContentMapper
|
||||
{
|
||||
/**
|
||||
* 查询资产盘点内容
|
||||
*
|
||||
* @param objId 资产盘点内容主键
|
||||
* @return 资产盘点内容
|
||||
*/
|
||||
public RecordBasketCheckContent selectRecordBasketCheckContentByObjId(Long objId);
|
||||
|
||||
/**
|
||||
* 查询资产盘点内容列表
|
||||
*
|
||||
* @param recordBasketCheckContent 资产盘点内容
|
||||
* @return 资产盘点内容集合
|
||||
*/
|
||||
public List<RecordBasketCheckContent> selectRecordBasketCheckContentList(RecordBasketCheckContent recordBasketCheckContent);
|
||||
|
||||
/**
|
||||
* 新增资产盘点内容
|
||||
*
|
||||
* @param recordBasketCheckContent 资产盘点内容
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRecordBasketCheckContent(RecordBasketCheckContent recordBasketCheckContent);
|
||||
|
||||
/**
|
||||
* 修改资产盘点内容
|
||||
*
|
||||
* @param recordBasketCheckContent 资产盘点内容
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRecordBasketCheckContent(RecordBasketCheckContent recordBasketCheckContent);
|
||||
|
||||
/**
|
||||
* 删除资产盘点内容
|
||||
*
|
||||
* @param objId 资产盘点内容主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRecordBasketCheckContentByObjId(Long objId);
|
||||
|
||||
/**
|
||||
* 批量删除资产盘点内容
|
||||
*
|
||||
* @param objIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRecordBasketCheckContentByObjIds(String[] objIds);
|
||||
|
||||
void insertList(@Param("taskCode") String taskCode, @Param("day") String day);
|
||||
}
|
||||
@ -0,0 +1,63 @@
|
||||
package com.ruoyi.manager.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.manager.domain.RecordBasketCheckTask;
|
||||
|
||||
/**
|
||||
* 资产盘点任务列Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-04-07
|
||||
*/
|
||||
public interface RecordBasketCheckTaskMapper
|
||||
{
|
||||
/**
|
||||
* 查询资产盘点任务列
|
||||
*
|
||||
* @param taskId 资产盘点任务列主键
|
||||
* @return 资产盘点任务列
|
||||
*/
|
||||
public RecordBasketCheckTask selectRecordBasketCheckTaskByTaskId(Long taskId);
|
||||
|
||||
/**
|
||||
* 查询资产盘点任务列列表
|
||||
*
|
||||
* @param recordBasketCheckTask 资产盘点任务列
|
||||
* @return 资产盘点任务列集合
|
||||
*/
|
||||
public List<RecordBasketCheckTask> selectRecordBasketCheckTaskList(RecordBasketCheckTask recordBasketCheckTask);
|
||||
|
||||
/**
|
||||
* 新增资产盘点任务列
|
||||
*
|
||||
* @param recordBasketCheckTask 资产盘点任务列
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRecordBasketCheckTask(RecordBasketCheckTask recordBasketCheckTask);
|
||||
|
||||
/**
|
||||
* 修改资产盘点任务列
|
||||
*
|
||||
* @param recordBasketCheckTask 资产盘点任务列
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRecordBasketCheckTask(RecordBasketCheckTask recordBasketCheckTask);
|
||||
|
||||
/**
|
||||
* 删除资产盘点任务列
|
||||
*
|
||||
* @param taskId 资产盘点任务列主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRecordBasketCheckTaskByTaskId(Long taskId);
|
||||
|
||||
/**
|
||||
* 批量删除资产盘点任务列
|
||||
*
|
||||
* @param taskIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRecordBasketCheckTaskByTaskIds(String[] taskIds);
|
||||
|
||||
int selectCountTask();
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.manager.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.manager.domain.RecordBasketCheckContent;
|
||||
|
||||
/**
|
||||
* 资产盘点内容Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-04-07
|
||||
*/
|
||||
public interface IRecordBasketCheckContentService
|
||||
{
|
||||
/**
|
||||
* 查询资产盘点内容
|
||||
*
|
||||
* @param objId 资产盘点内容主键
|
||||
* @return 资产盘点内容
|
||||
*/
|
||||
public RecordBasketCheckContent selectRecordBasketCheckContentByObjId(Long objId);
|
||||
|
||||
/**
|
||||
* 查询资产盘点内容列表
|
||||
*
|
||||
* @param recordBasketCheckContent 资产盘点内容
|
||||
* @return 资产盘点内容集合
|
||||
*/
|
||||
public List<RecordBasketCheckContent> selectRecordBasketCheckContentList(RecordBasketCheckContent recordBasketCheckContent);
|
||||
|
||||
/**
|
||||
* 新增资产盘点内容
|
||||
*
|
||||
* @param recordBasketCheckContent 资产盘点内容
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRecordBasketCheckContent(RecordBasketCheckContent recordBasketCheckContent);
|
||||
|
||||
/**
|
||||
* 修改资产盘点内容
|
||||
*
|
||||
* @param recordBasketCheckContent 资产盘点内容
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRecordBasketCheckContent(RecordBasketCheckContent recordBasketCheckContent);
|
||||
|
||||
/**
|
||||
* 批量删除资产盘点内容
|
||||
*
|
||||
* @param objIds 需要删除的资产盘点内容主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRecordBasketCheckContentByObjIds(String objIds);
|
||||
|
||||
/**
|
||||
* 删除资产盘点内容信息
|
||||
*
|
||||
* @param objId 资产盘点内容主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRecordBasketCheckContentByObjId(Long objId);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.manager.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.manager.domain.RecordBasketCheckTask;
|
||||
|
||||
/**
|
||||
* 资产盘点任务列Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-04-07
|
||||
*/
|
||||
public interface IRecordBasketCheckTaskService
|
||||
{
|
||||
/**
|
||||
* 查询资产盘点任务列
|
||||
*
|
||||
* @param taskId 资产盘点任务列主键
|
||||
* @return 资产盘点任务列
|
||||
*/
|
||||
public RecordBasketCheckTask selectRecordBasketCheckTaskByTaskId(Long taskId);
|
||||
|
||||
/**
|
||||
* 查询资产盘点任务列列表
|
||||
*
|
||||
* @param recordBasketCheckTask 资产盘点任务列
|
||||
* @return 资产盘点任务列集合
|
||||
*/
|
||||
public List<RecordBasketCheckTask> selectRecordBasketCheckTaskList(RecordBasketCheckTask recordBasketCheckTask);
|
||||
|
||||
/**
|
||||
* 新增资产盘点任务列
|
||||
*
|
||||
* @param recordBasketCheckTask 资产盘点任务列
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRecordBasketCheckTask(RecordBasketCheckTask recordBasketCheckTask);
|
||||
|
||||
/**
|
||||
* 修改资产盘点任务列
|
||||
*
|
||||
* @param recordBasketCheckTask 资产盘点任务列
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRecordBasketCheckTask(RecordBasketCheckTask recordBasketCheckTask);
|
||||
|
||||
/**
|
||||
* 批量删除资产盘点任务列
|
||||
*
|
||||
* @param taskIds 需要删除的资产盘点任务列主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRecordBasketCheckTaskByTaskIds(String taskIds);
|
||||
|
||||
/**
|
||||
* 删除资产盘点任务列信息
|
||||
*
|
||||
* @param taskId 资产盘点任务列主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRecordBasketCheckTaskByTaskId(Long taskId);
|
||||
}
|
||||
@ -0,0 +1,96 @@
|
||||
package com.ruoyi.manager.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.manager.mapper.RecordBasketCheckContentMapper;
|
||||
import com.ruoyi.manager.domain.RecordBasketCheckContent;
|
||||
import com.ruoyi.manager.service.IRecordBasketCheckContentService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
|
||||
/**
|
||||
* 资产盘点内容Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-04-07
|
||||
*/
|
||||
@Service
|
||||
public class RecordBasketCheckContentServiceImpl implements IRecordBasketCheckContentService
|
||||
{
|
||||
@Autowired
|
||||
private RecordBasketCheckContentMapper recordBasketCheckContentMapper;
|
||||
|
||||
/**
|
||||
* 查询资产盘点内容
|
||||
*
|
||||
* @param objId 资产盘点内容主键
|
||||
* @return 资产盘点内容
|
||||
*/
|
||||
@Override
|
||||
public RecordBasketCheckContent selectRecordBasketCheckContentByObjId(Long objId)
|
||||
{
|
||||
return recordBasketCheckContentMapper.selectRecordBasketCheckContentByObjId(objId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询资产盘点内容列表
|
||||
*
|
||||
* @param recordBasketCheckContent 资产盘点内容
|
||||
* @return 资产盘点内容
|
||||
*/
|
||||
@Override
|
||||
public List<RecordBasketCheckContent> selectRecordBasketCheckContentList(RecordBasketCheckContent recordBasketCheckContent)
|
||||
{
|
||||
return recordBasketCheckContentMapper.selectRecordBasketCheckContentList(recordBasketCheckContent);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增资产盘点内容
|
||||
*
|
||||
* @param recordBasketCheckContent 资产盘点内容
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertRecordBasketCheckContent(RecordBasketCheckContent recordBasketCheckContent)
|
||||
{
|
||||
recordBasketCheckContent.setCreateTime(DateUtils.getNowDate());
|
||||
return recordBasketCheckContentMapper.insertRecordBasketCheckContent(recordBasketCheckContent);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改资产盘点内容
|
||||
*
|
||||
* @param recordBasketCheckContent 资产盘点内容
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateRecordBasketCheckContent(RecordBasketCheckContent recordBasketCheckContent)
|
||||
{
|
||||
return recordBasketCheckContentMapper.updateRecordBasketCheckContent(recordBasketCheckContent);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除资产盘点内容
|
||||
*
|
||||
* @param objIds 需要删除的资产盘点内容主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRecordBasketCheckContentByObjIds(String objIds)
|
||||
{
|
||||
return recordBasketCheckContentMapper.deleteRecordBasketCheckContentByObjIds(Convert.toStrArray(objIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除资产盘点内容信息
|
||||
*
|
||||
* @param objId 资产盘点内容主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRecordBasketCheckContentByObjId(Long objId)
|
||||
{
|
||||
return recordBasketCheckContentMapper.deleteRecordBasketCheckContentByObjId(objId);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,108 @@
|
||||
package com.ruoyi.manager.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.manager.domain.RecordBasketCheckContent;
|
||||
import com.ruoyi.manager.domain.RecordBasketCheckTask;
|
||||
import com.ruoyi.manager.mapper.RecordBasketCheckContentMapper;
|
||||
import com.ruoyi.manager.mapper.RecordBasketCheckTaskMapper;
|
||||
import com.ruoyi.manager.service.IRecordBasketCheckTaskService;
|
||||
import com.ruoyi.system.service.ISysConfigService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 资产盘点任务列Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-04-07
|
||||
*/
|
||||
@Service
|
||||
public class RecordBasketCheckTaskServiceImpl implements IRecordBasketCheckTaskService {
|
||||
@Autowired
|
||||
private RecordBasketCheckTaskMapper recordBasketCheckTaskMapper;
|
||||
@Autowired
|
||||
private RecordBasketCheckContentMapper recordBasketCheckContentMapper;
|
||||
@Autowired
|
||||
private ISysConfigService configService;
|
||||
/**
|
||||
* 查询资产盘点任务列
|
||||
*
|
||||
* @param taskId 资产盘点任务列主键
|
||||
* @return 资产盘点任务列
|
||||
*/
|
||||
@Override
|
||||
public RecordBasketCheckTask selectRecordBasketCheckTaskByTaskId(Long taskId) {
|
||||
return recordBasketCheckTaskMapper.selectRecordBasketCheckTaskByTaskId(taskId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询资产盘点任务列列表
|
||||
*
|
||||
* @param recordBasketCheckTask 资产盘点任务列
|
||||
* @return 资产盘点任务列
|
||||
*/
|
||||
@Override
|
||||
public List<RecordBasketCheckTask> selectRecordBasketCheckTaskList(RecordBasketCheckTask recordBasketCheckTask) {
|
||||
return recordBasketCheckTaskMapper.selectRecordBasketCheckTaskList(recordBasketCheckTask);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增资产盘点任务列
|
||||
*
|
||||
* @param recordBasketCheckTask 资产盘点任务列
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int insertRecordBasketCheckTask(RecordBasketCheckTask recordBasketCheckTask) {
|
||||
int count = recordBasketCheckTaskMapper.selectCountTask();
|
||||
count++;
|
||||
String taskCode = "CHECK" + DateUtils.dateTime() + String.format("%03d", count);
|
||||
recordBasketCheckTask.setTaskCode(taskCode);
|
||||
recordBasketCheckTask.setCreateTime(DateUtils.getNowDate());
|
||||
int i = recordBasketCheckTaskMapper.insertRecordBasketCheckTask(recordBasketCheckTask);
|
||||
if (i > 0) {
|
||||
String day = configService.selectConfigByKey("task.create.countday");
|
||||
recordBasketCheckContentMapper.insertList(taskCode,day);
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改资产盘点任务列
|
||||
*
|
||||
* @param recordBasketCheckTask 资产盘点任务列
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateRecordBasketCheckTask(RecordBasketCheckTask recordBasketCheckTask) {
|
||||
recordBasketCheckTask.setUpdateTime(DateUtils.getNowDate());
|
||||
return recordBasketCheckTaskMapper.updateRecordBasketCheckTask(recordBasketCheckTask);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除资产盘点任务列
|
||||
*
|
||||
* @param taskIds 需要删除的资产盘点任务列主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRecordBasketCheckTaskByTaskIds(String taskIds) {
|
||||
return recordBasketCheckTaskMapper.deleteRecordBasketCheckTaskByTaskIds(Convert.toStrArray(taskIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除资产盘点任务列信息
|
||||
*
|
||||
* @param taskId 资产盘点任务列主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRecordBasketCheckTaskByTaskId(Long taskId) {
|
||||
return recordBasketCheckTaskMapper.deleteRecordBasketCheckTaskByTaskId(taskId);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,136 @@
|
||||
<?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.ruoyi.manager.mapper.RecordBasketCheckContentMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.manager.domain.RecordBasketCheckContent" id="RecordBasketCheckContentResult">
|
||||
<result property="objId" column="objId"/>
|
||||
<result property="taskCode" column="task_code"/>
|
||||
<result property="basketId" column="basket_id"/>
|
||||
<result property="checkState" column="check_state"/>
|
||||
<result property="taskDescription" column="task_description"/>
|
||||
<result property="checkType" column="check_type"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<association property="basketInfo" resultMap="com.ruoyi.manager.mapper.BaseBasketInfoMapper.BaseBasketInfoResult"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
|
||||
<sql id="selectRecordBasketCheckContentVo">
|
||||
select objId,
|
||||
task_code,
|
||||
basket_id,
|
||||
check_state,
|
||||
task_description,
|
||||
check_type,
|
||||
create_by,
|
||||
create_time
|
||||
from record_basket_check_content
|
||||
</sql>
|
||||
<sql id="selectContentList">
|
||||
select objId,
|
||||
task_code,
|
||||
basket_id,
|
||||
check_state,
|
||||
task_description,
|
||||
check_type,
|
||||
create_by,
|
||||
create_time,
|
||||
basket_epc,
|
||||
basket_epc2,
|
||||
steel_grade,
|
||||
self_code,department
|
||||
from record_basket_check_content cc
|
||||
left join base_basket_info bi on cc.basket_id = bi.obj_id
|
||||
</sql>
|
||||
<select id="selectRecordBasketCheckContentList" parameterType="RecordBasketCheckContent"
|
||||
resultMap="RecordBasketCheckContentResult">
|
||||
<include refid="selectContentList"/>
|
||||
<where>
|
||||
<if test="taskCode != null and taskCode != ''">and task_code = #{taskCode}</if>
|
||||
<if test="basketId != null ">and basket_id = #{basketId}</if>
|
||||
<if test="checkState != null and checkState != ''">and check_state = #{checkState}</if>
|
||||
<if test="taskDescription != null and taskDescription != ''">and task_description = #{taskDescription}</if>
|
||||
<if test="checkType != null and checkType != ''">and check_type = #{checkType}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectRecordBasketCheckContentByObjId" parameterType="Long" resultMap="RecordBasketCheckContentResult">
|
||||
<include refid="selectRecordBasketCheckContentVo"/>
|
||||
where objId = #{objId}
|
||||
</select>
|
||||
|
||||
<insert id="insertRecordBasketCheckContent" parameterType="RecordBasketCheckContent" useGeneratedKeys="true"
|
||||
keyProperty="objId">
|
||||
insert into record_basket_check_content
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="taskCode != null">task_code,</if>
|
||||
<if test="basketId != null">basket_id,</if>
|
||||
<if test="checkState != null">check_state,</if>
|
||||
<if test="taskDescription != null">task_description,</if>
|
||||
<if test="checkType != null">check_type,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="taskCode != null">#{taskCode},</if>
|
||||
<if test="basketId != null">#{basketId},</if>
|
||||
<if test="checkState != null">#{checkState},</if>
|
||||
<if test="taskDescription != null">#{taskDescription},</if>
|
||||
<if test="checkType != null">#{checkType},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateRecordBasketCheckContent" parameterType="RecordBasketCheckContent">
|
||||
update record_basket_check_content
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="taskCode != null">task_code = #{taskCode},</if>
|
||||
<if test="basketId != null">basket_id = #{basketId},</if>
|
||||
<if test="checkState != null">check_state = #{checkState},</if>
|
||||
<if test="taskDescription != null">task_description = #{taskDescription},</if>
|
||||
<if test="checkType != null">check_type = #{checkType},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where objId = #{objId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteRecordBasketCheckContentByObjId" parameterType="Long">
|
||||
delete
|
||||
from record_basket_check_content
|
||||
where objId = #{objId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteRecordBasketCheckContentByObjIds" parameterType="String">
|
||||
delete from record_basket_check_content where objId in
|
||||
<foreach item="objId" collection="array" open="(" separator="," close=")">
|
||||
#{objId}
|
||||
</foreach>
|
||||
</delete>
|
||||
<insert id="insertList">
|
||||
insert into record_basket_check_content(task_code, basket_id)
|
||||
select #{taskCode}, obj_id
|
||||
from base_basket_info
|
||||
where obj_id not in (SELECT distinct base_basket_id
|
||||
FROM record_basket_repair
|
||||
WHERE create_time >= DATE_SUB(CURDATE(), INTERVAL #{day} DAY)
|
||||
union
|
||||
SELECT distinct basket_id
|
||||
FROM record_cargo_binding
|
||||
WHERE crate_time >= DATE_SUB(CURDATE(), INTERVAL #{day} DAY)
|
||||
union
|
||||
SELECT distinct basket_id
|
||||
FROM record_delivery_task_baseket
|
||||
WHERE create_time >= DATE_SUB(CURDATE(), INTERVAL #{day} DAY)
|
||||
union
|
||||
SELECT distinct basket_id
|
||||
FROM ledger_instant_binding
|
||||
WHERE crate_time >= DATE_SUB(CURDATE(), INTERVAL #{day} DAY))
|
||||
and basket_epc != '' and basket_epc is not null and basket_epc2 != '' and basket_epc2 is not null and basket_status = 0
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,110 @@
|
||||
<?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.ruoyi.manager.mapper.RecordBasketCheckTaskMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.manager.domain.RecordBasketCheckTask" id="RecordBasketCheckTaskResult">
|
||||
<result property="taskId" column="task_id" />
|
||||
<result property="taskCode" column="task_code" />
|
||||
<result property="taskState" column="task_state" />
|
||||
<result property="taskDescription" column="task_description" />
|
||||
<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="type0Count" column="type0Count" />
|
||||
<result property="type1Count" column="type1Count" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectRecordBasketCheckTaskVo">
|
||||
select task_id, task_code, task_state, task_description, create_by, create_time, update_by, update_time from record_basket_check_task
|
||||
</sql>
|
||||
|
||||
<sql id="selectTaskCount">
|
||||
select task_id,
|
||||
rt.task_code,
|
||||
task_state,
|
||||
rt.task_description,
|
||||
rt.create_by,
|
||||
rt.create_time,
|
||||
update_by,
|
||||
update_time,
|
||||
sum(check_type = 0) as type0Count,
|
||||
sum(check_type = 1) as type1Count
|
||||
from record_basket_check_task rt
|
||||
left join record_basket_check_content rbcc on rt.task_code = rbcc.task_code
|
||||
</sql>
|
||||
<select id="selectRecordBasketCheckTaskList" parameterType="RecordBasketCheckTask" resultMap="RecordBasketCheckTaskResult">
|
||||
<include refid="selectTaskCount"/>
|
||||
<where>
|
||||
<if test="taskCode != null and taskCode != ''"> and rt.task_code = #{taskCode}</if>
|
||||
<if test="taskState != null and taskState != ''"> and rt.task_state = #{taskState}</if>
|
||||
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''">
|
||||
and rt.create_time between #{params.beginCreateTime} and DATE_ADD(#{params.endCreateTime}, INTERVAL 1 DAY)</if>
|
||||
<if test="params.beginUpdateTime != null and params.beginUpdateTime != '' and params.endUpdateTime != null and params.endUpdateTime != ''">
|
||||
and rt.update_time between #{params.beginUpdateTime} and #{params.endUpdateTime}</if>
|
||||
</where>
|
||||
group by rt.task_code, task_id, task_state, rt.task_description, rt.create_by, rt.create_time, update_by, update_time
|
||||
order by rt.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectRecordBasketCheckTaskByTaskId" parameterType="Long" resultMap="RecordBasketCheckTaskResult">
|
||||
<include refid="selectRecordBasketCheckTaskVo"/>
|
||||
where task_id = #{taskId}
|
||||
</select>
|
||||
|
||||
<insert id="insertRecordBasketCheckTask" parameterType="RecordBasketCheckTask" useGeneratedKeys="true" keyProperty="taskId">
|
||||
insert into record_basket_check_task
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="taskCode != null">task_code,</if>
|
||||
<if test="taskState != null">task_state,</if>
|
||||
<if test="taskDescription != null">task_description,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="taskCode != null">#{taskCode},</if>
|
||||
<if test="taskState != null">#{taskState},</if>
|
||||
<if test="taskDescription != null">#{taskDescription},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateRecordBasketCheckTask" parameterType="RecordBasketCheckTask">
|
||||
update record_basket_check_task
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="taskCode != null">task_code = #{taskCode},</if>
|
||||
<if test="taskState != null">task_state = #{taskState},</if>
|
||||
<if test="taskDescription != null">task_description = #{taskDescription},</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>
|
||||
</trim>
|
||||
where task_id = #{taskId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteRecordBasketCheckTaskByTaskId" parameterType="Long">
|
||||
delete from record_basket_check_task where task_id = #{taskId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteRecordBasketCheckTaskByTaskIds" parameterType="String">
|
||||
delete from record_basket_check_task where task_id in
|
||||
<foreach item="taskId" collection="array" open="(" separator="," close=")">
|
||||
#{taskId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectCountTask" resultType="integer">
|
||||
select count(*)
|
||||
from record_basket_check_task
|
||||
where DATE (create_time) = CURDATE()
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,22 @@
|
||||
-- 菜单 SQL
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('资产盘点内容', '2044', '6', '/manager/basketCheckContent', 'C', '0', 'manager:basketCheckContent:view', '#', 'admin', sysdate(), '', null, '资产盘点内容菜单');
|
||||
|
||||
-- 按钮父菜单ID
|
||||
SELECT @parentId := LAST_INSERT_ID();
|
||||
|
||||
-- 按钮 SQL
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('资产盘点内容查询', @parentId, '1', '#', 'F', '0', 'manager:basketCheckContent:list', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('资产盘点内容新增', @parentId, '2', '#', 'F', '0', 'manager:basketCheckContent:add', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('资产盘点内容修改', @parentId, '3', '#', 'F', '0', 'manager:basketCheckContent:edit', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('资产盘点内容删除', @parentId, '4', '#', 'F', '0', 'manager:basketCheckContent:remove', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('资产盘点内容导出', @parentId, '5', '#', 'F', '0', 'manager:basketCheckContent:export', '#', 'admin', sysdate(), '', null, '');
|
||||
@ -0,0 +1,22 @@
|
||||
-- 菜单 SQL
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('资产盘点任务列', '2044', '5', '/manager/basketCheckTask', 'C', '0', 'manager:basketCheckTask:view', '#', 'admin', sysdate(), '', null, '资产盘点任务列菜单');
|
||||
|
||||
-- 按钮父菜单ID
|
||||
SELECT @parentId := LAST_INSERT_ID();
|
||||
|
||||
-- 按钮 SQL
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('资产盘点任务列查询', @parentId, '1', '#', 'F', '0', 'manager:basketCheckTask:list', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('资产盘点任务列新增', @parentId, '2', '#', 'F', '0', 'manager:basketCheckTask:add', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('资产盘点任务列修改', @parentId, '3', '#', 'F', '0', 'manager:basketCheckTask:edit', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('资产盘点任务列删除', @parentId, '4', '#', 'F', '0', 'manager:basketCheckTask:remove', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('资产盘点任务列导出', @parentId, '5', '#', 'F', '0', 'manager:basketCheckTask:export', '#', 'admin', sysdate(), '', null, '');
|
||||
@ -0,0 +1,51 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增资产盘点任务列')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-basketCheckTask-add">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">任务编码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="taskCode" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">任务状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="taskState" class="form-control" th:with="type=${@dict.getType('check_task_state')}">
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">任务说明:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="taskDescription" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "manager/basketCheckTask"
|
||||
$("#form-basketCheckTask-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-basketCheckTask-add').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,138 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('资产盘点任务列列表')" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
<label>任务编码:</label>
|
||||
<input type="text" name="taskCode"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>任务状态:</label>
|
||||
<select name="taskState" th:with="type=${@dict.getType('check_task_state')}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li class="select-time">
|
||||
<label>创建时间:</label>
|
||||
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCreateTime]"/>
|
||||
<span>-</span>
|
||||
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCreateTime]"/>
|
||||
</li>
|
||||
<li class="select-time">
|
||||
<label>更新时间:</label>
|
||||
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginUpdateTime]"/>
|
||||
<span>-</span>
|
||||
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endUpdateTime]"/>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="manager:basketCheckTask:add">
|
||||
<i class="fa fa-plus"></i> 添加
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="manager:basketCheckTask:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="manager:basketCheckTask:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="manager:basketCheckTask:export">
|
||||
<i class="fa fa-download"></i> 导出
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('manager:basketCheckTask:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('manager:basketCheckTask:remove')}]];
|
||||
var taskStateDatas = [[${@dict.getType('check_task_state')}]];
|
||||
var prefix = ctx + "manager/basketCheckTask";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "资产盘点任务列",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'taskId',
|
||||
title: '自增主键',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'taskCode',
|
||||
title: '任务编码'
|
||||
},
|
||||
{
|
||||
field: 'taskState',
|
||||
title: '任务状态',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(taskStateDatas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'taskDescription',
|
||||
title: '任务说明'
|
||||
},
|
||||
|
||||
{
|
||||
field: 'type0Count',
|
||||
title: '待盘数量'
|
||||
},
|
||||
{
|
||||
field: 'type1Count',
|
||||
title: '完成数量'
|
||||
},
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '创建人'
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
title: '创建时间'
|
||||
},
|
||||
{
|
||||
field: 'updateTime',
|
||||
title: '更新时间'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.taskId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.taskId + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,52 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改资产盘点任务列')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-basketCheckTask-edit" th:object="${recordBasketCheckTask}">
|
||||
<input name="taskId" th:field="*{taskId}" type="hidden">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">任务编码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="taskCode" th:field="*{taskCode}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">任务状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="taskState" class="form-control" th:with="type=${@dict.getType('check_task_state')}">
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{taskState}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">任务说明:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="taskDescription" th:field="*{taskDescription}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "manager/basketCheckTask";
|
||||
$("#form-basketCheckTask-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-basketCheckTask-edit').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Reference in New Issue