Commit 74a5e679 authored by 耿迪迪's avatar 耿迪迪

检查记录编码调用接口生成-调研结果问题修改

parent 1690938a
......@@ -4,10 +4,14 @@ import com.alibaba.fastjson.JSONObject;
import com.zehong.common.exception.CustomException;
import com.zehong.common.utils.GovernmentDataCopyUtil;
import com.zehong.common.utils.GovernmentDataUtil;
import com.zehong.common.utils.StringUtils;
import com.zehong.system.domain.SysSetting;
import com.zehong.system.domain.TInsRecInfor;
import com.zehong.system.domain.vo.TInsRecInforVo;
import com.zehong.system.mapper.TInsRecInforMapper;
import com.zehong.system.service.ISysSettingService;
import com.zehong.system.service.ITInsRecInforService;
import com.zehong.system.service.ITSerialNumberInfoService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -15,9 +19,11 @@ import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.text.SimpleDateFormat;
import java.time.Year;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* 监督检查-检查记录Service业务层处理
......@@ -36,6 +42,12 @@ public class TInsRecInforServiceImpl implements ITInsRecInforService
@Resource
private GovernmentDataUtil governmentDataUtil;
@Resource
private ISysSettingService sysSettingService;
@Resource
private ITSerialNumberInfoService itSerialNumberInfoService;
/**
* 查询监督检查-检查记录
*
......@@ -70,6 +82,11 @@ public class TInsRecInforServiceImpl implements ITInsRecInforService
public int insertTInsRecInfor(TInsRecInfor tInsRecInfor)
{
tInsRecInfor.setfLastUpdateTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
SysSetting code = sysSettingService.getSystemValueByKey("city_id");
if(null == code || StringUtils.isEmpty(code.getSystemValue())) throw new CustomException("行政编码未配置!");
Map<String,String> num = itSerialNumberInfoService.getSerialNumberByTableType("t_ins_rec_infor");
if(null == num || StringUtils.isEmpty(num.get("f_check_code"))) throw new CustomException("检查记录编码未配置!");
tInsRecInfor.setfCheckCode(code.getSystemValue()+ Year.now().getValue() + num.get("f_check_code"));
return tInsRecInforMapper.insertTInsRecInfor(tInsRecInfor);
}
......
......@@ -151,8 +151,8 @@
<el-option
v-for="record in records"
:key="record.fInsRecInforId"
:label="record.fCheckTaskCode"
:value="record.fCheckTaskCode"
:label="record.fCheckCode"
:value="record.fCheckCode"
></el-option>
</el-select>
</el-form-item>
......
......@@ -156,12 +156,12 @@
<el-dialog :title="title" :visible.sync="open" width="900px" append-to-body destroy-on-close :close-on-click-modal="false">
<el-form ref="form" :model="form" :rules="rules" label-width="130px">
<el-row class="el-row-table">
<el-col :span="12">
<!-- <el-col :span="12">
<el-form-item label="检查记录编码" prop="fCheckCode">
<el-input v-model="form.fCheckCode" placeholder="请输入检查记录编码" />
</el-form-item>
</el-col>
-->
<el-col :span="12">
<el-form-item label="任务编码" prop="fCheckTaskCode">
<el-select
......@@ -335,9 +335,9 @@ export default {
form: {},
// 表单校验
rules: {
fCheckCode: [
/* fCheckCode: [
{ required: true, message: "检查记录编码", trigger: "blur" }
],
],*/
fCheckTaskCode: [
{ required: true, message: "关联的检查任务编码不能为空", trigger: "blur" }
],
......
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