Commit abd86d98 by wuchengwu

足迹接口添加重新推送按钮,修改sfts字段默认值

parent 08a4861a
......@@ -4499,17 +4499,38 @@ public class TbXwRycjController {
@RequestMapping("/insertZwbhAndZwfkxxByRybh")
@ResponseBody
public String insertZwbhAndZwfkxxByRybh(String rybh,String zwbh,String zwfkxx){
public String insertZwbhAndZwfkxxByRybh(String rybh,String zwbh,String zwfkxx,String username){
ResultDto resultDto = null;
AutoTbStRy tbStRy = new AutoTbStRy();
tbStRy.setRybh(rybh);
tbStRy.setSzzwbh(zwbh);
tbStRy.setZwfkxx(zwfkxx);
boolean b = rycjService.updateRyxx(tbStRy);
if (b){
resultDto = new ResultDto(b,"更新成功!",0000,null);
AfisQualityCk afisQualityCk = new AfisQualityCk();
if(StringUtils.isBlank(rybh)||StringUtils.isBlank(zwbh)||StringUtils.isBlank(zwfkxx)||StringUtils.isBlank(username)){
resultDto = new ResultDto(false,"人员编号、指纹编号、指纹反馈信息、人员姓名不能为空!!",8888,null);
}else {
resultDto = new ResultDto(b,"更新失败!",9999,null);
User user = loginService.getUserByUsername(username);
if (user != null) {
tbStRy.setLrr(user.getLrr());
afisQualityCk.setRCjr(user.getUsername());
afisQualityCk.setRCjdw(user.getUnitcode());
}
tbStRy.setRybh(rybh);
tbStRy.setSzzwbh(zwbh);
tbStRy.setZwfkxx(zwfkxx);
tbStRy.setLrsj(new Date());
boolean b = rycjService.updateRyxx(tbStRy);
//更新质量检查
afisQualityCk.setRZwbh(zwbh);
// 获取人员信息
afisQualityCk.setRRybh(rybh);
afisQualityCk.setRCjcs("1");
afisQualityCk.setRCjsj(new Date());
boolean afisFlag = afisQualityService.updateAfisQualityCk(afisQualityCk);
if (b) {
resultDto = new ResultDto(b, "更新成功!", 0000, null);
} else {
resultDto = new ResultDto(b, "更新失败!", 9999, null);
}
}
return JSONObject.toJSONString(resultDto, SerializerFeature.WriteNullStringAsEmpty);
}
......
......@@ -311,7 +311,7 @@
<if test="entity.sfcj != null and entity.sfcj != ''">, #{entity.sfcj , jdbcType=VARCHAR }</if>
<if test="entity.sfcj == null or entity.sfcj == ''">,NULL </if>
<if test="entity.sfts != null and entity.sfts != ''">, #{entity.sfts , jdbcType=VARCHAR }</if>
<if test="entity.sfts == null or entity.sfts == ''">,NULL </if>
<if test="entity.sfts == null or entity.sfts == ''">,'0' </if>
<if test="entity.lrr != null and entity.lrr != ''">, #{entity.lrr , jdbcType=VARCHAR }</if>
<if test="entity.lrr == null or entity.lrr == ''">,NULL </if>
<if test="entity.lrsj != null">, #{entity.lrsj , jdbcType=TIMESTAMP }</if>
......@@ -379,7 +379,7 @@
<if test="entity.sfcj != null and entity.sfcj != ''">SFCJ = #{entity.sfcj , jdbcType=VARCHAR },</if>
<if test="entity.sfcj == null or entity.sfcj == ''">SFCJ = NULL, </if>
<if test="entity.sfts != null and entity.sfts != ''">SFTS = #{entity.sfts , jdbcType=VARCHAR },</if>
<if test="entity.sfts == null or entity.sfts == ''">SFTS = NULL, </if>
<if test="entity.sfts == null or entity.sfts == ''">SFTS = '0', </if>
<if test="entity.dzwjnr != null and entity.dzwjnr != ''">ZJSJ= #{entity.dzwjnr , jdbcType=VARCHAR },</if>
<if test="entity.dzwjnr == null or entity.dzwjnr == ''">ZJSJ=NULL, </if>
<if test="entity.gxsj != null">gxsj=#{entity.gxsj , jdbcType=TIMESTAMP },</if>
......
......@@ -76,10 +76,13 @@
<input id="username" name="username" class="username" type="hidden" th:value="${user.username}">
<input id="trueName" name="trueName" class="trueName" type="hidden" th:value="${user.trueName}">
<input id="unitcode" name="unitcode" class="unitcode" type="hidden" th:value="${user.unitcode}">
<input id="zjtsUrl" name="zjtsUrl" class="zjtsUrl" type="hidden" th:value="${zjtsUrl}">
<input id="ifts" name="ifts" class="ifts" type="hidden" th:value="${ifts}">
<!--人员基本信息-->
<div style="width: 100%;">
<p class="div_title" style="width: 80%;"><img src="zjcj/images/jc-icon.png" class="jc-icon" />人员编号:<span th:text="${rybh}"></span>&nbsp;&nbsp;姓名:<span th:text="${xm}"></span>&nbsp;&nbsp;身份证号:<span th:text="${zjhm}"></span>&nbsp;&nbsp;&nbsp;&nbsp;<span id="iftstext" style="color: red"></span></p>
<button type="button" onclick="toCxts()" style="float: right; height: 40px;margin-top: -30px;width: 100px;height:36px;line-height:36px;border-radius: 5px;border: 1px solid #fff;background:-webkit-linear-gradient(#b7b3b3,#b1b1b1,#828282);cursor: pointer;color:#fff;border: 1px solid #fff;background:-webkit-linear-gradient(#1713ec,#7972e6,#0000f7);color:#fff;"><span>重新推送</span></button>
<button type="button" onclick="toSave()" style="float: right; height: 40px;margin-top: -30px;width: 100px;height:36px;line-height:36px;border-radius: 5px;border: 1px solid #fff;background:-webkit-linear-gradient(#b7b3b3,#b1b1b1,#828282);cursor: pointer;color:#fff;border: 1px solid #fff;background:-webkit-linear-gradient(#1713ec,#7972e6,#0000f7);color:#fff;"><span>信息保存</span></button>
<div class="condition">
<table style="width:100%;border:none;border-collapse: collapse;text-align:left;" class="cx_table_tj zjxxcjTable">
......@@ -471,6 +474,46 @@
document.zjcjform.action = "/doSaveZjxx";
document.zjcjform.submit();
}
function toCxts(){
if($("#ifts").val() =='true'){
$.messager.alert("提示","已经推送请勿重复推送!");
return;
}
if($("#xzpp").val()==null||$("#xzpp").val()==""){
$.messager.alert("提示","鞋子品牌不能为空!");
return;
}
if($("#xzcm").combobox("getValue")==null||$("#xzcm").combobox("getValue")==""){
$.messager.alert("提示","鞋子尺码不能为空!");
return;
}
if($("#sfcj").combobox("getValue")==null||$("#sfcj").combobox("getValue")==""){
$.messager.alert("提示","是否残疾不能为空!");
return;
}
$.ajax({
url:$('#zjtsUrl').val(),
type:"POST",
data:{"rybh" : $('#rybh').val(),"username":$('#username').val()},
success:function(data){
var code = data.code;
if (code == "1000"){
layer.alert(data.msg, {
skin: 'layui-layer-molv' //样式类名
,closeBtn: 0
}, function(){
window.close()
});
}else if (code ==undefined){
layer.confirm('<span style="color: red">发生未知错误请联系工程师!</span>',{icon: 2, title:'推送错误提示'});
}else {
// layer.alert(data.msg);
layer.confirm('<span style="color: red">'+data.msg+'</span>',{icon: 2, title:'推送错误提示'});
}
}
});
}
function startZjcj(num) {
var zjzp = $("#img"+num).val();
if (zjzp != null && zjzp != "") {
......
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