import com.supwisdom.dlpay.framework.domain.TDictionary;
import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public interface DictionaryDao extends JpaRepository<TDictionary, Integer> {
+ @Query("from TDictionary t where t.dicttype=?1 order by t.dictid ")
List<TDictionary> findAllByDicttype(String dicttype);
void deleteByDicttype(String dicttype);
@Column(name = "CONTACTMAN", length = 60)
private String contactman;
- @Column(name = "IDTYPE", length = 1)
+ @Column(name = "IDTYPE", length = 32)
private String idtype;
@Column(name = "IDNO", length = 60)
import com.supwisdom.dlpay.api.domain.TSourceType;
import com.supwisdom.dlpay.api.domain.TShopSourceType;
import com.supwisdom.dlpay.api.domain.TShopSourceTypeConfig;
+import com.supwisdom.dlpay.api.types.IDTypes;
import com.supwisdom.dlpay.api.types.ShopTypes;
+import com.supwisdom.dlpay.framework.domain.TDictionary;
import com.supwisdom.dlpay.framework.domain.TShop;
import com.supwisdom.dlpay.framework.domain.TShopacc;
import com.supwisdom.dlpay.framework.service.SystemUtilService;
private EnumCheck<ShopTypes, String> shopTypeCheck = new EnumCheck<>();
@GetMapping("/shop/index")
- public String shopView() {
+ public String shopView(Model model) {
+ model.addAttribute(Dictionary.IDTYPE,
+ dictionaryProxy.<TDictionary>getDictionaryAsList(Dictionary.IDTYPE));
return "system/shop/index";
}
@RequestParam(value = "addr", required = false) String addr,
@RequestParam(value = "zipcode", required = false) String zipcode) {
if (null == shopid || StringUtil.isEmpty(shopname) || null == fshopid
- || !shopTypeCheck.isInEnums(shoptype, ShopTypes.NORMAL, ShopTypes.GROUP)) {
+ || !shopTypeCheck.isInEnums(shoptype, ShopTypes.NORMAL, ShopTypes.GROUP, ShopTypes.ROOT)) {
return JsonResult.error("参数传递错误");
}
shop.setIdtype(idtype == null ? null : idtype.trim());
if (!StringUtil.isEmpty(shop.getIdno()) && StringUtil.isEmpty(shop.getIdtype())) {
return JsonResult.error("填写证件号时必须制定证件类型!");
- } else if (!StringUtil.isEmpty(shop.getIdno()) && "1".equals(shop.getIdtype()) && !StringUtil.isIdentity(shop.getIdno())) {
+ } else if (!StringUtil.isEmpty(shop.getIdno()) && IDTypes.IDCARD.value().equals(shop.getIdtype()) && !StringUtil.isIdentity(shop.getIdno())) {
return JsonResult.error("身份证格式错误!");
}
shop.setMobile(mobile);
List<TSourceTypeConfig> list = sourceTypeConfigDao.getBySourceTypeOrderByConfigid(paytype.trim());
if (!StringUtil.isEmpty(list)) {
for (TSourceTypeConfig pt : list) {
+ if(pt.getGlobalflag()){
+ continue; //通用参数跳过
+ }
TShopSourceTypeConfig spc = shopPaytypeConfigDao.getShopSourceTypeConfigById(shopaccno, pt.getSourceType(), pt.getConfigid());
if (null == spc) {
spc = new TShopSourceTypeConfig();
public static final String SEX_MALE = "male";
public static final String SEX_FEMALE = "female";
- public static final String IDTYPE_IDENTITY = "1"; //身份证
- public static final String IDTYPE_PASSPORT = "2"; //护照
- public static final String IDTYPE_DRIVING_LICENSE = "3"; //驾照
- public static final String IDTYPE_HKM_PASS = "4"; //港澳通行证
- public static final String IDTYPE_STUEMPNO = "5"; //学工号
- public static final String IDTYPE_OTHER = "9"; //其他
- public static final String[] IDTYPE_DICTS = {"1", "2", "3", "4", "5", "9"}; //联动
-
- public static final String FEETYPE_DEFAULT = "none";
- public static final String FEETYPE_MEALER = "mealer";
- public static final String FEETYPE_DISCOUNT = "discount";
- public static final String[] FEETYPE_DICTS = {"none", "mealer", "discount"}; //联动
-
-
/**
* TDictionary的dicttype
* */
VALUES ('DAYENDSETTLETASK', '日终结算', '0', '20190619100600', '{tenantid}');
INSERT INTO "tb_shop" ("shopid", "shopname", "shoptype", "fshopid", "status", "opendate", "tenantid")
-VALUES (1, '支付中心', 'root', 0, 'normal', '20190517', '{tenantid}');
+VALUES (1, '支付中心', 0, 0, 'normal', '20190517', '{tenantid}');
INSERT INTO "tb_transcode" ("transcode", "transname", "tenantid")
VALUES (3010, '市民卡代扣', '{tenantid}');
INSERT INTO "tb_dictionary" ("id", "dictval", "dicttype", "dictcaption", "dicttypename", "tenantid")
VALUES (12, 'hk_macau_pass', 'idtypeList', '港澳居民来往内地通行证', '证件类型', '{tenantid}');
INSERT INTO "tb_dictionary" ("id", "dictval", "dicttype", "dictcaption", "dicttypename", "tenantid")
-VALUES (13, 'taiwan_pass', 'idtypeList', '港澳通行证', '台湾同胞来往内地通行证', '{tenantid}');
+VALUES (13, 'taiwan_pass', 'idtypeList', '台湾同胞来往内地通行证', '证件类型', '{tenantid}');
INSERT INTO "tb_dictionary" ("id", "dictval", "dicttype", "dictcaption", "dicttypename", "tenantid")
-VALUES (14, 'foreigner_residence_permit', 'idtypeList', '港澳通行证', '外国人居留证', '{tenantid}');
+VALUES (14, 'foreigner_residence_permit', 'idtypeList', '外国人居留证', '证件类型', '{tenantid}');
INSERT INTO "tb_dictionary" ("id", "dictval", "dicttype", "dictcaption", "dicttypename", "tenantid")
-VALUES (15, 'military_idcard', 'idtypeList', '港澳通行证', '军官证', '{tenantid}');
+VALUES (15, 'military_idcard', 'idtypeList', '军官证', '证件类型', '{tenantid}');
INSERT INTO "tb_dictionary" ("id", "dictval", "dicttype", "dictcaption", "dicttypename", "tenantid")
-VALUES (16, 'soldier_idcard', 'idtypeList', '港澳通行证', '士兵证', '{tenantid}');
+VALUES (16, 'soldier_idcard', 'idtypeList', '士兵证', '证件类型', '{tenantid}');
INSERT INTO "tb_dictionary" ("id", "dictval", "dicttype", "dictcaption", "dicttypename", "tenantid")
VALUES (17, 'driving_license', 'idtypeList', '驾照', '证件类型', '{tenantid}');
INSERT INTO "tb_dictionary" ("id", "dictval", "dicttype", "dictcaption", "dicttypename", "tenantid")
title: '科目汇总表',
treeColIndex: 0,
treeSpid: '-1',
- treeIdName: 'subjid',
+ treeIdName: 'subjno',
treePidName: 'fsubjno',
treeDefaultClose: false,
treeLinkage: false,
toolbar:'#subjectday-toolbar',
cols: [
[
- {field: 'subjid', title: '科目号', align: 'left', rowspan: 2},
+ {field: 'subjno', title: '科目号', align: 'left', rowspan: 2},
{
field: 'subjname', title: '科目名称', align: 'left', rowspan: 2, templet: function (d) {
if (d.subjlevel == 1) {
});
$('#btn-search-shopsourcetype').click(function () {
var ptype = $("#search-sourceType").val();
- table.reload('shopPaytypeTable', {where: {sourceType: ptype, shopaccno: ""}, page: {curr: 1}});
+ table.reload('shopPaytypeTable', {where: {sourcetype: ptype, shopaccno: ""}, page: {curr: 1}});
});
function ondblclick(event, treeId, treeNode) {
}
var ptype = $("#search-sourceType").val();
table.reload('shopPaytypeTable', {
- where: {sourceType: ptype, shopaccno: treeNode.shopaccno},
+ where: {sourcetype: ptype, shopaccno: treeNode.shopaccno},
page: {curr: 1}
});
}
path: '[[@{/shop/load4addsourcetype}]]',
finish: function () {
table.reload('shopPaytypeTable', {
- where: {sourceType: "", shopaccno: shopNode.shopaccno},
+ where: {sourcetype: "", shopaccno: shopNode.shopaccno},
page: {curr: 1}
});
}
<label class="layui-form-label" style="float: right;width: 100%;" th:text="${config.configid}">参数名</label>
</div>
<div class="layui-input-block" style="margin:0;display: inline;float: right;width: 80%;">
- <input type="text" th:name="${config.configid}" class="layui-input" th:value="${config.configValue}" autocomplete="off"/>
+ <input type="text" th:name="${config.configid}" class="layui-input" th:value="${config.configValue}" th:placeholder="${config.configName}" autocomplete="off"/>
</div>
</div>
<div class="layui-input-inline">
<select name="shoptype" id="shoptype" lay-filter="shoptype-filter"
lay-verify="required">
+ <option value="root">根商户</option>
<option value="group">商户组</option>
<option value="normal">结算商户</option>
</select>
<label class="layui-form-label">证件类型</label>
<div class="layui-input-inline">
<select name="idtype" lay-filter="idtype-filter">
- <option value="1">身份证</option>
- <option value="2">护照</option>
- <option value="3">驾照</option>
- <option value="4">港澳通行证</option>
- <option value="5">学生证</option>
- <option value="9">其他</option>
+ <option th:each="bean : ${idtypeList}" th:value="${bean.dictval}">[[${bean.dictcaption}]]</option>
</select>
</div>
</div>
"zipcode": "",
"addr": "",
"contactman": "",
- "idtype": "1",
+ "idtype": "idcard",
"idno": "",
"mobile": "",
"email": "",
"tel": ""
});
$("#fshopid").attr("readonly", "readonly");
+ $("#shoptype option[value='root']").remove();
$("#shoptype").removeAttr("disabled");
form.render('select');
$("#submitbtn-shop-btn").text("新增");
}, function (data) {
console.log("getshopinfo返回", data);
if (data.code === 200) {
+ debugger
+ var root_index = $("#shoptype option[value='root']").attr("index");
+ if(undefined == root_index){
+ $("#shoptype").append("<option value=\"root\">根商户</option>");
+ }
+ if(null==data.shop.idtype){
+ data.shop["idtype"]="idcard"
+ }
form.val("shop-info-form", data.shop);
$("#fshopid").removeAttr("readonly");
$("#shoptype").attr('disabled', 'disabled');