1,微信支付

2,小程序接口
master
e 2019-04-22 00:57:43 +08:00
parent cdd6878c6e
commit a090b56624
49 changed files with 15139 additions and 1039 deletions

9287
database/wms-20190422.sql Normal file

File diff suppressed because one or more lines are too long

View File

@ -961,7 +961,11 @@
<version>2.5.1</version>
</dependency>
<!-- swagger end -->
<dependency>
<groupId>org.jdom</groupId>
<artifactId>jdom2</artifactId>
<version>2.0.4</version>
</dependency>
</dependencies>
<organization>

View File

@ -1,289 +0,0 @@
package com.zzjee.api;
/**
* @Title: Controller
* @Description:
* @author erzhongxmu
* @date 2017-08-15 23:18:59
* @version V1.0
*
*/
public class OrderGoodsBean extends TGoodsInfoBean {
/**
* @Field @serialVersionUID : TODO()
*/
private static final long serialVersionUID = 1L;
// 订单id
private String orderId;
// 入库单id
private String storageId;
// 盲验id
private String purchaseBlindId;
// 机构名称
private String orgName;
// 仓库ID
private String storeId;
// 仓库名称
private String storeName;
// 供应商id
private String supplierId;
// 供应商名称
private String supplierName;
// 订单数量
private Double orderAmount;
private Double orderWeight;
// 扣皮
private Double buckleSkin;
// 是否批量
private Integer batchType;
// 1.入库 2.越库
private Integer blindStatus;
private Double goodsAmount;
private Double goodsWeight;
// 仓库数量
private Double inventoryAmount;
private Double inventoryWeight;
// 验收人图片
private String userPic;
private String goodsPicItem;
private String userVideo;
private String goodsVideo;
// 101501 采购单入库
// 101502 无采购单入库
// 101503 盲验入库
private String StorageType;
private String itemId;
private Integer storageAmount;
private Double surplusAmount;
private Double surplusWeight;
public Double getSurplusAmount() {
return surplusAmount;
}
public void setSurplusAmount(Double surplusAmount) {
this.surplusAmount = surplusAmount;
}
public Double getSurplusWeight() {
return surplusWeight;
}
public void setSurplusWeight(Double surplusWeight) {
this.surplusWeight = surplusWeight;
}
public String getPurchaseBlindId() {
return purchaseBlindId;
}
public void setPurchaseBlindId(String purchaseBlindId) {
this.purchaseBlindId = purchaseBlindId;
}
public Integer getBlindStatus() {
return blindStatus;
}
public void setBlindStatus(Integer blindStatus) {
this.blindStatus = blindStatus;
}
public Integer getBatchType() {
return batchType;
}
public void setBatchType(Integer batchType) {
this.batchType = batchType;
}
public Double getBuckleSkin() {
return buckleSkin;
}
public void setBuckleSkin(Double buckleSkin) {
this.buckleSkin = buckleSkin;
}
public Double getOrderWeight() {
return orderWeight;
}
public void setOrderWeight(Double orderWeight) {
this.orderWeight = orderWeight;
}
public static long getSerialversionuid() {
return serialVersionUID;
}
public Double getInventoryAmount() {
return inventoryAmount;
}
public void setInventoryAmount(Double inventoryAmount) {
this.inventoryAmount = inventoryAmount;
}
public Double getInventoryWeight() {
return inventoryWeight;
}
public void setInventoryWeight(Double inventoryWeight) {
this.inventoryWeight = inventoryWeight;
}
public String getStorageType() {
return StorageType;
}
public void setStorageType(String storageType) {
StorageType = storageType;
}
public Double getGoodsWeight() {
return goodsWeight;
}
public void setGoodsWeight(Double goodsWeight) {
this.goodsWeight = goodsWeight;
}
public String getUserPic() {
return userPic;
}
public void setUserPic(String userPic) {
this.userPic = userPic;
}
public String getOrderId() {
return orderId;
}
public void setOrderId(String orderId) {
this.orderId = orderId;
}
public String getStorageId() {
return storageId;
}
public void setStorageId(String storageId) {
this.storageId = storageId;
}
public String getOrgName() {
return orgName;
}
public void setOrgName(String orgName) {
this.orgName = orgName;
}
public Double getOrderAmount() {
return orderAmount;
}
public void setOrderAmount(Double orderAmount) {
this.orderAmount = orderAmount;
}
public Double getGoodsAmount() {
return goodsAmount;
}
public void setGoodsAmount(Double goodsAmount) {
this.goodsAmount = goodsAmount;
}
public String getStoreId() {
return storeId;
}
public void setStoreId(String storeId) {
this.storeId = storeId;
}
public String getStoreName() {
return storeName;
}
public void setStoreName(String storeName) {
this.storeName = storeName;
}
public String getSupplierId() {
return supplierId;
}
public void setSupplierId(String supplierId) {
this.supplierId = supplierId;
}
public String getSupplierName() {
return supplierName;
}
public void setSupplierName(String supplierName) {
this.supplierName = supplierName;
}
public String getGoodsPicItem() {
return goodsPicItem;
}
public void setGoodsPicItem(String goodsPicItem) {
this.goodsPicItem = goodsPicItem;
}
public String getUserVideo() {
return userVideo;
}
public void setUserVideo(String userVideo) {
this.userVideo = userVideo;
}
public String getGoodsVideo() {
return goodsVideo;
}
public void setGoodsVideo(String goodsVideo) {
this.goodsVideo = goodsVideo;
}
public String getItemId() {
return itemId;
}
public void setItemId(String itemId) {
this.itemId = itemId;
}
public Integer getStorageAmount() {
return storageAmount;
}
public void setStorageAmount(Integer storageAmount) {
this.storageAmount = storageAmount;
}
}

View File

@ -1,342 +0,0 @@
package com.zzjee.api;
import java.io.Serializable;
import java.util.Date;
/**
* <p>t_goods_infoBean .</p>
*/
public class TGoodsInfoBean implements Serializable {
/**
* <p>id .</p>
*/
private String goodsId;
/**
* <p> .</p>
*/
private String goodsName;
/**
* <p> .</p>
*/
private String goodsPic;
/**
* <p> .</p>
*/
private String goodsCode;
/**
* <p> .</p>
*/
private String searchCode;
/**
* <p> .</p>
*/
private String goodsUnit;
/**
* <p>12 .</p>
*/
private Integer meterType;
/**
* <p> .</p>
*/
private String goodsSpec;
/**
* <p> .</p>
*/
private Double goodsRate;
/**
* <p> .</p>
*/
private Double goodsPrice;
/**
* <p>12 .</p>
*/
private Integer settleType;
/**
* <p> .</p>
*/
private String settleUnit;
/**
* <p> .</p>
*/
private Integer freshDays;
/**
* <p> .</p>
*/
private Integer safeInventoryNum;
/**
* <p>ID .</p>
*/
private String classId;
/**
* <p> .</p>
*/
private String orgId;
/**
* <p> .</p>
*/
private String orgName;
/**
* <p> .</p>
*/
private Date createTime;
/**
* <p>ID .</p>
*/
private String createUserId;
/**
* <p> .</p>
*/
private Date modifyTime;
/**
* <p> .</p>
*/
private Date modifyTimeParam;
/**
* <p>ID .</p>
*/
private String modifyUserId;
/**
* <p>12 .</p>
*/
private Integer delFlag;
private static final long serialVersionUID = 1L;
public String getGoodsId() {
return goodsId;
}
public void setGoodsId(String goodsId) {
this.goodsId = goodsId;
}
public String getGoodsName() {
return goodsName;
}
public void setGoodsName(String goodsName) {
this.goodsName = goodsName;
}
public String getGoodsPic() {
return goodsPic;
}
public void setGoodsPic(String goodsPic) {
this.goodsPic = goodsPic;
}
public String getGoodsCode() {
return goodsCode;
}
public void setGoodsCode(String goodsCode) {
this.goodsCode = goodsCode;
}
public String getSearchCode() {
return searchCode;
}
public void setSearchCode(String searchCode) {
this.searchCode = searchCode;
}
public String getGoodsUnit() {
return goodsUnit;
}
public void setGoodsUnit(String goodsUnit) {
this.goodsUnit = goodsUnit;
}
public Integer getMeterType() {
return meterType;
}
public void setMeterType(Integer meterType) {
this.meterType = meterType;
}
public String getGoodsSpec() {
return goodsSpec;
}
public void setGoodsSpec(String goodsSpec) {
this.goodsSpec = goodsSpec;
}
public Double getGoodsRate() {
return goodsRate;
}
public void setGoodsRate(Double goodsRate) {
this.goodsRate = goodsRate;
}
public Double getGoodsPrice() {
return goodsPrice;
}
public void setGoodsPrice(Double goodsPrice) {
this.goodsPrice = goodsPrice;
}
public Integer getSettleType() {
return settleType;
}
public void setSettleType(Integer settleType) {
this.settleType = settleType;
}
public String getSettleUnit() {
return settleUnit;
}
public void setSettleUnit(String settleUnit) {
this.settleUnit = settleUnit;
}
public Integer getFreshDays() {
return freshDays;
}
public void setFreshDays(Integer freshDays) {
this.freshDays = freshDays;
}
public Integer getSafeInventoryNum() {
return safeInventoryNum;
}
public void setSafeInventoryNum(Integer safeInventoryNum) {
this.safeInventoryNum = safeInventoryNum;
}
public String getClassId() {
return classId;
}
public void setClassId(String classId) {
this.classId = classId;
}
public String getOrgId() {
return orgId;
}
public void setOrgId(String orgId) {
this.orgId = orgId;
}
public String getOrgName() {
return orgName;
}
public void setOrgName(String orgName) {
this.orgName = orgName;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getCreateUserId() {
return createUserId;
}
public void setCreateUserId(String createUserId) {
this.createUserId = createUserId;
}
public Date getModifyTime() {
return modifyTime;
}
public Date getModifyTimeParam() {
return modifyTimeParam;
}
public void setModifyTime(Date modifyTime) {
this.modifyTime = modifyTime;
}
public void setModifyTimeParam(Date modifyTimeParam) {
this.modifyTimeParam = modifyTimeParam;
}
public String getModifyUserId() {
return modifyUserId;
}
public void setModifyUserId(String modifyUserId) {
this.modifyUserId = modifyUserId;
}
public Integer getDelFlag() {
return delFlag;
}
public void setDelFlag(Integer delFlag) {
this.delFlag = delFlag;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", goodsId=").append(goodsId);
sb.append(", goodsName=").append(goodsName);
sb.append(", goodsPic=").append(goodsPic);
sb.append(", goodsCode=").append(goodsCode);
sb.append(", searchCode=").append(searchCode);
sb.append(", goodsUnit=").append(goodsUnit);
sb.append(", meterType=").append(meterType);
sb.append(", goodsSpec=").append(goodsSpec);
sb.append(", goodsRate=").append(goodsRate);
sb.append(", goodsPrice=").append(goodsPrice);
sb.append(", settleType=").append(settleType);
sb.append(", settleUnit=").append(settleUnit);
sb.append(", freshDays=").append(freshDays);
sb.append(", safeInventoryNum=").append(safeInventoryNum);
sb.append(", classId=").append(classId);
sb.append(", orgId=").append(orgId);
sb.append(", orgName=").append(orgName);
sb.append(", createTime=").append(createTime);
sb.append(", createUserId=").append(createUserId);
sb.append(", modifyTime=").append(modifyTime);
sb.append(", modifyUserId=").append(modifyUserId);
sb.append(", delFlag=").append(delFlag);
sb.append("]");
return sb.toString();
}
}

View File

@ -1,230 +0,0 @@
package com.zzjee.api;
import java.io.Serializable;
import java.util.Date;
/**
* <p>t_store_infoBean .</p>
*/
public class TStoreInfoBean implements Serializable {
/**
* <p>ID .</p>
*/
private String storeId;
/**
* <p> .</p>
*/
private String storeNo;
/**
* <p> .</p>
*/
private String storeName;
/**
* <p> .</p>
*/
private String storeAddr;
/**
* <p> .</p>
*/
private String storeAdmin;
/**
* <p>IDS .</p>
*/
private String classIds;
/**
* <p> .</p>
*/
private String classNames;
/**
* <p>ID .</p>
*/
private String orgId;
/**
* <p> .</p>
*/
private String orgName;
/**
* <p> .</p>
*/
private Date createTime;
/**
* <p>ID .</p>
*/
private String createUserId;
/**
* <p> .</p>
*/
private Date modifyTime;
/**
* <p> .</p>
*/
private Date modifyTimeParam;
/**
* <p>ID .</p>
*/
private String modifyUserId;
/**
* <p>12 .</p>
*/
private Integer delFlag;
private static final long serialVersionUID = 1L;
public String getStoreId() {
return storeId;
}
public void setStoreId(String storeId) {
this.storeId = storeId;
}
public String getStoreNo() {
return storeNo;
}
public void setStoreNo(String storeNo) {
this.storeNo = storeNo;
}
public String getStoreName() {
return storeName;
}
public void setStoreName(String storeName) {
this.storeName = storeName;
}
public String getStoreAddr() {
return storeAddr;
}
public void setStoreAddr(String storeAddr) {
this.storeAddr = storeAddr;
}
public String getStoreAdmin() {
return storeAdmin;
}
public void setStoreAdmin(String storeAdmin) {
this.storeAdmin = storeAdmin;
}
public String getClassIds() {
return classIds;
}
public void setClassIds(String classIds) {
this.classIds = classIds;
}
public String getClassNames() {
return classNames;
}
public void setClassNames(String classNames) {
this.classNames = classNames;
}
public String getOrgId() {
return orgId;
}
public void setOrgId(String orgId) {
this.orgId = orgId;
}
public String getOrgName() {
return orgName;
}
public void setOrgName(String orgName) {
this.orgName = orgName;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getCreateUserId() {
return createUserId;
}
public void setCreateUserId(String createUserId) {
this.createUserId = createUserId;
}
public Date getModifyTime() {
return modifyTime;
}
public Date getModifyTimeParam() {
return modifyTimeParam;
}
public void setModifyTime(Date modifyTime) {
this.modifyTime = modifyTime;
}
public void setModifyTimeParam(Date modifyTimeParam) {
this.modifyTimeParam = modifyTimeParam;
}
public String getModifyUserId() {
return modifyUserId;
}
public void setModifyUserId(String modifyUserId) {
this.modifyUserId = modifyUserId;
}
public Integer getDelFlag() {
return delFlag;
}
public void setDelFlag(Integer delFlag) {
this.delFlag = delFlag;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", storeId=").append(storeId);
sb.append(", storeNo=").append(storeNo);
sb.append(", storeName=").append(storeName);
sb.append(", storeAddr=").append(storeAddr);
sb.append(", storeAdmin=").append(storeAdmin);
sb.append(", classIds=").append(classIds);
sb.append(", classNames=").append(classNames);
sb.append(", orgId=").append(orgId);
sb.append(", orgName=").append(orgName);
sb.append(", createTime=").append(createTime);
sb.append(", createUserId=").append(createUserId);
sb.append(", modifyTime=").append(modifyTime);
sb.append(", modifyUserId=").append(modifyUserId);
sb.append(", delFlag=").append(delFlag);
sb.append("]");
return sb.toString();
}
}

View File

@ -2,10 +2,15 @@ package com.zzjee.api;
import com.alibaba.fastjson.JSONObject;
import com.zzjee.conf.entity.FxjOtherLoginEntity;
import com.zzjee.conf.entity.WxConfigEntity;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.apache.log4j.Logger;
import org.jeecgframework.core.util.ResourceUtil;
import org.jeecgframework.jwt.util.ResponseMessage;
import org.jeecgframework.jwt.util.Result;
import org.jeecgframework.web.system.pojo.base.TSFunction;
import org.jeecgframework.web.system.pojo.base.TSUser;
import org.jeecgframework.web.system.service.SystemService;
@ -14,6 +19,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.util.Assert;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
@ -121,6 +127,70 @@ public class TokenController {
// 生成一个token保存用户登录状态
return new ResponseEntity(D0, HttpStatus.OK);
}
@ApiOperation(value = "wxauthv3")
@RequestMapping(value = "/authv3",method = RequestMethod.GET)
@ResponseBody
public ResponseMessage<?> authV3(@RequestParam(value="JSCODE", required=false) String JSCODE, @RequestParam(value="appCode", required=false) String appCode) {
if (StringUtils.isEmpty(JSCODE)) {
return Result.error("JSCODE不能为空!");
}
WxConfigEntity wxConfigEntity = systemService.findUniqueByProperty(WxConfigEntity.class,"appCode",appCode);
Assert.notNull(JSCODE, "JSCODE can not be empty");
String url="https://api.weixin.qq.com/sns/jscode2session?appid=" + wxConfigEntity.getAppId() +
"&secret=" + wxConfigEntity.getAppSecret() +
"&js_code=" +
JSCODE+"&grant_type=authorization_code";
String result= com.xiaoleilu.hutool.http.HttpUtil.get(url);
logger.info("JSCODE=="+JSCODE);
logger.info("url=="+url );
logger.info("authv2=="+ result);
net.sf.json.JSONObject resultJson = net.sf.json.JSONObject.fromObject(result);
String openid = String.valueOf(resultJson.get("openid"));
try{
FxjOtherLoginEntity fxjOtherLoginEntity = userService.findUniqueByProperty(FxjOtherLoginEntity.class,"otherid",openid);
if(fxjOtherLoginEntity!=null){
return Result.success(openid,(long)1);
}else{
return Result.success(openid,(long)0);
}
}catch (Exception e){
return Result.success(openid,(long)0);
}
}
@ApiOperation(value = "三方openid保存")
@RequestMapping(value = "/otherloginsave",method = RequestMethod.POST)
@ResponseBody
public ResponseMessage<?> otherloginsave(@RequestParam(value="openid", required=false) String openid, @RequestParam(value="unionid", required=false) String unionid, @RequestParam(value="username", required=true) String username, @RequestParam(value="password", required=true) String password, @RequestParam(value="appCode", required=false) String appCode) {
// 验证
if (StringUtils.isEmpty(openid)) {
return org.jeecgframework.jwt.util.Result.error("用户账号不能为空!");
}
TSUser user = userService.checkUserExits(username, password);
if (user == null) {
// 提示用户名或密码错误
return Result.error("用户账号密码错误!" );
}
FxjOtherLoginEntity fxjOtherLoginEntity = userService.findUniqueByProperty(FxjOtherLoginEntity.class,"otherid",openid);
if (fxjOtherLoginEntity!=null){
fxjOtherLoginEntity.setUsername(username);
fxjOtherLoginEntity.setOtherid(openid);
userService.updateEntitie(fxjOtherLoginEntity);
}else{
fxjOtherLoginEntity = new FxjOtherLoginEntity();
fxjOtherLoginEntity.setUsername(username);
fxjOtherLoginEntity.setOtherid(openid);
userService.save(fxjOtherLoginEntity);
}
return Result.success(fxjOtherLoginEntity);
}
@RequestMapping(value = "/postkey", method = RequestMethod.POST)
@ResponseBody

View File

@ -1,153 +0,0 @@
package com.zzjee.api;
import java.io.Serializable;
public class WeightRecordBean implements Serializable {
/**
* @Field @serialVersionUID : TODO()
*/
private static final long serialVersionUID = 1L;
// id
private String itemId;
// 1.入库 2.越库
private String blindStatus;
// 扣皮重量
private String bukleWeight;
// 前商品id
private String oldGoodsId;
private String oldGoodsName;
// 后商品名
private String newGoodsId;
private String newGoodsName;
// 商品单位
private String goodsUnit;
// 仓库id
private String storeId;
// 用户id
private String userId;
// 机构id、名称
private String orgId;
private String orgName;
// 1.入库 2.退货 3.出库 4.盘点
private String flag;
private String modifyGoodsPic;
public String getModifyGoodsPic() {
return modifyGoodsPic;
}
public void setModifyGoodsPic(String modifyGoodsPic) {
this.modifyGoodsPic = modifyGoodsPic;
}
public String getGoodsUnit() {
return goodsUnit;
}
public void setGoodsUnit(String goodsUnit) {
this.goodsUnit = goodsUnit;
}
public String getItemId() {
return itemId;
}
public void setItemId(String itemId) {
this.itemId = itemId;
}
public String getBlindStatus() {
return blindStatus;
}
public void setBlindStatus(String blindStatus) {
this.blindStatus = blindStatus;
}
public String getBukleWeight() {
return bukleWeight;
}
public void setBukleWeight(String bukleWeight) {
this.bukleWeight = bukleWeight;
}
public String getOldGoodsId() {
return oldGoodsId;
}
public void setOldGoodsId(String oldGoodsId) {
this.oldGoodsId = oldGoodsId;
}
public String getOldGoodsName() {
return oldGoodsName;
}
public void setOldGoodsName(String oldGoodsName) {
this.oldGoodsName = oldGoodsName;
}
public String getNewGoodsId() {
return newGoodsId;
}
public void setNewGoodsId(String newGoodsId) {
this.newGoodsId = newGoodsId;
}
public String getNewGoodsName() {
return newGoodsName;
}
public void setNewGoodsName(String newGoodsName) {
this.newGoodsName = newGoodsName;
}
public String getStoreId() {
return storeId;
}
public void setStoreId(String storeId) {
this.storeId = storeId;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getOrgId() {
return orgId;
}
public void setOrgId(String orgId) {
this.orgId = orgId;
}
public String getOrgName() {
return orgName;
}
public void setOrgName(String orgName) {
this.orgName = orgName;
}
public String getFlag() {
return flag;
}
public void setFlag(String flag) {
this.flag = flag;
}
public static long getSerialversionuid() {
return serialVersionUID;
}
}

View File

@ -0,0 +1,215 @@
package com.zzjee.api;
import com.alibaba.fastjson.JSONArray;
import com.zzjee.conf.entity.FxjOtherLoginEntity;
import com.zzjee.conf.entity.WxConfigEntity;
import com.zzjee.wm.entity.WmNoticeConfEntity;
import com.zzjee.wm.entity.WmOmNoticeHEntity;
import com.zzjee.wm.entity.WmOmNoticeIEntity;
import com.zzjee.wm.entity.WmToDownGoodsEntity;
import com.zzjee.wm.page.WmOmNoticeHPage;
import com.zzjee.wmutil.wmUtil;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.apache.log4j.Logger;
import org.jeecgframework.core.beanvalidator.BeanValidators;
import org.jeecgframework.core.common.hibernate.qbc.CriteriaQuery;
import org.jeecgframework.core.constant.Globals;
import org.jeecgframework.core.util.MyBeanUtils;
import org.jeecgframework.core.util.ResourceUtil;
import org.jeecgframework.core.util.StringUtil;
import org.jeecgframework.jwt.util.ResponseMessage;
import org.jeecgframework.jwt.util.Result;
import org.jeecgframework.web.system.pojo.base.TSFunction;
import org.jeecgframework.web.system.pojo.base.TSNotice;
import org.jeecgframework.web.system.pojo.base.TSUser;
import org.jeecgframework.web.system.service.SystemService;
import org.jeecgframework.web.system.service.UserService;
import org.jeecgframework.web.system.sms.util.Constants;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.util.Assert;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.validation.ConstraintViolation;
import java.io.*;
import java.text.SimpleDateFormat;
import java.util.*;
import static com.xiaoleilu.hutool.date.DateTime.now;
/**
* token
* Restful退
*
* @author scott
* @date 2015/7/30.
*/
@Controller
@RequestMapping("/wmom")
public class wmomController {
private static final Logger logger = Logger.getLogger(wmomController.class);
@Autowired
private UserService userService;
@Autowired
SystemService systemService;
@RequestMapping(value = "/list/{username}", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "订单列表信息", produces = "application/json", httpMethod = "GET")
public ResponseMessage<List<WmOmNoticeHPage>> list(@PathVariable("username") String username, @RequestParam int pageNumber, @RequestParam int pageSize, HttpServletRequest request) {
CriteriaQuery query = new CriteriaQuery(WmOmNoticeHEntity.class);
try {
query.eq("omSta", Constants.wm_sta6);
if(StringUtil.isNotEmpty(request.getParameter("omNoticeId"))){
query.like("omNoticeId","%"+request.getParameter("omNoticeId")+"%");
}
if(StringUtil.isNotEmpty(request.getParameter("delvMobile"))){
query.like("delvMobile","%"+request.getParameter("delvMobile")+"%");
}
if(StringUtil.isNotEmpty(request.getParameter("delvMember"))){
query.like("delvMember","%"+request.getParameter("delvMember")+"%");
}
if(StringUtil.isNotEmpty(request.getParameter("delvAddr"))){
query.like("delvAddr","%"+request.getParameter("delvAddr")+"%");
}
String orgcode = "";
TSUser task = wmUtil.getsysorgcode(username);
if (task != null) {
query.like("reCarno", "%" + task.getUserName() + "%");
}
} catch (Exception e) {
}
query.add();
List<WmOmNoticeHPage> listsize = this.systemService.getListByCriteriaQuery(query, false);
query.setCurPage(pageNumber <= 0 ? 1 : pageNumber);
query.setPageSize(pageSize < 1 ? 1 : pageSize);
query.add();
Map<String, Object> map = new HashMap<String, Object>();
map.put("createDate", "desc");
query.setOrder(map);
List<WmOmNoticeHPage> list = this.systemService.getListByCriteriaQuery(query, true);
return Result.success(list, (long) listsize.size());
}
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "根据ID获取订单信息", notes = "根据ID获取订单信息", httpMethod = "GET", produces = "application/json")
public ResponseMessage<?> get(@ApiParam(required = true, name = "id", value = "ID") @PathVariable("id") String id) {
WmOmNoticeHEntity task = null;
try {
task = systemService.get(WmOmNoticeHEntity.class, id);
} catch (Exception e) {
}
if (task == null) {
try {
task = systemService.findUniqueByProperty(WmOmNoticeHEntity.class, "omNoticeId", id);
} catch (Exception e) {
}
if (task == null) {
return Result.error("根据ID获取订单信息为空");
}
}
WmOmNoticeHPage page = new WmOmNoticeHPage();
try {
MyBeanUtils.copyBeanNotNull2Bean(task, page);
Object orderNo0 = task.getOmNoticeId();
String hql0 = "from WmOmNoticeIEntity where 1 = 1 AND omNoticeId = ? ";
List<WmOmNoticeIEntity> WmOmNoticeIEntityList = this.systemService.findHql(hql0, orderNo0);
page.setWmOmNoticeIList(WmOmNoticeIEntityList);
} catch (Exception e) {
e.printStackTrace();
}
return Result.success(page);
}
@RequestMapping(value = "/goodsdownlist/{orderNo}", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "订单file信息", produces = "application/json", httpMethod = "GET")
public ResponseMessage<List<WmToDownGoodsEntity>> filelist(@PathVariable("orderNo") String orderNo, HttpServletRequest request) {
String hql0 = "from WmToDownGoodsEntity where 1 = 1 AND orderId = ? ";
List<WmToDownGoodsEntity> wmToDownGoodsEntitiesList = this.systemService.findHql(hql0, orderNo);
return Result.success(wmToDownGoodsEntitiesList);
}
@RequestMapping(value = "/{id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE)
@ResponseBody
@ApiOperation(value = "回单订单", notes = "回单订单")
public ResponseMessage<?> update(@RequestBody WmOmNoticeHPage wmOmNoticeHPage) {
//调用JSR303 Bean Validator进行校验如果出错返回含400错误码及json格式的错误信息.
WmOmNoticeHEntity t = systemService.get(WmOmNoticeHEntity.class, wmOmNoticeHPage.getId());
WmNoticeConfEntity confe = new WmNoticeConfEntity();
confe.setBeizhu(wmOmNoticeHPage.getOmBeizhu());
confe.setCreateBy(wmOmNoticeHPage.getCreateBy());
confe.setHdData(now());
confe.setCusCode(t.getCusCode());
confe.setWmNoticeId(t.getOmNoticeId());
systemService.save(confe);
return Result.success("回单成功");
}
@RequestMapping(value="/getNotice/{username}", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value="附近巡检任务列表信息",produces="application/json",httpMethod="GET")
public ResponseMessage<List<TSNotice>> getNotice(@PathVariable("username") String username, HttpServletRequest request) {
List<TSNotice> list = new ArrayList<>();
TSUser task = wmUtil.getsysorgcode(username);
List<Map<String, Object>> resultList2 = null;
String orgcode = "";
Integer isRead = null;
if (task != null) {
try {
String sql = "SELECT notice.*,noticeRead.is_read as is_read FROM t_s_notice notice "
+ "LEFT JOIN t_s_notice_read_user noticeRead ON notice.id = noticeRead.notice_id "
+ "WHERE noticeRead.del_flag = 0 and noticeRead.user_id = ? ";
sql += " and noticeRead.is_read = ? ";
sql += " ORDER BY noticeRead.create_time DESC ";
if (isRead == null || !(isRead == 1 || isRead == 0)) {
isRead = 0;
}
List<Map<String, Object>> noticeList = systemService.findForJdbcParam(sql, 1, 10, task.getId(), isRead.intValue());
//将List转换成JSON存储
net.sf.json.JSONArray result = new net.sf.json.JSONArray();
if (noticeList != null && noticeList.size() > 0) {
for (int i = 0; i < noticeList.size(); i++) {
TSNotice tsNotice = new TSNotice();
tsNotice.setId(noticeList.get(i).get("id").toString());
tsNotice.setNoticeTitle(noticeList.get(i).get("notice_title").toString());
tsNotice.setNoticeContent(noticeList.get(i).get("notice_content").toString());
list.add(tsNotice);
}
}
//获取通知公告总数
String sql2 = "SELECT count(notice.id) as count FROM t_s_notice notice "
+ "LEFT JOIN t_s_notice_read_user noticeRead ON notice.id = noticeRead.notice_id "
+ "WHERE noticeRead.del_flag = 0 and noticeRead.user_id = ? "
+ "and noticeRead.is_read = 0";
resultList2 = systemService.findForJdbc(sql2, task.getId());
}
catch (Exception e){
}
}
return Result.success(list, Long.parseLong(resultList2.get(0).get("count").toString()));
}
}

View File

@ -0,0 +1,406 @@
package com.zzjee.conf.controller;
import com.zzjee.conf.entity.FxjOtherLoginEntity;
import com.zzjee.conf.service.FxjOtherLoginServiceI;
import java.util.ArrayList;
import java.util.List;
import java.text.SimpleDateFormat;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import org.jeecgframework.core.common.controller.BaseController;
import org.jeecgframework.core.common.exception.BusinessException;
import org.jeecgframework.core.common.hibernate.qbc.CriteriaQuery;
import org.jeecgframework.core.common.model.common.TreeChildCount;
import org.jeecgframework.core.common.model.json.AjaxJson;
import org.jeecgframework.core.common.model.json.DataGrid;
import org.jeecgframework.core.constant.Globals;
import org.jeecgframework.core.util.StringUtil;
import org.jeecgframework.tag.core.easyui.TagUtil;
import org.jeecgframework.web.system.pojo.base.TSDepart;
import org.jeecgframework.web.system.service.SystemService;
import org.jeecgframework.core.util.MyBeanUtils;
import java.io.OutputStream;
import org.jeecgframework.core.util.BrowserUtils;
import org.jeecgframework.poi.excel.ExcelExportUtil;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.entity.TemplateExportParams;
import org.jeecgframework.poi.excel.entity.vo.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.vo.TemplateExcelConstants;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.jeecgframework.core.util.ResourceUtil;
import java.io.IOException;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import java.util.Map;
import java.util.HashMap;
import org.jeecgframework.core.util.ExceptionUtil;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.jeecgframework.core.beanvalidator.BeanValidators;
import java.util.Set;
import javax.validation.ConstraintViolation;
import javax.validation.Validator;
import java.net.URI;
import org.springframework.http.MediaType;
import org.springframework.web.util.UriComponentsBuilder;
/**
* @Title: Controller
* @Description:
* @author onlineGenerator
* @date 2019-04-21 23:11:19
* @version V1.0
*
*/
@Controller
@RequestMapping("/fxjOtherLoginController")
public class FxjOtherLoginController extends BaseController {
/**
* Logger for this class
*/
private static final Logger logger = Logger.getLogger(FxjOtherLoginController.class);
@Autowired
private FxjOtherLoginServiceI fxjOtherLoginService;
@Autowired
private SystemService systemService;
@Autowired
private Validator validator;
/**
*
*
* @return
*/
@RequestMapping(params = "list")
public ModelAndView list(HttpServletRequest request) {
return new ModelAndView("com/zzjee/conf/fxjOtherLoginList");
}
/**
* easyui AJAX
*
* @param request
* @param response
* @param dataGrid
* @param user
*/
@RequestMapping(params = "datagrid")
public void datagrid(FxjOtherLoginEntity fxjOtherLogin,HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) {
CriteriaQuery cq = new CriteriaQuery(FxjOtherLoginEntity.class, dataGrid);
//查询条件组装器
org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, fxjOtherLogin, request.getParameterMap());
try{
//自定义追加查询条件
}catch (Exception e) {
throw new BusinessException(e.getMessage());
}
cq.add();
this.fxjOtherLoginService.getDataGridReturn(cq, true);
TagUtil.datagrid(response, dataGrid);
}
/**
*
*
* @return
*/
@RequestMapping(params = "doDel")
@ResponseBody
public AjaxJson doDel(FxjOtherLoginEntity fxjOtherLogin, HttpServletRequest request) {
String message = null;
AjaxJson j = new AjaxJson();
fxjOtherLogin = systemService.getEntity(FxjOtherLoginEntity.class, fxjOtherLogin.getId());
message = "第三方登录删除成功";
try{
fxjOtherLoginService.delete(fxjOtherLogin);
systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO);
}catch(Exception e){
e.printStackTrace();
message = "第三方登录删除失败";
throw new BusinessException(e.getMessage());
}
j.setMsg(message);
return j;
}
/**
*
*
* @return
*/
@RequestMapping(params = "doBatchDel")
@ResponseBody
public AjaxJson doBatchDel(String ids,HttpServletRequest request){
String message = null;
AjaxJson j = new AjaxJson();
message = "第三方登录删除成功";
try{
for(String id:ids.split(",")){
FxjOtherLoginEntity fxjOtherLogin = systemService.getEntity(FxjOtherLoginEntity.class,
id
);
fxjOtherLoginService.delete(fxjOtherLogin);
systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO);
}
}catch(Exception e){
e.printStackTrace();
message = "第三方登录删除失败";
throw new BusinessException(e.getMessage());
}
j.setMsg(message);
return j;
}
/**
*
*
* @param ids
* @return
*/
@RequestMapping(params = "doAdd")
@ResponseBody
public AjaxJson doAdd(FxjOtherLoginEntity fxjOtherLogin, HttpServletRequest request) {
String message = null;
AjaxJson j = new AjaxJson();
message = "第三方登录添加成功";
try{
fxjOtherLoginService.save(fxjOtherLogin);
systemService.addLog(message, Globals.Log_Type_INSERT, Globals.Log_Leavel_INFO);
}catch(Exception e){
e.printStackTrace();
message = "第三方登录添加失败";
throw new BusinessException(e.getMessage());
}
j.setMsg(message);
return j;
}
/**
*
*
* @param ids
* @return
*/
@RequestMapping(params = "doUpdate")
@ResponseBody
public AjaxJson doUpdate(FxjOtherLoginEntity fxjOtherLogin, HttpServletRequest request) {
String message = null;
AjaxJson j = new AjaxJson();
message = "第三方登录更新成功";
FxjOtherLoginEntity t = fxjOtherLoginService.get(FxjOtherLoginEntity.class, fxjOtherLogin.getId());
try {
MyBeanUtils.copyBeanNotNull2Bean(fxjOtherLogin, t);
fxjOtherLoginService.saveOrUpdate(t);
systemService.addLog(message, Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO);
} catch (Exception e) {
e.printStackTrace();
message = "第三方登录更新失败";
throw new BusinessException(e.getMessage());
}
j.setMsg(message);
return j;
}
/**
*
*
* @return
*/
@RequestMapping(params = "goAdd")
public ModelAndView goAdd(FxjOtherLoginEntity fxjOtherLogin, HttpServletRequest req) {
if (StringUtil.isNotEmpty(fxjOtherLogin.getId())) {
fxjOtherLogin = fxjOtherLoginService.getEntity(FxjOtherLoginEntity.class, fxjOtherLogin.getId());
req.setAttribute("fxjOtherLoginPage", fxjOtherLogin);
}
return new ModelAndView("com/zzjee/conf/fxjOtherLogin-add");
}
/**
*
*
* @return
*/
@RequestMapping(params = "goUpdate")
public ModelAndView goUpdate(FxjOtherLoginEntity fxjOtherLogin, HttpServletRequest req) {
if (StringUtil.isNotEmpty(fxjOtherLogin.getId())) {
fxjOtherLogin = fxjOtherLoginService.getEntity(FxjOtherLoginEntity.class, fxjOtherLogin.getId());
req.setAttribute("fxjOtherLoginPage", fxjOtherLogin);
}
return new ModelAndView("com/zzjee/conf/fxjOtherLogin-update");
}
/**
*
*
* @return
*/
@RequestMapping(params = "upload")
public ModelAndView upload(HttpServletRequest req) {
req.setAttribute("controller_name","fxjOtherLoginController");
return new ModelAndView("common/upload/pub_excel_upload");
}
/**
* excel
*
* @param request
* @param response
*/
@RequestMapping(params = "exportXls")
public String exportXls(FxjOtherLoginEntity fxjOtherLogin,HttpServletRequest request,HttpServletResponse response
, DataGrid dataGrid,ModelMap modelMap) {
CriteriaQuery cq = new CriteriaQuery(FxjOtherLoginEntity.class, dataGrid);
org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, fxjOtherLogin, request.getParameterMap());
List<FxjOtherLoginEntity> fxjOtherLogins = this.fxjOtherLoginService.getListByCriteriaQuery(cq,false);
modelMap.put(NormalExcelConstants.FILE_NAME,"第三方登录");
modelMap.put(NormalExcelConstants.CLASS,FxjOtherLoginEntity.class);
modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("第三方登录列表", "导出人:"+ResourceUtil.getSessionUserName().getRealName(),
"导出信息"));
modelMap.put(NormalExcelConstants.DATA_LIST,fxjOtherLogins);
return NormalExcelConstants.JEECG_EXCEL_VIEW;
}
/**
* excel 使
*
* @param request
* @param response
*/
@RequestMapping(params = "exportXlsByT")
public String exportXlsByT(FxjOtherLoginEntity fxjOtherLogin,HttpServletRequest request,HttpServletResponse response
, DataGrid dataGrid,ModelMap modelMap) {
modelMap.put(NormalExcelConstants.FILE_NAME,"第三方登录");
modelMap.put(NormalExcelConstants.CLASS,FxjOtherLoginEntity.class);
modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("第三方登录列表", "导出人:"+ResourceUtil.getSessionUserName().getRealName(),
"导出信息"));
modelMap.put(NormalExcelConstants.DATA_LIST,new ArrayList());
return NormalExcelConstants.JEECG_EXCEL_VIEW;
}
@SuppressWarnings("unchecked")
@RequestMapping(params = "importExcel", method = RequestMethod.POST)
@ResponseBody
public AjaxJson importExcel(HttpServletRequest request, HttpServletResponse response) {
AjaxJson j = new AjaxJson();
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
MultipartFile file = entity.getValue();// 获取上传文件对象
ImportParams params = new ImportParams();
params.setTitleRows(2);
params.setHeadRows(1);
params.setNeedSave(true);
try {
List<FxjOtherLoginEntity> listFxjOtherLoginEntitys = ExcelImportUtil.importExcel(file.getInputStream(),FxjOtherLoginEntity.class,params);
for (FxjOtherLoginEntity fxjOtherLogin : listFxjOtherLoginEntitys) {
fxjOtherLoginService.save(fxjOtherLogin);
}
j.setMsg("文件导入成功!");
} catch (Exception e) {
j.setMsg("文件导入失败!");
logger.error(ExceptionUtil.getExceptionMessage(e));
}finally{
try {
file.getInputStream().close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
return j;
}
@RequestMapping(method = RequestMethod.GET)
@ResponseBody
public List<FxjOtherLoginEntity> list() {
List<FxjOtherLoginEntity> listFxjOtherLogins=fxjOtherLoginService.getList(FxjOtherLoginEntity.class);
return listFxjOtherLogins;
}
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
@ResponseBody
public ResponseEntity<?> get(@PathVariable("id") String id) {
FxjOtherLoginEntity task = fxjOtherLoginService.get(FxjOtherLoginEntity.class, id);
if (task == null) {
return new ResponseEntity(HttpStatus.NOT_FOUND);
}
return new ResponseEntity(task, HttpStatus.OK);
}
@RequestMapping(method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
@ResponseBody
public ResponseEntity<?> create(@RequestBody FxjOtherLoginEntity fxjOtherLogin, UriComponentsBuilder uriBuilder) {
//调用JSR303 Bean Validator进行校验如果出错返回含400错误码及json格式的错误信息.
Set<ConstraintViolation<FxjOtherLoginEntity>> failures = validator.validate(fxjOtherLogin);
if (!failures.isEmpty()) {
return new ResponseEntity(BeanValidators.extractPropertyAndMessage(failures), HttpStatus.BAD_REQUEST);
}
//保存
try{
fxjOtherLoginService.save(fxjOtherLogin);
} catch (Exception e) {
e.printStackTrace();
return new ResponseEntity(HttpStatus.NO_CONTENT);
}
//按照Restful风格约定创建指向新任务的url, 也可以直接返回id或对象.
String id = fxjOtherLogin.getId();
URI uri = uriBuilder.path("/rest/fxjOtherLoginController/" + id).build().toUri();
HttpHeaders headers = new HttpHeaders();
headers.setLocation(uri);
return new ResponseEntity(headers, HttpStatus.CREATED);
}
@RequestMapping(value = "/{id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<?> update(@RequestBody FxjOtherLoginEntity fxjOtherLogin) {
//调用JSR303 Bean Validator进行校验如果出错返回含400错误码及json格式的错误信息.
Set<ConstraintViolation<FxjOtherLoginEntity>> failures = validator.validate(fxjOtherLogin);
if (!failures.isEmpty()) {
return new ResponseEntity(BeanValidators.extractPropertyAndMessage(failures), HttpStatus.BAD_REQUEST);
}
//保存
try{
fxjOtherLoginService.saveOrUpdate(fxjOtherLogin);
} catch (Exception e) {
e.printStackTrace();
return new ResponseEntity(HttpStatus.NO_CONTENT);
}
//按Restful约定返回204状态码, 无内容. 也可以返回200状态码.
return new ResponseEntity(HttpStatus.NO_CONTENT);
}
@RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
@ResponseStatus(HttpStatus.NO_CONTENT)
public void delete(@PathVariable("id") String id) {
fxjOtherLoginService.deleteEntityById(FxjOtherLoginEntity.class, id);
}
}

View File

@ -0,0 +1,406 @@
package com.zzjee.conf.controller;
import com.zzjee.conf.entity.WxConfigEntity;
import com.zzjee.conf.service.WxConfigServiceI;
import java.util.ArrayList;
import java.util.List;
import java.text.SimpleDateFormat;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import org.jeecgframework.core.common.controller.BaseController;
import org.jeecgframework.core.common.exception.BusinessException;
import org.jeecgframework.core.common.hibernate.qbc.CriteriaQuery;
import org.jeecgframework.core.common.model.common.TreeChildCount;
import org.jeecgframework.core.common.model.json.AjaxJson;
import org.jeecgframework.core.common.model.json.DataGrid;
import org.jeecgframework.core.constant.Globals;
import org.jeecgframework.core.util.StringUtil;
import org.jeecgframework.tag.core.easyui.TagUtil;
import org.jeecgframework.web.system.pojo.base.TSDepart;
import org.jeecgframework.web.system.service.SystemService;
import org.jeecgframework.core.util.MyBeanUtils;
import java.io.OutputStream;
import org.jeecgframework.core.util.BrowserUtils;
import org.jeecgframework.poi.excel.ExcelExportUtil;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.entity.TemplateExportParams;
import org.jeecgframework.poi.excel.entity.vo.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.vo.TemplateExcelConstants;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.jeecgframework.core.util.ResourceUtil;
import java.io.IOException;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import java.util.Map;
import java.util.HashMap;
import org.jeecgframework.core.util.ExceptionUtil;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.jeecgframework.core.beanvalidator.BeanValidators;
import java.util.Set;
import javax.validation.ConstraintViolation;
import javax.validation.Validator;
import java.net.URI;
import org.springframework.http.MediaType;
import org.springframework.web.util.UriComponentsBuilder;
/**
* @Title: Controller
* @Description:
* @author onlineGenerator
* @date 2019-04-21 23:11:10
* @version V1.0
*
*/
@Controller
@RequestMapping("/wxConfigController")
public class WxConfigController extends BaseController {
/**
* Logger for this class
*/
private static final Logger logger = Logger.getLogger(WxConfigController.class);
@Autowired
private WxConfigServiceI wxConfigService;
@Autowired
private SystemService systemService;
@Autowired
private Validator validator;
/**
*
*
* @return
*/
@RequestMapping(params = "list")
public ModelAndView list(HttpServletRequest request) {
return new ModelAndView("com/zzjee/conf/wxConfigList");
}
/**
* easyui AJAX
*
* @param request
* @param response
* @param dataGrid
* @param user
*/
@RequestMapping(params = "datagrid")
public void datagrid(WxConfigEntity wxConfig,HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) {
CriteriaQuery cq = new CriteriaQuery(WxConfigEntity.class, dataGrid);
//查询条件组装器
org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, wxConfig, request.getParameterMap());
try{
//自定义追加查询条件
}catch (Exception e) {
throw new BusinessException(e.getMessage());
}
cq.add();
this.wxConfigService.getDataGridReturn(cq, true);
TagUtil.datagrid(response, dataGrid);
}
/**
*
*
* @return
*/
@RequestMapping(params = "doDel")
@ResponseBody
public AjaxJson doDel(WxConfigEntity wxConfig, HttpServletRequest request) {
String message = null;
AjaxJson j = new AjaxJson();
wxConfig = systemService.getEntity(WxConfigEntity.class, wxConfig.getId());
message = "配置信息删除成功";
try{
wxConfigService.delete(wxConfig);
systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO);
}catch(Exception e){
e.printStackTrace();
message = "配置信息删除失败";
throw new BusinessException(e.getMessage());
}
j.setMsg(message);
return j;
}
/**
*
*
* @return
*/
@RequestMapping(params = "doBatchDel")
@ResponseBody
public AjaxJson doBatchDel(String ids,HttpServletRequest request){
String message = null;
AjaxJson j = new AjaxJson();
message = "配置信息删除成功";
try{
for(String id:ids.split(",")){
WxConfigEntity wxConfig = systemService.getEntity(WxConfigEntity.class,
id
);
wxConfigService.delete(wxConfig);
systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO);
}
}catch(Exception e){
e.printStackTrace();
message = "配置信息删除失败";
throw new BusinessException(e.getMessage());
}
j.setMsg(message);
return j;
}
/**
*
*
* @param ids
* @return
*/
@RequestMapping(params = "doAdd")
@ResponseBody
public AjaxJson doAdd(WxConfigEntity wxConfig, HttpServletRequest request) {
String message = null;
AjaxJson j = new AjaxJson();
message = "配置信息添加成功";
try{
wxConfigService.save(wxConfig);
systemService.addLog(message, Globals.Log_Type_INSERT, Globals.Log_Leavel_INFO);
}catch(Exception e){
e.printStackTrace();
message = "配置信息添加失败";
throw new BusinessException(e.getMessage());
}
j.setMsg(message);
return j;
}
/**
*
*
* @param ids
* @return
*/
@RequestMapping(params = "doUpdate")
@ResponseBody
public AjaxJson doUpdate(WxConfigEntity wxConfig, HttpServletRequest request) {
String message = null;
AjaxJson j = new AjaxJson();
message = "配置信息更新成功";
WxConfigEntity t = wxConfigService.get(WxConfigEntity.class, wxConfig.getId());
try {
MyBeanUtils.copyBeanNotNull2Bean(wxConfig, t);
wxConfigService.saveOrUpdate(t);
systemService.addLog(message, Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO);
} catch (Exception e) {
e.printStackTrace();
message = "配置信息更新失败";
throw new BusinessException(e.getMessage());
}
j.setMsg(message);
return j;
}
/**
*
*
* @return
*/
@RequestMapping(params = "goAdd")
public ModelAndView goAdd(WxConfigEntity wxConfig, HttpServletRequest req) {
if (StringUtil.isNotEmpty(wxConfig.getId())) {
wxConfig = wxConfigService.getEntity(WxConfigEntity.class, wxConfig.getId());
req.setAttribute("wxConfigPage", wxConfig);
}
return new ModelAndView("com/zzjee/conf/wxConfig-add");
}
/**
*
*
* @return
*/
@RequestMapping(params = "goUpdate")
public ModelAndView goUpdate(WxConfigEntity wxConfig, HttpServletRequest req) {
if (StringUtil.isNotEmpty(wxConfig.getId())) {
wxConfig = wxConfigService.getEntity(WxConfigEntity.class, wxConfig.getId());
req.setAttribute("wxConfigPage", wxConfig);
}
return new ModelAndView("com/zzjee/conf/wxConfig-update");
}
/**
*
*
* @return
*/
@RequestMapping(params = "upload")
public ModelAndView upload(HttpServletRequest req) {
req.setAttribute("controller_name","wxConfigController");
return new ModelAndView("common/upload/pub_excel_upload");
}
/**
* excel
*
* @param request
* @param response
*/
@RequestMapping(params = "exportXls")
public String exportXls(WxConfigEntity wxConfig,HttpServletRequest request,HttpServletResponse response
, DataGrid dataGrid,ModelMap modelMap) {
CriteriaQuery cq = new CriteriaQuery(WxConfigEntity.class, dataGrid);
org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, wxConfig, request.getParameterMap());
List<WxConfigEntity> wxConfigs = this.wxConfigService.getListByCriteriaQuery(cq,false);
modelMap.put(NormalExcelConstants.FILE_NAME,"配置信息");
modelMap.put(NormalExcelConstants.CLASS,WxConfigEntity.class);
modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("配置信息列表", "导出人:"+ResourceUtil.getSessionUserName().getRealName(),
"导出信息"));
modelMap.put(NormalExcelConstants.DATA_LIST,wxConfigs);
return NormalExcelConstants.JEECG_EXCEL_VIEW;
}
/**
* excel 使
*
* @param request
* @param response
*/
@RequestMapping(params = "exportXlsByT")
public String exportXlsByT(WxConfigEntity wxConfig,HttpServletRequest request,HttpServletResponse response
, DataGrid dataGrid,ModelMap modelMap) {
modelMap.put(NormalExcelConstants.FILE_NAME,"配置信息");
modelMap.put(NormalExcelConstants.CLASS,WxConfigEntity.class);
modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("配置信息列表", "导出人:"+ResourceUtil.getSessionUserName().getRealName(),
"导出信息"));
modelMap.put(NormalExcelConstants.DATA_LIST,new ArrayList());
return NormalExcelConstants.JEECG_EXCEL_VIEW;
}
@SuppressWarnings("unchecked")
@RequestMapping(params = "importExcel", method = RequestMethod.POST)
@ResponseBody
public AjaxJson importExcel(HttpServletRequest request, HttpServletResponse response) {
AjaxJson j = new AjaxJson();
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
MultipartFile file = entity.getValue();// 获取上传文件对象
ImportParams params = new ImportParams();
params.setTitleRows(2);
params.setHeadRows(1);
params.setNeedSave(true);
try {
List<WxConfigEntity> listWxConfigEntitys = ExcelImportUtil.importExcel(file.getInputStream(),WxConfigEntity.class,params);
for (WxConfigEntity wxConfig : listWxConfigEntitys) {
wxConfigService.save(wxConfig);
}
j.setMsg("文件导入成功!");
} catch (Exception e) {
j.setMsg("文件导入失败!");
logger.error(ExceptionUtil.getExceptionMessage(e));
}finally{
try {
file.getInputStream().close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
return j;
}
@RequestMapping(method = RequestMethod.GET)
@ResponseBody
public List<WxConfigEntity> list() {
List<WxConfigEntity> listWxConfigs=wxConfigService.getList(WxConfigEntity.class);
return listWxConfigs;
}
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
@ResponseBody
public ResponseEntity<?> get(@PathVariable("id") String id) {
WxConfigEntity task = wxConfigService.get(WxConfigEntity.class, id);
if (task == null) {
return new ResponseEntity(HttpStatus.NOT_FOUND);
}
return new ResponseEntity(task, HttpStatus.OK);
}
@RequestMapping(method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
@ResponseBody
public ResponseEntity<?> create(@RequestBody WxConfigEntity wxConfig, UriComponentsBuilder uriBuilder) {
//调用JSR303 Bean Validator进行校验如果出错返回含400错误码及json格式的错误信息.
Set<ConstraintViolation<WxConfigEntity>> failures = validator.validate(wxConfig);
if (!failures.isEmpty()) {
return new ResponseEntity(BeanValidators.extractPropertyAndMessage(failures), HttpStatus.BAD_REQUEST);
}
//保存
try{
wxConfigService.save(wxConfig);
} catch (Exception e) {
e.printStackTrace();
return new ResponseEntity(HttpStatus.NO_CONTENT);
}
//按照Restful风格约定创建指向新任务的url, 也可以直接返回id或对象.
String id = wxConfig.getId();
URI uri = uriBuilder.path("/rest/wxConfigController/" + id).build().toUri();
HttpHeaders headers = new HttpHeaders();
headers.setLocation(uri);
return new ResponseEntity(headers, HttpStatus.CREATED);
}
@RequestMapping(value = "/{id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<?> update(@RequestBody WxConfigEntity wxConfig) {
//调用JSR303 Bean Validator进行校验如果出错返回含400错误码及json格式的错误信息.
Set<ConstraintViolation<WxConfigEntity>> failures = validator.validate(wxConfig);
if (!failures.isEmpty()) {
return new ResponseEntity(BeanValidators.extractPropertyAndMessage(failures), HttpStatus.BAD_REQUEST);
}
//保存
try{
wxConfigService.saveOrUpdate(wxConfig);
} catch (Exception e) {
e.printStackTrace();
return new ResponseEntity(HttpStatus.NO_CONTENT);
}
//按Restful约定返回204状态码, 无内容. 也可以返回200状态码.
return new ResponseEntity(HttpStatus.NO_CONTENT);
}
@RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
@ResponseStatus(HttpStatus.NO_CONTENT)
public void delete(@PathVariable("id") String id) {
wxConfigService.deleteEntityById(WxConfigEntity.class, id);
}
}

View File

@ -0,0 +1,378 @@
package com.zzjee.conf.entity;
import java.math.BigDecimal;
import java.util.Date;
import java.lang.String;
import java.lang.Double;
import java.lang.Integer;
import java.math.BigDecimal;
import javax.xml.soap.Text;
import java.sql.Blob;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;
import javax.persistence.SequenceGenerator;
import org.jeecgframework.poi.excel.annotation.Excel;
/**
* @Title: Entity
* @Description:
* @author onlineGenerator
* @date 2019-04-21 23:11:19
* @version V1.0
*
*/
@Entity
@Table(name = "fxj_other_login", schema = "")
@SuppressWarnings("serial")
public class FxjOtherLoginEntity implements java.io.Serializable {
/**主键*/
private String id;
/**创建人名称*/
@Excel(name="创建人名称")
private String createName;
/**创建人登录名称*/
@Excel(name="创建人登录名称")
private String createBy;
/**创建日期*/
@Excel(name="创建日期",format = "yyyy-MM-dd")
private Date createDate;
/**更新人名称*/
@Excel(name="更新人名称")
private String updateName;
/**更新人登录名称*/
@Excel(name="更新人登录名称")
private String updateBy;
/**更新日期*/
@Excel(name="更新日期",format = "yyyy-MM-dd")
private Date updateDate;
/**所属部门*/
@Excel(name="所属部门")
private String sysOrgCode;
/**所属公司*/
@Excel(name="所属公司")
private String sysCompanyCode;
/**流程状态*/
@Excel(name="流程状态")
private String bpmStatus;
/**用户名*/
@Excel(name="用户名")
private String username;
/**姓名*/
@Excel(name="姓名")
private String realname;
/**三方id*/
@Excel(name="三方id")
private String otherid;
/**三方1*/
@Excel(name="三方1")
private String otherre1;
/**三方2*/
@Excel(name="三方2")
private String otherre2;
/**三方3*/
@Excel(name="三方3")
private String otherre3;
/**三方4*/
@Excel(name="三方4")
private String otherre4;
/**登录类型*/
@Excel(name="登录类型")
private String otherType;
/**
*: java.lang.String
*@return: java.lang.String
*/
@Id
@GeneratedValue(generator = "paymentableGenerator")
@GenericGenerator(name = "paymentableGenerator", strategy = "uuid")
@Column(name ="ID",nullable=false,length=36)
public String getId(){
return this.id;
}
/**
*: java.lang.String
*@param: java.lang.String
*/
public void setId(String id){
this.id = id;
}
/**
*: java.lang.String
*@return: java.lang.String
*/
@Column(name ="CREATE_NAME",nullable=true,length=50)
public String getCreateName(){
return this.createName;
}
/**
*: java.lang.String
*@param: java.lang.String
*/
public void setCreateName(String createName){
this.createName = createName;
}
/**
*: java.lang.String
*@return: java.lang.String
*/
@Column(name ="CREATE_BY",nullable=true,length=50)
public String getCreateBy(){
return this.createBy;
}
/**
*: java.lang.String
*@param: java.lang.String
*/
public void setCreateBy(String createBy){
this.createBy = createBy;
}
/**
*: java.util.Date
*@return: java.util.Date
*/
@Column(name ="CREATE_DATE",nullable=true)
public Date getCreateDate(){
return this.createDate;
}
/**
*: java.util.Date
*@param: java.util.Date
*/
public void setCreateDate(Date createDate){
this.createDate = createDate;
}
/**
*: java.lang.String
*@return: java.lang.String
*/
@Column(name ="UPDATE_NAME",nullable=true,length=50)
public String getUpdateName(){
return this.updateName;
}
/**
*: java.lang.String
*@param: java.lang.String
*/
public void setUpdateName(String updateName){
this.updateName = updateName;
}
/**
*: java.lang.String
*@return: java.lang.String
*/
@Column(name ="UPDATE_BY",nullable=true,length=50)
public String getUpdateBy(){
return this.updateBy;
}
/**
*: java.lang.String
*@param: java.lang.String
*/
public void setUpdateBy(String updateBy){
this.updateBy = updateBy;
}
/**
*: java.util.Date
*@return: java.util.Date
*/
@Column(name ="UPDATE_DATE",nullable=true)
public Date getUpdateDate(){
return this.updateDate;
}
/**
*: java.util.Date
*@param: java.util.Date
*/
public void setUpdateDate(Date updateDate){
this.updateDate = updateDate;
}
/**
*: java.lang.String
*@return: java.lang.String
*/
@Column(name ="SYS_ORG_CODE",nullable=true,length=50)
public String getSysOrgCode(){
return this.sysOrgCode;
}
/**
*: java.lang.String
*@param: java.lang.String
*/
public void setSysOrgCode(String sysOrgCode){
this.sysOrgCode = sysOrgCode;
}
/**
*: java.lang.String
*@return: java.lang.String
*/
@Column(name ="SYS_COMPANY_CODE",nullable=true,length=50)
public String getSysCompanyCode(){
return this.sysCompanyCode;
}
/**
*: java.lang.String
*@param: java.lang.String
*/
public void setSysCompanyCode(String sysCompanyCode){
this.sysCompanyCode = sysCompanyCode;
}
/**
*: java.lang.String
*@return: java.lang.String
*/
@Column(name ="BPM_STATUS",nullable=true,length=32)
public String getBpmStatus(){
return this.bpmStatus;
}
/**
*: java.lang.String
*@param: java.lang.String
*/
public void setBpmStatus(String bpmStatus){
this.bpmStatus = bpmStatus;
}
/**
*: java.lang.String
*@return: java.lang.String
*/
@Column(name ="USERNAME",nullable=true,length=32)
public String getUsername(){
return this.username;
}
/**
*: java.lang.String
*@param: java.lang.String
*/
public void setUsername(String username){
this.username = username;
}
/**
*: java.lang.String
*@return: java.lang.String
*/
@Column(name ="REALNAME",nullable=true,length=32)
public String getRealname(){
return this.realname;
}
/**
*: java.lang.String
*@param: java.lang.String
*/
public void setRealname(String realname){
this.realname = realname;
}
/**
*: java.lang.String
*@return: java.lang.String id
*/
@Column(name ="OTHERID",nullable=true,length=232)
public String getOtherid(){
return this.otherid;
}
/**
*: java.lang.String
*@param: java.lang.String id
*/
public void setOtherid(String otherid){
this.otherid = otherid;
}
/**
*: java.lang.String
*@return: java.lang.String 1
*/
@Column(name ="OTHERRE1",nullable=true,length=232)
public String getOtherre1(){
return this.otherre1;
}
/**
*: java.lang.String
*@param: java.lang.String 1
*/
public void setOtherre1(String otherre1){
this.otherre1 = otherre1;
}
/**
*: java.lang.String
*@return: java.lang.String 2
*/
@Column(name ="OTHERRE2",nullable=true,length=232)
public String getOtherre2(){
return this.otherre2;
}
/**
*: java.lang.String
*@param: java.lang.String 2
*/
public void setOtherre2(String otherre2){
this.otherre2 = otherre2;
}
/**
*: java.lang.String
*@return: java.lang.String 3
*/
@Column(name ="OTHERRE3",nullable=true,length=232)
public String getOtherre3(){
return this.otherre3;
}
/**
*: java.lang.String
*@param: java.lang.String 3
*/
public void setOtherre3(String otherre3){
this.otherre3 = otherre3;
}
/**
*: java.lang.String
*@return: java.lang.String 4
*/
@Column(name ="OTHERRE4",nullable=true,length=232)
public String getOtherre4(){
return this.otherre4;
}
/**
*: java.lang.String
*@param: java.lang.String 4
*/
public void setOtherre4(String otherre4){
this.otherre4 = otherre4;
}
/**
*: java.lang.String
*@return: java.lang.String
*/
@Column(name ="OTHER_TYPE",nullable=true,length=32)
public String getOtherType(){
return this.otherType;
}
/**
*: java.lang.String
*@param: java.lang.String
*/
public void setOtherType(String otherType){
this.otherType = otherType;
}
}

View File

@ -0,0 +1,473 @@
package com.zzjee.conf.entity;
import java.math.BigDecimal;
import java.util.Date;
import java.lang.String;
import java.lang.Double;
import java.lang.Integer;
import java.math.BigDecimal;
import javax.xml.soap.Text;
import java.sql.Blob;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;
import javax.persistence.SequenceGenerator;
import org.jeecgframework.poi.excel.annotation.Excel;
/**
* @Title: Entity
* @Description:
* @author onlineGenerator
* @date 2019-04-21 23:11:10
* @version V1.0
*
*/
@Entity
@Table(name = "wx_config", schema = "")
@SuppressWarnings("serial")
public class WxConfigEntity implements java.io.Serializable {
/**id*/
private String id;
/**创建人名称*/
@Excel(name="创建人名称")
private String createName;
/**创建人登录名称*/
@Excel(name="创建人登录名称")
private String createBy;
/**创建日期*/
@Excel(name="创建日期",format = "yyyy-MM-dd")
private Date createDate;
/**更新人名称*/
@Excel(name="更新人名称")
private String updateName;
/**更新人登录名称*/
@Excel(name="更新人登录名称")
private String updateBy;
/**更新日期*/
@Excel(name="更新日期",format = "yyyy-MM-dd")
private Date updateDate;
/**所属部门*/
@Excel(name="所属部门")
private String sysOrgCode;
/**所属公司*/
@Excel(name="所属公司")
private String sysCompanyCode;
/**流程状态*/
@Excel(name="流程状态")
private String bpmStatus;
/**前端编码*/
@Excel(name="前端编码")
private String appCode;
/**备注*/
@Excel(name="备注")
private String appRemark;
/**appID*/
@Excel(name="appID")
private String appId;
/**appsecret*/
@Excel(name="appsecret")
private String appSecret;
/**appkey*/
@Excel(name="appkey")
private String appKey;
/**商户号*/
@Excel(name="商户号")
private String mchId;
/**通知地址*/
@Excel(name="通知地址")
private String notifyUrl;
/**GRANT_TYPE*/
@Excel(name="GRANT_TYPE")
private String grantType;
/**备用1*/
@Excel(name="备用1")
private String wxBy1;
/**备用2*/
@Excel(name="备用2")
private String wxBy2;
/**备用3*/
@Excel(name="备用3")
private String wxBy3;
/**备用4*/
@Excel(name="备用4")
private String wxBy4;
/**备用5*/
@Excel(name="备用5")
private String wxBy5;
/**
*: java.lang.String
*@return: java.lang.String id
*/
@Id
@GeneratedValue(generator = "paymentableGenerator")
@GenericGenerator(name = "paymentableGenerator", strategy = "uuid")
@Column(name ="ID",nullable=false,length=36)
public String getId(){
return this.id;
}
/**
*: java.lang.String
*@param: java.lang.String id
*/
public void setId(String id){
this.id = id;
}
/**
*: java.lang.String
*@return: java.lang.String
*/
@Column(name ="CREATE_NAME",nullable=true,length=50)
public String getCreateName(){
return this.createName;
}
/**
*: java.lang.String
*@param: java.lang.String
*/
public void setCreateName(String createName){
this.createName = createName;
}
/**
*: java.lang.String
*@return: java.lang.String
*/
@Column(name ="CREATE_BY",nullable=true,length=50)
public String getCreateBy(){
return this.createBy;
}
/**
*: java.lang.String
*@param: java.lang.String
*/
public void setCreateBy(String createBy){
this.createBy = createBy;
}
/**
*: java.util.Date
*@return: java.util.Date
*/
@Column(name ="CREATE_DATE",nullable=true)
public Date getCreateDate(){
return this.createDate;
}
/**
*: java.util.Date
*@param: java.util.Date
*/
public void setCreateDate(Date createDate){
this.createDate = createDate;
}
/**
*: java.lang.String
*@return: java.lang.String
*/
@Column(name ="UPDATE_NAME",nullable=true,length=50)
public String getUpdateName(){
return this.updateName;
}
/**
*: java.lang.String
*@param: java.lang.String
*/
public void setUpdateName(String updateName){
this.updateName = updateName;
}
/**
*: java.lang.String
*@return: java.lang.String
*/
@Column(name ="UPDATE_BY",nullable=true,length=50)
public String getUpdateBy(){
return this.updateBy;
}
/**
*: java.lang.String
*@param: java.lang.String
*/
public void setUpdateBy(String updateBy){
this.updateBy = updateBy;
}
/**
*: java.util.Date
*@return: java.util.Date
*/
@Column(name ="UPDATE_DATE",nullable=true)
public Date getUpdateDate(){
return this.updateDate;
}
/**
*: java.util.Date
*@param: java.util.Date
*/
public void setUpdateDate(Date updateDate){
this.updateDate = updateDate;
}
/**
*: java.lang.String
*@return: java.lang.String
*/
@Column(name ="SYS_ORG_CODE",nullable=true,length=50)
public String getSysOrgCode(){
return this.sysOrgCode;
}
/**
*: java.lang.String
*@param: java.lang.String
*/
public void setSysOrgCode(String sysOrgCode){
this.sysOrgCode = sysOrgCode;
}
/**
*: java.lang.String
*@return: java.lang.String
*/
@Column(name ="SYS_COMPANY_CODE",nullable=true,length=50)
public String getSysCompanyCode(){
return this.sysCompanyCode;
}
/**
*: java.lang.String
*@param: java.lang.String
*/
public void setSysCompanyCode(String sysCompanyCode){
this.sysCompanyCode = sysCompanyCode;
}
/**
*: java.lang.String
*@return: java.lang.String
*/
@Column(name ="BPM_STATUS",nullable=true,length=32)
public String getBpmStatus(){
return this.bpmStatus;
}
/**
*: java.lang.String
*@param: java.lang.String
*/
public void setBpmStatus(String bpmStatus){
this.bpmStatus = bpmStatus;
}
/**
*: java.lang.String
*@return: java.lang.String
*/
@Column(name ="APP_CODE",nullable=true,length=32)
public String getAppCode(){
return this.appCode;
}
/**
*: java.lang.String
*@param: java.lang.String
*/
public void setAppCode(String appCode){
this.appCode = appCode;
}
/**
*: java.lang.String
*@return: java.lang.String
*/
@Column(name ="APP_REMARK",nullable=true,length=32)
public String getAppRemark(){
return this.appRemark;
}
/**
*: java.lang.String
*@param: java.lang.String
*/
public void setAppRemark(String appRemark){
this.appRemark = appRemark;
}
/**
*: java.lang.String
*@return: java.lang.String appID
*/
@Column(name ="APP_ID",nullable=true)
public String getAppId(){
return this.appId;
}
/**
*: java.lang.String
*@param: java.lang.String appID
*/
public void setAppId(String appId){
this.appId = appId;
}
/**
*: java.lang.String
*@return: java.lang.String appsecret
*/
@Column(name ="APP_SECRET",nullable=true)
public String getAppSecret(){
return this.appSecret;
}
/**
*: java.lang.String
*@param: java.lang.String appsecret
*/
public void setAppSecret(String appSecret){
this.appSecret = appSecret;
}
/**
*: java.lang.String
*@return: java.lang.String appkey
*/
@Column(name ="APP_KEY",nullable=true,length=132)
public String getAppKey(){
return this.appKey;
}
/**
*: java.lang.String
*@param: java.lang.String appkey
*/
public void setAppKey(String appKey){
this.appKey = appKey;
}
/**
*: java.lang.String
*@return: java.lang.String
*/
@Column(name ="MCH_ID",nullable=true,length=32)
public String getMchId(){
return this.mchId;
}
/**
*: java.lang.String
*@param: java.lang.String
*/
public void setMchId(String mchId){
this.mchId = mchId;
}
/**
*: java.lang.String
*@return: java.lang.String
*/
@Column(name ="NOTIFY_URL",nullable=true,length=132)
public String getNotifyUrl(){
return this.notifyUrl;
}
/**
*: java.lang.String
*@param: java.lang.String
*/
public void setNotifyUrl(String notifyUrl){
this.notifyUrl = notifyUrl;
}
/**
*: java.lang.String
*@return: java.lang.String GRANT_TYPE
*/
@Column(name ="GRANT_TYPE",nullable=true)
public String getGrantType(){
return this.grantType;
}
/**
*: java.lang.String
*@param: java.lang.String GRANT_TYPE
*/
public void setGrantType(String grantType){
this.grantType = grantType;
}
/**
*: java.lang.String
*@return: java.lang.String 1
*/
@Column(name ="WX_BY1",nullable=true)
public String getWxBy1(){
return this.wxBy1;
}
/**
*: java.lang.String
*@param: java.lang.String 1
*/
public void setWxBy1(String wxBy1){
this.wxBy1 = wxBy1;
}
/**
*: java.lang.String
*@return: java.lang.String 2
*/
@Column(name ="WX_BY2",nullable=true)
public String getWxBy2(){
return this.wxBy2;
}
/**
*: java.lang.String
*@param: java.lang.String 2
*/
public void setWxBy2(String wxBy2){
this.wxBy2 = wxBy2;
}
/**
*: java.lang.String
*@return: java.lang.String 3
*/
@Column(name ="WX_BY3",nullable=true)
public String getWxBy3(){
return this.wxBy3;
}
/**
*: java.lang.String
*@param: java.lang.String 3
*/
public void setWxBy3(String wxBy3){
this.wxBy3 = wxBy3;
}
/**
*: java.lang.String
*@return: java.lang.String 4
*/
@Column(name ="WX_BY4",nullable=true)
public String getWxBy4(){
return this.wxBy4;
}
/**
*: java.lang.String
*@param: java.lang.String 4
*/
public void setWxBy4(String wxBy4){
this.wxBy4 = wxBy4;
}
/**
*: java.lang.String
*@return: java.lang.String 5
*/
@Column(name ="WX_BY5",nullable=true)
public String getWxBy5(){
return this.wxBy5;
}
/**
*: java.lang.String
*@param: java.lang.String 5
*/
public void setWxBy5(String wxBy5){
this.wxBy5 = wxBy5;
}
}

View File

@ -0,0 +1,15 @@
package com.zzjee.conf.service;
import com.zzjee.conf.entity.FxjOtherLoginEntity;
import org.jeecgframework.core.common.service.CommonService;
import java.io.Serializable;
public interface FxjOtherLoginServiceI extends CommonService{
public void delete(FxjOtherLoginEntity entity) throws Exception;
public Serializable save(FxjOtherLoginEntity entity) throws Exception;
public void saveOrUpdate(FxjOtherLoginEntity entity) throws Exception;
}

View File

@ -0,0 +1,15 @@
package com.zzjee.conf.service;
import com.zzjee.conf.entity.WxConfigEntity;
import org.jeecgframework.core.common.service.CommonService;
import java.io.Serializable;
public interface WxConfigServiceI extends CommonService{
public void delete(WxConfigEntity entity) throws Exception;
public Serializable save(WxConfigEntity entity) throws Exception;
public void saveOrUpdate(WxConfigEntity entity) throws Exception;
}

View File

@ -0,0 +1,152 @@
package com.zzjee.conf.service.impl;
import com.zzjee.conf.service.FxjOtherLoginServiceI;
import org.jeecgframework.core.common.service.impl.CommonServiceImpl;
import com.zzjee.conf.entity.FxjOtherLoginEntity;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import java.io.Serializable;
import org.jeecgframework.core.util.ApplicationContextUtil;
import org.jeecgframework.core.util.MyClassLoader;
import org.jeecgframework.core.util.StringUtil;
import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
@Service("fxjOtherLoginService")
@Transactional
public class FxjOtherLoginServiceImpl extends CommonServiceImpl implements FxjOtherLoginServiceI {
public void delete(FxjOtherLoginEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(FxjOtherLoginEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(FxjOtherLoginEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
}
/**
*
* @param t
* @return
*/
private void doAddBus(FxjOtherLoginEntity t) throws Exception{
//-----------------sql增强 start----------------------------
//-----------------sql增强 end------------------------------
//-----------------java增强 start---------------------------
//-----------------java增强 end-----------------------------
}
/**
*
* @param t
* @return
*/
private void doUpdateBus(FxjOtherLoginEntity t) throws Exception{
//-----------------sql增强 start----------------------------
//-----------------sql增强 end------------------------------
//-----------------java增强 start---------------------------
//-----------------java增强 end-----------------------------
}
/**
*
* @param id
* @return
*/
private void doDelBus(FxjOtherLoginEntity t) throws Exception{
//-----------------sql增强 start----------------------------
//-----------------sql增强 end------------------------------
//-----------------java增强 start---------------------------
//-----------------java增强 end-----------------------------
}
private Map<String,Object> populationMap(FxjOtherLoginEntity t){
Map<String,Object> map = new HashMap<String,Object>();
map.put("id", t.getId());
map.put("create_name", t.getCreateName());
map.put("create_by", t.getCreateBy());
map.put("create_date", t.getCreateDate());
map.put("update_name", t.getUpdateName());
map.put("update_by", t.getUpdateBy());
map.put("update_date", t.getUpdateDate());
map.put("sys_org_code", t.getSysOrgCode());
map.put("sys_company_code", t.getSysCompanyCode());
map.put("bpm_status", t.getBpmStatus());
map.put("username", t.getUsername());
map.put("realname", t.getRealname());
map.put("otherid", t.getOtherid());
map.put("otherre1", t.getOtherre1());
map.put("otherre2", t.getOtherre2());
map.put("otherre3", t.getOtherre3());
map.put("otherre4", t.getOtherre4());
map.put("other_type", t.getOtherType());
return map;
}
/**
* sql
* @param sql
* @param t
* @return
*/
public String replaceVal(String sql,FxjOtherLoginEntity t){
sql = sql.replace("#{id}",String.valueOf(t.getId()));
sql = sql.replace("#{create_name}",String.valueOf(t.getCreateName()));
sql = sql.replace("#{create_by}",String.valueOf(t.getCreateBy()));
sql = sql.replace("#{create_date}",String.valueOf(t.getCreateDate()));
sql = sql.replace("#{update_name}",String.valueOf(t.getUpdateName()));
sql = sql.replace("#{update_by}",String.valueOf(t.getUpdateBy()));
sql = sql.replace("#{update_date}",String.valueOf(t.getUpdateDate()));
sql = sql.replace("#{sys_org_code}",String.valueOf(t.getSysOrgCode()));
sql = sql.replace("#{sys_company_code}",String.valueOf(t.getSysCompanyCode()));
sql = sql.replace("#{bpm_status}",String.valueOf(t.getBpmStatus()));
sql = sql.replace("#{username}",String.valueOf(t.getUsername()));
sql = sql.replace("#{realname}",String.valueOf(t.getRealname()));
sql = sql.replace("#{otherid}",String.valueOf(t.getOtherid()));
sql = sql.replace("#{otherre1}",String.valueOf(t.getOtherre1()));
sql = sql.replace("#{otherre2}",String.valueOf(t.getOtherre2()));
sql = sql.replace("#{otherre3}",String.valueOf(t.getOtherre3()));
sql = sql.replace("#{otherre4}",String.valueOf(t.getOtherre4()));
sql = sql.replace("#{other_type}",String.valueOf(t.getOtherType()));
sql = sql.replace("#{UUID}",UUID.randomUUID().toString());
return sql;
}
/**
* JAVA
*/
private void executeJavaExtend(String cgJavaType,String cgJavaValue,Map<String,Object> data) throws Exception {
if(StringUtil.isNotEmpty(cgJavaValue)){
Object obj = null;
try {
if("class".equals(cgJavaType)){
//因新增时已经校验了实例化是否可以成功,所以这块就不需要再做一次判断
obj = MyClassLoader.getClassByScn(cgJavaValue).newInstance();
}else if("spring".equals(cgJavaType)){
obj = ApplicationContextUtil.getContext().getBean(cgJavaValue);
}
if(obj instanceof CgformEnhanceJavaInter){
CgformEnhanceJavaInter javaInter = (CgformEnhanceJavaInter) obj;
javaInter.execute("fxj_other_login",data);
}
} catch (Exception e) {
e.printStackTrace();
throw new Exception("执行JAVA增强出现异常");
}
}
}
}

View File

@ -0,0 +1,162 @@
package com.zzjee.conf.service.impl;
import com.zzjee.conf.service.WxConfigServiceI;
import org.jeecgframework.core.common.service.impl.CommonServiceImpl;
import com.zzjee.conf.entity.WxConfigEntity;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import java.io.Serializable;
import org.jeecgframework.core.util.ApplicationContextUtil;
import org.jeecgframework.core.util.MyClassLoader;
import org.jeecgframework.core.util.StringUtil;
import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
@Service("wxConfigService")
@Transactional
public class WxConfigServiceImpl extends CommonServiceImpl implements WxConfigServiceI {
public void delete(WxConfigEntity entity) throws Exception{
super.delete(entity);
//执行删除操作增强业务
this.doDelBus(entity);
}
public Serializable save(WxConfigEntity entity) throws Exception{
Serializable t = super.save(entity);
//执行新增操作增强业务
this.doAddBus(entity);
return t;
}
public void saveOrUpdate(WxConfigEntity entity) throws Exception{
super.saveOrUpdate(entity);
//执行更新操作增强业务
this.doUpdateBus(entity);
}
/**
*
* @param t
* @return
*/
private void doAddBus(WxConfigEntity t) throws Exception{
//-----------------sql增强 start----------------------------
//-----------------sql增强 end------------------------------
//-----------------java增强 start---------------------------
//-----------------java增强 end-----------------------------
}
/**
*
* @param t
* @return
*/
private void doUpdateBus(WxConfigEntity t) throws Exception{
//-----------------sql增强 start----------------------------
//-----------------sql增强 end------------------------------
//-----------------java增强 start---------------------------
//-----------------java增强 end-----------------------------
}
/**
*
* @param id
* @return
*/
private void doDelBus(WxConfigEntity t) throws Exception{
//-----------------sql增强 start----------------------------
//-----------------sql增强 end------------------------------
//-----------------java增强 start---------------------------
//-----------------java增强 end-----------------------------
}
private Map<String,Object> populationMap(WxConfigEntity t){
Map<String,Object> map = new HashMap<String,Object>();
map.put("id", t.getId());
map.put("create_name", t.getCreateName());
map.put("create_by", t.getCreateBy());
map.put("create_date", t.getCreateDate());
map.put("update_name", t.getUpdateName());
map.put("update_by", t.getUpdateBy());
map.put("update_date", t.getUpdateDate());
map.put("sys_org_code", t.getSysOrgCode());
map.put("sys_company_code", t.getSysCompanyCode());
map.put("bpm_status", t.getBpmStatus());
map.put("app_code", t.getAppCode());
map.put("app_remark", t.getAppRemark());
map.put("app_id", t.getAppId());
map.put("app_secret", t.getAppSecret());
map.put("app_key", t.getAppKey());
map.put("mch_id", t.getMchId());
map.put("notify_url", t.getNotifyUrl());
map.put("grant_type", t.getGrantType());
map.put("wx_by1", t.getWxBy1());
map.put("wx_by2", t.getWxBy2());
map.put("wx_by3", t.getWxBy3());
map.put("wx_by4", t.getWxBy4());
map.put("wx_by5", t.getWxBy5());
return map;
}
/**
* sql
* @param sql
* @param t
* @return
*/
public String replaceVal(String sql,WxConfigEntity t){
sql = sql.replace("#{id}",String.valueOf(t.getId()));
sql = sql.replace("#{create_name}",String.valueOf(t.getCreateName()));
sql = sql.replace("#{create_by}",String.valueOf(t.getCreateBy()));
sql = sql.replace("#{create_date}",String.valueOf(t.getCreateDate()));
sql = sql.replace("#{update_name}",String.valueOf(t.getUpdateName()));
sql = sql.replace("#{update_by}",String.valueOf(t.getUpdateBy()));
sql = sql.replace("#{update_date}",String.valueOf(t.getUpdateDate()));
sql = sql.replace("#{sys_org_code}",String.valueOf(t.getSysOrgCode()));
sql = sql.replace("#{sys_company_code}",String.valueOf(t.getSysCompanyCode()));
sql = sql.replace("#{bpm_status}",String.valueOf(t.getBpmStatus()));
sql = sql.replace("#{app_code}",String.valueOf(t.getAppCode()));
sql = sql.replace("#{app_remark}",String.valueOf(t.getAppRemark()));
sql = sql.replace("#{app_id}",String.valueOf(t.getAppId()));
sql = sql.replace("#{app_secret}",String.valueOf(t.getAppSecret()));
sql = sql.replace("#{app_key}",String.valueOf(t.getAppKey()));
sql = sql.replace("#{mch_id}",String.valueOf(t.getMchId()));
sql = sql.replace("#{notify_url}",String.valueOf(t.getNotifyUrl()));
sql = sql.replace("#{grant_type}",String.valueOf(t.getGrantType()));
sql = sql.replace("#{wx_by1}",String.valueOf(t.getWxBy1()));
sql = sql.replace("#{wx_by2}",String.valueOf(t.getWxBy2()));
sql = sql.replace("#{wx_by3}",String.valueOf(t.getWxBy3()));
sql = sql.replace("#{wx_by4}",String.valueOf(t.getWxBy4()));
sql = sql.replace("#{wx_by5}",String.valueOf(t.getWxBy5()));
sql = sql.replace("#{UUID}",UUID.randomUUID().toString());
return sql;
}
/**
* JAVA
*/
private void executeJavaExtend(String cgJavaType,String cgJavaValue,Map<String,Object> data) throws Exception {
if(StringUtil.isNotEmpty(cgJavaValue)){
Object obj = null;
try {
if("class".equals(cgJavaType)){
//因新增时已经校验了实例化是否可以成功,所以这块就不需要再做一次判断
obj = MyClassLoader.getClassByScn(cgJavaValue).newInstance();
}else if("spring".equals(cgJavaType)){
obj = ApplicationContextUtil.getContext().getBean(cgJavaValue);
}
if(obj instanceof CgformEnhanceJavaInter){
CgformEnhanceJavaInter javaInter = (CgformEnhanceJavaInter) obj;
javaInter.execute("wx_config",data);
}
} catch (Exception e) {
e.printStackTrace();
throw new Exception("执行JAVA增强出现异常");
}
}
}
}

View File

@ -54,6 +54,10 @@ public class MdGoodsEntity implements java.io.Serializable {
/**商品名称*/
@Excel(name="商品名称")
private java.lang.String shpMingCheng;
@Excel(name="英文名称")
private java.lang.String ywMingCheng;
@Excel(name="日文名称")
private java.lang.String rwMingCheng;
/**商品简称*/
private java.lang.String shpJianCheng;
/**商品编码*/
@ -878,4 +882,22 @@ public class MdGoodsEntity implements java.io.Serializable {
public void setZhuangTai(java.lang.String zhuangTai){
this.zhuangTai = zhuangTai;
}
@Column(name ="YW_MING_CHENG",nullable=true,length=32)
public String getYwMingCheng() {
return ywMingCheng;
}
public void setYwMingCheng(String ywMingCheng) {
this.ywMingCheng = ywMingCheng;
}
@Column(name ="RW_MING_CHENG",nullable=true,length=32)
public String getRwMingCheng() {
return rwMingCheng;
}
public void setRwMingCheng(String rwMingCheng) {
this.rwMingCheng = rwMingCheng;
}
}

View File

@ -0,0 +1,31 @@
package com.zzjee.sdk;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
public class ClientRequestHandler extends PrepayIdRequestHandler {
public ClientRequestHandler(HttpServletRequest request,
HttpServletResponse response) {
super(request, response);
// TODO Auto-generated constructor stub
}
public String getXmlBody() {
StringBuffer sb = new StringBuffer();
Set es = super.getAllParameters().entrySet();
Iterator it = es.iterator();
while (it.hasNext()) {
Map.Entry entry = (Map.Entry) it.next();
String k = (String) entry.getKey();
String v = (String) entry.getValue();
if (!"appkey".equals(k)) {
sb.append("<" + k + ">" + v + "<" + k + ">" + "\r\n");
}
}
return sb.toString();
}
}

View File

@ -0,0 +1,165 @@
package com.zzjee.sdk;
import org.jdom2.JDOMException;
import java.io.IOException;
import java.util.*;
public class ClientResponseHandler {
/** 应答原始内容 */
private String content;
/** 应答的参数 */
private SortedMap parameters;
/** 密钥 */
private String key;
/** 字符集 */
private String charset;
public ClientResponseHandler() {
this.content = "";
this.parameters = new TreeMap();
this.key = "";
this.charset = "utf8";
}
public String getContent() {
return content;
}
public void setContent(String content) throws Exception {
this.content = content;
this.doParse();
}
/**
*
* @param parameter
* @return String
*/
public String getParameter(String parameter) {
String s = (String)this.parameters.get(parameter);
return (null == s) ? "" : s;
}
/**
*
* @param parameter
* @param parameterValue
*/
public void setParameter(String parameter, String parameterValue) {
String v = "";
if(null != parameterValue) {
v = parameterValue.trim();
}
this.parameters.put(parameter, v);
}
/**
*
* @return SortedMap
*/
public SortedMap getAllParameters() {
return this.parameters;
}
/**
*
*/
public String getKey() {
return key;
}
/**
*
*/
public void setKey(String key) {
this.key = key;
}
public String getCharset() {
return this.charset;
}
public void setCharset(String charset) {
this.charset = charset;
}
/**
* ,:a-z,
* @return boolean
*/
public boolean isTenpaySign() {
StringBuffer sb = new StringBuffer();
Set es = this.parameters.entrySet();
Iterator it = es.iterator();
while(it.hasNext()) {
Map.Entry entry = (Map.Entry)it.next();
String k = (String)entry.getKey();
String v = (String)entry.getValue();
if(!"sign".equals(k) && null != v && !"".equals(v)) {
sb.append(k + "=" + v + "&");
}
}
sb.append("key=" + this.getKey());
//算出摘要
String sign = MD5Util.MD5Encode(sb.toString(), this.charset).toLowerCase();
String tenpaySign = this.getParameter("sign").toLowerCase();
return tenpaySign.equals(sign);
}
/**
*
* @param signParameterArray
* @return boolean
*/
protected boolean isTenpaySign(String signParameterArray[]) {
StringBuffer signPars = new StringBuffer();
for(int index = 0; index < signParameterArray.length; index++) {
String k = signParameterArray[index];
String v = this.getParameter(k);
if(null != v && !"".equals(v)) {
signPars.append(k + "=" + v + "&");
}
}
signPars.append("key=" + this.getKey());
//算出摘要
String sign = MD5Util.MD5Encode(
signPars.toString(), this.charset).toLowerCase();
String tenpaySign = this.getParameter("sign").toLowerCase();
return tenpaySign.equals(sign);
}
/**
* XML
*/
protected void doParse() throws JDOMException, IOException {
String xmlContent = this.getContent();
//解析xml,得到map
Map m = XMLUtil.doXMLParse(xmlContent);
//设置参数
Iterator it = m.keySet().iterator();
while(it.hasNext()) {
String k = (String) it.next();
String v = (String) m.get(k);
this.setParameter(k, v);
}
}
}

View File

@ -0,0 +1,44 @@
package com.zzjee.sdk;
public class ConstantUtil {
public static final String APP_ID="wxbe2c5ee498af5098";
/**
*
*/
public static final String APP_SECRET="3655e7f01063e2a269807b53aa979be1";
/**
*
*/
public static final String APP_KEY="3655e7f01063e2a269807b53aa979be1";
/**
*
*/
public static final String MCH_ID="1487601332";
/**
*
*/
public static final String BODY="test";
/**
*
*/
public static final String PARTNER_key="123466";
/**
* id
*/
public static final String PARTNER_ID="14698sdfs402dsfdew402";
/**
*
*/
public static final String GRANT_TYPE="client_credential";
/**
* idurl
*/
public static String GATEURL = "https://api.mch.weixin.qq.com/pay/unifiedorder";
/**
* url
*/
public static String NOTIFY_URL="http://www.zhaodui.com.cn/fxj380/rest/tenPayController/app/tenpay/notify";
}

View File

@ -0,0 +1,275 @@
package com.zzjee.sdk;
import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.KeyManagerFactory;
import javax.net.ssl.SSLContext;
import javax.net.ssl.TrustManagerFactory;
import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;
import java.security.*;
import java.security.cert.CertificateException;
import java.util.HashMap;
import java.util.Map;
public class HttpClientUtil {
/**
* http
*
*/
public static final String SunX509 = "SunX509";
public static final String JKS = "JKS";
public static final String PKCS12 = "PKCS12";
public static final String TLS = "TLS";
/**
* get HttpURLConnection
* @param strUrl url
* @return HttpURLConnection
* @throws IOException
*/
public static HttpURLConnection getHttpURLConnection(String strUrl)
throws IOException {
URL url = new URL(strUrl);
HttpURLConnection httpURLConnection = (HttpURLConnection) url
.openConnection();
return httpURLConnection;
}
/**
* get HttpsURLConnection
* @param strUrl urlַ
* @return HttpsURLConnection
* @throws IOException
*/
public static HttpsURLConnection getHttpsURLConnection(String strUrl)
throws IOException {
URL url = new URL(strUrl);
HttpsURLConnection httpsURLConnection = (HttpsURLConnection) url
.openConnection();
return httpsURLConnection;
}
/**
* url
* @param strUrl
* @return String
*/
public static String getURL(String strUrl) {
if(null != strUrl) {
int indexOf = strUrl.indexOf("?");
if(-1 != indexOf) {
return strUrl.substring(0, indexOf);
}
return strUrl;
}
return strUrl;
}
/**
*
* @param strUrl
* @return String
*/
public static String getQueryString(String strUrl) {
if(null != strUrl) {
int indexOf = strUrl.indexOf("?");
if(-1 != indexOf) {
return strUrl.substring(indexOf+1, strUrl.length());
}
return "";
}
return strUrl;
}
/**
* map
* name1=key1&name2=key2&...
* @param queryString
* @return
*/
public static Map queryString2Map(String queryString) {
if(null == queryString || "".equals(queryString)) {
return null;
}
Map m = new HashMap();
String[] strArray = queryString.split("&");
for(int index = 0; index < strArray.length; index++) {
String pair = strArray[index];
HttpClientUtil.putMapByPair(pair, m);
}
return m;
}
/**
* map
* pair:name=value
* @param pair name=value
* @param m
*/
public static void putMapByPair(String pair, Map m) {
if(null == pair || "".equals(pair)) {
return;
}
int indexOf = pair.indexOf("=");
if(-1 != indexOf) {
String k = pair.substring(0, indexOf);
String v = pair.substring(indexOf+1, pair.length());
if(null != k && !"".equals(k)) {
m.put(k, v);
}
} else {
m.put(pair, "");
}
}
/**
* BufferedReaderString<br/>
* :
* @param reader
* @return
* @throws IOException
*/
public static String bufferedReader2String(BufferedReader reader) throws IOException {
StringBuffer buf = new StringBuffer();
String line = null;
while( (line = reader.readLine()) != null) {
buf.append(line);
buf.append("\r\n");
}
return buf.toString();
}
/**
* <br/>
* :
* @param out
* @param data
* @param len
* @throws IOException
*/
public static void doOutput(OutputStream out, byte[] data, int len)
throws IOException {
int dataLen = data.length;
int off = 0;
while (off < data.length) {
if (len >= dataLen) {
out.write(data, off, dataLen);
off += dataLen;
} else {
out.write(data, off, len);
off += len;
dataLen -= len;
}
// ˢ<>»<EFBFBD><C2BB><EFBFBD><EFBFBD><EFBFBD>
out.flush();
}
}
/**
* SSLContext
* @param trustFile
* @param trustPasswd
* @param keyFile
* @param keyPasswd
* @return
* @throws NoSuchAlgorithmException
* @throws KeyStoreException
* @throws IOException
* @throws CertificateException
* @throws UnrecoverableKeyException
* @throws KeyManagementException
*/
public static SSLContext getSSLContext(
FileInputStream trustFileInputStream, String trustPasswd,
FileInputStream keyFileInputStream, String keyPasswd)
throws NoSuchAlgorithmException, KeyStoreException,
CertificateException, IOException, UnrecoverableKeyException,
KeyManagementException {
// ca
TrustManagerFactory tmf = TrustManagerFactory.getInstance(HttpClientUtil.SunX509);
KeyStore trustKeyStore = KeyStore.getInstance(HttpClientUtil.JKS);
trustKeyStore.load(trustFileInputStream, HttpClientUtil
.str2CharArray(trustPasswd));
tmf.init(trustKeyStore);
final char[] kp = HttpClientUtil.str2CharArray(keyPasswd);
KeyManagerFactory kmf = KeyManagerFactory.getInstance(HttpClientUtil.SunX509);
KeyStore ks = KeyStore.getInstance(HttpClientUtil.PKCS12);
ks.load(keyFileInputStream, kp);
kmf.init(ks, kp);
SecureRandom rand = new SecureRandom();
SSLContext ctx = SSLContext.getInstance(HttpClientUtil.TLS);
ctx.init(kmf.getKeyManagers(), tmf.getTrustManagers(), rand);
return ctx;
}
/**
* char
* @param str
* @return char[]
*/
public static char[] str2CharArray(String str) {
if(null == str) return null;
return str.toCharArray();
}
public static InputStream String2Inputstream(String str) {
return new ByteArrayInputStream(str.getBytes());
}
/**
* InputStreamByte
* :
* @param in
* @return byte
* @throws Exception
*/
public static byte[] InputStreamTOByte(InputStream in) throws IOException{
int BUFFER_SIZE = 4096;
ByteArrayOutputStream outStream = new ByteArrayOutputStream();
byte[] data = new byte[BUFFER_SIZE];
int count = -1;
while((count = in.read(data,0,BUFFER_SIZE)) != -1)
outStream.write(data, 0, count);
data = null;
byte[] outByte = outStream.toByteArray();
outStream.close();
return outByte;
}
/**
* InputStreamString
* :
* @param in
* @param encoding
* @return String
* @throws Exception
*/
public static String InputStreamTOString(InputStream in, String encoding) throws IOException {
return new String(InputStreamTOByte(in),encoding);
}
}

View File

@ -0,0 +1,48 @@
package com.zzjee.sdk;
import java.security.MessageDigest;
public class MD5Util {
/**
* MD5
* @param b
* @return
*/
private static String byteArrayToHexString(byte b[]) {
StringBuffer resultSb = new StringBuffer();
for (int i = 0; i < b.length; i++)
resultSb.append(byteToHexString(b[i]));
return resultSb.toString();
}
private static String byteToHexString(byte b) {
int n = b;
if (n < 0)
n += 256;
int d1 = n / 16;
int d2 = n % 16;
return hexDigits[d1] + hexDigits[d2];
}
public static String MD5Encode(String origin, String charsetname) {
String resultString = null;
try {
resultString = new String(origin);
MessageDigest md = MessageDigest.getInstance("MD5");
if (charsetname == null || "".equals(charsetname))
resultString = byteArrayToHexString(md.digest(resultString
.getBytes()));
else
resultString = byteArrayToHexString(md.digest(resultString
.getBytes(charsetname)));
} catch (Exception exception) {
}
return resultString;
}
private static final String hexDigits[] = { "0", "1", "2", "3", "4", "5",
"6", "7", "8", "9", "a", "b", "c", "d", "e", "f" };
}

View File

@ -0,0 +1,60 @@
package com.zzjee.sdk;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
public class PrepayIdRequestHandler extends RequestHandler {
public PrepayIdRequestHandler(HttpServletRequest request,
HttpServletResponse response) {
super(request, response);
}
public String createMD5Sign() {
StringBuffer sb = new StringBuffer();
Set es = super.getAllParameters().entrySet();
Iterator it = es.iterator();
while (it.hasNext()) {
Map.Entry entry = (Map.Entry) it.next();
String k = (String) entry.getKey();
String v = (String) entry.getValue();
sb.append(k + "=" + v + "&");
}
String params=sb.append("key="+ConstantUtil.APP_KEY).substring(0);
String sign = MD5Util.MD5Encode(params, "utf8");
return sign.toUpperCase();
}
// 提交预支付
public String sendPrepay() throws Exception {
String prepayid = "";
Set es=super.getAllParameters().entrySet();
Iterator it=es.iterator();
StringBuffer sb = new StringBuffer("<xml>");
while(it.hasNext()){
Map.Entry entry = (Map.Entry) it.next();
String k = (String) entry.getKey();
String v = (String) entry.getValue();
sb.append("<"+k+">"+v+"</"+k+">");
}
sb.append("</xml>");
String params=sb.substring(0);
System.out.println("请求参数:"+params);
String requestUrl = super.getGateUrl();
System.out.println("请求url"+requestUrl);
TenpayHttpClient httpClient = new TenpayHttpClient();
httpClient.setReqContent(requestUrl);
String resContent = "";
if (httpClient.callHttpPost(requestUrl, params)) {
resContent = httpClient.getResContent();
System.out.println("获取prepayid的返回值"+resContent);
Map<String,String> map=XMLUtil.doXMLParse(resContent);
if(map.containsKey("prepay_id"))
prepayid=map.get("prepay_id");
}
return prepayid;
}
}

View File

@ -0,0 +1,178 @@
package com.zzjee.sdk;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.*;
/**
*
* createSign
*
*/
public class RequestHandler {
/** 网关url地址 */
private String gateUrl;
/** 密钥 */
private String key;
/** 请求的参数 */
private SortedMap parameters;
protected HttpServletRequest request;
protected HttpServletResponse response;
/**
*
* @param request
* @param response
*/
public RequestHandler(HttpServletRequest request, HttpServletResponse response) {
this.request = request;
this.response = response;
this.gateUrl = "https://gw.tenpay.com/gateway/pay.htm";
this.key = "";
this.parameters = new TreeMap();
}
/**
*
*/
public void init() {
//nothing to do
}
/**
*,
*/
public String getGateUrl() {
return gateUrl;
}
/**
*,
*/
public void setGateUrl(String gateUrl) {
this.gateUrl = gateUrl;
}
/**
*
*/
public String getKey() {
return key;
}
/**
*
*/
public void setKey(String key) {
this.key = key;
}
/**
*
* @param parameter
* @return String
*/
public String getParameter(String parameter) {
String s = (String)this.parameters.get(parameter);
return (null == s) ? "" : s;
}
/**
*
* @param parameter
* @param parameterValue
*/
public void setParameter(String parameter, Object parameterValue) {
String v = "";
if(null != parameterValue) {
if(parameterValue instanceof String)
v = ((String) parameterValue).trim();
}
this.parameters.put(parameter, v);
}
/**
*
* @return SortedMap
*/
public SortedMap getAllParameters() {
return this.parameters;
}
/**
* URL
* @return String
* @throws UnsupportedEncodingException
*/
public String getRequestURL() throws UnsupportedEncodingException {
this.createSign();
StringBuffer sb = new StringBuffer();
String enc = TenpayUtil.getCharacterEncoding(this.request, this.response);
Set es = this.parameters.entrySet();
Iterator it = es.iterator();
while(it.hasNext()) {
Map.Entry entry = (Map.Entry)it.next();
String k = (String)entry.getKey();
String v = (String)entry.getValue();
if(!"spbill_create_ip".equals(k)) {
sb.append(k + "=" + URLEncoder.encode(v, enc) + "&");
} else {
sb.append(k + "=" + v.replace("\\.", "%2E") + "&");
}
}
//去掉最后一个&
String reqPars = sb.substring(0, sb.lastIndexOf("&"));
return this.getGateUrl() + "?" + reqPars;
}
public void doSend() throws UnsupportedEncodingException, IOException {
this.response.sendRedirect(this.getRequestURL());
}
/**
* md5,:a-z,
*/
protected void createSign() {
StringBuffer sb = new StringBuffer();
Set es = this.parameters.entrySet();
Iterator it = es.iterator();
while(it.hasNext()) {
Map.Entry entry = (Map.Entry)it.next();
String k = (String)entry.getKey();
String v = (String)entry.getValue();
if(null != v && !"".equals(v)
&& !"sign".equals(k) && !"key".equals(k)) {
sb.append(k + "=" + v + "&");
}
}
sb.append("key=" + this.getKey());
String enc = TenpayUtil.getCharacterEncoding(this.request, this.response);
String sign = MD5Util.MD5Encode(sb.toString(), enc).toUpperCase();
this.setParameter("sign", sign);
}
protected HttpServletRequest getHttpServletRequest() {
return this.request;
}
protected HttpServletResponse getHttpServletResponse() {
return this.response;
}
}

View File

@ -0,0 +1,180 @@
package com.zzjee.sdk;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
import java.util.*;
/**
*
* isTenpaySign
*
*/
public class ResponseHandler {
/** 密钥 */
private String key;
/** 应答的参数 */
private SortedMap parameters;
private HttpServletRequest request;
private HttpServletResponse response;
private String uriEncoding;
/**
*
*
* @param request
* @param response
*/
public ResponseHandler(HttpServletRequest request,
HttpServletResponse response) {
this.request = request;
this.response = response;
this.key = "";
this.parameters = new TreeMap();
this.uriEncoding = "";
Map m = this.request.getParameterMap();
Iterator it = m.keySet().iterator();
while (it.hasNext()) {
String k = (String) it.next();
String v = ((String[]) m.get(k))[0];
this.setParameter(k, v);
}
}
/**
*
*/
public String getKey() {
return key;
}
/**
*
*/
public void setKey(String key) {
this.key = key;
}
/**
*
* @param parameter
* @return String
*/
public String getParameter(String parameter) {
String s = (String)this.parameters.get(parameter);
return (null == s) ? "" : s;
}
/**
*
* @param parameter
* @param parameterValue
*/
public void setParameter(String parameter, String parameterValue) {
String v = "";
if(null != parameterValue) {
v = parameterValue.trim();
}
this.parameters.put(parameter, v);
}
/**
*
* @return SortedMap
*/
public SortedMap getAllParameters() {
return this.parameters;
}
/**
* ,:a-z,
* @return boolean
*/
public boolean isTenpaySign() {
StringBuffer sb = new StringBuffer();
Set es = this.parameters.entrySet();
Iterator it = es.iterator();
while(it.hasNext()) {
Map.Entry entry = (Map.Entry)it.next();
String k = (String)entry.getKey();
String v = (String)entry.getValue();
if(!"sign".equals(k) && null != v && !"".equals(v)) {
sb.append(k + "=" + v + "&");
}
}
sb.append("key=" + this.getKey());
//算出摘要
String enc = TenpayUtil.getCharacterEncoding(this.request, this.response);
String sign = MD5Util.MD5Encode(sb.toString(), enc).toLowerCase();
String tenpaySign = this.getParameter("sign").toLowerCase();
return tenpaySign.equals(sign);
}
/**
*
* @param msg: Success or fail
* @throws IOException
*/
public void sendToCFT(String msg) throws IOException {
String strHtml = msg;
PrintWriter out = this.getHttpServletResponse().getWriter();
out.println(strHtml);
out.flush();
out.close();
}
/**
* uri
* @return String
*/
public String getUriEncoding() {
return uriEncoding;
}
/**
* uri
* @param uriEncoding
* @throws UnsupportedEncodingException
*/
public void setUriEncoding(String uriEncoding)
throws UnsupportedEncodingException {
if (!"".equals(uriEncoding.trim())) {
this.uriEncoding = uriEncoding;
// 编码转换
String enc = TenpayUtil.getCharacterEncoding(request, response);
Iterator it = this.parameters.keySet().iterator();
while (it.hasNext()) {
String k = (String) it.next();
String v = this.getParameter(k);
v = new String(v.getBytes(uriEncoding.trim()), enc);
this.setParameter(k, v);
}
}
}
protected HttpServletRequest getHttpServletRequest() {
return this.request;
}
protected HttpServletResponse getHttpServletResponse() {
return this.response;
}
}

View File

@ -0,0 +1,231 @@
package com.zzjee.sdk;
import com.zzjee.conf.entity.WxConfigEntity;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import net.sf.json.JSONObject;
import org.apache.commons.lang3.StringUtils;
import org.jdom2.JDOMException;
import org.jeecgframework.core.util.StringUtil;
import org.jeecgframework.jwt.util.ResponseMessage;
import org.jeecgframework.jwt.util.Result;
import org.jeecgframework.web.system.service.SystemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Validator;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.Map;
import static com.xiaoleilu.hutool.date.DateTime.now;
@Api(value="tenPayController",description="微信支付",tags="tenPayController")
@Controller
@RequestMapping("/tenPayController")
public class TenpayController {
@Autowired
private SystemService systemService;
@Autowired
private Validator validator;
// @Autowired
// private PayRecordService payRecordService;
// @Autowired
// private AppCustomerService appCustomerService;
private String out_trade_no = "";
/**
* prepayId
* @param request
* @param response
* @return
* @throws Exception
*/
// @Auth
@ApiOperation(value = "wxauthv3")
@RequestMapping(value = "/authv3",method = RequestMethod.GET)
@ResponseBody
public ResponseMessage<?> authV3(@RequestParam(value="CODE", required=false) String CODE, @RequestParam(value="appCode", required=false) String appCode) {
// 验证
if (StringUtils.isEmpty(CODE)) {
return Result.error("JSCODE不能为空!");
}
// // 验证
// if (StringUtils.isEmpty(username)) {
// return new ResponseEntity("用户密码不能为空!", HttpStatus.NOT_FOUND);
// }
// https://api.weixin.qq.com/sns/oauth2/access_token?appid=APPID&secret=SECRET&code=CODE&grant_type=authorization_code
// Assert.notNull(JSCODE, "JSCODE can not be empty");
// Assert.notNull(password, "password can not be empty");
// String miniappid=ResourceUtil.getConfigByName("mini.appid") ;
// String minisecret=ResourceUtil.getConfigByName("mini.secret");
if(StringUtil.isEmpty(appCode)){
appCode = "fxjpay";
}
WxConfigEntity wxConfigEntity = systemService.findUniqueByProperty(WxConfigEntity.class,"appCode",appCode);
String url="https://api.weixin.qq.com/sns/oauth2/access_token?appid=" + wxConfigEntity.getAppId() +
"&secret=" + wxConfigEntity.getAppSecret() +
"&code=" +
CODE+"&grant_type=authorization_code";
String result= com.xiaoleilu.hutool.http.HttpUtil.get(url);
JSONObject resultJson = JSONObject.fromObject(result);
String openid = String.valueOf(resultJson.get("openid"));
return Result.success(openid,(long)0);
}
@RequestMapping(value = "/app/tenpay/prepay", method = RequestMethod.GET)
@ApiOperation(value="生成预支付订单",produces="application/json",httpMethod="GET")
public @ResponseBody Map<String, Object> getOrder(@RequestParam(value="jzProName", required=false) String jzProName,
@RequestParam(value="jzProject", required=false) String jzProject,
@RequestParam(value="jzRemark", required=false) String jzRemark,
@RequestParam(value="jzName", required=false) String jzName,
@RequestParam(value="code", required=false) String code,
@RequestParam(value="total_fees", required=true) String total_fees,
@RequestParam(value="appCode", required=false) String appCode,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
if(StringUtil.isEmpty(appCode)){
appCode = "fxjpay";
}
WxConfigEntity wxConfigEntity = systemService.findUniqueByProperty(WxConfigEntity.class,"appCode",appCode);
String url="https://api.weixin.qq.com/sns/oauth2/access_token?appid=" + wxConfigEntity.getAppId() +
"&secret=" + wxConfigEntity.getAppSecret() +
"&code=" +
code+"&grant_type=authorization_code";
String result= com.xiaoleilu.hutool.http.HttpUtil.get(url);
JSONObject resultJson = JSONObject.fromObject(result);
String openid = String.valueOf(resultJson.get("openid"));
Map<String, Object> map = new HashMap<String, Object>();
// 获取生成预支付订单的请求类
PrepayIdRequestHandler prepayReqHandler = new PrepayIdRequestHandler(request, response);
// String totalFee = request.getParameter("total_fee");
int total_fee=(int) (Float.valueOf(total_fees)*100);
System.out.println("total:"+total_fee);
System.out.println("total_fee:" + total_fee);
prepayReqHandler.setParameter("appid", wxConfigEntity.getAppId());
prepayReqHandler.setParameter("body", ConstantUtil.BODY);
prepayReqHandler.setParameter("mch_id", wxConfigEntity.getMchId());
String nonce_str = WXUtil.getNonceStr();
prepayReqHandler.setParameter("nonce_str", nonce_str);
prepayReqHandler.setParameter("notify_url", wxConfigEntity.getNotifyUrl());
out_trade_no = String.valueOf(UUID.next());
prepayReqHandler.setParameter("out_trade_no", out_trade_no);
prepayReqHandler.setParameter("spbill_create_ip", request.getRemoteAddr());
String timestamp = WXUtil.getTimeStamp();
prepayReqHandler.setParameter("time_start", timestamp);
System.out.println(String.valueOf(total_fee));
prepayReqHandler.setParameter("total_fee", String.valueOf(total_fee));
prepayReqHandler.setParameter("openid",openid);
prepayReqHandler.setParameter("trade_type", "JSAPI");
// prepayReqHandler.setParameter("trade_type", "JSAPI");
/**
* signAPP_KEY,
*/
prepayReqHandler.setParameter("sign", prepayReqHandler.createMD5Sign());
prepayReqHandler.setGateUrl(ConstantUtil.GATEURL);
String prepayid = prepayReqHandler.sendPrepay();
// 若获取prepayid成功将相关信息返回客户端
if (prepayid != null && !prepayid.equals("")) {
String signs = "appId=" + wxConfigEntity.getAppId() + "&nonceStr=" + nonce_str + "&package=prepay_id="
+ prepayid + "&signType=MD5" + "&timeStamp=" + timestamp + "&key="
+ wxConfigEntity.getAppKey();
map.put("code", 0);
map.put("info", "success");
map.put("prepayid", prepayid);
/**
*
*/
map.put("sign", MD5Util.MD5Encode(signs, "utf8").toUpperCase());
map.put("appid", wxConfigEntity.getAppId());
map.put("timestamp", timestamp); //等于请求prepayId时的time_start
map.put("noncestr", nonce_str); //与请求prepayId时值一致
map.put("package", "prepay_id="+prepayid); //固定常量
map.put("partnerid", ConstantUtil.PARTNER_ID);
} else {
map.put("code", 1);
map.put("info", "获取prepayid失败");
}
return map;
}
/**
*
* @param request
* @param response
* @throws IOException
*/
@RequestMapping(value = "/app/tenpay/notify")
@ApiOperation(value="接收微信支付成功通知",produces="application/json",httpMethod="POST")
public void getnotify(HttpServletRequest request, HttpServletResponse response)
throws IOException {
System.out.println("微信支付回调");
PrintWriter writer = response.getWriter();
InputStream inStream = request.getInputStream();
ByteArrayOutputStream outSteam = new ByteArrayOutputStream();
byte[] buffer = new byte[1024];
int len = 0;
while ((len = inStream.read(buffer)) != -1) {
outSteam.write(buffer, 0, len);
}
outSteam.close();
inStream.close();
String result = new String(outSteam.toByteArray(), "utf-8");
System.out.println("微信支付通知结果:" + result);
Map<String, String> map = null;
try {
/**
*
*/
map = XMLUtil.doXMLParse(result);
} catch (JDOMException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
System.out.println("=========:"+result);
// 若支付成功,则告知微信服务器收到通知
if (map.get("return_code").equals("SUCCESS")) {
if (map.get("result_code").equals("SUCCESS")) {
System.out.println("充值成功!");
System.out.println("订单号:"+Long.valueOf(map.get("out_trade_no")));
String notifyStr = XMLUtil.setXML("SUCCESS", "");
writer.write(notifyStr);
writer.flush();
// }
}
}
}
}

View File

@ -0,0 +1,297 @@
package com.zzjee.sdk;
import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSocketFactory;
import java.io.BufferedOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
public class TenpayHttpClient {
/** 请求内容无论post和get都用get方式提供 */
private String reqContent;
/** 应答内容 */
private String resContent;
/** 请求方法 */
private String method;
/** 错误信息 */
private String errInfo;
/** 超时时间,以秒为单位 */
private int timeOut;
/** http应答编码 */
private int responseCode;
/** 字符编码 */
private String charset;
private InputStream inputStream;
public TenpayHttpClient() {
this.reqContent = "";
this.resContent = "";
this.method = "POST";
this.errInfo = "";
this.timeOut = 30;//30秒
this.responseCode = 0;
this.charset = "utf8";
this.inputStream = null;
}
/**
*
* @param reqContent
*/
public void setReqContent(String reqContent) {
this.reqContent = reqContent;
}
/**
*
* @return String
* @throws IOException
*/
public String getResContent() {
try {
this.doResponse();
} catch (IOException e) {
this.errInfo = e.getMessage();
//return "";
}
return this.resContent;
}
/**
* postget
* @param method post/get
*/
public void setMethod(String method) {
this.method = method;
}
/**
*
* @return String
*/
public String getErrInfo() {
return this.errInfo;
}
/**
* ,
* @param timeOut ,
*/
public void setTimeOut(int timeOut) {
this.timeOut = timeOut;
}
/**
* http
* @return int
*/
public int getResponseCode() {
return this.responseCode;
}
protected void callHttp() throws IOException {
if("POST".equals(this.method.toUpperCase())) {
String url = HttpClientUtil.getURL(this.reqContent);
String queryString = HttpClientUtil.getQueryString(this.reqContent);
byte[] postData = queryString.getBytes(this.charset);
this.httpPostMethod(url, postData);
return ;
}
this.httpGetMethod(this.reqContent);
}
public boolean callHttpPost(String url, String postdata) {
boolean flag = false;
byte[] postData;
try {
postData = postdata.getBytes(this.charset);
this.httpPostMethod(url, postData);
flag = true;
} catch (IOException e1) {
e1.printStackTrace();
}
return flag;
}
/**
* http post
* @param url
* @param postData
* @throws IOException
*/
protected void httpPostMethod(String url, byte[] postData)
throws IOException {
HttpURLConnection conn = HttpClientUtil.getHttpURLConnection(url);
this.doPost(conn, postData);
}
/**
* http get
*
* @param url
* @throws IOException
*/
protected void httpGetMethod(String url) throws IOException {
HttpURLConnection httpConnection =
HttpClientUtil.getHttpURLConnection(url);
this.setHttpRequest(httpConnection);
httpConnection.setRequestMethod("GET");
this.responseCode = httpConnection.getResponseCode();
this.inputStream = httpConnection.getInputStream();
}
/**
* https get
* @param url
* @param sslContext
* @throws IOException
*/
protected void httpsGetMethod(String url, SSLContext sslContext)
throws IOException {
SSLSocketFactory sf = sslContext.getSocketFactory();
HttpsURLConnection conn = HttpClientUtil.getHttpsURLConnection(url);
conn.setSSLSocketFactory(sf);
this.doGet(conn);
}
protected void httpsPostMethod(String url, byte[] postData,
SSLContext sslContext) throws IOException {
SSLSocketFactory sf = sslContext.getSocketFactory();
HttpsURLConnection conn = HttpClientUtil.getHttpsURLConnection(url);
conn.setSSLSocketFactory(sf);
this.doPost(conn, postData);
}
/**
* http
* @param httpConnection
*/
protected void setHttpRequest(HttpURLConnection httpConnection) {
//设置连接超时时间
httpConnection.setConnectTimeout(this.timeOut * 1000);
//不使用缓存
httpConnection.setUseCaches(false);
//允许输入输出
httpConnection.setDoInput(true);
httpConnection.setDoOutput(true);
}
/**
*
* @throws IOException
*/
protected void doResponse() throws IOException {
if(null == this.inputStream) {
return;
}
//获取应答内容
this.resContent=HttpClientUtil.InputStreamTOString(this.inputStream,this.charset);
//关闭输入流
this.inputStream.close();
}
/**
* post
* @param conn
* @param postData
* @throws IOException
*/
protected void doPost(HttpURLConnection conn, byte[] postData)
throws IOException {
// 以post方式通信
conn.setRequestMethod("POST");
// 设置请求默认属性
this.setHttpRequest(conn);
// Content-Type
conn.setRequestProperty("Content-Type",
"application/x-www-form-urlencoded");
BufferedOutputStream out = new BufferedOutputStream(conn
.getOutputStream());
final int len = 1024; // 1KB
HttpClientUtil.doOutput(out, postData, len);
// 关闭流
out.close();
// 获取响应返回状态码
this.responseCode = conn.getResponseCode();
// 获取应答输入流
this.inputStream = conn.getInputStream();
}
/**
* get
* @param conn
* @throws IOException
*/
protected void doGet(HttpURLConnection conn) throws IOException {
//以GET方式通信
conn.setRequestMethod("GET");
//设置请求默认属性
this.setHttpRequest(conn);
//获取响应返回状态码
this.responseCode = conn.getResponseCode();
//获取应答输入流
this.inputStream = conn.getInputStream();
}
}

View File

@ -0,0 +1,129 @@
package com.zzjee.sdk;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.text.SimpleDateFormat;
import java.util.Date;
public class TenpayUtil {
/**
*
* @param obj
* @return String ,null,.
*/
public static String toString(Object obj) {
if(obj == null)
return "";
return obj.toString();
}
/**
* int.
*
* @param obj
* .
* @return int ,0
*/
public static int toInt(Object obj) {
int a = 0;
try {
if (obj != null)
a = Integer.parseInt(obj.toString());
} catch (Exception e) {
}
return a;
}
/**
* yyyyMMddHHmmss
* @return String
*/
public static String getCurrTime() {
Date now = new Date();
SimpleDateFormat outFormat = new SimpleDateFormat("yyyyMMddHHmmss");
String s = outFormat.format(now);
return s;
}
/**
* yyyyMMdd
* @param date
* @return String
*/
public static String formatDate(Date date) {
SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd");
String strDate = formatter.format(date);
return strDate;
}
/**
* .
*
* @param length
* int length11
* @return int
*/
public static int buildRandom(int length) {
int num = 1;
double random = Math.random();
if (random < 0.1) {
random = random + 0.1;
}
for (int i = 0; i < length; i++) {
num = num * 10;
}
return (int) ((random * num));
}
/**
*
* @param request
* @param response
* @return String
*/
public static String getCharacterEncoding(HttpServletRequest request,
HttpServletResponse response) {
if(null == request || null == response) {
return "gbk";
}
String enc = request.getCharacterEncoding();
if(null == enc || "".equals(enc)) {
enc = response.getCharacterEncoding();
}
if(null == enc || "".equals(enc)) {
enc = "gbk";
}
return enc;
}
/**
* unix1970-01-01 00:00:00
* @param date
* @return long
*/
public static long getUnixTime(Date date) {
if( null == date ) {
return 0;
}
return date.getTime()/1000;
}
/**
*
* @param date
* @param formatType
* @return String
*/
public static String date2String(Date date, String formatType) {
SimpleDateFormat sdf = new SimpleDateFormat(formatType);
return sdf.format(date);
}
}

View File

@ -0,0 +1,23 @@
package com.zzjee.sdk;
import java.util.Date;
public class UUID {
private static Date date = new Date();
private static StringBuilder buf = new StringBuilder();
private static int seq = 0;
private static final int ROTATION = 99999;
public static synchronized long next() {
if (seq > ROTATION)
seq = 0;
buf.delete(0, buf.length());
date.setTime(System.currentTimeMillis());
String str = String.format("%1$tY%1$tm%1$td%1$tk%1$tM%1$tS%2$05d", date, seq++);
return Long.parseLong(str);
}
private UUID(){
}
}

View File

@ -0,0 +1,21 @@
package com.zzjee.sdk;
import java.util.Random;
public class WXUtil {
/**
*
* @return
*/
public static String getNonceStr() {
Random random = new Random();
return MD5Util.MD5Encode(String.valueOf(random.nextInt(10000)), "utf8");
}
/**
*
* @return
*/
public static String getTimeStamp() {
return String.valueOf(System.currentTimeMillis() / 1000);
}
}

View File

@ -0,0 +1,113 @@
package com.zzjee.sdk;
import org.jdom2.Document;
import org.jdom2.Element;
import org.jdom2.JDOMException;
import org.jdom2.input.SAXBuilder;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.*;
import java.util.Map.Entry;
public class XMLUtil {
/**
* xml,xml
* @param strxml
* @return
* @throws JDOMException
* @throws IOException
*/
public static Map doXMLParse(String strxml) throws org.jdom2.JDOMException, IOException {
strxml = strxml.replaceFirst("encoding=\".*\"", "encoding=\"UTF-8\"");
if(null == strxml || "".equals(strxml)) {
return null;
}
Map m = new HashMap();
InputStream in = new ByteArrayInputStream(strxml.getBytes("UTF-8"));
SAXBuilder builder = new SAXBuilder();
Document doc = builder.build(in);
Element root = doc.getRootElement();
List list = root.getChildren();
Iterator it = list.iterator();
while(it.hasNext()) {
Element e = (Element) it.next();
String k = e.getName();
String v = "";
List children = e.getChildren();
if(children.isEmpty()) {
v = e.getTextNormalize();
} else {
v = XMLUtil.getChildrenText(children);
}
m.put(k, v);
}
//关闭流
in.close();
return m;
}
/**
* xml
* @param children
* @return String
*/
public static String getChildrenText(List children) {
StringBuffer sb = new StringBuffer();
if(!children.isEmpty()) {
Iterator it = children.iterator();
while(it.hasNext()) {
Element e = (Element) it.next();
String name = e.getName();
String value = e.getTextNormalize();
List list = e.getChildren();
sb.append("<" + name + ">");
if(!list.isEmpty()) {
sb.append(XMLUtil.getChildrenText(list));
}
sb.append(value);
sb.append("</" + name + ">");
}
}
return sb.toString();
}
/**
* xml
* @param strxml
* @return
* @throws IOException
* @throws JDOMException
*/
public static String getXMLEncoding(String strxml) throws JDOMException, IOException {
InputStream in = HttpClientUtil.String2Inputstream(strxml);
SAXBuilder builder = new SAXBuilder();
Document doc = builder.build(in);
in.close();
return (String)doc.getProperty("encoding");
}
/**
*
* @param return_code
* @param return_msg
* @return
*/
public static String setXML(String return_code, String return_msg) {
return "<xml><return_code><![CDATA[" + return_code + "]]></return_code><return_msg><![CDATA[" + return_msg + "]]></return_msg></xml>";
}
public static String createXML(Map<String,Object> map){
Set<Entry<String,Object>> set=map.entrySet();
set.iterator();
return null;
}
}

View File

@ -822,6 +822,8 @@ public class WmOmNoticeHController extends BaseController {
@RequestMapping(params = "doDel")
@ResponseBody
public AjaxJson doDel(WmOmNoticeHEntity wmOmNoticeH, HttpServletRequest request) {
String deltype = ResourceUtil.getConfigByName("del.type");
AjaxJson j = new AjaxJson();
wmOmNoticeH = systemService.getEntity(WmOmNoticeHEntity.class, wmOmNoticeH.getId());
String message = "出货通知删除成功";
@ -835,9 +837,20 @@ public class WmOmNoticeHController extends BaseController {
for (WmOmNoticeIEntity wmOmNoticeIEntity : wmOmNoticeIOldList) {
wmOmNoticeIEntity.setOmSta("已删除");
wmOmNoticeIEntity.setPlanSta("Y");
systemService.saveOrUpdate(wmOmNoticeIEntity);
if("database".equals(deltype)){
systemService.delete(wmOmNoticeIEntity);
}else{
systemService.saveOrUpdate(wmOmNoticeIEntity);
}
}
if("database".equals(deltype)){
wmOmNoticeHService.delete(wmOmNoticeH);
}else{
wmOmNoticeHService.saveOrUpdate(wmOmNoticeH);
}
wmOmNoticeHService.saveOrUpdate(wmOmNoticeH);
systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO);
}catch(Exception e){
e.printStackTrace();

View File

@ -1,5 +1,6 @@
package com.zzjee.wmutil;
import com.zzjee.conf.entity.FxjOtherLoginEntity;
import com.zzjee.md.entity.MdBinEntity;
import com.zzjee.md.entity.MdGoodsEntity;
import com.zzjee.sys.entity.SysParaEntity;
@ -7,10 +8,7 @@ import org.antlr.stringtemplate.language.Cat;
import org.jeecgframework.core.common.exception.BusinessException;
import org.jeecgframework.core.util.DateUtils;
import org.jeecgframework.core.util.ResourceUtil;
import org.jeecgframework.web.system.pojo.base.TSIcon;
import org.jeecgframework.web.system.pojo.base.TSRole;
import org.jeecgframework.web.system.pojo.base.TSRoleUser;
import org.jeecgframework.web.system.pojo.base.TSUser;
import org.jeecgframework.web.system.pojo.base.*;
import org.jeecgframework.web.system.service.SystemService;
import org.jeecgframework.web.system.sms.service.TSSmsSqlServiceI;
import org.jeecgframework.core.common.model.json.DataGrid;
@ -462,5 +460,32 @@ public class wmUtil {
return flag;
}
public static TSUser getsysorgcode(String sysuser){
SystemService systemService =ApplicationContextUtil.getContext().getBean(SystemService.class);
try{
FxjOtherLoginEntity fxjOtherLoginEntity = systemService.findUniqueByProperty(FxjOtherLoginEntity.class,"otherid",sysuser);
if (fxjOtherLoginEntity!=null){
sysuser = fxjOtherLoginEntity.getUsername();
}
}catch (Exception e){
}
TSUser task = systemService.findUniqueByProperty(TSUser.class,"userName",sysuser);
// if(task==null){
// sysuser=ResourceUtil.getConfigByName("mini.user");
// task = systemService.findUniqueByProperty(TSUser.class,"userName",sysuser);
// }
if(task!=null) {
try {
TSDepart tsDepart = systemService.get(TSDepart.class, task.getDepartid());
if (tsDepart != null) {
tsDepart.setOrgCode(tsDepart.getOrgCode());
task.setCurrentDepart(tsDepart);
}
} catch (Exception e) {
}
}
return task;
}
}

View File

@ -13,7 +13,7 @@ public class ResponseMessage<T> {
private String respMsg;
private T data;
private boolean ok;
private Long total;
public ResponseMessage() {
}
@ -21,7 +21,13 @@ public class ResponseMessage<T> {
this.respCode = codeEnum.getCode();
this.respMsg = message;
}
public ResponseMessage(ResponseMessageCodeEnum codeEnum, String message, boolean ok, T data,long total) {
this.respCode = codeEnum.getCode();
this.respMsg = message;
this.ok = ok;
this.data = data;
this.total = total;
}
public ResponseMessage(ResponseMessageCodeEnum codeEnum, String message, boolean ok, T data) {
this.respCode = codeEnum.getCode();
this.respMsg = message;
@ -56,4 +62,12 @@ public class ResponseMessage<T> {
public boolean isOk() {
return ok;
}
public Long getTotal() {
return total;
}
public void setTotal(Long total) {
this.total = total;
}
}

View File

@ -22,7 +22,9 @@ public class Result {
public static <T> ResponseMessage<T> success(ResponseMessageCodeEnum codeEnum, T t) {
return new ResponseMessage(codeEnum, "", true, t);
}
public static <T> ResponseMessage<T> success(T t,Long total) {
return new ResponseMessage(ResponseMessageCodeEnum.SUCCESS, "成功", true, t,total);
}
public static <T> ResponseMessage<T> success(ResponseMessageCodeEnum codeEnum, String message, T t) {
return new ResponseMessage(codeEnum, message, true, t);
}

View File

@ -0,0 +1,332 @@
<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>第三方登录</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="online/template/ledefault/css/vendor.css">
<link rel="stylesheet" href="online/template/ledefault/css/bootstrap-theme.css">
<link rel="stylesheet" href="online/template/ledefault/css/bootstrap.css">
<link rel="stylesheet" href="online/template/ledefault/css/app.css">
<link rel="stylesheet" href="plug-in/Validform/css/metrole/style.css" type="text/css"/>
<link rel="stylesheet" href="plug-in/Validform/css/metrole/tablefrom.css" type="text/css"/>
<script type="text/javascript" src="plug-in/jquery/jquery-1.8.3.js"></script>
<script type="text/javascript" src="plug-in/tools/dataformat.js"></script>
<script type="text/javascript" src="plug-in/easyui/jquery.easyui.min.1.3.2.js"></script>
<script type="text/javascript" src="plug-in/easyui/locale/zh-cn.js"></script>
<script type="text/javascript" src="plug-in/tools/syUtil.js"></script>
<script type="text/javascript" src="plug-in/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="plug-in/lhgDialog/lhgdialog.min.js"></script>
<script type="text/javascript" src="plug-in/tools/curdtools_zh-cn.js"></script>
<script type="text/javascript" src="plug-in/tools/easyuiextend.js"></script>
<script type="text/javascript" src="plug-in/Validform/js/Validform_v5.3.1_min_zh-cn.js"></script>
<script type="text/javascript" src="plug-in/Validform/js/Validform_Datatype_zh-cn.js"></script>
<script type="text/javascript" src="plug-in/Validform/js/datatype_zh-cn.js"></script>
<script type="text/javascript" src="plug-in/Validform/plugin/passwordStrength/passwordStrength-min.js"></script>
<script type="text/javascript" charset="utf-8" src="plug-in/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="plug-in/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript">
//编写自定义JS代码
</script>
</head>
<body>
<t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" action="fxjOtherLoginController.do?doAdd" tiptype="1" >
<input type="hidden" id="btn_sub" class="btn_sub"/>
<input type="hidden" id="id" name="id"/>
<div class="tab-wrapper">
<!-- tab -->
<ul class="nav nav-tabs">
<li role="presentation" class="active"><a href="javascript:void(0);">第三方登录</a></li>
</ul>
<!-- tab内容 -->
<div class="con-wrapper" id="con-wrapper1" style="display: block;">
<div class="row form-wrapper">
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>创建人名称:</b>
</div>
<div class="col-xs-3">
<input id="createName" name="createName" type="text" class="form-control"
ignore="ignore"
/>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">创建人名称</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>创建人登录名称:</b>
</div>
<div class="col-xs-3">
<input id="createBy" name="createBy" type="text" class="form-control"
ignore="ignore"
/>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">创建人登录名称</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>创建日期:</b>
</div>
<div class="col-xs-3">
<input id="createDate" name="createDate" type="text"
ignore="ignore"
style="background: url('plug-in/ace/images/datetime.png') no-repeat scroll right center transparent;" class="form-control" onClick="WdatePicker()" type="date" pattern="yyyy-MM-dd"/>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">创建日期</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>更新人名称:</b>
</div>
<div class="col-xs-3">
<input id="updateName" name="updateName" type="text" class="form-control"
ignore="ignore"
/>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">更新人名称</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>更新人登录名称:</b>
</div>
<div class="col-xs-3">
<input id="updateBy" name="updateBy" type="text" class="form-control"
ignore="ignore"
/>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">更新人登录名称</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>更新日期:</b>
</div>
<div class="col-xs-3">
<input id="updateDate" name="updateDate" type="text"
ignore="ignore"
style="background: url('plug-in/ace/images/datetime.png') no-repeat scroll right center transparent;" class="form-control" onClick="WdatePicker()" type="date" pattern="yyyy-MM-dd"/>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">更新日期</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>所属部门:</b>
</div>
<div class="col-xs-3">
<input id="sysOrgCode" name="sysOrgCode" type="text" class="form-control"
ignore="ignore"
/>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">所属部门</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>所属公司:</b>
</div>
<div class="col-xs-3">
<input id="sysCompanyCode" name="sysCompanyCode" type="text" class="form-control"
ignore="ignore"
/>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">所属公司</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>流程状态:</b>
</div>
<div class="col-xs-3">
<input id="bpmStatus" name="bpmStatus" type="text" class="form-control"
ignore="ignore"
/>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">流程状态</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>用户名:</b>
</div>
<div class="col-xs-3">
<input id="username" name="username" type="text" class="form-control"
ignore="ignore"
/>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">用户名</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>姓名:</b>
</div>
<div class="col-xs-3">
<input id="realname" name="realname" type="text" class="form-control"
ignore="ignore"
/>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">姓名</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>三方id</b>
</div>
<div class="col-xs-3">
<input id="otherid" name="otherid" type="text" class="form-control"
ignore="ignore"
/>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">三方id</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>三方1</b>
</div>
<div class="col-xs-3">
<input id="otherre1" name="otherre1" type="text" class="form-control"
ignore="ignore"
/>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">三方1</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>三方2</b>
</div>
<div class="col-xs-3">
<input id="otherre2" name="otherre2" type="text" class="form-control"
ignore="ignore"
/>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">三方2</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>三方3</b>
</div>
<div class="col-xs-3">
<input id="otherre3" name="otherre3" type="text" class="form-control"
ignore="ignore"
/>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">三方3</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>三方4</b>
</div>
<div class="col-xs-3">
<input id="otherre4" name="otherre4" type="text" class="form-control"
ignore="ignore"
/>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">三方4</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>登录类型:</b>
</div>
<div class="col-xs-3">
<input id="otherType" name="otherType" type="text" class="form-control"
ignore="ignore"
/>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">登录类型</label>
</div>
</div>
<div class="row" id = "sub_tr" style="display: none;">
<div class="col-xs-12 layout-header">
<div class="col-xs-6"></div>
<div class="col-xs-6"><button type="button" onclick="neibuClick();" class="btn btn-default">提交</button></div>
</div>
</div>
</div>
</div>
<div class="con-wrapper" id="con-wrapper2" style="display: block;"></div>
</div>
</t:formvalid>
<script type="text/javascript">
$(function(){
//查看模式情况下,删除和上传附件功能禁止使用
if(location.href.indexOf("load=detail")!=-1){
$(".jeecgDetail").hide();
}
if(location.href.indexOf("mode=read")!=-1){
//查看模式控件禁用
$("#formobj").find(":input").attr("disabled","disabled");
}
if(location.href.indexOf("mode=onbutton")!=-1){
//其他模式显示提交按钮
$("#sub_tr").show();
}
});
var neibuClickFlag = false;
function neibuClick() {
neibuClickFlag = true;
$('#btn_sub').trigger('click');
}
</script>
</body>
<script src = "webpage/com/zzjee/conf/fxjOtherLogin.js"></script>
</html>

View File

@ -0,0 +1,332 @@
<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>第三方登录</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="online/template/ledefault/css/vendor.css">
<link rel="stylesheet" href="online/template/ledefault/css/bootstrap-theme.css">
<link rel="stylesheet" href="online/template/ledefault/css/bootstrap.css">
<link rel="stylesheet" href="online/template/ledefault/css/app.css">
<link rel="stylesheet" href="plug-in/Validform/css/metrole/style.css" type="text/css"/>
<link rel="stylesheet" href="plug-in/Validform/css/metrole/tablefrom.css" type="text/css"/>
<script type="text/javascript" src="plug-in/jquery/jquery-1.8.3.js"></script>
<script type="text/javascript" src="plug-in/tools/dataformat.js"></script>
<script type="text/javascript" src="plug-in/easyui/jquery.easyui.min.1.3.2.js"></script>
<script type="text/javascript" src="plug-in/easyui/locale/zh-cn.js"></script>
<script type="text/javascript" src="plug-in/tools/syUtil.js"></script>
<script type="text/javascript" src="plug-in/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="plug-in/lhgDialog/lhgdialog.min.js"></script>
<script type="text/javascript" src="plug-in/tools/curdtools_zh-cn.js"></script>
<script type="text/javascript" src="plug-in/tools/easyuiextend.js"></script>
<script type="text/javascript" src="plug-in/Validform/js/Validform_v5.3.1_min_zh-cn.js"></script>
<script type="text/javascript" src="plug-in/Validform/js/Validform_Datatype_zh-cn.js"></script>
<script type="text/javascript" src="plug-in/Validform/js/datatype_zh-cn.js"></script>
<script type="text/javascript" src="plug-in/Validform/plugin/passwordStrength/passwordStrength-min.js"></script>
<script type="text/javascript" charset="utf-8" src="plug-in/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="plug-in/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript">
//编写自定义JS代码
</script>
</head>
<body>
<t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" action="fxjOtherLoginController.do?doUpdate" tiptype="1" >
<input type="hidden" id="btn_sub" class="btn_sub"/>
<input type="hidden" name="id" value='${fxjOtherLoginPage.id}' >
<div class="tab-wrapper">
<!-- tab -->
<ul class="nav nav-tabs">
<li role="presentation" class="active"><a href="javascript:void(0);">第三方登录</a></li>
</ul>
<!-- tab内容 -->
<div class="con-wrapper" id="con-wrapper1" style="display: block;">
<div class="row form-wrapper">
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>创建人名称:</b>
</div>
<div class="col-xs-3">
<input id="createName" name="createName" type="text" class="form-control"
ignore="ignore"
value='${fxjOtherLoginPage.createName}' />
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">创建人名称</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>创建人登录名称:</b>
</div>
<div class="col-xs-3">
<input id="createBy" name="createBy" type="text" class="form-control"
ignore="ignore"
value='${fxjOtherLoginPage.createBy}' />
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">创建人登录名称</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>创建日期:</b>
</div>
<div class="col-xs-3">
<input id="createDate" name="createDate" type="text"
ignore="ignore"
style="background: url('plug-in/ace/images/datetime.png') no-repeat scroll right center transparent;" class="form-control" onClick="WdatePicker()" value='<fmt:formatDate value='${fxjOtherLoginPage.createDate}' type="date" pattern="yyyy-MM-dd"/>' />
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">创建日期</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>更新人名称:</b>
</div>
<div class="col-xs-3">
<input id="updateName" name="updateName" type="text" class="form-control"
ignore="ignore"
value='${fxjOtherLoginPage.updateName}' />
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">更新人名称</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>更新人登录名称:</b>
</div>
<div class="col-xs-3">
<input id="updateBy" name="updateBy" type="text" class="form-control"
ignore="ignore"
value='${fxjOtherLoginPage.updateBy}' />
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">更新人登录名称</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>更新日期:</b>
</div>
<div class="col-xs-3">
<input id="updateDate" name="updateDate" type="text"
ignore="ignore"
style="background: url('plug-in/ace/images/datetime.png') no-repeat scroll right center transparent;" class="form-control" onClick="WdatePicker()" value='<fmt:formatDate value='${fxjOtherLoginPage.updateDate}' type="date" pattern="yyyy-MM-dd"/>' />
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">更新日期</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>所属部门:</b>
</div>
<div class="col-xs-3">
<input id="sysOrgCode" name="sysOrgCode" type="text" class="form-control"
ignore="ignore"
value='${fxjOtherLoginPage.sysOrgCode}' />
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">所属部门</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>所属公司:</b>
</div>
<div class="col-xs-3">
<input id="sysCompanyCode" name="sysCompanyCode" type="text" class="form-control"
ignore="ignore"
value='${fxjOtherLoginPage.sysCompanyCode}' />
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">所属公司</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>流程状态:</b>
</div>
<div class="col-xs-3">
<input id="bpmStatus" name="bpmStatus" type="text" class="form-control"
ignore="ignore"
value='${fxjOtherLoginPage.bpmStatus}' />
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">流程状态</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>用户名:</b>
</div>
<div class="col-xs-3">
<input id="username" name="username" type="text" class="form-control"
ignore="ignore"
value='${fxjOtherLoginPage.username}' />
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">用户名</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>姓名:</b>
</div>
<div class="col-xs-3">
<input id="realname" name="realname" type="text" class="form-control"
ignore="ignore"
value='${fxjOtherLoginPage.realname}' />
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">姓名</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>三方id</b>
</div>
<div class="col-xs-3">
<input id="otherid" name="otherid" type="text" class="form-control"
ignore="ignore"
value='${fxjOtherLoginPage.otherid}' />
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">三方id</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>三方1</b>
</div>
<div class="col-xs-3">
<input id="otherre1" name="otherre1" type="text" class="form-control"
ignore="ignore"
value='${fxjOtherLoginPage.otherre1}' />
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">三方1</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>三方2</b>
</div>
<div class="col-xs-3">
<input id="otherre2" name="otherre2" type="text" class="form-control"
ignore="ignore"
value='${fxjOtherLoginPage.otherre2}' />
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">三方2</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>三方3</b>
</div>
<div class="col-xs-3">
<input id="otherre3" name="otherre3" type="text" class="form-control"
ignore="ignore"
value='${fxjOtherLoginPage.otherre3}' />
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">三方3</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>三方4</b>
</div>
<div class="col-xs-3">
<input id="otherre4" name="otherre4" type="text" class="form-control"
ignore="ignore"
value='${fxjOtherLoginPage.otherre4}' />
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">三方4</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>登录类型:</b>
</div>
<div class="col-xs-3">
<input id="otherType" name="otherType" type="text" class="form-control"
ignore="ignore"
value='${fxjOtherLoginPage.otherType}' />
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">登录类型</label>
</div>
</div>
<div class="row" id = "sub_tr" style="display: none;">
<div class="col-xs-12 layout-header">
<div class="col-xs-6"></div>
<div class="col-xs-6"><button type="button" onclick="neibuClick();" class="btn btn-default">提交</button></div>
</div>
</div>
</div>
</div>
<div class="con-wrapper" id="con-wrapper2" style="display: block;"></div>
</div>
</t:formvalid>
<script type="text/javascript">
$(function(){
//查看模式情况下,删除和上传附件功能禁止使用
if(location.href.indexOf("load=detail")!=-1){
$(".jeecgDetail").hide();
}
if(location.href.indexOf("mode=read")!=-1){
//查看模式控件禁用
$("#formobj").find(":input").attr("disabled","disabled");
}
if(location.href.indexOf("mode=onbutton")!=-1){
//其他模式显示提交按钮
$("#sub_tr").show();
}
});
var neibuClickFlag = false;
function neibuClick() {
neibuClickFlag = true;
$('#btn_sub').trigger('click');
}
</script>
</body>
<script src = "webpage/com/zzjee/conf/fxjOtherLogin.js"></script>
</html>

View File

@ -0,0 +1,28 @@
//通用弹出式文件上传
function commonUpload(callback){
$.dialog({
content: "url:systemController.do?commonUpload",
lock : true,
title:"文件上传",
zIndex:2100,
width:700,
height: 200,
parent:windowapi,
cache:false,
ok: function(){
var iframe = this.iframe.contentWindow;
iframe.uploadCallback(callback);
return true;
},
cancelVal: '关闭',
cancel: function(){
}
});
}
function decode(value, id) {//value传入值,id接受值
var last = value.lastIndexOf("/");
var filename = value.substring(last + 1, value.length);
$("#" + id).text(decodeURIComponent(filename));
}

View File

@ -0,0 +1,59 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
<div class="easyui-layout" fit="true">
<div region="center" style="padding:0px;border:0px">
<t:datagrid name="fxjOtherLoginList" checkbox="true" pagination="true" fitColumns="false" title="第三方登录" actionUrl="fxjOtherLoginController.do?datagrid" idField="id" fit="true" queryMode="group">
<t:dgCol title="主键" field="id" hidden="true" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="创建人名称" field="createName" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="创建人登录名称" field="createBy" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="创建日期" field="createDate" formatter="yyyy-MM-dd" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="更新人名称" field="updateName" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="更新人登录名称" field="updateBy" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="更新日期" field="updateDate" formatter="yyyy-MM-dd" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="所属部门" field="sysOrgCode" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="所属公司" field="sysCompanyCode" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="流程状态" field="bpmStatus" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="用户名" field="username" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="姓名" field="realname" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="三方id" field="otherid" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="三方1" field="otherre1" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="三方2" field="otherre2" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="三方3" field="otherre3" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="三方4" field="otherre4" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="登录类型" field="otherType" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="操作" field="opt" width="100"></t:dgCol>
<t:dgDelOpt title="删除" url="fxjOtherLoginController.do?doDel&id={id}" urlclass="ace_button" urlfont="fa-trash-o"/>
<t:dgToolBar title="录入" icon="icon-add" url="fxjOtherLoginController.do?goAdd" funname="add"></t:dgToolBar>
<t:dgToolBar title="编辑" icon="icon-edit" url="fxjOtherLoginController.do?goUpdate" funname="update"></t:dgToolBar>
<t:dgToolBar title="批量删除" icon="icon-remove" url="fxjOtherLoginController.do?doBatchDel" funname="deleteALLSelect"></t:dgToolBar>
<t:dgToolBar title="查看" icon="icon-search" url="fxjOtherLoginController.do?goUpdate" funname="detail"></t:dgToolBar>
<t:dgToolBar title="导入" icon="icon-put" funname="ImportXls"></t:dgToolBar>
<t:dgToolBar title="导出" icon="icon-putout" funname="ExportXls"></t:dgToolBar>
<t:dgToolBar title="模板下载" icon="icon-putout" funname="ExportXlsByT"></t:dgToolBar>
</t:datagrid>
</div>
</div>
<script src = "webpage/com/zzjee/conf/fxjOtherLoginList.js"></script>
<script type="text/javascript">
$(document).ready(function(){
});
//导入
function ImportXls() {
openuploadwin('Excel导入', 'fxjOtherLoginController.do?upload', "fxjOtherLoginList");
}
//导出
function ExportXls() {
JeecgExcelExport("fxjOtherLoginController.do?exportXls","fxjOtherLoginList");
}
//模板下载
function ExportXlsByT() {
JeecgExcelExport("fxjOtherLoginController.do?exportXlsByT","fxjOtherLoginList");
}
</script>

View File

@ -0,0 +1,380 @@
<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>配置信息</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="online/template/ledefault/css/vendor.css">
<link rel="stylesheet" href="online/template/ledefault/css/bootstrap-theme.css">
<link rel="stylesheet" href="online/template/ledefault/css/bootstrap.css">
<link rel="stylesheet" href="online/template/ledefault/css/app.css">
<link rel="stylesheet" href="plug-in/Validform/css/metrole/style.css" type="text/css"/>
<link rel="stylesheet" href="plug-in/Validform/css/metrole/tablefrom.css" type="text/css"/>
<script type="text/javascript" src="plug-in/jquery/jquery-1.8.3.js"></script>
<script type="text/javascript" src="plug-in/tools/dataformat.js"></script>
<script type="text/javascript" src="plug-in/easyui/jquery.easyui.min.1.3.2.js"></script>
<script type="text/javascript" src="plug-in/easyui/locale/zh-cn.js"></script>
<script type="text/javascript" src="plug-in/tools/syUtil.js"></script>
<script type="text/javascript" src="plug-in/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="plug-in/lhgDialog/lhgdialog.min.js"></script>
<script type="text/javascript" src="plug-in/tools/curdtools_zh-cn.js"></script>
<script type="text/javascript" src="plug-in/tools/easyuiextend.js"></script>
<script type="text/javascript" src="plug-in/Validform/js/Validform_v5.3.1_min_zh-cn.js"></script>
<script type="text/javascript" src="plug-in/Validform/js/Validform_Datatype_zh-cn.js"></script>
<script type="text/javascript" src="plug-in/Validform/js/datatype_zh-cn.js"></script>
<script type="text/javascript" src="plug-in/Validform/plugin/passwordStrength/passwordStrength-min.js"></script>
<script type="text/javascript" charset="utf-8" src="plug-in/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="plug-in/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript">
//编写自定义JS代码
</script>
</head>
<body>
<t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" action="wxConfigController.do?doAdd" tiptype="1" >
<input type="hidden" id="btn_sub" class="btn_sub"/>
<input type="hidden" id="id" name="id"/>
<div class="tab-wrapper">
<!-- tab -->
<ul class="nav nav-tabs">
<li role="presentation" class="active"><a href="javascript:void(0);">配置信息</a></li>
</ul>
<!-- tab内容 -->
<div class="con-wrapper" id="con-wrapper1" style="display: block;">
<div class="row form-wrapper">
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>创建人名称:</b>
</div>
<div class="col-xs-3">
<input id="createName" name="createName" type="text" class="form-control"
ignore="ignore"
/>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">创建人名称</label>
</div>
<div class="col-xs-3 text-center">
<b>创建人登录名称:</b>
</div>
<div class="col-xs-3">
<input id="createBy" name="createBy" type="text" class="form-control"
ignore="ignore"
/>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">创建人登录名称</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>创建日期:</b>
</div>
<div class="col-xs-3">
<input id="createDate" name="createDate" type="text"
ignore="ignore"
style="background: url('plug-in/ace/images/datetime.png') no-repeat scroll right center transparent;" class="form-control" onClick="WdatePicker()" type="date" pattern="yyyy-MM-dd"/>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">创建日期</label>
</div>
<div class="col-xs-3 text-center">
<b>更新人名称:</b>
</div>
<div class="col-xs-3">
<input id="updateName" name="updateName" type="text" class="form-control"
ignore="ignore"
/>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">更新人名称</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>更新人登录名称:</b>
</div>
<div class="col-xs-3">
<input id="updateBy" name="updateBy" type="text" class="form-control"
ignore="ignore"
/>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">更新人登录名称</label>
</div>
<div class="col-xs-3 text-center">
<b>更新日期:</b>
</div>
<div class="col-xs-3">
<input id="updateDate" name="updateDate" type="text"
ignore="ignore"
style="background: url('plug-in/ace/images/datetime.png') no-repeat scroll right center transparent;" class="form-control" onClick="WdatePicker()" type="date" pattern="yyyy-MM-dd"/>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">更新日期</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>所属部门:</b>
</div>
<div class="col-xs-3">
<input id="sysOrgCode" name="sysOrgCode" type="text" class="form-control"
ignore="ignore"
/>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">所属部门</label>
</div>
<div class="col-xs-3 text-center">
<b>所属公司:</b>
</div>
<div class="col-xs-3">
<input id="sysCompanyCode" name="sysCompanyCode" type="text" class="form-control"
ignore="ignore"
/>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">所属公司</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>流程状态:</b>
</div>
<div class="col-xs-3">
<input id="bpmStatus" name="bpmStatus" type="text" class="form-control"
ignore="ignore"
/>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">流程状态</label>
</div>
<div class="col-xs-3 text-center">
<b>前端编码:</b>
</div>
<div class="col-xs-3">
<input id="appCode" name="appCode" type="text" class="form-control"
ignore="ignore"
/>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">前端编码</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>备注:</b>
</div>
<div class="col-xs-3">
<input id="appRemark" name="appRemark" type="text" class="form-control"
ignore="ignore"
/>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">备注</label>
</div>
<div class="col-xs-3 text-center">
<b>appID</b>
</div>
<div class="col-xs-3">
<textarea id="appId" class="form-control" rows="6"
ignore="ignore"
name="appId"></textarea>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">appID</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>appsecret</b>
</div>
<div class="col-xs-3">
<textarea id="appSecret" class="form-control" rows="6"
ignore="ignore"
name="appSecret"></textarea>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">appsecret</label>
</div>
<div class="col-xs-3 text-center">
<b>appkey</b>
</div>
<div class="col-xs-3">
<input id="appKey" name="appKey" type="text" class="form-control"
ignore="ignore"
/>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">appkey</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>商户号:</b>
</div>
<div class="col-xs-3">
<input id="mchId" name="mchId" type="text" class="form-control"
ignore="ignore"
/>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">商户号</label>
</div>
<div class="col-xs-3 text-center">
<b>通知地址:</b>
</div>
<div class="col-xs-3">
<input id="notifyUrl" name="notifyUrl" type="text" class="form-control"
ignore="ignore"
/>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">通知地址</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>GRANT_TYPE</b>
</div>
<div class="col-xs-3">
<textarea id="grantType" class="form-control" rows="6"
ignore="ignore"
name="grantType"></textarea>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">GRANT_TYPE</label>
</div>
<div class="col-xs-3 text-center">
<b>备用1</b>
</div>
<div class="col-xs-3">
<textarea id="wxBy1" class="form-control" rows="6"
ignore="ignore"
name="wxBy1"></textarea>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">备用1</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>备用2</b>
</div>
<div class="col-xs-3">
<textarea id="wxBy2" class="form-control" rows="6"
ignore="ignore"
name="wxBy2"></textarea>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">备用2</label>
</div>
<div class="col-xs-3 text-center">
<b>备用3</b>
</div>
<div class="col-xs-3">
<textarea id="wxBy3" class="form-control" rows="6"
ignore="ignore"
name="wxBy3"></textarea>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">备用3</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>备用4</b>
</div>
<div class="col-xs-3">
<textarea id="wxBy4" class="form-control" rows="6"
ignore="ignore"
name="wxBy4"></textarea>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">备用4</label>
</div>
<div class="col-xs-3 text-center">
<b>备用5</b>
</div>
<div class="col-xs-3">
<textarea id="wxBy5" class="form-control" rows="6"
ignore="ignore"
name="wxBy5"></textarea>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">备用5</label>
</div>
</div>
<div class="row" id = "sub_tr" style="display: none;">
<div class="col-xs-12 layout-header">
<div class="col-xs-6"></div>
<div class="col-xs-6"><button type="button" onclick="neibuClick();" class="btn btn-default">提交</button></div>
</div>
</div>
</div>
</div>
<div class="con-wrapper" id="con-wrapper2" style="display: block;"></div>
</div>
</t:formvalid>
<script type="text/javascript">
$(function(){
//查看模式情况下,删除和上传附件功能禁止使用
if(location.href.indexOf("load=detail")!=-1){
$(".jeecgDetail").hide();
}
if(location.href.indexOf("mode=read")!=-1){
//查看模式控件禁用
$("#formobj").find(":input").attr("disabled","disabled");
}
if(location.href.indexOf("mode=onbutton")!=-1){
//其他模式显示提交按钮
$("#sub_tr").show();
}
});
var neibuClickFlag = false;
function neibuClick() {
neibuClickFlag = true;
$('#btn_sub').trigger('click');
}
</script>
</body>
<script src = "webpage/com/zzjee/conf/wxConfig.js"></script>
</html>

View File

@ -0,0 +1,380 @@
<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>配置信息</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="online/template/ledefault/css/vendor.css">
<link rel="stylesheet" href="online/template/ledefault/css/bootstrap-theme.css">
<link rel="stylesheet" href="online/template/ledefault/css/bootstrap.css">
<link rel="stylesheet" href="online/template/ledefault/css/app.css">
<link rel="stylesheet" href="plug-in/Validform/css/metrole/style.css" type="text/css"/>
<link rel="stylesheet" href="plug-in/Validform/css/metrole/tablefrom.css" type="text/css"/>
<script type="text/javascript" src="plug-in/jquery/jquery-1.8.3.js"></script>
<script type="text/javascript" src="plug-in/tools/dataformat.js"></script>
<script type="text/javascript" src="plug-in/easyui/jquery.easyui.min.1.3.2.js"></script>
<script type="text/javascript" src="plug-in/easyui/locale/zh-cn.js"></script>
<script type="text/javascript" src="plug-in/tools/syUtil.js"></script>
<script type="text/javascript" src="plug-in/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="plug-in/lhgDialog/lhgdialog.min.js"></script>
<script type="text/javascript" src="plug-in/tools/curdtools_zh-cn.js"></script>
<script type="text/javascript" src="plug-in/tools/easyuiextend.js"></script>
<script type="text/javascript" src="plug-in/Validform/js/Validform_v5.3.1_min_zh-cn.js"></script>
<script type="text/javascript" src="plug-in/Validform/js/Validform_Datatype_zh-cn.js"></script>
<script type="text/javascript" src="plug-in/Validform/js/datatype_zh-cn.js"></script>
<script type="text/javascript" src="plug-in/Validform/plugin/passwordStrength/passwordStrength-min.js"></script>
<script type="text/javascript" charset="utf-8" src="plug-in/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="plug-in/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript">
//编写自定义JS代码
</script>
</head>
<body>
<t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" action="wxConfigController.do?doUpdate" tiptype="1" >
<input type="hidden" id="btn_sub" class="btn_sub"/>
<input type="hidden" name="id" value='${wxConfigPage.id}' >
<div class="tab-wrapper">
<!-- tab -->
<ul class="nav nav-tabs">
<li role="presentation" class="active"><a href="javascript:void(0);">配置信息</a></li>
</ul>
<!-- tab内容 -->
<div class="con-wrapper" id="con-wrapper1" style="display: block;">
<div class="row form-wrapper">
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>创建人名称:</b>
</div>
<div class="col-xs-3">
<input id="createName" name="createName" type="text" class="form-control"
ignore="ignore"
value='${wxConfigPage.createName}' />
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">创建人名称</label>
</div>
<div class="col-xs-3 text-center">
<b>创建人登录名称:</b>
</div>
<div class="col-xs-3">
<input id="createBy" name="createBy" type="text" class="form-control"
ignore="ignore"
value='${wxConfigPage.createBy}' />
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">创建人登录名称</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>创建日期:</b>
</div>
<div class="col-xs-3">
<input id="createDate" name="createDate" type="text"
ignore="ignore"
style="background: url('plug-in/ace/images/datetime.png') no-repeat scroll right center transparent;" class="form-control" onClick="WdatePicker()" value='<fmt:formatDate value='${wxConfigPage.createDate}' type="date" pattern="yyyy-MM-dd"/>' />
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">创建日期</label>
</div>
<div class="col-xs-3 text-center">
<b>更新人名称:</b>
</div>
<div class="col-xs-3">
<input id="updateName" name="updateName" type="text" class="form-control"
ignore="ignore"
value='${wxConfigPage.updateName}' />
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">更新人名称</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>更新人登录名称:</b>
</div>
<div class="col-xs-3">
<input id="updateBy" name="updateBy" type="text" class="form-control"
ignore="ignore"
value='${wxConfigPage.updateBy}' />
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">更新人登录名称</label>
</div>
<div class="col-xs-3 text-center">
<b>更新日期:</b>
</div>
<div class="col-xs-3">
<input id="updateDate" name="updateDate" type="text"
ignore="ignore"
style="background: url('plug-in/ace/images/datetime.png') no-repeat scroll right center transparent;" class="form-control" onClick="WdatePicker()" value='<fmt:formatDate value='${wxConfigPage.updateDate}' type="date" pattern="yyyy-MM-dd"/>' />
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">更新日期</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>所属部门:</b>
</div>
<div class="col-xs-3">
<input id="sysOrgCode" name="sysOrgCode" type="text" class="form-control"
ignore="ignore"
value='${wxConfigPage.sysOrgCode}' />
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">所属部门</label>
</div>
<div class="col-xs-3 text-center">
<b>所属公司:</b>
</div>
<div class="col-xs-3">
<input id="sysCompanyCode" name="sysCompanyCode" type="text" class="form-control"
ignore="ignore"
value='${wxConfigPage.sysCompanyCode}' />
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">所属公司</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>流程状态:</b>
</div>
<div class="col-xs-3">
<input id="bpmStatus" name="bpmStatus" type="text" class="form-control"
ignore="ignore"
value='${wxConfigPage.bpmStatus}' />
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">流程状态</label>
</div>
<div class="col-xs-3 text-center">
<b>前端编码:</b>
</div>
<div class="col-xs-3">
<input id="appCode" name="appCode" type="text" class="form-control"
ignore="ignore"
value='${wxConfigPage.appCode}' />
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">前端编码</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>备注:</b>
</div>
<div class="col-xs-3">
<input id="appRemark" name="appRemark" type="text" class="form-control"
ignore="ignore"
value='${wxConfigPage.appRemark}' />
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">备注</label>
</div>
<div class="col-xs-3 text-center">
<b>appID</b>
</div>
<div class="col-xs-3">
<textarea id="appId" class="form-control" rows="6"
ignore="ignore"
name="appId">${wxConfigPage.appId}</textarea>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">appID</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>appsecret</b>
</div>
<div class="col-xs-3">
<textarea id="appSecret" class="form-control" rows="6"
ignore="ignore"
name="appSecret">${wxConfigPage.appSecret}</textarea>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">appsecret</label>
</div>
<div class="col-xs-3 text-center">
<b>appkey</b>
</div>
<div class="col-xs-3">
<input id="appKey" name="appKey" type="text" class="form-control"
ignore="ignore"
value='${wxConfigPage.appKey}' />
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">appkey</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>商户号:</b>
</div>
<div class="col-xs-3">
<input id="mchId" name="mchId" type="text" class="form-control"
ignore="ignore"
value='${wxConfigPage.mchId}' />
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">商户号</label>
</div>
<div class="col-xs-3 text-center">
<b>通知地址:</b>
</div>
<div class="col-xs-3">
<input id="notifyUrl" name="notifyUrl" type="text" class="form-control"
ignore="ignore"
value='${wxConfigPage.notifyUrl}' />
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">通知地址</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>GRANT_TYPE</b>
</div>
<div class="col-xs-3">
<textarea id="grantType" class="form-control" rows="6"
ignore="ignore"
name="grantType">${wxConfigPage.grantType}</textarea>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">GRANT_TYPE</label>
</div>
<div class="col-xs-3 text-center">
<b>备用1</b>
</div>
<div class="col-xs-3">
<textarea id="wxBy1" class="form-control" rows="6"
ignore="ignore"
name="wxBy1">${wxConfigPage.wxBy1}</textarea>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">备用1</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>备用2</b>
</div>
<div class="col-xs-3">
<textarea id="wxBy2" class="form-control" rows="6"
ignore="ignore"
name="wxBy2">${wxConfigPage.wxBy2}</textarea>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">备用2</label>
</div>
<div class="col-xs-3 text-center">
<b>备用3</b>
</div>
<div class="col-xs-3">
<textarea id="wxBy3" class="form-control" rows="6"
ignore="ignore"
name="wxBy3">${wxConfigPage.wxBy3}</textarea>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">备用3</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b>备用4</b>
</div>
<div class="col-xs-3">
<textarea id="wxBy4" class="form-control" rows="6"
ignore="ignore"
name="wxBy4">${wxConfigPage.wxBy4}</textarea>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">备用4</label>
</div>
<div class="col-xs-3 text-center">
<b>备用5</b>
</div>
<div class="col-xs-3">
<textarea id="wxBy5" class="form-control" rows="6"
ignore="ignore"
name="wxBy5">${wxConfigPage.wxBy5}</textarea>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">备用5</label>
</div>
</div>
<div class="row" id = "sub_tr" style="display: none;">
<div class="col-xs-12 layout-header">
<div class="col-xs-6"></div>
<div class="col-xs-6"><button type="button" onclick="neibuClick();" class="btn btn-default">提交</button></div>
</div>
</div>
</div>
</div>
<div class="con-wrapper" id="con-wrapper2" style="display: block;"></div>
</div>
</t:formvalid>
<script type="text/javascript">
$(function(){
//查看模式情况下,删除和上传附件功能禁止使用
if(location.href.indexOf("load=detail")!=-1){
$(".jeecgDetail").hide();
}
if(location.href.indexOf("mode=read")!=-1){
//查看模式控件禁用
$("#formobj").find(":input").attr("disabled","disabled");
}
if(location.href.indexOf("mode=onbutton")!=-1){
//其他模式显示提交按钮
$("#sub_tr").show();
}
});
var neibuClickFlag = false;
function neibuClick() {
neibuClickFlag = true;
$('#btn_sub').trigger('click');
}
</script>
</body>
<script src = "webpage/com/zzjee/conf/wxConfig.js"></script>
</html>

View File

@ -0,0 +1,28 @@
//通用弹出式文件上传
function commonUpload(callback){
$.dialog({
content: "url:systemController.do?commonUpload",
lock : true,
title:"文件上传",
zIndex:2100,
width:700,
height: 200,
parent:windowapi,
cache:false,
ok: function(){
var iframe = this.iframe.contentWindow;
iframe.uploadCallback(callback);
return true;
},
cancelVal: '关闭',
cancel: function(){
}
});
}
function decode(value, id) {//value传入值,id接受值
var last = value.lastIndexOf("/");
var filename = value.substring(last + 1, value.length);
$("#" + id).text(decodeURIComponent(filename));
}

View File

@ -0,0 +1,64 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
<div class="easyui-layout" fit="true">
<div region="center" style="padding:0px;border:0px">
<t:datagrid name="wxConfigList" checkbox="true" pagination="true" fitColumns="false" title="配置信息" actionUrl="wxConfigController.do?datagrid" idField="id" fit="true" queryMode="group">
<t:dgCol title="id" field="id" hidden="true" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="创建人名称" field="createName" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="创建人登录名称" field="createBy" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="创建日期" field="createDate" formatter="yyyy-MM-dd" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="更新人名称" field="updateName" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="更新人登录名称" field="updateBy" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="更新日期" field="updateDate" formatter="yyyy-MM-dd" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="所属部门" field="sysOrgCode" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="所属公司" field="sysCompanyCode" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="流程状态" field="bpmStatus" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="前端编码" field="appCode" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="备注" field="appRemark" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="appID" field="appId" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="appsecret" field="appSecret" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="appkey" field="appKey" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="商户号" field="mchId" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="通知地址" field="notifyUrl" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="GRANT_TYPE" field="grantType" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="备用1" field="wxBy1" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="备用2" field="wxBy2" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="备用3" field="wxBy3" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="备用4" field="wxBy4" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="备用5" field="wxBy5" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="操作" field="opt" width="100"></t:dgCol>
<t:dgDelOpt title="删除" url="wxConfigController.do?doDel&id={id}" urlclass="ace_button" urlfont="fa-trash-o"/>
<t:dgToolBar title="录入" icon="icon-add" url="wxConfigController.do?goAdd" funname="add"></t:dgToolBar>
<t:dgToolBar title="编辑" icon="icon-edit" url="wxConfigController.do?goUpdate" funname="update"></t:dgToolBar>
<t:dgToolBar title="批量删除" icon="icon-remove" url="wxConfigController.do?doBatchDel" funname="deleteALLSelect"></t:dgToolBar>
<t:dgToolBar title="查看" icon="icon-search" url="wxConfigController.do?goUpdate" funname="detail"></t:dgToolBar>
<t:dgToolBar title="导入" icon="icon-put" funname="ImportXls"></t:dgToolBar>
<t:dgToolBar title="导出" icon="icon-putout" funname="ExportXls"></t:dgToolBar>
<t:dgToolBar title="模板下载" icon="icon-putout" funname="ExportXlsByT"></t:dgToolBar>
</t:datagrid>
</div>
</div>
<script src = "webpage/com/zzjee/conf/wxConfigList.js"></script>
<script type="text/javascript">
$(document).ready(function(){
});
//导入
function ImportXls() {
openuploadwin('Excel导入', 'wxConfigController.do?upload', "wxConfigList");
}
//导出
function ExportXls() {
JeecgExcelExport("wxConfigController.do?exportXls","wxConfigList");
}
//模板下载
function ExportXlsByT() {
JeecgExcelExport("wxConfigController.do?exportXlsByT","wxConfigList");
}
</script>

View File

@ -56,8 +56,8 @@
<t:dgCol title="批准文号" field="piZhunWenHao" hidden="true" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="注册日期" field="zhuCeRiQi" formatter="yyyy-MM-dd" hidden="true" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="备注" field="beiZhu" queryMode="group" width="120"></t:dgCol>
<%-- <t:dgCol title="操作" field="opt" width="100"></t:dgCol> --%>
<%-- <t:dgDelOpt title="删除" url="mdCusController.do?doDel&id={id}" urlclass="ace_button" urlfont="fa-trash-o"/> --%>
<t:dgCol title="操作" field="opt" width="100"></t:dgCol>
<t:dgDelOpt title="删除" url="mdCusController.do?doDel&id={id}" urlclass="ace_button" urlfont="fa-trash-o"/>
<t:dgToolBar title="录入" icon="icon-add" url="mdCusController.do?goAdd" funname="add"></t:dgToolBar>
<t:dgToolBar title="编辑" icon="icon-edit" url="mdCusController.do?goUpdate" funname="update"></t:dgToolBar>
<%-- <t:dgToolBar title="批量删除" icon="icon-remove" url="mdCusController.do?doBatchDel" funname="deleteALLSelect"></t:dgToolBar> --%>

View File

@ -92,7 +92,7 @@ function counttiji(){
<div class="col-xs-3">
<input id="jiZhunwendu" name="jiZhunwendu" type="text" class="form-control"
ignore="checked"
datatype="*" required="required"/>
required="required"/>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">基准温度</label>
</div>
@ -157,6 +157,36 @@ function counttiji(){
<label class="Validform_label" style="display: none">商品名称</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b >英文名称</b>
</div>
<div class="col-xs-3">
<input id="ywMingCheng" name="ywMingCheng" type="text" class="form-control"
ignore="checked" style="width:490px"
/>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">英文名称</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b >日文名称</b>
</div>
<div class="col-xs-3">
<input id="rwMingCheng" name="rwMingCheng" type="text" class="form-control"
ignore="checked" style="width:490px"
/>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">日文名称</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
@ -174,7 +204,7 @@ function counttiji(){
</div>
<div class="col-xs-3">
<input id="zhlKg" name="zhlKg" type="text" class="form-control"
ignore="ignore" style="text-align:right" datatype="*" required="required"
ignore="ignore" style="text-align:right" required="required"
/>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">重量</label>
@ -184,41 +214,41 @@ function counttiji(){
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b style="color:red">长</b>
<b >长</b>
</div>
<div class="col-xs-3">
<input id="chZhXiang" name="chZhXiang" type="text" class="form-control"
ignore="ignore" style="text-align:right" datatype="d"
ignore="ignore" style="text-align:right"
/>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">长</label>
</div>
<div class="col-xs-3 text-center">
<b style="color:red">宽</b>
<b >宽</b>
</div>
<div class="col-xs-3">
<input id="kuZhXiang" name="kuZhXiang" type="text" class="form-control"
ignore="ignore" style="text-align:right" datatype="d"
ignore="ignore" style="text-align:right"
/>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">宽</label>
</div>
<div class="col-xs-3 text-center">
<b style="color:red">高</b>
<b >高</b>
</div>
<div class="col-xs-3">
<input id="gaoZhXiang" name="gaoZhXiang" type="text" class="form-control"
ignore="ignore" style="text-align:right" datatype="d" onchange="counttiji()"
ignore="ignore" style="text-align:right" onchange="counttiji()"
/>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">高</label>
</div>
<div class="col-xs-3 text-center">
<b style="color:red">体积</b>
<b >体积</b>
</div>
<div class="col-xs-3">
<input id="tiJiCm" name="tiJiCm" type="text" class="form-control"
ignore="ignore" style="text-align:right" datatype="d" datatype="*"
ignore="ignore" style="text-align:right"
/>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">体积</label>

View File

@ -161,7 +161,31 @@
<label class="Validform_label" style="display: none">商品名称</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b >英文名称</b>
</div>
<div class="col-xs-3">
<input id="ywMingCheng" name="ywMingCheng" type="text" class="form-control"
ignore="checked" style="width:490px"
value='${mdGoodsPage.ywMingCheng}' />
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">英文名称</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b >日文名称</b>
</div>
<div class="col-xs-3">
<input id="rwMingCheng" name="rwMingCheng" type="text" class="form-control"
ignore="checked" style="width:490px"
value='${mdGoodsPage.rwMingCheng}' />
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">日文名称</label>
</div>
</div>
<div class="row show-grid">
<div class="col-xs-3 text-center">
<b style="color:red">单位</b>

View File

@ -15,6 +15,9 @@
<t:dgCol title="所属公司" field="sysCompanyCode" hidden="true" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="所属客户" field="suoShuKeHu" query="true" queryMode="single" dictionary="mv_cus,cus_code,cus_name" width="120"></t:dgCol>
<t:dgCol title="商品名称" field="shpMingCheng" query="true" queryMode="single" width="160"></t:dgCol>
<t:dgCol title="英文名称" field="ywMingCheng" query="true" queryMode="single" width="160"></t:dgCol>
<t:dgCol title="日文名称" field="rwMingCheng" query="true" queryMode="single" width="160"></t:dgCol>
<t:dgCol title="商品简称" field="shpJianCheng" hidden="true" queryMode="single" width="120"></t:dgCol>
<t:dgCol title="商品编码" field="shpBianMa" query="true" queryMode="single" width="90"></t:dgCol>
<t:dgCol title="客户商品编码" field="shpBianMakh" query="true" queryMode="single" width="90"></t:dgCol>
@ -52,8 +55,8 @@
<t:dgCol title="基准温度" field="jiZhunwendu" queryMode="group" width="80"></t:dgCol>
<t:dgCol title="商品描述" field="shpMiaoShu" hidden="true" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="停用" field="zhuangTai" query="true" dictionary="sf_yn" width="120"></t:dgCol>
<%--<t:dgCol title="操作" field="opt" width="100"></t:dgCol>--%>
<%--<t:dgDelOpt title="删除" url="mdGoodsController.do?doDel&id={id}" urlclass="ace_button" urlfont="fa-trash-o"/>--%>
<t:dgCol title="操作" field="opt" width="100"></t:dgCol>
<t:dgDelOpt title="删除" url="mdGoodsController.do?doDel&id={id}" urlclass="ace_button" urlfont="fa-trash-o"/>
<t:dgToolBar title="录入" icon="icon-add" url="mdGoodsController.do?goAdd" funname="add"></t:dgToolBar>
<t:dgToolBar title="编辑" icon="icon-edit" url="mdGoodsController.do?goUpdate" funname="update"></t:dgToolBar>
<%-- <t:dgToolBar title="批量删除" icon="icon-remove" url="mdGoodsController.do?doBatchDel" funname="deleteALLSelect"></t:dgToolBar> --%>