Compare commits
23 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 558d99834d | |||
| 6583cc5032 | |||
| d9cb1f17d2 | |||
| da091ef3f1 | |||
| e211b11349 | |||
| c15152b856 | |||
| 009c8aae0d | |||
| 3c3a654dbd | |||
| 9ede76e085 | |||
| 2971b22596 | |||
| 1860c70ff5 | |||
| 7ff2ed6246 | |||
| b94f223861 | |||
| cab38bffde | |||
| ca2ffc9881 | |||
| a6ed4a4f9e | |||
| 5e522ee362 | |||
| 5e1e8f42e8 | |||
| 71413a58e0 | |||
| 8d7ad44e25 | |||
| 4fec612e35 | |||
| 510e6a0ce2 | |||
| 4abd0682a9 |
@ -0,0 +1,106 @@
|
||||
package net.ferrum.web.controller.business;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import net.ferrum.common.annotation.RepeatSubmit;
|
||||
import net.ferrum.common.annotation.Log;
|
||||
import net.ferrum.common.core.controller.BaseController;
|
||||
import net.ferrum.common.core.domain.PageQuery;
|
||||
import net.ferrum.common.core.domain.R;
|
||||
import net.ferrum.common.core.validate.AddGroup;
|
||||
import net.ferrum.common.core.validate.EditGroup;
|
||||
import net.ferrum.common.enums.BusinessType;
|
||||
import net.ferrum.common.utils.poi.ExcelUtil;
|
||||
import net.ferrum.business.domain.vo.QsBatchVo;
|
||||
import net.ferrum.business.domain.bo.QsBatchBo;
|
||||
import net.ferrum.business.service.IQsBatchService;
|
||||
import net.ferrum.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 批次管理
|
||||
*
|
||||
* @author tiezx
|
||||
* @date 2025-07-18
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/business/batch")
|
||||
public class QsBatchController extends BaseController {
|
||||
|
||||
private final IQsBatchService iQsBatchService;
|
||||
|
||||
/**
|
||||
* 查询批次管理列表
|
||||
*/
|
||||
@SaCheckPermission("business:batch:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<QsBatchVo> list(QsBatchBo bo, PageQuery pageQuery) {
|
||||
return iQsBatchService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出批次管理列表
|
||||
*/
|
||||
@SaCheckPermission("business:batch:export")
|
||||
@Log(title = "批次管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(QsBatchBo bo, HttpServletResponse response) {
|
||||
List<QsBatchVo> list = iQsBatchService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "批次管理", QsBatchVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取批次管理详细信息
|
||||
*
|
||||
* @param batchId 主键
|
||||
*/
|
||||
@SaCheckPermission("business:batch:query")
|
||||
@GetMapping("/{batchId}")
|
||||
public R<QsBatchVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long batchId) {
|
||||
return R.ok(iQsBatchService.queryById(batchId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增批次管理
|
||||
*/
|
||||
@SaCheckPermission("business:batch:add")
|
||||
@Log(title = "批次管理", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody QsBatchBo bo) {
|
||||
return toAjax(iQsBatchService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改批次管理
|
||||
*/
|
||||
@SaCheckPermission("business:batch:edit")
|
||||
@Log(title = "批次管理", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody QsBatchBo bo) {
|
||||
return toAjax(iQsBatchService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除批次管理
|
||||
*
|
||||
* @param batchIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("business:batch:remove")
|
||||
@Log(title = "批次管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{batchIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] batchIds) {
|
||||
return toAjax(iQsBatchService.deleteWithValidByIds(Arrays.asList(batchIds), true));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,147 @@
|
||||
package net.ferrum.web.controller.business;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import net.ferrum.business.domain.QsBatch;
|
||||
import net.ferrum.business.domain.QsProjects;
|
||||
import net.ferrum.business.domain.QsSpecAttributeTypes;
|
||||
import net.ferrum.business.domain.QsSpecAttributeValues;
|
||||
import net.ferrum.business.domain.bo.QsProjectAttributesBo;
|
||||
import net.ferrum.business.domain.bo.QsSpecAttributeValuesBo;
|
||||
import net.ferrum.business.domain.bo.QsUserSupplierBo;
|
||||
import net.ferrum.business.domain.vo.QsProjectAttributesVo;
|
||||
import net.ferrum.business.service.IQsBatchService;
|
||||
import net.ferrum.business.service.IQsProjectAttributesService;
|
||||
import net.ferrum.business.service.IQsSpecAttributeValuesService;
|
||||
import net.ferrum.common.utils.BeanCopyUtils;
|
||||
import org.apache.ibatis.executor.BaseExecutor;
|
||||
import org.springframework.transaction.TransactionDefinition;
|
||||
import org.springframework.transaction.TransactionStatus;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.transaction.support.DefaultTransactionDefinition;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import net.ferrum.common.annotation.RepeatSubmit;
|
||||
import net.ferrum.common.annotation.Log;
|
||||
import net.ferrum.common.core.controller.BaseController;
|
||||
import net.ferrum.common.core.domain.PageQuery;
|
||||
import net.ferrum.common.core.domain.R;
|
||||
import net.ferrum.common.core.validate.AddGroup;
|
||||
import net.ferrum.common.core.validate.EditGroup;
|
||||
import net.ferrum.common.core.validate.QueryGroup;
|
||||
import net.ferrum.common.enums.BusinessType;
|
||||
import net.ferrum.common.utils.poi.ExcelUtil;
|
||||
import net.ferrum.business.domain.vo.QsProjectsVo;
|
||||
import net.ferrum.business.domain.bo.QsProjectsBo;
|
||||
import net.ferrum.business.service.IQsProjectsService;
|
||||
import net.ferrum.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 项目管理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-19
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/business/projects")
|
||||
public class QsProjectsController extends BaseController {
|
||||
|
||||
private final IQsProjectsService iQsProjectsService;
|
||||
private final IQsBatchService iQsBatchService;
|
||||
private final IQsSpecAttributeValuesService iQsSpecAttributeValuesService;
|
||||
private final IQsProjectAttributesService iQsProjectAttributesService;
|
||||
|
||||
/**
|
||||
* 查询项目管理列表
|
||||
*/
|
||||
@SaCheckPermission("business:projects:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<QsProjects> list(QsProjects bo, PageQuery pageQuery) {
|
||||
return iQsProjectsService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出项目管理列表
|
||||
*/
|
||||
@SaCheckPermission("business:projects:export")
|
||||
@Log(title = "项目管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(QsProjectsBo bo, HttpServletResponse response) {
|
||||
List<QsProjectsVo> list = iQsProjectsService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "项目管理", QsProjectsVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取项目管理详细信息
|
||||
*
|
||||
* @param projectId 主键
|
||||
*/
|
||||
@SaCheckPermission("business:projects:query")
|
||||
@GetMapping("/{projectId}")
|
||||
public R<QsProjects> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long projectId) {
|
||||
//return R.ok(iQsProjectsService.queryById(projectId));
|
||||
return R.ok(iQsProjectsService.selectById(projectId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增项目管理
|
||||
*/
|
||||
@SaCheckPermission("business:projects:add")
|
||||
@Log(title = "项目管理", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody QsProjectsBo bo) {
|
||||
return toAjax(iQsProjectsService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改项目管理
|
||||
*/
|
||||
@SaCheckPermission("business:projects:edit")
|
||||
@Log(title = "项目管理", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody QsProjectsBo bo) {
|
||||
return toAjax(iQsProjectsService.updateByBo(bo));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除项目管理
|
||||
*
|
||||
* @param projectIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("business:projects:remove")
|
||||
@Log(title = "项目管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{projectIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] projectIds) {
|
||||
|
||||
String sRet = iQsProjectsService.deleteWithValidByIds(Arrays.asList(projectIds), true);
|
||||
if (sRet.length()==0){
|
||||
return R.ok();
|
||||
}else{
|
||||
return R.fail(sRet);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取批次列表
|
||||
*/
|
||||
@SaCheckPermission("business:projects:list")
|
||||
@GetMapping("/batchList")
|
||||
public R< List<QsBatch>> selectBatchList(QsBatch type) {
|
||||
return R.ok(iQsBatchService.selectBatchList(type));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,108 @@
|
||||
package net.ferrum.web.controller.business;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import net.ferrum.common.annotation.RepeatSubmit;
|
||||
import net.ferrum.common.annotation.Log;
|
||||
import net.ferrum.common.core.controller.BaseController;
|
||||
import net.ferrum.common.core.domain.PageQuery;
|
||||
import net.ferrum.common.core.domain.R;
|
||||
import net.ferrum.common.core.validate.AddGroup;
|
||||
import net.ferrum.common.core.validate.EditGroup;
|
||||
import net.ferrum.common.core.validate.QueryGroup;
|
||||
import net.ferrum.common.enums.BusinessType;
|
||||
import net.ferrum.common.utils.poi.ExcelUtil;
|
||||
import net.ferrum.business.domain.vo.QsSpecAttributeTypesVo;
|
||||
import net.ferrum.business.domain.bo.QsSpecAttributeTypesBo;
|
||||
import net.ferrum.business.service.IQsSpecAttributeTypesService;
|
||||
import net.ferrum.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 规格类型
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-19
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/business/specAttributeTypes")
|
||||
public class QsSpecAttributeTypesController extends BaseController {
|
||||
|
||||
private final IQsSpecAttributeTypesService iQsSpecAttributeTypesService;
|
||||
|
||||
/**
|
||||
* 查询规格类型列表
|
||||
*/
|
||||
@SaCheckPermission("business:specAttributeTypes:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<QsSpecAttributeTypesVo> list(QsSpecAttributeTypesBo bo, PageQuery pageQuery) {
|
||||
return iQsSpecAttributeTypesService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出规格类型列表
|
||||
*/
|
||||
@SaCheckPermission("business:specAttributeTypes:export")
|
||||
@Log(title = "规格类型", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(QsSpecAttributeTypesBo bo, HttpServletResponse response) {
|
||||
List<QsSpecAttributeTypesVo> list = iQsSpecAttributeTypesService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "规格类型", QsSpecAttributeTypesVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取规格类型详细信息
|
||||
*
|
||||
* @param typeId 主键
|
||||
*/
|
||||
@SaCheckPermission("business:specAttributeTypes:query")
|
||||
@GetMapping("/{typeId}")
|
||||
public R<QsSpecAttributeTypesVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long typeId) {
|
||||
return R.ok(iQsSpecAttributeTypesService.queryById(typeId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增规格类型
|
||||
*/
|
||||
@SaCheckPermission("business:specAttributeTypes:add")
|
||||
@Log(title = "规格类型", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody QsSpecAttributeTypesBo bo) {
|
||||
return toAjax(iQsSpecAttributeTypesService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改规格类型
|
||||
*/
|
||||
@SaCheckPermission("business:specAttributeTypes:edit")
|
||||
@Log(title = "规格类型", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody QsSpecAttributeTypesBo bo) {
|
||||
return toAjax(iQsSpecAttributeTypesService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除规格类型
|
||||
*
|
||||
* @param typeIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("business:specAttributeTypes:remove")
|
||||
@Log(title = "规格类型", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{typeIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] typeIds) {
|
||||
return toAjax(iQsSpecAttributeTypesService.deleteWithValidByIds(Arrays.asList(typeIds), true));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,147 @@
|
||||
package net.ferrum.web.controller.business;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import cn.hutool.core.lang.tree.Tree;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import net.ferrum.business.domain.QsBatch;
|
||||
import net.ferrum.business.domain.QsSpecAttributeTypes;
|
||||
import net.ferrum.business.domain.QsSpecAttributeValues;
|
||||
import net.ferrum.business.service.IQsSpecAttributeTypesService;
|
||||
import net.ferrum.common.core.domain.entity.SysDept;
|
||||
import net.ferrum.common.core.domain.entity.SysUser;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import net.ferrum.common.annotation.RepeatSubmit;
|
||||
import net.ferrum.common.annotation.Log;
|
||||
import net.ferrum.common.core.controller.BaseController;
|
||||
import net.ferrum.common.core.domain.PageQuery;
|
||||
import net.ferrum.common.core.domain.R;
|
||||
import net.ferrum.common.core.validate.AddGroup;
|
||||
import net.ferrum.common.core.validate.EditGroup;
|
||||
import net.ferrum.common.core.validate.QueryGroup;
|
||||
import net.ferrum.common.enums.BusinessType;
|
||||
import net.ferrum.common.utils.poi.ExcelUtil;
|
||||
import net.ferrum.business.domain.vo.QsSpecAttributeValuesVo;
|
||||
import net.ferrum.business.domain.bo.QsSpecAttributeValuesBo;
|
||||
import net.ferrum.business.service.IQsSpecAttributeValuesService;
|
||||
import net.ferrum.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 规格参数值
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-19
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/business/specAttributeValues")
|
||||
public class QsSpecAttributeValuesController extends BaseController {
|
||||
|
||||
private final IQsSpecAttributeValuesService iQsSpecAttributeValuesService;
|
||||
private final IQsSpecAttributeTypesService iQsSpecAttributeTypesService;
|
||||
|
||||
/**
|
||||
* 查询规格参数值列表
|
||||
*/
|
||||
@SaCheckPermission("business:specAttributeValues:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<QsSpecAttributeValues> list(QsSpecAttributeValues specAttributeValues, PageQuery pageQuery) {
|
||||
return iQsSpecAttributeValuesService.selectPageSpecAttributeValuesList(specAttributeValues, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出规格参数值列表
|
||||
*/
|
||||
@SaCheckPermission("business:specAttributeValues:export")
|
||||
@Log(title = "规格参数值", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(QsSpecAttributeValuesBo bo, HttpServletResponse response) {
|
||||
List<QsSpecAttributeValuesVo> list = iQsSpecAttributeValuesService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "规格参数值", QsSpecAttributeValuesVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取规格参数值详细信息
|
||||
*
|
||||
* @param valueId 主键
|
||||
*/
|
||||
@SaCheckPermission("business:specAttributeValues:query")
|
||||
@GetMapping("/{valueId}")
|
||||
public R<QsSpecAttributeValuesVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long valueId) {
|
||||
return R.ok(iQsSpecAttributeValuesService.queryById(valueId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增规格参数值
|
||||
*/
|
||||
@SaCheckPermission("business:specAttributeValues:add")
|
||||
@Log(title = "规格参数值", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody QsSpecAttributeValuesBo bo) {
|
||||
return toAjax(iQsSpecAttributeValuesService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改规格参数值
|
||||
*/
|
||||
@SaCheckPermission("business:specAttributeValues:edit")
|
||||
@Log(title = "规格参数值", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody QsSpecAttributeValuesBo bo) {
|
||||
return toAjax(iQsSpecAttributeValuesService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除规格参数值
|
||||
*
|
||||
* @param valueIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("business:specAttributeValues:remove")
|
||||
@Log(title = "规格参数值", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{valueIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] valueIds) {
|
||||
return toAjax(iQsSpecAttributeValuesService.deleteWithValidByIds(Arrays.asList(valueIds), true));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取规格参数类型列表
|
||||
*/
|
||||
@SaCheckPermission("business:specAttributeValues:list")
|
||||
@GetMapping("/specAttributeTypeList")
|
||||
public R< List<QsSpecAttributeTypes>> selectSpecAttributeTypesList(QsSpecAttributeTypes type) {
|
||||
return R.ok(iQsSpecAttributeTypesService.selectSpecAttributeTypesList(type));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据规格参数类型,获取这类参数下面的所有规格参数
|
||||
*/
|
||||
@SaCheckPermission("business:specAttributeValues:list")
|
||||
@GetMapping("/specAttributeValueListByTypeId")
|
||||
public R< List<QsSpecAttributeValues>> selectSpecAttributeValuesByTypesId(Long typeId) {
|
||||
return R.ok(iQsSpecAttributeValuesService.selectSpecAttributeValuesByTypesId(typeId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 得到所有据规格参数类型,每个参数类型包含本类中的所有规格参数
|
||||
*/
|
||||
@SaCheckPermission("business:specAttributeValues:list")
|
||||
@GetMapping("/specAttributeTypesWithValues")
|
||||
public R< List<QsSpecAttributeTypes>> selectSpecAttributeTypesWithValues(){
|
||||
List<QsSpecAttributeTypes> typeList = iQsSpecAttributeTypesService.selectSpecAttributeTypesList(null);
|
||||
for(QsSpecAttributeTypes type : typeList){
|
||||
type.setSpecValues(iQsSpecAttributeValuesService.selectSpecAttributeValuesByTypesId(type.getTypeId()));
|
||||
}
|
||||
return R.ok(typeList);
|
||||
}
|
||||
}
|
||||
@ -3,8 +3,10 @@ package net.ferrum.web.controller.business;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import net.ferrum.business.domain.bo.QsSupplierBo;
|
||||
import net.ferrum.business.domain.bo.QsUserSupplierBo;
|
||||
import net.ferrum.business.domain.vo.QsSupplierVo;
|
||||
import net.ferrum.business.service.IQsSupplierService;
|
||||
import net.ferrum.business.service.IQsUserSupplierService;
|
||||
import net.ferrum.common.annotation.Log;
|
||||
import net.ferrum.common.annotation.RepeatSubmit;
|
||||
import net.ferrum.common.core.controller.BaseController;
|
||||
@ -21,6 +23,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@ -39,13 +42,18 @@ public class QsSupplierController extends BaseController {
|
||||
|
||||
private final IQsSupplierService iQsSupplierService;
|
||||
|
||||
private final IQsUserSupplierService iQsUserSupplierService;
|
||||
|
||||
/**
|
||||
* 查询供应商信息列表
|
||||
*/
|
||||
@SaCheckPermission("business:supplier:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<QsSupplierVo> list(QsSupplierBo bo, PageQuery pageQuery) {
|
||||
return iQsSupplierService.queryPageList(bo, pageQuery);
|
||||
|
||||
return iQsUserSupplierService.selectSuppliersByUsersPages(bo, pageQuery);
|
||||
|
||||
//return iQsSupplierService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -67,8 +75,8 @@ public class QsSupplierController extends BaseController {
|
||||
@SaCheckPermission("business:supplier:query")
|
||||
@GetMapping("/{supplierId}")
|
||||
public R<QsSupplierVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long supplierId) {
|
||||
return R.ok(iQsSupplierService.queryById(supplierId));
|
||||
@PathVariable String supplierId) {
|
||||
return R.ok(iQsSupplierService.queryById(Long.parseLong(supplierId)));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -79,7 +87,26 @@ public class QsSupplierController extends BaseController {
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody QsSupplierBo bo) {
|
||||
return toAjax(iQsSupplierService.insertByBo(bo));
|
||||
boolean ret = iQsSupplierService.insertByBo(bo);
|
||||
if (ret == true){
|
||||
bo.getDockerUsers().forEach(dockerUser -> {
|
||||
if(dockerUser.getDel()==null){ //=null是新增加的,=2是增加后,又删除了的
|
||||
QsUserSupplierBo qsUserSupplierBo = new QsUserSupplierBo();
|
||||
qsUserSupplierBo.setSupplierId(bo.getSupplierId());
|
||||
qsUserSupplierBo.setUserId(dockerUser.getUserId());
|
||||
if (dockerUser.getId() == null){
|
||||
iQsUserSupplierService.insertByBo(qsUserSupplierBo);
|
||||
}
|
||||
else{
|
||||
qsUserSupplierBo.setId(dockerUser.getId());
|
||||
iQsUserSupplierService.updateByBo(qsUserSupplierBo);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
return toAjax(ret);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -90,6 +117,29 @@ public class QsSupplierController extends BaseController {
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody QsSupplierBo bo) {
|
||||
List<Long> ids = new ArrayList<>();
|
||||
bo.getDockerUsers().forEach(dockerUser -> {
|
||||
|
||||
if(dockerUser.getDel()!=null){//=null是原来有的,!=null 是后增加的
|
||||
ids.add(dockerUser.getId());
|
||||
}
|
||||
else{
|
||||
QsUserSupplierBo qsUserSupplierBo = new QsUserSupplierBo();
|
||||
qsUserSupplierBo.setSupplierId(bo.getSupplierId());
|
||||
qsUserSupplierBo.setUserId(dockerUser.getUserId());
|
||||
if (dockerUser.getId() == null){
|
||||
iQsUserSupplierService.insertByBo(qsUserSupplierBo);
|
||||
}
|
||||
else{
|
||||
qsUserSupplierBo.setId(dockerUser.getId());
|
||||
iQsUserSupplierService.updateByBo(qsUserSupplierBo);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
if ( !(ids == null || ids.isEmpty()) ){
|
||||
iQsUserSupplierService.deleteWithValidByIds(ids,true);
|
||||
}
|
||||
return toAjax(iQsSupplierService.updateByBo(bo));
|
||||
}
|
||||
|
||||
|
||||
@ -255,4 +255,10 @@ public class SysUserController extends BaseController {
|
||||
return R.ok(deptService.selectDeptTreeList(dept));
|
||||
}
|
||||
|
||||
@SaCheckPermission("system:user:list")
|
||||
@GetMapping("/listAll")
|
||||
public R< List<SysUser>> listAll() {
|
||||
return R.ok(userService.selectAllUsersList());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -17,6 +17,8 @@ import net.ferrum.workflow.service.IWfCopyService;
|
||||
import net.ferrum.workflow.service.IWfProcessService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.flowable.engine.RuntimeService;
|
||||
import org.flowable.engine.runtime.ProcessInstance;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@ -38,6 +40,7 @@ public class WfProcessController extends BaseController {
|
||||
|
||||
private final IWfProcessService processService;
|
||||
private final IWfCopyService copyService;
|
||||
private final RuntimeService runtimeService;
|
||||
|
||||
/**
|
||||
* 查询可发起流程列表
|
||||
@ -142,6 +145,21 @@ public class WfProcessController extends BaseController {
|
||||
ExcelUtil.exportExcel(listVo, "我拥有流程", WfOwnTaskExportVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出我拥有流程列表
|
||||
*/
|
||||
@SaCheckPermission("workflow:process:allExport")
|
||||
@Log(title = "所有流程", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/allExport")
|
||||
public void allExport(@Validated ProcessQuery processQuery, HttpServletResponse response) {
|
||||
List<WfTaskVo> list = processService.selectAllProcessList(processQuery);
|
||||
List<WfOwnTaskExportVo> listVo = BeanUtil.copyToList(list, WfOwnTaskExportVo.class);
|
||||
for (WfOwnTaskExportVo exportVo : listVo) {
|
||||
exportVo.setStatus(ObjectUtil.isNull(exportVo.getFinishTime()) ? "进行中" : "已完成");
|
||||
}
|
||||
ExcelUtil.exportExcel(listVo, "所有流程", WfOwnTaskExportVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出待办流程列表
|
||||
*/
|
||||
@ -212,7 +230,8 @@ public class WfProcessController extends BaseController {
|
||||
*/
|
||||
@SaCheckPermission("workflow:process:start")
|
||||
@PostMapping("/start/{processDefId}")
|
||||
public R<Void> start(@PathVariable(value = "processDefId") String processDefId, @RequestBody Map<String, Object> variables) {
|
||||
public R<Void> start(@PathVariable(value = "processDefId") String processDefId, @RequestBody (required = false) Map<String, Object> variables) {
|
||||
|
||||
processService.startProcessByDefId(processDefId, variables);
|
||||
|
||||
// 获取所有流程变量
|
||||
|
||||
@ -0,0 +1,33 @@
|
||||
package net.ferrum.test;
|
||||
|
||||
import groovy.util.logging.Slf4j;
|
||||
import net.ferrum.common.core.domain.PageQuery;
|
||||
import net.ferrum.common.core.page.TableDataInfo;
|
||||
import net.ferrum.flowable.core.domain.ProcessQuery;
|
||||
import net.ferrum.workflow.domain.vo.WfTaskVo;
|
||||
import net.ferrum.workflow.service.IWfProcessService;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
@Slf4j
|
||||
@SpringBootTest
|
||||
public class ServiceTest {
|
||||
|
||||
|
||||
@Autowired
|
||||
private IWfProcessService wfProcessService;
|
||||
|
||||
@Test
|
||||
void test1() {
|
||||
ProcessQuery query = new ProcessQuery();
|
||||
//query.setSpecBatch("333");
|
||||
|
||||
PageQuery pageQuery = new PageQuery();
|
||||
pageQuery.setPageNum(1);
|
||||
pageQuery.setPageSize(50);
|
||||
TableDataInfo<WfTaskVo> wfTaskVoTableDataInfo = wfProcessService.selectPageAllProcessList1(query, pageQuery);
|
||||
System.out.println(wfTaskVoTableDataInfo);
|
||||
}
|
||||
|
||||
}
|
||||
@ -129,4 +129,10 @@ public interface UserConstants {
|
||||
*/
|
||||
Long ADMIN_ID = 1L;
|
||||
|
||||
|
||||
/**
|
||||
* 项目起始阶段ID
|
||||
*/
|
||||
Long PROJECT_START_ID = 1L;
|
||||
|
||||
}
|
||||
|
||||
@ -78,5 +78,34 @@ public class ProcessConstants {
|
||||
*/
|
||||
public static final String FLOWABLE_SKIP_EXPRESSION_ENABLED = "_FLOWABLE_SKIP_EXPRESSION_ENABLED";
|
||||
|
||||
/**
|
||||
* 自定义属性 批次
|
||||
*/
|
||||
public static final String PROCESS_BATCH = "lbl_Batch";
|
||||
|
||||
/**
|
||||
* 自定义属性 规格名称
|
||||
*/
|
||||
public static final String PROCESS_SPEC_NAME = "lbl_name";
|
||||
|
||||
/**
|
||||
* 自定义属性 生成Busynesskey时,需要将批次与格名称连接起来,这外作为连接字符
|
||||
*/
|
||||
public static final String PROCESS_BUSYNESSKEY_ConnString = "---";
|
||||
|
||||
/**
|
||||
* 项目ID,作为Busynesskey
|
||||
*/
|
||||
public static final String PROCESS_BUSYNESSKEY_PROJECT_ID = "projectId";
|
||||
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
public static final String PROCESS_BUSYNESSKEY_PROJECT_NAME = "projectName";
|
||||
|
||||
/**
|
||||
* 批次
|
||||
*/
|
||||
public static final String PROCESS_BUSYNESSKEY_BATCH_NAME = "batchName";
|
||||
|
||||
}
|
||||
|
||||
@ -43,10 +43,10 @@ public class ProcessQuery {
|
||||
/**
|
||||
* 批次名称
|
||||
*/
|
||||
private String specBatch;
|
||||
private String batchName;
|
||||
|
||||
/**
|
||||
* 规格名称
|
||||
* 项目名称
|
||||
*/
|
||||
private String specName;
|
||||
private String projectName;
|
||||
}
|
||||
|
||||
@ -2,11 +2,13 @@ package net.ferrum.flowable.utils;
|
||||
|
||||
import net.ferrum.common.utils.DateUtils;
|
||||
import net.ferrum.common.utils.StringUtils;
|
||||
import net.ferrum.flowable.common.constant.ProcessConstants;
|
||||
import net.ferrum.flowable.core.domain.ProcessQuery;
|
||||
import org.flowable.common.engine.api.query.Query;
|
||||
import org.flowable.common.engine.impl.db.SuspensionState;
|
||||
import org.flowable.engine.history.HistoricProcessInstanceQuery;
|
||||
import org.flowable.engine.repository.ProcessDefinitionQuery;
|
||||
import org.flowable.task.api.TaskInfoQuery;
|
||||
import org.flowable.task.api.TaskQuery;
|
||||
import org.flowable.task.api.history.HistoricTaskInstanceQuery;
|
||||
import org.flowable.variable.api.history.HistoricVariableInstanceQuery;
|
||||
@ -78,8 +80,68 @@ public class ProcessUtils {
|
||||
query.taskCreatedAfter(DateUtils.parseDate(params.get("beginTime")));
|
||||
query.taskCreatedBefore(DateUtils.parseDate(params.get("endTime")));
|
||||
}
|
||||
|
||||
// String sKey = getBusynessKey(process);
|
||||
// if(sKey != null) {
|
||||
// query.processInstanceBusinessKeyLike(sKey);
|
||||
// }
|
||||
|
||||
BuildTaskBusynessQueryCond(query, process);
|
||||
|
||||
}
|
||||
|
||||
//已经没有用处了,但不是放在这里
|
||||
private static String getBusynessKey(ProcessQuery process){
|
||||
String sKey = null;
|
||||
|
||||
if (StringUtils.isNotBlank(process.getBatchName()) || StringUtils.isNotBlank(process.getProjectName())) {
|
||||
//批次
|
||||
if (StringUtils.isNotBlank(process.getBatchName())){
|
||||
sKey = "%" + process.getBatchName();
|
||||
//规格名称
|
||||
if (StringUtils.isNotBlank(process.getProjectName())) {
|
||||
sKey += "%" + ProcessConstants.PROCESS_BUSYNESSKEY_ConnString + "%" + process.getProjectName() + "%";
|
||||
}else{
|
||||
sKey += "%" + ProcessConstants.PROCESS_BUSYNESSKEY_ConnString + "%";
|
||||
}
|
||||
}
|
||||
else{
|
||||
if (StringUtils.isNotBlank(process.getProjectName())) {
|
||||
sKey = "%" + ProcessConstants.PROCESS_BUSYNESSKEY_ConnString + "%" + process.getProjectName() + "%";
|
||||
}else{
|
||||
sKey = "%" + ProcessConstants.PROCESS_BUSYNESSKEY_ConnString + "%";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return sKey;
|
||||
}
|
||||
|
||||
private static void BuildTaskBusynessQueryCond(TaskInfoQuery query, ProcessQuery process){
|
||||
//批次
|
||||
if (StringUtils.isNotBlank(process.getBatchName())){
|
||||
query.processVariableValueLike(ProcessConstants.PROCESS_BUSYNESSKEY_BATCH_NAME ,"%" +process.getBatchName()+ "%");
|
||||
}
|
||||
//项目名称
|
||||
if (StringUtils.isNotBlank(process.getProjectName())){
|
||||
query.processVariableValueLike(ProcessConstants.PROCESS_BUSYNESSKEY_PROJECT_NAME ,"%" +process.getProjectName()+ "%");
|
||||
}
|
||||
}
|
||||
|
||||
private static void BuildProcessBusynessQueryCond(HistoricProcessInstanceQuery query, ProcessQuery process){
|
||||
//批次
|
||||
if (StringUtils.isNotBlank(process.getBatchName())){
|
||||
query.variableValueLike(ProcessConstants.PROCESS_BUSYNESSKEY_BATCH_NAME ,"%" +process.getBatchName()+ "%");
|
||||
}
|
||||
//项目名称
|
||||
if (StringUtils.isNotBlank(process.getProjectName())){
|
||||
query.variableValueLike(ProcessConstants.PROCESS_BUSYNESSKEY_PROJECT_NAME ,"%" +process.getProjectName()+ "%");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private static void buildHistoricTaskInstanceSearch(HistoricTaskInstanceQuery query, ProcessQuery process) {
|
||||
Map<String, Object> params = process.getParams();
|
||||
if (StringUtils.isNotBlank(process.getProcessKey())) {
|
||||
@ -92,6 +154,11 @@ public class ProcessUtils {
|
||||
query.taskCompletedAfter(DateUtils.parseDate(params.get("beginTime")));
|
||||
query.taskCompletedBefore(DateUtils.parseDate(params.get("endTime")));
|
||||
}
|
||||
// String sKey = getBusynessKey(process);
|
||||
// if(sKey != null) {
|
||||
// query.processInstanceBusinessKeyLike(sKey);
|
||||
// }
|
||||
BuildTaskBusynessQueryCond(query, process);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -99,6 +166,8 @@ public class ProcessUtils {
|
||||
*/
|
||||
public static void buildHistoricProcessInstanceSearch(HistoricProcessInstanceQuery query, ProcessQuery process) {
|
||||
Map<String, Object> params = process.getParams();
|
||||
|
||||
/*
|
||||
// 流程标识
|
||||
if (StringUtils.isNotBlank(process.getProcessKey())) {
|
||||
query.processDefinitionKey(process.getProcessKey());
|
||||
@ -107,7 +176,16 @@ public class ProcessUtils {
|
||||
if (StringUtils.isNotBlank(process.getProcessName())) {
|
||||
query.processDefinitionName(process.getProcessName());
|
||||
}
|
||||
// 流程名称
|
||||
|
||||
*/
|
||||
// String sKey = getBusynessKey(process);
|
||||
// if(sKey != null) {
|
||||
// query.processInstanceBusinessKeyLike(sKey);
|
||||
// }
|
||||
|
||||
BuildProcessBusynessQueryCond(query, process);
|
||||
|
||||
// 流程类别
|
||||
if (StringUtils.isNotBlank(process.getCategory())) {
|
||||
query.processDefinitionCategory(process.getCategory());
|
||||
}
|
||||
@ -119,14 +197,22 @@ public class ProcessUtils {
|
||||
|
||||
|
||||
public static void buildHistoricVariableInstanceSearch(HistoricVariableInstanceQuery query, ProcessQuery process) {
|
||||
Map<String, Object> params = process.getParams();
|
||||
// 规格批次
|
||||
if (StringUtils.isNotBlank(process.getSpecBatch())) {
|
||||
query.variableValueLike("lbl_Batch","%" + process.getSpecBatch() + "%");
|
||||
// // 规格批次
|
||||
// if (StringUtils.isNotBlank(process.getBatchName())) {
|
||||
// query.variableValueLike("lbl_Batch","%" + process.getBatchName() + "%");
|
||||
// }
|
||||
// // 规格名称
|
||||
// if (StringUtils.isNotBlank(process.getProjectName())) {
|
||||
// query.variableValueLike("lbl_name","%" + process.getBatchName() + "%");
|
||||
// }
|
||||
|
||||
//批次
|
||||
if (StringUtils.isNotBlank(process.getBatchName())){
|
||||
query.variableValueLike(ProcessConstants.PROCESS_BUSYNESSKEY_BATCH_NAME ,process.getBatchName());
|
||||
}
|
||||
// 规格名称
|
||||
if (StringUtils.isNotBlank(process.getSpecName())) {
|
||||
query.variableValueLike("lbl_name","%" + process.getSpecBatch() + "%");
|
||||
//项目名称
|
||||
if (StringUtils.isNotBlank(process.getProcessName())){
|
||||
query.variableValueLike(ProcessConstants.PROCESS_BUSYNESSKEY_PROJECT_NAME ,process.getProcessName());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,59 @@
|
||||
package net.ferrum.business.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import net.ferrum.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 批次管理对象 qs_batch
|
||||
*
|
||||
* @author tiezx
|
||||
* @date 2025-07-18
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("qs_batch")
|
||||
public class QsBatch extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 批次ID
|
||||
*/
|
||||
@TableId(value = "batch_id")
|
||||
private Long batchId;
|
||||
/**
|
||||
* 批次编号
|
||||
*/
|
||||
private String batchNo;
|
||||
/**
|
||||
* 批次名称
|
||||
*/
|
||||
private String batchName;
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private Date batchStartDate;
|
||||
/**
|
||||
* 计划结束时间
|
||||
*/
|
||||
private Date batchPlanEndDate;
|
||||
/**
|
||||
* 结束日期
|
||||
*/
|
||||
private Date batchEndDate;
|
||||
/**
|
||||
* 删除标志(0代表存在 2代表删除)
|
||||
*/
|
||||
@TableLogic
|
||||
private String delFlag;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@ -0,0 +1,51 @@
|
||||
package net.ferrum.business.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import net.ferrum.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 项目规格对象 qs_project_attributes
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-24
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("qs_project_attributes")
|
||||
public class QsProjectAttributes extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 项目属性关联Id
|
||||
*/
|
||||
private Long id;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Long projectId;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Long typeId;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Long valueId;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 逻辑删除标志
|
||||
*/
|
||||
@TableLogic
|
||||
private String delFlag;
|
||||
|
||||
}
|
||||
@ -0,0 +1,109 @@
|
||||
package net.ferrum.business.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import net.ferrum.common.core.domain.BaseEntity;
|
||||
import net.ferrum.common.core.domain.entity.SysDept;
|
||||
|
||||
/**
|
||||
* 项目管理对象 qs_projects
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-19
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("qs_projects")
|
||||
public class QsProjects extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
@TableId(value = "project_id")
|
||||
private Long projectId;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Long batchId;
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
private String projectName;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 逻辑删除标志
|
||||
*/
|
||||
@TableLogic
|
||||
private String delFlag;
|
||||
/**
|
||||
* 项目当前所处阶段
|
||||
*/
|
||||
private Long currentMasterStageId;
|
||||
/**
|
||||
* 项目完成情况
|
||||
*/
|
||||
private String projectCompletion;
|
||||
/**
|
||||
* 项目开始时间
|
||||
*/
|
||||
private Date startDate;
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private Date endTime;
|
||||
|
||||
/**
|
||||
* 批次对象
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private QsBatch batch;
|
||||
|
||||
/**
|
||||
* 批次名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String batchName;
|
||||
|
||||
/**
|
||||
* 规格参数
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String specInfo;
|
||||
|
||||
/**
|
||||
* 阶段名称,内部使用
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String stageName;
|
||||
|
||||
/**
|
||||
* 阶段显示名称,用户看到的
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String stageDisplayName;
|
||||
|
||||
/**
|
||||
* 是否为并行阶段
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String isParallelContainer;
|
||||
|
||||
/**
|
||||
* 并行阶段完成情况
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String parallelProgress;
|
||||
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
package net.ferrum.business.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
import net.ferrum.common.core.domain.BaseEntity;
|
||||
import net.ferrum.common.core.domain.entity.SysRole;
|
||||
|
||||
/**
|
||||
* 规格类型对象 qs_spec_attribute_types
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-19
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("qs_spec_attribute_types")
|
||||
public class QsSpecAttributeTypes extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 规格参数类型ID
|
||||
*/
|
||||
@TableId(value = "type_id")
|
||||
private Long typeId;
|
||||
/**
|
||||
* 规格参数类别
|
||||
*/
|
||||
private String typeName;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 逻辑删除标志
|
||||
*/
|
||||
@TableLogic
|
||||
private String delFlag;
|
||||
|
||||
/**
|
||||
* 角色对象
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private List<QsSpecAttributeValues> specValues;
|
||||
|
||||
}
|
||||
@ -0,0 +1,60 @@
|
||||
package net.ferrum.business.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import lombok.NoArgsConstructor;
|
||||
import net.ferrum.common.core.domain.BaseEntity;
|
||||
import net.ferrum.common.core.domain.entity.SysDept;
|
||||
|
||||
/**
|
||||
* 规格参数值对象 qs_spec_attribute_values
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-19
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("qs_spec_attribute_values")
|
||||
public class QsSpecAttributeValues extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 规格参数值ID
|
||||
*/
|
||||
@TableId(value = "value_id")
|
||||
private Long valueId;
|
||||
/**
|
||||
* 规格参数类型ID
|
||||
*/
|
||||
private Long typeId;
|
||||
/**
|
||||
* 规格参数具体值
|
||||
*/
|
||||
private String value;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 逻辑删除标志
|
||||
*/
|
||||
@TableLogic
|
||||
private String delFlag;
|
||||
|
||||
/**
|
||||
* 规格参数类型对象
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private QsSpecAttributeTypes specType;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String specTypeName;
|
||||
|
||||
}
|
||||
@ -1,34 +1,35 @@
|
||||
package net.ferrum.business.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import net.ferrum.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 用户-供应商关系表
|
||||
* userSupplier对象 qs_user_supplier
|
||||
*
|
||||
* @author 26554
|
||||
* @version 1.0.0
|
||||
* @since 2025-03-05
|
||||
* @author tzx
|
||||
* @date 2025-07-13
|
||||
*/
|
||||
@Data
|
||||
@TableName("qs_user_supplier")
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class QsUserSupplier {
|
||||
|
||||
/**
|
||||
* 用户主键
|
||||
*/
|
||||
@TableField
|
||||
private Long userId;
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 供应商主键
|
||||
* ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private Long userId;
|
||||
/**
|
||||
* 供应商ID
|
||||
*/
|
||||
@TableField
|
||||
private Long supplierId;
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,66 @@
|
||||
package net.ferrum.business.domain.bo;
|
||||
|
||||
import net.ferrum.common.core.validate.AddGroup;
|
||||
import net.ferrum.common.core.validate.EditGroup;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import net.ferrum.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 批次管理业务对象 qs_batch
|
||||
*
|
||||
* @author tiezx
|
||||
* @date 2025-07-18
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class QsBatchBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 批次ID
|
||||
*/
|
||||
@NotNull(message = "批次ID不能为空", groups = { EditGroup.class })
|
||||
private Long batchId;
|
||||
|
||||
/**
|
||||
* 批次编号
|
||||
*/
|
||||
@NotBlank(message = "批次编号不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String batchNo;
|
||||
|
||||
/**
|
||||
* 批次名称
|
||||
*/
|
||||
@NotBlank(message = "批次名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String batchName;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
@NotNull(message = "开始时间不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Date batchStartDate;
|
||||
|
||||
/**
|
||||
* 计划结束时间
|
||||
*/
|
||||
@NotNull(message = "计划结束时间不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Date batchPlanEndDate;
|
||||
|
||||
/**
|
||||
* 结束日期
|
||||
*/
|
||||
private Date batchEndDate;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
// @NotBlank(message = "备注不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,68 @@
|
||||
package net.ferrum.business.domain.bo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import net.ferrum.common.core.validate.AddGroup;
|
||||
import net.ferrum.common.core.validate.EditGroup;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import net.ferrum.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 项目规格业务对象 qs_project_attributes
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-24
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class QsProjectAttributesBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 项目属性关联Id
|
||||
*/
|
||||
@NotNull(message = "项目属性关联Id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@NotNull(message = "不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@NotNull(message = "不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long typeId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@NotNull(message = "不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long valueId;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 规格参数具体值
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String value;
|
||||
|
||||
/**
|
||||
* 规格参数类型的名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String typeName;
|
||||
|
||||
}
|
||||
@ -0,0 +1,86 @@
|
||||
package net.ferrum.business.domain.bo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import net.ferrum.common.core.validate.AddGroup;
|
||||
import net.ferrum.common.core.validate.EditGroup;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import net.ferrum.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 项目管理业务对象 qs_projects
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-19
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class QsProjectsBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
@NotNull(message = "项目ID不能为空", groups = { EditGroup.class })
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@NotNull(message = "不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long batchId;
|
||||
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
@NotBlank(message = "项目名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String projectName;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 项目当前所处阶段
|
||||
*/
|
||||
private Long currentMasterStageId;
|
||||
|
||||
/**
|
||||
* 项目完成情况
|
||||
*/
|
||||
private String projectCompletion;
|
||||
|
||||
/**
|
||||
* 项目开始时间
|
||||
*/
|
||||
@NotNull(message = "项目开始时间不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Date startDate;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private Date endTime;
|
||||
|
||||
/**
|
||||
* 批次名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String batchName;
|
||||
|
||||
/**
|
||||
* 规格参数列表
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private List<QsProjectAttributesBo> specInfoList;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,44 @@
|
||||
package net.ferrum.business.domain.bo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import net.ferrum.common.core.validate.AddGroup;
|
||||
import net.ferrum.common.core.validate.EditGroup;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import net.ferrum.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 规格类型业务对象 qs_spec_attribute_types
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-19
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class QsSpecAttributeTypesBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 规格参数类型ID
|
||||
*/
|
||||
@NotNull(message = "规格参数类型ID不能为空", groups = { EditGroup.class })
|
||||
private Long typeId;
|
||||
|
||||
/**
|
||||
* 规格参数类别
|
||||
*/
|
||||
@NotBlank(message = "规格参数类别不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String typeName;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,57 @@
|
||||
package net.ferrum.business.domain.bo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import net.ferrum.common.core.validate.AddGroup;
|
||||
import net.ferrum.common.core.validate.EditGroup;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import net.ferrum.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 规格参数值业务对象 qs_spec_attribute_values
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-19
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class QsSpecAttributeValuesBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 规格参数值ID
|
||||
*/
|
||||
@NotNull(message = "规格参数值ID不能为空", groups = { EditGroup.class })
|
||||
private Long valueId;
|
||||
|
||||
/**
|
||||
* 规格参数类型ID
|
||||
*/
|
||||
@NotNull(message = "规格参数类型ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long typeId;
|
||||
|
||||
/**
|
||||
* 规格参数具体值
|
||||
*/
|
||||
@NotBlank(message = "规格参数具体值不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String value;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
/**
|
||||
* 批次名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String batchName;
|
||||
|
||||
|
||||
}
|
||||
@ -2,12 +2,15 @@ package net.ferrum.business.domain.bo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import net.ferrum.business.domain.vo.QsUserSupplierVo;
|
||||
import net.ferrum.common.core.domain.BaseEntity;
|
||||
import net.ferrum.common.core.validate.AddGroup;
|
||||
import net.ferrum.common.core.validate.EditGroup;
|
||||
import net.ferrum.system.domain.vo.SysUserBasicInfoVo;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 供应商信息业务对象 qs_supplier
|
||||
@ -57,5 +60,18 @@ public class QsSupplierBo extends BaseEntity {
|
||||
//@NotBlank(message = "备注不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 供应商管理人,前端向后传输查询参数时使用
|
||||
*/
|
||||
private List<String> supplierManagers;
|
||||
|
||||
/**
|
||||
* 供应商管理人,前端向后传输更新或增加参数时使用
|
||||
*/
|
||||
private List<QsUserSupplierVo> dockerUsers;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,41 @@
|
||||
package net.ferrum.business.domain.bo;
|
||||
|
||||
import net.ferrum.common.core.validate.AddGroup;
|
||||
import net.ferrum.common.core.validate.EditGroup;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import net.ferrum.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* userSupplier业务对象 qs_user_supplier
|
||||
*
|
||||
* @author tzx
|
||||
* @date 2025-07-13
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class QsUserSupplierBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@NotNull(message = "ID不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@NotNull(message = "用户ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 供应商ID
|
||||
*/
|
||||
@NotNull(message = "供应商ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long supplierId;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,65 @@
|
||||
package net.ferrum.business.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* 批次管理视图对象 qs_batch
|
||||
*
|
||||
* @author tiezx
|
||||
* @date 2025-07-18
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class QsBatchVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 批次ID
|
||||
*/
|
||||
@ExcelProperty(value = "批次ID")
|
||||
private Long batchId;
|
||||
|
||||
/**
|
||||
* 批次编号
|
||||
*/
|
||||
@ExcelProperty(value = "批次编号")
|
||||
private String batchNo;
|
||||
|
||||
/**
|
||||
* 批次名称
|
||||
*/
|
||||
@ExcelProperty(value = "批次名称")
|
||||
private String batchName;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
@ExcelProperty(value = "开始时间")
|
||||
private Date batchStartDate;
|
||||
|
||||
/**
|
||||
* 计划结束时间
|
||||
*/
|
||||
@ExcelProperty(value = "计划结束时间")
|
||||
private Date batchPlanEndDate;
|
||||
|
||||
/**
|
||||
* 结束日期
|
||||
*/
|
||||
@ExcelProperty(value = "结束日期")
|
||||
private Date batchEndDate;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package net.ferrum.business.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import net.ferrum.common.annotation.ExcelDictFormat;
|
||||
import net.ferrum.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 项目规格视图对象 qs_project_attributes
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-24
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class QsProjectAttributesVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 项目属性关联Id
|
||||
*/
|
||||
@ExcelProperty(value = "项目属性关联Id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ExcelProperty(value = "")
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ExcelProperty(value = "")
|
||||
private Long typeId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ExcelProperty(value = "")
|
||||
private Long valueId;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 规格设定值
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String value;
|
||||
|
||||
}
|
||||
@ -0,0 +1,75 @@
|
||||
package net.ferrum.business.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import net.ferrum.common.annotation.ExcelDictFormat;
|
||||
import net.ferrum.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 项目管理视图对象 qs_projects
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-19
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class QsProjectsVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
@ExcelProperty(value = "项目ID")
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ExcelProperty(value = "")
|
||||
private Long batchId;
|
||||
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
@ExcelProperty(value = "项目名称")
|
||||
private String projectName;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 项目当前所处阶段
|
||||
*/
|
||||
@ExcelProperty(value = "项目当前所处阶段")
|
||||
private Long currentMasterStageId;
|
||||
|
||||
/**
|
||||
* 项目完成情况
|
||||
*/
|
||||
@ExcelProperty(value = "项目完成情况")
|
||||
private String projectCompletion;
|
||||
|
||||
/**
|
||||
* 项目开始时间
|
||||
*/
|
||||
@ExcelProperty(value = "项目开始时间")
|
||||
private Date startDate;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
@ExcelProperty(value = "结束时间")
|
||||
private Date endTime;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,43 @@
|
||||
package net.ferrum.business.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import net.ferrum.common.annotation.ExcelDictFormat;
|
||||
import net.ferrum.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 规格类型视图对象 qs_spec_attribute_types
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-19
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class QsSpecAttributeTypesVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 规格参数类型ID
|
||||
*/
|
||||
@ExcelProperty(value = "规格参数类型ID")
|
||||
private Long typeId;
|
||||
|
||||
/**
|
||||
* 规格参数类别
|
||||
*/
|
||||
@ExcelProperty(value = "规格参数类别")
|
||||
private String typeName;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,43 @@
|
||||
package net.ferrum.business.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import net.ferrum.common.annotation.ExcelDictFormat;
|
||||
import net.ferrum.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 规格参数值视图对象 qs_spec_attribute_values
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-19
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class QsSpecAttributeValuesVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 规格参数类型ID
|
||||
*/
|
||||
@ExcelProperty(value = "规格参数类型ID")
|
||||
private Long typeId;
|
||||
|
||||
/**
|
||||
* 规格参数具体值
|
||||
*/
|
||||
@ExcelProperty(value = "规格参数具体值")
|
||||
private String value;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@ -60,5 +60,5 @@ public class QsSupplierVo implements Serializable {
|
||||
/**
|
||||
* 对接人
|
||||
*/
|
||||
private List<SysUserBasicInfoVo> dockerUsers;
|
||||
private List<QsUserSupplierVo> dockerUsers;
|
||||
}
|
||||
|
||||
@ -0,0 +1,57 @@
|
||||
package net.ferrum.business.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* userSupplier视图对象 qs_user_supplier
|
||||
*
|
||||
* @author tzx
|
||||
* @date 2025-07-13
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class QsUserSupplierVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@ExcelProperty(value = "ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@ExcelProperty(value = "用户ID")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 用户账号
|
||||
*/
|
||||
@ExcelProperty(value = "用户账号")
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 用户昵称
|
||||
*/
|
||||
@ExcelProperty(value = "用户昵称")
|
||||
private String nickName;
|
||||
|
||||
/**
|
||||
* 供应商ID
|
||||
*/
|
||||
@ExcelProperty(value = "供应商ID")
|
||||
private Long supplierId;
|
||||
|
||||
/**
|
||||
* 供应商名称
|
||||
*/
|
||||
@ExcelProperty(value = "供应商名称")
|
||||
private String supplierName;
|
||||
|
||||
private String del; //标志是否被用户删除
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package net.ferrum.business.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import net.ferrum.business.domain.QsBatch;
|
||||
import net.ferrum.business.domain.vo.QsBatchVo;
|
||||
import net.ferrum.common.core.mapper.BaseMapperPlus;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import java.util.List;
|
||||
/**
|
||||
* 批次管理Mapper接口
|
||||
*
|
||||
* @author tiezx
|
||||
* @date 2025-07-18
|
||||
*/
|
||||
public interface QsBatchMapper extends BaseMapperPlus<QsBatchMapper, QsBatch, QsBatchVo> {
|
||||
public List<QsBatch> selectBatchList( @Param(Constants.WRAPPER) Wrapper<QsBatch> queryWrapper);
|
||||
}
|
||||
@ -3,6 +3,7 @@ package net.ferrum.business.mapper;
|
||||
import net.ferrum.business.domain.QsOperatorRecord;
|
||||
import net.ferrum.business.domain.vo.QsOperatorRecordVo;
|
||||
import net.ferrum.common.core.mapper.BaseMapperPlus;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 操作员操作记录Mapper接口
|
||||
@ -10,6 +11,7 @@ import net.ferrum.common.core.mapper.BaseMapperPlus;
|
||||
* @author 26554
|
||||
* @date 2025-04-21
|
||||
*/
|
||||
//@Mapper
|
||||
public interface QsOperatorRecordMapper extends BaseMapperPlus<QsOperatorRecordMapper, QsOperatorRecord, QsOperatorRecordVo> {
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,22 @@
|
||||
package net.ferrum.business.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import net.ferrum.business.domain.QsProjectAttributes;
|
||||
import net.ferrum.business.domain.vo.QsProjectAttributesVo;
|
||||
import net.ferrum.common.core.mapper.BaseMapperPlus;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 项目规格Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-24
|
||||
*/
|
||||
public interface QsProjectAttributesMapper extends BaseMapperPlus<QsProjectAttributesMapper, QsProjectAttributes, QsProjectAttributesVo> {
|
||||
public List<QsProjectAttributesVo> selectProjSpecInfoList(@Param(Constants.WRAPPER) QueryWrapper<QsProjectAttributes> queryWrapper);
|
||||
public int deleteByProjectId(Long userId);
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package net.ferrum.business.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import net.ferrum.business.domain.QsBatch;
|
||||
import net.ferrum.business.domain.QsProjects;
|
||||
import net.ferrum.business.domain.QsSpecAttributeValues;
|
||||
import net.ferrum.business.domain.bo.QsProjectsBo;
|
||||
import net.ferrum.business.domain.vo.QsProjectsVo;
|
||||
import net.ferrum.common.core.mapper.BaseMapperPlus;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 项目管理Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-19
|
||||
*/
|
||||
public interface QsProjectsMapper extends BaseMapperPlus<QsProjectsMapper, QsProjects, QsProjectsVo> {
|
||||
Page<QsProjects> selectPageQsProjectsList(@Param("page") Page<QsProjects> page, @Param(Constants.WRAPPER) Wrapper<QsProjects> queryWrapper);
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package net.ferrum.business.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import net.ferrum.business.domain.QsSpecAttributeTypes;
|
||||
import net.ferrum.business.domain.vo.QsSpecAttributeTypesVo;
|
||||
import net.ferrum.common.core.domain.entity.SysUser;
|
||||
import net.ferrum.common.core.mapper.BaseMapperPlus;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 规格类型Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-19
|
||||
*/
|
||||
@Mapper
|
||||
public interface QsSpecAttributeTypesMapper extends BaseMapperPlus<QsSpecAttributeTypesMapper, QsSpecAttributeTypes, QsSpecAttributeTypesVo> {
|
||||
|
||||
public List<QsSpecAttributeTypes> selectSpecAttributeTypesList(@Param(Constants.WRAPPER) Wrapper<QsSpecAttributeTypes> queryWrapper);
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
package net.ferrum.business.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import net.ferrum.business.domain.QsSpecAttributeValues;
|
||||
import net.ferrum.business.domain.vo.QsSpecAttributeValuesVo;
|
||||
import net.ferrum.business.domain.QsSpecAttributeValues;
|
||||
import net.ferrum.common.core.mapper.BaseMapperPlus;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 规格参数值Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-19
|
||||
*/
|
||||
@Mapper
|
||||
public interface QsSpecAttributeValuesMapper extends BaseMapperPlus<QsSpecAttributeValuesMapper, QsSpecAttributeValues, QsSpecAttributeValuesVo> {
|
||||
|
||||
Page<QsSpecAttributeValues> selectPageSpecAttributeValuesList(@Param("page") Page<QsSpecAttributeValues> page, @Param(Constants.WRAPPER) Wrapper<QsSpecAttributeValues> queryWrapper);
|
||||
|
||||
List<QsSpecAttributeValues> selectSpecAttributeValuesByTypesId(@Param("typeId")Long typeId);
|
||||
}
|
||||
@ -3,6 +3,7 @@ package net.ferrum.business.mapper;
|
||||
import net.ferrum.business.domain.QsSupplier;
|
||||
import net.ferrum.business.domain.vo.QsSupplierVo;
|
||||
import net.ferrum.common.core.mapper.BaseMapperPlus;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 供应商信息Mapper接口
|
||||
@ -11,6 +12,8 @@ import net.ferrum.common.core.mapper.BaseMapperPlus;
|
||||
* @version 1.0.0
|
||||
* @since 2025-03-05
|
||||
*/
|
||||
|
||||
//@Mapper
|
||||
public interface QsSupplierMapper extends BaseMapperPlus<QsSupplierMapper, QsSupplier, QsSupplierVo> {
|
||||
|
||||
}
|
||||
|
||||
@ -1,14 +1,39 @@
|
||||
package net.ferrum.business.mapper;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import net.ferrum.business.domain.QsSupplier;
|
||||
import net.ferrum.business.domain.QsUserSupplier;
|
||||
import net.ferrum.business.domain.bo.QsSupplierBo;
|
||||
import net.ferrum.business.domain.vo.QsSupplierVo;
|
||||
import net.ferrum.business.domain.vo.QsUserSupplierVo;
|
||||
import net.ferrum.common.core.domain.entity.SysUser;
|
||||
import net.ferrum.common.core.mapper.BaseMapperPlus;
|
||||
import net.ferrum.common.core.page.TableDataInfo;
|
||||
import net.ferrum.common.utils.BeanCopyUtils;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户-供应商关联表 数据层
|
||||
* userSupplierMapper接口
|
||||
*
|
||||
* @author 26554
|
||||
* @version 1.0.0
|
||||
* @since 2025-03-05
|
||||
* @author tzx
|
||||
* @date 2025-07-13
|
||||
*/
|
||||
public interface QsUserSupplierMapper extends BaseMapperPlus<QsUserSupplierMapper, QsUserSupplier, QsUserSupplier> {
|
||||
|
||||
public interface QsUserSupplierMapper extends BaseMapperPlus<QsUserSupplierMapper, QsUserSupplier, QsUserSupplierVo> {
|
||||
|
||||
Page<QsSupplierVo> selectSuppliersByUsersPages(@Param("page") Page<QsSupplierVo> page,@Param("bo")QsSupplierBo bo);
|
||||
//Page<QsSupplierVo> selectSuppliersByUsersPages(@Param("page") Page<QsSupplierVo> page, @Param(Constants.WRAPPER) Wrapper<SysUser> queryWrapper);
|
||||
|
||||
List<QsUserSupplierVo> selectUsersbySupplierId(@Param("supplierId")Long supplierId);
|
||||
|
||||
@Override
|
||||
default Class<QsUserSupplierMapper> currentMapperClass() {
|
||||
return BaseMapperPlus.super.currentMapperClass();
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,55 @@
|
||||
package net.ferrum.business.service;
|
||||
|
||||
import net.ferrum.business.domain.QsBatch;
|
||||
import net.ferrum.business.domain.vo.QsBatchVo;
|
||||
import net.ferrum.business.domain.bo.QsBatchBo;
|
||||
import net.ferrum.common.core.page.TableDataInfo;
|
||||
import net.ferrum.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 批次管理Service接口
|
||||
*
|
||||
* @author tiezx
|
||||
* @date 2025-07-18
|
||||
*/
|
||||
public interface IQsBatchService {
|
||||
|
||||
/**
|
||||
* 查询批次管理
|
||||
*/
|
||||
QsBatchVo queryById(Long batchId);
|
||||
|
||||
/**
|
||||
* 查询批次管理列表
|
||||
*/
|
||||
TableDataInfo<QsBatchVo> queryPageList(QsBatchBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询批次管理列表
|
||||
*/
|
||||
List<QsBatchVo> queryList(QsBatchBo bo);
|
||||
|
||||
/**
|
||||
* 新增批次管理
|
||||
*/
|
||||
Boolean insertByBo(QsBatchBo bo);
|
||||
|
||||
/**
|
||||
* 修改批次管理
|
||||
*/
|
||||
Boolean updateByBo(QsBatchBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除批次管理信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 获取规批次列表
|
||||
*
|
||||
*/
|
||||
List<QsBatch> selectBatchList(QsBatch entity);
|
||||
}
|
||||
@ -0,0 +1,54 @@
|
||||
package net.ferrum.business.service;
|
||||
|
||||
import net.ferrum.business.domain.QsProjectAttributes;
|
||||
import net.ferrum.business.domain.vo.QsProjectAttributesVo;
|
||||
import net.ferrum.business.domain.bo.QsProjectAttributesBo;
|
||||
import net.ferrum.common.core.page.TableDataInfo;
|
||||
import net.ferrum.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 项目规格Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-24
|
||||
*/
|
||||
public interface IQsProjectAttributesService {
|
||||
|
||||
/**
|
||||
* 查询项目规格
|
||||
*/
|
||||
QsProjectAttributesVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 查询项目规格列表
|
||||
*/
|
||||
TableDataInfo<QsProjectAttributesVo> queryPageList(QsProjectAttributesBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询项目规格列表
|
||||
*/
|
||||
List<QsProjectAttributesVo> queryList(QsProjectAttributesBo bo);
|
||||
|
||||
/**
|
||||
* 新增项目规格
|
||||
*/
|
||||
Boolean insertByBo(QsProjectAttributesBo bo);
|
||||
|
||||
/**
|
||||
* 修改项目规格
|
||||
*/
|
||||
Boolean updateByBo(QsProjectAttributesBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除项目规格信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 根据项目ID批量删除项目规格
|
||||
*/
|
||||
public boolean deleteByProjectId(Long projectId);
|
||||
}
|
||||
@ -1,48 +0,0 @@
|
||||
package net.ferrum.business.service;
|
||||
|
||||
import net.ferrum.business.domain.bo.QsProjectBo;
|
||||
import net.ferrum.business.domain.vo.QsProjectVo;
|
||||
import net.ferrum.common.core.domain.PageQuery;
|
||||
import net.ferrum.common.core.page.TableDataInfo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 模板信息Service接口
|
||||
*
|
||||
* @author 26554
|
||||
* @date 2025-04-21
|
||||
*/
|
||||
public interface IQsProjectService {
|
||||
|
||||
/**
|
||||
* 查询模板信息
|
||||
*/
|
||||
QsProjectVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 查询模板信息列表
|
||||
*/
|
||||
TableDataInfo<QsProjectVo> queryPageList(QsProjectBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询模板信息列表
|
||||
*/
|
||||
List<QsProjectVo> queryList(QsProjectBo bo);
|
||||
|
||||
/**
|
||||
* 新增模板信息
|
||||
*/
|
||||
Boolean insertByBo(QsProjectBo bo);
|
||||
|
||||
/**
|
||||
* 修改模板信息
|
||||
*/
|
||||
Boolean updateByBo(QsProjectBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除模板信息信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
package net.ferrum.business.service;
|
||||
|
||||
import net.ferrum.business.domain.QsProjects;
|
||||
import net.ferrum.business.domain.vo.QsProjectsVo;
|
||||
import net.ferrum.business.domain.bo.QsProjectsBo;
|
||||
import net.ferrum.common.core.page.TableDataInfo;
|
||||
import net.ferrum.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 项目管理Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-19
|
||||
*/
|
||||
public interface IQsProjectsService {
|
||||
|
||||
/**
|
||||
* 查询项目管理
|
||||
*/
|
||||
QsProjectsVo queryById(Long projectId);
|
||||
|
||||
/**
|
||||
* 查询项目
|
||||
*/
|
||||
QsProjects selectById(Long projectId);
|
||||
|
||||
/**
|
||||
* 查询项目管理列表
|
||||
*/
|
||||
TableDataInfo<QsProjects> queryPageList(QsProjects entity, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询项目管理列表
|
||||
*/
|
||||
List<QsProjectsVo> queryList(QsProjectsBo bo);
|
||||
|
||||
/**
|
||||
* 新增项目管理
|
||||
*/
|
||||
Boolean insertByBo(QsProjectsBo bo);
|
||||
|
||||
/**
|
||||
* 修改项目管理
|
||||
*/
|
||||
Boolean updateByBo(QsProjectsBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除项目管理信息
|
||||
*/
|
||||
String deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 校验项目是否已经开工
|
||||
*
|
||||
* @param projectId 项目ID
|
||||
* @return 结果
|
||||
*/
|
||||
public boolean checkProjectInProcessing(Long projectId);
|
||||
}
|
||||
@ -0,0 +1,56 @@
|
||||
package net.ferrum.business.service;
|
||||
|
||||
import net.ferrum.business.domain.QsSpecAttributeTypes;
|
||||
import net.ferrum.business.domain.vo.QsSpecAttributeTypesVo;
|
||||
import net.ferrum.business.domain.bo.QsSpecAttributeTypesBo;
|
||||
import net.ferrum.common.core.page.TableDataInfo;
|
||||
import net.ferrum.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 规格类型Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-19
|
||||
*/
|
||||
public interface IQsSpecAttributeTypesService {
|
||||
|
||||
/**
|
||||
* 查询规格类型
|
||||
*/
|
||||
QsSpecAttributeTypesVo queryById(Long typeId);
|
||||
|
||||
/**
|
||||
* 查询规格类型列表
|
||||
*/
|
||||
TableDataInfo<QsSpecAttributeTypesVo> queryPageList(QsSpecAttributeTypesBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询规格类型列表
|
||||
*/
|
||||
List<QsSpecAttributeTypesVo> queryList(QsSpecAttributeTypesBo bo);
|
||||
|
||||
/**
|
||||
* 新增规格类型
|
||||
*/
|
||||
Boolean insertByBo(QsSpecAttributeTypesBo bo);
|
||||
|
||||
/**
|
||||
* 修改规格类型
|
||||
*/
|
||||
Boolean updateByBo(QsSpecAttributeTypesBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除规格类型信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 获取规格参数类型列表
|
||||
*
|
||||
*/
|
||||
public List<QsSpecAttributeTypes> selectSpecAttributeTypesList(QsSpecAttributeTypes type) ;
|
||||
|
||||
}
|
||||
@ -0,0 +1,58 @@
|
||||
package net.ferrum.business.service;
|
||||
|
||||
import net.ferrum.business.domain.QsSpecAttributeTypes;
|
||||
import net.ferrum.business.domain.QsSpecAttributeValues;
|
||||
import net.ferrum.business.domain.vo.QsSpecAttributeValuesVo;
|
||||
import net.ferrum.business.domain.bo.QsSpecAttributeValuesBo;
|
||||
import net.ferrum.common.core.domain.entity.SysUser;
|
||||
import net.ferrum.common.core.page.TableDataInfo;
|
||||
import net.ferrum.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 规格参数值Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-19
|
||||
*/
|
||||
public interface IQsSpecAttributeValuesService {
|
||||
|
||||
TableDataInfo<QsSpecAttributeValues>selectPageSpecAttributeValuesList(QsSpecAttributeValues specAttributeValues, PageQuery pageQuery) ;
|
||||
/**
|
||||
* 查询规格参数值
|
||||
*/
|
||||
QsSpecAttributeValuesVo queryById(Long valueId);
|
||||
|
||||
/**
|
||||
* 查询规格参数值列表
|
||||
*/
|
||||
TableDataInfo<QsSpecAttributeValuesVo> queryPageList(QsSpecAttributeValuesBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询规格参数值列表
|
||||
*/
|
||||
List<QsSpecAttributeValuesVo> queryList(QsSpecAttributeValuesBo bo);
|
||||
|
||||
/**
|
||||
* 新增规格参数值
|
||||
*/
|
||||
Boolean insertByBo(QsSpecAttributeValuesBo bo);
|
||||
|
||||
/**
|
||||
* 修改规格参数值
|
||||
*/
|
||||
Boolean updateByBo(QsSpecAttributeValuesBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除规格参数值信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 根据规格类型id得到本类中的所有规格参数
|
||||
*/
|
||||
public List<QsSpecAttributeValues> selectSpecAttributeValuesByTypesId(Long typeId);
|
||||
|
||||
}
|
||||
@ -0,0 +1,57 @@
|
||||
package net.ferrum.business.service;
|
||||
|
||||
import net.ferrum.business.domain.QsUserSupplier;
|
||||
import net.ferrum.business.domain.bo.QsSupplierBo;
|
||||
import net.ferrum.business.domain.vo.QsSupplierVo;
|
||||
import net.ferrum.business.domain.vo.QsUserSupplierVo;
|
||||
import net.ferrum.business.domain.bo.QsUserSupplierBo;
|
||||
import net.ferrum.common.core.page.TableDataInfo;
|
||||
import net.ferrum.common.core.domain.PageQuery;
|
||||
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* userSupplierService接口
|
||||
*
|
||||
* @author tzx
|
||||
* @date 2025-07-13
|
||||
*/
|
||||
public interface IQsUserSupplierService {
|
||||
|
||||
/**
|
||||
* 查询userSupplier
|
||||
*/
|
||||
QsUserSupplierVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 查询userSupplier列表
|
||||
*/
|
||||
TableDataInfo<QsUserSupplierVo> queryPageList(QsUserSupplierBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询userSupplier列表
|
||||
*/
|
||||
List<QsUserSupplierVo> queryList(QsUserSupplierBo bo);
|
||||
|
||||
/**
|
||||
* 新增userSupplier
|
||||
*/
|
||||
Boolean insertByBo(QsUserSupplierBo bo);
|
||||
|
||||
/**
|
||||
* 修改userSupplier
|
||||
*/
|
||||
Boolean updateByBo(QsUserSupplierBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除userSupplier信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 查询userSupplier
|
||||
*/
|
||||
TableDataInfo<QsSupplierVo> selectSuppliersByUsersPages(QsSupplierBo bo,PageQuery pageQuery);
|
||||
}
|
||||
@ -0,0 +1,147 @@
|
||||
package net.ferrum.business.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import net.ferrum.business.domain.QsSpecAttributeTypes;
|
||||
import net.ferrum.common.utils.DateUtils;
|
||||
import net.ferrum.common.utils.StringUtils;
|
||||
import net.ferrum.common.core.page.TableDataInfo;
|
||||
import net.ferrum.common.core.domain.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import net.ferrum.system.service.ISysConfigService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import net.ferrum.business.domain.bo.QsBatchBo;
|
||||
import net.ferrum.business.domain.vo.QsBatchVo;
|
||||
import net.ferrum.business.domain.QsBatch;
|
||||
import net.ferrum.business.mapper.QsBatchMapper;
|
||||
import net.ferrum.business.service.IQsBatchService;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 批次管理Service业务层处理
|
||||
*
|
||||
* @author tiezx
|
||||
* @date 2025-07-18
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class QsBatchServiceImpl implements IQsBatchService {
|
||||
|
||||
private final QsBatchMapper baseMapper;
|
||||
private final ISysConfigService configService;
|
||||
|
||||
/**
|
||||
* 查询批次管理
|
||||
*/
|
||||
@Override
|
||||
public QsBatchVo queryById(Long batchId){
|
||||
return baseMapper.selectVoById(batchId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询批次管理列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<QsBatchVo> queryPageList(QsBatchBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<QsBatch> lqw = buildQueryWrapper(bo);
|
||||
Page<QsBatchVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询批次管理列表
|
||||
*/
|
||||
@Override
|
||||
public List<QsBatchVo> queryList(QsBatchBo bo) {
|
||||
LambdaQueryWrapper<QsBatch> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<QsBatch> buildQueryWrapper(QsBatchBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<QsBatch> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getBatchNo()), QsBatch::getBatchNo, bo.getBatchNo());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getBatchName()), QsBatch::getBatchName, bo.getBatchName());
|
||||
lqw.between(params.get("beginBatchStartDate") != null && params.get("endBatchStartDate") != null,
|
||||
QsBatch::getBatchStartDate ,params.get("beginBatchStartDate"), params.get("endBatchStartDate"));
|
||||
lqw.between(params.get("beginBatchPlanEndDate") != null && params.get("endBatchPlanEndDate") != null,
|
||||
QsBatch::getBatchPlanEndDate ,params.get("beginBatchPlanEndDate"), params.get("endBatchPlanEndDate"));
|
||||
lqw.between(params.get("beginBatchEndDate") != null && params.get("endBatchEndDate") != null,
|
||||
QsBatch::getBatchEndDate ,params.get("beginBatchEndDate"), params.get("endBatchEndDate"));
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增批次管理
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(QsBatchBo bo) {
|
||||
QsBatch add = BeanUtil.toBean(bo, QsBatch.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setBatchId(add.getBatchId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改批次管理
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(QsBatchBo bo) {
|
||||
QsBatch update = BeanUtil.toBean(bo, QsBatch.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(QsBatch entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除批次管理
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询批次
|
||||
*
|
||||
* @param entity 要查询的规格参数类型批次参数
|
||||
* @return 批次信息集合
|
||||
*/
|
||||
@Override
|
||||
public List<QsBatch> selectBatchList(QsBatch entity) {
|
||||
LambdaQueryWrapper<QsBatch> lqw = new LambdaQueryWrapper<>();
|
||||
Map<String, Object> params = entity.getParams();
|
||||
lqw.eq(QsBatch::getDelFlag, "0")
|
||||
.eq(ObjectUtil.isNotNull(entity.getBatchId()), QsBatch::getBatchId, entity.getBatchId())
|
||||
.like(StringUtils.isNotBlank(entity.getBatchName()), QsBatch::getBatchName, entity.getBatchName() );
|
||||
|
||||
if(params.get("CurrentDate") != null){
|
||||
String sysConfig = configService.selectConfigByKey("work.create.queryBatchStartDateRange");
|
||||
Integer month = -1 * Integer.parseInt(sysConfig);
|
||||
Date d = DateUtils.parseDate(params.get("CurrentDate"));
|
||||
Date d1 = DateUtils.addMonths(d,month);
|
||||
lqw.between(ObjectUtil.isNotNull(entity.getBatchStartDate()), QsBatch::getBatchStartDate ,d1, d);
|
||||
}
|
||||
|
||||
return baseMapper.selectBatchList(lqw);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,138 @@
|
||||
package net.ferrum.business.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import net.ferrum.business.domain.QsSpecAttributeTypes;
|
||||
import net.ferrum.business.domain.QsSpecAttributeValues;
|
||||
import net.ferrum.business.domain.bo.QsSpecAttributeValuesBo;
|
||||
import net.ferrum.common.constant.UserConstants;
|
||||
import net.ferrum.common.utils.StringUtils;
|
||||
import net.ferrum.common.core.page.TableDataInfo;
|
||||
import net.ferrum.common.core.domain.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import net.ferrum.business.domain.bo.QsProjectAttributesBo;
|
||||
import net.ferrum.business.domain.vo.QsProjectAttributesVo;
|
||||
import net.ferrum.business.domain.QsProjectAttributes;
|
||||
import net.ferrum.business.mapper.QsProjectAttributesMapper;
|
||||
import net.ferrum.business.service.IQsProjectAttributesService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 项目规格Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-24
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class QsProjectAttributesServiceImpl implements IQsProjectAttributesService {
|
||||
|
||||
private final QsProjectAttributesMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询项目规格
|
||||
*/
|
||||
@Override
|
||||
public QsProjectAttributesVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询项目规格列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<QsProjectAttributesVo> queryPageList(QsProjectAttributesBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<QsProjectAttributes> lqw = buildQueryWrapperPage(bo);
|
||||
Page<QsProjectAttributesVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<QsProjectAttributes> buildQueryWrapperPage(QsProjectAttributesBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<QsProjectAttributes> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(QsProjectAttributes::getDelFlag, "0");
|
||||
lqw.eq(bo.getProjectId() != null, QsProjectAttributes::getProjectId, bo.getProjectId());
|
||||
lqw.eq(bo.getTypeId() != null, QsProjectAttributes::getTypeId, bo.getTypeId());
|
||||
lqw.eq(bo.getValueId() != null, QsProjectAttributes::getValueId, bo.getValueId());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询项目规格列表
|
||||
*/
|
||||
@Override
|
||||
public List<QsProjectAttributesVo> queryList(QsProjectAttributesBo bo) {
|
||||
QueryWrapper<QsProjectAttributes> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectProjSpecInfoList(lqw);
|
||||
}
|
||||
|
||||
private QueryWrapper<QsProjectAttributes> buildQueryWrapper(QsProjectAttributesBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
QueryWrapper<QsProjectAttributes> lqw = Wrappers.query();
|
||||
|
||||
lqw.eq("qpa.del_flag", UserConstants.NORMAL);
|
||||
lqw.eq(bo.getProjectId() != null, "qpa.project_id", bo.getProjectId());
|
||||
lqw.eq(bo.getTypeId() != null, "qpa.type_id", bo.getTypeId());
|
||||
lqw.eq(bo.getValueId() != null, "qpa.value_id", bo.getValueId());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增项目规格
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(QsProjectAttributesBo bo) {
|
||||
QsProjectAttributes add = BeanUtil.toBean(bo, QsProjectAttributes.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改项目规格
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(QsProjectAttributesBo bo) {
|
||||
QsProjectAttributes update = BeanUtil.toBean(bo, QsProjectAttributes.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(QsProjectAttributes entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除项目规格
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据项目ID批量删除项目规格
|
||||
*/
|
||||
@Override
|
||||
public boolean deleteByProjectId(Long ProjectId) {
|
||||
int rowsAffected = baseMapper.deleteByProjectId(ProjectId);
|
||||
return rowsAffected >= 0;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,317 @@
|
||||
package net.ferrum.business.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.ferrum.business.domain.bo.QsProjectAttributesBo;
|
||||
import net.ferrum.business.domain.vo.QsProjectAttributesVo;
|
||||
import net.ferrum.business.service.IQsProjectAttributesService;
|
||||
import net.ferrum.common.constant.UserConstants;
|
||||
import net.ferrum.common.utils.BeanCopyUtils;
|
||||
import net.ferrum.common.utils.StringUtils;
|
||||
import net.ferrum.common.core.page.TableDataInfo;
|
||||
import net.ferrum.common.core.domain.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import net.ferrum.business.domain.bo.QsProjectsBo;
|
||||
import net.ferrum.business.domain.vo.QsProjectsVo;
|
||||
import net.ferrum.business.domain.QsProjects;
|
||||
import net.ferrum.business.mapper.QsProjectsMapper;
|
||||
import net.ferrum.business.service.IQsProjectsService;
|
||||
import org.springframework.transaction.PlatformTransactionManager;
|
||||
import org.springframework.transaction.TransactionDefinition;
|
||||
import org.springframework.transaction.support.TransactionTemplate;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.concurrent.atomic.AtomicLongArray;
|
||||
|
||||
/**
|
||||
* 项目管理Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-19
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
@Slf4j
|
||||
public class QsProjectsServiceImpl implements IQsProjectsService {
|
||||
|
||||
private final QsProjectsMapper baseMapper;
|
||||
private final IQsProjectAttributesService iQsProjectAttributesService;
|
||||
private final PlatformTransactionManager transactionManager;
|
||||
|
||||
private final StringBuilder failureMsg = new StringBuilder();
|
||||
|
||||
/**
|
||||
* 查询项目管理
|
||||
*/
|
||||
@Override
|
||||
public QsProjectsVo queryById(Long projectId){
|
||||
return baseMapper.selectVoById(projectId);
|
||||
}
|
||||
|
||||
public QsProjects selectById(Long projectId){
|
||||
QsProjects entity = new QsProjects();
|
||||
QsProjectsVo vo = baseMapper.selectVoById(projectId);
|
||||
BeanCopyUtils.copy(vo,entity);
|
||||
PageQuery pageQuery = new PageQuery();
|
||||
pageQuery.setPageNum(1);
|
||||
pageQuery.setPageSize(10);
|
||||
TableDataInfo<QsProjects> data = queryPageList(entity,pageQuery);
|
||||
if ( !data.getRows().isEmpty() ){
|
||||
return data.getRows().get(0);
|
||||
}
|
||||
else{
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询项目管理列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<QsProjects> queryPageList(QsProjects entity, PageQuery pageQuery) {
|
||||
Wrapper<QsProjects> lqw = buildQueryWrapper(entity);
|
||||
Page<QsProjects> result = baseMapper.selectPageQsProjectsList(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询项目管理列表
|
||||
*/
|
||||
@Override
|
||||
public List<QsProjectsVo> queryList(QsProjectsBo bo) {
|
||||
QsProjects entity = new QsProjects();
|
||||
BeanCopyUtils.copy(bo,entity);
|
||||
Wrapper<QsProjects> lqw = buildQueryWrapper(entity);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private QueryWrapper<QsProjects> buildQueryWrapper(QsProjects bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
//LambdaQueryWrapper<QsProjectsBo> lqw = Wrappers.lambdaQuery();
|
||||
QueryWrapper<QsProjects> lqw = new QueryWrapper<>();
|
||||
lqw.eq("a.del_flag", UserConstants.NORMAL);
|
||||
|
||||
lqw.eq(bo.getBatchId() != null, "a.batch_id", bo.getBatchId());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getBatchName()), "b.batch_name", bo.getBatchName());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getProjectName()), "a.project_name", bo.getProjectName());
|
||||
lqw.like(bo.getStageDisplayName() != null, "ms.display_name", bo.getStageDisplayName());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getProjectCompletion()), "a.project_completion", bo.getProjectCompletion());
|
||||
lqw.between(params.get("beginStartDate") != null && params.get("endStartDate") != null,
|
||||
"a.start_date" ,params.get("beginStartDate"), params.get("endStartDate"));
|
||||
lqw.between(params.get("beginEndTime") != null && params.get("endEndTime") != null,
|
||||
"a.end_time" ,params.get("beginEndTime"), params.get("endEndTime"));
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增项目管理
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(QsProjectsBo bo) {
|
||||
|
||||
TransactionTemplate transactionTemplate = new TransactionTemplate(transactionManager);
|
||||
transactionTemplate.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRES_NEW);
|
||||
boolean updateSuccess = true;
|
||||
transactionTemplate.execute(status -> {
|
||||
try {
|
||||
// 在这里执行数据库操作,这些操作将在同一个事务中执行
|
||||
QsProjects add = BeanUtil.toBean(bo, QsProjects.class);
|
||||
//validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setProjectId(add.getProjectId());
|
||||
//插入项目所有的规格参数
|
||||
bo.getSpecInfoList().forEach(specValue -> {
|
||||
QsProjectAttributesBo specInfoBo = new QsProjectAttributesBo();
|
||||
BeanCopyUtils.copy(specValue,specInfoBo);
|
||||
specInfoBo.setProjectId(bo.getProjectId());
|
||||
if (! iQsProjectAttributesService.insertByBo(specInfoBo)) {
|
||||
String msg = "插入异常——在插入项目规格信息时出现异常!" + "参数:" + specInfoBo;
|
||||
failureMsg.append(msg);
|
||||
log.error(msg);
|
||||
throw new RuntimeException(msg);
|
||||
}
|
||||
});
|
||||
//在 qs_project_stage_status 表中插入当前项目的阶段的子并行阶段
|
||||
// 在项目表中插入项目时,默认项目当前阶段为1,第一阶段:项目建议,没有并行的子阶段,所以不用做这步操作
|
||||
}
|
||||
else{
|
||||
String msg = "插入异常——在插入项目主体信息时出现异常!" + "参数:" + bo;
|
||||
failureMsg.append(msg);
|
||||
log.error(msg);
|
||||
throw new RuntimeException(msg);
|
||||
}
|
||||
// 如果一切正常,返回null表示提交事务
|
||||
return null;
|
||||
} catch (Exception e) {
|
||||
// 如果发生异常,可以手动回滚事务
|
||||
status.setRollbackOnly();
|
||||
throw e;
|
||||
}
|
||||
});
|
||||
|
||||
return updateSuccess;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改项目管理
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(QsProjectsBo bo) {
|
||||
|
||||
TransactionTemplate transactionTemplate = new TransactionTemplate(transactionManager);
|
||||
transactionTemplate.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRES_NEW);
|
||||
boolean updateSuccess = true;
|
||||
transactionTemplate.execute(status -> {
|
||||
try {
|
||||
// 在这里执行数据库操作,这些操作将在同一个事务中执行
|
||||
QsProjectAttributesBo querySpecInfoBo = new QsProjectAttributesBo();
|
||||
querySpecInfoBo.setProjectId(bo.getProjectId());
|
||||
List<QsProjectAttributesVo> projSepcValueList =iQsProjectAttributesService.queryList(querySpecInfoBo);
|
||||
|
||||
// 将 projSepcValueList 的 id 存入 Map
|
||||
Map<Long, QsProjectAttributesVo> mapB = new HashMap<>();
|
||||
for (QsProjectAttributesVo item : projSepcValueList) {
|
||||
mapB.put(item.getId(), item);
|
||||
}
|
||||
|
||||
bo.getSpecInfoList().forEach(specValue -> {
|
||||
QsProjectAttributesVo oldSpecInfo = mapB.get(specValue.getId());
|
||||
|
||||
QsProjectAttributesBo specInfoBo = new QsProjectAttributesBo();
|
||||
|
||||
if (oldSpecInfo == null){ //没有这个规格属性,就插入一个新的
|
||||
BeanCopyUtils.copy(specValue,specInfoBo);
|
||||
specInfoBo.setProjectId(bo.getProjectId());
|
||||
if (! iQsProjectAttributesService.insertByBo(specInfoBo)) {
|
||||
String msg = "修改项目,插入异常——在插入项目规格信息时出现异常!" + "参数:" + specInfoBo;
|
||||
failureMsg.append(msg);
|
||||
log.error(msg);
|
||||
throw new RuntimeException(msg);
|
||||
}
|
||||
}
|
||||
else if (oldSpecInfo.getId().equals(specValue.getId()) &&
|
||||
!oldSpecInfo.getValue().equals(specValue.getValue())){ //规格发生改变
|
||||
BeanCopyUtils.copy(specValue,specInfoBo);
|
||||
specInfoBo.setProjectId(bo.getProjectId());
|
||||
if (! iQsProjectAttributesService.updateByBo(specInfoBo)) {
|
||||
String msg = "修改项目,更新异常——在更新项目规格信息时出现异常!" + "参数:" + specInfoBo;
|
||||
failureMsg.append(msg);
|
||||
log.error(msg);
|
||||
throw new RuntimeException(msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
QsProjects update = BeanUtil.toBean(bo, QsProjects.class);
|
||||
validEntityBeforeSave(update);
|
||||
if (!(baseMapper.updateById(update) > 0)){
|
||||
String msg = "修改项目,更新异常——在更新项目信息时出现异常!" + "参数:" + update.toString();
|
||||
failureMsg.append(msg);
|
||||
log.error(msg);
|
||||
throw new RuntimeException(msg);
|
||||
}
|
||||
|
||||
// 如果一切正常,返回null表示提交事务
|
||||
return null;
|
||||
} catch (Exception e) {
|
||||
// 如果发生异常,可以手动回滚事务
|
||||
status.setRollbackOnly();
|
||||
throw e;
|
||||
}
|
||||
});
|
||||
|
||||
return updateSuccess;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(QsProjects entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除项目管理
|
||||
*/
|
||||
@Override
|
||||
public String deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
|
||||
List <QsProjects> qsProjectList = baseMapper.selectBatchIds(ids);
|
||||
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
failureMsg.setLength(0); // 清空内容
|
||||
for (int i = 0; i < qsProjectList.size(); i++) {
|
||||
QsProjects qsProject = qsProjectList.get(i);
|
||||
if (qsProject.getCurrentMasterStageId() > UserConstants.PROJECT_START_ID) { // 项目已经开工,不允许删除
|
||||
String msg = "删除项目,项目名称:" + qsProject.getProjectName() +
|
||||
"已经开工,不能删除!";
|
||||
failureMsg.append(msg);
|
||||
}
|
||||
}
|
||||
if (failureMsg.length()>0) return failureMsg.toString();
|
||||
}
|
||||
|
||||
failureMsg.setLength(0); // 清空内容
|
||||
TransactionTemplate transactionTemplate = new TransactionTemplate(transactionManager);
|
||||
transactionTemplate.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRES_NEW);
|
||||
AtomicLongArray noDelProject = new AtomicLongArray(ids.size());
|
||||
String sRet = transactionTemplate.execute(status -> {
|
||||
try {
|
||||
// 在这里执行数据库操作,这些操作将在同一个事务中执行
|
||||
ids.forEach(projectId -> {
|
||||
QsProjects qsProject = baseMapper.selectById(projectId);
|
||||
if(qsProject == null){return;}
|
||||
//删除 项目的规格参数
|
||||
if(!iQsProjectAttributesService.deleteByProjectId(projectId)){
|
||||
String msg = "删除项目,删除异常——在删除项目规格信息时出现异常!" + "参数:" + qsProject;
|
||||
failureMsg.append(msg);
|
||||
log.error(msg);
|
||||
throw new RuntimeException(msg);
|
||||
}
|
||||
//删除 项目基本信息
|
||||
if(!( baseMapper.deleteById(projectId) > 0)){
|
||||
String msg = "删除项目,删除异常——在删除项目规格信息时出现异常!" + "参数:" + qsProject;
|
||||
failureMsg.append(msg);
|
||||
log.error(msg);
|
||||
throw new RuntimeException(msg);
|
||||
}
|
||||
});
|
||||
// 如果一切正常,返回null表示提交事务
|
||||
return failureMsg.toString();
|
||||
} catch (Exception e) {
|
||||
// 如果发生异常,可以手动回滚事务
|
||||
status.setRollbackOnly();
|
||||
return failureMsg.toString();
|
||||
}
|
||||
});
|
||||
return sRet;
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验项目是否已经开工
|
||||
*
|
||||
* @param projectId 项目ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean checkProjectInProcessing(Long projectId) {
|
||||
return baseMapper.exists(new LambdaQueryWrapper<QsProjects>()
|
||||
.gt(QsProjects::getCurrentMasterStageId, UserConstants.PROJECT_START_ID)
|
||||
.eq(ObjectUtil.isNotNull(projectId), QsProjects::getProjectId, projectId)
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,130 @@
|
||||
package net.ferrum.business.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import net.ferrum.business.domain.QsBatch;
|
||||
import net.ferrum.common.utils.StringUtils;
|
||||
import net.ferrum.common.core.page.TableDataInfo;
|
||||
import net.ferrum.common.core.domain.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import net.ferrum.business.domain.bo.QsSpecAttributeTypesBo;
|
||||
import net.ferrum.business.domain.vo.QsSpecAttributeTypesVo;
|
||||
import net.ferrum.business.domain.QsSpecAttributeTypes;
|
||||
import net.ferrum.business.mapper.QsSpecAttributeTypesMapper;
|
||||
import net.ferrum.business.service.IQsSpecAttributeTypesService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 规格类型Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-19
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class QsSpecAttributeTypesServiceImpl implements IQsSpecAttributeTypesService {
|
||||
|
||||
private final QsSpecAttributeTypesMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询规格类型
|
||||
*/
|
||||
@Override
|
||||
public QsSpecAttributeTypesVo queryById(Long typeId){
|
||||
return baseMapper.selectVoById(typeId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询规格类型列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<QsSpecAttributeTypesVo> queryPageList(QsSpecAttributeTypesBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<QsSpecAttributeTypes> lqw = buildQueryWrapper(bo);
|
||||
Page<QsSpecAttributeTypesVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询规格类型列表
|
||||
*/
|
||||
@Override
|
||||
public List<QsSpecAttributeTypesVo> queryList(QsSpecAttributeTypesBo bo) {
|
||||
LambdaQueryWrapper<QsSpecAttributeTypes> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<QsSpecAttributeTypes> buildQueryWrapper(QsSpecAttributeTypesBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<QsSpecAttributeTypes> lqw = Wrappers.lambdaQuery();
|
||||
lqw.like(StringUtils.isNotBlank(bo.getTypeName()), QsSpecAttributeTypes::getTypeName, bo.getTypeName());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增规格类型
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(QsSpecAttributeTypesBo bo) {
|
||||
QsSpecAttributeTypes add = BeanUtil.toBean(bo, QsSpecAttributeTypes.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setTypeId(add.getTypeId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改规格类型
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(QsSpecAttributeTypesBo bo) {
|
||||
QsSpecAttributeTypes update = BeanUtil.toBean(bo, QsSpecAttributeTypes.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(QsSpecAttributeTypes entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除规格类型
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询规格参数类型
|
||||
*
|
||||
* @param type 要查询的规格参数类型
|
||||
* @return 部规格参数类型信息集合
|
||||
*/
|
||||
@Override
|
||||
public List<QsSpecAttributeTypes> selectSpecAttributeTypesList(QsSpecAttributeTypes type) {
|
||||
LambdaQueryWrapper<QsSpecAttributeTypes> lqw = new LambdaQueryWrapper<>();
|
||||
if (type != null){
|
||||
lqw.eq(QsSpecAttributeTypes::getDelFlag, "0")
|
||||
.eq(ObjectUtil.isNotNull(type.getTypeId()), QsSpecAttributeTypes::getTypeId, type.getTypeId())
|
||||
.like(StringUtils.isNotBlank(type.getTypeName()), QsSpecAttributeTypes::getTypeName, type.getTypeName())
|
||||
.orderByAsc(QsSpecAttributeTypes::getTypeId)
|
||||
.orderByAsc(QsSpecAttributeTypes::getTypeName);
|
||||
}
|
||||
return baseMapper.selectSpecAttributeTypesList(lqw);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,153 @@
|
||||
package net.ferrum.business.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.lang.tree.Tree;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import net.ferrum.business.domain.QsSpecAttributeTypes;
|
||||
import net.ferrum.business.mapper.QsSpecAttributeTypesMapper;
|
||||
import net.ferrum.common.constant.UserConstants;
|
||||
import net.ferrum.common.core.domain.R;
|
||||
import net.ferrum.common.core.domain.entity.SysDept;
|
||||
import net.ferrum.common.core.domain.entity.SysUser;
|
||||
import net.ferrum.common.helper.DataBaseHelper;
|
||||
import net.ferrum.common.utils.StreamUtils;
|
||||
import net.ferrum.common.utils.StringUtils;
|
||||
import net.ferrum.common.core.page.TableDataInfo;
|
||||
import net.ferrum.common.core.domain.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import net.ferrum.business.domain.bo.QsSpecAttributeValuesBo;
|
||||
import net.ferrum.business.domain.vo.QsSpecAttributeValuesVo;
|
||||
import net.ferrum.business.domain.QsSpecAttributeValues;
|
||||
import net.ferrum.business.mapper.QsSpecAttributeValuesMapper;
|
||||
import net.ferrum.business.service.IQsSpecAttributeValuesService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 规格参数值Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-19
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class QsSpecAttributeValuesServiceImpl implements IQsSpecAttributeValuesService {
|
||||
|
||||
private final QsSpecAttributeValuesMapper baseMapper;
|
||||
private final QsSpecAttributeTypesMapper specAttributeTypesMapper;
|
||||
|
||||
public TableDataInfo<QsSpecAttributeValues>selectPageSpecAttributeValuesList(QsSpecAttributeValues specAttributeValues, PageQuery pageQuery) {
|
||||
Page<QsSpecAttributeValues> page = baseMapper.selectPageSpecAttributeValuesList(pageQuery.build(), this.buildQueryWrapper(specAttributeValues));
|
||||
return TableDataInfo.build(page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询规格参数值
|
||||
*/
|
||||
@Override
|
||||
public QsSpecAttributeValuesVo queryById(Long valueId){
|
||||
return baseMapper.selectVoById(valueId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询规格参数值列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<QsSpecAttributeValuesVo> queryPageList(QsSpecAttributeValuesBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<QsSpecAttributeValues> lqw = buildQueryWrapper(bo);
|
||||
Page<QsSpecAttributeValuesVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询规格参数值列表
|
||||
*/
|
||||
@Override
|
||||
public List<QsSpecAttributeValuesVo> queryList(QsSpecAttributeValuesBo bo) {
|
||||
LambdaQueryWrapper<QsSpecAttributeValues> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<QsSpecAttributeValues> buildQueryWrapper(QsSpecAttributeValuesBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<QsSpecAttributeValues> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getTypeId() != null, QsSpecAttributeValues::getTypeId, bo.getTypeId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getValue()), QsSpecAttributeValues::getValue, bo.getValue());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
private Wrapper<QsSpecAttributeValues> buildQueryWrapper(QsSpecAttributeValues specAttributeValues) {
|
||||
//Map<String, Object> params = specAttributeValues.getParams();
|
||||
//LambdaQueryWrapper<QsSpecAttributeValues> lqw = Wrappers.lambdaQuery();
|
||||
QueryWrapper<QsSpecAttributeValues> lqw = Wrappers.query();
|
||||
lqw.eq("a.del_flag", UserConstants.NORMAL);
|
||||
lqw.eq("b.del_flag", UserConstants.NORMAL);
|
||||
lqw.eq(specAttributeValues.getTypeId() != null, "a.type_id", specAttributeValues.getTypeId());
|
||||
lqw.like(StringUtils.isNotBlank(specAttributeValues.getValue()), "a.value", specAttributeValues.getValue());
|
||||
|
||||
lqw.like(StringUtils.isNotBlank(specAttributeValues.getSpecTypeName()), "b.type_name", specAttributeValues.getSpecTypeName());
|
||||
|
||||
lqw.and(ObjectUtil.isNotNull(specAttributeValues.getTypeId()), w -> {
|
||||
List<QsSpecAttributeTypes> list = specAttributeTypesMapper.selectList(new LambdaQueryWrapper<QsSpecAttributeTypes>()
|
||||
.select(QsSpecAttributeTypes::getTypeId));
|
||||
List<Long> ids = StreamUtils.toList(list, QsSpecAttributeTypes::getTypeId);
|
||||
ids.add(specAttributeValues.getTypeId());
|
||||
w.in("a.type_id", ids);
|
||||
});
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增规格参数值
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(QsSpecAttributeValuesBo bo) {
|
||||
QsSpecAttributeValues add = BeanUtil.toBean(bo, QsSpecAttributeValues.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setValueId(add.getValueId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改规格参数值
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(QsSpecAttributeValuesBo bo) {
|
||||
QsSpecAttributeValues update = BeanUtil.toBean(bo, QsSpecAttributeValues.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(QsSpecAttributeValues entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除规格参数值
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
|
||||
public List<QsSpecAttributeValues> selectSpecAttributeValuesByTypesId(Long typeId) {
|
||||
return baseMapper.selectSpecAttributeValuesByTypesId(typeId);
|
||||
}
|
||||
}
|
||||
@ -6,18 +6,22 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import lombok.val;
|
||||
import net.ferrum.business.domain.QsSupplier;
|
||||
import net.ferrum.business.domain.QsUserSupplier;
|
||||
import net.ferrum.business.domain.bo.QsSupplierBo;
|
||||
import net.ferrum.business.domain.vo.QsSupplierVo;
|
||||
import net.ferrum.business.domain.vo.QsUserSupplierVo;
|
||||
import net.ferrum.business.mapper.QsSupplierMapper;
|
||||
import net.ferrum.business.mapper.QsUserSupplierMapper;
|
||||
import net.ferrum.business.service.IQsSupplierService;
|
||||
import net.ferrum.common.core.domain.PageQuery;
|
||||
import net.ferrum.common.core.page.TableDataInfo;
|
||||
import net.ferrum.common.utils.StringUtils;
|
||||
import net.ferrum.system.domain.SysUserRole;
|
||||
import net.ferrum.system.domain.vo.SysUserBasicInfoVo;
|
||||
import net.ferrum.system.mapper.SysUserMapper;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
@ -48,14 +52,16 @@ public class QsSupplierServiceImpl implements IQsSupplierService {
|
||||
@Override
|
||||
public QsSupplierVo queryById(Long supplierId){
|
||||
QsSupplierVo result = supplierMapper.selectVoById(supplierId);
|
||||
List<QsUserSupplier> relations = userSupplierMapper.selectList(new LambdaQueryWrapper<QsUserSupplier>().eq(QsUserSupplier::getSupplierId, supplierId));
|
||||
List<SysUserBasicInfoVo> userInfos = new ArrayList<>();
|
||||
if (!CollectionUtils.isEmpty(relations)) {
|
||||
relations.forEach(relation -> {
|
||||
userInfos.add(userMapper.selectUserBasicInfoById(relation.getUserId()));
|
||||
});
|
||||
}
|
||||
result.setDockerUsers(userInfos);
|
||||
List<QsUserSupplierVo> relations = userSupplierMapper.selectUsersbySupplierId(supplierId);
|
||||
// List<QsUserSupplier> relations = userSupplierMapper.selectList(new LambdaQueryWrapper<QsUserSupplier>().eq(QsUserSupplier::getSupplierId, supplierId));
|
||||
// List<SysUserBasicInfoVo> userInfos = new ArrayList<>();
|
||||
// if (!CollectionUtils.isEmpty(relations)) {
|
||||
// relations.forEach(relation -> {
|
||||
// userInfos.add(userMapper.selectUserBasicInfoById(relation.getUserId()));
|
||||
// });
|
||||
// }
|
||||
// result.setDockerUsers(userInfos);
|
||||
result.setDockerUsers(relations);
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -66,6 +72,7 @@ public class QsSupplierServiceImpl implements IQsSupplierService {
|
||||
public TableDataInfo<QsSupplierVo> queryPageList(QsSupplierBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<QsSupplier> lqw = buildQueryWrapper(bo);
|
||||
Page<QsSupplierVo> result = supplierMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
@ -141,7 +148,13 @@ public class QsSupplierServiceImpl implements IQsSupplierService {
|
||||
public Boolean claimSuppliers(Collection<Long> supplierIds, Long userId) {
|
||||
List<QsUserSupplier> relations = new ArrayList<>(0);
|
||||
supplierIds.forEach(id -> {
|
||||
relations.add(new QsUserSupplier(userId, id));
|
||||
//relations.add(new QsUserSupplier(userId, id));
|
||||
|
||||
QsUserSupplier t = new QsUserSupplier();
|
||||
t.setUserId(userId);
|
||||
t.setSupplierId(id);
|
||||
relations.add(t);
|
||||
|
||||
});
|
||||
return userSupplierMapper.insertBatch(relations);
|
||||
}
|
||||
@ -150,7 +163,12 @@ public class QsSupplierServiceImpl implements IQsSupplierService {
|
||||
public Boolean resignSuppliers(Collection<Long> userIds, Long supplierId) {
|
||||
List<QsUserSupplier> relations = new ArrayList<>(0);
|
||||
userIds.forEach(id -> {
|
||||
relations.add(new QsUserSupplier(id, supplierId));
|
||||
//relations.add(new QsUserSupplier(id, supplierId));
|
||||
|
||||
QsUserSupplier t = new QsUserSupplier();
|
||||
t.setUserId(id);
|
||||
t.setSupplierId(supplierId);
|
||||
relations.add(t);
|
||||
});
|
||||
return userSupplierMapper.insertBatch(relations);
|
||||
}
|
||||
|
||||
@ -0,0 +1,126 @@
|
||||
package net.ferrum.business.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import net.ferrum.business.domain.bo.QsSupplierBo;
|
||||
import net.ferrum.business.domain.vo.QsSupplierVo;
|
||||
import net.ferrum.common.core.page.TableDataInfo;
|
||||
import net.ferrum.common.core.domain.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Service;
|
||||
import net.ferrum.business.domain.bo.QsUserSupplierBo;
|
||||
import net.ferrum.business.domain.vo.QsUserSupplierVo;
|
||||
import net.ferrum.business.domain.QsUserSupplier;
|
||||
import net.ferrum.business.mapper.QsUserSupplierMapper;
|
||||
import net.ferrum.business.service.IQsUserSupplierService;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* userSupplierService业务层处理
|
||||
*
|
||||
* @author tzx
|
||||
* @date 2025-07-13
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class QsUserSupplierServiceImpl implements IQsUserSupplierService {
|
||||
|
||||
private final QsUserSupplierMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询userSupplier
|
||||
*/
|
||||
@Override
|
||||
public QsUserSupplierVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询userSupplier列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<QsUserSupplierVo> queryPageList(QsUserSupplierBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<QsUserSupplier> lqw = buildQueryWrapper(bo);
|
||||
Page<QsUserSupplierVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询userSupplier列表
|
||||
*/
|
||||
@Override
|
||||
public List<QsUserSupplierVo> queryList(QsUserSupplierBo bo) {
|
||||
LambdaQueryWrapper<QsUserSupplier> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<QsUserSupplier> buildQueryWrapper(QsUserSupplierBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<QsUserSupplier> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getId() != null, QsUserSupplier::getId, bo.getId());
|
||||
lqw.eq(bo.getUserId() != null, QsUserSupplier::getUserId, bo.getUserId());
|
||||
lqw.eq(bo.getSupplierId() != null, QsUserSupplier::getSupplierId, bo.getSupplierId());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增userSupplier
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(QsUserSupplierBo bo) {
|
||||
QsUserSupplier add = BeanUtil.toBean(bo, QsUserSupplier.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改userSupplier
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(QsUserSupplierBo bo) {
|
||||
QsUserSupplier update = BeanUtil.toBean(bo, QsUserSupplier.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(QsUserSupplier entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除userSupplier
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
|
||||
public TableDataInfo<QsSupplierVo> selectSuppliersByUsersPages(QsSupplierBo bo,PageQuery pageQuery){
|
||||
//return baseMapper.selectSuppliersByUsersPages(bo.getSupplierManager());
|
||||
Page<QsSupplierVo> result = baseMapper.selectSuppliersByUsersPages(pageQuery.build(),bo);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
public List<QsUserSupplierVo> selectUsersbySupplierId(@Param("supplierId")Long supplierId){
|
||||
//return baseMapper.selectSuppliersByUsersPages(bo.getSupplierManager());
|
||||
List<QsUserSupplierVo> result = baseMapper.selectUsersbySupplierId(supplierId);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@ -8,6 +8,7 @@ import net.ferrum.common.annotation.DataPermission;
|
||||
import net.ferrum.common.core.domain.entity.SysUser;
|
||||
import net.ferrum.common.core.mapper.BaseMapperPlus;
|
||||
import net.ferrum.system.domain.vo.SysUserBasicInfoVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
@ -17,6 +18,7 @@ import java.util.List;
|
||||
*
|
||||
* @author Lion Li
|
||||
*/
|
||||
@Mapper
|
||||
public interface SysUserMapper extends BaseMapperPlus<SysUserMapper, SysUser, SysUser> {
|
||||
|
||||
@DataPermission({
|
||||
|
||||
@ -208,4 +208,10 @@ public interface ISysUserService {
|
||||
*/
|
||||
int deleteUserByIds(Long[] userIds);
|
||||
|
||||
/**
|
||||
* 得到所有用户信息
|
||||
*
|
||||
*/
|
||||
public List<SysUser> selectAllUsersList() ;
|
||||
|
||||
}
|
||||
|
||||
@ -489,5 +489,12 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
|
||||
.select(SysUser::getNickName).eq(SysUser::getUserId, userId));
|
||||
return ObjectUtil.isNull(sysUser) ? null : sysUser.getNickName();
|
||||
}
|
||||
/**
|
||||
* 得到所有用户信息
|
||||
*
|
||||
*/
|
||||
public List<SysUser> selectAllUsersList() {
|
||||
return baseMapper.selectList();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -61,4 +61,14 @@ public class WfTaskBo {
|
||||
* 下一节点审批人
|
||||
*/
|
||||
private String nextUserIds;
|
||||
|
||||
/**
|
||||
* 批次
|
||||
*/
|
||||
private String specBatch;
|
||||
|
||||
/**
|
||||
* 规格名称
|
||||
*/
|
||||
private String specName;
|
||||
}
|
||||
|
||||
@ -5,6 +5,7 @@ import net.ferrum.flowable.core.FormConf;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 流程详情视图对象
|
||||
@ -44,4 +45,9 @@ public class WfDetailVo {
|
||||
public Boolean isExistTaskForm() {
|
||||
return ObjectUtil.isNotEmpty(this.taskFormData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 流程中的变量
|
||||
*/
|
||||
Map<String, Object> variablesMap;
|
||||
}
|
||||
|
||||
@ -9,6 +9,7 @@ import org.flowable.engine.task.Comment;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 工作流任务视图对象
|
||||
@ -139,4 +140,8 @@ public class WfTaskVo implements Serializable {
|
||||
*/
|
||||
private String specName;
|
||||
|
||||
/**
|
||||
* 流程中的变量
|
||||
*/
|
||||
Map<String, Object> variablesMap;
|
||||
}
|
||||
|
||||
@ -12,6 +12,7 @@ import org.flowable.task.api.TaskQuery;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 流程节点携带参数记录监听类
|
||||
@ -38,7 +39,17 @@ public class VariablePublishListener implements ExecutionListener {
|
||||
.taskCandidateOrAssigned(TaskUtils.getUserId())
|
||||
.taskCandidateGroupIn(TaskUtils.getCandidateGroup())
|
||||
.processDefinitionId(delegateExecution.getProcessDefinitionId())
|
||||
.orderByTaskCreateTime().desc();
|
||||
.processInstanceBusinessKey(delegateExecution.getProcessInstanceBusinessKey())
|
||||
;
|
||||
//.orderByTaskCreateTime();
|
||||
//.desc();
|
||||
System.out.println("userid =" + TaskUtils.getUserId());
|
||||
System.out.println("getCandidateGroup =" + TaskUtils.getCandidateGroup());
|
||||
System.out.println("getProcessDefinitionId =" + delegateExecution.getProcessDefinitionId());
|
||||
|
||||
long n = taskQuery.count();
|
||||
List<Task> taskQueryList = taskQuery.list();
|
||||
|
||||
Task task = taskQuery.singleResult();
|
||||
if (task == null) {
|
||||
throw new ServiceException("任务没找到");
|
||||
|
||||
@ -38,6 +38,12 @@ public interface IWfProcessService {
|
||||
TableDataInfo<WfTaskVo> selectPageAllProcessList(ProcessQuery processQuery, PageQuery pageQuery);
|
||||
TableDataInfo<WfTaskVo> selectPageAllProcessList1(ProcessQuery processQuery, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询所有流程列表
|
||||
*/
|
||||
List<WfTaskVo> selectAllProcessList(ProcessQuery processQuery);
|
||||
|
||||
|
||||
/**
|
||||
* 查询我的流程列表
|
||||
* @param pageQuery 分页参数
|
||||
|
||||
@ -155,171 +155,88 @@ public class WfProcessServiceImpl extends FlowServiceFactory implements IWfProce
|
||||
return definitionVoList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo<WfTaskVo> selectPageAllProcessList(ProcessQuery processQuery, PageQuery pageQuery) {
|
||||
Page<WfTaskVo> page = new Page<>();
|
||||
private HistoricProcessInstanceQuery getAllHistoricProcessInstanceQuery(ProcessQuery processQuery){
|
||||
HistoricProcessInstanceQuery historicProcessInstanceQuery = historyService.createHistoricProcessInstanceQuery()
|
||||
//.startedBy(TaskUtils.getUserId())
|
||||
.orderByProcessInstanceStartTime()
|
||||
.desc();
|
||||
// 构建搜索条件
|
||||
ProcessUtils.buildProcessSearch(historicProcessInstanceQuery, processQuery);
|
||||
int offset = pageQuery.getPageSize() * (pageQuery.getPageNum() - 1);
|
||||
List<HistoricProcessInstance> historicProcessInstances = historicProcessInstanceQuery
|
||||
.listPage(offset, pageQuery.getPageSize());
|
||||
page.setTotal(historicProcessInstanceQuery.count());
|
||||
List<WfTaskVo> taskVoList = new ArrayList<>();
|
||||
for (HistoricProcessInstance hisIns : historicProcessInstances) {
|
||||
WfTaskVo taskVo = new WfTaskVo();
|
||||
// 获取流程状态
|
||||
HistoricVariableInstance processStatusVariable = historyService.createHistoricVariableInstanceQuery()
|
||||
.processInstanceId(hisIns.getId())
|
||||
.variableName(ProcessConstants.PROCESS_STATUS_KEY)
|
||||
.singleResult();
|
||||
String processStatus = null;
|
||||
if (ObjectUtil.isNotNull(processStatusVariable)) {
|
||||
processStatus = Convert.toStr(processStatusVariable.getValue());
|
||||
}
|
||||
// 兼容旧流程
|
||||
if (processStatus == null) {
|
||||
processStatus = ObjectUtil.isNull(hisIns.getEndTime()) ? ProcessStatus.RUNNING.getStatus() : ProcessStatus.COMPLETED.getStatus();
|
||||
}
|
||||
taskVo.setProcessStatus(processStatus);
|
||||
taskVo.setCreateTime(hisIns.getStartTime());
|
||||
taskVo.setFinishTime(hisIns.getEndTime());
|
||||
taskVo.setProcInsId(hisIns.getId());
|
||||
return historicProcessInstanceQuery;
|
||||
}
|
||||
|
||||
//add for test --tzx
|
||||
|
||||
HistoricTaskInstanceQuery historicTaskInstanceQuery = historyService.createHistoricTaskInstanceQuery();
|
||||
historicTaskInstanceQuery.taskVariableNotExists("lbl_Batch");
|
||||
historicTaskInstanceQuery.processVariableValueEquals("lbl_Batch","333");
|
||||
|
||||
List<HistoricVariableInstance> historicProcessInstances1 =
|
||||
//HistoricVariableInstance processStatusVariable1 =
|
||||
|
||||
historyService.createHistoricVariableInstanceQuery()
|
||||
//.processInstanceId(hisIns.getId())
|
||||
.variableValueLike("lbl_Batch","%")
|
||||
.list();
|
||||
|
||||
//String sTemp = Convert.toStr(processStatusVariable1.getValue());
|
||||
|
||||
|
||||
String spec[] = new String[2];
|
||||
getHistSpecInfo(hisIns.getId(),spec);
|
||||
taskVo.setSpecBatch(spec[0]);
|
||||
taskVo.setSpecName(spec[1]);
|
||||
//add end for test --tzx
|
||||
|
||||
// 计算耗时
|
||||
if (Objects.nonNull(hisIns.getEndTime())) {
|
||||
taskVo.setDuration(DateUtils.getDatePoor(hisIns.getEndTime(), hisIns.getStartTime()));
|
||||
} else {
|
||||
taskVo.setDuration(DateUtils.getDatePoor(DateUtils.getNowDate(), hisIns.getStartTime()));
|
||||
}
|
||||
// 流程部署实例信息
|
||||
Deployment deployment = repositoryService.createDeploymentQuery()
|
||||
.deploymentId(hisIns.getDeploymentId()).singleResult();
|
||||
taskVo.setDeployId(hisIns.getDeploymentId());
|
||||
taskVo.setProcDefId(hisIns.getProcessDefinitionId());
|
||||
taskVo.setProcDefName(hisIns.getProcessDefinitionName());
|
||||
taskVo.setProcDefVersion(hisIns.getProcessDefinitionVersion());
|
||||
taskVo.setCategory(deployment.getCategory());
|
||||
// 当前所处流程
|
||||
List<Task> taskList = taskService.createTaskQuery().processInstanceId(hisIns.getId()).includeIdentityLinks().list();
|
||||
if (CollUtil.isNotEmpty(taskList)) {
|
||||
taskVo.setTaskName(taskList.stream().map(Task::getName).filter(StringUtils::isNotEmpty).collect(Collectors.joining(",")));
|
||||
}
|
||||
taskVoList.add(taskVo);
|
||||
}
|
||||
page.setRecords(taskVoList);
|
||||
@Override
|
||||
public TableDataInfo<WfTaskVo> selectPageAllProcessList(ProcessQuery processQuery, PageQuery pageQuery) {
|
||||
HistoricProcessInstanceQuery historicProcessInstanceQuery = getAllHistoricProcessInstanceQuery(processQuery);
|
||||
Page<WfTaskVo> page = getHistProcessPageList(historicProcessInstanceQuery,processQuery,pageQuery);
|
||||
return TableDataInfo.build(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo<WfTaskVo> selectPageOwnProcessList(ProcessQuery processQuery, PageQuery pageQuery) {
|
||||
Page<WfTaskVo> page = new Page<>();
|
||||
HistoricProcessInstanceQuery historicProcessInstanceQuery = historyService.createHistoricProcessInstanceQuery()
|
||||
.startedBy(TaskUtils.getUserId())
|
||||
.orderByProcessInstanceStartTime()
|
||||
.desc();
|
||||
// 构建搜索条件
|
||||
ProcessUtils.buildProcessSearch(historicProcessInstanceQuery, processQuery);
|
||||
int offset = pageQuery.getPageSize() * (pageQuery.getPageNum() - 1);
|
||||
List<HistoricProcessInstance> historicProcessInstances = historicProcessInstanceQuery
|
||||
.listPage(offset, pageQuery.getPageSize());
|
||||
page.setTotal(historicProcessInstanceQuery.count());
|
||||
List<WfTaskVo> taskVoList = new ArrayList<>();
|
||||
for (HistoricProcessInstance hisIns : historicProcessInstances) {
|
||||
WfTaskVo taskVo = new WfTaskVo();
|
||||
// 获取流程状态
|
||||
HistoricVariableInstance processStatusVariable = historyService.createHistoricVariableInstanceQuery()
|
||||
.processInstanceId(hisIns.getId())
|
||||
.variableName(ProcessConstants.PROCESS_STATUS_KEY)
|
||||
.singleResult();
|
||||
String processStatus = null;
|
||||
if (ObjectUtil.isNotNull(processStatusVariable)) {
|
||||
processStatus = Convert.toStr(processStatusVariable.getValue());
|
||||
}
|
||||
// 兼容旧流程
|
||||
if (processStatus == null) {
|
||||
processStatus = ObjectUtil.isNull(hisIns.getEndTime()) ? ProcessStatus.RUNNING.getStatus() : ProcessStatus.COMPLETED.getStatus();
|
||||
}
|
||||
taskVo.setProcessStatus(processStatus);
|
||||
taskVo.setCreateTime(hisIns.getStartTime());
|
||||
taskVo.setFinishTime(hisIns.getEndTime());
|
||||
taskVo.setProcInsId(hisIns.getId());
|
||||
|
||||
//add for test --tzx
|
||||
|
||||
String spec[] = new String[2];
|
||||
getHistSpecInfo(hisIns.getId(),spec);
|
||||
taskVo.setSpecBatch(spec[0]);
|
||||
taskVo.setSpecName(spec[1]);
|
||||
//add end for test --tzx
|
||||
|
||||
// 计算耗时
|
||||
if (Objects.nonNull(hisIns.getEndTime())) {
|
||||
taskVo.setDuration(DateUtils.getDatePoor(hisIns.getEndTime(), hisIns.getStartTime()));
|
||||
} else {
|
||||
taskVo.setDuration(DateUtils.getDatePoor(DateUtils.getNowDate(), hisIns.getStartTime()));
|
||||
}
|
||||
// 流程部署实例信息
|
||||
Deployment deployment = repositoryService.createDeploymentQuery()
|
||||
.deploymentId(hisIns.getDeploymentId()).singleResult();
|
||||
taskVo.setDeployId(hisIns.getDeploymentId());
|
||||
taskVo.setProcDefId(hisIns.getProcessDefinitionId());
|
||||
taskVo.setProcDefName(hisIns.getProcessDefinitionName());
|
||||
taskVo.setProcDefVersion(hisIns.getProcessDefinitionVersion());
|
||||
taskVo.setCategory(deployment.getCategory());
|
||||
// 当前所处流程
|
||||
List<Task> taskList = taskService.createTaskQuery().processInstanceId(hisIns.getId()).includeIdentityLinks().list();
|
||||
if (CollUtil.isNotEmpty(taskList)) {
|
||||
taskVo.setTaskName(taskList.stream().map(Task::getName).filter(StringUtils::isNotEmpty).collect(Collectors.joining(",")));
|
||||
}
|
||||
taskVoList.add(taskVo);
|
||||
}
|
||||
page.setRecords(taskVoList);
|
||||
return TableDataInfo.build(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WfTaskVo> selectOwnProcessList(ProcessQuery processQuery) {
|
||||
HistoricProcessInstanceQuery historicProcessInstanceQuery = historyService.createHistoricProcessInstanceQuery()
|
||||
.startedBy(TaskUtils.getUserId())
|
||||
.orderByProcessInstanceStartTime()
|
||||
.desc();
|
||||
// 构建搜索条件
|
||||
ProcessUtils.buildProcessSearch(historicProcessInstanceQuery, processQuery);
|
||||
public List<WfTaskVo> selectAllProcessList(ProcessQuery processQuery) {
|
||||
HistoricProcessInstanceQuery historicProcessInstanceQuery = getAllHistoricProcessInstanceQuery(processQuery);
|
||||
List<HistoricProcessInstance> historicProcessInstances = historicProcessInstanceQuery.list();
|
||||
List<WfTaskVo> taskVoList = getHistProcessList(historicProcessInstances,processQuery);
|
||||
|
||||
return taskVoList;
|
||||
}
|
||||
|
||||
private Map<String, Object> getHistProcessvariablesMap(HistoricProcessInstance hisIns){
|
||||
// 获取流程 Variables , 为了方便查询,将其放入 Map 中
|
||||
List<HistoricVariableInstance> historicVariableInstances = historyService.createHistoricVariableInstanceQuery()
|
||||
.processInstanceId(hisIns.getId())
|
||||
.list();
|
||||
Map<String, Object> variablesMap = new HashMap<>();
|
||||
for (HistoricVariableInstance hvi : historicVariableInstances) {
|
||||
variablesMap.put(hvi.getVariableName(), hvi.getValue());
|
||||
}
|
||||
return variablesMap;
|
||||
}
|
||||
|
||||
private void setSpecParaToTaskVo(Map<String, Object> variablesMap,WfTaskVo taskVo){
|
||||
Object var2Value = variablesMap.get(ProcessConstants.PROCESS_BATCH ); //批次
|
||||
String specBatch = Convert.toStr(var2Value);
|
||||
taskVo.setSpecBatch(specBatch);
|
||||
|
||||
Object var3Value = variablesMap.get(ProcessConstants.PROCESS_SPEC_NAME); // 规格名称
|
||||
String specName = Convert.toStr(var3Value);
|
||||
taskVo.setSpecName(specName);
|
||||
|
||||
taskVo.setVariablesMap(variablesMap);
|
||||
}
|
||||
private List<WfTaskVo> getHistProcessList(List<HistoricProcessInstance> historicProcessInstances,ProcessQuery processQuery){
|
||||
List<WfTaskVo> taskVoList = new ArrayList<>();
|
||||
for (HistoricProcessInstance hisIns : historicProcessInstances) {
|
||||
WfTaskVo taskVo = new WfTaskVo();
|
||||
|
||||
Map<String, Object> variablesMap = getHistProcessvariablesMap(hisIns);
|
||||
|
||||
// 获取流程状态
|
||||
Object var1Value = variablesMap.get(ProcessConstants.PROCESS_STATUS_KEY);
|
||||
String processStatus = Convert.toStr(var1Value);
|
||||
|
||||
/*
|
||||
HistoricVariableInstance processStatusVariable = historyService.createHistoricVariableInstanceQuery()
|
||||
.processInstanceId(hisIns.getId())
|
||||
.variableName(ProcessConstants.PROCESS_STATUS_KEY)
|
||||
.singleResult();
|
||||
String processStatus = null;
|
||||
if (ObjectUtil.isNotNull(processStatusVariable)) {
|
||||
processStatus = Convert.toStr(processStatusVariable.getValue());
|
||||
}
|
||||
*/
|
||||
|
||||
// 兼容旧流程
|
||||
if (processStatus == null) {
|
||||
processStatus = ObjectUtil.isNull(hisIns.getEndTime()) ? ProcessStatus.RUNNING.getStatus() : ProcessStatus.COMPLETED.getStatus();
|
||||
}
|
||||
taskVo.setProcessStatus(processStatus);
|
||||
taskVo.setCreateTime(hisIns.getStartTime());
|
||||
taskVo.setFinishTime(hisIns.getEndTime());
|
||||
taskVo.setProcInsId(hisIns.getId());
|
||||
|
||||
setSpecParaToTaskVo(variablesMap,taskVo);
|
||||
|
||||
// 计算耗时
|
||||
if (Objects.nonNull(hisIns.getEndTime())) {
|
||||
taskVo.setDuration(DateUtils.getDatePoor(hisIns.getEndTime(), hisIns.getStartTime()));
|
||||
@ -328,21 +245,12 @@ public class WfProcessServiceImpl extends FlowServiceFactory implements IWfProce
|
||||
}
|
||||
// 流程部署实例信息
|
||||
Deployment deployment = repositoryService.createDeploymentQuery()
|
||||
.deploymentId(hisIns.getDeploymentId()).singleResult();
|
||||
.deploymentId(hisIns.getDeploymentId()).singleResult();
|
||||
taskVo.setDeployId(hisIns.getDeploymentId());
|
||||
taskVo.setProcDefId(hisIns.getProcessDefinitionId());
|
||||
taskVo.setProcDefName(hisIns.getProcessDefinitionName());
|
||||
taskVo.setProcDefVersion(hisIns.getProcessDefinitionVersion());
|
||||
taskVo.setCategory(deployment.getCategory());
|
||||
|
||||
//add for test --tzx
|
||||
|
||||
String spec[] = new String[2];
|
||||
getHistSpecInfo(hisIns.getId(),spec);
|
||||
taskVo.setSpecBatch(spec[0]);
|
||||
taskVo.setSpecName(spec[1]);
|
||||
//add end for test --tzx
|
||||
|
||||
// 当前所处流程
|
||||
List<Task> taskList = taskService.createTaskQuery().processInstanceId(hisIns.getId()).includeIdentityLinks().list();
|
||||
if (CollUtil.isNotEmpty(taskList)) {
|
||||
@ -352,21 +260,47 @@ public class WfProcessServiceImpl extends FlowServiceFactory implements IWfProce
|
||||
}
|
||||
return taskVoList;
|
||||
}
|
||||
private Page<WfTaskVo> getHistProcessPageList(HistoricProcessInstanceQuery historicProcessInstanceQuery,ProcessQuery processQuery, PageQuery pageQuery){
|
||||
Page<WfTaskVo> page = new Page<>();
|
||||
// 构建搜索条件
|
||||
ProcessUtils.buildProcessSearch(historicProcessInstanceQuery, processQuery);
|
||||
int offset = pageQuery.getPageSize() * (pageQuery.getPageNum() - 1);
|
||||
List<HistoricProcessInstance> historicProcessInstances = historicProcessInstanceQuery
|
||||
.listPage(offset, pageQuery.getPageSize());
|
||||
page.setTotal(historicProcessInstanceQuery.count());
|
||||
List<WfTaskVo> taskVoList = getHistProcessList(historicProcessInstances,processQuery);
|
||||
|
||||
page.setRecords(taskVoList);
|
||||
return page;
|
||||
}
|
||||
|
||||
private HistoricProcessInstanceQuery getOwnHistoricProcessInstanceQuery(ProcessQuery processQuery){
|
||||
HistoricProcessInstanceQuery historicProcessInstanceQuery = historyService.createHistoricProcessInstanceQuery()
|
||||
.startedBy(TaskUtils.getUserId())
|
||||
.orderByProcessInstanceStartTime()
|
||||
.desc();
|
||||
// 构建搜索条件
|
||||
ProcessUtils.buildProcessSearch(historicProcessInstanceQuery, processQuery);
|
||||
return historicProcessInstanceQuery;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo<WfTaskVo> selectPageTodoProcessList(ProcessQuery processQuery, PageQuery pageQuery) {
|
||||
Page<WfTaskVo> page = new Page<>();
|
||||
TaskQuery taskQuery = taskService.createTaskQuery()
|
||||
.active()
|
||||
.includeProcessVariables()
|
||||
.taskCandidateOrAssigned(TaskUtils.getUserId())
|
||||
.taskCandidateGroupIn(TaskUtils.getCandidateGroup())
|
||||
.orderByTaskCreateTime().desc();
|
||||
// 构建搜索条件
|
||||
ProcessUtils.buildProcessSearch(taskQuery, processQuery);
|
||||
page.setTotal(taskQuery.count());
|
||||
int offset = pageQuery.getPageSize() * (pageQuery.getPageNum() - 1);
|
||||
List<Task> taskList = taskQuery.listPage(offset, pageQuery.getPageSize());
|
||||
public TableDataInfo<WfTaskVo> selectPageOwnProcessList(ProcessQuery processQuery, PageQuery pageQuery) {
|
||||
HistoricProcessInstanceQuery historicProcessInstanceQuery = getOwnHistoricProcessInstanceQuery(processQuery);
|
||||
Page<WfTaskVo> page = getHistProcessPageList(historicProcessInstanceQuery,processQuery,pageQuery);
|
||||
return TableDataInfo.build(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WfTaskVo> selectOwnProcessList(ProcessQuery processQuery) {
|
||||
HistoricProcessInstanceQuery historicProcessInstanceQuery = getOwnHistoricProcessInstanceQuery(processQuery);
|
||||
List<HistoricProcessInstance> historicProcessInstances = historicProcessInstanceQuery.list();
|
||||
List<WfTaskVo> taskVoList = getHistProcessList(historicProcessInstances,processQuery);
|
||||
|
||||
return taskVoList;
|
||||
}
|
||||
|
||||
private List<WfTaskVo> getTaskProcessList(List<Task> taskList){
|
||||
List<WfTaskVo> flowList = new ArrayList<>();
|
||||
for (Task task : taskList) {
|
||||
WfTaskVo flowTask = new WfTaskVo();
|
||||
@ -394,77 +328,53 @@ public class WfProcessServiceImpl extends FlowServiceFactory implements IWfProce
|
||||
flowTask.setStartUserId(userId);
|
||||
flowTask.setStartUserName(nickName);
|
||||
|
||||
//add for test --tzx
|
||||
|
||||
String spec[] = new String[2];
|
||||
getHistSpecInfo(task.getProcessInstanceId(),spec);
|
||||
flowTask.setSpecBatch(spec[0]);
|
||||
flowTask.setSpecName(spec[1]);
|
||||
//add end for test --tzx
|
||||
Map<String, Object> variablesMap = getHistProcessvariablesMap(historicProcessInstance);
|
||||
setSpecParaToTaskVo(variablesMap,flowTask);
|
||||
|
||||
// 流程变量
|
||||
flowTask.setProcVars(task.getProcessVariables());
|
||||
|
||||
flowList.add(flowTask);
|
||||
}
|
||||
return flowList;
|
||||
}
|
||||
|
||||
private TaskQuery getTodoTaskQuery(ProcessQuery processQuery){
|
||||
TaskQuery taskQuery = taskService.createTaskQuery()
|
||||
.active()
|
||||
.includeProcessVariables()
|
||||
.taskAssignee(TaskUtils.getUserId())
|
||||
//.taskCandidateOrAssigned(TaskUtils.getUserId())
|
||||
//.taskCandidateGroupIn(TaskUtils.getCandidateGroup())
|
||||
.orderByTaskCreateTime().desc();
|
||||
// 构建搜索条件
|
||||
ProcessUtils.buildProcessSearch(taskQuery, processQuery);
|
||||
return taskQuery;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo<WfTaskVo> selectPageTodoProcessList(ProcessQuery processQuery, PageQuery pageQuery) {
|
||||
Page<WfTaskVo> page = new Page<>();
|
||||
TaskQuery taskQuery = getTodoTaskQuery(processQuery);
|
||||
page.setTotal(taskQuery.count());
|
||||
int offset = pageQuery.getPageSize() * (pageQuery.getPageNum() - 1);
|
||||
List<Task> taskList = taskQuery.listPage(offset, pageQuery.getPageSize());
|
||||
List<WfTaskVo> flowList = getTaskProcessList(taskList);
|
||||
|
||||
page.setRecords(flowList);
|
||||
return TableDataInfo.build(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WfTaskVo> selectTodoProcessList(ProcessQuery processQuery) {
|
||||
TaskQuery taskQuery = taskService.createTaskQuery()
|
||||
.active()
|
||||
.includeProcessVariables()
|
||||
.taskCandidateOrAssigned(TaskUtils.getUserId())
|
||||
.taskCandidateGroupIn(TaskUtils.getCandidateGroup())
|
||||
.orderByTaskCreateTime().desc();
|
||||
// 构建搜索条件
|
||||
ProcessUtils.buildProcessSearch(taskQuery, processQuery);
|
||||
TaskQuery taskQuery = getTodoTaskQuery(processQuery);
|
||||
List<Task> taskList = taskQuery.list();
|
||||
List<WfTaskVo> taskVoList = new ArrayList<>();
|
||||
for (Task task : taskList) {
|
||||
WfTaskVo taskVo = new WfTaskVo();
|
||||
// 当前流程信息
|
||||
taskVo.setTaskId(task.getId());
|
||||
taskVo.setTaskDefKey(task.getTaskDefinitionKey());
|
||||
taskVo.setCreateTime(task.getCreateTime());
|
||||
taskVo.setProcDefId(task.getProcessDefinitionId());
|
||||
taskVo.setTaskName(task.getName());
|
||||
// 流程定义信息
|
||||
ProcessDefinition pd = repositoryService.createProcessDefinitionQuery()
|
||||
.processDefinitionId(task.getProcessDefinitionId())
|
||||
.singleResult();
|
||||
taskVo.setDeployId(pd.getDeploymentId());
|
||||
taskVo.setProcDefName(pd.getName());
|
||||
taskVo.setProcDefVersion(pd.getVersion());
|
||||
taskVo.setProcInsId(task.getProcessInstanceId());
|
||||
List<WfTaskVo> taskVoList = getTaskProcessList(taskList);
|
||||
|
||||
// 流程发起人信息
|
||||
HistoricProcessInstance historicProcessInstance = historyService.createHistoricProcessInstanceQuery()
|
||||
.processInstanceId(task.getProcessInstanceId())
|
||||
.singleResult();
|
||||
Long userId = Long.parseLong(historicProcessInstance.getStartUserId());
|
||||
String nickName = userService.selectNickNameById(userId);
|
||||
taskVo.setStartUserId(userId);
|
||||
taskVo.setStartUserName(nickName);
|
||||
|
||||
//add for test --tzx
|
||||
|
||||
String spec[] = new String[2];
|
||||
getHistSpecInfo(task.getProcessInstanceId(),spec);
|
||||
taskVo.setSpecBatch(spec[0]);
|
||||
taskVo.setSpecName(spec[1]);
|
||||
//add end for test --tzx
|
||||
|
||||
taskVoList.add(taskVo);
|
||||
}
|
||||
return taskVoList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo<WfTaskVo> selectPageClaimProcessList(ProcessQuery processQuery, PageQuery pageQuery) {
|
||||
Page<WfTaskVo> page = new Page<>();
|
||||
private TaskQuery getClaimedTaskQuery(ProcessQuery processQuery){
|
||||
TaskQuery taskQuery = taskService.createTaskQuery()
|
||||
.active()
|
||||
.includeProcessVariables()
|
||||
@ -473,104 +383,32 @@ public class WfProcessServiceImpl extends FlowServiceFactory implements IWfProce
|
||||
.orderByTaskCreateTime().desc();
|
||||
// 构建搜索条件
|
||||
ProcessUtils.buildProcessSearch(taskQuery, processQuery);
|
||||
return taskQuery;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo<WfTaskVo> selectPageClaimProcessList(ProcessQuery processQuery, PageQuery pageQuery) {
|
||||
Page<WfTaskVo> page = new Page<>();
|
||||
TaskQuery taskQuery = getClaimedTaskQuery(processQuery);
|
||||
page.setTotal(taskQuery.count());
|
||||
int offset = pageQuery.getPageSize() * (pageQuery.getPageNum() - 1);
|
||||
List<Task> taskList = taskQuery.listPage(offset, pageQuery.getPageSize());
|
||||
List<WfTaskVo> flowList = new ArrayList<>();
|
||||
for (Task task : taskList) {
|
||||
WfTaskVo flowTask = new WfTaskVo();
|
||||
// 当前流程信息
|
||||
flowTask.setTaskId(task.getId());
|
||||
flowTask.setTaskDefKey(task.getTaskDefinitionKey());
|
||||
flowTask.setCreateTime(task.getCreateTime());
|
||||
flowTask.setProcDefId(task.getProcessDefinitionId());
|
||||
flowTask.setTaskName(task.getName());
|
||||
// 流程定义信息
|
||||
ProcessDefinition pd = repositoryService.createProcessDefinitionQuery()
|
||||
.processDefinitionId(task.getProcessDefinitionId())
|
||||
.singleResult();
|
||||
flowTask.setDeployId(pd.getDeploymentId());
|
||||
flowTask.setProcDefName(pd.getName());
|
||||
flowTask.setProcDefVersion(pd.getVersion());
|
||||
flowTask.setProcInsId(task.getProcessInstanceId());
|
||||
List<WfTaskVo> flowList = getTaskProcessList(taskList);
|
||||
|
||||
// 流程发起人信息
|
||||
HistoricProcessInstance historicProcessInstance = historyService.createHistoricProcessInstanceQuery()
|
||||
.processInstanceId(task.getProcessInstanceId())
|
||||
.singleResult();
|
||||
Long userId = Long.parseLong(historicProcessInstance.getStartUserId());
|
||||
String nickName = userService.selectNickNameById(userId);
|
||||
flowTask.setStartUserId(userId);
|
||||
flowTask.setStartUserName(nickName);
|
||||
|
||||
//add for test --tzx
|
||||
|
||||
String spec[] = new String[2];
|
||||
getHistSpecInfo(task.getProcessInstanceId(),spec);
|
||||
flowTask.setSpecBatch(spec[0]);
|
||||
flowTask.setSpecName(spec[1]);
|
||||
//add end for test --tzx
|
||||
|
||||
flowList.add(flowTask);
|
||||
}
|
||||
page.setRecords(flowList);
|
||||
return TableDataInfo.build(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WfTaskVo> selectClaimProcessList(ProcessQuery processQuery) {
|
||||
TaskQuery taskQuery = taskService.createTaskQuery()
|
||||
.active()
|
||||
.includeProcessVariables()
|
||||
.taskCandidateUser(TaskUtils.getUserId())
|
||||
.taskCandidateGroupIn(TaskUtils.getCandidateGroup())
|
||||
.orderByTaskCreateTime().desc();
|
||||
// 构建搜索条件
|
||||
ProcessUtils.buildProcessSearch(taskQuery, processQuery);
|
||||
TaskQuery taskQuery = getClaimedTaskQuery(processQuery);
|
||||
List<Task> taskList = taskQuery.list();
|
||||
List<WfTaskVo> flowList = new ArrayList<>();
|
||||
for (Task task : taskList) {
|
||||
WfTaskVo flowTask = new WfTaskVo();
|
||||
// 当前流程信息
|
||||
flowTask.setTaskId(task.getId());
|
||||
flowTask.setTaskDefKey(task.getTaskDefinitionKey());
|
||||
flowTask.setCreateTime(task.getCreateTime());
|
||||
flowTask.setProcDefId(task.getProcessDefinitionId());
|
||||
flowTask.setTaskName(task.getName());
|
||||
// 流程定义信息
|
||||
ProcessDefinition pd = repositoryService.createProcessDefinitionQuery()
|
||||
.processDefinitionId(task.getProcessDefinitionId())
|
||||
.singleResult();
|
||||
flowTask.setDeployId(pd.getDeploymentId());
|
||||
flowTask.setProcDefName(pd.getName());
|
||||
flowTask.setProcDefVersion(pd.getVersion());
|
||||
flowTask.setProcInsId(task.getProcessInstanceId());
|
||||
List<WfTaskVo> flowList = getTaskProcessList(taskList);
|
||||
|
||||
// 流程发起人信息
|
||||
HistoricProcessInstance historicProcessInstance = historyService.createHistoricProcessInstanceQuery()
|
||||
.processInstanceId(task.getProcessInstanceId())
|
||||
.singleResult();
|
||||
Long userId = Long.parseLong(historicProcessInstance.getStartUserId());
|
||||
String nickName = userService.selectNickNameById(userId);
|
||||
flowTask.setStartUserId(userId);
|
||||
flowTask.setStartUserName(nickName);
|
||||
|
||||
//add for test --tzx
|
||||
|
||||
String spec[] = new String[2];
|
||||
getHistSpecInfo(task.getProcessInstanceId(),spec);
|
||||
flowTask.setSpecBatch(spec[0]);
|
||||
flowTask.setSpecName(spec[1]);
|
||||
//add end for test --tzx
|
||||
|
||||
flowList.add(flowTask);
|
||||
}
|
||||
return flowList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo<WfTaskVo> selectPageFinishedProcessList(ProcessQuery processQuery, PageQuery pageQuery) {
|
||||
Page<WfTaskVo> page = new Page<>();
|
||||
private HistoricTaskInstanceQuery getFinishedTaskInstanceQuery(ProcessQuery processQuery){
|
||||
HistoricTaskInstanceQuery taskInstanceQuery = historyService.createHistoricTaskInstanceQuery()
|
||||
.includeProcessVariables()
|
||||
.finished()
|
||||
@ -579,8 +417,10 @@ public class WfProcessServiceImpl extends FlowServiceFactory implements IWfProce
|
||||
.desc();
|
||||
// 构建搜索条件
|
||||
ProcessUtils.buildProcessSearch(taskInstanceQuery, processQuery);
|
||||
int offset = pageQuery.getPageSize() * (pageQuery.getPageNum() - 1);
|
||||
List<HistoricTaskInstance> historicTaskInstanceList = taskInstanceQuery.listPage(offset, pageQuery.getPageSize());
|
||||
return taskInstanceQuery;
|
||||
}
|
||||
|
||||
private List<WfTaskVo> getFinishedTaskProcessList(List<HistoricTaskInstance> historicTaskInstanceList){
|
||||
List<WfTaskVo> hisTaskList = new ArrayList<>();
|
||||
for (HistoricTaskInstance histTask : historicTaskInstanceList) {
|
||||
WfTaskVo flowTask = new WfTaskVo();
|
||||
@ -616,80 +456,36 @@ public class WfProcessServiceImpl extends FlowServiceFactory implements IWfProce
|
||||
// 流程变量
|
||||
flowTask.setProcVars(histTask.getProcessVariables());
|
||||
|
||||
//add for test --tzx
|
||||
Map<String, Object> variablesMap = getHistProcessvariablesMap(historicProcessInstance);
|
||||
setSpecParaToTaskVo(variablesMap,flowTask);
|
||||
|
||||
String spec[] = new String[2];
|
||||
getHistSpecInfo(histTask.getId(),spec);
|
||||
flowTask.setSpecBatch(spec[0]);
|
||||
flowTask.setSpecName(spec[1]);
|
||||
//add end for test --tzx
|
||||
|
||||
hisTaskList.add(flowTask);
|
||||
}
|
||||
return hisTaskList;
|
||||
}
|
||||
@Override
|
||||
public TableDataInfo<WfTaskVo> selectPageFinishedProcessList(ProcessQuery processQuery, PageQuery pageQuery) {
|
||||
|
||||
HistoricTaskInstanceQuery taskInstanceQuery = getFinishedTaskInstanceQuery(processQuery);
|
||||
|
||||
int offset = pageQuery.getPageSize() * (pageQuery.getPageNum() - 1);
|
||||
List<HistoricTaskInstance> historicTaskInstanceList = taskInstanceQuery.listPage(offset, pageQuery.getPageSize());
|
||||
List<WfTaskVo> hisTaskList = getFinishedTaskProcessList(historicTaskInstanceList);
|
||||
|
||||
Page<WfTaskVo> page = new Page<>();
|
||||
page.setTotal(taskInstanceQuery.count());
|
||||
page.setRecords(hisTaskList);
|
||||
// Map<String, Object> result = new HashMap<>();
|
||||
// result.put("result",page);
|
||||
// result.put("finished",true);
|
||||
|
||||
return TableDataInfo.build(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WfTaskVo> selectFinishedProcessList(ProcessQuery processQuery) {
|
||||
HistoricTaskInstanceQuery taskInstanceQuery = historyService.createHistoricTaskInstanceQuery()
|
||||
.includeProcessVariables()
|
||||
.finished()
|
||||
.taskAssignee(TaskUtils.getUserId())
|
||||
.orderByHistoricTaskInstanceEndTime()
|
||||
.desc();
|
||||
// 构建搜索条件
|
||||
ProcessUtils.buildProcessSearch(taskInstanceQuery, processQuery);
|
||||
HistoricTaskInstanceQuery taskInstanceQuery = getFinishedTaskInstanceQuery(processQuery);
|
||||
List<HistoricTaskInstance> historicTaskInstanceList = taskInstanceQuery.list();
|
||||
List<WfTaskVo> hisTaskList = new ArrayList<>();
|
||||
for (HistoricTaskInstance histTask : historicTaskInstanceList) {
|
||||
WfTaskVo flowTask = new WfTaskVo();
|
||||
// 当前流程信息
|
||||
flowTask.setTaskId(histTask.getId());
|
||||
// 审批人员信息
|
||||
flowTask.setCreateTime(histTask.getCreateTime());
|
||||
flowTask.setFinishTime(histTask.getEndTime());
|
||||
flowTask.setDuration(DateUtil.formatBetween(histTask.getDurationInMillis(), BetweenFormatter.Level.SECOND));
|
||||
flowTask.setProcDefId(histTask.getProcessDefinitionId());
|
||||
flowTask.setTaskDefKey(histTask.getTaskDefinitionKey());
|
||||
flowTask.setTaskName(histTask.getName());
|
||||
List<WfTaskVo> hisTaskList = getFinishedTaskProcessList(historicTaskInstanceList);
|
||||
|
||||
// 流程定义信息
|
||||
ProcessDefinition pd = repositoryService.createProcessDefinitionQuery()
|
||||
.processDefinitionId(histTask.getProcessDefinitionId())
|
||||
.singleResult();
|
||||
flowTask.setDeployId(pd.getDeploymentId());
|
||||
flowTask.setProcDefName(pd.getName());
|
||||
flowTask.setProcDefVersion(pd.getVersion());
|
||||
flowTask.setProcInsId(histTask.getProcessInstanceId());
|
||||
flowTask.setHisProcInsId(histTask.getProcessInstanceId());
|
||||
|
||||
// 流程发起人信息
|
||||
HistoricProcessInstance historicProcessInstance = historyService.createHistoricProcessInstanceQuery()
|
||||
.processInstanceId(histTask.getProcessInstanceId())
|
||||
.singleResult();
|
||||
Long userId = Long.parseLong(historicProcessInstance.getStartUserId());
|
||||
String nickName = userService.selectNickNameById(userId);
|
||||
flowTask.setStartUserId(userId);
|
||||
flowTask.setStartUserName(nickName);
|
||||
|
||||
// 流程变量
|
||||
flowTask.setProcVars(histTask.getProcessVariables());
|
||||
|
||||
//add for test --tzx
|
||||
|
||||
String spec[] = new String[2];
|
||||
getHistSpecInfo(histTask.getId(),spec);
|
||||
flowTask.setSpecBatch(spec[0]);
|
||||
flowTask.setSpecName(spec[1]);
|
||||
//add end for test --tzx
|
||||
|
||||
hisTaskList.add(flowTask);
|
||||
}
|
||||
return hisTaskList;
|
||||
}
|
||||
|
||||
@ -733,7 +529,12 @@ public class WfProcessServiceImpl extends FlowServiceFactory implements IWfProce
|
||||
try {
|
||||
ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery()
|
||||
.processDefinitionId(procDefId).singleResult();
|
||||
startProcess(processDefinition, variables);
|
||||
|
||||
// 启动流程实例并设置流程实例的 Business_key,后续就可以用 Business_key 来检索所需要的流程实例了。
|
||||
String procBusynessKey = getBusynessKey(variables);
|
||||
startProcess(processDefinition, variables,procBusynessKey);
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
throw new ServiceException("流程启动错误");
|
||||
@ -751,13 +552,29 @@ public class WfProcessServiceImpl extends FlowServiceFactory implements IWfProce
|
||||
try {
|
||||
ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery()
|
||||
.processDefinitionKey(procDefKey).latestVersion().singleResult();
|
||||
startProcess(processDefinition, variables);
|
||||
|
||||
// 启动流程实例并设置流程实例的名称
|
||||
String procBusynessKey = getBusynessKey(variables);
|
||||
|
||||
startProcess(processDefinition, variables,procBusynessKey);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
throw new ServiceException("流程启动错误");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 从流程变量生成 BusynessKey
|
||||
* @param variables 流程的变量
|
||||
*/
|
||||
|
||||
String getBusynessKey(Map<String, Object> variables){
|
||||
// String batch = Convert.toStr(variables.get(ProcessConstants.PROCESS_BATCH));
|
||||
// String name = Convert.toStr(variables.get(ProcessConstants.PROCESS_SPEC_NAME));
|
||||
// String procBusynessKey = batch + ProcessConstants.PROCESS_BUSYNESSKEY_ConnString + name;
|
||||
String procBusynessKey = Convert.toStr(variables.get(ProcessConstants.PROCESS_BUSYNESSKEY_PROJECT_ID));
|
||||
return procBusynessKey;
|
||||
}
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void deleteProcessByIds(String[] instanceIds) {
|
||||
@ -821,13 +638,18 @@ public class WfProcessServiceImpl extends FlowServiceFactory implements IWfProce
|
||||
detailVo.setHistoryProcNodeList(historyProcNodeList(historicProcIns));
|
||||
detailVo.setProcessFormList(processFormList(bpmnModel, historicProcIns));
|
||||
detailVo.setFlowViewer(getFlowViewer(bpmnModel, procInsId));
|
||||
|
||||
//获得流程中的变量
|
||||
Map<String, Object> variablesMap = getHistProcessvariablesMap(historicProcIns);
|
||||
detailVo.setVariablesMap(variablesMap);
|
||||
|
||||
return detailVo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 启动流程实例
|
||||
*/
|
||||
private void startProcess(ProcessDefinition procDef, Map<String, Object> variables) {
|
||||
private void startProcess(ProcessDefinition procDef, Map<String, Object> variables,String procName) {
|
||||
if (ObjectUtil.isNotNull(procDef) && procDef.isSuspended()) {
|
||||
throw new ServiceException("流程已被挂起,请先激活流程");
|
||||
}
|
||||
@ -838,7 +660,7 @@ public class WfProcessServiceImpl extends FlowServiceFactory implements IWfProce
|
||||
// 设置流程状态为进行中
|
||||
variables.put(ProcessConstants.PROCESS_STATUS_KEY, ProcessStatus.RUNNING.getStatus());
|
||||
// 发起流程实例
|
||||
ProcessInstance processInstance = runtimeService.startProcessInstanceById(procDef.getId(), variables);
|
||||
ProcessInstance processInstance = runtimeService.startProcessInstanceById(procDef.getId(),procName, variables);
|
||||
// 第一个用户任务为发起人,则自动完成任务
|
||||
wfTaskService.startFirstTask(processInstance, variables);
|
||||
}
|
||||
@ -1157,38 +979,40 @@ public class WfProcessServiceImpl extends FlowServiceFactory implements IWfProce
|
||||
Page<WfTaskVo> page = new Page<>();
|
||||
|
||||
HistoricVariableInstanceQuery historicVariableInstanceQuery = historyService.createHistoricVariableInstanceQuery()
|
||||
.orderByVariableName()
|
||||
.orderByProcessInstanceId()
|
||||
.desc();
|
||||
|
||||
// 构建搜索条件
|
||||
//processQuery.setBatchName("4");
|
||||
|
||||
ProcessUtils.buildProcessSearch(historicVariableInstanceQuery, processQuery);
|
||||
int offset = pageQuery.getPageSize() * (pageQuery.getPageNum() - 1);
|
||||
|
||||
List<HistoricVariableInstance> historicVariableInstance = historicVariableInstanceQuery
|
||||
.listPage(offset, pageQuery.getPageSize());
|
||||
page.setTotal(historicVariableInstance.stream().count());
|
||||
|
||||
List<WfTaskVo> taskVoList = new ArrayList<>();
|
||||
HashSet<HistoricProcessInstance> historicProcessInstances = new HashSet<HistoricProcessInstance>();
|
||||
|
||||
for (HistoricVariableInstance hisVarIns : historicVariableInstance) {
|
||||
WfTaskVo taskVo = new WfTaskVo();
|
||||
|
||||
// 获取流程实例
|
||||
HistoricProcessInstance hisIns = historyService.createHistoricProcessInstanceQuery()
|
||||
.processInstanceId(hisVarIns.getProcessInstanceId())
|
||||
.includeProcessVariables()
|
||||
.singleResult();
|
||||
historicProcessInstances.add(hisIns);
|
||||
}
|
||||
page.setTotal(historicProcessInstances.size());
|
||||
|
||||
List<WfTaskVo> taskVoList = new ArrayList<>();
|
||||
for (HistoricProcessInstance hisIns : historicProcessInstances) {
|
||||
WfTaskVo taskVo = new WfTaskVo();
|
||||
|
||||
// 获取流程实例
|
||||
|
||||
Map<String, Object> variablesMap = getHistProcessvariablesMap(hisIns);
|
||||
|
||||
// 获取流程状态
|
||||
HistoricVariableInstance processStatusVariable = historyService.createHistoricVariableInstanceQuery()
|
||||
.processInstanceId(hisVarIns.getProcessInstanceId())
|
||||
.variableName(ProcessConstants.PROCESS_STATUS_KEY)
|
||||
.singleResult();
|
||||
|
||||
hisVarIns.getProcessInstanceId();
|
||||
String processStatus = null;
|
||||
if (ObjectUtil.isNotNull(processStatusVariable)) {
|
||||
processStatus = Convert.toStr(processStatusVariable.getValue());
|
||||
}
|
||||
Object var1Value = variablesMap.get(ProcessConstants.PROCESS_STATUS_KEY);
|
||||
String processStatus = Convert.toStr(var1Value);
|
||||
// 兼容旧流程
|
||||
if (processStatus == null) {
|
||||
processStatus = ObjectUtil.isNull(hisIns.getEndTime()) ? ProcessStatus.RUNNING.getStatus() : ProcessStatus.COMPLETED.getStatus();
|
||||
@ -1198,28 +1022,22 @@ public class WfProcessServiceImpl extends FlowServiceFactory implements IWfProce
|
||||
taskVo.setFinishTime(hisIns.getEndTime());
|
||||
taskVo.setProcInsId(hisIns.getId());
|
||||
|
||||
//add for test --tzx
|
||||
Object var2Value = variablesMap.get("lbl_Batch");
|
||||
String specBatch = Convert.toStr(var2Value);
|
||||
taskVo.setSpecBatch(specBatch);
|
||||
|
||||
HistoricTaskInstanceQuery historicTaskInstanceQuery = historyService.createHistoricTaskInstanceQuery();
|
||||
historicTaskInstanceQuery.taskVariableNotExists("lbl_Batch");
|
||||
historicTaskInstanceQuery.processVariableValueEquals("lbl_Batch","333");
|
||||
Object var3Value = variablesMap.get("lbl_name");
|
||||
String specName = Convert.toStr(var3Value);
|
||||
taskVo.setSpecBatch(specName);
|
||||
|
||||
List<HistoricVariableInstance> historicProcessInstances1 =
|
||||
//HistoricVariableInstance processStatusVariable1 =
|
||||
hisIns.getName();
|
||||
hisIns.getProcessDefinitionName();
|
||||
|
||||
historyService.createHistoricVariableInstanceQuery()
|
||||
//.processInstanceId(hisIns.getId())
|
||||
.variableValueLike("lbl_Batch","%")
|
||||
.list();
|
||||
// String spec[] = new String[2];
|
||||
// getHistSpecInfo(hisIns.getId(),spec);
|
||||
// taskVo.setBatchName(spec[0]);
|
||||
// taskVo.setProjectName(spec[1]);
|
||||
|
||||
//String sTemp = Convert.toStr(processStatusVariable1.getValue());
|
||||
|
||||
|
||||
String spec[] = new String[2];
|
||||
getHistSpecInfo(hisIns.getId(),spec);
|
||||
taskVo.setSpecBatch(spec[0]);
|
||||
taskVo.setSpecName(spec[1]);
|
||||
//add end for test --tzx
|
||||
|
||||
// 计算耗时
|
||||
if (Objects.nonNull(hisIns.getEndTime())) {
|
||||
@ -1242,6 +1060,13 @@ public class WfProcessServiceImpl extends FlowServiceFactory implements IWfProce
|
||||
}
|
||||
taskVoList.add(taskVo);
|
||||
}
|
||||
|
||||
Collections.sort(taskVoList, new Comparator<WfTaskVo>() {
|
||||
@Override
|
||||
public int compare(WfTaskVo o1, WfTaskVo o2) {
|
||||
return o2.getCreateTime().compareTo(o1.getCreateTime());
|
||||
}
|
||||
});
|
||||
page.setRecords(taskVoList);
|
||||
return TableDataInfo.build(page);
|
||||
}
|
||||
|
||||
@ -0,0 +1,29 @@
|
||||
<?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="net.ferrum.business.mapper.QsBatchMapper">
|
||||
|
||||
<resultMap type="net.ferrum.business.domain.QsBatch" id="QsBatchResult">
|
||||
<result property="batchId" column="batch_id"/>
|
||||
<result property="batchNo" column="batch_no"/>
|
||||
<result property="batchName" column="batch_name"/>
|
||||
<result property="batchStartDate" column="batch_start_date"/>
|
||||
<result property="batchPlanEndDate" column="batch_plan_end_date"/>
|
||||
<result property="batchEndDate" column="batch_end_date"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<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="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectBatchList" resultMap="QsBatchResult">
|
||||
select *
|
||||
from qs_batch a
|
||||
${ew.getCustomSqlSegment}
|
||||
order by a.batch_start_date desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,33 @@
|
||||
<?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="net.ferrum.business.mapper.QsProjectAttributesMapper">
|
||||
|
||||
<resultMap type="net.ferrum.business.domain.QsProjectAttributes" id="QsProjectAttributesResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="projectId" column="project_id"/>
|
||||
<result property="typeId" column="type_id"/>
|
||||
<result property="valueId" column="value_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="remark" column="remark"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectProjSpecInfoList" resultType="net.ferrum.business.domain.vo.QsProjectAttributesVo">
|
||||
select qpa.id,qpa.project_id,qpa.type_id,qpa.value_id,qpa.remark, qsav.value as value
|
||||
from qs_project_attributes qpa
|
||||
left join qs_spec_attribute_values qsav on qpa.type_id = qsav.type_id and qpa.value_id = qsav.value_id
|
||||
${ew.getCustomSqlSegment}
|
||||
order by qpa.type_id, qpa.value_id
|
||||
</select>
|
||||
|
||||
<delete id="deleteByProjectId" parameterType="java.lang.Long">
|
||||
DELETE FROM qs_project_attributes
|
||||
WHERE project_id = #{projectId}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,83 @@
|
||||
<?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="net.ferrum.business.mapper.QsProjectsMapper">
|
||||
|
||||
<resultMap type="net.ferrum.business.domain.QsProjects" id="QsProjectsResult">
|
||||
<result property="projectId" column="project_id"/>
|
||||
<result property="batchId" column="batch_id"/>
|
||||
<result property="projectName" column="project_name"/>
|
||||
<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="remark" column="remark"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="currentMasterStageId" column="current_master_stage_id"/>
|
||||
<result property="projectCompletion" column="project_completion"/>
|
||||
<result property="startDate" column="start_date"/>
|
||||
<result property="endTime" column="end_time"/>
|
||||
|
||||
<result property="specInfo" column="specInfo"/>
|
||||
<result property="batchName" column="batch_name"/>
|
||||
<result property="stageName" column="stage_name"/>
|
||||
<result property="stageDisplayName" column="display_name"/>
|
||||
<result property="isParallelContainer" column="is_parallel_container"/>
|
||||
<result property="parallelProgress" column="parallel_Progress"/>
|
||||
|
||||
<association property="batch" column="batch_id" javaType="net.ferrum.business.domain.QsBatch" resultMap="QsBatchResult"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="net.ferrum.business.domain.QsBatch" id="QsBatchResult">
|
||||
<result property="batchId" column="batch_id"/>
|
||||
<result property="batchNo" column="batch_no"/>
|
||||
<result property="batchName" column="batch_name"/>
|
||||
<result property="batchStartDate" column="batch_start_date"/>
|
||||
<result property="batchPlanEndDate" column="batch_plan_end_date"/>
|
||||
<result property="batchEndDate" column="batch_end_date"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<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="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="selectPageQsProjectsList" resultMap="QsProjectsResult">
|
||||
select a.batch_id, a.project_id, a.project_name,a.current_master_stage_id,a.project_completion,
|
||||
a.start_date,a.end_time, b.batch_name,d.specInfo,
|
||||
a.create_by, a.create_time, a.update_by, a.update_time, a.remark, a.del_flag,
|
||||
ms.stage_name, ms.display_name, ms.is_parallel_container,
|
||||
IF(ms.is_parallel_container,
|
||||
CONCAT(
|
||||
(SELECT COUNT(*)
|
||||
FROM qs_project_stage_status pss
|
||||
WHERE pss.project_id = a.project_id
|
||||
AND pss.master_stage_id = a.current_master_stage_id
|
||||
AND pss.status = '已完成'),
|
||||
'/',
|
||||
(SELECT COUNT(*)
|
||||
FROM qs_project_sub_stages pss
|
||||
WHERE pss.master_stage_id = a.current_master_stage_id)
|
||||
),
|
||||
'1/1'
|
||||
) AS parallel_Progress
|
||||
from qs_projects a
|
||||
left join qs_batch b on a.batch_id = b.batch_id
|
||||
left join (SELECT p.project_id,
|
||||
GROUP_CONCAT(
|
||||
CONCAT(pa.id, ':',at.type_id, ':',at.type_name, ':', av.value_id,':', av.value)
|
||||
ORDER BY at.type_id SEPARATOR '|'
|
||||
) AS specInfo
|
||||
FROM qs_projects p
|
||||
LEFT JOIN qs_project_attributes pa ON p.project_id = pa.project_id
|
||||
LEFT JOIN qs_spec_attribute_values av ON pa.value_id = av.value_id
|
||||
LEFT JOIN qs_spec_attribute_types at ON av.type_id = at.type_id
|
||||
GROUP BY p.project_id) as d on d.project_id = a.project_id
|
||||
left JOIN qs_project_master_stages ms ON a.current_master_stage_id = ms.master_stage_id
|
||||
${ew.getCustomSqlSegment}
|
||||
order by a.start_date desc
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,34 @@
|
||||
<?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="net.ferrum.business.mapper.QsSpecAttributeTypesMapper">
|
||||
|
||||
<resultMap type="net.ferrum.business.domain.QsSpecAttributeTypes" id="QsSpecAttributeTypesResult">
|
||||
<result property="typeId" column="type_id"/>
|
||||
<result property="typeName" column="type_name"/>
|
||||
<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="remark" column="remark"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
|
||||
<collection property="specValues" javaType="java.util.List" resultMap="SpecValusResult"/>
|
||||
|
||||
</resultMap>
|
||||
|
||||
|
||||
<resultMap id="SpecValusResult" type="net.ferrum.business.domain.QsSpecAttributeValues">
|
||||
<id property="typeId" column="type_id"/>
|
||||
<result property="valueId" column="value_id"/>
|
||||
<result property="value" column="value"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="selectSpecAttributeTypesList" resultMap="QsSpecAttributeTypesResult">
|
||||
select * from qs_spec_attribute_types ${ew.getCustomSqlSegment}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,53 @@
|
||||
<?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="net.ferrum.business.mapper.QsSpecAttributeValuesMapper">
|
||||
|
||||
<resultMap type="net.ferrum.business.domain.QsSpecAttributeValues" id="QsSpecAttributeValuesResult">
|
||||
<result property="valueId" column="value_id"/>
|
||||
<result property="typeId" column="type_id"/>
|
||||
<result property="value" column="value"/>
|
||||
<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="remark" column="remark"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<association property="specType" column="type_id" javaType="net.ferrum.business.domain.QsSpecAttributeTypes" resultMap="QsSpecAttributeTypesResult"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="QsSpecAttributeTypesResult" type="net.ferrum.business.domain.QsSpecAttributeTypes">
|
||||
<result property="typeId" column="type_id"/>
|
||||
<result property="typeName" column="type_name"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectSpecAttributeValuesList" resultMap="QsSpecAttributeValuesResult">
|
||||
select a.type_id, a.value_id, a.value,
|
||||
a.create_by, a.create_time, a.update_by, a.update_time, a.remark, a.del_flag, b.type_name
|
||||
from qs_spec_attribute_values a
|
||||
left join qs_spec_attribute_types b on a.type_id = b.type_id
|
||||
${ew.getCustomSqlSegment}
|
||||
order by a.type_id, a.value_id
|
||||
</select>
|
||||
|
||||
<select id="selectPageSpecAttributeValuesList" resultMap="QsSpecAttributeValuesResult">
|
||||
select a.type_id, a.value_id, a.value,
|
||||
a.create_by, a.create_time, a.update_by, a.update_time, a.remark, a.del_flag, b.type_name
|
||||
from qs_spec_attribute_values a
|
||||
left join qs_spec_attribute_types b on a.type_id = b.type_id
|
||||
${ew.getCustomSqlSegment}
|
||||
order by a.type_id, a.value_id
|
||||
</select>
|
||||
|
||||
<select id="selectSpecAttributeValuesByTypesId"
|
||||
resultType="net.ferrum.business.domain.QsSpecAttributeValues">
|
||||
select a.value_id, a.value, a.type_id, b.type_name
|
||||
from qs_spec_attribute_values a, qs_spec_attribute_types b
|
||||
where a.type_id = b.type_id
|
||||
and a.del_flag != '2'
|
||||
and a.type_id = #{typeId}
|
||||
order by a.type_id, a.value_id
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@ -15,7 +15,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
@ -1,12 +1,55 @@
|
||||
<?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">
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="net.ferrum.business.mapper.QsUserSupplierMapper">
|
||||
|
||||
<resultMap type="net.ferrum.business.domain.QsUserSupplier" id="QsUserSupplierResult">
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="supplierId" column="supplier_id" />
|
||||
<result property="id" column="id"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="supplierId" column="supplier_id"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="selectSuppliersByUsersPages" resultType="net.ferrum.business.domain.vo.QsSupplierVo">
|
||||
<if test="bo.supplierManagers != null and bo.supplierManagers.size() > 0">
|
||||
select distinct qs.supplier_id, qs.supplier_name,qs.supplier_address,qs.supplier_contact,qs.supplier_contact_num,qs.remark
|
||||
from qs_supplier qs, sys_user su,qs_user_supplier qus
|
||||
where qs.supplier_id = qus.supplier_id
|
||||
and su.user_id = qus.user_id
|
||||
and qs.del_flag != '2'
|
||||
and su.del_flag != '2'
|
||||
and(
|
||||
<foreach collection="bo.supplierManagers" item="name" separator=" OR ">su.nick_name LIKE CONCAT('%', #{name}, '%')
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
<if test="bo.supplierManagers == null or bo.supplierManagers.size() == 0">
|
||||
select distinct qs.supplier_id, qs.supplier_name,qs.supplier_address,qs.supplier_contact,qs.supplier_contact_num,qs.remark
|
||||
from qs_supplier qs
|
||||
where qs.del_flag != '2'
|
||||
</if>
|
||||
<if test="bo.supplierName != null and bo.supplierName != ''">
|
||||
AND qs.supplier_name LIKE CONCAT('%', #{bo.supplierName}, '%')
|
||||
</if>
|
||||
<if test="bo.supplierAddress != null and bo.supplierAddress != ''">
|
||||
AND qs.supplier_address LIKE CONCAT('%', #{bo.supplierAddress}, '%')
|
||||
</if>
|
||||
<if test="bo.supplierContact != null and bo.supplierContact != ''">
|
||||
AND qs.supplier_contact LIKE CONCAT('%', #{bo.supplierContact}, '%')
|
||||
</if>
|
||||
<if test="bo.supplierContactNum != null and bo.supplierContactNum != ''">
|
||||
AND qs.supplier_contact_num LIKE CONCAT('%', #{bo.supplierContactNum}, '%')
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectUsersbySupplierId" resultType="net.ferrum.business.domain.vo.QsUserSupplierVo">
|
||||
select qus.id,qus.user_id,qus.supplier_id,qs.supplier_id, qs.supplier_name,su.user_name,su.nick_name
|
||||
from qs_supplier qs, sys_user su,qs_user_supplier qus
|
||||
where qs.supplier_id = qus.supplier_id
|
||||
and su.user_id = qus.user_id
|
||||
and qs.del_flag != '2'
|
||||
and su.del_flag != '2'
|
||||
and qs.supplier_id = #{supplierId}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
19
script/sql/mysql/batchMenu.sql
Normal file
19
script/sql/mysql/batchMenu.sql
Normal file
@ -0,0 +1,19 @@
|
||||
-- 菜单 SQL
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values(1945779577351671809, '设计批次', '1896968401096663042', '1', 'batch', 'business/batch/index', 1, 0, 'C', '0', '0', 'business:batch:list', '#', 'admin', sysdate(), '', null, '设计批次菜单');
|
||||
|
||||
-- 按钮 SQL
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values(1945779577351671810, '设计批次查询', 1945779577351671809, '1', '#', '', 1, 0, 'F', '0', '0', 'business:batch:query', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values(1945779577351671811, '设计批次新增', 1945779577351671809, '2', '#', '', 1, 0, 'F', '0', '0', 'business:batch:add', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values(1945779577351671812, '设计批次修改', 1945779577351671809, '3', '#', '', 1, 0, 'F', '0', '0', 'business:batch:edit', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values(1945779577351671813, '设计批次删除', 1945779577351671809, '4', '#', '', 1, 0, 'F', '0', '0', 'business:batch:remove', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values(1945779577351671814, '设计批次导出', 1945779577351671809, '5', '#', '', 1, 0, 'F', '0', '0', 'business:batch:export', '#', 'admin', sysdate(), '', null, '');
|
||||
19
script/sql/mysql/projectsMenu.sql
Normal file
19
script/sql/mysql/projectsMenu.sql
Normal file
@ -0,0 +1,19 @@
|
||||
-- 菜单 SQL
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values(1946418987737362434, '项目管理', '1896968401096663042', '1', 'projects', 'business/projects/index', 1, 0, 'C', '0', '0', 'business:projects:list', '#', 'admin', sysdate(), '', null, '项目管理菜单');
|
||||
|
||||
-- 按钮 SQL
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values(1946418987737362435, '项目管理查询', 1946418987737362434, '1', '#', '', 1, 0, 'F', '0', '0', 'business:projects:query', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values(1946418987737362436, '项目管理新增', 1946418987737362434, '2', '#', '', 1, 0, 'F', '0', '0', 'business:projects:add', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values(1946418987737362437, '项目管理修改', 1946418987737362434, '3', '#', '', 1, 0, 'F', '0', '0', 'business:projects:edit', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values(1946418987737362438, '项目管理删除', 1946418987737362434, '4', '#', '', 1, 0, 'F', '0', '0', 'business:projects:remove', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values(1946418987737362439, '项目管理导出', 1946418987737362434, '5', '#', '', 1, 0, 'F', '0', '0', 'business:projects:export', '#', 'admin', sysdate(), '', null, '');
|
||||
19
script/sql/mysql/specAttributeTypesMenu.sql
Normal file
19
script/sql/mysql/specAttributeTypesMenu.sql
Normal file
@ -0,0 +1,19 @@
|
||||
-- 菜单 SQL
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values(1946464000749457410, '规格类型', '1896968401096663042', '1', 'specAttributeTypes', 'business/specAttributeTypes/index', 1, 0, 'C', '0', '0', 'business:specAttributeTypes:list', '#', 'admin', sysdate(), '', null, '规格类型菜单');
|
||||
|
||||
-- 按钮 SQL
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values(1946464000749457411, '规格类型查询', 1946464000749457410, '1', '#', '', 1, 0, 'F', '0', '0', 'business:specAttributeTypes:query', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values(1946464000749457412, '规格类型新增', 1946464000749457410, '2', '#', '', 1, 0, 'F', '0', '0', 'business:specAttributeTypes:add', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values(1946464000749457413, '规格类型修改', 1946464000749457410, '3', '#', '', 1, 0, 'F', '0', '0', 'business:specAttributeTypes:edit', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values(1946464000749457414, '规格类型删除', 1946464000749457410, '4', '#', '', 1, 0, 'F', '0', '0', 'business:specAttributeTypes:remove', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values(1946464000749457415, '规格类型导出', 1946464000749457410, '5', '#', '', 1, 0, 'F', '0', '0', 'business:specAttributeTypes:export', '#', 'admin', sysdate(), '', null, '');
|
||||
19
script/sql/mysql/specAttributeValuesMenu.sql
Normal file
19
script/sql/mysql/specAttributeValuesMenu.sql
Normal file
@ -0,0 +1,19 @@
|
||||
-- 菜单 SQL
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values(1946471974171697153, '规格参数值', '1896968401096663042', '1', 'specAttributeValues', 'business/specAttributeValues/index', 1, 0, 'C', '0', '0', 'business:specAttributeValues:list', '#', 'admin', sysdate(), '', null, '规格参数值菜单');
|
||||
|
||||
-- 按钮 SQL
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values(1946471974171697154, '规格参数值查询', 1946471974171697153, '1', '#', '', 1, 0, 'F', '0', '0', 'business:specAttributeValues:query', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values(1946471974171697155, '规格参数值新增', 1946471974171697153, '2', '#', '', 1, 0, 'F', '0', '0', 'business:specAttributeValues:add', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values(1946471974171697156, '规格参数值修改', 1946471974171697153, '3', '#', '', 1, 0, 'F', '0', '0', 'business:specAttributeValues:edit', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values(1946471974171697157, '规格参数值删除', 1946471974171697153, '4', '#', '', 1, 0, 'F', '0', '0', 'business:specAttributeValues:remove', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values(1946471974171697158, '规格参数值导出', 1946471974171697153, '5', '#', '', 1, 0, 'F', '0', '0', 'business:specAttributeValues:export', '#', 'admin', sysdate(), '', null, '');
|
||||
19
script/sql/mysql/userSupplierMenu.sql
Normal file
19
script/sql/mysql/userSupplierMenu.sql
Normal file
@ -0,0 +1,19 @@
|
||||
-- 菜单 SQL
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values(1944385995214422017, 'userSupplier', '1896968401096663042', '1', 'userSupplier', 'business/userSupplier/index', 1, 0, 'C', '0', '0', 'business:userSupplier:list', '#', 'admin', sysdate(), '', null, 'userSupplier菜单');
|
||||
|
||||
-- 按钮 SQL
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values(1944385995214422018, 'userSupplier查询', 1944385995214422017, '1', '#', '', 1, 0, 'F', '0', '0', 'business:userSupplier:query', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values(1944385995214422019, 'userSupplier新增', 1944385995214422017, '2', '#', '', 1, 0, 'F', '0', '0', 'business:userSupplier:add', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values(1944385995214422020, 'userSupplier修改', 1944385995214422017, '3', '#', '', 1, 0, 'F', '0', '0', 'business:userSupplier:edit', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values(1944385995214422021, 'userSupplier删除', 1944385995214422017, '4', '#', '', 1, 0, 'F', '0', '0', 'business:userSupplier:remove', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values(1944385995214422022, 'userSupplier导出', 1944385995214422017, '5', '#', '', 1, 0, 'F', '0', '0', 'business:userSupplier:export', '#', 'admin', sysdate(), '', null, '');
|
||||
Loading…
x
Reference in New Issue
Block a user