Commit 2f02eb15 authored by yff's avatar yff

修改BUG,增加明细物料名称CODE

parent ac84bf0c
...@@ -249,23 +249,6 @@ public class GpfkController extends BaseController { ...@@ -249,23 +249,6 @@ public class GpfkController extends BaseController {
/** 科威尔工票反馈模块 **/ /** 科威尔工票反馈模块 **/
@ApiOperation(value = "扫描序列号,返回序列号类型")
@RequestMapping(value = "/querySmlx", method = RequestMethod.POST)
@ResponseBody
public Object getSmlx(@RequestBody JSONObject param) {
String wosnid = param.getString("wosnid");
if(StringUtils.isEmpty(wosnid)){
setReturnMessage("条码不允许为空!");
return returnData();
}
SmCodeModel smCodeModel = gpfkService.querySml(wosnid);
if(smCodeModel != null){
return buildReturnData(smCodeModel);
}else{
return ThreadContext.getReturnData();
}
}
@ApiOperation(value = "扫码得到wobom,{\"woid\":111}传入条码,返回任务单信息") @ApiOperation(value = "扫码得到wobom,{\"woid\":111}传入条码,返回任务单信息")
@RequestMapping(value = "/queryWoBomByWoid", method = RequestMethod.POST) @RequestMapping(value = "/queryWoBomByWoid", method = RequestMethod.POST)
......
...@@ -59,7 +59,8 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao { ...@@ -59,7 +59,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 ");
sqlMap.append(" and GPFK_FKLX = :pFKLX "); sqlMap.append(" and GPFK_FKLX = :pFKLX ");
sqlMap.setParamValue("pFKLX", GpfkFklxEnum.WO.getId()); sqlMap.setParamValue("pFKLX", GpfkFklxEnum.WO.getId());
...@@ -67,9 +68,13 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao { ...@@ -67,9 +68,13 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao {
sqlMap.append(" and " + SqlUtil.getWhereSql("GPFK_ID", condition.getId())); sqlMap.append(" and " + SqlUtil.getWhereSql("GPFK_ID", condition.getId()));
sqlMap.setParamValue("GPFK_ID", condition.getId()); sqlMap.setParamValue("GPFK_ID", condition.getId());
} }
if (StringUtils.isNotEmpty(condition.getGxid())){ if (StringUtils.isNotEmpty(condition.getWogylx())){
sqlMap.append(" and GPFK_FKGX = :pFKGX "); sqlMap.append(" and GPFK_FKGX = :pFKGX ");
sqlMap.setParamValue("pFKGX",condition.getGxid()); sqlMap.setParamValue("pFKGX",condition.getWogylx());
}
if (StringUtils.isNotEmpty(condition.getBzgxid())){
sqlMap.append(" and BZGX_ID = :pBZGXID ");
sqlMap.setParamValue("pBZGXID",condition.getBzgxid());
} }
if (StringUtils.isNotEmpty(condition.getBxid())){ if (StringUtils.isNotEmpty(condition.getBxid())){
sqlMap.append(" and GPFK_FKBX = :pBXID "); sqlMap.append(" and GPFK_FKBX = :pBXID ");
......
...@@ -167,7 +167,6 @@ public class GphyDaoImpl extends BaseDaoImpl implements GphyDao { ...@@ -167,7 +167,6 @@ public class GphyDaoImpl extends BaseDaoImpl implements GphyDao {
if (StringUtils.isNotEmpty(condition.getMid())){ if (StringUtils.isNotEmpty(condition.getMid())){
sqlMap.append(" and b.fkid = '" + condition.getMid()+"'"); sqlMap.append(" and b.fkid = '" + condition.getMid()+"'");
} }
System.out.println(sqlMap.getSqlText());
return sqlMap.queryInt(); return sqlMap.queryInt();
} }
......
...@@ -9,7 +9,6 @@ import com.gavel.gygl.vo.BzgxCondition; ...@@ -9,7 +9,6 @@ import com.gavel.gygl.vo.BzgxCondition;
import com.gavel.gygl.vo.BzgxVO; import com.gavel.gygl.vo.BzgxVO;
import com.gavel.gygl.vo.GylxVO; import com.gavel.gygl.vo.GylxVO;
import com.gavel.kwell.persistent.Gpfk; import com.gavel.kwell.persistent.Gpfk;
import com.gavel.kwell.utils.SmCodeModel;
import com.gavel.kwell.vo.FkCondition; import com.gavel.kwell.vo.FkCondition;
import com.gavel.kwell.vo.FkVO; import com.gavel.kwell.vo.FkVO;
import com.gavel.kwell.vo.GpResVO; import com.gavel.kwell.vo.GpResVO;
...@@ -90,9 +89,6 @@ public interface GpfkService extends BaseEditService { ...@@ -90,9 +89,6 @@ public interface GpfkService extends BaseEditService {
/** 科威尔mes工票反馈重写--begin */ /** 科威尔mes工票反馈重写--begin */
public WosngzVO queryKwellWoBySnid(String snid);
public SmCodeModel querySml(String snid);
public List<WobomVO> queryWobomByWo(String woid,String bzlx,String wosn); public List<WobomVO> queryWobomByWo(String woid,String bzlx,String wosn);
...@@ -111,7 +107,6 @@ public interface GpfkService extends BaseEditService { ...@@ -111,7 +107,6 @@ public interface GpfkService extends BaseEditService {
*/ */
public String checkSnType(String snid); public String checkSnType(String snid);
public FkVO zpfk(FkCondition fkCondition); public FkVO zpfk(FkCondition fkCondition);
public FkVO jyfk(FkCondition fkCondition); public FkVO jyfk(FkCondition fkCondition);
public FkVO wxfk(FkCondition fkCondition); public FkVO wxfk(FkCondition fkCondition);
......
...@@ -37,7 +37,9 @@ import com.gavel.gygl.utils.GyglParamEnum; ...@@ -37,7 +37,9 @@ import com.gavel.gygl.utils.GyglParamEnum;
import com.gavel.gygl.vo.BzgxCondition; import com.gavel.gygl.vo.BzgxCondition;
import com.gavel.gygl.vo.BzgxVO; import com.gavel.gygl.vo.BzgxVO;
import com.gavel.gygl.vo.GylxVO; import com.gavel.gygl.vo.GylxVO;
import com.gavel.jcsj.persistent.Wlxx;
import com.gavel.jcsj.service.CoderuleService; import com.gavel.jcsj.service.CoderuleService;
import com.gavel.jcsj.service.WlxxService;
import com.gavel.kwell.dao.GpfkDao; import com.gavel.kwell.dao.GpfkDao;
import com.gavel.kwell.dao.GphyDao; import com.gavel.kwell.dao.GphyDao;
import com.gavel.kwell.persistent.Gpbhgmx; import com.gavel.kwell.persistent.Gpbhgmx;
...@@ -121,6 +123,9 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService ...@@ -121,6 +123,9 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
@Autowired @Autowired
private UserDao userDao; private UserDao userDao;
@Autowired
private WlxxService wlxxService;
@Override @Override
public void initService() { public void initService() {
addMaster( Gpfk.class); addMaster( Gpfk.class);
...@@ -731,28 +736,11 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService ...@@ -731,28 +736,11 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
return gpfkVO; return gpfkVO;
} }
@Override
public WosngzVO queryKwellWoBySnid(String snid) {
return gpfkDao.queryKwellWoBySnid(snid);
}
@Override @Override
public GylxVO queryKwellWoStandGylx(String woid,String bzlx) { public GylxVO queryKwellWoStandGylx(String woid,String bzlx) {
return gpfkDao.queryKwellWoStandGylx(woid, bzlx); return gpfkDao.queryKwellWoStandGylx(woid, bzlx);
} }
@Override
public SmCodeModel querySml(String snid) {
List<SmCodeModel> smCodeModels =SmCodeEnum.toList();
if(smCodeModels!=null&&smCodeModels.size()>0) {
for(SmCodeModel smCodeModel:smCodeModels) {
if(snid.toUpperCase().startsWith(smCodeModel.getPrefix())) {
return smCodeModel;
}
}
}
return null;
}
@Override @Override
public List<WobomVO> queryWobomByWo(String woid,String bzlx,String wosn) { public List<WobomVO> queryWobomByWo(String woid,String bzlx,String wosn) {
...@@ -959,7 +947,6 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService ...@@ -959,7 +947,6 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
GphyCondition hyCondition =new GphyCondition(); GphyCondition hyCondition =new GphyCondition();
hyCondition.setMid(curFkVo.getId()); hyCondition.setMid(curFkVo.getId());
curFkVo = gpfkDao.queryKwellGpfkByWosnAndGxid(fkCondition); curFkVo = gpfkDao.queryKwellGpfkByWosnAndGxid(fkCondition);
System.out.println(gphyDao.queryIfZpwc(hyCondition));
if(gphyDao.queryIfZpwc(hyCondition)==0) { if(gphyDao.queryIfZpwc(hyCondition)==0) {
curFkVo.setZpbz(SmCodeEnum.OKBZ.getPrefix()); curFkVo.setZpbz(SmCodeEnum.OKBZ.getPrefix());
} }
...@@ -988,8 +975,9 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService ...@@ -988,8 +975,9 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
gpfk.setFkgx(curFkVo.getWogylxid()); gpfk.setFkgx(curFkVo.getWogylxid());
gpfk.setFkrid(UserInfoUtil.getId()); gpfk.setFkrid(UserInfoUtil.getId());
gpfk.setFkr(UserInfoUtil.getUserName()); gpfk.setFkr(UserInfoUtil.getUserName());
gpfk.setFksj(DateUtils.getDate()); gpfk.setFksj(DateUtils.getDateTime());
gpfk.setWlid(wlid); gpfk.setWlid(wlid);
gpfk.setFklx(GpfkFklxEnum.WO.getId());
insert(gpfk); insert(gpfk);
gpfkVo = gpfkDao.queryKwellGpfkByWosnAndGxid(fkCondition); gpfkVo = gpfkDao.queryKwellGpfkByWosnAndGxid(fkCondition);
} }
...@@ -999,7 +987,7 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService ...@@ -999,7 +987,7 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
gpfk.setFkgx(curFkVo.getWogylxid()); gpfk.setFkgx(curFkVo.getWogylxid());
gpfk.setFkrid(UserInfoUtil.getId()); gpfk.setFkrid(UserInfoUtil.getId());
gpfk.setFkr(UserInfoUtil.getUserName()); gpfk.setFkr(UserInfoUtil.getUserName());
gpfk.setFksj(DateUtils.getDate()); gpfk.setFksj(DateUtils.getDateTime());
update(gpfk); update(gpfk);
gpfkVo = gpfkDao.queryKwellGpfkByWosnAndGxid(fkCondition); gpfkVo = gpfkDao.queryKwellGpfkByWosnAndGxid(fkCondition);
} }
...@@ -1015,7 +1003,7 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService ...@@ -1015,7 +1003,7 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
gphy.setWlid(wlid); gphy.setWlid(wlid);
gphy.setMid(gpfkVo.getId()); gphy.setMid(gpfkVo.getId());
gphy.setWlsnid(fkCondition.getSncode()); gphy.setWlsnid(fkCondition.getSncode());
gphy.setFksj(DateUtils.getDate()); gphy.setFksj(DateUtils.getDateTime());
gphy.setZpsl(1.0); gphy.setZpsl(1.0);
gphy.setHylx(HzGylxEnum.ZP.getId()); gphy.setHylx(HzGylxEnum.ZP.getId());
gphyService.insert(gphy); gphyService.insert(gphy);
...@@ -1032,6 +1020,10 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService ...@@ -1032,6 +1020,10 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
} }
} }
} }
gpfkVo.setSntype(SmCodeEnum.WLID.getId());
Wlxx cuwlxx = gpfkDao.queryById(Wlxx.class, wlid);
gpfkVo.setCurwlsncode(cuwlxx.getCode());
gpfkVo.setCurwlsnname(cuwlxx.getName());
return gpfkVo; return gpfkVo;
} }
else { else {
...@@ -1109,9 +1101,10 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService ...@@ -1109,9 +1101,10 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
gpfk.setFkgx(curFkVo.getWogylxid()); gpfk.setFkgx(curFkVo.getWogylxid());
gpfk.setFkrid(UserInfoUtil.getId()); gpfk.setFkrid(UserInfoUtil.getId());
gpfk.setFkr(UserInfoUtil.getUserName()); gpfk.setFkr(UserInfoUtil.getUserName());
gpfk.setFksj(DateUtils.getDate()); gpfk.setFksj(DateUtils.getDateTime());
gpfk.setWlid(curFkVo.getWlid()); gpfk.setWlid(curFkVo.getWlid());
gpfk.setHgbz("Y"); gpfk.setHgbz("Y");
gpfk.setFklx(GpfkFklxEnum.WO.getId());
gpfk.setHgsl(1.0); gpfk.setHgsl(1.0);
gpfk.setBhgsl(0.0); gpfk.setBhgsl(0.0);
insert(gpfk); insert(gpfk);
...@@ -1147,9 +1140,10 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService ...@@ -1147,9 +1140,10 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
gpfk.setFkgx(curFkVo.getWogylxid()); gpfk.setFkgx(curFkVo.getWogylxid());
gpfk.setFkrid(UserInfoUtil.getId()); gpfk.setFkrid(UserInfoUtil.getId());
gpfk.setFkr(UserInfoUtil.getUserName()); gpfk.setFkr(UserInfoUtil.getUserName());
gpfk.setFksj(DateUtils.getDate()); gpfk.setFksj(DateUtils.getDateTime());
gpfk.setWlid(curFkVo.getWlid()); gpfk.setWlid(curFkVo.getWlid());
gpfk.setHgbz("N"); gpfk.setHgbz("N");
gpfk.setFklx(GpfkFklxEnum.WO.getId());
gpfk.setHgsl(0.0); gpfk.setHgsl(0.0);
gpfk.setBhgsl(1.0); gpfk.setBhgsl(1.0);
insert(gpfk); insert(gpfk);
...@@ -1250,8 +1244,9 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService ...@@ -1250,8 +1244,9 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
gpfk.setFkgx(curFkVo.getWogylxid()); gpfk.setFkgx(curFkVo.getWogylxid());
gpfk.setFkrid(UserInfoUtil.getId()); gpfk.setFkrid(UserInfoUtil.getId());
gpfk.setFkr(UserInfoUtil.getUserName()); gpfk.setFkr(UserInfoUtil.getUserName());
gpfk.setFksj(DateUtils.getDate()); gpfk.setFksj(DateUtils.getDateTime());
gpfk.setWlid(curFkVo.getWlid()); gpfk.setWlid(curFkVo.getWlid());
gpfk.setFklx(GpfkFklxEnum.WO.getId());
gpfk.setHgbz("Y"); gpfk.setHgbz("Y");
gpfk.setHgsl(1.0); gpfk.setHgsl(1.0);
gpfk.setBhgsl(0.0); gpfk.setBhgsl(0.0);
...@@ -1288,7 +1283,8 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService ...@@ -1288,7 +1283,8 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
gpfk.setFkgx(curFkVo.getWogylxid()); gpfk.setFkgx(curFkVo.getWogylxid());
gpfk.setFkrid(UserInfoUtil.getId()); gpfk.setFkrid(UserInfoUtil.getId());
gpfk.setFkr(UserInfoUtil.getUserName()); gpfk.setFkr(UserInfoUtil.getUserName());
gpfk.setFksj(DateUtils.getDate()); gpfk.setFksj(DateUtils.getDateTime());
gpfk.setFklx(GpfkFklxEnum.WO.getId());
gpfk.setWlid(curFkVo.getWlid()); gpfk.setWlid(curFkVo.getWlid());
gpfk.setHgbz("N"); gpfk.setHgbz("N");
gpfk.setHgsl(0.0); gpfk.setHgsl(0.0);
......
...@@ -161,6 +161,25 @@ public class FkVO extends BaseEntity { ...@@ -161,6 +161,25 @@ public class FkVO extends BaseEntity {
@FieldMeta(fieldName = "WO_ZT", caption = "订单状态" ) @FieldMeta(fieldName = "WO_ZT", caption = "订单状态" )
private String wozt; private String wozt;
private String curwlsnname;
private String curwlsncode;
public String getCurwlsnname() {
return curwlsnname;
}
public void setCurwlsnname(String curwlsnname) {
this.curwlsnname = curwlsnname;
}
public String getCurwlsncode() {
return curwlsncode;
}
public void setCurwlsncode(String curwlsncode) {
this.curwlsncode = curwlsncode;
}
@FieldMeta(caption = "sn类型") @FieldMeta(caption = "sn类型")
private String sntype; private String sntype;
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
</div> </div>
<!--<input type="hidden" name="bxid"/>--> <!--<input type="hidden" name="bxid"/>-->
<input type="hidden" name="fkrid"/> <input type="hidden" name="fkrid"/>
<input type="hidden" name="gxid"/> <input type="hidden" name="bzgxid"/>
</li> </li>
</ul> </ul>
<span class="toolbar-search-span"><a class="toolbar-search1" style="color:white;" href="javascript:void(0)"></a></span> <span class="toolbar-search-span"><a class="toolbar-search1" style="color:white;" href="javascript:void(0)"></a></span>
...@@ -120,7 +120,7 @@ ...@@ -120,7 +120,7 @@
}, },
messager:function () { messager:function () {
var flag=true; var flag=true;
if($div.find("input[name='gxid']").val()==""){ if($div.find("input[name='bzgxid']").val()==""){
gas.confirm("您尚未选择工序,无法进行反馈操作。是否重新选择工序?",function () { gas.confirm("您尚未选择工序,无法进行反馈操作。是否重新选择工序?",function () {
run(); run();
flag=false; flag=false;
...@@ -168,7 +168,7 @@ ...@@ -168,7 +168,7 @@
iconCls:"fa fa-search", iconCls:"fa fa-search",
btnCls:"", btnCls:"",
onClick:function () { onClick:function () {
if($div.find("input[name='gxid']").val()==""){ if($div.find("input[name='bzgxid']").val()==""){
gas.confirm("您尚未选择工序,是否重新选择工序?",function () { gas.confirm("您尚未选择工序,是否重新选择工序?",function () {
run(); run();
}); });
...@@ -200,7 +200,7 @@ ...@@ -200,7 +200,7 @@
} }
var data=DataBind.collectData(element); var data=DataBind.collectData(element);
$div.find("input[name='bxid']").val(data.bxid||""); $div.find("input[name='bxid']").val(data.bxid||"");
$div.find("input[name='gxid']").val(data.gxid||""); $div.find("input[name='bzgxid']").val(data.id||"");
$div.find("input[name='fkrid']").val(window.sessionStorage.getItem('userId')); $div.find("input[name='fkrid']").val(window.sessionStorage.getItem('userId'));
fkrName=window.sessionStorage.getItem('userName'); fkrName=window.sessionStorage.getItem('userName');
gxName=data.gxName||""; gxName=data.gxName||"";
......
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