Browse Source

标签自定义功能化

master
DOUDOU 4 years ago
parent
commit
f3d0e3442d
  1. 155
      src/main/java/com/gaotao/modules/base/controller/LabelSettingController.java
  2. 48
      src/main/java/com/gaotao/modules/base/dao/BaseMapper.java
  3. 119
      src/main/java/com/gaotao/modules/base/entity/CustomerLabelSettingData.java
  4. 92
      src/main/java/com/gaotao/modules/base/entity/DefaultLabelSettingData.java
  5. 80
      src/main/java/com/gaotao/modules/base/service/BaseService.java
  6. 238
      src/main/java/com/gaotao/modules/base/service/Impl/BaseServiceImpl.java
  7. 98
      src/main/resources/mapper/base/BaseMapper.xml

155
src/main/java/com/gaotao/modules/base/controller/LabelSettingController.java

@ -3,6 +3,8 @@ package com.gaotao.modules.base.controller;
import com.alibaba.fastjson.JSONObject;
import com.gaotao.common.utils.R;
import com.gaotao.modules.base.entity.CustomerLabelSettingData;
import com.gaotao.modules.base.entity.DefaultLabelSettingData;
import com.gaotao.modules.base.entity.LabelSettingData;
import com.gaotao.modules.base.service.BaseService;
import com.gaotao.modules.print.entity.DumpPrint;
@ -36,7 +38,7 @@ public class LabelSettingController {
* @date 2022/12/27 17:49
* @version 1.0
*/
@RequestMapping(value = "getLabelSettingList")
@RequestMapping(value = "/getLabelSettingList")
public R getLabelSettingList(@RequestBody LabelSettingData inData){
List<LabelSettingData> resultList = baseService.getLabelSettingList(inData);
return R.ok()
@ -52,7 +54,7 @@ public class LabelSettingController {
* @date 2022/12/28 15:29
* @version 1.0
*/
@RequestMapping(value = "insertLabelSetting")
@RequestMapping(value = "/insertLabelSetting")
public R insertLabelSetting(@RequestBody LabelSettingData inData){
baseService.insertLabelSetting(inData);
return R.ok()
@ -66,7 +68,7 @@ public class LabelSettingController {
* @date 2022/12/28 15:30
* @version 1.0
*/
@RequestMapping(value = "updateLabelSetting")
@RequestMapping(value = "/updateLabelSetting")
public R updateLabelSetting(@RequestBody LabelSettingData inData){
baseService.updateLabelSetting(inData);
return R.ok()
@ -74,4 +76,151 @@ public class LabelSettingController {
.put("msg", "操作成功!");
}
/**
* @description: 删除标签数据
* @author LR
* @date 2023/1/3 11:15
* @version 1.0
*/
@RequestMapping(value = "/deleteLabelSetting")
public R deleteLabelSetting(@RequestBody LabelSettingData inData){
baseService.deleteLabelSetting(inData);
return R.ok()
.put("code", 200)
.put("msg", "操作成功!");
}
/**
* @description: 获取默认打印列表信息
* @author LR
* @date 2023/1/3 16:15
* @version 1.0
*/
@RequestMapping(value = "/getDefaultLabelSettingList")
public R getDefaultLabelSettingList(@RequestBody DefaultLabelSettingData inData){
List<DefaultLabelSettingData> resultList = baseService.getDefaultLabelSettingList(inData);
return R.ok()
.put("code", 200)
.put("msg", "操作成功!")
.put("rows", resultList)
.put("total", resultList.size());
}
/**
* @description: 检查标签边编号
* @author LR
* @date 2023/1/3 17:48
* @version 1.0
*/
@RequestMapping(value = "checkLabelNo")
public R checkLabelNo(@RequestBody LabelSettingData inData){
LabelSettingData resultRow = baseService.checkLabelNo(inData);
return R.ok()
.put("code", 200)
.put("msg", "操作成功!")
.put("resultRow", resultRow);
}
/**
* @description: 插入默认标签的配置信息
* @author LR
* @date 2023/1/4 10:23
* @version 1.0
*/
@RequestMapping(value = "/insertDefaultLabelSetting")
public R insertDefaultLabelSetting(@RequestBody DefaultLabelSettingData inData){
baseService.insertDefaultLabelSetting(inData);
return R.ok()
.put("code", 200)
.put("msg", "操作成功!");
}
/**
* @description: 修改默认标签的配置信息
* @author LR
* @date 2023/1/4 10:24
* @version 1.0
*/
@RequestMapping(value = "/updateDefaultLabelSetting")
public R updateDefaultLabelSetting(@RequestBody DefaultLabelSettingData inData){
baseService.updateDefaultLabelSetting(inData);
return R.ok()
.put("code", 200)
.put("msg", "操作成功!");
}
/**
* @description: 删除默认标签数据
* @author LR
* @date 2023/1/3 11:15
* @version 1.0
*/
@RequestMapping(value = "/deleteDefaultLabelSetting")
public R deleteDefaultLabelSetting(@RequestBody DefaultLabelSettingData inData) {
baseService.deleteDefaultLabelSetting(inData);
return R.ok()
.put("code", 200)
.put("msg", "操作成功!");
}
/**
* @description: 查询客制化标签的配置信息
* @author LR
* @date 2023/1/4 15:33
* @version 1.0
*/
@RequestMapping(value = "/getCustomerLabelSettingList")
public R getCustomerLabelSettingList(@RequestBody CustomerLabelSettingData inData){
List<CustomerLabelSettingData> resultList = baseService.getCustomerLabelSettingList(inData);
return R.ok()
.put("code", 200)
.put("msg", "操作成功!")
.put("rows", resultList)
.put("total", resultList.size());
}
/**
* @description: 插入客制化标签的配置信息
* @author LR
* @date 2023/1/4 16:15
* @version 1.0
*/
@RequestMapping(value = "/insertCustomerLabelSetting")
public R insertCustomerLabelSetting(@RequestBody CustomerLabelSettingData inData){
baseService.insertCustomerLabelSetting(inData);
return R.ok()
.put("code", 200)
.put("msg", "操作成功!");
}
/**
* @description: 修改客制化标签的配置信息
* @author LR
* @date 2023/1/4 16:16
* @version 1.0
*/
@RequestMapping(value = "/updateCustomerLabelSetting")
public R updateCustomerLabelSetting(@RequestBody CustomerLabelSettingData inData){
baseService.updateCustomerLabelSetting(inData);
return R.ok()
.put("code", 200)
.put("msg", "操作成功!");
}
/**
* @description: 删除客制化标签数据
* @author LR
* @date 2023/1/4 16:16
* @version 1.0
*/
@RequestMapping(value = "/deleteCustomerLabelSetting")
public R deleteCustomerLabelSetting(@RequestBody CustomerLabelSettingData inData) {
baseService.deleteCustomerLabelSetting(inData);
return R.ok()
.put("code", 200)
.put("msg", "操作成功!");
}
}

48
src/main/java/com/gaotao/modules/base/dao/BaseMapper.java

@ -1670,4 +1670,52 @@ public interface BaseMapper {
* @version 1.0
*/
void updateLabelSetting(LabelSettingData inData);
/**
* @description: 删除标签主表信息
* @author LR
* @date 2023/1/3 11:23
* @version 1.0
*/
void deleteLabelSettingByLabelNo(String labelNo);
/**
* @description: 查询默认标签的配置信息
* @author LR
* @date 2023/1/3 16:20
* @version 1.0
*/
List<DefaultLabelSettingData> getDefaultLabelSettingList(DefaultLabelSettingData inData);
/**
* @description: 插入默认标签的配置信息
* @author LR
* @date 2023/1/4 10:26
* @version 1.0
*/
void insertDefaultLabelSetting(DefaultLabelSettingData inData);
/**
* @description: 修改默认标签的配置信息
* @author LR
* @date 2023/1/4 10:27
* @version 1.0
*/
void updateDefaultLabelSetting(DefaultLabelSettingData inData);
/**
* @description: 删除默认标签的配置信息
* @author LR
* @date 2023/1/4 10:28
* @version 1.0
*/
void deleteDefaultLabelSetting(DefaultLabelSettingData inData);
/**
* @description: 查询客制化标签的配置信息
* @author LR
* @date 2023/1/4 16:14
* @version 1.0
*/
List<CustomerLabelSettingData> getCustomerLabelSettingList(CustomerLabelSettingData inData);
}

119
src/main/java/com/gaotao/modules/base/entity/CustomerLabelSettingData.java

@ -0,0 +1,119 @@
package com.gaotao.modules.base.entity;
import org.apache.ibatis.type.Alias;
@Alias("CustomerLabelSettingData")
public class CustomerLabelSettingData {
private String site;//
private String customerId;//
private String customerDesc;//
private String labelNo;//
private String labelType;//
private String labelName;//
private String labelClass;//
private String remark;//
private String subLabelFlag;//是否是子标签
private String parentLabelNo;//父级标签编码
private String searchFlag;//是否查询
private String checkFlag;//是否检查
public CustomerLabelSettingData() {
}
public String getSite() {
return site;
}
public void setSite(String site) {
this.site = site;
}
public String getCustomerId() {
return customerId;
}
public void setCustomerId(String customerId) {
this.customerId = customerId;
}
public String getCustomerDesc() {
return customerDesc;
}
public void setCustomerDesc(String customerDesc) {
this.customerDesc = customerDesc;
}
public String getLabelNo() {
return labelNo;
}
public void setLabelNo(String labelNo) {
this.labelNo = labelNo;
}
public String getLabelType() {
return labelType;
}
public void setLabelType(String labelType) {
this.labelType = labelType;
}
public String getLabelName() {
return labelName;
}
public void setLabelName(String labelName) {
this.labelName = labelName;
}
public String getLabelClass() {
return labelClass;
}
public void setLabelClass(String labelClass) {
this.labelClass = labelClass;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getSubLabelFlag() {
return subLabelFlag;
}
public void setSubLabelFlag(String subLabelFlag) {
this.subLabelFlag = subLabelFlag;
}
public String getParentLabelNo() {
return parentLabelNo;
}
public void setParentLabelNo(String parentLabelNo) {
this.parentLabelNo = parentLabelNo;
}
public String getSearchFlag() {
return searchFlag;
}
public void setSearchFlag(String searchFlag) {
this.searchFlag = searchFlag;
}
public String getCheckFlag() {
return checkFlag;
}
public void setCheckFlag(String checkFlag) {
this.checkFlag = checkFlag;
}
}

92
src/main/java/com/gaotao/modules/base/entity/DefaultLabelSettingData.java

@ -0,0 +1,92 @@
package com.gaotao.modules.base.entity;
import org.apache.ibatis.type.Alias;
@Alias("DefaultLabelSettingData")
public class DefaultLabelSettingData {
private String labelNo;//
private String labelType;//
private String labelName;//
private String labelClass;//
private String remark;//
private String subLabelFlag;//是否是子标签
private String parentLabelNo;//父级标签编码
private String searchFlag;//是否查询
private String checkFlag;//是否检查
public DefaultLabelSettingData() {
}
public String getLabelNo() {
return labelNo;
}
public void setLabelNo(String labelNo) {
this.labelNo = labelNo;
}
public String getLabelType() {
return labelType;
}
public void setLabelType(String labelType) {
this.labelType = labelType;
}
public String getLabelName() {
return labelName;
}
public void setLabelName(String labelName) {
this.labelName = labelName;
}
public String getLabelClass() {
return labelClass;
}
public void setLabelClass(String labelClass) {
this.labelClass = labelClass;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getSubLabelFlag() {
return subLabelFlag;
}
public void setSubLabelFlag(String subLabelFlag) {
this.subLabelFlag = subLabelFlag;
}
public String getParentLabelNo() {
return parentLabelNo;
}
public void setParentLabelNo(String parentLabelNo) {
this.parentLabelNo = parentLabelNo;
}
public String getSearchFlag() {
return searchFlag;
}
public void setSearchFlag(String searchFlag) {
this.searchFlag = searchFlag;
}
public String getCheckFlag() {
return checkFlag;
}
public void setCheckFlag(String checkFlag) {
this.checkFlag = checkFlag;
}
}

80
src/main/java/com/gaotao/modules/base/service/BaseService.java

@ -914,4 +914,84 @@ public interface BaseService {
* @version 1.0
*/
void updateLabelSetting(LabelSettingData inData);
/**
* @description: 删除标签数据
* @author LR
* @date 2023/1/3 11:17
* @version 1.0
*/
void deleteLabelSetting(LabelSettingData inData);
/**
* @description: 获取默认打印列表信息
* @author LR
* @date 2023/1/3 16:16
* @version 1.0
*/
List<DefaultLabelSettingData> getDefaultLabelSettingList(DefaultLabelSettingData inData);
/**
* @description: 检查标签边编号
* @author LR
* @date 2023/1/3 17:48
* @version 1.0
*/
LabelSettingData checkLabelNo(LabelSettingData inData);
/**
* @description: 插入默认标签的配置信息
* @author LR
* @date 2023/1/4 10:25
* @version 1.0
*/
void insertDefaultLabelSetting(DefaultLabelSettingData inData);
/**
* @description: 修改默认标签的配置信息
* @author LR
* @date 2023/1/4 10:26
* @version 1.0
*/
void updateDefaultLabelSetting(DefaultLabelSettingData inData);
/**
* @description: 删除默认标签数据
* @author LR
* @date 2023/1/4 10:28
* @version 1.0
*/
void deleteDefaultLabelSetting(DefaultLabelSettingData inData);
/**
* @description: 查询客制化标签的配置信息
* @author LR
* @date 2023/1/4 16:12
* @version 1.0
*/
List<CustomerLabelSettingData> getCustomerLabelSettingList(CustomerLabelSettingData inData);
/**
* @description: 插入默认标签的配置信息
* @author LR
* @date 2023/1/4 16:12
* @version 1.0
*/
void insertCustomerLabelSetting(CustomerLabelSettingData inData);
/**
* @description: 修改客制化标签的配置信息
* @author LR
* @date 2023/1/4 16:12
* @version 1.0
*/
void updateCustomerLabelSetting(CustomerLabelSettingData inData);
/**
* @description: 删除客制化标签数据
* @author LR
* @date 2023/1/4 16:13
* @version 1.0
*/
void deleteCustomerLabelSetting(CustomerLabelSettingData inData);
}

238
src/main/java/com/gaotao/modules/base/service/Impl/BaseServiceImpl.java

@ -1863,16 +1863,42 @@ public class BaseServiceImpl implements BaseService {
@Transactional
public void insertLabelSetting(LabelSettingData inData) {
//公共参数
String labelNo = inData.getLabelNo();
//1.查询是否重复
LabelSettingData labelSetting = baseMapper.getLabelSettingByLabelNo(labelNo);
String labelName = inData.getLabelName();
String labelType = inData.getLabelType();
String labelClass = inData.getLabelClass();
//判断空值
if(null == labelSetting){
//2.判断没有问题 插入数据
if(labelName == null || "".equals(labelName)){
throw new XJException("报表文件名不能为空!");
}
if(labelType == null || "".equals(labelType)){
throw new XJException("标签类型不能为空!");
}
if(labelClass == null || "".equals(labelClass)){
throw new XJException("标签种类不能为空!");
}
//1.查询是否重复
//LabelSettingData labelSetting = baseMapper.getLabelSettingByLabelNo(labelNo);
//调用存储过程 获取当前序号的标签序号的数据
String labelNo = this.getLabelSettingLabelNo();
//设置参数
inData.setLabelNo(labelNo);
baseMapper.insertLabelSetting(inData);
}else{
throw new XJException("标签编号重复!");
}
/**
* @description: 调用存储过程 获取当前序号的标签序号
* @author LR
* @date 2023/1/3 11:08
* @version 1.0
*/
public String getLabelSettingLabelNo() {
List<Object> params = new ArrayList<>();
//存储过程 调用存储过程 创建分卷
List<Map<String, Object>> resultList = procedureMapper.getProcedureData("getLabelSettingLabelNo", params);
//返回结果
Map<String, Object> resultMap = resultList.get(0);
//处理结果集
return String.valueOf(resultMap.get("labelNo"));
}
@Override
@ -1880,4 +1906,202 @@ public class BaseServiceImpl implements BaseService {
//修改标签的信息
baseMapper.updateLabelSetting(inData);
}
@Override
@Transactional
public void deleteLabelSetting(LabelSettingData inData) {
//公共参数
String labelNo = inData.getLabelNo();
//1.查询是否存在
LabelSettingData labelSetting = baseMapper.getLabelSettingByLabelNo(labelNo);
if(labelSetting == null){
throw new XJException("当前标签不存在,请刷新后再试!");
}
//调用存储过程 校验是否可以删除标签定义的信息
Map<String, Object> checkMap = this.checkDeleteLabelSetting(labelNo);
//判断是否检验成功
String resultCode = String.valueOf(checkMap.get("resultCode"));
if (!"200".equalsIgnoreCase(resultCode)) {
String msg = String.valueOf(checkMap.get("resultMsg"));
throw new XJException(msg, Integer.parseInt(resultCode));
}
baseMapper.deleteLabelSettingByLabelNo(labelNo);
}
/**
* @description: 检查是否可以删除标签定义信息
* @author LR
* @date 2023/1/3 13:04
* @version 1.0
*/
public Map<String, Object> checkDeleteLabelSetting(String labelNo) {
List<Object> params = new ArrayList<>();
params.add(labelNo);
//存储过程 调用存储过程 创建分卷
List<Map<String, Object>> resultList = procedureMapper.getProcedureData("checkDeleteLabelSetting", params);
//返回结果
return resultList.get(0);
}
@Override
public List<DefaultLabelSettingData> getDefaultLabelSettingList(DefaultLabelSettingData inData) {
//判断是否查询
String searchFlag = inData.getSearchFlag();
if("N".equalsIgnoreCase(searchFlag)){
return new ArrayList<DefaultLabelSettingData>();
}else{
//判断是否查询
return baseMapper.getDefaultLabelSettingList(inData);
}
}
@Override
public LabelSettingData checkLabelNo(LabelSettingData inData) {
//公共参数
String labelNo = inData.getLabelNo();
//查询是否存在当前编号的对象
LabelSettingData labelSetting = baseMapper.getLabelSettingByLabelNo(labelNo);
//判断当前对象
if(labelSetting == null){
throw new XJException("查无此标签编号!");
}
return labelSetting;
}
@Override
@Transactional
public void insertDefaultLabelSetting(DefaultLabelSettingData inData) {
//公共参数
String labelNo = inData.getLabelNo();
String labelType = inData.getLabelType();
String subLabelFlag = inData.getSubLabelFlag();
String parentLabelNo = inData.getParentLabelNo();
String checkFlag = inData.getCheckFlag();
//调用存储过程 判断是否可以新增
Map<String, Object> checkMap = this.checkInsertDefaultLabelSetting(labelNo, labelType, subLabelFlag, parentLabelNo, checkFlag);
//判断是否检验成功
String resultCode = String.valueOf(checkMap.get("resultCode"));
if (!"200".equalsIgnoreCase(resultCode)) {
String msg = String.valueOf(checkMap.get("resultMsg"));
throw new XJException(msg, Integer.parseInt(resultCode));
}
//首先校验当前的信息是否可以插入
baseMapper.insertDefaultLabelSetting(inData);
}
/**
* @description: 检查是否可以插入当前的默认标签配置数据
* @author LR
* @date 2023/1/4 11:53
* @version 1.0
*/
public Map<String, Object> checkInsertDefaultLabelSetting(String labelNo, String labelType, String subLabelFlag, String parentLabelNo, String checkFlag) {
List<Object> params = new ArrayList<>();
params.add(labelNo);
params.add(labelType);
params.add(subLabelFlag);
params.add(parentLabelNo);
params.add(checkFlag);
//存储过程 调用存储过程 创建分卷
List<Map<String, Object>> resultList = procedureMapper.getProcedureData("checkInsertDefaultLabelSetting", params);
//返回结果
return resultList.get(0);
}
@Override
@Transactional
public void updateDefaultLabelSetting(DefaultLabelSettingData inData) {
//公共参数
String labelNo = inData.getLabelNo();
String labelType = inData.getLabelType();
String subLabelFlag = inData.getSubLabelFlag();
String parentLabelNo = inData.getParentLabelNo();
String checkFlag = inData.getCheckFlag();
//调用存储过程 判断是否可以新增
Map<String, Object> checkMap = this.checkUpdateDefaultLabelSetting(labelNo, labelType, subLabelFlag, parentLabelNo, checkFlag);
//判断是否检验成功
String resultCode = String.valueOf(checkMap.get("resultCode"));
if (!"200".equalsIgnoreCase(resultCode)) {
String msg = String.valueOf(checkMap.get("resultMsg"));
throw new XJException(msg, Integer.parseInt(resultCode));
}
baseMapper.updateDefaultLabelSetting(inData);
}
/**
* @description: 调用存储过程 判断是否可以修改默认标签配置信息
* @author LR
* @date 2023/1/4 13:03
* @version 1.0
*/
public Map<String, Object> checkUpdateDefaultLabelSetting(String labelNo, String labelType, String subLabelFlag, String parentLabelNo, String checkFlag) {
List<Object> params = new ArrayList<>();
params.add(labelNo);
params.add(labelType);
params.add(subLabelFlag);
params.add(parentLabelNo);
params.add(checkFlag);
//存储过程 调用存储过程 创建分卷
List<Map<String, Object>> resultList = procedureMapper.getProcedureData("checkUpdateDefaultLabelSetting", params);
//返回结果
return resultList.get(0);
}
@Override
@Transactional
public void deleteDefaultLabelSetting(DefaultLabelSettingData inData) {
//公共参数
String labelNo = inData.getLabelNo();
//调用存储过程 判断是否可以新增
Map<String, Object> checkMap = this.checkDeleteDefaultLabelSetting(labelNo);
//判断是否检验成功
String resultCode = String.valueOf(checkMap.get("resultCode"));
if (!"200".equalsIgnoreCase(resultCode)) {
String msg = String.valueOf(checkMap.get("resultMsg"));
throw new XJException(msg, Integer.parseInt(resultCode));
}
baseMapper.deleteDefaultLabelSetting(inData);
}
/**
* @description: 调用存储过程 判断是否可以删除
* @author LR
* @date 2023/1/4 13:05
* @version 1.0
*/
public Map<String, Object> checkDeleteDefaultLabelSetting(String labelNo) {
List<Object> params = new ArrayList<>();
params.add(labelNo);
//存储过程 调用存储过程 创建分卷
List<Map<String, Object>> resultList = procedureMapper.getProcedureData("checkDeleteDefaultLabelSetting", params);
//返回结果
return resultList.get(0);
}
@Override
public List<CustomerLabelSettingData> getCustomerLabelSettingList(CustomerLabelSettingData inData) {
//判断是否查询
String searchFlag = inData.getSearchFlag();
if("N".equalsIgnoreCase(searchFlag)){
return new ArrayList<CustomerLabelSettingData>();
}else{
//判断是否查询
return baseMapper.getCustomerLabelSettingList(inData);
}
}
@Override
public void insertCustomerLabelSetting(CustomerLabelSettingData inData) {
}
@Override
public void updateCustomerLabelSetting(CustomerLabelSettingData inData) {
}
@Override
public void deleteCustomerLabelSetting(CustomerLabelSettingData inData) {
}
}

98
src/main/resources/mapper/base/BaseMapper.xml

@ -1779,6 +1779,7 @@
AND ReportID = #{labelNo}
</where>
</select>
<!--插入标签自定义的数据-->
<insert id="insertLabelSetting" parameterType="LabelSettingData">
INSERT INTO ReportFileList(ReportID, ReportFamily, Reportfile, ReportType, Remark)
@ -1792,4 +1793,101 @@
AND ReportID = #{labelNo}
</where>
</update>
<!--删除标签定义的主表信息-->
<delete id="deleteLabelSettingByLabelNo" parameterType="java.lang.String">
DELETE FROM ReportFileList
<where>
AND ReportID = #{labelNo}
</where>
</delete>
<!--查询标签的默认配置信息-->
<select id="getDefaultLabelSettingList" parameterType="DefaultLabelSettingData" resultType="DefaultLabelSettingData">
SELECT rfd.ReportFamily labelType, rfd.ReportID labelNo, rfl.ReportType labelClass, rfl.Reportfile labelName, rfd.Remark remark,
rfd.SubReportFlag subLabelFlag, rfd.ParentReportID parentLabelNo FROM ReportFileDefDefault rfd
LEFT JOIN ReportFileList rfl ON rfl.ReportID = rfd.ReportID
<where>
AND rfl.ReportID = rfd.ReportID
<if test="labelNo != null and labelNo != ''">
and rfd.ReportID LIKE #{labelNo}
</if>
<if test="labelType != null and labelType != ''">
and rfd.ReportFamily LIKE #{labelType}
</if>
<if test="labelName != null and labelName != ''">
and rfl.Reportfile LIKE #{labelName}
</if>
</where>
ORDER BY rfd.ReportFamily ASC
</select>
<!--插入默认标签配置信息-->
<insert id="insertDefaultLabelSetting" parameterType="DefaultLabelSettingData">
INSERT INTO ReportFileDefDefault(FamilyID, ReportFamily, ReportID, Remark, SubReportFlag, ParentReportID)
VALUES('*', #{labelType}, #{labelNo}, #{remark}, #{subLabelFlag}, #{parentLabelNo})
</insert>
<!--修改默认标签配置信息-->
<update id="updateDefaultLabelSetting" parameterType="DefaultLabelSettingData">
UPDATE ReportFileDefDefault SET SubReportFlag = #{subLabelFlag}, ParentReportID = #{parentLabelNo}, Remark = #{remark}
<where>
AND ReportID = #{labelNo} AND ReportFamily = #{labelType} AND FamilyID = '*'
</where>
</update>
<!--删除默认标签配置信息-->
<delete id="deleteDefaultLabelSetting" parameterType="DefaultLabelSettingData">
DELETE FROM ReportFileDefDefault
<where>
AND ReportID = #{labelNo} AND ReportFamily = #{labelType} AND FamilyID = '*'
</where>
</delete>
<!--查询标签的客制化配置信息-->
<select id="getCustomerLabelSettingList" parameterType="CustomerLabelSettingData" resultType="CustomerLabelSettingData">
SELECT rfc.ReportFamily labelType, rfc.CustomerID customerId, dbo.Get_CustomerDesc(rfc.Site, rfc.CustomerID) customerDesc, rfc.ReportID labelNo,
rfl.Reportfile labelName, rfl.ReportType labelClass, rfc.Site site, rfc.Remark remark, rfc.SubReportFlag subLabelFlag, rfc.ParentReportID parentLabelNo
FROM ReportFileDefCustomer rfc
LEFT JOIN ReportFileList rfl ON rfl.ReportID = rfc.ReportID AND rfl.ReportFamily = rfc.ReportFamily
<where>
AND rfl.ReportID = rfc.ReportID
<if test="customerId != null and customerId != ''">
and rfc.CustomerID LIKE #{customerId}
</if>
<if test="labelNo != null and labelNo != ''">
and rfc.ReportID LIKE #{labelNo}
</if>
<if test="labelType != null and labelType != ''">
and rfc.ReportFamily LIKE #{labelType}
</if>
<if test="labelName != null and labelName != ''">
and rfl.Reportfile LIKE #{labelName}
</if>
</where>
ORDER BY rfc.CustomerID ASC
</select>
<!--插入客制化标签配置信息-->
<insert id="insertCustomerLabelSetting" parameterType="CustomerLabelSettingData">
INSERT INTO ReportFileDefCustomer(Site, CustomerID, FamilyID, ReportFamily, ReportID, Remark, SubReportFlag, ParentReportID)
VALUES(#{site}, #{customerId}, '*', #{labelType}, #{labelNo}, #{remark}, #{subLabelFlag}, #{parentLabelNo})
</insert>
<!--修改客制化标签配置信息-->
<update id="updateCustomerLabelSetting" parameterType="CustomerLabelSettingData">
UPDATE ReportFileDefCustomer SET CustomerID = #{customerId}, SubReportFlag = #{subLabelFlag},
ParentReportID = #{parentLabelNo}, Remark = #{remark}
<where>
AND ReportID = #{labelNo} AND ReportFamily = #{labelType} AND FamilyID = '*'
</where>
</update>
<!--删除客制化标签配置信息-->
<delete id="deleteCustomerLabelSetting" parameterType="CustomerLabelSettingData">
DELETE FROM ReportFileDefCustomer
<where>
AND ReportID = #{labelNo} AND ReportFamily = #{labelType} AND FamilyID = '*'
</where>
</delete>
</mapper>
Loading…
Cancel
Save