Commit 3a4c114f by dengshichuan

Merge branch 'dsc' into 'develop'

Dsc

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