From: Xia Kaixiang Date: Mon, 15 Jul 2019 05:53:42 +0000 (+0800) Subject: 页面bug修改 X-Git-Tag: 1.0.0^2~47 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=bea6bc2ebc0fcbd4ea821608815a6647e99e2659;p=epayment%2Ffood_payapi.git 页面bug修改 --- diff --git a/payapi/src/main/java/com/supwisdom/dlpay/framework/dao/DictionaryDao.java b/payapi/src/main/java/com/supwisdom/dlpay/framework/dao/DictionaryDao.java index e9a19cf7..9d36cea0 100644 --- a/payapi/src/main/java/com/supwisdom/dlpay/framework/dao/DictionaryDao.java +++ b/payapi/src/main/java/com/supwisdom/dlpay/framework/dao/DictionaryDao.java @@ -2,12 +2,14 @@ package com.supwisdom.dlpay.framework.dao; 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 { + @Query("from TDictionary t where t.dicttype=?1 order by t.dictid ") List findAllByDicttype(String dicttype); void deleteByDicttype(String dicttype); diff --git a/payapi/src/main/java/com/supwisdom/dlpay/framework/domain/TShop.java b/payapi/src/main/java/com/supwisdom/dlpay/framework/domain/TShop.java index 74c3ba62..5c81f456 100644 --- a/payapi/src/main/java/com/supwisdom/dlpay/framework/domain/TShop.java +++ b/payapi/src/main/java/com/supwisdom/dlpay/framework/domain/TShop.java @@ -36,7 +36,7 @@ public class TShop { @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) diff --git a/payapi/src/main/java/com/supwisdom/dlpay/system/controller/ShopController.java b/payapi/src/main/java/com/supwisdom/dlpay/system/controller/ShopController.java index e2d4d9b8..7afabc40 100644 --- a/payapi/src/main/java/com/supwisdom/dlpay/system/controller/ShopController.java +++ b/payapi/src/main/java/com/supwisdom/dlpay/system/controller/ShopController.java @@ -4,7 +4,9 @@ import com.supwisdom.dlpay.api.bean.JsonResult; 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; @@ -40,7 +42,9 @@ public class ShopController { private EnumCheck shopTypeCheck = new EnumCheck<>(); @GetMapping("/shop/index") - public String shopView() { + public String shopView(Model model) { + model.addAttribute(Dictionary.IDTYPE, + dictionaryProxy.getDictionaryAsList(Dictionary.IDTYPE)); return "system/shop/index"; } @@ -98,7 +102,7 @@ public class ShopController { @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("参数传递错误"); } @@ -126,7 +130,7 @@ public class ShopController { 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); diff --git a/payapi/src/main/java/com/supwisdom/dlpay/system/service/impl/ShopDataServiceImpl.java b/payapi/src/main/java/com/supwisdom/dlpay/system/service/impl/ShopDataServiceImpl.java index 84339174..a7cf9a78 100644 --- a/payapi/src/main/java/com/supwisdom/dlpay/system/service/impl/ShopDataServiceImpl.java +++ b/payapi/src/main/java/com/supwisdom/dlpay/system/service/impl/ShopDataServiceImpl.java @@ -232,6 +232,9 @@ public class ShopDataServiceImpl implements ShopDataService { List 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(); diff --git a/payapi/src/main/java/com/supwisdom/dlpay/util/ConstantUtil.java b/payapi/src/main/java/com/supwisdom/dlpay/util/ConstantUtil.java index ce13e1a0..6cacabd3 100644 --- a/payapi/src/main/java/com/supwisdom/dlpay/util/ConstantUtil.java +++ b/payapi/src/main/java/com/supwisdom/dlpay/util/ConstantUtil.java @@ -11,20 +11,6 @@ public class ConstantUtil { 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 * */ diff --git a/payapi/src/main/resources/data.sql b/payapi/src/main/resources/data.sql index eec04895..b2010225 100644 --- a/payapi/src/main/resources/data.sql +++ b/payapi/src/main/resources/data.sql @@ -500,7 +500,7 @@ INSERT INTO "tb_task_lock" ("taskcode", "remark", "taskstatus", "tasktime", "ten 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}'); @@ -533,13 +533,13 @@ VALUES (11, 'passport', 'idtypeList', '护照', '证件类型', '{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") diff --git a/payapi/src/main/resources/templates/system/report/subjectday.html b/payapi/src/main/resources/templates/system/report/subjectday.html index 6804f2c4..11453f85 100644 --- a/payapi/src/main/resources/templates/system/report/subjectday.html +++ b/payapi/src/main/resources/templates/system/report/subjectday.html @@ -80,7 +80,7 @@ title: '科目汇总表', treeColIndex: 0, treeSpid: '-1', - treeIdName: 'subjid', + treeIdName: 'subjno', treePidName: 'fsubjno', treeDefaultClose: false, treeLinkage: false, @@ -92,7 +92,7 @@ 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) { diff --git a/payapi/src/main/resources/templates/system/shop/config.html b/payapi/src/main/resources/templates/system/shop/config.html index ed1b0276..028a9764 100644 --- a/payapi/src/main/resources/templates/system/shop/config.html +++ b/payapi/src/main/resources/templates/system/shop/config.html @@ -121,7 +121,7 @@ }); $('#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) { @@ -131,7 +131,7 @@ } var ptype = $("#search-sourceType").val(); table.reload('shopPaytypeTable', { - where: {sourceType: ptype, shopaccno: treeNode.shopaccno}, + where: {sourcetype: ptype, shopaccno: treeNode.shopaccno}, page: {curr: 1} }); } @@ -276,7 +276,7 @@ path: '[[@{/shop/load4addsourcetype}]]', finish: function () { table.reload('shopPaytypeTable', { - where: {sourceType: "", shopaccno: shopNode.shopaccno}, + where: {sourcetype: "", shopaccno: shopNode.shopaccno}, page: {curr: 1} }); } diff --git a/payapi/src/main/resources/templates/system/shop/configpara.html b/payapi/src/main/resources/templates/system/shop/configpara.html index dcaeb055..762778c9 100644 --- a/payapi/src/main/resources/templates/system/shop/configpara.html +++ b/payapi/src/main/resources/templates/system/shop/configpara.html @@ -14,7 +14,7 @@
- +
diff --git a/payapi/src/main/resources/templates/system/shop/index.html b/payapi/src/main/resources/templates/system/shop/index.html index 32ab1dca..78ef8af2 100644 --- a/payapi/src/main/resources/templates/system/shop/index.html +++ b/payapi/src/main/resources/templates/system/shop/index.html @@ -30,6 +30,7 @@
@@ -118,12 +119,7 @@
@@ -353,13 +349,14 @@ "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("新增"); @@ -377,6 +374,14 @@ }, 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(""); + } + if(null==data.shop.idtype){ + data.shop["idtype"]="idcard" + } form.val("shop-info-form", data.shop); $("#fshopid").removeAttr("readonly"); $("#shoptype").attr('disabled', 'disabled');