Commit 970a189c authored by yff's avatar yff

提交反馈代码

parent 23b9799d
...@@ -364,4 +364,13 @@ public class GpfkController extends BaseController { ...@@ -364,4 +364,13 @@ public class GpfkController extends BaseController {
return ThreadContext.getReturnData(); return ThreadContext.getReturnData();
} }
@RequestMapping("/loginscan_view")
public String login_view(HttpServletRequest request) {
String agent = request.getHeader("User-Agent");
if ( agent.contains("iPhone") || agent.contains("Android") ) {
logger.info("移动端访问; User-Agent: " + agent);
}
return "loginscan_view";
}
} }
...@@ -1165,7 +1165,8 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao { ...@@ -1165,7 +1165,8 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao {
sqlMap.append(" left join WOSN on WOSN_CODE = GPFK_WOSNID "); sqlMap.append(" left join WOSN on WOSN_CODE = GPFK_WOSNID ");
sqlMap.append(" left join WO on WO_ID = WOSN_WOID "); sqlMap.append(" left join WO on WO_ID = WOSN_WOID ");
sqlMap.append(" left join WLXX on WLXX_ID = WO_WLID "); sqlMap.append(" left join WLXX on WLXX_ID = WO_WLID ");
sqlMap.append(" left join BZGX on BZGX_ID = GPFK_FKGX "); sqlMap.append(" left join WOGYLX on WOGYLX_ID = GPFK_FKGX ");
sqlMap.append(" left join BZGX on BZGX_ID = WOGYLX_BZGXID ");
sqlMap.append("where 1 = 1 "); sqlMap.append("where 1 = 1 ");
if (StringUtils.isNotEmpty(condition.getId())){ if (StringUtils.isNotEmpty(condition.getId())){
sqlMap.append(" and " + SqlUtil.getWhereSql("GPFK_ID", condition.getId())); sqlMap.append(" and " + SqlUtil.getWhereSql("GPFK_ID", condition.getId()));
...@@ -1175,6 +1176,10 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao { ...@@ -1175,6 +1176,10 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao {
sqlMap.append(" and GPFK_FKGX = :pFKGX "); sqlMap.append(" and GPFK_FKGX = :pFKGX ");
sqlMap.setParamValue("pFKGX",condition.getGxid()); sqlMap.setParamValue("pFKGX",condition.getGxid());
} }
if (StringUtils.isNotEmpty(condition.getBzgxid())){
sqlMap.append(" and BZGX_ID = :pBZGX ");
sqlMap.setParamValue("pBZGX",condition.getBzgxid());
}
if (StringUtils.isNotEmpty(condition.getFkrid())){ if (StringUtils.isNotEmpty(condition.getFkrid())){
sqlMap.append(" and GPFK_FKRID = :pFKRID "); sqlMap.append(" and GPFK_FKRID = :pFKRID ");
sqlMap.setParamValue("pFKRID",condition.getFkrid()); sqlMap.setParamValue("pFKRID",condition.getFkrid());
......
...@@ -714,13 +714,13 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService ...@@ -714,13 +714,13 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
public GpfkVO queryKwellWosnWithAddGpfk(String wosn, String bzlx) { public GpfkVO queryKwellWosnWithAddGpfk(String wosn, String bzlx) {
GpfkCondition gpfkCondition = new GpfkCondition(); GpfkCondition gpfkCondition = new GpfkCondition();
gpfkCondition.setWosnid(wosn); gpfkCondition.setWosnid(wosn);
gpfkCondition.setGxid(bzlx); gpfkCondition.setBzgxid(bzlx);
GpfkVO gpfkVo = gpfkDao.queryKwellGpfkByWosnAndGxid(gpfkCondition); GpfkVO gpfkVo = gpfkDao.queryKwellGpfkByWosnAndGxid(gpfkCondition);
if(gpfkVo==null) { if(gpfkVo==null) {
WosngzVO wosngzVO =queryKwellWoBySnid(wosn); WosngzVO wosngzVO =queryKwellWoBySnid(wosn);
Gpfk gpfk = new Gpfk(); Gpfk gpfk = new Gpfk();
gpfk.setWosnid(wosn); gpfk.setWosnid(wosn);
gpfk.setFkgx(bzlx); gpfk.setFkgx(wosngzVO.getGylxid());
gpfk.setFkrid(UserInfoUtil.getId()); gpfk.setFkrid(UserInfoUtil.getId());
gpfk.setFkr(UserInfoUtil.getUserName()); gpfk.setFkr(UserInfoUtil.getUserName());
gpfk.setFksj(DateUtils.getDate()); gpfk.setFksj(DateUtils.getDate());
......
...@@ -76,7 +76,7 @@ public class GphyServiceImpl extends BaseEditServiceImpl implements GphyService ...@@ -76,7 +76,7 @@ public class GphyServiceImpl extends BaseEditServiceImpl implements GphyService
Gphy gphy = new Gphy(); Gphy gphy = new Gphy();
gphy.setFkgx(condition.getGxid()); gphy.setFkgx(condition.getGxid());
gphy.setWlid(wlid); gphy.setWlid(wlid);
gphy.setMid(condition.getMid()); gphy.setMid(condition.getFkid());
gphy.setWlsnid(condition.getSnid()); gphy.setWlsnid(condition.getSnid());
gphy.setZpsl(1.0); gphy.setZpsl(1.0);
insert(gphy); insert(gphy);
......
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<title>KMES-扫码登录入口</title>
<link rel="SHORTCUT ICON" href="images/logo.ico"/>
<link rel="stylesheet" href="css/login.css">
<link rel="stylesheet" href="css/col.css">
<link rel="stylesheet" href="css/font-awesome.min.css">
<style type="text/css">
.kmessmdl{
width: 100vw;
height: 100vh;
position: relative;
}
.kmessmtitle{
position: absolute;
top: 10%;
right: 50%;
transform: translate(50%, -50%);
height: 4vh;
width: 40vw;
text-align: center;
line-height: 30px;
font-size: 30px;
background-color: #FFFFFF;
}
.kmessm{
position: absolute;
top: 50%;
right: 50%;
transform: translate(50%, -50%);
height: 25vh;
width:40vw;
background-color: #FFFFFF;
display: flex;
flex-wrap: wrap;
}
.kmessm div{
height: 50%;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
}
.kmessm label{
font-size: 2vh;
}
.logtext{
padding-left: 5px;
height: 5vh;
line-height: 3vh;
font-size: 3vh;
border: 0.5px solid #D3D3D3;
width: 80%;
}
.errdialog{
z-index: 99999;
min-width:35%;
/* width: 35%; */
height: 40px;
text-align: center;
line-height: 40px;
position: absolute;
top: 30px;
right: 50%;
color: #FFFFFF;
background-color: rgba(255,0,0,0.5);
transform: translateX(50%);
border-radius: 5px;
}
</style>
</head>
<body>
<div class="kmessmdl">
<div class="kmessmtitle">
<b>KMES扫码登录界面</b>
</div>
<div class="kmessm">
<div>
<label for="rygh">人员工号:</label><input class="logtext rygh" name="rygh"/>
</div>
<div>
<label for="gylx">工序类型:</label><input class="logtext gylx" name="gylx"/>
</div>
</div>
</div>
</body>
<script language="JavaScript" type="text/javascript" src="lib/easyui/jquery.min.js" charset="utf-8"></script>
<script language="JavaScript" type="text/javascript" src="lib/easyui/jquery.easyui.min.js" charset="utf-8"></script>
<script language="JavaScript" type="text/javascript" src="lib/easyui/locale/easyui-lang-zh_CN.js"></script>
<script language="JavaScript" type="text/javascript" src="js/common/http.js"></script>
<script language="JavaScript" type="text/javascript" src="js/common/md5.min.js"></script>
<script language="JavaScript" type="text/javascript" src="js/common/json2.js"></script>
<script language="JavaScript" type="text/javascript" src="js/common/jquery.cookie.js"></script>
<script type="text/javascript">
let $rygh=$(".rygh")
let $gylx=$(".gylx")
$rygh.focus()
$rygh.keydown(function(e){
if (e.keyCode == 13) {
$gylx.focus()
}
})
$gylx.keydown(function(e){
if (e.keyCode == 13) {
apiLogin()
}
})
/* 提示框 */
/* 大屏内部弹框 */
function logalert(msg){
let getdom=$("body")
getdom.css('position','relative')
let dialog="<div class='errdialog'>"+msg+"</div>"
getdom.prepend(dialog)
setTimeout(function(){
$('.errdialog').remove();
},2000)
}
/* 登录api */
function apiLogin(){
let usersn=$rygh.val()
let bzgxsn=$gylx.val()
HTTP.post("kmes/gpfk/login ", {usersn:usersn,bzgxsn:bzgxsn}, function(result) {
if (result['success']) {
localStorage.setItem("username",result.data.username||"未知用户");
// window.location.href = "index";
let mkurl=result.data.records.fkurl
let mkid=result.data.records.modulecode
let bzlx=result.data.records.id
let gx=result.data.records.name
let url="singleindex?url="+mkurl+"#"+mkurl+";"+mkid+"+"+bzlx+"!"+gx
window.location.href =url
} else {
logalert(result.message||"登录失败")
$rygh.val("")
$gylx.val("")
$rygh.focus()
}
});
}
</script>
</html>
\ No newline at end of file
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