Compare commits
11 Commits
ee396ed430
...
699e66ee32
| Author | SHA1 | Date |
|---|---|---|
|
|
699e66ee32 | |
|
|
c42d2099d1 | |
|
|
5dae109c54 | |
|
|
340acdd299 | |
|
|
d2098dab1b | |
|
|
a7991c4005 | |
|
|
ce2396aafc | |
|
|
c0fd7885dc | |
|
|
5f45a1eb87 | |
|
|
5aae85cadb | |
|
|
3619269ee4 |
|
|
@ -161,74 +161,47 @@ public class ExcelServiceImpl implements ExcelService {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
private void printLevel3Relation(Map<String, Map<String, List<MapType>>> level3Relation) {
|
||||
for (Map.Entry<String, Map<String, List<MapType>>> firstLevel : level3Relation.entrySet()) {
|
||||
boolean outExist = true;
|
||||
System.out.println("level_1: " + firstLevel.getKey());
|
||||
//TODO, sql查询:是否有此名字 + parentId=0, select * from ma_part_type where name=? and parent_id=0;
|
||||
MaPartType maPartType_level1 = excelMapper.selectMa(firstLevel.getKey(),0);
|
||||
//TODO, 以上返回 maPartType_level1
|
||||
if (Objects.nonNull(maPartType_level1)) {
|
||||
loopInner(firstLevel, outExist,maPartType_level1.getPaId());
|
||||
loopInner(firstLevel, maPartType_level1.getPaId());
|
||||
} else {
|
||||
//TODO, insert firstLevel, get id
|
||||
MaPartType maPartType = new MaPartType();
|
||||
maPartType.setPaName(firstLevel.getKey());
|
||||
maPartType.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString());
|
||||
maPartType.setParentId(0L);
|
||||
maPartType.setLevel("1");
|
||||
excelMapper.insertPaName(maPartType);//如果第一层在数据库中查询不到则插入数据,并且读取到parent_id
|
||||
outExist = outExist && false;
|
||||
loopInner(firstLevel, outExist, maPartType.getPaId());
|
||||
loopInner(firstLevel, maPartType.getPaId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void loopInner(Map.Entry<String, Map<String, List<MapType>>> firstLevel, boolean outExist, long firstLevelId) {
|
||||
private void loopInner(Map.Entry<String, Map<String, List<MapType>>> firstLevel, long firstLevelId) {
|
||||
for (Map.Entry<String, List<MapType>> secondLevel : firstLevel.getValue().entrySet()) {
|
||||
System.out.println("\tlevel_2: " + secondLevel.getKey());
|
||||
//TODO, sql查询:是否有此名字 + parentId=firstLevelId, select * from ma_part_type where name=? and parent_id = firstLevelId;
|
||||
MaPartType maPartType_level2 = excelMapper.selectMa(secondLevel.getKey(),firstLevelId);
|
||||
//TODO, 以上返回 maPartType_level2
|
||||
if (Objects.nonNull(maPartType_level2)) {
|
||||
looplevel3(secondLevel, outExist, maPartType_level2.getPaId());
|
||||
looplevel3(secondLevel, maPartType_level2.getPaId());
|
||||
} else {
|
||||
//TODO, insert firstLevel, get id
|
||||
if (!outExist) {
|
||||
MaPartType maPartType = new MaPartType();
|
||||
maPartType.setPaName(secondLevel.getKey());
|
||||
maPartType.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString());
|
||||
maPartType.setParentId(firstLevelId);
|
||||
maPartType.setLevel("2");
|
||||
excelMapper.insertPaName(maPartType);//如果第一层在数据库中查询不到则插入数据,并且读取到parent_id
|
||||
outExist = outExist && false;
|
||||
looplevel3(secondLevel, outExist, maPartType.getPaId());
|
||||
}
|
||||
looplevel3(secondLevel, maPartType.getPaId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void looplevel3(Map.Entry<String, List<MapType>> secondLevel, boolean outExist, long secondLevelId) {
|
||||
private void looplevel3(Map.Entry<String, List<MapType>> secondLevel, long secondLevelId) {
|
||||
for (MapType thirdLevel : secondLevel.getValue()) {
|
||||
System.out.println("\t\tlevel_3: " + thirdLevel);
|
||||
//TODO, sql查询:是否有此名字 + parentId=secondLevelId, select * from ma_part_type where name=? and parent_id = secondLevelId;
|
||||
MaPartType maPartType_level3 = excelMapper.selectMa(thirdLevel.getPaName(),secondLevelId);
|
||||
//TODO, 以上返回 maPartType_level3
|
||||
if (Objects.nonNull(maPartType_level3)) {
|
||||
if (!outExist) {
|
||||
//TODO insert
|
||||
MaPartType maPartType = new MaPartType();
|
||||
maPartType.setPaName(thirdLevel.getPaName());
|
||||
maPartType.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString());
|
||||
maPartType.setUnitId(thirdLevel.getUnitId());
|
||||
maPartType.setBuyPrice(thirdLevel.getBuyPrice());
|
||||
maPartType.setParentId(secondLevelId);
|
||||
maPartType.setLevel("3");
|
||||
excelMapper.insertPaName(maPartType);//如果第一层在数据库中查询不到则插入数据,并且读取到parent_id
|
||||
}
|
||||
} else {
|
||||
//TODO insert
|
||||
if (Objects.isNull(maPartType_level3)) {
|
||||
MaPartType maPartType = new MaPartType();
|
||||
maPartType.setPaName(thirdLevel.getPaName());
|
||||
maPartType.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString());
|
||||
|
|
|
|||
|
|
@ -8,7 +8,9 @@ import com.bonus.sgzb.common.core.exception.ServiceException;
|
|||
import com.bonus.sgzb.common.core.utils.GlobalConstants;
|
||||
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.sgzb.common.redis.service.RedisService;
|
||||
import com.bonus.sgzb.system.api.domain.SysUser;
|
||||
import com.bonus.sgzb.system.config.TencentSmsConfig;
|
||||
import com.bonus.sgzb.system.mapper.SysUserMapper;
|
||||
import com.bonus.sgzb.system.service.ISysSmsService;
|
||||
import com.tencentcloudapi.common.Credential;
|
||||
import com.tencentcloudapi.common.exception.TencentCloudSDKException;
|
||||
|
|
@ -43,6 +45,8 @@ public class SysSmsServiceImpl implements ISysSmsService {
|
|||
|
||||
@Resource
|
||||
private RedisService redisService;
|
||||
@Resource
|
||||
private SysUserMapper sysUserMapper;
|
||||
|
||||
@Resource
|
||||
private TencentSmsConfig tencentSmsConfig;
|
||||
|
|
@ -55,6 +59,7 @@ public class SysSmsServiceImpl implements ISysSmsService {
|
|||
|
||||
/**
|
||||
* 验收通知短信
|
||||
*
|
||||
* @param phone 手机号
|
||||
* @param msg 内容
|
||||
* @return
|
||||
|
|
@ -74,11 +79,12 @@ public class SysSmsServiceImpl implements ISysSmsService {
|
|||
} catch (Exception e) {
|
||||
return AjaxResult.error("发送失败:" + e.getMessage());
|
||||
}*/
|
||||
return sendMsgByPhone( phone, msg);
|
||||
return sendMsgByPhone(phone, msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* 登录短信验证码
|
||||
*
|
||||
* @param phone 手机号
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -96,12 +102,13 @@ public class SysSmsServiceImpl implements ISysSmsService {
|
|||
} catch (Exception e) {
|
||||
return AjaxResult.error("发送失败:" + e.getMessage());
|
||||
}*/
|
||||
return sendCodeByPhone(phone,null);
|
||||
return sendCodeByPhone(phone, null);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 发送消息msg到手机
|
||||
*
|
||||
* @param phone 手机号码
|
||||
* @return AjaxResult对象
|
||||
*/
|
||||
|
|
@ -128,6 +135,7 @@ public class SysSmsServiceImpl implements ISysSmsService {
|
|||
|
||||
/**
|
||||
* 发送验证码到手机
|
||||
*
|
||||
* @param phone 手机号码
|
||||
* @return AjaxResult对象
|
||||
*/
|
||||
|
|
@ -136,6 +144,11 @@ public class SysSmsServiceImpl implements ISysSmsService {
|
|||
if (phone == null || phone.length() != UserConstants.PHONE_DEFAULT_LENGTH_LOGIN) {
|
||||
return AjaxResult.error("手机号格式错误,请输入11位数字号码");
|
||||
}
|
||||
// 校验是否存在该手机号
|
||||
SysUser sysUser = sysUserMapper.checkPhoneUnique(phone);
|
||||
if (sysUser == null) {
|
||||
return AjaxResult.error("该手机号未绑定用户,请重新确认");
|
||||
}
|
||||
String code = getSixBitCode();
|
||||
// 校验验证码
|
||||
if (code.length() != UserConstants.CODE_MIN_LENGTH_LOGIN) {
|
||||
|
|
@ -151,7 +164,8 @@ public class SysSmsServiceImpl implements ISysSmsService {
|
|||
}
|
||||
// 存储验证码至Redis中,键值为:code_15588886157 , 有效期5,时间颗粒度为MINUTES:分钟
|
||||
redisService.setCacheObject("code_" + phone, code, 5L, TimeUnit.MINUTES);
|
||||
return success("手机号:" + phone + ",用户登录验证码:" + code + ",返回结果:" + body);
|
||||
// return success("手机号:" + phone + ",用户登录验证码:" + code + ",返回结果:" + body);
|
||||
return success("验证码发送成功:" + body);
|
||||
} catch (Exception e) {
|
||||
return AjaxResult.error("发送失败:" + e.getMessage());
|
||||
}
|
||||
|
|
@ -195,15 +209,16 @@ public class SysSmsServiceImpl implements ISysSmsService {
|
|||
|
||||
/**
|
||||
* 腾讯sms短信
|
||||
*
|
||||
* @param mobilePhone
|
||||
* @param templateId
|
||||
* @param args
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public String sendMessageNew(String mobilePhone,String templateId, String... args) throws Exception {
|
||||
public String sendMessageNew(String mobilePhone, String templateId, String... args) throws Exception {
|
||||
|
||||
try{
|
||||
try {
|
||||
// 实例化一个认证对象,入参需要传入腾讯云账户secretId,secretKey,此处还需注意密钥对的保密
|
||||
Credential cred = new Credential(tencentSmsConfig.getAccessKeyId(), tencentSmsConfig.getAccessKeySecret());
|
||||
// 实例化一个http选项,可选的,没有特殊需求可以跳过
|
||||
|
|
@ -227,7 +242,7 @@ public class SysSmsServiceImpl implements ISysSmsService {
|
|||
phoneNumberSet1[i] = "+86" + phoneNumberSet1[i];
|
||||
}
|
||||
req.setPhoneNumberSet(phoneNumberSet1);//发送的手机号
|
||||
if(null != args && args.length > 0 && Arrays.stream(args)
|
||||
if (null != args && args.length > 0 && Arrays.stream(args)
|
||||
.noneMatch(s -> s == null || s.trim().isEmpty())) {
|
||||
String[] templateParamSet1 = args;//模板的参数
|
||||
req.setTemplateParamSet(templateParamSet1);//发送验证码
|
||||
|
|
@ -239,10 +254,10 @@ public class SysSmsServiceImpl implements ISysSmsService {
|
|||
log.info("腾讯云平台短信发送响应结果:{}", JSONObject.toJSONString(resp));
|
||||
SendStatus[] sendStatusSet = resp.getSendStatusSet();
|
||||
List<SendStatus> sendStatuses = Arrays.asList(sendStatusSet);
|
||||
if (CollectionUtils.isNotEmpty(sendStatuses)){
|
||||
if (CollectionUtils.isNotEmpty(sendStatuses)) {
|
||||
for (SendStatus sendStatus : sendStatuses) {
|
||||
if (!"OK".equalsIgnoreCase(sendStatus.getCode())){
|
||||
throw new ServiceException(sendStatus.getMessage(),Integer.valueOf(sendStatus.getCode()));
|
||||
if (!"OK".equalsIgnoreCase(sendStatus.getCode())) {
|
||||
throw new ServiceException(sendStatus.getMessage(), Integer.valueOf(sendStatus.getCode()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -251,7 +266,7 @@ public class SysSmsServiceImpl implements ISysSmsService {
|
|||
} catch (TencentCloudSDKException e) {
|
||||
e.printStackTrace();
|
||||
log.error("短信发送失败:{}", e.getMessage());
|
||||
throw new ServiceException(e.getMessage(),Integer.valueOf(e.getErrorCode()));
|
||||
throw new ServiceException(e.getMessage(), Integer.valueOf(e.getErrorCode()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -598,7 +598,7 @@ export default {
|
|||
this.queryParams.examineStatusId = '32'
|
||||
}
|
||||
this.queryParams.unitId = data.unitId
|
||||
this.queryParams.costBearingParty = data?.costBearingParty
|
||||
this.queryParams.costBearingParty = data.costBearingParty
|
||||
this.queryParams.proId = data.proId
|
||||
this.queryParams.leaseApplyInfo.phone =
|
||||
data.leaseApplyInfoList[0].phone
|
||||
|
|
@ -633,7 +633,7 @@ export default {
|
|||
}
|
||||
this.queryParams.unitId = data.unitId
|
||||
this.queryParams.proId = data.proId
|
||||
this.queryParams.costBearingParty = data?.costBearingParty
|
||||
this.queryParams.costBearingParty = data.costBearingParty
|
||||
this.queryParams.leaseApplyInfo.phone =
|
||||
data.leaseApplyInfoList[0].phone
|
||||
this.queryParams.leaseApplyInfo.leasePerson =
|
||||
|
|
@ -889,4 +889,3 @@ export default {
|
|||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@
|
|||
<el-form-item
|
||||
v-if="domain.partType == 1"
|
||||
:prop="'premiumList.' + index + '.partCost'"
|
||||
label="配件费用:"
|
||||
label="配件单价:"
|
||||
:rules="{
|
||||
required: false,
|
||||
validator: meneyIntegerValidator,
|
||||
|
|
@ -267,8 +267,9 @@
|
|||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="domain.partType == 1"
|
||||
:prop="'premiumListTwo.' + index + '.partCost'"
|
||||
label="配件费用:"
|
||||
label="配件单价:"
|
||||
:rules="{
|
||||
required: false,
|
||||
validator: meneyIntegerValidator,
|
||||
|
|
|
|||
|
|
@ -791,7 +791,8 @@ export default {
|
|||
this.$tab.closeOpenPage(obj)
|
||||
},
|
||||
async handleBindDetails(row) {
|
||||
console.log('🚀 ~ handleBindDetails ~ row:', row.taskId)
|
||||
console.log('🚀 ~ handleBindDetails ~ row:', row.taskId, row)
|
||||
this.surplusNoBindNum = row.checkNum - row.bindNum
|
||||
this.open = true
|
||||
this.isDetail = true
|
||||
this.title = '编码绑定详情'
|
||||
|
|
|
|||
|
|
@ -558,7 +558,6 @@ export default {
|
|||
// .then(() => {
|
||||
// this.$tab.refreshPage()
|
||||
// })
|
||||
|
||||
this.$emit('queryTools', row.taskId)
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
|
|
|
|||
|
|
@ -190,6 +190,7 @@
|
|||
>
|
||||
验收
|
||||
</el-button>
|
||||
|
||||
<!-- <el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ export default {
|
|||
/* 查询工机具 */
|
||||
queryTools(taskId) {
|
||||
this.isView = true
|
||||
|
||||
this.pageContent = '详情信息'
|
||||
this.queryTaskId = taskId
|
||||
this.isShowComponent = 'QueryTools'
|
||||
|
|
|
|||
|
|
@ -306,18 +306,21 @@
|
|||
</el-select>
|
||||
</el-form-item>-->
|
||||
|
||||
<el-form-item label="机具类型" prop="typeId">
|
||||
<treeselect
|
||||
<el-form-item label="配件类型" prop="typeId">
|
||||
<el-select
|
||||
v-model="query.typeId"
|
||||
default-expand-all
|
||||
:options="equipmentTypeList"
|
||||
placeholder="请选择规格型号"
|
||||
:disable-branch-nodes="true"
|
||||
placeholder="请选择配件类型"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 240px"
|
||||
noChildrenText="没有数据了"
|
||||
noOptionsText="没有数据"
|
||||
noResultsText="没有搜索结果"
|
||||
>
|
||||
<el-option
|
||||
v-for="typeItem in typeList"
|
||||
:key="typeItem.partId"
|
||||
:label="typeItem.partName"
|
||||
:value="typeItem.partId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
|
|
@ -467,9 +470,13 @@
|
|||
</el-dialog>
|
||||
|
||||
<!-- 入库单弹窗 -->
|
||||
<el-dialog :visible.sync="openPrint" width="900px" append-to-body>
|
||||
<div style="height: 400px; overflow-y: scroll">
|
||||
<vue-easy-print tableShow ref="remarksPrintRef" class="print">
|
||||
<el-dialog :visible.sync="openPrint" width="80%" append-to-body>
|
||||
<div>
|
||||
<vue-easy-print
|
||||
tableShow
|
||||
ref="remarksPrintRef"
|
||||
class="print print-content"
|
||||
>
|
||||
<div
|
||||
class="title"
|
||||
style="
|
||||
|
|
@ -528,16 +535,7 @@
|
|||
<span>车辆信息:</span>
|
||||
</div> -->
|
||||
</div>
|
||||
<el-table
|
||||
:data="printTableData"
|
||||
class="table"
|
||||
style="
|
||||
margin-top: 20px;
|
||||
padding-bottom: 1px;
|
||||
padding-right: 1px;
|
||||
"
|
||||
border
|
||||
>
|
||||
<el-table :data="printTableData" class="table">
|
||||
<!-- <el-table-column type="selection" width="55" align="center" />-->
|
||||
<el-table-column
|
||||
label="序号"
|
||||
|
|
|
|||
|
|
@ -713,6 +713,7 @@ export default {
|
|||
maCode: row.maCode,
|
||||
typeId: row.typeId,
|
||||
num: row.num,
|
||||
manageType: row.manageType,
|
||||
}
|
||||
|
||||
let param = {
|
||||
|
|
@ -766,6 +767,7 @@ export default {
|
|||
maCode: row.maCode,
|
||||
inputNum: row.checkNum,
|
||||
typeId: row.typeId,
|
||||
manageType: row.manageType,
|
||||
}
|
||||
|
||||
let param = {
|
||||
|
|
|
|||
|
|
@ -42,11 +42,11 @@ module.exports = {
|
|||
// target: `https://test-cc.zhgkxt.com`,//线上环境-南网
|
||||
// target: `https://z.csgmall.com.cn`,
|
||||
|
||||
target: `http://192.168.2.154:39080`, //超
|
||||
// target: `http://192.168.2.154:39080`, //超
|
||||
// target: `http://10.40.92.81:8080`, //韩/
|
||||
// target: `http://10.40.92.74:8080`,//旭/
|
||||
// target: `http://10.40.92.138:28080`, //帅
|
||||
// target: `http://10.40.92.253:28080`, //福
|
||||
target: `http://192.168.2.216:39080`, //福
|
||||
// target: `http://192.168.2.120:39080`, //跃
|
||||
|
||||
//******** 注意事项 ********* */
|
||||
|
|
|
|||
Loading…
Reference in New Issue