diff --git a/src/main/java/com/lz/modules/app/controller/ResultRecordController.java b/src/main/java/com/lz/modules/app/controller/ResultRecordController.java index 5618de6c..b4023253 100644 --- a/src/main/java/com/lz/modules/app/controller/ResultRecordController.java +++ b/src/main/java/com/lz/modules/app/controller/ResultRecordController.java @@ -1,5 +1,6 @@ package com.lz.modules.app.controller; +import com.google.common.collect.Maps; import com.lz.common.emun.ChartFlowType; import com.lz.common.emun.WorkMsgTypeEnum; import com.lz.common.utils.*; @@ -10,6 +11,7 @@ import com.lz.modules.app.dto.StaffDepartmentDto; import com.lz.modules.app.entity.DepartmentsStaffRelateEntity; import com.lz.modules.app.entity.StaffEntity; import com.lz.modules.app.entity.StaffSimpleInfo; +import com.lz.modules.app.req.RecordDetailExplanReq; import com.lz.modules.app.req.ResultRecordReq; import com.lz.modules.app.resp.ResultDetailResp; import com.lz.modules.app.resp.Step; @@ -727,6 +729,19 @@ public class ResultRecordController extends AbstractController { List insertScores = new ArrayList<>(); List updateScores = new ArrayList<>(); + List resultDetails = resultDetailService.selectByRecordId(dto.getId()); + Map mapDetails = + resultDetails.stream().collect(Collectors.toMap(ResultDetail::getId, Function.identity(), (e, r) -> e)); + + //获取当前绩效的节点 + boolean isSetKeyResult = false; + List flowRecords = flowRecordService.selectFlowRecordByRecordIdStatus(dto.getId(), 2); + if(flowRecords.size() > 0){ + if(flowRecords.get(0).getFlowProcess().intValue() == 0){ + //指定目标中 + isSetKeyResult = true; + } + } for (ResultRecortModelDto model:dto.getRecortModelDtos() ) { @@ -739,6 +754,36 @@ public class ResultRecordController extends AbstractController { ) {//排序 ResultDetail resultDetail = new ResultDetail(); BeanUtils.copyProperties(detailDto, resultDetail); + if(!isSetKeyResult && resultDetail.getId() != null && mapDetails.containsKey(resultDetail.getId())){ + //这里判断是否有更新,或者删除 + ResultDetail resultDetail1 = mapDetails.get(resultDetail.getId()); + boolean isUp = false; + if(!resultDetail.getTarget().equals(resultDetail1.getTarget())){ + //打上标识 + isUp = true; + + } + + if(!resultDetail.getCheckResult().equals(resultDetail1.getCheckResult())){ + //打上标识 + isUp = true; + resultDetail1.setCheckResult("" + resultDetail1.getCheckResult() + ""); + } + + if(!resultDetail.getCheckWeight().equals(resultDetail1.getCheckWeight())){ + //打上标识 + isUp = true; + + //resultDetail1.setTarget("" + resultDetail1.getTarget() + ""); + } + if(isUp){ + resultDetail1.setId(null); + resultDetail1.setIsBack(1); + resultDetail1.setTarget("" + resultDetail1.getTarget() + ""); + resultDetail1.setBackId(resultDetail.getId()); + inserts.add(resultDetail); + } + } resultDetail.setPriority(index); index++; @@ -1179,4 +1224,31 @@ public class ResultRecordController extends AbstractController { return resultRecordService.getResetData(recordDetailDto); } + + + + + @ApiOperation("导出绩效详情报表") + @GetMapping("/recordDetailExport") + public R recordDetailExport(Long recordId){ + Map map = Maps.newHashMap(); + map.put("id",recordId); + R respnse = getDetail(map); + if(respnse.isSuccess()){ + ResultRecordDetailDto resultRecordDetailDto = (ResultRecordDetailDto) respnse.get("data"); + + } + + return R.ok(); + } + + @ApiOperation("导出绩效详情报表计划") + @PostMapping("/recordDetailExplan") + public R recordDetailExport(@RequestBody List reqs){ + + + + + return R.ok(); + } } diff --git a/src/main/java/com/lz/modules/app/req/RecordDetailExplanReq.java b/src/main/java/com/lz/modules/app/req/RecordDetailExplanReq.java new file mode 100644 index 00000000..077766ac --- /dev/null +++ b/src/main/java/com/lz/modules/app/req/RecordDetailExplanReq.java @@ -0,0 +1,20 @@ +package com.lz.modules.app.req; + +import lombok.Data; + +/** + * @Author: djc + * @Desc: + * @Date: 2020/12/4 11:27 + */ +@Data +public class RecordDetailExplanReq { + //绩效id + private Long recordId; + + //是否导出图片 + private int image; + + //是否打印 + private int print; +} diff --git a/src/main/java/com/lz/modules/flow/entity/ResultScore.java b/src/main/java/com/lz/modules/flow/entity/ResultScore.java index f6a322d8..c948f40a 100644 --- a/src/main/java/com/lz/modules/flow/entity/ResultScore.java +++ b/src/main/java/com/lz/modules/flow/entity/ResultScore.java @@ -12,7 +12,7 @@ import java.util.Date; *

*

*业绩详情评分表 * @author quyixiao -* @since 2020-11-12 +* @since 2020-12-03 */ @Data @@ -46,6 +46,9 @@ public class ResultScore implements java.io.Serializable { //评分权重 @ApiModelProperty(value = "评分权重", name = "weight") private BigDecimal weight; + //根据权重计算除的实际得分 + @ApiModelProperty(value = "根据权重计算除的实际得分", name = "score") + private BigDecimal score; /** * * @return @@ -181,6 +184,21 @@ public class ResultScore implements java.io.Serializable { this.weight = weight; } + /** + * 根据权重计算除的实际得分 + * @return + */ + public BigDecimal getScore() { + return score; + } + /** + * 根据权重计算除的实际得分 + * @param score + */ + public void setScore(BigDecimal score) { + this.score = score; + } + @Override public String toString() { return "ResultScore{" + @@ -193,6 +211,7 @@ public class ResultScore implements java.io.Serializable { ",approvalId=" + approvalId + ",scoreComment=" + scoreComment + ",weight=" + weight + + ",score=" + score + "}"; } } \ No newline at end of file diff --git a/src/main/java/com/lz/modules/flow/model/ResultScoreDto.java b/src/main/java/com/lz/modules/flow/model/ResultScoreDto.java index 29bb213c..157816c3 100644 --- a/src/main/java/com/lz/modules/flow/model/ResultScoreDto.java +++ b/src/main/java/com/lz/modules/flow/model/ResultScoreDto.java @@ -43,6 +43,10 @@ public class ResultScoreDto { //评分说明 @ApiModelProperty(value = "评分说明", name = "scoreComment") private String scoreComment; + + //根据权重计算除的实际得分 + @ApiModelProperty(value = "根据权重计算除的实际得分", name = "score") + private BigDecimal score; /** * * @return diff --git a/src/main/java/com/lz/modules/performance/controller/ExportController.java b/src/main/java/com/lz/modules/performance/controller/ExportController.java index d8d2b7be..aeb7d1c3 100644 --- a/src/main/java/com/lz/modules/performance/controller/ExportController.java +++ b/src/main/java/com/lz/modules/performance/controller/ExportController.java @@ -6,34 +6,32 @@ import cn.hutool.poi.excel.ExcelUtil; import cn.hutool.poi.excel.ExcelWriter; import cn.hutool.poi.excel.StyleSet; import com.google.common.collect.Lists; -import com.lz.common.utils.PageUtils; -import com.lz.common.utils.R; -import com.lz.common.utils.StringUtil; +import com.lz.modules.flow.model.ResultDetailDto; +import com.lz.modules.flow.model.ResultRecordDetailDto; +import com.lz.modules.flow.model.ResultRecortModelDto; +import com.lz.modules.performance.dto.RecordDetailExportDto; import com.lz.modules.performance.req.ChartResultReq; import com.lz.modules.performance.res.LevelDetailExportRes; import com.lz.modules.performance.service.ChartResultService; -import com.lz.modules.sys.entity.app.ResultRecord; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiParam; -import io.swagger.models.auth.In; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections.CollectionUtils; import org.apache.poi.ss.usermodel.*; import org.apache.poi.ss.util.CellRangeAddressList; +import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletResponse; import java.io.IOException; -import java.io.UnsupportedEncodingException; import java.lang.reflect.Field; -import java.util.ArrayList; +import java.math.BigDecimal; import java.util.List; +import java.util.stream.Collectors; /** * @Author: djc @@ -59,7 +57,7 @@ public class ExportController { //获取数据 List data = chartResultService.selectLevelDetailList(req); //导出 - buildExcelExport(data,response); + buildLevelExcelExport(data,response); } catch (Exception e) { log.error("导出等级详情异常,e: ",e); @@ -70,9 +68,31 @@ public class ExportController { + @GetMapping("/export/recordDetail") + @ApiOperation("导出绩效详情") + public void recordDetail(ResultRecordDetailDto dto, HttpServletResponse response){ + try { + String test = ""; + + if(CollectionUtils.isEmpty(dto.getRecortModelDtos())){ + log.info("没有模板信息,无法生成,id: " + dto.getId()); + } + ResultRecordDetailDto testDto = com.alibaba.fastjson.JSONObject.parseObject(test,ResultRecordDetailDto.class); + + buildRecordExcelExport(testDto, response); + + } catch (Exception e) { + log.error("导出绩效详情异常,e: ",e); + } + + } + + + + //对应实体属性名与表列名 - private void buildData(Class data,List tags,ExcelWriter writer){ + private void buildHeaderData(Class data,List tags,ExcelWriter writer){ if(data == null || CollectionUtils.isEmpty(tags)){ log.info("导出excel-实体属性或数据为空!"); return; @@ -89,13 +109,13 @@ public class ExportController { } } - private void buildExcelExport(List data, HttpServletResponse response){ + private void buildLevelExcelExport(List data, HttpServletResponse response){ //设置表头表尾及数据 List rowHead = CollUtil.newArrayList("序号", "工号", "员工姓名", "当月状态", "一级部门", "二级部门", "三级部门", "职位", "员工月度绩效考核评分","员工月度绩效考核结果等级"); ExcelWriter writer = ExcelUtil.getWriter(); writer.setColumnWidth(-1,15); writer.passRows(4); - buildData(LevelDetailExportRes.class,rowHead,writer); + buildHeaderData(LevelDetailExportRes.class,rowHead,writer); writer.merge(0,2,0,9,"绩效考核总表",false); writer.merge(3,3,0,1,"考核月份",false); writer.write(data, true); @@ -135,4 +155,230 @@ public class ExportController { IoUtil.close(out); } + + private void buildRecordExcelExport(ResultRecordDetailDto dto, HttpServletResponse response){ + //设置表头表尾及数据 + List row = CollUtil.newArrayList("考核月份", "09", "工号", "YN", "员工姓名", "老白", "一级部门", "业务中台", "二级部门","技术中心", "三级部门","攻关小组", "职位","java", "直属上级","佟湘玉"); + List rowHead = CollUtil.newArrayList("考核维度", "目标/指标", "关键结果", "考核权重", "考核结果(员工填写)", "直属上级评分(100%)", "得分","评分说明(直属上级填写)"); + ExcelWriter writer = ExcelUtil.getWriter(); + writer.setColumnWidth(-1,15); + writer.passRows(3); + + + buildHeaderData(RecordDetailExportDto.class,rowHead,writer); + writer.merge(0,2,0,9,"员工月度绩效计划与评估表",false); + writer.writeHeadRow(row); + List recortModelDtos = dto.getRecortModelDtos(); + List data = Lists.newArrayList(); + int mergeStart = 5; + for(ResultRecortModelDto modelDto:recortModelDtos){ + //维度名称 + String name = modelDto.getName(); + //详细条目 + List detailDtos = modelDto.getDetailDtos(); + + List collect = detailDtos.stream().map(resultDetailDto -> { + RecordDetailExportDto detailExportDto = new RecordDetailExportDto(); + BeanUtils.copyProperties(resultDetailDto, detailExportDto); + detailExportDto.setName(name); + return detailExportDto; + }).collect(Collectors.toList()); + data.addAll(collect); + int i = mergeStart + collect.size(); + writer.merge(mergeStart,i -1,0,0,null,false); + //添加汇总 + RecordDetailExportDto add = new RecordDetailExportDto(); + add.setAcquireScore(BigDecimal.valueOf(0.01)); + add.setKeyResult(name + "考核结果"); + add.setCheckWeight(modelDto.getWeight()); + writer.merge(i,mergeStart + collect.size(),0,1,null,false); + //1为跳过插入的记录 + mergeStart = i + 1; + data.add(add); + } + + //设置尾部 + RecordDetailExportDto add; + add = new RecordDetailExportDto(); + add.setName("最终绩效考核评分"); + data.add(add); + add = new RecordDetailExportDto(); + add.setName("最终绩效考核结果等级"); + data.add(add); + writer.write(data,true); + //writer.merge(7 + data.size(),8 + data.size(),0,0,"签字",false); + //writer.setRowHeight(5,50); + //设置生效的是没有数据的,有数据的反而不生效 + //writer.setRowHeight(-1,50); + + //响应 + String name = "test测试"; + response.setContentType("application/vnd.ms-excel;charset=utf-8"); + response.setHeader("Content-Disposition", "attachment;filename=" + name + ".xls"); + ServletOutputStream out = null; + try { + out = response.getOutputStream(); + writer.flush(out, true); + } + catch (IOException e) { + log.error("生成excel文档异常,e: ",e); + } + finally { + writer.close(); + } + IoUtil.close(out); + } + + + /*{\n" + + " \"id\": 807,\n" + + " \"status\": 0,\n" + + " \"lastScore\": null,\n" + + " \"allScore\": null,\n" + + " \"remark\": null,\n" + + " \"staffId\": 303,\n" + + " \"startId\": 83,\n" + + " \"gradeGroupId\": 1,\n" + + " \"flowStaffIdRole\": null,\n" + + " \"departmentId\": \"154231708\",\n" + + " \"departmentName\": \"技术中心\",\n" + + " \"staffName\": \"傅美爱\",\n" + + " \"avatar\": \"https://static-legacy.dingtalk.com/media/lADPBbCc1Tp1ysPNAu7NAu4_750_750.jpg\",\n" + + " \"jobNumber\": \"9\",\n" + + " \"currentApprovalStaffId\": 322,\n" + + " \"currentApprovalStaffName\": \"徐虹杰\",\n" + + " \"scoreLevel\": null,\n" + + " \"flowProcess\": 1,\n" + + " \"recortModelDtos\": [\n" + + " {\n" + + " \"id\": 1276,\n" + + " \"name\": \"业绩绩效\",\n" + + " \"type\": 1,\n" + + " \"weight\": 0.7,\n" + + " \"maxCount\": 10,\n" + + " \"orderBy\": 0,\n" + + " \"detailDtos\": [\n" + + " {\n" + + " \"id\": 932,\n" + + " \"isDelete\": 0,\n" + + " \"type\": 1,\n" + + " \"target\": \"85496\",\n" + + " \"keyResult\": \"56632\",\n" + + " \"calculate\": \"0.7*{acquireScore}\",\n" + + " \"checkWeight\": 0.7,\n" + + " \"checkResult\": null,\n" + + " \"superScore\": \"4分-卓越\",\n" + + " \"acquireScore\": 0,\n" + + " \"scoreComment\": null,\n" + + " \"priority\": 0,\n" + + " \"scoreDtos\": [\n" + + " {\n" + + " \"id\": 296,\n" + + " \"acquireScore\": 0,\n" + + " \"detailId\": 932,\n" + + " \"approvalId\": 322,\n" + + " \"approvalName\": \"徐虹杰\",\n" + + " \"weight\": 1,\n" + + " \"calculate\": \"0.7*1.0*{acquireScore}\",\n" + + " \"scoreComment\": null\n" + + " }\n" + + " ],\n" + + " \"modelId\": 1276\n" + + " },\n" + + " {\n" + + " \"id\": 932,\n" + + " \"isDelete\": 0,\n" + + " \"type\": 1,\n" + + " \"target\": \"85496\",\n" + + " \"keyResult\": \"56632\",\n" + + " \"calculate\": \"0.7*{acquireScore}\",\n" + + " \"checkWeight\": 0.7,\n" + + " \"checkResult\": null,\n" + + " \"superScore\": \"4分-卓越\",\n" + + " \"acquireScore\": 0,\n" + + " \"scoreComment\": null,\n" + + " \"priority\": 0,\n" + + " \"scoreDtos\": [\n" + + " {\n" + + " \"id\": 296,\n" + + " \"acquireScore\": 0,\n" + + " \"detailId\": 932,\n" + + " \"approvalId\": 322,\n" + + " \"approvalName\": \"徐虹杰\",\n" + + " \"weight\": 1,\n" + + " \"calculate\": \"0.7*1.0*{acquireScore}\",\n" + + " \"scoreComment\": null\n" + + " }\n" + + " ],\n" + + " \"modelId\": 1276\n" + + " }\n" + + " ]\n" + + " },\n" + + " {\n" + + " \"id\": 1277,\n" + + " \"name\": \"文化价值观\",\n" + + " \"type\": 1,\n" + + " \"weight\": 0.3,\n" + + " \"maxCount\": 1,\n" + + " \"orderBy\": 1,\n" + + " \"detailDtos\": [\n" + + " {\n" + + " \"id\": 931,\n" + + " \"isDelete\": 0,\n" + + " \"type\": 1,\n" + + " \"target\": \"文化价值观\",\n" + + " \"keyResult\": \"发挥个人体会\",\n" + + " \"calculate\": \"0.3*{acquireScore}\",\n" + + " \"checkWeight\": 0.3,\n" + + " \"checkResult\": null,\n" + + " \"superScore\": null,\n" + + " \"acquireScore\": 0,\n" + + " \"scoreComment\": null,\n" + + " \"priority\": 0,\n" + + " \"scoreDtos\": [\n" + + " {\n" + + " \"id\": 295,\n" + + " \"acquireScore\": 0,\n" + + " \"detailId\": 931,\n" + + " \"approvalId\": 322,\n" + + " \"approvalName\": \"徐虹杰\",\n" + + " \"weight\": 1,\n" + + " \"calculate\": \"0.3*1.0*{acquireScore}\",\n" + + " \"scoreComment\": null\n" + + " }\n" + + " ],\n" + + " \"modelId\": 1277\n" + + " },\n" + + " {\n" + + " \"id\": 931,\n" + + " \"isDelete\": 0,\n" + + " \"type\": 1,\n" + + " \"target\": \"文化价值观\",\n" + + " \"keyResult\": \"发挥个人体会\",\n" + + " \"calculate\": \"0.3*{acquireScore}\",\n" + + " \"checkWeight\": 0.3,\n" + + " \"checkResult\": null,\n" + + " \"superScore\": null,\n" + + " \"acquireScore\": 0,\n" + + " \"scoreComment\": null,\n" + + " \"priority\": 0,\n" + + " \"scoreDtos\": [\n" + + " {\n" + + " \"id\": 295,\n" + + " \"acquireScore\": 0,\n" + + " \"detailId\": 931,\n" + + " \"approvalId\": 322,\n" + + " \"approvalName\": \"徐虹杰\",\n" + + " \"weight\": 1,\n" + + " \"calculate\": \"0.3*1.0*{acquireScore}\",\n" + + " \"scoreComment\": null\n" + + " }\n" + + " ],\n" + + " \"modelId\": 1277\n" + + " }\n" + + " ]\n" + + " }\n" + + " ],\n" + + " \"weight\": 1\n" + + " }*/ } diff --git a/src/main/java/com/lz/modules/performance/dto/RecordDetailExportDto.java b/src/main/java/com/lz/modules/performance/dto/RecordDetailExportDto.java new file mode 100644 index 00000000..5ae5892b --- /dev/null +++ b/src/main/java/com/lz/modules/performance/dto/RecordDetailExportDto.java @@ -0,0 +1,34 @@ +package com.lz.modules.performance.dto; + +import com.lz.modules.flow.model.ResultScoreDto; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.List; + +/** + * @Author: djc + * @Desc: + * @Date: 2020/12/3 15:06 + */ +@Data +public class RecordDetailExportDto { + //1,业绩,2文化价值观 + private String name; + //目标 + private String target; + //关键结果 + private String keyResult; + //考核权重 + private BigDecimal checkWeight; + //考核结果 + private String checkResult; + //直属上级评分 + private String superScore; + //得分 + private BigDecimal acquireScore; + //评分说明 + private String scoreComment; + +} diff --git a/src/main/java/com/lz/modules/performance/dto/StaffTypeDto.java b/src/main/java/com/lz/modules/performance/dto/StaffTypeDto.java index 5822caf5..891ebc6d 100644 --- a/src/main/java/com/lz/modules/performance/dto/StaffTypeDto.java +++ b/src/main/java/com/lz/modules/performance/dto/StaffTypeDto.java @@ -17,12 +17,4 @@ public class StaffTypeDto { private Long staffId; //职位 private String position; - //人员状态 - private Long staffStatus; - //入职日期 - private Date entryTime; - //转正日期 - private Date officialTime; - //离职时间 - private Date resignationTime; } diff --git a/src/main/java/com/lz/modules/sys/dao/PrintMapper.java b/src/main/java/com/lz/modules/sys/dao/PrintMapper.java new file mode 100644 index 00000000..808924d6 --- /dev/null +++ b/src/main/java/com/lz/modules/sys/dao/PrintMapper.java @@ -0,0 +1,33 @@ +package com.lz.modules.sys.dao; +/** +*

+* 流转表 服务类 +*

+* +* @author quyixiao +* @since 2020-12-04 +*/ +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.lz.modules.sys.entity.Print; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +@Mapper +public interface PrintMapper extends BaseMapper { + + + Print selectPrintById(@Param("id") Long id); + + + Long insertPrint(Print print); + + + int updatePrintById(Print print); + + + int updateCoverPrintById(Print print); + + + int deletePrintById(@Param("id") Long id); + + +} \ No newline at end of file diff --git a/src/main/java/com/lz/modules/sys/dao/ResourceMapper.java b/src/main/java/com/lz/modules/sys/dao/ResourceMapper.java new file mode 100644 index 00000000..9d5451c0 --- /dev/null +++ b/src/main/java/com/lz/modules/sys/dao/ResourceMapper.java @@ -0,0 +1,26 @@ +package com.lz.modules.sys.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.lz.modules.sys.entity.Resource; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +@Mapper +public interface ResourceMapper extends BaseMapper { + + + Resource selectResourceById(@Param("id") Long id); + + + Long insertResource(Resource resource); + + + int updateResourceById(Resource resource); + + + int updateCoverResourceById(Resource resource); + + + int deleteResourceById(@Param("id") Long id); + + +} \ No newline at end of file diff --git a/src/main/java/com/lz/modules/sys/entity/Print.java b/src/main/java/com/lz/modules/sys/entity/Print.java new file mode 100644 index 00000000..cadb7712 --- /dev/null +++ b/src/main/java/com/lz/modules/sys/entity/Print.java @@ -0,0 +1,234 @@ +package com.lz.modules.sys.entity; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import java.util.Date; +/** +*

+*

*流转表 +* @author quyixiao +* @since 2020-12-04 +*/ + +@Data +@TableName("lz_print") +@ApiModel(value = "流转表") +public class Print implements java.io.Serializable { + // + @TableId(value = "id", type = IdType.AUTO) + private Long id; + //是否删除状态,1:删除,0:有效 + @ApiModelProperty(value = "是否删除状态,1:删除,0:有效", name = "isDelete") + private Integer isDelete; + //创建时间 + @ApiModelProperty(value = "创建时间", name = "gmtCreate") + private Date gmtCreate; + //最后修改时间 + @ApiModelProperty(value = "最后修改时间", name = "gmtModified") + private Date gmtModified; + //打印详情的url + @ApiModelProperty(value = "打印详情的url", name = "url") + private String url; + //备注 + @ApiModelProperty(value = "备注", name = "remark") + private String remark; + //打印批次号 + @ApiModelProperty(value = "打印批次号", name = "batchNo") + private String batchNo; + //0未打印,1打印成功,2打印失败 + @ApiModelProperty(value = "0未打印,1打印成功,2打印失败", name = "status") + private Integer status; + //生成图片上传阿里云url + @ApiModelProperty(value = "生成图片上传阿里云url", name = "imageUrl") + private String imageUrl; + //0不生成图片,1生成图片 + @ApiModelProperty(value = "0不生成图片,1生成图片", name = "isImage") + private Integer isImage; + //0不打印,1 打印 + @ApiModelProperty(value = "0不打印,1 打印", name = "isPrint") + private Integer isPrint; + /** + * + * @return + */ + public Long getId() { + return id; + } + /** + * + * @param id + */ + public void setId(Long id) { + this.id = id; + } + + /** + * 是否删除状态,1:删除,0:有效 + * @return + */ + public Integer getIsDelete() { + return isDelete; + } + /** + * 是否删除状态,1:删除,0:有效 + * @param isDelete + */ + public void setIsDelete(Integer isDelete) { + this.isDelete = isDelete; + } + + /** + * 创建时间 + * @return + */ + public Date getGmtCreate() { + return gmtCreate; + } + /** + * 创建时间 + * @param gmtCreate + */ + public void setGmtCreate(Date gmtCreate) { + this.gmtCreate = gmtCreate; + } + + /** + * 最后修改时间 + * @return + */ + public Date getGmtModified() { + return gmtModified; + } + /** + * 最后修改时间 + * @param gmtModified + */ + public void setGmtModified(Date gmtModified) { + this.gmtModified = gmtModified; + } + + /** + * 打印详情的url + * @return + */ + public String getUrl() { + return url; + } + /** + * 打印详情的url + * @param url + */ + public void setUrl(String url) { + this.url = url; + } + + /** + * 备注 + * @return + */ + public String getRemark() { + return remark; + } + /** + * 备注 + * @param remark + */ + public void setRemark(String remark) { + this.remark = remark; + } + + /** + * 打印批次号 + * @return + */ + public String getBatchNo() { + return batchNo; + } + /** + * 打印批次号 + * @param batchNo + */ + public void setBatchNo(String batchNo) { + this.batchNo = batchNo; + } + + /** + * 0未打印,1打印成功,2打印失败 + * @return + */ + public Integer getStatus() { + return status; + } + /** + * 0未打印,1打印成功,2打印失败 + * @param status + */ + public void setStatus(Integer status) { + this.status = status; + } + + /** + * 生成图片上传阿里云url + * @return + */ + public String getImageUrl() { + return imageUrl; + } + /** + * 生成图片上传阿里云url + * @param imageUrl + */ + public void setImageUrl(String imageUrl) { + this.imageUrl = imageUrl; + } + + /** + * 0不生成图片,1生成图片 + * @return + */ + public Integer getIsImage() { + return isImage; + } + /** + * 0不生成图片,1生成图片 + * @param isImage + */ + public void setIsImage(Integer isImage) { + this.isImage = isImage; + } + + /** + * 0不打印,1 打印 + * @return + */ + public Integer getIsPrint() { + return isPrint; + } + /** + * 0不打印,1 打印 + * @param isPrint + */ + public void setIsPrint(Integer isPrint) { + this.isPrint = isPrint; + } + + @Override + public String toString() { + return "Print{" + + ",id=" + id + + ",isDelete=" + isDelete + + ",gmtCreate=" + gmtCreate + + ",gmtModified=" + gmtModified + + ",url=" + url + + ",remark=" + remark + + ",batchNo=" + batchNo + + ",status=" + status + + ",imageUrl=" + imageUrl + + ",isImage=" + isImage + + ",isPrint=" + isPrint + + "}"; + } +} \ No newline at end of file diff --git a/src/main/java/com/lz/modules/sys/entity/Resource.java b/src/main/java/com/lz/modules/sys/entity/Resource.java new file mode 100644 index 00000000..cbb92d62 --- /dev/null +++ b/src/main/java/com/lz/modules/sys/entity/Resource.java @@ -0,0 +1,361 @@ +package com.lz.modules.sys.entity; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import java.util.Date; + +@Data +@TableName("lz_resource") +@ApiModel(value = "资源配置及业务配置表,针对一些会变更的配置,如白名单配置、客服电话等或者是某些数据量很少的业务数据,如首页bannel、 /* comment truncated */ /*首页广告位等数据*/") +public class Resource implements java.io.Serializable { + //主键,自增id + @TableId(value = "id", type = IdType.AUTO) + private Long id; + //是否删除状态,1:删除,0:有效 + @ApiModelProperty(value = "是否删除状态,1:删除,0:有效", name = "isDelete") + private Integer isDelete; + //创建时间 + @ApiModelProperty(value = "创建时间", name = "gmtCreate") + private Date gmtCreate; + //最后修改时间 + @ApiModelProperty(value = "最后修改时间", name = "gmtModified") + private Date gmtModified; + //创建人 + @ApiModelProperty(value = "创建人", name = "creator") + private String creator; + //最后修改人 + @ApiModelProperty(value = "最后修改人", name = "modifier") + private String modifier; + //配置类型,S:系统配置,B:业务配置 + @ApiModelProperty(value = "配置类型,S:系统配置,B:业务配置", name = "dataType") + private String dataType; + //配置类型,即配置的KEY,用于定位配置;所有字母大写,多个字母中间用下划线“_”分割;如:用户白名单类型USER_WHITE_LIST + @ApiModelProperty(value = "配置类型,即配置的KEY,用于定位配置;所有字母大写,多个字母中间用下划线“_”分割;如:用户白名单类型USER_WHITE_LIST", name = "type") + private String type; + //类型,可针对某一类型的配置做分类 + @ApiModelProperty(value = "类型,可针对某一类型的配置做分类", name = "secType") + private String secType; + //配置类型描述,如针对TYPE=USER_WHITE_LIST该值可描述为:用户白名单列表 + @ApiModelProperty(value = "配置类型描述,如针对TYPE=USER_WHITE_LIST该值可描述为:用户白名单列表", name = "typeDesc") + private String typeDesc; + //名称 + @ApiModelProperty(value = "名称", name = "name") + private String name; + //值 + @ApiModelProperty(value = "值", name = "value") + private String value; + //描述 + @ApiModelProperty(value = "描述", name = "description") + private String description; + //扩展值1 + @ApiModelProperty(value = "扩展值1", name = "value1") + private String value1; + //扩展值2 + @ApiModelProperty(value = "扩展值2", name = "value2") + private String value2; + //扩展值3 + @ApiModelProperty(value = "扩展值3", name = "value3") + private String value3; + //扩展值4 + @ApiModelProperty(value = "扩展值4", name = "value4") + private String value4; + //排序 + @ApiModelProperty(value = "排序", name = "sort") + private Long sort; + /** + * 主键,自增id + * @return + */ + public Long getId() { + return id; + } + /** + * 主键,自增id + * @param id + */ + public void setId(Long id) { + this.id = id; + } + + /** + * 是否删除状态,1:删除,0:有效 + * @return + */ + public Integer getIsDelete() { + return isDelete; + } + /** + * 是否删除状态,1:删除,0:有效 + * @param isDelete + */ + public void setIsDelete(Integer isDelete) { + this.isDelete = isDelete; + } + + /** + * 创建时间 + * @return + */ + public Date getGmtCreate() { + return gmtCreate; + } + /** + * 创建时间 + * @param gmtCreate + */ + public void setGmtCreate(Date gmtCreate) { + this.gmtCreate = gmtCreate; + } + + /** + * 最后修改时间 + * @return + */ + public Date getGmtModified() { + return gmtModified; + } + /** + * 最后修改时间 + * @param gmtModified + */ + public void setGmtModified(Date gmtModified) { + this.gmtModified = gmtModified; + } + + /** + * 创建人 + * @return + */ + public String getCreator() { + return creator; + } + /** + * 创建人 + * @param creator + */ + public void setCreator(String creator) { + this.creator = creator; + } + + /** + * 最后修改人 + * @return + */ + public String getModifier() { + return modifier; + } + /** + * 最后修改人 + * @param modifier + */ + public void setModifier(String modifier) { + this.modifier = modifier; + } + + /** + * 配置类型,S:系统配置,B:业务配置 + * @return + */ + public String getDataType() { + return dataType; + } + /** + * 配置类型,S:系统配置,B:业务配置 + * @param dataType + */ + public void setDataType(String dataType) { + this.dataType = dataType; + } + + /** + * 配置类型,即配置的KEY,用于定位配置;所有字母大写,多个字母中间用下划线“_”分割;如:用户白名单类型USER_WHITE_LIST + * @return + */ + public String getType() { + return type; + } + /** + * 配置类型,即配置的KEY,用于定位配置;所有字母大写,多个字母中间用下划线“_”分割;如:用户白名单类型USER_WHITE_LIST + * @param type + */ + public void setType(String type) { + this.type = type; + } + + /** + * 类型,可针对某一类型的配置做分类 + * @return + */ + public String getSecType() { + return secType; + } + /** + * 类型,可针对某一类型的配置做分类 + * @param secType + */ + public void setSecType(String secType) { + this.secType = secType; + } + + /** + * 配置类型描述,如针对TYPE=USER_WHITE_LIST该值可描述为:用户白名单列表 + * @return + */ + public String getTypeDesc() { + return typeDesc; + } + /** + * 配置类型描述,如针对TYPE=USER_WHITE_LIST该值可描述为:用户白名单列表 + * @param typeDesc + */ + public void setTypeDesc(String typeDesc) { + this.typeDesc = typeDesc; + } + + /** + * 名称 + * @return + */ + public String getName() { + return name; + } + /** + * 名称 + * @param name + */ + public void setName(String name) { + this.name = name; + } + + /** + * 值 + * @return + */ + public String getValue() { + return value; + } + /** + * 值 + * @param value + */ + public void setValue(String value) { + this.value = value; + } + + /** + * 描述 + * @return + */ + public String getDescription() { + return description; + } + /** + * 描述 + * @param description + */ + public void setDescription(String description) { + this.description = description; + } + + /** + * 扩展值1 + * @return + */ + public String getValue1() { + return value1; + } + /** + * 扩展值1 + * @param value1 + */ + public void setValue1(String value1) { + this.value1 = value1; + } + + /** + * 扩展值2 + * @return + */ + public String getValue2() { + return value2; + } + /** + * 扩展值2 + * @param value2 + */ + public void setValue2(String value2) { + this.value2 = value2; + } + + /** + * 扩展值3 + * @return + */ + public String getValue3() { + return value3; + } + /** + * 扩展值3 + * @param value3 + */ + public void setValue3(String value3) { + this.value3 = value3; + } + + /** + * 扩展值4 + * @return + */ + public String getValue4() { + return value4; + } + /** + * 扩展值4 + * @param value4 + */ + public void setValue4(String value4) { + this.value4 = value4; + } + + /** + * 排序 + * @return + */ + public Long getSort() { + return sort; + } + /** + * 排序 + * @param sort + */ + public void setSort(Long sort) { + this.sort = sort; + } + + @Override + public String toString() { + return "Resource{" + + ",id=" + id + + ",isDelete=" + isDelete + + ",gmtCreate=" + gmtCreate + + ",gmtModified=" + gmtModified + + ",creator=" + creator + + ",modifier=" + modifier + + ",dataType=" + dataType + + ",type=" + type + + ",secType=" + secType + + ",typeDesc=" + typeDesc + + ",name=" + name + + ",value=" + value + + ",description=" + description + + ",value1=" + value1 + + ",value2=" + value2 + + ",value3=" + value3 + + ",value4=" + value4 + + ",sort=" + sort + + "}"; + } +} \ No newline at end of file diff --git a/src/main/java/com/lz/modules/sys/entity/app/ResultDetail.java b/src/main/java/com/lz/modules/sys/entity/app/ResultDetail.java index c042cc82..3b477599 100644 --- a/src/main/java/com/lz/modules/sys/entity/app/ResultDetail.java +++ b/src/main/java/com/lz/modules/sys/entity/app/ResultDetail.java @@ -12,7 +12,7 @@ import java.util.Date; *

*

*业绩详情表 * @author quyixiao -* @since 2020-11-17 +* @since 2020-12-03 */ @Data @@ -31,6 +31,12 @@ public class ResultDetail implements java.io.Serializable { //最后修改时间 @ApiModelProperty(value = "最后修改时间", name = "gmtModified") private Date gmtModified; + //备份id,本表得id + @ApiModelProperty(value = "备份id,本表得id", name = "backId") + private Long backId; + //是否为备份,0非备份,1备份值 + @ApiModelProperty(value = "是否为备份,0非备份,1备份值", name = "isBack") + private Integer isBack; //1,业绩,2文化价值观 @ApiModelProperty(value = "1,业绩,2文化价值观", name = "type") private Integer type; @@ -133,6 +139,36 @@ public class ResultDetail implements java.io.Serializable { this.gmtModified = gmtModified; } + /** + * 备份id,本表得id + * @return + */ + public Long getBackId() { + return backId; + } + /** + * 备份id,本表得id + * @param backId + */ + public void setBackId(Long backId) { + this.backId = backId; + } + + /** + * 是否为备份,0非备份,1备份值 + * @return + */ + public Integer getIsBack() { + return isBack; + } + /** + * 是否为备份,0非备份,1备份值 + * @param isBack + */ + public void setIsBack(Integer isBack) { + this.isBack = isBack; + } + /** * 1,业绩,2文化价值观 * @return @@ -350,6 +386,8 @@ public class ResultDetail implements java.io.Serializable { ",isDelete=" + isDelete + ",gmtCreate=" + gmtCreate + ",gmtModified=" + gmtModified + + ",backId=" + backId + + ",isBack=" + isBack + ",type=" + type + ",target=" + target + ",keyResult=" + keyResult + diff --git a/src/main/java/com/lz/modules/sys/service/PrintService.java b/src/main/java/com/lz/modules/sys/service/PrintService.java new file mode 100644 index 00000000..e92db5cf --- /dev/null +++ b/src/main/java/com/lz/modules/sys/service/PrintService.java @@ -0,0 +1,33 @@ +package com.lz.modules.sys.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.lz.modules.sys.entity.Print; + +/** +*

+* 流转表 服务类 +*

+* +* @author quyixiao +* @since 2020-12-04 +*/ +public interface PrintService extends IService { + + + + Print selectPrintById(Long id); + + + Long insertPrint(Print print); + + + int updatePrintById(Print print); + + + int updateCoverPrintById(Print print); + + + int deletePrintById(Long id); + + +} \ No newline at end of file diff --git a/src/main/java/com/lz/modules/sys/service/ResourceService.java b/src/main/java/com/lz/modules/sys/service/ResourceService.java new file mode 100644 index 00000000..3659c714 --- /dev/null +++ b/src/main/java/com/lz/modules/sys/service/ResourceService.java @@ -0,0 +1,25 @@ +package com.lz.modules.sys.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.lz.modules.sys.entity.Resource; + +public interface ResourceService extends IService { + + + + Resource selectResourceById(Long id); + + + Long insertResource(Resource resource); + + + int updateResourceById(Resource resource); + + + int updateCoverResourceById(Resource resource); + + + int deleteResourceById(Long id); + + +} \ No newline at end of file diff --git a/src/main/java/com/lz/modules/sys/service/impl/PrintServiceImpl.java b/src/main/java/com/lz/modules/sys/service/impl/PrintServiceImpl.java new file mode 100644 index 00000000..56f66cd4 --- /dev/null +++ b/src/main/java/com/lz/modules/sys/service/impl/PrintServiceImpl.java @@ -0,0 +1,55 @@ +package com.lz.modules.sys.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.lz.modules.sys.dao.PrintMapper; +import com.lz.modules.sys.entity.Print; +import com.lz.modules.sys.service.PrintService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + + +@Service +public class PrintServiceImpl extends ServiceImpl implements PrintService { + + + @Autowired + private PrintMapper printMapper; + + + + @Override + public Print selectPrintById(Long id){ + return printMapper.selectPrintById(id); + } + + + + @Override + public Long insertPrint(Print print){ + return printMapper.insertPrint(print); + } + + + + @Override + public int updatePrintById(Print print){ + return printMapper.updatePrintById(print); + } + + + + @Override + public int updateCoverPrintById(Print print){ + return printMapper.updateCoverPrintById(print); + } + + + + @Override + public int deletePrintById(Long id){ + return printMapper.deletePrintById(id); + } + + + +} diff --git a/src/main/java/com/lz/modules/sys/service/impl/ResourceServiceImpl.java b/src/main/java/com/lz/modules/sys/service/impl/ResourceServiceImpl.java new file mode 100644 index 00000000..2142a80d --- /dev/null +++ b/src/main/java/com/lz/modules/sys/service/impl/ResourceServiceImpl.java @@ -0,0 +1,54 @@ +package com.lz.modules.sys.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.lz.modules.sys.dao.ResourceMapper; +import com.lz.modules.sys.entity.Resource; +import com.lz.modules.sys.service.ResourceService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class ResourceServiceImpl extends ServiceImpl implements ResourceService { + + + @Autowired + private ResourceMapper resourceMapper; + + + + @Override + public Resource selectResourceById(Long id){ + return resourceMapper.selectResourceById(id); + } + + + + @Override + public Long insertResource(Resource resource){ + return resourceMapper.insertResource(resource); + } + + + + @Override + public int updateResourceById(Resource resource){ + return resourceMapper.updateResourceById(resource); + } + + + + @Override + public int updateCoverResourceById(Resource resource){ + return resourceMapper.updateCoverResourceById(resource); + } + + + + @Override + public int deleteResourceById(Long id){ + return resourceMapper.deleteResourceById(id); + } + + + +} diff --git a/src/main/resources/mapper/app/ResultDetailMapper.xml b/src/main/resources/mapper/app/ResultDetailMapper.xml index da34a43f..256ba69d 100644 --- a/src/main/resources/mapper/app/ResultDetailMapper.xml +++ b/src/main/resources/mapper/app/ResultDetailMapper.xml @@ -8,6 +8,8 @@ + + @@ -27,7 +29,7 @@ - id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, type AS type, target AS target, key_result AS keyResult, key_result_3_5 AS keyResult35, key_result_3_7 AS keyResult37, check_weight AS checkWeight, check_result AS checkResult, super_score AS superScore, acquire_score AS acquireScore, score_comment AS scoreComment, record_id AS recordId, staff_id AS staffId, priority AS priority, model_id AS modelId + id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, back_id AS backId, is_back AS isBack, type AS type, target AS target, key_result AS keyResult, key_result_3_5 AS keyResult35, key_result_3_7 AS keyResult37, check_weight AS checkWeight, check_result AS checkResult, super_score AS superScore, acquire_score AS acquireScore, score_comment AS scoreComment, record_id AS recordId, staff_id AS staffId, priority AS priority, model_id AS modelId @@ -40,6 +42,8 @@ insert into lz_result_detail( + back_id, + is_back, type, target, key_result, @@ -58,6 +62,8 @@ gmt_create, gmt_modified )values( + #{ backId}, + #{ isBack}, #{ type}, #{ target}, #{ keyResult}, @@ -85,6 +91,8 @@ is_delete = #{isDelete}, gmt_create = #{gmtCreate}, + back_id = #{backId}, + is_back = #{isBack}, type = #{type}, target = #{target}, key_result = #{keyResult}, @@ -111,6 +119,8 @@ set is_delete = #{isDelete}, gmt_create = #{gmtCreate}, + back_id = #{backId}, + is_back = #{isBack}, type = #{type}, target = #{target}, key_result = #{keyResult}, @@ -125,7 +135,7 @@ staff_id = #{staffId}, priority = #{priority}, model_id = #{modelId} - ,gmt_modified = now() + ,gmt_modified = now() where id = #{id} diff --git a/src/main/resources/mapper/flow/ResultScoreMapper.xml b/src/main/resources/mapper/flow/ResultScoreMapper.xml index ac8203bb..6689788a 100644 --- a/src/main/resources/mapper/flow/ResultScoreMapper.xml +++ b/src/main/resources/mapper/flow/ResultScoreMapper.xml @@ -13,12 +13,13 @@ + - id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, acquire_score AS acquireScore, detail_id AS detailId, approval_id AS approvalId, score_comment AS scoreComment, weight AS weight + id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, acquire_score AS acquireScore, detail_id AS detailId, approval_id AS approvalId, score_comment AS scoreComment, weight AS weight, score AS score @@ -36,6 +37,7 @@ approval_id, score_comment, weight, + score, is_delete, gmt_create, gmt_modified @@ -45,6 +47,7 @@ #{ approvalId}, #{ scoreComment}, #{ weight}, + #{ score}, 0, now(), now() @@ -62,7 +65,8 @@ detail_id = #{detailId}, approval_id = #{approvalId}, score_comment = #{scoreComment}, - weight = #{weight} + weight = #{weight}, + score = #{score} ,gmt_modified = now() where id = #{id} @@ -79,14 +83,15 @@ detail_id = #{detailId}, approval_id = #{approvalId}, score_comment = #{scoreComment}, - weight = #{weight} - ,gmt_modified = now() + weight = #{weight}, + score = #{score} + ,gmt_modified = now() where id = #{id} - update lz_result_score set is_delete = 1 where id=#{id} limit 1 + update lz_result_score set is_delete = 1 where id=#{id} limit 1 + select * from lz_print where id=#{id} and is_delete = 0 limit 1 + + + + + insert into lz_print( + url, + remark, + batch_no, + status, + image_url, + is_image, + is_print, + is_delete, + gmt_create, + gmt_modified + )values( + #{ url}, + #{ remark}, + #{ batchNo}, + #{ status}, + #{ imageUrl}, + #{ isImage}, + #{ isPrint}, + 0, + now(), + now() + ) + + + + + update + lz_print + + is_delete = #{isDelete}, + gmt_create = #{gmtCreate}, + url = #{url}, + remark = #{remark}, + batch_no = #{batchNo}, + status = #{status}, + image_url = #{imageUrl}, + is_image = #{isImage}, + is_print = #{isPrint} + + ,gmt_modified = now() + where id = #{id} + + + + + update + lz_print + set + is_delete = #{isDelete}, + gmt_create = #{gmtCreate}, + url = #{url}, + remark = #{remark}, + batch_no = #{batchNo}, + status = #{status}, + image_url = #{imageUrl}, + is_image = #{isImage}, + is_print = #{isPrint} + ,gmt_modified = now() + where id = #{id} + + + + + update lz_print set is_delete = 1 where id=#{id} limit 1 + + + + diff --git a/src/main/resources/mapper/sys/ResourceMapper.xml b/src/main/resources/mapper/sys/ResourceMapper.xml new file mode 100644 index 00000000..eb1f3c28 --- /dev/null +++ b/src/main/resources/mapper/sys/ResourceMapper.xml @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, creator AS creator, modifier AS modifier, data_type AS dataType, type AS type, sec_type AS secType, type_desc AS typeDesc, name AS name, value AS value, description AS description, value_1 AS value1, value_2 AS value2, value_3 AS value3, value_4 AS value4, sort AS sort + + + + + + + + + + insert into lz_resource( + creator, + modifier, + data_type, + type, + sec_type, + type_desc, + name, + value, + description, + value_1, + value_2, + value_3, + value_4, + sort, + is_delete, + gmt_create, + gmt_modified + )values( + #{ creator}, + #{ modifier}, + #{ dataType}, + #{ type}, + #{ secType}, + #{ typeDesc}, + #{ name}, + #{ value}, + #{ description}, + #{ value1}, + #{ value2}, + #{ value3}, + #{ value4}, + #{ sort}, + 0, + now(), + now() + ) + + + + + update + lz_resource + + is_delete = #{isDelete}, + gmt_create = #{gmtCreate}, + creator = #{creator}, + modifier = #{modifier}, + data_type = #{dataType}, + type = #{type}, + sec_type = #{secType}, + type_desc = #{typeDesc}, + name = #{name}, + value = #{value}, + description = #{description}, + value_1 = #{value1}, + value_2 = #{value2}, + value_3 = #{value3}, + value_4 = #{value4}, + sort = #{sort} + + ,gmt_modified = now() + where id = #{id} + + + + + update + lz_resource + set + is_delete = #{isDelete}, + gmt_create = #{gmtCreate}, + creator = #{creator}, + modifier = #{modifier}, + data_type = #{dataType}, + type = #{type}, + sec_type = #{secType}, + type_desc = #{typeDesc}, + name = #{name}, + value = #{value}, + description = #{description}, + value_1 = #{value1}, + value_2 = #{value2}, + value_3 = #{value3}, + value_4 = #{value4}, + sort = #{sort} + ,gmt_modified = now() + where id = #{id} + + + + + update lz_resource set is_delete = 1 where id=#{id} limit 1 + + + + diff --git a/src/test/java/com/lz/mysql/MysqlMain.java b/src/test/java/com/lz/mysql/MysqlMain.java index 9433eb0c..00ac715c 100644 --- a/src/test/java/com/lz/mysql/MysqlMain.java +++ b/src/test/java/com/lz/mysql/MysqlMain.java @@ -84,7 +84,8 @@ public class MysqlMain { List list = new ArrayList(); - list.add(new TablesBean("third_msg_send_record")); + list.add(new TablesBean("lz_resource")); + list.add(new TablesBean("lz_print")); List list2 = new ArrayList(); Map map = MysqlUtil2ShowCreateTable.getComments();