Commit 4ba9ec03 authored by liuxinben's avatar liuxinben

添加police_dic表的增删改查

parent 57c32601
......@@ -701,6 +701,46 @@ public class TaskListApi {
return state;
}
/**
* 查询派出所列表
*/
@RequestMapping("selectPoliceList")
public List<Map<String,Object>> selectPoliceList() {
return taskListService.selectPoliceList();
}
/**
* 通过派出所代码查询派出所
*/
@RequestMapping("selectPoliceListByPoliceCode")
public List<Map<String,Object>> selectPoliceListByPoliceCode(String policeCode) {
return taskListService.selectPoliceListByPoliceCode(policeCode);
}
/**
* 添加派出所代码
*/
@RequestMapping("insertPolice")
public boolean insertPolice(String policeCode,String policeName) {
return taskListService.insertPolice(policeCode,policeName);
}
/**
* 修改派出所代码
*/
@RequestMapping("updatePolice")
public boolean updatePolice(String policeCode,String policeName) {
return taskListService.updatePolice(policeCode,policeName);
}
/**
* 删除派出所代码
*/
@RequestMapping("deletePolice")
public boolean deletePolice(String policeCode) {
return taskListService.deletePolice(policeCode);
}
/**
* 去除字符串中中线
*
......
......@@ -1630,5 +1630,19 @@ public interface TaskListMapper {
"group by to_char(FINISH_DATE,'yyyyMMdd')")
public List<Map<String, Object>> selectQualityCheckReportBu(@Param("startDate")String startDate,@Param("endDate") String endDate);
@Select("SELECT * FROM POLICE_DIC")
public List<Map<String,Object>> selectPoliceList();
@Select("SELECT * FROM POLICE_DIC WHERE POLICE_CODE = #{policeCode}")
public List<Map<String,Object>> selectPoliceListByPoliceCode(String policeCode);
@Insert("INSERT INTO POLICE_DIC VALUES (#{policeCode},#{policeName})")
public boolean insertPolice(String policeCode,String policeName);
@Update("UPDATE POLICE_DIC SET POLICE_NAME = #{policeName} WHERE POLICE_CODE = #{policeCode}")
public boolean updatePolice(String policeCode,String policeName);
@Delete("DELETE FROM POLICE_DIC WHERE POLICE_CODE = #{policeCode}")
public boolean deletePolice(String policeCode);
}
......@@ -115,4 +115,14 @@ public interface TaskListService {
public boolean deleteRedoTask(long taskId);
public List<Map<String,Object>> selectQualityCheckReport(String startDate,String endDate);
public List<Map<String,Object>> selectPoliceList();
public List<Map<String,Object>> selectPoliceListByPoliceCode(String policeCode);
public boolean insertPolice(String policeCode,String policeName);
public boolean updatePolice(String policeCode,String policeName);
public boolean deletePolice(String policeCode);
}
......@@ -1302,6 +1302,31 @@ public class TaskListServiceImpl implements TaskListService {
return list;
}
@Override
public List <Map <String, Object>> selectPoliceList() {
return taskListMapper.selectPoliceList();
}
@Override
public List<Map<String,Object>> selectPoliceListByPoliceCode(String policeCode){
return taskListMapper.selectPoliceListByPoliceCode(policeCode);
}
@Override
public boolean insertPolice(String policeCode,String policeName){
return taskListMapper.insertPolice(policeCode,policeName);
}
@Override
public boolean updatePolice(String policeCode,String policeName){
return taskListMapper.updatePolice(policeCode,policeName);
}
@Override
public boolean deletePolice(String policeCode){
return taskListMapper.deletePolice(policeCode);
}
private String createGroupNo(List<Integer> c, List<Integer> nsList) {
try {
String groupNo = "";
......
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