树状列表代码生成
This commit is contained in:
parent
4ce85f79eb
commit
8f6141481f
33998
doc/province.sql
33998
doc/province.sql
File diff suppressed because it is too large
Load Diff
|
|
@ -4,12 +4,148 @@
|
|||
"name": "platform",
|
||||
"chnname": "平台基础模块",
|
||||
"entities": [
|
||||
{
|
||||
"title": "platf_regional",
|
||||
"fields": [
|
||||
{
|
||||
"name": "regional_id",
|
||||
"type": "autoid",
|
||||
"remark": "",
|
||||
"chnname": "主键",
|
||||
"pk": true,
|
||||
"notNull": true,
|
||||
"autoIncrement": true
|
||||
},
|
||||
{
|
||||
"name": "regional_name",
|
||||
"type": "baseName",
|
||||
"remark": "",
|
||||
"chnname": "名称",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"name": "parent_id",
|
||||
"type": "autoid",
|
||||
"remark": "",
|
||||
"chnname": "上级区域",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"name": "ancestors",
|
||||
"type": "DefaultString",
|
||||
"remark": "",
|
||||
"chnname": "祖级列表"
|
||||
},
|
||||
{
|
||||
"name": "doc_num",
|
||||
"type": "djno",
|
||||
"remark": "",
|
||||
"chnname": "单据号"
|
||||
},
|
||||
{
|
||||
"name": "status",
|
||||
"type": "lable",
|
||||
"remark": "",
|
||||
"chnname": "资料状态",
|
||||
"defaultValue": "0",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"name": "remark",
|
||||
"type": "Intro",
|
||||
"remark": "",
|
||||
"chnname": "备注"
|
||||
},
|
||||
{
|
||||
"name": "del_flag",
|
||||
"type": "lable",
|
||||
"remark": "",
|
||||
"chnname": "删除标志",
|
||||
"defaultValue": "0",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"name": "create_by",
|
||||
"type": "createby",
|
||||
"remark": "",
|
||||
"chnname": "制单人",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"name": "create_time",
|
||||
"type": "createtime",
|
||||
"remark": "",
|
||||
"chnname": "制单时间",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"name": "update_by",
|
||||
"type": "createby",
|
||||
"remark": "",
|
||||
"chnname": "修改人"
|
||||
},
|
||||
{
|
||||
"name": "update_time",
|
||||
"type": "createtime",
|
||||
"remark": "",
|
||||
"chnname": "修改时间"
|
||||
}
|
||||
],
|
||||
"indexs": [],
|
||||
"headers": [
|
||||
{
|
||||
"fieldName": "chnname",
|
||||
"relationNoShow": false
|
||||
},
|
||||
{
|
||||
"fieldName": "name",
|
||||
"relationNoShow": false
|
||||
},
|
||||
{
|
||||
"fieldName": "type",
|
||||
"relationNoShow": false
|
||||
},
|
||||
{
|
||||
"fieldName": "dataType",
|
||||
"relationNoShow": true
|
||||
},
|
||||
{
|
||||
"fieldName": "remark",
|
||||
"relationNoShow": true
|
||||
},
|
||||
{
|
||||
"fieldName": "pk",
|
||||
"relationNoShow": false
|
||||
},
|
||||
{
|
||||
"fieldName": "notNull",
|
||||
"relationNoShow": true
|
||||
},
|
||||
{
|
||||
"fieldName": "autoIncrement",
|
||||
"relationNoShow": true
|
||||
},
|
||||
{
|
||||
"fieldName": "defaultValue",
|
||||
"relationNoShow": true
|
||||
},
|
||||
{
|
||||
"fieldName": "relationNoShow",
|
||||
"relationNoShow": true
|
||||
},
|
||||
{
|
||||
"fieldName": "uiHint",
|
||||
"relationNoShow": true
|
||||
}
|
||||
],
|
||||
"chnname": "地区资料"
|
||||
},
|
||||
{
|
||||
"title": "platf_econ_type",
|
||||
"fields": [
|
||||
{
|
||||
"name": "econ_id",
|
||||
"type": "autoid",
|
||||
"type": "Autoinc",
|
||||
"remark": "",
|
||||
"chnname": "主键",
|
||||
"pk": true,
|
||||
|
|
@ -46,16 +182,10 @@
|
|||
{
|
||||
"name": "del_flag",
|
||||
"type": "lable",
|
||||
"remark": "删除标志(0代表存在 2代表删除)",
|
||||
"remark": "0代表存在 2代表删除",
|
||||
"chnname": "删除标志",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"name": "revision",
|
||||
"type": "Integer",
|
||||
"remark": "",
|
||||
"chnname": "乐观锁"
|
||||
},
|
||||
{
|
||||
"name": "create_by",
|
||||
"type": "createby",
|
||||
|
|
@ -151,27 +281,21 @@
|
|||
"chnname": "名称",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"name": "nation_custom_num",
|
||||
"type": "num",
|
||||
"remark": "",
|
||||
"chnname": "自定义编号"
|
||||
},
|
||||
{
|
||||
"name": "doc_num",
|
||||
"type": "djno",
|
||||
"remark": "",
|
||||
"chnname": "单据号",
|
||||
"pk": true,
|
||||
"notNull": true
|
||||
"pk": false,
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"name": "status",
|
||||
"type": "lable",
|
||||
"remark": "0有效 1无效",
|
||||
"chnname": "资料状态",
|
||||
"notNull": true,
|
||||
"pk": true
|
||||
"notNull": false,
|
||||
"pk": false
|
||||
},
|
||||
{
|
||||
"name": "remark",
|
||||
|
|
@ -184,30 +308,24 @@
|
|||
"type": "lable",
|
||||
"remark": "删除标志(0代表存在 2代表删除)",
|
||||
"chnname": "删除标志",
|
||||
"pk": true,
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"name": "revision",
|
||||
"type": "Integer",
|
||||
"remark": "",
|
||||
"chnname": "乐观锁"
|
||||
"pk": false,
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"name": "create_by",
|
||||
"type": "createby",
|
||||
"remark": "",
|
||||
"chnname": "制单人",
|
||||
"pk": true,
|
||||
"notNull": true
|
||||
"pk": false,
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"name": "create_time",
|
||||
"type": "createtime",
|
||||
"remark": "",
|
||||
"chnname": "制单时间",
|
||||
"pk": true,
|
||||
"notNull": true
|
||||
"pk": false,
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"name": "update_by",
|
||||
|
|
@ -331,12 +449,6 @@
|
|||
"defaultValue": "0",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"name": "revision",
|
||||
"type": "Integer",
|
||||
"remark": "",
|
||||
"chnname": "乐观锁"
|
||||
},
|
||||
{
|
||||
"name": "create_by",
|
||||
"type": "createby",
|
||||
|
|
@ -426,18 +538,24 @@
|
|||
"autoIncrement": true
|
||||
},
|
||||
{
|
||||
"name": "purch_type_parent_id",
|
||||
"name": "purch_type_name",
|
||||
"type": "baseName",
|
||||
"remark": "",
|
||||
"chnname": "名称",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"name": "parent_id",
|
||||
"type": "autoid",
|
||||
"remark": "",
|
||||
"chnname": "上级类型",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"name": "purch_type_name",
|
||||
"type": "baseName",
|
||||
"name": "ancestors",
|
||||
"type": "ShortString",
|
||||
"remark": "",
|
||||
"chnname": "名称",
|
||||
"notNull": true
|
||||
"chnname": "祖级列表"
|
||||
},
|
||||
{
|
||||
"name": "doc_num",
|
||||
|
|
@ -462,17 +580,11 @@
|
|||
{
|
||||
"name": "del_flag",
|
||||
"type": "lable",
|
||||
"remark": "删除标志(0代表存在 2代表删除)",
|
||||
"remark": "0代表存在 2代表删除",
|
||||
"chnname": "删除标志",
|
||||
"defaultValue": "0",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"name": "revision",
|
||||
"type": "Integer",
|
||||
"remark": "",
|
||||
"chnname": "乐观锁"
|
||||
},
|
||||
{
|
||||
"name": "create_by",
|
||||
"type": "createby",
|
||||
|
|
@ -568,13 +680,6 @@
|
|||
"chnname": "名称",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"name": "user_qual_customid",
|
||||
"type": "baseName",
|
||||
"remark": "",
|
||||
"chnname": "单据自定义编码",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"name": "doc_num",
|
||||
"type": "djno",
|
||||
|
|
@ -609,12 +714,6 @@
|
|||
"defaultValue": "0",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"name": "revision",
|
||||
"type": "Integer",
|
||||
"remark": "",
|
||||
"chnname": "乐观锁"
|
||||
},
|
||||
{
|
||||
"name": "create_by",
|
||||
"type": "createby",
|
||||
|
|
@ -692,7 +791,7 @@
|
|||
"chnname": "用户资质"
|
||||
},
|
||||
{
|
||||
"title": "platf_business_scale",
|
||||
"title": "platf_business_scope",
|
||||
"fields": [
|
||||
{
|
||||
"name": "business_scale_id",
|
||||
|
|
@ -710,13 +809,6 @@
|
|||
"chnname": "名称",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"name": "business_scale_customid",
|
||||
"type": "baseName",
|
||||
"remark": "",
|
||||
"chnname": "单据自定义编码",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"name": "doc_num",
|
||||
"type": "djno",
|
||||
|
|
@ -740,17 +832,11 @@
|
|||
{
|
||||
"name": "del_flag",
|
||||
"type": "lable",
|
||||
"remark": "删除标志(0代表存在 2代表删除)",
|
||||
"remark": "0代表存在 2代表删除",
|
||||
"chnname": "删除标志",
|
||||
"defaultValue": "0",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"name": "revision",
|
||||
"type": "Integer",
|
||||
"remark": "",
|
||||
"chnname": "乐观锁"
|
||||
},
|
||||
{
|
||||
"name": "create_by",
|
||||
"type": "createby",
|
||||
|
|
@ -869,17 +955,11 @@
|
|||
{
|
||||
"name": "del_flag",
|
||||
"type": "lable",
|
||||
"remark": "删除标志(0代表存在 2代表删除)",
|
||||
"remark": "0存在 2删除",
|
||||
"chnname": "删除标志",
|
||||
"defaultValue": "0",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"name": "revision",
|
||||
"type": "Integer",
|
||||
"remark": "",
|
||||
"chnname": "乐观锁"
|
||||
},
|
||||
{
|
||||
"name": "create_by",
|
||||
"type": "createby",
|
||||
|
|
@ -999,17 +1079,11 @@
|
|||
{
|
||||
"name": "del_flag",
|
||||
"type": "lable",
|
||||
"remark": "删除标志(0代表存在 2代表删除)",
|
||||
"remark": "0存在 2删除",
|
||||
"chnname": "删除标志",
|
||||
"defaultValue": "0",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"name": "revision",
|
||||
"type": "Integer",
|
||||
"remark": "",
|
||||
"chnname": "乐观锁"
|
||||
},
|
||||
{
|
||||
"name": "create_by",
|
||||
"type": "createby",
|
||||
|
|
@ -1099,18 +1173,24 @@
|
|||
"autoIncrement": true
|
||||
},
|
||||
{
|
||||
"name": "supply_chain_parent_id",
|
||||
"name": "supply_chain_name",
|
||||
"type": "baseName",
|
||||
"remark": "",
|
||||
"chnname": "名称",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"name": "parent_id",
|
||||
"type": "autoid",
|
||||
"remark": "",
|
||||
"chnname": "上级类型",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"name": "supply_chain_name",
|
||||
"type": "baseName",
|
||||
"name": "ancestors",
|
||||
"type": "DefaultString",
|
||||
"remark": "",
|
||||
"chnname": "名称",
|
||||
"notNull": true
|
||||
"chnname": "祖级列表"
|
||||
},
|
||||
{
|
||||
"name": "doc_num",
|
||||
|
|
@ -1140,12 +1220,6 @@
|
|||
"defaultValue": "0",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"name": "revision",
|
||||
"type": "Integer",
|
||||
"remark": "",
|
||||
"chnname": "乐观锁"
|
||||
},
|
||||
{
|
||||
"name": "create_by",
|
||||
"type": "createby",
|
||||
|
|
@ -1270,12 +1344,6 @@
|
|||
"defaultValue": "0",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"name": "revision",
|
||||
"type": "Integer",
|
||||
"remark": "",
|
||||
"chnname": "乐观锁"
|
||||
},
|
||||
{
|
||||
"name": "create_by",
|
||||
"type": "createby",
|
||||
|
|
@ -1361,16 +1429,17 @@
|
|||
"remark": "",
|
||||
"chnname": "主键",
|
||||
"notNull": true,
|
||||
"autoIncrement": true
|
||||
"autoIncrement": true,
|
||||
"pk": true
|
||||
},
|
||||
{
|
||||
"name": "item_paramters_id",
|
||||
"type": "autoid",
|
||||
"remark": "",
|
||||
"chnname": "主表单据号",
|
||||
"pk": true,
|
||||
"pk": false,
|
||||
"notNull": true,
|
||||
"autoIncrement": true
|
||||
"autoIncrement": false
|
||||
},
|
||||
{
|
||||
"name": "unit",
|
||||
|
|
@ -1489,12 +1558,6 @@
|
|||
"defaultValue": "0",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"name": "revision",
|
||||
"type": "Integer",
|
||||
"remark": "",
|
||||
"chnname": "乐观锁"
|
||||
},
|
||||
{
|
||||
"name": "create_by",
|
||||
"type": "createby",
|
||||
|
|
@ -1715,12 +1778,6 @@
|
|||
"defaultValue": "0",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"name": "revision",
|
||||
"type": "Integer",
|
||||
"remark": "",
|
||||
"chnname": "乐观锁"
|
||||
},
|
||||
{
|
||||
"name": "create_by",
|
||||
"type": "createby",
|
||||
|
|
@ -1985,13 +2042,6 @@
|
|||
"chnname": "名称",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"name": "item_qual_customid",
|
||||
"type": "baseName",
|
||||
"remark": "",
|
||||
"chnname": "单据自定义编码",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"name": "doc_num",
|
||||
"type": "djno",
|
||||
|
|
@ -2026,12 +2076,6 @@
|
|||
"defaultValue": "0",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"name": "revision",
|
||||
"type": "Integer",
|
||||
"remark": "",
|
||||
"chnname": "乐观锁"
|
||||
},
|
||||
{
|
||||
"name": "create_by",
|
||||
"type": "createby",
|
||||
|
|
@ -2129,10 +2173,10 @@
|
|||
"notNull": true
|
||||
},
|
||||
{
|
||||
"name": "price_band_lower",
|
||||
"type": "pirceband",
|
||||
"name": "doc_num",
|
||||
"type": "djno",
|
||||
"remark": "",
|
||||
"chnname": "下限"
|
||||
"chnname": "单据号"
|
||||
},
|
||||
{
|
||||
"name": "price_band_upper",
|
||||
|
|
@ -2141,17 +2185,10 @@
|
|||
"chnname": "上限"
|
||||
},
|
||||
{
|
||||
"name": "price_band_customid",
|
||||
"type": "baseName",
|
||||
"name": "price_band_lower",
|
||||
"type": "pirceband",
|
||||
"remark": "",
|
||||
"chnname": "单据自定义编码",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"name": "price_band_num",
|
||||
"type": "djno",
|
||||
"remark": "",
|
||||
"chnname": "单据号"
|
||||
"chnname": "下限"
|
||||
},
|
||||
{
|
||||
"name": "status",
|
||||
|
|
@ -2175,12 +2212,6 @@
|
|||
"defaultValue": "0",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"name": "revision",
|
||||
"type": "Integer",
|
||||
"remark": "",
|
||||
"chnname": "乐观锁"
|
||||
},
|
||||
{
|
||||
"name": "create_by",
|
||||
"type": "createby",
|
||||
|
|
@ -2351,12 +2382,6 @@
|
|||
"defaultValue": "0",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"name": "revision",
|
||||
"type": "Integer",
|
||||
"remark": "",
|
||||
"chnname": "乐观锁"
|
||||
},
|
||||
{
|
||||
"name": "create_by",
|
||||
"type": "createby",
|
||||
|
|
@ -2760,12 +2785,6 @@
|
|||
"defaultValue": "0",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"name": "revision",
|
||||
"type": "Integer",
|
||||
"remark": "",
|
||||
"chnname": "乐观锁"
|
||||
},
|
||||
{
|
||||
"name": "create_by",
|
||||
"type": "createby",
|
||||
|
|
@ -3036,12 +3055,6 @@
|
|||
"defaultValue": "0",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"name": "revision",
|
||||
"type": "Integer",
|
||||
"remark": "",
|
||||
"chnname": "乐观锁"
|
||||
},
|
||||
{
|
||||
"name": "create_by",
|
||||
"type": "createby",
|
||||
|
|
@ -3511,6 +3524,15 @@
|
|||
],
|
||||
"dataTypeDomains": {
|
||||
"datatype": [
|
||||
{
|
||||
"name": "小表自增",
|
||||
"code": "Autoinc",
|
||||
"apply": {
|
||||
"MYSQL": {
|
||||
"type": "integer(11)"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "默认字串",
|
||||
"code": "DefaultString",
|
||||
|
|
@ -3969,7 +3991,7 @@
|
|||
"code": "createby",
|
||||
"apply": {
|
||||
"MYSQL": {
|
||||
"type": "varchar(20)"
|
||||
"type": "varchar(30)"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -4104,7 +4126,7 @@
|
|||
{
|
||||
"name": "status",
|
||||
"type": "lable",
|
||||
"remark": "0有效 1无效",
|
||||
"remark": "",
|
||||
"chnname": "资料状态",
|
||||
"defaultValue": "0",
|
||||
"notNull": true
|
||||
|
|
@ -4118,17 +4140,11 @@
|
|||
{
|
||||
"name": "del_flag",
|
||||
"type": "lable",
|
||||
"remark": "删除标志(0代表存在 2代表删除)",
|
||||
"remark": "",
|
||||
"chnname": "删除标志",
|
||||
"defaultValue": "0",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"name": "revision",
|
||||
"type": "Integer",
|
||||
"remark": "",
|
||||
"chnname": "乐观锁"
|
||||
},
|
||||
{
|
||||
"name": "create_by",
|
||||
"type": "createby",
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ https://www.ctolib.com/topics-141243.html
|
|||
j2eefast开源
|
||||
https://gitee.com/zhouhuanOGP/J2EEFAST
|
||||
附件和图片上传我全套扣的j2eefast的,ruoyi的用着太怪了
|
||||
登录 验证是用滑块
|
||||
|
||||
|
||||
阿里云开发者成长计划
|
||||
|
|
|
|||
|
|
@ -0,0 +1,125 @@
|
|||
package com.ruoyi.province.platform.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 业务规模对象 platf_business_scope
|
||||
*
|
||||
* @author dalin
|
||||
* @date 2020-12-24
|
||||
*/
|
||||
public class BusinessScope extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long businessScaleId;
|
||||
|
||||
/** 名称 */
|
||||
@Excel(name = "名称")
|
||||
private String businessScaleName;
|
||||
|
||||
/** 单据号 */
|
||||
@Excel(name = "单据号")
|
||||
private String docNum;
|
||||
|
||||
/** 资料状态 */
|
||||
@Excel(name = "资料状态")
|
||||
private String status;
|
||||
|
||||
/** 删除标志 */
|
||||
private String delFlag;
|
||||
|
||||
/** 制单人 */
|
||||
@Excel(name = "制单人")
|
||||
private String createByuserName;
|
||||
|
||||
/** 修改人 */
|
||||
@Excel(name = "修改人")
|
||||
private String updateByuserName;
|
||||
|
||||
public void setBusinessScaleId(Long businessScaleId)
|
||||
{
|
||||
this.businessScaleId = businessScaleId;
|
||||
}
|
||||
|
||||
public Long getBusinessScaleId()
|
||||
{
|
||||
return businessScaleId;
|
||||
}
|
||||
public void setBusinessScaleName(String businessScaleName)
|
||||
{
|
||||
this.businessScaleName = businessScaleName;
|
||||
}
|
||||
|
||||
public String getBusinessScaleName()
|
||||
{
|
||||
return businessScaleName;
|
||||
}
|
||||
public void setDocNum(String docNum)
|
||||
{
|
||||
this.docNum = docNum;
|
||||
}
|
||||
|
||||
public String getDocNum()
|
||||
{
|
||||
return docNum;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setDelFlag(String delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
public void setCreateByuserName(String createByuserName)
|
||||
{
|
||||
this.createByuserName = createByuserName;
|
||||
}
|
||||
|
||||
public String getCreateByuserName()
|
||||
{
|
||||
return createByuserName;
|
||||
}
|
||||
public void setUpdateByuserName(String updateByuserName)
|
||||
{
|
||||
this.updateByuserName = updateByuserName;
|
||||
}
|
||||
|
||||
public String getUpdateByuserName()
|
||||
{
|
||||
return updateByuserName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("businessScaleId", getBusinessScaleId())
|
||||
.append("businessScaleName", getBusinessScaleName())
|
||||
.append("docNum", getDocNum())
|
||||
.append("status", getStatus())
|
||||
.append("remark", getRemark())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createByuserName", getCreateByuserName())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateByuserName", getUpdateByuserName())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -4,12 +4,11 @@ import com.ruoyi.common.annotation.Excel;
|
|||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 经济类型对象 platf_econ_type
|
||||
*
|
||||
*
|
||||
* @author dalin
|
||||
* @date 2020-12-19
|
||||
* @date 2020-12-24
|
||||
*/
|
||||
public class EconType extends BaseEntity
|
||||
{
|
||||
|
|
@ -41,66 +40,66 @@ public class EconType extends BaseEntity
|
|||
@Excel(name = "修改人")
|
||||
private String updateByuserName;
|
||||
|
||||
public void setEconId(Long econId)
|
||||
public void setEconId(Long econId)
|
||||
{
|
||||
this.econId = econId;
|
||||
}
|
||||
|
||||
public Long getEconId()
|
||||
public Long getEconId()
|
||||
{
|
||||
return econId;
|
||||
}
|
||||
public void setEconName(String econName)
|
||||
public void setEconName(String econName)
|
||||
{
|
||||
this.econName = econName;
|
||||
}
|
||||
|
||||
public String getEconName()
|
||||
public String getEconName()
|
||||
{
|
||||
return econName;
|
||||
}
|
||||
public void setDocNum(String docNum)
|
||||
public void setDocNum(String docNum)
|
||||
{
|
||||
this.docNum = docNum;
|
||||
}
|
||||
|
||||
public String getDocNum()
|
||||
public String getDocNum()
|
||||
{
|
||||
return docNum;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setDelFlag(String delFlag)
|
||||
public void setDelFlag(String delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getDelFlag()
|
||||
public String getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
public void setCreateByuserName(String createByuserName)
|
||||
public void setCreateByuserName(String createByuserName)
|
||||
{
|
||||
this.createByuserName = createByuserName;
|
||||
}
|
||||
|
||||
public String getCreateByuserName()
|
||||
public String getCreateByuserName()
|
||||
{
|
||||
return createByuserName;
|
||||
}
|
||||
public void setUpdateByuserName(String updateByuserName)
|
||||
public void setUpdateByuserName(String updateByuserName)
|
||||
{
|
||||
this.updateByuserName = updateByuserName;
|
||||
}
|
||||
|
||||
public String getUpdateByuserName()
|
||||
public String getUpdateByuserName()
|
||||
{
|
||||
return updateByuserName;
|
||||
}
|
||||
|
|
@ -108,18 +107,18 @@ public class EconType extends BaseEntity
|
|||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("econId", getEconId())
|
||||
.append("econName", getEconName())
|
||||
.append("docNum", getDocNum())
|
||||
.append("status", getStatus())
|
||||
.append("remark", getRemark())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createByuserName", getCreateByuserName())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateByuserName", getUpdateByuserName())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
.append("econId", getEconId())
|
||||
.append("econName", getEconName())
|
||||
.append("docNum", getDocNum())
|
||||
.append("status", getStatus())
|
||||
.append("remark", getRemark())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createByuserName", getCreateByuserName())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateByuserName", getUpdateByuserName())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,141 @@
|
|||
package com.ruoyi.province.platform.domain;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 商品参数对象 platf_item_paramters
|
||||
*
|
||||
* @author dalin
|
||||
* @date 2021-01-14
|
||||
*/
|
||||
public class ItemParamters extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long itemParamtersId;
|
||||
|
||||
/** 名称 */
|
||||
@Excel(name = "名称")
|
||||
private String itemParamtersName;
|
||||
|
||||
/** 单据号 */
|
||||
@Excel(name = "单据号")
|
||||
private String docNum;
|
||||
|
||||
/** 资料状态 */
|
||||
@Excel(name = "资料状态")
|
||||
private String status;
|
||||
|
||||
/** 删除标志 */
|
||||
private String delFlag;
|
||||
|
||||
/** 制单人 */
|
||||
@Excel(name = "制单人")
|
||||
private String createByuserName;
|
||||
|
||||
/** 修改人 */
|
||||
@Excel(name = "修改人")
|
||||
private String updateByuserName;
|
||||
|
||||
/** 商品参数_计量单位信息 */
|
||||
private List<ItemParamtersUnit> itemParamtersUnitList;
|
||||
|
||||
public void setItemParamtersId(Long itemParamtersId)
|
||||
{
|
||||
this.itemParamtersId = itemParamtersId;
|
||||
}
|
||||
|
||||
public Long getItemParamtersId()
|
||||
{
|
||||
return itemParamtersId;
|
||||
}
|
||||
public void setItemParamtersName(String itemParamtersName)
|
||||
{
|
||||
this.itemParamtersName = itemParamtersName;
|
||||
}
|
||||
|
||||
public String getItemParamtersName()
|
||||
{
|
||||
return itemParamtersName;
|
||||
}
|
||||
public void setDocNum(String docNum)
|
||||
{
|
||||
this.docNum = docNum;
|
||||
}
|
||||
|
||||
public String getDocNum()
|
||||
{
|
||||
return docNum;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setDelFlag(String delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
public void setCreateByuserName(String createByuserName)
|
||||
{
|
||||
this.createByuserName = createByuserName;
|
||||
}
|
||||
|
||||
public String getCreateByuserName()
|
||||
{
|
||||
return createByuserName;
|
||||
}
|
||||
public void setUpdateByuserName(String updateByuserName)
|
||||
{
|
||||
this.updateByuserName = updateByuserName;
|
||||
}
|
||||
|
||||
public String getUpdateByuserName()
|
||||
{
|
||||
return updateByuserName;
|
||||
}
|
||||
|
||||
public List<ItemParamtersUnit> getItemParamtersUnitList()
|
||||
{
|
||||
return itemParamtersUnitList;
|
||||
}
|
||||
|
||||
public void setItemParamtersUnitList(List<ItemParamtersUnit> itemParamtersUnitList)
|
||||
{
|
||||
this.itemParamtersUnitList = itemParamtersUnitList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("itemParamtersId", getItemParamtersId())
|
||||
.append("itemParamtersName", getItemParamtersName())
|
||||
.append("docNum", getDocNum())
|
||||
.append("status", getStatus())
|
||||
.append("remark", getRemark())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createByuserName", getCreateByuserName())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateByuserName", getUpdateByuserName())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("itemParamtersUnitList", getItemParamtersUnitList())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
package com.ruoyi.province.platform.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 商品参数_计量单位对象 platf_item_paramters_unit
|
||||
*
|
||||
* @author dalin
|
||||
* @date 2021-01-14
|
||||
*/
|
||||
public class ItemParamtersUnit extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long itemParamtersUnitId;
|
||||
|
||||
/** 主表单据号 */
|
||||
@Excel(name = "主表单据号")
|
||||
private Long itemParamtersId;
|
||||
|
||||
/** 计量单位 */
|
||||
@Excel(name = "计量单位")
|
||||
private String unit;
|
||||
|
||||
/** 计量单位状态 */
|
||||
@Excel(name = "计量单位状态")
|
||||
private String unitStatus;
|
||||
|
||||
/** 计量单位描述 */
|
||||
@Excel(name = "计量单位描述")
|
||||
private String fmemo;
|
||||
|
||||
public void setItemParamtersUnitId(Long itemParamtersUnitId)
|
||||
{
|
||||
this.itemParamtersUnitId = itemParamtersUnitId;
|
||||
}
|
||||
|
||||
public Long getItemParamtersUnitId()
|
||||
{
|
||||
return itemParamtersUnitId;
|
||||
}
|
||||
public void setItemParamtersId(Long itemParamtersId)
|
||||
{
|
||||
this.itemParamtersId = itemParamtersId;
|
||||
}
|
||||
|
||||
public Long getItemParamtersId()
|
||||
{
|
||||
return itemParamtersId;
|
||||
}
|
||||
public void setUnit(String unit)
|
||||
{
|
||||
this.unit = unit;
|
||||
}
|
||||
|
||||
public String getUnit()
|
||||
{
|
||||
return unit;
|
||||
}
|
||||
public void setUnitStatus(String unitStatus)
|
||||
{
|
||||
this.unitStatus = unitStatus;
|
||||
}
|
||||
|
||||
public String getUnitStatus()
|
||||
{
|
||||
return unitStatus;
|
||||
}
|
||||
public void setFmemo(String fmemo)
|
||||
{
|
||||
this.fmemo = fmemo;
|
||||
}
|
||||
|
||||
public String getFmemo()
|
||||
{
|
||||
return fmemo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("itemParamtersUnitId", getItemParamtersUnitId())
|
||||
.append("itemParamtersId", getItemParamtersId())
|
||||
.append("unit", getUnit())
|
||||
.append("unitStatus", getUnitStatus())
|
||||
.append("fmemo", getFmemo())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,153 @@
|
|||
package com.ruoyi.province.platform.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 商品价格带对象 platf_item_price_band
|
||||
*
|
||||
* @author dalin
|
||||
* @date 2020-12-24
|
||||
*/
|
||||
public class ItemPriceBand extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** ID */
|
||||
private Long priceBandId;
|
||||
|
||||
/** 名称 */
|
||||
@Excel(name = "名称")
|
||||
private String priceBandName;
|
||||
|
||||
/** 单据号 */
|
||||
@Excel(name = "单据号")
|
||||
private String docNum;
|
||||
|
||||
/** 上限 */
|
||||
@Excel(name = "上限")
|
||||
private BigDecimal priceBandUpper;
|
||||
|
||||
/** 下限 */
|
||||
@Excel(name = "下限")
|
||||
private BigDecimal priceBandLower;
|
||||
|
||||
/** 资料状态 */
|
||||
@Excel(name = "资料状态")
|
||||
private String status;
|
||||
|
||||
/** 删除标志 */
|
||||
private String delFlag;
|
||||
|
||||
/** 制单人 */
|
||||
@Excel(name = "制单人")
|
||||
private String createByuserName;
|
||||
|
||||
/** 修改人 */
|
||||
@Excel(name = "修改人")
|
||||
private String updateByuserName;
|
||||
|
||||
public Long getPriceBandId() {
|
||||
return priceBandId;
|
||||
}
|
||||
|
||||
public void setPriceBandId(Long priceBandId) {
|
||||
this.priceBandId = priceBandId;
|
||||
}
|
||||
|
||||
public void setPriceBandName(String priceBandName)
|
||||
{
|
||||
this.priceBandName = priceBandName;
|
||||
}
|
||||
|
||||
public String getPriceBandName()
|
||||
{
|
||||
return priceBandName;
|
||||
}
|
||||
public void setDocNum(String docNum)
|
||||
{
|
||||
this.docNum = docNum;
|
||||
}
|
||||
|
||||
public String getDocNum()
|
||||
{
|
||||
return docNum;
|
||||
}
|
||||
public void setPriceBandUpper(BigDecimal priceBandUpper)
|
||||
{
|
||||
this.priceBandUpper = priceBandUpper;
|
||||
}
|
||||
|
||||
public BigDecimal getPriceBandUpper()
|
||||
{
|
||||
return priceBandUpper;
|
||||
}
|
||||
public void setPriceBandLower(BigDecimal priceBandLower)
|
||||
{
|
||||
this.priceBandLower = priceBandLower;
|
||||
}
|
||||
|
||||
public BigDecimal getPriceBandLower()
|
||||
{
|
||||
return priceBandLower;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setDelFlag(String delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
public void setCreateByuserName(String createByuserName)
|
||||
{
|
||||
this.createByuserName = createByuserName;
|
||||
}
|
||||
|
||||
public String getCreateByuserName()
|
||||
{
|
||||
return createByuserName;
|
||||
}
|
||||
public void setUpdateByuserName(String updateByuserName)
|
||||
{
|
||||
this.updateByuserName = updateByuserName;
|
||||
}
|
||||
|
||||
public String getUpdateByuserName()
|
||||
{
|
||||
return updateByuserName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("priceBandName", getPriceBandName())
|
||||
.append("docNum", getDocNum())
|
||||
.append("priceBandUpper", getPriceBandUpper())
|
||||
.append("priceBandLower", getPriceBandLower())
|
||||
.append("status", getStatus())
|
||||
.append("remark", getRemark())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createByuserName", getCreateByuserName())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateByuserName", getUpdateByuserName())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,128 @@
|
|||
package com.ruoyi.province.platform.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.TreeEntity;
|
||||
|
||||
/**
|
||||
* 购货用户类型对象 platf_purch_user_type
|
||||
*
|
||||
* @author dalin
|
||||
* @date 2021-01-14
|
||||
*/
|
||||
public class PurchUserType extends TreeEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long purchTypeId;
|
||||
|
||||
/** 名称 */
|
||||
@Excel(name = "名称")
|
||||
private String purchTypeName;
|
||||
|
||||
/** 单据号 */
|
||||
@Excel(name = "单据号")
|
||||
private String docNum;
|
||||
|
||||
/** 资料状态 0有效 1无效 */
|
||||
@Excel(name = "资料状态 0有效 1无效")
|
||||
private String status;
|
||||
|
||||
/** 删除标志 0代表存在 2代表删除 */
|
||||
private String delFlag;
|
||||
|
||||
/** 制单人 */
|
||||
@Excel(name = "制单人")
|
||||
private String createByuserName;
|
||||
|
||||
/** 修改人 */
|
||||
@Excel(name = "修改人")
|
||||
private String updateByuserName;
|
||||
|
||||
public void setPurchTypeId(Long purchTypeId)
|
||||
{
|
||||
this.purchTypeId = purchTypeId;
|
||||
}
|
||||
|
||||
public Long getPurchTypeId()
|
||||
{
|
||||
return purchTypeId;
|
||||
}
|
||||
public void setPurchTypeName(String purchTypeName)
|
||||
{
|
||||
this.purchTypeName = purchTypeName;
|
||||
}
|
||||
|
||||
public String getPurchTypeName()
|
||||
{
|
||||
return purchTypeName;
|
||||
}
|
||||
public void setDocNum(String docNum)
|
||||
{
|
||||
this.docNum = docNum;
|
||||
}
|
||||
|
||||
public String getDocNum()
|
||||
{
|
||||
return docNum;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setDelFlag(String delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
public void setCreateByuserName(String createByuserName)
|
||||
{
|
||||
this.createByuserName = createByuserName;
|
||||
}
|
||||
|
||||
public String getCreateByuserName()
|
||||
{
|
||||
return createByuserName;
|
||||
}
|
||||
public void setUpdateByuserName(String updateByuserName)
|
||||
{
|
||||
this.updateByuserName = updateByuserName;
|
||||
}
|
||||
|
||||
public String getUpdateByuserName()
|
||||
{
|
||||
return updateByuserName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("purchTypeId", getPurchTypeId())
|
||||
.append("purchTypeName", getPurchTypeName())
|
||||
.append("parentId", getParentId())
|
||||
.append("ancestors", getAncestors())
|
||||
.append("docNum", getDocNum())
|
||||
.append("status", getStatus())
|
||||
.append("remark", getRemark())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createByuserName", getCreateByuserName())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateByuserName", getUpdateByuserName())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,128 @@
|
|||
package com.ruoyi.province.platform.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.TreeEntity;
|
||||
|
||||
/**
|
||||
* 地区资料对象 platf_regional
|
||||
*
|
||||
* @author dalin
|
||||
* @date 2021-01-11
|
||||
*/
|
||||
public class Regional extends TreeEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long regionalId;
|
||||
|
||||
/** 名称 */
|
||||
@Excel(name = "名称")
|
||||
private String regionalName;
|
||||
|
||||
/** 单据号 */
|
||||
@Excel(name = "单据号")
|
||||
private String docNum;
|
||||
|
||||
/** 资料状态 */
|
||||
@Excel(name = "资料状态")
|
||||
private String status;
|
||||
|
||||
/** 删除标志 */
|
||||
private String delFlag;
|
||||
|
||||
/** 制单人 */
|
||||
@Excel(name = "制单人")
|
||||
private String createByuserName;
|
||||
|
||||
/** 修改人 */
|
||||
@Excel(name = "修改人")
|
||||
private String updateByuserName;
|
||||
|
||||
public void setRegionalId(Long regionalId)
|
||||
{
|
||||
this.regionalId = regionalId;
|
||||
}
|
||||
|
||||
public Long getRegionalId()
|
||||
{
|
||||
return regionalId;
|
||||
}
|
||||
public void setRegionalName(String regionalName)
|
||||
{
|
||||
this.regionalName = regionalName;
|
||||
}
|
||||
|
||||
public String getRegionalName()
|
||||
{
|
||||
return regionalName;
|
||||
}
|
||||
public void setDocNum(String docNum)
|
||||
{
|
||||
this.docNum = docNum;
|
||||
}
|
||||
|
||||
public String getDocNum()
|
||||
{
|
||||
return docNum;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setDelFlag(String delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
public void setCreateByuserName(String createByuserName)
|
||||
{
|
||||
this.createByuserName = createByuserName;
|
||||
}
|
||||
|
||||
public String getCreateByuserName()
|
||||
{
|
||||
return createByuserName;
|
||||
}
|
||||
public void setUpdateByuserName(String updateByuserName)
|
||||
{
|
||||
this.updateByuserName = updateByuserName;
|
||||
}
|
||||
|
||||
public String getUpdateByuserName()
|
||||
{
|
||||
return updateByuserName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("regionalId", getRegionalId())
|
||||
.append("regionalName", getRegionalName())
|
||||
.append("parentId", getParentId())
|
||||
.append("ancestors", getAncestors())
|
||||
.append("docNum", getDocNum())
|
||||
.append("status", getStatus())
|
||||
.append("remark", getRemark())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createByuserName", getCreateByuserName())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateByuserName", getUpdateByuserName())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,128 @@
|
|||
package com.ruoyi.province.platform.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.TreeEntity;
|
||||
|
||||
/**
|
||||
* 供应链层级对象 platf_supply_chain_hier
|
||||
*
|
||||
* @author dalin
|
||||
* @date 2021-01-14
|
||||
*/
|
||||
public class SupplyChainHier extends TreeEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long supplyChainId;
|
||||
|
||||
/** 名称 */
|
||||
@Excel(name = "名称")
|
||||
private String supplyChainName;
|
||||
|
||||
/** 单据号 */
|
||||
@Excel(name = "单据号")
|
||||
private String docNum;
|
||||
|
||||
/** 资料状态 */
|
||||
@Excel(name = "资料状态")
|
||||
private String status;
|
||||
|
||||
/** 删除标志 */
|
||||
private String delFlag;
|
||||
|
||||
/** 制单人 */
|
||||
@Excel(name = "制单人")
|
||||
private String createByuserName;
|
||||
|
||||
/** 修改人 */
|
||||
@Excel(name = "修改人")
|
||||
private String updateByuserName;
|
||||
|
||||
public void setSupplyChainId(Long supplyChainId)
|
||||
{
|
||||
this.supplyChainId = supplyChainId;
|
||||
}
|
||||
|
||||
public Long getSupplyChainId()
|
||||
{
|
||||
return supplyChainId;
|
||||
}
|
||||
public void setSupplyChainName(String supplyChainName)
|
||||
{
|
||||
this.supplyChainName = supplyChainName;
|
||||
}
|
||||
|
||||
public String getSupplyChainName()
|
||||
{
|
||||
return supplyChainName;
|
||||
}
|
||||
public void setDocNum(String docNum)
|
||||
{
|
||||
this.docNum = docNum;
|
||||
}
|
||||
|
||||
public String getDocNum()
|
||||
{
|
||||
return docNum;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setDelFlag(String delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
public void setCreateByuserName(String createByuserName)
|
||||
{
|
||||
this.createByuserName = createByuserName;
|
||||
}
|
||||
|
||||
public String getCreateByuserName()
|
||||
{
|
||||
return createByuserName;
|
||||
}
|
||||
public void setUpdateByuserName(String updateByuserName)
|
||||
{
|
||||
this.updateByuserName = updateByuserName;
|
||||
}
|
||||
|
||||
public String getUpdateByuserName()
|
||||
{
|
||||
return updateByuserName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("supplyChainId", getSupplyChainId())
|
||||
.append("supplyChainName", getSupplyChainName())
|
||||
.append("parentId", getParentId())
|
||||
.append("ancestors", getAncestors())
|
||||
.append("docNum", getDocNum())
|
||||
.append("status", getStatus())
|
||||
.append("remark", getRemark())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createByuserName", getCreateByuserName())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateByuserName", getUpdateByuserName())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
package com.ruoyi.province.platform.mapper;
|
||||
|
||||
import com.ruoyi.province.platform.domain.BusinessScope;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 业务规模Mapper接口
|
||||
*
|
||||
* @author dalin
|
||||
* @date 2020-12-24
|
||||
*/
|
||||
public interface BusinessScopeMapper
|
||||
{
|
||||
/**
|
||||
* 查询业务规模
|
||||
*
|
||||
* @param businessScaleId 业务规模ID
|
||||
* @return 业务规模
|
||||
*/
|
||||
public BusinessScope selectBusinessScopeById(Long businessScaleId);
|
||||
|
||||
/**
|
||||
* 校验 业务规模 名称是否重复
|
||||
*
|
||||
* @param BusinessScaleName
|
||||
* @return 业务规模
|
||||
*/
|
||||
public BusinessScope checkBusinessScopeUnique(String BusinessScaleName);
|
||||
|
||||
/**
|
||||
* 查询业务规模列表
|
||||
*
|
||||
* @param businessScope 业务规模
|
||||
* @return 业务规模集合
|
||||
*/
|
||||
public List<BusinessScope> selectBusinessScopeList(BusinessScope businessScope);
|
||||
|
||||
/**
|
||||
* 新增业务规模
|
||||
*
|
||||
* @param businessScope 业务规模
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBusinessScope(BusinessScope businessScope);
|
||||
|
||||
/**
|
||||
* 修改业务规模
|
||||
*
|
||||
* @param businessScope 业务规模
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBusinessScope(BusinessScope businessScope);
|
||||
|
||||
/**
|
||||
* 删除业务规模
|
||||
*
|
||||
* @param businessScaleId 业务规模ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBusinessScopeById(Long businessScaleId);
|
||||
|
||||
/**
|
||||
* 批量删除业务规模
|
||||
*
|
||||
* @param businessScaleIds 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBusinessScopeByIds(String[] businessScaleIds);
|
||||
}
|
||||
|
|
@ -8,7 +8,7 @@ import java.util.List;
|
|||
* 经济类型Mapper接口
|
||||
*
|
||||
* @author dalin
|
||||
* @date 2020-12-19
|
||||
* @date 2020-12-24
|
||||
*/
|
||||
public interface EconTypeMapper
|
||||
{
|
||||
|
|
@ -20,15 +20,15 @@ public interface EconTypeMapper
|
|||
*/
|
||||
public EconType selectEconTypeById(Long econId);
|
||||
|
||||
/**
|
||||
* 校验 经济类型 名称是否重复
|
||||
*
|
||||
* @param EconName
|
||||
* @return 经济类型
|
||||
*/
|
||||
public EconType checkEconTypeUnique(String EconName);
|
||||
|
||||
/**
|
||||
* 校验 经济类型中 名称是否重复
|
||||
*
|
||||
* @param econName 经济类型ID
|
||||
* @return 经济类型
|
||||
*/
|
||||
public EconType checkEconNameUnique(String econName);
|
||||
|
||||
/**
|
||||
* 查询经济类型列表
|
||||
*
|
||||
* @param econType 经济类型
|
||||
|
|
@ -67,6 +67,4 @@ public interface EconTypeMapper
|
|||
* @return 结果
|
||||
*/
|
||||
public int deleteEconTypeByIds(String[] econIds);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,97 @@
|
|||
package com.ruoyi.province.platform.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.province.platform.domain.ItemParamters;
|
||||
import com.ruoyi.province.platform.domain.ItemParamtersUnit;
|
||||
|
||||
/**
|
||||
* 商品参数Mapper接口
|
||||
*
|
||||
* @author dalin
|
||||
* @date 2021-01-14
|
||||
*/
|
||||
public interface ItemParamtersMapper
|
||||
{
|
||||
/**
|
||||
* 查询商品参数
|
||||
*
|
||||
* @param itemParamtersId 商品参数ID
|
||||
* @return 商品参数
|
||||
*/
|
||||
public ItemParamters selectItemParamtersById(Long itemParamtersId);
|
||||
|
||||
/**
|
||||
* 校验 商品参数 名称是否重复
|
||||
*
|
||||
* @param ItemParamtersName
|
||||
* @return 商品参数
|
||||
*/
|
||||
public ItemParamters checkItemParamtersUnique(String ItemParamtersName);
|
||||
|
||||
/**
|
||||
* 查询商品参数列表
|
||||
*
|
||||
* @param itemParamters 商品参数
|
||||
* @return 商品参数集合
|
||||
*/
|
||||
public List<ItemParamters> selectItemParamtersList(ItemParamters itemParamters);
|
||||
|
||||
/**
|
||||
* 新增商品参数
|
||||
*
|
||||
* @param itemParamters 商品参数
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertItemParamters(ItemParamters itemParamters);
|
||||
|
||||
/**
|
||||
* 修改商品参数
|
||||
*
|
||||
* @param itemParamters 商品参数
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateItemParamters(ItemParamters itemParamters);
|
||||
|
||||
/**
|
||||
* 删除商品参数
|
||||
*
|
||||
* @param itemParamtersId 商品参数ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteItemParamtersById(Long itemParamtersId);
|
||||
|
||||
/**
|
||||
* 批量删除商品参数
|
||||
*
|
||||
* @param itemParamtersIds 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteItemParamtersByIds(String[] itemParamtersIds);
|
||||
|
||||
/**
|
||||
* 批量删除商品参数_计量单位
|
||||
*
|
||||
* @param customerIds 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteItemParamtersUnitByItemParamtersIds(String[] itemParamtersIds);
|
||||
|
||||
/**
|
||||
* 批量新增商品参数_计量单位
|
||||
*
|
||||
* @param itemParamtersUnitList 商品参数_计量单位列表
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchItemParamtersUnit(List<ItemParamtersUnit> itemParamtersUnitList);
|
||||
|
||||
|
||||
/**
|
||||
* 通过商品参数ID删除商品参数_计量单位信息
|
||||
*
|
||||
* @param roleId 角色ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteItemParamtersUnitByItemParamtersId(Long itemParamtersId);
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
package com.ruoyi.province.platform.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.province.platform.domain.ItemPriceBand;
|
||||
|
||||
/**
|
||||
* 商品价格带Mapper接口
|
||||
*
|
||||
* @author dalin
|
||||
* @date 2020-12-24
|
||||
*/
|
||||
public interface ItemPriceBandMapper
|
||||
{
|
||||
/**
|
||||
* 查询商品价格带
|
||||
*
|
||||
* @param priceBandId 商品价格带ID
|
||||
* @return 商品价格带
|
||||
*/
|
||||
public ItemPriceBand selectItemPriceBandById(Long priceBandId);
|
||||
|
||||
/**
|
||||
* 校验 商品价格带 名称是否重复
|
||||
*
|
||||
* @param PriceBandName
|
||||
* @return 商品价格带
|
||||
*/
|
||||
public ItemPriceBand checkItemPriceBandUnique(String PriceBandName);
|
||||
|
||||
/**
|
||||
* 查询商品价格带列表
|
||||
*
|
||||
* @param itemPriceBand 商品价格带
|
||||
* @return 商品价格带集合
|
||||
*/
|
||||
public List<ItemPriceBand> selectItemPriceBandList(ItemPriceBand itemPriceBand);
|
||||
|
||||
/**
|
||||
* 新增商品价格带
|
||||
*
|
||||
* @param itemPriceBand 商品价格带
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertItemPriceBand(ItemPriceBand itemPriceBand);
|
||||
|
||||
/**
|
||||
* 修改商品价格带
|
||||
*
|
||||
* @param itemPriceBand 商品价格带
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateItemPriceBand(ItemPriceBand itemPriceBand);
|
||||
|
||||
/**
|
||||
* 删除商品价格带
|
||||
*
|
||||
* @param priceBandId 商品价格带ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteItemPriceBandById(Long priceBandId);
|
||||
|
||||
/**
|
||||
* 批量删除商品价格带
|
||||
*
|
||||
* @param priceBandIds 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteItemPriceBandByIds(String[] priceBandIds);
|
||||
}
|
||||
|
|
@ -0,0 +1,105 @@
|
|||
package com.ruoyi.province.platform.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.province.platform.domain.PurchUserType;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 购货用户类型Mapper接口
|
||||
*
|
||||
* @author dalin
|
||||
* @date 2021-01-14
|
||||
*/
|
||||
public interface PurchUserTypeMapper
|
||||
{
|
||||
/**
|
||||
* 查询购货用户类型
|
||||
*
|
||||
* @param purchTypeId 购货用户类型ID
|
||||
* @return 购货用户类型
|
||||
*/
|
||||
public PurchUserType selectPurchUserTypeById(Long purchTypeId);
|
||||
|
||||
/**
|
||||
* 校验 购货用户类型 名称是否重复
|
||||
*
|
||||
* @param PurchTypeName
|
||||
* @return 购货用户类型
|
||||
*/
|
||||
public PurchUserType checkPurchUserTypeUnique(String PurchTypeName);
|
||||
|
||||
/**
|
||||
* 查询购货用户类型列表
|
||||
*
|
||||
* @param purchUserType 购货用户类型
|
||||
* @return 购货用户类型集合
|
||||
*/
|
||||
public List<PurchUserType> selectPurchUserTypeList(PurchUserType purchUserType);
|
||||
|
||||
/**
|
||||
* 新增购货用户类型
|
||||
*
|
||||
* @param purchUserType 购货用户类型
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertPurchUserType(PurchUserType purchUserType);
|
||||
|
||||
/**
|
||||
* 修改购货用户类型
|
||||
*
|
||||
* @param purchUserType 购货用户类型
|
||||
* @return 结果
|
||||
*/
|
||||
public int updatePurchUserType(PurchUserType purchUserType);
|
||||
|
||||
/**
|
||||
* 删除购货用户类型
|
||||
*
|
||||
* @param purchTypeId 购货用户类型ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePurchUserTypeById(Long purchTypeId);
|
||||
|
||||
/**
|
||||
* 批量删除购货用户类型
|
||||
*
|
||||
* @param purchTypeIds 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePurchUserTypeByIds(String[] purchTypeIds);
|
||||
|
||||
|
||||
/**
|
||||
* 修改子元素关系
|
||||
*
|
||||
* @param purchUserTypes 子元素
|
||||
* @return 结果
|
||||
*/
|
||||
public int updatePurchUserTypeChildren(@Param("purchUserTypes") List<PurchUserType> purchUserType);
|
||||
|
||||
|
||||
/**
|
||||
* 根据ID查询所有子部门
|
||||
*
|
||||
* @param purchUserTypeId 部门ID
|
||||
* @return 部门列表
|
||||
*/
|
||||
public List<PurchUserType> selectChildrenPurchUserTypeById(Long purchTypeId);
|
||||
|
||||
/**
|
||||
* 根据ID查询所有子部门(正常状态)
|
||||
*
|
||||
* @param purchTypeId 部门ID
|
||||
* @return 子部门数
|
||||
*/
|
||||
public int selectNormalChildrenPurchUserTypeById(Long purchTypeId);
|
||||
|
||||
/**
|
||||
* 修改所在部门的父级部门状态
|
||||
*
|
||||
* @param purchUserType 部门
|
||||
*/
|
||||
public void updatePurchUserTypeStatus(PurchUserType purchUserType);
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
package com.ruoyi.province.platform.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.province.platform.domain.Regional;
|
||||
|
||||
/**
|
||||
* 地区资料Mapper接口
|
||||
*
|
||||
* @author dalin
|
||||
* @date 2021-01-11
|
||||
*/
|
||||
public interface RegionalMapper
|
||||
{
|
||||
/**
|
||||
* 查询地区资料
|
||||
*
|
||||
* @param regionalId 地区资料ID
|
||||
* @return 地区资料
|
||||
*/
|
||||
public Regional selectRegionalById(Long regionalId);
|
||||
|
||||
/**
|
||||
* 校验 地区资料 名称是否重复
|
||||
*
|
||||
* @param RegionalName
|
||||
* @return 地区资料
|
||||
*/
|
||||
public Regional checkRegionalUnique(String RegionalName);
|
||||
|
||||
/**
|
||||
* 查询地区资料列表
|
||||
*
|
||||
* @param regional 地区资料
|
||||
* @return 地区资料集合
|
||||
*/
|
||||
public List<Regional> selectRegionalList(Regional regional);
|
||||
|
||||
/**
|
||||
* 新增地区资料
|
||||
*
|
||||
* @param regional 地区资料
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRegional(Regional regional);
|
||||
|
||||
/**
|
||||
* 修改地区资料
|
||||
*
|
||||
* @param regional 地区资料
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRegional(Regional regional);
|
||||
|
||||
/**
|
||||
* 删除地区资料
|
||||
*
|
||||
* @param regionalId 地区资料ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRegionalById(Long regionalId);
|
||||
|
||||
/**
|
||||
* 批量删除地区资料
|
||||
*
|
||||
* @param regionalIds 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRegionalByIds(String[] regionalIds);
|
||||
}
|
||||
|
|
@ -0,0 +1,105 @@
|
|||
package com.ruoyi.province.platform.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.province.platform.domain.SupplyChainHier;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 供应链层级Mapper接口
|
||||
*
|
||||
* @author dalin
|
||||
* @date 2021-01-14
|
||||
*/
|
||||
public interface SupplyChainHierMapper
|
||||
{
|
||||
/**
|
||||
* 查询供应链层级
|
||||
*
|
||||
* @param supplyChainId 供应链层级ID
|
||||
* @return 供应链层级
|
||||
*/
|
||||
public SupplyChainHier selectSupplyChainHierById(Long supplyChainId);
|
||||
|
||||
/**
|
||||
* 校验 供应链层级 名称是否重复
|
||||
*
|
||||
* @param SupplyChainName
|
||||
* @return 供应链层级
|
||||
*/
|
||||
public SupplyChainHier checkSupplyChainHierUnique(String SupplyChainName);
|
||||
|
||||
/**
|
||||
* 查询供应链层级列表
|
||||
*
|
||||
* @param supplyChainHier 供应链层级
|
||||
* @return 供应链层级集合
|
||||
*/
|
||||
public List<SupplyChainHier> selectSupplyChainHierList(SupplyChainHier supplyChainHier);
|
||||
|
||||
/**
|
||||
* 新增供应链层级
|
||||
*
|
||||
* @param supplyChainHier 供应链层级
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSupplyChainHier(SupplyChainHier supplyChainHier);
|
||||
|
||||
/**
|
||||
* 修改供应链层级
|
||||
*
|
||||
* @param supplyChainHier 供应链层级
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSupplyChainHier(SupplyChainHier supplyChainHier);
|
||||
|
||||
/**
|
||||
* 删除供应链层级
|
||||
*
|
||||
* @param supplyChainId 供应链层级ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSupplyChainHierById(Long supplyChainId);
|
||||
|
||||
/**
|
||||
* 批量删除供应链层级
|
||||
*
|
||||
* @param supplyChainIds 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSupplyChainHierByIds(String[] supplyChainIds);
|
||||
|
||||
|
||||
/**
|
||||
* 修改子元素关系
|
||||
*
|
||||
* @param supplyChainHiers 子元素
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSupplyChainHierChildren(@Param("supplyChainHiers") List<SupplyChainHier> supplyChainHier);
|
||||
|
||||
|
||||
/**
|
||||
* 根据ID查询所有子部门
|
||||
*
|
||||
* @param supplyChainHierId 部门ID
|
||||
* @return 部门列表
|
||||
*/
|
||||
public List<SupplyChainHier> selectChildrenSupplyChainHierById(Long supplyChainId);
|
||||
|
||||
/**
|
||||
* 根据ID查询所有子部门(正常状态)
|
||||
*
|
||||
* @param supplyChainId 部门ID
|
||||
* @return 子部门数
|
||||
*/
|
||||
public int selectNormalChildrenSupplyChainHierById(Long supplyChainId);
|
||||
|
||||
/**
|
||||
* 修改所在部门的父级部门状态
|
||||
*
|
||||
* @param supplyChainHier 部门
|
||||
*/
|
||||
public void updateSupplyChainHierStatus(SupplyChainHier supplyChainHier);
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
package com.ruoyi.province.platform.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.province.platform.domain.BusinessScope;
|
||||
|
||||
/**
|
||||
* 业务规模Service接口
|
||||
*
|
||||
* @author dalin
|
||||
* @date 2020-12-24
|
||||
*/
|
||||
public interface IBusinessScopeService
|
||||
{
|
||||
/**
|
||||
* 查询业务规模
|
||||
*
|
||||
* @param businessScaleId 业务规模ID
|
||||
* @return 业务规模
|
||||
*/
|
||||
public BusinessScope selectBusinessScopeById(Long businessScaleId);
|
||||
|
||||
/**
|
||||
* 查询业务规模
|
||||
*
|
||||
* @param businessScope 业务规模ID
|
||||
* @return 业务规模
|
||||
*/
|
||||
public String checkBusinessScopeUnique(BusinessScope businessScope);
|
||||
|
||||
/**
|
||||
* 查询业务规模列表
|
||||
*
|
||||
* @param businessScope 业务规模
|
||||
* @return 业务规模集合
|
||||
*/
|
||||
public List<BusinessScope> selectBusinessScopeList(BusinessScope businessScope);
|
||||
|
||||
/**
|
||||
* 新增业务规模
|
||||
*
|
||||
* @param businessScope 业务规模
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBusinessScope(BusinessScope businessScope);
|
||||
|
||||
/**
|
||||
* 修改业务规模
|
||||
*
|
||||
* @param businessScope 业务规模
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBusinessScope(BusinessScope businessScope);
|
||||
|
||||
/**
|
||||
* 批量删除业务规模
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBusinessScopeByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除业务规模信息
|
||||
*
|
||||
* @param businessScaleId 业务规模ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBusinessScopeById(Long businessScaleId);
|
||||
}
|
||||
|
|
@ -8,7 +8,7 @@ import java.util.List;
|
|||
* 经济类型Service接口
|
||||
*
|
||||
* @author dalin
|
||||
* @date 2020-12-19
|
||||
* @date 2020-12-24
|
||||
*/
|
||||
public interface IEconTypeService
|
||||
{
|
||||
|
|
@ -20,14 +20,14 @@ public interface IEconTypeService
|
|||
*/
|
||||
public EconType selectEconTypeById(Long econId);
|
||||
|
||||
/**
|
||||
* 校验经济类型名称是否重复
|
||||
*
|
||||
* @param econName 经济类型ID
|
||||
* @return 1 \ 0
|
||||
*/
|
||||
public String checkEconNameUnique(EconType econType);
|
||||
|
||||
/**
|
||||
* 查询经济类型
|
||||
*
|
||||
* @param econType 经济类型ID
|
||||
* @return 经济类型
|
||||
*/
|
||||
public String checkEconTypeUnique(EconType econType);
|
||||
|
||||
/**
|
||||
* 查询经济类型列表
|
||||
*
|
||||
|
|
|
|||
|
|
@ -0,0 +1,69 @@
|
|||
package com.ruoyi.province.platform.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.province.platform.domain.ItemParamters;
|
||||
|
||||
/**
|
||||
* 商品参数Service接口
|
||||
*
|
||||
* @author dalin
|
||||
* @date 2021-01-14
|
||||
*/
|
||||
public interface IItemParamtersService
|
||||
{
|
||||
/**
|
||||
* 查询商品参数
|
||||
*
|
||||
* @param itemParamtersId 商品参数ID
|
||||
* @return 商品参数
|
||||
*/
|
||||
public ItemParamters selectItemParamtersById(Long itemParamtersId);
|
||||
|
||||
/**
|
||||
* 查询商品参数
|
||||
*
|
||||
* @param itemParamters 商品参数ID
|
||||
* @return 商品参数
|
||||
*/
|
||||
public String checkItemParamtersUnique(ItemParamters itemParamters);
|
||||
|
||||
/**
|
||||
* 查询商品参数列表
|
||||
*
|
||||
* @param itemParamters 商品参数
|
||||
* @return 商品参数集合
|
||||
*/
|
||||
public List<ItemParamters> selectItemParamtersList(ItemParamters itemParamters);
|
||||
|
||||
/**
|
||||
* 新增商品参数
|
||||
*
|
||||
* @param itemParamters 商品参数
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertItemParamters(ItemParamters itemParamters);
|
||||
|
||||
/**
|
||||
* 修改商品参数
|
||||
*
|
||||
* @param itemParamters 商品参数
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateItemParamters(ItemParamters itemParamters);
|
||||
|
||||
/**
|
||||
* 批量删除商品参数
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteItemParamtersByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除商品参数信息
|
||||
*
|
||||
* @param itemParamtersId 商品参数ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteItemParamtersById(Long itemParamtersId);
|
||||
}
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
package com.ruoyi.province.platform.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.province.platform.domain.ItemPriceBand;
|
||||
|
||||
/**
|
||||
* 商品价格带Service接口
|
||||
*
|
||||
* @author dalin
|
||||
* @date 2020-12-24
|
||||
*/
|
||||
public interface IItemPriceBandService
|
||||
{
|
||||
/**
|
||||
* 查询商品价格带
|
||||
*
|
||||
* @param priceBandId 商品价格带ID
|
||||
* @return 商品价格带
|
||||
*/
|
||||
public ItemPriceBand selectItemPriceBandById(Long priceBandId);
|
||||
|
||||
/**
|
||||
* 查询商品价格带
|
||||
*
|
||||
* @param itemPriceBand 商品价格带ID
|
||||
* @return 商品价格带
|
||||
*/
|
||||
public String checkItemPriceBandUnique(ItemPriceBand itemPriceBand);
|
||||
|
||||
/**
|
||||
* 查询商品价格带列表
|
||||
*
|
||||
* @param itemPriceBand 商品价格带
|
||||
* @return 商品价格带集合
|
||||
*/
|
||||
public List<ItemPriceBand> selectItemPriceBandList(ItemPriceBand itemPriceBand);
|
||||
|
||||
/**
|
||||
* 新增商品价格带
|
||||
*
|
||||
* @param itemPriceBand 商品价格带
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertItemPriceBand(ItemPriceBand itemPriceBand);
|
||||
|
||||
/**
|
||||
* 修改商品价格带
|
||||
*
|
||||
* @param itemPriceBand 商品价格带
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateItemPriceBand(ItemPriceBand itemPriceBand);
|
||||
|
||||
/**
|
||||
* 批量删除商品价格带
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteItemPriceBandByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除商品价格带信息
|
||||
*
|
||||
* @param priceBandId 商品价格带ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteItemPriceBandById(Long priceBandId);
|
||||
}
|
||||
|
|
@ -0,0 +1,94 @@
|
|||
package com.ruoyi.province.platform.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.province.platform.domain.PurchUserType;
|
||||
import com.ruoyi.common.core.domain.Ztree;
|
||||
|
||||
/**
|
||||
* 购货用户类型Service接口
|
||||
*
|
||||
* @author dalin
|
||||
* @date 2021-01-14
|
||||
*/
|
||||
public interface IPurchUserTypeService
|
||||
{
|
||||
/**
|
||||
* 查询购货用户类型
|
||||
*
|
||||
* @param purchTypeId 购货用户类型ID
|
||||
* @return 购货用户类型
|
||||
*/
|
||||
public PurchUserType selectPurchUserTypeById(Long purchTypeId);
|
||||
|
||||
/**
|
||||
* 查询购货用户类型
|
||||
*
|
||||
* @param purchUserType 购货用户类型ID
|
||||
* @return 购货用户类型
|
||||
*/
|
||||
public String checkPurchUserTypeUnique(PurchUserType purchUserType);
|
||||
|
||||
/**
|
||||
* 查询购货用户类型列表
|
||||
*
|
||||
* @param purchUserType 购货用户类型
|
||||
* @return 购货用户类型集合
|
||||
*/
|
||||
public List<PurchUserType> selectPurchUserTypeList(PurchUserType purchUserType);
|
||||
|
||||
/**
|
||||
* 新增购货用户类型
|
||||
*
|
||||
* @param purchUserType 购货用户类型
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertPurchUserType(PurchUserType purchUserType);
|
||||
|
||||
/**
|
||||
* 修改购货用户类型
|
||||
*
|
||||
* @param purchUserType 购货用户类型
|
||||
* @return 结果
|
||||
*/
|
||||
public int updatePurchUserType(PurchUserType purchUserType);
|
||||
|
||||
/**
|
||||
* 批量删除购货用户类型
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePurchUserTypeByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除购货用户类型信息
|
||||
*
|
||||
* @param purchTypeId 购货用户类型ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePurchUserTypeById(Long purchTypeId);
|
||||
|
||||
/**
|
||||
* 查询部门管理树(排除下级)
|
||||
*
|
||||
* @param dept 部门信息
|
||||
* @return 所有部门信息
|
||||
*/
|
||||
public List<Ztree> selectPurchUserTypeTreeExcludeChild(PurchUserType purchUserType);
|
||||
|
||||
/**
|
||||
* 根据ID查询所有子购货用户类型(正常状态)
|
||||
*
|
||||
* @param purchTypeId ID
|
||||
* @return 子购货用户类型数
|
||||
*/
|
||||
public int selectNormalChildrenPurchUserTypeById(Long purchTypeId);
|
||||
|
||||
|
||||
/**
|
||||
* 查询购货用户类型树列表
|
||||
*
|
||||
* @return 所有购货用户类型信息
|
||||
*/
|
||||
public List<Ztree> selectPurchUserTypeTree();
|
||||
}
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
package com.ruoyi.province.platform.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.province.platform.domain.Regional;
|
||||
import com.ruoyi.common.core.domain.Ztree;
|
||||
|
||||
/**
|
||||
* 地区资料Service接口
|
||||
*
|
||||
* @author dalin
|
||||
* @date 2021-01-11
|
||||
*/
|
||||
public interface IRegionalService
|
||||
{
|
||||
/**
|
||||
* 查询地区资料
|
||||
*
|
||||
* @param regionalId 地区资料ID
|
||||
* @return 地区资料
|
||||
*/
|
||||
public Regional selectRegionalById(Long regionalId);
|
||||
|
||||
/**
|
||||
* 查询地区资料
|
||||
*
|
||||
* @param regional 地区资料ID
|
||||
* @return 地区资料
|
||||
*/
|
||||
public String checkRegionalUnique(Regional regional);
|
||||
|
||||
/**
|
||||
* 查询地区资料列表
|
||||
*
|
||||
* @param regional 地区资料
|
||||
* @return 地区资料集合
|
||||
*/
|
||||
public List<Regional> selectRegionalList(Regional regional);
|
||||
|
||||
/**
|
||||
* 新增地区资料
|
||||
*
|
||||
* @param regional 地区资料
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRegional(Regional regional);
|
||||
|
||||
/**
|
||||
* 修改地区资料
|
||||
*
|
||||
* @param regional 地区资料
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRegional(Regional regional);
|
||||
|
||||
/**
|
||||
* 批量删除地区资料
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRegionalByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除地区资料信息
|
||||
*
|
||||
* @param regionalId 地区资料ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRegionalById(Long regionalId);
|
||||
|
||||
/**
|
||||
* 查询地区资料树列表
|
||||
*
|
||||
* @return 所有地区资料信息
|
||||
*/
|
||||
public List<Ztree> selectRegionalTree();
|
||||
}
|
||||
|
|
@ -0,0 +1,94 @@
|
|||
package com.ruoyi.province.platform.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.province.platform.domain.SupplyChainHier;
|
||||
import com.ruoyi.common.core.domain.Ztree;
|
||||
|
||||
/**
|
||||
* 供应链层级Service接口
|
||||
*
|
||||
* @author dalin
|
||||
* @date 2021-01-14
|
||||
*/
|
||||
public interface ISupplyChainHierService
|
||||
{
|
||||
/**
|
||||
* 查询供应链层级
|
||||
*
|
||||
* @param supplyChainId 供应链层级ID
|
||||
* @return 供应链层级
|
||||
*/
|
||||
public SupplyChainHier selectSupplyChainHierById(Long supplyChainId);
|
||||
|
||||
/**
|
||||
* 查询供应链层级
|
||||
*
|
||||
* @param supplyChainHier 供应链层级ID
|
||||
* @return 供应链层级
|
||||
*/
|
||||
public String checkSupplyChainHierUnique(SupplyChainHier supplyChainHier);
|
||||
|
||||
/**
|
||||
* 查询供应链层级列表
|
||||
*
|
||||
* @param supplyChainHier 供应链层级
|
||||
* @return 供应链层级集合
|
||||
*/
|
||||
public List<SupplyChainHier> selectSupplyChainHierList(SupplyChainHier supplyChainHier);
|
||||
|
||||
/**
|
||||
* 新增供应链层级
|
||||
*
|
||||
* @param supplyChainHier 供应链层级
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSupplyChainHier(SupplyChainHier supplyChainHier);
|
||||
|
||||
/**
|
||||
* 修改供应链层级
|
||||
*
|
||||
* @param supplyChainHier 供应链层级
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSupplyChainHier(SupplyChainHier supplyChainHier);
|
||||
|
||||
/**
|
||||
* 批量删除供应链层级
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSupplyChainHierByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除供应链层级信息
|
||||
*
|
||||
* @param supplyChainId 供应链层级ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSupplyChainHierById(Long supplyChainId);
|
||||
|
||||
/**
|
||||
* 查询部门管理树(排除下级)
|
||||
*
|
||||
* @param dept 部门信息
|
||||
* @return 所有部门信息
|
||||
*/
|
||||
public List<Ztree> selectSupplyChainHierTreeExcludeChild(SupplyChainHier supplyChainHier);
|
||||
|
||||
/**
|
||||
* 根据ID查询所有子供应链层级(正常状态)
|
||||
*
|
||||
* @param supplyChainId ID
|
||||
* @return 子供应链层级数
|
||||
*/
|
||||
public int selectNormalChildrenSupplyChainHierById(Long supplyChainId);
|
||||
|
||||
|
||||
/**
|
||||
* 查询供应链层级树列表
|
||||
*
|
||||
* @return 所有供应链层级信息
|
||||
*/
|
||||
public List<Ztree> selectSupplyChainHierTree();
|
||||
}
|
||||
|
|
@ -0,0 +1,123 @@
|
|||
package com.ruoyi.province.platform.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.ShiroUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.province.platform.Constants.BussiConstants;
|
||||
import com.ruoyi.province.platform.domain.BusinessScope;
|
||||
import com.ruoyi.province.platform.mapper.BusinessScopeMapper;
|
||||
import com.ruoyi.province.platform.service.IBusinessScopeService;
|
||||
import com.ruoyi.province.platform.utils.BussUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 业务规模Service业务层处理
|
||||
*
|
||||
* @author dalin
|
||||
* @date 2020-12-24
|
||||
*/
|
||||
@Service
|
||||
public class BusinessScopeServiceImpl implements IBusinessScopeService
|
||||
{
|
||||
@Autowired
|
||||
private BusinessScopeMapper businessScopeMapper;
|
||||
|
||||
/**
|
||||
* 查询业务规模
|
||||
*
|
||||
* @param businessScaleId 业务规模ID
|
||||
* @return 业务规模
|
||||
*/
|
||||
@Override
|
||||
public BusinessScope selectBusinessScopeById(Long businessScaleId)
|
||||
{
|
||||
return businessScopeMapper.selectBusinessScopeById(businessScaleId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询业务规模
|
||||
*
|
||||
* @param businessScaleId 业务规模ID
|
||||
* @return 业务规模
|
||||
*/
|
||||
@Override
|
||||
public String checkBusinessScopeUnique(BusinessScope businessScope)
|
||||
{
|
||||
Long docId = StringUtils.isNull( businessScope.getBusinessScaleId() ) ? -1L : businessScope.getBusinessScaleId();
|
||||
BusinessScope info = businessScopeMapper.checkBusinessScopeUnique( businessScope.getBusinessScaleName() );
|
||||
if (StringUtils.isNotNull(info) && info.getBusinessScaleId().longValue() != docId.longValue())
|
||||
{
|
||||
return BussiConstants.DOC_NAME_NOT_UNIQUE;
|
||||
}
|
||||
return BussiConstants.DOC_NAME_UNIQUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询业务规模列表
|
||||
*
|
||||
* @param businessScope 业务规模
|
||||
* @return 业务规模
|
||||
*/
|
||||
@Override
|
||||
public List<BusinessScope> selectBusinessScopeList(BusinessScope businessScope)
|
||||
{
|
||||
return businessScopeMapper.selectBusinessScopeList(businessScope);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增业务规模
|
||||
*
|
||||
* @param businessScope 业务规模
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBusinessScope(BusinessScope businessScope)
|
||||
{
|
||||
businessScope.setDocNum("00001".concat( BussUtils.nextValue("businessScope") ) );
|
||||
|
||||
businessScope.setCreateBy( ShiroUtils.getLoginName() );
|
||||
businessScope.setCreateTime( DateUtils.getNowDate() );
|
||||
return businessScopeMapper.insertBusinessScope(businessScope);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改业务规模
|
||||
*
|
||||
* @param businessScope 业务规模
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBusinessScope(BusinessScope businessScope)
|
||||
{
|
||||
businessScope.setUpdateTime(DateUtils.getNowDate());
|
||||
return businessScopeMapper.updateBusinessScope(businessScope);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除业务规模对象
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBusinessScopeByIds(String ids)
|
||||
{
|
||||
return businessScopeMapper.deleteBusinessScopeByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除业务规模信息
|
||||
*
|
||||
* @param businessScaleId 业务规模ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBusinessScopeById(Long businessScaleId)
|
||||
{
|
||||
return businessScopeMapper.deleteBusinessScopeById(businessScaleId);
|
||||
}
|
||||
}
|
||||
|
|
@ -2,11 +2,13 @@ package com.ruoyi.province.platform.service.impl;
|
|||
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.ShiroUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.province.platform.Constants.BussiConstants;
|
||||
import com.ruoyi.province.platform.domain.CompanyArea;
|
||||
import com.ruoyi.province.platform.mapper.CompanyAreaMapper;
|
||||
import com.ruoyi.province.platform.service.ICompanyAreaService;
|
||||
import com.ruoyi.province.platform.utils.BussUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
|
@ -75,6 +77,8 @@ public class CompanyAreaServiceImpl implements ICompanyAreaService
|
|||
@Override
|
||||
public int insertCompanyArea(CompanyArea companyArea)
|
||||
{
|
||||
companyArea.setDocNum("00001".concat( BussUtils.nextValue("companyArea") ) );
|
||||
companyArea.setCreateBy( ShiroUtils.getLoginName() );
|
||||
companyArea.setCreateTime(DateUtils.getNowDate());
|
||||
return companyAreaMapper.insertCompanyArea(companyArea);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,14 @@
|
|||
package com.ruoyi.province.platform.service.impl;
|
||||
|
||||
import com.ruoyi.common.constant.UserConstants;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.ShiroUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.province.platform.Constants.BussiConstants;
|
||||
import com.ruoyi.province.platform.domain.EconType;
|
||||
import com.ruoyi.province.platform.mapper.EconTypeMapper;
|
||||
import com.ruoyi.province.platform.service.IEconTypeService;
|
||||
import com.ruoyi.province.platform.utils.BussUtils;
|
||||
import com.ruoyi.system.domain.SysPost;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
|
@ -19,7 +18,7 @@ import java.util.List;
|
|||
* 经济类型Service业务层处理
|
||||
*
|
||||
* @author dalin
|
||||
* @date 2020-12-19
|
||||
* @date 2020-12-24
|
||||
*/
|
||||
@Service
|
||||
public class EconTypeServiceImpl implements IEconTypeService
|
||||
|
|
@ -39,25 +38,25 @@ public class EconTypeServiceImpl implements IEconTypeService
|
|||
return econTypeMapper.selectEconTypeById(econId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 检验经济类型 名称是否重复
|
||||
*
|
||||
* @param econName 经济类型ID
|
||||
* @return 1 / 0
|
||||
*/
|
||||
@Override
|
||||
public String checkEconNameUnique(EconType econType)
|
||||
{
|
||||
Long econId = StringUtils.isNull( econType.getEconId() ) ? -1L : econType.getEconId();
|
||||
EconType info = econTypeMapper.checkEconNameUnique( econType.getEconName() );
|
||||
if (StringUtils.isNotNull(info) && info.getEconId().longValue() != econId.longValue())
|
||||
/**
|
||||
* 查询经济类型
|
||||
*
|
||||
* @param econId 经济类型ID
|
||||
* @return 经济类型
|
||||
*/
|
||||
@Override
|
||||
public String checkEconTypeUnique(EconType econType)
|
||||
{
|
||||
return BussiConstants.DOC_NAME_NOT_UNIQUE;
|
||||
Long docId = StringUtils.isNull( econType.getEconId() ) ? -1L : econType.getEconId();
|
||||
EconType info = econTypeMapper.checkEconTypeUnique( econType.getEconName() );
|
||||
if (StringUtils.isNotNull(info) && info.getEconId().longValue() != docId.longValue())
|
||||
{
|
||||
return BussiConstants.DOC_NAME_NOT_UNIQUE;
|
||||
}
|
||||
return BussiConstants.DOC_NAME_UNIQUE;
|
||||
}
|
||||
return BussiConstants.DOC_NAME_UNIQUE;
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* 查询经济类型列表
|
||||
*
|
||||
* @param econType 经济类型
|
||||
|
|
@ -78,10 +77,8 @@ public class EconTypeServiceImpl implements IEconTypeService
|
|||
@Override
|
||||
public int insertEconType(EconType econType)
|
||||
{
|
||||
// 判断重复
|
||||
|
||||
// 单据号生成
|
||||
econType.setDocNum( "00001".concat(BussUtils.nextValue("econType") ) );
|
||||
econType.setDocNum("00001".concat( BussUtils.nextValue("econType") ) );
|
||||
econType.setCreateBy( ShiroUtils.getLoginName() );
|
||||
econType.setCreateTime(DateUtils.getNowDate());
|
||||
return econTypeMapper.insertEconType(econType);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,167 @@
|
|||
package com.ruoyi.province.platform.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.ArrayList;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import com.ruoyi.province.platform.domain.ItemParamtersUnit;
|
||||
import com.ruoyi.province.platform.mapper.ItemParamtersMapper;
|
||||
import com.ruoyi.province.platform.domain.ItemParamters;
|
||||
import com.ruoyi.province.platform.service.IItemParamtersService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.province.platform.Constants.BussiConstants;
|
||||
import com.ruoyi.province.platform.utils.BussUtils;
|
||||
import com.ruoyi.common.utils.ShiroUtils;
|
||||
|
||||
/**
|
||||
* 商品参数Service业务层处理
|
||||
*
|
||||
* @author dalin
|
||||
* @date 2021-01-14
|
||||
*/
|
||||
@Service
|
||||
public class ItemParamtersServiceImpl implements IItemParamtersService
|
||||
{
|
||||
@Autowired
|
||||
private ItemParamtersMapper itemParamtersMapper;
|
||||
|
||||
/**
|
||||
* 查询商品参数
|
||||
*
|
||||
* @param itemParamtersId 商品参数ID
|
||||
* @return 商品参数
|
||||
*/
|
||||
@Override
|
||||
public ItemParamters selectItemParamtersById(Long itemParamtersId)
|
||||
{
|
||||
return itemParamtersMapper.selectItemParamtersById(itemParamtersId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询商品参数
|
||||
*
|
||||
* @param itemParamtersId 商品参数ID
|
||||
* @return 商品参数
|
||||
*/
|
||||
@Override
|
||||
public String checkItemParamtersUnique(ItemParamters itemParamters)
|
||||
{
|
||||
Long docId = StringUtils.isNull( itemParamters.getItemParamtersId() ) ? -1L : itemParamters.getItemParamtersId();
|
||||
ItemParamters info = itemParamtersMapper.checkItemParamtersUnique( itemParamters.getItemParamtersName() );
|
||||
if (StringUtils.isNotNull(info) && info.getItemParamtersId().longValue() != docId.longValue())
|
||||
{
|
||||
return BussiConstants.DOC_NAME_NOT_UNIQUE;
|
||||
}
|
||||
return BussiConstants.DOC_NAME_UNIQUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询商品参数列表
|
||||
*
|
||||
* @param itemParamters 商品参数
|
||||
* @return 商品参数
|
||||
*/
|
||||
@Override
|
||||
public List<ItemParamters> selectItemParamtersList(ItemParamters itemParamters)
|
||||
{
|
||||
return itemParamtersMapper.selectItemParamtersList(itemParamters);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增商品参数
|
||||
*
|
||||
* @param itemParamters 商品参数
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int insertItemParamters(ItemParamters itemParamters)
|
||||
{
|
||||
itemParamters.setDocNum("00001".concat( BussUtils.nextValue("itemParamters") ) );
|
||||
|
||||
itemParamters.setCreateBy( ShiroUtils.getLoginName() );
|
||||
itemParamters.setCreateTime( DateUtils.getNowDate() );
|
||||
|
||||
|
||||
int rows = itemParamtersMapper.insertItemParamters(itemParamters);
|
||||
insertItemParamtersUnit(itemParamters);
|
||||
return rows;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改商品参数
|
||||
*
|
||||
* @param itemParamters 商品参数
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int updateItemParamters(ItemParamters itemParamters)
|
||||
{
|
||||
|
||||
itemParamters.setUpdateTime(DateUtils.getNowDate());
|
||||
itemParamtersMapper.deleteItemParamtersUnitByItemParamtersId(itemParamters.getItemParamtersId());
|
||||
insertItemParamtersUnit(itemParamters);
|
||||
int result = itemParamtersMapper.updateItemParamters(itemParamters);
|
||||
|
||||
return result ;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除商品参数对象
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int deleteItemParamtersByIds(String ids)
|
||||
{
|
||||
itemParamtersMapper.deleteItemParamtersUnitByItemParamtersIds(Convert.toStrArray(ids));
|
||||
return itemParamtersMapper.deleteItemParamtersByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除商品参数信息
|
||||
*
|
||||
* @param itemParamtersId 商品参数ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteItemParamtersById(Long itemParamtersId)
|
||||
{
|
||||
itemParamtersMapper.deleteItemParamtersUnitByItemParamtersId(itemParamtersId);
|
||||
return itemParamtersMapper.deleteItemParamtersById(itemParamtersId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增商品参数_计量单位信息
|
||||
*
|
||||
* @param itemParamters 商品参数对象
|
||||
*/
|
||||
public void insertItemParamtersUnit(ItemParamters itemParamters)
|
||||
{
|
||||
List<ItemParamtersUnit> itemParamtersUnitList = itemParamters.getItemParamtersUnitList();
|
||||
Long itemParamtersId = itemParamters.getItemParamtersId();
|
||||
if (StringUtils.isNotNull(itemParamtersUnitList))
|
||||
{
|
||||
List<ItemParamtersUnit> list = new ArrayList<ItemParamtersUnit>();
|
||||
for (ItemParamtersUnit itemParamtersUnit : itemParamtersUnitList)
|
||||
{
|
||||
itemParamtersUnit.setItemParamtersId(itemParamtersId);
|
||||
list.add(itemParamtersUnit);
|
||||
}
|
||||
if (list.size() > 0)
|
||||
{
|
||||
itemParamtersMapper.batchItemParamtersUnit(list);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,122 @@
|
|||
package com.ruoyi.province.platform.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.province.platform.mapper.ItemPriceBandMapper;
|
||||
import com.ruoyi.province.platform.domain.ItemPriceBand;
|
||||
import com.ruoyi.province.platform.service.IItemPriceBandService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.province.platform.Constants.BussiConstants;
|
||||
import com.ruoyi.province.platform.utils.BussUtils;
|
||||
import com.ruoyi.common.utils.ShiroUtils;
|
||||
|
||||
/**
|
||||
* 商品价格带Service业务层处理
|
||||
*
|
||||
* @author dalin
|
||||
* @date 2020-12-24
|
||||
*/
|
||||
@Service
|
||||
public class ItemPriceBandServiceImpl implements IItemPriceBandService
|
||||
{
|
||||
@Autowired
|
||||
private ItemPriceBandMapper itemPriceBandMapper;
|
||||
|
||||
/**
|
||||
* 查询商品价格带
|
||||
*
|
||||
* @param priceBandId 商品价格带ID
|
||||
* @return 商品价格带
|
||||
*/
|
||||
@Override
|
||||
public ItemPriceBand selectItemPriceBandById(Long priceBandId)
|
||||
{
|
||||
return itemPriceBandMapper.selectItemPriceBandById(priceBandId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询商品价格带
|
||||
*
|
||||
* @param priceBandId 商品价格带ID
|
||||
* @return 商品价格带
|
||||
*/
|
||||
@Override
|
||||
public String checkItemPriceBandUnique(ItemPriceBand itemPriceBand)
|
||||
{
|
||||
Long docId = StringUtils.isNull( itemPriceBand.getPriceBandId() ) ? -1L : itemPriceBand.getPriceBandId();
|
||||
ItemPriceBand info = itemPriceBandMapper.checkItemPriceBandUnique( itemPriceBand.getPriceBandName() );
|
||||
if (StringUtils.isNotNull(info) && info.getPriceBandId().longValue() != docId.longValue())
|
||||
{
|
||||
return BussiConstants.DOC_NAME_NOT_UNIQUE;
|
||||
}
|
||||
return BussiConstants.DOC_NAME_UNIQUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询商品价格带列表
|
||||
*
|
||||
* @param itemPriceBand 商品价格带
|
||||
* @return 商品价格带
|
||||
*/
|
||||
@Override
|
||||
public List<ItemPriceBand> selectItemPriceBandList(ItemPriceBand itemPriceBand)
|
||||
{
|
||||
return itemPriceBandMapper.selectItemPriceBandList(itemPriceBand);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增商品价格带
|
||||
*
|
||||
* @param itemPriceBand 商品价格带
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertItemPriceBand(ItemPriceBand itemPriceBand)
|
||||
{
|
||||
itemPriceBand.setDocNum("00001".concat( BussUtils.nextValue("itemPriceBand") ) );
|
||||
|
||||
itemPriceBand.setCreateBy( ShiroUtils.getLoginName() );
|
||||
itemPriceBand.setCreateTime( DateUtils.getNowDate() );
|
||||
return itemPriceBandMapper.insertItemPriceBand(itemPriceBand);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改商品价格带
|
||||
*
|
||||
* @param itemPriceBand 商品价格带
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateItemPriceBand(ItemPriceBand itemPriceBand)
|
||||
{
|
||||
itemPriceBand.setUpdateTime(DateUtils.getNowDate());
|
||||
return itemPriceBandMapper.updateItemPriceBand(itemPriceBand);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除商品价格带对象
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteItemPriceBandByIds(String ids)
|
||||
{
|
||||
return itemPriceBandMapper.deleteItemPriceBandByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除商品价格带信息
|
||||
*
|
||||
* @param priceBandId 商品价格带ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteItemPriceBandById(Long priceBandId)
|
||||
{
|
||||
return itemPriceBandMapper.deleteItemPriceBandById(priceBandId);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,289 @@
|
|||
package com.ruoyi.province.platform.service.impl;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.ruoyi.common.annotation.DataScope;
|
||||
import com.ruoyi.common.constant.UserConstants;
|
||||
import com.ruoyi.common.core.domain.Ztree;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.province.platform.mapper.PurchUserTypeMapper;
|
||||
import com.ruoyi.province.platform.domain.PurchUserType;
|
||||
import com.ruoyi.province.platform.service.IPurchUserTypeService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.province.platform.Constants.BussiConstants;
|
||||
import com.ruoyi.province.platform.utils.BussUtils;
|
||||
import com.ruoyi.common.utils.ShiroUtils;
|
||||
|
||||
/**
|
||||
* 购货用户类型Service业务层处理
|
||||
*
|
||||
* @author dalin
|
||||
* @date 2021-01-14
|
||||
*/
|
||||
@Service
|
||||
public class PurchUserTypeServiceImpl implements IPurchUserTypeService
|
||||
{
|
||||
@Autowired
|
||||
private PurchUserTypeMapper purchUserTypeMapper;
|
||||
|
||||
/**
|
||||
* 查询购货用户类型
|
||||
*
|
||||
* @param purchTypeId 购货用户类型ID
|
||||
* @return 购货用户类型
|
||||
*/
|
||||
@Override
|
||||
public PurchUserType selectPurchUserTypeById(Long purchTypeId)
|
||||
{
|
||||
return purchUserTypeMapper.selectPurchUserTypeById(purchTypeId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询购货用户类型
|
||||
*
|
||||
* @param purchTypeId 购货用户类型ID
|
||||
* @return 购货用户类型
|
||||
*/
|
||||
@Override
|
||||
public String checkPurchUserTypeUnique(PurchUserType purchUserType)
|
||||
{
|
||||
Long docId = StringUtils.isNull( purchUserType.getPurchTypeId() ) ? -1L : purchUserType.getPurchTypeId();
|
||||
PurchUserType info = purchUserTypeMapper.checkPurchUserTypeUnique( purchUserType.getPurchTypeName() );
|
||||
if (StringUtils.isNotNull(info) && info.getPurchTypeId().longValue() != docId.longValue())
|
||||
{
|
||||
return BussiConstants.DOC_NAME_NOT_UNIQUE;
|
||||
}
|
||||
return BussiConstants.DOC_NAME_UNIQUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询购货用户类型列表
|
||||
*
|
||||
* @param purchUserType 购货用户类型
|
||||
* @return 购货用户类型
|
||||
*/
|
||||
@Override
|
||||
public List<PurchUserType> selectPurchUserTypeList(PurchUserType purchUserType)
|
||||
{
|
||||
return purchUserTypeMapper.selectPurchUserTypeList(purchUserType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增购货用户类型
|
||||
*
|
||||
* @param purchUserType 购货用户类型
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertPurchUserType(PurchUserType purchUserType)
|
||||
{
|
||||
purchUserType.setDocNum("00001".concat( BussUtils.nextValue("purchUserType") ) );
|
||||
|
||||
purchUserType.setCreateBy( ShiroUtils.getLoginName() );
|
||||
purchUserType.setCreateTime( DateUtils.getNowDate() );
|
||||
|
||||
PurchUserType info = purchUserTypeMapper.selectPurchUserTypeById(purchUserType.getParentId());
|
||||
purchUserType.setAncestors(info.getAncestors() + "," + purchUserType.getParentId());
|
||||
|
||||
return purchUserTypeMapper.insertPurchUserType(purchUserType);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改购货用户类型
|
||||
*
|
||||
* @param purchUserType 购货用户类型
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updatePurchUserType(PurchUserType purchUserType)
|
||||
{
|
||||
PurchUserType newParentPurchUserType = purchUserTypeMapper.selectPurchUserTypeById(purchUserType.getParentId());
|
||||
PurchUserType oldPurchUserType = selectPurchUserTypeById(purchUserType.getPurchTypeId());
|
||||
if (StringUtils.isNotNull(newParentPurchUserType) && StringUtils.isNotNull(oldPurchUserType))
|
||||
{
|
||||
String newAncestors = newParentPurchUserType.getAncestors() + "," + newParentPurchUserType.getPurchTypeId();
|
||||
String oldAncestors = oldPurchUserType.getAncestors();
|
||||
purchUserType.setAncestors(newAncestors);
|
||||
updatePurchUserTypeChildren(purchUserType.getPurchTypeId(), newAncestors, oldAncestors);
|
||||
}
|
||||
|
||||
purchUserType.setUpdateTime(DateUtils.getNowDate());
|
||||
int result = purchUserTypeMapper.updatePurchUserType(purchUserType);
|
||||
|
||||
if (UserConstants.DEPT_NORMAL.equals(purchUserType.getStatus()))
|
||||
{
|
||||
// 如果该购货用户类型是启用状态,则启用该购货用户类型的所有上级购货用户类型
|
||||
updateParentPurchUserTypeStatus(purchUserType);
|
||||
}
|
||||
return result ;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除购货用户类型对象
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePurchUserTypeByIds(String ids)
|
||||
{
|
||||
return purchUserTypeMapper.deletePurchUserTypeByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除购货用户类型信息
|
||||
*
|
||||
* @param purchTypeId 购货用户类型ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePurchUserTypeById(Long purchTypeId)
|
||||
{
|
||||
return purchUserTypeMapper.deletePurchUserTypeById(purchTypeId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询购货用户类型树列表
|
||||
*
|
||||
* @return 所有购货用户类型信息
|
||||
*/
|
||||
@Override
|
||||
public List<Ztree> selectPurchUserTypeTree()
|
||||
{
|
||||
List<PurchUserType> purchUserTypeList = purchUserTypeMapper.selectPurchUserTypeList(new PurchUserType());
|
||||
List<Ztree> ztrees = new ArrayList<Ztree>();
|
||||
for (PurchUserType purchUserType : purchUserTypeList)
|
||||
{
|
||||
Ztree ztree = new Ztree();
|
||||
ztree.setId(purchUserType.getPurchTypeId());
|
||||
ztree.setpId(purchUserType.getParentId());
|
||||
ztree.setName(purchUserType.getPurchTypeName());
|
||||
ztree.setTitle(purchUserType.getPurchTypeName());
|
||||
ztrees.add(ztree);
|
||||
}
|
||||
return ztrees;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改该购货用户类型的父级购货用户类型状态
|
||||
*
|
||||
* @param purchUserType 当前部门
|
||||
*/
|
||||
private void updateParentPurchUserTypeStatus(PurchUserType purchUserType)
|
||||
{
|
||||
String updateBy = purchUserType.getUpdateBy();
|
||||
purchUserType = purchUserTypeMapper.selectPurchUserTypeById(purchUserType.getPurchTypeId());
|
||||
purchUserType.setUpdateBy(updateBy);
|
||||
purchUserTypeMapper.updatePurchUserTypeStatus(purchUserType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询购货用户类型管理树(排除下级)
|
||||
*
|
||||
* @param purchTypeId 部门ID
|
||||
* @return 所有部门信息
|
||||
*/
|
||||
@Override
|
||||
@DataScope(deptAlias = "d")
|
||||
public List<Ztree> selectPurchUserTypeTreeExcludeChild(PurchUserType purchUserType)
|
||||
{
|
||||
Long purchTypeId = purchUserType.getPurchTypeId();
|
||||
List<PurchUserType> purchUserTypeList = purchUserTypeMapper.selectPurchUserTypeList(purchUserType);
|
||||
Iterator<PurchUserType> it = purchUserTypeList.iterator();
|
||||
while (it.hasNext())
|
||||
{
|
||||
PurchUserType d = (PurchUserType) it.next();
|
||||
if (d.getPurchTypeId().intValue() == purchTypeId
|
||||
|| ArrayUtils.contains(StringUtils.split(d.getAncestors(), ","), purchTypeId + ""))
|
||||
{
|
||||
it.remove();
|
||||
}
|
||||
}
|
||||
List<Ztree> ztrees = initZtree(purchUserTypeList);
|
||||
return ztrees;
|
||||
}
|
||||
|
||||
/**
|
||||
* 对象转购货用户类型树
|
||||
*
|
||||
* @param purchUserTypeList 购货用户类型列表
|
||||
* @return 树结构列表
|
||||
*/
|
||||
public List<Ztree> initZtree(List<PurchUserType> purchUserTypeList)
|
||||
{
|
||||
return initZtree(purchUserTypeList, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改子元素关系
|
||||
*
|
||||
* @param purchTypeId 被修改的购货用户类型ID
|
||||
* @param newAncestors 新的父ID集合
|
||||
* @param oldAncestors 旧的父ID集合
|
||||
*/
|
||||
public void updatePurchUserTypeChildren(Long purchTypeId, String newAncestors, String oldAncestors)
|
||||
{
|
||||
List<PurchUserType> children = purchUserTypeMapper.selectChildrenPurchUserTypeById(purchTypeId);
|
||||
for (PurchUserType child : children)
|
||||
{
|
||||
child.setAncestors(child.getAncestors().replace(oldAncestors, newAncestors));
|
||||
}
|
||||
if (children.size() > 0)
|
||||
{
|
||||
purchUserTypeMapper.updatePurchUserTypeChildren(children);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 对象转购货用户类型树
|
||||
*
|
||||
* @param purchUserTypeList 购货用户类型列表
|
||||
* @param roleList 角色已存在菜单列表
|
||||
* @return 树结构列表
|
||||
*/
|
||||
public List<Ztree> initZtree(List<PurchUserType> purchUserTypeList, List<String> rolePurchUserTypeList)
|
||||
{
|
||||
|
||||
List<Ztree> ztrees = new ArrayList<Ztree>();
|
||||
boolean isCheck = StringUtils.isNotNull(rolePurchUserTypeList);
|
||||
for (PurchUserType purchUserType : purchUserTypeList)
|
||||
{
|
||||
if (UserConstants.DEPT_NORMAL.equals(purchUserType.getStatus()))
|
||||
{
|
||||
Ztree ztree = new Ztree();
|
||||
ztree.setId(purchUserType.getPurchTypeId());
|
||||
ztree.setpId(purchUserType.getParentId());
|
||||
ztree.setName(purchUserType.getPurchTypeName());
|
||||
ztree.setTitle(purchUserType.getPurchTypeName());
|
||||
if (isCheck)
|
||||
{
|
||||
ztree.setChecked(rolePurchUserTypeList.contains(purchUserType.getPurchTypeId() + purchUserType.getPurchTypeName()));
|
||||
}
|
||||
ztrees.add(ztree);
|
||||
}
|
||||
}
|
||||
return ztrees;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ID查询所有子部门(正常状态)
|
||||
*
|
||||
* @param purchTypeId 部门ID
|
||||
* @return 子部门数
|
||||
*/
|
||||
@Override
|
||||
public int selectNormalChildrenPurchUserTypeById(Long purchTypeId)
|
||||
{
|
||||
return purchUserTypeMapper.selectNormalChildrenPurchUserTypeById(purchTypeId);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,146 @@
|
|||
package com.ruoyi.province.platform.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import com.ruoyi.common.core.domain.Ztree;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.province.platform.mapper.RegionalMapper;
|
||||
import com.ruoyi.province.platform.domain.Regional;
|
||||
import com.ruoyi.province.platform.service.IRegionalService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.province.platform.Constants.BussiConstants;
|
||||
import com.ruoyi.province.platform.utils.BussUtils;
|
||||
import com.ruoyi.common.utils.ShiroUtils;
|
||||
|
||||
/**
|
||||
* 地区资料Service业务层处理
|
||||
*
|
||||
* @author dalin
|
||||
* @date 2021-01-11
|
||||
*/
|
||||
@Service
|
||||
public class RegionalServiceImpl implements IRegionalService
|
||||
{
|
||||
@Autowired
|
||||
private RegionalMapper regionalMapper;
|
||||
|
||||
/**
|
||||
* 查询地区资料
|
||||
*
|
||||
* @param regionalId 地区资料ID
|
||||
* @return 地区资料
|
||||
*/
|
||||
@Override
|
||||
public Regional selectRegionalById(Long regionalId)
|
||||
{
|
||||
return regionalMapper.selectRegionalById(regionalId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询地区资料
|
||||
*
|
||||
* @param regionalId 地区资料ID
|
||||
* @return 地区资料
|
||||
*/
|
||||
@Override
|
||||
public String checkRegionalUnique(Regional regional)
|
||||
{
|
||||
Long docId = StringUtils.isNull( regional.getRegionalId() ) ? -1L : regional.getRegionalId();
|
||||
Regional info = regionalMapper.checkRegionalUnique( regional.getRegionalName() );
|
||||
if (StringUtils.isNotNull(info) && info.getRegionalId().longValue() != docId.longValue())
|
||||
{
|
||||
return BussiConstants.DOC_NAME_NOT_UNIQUE;
|
||||
}
|
||||
return BussiConstants.DOC_NAME_UNIQUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询地区资料列表
|
||||
*
|
||||
* @param regional 地区资料
|
||||
* @return 地区资料
|
||||
*/
|
||||
@Override
|
||||
public List<Regional> selectRegionalList(Regional regional)
|
||||
{
|
||||
return regionalMapper.selectRegionalList(regional);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增地区资料
|
||||
*
|
||||
* @param regional 地区资料
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertRegional(Regional regional)
|
||||
{
|
||||
regional.setDocNum("00001".concat( BussUtils.nextValue("regional") ) );
|
||||
|
||||
regional.setCreateBy( ShiroUtils.getLoginName() );
|
||||
regional.setCreateTime( DateUtils.getNowDate() );
|
||||
return regionalMapper.insertRegional(regional);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改地区资料
|
||||
*
|
||||
* @param regional 地区资料
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateRegional(Regional regional)
|
||||
{
|
||||
regional.setUpdateTime(DateUtils.getNowDate());
|
||||
return regionalMapper.updateRegional(regional);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除地区资料对象
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRegionalByIds(String ids)
|
||||
{
|
||||
return regionalMapper.deleteRegionalByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除地区资料信息
|
||||
*
|
||||
* @param regionalId 地区资料ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRegionalById(Long regionalId)
|
||||
{
|
||||
return regionalMapper.deleteRegionalById(regionalId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询地区资料树列表
|
||||
*
|
||||
* @return 所有地区资料信息
|
||||
*/
|
||||
@Override
|
||||
public List<Ztree> selectRegionalTree()
|
||||
{
|
||||
List<Regional> regionalList = regionalMapper.selectRegionalList(new Regional());
|
||||
List<Ztree> ztrees = new ArrayList<Ztree>();
|
||||
for (Regional regional : regionalList)
|
||||
{
|
||||
Ztree ztree = new Ztree();
|
||||
ztree.setId(regional.getRegionalId());
|
||||
ztree.setpId(regional.getParentId());
|
||||
ztree.setName(regional.getRegionalName());
|
||||
ztree.setTitle(regional.getRegionalName());
|
||||
ztrees.add(ztree);
|
||||
}
|
||||
return ztrees;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,289 @@
|
|||
package com.ruoyi.province.platform.service.impl;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.ruoyi.common.annotation.DataScope;
|
||||
import com.ruoyi.common.constant.UserConstants;
|
||||
import com.ruoyi.common.core.domain.Ztree;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.province.platform.mapper.SupplyChainHierMapper;
|
||||
import com.ruoyi.province.platform.domain.SupplyChainHier;
|
||||
import com.ruoyi.province.platform.service.ISupplyChainHierService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.province.platform.Constants.BussiConstants;
|
||||
import com.ruoyi.province.platform.utils.BussUtils;
|
||||
import com.ruoyi.common.utils.ShiroUtils;
|
||||
|
||||
/**
|
||||
* 供应链层级Service业务层处理
|
||||
*
|
||||
* @author dalin
|
||||
* @date 2021-01-14
|
||||
*/
|
||||
@Service
|
||||
public class SupplyChainHierServiceImpl implements ISupplyChainHierService
|
||||
{
|
||||
@Autowired
|
||||
private SupplyChainHierMapper supplyChainHierMapper;
|
||||
|
||||
/**
|
||||
* 查询供应链层级
|
||||
*
|
||||
* @param supplyChainId 供应链层级ID
|
||||
* @return 供应链层级
|
||||
*/
|
||||
@Override
|
||||
public SupplyChainHier selectSupplyChainHierById(Long supplyChainId)
|
||||
{
|
||||
return supplyChainHierMapper.selectSupplyChainHierById(supplyChainId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询供应链层级
|
||||
*
|
||||
* @param supplyChainId 供应链层级ID
|
||||
* @return 供应链层级
|
||||
*/
|
||||
@Override
|
||||
public String checkSupplyChainHierUnique(SupplyChainHier supplyChainHier)
|
||||
{
|
||||
Long docId = StringUtils.isNull( supplyChainHier.getSupplyChainId() ) ? -1L : supplyChainHier.getSupplyChainId();
|
||||
SupplyChainHier info = supplyChainHierMapper.checkSupplyChainHierUnique( supplyChainHier.getSupplyChainName() );
|
||||
if (StringUtils.isNotNull(info) && info.getSupplyChainId().longValue() != docId.longValue())
|
||||
{
|
||||
return BussiConstants.DOC_NAME_NOT_UNIQUE;
|
||||
}
|
||||
return BussiConstants.DOC_NAME_UNIQUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询供应链层级列表
|
||||
*
|
||||
* @param supplyChainHier 供应链层级
|
||||
* @return 供应链层级
|
||||
*/
|
||||
@Override
|
||||
public List<SupplyChainHier> selectSupplyChainHierList(SupplyChainHier supplyChainHier)
|
||||
{
|
||||
return supplyChainHierMapper.selectSupplyChainHierList(supplyChainHier);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增供应链层级
|
||||
*
|
||||
* @param supplyChainHier 供应链层级
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSupplyChainHier(SupplyChainHier supplyChainHier)
|
||||
{
|
||||
supplyChainHier.setDocNum("00001".concat( BussUtils.nextValue("supplyChainHier") ) );
|
||||
|
||||
supplyChainHier.setCreateBy( ShiroUtils.getLoginName() );
|
||||
supplyChainHier.setCreateTime( DateUtils.getNowDate() );
|
||||
|
||||
SupplyChainHier info = supplyChainHierMapper.selectSupplyChainHierById(supplyChainHier.getParentId());
|
||||
supplyChainHier.setAncestors(info.getAncestors() + "," + supplyChainHier.getParentId());
|
||||
|
||||
return supplyChainHierMapper.insertSupplyChainHier(supplyChainHier);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改供应链层级
|
||||
*
|
||||
* @param supplyChainHier 供应链层级
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSupplyChainHier(SupplyChainHier supplyChainHier)
|
||||
{
|
||||
SupplyChainHier newParentSupplyChainHier = supplyChainHierMapper.selectSupplyChainHierById(supplyChainHier.getParentId());
|
||||
SupplyChainHier oldSupplyChainHier = selectSupplyChainHierById(supplyChainHier.getSupplyChainId());
|
||||
if (StringUtils.isNotNull(newParentSupplyChainHier) && StringUtils.isNotNull(oldSupplyChainHier))
|
||||
{
|
||||
String newAncestors = newParentSupplyChainHier.getAncestors() + "," + newParentSupplyChainHier.getSupplyChainId();
|
||||
String oldAncestors = oldSupplyChainHier.getAncestors();
|
||||
supplyChainHier.setAncestors(newAncestors);
|
||||
updateSupplyChainHierChildren(supplyChainHier.getSupplyChainId(), newAncestors, oldAncestors);
|
||||
}
|
||||
|
||||
supplyChainHier.setUpdateTime(DateUtils.getNowDate());
|
||||
int result = supplyChainHierMapper.updateSupplyChainHier(supplyChainHier);
|
||||
|
||||
if (UserConstants.DEPT_NORMAL.equals(supplyChainHier.getStatus()))
|
||||
{
|
||||
// 如果该供应链层级是启用状态,则启用该供应链层级的所有上级供应链层级
|
||||
updateParentSupplyChainHierStatus(supplyChainHier);
|
||||
}
|
||||
return result ;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除供应链层级对象
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSupplyChainHierByIds(String ids)
|
||||
{
|
||||
return supplyChainHierMapper.deleteSupplyChainHierByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除供应链层级信息
|
||||
*
|
||||
* @param supplyChainId 供应链层级ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSupplyChainHierById(Long supplyChainId)
|
||||
{
|
||||
return supplyChainHierMapper.deleteSupplyChainHierById(supplyChainId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询供应链层级树列表
|
||||
*
|
||||
* @return 所有供应链层级信息
|
||||
*/
|
||||
@Override
|
||||
public List<Ztree> selectSupplyChainHierTree()
|
||||
{
|
||||
List<SupplyChainHier> supplyChainHierList = supplyChainHierMapper.selectSupplyChainHierList(new SupplyChainHier());
|
||||
List<Ztree> ztrees = new ArrayList<Ztree>();
|
||||
for (SupplyChainHier supplyChainHier : supplyChainHierList)
|
||||
{
|
||||
Ztree ztree = new Ztree();
|
||||
ztree.setId(supplyChainHier.getSupplyChainId());
|
||||
ztree.setpId(supplyChainHier.getParentId());
|
||||
ztree.setName(supplyChainHier.getSupplyChainName());
|
||||
ztree.setTitle(supplyChainHier.getSupplyChainName());
|
||||
ztrees.add(ztree);
|
||||
}
|
||||
return ztrees;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改该供应链层级的父级供应链层级状态
|
||||
*
|
||||
* @param supplyChainHier 当前部门
|
||||
*/
|
||||
private void updateParentSupplyChainHierStatus(SupplyChainHier supplyChainHier)
|
||||
{
|
||||
String updateBy = supplyChainHier.getUpdateBy();
|
||||
supplyChainHier = supplyChainHierMapper.selectSupplyChainHierById(supplyChainHier.getSupplyChainId());
|
||||
supplyChainHier.setUpdateBy(updateBy);
|
||||
supplyChainHierMapper.updateSupplyChainHierStatus(supplyChainHier);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询供应链层级管理树(排除下级)
|
||||
*
|
||||
* @param supplyChainId 部门ID
|
||||
* @return 所有部门信息
|
||||
*/
|
||||
@Override
|
||||
@DataScope(deptAlias = "d")
|
||||
public List<Ztree> selectSupplyChainHierTreeExcludeChild(SupplyChainHier supplyChainHier)
|
||||
{
|
||||
Long supplyChainId = supplyChainHier.getSupplyChainId();
|
||||
List<SupplyChainHier> supplyChainHierList = supplyChainHierMapper.selectSupplyChainHierList(supplyChainHier);
|
||||
Iterator<SupplyChainHier> it = supplyChainHierList.iterator();
|
||||
while (it.hasNext())
|
||||
{
|
||||
SupplyChainHier d = (SupplyChainHier) it.next();
|
||||
if (d.getSupplyChainId().intValue() == supplyChainId
|
||||
|| ArrayUtils.contains(StringUtils.split(d.getAncestors(), ","), supplyChainId + ""))
|
||||
{
|
||||
it.remove();
|
||||
}
|
||||
}
|
||||
List<Ztree> ztrees = initZtree(supplyChainHierList);
|
||||
return ztrees;
|
||||
}
|
||||
|
||||
/**
|
||||
* 对象转供应链层级树
|
||||
*
|
||||
* @param supplyChainHierList 供应链层级列表
|
||||
* @return 树结构列表
|
||||
*/
|
||||
public List<Ztree> initZtree(List<SupplyChainHier> supplyChainHierList)
|
||||
{
|
||||
return initZtree(supplyChainHierList, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改子元素关系
|
||||
*
|
||||
* @param supplyChainId 被修改的供应链层级ID
|
||||
* @param newAncestors 新的父ID集合
|
||||
* @param oldAncestors 旧的父ID集合
|
||||
*/
|
||||
public void updateSupplyChainHierChildren(Long supplyChainId, String newAncestors, String oldAncestors)
|
||||
{
|
||||
List<SupplyChainHier> children = supplyChainHierMapper.selectChildrenSupplyChainHierById(supplyChainId);
|
||||
for (SupplyChainHier child : children)
|
||||
{
|
||||
child.setAncestors(child.getAncestors().replace(oldAncestors, newAncestors));
|
||||
}
|
||||
if (children.size() > 0)
|
||||
{
|
||||
supplyChainHierMapper.updateSupplyChainHierChildren(children);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 对象转供应链层级树
|
||||
*
|
||||
* @param supplyChainHierList 供应链层级列表
|
||||
* @param roleList 角色已存在菜单列表
|
||||
* @return 树结构列表
|
||||
*/
|
||||
public List<Ztree> initZtree(List<SupplyChainHier> supplyChainHierList, List<String> roleSupplyChainHierList)
|
||||
{
|
||||
|
||||
List<Ztree> ztrees = new ArrayList<Ztree>();
|
||||
boolean isCheck = StringUtils.isNotNull(roleSupplyChainHierList);
|
||||
for (SupplyChainHier supplyChainHier : supplyChainHierList)
|
||||
{
|
||||
if (UserConstants.DEPT_NORMAL.equals(supplyChainHier.getStatus()))
|
||||
{
|
||||
Ztree ztree = new Ztree();
|
||||
ztree.setId(supplyChainHier.getSupplyChainId());
|
||||
ztree.setpId(supplyChainHier.getParentId());
|
||||
ztree.setName(supplyChainHier.getSupplyChainName());
|
||||
ztree.setTitle(supplyChainHier.getSupplyChainName());
|
||||
if (isCheck)
|
||||
{
|
||||
ztree.setChecked(roleSupplyChainHierList.contains(supplyChainHier.getSupplyChainId() + supplyChainHier.getSupplyChainName()));
|
||||
}
|
||||
ztrees.add(ztree);
|
||||
}
|
||||
}
|
||||
return ztrees;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ID查询所有子部门(正常状态)
|
||||
*
|
||||
* @param supplyChainId 部门ID
|
||||
* @return 子部门数
|
||||
*/
|
||||
@Override
|
||||
public int selectNormalChildrenSupplyChainHierById(Long supplyChainId)
|
||||
{
|
||||
return supplyChainHierMapper.selectNormalChildrenSupplyChainHierById(supplyChainId);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -39,7 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where t.brand_id = #{brandId}
|
||||
</select>
|
||||
|
||||
<select id="checkBrandInfoNameUnique" parameterType="String" resultMap="BrandInfoResult">
|
||||
<select id="checkBrandInfoUnique" parameterType="String" resultMap="BrandInfoResult">
|
||||
<include refid="selectBrandInfoVo"/>
|
||||
where t.brand_name=#{BrandName} limit 1
|
||||
</select>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,100 @@
|
|||
<?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.ruoyi.province.platform.mapper.BusinessScopeMapper">
|
||||
|
||||
<resultMap type="BusinessScope" id="BusinessScopeResult">
|
||||
<result property="businessScaleId" column="business_scale_id" />
|
||||
<result property="businessScaleName" column="business_scale_name" />
|
||||
<result property="docNum" column="doc_num" />
|
||||
<result property="status" column="status" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="createByuserName" column="createByuserName" />
|
||||
<result property="updateByuserName" column="updateByuserName" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBusinessScopeVo">
|
||||
select t.business_scale_id, t.business_scale_name, t.doc_num, t.status, t.remark, t.del_flag, t.create_by, t.create_time, t.update_by, t.update_time,
|
||||
a1.user_name as createByuserName, a2.user_name as updateByuserName from platf_business_scope t
|
||||
left join sys_user a1 on t.create_by=a1.login_name
|
||||
left join sys_user a2 on t.update_by=a2.login_name
|
||||
</sql>
|
||||
|
||||
<select id="selectBusinessScopeList" parameterType="BusinessScope" resultMap="BusinessScopeResult">
|
||||
<include refid="selectBusinessScopeVo"/>
|
||||
<where>
|
||||
<if test="businessScaleName != null and businessScaleName != ''"> and t.business_scale_name like concat('%', #{businessScaleName}, '%')</if>
|
||||
<if test="status != null and status != ''"> and t.status = #{status}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBusinessScopeById" parameterType="Long" resultMap="BusinessScopeResult">
|
||||
<include refid="selectBusinessScopeVo"/>
|
||||
where t.business_scale_id = #{businessScaleId}
|
||||
</select>
|
||||
|
||||
<select id="checkBusinessScopeUnique" parameterType="String" resultMap="BusinessScopeResult">
|
||||
<include refid="selectBusinessScopeVo"/>
|
||||
where t.business_scale_name=#{BusinessScaleName} limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertBusinessScope" parameterType="BusinessScope" useGeneratedKeys="true" keyProperty="businessScaleId">
|
||||
insert into platf_business_scope
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="businessScaleName != null and businessScaleName != ''">business_scale_name,</if>
|
||||
<if test="docNum != null">doc_num,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag,</if>
|
||||
<if test="createBy != null and createBy != ''">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="businessScaleName != null and businessScaleName != ''">#{businessScaleName},</if>
|
||||
<if test="docNum != null">#{docNum},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBusinessScope" parameterType="BusinessScope">
|
||||
update platf_business_scope
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="businessScaleName != null and businessScaleName != ''">business_scale_name = #{businessScaleName},</if>
|
||||
<if test="docNum != null">doc_num = #{docNum},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
|
||||
<if test="createBy != null and createBy != ''">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 business_scale_id = #{businessScaleId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBusinessScopeById" parameterType="Long">
|
||||
delete from platf_business_scope where business_scale_id = #{businessScaleId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBusinessScopeByIds" parameterType="String">
|
||||
delete from platf_business_scope where business_scale_id in
|
||||
<foreach item="businessScaleId" collection="array" open="(" separator="," close=")">
|
||||
#{businessScaleId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -39,12 +39,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where t.econ_id = #{econId}
|
||||
</select>
|
||||
|
||||
<select id="checkEconNameUnique" parameterType="String" resultMap="EconTypeResult">
|
||||
<select id="checkEconTypeUnique" parameterType="String" resultMap="EconTypeResult">
|
||||
<include refid="selectEconTypeVo"/>
|
||||
where t.econ_name=#{econName} limit 1
|
||||
where t.econ_name=#{EconName} limit 1
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertEconType" parameterType="EconType" useGeneratedKeys="true" keyProperty="econId">
|
||||
insert into platf_econ_type
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
|
|
|||
|
|
@ -0,0 +1,135 @@
|
|||
<?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.ruoyi.province.platform.mapper.ItemParamtersMapper">
|
||||
|
||||
<resultMap type="ItemParamters" id="ItemParamtersResult">
|
||||
<result property="itemParamtersId" column="item_paramters_id" />
|
||||
<result property="itemParamtersName" column="item_paramters_name" />
|
||||
<result property="docNum" column="doc_num" />
|
||||
<result property="status" column="status" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="createByuserName" column="createByuserName" />
|
||||
<result property="updateByuserName" column="updateByuserName" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="ItemParamtersItemParamtersUnitResult" type="ItemParamters" extends="ItemParamtersResult">
|
||||
<collection property="itemParamtersUnitList" notNullColumn="item_paramters_unit_id" javaType="java.util.List" resultMap="ItemParamtersUnitResult" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="ItemParamtersUnit" id="ItemParamtersUnitResult">
|
||||
<result property="itemParamtersUnitId" column="item_paramters_unit_id" />
|
||||
<result property="itemParamtersId" column="item_paramters_id" />
|
||||
<result property="unit" column="unit" />
|
||||
<result property="unitStatus" column="unit_status" />
|
||||
<result property="fmemo" column="fmemo" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectItemParamtersVo">
|
||||
select t.item_paramters_id, t.item_paramters_name, t.doc_num, t.status, t.remark, t.del_flag, t.create_by, t.create_time, t.update_by, t.update_time,
|
||||
a1.user_name as createByuserName, a2.user_name as updateByuserName from platf_item_paramters t
|
||||
left join sys_user a1 on t.create_by=a1.login_name
|
||||
left join sys_user a2 on t.update_by=a2.login_name
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="selectItemParamtersList" parameterType="ItemParamters" resultMap="ItemParamtersResult">
|
||||
<include refid="selectItemParamtersVo"/>
|
||||
<where>
|
||||
<if test="itemParamtersName != null and itemParamtersName != ''"> and t.item_paramters_name like concat('%', #{itemParamtersName}, '%')</if>
|
||||
<if test="status != null and status != ''"> and t.status = #{status}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectItemParamtersById" parameterType="Long" resultMap="ItemParamtersItemParamtersUnitResult">
|
||||
select a.item_paramters_id, a.item_paramters_name, a.doc_num, a.status, a.remark, a.del_flag, a.create_by, a.create_time, a.update_by, a.update_time,
|
||||
b.item_paramters_unit_id, b.item_paramters_id, b.unit, b.unit_status, b.fmemo
|
||||
from platf_item_paramters a
|
||||
left join platf_item_paramters_unit b on b.item_paramters_id = a.item_paramters_id
|
||||
where a.item_paramters_id = #{itemParamtersId}
|
||||
</select>
|
||||
|
||||
<select id="checkItemParamtersUnique" parameterType="String" resultMap="ItemParamtersResult">
|
||||
<include refid="selectItemParamtersVo"/>
|
||||
where t.item_paramters_name=#{ItemParamtersName} limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertItemParamters" parameterType="ItemParamters" useGeneratedKeys="true" keyProperty="itemParamtersId">
|
||||
insert into platf_item_paramters
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="itemParamtersName != null and itemParamtersName != ''">item_paramters_name,</if>
|
||||
<if test="docNum != null">doc_num,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag,</if>
|
||||
<if test="createBy != null and createBy != ''">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="itemParamtersName != null and itemParamtersName != ''">#{itemParamtersName},</if>
|
||||
<if test="docNum != null">#{docNum},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateItemParamters" parameterType="ItemParamters">
|
||||
update platf_item_paramters
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="itemParamtersName != null and itemParamtersName != ''">item_paramters_name = #{itemParamtersName},</if>
|
||||
<if test="docNum != null">doc_num = #{docNum},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
|
||||
<if test="createBy != null and createBy != ''">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 item_paramters_id = #{itemParamtersId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteItemParamtersById" parameterType="Long">
|
||||
delete from platf_item_paramters where item_paramters_id = #{itemParamtersId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteItemParamtersByIds" parameterType="String">
|
||||
delete from platf_item_paramters where item_paramters_id in
|
||||
<foreach item="itemParamtersId" collection="array" open="(" separator="," close=")">
|
||||
#{itemParamtersId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteItemParamtersUnitByItemParamtersIds" parameterType="String">
|
||||
delete from platf_item_paramters_unit where item_paramters_id in
|
||||
<foreach item="itemParamtersId" collection="array" open="(" separator="," close=")">
|
||||
#{itemParamtersId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteItemParamtersUnitByItemParamtersId" parameterType="Long">
|
||||
delete from platf_item_paramters_unit where item_paramters_id = #{itemParamtersId}
|
||||
</delete>
|
||||
|
||||
<insert id="batchItemParamtersUnit">
|
||||
insert into platf_item_paramters_unit( item_paramters_unit_id, item_paramters_id, unit, unit_status, fmemo) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.itemParamtersUnitId}, #{item.itemParamtersId}, #{item.unit}, #{item.unitStatus}, #{item.fmemo})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,108 @@
|
|||
<?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.ruoyi.province.platform.mapper.ItemPriceBandMapper">
|
||||
|
||||
<resultMap type="ItemPriceBand" id="ItemPriceBandResult">
|
||||
<result property="priceBandId" column="price_band_id" />
|
||||
<result property="priceBandName" column="price_band_name" />
|
||||
<result property="docNum" column="doc_num" />
|
||||
<result property="priceBandUpper" column="price_band_upper" />
|
||||
<result property="priceBandLower" column="price_band_lower" />
|
||||
<result property="status" column="status" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="createByuserName" column="createByuserName" />
|
||||
<result property="updateByuserName" column="updateByuserName" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectItemPriceBandVo">
|
||||
select t.price_band_id, t.price_band_name, t.doc_num, t.price_band_upper, t.price_band_lower, t.status, t.remark, t.del_flag, t.create_by, t.create_time, t.update_by, t.update_time,
|
||||
a1.user_name as createByuserName, a2.user_name as updateByuserName from platf_item_price_band t
|
||||
left join sys_user a1 on t.create_by=a1.login_name
|
||||
left join sys_user a2 on t.update_by=a2.login_name
|
||||
</sql>
|
||||
|
||||
<select id="selectItemPriceBandList" parameterType="ItemPriceBand" resultMap="ItemPriceBandResult">
|
||||
<include refid="selectItemPriceBandVo"/>
|
||||
<where>
|
||||
<if test="priceBandName != null and priceBandName != ''"> and t.price_band_name like concat('%', #{priceBandName}, '%')</if>
|
||||
<if test="status != null and status != ''"> and t.status = #{status}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectItemPriceBandById" parameterType="Long" resultMap="ItemPriceBandResult">
|
||||
<include refid="selectItemPriceBandVo"/>
|
||||
where t.price_band_id = #{priceBandId}
|
||||
</select>
|
||||
|
||||
<select id="checkItemPriceBandUnique" parameterType="String" resultMap="ItemPriceBandResult">
|
||||
<include refid="selectItemPriceBandVo"/>
|
||||
where t.price_band_name=#{PriceBandName} limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertItemPriceBand" parameterType="ItemPriceBand" useGeneratedKeys="true" keyProperty="priceBandId">
|
||||
insert into platf_item_price_band
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="priceBandName != null and priceBandName != ''">price_band_name,</if>
|
||||
<if test="docNum != null">doc_num,</if>
|
||||
<if test="priceBandUpper != null">price_band_upper,</if>
|
||||
<if test="priceBandLower != null">price_band_lower,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag,</if>
|
||||
<if test="createBy != null and createBy != ''">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="priceBandName != null and priceBandName != ''">#{priceBandName},</if>
|
||||
<if test="docNum != null">#{docNum},</if>
|
||||
<if test="priceBandUpper != null">#{priceBandUpper},</if>
|
||||
<if test="priceBandLower != null">#{priceBandLower},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateItemPriceBand" parameterType="ItemPriceBand">
|
||||
update platf_item_price_band
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="priceBandName != null and priceBandName != ''">price_band_name = #{priceBandName},</if>
|
||||
<if test="docNum != null">doc_num = #{docNum},</if>
|
||||
<if test="priceBandUpper != null">price_band_upper = #{priceBandUpper},</if>
|
||||
<if test="priceBandLower != null">price_band_lower = #{priceBandLower},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
|
||||
<if test="createBy != null and createBy != ''">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 price_band_id = #{priceBandId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteItemPriceBandById" parameterType="Long">
|
||||
delete from platf_item_price_band where price_band_id = #{priceBandId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteItemPriceBandByIds" parameterType="String">
|
||||
delete from platf_item_price_band where price_band_id in
|
||||
<foreach item="priceBandId" collection="array" open="(" separator="," close=")">
|
||||
#{priceBandId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,153 @@
|
|||
<?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.ruoyi.province.platform.mapper.PurchUserTypeMapper">
|
||||
|
||||
<resultMap type="PurchUserType" id="PurchUserTypeResult">
|
||||
<result property="purchTypeId" column="purch_type_id" />
|
||||
<result property="purchTypeName" column="purch_type_name" />
|
||||
<result property="parentId" column="parent_id" />
|
||||
<result property="ancestors" column="ancestors" />
|
||||
<result property="docNum" column="doc_num" />
|
||||
<result property="status" column="status" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="createByuserName" column="createByuserName" />
|
||||
<result property="updateByuserName" column="updateByuserName" />
|
||||
<result property="parentName" column="parent_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectPurchUserTypeVo">
|
||||
select t.purch_type_id, t.purch_type_name, t.parent_id, t.ancestors, t.doc_num, t.status, t.remark, t.del_flag, t.create_by, t.create_time, t.update_by, t.update_time,
|
||||
a1.user_name as createByuserName, a2.user_name as updateByuserName from platf_purch_user_type t
|
||||
left join sys_user a1 on t.create_by=a1.login_name
|
||||
left join sys_user a2 on t.update_by=a2.login_name
|
||||
</sql>
|
||||
|
||||
<sql id="selectPurchUserTypeTreeVo">
|
||||
select t.purch_type_id, t.purch_type_name, t.parent_id, t.ancestors, t.doc_num, t.status, t.remark, t.del_flag, t.create_by, t.create_time, t.update_by, t.update_time,p.purch_type_name as parent_name
|
||||
,
|
||||
a1.user_name as createByuserName, a2.user_name as updateByuserName from platf_purch_user_type t
|
||||
left join platf_purch_user_type p on p.purch_type_id = t.parent_id
|
||||
left join sys_user a1 on t.create_by=a1.login_name
|
||||
left join sys_user a2 on t.update_by=a2.login_name
|
||||
</sql>
|
||||
|
||||
<select id="selectPurchUserTypeList" parameterType="PurchUserType" resultMap="PurchUserTypeResult">
|
||||
<include refid="selectPurchUserTypeVo"/>
|
||||
<where>
|
||||
<if test="purchTypeName != null and purchTypeName != ''"> and t.purch_type_name like concat('%', #{purchTypeName}, '%')</if>
|
||||
<if test="parentId != null "> and t.parent_id = #{parentId}</if>
|
||||
<if test="status != null and status != ''"> and t.status = #{status}</if>
|
||||
</where>
|
||||
order by parent_id
|
||||
</select>
|
||||
|
||||
<select id="selectPurchUserTypeById" parameterType="Long" resultMap="PurchUserTypeResult">
|
||||
<include refid="selectPurchUserTypeTreeVo"/>
|
||||
where t.purch_type_id = #{purchTypeId}
|
||||
</select>
|
||||
|
||||
<select id="checkPurchUserTypeUnique" parameterType="String" resultMap="PurchUserTypeResult">
|
||||
<include refid="selectPurchUserTypeVo"/>
|
||||
where t.purch_type_name=#{PurchTypeName} limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertPurchUserType" parameterType="PurchUserType" useGeneratedKeys="true" keyProperty="purchTypeId">
|
||||
insert into platf_purch_user_type
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="purchTypeName != null and purchTypeName != ''">purch_type_name,</if>
|
||||
<if test="parentId != null">parent_id,</if>
|
||||
<if test="ancestors != null">ancestors,</if>
|
||||
<if test="docNum != null">doc_num,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag,</if>
|
||||
<if test="createBy != null and createBy != ''">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="purchTypeName != null and purchTypeName != ''">#{purchTypeName},</if>
|
||||
<if test="parentId != null">#{parentId},</if>
|
||||
<if test="ancestors != null">#{ancestors},</if>
|
||||
<if test="docNum != null">#{docNum},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updatePurchUserType" parameterType="PurchUserType">
|
||||
update platf_purch_user_type
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="purchTypeName != null and purchTypeName != ''">purch_type_name = #{purchTypeName},</if>
|
||||
<if test="parentId != null">parent_id = #{parentId},</if>
|
||||
<if test="ancestors != null">ancestors = #{ancestors},</if>
|
||||
<if test="docNum != null">doc_num = #{docNum},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
|
||||
<if test="createBy != null and createBy != ''">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 purch_type_id = #{purchTypeId}
|
||||
</update>
|
||||
|
||||
<delete id="deletePurchUserTypeById" parameterType="Long">
|
||||
delete from platf_purch_user_type where purch_type_id = #{purchTypeId}
|
||||
</delete>
|
||||
|
||||
<delete id="deletePurchUserTypeByIds" parameterType="String">
|
||||
delete from platf_purch_user_type where purch_type_id in
|
||||
<foreach item="purchTypeId" collection="array" open="(" separator="," close=")">
|
||||
#{purchTypeId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
<select id="selectChildrenPurchUserTypeById" parameterType="Long" resultMap="PurchUserTypeResult">
|
||||
select * from platf_purch_user_type where find_in_set(#{purchTypeId}, ancestors)
|
||||
</select>
|
||||
|
||||
<select id="selectNormalChildrenPurchUserTypeById" parameterType="Long" resultType="int">
|
||||
select count( purch_type_id ) from platf_purch_user_type where status = 0 and del_flag = '0' and find_in_set(#{purchTypeId}, ancestors)
|
||||
</select>
|
||||
|
||||
<update id="updatePurchUserTypeChildren" parameterType="java.util.List">
|
||||
update platf_purch_user_type set ancestors =
|
||||
<foreach collection="purchUserTypes" item="item" index="index"
|
||||
separator=" " open="case purch_type_id" close="end">
|
||||
when #{item.purchTypeId} then #{item.ancestors}
|
||||
</foreach>
|
||||
where purch_type_id in
|
||||
<foreach collection="purchUserTypes" item="item" index="index"
|
||||
separator="," open="(" close=")">
|
||||
#{item.purchTypeId}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<update id="updatePurchUserTypeStatus" parameterType="PurchUserType">
|
||||
update platf_purch_user_type
|
||||
<set>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where purch_type_id in (${ancestors})
|
||||
</update>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,114 @@
|
|||
<?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.ruoyi.province.platform.mapper.RegionalMapper">
|
||||
|
||||
<resultMap type="Regional" id="RegionalResult">
|
||||
<result property="regionalId" column="regional_id" />
|
||||
<result property="regionalName" column="regional_name" />
|
||||
<result property="parentId" column="parent_id" />
|
||||
<result property="ancestors" column="ancestors" />
|
||||
<result property="docNum" column="doc_num" />
|
||||
<result property="status" column="status" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="createByuserName" column="createByuserName" />
|
||||
<result property="updateByuserName" column="updateByuserName" />
|
||||
<result property="parentName" column="parent_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectRegionalVo">
|
||||
select t.regional_id, t.regional_name, t.parent_id, t.ancestors, t.doc_num, t.status, t.remark, t.del_flag, t.create_by, t.create_time, t.update_by, t.update_time,
|
||||
a1.user_name as createByuserName, a2.user_name as updateByuserName from platf_regional t
|
||||
left join sys_user a1 on t.create_by=a1.login_name
|
||||
left join sys_user a2 on t.update_by=a2.login_name
|
||||
</sql>
|
||||
|
||||
<select id="selectRegionalList" parameterType="Regional" resultMap="RegionalResult">
|
||||
<include refid="selectRegionalVo"/>
|
||||
<where>
|
||||
<if test="regionalName != null and regionalName != ''"> and t.regional_name like concat('%', #{regionalName}, '%')</if>
|
||||
<if test="parentId != null "> and t.parent_id = #{parentId}</if>
|
||||
<if test="ancestors != null and ancestors != ''"> and t.ancestors = #{ancestors}</if>
|
||||
<if test="status != null and status != ''"> and t.status = #{status}</if>
|
||||
</where>
|
||||
order by parent_id
|
||||
</select>
|
||||
|
||||
<select id="selectRegionalById" parameterType="Long" resultMap="RegionalResult">
|
||||
select t.regional_id, t.regional_name, t.parent_id, t.ancestors, t.doc_num, t.status, t.remark, t.del_flag, t.create_by, t.create_time, t.update_by, t.update_time, p.regional_name as parent_name
|
||||
from platf_regional t
|
||||
left join platf_regional p on p.regional_id = t.parent_id
|
||||
where t.regional_id = #{regionalId}
|
||||
</select>
|
||||
|
||||
<select id="checkRegionalUnique" parameterType="String" resultMap="RegionalResult">
|
||||
<include refid="selectRegionalVo"/>
|
||||
where t.regional_name=#{RegionalName} limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertRegional" parameterType="Regional" useGeneratedKeys="true" keyProperty="regionalId">
|
||||
insert into platf_regional
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="regionalName != null and regionalName != ''">regional_name,</if>
|
||||
<if test="parentId != null">parent_id,</if>
|
||||
<if test="ancestors != null">ancestors,</if>
|
||||
<if test="docNum != null">doc_num,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag,</if>
|
||||
<if test="createBy != null and createBy != ''">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="regionalName != null and regionalName != ''">#{regionalName},</if>
|
||||
<if test="parentId != null">#{parentId},</if>
|
||||
<if test="ancestors != null">#{ancestors},</if>
|
||||
<if test="docNum != null">#{docNum},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateRegional" parameterType="Regional">
|
||||
update platf_regional
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="regionalName != null and regionalName != ''">regional_name = #{regionalName},</if>
|
||||
<if test="parentId != null">parent_id = #{parentId},</if>
|
||||
<if test="ancestors != null">ancestors = #{ancestors},</if>
|
||||
<if test="docNum != null">doc_num = #{docNum},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
|
||||
<if test="createBy != null and createBy != ''">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 regional_id = #{regionalId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteRegionalById" parameterType="Long">
|
||||
delete from platf_regional where regional_id = #{regionalId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteRegionalByIds" parameterType="String">
|
||||
delete from platf_regional where regional_id in
|
||||
<foreach item="regionalId" collection="array" open="(" separator="," close=")">
|
||||
#{regionalId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,153 @@
|
|||
<?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.ruoyi.province.platform.mapper.SupplyChainHierMapper">
|
||||
|
||||
<resultMap type="SupplyChainHier" id="SupplyChainHierResult">
|
||||
<result property="supplyChainId" column="supply_chain_id" />
|
||||
<result property="supplyChainName" column="supply_chain_name" />
|
||||
<result property="parentId" column="parent_id" />
|
||||
<result property="ancestors" column="ancestors" />
|
||||
<result property="docNum" column="doc_num" />
|
||||
<result property="status" column="status" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="createByuserName" column="createByuserName" />
|
||||
<result property="updateByuserName" column="updateByuserName" />
|
||||
<result property="parentName" column="parent_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSupplyChainHierVo">
|
||||
select t.supply_chain_id, t.supply_chain_name, t.parent_id, t.ancestors, t.doc_num, t.status, t.remark, t.del_flag, t.create_by, t.create_time, t.update_by, t.update_time,
|
||||
a1.user_name as createByuserName, a2.user_name as updateByuserName from platf_supply_chain_hier t
|
||||
left join sys_user a1 on t.create_by=a1.login_name
|
||||
left join sys_user a2 on t.update_by=a2.login_name
|
||||
</sql>
|
||||
|
||||
<sql id="selectSupplyChainHierTreeVo">
|
||||
select t.supply_chain_id, t.supply_chain_name, t.parent_id, t.ancestors, t.doc_num, t.status, t.remark, t.del_flag, t.create_by, t.create_time, t.update_by, t.update_time,p.supply_chain_name as parent_name
|
||||
,
|
||||
a1.user_name as createByuserName, a2.user_name as updateByuserName from platf_supply_chain_hier t
|
||||
left join platf_supply_chain_hier p on p.supply_chain_id = t.parent_id
|
||||
left join sys_user a1 on t.create_by=a1.login_name
|
||||
left join sys_user a2 on t.update_by=a2.login_name
|
||||
</sql>
|
||||
|
||||
<select id="selectSupplyChainHierList" parameterType="SupplyChainHier" resultMap="SupplyChainHierResult">
|
||||
<include refid="selectSupplyChainHierVo"/>
|
||||
<where>
|
||||
<if test="supplyChainName != null and supplyChainName != ''"> and t.supply_chain_name like concat('%', #{supplyChainName}, '%')</if>
|
||||
<if test="parentId != null "> and t.parent_id = #{parentId}</if>
|
||||
<if test="status != null and status != ''"> and t.status = #{status}</if>
|
||||
</where>
|
||||
order by parent_id
|
||||
</select>
|
||||
|
||||
<select id="selectSupplyChainHierById" parameterType="Long" resultMap="SupplyChainHierResult">
|
||||
<include refid="selectSupplyChainHierTreeVo"/>
|
||||
where t.supply_chain_id = #{supplyChainId}
|
||||
</select>
|
||||
|
||||
<select id="checkSupplyChainHierUnique" parameterType="String" resultMap="SupplyChainHierResult">
|
||||
<include refid="selectSupplyChainHierVo"/>
|
||||
where t.supply_chain_name=#{SupplyChainName} limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertSupplyChainHier" parameterType="SupplyChainHier" useGeneratedKeys="true" keyProperty="supplyChainId">
|
||||
insert into platf_supply_chain_hier
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="supplyChainName != null and supplyChainName != ''">supply_chain_name,</if>
|
||||
<if test="parentId != null">parent_id,</if>
|
||||
<if test="ancestors != null">ancestors,</if>
|
||||
<if test="docNum != null">doc_num,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag,</if>
|
||||
<if test="createBy != null and createBy != ''">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="supplyChainName != null and supplyChainName != ''">#{supplyChainName},</if>
|
||||
<if test="parentId != null">#{parentId},</if>
|
||||
<if test="ancestors != null">#{ancestors},</if>
|
||||
<if test="docNum != null">#{docNum},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSupplyChainHier" parameterType="SupplyChainHier">
|
||||
update platf_supply_chain_hier
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="supplyChainName != null and supplyChainName != ''">supply_chain_name = #{supplyChainName},</if>
|
||||
<if test="parentId != null">parent_id = #{parentId},</if>
|
||||
<if test="ancestors != null">ancestors = #{ancestors},</if>
|
||||
<if test="docNum != null">doc_num = #{docNum},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
|
||||
<if test="createBy != null and createBy != ''">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 supply_chain_id = #{supplyChainId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSupplyChainHierById" parameterType="Long">
|
||||
delete from platf_supply_chain_hier where supply_chain_id = #{supplyChainId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSupplyChainHierByIds" parameterType="String">
|
||||
delete from platf_supply_chain_hier where supply_chain_id in
|
||||
<foreach item="supplyChainId" collection="array" open="(" separator="," close=")">
|
||||
#{supplyChainId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
<select id="selectChildrenSupplyChainHierById" parameterType="Long" resultMap="SupplyChainHierResult">
|
||||
select * from platf_supply_chain_hier where find_in_set(#{supplyChainId}, ancestors)
|
||||
</select>
|
||||
|
||||
<select id="selectNormalChildrenSupplyChainHierById" parameterType="Long" resultType="int">
|
||||
select count( supply_chain_id ) from platf_supply_chain_hier where status = 0 and del_flag = '0' and find_in_set(#{supplyChainId}, ancestors)
|
||||
</select>
|
||||
|
||||
<update id="updateSupplyChainHierChildren" parameterType="java.util.List">
|
||||
update platf_supply_chain_hier set ancestors =
|
||||
<foreach collection="supplyChainHiers" item="item" index="index"
|
||||
separator=" " open="case supply_chain_id" close="end">
|
||||
when #{item.supplyChainId} then #{item.ancestors}
|
||||
</foreach>
|
||||
where supply_chain_id in
|
||||
<foreach collection="supplyChainHiers" item="item" index="index"
|
||||
separator="," open="(" close=")">
|
||||
#{item.supplyChainId}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<update id="updateSupplyChainHierStatus" parameterType="SupplyChainHier">
|
||||
update platf_supply_chain_hier
|
||||
<set>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where supply_chain_id in (${ancestors})
|
||||
</update>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -71,9 +71,9 @@ public class BrandInfoController extends BaseController
|
|||
/**
|
||||
* 校验品牌资料名称 是否重复
|
||||
*/
|
||||
@PostMapping("/checkbrandInfoUnique")
|
||||
@PostMapping("/checkBrandInfoUnique")
|
||||
@ResponseBody
|
||||
public String checkbrandInfoUnique(BrandInfo brandInfo)
|
||||
public String checkBrandInfoUnique(BrandInfo brandInfo)
|
||||
{
|
||||
return brandInfoService.checkBrandInfoUnique(brandInfo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,162 @@
|
|||
package com.ruoyi.web.controller.platform;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.ShiroUtils;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.province.platform.Constants.BussiConstants;
|
||||
import com.ruoyi.province.platform.domain.BusinessScope;
|
||||
import com.ruoyi.province.platform.service.IBusinessScopeService;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 业务规模Controller
|
||||
*
|
||||
* @author dalin
|
||||
* @date 2020-12-24
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/platform/businessscope")
|
||||
public class BusinessScopeController extends BaseController
|
||||
{
|
||||
private String prefix = "platform/businessscope";
|
||||
|
||||
@Autowired
|
||||
private IBusinessScopeService businessScopeService;
|
||||
|
||||
@RequiresPermissions("platform:businessscope:view")
|
||||
@GetMapping()
|
||||
public String businessscope()
|
||||
{
|
||||
return prefix + "/businessscope";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询业务规模列表
|
||||
*/
|
||||
@RequiresPermissions("platform:businessscope:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(BusinessScope businessScope)
|
||||
{
|
||||
startPage();
|
||||
List<BusinessScope> list = businessScopeService.selectBusinessScopeList(businessScope);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出业务规模列表
|
||||
*/
|
||||
@RequiresPermissions("platform:businessscope:export")
|
||||
@Log(title = "业务规模", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(BusinessScope businessScope)
|
||||
{
|
||||
List<BusinessScope> list = businessScopeService.selectBusinessScopeList(businessScope);
|
||||
ExcelUtil<BusinessScope> util = new ExcelUtil<BusinessScope>(BusinessScope.class);
|
||||
return util.exportExcel(list, "businessscope");
|
||||
}
|
||||
|
||||
/**
|
||||
* businessScope
|
||||
* 校验业务规模名称 是否重复
|
||||
*/
|
||||
@PostMapping("/checkBusinessScopeUnique")
|
||||
@ResponseBody
|
||||
public String checkBusinessScopeUnique(BusinessScope businessScope)
|
||||
{
|
||||
return businessScopeService.checkBusinessScopeUnique(businessScope);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增业务规模
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add(ModelMap mmap)
|
||||
{
|
||||
// 取身份信息
|
||||
mmap.put("user", ShiroUtils.getSysUser() );
|
||||
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存业务规模
|
||||
*/
|
||||
@RequiresPermissions("platform:businessscope:add")
|
||||
@Log(title = "业务规模", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(BusinessScope businessScope)
|
||||
{
|
||||
// 控制名称重复!
|
||||
if (BussiConstants.DOC_NAME_NOT_UNIQUE.equals(businessScopeService.checkBusinessScopeUnique(businessScope)))
|
||||
{
|
||||
return error("修改单据'" + businessScope.getBusinessScaleName() + "'失败,名称已存在");
|
||||
}
|
||||
|
||||
// 取身份信息
|
||||
businessScope.setCreateBy( ShiroUtils.getLoginName() );
|
||||
businessScope.setCreateTime(DateUtils.getNowDate() );
|
||||
|
||||
return toAjax(businessScopeService.insertBusinessScope(businessScope));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改业务规模
|
||||
*/
|
||||
@GetMapping("/edit/{businessScaleId}")
|
||||
public String edit(@PathVariable("businessScaleId") Long businessScaleId, ModelMap mmap)
|
||||
{
|
||||
BusinessScope businessScope = businessScopeService.selectBusinessScopeById(businessScaleId);
|
||||
mmap.put("businessScope", businessScope);
|
||||
|
||||
// 取身份信息
|
||||
mmap.put("user", ShiroUtils.getSysUser() );
|
||||
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存业务规模
|
||||
*/
|
||||
@RequiresPermissions("platform:businessscope:edit")
|
||||
@Log(title = "业务规模", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(BusinessScope businessScope)
|
||||
{
|
||||
// 控制名称重复!
|
||||
if (BussiConstants.DOC_NAME_NOT_UNIQUE.equals(businessScopeService.checkBusinessScopeUnique(businessScope)))
|
||||
{
|
||||
return error("修改单据'" + businessScope.getBusinessScaleName() + "'失败,名称已存在");
|
||||
}
|
||||
|
||||
businessScope.setUpdateBy( ShiroUtils.getLoginName() );
|
||||
businessScope.setUpdateTime( DateUtils.getNowDate() );
|
||||
return toAjax(businessScopeService.updateBusinessScope(businessScope));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除业务规模
|
||||
*/
|
||||
@RequiresPermissions("platform:businessscope:remove")
|
||||
@Log(title = "业务规模", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(businessScopeService.deleteBusinessScopeByIds(ids));
|
||||
}
|
||||
}
|
||||
|
|
@ -23,7 +23,7 @@ import java.util.List;
|
|||
* 经济类型Controller
|
||||
*
|
||||
* @author dalin
|
||||
* @date 2020-12-19
|
||||
* @date 2020-12-24
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/platform/econtype")
|
||||
|
|
@ -68,15 +68,24 @@ public class EconTypeController extends BaseController
|
|||
return util.exportExcel(list, "econtype");
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验经济类型名称 是否重复
|
||||
*/
|
||||
@PostMapping("/checkEconTypeUnique")
|
||||
@ResponseBody
|
||||
public String checkEconTypeUnique(EconType econType)
|
||||
{
|
||||
return econTypeService.checkEconTypeUnique(econType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增经济类型
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add(ModelMap mmap)
|
||||
{
|
||||
// <li>$member.key - $member.value.id$member.value.name</li>
|
||||
// 取身份信息
|
||||
mmap.put("user", ShiroUtils.getSysUser());
|
||||
mmap.put("user", ShiroUtils.getSysUser() );
|
||||
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
|
@ -91,27 +100,16 @@ public class EconTypeController extends BaseController
|
|||
public AjaxResult addSave(EconType econType)
|
||||
{
|
||||
// 控制名称重复!
|
||||
if (BussiConstants.DOC_NAME_NOT_UNIQUE.equals(econTypeService.checkEconNameUnique(econType)))
|
||||
if (BussiConstants.DOC_NAME_NOT_UNIQUE.equals(econTypeService.checkEconTypeUnique(econType)))
|
||||
{
|
||||
return error("新增单据'" + econType.getEconName() + "'失败,名称已存在");
|
||||
return error("修改单据'" + econType.getEconName() + "'失败,名称已存在");
|
||||
}
|
||||
|
||||
// 取身份信息
|
||||
// 取身份信息
|
||||
econType.setCreateBy( ShiroUtils.getLoginName() );
|
||||
econType.setCreateTime(DateUtils.getNowDate() );
|
||||
|
||||
return toAjax(econTypeService.insertEconType(econType)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验名称 是否重复
|
||||
*/
|
||||
@PostMapping("/checkEconNameUnique")
|
||||
@ResponseBody
|
||||
public String checkEconNameUnique(EconType econType)
|
||||
{
|
||||
return econTypeService.checkEconNameUnique(econType);
|
||||
return toAjax(econTypeService.insertEconType(econType));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -124,7 +122,7 @@ public class EconTypeController extends BaseController
|
|||
mmap.put("econType", econType);
|
||||
|
||||
// 取身份信息
|
||||
mmap.put("user", ShiroUtils.getSysUser());
|
||||
mmap.put("user", ShiroUtils.getSysUser() );
|
||||
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
|
@ -139,14 +137,13 @@ public class EconTypeController extends BaseController
|
|||
public AjaxResult editSave(EconType econType)
|
||||
{
|
||||
// 控制名称重复!
|
||||
if (BussiConstants.DOC_NAME_NOT_UNIQUE.equals(econTypeService.checkEconNameUnique(econType)))
|
||||
if (BussiConstants.DOC_NAME_NOT_UNIQUE.equals(econTypeService.checkEconTypeUnique(econType)))
|
||||
{
|
||||
return error("修改单据'" + econType.getEconName() + "'失败,名称已存在");
|
||||
}
|
||||
|
||||
econType.setCreateBy( ShiroUtils.getLoginName() );
|
||||
econType.setCreateTime(DateUtils.getNowDate() );
|
||||
|
||||
econType.setUpdateBy( ShiroUtils.getLoginName() );
|
||||
econType.setUpdateTime( DateUtils.getNowDate() );
|
||||
return toAjax(econTypeService.updateEconType(econType));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,168 @@
|
|||
package com.ruoyi.web.controller.platform;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.province.platform.domain.ItemParamters;
|
||||
import com.ruoyi.province.platform.service.IItemParamtersService;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.ShiroUtils;
|
||||
import com.ruoyi.province.platform.Constants.BussiConstants;
|
||||
|
||||
/**
|
||||
* 商品参数Controller
|
||||
*
|
||||
* @author dalin
|
||||
* @date 2021-01-14
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/platform/itemparamters")
|
||||
public class ItemParamtersController extends BaseController
|
||||
{
|
||||
private String prefix = "platform/itemparamters";
|
||||
|
||||
@Autowired
|
||||
private IItemParamtersService itemParamtersService;
|
||||
|
||||
@RequiresPermissions("platform:itemparamters:view")
|
||||
@GetMapping()
|
||||
public String itemparamters()
|
||||
{
|
||||
return prefix + "/itemparamters";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询商品参数列表
|
||||
*/
|
||||
@RequiresPermissions("platform:itemparamters:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(ItemParamters itemParamters)
|
||||
{
|
||||
startPage();
|
||||
List<ItemParamters> list = itemParamtersService.selectItemParamtersList(itemParamters);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出商品参数列表
|
||||
*/
|
||||
@RequiresPermissions("platform:itemparamters:export")
|
||||
@Log(title = "商品参数", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(ItemParamters itemParamters)
|
||||
{
|
||||
List<ItemParamters> list = itemParamtersService.selectItemParamtersList(itemParamters);
|
||||
ExcelUtil<ItemParamters> util = new ExcelUtil<ItemParamters>(ItemParamters.class);
|
||||
return util.exportExcel(list, "itemparamters");
|
||||
}
|
||||
|
||||
/**
|
||||
* itemParamters
|
||||
* 校验商品参数名称 是否重复
|
||||
*/
|
||||
@PostMapping("/checkItemParamtersUnique")
|
||||
@ResponseBody
|
||||
public String checkItemParamtersUnique(ItemParamters itemParamters)
|
||||
{
|
||||
return itemParamtersService.checkItemParamtersUnique(itemParamters);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增商品参数
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add(ModelMap mmap)
|
||||
{
|
||||
// 取身份信息
|
||||
mmap.put("user", ShiroUtils.getSysUser() );
|
||||
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存商品参数
|
||||
*/
|
||||
@RequiresPermissions("platform:itemparamters:add")
|
||||
@Log(title = "商品参数", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(ItemParamters itemParamters)
|
||||
{
|
||||
// 控制名称重复!
|
||||
if (BussiConstants.DOC_NAME_NOT_UNIQUE.equals(itemParamtersService.checkItemParamtersUnique(itemParamters)))
|
||||
{
|
||||
return error("修改单据'" + itemParamters.getItemParamtersName() + "'失败,名称已存在");
|
||||
}
|
||||
|
||||
// 取身份信息
|
||||
itemParamters.setCreateBy( ShiroUtils.getLoginName() );
|
||||
itemParamters.setCreateTime(DateUtils.getNowDate() );
|
||||
|
||||
return toAjax(itemParamtersService.insertItemParamters(itemParamters));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改商品参数
|
||||
*/
|
||||
@GetMapping("/edit/{itemParamtersId}")
|
||||
public String edit(@PathVariable("itemParamtersId") Long itemParamtersId, ModelMap mmap)
|
||||
{
|
||||
ItemParamters itemParamters = itemParamtersService.selectItemParamtersById(itemParamtersId);
|
||||
mmap.put("itemParamters", itemParamters);
|
||||
|
||||
// 取身份信息
|
||||
mmap.put("user", ShiroUtils.getSysUser() );
|
||||
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存商品参数
|
||||
*/
|
||||
@RequiresPermissions("platform:itemparamters:edit")
|
||||
@Log(title = "商品参数", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(ItemParamters itemParamters)
|
||||
{
|
||||
// 控制名称重复!
|
||||
if (BussiConstants.DOC_NAME_NOT_UNIQUE.equals(itemParamtersService.checkItemParamtersUnique(itemParamters)))
|
||||
{
|
||||
return error("修改单据'" + itemParamters.getItemParamtersName() + "'失败,名称已存在");
|
||||
}
|
||||
|
||||
|
||||
itemParamters.setUpdateBy( ShiroUtils.getLoginName() );
|
||||
itemParamters.setUpdateTime( DateUtils.getNowDate() );
|
||||
return toAjax(itemParamtersService.updateItemParamters(itemParamters));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 删除商品参数
|
||||
*/
|
||||
@RequiresPermissions("platform:itemparamters:remove")
|
||||
@Log(title = "商品参数", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(itemParamtersService.deleteItemParamtersByIds(ids));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,165 @@
|
|||
package com.ruoyi.province.platform.controller;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.province.platform.domain.ItemPriceBand;
|
||||
import com.ruoyi.province.platform.service.IItemPriceBandService;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.ShiroUtils;
|
||||
import com.ruoyi.province.platform.Constants.BussiConstants;
|
||||
|
||||
/**
|
||||
* 商品价格带Controller
|
||||
*
|
||||
* @author dalin
|
||||
* @date 2020-12-24
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/platform/itempriceband")
|
||||
public class ItemPriceBandController extends BaseController
|
||||
{
|
||||
private String prefix = "platform/itempriceband";
|
||||
|
||||
@Autowired
|
||||
private IItemPriceBandService itemPriceBandService;
|
||||
|
||||
@RequiresPermissions("platform:itempriceband:view")
|
||||
@GetMapping()
|
||||
public String itempriceband()
|
||||
{
|
||||
return prefix + "/itempriceband";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询商品价格带列表
|
||||
*/
|
||||
@RequiresPermissions("platform:itempriceband:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(ItemPriceBand itemPriceBand)
|
||||
{
|
||||
startPage();
|
||||
List<ItemPriceBand> list = itemPriceBandService.selectItemPriceBandList(itemPriceBand);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出商品价格带列表
|
||||
*/
|
||||
@RequiresPermissions("platform:itempriceband:export")
|
||||
@Log(title = "商品价格带", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(ItemPriceBand itemPriceBand)
|
||||
{
|
||||
List<ItemPriceBand> list = itemPriceBandService.selectItemPriceBandList(itemPriceBand);
|
||||
ExcelUtil<ItemPriceBand> util = new ExcelUtil<ItemPriceBand>(ItemPriceBand.class);
|
||||
return util.exportExcel(list, "itempriceband");
|
||||
}
|
||||
|
||||
/**
|
||||
* itemPriceBand
|
||||
* 校验商品价格带名称 是否重复
|
||||
*/
|
||||
@PostMapping("/checkItemPriceBandUnique")
|
||||
@ResponseBody
|
||||
public String checkItemPriceBandUnique(ItemPriceBand itemPriceBand)
|
||||
{
|
||||
return itemPriceBandService.checkItemPriceBandUnique(itemPriceBand);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增商品价格带
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add(ModelMap mmap)
|
||||
{
|
||||
// 取身份信息
|
||||
mmap.put("user", ShiroUtils.getSysUser() );
|
||||
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存商品价格带
|
||||
*/
|
||||
@RequiresPermissions("platform:itempriceband:add")
|
||||
@Log(title = "商品价格带", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(ItemPriceBand itemPriceBand)
|
||||
{
|
||||
// 控制名称重复!
|
||||
if (BussiConstants.DOC_NAME_NOT_UNIQUE.equals(itemPriceBandService.checkItemPriceBandUnique(itemPriceBand)))
|
||||
{
|
||||
return error("修改单据'" + itemPriceBand.getPriceBandName() + "'失败,名称已存在");
|
||||
}
|
||||
|
||||
// 取身份信息
|
||||
itemPriceBand.setCreateBy( ShiroUtils.getLoginName() );
|
||||
itemPriceBand.setCreateTime(DateUtils.getNowDate() );
|
||||
|
||||
return toAjax(itemPriceBandService.insertItemPriceBand(itemPriceBand));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改商品价格带
|
||||
*/
|
||||
@GetMapping("/edit/{priceBandId}")
|
||||
public String edit(@PathVariable("priceBandId") Long priceBandId, ModelMap mmap)
|
||||
{
|
||||
ItemPriceBand itemPriceBand = itemPriceBandService.selectItemPriceBandById(priceBandId);
|
||||
mmap.put("itemPriceBand", itemPriceBand);
|
||||
|
||||
// 取身份信息
|
||||
mmap.put("user", ShiroUtils.getSysUser() );
|
||||
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存商品价格带
|
||||
*/
|
||||
@RequiresPermissions("platform:itempriceband:edit")
|
||||
@Log(title = "商品价格带", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(ItemPriceBand itemPriceBand)
|
||||
{
|
||||
// 控制名称重复!
|
||||
if (BussiConstants.DOC_NAME_NOT_UNIQUE.equals(itemPriceBandService.checkItemPriceBandUnique(itemPriceBand)))
|
||||
{
|
||||
return error("修改单据'" + itemPriceBand.getPriceBandName() + "'失败,名称已存在");
|
||||
}
|
||||
|
||||
itemPriceBand.setUpdateBy( ShiroUtils.getLoginName() );
|
||||
itemPriceBand.setUpdateTime( DateUtils.getNowDate() );
|
||||
return toAjax(itemPriceBandService.updateItemPriceBand(itemPriceBand));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除商品价格带
|
||||
*/
|
||||
@RequiresPermissions("platform:itempriceband:remove")
|
||||
@Log(title = "商品价格带", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(itemPriceBandService.deleteItemPriceBandByIds(ids));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,218 @@
|
|||
package com.ruoyi.web.controller.platform;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.constant.UserConstants;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.province.platform.domain.PurchUserType;
|
||||
import com.ruoyi.province.platform.service.IPurchUserTypeService;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.core.domain.Ztree;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.ShiroUtils;
|
||||
import com.ruoyi.province.platform.Constants.BussiConstants;
|
||||
|
||||
/**
|
||||
* 购货用户类型Controller
|
||||
*
|
||||
* @author dalin
|
||||
* @date 2021-01-14
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/platform/purchusertype")
|
||||
public class PurchUserTypeController extends BaseController
|
||||
{
|
||||
private String prefix = "platform/purchusertype";
|
||||
|
||||
@Autowired
|
||||
private IPurchUserTypeService purchUserTypeService;
|
||||
|
||||
@RequiresPermissions("platform:purchusertype:view")
|
||||
@GetMapping()
|
||||
public String purchusertype()
|
||||
{
|
||||
return prefix + "/purchusertype";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询购货用户类型树列表
|
||||
*/
|
||||
@RequiresPermissions("platform:purchusertype:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public List<PurchUserType> list(PurchUserType purchUserType)
|
||||
{
|
||||
List<PurchUserType> list = purchUserTypeService.selectPurchUserTypeList(purchUserType);
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出购货用户类型列表
|
||||
*/
|
||||
@RequiresPermissions("platform:purchusertype:export")
|
||||
@Log(title = "购货用户类型", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(PurchUserType purchUserType)
|
||||
{
|
||||
List<PurchUserType> list = purchUserTypeService.selectPurchUserTypeList(purchUserType);
|
||||
ExcelUtil<PurchUserType> util = new ExcelUtil<PurchUserType>(PurchUserType.class);
|
||||
return util.exportExcel(list, "purchusertype");
|
||||
}
|
||||
|
||||
/**
|
||||
* purchUserType
|
||||
* 校验购货用户类型名称 是否重复
|
||||
*/
|
||||
@PostMapping("/checkPurchUserTypeUnique")
|
||||
@ResponseBody
|
||||
public String checkPurchUserTypeUnique(PurchUserType purchUserType)
|
||||
{
|
||||
return purchUserTypeService.checkPurchUserTypeUnique(purchUserType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增购货用户类型
|
||||
*/
|
||||
@GetMapping(value = { "/add/{purchTypeId}", "/add/" })
|
||||
public String add(@PathVariable(value = "purchTypeId", required = false) Long purchTypeId, ModelMap mmap)
|
||||
{
|
||||
// 取身份信息
|
||||
mmap.put("user", ShiroUtils.getSysUser() );
|
||||
|
||||
if (StringUtils.isNotNull(purchTypeId))
|
||||
{
|
||||
mmap.put("purchUserType", purchUserTypeService.selectPurchUserTypeById(purchTypeId));
|
||||
}
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存购货用户类型
|
||||
*/
|
||||
@RequiresPermissions("platform:purchusertype:add")
|
||||
@Log(title = "购货用户类型", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(PurchUserType purchUserType)
|
||||
{
|
||||
// 控制名称重复!
|
||||
if (BussiConstants.DOC_NAME_NOT_UNIQUE.equals(purchUserTypeService.checkPurchUserTypeUnique(purchUserType)))
|
||||
{
|
||||
return error("修改单据'" + purchUserType.getPurchTypeName() + "'失败,名称已存在");
|
||||
}
|
||||
|
||||
// 取身份信息
|
||||
purchUserType.setCreateBy( ShiroUtils.getLoginName() );
|
||||
purchUserType.setCreateTime(DateUtils.getNowDate() );
|
||||
|
||||
return toAjax(purchUserTypeService.insertPurchUserType(purchUserType));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改购货用户类型
|
||||
*/
|
||||
@GetMapping("/edit/{purchTypeId}")
|
||||
public String edit(@PathVariable("purchTypeId") Long purchTypeId, ModelMap mmap)
|
||||
{
|
||||
PurchUserType purchUserType = purchUserTypeService.selectPurchUserTypeById(purchTypeId);
|
||||
mmap.put("purchUserType", purchUserType);
|
||||
|
||||
// 取身份信息
|
||||
mmap.put("user", ShiroUtils.getSysUser() );
|
||||
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存购货用户类型
|
||||
*/
|
||||
@RequiresPermissions("platform:purchusertype:edit")
|
||||
@Log(title = "购货用户类型", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(PurchUserType purchUserType)
|
||||
{
|
||||
// 控制名称重复!
|
||||
if (BussiConstants.DOC_NAME_NOT_UNIQUE.equals(purchUserTypeService.checkPurchUserTypeUnique(purchUserType)))
|
||||
{
|
||||
return error("修改单据'" + purchUserType.getPurchTypeName() + "'失败,名称已存在");
|
||||
}
|
||||
|
||||
if (purchUserType.getParentId().equals(purchUserType.getPurchTypeId()))
|
||||
{
|
||||
return error("修改购货用户类型 '" + purchUserType.getPurchTypeName() + "'失败,上级purchUserType.getPurchTypeName()不能是自己");
|
||||
}
|
||||
else if (StringUtils.equals(UserConstants.DEPT_DISABLE, purchUserType.getStatus())
|
||||
&& purchUserTypeService.selectNormalChildrenPurchUserTypeById(purchUserType.getPurchTypeId()) > 0)
|
||||
{
|
||||
return AjaxResult.error("该购货用户类型包含未停用的子购货用户类型!");
|
||||
}
|
||||
|
||||
purchUserType.setUpdateBy( ShiroUtils.getLoginName() );
|
||||
purchUserType.setUpdateTime( DateUtils.getNowDate() );
|
||||
return toAjax(purchUserTypeService.updatePurchUserType(purchUserType));
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载购货用户类型列表树(排除下级)
|
||||
*/
|
||||
@GetMapping("/treeData/{excludeId}")
|
||||
@ResponseBody
|
||||
public List<Ztree> treeDataExcludeChild(@PathVariable(value = "excludeId", required = false) Long excludeId)
|
||||
{
|
||||
PurchUserType purchUserType = new PurchUserType();
|
||||
purchUserType.setPurchTypeId(excludeId);
|
||||
List<Ztree> ztrees = purchUserTypeService.selectPurchUserTypeTreeExcludeChild(purchUserType);
|
||||
return ztrees;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequiresPermissions("platform:purchusertype:remove")
|
||||
@Log(title = "购货用户类型", businessType = BusinessType.DELETE)
|
||||
@GetMapping("/remove/{purchTypeId}")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(@PathVariable("purchTypeId") Long purchTypeId)
|
||||
{
|
||||
return toAjax(purchUserTypeService.deletePurchUserTypeById(purchTypeId));
|
||||
}
|
||||
/**
|
||||
* 选择购货用户类型树
|
||||
*/
|
||||
@GetMapping(value = { "/selectPurchusertypeTree/{purchTypeId}", "/selectPurchusertypeTree/" })
|
||||
public String selectPurchusertypeTree(@PathVariable(value = "purchTypeId", required = false) Long purchTypeId, ModelMap mmap)
|
||||
{
|
||||
if (StringUtils.isNotNull(purchTypeId))
|
||||
{
|
||||
mmap.put("purchUserType", purchUserTypeService.selectPurchUserTypeById(purchTypeId));
|
||||
}
|
||||
return prefix + "/tree";
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载购货用户类型树列表
|
||||
*/
|
||||
@GetMapping("/treeData")
|
||||
@ResponseBody
|
||||
public List<Ztree> treeData()
|
||||
{
|
||||
List<Ztree> ztrees = purchUserTypeService.selectPurchUserTypeTree();
|
||||
return ztrees;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,193 @@
|
|||
package com.ruoyi.web.controller.platform;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.province.platform.domain.Regional;
|
||||
import com.ruoyi.province.platform.service.IRegionalService;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.core.domain.Ztree;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.ShiroUtils;
|
||||
import com.ruoyi.province.platform.Constants.BussiConstants;
|
||||
|
||||
/**
|
||||
* 地区资料Controller
|
||||
*
|
||||
* @author dalin
|
||||
* @date 2021-01-11
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/platform/regional")
|
||||
public class RegionalController extends BaseController
|
||||
{
|
||||
private String prefix = "platform/regional";
|
||||
|
||||
@Autowired
|
||||
private IRegionalService regionalService;
|
||||
|
||||
@RequiresPermissions("platform:regional:view")
|
||||
@GetMapping()
|
||||
public String regional()
|
||||
{
|
||||
return prefix + "/regional";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询地区资料树列表
|
||||
*/
|
||||
@RequiresPermissions("platform:regional:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public List<Regional> list(Regional regional)
|
||||
{
|
||||
List<Regional> list = regionalService.selectRegionalList(regional);
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出地区资料列表
|
||||
*/
|
||||
@RequiresPermissions("platform:regional:export")
|
||||
@Log(title = "地区资料", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(Regional regional)
|
||||
{
|
||||
List<Regional> list = regionalService.selectRegionalList(regional);
|
||||
ExcelUtil<Regional> util = new ExcelUtil<Regional>(Regional.class);
|
||||
return util.exportExcel(list, "regional");
|
||||
}
|
||||
|
||||
/**
|
||||
* regional
|
||||
* 校验地区资料名称 是否重复
|
||||
*/
|
||||
@PostMapping("/checkRegionalUnique")
|
||||
@ResponseBody
|
||||
public String checkRegionalUnique(Regional regional)
|
||||
{
|
||||
return regionalService.checkRegionalUnique(regional);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增地区资料
|
||||
*/
|
||||
@GetMapping(value = { "/add/{regionalId}", "/add/" })
|
||||
public String add(@PathVariable(value = "regionalId", required = false) Long regionalId, ModelMap mmap)
|
||||
{
|
||||
// 取身份信息
|
||||
mmap.put("user", ShiroUtils.getSysUser() );
|
||||
|
||||
if (StringUtils.isNotNull(regionalId))
|
||||
{
|
||||
mmap.put("regional", regionalService.selectRegionalById(regionalId));
|
||||
}
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存地区资料
|
||||
*/
|
||||
@RequiresPermissions("platform:regional:add")
|
||||
@Log(title = "地区资料", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(Regional regional)
|
||||
{
|
||||
// 控制名称重复!
|
||||
if (BussiConstants.DOC_NAME_NOT_UNIQUE.equals(regionalService.checkRegionalUnique(regional)))
|
||||
{
|
||||
return error("修改单据'" + regional.getRegionalName() + "'失败,名称已存在");
|
||||
}
|
||||
|
||||
// 取身份信息
|
||||
regional.setCreateBy( ShiroUtils.getLoginName() );
|
||||
regional.setCreateTime(DateUtils.getNowDate() );
|
||||
|
||||
return toAjax(regionalService.insertRegional(regional));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改地区资料
|
||||
*/
|
||||
@GetMapping("/edit/{regionalId}")
|
||||
public String edit(@PathVariable("regionalId") Long regionalId, ModelMap mmap)
|
||||
{
|
||||
Regional regional = regionalService.selectRegionalById(regionalId);
|
||||
mmap.put("regional", regional);
|
||||
|
||||
// 取身份信息
|
||||
mmap.put("user", ShiroUtils.getSysUser() );
|
||||
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存地区资料
|
||||
*/
|
||||
@RequiresPermissions("platform:regional:edit")
|
||||
@Log(title = "地区资料", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(Regional regional)
|
||||
{
|
||||
// 控制名称重复!
|
||||
if (BussiConstants.DOC_NAME_NOT_UNIQUE.equals(regionalService.checkRegionalUnique(regional)))
|
||||
{
|
||||
return error("修改单据'" + regional.getRegionalName() + "'失败,名称已存在");
|
||||
}
|
||||
|
||||
regional.setUpdateBy( ShiroUtils.getLoginName() );
|
||||
regional.setUpdateTime( DateUtils.getNowDate() );
|
||||
return toAjax(regionalService.updateRegional(regional));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequiresPermissions("platform:regional:remove")
|
||||
@Log(title = "地区资料", businessType = BusinessType.DELETE)
|
||||
@GetMapping("/remove/{regionalId}")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(@PathVariable("regionalId") Long regionalId)
|
||||
{
|
||||
return toAjax(regionalService.deleteRegionalById(regionalId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 选择地区资料树
|
||||
*/
|
||||
@GetMapping(value = { "/selectRegionalTree/{regionalId}", "/selectRegionalTree/" })
|
||||
public String selectRegionalTree(@PathVariable(value = "regionalId", required = false) Long regionalId, ModelMap mmap)
|
||||
{
|
||||
if (StringUtils.isNotNull(regionalId))
|
||||
{
|
||||
mmap.put("regional", regionalService.selectRegionalById(regionalId));
|
||||
}
|
||||
return prefix + "/tree";
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载地区资料树列表
|
||||
*/
|
||||
@GetMapping("/treeData")
|
||||
@ResponseBody
|
||||
public List<Ztree> treeData()
|
||||
{
|
||||
List<Ztree> ztrees = regionalService.selectRegionalTree();
|
||||
return ztrees;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,218 @@
|
|||
package com.ruoyi.web.controller.platform;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.constant.UserConstants;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.province.platform.domain.SupplyChainHier;
|
||||
import com.ruoyi.province.platform.service.ISupplyChainHierService;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.core.domain.Ztree;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.ShiroUtils;
|
||||
import com.ruoyi.province.platform.Constants.BussiConstants;
|
||||
|
||||
/**
|
||||
* 供应链层级Controller
|
||||
*
|
||||
* @author dalin
|
||||
* @date 2021-01-14
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/platform/supplychainhier")
|
||||
public class SupplyChainHierController extends BaseController
|
||||
{
|
||||
private String prefix = "platform/supplychainhier";
|
||||
|
||||
@Autowired
|
||||
private ISupplyChainHierService supplyChainHierService;
|
||||
|
||||
@RequiresPermissions("platform:supplychainhier:view")
|
||||
@GetMapping()
|
||||
public String supplychainhier()
|
||||
{
|
||||
return prefix + "/supplychainhier";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询供应链层级树列表
|
||||
*/
|
||||
@RequiresPermissions("platform:supplychainhier:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public List<SupplyChainHier> list(SupplyChainHier supplyChainHier)
|
||||
{
|
||||
List<SupplyChainHier> list = supplyChainHierService.selectSupplyChainHierList(supplyChainHier);
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出供应链层级列表
|
||||
*/
|
||||
@RequiresPermissions("platform:supplychainhier:export")
|
||||
@Log(title = "供应链层级", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(SupplyChainHier supplyChainHier)
|
||||
{
|
||||
List<SupplyChainHier> list = supplyChainHierService.selectSupplyChainHierList(supplyChainHier);
|
||||
ExcelUtil<SupplyChainHier> util = new ExcelUtil<SupplyChainHier>(SupplyChainHier.class);
|
||||
return util.exportExcel(list, "supplychainhier");
|
||||
}
|
||||
|
||||
/**
|
||||
* supplyChainHier
|
||||
* 校验供应链层级名称 是否重复
|
||||
*/
|
||||
@PostMapping("/checkSupplyChainHierUnique")
|
||||
@ResponseBody
|
||||
public String checkSupplyChainHierUnique(SupplyChainHier supplyChainHier)
|
||||
{
|
||||
return supplyChainHierService.checkSupplyChainHierUnique(supplyChainHier);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增供应链层级
|
||||
*/
|
||||
@GetMapping(value = { "/add/{supplyChainId}", "/add/" })
|
||||
public String add(@PathVariable(value = "supplyChainId", required = false) Long supplyChainId, ModelMap mmap)
|
||||
{
|
||||
// 取身份信息
|
||||
mmap.put("user", ShiroUtils.getSysUser() );
|
||||
|
||||
if (StringUtils.isNotNull(supplyChainId))
|
||||
{
|
||||
mmap.put("supplyChainHier", supplyChainHierService.selectSupplyChainHierById(supplyChainId));
|
||||
}
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存供应链层级
|
||||
*/
|
||||
@RequiresPermissions("platform:supplychainhier:add")
|
||||
@Log(title = "供应链层级", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(SupplyChainHier supplyChainHier)
|
||||
{
|
||||
// 控制名称重复!
|
||||
if (BussiConstants.DOC_NAME_NOT_UNIQUE.equals(supplyChainHierService.checkSupplyChainHierUnique(supplyChainHier)))
|
||||
{
|
||||
return error("修改单据'" + supplyChainHier.getSupplyChainName() + "'失败,名称已存在");
|
||||
}
|
||||
|
||||
// 取身份信息
|
||||
supplyChainHier.setCreateBy( ShiroUtils.getLoginName() );
|
||||
supplyChainHier.setCreateTime(DateUtils.getNowDate() );
|
||||
|
||||
return toAjax(supplyChainHierService.insertSupplyChainHier(supplyChainHier));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改供应链层级
|
||||
*/
|
||||
@GetMapping("/edit/{supplyChainId}")
|
||||
public String edit(@PathVariable("supplyChainId") Long supplyChainId, ModelMap mmap)
|
||||
{
|
||||
SupplyChainHier supplyChainHier = supplyChainHierService.selectSupplyChainHierById(supplyChainId);
|
||||
mmap.put("supplyChainHier", supplyChainHier);
|
||||
|
||||
// 取身份信息
|
||||
mmap.put("user", ShiroUtils.getSysUser() );
|
||||
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存供应链层级
|
||||
*/
|
||||
@RequiresPermissions("platform:supplychainhier:edit")
|
||||
@Log(title = "供应链层级", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(SupplyChainHier supplyChainHier)
|
||||
{
|
||||
// 控制名称重复!
|
||||
if (BussiConstants.DOC_NAME_NOT_UNIQUE.equals(supplyChainHierService.checkSupplyChainHierUnique(supplyChainHier)))
|
||||
{
|
||||
return error("修改单据'" + supplyChainHier.getSupplyChainName() + "'失败,名称已存在");
|
||||
}
|
||||
|
||||
if (supplyChainHier.getParentId().equals(supplyChainHier.getSupplyChainId()))
|
||||
{
|
||||
return error("修改供应链层级 '" + supplyChainHier.getSupplyChainName() + "'失败,上级supplyChainHier.getSupplyChainName()不能是自己");
|
||||
}
|
||||
else if (StringUtils.equals(UserConstants.DEPT_DISABLE, supplyChainHier.getStatus())
|
||||
&& supplyChainHierService.selectNormalChildrenSupplyChainHierById(supplyChainHier.getSupplyChainId()) > 0)
|
||||
{
|
||||
return AjaxResult.error("该供应链层级包含未停用的子供应链层级!");
|
||||
}
|
||||
|
||||
supplyChainHier.setUpdateBy( ShiroUtils.getLoginName() );
|
||||
supplyChainHier.setUpdateTime( DateUtils.getNowDate() );
|
||||
return toAjax(supplyChainHierService.updateSupplyChainHier(supplyChainHier));
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载供应链层级列表树(排除下级)
|
||||
*/
|
||||
@GetMapping("/treeData/{excludeId}")
|
||||
@ResponseBody
|
||||
public List<Ztree> treeDataExcludeChild(@PathVariable(value = "excludeId", required = false) Long excludeId)
|
||||
{
|
||||
SupplyChainHier supplyChainHier = new SupplyChainHier();
|
||||
supplyChainHier.setSupplyChainId(excludeId);
|
||||
List<Ztree> ztrees = supplyChainHierService.selectSupplyChainHierTreeExcludeChild(supplyChainHier);
|
||||
return ztrees;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequiresPermissions("platform:supplychainhier:remove")
|
||||
@Log(title = "供应链层级", businessType = BusinessType.DELETE)
|
||||
@GetMapping("/remove/{supplyChainId}")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(@PathVariable("supplyChainId") Long supplyChainId)
|
||||
{
|
||||
return toAjax(supplyChainHierService.deleteSupplyChainHierById(supplyChainId));
|
||||
}
|
||||
/**
|
||||
* 选择供应链层级树
|
||||
*/
|
||||
@GetMapping(value = { "/selectSupplychainhierTree/{supplyChainId}", "/selectSupplychainhierTree/" })
|
||||
public String selectSupplychainhierTree(@PathVariable(value = "supplyChainId", required = false) Long supplyChainId, ModelMap mmap)
|
||||
{
|
||||
if (StringUtils.isNotNull(supplyChainId))
|
||||
{
|
||||
mmap.put("supplyChainHier", supplyChainHierService.selectSupplyChainHierById(supplyChainId));
|
||||
}
|
||||
return prefix + "/tree";
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载供应链层级树列表
|
||||
*/
|
||||
@GetMapping("/treeData")
|
||||
@ResponseBody
|
||||
public List<Ztree> treeData()
|
||||
{
|
||||
List<Ztree> ztrees = supplyChainHierService.selectSupplyChainHierTree();
|
||||
return ztrees;
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 5.5 KiB |
|
|
@ -4,7 +4,7 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="renderer" content="webkit">
|
||||
<title>若依系统首页</title>
|
||||
<title>系统首页</title>
|
||||
<!-- 避免IE使用兼容模式 -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<link th:href="@{favicon.ico}" rel="shortcut icon"/>
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
||||
<title>登录若依系统</title>
|
||||
<meta name="description" content="若依后台管理框架">
|
||||
<title>登录系统</title>
|
||||
<meta name="description" content="后台管理框架">
|
||||
<link href="../static/css/bootstrap.min.css" th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
|
||||
<link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
|
||||
<link href="../static/css/style.css" th:href="@{/css/style.css}" rel="stylesheet"/>
|
||||
|
|
@ -26,16 +26,16 @@
|
|||
<div class="col-sm-7">
|
||||
<div class="signin-info">
|
||||
<div class="logopanel m-b">
|
||||
<h1><img alt="[ 若依 ]" src="../static/ruoyi.png" th:src="@{/ruoyi.png}"></h1>
|
||||
<h1><img alt="" src="../static/yds.png" th:src="@{/yds.png}"></h1>
|
||||
</div>
|
||||
<div class="m-b"></div>
|
||||
<h4>欢迎使用 <strong>若依 后台管理系统</strong></h4>
|
||||
<h4>欢迎使用 <strong> 后台管理系统</strong></h4>
|
||||
<ul class="m-b">
|
||||
<li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> SpringBoot</li>
|
||||
<li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> Mybatis</li>
|
||||
<li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> Shiro</li>
|
||||
<li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> Thymeleaf</li>
|
||||
<li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> Bootstrap</li>
|
||||
<li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> AAAA</li>
|
||||
<li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> BBBBBB</li>
|
||||
<li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> CCCCCCCC</li>
|
||||
<li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> DDDDDDDD/li>
|
||||
<li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> EEEEEEEE</li>
|
||||
</ul>
|
||||
<strong th:if="${@config.getKey('sys.account.registerUser')}">还没有账号? <a th:href="@{/register}">立即注册»</a></strong>
|
||||
</div>
|
||||
|
|
@ -43,7 +43,7 @@
|
|||
<div class="col-sm-5">
|
||||
<form id="signupForm" autocomplete="off">
|
||||
<h4 class="no-margins">登录:</h4>
|
||||
<p class="m-t-md">你若不离不弃,我必生死相依</p>
|
||||
<p class="m-t-md">天下没有难做的生意,是你的首选</p>
|
||||
<input type="text" name="username" class="form-control uname" placeholder="用户名" value="admin" />
|
||||
<input type="password" name="password" class="form-control pword" placeholder="密码" value="admin123" />
|
||||
<div class="row m-t" th:if="${captchaEnabled==true}">
|
||||
|
|
@ -65,7 +65,7 @@
|
|||
</div>
|
||||
<div class="signup-footer">
|
||||
<div class="pull-left">
|
||||
© 2019 All Rights Reserved. RuoYi <br>
|
||||
© 2020 All Rights Reserved. aBook <br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -80,5 +80,6 @@
|
|||
<script src="../static/ajax/libs/blockUI/jquery.blockUI.js" th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script>
|
||||
<script src="../static/ruoyi/js/ry-ui.js" th:src="@{/ruoyi/js/ry-ui.js?v=4.5.1}"></script>
|
||||
<script src="../static/ruoyi/login.js" th:src="@{/ruoyi/login.js}"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<!--360浏览器优先以webkit内核解析-->
|
||||
<title>${@config.getKey('sys.project.name')}介绍</title>
|
||||
<title> @config.getKey('sys.project.name') 介绍</title>
|
||||
<link rel="shortcut icon" href="favicon.ico">
|
||||
<link href="../static/css/bootstrap.min.css" th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
|
||||
<link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
|
||||
|
|
|
|||
|
|
@ -67,6 +67,10 @@
|
|||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'brandId',
|
||||
title: '编码ID'
|
||||
},
|
||||
{
|
||||
field: 'brandName',
|
||||
title: '名称'
|
||||
|
|
@ -114,6 +118,7 @@
|
|||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
$.table.hideColumn("brandId");
|
||||
});
|
||||
|
||||
function operateEdit(){
|
||||
|
|
|
|||
|
|
@ -6,12 +6,10 @@
|
|||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-brandinfo-edit" th:object="${brandInfo}">
|
||||
<input type="hidden" name="createBy" id="createBy" />
|
||||
<input type="hidden" name="updateBy" id="updateBy" />
|
||||
|
||||
<input type="hidden" name="createBy" th:field="*{createBy}" id="createBy" />
|
||||
<input type="hidden" name="updateBy" th:field="*{updateBy}" id="updateBy" />
|
||||
<input name="brandId" th:field="*{brandId}" type="hidden">
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">名称:</label>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,125 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增业务规模')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-businessscope-add">
|
||||
<input type="hidden" name="createBy" id="createBy" />
|
||||
<input type="hidden" name="updateBy" id="updateBy" />
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="businessScaleName" name="businessScaleName" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label">单据号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="docNum" name="docNum" class="form-control" readonly="readonly" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">资料状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('platf_doc_statu')}">
|
||||
<input type="radio" th:id="${'status_' + dict.dictCode}" id="status" name="status" th:value="${dict.dictValue}" th:checked="${dict.default}" required>
|
||||
<label th:for="${'status_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">备注:</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea id="remark" name="remark" maxlength="500" class="form-control" rows="3" ></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">制单人:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="createByuserName" name="createByuserName" class="form-control" readonly="readonly" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">制单时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="createTime" name="createTime" class="form-control" readonly="readonly" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label">修改人:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="updateByuserName" name="updateByuserName" class="form-control" readonly="readonly" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label">修改时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="updateTime" name="updateTime" class="form-control" readonly="readonly" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "platform/businessscope"
|
||||
|
||||
$("#form-businessscope-add").validate({
|
||||
onkeyup: false,
|
||||
rules:{
|
||||
econName:{
|
||||
remote: {
|
||||
url: prefix + "/checkBusinessScopeUnique",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
"BusinessScaleName" : function() {
|
||||
return $.common.trim($("#BusinessScaleName").val());
|
||||
}
|
||||
},
|
||||
dataFilter: function(data, type) {
|
||||
return $.validate.unique(data);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
messages: {
|
||||
"BusinessScaleName": {
|
||||
remote: "业务规模 名称已经存在"
|
||||
}
|
||||
},
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-businessscope-add').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
$("#createBy").val([[${user.loginName}]]);
|
||||
$("#createByuserName").val([[${user.userName}]]);
|
||||
$("#createTime").val
|
||||
( $.common.dateFormat(new Date(),'yyyy-MM-dd HH:mm:ss') ) ; //获取日期与时间
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,130 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('业务规模列表')" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
<label>名称:</label>
|
||||
<input type="text" name="businessScaleName"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>资料状态:</label>
|
||||
<select name="status" th:with="type=${@dict.getType('platf_doc_statu')}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="platform:businessscope:add">
|
||||
<i class="fa fa-plus"></i> 添加
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="operateEdit()" shiro:hasPermission="platform:businessscope:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="platform:businessscope:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="platform:businessscope:export">
|
||||
<i class="fa fa-download"></i> 导出
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('platform:businessscope:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('platform:businessscope:remove')}]];
|
||||
var statusDatas = [[${@dict.getType('platf_doc_statu')}]];
|
||||
var prefix = ctx + "platform/businessscope";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "业务规模",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'businessScaleId',
|
||||
title: '编号ID'
|
||||
},
|
||||
{
|
||||
field: 'businessScaleName',
|
||||
title: '名称'
|
||||
},
|
||||
{
|
||||
field: 'docNum',
|
||||
title: '单据号'
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '资料状态',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(statusDatas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'remark',
|
||||
title: '备注'
|
||||
},
|
||||
{
|
||||
field: 'createByuserName',
|
||||
title: '制单人'
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
title: '制单时间'
|
||||
},
|
||||
{
|
||||
field: 'updateByuserName',
|
||||
title: '修改人'
|
||||
},
|
||||
{
|
||||
field: 'updateTime',
|
||||
title: '修改时间'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.businessScaleId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.businessScaleId + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
$.table.hideColumn("businessScaleId");
|
||||
});
|
||||
|
||||
function operateEdit(){
|
||||
$.operate.edit(''+ $.table.selectColumns("businessScaleId") +'')
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,134 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改业务规模')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-businessscope-edit" th:object="${businessScope}">
|
||||
<input type="hidden" name="createBy" id="createBy" th:field="*{createBy}"/>
|
||||
<input type="hidden" name="updateBy" id="updateBy" th:field="*{updateBy}"/>
|
||||
|
||||
<input name="businessScaleId" th:field="*{businessScaleId}" type="hidden">
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="businessScaleName" th:field="*{businessScaleName}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label">单据号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="docNum" disabled th:field="*{docNum}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">资料状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('platf_doc_statu')}">
|
||||
<input type="radio" th:id="${'status_' + dict.dictCode}" name="status" th:value="${dict.dictValue}" th:field="*{status}" required>
|
||||
<label th:for="${'status_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">备注:</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea name="remark" maxlength="500" class="form-control" rows="3" >[[*{remark}]]</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">制单人:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="createByuserName" disabled th:field="*{createByuserName}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">制单时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="createTime" disabled th:value="${#dates.format(businessScope.createTime, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label">修改人:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="updateByuserName" disabled th:field="*{updateByuserName}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label">修改时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="updateTime" disabled th:value="${#dates.format(businessScope.updateTime, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "platform/businessscope";
|
||||
$("#form-businessscope-edit").validate({
|
||||
onkeyup: false,
|
||||
rules:{
|
||||
econName:{
|
||||
remote: {
|
||||
url: prefix + "/checkBusinessScopeUnique",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
"BusinessScaleName" : function() {
|
||||
return $.common.trim($("#BusinessScaleName").val());
|
||||
}
|
||||
},
|
||||
dataFilter: function(data, type) {
|
||||
return $.validate.unique(data);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
messages: {
|
||||
"BusinessScaleName": {
|
||||
remote: "业务规模 名称已经存在"
|
||||
}
|
||||
},
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-businessscope-edit').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -84,6 +84,10 @@
|
|||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'companyAreaId',
|
||||
title: '编号ID'
|
||||
},
|
||||
{
|
||||
field: 'companyAreaName',
|
||||
title: '名称'
|
||||
|
|
@ -131,6 +135,7 @@
|
|||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
$.table.hideColumn("companyAreaId");
|
||||
});
|
||||
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -6,12 +6,10 @@
|
|||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-companyarea-edit" th:object="${companyArea}">
|
||||
<input type="hidden" name="createBy" id="createBy" />
|
||||
<input type="hidden" name="updateBy" id="updateBy" />
|
||||
|
||||
<input type="hidden" name="createBy" th:field="*{createBy}" id="createBy" />
|
||||
<input type="hidden" name="updateBy" th:field="*{updateBy}" id="updateBy" />
|
||||
<input name="companyAreaId" th:field="*{companyAreaId}" type="hidden">
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">名称:</label>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,125 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增经济类型')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-econtype-add">
|
||||
<input type="hidden" name="createBy" id="createBy" />
|
||||
<input type="hidden" name="updateBy" id="updateBy" />
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="econName" name="econName" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label">单据号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="docNum" name="docNum" class="form-control" readonly="readonly" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">资料状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('platf_doc_statu')}">
|
||||
<input type="radio" th:id="${'status_' + dict.dictCode}" id="status" name="status" th:value="${dict.dictValue}" th:checked="${dict.default}" required>
|
||||
<label th:for="${'status_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">备注:</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea id="remark" name="remark" maxlength="500" class="form-control" rows="3" ></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label">制单人:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="createByuserName" name="createByuserName" class="form-control" readonly="readonly" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label">制单时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="createTime" name="createTime" class="form-control" readonly="readonly" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label">修改人:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="updateByuserName" name="updateByuserName" class="form-control" readonly="readonly" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label">修改时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="updateTime" name="updateTime" class="form-control" readonly="readonly" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "platform/econtype"
|
||||
|
||||
$("#form-econtype-add").validate({
|
||||
onkeyup: false,
|
||||
rules:{
|
||||
econName:{
|
||||
remote: {
|
||||
url: prefix + "/checkEconTypeUnique",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
"EconName" : function() {
|
||||
return $.common.trim($("#EconName").val());
|
||||
}
|
||||
},
|
||||
dataFilter: function(data, type) {
|
||||
return $.validate.unique(data);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
messages: {
|
||||
"EconName": {
|
||||
remote: "经济类型 名称已经存在"
|
||||
}
|
||||
},
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-econtype-add').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
$("#createBy").val([[${user.loginName}]]);
|
||||
$("#createByuserName").val([[${user.userName}]]);
|
||||
$("#createTime").val
|
||||
( $.common.dateFormat(new Date(),'yyyy-MM-dd HH:mm:ss') ) ; //获取日期与时间
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -67,6 +67,10 @@
|
|||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'econId',
|
||||
title: '编号ID'
|
||||
},
|
||||
{
|
||||
field: 'econName',
|
||||
title: '名称'
|
||||
|
|
@ -114,12 +118,16 @@
|
|||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
$.table.hideColumn("econId");
|
||||
});
|
||||
|
||||
function operateEdit(){
|
||||
|
||||
$.operate.edit(''+ $.table.selectColumns("econId") +'')
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -6,8 +6,8 @@
|
|||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-econtype-edit" th:object="${econType}">
|
||||
<input type="hidden" name="createBy" id="createBy" />
|
||||
<input type="hidden" name="updateBy" id="updateBy" />
|
||||
<input type="hidden" name="createBy" th:field="*{createBy}" id="createBy" />
|
||||
<input type="hidden" name="updateBy" th:field="*{updateBy}" id="updateBy" />
|
||||
|
||||
<input name="econId" th:field="*{econId}" type="hidden">
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,217 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增商品参数')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-itemparamters-add">
|
||||
<input type="hidden" name="createBy" id="createBy" />
|
||||
<input type="hidden" name="updateBy" id="updateBy" />
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="itemParamtersName" name="itemParamtersName" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label">单据号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="docNum" name="docNum" class="form-control" readonly="readonly" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">资料状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('platf_doc_statu')}">
|
||||
<input type="radio" th:id="${'status_' + dict.dictCode}" id="status" name="status" th:value="${dict.dictValue}" th:checked="${dict.default}" required>
|
||||
<label th:for="${'status_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">备注:</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea id="remark" name="remark" maxlength="500" class="form-control" rows="3" ></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">制单人:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="createByuserName" name="createByuserName" class="form-control" readonly="readonly" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">制单时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="createTime" name="createTime" class="form-control" readonly="readonly" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label">修改人:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="updateByuserName" name="updateByuserName" class="form-control" readonly="readonly" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label">修改时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="updateTime" name="updateTime" class="form-control" readonly="readonly" type="text">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<button type="button" class="btn btn-white btn-sm" onclick="addColumn()"><i class="fa fa-plus"> 增加</i></button>
|
||||
<button type="button" class="btn btn-white btn-sm" onclick="sub.delColumn()"><i class="fa fa-minus"> 删除</i></button>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "platform/itemparamters"
|
||||
|
||||
$("#form-itemparamters-add").validate({
|
||||
onkeyup: false,
|
||||
rules:{
|
||||
econName:{
|
||||
remote: {
|
||||
url: prefix + "/checkItemParamtersUnique",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
"ItemParamtersName" : function() {
|
||||
return $.common.trim($("#ItemParamtersName").val());
|
||||
}
|
||||
},
|
||||
dataFilter: function(data, type) {
|
||||
return $.validate.unique(data);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
messages: {
|
||||
"ItemParamtersName": {
|
||||
remote: "商品参数 名称已经存在"
|
||||
}
|
||||
},
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-itemparamters-add').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
pagination: false,
|
||||
showSearch: false,
|
||||
showRefresh: false,
|
||||
showToggle: false,
|
||||
showColumns: false,
|
||||
sidePagination: "client",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'index',
|
||||
align: 'center',
|
||||
title: "序号",
|
||||
formatter: function (value, row, index) {
|
||||
var columnIndex = $.common.sprintf("<input type='hidden' name='index' value='%s'>", $.table.serialNumber(index));
|
||||
return columnIndex + $.table.serialNumber(index);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'unit',
|
||||
align: 'center',
|
||||
title: '计量单位',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='itemParamtersUnitList[%s].unit' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'unitStatus',
|
||||
align: 'center',
|
||||
title: '计量单位状态',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='itemParamtersUnitList[%s].unitStatus' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'fmemo',
|
||||
align: 'center',
|
||||
title: '计量单位描述',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='itemParamtersUnitList[%s].fmemo' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
|
||||
function addColumn() {
|
||||
var count = $("#" + table.options.id).bootstrapTable('getData').length;
|
||||
sub.editColumn();
|
||||
|
||||
$("#" + table.options.id).bootstrapTable('insertRow', {
|
||||
index: count,
|
||||
row: {
|
||||
index: $.table.serialNumber(count),
|
||||
unit: "",
|
||||
unitStatus: "",
|
||||
fmemo: ""
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$("#createBy").val([[${user.loginName}]]);
|
||||
$("#createByuserName").val([[${user.userName}]]);
|
||||
$("#createTime").val
|
||||
( $.common.dateFormat(new Date(),'yyyy-MM-dd HH:mm:ss') ) ; //获取日期与时间
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,228 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改商品参数')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-itemparamters-edit" th:object="${itemParamters}">
|
||||
<input type="hidden" name="createBy" id="createBy" th:field="*{createBy}"/>
|
||||
<input type="hidden" name="updateBy" id="updateBy" th:field="*{updateBy}"/>
|
||||
|
||||
<h4 class="form-header h4">商品参数信息</h4>
|
||||
<input name="itemParamtersId" th:field="*{itemParamtersId}" type="hidden">
|
||||
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="itemParamtersName" name="itemParamtersName" th:value="*{itemParamtersName}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label">单据号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="docNum" name="docNum" disabled th:value="*{docNum}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">资料状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('platf_doc_statu')}">
|
||||
<input type="radio" th:id="${'status_' + dict.dictCode}" id="status" name="status" th:value="${dict.dictValue}" th:field="*{status}" required>
|
||||
<label th:for="${'status_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">备注:</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea id="remark" name="remark" maxlength="500" class="form-control" rows="3" >[[*{remark}]]</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">制单人:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="createByuserName" name="createByuserName" disabled th:value="*{createByuserName}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">制单时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="createTime" name="createTime" disabled th:value="${#dates.format(itemParamters.createTime, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label">修改人:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="updateByuserName" name="updateByuserName" disabled th:value="*{updateByuserName}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label">修改时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="updateTime" name="updateTime" disabled th:value="${#dates.format(itemParamters.updateTime, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<h4 class="form-header h4">商品参数_计量单位信息</h4>
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-12">
|
||||
<button type="button" class="btn btn-white btn-sm" onclick="addColumn()"><i class="fa fa-plus"> 增加</i></button>
|
||||
<button type="button" class="btn btn-white btn-sm" onclick="sub.delColumn()"><i class="fa fa-minus"> 删除</i></button>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "platform/itemparamters";
|
||||
$("#form-itemparamters-edit").validate({
|
||||
onkeyup: false,
|
||||
rules:{
|
||||
econName:{
|
||||
remote: {
|
||||
url: prefix + "/checkItemParamtersUnique",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
"ItemParamtersName" : function() {
|
||||
return $.common.trim($("#ItemParamtersName").val());
|
||||
}
|
||||
},
|
||||
dataFilter: function(data, type) {
|
||||
return $.validate.unique(data);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
messages: {
|
||||
"ItemParamtersName": {
|
||||
remote: "商品参数 名称已经存在"
|
||||
}
|
||||
},
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-itemparamters-edit').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
data: [[${itemParamters.itemParamtersUnitList}]],
|
||||
pagination: false,
|
||||
showSearch: false,
|
||||
showRefresh: false,
|
||||
showToggle: false,
|
||||
showColumns: false,
|
||||
sidePagination: "client",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'index',
|
||||
align: 'center',
|
||||
title: "序号",
|
||||
formatter: function (value, row, index) {
|
||||
var columnIndex = $.common.sprintf("<input type='hidden' name='index' value='%s'>", $.table.serialNumber(index));
|
||||
return columnIndex + $.table.serialNumber(index);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'unit',
|
||||
align: 'center',
|
||||
title: '计量单位',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='itemParamtersUnitList[%s].unit' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'unitStatus',
|
||||
align: 'center',
|
||||
title: '计量单位状态',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='itemParamtersUnitList[%s].unitStatus' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'fmemo',
|
||||
align: 'center',
|
||||
title: '计量单位描述',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='itemParamtersUnitList[%s].fmemo' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
|
||||
function addColumn() {
|
||||
var count = $("#" + table.options.id).bootstrapTable('getData').length;
|
||||
sub.editColumn();
|
||||
|
||||
$("#" + table.options.id).bootstrapTable('insertRow', {
|
||||
index: count,
|
||||
row: {
|
||||
index: $.table.serialNumber(count),
|
||||
unit: "",
|
||||
unitStatus: "",
|
||||
fmemo: ""
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,130 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('商品参数列表')" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
<label>名称:</label>
|
||||
<input type="text" name="itemParamtersName"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>资料状态:</label>
|
||||
<select name="status" th:with="type=${@dict.getType('platf_doc_statu')}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="platform:itemparamters:add">
|
||||
<i class="fa fa-plus"></i> 添加
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="operateEdit()" shiro:hasPermission="platform:itemparamters:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="platform:itemparamters:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="platform:itemparamters:export">
|
||||
<i class="fa fa-download"></i> 导出
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('platform:itemparamters:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('platform:itemparamters:remove')}]];
|
||||
var statusDatas = [[${@dict.getType('platf_doc_statu')}]];
|
||||
var prefix = ctx + "platform/itemparamters";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "商品参数",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'itemParamtersId',
|
||||
title: '主键',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'itemParamtersName',
|
||||
title: '名称'
|
||||
},
|
||||
{
|
||||
field: 'docNum',
|
||||
title: '单据号'
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '资料状态',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(statusDatas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'remark',
|
||||
title: '备注'
|
||||
},
|
||||
{
|
||||
field: 'createByuserName',
|
||||
title: '制单人'
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
title: '制单时间'
|
||||
},
|
||||
{
|
||||
field: 'updateByuserName',
|
||||
title: '修改人'
|
||||
},
|
||||
{
|
||||
field: 'updateTime',
|
||||
title: '修改时间'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.itemParamtersId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.itemParamtersId + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
|
||||
function operateEdit(){
|
||||
$.operate.edit(''+ $.table.selectColumns("itemParamtersId") +'')
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,139 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增商品价格带')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-itempriceband-add">
|
||||
<input type="hidden" name="createBy" id="createBy" />
|
||||
<input type="hidden" name="updateBy" id="updateBy" />
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="priceBandName" name="priceBandName" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label">单据号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="docNum" name="docNum" class="form-control" readonly="readonly" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label">上限:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="priceBandUpper" name="priceBandUpper" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label">下限:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="priceBandLower" name="priceBandLower" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">资料状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('platf_doc_statu')}">
|
||||
<input type="radio" th:id="${'status_' + dict.dictCode}" id="status" name="status" th:value="${dict.dictValue}" th:checked="${dict.default}" required>
|
||||
<label th:for="${'status_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">备注:</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea id="remark" name="remark" maxlength="500" class="form-control" rows="3" ></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">制单人:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="createByuserName" name="createByuserName" class="form-control" readonly="readonly" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">制单时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="createTime" name="createTime" class="form-control" readonly="readonly" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label">修改人:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="updateByuserName" name="updateByuserName" class="form-control" readonly="readonly" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label">修改时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="updateTime" name="updateTime" class="form-control" readonly="readonly" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "platform/itempriceband"
|
||||
|
||||
$("#form-itempriceband-add").validate({
|
||||
onkeyup: false,
|
||||
rules:{
|
||||
econName:{
|
||||
remote: {
|
||||
url: prefix + "/checkItemPriceBandUnique",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
"PriceBandName" : function() {
|
||||
return $.common.trim($("#PriceBandName").val());
|
||||
}
|
||||
},
|
||||
dataFilter: function(data, type) {
|
||||
return $.validate.unique(data);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
messages: {
|
||||
"PriceBandName": {
|
||||
remote: "商品价格带 名称已经存在"
|
||||
}
|
||||
},
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-itempriceband-add').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
$("#createBy").val([[${user.loginName}]]);
|
||||
$("#createByuserName").val([[${user.userName}]]);
|
||||
$("#createTime").val
|
||||
( $.common.dateFormat(new Date(),'yyyy-MM-dd HH:mm:ss') ) ; //获取日期与时间
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,152 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改商品价格带')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-itempriceband-edit" th:object="${itemPriceBand}">
|
||||
<input type="hidden" name="createBy" id="createBy" th:field="*{createBy}"/>
|
||||
<input type="hidden" name="updateBy" id="updateBy" th:field="*{updateBy}"/>
|
||||
|
||||
<input name="priceBandId" th:field="*{priceBandId}" type="hidden">
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="priceBandName" name="priceBandName" th:value="*{priceBandName}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label">单据号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="docNum" name="docNum" disabled th:value="*{docNum}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label">上限:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="priceBandUpper" name="priceBandUpper" th:value="*{priceBandUpper}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label">下限:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="priceBandLower" name="priceBandLower" th:value="*{priceBandLower}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">资料状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('platf_doc_statu')}">
|
||||
<input type="radio" th:id="${'status_' + dict.dictCode}" id="status" name="status" th:value="${dict.dictValue}" th:field="*{status}" required>
|
||||
<label th:for="${'status_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">备注:</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea name="remark" maxlength="500" class="form-control" rows="3" >[[*{remark}]]</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">制单人:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="createByuserName" name="createByuserName" disabled th:value="*{createByuserName}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">制单时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="createTime" name="createTime" disabled th:value="${#dates.format(itemPriceBand.createTime, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label">修改人:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="updateByuserName" name="updateByuserName" disabled th:value="*{updateByuserName}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label">修改时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="updateTime" name="updateTime" disabled th:value="${#dates.format(itemPriceBand.updateTime, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "platform/itempriceband";
|
||||
$("#form-itempriceband-edit").validate({
|
||||
onkeyup: false,
|
||||
rules:{
|
||||
econName:{
|
||||
remote: {
|
||||
url: prefix + "/checkItemPriceBandUnique",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
"PriceBandName" : function() {
|
||||
return $.common.trim($("#PriceBandName").val());
|
||||
}
|
||||
},
|
||||
dataFilter: function(data, type) {
|
||||
return $.validate.unique(data);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
messages: {
|
||||
"PriceBandName": {
|
||||
remote: "商品价格带 名称已经存在"
|
||||
}
|
||||
},
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-itempriceband-edit').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,138 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('商品价格带列表')" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
<label>名称:</label>
|
||||
<input type="text" name="priceBandName"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>资料状态:</label>
|
||||
<select name="status" th:with="type=${@dict.getType('platf_doc_statu')}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="platform:itempriceband:add">
|
||||
<i class="fa fa-plus"></i> 添加
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="operateEdit()" shiro:hasPermission="platform:itempriceband:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="platform:itempriceband:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="platform:itempriceband:export">
|
||||
<i class="fa fa-download"></i> 导出
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('platform:itempriceband:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('platform:itempriceband:remove')}]];
|
||||
var statusDatas = [[${@dict.getType('platf_doc_statu')}]];
|
||||
var prefix = ctx + "platform/itempriceband";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "商品价格带",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'priceBandId',
|
||||
title: '主键',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'priceBandName',
|
||||
title: '名称'
|
||||
},
|
||||
{
|
||||
field: 'docNum',
|
||||
title: '单据号'
|
||||
},
|
||||
{
|
||||
field: 'priceBandUpper',
|
||||
title: '上限'
|
||||
},
|
||||
{
|
||||
field: 'priceBandLower',
|
||||
title: '下限'
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '资料状态',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(statusDatas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'remark',
|
||||
title: '备注'
|
||||
},
|
||||
{
|
||||
field: 'createByuserName',
|
||||
title: '制单人'
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
title: '制单时间'
|
||||
},
|
||||
{
|
||||
field: 'updateByuserName',
|
||||
title: '修改人'
|
||||
},
|
||||
{
|
||||
field: 'updateTime',
|
||||
title: '修改时间'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.priceBandId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.priceBandId + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
|
||||
function operateEdit(){
|
||||
$.operate.edit(''+ $.table.selectColumns("priceBandId") +'')
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,178 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增购货用户类型')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-purchusertype-add">
|
||||
<input type="hidden" name="createBy" id="createBy" />
|
||||
<input type="hidden" name="updateBy" id="updateBy" />
|
||||
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="purchTypeName" name="purchTypeName" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">上级类型:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="treeId" name="parentId" type="hidden" th:value="${purchUserType?.purchTypeId}"/>
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" onclick="selectPurchusertypeTree()" id="treeName" readonly="true" th:value="${purchUserType?.purchTypeName}" required>
|
||||
<span class="input-group-addon"><i class="fa fa-search"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label">单据号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="docNum" name="docNum" class="form-control" readonly="readonly" type="text">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">资料状态 0有效 1无效:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('platf_doc_statu')}">
|
||||
<input type="radio" th:id="${'status_' + dict.dictCode}" id="status" name="status" th:value="${dict.dictValue}" th:checked="${dict.default}" required>
|
||||
<label th:for="${'status_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">备注:</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea id="remark" name="remark" maxlength="500" class="form-control" rows="3" ></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">制单人:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="createByuserName" name="createByuserName" class="form-control" readonly="readonly" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">制单时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="createTime" name="createTime" class="form-control" readonly="readonly" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label">修改人:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="updateByuserName" name="updateByuserName" class="form-control" readonly="readonly" type="text">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label">修改时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="updateTime" name="updateTime" class="form-control" readonly="readonly" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "platform/purchusertype"
|
||||
|
||||
$("#form-purchusertype-add").validate({
|
||||
onkeyup: false,
|
||||
rules:{
|
||||
econName:{
|
||||
remote: {
|
||||
url: prefix + "/checkPurchUserTypeUnique",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
"PurchTypeName" : function() {
|
||||
return $.common.trim($("#PurchTypeName").val());
|
||||
}
|
||||
},
|
||||
dataFilter: function(data, type) {
|
||||
return $.validate.unique(data);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
messages: {
|
||||
"PurchTypeName": {
|
||||
remote: "购货用户类型 名称已经存在"
|
||||
}
|
||||
},
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-purchusertype-add').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
/*购货用户类型-新增-选择父部门树*/
|
||||
function selectPurchusertypeTree() {
|
||||
var options = {
|
||||
title: '购货用户类型选择',
|
||||
width: "380",
|
||||
url: prefix + "/selectPurchusertypeTree/" + $("#treeId").val(),
|
||||
callBack: doSubmit
|
||||
};
|
||||
$.modal.openOptions(options);
|
||||
}
|
||||
|
||||
function doSubmit(index, layero){
|
||||
var body = layer.getChildFrame('body', index);
|
||||
$("#treeId").val(body.find('#treeId').val());
|
||||
$("#treeName").val(body.find('#treeName').val());
|
||||
layer.close(index);
|
||||
}
|
||||
|
||||
$("#createBy").val([[${user.loginName}]]);
|
||||
$("#createByuserName").val([[${user.userName}]]);
|
||||
$("#createTime").val
|
||||
( $.common.dateFormat(new Date(),'yyyy-MM-dd HH:mm:ss') ) ; //获取日期与时间
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,182 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改购货用户类型')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-purchusertype-edit" th:object="${purchUserType}">
|
||||
<input type="hidden" name="createBy" id="createBy" th:field="*{createBy}"/>
|
||||
<input type="hidden" name="updateBy" id="updateBy" th:field="*{updateBy}"/>
|
||||
|
||||
<input name="purchTypeId" th:field="*{purchTypeId}" type="hidden">
|
||||
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="purchTypeName" name="purchTypeName" th:value="*{purchTypeName}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">上级类型:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="treeId" name="parentId" type="hidden" th:field="*{parentId}" />
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" onclick="selectPurchusertypeTree()" id="treeName" readonly="true" th:field="*{parentName}" required>
|
||||
<span class="input-group-addon"><i class="fa fa-search"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label">单据号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="docNum" name="docNum" disabled th:value="*{docNum}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">资料状态 0有效 1无效:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('platf_doc_statu')}">
|
||||
<input type="radio" th:id="${'status_' + dict.dictCode}" id="status" name="status" th:value="${dict.dictValue}" th:field="*{status}" required>
|
||||
<label th:for="${'status_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">备注:</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea id="remark" name="remark" maxlength="500" class="form-control" rows="3" >[[*{remark}]]</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">制单人:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="createByuserName" name="createByuserName" disabled th:value="*{createByuserName}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">制单时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="createTime" name="createTime" disabled th:value="${#dates.format(purchUserType.createTime, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label">修改人:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="updateByuserName" name="updateByuserName" disabled th:value="*{updateByuserName}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label">修改时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="updateTime" name="updateTime" disabled th:value="${#dates.format(purchUserType.updateTime, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "platform/purchusertype";
|
||||
$("#form-purchusertype-edit").validate({
|
||||
onkeyup: false,
|
||||
rules:{
|
||||
econName:{
|
||||
remote: {
|
||||
url: prefix + "/checkPurchUserTypeUnique",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
"PurchTypeName" : function() {
|
||||
return $.common.trim($("#PurchTypeName").val());
|
||||
}
|
||||
},
|
||||
dataFilter: function(data, type) {
|
||||
return $.validate.unique(data);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
messages: {
|
||||
"PurchTypeName": {
|
||||
remote: "购货用户类型 名称已经存在"
|
||||
}
|
||||
},
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-purchusertype-edit').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
/*购货用户类型-新增-选择父部门树*/
|
||||
function selectPurchusertypeTree() {
|
||||
var options = {
|
||||
title: '购货用户类型选择',
|
||||
width: "380",
|
||||
url: prefix + "/selectPurchusertypeTree/" + $("#treeId").val(),
|
||||
callBack: doSubmit
|
||||
};
|
||||
$.modal.openOptions(options);
|
||||
}
|
||||
|
||||
function doSubmit(index, layero){
|
||||
var body = layer.getChildFrame('body', index);
|
||||
$("#treeId").val(body.find('#treeId').val());
|
||||
$("#treeName").val(body.find('#treeName').val());
|
||||
layer.close(index);
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,152 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('购货用户类型列表')" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
<label>名称:</label>
|
||||
<input type="text" name="purchTypeName"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>上级类型:</label>
|
||||
<input type="text" name="parentId"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>资料状态 0有效 1无效:</label>
|
||||
<select name="status" th:with="type=${@dict.getType('platf_doc_statu')}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.treeTable.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="platform:purchusertype:add">
|
||||
<i class="fa fa-plus"></i> 新增
|
||||
</a>
|
||||
<a class="btn btn-primary" onclick="$.operate.edit()" shiro:hasPermission="platform:purchusertype:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-info" id="expandAllBtn">
|
||||
<i class="fa fa-exchange"></i> 展开/折叠
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-tree-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var addFlag = [[${@permission.hasPermi('platform:purchusertype:add')}]];
|
||||
var editFlag = [[${@permission.hasPermi('platform:purchusertype:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('platform:purchusertype:remove')}]];
|
||||
var statusDatas = [[${@dict.getType('platf_doc_statu')}]];
|
||||
var prefix = ctx + "platform/purchusertype";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
code: "purchTypeId",
|
||||
parentCode: "parentId",
|
||||
expandColumn: "1",
|
||||
uniqueId: "purchTypeId",
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add/{id}",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove/{id}",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "购货用户类型",
|
||||
columns: [{
|
||||
field: 'selectItem',
|
||||
radio: true
|
||||
},
|
||||
{
|
||||
field: 'purchTypeName',
|
||||
title: '名称',
|
||||
align: 'left'
|
||||
},
|
||||
{
|
||||
field: 'parentId',
|
||||
title: '上级类型',
|
||||
align: 'left'
|
||||
},
|
||||
{
|
||||
field: 'docNum',
|
||||
title: '单据号',
|
||||
align: 'left'
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '资料状态 0有效 1无效',
|
||||
align: 'left',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(statusDatas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'remark',
|
||||
title: '备注',
|
||||
align: 'left'
|
||||
},
|
||||
{
|
||||
field: 'createByuserName',
|
||||
title: '制单人',
|
||||
align: 'left'
|
||||
},
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '制单人ID',
|
||||
align: 'left'
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
title: '制单时间',
|
||||
align: 'left'
|
||||
},
|
||||
{
|
||||
field: 'updateByuserName',
|
||||
title: '修改人',
|
||||
align: 'left'
|
||||
},
|
||||
{
|
||||
field: 'updateBy',
|
||||
title: '修改人ID',
|
||||
align: 'left'
|
||||
},
|
||||
{
|
||||
field: 'updateTime',
|
||||
title: '修改时间',
|
||||
align: 'left'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
align: 'left',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.purchTypeId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-info btn-xs ' + addFlag + '" href="javascript:void(0)" onclick="$.operate.add(\'' + row.purchTypeId + '\')"><i class="fa fa-plus"></i>新增</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.purchTypeId + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.treeTable.init(options);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('购货用户类型树选择')" />
|
||||
<th:block th:include="include :: ztree-css" />
|
||||
</head>
|
||||
<style>
|
||||
body{height:auto;font-family: "Microsoft YaHei";}
|
||||
button{font-family: "SimSun","Helvetica Neue",Helvetica,Arial;}
|
||||
</style>
|
||||
<body class="hold-transition box box-main">
|
||||
<input id="treeId" name="treeId" type="hidden" th:value="${purchUserType?.purchTypeId}"/>
|
||||
<input id="treeName" name="treeName" type="hidden" th:value="${purchUserType?.purchTypeName}"/>
|
||||
<div class="wrapper"><div class="treeShowHideButton" onclick="$.tree.toggleSearch();">
|
||||
<label id="btnShow" title="显示搜索" style="display:none;">︾</label>
|
||||
<label id="btnHide" title="隐藏搜索">︽</label>
|
||||
</div>
|
||||
<div class="treeSearchInput" id="search">
|
||||
<label for="keyword">关键字:</label><input type="text" class="empty" id="keyword" maxlength="50">
|
||||
<button class="btn" id="btn" onclick="$.tree.searchNode()"> 搜索 </button>
|
||||
</div>
|
||||
<div class="treeExpandCollapse">
|
||||
<a href="#" onclick="$.tree.expand()">展开</a> /
|
||||
<a href="#" onclick="$.tree.collapse()">折叠</a>
|
||||
</div>
|
||||
<div id="tree" class="ztree treeselect"></div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: ztree-js" />
|
||||
<script th:inline="javascript">
|
||||
$(function() {
|
||||
var url = ctx + "platform/purchusertype/treeData";
|
||||
var options = {
|
||||
url: url,
|
||||
expandLevel: 2,
|
||||
onClick : zOnClick
|
||||
};
|
||||
$.tree.init(options);
|
||||
});
|
||||
|
||||
function zOnClick(event, treeId, treeNode) {
|
||||
var treeId = treeNode.id;
|
||||
var treeName = treeNode.name;
|
||||
$("#treeId").val(treeId);
|
||||
$("#treeName").val(treeName);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,153 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增地区资料')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-regional-add">
|
||||
<input type="hidden" name="createBy" id="createBy" />
|
||||
<input type="hidden" name="updateBy" id="updateBy" />
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="regionalName" name="regionalName" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<label class="col-sm-4 control-label is-required">上级区域:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
<input id="treeId" name="parentId" type="hidden" th:value="${regional?.regionalId}"/>
|
||||
<input class="form-control" type="text" onclick="selectRegionalTree()" id="treeName" th:value="${regional?.regionalName}" required>
|
||||
<span class="input-group-addon"><i class="fa fa-search"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label">单据号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="docNum" name="docNum" class="form-control" readonly="readonly" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">资料状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('platf_doc_statu')}">
|
||||
<input type="radio" th:id="${'status_' + dict.dictCode}" id="status" name="status" th:value="${dict.dictValue}" th:checked="${dict.default}" required>
|
||||
<label th:for="${'status_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">备注:</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea id="remark" name="remark" maxlength="500" class="form-control" rows="3" ></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">制单人:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="createByuserName" name="createByuserName" class="form-control" readonly="readonly" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">制单时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="createTime" name="createTime" class="form-control" readonly="readonly" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label">修改人:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="updateByuserName" name="updateByuserName" class="form-control" readonly="readonly" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label">修改时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="updateTime" name="updateTime" class="form-control" readonly="readonly" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "platform/regional"
|
||||
|
||||
$("#form-regional-add").validate({
|
||||
onkeyup: false,
|
||||
rules:{
|
||||
econName:{
|
||||
remote: {
|
||||
url: prefix + "/checkRegionalUnique",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
"RegionalName" : function() {
|
||||
return $.common.trim($("#RegionalName").val());
|
||||
}
|
||||
},
|
||||
dataFilter: function(data, type) {
|
||||
return $.validate.unique(data);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
messages: {
|
||||
"RegionalName": {
|
||||
remote: "地区资料 名称已经存在"
|
||||
}
|
||||
},
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-regional-add').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
/*地区资料-新增-选择父部门树*/
|
||||
function selectRegionalTree() {
|
||||
var options = {
|
||||
title: '地区资料选择',
|
||||
width: "380",
|
||||
url: prefix + "/selectRegionalTree/" + $("#treeId").val(),
|
||||
callBack: doSubmit
|
||||
};
|
||||
$.modal.openOptions(options);
|
||||
}
|
||||
|
||||
function doSubmit(index, layero){
|
||||
var body = layer.getChildFrame('body', index);
|
||||
$("#treeId").val(body.find('#treeId').val());
|
||||
$("#treeName").val(body.find('#treeName').val());
|
||||
layer.close(index);
|
||||
}
|
||||
|
||||
$("#createBy").val([[${user.loginName}]]);
|
||||
$("#createByuserName").val([[${user.userName}]]);
|
||||
$("#createTime").val
|
||||
( $.common.dateFormat(new Date(),'yyyy-MM-dd HH:mm:ss') ) ; //获取日期与时间
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,165 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改地区资料')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-regional-edit" th:object="${regional}">
|
||||
<input type="hidden" name="createBy" id="createBy" th:field="*{createBy}"/>
|
||||
<input type="hidden" name="updateBy" id="updateBy" th:field="*{updateBy}"/>
|
||||
|
||||
<input name="regionalId" th:field="*{regionalId}" type="hidden">
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="regionalName" name="regionalName" th:value="*{regionalName}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">上级区域:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
<input id="treeId" name="parentId" type="hidden" th:field="*{parentId}" />
|
||||
<input class="form-control" type="text" onclick="selectRegionalTree()" id="treeName" readonly="true" th:field="*{parentName}" required>
|
||||
<span class="input-group-addon"><i class="fa fa-search"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label">单据号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="docNum" name="docNum" disabled th:value="*{docNum}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">资料状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('platf_doc_statu')}">
|
||||
<input type="radio" th:id="${'status_' + dict.dictCode}" id="status" name="status" th:value="${dict.dictValue}" th:field="*{status}" required>
|
||||
<label th:for="${'status_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">备注:</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea name="remark" maxlength="500" class="form-control" rows="3" >[[*{remark}]]</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">制单人:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="createByuserName" name="createByuserName" disabled th:value="*{createByuserName}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">制单时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="createTime" name="createTime" disabled th:value="${#dates.format(regional.createTime, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label">修改人:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="updateByuserName" name="updateByuserName" disabled th:value="*{updateByuserName}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label">修改时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="updateTime" name="updateTime" disabled th:value="${#dates.format(regional.updateTime, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "platform/regional";
|
||||
$("#form-regional-edit").validate({
|
||||
onkeyup: false,
|
||||
rules:{
|
||||
econName:{
|
||||
remote: {
|
||||
url: prefix + "/checkRegionalUnique",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
"RegionalName" : function() {
|
||||
return $.common.trim($("#RegionalName").val());
|
||||
}
|
||||
},
|
||||
dataFilter: function(data, type) {
|
||||
return $.validate.unique(data);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
messages: {
|
||||
"RegionalName": {
|
||||
remote: "地区资料 名称已经存在"
|
||||
}
|
||||
},
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-regional-edit').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
/*地区资料-新增-选择父部门树*/
|
||||
function selectRegionalTree() {
|
||||
var options = {
|
||||
title: '地区资料选择',
|
||||
width: "380",
|
||||
url: prefix + "/selectRegionalTree/" + $("#treeId").val(),
|
||||
callBack: doSubmit
|
||||
};
|
||||
$.modal.openOptions(options);
|
||||
}
|
||||
|
||||
function doSubmit(index, layero){
|
||||
var body = layer.getChildFrame('body', index);
|
||||
$("#treeId").val(body.find('#treeId').val());
|
||||
$("#treeName").val(body.find('#treeName').val());
|
||||
layer.close(index);
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,161 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('地区资料列表')" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
<label>名称:</label>
|
||||
<input type="text" name="regionalName"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>上级区域:</label>
|
||||
<input type="text" name="parentId"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>祖级列表:</label>
|
||||
<input type="text" name="ancestors"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>资料状态:</label>
|
||||
<select name="status" th:with="type=${@dict.getType('platf_doc_statu')}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.treeTable.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="platform:regional:add">
|
||||
<i class="fa fa-plus"></i> 新增
|
||||
</a>
|
||||
<a class="btn btn-primary" onclick="$.operate.edit()" shiro:hasPermission="platform:regional:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-info" id="expandAllBtn">
|
||||
<i class="fa fa-exchange"></i> 展开/折叠
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-tree-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var addFlag = [[${@permission.hasPermi('platform:regional:add')}]];
|
||||
var editFlag = [[${@permission.hasPermi('platform:regional:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('platform:regional:remove')}]];
|
||||
var statusDatas = [[${@dict.getType('platf_doc_statu')}]];
|
||||
var prefix = ctx + "platform/regional";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
code: "regionalId",
|
||||
parentCode: "parentId",
|
||||
expandColumn: "1",
|
||||
uniqueId: "regionalId",
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add/{id}",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove/{id}",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "地区资料",
|
||||
columns: [{
|
||||
field: 'selectItem',
|
||||
radio: true
|
||||
},
|
||||
{
|
||||
field: 'regionalName',
|
||||
title: '名称',
|
||||
align: 'left'
|
||||
},
|
||||
{
|
||||
field: 'parentId',
|
||||
title: '上级区域',
|
||||
align: 'left'
|
||||
},
|
||||
{
|
||||
field: 'ancestors',
|
||||
title: '祖级列表',
|
||||
align: 'left'
|
||||
},
|
||||
{
|
||||
field: 'docNum',
|
||||
title: '单据号',
|
||||
align: 'left'
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '资料状态',
|
||||
align: 'left',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(statusDatas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'remark',
|
||||
title: '备注',
|
||||
align: 'left'
|
||||
},
|
||||
{
|
||||
field: 'createByuserName',
|
||||
title: '制单人',
|
||||
align: 'left'
|
||||
},
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '制单人ID',
|
||||
align: 'left'
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
title: '制单时间',
|
||||
align: 'left'
|
||||
},
|
||||
{
|
||||
field: 'updateByuserName',
|
||||
title: '修改人',
|
||||
align: 'left'
|
||||
},
|
||||
{
|
||||
field: 'updateBy',
|
||||
title: '修改人ID',
|
||||
align: 'left'
|
||||
},
|
||||
{
|
||||
field: 'updateTime',
|
||||
title: '修改时间',
|
||||
align: 'left'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
align: 'left',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.regionalId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-info btn-xs ' + addFlag + '" href="javascript:void(0)" onclick="$.operate.add(\'' + row.regionalId + '\')"><i class="fa fa-plus"></i>新增</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.regionalId + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.treeTable.init(options);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('地区资料树选择')" />
|
||||
<th:block th:include="include :: ztree-css" />
|
||||
</head>
|
||||
<style>
|
||||
body{height:auto;font-family: "Microsoft YaHei";}
|
||||
button{font-family: "SimSun","Helvetica Neue",Helvetica,Arial;}
|
||||
</style>
|
||||
<body class="hold-transition box box-main">
|
||||
<input id="treeId" name="treeId" type="hidden" th:value="${regional?.regionalId}"/>
|
||||
<input id="treeName" name="treeName" type="hidden" th:value="${regional?.regionalName}"/>
|
||||
<div class="wrapper"><div class="treeShowHideButton" onclick="$.tree.toggleSearch();">
|
||||
<label id="btnShow" title="显示搜索" style="display:none;">︾</label>
|
||||
<label id="btnHide" title="隐藏搜索">︽</label>
|
||||
</div>
|
||||
<div class="treeSearchInput" id="search">
|
||||
<label for="keyword">关键字:</label><input type="text" class="empty" id="keyword" maxlength="50">
|
||||
<button class="btn" id="btn" onclick="$.tree.searchNode()"> 搜索 </button>
|
||||
</div>
|
||||
<div class="treeExpandCollapse">
|
||||
<a href="#" onclick="$.tree.expand()">展开</a> /
|
||||
<a href="#" onclick="$.tree.collapse()">折叠</a>
|
||||
</div>
|
||||
<div id="tree" class="ztree treeselect"></div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: ztree-js" />
|
||||
<script th:inline="javascript">
|
||||
$(function() {
|
||||
var url = ctx + "platform/regional/treeData";
|
||||
var options = {
|
||||
url: url,
|
||||
expandLevel: 2,
|
||||
onClick : zOnClick
|
||||
};
|
||||
$.tree.init(options);
|
||||
});
|
||||
|
||||
function zOnClick(event, treeId, treeNode) {
|
||||
var treeId = treeNode.id;
|
||||
var treeName = treeNode.name;
|
||||
$("#treeId").val(treeId);
|
||||
$("#treeName").val(treeName);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,178 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增供应链层级')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-supplychainhier-add">
|
||||
<input type="hidden" name="createBy" id="createBy" />
|
||||
<input type="hidden" name="updateBy" id="updateBy" />
|
||||
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="supplyChainName" name="supplyChainName" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">上级类型:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="treeId" name="parentId" type="hidden" th:value="${supplyChainHier?.supplyChainId}"/>
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" onclick="selectSupplychainhierTree()" id="treeName" readonly="true" th:value="${supplyChainHier?.supplyChainName}" required>
|
||||
<span class="input-group-addon"><i class="fa fa-search"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label">单据号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="docNum" name="docNum" class="form-control" readonly="readonly" type="text">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">资料状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('platf_doc_statu')}">
|
||||
<input type="radio" th:id="${'status_' + dict.dictCode}" id="status" name="status" th:value="${dict.dictValue}" th:checked="${dict.default}" required>
|
||||
<label th:for="${'status_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">备注:</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea id="remark" name="remark" maxlength="500" class="form-control" rows="3" ></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">制单人:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="createByuserName" name="createByuserName" class="form-control" readonly="readonly" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">制单时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="createTime" name="createTime" class="form-control" readonly="readonly" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label">修改人:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="updateByuserName" name="updateByuserName" class="form-control" readonly="readonly" type="text">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label">修改时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="updateTime" name="updateTime" class="form-control" readonly="readonly" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "platform/supplychainhier"
|
||||
|
||||
$("#form-supplychainhier-add").validate({
|
||||
onkeyup: false,
|
||||
rules:{
|
||||
econName:{
|
||||
remote: {
|
||||
url: prefix + "/checkSupplyChainHierUnique",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
"SupplyChainName" : function() {
|
||||
return $.common.trim($("#SupplyChainName").val());
|
||||
}
|
||||
},
|
||||
dataFilter: function(data, type) {
|
||||
return $.validate.unique(data);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
messages: {
|
||||
"SupplyChainName": {
|
||||
remote: "供应链层级 名称已经存在"
|
||||
}
|
||||
},
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-supplychainhier-add').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
/*供应链层级-新增-选择父部门树*/
|
||||
function selectSupplychainhierTree() {
|
||||
var options = {
|
||||
title: '供应链层级选择',
|
||||
width: "380",
|
||||
url: prefix + "/selectSupplychainhierTree/" + $("#treeId").val(),
|
||||
callBack: doSubmit
|
||||
};
|
||||
$.modal.openOptions(options);
|
||||
}
|
||||
|
||||
function doSubmit(index, layero){
|
||||
var body = layer.getChildFrame('body', index);
|
||||
$("#treeId").val(body.find('#treeId').val());
|
||||
$("#treeName").val(body.find('#treeName').val());
|
||||
layer.close(index);
|
||||
}
|
||||
|
||||
$("#createBy").val([[${user.loginName}]]);
|
||||
$("#createByuserName").val([[${user.userName}]]);
|
||||
$("#createTime").val
|
||||
( $.common.dateFormat(new Date(),'yyyy-MM-dd HH:mm:ss') ) ; //获取日期与时间
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,182 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改供应链层级')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-supplychainhier-edit" th:object="${supplyChainHier}">
|
||||
<input type="hidden" name="createBy" id="createBy" th:field="*{createBy}"/>
|
||||
<input type="hidden" name="updateBy" id="updateBy" th:field="*{updateBy}"/>
|
||||
|
||||
<input name="supplyChainId" th:field="*{supplyChainId}" type="hidden">
|
||||
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="supplyChainName" name="supplyChainName" th:value="*{supplyChainName}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">上级类型:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="treeId" name="parentId" type="hidden" th:field="*{parentId}" />
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" onclick="selectSupplychainhierTree()" id="treeName" readonly="true" th:field="*{parentName}" required>
|
||||
<span class="input-group-addon"><i class="fa fa-search"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label">单据号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="docNum" name="docNum" disabled th:value="*{docNum}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">资料状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('platf_doc_statu')}">
|
||||
<input type="radio" th:id="${'status_' + dict.dictCode}" id="status" name="status" th:value="${dict.dictValue}" th:field="*{status}" required>
|
||||
<label th:for="${'status_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">备注:</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea id="remark" name="remark" maxlength="500" class="form-control" rows="3" >[[*{remark}]]</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">制单人:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="createByuserName" name="createByuserName" disabled th:value="*{createByuserName}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label is-required">制单时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="createTime" name="createTime" disabled th:value="${#dates.format(supplyChainHier.createTime, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label">修改人:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="updateByuserName" name="updateByuserName" disabled th:value="*{updateByuserName}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label">修改时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="updateTime" name="updateTime" disabled th:value="${#dates.format(supplyChainHier.updateTime, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "platform/supplychainhier";
|
||||
$("#form-supplychainhier-edit").validate({
|
||||
onkeyup: false,
|
||||
rules:{
|
||||
econName:{
|
||||
remote: {
|
||||
url: prefix + "/checkSupplyChainHierUnique",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
"SupplyChainName" : function() {
|
||||
return $.common.trim($("#SupplyChainName").val());
|
||||
}
|
||||
},
|
||||
dataFilter: function(data, type) {
|
||||
return $.validate.unique(data);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
messages: {
|
||||
"SupplyChainName": {
|
||||
remote: "供应链层级 名称已经存在"
|
||||
}
|
||||
},
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-supplychainhier-edit').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
/*供应链层级-新增-选择父部门树*/
|
||||
function selectSupplychainhierTree() {
|
||||
var options = {
|
||||
title: '供应链层级选择',
|
||||
width: "380",
|
||||
url: prefix + "/selectSupplychainhierTree/" + $("#treeId").val(),
|
||||
callBack: doSubmit
|
||||
};
|
||||
$.modal.openOptions(options);
|
||||
}
|
||||
|
||||
function doSubmit(index, layero){
|
||||
var body = layer.getChildFrame('body', index);
|
||||
$("#treeId").val(body.find('#treeId').val());
|
||||
$("#treeName").val(body.find('#treeName').val());
|
||||
layer.close(index);
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,152 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('供应链层级列表')" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
<label>名称:</label>
|
||||
<input type="text" name="supplyChainName"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>上级类型:</label>
|
||||
<input type="text" name="parentId"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>资料状态:</label>
|
||||
<select name="status" th:with="type=${@dict.getType('platf_doc_statu')}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.treeTable.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="platform:supplychainhier:add">
|
||||
<i class="fa fa-plus"></i> 新增
|
||||
</a>
|
||||
<a class="btn btn-primary" onclick="$.operate.edit()" shiro:hasPermission="platform:supplychainhier:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-info" id="expandAllBtn">
|
||||
<i class="fa fa-exchange"></i> 展开/折叠
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-tree-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var addFlag = [[${@permission.hasPermi('platform:supplychainhier:add')}]];
|
||||
var editFlag = [[${@permission.hasPermi('platform:supplychainhier:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('platform:supplychainhier:remove')}]];
|
||||
var statusDatas = [[${@dict.getType('platf_doc_statu')}]];
|
||||
var prefix = ctx + "platform/supplychainhier";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
code: "supplyChainId",
|
||||
parentCode: "parentId",
|
||||
expandColumn: "1",
|
||||
uniqueId: "supplyChainId",
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add/{id}",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove/{id}",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "供应链层级",
|
||||
columns: [{
|
||||
field: 'selectItem',
|
||||
radio: true
|
||||
},
|
||||
{
|
||||
field: 'supplyChainName',
|
||||
title: '名称',
|
||||
align: 'left'
|
||||
},
|
||||
{
|
||||
field: 'parentId',
|
||||
title: '上级类型',
|
||||
align: 'left'
|
||||
},
|
||||
{
|
||||
field: 'docNum',
|
||||
title: '单据号',
|
||||
align: 'left'
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '资料状态',
|
||||
align: 'left',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(statusDatas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'remark',
|
||||
title: '备注',
|
||||
align: 'left'
|
||||
},
|
||||
{
|
||||
field: 'createByuserName',
|
||||
title: '制单人',
|
||||
align: 'left'
|
||||
},
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '制单人ID',
|
||||
align: 'left'
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
title: '制单时间',
|
||||
align: 'left'
|
||||
},
|
||||
{
|
||||
field: 'updateByuserName',
|
||||
title: '修改人',
|
||||
align: 'left'
|
||||
},
|
||||
{
|
||||
field: 'updateBy',
|
||||
title: '修改人ID',
|
||||
align: 'left'
|
||||
},
|
||||
{
|
||||
field: 'updateTime',
|
||||
title: '修改时间',
|
||||
align: 'left'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
align: 'left',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.supplyChainId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-info btn-xs ' + addFlag + '" href="javascript:void(0)" onclick="$.operate.add(\'' + row.supplyChainId + '\')"><i class="fa fa-plus"></i>新增</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.supplyChainId + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.treeTable.init(options);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('供应链层级树选择')" />
|
||||
<th:block th:include="include :: ztree-css" />
|
||||
</head>
|
||||
<style>
|
||||
body{height:auto;font-family: "Microsoft YaHei";}
|
||||
button{font-family: "SimSun","Helvetica Neue",Helvetica,Arial;}
|
||||
</style>
|
||||
<body class="hold-transition box box-main">
|
||||
<input id="treeId" name="treeId" type="hidden" th:value="${supplyChainHier?.supplyChainId}"/>
|
||||
<input id="treeName" name="treeName" type="hidden" th:value="${supplyChainHier?.supplyChainName}"/>
|
||||
<div class="wrapper"><div class="treeShowHideButton" onclick="$.tree.toggleSearch();">
|
||||
<label id="btnShow" title="显示搜索" style="display:none;">︾</label>
|
||||
<label id="btnHide" title="隐藏搜索">︽</label>
|
||||
</div>
|
||||
<div class="treeSearchInput" id="search">
|
||||
<label for="keyword">关键字:</label><input type="text" class="empty" id="keyword" maxlength="50">
|
||||
<button class="btn" id="btn" onclick="$.tree.searchNode()"> 搜索 </button>
|
||||
</div>
|
||||
<div class="treeExpandCollapse">
|
||||
<a href="#" onclick="$.tree.expand()">展开</a> /
|
||||
<a href="#" onclick="$.tree.collapse()">折叠</a>
|
||||
</div>
|
||||
<div id="tree" class="ztree treeselect"></div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: ztree-js" />
|
||||
<script th:inline="javascript">
|
||||
$(function() {
|
||||
var url = ctx + "platform/supplychainhier/treeData";
|
||||
var options = {
|
||||
url: url,
|
||||
expandLevel: 2,
|
||||
onClick : zOnClick
|
||||
};
|
||||
$.tree.init(options);
|
||||
});
|
||||
|
||||
function zOnClick(event, treeId, treeNode) {
|
||||
var treeId = treeNode.id;
|
||||
var treeName = treeNode.name;
|
||||
$("#treeId").val(treeId);
|
||||
$("#treeName").val(treeName);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -66,6 +66,7 @@ public class VelocityUtils {
|
|||
|
||||
// 取出页面需要的字段ing
|
||||
List<GenTableColumn> tempcolumns = genTable.getColumns();
|
||||
List<GenTableColumn> tableLists = new ArrayList<GenTableColumn>();//定义一个list对象
|
||||
List<GenTableColumn> effectivecols = new ArrayList<GenTableColumn>();//定义一个list对象
|
||||
List<GenTableColumn> effectiveceditols = new ArrayList<GenTableColumn>();//定义一个list对象
|
||||
List<GenTableColumn> fieldcols = new ArrayList<GenTableColumn>();// 模板的变量 colums
|
||||
|
|
@ -106,8 +107,10 @@ public class VelocityUtils {
|
|||
fieldcols.add(tcolumn) ;
|
||||
|
||||
if (relevColumn.isInsert() && !relevColumn.isPk())
|
||||
if (relevColumn.isUsableColumn() || !relevColumn.isSuperColumn())
|
||||
if (relevColumn.isUsableColumn() || !relevColumn.isSuperColumn()) {
|
||||
tableLists.add(relevColumn);
|
||||
effectivecols.add(relevColumn);
|
||||
}
|
||||
|
||||
if (relevColumn.isEdit() && !relevColumn.isPk())
|
||||
if (relevColumn.isUsableColumn() || !relevColumn.isSuperColumn())
|
||||
|
|
@ -117,13 +120,18 @@ public class VelocityUtils {
|
|||
|
||||
}
|
||||
|
||||
} else if (tcolumn.isPk() ) {
|
||||
tableLists.add(tcolumn);
|
||||
fieldcols.add(tcolumn);
|
||||
} else {
|
||||
|
||||
fieldcols.add(tcolumn) ;
|
||||
fieldcols.add(tcolumn);
|
||||
|
||||
if (tcolumn.isInsert() && !tcolumn.isPk())
|
||||
if (tcolumn.isUsableColumn() || !tcolumn.isSuperColumn())
|
||||
if (tcolumn.isUsableColumn() || !tcolumn.isSuperColumn()) {
|
||||
tableLists.add(tcolumn);
|
||||
effectivecols.add(tcolumn);
|
||||
}
|
||||
|
||||
if (tcolumn.isEdit() && !tcolumn.isPk())
|
||||
if (tcolumn.isUsableColumn() || !tcolumn.isSuperColumn())
|
||||
|
|
@ -141,6 +149,7 @@ public class VelocityUtils {
|
|||
|
||||
//
|
||||
velocityContext.put("conctrolmodelsmap", conctrolmodelsmap);
|
||||
velocityContext.put("tableLists", tableLists);
|
||||
velocityContext.put("effectivecols", effectivecols);
|
||||
velocityContext.put("effectiveeditcols", effectiveceditols);
|
||||
// 在界面上 要隐藏的ID
|
||||
|
|
@ -174,6 +183,16 @@ public class VelocityUtils {
|
|||
context.put("parentMenuId", parentMenuId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 首字母大写
|
||||
* 例如:user_name->userName
|
||||
*/
|
||||
public static String captureName(String name) {
|
||||
char[] cs=name.toCharArray();
|
||||
cs[0]-=32;
|
||||
return String.valueOf(cs);
|
||||
}
|
||||
|
||||
public static void setTreeVelocityContext(VelocityContext context, GenTable genTable) {
|
||||
String options = genTable.getOptions();
|
||||
JSONObject paramsObj = JSONObject.parseObject(options);
|
||||
|
|
@ -184,6 +203,12 @@ public class VelocityUtils {
|
|||
context.put("treeCode", treeCode);
|
||||
context.put("treeParentCode", treeParentCode);
|
||||
context.put("treeName", treeName);
|
||||
|
||||
// 首字母大写 为 velocity 模板中的 getter setter 准备
|
||||
context.put("captTreeCode", captureName(treeCode) );
|
||||
context.put("captTreeParentCode", captureName(treeParentCode) );
|
||||
context.put("captTreeName", captureName(treeName) );
|
||||
|
||||
context.put("expandColumn", getExpandColumn(genTable));
|
||||
if (paramsObj.containsKey(GenConstants.TREE_PARENT_CODE)) {
|
||||
context.put("tree_parent_code", paramsObj.getString(GenConstants.TREE_PARENT_CODE));
|
||||
|
|
|
|||
|
|
@ -39,19 +39,17 @@
|
|||
#foreach($column in $effectivecols)
|
||||
#if($column.insert && !$column.pk)
|
||||
#if(($column.usableColumn) || (!$column.superColumn))
|
||||
#set($parentheseIndex=$column.columnComment.indexOf("("))
|
||||
#if($parentheseIndex != -1)
|
||||
#set($comment=$column.columnComment.substring(0, $parentheseIndex))
|
||||
#else
|
||||
#set($comment=$column.columnComment)
|
||||
#end
|
||||
#set($field=$column.javaField)
|
||||
#set($dictType=$column.dictType)
|
||||
#set($cumvar=$cumvar+1)
|
||||
#set($parentheseIndex=$column.columnComment.indexOf("("))
|
||||
#if($parentheseIndex != -1)
|
||||
#set($comment=$column.columnComment.substring(0, $parentheseIndex))
|
||||
#else
|
||||
#set($comment=$column.columnComment)
|
||||
#end
|
||||
#set($field=$column.javaField)
|
||||
#set($dictType=$column.dictType)
|
||||
#set($cumvar=$cumvar+1)
|
||||
|
||||
#if($column.htmlType == "textarea")
|
||||
#if($cumvar%2==0)
|
||||
</div>
|
||||
#end
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group">
|
||||
|
|
@ -62,42 +60,21 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
#set($cumvar=$cumvar+1)
|
||||
#else
|
||||
#if($cumvar%2==1)
|
||||
<div class="row mt10">
|
||||
#end
|
||||
#parse("\vm\html\col2\formedittpl.vm")
|
||||
#if($cumvar%2==0 || ($cumvar>=$colcount))
|
||||
#if($cumvar%2==0)
|
||||
</div>
|
||||
#end
|
||||
#end
|
||||
#end
|
||||
#end
|
||||
|
||||
#end
|
||||
|
||||
#*
|
||||
<div class="row"> ## col-md-6
|
||||
#foreach($column in $effectivecols)
|
||||
#set($field=$column.javaField)
|
||||
##if($column.insert && !$column.pk)
|
||||
##if(($column.usableColumn) || (!$column.superColumn))
|
||||
#set($parentheseIndex=$column.columnComment.indexOf("("))
|
||||
#if($parentheseIndex != -1)
|
||||
#set($comment=$column.columnComment.substring(0, $parentheseIndex))
|
||||
#else
|
||||
#set($comment=$column.columnComment)
|
||||
#end
|
||||
#set($dictType=$column.dictType)
|
||||
|
||||
##set($cumvar=$cumvar+1)
|
||||
##if($cumvar%2==1)
|
||||
#parse("vm/html/formtpl.vm")
|
||||
##end
|
||||
|
||||
##end
|
||||
##end
|
||||
#end
|
||||
*#
|
||||
#end
|
||||
#end
|
||||
#end
|
||||
|
||||
#if($table.sub)
|
||||
<h4 class="form-header h4">${subTable.functionName}信息</h4>
|
||||
|
|
@ -203,7 +180,6 @@
|
|||
#end
|
||||
#foreach($column in $effectivecols)
|
||||
#if($column.edit && !$column.superColumn && !$column.pk && $column.htmlType == "summernote")
|
||||
|
||||
$(function() {
|
||||
$('.summernote').summernote({
|
||||
lang: 'zh-CN',
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
<form class="form-horizontal m" id="form-${businessName}-edit" th:object="${${className}}">
|
||||
#if( $hiddenleftjoinfiledcols.size() > 0 )
|
||||
#foreach($column in $hiddenleftjoinfiledcols)
|
||||
<input type="hidden" name="${column.javaField}" id="${column.javaField}" />
|
||||
<input type="hidden" name="${column.javaField}" id="${column.javaField}" th:field="*{${column.javaField}}"/>
|
||||
#end
|
||||
#end
|
||||
|
||||
|
|
@ -50,33 +50,34 @@
|
|||
#set($dictType=$column.dictType)
|
||||
|
||||
#set($cumvar=$cumvar+1)
|
||||
|
||||
#if($column.htmlType == "textarea")
|
||||
#if($cumvar%2==0)
|
||||
</div>
|
||||
#end
|
||||
<div class="row mt10">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label#if($column.required) is-required#end">${comment}:</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea name="${field}" maxlength="500" class="form-control" rows="3" #if($column.required) required#end>[[*{${field}}]]</textarea>
|
||||
<textarea id="${field}" name="${field}" maxlength="500" class="form-control" rows="3" #if($column.required) required#end>[[*{${field}}]]</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
#set($cumvar=$cumvar+1)
|
||||
#else
|
||||
#if($cumvar%2==1)
|
||||
#if($cumvar%2==1)
|
||||
<div class="row mt10">
|
||||
#end
|
||||
#parse("\vm\html\col2\editfiledtpl.vm")
|
||||
#if($cumvar%2==0 || ($cumvar>=$colcount))
|
||||
#end
|
||||
#parse("\vm\html\col2\editfiledtpl.vm")
|
||||
#if($cumvar%2==0)
|
||||
</div>
|
||||
#end
|
||||
#end
|
||||
|
||||
#end
|
||||
|
||||
#end
|
||||
#end
|
||||
#end
|
||||
|
||||
#if($table.sub)
|
||||
<h4 class="form-header h4">${subTable.functionName}信息</h4>
|
||||
<div class="row mt10">
|
||||
|
|
|
|||
|
|
@ -1,31 +1,31 @@
|
|||
#if("" != $treeParentCode && $column.javaField == $treeParentCode)
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label#if($column.required) is-required#end">${comment}:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label#if($column.required) is-required#end">${comment}:</label>
|
||||
<div class="col-sm-8">
|
||||
#set($BusinessName=$businessName.substring(0,1).toUpperCase() + ${businessName.substring(1)})
|
||||
<input id="treeId" name="${treeParentCode}" type="hidden" th:field="*{${treeParentCode}}" />
|
||||
<input class="form-control" type="text" onclick="select${BusinessName}Tree()" id="treeName" readonly="true" th:field="*{parentName}"#if($column.required) required#end>
|
||||
<span class="input-group-addon"><i class="fa fa-search"></i></span>
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" onclick="select${BusinessName}Tree()" id="treeName" readonly="true" th:field="*{parentName}"#if($column.required) required#end>
|
||||
<span class="input-group-addon"><i class="fa fa-search"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
#elseif($column.htmlType == "input")
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label#if($column.required) is-required#end">${comment}:</label>
|
||||
<div class="col-sm-8">
|
||||
#if(($field == "updateTime") || ($field == "createTime"))
|
||||
<input id="${field}" name="${field}" #if($column.readonly) disabled #end th:value="${#dates.format(${className}.${field}, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text"#if($column.required) required#end>
|
||||
#else
|
||||
<input id="${field}" name="${field}" #if($column.readonly) disabled #end th:value="*{${field}}" class="form-control" type="text"#if($column.required) required#end>
|
||||
#end
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
#elseif($column.htmlType == "input")
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label#if($column.required) is-required#end">${comment}:</label>
|
||||
<div class="col-sm-8">
|
||||
#if(($field == "updateTime") || ($field == "createTime"))
|
||||
<input name="${field}" #if($column.readonly) disabled #end th:value="${#dates.format(${className}.${field}, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text"#if($column.required) required#end>
|
||||
#else
|
||||
<input name="${field}" #if($column.readonly) disabled #end th:field="*{${field}}" class="form-control" type="text"#if($column.required) required#end>
|
||||
#end
|
||||
</div>
|
||||
</div>
|
||||
#elseif($column.htmlType == "upload")
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label#if($column.required) is-required#end">${comment}:</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="hidden" name="${field}" th:field="*{${field}}">
|
||||
<input type="hidden" id="${field}" name="${field}" th:field="*{${field}}">
|
||||
<div class="file-loading">
|
||||
<input class="form-control file-upload" #if($column.readonly) disabled #end id="${field}" name="file" type="file">
|
||||
</div>
|
||||
|
|
@ -52,7 +52,7 @@
|
|||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label#if($column.required) is-required#end">${comment}:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="${field}" #if($column.readonly) disabled #end class="form-control m-b"#if($column.required) required#end>
|
||||
<select id="${field}" name="${field}" #if($column.readonly) disabled #end class="form-control m-b"#if($column.required) required#end>
|
||||
<option value="">所有</option>
|
||||
</select>
|
||||
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
|
||||
|
|
@ -63,7 +63,7 @@
|
|||
<label class="col-sm-4 control-label#if($column.required) is-required#end">${comment}:</label>
|
||||
<div class="col-sm-8" th:with="type=${@dict.getType('${dictType}')}">
|
||||
<label th:each="dict : ${type}" class="check-box">
|
||||
<input name="${field}" type="checkbox" th:value="${dict.dictValue}" #if($column.readonly) disabled #end th:text="${dict.dictLabel}" th:attr="checked=${${className}.${field}.contains(dict.dictValue)?true:false}"#if($column.required) required#end>
|
||||
<input id="${field}" name="${field}" type="checkbox" th:value="${dict.dictValue}" #if($column.readonly) disabled #end th:text="${dict.dictLabel}" th:attr="checked=${${className}.${field}.contains(dict.dictValue)?true:false}"#if($column.required) required#end>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -72,7 +72,7 @@
|
|||
<label class="col-sm-4 control-label#if($column.required) is-required#end">${comment}:</label>
|
||||
<div class="col-sm-8">
|
||||
<label class="check-box">
|
||||
<input name="${field}" #if($column.readonly) disabled #end type="checkbox"#if($column.required) required#end> 无
|
||||
<input id="${field}" name="${field}" #if($column.readonly) disabled #end type="checkbox"#if($column.required) required#end> 无
|
||||
</label>
|
||||
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
|
||||
</div>
|
||||
|
|
@ -82,7 +82,7 @@
|
|||
<label class="col-sm-4 control-label#if($column.required) is-required#end">${comment}:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('${dictType}')}">
|
||||
<input type="radio" #if($column.readonly) disabled #end th:id="${'${field}_' + dict.dictCode}" name="${field}" th:value="${dict.dictValue}" th:field="*{${field}}"#if($column.required) required#end>
|
||||
<input type="radio" #if($column.readonly) disabled #end th:id="${'${field}_' + dict.dictCode}" id="${field}" name="${field}" th:value="${dict.dictValue}" th:field="*{${field}}"#if($column.required) required#end>
|
||||
<label th:for="${'${field}_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -92,7 +92,7 @@
|
|||
<label class="col-sm-4 control-label#if($column.required) is-required#end">${comment}:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box">
|
||||
<input type="radio" #if($column.readonly) disabled #end name="${field}" value=""#if($column.required) required#end>
|
||||
<input type="radio" #if($column.readonly) disabled #end id="${field}" name="${field}" value=""#if($column.required) required#end>
|
||||
<label th:for="${field}" th:text="未知"></label>
|
||||
</div>
|
||||
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
|
||||
|
|
@ -103,7 +103,7 @@
|
|||
<label class="col-sm-4 control-label#if($column.required) is-required#end">${comment}:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group date">
|
||||
<input name="${field}" #if($column.readonly) disabled #end th:value="${#dates.format(${className}.${field}, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text"#if($column.required) required#end>
|
||||
<input id="${field}" name="${field}" #if($column.readonly) disabled #end th:value="${#dates.format(${className}.${field}, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text"#if($column.required) required#end>
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -112,7 +112,7 @@
|
|||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label#if($column.required) is-required#end">${comment}:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea name="${field}" #if($column.readonly) disabled #end class="form-control"#if($column.required) required#end>[[*{${field}}]]</textarea>
|
||||
<textarea id="${field}" name="${field}" #if($column.readonly) disabled #end class="form-control"#if($column.required) required#end>[[*{${field}}]]</textarea>
|
||||
</div>
|
||||
</div>
|
||||
#end
|
||||
|
|
@ -1,15 +1,17 @@
|
|||
#if("" != $treeParentCode && $column.javaField == $treeParentCode)
|
||||
|
||||
<label class="col-sm-4 control-label#if($column.required) is-required#end">${comment}:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
#set($BusinessName=$businessName.substring(0,1).toUpperCase() + ${businessName.substring(1)})
|
||||
#set($treeId = "${className}?.${treeCode}")
|
||||
<input id="treeId" name="${treeParentCode}" type="hidden" th:value="${${treeId}}"/>
|
||||
<input class="form-control" type="text" onclick="select${BusinessName}Tree()" id="treeName" th:value="${${treeName}}"#if($column.required) required#end>
|
||||
<span class="input-group-addon"><i class="fa fa-search"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label#if($column.required) is-required#end">${comment}:</label>
|
||||
<div class="col-sm-8">
|
||||
#set($BusinessName=$businessName.substring(0,1).toUpperCase() + ${businessName.substring(1)})
|
||||
#set($treeId = "${className}?.${treeCode}")
|
||||
<input id="treeId" name="${treeParentCode}" type="hidden" th:value="${${treeId}}"/>
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" onclick="select${BusinessName}Tree()" id="treeName" readonly="true" th:value="${${treeName}}"#if($column.required) required#end>
|
||||
<span class="input-group-addon"><i class="fa fa-search"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
#elseif($column.htmlType == "input")
|
||||
<div class="col-sm-6">
|
||||
<label class="col-sm-4 control-label#if($column.required) is-required#end">${comment}:</label>
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@
|
|||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
#foreach($column in $effectivecols)
|
||||
#foreach($column in $tableLists)
|
||||
#set($dictType=$column.dictType)
|
||||
#set($javaField=$column.javaField)
|
||||
#set($parentheseIndex=$column.columnComment.indexOf("("))
|
||||
|
|
|
|||
|
|
@ -23,6 +23,9 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
|||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.core.domain.Ztree;
|
||||
#end
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.ShiroUtils;
|
||||
import com.ruoyi.province.platform.Constants.BussiConstants;
|
||||
|
||||
/**
|
||||
* ${functionName}Controller
|
||||
|
|
@ -89,11 +92,12 @@ public class ${ClassName}Controller extends BaseController
|
|||
|
||||
#if($dspRepeatColumn)
|
||||
/**
|
||||
* ${className}
|
||||
* 校验${functionName}名称 是否重复
|
||||
*/
|
||||
@PostMapping("/check${className}Unique")
|
||||
@PostMapping("/check${ClassName}Unique")
|
||||
@ResponseBody
|
||||
public String check${className}Unique(${ClassName} ${className})
|
||||
public String check${ClassName}Unique(${ClassName} ${className})
|
||||
{
|
||||
return ${className}Service.check${ClassName}Unique(${className});
|
||||
}
|
||||
|
|
@ -172,12 +176,12 @@ public class ${ClassName}Controller extends BaseController
|
|||
${ClassName} ${className} = ${className}Service.select${ClassName}ById(${pkColumn.javaField});
|
||||
mmap.put("${className}", ${className});
|
||||
|
||||
#foreach($item in $conctrolmodelsmap.entrySet())
|
||||
// 取身份信息
|
||||
#if($item.key == "SysUser")
|
||||
mmap.put("user", ShiroUtils.getSysUser() );
|
||||
#end
|
||||
#end
|
||||
#foreach($item in $conctrolmodelsmap.entrySet())
|
||||
// 取身份信息
|
||||
#if($item.key == "SysUser")
|
||||
mmap.put("user", ShiroUtils.getSysUser() );
|
||||
#end
|
||||
#end
|
||||
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
|
@ -199,6 +203,18 @@ public class ${ClassName}Controller extends BaseController
|
|||
}
|
||||
#end
|
||||
|
||||
#if($table.tree)
|
||||
if (${className}.getParentId().equals(${className}.get${TreeCode}()))
|
||||
{
|
||||
return error("修改${functionName} '" + ${className}.get${TreeName}() + "'失败,上级${className}.get${dspRepeatColumn.javaField}()不能是自己");
|
||||
}
|
||||
else if (StringUtils.equals(UserConstants.DEPT_DISABLE, ${className}.getStatus())
|
||||
&& ${className}Service.selectNormalChildren${ClassName}ById(${className}.get${TreeCode}()) > 0)
|
||||
{
|
||||
return AjaxResult.error("该${functionName}包含未停用的子${functionName}!");
|
||||
}
|
||||
#end
|
||||
|
||||
#if($createByColumn)
|
||||
${className}.setUpdateBy( ShiroUtils.getLoginName() );
|
||||
${className}.setUpdateTime( DateUtils.getNowDate() );
|
||||
|
|
@ -206,6 +222,22 @@ public class ${ClassName}Controller extends BaseController
|
|||
return toAjax(${className}Service.update${ClassName}(${className}));
|
||||
}
|
||||
|
||||
#if($table.tree)
|
||||
/**
|
||||
* 加载${functionName}列表树(排除下级)
|
||||
*/
|
||||
@GetMapping("/treeData/{excludeId}")
|
||||
@ResponseBody
|
||||
public List<Ztree> treeDataExcludeChild(@PathVariable(value = "excludeId", required = false) Long excludeId)
|
||||
{
|
||||
${ClassName} ${className} = new ${ClassName}();
|
||||
${className}.set${TreeCode}(excludeId);
|
||||
List<Ztree> ztrees = ${className}Service.select${ClassName}TreeExcludeChild(${className});
|
||||
return ztrees;
|
||||
}
|
||||
#end
|
||||
|
||||
|
||||
#if($table.crud || $table.sub)
|
||||
/**
|
||||
* 删除${functionName}
|
||||
|
|
@ -232,7 +264,6 @@ public class ${ClassName}Controller extends BaseController
|
|||
}
|
||||
#end
|
||||
#if($table.tree)
|
||||
|
||||
/**
|
||||
* 选择${functionName}树
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -98,4 +98,41 @@ public interface ${ClassName}Mapper
|
|||
*/
|
||||
public int delete${subClassName}By${subTableFkClassName}(${pkColumn.javaType} ${pkColumn.javaField});
|
||||
#end
|
||||
|
||||
#if($table.tree)
|
||||
|
||||
/**
|
||||
* 修改子元素关系
|
||||
*
|
||||
* @param ${className}s 子元素
|
||||
* @return 结果
|
||||
*/
|
||||
public int update${ClassName}Children(@Param("${className}s") List<${ClassName}> ${className});
|
||||
|
||||
|
||||
/**
|
||||
* 根据ID查询所有子部门
|
||||
*
|
||||
* @param ${className}Id 部门ID
|
||||
* @return 部门列表
|
||||
*/
|
||||
public List<${ClassName}> selectChildren${ClassName}ById(Long ${pkColumn.javaField});
|
||||
|
||||
/**
|
||||
* 根据ID查询所有子部门(正常状态)
|
||||
*
|
||||
* @param ${pkColumn.javaField} 部门ID
|
||||
* @return 子部门数
|
||||
*/
|
||||
public int selectNormalChildren${ClassName}ById(Long ${pkColumn.javaField});
|
||||
|
||||
/**
|
||||
* 修改所在部门的父级部门状态
|
||||
*
|
||||
* @param ${className} 部门
|
||||
*/
|
||||
public void update${ClassName}Status(${ClassName} ${className});
|
||||
|
||||
#end
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ public interface I${ClassName}Service
|
|||
/**
|
||||
* 查询${functionName}
|
||||
*
|
||||
* @param ${pkColumn.javaField} ${functionName}ID
|
||||
* @param ${className} ${functionName}ID
|
||||
* @return ${functionName}
|
||||
*/
|
||||
public String check${ClassName}Unique(${ClassName} ${className});
|
||||
|
|
@ -73,6 +73,23 @@ public interface I${ClassName}Service
|
|||
public int delete${ClassName}ById(${pkColumn.javaType} ${pkColumn.javaField});
|
||||
#if($table.tree)
|
||||
|
||||
/**
|
||||
* 查询部门管理树(排除下级)
|
||||
*
|
||||
* @param dept 部门信息
|
||||
* @return 所有部门信息
|
||||
*/
|
||||
public List<Ztree> select${ClassName}TreeExcludeChild(${ClassName} ${className});
|
||||
|
||||
/**
|
||||
* 根据ID查询所有子${functionName}(正常状态)
|
||||
*
|
||||
* @param ${pkColumn.javaField} ID
|
||||
* @return 子${functionName}数
|
||||
*/
|
||||
public int selectNormalChildren${ClassName}ById(Long ${pkColumn.javaField});
|
||||
|
||||
|
||||
/**
|
||||
* 查询${functionName}树列表
|
||||
*
|
||||
|
|
|
|||
|
|
@ -23,6 +23,10 @@ import ${packageName}.mapper.${ClassName}Mapper;
|
|||
import ${packageName}.domain.${ClassName};
|
||||
import ${packageName}.service.I${ClassName}Service;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.province.platform.Constants.BussiConstants;
|
||||
import com.ruoyi.province.platform.utils.BussUtils;
|
||||
import com.ruoyi.common.utils.ShiroUtils;
|
||||
|
||||
/**
|
||||
* ${functionName}Service业务层处理
|
||||
|
|
@ -93,16 +97,23 @@ public class ${ClassName}ServiceImpl implements I${ClassName}Service
|
|||
public int insert${ClassName}(${ClassName} ${className})
|
||||
{
|
||||
#foreach ($column in $columns)
|
||||
#if($column.javaField == 'docNum')
|
||||
#if($column.javaField == 'docNum')
|
||||
${className}.setDocNum("00001".concat( BussUtils.nextValue("${className}") ) );
|
||||
#end
|
||||
#end
|
||||
#end
|
||||
|
||||
#foreach ($column in $mappercols)
|
||||
#if($column.javaField == 'createTime')
|
||||
${className}.setCreateTime(DateUtils.getNowDate());
|
||||
${className}.setCreateBy( ShiroUtils.getLoginName() );
|
||||
${className}.setCreateTime( DateUtils.getNowDate() );
|
||||
#end
|
||||
#end
|
||||
|
||||
#if($table.tree)
|
||||
${ClassName} info = ${className}Mapper.select${ClassName}ById(${className}.get${captTreeParentCode}());
|
||||
${className}.setAncestors(info.getAncestors() + "," + ${className}.get${captTreeParentCode}());
|
||||
#end
|
||||
|
||||
#if($table.sub)
|
||||
int rows = ${className}Mapper.insert${ClassName}(${className});
|
||||
insert${subClassName}(${className});
|
||||
|
|
@ -110,6 +121,7 @@ public class ${ClassName}ServiceImpl implements I${ClassName}Service
|
|||
#else
|
||||
return ${className}Mapper.insert${ClassName}(${className});
|
||||
#end
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -124,6 +136,18 @@ public class ${ClassName}ServiceImpl implements I${ClassName}Service
|
|||
@Override
|
||||
public int update${ClassName}(${ClassName} ${className})
|
||||
{
|
||||
#if($table.tree)
|
||||
${ClassName} newParent${ClassName} = ${className}Mapper.select${ClassName}ById(${className}.get${captTreeParentCode}());
|
||||
${ClassName} old${ClassName} = select${ClassName}ById(${className}.get${captTreeCode}());
|
||||
if (StringUtils.isNotNull(newParent${ClassName}) && StringUtils.isNotNull(old${ClassName}))
|
||||
{
|
||||
String newAncestors = newParent${ClassName}.getAncestors() + "," + newParent${ClassName}.get${captTreeCode}();
|
||||
String oldAncestors = old${ClassName}.getAncestors();
|
||||
${className}.setAncestors(newAncestors);
|
||||
update${ClassName}Children(${className}.get${captTreeCode}(), newAncestors, oldAncestors);
|
||||
}
|
||||
#end
|
||||
|
||||
#foreach ($column in $mappercols)
|
||||
#if($column.javaField == 'updateTime')
|
||||
${className}.setUpdateTime(DateUtils.getNowDate());
|
||||
|
|
@ -133,7 +157,16 @@ public class ${ClassName}ServiceImpl implements I${ClassName}Service
|
|||
${className}Mapper.delete${subClassName}By${subTableFkClassName}(${className}.get${pkColumn.capJavaField}());
|
||||
insert${subClassName}(${className});
|
||||
#end
|
||||
return ${className}Mapper.update${ClassName}(${className});
|
||||
int result = ${className}Mapper.update${ClassName}(${className});
|
||||
|
||||
#if($table.tree)
|
||||
if (UserConstants.DEPT_NORMAL.equals(${className}.getStatus()))
|
||||
{
|
||||
// 如果该${functionName}是启用状态,则启用该${functionName}的所有上级${functionName}
|
||||
updateParent${ClassName}Status(${className});
|
||||
}
|
||||
#end
|
||||
return result ;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -221,4 +254,122 @@ public class ${ClassName}ServiceImpl implements I${ClassName}Service
|
|||
}
|
||||
}
|
||||
#end
|
||||
|
||||
#if($table.tree)
|
||||
|
||||
/**
|
||||
* 修改该${functionName}的父级${functionName}状态
|
||||
*
|
||||
* @param ${className} 当前部门
|
||||
*/
|
||||
private void updateParent${ClassName}Status(${ClassName} ${className})
|
||||
{
|
||||
String updateBy = ${className}.getUpdateBy();
|
||||
${className} = ${className}Mapper.select${ClassName}ById(${className}.get${captTreeCode}());
|
||||
${className}.setUpdateBy(updateBy);
|
||||
${className}Mapper.update${ClassName}Status(${className});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询${functionName}管理树(排除下级)
|
||||
*
|
||||
* @param ${pkColumn.javaField} 部门ID
|
||||
* @return 所有部门信息
|
||||
*/
|
||||
@Override
|
||||
@DataScope(deptAlias = "d")
|
||||
public List<Ztree> select${ClassName}TreeExcludeChild(${ClassName} ${className})
|
||||
{
|
||||
Long ${pkColumn.javaField} = ${className}.get${captTreeCode}();
|
||||
List<${ClassName}> ${className}List = ${className}Mapper.select${ClassName}List(${className});
|
||||
Iterator<${ClassName}> it = ${className}List.iterator();
|
||||
while (it.hasNext())
|
||||
{
|
||||
${ClassName} d = (${ClassName}) it.next();
|
||||
if (d.get${captTreeCode}().intValue() == ${pkColumn.javaField}
|
||||
|| ArrayUtils.contains(StringUtils.split(d.getAncestors(), ","), ${pkColumn.javaField} + ""))
|
||||
{
|
||||
it.remove();
|
||||
}
|
||||
}
|
||||
List<Ztree> ztrees = initZtree(${className}List);
|
||||
return ztrees;
|
||||
}
|
||||
|
||||
/**
|
||||
* 对象转${functionName}树
|
||||
*
|
||||
* @param ${className}List ${functionName}列表
|
||||
* @return 树结构列表
|
||||
*/
|
||||
public List<Ztree> initZtree(List<${ClassName}> ${className}List)
|
||||
{
|
||||
return initZtree(${className}List, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改子元素关系
|
||||
*
|
||||
* @param ${pkColumn.javaField} 被修改的${functionName}ID
|
||||
* @param newAncestors 新的父ID集合
|
||||
* @param oldAncestors 旧的父ID集合
|
||||
*/
|
||||
public void update${ClassName}Children(Long ${pkColumn.javaField}, String newAncestors, String oldAncestors)
|
||||
{
|
||||
List<${ClassName}> children = ${className}Mapper.selectChildren${ClassName}ById(${pkColumn.javaField});
|
||||
for (${ClassName} child : children)
|
||||
{
|
||||
child.setAncestors(child.getAncestors().replace(oldAncestors, newAncestors));
|
||||
}
|
||||
if (children.size() > 0)
|
||||
{
|
||||
${className}Mapper.update${ClassName}Children(children);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 对象转${functionName}树
|
||||
*
|
||||
* @param ${className}List ${functionName}列表
|
||||
* @param roleList 角色已存在菜单列表
|
||||
* @return 树结构列表
|
||||
*/
|
||||
public List<Ztree> initZtree(List<${ClassName}> ${className}List, List<String> role${ClassName}List)
|
||||
{
|
||||
|
||||
List<Ztree> ztrees = new ArrayList<Ztree>();
|
||||
boolean isCheck = StringUtils.isNotNull(role${ClassName}List);
|
||||
for (${ClassName} ${className} : ${className}List)
|
||||
{
|
||||
if (UserConstants.DEPT_NORMAL.equals(${className}.getStatus()))
|
||||
{
|
||||
Ztree ztree = new Ztree();
|
||||
ztree.setId(${className}.get${TreeCode}());
|
||||
ztree.setpId(${className}.get${TreeParentCode}());
|
||||
ztree.setName(${className}.get${TreeName}());
|
||||
ztree.setTitle(${className}.get${TreeName}());
|
||||
if (isCheck)
|
||||
{
|
||||
ztree.setChecked(role${ClassName}List.contains(${className}.get${TreeCode}() + ${className}.get${TreeName}()));
|
||||
}
|
||||
ztrees.add(ztree);
|
||||
}
|
||||
}
|
||||
return ztrees;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ID查询所有子部门(正常状态)
|
||||
*
|
||||
* @param ${pkColumn.javaField} 部门ID
|
||||
* @return 子部门数
|
||||
*/
|
||||
@Override
|
||||
public int selectNormalChildren${ClassName}ById(Long ${pkColumn.javaField})
|
||||
{
|
||||
return ${className}Mapper.selectNormalChildren${ClassName}ById(${pkColumn.javaField});
|
||||
}
|
||||
|
||||
#end
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,6 +44,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
#end
|
||||
</sql>
|
||||
|
||||
#if($table.tree)
|
||||
<sql id="select${ClassName}TreeVo">
|
||||
select#foreach($column in $mappercols) t.$column.columnName#if($velocityCount != $mappercols.size()),#end#end,p.${tree_name} as parent_name
|
||||
#if($hiddenleftjoinfiledcols.size()>0),
|
||||
#foreach($column in $hiddenleftjoinfiledcols)
|
||||
$column.relevAlias.$column.relevTableName as $column.relevjavafiledname#if($velocityCount != $hiddenleftjoinfiledcols.size()),#end
|
||||
#end
|
||||
#end
|
||||
from ${tableName} t
|
||||
left join ${tableName} p on p.${pkColumn.columnName} = t.${tree_parent_code}
|
||||
#if($hiddenleftjoinfiledcols.size()>0)
|
||||
#foreach($column in $hiddenleftjoinfiledcols)
|
||||
left join $column.relevTable $column.relevAlias on t.$column.columnName=$column.relevAlias.$column.relevTableId
|
||||
#end
|
||||
#end
|
||||
</sql>
|
||||
#end
|
||||
|
||||
<select id="select${ClassName}List" parameterType="${ClassName}" resultMap="${ClassName}Result">
|
||||
<include refid="select${ClassName}Vo"/>
|
||||
<where>
|
||||
|
|
@ -84,9 +102,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<include refid="select${ClassName}Vo"/>
|
||||
where t.${pkColumn.columnName} = #{${pkColumn.javaField}}
|
||||
#elseif($table.tree)
|
||||
select#foreach($column in $mappercols) t.$column.columnName,#end p.${tree_name} as parent_name
|
||||
from ${tableName} t
|
||||
left join ${tableName} p on p.${pkColumn.columnName} = t.${tree_parent_code}
|
||||
<include refid="select${ClassName}TreeVo"/>
|
||||
where t.${pkColumn.columnName} = #{${pkColumn.javaField}}
|
||||
#elseif($table.sub)
|
||||
select#foreach($column in $mappercols) a.$column.columnName#if($velocityCount != $mappercols.size()),#end#end,
|
||||
|
|
@ -99,7 +115,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</select>
|
||||
|
||||
#if($dspRepeatColumn)
|
||||
<select id="check${ClassName}NameUnique" parameterType="String" resultMap="${ClassName}Result">
|
||||
<select id="check${ClassName}Unique" parameterType="String" resultMap="${ClassName}Result">
|
||||
<include refid="select${ClassName}Vo"/>
|
||||
where t.${dspRepeatColumn.columnName}=#{${dspRepeatColumn.javaField}} limit 1
|
||||
</select>
|
||||
|
|
@ -166,4 +182,39 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</insert>
|
||||
#end
|
||||
|
||||
#if($table.tree)
|
||||
|
||||
<select id="selectChildren${ClassName}ById" parameterType="Long" resultMap="${ClassName}Result">
|
||||
select * from ${tableName} where find_in_set(#{${pkColumn.javaField}}, ancestors)
|
||||
</select>
|
||||
|
||||
<select id="selectNormalChildren${ClassName}ById" parameterType="Long" resultType="int">
|
||||
select count( ${pkColumn.columnName} ) from ${tableName} where status = 0 and del_flag = '0' and find_in_set(#{${pkColumn.javaField}}, ancestors)
|
||||
</select>
|
||||
|
||||
<update id="update${ClassName}Children" parameterType="java.util.List">
|
||||
update ${tableName} set ancestors =
|
||||
<foreach collection="${className}s" item="item" index="index"
|
||||
separator=" " open="case ${pkColumn.columnName}" close="end">
|
||||
when #{item.${pkColumn.javaField}} then #{item.ancestors}
|
||||
</foreach>
|
||||
where ${pkColumn.columnName} in
|
||||
<foreach collection="${className}s" item="item" index="index"
|
||||
separator="," open="(" close=")">
|
||||
#{item.${pkColumn.javaField}}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<update id="update${ClassName}Status" parameterType="${ClassName}">
|
||||
update ${tableName}
|
||||
<set>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where ${pkColumn.columnName} in (${ancestors})
|
||||
</update>
|
||||
|
||||
#end
|
||||
|
||||
</mapper>
|
||||
|
|
@ -46,7 +46,7 @@
|
|||
left join sys_role_menu rm on m.menu_id = rm.menu_id
|
||||
left join sys_user_role ur on rm.role_id = ur.role_id
|
||||
LEFT JOIN sys_role ro on ur.role_id = ro.role_id
|
||||
where m.entity_id = #{entityId} and m.menu_type in ('M', 'C') and m.visible = 0 AND ro.status = 0
|
||||
where m.entity_id = #{entityId} and m.menu_type in ('M', 'C') and m.visible = 0
|
||||
order by m.parent_id, m.order_num limit 1
|
||||
</select>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue