Commit 3a4c114f by dengshichuan

Merge branch 'dsc' into 'develop'

Dsc

See merge request 8timerv2/8timerapiv200!78
parents e98f437e 6f4920f3
......@@ -4,7 +4,7 @@
* @author dsc
* @date 2020年4月21日
* @version 1.0
*/
*/
package cn.timer.api.bean.qyzx.businessService;
import java.util.Date;
......@@ -27,12 +27,17 @@ import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* <p>Title: QyzxUseRecord.java</p>
* <p>Description: 使用记录表实体类</p>
* @author dsc
* @date 2020年4月21日
* @version 1.0
/**
* <p>
* Title: QyzxUseRecord.java
* </p>
* <p>
* Description: 使用记录表实体类
* </p>
*
* @author dsc
* @date 2020年4月21日
* @version 1.0
*/
@Entity
......@@ -40,46 +45,49 @@ import lombok.NoArgsConstructor;
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Table(name="qyzx_use_record")
@Table(name = "qyzx_use_record")
@ApiModel("使用记录表")
public class QyzxUseRecord extends Model<QyzxUseRecord>{
public class QyzxUseRecord extends Model<QyzxUseRecord> {
private static final long serialVersionUID = 8623518557970200924L;
@Id
@GeneratedValue
@TableId (type = IdType.AUTO)
@ApiModelProperty(value="主键",example="1")
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "主键", example = "1")
private Integer id;
@ApiModelProperty(value="模块id 0-无 1-短信 2-电子合同 3-系统续费",example="1")
private Integer pmid;
@ApiModelProperty(value="订单号",example="1")
private String orderNo;
@ApiModelProperty(value="使用场景",example="1")
private String scene;
@ApiModelProperty(value="使用数量",example="1")
private Integer useNum;
@ApiModelProperty(value="原始总量",example="500")
private Integer originalTotalNum;
@ApiModelProperty(value="当前总量",example="499")
private Integer nowTotalNum;
@ApiModelProperty(value="是否删除",example="默认0-未删除,1-删除")
private Integer isDelete;
@ApiModelProperty(value = "模块id 0-无 1-短信 2-电子合同 3-系统续费", example = "1")
private Integer pmid;
@ApiModelProperty(value = "企业id", example = "117")
private Integer orgCode;
@ApiModelProperty(value = "订单号", example = "1")
private String orderNo;
@ApiModelProperty(value = "使用场景", example = "1")
private String scene;
@ApiModelProperty(value = "使用数量", example = "1")
private Integer useNum;
@ApiModelProperty(value = "原始总量", example = "500")
private Integer originalTotalNum;
@ApiModelProperty(value = "当前总量", example = "499")
private Integer nowTotalNum;
@ApiModelProperty(value = "是否删除", example = "默认0-未删除,1-删除")
private Integer isDelete;
@TableField(fill = FieldFill.INSERT)
@ApiModelProperty(value="创建时间 ",example="")
@ApiModelProperty(value = "创建时间 ", example = "")
private Date createTime;
@ApiModelProperty(value="创建人 ",example="")
@ApiModelProperty(value = "创建人 ", example = "")
private String createUser;
@ApiModelProperty(value="使用人手机号 ",example="")
@ApiModelProperty(value = "使用人手机号 ", example = "")
private String userPhone;
}
......@@ -6,10 +6,7 @@ import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.stream.Stream;
import javax.annotation.PostConstruct;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
......@@ -80,25 +77,25 @@ public class LoginController {
@Value("${config-8timer.Aliyun.SECRET}")
private String SECRET;
public static String host;
public static String PROJECT_ID;
public static String PROJECT_SECRET;
@Value("${config-8timer.esign.host}")
private String host_s;
@Value("${config-8timer.esign.PROJECT_ID}")
private String PROJECT_ID_s;
@Value("${config-8timer.esign.PROJECT_SECRET}")
private String PROJECT_SECRET_s;
@PostConstruct
public void init() {
host = host_s;
PROJECT_ID = PROJECT_ID_s;
PROJECT_SECRET = PROJECT_SECRET_s;
}
// public static String host;
// public static String PROJECT_ID;
// public static String PROJECT_SECRET;
//
// @Value("${config-8timer.esign.host}")
// private String host_s;
//
// @Value("${config-8timer.esign.PROJECT_ID}")
// private String PROJECT_ID_s;
//
// @Value("${config-8timer.esign.PROJECT_SECRET}")
// private String PROJECT_SECRET_s;
//
// @PostConstruct
// public void init() {
// host = host_s;
// PROJECT_ID = PROJECT_ID_s;
// PROJECT_SECRET = PROJECT_SECRET_s;
// }
@Value("${config-8timer.Aliyun.PROJECT_NAME}")
private String endpoint;
......@@ -132,9 +129,9 @@ public class LoginController {
map.put("3", REGION_ID);
map.put("4", ACCESSKEY_ID);
map.put("5", SECRET);
map.put("6", host);
map.put("7", PROJECT_ID);
map.put("8", PROJECT_SECRET);
// map.put("6", host);
// map.put("7", PROJECT_ID);
// map.put("8", PROJECT_SECRET);
map.put("9", endpoint);
map.put("10", accessKeyId);
map.put("11", accessKeySecret);
......
......@@ -334,8 +334,10 @@ public class DzhtController {
public Result<Object> rzUserNow(@CurrentUser UserBean userBean, Integer empNum) {
DzhtAssoGrrz grrz = new DzhtAssoGrrz();
grrz.setType(0);
System.err.println(empNum);
YgglMainEmp yg = YgglMainEmp.builder().build().selectOne(new QueryWrapper<YgglMainEmp>().select("phone")
.eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum));
System.err.println(yg);
grrz.setMobileNo(yg.getPhone());
DzhtAssoGrzc grzc = DzhtAssoGrzc.builder().build().selectOne(new QueryWrapper<DzhtAssoGrzc>()
......
......@@ -97,7 +97,7 @@ public class DzhtController2 {
Integer orgCode = userBean.getOrgCode();
YgglMainEmp yg = YgglMainEmp.builder().build()
.selectOne(new QueryWrapper<YgglMainEmp>().eq("emp_num", empNum));
.selectOne(new QueryWrapper<YgglMainEmp>().eq("org_code", orgCode).eq("emp_num", empNum));
String phone = yg.getPhone();
String name = yg.getName();
......@@ -351,7 +351,8 @@ public class DzhtController2 {
dzhtQueryDto.getTotalPage() == null ? 10 : dzhtQueryDto.getTotalPage());
QueryWrapper<DzhtAssoHtmb> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("is_del", 0).eq("emp_num", userBean.getEmpNum()).like(mbmc != null, "mbmc", mbmc)
.select("template_id", "mbmc", "file_name", "created_time").orderByDesc("created_time");
.eq("org_code", userBean.getOrgCode()).select("template_id", "mbmc", "file_name", "created_time")
.orderByDesc("created_time");
IPage<DzhtAssoHtmb> dPage = DzhtAssoHtmb.builder().build().selectPage(page, queryWrapper);
List<DzhtAssoHtmb> htmbs = dPage.getRecords();
dPage.getCurrent();
......
......@@ -9,21 +9,9 @@ import org.apache.commons.lang3.StringUtils;
public class ConfigConstant {
public static String host = "https://smlopenapi.esign.cn";
// public static String host = "https://openapi.esign.cn";
public static String PROJECT_ID = "4438775940";
public static String PROJECT_SECRET = "7b100813cca2746081c57837855ac5af";
// @Value("${config-8timer.esign.host}")
// private String host_s;
// @Value("${config-8timer.esign.PROJECT_ID}")
// private String PROJECT_ID_s;
// @Value("${config-8timer.esign.PROJECT_SECRET}")
// private String PROJECT_SECRET_s;
//
// @PostConstruct
// public void init() {
// host = host_s;
// PROJECT_ID = PROJECT_ID_s;
// PROJECT_SECRET = PROJECT_SECRET_s;
// }
// 机构认证地址
public static final String getJgrz_URL(String accountId) {
......
......@@ -153,7 +153,7 @@ public class HtzzController {
htzzQueryDto.getTotalPage() == null ? 10 : htzzQueryDto.getTotalPage());
QueryWrapper<HtzzAdminZzda> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("lrrid", userBean.getEmpNum()).eq("org_code", userBean.getOrgCode())
queryWrapper.eq("org_code", userBean.getOrgCode())
.select("id", "zjmc", "czry", "czrdh", "fzrq", "yxdqr", "txkg_type").eq("is_delete", 0)
.gt(!StrUtil.hasBlank(e), "yxdqr", !StrUtil.hasBlank(e) ? e : "9999-01-01 00:00:00")
.and(!StrUtil.hasBlank(q), wq -> wq.like("zjmc", q).or().like("czry", q)).orderByDesc("lrsj_time");
......
......@@ -17,6 +17,7 @@ import java.util.stream.Collectors;
import javax.transaction.Transactional;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -37,6 +38,7 @@ import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import cn.timer.api.bean.qyzx.QyzxEntInfoM;
import cn.timer.api.bean.qyzx.QyzxSms;
import cn.timer.api.bean.qyzx.businessService.QyzxBuyRecord;
import cn.timer.api.bean.qyzx.businessService.QyzxInvoiceData;
import cn.timer.api.bean.qyzx.businessService.QyzxOrderRecord;
......@@ -240,10 +242,9 @@ public class QyzxBusinessController {
@RequestBody QyzxInvoiceData qyzxInvoiceData) {
if (!ObjectUtil.isAllNotEmpty(
// qyzxInvoiceData,
qyzxInvoiceData.getInvoiceTitle(),
qyzxInvoiceData.getDutyParagraph(), qyzxInvoiceData.getCompanyAddress(),
qyzxInvoiceData.getCompanyPhone(), qyzxInvoiceData.getBankName(), qyzxInvoiceData.getBankAccount(),
qyzxInvoiceData.getInvoiceType(), qyzxInvoiceData.getInvoiceProject(),
qyzxInvoiceData.getInvoiceTitle(), qyzxInvoiceData.getDutyParagraph(),
qyzxInvoiceData.getCompanyAddress(), qyzxInvoiceData.getCompanyPhone(), qyzxInvoiceData.getBankName(),
qyzxInvoiceData.getBankAccount(), qyzxInvoiceData.getInvoiceType(), qyzxInvoiceData.getInvoiceProject(),
qyzxInvoiceData.getInvoiceValue(), qyzxInvoiceData.getConsignee(), qyzxInvoiceData.getConsigneePhone(),
qyzxInvoiceData.getEmail(), qyzxInvoiceData.getShippingArea(), qyzxInvoiceData.getShippingAddress(),
qyzxInvoiceData.getZipCode())) {
......@@ -296,7 +297,17 @@ public class QyzxBusinessController {
@ApiOperation(value = "查询短信使用记录", httpMethod = "GET", notes = "接口发布说明")
public Result<List<QyzxUseRecord>> queryMsgUseRecord(@CurrentUser UserBean userBean, String orderNo) {
return ResultUtil.data(QyzxUseRecord.builder().build()
.selectList(new LambdaQueryWrapper<QyzxUseRecord>().eq(QyzxUseRecord::getOrderNo, orderNo)), "查询成功");
.selectList(new LambdaQueryWrapper<QyzxUseRecord>().eq(QyzxUseRecord::getOrgCode, userBean.getOrgCode())
.eq(QyzxUseRecord::getPmid, 1).eq(orderNo != null, QyzxUseRecord::getOrderNo, orderNo)),
"查询成功");
}
@GetMapping(value = "/queryMsgUseDetal/{id}")
@ApiOperation(value = "查询短信使用详情", httpMethod = "GET", notes = "接口发布说明")
public Result<QyzxSms> queryMsgUseDetal(@CurrentUser UserBean userBean, @PathVariable Integer id) {
return ResultUtil.data(
QyzxSms.builder().build().selectOne(new LambdaQueryWrapper<QyzxSms>().eq(QyzxSms::getUseId, id)),
"查询成功");
}
// TODO 不同业务使用 不同数据表
......
......@@ -162,6 +162,7 @@ public class AliyunSMS {
qyzxUseRecord.setUseNum(1);
qyzxUseRecord.setPmid(quantity.getPmid());
qyzxUseRecord.setCreateUser("System");
qyzxUseRecord.setOrgCode(orgCode);
qyzxUseRecord.insert();
id = qyzxUseRecord.getId();
......@@ -283,6 +284,7 @@ public class AliyunSMS {
qyzxUseRecord.setScene(QyzxScene.MSG_REMIND.getMessage());
qyzxUseRecord.setUseNum(1);
qyzxUseRecord.setPmid(quantity.getPmid());
qyzxUseRecord.setOrgCode(orgCode);
qyzxUseRecord.insert();
quantity.setRemainder(remainder);
......
......@@ -166,11 +166,11 @@ config-8timer:
expirationTime: 3153600000000L
expirationTime_pri: 600000L
esign: # e签宝
host: https://smlopenapi.esign.cn
# host: https://smlopenapi.esign.cn
# test: https://smlopenapi.esign.cn
# pro: https://openapi.esign.cn
PROJECT_ID: 4438775940
PROJECT_SECRET: 7b100813cca2746081c57837855ac5af
# PROJECT_ID: 4438775940
# PROJECT_SECRET: 7b100813cca2746081c57837855ac5af
remind: #合同提醒时间 默认小于等于1天会提醒+三个配置项
one: 3
two: 7
......
......@@ -140,9 +140,9 @@ config-8timer:
expirationTime: 3153600000000L
expirationTime_pri: 600000L
esign: # e签宝
host: https://openapi.esign.cn
PROJECT_ID: 4438775940
PROJECT_SECRET: 7b100813cca2746081c57837855ac5af
# host: https://openapi.esign.cn
# PROJECT_ID: 4438775940
# PROJECT_SECRET: 7b100813cca2746081c57837855ac5af
remind: #合同提醒时间 默认小于等于1天会提醒+三个配置项
one: 3
two: 7
......
......@@ -140,9 +140,9 @@ config-8timer:
expirationTime: 3153600000000L
expirationTime_pri: 600000L
esign: # e签宝
host: https://smlopenapi.esign.cn
PROJECT_ID: 4438775940
PROJECT_SECRET: 7b100813cca2746081c57837855ac5af
# host: https://smlopenapi.esign.cn
# PROJECT_ID: 4438775940
# PROJECT_SECRET: 7b100813cca2746081c57837855ac5af
remind: #合同提醒时间 默认小于等于1天会提醒+三个配置项
one: 3
two: 7
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment