master
20918 2 weeks ago
parent 71a599ece4
commit c972030ab4

@ -76,15 +76,15 @@ public class CaseController extends BaseController
{ {
int i = caseService.selectCaseByCaseNo(cases.getCaseNo()); int i = caseService.selectCaseByCaseNo(cases.getCaseNo());
if(i != 0){ if(i != 0){
return error("案件编号重复,请检查!"); return error("案件编号重复,请检查!");
} }
boolean phone = ValidatorUtils.isValidPhone(cases.getPhone()); boolean phone = ValidatorUtils.isValidPhone(cases.getPhone());
if (!phone){ if (!phone){
return error("手机号格式错误请检查,请检查!"); return error("手机号格式错误请检查,请检查!");
} }
boolean userNo = ValidatorUtils.isValidIdCard(cases.getUserNo()); boolean userNo = ValidatorUtils.isValidIdCard(cases.getUserNo());
if (!userNo){ if (!userNo){
return error("身份证号格式错误请检查,请检查!"); return error("身份证号格式错误请检查,请检查!");
} }
return toAjax(caseService.insertCase(cases)); return toAjax(caseService.insertCase(cases));
} }
@ -99,7 +99,7 @@ public class CaseController extends BaseController
public AjaxResult export(Case cases) public AjaxResult export(Case cases)
{ {
List<Case> list = caseService.selectCaseList(cases); List<Case> list = caseService.selectCaseList(cases);
ExcelUtil<Case> util = new ExcelUtil<Case>(Case.class); ExcelUtil<Case> util = new ExcelUtil<>(Case.class);
return util.exportExcel(list, "案件数据"); return util.exportExcel(list, "案件数据");
} }
@ -127,11 +127,11 @@ public class CaseController extends BaseController
{ {
boolean phone = ValidatorUtils.isValidPhone(cases.getPhone()); boolean phone = ValidatorUtils.isValidPhone(cases.getPhone());
if (!phone){ if (!phone){
return error("手机号格式错误请检查,请检查!"); return error("手机号格式错误请检查,请检查!");
} }
boolean userNo = ValidatorUtils.isValidIdCard(cases.getUserNo()); boolean userNo = ValidatorUtils.isValidIdCard(cases.getUserNo());
if (!userNo){ if (!userNo){
return error("身份证号格式错误请检查,请检查!"); return error("身份证号格式错误请检查,请检查!");
} }
return toAjax(caseService.updateCase(cases)); return toAjax(caseService.updateCase(cases));
} }
@ -151,7 +151,7 @@ public class CaseController extends BaseController
Case acase = caseService.selectCaseById(Integer.parseInt(id)); Case acase = caseService.selectCaseById(Integer.parseInt(id));
int i = itemService.selectItemByCaseId(id); int i = itemService.selectItemByCaseId(id);
if (i != 0){ if (i != 0){
return error(acase.getCaseNo()+"案件中存在物品,请先删除物品!"); return error(acase.getCaseNo()+"案件中存在物品,请先删除物品!");
} }
} }

@ -1,5 +1,6 @@
package com.ruoyi.project.project.cases.domain; package com.ruoyi.project.project.cases.domain;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.domain.BaseEntity; import com.ruoyi.framework.web.domain.BaseEntity;
import lombok.Data; import lombok.Data;
import lombok.Getter; import lombok.Getter;
@ -23,36 +24,47 @@ public class Case extends BaseEntity
private Integer id; private Integer id;
/** 案件编号 */ /** 案件编号 */
@Excel(name = "案件编号")
private String caseNo; private String caseNo;
/** 人员姓名 */ /** 人员姓名 */
@Excel(name = "人员姓名")
private String name; private String name;
/** 身份证号 */ /** 身份证号 */
@Excel(name = "省份证号")
private String userNo; private String userNo;
/** 性别 */ /** 性别 */
@Excel(name = "性别",readConverterExp = "1=女,2=男")
private Long sex; private Long sex;
/** 年龄 */ /** 年龄 */
@Excel(name = "年龄")
private Long age; private Long age;
/** 职务 */ /** 职务 */
@Excel(name = "职务")
private String position; private String position;
/** 所在单位 */ /** 所在单位 */
@Excel(name = "所在单位")
private String department; private String department;
/** 职级 */ /** 职级 */
@Excel(name = "职级")
private String rank; private String rank;
/** 电话号码 */ /** 电话号码 */
@Excel(name = "电话号码")
private String phone; private String phone;
/** 立案时间 */ /** 立案时间 */
@Excel(name = "立案时间")
private String filingTime; private String filingTime;
/** 创建时间 */ /** 创建时间 */
@Excel(name = "创建时间")
private String creatTime; private String creatTime;
} }

@ -117,7 +117,7 @@ public class ItemController extends BaseController
{ {
int i = itemService.selectItemByItemNo(item); int i = itemService.selectItemByItemNo(item);
if (i != 0){ if (i != 0){
return error("物品编号重复,请检查!"); return error("物品编号重复,请检查!");
} }
return toAjax(itemService.updateItem(item)); return toAjax(itemService.updateItem(item));
} }

@ -1,5 +1,6 @@
package com.ruoyi.project.project.item.domain; package com.ruoyi.project.project.item.domain;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.domain.BaseEntity; import com.ruoyi.framework.web.domain.BaseEntity;
import lombok.Data; import lombok.Data;
import lombok.Getter; import lombok.Getter;
@ -23,27 +24,35 @@ public class Item extends BaseEntity
private Integer id; private Integer id;
/** 案件编号 */ /** 案件编号 */
@Excel(name = "案件编号")
private String caseNo; private String caseNo;
/** 物品编号 */ /** 物品编号 */
@Excel(name = "物品编号")
private String itemNo; private String itemNo;
/** 物品类型 */ /** 物品类型 */
@Excel(name = "物品类型",readConverterExp = "1=现金,2=贵金属,3=不动产,4=车辆,5=奢侈品,6=虚拟资产,7=其他")
private String itemType; private String itemType;
/** 品牌型号 */ /** 品牌型号 */
@Excel(name = "品牌型号")
private String brand; private String brand;
/** 数量 */ /** 数量 */
@Excel(name = "数量")
private Long number; private Long number;
/** 价值 */ /** 价值 */
@Excel(name = "价值")
private String price; private String price;
/** 来源说明 */ /** 来源说明 */
@Excel(name = "来源说明")
private String source; private String source;
/** 创建时间 */ /** 创建时间 */
@Excel(name = "创建时间")
private String creatTime; private String creatTime;
} }

@ -21,18 +21,23 @@
from item from item
</sql> </sql>
<sql id="selectItemVo1">
select case_no, item_no, item_type, brand, number, price, source, creat_time
from item
</sql>
<select id="selectItemById" parameterType="Integer" resultMap="ItemResult"> <select id="selectItemById" parameterType="Integer" resultMap="ItemResult">
<include refid="selectItemVo"/> <include refid="selectItemVo"/>
where id = #{id} where id = #{id}
</select> </select>
<select id="selectItemByCaseNo" parameterType="String" resultMap="ItemResult"> <select id="selectItemByCaseNo" parameterType="String" resultMap="ItemResult">
<include refid="selectItemVo"/> <include refid="selectItemVo1"/>
where case_no = #{caseno} where case_no = #{caseno}
</select> </select>
<select id="selectItemList" parameterType="Item" resultMap="ItemResult"> <select id="selectItemList" parameterType="Item" resultMap="ItemResult">
<include refid="selectItemVo"/> <include refid="selectItemVo1"/>
<where> <where>
<if test="itemNo != null and itemNo != ''"> <if test="itemNo != null and itemNo != ''">
AND item_no like '%'||#{itemNo}||'%' <!-- concat('%', #{noticeTitle}, '%') --> AND item_no like '%'||#{itemNo}||'%' <!-- concat('%', #{noticeTitle}, '%') -->

@ -4,7 +4,7 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="renderer" content="webkit"> <meta name="renderer" content="webkit">
<title>若依系统首页</title> <title>涉案财物信息管理系统首页</title>
<!-- 避免IE使用兼容模式 --> <!-- 避免IE使用兼容模式 -->
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<link th:href="@{favicon.ico}" rel="shortcut icon"/> <link th:href="@{favicon.ico}" rel="shortcut icon"/>

@ -3,7 +3,7 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<title>登录若依系统</title> <title>登录涉案财物信息管理系统</title>
<meta name="description" content="若依后台管理框架"> <meta name="description" content="若依后台管理框架">
<link href="../static/css/bootstrap.min.css" th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/> <link href="../static/css/bootstrap.min.css" th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
<link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/> <link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>

Loading…
Cancel
Save