1.字段信息的查询、新增、修改、删除初步完成
2.字段内容的查询、新增、修改、删除初步完成
This commit is contained in:
parent
8d5d362ee7
commit
c07584dbd7
@ -134,15 +134,15 @@ public class Constants {
|
|||||||
public static final String[] JOB_ERROR_STR = {"java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml",
|
public static final String[] JOB_ERROR_STR = {"java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml",
|
||||||
"org.springframework", "org.apache", "com.xinelu.common.utils.file"};
|
"org.springframework", "org.apache", "com.xinelu.common.utils.file"};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 图片上传文件带.的
|
* 图片上传文件带.的
|
||||||
*/
|
*/
|
||||||
public static final String FILE_NAME_SPOT = ".";
|
public static final String FILE_NAME_SPOT = ".";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 字符串空格标识
|
* 字符串空格标识
|
||||||
*/
|
*/
|
||||||
public static final String EMPTY = " ";
|
public static final String EMPTY = " ";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Excel文件格式后缀
|
* Excel文件格式后缀
|
||||||
@ -168,4 +168,16 @@ public class Constants {
|
|||||||
* 科室信息导入标识
|
* 科室信息导入标识
|
||||||
*/
|
*/
|
||||||
public static final String DEPARTMENT = "department";
|
public static final String DEPARTMENT = "department";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 手术编号
|
||||||
|
*/
|
||||||
|
public static final String SURGERY_ENCODING = "SE";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务方式编码
|
||||||
|
*/
|
||||||
|
public static final String SERVICE_MODE_ENCODING = "SME";
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,29 @@
|
|||||||
|
package com.xinelu.common.constant;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字段标签信息字段类型
|
||||||
|
*
|
||||||
|
* @author : youxilong
|
||||||
|
* @date : 2024/3/11 10:19
|
||||||
|
*/
|
||||||
|
public class LabelFieldInfoFieldTypeConstants {
|
||||||
|
/**
|
||||||
|
* 画像标签字段
|
||||||
|
*/
|
||||||
|
public static final String PORTRAIT_LABEL_FIELD = "PORTRAIT_LABEL_FIELD";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 知识库字段
|
||||||
|
*/
|
||||||
|
public static final String KNOWLEDGE_FIELD = "KNOWLEDGE_FIELD";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字段信息编码前缀
|
||||||
|
*/
|
||||||
|
public static final String FIELD_ENCODING = "FE";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字段内容编码前缀
|
||||||
|
*/
|
||||||
|
public static final String CONTENT_ENCODING = "CE";
|
||||||
|
}
|
||||||
@ -0,0 +1,92 @@
|
|||||||
|
package com.xinelu.manage.controller.labelfieldcontent;
|
||||||
|
|
||||||
|
import com.xinelu.common.annotation.Log;
|
||||||
|
import com.xinelu.common.core.controller.BaseController;
|
||||||
|
import com.xinelu.common.core.domain.AjaxResult;
|
||||||
|
import com.xinelu.common.core.page.TableDataInfo;
|
||||||
|
import com.xinelu.common.enums.BusinessType;
|
||||||
|
import com.xinelu.common.utils.poi.ExcelUtil;
|
||||||
|
import com.xinelu.manage.domain.labelfieldcontent.LabelFieldContent;
|
||||||
|
import com.xinelu.manage.dto.labelfieldcontent.LabelFieldContentAddDTO;
|
||||||
|
import com.xinelu.manage.service.labelfieldcontent.ILabelFieldContentService;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标签字段内容信息Controller
|
||||||
|
*
|
||||||
|
* @author xinelu
|
||||||
|
* @date 2024-03-11
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/manage/labelfieldcontent")
|
||||||
|
public class LabelFieldContentController extends BaseController {
|
||||||
|
@Resource
|
||||||
|
private ILabelFieldContentService labelFieldContentService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询标签字段内容信息列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('manage:labelfieldcontent:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(LabelFieldContent labelFieldContent) {
|
||||||
|
startPage();
|
||||||
|
List<LabelFieldContent> list = labelFieldContentService.selectLabelFieldContentList(labelFieldContent);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出标签字段内容信息列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('manage:labelfieldcontent:export')")
|
||||||
|
@Log(title = "标签字段内容信息", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, LabelFieldContent labelFieldContent) {
|
||||||
|
List<LabelFieldContent> list = labelFieldContentService.selectLabelFieldContentList(labelFieldContent);
|
||||||
|
ExcelUtil<LabelFieldContent> util = new ExcelUtil<LabelFieldContent>(LabelFieldContent.class);
|
||||||
|
util.exportExcel(response, list, "标签字段内容信息数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取标签字段内容信息详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('manage:labelfieldcontent:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||||
|
return AjaxResult.success(labelFieldContentService.selectLabelFieldContentById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量新增标签字段内容信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('manage:labelfieldcontent:add')")
|
||||||
|
@Log(title = "标签字段内容信息", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping("/add")
|
||||||
|
public AjaxResult add(@RequestBody LabelFieldContentAddDTO labelFieldContentAddDTO) {
|
||||||
|
return toAjax(labelFieldContentService.insertLabelFieldContents(labelFieldContentAddDTO));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改标签字段内容信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('manage:labelfieldcontent:edit')")
|
||||||
|
@Log(title = "标签字段内容信息", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping("/edit")
|
||||||
|
public AjaxResult edit(@RequestBody LabelFieldContent labelFieldContent) {
|
||||||
|
return toAjax(labelFieldContentService.updateLabelFieldContent(labelFieldContent));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标签字段内容信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('manage:labelfieldcontent:remove')")
|
||||||
|
@Log(title = "标签字段内容信息", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||||
|
return toAjax(labelFieldContentService.deleteLabelFieldContentByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,101 @@
|
|||||||
|
package com.xinelu.manage.controller.labelfieldinfo;
|
||||||
|
|
||||||
|
import com.xinelu.common.annotation.Log;
|
||||||
|
import com.xinelu.common.core.controller.BaseController;
|
||||||
|
import com.xinelu.common.core.domain.AjaxResult;
|
||||||
|
import com.xinelu.common.core.page.TableDataInfo;
|
||||||
|
import com.xinelu.common.enums.BusinessType;
|
||||||
|
import com.xinelu.common.utils.poi.ExcelUtil;
|
||||||
|
import com.xinelu.manage.domain.labelfieldinfo.LabelFieldInfo;
|
||||||
|
import com.xinelu.manage.dto.labelfieldinfo.LabelFieldInfoAddDTO;
|
||||||
|
import com.xinelu.manage.service.labelfieldinfo.ILabelFieldInfoService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标签字段信息Controller
|
||||||
|
*
|
||||||
|
* @author xinelu
|
||||||
|
* @date 2024-03-11
|
||||||
|
*/
|
||||||
|
@Api(tags = "字段信息控制器")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/manage/labelfieldinfo")
|
||||||
|
public class LabelFieldInfoController extends BaseController {
|
||||||
|
@Resource
|
||||||
|
private ILabelFieldInfoService labelFieldInfoService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询标签字段信息列表
|
||||||
|
*/
|
||||||
|
@ApiOperation("查询标签字段信息列表")
|
||||||
|
@PreAuthorize("@ss.hasPermi('manage:labelfieldinfo:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(LabelFieldInfo labelFieldInfo) {
|
||||||
|
startPage();
|
||||||
|
List<LabelFieldInfo> list = labelFieldInfoService.selectLabelFieldInfoList(labelFieldInfo);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出标签字段信息列表
|
||||||
|
*/
|
||||||
|
@ApiOperation("导出标签字段信息列表")
|
||||||
|
@PreAuthorize("@ss.hasPermi('manage:labelfieldinfo:export')")
|
||||||
|
@Log(title = "标签字段信息", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, LabelFieldInfo labelFieldInfo) {
|
||||||
|
List<LabelFieldInfo> list = labelFieldInfoService.selectLabelFieldInfoList(labelFieldInfo);
|
||||||
|
ExcelUtil<LabelFieldInfo> util = new ExcelUtil<LabelFieldInfo>(LabelFieldInfo.class);
|
||||||
|
util.exportExcel(response, list, "标签字段信息数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取标签字段信息详细信息
|
||||||
|
*/
|
||||||
|
@ApiOperation("获取标签字段信息详细信息")
|
||||||
|
@PreAuthorize("@ss.hasPermi('manage:labelfieldinfo:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||||
|
return AjaxResult.success(labelFieldInfoService.selectLabelFieldInfoById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量新增标签字段信息
|
||||||
|
*/
|
||||||
|
@ApiOperation("批量新增标签字段信息")
|
||||||
|
@PreAuthorize("@ss.hasPermi('manage:labelfieldinfo:add')")
|
||||||
|
@Log(title = "标签字段信息", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping("/add")
|
||||||
|
public AjaxResult add(@RequestBody LabelFieldInfoAddDTO labelFieldInfoAddDTO) {
|
||||||
|
return toAjax(labelFieldInfoService.insertLabelFieldInfoList(labelFieldInfoAddDTO));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改标签字段信息
|
||||||
|
*/
|
||||||
|
@ApiOperation("修改标签字段信息")
|
||||||
|
@PreAuthorize("@ss.hasPermi('manage:labelfieldinfo:edit')")
|
||||||
|
@Log(title = "标签字段信息", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping("/edit")
|
||||||
|
public AjaxResult edit(@RequestBody LabelFieldInfo labelFieldInfo) {
|
||||||
|
return toAjax(labelFieldInfoService.updateLabelFieldInfo(labelFieldInfo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标签字段信息
|
||||||
|
*/
|
||||||
|
@ApiOperation("删除标签字段信息")
|
||||||
|
@PreAuthorize("@ss.hasPermi('manage:labelfieldinfo:remove')")
|
||||||
|
@Log(title = "标签字段信息", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||||
|
return toAjax(labelFieldInfoService.deleteLabelFieldInfoByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,89 @@
|
|||||||
|
package com.xinelu.manage.domain.labelfieldcontent;
|
||||||
|
|
||||||
|
import com.xinelu.common.annotation.Excel;
|
||||||
|
import com.xinelu.common.core.domain.BaseEntity;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标签字段内容信息对象 label_field_content
|
||||||
|
*
|
||||||
|
* @author xinelu
|
||||||
|
* @date 2024-03-11
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ApiModel(value = "标签字段内容信息对象", description = "label_field_content")
|
||||||
|
public class LabelFieldContent extends BaseEntity {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 画像标签和知识库字段表id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "画像标签和知识库字段表id")
|
||||||
|
@Excel(name = "画像标签和知识库字段表id")
|
||||||
|
private Long fieldId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字段名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "字段名称")
|
||||||
|
@Excel(name = "字段名称")
|
||||||
|
private String fieldName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 内容名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "内容名称")
|
||||||
|
@Excel(name = "内容名称")
|
||||||
|
private String contentName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 内容编码
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "内容编码")
|
||||||
|
@Excel(name = "内容编码")
|
||||||
|
private String contentCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结果预览
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "结果预览")
|
||||||
|
@Excel(name = "结果预览")
|
||||||
|
private String resultPreview;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 内容排序
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "内容排序")
|
||||||
|
@Excel(name = "内容排序")
|
||||||
|
private Integer contentSort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 内容备注信息
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "内容备注信息")
|
||||||
|
@Excel(name = "内容备注信息")
|
||||||
|
private String contentRemark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 画像字段标识,存储方式例子:${content}
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "画像字段标识,存储方式例子:${content}")
|
||||||
|
@Excel(name = "画像字段标识,存储方式例子:${content}")
|
||||||
|
private String fieldMark;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,73 @@
|
|||||||
|
package com.xinelu.manage.domain.labelfieldinfo;
|
||||||
|
|
||||||
|
import com.xinelu.common.annotation.Excel;
|
||||||
|
import com.xinelu.common.core.domain.BaseEntity;
|
||||||
|
import com.xinelu.common.custominterface.Insert;
|
||||||
|
import com.xinelu.common.custominterface.Update;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标签字段信息对象 label_field_info
|
||||||
|
*
|
||||||
|
* @author xinelu
|
||||||
|
* @date 2024-03-11
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ApiModel(value = "标签字段信息对象", description = "label_field_info")
|
||||||
|
public class LabelFieldInfo extends BaseEntity {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字段名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "字段名称")
|
||||||
|
@Excel(name = "字段名称")
|
||||||
|
@NotBlank(message = "字段名称不能为空", groups = {Insert.class, Update.class})
|
||||||
|
private String fieldName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字段编码
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "字段编码")
|
||||||
|
@Excel(name = "字段编码")
|
||||||
|
private String fieldCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字段类型,画像标签字段:PORTRAIT_LABEL_FIELD,知识库字段:KNOWLEDGE_FIELD
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "字段类型,画像标签字段:PORTRAIT_LABEL_FIELD,知识库字段:KNOWLEDGE_FIELD")
|
||||||
|
@Excel(name = "字段类型,画像标签字段:PORTRAIT_LABEL_FIELD,知识库字段:KNOWLEDGE_FIELD")
|
||||||
|
@NotBlank(message = "字段类型不能为空", groups = {Insert.class, Update.class})
|
||||||
|
private String fieldType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字段排序
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "字段排序")
|
||||||
|
@Excel(name = "字段排序")
|
||||||
|
private Integer fieldSort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字段备注信息
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "字段备注信息")
|
||||||
|
@Excel(name = "字段备注信息")
|
||||||
|
private String fieldRemark;
|
||||||
|
}
|
||||||
@ -0,0 +1,42 @@
|
|||||||
|
package com.xinelu.manage.dto.labelfieldcontent;
|
||||||
|
|
||||||
|
import com.xinelu.common.custominterface.Insert;
|
||||||
|
import com.xinelu.common.custominterface.Update;
|
||||||
|
import com.xinelu.manage.domain.labelfieldcontent.LabelFieldContent;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标签字段内容AddDTO
|
||||||
|
*
|
||||||
|
* @author : youxilong
|
||||||
|
* @date : 2024/3/11 17:09
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class LabelFieldContentAddDTO {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 画像标签和知识库字段表id
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "画像标签和知识库字段表id不能为空", groups = {Insert.class, Update.class})
|
||||||
|
@ApiModelProperty(value = "画像标签和知识库字段表id")
|
||||||
|
private Long fieldId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字段名称
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "字段名称不能为空", groups = {Insert.class, Update.class})
|
||||||
|
@ApiModelProperty(value = "字段名称")
|
||||||
|
private String fieldName;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标签字段内容对象集合
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "标签字段内容对象集合")
|
||||||
|
private List<LabelFieldContentDTO> fieldContentList;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,58 @@
|
|||||||
|
package com.xinelu.manage.dto.labelfieldcontent;
|
||||||
|
|
||||||
|
import com.xinelu.common.annotation.Excel;
|
||||||
|
import com.xinelu.common.core.domain.BaseEntity;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标签字段内容DTO
|
||||||
|
*
|
||||||
|
* @author : youxilong
|
||||||
|
* @date : 2024/3/11 17:20
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class LabelFieldContentDTO extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 内容名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "内容名称")
|
||||||
|
@Excel(name = "内容名称")
|
||||||
|
private String contentName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 内容编码
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "内容编码")
|
||||||
|
@Excel(name = "内容编码")
|
||||||
|
private String contentCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结果预览
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "结果预览")
|
||||||
|
@Excel(name = "结果预览")
|
||||||
|
private String resultPreview;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 内容排序
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "内容排序")
|
||||||
|
@Excel(name = "内容排序")
|
||||||
|
private Integer contentSort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 内容备注信息
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "内容备注信息")
|
||||||
|
@Excel(name = "内容备注信息")
|
||||||
|
private String contentRemark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 画像字段标识,存储方式例子:${content}
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "画像字段标识,存储方式例子:${content}")
|
||||||
|
@Excel(name = "画像字段标识,存储方式例子:${content}")
|
||||||
|
private String fieldMark;
|
||||||
|
}
|
||||||
@ -0,0 +1,22 @@
|
|||||||
|
package com.xinelu.manage.dto.labelfieldinfo;
|
||||||
|
|
||||||
|
import com.xinelu.manage.domain.labelfieldinfo.LabelFieldInfo;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标签字段信息AddDTO
|
||||||
|
* @author : youxilong
|
||||||
|
* @date : 2024/3/11 13:05
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class LabelFieldInfoAddDTO {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标签字段信息对象集合
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "标签字段信息对象集合")
|
||||||
|
private List<LabelFieldInfo> labelFieldInfoList;
|
||||||
|
}
|
||||||
@ -136,6 +136,8 @@ public class ServicePackageAddDTO {
|
|||||||
@Excel(name = "是否发布,0:否,1:是")
|
@Excel(name = "是否发布,0:否,1:是")
|
||||||
private Integer whetherRelease;
|
private Integer whetherRelease;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 服务内容列表
|
* 服务内容列表
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -1,12 +1,16 @@
|
|||||||
package com.xinelu.manage.dto.servicewaycontent;
|
package com.xinelu.manage.dto.servicewaycontent;
|
||||||
|
|
||||||
import com.xinelu.common.annotation.Excel;
|
import com.xinelu.common.annotation.Excel;
|
||||||
|
import com.xinelu.common.custominterface.Insert;
|
||||||
|
import com.xinelu.common.custominterface.Update;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author : youxilong
|
* @author : youxilong
|
||||||
* @date : 2024/3/1 14:52
|
* @date : 2024/3/1 14:52
|
||||||
@ -27,6 +31,7 @@ public class ServiceWayContentAddDTO {
|
|||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "服务内容")
|
@ApiModelProperty(value = "服务内容")
|
||||||
@Excel(name = "服务内容")
|
@Excel(name = "服务内容")
|
||||||
|
@NotBlank(message = "服务内容不能为空", groups = {Insert.class, Update.class})
|
||||||
private String serviceContent;
|
private String serviceContent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -56,4 +61,11 @@ public class ServiceWayContentAddDTO {
|
|||||||
@ApiModelProperty(value = "服务频次数字结束值")
|
@ApiModelProperty(value = "服务频次数字结束值")
|
||||||
@Excel(name = "服务频次数字结束值")
|
@Excel(name = "服务频次数字结束值")
|
||||||
private Integer serviceFrequencyEnd;
|
private Integer serviceFrequencyEnd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排序
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "排序")
|
||||||
|
@Excel(name = "排序")
|
||||||
|
private Integer serviceSort;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,81 @@
|
|||||||
|
package com.xinelu.manage.mapper.labelfieldcontent;
|
||||||
|
|
||||||
|
import com.xinelu.manage.domain.labelfieldcontent.LabelFieldContent;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标签字段内容信息Mapper接口
|
||||||
|
*
|
||||||
|
* @author xinelu
|
||||||
|
* @date 2024-03-11
|
||||||
|
*/
|
||||||
|
public interface LabelFieldContentMapper {
|
||||||
|
/**
|
||||||
|
* 查询标签字段内容信息
|
||||||
|
*
|
||||||
|
* @param id 标签字段内容信息主键
|
||||||
|
* @return 标签字段内容信息
|
||||||
|
*/
|
||||||
|
public LabelFieldContent selectLabelFieldContentById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询标签字段内容信息列表
|
||||||
|
*
|
||||||
|
* @param labelFieldContent 标签字段内容信息
|
||||||
|
* @return 标签字段内容信息集合
|
||||||
|
*/
|
||||||
|
public List<LabelFieldContent> selectLabelFieldContentList(LabelFieldContent labelFieldContent);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增标签字段内容信息
|
||||||
|
*
|
||||||
|
* @param labelFieldContent 标签字段内容信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertLabelFieldContent(LabelFieldContent labelFieldContent);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改标签字段内容信息
|
||||||
|
*
|
||||||
|
* @param labelFieldContent 标签字段内容信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateLabelFieldContent(LabelFieldContent labelFieldContent);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标签字段内容信息
|
||||||
|
*
|
||||||
|
* @param id 标签字段内容信息主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteLabelFieldContentById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除标签字段内容信息
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteLabelFieldContentByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查数据库中同一个fieldId下内容名称的重复性
|
||||||
|
*
|
||||||
|
* @param fieldId
|
||||||
|
* @param contentName
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int existCountByFieldIdAndContentName(@Param("fieldId") Long fieldId, @Param("contentName") String contentName);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查除去当前记录外有没有重复内容名称
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @param fieldId
|
||||||
|
* @param contentName
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int existCountByContentNameExcludingId(@Param("id") Long id, @Param("fieldId") Long fieldId, @Param("contentName") String contentName);
|
||||||
|
}
|
||||||
@ -0,0 +1,81 @@
|
|||||||
|
package com.xinelu.manage.mapper.labelfieldinfo;
|
||||||
|
|
||||||
|
import com.xinelu.manage.domain.labelfieldinfo.LabelFieldInfo;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标签字段信息Mapper接口
|
||||||
|
*
|
||||||
|
* @author xinelu
|
||||||
|
* @date 2024-03-11
|
||||||
|
*/
|
||||||
|
public interface LabelFieldInfoMapper {
|
||||||
|
/**
|
||||||
|
* 查询标签字段信息
|
||||||
|
*
|
||||||
|
* @param id 标签字段信息主键
|
||||||
|
* @return 标签字段信息
|
||||||
|
*/
|
||||||
|
public LabelFieldInfo selectLabelFieldInfoById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询标签字段信息列表
|
||||||
|
*
|
||||||
|
* @param labelFieldInfo 标签字段信息
|
||||||
|
* @return 标签字段信息集合
|
||||||
|
*/
|
||||||
|
public List<LabelFieldInfo> selectLabelFieldInfoList(LabelFieldInfo labelFieldInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增标签字段信息
|
||||||
|
*
|
||||||
|
* @param labelFieldInfo 标签字段信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertLabelFieldInfo(LabelFieldInfo labelFieldInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改标签字段信息
|
||||||
|
*
|
||||||
|
* @param labelFieldInfo 标签字段信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateLabelFieldInfo(LabelFieldInfo labelFieldInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标签字段信息
|
||||||
|
*
|
||||||
|
* @param id 标签字段信息主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteLabelFieldInfoById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除标签字段信息
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteLabelFieldInfoByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查同类型下有没有重复字段名称
|
||||||
|
*
|
||||||
|
* @param fieldType
|
||||||
|
* @param fieldNames
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int countDuplicateFieldNamesByType(@Param("fieldType") String fieldType, @Param("fieldNames") List<String> fieldNames);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查除当前记录外有没有同名的字段信息名称
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @param fieldType
|
||||||
|
* @param fieldName
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int countByFieldNameExcludingId(@Param("id") Long id, @Param("fieldType") String fieldType, @Param("fieldName") String fieldName);
|
||||||
|
}
|
||||||
@ -0,0 +1,69 @@
|
|||||||
|
package com.xinelu.manage.service.labelfieldcontent;
|
||||||
|
|
||||||
|
import com.xinelu.manage.domain.labelfieldcontent.LabelFieldContent;
|
||||||
|
import com.xinelu.manage.dto.labelfieldcontent.LabelFieldContentAddDTO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标签字段内容信息Service接口
|
||||||
|
*
|
||||||
|
* @author xinelu
|
||||||
|
* @date 2024-03-11
|
||||||
|
*/
|
||||||
|
public interface ILabelFieldContentService {
|
||||||
|
/**
|
||||||
|
* 查询标签字段内容信息
|
||||||
|
*
|
||||||
|
* @param id 标签字段内容信息主键
|
||||||
|
* @return 标签字段内容信息
|
||||||
|
*/
|
||||||
|
public LabelFieldContent selectLabelFieldContentById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询标签字段内容信息列表
|
||||||
|
*
|
||||||
|
* @param labelFieldContent 标签字段内容信息
|
||||||
|
* @return 标签字段内容信息集合
|
||||||
|
*/
|
||||||
|
public List<LabelFieldContent> selectLabelFieldContentList(LabelFieldContent labelFieldContent);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增标签字段内容信息
|
||||||
|
*
|
||||||
|
* @param labelFieldContent 标签字段内容信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertLabelFieldContent(LabelFieldContent labelFieldContent);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改标签字段内容信息
|
||||||
|
*
|
||||||
|
* @param labelFieldContent 标签字段内容信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateLabelFieldContent(LabelFieldContent labelFieldContent);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除标签字段内容信息
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的标签字段内容信息主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteLabelFieldContentByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标签字段内容信息
|
||||||
|
*
|
||||||
|
* @param id 标签字段内容信息主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteLabelFieldContentById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量新增标签字段内容信息
|
||||||
|
* @param labelFieldContentAddDTO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int insertLabelFieldContents(LabelFieldContentAddDTO labelFieldContentAddDTO);
|
||||||
|
}
|
||||||
@ -0,0 +1,143 @@
|
|||||||
|
package com.xinelu.manage.service.labelfieldcontent.impl;
|
||||||
|
|
||||||
|
import com.xinelu.common.constant.LabelFieldInfoFieldTypeConstants;
|
||||||
|
import com.xinelu.common.exception.ServiceException;
|
||||||
|
import com.xinelu.common.utils.DateUtils;
|
||||||
|
import com.xinelu.common.utils.SecurityUtils;
|
||||||
|
import com.xinelu.common.utils.bean.BeanUtils;
|
||||||
|
import com.xinelu.common.utils.codes.GenerateSystemCodeUtil;
|
||||||
|
import com.xinelu.manage.domain.labelfieldcontent.LabelFieldContent;
|
||||||
|
import com.xinelu.manage.dto.labelfieldcontent.LabelFieldContentAddDTO;
|
||||||
|
import com.xinelu.manage.dto.labelfieldcontent.LabelFieldContentDTO;
|
||||||
|
import com.xinelu.manage.mapper.labelfieldcontent.LabelFieldContentMapper;
|
||||||
|
import com.xinelu.manage.service.labelfieldcontent.ILabelFieldContentService;
|
||||||
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标签字段内容信息Service业务层处理
|
||||||
|
*
|
||||||
|
* @author xinelu
|
||||||
|
* @date 2024-03-11
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class LabelFieldContentServiceImpl implements ILabelFieldContentService {
|
||||||
|
@Resource
|
||||||
|
private LabelFieldContentMapper labelFieldContentMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private GenerateSystemCodeUtil systemCodeUtil;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询标签字段内容信息
|
||||||
|
*
|
||||||
|
* @param id 标签字段内容信息主键
|
||||||
|
* @return 标签字段内容信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public LabelFieldContent selectLabelFieldContentById(Long id) {
|
||||||
|
return labelFieldContentMapper.selectLabelFieldContentById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询标签字段内容信息列表
|
||||||
|
*
|
||||||
|
* @param labelFieldContent 标签字段内容信息
|
||||||
|
* @return 标签字段内容信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<LabelFieldContent> selectLabelFieldContentList(LabelFieldContent labelFieldContent) {
|
||||||
|
return labelFieldContentMapper.selectLabelFieldContentList(labelFieldContent);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增标签字段内容信息
|
||||||
|
*
|
||||||
|
* @param labelFieldContent 标签字段内容信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertLabelFieldContent(LabelFieldContent labelFieldContent) {
|
||||||
|
labelFieldContent.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return labelFieldContentMapper.insertLabelFieldContent(labelFieldContent);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改标签字段内容信息
|
||||||
|
*
|
||||||
|
* @param labelFieldContent 标签字段内容信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateLabelFieldContent(LabelFieldContent labelFieldContent) {
|
||||||
|
if (ObjectUtils.isEmpty(labelFieldContentMapper.selectLabelFieldContentById(labelFieldContent.getId()))) {
|
||||||
|
throw new ServiceException("当前字段内容不存在,无法修改,请联系管理员");
|
||||||
|
}
|
||||||
|
// 检查除去当前记录外有没有重复内容名称
|
||||||
|
int existCount = labelFieldContentMapper.existCountByContentNameExcludingId(labelFieldContent.getId(), labelFieldContent.getFieldId(), labelFieldContent.getContentName());
|
||||||
|
if (existCount > 0) {
|
||||||
|
throw new ServiceException("当前标签字段类型下字段内容名称已存在");
|
||||||
|
}
|
||||||
|
labelFieldContent.setUpdateBy(SecurityUtils.getUsername());
|
||||||
|
labelFieldContent.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return labelFieldContentMapper.updateLabelFieldContent(labelFieldContent);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除标签字段内容信息
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的标签字段内容信息主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteLabelFieldContentByIds(Long[] ids) {
|
||||||
|
return labelFieldContentMapper.deleteLabelFieldContentByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标签字段内容信息信息
|
||||||
|
*
|
||||||
|
* @param id 标签字段内容信息主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteLabelFieldContentById(Long id) {
|
||||||
|
return labelFieldContentMapper.deleteLabelFieldContentById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量新增标签字段内容信息
|
||||||
|
*
|
||||||
|
* @param labelFieldContentAddDTO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertLabelFieldContents(LabelFieldContentAddDTO labelFieldContentAddDTO) {
|
||||||
|
// 获取到标签字段内容信息集合
|
||||||
|
List<LabelFieldContentDTO> fieldContentList = labelFieldContentAddDTO.getFieldContentList();
|
||||||
|
// 获取到标签字段信息Id
|
||||||
|
Long fieldId = labelFieldContentAddDTO.getFieldId();
|
||||||
|
// 检查数据库中同一个fieldId下内容名称的重复性
|
||||||
|
for (LabelFieldContentDTO contentDTO : fieldContentList) {
|
||||||
|
// 如果存在,报错-已存在字段内容名称
|
||||||
|
if (labelFieldContentMapper.existCountByFieldIdAndContentName(fieldId, contentDTO.getContentName()) > 0) {
|
||||||
|
throw new ServiceException("当前标签字段类型下字段内容名称已存在");
|
||||||
|
}
|
||||||
|
// 不存在,执行新增
|
||||||
|
LabelFieldContent labelFieldContent = new LabelFieldContent();
|
||||||
|
BeanUtils.copyProperties(contentDTO, labelFieldContent);
|
||||||
|
labelFieldContent.setFieldId(labelFieldContentAddDTO.getFieldId());
|
||||||
|
labelFieldContent.setFieldName(labelFieldContentAddDTO.getFieldName());
|
||||||
|
labelFieldContent.setContentCode(LabelFieldInfoFieldTypeConstants.CONTENT_ENCODING + systemCodeUtil.generateDepartCode(LabelFieldInfoFieldTypeConstants.CONTENT_ENCODING));
|
||||||
|
labelFieldContent.setCreateBy(SecurityUtils.getUsername());
|
||||||
|
labelFieldContent.setCreateTime(DateUtils.getNowDate());
|
||||||
|
if (labelFieldContentMapper.insertLabelFieldContent(labelFieldContent) <= 0) {
|
||||||
|
throw new ServiceException("新增标签字段内容信息失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,70 @@
|
|||||||
|
package com.xinelu.manage.service.labelfieldinfo;
|
||||||
|
|
||||||
|
import com.xinelu.manage.domain.labelfieldinfo.LabelFieldInfo;
|
||||||
|
import com.xinelu.manage.dto.labelfieldinfo.LabelFieldInfoAddDTO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标签字段信息Service接口
|
||||||
|
*
|
||||||
|
* @author xinelu
|
||||||
|
* @date 2024-03-11
|
||||||
|
*/
|
||||||
|
public interface ILabelFieldInfoService {
|
||||||
|
/**
|
||||||
|
* 查询标签字段信息
|
||||||
|
*
|
||||||
|
* @param id 标签字段信息主键
|
||||||
|
* @return 标签字段信息
|
||||||
|
*/
|
||||||
|
public LabelFieldInfo selectLabelFieldInfoById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询标签字段信息列表
|
||||||
|
*
|
||||||
|
* @param labelFieldInfo 标签字段信息
|
||||||
|
* @return 标签字段信息集合
|
||||||
|
*/
|
||||||
|
public List<LabelFieldInfo> selectLabelFieldInfoList(LabelFieldInfo labelFieldInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增标签字段信息
|
||||||
|
*
|
||||||
|
* @param labelFieldInfo 标签字段信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertLabelFieldInfo(LabelFieldInfo labelFieldInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改标签字段信息
|
||||||
|
*
|
||||||
|
* @param labelFieldInfo 标签字段信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateLabelFieldInfo(LabelFieldInfo labelFieldInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除标签字段信息
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的标签字段信息主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteLabelFieldInfoByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标签字段信息信息
|
||||||
|
*
|
||||||
|
* @param id 标签字段信息主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteLabelFieldInfoById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量新增标签字段信息
|
||||||
|
* @param labelFieldInfoAddDTO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int insertLabelFieldInfoList(LabelFieldInfoAddDTO labelFieldInfoAddDTO);
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,157 @@
|
|||||||
|
package com.xinelu.manage.service.labelfieldinfo.impl;
|
||||||
|
|
||||||
|
import com.xinelu.common.constant.LabelFieldInfoFieldTypeConstants;
|
||||||
|
import com.xinelu.common.exception.ServiceException;
|
||||||
|
import com.xinelu.common.utils.DateUtils;
|
||||||
|
import com.xinelu.common.utils.SecurityUtils;
|
||||||
|
import com.xinelu.common.utils.codes.GenerateSystemCodeUtil;
|
||||||
|
import com.xinelu.manage.domain.labelfieldinfo.LabelFieldInfo;
|
||||||
|
import com.xinelu.manage.dto.labelfieldinfo.LabelFieldInfoAddDTO;
|
||||||
|
import com.xinelu.manage.mapper.labelfieldinfo.LabelFieldInfoMapper;
|
||||||
|
import com.xinelu.manage.service.labelfieldinfo.ILabelFieldInfoService;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标签字段信息Service业务层处理
|
||||||
|
*
|
||||||
|
* @author xinelu
|
||||||
|
* @date 2024-03-11
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class LabelFieldInfoServiceImpl implements ILabelFieldInfoService {
|
||||||
|
@Resource
|
||||||
|
private LabelFieldInfoMapper labelFieldInfoMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private GenerateSystemCodeUtil systemCodeUtil;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询标签字段信息
|
||||||
|
*
|
||||||
|
* @param id 标签字段信息主键
|
||||||
|
* @return 标签字段信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public LabelFieldInfo selectLabelFieldInfoById(Long id) {
|
||||||
|
return labelFieldInfoMapper.selectLabelFieldInfoById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询标签字段信息列表
|
||||||
|
*
|
||||||
|
* @param labelFieldInfo 标签字段信息
|
||||||
|
* @return 标签字段信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<LabelFieldInfo> selectLabelFieldInfoList(LabelFieldInfo labelFieldInfo) {
|
||||||
|
return labelFieldInfoMapper.selectLabelFieldInfoList(labelFieldInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增标签字段信息
|
||||||
|
*
|
||||||
|
* @param labelFieldInfo 标签字段信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertLabelFieldInfo(LabelFieldInfo labelFieldInfo) {
|
||||||
|
labelFieldInfo.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return labelFieldInfoMapper.insertLabelFieldInfo(labelFieldInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改标签字段信息
|
||||||
|
*
|
||||||
|
* @param labelFieldInfo 标签字段信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
@Override
|
||||||
|
public int updateLabelFieldInfo(LabelFieldInfo labelFieldInfo) {
|
||||||
|
// 检查id对应的标签信息是否存在
|
||||||
|
LabelFieldInfo fieldInfo = labelFieldInfoMapper.selectLabelFieldInfoById(labelFieldInfo.getId());
|
||||||
|
if (ObjectUtils.isEmpty(fieldInfo)) {
|
||||||
|
throw new ServiceException("当前标签信息不存在,无法修改,请联系管理员");
|
||||||
|
}
|
||||||
|
// 检查除当前记录外有没有重复的标签信息名称
|
||||||
|
if (labelFieldInfoMapper.countByFieldNameExcludingId(labelFieldInfo.getId(), labelFieldInfo.getFieldType(), labelFieldInfo.getFieldName()) > 0) {
|
||||||
|
throw new ServiceException("当前字段类型下字段名称已存在");
|
||||||
|
}
|
||||||
|
// 执行修改操作
|
||||||
|
labelFieldInfo.setUpdateBy(SecurityUtils.getUsername());
|
||||||
|
labelFieldInfo.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return labelFieldInfoMapper.updateLabelFieldInfo(labelFieldInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除标签字段信息
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的标签字段信息主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteLabelFieldInfoByIds(Long[] ids) {
|
||||||
|
return labelFieldInfoMapper.deleteLabelFieldInfoByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标签字段信息信息
|
||||||
|
*
|
||||||
|
* @param id 标签字段信息主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteLabelFieldInfoById(Long id) {
|
||||||
|
return labelFieldInfoMapper.deleteLabelFieldInfoById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量新增标签字段信息
|
||||||
|
*
|
||||||
|
* @param labelFieldInfoAddDTO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
@Override
|
||||||
|
public int insertLabelFieldInfoList(LabelFieldInfoAddDTO labelFieldInfoAddDTO) {
|
||||||
|
// 如果对象为空,提示请填加标签字段信息
|
||||||
|
List<LabelFieldInfo> fieldInfoList = labelFieldInfoAddDTO.getLabelFieldInfoList();
|
||||||
|
if (CollectionUtils.isEmpty(fieldInfoList)) {
|
||||||
|
throw new ServiceException("请填加标签字段信息");
|
||||||
|
}
|
||||||
|
// 如果不为空,按字段类型分组并且收集每个类型下的字段名称
|
||||||
|
Map<String, List<String>> fieldTypeToNamesMap = fieldInfoList.stream().
|
||||||
|
collect(Collectors.groupingBy(LabelFieldInfo::getFieldType,
|
||||||
|
Collectors.mapping(LabelFieldInfo::getFieldName, Collectors.toList())));
|
||||||
|
// 对于每个字段类型下字段名称进行重复性检查
|
||||||
|
for (Map.Entry<String, List<String>> entry : fieldTypeToNamesMap.entrySet()) {
|
||||||
|
// 获取字段类型和字段名称集合
|
||||||
|
String fieldType = entry.getKey();
|
||||||
|
List<String> fieldNames = entry.getValue();
|
||||||
|
// 查询数据库中是否存在同字段类型下字段名称
|
||||||
|
int duplicateCount = labelFieldInfoMapper.countDuplicateFieldNamesByType(fieldType, fieldNames);
|
||||||
|
// 如果存在,提示该字段类型下已存在
|
||||||
|
if (duplicateCount > 0) {
|
||||||
|
throw new ServiceException("当前字段类型下字段名称已存在");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 如果不存在,执行新增操作
|
||||||
|
for (LabelFieldInfo labelFieldInfo : fieldInfoList) {
|
||||||
|
labelFieldInfo.setFieldCode(LabelFieldInfoFieldTypeConstants.FIELD_ENCODING + systemCodeUtil.generateDepartCode(LabelFieldInfoFieldTypeConstants.FIELD_ENCODING));
|
||||||
|
labelFieldInfo.setCreateBy(SecurityUtils.getUsername());
|
||||||
|
labelFieldInfo.setCreateTime(DateUtils.getNowDate());
|
||||||
|
if (labelFieldInfoMapper.insertLabelFieldInfo(labelFieldInfo) <= 0) {
|
||||||
|
throw new ServiceException("新增标签字段信息失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,9 +1,10 @@
|
|||||||
package com.xinelu.manage.service.operationInfo.impl;
|
package com.xinelu.manage.service.operationInfo.impl;
|
||||||
|
|
||||||
|
import com.xinelu.common.constant.Constants;
|
||||||
import com.xinelu.common.exception.ServiceException;
|
import com.xinelu.common.exception.ServiceException;
|
||||||
import com.xinelu.common.utils.DateUtils;
|
import com.xinelu.common.utils.DateUtils;
|
||||||
import com.xinelu.common.utils.SecurityUtils;
|
import com.xinelu.common.utils.SecurityUtils;
|
||||||
import com.xinelu.common.utils.StringUtils;
|
import com.xinelu.common.utils.codes.GenerateSystemCodeUtil;
|
||||||
import com.xinelu.manage.domain.operationInfo.OperationInfo;
|
import com.xinelu.manage.domain.operationInfo.OperationInfo;
|
||||||
import com.xinelu.manage.mapper.operationInfo.OperationInfoMapper;
|
import com.xinelu.manage.mapper.operationInfo.OperationInfoMapper;
|
||||||
import com.xinelu.manage.service.operationInfo.IOperationInfoService;
|
import com.xinelu.manage.service.operationInfo.IOperationInfoService;
|
||||||
@ -24,6 +25,9 @@ public class OperationInfoServiceImpl implements IOperationInfoService {
|
|||||||
@Resource
|
@Resource
|
||||||
private OperationInfoMapper operationInfoMapper;
|
private OperationInfoMapper operationInfoMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private GenerateSystemCodeUtil systemCodeUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询手术信息
|
* 查询手术信息
|
||||||
*
|
*
|
||||||
@ -61,6 +65,7 @@ public class OperationInfoServiceImpl implements IOperationInfoService {
|
|||||||
throw new ServiceException("手术名称已存在");
|
throw new ServiceException("手术名称已存在");
|
||||||
}
|
}
|
||||||
// 设置创建人、创建时间
|
// 设置创建人、创建时间
|
||||||
|
operationInfo.setOperationCode(Constants.SURGERY_ENCODING + systemCodeUtil.generateDepartCode(Constants.SURGERY_ENCODING));
|
||||||
operationInfo.setCreateBy(SecurityUtils.getUsername());
|
operationInfo.setCreateBy(SecurityUtils.getUsername());
|
||||||
operationInfo.setCreateTime(DateUtils.getNowDate());
|
operationInfo.setCreateTime(DateUtils.getNowDate());
|
||||||
return operationInfoMapper.insertOperationInfo(operationInfo);
|
return operationInfoMapper.insertOperationInfo(operationInfo);
|
||||||
|
|||||||
@ -4,9 +4,6 @@ import com.xinelu.common.core.page.TableDataInfo;
|
|||||||
import com.xinelu.manage.domain.servicepackage.ServicePackage;
|
import com.xinelu.manage.domain.servicepackage.ServicePackage;
|
||||||
import com.xinelu.manage.dto.servicepackage.ServicePackageAddDTO;
|
import com.xinelu.manage.dto.servicepackage.ServicePackageAddDTO;
|
||||||
import com.xinelu.manage.vo.servicepackage.ServicePackageDetailVO;
|
import com.xinelu.manage.vo.servicepackage.ServicePackageDetailVO;
|
||||||
import com.xinelu.manage.vo.servicepackage.ServicePackageVO;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 服务包基础信息Service接口
|
* 服务包基础信息Service接口
|
||||||
|
|||||||
@ -1,11 +1,13 @@
|
|||||||
package com.xinelu.manage.service.servicepackage.impl;
|
package com.xinelu.manage.service.servicepackage.impl;
|
||||||
|
|
||||||
|
import com.xinelu.common.constant.Constants;
|
||||||
import com.xinelu.common.core.page.TableDataInfo;
|
import com.xinelu.common.core.page.TableDataInfo;
|
||||||
import com.xinelu.common.exception.ServiceException;
|
import com.xinelu.common.exception.ServiceException;
|
||||||
import com.xinelu.common.utils.DateUtils;
|
import com.xinelu.common.utils.DateUtils;
|
||||||
import com.xinelu.common.utils.PageServiceUtil;
|
import com.xinelu.common.utils.PageServiceUtil;
|
||||||
import com.xinelu.common.utils.SecurityUtils;
|
import com.xinelu.common.utils.SecurityUtils;
|
||||||
import com.xinelu.common.utils.bean.BeanUtils;
|
import com.xinelu.common.utils.bean.BeanUtils;
|
||||||
|
import com.xinelu.common.utils.codes.GenerateSystemCodeUtil;
|
||||||
import com.xinelu.manage.domain.servicepackage.ServicePackage;
|
import com.xinelu.manage.domain.servicepackage.ServicePackage;
|
||||||
import com.xinelu.manage.domain.servicepackagecontent.ServicePackageContent;
|
import com.xinelu.manage.domain.servicepackagecontent.ServicePackageContent;
|
||||||
import com.xinelu.manage.dto.servicepackage.ServicePackageAddDTO;
|
import com.xinelu.manage.dto.servicepackage.ServicePackageAddDTO;
|
||||||
@ -40,6 +42,9 @@ public class ServicePackageServiceImpl implements IServicePackageService {
|
|||||||
@Resource
|
@Resource
|
||||||
private PageServiceUtil pageServiceUtil;
|
private PageServiceUtil pageServiceUtil;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private GenerateSystemCodeUtil systemCodeUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询服务包基础信息
|
* 查询服务包基础信息
|
||||||
*
|
*
|
||||||
@ -152,6 +157,7 @@ public class ServicePackageServiceImpl implements IServicePackageService {
|
|||||||
Long serviceWayId = servicePackageContentMapper.countByPackageIdAndServiceWayName(servicePackage.getId(), vo.getServiceWayName());
|
Long serviceWayId = servicePackageContentMapper.countByPackageIdAndServiceWayName(servicePackage.getId(), vo.getServiceWayName());
|
||||||
if (serviceWayId == null) {
|
if (serviceWayId == null) {
|
||||||
ServicePackageContent serviceWay = new ServicePackageContent();
|
ServicePackageContent serviceWay = new ServicePackageContent();
|
||||||
|
serviceWay.setServiceWayCode(Constants.SERVICE_MODE_ENCODING + systemCodeUtil.generateDepartCode(Constants.SERVICE_MODE_ENCODING));
|
||||||
serviceWay.setServicePackageId(servicePackage.getId());
|
serviceWay.setServicePackageId(servicePackage.getId());
|
||||||
serviceWay.setServiceWayName(vo.getServiceWayName());
|
serviceWay.setServiceWayName(vo.getServiceWayName());
|
||||||
serviceWay.setCreateBy(username);
|
serviceWay.setCreateBy(username);
|
||||||
|
|||||||
@ -1,10 +1,12 @@
|
|||||||
package com.xinelu.manage.service.servicewaycontent.impl;
|
package com.xinelu.manage.service.servicewaycontent.impl;
|
||||||
|
|
||||||
|
import com.xinelu.common.constant.Constants;
|
||||||
import com.xinelu.common.enums.ServiceWayContentServiceType;
|
import com.xinelu.common.enums.ServiceWayContentServiceType;
|
||||||
import com.xinelu.common.exception.ServiceException;
|
import com.xinelu.common.exception.ServiceException;
|
||||||
import com.xinelu.common.utils.DateUtils;
|
import com.xinelu.common.utils.DateUtils;
|
||||||
import com.xinelu.common.utils.SecurityUtils;
|
import com.xinelu.common.utils.SecurityUtils;
|
||||||
import com.xinelu.common.utils.bean.BeanUtils;
|
import com.xinelu.common.utils.bean.BeanUtils;
|
||||||
|
import com.xinelu.common.utils.codes.GenerateSystemCodeUtil;
|
||||||
import com.xinelu.manage.domain.servicewaycontent.ServiceWayContent;
|
import com.xinelu.manage.domain.servicewaycontent.ServiceWayContent;
|
||||||
import com.xinelu.manage.dto.servicefrequency.ServiceFrequencyDTO;
|
import com.xinelu.manage.dto.servicefrequency.ServiceFrequencyDTO;
|
||||||
import com.xinelu.manage.dto.servicewaycontent.ServiceWayContentAddDTO;
|
import com.xinelu.manage.dto.servicewaycontent.ServiceWayContentAddDTO;
|
||||||
@ -37,7 +39,7 @@ public class ServiceWayContentServiceImpl implements IServiceWayContentService {
|
|||||||
private ServiceWayContentMapper serviceWayContentMapper;
|
private ServiceWayContentMapper serviceWayContentMapper;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private SysDictDataMapper sysDictDataMapper;
|
private GenerateSystemCodeUtil systemCodeUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询服务方式内容
|
* 查询服务方式内容
|
||||||
@ -118,6 +120,7 @@ public class ServiceWayContentServiceImpl implements IServiceWayContentService {
|
|||||||
serviceFrequency.setServiceFrequencyEnd(serviceWayContentAddDTO.getServiceFrequencyEnd());
|
serviceFrequency.setServiceFrequencyEnd(serviceWayContentAddDTO.getServiceFrequencyEnd());
|
||||||
serviceFrequency.setCreateBy(username);
|
serviceFrequency.setCreateBy(username);
|
||||||
serviceFrequency.setCreateTime(date);
|
serviceFrequency.setCreateTime(date);
|
||||||
|
serviceFrequency.setServiceSort(serviceWayContentAddDTO.getServiceSort());
|
||||||
if (serviceWayContentMapper.insertServiceWayContent(serviceFrequency) <= 0) {
|
if (serviceWayContentMapper.insertServiceWayContent(serviceFrequency) <= 0) {
|
||||||
throw new ServiceException("新增服务频次失败");
|
throw new ServiceException("新增服务频次失败");
|
||||||
}
|
}
|
||||||
@ -253,9 +256,7 @@ public class ServiceWayContentServiceImpl implements IServiceWayContentService {
|
|||||||
throw new ServiceException("服务方式名称已存在");
|
throw new ServiceException("服务方式名称已存在");
|
||||||
}
|
}
|
||||||
// 如果不存在,执行新增功能
|
// 如果不存在,执行新增功能
|
||||||
Long dictCodeByName = sysDictDataMapper.selectDictCodeByName(serviceWayContent.getServiceWayName());
|
serviceWayContent.setServiceWayCode(Constants.SERVICE_MODE_ENCODING + systemCodeUtil.generateDepartCode(Constants.SERVICE_MODE_ENCODING));
|
||||||
String serviceWayCode = (dictCodeByName != null) ? dictCodeByName.toString() : null;
|
|
||||||
serviceWayContent.setServiceWayCode(serviceWayCode);
|
|
||||||
serviceWayContent.setServiceType(ServiceWayContentServiceType.SERVICE_WRY.toString());
|
serviceWayContent.setServiceType(ServiceWayContentServiceType.SERVICE_WRY.toString());
|
||||||
serviceWayContent.setCreateBy(SecurityUtils.getUsername());
|
serviceWayContent.setCreateBy(SecurityUtils.getUsername());
|
||||||
serviceWayContent.setCreateTime(DateUtils.getNowDate());
|
serviceWayContent.setCreateTime(DateUtils.getNowDate());
|
||||||
@ -278,9 +279,6 @@ public class ServiceWayContentServiceImpl implements IServiceWayContentService {
|
|||||||
throw new ServiceException("服务方式名称已存在");
|
throw new ServiceException("服务方式名称已存在");
|
||||||
}
|
}
|
||||||
// 如果不存在,执行修改功能
|
// 如果不存在,执行修改功能
|
||||||
Long dictCodeByName = sysDictDataMapper.selectDictCodeByName(serviceWayContent.getServiceWayName());
|
|
||||||
String serviceWayCode = (dictCodeByName != null) ? dictCodeByName.toString() : null;
|
|
||||||
serviceWayContent.setServiceWayCode(serviceWayCode);
|
|
||||||
serviceWayContent.setUpdateBy(SecurityUtils.getUsername());
|
serviceWayContent.setUpdateBy(SecurityUtils.getUsername());
|
||||||
serviceWayContent.setUpdateTime(DateUtils.getNowDate());
|
serviceWayContent.setUpdateTime(DateUtils.getNowDate());
|
||||||
return serviceWayContentMapper.updateServiceWay(serviceWayContent);
|
return serviceWayContentMapper.updateServiceWay(serviceWayContent);
|
||||||
|
|||||||
@ -0,0 +1,215 @@
|
|||||||
|
<?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.xinelu.manage.mapper.labelfieldcontent.LabelFieldContentMapper">
|
||||||
|
|
||||||
|
<resultMap type="LabelFieldContent" id="LabelFieldContentResult">
|
||||||
|
<result property="id" column="id"/>
|
||||||
|
<result property="fieldId" column="field_id"/>
|
||||||
|
<result property="fieldName" column="field_name"/>
|
||||||
|
<result property="contentName" column="content_name"/>
|
||||||
|
<result property="contentCode" column="content_code"/>
|
||||||
|
<result property="resultPreview" column="result_preview"/>
|
||||||
|
<result property="contentSort" column="content_sort"/>
|
||||||
|
<result property="contentRemark" column="content_remark"/>
|
||||||
|
<result property="fieldMark" column="field_mark"/>
|
||||||
|
<result property="createBy" column="create_by"/>
|
||||||
|
<result property="createTime" column="create_time"/>
|
||||||
|
<result property="updateBy" column="update_by"/>
|
||||||
|
<result property="updateTime" column="update_time"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectLabelFieldContentVo">
|
||||||
|
select id,
|
||||||
|
field_id,
|
||||||
|
field_name,
|
||||||
|
content_name,
|
||||||
|
content_code,
|
||||||
|
result_preview,
|
||||||
|
content_sort,
|
||||||
|
content_remark,
|
||||||
|
field_mark,
|
||||||
|
create_by,
|
||||||
|
create_time,
|
||||||
|
update_by,
|
||||||
|
update_time
|
||||||
|
from label_field_content
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectLabelFieldContentList" parameterType="LabelFieldContent" resultMap="LabelFieldContentResult">
|
||||||
|
<include refid="selectLabelFieldContentVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="fieldId != null ">
|
||||||
|
and field_id =
|
||||||
|
#{fieldId}
|
||||||
|
</if>
|
||||||
|
<if test="fieldName != null and fieldName != ''">
|
||||||
|
and field_name like concat('%',
|
||||||
|
#{fieldName},
|
||||||
|
'%'
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
<if test="contentName != null and contentName != ''">
|
||||||
|
and content_name like concat('%',
|
||||||
|
#{contentName},
|
||||||
|
'%'
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
<if test="contentCode != null and contentCode != ''">
|
||||||
|
and content_code =
|
||||||
|
#{contentCode}
|
||||||
|
</if>
|
||||||
|
<if test="resultPreview != null and resultPreview != ''">
|
||||||
|
and result_preview =
|
||||||
|
#{resultPreview}
|
||||||
|
</if>
|
||||||
|
<if test="contentSort != null ">
|
||||||
|
and content_sort =
|
||||||
|
#{contentSort}
|
||||||
|
</if>
|
||||||
|
<if test="contentRemark != null and contentRemark != ''">
|
||||||
|
and content_remark =
|
||||||
|
#{contentRemark}
|
||||||
|
</if>
|
||||||
|
<if test="fieldMark != null and fieldMark != ''">
|
||||||
|
and field_mark =
|
||||||
|
#{fieldMark}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectLabelFieldContentById" parameterType="Long"
|
||||||
|
resultMap="LabelFieldContentResult">
|
||||||
|
<include refid="selectLabelFieldContentVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="existCountByFieldIdAndContentName" resultType="java.lang.Integer">
|
||||||
|
select count(1)
|
||||||
|
from label_field_content
|
||||||
|
where field_id = #{fieldId}
|
||||||
|
and content_name = #{contentName}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="existCountByContentNameExcludingId" resultType="java.lang.Integer">
|
||||||
|
select count(1)
|
||||||
|
from label_field_content
|
||||||
|
where content_name = #{contentName}
|
||||||
|
and field_id = #{fieldId}
|
||||||
|
and id != #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertLabelFieldContent" parameterType="LabelFieldContent" useGeneratedKeys="true"
|
||||||
|
keyProperty="id">
|
||||||
|
insert into label_field_content
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="fieldId != null">field_id,
|
||||||
|
</if>
|
||||||
|
<if test="fieldName != null">field_name,
|
||||||
|
</if>
|
||||||
|
<if test="contentName != null">content_name,
|
||||||
|
</if>
|
||||||
|
<if test="contentCode != null">content_code,
|
||||||
|
</if>
|
||||||
|
<if test="resultPreview != null">result_preview,
|
||||||
|
</if>
|
||||||
|
<if test="contentSort != null">content_sort,
|
||||||
|
</if>
|
||||||
|
<if test="contentRemark != null">content_remark,
|
||||||
|
</if>
|
||||||
|
<if test="fieldMark != null">field_mark,
|
||||||
|
</if>
|
||||||
|
<if test="createBy != null">create_by,
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">create_time,
|
||||||
|
</if>
|
||||||
|
<if test="updateBy != null">update_by,
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">update_time,
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="fieldId != null">#{fieldId},
|
||||||
|
</if>
|
||||||
|
<if test="fieldName != null">#{fieldName},
|
||||||
|
</if>
|
||||||
|
<if test="contentName != null">#{contentName},
|
||||||
|
</if>
|
||||||
|
<if test="contentCode != null">#{contentCode},
|
||||||
|
</if>
|
||||||
|
<if test="resultPreview != null">#{resultPreview},
|
||||||
|
</if>
|
||||||
|
<if test="contentSort != null">#{contentSort},
|
||||||
|
</if>
|
||||||
|
<if test="contentRemark != null">#{contentRemark},
|
||||||
|
</if>
|
||||||
|
<if test="fieldMark != null">#{fieldMark},
|
||||||
|
</if>
|
||||||
|
<if test="createBy != null">#{createBy},
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">#{createTime},
|
||||||
|
</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateLabelFieldContent" parameterType="LabelFieldContent">
|
||||||
|
update label_field_content
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="fieldId != null">field_id =
|
||||||
|
#{fieldId},
|
||||||
|
</if>
|
||||||
|
<if test="fieldName != null">field_name =
|
||||||
|
#{fieldName},
|
||||||
|
</if>
|
||||||
|
<if test="contentName != null">content_name =
|
||||||
|
#{contentName},
|
||||||
|
</if>
|
||||||
|
<if test="contentCode != null">content_code =
|
||||||
|
#{contentCode},
|
||||||
|
</if>
|
||||||
|
<if test="resultPreview != null">result_preview =
|
||||||
|
#{resultPreview},
|
||||||
|
</if>
|
||||||
|
<if test="contentSort != null">content_sort =
|
||||||
|
#{contentSort},
|
||||||
|
</if>
|
||||||
|
<if test="contentRemark != null">content_remark =
|
||||||
|
#{contentRemark},
|
||||||
|
</if>
|
||||||
|
<if test="fieldMark != null">field_mark =
|
||||||
|
#{fieldMark},
|
||||||
|
</if>
|
||||||
|
<if test="createBy != null">create_by =
|
||||||
|
#{createBy},
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">create_time =
|
||||||
|
#{createTime},
|
||||||
|
</if>
|
||||||
|
<if test="updateBy != null">update_by =
|
||||||
|
#{updateBy},
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">update_time =
|
||||||
|
#{updateTime},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteLabelFieldContentById" parameterType="Long">
|
||||||
|
delete
|
||||||
|
from label_field_content
|
||||||
|
where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteLabelFieldContentByIds" parameterType="String">
|
||||||
|
delete from label_field_content where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
||||||
@ -0,0 +1,176 @@
|
|||||||
|
<?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.xinelu.manage.mapper.labelfieldinfo.LabelFieldInfoMapper">
|
||||||
|
|
||||||
|
<resultMap type="LabelFieldInfo" id="LabelFieldInfoResult">
|
||||||
|
<result property="id" column="id"/>
|
||||||
|
<result property="fieldName" column="field_name"/>
|
||||||
|
<result property="fieldCode" column="field_code"/>
|
||||||
|
<result property="fieldType" column="field_type"/>
|
||||||
|
<result property="fieldSort" column="field_sort"/>
|
||||||
|
<result property="fieldRemark" column="field_remark"/>
|
||||||
|
<result property="createBy" column="create_by"/>
|
||||||
|
<result property="createTime" column="create_time"/>
|
||||||
|
<result property="updateBy" column="update_by"/>
|
||||||
|
<result property="updateTime" column="update_time"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectLabelFieldInfoVo">
|
||||||
|
select id,
|
||||||
|
field_name,
|
||||||
|
field_code,
|
||||||
|
field_type,
|
||||||
|
field_sort,
|
||||||
|
field_remark,
|
||||||
|
create_by,
|
||||||
|
create_time,
|
||||||
|
update_by,
|
||||||
|
update_time
|
||||||
|
from label_field_info
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectLabelFieldInfoList" parameterType="LabelFieldInfo" resultMap="LabelFieldInfoResult">
|
||||||
|
<include refid="selectLabelFieldInfoVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="fieldName != null and fieldName != ''">
|
||||||
|
and field_name like concat('%',
|
||||||
|
#{fieldName},
|
||||||
|
'%'
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
<if test="fieldCode != null and fieldCode != ''">
|
||||||
|
and field_code =
|
||||||
|
#{fieldCode}
|
||||||
|
</if>
|
||||||
|
<if test="fieldType != null and fieldType != ''">
|
||||||
|
and field_type =
|
||||||
|
#{fieldType}
|
||||||
|
</if>
|
||||||
|
<if test="fieldSort != null ">
|
||||||
|
and field_sort =
|
||||||
|
#{fieldSort}
|
||||||
|
</if>
|
||||||
|
<if test="fieldRemark != null and fieldRemark != ''">
|
||||||
|
and field_remark =
|
||||||
|
#{fieldRemark}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectLabelFieldInfoById" parameterType="Long"
|
||||||
|
resultMap="LabelFieldInfoResult">
|
||||||
|
<include refid="selectLabelFieldInfoVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="countDuplicateFieldNamesByType" resultType="java.lang.Integer">
|
||||||
|
select count(1)
|
||||||
|
from label_field_info
|
||||||
|
where field_type = #{fieldType} and field_name in
|
||||||
|
<foreach collection="fieldNames" item="fieldName" open="(" separator="," close=")">
|
||||||
|
#{fieldName}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="countByFieldNameExcludingId" resultType="java.lang.Integer">
|
||||||
|
select count(1)
|
||||||
|
from label_field_info
|
||||||
|
where field_name = #{fieldName}
|
||||||
|
and field_type = #{fieldType}
|
||||||
|
and id != #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertLabelFieldInfo" parameterType="LabelFieldInfo" useGeneratedKeys="true"
|
||||||
|
keyProperty="id">
|
||||||
|
insert into label_field_info
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="fieldName != null">field_name,
|
||||||
|
</if>
|
||||||
|
<if test="fieldCode != null">field_code,
|
||||||
|
</if>
|
||||||
|
<if test="fieldType != null">field_type,
|
||||||
|
</if>
|
||||||
|
<if test="fieldSort != null">field_sort,
|
||||||
|
</if>
|
||||||
|
<if test="fieldRemark != null">field_remark,
|
||||||
|
</if>
|
||||||
|
<if test="createBy != null">create_by,
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">create_time,
|
||||||
|
</if>
|
||||||
|
<if test="updateBy != null">update_by,
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">update_time,
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="fieldName != null">#{fieldName},
|
||||||
|
</if>
|
||||||
|
<if test="fieldCode != null">#{fieldCode},
|
||||||
|
</if>
|
||||||
|
<if test="fieldType != null">#{fieldType},
|
||||||
|
</if>
|
||||||
|
<if test="fieldSort != null">#{fieldSort},
|
||||||
|
</if>
|
||||||
|
<if test="fieldRemark != null">#{fieldRemark},
|
||||||
|
</if>
|
||||||
|
<if test="createBy != null">#{createBy},
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">#{createTime},
|
||||||
|
</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateLabelFieldInfo" parameterType="LabelFieldInfo">
|
||||||
|
update label_field_info
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="fieldName != null">field_name =
|
||||||
|
#{fieldName},
|
||||||
|
</if>
|
||||||
|
<if test="fieldCode != null">field_code =
|
||||||
|
#{fieldCode},
|
||||||
|
</if>
|
||||||
|
<if test="fieldType != null">field_type =
|
||||||
|
#{fieldType},
|
||||||
|
</if>
|
||||||
|
<if test="fieldSort != null">field_sort =
|
||||||
|
#{fieldSort},
|
||||||
|
</if>
|
||||||
|
<if test="fieldRemark != null">field_remark =
|
||||||
|
#{fieldRemark},
|
||||||
|
</if>
|
||||||
|
<if test="createBy != null">create_by =
|
||||||
|
#{createBy},
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">create_time =
|
||||||
|
#{createTime},
|
||||||
|
</if>
|
||||||
|
<if test="updateBy != null">update_by =
|
||||||
|
#{updateBy},
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">update_time =
|
||||||
|
#{updateTime},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteLabelFieldInfoById" parameterType="Long">
|
||||||
|
delete
|
||||||
|
from label_field_info
|
||||||
|
where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteLabelFieldInfoByIds" parameterType="String">
|
||||||
|
delete from label_field_info where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
||||||
@ -177,7 +177,7 @@
|
|||||||
|
|
||||||
<select id="countByWechatTemplateTaskDTO" resultType="java.lang.Integer"
|
<select id="countByWechatTemplateTaskDTO" resultType="java.lang.Integer"
|
||||||
parameterType="com.xinelu.manage.dto.wechattemplate.WechatTemplateTaskDTO">
|
parameterType="com.xinelu.manage.dto.wechattemplate.WechatTemplateTaskDTO">
|
||||||
select count(*)
|
select count(1)
|
||||||
from wechat_template wt
|
from wechat_template wt
|
||||||
where department_id = #{departmentId}
|
where department_id = #{departmentId}
|
||||||
and wechat_template_name = #{wechatTemplateName}
|
and wechat_template_name = #{wechatTemplateName}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user