Commit 9d3c4cc2 authored by yff's avatar yff

Merge branch 'master' of gitlab.gavelinfo.com:gavelinfo/kwell-mes

parents f112a390 686144ce
...@@ -54,7 +54,7 @@ public class KmesBoardController extends BaseController { ...@@ -54,7 +54,7 @@ public class KmesBoardController extends BaseController {
/** /**
* 时段产量 * 时段产量(每一天)
*/ */
@RequestMapping(value = "querySdcl", method = RequestMethod.POST) @RequestMapping(value = "querySdcl", method = RequestMethod.POST)
@ResponseBody @ResponseBody
...@@ -64,7 +64,7 @@ public class KmesBoardController extends BaseController { ...@@ -64,7 +64,7 @@ public class KmesBoardController extends BaseController {
} }
/** /**
*近一周排产数据 *近一周日排产数据(每一天)
*/ */
@RequestMapping(value = "queryWeekPcsl", method = RequestMethod.POST) @RequestMapping(value = "queryWeekPcsl", method = RequestMethod.POST)
@ResponseBody @ResponseBody
......
...@@ -3,6 +3,7 @@ package com.gavel.kwell.dao; ...@@ -3,6 +3,7 @@ package com.gavel.kwell.dao;
import com.gavel.common.base.dao.BaseDao; import com.gavel.common.base.dao.BaseDao;
import com.gavel.gygl.vo.BzgxVO; import com.gavel.gygl.vo.BzgxVO;
import com.gavel.kwell.persistent.Gpfk; import com.gavel.kwell.persistent.Gpfk;
import com.gavel.kwell.persistent.Gpfkjg;
import com.gavel.kwell.vo.GpfkCondition; import com.gavel.kwell.vo.GpfkCondition;
import com.gavel.kwell.vo.GpfkcxVO; import com.gavel.kwell.vo.GpfkcxVO;
import com.gavel.persistence.sql.RecordSet; import com.gavel.persistence.sql.RecordSet;
...@@ -19,11 +20,11 @@ public interface GpfkcxDao extends BaseDao { ...@@ -19,11 +20,11 @@ public interface GpfkcxDao extends BaseDao {
public List<BzgxVO> listBzgxName(); public List<BzgxVO> listBzgxName();
public List<Gpfk> queryByBetween(Date start, Date end); public List<Gpfkjg> queryByBetween(Date start, Date end);
public List<Gpfk> queryGpfk(Date date,String[] gxbzs); public List<Gpfkjg> queryGpfk(Date date,String[] gxbzs);
public Gpfk queryWeekGpfk(Date date,String woid); public Gpfkjg queryWeekGpfk(Date date,String woid);
public Gpfk queryMonthGpfk(Date date); public Gpfkjg queryMonthGpfk(Date date);
} }
...@@ -1475,7 +1475,7 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao { ...@@ -1475,7 +1475,7 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao {
public FkVO queryKwellWxWoBySnidUptoDate(String wosnid) { public FkVO queryKwellWxWoBySnidUptoDate(String wosnid) {
SqlMap sqlMap = new SqlMap(); SqlMap sqlMap = new SqlMap();
sqlMap.append("select top 1 WO_ID,WO_ZT,WLXX_CODE,WLXX_GG,WLXX_ID,WOSN_CODE,WOSN_ID,"); sqlMap.append("select top 1 WO_ID,WO_ZT,WLXX_CODE,WLXX_GG,WLXX_ID,WOSN_CODE,WOSN_ID,");
sqlMap.append(" WLXX_GG,WO_DJID,WOSN_CODE "); sqlMap.append(" WO_DJID ");
sqlMap.append("from WOSN "); sqlMap.append("from WOSN ");
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");
......
...@@ -7,6 +7,7 @@ import com.gavel.common.utils.StringUtils; ...@@ -7,6 +7,7 @@ import com.gavel.common.utils.StringUtils;
import com.gavel.gygl.vo.BzgxVO; import com.gavel.gygl.vo.BzgxVO;
import com.gavel.kwell.dao.GpfkcxDao; import com.gavel.kwell.dao.GpfkcxDao;
import com.gavel.kwell.persistent.Gpfk; import com.gavel.kwell.persistent.Gpfk;
import com.gavel.kwell.persistent.Gpfkjg;
import com.gavel.kwell.vo.GpfkCondition; import com.gavel.kwell.vo.GpfkCondition;
import com.gavel.kwell.vo.GpfkcxVO; import com.gavel.kwell.vo.GpfkcxVO;
import com.gavel.persistence.sql.RecordSet; import com.gavel.persistence.sql.RecordSet;
...@@ -37,7 +38,7 @@ public class GpfkcxDaoImpl extends BaseDaoImpl implements GpfkcxDao { ...@@ -37,7 +38,7 @@ public class GpfkcxDaoImpl extends BaseDaoImpl implements GpfkcxDao {
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 WOGYLX on WOGYLX_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(" left join BZGX on BZGX_ID = U_GPFK_BZGXID ");
sqlMap.append(" left join GZZX on GZZX_ID = BZGX_GZZXID "); sqlMap.append(" left join GZZX on GZZX_ID = BZGX_GZZXID ");
sqlMap.append(" where 1=1 "); sqlMap.append(" where 1=1 ");
if ( StringUtils.isNotEmpty(condition.getGzzxid())){ if ( StringUtils.isNotEmpty(condition.getGzzxid())){
...@@ -115,47 +116,47 @@ public class GpfkcxDaoImpl extends BaseDaoImpl implements GpfkcxDao { ...@@ -115,47 +116,47 @@ public class GpfkcxDaoImpl extends BaseDaoImpl implements GpfkcxDao {
} }
@Override @Override
public List<Gpfk> queryByBetween(Date start, Date end) { public List<Gpfkjg> queryByBetween(Date start, Date end) {
SqlMap sqlMap = new SqlMap(); SqlMap sqlMap = new SqlMap();
sqlMap.append("select GPFK_ID, GPFK_WOSNID, GPFK_FKLX, GPFK_FKGX, "); sqlMap.append("select GPFKJG_ID, GPFKJG_WOSNID, GPFKJG_FKLX, GPFKJG_FKGX, ");
sqlMap.append(" GPFK_FKSJ,GPFK_FKR,GPFK_FKRID, GPFK_FKBX, GPFK_FKJSSJ,"); sqlMap.append(" GPFKJG_FKSJ,GPFKJG_FKR,GPFKJG_FKRID, GPFKJG_FKBX, GPFKJG_FKJSSJ,");
sqlMap.append(" GPFK_HGBZ,GPFK_FKSL,GPFK_HGSL,GPFK_BHGSL,GPFK_GFSL, "); sqlMap.append(" GPFKJG_HGBZ,GPFKJG_FKSL,GPFKJG_HGSL,GPFKJG_BHGSL,GPFKJG_GFSL, ");
sqlMap.append(" GPFK_LFSL,WOGYLX_GXBZ "); sqlMap.append(" GPFKJG_LFSL,WOGYLX_GXBZ ");
sqlMap.append("from GPFK "); sqlMap.append("from GPFKJG ");
sqlMap.append(" left join WOGYLX on WOGYLX_ID = GPFK_FKGX "); sqlMap.append(" left join WOGYLX on WOGYLX_ID = GPFKJG_FKGX ");
sqlMap.append("where (GPFK_FKSJ >= :pStart and GPFK_FKSJ < :pEnd) and (WOGYLX_GXBZ = :pDGxbz or WOGYLX_GXBZ = :pMGxbz) ");//[a,b) sqlMap.append("where (GPFKJG_FKSJ >= :pStart and GPFKJG_FKSJ < :pEnd) and (WOGYLX_GXBZ = :pDGxbz or WOGYLX_GXBZ = :pMGxbz) ");//[a,b)
sqlMap.setParamValue("pStart", start); sqlMap.setParamValue("pStart", start);
sqlMap.setParamValue("pEnd", end); sqlMap.setParamValue("pEnd", end);
sqlMap.setParamValue("pDGxbz", GxlxGxbzEnum.ONLY.getId()); sqlMap.setParamValue("pDGxbz", GxlxGxbzEnum.ONLY.getId());
sqlMap.setParamValue("pMGxbz", GxlxGxbzEnum.LAST.getId()); sqlMap.setParamValue("pMGxbz", GxlxGxbzEnum.LAST.getId());
return sqlMap.query(Gpfk.class); return sqlMap.query(Gpfkjg.class);
} }
@Override @Override
public List<Gpfk> queryGpfk(Date date,String[] gxbzs) { public List<Gpfkjg> queryGpfk(Date date,String[] gxbzs) {
SqlMap sqlMap = new SqlMap(); SqlMap sqlMap = new SqlMap();
sqlMap.append("select GPFK_ID, GPFK_WOSNID, GPFK_FKLX, GPFK_FKGX, "); sqlMap.append("select GPFKJG_ID, GPFKJG_WOSNID, GPFKJG_FKLX, GPFKJG_FKGX, ");
sqlMap.append(" GPFK_FKSJ,GPFK_FKR,GPFK_FKRID, GPFK_FKBX, GPFK_FKJSSJ,"); sqlMap.append(" GPFKJG_FKSJ,GPFKJG_FKR,GPFKJG_FKRID, GPFKJG_FKBX, GPFKJG_FKJSSJ,");
sqlMap.append(" GPFK_HGBZ,GPFK_FKSL,GPFK_HGSL,GPFK_BHGSL,GPFK_GFSL, "); sqlMap.append(" GPFKJG_HGBZ,GPFKJG_FKSL,GPFKJG_HGSL,GPFKJG_BHGSL,GPFKJG_GFSL, ");
sqlMap.append(" GPFK_LFSL,WOGYLX_GXBZ "); sqlMap.append(" GPFKJG_LFSL,WOGYLX_GXBZ ");
sqlMap.append("from GPFK "); sqlMap.append("from GPFKJG ");
sqlMap.append(" left join WOGYLX on WOGYLX_ID = GPFK_FKGX "); sqlMap.append(" left join WOGYLX on WOGYLX_ID = GPFKJG_FKGX ");
sqlMap.append(" left join BZGX on BZGX_ID = WOGYLX_BZGXID "); sqlMap.append(" left join BZGX on BZGX_ID = WOGYLX_BZGXID ");
sqlMap.append("where ( GPFK_FKSJ >= :pKsrq and GPFK_FKSJ < :pJsrq ) "); sqlMap.append("where ( GPFKJG_FKSJ >= :pKsrq and GPFKJG_FKSJ < :pJsrq ) ");
sqlMap.append(" and ").append("WOGYLX_BZGXID", gxbzs); sqlMap.append(" and ").append("WOGYLX_BZGXID", gxbzs);
sqlMap.setParamValue("pKsrq", DateUtils.beginOfDay(date)); sqlMap.setParamValue("pKsrq", DateUtils.beginOfDay(date));
sqlMap.setParamValue("pJsrq", DateUtils.endOfDay(date)); sqlMap.setParamValue("pJsrq", DateUtils.endOfDay(date));
return sqlMap.query(Gpfk.class); return sqlMap.query(Gpfkjg.class);
} }
@Override @Override
public Gpfk queryWeekGpfk(Date date,String woid) { public Gpfkjg queryWeekGpfk(Date date,String woid) {
SqlMap sqlMap = new SqlMap(); SqlMap sqlMap = new SqlMap();
sqlMap.append("select sum(GPFK_FKSL) as GPFK_FKSL "); sqlMap.append("select sum(GPFKJG_FKSL) as GPFK_FKSL ");
sqlMap.append("from GPFK "); sqlMap.append("from GPFKJG ");
sqlMap.append(" left join WOGYLX on WOGYLX_ID = GPFK_FKGX "); sqlMap.append(" left join WOGYLX on WOGYLX_ID = GPFKJG_FKGX ");
sqlMap.append(" left join BZGX on BZGX_ID = WOGYLX_BZGXID "); sqlMap.append(" left join BZGX on BZGX_ID = WOGYLX_BZGXID ");
sqlMap.append("where (GPFK_FKSJ >= :pStart and GPFK_FKSJ < :pEnd) and (WOGYLX_GXBZ = :pDGxbz or WOGYLX_GXBZ = :pMGxbz) "); sqlMap.append("where (GPFKJG_FKSJ >= :pStart and GPFKJG_FKSJ < :pEnd) and (WOGYLX_GXBZ = :pDGxbz or WOGYLX_GXBZ = :pMGxbz) ");
sqlMap.setParamValue("pStart", DateUtils.beginOfDay(DateUtils.getCurrentWeekDateBegin(date))); sqlMap.setParamValue("pStart", DateUtils.beginOfDay(DateUtils.getCurrentWeekDateBegin(date)));
sqlMap.setParamValue("pEnd", DateUtils.endOfDay(DateUtils.getCurrentWeekDateEnd(date))); sqlMap.setParamValue("pEnd", DateUtils.endOfDay(DateUtils.getCurrentWeekDateEnd(date)));
sqlMap.setParamValue("pDGxbz", GxlxGxbzEnum.ONLY.getId()); sqlMap.setParamValue("pDGxbz", GxlxGxbzEnum.ONLY.getId());
...@@ -164,22 +165,22 @@ public class GpfkcxDaoImpl extends BaseDaoImpl implements GpfkcxDao { ...@@ -164,22 +165,22 @@ public class GpfkcxDaoImpl extends BaseDaoImpl implements GpfkcxDao {
sqlMap.append(" and WOGYLX_WOID = :pWoid "); sqlMap.append(" and WOGYLX_WOID = :pWoid ");
sqlMap.setParamValue("pWoid", woid); sqlMap.setParamValue("pWoid", woid);
} }
return sqlMap.queryEntity(Gpfk.class); return sqlMap.queryEntity(Gpfkjg.class);
} }
@Override @Override
public Gpfk queryMonthGpfk(Date date) { public Gpfkjg queryMonthGpfk(Date date) {
SqlMap sqlMap = new SqlMap(); SqlMap sqlMap = new SqlMap();
sqlMap.append("select sum(GPFK_FKSL) as GPFK_FKSL "); sqlMap.append("select sum(GPFKJG_FKSL) as GPFKJG_FKSL ");
sqlMap.append("from GPFK "); sqlMap.append("from GPFKJG ");
sqlMap.append(" left join WOGYLX on WOGYLX_ID = GPFK_FKGX "); sqlMap.append(" left join WOGYLX on WOGYLX_ID = GPFKJG_FKGX ");
sqlMap.append(" left join BZGX on BZGX_ID = WOGYLX_BZGXID "); sqlMap.append(" left join BZGX on BZGX_ID = WOGYLX_BZGXID ");
sqlMap.append("where (GPFK_FKSJ >= :pStart and GPFK_FKSJ < :pEnd) and (WOGYLX_GXBZ = :pDGxbz or WOGYLX_GXBZ = :pMGxbz) "); sqlMap.append("where (GPFKJG_FKSJ >= :pStart and GPFKJG_FKSJ < :pEnd) and (WOGYLX_GXBZ = :pDGxbz or WOGYLX_GXBZ = :pMGxbz) ");
sqlMap.setParamValue("pStart", DateUtils.beginOfMonth(date)); sqlMap.setParamValue("pStart", DateUtils.beginOfMonth(date));
sqlMap.setParamValue("pEnd", DateUtils.endOfMonth(date)); sqlMap.setParamValue("pEnd", DateUtils.endOfMonth(date));
sqlMap.setParamValue("pDGxbz", GxlxGxbzEnum.ONLY.getId()); sqlMap.setParamValue("pDGxbz", GxlxGxbzEnum.ONLY.getId());
sqlMap.setParamValue("pMGxbz", GxlxGxbzEnum.LAST.getId()); sqlMap.setParamValue("pMGxbz", GxlxGxbzEnum.LAST.getId());
return sqlMap.queryEntity(Gpfk.class); return sqlMap.queryEntity(Gpfkjg.class);
} }
} }
...@@ -21,9 +21,10 @@ public class KmesBoardDaoImpl extends BaseDaoImpl implements KmesBoardDao { ...@@ -21,9 +21,10 @@ public class KmesBoardDaoImpl extends BaseDaoImpl implements KmesBoardDao {
@Override @Override
public Pcjhmx queryWeekPcsl(Date date) { public Pcjhmx queryWeekPcsl(Date date) {
SqlMap sqlMap = new SqlMap(); SqlMap sqlMap = new SqlMap();
sqlMap.append("select sum(PCJHMX_JHSL) as PCJHMX_JHSL,sum(PCJHMX_WGSL) as PCJHMX_WGSL "); sqlMap.append("select sum(PCJHMX_JHSL) as PCJHMX_JHSL ");
sqlMap.append("from PCJHMX "); sqlMap.append("from PCJHMX ");
sqlMap.append("where 1=1 and ( :ksrq <= PCJHMX_JHRQ and PCJHMX_JHRQ <= :jsrq ) "); sqlMap.append(" left join PCJH on PCJH_ID = PCJHMX_MID ");
sqlMap.append("where 1=1 and ( :ksrq <= PCJH_JHRQ and PCJH_JHRQ <= :jsrq ) ");
sqlMap.setParamValue("ksrq", DateUtils.beginOfDay(date)); sqlMap.setParamValue("ksrq", DateUtils.beginOfDay(date));
sqlMap.setParamValue("jsrq", DateUtils.endOfDay(date)); sqlMap.setParamValue("jsrq", DateUtils.endOfDay(date));
return sqlMap.queryEntity(Pcjhmx.class); return sqlMap.queryEntity(Pcjhmx.class);
...@@ -32,7 +33,7 @@ public class KmesBoardDaoImpl extends BaseDaoImpl implements KmesBoardDao { ...@@ -32,7 +33,7 @@ public class KmesBoardDaoImpl extends BaseDaoImpl implements KmesBoardDao {
@Override @Override
public PcslVO queryTodayPcsl(Date date) { public PcslVO queryTodayPcsl(Date date) {
SqlMap sqlMap = new SqlMap(); SqlMap sqlMap = new SqlMap();
sqlMap.append("select sum(PCJHMX_JHSL) as JHSL,0 as WGSL "); sqlMap.append("select sum(PCJHMX_JHSL) as JHSL ");
sqlMap.append("from PCJHMX "); sqlMap.append("from PCJHMX ");
sqlMap.append("where 1=1 and ( :pKsrq <= PCJHMX_JHRQ and U_PCJHMX_JSRQ <= :pJsrq ) "); sqlMap.append("where 1=1 and ( :pKsrq <= PCJHMX_JHRQ and U_PCJHMX_JSRQ <= :pJsrq ) ");
sqlMap.append(" or ( PCJHMX_JHRQ < :pKsrq and U_PCJHMX_JSRQ > :pKsrq ) "); sqlMap.append(" or ( PCJHMX_JHRQ < :pKsrq and U_PCJHMX_JSRQ > :pKsrq ) ");
...@@ -45,7 +46,7 @@ public class KmesBoardDaoImpl extends BaseDaoImpl implements KmesBoardDao { ...@@ -45,7 +46,7 @@ public class KmesBoardDaoImpl extends BaseDaoImpl implements KmesBoardDao {
@Override @Override
public PcslVO queryMonthPcsl(Date date) { public PcslVO queryMonthPcsl(Date date) {
SqlMap sqlMap = new SqlMap(); SqlMap sqlMap = new SqlMap();
sqlMap.append("select sum(PCJHMX_JHSL) as JHSL,0 as WGSL "); sqlMap.append("select sum(PCJHMX_JHSL) as JHSL ");
sqlMap.append("from PCJHMX "); sqlMap.append("from PCJHMX ");
sqlMap.append("where 1=1 and ( :pKsrq <= PCJHMX_JHRQ and U_PCJHMX_JSRQ <= :pJsrq ) "); sqlMap.append("where 1=1 and ( :pKsrq <= PCJHMX_JHRQ and U_PCJHMX_JSRQ <= :pJsrq ) ");
sqlMap.append(" or ( PCJHMX_JHRQ < :pKsrq and U_PCJHMX_JSRQ > :pKsrq ) "); sqlMap.append(" or ( PCJHMX_JHRQ < :pKsrq and U_PCJHMX_JSRQ > :pKsrq ) ");
...@@ -77,13 +78,13 @@ public class KmesBoardDaoImpl extends BaseDaoImpl implements KmesBoardDao { ...@@ -77,13 +78,13 @@ public class KmesBoardDaoImpl extends BaseDaoImpl implements KmesBoardDao {
public UWoVO queryWorkingWO() { public UWoVO queryWorkingWO() {
SqlMap sqlMap = new SqlMap(); SqlMap sqlMap = new SqlMap();
sqlMap.append("select WO_DJID,WO_GCID,WO_YWRQ,WO_WLID,WO_XQSL,WO_WGSL,WLXX_CODE,WLXX_NAME,WLXX_GG "); sqlMap.append("select WO_DJID,WO_GCID,WO_YWRQ,WO_WLID,WO_XQSL,WO_WGSL,WLXX_CODE,WLXX_NAME,WLXX_GG ");
sqlMap.append("from GPFK "); sqlMap.append("from GPFKJG ");
sqlMap.append(" left join WOGYLX on WOGYLX_ID = GPFK_WOGYLX "); sqlMap.append(" left join WOGYLX on WOGYLX_ID = GPFKJG_WOGYLX ");
sqlMap.append(" left join WO on WO_ID = WOGYLX_WOID "); sqlMap.append(" left join WO on WO_ID = WOGYLX_WOID ");
sqlMap.append(" left join WLXX on WLXX_ID = WO_WLID "); sqlMap.append(" left join WLXX on WLXX_ID = WO_WLID ");
sqlMap.append("where 1=1 and GPFK_CJSJ = (select max(GPFK_CJSJ) "); sqlMap.append("where 1=1 and GPFKJG_CJSJ = (select max(GPFKJG_CJSJ) ");
sqlMap.append(" from GPFK "); sqlMap.append(" from GPFKJG ");
sqlMap.append(" left join WOGYLX on WOGYLX_ID = GPFK_WOGYLX "); sqlMap.append(" left join WOGYLX on WOGYLX_ID = GPFKJG_WOGYLX ");
sqlMap.append(" where WOGYLX_GXBZ = :pGxbz "); sqlMap.append(" where WOGYLX_GXBZ = :pGxbz ");
sqlMap.setParamValue("pGxbz", GxlxGxbzEnum.FIRST.getId()); sqlMap.setParamValue("pGxbz", GxlxGxbzEnum.FIRST.getId());
sqlMap.append(" ) "); sqlMap.append(" ) ");
...@@ -94,10 +95,10 @@ public class KmesBoardDaoImpl extends BaseDaoImpl implements KmesBoardDao { ...@@ -94,10 +95,10 @@ public class KmesBoardDaoImpl extends BaseDaoImpl implements KmesBoardDao {
public int queryZtsl(String[] fkids) { public int queryZtsl(String[] fkids) {
SqlMap sqlMap = new SqlMap(); SqlMap sqlMap = new SqlMap();
sqlMap.append(" select sum(a.sl) from "); sqlMap.append(" select sum(a.sl) from ");
sqlMap.append(" (select count(1) as sl,bzgx_id as bzgx from gpfk "); sqlMap.append(" (select count(1) as sl,bzgx_id as bzgx from gpfkjg ");
sqlMap.append(" left join wogylx on wogylx_id = gpfk_fkgx "); sqlMap.append(" left join wogylx on wogylx_id = gpfkjg_fkgx ");
sqlMap.append(" left join bzgx on bzgx_id = WOGYLX_BZGXID "); sqlMap.append(" left join bzgx on bzgx_id = wogylx_bzgxid ");
sqlMap.append(" group by bzgx_id) a "); sqlMap.append(" group by bzgx_id ) a ");
sqlMap.append(" where 1=1 "); sqlMap.append(" where 1=1 ");
if(fkids!=null&&fkids.length>0) { if(fkids!=null&&fkids.length>0) {
sqlMap.append(" and ( "); sqlMap.append(" and ( ");
......
...@@ -1800,11 +1800,15 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService ...@@ -1800,11 +1800,15 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
GpfkCondition gpfkCondition = new GpfkCondition(); GpfkCondition gpfkCondition = new GpfkCondition();
gpfkCondition.setWosnid(fkCondition.getSncode()); gpfkCondition.setWosnid(fkCondition.getSncode());
gpfkCondition.setBzgxid(fkCondition.getBzgxid()); gpfkCondition.setBzgxid(fkCondition.getBzgxid());
FkVO curFkVo = gpfkDao.queryKwellWxWoBySnidUptoDate(fkCondition.getSncode()); //FkVO curFkVo = gpfkDao.queryKwellWxWoBySnidUptoDate(fkCondition.getSncode());
checkLastBzgxIfComplete(curFkVo); //checkLastBzgxIfComplete(curFkVo);
checkNextBzgxIfExistFk(curFkVo); //checkNextBzgxIfExistFk(curFkVo);
if(StringUtils.isNotEmpty(curFkVo.getId())) { // if(StringUtils.isNotEmpty(curFkVo.getId())) {
curFkVo = gpfkDao.queryWxWowithIfExistGpfkByWosnAndBzgxidInNewDate(fkCondition.getSncode(), fkCondition.getBzgxid()); // curFkVo = gpfkDao.queryWxWowithIfExistGpfkByWosnAndBzgxidInNewDate(fkCondition.getSncode(), fkCondition.getBzgxid());
// }
FkVO curFkVo = gpfkDao.queryWxWowithIfExistGpfkByWosnAndBzgxidInNewDate(fkCondition.getSncode(), fkCondition.getBzgxid());
if (curFkVo == null) {
curFkVo = gpfkDao.queryKwellWxWoBySnidUptoDate(fkCondition.getSncode());
} }
curFkVo.setSntype(snType); curFkVo.setSntype(snType);
return curFkVo; return curFkVo;
...@@ -1826,9 +1830,10 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService ...@@ -1826,9 +1830,10 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
gpfk.setHgsl(1.0); gpfk.setHgsl(1.0);
gpfk.setBhgsl(0.0); gpfk.setBhgsl(0.0);
gpfk.setBzgxid(fkCondition.getBzgxid()); gpfk.setBzgxid(fkCondition.getBzgxid());
gpfk.setFkgx(fkCondition.getBzgxid());
insert(gpfk); insert(gpfk);
FkVO newFkVo =gpfkDao.queryWxWowithIfExistGpfkByWosnAndBzgxidInNewDate(fkCondition.getWosncode(), fkCondition.getBzgxid()); FkVO newFkVo =gpfkDao.queryWxWowithIfExistGpfkByWosnAndBzgxidInNewDate(fkCondition.getWosncode(), fkCondition.getBzgxid());
addOrUpdateGpfkjg(curFkVo.getWlid(), fkCondition.getBzgxid(), null, curFkVo.getWosnCode(), HGBZ); addOrUpdateGpfkjg(curFkVo.getWlid(), fkCondition.getBzgxid(), fkCondition.getBzgxid(), curFkVo.getWosnCode(), HGBZ);
newFkVo.setSntype(snType); newFkVo.setSntype(snType);
return newFkVo; return newFkVo;
} }
...@@ -1849,9 +1854,10 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService ...@@ -1849,9 +1854,10 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
gpfk.setHgsl(1.0); gpfk.setHgsl(1.0);
gpfk.setBhgsl(0.0); gpfk.setBhgsl(0.0);
gpfk.setBzgxid(fkCondition.getBzgxid()); gpfk.setBzgxid(fkCondition.getBzgxid());
gpfk.setFkgx(fkCondition.getBzgxid());
insert(gpfk); insert(gpfk);
FkVO newFkVo =gpfkDao.queryWxWowithIfExistGpfkByWosnAndBzgxidInNewDate(fkCondition.getWosncode(), fkCondition.getBzgxid()); FkVO newFkVo =gpfkDao.queryWxWowithIfExistGpfkByWosnAndBzgxidInNewDate(fkCondition.getWosncode(), fkCondition.getBzgxid());
addOrUpdateGpfkjg(curFkVo.getWlid(), fkCondition.getBzgxid(), null, curFkVo.getWosnCode(), BHGBZ); addOrUpdateGpfkjg(curFkVo.getWlid(), fkCondition.getBzgxid(), fkCondition.getBzgxid(), curFkVo.getWosnCode(), BHGBZ);
newFkVo.setSntype(snType); newFkVo.setSntype(snType);
return newFkVo; return newFkVo;
} }
......
...@@ -9,6 +9,7 @@ import com.gavel.common.utils.StringUtils; ...@@ -9,6 +9,7 @@ import com.gavel.common.utils.StringUtils;
import com.gavel.kwell.dao.GpfkcxDao; import com.gavel.kwell.dao.GpfkcxDao;
import com.gavel.kwell.dao.KmesBoardDao; import com.gavel.kwell.dao.KmesBoardDao;
import com.gavel.kwell.persistent.Gpfk; import com.gavel.kwell.persistent.Gpfk;
import com.gavel.kwell.persistent.Gpfkjg;
import com.gavel.kwell.service.KmesBoardService; import com.gavel.kwell.service.KmesBoardService;
import com.gavel.kwell.utils.DateCalculateUtil; import com.gavel.kwell.utils.DateCalculateUtil;
import com.gavel.kwell.utils.KwellParamEnum; import com.gavel.kwell.utils.KwellParamEnum;
...@@ -63,12 +64,22 @@ public class KmesBoardServiceImpl extends BaseEditServiceImpl implements KmesBoa ...@@ -63,12 +64,22 @@ public class KmesBoardServiceImpl extends BaseEditServiceImpl implements KmesBoa
for(int i=0;i<dateList.size()-1;i++){ for(int i=0;i<dateList.size()-1;i++){
List<Double> doubleList = sdclVO.getTimeperiodMount(); List<Double> doubleList = sdclVO.getTimeperiodMount();
List<String> xseriesList = sdclVO.getXseriesList(); List<String> xseriesList = sdclVO.getXseriesList();
Date dateStart = dateList.get(i); Date dateStart =null;
Date dateEnd = dateList.get(i+1); if(i== 0){
List<Gpfk> gpfks = queryByBetween(dateStart,dateEnd); dateStart = DateUtils.beginOfDay( dateList.get(0));//8:30置为0点
}else {
dateStart = dateList.get(i);
}
Date dateEnd=null;
if(i == dateList.size()-2){
dateEnd = DateUtils.endOfDay( dateList.get(i+1));//21:30置为23.59点
}else {
dateEnd = dateList.get(i+1);
}
List<Gpfkjg> gpfks = queryByBetween(dateStart,dateEnd);
double sl = 0.0; double sl = 0.0;
if(gpfks != null && gpfks.size()>0){ if(gpfks != null && gpfks.size()>0){
sl = gpfks.stream().mapToDouble(Gpfk::getFksl).sum(); sl = gpfks.stream().mapToDouble(Gpfkjg::getFksl).sum();//每一天
} }
total= NumberUtils.plus(total,sl); total= NumberUtils.plus(total,sl);
doubleList.add(sl); doubleList.add(sl);
...@@ -78,7 +89,7 @@ public class KmesBoardServiceImpl extends BaseEditServiceImpl implements KmesBoa ...@@ -78,7 +89,7 @@ public class KmesBoardServiceImpl extends BaseEditServiceImpl implements KmesBoa
return sdclVO; return sdclVO;
} }
private List<Gpfk> queryByBetween(Date start,Date end){ private List<Gpfkjg> queryByBetween(Date start,Date end){
return gpfkcxDao.queryByBetween(start,end); return gpfkcxDao.queryByBetween(start,end);
} }
...@@ -91,9 +102,18 @@ public class KmesBoardServiceImpl extends BaseEditServiceImpl implements KmesBoa ...@@ -91,9 +102,18 @@ public class KmesBoardServiceImpl extends BaseEditServiceImpl implements KmesBoa
for(Date date : dateList){ for(Date date : dateList){
PcslVO pcslVO = new PcslVO(); PcslVO pcslVO = new PcslVO();
Pcjhmx pcjhmx = kmesBoardDao.queryWeekPcsl(date); Pcjhmx pcjhmx = kmesBoardDao.queryWeekPcsl(date);
pcslVO.setPcrq(date); List<Gpfkjg> gpfks = queryByBetween(date,date);
double wgsl =0.0;
if(gpfks != null && gpfks.size()>0){
wgsl = gpfks.stream().mapToDouble(Gpfkjg::getFksl).sum();//每一天
}
if(pcjhmx != null){
pcslVO.setJhsl(pcjhmx.getJhsl()==null?0.0:pcjhmx.getJhsl()); pcslVO.setJhsl(pcjhmx.getJhsl()==null?0.0:pcjhmx.getJhsl());
pcslVO.setWgsl(pcjhmx.getWgsl()==null?0.0:pcjhmx.getWgsl()); }else {
pcslVO.setJhsl(0.0);
}
pcslVO.setPcrq(date);
pcslVO.setWgsl(wgsl);
pcslVOList.add(pcslVO); pcslVOList.add(pcslVO);
} }
return pcslVOList; return pcslVOList;
...@@ -102,28 +122,32 @@ public class KmesBoardServiceImpl extends BaseEditServiceImpl implements KmesBoa ...@@ -102,28 +122,32 @@ public class KmesBoardServiceImpl extends BaseEditServiceImpl implements KmesBoa
@Override @Override
public PcslVO queryTodayPcsl() { public PcslVO queryTodayPcsl() {
PcslVO pcslVO = kmesBoardDao.queryTodayPcsl(new Date()); PcslVO pcslVO = kmesBoardDao.queryTodayPcsl(new Date());
if(pcslVO != null){ if(pcslVO == null){
Gpfk gpfk = gpfkcxDao.queryWeekGpfk(new Date(),""); pcslVO = new PcslVO();
pcslVO.setWgsl(gpfk.getFgsl()==null?0.0:gpfk.getFgsl());
}else {
pcslVO =new PcslVO();
pcslVO.setJhsl(0.0); pcslVO.setJhsl(0.0);
pcslVO.setWgsl(0.0);
} }
Gpfkjg gpfkjg = gpfkcxDao.queryWeekGpfk(new Date(),"");
double wgsl =0.0;
if(gpfkjg != null){
wgsl = gpfkjg.getFksl()==null?0.0:gpfkjg.getFksl();
}
pcslVO.setWgsl(wgsl);
return pcslVO; return pcslVO;
} }
@Override @Override
public PcslVO queryMonthPcsl() { public PcslVO queryMonthPcsl() {
PcslVO pcslVO = kmesBoardDao.queryMonthPcsl(new Date()); PcslVO pcslVO = kmesBoardDao.queryMonthPcsl(new Date());
if(pcslVO != null){ if(pcslVO == null){
Gpfk gpfk = gpfkcxDao.queryMonthGpfk(new Date()); pcslVO = new PcslVO();
pcslVO.setWgsl(gpfk.getFgsl()==null?0.0:gpfk.getFgsl());
}else {
pcslVO =new PcslVO();
pcslVO.setJhsl(0.0); pcslVO.setJhsl(0.0);
pcslVO.setWgsl(0.0);
} }
Gpfkjg gpfkjg = gpfkcxDao.queryMonthGpfk(new Date());
double wgsl =0.0;
if(gpfkjg != null){
pcslVO.setWgsl(gpfkjg.getFksl()==null?0.0:gpfkjg.getFksl());
}
pcslVO.setWgsl(wgsl);
return pcslVO; return pcslVO;
} }
...@@ -132,8 +156,8 @@ public class KmesBoardServiceImpl extends BaseEditServiceImpl implements KmesBoa ...@@ -132,8 +156,8 @@ public class KmesBoardServiceImpl extends BaseEditServiceImpl implements KmesBoa
public List<UWoVO> queryWo() { public List<UWoVO> queryWo() {
List<UWoVO> uWoVOList = kmesBoardDao.queryWo(new Date()); List<UWoVO> uWoVOList = kmesBoardDao.queryWo(new Date());
for(UWoVO uWoVO : uWoVOList ){ for(UWoVO uWoVO : uWoVOList ){
Gpfk gpfk = gpfkcxDao.queryWeekGpfk(new Date(),uWoVO.getId()); Gpfkjg gpfk = gpfkcxDao.queryWeekGpfk(new Date(),uWoVO.getId());
uWoVO.setWgsl(gpfk.getFgsl()==null?0.0:gpfk.getFgsl()); uWoVO.setWgsl(gpfk.getFksl()==null?0.0:gpfk.getFksl());
} }
return uWoVOList; return uWoVOList;
} }
...@@ -155,12 +179,12 @@ public class KmesBoardServiceImpl extends BaseEditServiceImpl implements KmesBoa ...@@ -155,12 +179,12 @@ public class KmesBoardServiceImpl extends BaseEditServiceImpl implements KmesBoa
String[] gxbzs = gxbz.split(","); String[] gxbzs = gxbz.split(",");
for(Date date : dateList){ for(Date date : dateList){
GpfkHgVO gpfkHgVO = new GpfkHgVO(); GpfkHgVO gpfkHgVO = new GpfkHgVO();
List<Gpfk> gpfks = gpfkcxDao.queryGpfk(date,gxbzs); List<Gpfkjg> gpfks = gpfkcxDao.queryGpfk(date,gxbzs);
Integer fksl =0; Double fksl =0.0;
Double hgsl =0.0; Double hgsl =0.0;
if(CollectionUtils.isNotEmpty(gpfks)){ if(CollectionUtils.isNotEmpty(gpfks)){
fksl= gpfks.size(); fksl = gpfks.stream().mapToDouble(Gpfkjg::getFksl).sum();
hgsl = gpfks.stream().mapToDouble(Gpfk::getHgsl).sum(); hgsl = gpfks.stream().mapToDouble(Gpfkjg::getHgsl).sum();
gpfkHgVO.setFksl(fksl); gpfkHgVO.setFksl(fksl);
gpfkHgVO.setHgsl(hgsl); gpfkHgVO.setHgsl(hgsl);
}else { }else {
......
...@@ -9,7 +9,7 @@ public class GpfkHgVO extends BaseEntity { ...@@ -9,7 +9,7 @@ public class GpfkHgVO extends BaseEntity {
private Date fkrq; private Date fkrq;
private Integer fksl;//反馈数量 private Double fksl;//反馈数量
private Double hgsl;//合格数量 private Double hgsl;//合格数量
...@@ -21,11 +21,11 @@ public class GpfkHgVO extends BaseEntity { ...@@ -21,11 +21,11 @@ public class GpfkHgVO extends BaseEntity {
this.fkrq = fkrq; this.fkrq = fkrq;
} }
public Integer getFksl() { public Double getFksl() {
return fksl; return fksl;
} }
public void setFksl(Integer fksl) { public void setFksl(Double fksl) {
this.fksl = fksl; this.fksl = fksl;
} }
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<form class="query-criteria"> <form class="query-criteria">
<ul> <ul>
<li class="gui-form-row" > <li class="gui-form-row" >
<div class="gui-col-sm3"> <div class="gui-col-sm2">
<label class="gui-form-label">产品条码:</label> <label class="gui-form-label">产品条码:</label>
<div class="gui-input-block"> <div class="gui-input-block">
<input type="text" name="wosnid" style="width: 100%" ></div> <input type="text" name="wosnid" style="width: 100%" ></div>
...@@ -37,9 +37,15 @@ ...@@ -37,9 +37,15 @@
<input type="text" name="wodjid" style="width: 100%" > <input type="text" name="wodjid" style="width: 100%" >
</div> </div>
</div> </div>
<div class="gui-col-sm3">
<label class="gui-form-label">工序:</label>
<div class="gui-input-block">
<input type="text" name="bzgxid" style="width: 100%" >
</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="bzgxid"/> <input type="hidden" name="bzbzgxid"/>
</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>
...@@ -57,6 +63,7 @@ ...@@ -57,6 +63,7 @@
var $datEnd=$div.find("input[name='end']"); var $datEnd=$div.find("input[name='end']");
var $txtScgd=$div.find('input[name="wodjid"]'); var $txtScgd=$div.find('input[name="wodjid"]');
var $txtWosnid=$div.find('input[name="wosnid"]'); var $txtWosnid=$div.find('input[name="wosnid"]');
var $bzgxid=$div.find('input[name="bzgxid"]');
var gxName='';var gzzxid=""; var gxName='';var gzzxid="";
var gzzxname="";var fkrName=""; var gzzxname="";var fkrName="";
...@@ -185,31 +192,47 @@ ...@@ -185,31 +192,47 @@
} }
/*用户操作*/ /*用户操作*/
function run(res){ function run(res){
gas.Dialog({ $bzgxid.iCombobox({valueField: "id", textField: "name", allowNull:false,required:true,allowEdit:false, url: 'gygl/bzgx/queryZpBzgx',onSelect:function (a) {
title:"选择工序", // $dialog.find("input[name='gxName']").val(a.name);
width:480, // $dialog.find("input[name='gzzxid']").val(a.gzzxid||'');
height:280, // $dialog.find("input[name='gzzxname']").val(a.gzzxname||'')
minimizable:false, gxName=a.name||""
maximizable:false, gzzxid=a.gzzxid||""
href:"kmes/gphy/gx", gzzxname=a.gzzxname||""
onInit:function (element) {
}, },
regResultHandler:function (element) { loadFilter: function (a) {
if(!element.form("validate")){ var datas=a["data"]["records"];
return false $.each(datas,function (i,item) {
} item["name"]=item["gzzxname"]+"-"+item["name"]
var data=DataBind.collectData(element); });
$div.find("input[name='bxid']").val(data.bxid||""); return datas
$div.find("input[name='bzgxid']").val(data.gxid||"");
$div.find("input[name='fkrid']").val(window.sessionStorage.getItem('userId'));
fkrName=window.sessionStorage.getItem('userName');
gxName=data.gxName||"";
gzzxid=data.gzzxid||'';
gzzxname=data.gzzxname||"";
$datagrid.datagrid("options").url="kmes/gpfk/query";
$datagrid.datagrid("load",DataBind.collectData($div))
} }
}) })
// gas.Dialog({
// title:"选择工序",
// width:480,
// height:280,
// minimizable:false,
// maximizable:false,
// href:"kmes/gphy/gx",
// onInit:function (element) {
// },
// regResultHandler:function (element) {
// if(!element.form("validate")){
// return false
// }
// var data=DataBind.collectData(element);
// $div.find("input[name='bxid']").val(data.bxid||"");
// $div.find("input[name='bzgxid']").val(data.gxid||"");
// $div.find("input[name='fkrid']").val(window.sessionStorage.getItem('userId'));
// fkrName=window.sessionStorage.getItem('userName');
// gxName=data.gxName||"";
// gzzxid=data.gzzxid||'';
// gzzxname=data.gzzxname||"";
// $datagrid.datagrid("options").url="kmes/gpfk/query";
// $datagrid.datagrid("load",DataBind.collectData($div))
// }
// })
} }
gas.load(paramsInit,pageInit,dataInit,run); gas.load(paramsInit,pageInit,dataInit,run);
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<form class="query-criteria"> <form class="query-criteria">
<ul> <ul>
<li class="gui-form-row" > <li class="gui-form-row" >
<div class="gui-col-sm3"> <div class="gui-col-sm2">
<label class="gui-form-label">产品条码:</label> <label class="gui-form-label">产品条码:</label>
<div class="gui-input-block"> <div class="gui-input-block">
<input type="text" name="wosnid" style="width: 100%" ></div> <input type="text" name="wosnid" style="width: 100%" ></div>
...@@ -36,9 +36,15 @@ ...@@ -36,9 +36,15 @@
<div class="gui-input-block"> <div class="gui-input-block">
<input type="text" name="wodjid" style="width: 100%" ></div> <input type="text" name="wodjid" style="width: 100%" ></div>
</div> </div>
<div class="gui-col-sm3">
<label class="gui-form-label">工序:</label>
<div class="gui-input-block">
<input type="text" name="bzgxid" style="width: 100%" >
</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="bzgxid"/> <input type="hidden" name="bzbzgxid"/>
</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>
...@@ -56,6 +62,7 @@ ...@@ -56,6 +62,7 @@
var $datEnd=$div.find("input[name='end']"); var $datEnd=$div.find("input[name='end']");
var $txtScgd=$div.find('input[name="wodjid"]'); var $txtScgd=$div.find('input[name="wodjid"]');
var $txtWosnid=$div.find('input[name="wosnid"]'); var $txtWosnid=$div.find('input[name="wosnid"]');
var $bzgxid=$div.find('input[name="bzgxid"]');
var jzcs=0; var jzcs=0;
var gxName='';var gzzxid=""; var gxName='';var gzzxid="";
var gzzxname="";var fkrName=""; var gzzxname="";var fkrName="";
...@@ -187,31 +194,47 @@ ...@@ -187,31 +194,47 @@
} }
/*用户操作*/ /*用户操作*/
function run(res){ function run(res){
gas.Dialog({ $bzgxid.iCombobox({valueField: "id", textField: "name", allowNull:false, required:true,allowEdit:false, url: 'gygl/bzgx/queryJyBzgx',onSelect:function (a) {
title:"选择工序", // $dialog.find("input[name='gxName']").val(a.name);
width:480, // $dialog.find("input[name='gzzxid']").val(a.gzzxid||'');
height:280, // $dialog.find("input[name='gzzxname']").val(a.gzzxname||'')
minimizable:false, gxName=a.name
maximizable:false, gzzxid=a.gzzxid
href:"kmes/gpjy/gx", gzzxname=a.gzzxname
onInit:function (element) {
}, },
regResultHandler:function (element) { loadFilter: function (a) {
if(!element.form("validate")){ var datas=a["data"]["records"];
return false $.each(datas,function (i,item) {
} item["name"]=item["gzzxname"]+"-"+item["name"]
var data=DataBind.collectData(element); });
$div.find("input[name='bxid']").val(data.bxid||""); return datas
$div.find("input[name='bzgxid']").val(data.gxid||"");
$div.find("input[name='fkrid']").val(window.sessionStorage.getItem('userId'));
fkrName=window.sessionStorage.getItem('userName');
gxName=data.gxName||"";
gzzxid=data.gzzxid||'';
gzzxname=data.gzzxname||"";
$datagrid.datagrid("options").url="kmes/gpjy/query";
$datagrid.datagrid("load",DataBind.collectData($div));
} }
}) });
// gas.Dialog({
// title:"选择工序",
// width:480,
// height:280,
// minimizable:false,
// maximizable:false,
// href:"kmes/gpjy/gx",
// onInit:function (element) {
// },
// regResultHandler:function (element) {
// if(!element.form("validate")){
// return false
// }
// var data=DataBind.collectData(element);
// $div.find("input[name='bxid']").val(data.bxid||"");
// $div.find("input[name='bzgxid']").val(data.gxid||"");
// $div.find("input[name='fkrid']").val(window.sessionStorage.getItem('userId'));
// fkrName=window.sessionStorage.getItem('userName');
// gxName=data.gxName||"";
// gzzxid=data.gzzxid||'';
// gzzxname=data.gzzxname||"";
// $datagrid.datagrid("options").url="kmes/gpjy/query";
// $datagrid.datagrid("load",DataBind.collectData($div));
// }
// })
} }
gas.load(paramsInit,pageInit,dataInit,run); gas.load(paramsInit,pageInit,dataInit,run);
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<form class="query-criteria"> <form class="query-criteria">
<ul> <ul>
<li class="gui-form-row" > <li class="gui-form-row" >
<div class="gui-col-sm3"> <div class="gui-col-sm2">
<label class="gui-form-label">产品条码:</label> <label class="gui-form-label">产品条码:</label>
<div class="gui-input-block"> <div class="gui-input-block">
<input type="text" name="wosnid" style="width: 100%" ></div> <input type="text" name="wosnid" style="width: 100%" ></div>
...@@ -36,9 +36,14 @@ ...@@ -36,9 +36,14 @@
<div class="gui-input-block"> <div class="gui-input-block">
<input type="text" name="wodjid" style="width: 100%" ></div> <input type="text" name="wodjid" style="width: 100%" ></div>
</div> </div>
<div class="gui-col-sm3">
<label class="gui-form-label">工序:</label>
<div class="gui-input-block">
<input type="text" name="bzgxid" style="width: 100%" ></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="bzgxid"/> <input type="hidden" name="bzbzgxid"/>
</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>
...@@ -56,6 +61,7 @@ ...@@ -56,6 +61,7 @@
var $datEnd=$div.find("input[name='end']"); var $datEnd=$div.find("input[name='end']");
var $txtScgd=$div.find('input[name="wodjid"]'); var $txtScgd=$div.find('input[name="wodjid"]');
var $txtWosnid=$div.find('input[name="wosnid"]'); var $txtWosnid=$div.find('input[name="wosnid"]');
var $bzgxid=$div.find('input[name="bzgxid"]');
var gxName='';var gzzxid=""; var gxName='';var gzzxid="";
var gzzxname="";var fkrName=""; var gzzxname="";var fkrName="";
function paramsInit() { function paramsInit() {
...@@ -184,31 +190,47 @@ ...@@ -184,31 +190,47 @@
} }
/*用户操作*/ /*用户操作*/
function run(res){ function run(res){
gas.Dialog({ $bzgxid.iCombobox({valueField: "id", textField: "name", allowNull:false,required:true, allowEdit:false, url: 'gygl/bzgx/queryWxBzgx',onSelect:function (a) {
title:"选择工序", // $dialog.find("input[name='gxName']").val(a.name)
width:480, // $dialog.find("input[name='gzzxid']").val(a.gzzxid||'')
height:280, // $dialog.find("input[name='gzzxname']").val(a.gzzxname||'')
minimizable:false, gxName=a.name
maximizable:false, gzzxid=a.gzzxid
href:"kmes/gpwx/gx", gzzxname=a.gzzxname
onInit:function (element) {
}, },
regResultHandler:function (element) { loadFilter: function (a) {
if(!element.form("validate")){ var datas=a["data"]["records"]
return false $.each(datas,function (i,item) {
} item["name"]=item["gzzxname"]+"-"+item["name"]
var data=DataBind.collectData(element); });
$div.find("input[name='bxid']").val(data.bxid||""); return datas
$div.find("input[name='bzgxid']").val(data.gxid||""); }});
$div.find("input[name='fkrid']").val(window.sessionStorage.getItem('userId')); // gas.Dialog({
fkrName=window.sessionStorage.getItem('userName'); // title:"选择工序",
gxName=data.gxName||""; // width:480,
gzzxid=data.gzzxid||''; // height:280,
gzzxname=data.gzzxname||""; // minimizable:false,
$datagrid.datagrid("options").url="kmes/gpfk/query"; // maximizable:false,
$datagrid.datagrid("load",DataBind.collectData($div)); // href:"kmes/gpwx/gx",
} // onInit:function (element) {
}) // },
// regResultHandler:function (element) {
// if(!element.form("validate")){
// return false
// }
// var data=DataBind.collectData(element);
// $div.find("input[name='bxid']").val(data.bxid||"");
// $div.find("input[name='bzgxid']").val(data.gxid||"");
// $div.find("input[name='fkrid']").val(window.sessionStorage.getItem('userId'));
// fkrName=window.sessionStorage.getItem('userName');
// gxName=data.gxName||"";
// gzzxid=data.gzzxid||'';
// gzzxname=data.gzzxname||"";
// $datagrid.datagrid("options").url="kmes/gpfk/query";
// $datagrid.datagrid("load",DataBind.collectData($div));
// }
// })
} }
gas.load(paramsInit,pageInit,dataInit,run); gas.load(paramsInit,pageInit,dataInit,run);
......
<style type="text/css">
.datebox-button{
display: none!important;
}
</style>
<div id="woPcjhkEdit" class="e-dialog-container" data-options="width: 1120, height: 630"> <div id="woPcjhkEdit" class="e-dialog-container" data-options="width: 1120, height: 630">
<div class="e-dialog-body"> <div class="e-dialog-body">
<div class="e-dialog-box"> <div class="e-dialog-box">
...@@ -154,10 +159,12 @@ ...@@ -154,10 +159,12 @@
$datjsrq.datebox('setValue',new Date(weekEnd)) $datjsrq.datebox('setValue',new Date(weekEnd))
let nowdata=$datagrid.datagrid('getData').rows let nowdata=$datagrid.datagrid('getData').rows
nowdata.forEach(function(e){ nowdata.forEach(function(e){
e.jhrq=woksrq
e.ksrq=woksrq e.ksrq=woksrq
e.jsrq=wojsrq e.jsrq=wojsrq
}) })
$datagrid.datagrid("loadData",nowdata); console.log(nowdata)
$datagrid.datagrid("loadData",nowdata)
}}) }})
$xzzc.iCombobox({valueField: 'zcv', textField: 'zc', $xzzc.iCombobox({valueField: 'zcv', textField: 'zc',
data:[{zcv:0,zc:""},{zcv:1,zc:"第一周"},{zcv:0,zc:"第二周"},{zcv:0,zc:"第三周"},{zcv:0,zc:"第四周"},{zcv:0,zc:"第五周"},{zcv:0,zc:"第六周"}] data:[{zcv:0,zc:""},{zcv:1,zc:"第一周"},{zcv:0,zc:"第二周"},{zcv:0,zc:"第三周"},{zcv:0,zc:"第四周"},{zcv:0,zc:"第五周"},{zcv:0,zc:"第六周"}]
...@@ -313,7 +320,6 @@ ...@@ -313,7 +320,6 @@
let month=date.getMonth()+1 let month=date.getMonth()+1
let day=date.getDate() let day=date.getDate()
let weekday=date.getUTCDay() let weekday=date.getUTCDay()
console.log(weekday)
weekday=get17(weekday) weekday=get17(weekday)
let nowWeek = getMonthWeek(year,month,day).getWeek let nowWeek = getMonthWeek(year,month,day).getWeek
let weekStart=getBeforeDate(-(weekday-1),date)*1000 let weekStart=getBeforeDate(-(weekday-1),date)*1000
......
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