Merge remote-tracking branch 'origin/new-exam' into new-exam

new-exam
20918 5 months ago
commit 95465fac0e

@ -4,6 +4,7 @@ import java.util.Collections;
import java.util.List; import java.util.List;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.common.utils.uuid.Seq; import com.ruoyi.common.utils.uuid.Seq;
import com.ruoyi.system.domain.TdPropertyInfo; import com.ruoyi.system.domain.TdPropertyInfo;
import com.ruoyi.system.service.ITdPropertyInfoService; import com.ruoyi.system.service.ITdPropertyInfoService;
@ -104,6 +105,7 @@ public class TdPropertyManagerController extends BaseController {
@ResponseBody @ResponseBody
public AjaxResult addSave(TdPropertyManager tdPropertyManager) { public AjaxResult addSave(TdPropertyManager tdPropertyManager) {
tdPropertyManager.setUseId("Property_" + Seq.getId(Seq.commSeqType)); tdPropertyManager.setUseId("Property_" + Seq.getId(Seq.commSeqType));
tdPropertyManager.setDeptId(ShiroUtils.getSysUser().getDeptId());
return toAjax(tdPropertyManagerService.insertTdPropertyManager(tdPropertyManager)); return toAjax(tdPropertyManagerService.insertTdPropertyManager(tdPropertyManager));
} }
@ -126,6 +128,7 @@ public class TdPropertyManagerController extends BaseController {
@PostMapping("/edit") @PostMapping("/edit")
@ResponseBody @ResponseBody
public AjaxResult editSave(TdPropertyManager tdPropertyManager) { public AjaxResult editSave(TdPropertyManager tdPropertyManager) {
tdPropertyManager.setDeptId(ShiroUtils.getSysUser().getDeptId());
return toAjax(tdPropertyManagerService.updateTdPropertyManager(tdPropertyManager)); return toAjax(tdPropertyManagerService.updateTdPropertyManager(tdPropertyManager));
} }

@ -10,7 +10,7 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required">所属地市:</label> <label class="col-sm-3 control-label is-required">所属地市:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select id="City" name="part" required @change="getAreaList()" v-model="City" class="form-control m-b"> <select id="City" name="part" required @change="getAreaList()" v-model="City" class="form-control">
<option value="">---请选择---</option> <option value="">---请选择---</option>
<option v-for="option in CityList" :value="option.id" :key="option.id"> <option v-for="option in CityList" :value="option.id" :key="option.id">
{{ option.name }} {{ option.name }}
@ -21,7 +21,7 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required">所属区县:</label> <label class="col-sm-3 control-label is-required">所属区县:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select id="Area" name="areaId" required v-model="Area" class="form-control m-b"> <select id="Area" name="areaId" required v-model="Area" class="form-control">
<option value="">---请选择---</option> <option value="">---请选择---</option>
<option v-for="option in AreaList" :value="option.id" :key="option.id"> <option v-for="option in AreaList" :value="option.id" :key="option.id">
{{ option.name }} {{ option.name }}
@ -83,7 +83,7 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required ">密品分类:</label> <label class="col-sm-3 control-label is-required ">密品分类:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select name="secretsType" required class="form-control m-b" th:with="type=${@dict.getType('sys_secrets_type')}"> <select name="secretsType" required class="form-control" th:with="type=${@dict.getType('sys_secrets_type')}">
<option value="">请选择</option> <option value="">请选择</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select> </select>

@ -17,7 +17,7 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required">所属地市:</label> <label class="col-sm-3 control-label is-required">所属地市:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select id="City" name="part" required @change="getAreaList()" v-model="City" class="form-control m-b"> <select id="City" name="part" required @change="getAreaList()" v-model="City" class="form-control ">
<option value="">---请选择---</option> <option value="">---请选择---</option>
<option v-for="option in CityList" :value="option.id" :key="option.id"> <option v-for="option in CityList" :value="option.id" :key="option.id">
{{ option.name }} {{ option.name }}
@ -28,7 +28,7 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required">所属区县:</label> <label class="col-sm-3 control-label is-required">所属区县:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select id="Area" name="areaId" required v-model="Area" class="form-control m-b"> <select id="Area" name="areaId" required v-model="Area" class="form-control ">
<option value="">---请选择---</option> <option value="">---请选择---</option>
<option v-for="option in AreaList" :value="option.id" :key="option.id"> <option v-for="option in AreaList" :value="option.id" :key="option.id">
{{ option.name }} {{ option.name }}
@ -60,12 +60,6 @@
</div> </div>
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">单位名称:</label>
<div class="col-sm-8">
<input name="frameworkId" required th:field="*{frameworkId}" class="form-control" type="text">
</div>
</div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">登记部门:</label> <label class="col-sm-3 control-label">登记部门:</label>
<div class="col-sm-8"> <div class="col-sm-8">
@ -90,7 +84,7 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required">密品分类:</label> <label class="col-sm-3 control-label is-required">密品分类:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select name="secretsType" class="form-control m-b" th:with="type=${@dict.getType('sys_secrets_type')}"> <select name="secretsType" class="form-control " th:with="type=${@dict.getType('sys_secrets_type')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:field="*{secretsType}" th:value="${dict.dictValue}"></option> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:field="*{secretsType}" th:value="${dict.dictValue}"></option>
</select> </select>
</div> </div>

@ -71,6 +71,8 @@ public class TdPropertyManager extends BaseEntity
@Excel(name = "密品类型" ,readConverterExp = "1=涉密信息设备,2=涉密设备") @Excel(name = "密品类型" ,readConverterExp = "1=涉密信息设备,2=涉密设备")
private String secretsType; private String secretsType;
private Long deptId;
public void setUseId(String useId) public void setUseId(String useId)
@ -190,6 +192,14 @@ public class TdPropertyManager extends BaseEntity
this.secretsType = secretsType; this.secretsType = secretsType;
} }
public Long getDeptId() {
return deptId;
}
public void setDeptId(Long deptId) {
this.deptId = deptId;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@ -206,6 +216,7 @@ public class TdPropertyManager extends BaseEntity
.append("areaId", getAreaId()) .append("areaId", getAreaId())
.append("propertyNum", getPropertyNum()) .append("propertyNum", getPropertyNum())
.append("secretsType", getSecretsType()) .append("secretsType", getSecretsType())
.append("deptId", getDeptId())
.toString(); .toString();
} }
} }

@ -4,6 +4,7 @@ import java.util.Date;
import java.util.List; import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.system.domain.TdPropertyInfo; import com.ruoyi.system.domain.TdPropertyInfo;
import com.ruoyi.system.domain.count.PropertyManagerDTO; import com.ruoyi.system.domain.count.PropertyManagerDTO;
import com.ruoyi.system.mapper.TdPropertyInfoMapper; import com.ruoyi.system.mapper.TdPropertyInfoMapper;
@ -45,6 +46,7 @@ public class TdPropertyManagerServiceImpl extends ServiceImpl<TdPropertyManagerM
* @param tdPropertyManager * @param tdPropertyManager
* @return * @return
*/ */
@DataScope(deptAlias = "d")
@Override @Override
public List<TdPropertyManager> selectTdPropertyManagerList(TdPropertyManager tdPropertyManager) public List<TdPropertyManager> selectTdPropertyManagerList(TdPropertyManager tdPropertyManager)
{ {

@ -18,10 +18,11 @@
<result property="areaId" column="area_id" /> <result property="areaId" column="area_id" />
<result property="propertyNum" column="property_num" /> <result property="propertyNum" column="property_num" />
<result property="secretsType" column="secrets_type" /> <result property="secretsType" column="secrets_type" />
<result property="deptId" column="dept_id" />
</resultMap> </resultMap>
<sql id="selectTdPropertyManagerVo"> <sql id="selectTdPropertyManagerVo">
select use_id, use_depart, user_name, use_date, framework_id, recover_depart, recover_name, recover_date, shemichengdu, part, area_id, property_num,secrets_type from td_property_manager select use_id, use_depart, user_name, use_date, framework_id, recover_depart, recover_name, recover_date, shemichengdu, part, area_id, property_num,secrets_type,dept_id from td_property_manager d
</sql> </sql>
<select id="selectTdPropertyManagerList" parameterType="TdPropertyManager" resultMap="TdPropertyManagerResult"> <select id="selectTdPropertyManagerList" parameterType="TdPropertyManager" resultMap="TdPropertyManagerResult">
@ -40,6 +41,8 @@
<if test="areaId != null and areaId != ''"> and area_id = #{areaId}</if> <if test="areaId != null and areaId != ''"> and area_id = #{areaId}</if>
<if test="propertyNum != null "> and property_num = #{propertyNum}</if> <if test="propertyNum != null "> and property_num = #{propertyNum}</if>
<if test="secretsType != null and secretsType != '' " > and secrets_type = #{secretsType}</if> <if test="secretsType != null and secretsType != '' " > and secrets_type = #{secretsType}</if>
<!-- 数据范围过滤 -->
${params.dataScope}
</where> </where>
</select> </select>
@ -64,6 +67,7 @@
<if test="areaId != null">area_id,</if> <if test="areaId != null">area_id,</if>
<if test="propertyNum != null">property_num,</if> <if test="propertyNum != null">property_num,</if>
<if test="secretsType != null">secrets_type,</if> <if test="secretsType != null">secrets_type,</if>
<if test="deptId != null">dept_id,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="useId != null">#{useId},</if> <if test="useId != null">#{useId},</if>
@ -79,6 +83,7 @@
<if test="areaId != null">#{areaId},</if> <if test="areaId != null">#{areaId},</if>
<if test="propertyNum != null">#{propertyNum},</if> <if test="propertyNum != null">#{propertyNum},</if>
<if test="secretsType != null">#{secretsType},</if> <if test="secretsType != null">#{secretsType},</if>
<if test="deptId != null">#{deptId},</if>
</trim> </trim>
</insert> </insert>
@ -97,6 +102,7 @@
<if test="areaId != null">area_id = #{areaId},</if> <if test="areaId != null">area_id = #{areaId},</if>
<if test="propertyNum != null">property_num = #{propertyNum},</if> <if test="propertyNum != null">property_num = #{propertyNum},</if>
<if test="secretsType != null">secrets_type = #{secretsType},</if> <if test="secretsType != null">secrets_type = #{secretsType},</if>
<if test="deptId != null">dept_id = #{deptId},</if>
</trim> </trim>
where use_id = #{useId} where use_id = #{useId}
</update> </update>

Loading…
Cancel
Save