市场法规清单--历史版本
This commit is contained in:
@@ -1343,6 +1343,54 @@ ALTER TABLE `problem_management`
|
|||||||
ADD COLUMN `project_type` varchar(255) NULL COMMENT '相关项目类型' AFTER `problem_priority`;
|
ADD COLUMN `project_type` varchar(255) NULL COMMENT '相关项目类型' AFTER `problem_priority`;
|
||||||
|
|
||||||
|
|
||||||
|
-- 市场法规清单历史表 2023-10-30 未同步数据库
|
||||||
|
CREATE TABLE `dummy_inventory_info_history` (
|
||||||
|
`id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
||||||
|
`create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
|
||||||
|
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建日期',
|
||||||
|
`update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
|
||||||
|
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新日期',
|
||||||
|
`sys_org_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属部门',
|
||||||
|
`dummy_inventory_base_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '法规清单基础表id',
|
||||||
|
`serial_number` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '编号',
|
||||||
|
`title` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标题',
|
||||||
|
`shi4_yong4_fan4_wei2` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '适用范围',
|
||||||
|
`state` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '状态',
|
||||||
|
`technology_territory` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '技术领域',
|
||||||
|
`xin1_che1_xing2_shi2_shi1_ri4_qi1` datetime(0) NULL DEFAULT NULL COMMENT '新车型实施日期',
|
||||||
|
`implement_time` datetime(0) NULL DEFAULT NULL COMMENT '在产车实施日期',
|
||||||
|
`corresponding_standard` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '对应标准',
|
||||||
|
`corresponding_standard_id` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '对应标准id',
|
||||||
|
`wvta_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'WVTA ID',
|
||||||
|
`subtitle` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '子标题',
|
||||||
|
`implement_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '实施类别',
|
||||||
|
`attestation_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '认证类型',
|
||||||
|
`attestation_rank` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '认证级别',
|
||||||
|
`duty_territory` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '责任领域',
|
||||||
|
`remark` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
|
||||||
|
`design_deliverable_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '设计符合性确认-交付物类型',
|
||||||
|
`design_deliverable_template` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '设计符合性确认-交付物模板',
|
||||||
|
`design_initiator` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '设计符合性确认-发起人',
|
||||||
|
`design_duty` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '设计符合性确认-责任人',
|
||||||
|
`prehomo_deliverable_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'prehomo确认-交付物类型',
|
||||||
|
`prehomo_deliverable_template` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'prehomo确认-交付物模板',
|
||||||
|
`prehomo_initiator` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'prehomo确认-发起人',
|
||||||
|
`prehomo_duty` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'prehomo确认-责任人',
|
||||||
|
`verify_deliverable_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '验证符合性确认-交付物类型',
|
||||||
|
`verify_deliverable_template` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '验证符合性确认-交付物模板',
|
||||||
|
`verify_initiator` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '验证符合性确认-发起人',
|
||||||
|
`verify_duty` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '验证符合性确认-责任人',
|
||||||
|
`region` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '适用地区',
|
||||||
|
`applicable_supplement` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '适用增补件',
|
||||||
|
`verify_remark` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '验证备注',
|
||||||
|
`prehomo_remark` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'pre备注',
|
||||||
|
`design_remark` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '设计备注',
|
||||||
|
`buss_document_library_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文档库id',
|
||||||
|
`duty_depart` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '责任部门',
|
||||||
|
PRIMARY KEY (`id`) USING BTREE
|
||||||
|
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+180
@@ -0,0 +1,180 @@
|
|||||||
|
package com.jero.modules.dummy.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 com.jero.common.api.vo.Result;
|
||||||
|
import com.jero.common.aspect.annotation.AutoLog;
|
||||||
|
import com.jero.common.system.base.controller.JeroController;
|
||||||
|
import com.jero.common.system.query.QueryGenerator;
|
||||||
|
import com.jero.modules.dummy.entity.DummyInventoryInfoHistoryEO;
|
||||||
|
import com.jero.modules.dummy.service.IDummyInventoryInfoHistoryEOService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 市场法规清单历史版本
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2023-10-30
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Api(tags="市场法规清单历史版本")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/dummy/dummyInventoryInfoHistoryEO")
|
||||||
|
@Slf4j
|
||||||
|
public class DummyInventoryInfoHistoryEOController extends JeroController<DummyInventoryInfoHistoryEO, IDummyInventoryInfoHistoryEOService> {
|
||||||
|
@Autowired
|
||||||
|
private IDummyInventoryInfoHistoryEOService dummyInventoryInfoHistoryEOService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页列表查询
|
||||||
|
*
|
||||||
|
* @param dummyInventoryInfoHistoryEO
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "市场法规清单历史版本-分页列表查询")
|
||||||
|
@ApiOperation(value="市场法规清单历史版本-分页列表查询", notes="市场法规清单历史版本-分页列表查询")
|
||||||
|
@GetMapping(value = "/page")
|
||||||
|
public Result<?> queryPageList(DummyInventoryInfoHistoryEO dummyInventoryInfoHistoryEO,
|
||||||
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<DummyInventoryInfoHistoryEO> queryWrapper = QueryGenerator.initQueryWrapper(dummyInventoryInfoHistoryEO, req.getParameterMap());
|
||||||
|
Page<DummyInventoryInfoHistoryEO> page = new Page<DummyInventoryInfoHistoryEO>(pageNo, pageSize);
|
||||||
|
IPage<DummyInventoryInfoHistoryEO> pageList = dummyInventoryInfoHistoryEOService.getPageInfo(page,dummyInventoryInfoHistoryEO);
|
||||||
|
// IPage<DummyInventoryInfoHistoryEO> pageList = dummyInventoryInfoHistoryEOService.page(page, queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "市场法规清单历史版本-列表查询")
|
||||||
|
@ApiOperation(value="市场法规清单历史版本-列表查询", notes="市场法规清单历史版本-列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<List<DummyInventoryInfoHistoryEO>> queryList() {
|
||||||
|
List<DummyInventoryInfoHistoryEO> list = dummyInventoryInfoHistoryEOService.queryList();
|
||||||
|
return Result.OK(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*
|
||||||
|
* @param dummyInventoryInfoHistoryEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "市场法规清单历史版本-添加")
|
||||||
|
@ApiOperation(value="市场法规清单历史版本-添加", notes="市场法规清单历史版本-添加")
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public Result<?> add(@Validated @RequestBody DummyInventoryInfoHistoryEO dummyInventoryInfoHistoryEO) {
|
||||||
|
dummyInventoryInfoHistoryEOService.add(dummyInventoryInfoHistoryEO);
|
||||||
|
return Result.OK("添加成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param dummyInventoryInfoHistoryEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "市场法规清单历史版本-编辑")
|
||||||
|
@ApiOperation(value="市场法规清单历史版本-编辑", notes="市场法规清单历史版本-编辑")
|
||||||
|
@PutMapping(value = "/edit")
|
||||||
|
public Result<?> edit(@Validated @RequestBody DummyInventoryInfoHistoryEO dummyInventoryInfoHistoryEO) {
|
||||||
|
dummyInventoryInfoHistoryEOService.editById(dummyInventoryInfoHistoryEO);
|
||||||
|
return Result.OK("编辑成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "市场法规清单历史版本-通过id删除")
|
||||||
|
@ApiOperation(value="市场法规清单历史版本-通过id删除", notes="市场法规清单历史版本-通过id删除")
|
||||||
|
@DeleteMapping(value = "/delete")
|
||||||
|
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||||
|
dummyInventoryInfoHistoryEOService.deleteById(id);
|
||||||
|
return Result.OK("删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "市场法规清单历史版本-批量删除")
|
||||||
|
@ApiOperation(value="市场法规清单历史版本-批量删除", notes="市场法规清单历史版本-批量删除")
|
||||||
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
|
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||||
|
this.dummyInventoryInfoHistoryEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||||
|
return Result.OK("批量删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "市场法规清单历史版本-通过id查询")
|
||||||
|
@ApiOperation(value="市场法规清单历史版本-通过id查询", notes="市场法规清单历史版本-通过id查询")
|
||||||
|
@GetMapping(value = "/queryById")
|
||||||
|
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||||
|
DummyInventoryInfoHistoryEO dummyInventoryInfoHistoryEO = dummyInventoryInfoHistoryEOService.queryById(id);
|
||||||
|
if(dummyInventoryInfoHistoryEO==null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(dummyInventoryInfoHistoryEO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出excel
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param dummyInventoryInfoHistoryEO
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/exportXls")
|
||||||
|
public ModelAndView exportXls(HttpServletRequest request, DummyInventoryInfoHistoryEO dummyInventoryInfoHistoryEO) {
|
||||||
|
return super.exportXls(request, dummyInventoryInfoHistoryEO, DummyInventoryInfoHistoryEO.class, "市场法规清单历史版本");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过excel导入数据
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param response
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||||
|
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
return super.importExcel(request, response, DummyInventoryInfoHistoryEO.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+327
@@ -0,0 +1,327 @@
|
|||||||
|
package com.jero.modules.dummy.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 市场法规清单历史版本
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2023-10-30
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("dummy_inventory_info_history")
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value="dummy_inventory_info_history对象", description="市场法规清单历史版本")
|
||||||
|
public class DummyInventoryInfoHistoryEO implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**主键*/
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
@ApiModelProperty(value = "主键")
|
||||||
|
private java.lang.String id;
|
||||||
|
|
||||||
|
/**创建人*/
|
||||||
|
@ApiModelProperty(value = "创建人")
|
||||||
|
private java.lang.String createBy;
|
||||||
|
|
||||||
|
/**创建日期*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@ApiModelProperty(value = "创建日期")
|
||||||
|
private java.util.Date createTime;
|
||||||
|
|
||||||
|
/**更新人*/
|
||||||
|
@ApiModelProperty(value = "更新人")
|
||||||
|
private java.lang.String updateBy;
|
||||||
|
|
||||||
|
/**更新日期*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@ApiModelProperty(value = "更新日期")
|
||||||
|
private java.util.Date updateTime;
|
||||||
|
|
||||||
|
/**所属部门*/
|
||||||
|
@ApiModelProperty(value = "所属部门")
|
||||||
|
private java.lang.String sysOrgCode;
|
||||||
|
|
||||||
|
/**法规清单基础表id*/
|
||||||
|
@Excel(name = "法规清单基础表id", width = 15)
|
||||||
|
@ApiModelProperty(value = "法规清单基础表id")
|
||||||
|
private java.lang.String dummyInventoryBaseId;
|
||||||
|
|
||||||
|
/**编号*/
|
||||||
|
@Excel(name = "编号", width = 15)
|
||||||
|
@ApiModelProperty(value = "编号")
|
||||||
|
private java.lang.String serialNumber;
|
||||||
|
|
||||||
|
/**标题*/
|
||||||
|
@Excel(name = "标题", width = 15)
|
||||||
|
@ApiModelProperty(value = "标题")
|
||||||
|
private java.lang.String title;
|
||||||
|
|
||||||
|
/**适用范围*/
|
||||||
|
@Excel(name = "适用范围", width = 15)
|
||||||
|
@ApiModelProperty(value = "适用范围")
|
||||||
|
private java.lang.String shi4Yong4Fan4Wei2;
|
||||||
|
|
||||||
|
/**状态*/
|
||||||
|
@Excel(name = "状态", width = 15)
|
||||||
|
@ApiModelProperty(value = "状态")
|
||||||
|
private java.lang.String state;
|
||||||
|
|
||||||
|
/**技术领域*/
|
||||||
|
@Excel(name = "技术领域", width = 15)
|
||||||
|
@ApiModelProperty(value = "技术领域")
|
||||||
|
private java.lang.String technologyTerritory;
|
||||||
|
|
||||||
|
/**新车型实施日期*/
|
||||||
|
@Excel(name = "新车型实施日期", width = 15, format = "yyyy-MM-dd")
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
@ApiModelProperty(value = "新车型实施日期")
|
||||||
|
private java.util.Date xin1Che1Xing2Shi2Shi1Ri4Qi1;
|
||||||
|
|
||||||
|
/**在产车实施日期*/
|
||||||
|
@Excel(name = "在产车实施日期", width = 15, format = "yyyy-MM-dd")
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
@ApiModelProperty(value = "在产车实施日期")
|
||||||
|
private java.util.Date implementTime;
|
||||||
|
|
||||||
|
/**对应标准*/
|
||||||
|
@Excel(name = "对应标准", width = 15)
|
||||||
|
@ApiModelProperty(value = "对应标准")
|
||||||
|
private java.lang.String correspondingStandard;
|
||||||
|
|
||||||
|
/**对应标准id*/
|
||||||
|
@Excel(name = "对应标准id", width = 15)
|
||||||
|
@ApiModelProperty(value = "对应标准id")
|
||||||
|
private java.lang.String correspondingStandardId;
|
||||||
|
|
||||||
|
/**WVTA ID*/
|
||||||
|
@Excel(name = "WVTA ID", width = 15)
|
||||||
|
@ApiModelProperty(value = "WVTA ID")
|
||||||
|
private java.lang.String wvtaId;
|
||||||
|
|
||||||
|
/**子标题*/
|
||||||
|
@Excel(name = "子标题", width = 15)
|
||||||
|
@ApiModelProperty(value = "子标题")
|
||||||
|
private java.lang.String subtitle;
|
||||||
|
|
||||||
|
/**实施类别*/
|
||||||
|
@Excel(name = "实施类别", width = 15)
|
||||||
|
@ApiModelProperty(value = "实施类别")
|
||||||
|
private java.lang.String implementType;
|
||||||
|
|
||||||
|
/**认证类型*/
|
||||||
|
@Excel(name = "认证类型", width = 15)
|
||||||
|
@ApiModelProperty(value = "认证类型")
|
||||||
|
private java.lang.String attestationType;
|
||||||
|
|
||||||
|
/**认证级别*/
|
||||||
|
@Excel(name = "认证级别", width = 15)
|
||||||
|
@ApiModelProperty(value = "认证级别")
|
||||||
|
private java.lang.String attestationRank;
|
||||||
|
|
||||||
|
/**责任领域*/
|
||||||
|
@Excel(name = "责任领域", width = 15)
|
||||||
|
@ApiModelProperty(value = "责任领域")
|
||||||
|
private java.lang.String dutyTerritory;
|
||||||
|
|
||||||
|
/**备注*/
|
||||||
|
@Excel(name = "备注", width = 15)
|
||||||
|
@ApiModelProperty(value = "备注")
|
||||||
|
private java.lang.String remark;
|
||||||
|
|
||||||
|
/**设计符合性确认-交付物类型*/
|
||||||
|
@Excel(name = "设计符合性确认-交付物类型", width = 15)
|
||||||
|
@ApiModelProperty(value = "设计符合性确认-交付物类型")
|
||||||
|
private java.lang.String designDeliverableType;
|
||||||
|
|
||||||
|
/**设计符合性确认-交付物模板*/
|
||||||
|
@Excel(name = "设计符合性确认-交付物模板", width = 15)
|
||||||
|
@ApiModelProperty(value = "设计符合性确认-交付物模板")
|
||||||
|
private java.lang.String designDeliverableTemplate;
|
||||||
|
|
||||||
|
/**设计符合性确认-发起人*/
|
||||||
|
@Excel(name = "设计符合性确认-发起人", width = 15)
|
||||||
|
@ApiModelProperty(value = "设计符合性确认-发起人")
|
||||||
|
private java.lang.String designInitiator;
|
||||||
|
|
||||||
|
/**设计符合性确认-责任人*/
|
||||||
|
@Excel(name = "设计符合性确认-责任人", width = 15)
|
||||||
|
@ApiModelProperty(value = "设计符合性确认-责任人")
|
||||||
|
private java.lang.String designDuty;
|
||||||
|
|
||||||
|
/**prehomo确认-交付物类型*/
|
||||||
|
@Excel(name = "prehomo确认-交付物类型", width = 15)
|
||||||
|
@ApiModelProperty(value = "prehomo确认-交付物类型")
|
||||||
|
private java.lang.String prehomoDeliverableType;
|
||||||
|
|
||||||
|
/**prehomo确认-交付物模板*/
|
||||||
|
@Excel(name = "prehomo确认-交付物模板", width = 15)
|
||||||
|
@ApiModelProperty(value = "prehomo确认-交付物模板")
|
||||||
|
private java.lang.String prehomoDeliverableTemplate;
|
||||||
|
|
||||||
|
/**prehomo确认-发起人*/
|
||||||
|
@Excel(name = "prehomo确认-发起人", width = 15)
|
||||||
|
@ApiModelProperty(value = "prehomo确认-发起人")
|
||||||
|
private java.lang.String prehomoInitiator;
|
||||||
|
|
||||||
|
/**prehomo确认-责任人*/
|
||||||
|
@Excel(name = "prehomo确认-责任人", width = 15)
|
||||||
|
@ApiModelProperty(value = "prehomo确认-责任人")
|
||||||
|
private java.lang.String prehomoDuty;
|
||||||
|
|
||||||
|
/**验证符合性确认-交付物类型*/
|
||||||
|
@Excel(name = "验证符合性确认-交付物类型", width = 15)
|
||||||
|
@ApiModelProperty(value = "验证符合性确认-交付物类型")
|
||||||
|
private java.lang.String verifyDeliverableType;
|
||||||
|
|
||||||
|
/**验证符合性确认-交付物模板*/
|
||||||
|
@Excel(name = "验证符合性确认-交付物模板", width = 15)
|
||||||
|
@ApiModelProperty(value = "验证符合性确认-交付物模板")
|
||||||
|
private java.lang.String verifyDeliverableTemplate;
|
||||||
|
|
||||||
|
/**验证符合性确认-发起人*/
|
||||||
|
@Excel(name = "验证符合性确认-发起人", width = 15)
|
||||||
|
@ApiModelProperty(value = "验证符合性确认-发起人")
|
||||||
|
private java.lang.String verifyInitiator;
|
||||||
|
|
||||||
|
/**验证符合性确认-责任人*/
|
||||||
|
@Excel(name = "验证符合性确认-责任人", width = 15)
|
||||||
|
@ApiModelProperty(value = "验证符合性确认-责任人")
|
||||||
|
private java.lang.String verifyDuty;
|
||||||
|
|
||||||
|
/**适用地区*/
|
||||||
|
@Excel(name = "适用地区", width = 15)
|
||||||
|
@ApiModelProperty(value = "适用地区")
|
||||||
|
private java.lang.String region;
|
||||||
|
|
||||||
|
/**适用增补件*/
|
||||||
|
@Excel(name = "适用增补件", width = 15)
|
||||||
|
@ApiModelProperty(value = "适用增补件")
|
||||||
|
private java.lang.String applicableSupplement;
|
||||||
|
|
||||||
|
/**验证备注*/
|
||||||
|
@Excel(name = "验证备注", width = 15)
|
||||||
|
@ApiModelProperty(value = "验证备注")
|
||||||
|
private java.lang.String verifyRemark;
|
||||||
|
|
||||||
|
/**pre备注*/
|
||||||
|
@Excel(name = "pre备注", width = 15)
|
||||||
|
@ApiModelProperty(value = "pre备注")
|
||||||
|
private java.lang.String prehomoRemark;
|
||||||
|
|
||||||
|
/**设计备注*/
|
||||||
|
@Excel(name = "设计备注", width = 15)
|
||||||
|
@ApiModelProperty(value = "设计备注")
|
||||||
|
private java.lang.String designRemark;
|
||||||
|
|
||||||
|
/**文档库id*/
|
||||||
|
@Excel(name = "文档库id", width = 15)
|
||||||
|
@ApiModelProperty(value = "文档库id")
|
||||||
|
private java.lang.String bussDocumentLibraryId;
|
||||||
|
|
||||||
|
/**责任部门*/
|
||||||
|
@Excel(name = "责任部门", width = 15)
|
||||||
|
@ApiModelProperty(value = "责任部门")
|
||||||
|
private java.lang.String dutyDepart;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String xin1Che1Xing2Shi2Shi1Ri4Qi1String;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String implementTimeString;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private java.lang.String designDeliverableTypeName;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private java.lang.String prehomoDeliverableTypeName;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private java.lang.String verifyDeliverableTypeName;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private java.lang.String technologyTerritoryName;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private java.lang.String designDeliverableTemplateName;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private java.lang.String prehomoDeliverableTemplateName;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private java.lang.String verifyDeliverableTemplateName;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String cut;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String region_dictText;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private java.lang.String shi4Yong4Fan4Wei2Str;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private java.lang.String stateStr;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String implementType_dictText;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String attestationType_dictText;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private java.lang.String attestationRankStr;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private java.lang.String dutyTerritoryStr;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String designInitiator_dictText;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String designDuty_dictText;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String prehomoInitiator_dictText;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String prehomoDuty_dictText;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String verifyInitiator_dictText;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String verifyDuty_dictText;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String state_dictText;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String shi4Yong4Fan4Wei2_dictText;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String attestationRank_dictText;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String dutyTerritory_dictText;
|
||||||
|
|
||||||
|
}
|
||||||
+17
@@ -0,0 +1,17 @@
|
|||||||
|
package com.jero.modules.dummy.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import com.jero.modules.dummy.entity.DummyInventoryInfoHistoryEO;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 市场法规清单历史版本
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2023-10-30
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface DummyInventoryInfoHistoryEOMapper extends BaseMapper<DummyInventoryInfoHistoryEO> {
|
||||||
|
|
||||||
|
}
|
||||||
+48
@@ -0,0 +1,48 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.jero.modules.dummy.mapper.DummyInventoryInfoHistoryEOMapper">
|
||||||
|
<resultMap id="DummyInventoryInfoHistoryEOResultMap" type="com.jero.modules.dummy.entity.DummyInventoryInfoHistoryEO">
|
||||||
|
<id column="id" property="id" />
|
||||||
|
<result column="create_by" property="createBy" />
|
||||||
|
<result column="create_time" property="createTime" />
|
||||||
|
<result column="update_by" property="updateBy" />
|
||||||
|
<result column="update_time" property="updateTime" />
|
||||||
|
<result column="sys_org_code" property="sysOrgCode" />
|
||||||
|
<result column="dummy_inventory_base_id" property="dummyInventoryBaseId" />
|
||||||
|
<result column="serial_number" property="serialNumber" />
|
||||||
|
<result column="title" property="title" />
|
||||||
|
<result column="shi4_yong4_fan4_wei2" property="shi4Yong4Fan4Wei2" />
|
||||||
|
<result column="state" property="state" />
|
||||||
|
<result column="technology_territory" property="technologyTerritory" />
|
||||||
|
<result column="xin1_che1_xing2_shi2_shi1_ri4_qi1" property="xin1Che1Xing2Shi2Shi1Ri4Qi1" />
|
||||||
|
<result column="implement_time" property="implementTime" />
|
||||||
|
<result column="corresponding_standard" property="correspondingStandard" />
|
||||||
|
<result column="corresponding_standard_id" property="correspondingStandardId" />
|
||||||
|
<result column="wvta_id" property="wvtaId" />
|
||||||
|
<result column="subtitle" property="subtitle" />
|
||||||
|
<result column="implement_type" property="implementType" />
|
||||||
|
<result column="attestation_type" property="attestationType" />
|
||||||
|
<result column="attestation_rank" property="attestationRank" />
|
||||||
|
<result column="duty_territory" property="dutyTerritory" />
|
||||||
|
<result column="remark" property="remark" />
|
||||||
|
<result column="design_deliverable_type" property="designDeliverableType" />
|
||||||
|
<result column="design_deliverable_template" property="designDeliverableTemplate" />
|
||||||
|
<result column="design_initiator" property="designInitiator" />
|
||||||
|
<result column="design_duty" property="designDuty" />
|
||||||
|
<result column="prehomo_deliverable_type" property="prehomoDeliverableType" />
|
||||||
|
<result column="prehomo_deliverable_template" property="prehomoDeliverableTemplate" />
|
||||||
|
<result column="prehomo_initiator" property="prehomoInitiator" />
|
||||||
|
<result column="prehomo_duty" property="prehomoDuty" />
|
||||||
|
<result column="verify_deliverable_type" property="verifyDeliverableType" />
|
||||||
|
<result column="verify_deliverable_template" property="verifyDeliverableTemplate" />
|
||||||
|
<result column="verify_initiator" property="verifyInitiator" />
|
||||||
|
<result column="verify_duty" property="verifyDuty" />
|
||||||
|
<result column="region" property="region" />
|
||||||
|
<result column="applicable_supplement" property="applicableSupplement" />
|
||||||
|
<result column="verify_remark" property="verifyRemark" />
|
||||||
|
<result column="prehomo_remark" property="prehomoRemark" />
|
||||||
|
<result column="design_remark" property="designRemark" />
|
||||||
|
<result column="buss_document_library_id" property="bussDocumentLibraryId" />
|
||||||
|
<result column="duty_depart" property="dutyDepart" />
|
||||||
|
</resultMap>
|
||||||
|
</mapper>
|
||||||
+66
@@ -0,0 +1,66 @@
|
|||||||
|
package com.jero.modules.dummy.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.jero.modules.dummy.entity.DummyInventoryInfoHistoryEO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 市场法规清单历史版本
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2023-10-30
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface IDummyInventoryInfoHistoryEOService extends IService<DummyInventoryInfoHistoryEO> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存
|
||||||
|
*
|
||||||
|
* @param dummyInventoryInfoHistoryEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void add(DummyInventoryInfoHistoryEO dummyInventoryInfoHistoryEO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新
|
||||||
|
*
|
||||||
|
* @param dummyInventoryInfoHistoryEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void editById(DummyInventoryInfoHistoryEO dummyInventoryInfoHistoryEO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void deleteById(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void deleteByIds(List<String> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
DummyInventoryInfoHistoryEO queryById(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<DummyInventoryInfoHistoryEO> queryList();
|
||||||
|
|
||||||
|
IPage<DummyInventoryInfoHistoryEO> getPageInfo(Page<DummyInventoryInfoHistoryEO> page,DummyInventoryInfoHistoryEO dummyInventoryInfoHistoryEO);
|
||||||
|
}
|
||||||
+26
-14
@@ -17,6 +17,7 @@ import com.jero.modules.domain.service.DomainUserRelService;
|
|||||||
import com.jero.modules.dummy.entity.DummyContentChangeEO;
|
import com.jero.modules.dummy.entity.DummyContentChangeEO;
|
||||||
import com.jero.modules.dummy.entity.DummyInventoryBaseEO;
|
import com.jero.modules.dummy.entity.DummyInventoryBaseEO;
|
||||||
import com.jero.modules.dummy.entity.DummyInventoryInfoEO;
|
import com.jero.modules.dummy.entity.DummyInventoryInfoEO;
|
||||||
|
import com.jero.modules.dummy.entity.DummyInventoryInfoHistoryEO;
|
||||||
import com.jero.modules.dummy.entity.DummyLogEO;
|
import com.jero.modules.dummy.entity.DummyLogEO;
|
||||||
import com.jero.modules.dummy.entity.DummyReadEO;
|
import com.jero.modules.dummy.entity.DummyReadEO;
|
||||||
import com.jero.modules.dummy.enums.DummyInventoryBaseFieldEnum;
|
import com.jero.modules.dummy.enums.DummyInventoryBaseFieldEnum;
|
||||||
@@ -49,6 +50,7 @@ import org.apache.commons.collections4.CollectionUtils;
|
|||||||
import org.apache.commons.lang3.ObjectUtils;
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -65,6 +67,7 @@ import java.util.HashSet;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import java.util.UUID;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -113,6 +116,8 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
|||||||
private DummyInventoryBaseEOMapper dummyInventoryBaseEOMapper;
|
private DummyInventoryBaseEOMapper dummyInventoryBaseEOMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IMarketListVersionUpdateLogEOService marketListVersionUpdateLogEOService;
|
private IMarketListVersionUpdateLogEOService marketListVersionUpdateLogEOService;
|
||||||
|
@Autowired
|
||||||
|
private DummyInventoryInfoHistoryEOServiceImpl dummyInventoryInfoHistoryEOService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存
|
* 保存
|
||||||
@@ -343,20 +348,6 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
|||||||
String loginUserName = sysUser.getUsername();
|
String loginUserName = sysUser.getUsername();
|
||||||
|
|
||||||
DummyInventoryBaseEO baseEO = queryById(dummyInventoryBaseEO.getId());
|
DummyInventoryBaseEO baseEO = queryById(dummyInventoryBaseEO.getId());
|
||||||
List<String> createByNameList =new ArrayList<>();
|
|
||||||
// if (StringUtils.isNotBlank(baseEO.getCreateBy())) {
|
|
||||||
// createByNameList = Arrays.asList(baseEO.getCreateBy().split(","));
|
|
||||||
//
|
|
||||||
// if (CollectionUtils.isNotEmpty(createByNameList)){
|
|
||||||
// if (!createByNameList.contains(loginUserName)) {
|
|
||||||
// if (CutEnum.CN.getValue().equals(dummyInventoryBaseEO.getCut())) {
|
|
||||||
// throw new JeroBootException("当前用户非创建者,无法发布");
|
|
||||||
// } else {
|
|
||||||
// throw new JeroBootException("The current user is not the creator and cannot be issued.");
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
UpdateWrapper<DummyInventoryBaseEO> baseWrapper=new UpdateWrapper<>();
|
UpdateWrapper<DummyInventoryBaseEO> baseWrapper=new UpdateWrapper<>();
|
||||||
baseWrapper.set("state",dummyInventoryBaseEO.getState());
|
baseWrapper.set("state",dummyInventoryBaseEO.getState());
|
||||||
@@ -381,6 +372,27 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
|||||||
}
|
}
|
||||||
baseWrapper.eq("id",dummyInventoryBaseEO.getId());
|
baseWrapper.eq("id",dummyInventoryBaseEO.getId());
|
||||||
dummyInventoryBaseEOMapper.update(null,baseWrapper);
|
dummyInventoryBaseEOMapper.update(null,baseWrapper);
|
||||||
|
|
||||||
|
//发布的时候升版如果选择是,则将发布的这个版本数据保存到历史
|
||||||
|
if(InventoryStateEnum.ISSUE.getValue().equals(dummyInventoryBaseEO.getState())
|
||||||
|
&& YesOrNoEnum.YES.getValue().equals(dummyInventoryBaseEO.getUpgradeOrNot())){
|
||||||
|
LambdaQueryWrapper<DummyInventoryInfoEO> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.eq(DummyInventoryInfoEO::getDummyInventoryBaseId,dummyInventoryBaseEO.getId());
|
||||||
|
List<DummyInventoryInfoEO> dummyInventoryInfoEOList = iDummyInventoryInfoEOService.list(wrapper);
|
||||||
|
if(ObjectUtils.isNotEmpty(dummyInventoryInfoEOList)){
|
||||||
|
List<DummyInventoryInfoHistoryEO> dummyInventoryInfoHistoryEOList = new ArrayList<>();
|
||||||
|
for (DummyInventoryInfoEO dummyInventoryInfoEO : dummyInventoryInfoEOList) {
|
||||||
|
DummyInventoryInfoHistoryEO dummyInventoryInfoHistoryEO = new DummyInventoryInfoHistoryEO();
|
||||||
|
BeanUtils.copyProperties(dummyInventoryInfoEO,dummyInventoryInfoHistoryEO);
|
||||||
|
dummyInventoryInfoHistoryEO.setId(UUID.randomUUID().toString().replace("-", ""));
|
||||||
|
dummyInventoryInfoHistoryEOList.add(dummyInventoryInfoHistoryEO);
|
||||||
|
}
|
||||||
|
dummyInventoryInfoHistoryEOService.saveBatch(dummyInventoryInfoHistoryEOList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// this.updateById(dummyInventoryBaseEO);
|
// this.updateById(dummyInventoryBaseEO);
|
||||||
//不管有没有维护清单,都返回操作成功
|
//不管有没有维护清单,都返回操作成功
|
||||||
//发布与撤回均需要发消息(向订阅的人员发消息)
|
//发布与撤回均需要发消息(向订阅的人员发消息)
|
||||||
|
|||||||
+1
-1
@@ -211,7 +211,7 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
|||||||
log.info("二阶段消耗时间:" + (System.currentTimeMillis() - startTime));
|
log.info("二阶段消耗时间:" + (System.currentTimeMillis() - startTime));
|
||||||
this.dataDicDispose(dummyInventoryInfoEOList,dummyInventoryInfoEO.getCut());
|
this.dataDicDispose(dummyInventoryInfoEOList,dummyInventoryInfoEO.getCut());
|
||||||
log.info("三阶段消耗时间:" + (System.currentTimeMillis() - startTime));
|
log.info("三阶段消耗时间:" + (System.currentTimeMillis() - startTime));
|
||||||
treeDict(dummyInventoryInfoEO, dummyInventoryInfoEOList,sysDictItems);
|
// treeDict(dummyInventoryInfoEO, dummyInventoryInfoEOList,sysDictItems);
|
||||||
// 数据处理
|
// 数据处理
|
||||||
this.disposeData(dummyInventoryInfoEOList,dummyInventoryInfoEO.getCut());
|
this.disposeData(dummyInventoryInfoEOList,dummyInventoryInfoEO.getCut());
|
||||||
//表头排序
|
//表头排序
|
||||||
|
|||||||
+469
@@ -0,0 +1,469 @@
|
|||||||
|
package com.jero.modules.dummy.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.jero.common.constant.enums.CutEnum;
|
||||||
|
import com.jero.common.util.DateUtils;
|
||||||
|
import com.jero.modules.document.entity.PhasedImplementationDetailsEO;
|
||||||
|
import com.jero.modules.document.enums.ImplementationTypeEnum;
|
||||||
|
import com.jero.modules.document.service.IPhasedImplementationDetailsEOService;
|
||||||
|
import com.jero.modules.dummy.entity.DummyInventoryInfoHistoryEO;
|
||||||
|
import com.jero.modules.dummy.enums.DummyInventoryBaseFieldEnum;
|
||||||
|
import com.jero.modules.dummy.mapper.DummyInventoryInfoHistoryEOMapper;
|
||||||
|
import com.jero.modules.dummy.service.IDummyInventoryInfoHistoryEOService;
|
||||||
|
import com.jero.modules.oss.entity.OSSFile;
|
||||||
|
import com.jero.modules.oss.service.IOSSFileService;
|
||||||
|
import com.jero.modules.system.entity.SysCategory;
|
||||||
|
import com.jero.modules.system.entity.SysDictItem;
|
||||||
|
import com.jero.modules.system.service.impl.SysCategoryServiceImpl;
|
||||||
|
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 市场法规清单历史版本
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2023-10-30
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class DummyInventoryInfoHistoryEOServiceImpl extends ServiceImpl<DummyInventoryInfoHistoryEOMapper, DummyInventoryInfoHistoryEO> implements IDummyInventoryInfoHistoryEOService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IPhasedImplementationDetailsEOService phasedImplementationDetailsEOService;
|
||||||
|
@Autowired
|
||||||
|
private IOSSFileService iOSSFileService;
|
||||||
|
@Autowired
|
||||||
|
private SysCategoryServiceImpl sysCategoryService;
|
||||||
|
@Autowired
|
||||||
|
private SysDictItemServiceImpl sysDictItemServiceImpl;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存
|
||||||
|
*
|
||||||
|
* @param dummyInventoryInfoHistoryEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void add(DummyInventoryInfoHistoryEO dummyInventoryInfoHistoryEO) {
|
||||||
|
Date now = new Date();
|
||||||
|
dummyInventoryInfoHistoryEO.setCreateTime(now);
|
||||||
|
dummyInventoryInfoHistoryEO.setUpdateTime(now);
|
||||||
|
save(dummyInventoryInfoHistoryEO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新
|
||||||
|
*
|
||||||
|
* @param dummyInventoryInfoHistoryEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void editById(DummyInventoryInfoHistoryEO dummyInventoryInfoHistoryEO) {
|
||||||
|
Date now = new Date();
|
||||||
|
dummyInventoryInfoHistoryEO.setUpdateTime(now);
|
||||||
|
saveOrUpdate(dummyInventoryInfoHistoryEO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void deleteById(String id) {
|
||||||
|
removeById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void deleteByIds(List<String> ids) {
|
||||||
|
removeByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public DummyInventoryInfoHistoryEO queryById(String id) {
|
||||||
|
return getById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<DummyInventoryInfoHistoryEO> queryList() {
|
||||||
|
return list();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<DummyInventoryInfoHistoryEO> getPageInfo(Page<DummyInventoryInfoHistoryEO> page,DummyInventoryInfoHistoryEO dummyInventoryInfoHistoryEO) {
|
||||||
|
LambdaQueryWrapper<DummyInventoryInfoHistoryEO> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.eq(DummyInventoryInfoHistoryEO::getDummyInventoryBaseId,dummyInventoryInfoHistoryEO.getDummyInventoryBaseId());
|
||||||
|
Page<DummyInventoryInfoHistoryEO> historyEOPage = this.page(page, wrapper);
|
||||||
|
|
||||||
|
treeDict(dummyInventoryInfoHistoryEO, historyEOPage.getRecords());
|
||||||
|
|
||||||
|
disposeData(historyEOPage.getRecords());
|
||||||
|
|
||||||
|
dataDicDispose(historyEOPage.getRecords(),dummyInventoryInfoHistoryEO.getCut());
|
||||||
|
|
||||||
|
return historyEOPage;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void disposeData(List<DummyInventoryInfoHistoryEO> datas) {
|
||||||
|
if(CollectionUtils.isNotEmpty(datas)){
|
||||||
|
List<String> bussDocumentLibraryIdList = datas.stream().map(DummyInventoryInfoHistoryEO::getBussDocumentLibraryId).distinct().collect(Collectors.toList());
|
||||||
|
QueryWrapper<PhasedImplementationDetailsEO> phasedDetailsQueryWrap = new QueryWrapper<>();
|
||||||
|
phasedDetailsQueryWrap.lambda().in(PhasedImplementationDetailsEO::getBussDocumentLibraryId,bussDocumentLibraryIdList);
|
||||||
|
List<PhasedImplementationDetailsEO> phasedDetailsList = this.phasedImplementationDetailsEOService.list(phasedDetailsQueryWrap);
|
||||||
|
|
||||||
|
// 新车型分阶段实施数据信息
|
||||||
|
List<PhasedImplementationDetailsEO> newCarModelPhasedDetailsList = phasedDetailsList.stream().filter(phasedDetails -> {
|
||||||
|
boolean flag = false;
|
||||||
|
if(StringUtils.contains(phasedDetails.getImplementationType(), ImplementationTypeEnum.NEW_CAR_MODEL.getItemValue())){
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
|
||||||
|
// 在产车分阶段实施数据信息
|
||||||
|
List<PhasedImplementationDetailsEO> carInProductionPhasedDetailsList = phasedDetailsList.stream().filter(phasedDetails -> {
|
||||||
|
boolean flag = false;
|
||||||
|
if(StringUtils.contains(phasedDetails.getImplementationType(), ImplementationTypeEnum.CAR_IN_PRODUCTION.getItemValue())){
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
|
||||||
|
for (DummyInventoryInfoHistoryEO data : datas) {
|
||||||
|
// 处理新车型实施日期展示
|
||||||
|
List<Date> newCarModelDateList = newCarModelPhasedDetailsList.stream().filter(phasedDetails -> {
|
||||||
|
boolean flag = false;
|
||||||
|
if (StringUtils.equals(phasedDetails.getBussDocumentLibraryId(), data.getBussDocumentLibraryId())) {
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}).map(PhasedImplementationDetailsEO::getImplementationDate).collect(Collectors.toList());
|
||||||
|
if(data.getXin1Che1Xing2Shi2Shi1Ri4Qi1() != null){
|
||||||
|
newCarModelDateList.add(data.getXin1Che1Xing2Shi2Shi1Ri4Qi1());
|
||||||
|
}
|
||||||
|
String newCarModelDateStr = DateUtils.formatDateList(newCarModelDateList);
|
||||||
|
data.setXin1Che1Xing2Shi2Shi1Ri4Qi1String(newCarModelDateStr);
|
||||||
|
|
||||||
|
// 处理在产车实施日期展示
|
||||||
|
List<Date> carInProductionDateList = carInProductionPhasedDetailsList.stream().filter(phasedDetails -> {
|
||||||
|
boolean flag = false;
|
||||||
|
if (StringUtils.equals(phasedDetails.getBussDocumentLibraryId(), data.getBussDocumentLibraryId())) {
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}).map(PhasedImplementationDetailsEO::getImplementationDate).collect(Collectors.toList());
|
||||||
|
if(data.getImplementTime() != null){
|
||||||
|
carInProductionDateList.add(data.getImplementTime());
|
||||||
|
}
|
||||||
|
String carInProductionDateStr = DateUtils.formatDateList(carInProductionDateList);
|
||||||
|
data.setImplementTimeString(carInProductionDateStr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void dataDicDispose(List<DummyInventoryInfoHistoryEO> datas, String cut){
|
||||||
|
if(CollectionUtils.isNotEmpty(datas)){
|
||||||
|
List<SysDictItem> sysDictItems = this.sysDictItemServiceImpl.getBaseMapper().selectItemsAll();
|
||||||
|
|
||||||
|
for (DummyInventoryInfoHistoryEO data : datas) {
|
||||||
|
// 适用地区
|
||||||
|
String region = data.getRegion();
|
||||||
|
if(StringUtils.isNotEmpty(region)){
|
||||||
|
String region_dictText = this.disposeShowDictItemValue(sysDictItems, region,cut, DummyInventoryBaseFieldEnum.REGION.getValue());
|
||||||
|
data.setRegion_dictText(region_dictText);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 适用范围
|
||||||
|
String shi4Yong4Fan4Wei2 = data.getShi4Yong4Fan4Wei2();
|
||||||
|
if(StringUtils.isNotEmpty(shi4Yong4Fan4Wei2)){
|
||||||
|
String shi4Yong4Fan4Wei2_dictText = this.disposeShowDictItemValue(sysDictItems, shi4Yong4Fan4Wei2,cut, DummyInventoryBaseFieldEnum.SHI4_YONG4_FAN4_WEI2.getValue());
|
||||||
|
data.setShi4Yong4Fan4Wei2_dictText(shi4Yong4Fan4Wei2_dictText);
|
||||||
|
data.setShi4Yong4Fan4Wei2Str(shi4Yong4Fan4Wei2_dictText);
|
||||||
|
}else{
|
||||||
|
data.setShi4Yong4Fan4Wei2Str("");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 状态
|
||||||
|
String state = data.getState();
|
||||||
|
if(StringUtils.isNotEmpty(state)){
|
||||||
|
String state_dictText = this.disposeShowDictItemValue(sysDictItems, state,cut, DummyInventoryBaseFieldEnum.STATE.getValue());
|
||||||
|
data.setState_dictText(state_dictText);
|
||||||
|
data.setStateStr(state_dictText);
|
||||||
|
}else{
|
||||||
|
data.setStateStr("");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 实施类别
|
||||||
|
String implementType = data.getImplementType();
|
||||||
|
if(StringUtils.isNotEmpty(implementType)){
|
||||||
|
String implementType_dictText = this.disposeShowDictItemValue(sysDictItems, implementType,cut, DummyInventoryBaseFieldEnum.IMPLEMENT_TYPE.getValue());
|
||||||
|
data.setImplementType_dictText(implementType_dictText);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 认证类别
|
||||||
|
String attestationType = data.getAttestationType();
|
||||||
|
if(StringUtils.isNotEmpty(attestationType)){
|
||||||
|
String attestationType_dictText = this.disposeShowDictItemValue(sysDictItems, attestationType,cut, DummyInventoryBaseFieldEnum.ATTESTATION_TYPE.getValue());
|
||||||
|
data.setAttestationType_dictText(attestationType_dictText);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 认证级别
|
||||||
|
String attestationRank = data.getAttestationRank();
|
||||||
|
if(StringUtils.isNotEmpty(attestationRank)){
|
||||||
|
String attestationRank_dictText = this.disposeShowDictItemValue(sysDictItems, attestationRank,cut, DummyInventoryBaseFieldEnum.ATTESTATION_RANK.getValue());
|
||||||
|
data.setAttestationRank_dictText(attestationRank_dictText);
|
||||||
|
data.setAttestationRankStr(attestationRank_dictText);
|
||||||
|
}else{
|
||||||
|
data.setAttestationRankStr("");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 责任领域
|
||||||
|
String dutyTerritory = data.getDutyTerritory();
|
||||||
|
if(StringUtils.isNotEmpty(dutyTerritory)){
|
||||||
|
String dutyTerritory_dictText = this.disposeShowDictItemValue(sysDictItems, dutyTerritory,cut, DummyInventoryBaseFieldEnum.DUTY_TERRITORY.getValue());
|
||||||
|
data.setDutyTerritory_dictText(dutyTerritory_dictText);
|
||||||
|
data.setDutyTerritoryStr(dutyTerritory_dictText);
|
||||||
|
}else{
|
||||||
|
data.setDutyTerritoryStr("");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设计符合性-发起人
|
||||||
|
String designInitiator = data.getDesignInitiator();
|
||||||
|
if(StringUtils.isNotEmpty(designInitiator)){
|
||||||
|
String designInitiator_dictText = this.disposeShowDictItemValue(sysDictItems, designInitiator,cut, DummyInventoryBaseFieldEnum.DESIGN_INITIATOR.getValue());
|
||||||
|
data.setDesignInitiator_dictText(designInitiator_dictText);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设计符合性-责任人
|
||||||
|
String designDuty = data.getDesignDuty();
|
||||||
|
if(StringUtils.isNotEmpty(designDuty)){
|
||||||
|
String designDuty_dictText = this.disposeShowDictItemValue(sysDictItems, designDuty,cut, DummyInventoryBaseFieldEnum.DESIGN_DUTY.getValue());
|
||||||
|
data.setDesignDuty_dictText(designDuty_dictText);
|
||||||
|
}
|
||||||
|
|
||||||
|
// preHomo-发起人
|
||||||
|
String prehomoInitiator = data.getPrehomoInitiator();
|
||||||
|
if(StringUtils.isNotEmpty(prehomoInitiator)){
|
||||||
|
String prehomoInitiator_dictText = this.disposeShowDictItemValue(sysDictItems, prehomoInitiator,cut, DummyInventoryBaseFieldEnum.PREHOMO_INITIATOR.getValue());
|
||||||
|
data.setPrehomoInitiator_dictText(prehomoInitiator_dictText);
|
||||||
|
}
|
||||||
|
|
||||||
|
// preHomo-责任人
|
||||||
|
String prehomoDuty = data.getPrehomoDuty();
|
||||||
|
if(StringUtils.isNotEmpty(prehomoDuty)){
|
||||||
|
String prehomoDuty_dictText = this.disposeShowDictItemValue(sysDictItems, prehomoDuty,cut, DummyInventoryBaseFieldEnum.PREHOMO_DUTY.getValue());
|
||||||
|
data.setPrehomoDuty_dictText(prehomoDuty_dictText);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 验证符合性-发起人
|
||||||
|
String verifyInitiator = data.getVerifyInitiator();
|
||||||
|
if(StringUtils.isNotEmpty(verifyInitiator)){
|
||||||
|
String verifyInitiator_dictText = this.disposeShowDictItemValue(sysDictItems, verifyInitiator,cut, DummyInventoryBaseFieldEnum.VERIFY_INITIATOR.getValue());
|
||||||
|
data.setVerifyInitiator_dictText(verifyInitiator_dictText);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 验证符合性-责任人
|
||||||
|
String verifyDuty = data.getVerifyDuty();
|
||||||
|
if(StringUtils.isNotEmpty(verifyDuty)){
|
||||||
|
String verifyDuty_dictText = this.disposeShowDictItemValue(sysDictItems, verifyDuty,cut, DummyInventoryBaseFieldEnum.VERIFY_DUTY.getValue());
|
||||||
|
data.setVerifyDuty_dictText(verifyDuty_dictText);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void treeDict(DummyInventoryInfoHistoryEO dummyInventoryInfoHistoryEO,
|
||||||
|
List<DummyInventoryInfoHistoryEO> dummyInventoryInfoHistoryEOList) {
|
||||||
|
|
||||||
|
List<String> deliverableList = new ArrayList<>();
|
||||||
|
if(dummyInventoryInfoHistoryEOList.size() != 0){
|
||||||
|
for (DummyInventoryInfoHistoryEO record : dummyInventoryInfoHistoryEOList) {
|
||||||
|
//设计符合性确认交付物模板
|
||||||
|
if(StringUtils.isNotBlank(record.getDesignDeliverableTemplate())){
|
||||||
|
deliverableList.addAll(Arrays.asList(record.getDesignDeliverableTemplate().split(",")));
|
||||||
|
}
|
||||||
|
// Prehomo确认交付物模板
|
||||||
|
if(StringUtils.isNotBlank(record.getPrehomoDeliverableTemplate())){
|
||||||
|
deliverableList.addAll(Arrays.asList(record.getPrehomoDeliverableTemplate().split(",")));
|
||||||
|
}
|
||||||
|
// 验证符合性确认交付物模板
|
||||||
|
if(StringUtils.isNotBlank(record.getVerifyDeliverableTemplate())){
|
||||||
|
deliverableList.addAll(Arrays.asList(record.getVerifyDeliverableTemplate().split(",")));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//文件
|
||||||
|
List<OSSFile> fileInfos = new ArrayList<>();
|
||||||
|
if(deliverableList.size() != 0){
|
||||||
|
fileInfos = iOSSFileService.getFileInfos(StringUtils.join(deliverableList, ","));
|
||||||
|
}
|
||||||
|
|
||||||
|
//树形结构数据字典(技术领域)
|
||||||
|
List<SysCategory> categoryList = sysCategoryService.list();
|
||||||
|
|
||||||
|
for (DummyInventoryInfoHistoryEO record : dummyInventoryInfoHistoryEOList) {
|
||||||
|
if(StringUtils.isBlank(record.getWvtaId())){
|
||||||
|
record.setWvtaId("");
|
||||||
|
}
|
||||||
|
//技术领域
|
||||||
|
if (categoryList.size() != 0 && StringUtils.isNotBlank(record.getTechnologyTerritory())) {
|
||||||
|
List<String> technologyTerritoryList = Arrays.asList(record.getTechnologyTerritory().split(","));
|
||||||
|
String technologyTerritoryName = getTreeName(dummyInventoryInfoHistoryEO, categoryList, technologyTerritoryList);
|
||||||
|
record.setTechnologyTerritoryName(technologyTerritoryName);
|
||||||
|
}
|
||||||
|
//设计交付物类型
|
||||||
|
if(StringUtils.isNotBlank(record.getDesignDeliverableType())){
|
||||||
|
List<String> designDeliverableTypeList = Arrays.asList(record.getDesignDeliverableType().split(","));
|
||||||
|
String name = getTreeName(dummyInventoryInfoHistoryEO, categoryList, designDeliverableTypeList);
|
||||||
|
record.setDesignDeliverableTypeName(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
//pre交付物类型
|
||||||
|
if(StringUtils.isNotBlank(record.getPrehomoDeliverableType())){
|
||||||
|
List<String> prehomoDeliverableTypeList = Arrays.asList(record.getPrehomoDeliverableType().split(","));
|
||||||
|
String name = getTreeName(dummyInventoryInfoHistoryEO, categoryList, prehomoDeliverableTypeList);
|
||||||
|
record.setPrehomoDeliverableTypeName(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
//验证交付物类型
|
||||||
|
if(StringUtils.isNotBlank(record.getVerifyDeliverableType())){
|
||||||
|
List<String> verifyDeliverableTypeList = Arrays.asList(record.getVerifyDeliverableType().split(","));
|
||||||
|
String name = getTreeName(dummyInventoryInfoHistoryEO, categoryList, verifyDeliverableTypeList);
|
||||||
|
record.setVerifyDeliverableTypeName(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
//交付物类型模板
|
||||||
|
if(fileInfos.size() != 0){
|
||||||
|
if(StringUtils.isNotBlank(record.getDesignDeliverableTemplate())){
|
||||||
|
String fileName = getFileName(fileInfos,record.getDesignDeliverableTemplate());
|
||||||
|
if(StringUtils.isNotBlank(fileName)){
|
||||||
|
record.setDesignDeliverableTemplateName(fileName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(StringUtils.isNotBlank(record.getPrehomoDeliverableTemplate())){
|
||||||
|
String fileName = getFileName(fileInfos,record.getPrehomoDeliverableTemplate());
|
||||||
|
if(StringUtils.isNotBlank(fileName)){
|
||||||
|
record.setPrehomoDeliverableTemplateName(fileName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(StringUtils.isNotBlank(record.getVerifyDeliverableTemplate())){
|
||||||
|
String fileName = getFileName(fileInfos,record.getVerifyDeliverableTemplate());
|
||||||
|
if(StringUtils.isNotBlank(fileName)){
|
||||||
|
record.setVerifyDeliverableTemplateName(fileName);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getTreeName(DummyInventoryInfoHistoryEO dummyInventoryInfoHistoryEO,
|
||||||
|
List<SysCategory> categoryList,
|
||||||
|
List<String> technologyTerritoryList) {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
for (String technologyTerritory : technologyTerritoryList) {
|
||||||
|
List<SysCategory> collect = categoryList.stream().filter(e -> technologyTerritory.equals(e.getId())).collect(Collectors.toList());
|
||||||
|
if(collect.size() != 0){
|
||||||
|
if (CutEnum.CN.getValue().equals(dummyInventoryInfoHistoryEO.getCut())) {
|
||||||
|
sb.append(collect.get(0).getName() + ",");
|
||||||
|
} else {
|
||||||
|
sb.append(collect.get(0).getEnName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
String technologyTerritoryName = "";
|
||||||
|
if (StringUtils.isNotBlank(sb)) {
|
||||||
|
technologyTerritoryName = sb.substring(0, sb.length() - 1);
|
||||||
|
}
|
||||||
|
return technologyTerritoryName;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getFileName(List<OSSFile> fileInfos,String deliverableTemplate){
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
for (String s : deliverableTemplate.split(",")) {
|
||||||
|
List<OSSFile> collect = fileInfos.stream().filter(e -> s.equals(e.getId())).collect(Collectors.toList());
|
||||||
|
if(collect.size() != 0){
|
||||||
|
sb.append(collect.get(0).getFileName() + ",");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
String sbStr = "";
|
||||||
|
if(StringUtils.isNotBlank(sb)){
|
||||||
|
sbStr = sb.substring(0, sb.length() - 1);
|
||||||
|
}
|
||||||
|
return sbStr;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String disposeShowDictItemValue(List<SysDictItem> sysDictItems,String fieldValues,String cut,String dicCode){
|
||||||
|
String result = "";
|
||||||
|
List<SysDictItem> sysDictItemList = sysDictItems.stream().filter(e -> {
|
||||||
|
boolean flag = false;
|
||||||
|
if(StringUtils.equals(e.getDictCode(),dicCode)){
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}).distinct().collect(Collectors.toList());
|
||||||
|
if(CollectionUtils.isNotEmpty(sysDictItemList)){
|
||||||
|
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
|
||||||
|
result = sysDictItemList.stream().filter(e -> {
|
||||||
|
boolean flag = false;
|
||||||
|
List<String> fieldValueStrList = Arrays.asList(fieldValues.split(","));
|
||||||
|
for (String fieldValueStr : fieldValueStrList) {
|
||||||
|
if(StringUtils.equals(fieldValueStr,e.getItemValue())){
|
||||||
|
flag = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}).map(SysDictItem::getItemText).collect(Collectors.joining(","));
|
||||||
|
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||||
|
result = sysDictItemList.stream().filter(e -> {
|
||||||
|
boolean flag = false;
|
||||||
|
List<String> fieldValueStrList = Arrays.asList(fieldValues.split(","));
|
||||||
|
for (String fieldValueStr : fieldValueStrList) {
|
||||||
|
if(StringUtils.equals(fieldValueStr,e.getItemValue())){
|
||||||
|
flag = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}).map(SysDictItem::getEnName).collect(Collectors.joining(","));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,153 @@
|
|||||||
|
package com.jero.modules.dummy.util;
|
||||||
|
import java.io.BufferedReader;
|
||||||
|
import java.io.FileOutputStream;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
|
import java.io.OutputStream;
|
||||||
|
import java.io.PrintWriter;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.net.URL;
|
||||||
|
import java.net.URLConnection;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class HttpUtils {
|
||||||
|
/**
|
||||||
|
* 向指定URL发送GET方法的请求
|
||||||
|
*
|
||||||
|
* @param url
|
||||||
|
* 发送请求的URL
|
||||||
|
* @param param
|
||||||
|
* 请求参数,请求参数应该是 name1=value1&name2=value2 的形式。
|
||||||
|
* @return URL 所代表远程资源的响应结果
|
||||||
|
*/
|
||||||
|
public static String sendGet(String url, String param) {
|
||||||
|
String result = "";
|
||||||
|
BufferedReader in = null;
|
||||||
|
try {
|
||||||
|
String urlNameString = url + "?" + param;
|
||||||
|
URL realUrl = new URL(urlNameString);
|
||||||
|
// 打开和URL之间的连接
|
||||||
|
URLConnection connection = realUrl.openConnection();
|
||||||
|
// 设置通用的请求属性
|
||||||
|
connection.setRequestProperty("accept", "*/*");
|
||||||
|
|
||||||
|
connection.setRequestProperty("connection", "Keep-Alive");
|
||||||
|
|
||||||
|
connection.setRequestProperty("user-agent",
|
||||||
|
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");
|
||||||
|
|
||||||
|
connection.setRequestProperty("X-Access-Token","");
|
||||||
|
// 建立实际的连接
|
||||||
|
connection.connect();
|
||||||
|
// 获取所有响应头字段
|
||||||
|
Map<String, List<String>> map = connection.getHeaderFields();
|
||||||
|
// 遍历所有的响应头字段
|
||||||
|
for (String key : map.keySet()) {
|
||||||
|
System.out.println(key + "--->" + map.get(key));
|
||||||
|
}
|
||||||
|
// String fileName = map.get("Content-Disposition").get(0);
|
||||||
|
// 定义 BufferedReader输入流来读取URL的响应
|
||||||
|
OutputStream out = new FileOutputStream("E:\\DeskTop\\获取文件\\"+"fileName"+"xls");
|
||||||
|
in = new BufferedReader(new InputStreamReader(
|
||||||
|
connection.getInputStream(),"UTF-8"));
|
||||||
|
String line;
|
||||||
|
while ((line = in.readLine()) != null) {
|
||||||
|
result += line;
|
||||||
|
out.write(line.getBytes());
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
System.out.println("发送GET请求出现异常!" + e);
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
// 使用finally块来关闭输入流
|
||||||
|
finally {
|
||||||
|
try {
|
||||||
|
if (in != null) {
|
||||||
|
in.close();
|
||||||
|
}
|
||||||
|
} catch (Exception e2) {
|
||||||
|
e2.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
int a=0;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 向指定 URL 发送POST方法的请求
|
||||||
|
*
|
||||||
|
* @param url
|
||||||
|
* 发送请求的 URL
|
||||||
|
* @param param
|
||||||
|
* 请求参数,请求参数应该是 name1=value1&name2=value2 的形式。
|
||||||
|
* @return 所代表远程资源的响应结果
|
||||||
|
*/
|
||||||
|
public static String sendPost(String url, String param) {
|
||||||
|
PrintWriter out = null;
|
||||||
|
BufferedReader in = null;
|
||||||
|
String result = "";
|
||||||
|
try {
|
||||||
|
URL realUrl = new URL(url);
|
||||||
|
// 打开和URL之间的连接
|
||||||
|
URLConnection conn = realUrl.openConnection();
|
||||||
|
// 设置通用的请求属性
|
||||||
|
conn.setRequestProperty("accept", "*/*");
|
||||||
|
conn.setRequestProperty("connection", "Keep-Alive");
|
||||||
|
conn.setRequestProperty("Content-Type","application/json");
|
||||||
|
conn.setRequestProperty("user-agent",
|
||||||
|
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");
|
||||||
|
//海外平台调取接口的时候,是否是免登录的,如果不是免登录需要提供一个永久有效的token
|
||||||
|
conn.setRequestProperty("X-Access-Token","eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2NTY3ODI3MjEsInVzZXJuYW1lIjoid2FuZ2NoZW5nanVuIn0.AmJATH62P5G-0ojON0Q2PW-IHuwf1MbSU8N-gYsNUls");
|
||||||
|
// 发送POST请求必须设置如下两行
|
||||||
|
conn.setDoOutput(true);
|
||||||
|
conn.setDoInput(true);
|
||||||
|
// 获取URLConnection对象对应的输出流
|
||||||
|
out = new PrintWriter(conn.getOutputStream());
|
||||||
|
// 发送请求参数
|
||||||
|
out.print(param);
|
||||||
|
// flush输出流的缓冲
|
||||||
|
out.flush();
|
||||||
|
// 定义BufferedReader输入流来读取URL的响应
|
||||||
|
in = new BufferedReader(
|
||||||
|
new InputStreamReader(conn.getInputStream()));
|
||||||
|
String line;
|
||||||
|
while ((line = in.readLine()) != null) {
|
||||||
|
result += line;
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
System.out.println("发送 POST 请求出现异常!"+e);
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
//使用finally块来关闭输出流、输入流
|
||||||
|
finally{
|
||||||
|
try{
|
||||||
|
if(out!=null){
|
||||||
|
out.close();
|
||||||
|
}
|
||||||
|
if(in!=null){
|
||||||
|
in.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch(IOException ex){
|
||||||
|
ex.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
String fileId = "75c2dbf7a66062b3b816847dc62b18f311";
|
||||||
|
String key = "E26A7BEDE06C013A";
|
||||||
|
String param = "fileId="+fileId+"&key="+key;
|
||||||
|
|
||||||
|
String res= sendGet("http://localhost:8081/jeecg-boot/sys/common/static/getFileForeign",param);
|
||||||
|
System.out.println(res);
|
||||||
|
try {
|
||||||
|
System.out.println(new String(res.getBytes("GBK"),"UTF-8"));
|
||||||
|
} catch (UnsupportedEncodingException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+27
-18
@@ -1,25 +1,33 @@
|
|||||||
package com.jero.modules.log.controller;
|
package com.jero.modules.log.controller;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import java.util.List;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
import com.jero.common.api.vo.Result;
|
import com.jero.common.api.vo.Result;
|
||||||
|
import com.jero.common.aspect.annotation.AutoLog;
|
||||||
|
import com.jero.common.system.base.controller.JeroController;
|
||||||
import com.jero.common.system.query.QueryGenerator;
|
import com.jero.common.system.query.QueryGenerator;
|
||||||
import com.jero.modules.log.entity.MarketListVersionUpdateLogEO;
|
import com.jero.modules.log.entity.MarketListVersionUpdateLogEO;
|
||||||
import com.jero.modules.log.service.IMarketListVersionUpdateLogEOService;
|
import com.jero.modules.log.service.IMarketListVersionUpdateLogEOService;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import com.jero.common.system.base.controller.JeroController;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import com.jero.common.aspect.annotation.AutoLog;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -35,7 +43,7 @@ import com.jero.common.aspect.annotation.AutoLog;
|
|||||||
public class MarketListVersionUpdateLogEOController extends JeroController<MarketListVersionUpdateLogEO, IMarketListVersionUpdateLogEOService> {
|
public class MarketListVersionUpdateLogEOController extends JeroController<MarketListVersionUpdateLogEO, IMarketListVersionUpdateLogEOService> {
|
||||||
@Autowired
|
@Autowired
|
||||||
private IMarketListVersionUpdateLogEOService marketListVersionUpdateLogEOService;
|
private IMarketListVersionUpdateLogEOService marketListVersionUpdateLogEOService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页列表查询
|
* 分页列表查询
|
||||||
*
|
*
|
||||||
@@ -53,9 +61,10 @@ public class MarketListVersionUpdateLogEOController extends JeroController<Marke
|
|||||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
HttpServletRequest req) {
|
HttpServletRequest req) {
|
||||||
QueryWrapper<MarketListVersionUpdateLogEO> queryWrapper = QueryGenerator.initQueryWrapper(marketListVersionUpdateLogEO, req.getParameterMap());
|
QueryWrapper<MarketListVersionUpdateLogEO> queryWrapper = QueryGenerator.initQueryWrapper(marketListVersionUpdateLogEO, req.getParameterMap());
|
||||||
Page<MarketListVersionUpdateLogEO> page = new Page<MarketListVersionUpdateLogEO>(pageNo, pageSize);
|
IPage<MarketListVersionUpdateLogEO> pageInfo = marketListVersionUpdateLogEOService.getPageInfo(queryWrapper, pageNo, pageSize);
|
||||||
IPage<MarketListVersionUpdateLogEO> pageList = marketListVersionUpdateLogEOService.page(page, queryWrapper);
|
// Page<MarketListVersionUpdateLogEO> page = new Page<MarketListVersionUpdateLogEO>(pageNo, pageSize);
|
||||||
return Result.OK(pageList);
|
// IPage<MarketListVersionUpdateLogEO> pageList = marketListVersionUpdateLogEOService.page(page, queryWrapper);
|
||||||
|
return Result.OK(pageInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+22
-12
@@ -1,20 +1,21 @@
|
|||||||
package com.jero.modules.log.entity;
|
package com.jero.modules.log.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import lombok.Data;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
|
||||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
|
||||||
import io.swagger.annotations.ApiModel;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import lombok.experimental.Accessors;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 市场清单版本更新log表
|
* @Description: 市场清单版本更新log表
|
||||||
* @Author: jero-boot
|
* @Author: jero-boot
|
||||||
@@ -78,4 +79,13 @@ public class MarketListVersionUpdateLogEO implements Serializable {
|
|||||||
@ApiModelProperty(value = "清单id")
|
@ApiModelProperty(value = "清单id")
|
||||||
private String listId;
|
private String listId;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
@ApiModelProperty(value = "清单名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
@ApiModelProperty(value = "适用说明")
|
||||||
|
private String useExplain;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-1
@@ -1,7 +1,10 @@
|
|||||||
package com.jero.modules.log.service;
|
package com.jero.modules.log.service;
|
||||||
|
|
||||||
import com.jero.modules.log.entity.MarketListVersionUpdateLogEO;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.jero.modules.log.entity.MarketListVersionUpdateLogEO;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -58,4 +61,6 @@ public interface IMarketListVersionUpdateLogEOService extends IService<MarketLis
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<MarketListVersionUpdateLogEO> queryList();
|
List<MarketListVersionUpdateLogEO> queryList();
|
||||||
|
|
||||||
|
IPage<MarketListVersionUpdateLogEO> getPageInfo(QueryWrapper<MarketListVersionUpdateLogEO> queryWrapper,Integer pageNo,Integer pageSize);
|
||||||
}
|
}
|
||||||
|
|||||||
+89
-45
@@ -1,29 +1,42 @@
|
|||||||
package com.jero.modules.log.service.impl;
|
package com.jero.modules.log.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.jero.common.util.PageUtil;
|
||||||
|
import com.jero.modules.dummy.entity.DummyInventoryBaseEO;
|
||||||
|
import com.jero.modules.dummy.service.impl.DummyInventoryBaseEOServiceImpl;
|
||||||
import com.jero.modules.log.entity.MarketListVersionUpdateLogEO;
|
import com.jero.modules.log.entity.MarketListVersionUpdateLogEO;
|
||||||
import com.jero.modules.log.mapper.MarketListVersionUpdateLogEOMapper;
|
import com.jero.modules.log.mapper.MarketListVersionUpdateLogEOMapper;
|
||||||
import com.jero.modules.log.service.IMarketListVersionUpdateLogEOService;
|
import com.jero.modules.log.service.IMarketListVersionUpdateLogEOService;
|
||||||
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 市场清单版本更新log表
|
* @Description: 市场清单版本更新log表
|
||||||
* @Author: jero-boot
|
* @Author: jero-boot
|
||||||
* @Date: 2023-04-24
|
* @Date: 2023-04-24
|
||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class MarketListVersionUpdateLogEOServiceImpl extends ServiceImpl<MarketListVersionUpdateLogEOMapper, MarketListVersionUpdateLogEO> implements IMarketListVersionUpdateLogEOService {
|
public class MarketListVersionUpdateLogEOServiceImpl extends ServiceImpl<MarketListVersionUpdateLogEOMapper, MarketListVersionUpdateLogEO> implements IMarketListVersionUpdateLogEOService {
|
||||||
|
|
||||||
/**
|
@Autowired
|
||||||
* 保存
|
private DummyInventoryBaseEOServiceImpl dummyInventoryBaseEOService;
|
||||||
*
|
|
||||||
* @param marketListVersionUpdateLogEO
|
/**
|
||||||
* @return
|
* 保存
|
||||||
*/
|
*
|
||||||
@Override
|
* @param marketListVersionUpdateLogEO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
public void add(MarketListVersionUpdateLogEO marketListVersionUpdateLogEO) {
|
public void add(MarketListVersionUpdateLogEO marketListVersionUpdateLogEO) {
|
||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
marketListVersionUpdateLogEO.setCreateTime(now);
|
marketListVersionUpdateLogEO.setCreateTime(now);
|
||||||
@@ -31,59 +44,90 @@ public class MarketListVersionUpdateLogEOServiceImpl extends ServiceImpl<MarketL
|
|||||||
save(marketListVersionUpdateLogEO);
|
save(marketListVersionUpdateLogEO);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新
|
* 更新
|
||||||
*
|
*
|
||||||
* @param marketListVersionUpdateLogEO
|
* @param marketListVersionUpdateLogEO
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void editById(MarketListVersionUpdateLogEO marketListVersionUpdateLogEO) {
|
public void editById(MarketListVersionUpdateLogEO marketListVersionUpdateLogEO) {
|
||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
marketListVersionUpdateLogEO.setUpdateTime(now);
|
marketListVersionUpdateLogEO.setUpdateTime(now);
|
||||||
saveOrUpdate(marketListVersionUpdateLogEO);
|
saveOrUpdate(marketListVersionUpdateLogEO);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过id删除
|
* 通过id删除
|
||||||
*
|
*
|
||||||
* @param id
|
* @param id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void deleteById(String id) {
|
public void deleteById(String id) {
|
||||||
removeById(id);
|
removeById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除
|
* 批量删除
|
||||||
*
|
*
|
||||||
* @param ids
|
* @param ids
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void deleteByIds(List<String> ids) {
|
public void deleteByIds(List<String> ids) {
|
||||||
removeByIds(ids);
|
removeByIds(ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过id查询
|
* 通过id查询
|
||||||
*
|
*
|
||||||
* @param id
|
* @param id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public MarketListVersionUpdateLogEO queryById(String id) {
|
public MarketListVersionUpdateLogEO queryById(String id) {
|
||||||
return getById(id);
|
return getById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表查询
|
* 列表查询
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<MarketListVersionUpdateLogEO> queryList() {
|
public List<MarketListVersionUpdateLogEO> queryList() {
|
||||||
return list();
|
return list();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<MarketListVersionUpdateLogEO> getPageInfo(QueryWrapper<MarketListVersionUpdateLogEO> queryWrapper,
|
||||||
|
Integer pageNo,
|
||||||
|
Integer pageSize) {
|
||||||
|
queryWrapper.lambda().orderByAsc(MarketListVersionUpdateLogEO::getCreateTime);
|
||||||
|
List<MarketListVersionUpdateLogEO> marketListVersionUpdateLogEOList = this.list(queryWrapper);
|
||||||
|
if (ObjectUtils.isNotEmpty(marketListVersionUpdateLogEOList)
|
||||||
|
&& marketListVersionUpdateLogEOList.size() == 1) {
|
||||||
|
return new Page<>();
|
||||||
|
}
|
||||||
|
if (ObjectUtils.isNotEmpty(marketListVersionUpdateLogEOList)
|
||||||
|
&& marketListVersionUpdateLogEOList.size() > 1) {
|
||||||
|
marketListVersionUpdateLogEOList.remove(marketListVersionUpdateLogEOList.size() - 1);
|
||||||
|
}
|
||||||
|
IPage<MarketListVersionUpdateLogEO> pageList = PageUtil.getPages(pageNo, pageSize, marketListVersionUpdateLogEOList);
|
||||||
|
if (ObjectUtils.isNotEmpty(pageList.getRecords())) {
|
||||||
|
List<String> idList = pageList.getRecords().stream().map(MarketListVersionUpdateLogEO::getListId).distinct().collect(Collectors.toList());
|
||||||
|
List<DummyInventoryBaseEO> dummyInventoryBaseEOList = dummyInventoryBaseEOService.listByIds(idList);
|
||||||
|
|
||||||
|
for (MarketListVersionUpdateLogEO record : pageList.getRecords()) {
|
||||||
|
List<DummyInventoryBaseEO> baseEOList = dummyInventoryBaseEOList.stream()
|
||||||
|
.filter(e -> e.getId().equals(record.getListId())).collect(Collectors.toList());
|
||||||
|
if(ObjectUtils.isNotEmpty(baseEOList)){
|
||||||
|
record.setName(baseEOList.get(0).getName());
|
||||||
|
record.setUseExplain(baseEOList.get(0).getUseExplain());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return pageList;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user