Commit d929f9e6 authored by 赵啸非's avatar 赵啸非

添加样表设备列表

parent 3f4348d0
......@@ -2574,14 +2574,10 @@ dict|object|字典对象
:---|:---|:---|:------
page|Integer|否|当前页
size|Integer|否|每页条数,值为-1,查询所有记录
deviceCode|String|否|设备编码,字段前后添加%%模糊查询
siteId|Long|否|站点ID
**请求样例:**
```
{
"deviceCode":"rzc79g",
"siteId":2780,
"page":1,
"size":10
}
......@@ -2603,19 +2599,18 @@ data|object|数据对象
  deviceId|Long|设备id
  deviceCode|String|设备编码
  deviceName|String|设备名称
  productId|Long|产品id
  productCode|String|产品编码
  productName|String|产品名称
  matterId|Long|事项matter id
  matterId|Long|事项id
  matterCode|String|事项编码
  matterName|String|事项名称
  siteId|Long|站点ID
  deptId|Long|部门ID
  deptCode|String|部门编号
  deptName|String|部门名称
  materialName|String|材料名
  materiaFullName|String|材料全名
  materialId|Long|材料id
  source|Integer|事项来源(0.政务网,1.自定义)
  isRecommend|Integer|是否推荐(0.未推荐,1.推荐)
  total|Integer|填单次数
  sort|Integer|排序
  sampleName|String|样表名称
  samplePath|String|样表地址
......@@ -2667,19 +2662,18 @@ data|object|数据对象
 deviceId|Long|设备id
 deviceCode|String|设备编码
 deviceName|String|设备名称
 productId|Long|产品id
 productCode|String|产品编码
 productName|String|产品名称
 matterId|Long|事项matter id
 matterId|Long|事项id
 matterCode|String|事项编码
 matterName|String|事项名称
 siteId|Long|站点ID
 deptId|Long|部门ID
 deptCode|String|部门编号
 deptName|String|部门名称
 materialName|String|材料名
 materiaFullName|String|材料全名
 materialId|Long|材料id
 source|Integer|事项来源(0.政务网,1.自定义)
 isRecommend|Integer|是否推荐(0.未推荐,1.推荐)
 total|Integer|填单次数
 sort|Integer|排序
 sampleName|String|样表名称
 samplePath|String|样表地址
......@@ -2696,29 +2690,28 @@ dict|object|字典对象
{
"code": 1,
"data": {
"id":5825,
"deviceId":6905,
"deviceCode":"cj8jgr",
"deviceName":"qdzsth",
"productId":3706,
"productCode":"tg3ujg",
"productName":"n5imno",
"matterId":1158,
"siteId":8335,
"deptId":1677,
"deptCode":"66r1h3",
"deptName":"5hc964",
"materialName":"cvzy4g",
"materiaFullName":"2igxs2",
"source":5604,
"isRecommend":9780,
"total":4803,
"sort":1159,
"sampleName":"77132s",
"samplePath":"xvk0ag",
"preViewPath":"rrotwe",
"id":7287,
"deviceId":4805,
"deviceCode":"ezsu52",
"deviceName":"gio16r",
"matterId":8179,
"matterCode":"wuz4op",
"matterName":"3j5eg0",
"siteId":9985,
"deptId":3702,
"deptCode":"dvslci",
"deptName":"urebgs",
"materialName":"znzxp8",
"materiaFullName":"ar03ng",
"materialId":3055,
"source":6317,
"isRecommend":1887,
"sort":5527,
"sampleName":"f6e961",
"samplePath":"67xnm5",
"preViewPath":"r6w3s6",
"createTime":"2023-03-22",
"createUserId":4039,
"createUserId":8413,
"updateTime":"2023-03-22"
}
}
......@@ -2739,49 +2732,16 @@ dict|object|字典对象
参数名称|类型|必填|描述
:---|:---|:---|:-------
deviceId|Long|否|设备id
deviceCode|String|否|设备编码
deviceName|String|否|设备名称
productId|Long|否|产品id
productCode|String|否|产品编码
productName|String|否|产品名称
matterId|Long|否|事项matter id
matterId|Lon;g|否|事项id
siteId|Long|否|站点ID
deptId|Long|否|部门ID
deptCode|String|否|部门编号
deptName|String|否|部门名称
materialName|String|是|材料名
materiaFullName|String|是|材料全名
source|Integer|否|事项来源(0.政务网,1.自定义)
isRecommend|Integer|否|是否推荐(0.未推荐,1.推荐)
total|Integer|否|填单次数
sort|Integer|否|排序
sampleName|String|否|样表名称
samplePath|String|否|样表地址
preViewPath|String|否|样表预览地址
materialId|Long|否|材料id
**请求样例:**
```
{
"deviceId":9361,
"deviceCode":"1agfuz",
"deviceName":"spki1w",
"productId":6615,
"productCode":"i6vl7d",
"productName":"5t3w5l",
"matterId":6353,
"siteId":7531,
"deptId":6542,
"deptCode":"ztdhof",
"deptName":"fsyyb1",
"materialName":"xgj2mj",
"materiaFullName":"93hwso",
"source":8702,
"isRecommend":461,
"total":6075,
"sort":2402,
"sampleName":"rjg0l9",
"samplePath":"oxh5zs",
"preViewPath":"kgbgzv",
"deviceId":9730,
"matterId":5750,
"materialId":8061
}
```
......@@ -2798,19 +2758,18 @@ data|object|数据对象
  deviceId|Long|设备id
  deviceCode|String|设备编码
  deviceName|String|设备名称
  productId|Long|产品id
  productCode|String|产品编码
  productName|String|产品名称
  matterId|Long|事项matter id
  matterId|Long|事项id
  matterCode|String|事项编码
  matterName|String|事项名称
  siteId|Long|站点ID
  deptId|Long|部门ID
  deptCode|String|部门编号
  deptName|String|部门名称
  materialName|String|材料名
  materiaFullName|String|材料全名
  materialId|Long|材料id
  source|Integer|事项来源(0.政务网,1.自定义)
  isRecommend|Integer|是否推荐(0.未推荐,1.推荐)
  total|Integer|填单次数
  sort|Integer|排序
  sampleName|String|样表名称
  samplePath|String|样表地址
......@@ -2863,4 +2822,3 @@ msg|String|消息|-
"code":1,
"msg":"成功"
}
......@@ -294,19 +294,18 @@ CREATE TABLE mortals_xhx_device_matter_datum(
`deviceId` bigint(20) COMMENT '设备id',
`deviceCode` varchar(255) COMMENT '设备编码',
`deviceName` varchar(255) COMMENT '设备名称',
`productId` bigint(20) COMMENT '产品id',
`productCode` varchar(255) COMMENT '产品编码',
`productName` varchar(255) COMMENT '产品名称',
`matterId` bigint(20) COMMENT '事项matter id',
`matterId` bigint(20) COMMENT '事项id',
`matterCode` varchar(255) COMMENT '事项编码',
`matterName` varchar(255) COMMENT '事项名称',
`siteId` bigint(20) COMMENT '站点ID',
`deptId` bigint(20) COMMENT '部门ID',
`deptCode` varchar(256) COMMENT '部门编号',
`deptName` varchar(256) COMMENT '部门名称',
`materialName` varchar(1024) NOT NULL COMMENT '材料名',
`materiaFullName` varchar(1024) NOT NULL COMMENT '材料全名',
`materialName` varchar(1024) COMMENT '材料名',
`materiaFullName` varchar(1024) COMMENT '材料全名',
`materialId` bigint(20) COMMENT '材料id',
`source` tinyint(2) COMMENT '事项来源(0.政务网,1.自定义)',
`isRecommend` tinyint(2) COMMENT '是否推荐(0.未推荐,1.推荐)',
`total` int(8) COMMENT '填单次数',
`sort` int(4) COMMENT '排序',
`sampleName` varchar(255) COMMENT '样表名称',
`samplePath` varchar(255) COMMENT '样表地址',
......@@ -315,9 +314,8 @@ CREATE TABLE mortals_xhx_device_matter_datum(
`createUserId` bigint(20) COMMENT '创建用户',
`updateTime` datetime COMMENT '修改时间',
PRIMARY KEY (`id`)
,KEY `deviceCode` (`deviceCode`) USING BTREE
,KEY `siteId` (`siteId`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='设备事项申请材料业务';
......@@ -7,11 +7,11 @@ import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.device.model.vo.DeviceMatterDatumVo;
/**
* 设备事项申请材料业务实体对象
*
* @author zxfei
* @date 2023-02-25
*/
* 设备事项申请材料业务实体对象
*
* @author zxfei
* @date 2023-03-22
*/
public class DeviceMatterDatumEntity extends DeviceMatterDatumVo {
private static final long serialVersionUID = 1L;
......@@ -29,21 +29,17 @@ public class DeviceMatterDatumEntity extends DeviceMatterDatumVo {
*/
private String deviceName;
/**
* 产品id
*/
private Long productId;
/**
* 产品编码
* 事项id
*/
private String productCode;
private Long matterId;
/**
* 产品名称
* 事项编码
*/
private String productName;
private String matterCode;
/**
* 事项matter id
* 事项名称
*/
private Long matterId;
private String matterName;
/**
* 站点ID
*/
......@@ -68,6 +64,10 @@ public class DeviceMatterDatumEntity extends DeviceMatterDatumVo {
* 材料全名
*/
private String materiaFullName;
/**
* 材料id
*/
private Long materialId;
/**
* 事项来源(0.政务网,1.自定义)
*/
......@@ -77,10 +77,6 @@ public class DeviceMatterDatumEntity extends DeviceMatterDatumVo {
*/
private Integer isRecommend;
/**
* 填单次数
*/
private Integer total;
/**
* 排序
*/
private Integer sort;
......@@ -143,60 +139,46 @@ public class DeviceMatterDatumEntity extends DeviceMatterDatumVo {
this.deviceName = deviceName;
}
/**
* 获取 产品id
* 获取 事项id
* @return Long
*/
public Long getProductId(){
return productId;
public Long getMatterId(){
return matterId;
}
/**
* 设置 产品id
* @param productId
* 设置 事项id
* @param matterId
*/
public void setProductId(Long productId){
this.productId = productId;
public void setMatterId(Long matterId){
this.matterId = matterId;
}
/**
* 获取 产品编码
* 获取 事项编码
* @return String
*/
public String getProductCode(){
return productCode;
public String getMatterCode(){
return matterCode;
}
/**
* 设置 产品编码
* @param productCode
* 设置 事项编码
* @param matterCode
*/
public void setProductCode(String productCode){
this.productCode = productCode;
public void setMatterCode(String matterCode){
this.matterCode = matterCode;
}
/**
* 获取 产品名称
* 获取 事项名称
* @return String
*/
public String getProductName(){
return productName;
public String getMatterName(){
return matterName;
}
/**
* 设置 产品名称
* @param productName
* 设置 事项名称
* @param matterName
*/
public void setProductName(String productName){
this.productName = productName;
}
/**
* 获取 事项matter id
* @return Long
*/
public Long getMatterId(){
return matterId;
}
/**
* 设置 事项matter id
* @param matterId
*/
public void setMatterId(Long matterId){
this.matterId = matterId;
public void setMatterName(String matterName){
this.matterName = matterName;
}
/**
* 获取 站点ID
......@@ -282,6 +264,20 @@ public class DeviceMatterDatumEntity extends DeviceMatterDatumVo {
public void setMateriaFullName(String materiaFullName){
this.materiaFullName = materiaFullName;
}
/**
* 获取 材料id
* @return Long
*/
public Long getMaterialId(){
return materialId;
}
/**
* 设置 材料id
* @param materialId
*/
public void setMaterialId(Long materialId){
this.materialId = materialId;
}
/**
* 获取 事项来源(0.政务网,1.自定义)
* @return Integer
......@@ -311,20 +307,6 @@ public class DeviceMatterDatumEntity extends DeviceMatterDatumVo {
this.isRecommend = isRecommend;
}
/**
* 获取 填单次数
* @return Integer
*/
public Integer getTotal(){
return total;
}
/**
* 设置 填单次数
* @param total
*/
public void setTotal(Integer total){
this.total = total;
}
/**
* 获取 排序
* @return Integer
*/
......@@ -405,19 +387,18 @@ public class DeviceMatterDatumEntity extends DeviceMatterDatumVo {
sb.append(",deviceId:").append(getDeviceId());
sb.append(",deviceCode:").append(getDeviceCode());
sb.append(",deviceName:").append(getDeviceName());
sb.append(",productId:").append(getProductId());
sb.append(",productCode:").append(getProductCode());
sb.append(",productName:").append(getProductName());
sb.append(",matterId:").append(getMatterId());
sb.append(",matterCode:").append(getMatterCode());
sb.append(",matterName:").append(getMatterName());
sb.append(",siteId:").append(getSiteId());
sb.append(",deptId:").append(getDeptId());
sb.append(",deptCode:").append(getDeptCode());
sb.append(",deptName:").append(getDeptName());
sb.append(",materialName:").append(getMaterialName());
sb.append(",materiaFullName:").append(getMateriaFullName());
sb.append(",materialId:").append(getMaterialId());
sb.append(",source:").append(getSource());
sb.append(",isRecommend:").append(getIsRecommend());
sb.append(",total:").append(getTotal());
sb.append(",sort:").append(getSort());
sb.append(",sampleName:").append(getSampleName());
sb.append(",samplePath:").append(getSamplePath());
......@@ -433,13 +414,11 @@ public class DeviceMatterDatumEntity extends DeviceMatterDatumVo {
this.deviceName = null;
this.productId = null;
this.productCode = null;
this.matterId = null;
this.productName = null;
this.matterCode = null;
this.matterId = null;
this.matterName = null;
this.siteId = null;
......@@ -453,12 +432,12 @@ public class DeviceMatterDatumEntity extends DeviceMatterDatumVo {
this.materiaFullName = null;
this.materialId = null;
this.source = null;
this.isRecommend = null;
this.total = null;
this.sort = null;
this.sampleName = null;
......
......@@ -3,11 +3,11 @@ package com.mortals.xhx.module.device.model;
import java.util.List;
import com.mortals.xhx.module.device.model.DeviceMatterDatumEntity;
/**
* 设备事项申请材料业务查询对象
*
* @author zxfei
* @date 2023-02-25
*/
* 设备事项申请材料业务查询对象
*
* @author zxfei
* @date 2023-03-22
*/
public class DeviceMatterDatumQuery extends DeviceMatterDatumEntity {
/** 开始 主键,自增长 */
private Long idStart;
......@@ -49,46 +49,31 @@ public class DeviceMatterDatumQuery extends DeviceMatterDatumEntity {
/** 设备名称排除列表 */
private List <String> deviceNameNotList;
/** 开始 产品id */
private Long productIdStart;
/** 结束 产品id */
private Long productIdEnd;
/** 增加 产品id */
private Long productIdIncrement;
/** 产品id列表 */
private List <Long> productIdList;
/** 产品id排除列表 */
private List <Long> productIdNotList;
/** 产品编码 */
private List<String> productCodeList;
/** 产品编码排除列表 */
private List <String> productCodeNotList;
/** 产品名称 */
private List<String> productNameList;
/** 产品名称排除列表 */
private List <String> productNameNotList;
/** 开始 事项matter id */
/** 开始 事项id */
private Long matterIdStart;
/** 结束 事项matter id */
/** 结束 事项id */
private Long matterIdEnd;
/** 增加 事项matter id */
/** 增加 事项id */
private Long matterIdIncrement;
/** 事项matter id列表 */
/** 事项id列表 */
private List <Long> matterIdList;
/** 事项matter id排除列表 */
/** 事项id排除列表 */
private List <Long> matterIdNotList;
/** 事项编码 */
private List<String> matterCodeList;
/** 事项编码排除列表 */
private List <String> matterCodeNotList;
/** 事项名称 */
private List<String> matterNameList;
/** 事项名称排除列表 */
private List <String> matterNameNotList;
/** 开始 站点ID */
private Long siteIdStart;
......@@ -139,6 +124,21 @@ public class DeviceMatterDatumQuery extends DeviceMatterDatumEntity {
/** 材料全名排除列表 */
private List <String> materiaFullNameNotList;
/** 开始 材料id */
private Long materialIdStart;
/** 结束 材料id */
private Long materialIdEnd;
/** 增加 材料id */
private Long materialIdIncrement;
/** 材料id列表 */
private List <Long> materialIdList;
/** 材料id排除列表 */
private List <Long> materialIdNotList;
/** 开始 事项来源(0.政务网,1.自定义) */
private Integer sourceStart;
......@@ -169,21 +169,6 @@ public class DeviceMatterDatumQuery extends DeviceMatterDatumEntity {
/** 是否推荐(0.未推荐,1.推荐)排除列表 */
private List <Integer> isRecommendNotList;
/** 开始 填单次数 */
private Integer totalStart;
/** 结束 填单次数 */
private Integer totalEnd;
/** 增加 填单次数 */
private Integer totalIncrement;
/** 填单次数列表 */
private List <Integer> totalList;
/** 填单次数排除列表 */
private List <Integer> totalNotList;
/** 开始 排序 */
private Integer sortStart;
......@@ -476,231 +461,150 @@ public class DeviceMatterDatumQuery extends DeviceMatterDatumEntity {
}
/**
* 获取 开始 产品id
* @return productIdStart
*/
public Long getProductIdStart(){
return this.productIdStart;
}
/**
* 设置 开始 产品id
* @param productIdStart
*/
public void setProductIdStart(Long productIdStart){
this.productIdStart = productIdStart;
}
/**
* 获取 结束 产品id
* @return $productIdEnd
*/
public Long getProductIdEnd(){
return this.productIdEnd;
}
/**
* 设置 结束 产品id
* @param productIdEnd
*/
public void setProductIdEnd(Long productIdEnd){
this.productIdEnd = productIdEnd;
}
/**
* 获取 增加 产品id
* @return productIdIncrement
*/
public Long getProductIdIncrement(){
return this.productIdIncrement;
}
/**
* 设置 增加 产品id
* @param productIdIncrement
*/
public void setProductIdIncrement(Long productIdIncrement){
this.productIdIncrement = productIdIncrement;
}
/**
* 获取 产品id
* @return productIdList
*/
public List<Long> getProductIdList(){
return this.productIdList;
}
/**
* 设置 产品id
* @param productIdList
*/
public void setProductIdList(List<Long> productIdList){
this.productIdList = productIdList;
}
/**
* 获取 产品id
* @return productIdNotList
*/
public List<Long> getProductIdNotList(){
return this.productIdNotList;
}
/**
* 设置 产品id
* @param productIdNotList
* 获取 开始 事项id
* @return matterIdStart
*/
public void setProductIdNotList(List<Long> productIdNotList){
this.productIdNotList = productIdNotList;
public Long getMatterIdStart(){
return this.matterIdStart;
}
/**
* 获取 产品编码
* @return productCodeList
* 设置 开始 事项id
* @param matterIdStart
*/
public List<String> getProductCodeList(){
return this.productCodeList;
public void setMatterIdStart(Long matterIdStart){
this.matterIdStart = matterIdStart;
}
/**
* 设置 产品编码
* @param productCodeList
* 获取 结束 事项id
* @return $matterIdEnd
*/
public void setProductCodeList(List<String> productCodeList){
this.productCodeList = productCodeList;
public Long getMatterIdEnd(){
return this.matterIdEnd;
}
/**
* 获取 产品编码
* @return productCodeNotList
* 设置 结束 事项id
* @param matterIdEnd
*/
public List<String> getProductCodeNotList(){
return this.productCodeNotList;
public void setMatterIdEnd(Long matterIdEnd){
this.matterIdEnd = matterIdEnd;
}
/**
* 设置 产品编码
* @param productCodeNotList
* 获取 增加 事项id
* @return matterIdIncrement
*/
public void setProductCodeNotList(List<String> productCodeNotList){
this.productCodeNotList = productCodeNotList;
public Long getMatterIdIncrement(){
return this.matterIdIncrement;
}
/**
* 获取 产品名称
* @return productNameList
* 设置 增加 事项id
* @param matterIdIncrement
*/
public List<String> getProductNameList(){
return this.productNameList;
public void setMatterIdIncrement(Long matterIdIncrement){
this.matterIdIncrement = matterIdIncrement;
}
/**
* 设置 产品名称
* @param productNameList
* 获取 事项id
* @return matterIdList
*/
public void setProductNameList(List<String> productNameList){
this.productNameList = productNameList;
public List<Long> getMatterIdList(){
return this.matterIdList;
}
/**
* 获取 产品名称
* @return productNameNotList
* 设置 事项id
* @param matterIdList
*/
public List<String> getProductNameNotList(){
return this.productNameNotList;
public void setMatterIdList(List<Long> matterIdList){
this.matterIdList = matterIdList;
}
/**
* 设置 产品名称
* @param productNameNotList
* 获取 事项id
* @return matterIdNotList
*/
public void setProductNameNotList(List<String> productNameNotList){
this.productNameNotList = productNameNotList;
public List<Long> getMatterIdNotList(){
return this.matterIdNotList;
}
/**
* 获取 开始 事项matter id
* @return matterIdStart
* 设置 事项id
* @param matterIdNotList
*/
public Long getMatterIdStart(){
return this.matterIdStart;
public void setMatterIdNotList(List<Long> matterIdNotList){
this.matterIdNotList = matterIdNotList;
}
/**
* 设置 开始 事项matter id
* @param matterIdStart
*/
public void setMatterIdStart(Long matterIdStart){
this.matterIdStart = matterIdStart;
}
/**
* 获取 结束 事项matter id
* @return $matterIdEnd
* 获取 事项编码
* @return matterCodeList
*/
public Long getMatterIdEnd(){
return this.matterIdEnd;
public List<String> getMatterCodeList(){
return this.matterCodeList;
}
/**
* 设置 结束 事项matter id
* @param matterIdEnd
* 设置 事项编码
* @param matterCodeList
*/
public void setMatterIdEnd(Long matterIdEnd){
this.matterIdEnd = matterIdEnd;
public void setMatterCodeList(List<String> matterCodeList){
this.matterCodeList = matterCodeList;
}
/**
* 获取 增加 事项matter id
* @return matterIdIncrement
* 获取 事项编码
* @return matterCodeNotList
*/
public Long getMatterIdIncrement(){
return this.matterIdIncrement;
public List<String> getMatterCodeNotList(){
return this.matterCodeNotList;
}
/**
* 设置 增加 事项matter id
* @param matterIdIncrement
* 设置 事项编码
* @param matterCodeNotList
*/
public void setMatterIdIncrement(Long matterIdIncrement){
this.matterIdIncrement = matterIdIncrement;
public void setMatterCodeNotList(List<String> matterCodeNotList){
this.matterCodeNotList = matterCodeNotList;
}
/**
* 获取 事项matter id
* @return matterIdList
* 获取 事项名称
* @return matterNameList
*/
public List<Long> getMatterIdList(){
return this.matterIdList;
public List<String> getMatterNameList(){
return this.matterNameList;
}
/**
* 设置 事项matter id
* @param matterIdList
* 设置 事项名称
* @param matterNameList
*/
public void setMatterIdList(List<Long> matterIdList){
this.matterIdList = matterIdList;
public void setMatterNameList(List<String> matterNameList){
this.matterNameList = matterNameList;
}
/**
* 获取 事项matter id
* @return matterIdNotList
* 获取 事项名称
* @return matterNameNotList
*/
public List<Long> getMatterIdNotList(){
return this.matterIdNotList;
public List<String> getMatterNameNotList(){
return this.matterNameNotList;
}
/**
* 设置 事项matter id
* @param matterIdNotList
* 设置 事项名称
* @param matterNameNotList
*/
public void setMatterIdNotList(List<Long> matterIdNotList){
this.matterIdNotList = matterIdNotList;
public void setMatterNameNotList(List<String> matterNameNotList){
this.matterNameNotList = matterNameNotList;
}
/**
* 获取 开始 站点ID
* @return siteIdStart
......@@ -991,6 +895,87 @@ public class DeviceMatterDatumQuery extends DeviceMatterDatumEntity {
this.materiaFullNameNotList = materiaFullNameNotList;
}
/**
* 获取 开始 材料id
* @return materialIdStart
*/
public Long getMaterialIdStart(){
return this.materialIdStart;
}
/**
* 设置 开始 材料id
* @param materialIdStart
*/
public void setMaterialIdStart(Long materialIdStart){
this.materialIdStart = materialIdStart;
}
/**
* 获取 结束 材料id
* @return $materialIdEnd
*/
public Long getMaterialIdEnd(){
return this.materialIdEnd;
}
/**
* 设置 结束 材料id
* @param materialIdEnd
*/
public void setMaterialIdEnd(Long materialIdEnd){
this.materialIdEnd = materialIdEnd;
}
/**
* 获取 增加 材料id
* @return materialIdIncrement
*/
public Long getMaterialIdIncrement(){
return this.materialIdIncrement;
}
/**
* 设置 增加 材料id
* @param materialIdIncrement
*/
public void setMaterialIdIncrement(Long materialIdIncrement){
this.materialIdIncrement = materialIdIncrement;
}
/**
* 获取 材料id
* @return materialIdList
*/
public List<Long> getMaterialIdList(){
return this.materialIdList;
}
/**
* 设置 材料id
* @param materialIdList
*/
public void setMaterialIdList(List<Long> materialIdList){
this.materialIdList = materialIdList;
}
/**
* 获取 材料id
* @return materialIdNotList
*/
public List<Long> getMaterialIdNotList(){
return this.materialIdNotList;
}
/**
* 设置 材料id
* @param materialIdNotList
*/
public void setMaterialIdNotList(List<Long> materialIdNotList){
this.materialIdNotList = materialIdNotList;
}
/**
* 获取 开始 事项来源(0.政务网,1.自定义)
* @return sourceStart
......@@ -1153,87 +1138,6 @@ public class DeviceMatterDatumQuery extends DeviceMatterDatumEntity {
}
/**
* 获取 开始 填单次数
* @return totalStart
*/
public Integer getTotalStart(){
return this.totalStart;
}
/**
* 设置 开始 填单次数
* @param totalStart
*/
public void setTotalStart(Integer totalStart){
this.totalStart = totalStart;
}
/**
* 获取 结束 填单次数
* @return $totalEnd
*/
public Integer getTotalEnd(){
return this.totalEnd;
}
/**
* 设置 结束 填单次数
* @param totalEnd
*/
public void setTotalEnd(Integer totalEnd){
this.totalEnd = totalEnd;
}
/**
* 获取 增加 填单次数
* @return totalIncrement
*/
public Integer getTotalIncrement(){
return this.totalIncrement;
}
/**
* 设置 增加 填单次数
* @param totalIncrement
*/
public void setTotalIncrement(Integer totalIncrement){
this.totalIncrement = totalIncrement;
}
/**
* 获取 填单次数
* @return totalList
*/
public List<Integer> getTotalList(){
return this.totalList;
}
/**
* 设置 填单次数
* @param totalList
*/
public void setTotalList(List<Integer> totalList){
this.totalList = totalList;
}
/**
* 获取 填单次数
* @return totalNotList
*/
public List<Integer> getTotalNotList(){
return this.totalNotList;
}
/**
* 设置 填单次数
* @param totalNotList
*/
public void setTotalNotList(List<Integer> totalNotList){
this.totalNotList = totalNotList;
}
/**
* 获取 开始 排序
* @return sortStart
......@@ -1703,148 +1607,94 @@ public class DeviceMatterDatumQuery extends DeviceMatterDatumEntity {
}
/**
* 设置 产品id
* @param productId
*/
public DeviceMatterDatumQuery productId(Long productId){
setProductId(productId);
return this;
}
/**
* 设置 开始 产品id
* @param productIdStart
*/
public DeviceMatterDatumQuery productIdStart(Long productIdStart){
this.productIdStart = productIdStart;
return this;
}
/**
* 设置 结束 产品id
* @param productIdEnd
*/
public DeviceMatterDatumQuery productIdEnd(Long productIdEnd){
this.productIdEnd = productIdEnd;
return this;
}
/**
* 设置 增加 产品id
* @param productIdIncrement
*/
public DeviceMatterDatumQuery productIdIncrement(Long productIdIncrement){
this.productIdIncrement = productIdIncrement;
return this;
}
/**
* 设置 产品id
* @param productIdList
* 设置 事项id
* @param matterId
*/
public DeviceMatterDatumQuery productIdList(List<Long> productIdList){
this.productIdList = productIdList;
public DeviceMatterDatumQuery matterId(Long matterId){
setMatterId(matterId);
return this;
}
/**
* 设置 产品id
* @param productIdNotList
* 设置 开始 事项id
* @param matterIdStart
*/
public DeviceMatterDatumQuery productIdNotList(List<Long> productIdNotList){
this.productIdNotList = productIdNotList;
public DeviceMatterDatumQuery matterIdStart(Long matterIdStart){
this.matterIdStart = matterIdStart;
return this;
}
/**
* 设置 产品编码
* @param productCode
* 设置 结束 事项id
* @param matterIdEnd
*/
public DeviceMatterDatumQuery productCode(String productCode){
setProductCode(productCode);
public DeviceMatterDatumQuery matterIdEnd(Long matterIdEnd){
this.matterIdEnd = matterIdEnd;
return this;
}
/**
* 设置 产品编码
* @param productCodeList
* 设置 增加 事项id
* @param matterIdIncrement
*/
public DeviceMatterDatumQuery productCodeList(List<String> productCodeList){
this.productCodeList = productCodeList;
public DeviceMatterDatumQuery matterIdIncrement(Long matterIdIncrement){
this.matterIdIncrement = matterIdIncrement;
return this;
}
/**
* 设置 产品名称
* @param productName
* 设置 事项id
* @param matterIdList
*/
public DeviceMatterDatumQuery productName(String productName){
setProductName(productName);
public DeviceMatterDatumQuery matterIdList(List<Long> matterIdList){
this.matterIdList = matterIdList;
return this;
}
/**
* 设置 产品名称
* @param productNameList
* 设置 事项id
* @param matterIdNotList
*/
public DeviceMatterDatumQuery productNameList(List<String> productNameList){
this.productNameList = productNameList;
public DeviceMatterDatumQuery matterIdNotList(List<Long> matterIdNotList){
this.matterIdNotList = matterIdNotList;
return this;
}
/**
* 设置 事项matter id
* @param matterId
*/
public DeviceMatterDatumQuery matterId(Long matterId){
setMatterId(matterId);
return this;
}
/**
* 设置 开始 事项matter id
* @param matterIdStart
* 设置 事项编码
* @param matterCode
*/
public DeviceMatterDatumQuery matterIdStart(Long matterIdStart){
this.matterIdStart = matterIdStart;
public DeviceMatterDatumQuery matterCode(String matterCode){
setMatterCode(matterCode);
return this;
}
/**
* 设置 结束 事项matter id
* @param matterIdEnd
* 设置 事项编码
* @param matterCodeList
*/
public DeviceMatterDatumQuery matterIdEnd(Long matterIdEnd){
this.matterIdEnd = matterIdEnd;
public DeviceMatterDatumQuery matterCodeList(List<String> matterCodeList){
this.matterCodeList = matterCodeList;
return this;
}
/**
* 设置 增加 事项matter id
* @param matterIdIncrement
*/
public DeviceMatterDatumQuery matterIdIncrement(Long matterIdIncrement){
this.matterIdIncrement = matterIdIncrement;
return this;
}
/**
* 设置 事项matter id
* @param matterIdList
* 设置 事项名称
* @param matterName
*/
public DeviceMatterDatumQuery matterIdList(List<Long> matterIdList){
this.matterIdList = matterIdList;
public DeviceMatterDatumQuery matterName(String matterName){
setMatterName(matterName);
return this;
}
/**
* 设置 事项matter id
* @param matterIdNotList
* 设置 事项名称
* @param matterNameList
*/
public DeviceMatterDatumQuery matterIdNotList(List<Long> matterIdNotList){
this.matterIdNotList = matterIdNotList;
public DeviceMatterDatumQuery matterNameList(List<String> matterNameList){
this.matterNameList = matterNameList;
return this;
}
......@@ -2032,6 +1882,60 @@ public class DeviceMatterDatumQuery extends DeviceMatterDatumEntity {
return this;
}
/**
* 设置 材料id
* @param materialId
*/
public DeviceMatterDatumQuery materialId(Long materialId){
setMaterialId(materialId);
return this;
}
/**
* 设置 开始 材料id
* @param materialIdStart
*/
public DeviceMatterDatumQuery materialIdStart(Long materialIdStart){
this.materialIdStart = materialIdStart;
return this;
}
/**
* 设置 结束 材料id
* @param materialIdEnd
*/
public DeviceMatterDatumQuery materialIdEnd(Long materialIdEnd){
this.materialIdEnd = materialIdEnd;
return this;
}
/**
* 设置 增加 材料id
* @param materialIdIncrement
*/
public DeviceMatterDatumQuery materialIdIncrement(Long materialIdIncrement){
this.materialIdIncrement = materialIdIncrement;
return this;
}
/**
* 设置 材料id
* @param materialIdList
*/
public DeviceMatterDatumQuery materialIdList(List<Long> materialIdList){
this.materialIdList = materialIdList;
return this;
}
/**
* 设置 材料id
* @param materialIdNotList
*/
public DeviceMatterDatumQuery materialIdNotList(List<Long> materialIdNotList){
this.materialIdNotList = materialIdNotList;
return this;
}
/**
* 设置 事项来源(0.政务网,1.自定义)
* @param source
......@@ -2140,60 +2044,6 @@ public class DeviceMatterDatumQuery extends DeviceMatterDatumEntity {
return this;
}
/**
* 设置 填单次数
* @param total
*/
public DeviceMatterDatumQuery total(Integer total){
setTotal(total);
return this;
}
/**
* 设置 开始 填单次数
* @param totalStart
*/
public DeviceMatterDatumQuery totalStart(Integer totalStart){
this.totalStart = totalStart;
return this;
}
/**
* 设置 结束 填单次数
* @param totalEnd
*/
public DeviceMatterDatumQuery totalEnd(Integer totalEnd){
this.totalEnd = totalEnd;
return this;
}
/**
* 设置 增加 填单次数
* @param totalIncrement
*/
public DeviceMatterDatumQuery totalIncrement(Integer totalIncrement){
this.totalIncrement = totalIncrement;
return this;
}
/**
* 设置 填单次数
* @param totalList
*/
public DeviceMatterDatumQuery totalList(List<Integer> totalList){
this.totalList = totalList;
return this;
}
/**
* 设置 填单次数
* @param totalNotList
*/
public DeviceMatterDatumQuery totalNotList(List<Integer> totalNotList){
this.totalNotList = totalNotList;
return this;
}
/**
* 设置 排序
* @param sort
......
package com.mortals.xhx.module.device.service.impl;
import com.mortals.xhx.module.device.model.DeviceEntity;
import com.mortals.xhx.module.device.service.DeviceService;
import com.mortals.xhx.module.matter.model.MatterDatumEntity;
import com.mortals.xhx.module.matter.model.MatterEntity;
import com.mortals.xhx.module.matter.service.MatterDatumService;
import com.mortals.xhx.module.matter.service.MatterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException;
......@@ -6,6 +13,8 @@ import com.mortals.framework.model.Context;
import com.mortals.xhx.module.device.dao.DeviceMatterDatumDao;
import com.mortals.xhx.module.device.model.DeviceMatterDatumEntity;
import com.mortals.xhx.module.device.service.DeviceMatterDatumService;
import org.springframework.util.ObjectUtils;
/**
* DeviceMatterDatumService
* 设备事项申请材料业务 service实现
......@@ -16,4 +25,52 @@ import com.mortals.xhx.module.device.service.DeviceMatterDatumService;
@Service("deviceMatterDatumService")
public class DeviceMatterDatumServiceImpl extends AbstractCRUDServiceImpl<DeviceMatterDatumDao, DeviceMatterDatumEntity, Long> implements DeviceMatterDatumService {
@Autowired
private MatterService matterService;
@Autowired
private MatterDatumService matterDatumService;
@Autowired
private DeviceService deviceService;
@Override
protected void saveBefore(DeviceMatterDatumEntity entity, Context context) throws AppException {
super.saveBefore(entity, context);
//entity.getMatterId()
if(!ObjectUtils.isEmpty(entity.getMatterId())){
MatterEntity matterEntity = matterService.get(entity.getMatterId());
if(!ObjectUtils.isEmpty(matterEntity)){
entity.setMatterCode(matterEntity.getMatterNo());
entity.setMatterName(matterEntity.getMatterName());
entity.setDeptId(matterEntity.getDeptId());
entity.setDeptCode(matterEntity.getDeptCode());
entity.setDeptName(matterEntity.getDeptName());
}
}
if(!ObjectUtils.isEmpty(entity.getMaterialId())){
MatterDatumEntity matterDatumEntity = matterDatumService.get(entity.getMaterialId());
if(!ObjectUtils.isEmpty(matterDatumEntity)){
entity.setMaterialName(matterDatumEntity.getMaterialName());
entity.setIsRecommend(matterDatumEntity.getIsRecommend());
entity.setSampleName(matterDatumEntity.getSampleName());
entity.setSamplePath(matterDatumEntity.getSamplePath());
entity.setPreViewPath(matterDatumEntity.getPreViewPath());
entity.setSource(matterDatumEntity.getSource());
}
}
if(!ObjectUtils.isEmpty(entity.getDeviceId())){
DeviceEntity deviceEntity = deviceService.get(entity.getDeviceId());
if(!ObjectUtils.isEmpty(deviceEntity)){
entity.setDeviceCode(deviceEntity.getDeviceCode());
entity.setDeviceName(deviceEntity.getDeviceName());
}
}
}
@Override
protected void updateBefore(DeviceMatterDatumEntity entity, Context context) throws AppException {
super.updateBefore(entity, context);
}
}
\ No newline at end of file
package com.mortals.xhx.module.device.service.impl;
import com.mortals.xhx.module.matter.service.MatterDatumService;
import com.mortals.xhx.module.matter.service.MatterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException;
......@@ -16,4 +19,16 @@ import com.mortals.xhx.module.device.service.DeviceService;
@Service("deviceService")
public class DeviceServiceImpl extends AbstractCRUDServiceImpl<DeviceDao, DeviceEntity, Long> implements DeviceService {
@Autowired
private MatterService matterService;
@Autowired
private MatterDatumService matterDatumService;
@Override
protected void saveBefore(DeviceEntity entity, Context context) throws AppException {
super.saveBefore(entity, context);
}
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd">
"mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.device.dao.ibatis.DeviceMatterDatumDaoImpl">
<!-- 字段和属性映射 -->
......@@ -9,19 +9,18 @@
<result property="deviceId" column="deviceId" />
<result property="deviceCode" column="deviceCode" />
<result property="deviceName" column="deviceName" />
<result property="productId" column="productId" />
<result property="productCode" column="productCode" />
<result property="productName" column="productName" />
<result property="matterId" column="matterId" />
<result property="matterCode" column="matterCode" />
<result property="matterName" column="matterName" />
<result property="siteId" column="siteId" />
<result property="deptId" column="deptId" />
<result property="deptCode" column="deptCode" />
<result property="deptName" column="deptName" />
<result property="materialName" column="materialName" />
<result property="materiaFullName" column="materiaFullName" />
<result property="materialId" column="materialId" />
<result property="source" column="source" />
<result property="isRecommend" column="isRecommend" />
<result property="total" column="total" />
<result property="sort" column="sort" />
<result property="sampleName" column="sampleName" />
<result property="samplePath" column="samplePath" />
......@@ -48,18 +47,15 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('deviceName') or colPickMode == 1 and data.containsKey('deviceName')))">
a.deviceName,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('productId') or colPickMode == 1 and data.containsKey('productId')))">
a.productId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('productCode') or colPickMode == 1 and data.containsKey('productCode')))">
a.productCode,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('productName') or colPickMode == 1 and data.containsKey('productName')))">
a.productName,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterId') or colPickMode == 1 and data.containsKey('matterId')))">
a.matterId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterCode') or colPickMode == 1 and data.containsKey('matterCode')))">
a.matterCode,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterName') or colPickMode == 1 and data.containsKey('matterName')))">
a.matterName,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('siteId') or colPickMode == 1 and data.containsKey('siteId')))">
a.siteId,
</if>
......@@ -78,15 +74,15 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('materiaFullName') or colPickMode == 1 and data.containsKey('materiaFullName')))">
a.materiaFullName,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('materialId') or colPickMode == 1 and data.containsKey('materialId')))">
a.materialId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('source') or colPickMode == 1 and data.containsKey('source')))">
a.source,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('isRecommend') or colPickMode == 1 and data.containsKey('isRecommend')))">
a.isRecommend,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('total') or colPickMode == 1 and data.containsKey('total')))">
a.total,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('sort') or colPickMode == 1 and data.containsKey('sort')))">
a.sort,
</if>
......@@ -113,18 +109,18 @@
<!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="DeviceMatterDatumEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_device_matter_datum
(deviceId,deviceCode,deviceName,productId,productCode,productName,matterId,siteId,deptId,deptCode,deptName,materialName,materiaFullName,source,isRecommend,total,sort,sampleName,samplePath,preViewPath,createTime,createUserId,updateTime)
(deviceId,deviceCode,deviceName,matterId,matterCode,matterName,siteId,deptId,deptCode,deptName,materialName,materiaFullName,materialId,source,isRecommend,sort,sampleName,samplePath,preViewPath,createTime,createUserId,updateTime)
VALUES
(#{deviceId},#{deviceCode},#{deviceName},#{productId},#{productCode},#{productName},#{matterId},#{siteId},#{deptId},#{deptCode},#{deptName},#{materialName},#{materiaFullName},#{source},#{isRecommend},#{total},#{sort},#{sampleName},#{samplePath},#{preViewPath},#{createTime},#{createUserId},#{updateTime})
(#{deviceId},#{deviceCode},#{deviceName},#{matterId},#{matterCode},#{matterName},#{siteId},#{deptId},#{deptCode},#{deptName},#{materialName},#{materiaFullName},#{materialId},#{source},#{isRecommend},#{sort},#{sampleName},#{samplePath},#{preViewPath},#{createTime},#{createUserId},#{updateTime})
</insert>
<!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_device_matter_datum
(deviceId,deviceCode,deviceName,productId,productCode,productName,matterId,siteId,deptId,deptCode,deptName,materialName,materiaFullName,source,isRecommend,total,sort,sampleName,samplePath,preViewPath,createTime,createUserId,updateTime)
(deviceId,deviceCode,deviceName,matterId,matterCode,matterName,siteId,deptId,deptCode,deptName,materialName,materiaFullName,materialId,source,isRecommend,sort,sampleName,samplePath,preViewPath,createTime,createUserId,updateTime)
VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.deviceId},#{item.deviceCode},#{item.deviceName},#{item.productId},#{item.productCode},#{item.productName},#{item.matterId},#{item.siteId},#{item.deptId},#{item.deptCode},#{item.deptName},#{item.materialName},#{item.materiaFullName},#{item.source},#{item.isRecommend},#{item.total},#{item.sort},#{item.sampleName},#{item.samplePath},#{item.preViewPath},#{item.createTime},#{item.createUserId},#{item.updateTime})
(#{item.deviceId},#{item.deviceCode},#{item.deviceName},#{item.matterId},#{item.matterCode},#{item.matterName},#{item.siteId},#{item.deptId},#{item.deptCode},#{item.deptName},#{item.materialName},#{item.materiaFullName},#{item.materialId},#{item.source},#{item.isRecommend},#{item.sort},#{item.sampleName},#{item.samplePath},#{item.preViewPath},#{item.createTime},#{item.createUserId},#{item.updateTime})
</foreach>
</insert>
......@@ -146,24 +142,18 @@
<if test="(colPickMode==0 and data.containsKey('deviceName')) or (colPickMode==1 and !data.containsKey('deviceName'))">
a.deviceName=#{data.deviceName},
</if>
<if test="(colPickMode==0 and data.containsKey('productId')) or (colPickMode==1 and !data.containsKey('productId'))">
a.productId=#{data.productId},
</if>
<if test="(colPickMode==0 and data.containsKey('productIdIncrement')) or (colPickMode==1 and !data.containsKey('productIdIncrement'))">
a.productId=ifnull(a.productId,0) + #{data.productIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('productCode')) or (colPickMode==1 and !data.containsKey('productCode'))">
a.productCode=#{data.productCode},
</if>
<if test="(colPickMode==0 and data.containsKey('productName')) or (colPickMode==1 and !data.containsKey('productName'))">
a.productName=#{data.productName},
</if>
<if test="(colPickMode==0 and data.containsKey('matterId')) or (colPickMode==1 and !data.containsKey('matterId'))">
a.matterId=#{data.matterId},
</if>
<if test="(colPickMode==0 and data.containsKey('matterIdIncrement')) or (colPickMode==1 and !data.containsKey('matterIdIncrement'))">
a.matterId=ifnull(a.matterId,0) + #{data.matterIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('matterCode')) or (colPickMode==1 and !data.containsKey('matterCode'))">
a.matterCode=#{data.matterCode},
</if>
<if test="(colPickMode==0 and data.containsKey('matterName')) or (colPickMode==1 and !data.containsKey('matterName'))">
a.matterName=#{data.matterName},
</if>
<if test="(colPickMode==0 and data.containsKey('siteId')) or (colPickMode==1 and !data.containsKey('siteId'))">
a.siteId=#{data.siteId},
</if>
......@@ -188,6 +178,12 @@
<if test="(colPickMode==0 and data.containsKey('materiaFullName')) or (colPickMode==1 and !data.containsKey('materiaFullName'))">
a.materiaFullName=#{data.materiaFullName},
</if>
<if test="(colPickMode==0 and data.containsKey('materialId')) or (colPickMode==1 and !data.containsKey('materialId'))">
a.materialId=#{data.materialId},
</if>
<if test="(colPickMode==0 and data.containsKey('materialIdIncrement')) or (colPickMode==1 and !data.containsKey('materialIdIncrement'))">
a.materialId=ifnull(a.materialId,0) + #{data.materialIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('source')) or (colPickMode==1 and !data.containsKey('source'))">
a.source=#{data.source},
</if>
......@@ -200,12 +196,6 @@
<if test="(colPickMode==0 and data.containsKey('isRecommendIncrement')) or (colPickMode==1 and !data.containsKey('isRecommendIncrement'))">
a.isRecommend=ifnull(a.isRecommend,0) + #{data.isRecommendIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('total')) or (colPickMode==1 and !data.containsKey('total'))">
a.total=#{data.total},
</if>
<if test="(colPickMode==0 and data.containsKey('totalIncrement')) or (colPickMode==1 and !data.containsKey('totalIncrement'))">
a.total=ifnull(a.total,0) + #{data.totalIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('sort')) or (colPickMode==1 and !data.containsKey('sort'))">
a.sort=#{data.sort},
</if>
......@@ -271,43 +261,31 @@
</if>
</foreach>
</trim>
<trim prefix="productId=(case" suffix="ELSE productId end),">
<trim prefix="matterId=(case" suffix="ELSE matterId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('productId')) or (colPickMode==1 and !item.containsKey('productId'))">
when a.id=#{item.id} then #{item.productId}
<when test="(colPickMode==0 and item.containsKey('matterId')) or (colPickMode==1 and !item.containsKey('matterId'))">
when a.id=#{item.id} then #{item.matterId}
</when>
<when test="(colPickMode==0 and item.containsKey('productIdIncrement')) or (colPickMode==1 and !item.containsKey('productIdIncrement'))">
when a.id=#{item.id} then ifnull(a.productId,0) + #{item.productIdIncrement}
<when test="(colPickMode==0 and item.containsKey('matterIdIncrement')) or (colPickMode==1 and !item.containsKey('matterIdIncrement'))">
when a.id=#{item.id} then ifnull(a.matterId,0) + #{item.matterIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="productCode=(case" suffix="ELSE productCode end),">
<trim prefix="matterCode=(case" suffix="ELSE matterCode end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('productCode')) or (colPickMode==1 and !item.containsKey('productCode'))">
when a.id=#{item.id} then #{item.productCode}
<if test="(colPickMode==0 and item.containsKey('matterCode')) or (colPickMode==1 and !item.containsKey('matterCode'))">
when a.id=#{item.id} then #{item.matterCode}
</if>
</foreach>
</trim>
<trim prefix="productName=(case" suffix="ELSE productName end),">
<trim prefix="matterName=(case" suffix="ELSE matterName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('productName')) or (colPickMode==1 and !item.containsKey('productName'))">
when a.id=#{item.id} then #{item.productName}
<if test="(colPickMode==0 and item.containsKey('matterName')) or (colPickMode==1 and !item.containsKey('matterName'))">
when a.id=#{item.id} then #{item.matterName}
</if>
</foreach>
</trim>
<trim prefix="matterId=(case" suffix="ELSE matterId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('matterId')) or (colPickMode==1 and !item.containsKey('matterId'))">
when a.id=#{item.id} then #{item.matterId}
</when>
<when test="(colPickMode==0 and item.containsKey('matterIdIncrement')) or (colPickMode==1 and !item.containsKey('matterIdIncrement'))">
when a.id=#{item.id} then ifnull(a.matterId,0) + #{item.matterIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="siteId=(case" suffix="ELSE siteId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
......@@ -361,6 +339,18 @@
</if>
</foreach>
</trim>
<trim prefix="materialId=(case" suffix="ELSE materialId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('materialId')) or (colPickMode==1 and !item.containsKey('materialId'))">
when a.id=#{item.id} then #{item.materialId}
</when>
<when test="(colPickMode==0 and item.containsKey('materialIdIncrement')) or (colPickMode==1 and !item.containsKey('materialIdIncrement'))">
when a.id=#{item.id} then ifnull(a.materialId,0) + #{item.materialIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="source=(case" suffix="ELSE source end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
......@@ -385,18 +375,6 @@
</choose>
</foreach>
</trim>
<trim prefix="total=(case" suffix="ELSE total end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('total')) or (colPickMode==1 and !item.containsKey('total'))">
when a.id=#{item.id} then #{item.total}
</when>
<when test="(colPickMode==0 and item.containsKey('totalIncrement')) or (colPickMode==1 and !item.containsKey('totalIncrement'))">
when a.id=#{item.id} then ifnull(a.total,0) + #{item.totalIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="sort=(case" suffix="ELSE sort end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
......@@ -668,102 +646,75 @@
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('productId')">
<if test="conditionParamRef.productId != null ">
${_conditionType_} a.productId = #{${_conditionParam_}.productId}
<if test="conditionParamRef.containsKey('matterId')">
<if test="conditionParamRef.matterId != null ">
${_conditionType_} a.matterId = #{${_conditionParam_}.matterId}
</if>
<if test="conditionParamRef.productId == null">
${_conditionType_} a.productId is null
<if test="conditionParamRef.matterId == null">
${_conditionType_} a.matterId is null
</if>
</if>
<if test="conditionParamRef.containsKey('productIdList') and conditionParamRef.productIdList.size() > 0">
${_conditionType_} a.productId in
<foreach collection="conditionParamRef.productIdList" open="(" close=")" index="index" item="item" separator=",">
<if test="conditionParamRef.containsKey('matterIdList') and conditionParamRef.matterIdList.size() > 0">
${_conditionType_} a.matterId in
<foreach collection="conditionParamRef.matterIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('productIdNotList') and conditionParamRef.productIdNotList.size() > 0">
${_conditionType_} a.productId not in
<foreach collection="conditionParamRef.productIdNotList" open="(" close=")" index="index" item="item" separator=",">
<if test="conditionParamRef.containsKey('matterIdNotList') and conditionParamRef.matterIdNotList.size() > 0">
${_conditionType_} a.matterId not in
<foreach collection="conditionParamRef.matterIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('productIdStart') and conditionParamRef.productIdStart != null">
${_conditionType_} a.productId <![CDATA[ >= ]]> #{${_conditionParam_}.productIdStart}
<if test="conditionParamRef.containsKey('matterIdStart') and conditionParamRef.matterIdStart != null">
${_conditionType_} a.matterId <![CDATA[ >= ]]> #{${_conditionParam_}.matterIdStart}
</if>
<if test="conditionParamRef.containsKey('productIdEnd') and conditionParamRef.productIdEnd != null">
${_conditionType_} a.productId <![CDATA[ <= ]]> #{${_conditionParam_}.productIdEnd}
<if test="conditionParamRef.containsKey('matterIdEnd') and conditionParamRef.matterIdEnd != null">
${_conditionType_} a.matterId <![CDATA[ <= ]]> #{${_conditionParam_}.matterIdEnd}
</if>
<if test="conditionParamRef.containsKey('productCode')">
<if test="conditionParamRef.productCode != null and conditionParamRef.productCode != ''">
${_conditionType_} a.productCode like #{${_conditionParam_}.productCode}
<if test="conditionParamRef.containsKey('matterCode')">
<if test="conditionParamRef.matterCode != null and conditionParamRef.matterCode != ''">
${_conditionType_} a.matterCode like #{${_conditionParam_}.matterCode}
</if>
<if test="conditionParamRef.productCode == null">
${_conditionType_} a.productCode is null
<if test="conditionParamRef.matterCode == null">
${_conditionType_} a.matterCode is null
</if>
</if>
<if test="conditionParamRef.containsKey('productCodeList') and conditionParamRef.productCodeList.size() > 0">
${_conditionType_} a.productCode in
<foreach collection="conditionParamRef.productCodeList" open="(" close=")" index="index" item="item" separator=",">
<if test="conditionParamRef.containsKey('matterCodeList') and conditionParamRef.matterCodeList.size() > 0">
${_conditionType_} a.matterCode in
<foreach collection="conditionParamRef.matterCodeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('productCodeNotList') and conditionParamRef.productCodeNotList.size() > 0">
${_conditionType_} a.productCode not in
<foreach collection="conditionParamRef.productCodeNotList" open="(" close=")" index="index" item="item" separator=",">
<if test="conditionParamRef.containsKey('matterCodeNotList') and conditionParamRef.matterCodeNotList.size() > 0">
${_conditionType_} a.matterCode not in
<foreach collection="conditionParamRef.matterCodeNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('productName')">
<if test="conditionParamRef.productName != null and conditionParamRef.productName != ''">
${_conditionType_} a.productName like #{${_conditionParam_}.productName}
<if test="conditionParamRef.containsKey('matterName')">
<if test="conditionParamRef.matterName != null and conditionParamRef.matterName != ''">
${_conditionType_} a.matterName like #{${_conditionParam_}.matterName}
</if>
<if test="conditionParamRef.productName == null">
${_conditionType_} a.productName is null
<if test="conditionParamRef.matterName == null">
${_conditionType_} a.matterName is null
</if>
</if>
<if test="conditionParamRef.containsKey('productNameList') and conditionParamRef.productNameList.size() > 0">
${_conditionType_} a.productName in
<foreach collection="conditionParamRef.productNameList" open="(" close=")" index="index" item="item" separator=",">
<if test="conditionParamRef.containsKey('matterNameList') and conditionParamRef.matterNameList.size() > 0">
${_conditionType_} a.matterName in
<foreach collection="conditionParamRef.matterNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('productNameNotList') and conditionParamRef.productNameNotList.size() > 0">
${_conditionType_} a.productName not in
<foreach collection="conditionParamRef.productNameNotList" open="(" close=")" index="index" item="item" separator=",">
<if test="conditionParamRef.containsKey('matterNameNotList') and conditionParamRef.matterNameNotList.size() > 0">
${_conditionType_} a.matterName not in
<foreach collection="conditionParamRef.matterNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('matterId')">
<if test="conditionParamRef.matterId != null ">
${_conditionType_} a.matterId = #{${_conditionParam_}.matterId}
</if>
<if test="conditionParamRef.matterId == null">
${_conditionType_} a.matterId is null
</if>
</if>
<if test="conditionParamRef.containsKey('matterIdList') and conditionParamRef.matterIdList.size() > 0">
${_conditionType_} a.matterId in
<foreach collection="conditionParamRef.matterIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('matterIdNotList') and conditionParamRef.matterIdNotList.size() > 0">
${_conditionType_} a.matterId not in
<foreach collection="conditionParamRef.matterIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('matterIdStart') and conditionParamRef.matterIdStart != null">
${_conditionType_} a.matterId <![CDATA[ >= ]]> #{${_conditionParam_}.matterIdStart}
</if>
<if test="conditionParamRef.containsKey('matterIdEnd') and conditionParamRef.matterIdEnd != null">
${_conditionType_} a.matterId <![CDATA[ <= ]]> #{${_conditionParam_}.matterIdEnd}
</if>
<if test="conditionParamRef.containsKey('siteId')">
<if test="conditionParamRef.siteId != null ">
${_conditionType_} a.siteId = #{${_conditionParam_}.siteId}
......@@ -902,6 +853,33 @@
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('materialId')">
<if test="conditionParamRef.materialId != null ">
${_conditionType_} a.materialId = #{${_conditionParam_}.materialId}
</if>
<if test="conditionParamRef.materialId == null">
${_conditionType_} a.materialId is null
</if>
</if>
<if test="conditionParamRef.containsKey('materialIdList') and conditionParamRef.materialIdList.size() > 0">
${_conditionType_} a.materialId in
<foreach collection="conditionParamRef.materialIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('materialIdNotList') and conditionParamRef.materialIdNotList.size() > 0">
${_conditionType_} a.materialId not in
<foreach collection="conditionParamRef.materialIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('materialIdStart') and conditionParamRef.materialIdStart != null">
${_conditionType_} a.materialId <![CDATA[ >= ]]> #{${_conditionParam_}.materialIdStart}
</if>
<if test="conditionParamRef.containsKey('materialIdEnd') and conditionParamRef.materialIdEnd != null">
${_conditionType_} a.materialId <![CDATA[ <= ]]> #{${_conditionParam_}.materialIdEnd}
</if>
<if test="conditionParamRef.containsKey('source')">
<if test="conditionParamRef.source != null ">
${_conditionType_} a.source = #{${_conditionParam_}.source}
......@@ -956,33 +934,6 @@
${_conditionType_} a.isRecommend <![CDATA[ <= ]]> #{${_conditionParam_}.isRecommendEnd}
</if>
<if test="conditionParamRef.containsKey('total')">
<if test="conditionParamRef.total != null ">
${_conditionType_} a.total = #{${_conditionParam_}.total}
</if>
<if test="conditionParamRef.total == null">
${_conditionType_} a.total is null
</if>
</if>
<if test="conditionParamRef.containsKey('totalList') and conditionParamRef.totalList.size() > 0">
${_conditionType_} a.total in
<foreach collection="conditionParamRef.totalList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('totalNotList') and conditionParamRef.totalNotList.size() > 0">
${_conditionType_} a.total not in
<foreach collection="conditionParamRef.totalNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('totalStart') and conditionParamRef.totalStart != null">
${_conditionType_} a.total <![CDATA[ >= ]]> #{${_conditionParam_}.totalStart}
</if>
<if test="conditionParamRef.containsKey('totalEnd') and conditionParamRef.totalEnd != null">
${_conditionType_} a.total <![CDATA[ <= ]]> #{${_conditionParam_}.totalEnd}
</if>
<if test="conditionParamRef.containsKey('sort')">
<if test="conditionParamRef.sort != null ">
${_conditionType_} a.sort = #{${_conditionParam_}.sort}
......@@ -1163,24 +1114,19 @@
<if test='orderCol.deviceName != null and "DESC".equalsIgnoreCase(orderCol.deviceName)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('productId')">
a.productId
<if test='orderCol.productId != null and "DESC".equalsIgnoreCase(orderCol.productId)'>DESC</if>
<if test="orderCol.containsKey('matterId')">
a.matterId
<if test='orderCol.matterId != null and "DESC".equalsIgnoreCase(orderCol.matterId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('productCode')">
a.productCode
<if test='orderCol.productCode != null and "DESC".equalsIgnoreCase(orderCol.productCode)'>DESC</if>
<if test="orderCol.containsKey('matterCode')">
a.matterCode
<if test='orderCol.matterCode != null and "DESC".equalsIgnoreCase(orderCol.matterCode)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('productName')">
a.productName
<if test='orderCol.productName != null and "DESC".equalsIgnoreCase(orderCol.productName)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('matterId')">
a.matterId
<if test='orderCol.matterId != null and "DESC".equalsIgnoreCase(orderCol.matterId)'>DESC</if>
<if test="orderCol.containsKey('matterName')">
a.matterName
<if test='orderCol.matterName != null and "DESC".equalsIgnoreCase(orderCol.matterName)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('siteId')">
......@@ -1213,6 +1159,11 @@
<if test='orderCol.materiaFullName != null and "DESC".equalsIgnoreCase(orderCol.materiaFullName)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('materialId')">
a.materialId
<if test='orderCol.materialId != null and "DESC".equalsIgnoreCase(orderCol.materialId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('source')">
a.source
<if test='orderCol.source != null and "DESC".equalsIgnoreCase(orderCol.source)'>DESC</if>
......@@ -1223,11 +1174,6 @@
<if test='orderCol.isRecommend != null and "DESC".equalsIgnoreCase(orderCol.isRecommend)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('total')">
a.total
<if test='orderCol.total != null and "DESC".equalsIgnoreCase(orderCol.total)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('sort')">
a.sort
<if test='orderCol.sort != null and "DESC".equalsIgnoreCase(orderCol.sort)'>DESC</if>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment