Commit dc854ae2 by java-李谡

1.录音管理添加新状态未接听展示

2.三字码修改
parent 6266fb1f
...@@ -10,20 +10,22 @@ ...@@ -10,20 +10,22 @@
$("#inputForm").validate({ $("#inputForm").validate({
rules: { rules: {
airportIata: {remote: "${ctx}/contact/airport/checkAirportIata?oldAirportIata=" + "${airportEntity.airportIata}" /*encodeURIComponent('${airportEntity.airportIata}')*/}, airportIata: {remote: "${ctx}/contact/airport/checkAirportIata?oldAirportIata=" + "${airportEntity.airportIata}" /*encodeURIComponent('${airportEntity.airportIata}')*/},
liftoffTime: {min:0}, <%--airportName: {remote: "${ctx}/contact/airport/checkAirportName?id="+"${airportEntity.id}"},--%>
landingTime: {min:0} liftoffTime: {min: 0},
landingTime: {min: 0}
}, },
messages: { messages: {
airportIata: {remote: "该三字码已存在"}, airportIata: {remote: "该三字码已存在"},
// airportName: {remote: "该机场存在正在使用的三字码,请先屏蔽使用中的三字码后再添加"},
liftoffTime: {min: "不能为负"}, liftoffTime: {min: "不能为负"},
landingTime: {min: "不能为负"} landingTime: {min: "不能为负"}
}, },
submitHandler: function(form){ submitHandler: function (form) {
loading('正在提交,请稍等...'); loading('正在提交,请稍等...');
form.submit(); form.submit();
}, },
errorContainer: "#messageBox", errorContainer: "#messageBox",
errorPlacement: function(error, element) { errorPlacement: function (error, element) {
$("#messageBox").text("输入有误,请先更正。"); $("#messageBox").text("输入有误,请先更正。");
if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){ if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
error.appendTo(element.parent().parent()); error.appendTo(element.parent().parent());
......
...@@ -90,7 +90,9 @@ ...@@ -90,7 +90,9 @@
<!-- <!--
<td>${record.result == 'FAILD' ? '通话失败' : '通话成功'}</td> <td>${record.result == 'FAILD' ? '通话失败' : '通话成功'}</td>
--> -->
<td><c:if test="${empty record.downloadUrl}">通话失败</c:if><c:if test="${not empty record.downloadUrl}">通话成功</c:if></td> <td><c:if test="${empty record.downloadUrl and record.result ne 'FAILD'}">通话失败</c:if>
<c:if test="${empty record.downloadUrl and record.result ne 'UNLISTEN'}">未接听</c:if>
<c:if test="${not empty record.downloadUrl}">通话成功</c:if></td>
<td><c:if test="${not empty record.downloadUrl}"><a href="${record.downloadUrl}">下载</a></c:if></td> <td><c:if test="${not empty record.downloadUrl}"><a href="${record.downloadUrl}">下载</a></c:if></td>
</tr> </tr>
</c:forEach> </c:forEach>
......
...@@ -38,6 +38,12 @@ ...@@ -38,6 +38,12 @@
WHERE a.airport_iata = #{airportIata} AND a.status != #{STATUS_DELETE} WHERE a.airport_iata = #{airportIata} AND a.status != #{STATUS_DELETE}
</select> </select>
<select id="getAirportByAirportName" resultType="integer">
SELECT
count(1)
FROM foc_airports a
WHERE a.airport_name = #{airportName} AND a.status = #{STATUS_SHOW}
</select>
<!-- 分页查询机场信息 --> <!-- 分页查询机场信息 -->
<select id="findList" resultType="com.ejweb.modules.contact.entity.AirportEntity"> <select id="findList" resultType="com.ejweb.modules.contact.entity.AirportEntity">
SELECT SELECT
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<!-- 设置但JDBC类型为空时,某些驱动程序 要指定值,default:OTHER,插入空值时不需要指定类型 --> <!-- 设置但JDBC类型为空时,某些驱动程序 要指定值,default:OTHER,插入空值时不需要指定类型 -->
<setting name="jdbcTypeForNull" value="NULL"/> <setting name="jdbcTypeForNull" value="NULL"/>
<!--<setting name="logImpl" value="STDOUT_LOGGING" />--> <!-- <setting name="logImpl" value="STDOUT_LOGGING" />-->
</settings> </settings>
......
...@@ -154,6 +154,6 @@ public class SecurityPropertyPlaceholderConfigurer extends PropertyPlaceholderCo ...@@ -154,6 +154,6 @@ public class SecurityPropertyPlaceholderConfigurer extends PropertyPlaceholderCo
// } // }
// System.out.println(DES3Utils.encrypt("jdbc:mysql://10.70.78.27:3306/foc?useUnicode=true&characterEncoding=utf-8", CONF_DESC_KEY)); // System.out.println(DES3Utils.encrypt("jdbc:mysql://10.70.78.27:3306/foc?useUnicode=true&characterEncoding=utf-8", CONF_DESC_KEY));
System.out.println(DES3Utils.decrypt("7aaee3bf1b522eee9c5cade1a71670f3aed546d27bf021874da7580fa9df6021c87eaddeb9b9a6eb200842455cb776b4347eb35b6c4fb07af249a322047538d40a3047091eb83489e3f02dd6c57c44d6", CONF_DESC_KEY)); System.out.println(DES3Utils.decrypt("31a63fac8317458d81c034906825749f7c58c30a773c6927", CONF_DESC_KEY));
} }
} }
...@@ -9,6 +9,7 @@ import com.ejweb.modules.contact.entity.AirportEntity; ...@@ -9,6 +9,7 @@ import com.ejweb.modules.contact.entity.AirportEntity;
/** /**
* 三字码 * 三字码
* Airport DAO接口 * Airport DAO接口
*
* @author yuxg * @author yuxg
* @version 2016-08-19 * @version 2016-08-19
*/ */
...@@ -17,5 +18,7 @@ public interface AirportDao extends CrudDao<AirportEntity> { ...@@ -17,5 +18,7 @@ public interface AirportDao extends CrudDao<AirportEntity> {
AirportEntity getAirportByAirportIata(AirportEntity airportEntity); AirportEntity getAirportByAirportIata(AirportEntity airportEntity);
Integer getAirportByAirportName(AirportEntity airportEntity);
List<AirportEntity> findAllAirport(AirportEntity entity); List<AirportEntity> findAllAirport(AirportEntity entity);
} }
...@@ -35,6 +35,13 @@ public class AirportService extends CrudService<AirportDao, AirportEntity> { ...@@ -35,6 +35,13 @@ public class AirportService extends CrudService<AirportDao, AirportEntity> {
return airportDao.getAirportByAirportIata(airportEntity); return airportDao.getAirportByAirportIata(airportEntity);
} }
public Integer getAirportByAirportName(String airportName) {
AirportEntity airportEntity = new AirportEntity();
airportEntity.setAirportName(airportName);
Integer count = airportDao.getAirportByAirportName(airportEntity);
return count;
}
// 保存或更新 // 保存或更新
@Transactional(readOnly = false) @Transactional(readOnly = false)
public void save1(AirportEntity entity) { public void save1(AirportEntity entity) {
......
...@@ -50,7 +50,7 @@ public class AirportController extends BaseController { ...@@ -50,7 +50,7 @@ public class AirportController extends BaseController {
} }
} }
@RequestMapping(value = { "airportList", "" }) @RequestMapping(value = {"airportList", ""})
public String airportList(AirportEntity airportEntity, HttpServletRequest request, HttpServletResponse response, public String airportList(AirportEntity airportEntity, HttpServletRequest request, HttpServletResponse response,
Model model) { Model model) {
String arilist = request.getParameter("airportsList"); String arilist = request.getParameter("airportsList");
...@@ -70,11 +70,11 @@ public class AirportController extends BaseController { ...@@ -70,11 +70,11 @@ public class AirportController extends BaseController {
arr.add(arilist); arr.add(arilist);
} }
} }
if(StringUtils.isEmpty(airportsName)){ if (StringUtils.isEmpty(airportsName)) {
airportsName = ""; airportsName = "";
for(int i=0;i<arr.size();i++){ for (int i = 0; i < arr.size(); i++) {
AirportEntity entity = airportService.get(arr.get(i)); AirportEntity entity = airportService.get(arr.get(i));
airportsName += entity.getAirportName()+"-"; airportsName += entity.getAirportName() + "-";
} }
} }
Page<AirportEntity> page = airportService.findPage(new Page<AirportEntity>(request, response), airportEntity); Page<AirportEntity> page = airportService.findPage(new Page<AirportEntity>(request, response), airportEntity);
...@@ -94,14 +94,14 @@ public class AirportController extends BaseController { ...@@ -94,14 +94,14 @@ public class AirportController extends BaseController {
} }
if (StringUtils.isNotEmpty(airportsId)) { if (StringUtils.isNotEmpty(airportsId)) {
model.addAttribute("airportsId", airportsId); model.addAttribute("airportsId", airportsId);
model.addAttribute("airportsName", airportsName.substring(0, airportsName.length()-1)); model.addAttribute("airportsName", airportsName.substring(0, airportsName.length() - 1));
} }
model.addAttribute("page", page); model.addAttribute("page", page);
return "modules/contact/airportSelect"; return "modules/contact/airportSelect";
} }
@RequiresPermissions("im:airport:view") @RequiresPermissions("im:airport:view")
@RequestMapping(value = { "list", "" }) @RequestMapping(value = {"list", ""})
public String list(AirportEntity airportEntity, HttpServletRequest request, HttpServletResponse response, public String list(AirportEntity airportEntity, HttpServletRequest request, HttpServletResponse response,
Model model) { Model model) {
Page<AirportEntity> page = airportService.findPage(new Page<AirportEntity>(request, response), airportEntity); Page<AirportEntity> page = airportService.findPage(new Page<AirportEntity>(request, response), airportEntity);
...@@ -153,6 +153,25 @@ public class AirportController extends BaseController { ...@@ -153,6 +153,25 @@ public class AirportController extends BaseController {
return "false"; // 存在 return "false"; // 存在
} }
/**
* 验证机场是否有正在使用三字码
*
* @param airportName
* @return
*/
@ResponseBody
@RequestMapping("checkAirportName")
public String checkAirportName(String airportName, String id) {
if (StringUtils.isEmpty(airportName) || StringUtils.isNotEmpty(id)) {
return "true";
}
Integer count = airportService.getAirportByAirportName(airportName);
if (count == 0) {
return "true";
}
return "false";
}
@ResponseBody @ResponseBody
@RequestMapping("airportData") @RequestMapping("airportData")
public List<Map<String, Object>> airportData(AirportEntity airportEntity) { public List<Map<String, Object>> airportData(AirportEntity airportEntity) {
...@@ -234,7 +253,7 @@ public class AirportController extends BaseController { ...@@ -234,7 +253,7 @@ public class AirportController extends BaseController {
String fileName = "三字码数据" + DateUtils.getDate("yyyyMMddHHmmss") + ".xlsx"; String fileName = "三字码数据" + DateUtils.getDate("yyyyMMddHHmmss") + ".xlsx";
// Page<AirportEntity> page = airportService.findPage(new Page<AirportEntity>(request, response, -1), // Page<AirportEntity> page = airportService.findPage(new Page<AirportEntity>(request, response, -1),
// airportEntity); // airportEntity);
Page<AirportEntity> page = airportService.findPage(new Page<AirportEntity>(1,1000000000), Page<AirportEntity> page = airportService.findPage(new Page<AirportEntity>(1, 1000000000),
airportEntity); airportEntity);
new ExportExcel("三字码数据", AirportEntity.class).setDataList(page.getList()).write(response, fileName) new ExportExcel("三字码数据", AirportEntity.class).setDataList(page.getList()).write(response, fileName)
.dispose(); .dispose();
......
...@@ -203,8 +203,9 @@ public class UserProfileController extends BaseController { ...@@ -203,8 +203,9 @@ public class UserProfileController extends BaseController {
} }
userProfileEntity = userProfileEntity2; userProfileEntity = userProfileEntity2;
} }
userProfileService.save(userProfileEntity,1); userProfileService.save(userProfileEntity, 1);
String message = "保存成功"; String message = "保存成功";
//用户类型不为空,旧华为状态(更新前)不为空,更新后状态为绑定
if (StringUtils.isNotBlank(userProfileEntity.getUserType()) && !(oldHuaweiStatus == null && userProfileEntity.getHuaweiStatus() == 0) && !(oldHuaweiStatus != null && oldHuaweiStatus == 0 && userProfileEntity.getHuaweiStatus() == 0) if (StringUtils.isNotBlank(userProfileEntity.getUserType()) && !(oldHuaweiStatus == null && userProfileEntity.getHuaweiStatus() == 0) && !(oldHuaweiStatus != null && oldHuaweiStatus == 0 && userProfileEntity.getHuaweiStatus() == 0)
&& (userProfileEntity.getUserType().equals("2") || userProfileEntity.getUserType().equals("4"))) { && (userProfileEntity.getUserType().equals("2") || userProfileEntity.getUserType().equals("4"))) {
......
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