Commit 5cf0a784 authored by yff's avatar yff

修改

parent f7b9c756
......@@ -290,11 +290,12 @@ public class GpfkController extends BaseController {
public Object getWoBomByWoid(@RequestBody JSONObject param) {
String woid = param.getString("woid");
String bzlx = param.getString("bzlx");
if(StringUtils.isEmpty(woid)){
String wosn = param.getString("wosn");
if(StringUtils.isEmpty(woid)||StringUtils.isEmpty(wosn)){
setReturnMessage("条码不允许为空!");
return returnData();
}
List<WobomVO> wobomVOs= gpfkService.queryWobomByWo(woid,bzlx);
List<WobomVO> wobomVOs= gpfkService.queryWobomByWo(woid,bzlx,wosn);
if(wobomVOs != null){
return buildReturnData(wobomVOs);
}else{
......
......@@ -16,6 +16,7 @@ import com.gavel.kwell.vo.GpbhgmxVO;
import com.gavel.kwell.vo.GpfkCondition;
import com.gavel.kwell.vo.GpfkVO;
import com.gavel.kwell.vo.GpwxmxVO;
import com.gavel.kwell.vo.WolinkInfoVO;
import com.gavel.kwell.vo.WosngzVO;
import com.gavel.persistence.sql.RecordSet;
import com.gavel.wo.vo.WobomVO;
......@@ -113,9 +114,11 @@ public interface GpfkDao extends BaseDao {
/**科威尔工票反馈sql */
public WosngzVO queryKwellWoBySnid(String snid);
public List<WobomVO> queryWobomByWo(String woid,String bzlx);
public WolinkInfoVO queryKwellWoBySnid(String snid,String bzgx);
public GylxVO queryKwellWoStandGylx(String djid,String bzlx);
public List<WobomVO> queryWobomByWo(String woid,String bzgx,String wosn);
public GylxVO queryKwellWoStandGylx(String djid,String bzgx);
public GpfkVO queryKwellGpfkByWosnAndGxid(GpfkCondition condition);
......
......@@ -24,6 +24,7 @@ import com.gavel.kwell.vo.GpbhgmxVO;
import com.gavel.kwell.vo.GpfkCondition;
import com.gavel.kwell.vo.GpfkVO;
import com.gavel.kwell.vo.GpwxmxVO;
import com.gavel.kwell.vo.WolinkInfoVO;
import com.gavel.kwell.vo.WosngzVO;
import com.gavel.persistence.sql.RecordSet;
import com.gavel.persistence.sql.SqlMap;
......@@ -1098,7 +1099,7 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao {
@Override
public List<WobomVO> queryWobomByWo(String woid,String bzlx) {
public List<WobomVO> queryWobomByWo(String woid,String bzlx,String wosn) {
SqlMap sqlMap = new SqlMap();
sqlMap.append("select WOBOM_ID, WOBOM_XH, WOBOM_WOID, WOBOM_WLID, WOBOM_FFGX,");
sqlMap.append(" WOBOM_DWYL, WOBOM_XQSL, WOBOM_XQRQ, WOBOM_SHL, WOBOM_SHZ, WOBOM_FFYZ,");
......@@ -1109,9 +1110,11 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao {
sqlMap.append("from WOBOM");
sqlMap.append(" left join WLXX on WLXX_ID = WOBOM_WLID");
sqlMap.append(" left join WO on WO_ID = WOBOM_WOID");
sqlMap.append(" left join WOGYLX on WOGYLX_ID = WOBOM_FFGX ");
sqlMap.append(" left join WOSN on WOSN_WOID = WO_ID");
sqlMap.append(" left join WOGYLX on WOGYLX_WOID = WO_ID ");
sqlMap.append(" left join BZGX on BZGX_ID = WOGYLX_BZGXID ");
sqlMap.append(" left join (select sum(GPHY_ZPSL) as ZPSL,GPHY_MID,GPHY_WLID from GPHY group by GPHY_MID,GPHY_WLID) k on k.GPHY_MID = WO_ID and k.GPHY_WLID = WLXX_ID");
sqlMap.append(" left join GPFK on GPFK_WOSNID = WOSN_CODE and GPFK_FKGX= BZGX_ID and GPFK_WOGYLX =WOGYLX_ID");
sqlMap.append(" left join (select sum(GPHY_ZPSL) as ZPSL,GPHY_MID,GPHY_WLID from GPHY group by GPHY_MID,GPHY_WLID) k on k.GPHY_MID = GPFK_ID and k.GPHY_WLID = WLXX_ID");
sqlMap.append("where 1=1");
if (StringUtils.isNotEmpty(woid)){
sqlMap.append(" and " + SqlUtil.getWhereSql("WO_ID", woid));
......@@ -1121,6 +1124,10 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao {
sqlMap.append(" and " + SqlUtil.getWhereSql("BZGX_ID", bzlx));
sqlMap.setParamValue("BZGX_ID", bzlx);
}
if (StringUtils.isNotEmpty(wosn)){
sqlMap.append(" and " + SqlUtil.getWhereSql("WOSN_CODE", wosn));
sqlMap.setParamValue("WOSN_CODE", wosn);
}
sqlMap.append("order by WOBOM_XH, WLXX_CODE");
return sqlMap.query(WobomVO.class);
}
......@@ -1165,8 +1172,8 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao {
sqlMap.append(" left join WOSN on WOSN_CODE = GPFK_WOSNID ");
sqlMap.append(" left join WO on WO_ID = WOSN_WOID ");
sqlMap.append(" left join WLXX on WLXX_ID = WO_WLID ");
sqlMap.append(" left join WOGYLX on WOGYLX_ID = GPFK_FKGX ");
sqlMap.append(" left join BZGX on BZGX_ID = WOGYLX_BZGXID ");
sqlMap.append(" left join WOGYLX on WOGYLX_ID = GPFK_WOGYLX ");
sqlMap.append(" left join BZGX on BZGX_ID = GPFK_FKGX ");
sqlMap.append("where 1 = 1 ");
if (StringUtils.isNotEmpty(condition.getId())){
sqlMap.append(" and " + SqlUtil.getWhereSql("GPFK_ID", condition.getId()));
......@@ -1226,5 +1233,24 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao {
}
@Override
public WolinkInfoVO queryKwellWoBySnid(String snid, String bzgx) {
SqlMap sqlMap = new SqlMap();
sqlMap.append("select WO_ID,WO_ZT, WLXX_ID,WOSN_CODE,WOSN_ID,BZGX_ID,WOGYLX_ID ");
sqlMap.append("from WOSN ");
sqlMap.append(" left join WO on WO_ID=WOSN_WOID");
sqlMap.append(" left join WOGYLX on WOGYLX_WOID =WO_ID");
sqlMap.append(" left join GYLX on GYLX_ID = WOGYLX_GYLXID");
sqlMap.append(" left join BZGX on BZGX_ID =GYLX_BZGXID");
sqlMap.append(" left join WLXX on wlxx_id = wo_wlid");
sqlMap.append("where 1 = 1 ");
sqlMap.append(" and WOSN_CODE = :pSNID ");
sqlMap.setParamValue("pSNID",snid);
sqlMap.append(" and BZGX_ID = :pBZGXID ");
sqlMap.setParamValue("pBZGXID",bzgx);
return sqlMap.queryEntity(WolinkInfoVO.class);
}
}
......@@ -21,6 +21,8 @@ public class Gpfk extends BaseEntity {
private Date fksj;
@FieldMeta(fieldName = "GPFK_FKJSSJ", caption = "反馈结束时间")
private Date fkjssj;
@FieldMeta(fieldName = "GPFK_WOGYLX", caption = "订单工艺路线ID ")
private String wogylx;
@FieldMeta(fieldName = "GPFK_HGBZ", caption = "合格标志")
private String hgbz;
@FieldMeta(fieldName = "GPFK_FKSL", caption = "反馈数量")
......@@ -96,6 +98,14 @@ public class Gpfk extends BaseEntity {
@FieldMeta(fieldName = "GPFK_WLID", caption = "物料编码")
private String wlid;
public String getWogylx() {
return wogylx;
}
public void setWogylx(String wogylx) {
this.wogylx = wogylx;
}
public String getWlid() {
return wlid;
}
......
......@@ -92,7 +92,7 @@ public interface GpfkService extends BaseEditService {
public SmCodeModel querySml(String snid);
public List<WobomVO> queryWobomByWo(String woid,String bzlx);
public List<WobomVO> queryWobomByWo(String woid,String bzlx,String wosn);
public GylxVO queryKwellWoStandGylx(String djid,String bzlx);
......
......@@ -693,8 +693,8 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
}
@Override
public List<WobomVO> queryWobomByWo(String woid,String bzlx) {
return gpfkDao.queryWobomByWo(woid,bzlx);
public List<WobomVO> queryWobomByWo(String woid,String bzlx,String wosn) {
return gpfkDao.queryWobomByWo(woid,bzlx,wosn);
}
@Override
......@@ -717,14 +717,22 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
gpfkCondition.setBzgxid(bzlx);
GpfkVO gpfkVo = gpfkDao.queryKwellGpfkByWosnAndGxid(gpfkCondition);
if(gpfkVo==null) {
WosngzVO wosngzVO =queryKwellWoBySnid(wosn);
WolinkInfoVO wolinkInfoVO =gpfkDao.queryKwellWoBySnid(wosn, bzlx);
if(wolinkInfoVO==null) {
throwReturnMessage("不存在对应订单序号标准类型信息");
}
if(!wolinkInfoVO.getWozt().equals("R")) {
throwReturnMessage("订单未下达");
}
/**判断上一道工序**/
Gpfk gpfk = new Gpfk();
gpfk.setWosnid(wosn);
gpfk.setFkgx(wosngzVO.getGylxid());
gpfk.setWosnid(wolinkInfoVO.getWosnCode());
gpfk.setWogylx(wolinkInfoVO.getWogylxid());
gpfk.setFkgx(wolinkInfoVO.getBzgxid());
gpfk.setFkrid(UserInfoUtil.getId());
gpfk.setFkr(UserInfoUtil.getUserName());
gpfk.setFksj(DateUtils.getDate());
gpfk.setWlid(wosngzVO.getWlid());
gpfk.setWlid(wolinkInfoVO.getWlid());
insert(gpfk);
gpfkVo = gpfkDao.queryKwellGpfkByWosnAndGxid(gpfkCondition);
}
......
......@@ -7,11 +7,13 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.gavel.common.base.service.impl.BaseEditServiceImpl;
import com.gavel.common.utils.DateUtils;
import com.gavel.jcsj.service.CoderuleService;
import com.gavel.kwell.dao.GpfkDao;
import com.gavel.kwell.dao.GphyDao;
import com.gavel.kwell.persistent.Gphy;
import com.gavel.kwell.service.GphyService;
import com.gavel.kwell.utils.HzGylxEnum;
import com.gavel.kwell.vo.GphyCondition;
import com.gavel.kwell.vo.GphyVO;
import com.gavel.kwell.vo.GphycxVO;
......@@ -78,7 +80,9 @@ public class GphyServiceImpl extends BaseEditServiceImpl implements GphyService
gphy.setWlid(wlid);
gphy.setMid(condition.getFkid());
gphy.setWlsnid(condition.getSnid());
gphy.setFksj(DateUtils.getDate());
gphy.setZpsl(1.0);
gphy.setHylx(HzGylxEnum.ZP.getId());
insert(gphy);
return compareIsZpComplete(condition.getMid());
}
......
package com.gavel.kwell.vo;
import com.gavel.common.utils.StringUtils;
import java.util.Date;
import com.gavel.persistence.annotation.FieldMeta;
import com.gavel.wo.persistent.Wo;
import java.util.Date;
public class WosngzVO extends Wo {
......
# erp测试环境
jdbc.driverClassName=com.mysql.cj.jdbc.Driver
jdbc.url = jdbc:mysql://localhost:3306/kmes?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
jdbc.url = jdbc:mysql://192.168.30.254:3306/kwell?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
jdbc.username = root
jdbc.password = root
......
......@@ -63,7 +63,7 @@
<div data-options="iconCls:'fa fa-tree orange'" onclick="changeTheme('yellow')">橙色主题</div>
<div data-options="iconCls:'fa fa-tree orange'" onclick="changeTheme('yellowlight')">橙色主题-亮</div>
</div>
<a href="javascript:void(0)" onclick="logout()" class="gui-menubutton"
<a href="javascript:void(0)" onclick="manlogout()" class="gui-menubutton"
data-options="iconCls:'fa fa-sign-out',hasDownArrow:false" style="color:#fff;">注销</a>
</span>
<div style="position: fixed;z-index: 1030!important;float:right;right: 28%;margin-top: 12px">
......@@ -286,7 +286,21 @@
var notifySocket=new gavelWebSocket(function (msg) {
gas.showTips(msg.data)
})
// 退出系统
function manlogout() {
$.iMessager.confirm('提示', '确定要退出吗?', function (r) {
if (r) {
HTTP.post("main/logout",{},function (res) {
if(res.success&&res.data.records){
var url = res.data.records;
localStorage.clear();
window.location.replace(res.data.records);
}
})
}
});
}
</script>
......
......@@ -121,7 +121,7 @@
zpfk_wrz(that,msg,'error')
return false
}
gas.post('kmes/gphy/zpwl',{"wlxh":that.xlh,"fkid":that.fkid}, function(res){
gas.post('kmes/gphy/zpwl',{"snid":that.xlh,"fkid":that.fkid}, function(res){
if(res.data&&res.data.records){
/* 表格加1 ok标志改变 日志 */
zpfk_queryKwellWoinfo2(that).then(function(s){
......@@ -192,7 +192,7 @@
function zpfk_queryWoBomByWoid(e,woid){
let that=e
that.xlh=""
gas.post('kmes/gpfk/queryWoBomByWoid',{"woid":woid,"bzlx":window.bzlx}, function(res){
gas.post('kmes/gpfk/queryWoBomByWoid',{"woid":woid,"wosn":that.cpsn,"bzlx":window.bzlx}, function(res){
if(res.data&&res.data.records){
let msg="查询装配表格:"+woid+"成功"
zpfk_wrz(that,msg)
......@@ -244,7 +244,7 @@
}else if(e=="LOGOUT"){
zpfk_wrz(that,"即将退出系统")
localStorage.clear();
window.location.href ="logout";
window.location.href ="loginscan_view";
}
/* 获取类型 */
})
......
......@@ -194,7 +194,7 @@
}else if(e=="LOGOUT"){
jyfk_wrz(that,"即将退出系统")
localStorage.clear();
window.location.href ="logout";
window.location.href ="loginscan_view";
}
/* 获取类型 */
})
......
......@@ -194,7 +194,7 @@
}else if(e=="LOGOUT"){
wxfk_wrz(that,"即将退出系统")
localStorage.clear();
window.location.href ="logout";
window.location.href ="loginscan_view";
}
/* 获取类型 */
})
......
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