From a10aae420a1a3b480ad35c1887ac277c25affdd0 Mon Sep 17 00:00:00 2001 From: geht <2947093423@qq.com> Date: Wed, 20 May 2026 19:06:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=83=B6=E6=96=99=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=A4=84=E7=90=86=E9=80=BB=E8=BE=91=EF=BC=8C=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E5=AD=97=E6=AE=B5=E6=8F=8F=E8=BF=B0=E5=8F=8A=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=AA=8C=E8=AF=81=EF=BC=8C=E5=A2=9E=E5=BC=BA=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E7=A8=B3=E5=AE=9A=E6=80=A7=E5=92=8C=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E4=BD=93=E9=AA=8C=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MesXslMixerPsCompileController.java | 261 ++++++++++++++++ .../xslmes/entity/MesXslMixerPsCompile.java | 152 ++++++++++ .../mapper/MesXslMixerPsCompileMapper.java | 12 + .../service/IMesXslMixerPsCompileService.java | 19 ++ .../impl/MesXslMixerPsCompileServiceImpl.java | 64 ++++ ...s_xsl_ps_belong_construction_code_dict.sql | 47 +++ .../V3.9.2_87__mes_xsl_mixer_ps_compile.sql | 96 ++++++ ...__mes_xsl_mixer_ps_compile_status_flow.sql | 36 +++ ...s_xsl_mixer_ps_compile_workflow_fields.sql | 52 ++++ .../V3.9.2_90__mes_xsl_mixer_ps_history.sql | 44 +++ .../MesXslMixerPsCompile.api.ts | 39 +++ .../MesXslMixerPsCompile.data.ts | 286 ++++++++++++++++++ .../MesXslMixerPsCompileList.vue | 242 +++++++++++++++ .../components/MesXslMixerPsCompileModal.vue | 195 ++++++++++++ .../MesXslMixerPsHistory.api.ts | 2 + .../MesXslMixerPsHistory.data.ts | 89 ++++++ .../MesXslMixerPsHistoryList.vue | 95 ++++++ 17 files changed, 1731 insertions(+) create mode 100644 jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/controller/MesXslMixerPsCompileController.java create mode 100644 jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/entity/MesXslMixerPsCompile.java create mode 100644 jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/mapper/MesXslMixerPsCompileMapper.java create mode 100644 jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/IMesXslMixerPsCompileService.java create mode 100644 jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslMixerPsCompileServiceImpl.java create mode 100644 jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/flyway/sql/mysql/V3.9.2_86__mes_xsl_ps_belong_construction_code_dict.sql create mode 100644 jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/flyway/sql/mysql/V3.9.2_87__mes_xsl_mixer_ps_compile.sql create mode 100644 jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/flyway/sql/mysql/V3.9.2_88__mes_xsl_mixer_ps_compile_status_flow.sql create mode 100644 jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/flyway/sql/mysql/V3.9.2_89__mes_xsl_mixer_ps_compile_workflow_fields.sql create mode 100644 jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/flyway/sql/mysql/V3.9.2_90__mes_xsl_mixer_ps_history.sql create mode 100644 jeecgboot-vue3/src/views/xslmes/mesXslMixerPsCompile/MesXslMixerPsCompile.api.ts create mode 100644 jeecgboot-vue3/src/views/xslmes/mesXslMixerPsCompile/MesXslMixerPsCompile.data.ts create mode 100644 jeecgboot-vue3/src/views/xslmes/mesXslMixerPsCompile/MesXslMixerPsCompileList.vue create mode 100644 jeecgboot-vue3/src/views/xslmes/mesXslMixerPsCompile/components/MesXslMixerPsCompileModal.vue create mode 100644 jeecgboot-vue3/src/views/xslmes/mesXslMixerPsHistory/MesXslMixerPsHistory.api.ts create mode 100644 jeecgboot-vue3/src/views/xslmes/mesXslMixerPsHistory/MesXslMixerPsHistory.data.ts create mode 100644 jeecgboot-vue3/src/views/xslmes/mesXslMixerPsHistory/MesXslMixerPsHistoryList.vue diff --git a/jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/controller/MesXslMixerPsCompileController.java b/jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/controller/MesXslMixerPsCompileController.java new file mode 100644 index 00000000..a1d4d4c2 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/controller/MesXslMixerPsCompileController.java @@ -0,0 +1,261 @@ +package org.jeecg.modules.xslmes.controller; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import lombok.extern.slf4j.Slf4j; +import org.apache.shiro.SecurityUtils; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.aspect.annotation.AutoLog; +import org.jeecg.common.system.base.controller.JeecgController; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.system.query.QueryRuleEnum; +import org.jeecg.common.system.vo.LoginUser; +import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.system.entity.SysDepart; +import org.jeecg.modules.system.service.ISysDepartService; +import org.jeecg.modules.xslmes.entity.MesXslMixerPsCompile; +import org.jeecg.modules.xslmes.service.IMesXslMixerPsCompileService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; + +/** + * MES 密炼PS编制 + */ +@Tag(name = "MES密炼PS编制") +@RestController +@RequestMapping("/xslmes/mesXslMixerPsCompile") +@Slf4j +public class MesXslMixerPsCompileController extends JeecgController { + + @Autowired + private IMesXslMixerPsCompileService mesXslMixerPsCompileService; + + @Autowired + private ISysDepartService sysDepartService; + + @Operation(summary = "MES密炼PS编制-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList( + MesXslMixerPsCompile model, + @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, + HttpServletRequest req) { + Map customeRuleMap = new HashMap<>(); + customeRuleMap.put("psCode", QueryRuleEnum.LIKE); + customeRuleMap.put("title", QueryRuleEnum.LIKE); + QueryWrapper queryWrapper = + QueryGenerator.initQueryWrapper(model, req.getParameterMap(), customeRuleMap); + queryWrapper.orderByDesc("issue_date", "create_time"); + Page page = new Page<>(pageNo, pageSize); + IPage pageList = mesXslMixerPsCompileService.page(page, queryWrapper); + return Result.OK(pageList); + } + + @AutoLog(value = "MES密炼PS编制-添加") + @Operation(summary = "MES密炼PS编制-添加") + @RequiresPermissions("xslmes:mes_xsl_mixer_ps_compile:add") + @PostMapping(value = "/add") + public Result add(@RequestBody MesXslMixerPsCompile model) { + //update-begin---author:jiangxh ---date:20260520 for:【密炼PS编制】保存前校验与冗余回填----------- + String err = validateAndFill(model); + if (err != null) { + return Result.error(err); + } + //update-end---author:jiangxh ---date:20260520 for:【密炼PS编制】保存前校验与冗余回填----------- + mesXslMixerPsCompileService.save(model); + return Result.OK("添加成功!"); + } + + @AutoLog(value = "MES密炼PS编制-编辑") + @Operation(summary = "MES密炼PS编制-编辑") + @RequiresPermissions("xslmes:mes_xsl_mixer_ps_compile:edit") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST}) + public Result edit(@RequestBody MesXslMixerPsCompile model) { + //update-begin---author:jiangxh ---date:20260520 for:【密炼PS编制】保存前校验与冗余回填----------- + String err = validateAndFill(model); + if (err != null) { + return Result.error(err); + } + //update-end---author:jiangxh ---date:20260520 for:【密炼PS编制】保存前校验与冗余回填----------- + MesXslMixerPsCompile existing = mesXslMixerPsCompileService.getById(model.getId()); + if (existing == null) { + return Result.error("未找到对应数据"); + } + if (!"compile".equals(existing.getStatus())) { + return Result.error("仅编制状态的单据允许编辑"); + } + model.setStatus("compile"); + model.setProofreadBy(existing.getProofreadBy()); + model.setProofreadTime(existing.getProofreadTime()); + model.setAuditBy(existing.getAuditBy()); + model.setAuditTime(existing.getAuditTime()); + model.setApproveBy(existing.getApproveBy()); + model.setApproveTime(existing.getApproveTime()); + mesXslMixerPsCompileService.updateById(model); + return Result.OK("编辑成功!"); + } + + @AutoLog(value = "MES密炼PS编制-删除") + @Operation(summary = "MES密炼PS编制-通过id删除") + @RequiresPermissions("xslmes:mes_xsl_mixer_ps_compile:delete") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name = "id", required = true) String id) { + //update-begin---author:jiangxh ---date:20260520 for:【密炼PS编制】仅编制状态允许删除----------- + MesXslMixerPsCompile existing = mesXslMixerPsCompileService.getById(id); + String err = assertCompileStatusForDelete(existing); + if (err != null) { + return Result.error(err); + } + //update-end---author:jiangxh ---date:20260520 for:【密炼PS编制】仅编制状态允许删除----------- + mesXslMixerPsCompileService.removeById(id); + return Result.OK("删除成功!"); + } + + @AutoLog(value = "MES密炼PS编制-批量删除") + @Operation(summary = "MES密炼PS编制-批量删除") + @RequiresPermissions("xslmes:mes_xsl_mixer_ps_compile:deleteBatch") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name = "ids", required = true) String ids) { + //update-begin---author:jiangxh ---date:20260520 for:【密炼PS编制】仅编制状态允许删除----------- + if (oConvertUtils.isEmpty(ids)) { + return Result.error("请选择要删除的记录"); + } + for (String id : ids.split(",")) { + if (oConvertUtils.isEmpty(id)) { + continue; + } + MesXslMixerPsCompile existing = mesXslMixerPsCompileService.getById(id.trim()); + String err = assertCompileStatusForDelete(existing); + if (err != null) { + return Result.error(err); + } + } + //update-end---author:jiangxh ---date:20260520 for:【密炼PS编制】仅编制状态允许删除----------- + mesXslMixerPsCompileService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + @Operation(summary = "MES密炼PS编制-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name = "id", required = true) String id) { + MesXslMixerPsCompile entity = mesXslMixerPsCompileService.getById(id); + if (entity == null) { + return Result.error("未找到对应数据"); + } + return Result.OK(entity); + } + + @RequiresPermissions("xslmes:mes_xsl_mixer_ps_compile:exportXls") + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, MesXslMixerPsCompile model) { + return super.exportXls(request, model, MesXslMixerPsCompile.class, "密炼PS编制"); + } + + @RequiresPermissions("xslmes:mes_xsl_mixer_ps_compile:importExcel") + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, MesXslMixerPsCompile.class); + } + + //update-begin---author:jiangxh ---date:20260520 for:【密炼PS编制】校对/审核/批准----------- + @AutoLog(value = "MES密炼PS编制-校对") + @Operation(summary = "MES密炼PS编制-校对") + @RequiresPermissions("xslmes:mes_xsl_mixer_ps_compile:proofread") + @PostMapping(value = "/proofread") + public Result proofread(@RequestParam(name = "ids") String ids) { + return doChangeStatus(ids, "compile", "proofread", "校对"); + } + + @AutoLog(value = "MES密炼PS编制-审核") + @Operation(summary = "MES密炼PS编制-审核") + @RequiresPermissions("xslmes:mes_xsl_mixer_ps_compile:audit") + @PostMapping(value = "/audit") + public Result audit(@RequestParam(name = "ids") String ids) { + return doChangeStatus(ids, "proofread", "audit", "审核"); + } + + @AutoLog(value = "MES密炼PS编制-批准") + @Operation(summary = "MES密炼PS编制-批准") + @RequiresPermissions("xslmes:mes_xsl_mixer_ps_compile:approve") + @PostMapping(value = "/approve") + public Result approve(@RequestParam(name = "ids") String ids) { + return doChangeStatus(ids, "audit", "approve", "批准"); + } + + private Result doChangeStatus(String ids, String expectedStatus, String targetStatus, String actionLabel) { + String err = mesXslMixerPsCompileService.changeStatusBatch( + ids, expectedStatus, targetStatus, actionLabel, getOperatorName()); + if (err != null) { + return Result.error(err); + } + return Result.OK(actionLabel + "成功!"); + } + + private String getOperatorName() { + LoginUser loginUser = null; + try { + loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + } catch (Exception e) { + log.debug("获取当前登录用户失败", e); + } + if (loginUser == null) { + return null; + } + if (oConvertUtils.isNotEmpty(loginUser.getRealname())) { + return loginUser.getRealname(); + } + return loginUser.getUsername(); + } + //update-end---author:jiangxh ---date:20260520 for:【密炼PS编制】校对/审核/批准----------- + + //update-begin---author:jiangxh ---date:20260520 for:【密炼PS编制】保存前校验与冗余回填----------- + private String validateAndFill(MesXslMixerPsCompile model) { + if (oConvertUtils.isEmpty(model.getReceiveDeptId())) { + return "请选择收信部门"; + } + if (oConvertUtils.isEmpty(model.getReferenceDeptId())) { + return "请选择参照部门"; + } + if (oConvertUtils.isEmpty(model.getTitle())) { + return "请输入标题"; + } + if (oConvertUtils.isEmpty(model.getStatus())) { + model.setStatus("compile"); + } + if (oConvertUtils.isNotEmpty(model.getFactoryId())) { + SysDepart factory = sysDepartService.getById(model.getFactoryId()); + if (factory == null) { + return "所选所属工厂不存在,请重新选择"; + } + model.setFactoryName(factory.getDepartName()); + } else { + model.setFactoryName(null); + } + return null; + } + //update-end---author:jiangxh ---date:20260520 for:【密炼PS编制】保存前校验与冗余回填----------- + + //update-begin---author:jiangxh ---date:20260520 for:【密炼PS编制】仅编制状态允许删除----------- + private String assertCompileStatusForDelete(MesXslMixerPsCompile entity) { + if (entity == null) { + return "记录不存在或已删除"; + } + String status = entity.getStatus() == null ? "" : entity.getStatus(); + if (!"compile".equals(status)) { + String psCode = oConvertUtils.isEmpty(entity.getPsCode()) ? entity.getId() : entity.getPsCode(); + return "PS编码[" + psCode + "]当前状态不允许删除,仅编制状态可删除"; + } + return null; + } + //update-end---author:jiangxh ---date:20260520 for:【密炼PS编制】仅编制状态允许删除----------- +} diff --git a/jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/entity/MesXslMixerPsCompile.java b/jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/entity/MesXslMixerPsCompile.java new file mode 100644 index 00000000..0db99b99 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/entity/MesXslMixerPsCompile.java @@ -0,0 +1,152 @@ +package org.jeecg.modules.xslmes.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.v3.oas.annotations.media.Schema; +import java.io.Serializable; +import java.util.Date; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.jeecg.common.aspect.annotation.Dict; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.springframework.format.annotation.DateTimeFormat; + +/** + * MES 密炼PS编制 + */ +@Data +@TableName("mes_xsl_mixer_ps_compile") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@Schema(description = "MES密炼PS编制") +public class MesXslMixerPsCompile implements Serializable { + + private static final long serialVersionUID = 1L; + + @TableId(type = IdType.ASSIGN_ID) + private String id; + + @Excel(name = "所属工厂", width = 20) + @Schema(description = "所属工厂名称冗余(公司)") + private String factoryName; + + @Schema(description = "所属工厂ID(sys_depart.id,公司)") + private String factoryId; + + @Excel(name = "PS编码", width = 18) + @Schema(description = "PS编码") + private String psCode; + + @Excel(name = "类型", width = 15, dicCode = "xslmes_ps_belong") + @Dict(dicCode = "xslmes_ps_belong") + @Schema(description = "类型(字典PS归属)") + private String psType; + + @Excel(name = "施工代号", width = 15, dicCode = "xslmes_construction_code") + @Dict(dicCode = "xslmes_construction_code") + @Schema(description = "施工代号") + private String constructionCode; + + @Excel(name = "发放日期", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern = "yyyy-MM-dd") + @Schema(description = "发放日期") + private Date issueDate; + + @Excel(name = "发送部门", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id") + @Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id") + @Schema(description = "发送部门ID") + private String sendDeptId; + + @Excel(name = "收信部门", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id") + @Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id") + @Schema(description = "收信部门ID") + private String receiveDeptId; + + @Excel(name = "参照部门", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id") + @Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id") + @Schema(description = "参照部门ID") + private String referenceDeptId; + + @Excel(name = "标题", width = 25) + @Schema(description = "标题") + private String title; + + @Excel(name = "目的", width = 30) + @Schema(description = "目的") + private String purpose; + + @Excel(name = "依据", width = 30) + @Schema(description = "依据") + private String basis; + + @Excel(name = "内容", width = 40) + @Schema(description = "内容") + private String content; + + @Excel(name = "担当", width = 12) + @Schema(description = "担当") + private String responsiblePerson; + + @Excel(name = "状态", width = 10, dicCode = "xslmes_mixer_ps_status") + @Dict(dicCode = "xslmes_mixer_ps_status") + @Schema(description = "状态") + private String status; + + @Excel(name = "校对人", width = 15) + @Schema(description = "校对人") + private String proofreadBy; + + @Excel(name = "校对时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Schema(description = "校对时间") + private Date proofreadTime; + + @Excel(name = "审核人", width = 15) + @Schema(description = "审核人") + private String auditBy; + + @Excel(name = "审核时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Schema(description = "审核时间") + private Date auditTime; + + @Excel(name = "批准人", width = 15) + @Schema(description = "批准人") + private String approveBy; + + @Excel(name = "批准时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Schema(description = "批准时间") + private Date approveTime; + + @Excel(name = "创建人", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username") + //update-begin---author:jiangxh ---date:20260520 for:【密炼PS编制】创建人翻译为姓名供编制人展示----------- + @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username") + //update-end---author:jiangxh ---date:20260520 for:【密炼PS编制】创建人翻译为姓名供编制人展示----------- + private String createBy; + + @Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date createTime; + + @Excel(name = "修改人", width = 15) + private String updateBy; + + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date updateTime; + + @Schema(description = "租户ID") + private Integer tenantId; + + private String sysOrgCode; + private Integer delFlag; +} diff --git a/jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/mapper/MesXslMixerPsCompileMapper.java b/jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/mapper/MesXslMixerPsCompileMapper.java new file mode 100644 index 00000000..f5882e91 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/mapper/MesXslMixerPsCompileMapper.java @@ -0,0 +1,12 @@ +package org.jeecg.modules.xslmes.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; +import org.jeecg.modules.xslmes.entity.MesXslMixerPsCompile; + +/** + * MES 密炼PS编制 Mapper + */ +@Mapper +public interface MesXslMixerPsCompileMapper extends BaseMapper { +} diff --git a/jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/IMesXslMixerPsCompileService.java b/jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/IMesXslMixerPsCompileService.java new file mode 100644 index 00000000..1c37ebbc --- /dev/null +++ b/jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/IMesXslMixerPsCompileService.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.xslmes.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import org.jeecg.modules.xslmes.entity.MesXslMixerPsCompile; + +/** + * MES 密炼PS编制 + */ +public interface IMesXslMixerPsCompileService extends IService { + + //update-begin---author:jiangxh ---date:20260520 for:【密炼PS编制】批量流转状态----------- + /** + * 批量变更状态(校验当前状态后更新,并记录操作人/时间) + * + * @return 失败原因,null 表示成功 + */ + String changeStatusBatch(String ids, String expectedStatus, String targetStatus, String actionLabel, String operatorName); + //update-end---author:jiangxh ---date:20260520 for:【密炼PS编制】批量流转状态----------- +} diff --git a/jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslMixerPsCompileServiceImpl.java b/jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslMixerPsCompileServiceImpl.java new file mode 100644 index 00000000..70c5137f --- /dev/null +++ b/jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslMixerPsCompileServiceImpl.java @@ -0,0 +1,64 @@ +package org.jeecg.modules.xslmes.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import java.util.Arrays; +import java.util.Date; +import java.util.List; +import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.xslmes.entity.MesXslMixerPsCompile; +import org.jeecg.modules.xslmes.mapper.MesXslMixerPsCompileMapper; +import org.jeecg.modules.xslmes.service.IMesXslMixerPsCompileService; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +/** + * MES 密炼PS编制 + */ +@Service +public class MesXslMixerPsCompileServiceImpl extends ServiceImpl + implements IMesXslMixerPsCompileService { + + //update-begin---author:jiangxh ---date:20260520 for:【密炼PS编制】批量流转状态----------- + @Override + @Transactional(rollbackFor = Exception.class) + public String changeStatusBatch(String ids, String expectedStatus, String targetStatus, String actionLabel, + String operatorName) { + if (oConvertUtils.isEmpty(ids)) { + return "请选择要" + actionLabel + "的记录"; + } + List idList = Arrays.asList(ids.split(",")); + Date now = new Date(); + for (String id : idList) { + if (oConvertUtils.isEmpty(id)) { + continue; + } + MesXslMixerPsCompile entity = getById(id.trim()); + if (entity == null) { + return "记录不存在或已删除"; + } + String current = entity.getStatus() == null ? "" : entity.getStatus(); + if (!expectedStatus.equals(current)) { + String psCode = oConvertUtils.isEmpty(entity.getPsCode()) ? id : entity.getPsCode(); + return "PS编码[" + psCode + "]当前状态不允许" + actionLabel + ",请先完成上一环节"; + } + entity.setStatus(targetStatus); + fillWorkflowInfo(entity, targetStatus, operatorName, now); + updateById(entity); + } + return null; + } + + private void fillWorkflowInfo(MesXslMixerPsCompile entity, String targetStatus, String operatorName, Date now) { + if ("proofread".equals(targetStatus)) { + entity.setProofreadBy(operatorName); + entity.setProofreadTime(now); + } else if ("audit".equals(targetStatus)) { + entity.setAuditBy(operatorName); + entity.setAuditTime(now); + } else if ("approve".equals(targetStatus)) { + entity.setApproveBy(operatorName); + entity.setApproveTime(now); + } + } + //update-end---author:jiangxh ---date:20260520 for:【密炼PS编制】批量流转状态----------- +} diff --git a/jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/flyway/sql/mysql/V3.9.2_86__mes_xsl_ps_belong_construction_code_dict.sql b/jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/flyway/sql/mysql/V3.9.2_86__mes_xsl_ps_belong_construction_code_dict.sql new file mode 100644 index 00000000..19836616 --- /dev/null +++ b/jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/flyway/sql/mysql/V3.9.2_86__mes_xsl_ps_belong_construction_code_dict.sql @@ -0,0 +1,47 @@ +-- MES 字典:PS归属、施工代号(租户 1002) +SET NAMES utf8mb4; + +INSERT IGNORE INTO `sys_dict` (`id`, `dict_name`, `dict_code`, `description`, `del_flag`, `create_by`, `create_time`, `type`, `tenant_id`) +VALUES ('1995000000000000001', 'PS归属', 'xslmes_ps_belong', 'MES PS归属', 0, 'admin', NOW(), 0, 1002); + +INSERT IGNORE INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `sort_order`, `status`, `create_by`, `create_time`) +VALUES ('1995000000000000101', '1995000000000000001', '密炼示方', 'ml_formula', 1, 1, 'admin', NOW()); + +INSERT IGNORE INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `sort_order`, `status`, `create_by`, `create_time`) +VALUES ('1995000000000000102', '1995000000000000001', '原材料检验标准', 'raw_inspect_std', 2, 1, 'admin', NOW()); + +INSERT IGNORE INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `sort_order`, `status`, `create_by`, `create_time`) +VALUES ('1995000000000000103', '1995000000000000001', '密炼作业指导书', 'ml_work_instruction', 3, 1, 'admin', NOW()); + +INSERT IGNORE INTO `sys_dict` (`id`, `dict_name`, `dict_code`, `description`, `del_flag`, `create_by`, `create_time`, `type`, `tenant_id`) +VALUES ('1995000000000000002', '施工代号', 'xslmes_construction_code', 'MES 施工代号', 0, 'admin', NOW(), 0, 1002); + +INSERT IGNORE INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `sort_order`, `status`, `create_by`, `create_time`) +VALUES ('1995000000000000201', '1995000000000000002', '实验施工', 'exp_construction', 1, 1, 'admin', NOW()); + +INSERT IGNORE INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `sort_order`, `status`, `create_by`, `create_time`) +VALUES ('1995000000000000202', '1995000000000000002', '量试施工', 'trial_construction', 2, 1, 'admin', NOW()); + +INSERT IGNORE INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `sort_order`, `status`, `create_by`, `create_time`) +VALUES ('1995000000000000203', '1995000000000000002', '正规施工', 'formal_construction', 3, 1, 'admin', NOW()); + +INSERT IGNORE INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `sort_order`, `status`, `create_by`, `create_time`) +VALUES ('1995000000000000204', '1995000000000000002', '混配合', 'mixing_compound', 4, 1, 'admin', NOW()); + +INSERT IGNORE INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `sort_order`, `status`, `create_by`, `create_time`) +VALUES ('1995000000000000205', '1995000000000000002', '药品计量', 'chemical_dosing', 5, 1, 'admin', NOW()); + +INSERT IGNORE INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `sort_order`, `status`, `create_by`, `create_time`) +VALUES ('1995000000000000206', '1995000000000000002', '硫化施工', 'vulcanization_construction', 6, 1, 'admin', NOW()); + +INSERT IGNORE INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `sort_order`, `status`, `create_by`, `create_time`) +VALUES ('1995000000000000207', '1995000000000000002', '原材料检测标准', 'raw_test_std', 7, 1, 'admin', NOW()); + +INSERT IGNORE INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `sort_order`, `status`, `create_by`, `create_time`) +VALUES ('1995000000000000208', '1995000000000000002', '硫化作业指导书', 'vulcanization_work_instruction', 8, 1, 'admin', NOW()); + +INSERT IGNORE INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `sort_order`, `status`, `create_by`, `create_time`) +VALUES ('1995000000000000209', '1995000000000000002', '密炼作业指导书', 'ml_work_instruction', 9, 1, 'admin', NOW()); + +INSERT IGNORE INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `sort_order`, `status`, `create_by`, `create_time`) +VALUES ('1995000000000000210', '1995000000000000002', '半制品作业指导书', 'semi_product_work_instruction', 10, 1, 'admin', NOW()); diff --git a/jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/flyway/sql/mysql/V3.9.2_87__mes_xsl_mixer_ps_compile.sql b/jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/flyway/sql/mysql/V3.9.2_87__mes_xsl_mixer_ps_compile.sql new file mode 100644 index 00000000..e2310b68 --- /dev/null +++ b/jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/flyway/sql/mysql/V3.9.2_87__mes_xsl_mixer_ps_compile.sql @@ -0,0 +1,96 @@ +-- 密炼PS编制:状态字典 + 建表 + 菜单(挂 MES技术管理)+ admin 授权 +SET NAMES utf8mb4; + +INSERT IGNORE INTO `sys_dict` (`id`, `dict_name`, `dict_code`, `description`, `del_flag`, `create_by`, `create_time`, `type`, `tenant_id`) +VALUES ('1995000000000000003', '密炼PS状态', 'xslmes_mixer_ps_status', 'MES密炼PS编制状态', 0, 'admin', NOW(), 0, 1002); + +INSERT IGNORE INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `sort_order`, `status`, `create_by`, `create_time`) +VALUES ('1995000000000000301', '1995000000000000003', '编制', 'compile', 1, 1, 'admin', NOW()); + +INSERT IGNORE INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `sort_order`, `status`, `create_by`, `create_time`) +VALUES ('1995000000000000302', '1995000000000000003', '校对', 'proofread', 2, 1, 'admin', NOW()); + +INSERT IGNORE INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `sort_order`, `status`, `create_by`, `create_time`) +VALUES ('1995000000000000303', '1995000000000000003', '审核', 'audit', 3, 1, 'admin', NOW()); + +INSERT IGNORE INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `sort_order`, `status`, `create_by`, `create_time`) +VALUES ('1995000000000000304', '1995000000000000003', '批准', 'approve', 4, 1, 'admin', NOW()); + +CREATE TABLE IF NOT EXISTS `mes_xsl_mixer_ps_compile` ( + `id` varchar(32) NOT NULL COMMENT '主键', + `factory_id` varchar(32) DEFAULT NULL COMMENT '所属工厂ID(sys_depart.id,公司)', + `factory_name` varchar(200) DEFAULT NULL COMMENT '所属工厂名称冗余', + `ps_code` varchar(100) DEFAULT NULL COMMENT 'PS编码', + `ps_type` varchar(64) DEFAULT NULL COMMENT '类型(字典xslmes_ps_belong)', + `construction_code` varchar(64) DEFAULT NULL COMMENT '施工代号(字典xslmes_construction_code)', + `issue_date` date DEFAULT NULL COMMENT '发放日期', + `send_dept_id` varchar(32) DEFAULT NULL COMMENT '发送部门ID', + `receive_dept_id` varchar(32) DEFAULT NULL COMMENT '收信部门ID', + `reference_dept_id` varchar(32) DEFAULT NULL COMMENT '参照部门ID', + `title` varchar(500) DEFAULT NULL COMMENT '标题', + `purpose` text COMMENT '目的', + `basis` text COMMENT '依据', + `content` text COMMENT '内容', + `responsible_person` varchar(100) DEFAULT NULL COMMENT '担当', + `status` varchar(32) DEFAULT 'compile' COMMENT '状态(字典xslmes_mixer_ps_status)', + `tenant_id` int DEFAULT NULL COMMENT '租户ID', + `sys_org_code` varchar(64) DEFAULT NULL COMMENT '所属部门', + `create_by` varchar(50) DEFAULT NULL COMMENT '创建人', + `create_time` datetime DEFAULT NULL COMMENT '创建时间', + `update_by` varchar(50) DEFAULT NULL COMMENT '修改人', + `update_time` datetime DEFAULT NULL COMMENT '修改时间', + `del_flag` int NOT NULL DEFAULT 0 COMMENT '逻辑删除(0正常 1已删除)', + PRIMARY KEY (`id`), + KEY `idx_mxmps_ps_code` (`ps_code`), + KEY `idx_mxmps_issue_date` (`issue_date`), + KEY `idx_mxmps_status` (`status`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='MES密炼PS编制'; + +UPDATE `sys_permission` +SET `is_leaf` = 0, `update_time` = NOW() +WHERE `id` = '1900000000000000810' AND `is_leaf` = 1; + +INSERT IGNORE INTO `sys_permission` ( + `id`, `parent_id`, `name`, `url`, `component`, `is_route`, `component_name`, `redirect`, + `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_leaf`, `keep_alive`, + `hidden`, `hide_tab`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, + `del_flag`, `rule_flag`, `status`, `internal_or_external` +) VALUES ( + '177925970995518', '1900000000000000810', '密炼PS编制', '/xslmes/mesXslMixerPsCompile', + 'xslmes/mesXslMixerPsCompile/MesXslMixerPsCompileList', 1, 'MesXslMixerPsCompileList', NULL, + 1, NULL, '0', 3.00, 0, 'ant-design:file-text-outlined', 0, 1, + 0, 0, 'MES密炼PS编制', 'admin', NOW(), 'admin', NOW(), + 0, 0, '1', 0 +); + +INSERT IGNORE INTO `sys_permission` (`id`, `parent_id`, `name`, `menu_type`, `perms`, `perms_type`, `sort_no`, `is_route`, `is_leaf`, `hidden`, `status`, `del_flag`, `create_by`, `create_time`) +VALUES ('177925970995519', '177925970995518', '新增', 2, 'xslmes:mes_xsl_mixer_ps_compile:add', '1', 1.00, 0, 1, 0, '1', 0, 'admin', NOW()); + +INSERT IGNORE INTO `sys_permission` (`id`, `parent_id`, `name`, `menu_type`, `perms`, `perms_type`, `sort_no`, `is_route`, `is_leaf`, `hidden`, `status`, `del_flag`, `create_by`, `create_time`) +VALUES ('177925970995520', '177925970995518', '编辑', 2, 'xslmes:mes_xsl_mixer_ps_compile:edit', '1', 2.00, 0, 1, 0, '1', 0, 'admin', NOW()); + +INSERT IGNORE INTO `sys_permission` (`id`, `parent_id`, `name`, `menu_type`, `perms`, `perms_type`, `sort_no`, `is_route`, `is_leaf`, `hidden`, `status`, `del_flag`, `create_by`, `create_time`) +VALUES ('177925970995521', '177925970995518', '删除', 2, 'xslmes:mes_xsl_mixer_ps_compile:delete', '1', 3.00, 0, 1, 0, '1', 0, 'admin', NOW()); + +INSERT IGNORE INTO `sys_permission` (`id`, `parent_id`, `name`, `menu_type`, `perms`, `perms_type`, `sort_no`, `is_route`, `is_leaf`, `hidden`, `status`, `del_flag`, `create_by`, `create_time`) +VALUES ('177925970995522', '177925970995518', '批量删除', 2, 'xslmes:mes_xsl_mixer_ps_compile:deleteBatch', '1', 4.00, 0, 1, 0, '1', 0, 'admin', NOW()); + +INSERT IGNORE INTO `sys_permission` (`id`, `parent_id`, `name`, `menu_type`, `perms`, `perms_type`, `sort_no`, `is_route`, `is_leaf`, `hidden`, `status`, `del_flag`, `create_by`, `create_time`) +VALUES ('177925970995523', '177925970995518', '导出', 2, 'xslmes:mes_xsl_mixer_ps_compile:exportXls', '1', 5.00, 0, 1, 0, '1', 0, 'admin', NOW()); + +INSERT IGNORE INTO `sys_permission` (`id`, `parent_id`, `name`, `menu_type`, `perms`, `perms_type`, `sort_no`, `is_route`, `is_leaf`, `hidden`, `status`, `del_flag`, `create_by`, `create_time`) +VALUES ('177925970995524', '177925970995518', '导入', 2, 'xslmes:mes_xsl_mixer_ps_compile:importExcel', '1', 6.00, 0, 1, 0, '1', 0, 'admin', NOW()); + +INSERT INTO `sys_role_permission` (`id`, `role_id`, `permission_id`, `data_rule_ids`, `operate_date`, `operate_ip`) +SELECT REPLACE(UUID(), '-', ''), r.id, p.id, NULL, NOW(), '127.0.0.1' +FROM `sys_role` r +CROSS JOIN `sys_permission` p +WHERE r.`role_code` = 'admin' + AND p.`id` IN ( + '177925970995518', '177925970995519', '177925970995520', + '177925970995521', '177925970995522', '177925970995523', '177925970995524' + ) + AND NOT EXISTS ( + SELECT 1 FROM `sys_role_permission` rp + WHERE rp.`role_id` = r.id AND rp.`permission_id` = p.id + ); diff --git a/jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/flyway/sql/mysql/V3.9.2_88__mes_xsl_mixer_ps_compile_status_flow.sql b/jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/flyway/sql/mysql/V3.9.2_88__mes_xsl_mixer_ps_compile_status_flow.sql new file mode 100644 index 00000000..a152b8ba --- /dev/null +++ b/jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/flyway/sql/mysql/V3.9.2_88__mes_xsl_mixer_ps_compile_status_flow.sql @@ -0,0 +1,36 @@ +-- 密炼PS编制:状态字典调整为 编制→校对→审核→批准,并增加按钮权限 +SET NAMES utf8mb4; + +UPDATE `sys_dict_item` +SET `item_text` = '校对', `item_value` = 'proofread', `sort_order` = 2, `update_by` = 'admin', `update_time` = NOW() +WHERE `dict_id` = '1995000000000000003' AND (`item_value` = 'submitted' OR `id` = '1995000000000000302'); + +UPDATE `sys_dict_item` +SET `item_text` = '审核', `item_value` = 'audit', `sort_order` = 3, `update_by` = 'admin', `update_time` = NOW() +WHERE `dict_id` = '1995000000000000003' AND (`item_value` = 'approved' OR `id` = '1995000000000000303'); + +INSERT IGNORE INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `sort_order`, `status`, `create_by`, `create_time`) +VALUES ('1995000000000000304', '1995000000000000003', '批准', 'approve', 4, 1, 'admin', NOW()); + +UPDATE `mes_xsl_mixer_ps_compile` SET `status` = 'proofread' WHERE `status` = 'submitted'; +UPDATE `mes_xsl_mixer_ps_compile` SET `status` = 'audit' WHERE `status` = 'approved'; + +INSERT IGNORE INTO `sys_permission` (`id`, `parent_id`, `name`, `menu_type`, `perms`, `perms_type`, `sort_no`, `is_route`, `is_leaf`, `hidden`, `status`, `del_flag`, `create_by`, `create_time`) +VALUES ('177925970995525', '177925970995518', '校对', 2, 'xslmes:mes_xsl_mixer_ps_compile:proofread', '1', 7.00, 0, 1, 0, '1', 0, 'admin', NOW()); + +INSERT IGNORE INTO `sys_permission` (`id`, `parent_id`, `name`, `menu_type`, `perms`, `perms_type`, `sort_no`, `is_route`, `is_leaf`, `hidden`, `status`, `del_flag`, `create_by`, `create_time`) +VALUES ('177925970995526', '177925970995518', '审核', 2, 'xslmes:mes_xsl_mixer_ps_compile:audit', '1', 8.00, 0, 1, 0, '1', 0, 'admin', NOW()); + +INSERT IGNORE INTO `sys_permission` (`id`, `parent_id`, `name`, `menu_type`, `perms`, `perms_type`, `sort_no`, `is_route`, `is_leaf`, `hidden`, `status`, `del_flag`, `create_by`, `create_time`) +VALUES ('177925970995527', '177925970995518', '批准', 2, 'xslmes:mes_xsl_mixer_ps_compile:approve', '1', 9.00, 0, 1, 0, '1', 0, 'admin', NOW()); + +INSERT INTO `sys_role_permission` (`id`, `role_id`, `permission_id`, `data_rule_ids`, `operate_date`, `operate_ip`) +SELECT REPLACE(UUID(), '-', ''), r.id, p.id, NULL, NOW(), '127.0.0.1' +FROM `sys_role` r +CROSS JOIN `sys_permission` p +WHERE r.`role_code` = 'admin' + AND p.`id` IN ('177925970995525', '177925970995526', '177925970995527') + AND NOT EXISTS ( + SELECT 1 FROM `sys_role_permission` rp + WHERE rp.`role_id` = r.id AND rp.`permission_id` = p.id + ); diff --git a/jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/flyway/sql/mysql/V3.9.2_89__mes_xsl_mixer_ps_compile_workflow_fields.sql b/jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/flyway/sql/mysql/V3.9.2_89__mes_xsl_mixer_ps_compile_workflow_fields.sql new file mode 100644 index 00000000..51fe5885 --- /dev/null +++ b/jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/flyway/sql/mysql/V3.9.2_89__mes_xsl_mixer_ps_compile_workflow_fields.sql @@ -0,0 +1,52 @@ +-- 密炼PS编制:校对/审核/批准人时间字段;收信/参照部门支持多选(逗号分隔存储) +SET NAMES utf8mb4; + +SET @db = DATABASE(); + +SET @sql = IF( + (SELECT COUNT(*) FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = @db AND TABLE_NAME = 'mes_xsl_mixer_ps_compile' AND COLUMN_NAME = 'proofread_by') = 0, + 'ALTER TABLE `mes_xsl_mixer_ps_compile` ADD COLUMN `proofread_by` varchar(50) DEFAULT NULL COMMENT ''校对人'' AFTER `status`', + 'SELECT 1' +); +PREPARE stmt FROM @sql; EXECUTE stmt; DEALLOCATE PREPARE stmt; + +SET @sql = IF( + (SELECT COUNT(*) FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = @db AND TABLE_NAME = 'mes_xsl_mixer_ps_compile' AND COLUMN_NAME = 'proofread_time') = 0, + 'ALTER TABLE `mes_xsl_mixer_ps_compile` ADD COLUMN `proofread_time` datetime DEFAULT NULL COMMENT ''校对时间'' AFTER `proofread_by`', + 'SELECT 1' +); +PREPARE stmt FROM @sql; EXECUTE stmt; DEALLOCATE PREPARE stmt; + +SET @sql = IF( + (SELECT COUNT(*) FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = @db AND TABLE_NAME = 'mes_xsl_mixer_ps_compile' AND COLUMN_NAME = 'audit_by') = 0, + 'ALTER TABLE `mes_xsl_mixer_ps_compile` ADD COLUMN `audit_by` varchar(50) DEFAULT NULL COMMENT ''审核人'' AFTER `proofread_time`', + 'SELECT 1' +); +PREPARE stmt FROM @sql; EXECUTE stmt; DEALLOCATE PREPARE stmt; + +SET @sql = IF( + (SELECT COUNT(*) FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = @db AND TABLE_NAME = 'mes_xsl_mixer_ps_compile' AND COLUMN_NAME = 'audit_time') = 0, + 'ALTER TABLE `mes_xsl_mixer_ps_compile` ADD COLUMN `audit_time` datetime DEFAULT NULL COMMENT ''审核时间'' AFTER `audit_by`', + 'SELECT 1' +); +PREPARE stmt FROM @sql; EXECUTE stmt; DEALLOCATE PREPARE stmt; + +SET @sql = IF( + (SELECT COUNT(*) FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = @db AND TABLE_NAME = 'mes_xsl_mixer_ps_compile' AND COLUMN_NAME = 'approve_by') = 0, + 'ALTER TABLE `mes_xsl_mixer_ps_compile` ADD COLUMN `approve_by` varchar(50) DEFAULT NULL COMMENT ''批准人'' AFTER `audit_time`', + 'SELECT 1' +); +PREPARE stmt FROM @sql; EXECUTE stmt; DEALLOCATE PREPARE stmt; + +SET @sql = IF( + (SELECT COUNT(*) FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = @db AND TABLE_NAME = 'mes_xsl_mixer_ps_compile' AND COLUMN_NAME = 'approve_time') = 0, + 'ALTER TABLE `mes_xsl_mixer_ps_compile` ADD COLUMN `approve_time` datetime DEFAULT NULL COMMENT ''批准时间'' AFTER `approve_by`', + 'SELECT 1' +); +PREPARE stmt FROM @sql; EXECUTE stmt; DEALLOCATE PREPARE stmt; + +ALTER TABLE `mes_xsl_mixer_ps_compile` + MODIFY COLUMN `receive_dept_id` varchar(500) DEFAULT NULL COMMENT '收信部门ID(多个逗号分隔)'; + +ALTER TABLE `mes_xsl_mixer_ps_compile` + MODIFY COLUMN `reference_dept_id` varchar(500) DEFAULT NULL COMMENT '参照部门ID(多个逗号分隔)'; diff --git a/jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/flyway/sql/mysql/V3.9.2_90__mes_xsl_mixer_ps_history.sql b/jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/flyway/sql/mysql/V3.9.2_90__mes_xsl_mixer_ps_history.sql new file mode 100644 index 00000000..5456bea0 --- /dev/null +++ b/jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/flyway/sql/mysql/V3.9.2_90__mes_xsl_mixer_ps_history.sql @@ -0,0 +1,44 @@ +-- PS审批历史:状态展示字典(键值与原状态一致,批准改为正式发布)+ 菜单 +SET NAMES utf8mb4; + +INSERT IGNORE INTO `sys_dict` (`id`, `dict_name`, `dict_code`, `description`, `del_flag`, `create_by`, `create_time`, `type`, `tenant_id`) +VALUES ('1995000000000000004', '密炼PS审批历史状态', 'xslmes_mixer_ps_history_status', 'PS审批历史状态展示(approve显示为正式发布)', 0, 'admin', NOW(), 0, 1002); + +INSERT IGNORE INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `sort_order`, `status`, `create_by`, `create_time`) +VALUES ('1995000000000000401', '1995000000000000004', '编制', 'compile', 1, 1, 'admin', NOW()); + +INSERT IGNORE INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `sort_order`, `status`, `create_by`, `create_time`) +VALUES ('1995000000000000402', '1995000000000000004', '校对', 'proofread', 2, 1, 'admin', NOW()); + +INSERT IGNORE INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `sort_order`, `status`, `create_by`, `create_time`) +VALUES ('1995000000000000403', '1995000000000000004', '审核', 'audit', 3, 1, 'admin', NOW()); + +INSERT IGNORE INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `sort_order`, `status`, `create_by`, `create_time`) +VALUES ('1995000000000000404', '1995000000000000004', '正式发布', 'approve', 4, 1, 'admin', NOW()); + +INSERT IGNORE INTO `sys_permission` ( + `id`, `parent_id`, `name`, `url`, `component`, `is_route`, `component_name`, `redirect`, + `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_leaf`, `keep_alive`, + `hidden`, `hide_tab`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, + `del_flag`, `rule_flag`, `status`, `internal_or_external` +) VALUES ( + '177925970995528', '1900000000000000810', 'PS审批历史', '/xslmes/mesXslMixerPsHistory', + 'xslmes/mesXslMixerPsHistory/MesXslMixerPsHistoryList', 1, 'MesXslMixerPsHistoryList', NULL, + 1, NULL, '0', 4.00, 0, 'ant-design:history-outlined', 0, 1, + 0, 0, '查询密炼PS编制已批准记录', 'admin', NOW(), 'admin', NOW(), + 0, 0, '1', 0 +); + +INSERT IGNORE INTO `sys_permission` (`id`, `parent_id`, `name`, `menu_type`, `perms`, `perms_type`, `sort_no`, `is_route`, `is_leaf`, `hidden`, `status`, `del_flag`, `create_by`, `create_time`) +VALUES ('177925970995529', '177925970995528', '导出', 2, 'xslmes:mes_xsl_mixer_ps_history:exportXls', '1', 1.00, 0, 1, 0, '1', 0, 'admin', NOW()); + +INSERT INTO `sys_role_permission` (`id`, `role_id`, `permission_id`, `data_rule_ids`, `operate_date`, `operate_ip`) +SELECT REPLACE(UUID(), '-', ''), r.id, p.id, NULL, NOW(), '127.0.0.1' +FROM `sys_role` r +CROSS JOIN `sys_permission` p +WHERE r.`role_code` = 'admin' + AND p.`id` IN ('177925970995528', '177925970995529') + AND NOT EXISTS ( + SELECT 1 FROM `sys_role_permission` rp + WHERE rp.`role_id` = r.id AND rp.`permission_id` = p.id + ); diff --git a/jeecgboot-vue3/src/views/xslmes/mesXslMixerPsCompile/MesXslMixerPsCompile.api.ts b/jeecgboot-vue3/src/views/xslmes/mesXslMixerPsCompile/MesXslMixerPsCompile.api.ts new file mode 100644 index 00000000..42338dbf --- /dev/null +++ b/jeecgboot-vue3/src/views/xslmes/mesXslMixerPsCompile/MesXslMixerPsCompile.api.ts @@ -0,0 +1,39 @@ +import { defHttp } from '/@/utils/http/axios'; + +enum Api { + list = '/xslmes/mesXslMixerPsCompile/list', + save = '/xslmes/mesXslMixerPsCompile/add', + edit = '/xslmes/mesXslMixerPsCompile/edit', + deleteOne = '/xslmes/mesXslMixerPsCompile/delete', + deleteBatch = '/xslmes/mesXslMixerPsCompile/deleteBatch', + importExcel = '/xslmes/mesXslMixerPsCompile/importExcel', + exportXls = '/xslmes/mesXslMixerPsCompile/exportXls', + queryById = '/xslmes/mesXslMixerPsCompile/queryById', + proofread = '/xslmes/mesXslMixerPsCompile/proofread', + audit = '/xslmes/mesXslMixerPsCompile/audit', + approve = '/xslmes/mesXslMixerPsCompile/approve', +} + +export const list = (params) => defHttp.get({ url: Api.list, params }); + +export const queryById = (params) => defHttp.get({ url: Api.queryById, params }); + +export const deleteOne = (params, handleSuccess) => + defHttp.delete({ url: Api.deleteOne, params }, { joinParamsToUrl: true }).then(() => handleSuccess()); + +export const batchDelete = (params, handleSuccess) => + defHttp.delete({ url: Api.deleteBatch, params }, { joinParamsToUrl: true }).then(() => handleSuccess()); + +export const saveOrUpdate = (params, isUpdate) => { + const url = isUpdate ? Api.edit : Api.save; + return defHttp.post({ url, params }, { successMessageMode: 'none' }); +}; + +export const getExportUrl = Api.exportXls; +export const getImportUrl = Api.importExcel; + +export const proofread = (params: { ids: string }) => defHttp.post({ url: Api.proofread, params }, { joinParamsToUrl: true }); + +export const audit = (params: { ids: string }) => defHttp.post({ url: Api.audit, params }, { joinParamsToUrl: true }); + +export const approve = (params: { ids: string }) => defHttp.post({ url: Api.approve, params }, { joinParamsToUrl: true }); diff --git a/jeecgboot-vue3/src/views/xslmes/mesXslMixerPsCompile/MesXslMixerPsCompile.data.ts b/jeecgboot-vue3/src/views/xslmes/mesXslMixerPsCompile/MesXslMixerPsCompile.data.ts new file mode 100644 index 00000000..f140f7ac --- /dev/null +++ b/jeecgboot-vue3/src/views/xslmes/mesXslMixerPsCompile/MesXslMixerPsCompile.data.ts @@ -0,0 +1,286 @@ +import { BasicColumn, FormSchema } from '/@/components/Table'; + +const colHalf = { span: 12 }; + +const deptSelectBase = { + sync: false, + checkStrictly: true, + defaultExpandLevel: 2, +}; + +const deptSelectSingleProps = { + ...deptSelectBase, + multiple: false, +}; + +const deptSelectProps = { + ...deptSelectBase, + multiple: true, +}; + +const hasWorkflowInfo = ({ values }) => + !!(values.proofreadBy || values.proofreadTime || values.auditBy || values.auditTime || values.approveBy || values.approveTime); + +function sectionDivider(label: string, field: string, ifShow?: FormSchema['ifShow']): FormSchema { + return { + field, + label, + component: 'Divider', + componentProps: { orientation: 'left', plain: false }, + colProps: { span: 24 }, + ifShow, + }; +} + +export const columns: BasicColumn[] = [ + { title: 'PS编码', align: 'center', dataIndex: 'psCode', width: 140 }, + { title: '类型', align: 'center', dataIndex: 'psType_dictText', width: 110 }, + { title: '发放日期', align: 'center', dataIndex: 'issueDate', width: 110 }, + { title: '发送部门', align: 'center', dataIndex: 'sendDeptId_dictText', width: 120 }, + { title: '收信部门', align: 'center', dataIndex: 'receiveDeptId_dictText', width: 160 }, + { title: '参照部门', align: 'center', dataIndex: 'referenceDeptId_dictText', width: 160 }, + { title: '标题', align: 'center', dataIndex: 'title', width: 180 }, + { title: '目的', align: 'center', dataIndex: 'purpose', width: 160, defaultHidden: true }, + { title: '依据', align: 'center', dataIndex: 'basis', width: 160, defaultHidden: true }, + { title: '担当', align: 'center', dataIndex: 'responsiblePerson', width: 90 }, + { title: '状态', align: 'center', dataIndex: 'status_dictText', width: 90 }, + { + title: '编制人', + align: 'center', + dataIndex: 'compileBy', + width: 100, + customRender: ({ record }) => record?.createBy_dictText || record?.createBy || '', + }, + { title: '校对人', align: 'center', dataIndex: 'proofreadBy', width: 100, defaultHidden: true }, + { title: '校对时间', align: 'center', dataIndex: 'proofreadTime', width: 165, defaultHidden: true }, + { title: '审核人', align: 'center', dataIndex: 'auditBy', width: 100, defaultHidden: true }, + { title: '审核时间', align: 'center', dataIndex: 'auditTime', width: 165, defaultHidden: true }, + { title: '批准人', align: 'center', dataIndex: 'approveBy', width: 100, defaultHidden: true }, + { title: '批准时间', align: 'center', dataIndex: 'approveTime', width: 165, defaultHidden: true }, + { title: '所属工厂', align: 'center', dataIndex: 'factoryName', width: 120, defaultHidden: true }, + { title: '施工代号', align: 'center', dataIndex: 'constructionCode_dictText', width: 110, defaultHidden: true }, + { title: '创建人', align: 'center', dataIndex: 'createBy', width: 100, defaultHidden: true }, + { title: '创建时间', align: 'center', dataIndex: 'createTime', width: 165 }, + { title: '修改人', align: 'center', dataIndex: 'updateBy', width: 100, defaultHidden: true }, + { title: '修改时间', align: 'center', dataIndex: 'updateTime', width: 165, defaultHidden: true }, +]; + +export const searchFormSchema: FormSchema[] = [ + { label: 'PS编码', field: 'psCode', component: 'JInput', colProps: { span: 6 } }, + { label: '标题', field: 'title', component: 'JInput', colProps: { span: 6 } }, + { + label: '状态', + field: 'status', + component: 'JDictSelectTag', + defaultValue: 'compile', + componentProps: { dictCode: 'xslmes_mixer_ps_status', placeholder: '请选择状态' }, + colProps: { span: 6 }, + }, + { + label: '开始日期', + field: 'issueDate_begin', + component: 'DatePicker', + componentProps: { valueFormat: 'YYYY-MM-DD', placeholder: '发放日期起' }, + colProps: { span: 6 }, + }, + { + label: '结束日期', + field: 'issueDate_end', + component: 'DatePicker', + componentProps: { valueFormat: 'YYYY-MM-DD', placeholder: '发放日期止' }, + colProps: { span: 6 }, + }, + { + label: '类型', + field: 'psType', + component: 'JDictSelectTag', + componentProps: { dictCode: 'xslmes_ps_belong' }, + colProps: { span: 6 }, + }, +]; + +export const formSchema: FormSchema[] = [ + { label: '', field: 'id', component: 'Input', show: false }, + + sectionDivider('基本信息', 'dividerBasic'), + { + label: 'PS编码', + field: 'psCode', + component: 'Input', + colProps: colHalf, + componentProps: { placeholder: '请输入PS编码', allowClear: true }, + }, + { + label: 'PS归属', + field: 'psType', + component: 'JDictSelectTag', + componentProps: { dictCode: 'xslmes_ps_belong', placeholder: '请选择PS归属' }, + colProps: colHalf, + }, + { + label: '施工代号', + field: 'constructionCode', + component: 'JDictSelectTag', + componentProps: { dictCode: 'xslmes_construction_code', placeholder: '请选择施工代号' }, + colProps: colHalf, + }, + { + label: '发放日期', + field: 'issueDate', + component: 'DatePicker', + componentProps: { valueFormat: 'YYYY-MM-DD', style: { width: '100%' }, placeholder: '请选择发放日期' }, + colProps: colHalf, + }, + { + label: '状态', + field: 'status', + component: 'JDictSelectTag', + defaultValue: 'compile', + componentProps: { dictCode: 'xslmes_mixer_ps_status', disabled: true }, + colProps: colHalf, + }, + { + label: '编制人', + field: 'compileBy', + component: 'Input', + componentProps: { disabled: true, bordered: false, placeholder: '保存后按创建人显示' }, + colProps: colHalf, + itemProps: { class: 'ps-workflow-item' }, + }, + { + label: '担当', + field: 'responsiblePerson', + component: 'Input', + colProps: colHalf, + componentProps: { placeholder: '请输入担当', allowClear: true }, + }, + { + label: '标题', + field: 'title', + component: 'Input', + colProps: { span: 24 }, + componentProps: { placeholder: '请输入标题', allowClear: true }, + dynamicRules: () => [{ required: true, message: '请输入标题' }], + }, + + sectionDivider('组织与部门', 'dividerDept'), + { + label: '所属工厂', + field: 'factoryId', + component: 'JSelectDept', + componentProps: deptSelectSingleProps, + colProps: colHalf, + }, + { + label: '发送部门', + field: 'sendDeptId', + component: 'JSelectDept', + componentProps: deptSelectSingleProps, + colProps: colHalf, + }, + { + label: '收信部门', + field: 'receiveDeptId', + component: 'JSelectDept', + componentProps: deptSelectProps, + colProps: colHalf, + dynamicRules: () => [{ required: true, message: '请选择收信部门' }], + }, + { + label: '参照部门', + field: 'referenceDeptId', + component: 'JSelectDept', + componentProps: deptSelectProps, + colProps: colHalf, + dynamicRules: () => [{ required: true, message: '请选择参照部门' }], + }, + + sectionDivider('文档内容', 'dividerContent'), + { + label: '目的', + field: 'purpose', + component: 'InputTextArea', + componentProps: { rows: 3, placeholder: '请输入目的', maxlength: 500, showCount: true }, + colProps: colHalf, + }, + { + label: '依据', + field: 'basis', + component: 'InputTextArea', + componentProps: { rows: 3, placeholder: '请输入依据', maxlength: 500, showCount: true }, + colProps: colHalf, + }, + { + label: '内容', + field: 'content', + component: 'InputTextArea', + componentProps: { rows: 5, placeholder: '请输入内容', maxlength: 2000, showCount: true }, + colProps: { span: 24 }, + }, + + sectionDivider('审批记录', 'dividerWorkflow', hasWorkflowInfo), + { + label: '校对人', + field: 'proofreadBy', + component: 'Input', + componentProps: { disabled: true, bordered: false }, + colProps: colHalf, + itemProps: { class: 'ps-workflow-item' }, + ifShow: ({ values }) => !!values.proofreadBy, + }, + { + label: '校对时间', + field: 'proofreadTime', + component: 'Input', + componentProps: { disabled: true, bordered: false }, + colProps: colHalf, + itemProps: { class: 'ps-workflow-item' }, + ifShow: ({ values }) => !!values.proofreadTime, + }, + { + label: '审核人', + field: 'auditBy', + component: 'Input', + componentProps: { disabled: true, bordered: false }, + colProps: colHalf, + itemProps: { class: 'ps-workflow-item' }, + ifShow: ({ values }) => !!values.auditBy, + }, + { + label: '审核时间', + field: 'auditTime', + component: 'Input', + componentProps: { disabled: true, bordered: false }, + colProps: colHalf, + itemProps: { class: 'ps-workflow-item' }, + ifShow: ({ values }) => !!values.auditTime, + }, + { + label: '批准人', + field: 'approveBy', + component: 'Input', + componentProps: { disabled: true, bordered: false }, + colProps: colHalf, + itemProps: { class: 'ps-workflow-item' }, + ifShow: ({ values }) => !!values.approveBy, + }, + { + label: '批准时间', + field: 'approveTime', + component: 'Input', + componentProps: { disabled: true, bordered: false }, + colProps: colHalf, + itemProps: { class: 'ps-workflow-item' }, + ifShow: ({ values }) => !!values.approveTime, + }, +]; + +export const superQuerySchema = { + psCode: { title: 'PS编码', order: 0, view: 'text' }, + psType: { title: '类型', order: 1, view: 'list', dictCode: 'xslmes_ps_belong' }, + constructionCode: { title: '施工代号', order: 2, view: 'list', dictCode: 'xslmes_construction_code' }, + issueDate: { title: '发放日期', order: 3, view: 'date' }, + title: { title: '标题', order: 4, view: 'text' }, + status: { title: '状态', order: 5, view: 'list', dictCode: 'xslmes_mixer_ps_status' }, + responsiblePerson: { title: '担当', order: 6, view: 'text' }, +}; diff --git a/jeecgboot-vue3/src/views/xslmes/mesXslMixerPsCompile/MesXslMixerPsCompileList.vue b/jeecgboot-vue3/src/views/xslmes/mesXslMixerPsCompile/MesXslMixerPsCompileList.vue new file mode 100644 index 00000000..12532099 --- /dev/null +++ b/jeecgboot-vue3/src/views/xslmes/mesXslMixerPsCompile/MesXslMixerPsCompileList.vue @@ -0,0 +1,242 @@ + + + diff --git a/jeecgboot-vue3/src/views/xslmes/mesXslMixerPsCompile/components/MesXslMixerPsCompileModal.vue b/jeecgboot-vue3/src/views/xslmes/mesXslMixerPsCompile/components/MesXslMixerPsCompileModal.vue new file mode 100644 index 00000000..4adf8ea7 --- /dev/null +++ b/jeecgboot-vue3/src/views/xslmes/mesXslMixerPsCompile/components/MesXslMixerPsCompileModal.vue @@ -0,0 +1,195 @@ + + + + + + + diff --git a/jeecgboot-vue3/src/views/xslmes/mesXslMixerPsHistory/MesXslMixerPsHistory.api.ts b/jeecgboot-vue3/src/views/xslmes/mesXslMixerPsHistory/MesXslMixerPsHistory.api.ts new file mode 100644 index 00000000..172f2fd0 --- /dev/null +++ b/jeecgboot-vue3/src/views/xslmes/mesXslMixerPsHistory/MesXslMixerPsHistory.api.ts @@ -0,0 +1,2 @@ +/** 复用密炼PS编制接口,仅查询已批准(approve)记录 */ +export { list, getExportUrl } from '../mesXslMixerPsCompile/MesXslMixerPsCompile.api'; diff --git a/jeecgboot-vue3/src/views/xslmes/mesXslMixerPsHistory/MesXslMixerPsHistory.data.ts b/jeecgboot-vue3/src/views/xslmes/mesXslMixerPsHistory/MesXslMixerPsHistory.data.ts new file mode 100644 index 00000000..1fd70dfb --- /dev/null +++ b/jeecgboot-vue3/src/views/xslmes/mesXslMixerPsHistory/MesXslMixerPsHistory.data.ts @@ -0,0 +1,89 @@ +import { BasicColumn, FormSchema } from '/@/components/Table'; + +/** PS审批历史专用状态字典(键值与原状态一致,批准显示为正式发布) */ +export const PS_HISTORY_STATUS_DICT = 'xslmes_mixer_ps_history_status'; + +const historyStatusTextMap: Record = { + compile: '编制', + proofread: '校对', + audit: '审核', + approve: '正式发布', +}; + +export function renderHistoryStatus(text?: string) { + if (!text) { + return ''; + } + return historyStatusTextMap[text] || text; +} + +export const columns: BasicColumn[] = [ + { title: 'PS编码', align: 'center', dataIndex: 'psCode', width: 140 }, + { title: '类型', align: 'center', dataIndex: 'psType_dictText', width: 110 }, + { title: '发放日期', align: 'center', dataIndex: 'issueDate', width: 110 }, + { title: '发送部门', align: 'center', dataIndex: 'sendDeptId_dictText', width: 120 }, + { title: '收信部门', align: 'center', dataIndex: 'receiveDeptId_dictText', width: 160 }, + { title: '参照部门', align: 'center', dataIndex: 'referenceDeptId_dictText', width: 160 }, + { title: '标题', align: 'center', dataIndex: 'title', width: 180 }, + { title: '担当', align: 'center', dataIndex: 'responsiblePerson', width: 90 }, + { + title: '状态', + align: 'center', + dataIndex: 'status', + width: 100, + customRender: ({ text }) => renderHistoryStatus(text), + }, + { + title: '编制人', + align: 'center', + dataIndex: 'compileBy', + width: 100, + customRender: ({ record }) => record?.createBy_dictText || record?.createBy || '', + }, + { title: '校对人', align: 'center', dataIndex: 'proofreadBy', width: 100 }, + { title: '校对时间', align: 'center', dataIndex: 'proofreadTime', width: 165 }, + { title: '审核人', align: 'center', dataIndex: 'auditBy', width: 100 }, + { title: '审核时间', align: 'center', dataIndex: 'auditTime', width: 165 }, + { title: '发布人', align: 'center', dataIndex: 'approveBy', width: 100 }, + { title: '发布时间', align: 'center', dataIndex: 'approveTime', width: 165 }, + { title: '所属工厂', align: 'center', dataIndex: 'factoryName', width: 120, defaultHidden: true }, + { title: '施工代号', align: 'center', dataIndex: 'constructionCode_dictText', width: 110, defaultHidden: true }, + { title: '目的', align: 'center', dataIndex: 'purpose', width: 160, defaultHidden: true }, + { title: '依据', align: 'center', dataIndex: 'basis', width: 160, defaultHidden: true }, + { title: '创建时间', align: 'center', dataIndex: 'createTime', width: 165, defaultHidden: true }, +]; + +export const searchFormSchema: FormSchema[] = [ + { + label: '开始日期', + field: 'issueDate_begin', + component: 'DatePicker', + componentProps: { valueFormat: 'YYYY-MM-DD', placeholder: '发放日期起' }, + colProps: { span: 6 }, + }, + { + label: '结束日期', + field: 'issueDate_end', + component: 'DatePicker', + componentProps: { valueFormat: 'YYYY-MM-DD', placeholder: '发放日期止' }, + colProps: { span: 6 }, + }, + { label: 'PS编码', field: 'psCode', component: 'JInput', colProps: { span: 6 } }, + { label: '标题', field: 'title', component: 'JInput', colProps: { span: 6 } }, + { + label: '类型', + field: 'psType', + component: 'JDictSelectTag', + componentProps: { dictCode: 'xslmes_ps_belong' }, + colProps: { span: 6 }, + }, +]; + +export const superQuerySchema = { + psCode: { title: 'PS编码', order: 0, view: 'text' }, + psType: { title: '类型', order: 1, view: 'list', dictCode: 'xslmes_ps_belong' }, + constructionCode: { title: '施工代号', order: 2, view: 'list', dictCode: 'xslmes_construction_code' }, + issueDate: { title: '发放日期', order: 3, view: 'date' }, + title: { title: '标题', order: 4, view: 'text' }, + responsiblePerson: { title: '担当', order: 5, view: 'text' }, +}; diff --git a/jeecgboot-vue3/src/views/xslmes/mesXslMixerPsHistory/MesXslMixerPsHistoryList.vue b/jeecgboot-vue3/src/views/xslmes/mesXslMixerPsHistory/MesXslMixerPsHistoryList.vue new file mode 100644 index 00000000..b084e788 --- /dev/null +++ b/jeecgboot-vue3/src/views/xslmes/mesXslMixerPsHistory/MesXslMixerPsHistoryList.vue @@ -0,0 +1,95 @@ + + +